This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, origin/master, created. db8de50ec57eb6dc39e88826882b06cf5a133063
- From: carlos at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Sep 2009 22:43:24 -0000
- Subject: GNU C Library master sources branch, origin/master, created. db8de50ec57eb6dc39e88826882b06cf5a133063
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, origin/master has been created
at db8de50ec57eb6dc39e88826882b06cf5a133063 (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db8de50ec57eb6dc39e88826882b06cf5a133063
commit db8de50ec57eb6dc39e88826882b06cf5a133063
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon Sep 7 17:22:18 2009 -0400
Implement new NPTL POSIX Threads ABI for HPPA.
This version of the NPTL POSIX thread ABI for hppa does
not break backwards compatibility with the the old
Linuxthreads ABI, and is therefore suitable for release
by distributions.
sysdeps/unix/sysv/linux/hppa/
* internaltypes.h: New file.
sysdeps/unix/sysv/linux/hppa/nptl/
* pthreadP.h: New file.
* pthread.h: New file.
* pthread_cond_broadcast.c: New file.
* pthread_cond_destroy.c: New file.
* pthread_cond_init.c: New file.
* pthread_cond_signal.c: New file.
* pthread_cond_timedwait.c: New file.
* pthread_cond_wait.c: New file.
* bits/pthreadtypes.h: Make pthread_mutex_t,
pthread_rwlock_t, and pthread_cond_t backwards
compatible.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 60480d1..bb06461 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,21 @@
+2009-04-01 Carlos O'Donell <carlos@codesourcery.com>
+
+ sysdeps/unix/sysv/linux/hppa/
+ * internaltypes.h: New file.
+
+ sysdeps/unix/sysv/linux/hppa/nptl/
+ * pthreadP.h: New file.
+ * pthread.h: New file.
+ * pthread_cond_broadcast.c: New file.
+ * pthread_cond_destroy.c: New file.
+ * pthread_cond_init.c: New file.
+ * pthread_cond_signal.c: New file.
+ * pthread_cond_timedwait.c: New file.
+ * pthread_cond_wait.c: New file.
+ * bits/pthreadtypes.h: Make pthread_mutex_t,
+ pthread_rwlock_t, and pthread_cond_t backwards
+ compatible.
+
2009-04-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/hppa1.1/s_signbit.c: New file.
diff --git a/sysdeps/unix/sysv/linux/hppa/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/internaltypes.h
new file mode 100644
index 0000000..6eee0b3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/internaltypes.h
@@ -0,0 +1,79 @@
+#include_next <internaltypes.h>
+#ifndef _INTERNAL_TYPES_H_HPPA_
+#define _INTERNAL_TYPES_H_HPPA_ 1
+#include <atomic.h>
+
+/* In GLIBC 2.10 HPPA switched from Linuxthreads to NPTL, and in order
+to maintain ABI compatibility with pthread_cond_t, some care had to be
+taken.
+
+The NPTL pthread_cond_t grew in size. When HPPA switched to NPTL, we
+dropped the use of ldcw, and switched to the kernel helper routine for
+compare-and-swap. This allowed HPPA to use the 4-word 16-byte aligned
+lock words, and alignment words to store the additional pthread_cond_t
+data. Once organized properly the new NPTL pthread_cond_t was 1 word
+smaller than the Linuxthreads version.
+
+However, we were faced with the case that users may have initialized the
+pthread_cond_t with PTHREAD_COND_INITIALIZER. In this case, the first
+four words were set to one, and must be cleared before any NPTL code
+used these words.
+
+We didn't want to use LDCW, because it continues to be a source of bugs
+when applications memset pthread_cond_t to all zeroes by accident. This
+works on all other architectures where lock words are unlocked at zero.
+Remember that because of the semantics of LDCW, a locked word is set to
+zero, and an unlocked word is set to 1.
+
+Instead we used atomic_compare_and_exchange_val_acq, but we couldn't use
+this on any of the pthread_cond_t words, otherwise it might interfere
+with the current operation of the structure. To solve this problem we
+used the left over word.
+
+If the stucture was initialized by a legacy Linuxthread
+PTHREAD_COND_INITIALIZER it contained a 1, and this indicates that the
+structure requires zeroing for NPTL. The first thread to come upon a
+pthread_cond_t with a 1 in the __initializer field, will
+compare-and-swap the value, placing a 2 there which will cause all other
+threads using the same pthread_cond_t to wait for the completion of the
+initialization. Lastly, we use a store (with memory barrier) to change
+__initializer from 2 to 0. Note that the store is strongly ordered, but
+we use the PA 1.1 compatible form which is ",ma" with zero offset.
+
+In the future, when the application is recompiled with NPTL
+PTHREAD_COND_INITIALIZER it will be a quick compare-and-swap, which
+fails because __initializer is zero, and the structure will be used as
+is correctly. */
+
+#define cond_compat_clear(var) \
+({ \
+ int tmp = 0; \
+ var->__data.__lock = 0; \
+ var->__data.__futex = 0; \
+ var->__data.__mutex = NULL; \
+ /* Clear __initializer last, to indicate initialization is done. */ \
+ __asm__ __volatile__ ("stw,ma %1,0(%0)" \
+ : : "r" (&var->__data.__initializer), "r" (tmp) : "memory"); \
+})
+
+#define cond_compat_check_and_clear(var) \
+({ \
+ int ret; \
+ volatile int *value = &var->__data.__initializer; \
+ if ((ret = atomic_compare_and_exchange_val_acq(value, 2, 1))) \
+ { \
+ if (ret == 1) \
+ { \
+ /* Initialize structure. */ \
+ cond_compat_clear (var); \
+ } \
+ else \
+ { \
+ /* Yield until structure is initialized. */ \
+ while (*value == 2) sched_yield (); \
+ } \
+ } \
+})
+
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index d6eb975..72823a0 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -34,7 +34,7 @@
#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_BARRIER_T 48
#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-#define __SIZEOF_PTHREAD_COND_T 64
+#define __SIZEOF_PTHREAD_COND_T 48
#define __SIZEOF_PTHREAD_CONDATTR_T 4
#define __SIZEOF_PTHREAD_MUTEX_T 48
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
@@ -70,12 +70,22 @@ typedef union
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
+ /* The old 4-word 16-byte aligned lock. This is initalized
+ to all ones by the Linuxthreads PTHREAD_MUTEX_INITIALIZER.
+ Unused in NPTL. */
+ int __compat_padding[4];
+ /* In the old structure there are 4 words left due to alignment.
+ In NPTL two words are used. */
unsigned int __nusers;
__extension__ union
{
int __spins;
__pthread_slist_t __list;
};
+ /* Two more words are left before the NPTL
+ pthread_mutex_t is larger than Linuxthreads. */
+ int __reserved1;
+ int __reserved2;
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
@@ -89,19 +99,37 @@ typedef union
/* Data structure for conditional variable handling. The structure of
- the attribute type is not exposed on purpose. */
+ the attribute type is not exposed on purpose. However, this structure
+ is exposed via PTHREAD_COND_INITIALIZER, and because of this, the
+ Linuxthreads version sets the first four ints to one. In the NPTL
+ version we must check, in every function using pthread_cond_t,
+ for the static Linuxthreads initializer and clear the appropriate
+ words. */
typedef union
{
struct
{
+ /* In the old Linuxthreads pthread_cond_t, this is the
+ start of the 4-word lock structure, the next four words
+ are set all to 1 by the Linuxthreads
+ PTHREAD_COND_INITIALIZER. */
int __lock;
+ /* Tracks the initialization of this structure:
+ 0 initialized with NPTL PTHREAD_COND_INITIALIZER.
+ 1 initialized with Linuxthreads PTHREAD_COND_INITIALIZER.
+ 2 initialization in progress. */
+ int __initializer;
unsigned int __futex;
+ void *__mutex;
+ /* In the old Linuxthreads this would have been the start
+ of the pthread_fastlock status word. */
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
- void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
+ /* The NPTL pthread_cond_t is exactly the same size as
+ the Linuxthreads version, there are no words to spare. */
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;
@@ -129,19 +157,34 @@ typedef union
{
struct
{
+ /* In the old Linuxthreads pthread_rwlock_t, this is the
+ start of the 4-word 16-byte algned lock structure. The
+ next four words are all set to 1 by the Linuxthreads
+ PTHREAD_RWLOCK_INITIALIZER. We ignore them in NPTL. */
+ int __compat_padding[4];
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+ int __writer;
+ /* An unused word, reserved for future use. It was added
+ to maintain the location of the flags from the Linuxthreads
+ layout of this structure. */
+ int __reserved1;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __pad2;
unsigned char __pad1;
unsigned char __shared;
unsigned char __flags;
- int __writer;
+ /* The NPTL pthread_rwlock_t is 4 words smaller than the
+ Linuxthreads version. One word is in the middle of the
+ structure, the other three are at the end. */
+ int __reserved2;
+ int __reserved3;
+ int __reserved4;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
long int __align;
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
new file mode 100644
index 0000000..55a7b17
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
@@ -0,0 +1,1180 @@
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _PTHREAD_H
+#define _PTHREAD_H 1
+
+#include <features.h>
+#include <endian.h>
+#include <sched.h>
+#include <time.h>
+
+#define __need_sigset_t
+#include <signal.h>
+#include <bits/pthreadtypes.h>
+#include <bits/setjmp.h>
+#include <bits/wordsize.h>
+
+
+/* Detach state. */
+enum
+{
+ PTHREAD_CREATE_JOINABLE,
+#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
+ PTHREAD_CREATE_DETACHED
+#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
+};
+
+
+/* Mutex types. */
+enum
+{
+ PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_ADAPTIVE_NP
+#ifdef __USE_UNIX98
+ ,
+ PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
+ PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
+ PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+#endif
+#ifdef __USE_GNU
+ /* For compatibility. */
+ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
+#endif
+};
+
+
+#ifdef __USE_XOPEN2K
+/* Robust mutex or not flags. */
+enum
+{
+ PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
+ PTHREAD_MUTEX_ROBUST,
+ PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
+};
+#endif
+
+
+#ifdef __USE_UNIX98
+/* Mutex protocols. */
+enum
+{
+ PTHREAD_PRIO_NONE,
+ PTHREAD_PRIO_INHERIT,
+ PTHREAD_PRIO_PROTECT
+};
+#endif
+
+
+/* Mutex initializers. */
+#if __WORDSIZE == 64
+# define PTHREAD_MUTEX_INITIALIZER \
+ { { 0, 0, 0, 0, 0, 0, { 0, 0 } } }
+# ifdef __USE_GNU
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0, 0 } } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0, 0 } } }
+# endif
+#else
+# define PTHREAD_MUTEX_INITIALIZER \
+ { { 0, 0, 0, 0, 0, { 0 } } }
+# ifdef __USE_GNU
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } }
+# endif
+#endif
+
+
+/* Read-write lock types. */
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+enum
+{
+ PTHREAD_RWLOCK_PREFER_READER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NP,
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
+ PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
+};
+
+/* Read-write lock initializers. */
+# define PTHREAD_RWLOCK_INITIALIZER \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+# ifdef __USE_GNU
+# if __WORDSIZE == 64
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
+# else
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
+ 0, 0, 0, 0 } }
+# else
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
+ 0 } }
+# endif
+# endif
+# endif
+#endif /* Unix98 or XOpen2K */
+
+
+/* Scheduler inheritance. */
+enum
+{
+ PTHREAD_INHERIT_SCHED,
+#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
+ PTHREAD_EXPLICIT_SCHED
+#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
+};
+
+
+/* Scope handling. */
+enum
+{
+ PTHREAD_SCOPE_SYSTEM,
+#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
+ PTHREAD_SCOPE_PROCESS
+#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
+};
+
+
+/* Process shared or private flag. */
+enum
+{
+ PTHREAD_PROCESS_PRIVATE,
+#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
+ PTHREAD_PROCESS_SHARED
+#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
+};
+
+
+
+/* Conditional variable handling. */
+#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }
+
+
+/* Cleanup buffers */
+struct _pthread_cleanup_buffer
+{
+ void (*__routine) (void *); /* Function to call. */
+ void *__arg; /* Its argument. */
+ int __canceltype; /* Saved cancellation type. */
+ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */
+};
+
+/* Cancellation */
+enum
+{
+ PTHREAD_CANCEL_ENABLE,
+#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
+ PTHREAD_CANCEL_DISABLE
+#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
+};
+enum
+{
+ PTHREAD_CANCEL_DEFERRED,
+#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
+ PTHREAD_CANCEL_ASYNCHRONOUS
+#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
+};
+#define PTHREAD_CANCELED ((void *) -1)
+
+
+/* Single execution handling. */
+#define PTHREAD_ONCE_INIT 0
+
+
+#ifdef __USE_XOPEN2K
+/* Value returned by 'pthread_barrier_wait' for one of the threads after
+ the required number of threads have called this function.
+ -1 is distinct from 0 and all errno constants */
+# define PTHREAD_BARRIER_SERIAL_THREAD -1
+#endif
+
+
+__BEGIN_DECLS
+
+/* Create a new thread, starting with execution of START-ROUTINE
+ getting passed ARG. Creation attributed come from ATTR. The new
+ handle is stored in *NEWTHREAD. */
+extern int pthread_create (pthread_t *__restrict __newthread,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg) __THROW __nonnull ((1, 3));
+
+/* Terminate calling thread.
+
+ The registered cleanup handlers are called via exception handling
+ so we cannot mark this function with __THROW.*/
+extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
+
+/* Make calling thread wait for termination of the thread TH. The
+ exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN
+ is not NULL.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int pthread_join (pthread_t __th, void **__thread_return);
+
+#ifdef __USE_GNU
+/* Check whether thread TH has terminated. If yes return the status of
+ the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
+extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
+
+/* Make calling thread wait for termination of the thread TH, but only
+ until TIMEOUT. The exit status of the thread is stored in
+ *THREAD_RETURN, if THREAD_RETURN is not NULL.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
+ __const struct timespec *__abstime);
+#endif
+
+/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
+ The resources of TH will therefore be freed immediately when it
+ terminates, instead of waiting for another thread to perform PTHREAD_JOIN
+ on it. */
+extern int pthread_detach (pthread_t __th) __THROW;
+
+
+/* Obtain the identifier of the current thread. */
+extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__));
+
+/* Compare two thread identifiers. */
+extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW;
+
+
+/* Thread attribute handling. */
+
+/* Initialize thread attribute *ATTR with default attributes
+ (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER,
+ no user-provided stack). */
+extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1));
+
+/* Destroy thread attribute *ATTR. */
+extern int pthread_attr_destroy (pthread_attr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Get detach state attribute. */
+extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
+ int *__detachstate)
+ __THROW __nonnull ((1, 2));
+
+/* Set detach state attribute. */
+extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
+ int __detachstate)
+ __THROW __nonnull ((1));
+
+
+/* Get the size of the guard area created for stack overflow protection. */
+extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
+ size_t *__guardsize)
+ __THROW __nonnull ((1, 2));
+
+/* Set the size of the guard area created for stack overflow protection. */
+extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
+ size_t __guardsize)
+ __THROW __nonnull ((1));
+
+
+/* Return in *PARAM the scheduling parameters of *ATTR. */
+extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
+ __attr,
+ struct sched_param *__restrict __param)
+ __THROW __nonnull ((1, 2));
+
+/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
+extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
+ __const struct sched_param *__restrict
+ __param) __THROW __nonnull ((1, 2));
+
+/* Return in *POLICY the scheduling policy of *ATTR. */
+extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
+ __attr, int *__restrict __policy)
+ __THROW __nonnull ((1, 2));
+
+/* Set scheduling policy in *ATTR according to POLICY. */
+extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
+ __THROW __nonnull ((1));
+
+/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
+extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
+ __attr, int *__restrict __inherit)
+ __THROW __nonnull ((1, 2));
+
+/* Set scheduling inheritance mode in *ATTR according to INHERIT. */
+extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
+ int __inherit)
+ __THROW __nonnull ((1));
+
+
+/* Return in *SCOPE the scheduling contention scope of *ATTR. */
+extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+ int *__restrict __scope)
+ __THROW __nonnull ((1, 2));
+
+/* Set scheduling contention scope in *ATTR according to SCOPE. */
+extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
+ __THROW __nonnull ((1));
+
+/* Return the previously set address for the stack. */
+extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
+ __attr, void **__restrict __stackaddr)
+ __THROW __nonnull ((1, 2)) __attribute_deprecated__;
+
+/* Set the starting address of the stack of the thread to be created.
+ Depending on whether the stack grows up or down the value must either
+ be higher or lower than all the address in the memory block. The
+ minimal size of the block must be PTHREAD_STACK_MIN. */
+extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
+ void *__stackaddr)
+ __THROW __nonnull ((1)) __attribute_deprecated__;
+
+/* Return the currently used minimal stack size. */
+extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
+ __attr, size_t *__restrict __stacksize)
+ __THROW __nonnull ((1, 2));
+
+/* Add information about the minimum stack size needed for the thread
+ to be started. This size must never be less than PTHREAD_STACK_MIN
+ and must also not exceed the system limits. */
+extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
+ size_t __stacksize)
+ __THROW __nonnull ((1));
+
+#ifdef __USE_XOPEN2K
+/* Return the previously set address for the stack. */
+extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
+ void **__restrict __stackaddr,
+ size_t *__restrict __stacksize)
+ __THROW __nonnull ((1, 2, 3));
+
+/* The following two interfaces are intended to replace the last two. They
+ require setting the address as well as the size since only setting the
+ address will make the implementation on some architectures impossible. */
+extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
+ size_t __stacksize) __THROW __nonnull ((1));
+#endif
+
+#ifdef __USE_GNU
+/* Thread created with attribute ATTR will be limited to run only on
+ the processors represented in CPUSET. */
+extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
+ size_t __cpusetsize,
+ __const cpu_set_t *__cpuset)
+ __THROW __nonnull ((1, 3));
+
+/* Get bit set in CPUSET representing the processors threads created with
+ ATTR can run on. */
+extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
+ size_t __cpusetsize,
+ cpu_set_t *__cpuset)
+ __THROW __nonnull ((1, 3));
+
+
+/* Initialize thread attribute *ATTR with attributes corresponding to the
+ already running thread TH. It shall be called on uninitialized ATTR
+ and destroyed with pthread_attr_destroy when no longer needed. */
+extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
+ __THROW __nonnull ((2));
+#endif
+
+
+/* Functions for scheduling control. */
+
+/* Set the scheduling parameters for TARGET_THREAD according to POLICY
+ and *PARAM. */
+extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
+ __const struct sched_param *__param)
+ __THROW __nonnull ((3));
+
+/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
+extern int pthread_getschedparam (pthread_t __target_thread,
+ int *__restrict __policy,
+ struct sched_param *__restrict __param)
+ __THROW __nonnull ((2, 3));
+
+/* Set the scheduling priority for TARGET_THREAD. */
+extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
+ __THROW;
+
+
+#ifdef __USE_UNIX98
+/* Determine level of concurrency. */
+extern int pthread_getconcurrency (void) __THROW;
+
+/* Set new concurrency level to LEVEL. */
+extern int pthread_setconcurrency (int __level) __THROW;
+#endif
+
+#ifdef __USE_GNU
+/* Yield the processor to another thread or process.
+ This function is similar to the POSIX `sched_yield' function but
+ might be differently implemented in the case of a m-on-n thread
+ implementation. */
+extern int pthread_yield (void) __THROW;
+
+
+/* Limit specified thread TH to run only on the processors represented
+ in CPUSET. */
+extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
+ __const cpu_set_t *__cpuset)
+ __THROW __nonnull ((3));
+
+/* Get bit set in CPUSET representing the processors TH can run on. */
+extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
+ cpu_set_t *__cpuset)
+ __THROW __nonnull ((3));
+#endif
+
+
+/* Functions for handling initialization. */
+
+/* Guarantee that the initialization function INIT_ROUTINE will be called
+ only once, even if pthread_once is executed several times with the
+ same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
+ extern variable initialized to PTHREAD_ONCE_INIT.
+
+ The initialization functions might throw exception which is why
+ this function is not marked with __THROW. */
+extern int pthread_once (pthread_once_t *__once_control,
+ void (*__init_routine) (void)) __nonnull ((1, 2));
+
+
+/* Functions for handling cancellation.
+
+ Note that these functions are explicitly not marked to not throw an
+ exception in C++ code. If cancellation is implemented by unwinding
+ this is necessary to have the compiler generate the unwind information. */
+
+/* Set cancelability state of current thread to STATE, returning old
+ state in *OLDSTATE if OLDSTATE is not NULL. */
+extern int pthread_setcancelstate (int __state, int *__oldstate);
+
+/* Set cancellation state of current thread to TYPE, returning the old
+ type in *OLDTYPE if OLDTYPE is not NULL. */
+extern int pthread_setcanceltype (int __type, int *__oldtype);
+
+/* Cancel THREAD immediately or at the next possibility. */
+extern int pthread_cancel (pthread_t __th);
+
+/* Test for pending cancellation for the current thread and terminate
+ the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
+ cancelled. */
+extern void pthread_testcancel (void);
+
+
+/* Cancellation handling with integration into exception handling. */
+
+typedef struct
+{
+ struct
+ {
+ __jmp_buf __cancel_jmp_buf;
+ int __mask_was_saved;
+ } __cancel_jmp_buf[1];
+ void *__pad[4];
+} __pthread_unwind_buf_t __attribute__ ((__aligned__));
+
+/* No special attributes by default. */
+#ifndef __cleanup_fct_attribute
+# define __cleanup_fct_attribute
+#endif
+
+
+/* Structure to hold the cleanup handler information. */
+struct __pthread_cleanup_frame
+{
+ void (*__cancel_routine) (void *);
+ void *__cancel_arg;
+ int __do_it;
+ int __cancel_type;
+};
+
+#if defined __GNUC__ && defined __EXCEPTIONS
+# ifdef __cplusplus
+/* Class to handle cancellation handler invocation. */
+class __pthread_cleanup_class
+{
+ void (*__cancel_routine) (void *);
+ void *__cancel_arg;
+ int __do_it;
+ int __cancel_type;
+
+ public:
+ __pthread_cleanup_class (void (*__fct) (void *), void *__arg)
+ : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { }
+ ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); }
+ void __setdoit (int __newval) { __do_it = __newval; }
+ void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED,
+ &__cancel_type); }
+ void __restore () const { pthread_setcanceltype (__cancel_type, 0); }
+};
+
+/* Install a cleanup handler: ROUTINE will be called with arguments ARG
+ when the thread is canceled or calls pthread_exit. ROUTINE will also
+ be called with arguments ARG when the matching pthread_cleanup_pop
+ is executed with non-zero EXECUTE argument.
+
+ pthread_cleanup_push and pthread_cleanup_pop are macros and must always
+ be used in matching pairs at the same nesting level of braces. */
+# define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_cleanup_class __clframe (routine, arg)
+
+/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
+ If EXECUTE is non-zero, the handler function is called. */
+# define pthread_cleanup_pop(execute) \
+ __clframe.__setdoit (execute); \
+ } while (0)
+
+# ifdef __USE_GNU
+/* Install a cleanup handler as pthread_cleanup_push does, but also
+ saves the current cancellation type and sets it to deferred
+ cancellation. */
+# define pthread_cleanup_push_defer_np(routine, arg) \
+ do { \
+ __pthread_cleanup_class __clframe (routine, arg); \
+ __clframe.__defer ()
+
+/* Remove a cleanup handler as pthread_cleanup_pop does, but also
+ restores the cancellation type that was in effect when the matching
+ pthread_cleanup_push_defer was called. */
+# define pthread_cleanup_pop_restore_np(execute) \
+ __clframe.__restore (); \
+ __clframe.__setdoit (execute); \
+ } while (0)
+# endif
+# else
+/* Function called to call the cleanup handler. As an extern inline
+ function the compiler is free to decide inlining the change when
+ needed or fall back on the copy which must exist somewhere
+ else. */
+__extern_inline void
+__pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
+{
+ if (__frame->__do_it)
+ __frame->__cancel_routine (__frame->__cancel_arg);
+}
+
+/* Install a cleanup handler: ROUTINE will be called with arguments ARG
+ when the thread is canceled or calls pthread_exit. ROUTINE will also
+ be called with arguments ARG when the matching pthread_cleanup_pop
+ is executed with non-zero EXECUTE argument.
+
+ pthread_cleanup_push and pthread_cleanup_pop are macros and must always
+ be used in matching pairs at the same nesting level of braces. */
+# define pthread_cleanup_push(routine, arg) \
+ do { \
+ struct __pthread_cleanup_frame __clframe \
+ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \
+ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \
+ .__do_it = 1 };
+
+/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
+ If EXECUTE is non-zero, the handler function is called. */
+# define pthread_cleanup_pop(execute) \
+ __clframe.__do_it = (execute); \
+ } while (0)
+
+# ifdef __USE_GNU
+/* Install a cleanup handler as pthread_cleanup_push does, but also
+ saves the current cancellation type and sets it to deferred
+ cancellation. */
+# define pthread_cleanup_push_defer_np(routine, arg) \
+ do { \
+ struct __pthread_cleanup_frame __clframe \
+ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \
+ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \
+ .__do_it = 1 }; \
+ (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \
+ &__clframe.__cancel_type)
+
+/* Remove a cleanup handler as pthread_cleanup_pop does, but also
+ restores the cancellation type that was in effect when the matching
+ pthread_cleanup_push_defer was called. */
+# define pthread_cleanup_pop_restore_np(execute) \
+ (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \
+ __clframe.__do_it = (execute); \
+ } while (0)
+# endif
+# endif
+#else
+/* Install a cleanup handler: ROUTINE will be called with arguments ARG
+ when the thread is canceled or calls pthread_exit. ROUTINE will also
+ be called with arguments ARG when the matching pthread_cleanup_pop
+ is executed with non-zero EXECUTE argument.
+
+ pthread_cleanup_push and pthread_cleanup_pop are macros and must always
+ be used in matching pairs at the same nesting level of braces. */
+# define pthread_cleanup_push(routine, arg) \
+ do { \
+ __pthread_unwind_buf_t __cancel_buf; \
+ void (*__cancel_routine) (void *) = (routine); \
+ void *__cancel_arg = (arg); \
+ int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
+ __cancel_buf.__cancel_jmp_buf, 0); \
+ if (__builtin_expect (not_first_call, 0)) \
+ { \
+ __cancel_routine (__cancel_arg); \
+ __pthread_unwind_next (&__cancel_buf); \
+ /* NOTREACHED */ \
+ } \
+ \
+ __pthread_register_cancel (&__cancel_buf); \
+ do {
+extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
+
+/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
+ If EXECUTE is non-zero, the handler function is called. */
+# define pthread_cleanup_pop(execute) \
+ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\
+ } while (0); \
+ __pthread_unregister_cancel (&__cancel_buf); \
+ if (execute) \
+ __cancel_routine (__cancel_arg); \
+ } while (0)
+extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
+
+# ifdef __USE_GNU
+/* Install a cleanup handler as pthread_cleanup_push does, but also
+ saves the current cancellation type and sets it to deferred
+ cancellation. */
+# define pthread_cleanup_push_defer_np(routine, arg) \
+ do { \
+ __pthread_unwind_buf_t __cancel_buf; \
+ void (*__cancel_routine) (void *) = (routine); \
+ void *__cancel_arg = (arg); \
+ int not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
+ __cancel_buf.__cancel_jmp_buf, 0); \
+ if (__builtin_expect (not_first_call, 0)) \
+ { \
+ __cancel_routine (__cancel_arg); \
+ __pthread_unwind_next (&__cancel_buf); \
+ /* NOTREACHED */ \
+ } \
+ \
+ __pthread_register_cancel_defer (&__cancel_buf); \
+ do {
+extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
+
+/* Remove a cleanup handler as pthread_cleanup_pop does, but also
+ restores the cancellation type that was in effect when the matching
+ pthread_cleanup_push_defer was called. */
+# define pthread_cleanup_pop_restore_np(execute) \
+ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\
+ } while (0); \
+ __pthread_unregister_cancel_restore (&__cancel_buf); \
+ if (execute) \
+ __cancel_routine (__cancel_arg); \
+ } while (0)
+extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute;
+# endif
+
+/* Internal interface to initiate cleanup. */
+extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
+ __cleanup_fct_attribute __attribute__ ((__noreturn__))
+# ifndef SHARED
+ __attribute__ ((__weak__))
+# endif
+ ;
+#endif
+
+/* Function used in the macros. */
+struct __jmp_buf_tag;
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
+
+
+/* Mutex handling. */
+
+/* Initialize a mutex. */
+extern int pthread_mutex_init (pthread_mutex_t *__mutex,
+ __const pthread_mutexattr_t *__mutexattr)
+ __THROW __nonnull ((1));
+
+/* Destroy a mutex. */
+extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+
+/* Try locking a mutex. */
+extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+
+/* Lock a mutex. */
+extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+
+#ifdef __USE_XOPEN2K
+/* Wait until lock becomes available, or specified time passes. */
+extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
+ __const struct timespec *__restrict
+ __abstime) __THROW __nonnull ((1, 2));
+#endif
+
+/* Unlock a mutex. */
+extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+
+
+#ifdef __USE_UNIX98
+/* Get the priority ceiling of MUTEX. */
+extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
+ __restrict __mutex,
+ int *__restrict __prioceiling)
+ __THROW __nonnull ((1, 2));
+
+/* Set the priority ceiling of MUTEX to PRIOCEILING, return old
+ priority ceiling value in *OLD_CEILING. */
+extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
+ int __prioceiling,
+ int *__restrict __old_ceiling)
+ __THROW __nonnull ((1, 3));
+#endif
+
+
+#ifdef __USE_XOPEN2K8
+/* Declare the state protected by MUTEX as consistent. */
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+# ifdef __USE_GNU
+extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
+ __THROW __nonnull ((1));
+# endif
+#endif
+
+
+/* Functions for handling mutex attributes. */
+
+/* Initialize mutex attribute object ATTR with default attributes
+ (kind is PTHREAD_MUTEX_TIMED_NP). */
+extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Destroy mutex attribute object ATTR. */
+extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Get the process-shared flag of the mutex attribute ATTR. */
+extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __THROW __nonnull ((1, 2));
+
+/* Set the process-shared flag of the mutex attribute ATTR. */
+extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
+ int __pshared)
+ __THROW __nonnull ((1));
+
+#ifdef __USE_UNIX98
+/* Return in *KIND the mutex kind attribute in *ATTR. */
+extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
+ __attr, int *__restrict __kind)
+ __THROW __nonnull ((1, 2));
+
+/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL,
+ PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or
+ PTHREAD_MUTEX_DEFAULT). */
+extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
+ __THROW __nonnull ((1));
+
+/* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
+extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __protocol)
+ __THROW __nonnull ((1, 2));
+
+/* Set the mutex protocol attribute in *ATTR to PROTOCOL (either
+ PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */
+extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
+ int __protocol)
+ __THROW __nonnull ((1));
+
+/* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
+extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
+ __restrict __attr,
+ int *__restrict __prioceiling)
+ __THROW __nonnull ((1, 2));
+
+/* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */
+extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
+ int __prioceiling)
+ __THROW __nonnull ((1));
+#endif
+
+#ifdef __USE_XOPEN2K
+/* Get the robustness flag of the mutex attribute ATTR. */
+extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
+ int *__robustness)
+ __THROW __nonnull ((1, 2));
+# ifdef __USE_GNU
+extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
+ int *__robustness)
+ __THROW __nonnull ((1, 2));
+# endif
+
+/* Set the robustness flag of the mutex attribute ATTR. */
+extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
+ int __robustness)
+ __THROW __nonnull ((1));
+# ifdef __USE_GNU
+extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
+ int __robustness)
+ __THROW __nonnull ((1));
+# endif
+#endif
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Functions for handling read-write locks. */
+
+/* Initialize read-write lock RWLOCK using attributes ATTR, or use
+ the default values if later is NULL. */
+extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
+ __const pthread_rwlockattr_t *__restrict
+ __attr) __THROW __nonnull ((1));
+
+/* Destroy read-write lock RWLOCK. */
+extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+/* Acquire read lock for RWLOCK. */
+extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+/* Try to acquire read lock for RWLOCK. */
+extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+# ifdef __USE_XOPEN2K
+/* Try to acquire read lock for RWLOCK or return after specfied time. */
+extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
+ __const struct timespec *__restrict
+ __abstime) __THROW __nonnull ((1, 2));
+# endif
+
+/* Acquire write lock for RWLOCK. */
+extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+/* Try to acquire write lock for RWLOCK. */
+extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+# ifdef __USE_XOPEN2K
+/* Try to acquire write lock for RWLOCK or return after specfied time. */
+extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
+ __const struct timespec *__restrict
+ __abstime) __THROW __nonnull ((1, 2));
+# endif
+
+/* Unlock RWLOCK. */
+extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
+ __THROW __nonnull ((1));
+
+
+/* Functions for handling read-write lock attributes. */
+
+/* Initialize attribute object ATTR with default values. */
+extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Destroy attribute object ATTR. */
+extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Return current setting of process-shared attribute of ATTR in PSHARED. */
+extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __THROW __nonnull ((1, 2));
+
+/* Set process-shared attribute of ATTR to PSHARED. */
+extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
+ int __pshared)
+ __THROW __nonnull ((1));
+
+/* Return current setting of reader/writer preference. */
+extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
+ __restrict __attr,
+ int *__restrict __pref)
+ __THROW __nonnull ((1, 2));
+
+/* Set reader/write preference. */
+extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
+ int __pref) __THROW __nonnull ((1));
+#endif
+
+
+/* Functions for handling conditional variables. */
+
+/* Initialize condition variable COND using attributes ATTR, or use
+ the default values if later is NULL. */
+extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
+ __const pthread_condattr_t *__restrict
+ __cond_attr) __THROW __nonnull ((1));
+
+/* Destroy condition variable COND. */
+extern int pthread_cond_destroy (pthread_cond_t *__cond)
+ __THROW __nonnull ((1));
+
+/* Wake up one thread waiting for condition variable COND. */
+extern int pthread_cond_signal (pthread_cond_t *__cond)
+ __THROW __nonnull ((1));
+
+/* Wake up all threads waiting for condition variables COND. */
+extern int pthread_cond_broadcast (pthread_cond_t *__cond)
+ __THROW __nonnull ((1));
+
+/* Wait for condition variable COND to be signaled or broadcast.
+ MUTEX is assumed to be locked before.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex)
+ __nonnull ((1, 2));
+
+/* Wait for condition variable COND to be signaled or broadcast until
+ ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
+ absolute time specification; zero is the beginning of the epoch
+ (00:00:00 GMT, January 1, 1970).
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ __const struct timespec *__restrict
+ __abstime) __nonnull ((1, 2, 3));
+
+/* Functions for handling condition variable attributes. */
+
+/* Initialize condition variable attribute ATTR. */
+extern int pthread_condattr_init (pthread_condattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Destroy condition variable attribute ATTR. */
+extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Get the process-shared flag of the condition variable attribute ATTR. */
+extern int pthread_condattr_getpshared (__const pthread_condattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __THROW __nonnull ((1, 2));
+
+/* Set the process-shared flag of the condition variable attribute ATTR. */
+extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
+ int __pshared) __THROW __nonnull ((1));
+
+#ifdef __USE_XOPEN2K
+/* Get the clock selected for the conditon variable attribute ATTR. */
+extern int pthread_condattr_getclock (__const pthread_condattr_t *
+ __restrict __attr,
+ __clockid_t *__restrict __clock_id)
+ __THROW __nonnull ((1, 2));
+
+/* Set the clock selected for the conditon variable attribute ATTR. */
+extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
+ __clockid_t __clock_id)
+ __THROW __nonnull ((1));
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* Functions to handle spinlocks. */
+
+/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can
+ be shared between different processes. */
+extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
+ __THROW __nonnull ((1));
+
+/* Destroy the spinlock LOCK. */
+extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
+ __THROW __nonnull ((1));
+
+/* Wait until spinlock LOCK is retrieved. */
+extern int pthread_spin_lock (pthread_spinlock_t *__lock)
+ __THROW __nonnull ((1));
+
+/* Try to lock spinlock LOCK. */
+extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
+ __THROW __nonnull ((1));
+
+/* Release spinlock LOCK. */
+extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
+ __THROW __nonnull ((1));
+
+
+/* Functions to handle barriers. */
+
+/* Initialize BARRIER with the attributes in ATTR. The barrier is
+ opened when COUNT waiters arrived. */
+extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
+ __const pthread_barrierattr_t *__restrict
+ __attr, unsigned int __count)
+ __THROW __nonnull ((1));
+
+/* Destroy a previously dynamically initialized barrier BARRIER. */
+extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
+ __THROW __nonnull ((1));
+
+/* Wait on barrier BARRIER. */
+extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
+ __THROW __nonnull ((1));
+
+
+/* Initialize barrier attribute ATTR. */
+extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Destroy previously dynamically initialized barrier attribute ATTR. */
+extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
+ __THROW __nonnull ((1));
+
+/* Get the process-shared flag of the barrier attribute ATTR. */
+extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
+ __restrict __attr,
+ int *__restrict __pshared)
+ __THROW __nonnull ((1, 2));
+
+/* Set the process-shared flag of the barrier attribute ATTR. */
+extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
+ int __pshared)
+ __THROW __nonnull ((1));
+#endif
+
+
+/* Functions for handling thread-specific data. */
+
+/* Create a key value identifying a location in the thread-specific
+ data area. Each thread maintains a distinct thread-specific data
+ area. DESTR_FUNCTION, if non-NULL, is called with the value
+ associated to that key when the key is destroyed.
+ DESTR_FUNCTION is not called if the value associated is NULL when
+ the key is destroyed. */
+extern int pthread_key_create (pthread_key_t *__key,
+ void (*__destr_function) (void *))
+ __THROW __nonnull ((1));
+
+/* Destroy KEY. */
+extern int pthread_key_delete (pthread_key_t __key) __THROW;
+
+/* Return current value of the thread-specific data slot identified by KEY. */
+extern void *pthread_getspecific (pthread_key_t __key) __THROW;
+
+/* Store POINTER in the thread-specific data slot identified by KEY. */
+extern int pthread_setspecific (pthread_key_t __key,
+ __const void *__pointer) __THROW ;
+
+
+#ifdef __USE_XOPEN2K
+/* Get ID of CPU-time clock for thread THREAD_ID. */
+extern int pthread_getcpuclockid (pthread_t __thread_id,
+ __clockid_t *__clock_id)
+ __THROW __nonnull ((2));
+#endif
+
+
+/* Install handlers to be called when a new process is created with FORK.
+ The PREPARE handler is called in the parent process just before performing
+ FORK. The PARENT handler is called in the parent process just after FORK.
+ The CHILD handler is called in the child process. Each of the three
+ handlers can be NULL, meaning that no handler needs to be called at that
+ point.
+ PTHREAD_ATFORK can be called several times, in which case the PREPARE
+ handlers are called in LIFO order (last added with PTHREAD_ATFORK,
+ first called before FORK), and the PARENT and CHILD handlers are called
+ in FIFO (first added, first called). */
+
+extern int pthread_atfork (void (*__prepare) (void),
+ void (*__parent) (void),
+ void (*__child) (void)) __THROW;
+
+
+#ifdef __USE_EXTERN_INLINES
+/* Optimizations. */
+__extern_inline int
+__NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2))
+{
+ return __thread1 == __thread2;
+}
+#endif
+
+__END_DECLS
+
+#endif /* pthread.h */
+
+#ifndef _PTHREAD_H_HPPA_
+#define _PTHREAD_H_HPPA_ 1
+
+/* The pthread_cond_t initializer is compatible only with NPTL. We do not
+ want to be forwards compatible, we eventually want to drop the code
+ that has to clear the old LT initializer. */
+#undef PTHREAD_COND_INITIALIZER
+#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, (void *) 0, 0, 0, 0, 0, 0 } }
+
+/* The pthread_mutex_t and pthread_rwlock_t initializers are compatible
+ only with NPTL. NPTL ignores the old lock words. We do not want to be
+ forwards compatible, glibc has some code that assumes pthread_rwlock_t
+ is all zero (see nptl/tst-initializers.c). */
+#undef PTHREAD_MUTEX_INITIALIZER
+#undef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#undef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+#undef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+/* Mutex initializers. */
+#define PTHREAD_MUTEX_INITIALIZER \
+ { { 0, 0, 0, 0, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } }
+#ifdef __USE_GNU
+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } }
+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } }
+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, { 0, 0, 0, 0 }, 0, { 0 }, 0, 0 } }
+#endif
+
+#undef PTHREAD_RWLOCK_INITIALIZER
+#undef PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
+/* Read-write lock initializers. */
+#define PTHREAD_RWLOCK_INITIALIZER \
+ { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+#ifdef __USE_GNU
+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
+ { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
+ 0, 0, 0 } }
+#endif /* Unix98 or XOpen2K */
+
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h b/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h
new file mode 100644
index 0000000..0e68ccf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthreadP.h
@@ -0,0 +1,17 @@
+#include_next <pthreadP.h>
+#ifndef _PTHREADP_H_HPPA_
+#define _PTHREADP_H_HPPA_ 1
+
+/* Internal cond functions. */
+extern int __pthread_cond_broadcast_internal (pthread_cond_t *cond);
+extern int __pthread_cond_destroy_internal (pthread_cond_t *cond);
+extern int __pthread_cond_init_internal (pthread_cond_t *cond,
+ const pthread_condattr_t *cond_attr);
+extern int __pthread_cond_signal_internal (pthread_cond_t *cond);
+extern int __pthread_cond_timedwait_internal (pthread_cond_t *cond,
+ pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+extern int __pthread_cond_wait_internal (pthread_cond_t *cond,
+ pthread_mutex_t *mutex);
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c
new file mode 100644
index 0000000..e43ce34
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_broadcast.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_broadcast.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_broadcast (cond)
+ pthread_cond_t *cond;
+{
+ cond_compat_check_and_clear (cond);
+ return __pthread_cond_broadcast_internal (cond);
+}
+versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_broadcast
+# define __pthread_cond_broadcast __pthread_cond_broadcast_internal
+# include_next <pthread_cond_broadcast.c>
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c
new file mode 100644
index 0000000..3b606d9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_destroy.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_destroy.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_destroy (cond)
+ pthread_cond_t *cond;
+{
+ cond_compat_check_and_clear (cond);
+ return __pthread_cond_destroy_internal (cond);
+}
+versioned_symbol (libpthread, __pthread_cond_destroy, pthread_cond_destroy,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_destroy
+# define __pthread_cond_destroy __pthread_cond_destroy_internal
+# include_next <pthread_cond_destroy.c>
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c
new file mode 100644
index 0000000..a55c285
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_init.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_init.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_init (cond, cond_attr)
+ pthread_cond_t *cond;
+ const pthread_condattr_t *cond_attr;
+{
+ cond_compat_clear (cond);
+ return __pthread_cond_init_internal (cond, cond_attr);
+}
+versioned_symbol (libpthread, __pthread_cond_init, pthread_cond_init,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_init
+# define __pthread_cond_init __pthread_cond_init_internal
+# include_next <pthread_cond_init.c>
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c
new file mode 100644
index 0000000..34a9747
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_signal.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_signal.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_signal (cond)
+ pthread_cond_t *cond;
+{
+ cond_compat_check_and_clear (cond);
+ return __pthread_cond_signal_internal (cond);
+}
+versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_signal
+# define __pthread_cond_signal __pthread_cond_signal_internal
+# include_next <pthread_cond_signal.c>
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c
new file mode 100644
index 0000000..5e05621
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_timedwait.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_timedwait.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_timedwait (cond, mutex, abstime)
+ pthread_cond_t *cond;
+ pthread_mutex_t *mutex;
+ const struct timespec *abstime;
+{
+ cond_compat_check_and_clear (cond);
+ return __pthread_cond_timedwait_internal (cond, mutex, abstime);
+}
+versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_timedwait
+# define __pthread_cond_timedwait __pthread_cond_timedwait_internal
+# include_next <pthread_cond_timedwait.c>
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c
new file mode 100644
index 0000000..80115ed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_cond_wait.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@codesourcery.com>, 2009.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <pthread_cond_wait.c>
+#else
+# include <pthread.h>
+# include <pthreadP.h>
+# include <internaltypes.h>
+# include <shlib-compat.h>
+int
+__pthread_cond_wait (cond, mutex)
+ pthread_cond_t *cond;
+ pthread_mutex_t *mutex;
+{
+ cond_compat_check_and_clear (cond);
+ return __pthread_cond_wait_internal (cond, mutex);
+}
+versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2);
+# undef versioned_symbol
+# define versioned_symbol(lib, local, symbol, version)
+# undef __pthread_cond_wait
+# define __pthread_cond_wait __pthread_cond_wait_internal
+# include_next <pthread_cond_wait.c>
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0e694490652893bd0957f8ded779133d883ebcd
commit f0e694490652893bd0957f8ded779133d883ebcd
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Sun Sep 6 21:20:26 2009 +0200
Add ____longjmp_chk for m68k-linux
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 3afc3da..41ede01 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,9 @@
+2009-09-06 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file.
+
+ * sysdeps/m68k/__longjmp.c (__longjmp): Call CHECK_SP if defined.
+
2009-05-16 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 7d876a7..5ba2478 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +28,10 @@ __longjmp (__jmp_buf env, int val)
/* This restores the FP and SP that setjmp's caller had,
and puts the return address into A0 and VAL into D0. */
+#ifdef CHECK_SP
+ CHECK_SP (env[0].__sp);
+#endif
+
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Restore the floating-point registers. */
asm volatile("fmovem%.x %0, %/fp0-%/fp7" :
diff --git a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
new file mode 100644
index 0000000..8eaf591
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdio.h>
+#include <signal.h>
+#include <sysdep.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP(sp) \
+ do { \
+ register unsigned long this_sp asm ("sp"); \
+ if ((unsigned long) (sp) < this_sp) \
+ { \
+ struct sigaltstack oss; \
+ INTERNAL_SYSCALL_DECL (err); \
+ int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss); \
+ if (!INTERNAL_SYSCALL_ERROR_P (result, err) \
+ && ((oss.ss_flags & SS_ONSTACK) == 0 \
+ || ((unsigned long) oss.ss_sp + oss.ss_size \
+ - (unsigned long) (sp)) < oss.ss_size)) \
+ __fortify_fail ("longjmp causes uninitialized stack frame"); \
+ } \
+ } while (0)
+
+#include <__longjmp.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53df8bcec0cc4a07dcb0d13f9105a9002d9183d8
commit 53df8bcec0cc4a07dcb0d13f9105a9002d9183d8
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Aug 6 16:53:09 2009 +0000
Add alternate signal stack support to ARM ____longjmp_chk.
* sysdeps/arm/____longjmp_chk.S: Remove. Replaced by....
* sysdeps/unix/sysv/linux/arm/____longjmp_chk.S,
sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: This. New
files.
* sysdeps/arm/__longjmp.S, sysdeps/arm/eabi/__longjmp.S: Use r4
for saved sp.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index fe87809..9df8b0f 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,12 @@
+2009-08-06 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/____longjmp_chk.S: Remove. Replaced by....
+ * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S,
+ sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: This. New
+ files.
+ * sysdeps/arm/__longjmp.S, sysdeps/arm/eabi/__longjmp.S: Use r4
+ for saved sp.
+
2009-07-29 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Define
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index c834e78..09e6386 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -30,8 +30,8 @@ ENTRY (__longjmp)
moveq r0, #1 /* can't let setjmp() return zero! */
#ifdef CHECK_SP
- ldr r1, [ip, #32]
- CHECK_SP (r1)
+ ldr r4, [ip, #32]
+ CHECK_SP (r4)
#endif
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S
index 1f3f791..f283297 100644
--- a/sysdeps/arm/eabi/__longjmp.S
+++ b/sysdeps/arm/eabi/__longjmp.S
@@ -31,8 +31,8 @@ ENTRY (__longjmp)
moveq r0, #1 /* can't let setjmp() return zero! */
#ifdef CHECK_SP
- ldr r1, [ip, #32]
- CHECK_SP (r1)
+ ldr r4, [ip, #32]
+ CHECK_SP (r4)
#endif
LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
similarity index 79%
copy from sysdeps/arm/____longjmp_chk.S
copy to sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
index 16fc4cd..2fa727d 100644
--- a/sysdeps/arm/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
@@ -16,6 +16,7 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <sysdep.h>
.section .rodata.str1.1,"aMS",%progbits,1
.type longjmp_msg,%object
@@ -47,9 +48,28 @@ longjmp_msg:
#endif
#define CHECK_SP(reg) \
- cmp sp, reg; \
+ cmp sp, reg; \
bls .Lok; \
+ mov r5, r0; \
+ mov r0, #0; \
+ sub sp, sp, #16; \
+ mov r1, sp; \
+ swi #SYS_ify(sigaltstack); \
+ cmp r0, #0; \
+ bne .Lok2; \
+ ldr r1, [sp, #4]; \
+ tst r1, #1; \
+ beq .Lfail; \
+ ldr r2, [sp, #0]; \
+ ldr r3, [sp, #8]; \
+ add r2, r2, r3; \
+ sub r2, r2, reg; \
+ cmp r2, r3; \
+ bhi .Lok2; \
+.Lfail: \
CALL_FAIL \
+.Lok2: \
+ mov r0, r5; \
.Lok:
#include <__longjmp.S>
diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
similarity index 78%
rename from sysdeps/arm/____longjmp_chk.S
rename to sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
index 16fc4cd..f92a382 100644
--- a/sysdeps/arm/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
@@ -16,6 +16,7 @@
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <sysdep.h>
.section .rodata.str1.1,"aMS",%progbits,1
.type longjmp_msg,%object
@@ -47,9 +48,29 @@ longjmp_msg:
#endif
#define CHECK_SP(reg) \
- cmp sp, reg; \
+ cmp sp, reg; \
bls .Lok; \
+ mov r5, r0; \
+ mov r7, #SYS_ify(sigaltstack); \
+ mov r0, #0; \
+ sub sp, sp, #16; \
+ mov r1, sp; \
+ swi #0; \
+ cmp r0, #0; \
+ bne .Lok2; \
+ ldr r1, [sp, #4]; \
+ tst r1, #1; \
+ beq .Lfail; \
+ ldr r2, [sp, #0]; \
+ ldr r3, [sp, #8]; \
+ add r2, r2, r3; \
+ sub r2, r2, reg; \
+ cmp r2, r3; \
+ bhi .Lok2; \
+.Lfail: \
CALL_FAIL \
+.Lok2: \
+ mov r0, r5; \
.Lok:
#include <__longjmp.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c67273d5b28317c87d2e9ee636ead6d71635e0e5
commit c67273d5b28317c87d2e9ee636ead6d71635e0e5
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Aug 5 21:02:50 2009 +0000
Signal stack support for MIPS ____longjmp_chk.
* sysdeps/mips/____longjmp_chk.c: Remove. Replaced by....
* sysdeps/unix/sysv/linux/mips/____longjmp_chk.c: This. New file.
* sysdeps/mips/__longjmp.c (__longjmp): Use explicit register
variable for env. Use expansion of CHECK_SP macro for check.
* sysdeps/mips/mips64/__longjmp.c (__Longjmp): Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9afd961..5ba4297 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2009-08-05 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/____longjmp_chk.c: Remove. Replaced by....
+ * sysdeps/unix/sysv/linux/mips/____longjmp_chk.c: This. New file.
+ * sysdeps/mips/__longjmp.c (__longjmp): Use explicit register
+ variable for env. Use expansion of CHECK_SP macro for check.
+ * sysdeps/mips/mips64/__longjmp.c (__Longjmp): Likewise.
+
2009-08-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips32/accept4.c,
diff --git a/sysdeps/mips/____longjmp_chk.c b/sysdeps/mips/____longjmp_chk.c
deleted file mode 100644
index a46ed15..0000000
--- a/sysdeps/mips/____longjmp_chk.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stdio.h>
-#define __longjmp ____longjmp_chk
-#define CHECK_SP
-#include <__longjmp.c>
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 340485d..2a91771 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -25,19 +25,19 @@
#endif
void
-__longjmp (env, val_arg)
- __jmp_buf env;
+__longjmp (env_arg, val_arg)
+ __jmp_buf env_arg;
int val_arg;
{
/* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
the hack around it); force it to use $a1 for the longjmp value.
Without this it saves $a1 in a register which gets clobbered
along the way. */
+ register struct __jmp_buf_internal_tag *env asm ("a0");
register int val asm ("a1");
#ifdef CHECK_SP
register long sp asm ("$29");
- if ((long) (env[0].__sp) < sp)
- __fortify_fail ("longjmp causes uninitialized stack frame");
+ CHECK_SP (env[0].__sp, sp, long);
#endif
#ifdef __mips_hard_float
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index d7e36ff..99aac01 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -27,19 +27,19 @@
#endif
void
-__longjmp (env, val_arg)
- __jmp_buf env;
+__longjmp (env_arg, val_arg)
+ __jmp_buf env_arg;
int val_arg;
{
/* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
the hack around it); force it to use $a1 for the longjmp value.
Without this it saves $a1 in a register which gets clobbered
along the way. */
+ register struct __jmp_buf_internal_tag *env asm ("a0");
register int val asm ("a1");
#ifdef CHECK_SP
register long long sp asm ("$29");
- if ((long long) (env[0].__sp) < sp)
- __fortify_fail ("longjmp causes uninitialized stack frame");
+ CHECK_SP (env[0].__sp, sp, long long);
#endif
#ifdef __mips_hard_float
diff --git a/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
new file mode 100644
index 0000000..9db339c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/____longjmp_chk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <signal.h>
+#include <stdio.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP(saved_sp, cur_sp, sp_type) \
+ do { \
+ sp_type sp_saved = (sp_type) (saved_sp); \
+ if (sp_saved < (cur_sp)) \
+ { \
+ struct __jmp_buf_internal_tag *env_save = env_arg; \
+ int val_save = val_arg; \
+ stack_t ss; \
+ int ret = __sigaltstack (NULL, &ss); \
+ if (ret == 0 \
+ && (!(ss.ss_flags & SS_ONSTACK) \
+ || ((unsigned sp_type) ((sp_type) ss.ss_sp \
+ + (sp_type) ss.ss_size \
+ - sp_saved) \
+ < ss.ss_size))) \
+ __fortify_fail ("longjmp causes uninitialized stack frame"); \
+ asm volatile ("move %0, %1" : "=r" (env) : "r" (env_save)); \
+ asm volatile ("move %0, %1" : "=r" (val) : "r" (val_save)); \
+ } \
+ } while (0)
+#include <__longjmp.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d84a81fe97400d669b5056ddcab9c59458d63e7
commit 9d84a81fe97400d669b5056ddcab9c59458d63e7
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Aug 3 16:48:38 2009 +0000
Make accept4 for MIPS o32 avoid socketcall.
sysdeps/unix/sysv/linux/internal_accept4.S expects socket.S to be
present if __NR_socketcall is defined (which it is on MIPS o32, even
though there are separate syscalls as well) and __NR_accept4 isn't.
MIPS does not have socket.S, since it uses separate syscalls, but
though the accept4 syscall should be added soon present kernel headers
do not have it. This patch creates a dummy internal_accept4.S for
MIPS o32, and an accept4.c wrapper that undefines __NR_socketcall so
that the main accept4.c falls back to the ENOSYS implementation if
__NR_accept4 isn't defined; it doesn't seem worthwhile to have a
special socketcall-based assembly implementation just for o32 on a few
kernels in the range between accept4 being available via socketcall
and the accept4 syscall being available.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 282c65d..9afd961 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/accept4.c,
+ sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S: New.
+
2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/mips/kernel-features.h: Define
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/accept4.c b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c
new file mode 100644
index 0000000..98a41f9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/accept4.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Avoid accept4.c trying to use a definition based on the socketcall
+ syscall and internal_accept4.S. */
+
+#include <errno.h>
+#include <signal.h>
+#include <sys/socket.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <kernel-features.h>
+
+#undef __NR_socketcall
+
+#include <sysdeps/unix/sysv/linux/accept4.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S b/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S
new file mode 100644
index 0000000..30434d7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/internal_accept4.S
@@ -0,0 +1,2 @@
+/* MIPS does not have socket.S and the socketcall syscall should
+ generally be avoided, though it exists. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=197aec2596ce699bc7b999ecf2dcd69bc5452c6e
commit 197aec2596ce699bc7b999ecf2dcd69bc5452c6e
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Wed Jul 29 15:27:35 2009 +0000
Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4 for MIPS.
* sysdeps/unix/sysv/linux/mips/kernel-features.h: Define
__ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 925e5e6..282c65d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-07-20 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h: Define
+ __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
+
2009-07-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/do-lookup.h: Remove.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index f479b60..6fe9b08 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -31,4 +31,10 @@
# define __ASSUME_FCNTL64 1
#endif
+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
+#if __LINUX_KERNEL_VERSION >= 0x02061c
+# define __ASSUME_EVENTFD2 1
+# define __ASSUME_SIGNALFD4 1
+#endif
+
#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a6ab2a600be0ff3ff0db95d6d38c6cb321e4be3
commit 0a6ab2a600be0ff3ff0db95d6d38c6cb321e4be3
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Wed Jul 29 15:26:39 2009 +0000
Define __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4 for ARM.
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Define
__ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 47aa61d..fe87809 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-07-29 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h: Define
+ __ASSUME_EVENTFD2 and __ASSUME_SIGNALFD4.
+
2009-06-30 Paul Brook <paul@codesourcery.com>
* sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index ea439d5..1b0ab63 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -51,6 +51,12 @@
# define __ASSUME_SIGFRAME_V2 1
#endif
+/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
+#if __LINUX_KERNEL_VERSION >= 0x02061b
+# define __ASSUME_EVENTFD2 1
+# define __ASSUME_SIGNALFD4 1
+#endif
+
#include_next <kernel-features.h>
/* These syscalls are not implemented yet for ARM. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b4e363a79674065338c1078c009dabe65d9a0a6
commit 6b4e363a79674065338c1078c009dabe65d9a0a6
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Tue Jul 14 00:04:33 2009 +0200
asm/elf.h don't exist anymore since linux kernel 2.6.25
* sysdeps/unix/sysv/linux/alpha/sys/procfs.h (ELF_NGREG,
ELF_NFPREG, elf_greg_t, elf_gregset_t, elf_fpreg_t,
elf_fpregset_t): Define. Don't include asm/elf.h.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 4737a1a..eb23873 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -20,6 +20,11 @@
* sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise.
+ [BZ #6507]
+ * sysdeps/unix/sysv/linux/alpha/sys/procfs.h (ELF_NGREG,
+ ELF_NFPREG, elf_greg_t, elf_gregset_t, elf_fpreg_t,
+ elf_fpregset_t): Define. Don't include asm/elf.h.
+
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index bee51f9..cf4fa9f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -29,10 +29,23 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
+ * I have no idea why that is so. For now, we just leave it at 33
+ * (32 general regs + processor status word).
+ */
+#define ELF_NGREG 33
+#define ELF_NFPREG 32
+
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
struct elf_siginfo
{
int si_signo; /* Signal number. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97d1e7c8e13eda1d57cb935cb20f91262c0db1ed
commit 97d1e7c8e13eda1d57cb935cb20f91262c0db1ed
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon Jul 13 23:59:25 2009 +0200
Update include paths following the move of alpha to ports
* sysdeps/unix/sysv/linux/alpha/getdents64.c: Adjust include path.
* sysdeps/unix/sysv/linux/alpha/nptl/fork.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index d2cedc5..4737a1a 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -9,6 +9,17 @@
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
FUTEX_BITSET_MATCH_ANY.
+ [BZ #10161]
+ * sysdeps/unix/sysv/linux/alpha/getdents64.c: Adjust include path.
+ * sysdeps/unix/sysv/linux/alpha/nptl/fork.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/sysconf.c: Likewise.
+
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c
index e53570c..50f1368 100644
--- a/sysdeps/unix/sysv/linux/alpha/getdents64.c
+++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c
@@ -1 +1 @@
-#include "../getdents64.c"
+#include <sysdeps/unix/sysv/linux/getdents64.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
index ca85fc0..8cc99a2 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
@@ -27,4 +27,4 @@
CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
NULL, NULL, &THREAD_SELF->tid, NULL)
-#include "../fork.c"
+#include <sysdeps/unix/sysv/linux/fork.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
index 27fd817..befa497 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
@@ -2,4 +2,4 @@
the acquire/release semantics of atomic_exchange_and_add. And even if
we don't do this, we should be using atomic_full_barrier or otherwise. */
#define __lll_rel_instr "mb"
-#include "../sem_post.c"
+#include <nptl/sysdeps/unix/sysv/linux/sem_post.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
index 172223a..1ac4c6a 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
@@ -1 +1 @@
-#include "../x86_64/timer_create.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_create.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
index 537516e..9bffef3 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
@@ -1 +1 @@
-#include "../x86_64/timer_delete.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_delete.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
index 3f21a73..24533a0 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
@@ -1 +1 @@
-#include "../x86_64/timer_getoverr.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
index a50143a..c110669 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
@@ -1 +1 @@
-#include "../x86_64/timer_gettime.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
index 37baeff..c110669 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
@@ -1 +1 @@
-#include "../x86_64/timer_settime.c"
+#include <nptl/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c
index 3e5b4ee..51a2a47 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c
@@ -149,4 +149,4 @@ __sysconf (int name)
/* Now the generic Linux version. */
#undef __sysconf
#define __sysconf static linux_sysconf
-#include "../sysconf.c"
+#include <sysdeps/unix/sysv/linux/sysconf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cb716ea2c79bf98bef150961c999622fd83e208
commit 8cb716ea2c79bf98bef150961c999622fd83e208
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon Jul 13 23:57:18 2009 +0200
* sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
FUTEX_BITSET_MATCH_ANY.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index cc7e059..d2cedc5 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -4,6 +4,11 @@
* sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
+ [BZ #10160]
+ * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Define
+ FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
+ FUTEX_BITSET_MATCH_ANY.
+
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 9318823..7903745 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -37,7 +37,12 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1592c256a9fa5039737a27ecbac537736f0b2b1
commit c1592c256a9fa5039737a27ecbac537736f0b2b1
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Mon Jul 13 23:52:54 2009 +0200
Adapt alpha version of getsysstats.c to the changes in the main Linux version
* sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 6bb3b7c..cc7e059 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,9 @@
+2009-07-13 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #10158]
+ * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
+ Change parameters and use next_line.
+
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
index 0e49a84..f667437 100644
--- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -20,15 +20,16 @@
/* We need to define a special parser for /proc/cpuinfo. */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
do \
{ \
/* Find the line that contains the information about the number of \
active cpus. We don't have to fear extremely long lines since \
the kernel will not generate them. 8192 bytes are really enough. \
If there is no "CPUs ..." line then we are on a UP system. */ \
+ char *l; \
(RESULT) = 1; \
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \
|| (sscanf (BUFFER, "CPUs probed %*d active %d", \
&(RESULT)) == 1)) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cda50f828eda9ba114bea5e5a58afbde665760ea
commit cda50f828eda9ba114bea5e5a58afbde665760ea
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Jul 17 20:39:04 2009 +0000
Update MIPS dl-lookup.c for changes to generic version.
* sysdeps/mips/do-lookup.h: Remove.
* sysdeps/mips/dl-lookup.c: Update from generic version, with
non-PIC handling integrated.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index fd858bd..925e5e6 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2009-07-17 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/do-lookup.h: Remove.
+ * sysdeps/mips/dl-lookup.c: Update from generic version, with
+ non-PIC handling integrated.
+
2009-06-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154
diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c
index 015c153..b7516da 100644
--- a/sysdeps/mips/dl-lookup.c
+++ b/sysdeps/mips/dl-lookup.c
@@ -1,9 +1,6 @@
/* Look up a symbol in the loaded objects.
- MIPS/Linux version - this is identical to the common version, but
- because it is in sysdeps/mips, it gets sysdeps/mips/do-lookup.h.
- Using <do-lookup.h> instead of "do-lookup.h" would work too.
-
- Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc.
+ MIPS/Linux version - special handling of non-PIC undefined symbol rules.
+ Copyright (C) 1995-2005, 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -73,8 +70,387 @@ struct sym_val
#endif
-/* The actual lookup code. */
-#include "do-lookup.h"
+/* Inner part of the lookup functions. We return a value > 0 if we
+ found the symbol, the value 0 if nothing is found and < 0 if
+ something bad happened. */
+static int
+__attribute_noinline__
+do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
+ unsigned long int *old_hash, const ElfW(Sym) *ref,
+ struct sym_val *result, struct r_scope_elem *scope, size_t i,
+ const struct r_found_version *const version, int flags,
+ struct link_map *skip, int type_class, struct link_map *undef_map)
+{
+ size_t n = scope->r_nlist;
+ /* Make sure we read the value before proceeding. Otherwise we
+ might use r_list pointing to the initial scope and r_nlist being
+ the value after a resize. That is the only path in dl-open.c not
+ protected by GSCOPE. A read barrier here might be to expensive. */
+ __asm volatile ("" : "+r" (n), "+m" (scope->r_list));
+ struct link_map **list = scope->r_list;
+
+ do
+ {
+ /* These variables are used in the nested function. */
+ Elf_Symndx symidx;
+ int num_versions = 0;
+ const ElfW(Sym) *versioned_sym = NULL;
+
+ const struct link_map *map = list[i]->l_real;
+
+ /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */
+ if (map == skip)
+ continue;
+
+ /* Don't search the executable when resolving a copy reloc. */
+ if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable)
+ continue;
+
+ /* Do not look into objects which are going to be removed. */
+ if (map->l_removed)
+ continue;
+
+ /* Print some debugging info if wanted. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
+ _dl_debug_printf ("symbol=%s; lookup in file=%s [%lu]\n",
+ undef_name,
+ map->l_name[0] ? map->l_name : rtld_progname,
+ map->l_ns);
+
+ /* If the hash table is empty there is nothing to do here. */
+ if (map->l_nbuckets == 0)
+ continue;
+
+ /* The tables for this map. */
+ const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
+ const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+
+
+ /* Nested routine to check whether the symbol matches. */
+ const ElfW(Sym) *
+ __attribute_noinline__
+ check_match (const ElfW(Sym) *sym)
+ {
+ unsigned int stt = ELFW(ST_TYPE) (sym->st_info);
+ assert (ELF_RTYPE_CLASS_PLT == 1);
+ /* The semantics of zero/non-zero values of undefined symbols
+ differs depending on whether the non-PIC ABI is in use.
+ Under the non-PIC ABI, a non-zero value indicates that
+ there is an address reference to the symbol and thus it
+ must always be resolved (except when resolving a jump slot
+ relocation) to the PLT entry whose address is provided as
+ the symbol's value; a zero value indicates that this
+ canonical-address behaviour is not required. Yet under the
+ classic MIPS psABI, a zero value indicates that there is an
+ address reference to the function and the dynamic linker
+ must resolve the symbol immediately upon loading. To avoid
+ conflict, symbols for which the dynamic linker must assume
+ the non-PIC ABI semantics are marked with the STO_MIPS_PLT
+ flag. */
+ if (__builtin_expect ((sym->st_value == 0 /* No value. */
+ && stt != STT_TLS)
+ || (sym->st_shndx == SHN_UNDEF
+ && !(sym->st_other & STO_MIPS_PLT))
+ || (type_class & (sym->st_shndx == SHN_UNDEF)),
+ 0))
+ return NULL;
+
+ /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC,
+ STT_COMMON, STT_TLS, and STT_GNU_IFUNC since these are no
+ code/data definitions. */
+#define ALLOWED_STT \
+ ((1 << STT_NOTYPE) | (1 << STT_OBJECT) | (1 << STT_FUNC) \
+ | (1 << STT_COMMON) | (1 << STT_TLS) | (1 << STT_GNU_IFUNC))
+ if (__builtin_expect (((1 << stt) & ALLOWED_STT) == 0, 0))
+ return NULL;
+
+ if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
+ /* Not the symbol we are looking for. */
+ return NULL;
+
+ const ElfW(Half) *verstab = map->l_versyms;
+ if (version != NULL)
+ {
+ if (__builtin_expect (verstab == NULL, 0))
+ {
+ /* We need a versioned symbol but haven't found any. If
+ this is the object which is referenced in the verneed
+ entry it is a bug in the library since a symbol must
+ not simply disappear.
+
+ It would also be a bug in the object since it means that
+ the list of required versions is incomplete and so the
+ tests in dl-version.c haven't found a problem.*/
+ assert (version->filename == NULL
+ || ! _dl_name_match_p (version->filename, map));
+
+ /* Otherwise we accept the symbol. */
+ }
+ else
+ {
+ /* We can match the version information or use the
+ default one if it is not hidden. */
+ ElfW(Half) ndx = verstab[symidx] & 0x7fff;
+ if ((map->l_versions[ndx].hash != version->hash
+ || strcmp (map->l_versions[ndx].name, version->name))
+ && (version->hidden || map->l_versions[ndx].hash
+ || (verstab[symidx] & 0x8000)))
+ /* It's not the version we want. */
+ return NULL;
+ }
+ }
+ else
+ {
+ /* No specific version is selected. There are two ways we
+ can got here:
+
+ - a binary which does not include versioning information
+ is loaded
+
+ - dlsym() instead of dlvsym() is used to get a symbol which
+ might exist in more than one form
+
+ If the library does not provide symbol version information
+ there is no problem at at: we simply use the symbol if it
+ is defined.
+
+ These two lookups need to be handled differently if the
+ library defines versions. In the case of the old
+ unversioned application the oldest (default) version
+ should be used. In case of a dlsym() call the latest and
+ public interface should be returned. */
+ if (verstab != NULL)
+ {
+ if ((verstab[symidx] & 0x7fff)
+ >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3))
+ {
+ /* Don't accept hidden symbols. */
+ if ((verstab[symidx] & 0x8000) == 0
+ && num_versions++ == 0)
+ /* No version so far. */
+ versioned_sym = sym;
+
+ return NULL;
+ }
+ }
+ }
+
+ /* There cannot be another entry for this symbol so stop here. */
+ return sym;
+ }
+
+ const ElfW(Sym) *sym;
+ const ElfW(Addr) *bitmask = map->l_gnu_bitmask;
+ if (__builtin_expect (bitmask != NULL, 1))
+ {
+ ElfW(Addr) bitmask_word
+ = bitmask[(new_hash / __ELF_NATIVE_CLASS)
+ & map->l_gnu_bitmask_idxbits];
+
+ unsigned int hashbit1 = new_hash & (__ELF_NATIVE_CLASS - 1);
+ unsigned int hashbit2 = ((new_hash >> map->l_gnu_shift)
+ & (__ELF_NATIVE_CLASS - 1));
+
+ if (__builtin_expect ((bitmask_word >> hashbit1)
+ & (bitmask_word >> hashbit2) & 1, 0))
+ {
+ Elf32_Word bucket = map->l_gnu_buckets[new_hash
+ % map->l_nbuckets];
+ if (bucket != 0)
+ {
+ const Elf32_Word *hasharr = &map->l_gnu_chain_zero[bucket];
+
+ do
+ if (((*hasharr ^ new_hash) >> 1) == 0)
+ {
+ symidx = hasharr - map->l_gnu_chain_zero;
+ sym = check_match (&symtab[symidx]);
+ if (sym != NULL)
+ goto found_it;
+ }
+ while ((*hasharr++ & 1u) == 0);
+ }
+ }
+ /* No symbol found. */
+ symidx = SHN_UNDEF;
+ }
+ else
+ {
+ if (*old_hash == 0xffffffff)
+ *old_hash = _dl_elf_hash (undef_name);
+
+ /* Use the old SysV-style hash table. Search the appropriate
+ hash bucket in this object's symbol table for a definition
+ for the same symbol name. */
+ for (symidx = map->l_buckets[*old_hash % map->l_nbuckets];
+ symidx != STN_UNDEF;
+ symidx = map->l_chain[symidx])
+ {
+ sym = check_match (&symtab[symidx]);
+ if (sym != NULL)
+ goto found_it;
+ }
+ }
+
+ /* If we have seen exactly one versioned symbol while we are
+ looking for an unversioned symbol and the version is not the
+ default version we still accept this symbol since there are
+ no possible ambiguities. */
+ sym = num_versions == 1 ? versioned_sym : NULL;
+
+ if (sym != NULL)
+ {
+ found_it:
+ switch (__builtin_expect (ELFW(ST_BIND) (sym->st_info), STB_GLOBAL))
+ {
+ case STB_WEAK:
+ /* Weak definition. Use this value if we don't find another. */
+ if (__builtin_expect (GLRO(dl_dynamic_weak), 0))
+ {
+ if (! result->s)
+ {
+ result->s = sym;
+ result->m = (struct link_map *) map;
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ case STB_GLOBAL:
+ success:
+ /* Global definition. Just what we need. */
+ result->s = sym;
+ result->m = (struct link_map *) map;
+ return 1;
+
+ case STB_GNU_UNIQUE:;
+ /* We have to determine whether we already found a
+ symbol with this name before. If not then we have to
+ add it to the search table. If we already found a
+ definition we have to use it. */
+ void enter (struct unique_sym *table, size_t size,
+ unsigned int hash, const char *name,
+ const ElfW(Sym) *sym, const struct link_map *map)
+ {
+ size_t idx = hash % size;
+ size_t hash2 = 1 + hash % (size - 2);
+ while (1)
+ {
+ if (table[idx].hashval == 0)
+ {
+ table[idx].hashval = hash;
+ table[idx].name = strtab + sym->st_name;
+ if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
+ {
+ table[idx].sym = ref;
+ table[idx].map = undef_map;
+ }
+ else
+ {
+ table[idx].sym = sym;
+ table[idx].map = map;
+ }
+ return;
+ }
+
+ idx += hash2;
+ if (idx >= size)
+ idx -= size;
+ }
+ }
+
+ struct unique_sym_table *tab
+ = &GL(dl_ns)[map->l_ns]._ns_unique_sym_table;
+
+ __rtld_lock_lock_recursive (tab->lock);
+
+ struct unique_sym *entries = tab->entries;
+ size_t size = tab->size;
+ if (entries != NULL)
+ {
+ size_t idx = new_hash % size;
+ size_t hash2 = 1 + new_hash % (size - 2);
+ while (1)
+ {
+ if (entries[idx].hashval == new_hash
+ && strcmp (entries[idx].name, undef_name) == 0)
+ {
+ result->s = entries[idx].sym;
+ result->m = (struct link_map *) entries[idx].map;
+ __rtld_lock_unlock_recursive (tab->lock);
+ return 1;
+ }
+
+ if (entries[idx].hashval == 0
+ && entries[idx].name == NULL)
+ break;
+
+ idx += hash2;
+ if (idx >= size)
+ idx -= size;
+ }
+
+ if (size * 3 <= tab->n_elements)
+ {
+ /* Expand the table. */
+ size_t newsize = _dl_higher_prime_number (size);
+ struct unique_sym *newentries
+ = calloc (sizeof (struct unique_sym), newsize);
+ if (newentries == NULL)
+ {
+ nomem:
+ __rtld_lock_unlock_recursive (tab->lock);
+ _dl_fatal_printf ("out of memory\n");
+ }
+
+ for (idx = 0; idx < size; ++idx)
+ if (entries[idx].hashval != 0)
+ enter (newentries, newsize, entries[idx].hashval,
+ entries[idx].name, entries[idx].sym,
+ entries[idx].map);
+
+ tab->free (entries);
+ tab->size = newsize;
+ entries = tab->entries = newentries;
+ tab->free = free;
+ }
+ }
+ else
+ {
+#define INITIAL_NUNIQUE_SYM_TABLE 31
+ size = INITIAL_NUNIQUE_SYM_TABLE;
+ entries = calloc (sizeof (struct unique_sym), size);
+ if (entries == NULL)
+ goto nomem;
+
+ tab->entries = entries;
+ tab->size = size;
+ tab->free = free;
+ }
+
+ enter (entries, size, new_hash, strtab + sym->st_name, sym, map);
+ ++tab->n_elements;
+
+ __rtld_lock_unlock_recursive (tab->lock);
+
+ goto success;
+
+ default:
+ /* Local symbols are ignored. */
+ break;
+ }
+ }
+
+ /* If this current map is the one mentioned in the verneed entry
+ and we have not found a weak entry, it is a bug. */
+ if (symidx == STN_UNDEF && version != NULL && version->filename != NULL
+ && __builtin_expect (_dl_name_match_p (version->filename, map), 0))
+ return -1;
+ }
+ while (++i < n);
+
+ /* We have not found anything until now. */
+ return 0;
+}
static uint_fast32_t
@@ -341,7 +717,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
{
int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref,
¤t_value, *scope, start, version, flags,
- skip_map, type_class);
+ skip_map, type_class, undef_map);
if (res > 0)
break;
@@ -414,7 +790,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
for (scope = symbol_scope; *scope != NULL; i = 0, ++scope)
if (do_lookup_x (undef_name, new_hash, &old_hash, *ref,
&protected_value, *scope, i, version, flags,
- skip_map, ELF_RTYPE_CLASS_PLT) != 0)
+ skip_map, ELF_RTYPE_CLASS_PLT, NULL) != 0)
break;
if (protected_value.s != NULL && protected_value.m != undef_map)
@@ -540,21 +916,26 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val,
undef_map->l_local_scope[0], 0, version, 0, NULL,
- type_class);
+ type_class, undef_map);
if (val.s != value->s || val.m != value->m)
conflict = 1;
}
- if (value->s
- && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
- == STT_TLS, 0)))
- type_class = 4;
+ if (value->s)
+ {
+ if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
+ == STT_TLS, 0))
+ type_class = 4;
+ else if (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
+ == STT_GNU_IFUNC, 0))
+ type_class |= 8;
+ }
if (conflict
|| GLRO(dl_trace_prelink_map) == undef_map
|| GLRO(dl_trace_prelink_map) == NULL
- || type_class == 4)
+ || type_class >= 4)
{
_dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
conflict ? "conflict" : "lookup",
diff --git a/sysdeps/mips/do-lookup.h b/sysdeps/mips/do-lookup.h
deleted file mode 100644
index 0d92620..0000000
--- a/sysdeps/mips/do-lookup.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* MIPS-specific veneer to GLIBC's do-lookup.h.
- Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* The semantics of zero/non-zero values of undefined symbols differs
- depending on whether the non-PIC ABI is in use. Under the non-PIC ABI,
- a non-zero value indicates that there is an address reference to the
- symbol and thus it must always be resolved (except when resolving a jump
- slot relocation) to the PLT entry whose address is provided as the
- symbol's value; a zero value indicates that this canonical-address
- behaviour is not required. Yet under the classic MIPS psABI, a zero value
- indicates that there is an address reference to the function and the
- dynamic linker must resolve the symbol immediately upon loading. To
- avoid conflict, symbols for which the dynamic linker must assume the
- non-PIC ABI semantics are marked with the STO_MIPS_PLT flag. The
- following ugly hack causes the code in the platform-independent
- do-lookup.h file to check this flag correctly. */
-#define st_value st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT)) \
- || (sym->st_value
-#include_next "do-lookup.h"
-#undef st_value
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f40617927c9aee865a56af32f38354ea99b63b36
commit f40617927c9aee865a56af32f38354ea99b63b36
Author: Paul Brook <paul@codesourcery.com>
Date: Tue Jun 30 20:10:14 2009 +0000
Avoid invalid unwind directives when building crti.o and crtn.o for ARM EABI.
* sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add
-fno-asynchronous-unwind-tables -fno-unwind-tables.
(CFLAGS-pt-initfini.s): Ditto.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ebc4e30..47aa61d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2009-06-30 Paul Brook <paul@codesourcery.com>
+
+ * sysdeps/arm/eabi/Makefile (CFLAGS-initfini.s): Add
+ -fno-asynchronous-unwind-tables -fno-unwind-tables.
+ (CFLAGS-pt-initfini.s): Ditto.
+
2009-06-25 Nathan Froyd <froydnj@codesourcery.com>
* sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout,
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
index 890d1d9..05aede6 100644
--- a/sysdeps/arm/eabi/Makefile
+++ b/sysdeps/arm/eabi/Makefile
@@ -3,6 +3,7 @@ aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
aeabi_memmove aeabi_memset
+CFLAGS-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables
sysdep_routines += $(aeabi_constants) $(aeabi_routines)
static-only-routines += $(aeabi_constants)
@@ -24,3 +25,7 @@ endif
ifeq ($(subdir),math)
$(objpfx)libm.so: $(elfobjdir)/ld.so
endif
+
+ifeq ($(subdir),nptl)
+CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables -fno-unwind-tables
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a6ba634c66e64aab5b070403d23fb22ab2bf6d9
commit 5a6ba634c66e64aab5b070403d23fb22ab2bf6d9
Author: Nathan Froyd <froydnj@codesourcery.com>
Date: Thu Jun 25 13:27:59 2009 +0000
Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr.
* sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout,
__aeabi_stderr): New variables.
(setup_aeabi_stdio): New function. Add it to .preinit_array.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index dbc00f6..ebc4e30 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2009-06-25 Nathan Froyd <froydnj@codesourcery.com>
+
+ * sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout,
+ __aeabi_stderr): New variables.
+ (setup_aeabi_stdio): New function. Add it to .preinit_array.
+
2009-06-24 Maxim Kuvyrkov <maxim@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c
index 99c7985..0c620d4 100644
--- a/sysdeps/arm/eabi/aeabi_lcsts.c
+++ b/sysdeps/arm/eabi/aeabi_lcsts.c
@@ -81,4 +81,19 @@ eabi_constant (TMP_MAX);
eabi_constant (FILENAME_MAX);
eabi_constant (L_tmpnam);
+FILE *__aeabi_stdin attribute_hidden;
+FILE *__aeabi_stdout attribute_hidden;
+FILE *__aeabi_stderr attribute_hidden;
+
+static void __attribute__ ((used))
+setup_aeabi_stdio (void)
+{
+ __aeabi_stdin = stdin;
+ __aeabi_stdout = stdout;
+ __aeabi_stderr = stderr;
+}
+
+static void (*fp) (void) __attribute__ ((used, section (".preinit_array")))
+ = setup_aeabi_stdio;
+
eabi_constant (CLOCKS_PER_SEC);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6dec1881f8d1dba619f6c08fdf50cb70dc1eff4
commit b6dec1881f8d1dba619f6c08fdf50cb70dc1eff4
Author: Maxim Kuvyrkov <maxim@codesourcery.com>
Date: Wed Jun 24 15:55:04 2009 +0000
ARM EABI backtrace using unwind information.
2009-06-24 Maxim Kuvyrkov <maxim@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Kazu Hirata <kazu@codesourcery.com>
* sysdeps/arm/eabi/backtrace.c: New.
* sysdeps/arm/eabi/Makefile (CFLAGS-backtrace.c): Add
-funwind-tables.
* sysdeps/arm/preconfigure: Add -fno-unwind-tables to CFLAGS.
* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Remove
-fno-unwind-tables from CFLAGS.
* sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerate.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h (_Unwind_Trace_Fn):
Define.
(_Unwind_Backtrace): Declare.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 6750958..dbc00f6 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,19 @@
+2009-06-24 Maxim Kuvyrkov <maxim@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * sysdeps/arm/eabi/backtrace.c: New.
+ * sysdeps/arm/eabi/Makefile (CFLAGS-backtrace.c): Add
+ -funwind-tables.
+ * sysdeps/arm/preconfigure: Add -fno-unwind-tables to CFLAGS.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Remove
+ -fno-unwind-tables from CFLAGS.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerate.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h (_Unwind_Trace_Fn):
+ Define.
+ (_Unwind_Backtrace): Declare.
+
2009-05-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
index 0f92d7a..890d1d9 100644
--- a/sysdeps/arm/eabi/Makefile
+++ b/sysdeps/arm/eabi/Makefile
@@ -11,6 +11,10 @@ static-only-routines += $(aeabi_constants)
gen-as-const-headers += rtld-global-offsets.sym
endif
+ifeq ($(subdir),debug)
+CFLAGS-backtrace.c += -funwind-tables
+endif
+
ifeq ($(subdir),elf)
sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
shared-only-routines += aeabi_unwind_cpp_pr1
diff --git a/sysdeps/arm/eabi/backtrace.c b/sysdeps/arm/eabi/backtrace.c
new file mode 100644
index 0000000..752a435
--- /dev/null
+++ b/sysdeps/arm/eabi/backtrace.c
@@ -0,0 +1,126 @@
+/* Return backtrace of current program state.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Kazu Hirata <kazu@codesourcery.com>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <bits/libc-lock.h>
+#include <dlfcn.h>
+#include <execinfo.h>
+#include <stdlib.h>
+#include <unwind.h>
+
+struct trace_arg
+{
+ void **array;
+ int cnt, size;
+};
+
+#ifdef SHARED
+static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
+static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
+ _Unwind_VRS_RegClass,
+ _uw,
+ _Unwind_VRS_DataRepresentation,
+ void *);
+
+static void *libgcc_handle;
+
+static void
+init (void)
+{
+ libgcc_handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (libgcc_handle == NULL)
+ return;
+
+ unwind_backtrace = __libc_dlsym (libgcc_handle, "_Unwind_Backtrace");
+ unwind_vrs_get = __libc_dlsym (libgcc_handle, "_Unwind_VRS_Get");
+ if (unwind_vrs_get == NULL)
+ unwind_backtrace = NULL;
+}
+
+/* This function is identical to "_Unwind_GetGR", except that it uses
+ "unwind_vrs_get" instead of "_Unwind_VRS_Get". */
+static inline _Unwind_Word
+unwind_getgr (_Unwind_Context *context, int regno)
+{
+ _uw val;
+ unwind_vrs_get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+ return val;
+}
+
+/* This macro is identical to the _Unwind_GetIP macro, except that it
+ uses "unwind_getgr" instead of "_Unwind_GetGR". */
+# define unwind_getip(context) \
+ (unwind_getgr (context, 15) & ~(_Unwind_Word)1)
+#else
+# define unwind_backtrace _Unwind_Backtrace
+# define unwind_getip _Unwind_GetIP
+#endif
+
+static _Unwind_Reason_Code
+backtrace_helper (struct _Unwind_Context *ctx, void *a)
+{
+ struct trace_arg *arg = a;
+
+ /* We are first called with address in the __backtrace function.
+ Skip it. */
+ if (arg->cnt != -1)
+ arg->array[arg->cnt] = (void *) unwind_getip (ctx);
+ if (++arg->cnt == arg->size)
+ return _URC_END_OF_STACK;
+ return _URC_NO_REASON;
+}
+
+int
+__backtrace (array, size)
+ void **array;
+ int size;
+{
+ struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
+#ifdef SHARED
+ __libc_once_define (static, once);
+
+ __libc_once (once, init);
+ if (unwind_backtrace == NULL)
+ return 0;
+#endif
+
+ if (size >= 1)
+ unwind_backtrace (backtrace_helper, &arg);
+
+ if (arg.cnt > 1 && arg.array[arg.cnt - 1] == NULL)
+ --arg.cnt;
+ return arg.cnt != -1 ? arg.cnt : 0;
+}
+weak_alias (__backtrace, backtrace)
+libc_hidden_def (__backtrace)
+
+
+#ifdef SHARED
+/* Free all resources if necessary. */
+libc_freeres_fn (free_mem)
+{
+ unwind_backtrace = NULL;
+ if (libgcc_handle != NULL)
+ {
+ __libc_dlclose (libgcc_handle);
+ libgcc_handle = NULL;
+ }
+}
+#endif
diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
index 337e84f..313da79 100644
--- a/sysdeps/arm/preconfigure
+++ b/sysdeps/arm/preconfigure
@@ -11,3 +11,7 @@ arm*)
esac
;;
esac
+if [ "${CFLAGS+set}" != "set" ]; then
+ CFLAGS="-g -O2"
+fi
+CFLAGS="$CFLAGS -fno-unwind-tables"
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
index 28fb9ef..c7e20cf 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
@@ -3,3 +3,4 @@
arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
+CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
index d1fb7f4..cc0e9b5 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
@@ -3,3 +3,4 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
+CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
index d625fb2..eeb9cf8 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
@@ -1,5 +1,5 @@
/* Header file for the ARM EABI unwinder
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
Contributed by Paul Brook
This file is free software; you can redistribute it and/or modify it
@@ -267,6 +267,11 @@ extern "C" {
#define _Unwind_SetIP(context, val) \
_Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
+typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
+ (struct _Unwind_Context *, void *);
+
+extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
+
#ifdef __cplusplus
} /* extern "C" */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8200e168efbf54fe08a269fde8fcf986ad5360f0
commit 8200e168efbf54fe08a269fde8fcf986ad5360f0
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Jun 18 22:04:19 2009 +0000
Define PF_IEEE802154 and AF_IEEE802154 for MIPS.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154
and AF_IEEE802154.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9b0b7bd..fd858bd 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-06-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define PF_IEEE802154
+ and AF_IEEE802154.
+
2009-05-16 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/____longjmp_chk.c: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 60db515..58a0409 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,6 +1,6 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -108,7 +108,8 @@ enum __socket_type
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
#define PF_PHONET 35 /* Phonet sockets. */
-#define PF_MAX 36 /* For now.. */
+#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
+#define PF_MAX 37 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -148,6 +149,7 @@ enum __socket_type
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
#define AF_PHONET PF_PHONET
+#define AF_IEEE802154 PF_IEEE802154
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf89c0e24509fe4817816c585f96329e3364303c
commit bf89c0e24509fe4817816c585f96329e3364303c
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon May 18 19:48:54 2009 +0000
Use unsigned comparison in ARM ____longjmp_chk.
* sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned
comparison.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1088fc0..6750958 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-05-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/____longjmp_chk.S (CHECK_SP): Use unsigned
+ comparison.
+
2009-05-16 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/____longjmp_chk.S: New file.
diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/arm/____longjmp_chk.S
index 9b65c36..16fc4cd 100644
--- a/sysdeps/arm/____longjmp_chk.S
+++ b/sysdeps/arm/____longjmp_chk.S
@@ -48,7 +48,7 @@ longjmp_msg:
#define CHECK_SP(reg) \
cmp sp, reg; \
- ble .Lok; \
+ bls .Lok; \
CALL_FAIL \
.Lok:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a9f82ac93563fa55cb5aed4cf20fa67352899c9
commit 6a9f82ac93563fa55cb5aed4cf20fa67352899c9
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 22:24:56 2009 +0000
____longjmp_chk for MIPS.
* sysdeps/mips/____longjmp_chk.c: New file.
* sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't
undefine __longjmp.
* sysdeps/mips64/__longjmp.c: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 4039c01..9b0b7bd 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,12 @@
2009-05-16 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/mips/____longjmp_chk.c: New file.
+ * sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't
+ undefine __longjmp.
+ * sysdeps/mips64/__longjmp.c: Likewise.
+
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c,
sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c,
diff --git a/sysdeps/mips/____longjmp_chk.c b/sysdeps/mips/____longjmp_chk.c
new file mode 100644
index 0000000..a46ed15
--- /dev/null
+++ b/sysdeps/mips/____longjmp_chk.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdio.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP
+#include <__longjmp.c>
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 386c056..340485d 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -20,8 +20,6 @@
#include <setjmp.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -36,6 +34,11 @@ __longjmp (env, val_arg)
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long sp asm ("$29");
+ if ((long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 973b078..d7e36ff 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004
+/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -22,8 +22,6 @@
#include <sgidefs.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -38,6 +36,11 @@ __longjmp (env, val_arg)
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long long sp asm ("$29");
+ if ((long long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef889ffe8d5cf704a67e084a56a70a4da2f9584e
commit ef889ffe8d5cf704a67e084a56a70a4da2f9584e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 22:20:23 2009 +0000
____longjmp_chk for ARM.
* sysdeps/arm/____longjmp_chk.S: New file.
* sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it.
* sysdeps/arm/eabi/__longjmp.S: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 420c153..1088fc0 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,11 @@
2009-05-16 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/arm/____longjmp_chk.S: New file.
+ * sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it.
+ * sysdeps/arm/eabi/__longjmp.S: Likewise.
+
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
__ASSUME_PWRITEV): Don't undefine.
diff --git a/sysdeps/arm/____longjmp_chk.S b/sysdeps/arm/____longjmp_chk.S
new file mode 100644
index 0000000..9b65c36
--- /dev/null
+++ b/sysdeps/arm/____longjmp_chk.S
@@ -0,0 +1,55 @@
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+
+ .section .rodata.str1.1,"aMS",%progbits,1
+ .type longjmp_msg,%object
+longjmp_msg:
+ .string "longjmp causes uninitialized stack frame"
+ .size longjmp_msg, .-longjmp_msg
+ .text
+
+#define __longjmp ____longjmp_chk
+
+#ifdef PIC
+# define CALL_FAIL \
+ ldr sl, .L_GOT; \
+.L_GOT_OFF: \
+ add sl, pc, sl; \
+ ldr r0, .Lstr; \
+ add r0, sl, r0; \
+ B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \
+.L_GOT: \
+ .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \
+.Lstr: \
+ .word longjmp_msg(GOTOFF);
+#else
+# define CALL_FAIL \
+ ldr r0, .Lstr; \
+ B HIDDEN_JUMPTARGET(__fortify_fail); \
+.Lstr: \
+ .word longjmp_msg;
+#endif
+
+#define CHECK_SP(reg) \
+ cmp sp, reg; \
+ ble .Lok; \
+ CALL_FAIL \
+.Lok:
+
+#include <__longjmp.S>
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 7b30160..c834e78 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,5 +29,9 @@ ENTRY (__longjmp)
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S
index fff25cd..1f3f791 100644
--- a/sysdeps/arm/eabi/__longjmp.S
+++ b/sysdeps/arm/eabi/__longjmp.S
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,10 @@ ENTRY (__longjmp)
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
#ifdef IS_IN_rtld
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9056ac6554d3d9635344d77375ae60f13707001
commit d9056ac6554d3d9635344d77375ae60f13707001
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 17:42:10 2009 +0000
fallocate fixes for MIPS n32 and n64.
* sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c,
sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b951c0b..4039c01 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,12 @@
2009-05-16 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New.
+
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/Versions (libc): Add
fallocate64@@GLIBC_2.11.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
new file mode 100644
index 0000000..f973250
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+fallocate (int fd, int mode, __off_t offset, __off_t len)
+{
+#ifdef __NR_fallocate
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
new file mode 100644
index 0000000..1f37f91
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
+{
+#ifdef __NR_fallocate
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
new file mode 100644
index 0000000..d3b7218
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/wordsize-64/fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
new file mode 100644
index 0000000..fb2b681
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
@@ -0,0 +1 @@
+/* fallocate64 is in fallocate.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f8832d47f51d4abbbb1e9034f638653c730ec5b
commit 9f8832d47f51d4abbbb1e9034f638653c730ec5b
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 15:19:32 2009 +0000
Assume preadv and pwritev syscalls on ARM for 2.6.30.
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
__ASSUME_PWRITEV): Don't undefine.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 4b304fb..420c153 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2009-05-16 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Don't undefine.
+
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/Versions (libc): Add
fallocate64@@GLIBC_2.11.
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index b33c968..ea439d5 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -56,5 +56,3 @@
/* These syscalls are not implemented yet for ARM. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
-#undef __ASSUME_PREADV
-#undef __ASSUME_PWRITEV
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3066cb224d3614d5859a4fac38675f95738ea713
commit 3066cb224d3614d5859a4fac38675f95738ea713
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 15:14:44 2009 +0000
* sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
fallocate64@@GLIBC_2.11.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index c68e94a..3afc3da 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+
2009-04-25 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index 0799bf3..5650f7f 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -29,4 +29,7 @@ libc {
# v*
versionsort64;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c504ff3be9c3c63b9b772b84d2c517cd4f21881a
commit c504ff3be9c3c63b9b772b84d2c517cd4f21881a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 14:30:47 2009 +0000
Add fallocate64 export for MIPS.
* sysdeps/unix/sysv/linux/mips/Versions (libc): Add
fallocate64@@GLIBC_2.11.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index a4759d9..b951c0b 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+
2009-05-14 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c,
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 09df42d..a56322a 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -34,4 +34,7 @@ libc {
# _*
_test_and_set;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db99b35dde877dfe4882809b802e932f4bd1fd52
commit db99b35dde877dfe4882809b802e932f4bd1fd52
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat May 16 14:29:06 2009 +0000
Add fallocate64 export for ARM.
* sysdeps/unix/sysv/linux/arm/Versions (libc): Add
fallocate64@@GLIBC_2.11.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index c9f44f4..4b304fb 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-05-16 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+
2009-04-25 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 2ddb2af..1d9e964 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -34,4 +34,7 @@ libc {
GLIBC_2.3.3 {
posix_fadvise64; posix_fallocate64;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c052b7cc1a903d5de8152d4cc9096c8f8f5f0e1
commit 9c052b7cc1a903d5de8152d4cc9096c8f8f5f0e1
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Sat May 16 10:36:20 2009 +0200
Remove .cvsignore files
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 613f66d..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-glibc-ports-*.tar* glibc-port-*.tar*
diff --git a/bare/.cvsignore b/bare/.cvsignore
deleted file mode 100644
index 3fc9f4c..0000000
--- a/bare/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
-*.gz *.Z *.tar *.tgz
-=*
-TODO COPYING* AUTHORS copyr-* copying.*
-glibc-*
-distinfo
diff --git a/sysdeps/mips/.cvsignore b/sysdeps/mips/.cvsignore
deleted file mode 100644
index 1f69fd9..0000000
--- a/sysdeps/mips/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.gz *.Z *.tar *.tgz
-=*
-TODO COPYING* AUTHORS copyr-* copying.*
-glibc-*
diff --git a/sysdeps/unix/bsd/sun/sunos4/.cvsignore b/sysdeps/unix/bsd/sun/sunos4/.cvsignore
deleted file mode 100644
index 1f69fd9..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.gz *.Z *.tar *.tgz
-=*
-TODO COPYING* AUTHORS copyr-* copying.*
-glibc-*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19afa982843fdffafb27213d8ca86acb34fcdd94
commit 19afa982843fdffafb27213d8ca86acb34fcdd94
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu May 14 22:24:35 2009 +0000
Fix MIPS n64 build failure with preadv64/pwritev64 aliases.
* sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: New files.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 5887530..a4759d9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-05-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: New files.
+
2009-04-18 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getcontext.S: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
new file mode 100644
index 0000000..fd9320c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
@@ -0,0 +1 @@
+/* Empty since the preadv syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
new file mode 100644
index 0000000..8b72a29
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
@@ -0,0 +1 @@
+/* Empty since the pwritev syscall is equivalent. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b2b217196eecc58505cca0d9cb6f6407d8780b3
commit 2b2b217196eecc58505cca0d9cb6f6407d8780b3
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Apr 25 19:30:25 2009 +0000
* sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last
change, the syscalls have been added to 2.6.30-rc4.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index ef7d08d..c68e94a 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-04-25 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last
+ change, the syscalls have been added to 2.6.30-rc4.
+
2009-04-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV,
@@ -343,7 +348,7 @@
(catch_segfault): Likewise.
(register_dump): Use the Coldfire-specific sigcontext fields to
display call-saved data and address registers (rather than the
- data stored in sc_fpstate by real_catch_segfault). Display 8-byte
+ data stored in sc_fpstate by real_catch_segfault). Display 8-byte
floating-point registers on Coldfire.
* sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary
register to SINGLE_THREAD_P.
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index d897562..2920943 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,5 +39,3 @@
/* These syscalls are not implemented yet for m68k. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
-#undef __ASSUME_PREADV
-#undef __ASSUME_PWRITEV
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba35741e51b9292eb52617d2382910d26e8a1da3
commit ba35741e51b9292eb52617d2382910d26e8a1da3
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Apr 25 15:23:44 2009 +0000
2009-04-25 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use
floating-point registers.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 779ef2d..c9f44f4 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-04-25 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/arm/eabi/fpu_control.h: If soft-float, don't use
+ floating-point registers.
+
2009-04-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h
index 55d7764..9d29994 100644
--- a/sysdeps/arm/eabi/fpu_control.h
+++ b/sysdeps/arm/eabi/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. ARM VFP version.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,17 @@
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
+#if !defined(_LIBC) && defined(__SOFTFP__)
+
+#define _FPU_RESERVED 0xffffffff
+#define _FPU_DEFAULT 0x00000000
+typedef unsigned int fpu_control_t;
+#define _FPU_GETCW(cw) 0
+#define _FPU_SETCW(cw) do { } while (0)
+extern fpu_control_t __fpu_control;
+
+#else
+
/* masking of interrupts */
#define _FPU_MASK_IM 0x00000100 /* invalid operation */
#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
@@ -48,4 +59,6 @@ typedef unsigned int fpu_control_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
+#endif /* __SOFTFP__ */
+
#endif /* _FPU_CONTROL_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84c54b39d242e6c8231df015b7b7fb582dcf056e
commit 84c54b39d242e6c8231df015b7b7fb582dcf056e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 24 20:37:17 2009 +0000
2009-04-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/hppa1.1/s_signbit.c: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e43ad65..60480d1 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,7 @@
+2009-04-24 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/hppa/hppa1.1/s_signbit.c: New file.
+
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI,
diff --git a/sysdeps/hppa/hppa1.1/s_signbit.c b/sysdeps/hppa/hppa1.1/s_signbit.c
new file mode 100644
index 0000000..d9d4f8b
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/s_signbit.c
@@ -0,0 +1,35 @@
+/* Return nonzero value if number is negative.
+ Copyright (C) 1997, 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+int
+__signbit (double x)
+{
+ int32_t hx;
+
+ GET_HIGH_WORD (hx, x);
+ return hx & 0x80000000;
+}
+#ifdef NO_LONG_DOUBLE
+strong_alias (__signbit, __signbitl)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec4cafcbcd5304020bb3d938e7f37373d32d3168
commit ec4cafcbcd5304020bb3d938e7f37373d32d3168
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 24 02:53:23 2009 +0000
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI,
VALID_ELF_ABIVERSION, and VALID_ELF_HEADER.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e26de63..e43ad65 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
+ * sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI,
+ VALID_ELF_ABIVERSION, and VALID_ELF_HEADER.
+
+2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
+
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include
sysdep.h. Document the reason for other includes.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 503bbca..e462fd3 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -33,13 +33,6 @@
#include <abort-instr.h>
#include <tls.h>
-# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX))
-# define VALID_ELF_ABIVERSION(ver) (ver == 0)
-# define VALID_ELF_HEADER(hdr,exp,size) \
- memcmp (hdr,exp,size-2) == 0 \
- && VALID_ELF_OSABI (hdr[EI_OSABI]) \
- && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
-
/* These two definitions must match the definition of the stub in
bfd/elf32-hppa.c (see plt_stub[]).
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=783398d8c28a1686cf2202bf5740158e90ee034f
commit 783398d8c28a1686cf2202bf5740158e90ee034f
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 24 02:50:30 2009 +0000
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include
sysdep.h. Document the reason for other includes.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index aebfc57..e26de63 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Do not include
+ sysdep.h. Document the reason for other includes.
+
+2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
+
* sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]:
Include errno.h.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index 2964732..d7c8b9d 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -17,10 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <stdint.h>
-#include <sysdep.h>
-#include <abort-instr.h>
-#include <kernel-features.h>
+#include <stdint.h> /* Required for type definitions e.g. uint8_t. */
+#include <abort-instr.h> /* Required for ABORT_INSTRUCTIUON. */
+#include <kernel-features.h> /* Required for __ASSUME_LWS_CAS. */
/* We need EFAULT, ENONSYS */
#if !defined EFAULT && !defined ENOSYS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa34de41160e0a05a465666cb0ed930c9982a15b
commit fa34de41160e0a05a465666cb0ed930c9982a15b
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 24 02:48:15 2009 +0000
2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]:
Include errno.h.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index b673000..aebfc57 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h [!__ASSEMBLER__]:
+ Include errno.h.
+
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 96632a1..e22e571 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -24,6 +24,11 @@
#include <sysdeps/generic/sysdep.h>
#include <sys/syscall.h>
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
#undef ASM_LINE_SEP
#define ASM_LINE_SEP !
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff3475331e3007db16d792b1e1489170b71308a1
commit ff3475331e3007db16d792b1e1489170b71308a1
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Apr 18 17:32:04 2009 +0000
2009-04-18 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getcontext.S: New file.
* sysdeps/unix/sysv/linux/mips/makecontext.S: New file.
* sysdeps/unix/sysv/linux/mips/setcontext.S: New file.
* sysdeps/unix/sysv/linux/mips/swapcontext.S: New file.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t):
Update comment.
* sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file.
* sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file.
* sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers):
Add ucontext_i.sym.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index e8a7a11..5887530 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,16 @@
+2009-04-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/getcontext.S: New file.
+ * sysdeps/unix/sysv/linux/mips/makecontext.S: New file.
+ * sysdeps/unix/sysv/linux/mips/setcontext.S: New file.
+ * sysdeps/unix/sysv/linux/mips/swapcontext.S: New file.
+ * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t):
+ Update comment.
+ * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file.
+ * sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file.
+ * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers):
+ Add ucontext_i.sym.
+
2009-04-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV,
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 110fccb..162f1b9 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -135,3 +135,7 @@ sysdep_routines += dl-static
sysdep-rtld-routines += dl-static
endif
endif
+
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
diff --git a/sysdeps/unix/sysv/linux/mips/getcontext.S b/sysdeps/unix/sysv/linux/mips/getcontext.S
new file mode 100644
index 0000000..1e77467
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getcontext.S
@@ -0,0 +1,149 @@
+/* Save current context.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#include <sys/asm.h>
+#include <sys/fpregdef.h>
+#include <sys/regdef.h>
+
+#include "ucontext_i.h"
+
+/* int getcontext (ucontext_t *ucp) */
+
+ .text
+LOCALSZ = 0
+MASK = 0x00000000
+#ifdef __PIC__
+LOCALSZ = 1 /* save gp */
+# if _MIPS_SIM != _ABIO32
+MASK = 0x10000000
+# endif
+#endif
+FRAMESZ = ((LOCALSZ * SZREG) + ALSZ) & ALMASK
+GPOFF = FRAMESZ - (1 * SZREG)
+
+NESTED (__getcontext, FRAMESZ, ra)
+ .mask MASK, 0
+ .fmask 0x00000000, 0
+
+#ifdef __PIC__
+ SETUP_GP
+
+ move a2, sp
+# define _SP a2
+
+# if _MIPS_SIM != _ABIO32
+ move a3, gp
+# define _GP a3
+# endif
+
+ PTR_ADDIU sp, -FRAMESZ
+ SETUP_GP64 (GPOFF, __getcontext)
+ SAVE_GP (GPOFF)
+
+#else /* ! __PIC__ */
+# define _SP sp
+# define _GP gp
+
+#endif /* ! __PIC__ */
+
+#ifdef PROF
+ .set noat
+ move AT, ra
+ jal _mcount
+ .set at
+#endif
+
+ /* Store a magic flag. */
+ li v1, 1
+ REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
+
+ REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
+#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
+ REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
+#endif
+ REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S ra, MCONTEXT_PC(a0)
+
+#ifdef __mips_hard_float
+# if _MIPS_SIM == _ABI64
+ s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
+
+# else /* _MIPS_SIM != _ABI64 */
+ s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
+
+# endif /* _MIPS_SIM != _ABI64 */
+
+ cfc1 v1, fcr31
+ sw v1, MCONTEXT_FPC_CSR(a0)
+#endif /* __mips_hard_float */
+
+/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
+ li a3, _NSIG8
+ PTR_ADDU a2, a0, UCONTEXT_SIGMASK
+ move a1, zero
+ li a0, SIG_BLOCK
+
+ li v0, SYS_ify (rt_sigprocmask)
+ syscall
+ bnez a3, 99f
+
+#ifdef __PIC__
+ RESTORE_GP64
+ PTR_ADDIU sp, FRAMESZ
+#endif
+ move v0, zero
+ jr ra
+
+99:
+#ifdef __PIC__
+ PTR_LA t9, JUMPTARGET (__syscall_error)
+ RESTORE_GP64
+ PTR_ADDIU sp, FRAMESZ
+ jr t9
+
+#else /* ! __PIC__ */
+
+ j JUMPTARGET (__syscall_error)
+#endif /* ! __PIC__ */
+PSEUDO_END (__getcontext)
+
+weak_alias (__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h
new file mode 100644
index 0000000..edf8d45
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h
@@ -0,0 +1,10 @@
+/* Linux kernel RT signal frame. */
+typedef struct kernel_rt_sigframe
+ {
+ uint32_t rs_ass[4];
+ uint32_t rs_code[2];
+ struct siginfo rs_info;
+ struct ucontext rs_uc;
+ uint32_t rs_altcode[8] __attribute__ ((__aligned__ (1 << 7)));
+ }
+kernel_rt_sigframe_t;
diff --git a/sysdeps/unix/sysv/linux/mips/makecontext.S b/sysdeps/unix/sysv/linux/mips/makecontext.S
new file mode 100644
index 0000000..cceee3f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/makecontext.S
@@ -0,0 +1,189 @@
+/* Modify saved context.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#include <sys/asm.h>
+#include <sys/fpregdef.h>
+#include <sys/regdef.h>
+
+#include "ucontext_i.h"
+
+/* int makecontext (ucontext_t *ucp, (void *func) (), int argc, ...) */
+
+ .text
+LOCALSZ = 0
+ARGSZ = 0
+MASK = 0x00000000
+#ifdef __PIC__
+LOCALSZ = 1 /* save gp */
+#endif
+#if _MIPS_SIM != _ABIO32
+ARGSZ = 5 /* save a3-a7 */
+# ifdef __PIC__
+MASK = 0x10000000
+# endif
+#endif
+FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
+GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
+#if _MIPS_SIM != _ABIO32
+A3OFF = FRAMESZ - (5 * SZREG) /* callee-allocated */
+A4OFF = FRAMESZ - (4 * SZREG)
+A5OFF = FRAMESZ - (3 * SZREG)
+A6OFF = FRAMESZ - (2 * SZREG)
+A7OFF = FRAMESZ - (1 * SZREG)
+NARGREGS = 8
+#else
+A3OFF = FRAMESZ + (3 * SZREG) /* caller-allocated */
+NARGREGS = 4
+#endif
+
+NESTED (__makecontext, FRAMESZ, ra)
+ .mask MASK, -(ARGSZ * SZREG)
+ .fmask 0x00000000, 0
+
+98:
+#ifdef __PIC__
+ SETUP_GP
+#endif
+
+ PTR_ADDIU sp, -FRAMESZ
+
+#ifdef __PIC__
+ SETUP_GP64 (GPOFF, __makecontext)
+ SAVE_GP (GPOFF)
+#endif
+
+#ifdef PROF
+ .set noat
+ move AT, ra
+ jal _mcount
+ .set at
+#endif
+
+ /* Store args to be passed. */
+ REG_S a3, A3OFF(sp)
+#if _MIPS_SIM != _ABIO32
+ REG_S a4, A4OFF(sp)
+ REG_S a5, A5OFF(sp)
+ REG_S a6, A6OFF(sp)
+ REG_S a7, A7OFF(sp)
+#endif
+
+ /* Store a magic flag. */
+ li v1, 1
+ REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
+
+ /* Set up the stack. */
+ PTR_L t0, STACK_SP(a0)
+ PTR_L t2, STACK_SIZE(a0)
+ PTR_ADDIU t1, sp, A3OFF
+ PTR_ADDU t0, t2
+ and t0, ALMASK
+ blez a2, 2f /* no arguments */
+
+ /* Store register arguments. */
+ PTR_ADDIU t2, a0, MCONTEXT_GREGS + 4 * SZREG
+ move t3, zero
+0:
+ addiu t3, 1
+ REG_L v1, (t1)
+ PTR_ADDIU t1, SZREG
+ REG_S v1, (t2)
+ PTR_ADDIU t2, SZREG
+ bgeu t3, a2, 2f /* all done */
+ bltu t3, NARGREGS, 0b /* next */
+
+ /* Make room for stack arguments. */
+ PTR_SUBU t2, a2, t3
+ PTR_SLL t2, 3
+ PTR_SUBU t0, t2
+ and t0, ALMASK
+
+ /* Store stack arguments. */
+ move t2, t0
+1:
+ addiu t3, 1
+ REG_L v1, (t1)
+ PTR_ADDIU t1, SZREG
+ REG_S v1, (t2)
+ PTR_ADDIU t2, SZREG
+ bltu t3, a2, 1b /* next */
+
+2:
+#if _MIPS_SIM == _ABIO32
+ /* Make room for a0-a3 storage. */
+ PTR_ADDIU t0, -(NARGSAVE * SZREG)
+#endif
+ PTR_L v1, UCONTEXT_LINK(a0)
+#ifdef __PIC__
+ PTR_ADDIU t9, 99f - 98b
+#else
+ PTR_LA t9, 99f
+#endif
+ REG_S t0, (29 * SZREG + MCONTEXT_GREGS)(a0) /* sp */
+ REG_S v1, (16 * SZREG + MCONTEXT_GREGS)(a0) /* s0 */
+#ifdef __PIC__
+ REG_S gp, (17 * SZREG + MCONTEXT_GREGS)(a0) /* s1 */
+#endif
+ REG_S t9, (31 * SZREG + MCONTEXT_GREGS)(a0) /* ra */
+ REG_S a1, MCONTEXT_PC(a0)
+
+#ifdef __PIC__
+ RESTORE_GP64
+ PTR_ADDIU sp, FRAMESZ
+#endif
+ jr ra
+
+99:
+#ifdef __PIC__
+ move gp, s1
+#endif
+ move a0, zero
+ beqz s0, 0f
+
+ /* setcontext (ucp) */
+ move a0, s0
+#ifdef __PIC__
+ PTR_LA t9, JUMPTARGET (__setcontext)
+ jalr t9
+# if _MIPS_SIM == _ABIO32
+ move gp, s1
+# endif
+#else
+ jal JUMPTARGET (__setcontext)
+#endif
+ move a0, v0
+
+0:
+ /* exit (a0) */
+#ifdef __PIC__
+ PTR_LA t9, HIDDEN_JUMPTARGET (exit)
+ jalr t9
+#else
+ jal HIDDEN_JUMPTARGET (exit)
+#endif
+
+ /* You don't exist, you won't feel anything. */
+1:
+ lb zero, (zero)
+ b 1b
+PSEUDO_END (__makecontext)
+
+weak_alias (__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/mips/setcontext.S b/sysdeps/unix/sysv/linux/mips/setcontext.S
new file mode 100644
index 0000000..186f3a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/setcontext.S
@@ -0,0 +1,192 @@
+/* Set current context.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#include <sys/asm.h>
+#include <sys/fpregdef.h>
+#include <sys/regdef.h>
+
+#include "ucontext_i.h"
+
+/* int setcontext (const ucontext_t *ucp) */
+
+ .text
+LOCALSZ = 0
+ARGSZ = 0
+MASK = 0x00000000
+#ifdef __PIC__
+LOCALSZ = 1 /* save gp */
+#endif
+#if _MIPS_SIM != _ABIO32
+ARGSZ = 1 /* save a0 */
+# ifdef __PIC__
+MASK = 0x10000000
+# endif
+#endif
+FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
+GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
+#if _MIPS_SIM != _ABIO32
+A0OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
+#else
+A0OFF = FRAMESZ + (0 * SZREG) /* caller-allocated */
+#endif
+
+NESTED (__setcontext, FRAMESZ, ra)
+ .mask MASK, -(ARGSZ * SZREG)
+ .fmask 0x00000000, 0
+
+#ifdef __PIC__
+ SETUP_GP
+#endif
+
+ PTR_ADDIU sp, -FRAMESZ
+
+#ifdef __PIC__
+ SETUP_GP64 (GPOFF, __setcontext)
+ SAVE_GP (GPOFF)
+#endif
+
+#ifdef PROF
+ .set noat
+ move AT, ra
+ jal _mcount
+ .set at
+#endif
+
+ /* Check for the magic flag. */
+ li v0, 1
+ REG_L v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
+ bne v0, v1, 98f
+
+ REG_S a0, A0OFF(sp)
+
+/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
+ li a3, _NSIG8
+ move a2, zero
+ PTR_ADDU a1, a0, UCONTEXT_SIGMASK
+ li a0, SIG_SETMASK
+
+ li v0, SYS_ify (rt_sigprocmask)
+ syscall
+ bnez a3, 99f
+
+ REG_L v0, A0OFF(sp)
+
+#ifdef __mips_hard_float
+# if _MIPS_SIM == _ABI64
+ l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
+
+# else /* _MIPS_SIM != _ABI64 */
+ l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
+
+# endif /* _MIPS_SIM != _ABI64 */
+
+ lw v1, MCONTEXT_FPC_CSR(v0)
+ ctc1 v1, fcr31
+#endif /* __mips_hard_float */
+
+ /* Note the contents of argument registers will be random
+ unless makecontext() has been called. */
+ REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
+#if _MIPS_SIM != _ABIO32
+ REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
+#endif
+
+ REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
+#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
+ REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
+#endif
+ REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L t9, MCONTEXT_PC(v0)
+
+ move v0, zero
+ jr t9
+
+98:
+ /* This is a context obtained from a signal handler.
+ Perform a full restore by pushing the context
+ passed onto a simulated signal frame on the stack
+ and call the signal return syscall as if a signal
+ handler exited normally. */
+ PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
+
+ /* Only ucontext is referred to from rt_sigreturn,
+ copy it. */
+ PTR_ADDIU t1, sp, RT_SIGFRAME_UCONTEXT
+ li t3, ((UCONTEXT_SIZE + SZREG - 1) / SZREG) - 1
+0:
+ REG_L t2, (a0)
+ PTR_ADDIU a0, SZREG
+ REG_S t2, (t1)
+ PTR_ADDIU t1, SZREG
+ .set noreorder
+ bgtz t3, 0b
+ addiu t3, -1
+ .set reorder
+
+/* rt_sigreturn () -- no arguments, sp points to struct rt_sigframe. */
+ li v0, SYS_ify (rt_sigreturn)
+ syscall
+
+ /* Restore the stack and fall through to the error
+ path. Successful rt_sigreturn never returns to
+ its calling place. */
+ PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
+99:
+#ifdef __PIC__
+ PTR_LA t9, JUMPTARGET (__syscall_error)
+ RESTORE_GP64
+ PTR_ADDIU sp, FRAMESZ
+ jr t9
+
+#else /* ! __PIC__ */
+
+ j JUMPTARGET (__syscall_error)
+#endif /* ! __PIC__ */
+PSEUDO_END (__setcontext)
+
+weak_alias (__setcontext, setcontext)
diff --git a/sysdeps/unix/sysv/linux/mips/swapcontext.S b/sysdeps/unix/sysv/linux/mips/swapcontext.S
new file mode 100644
index 0000000..b0b8417
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/swapcontext.S
@@ -0,0 +1,212 @@
+/* Save and set current context.
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#include <sys/asm.h>
+#include <sys/fpregdef.h>
+#include <sys/regdef.h>
+
+#include "ucontext_i.h"
+
+/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
+
+ .text
+LOCALSZ = 0
+ARGSZ = 0
+MASK = 0x00000000
+#ifdef __PIC__
+LOCALSZ = 1 /* save gp */
+#endif
+#if _MIPS_SIM != _ABIO32
+ARGSZ = 1 /* save a1 */
+# ifdef __PIC__
+MASK = 0x10000000
+# endif
+#endif
+FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
+GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
+#if _MIPS_SIM != _ABIO32
+A1OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
+#else
+A1OFF = FRAMESZ + (1 * SZREG) /* caller-allocated */
+#endif
+
+NESTED (__swapcontext, FRAMESZ, ra)
+ .mask MASK, -(ARGSZ * SZREG)
+ .fmask 0x00000000, 0
+
+#ifdef __PIC__
+ SETUP_GP
+
+ move a2, sp
+# define _SP a2
+
+# if _MIPS_SIM != _ABIO32
+ move a3, gp
+# define _GP a3
+# endif
+
+ PTR_ADDIU sp, -FRAMESZ
+ SETUP_GP64 (GPOFF, __swapcontext)
+ SAVE_GP (GPOFF)
+
+#else /* ! __PIC__ */
+# define _SP sp
+# define _GP gp
+
+#endif /* ! __PIC__ */
+
+#ifdef PROF
+ .set noat
+ move AT, ra
+ jal _mcount
+ .set at
+#endif
+
+ /* Store a magic flag. */
+ li v1, 1
+ REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
+
+ REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
+#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
+ REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
+#endif
+ REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
+ REG_S ra, MCONTEXT_PC(a0)
+
+#ifdef __mips_hard_float
+# if _MIPS_SIM == _ABI64
+ s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
+
+# else /* _MIPS_SIM != _ABI64 */
+ s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
+ s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
+
+# endif /* _MIPS_SIM != _ABI64 */
+
+ cfc1 v1, fcr31
+ sw v1, MCONTEXT_FPC_CSR(a0)
+#endif /* __mips_hard_float */
+
+ REG_S a1, A1OFF(sp)
+
+/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
+ li a3, _NSIG8
+ PTR_ADDU a2, a0, UCONTEXT_SIGMASK
+ PTR_ADDU a1, a1, UCONTEXT_SIGMASK
+ li a0, SIG_SETMASK
+
+ li v0, SYS_ify (rt_sigprocmask)
+ syscall
+ bnez a3, 99f
+
+ REG_L v0, A1OFF(sp)
+
+#ifdef __mips_hard_float
+# if _MIPS_SIM == _ABI64
+ l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
+
+# else /* _MIPS_SIM != _ABI64 */
+ l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
+ l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
+
+# endif /* _MIPS_SIM != _ABI64 */
+
+ lw v1, MCONTEXT_FPC_CSR(v0)
+ ctc1 v1, fcr31
+#endif /* __mips_hard_float */
+
+ /* Note the contents of argument registers will be random
+ unless makecontext() has been called. */
+ REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
+#if _MIPS_SIM != _ABIO32
+ REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
+#endif
+
+ REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
+#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
+ REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
+#endif
+ REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
+ REG_L t9, MCONTEXT_PC(v0)
+
+ move v0, zero
+ jr t9
+
+99:
+#ifdef __PIC__
+ PTR_LA t9, JUMPTARGET (__syscall_error)
+ RESTORE_GP64
+ PTR_ADDIU sp, FRAMESZ
+ jr t9
+
+#else /* ! __PIC__ */
+
+ j JUMPTARGET (__syscall_error)
+#endif /* ! __PIC__ */
+PSEUDO_END (__swapcontext)
+
+weak_alias (__swapcontext, swapcontext)
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index ac496f3..251f0c8 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
+/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006, 2009 Free Software
Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -56,12 +56,9 @@ typedef struct fpregset {
#if _MIPS_SIM == _ABIO32
/* Earlier versions of glibc for mips had an entirely different
definition of mcontext_t, that didn't even resemble the
- corresponding kernel data structure. Since all legitimate uses of
- ucontext_t in glibc mustn't have accessed anything beyond
- uc_mcontext and, even then, taking a pointer to it, casting it to
- sigcontext_t, and accessing it as such, which is what it has always
- been, this can still be rectified. Fortunately, makecontext,
- [gs]etcontext et all have never been implemented. */
+ corresponding kernel data structure. Fortunately, makecontext,
+ [gs]etcontext et all were not implemented back then, so this can
+ still be rectified. */
typedef struct
{
unsigned int regmask;
diff --git a/sysdeps/unix/sysv/linux/mips/ucontext_i.sym b/sysdeps/unix/sysv/linux/mips/ucontext_i.sym
new file mode 100644
index 0000000..f14b886
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ucontext_i.sym
@@ -0,0 +1,52 @@
+#include <inttypes.h>
+#include <signal.h>
+#include <stddef.h>
+#include <sys/ucontext.h>
+
+#include <kernel_rt_sigframe.h>
+
+-- Constants used by the rt_sigprocmask call.
+
+SIG_BLOCK
+SIG_SETMASK
+
+_NSIG8 (_NSIG / 8)
+
+-- Offsets of the fields in the kernel rt_sigframe_t structure.
+#define rt_sigframe(member) offsetof (kernel_rt_sigframe_t, member)
+
+RT_SIGFRAME_UCONTEXT rt_sigframe (rs_uc)
+
+RT_SIGFRAME_SIZE sizeof (kernel_rt_sigframe_t)
+
+-- Offsets of the fields in the ucontext_t structure.
+#define ucontext(member) offsetof (ucontext_t, member)
+#define stack(member) ucontext (uc_stack.member)
+#define mcontext(member) ucontext (uc_mcontext.member)
+
+UCONTEXT_FLAGS ucontext (uc_flags)
+UCONTEXT_LINK ucontext (uc_link)
+UCONTEXT_STACK ucontext (uc_stack)
+UCONTEXT_MCONTEXT ucontext (uc_mcontext)
+UCONTEXT_SIGMASK ucontext (uc_sigmask)
+
+STACK_SP stack (ss_sp)
+STACK_SIZE stack (ss_size)
+STACK_FLAGS stack (ss_flags)
+
+MCONTEXT_GREGS mcontext (gregs)
+MCONTEXT_FPREGS mcontext (fpregs)
+MCONTEXT_MDHI mcontext (mdhi)
+MCONTEXT_HI1 mcontext (hi1)
+MCONTEXT_HI2 mcontext (hi2)
+MCONTEXT_HI3 mcontext (hi3)
+MCONTEXT_MDLO mcontext (mdlo)
+MCONTEXT_LO1 mcontext (lo1)
+MCONTEXT_LO2 mcontext (lo2)
+MCONTEXT_LO3 mcontext (lo3)
+MCONTEXT_PC mcontext (pc)
+MCONTEXT_FPC_CSR mcontext (fpc_csr)
+MCONTEXT_USED_MATH mcontext (used_math)
+MCONTEXT_DSP mcontext (dsp)
+
+UCONTEXT_SIZE sizeof (ucontext_t)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19d6bdd79a7b35f36fda4b9b0e5cd860d4f5d656
commit 19d6bdd79a7b35f36fda4b9b0e5cd860d4f5d656
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Apr 18 16:26:00 2009 +0000
* sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV,
__ASSUME_PWRITEV): Undefine.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index b630578..ef7d08d 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Undefine.
+
2009-03-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 9a6d23d..d897562 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -39,3 +39,5 @@
/* These syscalls are not implemented yet for m68k. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
+#undef __ASSUME_PREADV
+#undef __ASSUME_PWRITEV
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80c0ce1cac739218fa077672903267fdebe34c7d
commit 80c0ce1cac739218fa077672903267fdebe34c7d
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Apr 18 14:08:41 2009 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
__ASSUME_PWRITEV): Undefine.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index d554bfb..779ef2d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Undefine.
+
2009-03-16 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h.
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index ea439d5..b33c968 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -56,3 +56,5 @@
/* These syscalls are not implemented yet for ARM. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
+#undef __ASSUME_PREADV
+#undef __ASSUME_PWRITEV
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57d0274fe9028205f2431ab323f95a5021601a74
commit 57d0274fe9028205f2431ab323f95a5021601a74
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sat Apr 18 14:08:18 2009 +0000
* sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV,
__ASSUME_PWRITEV): Don't define here.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 4e6ce79..e8a7a11 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-04-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Don't define here.
+
2009-04-15 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/mips/sys/fpregdef.h: Update for new ABIs.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index 1cdf19e..f479b60 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -31,10 +31,4 @@
# define __ASSUME_FCNTL64 1
#endif
-/* Support for preadv and pwritev was added in 2.6.30. */
-#if __LINUX_KERNEL_VERSION >= 0x02061e
-# define __ASSUME_PREADV 1
-# define __ASSUME_PWRITEV 1
-#endif
-
#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6db53cd54801d6c1b018d1046fd848739643c5e4
commit 6db53cd54801d6c1b018d1046fd848739643c5e4
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Apr 15 20:22:41 2009 +0000
2009-04-15 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/mips/sys/fpregdef.h: Update for new ABIs.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 6f5e4f7..4e6ce79 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2009-04-15 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * sysdeps/mips/sys/fpregdef.h: Update for new ABIs.
+
2009-04-09 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol
diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h
index 3781152..d6c72bb 100644
--- a/sysdeps/mips/sys/fpregdef.h
+++ b/sysdeps/mips/sys/fpregdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,19 +19,52 @@
#ifndef _SYS_FPREGDEF_H
#define _SYS_FPREGDEF_H
-/*
- * These definitions only cover the R3000-ish 16/32 register model.
- * But we're trying to be R3000 friendly anyway ...
- */
-#define fv0 $f0 /* return value */
-#define fv0f $f1
+#include <sgidefs.h>
+
+/* Commonalities first, individualities next... */
+
+#define fv0 $f0 /* return value */
#define fv1 $f2
+
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
+#define fs0 $f20 /* callee saved */
+#define fs1 $f22
+#define fs2 $f24
+#define fs3 $f26
+#define fs4 $f28
+#define fs5 $f30
+#endif /* _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 */
+
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
+#define fa0 $f12 /* argument registers */
+#define fa1 $f13
+#define fa2 $f14
+#define fa3 $f15
+#define fa4 $f16
+#define fa5 $f17
+#define fa6 $f18
+#define fa7 $f19
+
+#define ft0 $f4 /* caller saved */
+#define ft1 $f5
+#define ft2 $f6
+#define ft3 $f7
+#define ft4 $f8
+#define ft5 $f9
+#define ft6 $f10
+#define ft7 $f11
+#endif /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
+
+#if _MIPS_SIM == _ABIO32
+#define fv0f $f1 /* return value, high part */
#define fv1f $f3
-#define fa0 $f12 /* argument registers */
+
+#define fa0 $f12 /* argument registers */
#define fa0f $f13
#define fa1 $f14
#define fa1f $f15
-#define ft0 $f4 /* caller saved */
+
+#define ft0 $f4 /* caller saved */
#define ft0f $f5
#define ft1 $f6
#define ft1f $f7
@@ -43,19 +76,44 @@
#define ft4f $f17
#define ft5 $f18
#define ft5f $f19
-#define fs0 $f20 /* callee saved */
-#define fs0f $f21
-#define fs1 $f22
+
+#define fs0f $f21 /* callee saved, high part */
#define fs1f $f23
-#define fs2 $f24
#define fs2f $f25
-#define fs3 $f26
#define fs3f $f27
-#define fs4 $f28
#define fs4f $f29
-#define fs5 $f30
#define fs5f $f31
+#endif /* _MIPS_SIM == _ABIO32 */
+
+#if _MIPS_SIM == _ABI64
+#define ft8 $f20 /* caller saved */
+#define ft9 $f21
+#define ft10 $f22
+#define ft11 $f23
+#define ft12 $f1
+#define ft13 $f3
+
+#define fs0 $f24 /* callee saved */
+#define fs1 $f25
+#define fs2 $f26
+#define fs3 $f27
+#define fs4 $f28
+#define fs5 $f29
+#define fs6 $f30
+#define fs7 $f31
+#endif /* _MIPS_SIM == _ABI64 */
+
+#if _MIPS_SIM == _ABIN32
+#define ft8 $f21 /* caller saved */
+#define ft9 $f23
+#define ft10 $f25
+#define ft11 $f27
+#define ft12 $f29
+#define ft13 $f31
+#define ft14 $f1
+#define ft15 $f3
+#endif /* _MIPS_SIM == _ABIN32 */
-#define fcr31 $31 /* FPU status register */
+#define fcr31 $31 /* FPU status register */
#endif /* sys/fpregdef.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70fdbfd9568cadea8ef14f31c5e4a5aaf7e8e18e
commit 70fdbfd9568cadea8ef14f31c5e4a5aaf7e8e18e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Apr 9 22:14:47 2009 +0000
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol
numbers.
* sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE):
Define.
* sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for
preadv and pwritev.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 6f4b038..6f5e4f7 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2009-04-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Add missing protocol
+ numbers.
+ * sysdeps/unix/sysv/linux/mips/sys/eventfd.h (EFD_SEMAPHORE):
+ Define.
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h: Add entries for
+ preadv and pwritev.
+
2009-03-18 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index dad2c2d..60db515 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -95,15 +95,20 @@ enum __socket_type
#define PF_ASH 18 /* Ash. */
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_RDS 21 /* RDS sockets. */
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_LLC 26 /* Linux LLC. */
+#define PF_CAN 29 /* Controller Area Network. */
+#define PF_TIPC 30 /* TIPC sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
#define PF_ISDN 34 /* mISDN sockets. */
-#define PF_MAX 35 /* For now.. */
+#define PF_PHONET 35 /* Phonet sockets. */
+#define PF_MAX 36 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -130,14 +135,19 @@ enum __socket_type
#define AF_ASH PF_ASH
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
+#define AF_RDS PF_RDS
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_LLC PF_LLC
+#define AF_CAN PF_CAN
+#define AF_TIPC PF_TIPC
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
#define AF_ISDN PF_ISDN
+#define AF_PHONET PF_PHONET
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index f479b60..1cdf19e 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -31,4 +31,10 @@
# define __ASSUME_FCNTL64 1
#endif
+/* Support for preadv and pwritev was added in 2.6.30. */
+#if __LINUX_KERNEL_VERSION >= 0x02061e
+# define __ASSUME_PREADV 1
+# define __ASSUME_PWRITEV 1
+#endif
+
#include_next <kernel-features.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
index 8b55ba6..b30d09a 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
@@ -28,6 +28,8 @@ typedef uint64_t eventfd_t;
/* Flags for signalfd. */
enum
{
+ EFD_SEMAPHORE = 1,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
EFD_CLOEXEC = 02000000,
#define EFD_CLOEXEC EFD_CLOEXEC
EFD_NONBLOCK = 0200
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d69fd0cbd2ec67b2dc4ba1e23bac6b9ed6b947c5
commit d69fd0cbd2ec67b2dc4ba1e23bac6b9ed6b947c5
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 18 14:38:51 2009 +0000
2009-03-18 Maciej W. Rozycki <macro@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index d4a38dc..6f4b038 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-03-18 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Use the Elf32_Ehdr type to check for EF_MIPS_ABI2 in the flags.
+
2009-03-18 Zhang Le <r0bertz@gentoo.org>
[BZ #7074]
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
index 99fbaac..547362f 100644
--- a/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002, 2003, 2005, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Alexandre Oliva <aoliva@redhat.com>
Based on work ../x86_64/readelflib.c,
@@ -39,11 +40,13 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
{
+ Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+
ret = process_elf32_file (file_name, lib, flag, osversion, soname,
file_contents, file_length);
/* n32 libraries are always libc.so.6+. */
- if (!ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
+ if (!ret && (elf32_header->e_flags & EF_MIPS_ABI2) != 0)
*flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
}
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0262d0c47c55109b0ea10239eedc2695f57ad40e
commit 0262d0c47c55109b0ea10239eedc2695f57ad40e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 18 14:31:30 2009 +0000
2009-03-18 Zhang Le <r0bertz@gentoo.org>
[BZ #7074]
* sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
Fix the condition used to annotate n32 objects.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index db31315..d4a38dc 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2009-03-18 Zhang Le <r0bertz@gentoo.org>
+
+ [BZ #7074]
+ * sysdeps/unix/sysv/linux/mips/readelflib.c (process_elf_file):
+ Fix the condition used to annotate n32 objects.
+
2009-03-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
index baa92fe..99fbaac 100644
--- a/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -43,7 +43,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
file_contents, file_length);
/* n32 libraries are always libc.so.6+. */
- if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
+ if (!ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
*flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
}
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=edb1d6ef2fbfbc24fcf921d820b4d6c083a66dcb
commit edb1d6ef2fbfbc24fcf921d820b4d6c083a66dcb
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 17 17:41:36 2009 +0000
* sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 32d01cf..b630578 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-03-17 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/getsysstats.c (GET_NPROCS_PARSER):
+ Change parameters and use next_line.
+
2009-03-15 Joseph Myers <joseph@codesourcery.com>
* sysdeps/m68k/bits/link.h: Uglify function parameter names.
diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c
index 23207e9..5113720 100644
--- a/sysdeps/unix/sysv/linux/m68k/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/m68k/getsysstats.c
@@ -1,5 +1,5 @@
/* Determine various system internal values, Linux/m68k version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>
@@ -20,7 +20,7 @@
/* We need to define a special parser for /proc/cpuinfo. */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
do \
{ \
(RESULT) = 0; \
@@ -28,8 +28,9 @@
"CPU:". We don't have to fear extremely long lines since \
the kernel will not generate them. 8192 bytes are really \
enough. */ \
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
- if (strncmp (BUFFER, "CPU:", 4) == 0) \
+ char *l; \
+ while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
+ if (strncmp (l, "CPU:", 4) == 0) \
++(RESULT); \
} \
while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c8c18106e3f50e86804469fdbb4eb2f6f9fdac7
commit 4c8c18106e3f50e86804469fdbb4eb2f6f9fdac7
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 17 15:52:15 2009 +0000
* sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
Change parameters and use next_line.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index ee9c835..db31315 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2009-03-17 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/getsysstats.c (GET_NPROCS_PARSER):
+ Change parameters and use next_line.
+
+2009-03-17 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c
index 9b521ac..8053033 100644
--- a/sysdeps/unix/sysv/linux/mips/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c
@@ -1,5 +1,5 @@
/* Determine various system internal values, Linux/MIPS version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
/* We need to define a special parser for /proc/cpuinfo. */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+#define GET_NPROCS_PARSER(FD, BUFFER, CP, RE, BUFFER_END, RESULT) \
do \
{ \
(RESULT) = 0; \
@@ -27,8 +27,9 @@
"cpu model". We don't have to fear extremely long lines since \
the kernel will not generate them. 8192 bytes are really \
enough. */ \
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
- if (strncmp (BUFFER, "cpu model", 9) == 0) \
+ char *l; \
+ while ((l = next_line (FD, BUFFER, &CP, &RE, BUFFER_END)) != NULL) \
+ if (strncmp (l, "cpu model", 9) == 0) \
++(RESULT); \
} \
while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=340f79762887912b27b6cd56de5c6fa1f2fbfcef
commit 340f79762887912b27b6cd56de5c6fa1f2fbfcef
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 17 15:49:10 2009 +0000
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 96d2f46..ee9c835 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2009-03-17 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include errno.h.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
+
2009-03-15 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/bits/link.h: Uglify function parameter names.
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index c3d59dd..753f98a 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005,
+ 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +25,11 @@
#include <tls.h>
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index b2bbbb0..1513306 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -25,6 +25,11 @@
#include <tls.h>
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 8862607..af12bbd 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -25,6 +25,11 @@
#include <tls.h>
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26ed7fb1ffd871b37624d7247961b022d5f148bc
commit 26ed7fb1ffd871b37624d7247961b022d5f148bc
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 17 12:32:06 2009 +0000
2009-03-16 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index a2915fd..d554bfb 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2009-03-16 Khem Raj <raj.khem@gmail.com>
+
+ * sysdeps/unix/sysv/linux/arm/sysdep.h: Include errno.h.
+
2009-03-15 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/bits/link.h: Uglify function parameter names.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 1df63f6..3d7fafc 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -30,6 +30,11 @@
#include <tls.h>
+/* In order to get __set_errno() definition in INLINE_SYSCALL. */
+#ifndef __ASSEMBLER__
+#include <errno.h>
+#endif
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd855f39f173c9972b6e1892c03378738066ebd4
commit bd855f39f173c9972b6e1892c03378738066ebd4
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sun Mar 15 18:42:52 2009 +0000
* sysdeps/m68k/bits/link.h: Uglify function parameter names.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index d199e36..32d01cf 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,7 @@
+2009-03-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/m68k/bits/link.h: Uglify function parameter names.
+
2009-03-04 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare
diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h
index 9d0a945..ce4b5e0 100644
--- a/sysdeps/m68k/bits/link.h
+++ b/sysdeps/m68k/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,6 +53,6 @@ extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
uintptr_t *__defcook,
const La_m68k_regs *__inregs,
La_m68k_retval *__outregs,
- const char *symname);
+ const char *__symname);
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad32d65a9f664c7b21c91a71b653a311effa06f2
commit ad32d65a9f664c7b21c91a71b653a311effa06f2
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sun Mar 15 16:54:26 2009 +0000
* sysdeps/mips/bits/link.h: Uglify function parameter names.
* sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index fa78e91..96d2f46 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2009-03-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/bits/link.h: Uglify function parameter names.
+ * sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.
+
2009-03-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare
diff --git a/sysdeps/mips/bits/link.h b/sysdeps/mips/bits/link.h
index 3d77a4c..85e69cd 100644
--- a/sysdeps/mips/bits/link.h
+++ b/sysdeps/mips/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -79,7 +79,7 @@ extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __nd
uintptr_t *__defcook,
const La_mips_32_regs *__inregs,
La_mips_32_retval *__outregs,
- const char *symname);
+ const char *__symname);
#elif _MIPS_SIM == _ABIN32
@@ -95,7 +95,7 @@ extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __nd
uintptr_t *__defcook,
const La_mips_64_regs *__inregs,
La_mips_64_retval *__outregs,
- const char *symname);
+ const char *__symname);
#else
@@ -111,7 +111,7 @@ extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __nd
uintptr_t *__defcook,
const La_mips_64_regs *__inregs,
La_mips_64_retval *__outregs,
- const char *symname);
+ const char *__symname);
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
index a93e1fb..3d9f914 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,13 +29,13 @@
__BEGIN_DECLS
#ifdef __USE_MISC
-extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
+extern int cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW;
#endif
-extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
+extern int __cachectl (void *__addr, __const int __nbytes, __const int __op) __THROW;
#ifdef __USE_MISC
-extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
+extern int cacheflush (void *__addr, __const int __nbytes, __const int __op) __THROW;
#endif
-extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
+extern int _flush_cache (char *__addr, __const int __nbytes, __const int __op) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
index fa34c8c..8b55ba6 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@ extern int eventfd (int __count, int __flags) __THROW;
extern int eventfd_read (int __fd, eventfd_t *__value);
/* Increment event counter. */
-extern int eventfd_write (int __fd, eventfd_t value);
+extern int eventfd_write (int __fd, eventfd_t __value);
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
index 0677caf..aefc52e 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2001, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@
__BEGIN_DECLS
-extern int sysmips (__const int cmd, ...) __THROW;
+extern int sysmips (__const int __cmd, ...) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index b370ee4..c5c8055 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2007, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
@@ -25,7 +26,7 @@
__BEGIN_DECLS
-extern int _test_and_set (int *p, int v) __THROW;
+extern int _test_and_set (int *__p, int __v) __THROW;
#ifdef __USE_EXTERN_INLINES
@@ -34,9 +35,9 @@ extern int _test_and_set (int *p, int v) __THROW;
# endif
_EXTERN_INLINE int
-__NTH (_test_and_set (int *p, int v))
+__NTH (_test_and_set (int *__p, int __v))
{
- int r, t;
+ int __r, __t;
__asm__ __volatile__
("/* Inline test and set */\n"
@@ -55,11 +56,11 @@ __NTH (_test_and_set (int *p, int v))
".set pop\n\t"
"2:\n\t"
"/* End test and set */"
- : "=&r" (r), "=&r" (t), "=m" (*p)
- : "m" (*p), "r" (v)
+ : "=&r" (__r), "=&r" (__t), "=m" (*__p)
+ : "m" (*__p), "r" (__v)
: "memory");
- return r;
+ return __r;
}
#endif /* __USE_EXTERN_INLINES */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=440eb79d6ce9ac8777bbd8307691cb90897444a5
commit 440eb79d6ce9ac8777bbd8307691cb90897444a5
Author: Joseph Myers <joseph@codesourcery.com>
Date: Sun Mar 15 16:53:46 2009 +0000
* sysdeps/arm/bits/link.h: Uglify function parameter names.
* sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise.
* sysdeps/arm/eabi/bits/setjmp.h: Uglify attribute name.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 105ef7d..a2915fd 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2009-03-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/bits/link.h: Uglify function parameter names.
+ * sysdeps/unix/sysv/linux/arm/sys/io.h: Likewise.
+ * sysdeps/arm/eabi/bits/setjmp.h: Uglify attribute name.
+
2009-03-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare
diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h
index 8dbd2c7..44e4eda 100644
--- a/sysdeps/arm/bits/link.h
+++ b/sysdeps/arm/bits/link.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -61,6 +61,6 @@ extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
uintptr_t *__defcook,
const La_arm_regs *__inregs,
La_arm_retval *__outregs,
- const char *symname);
+ const char *__symname);
__END_DECLS
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
index dd7679d..16c560d 100644
--- a/sysdeps/arm/eabi/bits/setjmp.h
+++ b/sysdeps/arm/eabi/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
recommends that the buffer contain 64 words. The first 28 words
are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
that d8-15 require 17 words, due to the use of fstmx.) */
-typedef int __jmp_buf[64] __attribute__((aligned (8)));
+typedef int __jmp_buf[64] __attribute__((__aligned__ (8)));
#endif
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h
index 6863990..0712a47 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/io.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/io.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998, 1999, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,13 +35,13 @@ extern int ioperm (unsigned long int __from, unsigned long int __num,
extern int iopl (int __level) __THROW;
/* The functions that actually perform reads and writes. */
-extern unsigned char inb (unsigned long int port) __THROW;
-extern unsigned short int inw (unsigned long int port) __THROW;
-extern unsigned long int inl (unsigned long int port) __THROW;
+extern unsigned char inb (unsigned long int __port) __THROW;
+extern unsigned short int inw (unsigned long int __port) __THROW;
+extern unsigned long int inl (unsigned long int __port) __THROW;
-extern void outb (unsigned char value, unsigned long int port) __THROW;
-extern void outw (unsigned short value, unsigned long int port) __THROW;
-extern void outl (unsigned long value, unsigned long int port) __THROW;
+extern void outb (unsigned char __value, unsigned long int __port) __THROW;
+extern void outw (unsigned short __value, unsigned long int __port) __THROW;
+extern void outl (unsigned long __value, unsigned long int __port) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73ea734a9f1aaebc843353a20ddd51c944204633
commit 73ea734a9f1aaebc843353a20ddd51c944204633
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 4 22:49:21 2009 +0000
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare
fallocate{,64}.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index f6af26a..d199e36 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-03-04 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Declare
+ fallocate{,64}.
+
2009-02-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 203d5a1..1e396dc 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -234,6 +234,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
+/* Reserve storage for the data of the file associated with FD. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
+ __off_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93311332ba2a6bdb77326af3a83962172a207b31
commit 93311332ba2a6bdb77326af3a83962172a207b31
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 3 23:19:19 2009 +0000
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare
fallocate{,64}.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index d3d575a..fa78e91 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-03-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Declare
+ fallocate{,64}.
+
2009-02-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index e8107d7..ef84e96 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -248,6 +248,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
+/* Reserve storage for the data of the file associated with FD. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
+ __off_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae99295b0505317d1e3e7f11595ad2fab268f350
commit ae99295b0505317d1e3e7f11595ad2fab268f350
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 3 23:18:56 2009 +0000
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare
fallocate{,64}.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 864fd57..105ef7d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-03-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Declare
+ fallocate{,64}.
+
2009-02-13 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 10d11f2..277c97a 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -235,6 +235,23 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
+/* Reserve storage for the data of the file associated with FD. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off_t __offset,
+ __off_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9dcb49b6258c355c0d3a3951191f3f7973d64858
commit 9dcb49b6258c355c0d3a3951191f3f7973d64858
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Feb 27 13:16:51 2009 +0000
* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and
UTIME_OMIT only with __USE_ATFILE.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index c399a48..f6af26a 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2009-02-26 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Protect UTIME_NOW and
+ UTIME_OMIT only with __USE_ATFILE.
+
2008-08-10 Joseph Myers <joseph@codesourcery.com>
* sysdeps/m68k/bits/byteswap.h: Allow inclusion from <endian.h>.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index 6b69240..8d18d6d 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -163,8 +163,7 @@ struct stat64
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-#if defined __USE_ATFILE || defined __USE_GNU
-/* XXX This will change to the macro for the next 2008 POSIX revision. */
+#ifdef __USE_ATFILE
# define UTIME_NOW ((1l << 30) - 1l)
# define UTIME_OMIT ((1l << 30) - 2l)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e3804efbfcf4a7279d543181c0a63ff73f5f3c7
commit 2e3804efbfcf4a7279d543181c0a63ff73f5f3c7
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Feb 26 23:25:24 2009 +0000
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and
UTIME_OMIT only with __USE_ATFILE.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index a52748a..d3d575a 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-02-26 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/stat.h: Protect UTIME_NOW and
+ UTIME_OMIT only with __USE_ATFILE.
+
2009-02-13 Joseph Myers <joseph@codesourcery.com>
[BZ #7040]
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 4e0e30f..af04251 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,5 +1,5 @@
/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
- 2007 Free Software Foundation, Inc.
+ 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -254,8 +254,7 @@ struct stat64
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-#if defined __USE_ATFILE || defined __USE_GNU
-/* XXX This will change to the macro for the next 2008 POSIX revision. */
+#ifdef __USE_ATFILE
# define UTIME_NOW ((1l << 30) - 1l)
# define UTIME_OMIT ((1l << 30) - 2l)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f5d2fa8aa2f0d3d23780a769fe85f4f4fa73c2e
commit 6f5d2fa8aa2f0d3d23780a769fe85f4f4fa73c2e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Feb 26 21:36:13 2009 +0000
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
Adjust comment. Sort macros alphabetically. Remove old
lock comments.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 538837c..b673000 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,11 @@
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
+ Adjust comment. Sort macros alphabetically. Remove old
+ lock comments.
+
+2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
+
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c:
Update from nptl/sysdeps/pthread/unwind-forcedunwind.c
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c:
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index 62fc80c..d6eb975 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,43 +21,30 @@
/* Linuxthread type sizes (bytes):
sizeof(pthread_attr_t) = 0x24 (36)
- sizeof(pthread_mutex_t) = 0x30 (48)
- sizeof(pthread_mutexattr_t) = 0x4 (4)
+ sizeof(pthread_barrier_t) = 0x30 (48)
+ sizeof(pthread_barrierattr_t) = 0x4 (4)
sizeof(pthread_cond_t) = 0x30 (48)
- = Expanded to 64 bytes in NPTL.
- sizeof(pthread_cond_compat_t) = 0xc (12)
- = Did not exist in Linuxthreads.
sizeof(pthread_condattr_t) = 0x4 (4)
+ sizeof(pthread_mutex_t) = 0x30 (48)
+ sizeof(pthread_mutexattr_t) = 0x4 (4)
sizeof(pthread_rwlock_t) = 0x40 (64)
sizeof(pthread_rwlockattr_t) = 0x8 (8)
- sizeof(pthread_barrier_t) = 0x30 (48)
- sizeof(pthread_barrierattr_t) = 0x4 (4) */
+ sizeof(pthread_spinlock_t) = 0x10 (16) */
#define __SIZEOF_PTHREAD_ATTR_T 36
-#define __SIZEOF_PTHREAD_MUTEX_T 48
-#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_BARRIER_T 48
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#define __SIZEOF_PTHREAD_COND_T 64
-#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_MUTEX_T 48
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
#define __SIZEOF_PTHREAD_RWLOCK_T 64
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
-#define __SIZEOF_PTHREAD_BARRIER_T 48
-#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
/* Thread identifiers. The structure of the attribute type is not
exposed on purpose. */
typedef unsigned long int pthread_t;
-/* Our old basic lock type, listed here for posterity.
- We needed self-aligning locks for linuxthreads LDCW
- implementation. For NPTL we use LWS Compare and
- Exchange to implement primitives. */
-#if 0
-typedef volatile struct {
- int lock[4];
-} __attribute__ ((aligned(16))) __atomic_lock_t;
-#endif
-
typedef union
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ff04e6454adeb1887332341f3d6868db45d1dda
commit 8ff04e6454adeb1887332341f3d6868db45d1dda
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Feb 26 21:29:22 2009 +0000
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c:
Update from nptl/sysdeps/pthread/unwind-forcedunwind.c
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c:
Update from nptl/sysdeps/pthread/unwind-resume.c
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e99d768..538837c 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,12 @@
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c:
+ Update from nptl/sysdeps/pthread/unwind-forcedunwind.c
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c:
+ Update from nptl/sysdeps/pthread/unwind-resume.c
+
+2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
+
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME,
and FUTEX_BITSET_MATCH_ANY.
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
index cea5d3b..e0eef90 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
@@ -20,8 +21,7 @@
#include <stdio.h>
#include <unwind.h>
#include <pthreadP.h>
-
-#define LIBGCC_S_SO "libgcc_s.so.4"
+#include <sysdep.h>
static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
@@ -32,15 +32,16 @@ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
-#ifndef LIBGCC_S_SO
-#define LIBGCC_S_SO "libgcc_s.so.1"
-#endif
+#define LIBGCC_S_SO "libgcc_s.so.4"
void
__attribute_noinline__
pthread_cancel_init (void)
{
- void *resume, *personality, *forcedunwind, *getcfa;
+ void *resume;
+ void *personality;
+ void *forcedunwind;
+ void *getcfa;
void *handle;
if (__builtin_expect (libgcc_s_handle != NULL, 1))
@@ -62,13 +63,17 @@ pthread_cancel_init (void)
|| ARCH_CANCEL_INIT (handle)
#endif
)
- __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n");
+ __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
+ PTR_MANGLE (resume);
libgcc_s_resume = resume;
+ PTR_MANGLE (personality);
libgcc_s_personality = personality;
+ PTR_MANGLE (forcedunwind);
libgcc_s_forcedunwind = forcedunwind;
+ PTR_MANGLE (getcfa);
libgcc_s_getcfa = getcfa;
- /* Make sure libgcc_s_getcfa is written last. Otherwise,
+ /* Make sure libgcc_s_handle is written last. Otherwise,
pthread_cancel_init might return early even when the pointer the
caller is interested in is not initialized yet. */
atomic_write_barrier ();
@@ -90,10 +95,12 @@ __unwind_freeres (void)
void
_Unwind_Resume (struct _Unwind_Exception *exc)
{
- if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
- libgcc_s_resume (exc);
+ void (*resume) (struct _Unwind_Exception *exc) = libgcc_s_resume;
+ PTR_DEMANGLE (resume);
+ resume (exc);
}
_Unwind_Reason_Code
@@ -102,28 +109,37 @@ __gcc_personality_v0 (int version, _Unwind_Action actions,
struct _Unwind_Exception *ue_header,
struct _Unwind_Context *context)
{
- if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
- return libgcc_s_personality (version, actions, exception_class,
- ue_header, context);
+ _Unwind_Reason_Code (*personality)
+ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
+ struct _Unwind_Context *) = libgcc_s_personality;
+ PTR_DEMANGLE (personality);
+ return personality (version, actions, exception_class, ue_header, context);
}
_Unwind_Reason_Code
_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
void *stop_argument)
{
- if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
+ if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
- return libgcc_s_forcedunwind (exc, stop, stop_argument);
+ _Unwind_Reason_Code (*forcedunwind)
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *)
+ = libgcc_s_forcedunwind;
+ PTR_DEMANGLE (forcedunwind);
+ return forcedunwind (exc, stop, stop_argument);
}
_Unwind_Word
_Unwind_GetCFA (struct _Unwind_Context *context)
{
- if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
+ if (__builtin_expect (libgcc_s_handle == NULL, 0))
pthread_cancel_init ();
- return libgcc_s_getcfa (context);
+ _Unwind_Word (*getcfa) (struct _Unwind_Context *) = libgcc_s_getcfa;
+ PTR_DEMANGLE (getcfa);
+ return getcfa (context);
}
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
index a7485e9..a31ba1a 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
@@ -27,11 +28,6 @@ static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
struct _Unwind_Context *);
-#ifndef LIBGCC_S_SO
-#error LIBGCC_S_SO
-#define LIBGCC_S_SO "libgcc_s.so.1"
-#endif
-
static void
init (void)
{
@@ -43,7 +39,7 @@ init (void)
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
|| (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
- __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n");
+ __libc_fatal (LIBGCC_S_SO " must be installed for pthread_cancel to work\n");
libgcc_s_resume = resume;
libgcc_s_personality = personality;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cdc618aab40e9942181a8496d2bc29509cd32950
commit cdc618aab40e9942181a8496d2bc29509cd32950
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Feb 26 19:46:02 2009 +0000
2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME,
and FUTEX_BITSET_MATCH_ANY.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 350b11a..e99d768 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2009-02-25 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
+ FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME,
+ and FUTEX_BITSET_MATCH_ANY.
+
2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket.
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index 6998a91..10be11a 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -41,7 +41,12 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Bits used in robust mutex implementation. */
#define FUTEX_WAITERS 0x80000000
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4bf22dbef15246f2ed25e13c0a030f0210189f3
commit d4bf22dbef15246f2ed25e13c0a030f0210189f3
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Feb 22 17:15:19 2009 +0000
2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e575b36..350b11a 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,9 @@
2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
+ * sysdeps/unix/sysv/linux/hppa/Versions: Add missing bracket.
+
+2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
+
* sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile.
2009-02-13 Khem Raj <raj.khem@gmail.com>
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
index 26eed69..234c0ba 100644
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -19,6 +19,7 @@ libc {
GLIBC_2.4 {
#errlist-compat 256
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
}
librt {
GLIBC_2.3 {
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=370b2f2c97815286f8a200880cbf8d0e14f6e6dd
commit 370b2f2c97815286f8a200880cbf8d0e14f6e6dd
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Feb 22 17:02:14 2009 +0000
2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index a817e5f..e575b36 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,7 @@
+2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile.
+
2009-02-13 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 0854295..503bbca 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -233,7 +233,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
GL(dl_profile_map) = l;
}
- if((unsigned long) &_dl_runtime_resolve & 3)
+ if((unsigned long) &_dl_runtime_profile & 3)
{
got[-2] = (Elf32_Addr) ((struct fdesc *)
((unsigned long) &_dl_runtime_profile & ~3))->ip;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1090d6bf1039732d6441f894f6713e9ab58e01fa
commit 1090d6bf1039732d6441f894f6713e9ab58e01fa
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Feb 13 17:38:50 2009 +0000
[BZ #7040]
* sysdeps/unix/sysv/linux/mips/sys/inotify.h: Second parameter of
inotify_rm_watch should have type int.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index bccb10d..a52748a 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2009-02-13 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #7040]
+ * sysdeps/unix/sysv/linux/mips/sys/inotify.h: Second parameter of
+ inotify_rm_watch should have type int.
+
2009-02-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h
index a811c7f..49f3947 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/inotify.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,7 +98,7 @@ extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
__THROW;
/* Remove the watch specified by WD from the inotify instance FD. */
-extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+extern int inotify_rm_watch (int __fd, int __wd) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f281f9cfdae6156aca98c23cecc796907e9ca913
commit f281f9cfdae6156aca98c23cecc796907e9ca913
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Feb 13 17:35:07 2009 +0000
2009-02-13 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
(libgcc_s_handle): New variable.
(pthread_cancel_init): Depend in libgcc_s_handle for decision to
load DSO. Assign last.
(__unwind_freeres): New function.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c:
Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index fd520bc..864fd57 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,14 @@
+2009-02-13 Khem Raj <raj.khem@gmail.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+ (libgcc_s_handle): New variable.
+ (pthread_cancel_init): Depend in libgcc_s_handle for decision to
+ load DSO. Assign last.
+ (__unwind_freeres): New function.
+
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c:
+ Likewise.
+
2009-02-05 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
@@ -36,7 +47,7 @@
2009-01-27 Ryosei Takagi <ryosei@sm.sony.co.jp>
- * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
(lll_futex_wake_unlock, lll_futex_requeue): Return zero if success.
2009-01-27 Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
index 71ab77c..ed321a3 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -22,6 +22,7 @@
#include <unwind.h>
#include <pthreadP.h>
+static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
@@ -36,7 +37,7 @@ pthread_cancel_init (void)
void *resume, *personality, *forcedunwind, *getcfa;
void *handle;
- if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ if (__builtin_expect (libgcc_s_handle != NULL, 1))
{
/* Force gcc to reload all values. */
asm volatile ("" ::: "memory");
@@ -60,11 +61,24 @@ pthread_cancel_init (void)
libgcc_s_resume = resume;
libgcc_s_personality = personality;
libgcc_s_forcedunwind = forcedunwind;
+ libgcc_s_getcfa = getcfa;
/* Make sure libgcc_s_getcfa is written last. Otherwise,
pthread_cancel_init might return early even when the pointer the
caller is interested in is not initialized yet. */
atomic_write_barrier ();
- libgcc_s_getcfa = getcfa;
+ libgcc_s_handle = handle;
+}
+
+void
+__libc_freeres_fn_section
+__unwind_freeres (void)
+{
+ void *handle = libgcc_s_handle;
+ if (handle != NULL)
+ {
+ libgcc_s_handle = NULL;
+ __libc_dlclose (handle);
+ }
}
/* It's vitally important that _Unwind_Resume not have a stack frame; the
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
index b281963..e19facf 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -22,6 +22,7 @@
#include <unwind.h>
#include <pthreadP.h>
+static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
@@ -40,7 +41,7 @@ pthread_cancel_init (void)
void *handle;
void *sjlj_register, *sjlj_unregister;
- if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ if (__builtin_expect (libgcc_s_handle != NULL, 1))
{
/* Force gcc to reload all values. */
asm volatile ("" ::: "memory");
@@ -65,11 +66,24 @@ pthread_cancel_init (void)
libgcc_s_forcedunwind = forcedunwind;
libgcc_s_sjlj_register = sjlj_register;
libgcc_s_sjlj_unregister = sjlj_unregister;
+ libgcc_s_getcfa = getcfa;
/* Make sure libgcc_s_getcfa is written last. Otherwise,
pthread_cancel_init might return early even when the pointer the
caller is interested in is not initialized yet. */
atomic_write_barrier ();
- libgcc_s_getcfa = getcfa;
+ libgcc_s_handle = handle;
+}
+
+void
+__libc_freeres_fn_section
+__unwind_freeres (void)
+{
+ void *handle = libgcc_s_handle;
+ if (handle != NULL)
+ {
+ libgcc_s_handle = NULL;
+ __libc_dlclose (handle);
+ }
}
void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3862ba3c8905a9332bd4338068a26062e1e2722
commit b3862ba3c8905a9332bd4338068a26062e1e2722
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Feb 13 17:34:30 2009 +0000
2009-02-13 Khem Raj <raj.khem@gmail.com>
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
(libgcc_s_handle): New variable.
(pthread_cancel_init): Depend in libgcc_s_handle for decision to
load DSO. Assign last.
(__unwind_freeres): New function.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 0fac875..a817e5f 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,11 @@
+2009-02-13 Khem Raj <raj.khem@gmail.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+ (libgcc_s_handle): New variable.
+ (pthread_cancel_init): Depend in libgcc_s_handle for decision to
+ load DSO. Assign last.
+ (__unwind_freeres): New function.
+
2009-02-09 Arthur Loiret <aloiret@debian.org>
[BZ #9717]
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
index 8666bbb..cea5d3b 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@
#define LIBGCC_S_SO "libgcc_s.so.4"
+static void *libgcc_s_handle;
static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
static _Unwind_Reason_Code (*libgcc_s_personality)
(int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
@@ -42,7 +43,7 @@ pthread_cancel_init (void)
void *resume, *personality, *forcedunwind, *getcfa;
void *handle;
- if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ if (__builtin_expect (libgcc_s_handle != NULL, 1))
{
/* Force gcc to reload all values. */
asm volatile ("" ::: "memory");
@@ -66,11 +67,24 @@ pthread_cancel_init (void)
libgcc_s_resume = resume;
libgcc_s_personality = personality;
libgcc_s_forcedunwind = forcedunwind;
+ libgcc_s_getcfa = getcfa;
/* Make sure libgcc_s_getcfa is written last. Otherwise,
pthread_cancel_init might return early even when the pointer the
caller is interested in is not initialized yet. */
atomic_write_barrier ();
- libgcc_s_getcfa = getcfa;
+ libgcc_s_handle = handle;
+}
+
+void
+__libc_freeres_fn_section
+__unwind_freeres (void)
+{
+ void *handle = libgcc_s_handle;
+ if (handle != NULL)
+ {
+ libgcc_s_handle = NULL;
+ __libc_dlclose (handle);
+ }
}
void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab4340a815b484f6d462e7c40639f2f9856b83c8
commit ab4340a815b484f6d462e7c40639f2f9856b83c8
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon Feb 9 20:27:56 2009 +0000
2009-02-09 Arthur Loiret <aloiret@debian.org>
[BZ #9717]
* sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
(MALLOC): Adjust __libc_tsd_define arguments.
(tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
arguments.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 3d570db..0fac875 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,12 @@
+2009-02-09 Arthur Loiret <aloiret@debian.org>
+
+ [BZ #9717]
+
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
+ (MALLOC): Adjust __libc_tsd_define arguments.
+ (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
+ arguments.
+
2008-08-07 Helge Deller <deller@gmx.de>
* sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file.
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
index 817cf59..5dc6e6f 100644
--- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
@@ -63,10 +63,10 @@ extern void *__dso_handle __attribute__ ((__weak__));
#include <bits/libc-tsd.h>
typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
-__libc_tsd_define (static, MALLOC) /* declaration/common definition */
+__libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#define tsd_key_create(key, destr) ((void) (key))
-#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
-#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
+#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
+#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
#include <sysdeps/generic/malloc-machine.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5631abde36e37c8031028d0d17e0a6822546404f
commit 5631abde36e37c8031028d0d17e0a6822546404f
Author: Joseph Myers <joseph@codesourcery.com>
Date: Thu Feb 5 14:46:41 2009 +0000
2009-02-05 Paul Brook <paul@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto.
(elf_machine_load_address): Clear T bit of PLT entry contents.
(RTLD_START): Mark function symbols as such. Tweak pc-relative
addressing to avoid depending on pc read pipeline offset.
* sysdeps/arm/machine-gmon.h (MCOUNT): Add Thumb-2 implementation.
* sysdeps/arm/tls-macros.h: Add alignment for Thumb-2.
(ARM_PC_OFFSET): Define.
(TLS_IE): Define differently for Thumb-2.
(TLS_LE, TLS_LD, TLS_GD): Use ARM_PC_OFFSET.
* sysdeps/arm/elf/start.S: Switch to thumb mode for Thumb-2.
* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_RAW):
Add Thumb implementation.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Enforce
alignment for Thumb-2. Adjust offset from PC for Thumb-2.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Ditto.
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier,
__arch_compare_and_exchange_val_32_acq): Add Thumb-2 implementation.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 52480ac..fd520bc 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,25 @@
+2009-02-05 Paul Brook <paul@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto.
+ (elf_machine_load_address): Clear T bit of PLT entry contents.
+ (RTLD_START): Mark function symbols as such. Tweak pc-relative
+ addressing to avoid depending on pc read pipeline offset.
+ * sysdeps/arm/machine-gmon.h (MCOUNT): Add Thumb-2 implementation.
+ * sysdeps/arm/tls-macros.h: Add alignment for Thumb-2.
+ (ARM_PC_OFFSET): Define.
+ (TLS_IE): Define differently for Thumb-2.
+ (TLS_LE, TLS_LD, TLS_GD): Use ARM_PC_OFFSET.
+ * sysdeps/arm/elf/start.S: Switch to thumb mode for Thumb-2.
+ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_RAW):
+ Add Thumb implementation.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Enforce
+ alignment for Thumb-2. Adjust offset from PC for Thumb-2.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Ditto.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier,
+ __arch_compare_and_exchange_val_32_acq): Add Thumb-2 implementation.
+
2009-02-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 1a45a26..f839d97 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -53,11 +53,22 @@ static inline Elf32_Addr __attribute__ ((unused))
elf_machine_dynamic (void)
{
Elf32_Addr dynamic;
+#ifdef __thumb2__
+ long tmp;
+ asm ("ldr\t%0, 1f\n\t"
+ "adr\t%1, 1f\n\t"
+ "ldr\t%0, [%0, %1]\n\t"
+ "b 2f\n"
+ ".align 2\n"
+ "1: .word _GLOBAL_OFFSET_TABLE_ - 1b\n"
+ "2:" : "=r" (dynamic), "=r"(tmp));
+#else
asm ("ldr %0, 2f\n"
"1: ldr %0, [pc, %0]\n"
"b 3f\n"
"2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
"3:" : "=r" (dynamic));
+#endif
return dynamic;
}
@@ -69,6 +80,10 @@ elf_machine_load_address (void)
extern void __dl_start asm ("_dl_start");
Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
Elf32_Addr pcrel_addr;
+#ifdef __thumb__
+ /* Clear the low bit of the funciton address. */
+ got_addr &= ~(Elf32_Addr) 1;
+#endif
asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
return pcrel_addr - got_addr;
}
@@ -140,7 +155,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define RTLD_START asm ("\
.text\n\
.globl _start\n\
+.type _start, %function\n\
.globl _dl_start_user\n\
+.type _dl_start_user, %function\n\
_start:\n\
@ we are PIC code, so get global offset table\n\
ldr sl, .L_GET_GOT\n\
@@ -152,8 +169,8 @@ _start:\n\
bl _dl_start\n\
@ returns user entry point in r0\n\
_dl_start_user:\n\
- add sl, pc, sl\n\
-.L_GOT_GOT:\n\
+ adr r6, .L_GET_GOT\n\
+ add sl, sl, r6\n\
ldr r4, [sl, r4]\n\
@ save the entry point in another register\n\
mov r6, r0\n\
@@ -210,7 +227,7 @@ _dl_start_user:\n\
b .L_done_fixup\n\
\n\
.L_GET_GOT:\n\
- .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
+ .word _GLOBAL_OFFSET_TABLE_ - .L_GET_GOT\n\
.L_SKIP_ARGS:\n\
.word _dl_skip_args(GOTOFF)\n\
.L_FINI_PROC:\n\
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index f63b3db..0cf4339 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -58,6 +58,10 @@
...
NULL
*/
+#if defined(__thumb2__)
+ .thumb
+ .syntax unified
+#endif
.text
.globl _start
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index fa3f652..dbda0dd 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -50,6 +50,28 @@ static void mcount_internal (u_long frompc, u_long selfpc)
}
*/
+#ifdef __thumb2__
+
+#define MCOUNT \
+void _mcount (void) \
+{ \
+ __asm__("push {r0, r1, r2, r3};" \
+ "movs fp, fp;" \
+ "it eq;" \
+ "moveq r1, #0;" \
+ "itttt ne;" \
+ "ldrne r1, [fp, $-4];" \
+ "ldrne r0, [fp, $-12];" \
+ "movnes r0, r0;" \
+ "ldrne r0, [r0, $-4];" \
+ "movs r0, r0;" \
+ "it ne;" \
+ "blne mcount_internal;" \
+ "pop {r0, r1, r2, r3}"); \
+}
+
+#else
+
#define MCOUNT \
void _mcount (void) \
{ \
@@ -65,3 +87,4 @@ void _mcount (void) \
"ldmia sp!, {r0, r1, r2, r3}"); \
}
+#endif
diff --git a/sysdeps/arm/tls-macros.h b/sysdeps/arm/tls-macros.h
index 94aa3a8..e41d3bc 100644
--- a/sysdeps/arm/tls-macros.h
+++ b/sysdeps/arm/tls-macros.h
@@ -1,14 +1,36 @@
+#ifdef __thumb2__
+#define ARM_PC_OFFSET "4"
+#else
+#define ARM_PC_OFFSET "8"
+#endif
+
#define TLS_LE(x) \
({ int *__result; \
void *tp = __builtin_thread_pointer (); \
asm ("ldr %0, 1f; " \
"add %0, %1, %0; " \
"b 2f; " \
+ ".align 2; " \
"1: .word " #x "(tpoff); " \
"2: " \
: "=&r" (__result) : "r" (tp)); \
__result; })
+#ifdef __thumb2__
+#define TLS_IE(x) \
+ ({ int *__result; \
+ void *tp = __builtin_thread_pointer (); \
+ asm ("ldr %0, 1f; " \
+ "3: add %0, pc, %0;" \
+ "ldr %0, [%0];" \
+ "add %0, %1, %0; " \
+ "b 2f; " \
+ ".align 2; " \
+ "1: .word " #x "(gottpoff) + (. - 3b - 4); " \
+ "2: " \
+ : "=&r" (__result) : "r" (tp)); \
+ __result; })
+#else
#define TLS_IE(x) \
({ int *__result; \
void *tp = __builtin_thread_pointer (); \
@@ -16,10 +38,12 @@
"3: ldr %0, [pc, %0];" \
"add %0, %1, %0; " \
"b 2f; " \
+ ".align 2; " \
"1: .word " #x "(gottpoff) + (. - 3b - 8); " \
"2: " \
: "=&r" (__result) : "r" (tp)); \
__result; })
+#endif
#define TLS_LD(x) \
({ char *__result; \
@@ -28,12 +52,14 @@
asm ("ldr %0, 2f; " \
"1: add %0, pc, %0; " \
"b 3f; " \
- "2: .word " #x "(tlsldm) + (. - 1b - 8); " \
+ ".align 2; " \
+ "2: .word " #x "(tlsldm) + (. - 1b - "ARM_PC_OFFSET"); " \
"3: " \
: "=r" (__result)); \
__result = (char *)__tls_get_addr (__result); \
asm ("ldr %0, 1f; " \
"b 2f; " \
+ ".align 2; " \
"1: .word " #x "(tlsldo); " \
"2: " \
: "=r" (__offset)); \
@@ -45,7 +71,8 @@
asm ("ldr %0, 2f; " \
"1: add %0, pc, %0; " \
"b 3f; " \
- "2: .word " #x "(tlsgd) + (. - 1b - 8); " \
+ ".align 2; " \
+ "2: .word " #x "(tlsgd) + (. - 1b - "ARM_PC_OFFSET"); " \
"3: " \
: "=r" (__result)); \
(int *)__tls_get_addr (__result); })
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
new file mode 100644
index 0000000..3fb1ec9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include_next <aio_misc.h>
+
+#ifdef __thumb2__
+
+#include <errno.h>
+
+/* The Thumb-2 definition of INTERNAL_SYSCALL_RAW has to hide the use
+ of r7 from the compiler because it cannot handle asm clobbering the
+ hard frame pointer. In aio_suspend, GCC does not eliminate the
+ hard frame pointer because the function uses variable-length
+ arrays, so it generates unwind information using r7 as virtual
+ stack pointer. During system calls, when r7 has been saved on the
+ stack, this means the unwind information is invalid. Without extra
+ unwind directives, which would need to cause unwind information for
+ the asm to be generated separately from that for the parts of the
+ function before and after the asm (with three index table entries),
+ it is not possible to represent any temporary change to the virtual
+ stack pointer. Instead, we move the problematic system calls out
+ of line into a function that does not require a frame pointer. */
+
+static __attribute_noinline__ void
+aio_misc_wait (int *resultp,
+ volatile int *futexp,
+ const struct timespec *timeout,
+ int cancel)
+{
+ AIO_MISC_WAIT (*resultp, *futexp, timeout, cancel);
+}
+
+#undef AIO_MISC_WAIT
+#define AIO_MISC_WAIT(result, futex, timeout, cancel) \
+ aio_misc_wait (&result, &futex, timeout, cancel)
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
index 24ce61b..71ab77c 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -89,7 +89,12 @@ asm (
"4: bl pthread_cancel_init\n"
" ldr r3, [r4, r5]\n"
" b 5b\n"
+" .align 2\n"
+#ifdef __thumb2__
+"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
+#else
"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+#endif
"2: .word libgcc_s_resume(GOTOFF)\n"
" .size _Unwind_Resume, .-_Unwind_Resume\n"
);
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
index a9c9d18..3c780b7 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -66,7 +66,12 @@ asm (
"4: bl init\n"
" ldr r3, [r4, r5]\n"
" b 5b\n"
+" .align 2\n"
+#ifdef __thumb2__
+"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 4\n"
+#else
"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+#endif
"2: .word libgcc_s_resume(GOTOFF)\n"
" .size _Unwind_Resume, .-_Unwind_Resume\n"
);
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
index 1444f40..a7dd40d 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -44,6 +44,30 @@
argument; otherwise the (optional) compatibility code for APCS binaries
may be invoked. */
+#ifdef __thumb__
+/* Hide the use of r7 from the compiler, this would be a lot
+ easier but for the fact that the syscalls can exceed 255.
+ For the moment the LOAD_ARGS_7 is sacrificed.
+ We can't use push/pop inside the asm because that breaks
+ unwinding (ie. thread cancellation). */
+#undef LOAD_ARGS_7
+#undef INTERNAL_SYSCALL_RAW
+#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+ ({ \
+ int _sys_buf[2]; \
+ register int _a1 asm ("a1"); \
+ register int *_r6 asm ("r6") = _sys_buf; \
+ *_r6 = name; \
+ LOAD_ARGS_##nr (args) \
+ asm volatile ("str r7, [r6, #4]\n\t" \
+ "ldr r7, [r6]\n\t" \
+ "swi 0 @ syscall " #name "\n\t" \
+ "ldr r7, [r6, #4]" \
+ : "=r" (_a1) \
+ : "r" (_r6) ASM_ARGS_##nr \
+ : "memory"); \
+ _a1; })
+#else /* ARM */
#undef INTERNAL_SYSCALL_RAW
#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
({ \
@@ -55,6 +79,7 @@
: "r" (_nr) ASM_ARGS_##nr \
: "memory"); \
_a1; })
+#endif
/* For EABI, non-constant syscalls are actually pretty easy... */
#undef INTERNAL_SYSCALL_NCS
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
index 247ddd3..b0586ea 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
@@ -37,12 +37,21 @@ typedef uintmax_t uatomic_max_t;
void __arm_link_error (void);
+#ifdef __thumb2__
+#define atomic_full_barrier() \
+ __asm__ __volatile__ \
+ ("movw\tip, #0x0fa0\n\t" \
+ "movt\tip, #0xffff\n\t" \
+ "blx\tip" \
+ : : : "ip", "lr", "cc", "memory");
+#else
#define atomic_full_barrier() \
__asm__ __volatile__ \
("mov\tip, #0xffff0fff\n\t" \
"mov\tlr, pc\n\t" \
"add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
: : : "ip", "lr", "cc", "memory");
+#endif
/* Atomic compare and exchange. This sequence relies on the kernel to
provide a compare and exchange operation which is atomic on the
@@ -59,6 +68,32 @@ void __arm_link_error (void);
specify one to work around GCC PR rtl-optimization/21223. Otherwise
it may cause a_oldval or a_tmp to be moved to a different register. */
+#ifdef __thumb2__
+/* Thumb-2 has ldrex/strex. However it does not have barrier instructions,
+ so we still need to use the kernel helper. */
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ register __typeof (oldval) a_oldval asm ("r0"); \
+ register __typeof (oldval) a_newval asm ("r1") = (newval); \
+ register __typeof (mem) a_ptr asm ("r2") = (mem); \
+ register __typeof (oldval) a_tmp asm ("r3"); \
+ register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
+ __asm__ __volatile__ \
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
+ "cmp\t%[tmp], %[old2]\n\t" \
+ "bne\t1f\n\t" \
+ "mov\t%[old], %[old2]\n\t" \
+ "movw\t%[tmp], #0x0fc0\n\t" \
+ "movt\t%[tmp], #0xffff\n\t" \
+ "blx\t%[tmp]\n\t" \
+ "bcc\t0b\n\t" \
+ "mov\t%[tmp], %[old2]\n\t" \
+ "1:" \
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
+ [old2] "r" (a_oldval2) \
+ : "ip", "lr", "cc", "memory"); \
+ a_tmp; })
+#else
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
({ register __typeof (oldval) a_oldval asm ("r0"); \
register __typeof (oldval) a_newval asm ("r1") = (newval); \
@@ -81,6 +116,7 @@ void __arm_link_error (void);
[old2] "r" (a_oldval2) \
: "ip", "lr", "cc", "memory"); \
a_tmp; })
+#endif
#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
({ __arm_link_error (); oldval; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8085bd60e25f8697bd50e0e4658a26d23e16702a
commit 8085bd60e25f8697bd50e0e4658a26d23e16702a
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Feb 2 15:36:15 2009 +0000
* sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index d48e4df..bccb10d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2009-02-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_EXEC): Define.
+
2009-01-27 Maciej W. Rozycki <macro@linux-mips.org>
Atsushi Nemoto <anemo@mba.ocn.ne.jp>
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 037980c..07f9743 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19df4df1752d9d0e9543a1f42579f625c1659a29
commit 19df4df1752d9d0e9543a1f42579f625c1659a29
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Feb 2 15:35:22 2009 +0000
* sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 338d768..52480ac 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2009-02-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/shm.h (SHM_EXEC): Define.
+
2009-01-27 Min Zhang <mzhang@mvista.com>
* sysdeps/arm/memset.S (memset): Use stm instead of two
diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/sysdeps/unix/sysv/linux/arm/bits/shm.h
index 4faa287..b723cc9 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008
+/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -31,6 +31,7 @@
#define SHM_RDONLY 010000 /* attach read-only else read-write */
#define SHM_RND 020000 /* round attach address to SHMLBA */
#define SHM_REMAP 040000 /* take-over region on attach */
+#define SHM_EXEC 0100000 /* execution access */
/* Commands for `shmctl'. */
#define SHM_LOCK 11 /* lock segment (root only) */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2c9d882070d2c4bc5a099690961562662b8522a
commit f2c9d882070d2c4bc5a099690961562662b8522a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 27 17:10:08 2009 +0000
2009-01-27 Min Zhang <mzhang@mvista.com>
* sysdeps/arm/memset.S (memset): Use stm instead of two
str instructions.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 2a8a252..338d768 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-01-27 Min Zhang <mzhang@mvista.com>
+
+ * sysdeps/arm/memset.S (memset): Use stm instead of two
+ str instructions.
+
2009-01-27 Kirill A. Shutemov <kirill@shutemov.name>
* sysdeps/arm/elf/start.S (_start): Use position-independent code
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index b37451b..a276570 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -35,20 +35,17 @@ ENTRY(memset)
and r1, r1, #255 @ clear any sign bits
orr r1, r1, r1, lsl $8
orr r1, r1, r1, lsl $16
+ mov ip, r1
1:
subs r2, r2, #8
- strcs r1, [r3], #4 @ store up to 32 bytes per loop iteration
- strcs r1, [r3], #4
+ stmcsia r3!, {r1, ip} @ store up to 32 bytes per loop iteration
subcss r2, r2, #8
- strcs r1, [r3], #4
- strcs r1, [r3], #4
+ stmcsia r3!, {r1, ip}
subcss r2, r2, #8
- strcs r1, [r3], #4
- strcs r1, [r3], #4
+ stmcsia r3!, {r1, ip}
subcss r2, r2, #8
- strcs r1, [r3], #4
- strcs r1, [r3], #4
+ stmcsia r3!, {r1, ip}
bcs 1b
and r2, r2, #7
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=856cb7775f0dc086c62eb2610e6e5613926e0a99
commit 856cb7775f0dc086c62eb2610e6e5613926e0a99
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 27 16:01:19 2009 +0000
2009-01-27 Kirill A. Shutemov <kirill@shutemov.name>
* sysdeps/arm/elf/start.S (_start): Use position-independent code
if SHARED. Clear lr.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 0d3eba2..2a8a252 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-01-27 Kirill A. Shutemov <kirill@shutemov.name>
+
+ * sysdeps/arm/elf/start.S (_start): Use position-independent code
+ if SHARED. Clear lr.
+
2009-01-27 Ryosei Takagi <ryosei@sm.sony.co.jp>
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 2e0a8b1..f63b3db 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -67,11 +67,9 @@ _start:
/* Protect against unhandled exceptions. */
.fnstart
#endif
- /* Fetch address of fini */
- ldr ip, =__libc_csu_fini
-
- /* Clear the frame pointer since this is the outermost frame. */
+ /* Clear the frame pointer and link register since this is the outermost frame. */
mov fp, #0
+ mov lr, #0
/* Pop argc off the stack and save a pointer to argv */
ldr a2, [sp], #4
@@ -83,21 +81,53 @@ _start:
/* Push rtld_fini */
str a1, [sp, #-4]!
+#ifdef SHARED
+ ldr sl, .L_GOT
+.L_GOT_OFF:
+ add sl, pc, sl
+
+ ldr ip, .L_GOT+4 /* __libc_csu_fini */
+ ldr ip, [sl, ip]
+
+ str ip, [sp, #-4]! /* Push __libc_csu_fini */
+
+ ldr a4, .L_GOT+8 /* __libc_csu_init */
+ ldr a4, [sl, a4]
+
+ ldr a1, .L_GOT+12 /* main */
+ ldr a1, [sl, a1]
+
+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
+ /* Let the libc call main and exit with its return code. */
+ bl __libc_start_main(PLT)
+#else
+ /* Fetch address of __libc_csu_fini */
+ ldr ip, =__libc_csu_fini
+
+ /* Push __libc_csu_fini */
+ str ip, [sp, #-4]!
+
/* Set up the other arguments in registers */
ldr a1, =main
ldr a4, =__libc_csu_init
- /* Push fini */
- str ip, [sp, #-4]!
-
/* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
-
/* Let the libc call main and exit with its return code. */
bl __libc_start_main
+#endif
/* should never get here....*/
bl abort
+#ifdef SHARED
+.L_GOT:
+ .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8)
+ .word __libc_csu_fini(GOT)
+ .word __libc_csu_init(GOT)
+ .word main(GOT)
+#endif
+
+
#if !defined(__USING_SJLJ_EXCEPTIONS__)
.cantunwind
.fnend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60acbff563ba810b33fed59133033380d4de9429
commit 60acbff563ba810b33fed59133033380d4de9429
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 27 15:48:44 2009 +0000
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
(lll_futex_wake_unlock, lll_futex_requeue): Return zero if success.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index eb02191..0d3eba2 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-01-27 Ryosei Takagi <ryosei@sm.sony.co.jp>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ (lll_futex_wake_unlock, lll_futex_requeue): Return zero if success.
+
2009-01-27 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h: Include <tls.h>.
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 95920ab..e745e66 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -114,7 +114,7 @@
__ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
__lll_private_flag (FUTEX_CMP_REQUEUE, private),\
(nr_wake), (nr_move), (mutex), (val)); \
- __ret; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
@@ -127,7 +127,7 @@
__lll_private_flag (FUTEX_WAKE_OP, private), \
(nr_wake), (nr_wake2), (futexp2), \
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
- __ret; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a68f927f95aeaa729ed920516fc49a9e639f6552
commit a68f927f95aeaa729ed920516fc49a9e639f6552
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 27 15:36:22 2009 +0000
* sysdeps/unix/sysv/linux/arm/sysdep.h: Include <tls.h>.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 4172ee4..eb02191 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2009-01-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/sysdep.h: Include <tls.h>.
+
2009-01-12 Mike Frysinger <vapier@gentoo.org>
* sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp).
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 59ccbbc..1df63f6 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -28,6 +28,8 @@
/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */
#include <dl-sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9290e553761b1cab417d5413cf12940b03849f12
commit 9290e553761b1cab417d5413cf12940b03849f12
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 27 15:32:55 2009 +0000
PR glibc/1048
* sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support
variable page size for MIPS.
* sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf.
* sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 8d8d38e..d48e4df 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,13 @@
+2009-01-27 Maciej W. Rozycki <macro@linux-mips.org>
+ Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+
+ PR glibc/1048
+ * sysdeps/unix/sysv/linux/mips/dl-static.c: New file to support
+ variable page size for MIPS.
+ * sysdeps/unix/sysv/linux/mips/ldsodefs.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/Makefile: Build dl-static in elf.
+ * sysdeps/unix/sysv/linux/mips/Versions: Add _dl_var_init.
+
2009-01-12 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/resource.h (enum
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 72fa87b..110fccb 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -126,3 +126,12 @@ else
mv -f $(@:.h=.d)-t $(@:.h=.d)
endif
endif
+
+ifeq ($(subdir),elf)
+ifeq ($(build-shared),yes)
+# This is needed for DSO loading from static binaries.
+sysdep-dl-routines += dl-static
+sysdep_routines += dl-static
+sysdep-rtld-routines += dl-static
+endif
+endif
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 50bfac5..09df42d 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -1,3 +1,9 @@
+ld {
+ GLIBC_PRIVATE {
+ # used for loading by static libraries
+ _dl_var_init;
+ }
+}
libc {
# The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
# When you get an error from errlist-compat.awk, you need to add a new
diff --git a/sysdeps/unix/sysv/linux/mips/dl-static.c b/sysdeps/unix/sysv/linux/mips/dl-static.c
new file mode 100644
index 0000000..3a99e7e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/dl-static.c
@@ -0,0 +1,92 @@
+/* Variable initialization. MIPS version.
+ Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <ldsodefs.h>
+
+#ifdef SHARED
+
+void
+_dl_var_init (void *array[])
+{
+ /* It has to match "variables" below. */
+ enum
+ {
+ DL_PAGESIZE = 0
+ };
+
+ GLRO(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]);
+}
+
+#else
+#include <bits/libc-lock.h>
+
+__libc_lock_define_initialized_recursive (static, _dl_static_lock)
+
+static void *variables[] =
+{
+ &GLRO(dl_pagesize)
+};
+
+static void
+_dl_unprotect_relro (struct link_map *l)
+{
+ ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
+ & ~(GLRO(dl_pagesize) - 1));
+ ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
+ & ~(GLRO(dl_pagesize) - 1));
+
+ if (start != end)
+ __mprotect ((void *) start, end - start, PROT_READ | PROT_WRITE);
+}
+
+void
+_dl_static_init (struct link_map *l)
+{
+ struct link_map *rtld_map = l;
+ struct r_scope_elem **scope;
+ const ElfW(Sym) *ref = NULL;
+ lookup_t loadbase;
+ void (*f) (void *[]);
+ size_t i;
+
+ __libc_lock_lock_recursive (_dl_static_lock);
+
+ loadbase = _dl_lookup_symbol_x ("_dl_var_init", l, &ref, l->l_local_scope,
+ NULL, 0, 1, NULL);
+
+ for (scope = l->l_local_scope; *scope != NULL; scope++)
+ for (i = 0; i < (*scope)->r_nlist; i++)
+ if ((*scope)->r_list[i] == loadbase)
+ {
+ rtld_map = (*scope)->r_list[i];
+ break;
+ }
+
+ if (ref != NULL)
+ {
+ f = (void (*) (void *[])) DL_SYMBOL_ADDRESS (loadbase, ref);
+ _dl_unprotect_relro (rtld_map);
+ f (variables);
+ _dl_protect_relro (rtld_map);
+ }
+
+ __libc_lock_unlock_recursive (_dl_static_lock);
+}
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/ldsodefs.h b/sysdeps/unix/sysv/linux/mips/ldsodefs.h
new file mode 100644
index 0000000..8d5efec
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ldsodefs.h
@@ -0,0 +1,33 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects. MIPS.
+ Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LDSODEFS_H
+
+/* Get the real definitions. */
+#include_next <ldsodefs.h>
+
+/* Now define our stuff. */
+
+/* We need special support to initialize DSO loaded for statically linked
+ binaries. */
+extern void _dl_static_init (struct link_map *map);
+#undef DL_STATIC_INIT
+#define DL_STATIC_INIT(map) _dl_static_init (map)
+
+#endif /* ldsodefs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5c922c9023a2dc498fc1a1abdda8b7d552b60b1
commit e5c922c9023a2dc498fc1a1abdda8b7d552b60b1
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Jan 12 16:49:33 2009 +0000
2009-01-12 Mike Frysinger <vapier@gentoo.org>
* sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp).
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 710d426..4172ee4 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2009-01-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/arm/fpu/setjmp.S: Add hidden_def (__sigsetjmp).
+
2009-01-12 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
index 8432836..82a7e19 100644
--- a/sysdeps/arm/fpu/setjmp.S
+++ b/sysdeps/arm/fpu/setjmp.S
@@ -33,3 +33,5 @@ ENTRY (__sigsetjmp)
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
END (__sigsetjmp)
+
+hidden_def (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e27433a86962048afbf94135b620b04ef15986a6
commit e27433a86962048afbf94135b620b04ef15986a6
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Jan 12 16:45:43 2009 +0000
* sysdeps/unix/sysv/linux/mips/bits/resource.h (enum
__rusage_who): Avoid comma after RUSAGE_CHILDREN if not
-D_GNU_SOURCE.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 49b7167..8d8d38e 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,11 @@
2009-01-12 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/bits/resource.h (enum
+ __rusage_who): Avoid comma after RUSAGE_CHILDREN if not
+ -D_GNU_SOURCE.
+
+2009-01-12 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 3cfdc5d..39d17d7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,6 +1,6 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006, 2008,
+ 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -166,10 +166,11 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
+ RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
#ifdef __USE_GNU
+ ,
/* The calling thread. */
RUSAGE_THREAD = 1
# define RUSAGE_THREAD RUSAGE_THREAD
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb3b3056df2d85d15a4052bad9461e30da646a4e
commit bb3b3056df2d85d15a4052bad9461e30da646a4e
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Jan 12 16:38:17 2009 +0000
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7aac3a1..49b7167 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2009-01-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
+ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
+
2008-12-19 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c,
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index eae3f40..ab284df 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +39,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b1af9bd983a4e79244c144e837b004125292b98
commit 9b1af9bd983a4e79244c144e837b004125292b98
Author: Joseph Myers <joseph@codesourcery.com>
Date: Mon Jan 12 16:37:27 2009 +0000
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 045b6d5..710d426 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2009-01-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
+ FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
+
2008-12-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 7a05462..95920ab 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,9 @@
#define FUTEX_WAIT_BITSET 9
#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+
+#define FUTEX_BITSET_MATCH_ANY 0xffffffff
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=01aa93bd54bdda064240756ce5cab10bea65d636
commit 01aa93bd54bdda064240756ce5cab10bea65d636
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Dec 19 21:35:57 2008 +0000
* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c,
sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c,
sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: New.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 23c1e25..7aac3a1 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,10 @@
+2008-12-19 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: New.
+
2008-12-09 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS):
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
new file mode 100644
index 0000000..5516885
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
@@ -0,0 +1,58 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fcntl.h>
+#include <kernel-features.h>
+#include <sysdep.h>
+
+#define posix_fallocate static internal_fallocate
+#include <sysdeps/posix/posix_fallocate.c>
+#undef posix_fallocate
+
+#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
+int __have_fallocate attribute_hidden;
+#endif
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+posix_fallocate (int fd, __off_t offset, __off_t len)
+{
+#ifdef __NR_fallocate
+# ifndef __ASSUME_FALLOCATE
+ if (__builtin_expect (__have_fallocate >= 0, 1))
+# endif
+ {
+ INTERNAL_SYSCALL_DECL (err);
+ int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
+
+ if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ return 0;
+
+# ifndef __ASSUME_FALLOCATE
+ if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0))
+ __have_fallocate = -1;
+ else
+# endif
+ if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+ return INTERNAL_SYSCALL_ERRNO (res, err);
+ }
+#endif
+
+ return internal_fallocate (fd, offset, len);
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
new file mode 100644
index 0000000..10e9a4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fcntl.h>
+#include <kernel-features.h>
+#include <sysdep.h>
+
+extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
+#define __posix_fallocate64_l64 static internal_fallocate64
+#include <sysdeps/posix/posix_fallocate64.c>
+#undef __posix_fallocate64_l64
+
+#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
+/* Defined in posix_fallocate.c. */
+extern int __have_fallocate attribute_hidden;
+#endif
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
+{
+#ifdef __NR_fallocate
+# ifndef __ASSUME_FALLOCATE
+ if (__builtin_expect (__have_fallocate >= 0, 1))
+# endif
+ {
+ INTERNAL_SYSCALL_DECL (err);
+ int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
+
+ if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ return 0;
+
+# ifndef __ASSUME_FALLOCATE
+ if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0))
+ __have_fallocate = -1;
+ else
+# endif
+ if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+ return INTERNAL_SYSCALL_ERRNO (res, err);
+ }
+#endif
+
+ return internal_fallocate64 (fd, offset, len);
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c
new file mode 100644
index 0000000..b3fe81b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c
new file mode 100644
index 0000000..f466f13
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c
@@ -0,0 +1 @@
+/* posix_fallocate64 is in posix_fallocate.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64762db4138285bdcdd3804444f767c9c58d40df
commit 64762db4138285bdcdd3804444f767c9c58d40df
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Dec 9 23:53:33 2008 +0000
* sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS):
Make available only for __USE_GNU.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 91974a7..23c1e25 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-12-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h (SCM_CREDENTIALS):
+ Make available only for __USE_GNU.
+
2008-12-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 4f219d5..dad2c2d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -303,7 +303,7 @@ enum
{
SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
#define SCM_RIGHTS SCM_RIGHTS
-#ifdef __USE_BSD
+#ifdef __USE_GNU
, SCM_CREDENTIALS = 0x02 /* Credentials passing. */
# define SCM_CREDENTIALS SCM_CREDENTIALS
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a9863b435e55a561d421599bad98e9d8093ec40
commit 9a9863b435e55a561d421599bad98e9d8093ec40
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Dec 3 23:37:48 2008 +0000
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9bd9e04..91974a7 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-12-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Define
+ FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET.
+
2008-11-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 1cb3d9b..eae3f40 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -35,6 +35,8 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
/* Values for 'private' parameter of locking macros. Yes, the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74af6970b86576628142ed49f313b2c14ea3a273
commit 74af6970b86576628142ed49f313b2c14ea3a273
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Dec 3 23:36:56 2008 +0000
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 74748f1..045b6d5 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2008-12-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Define
+ FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET.
+
2008-11-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2,
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 889f97c..7a05462 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -35,6 +35,8 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
#define FUTEX_PRIVATE_FLAG 128
/* Values for 'private' parameter of locking macros. Yes, the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7deeab197e80c9b3aea6eccbe912a52ee90fa4b8
commit 7deeab197e80c9b3aea6eccbe912a52ee90fa4b8
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 26 19:20:37 2008 +0000
.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 2e101a8..6bb3b7c 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,10 @@
+2008-11-26 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
+ repository's ia64 file; #include that.
+ * sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Contents moved to main
+ repository's powerpc file; #include that.
+
2008-11-25 Roland McGrath <roland@redhat.com>
* ChangeLog.alpha: New file (this one).
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=751759ebd260c3091839fe9ed410d54903248cf4
commit 751759ebd260c3091839fe9ed410d54903248cf4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 26 19:20:13 2008 +0000
2008-11-26 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Contents moved to main
repository's ia64 file; #include that.
* sysdeps/unix/sysv/linux/alpha/ipc_priv.h: Contents moved to main
repository's powerpc file; #include that.
diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
index 0328dc0..67883be 100644
--- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
+++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
@@ -1,47 +1 @@
-/* Copyright (C) 1995-1999, 2000, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/ipc.h>
-
-#define __IPC_64 0x100
-
-struct __old_ipc_perm
-{
- __key_t __key; /* Key. */
- unsigned int uid; /* Owner's user ID. */
- unsigned int gid; /* Owner's group ID. */
- unsigned int cuid; /* Creator's user ID. */
- unsigned int cgid; /* Creator's group ID. */
- unsigned int mode; /* Read/write permission. */
- unsigned short int __seq; /* Sequence number. */
-};
-
-
-/* The codes for the functions to use the ipc syscall multiplexer. */
-#define IPCOP_semop 1
-#define IPCOP_semget 2
-#define IPCOP_semctl 3
-#define IPCOP_semtimedop 4
-#define IPCOP_msgsnd 11
-#define IPCOP_msgrcv 12
-#define IPCOP_msgget 13
-#define IPCOP_msgctl 14
-#define IPCOP_shmat 21
-#define IPCOP_shmdt 22
-#define IPCOP_shmget 23
-#define IPCOP_shmctl 24
+#include <sysdeps/unix/sysv/linux/powerpc/ipc_priv.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c
index c2972e4..075b267 100644
--- a/sysdeps/unix/sysv/linux/alpha/wordexp.c
+++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c
@@ -1,60 +1 @@
-/* Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <shlib-compat.h>
-
-/* For Linux/Alpha we have to make the wordexp symbols versioned. */
-#define wordexp(words, pwordexp, flags) \
- __new_wordexp (words, pwordexp, flags)
-
-#include <posix/wordexp.c>
-
-versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
-
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
-/* The old, incorrect wordexp_t definition. */
-typedef struct
- {
- int we_wordc; /* Count of words matched. */
- char **we_wordv; /* List of expanded words. */
- int we_offs; /* Slots to reserve in `we_wordv'. */
- } old_wordexp_t;
-
-
-int
-attribute_compat_text_section
-__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
-{
- wordexp_t we;
- int result;
-
- we.we_wordc = pwordexp->we_wordc;
- we.we_wordv = pwordexp->we_wordv;
- we.we_offs = pwordexp->we_offs;
-
- result = __new_wordexp (words, &we, flags);
-
- pwordexp->we_wordc = we.we_wordc;
- pwordexp->we_wordv = we.we_wordv;
- pwordexp->we_offs = we.we_offs;
-
- return result;
-}
-compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1);
-#endif
+#include <sysdeps/unix/sysv/linux/ia64/wordexp.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5823b5780d3b8d090b31dfbfe28ff37fb97faf20
commit 5823b5780d3b8d090b31dfbfe28ff37fb97faf20
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 26 07:21:20 2008 +0000
* ChangeLog.alpha: New file (this one).
* sysdeps/alpha, sysdeps/unix/bsd/osf/alpha,
sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha,
sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha,
sysdeps/mach/alpha, sysdeps/mach/hurd/alpha:
Subdirectories moved here from main repository.
* sysdeps/alpha/nptl, sysdeps/unix/sysv/linux/alpha/nptl:
Subdirectories moved here from main repository's nptl/ subdirectory.
* sysdeps/alpha/preconfigure: New file.
* sysdeps/alpha/shlib-versions: New file.
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
new file mode 100644
index 0000000..2e101a8
--- /dev/null
+++ b/ChangeLog.alpha
@@ -0,0 +1,18 @@
+2008-11-25 Roland McGrath <roland@redhat.com>
+
+ * ChangeLog.alpha: New file (this one).
+ * sysdeps/alpha, sysdeps/unix/bsd/osf/alpha,
+ sysdeps/unix/bsd/Attic/osf1/alpha, sysdeps/unix/sysv/linux/alpha,
+ sysdeps/unix/sysv/linux/alpha/alpha, sysdeps/unix/alpha,
+ sysdeps/mach/alpha, sysdeps/mach/hurd/alpha:
+ Subdirectories moved here from main repository.
+ * sysdeps/alpha/nptl, sysdeps/unix/sysv/linux/alpha/nptl:
+ Subdirectories moved here from main repository's nptl/ subdirectory.
+ * sysdeps/alpha/preconfigure: New file.
+ * sysdeps/alpha/shlib-versions: New file.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+End:
diff --git a/sysdeps/alpha/preconfigure b/sysdeps/alpha/preconfigure
new file mode 100644
index 0000000..ad3dc69
--- /dev/null
+++ b/sysdeps/alpha/preconfigure
@@ -0,0 +1,3 @@
+case "$machine" in
+alpha*) base_machine=alpha machine=alpha/$machine ;;
+esac
diff --git a/sysdeps/alpha/shlib-versions b/sysdeps/alpha/shlib-versions
new file mode 100644
index 0000000..cd4b9af
--- /dev/null
+++ b/sysdeps/alpha/shlib-versions
@@ -0,0 +1,14 @@
+alpha.*-.*-linux.* libm=6.1
+alpha.*-.*-linux.* libc=6.1
+
+alpha.*-.*-linux.* ld=ld-linux.so.2
+
+alpha.*-.*-linux.* libdl=2.1
+
+alpha.*-.*-linux.* libutil=1.1
+
+alpha.*-.*-linux.* libresolv=2.1
+
+alpha.*-.*-linux.* libnsl=1.1
+alpha.*-.*-linux.* libcrypt=1.1
+alpha.*-.*-linux.* libBrokenLocale=1.1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10d461b5588149f453d8d8dc77f47355d36a5700
commit 10d461b5588149f453d8d8dc77f47355d36a5700
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Nov 25 16:45:39 2008 +0000
* sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix
__THROW vs. __nonnull order for C++.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index e94e109..9bd9e04 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-11-25 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/sys/signalfd.h (signalfd): Fix
+ __THROW vs. __nonnull order for C++.
+
2008-10-15 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h
index 2fe7e37..08923c0 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h
@@ -59,7 +59,7 @@ __BEGIN_DECLS
/* Request notification for delivery of signals in MASK to be
performed using descriptor FD.*/
extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
- __nonnull ((2)) __THROW;
+ __THROW __nonnull ((2));
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9806fbba75e0103fdfcb641e72e5cdba93a717a2
commit 9806fbba75e0103fdfcb641e72e5cdba93a717a2
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Nov 25 16:37:26 2008 +0000
* sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2,
LOAD_ARGS_3, LOAD_ARGS_4, LOAD_ARGS_5, LOAD_ARGS_6, LOAD_ARGS_7):
Load all arguments into temporary variables before loading into
registers.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e409001..74748f1 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,10 @@
+2008-11-25 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (LOAD_ARGS_1, LOAD_ARGS_2,
+ LOAD_ARGS_3, LOAD_ARGS_4, LOAD_ARGS_5, LOAD_ARGS_6, LOAD_ARGS_7):
+ Load all arguments into temporary variables before loading into
+ registers.
+
2008-08-19 Joseph Myers <joseph@codesourcery.com>
* data/c++-types-arm-linux-gnueabi.data: New.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 2952067..59ccbbc 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -238,32 +238,39 @@ __local_syscall_error: \
#define LOAD_ARGS_0()
#define ASM_ARGS_0
#define LOAD_ARGS_1(a1) \
- _a1 = (int) (a1); \
- LOAD_ARGS_0 ()
+ int _a1tmp = (int) (a1); \
+ LOAD_ARGS_0 () \
+ _a1 = _a1tmp;
#define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1)
#define LOAD_ARGS_2(a1, a2) \
- register int _a2 asm ("a2") = (int) (a2); \
- LOAD_ARGS_1 (a1)
+ int _a2tmp = (int) (a2); \
+ LOAD_ARGS_1 (a1) \
+ register int _a2 asm ("a2") = _a2tmp;
#define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2)
#define LOAD_ARGS_3(a1, a2, a3) \
- register int _a3 asm ("a3") = (int) (a3); \
- LOAD_ARGS_2 (a1, a2)
+ int _a3tmp = (int) (a3); \
+ LOAD_ARGS_2 (a1, a2) \
+ register int _a3 asm ("a3") = _a3tmp;
#define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3)
#define LOAD_ARGS_4(a1, a2, a3, a4) \
- register int _a4 asm ("a4") = (int) (a4); \
- LOAD_ARGS_3 (a1, a2, a3)
+ int _a4tmp = (int) (a4); \
+ LOAD_ARGS_3 (a1, a2, a3) \
+ register int _a4 asm ("a4") = _a4tmp;
#define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4)
#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
- register int _v1 asm ("v1") = (int) (a5); \
- LOAD_ARGS_4 (a1, a2, a3, a4)
+ int _v1tmp = (int) (a5); \
+ LOAD_ARGS_4 (a1, a2, a3, a4) \
+ register int _v1 asm ("v1") = _v1tmp;
#define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1)
#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
- register int _v2 asm ("v2") = (int) (a6); \
- LOAD_ARGS_5 (a1, a2, a3, a4, a5)
+ int _v2tmp = (int) (a6); \
+ LOAD_ARGS_5 (a1, a2, a3, a4, a5) \
+ register int _v2 asm ("v2") = _v2tmp;
#define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2)
#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \
- register int _v3 asm ("v3") = (int) (a7); \
- LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)
+ int _v3tmp = (int) (a7); \
+ LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \
+ register int _v3 asm ("v3") = _v3tmp;
#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
/* We can't implement non-constant syscalls directly since the syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7f95e85c0d88a96de9e2c9fb650d322bc647e29
commit d7f95e85c0d88a96de9e2c9fb650d322bc647e29
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Oct 23 17:11:06 2008 +0000
Regenerated: autoconf ports/sysdeps/hppa/configure.in
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index 22a61fb..b50ec17 100644
--- a/sysdeps/hppa/configure
+++ b/sysdeps/hppa/configure
@@ -1,1609 +1,6 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
-
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- case $as_dir in
- /*)
- for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
- done;;
- esac
-done
-IFS=$as_save_IFS
-
-
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
- :
-else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
-else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
-}
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
--n*)
- case `echo 'x\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
-else
- rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-
-exec 7<&0 </dev/null 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias'
-ac_subst_files=''
- ac_precious_vars='build_alias
-host_alias
-target_alias'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval $ac_prev=\$ac_option
- ac_prev=
- continue
- fi
-
- case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case $ac_dashdash$ac_option in
- --)
- ac_dashdash=yes ;;
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir=$ac_optarg ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build_alias ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build_alias=$ac_optarg ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file=$ac_optarg ;;
-
- --config-cache | -C)
- cache_file=config.cache ;;
-
- -datadir | --datadir | --datadi | --datad)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=*)
- datadir=$ac_optarg ;;
-
- -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
- | --dataroo | --dataro | --datar)
- ac_prev=datarootdir ;;
- -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
- | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
- datarootdir=$ac_optarg ;;
-
- -disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
-
- -docdir | --docdir | --docdi | --doc | --do)
- ac_prev=docdir ;;
- -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
- docdir=$ac_optarg ;;
-
- -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
- ac_prev=dvidir ;;
- -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
- dvidir=$ac_optarg ;;
-
- -enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix=$ac_optarg ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he | -h)
- ac_init_help=long ;;
- -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
- ac_init_help=recursive ;;
- -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
- ac_init_help=short ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host_alias ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host_alias=$ac_optarg ;;
-
- -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
- ac_prev=htmldir ;;
- -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
- | --ht=*)
- htmldir=$ac_optarg ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir=$ac_optarg ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir=$ac_optarg ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir=$ac_optarg ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir=$ac_optarg ;;
-
- -localedir | --localedir | --localedi | --localed | --locale)
- ac_prev=localedir ;;
- -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
- localedir=$ac_optarg ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst | --locals)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
- localstatedir=$ac_optarg ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir=$ac_optarg ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir=$ac_optarg ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=$ac_optarg ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix=$ac_optarg ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix=$ac_optarg ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name=$ac_optarg ;;
-
- -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
- ac_prev=pdfdir ;;
- -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
- pdfdir=$ac_optarg ;;
-
- -psdir | --psdir | --psdi | --psd | --ps)
- ac_prev=psdir ;;
- -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
- psdir=$ac_optarg ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir=$ac_optarg ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir=$ac_optarg ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site=$ac_optarg ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir=$ac_optarg ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir=$ac_optarg ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target_alias ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target_alias=$ac_optarg ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers | -V)
- ac_init_version=: ;;
-
- -with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
-
- -without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
- # Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes=$ac_optarg ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries=$ac_optarg ;;
-
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
- eval $ac_envvar=\$ac_optarg
- export $ac_envvar ;;
-
- *)
- # FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
- expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
-fi
-
-# Be sure to have absolute directory names.
-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
-do
- eval ac_val=\$$ac_var
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) continue;;
- NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
- esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
- if test "x$build_alias" = x; then
- cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
- elif test "x$build_alias" != "x$host_alias"; then
- cross_compiling=yes
- fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- srcdir=$ac_confdir
- if test ! -r "$srcdir/$ac_unique_file"; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
- test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
- pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
- srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
- eval ac_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_env_${ac_var}_value=\$${ac_var}
- eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
- eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE. See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
- -h, --help display this help and exit
- --help=short display options specific to this package
- --help=recursive display the short help of all the included packages
- -V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
- --cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
- -n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
-
-Installation directories:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-
- cat <<\_ACEOF
-
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
- # If there are subdirs, report their specific --help.
- for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
- ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
- .) # We are building in place.
- ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
- cd "$ac_dir" || { ac_status=$?; continue; }
- # Check for guested configure.
- if test -f "$ac_srcdir/configure.gnu"; then
- echo &&
- $SHELL "$ac_srcdir/configure.gnu" --help=recursive
- elif test -f "$ac_srcdir/configure"; then
- echo &&
- $SHELL "$ac_srcdir/configure" --help=recursive
- else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi || ac_status=$?
- cd "$ac_pwd" || { ac_status=$?; break; }
- done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
- cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.61
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
- exit
-fi
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
-
- $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
-
-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
- for ac_arg
- do
- case $ac_arg in
- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- continue ;;
- *\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
- 2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
- if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
- else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
- fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
- ;;
- esac
- done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log. We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
- # Save into config.log some information that might help in debugging.
- {
- echo
-
- cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
- echo
- # The following way of writing the cache mishandles newlines in values,
-(
- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
- eval ac_val=\$$ac_var
- case $ac_val in #(
- *${as_nl}*)
- case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
- esac
- case $ac_var in #(
- _ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
- esac ;;
- esac
- done
- (set) 2>&1 |
- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
- *${as_nl}ac_space=\ *)
- sed -n \
- "s/'\''/'\''\\\\'\'''\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
- ;; #(
- *)
- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
- ;;
- esac |
- sort
-)
- echo
-
- cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_vars
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
-
- if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
-## File substitutions. ##
-## ------------------- ##
-_ASBOX
- echo
- for ac_var in $ac_subst_files
- do
- eval ac_val=\$$ac_var
- case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
- esac
- echo "$ac_var='\''$ac_val'\''"
- done | sort
- echo
- fi
-
- if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
- echo
- cat confdefs.h
- echo
- fi
- test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
- } >&5
- rm -f core *.core core.conftest.* &&
- rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
- exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
-elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
-else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
-fi
-shift
-for ac_site_file
-do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
- sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . "$cache_file";;
- *) . "./$cache_file";;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
- eval ac_old_set=\$ac_cv_env_${ac_var}_set
- eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val=\$ac_cv_env_${ac_var}_value
- eval ac_new_val=\$ac_env_${ac_var}_value
- case $ac_old_set,$ac_new_set in
- set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
- ac_cache_corrupted=: ;;
- ,);;
- *)
- if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
- fi;;
- esac
- # Pass precious variables to config.status.
- if test "$ac_new_set" = set; then
- case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
- *) ac_arg=$ac_var=$ac_new_val ;;
- esac
- case " $ac_configure_args " in
- *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- { echo "$as_me:$LINENO: checking for assembler line separator" >&5
+
+{ echo "$as_me:$LINENO: checking for assembler line separator" >&5
echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6; }
if test "${libc_cv_asm_line_sep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63ad0ed1d569a8e89b2e9b6202e884bc05339836
commit 63ad0ed1d569a8e89b2e9b6202e884bc05339836
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Oct 23 16:57:35 2008 +0000
Regenerated: autoconf ports/sysdeps/hppa/configure.in
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index bc01e46..22a61fb 100644
--- a/sysdeps/hppa/configure
+++ b/sysdeps/hppa/configure
@@ -1,7 +1,1610 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
-echo "$as_me:$LINENO: checking for assembler line separator" >&5
-echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ { echo "$as_me:$LINENO: checking for assembler line separator" >&5
+echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6; }
if test "${libc_cv_asm_line_sep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -25,8 +1628,8 @@ else
fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5
-echo "${ECHO_T}$libc_cv_asm_line_sep" >&6
+{ echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5
+echo "${ECHO_T}$libc_cv_asm_line_sep" >&6; }
cat >>confdefs.h <<_ACEOF
#define ASM_LINE_SEP $libc_cv_asm_line_sep
_ACEOF
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c482dc51db55ff376598d1fa373d27a69b1764d
commit 9c482dc51db55ff376598d1fa373d27a69b1764d
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Oct 23 16:57:15 2008 +0000
Regenerated: autoconf ports/sysdeps/hppa/elf/configure.in
diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure
index 226c30d..ba69990 100644
--- a/sysdeps/hppa/elf/configure
+++ b/sysdeps/hppa/elf/configure
@@ -4,8 +4,8 @@
if test "$usetls" != no; then
# Check for support of thread-local storage handling in assembler and
# linker.
-echo "$as_me:$LINENO: checking for hppa TLS support" >&5
-echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for hppa TLS support" >&5
+echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6; }
if test "${libc_cv_hppa_tls+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -52,8 +52,8 @@ else
fi
rm -f conftest*
fi
-echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5
-echo "${ECHO_T}$libc_cv_hppa_tls" >&6
+{ echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5
+echo "${ECHO_T}$libc_cv_hppa_tls" >&6; }
if test $libc_cv_hppa_tls = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_TLS_SUPPORT 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a3d967483c9bcaf9f72a24588913cbd6d94c0ed
commit 9a3d967483c9bcaf9f72a24588913cbd6d94c0ed
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Oct 16 20:28:45 2008 +0000
* sysdeps/unix/sysv/linux/sys/signalfd.h (signalfd): Fix __THROW vs.
__nonnull order for C++.
* sysdeps/unix/sysv/linux/alpha/sys/signalfd.h (signalfd): Likewise.
* sysdeps/unix/sysv/linux/sparc/sys/signalfd.h (signalfd): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
index a820eaf..4cbe977 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
@@ -59,7 +59,7 @@ __BEGIN_DECLS
/* Request notification for delivery of signals in MASK to be
performed using descriptor FD.*/
extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
- __nonnull ((2)) __THROW;
+ __THROW __nonnull ((2));
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6e40d38942b13ae5347c52a5bc80ac23e233a21
commit f6e40d38942b13ae5347c52a5bc80ac23e233a21
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 15 19:37:36 2008 +0000
* sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine.
* sysdeps/mips/dl-machine.h (STO_MIPS_PLT, R_MIPS_COPY,
R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Do not redefine.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index a4f03a7..e94e109 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2008-10-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Do not redefine.
+ * sysdeps/mips/dl-machine.h (STO_MIPS_PLT, R_MIPS_COPY,
+ R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Do not redefine.
+
2008-10-01 Mark Shinwell <shinwell@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h
index 41ae000..dfd03ba 100644
--- a/sysdeps/mips/dl-dtprocnum.h
+++ b/sysdeps/mips/dl-dtprocnum.h
@@ -17,12 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Until elf/elf.h in glibc is updated. */
-#ifndef STO_MIPS_PLT
-# undef DT_MIPS_NUM
-# define DT_MIPS_NUM 0x35
-#endif
-
/* Number of extra dynamic section entries for this architecture. By
default there are none. */
#define DT_THISPROCNUM DT_MIPS_NUM
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index bca0dbe..ef088bf 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -53,14 +53,6 @@
".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t"
#endif
-/* Until elf/elf.h in glibc is updated. */
-#ifndef STO_MIPS_PLT
-#define STO_MIPS_PLT 0x8
-#define R_MIPS_COPY 126
-#define R_MIPS_JUMP_SLOT 127
-#define DT_MIPS_PLTGOT 0x70000032
-#endif
-
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
This only makes sense on MIPS when using PLTs, so choose the
PLT relocation (not encountered when not using PLTs). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63fb881a04bb46b83f95b83c3751ba9d0145e29a
commit 63fb881a04bb46b83f95b83c3751ba9d0145e29a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 1 13:28:14 2008 +0000
2008-10-01 Mark Shinwell <shinwell@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Redefine.
* sysdeps/mips/dl-lookup.c: New.
* sysdeps/mips/do-lookup.h: New.
* sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): Remove
definition.
(STO_MIPS_PLT, R_MIPS_COPY, R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Define
if needed.
(ELF_MACHINE_JMP_SLOT): Alter definition and update comment.
(elf_machine_type_class): Likewise.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_fixup_plt): New.
(elf_machine_plt_value): New.
(elf_machine_reloc): Handle jump slot and copy relocations.
(elf_machine_lazy_rel): Point relocation place at PLT if
required.
(RESOLVE_GOTSYM): Take a relocation type argument.
(elf_machine_got_rel): Bind lazy stubs directly to their target if
!lazy. Skip lazy binding for PLT symbols.
(elf_machine_runtime_setup): Fill in .got.plt header.
* sysdeps/mips/dl-trampoline.c (IFNEWABI): New macro.
(ELF_DL_PLT_FRAME_SIZE, ELF_DL_PLT_SAVE_ARG_REGS,
ELF_DL_PLT_RESTORE_ARG_REGS): Define.
(_dl_runtime_pltresolve): New.
* sysdeps/mips/bits/linkmap.h: New file.
* sysdeps/mips/tls-macros.h: Load $gp as required. Merge 32-bit and
64-bit versions.
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (SYSCALL_ERROR_LABEL):
Delete definition.
* sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (PSEUDO_CPLOAD,
PSEUDO_ERRJMP, PSEUDO_SAVEGP, PSEUDO_LOADGP): Define.
(PSEUDO): Use them. Move outside __PIC__.
(PSEUDO_JMP): New.
(CENABLE, CDISABLE): Use it.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 065ac68..a4f03a7 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,42 @@
+2008-10-01 Mark Shinwell <shinwell@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * sysdeps/mips/dl-dtprocnum.h (DT_MIPS_NUM): Redefine.
+ * sysdeps/mips/dl-lookup.c: New.
+ * sysdeps/mips/do-lookup.h: New.
+ * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_PLT): Remove
+ definition.
+ (STO_MIPS_PLT, R_MIPS_COPY, R_MIPS_JUMP_SLOT, DT_MIPS_PLTGOT): Define
+ if needed.
+ (ELF_MACHINE_JMP_SLOT): Alter definition and update comment.
+ (elf_machine_type_class): Likewise.
+ (ELF_MACHINE_PLT_REL): Define.
+ (elf_machine_fixup_plt): New.
+ (elf_machine_plt_value): New.
+ (elf_machine_reloc): Handle jump slot and copy relocations.
+ (elf_machine_lazy_rel): Point relocation place at PLT if
+ required.
+ (RESOLVE_GOTSYM): Take a relocation type argument.
+ (elf_machine_got_rel): Bind lazy stubs directly to their target if
+ !lazy. Skip lazy binding for PLT symbols.
+ (elf_machine_runtime_setup): Fill in .got.plt header.
+ * sysdeps/mips/dl-trampoline.c (IFNEWABI): New macro.
+ (ELF_DL_PLT_FRAME_SIZE, ELF_DL_PLT_SAVE_ARG_REGS,
+ ELF_DL_PLT_RESTORE_ARG_REGS): Define.
+ (_dl_runtime_pltresolve): New.
+ * sysdeps/mips/bits/linkmap.h: New file.
+ * sysdeps/mips/tls-macros.h: Load $gp as required. Merge 32-bit and
+ 64-bit versions.
+
+ * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (SYSCALL_ERROR_LABEL):
+ Delete definition.
+ * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h (PSEUDO_CPLOAD,
+ PSEUDO_ERRJMP, PSEUDO_SAVEGP, PSEUDO_LOADGP): Define.
+ (PSEUDO): Use them. Move outside __PIC__.
+ (PSEUDO_JMP): New.
+ (CENABLE, CDISABLE): Use it.
+
2008-08-19 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2
diff --git a/sysdeps/mips/bits/linkmap.h b/sysdeps/mips/bits/linkmap.h
new file mode 100644
index 0000000..a6df782
--- /dev/null
+++ b/sysdeps/mips/bits/linkmap.h
@@ -0,0 +1,4 @@
+struct link_map_machine
+ {
+ ElfW(Addr) plt; /* Address of .plt */
+ };
diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h
index dfd03ba..41ae000 100644
--- a/sysdeps/mips/dl-dtprocnum.h
+++ b/sysdeps/mips/dl-dtprocnum.h
@@ -17,6 +17,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* Until elf/elf.h in glibc is updated. */
+#ifndef STO_MIPS_PLT
+# undef DT_MIPS_NUM
+# define DT_MIPS_NUM 0x35
+#endif
+
/* Number of extra dynamic section entries for this architecture. By
default there are none. */
#define DT_THISPROCNUM DT_MIPS_NUM
diff --git a/sysdeps/mips/dl-lookup.c b/sysdeps/mips/dl-lookup.c
new file mode 100644
index 0000000..015c153
--- /dev/null
+++ b/sysdeps/mips/dl-lookup.c
@@ -0,0 +1,581 @@
+/* Look up a symbol in the loaded objects.
+ MIPS/Linux version - this is identical to the common version, but
+ because it is in sysdeps/mips, it gets sysdeps/mips/do-lookup.h.
+ Using <do-lookup.h> instead of "do-lookup.h" would work too.
+
+ Copyright (C) 1995-2005, 2006, 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <alloca.h>
+#include <libintl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-hash.h>
+#include <dl-machine.h>
+#include <sysdep-cancel.h>
+#include <bits/libc-lock.h>
+#include <tls.h>
+
+#include <assert.h>
+
+#define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
+
+/* We need this string more than once. */
+static const char undefined_msg[] = "undefined symbol: ";
+
+
+struct sym_val
+ {
+ const ElfW(Sym) *s;
+ struct link_map *m;
+ };
+
+
+#define make_string(string, rest...) \
+ ({ \
+ const char *all[] = { string, ## rest }; \
+ size_t len, cnt; \
+ char *result, *cp; \
+ \
+ len = 1; \
+ for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
+ len += strlen (all[cnt]); \
+ \
+ cp = result = alloca (len); \
+ for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
+ cp = __stpcpy (cp, all[cnt]); \
+ \
+ result; \
+ })
+
+/* Statistics function. */
+#ifdef SHARED
+# define bump_num_relocations() ++GL(dl_num_relocations)
+#else
+# define bump_num_relocations() ((void) 0)
+#endif
+
+
+/* The actual lookup code. */
+#include "do-lookup.h"
+
+
+static uint_fast32_t
+dl_new_hash (const char *s)
+{
+ uint_fast32_t h = 5381;
+ for (unsigned char c = *s; c != '\0'; c = *++s)
+ h = h * 33 + c;
+ return h & 0xffffffff;
+}
+
+
+/* Add extra dependency on MAP to UNDEF_MAP. */
+static int
+internal_function
+add_dependency (struct link_map *undef_map, struct link_map *map, int flags)
+{
+ struct link_map *runp;
+ unsigned int i;
+ int result = 0;
+
+ /* Avoid self-references and references to objects which cannot be
+ unloaded anyway. */
+ if (undef_map == map)
+ return 0;
+
+ /* Avoid references to objects which cannot be unloaded anyway. */
+ assert (map->l_type == lt_loaded);
+ if ((map->l_flags_1 & DF_1_NODELETE) != 0)
+ return 0;
+
+ struct link_map_reldeps *l_reldeps
+ = atomic_forced_read (undef_map->l_reldeps);
+
+ /* Make sure l_reldeps is read before l_initfini. */
+ atomic_read_barrier ();
+
+ /* Determine whether UNDEF_MAP already has a reference to MAP. First
+ look in the normal dependencies. */
+ struct link_map **l_initfini = atomic_forced_read (undef_map->l_initfini);
+ if (l_initfini != NULL)
+ {
+ for (i = 0; l_initfini[i] != NULL; ++i)
+ if (l_initfini[i] == map)
+ return 0;
+ }
+
+ /* No normal dependency. See whether we already had to add it
+ to the special list of dynamic dependencies. */
+ unsigned int l_reldepsact = 0;
+ if (l_reldeps != NULL)
+ {
+ struct link_map **list = &l_reldeps->list[0];
+ l_reldepsact = l_reldeps->act;
+ for (i = 0; i < l_reldepsact; ++i)
+ if (list[i] == map)
+ return 0;
+ }
+
+ /* Save serial number of the target MAP. */
+ unsigned long long serial = map->l_serial;
+
+ /* Make sure nobody can unload the object while we are at it. */
+ if (__builtin_expect (flags & DL_LOOKUP_GSCOPE_LOCK, 0))
+ {
+ /* We can't just call __rtld_lock_lock_recursive (GL(dl_load_lock))
+ here, that can result in ABBA deadlock. */
+ THREAD_GSCOPE_RESET_FLAG ();
+ __rtld_lock_lock_recursive (GL(dl_load_lock));
+ /* While MAP value won't change, after THREAD_GSCOPE_RESET_FLAG ()
+ it can e.g. point to unallocated memory. So avoid the optimizer
+ treating the above read from MAP->l_serial as ensurance it
+ can safely dereference it. */
+ map = atomic_forced_read (map);
+
+ /* From this point on it is unsafe to dereference MAP, until it
+ has been found in one of the lists. */
+
+ /* Redo the l_initfini check in case undef_map's l_initfini
+ changed in the mean time. */
+ if (undef_map->l_initfini != l_initfini
+ && undef_map->l_initfini != NULL)
+ {
+ l_initfini = undef_map->l_initfini;
+ for (i = 0; l_initfini[i] != NULL; ++i)
+ if (l_initfini[i] == map)
+ goto out_check;
+ }
+
+ /* Redo the l_reldeps check if undef_map's l_reldeps changed in
+ the mean time. */
+ if (undef_map->l_reldeps != NULL)
+ {
+ if (undef_map->l_reldeps != l_reldeps)
+ {
+ struct link_map **list = &undef_map->l_reldeps->list[0];
+ l_reldepsact = undef_map->l_reldeps->act;
+ for (i = 0; i < l_reldepsact; ++i)
+ if (list[i] == map)
+ goto out_check;
+ }
+ else if (undef_map->l_reldeps->act > l_reldepsact)
+ {
+ struct link_map **list
+ = &undef_map->l_reldeps->list[0];
+ i = l_reldepsact;
+ l_reldepsact = undef_map->l_reldeps->act;
+ for (; i < l_reldepsact; ++i)
+ if (list[i] == map)
+ goto out_check;
+ }
+ }
+ }
+ else
+ __rtld_lock_lock_recursive (GL(dl_load_lock));
+
+ /* The object is not yet in the dependency list. Before we add
+ it make sure just one more time the object we are about to
+ reference is still available. There is a brief period in
+ which the object could have been removed since we found the
+ definition. */
+ runp = GL(dl_ns)[undef_map->l_ns]._ns_loaded;
+ while (runp != NULL && runp != map)
+ runp = runp->l_next;
+
+ if (runp != NULL)
+ {
+ /* The object is still available. */
+
+ /* MAP could have been dlclosed, freed and then some other dlopened
+ library could have the same link_map pointer. */
+ if (map->l_serial != serial)
+ goto out_check;
+
+ /* Redo the NODELETE check, as when dl_load_lock wasn't held
+ yet this could have changed. */
+ if ((map->l_flags_1 & DF_1_NODELETE) != 0)
+ goto out;
+
+ /* If the object with the undefined reference cannot be removed ever
+ just make sure the same is true for the object which contains the
+ definition. */
+ if (undef_map->l_type != lt_loaded
+ || (undef_map->l_flags_1 & DF_1_NODELETE) != 0)
+ {
+ map->l_flags_1 |= DF_1_NODELETE;
+ goto out;
+ }
+
+ /* Add the reference now. */
+ if (__builtin_expect (l_reldepsact >= undef_map->l_reldepsmax, 0))
+ {
+ /* Allocate more memory for the dependency list. Since this
+ can never happen during the startup phase we can use
+ `realloc'. */
+ struct link_map_reldeps *newp;
+ unsigned int max
+ = undef_map->l_reldepsmax ? undef_map->l_reldepsmax * 2 : 10;
+
+ newp = malloc (sizeof (*newp) + max * sizeof (struct link_map *));
+ if (newp == NULL)
+ {
+ /* If we didn't manage to allocate memory for the list this is
+ no fatal problem. We simply make sure the referenced object
+ cannot be unloaded. This is semantically the correct
+ behavior. */
+ map->l_flags_1 |= DF_1_NODELETE;
+ goto out;
+ }
+ else
+ {
+ if (l_reldepsact)
+ memcpy (&newp->list[0], &undef_map->l_reldeps->list[0],
+ l_reldepsact * sizeof (struct link_map *));
+ newp->list[l_reldepsact] = map;
+ newp->act = l_reldepsact + 1;
+ atomic_write_barrier ();
+ void *old = undef_map->l_reldeps;
+ undef_map->l_reldeps = newp;
+ undef_map->l_reldepsmax = max;
+ if (old)
+ _dl_scope_free (old);
+ }
+ }
+ else
+ {
+ undef_map->l_reldeps->list[l_reldepsact] = map;
+ atomic_write_barrier ();
+ undef_map->l_reldeps->act = l_reldepsact + 1;
+ }
+
+ /* Display information if we are debugging. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
+ _dl_debug_printf ("\
+\nfile=%s [%lu]; needed by %s [%lu] (relocation dependency)\n\n",
+ map->l_name[0] ? map->l_name : rtld_progname,
+ map->l_ns,
+ undef_map->l_name[0]
+ ? undef_map->l_name : rtld_progname,
+ undef_map->l_ns);
+ }
+ else
+ /* Whoa, that was bad luck. We have to search again. */
+ result = -1;
+
+ out:
+ /* Release the lock. */
+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+
+ if (__builtin_expect (flags & DL_LOOKUP_GSCOPE_LOCK, 0))
+ THREAD_GSCOPE_SET_FLAG ();
+
+ return result;
+
+ out_check:
+ if (map->l_serial != serial)
+ result = -1;
+ goto out;
+}
+
+static void
+internal_function
+_dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
+ const ElfW(Sym) **ref, struct sym_val *value,
+ const struct r_found_version *version, int type_class,
+ int protected);
+
+
+/* Search loaded objects' symbol tables for a definition of the symbol
+ UNDEF_NAME, perhaps with a requested version for the symbol.
+
+ We must never have calls to the audit functions inside this function
+ or in any function which gets called. If this would happen the audit
+ code might create a thread which can throw off all the scope locking. */
+lookup_t
+internal_function
+_dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
+ const ElfW(Sym) **ref,
+ struct r_scope_elem *symbol_scope[],
+ const struct r_found_version *version,
+ int type_class, int flags, struct link_map *skip_map)
+{
+ const uint_fast32_t new_hash = dl_new_hash (undef_name);
+ unsigned long int old_hash = 0xffffffff;
+ struct sym_val current_value = { NULL, NULL };
+ struct r_scope_elem **scope = symbol_scope;
+
+ bump_num_relocations ();
+
+ /* No other flag than DL_LOOKUP_ADD_DEPENDENCY or DL_LOOKUP_GSCOPE_LOCK
+ is allowed if we look up a versioned symbol. */
+ assert (version == NULL
+ || (flags & ~(DL_LOOKUP_ADD_DEPENDENCY | DL_LOOKUP_GSCOPE_LOCK))
+ == 0);
+
+ size_t i = 0;
+ if (__builtin_expect (skip_map != NULL, 0))
+ /* Search the relevant loaded objects for a definition. */
+ while ((*scope)->r_list[i] != skip_map)
+ ++i;
+
+ /* Search the relevant loaded objects for a definition. */
+ for (size_t start = i; *scope != NULL; start = 0, ++scope)
+ {
+ int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref,
+ ¤t_value, *scope, start, version, flags,
+ skip_map, type_class);
+ if (res > 0)
+ break;
+
+ if (__builtin_expect (res, 0) < 0 && skip_map == NULL)
+ {
+ /* Oh, oh. The file named in the relocation entry does not
+ contain the needed symbol. This code is never reached
+ for unversioned lookups. */
+ assert (version != NULL);
+ const char *reference_name = undef_map ? undef_map->l_name : NULL;
+
+ /* XXX We cannot translate the message. */
+ _dl_signal_cerror (0, (reference_name[0]
+ ? reference_name
+ : (rtld_progname ?: "<main program>")),
+ N_("relocation error"),
+ make_string ("symbol ", undef_name, ", version ",
+ version->name,
+ " not defined in file ",
+ version->filename,
+ " with link time reference",
+ res == -2
+ ? " (no version symbols)" : ""));
+ *ref = NULL;
+ return 0;
+ }
+ }
+
+ if (__builtin_expect (current_value.s == NULL, 0))
+ {
+ if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
+ && skip_map == NULL)
+ {
+ /* We could find no value for a strong reference. */
+ const char *reference_name = undef_map ? undef_map->l_name : "";
+ const char *versionstr = version ? ", version " : "";
+ const char *versionname = (version && version->name
+ ? version->name : "");
+
+ /* XXX We cannot translate the message. */
+ _dl_signal_cerror (0, (reference_name[0]
+ ? reference_name
+ : (rtld_progname ?: "<main program>")),
+ N_("symbol lookup error"),
+ make_string (undefined_msg, undef_name,
+ versionstr, versionname));
+ }
+ *ref = NULL;
+ return 0;
+ }
+
+ int protected = (*ref
+ && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED);
+ if (__builtin_expect (protected != 0, 0))
+ {
+ /* It is very tricky. We need to figure out what value to
+ return for the protected symbol. */
+ if (type_class == ELF_RTYPE_CLASS_PLT)
+ {
+ if (current_value.s != NULL && current_value.m != undef_map)
+ {
+ current_value.s = *ref;
+ current_value.m = undef_map;
+ }
+ }
+ else
+ {
+ struct sym_val protected_value = { NULL, NULL };
+
+ for (scope = symbol_scope; *scope != NULL; i = 0, ++scope)
+ if (do_lookup_x (undef_name, new_hash, &old_hash, *ref,
+ &protected_value, *scope, i, version, flags,
+ skip_map, ELF_RTYPE_CLASS_PLT) != 0)
+ break;
+
+ if (protected_value.s != NULL && protected_value.m != undef_map)
+ {
+ current_value.s = *ref;
+ current_value.m = undef_map;
+ }
+ }
+ }
+
+ /* We have to check whether this would bind UNDEF_MAP to an object
+ in the global scope which was dynamically loaded. In this case
+ we have to prevent the latter from being unloaded unless the
+ UNDEF_MAP object is also unloaded. */
+ if (__builtin_expect (current_value.m->l_type == lt_loaded, 0)
+ /* Don't do this for explicit lookups as opposed to implicit
+ runtime lookups. */
+ && (flags & DL_LOOKUP_ADD_DEPENDENCY) != 0
+ /* Add UNDEF_MAP to the dependencies. */
+ && add_dependency (undef_map, current_value.m, flags) < 0)
+ /* Something went wrong. Perhaps the object we tried to reference
+ was just removed. Try finding another definition. */
+ return _dl_lookup_symbol_x (undef_name, undef_map, ref,
+ (flags & DL_LOOKUP_GSCOPE_LOCK)
+ ? undef_map->l_scope : symbol_scope,
+ version, type_class, flags, skip_map);
+
+ /* The object is used. */
+ current_value.m->l_used = 1;
+
+ if (__builtin_expect (GLRO(dl_debug_mask)
+ & (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
+ _dl_debug_bindings (undef_name, undef_map, ref,
+ ¤t_value, version, type_class, protected);
+
+ *ref = current_value.s;
+ return LOOKUP_VALUE (current_value.m);
+}
+
+
+/* Cache the location of MAP's hash table. */
+
+void
+internal_function
+_dl_setup_hash (struct link_map *map)
+{
+ Elf_Symndx *hash;
+ Elf_Symndx nchain;
+
+ if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ + DT_EXTRANUM + DT_VALNUM] != NULL, 1))
+ {
+ Elf32_Word *hash32
+ = (void *) D_PTR (map, l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ + DT_THISPROCNUM + DT_VERSIONTAGNUM
+ + DT_EXTRANUM + DT_VALNUM]);
+ map->l_nbuckets = *hash32++;
+ Elf32_Word symbias = *hash32++;
+ Elf32_Word bitmask_nwords = *hash32++;
+ /* Must be a power of two. */
+ assert ((bitmask_nwords & (bitmask_nwords - 1)) == 0);
+ map->l_gnu_bitmask_idxbits = bitmask_nwords - 1;
+ map->l_gnu_shift = *hash32++;
+
+ map->l_gnu_bitmask = (ElfW(Addr) *) hash32;
+ hash32 += __ELF_NATIVE_CLASS / 32 * bitmask_nwords;
+
+ map->l_gnu_buckets = hash32;
+ hash32 += map->l_nbuckets;
+ map->l_gnu_chain_zero = hash32 - symbias;
+ return;
+ }
+
+ if (!map->l_info[DT_HASH])
+ return;
+ hash = (void *) D_PTR (map, l_info[DT_HASH]);
+
+ map->l_nbuckets = *hash++;
+ nchain = *hash++;
+ map->l_buckets = hash;
+ hash += map->l_nbuckets;
+ map->l_chain = hash;
+}
+
+
+static void
+internal_function
+_dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
+ const ElfW(Sym) **ref, struct sym_val *value,
+ const struct r_found_version *version, int type_class,
+ int protected)
+{
+ const char *reference_name = undef_map->l_name;
+
+ if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
+ {
+ _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
+ (reference_name[0]
+ ? reference_name
+ : (rtld_progname ?: "<main program>")),
+ undef_map->l_ns,
+ value->m->l_name[0] ? value->m->l_name : rtld_progname,
+ value->m->l_ns,
+ protected ? "protected" : "normal", undef_name);
+ if (version)
+ _dl_debug_printf_c (" [%s]\n", version->name);
+ else
+ _dl_debug_printf_c ("\n");
+ }
+#ifdef SHARED
+ if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+ {
+ int conflict = 0;
+ struct sym_val val = { NULL, NULL };
+
+ if ((GLRO(dl_trace_prelink_map) == NULL
+ || GLRO(dl_trace_prelink_map) == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
+ && undef_map != GL(dl_ns)[LM_ID_BASE]._ns_loaded)
+ {
+ const uint_fast32_t new_hash = dl_new_hash (undef_name);
+ unsigned long int old_hash = 0xffffffff;
+
+ do_lookup_x (undef_name, new_hash, &old_hash, *ref, &val,
+ undef_map->l_local_scope[0], 0, version, 0, NULL,
+ type_class);
+
+ if (val.s != value->s || val.m != value->m)
+ conflict = 1;
+ }
+
+ if (value->s
+ && (__builtin_expect (ELFW(ST_TYPE) (value->s->st_info)
+ == STT_TLS, 0)))
+ type_class = 4;
+
+ if (conflict
+ || GLRO(dl_trace_prelink_map) == undef_map
+ || GLRO(dl_trace_prelink_map) == NULL
+ || type_class == 4)
+ {
+ _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
+ conflict ? "conflict" : "lookup",
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) undef_map->l_map_start,
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) (((ElfW(Addr)) *ref) - undef_map->l_map_start),
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) (value->s ? value->m->l_map_start : 0),
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) (value->s ? value->s->st_value : 0));
+
+ if (conflict)
+ _dl_printf ("x 0x%0*Zx 0x%0*Zx ",
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) (val.s ? val.m->l_map_start : 0),
+ (int) sizeof (ElfW(Addr)) * 2,
+ (size_t) (val.s ? val.s->st_value : 0));
+
+ _dl_printf ("/%x %s\n", type_class, undef_name);
+ }
+ }
+#endif
+}
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 1b8d0f3..bca0dbe 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -25,8 +25,6 @@
#define ELF_MACHINE_NAME "MIPS"
-#define ELF_MACHINE_NO_PLT
-
#include <entry.h>
#ifndef ENTRY_POINT
@@ -55,11 +53,23 @@
".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t"
#endif
+/* Until elf/elf.h in glibc is updated. */
+#ifndef STO_MIPS_PLT
+#define STO_MIPS_PLT 0x8
+#define R_MIPS_COPY 126
+#define R_MIPS_JUMP_SLOT 127
+#define DT_MIPS_PLTGOT 0x70000032
+#endif
+
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
- This makes no sense on MIPS but we have to define this to R_MIPS_REL32
- to avoid the asserts in dl-lookup.c from blowing. */
-#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
-#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT
+ This only makes sense on MIPS when using PLTs, so choose the
+ PLT relocation (not encountered when not using PLTs). */
+#define ELF_MACHINE_JMP_SLOT R_MIPS_JUMP_SLOT
+#define elf_machine_type_class(type) \
+ ((((type) == ELF_MACHINE_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_MIPS_COPY) * ELF_RTYPE_CLASS_COPY))
+
+#define ELF_MACHINE_PLT_REL 1
/* Translate a processor specific dynamic tag to the index
in l_info array. */
@@ -73,6 +83,15 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
(ElfW(Addr)) (r); \
} while (0)
+/* Allow ABIVERSION == 1, meaning PLTs and copy relocations are
+ required. */
+#define VALID_ELF_ABIVERSION(ver) (ver == 0 || ver == 2)
+#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV)
+#define VALID_ELF_HEADER(hdr,exp,size) \
+ memcmp (hdr,exp,size-2) == 0 \
+ && VALID_ELF_OSABI (hdr[EI_OSABI]) \
+ && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
+
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute_used__
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
@@ -294,6 +313,24 @@ do { \
# define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit
# endif
+/* For a non-writable PLT, rewrite the .got.plt entry at RELOC_ADDR to
+ point at the symbol with address VALUE. For a writable PLT, rewrite
+ the corresponding PLT entry instead. */
+static inline ElfW(Addr)
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const ElfW(Rel) *reloc,
+ ElfW(Addr) *reloc_addr, ElfW(Addr) value)
+{
+ return *reloc_addr = value;
+}
+
+static inline ElfW(Addr)
+elf_machine_plt_value (struct link_map *map, const ElfW(Rel) *reloc,
+ ElfW(Addr) value)
+{
+ return value;
+}
+
#endif /* !dl_machine_h */
#ifdef RESOLVE_MAP
@@ -461,6 +498,57 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info,
#endif
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
+
+ case R_MIPS_JUMP_SLOT:
+ {
+ struct link_map *sym_map;
+ ElfW(Addr) value;
+
+ /* The addend for a jump slot relocation must always be zero:
+ calls via the PLT always branch to the symbol's address and
+ not to the address plus a non-zero offset. */
+ if (r_addend != 0)
+ _dl_signal_error (0, map->l_name, NULL,
+ "found jump slot relocation with non-zero addend");
+
+ sym_map = RESOLVE_MAP (&sym, version, r_type);
+ value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
+ *addr_field = value;
+
+ break;
+ }
+
+ case R_MIPS_COPY:
+ {
+ const ElfW(Sym) *const refsym = sym;
+ struct link_map *sym_map;
+ ElfW(Addr) value;
+
+ /* Calculate the address of the symbol. */
+ sym_map = RESOLVE_MAP (&sym, version, r_type);
+ value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
+
+ if (__builtin_expect (sym == NULL, 0))
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (__builtin_expect (sym->st_size > refsym->st_size, 0)
+ || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+ && GLRO(dl_verbose)))
+ {
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_error_printf ("\
+ %s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ rtld_progname ?: "<program name unknown>",
+ strtab + refsym->st_name);
+ }
+ memcpy (reloc_addr, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
+ break;
+ }
+
#if _MIPS_SIM == _ABI64
case R_MIPS_64:
/* For full compliance with the ELF64 ABI, one must precede the
@@ -504,9 +592,23 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
auto inline void
__attribute__((always_inline))
elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rela) *reloc)
+ ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
- /* Do nothing. */
+ ElfW(Addr) *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+ const unsigned int r_type = ELFW(R_TYPE) (reloc->r_info);
+ /* Check for unexpected PLT reloc type. */
+ if (__builtin_expect (r_type == R_MIPS_JUMP_SLOT, 1))
+ {
+ if (__builtin_expect (map->l_mach.plt, 0) == 0)
+ {
+ /* Nothing is required here since we only support lazy
+ relocation in executables. */
+ }
+ else
+ *reloc_addr = map->l_mach.plt;
+ }
+ else
+ _dl_reloc_bad_type (map, r_type, 1);
}
auto inline void
@@ -537,13 +639,13 @@ elf_machine_got_rel (struct link_map *map, int lazy)
const ElfW(Half) *vernum;
int i, n, symidx;
-#define RESOLVE_GOTSYM(sym,vernum,sym_index) \
+#define RESOLVE_GOTSYM(sym,vernum,sym_index,reloc) \
({ \
const ElfW(Sym) *ref = sym; \
const struct r_found_version *version \
= vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \
struct link_map *sym_map; \
- sym_map = RESOLVE_MAP (&ref, version, R_MIPS_REL32); \
+ sym_map = RESOLVE_MAP (&ref, version, reloc); \
ref ? sym_map->l_addr + ref->st_value : 0; \
})
@@ -584,25 +686,38 @@ elf_machine_got_rel (struct link_map *map, int lazy)
{
if (sym->st_shndx == SHN_UNDEF)
{
- if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
- && sym->st_value && lazy)
- *got = sym->st_value + map->l_addr;
+ if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC && sym->st_value
+ && !(sym->st_other & STO_MIPS_PLT))
+ {
+ if (lazy)
+ *got = sym->st_value + map->l_addr;
+ else
+ /* This is a lazy-binding stub, so we don't need the
+ canonical address. */
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_JUMP_SLOT);
+ }
else
- *got = RESOLVE_GOTSYM (sym, vernum, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32);
}
else if (sym->st_shndx == SHN_COMMON)
- *got = RESOLVE_GOTSYM (sym, vernum, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32);
else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
- && *got != sym->st_value
- && lazy)
- *got += map->l_addr;
+ && *got != sym->st_value)
+ {
+ if (lazy)
+ *got += map->l_addr;
+ else
+ /* This is a lazy-binding stub, so we don't need the
+ canonical address. */
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_JUMP_SLOT);
+ }
else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
{
if (sym->st_other == 0)
*got += map->l_addr;
}
else
- *got = RESOLVE_GOTSYM (sym, vernum, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx, R_MIPS_32);
++got;
++sym;
@@ -623,6 +738,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
# ifndef RTLD_BOOTSTRAP
ElfW(Addr) *got;
extern void _dl_runtime_resolve (ElfW(Word));
+ extern void _dl_runtime_pltresolve (void);
extern int _dl_mips_gnu_objects;
if (lazy)
@@ -649,6 +765,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* Relocate global offset table. */
elf_machine_got_rel (l, lazy);
+ /* If using PLTs, fill in the first two entries of .got.plt. */
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ ElfW(Addr) *gotplt;
+ gotplt = (ElfW(Addr) *) D_PTR (l, l_info[DT_MIPS (PLTGOT)]);
+ /* If a library is prelinked but we have to relocate anyway,
+ we have to be able to undo the prelinking of .got.plt.
+ The prelinker saved the address of .plt for us here. */
+ if (gotplt[1])
+ l->l_mach.plt = gotplt[1] + l->l_addr;
+ gotplt[0] = (ElfW(Addr)) &_dl_runtime_pltresolve;
+ gotplt[1] = (ElfW(Addr)) l;
+ }
+
# endif
return lazy;
}
diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c
index 459adf9..ff58b0d 100644
--- a/sysdeps/mips/dl-trampoline.c
+++ b/sysdeps/mips/dl-trampoline.c
@@ -200,7 +200,24 @@ __dl_runtime_resolve (ElfW(Word) sym_index,
lw $7, 28($29)\n \
"
+/* The PLT resolver should also save and restore $2 and $3, which are used
+ as arguments to MIPS16 stub functions. */
+#define ELF_DL_PLT_FRAME_SIZE 48
+
+#define ELF_DL_PLT_SAVE_ARG_REGS \
+ ELF_DL_SAVE_ARG_REGS "\
+ sw $2, 40($29)\n \
+ sw $3, 44($29)\n \
+"
+
+#define ELF_DL_PLT_RESTORE_ARG_REGS \
+ ELF_DL_RESTORE_ARG_REGS "\
+ lw $2, 40($29)\n \
+ lw $3, 44($29)\n \
+"
+
#define IFABIO32(X) X
+#define IFNEWABI(X)
#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */
@@ -230,7 +247,24 @@ __dl_runtime_resolve (ElfW(Word) sym_index,
ld $11, 64($29)\n \
"
+/* The PLT resolver should also save and restore $2 and $3, which are used
+ as arguments to MIPS16 stub functions. */
+#define ELF_DL_PLT_FRAME_SIZE 96
+
+#define ELF_DL_PLT_SAVE_ARG_REGS \
+ ELF_DL_SAVE_ARG_REGS "\
+ sd $2, 80($29)\n \
+ sd $3, 88($29)\n \
+"
+
+#define ELF_DL_PLT_RESTORE_ARG_REGS \
+ ELF_DL_RESTORE_ARG_REGS "\
+ ld $2, 80($29)\n \
+ ld $3, 88($29)\n \
+"
+
#define IFABIO32(X)
+#define IFNEWABI(X) X
#endif
@@ -270,3 +304,56 @@ _dl_runtime_resolve:\n\
.end _dl_runtime_resolve\n\
.previous\n\
");
+
+/* Assembler veneer called from the PLT header code when using PLTs.
+
+ Code in each PLT entry and the PLT header fills in the arguments to
+ this function:
+
+ - $15 (o32 t7, n32/n64 t3) - caller's return address
+ - $24 (t8) - PLT entry index
+ - $25 (t9) - address of _dl_runtime_pltresolve
+ - o32 $28 (gp), n32/n64 $14 (t2) - address of .got.plt
+
+ Different registers are used for .got.plt because the ABI was
+ originally designed for o32, where gp was available (call
+ clobbered). On n32/n64 gp is call saved.
+
+ _dl_fixup needs:
+
+ - $4 (a0) - link map address
+ - $5 (a1) - .rel.plt offset (== PLT entry index * 8) */
+
+asm ("\n\
+ .text\n\
+ .align 2\n\
+ .globl _dl_runtime_pltresolve\n\
+ .type _dl_runtime_pltresolve,@function\n\
+ .ent _dl_runtime_pltresolve\n\
+_dl_runtime_pltresolve:\n\
+ .frame $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) ", $31\n\
+ .set noreorder\n\
+ # Save arguments and sp value in stack.\n\
+ " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
+ " IFABIO32(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($28)") "\n\
+ " IFNEWABI(STRINGXP(PTR_L) " $13, " STRINGXP(PTRSIZE) "($14)") "\n\
+ # Modify t9 ($25) so as to point .cpload instruction.\n\
+ " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
+ # Compute GP.\n\
+ " STRINGXP(SETUP_GP) "\n\
+ " STRINGXV(SETUP_GP64 (0, _dl_runtime_pltresolve)) "\n\
+ .set reorder\n\
+ " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\
+ " ELF_DL_PLT_SAVE_ARG_REGS "\
+ move $4, $13\n\
+ sll $5, $24, " STRINGXP(PTRLOG) " + 1\n\
+ jal _dl_fixup\n\
+ move $25, $2\n\
+ " ELF_DL_PLT_RESTORE_ARG_REGS "\
+ " STRINGXP(RESTORE_GP64) "\n\
+ " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_PLT_FRAME_SIZE) "\n\
+ jr $25\n\
+ .end _dl_runtime_pltresolve\n\
+ .previous\n\
+");
+
diff --git a/sysdeps/mips/do-lookup.h b/sysdeps/mips/do-lookup.h
new file mode 100644
index 0000000..0d92620
--- /dev/null
+++ b/sysdeps/mips/do-lookup.h
@@ -0,0 +1,37 @@
+/* MIPS-specific veneer to GLIBC's do-lookup.h.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The semantics of zero/non-zero values of undefined symbols differs
+ depending on whether the non-PIC ABI is in use. Under the non-PIC ABI,
+ a non-zero value indicates that there is an address reference to the
+ symbol and thus it must always be resolved (except when resolving a jump
+ slot relocation) to the PLT entry whose address is provided as the
+ symbol's value; a zero value indicates that this canonical-address
+ behaviour is not required. Yet under the classic MIPS psABI, a zero value
+ indicates that there is an address reference to the function and the
+ dynamic linker must resolve the symbol immediately upon loading. To
+ avoid conflict, symbols for which the dynamic linker must assume the
+ non-PIC ABI semantics are marked with the STO_MIPS_PLT flag. The
+ following ugly hack causes the code in the platform-independent
+ do-lookup.h file to check this flag correctly. */
+#define st_value st_shndx == SHN_UNDEF && !(sym->st_other & STO_MIPS_PLT)) \
+ || (sym->st_value
+#include_next "do-lookup.h"
+#undef st_value
+
diff --git a/sysdeps/mips/tls-macros.h b/sysdeps/mips/tls-macros.h
index 2d0516b..8fe2e4a 100644
--- a/sysdeps/mips/tls-macros.h
+++ b/sysdeps/mips/tls-macros.h
@@ -1,44 +1,56 @@
/* Macros to support TLS testing in times of missing compiler support. */
-#if _MIPS_SIM != _ABI64
+#include <sys/cdefs.h>
+#include <sys/asm.h>
-/* These versions are for o32 and n32. */
+#define __STRING2(X) __STRING(X)
+#define ADDU __STRING2(PTR_ADDU)
+#define ADDIU __STRING2(PTR_ADDIU)
+#define LW __STRING2(PTR_L)
-# define TLS_GD(x) \
- ({ void *__result; \
- extern void *__tls_get_addr (void *); \
- asm ("addiu %0, $28, %%tlsgd(" #x ")" \
- : "=r" (__result)); \
- (int *)__tls_get_addr (__result); })
+/* Load the GOT pointer, which may not be in $28 in a non-PIC
+ (abicalls pic0) function. */
+#ifndef __PIC__
+# if _MIPS_SIM != _ABI64
+# define LOAD_GP "move %[tmp], $28\n\tla $28, __gnu_local_gp\n\t"
+# else
+# define LOAD_GP "move %[tmp], $28\n\tdla $28, __gnu_local_gp\n\t"
+# endif
+# define UNLOAD_GP "\n\tmove $28, %[tmp]"
#else
+# define LOAD_GP
+# define UNLOAD_GP
+#endif
+
# define TLS_GD(x) \
- ({ void *__result; \
+ ({ void *__result, *__tmp; \
extern void *__tls_get_addr (void *); \
- asm ("daddiu %0, $28, %%tlsgd(" #x ")" \
- : "=r" (__result)); \
+ asm (LOAD_GP ADDIU " %0, $28, %%tlsgd(" #x ")" \
+ UNLOAD_GP \
+ : "=r" (__result), [tmp] "=&r" (__tmp)); \
(int *)__tls_get_addr (__result); })
-#endif
-
-#if _MIPS_SIM != _ABI64
# define TLS_LD(x) \
- ({ void *__result; \
+ ({ void *__result, *__tmp; \
extern void *__tls_get_addr (void *); \
- asm ("addiu %0, $28, %%tlsldm(" #x ")" \
- : "=r" (__result)); \
+ asm (LOAD_GP ADDIU " %0, $28, %%tlsldm(" #x ")" \
+ UNLOAD_GP \
+ : "=r" (__result), [tmp] "=&r" (__tmp)); \
__result = __tls_get_addr (__result); \
asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \
"addiu $3,$3,%%dtprel_lo(" #x ")\n\t" \
- "addu %0,%0,$3" \
+ ADDU " %0,%0,$3" \
: "+r" (__result) : : "$3"); \
__result; })
# define TLS_IE(x) \
- ({ void *__result; \
+ ({ void *__result, *__tmp; \
asm (".set push\n\t.set mips32r2\n\t" \
"rdhwr\t%0,$29\n\t.set pop" \
: "=v" (__result)); \
- asm ("lw $3,%%gottprel(" #x ")($28)\n\t" \
- "addu %0,%0,$3" \
- : "+r" (__result) : : "$3"); \
+ asm (LOAD_GP LW " $3,%%gottprel(" #x ")($28)\n\t" \
+ ADDU " %0,%0,$3" \
+ UNLOAD_GP \
+ : "+r" (__result), [tmp] "=&r" (__tmp) \
+ : : "$3"); \
__result; })
# define TLS_LE(x) \
({ void *__result; \
@@ -47,42 +59,6 @@
: "=v" (__result)); \
asm ("lui $3,%%tprel_hi(" #x ")\n\t" \
"addiu $3,$3,%%tprel_lo(" #x ")\n\t" \
- "addu %0,%0,$3" \
+ ADDU " %0,%0,$3" \
: "+r" (__result) : : "$3"); \
__result; })
-
-#else
-
-/* These versions are for n64. */
-
-# define TLS_LD(x) \
- ({ void *__result; \
- extern void *__tls_get_addr (void *); \
- asm ("daddiu %0, $28, %%tlsldm(" #x ")" \
- : "=r" (__result)); \
- __result = __tls_get_addr (__result); \
- asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \
- "daddiu $3,$3,%%dtprel_lo(" #x ")\n\t" \
- "daddu %0,%0,$3" \
- : "+r" (__result) : : "$3"); \
- __result; })
-# define TLS_IE(x) \
- ({ void *__result; \
- asm (".set push\n\t.set mips32r2\n\t" \
- "rdhwr\t%0,$29\n\t.set pop" \
- : "=v" (__result)); \
- asm ("ld $3,%%gottprel(" #x ")($28)\n\t" \
- "daddu %0,%0,$3" \
- : "+r" (__result) : : "$3"); \
- __result; })
-# define TLS_LE(x) \
- ({ void *__result; \
- asm (".set push\n\t.set mips32r2\n\t" \
- "rdhwr\t%0,$29\n\t.set pop" \
- : "=v" (__result)); \
- asm ("lui $3,%%tprel_hi(" #x ")\n\t" \
- "daddiu $3,$3,%%tprel_lo(" #x ")\n\t" \
- "daddu %0,%0,$3" \
- : "+r" (__result) : : "$3"); \
- __result; })
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 089fa9d..c3d59dd 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -35,15 +35,7 @@
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
-#ifdef __ASSEMBLER__
-
-/* We don't want the label for the error handler to be visible in the symbol
- table when we define it here. */
-#ifdef __PIC__
-# define SYSCALL_ERROR_LABEL 99b
-#endif
-
-#else /* ! __ASSEMBLER__ */
+#ifndef __ASSEMBLER__
/* Define a macro which expands into the inline wrapper code for a system
call. */
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
index f2bf2d7..85ceff5 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
@@ -25,28 +25,38 @@
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-#ifdef __PIC__
+# ifdef __PIC__
+# define PSEUDO_CPLOAD .cpload t9;
+# define PSEUDO_ERRJMP la t9, __syscall_error; jr t9;
+# define PSEUDO_SAVEGP sw gp, 32(sp); cfi_rel_offset (gp, 32);
+# define PSEUDO_LOADGP lw gp, 32(sp);
+# else
+# define PSEUDO_CPLOAD
+# define PSEUDO_ERRJMP j __syscall_error;
+# define PSEUDO_SAVEGP
+# define PSEUDO_LOADGP
+# endif
+
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
.align 2; \
L(pseudo_start): \
cfi_startproc; \
- 99: la t9,__syscall_error; \
- jr t9; \
+ 99: PSEUDO_ERRJMP \
.type __##syscall_name##_nocancel, @function; \
.globl __##syscall_name##_nocancel; \
__##syscall_name##_nocancel: \
.set noreorder; \
- .cpload t9; \
+ PSEUDO_CPLOAD \
li v0, SYS_ify(syscall_name); \
syscall; \
.set reorder; \
- bne a3, zero, SYSCALL_ERROR_LABEL; \
+ bne a3, zero, 99b; \
ret; \
.size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
ENTRY (name) \
.set noreorder; \
- .cpload t9; \
+ PSEUDO_CPLOAD \
.set reorder; \
SINGLE_THREAD_P(v1); \
bne zero, v1, L(pseudo_cancel); \
@@ -54,17 +64,16 @@
li v0, SYS_ify(syscall_name); \
syscall; \
.set reorder; \
- bne a3, zero, SYSCALL_ERROR_LABEL; \
+ bne a3, zero, 99b; \
ret; \
L(pseudo_cancel): \
SAVESTK_##args; \
sw ra, 28(sp); \
cfi_rel_offset (ra, 28); \
- sw gp, 32(sp); \
- cfi_rel_offset (gp, 32); \
+ PSEUDO_SAVEGP \
PUSHARGS_##args; /* save syscall args */ \
CENABLE; \
- lw gp, 32(sp); \
+ PSEUDO_LOADGP \
sw v0, 44(sp); /* save mask */ \
POPARGS_##args; /* restore syscall args */ \
.set noreorder; \
@@ -75,12 +84,12 @@
sw a3, 40(sp); /* save syscall error flag */ \
lw a0, 44(sp); /* pass mask as arg1 */ \
CDISABLE; \
- lw gp, 32(sp); \
+ PSEUDO_LOADGP \
lw v0, 36(sp); /* restore syscall result */ \
lw a3, 40(sp); /* restore syscall error flag */ \
lw ra, 28(sp); /* restore return address */ \
.set noreorder; \
- bne a3, zero, SYSCALL_ERROR_LABEL; \
+ bne a3, zero, 99b; \
RESTORESTK; \
L(pseudo_end): \
.set reorder;
@@ -88,8 +97,6 @@
# undef PSEUDO_END
# define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
-#endif
-
# define PUSHARGS_0 /* nothing to do */
# define PUSHARGS_1 PUSHARGS_0 sw a0, 0(sp); cfi_rel_offset (a0, 0);
# define PUSHARGS_2 PUSHARGS_1 sw a1, 4(sp); cfi_rel_offset (a1, 4);
@@ -136,19 +143,25 @@
# define RESTORESTK addu sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE)
+# ifdef __PIC__
/* We use jalr rather than jal. This means that the assembler will not
automatically restore $gp (in case libc has multiple GOTs) so we must
do it manually - which we have to do anyway since we don't use .cprestore.
It also shuts up the assembler warning about not using .cprestore. */
+# define PSEUDO_JMP(sym) la t9, sym; jalr t9;
+# else
+# define PSEUDO_JMP(sym) jal sym;
+# endif
+
# ifdef IS_IN_libpthread
-# define CENABLE la t9, __pthread_enable_asynccancel; jalr t9;
-# define CDISABLE la t9, __pthread_disable_asynccancel; jalr t9;
+# define CENABLE PSEUDO_JMP (__pthread_enable_asynccancel)
+# define CDISABLE PSEUDO_JMP (__pthread_disable_asynccancel)
# elif defined IS_IN_librt
-# define CENABLE la t9, __librt_enable_asynccancel; jalr t9;
-# define CDISABLE la t9, __librt_disable_asynccancel; jalr t9;
+# define CENABLE PSEUDO_JMP (__librt_enable_asynccancel)
+# define CDISABLE PSEUDO_JMP (__librt_disable_asynccancel)
# else
-# define CENABLE la t9, __libc_enable_asynccancel; jalr t9;
-# define CDISABLE la t9, __libc_disable_asynccancel; jalr t9;
+# define CENABLE PSEUDO_JMP (__libc_enable_asynccancel)
+# define CDISABLE PSEUDO_JMP (__libc_disable_asynccancel)
# endif
# ifndef __ASSEMBLER__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a961a11ea20b9390c863fac1ea8a8b5f0c102ce1
commit a961a11ea20b9390c863fac1ea8a8b5f0c102ce1
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 19 16:53:11 2008 +0000
* sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2
to epoll_create1.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 0e6a06b..065ac68 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2008-08-19 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/sys/epoll.h: Change epoll_create2
+ to epoll_create1.
+
+2008-08-19 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC,
SOCK_NONBLOCK, PF_ISDN and AF_ISDN.
* sysdeps/unix/sysv/linux/mips/sys/epoll.h: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h
index 72bed46..6d2ec8e 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h
@@ -31,7 +31,7 @@ typedef __sigset_t sigset_t;
#endif
-/* Flags to be passed to epoll_create2. */
+/* Flags to be passed to epoll_create1. */
enum
{
EPOLL_CLOEXEC = 02000000,
@@ -101,8 +101,9 @@ __BEGIN_DECLS
returned by epoll_create() should be closed with close(). */
extern int epoll_create (int __size) __THROW;
-/* Same as epoll_create but with an additional FLAGS parameter. */
-extern int epoll_create2 (int __size, int __flags) __THROW;
+/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
+ parameter has been dropped. */
+extern int epoll_create1 (int __flags) __THROW;
/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72e2fdef91d3f504d91e0227e0ec98b7650d8c49
commit 72e2fdef91d3f504d91e0227e0ec98b7650d8c49
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 19 16:12:35 2008 +0000
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC,
SOCK_NONBLOCK, PF_ISDN and AF_ISDN.
* sysdeps/unix/sysv/linux/mips/sys/epoll.h: New file.
* sysdeps/unix/sysv/linux/mips/sys/eventfd.h: New file.
* sysdeps/unix/sysv/linux/mips/sys/inotify.h: New file.
* sysdeps/unix/sysv/linux/mips/sys/signalfd.h: New file.
* sysdeps/unix/sysv/linux/mips/sys/timerfd.h: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 409c2c9..0e6a06b 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,15 @@
2008-08-19 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Define SOCK_CLOEXEC,
+ SOCK_NONBLOCK, PF_ISDN and AF_ISDN.
+ * sysdeps/unix/sysv/linux/mips/sys/epoll.h: New file.
+ * sysdeps/unix/sysv/linux/mips/sys/eventfd.h: New file.
+ * sysdeps/unix/sysv/linux/mips/sys/inotify.h: New file.
+ * sysdeps/unix/sysv/linux/mips/sys/signalfd.h: New file.
+ * sysdeps/unix/sysv/linux/mips/sys/timerfd.h: New file.
+
+2008-08-19 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms
volatile.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index f3adf5f..4f219d5 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -54,10 +54,20 @@ enum __socket_type
#define SOCK_SEQPACKET SOCK_SEQPACKET
SOCK_DCCP = 6,
#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
- SOCK_PACKET = 10 /* Linux specific way of getting packets
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
at the dev level. For writing rarp and
other similar things on the user level. */
#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
};
/* Protocol families. */
@@ -92,7 +102,8 @@ enum __socket_type
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_IUCV 32 /* IUCV sockets. */
#define PF_RXRPC 33 /* RxRPC sockets. */
-#define PF_MAX 34 /* For now.. */
+#define PF_ISDN 34 /* mISDN sockets. */
+#define PF_MAX 35 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -126,6 +137,7 @@ enum __socket_type
#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_IUCV PF_IUCV
#define AF_RXRPC PF_RXRPC
+#define AF_ISDN PF_ISDN
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/epoll.h b/sysdeps/unix/sysv/linux/mips/sys/epoll.h
new file mode 100644
index 0000000..72bed46
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/epoll.h
@@ -0,0 +1,143 @@
+/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EPOLL_H
+#define _SYS_EPOLL_H 1
+
+#include <stdint.h>
+#include <sys/types.h>
+
+/* Get __sigset_t. */
+#include <bits/sigset.h>
+
+#ifndef __sigset_t_defined
+# define __sigset_t_defined
+typedef __sigset_t sigset_t;
+#endif
+
+
+/* Flags to be passed to epoll_create2. */
+enum
+ {
+ EPOLL_CLOEXEC = 02000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+ EPOLL_NONBLOCK = 0200
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+ };
+
+
+enum EPOLL_EVENTS
+ {
+ EPOLLIN = 0x001,
+#define EPOLLIN EPOLLIN
+ EPOLLPRI = 0x002,
+#define EPOLLPRI EPOLLPRI
+ EPOLLOUT = 0x004,
+#define EPOLLOUT EPOLLOUT
+ EPOLLRDNORM = 0x040,
+#define EPOLLRDNORM EPOLLRDNORM
+ EPOLLRDBAND = 0x080,
+#define EPOLLRDBAND EPOLLRDBAND
+ EPOLLWRNORM = 0x100,
+#define EPOLLWRNORM EPOLLWRNORM
+ EPOLLWRBAND = 0x200,
+#define EPOLLWRBAND EPOLLWRBAND
+ EPOLLMSG = 0x400,
+#define EPOLLMSG EPOLLMSG
+ EPOLLERR = 0x008,
+#define EPOLLERR EPOLLERR
+ EPOLLHUP = 0x010,
+#define EPOLLHUP EPOLLHUP
+ EPOLLRDHUP = 0x2000,
+#define EPOLLRDHUP EPOLLRDHUP
+ EPOLLONESHOT = (1 << 30),
+#define EPOLLONESHOT EPOLLONESHOT
+ EPOLLET = (1 << 31)
+#define EPOLLET EPOLLET
+ };
+
+
+/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
+#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
+#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
+#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
+
+
+typedef union epoll_data
+{
+ void *ptr;
+ int fd;
+ uint32_t u32;
+ uint64_t u64;
+} epoll_data_t;
+
+struct epoll_event
+{
+ uint32_t events; /* Epoll events */
+ epoll_data_t data; /* User data variable */
+};
+
+
+__BEGIN_DECLS
+
+/* Creates an epoll instance. Returns an fd for the new instance.
+ The "size" parameter is a hint specifying the number of file
+ descriptors to be associated with the new instance. The fd
+ returned by epoll_create() should be closed with close(). */
+extern int epoll_create (int __size) __THROW;
+
+/* Same as epoll_create but with an additional FLAGS parameter. */
+extern int epoll_create2 (int __size, int __flags) __THROW;
+
+
+/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
+ -1 in case of error ( the "errno" variable will contain the
+ specific error code ) The "op" parameter is one of the EPOLL_CTL_*
+ constants defined above. The "fd" parameter is the target of the
+ operation. The "event" parameter describes which events the caller
+ is interested in and any associated user data. */
+extern int epoll_ctl (int __epfd, int __op, int __fd,
+ struct epoll_event *__event) __THROW;
+
+
+/* Wait for events on an epoll instance "epfd". Returns the number of
+ triggered events returned in "events" buffer. Or -1 in case of
+ error with the "errno" variable set to the specific error code. The
+ "events" parameter is a buffer that will contain triggered
+ events. The "maxevents" is the maximum number of events to be
+ returned ( usually size of "events" ). The "timeout" parameter
+ specifies the maximum wait time in milliseconds (-1 == infinite).
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout);
+
+
+/* Same as epoll_wait, but the thread's signal mask is temporarily
+ and atomically replaced with the one provided as parameter.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_pwait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout,
+ __const __sigset_t *__ss);
+
+__END_DECLS
+
+#endif /* sys/epoll.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/eventfd.h b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
new file mode 100644
index 0000000..fa34c8c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/eventfd.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EVENTFD_H
+#define _SYS_EVENTFD_H 1
+
+#include <stdint.h>
+
+
+/* Type for event counter. */
+typedef uint64_t eventfd_t;
+
+/* Flags for signalfd. */
+enum
+ {
+ EFD_CLOEXEC = 02000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 0200
+#define EFD_NONBLOCK EFD_NONBLOCK
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for generic event channel. Set initial
+ value to COUNT. */
+extern int eventfd (int __count, int __flags) __THROW;
+
+/* Read event counter and possibly wait for events. */
+extern int eventfd_read (int __fd, eventfd_t *__value);
+
+/* Increment event counter. */
+extern int eventfd_write (int __fd, eventfd_t value);
+
+__END_DECLS
+
+#endif /* sys/eventfd.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/inotify.h b/sysdeps/unix/sysv/linux/mips/sys/inotify.h
new file mode 100644
index 0000000..a811c7f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/inotify.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_INOTIFY_H
+#define _SYS_INOTIFY_H 1
+
+#include <stdint.h>
+
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 02000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 0200
+#define IN_NONBLOCK IN_NONBLOCK
+ };
+
+
+/* Structure describing an inotify event. */
+struct inotify_event
+{
+ int wd; /* Watch descriptor. */
+ uint32_t mask; /* Watch mask. */
+ uint32_t cookie; /* Cookie to synchronize two events. */
+ uint32_t len; /* Length (including NULs) of name. */
+ char name __flexarr; /* Name. */
+};
+
+
+/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
+#define IN_ACCESS 0x00000001 /* File was accessed. */
+#define IN_MODIFY 0x00000002 /* File was modified. */
+#define IN_ATTRIB 0x00000004 /* Metadata changed. */
+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_OPEN 0x00000020 /* File was opened. */
+#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
+#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+#define IN_CREATE 0x00000100 /* Subfile was created. */
+#define IN_DELETE 0x00000200 /* Subfile was deleted. */
+#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
+#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
+
+/* Events sent by the kernel. */
+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
+#define IN_IGNORED 0x00008000 /* File was ignored. */
+
+/* Helper events. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+
+/* Special flags. */
+#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
+ directory. */
+#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
+#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
+ existing watch. */
+#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
+#define IN_ONESHOT 0x80000000 /* Only send event once. */
+
+/* All events which a program can wait on. */
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
+ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
+ | IN_MOVED_TO | IN_CREATE | IN_DELETE \
+ | IN_DELETE_SELF | IN_MOVE_SELF)
+
+
+__BEGIN_DECLS
+
+/* Create and initialize inotify instance. */
+extern int inotify_init (void) __THROW;
+
+/* Create and initialize inotify instance. */
+extern int inotify_init1 (int __flags) __THROW;
+
+/* Add watch of object NAME to inotify instance FD. Notify about
+ events specified by MASK. */
+extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
+ __THROW;
+
+/* Remove the watch specified by WD from the inotify instance FD. */
+extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+
+__END_DECLS
+
+#endif /* sys/inotify.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/signalfd.h b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h
new file mode 100644
index 0000000..2fe7e37
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/signalfd.h
@@ -0,0 +1,66 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SIGNALFD_H
+#define _SYS_SIGNALFD_H 1
+
+#define __need_sigset_t
+#include <signal.h>
+#include <stdint.h>
+
+
+struct signalfd_siginfo
+{
+ uint32_t ssi_signo;
+ int32_t ssi_errno;
+ int32_t ssi_code;
+ uint32_t ssi_pid;
+ uint32_t ssi_uid;
+ int32_t ssi_fd;
+ uint32_t ssi_tid;
+ uint32_t ssi_band;
+ uint32_t ssi_overrun;
+ uint32_t ssi_trapno;
+ int32_t ssi_status;
+ int32_t ssi_int;
+ uint64_t ssi_ptr;
+ uint64_t ssi_utime;
+ uint64_t ssi_stime;
+ uint64_t ssi_addr;
+ uint8_t __pad[48];
+};
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 02000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 0200
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
+
+__BEGIN_DECLS
+
+/* Request notification for delivery of signals in MASK to be
+ performed using descriptor FD.*/
+extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
+ __nonnull ((2)) __THROW;
+
+__END_DECLS
+
+#endif /* sys/signalfd.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/timerfd.h b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h
new file mode 100644
index 0000000..ebd37ff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/timerfd.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_TIMERFD_H
+#define _SYS_TIMERFD_H 1
+
+#include <time.h>
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 02000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 0200
+#define TFD_NONBLOCK TFD_NONBLOCK
+ };
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
+enum
+ {
+ TFD_TIMER_ABSTIME = 1 << 0
+#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for new interval timer source. */
+extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
+
+/* Set next expiration time of interval timer source UFD to UTMR. If
+ FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
+ absolute. Optionally return the old expiration time in OTMR. */
+extern int timerfd_settime (int __ufd, int __flags,
+ __const struct itimerspec *__utmr,
+ struct itimerspec *__otmr) __THROW;
+
+/* Return the next expiration time of UFD. */
+extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/timerfd.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d6729c9db4b3a27b3b344bb2125ed16d71aaf72
commit 7d6729c9db4b3a27b3b344bb2125ed16d71aaf72
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 19 16:06:38 2008 +0000
* sysdeps/powerpc/nofpu/shlib-versions: New.
* c++-types-powerpcsoft-linux-gnu.data: New.
* localplt-powerpcsoft-linux-gnu.data: New.
* sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Use
__fegetenv.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 463dd29..136f97a 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,11 @@
+2008-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/powerpc/nofpu/shlib-versions: New.
+ * c++-types-powerpcsoft-linux-gnu.data: New.
+ * localplt-powerpcsoft-linux-gnu.data: New.
+ * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Use
+ __fegetenv.
+
2007-08-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not
diff --git a/data/c++-types-powerpcsoft-linux-gnu.data b/data/c++-types-powerpcsoft-linux-gnu.data
new file mode 100644
index 0000000..fde53bf
--- /dev/null
+++ b/data/c++-types-powerpcsoft-linux-gnu.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/data/localplt-powerpcsoft-linux-gnu.data b/data/localplt-powerpcsoft-linux-gnu.data
new file mode 100644
index 0000000..65fa5da
--- /dev/null
+++ b/data/localplt-powerpcsoft-linux-gnu.data
@@ -0,0 +1,41 @@
+libc.so: _Unwind_Find_FDE
+libc.so: __adddf3
+libc.so: __addsf3
+libc.so: __divdf3
+libc.so: __divsf3
+libc.so: __eqdf2
+libc.so: __eqsf2
+libc.so: __extendsfdf2
+libc.so: __fixdfsi
+libc.so: __fixsfsi
+libc.so: __fixunsdfsi
+libc.so: __floatsidf
+libc.so: __floatsisf
+libc.so: __floatunsidf
+libc.so: __floatunsisf
+libc.so: __gedf2
+libc.so: __gtdf2
+libc.so: __ledf2
+libc.so: __ltdf2
+libc.so: __muldf3
+libc.so: __mulsf3
+libc.so: __nedf2
+libc.so: __signbit
+libc.so: __signbitl
+libc.so: __subdf3
+libc.so: __subsf3
+libc.so: __truncdfsf2
+libc.so: __unorddf2
+libc.so: abort
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: memalign
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: __signbitl
+libm.so: copysignl
+libm.so: fabsl
+libm.so: fegetround
+libm.so: matherr
diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c
index ade9d19..4074ac0 100644
--- a/sysdeps/powerpc/nofpu/feholdexcpt.c
+++ b/sysdeps/powerpc/nofpu/feholdexcpt.c
@@ -1,6 +1,6 @@
/* Store current floating-point environment and clear exceptions
(soft-float edition).
- Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -28,7 +28,7 @@ feholdexcept (fenv_t *envp)
fenv_union_t u;
/* Get the current state. */
- fegetenv (envp);
+ __fegetenv (envp);
u.fenv = *envp;
/* Clear everything except the rounding mode. */
diff --git a/sysdeps/powerpc/nofpu/shlib-versions b/sysdeps/powerpc/nofpu/shlib-versions
new file mode 100644
index 0000000..72085dd
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/shlib-versions
@@ -0,0 +1 @@
+powerpc.*-.*-.* ABI powerpcsoft-@OS@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5de92c17d793598f429917e2520c31b45e5d6111
commit 5de92c17d793598f429917e2520c31b45e5d6111
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 19 15:59:07 2008 +0000
* data/c++-types-arm-linux-gnueabi.data: New.
* data/localplt-arm-linux-gnueabi.data: New.
* sysdeps/arm/bsd-_setjmp.S: Use HIDDEN_JUMPTARGET to call
__sigsetjmp.
* sysdeps/arm/bsd-setjmp.S: Likewise.
* sysdeps/arm/eabi/aeabi_localeconv.c: Use __localeconv.
* sysdeps/arm/eabi/find_exidx.c (__gnu_Unwind_Find_exidx): Use
__dl_iterate_phdr.
* sysdeps/arm/eabi/setjmp.S: Add hidden_def (__sigsetjmp).
* sysdeps/arm/memmove.S: Use HIDDEN_JUMPTARGET to call memcpy from
within libc.
* sysdeps/arm/setjmp.S: Add hidden_def (__sigsetjmp).
* sysdeps/unix/sysv/linux/arm/clone.S: Use HIDDEN_JUMPTARGET to
call _exit.
* sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use __sysctl,
__readlink and fgets_unlocked.
(_ioperm): Use __open and __close.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5cca360..e409001 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,23 @@
+2008-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ * data/c++-types-arm-linux-gnueabi.data: New.
+ * data/localplt-arm-linux-gnueabi.data: New.
+ * sysdeps/arm/bsd-_setjmp.S: Use HIDDEN_JUMPTARGET to call
+ __sigsetjmp.
+ * sysdeps/arm/bsd-setjmp.S: Likewise.
+ * sysdeps/arm/eabi/aeabi_localeconv.c: Use __localeconv.
+ * sysdeps/arm/eabi/find_exidx.c (__gnu_Unwind_Find_exidx): Use
+ __dl_iterate_phdr.
+ * sysdeps/arm/eabi/setjmp.S: Add hidden_def (__sigsetjmp).
+ * sysdeps/arm/memmove.S: Use HIDDEN_JUMPTARGET to call memcpy from
+ within libc.
+ * sysdeps/arm/setjmp.S: Add hidden_def (__sigsetjmp).
+ * sysdeps/unix/sysv/linux/arm/clone.S: Use HIDDEN_JUMPTARGET to
+ call _exit.
+ * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Use __sysctl,
+ __readlink and fgets_unlocked.
+ (_ioperm): Use __open and __close.
+
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/eabi/fgetexcptflg.c: New.
diff --git a/data/c++-types-arm-linux-gnueabi.data b/data/c++-types-arm-linux-gnueabi.data
new file mode 100644
index 0000000..fde53bf
--- /dev/null
+++ b/data/c++-types-arm-linux-gnueabi.data
@@ -0,0 +1,67 @@
+blkcnt64_t:x
+blkcnt_t:l
+blksize_t:l
+caddr_t:Pc
+clockid_t:i
+clock_t:l
+daddr_t:i
+dev_t:y
+fd_mask:l
+fsblkcnt64_t:y
+fsblkcnt_t:m
+fsfilcnt64_t:y
+fsfilcnt_t:m
+fsid_t:8__fsid_t
+gid_t:j
+id_t:j
+ino64_t:y
+ino_t:m
+int16_t:s
+int32_t:i
+int64_t:x
+int8_t:a
+intptr_t:i
+key_t:i
+loff_t:x
+mode_t:j
+nlink_t:j
+off64_t:x
+off_t:l
+pid_t:i
+pthread_attr_t:14pthread_attr_t
+pthread_barrier_t:17pthread_barrier_t
+pthread_barrierattr_t:21pthread_barrierattr_t
+pthread_cond_t:14pthread_cond_t
+pthread_condattr_t:18pthread_condattr_t
+pthread_key_t:j
+pthread_mutex_t:15pthread_mutex_t
+pthread_mutexattr_t:19pthread_mutexattr_t
+pthread_once_t:i
+pthread_rwlock_t:16pthread_rwlock_t
+pthread_rwlockattr_t:20pthread_rwlockattr_t
+pthread_spinlock_t:i
+pthread_t:m
+quad_t:x
+register_t:i
+rlim64_t:y
+rlim_t:m
+sigset_t:10__sigset_t
+size_t:j
+socklen_t:j
+ssize_t:i
+suseconds_t:l
+time_t:l
+u_char:h
+uid_t:j
+uint:j
+u_int:j
+u_int16_t:t
+u_int32_t:j
+u_int64_t:y
+u_int8_t:h
+ulong:m
+u_long:m
+u_quad_t:y
+useconds_t:j
+ushort:t
+u_short:t
diff --git a/data/localplt-arm-linux-gnueabi.data b/data/localplt-arm-linux-gnueabi.data
new file mode 100644
index 0000000..109522e
--- /dev/null
+++ b/data/localplt-arm-linux-gnueabi.data
@@ -0,0 +1,13 @@
+libc.so: __signbit
+libc.so: calloc
+libc.so: free
+libc.so: fscanf
+libc.so: malloc
+libc.so: memalign
+libc.so: raise
+libc.so: realloc
+libm.so: __signbit
+libm.so: __signbitf
+libm.so: matherr
+libpthread.so: __errno_location
+libpthread.so: raise
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index c4a094e..c3a4383 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version.
- Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,6 @@
ENTRY (_setjmp)
mov r1, #0
- b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
+ b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp))
END (_setjmp)
libc_hidden_def (_setjmp)
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
index d227ba6..36c571c 100644
--- a/sysdeps/arm/bsd-setjmp.S
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,5 @@
ENTRY (setjmp)
mov r1, #1
- b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
+ b PLTJMP(HIDDEN_JUMPTARGET(__sigsetjmp))
END (setjmp)
diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c
index f4e51d0..323148e 100644
--- a/sysdeps/arm/eabi/aeabi_localeconv.c
+++ b/sysdeps/arm/eabi/aeabi_localeconv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,5 +21,5 @@
struct lconv *
__aeabi_localeconv (void)
{
- return localeconv ();
+ return __localeconv ();
}
diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c
index 9e4f401..59b33de 100644
--- a/sysdeps/arm/eabi/find_exidx.c
+++ b/sysdeps/arm/eabi/find_exidx.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -72,7 +72,7 @@ __gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
data.pc = pc;
data.exidx_start = 0;
- if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
+ if (__dl_iterate_phdr (find_exidx_callback, &data) <= 0)
return 0;
*pcount = data.exidx_len / 8;
diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S
index b7d2400..835db71 100644
--- a/sysdeps/arm/eabi/setjmp.S
+++ b/sysdeps/arm/eabi/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -94,3 +94,4 @@ Lhwcap:
END (__sigsetjmp)
+hidden_def (__sigsetjmp)
diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S
index 2dd0790..eda1bcc 100644
--- a/sysdeps/arm/memmove.S
+++ b/sysdeps/arm/memmove.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
@@ -66,7 +66,11 @@ ENTRY(memmove)
subs ip, r0, r1
cmphi r2, ip
+#ifdef NOT_IN_libc
bls memcpy
+#else
+ bls HIDDEN_JUMPTARGET(memcpy)
+#endif
stmfd sp!, {r0, r4, lr}
add r1, r1, r2
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 2e8c694..3fff9e9 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ ENTRY (__sigsetjmp)
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
END (__sigsetjmp)
+
+hidden_def (__sigsetjmp)
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 6c8f8e8..cfd2e7e 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -100,7 +100,7 @@ ENTRY(__clone)
ldr pc, [sp], #8
@ and we are done, passing the return value through r0
- b PLTJMP(_exit)
+ b PLTJMP(HIDDEN_JUMPTARGET(_exit))
PSEUDO_END (__clone)
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 1fa849d..8af1ea3 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -110,14 +110,14 @@ init_iosys (void)
static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
size_t len = sizeof(io.base);
- if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
- && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
+ if (! __sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+ && ! __sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
{
io.initdone = 1;
return 0;
}
- n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
+ n = __readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
if (n > 0)
{
systype[n] = '\0';
@@ -144,7 +144,7 @@ init_iosys (void)
if (n == 1)
break;
else
- fgets (systype, 256, fp);
+ fgets_unlocked (systype, 256, fp);
}
fclose (fp);
@@ -195,7 +195,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
int fd;
- fd = open ("/dev/mem", O_RDWR);
+ fd = __open ("/dev/mem", O_RDWR);
if (fd < 0)
return -1;
@@ -203,7 +203,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
(unsigned long int) __mmap (0, MAX_PORT << io.shift,
PROT_READ | PROT_WRITE,
MAP_SHARED, fd, io.io_base);
- close (fd);
+ __close (fd);
if ((long) io.base == -1)
return -1;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=606c1b1771ed7673a74aa97c8f1c47c64e94e5fb
commit 606c1b1771ed7673a74aa97c8f1c47c64e94e5fb
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 19 15:54:50 2008 +0000
* sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms
volatile.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index e7aee50..409c2c9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-08-19 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/fpu_control.h (_FPU_GETCW, _FPU_SETCW): Make asms
+ volatile.
+
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index 5712ac5..eb71928 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -1,5 +1,6 @@
/* FPU control word bits. Mips version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2008
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe and Ralf Baechle.
@@ -100,8 +101,8 @@ extern fpu_control_t __fpu_control;
typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw))
-#define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw))
+#define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw))
+#define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0a39e1daf2a06bada8990e352aa890f3929df1c
commit d0a39e1daf2a06bada8990e352aa890f3929df1c
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Aug 10 08:43:09 2008 +0000
2008-08-10 Joseph Myers <joseph@codesourcery.com>
* sysdeps/m68k/bits/byteswap.h: Allow inclusion from <endian.h>.
(__bswap_constant_16): Define.
(__bswap_16): Allow arguments with side effects.
(__bswap_constant_32): Ensure result is unsigned.
(__bswap_32): Define as inline function in fallback case.
(__bswap_constant_64): Define.
(__bswap_64): Use it for constant arguments.
* sysdeps/m68k/bits/setjmp.h (__jmp_buf): Give name to structure
type.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Only allow inclusion
from <math.h>. Do not use extern inline directly.
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Include <bits/uio.h>.
(O_CLOEXEC, SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
SYNC_FILE_RANGE_WAIT_AFTER, SPLICE_F_MOVE, SPLICE_F_NONBLOCK,
SPLICE_F_MORE, SPLICE_F_GIFT): Define.
(sync_file_range, vmsplice, splice, tee): Declare.
* sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_REMOVE): Define.
* sysdeps/unix/sysv/linux/m68k/bits/poll.h (POLLMSG, POLLREMOVE,
POLLRDHUP): Define.
* sysdeps/unix/sysv/linux/m68k/bits/stat.h (UTIME_NOW,
UTIME_OMIT): Define.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h: New.
* sysdeps/unix/sysv/linux/m68k/sys/user.h: New.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index b6aa316..c399a48 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,29 @@
+2008-08-10 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/m68k/bits/byteswap.h: Allow inclusion from <endian.h>.
+ (__bswap_constant_16): Define.
+ (__bswap_16): Allow arguments with side effects.
+ (__bswap_constant_32): Ensure result is unsigned.
+ (__bswap_32): Define as inline function in fallback case.
+ (__bswap_constant_64): Define.
+ (__bswap_64): Use it for constant arguments.
+ * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Give name to structure
+ type.
+ * sysdeps/m68k/m680x0/fpu/bits/mathinline.h: Only allow inclusion
+ from <math.h>. Do not use extern inline directly.
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Include <bits/uio.h>.
+ (O_CLOEXEC, SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
+ SYNC_FILE_RANGE_WAIT_AFTER, SPLICE_F_MOVE, SPLICE_F_NONBLOCK,
+ SPLICE_F_MORE, SPLICE_F_GIFT): Define.
+ (sync_file_range, vmsplice, splice, tee): Declare.
+ * sysdeps/unix/sysv/linux/m68k/bits/mman.h (MADV_REMOVE): Define.
+ * sysdeps/unix/sysv/linux/m68k/bits/poll.h (POLLMSG, POLLREMOVE,
+ POLLRDHUP): Define.
+ * sysdeps/unix/sysv/linux/m68k/bits/stat.h (UTIME_NOW,
+ UTIME_OMIT): Define.
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h: New.
+ * sysdeps/unix/sysv/linux/m68k/sys/user.h: New.
+
2008-03-28 Maxim Kuvyrkov <maxim@codesourcery.com>
Explicitly get address of _DYNAMIC.
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index 41b386b..a2546c9 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. m68k version.
- Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
@@ -27,13 +27,25 @@
/* Swap bytes in 16 bit value. We don't provide an assembler version
because GCC is smart enough to generate optimal assembler output, and
this allows for better cse. */
-#define __bswap_16(x) \
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+#define __bswap_constant_16(x) \
+ ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+
+#ifdef __GNUC__
+# define __bswap_16(x) \
+ (__extension__ \
+ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
+#else
+static __inline unsigned short int
+__bswap_16 (unsigned short int __bsx)
+{
+ return __bswap_constant_16 (__bsx);
+}
+#endif
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
- ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
- (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
#if defined __GNUC__ && __GNUC__ >= 2 && !defined(__mcoldfire__)
# define __bswap_32(x) \
@@ -49,18 +61,38 @@
: "0" ((unsigned int) (x))); \
__bswap_32_v; })
#else
-# define __bswap_32(x) __bswap_constant_32 (x)
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+ return __bswap_constant_32 (__bsx);
+}
#endif
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56))
+
+/* Swap bytes in 64 bit value. */
# define __bswap_64(x) \
__extension__ \
({ union { unsigned long long int __ll; \
unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \
- __bswap_64_v.__ll = (x); \
- __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \
- __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
+ if (__builtin_constant_p (x)) \
+ __bswap_64_r.__ll = __bswap_constant_64 (x); \
+ else \
+ { \
+ __bswap_64_v.__ll = (x); \
+ __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \
+ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
+ } \
__bswap_64_r.__ll; })
#endif
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 27ec051..b2d8b2e 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2005,2006,2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
-typedef struct
+typedef struct __jmp_buf_internal_tag
{
/* There are eight 4-byte data registers, but D0 is not saved. */
long int __dregs[7];
diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
index acbac47..6b69f7a 100644
--- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004
+ Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,6 +18,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#ifndef __extern_inline
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE __extern_inline
+#endif
+
#ifdef __GNUC__
#ifdef __USE_ISOC99
@@ -89,11 +99,7 @@
# define __m81_inline static __inline
#else
# define __m81_u(x) x
-# ifdef __cplusplus
-# define __m81_inline __inline
-# else
-# define __m81_inline extern __inline
-# endif
+# define __m81_inline __MATH_INLINE
# define __M81_MATH_INLINES 1
#endif
@@ -351,14 +357,14 @@ __inline_functions (long double,l)
/* Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work correctly with -traditional. */
# define __inline_forward_c(rettype, name, args1, args2) \
-extern __inline rettype __attribute__((__const__)) \
+__MATH_INLINE rettype __attribute__((__const__)) \
name args1 \
{ \
return __CONCAT(__,name) args2; \
}
# define __inline_forward(rettype, name, args1, args2) \
-extern __inline rettype name args1 \
+__MATH_INLINE rettype name args1 \
{ \
return __CONCAT(__,name) args2; \
}
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 169a24b..203d5a1 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,11 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
+
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -46,6 +49,7 @@
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* Set close_on_exec. */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -181,10 +185,55 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+#endif
+
__BEGIN_DECLS
+#ifdef __USE_GNU
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+/* Splice address range into a pipe. */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
+
+/* Splice two files together. */
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
+
+/* In-kernel implementation of tee for pipe buffers. */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
+
+#endif
+
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index fbec1a0..ab99176 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -88,6 +88,7 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
index f7a7393..bc28579 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +35,13 @@
# define POLLWRBAND 0x100 /* Priority data may be written. */
#endif
+#ifdef __USE_GNU
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
+#endif
+
/* Event types always implicitly polled for. These bits need not be set in
`events', but they will appear in `revents' to indicate the status of
the file descriptor. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index dc06b13..6b69240 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -162,3 +162,9 @@ struct stat64
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
+
+#if defined __USE_ATFILE || defined __USE_GNU
+/* XXX This will change to the macro for the next 2008 POSIX revision. */
+# define UTIME_NOW ((1l << 30) - 1l)
+# define UTIME_OMIT ((1l << 30) - 2l)
+#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
new file mode 100644
index 0000000..9a6d23d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -0,0 +1,41 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* These features were surely available with 2.4.12. */
+#if __LINUX_KERNEL_VERSION >= 132108
+# define __ASSUME_MMAP2_SYSCALL 1
+# define __ASSUME_TRUNCATE64_SYSCALL 1
+# define __ASSUME_STAT64_SYSCALL 1
+# define __ASSUME_FCNTL64 1
+# define __ASSUME_VFORK_SYSCALL 1
+#endif
+
+/* Many syscalls were added in 2.6.10 for m68k. */
+#if __LINUX_KERNEL_VERSION >= 132618
+# define __ASSUME_TGKILL 1
+# define __ASSUME_UTIMES 1
+# define __ASSUME_FADVISE64_64_SYSCALL 1
+#endif
+
+#include_next <kernel-features.h>
+
+/* These syscalls are not implemented yet for m68k. */
+#undef __ASSUME_PSELECT
+#undef __ASSUME_PPOLL
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/user.h b/sysdeps/unix/sysv/linux/m68k/sys/user.h
new file mode 100644
index 0000000..f8b19fc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sys/user.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* The whole purpose of this file is for GDB and GDB only. Don't read
+ too much into it. Don't use it for anything other than GDB unless
+ you know what you are doing. */
+
+struct user_m68kfp_struct {
+ unsigned long fpregs[8*3];
+ unsigned long fpcntl[3];
+};
+
+struct user_regs_struct {
+ long d1, d2, d3, d4, d5, d6, d7;
+ long a0, a1, a2, a3, a4, a5, a6;
+ long d0;
+ long usp;
+ long orig_d0;
+ short stkadj;
+ short sr;
+ long pc;
+ short fmtvec;
+ short __fill;
+};
+
+struct user {
+ struct user_regs_struct regs;
+ int u_fpvalid;
+ struct user_m68kfp_struct m68kfp;
+ unsigned long int u_tsize;
+ unsigned long int u_dsize;
+ unsigned long int u_ssize;
+ unsigned long start_code;
+ unsigned long start_stack;
+ long int signal;
+ int reserved;
+ unsigned long u_ar0;
+ struct user_m68kfp_struct *u_fpstate;
+ unsigned long magic;
+ char u_comm[32];
+};
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5bccf6097250f388f18eca157031497b6976b883
commit 5bccf6097250f388f18eca157031497b6976b883
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Aug 7 23:52:34 2008 +0000
2008-08-07 Helge Deller <deller@gmx.de>
* sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file.
* sysdeps/unix/sysv/linux/hppa/Makefile: New file.
* sysdeps/unix/sysv/linux/hppa/getcontext.S: New file.
* sysdeps/unix/sysv/linux/hppa/makecontext.c: New file.
* sysdeps/unix/sysv/linux/hppa/setcontext.S: New file.
* sysdeps/unix/sysv/linux/hppa/swapcontext.c: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 2a4a712..3d570db 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,12 @@
+2008-08-07 Helge Deller <deller@gmx.de>
+
+ * sysdeps/unix/sysv/linux/hppa/ucontext_i.sym: New file.
+ * sysdeps/unix/sysv/linux/hppa/Makefile: New file.
+ * sysdeps/unix/sysv/linux/hppa/getcontext.S: New file.
+ * sysdeps/unix/sysv/linux/hppa/makecontext.c: New file.
+ * sysdeps/unix/sysv/linux/hppa/setcontext.S: New file.
+ * sysdeps/unix/sysv/linux/hppa/swapcontext.c: New file.
+
2008-06-17 Aurelian Jarno <aurelien@aurel32.net>
Carlos O'Donell <carlos@systemhalted.org>
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
new file mode 100644
index 0000000..4c3a114
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/Makefile
@@ -0,0 +1,5 @@
+# Used by *context() functions
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext_i.sym
+endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/getcontext.S b/sysdeps/unix/sysv/linux/hppa/getcontext.S
new file mode 100644
index 0000000..f88fa03
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/getcontext.S
@@ -0,0 +1,163 @@
+/* Get current user context.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Helge Deller <deller@gmx.de>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+
+ /* Trampoline function. */
+ /* Can not use ENTRY(__getcontext_ret) here. */
+ .type __getcontext_ret, @function
+ .hidden __getcontext_ret
+__getcontext_ret:
+ .proc
+ .callinfo FRAME=0,NO_CALLS
+ copy %r23, %r3
+ copy %r24, %r4
+ copy %r25, %r5
+ copy %r26, %r6
+ bv 0(%r20)
+ copy %r0, %ret0
+ .procend
+ .size __getcontext_ret, .-__getcontext_ret
+
+
+ENTRY(__getcontext)
+ /* Save the registers. */
+ stw %r0, oR0(%r26)
+ stw %r1, oR1(%r26)
+ /* stw %r2, oR2(%r26) - used for trampoline. */
+ stw %r3, oR3(%r26)
+ stw %r4, oR4(%r26)
+ stw %r5, oR5(%r26)
+ stw %r6, oR6(%r26)
+ stw %r7, oR7(%r26)
+ stw %r8, oR8(%r26)
+ stw %r9, oR9(%r26)
+ stw %r10, oR10(%r26)
+ stw %r11, oR11(%r26)
+ stw %r12, oR12(%r26)
+ stw %r13, oR13(%r26)
+ stw %r14, oR14(%r26)
+ stw %r15, oR15(%r26)
+ stw %r16, oR16(%r26)
+ stw %r17, oR17(%r26)
+ stw %r18, oR18(%r26)
+ stw %r19, oR19(%r26)
+ /* stw %r20, oR20(%r26) - used for trampoline. */
+ stw %r21, oR21(%r26)
+ stw %r22, oR22(%r26)
+ /* stw %r23, oR23(%r26) - used for trampoline. */
+ /* stw %r24, oR24(%r26) - used for trampoline. */
+ /* stw %r25, oR25(%r26) - used for trampoline. */
+ /* stw %r26, oR26(%r26) - used for trampoline. */
+ stw %r27, oR27(%r26)
+ stw %r28, oR28(%r26)
+ stw %r29, oR29(%r26)
+ ldo -64(%sp), %r1 /* Calculate %sp in %r1. */
+ stw %r1, oR30(%r26) /* Save new %sp. */
+ stw %r31, oR31(%r26)
+
+ stw %r0, oUC_FLAGS(%r26)
+ /* stw %r0, oUC_LINK(%r26) - Do not overwrite. */
+ stw %r1, oSS_SP(%r26)
+ stw %r0, oSS_FLAGS(%r26)
+ stw %r0, oSS_SIZE(%r26)
+
+ stw %r0, oSC_FLAGS(%r26)
+
+ stw %r0, oIASQ0(%r26)
+ stw %r0, oIASQ1(%r26)
+ stw %r0, oIAOQ0(%r26)
+ stw %r0, oIAOQ1(%r26)
+ stw %r0, oSAR(%r26) /* used as flag in swapcontext(). */
+
+
+ /* Store floating-point regs. */
+ ldo oFPREGS0(%r26),%r1
+ fstds,ma %fr0, 8(%r1)
+ fstds,ma %fr1, 8(%r1)
+ fstds,ma %fr2, 8(%r1)
+ fstds,ma %fr3, 8(%r1)
+ fstds,ma %fr4, 8(%r1)
+ fstds,ma %fr5, 8(%r1)
+ fstds,ma %fr6, 8(%r1)
+ fstds,ma %fr7, 8(%r1)
+ fstds,ma %fr8, 8(%r1)
+ fstds,ma %fr9, 8(%r1)
+ fstds,ma %fr10, 8(%r1)
+ fstds,ma %fr11, 8(%r1)
+ fstds,ma %fr12, 8(%r1)
+ fstds,ma %fr13, 8(%r1)
+ fstds,ma %fr14, 8(%r1)
+ fstds,ma %fr15, 8(%r1)
+ fstds,ma %fr16, 8(%r1)
+ fstds,ma %fr17, 8(%r1)
+ fstds,ma %fr18, 8(%r1)
+ fstds,ma %fr19, 8(%r1)
+ fstds,ma %fr20, 8(%r1)
+ fstds,ma %fr21, 8(%r1)
+ fstds,ma %fr22, 8(%r1)
+ fstds,ma %fr23, 8(%r1)
+ fstds,ma %fr24, 8(%r1)
+ fstds,ma %fr25, 8(%r1)
+ fstds,ma %fr26, 8(%r1)
+ fstds,ma %fr27, 8(%r1)
+ fstds,ma %fr28, 8(%r1)
+ fstds,ma %fr29, 8(%r1)
+ fstds,ma %fr30, 8(%r1)
+ fstds %fr31, 0(%r1)
+
+ /* Prologue */
+ stwm %r4, 64(%r30)
+#ifdef PIC
+ stw %r19, -32(%r30)
+#endif
+
+ /* Set up the trampoline registers.
+ r20, r23, r24, r25, r26 and r2 are clobbered
+ by call to getcontext() anyway. Reuse them. */
+ stw %r2, oR20(%r26)
+ stw %r3, oR23(%r26)
+ stw %r4, oR24(%r26)
+ stw %r5, oR25(%r26)
+ stw %r6, oR26(%r26)
+ ldil L%__getcontext_ret, %r1
+ ldo R%__getcontext_ret(%r1), %r1
+ stw %r1, oR2(%r26)
+
+ /* Save the current signal mask. */
+ /* sigprocmask(SIG_BLOCK, NULL, &ucp->uc_sigmask); */
+ ldo oSIGMASK(%r26), %r24
+ copy %r0, %r25
+ bl sigprocmask, %r2
+ ldi SIG_BLOCK, %r26
+
+ /* Epilogue */
+ ldw -84(%r30), %r2
+#ifdef PIC
+ ldw -96(%r30), %r19
+#endif
+ bv %r0(%r2)
+ ldwm -64(%r30), %r4
+END(__getcontext)
+
+weak_alias (__getcontext, getcontext)
diff --git a/sysdeps/unix/sysv/linux/hppa/makecontext.c b/sysdeps/unix/sysv/linux/hppa/makecontext.c
new file mode 100644
index 0000000..69a1813
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/makecontext.c
@@ -0,0 +1,79 @@
+/* Create new context.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Helge Deller <deller@gmx.de>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <libintl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sysdep.h>
+#include <ucontext.h>
+
+/* XXX: This implementation only handles integer arguments. */
+
+void
+__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
+{
+ unsigned int *sp;
+ va_list ap;
+ int i;
+
+ if (argc > 8)
+ {
+ fprintf (stderr, _("\
+makecontext: does not know how to handle more than 8 arguments\n"));
+ exit (-1);
+ }
+
+ /* Get stack pointer. */
+ sp = (unsigned int *) ucp->uc_stack.ss_sp;
+
+ /* Store address to jump to. */
+ ucp->uc_mcontext.sc_gr[2] = (unsigned long) func;
+
+ va_start (ap, argc);
+ /* Handle arguments. */
+ for (i = 0; i < argc; ++i)
+ switch (i)
+ {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ ucp->uc_mcontext.sc_gr[26-i] = va_arg (ap, int);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ if (sizeof(unsigned long) == 4) {
+ /* 32bit: put arg7-arg4 on stack. */
+ sp[7-i] = va_arg (ap, int);
+ } else {
+ /* 64bit: r19-r22 are arg7-arg4. */
+ ucp->uc_mcontext.sc_gr[22+4-i] = va_arg (ap, int);
+ }
+ break;
+ }
+ va_end (ap);
+
+}
+
+
+weak_alias(__makecontext, makecontext)
diff --git a/sysdeps/unix/sysv/linux/hppa/setcontext.S b/sysdeps/unix/sysv/linux/hppa/setcontext.S
new file mode 100644
index 0000000..43ccf24
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/setcontext.S
@@ -0,0 +1,154 @@
+/* Install given context.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Helge Deller <deller@gmx.de>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#include "ucontext_i.h"
+
+
+ENTRY(__setcontext)
+ /* Prologue */
+ stwm %r3, 64(%r30)
+#ifdef PIC
+ stw %r19, -32(%r30)
+#endif
+
+ /* Save ucp. */
+ copy %r26, %r3
+
+.Lagain:
+ /* Set the current signal mask. */
+ /* sigprocmask(SIG_BLOCK, &ucp->uc_sigmask, NULL); */
+ copy %r0, %r24
+ ldo oSIGMASK(%r3), %r25
+ bl sigprocmask, %r2
+ ldi SIG_SETMASK, %r26
+
+ comib,<>,n 0,%ret0,.Lerror
+
+ /* Save %sp, %dp. */
+ copy %sp, %r4
+ copy %dp, %r5
+ copy %r19, %r6
+
+ /* Get the registers. */
+ ldw oR1(%r3), %r1
+ ldw oR2(%r3), %r2
+ /* ldw oR3(%r3), %r3 - used for ucp pointer. */
+ /* ldw oR4(%r3), %r4 - used for original %sp. */
+ /* ldw oR5(%r3), %r5 - used for %dp / %r27. */
+ /* ldw oR6(%r3), %r6 - used for %r19. */
+ ldw oR7(%r3), %r7
+ ldw oR8(%r3), %r8
+ ldw oR9(%r3), %r9
+ ldw oR10(%r3), %r10
+ ldw oR11(%r3), %r11
+ ldw oR12(%r3), %r12
+ ldw oR13(%r3), %r13
+ ldw oR14(%r3), %r14
+ ldw oR15(%r3), %r15
+ ldw oR16(%r3), %r16
+ ldw oR17(%r3), %r17
+ ldw oR18(%r3), %r18
+ ldw oR19(%r3), %r19
+ ldw oR20(%r3), %r20
+ ldw oR21(%r3), %r21
+ /* ldw oR22(%r3), %r22 - dyncall arg. */
+ ldw oR23(%r3), %r23
+ ldw oR24(%r3), %r24
+ ldw oR25(%r3), %r25
+ ldw oR26(%r3), %r26
+ ldw oR27(%r3), %r27
+ ldw oR28(%r3), %r28
+ ldw oR29(%r3), %r29
+ ldw oR30(%r3), %r30
+ /* ldw oR31(%r3), %r31 - dyncall scratch register */
+
+ /* Restore floating-point registers. */
+ ldo oFPREGS31(%r3), %r22
+ fldds 0(%r22), %fr31
+ fldds,mb -8(%r22), %fr30
+ fldds,mb -8(%r22), %fr29
+ fldds,mb -8(%r22), %fr28
+ fldds,mb -8(%r22), %fr27
+ fldds,mb -8(%r22), %fr26
+ fldds,mb -8(%r22), %fr25
+ fldds,mb -8(%r22), %fr24
+ fldds,mb -8(%r22), %fr23
+ fldds,mb -8(%r22), %fr22
+ fldds,mb -8(%r22), %fr21
+ fldds,mb -8(%r22), %fr20
+ fldds,mb -8(%r22), %fr19
+ fldds,mb -8(%r22), %fr18
+ fldds,mb -8(%r22), %fr17
+ fldds,mb -8(%r22), %fr16
+ fldds,mb -8(%r22), %fr15
+ fldds,mb -8(%r22), %fr14
+ fldds,mb -8(%r22), %fr13
+ fldds,mb -8(%r22), %fr12
+ fldds,mb -8(%r22), %fr11
+ fldds,mb -8(%r22), %fr10
+ fldds,mb -8(%r22), %fr9
+ fldds,mb -8(%r22), %fr8
+ fldds,mb -8(%r22), %fr7
+ fldds,mb -8(%r22), %fr6
+ fldds,mb -8(%r22), %fr5
+ fldds,mb -8(%r22), %fr4
+ fldds,mb -8(%r22), %fr3
+ fldds,mb -8(%r22), %fr2
+ fldds,mb -8(%r22), %fr1
+ fldds,mb -8(%r22), %fr0
+
+ /* Calculate new stack pointer. */
+ ldw oSS_SP(%r3), %sp
+ ldo 64(%sp), %sp
+
+ /* Call external function. */
+ copy %r2, %r22
+ bl $$dyncall, %r31
+ copy %r31, %r2
+
+ /* We return here. Get new ucp in %r3, reload %sp. */
+ ldw oUC_LINK(%r3), %r3
+ copy %r4, %sp
+ copy %r5, %dp
+ copy %r6, %r19
+
+ /* Continue until ucp == NULL. */
+ comib,<> 0,%r3,.Lagain
+ nop
+
+ /* No further context available. Exit now. */
+ bl _exit, %r2
+ ldi -1, %r26
+
+
+.Lerror:
+ /* Epilogue */
+ ldw -84(%r30), %r2
+#ifdef PIC
+ ldw -96(%r30), %r19
+#endif
+ bv %r0(%r2)
+ ldwm -64(%r30), %r3
+L(pseudo_end):
+PSEUDO_END(__setcontext)
+
+weak_alias(__setcontext, setcontext)
diff --git a/sysdeps/unix/sysv/linux/hppa/swapcontext.c b/sysdeps/unix/sysv/linux/hppa/swapcontext.c
new file mode 100644
index 0000000..8b33173
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/swapcontext.c
@@ -0,0 +1,43 @@
+/* Swap to new context.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Helge Deller <deller@gmx.de>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <ucontext.h>
+
+extern int __getcontext (ucontext_t *ucp);
+extern int __setcontext (const ucontext_t *ucp);
+
+int
+__swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
+{
+ /* Save the current machine context to oucp. */
+ __getcontext (oucp);
+
+ /* mark sc_sar flag to skip the setcontext call on reactivation. */
+ if (oucp->uc_mcontext.sc_sar == 0) {
+ oucp->uc_mcontext.sc_sar++;
+
+ /* Restore the machine context in ucp. */
+ __setcontext (ucp);
+ }
+
+ return 0;
+}
+
+weak_alias (__swapcontext, swapcontext)
diff --git a/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym b/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym
new file mode 100644
index 0000000..ee33029
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/ucontext_i.sym
@@ -0,0 +1,59 @@
+#include <stddef.h>
+#include <signal.h>
+#include <sys/ucontext.h>
+
+--
+
+SIG_BLOCK
+SIG_SETMASK
+
+#define ucontext(member) offsetof (ucontext_t, member)
+#define mcontext(member) ucontext (uc_mcontext.member)
+#define mreg(reg) mcontext (sc_gr[reg])
+
+oUC_FLAGS ucontext (uc_flags)
+oUC_LINK ucontext (uc_link)
+oSS_SP ucontext (uc_stack.ss_sp)
+oSS_FLAGS ucontext (uc_stack.ss_flags)
+oSS_SIZE ucontext (uc_stack.ss_size)
+oSC_FLAGS mcontext (sc_flags)
+oR0 mreg (0)
+oR1 mreg (1)
+oR2 mreg (2)
+oR3 mreg (3)
+oR4 mreg (4)
+oR5 mreg (5)
+oR6 mreg (6)
+oR7 mreg (7)
+oR8 mreg (8)
+oR9 mreg (9)
+oR10 mreg (10)
+oR11 mreg (11)
+oR12 mreg (12)
+oR13 mreg (13)
+oR14 mreg (14)
+oR15 mreg (15)
+oR16 mreg (16)
+oR17 mreg (17)
+oR18 mreg (18)
+oR19 mreg (19)
+oR20 mreg (20)
+oR21 mreg (21)
+oR22 mreg (22)
+oR23 mreg (23)
+oR24 mreg (24)
+oR25 mreg (25)
+oR26 mreg (26)
+oR27 mreg (27)
+oR28 mreg (28)
+oR29 mreg (29)
+oR30 mreg (30)
+oR31 mreg (31)
+oFPREGS0 mcontext (sc_fr[0])
+oFPREGS31 mcontext (sc_fr[31])
+oIASQ0 mcontext (sc_iasq[0])
+oIASQ1 mcontext (sc_iasq[1])
+oIAOQ0 mcontext (sc_iaoq[0])
+oIAOQ1 mcontext (sc_iaoq[1])
+oSAR mcontext (sc_sar)
+oSIGMASK ucontext (uc_sigmask)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3428a1a18438ea3c3df78d7520d81e55b8f712fb
commit 3428a1a18438ea3c3df78d7520d81e55b8f712fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 04:44:10 2008 +0000
timerfd.h header for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h
new file mode 100644
index 0000000..09d6ccf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/timerfd.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_TIMERFD_H
+#define _SYS_TIMERFD_H 1
+
+#include <time.h>
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 010000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 04
+#define TFD_NONBLOCK TFD_NONBLOCK
+ };
+
+
+/* Bits to be set in the FLAGS parameter of `timerfd_settime'. */
+enum
+ {
+ TFD_TIMER_ABSTIME = 1 << 0
+#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for new interval timer source. */
+extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
+
+/* Set next expiration time of interval timer source UFD to UTMR. If
+ FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
+ absolute. Optionally return the old expiration time in OTMR. */
+extern int timerfd_settime (int __ufd, int __flags,
+ __const struct itimerspec *__utmr,
+ struct itimerspec *__otmr) __THROW;
+
+/* Return the next expiration time of UFD. */
+extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/timerfd.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0cf15c596cce00d9b6270d03791ff6502d379349
commit 0cf15c596cce00d9b6270d03791ff6502d379349
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 04:44:03 2008 +0000
signalfd.h header for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
new file mode 100644
index 0000000..a820eaf
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/signalfd.h
@@ -0,0 +1,66 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SIGNALFD_H
+#define _SYS_SIGNALFD_H 1
+
+#define __need_sigset_t
+#include <signal.h>
+#include <stdint.h>
+
+
+struct signalfd_siginfo
+{
+ uint32_t ssi_signo;
+ int32_t ssi_errno;
+ int32_t ssi_code;
+ uint32_t ssi_pid;
+ uint32_t ssi_uid;
+ int32_t ssi_fd;
+ uint32_t ssi_tid;
+ uint32_t ssi_band;
+ uint32_t ssi_overrun;
+ uint32_t ssi_trapno;
+ int32_t ssi_status;
+ int32_t ssi_int;
+ uint64_t ssi_ptr;
+ uint64_t ssi_utime;
+ uint64_t ssi_stime;
+ uint64_t ssi_addr;
+ uint8_t __pad[48];
+};
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 010000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 04
+#define SFD_NONBLOCK SFD_NONBLOCK
+ };
+
+__BEGIN_DECLS
+
+/* Request notification for delivery of signals in MASK to be
+ performed using descriptor FD.*/
+extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
+ __nonnull ((2)) __THROW;
+
+__END_DECLS
+
+#endif /* sys/signalfd.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=306d70cc922dff084691356623f30d076e5b2f26
commit 306d70cc922dff084691356623f30d076e5b2f26
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 04:43:59 2008 +0000
inotify.h header for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/inotify.h b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h
new file mode 100644
index 0000000..d61c700
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/inotify.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_INOTIFY_H
+#define _SYS_INOTIFY_H 1
+
+#include <stdint.h>
+
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 010000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 04
+#define IN_NONBLOCK IN_NONBLOCK
+ };
+
+
+/* Structure describing an inotify event. */
+struct inotify_event
+{
+ int wd; /* Watch descriptor. */
+ uint32_t mask; /* Watch mask. */
+ uint32_t cookie; /* Cookie to synchronize two events. */
+ uint32_t len; /* Length (including NULs) of name. */
+ char name __flexarr; /* Name. */
+};
+
+
+/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
+#define IN_ACCESS 0x00000001 /* File was accessed. */
+#define IN_MODIFY 0x00000002 /* File was modified. */
+#define IN_ATTRIB 0x00000004 /* Metadata changed. */
+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_OPEN 0x00000020 /* File was opened. */
+#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
+#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+#define IN_CREATE 0x00000100 /* Subfile was created. */
+#define IN_DELETE 0x00000200 /* Subfile was deleted. */
+#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
+#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
+
+/* Events sent by the kernel. */
+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
+#define IN_IGNORED 0x00008000 /* File was ignored. */
+
+/* Helper events. */
+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
+
+/* Special flags. */
+#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
+ directory. */
+#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
+#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
+ existing watch. */
+#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
+#define IN_ONESHOT 0x80000000 /* Only send event once. */
+
+/* All events which a program can wait on. */
+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
+ | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
+ | IN_MOVED_TO | IN_CREATE | IN_DELETE \
+ | IN_DELETE_SELF | IN_MOVE_SELF)
+
+
+__BEGIN_DECLS
+
+/* Create and initialize inotify instance. */
+extern int inotify_init (void) __THROW;
+
+/* Create and initialize inotify instance. */
+extern int inotify_init1 (int __flags) __THROW;
+
+/* Add watch of object NAME to inotify instance FD. Notify about
+ events specified by MASK. */
+extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
+ __THROW;
+
+/* Remove the watch specified by WD from the inotify instance FD. */
+extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
+
+__END_DECLS
+
+#endif /* sys/inotify.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0ad350d1b5fbffe9935b68a83b30bae5bc8efec
commit b0ad350d1b5fbffe9935b68a83b30bae5bc8efec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 04:43:52 2008 +0000
eventfd.h header for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h
new file mode 100644
index 0000000..c8ce554
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/eventfd.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EVENTFD_H
+#define _SYS_EVENTFD_H 1
+
+#include <stdint.h>
+
+
+/* Type for event counter. */
+typedef uint64_t eventfd_t;
+
+/* Flags for signalfd. */
+enum
+ {
+ EFD_CLOEXEC = 010000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 04
+#define EFD_NONBLOCK EFD_NONBLOCK
+ };
+
+
+__BEGIN_DECLS
+
+/* Return file descriptor for generic event channel. Set initial
+ value to COUNT. */
+extern int eventfd (int __count, int __flags) __THROW;
+
+/* Read event counter and possibly wait for events. */
+extern int eventfd_read (int __fd, eventfd_t *__value);
+
+/* Increment event counter. */
+extern int eventfd_write (int __fd, eventfd_t value);
+
+__END_DECLS
+
+#endif /* sys/eventfd.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e46adeb5b0cc2f882fd8243a135164ef025a4058
commit e46adeb5b0cc2f882fd8243a135164ef025a4058
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 04:43:46 2008 +0000
epoll.h header for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/epoll.h b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h
new file mode 100644
index 0000000..9f983a5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/epoll.h
@@ -0,0 +1,143 @@
+/* Copyright (C) 2002-2006, 2007, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_EPOLL_H
+#define _SYS_EPOLL_H 1
+
+#include <stdint.h>
+#include <sys/types.h>
+
+/* Get __sigset_t. */
+#include <bits/sigset.h>
+
+#ifndef __sigset_t_defined
+# define __sigset_t_defined
+typedef __sigset_t sigset_t;
+#endif
+
+
+/* Flags to be passed to epoll_create2. */
+enum
+ {
+ EPOLL_CLOEXEC = 010000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+ EPOLL_NONBLOCK = 04
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+ };
+
+
+enum EPOLL_EVENTS
+ {
+ EPOLLIN = 0x001,
+#define EPOLLIN EPOLLIN
+ EPOLLPRI = 0x002,
+#define EPOLLPRI EPOLLPRI
+ EPOLLOUT = 0x004,
+#define EPOLLOUT EPOLLOUT
+ EPOLLRDNORM = 0x040,
+#define EPOLLRDNORM EPOLLRDNORM
+ EPOLLRDBAND = 0x080,
+#define EPOLLRDBAND EPOLLRDBAND
+ EPOLLWRNORM = 0x100,
+#define EPOLLWRNORM EPOLLWRNORM
+ EPOLLWRBAND = 0x200,
+#define EPOLLWRBAND EPOLLWRBAND
+ EPOLLMSG = 0x400,
+#define EPOLLMSG EPOLLMSG
+ EPOLLERR = 0x008,
+#define EPOLLERR EPOLLERR
+ EPOLLHUP = 0x010,
+#define EPOLLHUP EPOLLHUP
+ EPOLLRDHUP = 0x2000,
+#define EPOLLRDHUP EPOLLRDHUP
+ EPOLLONESHOT = (1 << 30),
+#define EPOLLONESHOT EPOLLONESHOT
+ EPOLLET = (1 << 31)
+#define EPOLLET EPOLLET
+ };
+
+
+/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl(). */
+#define EPOLL_CTL_ADD 1 /* Add a file descriptor to the interface. */
+#define EPOLL_CTL_DEL 2 /* Remove a file descriptor from the interface. */
+#define EPOLL_CTL_MOD 3 /* Change file descriptor epoll_event structure. */
+
+
+typedef union epoll_data
+{
+ void *ptr;
+ int fd;
+ uint32_t u32;
+ uint64_t u64;
+} epoll_data_t;
+
+struct epoll_event
+{
+ uint32_t events; /* Epoll events */
+ epoll_data_t data; /* User data variable */
+};
+
+
+__BEGIN_DECLS
+
+/* Creates an epoll instance. Returns an fd for the new instance.
+ The "size" parameter is a hint specifying the number of file
+ descriptors to be associated with the new instance. The fd
+ returned by epoll_create() should be closed with close(). */
+extern int epoll_create (int __size) __THROW;
+
+/* Same as epoll_create but with an additional FLAGS parameter. */
+extern int epoll_create2 (int __size, int __flags) __THROW;
+
+
+/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
+ -1 in case of error ( the "errno" variable will contain the
+ specific error code ) The "op" parameter is one of the EPOLL_CTL_*
+ constants defined above. The "fd" parameter is the target of the
+ operation. The "event" parameter describes which events the caller
+ is interested in and any associated user data. */
+extern int epoll_ctl (int __epfd, int __op, int __fd,
+ struct epoll_event *__event) __THROW;
+
+
+/* Wait for events on an epoll instance "epfd". Returns the number of
+ triggered events returned in "events" buffer. Or -1 in case of
+ error with the "errno" variable set to the specific error code. The
+ "events" parameter is a buffer that will contain triggered
+ events. The "maxevents" is the maximum number of events to be
+ returned ( usually size of "events" ). The "timeout" parameter
+ specifies the maximum wait time in milliseconds (-1 == infinite).
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout);
+
+
+/* Same as epoll_wait, but the thread's signal mask is temporarily
+ and atomically replaced with the one provided as parameter.
+
+ This function is a cancellation point and therefore not marked with
+ __THROW. */
+extern int epoll_pwait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout,
+ __const __sigset_t *__ss);
+
+__END_DECLS
+
+#endif /* sys/epoll.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e2570f301f48371a8ca7bbd94b010c4d333010b7
commit e2570f301f48371a8ca7bbd94b010c4d333010b7
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 18 13:24:21 2008 +0000
* sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure
type.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 8a90a3d..e7aee50 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/bits/setjmp.h (__jmp_buf): Give name to structure
+ type.
+
2008-05-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 4f159c4..d3ced98 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -27,7 +27,7 @@
#include <sgidefs.h>
-typedef struct
+typedef struct __jmp_buf_internal_tag
{
#if _MIPS_SIM == _ABIO32
/* Program counter. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b3dc26c7673476400596dd8687fef8bfc2e43e2
commit 6b3dc26c7673476400596dd8687fef8bfc2e43e2
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 18 13:21:45 2008 +0000
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/eabi/fgetexcptflg.c: New.
* sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Operate on
set exception flags, not on mask of enabled exceptions.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 867bec4..5cca360 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,11 @@
2008-07-18 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/arm/eabi/fgetexcptflg.c: New.
+ * sysdeps/arm/eabi/fsetexcptflg.c (__fesetexceptflag): Operate on
+ set exception flags, not on mask of enabled exceptions.
+
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/arm/eabi/feupdateenv.c: New.
2008-07-18 Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fgetexcptflg.c
similarity index 51%
copy from sysdeps/arm/eabi/fsetexcptflg.c
copy to sysdeps/arm/eabi/fgetexcptflg.c
index 2e05514..2259fa3 100644
--- a/sysdeps/arm/eabi/fsetexcptflg.c
+++ b/sysdeps/arm/eabi/fgetexcptflg.c
@@ -1,6 +1,7 @@
-/* Set floating-point environment exception handling.
- Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+/* Store current representation for exceptions.
+ Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -12,13 +13,12 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
-#include <math.h>
#include <fpu_control.h>
#include <unistd.h>
@@ -27,21 +27,16 @@
#include <sysdep.h>
int
-__fesetexceptflag (const fexcept_t *flagp, int excepts)
+__fegetexceptflag (fexcept_t *flagp, int excepts)
{
if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
- fexcept_t temp;
+ unsigned long temp;
- /* Get the current environment. */
+ /* Get the current exceptions. */
_FPU_GETCW (temp);
- /* Set the desired exception mask. */
- temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
- temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
-
- /* Save state back to the FPU. */
- _FPU_SETCW (temp);
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
/* Success. */
return 0;
@@ -53,8 +48,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
#include <shlib-compat.h>
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fesetexceptflag, __old_fesetexceptflag)
-compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
#endif
-
-versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c
index 2e05514..3dfeb2c 100644
--- a/sysdeps/arm/eabi/fsetexcptflg.c
+++ b/sysdeps/arm/eabi/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01,05,08 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,8 +37,8 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
_FPU_GETCW (temp);
/* Set the desired exception mask. */
- temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
- temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
+ temp &= ~(excepts & FE_ALL_EXCEPT);
+ temp |= (*flagp & excepts & FE_ALL_EXCEPT);
/* Save state back to the FPU. */
_FPU_SETCW (temp);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e39762f948c1aeeeba236c09ae62071d3c1196f8
commit e39762f948c1aeeeba236c09ae62071d3c1196f8
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 18 13:20:51 2008 +0000
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/eabi/feupdateenv.c: New.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ceebb11..867bec4 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,9 @@
2008-07-18 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/arm/eabi/feupdateenv.c: New.
+
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/arm/libm-test-ulps: Update.
2008-06-01 Paul Brook <paul@codesourcery.com>
diff --git a/sysdeps/arm/eabi/feupdateenv.c b/sysdeps/arm/eabi/feupdateenv.c
new file mode 100644
index 0000000..9769867
--- /dev/null
+++ b/sysdeps/arm/eabi/feupdateenv.c
@@ -0,0 +1,59 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <sysdep.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ {
+ unsigned int temp;
+
+ /* Get the current exception state. */
+ _FPU_GETCW (temp);
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the saved exceptions. */
+ feraiseexcept (temp & FE_ALL_EXCEPT);
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feupdateenv, __old_feupdateenv)
+compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cbcd54d99a64b845d9e8b19ef17d83df6a855cd
commit 4cbcd54d99a64b845d9e8b19ef17d83df6a855cd
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 18 13:18:53 2008 +0000
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/libm-test-ulps: Update.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 212231a..ceebb11 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2008-07-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/libm-test-ulps: Update.
+
2008-06-01 Paul Brook <paul@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
index 6a4bcc6..4fec86e 100644
--- a/sysdeps/arm/libm-test-ulps
+++ b/sysdeps/arm/libm-test-ulps
@@ -13,10 +13,24 @@ float: 2
idouble: 1
ifloat: 2
+# atan2
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+
# atanh
Test "atanh (0.7) == 0.8673005276940531944":
double: 1
idouble: 1
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
# cabs
Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
@@ -59,6 +73,9 @@ double: 1
float: 3
idouble: 1
ifloat: 3
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
+float: 1
+ifloat: 1
Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
double: 1
float: 1
@@ -74,6 +91,11 @@ ifloat: 2
Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -92,6 +114,14 @@ idouble: 1
Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
ifloat: 1
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
# catan
Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -124,14 +154,23 @@ double: 1
float: 6
idouble: 1
ifloat: 6
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
# cbrt
Test "cbrt (-27.0) == -3.0":
double: 1
idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
Test "cbrt (0.970299) == 0.99":
double: 1
idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
# ccos
Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
@@ -143,6 +182,14 @@ idouble: 1
Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
double: 1
idouble: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
# ccosh
Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
@@ -159,6 +206,14 @@ ifloat: 1
Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
double: 1
idouble: 1
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
# cexp
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
@@ -172,6 +227,9 @@ ifloat: 1
Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 1
ifloat: 1
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
@@ -179,6 +237,9 @@ double: 1
float: 3
idouble: 1
ifloat: 3
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -224,6 +285,9 @@ ifloat: 1
Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
double: 1
idouble: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -260,6 +324,22 @@ idouble: 0.2758
ifloat: 0.3667
# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
@@ -289,6 +369,12 @@ ifloat: 1
Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
float: 1
ifloat: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
# csqrt
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
@@ -318,6 +404,9 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+double: 1
+idouble: 1
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -338,6 +427,14 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
# erfc
Test "erfc (0.7) == 0.32219880616258152702":
@@ -351,11 +448,17 @@ ifloat: 2
Test "erfc (2.0) == 0.0046777349810472658379":
double: 1
idouble: 1
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
Test "erfc (4.1) == 0.67000276540848983727e-8":
double: 24
float: 12
idouble: 24
ifloat: 12
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
# exp10
Test "exp10 (-1) == 0.1":
@@ -366,6 +469,11 @@ ifloat: 1
Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
float: 1
ifloat: 1
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "exp10 (3) == 1000":
double: 6
float: 2
@@ -373,6 +481,9 @@ idouble: 6
ifloat: 2
# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
Test "expm1 (1) == M_El - 1.0":
float: 1
ifloat: 1
@@ -429,6 +540,19 @@ float: 1
ifloat: 1
# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "j0 (10.0) == -0.24593576445134833520":
double: 2
float: 1
@@ -437,22 +561,55 @@ ifloat: 1
Test "j0 (2.0) == 0.22389077914123566805":
float: 2
ifloat: 2
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "j0 (8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
# j1
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
Test "j1 (10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
Test "j1 (2.0) == 0.57672480775687338720":
double: 1
idouble: 1
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
Test "j1 (8.0) == 0.23463634685391462438":
double: 1
idouble: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
# jn
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "jn (0, 10.0) == -0.24593576445134833520":
double: 2
float: 1
@@ -461,47 +618,105 @@ ifloat: 1
Test "jn (0, 2.0) == 0.22389077914123566805":
float: 2
ifloat: 2
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "jn (0, 8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
Test "jn (1, 10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
Test "jn (1, 2.0) == 0.57672480775687338720":
double: 1
idouble: 1
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
Test "jn (1, 8.0) == 0.23463634685391462438":
double: 1
idouble: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
Test "jn (10, 0.1) == 0.26905328954342155795e-19":
double: 6
float: 4
idouble: 6
ifloat: 4
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "jn (10, 0.7) == 0.75175911502153953928e-11":
double: 3
float: 1
idouble: 3
ifloat: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
Test "jn (10, 10.0) == 0.20748610663335885770":
double: 4
float: 3
idouble: 4
ifloat: 3
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+float: 4
+ifloat: 4
Test "jn (10, 2.0) == 0.25153862827167367096e-6":
float: 4
ifloat: 4
Test "jn (3, 0.1) == 0.000020820315754756261429":
double: 1
idouble: 1
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "jn (3, 0.7) == 0.0069296548267508408077":
float: 1
ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
Test "jn (3, 10.0) == 0.058379379305186812343":
double: 3
float: 1
idouble: 3
ifloat: 1
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "jn (3, 2.0) == 0.12894324947440205110":
double: 1
float: 2
@@ -533,11 +748,19 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
# log1p
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
+float: 1
+ifloat: 1
Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
double: 1
float: 1
@@ -567,11 +790,19 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
double: 0.2758
float: 0.3667
idouble: 0.2758
ifloat: 0.3667
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
float: 1
ifloat: 1
@@ -616,11 +847,21 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "y0 (1.0) == 0.088256964215676957983":
double: 2
float: 1
idouble: 2
ifloat: 1
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "y0 (1.5) == 0.38244892379775884396":
double: 2
float: 1
@@ -629,6 +870,14 @@ ifloat: 1
Test "y0 (10.0) == 0.055671167283599391424":
float: 1
ifloat: 1
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y0 (8.0) == 0.22352148938756622053":
double: 1
float: 1
@@ -639,6 +888,9 @@ ifloat: 1
Test "y1 (0.1) == -6.4589510947020269877":
double: 1
idouble: 1
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
Test "y1 (0.7) == -1.1032498719076333697":
double: 1
float: 1
@@ -647,16 +899,34 @@ ifloat: 1
Test "y1 (1.5) == -0.41230862697391129595":
float: 1
ifloat: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
Test "y1 (10.0) == 0.24901542420695388392":
double: 3
float: 1
idouble: 3
ifloat: 1
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "y1 (2.0) == -0.10703243154093754689":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "y1 (8.0) == -0.15806046173124749426":
double: 1
float: 2
@@ -669,11 +939,21 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "yn (0, 1.0) == 0.088256964215676957983":
double: 2
float: 1
idouble: 2
ifloat: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "yn (0, 1.5) == 0.38244892379775884396":
double: 2
float: 1
@@ -682,6 +962,14 @@ ifloat: 1
Test "yn (0, 10.0) == 0.055671167283599391424":
float: 1
ifloat: 1
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "yn (0, 8.0) == 0.22352148938756622053":
double: 1
float: 1
@@ -690,6 +978,9 @@ ifloat: 1
Test "yn (1, 0.1) == -6.4589510947020269877":
double: 1
idouble: 1
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
Test "yn (1, 0.7) == -1.1032498719076333697":
double: 1
float: 1
@@ -698,16 +989,34 @@ ifloat: 1
Test "yn (1, 1.5) == -0.41230862697391129595":
float: 1
ifloat: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
Test "yn (1, 10.0) == 0.24901542420695388392":
double: 3
float: 1
idouble: 3
ifloat: 1
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "yn (1, 2.0) == -0.10703243154093754689":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "yn (1, 8.0) == -0.15806046173124749426":
double: 1
float: 2
@@ -718,17 +1027,36 @@ double: 2
float: 2
idouble: 2
ifloat: 2
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
Test "yn (10, 0.7) == -0.42447194260703866924e10":
double: 3
idouble: 3
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "yn (10, 1.0) == -0.12161801427868918929e9":
double: 1
idouble: 1
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
Test "yn (10, 10.0) == -0.35981415218340272205":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
Test "yn (10, 2.0) == -129184.54220803928264":
double: 2
idouble: 2
@@ -737,16 +1065,32 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
Test "yn (3, 0.7) == -15.819479052819633505":
double: 3
float: 1
idouble: 3
ifloat: 1
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "yn (3, 10.0) == -0.25136265718383732978":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
Test "yn (3, 2.0) == -1.1277837768404277861":
double: 1
idouble: 1
@@ -758,9 +1102,15 @@ float: 2
idouble: 1
ifloat: 2
+Function: "atan2":
+float: 1
+ifloat: 1
+
Function: "atanh":
double: 1
+float: 1
idouble: 1
+ifloat: 1
Function: "cabs":
double: 1
@@ -840,7 +1190,9 @@ idouble: 1
Function: Real part of "ccos":
double: 1
+float: 1
idouble: 1
+ifloat: 1
Function: Imaginary part of "ccos":
double: 1
@@ -870,6 +1222,10 @@ Function: Imaginary part of "cexp":
float: 1
ifloat: 1
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+
Function: Imaginary part of "clog":
double: 1
float: 3
@@ -895,15 +1251,15 @@ idouble: 2
ifloat: 1
Function: Real part of "cpow":
-double: 1
+double: 2
float: 4
-idouble: 1
+idouble: 2
ifloat: 4
Function: Imaginary part of "cpow":
-double: 1.1031
+double: 2
float: 2
-idouble: 1.1031
+idouble: 2
ifloat: 2
Function: Imaginary part of "csin":
@@ -954,6 +1310,10 @@ float: 1
idouble: 2
ifloat: 1
+Function: "erf":
+double: 1
+idouble: 1
+
Function: "erfc":
double: 24
float: 12
@@ -967,7 +1327,9 @@ idouble: 6
ifloat: 2
Function: "expm1":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Function: "fmod":
@@ -1014,9 +1376,9 @@ ifloat: 1
Function: "log10":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
Function: "log1p":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2906e90e245a5b496d89906549e99eccd23fb16c
commit 2906e90e245a5b496d89906549e99eccd23fb16c
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue Jun 17 11:45:52 2008 +0000
2008-06-17 Aurelian Jarno <aurelien@aurel32.net>
Carlos O'Donell <carlos@systemhalted.org>
[BZ #6037]
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11
(-EAGAIN) instead of 11. Loop again when the kernel
returns -45 (-EDEADLOCK). Add back memory clobber.
Do not initialize lws_ret and lws_errno.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index fc76d6d..2a4a712 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,12 @@
+2008-06-17 Aurelian Jarno <aurelien@aurel32.net>
+ Carlos O'Donell <carlos@systemhalted.org>
+
+ [BZ #6037]
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Check for -11
+ (-EAGAIN) instead of 11. Loop again when the kernel
+ returns -45 (-EDEADLOCK). Add back memory clobber.
+ Do not initialize lws_ret and lws_errno.
+
2008-06-17 Guy Martin <gmsoft@tuxicoman.be>
[BZ #5957]
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index b8959f7..2964732 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -51,34 +51,41 @@ typedef uintmax_t uatomic_max_t;
*addr = new;
return prev; */
-/* Use the kernel atomic light weight syscalls on hppa */
-#define LWS "0xb0"
-#define LWS_CAS "0"
-/* Note r31 is the link register */
-#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31"
-#define ASM_EAGAIN "11"
+/* Use the kernel atomic light weight syscalls on hppa. */
+#define _LWS "0xb0"
+#define _LWS_CAS "0"
+/* Note r31 is the link register. */
+#define _LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
+/* String constant for -EAGAIN. */
+#define _ASM_EAGAIN "-11"
+/* String constant for -EDEADLOCK. */
+#define _ASM_EDEADLOCK "-45"
#if __ASSUME_LWS_CAS
/* The only basic operation needed is compare and exchange. */
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
({ \
- volatile int lws_errno = EFAULT; \
- volatile int lws_ret = 0xdeadbeef; \
+ volatile int lws_errno; \
+ volatile int lws_ret; \
asm volatile( \
"0: \n\t" \
- "copy %3, %%r26 \n\t" \
- "copy %4, %%r25 \n\t" \
- "copy %5, %%r24 \n\t" \
- "ble " LWS "(%%sr2, %%r0) \n\t" \
- "ldi " LWS_CAS ", %%r20 \n\t" \
- "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
+ "copy %2, %%r26 \n\t" \
+ "copy %3, %%r25 \n\t" \
+ "copy %4, %%r24 \n\t" \
+ "ble " _LWS "(%%sr2, %%r0) \n\t" \
+ "ldi " _LWS_CAS ", %%r20 \n\t" \
+ "ldi " _ASM_EAGAIN ", %%r24 \n\t" \
+ "cmpb,=,n %%r24, %%r21, 0b \n\t" \
+ "nop \n\t" \
+ "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \
+ "cmpb,=,n %%r25, %%r21, 0b \n\t" \
"nop \n\t" \
"stw %%r28, %0 \n\t" \
"sub %%r0, %%r21, %%r21 \n\t" \
"stw %%r21, %1 \n\t" \
- : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \
+ : "=m" (lws_ret), "=m" (lws_errno) \
: "r" (mem), "r" (oldval), "r" (newval) \
- : LWS_CLOBBER \
+ : _LWS_CLOBBER \
); \
\
if(lws_errno == EFAULT || lws_errno == ENOSYS) \
@@ -91,7 +98,7 @@ typedef uintmax_t uatomic_max_t;
({ \
int ret; \
ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
- /* Return 1 if it was already acquired */ \
+ /* Return 1 if it was already acquired. */ \
(ret != oldval); \
})
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f85344ee3492c36fc01f8fe77e9802dd24a66ab
commit 6f85344ee3492c36fc01f8fe77e9802dd24a66ab
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue Jun 17 11:44:25 2008 +0000
2008-06-17 Guy Martin <gmsoft@tuxicoman.be>
[BZ #5957]
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
Use shared futex in lll_wait_tid().
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 67524ba..fc76d6d 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2008-06-17 Guy Martin <gmsoft@tuxicoman.be>
+
+ [BZ #5957]
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
+ Use shared futex in lll_wait_tid().
+
2008-05-12 Aurelien Jarno <aurelien@aurel32.net>
[BZ #6506]
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index ec907ae..6998a91 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -325,12 +325,12 @@ extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do \
- { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid, 0); \
- } \
+ do \
+ { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, LLL_SHARED); \
+ } \
while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ba025a9a21eda65d8c36cc0dbb51d214a3ebb1a
commit 1ba025a9a21eda65d8c36cc0dbb51d214a3ebb1a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jun 2 01:57:03 2008 +0000
2008-06-01 Paul Brook <paul@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/nptl/pthread_spin_lock.S,
sysdeps/arm/nptl/pthread_spin_trylock.S: Delete.
* sysdeps/arm/nptl/pthread_spin_lock.c,
sysdeps/arm/nptl/pthread_spin_trylock.c: New files using
atomic_compare_and_exchange_val_acq to take spinlocks.
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock,
lll_cond_trylock): Use atomic_compare_and_exchange_val_acq.
(__lll_trylock, __lll_cond_trylock): Delete.
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
(atomic_exchange_acq): Delete.
(atomic_full_barrier): Define.
(__arch_compare_and_exchange_val_32_acq): Use named operands.
* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update
arch_minimum_kernel to 2.6.16.
* sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index f059630..212231a 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,23 @@
+2008-06-01 Paul Brook <paul@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/nptl/pthread_spin_lock.S,
+ sysdeps/arm/nptl/pthread_spin_trylock.S: Delete.
+ * sysdeps/arm/nptl/pthread_spin_lock.c,
+ sysdeps/arm/nptl/pthread_spin_trylock.c: New files using
+ atomic_compare_and_exchange_val_acq to take spinlocks.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (lll_trylock,
+ lll_cond_trylock): Use atomic_compare_and_exchange_val_acq.
+ (__lll_trylock, __lll_cond_trylock): Delete.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+ (atomic_exchange_acq): Delete.
+ (atomic_full_barrier): Define.
+ (__arch_compare_and_exchange_val_32_acq): Use named operands.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Update
+ arch_minimum_kernel to 2.6.16.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
+
2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic
diff --git a/sysdeps/arm/nptl/pthread_spin_trylock.S b/sysdeps/arm/nptl/pthread_spin_lock.c
similarity index 73%
rename from sysdeps/arm/nptl/pthread_spin_trylock.S
rename to sysdeps/arm/nptl/pthread_spin_lock.c
index 8593150..1217b89 100644
--- a/sysdeps/arm/nptl/pthread_spin_trylock.S
+++ b/sysdeps/arm/nptl/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,19 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ERRNO_H 1
-#include <bits/errno.h>
+#include <atomic.h>
+#include "pthreadP.h"
-#include <sysdep.h>
+int
+pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0)
+ while (*lock != 0)
+ ;
- .text
- .align 4
-
-ENTRY (pthread_spin_trylock)
- mov r1, #1
- swp r2, r1, [r0]
- teq r2, #0
- moveq r0, #0
- movne r0, #EBUSY
- PSEUDO_RET_NOERRNO
-END (pthread_spin_trylock)
+ return 0;
+}
diff --git a/sysdeps/arm/nptl/pthread_spin_lock.S b/sysdeps/arm/nptl/pthread_spin_trylock.c
similarity index 76%
rename from sysdeps/arm/nptl/pthread_spin_lock.S
rename to sysdeps/arm/nptl/pthread_spin_trylock.c
index bd6adf7..fb998d2 100644
--- a/sysdeps/arm/nptl/pthread_spin_lock.S
+++ b/sysdeps/arm/nptl/pthread_spin_trylock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,16 +16,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include <errno.h>
+#include <atomic.h>
+#include "pthreadP.h"
- .text
- .align 4
-
-ENTRY (pthread_spin_lock)
- mov r1, #1
-1: swp r2, r1, [r0]
- teq r2, #0
- bne 1b
- mov r0, #0
- PSEUDO_RET_NOERRNO
-END (pthread_spin_lock)
+int
+pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+ return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0;
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
index ab83048..28fb9ef 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
@@ -1,5 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-arch_minimum_kernel=2.6.14
+arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
index 83aa8fc..d1fb7f4 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
@@ -1,5 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-arch_minimum_kernel=2.6.14
+arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
index 71ed714..247ddd3 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
@@ -37,22 +37,12 @@ typedef uintmax_t uatomic_max_t;
void __arm_link_error (void);
-#define atomic_exchange_acq(mem, newvalue) \
- ({ __typeof (*mem) result; \
- if (sizeof (*mem) == 1) \
- __asm__ __volatile__ ("swpb %0, %1, [%2]" \
- : "=&r,&r" (result) \
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
- else if (sizeof (*mem) == 4) \
- __asm__ __volatile__ ("swp %0, %1, [%2]" \
- : "=&r,&r" (result) \
- : "r,0" (newvalue), "r,r" (mem) : "memory"); \
- else \
- { \
- result = 0; \
- abort (); \
- } \
- result; })
+#define atomic_full_barrier() \
+ __asm__ __volatile__ \
+ ("mov\tip, #0xffff0fff\n\t" \
+ "mov\tlr, pc\n\t" \
+ "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
+ : : : "ip", "lr", "cc", "memory");
/* Atomic compare and exchange. This sequence relies on the kernel to
provide a compare and exchange operation which is atomic on the
@@ -76,18 +66,19 @@ void __arm_link_error (void);
register __typeof (oldval) a_tmp asm ("r3"); \
register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
__asm__ __volatile__ \
- ("0:\tldr\t%1,[%3]\n\t" \
- "cmp\t%1, %4\n\t" \
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
+ "cmp\t%[tmp], %[old2]\n\t" \
"bne\t1f\n\t" \
- "mov\t%0, %4\n\t" \
- "mov\t%1, #0xffff0fff\n\t" \
+ "mov\t%[old], %[old2]\n\t" \
+ "mov\t%[tmp], #0xffff0fff\n\t" \
"mov\tlr, pc\n\t" \
- "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \
+ "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \
"bcc\t0b\n\t" \
- "mov\t%1, %4\n\t" \
+ "mov\t%[tmp], %[old2]\n\t" \
"1:" \
- : "=&r" (a_oldval), "=&r" (a_tmp) \
- : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
+ [old2] "r" (a_oldval2) \
: "ip", "lr", "cc", "memory"); \
a_tmp; })
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index f48e867..889f97c 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -126,43 +126,11 @@
})
-static inline int __attribute__((always_inline))
-__lll_trylock (int *futex)
-{
- int flag = 1, old;
- asm volatile (
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
- "\tcmp %[old], #1 @ check old lock value\n"
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
- " @ restore the contested flag,\n"
- " @ and check whether that won."
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
- : : "memory" );
-
- return flag;
-}
-#define lll_trylock(lock) __lll_trylock (&(lock))
-
-
-static inline int __attribute__((always_inline))
-__lll_cond_trylock (int *futex)
-{
- int flag = 2, old;
- asm volatile (
- "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
- "\tcmp %[old], #1 @ check old lock value\n"
- "\tmovlo %[flag], #0 @ if we got it, return 0\n"
- "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
- " @ restore the contested flag,\n"
- " @ and check whether that won."
- : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
- : : "memory" );
-
- return flag;
-}
-#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock))
+#define lll_trylock(lock) \
+ atomic_compare_and_exchange_val_acq(&(lock), 1, 0)
+#define lll_cond_trylock(lock) \
+ atomic_compare_and_exchange_val_acq(&(lock), 2, 0)
#define __lll_robust_trylock(futex, id) \
(atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83d53ff1aa05f0ca0d397f01cd20eef375514f93
commit 83d53ff1aa05f0ca0d397f01cd20eef375514f93
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 21 17:50:58 2008 +0000
2008-05-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace.
(SOCK_DCCP): Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 398fac9..8a90a3d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-05-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h: Cleanup namespace.
+ (SOCK_DCCP): Define.
+
2008-05-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/resource.h: Define
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 8748c0a..f3adf5f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,10 +26,8 @@
#endif
#define __need_size_t
-#define __need_NULL
#include <stddef.h>
-#include <limits.h>
#include <sys/types.h>
/* Type for length arguments in socket calls. */
@@ -54,6 +52,8 @@ enum __socket_type
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
datagrams of fixed maximum length. */
#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6,
+#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
SOCK_PACKET = 10 /* Linux specific way of getting packets
at the dev level. For writing rarp and
other similar things on the user level. */
@@ -156,11 +156,7 @@ struct sockaddr
/* Structure large enough to hold any socket address (with the historical
exception of AF_UNIX). We reserve 128 bytes. */
-#if ULONG_MAX > 0xffffffff
-# define __ss_aligntype __uint64_t
-#else
-# define __ss_aligntype __uint32_t
-#endif
+#define __ss_aligntype unsigned long int
#define _SS_SIZE 128
#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
@@ -257,7 +253,7 @@ struct cmsghdr
#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
#define CMSG_FIRSTHDR(mhdr) \
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
& (size_t) ~(sizeof (size_t) - 1))
#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
@@ -301,18 +297,74 @@ enum
#endif
};
+#ifdef __USE_GNU
/* User visible structure for SCM_CREDENTIALS message */
-
struct ucred
{
pid_t pid; /* PID of sending process. */
uid_t uid; /* UID of sending process. */
gid_t gid; /* GID of sending process. */
};
+#endif
+
+/* Ugly workaround for unclean kernel headers. */
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifndef FIOGETOWN
+# define __SYS_SOCKET_H_undef_FIOGETOWN
+# endif
+# ifndef FIOSETOWN
+# define __SYS_SOCKET_H_undef_FIOSETOWN
+# endif
+# ifndef SIOCATMARK
+# define __SYS_SOCKET_H_undef_SIOCATMARK
+# endif
+# ifndef SIOCGPGRP
+# define __SYS_SOCKET_H_undef_SIOCGPGRP
+# endif
+# ifndef SIOCGSTAMP
+# define __SYS_SOCKET_H_undef_SIOCGSTAMP
+# endif
+# ifndef SIOCGSTAMPNS
+# define __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# endif
+# ifndef SIOCSPGRP
+# define __SYS_SOCKET_H_undef_SIOCSPGRP
+# endif
+#endif
/* Get socket manipulation related informations from kernel headers. */
#include <asm/socket.h>
+#if !defined __USE_MISC && !defined __USE_GNU
+# ifdef __SYS_SOCKET_H_undef_FIOGETOWN
+# undef __SYS_SOCKET_H_undef_FIOGETOWN
+# undef FIOGETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_FIOSETOWN
+# undef __SYS_SOCKET_H_undef_FIOSETOWN
+# undef FIOSETOWN
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCATMARK
+# undef __SYS_SOCKET_H_undef_SIOCATMARK
+# undef SIOCATMARK
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGPGRP
+# undef __SYS_SOCKET_H_undef_SIOCGPGRP
+# undef SIOCGPGRP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP
+# undef __SYS_SOCKET_H_undef_SIOCGSTAMP
+# undef SIOCGSTAMP
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS
+# undef SIOCGSTAMPNS
+# endif
+# ifdef __SYS_SOCKET_H_undef_SIOCSPGRP
+# undef __SYS_SOCKET_H_undef_SIOCSPGRP
+# undef SIOCSPGRP
+# endif
+#endif
/* Structure used to manipulate the SO_LINGER option. */
struct linger
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=601352feab3364f14ccfc8db193bb3dbc5ad7771
commit 601352feab3364f14ccfc8db193bb3dbc5ad7771
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon May 12 12:09:21 2008 +0000
2008-05-12 Aurelien Jarno <aurelien@aurel32.net>
[BZ #6506]
* sysdeps/hppa/fpu/fesetenv.c: bufptr is always read, temp is
read while writing back status word.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 1bc6138..67524ba 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2008-05-12 Aurelien Jarno <aurelien@aurel32.net>
+
+ [BZ #6506]
+ * sysdeps/hppa/fpu/fesetenv.c: bufptr is always read, temp is
+ read while writing back status word.
+
2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index b5753ef..1a5ca65 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -35,7 +35,7 @@ fesetenv (const fenv_t *envp)
bufptr = temp.buf;
__asm__ (
"fstd,ma %%fr0,8(%1)\n"
- : "=m" (temp), "+r" (bufptr) : : "%r0");
+ : "=m" (temp) : "r" (bufptr) : "%r0");
temp.env.__status_word &= ~(FE_ALL_EXCEPT
| (FE_ALL_EXCEPT << 27)
@@ -56,7 +56,7 @@ fesetenv (const fenv_t *envp)
is loaded last and T-Bit is enabled. */
__asm__ (
"fldd,mb -8(%1),%%fr0\n"
- : "=m" (temp), "+r" (bufptr) : : "%r0" );
+ : : "m" (temp), "r" (bufptr) : "%r0" );
/* Success. */
return 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=098cab74db4db7c2a229069b9f54c55170f9a6db
commit 098cab74db4db7c2a229069b9f54c55170f9a6db
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu May 1 12:34:13 2008 +0000
2008-05-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/resource.h: Define
RUSAGE_THREAD and RUSAGE_LWP.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b4253d8..398fac9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-05-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/resource.h: Define
+ RUSAGE_THREAD and RUSAGE_LWP.
+
2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 1c8b99a..3cfdc5d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -166,8 +166,16 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b38a90999fdcfd6f19832ffd0112e11e126d9b02
commit b38a90999fdcfd6f19832ffd0112e11e126d9b02
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 1 05:37:45 2008 +0000
Define RUSAGE_THREAD and RUSAGE_LWP.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index 2163745..92d0199 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -158,8 +158,16 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
+ RUSAGE_CHILDREN = -1,
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
};
#define __need_timeval
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7272ed4e474a398b8ce1e7374cdaa8592b840e2a
commit 7272ed4e474a398b8ce1e7374cdaa8592b840e2a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:54:22 2008 +0000
* sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic
version.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 7a5ac15..f059630 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic
+ version.
+
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h.
diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c
index dfca75d..209f364 100644
--- a/sysdeps/unix/sysv/linux/arm/check_pf.c
+++ b/sysdeps/unix/sysv/linux/arm/check_pf.c
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Linux version.
- Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,12 +35,12 @@
#include <kernel-features.h>
-#ifndef IFA_F_TEMPORARY
-# define IFA_F_TEMPORARY IFA_F_SECONDARY
-#endif
#ifndef IFA_F_HOMEADDRESS
# define IFA_F_HOMEADDRESS 0
#endif
+#ifndef IFA_F_OPTIMISTIC
+# define IFA_F_OPTIMISTIC 0
+#endif
static int
@@ -140,89 +140,67 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
struct rtattr *rta = IFA_RTA (ifam);
size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam));
- switch (ifam->ifa_family)
- {
- const void *local;
- const void *address;
+ if (ifam->ifa_family != AF_INET
+ && ifam->ifa_family != AF_INET6)
+ continue;
- case AF_INET:
- local = NULL;
- address = NULL;
- while (RTA_OK (rta, len))
+ const void *local = NULL;
+ const void *address = NULL;
+ while (RTA_OK (rta, len))
+ {
+ switch (rta->rta_type)
{
- switch (rta->rta_type)
- {
- case IFA_LOCAL:
- local = RTA_DATA (rta);
- break;
-
- case IFA_ADDRESS:
- address = RTA_DATA (rta);
- goto out_v4;
- }
-
- rta = RTA_NEXT (rta, len);
+ case IFA_LOCAL:
+ local = RTA_DATA (rta);
+ break;
+
+ case IFA_ADDRESS:
+ address = RTA_DATA (rta);
+ goto out;
}
- if (local != NULL)
+ rta = RTA_NEXT (rta, len);
+ }
+
+ if (local != NULL)
+ {
+ address = local;
+ out:
+ if (ifam->ifa_family == AF_INET)
{
- out_v4:
- if (*(const in_addr_t *) (address ?: local)
+ if (*(const in_addr_t *) address
!= htonl (INADDR_LOOPBACK))
*seen_ipv4 = true;
}
- break;
-
- case AF_INET6:
- local = NULL;
- address = NULL;
- while (RTA_OK (rta, len))
- {
- switch (rta->rta_type)
- {
- case IFA_LOCAL:
- local = RTA_DATA (rta);
- break;
-
- case IFA_ADDRESS:
- address = RTA_DATA (rta);
- goto out_v6;
- }
-
- rta = RTA_NEXT (rta, len);
- }
-
- if (local != NULL)
+ else
{
- out_v6:
- if (!IN6_IS_ADDR_LOOPBACK (address ?: local))
+ if (!IN6_IS_ADDR_LOOPBACK (address))
*seen_ipv6 = true;
}
+ }
- if (ifam->ifa_flags & (IFA_F_DEPRECATED
- | IFA_F_TEMPORARY
- | IFA_F_HOMEADDRESS))
- {
- struct in6ailist *newp = alloca (sizeof (*newp));
- newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
- ? in6ai_deprecated : 0)
- | ((ifam->ifa_flags
- & IFA_F_TEMPORARY)
- ? in6ai_temporary : 0)
- | ((ifam->ifa_flags
- & IFA_F_HOMEADDRESS)
- ? in6ai_homeaddress : 0));
- memcpy (newp->info.addr, address ?: local,
- sizeof (newp->info.addr));
- newp->next = in6ailist;
- in6ailist = newp;
- ++in6ailistlen;
- }
- break;
- default:
- /* Ignore. */
- break;
+ struct in6ailist *newp = alloca (sizeof (*newp));
+ newp->info.flags = (((ifam->ifa_flags
+ & (IFA_F_DEPRECATED
+ | IFA_F_OPTIMISTIC))
+ ? in6ai_deprecated : 0)
+ | ((ifam->ifa_flags
+ & IFA_F_HOMEADDRESS)
+ ? in6ai_homeaddress : 0));
+ newp->info.prefixlen = ifam->ifa_prefixlen;
+ newp->info.index = ifam->ifa_index;
+ if (ifam->ifa_family == AF_INET)
+ {
+ newp->info.addr[0] = 0;
+ newp->info.addr[1] = 0;
+ newp->info.addr[2] = htonl (0xffff);
+ newp->info.addr[3] = *(const in_addr_t *) address;
}
+ else
+ memcpy (newp->info.addr, address, sizeof (newp->info.addr));
+ newp->next = in6ailist;
+ in6ailist = newp;
+ ++in6ailistlen;
}
else if (nlmh->nlmsg_type == NLMSG_DONE)
/* We found the end, leave the loop. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=89e412f53587908cb894a98bea8966db6fe820e3
commit 89e412f53587908cb894a98bea8966db6fe820e3
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:45:00 2008 +0000
* sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing
shmid_ds.
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing
shmid_ds.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index d46a0e0..1bc6138 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/shm.h: Fix comment describing
+ shmid_ds.
+
2008-04-04 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9e8fb04..b4253d8 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-04-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/shm.h: Fix comment describing
+ shmid_ds.
+
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
index a91f1f5..13efced 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -42,7 +42,7 @@
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
-/* Data structure describing a set of semaphores. */
+/* Data structure describing a shared memory segment. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index b308334..037980c 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -42,7 +42,7 @@
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
-/* Data structure describing a set of semaphores. */
+/* Data structure describing a shared memory segment. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93ae51192837ed1f2a284819640d2b08fef68436
commit 93ae51192837ed1f2a284819640d2b08fef68436
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:41:06 2008 +0000
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index cbc72ef..9e8fb04 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2008-04-21 Khem Raj <kraj@mvista.com>
+
+ * sysdeps/unix/sysv/linux/mips/xmknod.c: Delete file.
+
2008-04-02 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
deleted file mode 100644
index 2d09752..0000000
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Create a device file named PATH, with permission and special bits MODE
- and device number DEV (which can be constructed from major and minor
- device numbers with the `makedev' macro above). */
-int
-__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
-{
- unsigned long k_dev;
-
- if (vers != _MKNOD_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* We must convert the value to dev_t type used by the kernel. */
- k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
-
- return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, k_dev);
-}
-
-weak_alias (__xmknod, _xmknod)
-libc_hidden_def (__xmknod)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5af13f121890eba73405e47e0b5fbbf6ecfa0cd
commit b5af13f121890eba73405e47e0b5fbbf6ecfa0cd
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:37:36 2008 +0000
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 661a68c..7a5ac15 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2008-04-21 Khem Raj <kraj@mvista.com>
+
+ * sysdeps/unix/sysv/linux/arm/ioperm.c: Don't include asm/page.h.
+
2008-04-21 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6,
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 65ec077..1fa849d 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -45,7 +45,6 @@
#include <sys/mman.h>
#include <linux/version.h>
-#include <asm/page.h>
#include <sys/sysctl.h>
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6e41f0f4963bfb0c0e32f8263ae028b288b5453
commit e6e41f0f4963bfb0c0e32f8263ae028b288b5453
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:34:31 2008 +0000
2008-04-21 Mike Frysinger <vapier@gentoo.org>
* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6,
UNDOCARGS_6): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5155ce5..661a68c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2008-04-21 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (DOCARGS_6,
+ UNDOCARGS_6): Define.
+
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/arm/bits/shm.h: New file.
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
index 3fb2186..9c80771 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
@@ -73,6 +73,9 @@
# define DOCARGS_5 DOCARGS_4
# define UNDOCARGS_5 UNDOCARGS_4
+# define DOCARGS_6 DOCARGS_5
+# define UNDOCARGS_6 UNDOCARGS_5
+
# ifdef IS_IN_libpthread
# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8d992d7089fab171c9c60fd6a313814f1ff58ee
commit e8d992d7089fab171c9c60fd6a313814f1ff58ee
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Apr 21 15:26:44 2008 +0000
2008-04-21 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/arm/bits/shm.h: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 2ed314c..5155ce5 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2008-04-21 Khem Raj <kraj@mvista.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/shm.h: New file.
+
2008-04-11 Paul Brook <paul@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arm/bits/shm.h b/sysdeps/unix/sysv/linux/arm/bits/shm.h
new file mode 100644
index 0000000..4faa287
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/bits/shm.h
@@ -0,0 +1,104 @@
+/* Copyright (C) 1995,1996,1997,2000,2002,2004,2008
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Permission flag for shmget. */
+#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
+#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+
+/* Flags for `shmat'. */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+
+/* Commands for `shmctl'. */
+#define SHM_LOCK 11 /* lock segment (root only) */
+#define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+__BEGIN_DECLS
+
+/* Segment low boundary address multiple. */
+#define SHMLBA (__getpagesize () << 2)
+extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+
+
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
+/* Data structure describing a shared memory segment. */
+struct shmid_ds
+ {
+ struct ipc_perm shm_perm; /* operation permission struct */
+ size_t shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ unsigned long int __unused1;
+ __time_t shm_dtime; /* time of last shmdt() */
+ unsigned long int __unused2;
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ unsigned long int __unused3;
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ };
+
+#ifdef __USE_MISC
+
+/* ipcs ctl commands */
+# define SHM_STAT 13
+# define SHM_INFO 14
+
+/* shm_mode upper byte flags */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
+
+struct shminfo
+ {
+ unsigned long int shmmax;
+ unsigned long int shmmin;
+ unsigned long int shmmni;
+ unsigned long int shmseg;
+ unsigned long int shmall;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ };
+
+struct shm_info
+ {
+ int used_ids;
+ unsigned long int shm_tot; /* total allocated shm */
+ unsigned long int shm_rss; /* total resident shm */
+ unsigned long int shm_swp; /* total swapped shm */
+ unsigned long int swap_attempts;
+ unsigned long int swap_successes;
+ };
+
+#endif /* __USE_MISC */
+
+__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f1d477bb4d11eef7be502c79cb8852122ec38d1
commit 5f1d477bb4d11eef7be502c79cb8852122ec38d1
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Apr 11 14:21:43 2008 +0000
2008-04-11 Paul Brook <paul@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
* sysdeps/arm/eabi/machine-gmon.h: New file.
* sysdeps/arm/eabi/Versions: Add __gnu_mcount_nc.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index f23b2b9..2ed314c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2008-04-11 Paul Brook <paul@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * sysdeps/arm/eabi/machine-gmon.h: New file.
+ * sysdeps/arm/eabi/Versions: Add __gnu_mcount_nc.
+
2007-12-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version.
diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions
index ca51099..5f2af29 100644
--- a/sysdeps/arm/eabi/Versions
+++ b/sysdeps/arm/eabi/Versions
@@ -14,4 +14,7 @@ libc {
# Helper routines
__gnu_Unwind_Find_exidx;
}
+ GLIBC_2.8 {
+ __gnu_mcount_nc;
+ }
}
diff --git a/sysdeps/arm/eabi/machine-gmon.h b/sysdeps/arm/eabi/machine-gmon.h
new file mode 100644
index 0000000..189a9a3
--- /dev/null
+++ b/sysdeps/arm/eabi/machine-gmon.h
@@ -0,0 +1,99 @@
+/* Machine-dependent definitions for profiling support. ARM EABI version.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
+ so we must use an assembly stub. */
+
+#include <sysdep.h>
+static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
+
+#define _MCOUNT_DECL(frompc, selfpc) \
+static void mcount_internal (u_long frompc, u_long selfpc)
+
+/* Use an assembly stub with a special ABI. The calling lr has been
+ pushed to the stack (which will be misaligned). We should preserve
+ all registers except ip and pop a word off the stack.
+
+ NOTE: This assumes mcount_internal does not clobber any non-core
+ (coprocessor) registers. Currently this is true, but may require
+ additional attention in the future.
+
+ The calling sequence looks something like:
+func:
+ push {lr}
+ bl __gnu_mount_nc
+ <function body>
+ */
+
+
+#define MCOUNT \
+void __attribute__((__naked__)) __gnu_mcount_nc(void) \
+{ \
+ asm ("push {r0, r1, r2, r3, lr}\n\t" \
+ "bic r1, lr, #1\n\t" \
+ "ldr r0, [sp, #20]\n\t" \
+ "bl mcount_internal\n\t" \
+ "pop {r0, r1, r2, r3, ip, lr}\n\t" \
+ "bx ip"); \
+} \
+OLD_MCOUNT
+
+/* Provide old mcount for backwards compatibility. This requires
+ code be compiled with APCS frame pointers. */
+
+#ifndef NO_UNDERSCORES
+/* The asm symbols for C functions are `_function'.
+ The canonical name for the counter function is `mcount', no _. */
+void _mcount (void) asm ("mcount");
+#else
+/* The canonical name for the function is `_mcount' in both C and asm,
+ but some old asm code might assume it's `mcount'. */
+void _mcount (void);
+weak_alias (_mcount, mcount)
+#endif
+
+#ifdef __thumb2__
+
+#define OLD_MCOUNT \
+void __attribute__((__naked__)) _mcount (void) \
+{ \
+ __asm__("push {r0, r1, r2, r3, fp, lr};" \
+ "movs r0, fp;" \
+ "ittt ne;" \
+ "ldrne r0, [r0, #-4];" \
+ "movsne r1, lr;" \
+ "blne mcount_internal;" \
+ "pop {r0, r1, r2, r3, fp, pc}"); \
+}
+
+#else
+
+#define OLD_MCOUNT \
+void __attribute__((__naked__)) _mcount (void) \
+{ \
+ __asm__("stmdb sp!, {r0, r1, r2, r3, fp, lr};" \
+ "movs fp, fp;" \
+ "ldrne r0, [fp, #-4];" \
+ "movnes r1, lr;" \
+ "blne mcount_internal;" \
+ "ldmia sp!, {r0, r1, r2, r3, fp, lr};" \
+ "bx lr"); \
+}
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6fe80ef8d3f3ce12029ffabda3a01c465e0016b
commit f6fe80ef8d3f3ce12029ffabda3a01c465e0016b
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 4 18:57:47 2008 +0000
2008-04-04 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove
memory contraint and instead indicate that *mem is
written to.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index abe017e..d46a0e0 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2008-04-04 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove
+ memory contraint and instead indicate that *mem is
+ written to.
+
2008-03-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/sys/user.h: New file.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index 92a309d..b8959f7 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -55,7 +55,7 @@ typedef uintmax_t uatomic_max_t;
#define LWS "0xb0"
#define LWS_CAS "0"
/* Note r31 is the link register */
-#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
+#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31"
#define ASM_EAGAIN "11"
#if __ASSUME_LWS_CAS
@@ -76,7 +76,7 @@ typedef uintmax_t uatomic_max_t;
"stw %%r28, %0 \n\t" \
"sub %%r0, %%r21, %%r21 \n\t" \
"stw %%r21, %1 \n\t" \
- : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \
+ : "=m" (lws_ret), "=m" (lws_errno), "+m" (*mem) \
: "r" (mem), "r" (oldval), "r" (newval) \
: LWS_CLOBBER \
); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7221ac034cb358fc823301b886621d36020813ab
commit 7221ac034cb358fc823301b886621d36020813ab
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Apr 2 12:58:39 2008 +0000
2008-04-02 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add
truncate and ftruncate systems calls.
* sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an
empty file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Ditto.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index a7a219e..cbc72ef 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2008-04-02 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add
+ truncate and ftruncate systems calls.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an
+ empty file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: Ditto.
+
2008-03-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
index 42efcba..6e25b02 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
@@ -1,28 +1 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-
-#include <sysdep.h>
-
-extern int ftruncate (int fd, off64_t length);
-
-int __ftruncate64 (int fd, off64_t length) {
- return ftruncate (fd, length);
-}
-weak_alias (__ftruncate64, ftruncate64)
+/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
index babdba0..2e4bed0 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
@@ -3,3 +3,5 @@
readahead - readahead i:iii __readahead readahead
sync_file_range - sync_file_range i:iiii sync_file_range
posix_fadvise - fadvise64 i:iiii posix_fadvise
+ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
+truncate - truncate i:si truncate truncate64
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
index 339023f..6e25b02 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
@@ -1,30 +1 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <bp-checks.h>
-
-extern int truncate (const char *__unbounded path, int dummy,
- off64_t length);
-
-int truncate64 (const char *__unbounded path, int dummy,
- off64_t length) {
- return truncate (path, dummy, length);
-}
+/* Empty. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=560bab76911818553f387db768b5c000b53cbbd3
commit 560bab76911818553f387db768b5c000b53cbbd3
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Mar 28 17:43:50 2008 +0000
* sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine
ARG_MAX if <linux/limits.h> has defined it.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 0ca16cc..a7a219e 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,4 +1,9 @@
-2008-03-27 Robin Randhawa <robin@mips.com>
+2008-03-28 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Undefine
+ ARG_MAX if <linux/limits.h> has defined it.
+
+2008-03-28 Robin Randhawa <robin@mips.com>
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory
barriers to enforce strict ordering on weakly ordered systems.
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h
index 4c3f5f6..c6fae63 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-1998,2000,2002,2003,2004,2007
+ Copyright (C) 1993-1998,2000,2002,2003,2004,2007,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -32,6 +32,9 @@
#ifndef OPEN_MAX
# define __undef_OPEN_MAX
#endif
+#ifndef ARG_MAX
+# define __undef_ARG_MAX
+#endif
/* The kernel sources contain a file with all the needed information. */
#include <linux/limits.h>
@@ -51,6 +54,11 @@
# undef OPEN_MAX
# undef __undef_OPEN_MAX
#endif
+/* Have to remove ARG_MAX? */
+#ifdef __undef_ARG_MAX
+# undef ARG_MAX
+# undef __undef_ARG_MAX
+#endif
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=625680f978077a09e210e5dcfc66e5700db26dad
commit 625680f978077a09e210e5dcfc66e5700db26dad
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Mar 28 17:41:20 2008 +0000
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory
barriers to enforce strict ordering on weakly ordered systems.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 711f23b..0ca16cc 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2008-03-27 Robin Randhawa <robin@mips.com>
+
+ * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Added memory
+ barriers to enforce strict ordering on weakly ordered systems.
+
2008-03-26 David Stephenson <david.stephenson@sicortex.com>
Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 309438d..b370ee4 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -40,17 +40,19 @@ __NTH (_test_and_set (int *p, int v))
__asm__ __volatile__
("/* Inline test and set */\n"
- "1:\n\t"
".set push\n\t"
#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
+ "sync\n\t"
+ "1:\n\t"
"ll %0,%3\n\t"
"move %1,%4\n\t"
"beq %0,%4,2f\n\t"
"sc %1,%2\n\t"
- ".set pop\n\t"
"beqz %1,1b\n"
+ "sync\n\t"
+ ".set pop\n\t"
"2:\n\t"
"/* End test and set */"
: "=&r" (r), "=&r" (t), "=m" (*p)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04d6ca32f128f2d5571bdeb36e34e306ec71e9f9
commit 04d6ca32f128f2d5571bdeb36e34e306ec71e9f9
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Mar 28 12:23:06 2008 +0000
2008-03-28 Maxim Kuvyrkov <maxim@codesourcery.com>
Explicitly get address of _DYNAMIC.
* sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC
from GOT instead of assuming value at GOT pointer.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 33323c6..b6aa316 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,9 @@
+2008-03-28 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ Explicitly get address of _DYNAMIC.
+ * sysdeps/m68k/dl-machine.h (elf_machine_dynamic): Retrieve _DYNAMIC
+ from GOT instead of assuming value at GOT pointer.
+
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index fad1ef9..08a4396 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -33,14 +33,16 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
}
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
+/* Return the link-time address of _DYNAMIC.
+ This must be inlined in a function which uses global data. */
static inline Elf32_Addr
elf_machine_dynamic (void)
{
- register Elf32_Addr *got asm ("%a5");
- return *got;
+ Elf32_Addr addr;
+
+ asm ("move.l _DYNAMIC@GOT.w(%%a5), %0"
+ : "=a" (addr));
+ return addr;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=285e04f887a752cc2ad7d74f89956894ac1ac82b
commit 285e04f887a752cc2ad7d74f89956894ac1ac82b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 27 16:23:14 2008 +0000
Remove open system call.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 7b3f233..de2c3ce 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -17,8 +17,6 @@ sigstack - sigstack 2 sigstack
vfork - vfork 0 __vfork vfork
getpriority - getpriority i:ii __getpriority getpriority
-open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64
-open64 open -
# proper socket implementations:
accept - accept Ci:iBN __libc_accept __accept accept
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=595cb734b2d4daba98ce8d092b98a04fa944e447
commit 595cb734b2d4daba98ce8d092b98a04fa944e447
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 27 15:19:41 2008 +0000
Undefined ARG_MAX if <linux/limits.h> has defined it.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
index 9b27b1f..a7c9740 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Linux/Alpha version.
- Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
+ Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,6 +31,9 @@
#ifndef OPEN_MAX
# define __undef_OPEN_MAX
#endif
+#ifndef ARG_MAX
+# define __undef_ARG_MAX
+#endif
/* The kernel sources contain a file with all the needed information. */
#include <linux/limits.h>
@@ -50,6 +53,11 @@
# undef OPEN_MAX
# undef __undef_OPEN_MAX
#endif
+/* Have to remove ARG_MAX? */
+#ifdef __undef_ARG_MAX
+# undef ARG_MAX
+# undef __undef_ARG_MAX
+#endif
/* The number of data keys per process. */
#define _POSIX_THREAD_KEYS_MAX 128
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af7eda0ff6ca16406e8caab1ba2e97d03afc425e
commit af7eda0ff6ca16406e8caab1ba2e97d03afc425e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Mar 26 13:21:26 2008 +0000
* sysdeps/mips/fpu/fesetround.c (fesetround): Use fpu_control_t.
* sysdeps/mips/fpu/fgetexcptflg.c (fegetexceptflag): Likewise.
* sysdeps/mips/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 16cdc48..711f23b 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,10 @@
+2008-03-26 David Stephenson <david.stephenson@sicortex.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/mips/fpu/fesetround.c (fesetround): Use fpu_control_t.
+ * sysdeps/mips/fpu/fgetexcptflg.c (fegetexceptflag): Likewise.
+ * sysdeps/mips/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
+
2008-03-09 Andreas Jaeger <aj@suse.de>
[BZ #5753]
diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c
index 9477109..c28bd60 100644
--- a/sysdeps/mips/fpu/fesetround.c
+++ b/sysdeps/mips/fpu/fesetround.c
@@ -24,7 +24,7 @@
int
fesetround (int round)
{
- unsigned short int cw;
+ fpu_control_t cw;
if ((round & ~0x3) != 0)
/* ROUND is no valid rounding mode. */
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 3412159..27875b3 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -24,7 +24,7 @@
int
fegetexceptflag (fexcept_t *flagp, int excepts)
{
- fexcept_t temp;
+ fpu_control_t temp;
/* Get the current exceptions. */
_FPU_GETCW (temp);
diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/sysdeps/mips/fpu/fsetexcptflg.c
index c65d793..b129375 100644
--- a/sysdeps/mips/fpu/fsetexcptflg.c
+++ b/sysdeps/mips/fpu/fsetexcptflg.c
@@ -24,7 +24,7 @@
int
fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- fexcept_t temp;
+ fpu_control_t temp;
/* Get the current exceptions. */
_FPU_GETCW (temp);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5186f3bbabfe7348cf8d060d974f9eaf42bb715
commit b5186f3bbabfe7348cf8d060d974f9eaf42bb715
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon Mar 24 13:07:56 2008 +0000
2008-03-24 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/sys/user.h: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 35a273e..abe017e 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,7 @@
+2008-03-24 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/sys/user.h: New file.
+
2008-03-14 Carlos O'Donell <carlos@codesourcery.com>
Guy Martin <gmsoft@tuxicoman.be>
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/user.h b/sysdeps/unix/sysv/linux/hppa/sys/user.h
new file mode 100644
index 0000000..c871f1a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/sys/user.h
@@ -0,0 +1 @@
+/* This file is not needed, but in practice gdb might try to include it. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad9393f0e1261b33e04e01cf8b01858df640c9ff
commit ad9393f0e1261b33e04e01cf8b01858df640c9ff
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Mar 14 23:40:55 2008 +0000
2008-03-14 Carlos O'Donell <carlos@codesourcery.com>
Guy Martin <gmsoft@tuxicoman.be>
[BZ #5923]
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass
timespec and futexp.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 8a51f8e..35a273e 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,10 @@
+2008-03-14 Carlos O'Donell <carlos@codesourcery.com>
+ Guy Martin <gmsoft@tuxicoman.be>
+
+ [BZ #5923]
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Pass
+ timespec and futexp.
+
2008-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/Makefile: Remove.
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index 522380e..ec907ae 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -111,7 +111,7 @@ typedef int lll_lock_t;
lll_private_futex_timed_wait (futex, val, NULL)
#ifdef __ASSUME_PRIVATE_FUTEX
-# define lll_private_futex_timed_wait(futex, val, timeout) \
+# define lll_private_futex_timed_wait(futexp, val, timespec) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2af06d0d3e6d8dedba11aacfad136b0372d9688c
commit 2af06d0d3e6d8dedba11aacfad136b0372d9688c
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 10 06:20:30 2008 +0000
[BZ #5753]
* sysdeps/mips/ieee754.h: Use protected namespace
__BIG_ENDIAN/__LITTLE_ENDIAN.
Patch by Aurelien Jarno <aurelien@aurel32.net>.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index d73b218..16cdc48 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,10 @@
+2008-03-09 Andreas Jaeger <aj@suse.de>
+
+ [BZ #5753]
+ * sysdeps/mips/ieee754.h: Use protected namespace
+ __BIG_ENDIAN/__LITTLE_ENDIAN.
+ Patch by Aurelien Jarno <aurelien@aurel32.net>.
+
2008-03-04 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo):
diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h
index ed13de2..912e088 100644
--- a/sysdeps/mips/ieee754.h
+++ b/sysdeps/mips/ieee754.h
@@ -83,7 +83,7 @@ union ieee754_double
unsigned int mantissa1:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:20;
unsigned int exponent:11;
unsigned int negative:1;
@@ -109,7 +109,7 @@ union ieee754_double
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
unsigned int exponent:11;
@@ -203,7 +203,7 @@ union ieee854_long_double
unsigned int mantissa1:32;
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
@@ -232,7 +232,7 @@ union ieee854_long_double
unsigned int mantissa1:32;
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
@@ -272,7 +272,7 @@ union ieee854_long_double
unsigned int mantissa1:32;
#endif /* Big endian. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:20;
unsigned int exponent:11;
unsigned int negative:1;
@@ -298,7 +298,7 @@ union ieee854_long_double
unsigned int mantissa0:19;
unsigned int mantissa1:32;
#else
-# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
unsigned int mantissa0:19;
unsigned int quiet_nan:1;
unsigned int exponent:11;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7812cbad411364ceea15e841ca26d14602644851
commit 7812cbad411364ceea15e841ca26d14602644851
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 4 19:39:30 2008 +0000
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo):
Reorganize to match other architectures. Replace _timer._timer1
and _timer._timer2 with _timer.si_tid, _timer.si_overrun, and
_timer.si_sigval. Correct the type of _sigpoll.si_band.
(si_timerid, si_overrun): Define.
(__SIGEV_PAD_SIZE): Correct for __WORDSIZE == 64.
(__pthread_attr_s): Remove declaration.
(struct sigevent): Remove XXX. Add _tid.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index ffbc344..d73b218 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,14 @@
+2008-03-04 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (struct siginfo):
+ Reorganize to match other architectures. Replace _timer._timer1
+ and _timer._timer2 with _timer.si_tid, _timer.si_overrun, and
+ _timer.si_sigval. Correct the type of _sigpoll.si_band.
+ (si_timerid, si_overrun): Define.
+ (__SIGEV_PAD_SIZE): Correct for __WORDSIZE == 64.
+ (__pthread_attr_s): Remove declaration.
+ (struct sigevent): Remove XXX. Add _tid.
+
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 787e365..e0fc81a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/MIPS version.
- Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -70,6 +70,22 @@ typedef struct siginfo
__uid_t si_uid; /* Real user ID of sending process. */
} _kill;
+ /* POSIX.1b timers. */
+ struct
+ {
+ int si_tid; /* Timer ID. */
+ int si_overrun; /* Overrun count. */
+ sigval_t si_sigval; /* Signal value. */
+ } _timer;
+
+ /* POSIX.1b signals. */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ sigval_t si_sigval; /* Signal value. */
+ } _rt;
+
/* SIGCHLD. */
struct
{
@@ -89,24 +105,9 @@ typedef struct siginfo
/* SIGPOLL. */
struct
{
- int si_band; /* Band event for SIGPOLL. */
+ long int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
-
- /* POSIX.1b timers. */
- struct
- {
- unsigned int _timer1;
- unsigned int _timer2;
- } _timer;
-
- /* POSIX.1b signals. */
- struct
- {
- __pid_t si_pid; /* Sending process ID. */
- __uid_t si_uid; /* Real user ID of sending process. */
- sigval_t si_sigval; /* Signal value. */
- } _rt;
} _sifields;
} siginfo_t;
@@ -114,6 +115,8 @@ typedef struct siginfo
/* X/Open requires some more fields with fixed names. */
# define si_pid _sifields._kill.si_pid
# define si_uid _sifields._kill.si_uid
+# define si_timerid _sifields._timer.si_tid
+# define si_overrun _sifields._timer.si_overrun
# define si_status _sifields._sigchld.si_status
# define si_utime _sifields._sigchld.si_utime
# define si_stime _sifields._sigchld.si_stime
@@ -265,12 +268,12 @@ enum
/* Structure to transport application-defined values with signals. */
# define __SIGEV_MAX_SIZE 64
-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
-
-/* Forward declaration of the `pthread_attr_t' type. */
-struct __pthread_attr_s;
+# if __WORDSIZE == 64
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
-/* XXX This one might need to change!!! */
typedef struct sigevent
{
sigval_t sigev_value;
@@ -281,6 +284,10 @@ typedef struct sigevent
{
int _pad[__SIGEV_PAD_SIZE];
+ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
+ thread to receive the signal. */
+ __pid_t _tid;
+
struct
{
void (*_function) (sigval_t); /* Function to start. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d9e47980154846164712be8c40e97e56dc775e3
commit 9d9e47980154846164712be8c40e97e56dc775e3
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat Feb 23 01:18:18 2008 +0000
2008-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/Makefile: Remove.
* sysdeps/hppa/nptl/Makefile: Set tst-oddstacklimit-ENV.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 3654fc7..8a51f8e 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,8 +1,13 @@
+2008-02-22 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/Makefile: Remove.
+ * sysdeps/hppa/nptl/Makefile: Set tst-oddstacklimit-ENV.
+
2007-12-05 Jeff Bailey <jeffbailey@google.com>
- * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
- (__lll_unlock): Use define instead of inline function.
- (__lll_robust_unlock): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+ (__lll_unlock): Use define instead of inline function.
+ (__lll_robust_unlock): Likewise.
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/hppa/nptl/Makefile b/sysdeps/hppa/nptl/Makefile
index 0300693..78d8973 100644
--- a/sysdeps/hppa/nptl/Makefile
+++ b/sysdeps/hppa/nptl/Makefile
@@ -19,3 +19,9 @@
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
+
+# This sets the stack resource limit to 8193kb, which is not a multiple
+# of the page size, and therefore an odd sized stack limit. We override
+# this because the default is too small to run with.
+tst-oddstacklimit-ENV = ; ulimit -s 8193;
+
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
deleted file mode 100644
index 1c93ec5..0000000
--- a/sysdeps/unix/sysv/linux/hppa/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-# linux/hppa does not use -lmilli anymore
-gnulib := -lgcc
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec5d6360c4a781658af94cda9ad3c5d68d4ef699
commit ec5d6360c4a781658af94cda9ad3c5d68d4ef699
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 16 23:49:27 2008 +0000
Fix comment describing shmid_ds.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 35226c1..cb214e6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -46,7 +46,7 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
-/* Data structure describing a set of semaphores. */
+/* Data structure describing a shared memory segment. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c206ce7f956abebed6ece651551d1da041984943
commit c206ce7f956abebed6ece651551d1da041984943
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Dec 21 16:57:47 2007 +0000
* sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version.
* sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump): Update
to use ucontext.
(REGISTER_DUMP): Likewise.
* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT,
SIGCONTEXT_EXTRA_ARGS, GET_PC, GET_FRAME, GET_STACK): Likewise.
(sigaction, __sigaction): Define.
* sysdeps/unix/sysv/linux/arm/bits/armsigctx.h: Delete.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 140a789..f23b2b9 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,14 @@
+2007-12-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/profil-counter.h: Use the i386 version.
+ * sysdeps/unix/sysv/linux/arm/register-dump.h (register_dump): Update
+ to use ucontext.
+ (REGISTER_DUMP): Likewise.
+ * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h (SIGCONTEXT,
+ SIGCONTEXT_EXTRA_ARGS, GET_PC, GET_FRAME, GET_STACK): Likewise.
+ (sigaction, __sigaction): Define.
+ * sysdeps/unix/sysv/linux/arm/bits/armsigctx.h: Delete.
+
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
deleted file mode 100644
index 4530cdb..0000000
--- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Definition of `struct sigcontext' for Linux/ARM
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
- Fortunately 2.0 puts a magic number in the first word and this is not
- a legal value for `trap_no', so we can tell them apart. */
-
-/* Early 2.2 and 2.3 kernels do not have the `fault_address' member in
- the sigcontext structure. Unfortunately there is no reliable way
- to test for its presence and this word will contain garbage for too-old
- kernels. Versions 2.2.14 and 2.3.35 (plus later versions) are known to
- include this element. */
-
-#ifndef __ARMSIGCTX_H
-#define __ARMSIGCTX_H 1
-
-#include <asm/ptrace.h>
-
-union k_sigcontext
- {
- struct
- {
- unsigned long int trap_no;
- unsigned long int error_code;
- unsigned long int oldmask;
- unsigned long int arm_r0;
- unsigned long int arm_r1;
- unsigned long int arm_r2;
- unsigned long int arm_r3;
- unsigned long int arm_r4;
- unsigned long int arm_r5;
- unsigned long int arm_r6;
- unsigned long int arm_r7;
- unsigned long int arm_r8;
- unsigned long int arm_r9;
- unsigned long int arm_r10;
- unsigned long int arm_fp;
- unsigned long int arm_ip;
- unsigned long int arm_sp;
- unsigned long int arm_lr;
- unsigned long int arm_pc;
- unsigned long int arm_cpsr;
- unsigned long fault_address;
- } v21;
- struct
- {
- unsigned long int magic;
- struct pt_regs reg;
- unsigned long int trap_no;
- unsigned long int error_code;
- unsigned long int oldmask;
- } v20;
-};
-
-#define SIGCONTEXT_2_0_MAGIC 0x4B534154
-
-#endif /* bits/armsigctx.h */
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index 7639883..8a6a0bc 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -1,37 +1,2 @@
-/* Low-level statistical profiling support function. Linux/ARM version.
- Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <signal.h>
-#include <bits/armsigctx.h>
-
-void
-profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc)
-{
- void *pc;
- if (sc.v20.magic == SIGCONTEXT_2_0_MAGIC)
- pc = (void *) sc.v20.reg.ARM_pc;
- else
- pc = (void *) sc.v21.arm_pc;
- profil_count (pc);
-
- /* This is a hack to prevent the compiler from implementing the
- above function call as a sibcall. The sibcall would overwrite
- the signal context. */
- asm volatile ("");
-}
+/* We can use the ix86 version. */
+#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
index 2baccb2..73ec5fe 100644
--- a/sysdeps/unix/sysv/linux/arm/register-dump.h
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -20,7 +20,7 @@
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
-#include <bits/armsigctx.h>
+#include <sys/ucontext.h>
/* We will print the register dump in this format:
@@ -45,7 +45,7 @@ hexvalue (unsigned long int value, char *buf, size_t len)
}
static void
-register_dump (int fd, union k_sigcontext *ctx)
+register_dump (int fd, const struct ucontext *ctx)
{
char regs[21][8];
struct iovec iov[97];
@@ -61,53 +61,27 @@ register_dump (int fd, union k_sigcontext *ctx)
++nr
/* Generate strings of register contents. */
- if (ctx->v20.magic == SIGCONTEXT_2_0_MAGIC)
- {
- hexvalue (ctx->v20.reg.ARM_r0, regs[0], 8);
- hexvalue (ctx->v20.reg.ARM_r1, regs[1], 8);
- hexvalue (ctx->v20.reg.ARM_r2, regs[2], 8);
- hexvalue (ctx->v20.reg.ARM_r3, regs[3], 8);
- hexvalue (ctx->v20.reg.ARM_r4, regs[4], 8);
- hexvalue (ctx->v20.reg.ARM_r5, regs[5], 8);
- hexvalue (ctx->v20.reg.ARM_r6, regs[6], 8);
- hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8);
- hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8);
- hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8);
- hexvalue (ctx->v20.reg.ARM_r10, regs[10], 8);
- hexvalue (ctx->v20.reg.ARM_fp, regs[11], 8);
- hexvalue (ctx->v20.reg.ARM_ip, regs[12], 8);
- hexvalue (ctx->v20.reg.ARM_sp, regs[13], 8);
- hexvalue (ctx->v20.reg.ARM_lr, regs[14], 8);
- hexvalue (ctx->v20.reg.ARM_pc, regs[15], 8);
- hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8);
- hexvalue (ctx->v20.trap_no, regs[17], 8);
- hexvalue (ctx->v20.error_code, regs[18], 8);
- hexvalue (ctx->v20.oldmask, regs[19], 8);
- }
- else
- {
- hexvalue (ctx->v21.arm_r0, regs[0], 8);
- hexvalue (ctx->v21.arm_r1, regs[1], 8);
- hexvalue (ctx->v21.arm_r2, regs[2], 8);
- hexvalue (ctx->v21.arm_r3, regs[3], 8);
- hexvalue (ctx->v21.arm_r4, regs[4], 8);
- hexvalue (ctx->v21.arm_r5, regs[5], 8);
- hexvalue (ctx->v21.arm_r6, regs[6], 8);
- hexvalue (ctx->v21.arm_r7, regs[7], 8);
- hexvalue (ctx->v21.arm_r8, regs[8], 8);
- hexvalue (ctx->v21.arm_r9, regs[9], 8);
- hexvalue (ctx->v21.arm_r10, regs[10], 8);
- hexvalue (ctx->v21.arm_fp, regs[11], 8);
- hexvalue (ctx->v21.arm_ip, regs[12], 8);
- hexvalue (ctx->v21.arm_sp, regs[13], 8);
- hexvalue (ctx->v21.arm_lr, regs[14], 8);
- hexvalue (ctx->v21.arm_pc, regs[15], 8);
- hexvalue (ctx->v21.arm_cpsr, regs[16], 8);
- hexvalue (ctx->v21.trap_no, regs[17], 8);
- hexvalue (ctx->v21.error_code, regs[18], 8);
- hexvalue (ctx->v21.oldmask, regs[19], 8);
- hexvalue (ctx->v21.fault_address, regs[20], 8);
- }
+ hexvalue (ctx->uc_mcontext.arm_r0, regs[0], 8);
+ hexvalue (ctx->uc_mcontext.arm_r1, regs[1], 8);
+ hexvalue (ctx->uc_mcontext.arm_r2, regs[2], 8);
+ hexvalue (ctx->uc_mcontext.arm_r3, regs[3], 8);
+ hexvalue (ctx->uc_mcontext.arm_r4, regs[4], 8);
+ hexvalue (ctx->uc_mcontext.arm_r5, regs[5], 8);
+ hexvalue (ctx->uc_mcontext.arm_r6, regs[6], 8);
+ hexvalue (ctx->uc_mcontext.arm_r7, regs[7], 8);
+ hexvalue (ctx->uc_mcontext.arm_r8, regs[8], 8);
+ hexvalue (ctx->uc_mcontext.arm_r9, regs[9], 8);
+ hexvalue (ctx->uc_mcontext.arm_r10, regs[10], 8);
+ hexvalue (ctx->uc_mcontext.arm_fp, regs[11], 8);
+ hexvalue (ctx->uc_mcontext.arm_ip, regs[12], 8);
+ hexvalue (ctx->uc_mcontext.arm_sp, regs[13], 8);
+ hexvalue (ctx->uc_mcontext.arm_lr, regs[14], 8);
+ hexvalue (ctx->uc_mcontext.arm_pc, regs[15], 8);
+ hexvalue (ctx->uc_mcontext.arm_cpsr, regs[16], 8);
+ hexvalue (ctx->uc_mcontext.trap_no, regs[17], 8);
+ hexvalue (ctx->uc_mcontext.error_code, regs[18], 8);
+ hexvalue (ctx->uc_mcontext.oldmask, regs[19], 8);
+ hexvalue (ctx->uc_mcontext.fault_address, regs[20], 8);
/* Generate the output. */
ADD_STRING ("Register dump:\n\n R0: ");
@@ -150,11 +124,8 @@ register_dump (int fd, union k_sigcontext *ctx)
ADD_MEM (regs[18], 8);
ADD_STRING (" OldMask: ");
ADD_MEM (regs[19], 8);
- if (ctx->v20.magic != SIGCONTEXT_2_0_MAGIC)
- {
- ADD_STRING ("\n Addr: ");
- ADD_MEM (regs[20], 8);
- }
+ ADD_STRING ("\n Addr: ");
+ ADD_MEM (regs[20], 8);
ADD_STRING ("\n");
@@ -163,4 +134,4 @@ register_dump (int fd, union k_sigcontext *ctx)
}
-#define REGISTER_DUMP register_dump (fd, &ctx)
+#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index 30c2e3a..72136fd 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -17,35 +17,34 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <bits/armsigctx.h>
+#include <sys/ucontext.h>
#include "kernel-features.h"
-#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
-#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
+#define SIGCONTEXT siginfo_t *_si, struct ucontext *
+#define SIGCONTEXT_EXTRA_ARGS _si,
/* The sigcontext structure changed between 2.0 and 2.1 kernels. On any
modern system we should be able to assume that the "new" format will be
in use. */
-#if __LINUX_KERNEL_VERSION > 131328
-#define GET_PC(ctx) ((void *) ctx.v21.arm_pc)
-#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx.v21.arm_fp)
-#define GET_STACK(ctx) ((void *) ctx.v21.arm_sp)
-
-#else
-
-#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
- ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
-#define GET_FRAME(ctx) \
- ADVANCE_STACK_FRAME((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
- ctx.v20.reg.ARM_fp : ctx.v21.arm_fp))
-#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
- ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
-
-#endif
+#define GET_PC(ctx) ((void *) (ctx)->uc_mcontext.arm_pc)
+#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx->uc_mcontext.arm_fp)
+#define GET_STACK(ctx) ((void *) (ctx)->uc_mcontext.arm_sp)
#define ADVANCE_STACK_FRAME(frm) \
((struct layout *)frm - 1)
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+/* There is no reliable way to get the sigcontext unless we use a
+ three-argument signal handler. */
+#define __sigaction(sig, act, oact) ({ \
+ (act)->sa_flags |= SA_SIGINFO; \
+ (__sigaction) (sig, act, oact); \
+})
+
+#define sigaction(sig, act, oact) ({ \
+ (act)->sa_flags |= SA_SIGINFO; \
+ (sigaction) (sig, act, oact); \
+})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cd7e988d349280d58188725337f0a9bf1b00157
commit 9cd7e988d349280d58188725337f0a9bf1b00157
Author: Jeff Bailey <jbailey@raspberryginger.com>
Date: Sun Dec 9 02:20:34 2007 +0000
2007-12-05 Jeff Bailey <jeffbailey@google.com>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
(__lll_unlock): Use define instead of inline function.
(__lll_robust_unlock): Likewise.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index cb1b815..3654fc7 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2007-12-05 Jeff Bailey <jeffbailey@google.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+ (__lll_unlock): Use define instead of inline function.
+ (__lll_robust_unlock): Likewise.
+
2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index ae5fc1d..522380e 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -289,22 +289,20 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define lll_robust_timedlock(futex, abstime, id, private) \
__lll_robust_timedlock (&(futex), abstime, id, private)
-static inline void __attribute__ ((always_inline))
-__lll_unlock (lll_lock_t *futex, int private)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1, private);
-}
+#define __lll_unlock(futex, private) \
+ (void) \
+ ({ int val = atomic_exchange_rel (futex, 0); \
+ if (__builtin_expect (val > 1, 0)) \
+ lll_futex_wake (futex, 1, private); \
+ })
#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
-static inline void __attribute__ ((always_inline))
-__lll_robust_unlock (int *futex, int private)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & FUTEX_WAITERS, 0))
- lll_futex_wake (futex, 1, private);
-}
+#define __lll_robust_unlock(futex,private) \
+ (void) \
+ ({ int val = atomic_exchange_rel (futex, 0); \
+ if (__builtin_expect (val & FUTEX_WAITERS, 0)) \
+ lll_futex_wake (futex, 1, private); \
+ })
#define lll_robust_unlock(futex, private) \
__lll_robust_unlock(&(futex), private)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e0bd9eb99b3de736ebc420fd88b27f0916271d2
commit 7e0bd9eb99b3de736ebc420fd88b27f0916271d2
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 22 13:11:49 2007 +0000
Define F_DUPFD_CLOEXEC.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index c10f8d0..e9b19bd 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/am33/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Comment fix.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index bc5b67e..140a789 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-09-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value
diff --git a/ChangeLog.cris b/ChangeLog.cris
index 746c89c..810b53b 100644
--- a/ChangeLog.cris
+++ b/ChangeLog.cris
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/cris/bits/fcntl.h: Comment fix.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index ff92bf2..cb1b815 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-10-18 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index fb591ad..33323c6 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Comment fix.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 3ecda0c..ffbc344 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2007-10-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_DUPFD_CLOEXEC): Define.
+
2007-09-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value
diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
index f2c88fa..9a95318 100644
--- a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
@@ -92,6 +92,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* For F_[GET|SET]FD. */
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index bf0321f..10d11f2 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -98,6 +98,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* For F_[GET|SET]FD. */
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 270a8de..e14ca25 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -94,6 +94,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* For F_[GET|SET]FD. */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 80cbbf4..ffc55a5 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -95,6 +95,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* for F_[GET|SET]FL */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 733a088..169a24b 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -93,6 +93,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* For F_[GET|SET]FD. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index f751886..e8107d7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -100,6 +100,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* For F_[GET|SET]FD. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a732ab4917e138732abe67e7a3992238ec82ec7e
commit a732ab4917e138732abe67e7a3992238ec82ec7e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Oct 19 01:47:47 2007 +0000
2007-10-18 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
(__lll_lock_wait): Add private argument. Pass private
to lll_futex_wait. Use atomic_compare_and_exchange_val_acq.
(__lll_lock_wait_private): New function.
(__lll_timedlock_wait): Add private argument. Pass private
to lll_futex_timed_wait.
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
Include kernel-features.h and tls.h.
(FUTEX_WAITERS): Define.
(FUTEX_OWNER_DIED): Define.
(FUTEX_TID_MASK): Define.
(__lll_private_flag): Define.
(lll_futex_timed_wait): Use __lll_private_flag.
(lll_futex_wake): Use __lll_private_flag.
(lll_futex_requeue): Use __lll_private_flag.
(lll_robust_mutex_dead): Rename to...
(lll_robust_dead): ... this. Add private argument. Pass private
to lll_futex_wake.
(lll_futex_wake_unlock): Use __lll_private_flag.
(__lll_mutex_trylock): Remove.
(lll_mutex_tryock): Remove.
(__lll_robust_mutex_trylock): Rename to...
(__lll_robust_trylock): ... this.
(lll_robust_mutex_trylock): Rename to...
(lll_robust_trylock): ... this. Call __lll_robust_trylock.
(__lll_mutex_cond_trylock): Rename to...
(__lll_cond_trylock): ... this.
(lll_mutex_cond_trylock): Rename to...
(lll_cond_trylock): ... this. Call __lll_cond_trylock.
(__lll_mutex_lock): Add private argument.
(__lll_robust_mutex_lock): Remove.
(lll_mutex_lock): Define.
(__lll_robust_lock): Define.
(lll_robust_mutex_lock): Remove.
(__lll_mutex_cond_lock): Remove.
(lll_robust_lock) Define.
(lll_robust_cond_lock): Define.
(lll_robust_mutex_cond_lock): Remove.
(__lll_cond_lock): Define.
(lll_cond_lock): Define.
(__lll_mutex_timedlock): Remove.
(__lll_timedlock): Define.
(lll_timedlock): Define.
(lll_robust_mutex_timedlock): Remove.
(lll_robust_timedlock): Define.
(__lll_mutex_unlock): Remove.
(__lll_unlock): Define.
(__lll_robust_mutex_unlock): Remove.
(__lll_robust_unlock): Define.
(lll_robust_mutex_unlock): Remove.
(lll_robust_unlock): Define.
(__lll_mutex_unlock_force): Remove.
(lll_mutex_unlock_force): Remove.
(lll_islocked): Remove.
(lll_mutex_islocked): Rename to...
(lll_islocked): ... this.
(lll_trylock): Remove.
(lll_unlock): Remove.
(lll_wait_tid): Format whitespace.
(lll_cond_wait): Remove.
(lll_cond_timedwait): Remove.
(lll_cond_wake): Remove.
(lll_cond_broadcast): Remove.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e5b7854..ff92bf2 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,69 @@
+2007-10-18 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
+ (__lll_lock_wait): Add private argument. Pass private
+ to lll_futex_wait. Use atomic_compare_and_exchange_val_acq.
+ (__lll_lock_wait_private): New function.
+ (__lll_timedlock_wait): Add private argument. Pass private
+ to lll_futex_timed_wait.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
+ Include kernel-features.h and tls.h.
+ (FUTEX_WAITERS): Define.
+ (FUTEX_OWNER_DIED): Define.
+ (FUTEX_TID_MASK): Define.
+ (__lll_private_flag): Define.
+ (lll_futex_timed_wait): Use __lll_private_flag.
+ (lll_futex_wake): Use __lll_private_flag.
+ (lll_futex_requeue): Use __lll_private_flag.
+ (lll_robust_mutex_dead): Rename to...
+ (lll_robust_dead): ... this. Add private argument. Pass private
+ to lll_futex_wake.
+ (lll_futex_wake_unlock): Use __lll_private_flag.
+ (__lll_mutex_trylock): Remove.
+ (lll_mutex_tryock): Remove.
+ (__lll_robust_mutex_trylock): Rename to...
+ (__lll_robust_trylock): ... this.
+ (lll_robust_mutex_trylock): Rename to...
+ (lll_robust_trylock): ... this. Call __lll_robust_trylock.
+ (__lll_mutex_cond_trylock): Rename to...
+ (__lll_cond_trylock): ... this.
+ (lll_mutex_cond_trylock): Rename to...
+ (lll_cond_trylock): ... this. Call __lll_cond_trylock.
+ (__lll_mutex_lock): Add private argument.
+ (__lll_robust_mutex_lock): Remove.
+ (lll_mutex_lock): Define.
+ (__lll_robust_lock): Define.
+ (lll_robust_mutex_lock): Remove.
+ (__lll_mutex_cond_lock): Remove.
+ (lll_robust_lock) Define.
+ (lll_robust_cond_lock): Define.
+ (lll_robust_mutex_cond_lock): Remove.
+ (__lll_cond_lock): Define.
+ (lll_cond_lock): Define.
+ (__lll_mutex_timedlock): Remove.
+ (__lll_timedlock): Define.
+ (lll_timedlock): Define.
+ (lll_robust_mutex_timedlock): Remove.
+ (lll_robust_timedlock): Define.
+ (__lll_mutex_unlock): Remove.
+ (__lll_unlock): Define.
+ (__lll_robust_mutex_unlock): Remove.
+ (__lll_robust_unlock): Define.
+ (lll_robust_mutex_unlock): Remove.
+ (lll_robust_unlock): Define.
+ (__lll_mutex_unlock_force): Remove.
+ (lll_mutex_unlock_force): Remove.
+ (lll_islocked): Remove.
+ (lll_mutex_islocked): Rename to...
+ (lll_islocked): ... this.
+ (lll_trylock): Remove.
+ (lll_unlock): Remove.
+ (lll_wait_tid): Format whitespace.
+ (lll_cond_wait): Remove.
+ (lll_cond_timedwait): Remove.
+ (lll_cond_wake): Remove.
+ (lll_cond_broadcast): Remove.
+
2007-10-17 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
index 236d29c..9c49640 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
@@ -23,22 +23,32 @@
#include <lowlevellock.h>
#include <sys/time.h>
-
void
-__lll_lock_wait (lll_lock_t *futex)
+__lll_lock_wait (lll_lock_t *futex, int private)
{
do
{
int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
if (oldval != 0)
- lll_futex_wait (futex, 2, LLL_SHARED);
+ lll_futex_wait (futex, 2, private);
}
- while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
+ while (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0);
}
+void
+__lll_lock_wait_private (lll_lock_t *futex)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2, LLL_PRIVATE);
+ }
+ while (atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0);
+}
int
-__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
+__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime, int private)
{
/* Reject invalid timeouts. */
if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
@@ -68,7 +78,7 @@ __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
/* Wait. */
int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
if (oldval != 0)
- lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED);
+ lll_futex_timed_wait (futex, 2, &rt, private);
}
while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
return 0;
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index f8a9555..ae5fc1d 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -24,8 +24,10 @@
#include <bits/pthreadtypes.h>
#include <sysdep.h>
#include <atomic.h>
+#include <kernel-features.h> /* Need __ASSUME_PRIVATE_FUTEX. */
+#include <tls.h> /* Need THREAD_*, and header.*. */
-/* The hppa only has one atomic read and modify memory operation,
+/* HPPA only has one atomic read and modify memory operation,
load and clear, so hppa uses a kernel helper routine to implement
compare_and_exchange. See atomic.h for the userspace calling
sequence. */
@@ -41,6 +43,11 @@
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_PRIVATE_FLAG 128
+/* Bits used in robust mutex implementation. */
+#define FUTEX_WAITERS 0x80000000
+#define FUTEX_OWNER_DIED 0x40000000
+#define FUTEX_TID_MASK 0x3fffffff
+
/* Values for 'private' parameter of locking macros. Yes, the
definition seems to be backwards. But it is not. The bit will be
reversed before passing to the system call. */
@@ -50,30 +57,54 @@
/* Initialize locks to zero. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+/* In libc.so or ld.so all futexes are private. */
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ ((fl) | FUTEX_PRIVATE_FLAG)
+# else
+# define __lll_private_flag(fl, private) \
+ ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
+# endif
+#else
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
+# else
+# define __lll_private_flag(fl, private) \
+ (__builtin_constant_p (private) \
+ ? ((private) == 0 \
+ ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
+ : (fl)) \
+ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
+ & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
+# endif
+#endif
/* Type for lock object. */
typedef int lll_lock_t;
-
#define lll_futex_wait(futexp, val, private) \
lll_futex_timed_wait (futexp, val, 0, private)
#define lll_futex_timed_wait(futexp, val, timespec, private) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
- __ret; \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAIT, private), \
+ (val), (timespec)); \
+ __ret; \
})
#define lll_futex_wake(futexp, nr, private) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
- __ret; \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAKE, private), \
+ (nr), 0); \
+ __ret; \
})
#define lll_private_futex_wait(futex, val) \
@@ -123,194 +154,186 @@ typedef int lll_lock_t;
})
#endif
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+ (nr_wake), (nr_move), (mutex), (val)); \
+ __ret; \
+ })
-
-#define lll_robust_mutex_dead(futexv) \
+#define lll_robust_dead(futexv, private) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1, 0); \
+ lll_futex_wake (__futexp, 1, private); \
} \
while (0)
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
- (nr_move), (mutex), (val)); \
- __ret; \
- })
-
-/* Returns non-zero if error happened, zero if success. */
#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_WAKE_OP, (nr_wake), \
- (nr_wake2), (futexp2), \
- FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
- __ret; \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_WAKE_OP, private), \
+ (nr_wake), (nr_wake2), (futexp2), \
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
+ __ret; \
})
-static inline int __attribute__((always_inline))
-__lll_mutex_trylock(lll_lock_t *futex)
-{
- return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
-}
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
-
-static inline int __attribute__((always_inline))
-__lll_robust_mutex_trylock(int *futex, int id)
+static inline int
+__attribute__ ((always_inline))
+__lll_robust_trylock (int *futex, int id)
{
return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
}
-#define lll_robust_mutex_trylock(lock, id) \
- __lll_robust_mutex_trylock (&(lock), id)
-
+#define lll_robust_trylock(futex, id) \
+ __lll_robust_trylock (&(futex), id)
-static inline int __attribute__((always_inline))
-__lll_mutex_cond_trylock(lll_lock_t *futex)
+static inline int
+__attribute__ ((always_inline))
+__lll_cond_trylock (int *futex)
{
return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
}
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+#define lll_cond_trylock(futex) __lll_cond_trylock (&(futex))
+static inline int
+__attribute__ ((always_inline))
+__lll_trylock (int *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
+}
+#define lll_trylock(futex) __lll_trylock (&(futex))
-extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden;
+extern void __lll_lock_wait (lll_lock_t *futex, int private) attribute_hidden;
+extern void __lll_lock_wait_private (lll_lock_t *futex) attribute_hidden;
static inline void __attribute__((always_inline))
-__lll_mutex_lock(lll_lock_t *futex)
+__lll_mutex_lock(lll_lock_t *futex, int private)
{
- if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- __lll_lock_wait (futex);
+ int val = atomic_compare_and_exchange_val_acq (futex, 1, 0);
+
+ if (__builtin_expect (val != 0, 0))
+ {
+ if (__builtin_constant_p (private) && private == LLL_PRIVATE)
+ __lll_lock_wait_private (futex);
+ else
+ __lll_lock_wait (futex, private);
+ }
}
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+#define lll_mutex_lock(futex, private) __lll_mutex_lock (&(futex), private)
+#define lll_lock(lock, private) lll_mutex_lock (lock, private)
-extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
-static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_lock (int *futex, int id)
+static inline int
+__attribute__ ((always_inline))
+__lll_robust_lock (int *futex, int id, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_lock_wait (futex);
+ result = __lll_robust_lock_wait (futex, private);
return result;
}
-#define lll_robust_mutex_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), id)
+#define lll_robust_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), id, private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_cond_lock (lll_lock_t *futex)
-{
- if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
- __lll_lock_wait (futex);
-}
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_robust_cond_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
+static inline void
+__attribute__ ((always_inline))
+__lll_cond_lock (int *futex, int private)
+{
+ int val = atomic_compare_and_exchange_val_acq (futex, 2, 0);
-#define lll_robust_mutex_cond_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
-
+ if (__builtin_expect (val != 0, 0))
+ __lll_lock_wait (futex, private);
+}
+#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
-extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *)
- attribute_hidden;
-extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
+extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *,
+ int private) attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
-static inline int __attribute__ ((always_inline))
-__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime)
+static inline int
+__attribute__ ((always_inline))
+__lll_timedlock (int *futex, const struct timespec *abstime, int private)
{
+ int val = atomic_compare_and_exchange_val_acq (futex, 1, 0);
int result = 0;
- if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- result = __lll_timedlock_wait (futex, abstime);
+
+ if (__builtin_expect (val != 0, 0))
+ result = __lll_timedlock_wait (futex, abstime, private);
return result;
}
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
+#define lll_timedlock(futex, abstime, private) \
+ __lll_timedlock (&(futex), abstime, private)
static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
- int id)
+__lll_robust_timedlock (int *futex, const struct timespec *abstime,
+ int id, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_timedlock_wait (futex, abstime);
+ result = __lll_robust_timedlock_wait (futex, abstime, private);
return result;
}
-#define lll_robust_mutex_timedlock(futex, abstime, id) \
- __lll_robust_mutex_timedlock (&(futex), abstime, id)
-
+#define lll_robust_timedlock(futex, abstime, id, private) \
+ __lll_robust_timedlock (&(futex), abstime, id, private)
static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock (lll_lock_t *futex)
+__lll_unlock (lll_lock_t *futex, int private)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1, 0);
+ lll_futex_wake (futex, 1, private);
}
-#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
-
+#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
static inline void __attribute__ ((always_inline))
-__lll_robust_mutex_unlock (int *futex, int mask)
+__lll_robust_unlock (int *futex, int private)
{
int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1, 0);
-}
-#define lll_robust_mutex_unlock(futex) \
- __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
-
-
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock_force (lll_lock_t *futex)
-{
- (void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1, 0);
+ if (__builtin_expect (val & FUTEX_WAITERS, 0))
+ lll_futex_wake (futex, 1, private);
}
-#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+#define lll_robust_unlock(futex, private) \
+ __lll_robust_unlock(&(futex), private)
-#define lll_mutex_islocked(futex) \
+#define lll_islocked(futex) \
(futex != 0)
/* Our internal lock implementation is identical to the binary-compatible
- mutex implementation. */
-
+ mutex implementation. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_CONST (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-
#define THREAD_INIT_LOCK(PD, LOCK) \
(PD)->LOCK = LLL_LOCK_INITIALIZER
extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
-/* The states of a lock are:
- 0 - untaken
- 1 - taken by one user
- >1 - taken by more users */
-
-#define lll_trylock(lock) lll_mutex_trylock (lock)
-#define lll_lock(lock) lll_mutex_lock (lock)
-#define lll_unlock(lock) lll_mutex_unlock (lock)
-#define lll_islocked(lock) lll_mutex_islocked (lock)
-
/* The kernel notifies a process which uses CLONE_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid, 0); \
- } while (0)
+ do \
+ { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, 0); \
+ } \
+ while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
attribute_hidden;
@@ -323,26 +346,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *)
__res; \
})
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
#endif /* lowlevellock.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3fad32baf601770a164e6367d52a3da1a566f4d
commit d3fad32baf601770a164e6367d52a3da1a566f4d
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Oct 18 02:19:00 2007 +0000
2007-10-17 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value
type and __THROW marker of splice, vmsplice, and tee.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 9501c49..e5b7854 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2007-10-17 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Correct return value
+ type and __THROW marker of splice, vmsplice, and tee.
+
2007-09-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/tls.h: Fix comment.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 1bf6bcb..80cbbf4 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -207,17 +207,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
unsigned int __flags);
/* Splice address range into a pipe. */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, __off64_t *offin, int __fdout,
- __off64_t *__offout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t splice (int __fdin, __off64_t *offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90e90b183d262e1ea8b3154699c730db84cc2187
commit 90e90b183d262e1ea8b3154699c730db84cc2187
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 17 18:55:32 2007 +0000
Define F_DUPFD_CLOEXEC.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7c93183..710bace 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -93,6 +93,8 @@
# define F_SETLEASE 1024 /* Set a lease. */
# define F_GETLEASE 1025 /* Enquire what lease is active. */
# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
#endif
/* for F_[GET|SET]FD */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=017cc6330d0dcb4f315b93a8d612f4f67204b2b4
commit 017cc6330d0dcb4f315b93a8d612f4f67204b2b4
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Sep 25 12:04:54 2007 +0000
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value
type and __THROW marker of splice, vmsplice, and tee.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value
type and __THROW marker of splice, vmsplice, and tee.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 8554fad..bc5b67e 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2007-09-25 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Correct return value
+ type and __THROW marker of splice, vmsplice, and tee.
+
2007-09-17 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 0e8fda4..3ecda0c 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-09-25 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Correct return value
+ type and __THROW marker of splice, vmsplice, and tee.
+
2007-09-12 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 6fcc5c0..bf0321f 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -221,17 +221,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
/* Splice address range into a pipe. */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 27af9ed..f751886 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -234,17 +234,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
/* Splice address range into a pipe. */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd1530839c0847f8060dd15f57c6419fba9f45a3
commit cd1530839c0847f8060dd15f57c6419fba9f45a3
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon Sep 24 18:28:33 2007 +0000
2007-09-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/tls.h: Fix comment.
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Fix comment format.
[__USE_GNU] (O_CLOEXEC): Define.
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Issue error
if the library is unsupported.
[ASSEMBLER && IS_IN_librt]: Define CENABLE, CDISABLE, and
__local_multiple_threads.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 7bb3387..9501c49 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,13 @@
+2007-09-24 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/nptl/tls.h: Fix comment.
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Fix comment format.
+ [__USE_GNU] (O_CLOEXEC): Define.
+ * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Issue error
+ if the library is unsupported.
+ [ASSEMBLER && IS_IN_librt]: Define CENABLE, CDISABLE, and
+ __local_multiple_threads.
+
2007-08-03 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h:
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index d2d725e..2810d71 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -170,6 +170,6 @@ static inline void __set_cr27(struct pthread *cr27)
#define THREAD_GSCOPE_WAIT() \
GL(dl_wait_lookup_done) ()
-#endif /* __ASSEMBLER__ */
+#endif /* !__ASSEMBLER__ */
#endif /* tls.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 328df54..1bf6bcb 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -46,10 +46,11 @@
#ifdef __USE_GNU
-# define O_DIRECT 00040000 /* Direct disk access. */
-# define O_DIRECTORY 00010000 /* Must be a directory. */
-# define O_NOFOLLOW 00000200 /* Do not follow links. */
-# define O_NOATIME 04000000 /* Do not set atime. */
+# define O_DIRECT 000040000 /* Direct disk access. */
+# define O_DIRECTORY 000010000 /* Must be a directory. */
+# define O_NOFOLLOW 000000200 /* Do not follow links. */
+# define O_NOATIME 004000000 /* Do not set atime. */
+# define O_CLOEXEC 010000000 /* Set close_on_exec. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
index 375f732..6cffa76 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
@@ -173,7 +173,7 @@ L(pre_end): ASM_LINE_SEP \
# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
# endif
-# else
+# elif defined IS_IN_librt
# ifdef PIC
# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
@@ -185,14 +185,18 @@ L(pre_end): ASM_LINE_SEP \
# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
# endif
+# else
+# error Unsupported library
# endif
# ifdef IS_IN_libpthread
# define __local_multiple_threads __pthread_multiple_threads
# elif !defined NOT_IN_libc
# define __local_multiple_threads __libc_multiple_threads
-# else
+# elif IS_IN_librt
# define __local_multiple_threads __librt_multiple_threads
+# else
+# error Unsupported library
# endif
# ifndef __ASSEMBLER__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c13fa7cec2dede0026a4f37ac77443fdaf4a75f
commit 7c13fa7cec2dede0026a4f37ac77443fdaf4a75f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 18 16:20:44 2007 +0000
Correct return value type __THROW marker of splice, vmsplice, and tee.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index b4f49cf..7c93183 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -213,17 +213,17 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
/* Splice address range into a pipe. */
-extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
/* In-kernel implementation of tee for pipe buffers. */
-extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
- __THROW;
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b03bcf4bbf45416ec48e3783388e4850bb668f5
commit 2b03bcf4bbf45416ec48e3783388e4850bb668f5
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Sep 17 16:31:32 2007 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine
__ASSUME_PSELECT and __ASSUME_PPOLL.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index fbd399e..8554fad 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2007-09-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h: Undefine
+ __ASSUME_PSELECT and __ASSUME_PPOLL.
+
2007-09-12 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 0a6ab21..ea439d5 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -52,3 +52,7 @@
#endif
#include_next <kernel-features.h>
+
+/* These syscalls are not implemented yet for ARM. */
+#undef __ASSUME_PSELECT
+#undef __ASSUME_PPOLL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c393be3d2f0a41af10f6405104101e0e292fb5ba
commit c393be3d2f0a41af10f6405104101e0e292fb5ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 15 02:31:47 2007 +0000
(__MATH_INLINE): Define to __extern_inline whenever that macro is defined.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 250171e..5378a18 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -23,7 +23,7 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif
-#ifdef __cplusplus
+#ifndef __extern_inline
# define __MATH_INLINE __inline
#else
# define __MATH_INLINE __extern_inline
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c2766740df531409c2921f1c0213dcab2494e69
commit 8c2766740df531409c2921f1c0213dcab2494e69
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Sep 12 12:57:41 2007 +0000
* sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass
LLL_PRIVATE argument to lll_futex_wake.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_CLOEXEC): Define.
* sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_UNIX): Update
comment.
(PF_IUCV, PF_RXRPC): Define.
(PF_MAX): Update.
(AF_IUCV, AF_RXRPC): Define.
(MSG_CMSG_CLOEXEC): Define.
(_EXTERN_INLINE): Define to __extern_inline.
* sysdeps/unix/sysv/linux/mips/bits/stat.h (UTIME_NOW,
UTIME_OMIT): Define.
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include <tls.h>.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Renamed all
lll_mutex_* resp. lll_robust_mutex_* macros to lll_*
resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to
LLL_LOCK_*. Include <kernel-features.h>.
(LLL_LOCK_INITIALIZER): Remove duplicate definition.
(LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
* sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
(clear_once_control, __pthread_once): Pass LLL_PRIVATE argument to
lll_futex_wait.
(lll_futex_wait, lll_futex_timed_wait, lll_futex_wake,
lll_robust_dead, lll_futex_requeue, lll_futex_wake_unlock): Take
private arguments.
(__lll_robust_trylock): Convert to macro.
(__lll_robust_lock_wait): Add private argument.
(__lll_lock_wait_private, __lll_lock_wait): Declare.
(__lll_lock): Convert to macro. Take private argument.
(__lll_cond_lock): Likewise.
(lll_lock, lll_cond_lock): Take private arguments.
(__lll_robust_lock): Take private argument. Convert to macro.
(lll_robust_lock, __lll_cond_lock, lll_cond_lock,
lll_robust_cond_lock): Take private arguments.
(__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private
arguments.
(__lll_timedlock, __lll_robust_timedlock): Take private arguments.
(lll_timedlock, lll_robust_timedlock): Take private arguments.
(__lll_unlock, __lll_robust_unlock): Convert to macros. Take
private arguments.
(lll_unlock, lll_robust_unlock): Take private arguments.
(__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t,
lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove.
(lll_wait_tid): Pass LLL_SHARED to lll_futex_wait.
(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
lll_cond_wake, lll_cond_broadcast): Remove.
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_EXTERN_INLINE): Define
to __extern_inline.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 3216e73..0e8fda4 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,57 @@
+2007-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Pass
+ LLL_PRIVATE argument to lll_futex_wake.
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_CLOEXEC): Define.
+ * sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_UNIX): Update
+ comment.
+ (PF_IUCV, PF_RXRPC): Define.
+ (PF_MAX): Update.
+ (AF_IUCV, AF_RXRPC): Define.
+ (MSG_CMSG_CLOEXEC): Define.
+ (_EXTERN_INLINE): Define to __extern_inline.
+ * sysdeps/unix/sysv/linux/mips/bits/stat.h (UTIME_NOW,
+ UTIME_OMIT): Define.
+ * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Include <tls.h>.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Renamed all
+ lll_mutex_* resp. lll_robust_mutex_* macros to lll_*
+ resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to
+ LLL_LOCK_*. Include <kernel-features.h>.
+ (LLL_LOCK_INITIALIZER): Remove duplicate definition.
+ (LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
+ * sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
+ (clear_once_control, __pthread_once): Pass LLL_PRIVATE argument to
+ lll_futex_wait.
+ (lll_futex_wait, lll_futex_timed_wait, lll_futex_wake,
+ lll_robust_dead, lll_futex_requeue, lll_futex_wake_unlock): Take
+ private arguments.
+ (__lll_robust_trylock): Convert to macro.
+ (__lll_robust_lock_wait): Add private argument.
+ (__lll_lock_wait_private, __lll_lock_wait): Declare.
+ (__lll_lock): Convert to macro. Take private argument.
+ (__lll_cond_lock): Likewise.
+ (lll_lock, lll_cond_lock): Take private arguments.
+ (__lll_robust_lock): Take private argument. Convert to macro.
+ (lll_robust_lock, __lll_cond_lock, lll_cond_lock,
+ lll_robust_cond_lock): Take private arguments.
+ (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private
+ arguments.
+ (__lll_timedlock, __lll_robust_timedlock): Take private arguments.
+ (lll_timedlock, lll_robust_timedlock): Take private arguments.
+ (__lll_unlock, __lll_robust_unlock): Convert to macros. Take
+ private arguments.
+ (lll_unlock, lll_robust_unlock): Take private arguments.
+ (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t,
+ lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove.
+ (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait.
+ (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
+ __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
+ lll_cond_wake, lll_cond_broadcast): Remove.
+ * sysdeps/unix/sysv/linux/mips/sys/tas.h (_EXTERN_INLINE): Define
+ to __extern_inline.
+
2007-08-06 Maciej W. Rozycki <macro@linux-mips.org>
* sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID):
diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h
index dbe806a..20f9f96 100644
--- a/sysdeps/mips/nptl/tls.h
+++ b/sysdeps/mips/nptl/tls.h
@@ -166,7 +166,7 @@ typedef struct
= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
THREAD_GSCOPE_FLAG_UNUSED); \
if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
} \
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 3404663..27af9ed 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -51,6 +51,7 @@
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
# define O_NOATIME 0x40000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* Set close_on_exec. */
#endif
/* For now Linux has no synchronisity options for data and read operations.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 0e4a2be..8748c0a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -63,7 +63,7 @@ enum __socket_type
/* Protocol families. */
#define PF_UNSPEC 0 /* Unspecified. */
#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
+#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */
#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
#define PF_INET 2 /* IP protocol family. */
#define PF_AX25 3 /* Amateur Radio AX.25. */
@@ -90,7 +90,9 @@ enum __socket_type
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
-#define PF_MAX 32 /* For now.. */
+#define PF_IUCV 32 /* IUCV sockets. */
+#define PF_RXRPC 33 /* RxRPC sockets. */
+#define PF_MAX 34 /* For now.. */
/* Address families. */
#define AF_UNSPEC PF_UNSPEC
@@ -122,6 +124,8 @@ enum __socket_type
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
#define AF_BLUETOOTH PF_BLUETOOTH
+#define AF_IUCV PF_IUCV
+#define AF_RXRPC PF_RXRPC
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
@@ -206,8 +210,13 @@ enum
#define MSG_ERRQUEUE MSG_ERRQUEUE
MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
#define MSG_NOSIGNAL MSG_NOSIGNAL
- MSG_MORE = 0x8000 /* Sender will send more. */
+ MSG_MORE = 0x8000, /* Sender will send more. */
#define MSG_MORE MSG_MORE
+
+ MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
+ descriptor received through
+ SCM_RIGHTS. */
+#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
};
@@ -259,7 +268,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
struct cmsghdr *__cmsg) __THROW;
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE struct cmsghdr *
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 2081978..4e0e30f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004,
+ 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -253,3 +253,9 @@ struct stat64
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
+
+#if defined __USE_ATFILE || defined __USE_GNU
+/* XXX This will change to the macro for the next 2008 POSIX revision. */
+# define UTIME_NOW ((1l << 30) - 1l)
+# define UTIME_OMIT ((1l << 30) - 2l)
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 3c19bff..089fa9d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -22,6 +22,8 @@
/* There is some commonality. */
#include <sysdeps/unix/mips/mips32/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index b15d280..b2bbbb0 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -23,6 +23,8 @@
/* There is some commonality. */
#include <sysdeps/unix/mips/mips64/n32/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index edf8786..8862607 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -23,6 +23,8 @@
/* There is some commonality. */
#include <sysdeps/unix/mips/mips64/n64/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 4542e5b..1cb3d9b 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -24,7 +24,7 @@
#include <bits/pthreadtypes.h>
#include <atomic.h>
#include <sysdep.h>
-
+#include <kernel-features.h>
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@@ -37,200 +37,224 @@
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_PRIVATE_FLAG 128
-/* Initializer for compatibility lock. */
-#define LLL_MUTEX_LOCK_INITIALIZER (0)
-
-#define lll_futex_wait(futexp, val) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (long) (futexp), FUTEX_WAIT, (val), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
- })
-
-#define lll_futex_timed_wait(futexp, val, timespec) \
+/* Values for 'private' parameter of locking macros. Yes, the
+ definition seems to be backwards. But it is not. The bit will be
+ reversed before passing to the system call. */
+#define LLL_PRIVATE 0
+#define LLL_SHARED FUTEX_PRIVATE_FLAG
+
+
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+/* In libc.so or ld.so all futexes are private. */
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ ((fl) | FUTEX_PRIVATE_FLAG)
+# else
+# define __lll_private_flag(fl, private) \
+ ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
+# endif
+#else
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
+# else
+# define __lll_private_flag(fl, private) \
+ (__builtin_constant_p (private) \
+ ? ((private) == 0 \
+ ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
+ : (fl)) \
+ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
+ & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
+# endif
+#endif
+
+
+#define lll_futex_wait(futexp, val, private) \
+ lll_futex_timed_wait(futexp, val, NULL, private)
+
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (long) (futexp), FUTEX_WAIT, (val), (timespec));\
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \
+ __lll_private_flag (FUTEX_WAIT, private), \
+ (val), (timespec)); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
-#define lll_futex_wake(futexp, nr) \
+#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (long) (futexp), FUTEX_WAKE, (nr), 0); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \
+ __lll_private_flag (FUTEX_WAKE, private), \
+ (nr), 0); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
-#define lll_robust_mutex_dead(futexv) \
+#define lll_robust_dead(futexv, private) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1); \
+ lll_futex_wake (__futexp, 1, private); \
} \
while (0)
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (long) (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
- (nr_move), (mutex), (val)); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (long) (futexp), \
+ __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+ (nr_wake), (nr_move), (mutex), (val)); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
\
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_WAKE_OP, (nr_wake), \
- (nr_wake2), (futexp2), \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_WAKE_OP, private), \
+ (nr_wake), (nr_wake2), (futexp2), \
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
static inline int __attribute__((always_inline))
-__lll_mutex_trylock(int *futex)
+__lll_trylock(int *futex)
{
return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
}
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+#define lll_trylock(lock) __lll_trylock (&(lock))
static inline int __attribute__((always_inline))
-__lll_mutex_cond_trylock(int *futex)
+__lll_cond_trylock(int *futex)
{
return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
}
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock))
static inline int __attribute__((always_inline))
-__lll_robust_mutex_trylock(int *futex, int id)
+__lll_robust_trylock(int *futex, int id)
{
return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
}
-#define lll_robust_mutex_trylock(lock, id) \
- __lll_robust_mutex_trylock (&(lock), id)
-
-extern void __lll_lock_wait (int *futex) attribute_hidden;
-extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
-
-static inline void __attribute__((always_inline))
-__lll_mutex_lock(int *futex)
-{
- if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- __lll_lock_wait (futex);
-}
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
-
-
-static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_lock (int *futex, int id)
-{
- int result = 0;
- if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_lock_wait (futex);
- return result;
-}
-#define lll_robust_mutex_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), id)
+#define lll_robust_trylock(lock, id) \
+ __lll_robust_trylock (&(lock), id)
+
+extern void __lll_lock_wait_private (int *futex) attribute_hidden;
+extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
+
+#define __lll_lock(futex, private) \
+ ((void) ({ \
+ int *__futex = (futex); \
+ if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, \
+ 1, 0), 0)) \
+ { \
+ if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
+ __lll_lock_wait_private (__futex); \
+ else \
+ __lll_lock_wait (__futex, private); \
+ } \
+ }))
+#define lll_lock(futex, private) __lll_lock (&(futex), private)
+
+
+#define __lll_robust_lock(futex, id, private) \
+ ({ \
+ int *__futex = (futex); \
+ int __val = 0; \
+ \
+ if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
+ 0), 0)) \
+ __val = __lll_robust_lock_wait (__futex, private); \
+ __val; \
+ })
+#define lll_robust_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), id, private)
static inline void __attribute__ ((always_inline))
-__lll_mutex_cond_lock (int *futex)
+__lll_cond_lock (int *futex, int private)
{
if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
- __lll_lock_wait (futex);
+ __lll_lock_wait (futex, private);
}
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
-#define lll_robust_mutex_cond_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+#define lll_robust_cond_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
-extern int __lll_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
-extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
+extern int __lll_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
static inline int __attribute__ ((always_inline))
-__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
+__lll_timedlock (int *futex, const struct timespec *abstime, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- result = __lll_timedlock_wait (futex, abstime);
+ result = __lll_timedlock_wait (futex, abstime, private);
return result;
}
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
+#define lll_timedlock(futex, abstime, private) \
+ __lll_timedlock (&(futex), abstime, private)
static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
- int id)
+__lll_robust_timedlock (int *futex, const struct timespec *abstime,
+ int id, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_timedlock_wait (futex, abstime);
+ result = __lll_robust_timedlock_wait (futex, abstime, private);
return result;
}
-#define lll_robust_mutex_timedlock(futex, abstime, id) \
- __lll_robust_mutex_timedlock (&(futex), abstime, id)
+#define lll_robust_timedlock(futex, abstime, id, private) \
+ __lll_robust_timedlock (&(futex), abstime, id, private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock (int *futex)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
-}
-#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
-
-
-static inline void __attribute__ ((always_inline))
-__lll_robust_mutex_unlock (int *futex, int mask)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1);
-}
-#define lll_robust_mutex_unlock(futex) \
- __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+#define __lll_unlock(futex, private) \
+ ((void) ({ \
+ int *__futex = (futex); \
+ int __val = atomic_exchange_rel (__futex, 0); \
+ \
+ if (__builtin_expect (__val > 1, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ }))
+#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock_force (int *futex)
-{
- (void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1);
-}
-#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+#define __lll_robust_unlock(futex, private) \
+ ((void) ({ \
+ int *__futex = (futex); \
+ int __val = atomic_exchange_rel (__futex, 0); \
+ \
+ if (__builtin_expect (__val & FUTEX_WAITERS, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ }))
+#define lll_robust_unlock(futex, private) \
+ __lll_robust_unlock(&(futex), private)
-#define lll_mutex_islocked(futex) \
+#define lll_islocked(futex) \
(futex != 0)
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
@@ -240,20 +264,15 @@ typedef int lll_lock_t;
1 - taken by one user
>1 - taken by more users */
-#define lll_trylock(lock) lll_mutex_trylock (lock)
-#define lll_lock(lock) lll_mutex_lock (lock)
-#define lll_unlock(lock) lll_mutex_unlock (lock)
-#define lll_islocked(lock) lll_mutex_islocked (lock)
-
/* The kernel notifies a process which uses CLONE_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, LLL_SHARED); \
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
@@ -267,26 +286,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *)
__res; \
})
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
#endif /* lowlevellock.h */
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
index 649b752..ddfd32b 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
@@ -30,7 +30,7 @@ clear_once_control (void *arg)
pthread_once_t *once_control = (pthread_once_t *) arg;
*once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
}
@@ -65,7 +65,7 @@ __pthread_once (once_control, init_routine)
if (((oldval ^ newval) & -4) == 0)
{
/* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, newval);
+ lll_futex_wait (once_control, newval, LLL_PRIVATE);
continue;
}
}
@@ -84,7 +84,7 @@ __pthread_once (once_control, init_routine)
atomic_increment (once_control);
/* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
break;
}
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 1183b86..309438d 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
@@ -30,7 +30,7 @@ extern int _test_and_set (int *p, int v) __THROW;
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE __extern_inline
# endif
_EXTERN_INLINE int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=713ddf8d12374aa7ddca20da1d585b4bd1b281be
commit 713ddf8d12374aa7ddca20da1d585b4bd1b281be
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Sep 12 12:57:25 2007 +0000
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
lll_futex_wake not lll_private_futex_wake.
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_CLOEXEC): Define.
* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Include <tls.h>
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
(__lll_lock_wait_private, __lll_lock_wait): New.
(__lll_timedlock_wait): Don't include in libc.so; Take private
argument. Use atomic_compare_and_exchange_bool_acq.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Renamed all
lll_mutex_* resp. lll_robust_mutex_* macros to lll_*
resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to
LLL_LOCK_*. Include <kernel-features.h>.
(LLL_LOCK_INITIALIZER): Remove duplicate definition.
(__lll_private_flag): Define.
(lll_futex_timed_wait): Pass private flag to syscall.
(lll_futex_wake): Likewise.
(lll_private_futex_wait, lll_private_futex_timed_wait,
lll_private_futex_wake): Remove.
(lll_robust_dead, lll_futex_requeue): Take private arguments.
(lll_futex_wake_unlock): Pass private flag to syscall.
(__lll_robust_trylock): Convert to macro.
(__lll_robust_lock_wait): Add private argument.
(__lll_lock_wait_private, __lll_lock_wait): Declare.
(__lll_lock): Convert to macro. Take private argument.
(__lll_cond_lock): Likewise.
(lll_lock, lll_cond_lock): Take private arguments.
(__lll_robust_lock): Take private argument.
(__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private
arguments.
(__lll_timedlock, __lll_robust_timedlock): Convert to macros.
Take private arguments.
(lll_timedlock, lll_robust_timedlock): Take private arguments.
(__lll_unlock, __lll_robust_unlock): Convert to macros. Take
private arguments.
(lll_unlock, lll_robust_unlock): Take private arguments.
(__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t,
lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove.
(lll_wait_tid): Pass LLL_SHARED to lll_futex_wait.
(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
lll_cond_wake, lll_cond_broadcast): Remove.
* sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
(clear_once_control, __pthread_once): Use lll_futex_wake not
lll_private_futex_wake.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5a24c54..fbd399e 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,50 @@
+2007-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
+ lll_futex_wake not lll_private_futex_wake.
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_CLOEXEC): Define.
+ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Include <tls.h>
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+ (__lll_lock_wait_private, __lll_lock_wait): New.
+ (__lll_timedlock_wait): Don't include in libc.so; Take private
+ argument. Use atomic_compare_and_exchange_bool_acq.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Renamed all
+ lll_mutex_* resp. lll_robust_mutex_* macros to lll_*
+ resp. lll_robust_*. Renamed all LLL_MUTEX_LOCK_* macros to
+ LLL_LOCK_*. Include <kernel-features.h>.
+ (LLL_LOCK_INITIALIZER): Remove duplicate definition.
+ (__lll_private_flag): Define.
+ (lll_futex_timed_wait): Pass private flag to syscall.
+ (lll_futex_wake): Likewise.
+ (lll_private_futex_wait, lll_private_futex_timed_wait,
+ lll_private_futex_wake): Remove.
+ (lll_robust_dead, lll_futex_requeue): Take private arguments.
+ (lll_futex_wake_unlock): Pass private flag to syscall.
+ (__lll_robust_trylock): Convert to macro.
+ (__lll_robust_lock_wait): Add private argument.
+ (__lll_lock_wait_private, __lll_lock_wait): Declare.
+ (__lll_lock): Convert to macro. Take private argument.
+ (__lll_cond_lock): Likewise.
+ (lll_lock, lll_cond_lock): Take private arguments.
+ (__lll_robust_lock): Take private argument.
+ (__lll_timedlock_wait, __lll_robust_timedlock_wait): Take private
+ arguments.
+ (__lll_timedlock, __lll_robust_timedlock): Convert to macros.
+ Take private arguments.
+ (lll_timedlock, lll_robust_timedlock): Take private arguments.
+ (__lll_unlock, __lll_robust_unlock): Convert to macros. Take
+ private arguments.
+ (lll_unlock, lll_robust_unlock): Take private arguments.
+ (__lll_mutex_unlock_force, lll_mutex_unlock_force, lll_lock_t,
+ lll_trylock, lll_lock, lll_unlock, lll_islocked): Remove.
+ (lll_wait_tid): Pass LLL_SHARED to lll_futex_wait.
+ (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
+ __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
+ lll_cond_wake, lll_cond_broadcast): Remove.
+ * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
+ (clear_once_control, __pthread_once): Use lll_futex_wake not
+ lll_private_futex_wake.
+
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h
index e80b6b8..f257b93 100644
--- a/sysdeps/arm/nptl/tls.h
+++ b/sysdeps/arm/nptl/tls.h
@@ -142,7 +142,7 @@ typedef struct
= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
THREAD_GSCOPE_FLAG_UNUSED); \
if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
} \
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 59539e1..6fcc5c0 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2004, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,6 +50,7 @@
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
+# define O_CLOEXEC 02000000 /* Set close_on_exec. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
index bf9c8d7..1444f40 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006
+/* Copyright (C) 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -25,6 +25,8 @@
#include <arm/sysdep.h>
+#include <tls.h>
+
#if __NR_SYSCALL_BASE != 0
# error Kernel headers are too old
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
index 44867ec..8ba6065 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
@@ -22,8 +22,36 @@
#include <lowlevellock.h>
#include <sys/time.h>
+void
+__lll_lock_wait_private (int *futex)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2, LLL_PRIVATE);
+ }
+ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
+}
+
+
+/* These functions don't get included in libc.so */
+#ifdef IS_IN_libpthread
+void
+__lll_lock_wait (int *futex, int private)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2, private);
+ }
+ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
+}
+
+
int
-__lll_timedlock_wait (int *futex, const struct timespec *abstime)
+__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private)
{
struct timespec rt;
@@ -56,16 +84,14 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
return ETIMEDOUT;
// XYZ: Lost the lock to check whether it was private.
- lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED);
+ lll_futex_timed_wait (futex, 2, &rt, private);
}
- while (atomic_exchange_acq (futex, 2) != 0);
+ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
return 0;
}
-/* This function doesn't get included in libc.so */
-#ifdef IS_IN_libpthread
int
__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 468fe71..f48e867 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -24,6 +24,7 @@
#include <bits/pthreadtypes.h>
#include <atomic.h>
#include <sysdep.h>
+#include <kernel-features.h>
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@@ -42,8 +43,31 @@
#define LLL_PRIVATE 0
#define LLL_SHARED FUTEX_PRIVATE_FLAG
-/* Initializer for compatibility lock. */
-#define LLL_MUTEX_LOCK_INITIALIZER (0)
+
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+/* In libc.so or ld.so all futexes are private. */
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ ((fl) | FUTEX_PRIVATE_FLAG)
+# else
+# define __lll_private_flag(fl, private) \
+ ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
+# endif
+#else
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
+# else
+# define __lll_private_flag(fl, private) \
+ (__builtin_constant_p (private) \
+ ? ((private) == 0 \
+ ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
+ : (fl)) \
+ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
+ & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
+# endif
+#endif
+
#define lll_futex_wait(futexp, val, private) \
lll_futex_timed_wait(futexp, val, NULL, private)
@@ -52,82 +76,39 @@
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
- __ret; \
- })
-
-#define lll_futex_wake(futexp, nr, private) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
- __ret; \
- })
-
-#define lll_private_futex_wait(futexp, val) \
- lll_private_futex_timed_wait(futexp, val, NULL)
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-#define lll_private_futex_timed_wait(futexp, val, timespec) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAIT, private), \
(val), (timespec)); \
__ret; \
})
-#define lll_private_futex_wake(futexp, nr) \
+#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \
- (nr), (0)); \
- __ret; \
- })
-#else
-#define lll_private_futex_timed_wait(futexp, val, timespec) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret, __op; \
- __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), __op, (val), (timespec)); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAKE, private), \
+ (nr), 0); \
__ret; \
})
-#define lll_private_futex_wake(futexp, nr) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret, __op; \
- __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), __op, (nr), 0); \
- __ret; \
- })
-#endif
-
-#define lll_robust_mutex_dead(futexv) \
+#define lll_robust_dead(futexv, private) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1, 0); \
+ lll_futex_wake (__futexp, 1, private); \
} \
while (0)
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
- (nr_move), (mutex), (val)); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+ (nr_wake), (nr_move), (mutex), (val)); \
__ret; \
})
@@ -137,16 +118,16 @@
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_WAKE_OP, (nr_wake), \
- (nr_wake2), (futexp2), \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_WAKE_OP, private), \
+ (nr_wake), (nr_wake2), (futexp2), \
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
__ret; \
})
static inline int __attribute__((always_inline))
-__lll_mutex_trylock (int *futex)
+__lll_trylock (int *futex)
{
int flag = 1, old;
asm volatile (
@@ -161,11 +142,11 @@ __lll_mutex_trylock (int *futex)
return flag;
}
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+#define lll_trylock(lock) __lll_trylock (&(lock))
static inline int __attribute__((always_inline))
-__lll_mutex_cond_trylock (int *futex)
+__lll_cond_trylock (int *futex)
{
int flag = 2, old;
asm volatile (
@@ -180,135 +161,120 @@ __lll_mutex_cond_trylock (int *futex)
return flag;
}
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
-
-
-static inline int __attribute__((always_inline))
-__lll_robust_mutex_trylock(int *futex, int id)
-{
- return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
-}
-#define lll_robust_mutex_trylock(lock, id) \
- __lll_robust_mutex_trylock (&(lock), id)
-
-extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
-
-static inline void __attribute__((always_inline))
-__lll_mutex_lock (int *futex)
-{
- int val = atomic_exchange_acq (futex, 1);
-
- if (__builtin_expect (val != 0, 0))
- {
- while (atomic_exchange_acq (futex, 2) != 0)
- lll_futex_wait (futex, 2, 0);
- }
-}
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
-
-
-static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_lock (int *futex, int id)
-{
- int result = 0;
- if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_lock_wait (futex);
- return result;
-}
-#define lll_robust_mutex_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), id)
-
-
-static inline void __attribute__ ((always_inline))
-__lll_mutex_cond_lock (int *futex)
-{
- int val = atomic_exchange_acq (futex, 2);
-
- if (__builtin_expect (val != 0, 0))
- {
- while (atomic_exchange_acq (futex, 2) != 0)
- lll_futex_wait (futex, 2, 0);
- }
-}
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock))
+
+
+#define __lll_robust_trylock(futex, id) \
+ (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
+#define lll_robust_trylock(lock, id) \
+ __lll_robust_trylock (&(lock), id)
+
+extern void __lll_lock_wait_private (int *futex) attribute_hidden;
+extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
+
+#define __lll_lock(futex, private) \
+ ((void) ({ \
+ int *__futex = (futex); \
+ if (__builtin_expect (atomic_compare_and_exchange_val_acq (__futex, \
+ 1, 0), 0)) \
+ { \
+ if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
+ __lll_lock_wait_private (__futex); \
+ else \
+ __lll_lock_wait (__futex, private); \
+ } \
+ }))
+#define lll_lock(futex, private) __lll_lock (&(futex), private)
+
+
+#define __lll_robust_lock(futex, id, private) \
+ ({ \
+ int *__futex = (futex); \
+ int __val = 0; \
+ \
+ if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
+ 0), 0)) \
+ __val = __lll_robust_lock_wait (__futex, private); \
+ __val; \
+ })
+#define lll_robust_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), id, private)
-#define lll_robust_mutex_cond_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+#define __lll_cond_lock(futex, private) \
+ ((void) ({ \
+ int *__futex = (futex); \
+ if (__builtin_expect (atomic_exchange_acq (__futex, 2), 0)) \
+ __lll_lock_wait (__futex, private); \
+ }))
+#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
-extern int __lll_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
-extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
+#define lll_robust_cond_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
-static inline int __attribute__ ((always_inline))
-__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
-{
- int result = 0;
- int val = atomic_exchange_acq (futex, 1);
- if (__builtin_expect (val != 0, 0))
- result = __lll_timedlock_wait (futex, abstime);
- return result;
-}
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
+extern int __lll_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
-
-static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
- int id)
-{
- int result = 0;
- if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_timedlock_wait (futex, abstime);
- return result;
-}
-#define lll_robust_mutex_timedlock(futex, abstime, id) \
- __lll_robust_mutex_timedlock (&(futex), abstime, id)
+#define __lll_timedlock(futex, abstime, private) \
+ ({ \
+ int *__futex = (futex); \
+ int __val = 0; \
+ \
+ if (__builtin_expect (atomic_exchange_acq (__futex, 1), 0)) \
+ __val = __lll_timedlock_wait (__futex, abstime, private); \
+ __val; \
+ })
+#define lll_timedlock(futex, abstime, private) \
+ __lll_timedlock (&(futex), abstime, private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock (int *futex)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1, 0);
-}
-#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+#define __lll_robust_timedlock(futex, abstime, id, private) \
+ ({ \
+ int *__futex = (futex); \
+ int __val = 0; \
+ \
+ if (__builtin_expect (atomic_compare_and_exchange_bool_acq (__futex, id, \
+ 0), 0)) \
+ __val = __lll_robust_timedlock_wait (__futex, abstime, private); \
+ __val; \
+ })
+#define lll_robust_timedlock(futex, abstime, id, private) \
+ __lll_robust_timedlock (&(futex), abstime, id, private)
-static inline void __attribute__ ((always_inline))
-__lll_robust_mutex_unlock (int *futex, int mask)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1, 0);
-}
-#define lll_robust_mutex_unlock(futex) \
- __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+#define __lll_unlock(futex, private) \
+ (void) \
+ ({ int *__futex = (futex); \
+ int __oldval = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (__oldval > 1, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ })
+#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock_force (int *futex)
-{
- (void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1, 0);
-}
-#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+#define __lll_robust_unlock(futex, private) \
+ (void) \
+ ({ int *__futex = (futex); \
+ int __oldval = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ })
+#define lll_robust_unlock(futex, private) \
+ __lll_robust_unlock(&(futex), private)
-#define lll_mutex_islocked(futex) \
+#define lll_islocked(futex) \
(futex != 0)
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
@@ -318,11 +284,6 @@ typedef int lll_lock_t;
1 - taken by one user
>1 - taken by more users */
-#define lll_trylock(lock) lll_mutex_trylock (lock)
-#define lll_lock(lock) lll_mutex_lock (lock)
-#define lll_unlock(lock) lll_mutex_unlock (lock)
-#define lll_islocked(lock) lll_mutex_islocked (lock)
-
/* The kernel notifies a process which uses CLONE_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
@@ -331,7 +292,7 @@ typedef int lll_lock_t;
do { \
__typeof (tid) __tid; \
while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid, 0);\
+ lll_futex_wait (&(tid), __tid, LLL_SHARED);\
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
@@ -345,26 +306,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *)
__res; \
})
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
#endif /* lowlevellock.h */
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
index 909e832..d81ecd4 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
@@ -27,7 +27,7 @@ clear_once_control (void *arg)
pthread_once_t *once_control = (pthread_once_t *) arg;
*once_control = 0;
- lll_private_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
}
int
@@ -66,7 +66,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
break;
/* Same generation, some other thread was faster. Wait. */
- lll_private_futex_wait (once_control, oldval);
+ lll_futex_wait (once_control, oldval, LLL_PRIVATE);
}
/* This thread is the first here. Do the initialization.
@@ -82,7 +82,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
*once_control = __fork_generation | 2;
/* Wake up all other threads. */
- lll_private_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce7a1add4e1be2b9e80a95eaa4f3e62e56c24612
commit ce7a1add4e1be2b9e80a95eaa4f3e62e56c24612
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Aug 29 20:34:36 2007 +0000
* sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not
clobber other exceptions.
* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new
exceptions.
* sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle
multiple new exceptions if some are disabled.
* sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index c775ee0..463dd29 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,13 @@
+2007-08-29 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/powerpc/nofpu/fsetexcptflg.c (__fesetexceptflag): Do not
+ clobber other exceptions.
+ * sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Raise new
+ exceptions.
+ * sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Handle
+ multiple new exceptions if some are disabled.
+ * sysdeps/powerpc/nofpu/sim-full.c (__simulate_exceptions): Likewise.
+
2007-07-13 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.
diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c
index 5073776..17af8d3 100644
--- a/sysdeps/powerpc/nofpu/feupdateenv.c
+++ b/sysdeps/powerpc/nofpu/feupdateenv.c
@@ -21,12 +21,12 @@
#include "soft-fp.h"
#include "soft-supp.h"
+#include <signal.h>
#include <bp-sym.h>
int
__feupdateenv (const fenv_t *envp)
{
- fenv_union_t u;
int saved_exceptions;
/* Save currently set exceptions. */
@@ -37,6 +37,8 @@ __feupdateenv (const fenv_t *envp)
/* Raise old exceptions. */
__sim_exceptions |= saved_exceptions;
+ if (saved_exceptions & ~__sim_disabled_exceptions)
+ raise (SIGFPE);
return 0;
}
diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/sysdeps/powerpc/nofpu/fraiseexcpt.c
index cd91502..5d3a87f 100644
--- a/sysdeps/powerpc/nofpu/fraiseexcpt.c
+++ b/sysdeps/powerpc/nofpu/fraiseexcpt.c
@@ -28,10 +28,7 @@ int
__feraiseexcept (int x)
{
__sim_exceptions |= x;
- if (x == 0 || __sim_disabled_exceptions & x)
- /* Ignore exception. */
- ;
- else
+ if (x & ~__sim_disabled_exceptions)
raise (SIGFPE);
return 0;
}
diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/sysdeps/powerpc/nofpu/fsetexcptflg.c
index 85fd88f..2faeb1f 100644
--- a/sysdeps/powerpc/nofpu/fsetexcptflg.c
+++ b/sysdeps/powerpc/nofpu/fsetexcptflg.c
@@ -26,7 +26,7 @@ int
__fesetexceptflag(const fexcept_t *flagp, int excepts)
{
/* Ignore exceptions not listed in 'excepts'. */
- __sim_exceptions = *flagp & excepts;
+ __sim_exceptions = (__sim_exceptions & ~excepts) | (*flagp & excepts);
return 0;
}
diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c
index d018240..d5ee007 100644
--- a/sysdeps/powerpc/nofpu/sim-full.c
+++ b/sysdeps/powerpc/nofpu/sim-full.c
@@ -37,9 +37,6 @@ void
__simulate_exceptions (int x)
{
__sim_exceptions |= x;
- if (x == 0 || __sim_disabled_exceptions & x)
- /* Ignore exception. */
- ;
- else
+ if (x & ~__sim_disabled_exceptions)
raise (SIGFPE);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ceb34e81f0b53ffc48189c2fd9f0c00335552d69
commit ceb34e81f0b53ffc48189c2fd9f0c00335552d69
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Aug 21 08:07:28 2007 +0000
* sysdeps/unix/sysv/linux/alpha/sysdep.h: Include tls.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index a22da71..f0661d1 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -29,6 +29,8 @@
/* There is some commonality. */
#include <sysdeps/unix/alpha/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc256454b9c4f9bf5d8dda29b3d3f14f706fdc53
commit fc256454b9c4f9bf5d8dda29b3d3f14f706fdc53
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Aug 21 08:05:34 2007 +0000
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
Add private argument.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 9fa321c..9318823 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -94,12 +94,12 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
-#define lll_robust_dead(futexv) \
+#define lll_robust_dead(futexv, private) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1, LLL_SHARED); \
+ lll_futex_wake (__futexp, 1, private); \
} \
while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=957df4294eacc0b24816986e1fea88d67d993131
commit 957df4294eacc0b24816986e1fea88d67d993131
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Aug 16 21:03:08 2007 +0000
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h
(__lll_robust_timedlock): Pass private as last argument to
__lll_robust_timedlock_wait.
(__lll_unlock): Fix a pasto.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 4487607..9fa321c 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -219,7 +219,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_timedlock_wait (futex, abstime);
+ result = __lll_robust_timedlock_wait (futex, abstime, private);
return result;
}
#define lll_robust_timedlock(futex, abstime, id, private) \
@@ -229,7 +229,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define __lll_unlock(futex, private) \
(void) \
({ int *__futex = (futex); \
- ({ int __oldval = atomic_exchange_rel (__futex, 0); \
+ int __oldval = atomic_exchange_rel (__futex, 0); \
if (__builtin_expect (__oldval > 1, 0)) \
lll_futex_wake (__futex, 1, private); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6b427ce224665ef5152182efb06a23482366cdf
commit a6b427ce224665ef5152182efb06a23482366cdf
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Aug 14 19:37:50 2007 +0000
* sysdeps/ieee754/ldbl-64-128/strtold_l.c (__STRTOF): Declare.
Add libc_hidden_proto.
(STRTOF): Add libc_hidden_proto.
(___new_strtold_l, ___new_wcstold_l): New weak aliases.
(strtold_l, wcstold_l): Use them as second argument for
long_double_symbol.
nptl/
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
__lll_robust_unlock): Rewrite as macros instead of inline functions.
* sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
__lll_robust_unlock, __lll_wait_tid): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 4f67964..4487607 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -226,23 +226,23 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
__lll_robust_timedlock (&(futex), abstime, id, private)
-static inline void __attribute__ ((always_inline))
-__lll_unlock (int *futex, int private)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1, private);
-}
+#define __lll_unlock(futex, private) \
+ (void) \
+ ({ int *__futex = (futex); \
+ ({ int __oldval = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (__oldval > 1, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ })
#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
-static inline void __attribute__ ((always_inline))
-__lll_robust_unlock (int *futex, int private)
-{
- int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & FUTEX_WAITERS, 0))
- lll_futex_wake (futex, 1, private);
-}
+#define __lll_robust_unlock(futex, private) \
+ (void) \
+ ({ int *__futex = (futex); \
+ int __oldval = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (__oldval & FUTEX_WAITERS, 0)) \
+ lll_futex_wake (__futex, 1, private); \
+ })
#define lll_robust_unlock(futex, private) \
__lll_robust_unlock(&(futex), private)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=639aa6011e81384ae88d0356682e8ef20e1de6ab
commit 639aa6011e81384ae88d0356682e8ef20e1de6ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 13 18:33:00 2007 +0000
Include kernel-features.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index ab829ad..4f67964 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -24,6 +24,7 @@
#include <bits/pthreadtypes.h>
#include <atomic.h>
#include <sysdep.h>
+#include <kernel-features.h>
#define __NR_futex 394
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f9107929d0b9dbf46cb45735620eae3f1566278
commit 5f9107929d0b9dbf46cb45735620eae3f1566278
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 12 19:39:31 2007 +0000
(pthread_rwlock_t): Renamed __pad1 element to __shared, adjust names of
other padding elements.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 41a54d4..41c0be1 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Alpha version.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -126,9 +126,9 @@ typedef union
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
- int __pad1;
+ int __shared;
+ unsigned long int __pad1;
unsigned long int __pad2;
- unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78727e1194372d2fde23946ee5adc23ba2eb765e
commit 78727e1194372d2fde23946ee5adc23ba2eb765e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 11 18:47:31 2007 +0000
(lll_futex_requeue, lll_futex_wake_unlock): Add private argument, use
__lll_private_flag macro.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index f3f2919..ab829ad 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -103,24 +103,24 @@
while (0)
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
- (nr_move), (mutex), (val)); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
+ (nr_wake), (nr_move), (mutex), (val)); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_WAKE_OP, (nr_wake), \
- (nr_wake2), (futexp2), \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
+ __lll_private_flag (FUTEX_WAKE_OP, private), \
+ (nr_wake), (nr_wake2), (futexp2), \
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bf120f61eae0d9c10ae43a4101783ee02de0c10
commit 1bf120f61eae0d9c10ae43a4101783ee02de0c10
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 10 01:44:09 2007 +0000
(O_CLOEXEC): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index f17dc2b..b4f49cf 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000,2004,2005,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,6 +50,7 @@
# define O_NOFOLLOW 0200000 /* Do not follow links. */
# define O_DIRECT 02000000 /* Direct disk access. */
# define O_NOATIME 04000000 /* Do not set atime. */
+# define O_CLOEXEC 010000000 /* Set close_on_exec. */
#endif
#ifdef __USE_LARGEFILE64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d45a63687733a9e9029d8a336c3918d19a320a7b
commit d45a63687733a9e9029d8a336c3918d19a320a7b
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Aug 6 17:45:09 2007 +0000
* sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID):
New macros for the (n)64 and n32 ABIs.
(_dl_cache_check_flags): Define if _DL_CACHE_DEFAULT_ID has been.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 43aadf8..3216e73 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2007-08-06 Maciej W. Rozycki <macro@linux-mips.org>
+
+ * sysdeps/unix/sysv/linux/mips/dl-cache.h (_DL_CACHE_DEFAULT_ID):
+ New macros for the (n)64 and n32 ABIs.
+ (_dl_cache_check_flags): Define if _DL_CACHE_DEFAULT_ID has been.
+
2007-07-13 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]:
diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h
index 4fa5d3a..9f0e4d2 100644
--- a/sysdeps/unix/sysv/linux/mips/dl-cache.h
+++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h
@@ -1,5 +1,5 @@
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ldconfig.h>
+
+/* Redefine the cache ID for new ABIs; o32 keeps using the generic check. */
+#if _MIPS_SIM == _ABI64
+# define _DL_CACHE_DEFAULT_ID (FLAG_MIPS64_LIBN64 | FLAG_ELF_LIBC6)
+#elif _MIPS_SIM == _ABIN32
+# define _DL_CACHE_DEFAULT_ID (FLAG_MIPS64_LIBN32 | FLAG_ELF_LIBC6)
+#endif
+
+#ifdef _DL_CACHE_DEFAULT_ID
+# define _dl_cache_check_flags(flags) \
+ ((flags) == _DL_CACHE_DEFAULT_ID)
+#endif
+
#define add_system_dir(dir) \
do \
{ \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57165d450fbbdeb38c80d19bc96c20d3b4ecf581
commit 57165d450fbbdeb38c80d19bc96c20d3b4ecf581
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Aug 3 22:58:57 2007 +0000
2007-08-03 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h:
(__local_multiple_threads): Declare as hidden only in libc and
in libpthread.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index ff0a7a4..7bb3387 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2007-08-03 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h:
+ (__local_multiple_threads): Declare as hidden only in libc and
+ in libpthread.
+
2007-07-28 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove.
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
index e01936a..51d6cf3 100644
--- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
@@ -206,7 +206,11 @@ L(pre_end): ASM_LINE_SEP \
# endif
# ifndef __ASSEMBLER__
- extern int __local_multiple_threads attribute_hidden;
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
+extern int __local_multiple_threads attribute_hidden;
+# else
+extern int __local_multiple_threads;
+# endif
# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
# else
/* This ALT version requires newer kernel support */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5cfc3d44a502385d891820c7c5b17252eff994fa
commit 5cfc3d44a502385d891820c7c5b17252eff994fa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 1 04:21:31 2007 +0000
Renamed all lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
inline functions to __lll_* resp. __lll_robust_*.
(LLL_MUTEX_LOCK_INITIALIZER): Remove.
(lll_mutex_dead): Add private argument.
(__lll_lock_wait_private): New prototype.
(__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
__lll_robust_lock_timedwait): Add private argument to prototypes.
(__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
call __lll_lock_wait_private, otherwise pass private to
__lll_lock_wait.
(__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
__lll_robust_timedlock): Add private argument, pass it to
__lll_*wait functions.
(__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
call __lll_unlock_wake_private, otherwise pass private to
__lll_unlock_wake.
(__lll_robust_unlock): Add private argument, pass it to
__lll_robust_unlock_wake.
(lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
argument, pass it through to __lll_* inline function.
(__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
(lll_lock_t): Remove.
(__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
__lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
lll_cond_wake, lll_cond_broadcast): Remove.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 5f08673..f3f2919 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -70,9 +70,6 @@
#endif
-/* Initializer for compatibility lock. */
-#define LLL_MUTEX_LOCK_INITIALIZER (0)
-
#define lll_futex_wait(futexp, val, private) \
lll_futex_timed_wait (futexp, val, NULL, private)
@@ -96,7 +93,7 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
-#define lll_robust_mutex_dead(futexv) \
+#define lll_robust_dead(futexv) \
do \
{ \
int *__futexp = &(futexv); \
@@ -132,149 +129,130 @@
static inline int __attribute__((always_inline))
-__lll_mutex_trylock(int *futex)
+__lll_trylock(int *futex)
{
return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
}
-#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+#define lll_trylock(lock) __lll_trylock (&(lock))
static inline int __attribute__((always_inline))
-__lll_mutex_cond_trylock(int *futex)
+__lll_cond_trylock(int *futex)
{
return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
}
-#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+#define lll_cond_trylock(lock) __lll_cond_trylock (&(lock))
static inline int __attribute__((always_inline))
-__lll_robust_mutex_trylock(int *futex, int id)
+__lll_robust_trylock(int *futex, int id)
{
return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
}
-#define lll_robust_mutex_trylock(lock, id) \
- __lll_robust_mutex_trylock (&(lock), id)
+#define lll_robust_trylock(lock, id) \
+ __lll_robust_trylock (&(lock), id)
-extern void __lll_lock_wait (int *futex) attribute_hidden;
-extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
+extern void __lll_lock_wait_private (int *futex) attribute_hidden;
+extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
static inline void __attribute__((always_inline))
-__lll_mutex_lock(int *futex)
+__lll_lock(int *futex, int private)
{
if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- __lll_lock_wait (futex);
+ {
+ if (__builtin_constant_p (private) && private == LLL_PRIVATE)
+ __lll_lock_wait_private (futex);
+ else
+ __lll_lock_wait (futex, private);
+ }
}
-#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+#define lll_lock(futex, private) __lll_lock (&(futex), private)
static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_lock (int *futex, int id)
+__lll_robust_lock (int *futex, int id, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
- result = __lll_robust_lock_wait (futex);
+ result = __lll_robust_lock_wait (futex, private);
return result;
}
-#define lll_robust_mutex_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), id)
+#define lll_robust_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), id, private)
static inline void __attribute__ ((always_inline))
-__lll_mutex_cond_lock (int *futex)
+__lll_cond_lock (int *futex, int private)
{
if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
- __lll_lock_wait (futex);
+ __lll_lock_wait (futex, private);
}
-#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
-#define lll_robust_mutex_cond_lock(futex, id) \
- __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+#define lll_robust_cond_lock(futex, id, private) \
+ __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
-extern int __lll_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
-extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
- attribute_hidden;
+extern int __lll_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
+ int private) attribute_hidden;
static inline int __attribute__ ((always_inline))
-__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
+__lll_timedlock (int *futex, const struct timespec *abstime, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
- result = __lll_timedlock_wait (futex, abstime);
+ result = __lll_timedlock_wait (futex, abstime, private);
return result;
}
-#define lll_mutex_timedlock(futex, abstime) \
- __lll_mutex_timedlock (&(futex), abstime)
+#define lll_timedlock(futex, abstime, private) \
+ __lll_timedlock (&(futex), abstime, private)
static inline int __attribute__ ((always_inline))
-__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
- int id)
+__lll_robust_timedlock (int *futex, const struct timespec *abstime,
+ int id, int private)
{
int result = 0;
if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
result = __lll_robust_timedlock_wait (futex, abstime);
return result;
}
-#define lll_robust_mutex_timedlock(futex, abstime, id) \
- __lll_robust_mutex_timedlock (&(futex), abstime, id)
+#define lll_robust_timedlock(futex, abstime, id, private) \
+ __lll_robust_timedlock (&(futex), abstime, id, private)
static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock (int *futex)
+__lll_unlock (int *futex, int private)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1, LLL_SHARED);
+ lll_futex_wake (futex, 1, private);
}
-#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
static inline void __attribute__ ((always_inline))
-__lll_robust_mutex_unlock (int *futex, int mask)
+__lll_robust_unlock (int *futex, int private)
{
int val = atomic_exchange_rel (futex, 0);
- if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1, LLL_SHARED);
+ if (__builtin_expect (val & FUTEX_WAITERS, 0))
+ lll_futex_wake (futex, 1, private);
}
-#define lll_robust_mutex_unlock(futex) \
- __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
-
+#define lll_robust_unlock(futex, private) \
+ __lll_robust_unlock(&(futex), private)
-static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock_force (int *futex)
-{
- (void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1, LLL_SHARED);
-}
-#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
-
-#define lll_mutex_islocked(futex) \
+#define lll_islocked(futex) \
(futex != 0)
-
-/* Our internal lock implementation is identical to the binary-compatible
- mutex implementation. */
-
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The states of a lock are:
- 0 - untaken
- 1 - taken by one user
- >1 - taken by more users */
-
-#define lll_trylock(lock) lll_mutex_trylock (lock)
-#define lll_lock(lock) lll_mutex_lock (lock)
-#define lll_unlock(lock) lll_mutex_unlock (lock)
-#define lll_islocked(lock) lll_mutex_islocked (lock)
/* The kernel notifies a process which uses CLONE_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
@@ -298,26 +276,4 @@ extern int __lll_timedwait_tid (int *, const struct timespec *)
__res; \
})
-
-/* Conditional variable handling. */
-
-extern void __lll_cond_wait (pthread_cond_t *cond)
- attribute_hidden;
-extern int __lll_cond_timedwait (pthread_cond_t *cond,
- const struct timespec *abstime)
- attribute_hidden;
-extern void __lll_cond_wake (pthread_cond_t *cond)
- attribute_hidden;
-extern void __lll_cond_broadcast (pthread_cond_t *cond)
- attribute_hidden;
-
-#define lll_cond_wait(cond) \
- __lll_cond_wait (cond)
-#define lll_cond_timedwait(cond, abstime) \
- __lll_cond_timedwait (cond, abstime)
-#define lll_cond_wake(cond) \
- __lll_cond_wake (cond)
-#define lll_cond_broadcast(cond) \
- __lll_cond_broadcast (cond)
-
#endif /* lowlevellock.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b599860dc82a3a3eb2744d6ba4917ef2a2f5ba47
commit b599860dc82a3a3eb2744d6ba4917ef2a2f5ba47
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat Jul 28 21:26:44 2007 +0000
2007-07-28 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove.
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
(pthread_rwlock_t): Split __flags into __pad2, __pad1, __shared,
and __flags. Update comments. Update copyright.
* sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_FLAG_UNUSED,
THREAD_GSCOPE_FLAG_USED, THREAD_GSOPE_FLAG_WAIT,
THREAD_GSCOPE_RSEET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT.
Update copyright.
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Update copyright.
(__lll_lock_wait): Call lll_futex_wait with LLL_SHARED.
(__lll_timedlock_wait): Call lll_futex_timed_wait with LLL_SHARED.
(lll_unlock_Wake_cb): Use lll_private_futex_wake.
(___lll_timedwait_tid): Call lll_futex_timed_wait with LLL_SAHRED.
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
FUTEX_PRIVATE_FLAG, LLL_PRIVATE, LLL_SHARED, lll_private_futex_wait,
lll_private_futex_timed_wait, lll_private_Futex_wake. Add private
argument to lll_futex_wait, lll_futex_timed_wait, lll_futex_wake,
lll_futex_wake_unlock.
* sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Update copyright.
(clear_once_control): Use lll_private_futex_wake.
(__pthread_once): Use lll_private_futex_wait, and
lll_private_futex_wake.
2007-07-28 Randolph Chung <tausq@debian.org>
* sysdeps/hppa/nptl/tls.h (DB_THREAD_SELF): Fix definition.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 967dadf..ff0a7a4 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,4 +1,33 @@
-2006-07-16 Jeff Bailey <jbailey@raspberryginger.com>
+2007-07-28 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Remove.
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+ (pthread_rwlock_t): Split __flags into __pad2, __pad1, __shared,
+ and __flags. Update comments. Update copyright.
+ * sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSOPE_FLAG_WAIT,
+ THREAD_GSCOPE_RSEET_FLAG, THREAD_GSCOPE_SET_FLAG, THREAD_GSCOPE_WAIT.
+ Update copyright.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Update copyright.
+ (__lll_lock_wait): Call lll_futex_wait with LLL_SHARED.
+ (__lll_timedlock_wait): Call lll_futex_timed_wait with LLL_SHARED.
+ (lll_unlock_Wake_cb): Use lll_private_futex_wake.
+ (___lll_timedwait_tid): Call lll_futex_timed_wait with LLL_SAHRED.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Define
+ FUTEX_PRIVATE_FLAG, LLL_PRIVATE, LLL_SHARED, lll_private_futex_wait,
+ lll_private_futex_timed_wait, lll_private_Futex_wake. Add private
+ argument to lll_futex_wait, lll_futex_timed_wait, lll_futex_wake,
+ lll_futex_wake_unlock.
+ * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Update copyright.
+ (clear_once_control): Use lll_private_futex_wake.
+ (__pthread_once): Use lll_private_futex_wait, and
+ lll_private_futex_wake.
+
+2007-07-28 Randolph Chung <tausq@debian.org>
+
+ * sysdeps/hppa/nptl/tls.h (DB_THREAD_SELF): Fix definition.
+
+2007-06-16 Jeff Bailey <jbailey@raspberryginger.com>
* sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't
include asm/elf.h. Declare elf_greg_t, elf_gregset_t,
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index 0759aec..d2d725e 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/hppa version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -117,11 +117,12 @@ typedef struct
__self - 1; \
})
-/* FIXME */
-/* Magic for libthread_db to know how to do THREAD_SELF. */
+/* Magic for libthread_db to know how to do THREAD_SELF.
+ Our thread pointer is stored in cr27. See asm/elf.h for the offset into
+ elf_gregset_t. The thread descriptor is sizeof (struct pthread) away. */
# define DB_THREAD_SELF \
- REGISTER (32, 32, 32 * 4, -sizeof (struct pthread))
-
+ REGISTER (32, 32, 53 * 4, -sizeof (struct pthread))
+
/* Access to data in the thread descriptor is easy. */
# define THREAD_GETMEM(descr, member) \
descr->member
@@ -146,6 +147,29 @@ static inline void __set_cr27(struct pthread *cr27)
: : "r" (cr27) : "r26" );
}
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index e1c5325..62fc80c 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,13 +19,14 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
-/* Linuxthread type sizes:
+/* Linuxthread type sizes (bytes):
sizeof(pthread_attr_t) = 0x24 (36)
sizeof(pthread_mutex_t) = 0x30 (48)
sizeof(pthread_mutexattr_t) = 0x4 (4)
sizeof(pthread_cond_t) = 0x30 (48)
- = Grew to 64 bytes in NPTL.
- No pthread_cond_compat_t ...
+ = Expanded to 64 bytes in NPTL.
+ sizeof(pthread_cond_compat_t) = 0xc (12)
+ = Did not exist in Linuxthreads.
sizeof(pthread_condattr_t) = 0x4 (4)
sizeof(pthread_rwlock_t) = 0x40 (64)
sizeof(pthread_rwlockattr_t) = 0x8 (8)
@@ -52,9 +53,9 @@ typedef unsigned long int pthread_t;
implementation. For NPTL we use LWS Compare and
Exchange to implement primitives. */
#if 0
-typedef struct {
+typedef volatile struct {
int lock[4];
-} __atomic_lock_t;
+} __attribute__ ((aligned(16))) __atomic_lock_t;
#endif
typedef union
@@ -149,7 +150,10 @@ typedef union
unsigned int __nr_writers_queued;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __pad2;
+ unsigned char __pad1;
+ unsigned char __shared;
+ unsigned char __flags;
int __writer;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h
deleted file mode 100644
index 528c2a7..0000000
--- a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _INTERNALTYPES_H
-#define _INTERNALTYPES_H 1
-
-#include <stdint.h>
-
-
-struct pthread_attr
-{
- /* Scheduler parameters and priority. */
- struct sched_param schedparam;
- int schedpolicy;
- /* Various flags like detachstate, scope, etc. */
- int flags;
- /* Size of guard area. */
- size_t guardsize;
- /* Stack handling. */
- void *stackaddr;
- size_t stacksize;
- /* Affinity map. */
- cpu_set_t *cpuset;
- size_t cpusetsize;
-};
-
-#define ATTR_FLAG_DETACHSTATE 0x0001
-#define ATTR_FLAG_NOTINHERITSCHED 0x0002
-#define ATTR_FLAG_SCOPEPROCESS 0x0004
-#define ATTR_FLAG_STACKADDR 0x0008
-#define ATTR_FLAG_OLDATTR 0x0010
-#define ATTR_FLAG_SCHED_SET 0x0020
-#define ATTR_FLAG_POLICY_SET 0x0040
-
-
-/* Mutex attribute data structure. */
-struct pthread_mutexattr
-{
- /* Identifier for the kind of mutex.
-
- Bit 31 is set if the mutex is to be shared between processes.
-
- Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify
- the type of the mutex. */
- int mutexkind;
-};
-
-
-/* Conditional variable attribute data structure. */
-struct pthread_condattr
-{
- /* Combination of values:
-
- Bit 0 : flag whether coditional variable will be shareable between
- processes.
-
- Bit 1-7: clock ID. */
- int value;
-};
-
-
-/* The __NWAITERS field is used as a counter and to house the number
- of bits which represent the clock. COND_CLOCK_BITS is the number
- of bits reserved for the clock. */
-#define COND_CLOCK_BITS 1
-
-
-/* Read-write lock variable attribute data structure. */
-struct pthread_rwlockattr
-{
- int lockkind;
- int pshared;
-};
-
-
-/* Barrier data structure. */
-struct pthread_barrier
-{
- unsigned int curr_event;
- int lock;
- unsigned int left;
- unsigned int init_count;
-};
-
-
-/* Barrier variable attribute data structure. */
-struct pthread_barrierattr
-{
- int pshared;
-};
-
-
-/* Thread-local data handling. */
-struct pthread_key_struct
-{
- /* Sequence numbers. Even numbers indicated vacant entries. Note
- that zero is even. We use uintptr_t to not require padding on
- 32- and 64-bit machines. On 64-bit machines it helps to avoid
- wrapping, too. */
- uintptr_t seq;
-
- /* Destructor for the data. */
- void (*destr) (void *);
-};
-
-/* Check whether an entry is unused. */
-#define KEY_UNUSED(p) (((p) & 1) == 0)
-/* Check whether a key is usable. We cannot reuse an allocated key if
- the sequence counter would overflow after the next destroy call.
- This would mean that we potentially free memory for a key with the
- same sequence. This is *very* unlikely to happen, A program would
- have to create and destroy a key 2^31 times (on 32-bit platforms,
- on 64-bit platforms that would be 2^63). If it should happen we
- simply don't use this specific key anymore. */
-#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2)))
-
-
-/* Handling of read-write lock data. */
-// XXX For now there is only one flag. Maybe more in future.
-#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0)
-
-
-/* Semaphore variable structure. */
-struct sem
-{
- unsigned int count;
-};
-
-
-/* Compatibility type for old conditional variable interfaces. */
-typedef struct
-{
- pthread_cond_t *cond;
-} pthread_cond_2_0_t;
-
-#endif /* internaltypes.h */
-
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
index d2919ee..236d29c 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
@@ -1,5 +1,5 @@
/* low level locking for pthread library. Generic futex-using version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
@@ -31,7 +31,7 @@ __lll_lock_wait (lll_lock_t *futex)
{
int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
if (oldval != 0)
- lll_futex_wait (futex, 2);
+ lll_futex_wait (futex, 2, LLL_SHARED);
}
while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
}
@@ -68,7 +68,7 @@ __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
/* Wait. */
int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
if (oldval != 0)
- lll_futex_timed_wait (futex, 2, &rt);
+ lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED);
}
while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
return 0;
@@ -83,7 +83,7 @@ lll_unlock_wake_cb (lll_lock_t *futex)
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
+ lll_private_futex_wake (futex, 1);
return 0;
}
@@ -119,7 +119,7 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
return ETIMEDOUT;
/* Wait until thread terminates. */
- if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
+ if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
return ETIMEDOUT;
}
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index 3b2b0f1..f8a9555 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,6 +39,13 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
+
+/* Values for 'private' parameter of locking macros. Yes, the
+ definition seems to be backwards. But it is not. The bit will be
+ reversed before passing to the system call. */
+#define LLL_PRIVATE 0
+#define LLL_SHARED FUTEX_PRIVATE_FLAG
/* Initialize locks to zero. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -48,39 +55,82 @@
typedef int lll_lock_t;
-#define lll_futex_wait(futexp, val) \
+#define lll_futex_wait(futexp, val, private) \
+ lll_futex_timed_wait (futexp, val, 0, private)
+
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), 0); \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
__ret; \
})
-#define lll_futex_timed_wait(futexp, val, timespec) \
+#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
+ (futexp), FUTEX_WAKE, (nr), 0); \
__ret; \
})
-#define lll_futex_wake(futexp, nr) \
+#define lll_private_futex_wait(futex, val) \
+ lll_private_futex_timed_wait (futex, val, NULL)
+
+#ifdef __ASSUME_PRIVATE_FUTEX
+# define lll_private_futex_timed_wait(futex, val, timeout) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
+ (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \
+ (val), (timespec)); \
__ret; \
})
+# define lll_private_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \
+ (nr), 0); \
+ __ret; \
+ })
+
+#else
+
+# define lll_private_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret, __op; \
+ __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), __op, (val), (timespec)); \
+ __ret; \
+ })
+
+# define lll_private_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret, __op; \
+ __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), __op, (nr), 0); \
+ __ret; \
+ })
+#endif
+
+
+
#define lll_robust_mutex_dead(futexv) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1); \
+ lll_futex_wake (__futexp, 1, 0); \
} \
while (0)
@@ -96,7 +146,7 @@ typedef int lll_lock_t;
})
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
@@ -201,7 +251,7 @@ __lll_mutex_unlock (lll_lock_t *futex)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
@@ -211,7 +261,7 @@ __lll_robust_mutex_unlock (int *futex, int mask)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_robust_mutex_unlock(futex) \
__lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
@@ -221,7 +271,7 @@ static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (lll_lock_t *futex)
{
(void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
@@ -256,10 +306,10 @@ extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, 0); \
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
index 649b752..b89e40c 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -30,7 +30,7 @@ clear_once_control (void *arg)
pthread_once_t *once_control = (pthread_once_t *) arg;
*once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
+ lll_private_futex_wake (once_control, INT_MAX);
}
@@ -65,7 +65,7 @@ __pthread_once (once_control, init_routine)
if (((oldval ^ newval) & -4) == 0)
{
/* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, newval);
+ lll_private_futex_wait (once_control, newval);
continue;
}
}
@@ -84,7 +84,7 @@ __pthread_once (once_control, init_routine)
atomic_increment (once_control);
/* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
+ lll_private_futex_wake (once_control, INT_MAX);
break;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42cca94a7485d62a2594e0f2c95c85eb36982814
commit 42cca94a7485d62a2594e0f2c95c85eb36982814
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 19:31:35 2007 +0000
(FUTEX_PRIVATE_FLAG,
LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
(lll_futex_wait): Add private argument, define as wrapper around
lll_futex_timed_wait.
(lll_futex_timed_wait, lll_futex_wake): Add private argument,
use __lll_private_flag macro.
(lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
__lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 04ac006..5f08673 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -36,34 +36,63 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
+
+/* Values for 'private' parameter of locking macros. Yes, the
+ definition seems to be backwards. But it is not. The bit will be
+ reversed before passing to the system call. */
+#define LLL_PRIVATE 0
+#define LLL_SHARED FUTEX_PRIVATE_FLAG
+
+
+#if !defined NOT_IN_libc || defined IS_IN_rtld
+/* In libc.so or ld.so all futexes are private. */
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ ((fl) | FUTEX_PRIVATE_FLAG)
+# else
+# define __lll_private_flag(fl, private) \
+ ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
+# endif
+#else
+# ifdef __ASSUME_PRIVATE_FUTEX
+# define __lll_private_flag(fl, private) \
+ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
+# else
+# define __lll_private_flag(fl, private) \
+ (__builtin_constant_p (private) \
+ ? ((private) == 0 \
+ ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
+ : (fl)) \
+ : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
+ & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
+# endif
+#endif
+
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
-#define lll_futex_wait(futexp, val) \
- ({ \
- INTERNAL_SYSCALL_DECL (__err); \
- long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
- })
+#define lll_futex_wait(futexp, val, private) \
+ lll_futex_timed_wait (futexp, val, NULL, private)
-#define lll_futex_timed_wait(futexp, val, timespec) \
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAIT, private), \
+ (val), (timespec)); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
-#define lll_futex_wake(futexp, nr) \
+#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
+ __lll_private_flag (FUTEX_WAKE, private), \
+ (nr), 0); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
@@ -72,7 +101,7 @@
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1); \
+ lll_futex_wake (__futexp, 1, LLL_SHARED); \
} \
while (0)
@@ -198,7 +227,7 @@ __lll_mutex_unlock (int *futex)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, LLL_SHARED);
}
#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
@@ -208,7 +237,7 @@ __lll_robust_mutex_unlock (int *futex, int mask)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, LLL_SHARED);
}
#define lll_robust_mutex_unlock(futex) \
__lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
@@ -218,7 +247,7 @@ static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (int *futex)
{
(void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, LLL_SHARED);
}
#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
@@ -252,10 +281,10 @@ typedef int lll_lock_t;
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid, LLL_SHARED); \
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b54437c2f4f116442a52861100339aa36783f8f
commit 2b54437c2f4f116442a52861100339aa36783f8f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 19:31:17 2007 +0000
(clear_once_control, __pthread_once): Add LLL_PRIVATE as last argument
to lll_futex_*.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
index 79a3c47..0e7e979 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ clear_once_control (void *arg)
pthread_once_t *once_control = (pthread_once_t *) arg;
*once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
}
int
@@ -72,7 +72,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
break;
/* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, oldval);
+ lll_futex_wait (once_control, oldval, LLL_PRIVATE);
}
/* This thread is the first here. Do the initialization.
@@ -88,7 +88,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
atomic_increment (once_control);
/* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
+ lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83ab449d4156bb3d1c0e0ce22113164dad4cf151
commit 83ab449d4156bb3d1c0e0ce22113164dad4cf151
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 19:30:20 2007 +0000
Replace lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 388a399..e77b1ff 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -131,7 +131,7 @@ typedef struct
= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
THREAD_GSCOPE_FLAG_UNUSED); \
if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
} \
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=391da2016b6daffbb764589bc1e64cd10820249a
commit 391da2016b6daffbb764589bc1e64cd10820249a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 13 12:48:34 2007 +0000
2007-07-13 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]:
Define __WORDSIZE_COMPAT32 as 1.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 32e0580..43aadf8 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-07-13 Carlos O'Donell <carlos@codesourcery.com>
+
+ * sysdeps/mips/bits/wordsize.h [_MIPS_SIM == _ABI64]:
+ Define __WORDSIZE_COMPAT32 as 1.
+
2007-07-13 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from
diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h
index 666c7ad..06967e5 100644
--- a/sysdeps/mips/bits/wordsize.h
+++ b/sysdeps/mips/bits/wordsize.h
@@ -17,3 +17,6 @@
02111-1307 USA. */
#define __WORDSIZE _MIPS_SZPTR
+#if _MIPS_SIM == _ABI64
+# define __WORDSIZE_COMPAT32 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9f19437e2da14c26d964d19e3f945229825dd00
commit e9f19437e2da14c26d964d19e3f945229825dd00
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 13 12:46:28 2007 +0000
Update date.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 619866e..c775ee0 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,4 +1,4 @@
-2007-06-07 Steven Munroe <sjmunroe@us.ibm.com>
+2007-07-13 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b4095f39492ea7788110960273e209d190ca3c2
commit 2b4095f39492ea7788110960273e209d190ca3c2
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 13 12:46:12 2007 +0000
2007-07-13 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from
libc/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h. Increase
PTHREAD_STACK_MIN.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 3ea63cd..32e0580 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2007-07-13 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h: Copy from
+ libc/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h. Increase
+ PTHREAD_STACK_MIN.
+
2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix.
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h
new file mode 100644
index 0000000..4c3f5f6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/local_lim.h
@@ -0,0 +1,93 @@
+/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
+ Copyright (C) 1993-1998,2000,2002,2003,2004,2007
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The kernel header pollutes the namespace with the NR_OPEN symbol
+ and defines LINK_MAX although filesystems have different maxima. A
+ similar thing is true for OPEN_MAX: the limit can be changed at
+ runtime and therefore the macro must not be defined. Remove this
+ after including the header if necessary. */
+#ifndef NR_OPEN
+# define __undef_NR_OPEN
+#endif
+#ifndef LINK_MAX
+# define __undef_LINK_MAX
+#endif
+#ifndef OPEN_MAX
+# define __undef_OPEN_MAX
+#endif
+
+/* The kernel sources contain a file with all the needed information. */
+#include <linux/limits.h>
+
+/* Have to remove NR_OPEN? */
+#ifdef __undef_NR_OPEN
+# undef NR_OPEN
+# undef __undef_NR_OPEN
+#endif
+/* Have to remove LINK_MAX? */
+#ifdef __undef_LINK_MAX
+# undef LINK_MAX
+# undef __undef_LINK_MAX
+#endif
+/* Have to remove OPEN_MAX? */
+#ifdef __undef_OPEN_MAX
+# undef OPEN_MAX
+# undef __undef_OPEN_MAX
+#endif
+
+/* The number of data keys per process. */
+#define _POSIX_THREAD_KEYS_MAX 128
+/* This is the value this implementation supports. */
+#define PTHREAD_KEYS_MAX 1024
+
+/* Controlling the iterations of destructors for thread-specific data. */
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
+/* Number of iterations this implementation does. */
+#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
+
+/* The number of threads per process. */
+#define _POSIX_THREAD_THREADS_MAX 64
+/* We have no predefined limit on the number of threads. */
+#undef PTHREAD_THREADS_MAX
+
+/* Maximum amount by which a process can descrease its asynchronous I/O
+ priority level. */
+#define AIO_PRIO_DELTA_MAX 20
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072
+
+/* Maximum number of timer expiration overruns. */
+#define DELAYTIMER_MAX 2147483647
+
+/* Maximum tty name length. */
+#define TTY_NAME_MAX 32
+
+/* Maximum login name length. This is arbitrary. */
+#define LOGIN_NAME_MAX 256
+
+/* Maximum host name length. */
+#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX (2147483647)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19584095cc78af7b4911f4957d3215d631283cf3
commit 19584095cc78af7b4911f4957d3215d631283cf3
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jul 13 12:43:40 2007 +0000
* sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 1ea6746..619866e 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,7 @@
+2007-06-07 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/powerpc/nofpu/Makefile: Remove fe_nomask from libm-support.
+
2007-05-23 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable
diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
index c91acd9..6bdff45 100644
--- a/sysdeps/powerpc/nofpu/Makefile
+++ b/sysdeps/powerpc/nofpu/Makefile
@@ -6,7 +6,7 @@ sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
endif
ifeq ($(subdir),math)
-libm-support += fenv_const fe_nomask
+libm-support += fenv_const
CPPFLAGS += -I../soft-fp/
# The follow CFLAGS are a work around for GCC Bugzilla Bug 29253
# "expand_abs wrong default code for floating point"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8323b1abc6a9f7a4a2458be35bd4cc941da725af
commit 8323b1abc6a9f7a4a2458be35bd4cc941da725af
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jul 10 13:35:30 2007 +0000
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
lll_private_futex_wake.
* sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic version.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
(pthread_cancel_init): Add noinline and barriers.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
(__lll_timedlock_wait): Update call to lll_futex_timed_wait.
(__lll_timedwait_tid): Likewise.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (LLL_PRIVATE,
LLL_SHARED): Define.
(lll_futex_wait): Use lll_futex_timed_wait.
(lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Take a
PRIVATE argument.
(lll_private_futex_wait, lll_private_futex_timed_wait,
lll_private_futex_wake): New.
(lll_robust_mutex_dead, __lll_mutex_lock, __lll_mutex_cond_lock,
__lll_mutex_unlock, __lll_robust_mutex_unlock,
__lll_mutex_unlock_force, lll_wait_tid): Update calls.
* sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c (clear_once_control,
__pthread_once): Use private futexes.
* sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
(pthread_cancel_init): Add noinline and barriers.
* sysdeps/unix/sysv/aix/bits/fcntl.h,
sysdeps/unix/sysv/linux/am33/bits/fcntl.h,
sysdeps/unix/sysv/linux/arm/bits/fcntl.h,
sysdeps/unix/sysv/linux/cris/bits/fcntl.h,
sysdeps/unix/sysv/linux/m68k/bits/fcntl.h,
sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix.
* sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h (SEM_VALUE_MAX):
Delete.
* sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h (SEM_VALUE_MAX):
Delete.
diff --git a/ChangeLog.aix b/ChangeLog.aix
index 5305d33..3e3e4df 100644
--- a/ChangeLog.aix
+++ b/ChangeLog.aix
@@ -1,3 +1,7 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/aix/bits/fcntl.h: Comment fix.
+
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index f794cc5..c10f8d0 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,7 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Comment fix.
+
2006-01-12 Roland McGrath <roland@redhat.com>
* sysdeps/am33/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 39e14dc..5a24c54 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,33 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_RESET_FLAG): Use
+ lll_private_futex_wake.
+ * sysdeps/unix/sysv/linux/arm/check_pf.c: Update from generic version.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+ (pthread_cancel_init): Add noinline and barriers.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+ (__lll_timedlock_wait): Update call to lll_futex_timed_wait.
+ (__lll_timedwait_tid): Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (LLL_PRIVATE,
+ LLL_SHARED): Define.
+ (lll_futex_wait): Use lll_futex_timed_wait.
+ (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Take a
+ PRIVATE argument.
+ (lll_private_futex_wait, lll_private_futex_timed_wait,
+ lll_private_futex_wake): New.
+ (lll_robust_mutex_dead, __lll_mutex_lock, __lll_mutex_cond_lock,
+ __lll_mutex_unlock, __lll_robust_mutex_unlock,
+ __lll_mutex_unlock_force, lll_wait_tid): Update calls.
+ * sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c (clear_once_control,
+ __pthread_once): Use private futexes.
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+ (pthread_cancel_init): Add noinline and barriers.
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Comment fix.
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h (SEM_VALUE_MAX):
+ Delete.
+
2007-06-06 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
diff --git a/ChangeLog.cris b/ChangeLog.cris
index af91a1d..746c89c 100644
--- a/ChangeLog.cris
+++ b/ChangeLog.cris
@@ -1,3 +1,7 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/cris/bits/fcntl.h: Comment fix.
+
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 51f6dfa..fb591ad 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,7 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Comment fix.
+
2006-11-28 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6)
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 346237f..3ea63cd 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,10 @@
+2007-07-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Comment fix.
+
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h (SEM_VALUE_MAX):
+ Delete.
+
2007-06-07 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New.
diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h
index ae2aecc..e80b6b8 100644
--- a/sysdeps/arm/nptl/tls.h
+++ b/sysdeps/arm/nptl/tls.h
@@ -142,7 +142,7 @@ typedef struct
= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
THREAD_GSCOPE_FLAG_UNUSED); \
if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
} \
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
index c65b8be..d53c0f7 100644
--- a/sysdeps/unix/sysv/aix/bits/fcntl.h
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -79,7 +79,7 @@
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
index 4c276c5..f2c88fa 100644
--- a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
@@ -94,7 +94,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 7c7b7c2..59539e1 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -98,7 +98,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c
index ee13d80..dfca75d 100644
--- a/sysdeps/unix/sysv/linux/arm/check_pf.c
+++ b/sysdeps/unix/sysv/linux/arm/check_pf.c
@@ -1,5 +1,5 @@
-/* Determine protocol families for which interfaces exist. ARM Linux version.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+/* Determine protocol families for which interfaces exist. Linux version.
+ Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -69,17 +69,38 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
memset (&nladdr, '\0', sizeof (nladdr));
nladdr.nl_family = AF_NETLINK;
+#ifdef PAGE_SIZE
+ /* Help the compiler optimize out the malloc call if PAGE_SIZE
+ is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
+ const size_t buf_size = PAGE_SIZE;
+#else
+ const size_t buf_size = __getpagesize ();
+#endif
+ bool use_malloc = false;
+ char *buf;
+
+ if (__libc_use_alloca (buf_size))
+ buf = alloca (buf_size);
+ else
+ {
+ buf = malloc (buf_size);
+ if (buf != NULL)
+ use_malloc = true;
+ else
+ goto out_fail;
+ }
+
+ struct iovec iov = { buf, buf_size };
+
if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
(struct sockaddr *) &nladdr,
sizeof (nladdr))) < 0)
- return -1;
+ goto out_fail;
*seen_ipv4 = false;
*seen_ipv6 = false;
bool done = false;
- char buf[4096];
- struct iovec iov = { buf, sizeof (buf) };
struct in6ailist
{
struct in6addrinfo info;
@@ -99,10 +120,10 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
if (read_len < 0)
- return -1;
+ goto out_fail;
if (msg.msg_flags & MSG_TRUNC)
- return -1;
+ goto out_fail;
struct nlmsghdr *nlmh;
for (nlmh = (struct nlmsghdr *) buf;
@@ -116,40 +137,72 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
if (nlmh->nlmsg_type == RTM_NEWADDR)
{
struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh);
+ struct rtattr *rta = IFA_RTA (ifam);
+ size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam));
switch (ifam->ifa_family)
{
+ const void *local;
+ const void *address;
+
case AF_INET:
- *seen_ipv4 = true;
+ local = NULL;
+ address = NULL;
+ while (RTA_OK (rta, len))
+ {
+ switch (rta->rta_type)
+ {
+ case IFA_LOCAL:
+ local = RTA_DATA (rta);
+ break;
+
+ case IFA_ADDRESS:
+ address = RTA_DATA (rta);
+ goto out_v4;
+ }
+
+ rta = RTA_NEXT (rta, len);
+ }
+
+ if (local != NULL)
+ {
+ out_v4:
+ if (*(const in_addr_t *) (address ?: local)
+ != htonl (INADDR_LOOPBACK))
+ *seen_ipv4 = true;
+ }
break;
+
case AF_INET6:
- *seen_ipv6 = true;
+ local = NULL;
+ address = NULL;
+ while (RTA_OK (rta, len))
+ {
+ switch (rta->rta_type)
+ {
+ case IFA_LOCAL:
+ local = RTA_DATA (rta);
+ break;
+
+ case IFA_ADDRESS:
+ address = RTA_DATA (rta);
+ goto out_v6;
+ }
+
+ rta = RTA_NEXT (rta, len);
+ }
+
+ if (local != NULL)
+ {
+ out_v6:
+ if (!IN6_IS_ADDR_LOOPBACK (address ?: local))
+ *seen_ipv6 = true;
+ }
if (ifam->ifa_flags & (IFA_F_DEPRECATED
| IFA_F_TEMPORARY
| IFA_F_HOMEADDRESS))
{
- struct rtattr *rta = IFA_RTA (ifam);
- size_t len = (nlmh->nlmsg_len
- - NLMSG_LENGTH (sizeof (*ifam)));
- void *local = NULL;
- void *address = NULL;
- while (RTA_OK (rta, len))
- {
- switch (rta->rta_type)
- {
- case IFA_LOCAL:
- local = RTA_DATA (rta);
- break;
-
- case IFA_ADDRESS:
- address = RTA_DATA (rta);
- break;
- }
-
- rta = RTA_NEXT (rta, len);
- }
-
struct in6ailist *newp = alloca (sizeof (*newp));
newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
? in6ai_deprecated : 0)
@@ -180,11 +233,11 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
close_not_cancel_no_status (fd);
- if (in6ailist != NULL)
+ if (*seen_ipv6 && in6ailist != NULL)
{
*in6ai = malloc (in6ailistlen * sizeof (**in6ai));
if (*in6ai == NULL)
- return -1;
+ goto out_fail;
*in6ailen = in6ailistlen;
@@ -196,7 +249,14 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
while (in6ailist != NULL);
}
+ if (use_malloc)
+ free (buf);
return 0;
+
+out_fail:
+ if (use_malloc)
+ free (buf);
+ return -1;
}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
index ca1cc8d..24ce61b 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -30,13 +30,18 @@ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
void
+__attribute_noinline__
pthread_cancel_init (void)
{
void *resume, *personality, *forcedunwind, *getcfa;
void *handle;
if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
- return;
+ {
+ /* Force gcc to reload all values. */
+ asm volatile ("" ::: "memory");
+ return;
+ }
handle = __libc_dlopen ("libgcc_s.so.1");
@@ -55,6 +60,10 @@ pthread_cancel_init (void)
libgcc_s_resume = resume;
libgcc_s_personality = personality;
libgcc_s_forcedunwind = forcedunwind;
+ /* Make sure libgcc_s_getcfa is written last. Otherwise,
+ pthread_cancel_init might return early even when the pointer the
+ caller is interested in is not initialized yet. */
+ atomic_write_barrier ();
libgcc_s_getcfa = getcfa;
}
@@ -92,6 +101,7 @@ __gcc_personality_v0 (_Unwind_State state,
{
if (__builtin_expect (libgcc_s_personality == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_personality (state, ue_header, context);
}
@@ -101,6 +111,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
{
if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_forcedunwind (exc, stop, stop_argument);
}
@@ -109,5 +120,6 @@ _Unwind_GetCFA (struct _Unwind_Context *context)
{
if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_getcfa (context);
}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
index 3fc647d..dadfac2 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,9 +27,6 @@
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
-
typedef union
{
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
index 66a4d7b..44867ec 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
@@ -55,7 +55,8 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
if (rt.tv_sec < 0)
return ETIMEDOUT;
- lll_futex_timed_wait (futex, 2, &rt);
+ // XYZ: Lost the lock to check whether it was private.
+ lll_futex_timed_wait (futex, 2, &rt, LLL_SHARED);
}
while (atomic_exchange_acq (futex, 2) != 0);
@@ -96,7 +97,8 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
return ETIMEDOUT;
/* Wait until thread terminates. */
- if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
+ // XYZ: Lost the lock to check whether it was private.
+ if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
return ETIMEDOUT;
}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 15cf147..468fe71 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -12,7 +12,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Libr \ary; if not, write to the Free
+ License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
@@ -36,42 +36,87 @@
#define FUTEX_TRYLOCK_PI 8
#define FUTEX_PRIVATE_FLAG 128
+/* Values for 'private' parameter of locking macros. Yes, the
+ definition seems to be backwards. But it is not. The bit will be
+ reversed before passing to the system call. */
+#define LLL_PRIVATE 0
+#define LLL_SHARED FUTEX_PRIVATE_FLAG
+
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
-#define lll_futex_wait(futexp, val) \
+#define lll_futex_wait(futexp, val, private) \
+ lll_futex_timed_wait(futexp, val, NULL, private)
+
+#define lll_futex_timed_wait(futexp, val, timespec, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), 0); \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
__ret; \
})
-#define lll_futex_timed_wait(futexp, val, timespec) \
+#define lll_futex_wake(futexp, nr, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
+ (futexp), FUTEX_WAKE, (nr), 0); \
__ret; \
})
-#define lll_futex_wake(futexp, nr) \
+#define lll_private_futex_wait(futexp, val) \
+ lll_private_futex_timed_wait(futexp, val, NULL)
+
+#ifdef __ASSUME_PRIVATE_FUTEX
+#define lll_private_futex_timed_wait(futexp, val, timespec) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
+ (futexp), FUTEX_WAIT | FUTEX_PRIVATE_FLAG, \
+ (val), (timespec)); \
+ __ret; \
+ })
+
+#define lll_private_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE | FUTEX_PRIVATE_FLAG, \
+ (nr), (0)); \
+ __ret; \
+ })
+#else
+#define lll_private_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret, __op; \
+ __op = FUTEX_WAIT | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), __op, (val), (timespec)); \
+ __ret; \
+ })
+
+#define lll_private_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret, __op; \
+ __op = FUTEX_WAKE | THREAD_GETMEM (THREAD_SELF, header.private_futex); \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), __op, (nr), 0); \
__ret; \
})
+#endif
#define lll_robust_mutex_dead(futexv) \
do \
{ \
int *__futexp = &(futexv); \
atomic_or (__futexp, FUTEX_OWNER_DIED); \
- lll_futex_wake (__futexp, 1); \
+ lll_futex_wake (__futexp, 1, 0); \
} \
while (0)
@@ -88,7 +133,7 @@
/* Returns non-zero if error happened, zero if success. */
-#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
@@ -156,7 +201,7 @@ __lll_mutex_lock (int *futex)
if (__builtin_expect (val != 0, 0))
{
while (atomic_exchange_acq (futex, 2) != 0)
- lll_futex_wait (futex, 2);
+ lll_futex_wait (futex, 2, 0);
}
}
#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
@@ -182,7 +227,7 @@ __lll_mutex_cond_lock (int *futex)
if (__builtin_expect (val != 0, 0))
{
while (atomic_exchange_acq (futex, 2) != 0)
- lll_futex_wait (futex, 2);
+ lll_futex_wait (futex, 2, 0);
}
}
#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
@@ -229,7 +274,7 @@ __lll_mutex_unlock (int *futex)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
@@ -239,7 +284,7 @@ __lll_robust_mutex_unlock (int *futex, int mask)
{
int val = atomic_exchange_rel (futex, 0);
if (__builtin_expect (val & mask, 0))
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_robust_mutex_unlock(futex) \
__lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
@@ -249,7 +294,7 @@ static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (int *futex)
{
(void) atomic_exchange_rel (futex, 0);
- lll_futex_wake (futex, 1);
+ lll_futex_wake (futex, 1, 0);
}
#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
@@ -286,7 +331,7 @@ typedef int lll_lock_t;
do { \
__typeof (tid) __tid; \
while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
+ lll_futex_wait (&(tid), __tid, 0);\
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
index c892581..909e832 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
@@ -27,7 +27,7 @@ clear_once_control (void *arg)
pthread_once_t *once_control = (pthread_once_t *) arg;
*once_control = 0;
- lll_futex_wake (once_control, INT_MAX);
+ lll_private_futex_wake (once_control, INT_MAX);
}
int
@@ -66,7 +66,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
break;
/* Same generation, some other thread was faster. Wait. */
- lll_futex_wait (once_control, oldval);
+ lll_private_futex_wait (once_control, oldval);
}
/* This thread is the first here. Do the initialization.
@@ -82,7 +82,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
*once_control = __fork_generation | 2;
/* Wake up all other threads. */
- lll_futex_wake (once_control, INT_MAX);
+ lll_private_futex_wake (once_control, INT_MAX);
return 0;
}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
index ba5327a..b281963 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -33,6 +33,7 @@ static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *);
static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *);
void
+__attribute_noinline__
pthread_cancel_init (void)
{
void *resume, *personality, *forcedunwind, *getcfa;
@@ -40,7 +41,11 @@ pthread_cancel_init (void)
void *sjlj_register, *sjlj_unregister;
if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
- return;
+ {
+ /* Force gcc to reload all values. */
+ asm volatile ("" ::: "memory");
+ return;
+ }
handle = __libc_dlopen ("libgcc_s.so.1");
@@ -58,9 +63,13 @@ pthread_cancel_init (void)
libgcc_s_resume = resume;
libgcc_s_personality = personality;
libgcc_s_forcedunwind = forcedunwind;
- libgcc_s_getcfa = getcfa;
libgcc_s_sjlj_register = sjlj_register;
libgcc_s_sjlj_unregister = sjlj_unregister;
+ /* Make sure libgcc_s_getcfa is written last. Otherwise,
+ pthread_cancel_init might return early even when the pointer the
+ caller is interested in is not initialized yet. */
+ atomic_write_barrier ();
+ libgcc_s_getcfa = getcfa;
}
void
@@ -68,6 +77,7 @@ _Unwind_Resume (struct _Unwind_Exception *exc)
{
if (__builtin_expect (libgcc_s_resume == NULL, 0))
pthread_cancel_init ();
+
libgcc_s_resume (exc);
}
@@ -79,6 +89,7 @@ __gcc_personality_v0 (int version, _Unwind_Action actions,
{
if (__builtin_expect (libgcc_s_personality == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_personality (version, actions, exception_class,
ue_header, context);
}
@@ -89,6 +100,7 @@ _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
{
if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_forcedunwind (exc, stop, stop_argument);
}
@@ -97,6 +109,7 @@ _Unwind_GetCFA (struct _Unwind_Context *context)
{
if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
pthread_cancel_init ();
+
return libgcc_s_getcfa (context);
}
@@ -105,6 +118,7 @@ _Unwind_SjLj_Register (struct SjLj_Function_Context *fc)
{
if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0))
pthread_cancel_init ();
+
libgcc_s_sjlj_register (fc);
}
@@ -113,5 +127,6 @@ _Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc)
{
if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0))
pthread_cancel_init ();
+
libgcc_s_sjlj_unregister (fc);
}
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 36799aa..270a8de 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -96,7 +96,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 90c0a48..733a088 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -95,7 +95,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index d40b4b6..3404663 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -101,7 +101,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* For F_[GET|SET]FL. */
+/* For F_[GET|SET]FD. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h
index c4440f9..af43a60 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,9 +29,6 @@
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
-
typedef union
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8955bf40901b7e785cfbe44ec83313fe9da61c6
commit e8955bf40901b7e785cfbe44ec83313fe9da61c6
Author: Jeff Bailey <jbailey@raspberryginger.com>
Date: Sat Jun 16 16:36:53 2007 +0000
2006-07-16 Jeff Bailey <jbailey@raspberryginger.com>
* sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't
include asm/elf.h. Declare elf_greg_t, elf_gregset_t,
elf_fpreg_t, and elf_fpregset_t.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 541cb9b..967dadf 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2006-07-16 Jeff Bailey <jbailey@raspberryginger.com>
+
+ * sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't
+ include asm/elf.h. Declare elf_greg_t, elf_gregset_t,
+ elf_fpreg_t, and elf_fpregset_t.
+
2007-06-16 Jeff Bailey <jbailey@raspberryginger.com>
* sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
index 2e6d109..ca35489 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,10 +34,18 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+typedef unsigned long elf_greg_t;
+#define ELF_NGREG 80 /* We only need 64 at present, but leave space
+ for expansion. */
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+#define ELF_NFPREG 32
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
struct elf_siginfo
{
int si_signo; /* Signal number. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=370d74b5df15639950c320d23ee61769fef46e42
commit 370d74b5df15639950c320d23ee61769fef46e42
Author: Jeff Bailey <jbailey@raspberryginger.com>
Date: Sat Jun 16 15:38:21 2007 +0000
2007-06-16 Jeff Bailey <jbailey@raspberryginger.com>
* sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require
at least kernel 2.6.9.
* sysdeps/unix/sysv/linux/hppa/nptl/configure: Rebuilt.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 3ee76d9..541cb9b 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2007-06-16 Jeff Bailey <jbailey@raspberryginger.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Require
+ at least kernel 2.6.9.
+ * sysdeps/unix/sysv/linux/hppa/nptl/configure: Rebuilt.
+
2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure b/sysdeps/unix/sysv/linux/hppa/nptl/configure
new file mode 100644
index 0000000..a418c54
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/configure
@@ -0,0 +1,5 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl.
+
+# Needed for LWS CAS
+arch_minimum_kernel=2.6.9
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/configure.in b/sysdeps/unix/sysv/linux/hppa/nptl/configure.in
new file mode 100644
index 0000000..1c7102e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/configure.in
@@ -0,0 +1,5 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl.
+
+# Needed for LWS CAS
+arch_minimum_kernel=2.6.9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a34f2176e57b9e56302f44521a8718f9619bfa24
commit a34f2176e57b9e56302f44521a8718f9619bfa24
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 8 02:47:50 2007 +0000
Adjust use of lll_futex_* macros.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 64ddcd5..388a399 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -131,7 +131,7 @@ typedef struct
= atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
THREAD_GSCOPE_FLAG_UNUSED); \
if (__res == THREAD_GSCOPE_FLAG_WAIT) \
- lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ lll_private_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
} \
while (0)
#define THREAD_GSCOPE_SET_FLAG() \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ffd3982334fb2ce907d8741080ad93dbc7a466fb
commit ffd3982334fb2ce907d8741080ad93dbc7a466fb
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Jun 7 14:40:24 2007 +0000
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New.
(internal_syscall1, internal_syscall2, internal_syscall3,
internal_syscall4, internal_syscall5, internal_syscall6): Use it.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index a99e165..346237f 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2007-06-07 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ARGIFY): New.
+ (internal_syscall1, internal_syscall2, internal_syscall3,
+ internal_syscall4, internal_syscall5, internal_syscall6): Use it.
+
2007-06-06 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index d263598..b15d280 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -44,6 +44,10 @@
#else /* ! __ASSEMBLER__ */
+/* Convert X to a long long, without losing any bits if it is one
+ already or warning if it is a 32-bit pointer. */
+#define ARGIFY(X) ((long long) (__typeof__ ((X) - (X))) (X))
+
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -102,7 +106,7 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -124,8 +128,8 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
+ register long long __a1 asm("$5") = ARGIFY (arg2); \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -147,9 +151,9 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
+ register long long __a1 asm("$5") = ARGIFY (arg2); \
+ register long long __a2 asm("$6") = ARGIFY (arg3); \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
@@ -171,10 +175,10 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
- register long long __a3 asm("$7") = (long long) arg4; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
+ register long long __a1 asm("$5") = ARGIFY (arg2); \
+ register long long __a2 asm("$6") = ARGIFY (arg3); \
+ register long long __a3 asm("$7") = ARGIFY (arg4); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
@@ -195,11 +199,11 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
- register long long __a3 asm("$7") = (long long) arg4; \
- register long long __a4 asm("$8") = (long long) arg5; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
+ register long long __a1 asm("$5") = ARGIFY (arg2); \
+ register long long __a2 asm("$6") = ARGIFY (arg3); \
+ register long long __a3 asm("$7") = ARGIFY (arg4); \
+ register long long __a4 asm("$8") = ARGIFY (arg5); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
@@ -220,12 +224,12 @@
\
{ \
register long long __v0 asm("$2") ncs_init; \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
- register long long __a3 asm("$7") = (long long) arg4; \
- register long long __a4 asm("$8") = (long long) arg5; \
- register long long __a5 asm("$9") = (long long) arg6; \
+ register long long __a0 asm("$4") = ARGIFY (arg1); \
+ register long long __a1 asm("$5") = ARGIFY (arg2); \
+ register long long __a2 asm("$6") = ARGIFY (arg3); \
+ register long long __a3 asm("$7") = ARGIFY (arg4); \
+ register long long __a4 asm("$8") = ARGIFY (arg5); \
+ register long long __a5 asm("$9") = ARGIFY (arg6); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
cs_init \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30efab519e242a2c8f4894a7259a2ffbd5f3827a
commit 30efab519e242a2c8f4894a7259a2ffbd5f3827a
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Jun 6 17:27:04 2007 +0000
* sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
(THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
THREAD_GSCOPE_WAIT): Define.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
(lll_unlock_wake_cb): Delete.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
(FUTEX_PRIVATE_FLAG): Define.
(lll_unlock_wake_cb): Delete prototype.
* sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include
<endian.h>.
(pthread_rwlock_t): Shrink __flags and add __shared.
* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
(RTLD_SINGLE_THREAD_P): Define.
* sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
(THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
THREAD_GSCOPE_WAIT): Define.
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
(FUTEX_PRIVATE_FLAG): Define.
(lll_unlock_wake_cb): Delete prototype.
* sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include
<endian.h>.
(pthread_rwlock_t): Shrink __flags and add __shared.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e733cb6..39e14dc 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,20 @@
+2007-06-06 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+ (lll_unlock_wake_cb): Delete.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+ (RTLD_SINGLE_THREAD_P): Define.
+
2007-05-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 34e2561..a99e165 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,16 @@
+2007-06-06 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/mips/nptl/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
+ THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT): Define.
+ (THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
+ THREAD_GSCOPE_WAIT): Define.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+ (FUTEX_PRIVATE_FLAG): Define.
+ (lll_unlock_wake_cb): Delete prototype.
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h: Include
+ <endian.h>.
+ (pthread_rwlock_t): Shrink __flags and add __shared.
+
2007-05-24 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h
index 26ef709..ae2aecc 100644
--- a/sysdeps/arm/nptl/tls.h
+++ b/sysdeps/arm/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/ARM version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -132,6 +132,29 @@ typedef struct
is not available. */
#define TLS_INIT_TP_EXPENSIVE 1
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h
index 1cef161..dbe806a 100644
--- a/sysdeps/mips/nptl/tls.h
+++ b/sysdeps/mips/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/MIPS version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -156,6 +156,29 @@ typedef struct
different value to mean unset l_tls_offset. */
# define NO_TLS_OFFSET -1
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
index ea8d6a2..e1b115c 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
@@ -19,6 +19,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+#include <endian.h>
+
#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_MUTEX_T 24
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
@@ -126,9 +128,21 @@ typedef union
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+#else
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
index e0643a9..66a4d7b 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
@@ -1,5 +1,5 @@
/* low level locking for pthread library. Generic futex-using version.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,21 +63,9 @@ __lll_timedlock_wait (int *futex, const struct timespec *abstime)
}
-/* These don't get included in libc.so */
+/* This function doesn't get included in libc.so */
#ifdef IS_IN_libpthread
int
-lll_unlock_wake_cb (int *futex)
-{
- int val = atomic_exchange_rel (futex, 0);
-
- if (__builtin_expect (val > 1, 0))
- lll_futex_wake (futex, 1);
-
- return 0;
-}
-
-
-int
__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
{
int tid;
@@ -114,5 +102,4 @@ __lll_timedwait_tid (int *tidp, const struct timespec *abstime)
return 0;
}
-
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 4bae953..15cf147 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -267,8 +268,6 @@ typedef int lll_lock_t;
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
/* The states of a lock are:
0 - untaken
1 - taken by one user
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
index a44ee95..3fb2186 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
@@ -126,3 +126,9 @@ extern int __local_multiple_threads attribute_hidden;
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
index eda0a2f..166a6c6 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -20,6 +20,8 @@
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
+#include <endian.h>
+
#if _MIPS_SIM == _ABI64
# define __SIZEOF_PTHREAD_ATTR_T 56
# define __SIZEOF_PTHREAD_MUTEX_T 40
@@ -157,9 +159,9 @@ typedef union
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
- int __pad1;
+ int __shared;
+ unsigned long int __pad1;
unsigned long int __pad2;
- unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
@@ -173,9 +175,21 @@ typedef union
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
+ unsigned char __flags;
+#else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
int __writer;
} __data;
# endif
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 36a20f1..4542e5b 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +35,7 @@
#define FUTEX_LOCK_PI 6
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_PRIVATE_FLAG 128
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -234,8 +235,6 @@ typedef int lll_lock_t;
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
/* The states of a lock are:
0 - untaken
1 - taken by one user
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3d5bc25404ba37d81fd19f827fa3da06e189861
commit d3d5bc25404ba37d81fd19f827fa3da06e189861
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 30 04:44:55 2007 +0000
Remove all traces of lll_unlock_wake_cb.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 58b4806..04ac006 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -237,8 +237,6 @@ typedef int lll_lock_t;
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
-
/* The states of a lock are:
0 - untaken
1 - taken by one user
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f02480c593ca9b68f0a548d53366e5ad71c38e8
commit 6f02480c593ca9b68f0a548d53366e5ad71c38e8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 28 16:40:52 2007 +0000
(THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
THREAD_GSCOPE_WAIT): Define.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index be2430f..64ddcd5 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/Alpha version.
- Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -121,6 +121,29 @@ typedef struct
#define THREAD_SETMEM_NC(descr, member, idx, value) \
descr->member[idx] = (value)
+/* Get and set the global scope generation counter in struct pthread. */
+#define THREAD_GSCOPE_FLAG_UNUSED 0
+#define THREAD_GSCOPE_FLAG_USED 1
+#define THREAD_GSCOPE_FLAG_WAIT 2
+#define THREAD_GSCOPE_RESET_FLAG() \
+ do \
+ { int __res \
+ = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
+ THREAD_GSCOPE_FLAG_UNUSED); \
+ if (__res == THREAD_GSCOPE_FLAG_WAIT) \
+ lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_SET_FLAG() \
+ do \
+ { \
+ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
+ atomic_write_barrier (); \
+ } \
+ while (0)
+#define THREAD_GSCOPE_WAIT() \
+ GL(dl_wait_lookup_done) ()
+
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92fa63ee309705aab0d8ef00807e9a6212460cf8
commit 92fa63ee309705aab0d8ef00807e9a6212460cf8
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu May 24 16:18:27 2007 +0000
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
(posix_fadvise): Fix high word of len argument.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 3ef0903..34e2561 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-05-24 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
+ (posix_fadvise): Fix high word of len argument.
+
2007-05-23 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
index 24cbdf2..04c952d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
+++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
@@ -31,7 +31,7 @@ posix_fadvise (int fd, off_t offset, off_t len, int advise)
INTERNAL_SYSCALL_DECL (err);
int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0,
__LONG_LONG_PAIR (offset >> 31, offset),
- __LONG_LONG_PAIR (offset >> 31, len),
+ __LONG_LONG_PAIR (len >> 31, len),
advise);
if (INTERNAL_SYSCALL_ERROR_P (ret, err))
return INTERNAL_SYSCALL_ERRNO (ret, err);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0012a8520baa9192c6244f9714969e776c10a0ac
commit 0012a8520baa9192c6244f9714969e776c10a0ac
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 17:45:14 2007 +0000
* sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable
exceptions. Use the updated env in fesetenv().
Add libm_hidden_def.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 015c95c..1ea6746 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,9 @@
+2007-05-23 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable
+ exceptions. Use the updated env in fesetenv().
+ Add libm_hidden_def.
+
2007-01-23 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #2749]
diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c
index 786c691..ade9d19 100644
--- a/sysdeps/powerpc/nofpu/feholdexcpt.c
+++ b/sysdeps/powerpc/nofpu/feholdexcpt.c
@@ -1,6 +1,6 @@
/* Store current floating-point environment and clear exceptions
(soft-float edition).
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2007 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -33,11 +33,12 @@ feholdexcept (fenv_t *envp)
u.fenv = *envp;
/* Clear everything except the rounding mode. */
u.l[0] &= 0x3;
-
- /* ?? Should we clear the disabled exceptions as well ?? */
+ /* Disable exceptions */
+ u.l[1] = FE_ALL_EXCEPT;
/* Put the new state in effect. */
- fesetenv (envp);
+ fesetenv (&u.fenv);
return 0;
}
+libm_hidden_def (feholdexcept)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99e5e16c5ca03499787fd0dedc5220ca15ba8401
commit 99e5e16c5ca03499787fd0dedc5220ca15ba8401
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 17:33:17 2007 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later.
* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
(__default_sa_restorer): Rename to __default_sa_restorer_v1.
Don't define if __ASSUME_SIGFRAME_V2.
(__default_rt_sa_restorer): Rename to
__default_rt_sa_restorer_v1. Don't define if
__ASSUME_SIGFRAME_V2.
(__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New.
* sysdeps/unix/sysv/linux/arm/nptl/Versions
(__default_sa_restorer_v1, __default_rt_sa_restorer_v1,
__default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to
GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__]
(__default_sa_restorer_v1, __default_sa_restorer_v2,
__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2):
Declare.
(__default_sa_restorer, __default_rt_sa_restorer): Define as
macros depending on kernel version.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ebad07a..e733cb6 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,25 @@
+2007-05-23 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later.
+ * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+ (__default_sa_restorer): Rename to __default_sa_restorer_v1.
+ Don't define if __ASSUME_SIGFRAME_V2.
+ (__default_rt_sa_restorer): Rename to
+ __default_rt_sa_restorer_v1. Don't define if
+ __ASSUME_SIGFRAME_V2.
+ (__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New.
+ * sysdeps/unix/sysv/linux/arm/nptl/Versions
+ (__default_sa_restorer_v1, __default_rt_sa_restorer_v1,
+ __default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to
+ GLIBC_PRIVATE.
+ * sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__]
+ (__default_sa_restorer_v1, __default_sa_restorer_v2,
+ __default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2):
+ Declare.
+ (__default_sa_restorer, __default_rt_sa_restorer): Define as
+ macros depending on kernel version.
+
2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
index 543d48c..cc06a55 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
@@ -29,24 +29,49 @@
Start the unwind tables at least one instruction before the signal
trampoline, because the unwinder will assume we are returning after
- a call site. */
+ a call site.
+ Because the signal frame layout changed in 2.6.18, we provide two
+ copies of these functions with different unwind information. */
+
+#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #12
nop
-ENTRY(__default_sa_restorer)
+ENTRY(__default_sa_restorer_v1)
+ mov r7, $SYS_ify(sigreturn)
+ swi 0x0
+ .fnend
+#endif
+
+ .fnstart
+ .save {r0-r15}
+ .pad #32
+ nop
+ENTRY(__default_sa_restorer_v2)
mov r7, $SYS_ify(sigreturn)
swi 0x0
.fnend
#ifdef __NR_rt_sigreturn
+#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #168
nop
-ENTRY(__default_rt_sa_restorer)
+ENTRY(__default_rt_sa_restorer_v1)
+ mov r7, $SYS_ify(rt_sigreturn)
+ swi 0x0
+ .fnend
+#endif
+
+ .fnstart
+ .save {r0-r15}
+ .pad #160
+ nop
+ENTRY(__default_rt_sa_restorer_v2)
mov r7, $SYS_ify(rt_sigreturn)
swi 0x0
.fnend
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 5bedfe1..0a6ab21 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -46,4 +46,9 @@
# define __ASSUME_VFORK_SYSCALL 1
#endif
+/* The signal frame layout changed in 2.6.18. */
+#if __LINUX_KERNEL_VERSION >= 132626
+# define __ASSUME_SIGFRAME_V2 1
+#endif
+
#include_next <kernel-features.h>
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Versions b/sysdeps/unix/sysv/linux/arm/nptl/Versions
index c74a06f..435c921 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/Versions
+++ b/sysdeps/unix/sysv/linux/arm/nptl/Versions
@@ -2,5 +2,7 @@ libc {
GLIBC_PRIVATE {
# A copy of sigaction lives in NPTL, and needs these.
__default_sa_restorer; __default_rt_sa_restorer;
+ __default_sa_restorer_v1; __default_rt_sa_restorer_v1;
+ __default_sa_restorer_v2; __default_rt_sa_restorer_v2;
}
}
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 2d890d0..707c0fa 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -36,8 +36,27 @@ int __libc_missing_rt_sigs;
#define SA_RESTORER 0x04000000
+#ifdef __ARM_EABI__
+extern void __default_sa_restorer_v1(void);
+extern void __default_sa_restorer_v2(void);
+extern void __default_rt_sa_restorer_v1(void);
+extern void __default_rt_sa_restorer_v2(void);
+# ifdef __ASSUME_SIGFRAME_V2
+# define __default_sa_restorer __default_sa_restorer_v2
+# define __default_rt_sa_restorer __default_rt_sa_restorer_v2
+# else
+# include <ldsodefs.h>
+# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+ ? __default_sa_restorer_v2 \
+ : __default_sa_restorer_v1)
+# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+ ? __default_rt_sa_restorer_v2 \
+ : __default_rt_sa_restorer_v1)
+# endif
+#else
extern void __default_sa_restorer(void);
extern void __default_rt_sa_restorer(void);
+#endif
/* When RT signals are in use we need to use a different return stub. */
#ifdef __NR_rt_sigreturn
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a30cb832315de0a6dc546d110726ed9952df82e
commit 7a30cb832315de0a6dc546d110726ed9952df82e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 17:26:13 2007 +0000
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file.
* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: New file.
* sysdeps/unix/sysv/linux/mips/mips32/readahead.c: New file.
* sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 2b5754f..3ef0903 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2007-05-23 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: New file.
+
2007-05-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp.
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
new file mode 100644
index 0000000..24cbdf2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+posix_fadvise (int fd, off_t offset, off_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset),
+ __LONG_LONG_PAIR (offset >> 31, len),
+ advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c
new file mode 100644
index 0000000..715d37e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (offset >> 32),
+ (long) offset),
+ __LONG_LONG_PAIR ((long) (len >> 32),
+ (long) len),
+ advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
+
+int
+attribute_compat_text_section
+__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
+{
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
+
+versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
+compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
+#else
+strong_alias (__posix_fadvise64_l64, posix_fadvise64);
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/readahead.c b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
new file mode 100644
index 0000000..b5b967c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/arm/eabi/readahead.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
new file mode 100644
index 0000000..13a21b0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
@@ -0,0 +1,47 @@
+/* Selective file content synch'ing.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#ifdef __NR_sync_file_range
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+ flags);
+}
+#else
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (sync_file_range)
+
+# include <stub-tag.h>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c
new file mode 100644
index 0000000..40bafdb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c
@@ -0,0 +1,56 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
+
+int
+attribute_compat_text_section
+__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
+{
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
+
+versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
+compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
+#else
+strong_alias (__posix_fadvise64_l64, posix_fadvise64);
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
new file mode 100644
index 0000000..babdba0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
@@ -0,0 +1,5 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+readahead - readahead i:iii __readahead readahead
+sync_file_range - sync_file_range i:iiii sync_file_range
+posix_fadvise - fadvise64 i:iiii posix_fadvise
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=384fa30dddabbf1629841fb853fed218a9849380
commit 384fa30dddabbf1629841fb853fed218a9849380
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 17:13:59 2007 +0000
* sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp.
* sysdeps/mips/mips64/n64/Implies: Likewise.
* sysdeps/mips/mips64/soft-fp/Makefile: New.
* sysdeps/mips/mips64/soft-fp/e_sqrtl.c: New.
* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Include <fenv.h> and
<fpu_control.h>. Use hardware exception and rounding mode
settings.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 097f7e2..2b5754f 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,13 @@
+2007-05-23 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp.
+ * sysdeps/mips/mips64/n64/Implies: Likewise.
+ * sysdeps/mips/mips64/soft-fp/Makefile: New.
+ * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: New.
+ * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Include <fenv.h> and
+ <fpu_control.h>. Use hardware exception and rounding mode
+ settings.
+
2007-05-23 Richard Sandiford <rsandifo@nildram.co.uk>
* sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies
index a7cb280..bed8f14 100644
--- a/sysdeps/mips/mips64/n32/Implies
+++ b/sysdeps/mips/mips64/n32/Implies
@@ -1,4 +1,5 @@
ieee754/ldbl-128
+mips/mips64/soft-fp
mips/mips64
mips
wordsize-32
diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies
index e507786..214b85c 100644
--- a/sysdeps/mips/mips64/n64/Implies
+++ b/sysdeps/mips/mips64/n64/Implies
@@ -1,4 +1,5 @@
ieee754/ldbl-128
+mips/mips64/soft-fp
mips/mips64
mips
wordsize-64
diff --git a/sysdeps/mips/mips64/soft-fp/Makefile b/sysdeps/mips/mips64/soft-fp/Makefile
new file mode 100644
index 0000000..ada13e8
--- /dev/null
+++ b/sysdeps/mips/mips64/soft-fp/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),math)
+CPPFLAGS += -I../soft-fp
+endif
diff --git a/sysdeps/mips/mips64/soft-fp/e_sqrtl.c b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
new file mode 100644
index 0000000..81fd58a
--- /dev/null
+++ b/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
@@ -0,0 +1,39 @@
+/* long double square root in software floating-point emulation.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdlib.h>
+#include <soft-fp.h>
+#include <quad.h>
+
+long double
+__ieee754_sqrtl (const long double a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(C);
+ long double c;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_SQRT_Q(C, A);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+ return c;
+}
diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
index 309a14a..9c1ee3b 100644
--- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h
+++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
@@ -1,3 +1,6 @@
+#include <fenv.h>
+#include <fpu_control.h>
+
#define _FP_W_TYPE_SIZE 64
#define _FP_W_TYPE unsigned long long
#define _FP_WS_TYPE signed long long
@@ -40,8 +43,32 @@
R##_c = FP_CLS_NAN; \
} while (0)
-#define FP_EX_INVALID (1 << 4)
-#define FP_EX_DIVZERO (1 << 3)
-#define FP_EX_OVERFLOW (1 << 2)
-#define FP_EX_UNDERFLOW (1 << 1)
-#define FP_EX_INEXACT (1 << 0)
+#define _FP_DECL_EX fpu_control_t _fcw
+
+#define FP_ROUNDMODE (_fcw & 0x3)
+
+#define FP_RND_NEAREST FE_TONEAREST
+#define FP_RND_ZERO FE_TOWARDZERO
+#define FP_RND_PINF FE_UPWARD
+#define FP_RND_MINF FE_DOWNWARD
+
+#define FP_EX_INVALID FE_INVALID
+#define FP_EX_OVERFLOW FE_OVERFLOW
+#define FP_EX_UNDERFLOW FE_UNDERFLOW
+#define FP_EX_DIVZERO FE_DIVBYZERO
+#define FP_EX_INEXACT FE_INEXACT
+
+#ifdef __mips_hard_float
+#define FP_INIT_ROUNDMODE \
+do { \
+ _FPU_GETCW (_fcw); \
+} while (0)
+
+#define FP_HANDLE_EXCEPTIONS \
+do { \
+ if (__builtin_expect (_fex, 0)) \
+ _FPU_SETCW (_fcw | _fex | (_fex << 10)); \
+} while (0)
+#else
+#define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=388fc51bf4a10271ad9826fb96e62dc809586ec7
commit 388fc51bf4a10271ad9826fb96e62dc809586ec7
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 16:50:43 2007 +0000
Use commit date in changelog.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b7f0e1d..097f7e2 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,4 +1,4 @@
-2007-02-27 Richard Sandiford <rsandifo@nildram.co.uk>
+2007-05-23 Richard Sandiford <rsandifo@nildram.co.uk>
* sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
r_info argument to ElfW(Addr).
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9077d4dc205ec9390af766b1e8d8fa365476f4fe
commit 9077d4dc205ec9390af766b1e8d8fa365476f4fe
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 23 16:50:14 2007 +0000
* sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
r_info argument to ElfW(Addr).
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 159a4c2..b7f0e1d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-02-27 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
+ r_info argument to ElfW(Addr).
+
2007-02-01 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/bits/mathdef.h (float_t): Change to float.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c92a1a3..1b8d0f3 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -304,7 +304,7 @@ do { \
auto inline void
__attribute__ ((always_inline))
-elf_machine_reloc (struct link_map *map, ElfW(Word) r_info,
+elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *reloc_addr, ElfW(Addr) r_addend, int inplace_p)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90e01f41f991eb5ed709cae04362ab57ed66dfc4
commit 90e01f41f991eb5ed709cae04362ab57ed66dfc4
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri May 18 02:02:51 2007 +0000
2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
(SEM_VALUE_MAX): Remove.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e35eb1b..3ee76d9 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
+ (SEM_VALUE_MAX): Remove.
+
+2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define.
(PIC_REG_USE): Define.
(INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE.
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
index 3d274ee..270f333 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
@@ -20,17 +20,11 @@
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
-
#define __SIZEOF_SEM_T 16
-
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
-
-
typedef union
{
char __size[__SIZEOF_SEM_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d164f33b2ad9a24f5119061514633f93f51b8681
commit d164f33b2ad9a24f5119061514633f93f51b8681
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri May 18 01:59:52 2007 +0000
2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define.
(PIC_REG_USE): Define.
(INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE.
(INTERNAL_SYSCALL): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use
PIC_REG_DEF, PIC_REG_USE.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 7d38ab0..e35eb1b 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,13 @@
+2007-05-17 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define.
+ (PIC_REG_USE): Define.
+ (INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE.
+ (INTERNAL_SYSCALL): Likewise.
+ (INTERNAL_SYSCALL_NCS): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use
+ PIC_REG_DEF, PIC_REG_USE.
+
2007-05-01 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index 8637c51..4a0bd21 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2003, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,13 +59,14 @@ syscall (long int __sysno, ...)
{
register unsigned long int __res asm("r28");
+ PIC_REG_DEF
LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
asm volatile (SAVE_ASM_PIC
" ble 0x100(%%sr2, %%r0) \n"
" copy %1, %%r20 \n"
LOAD_ASM_PIC
: "=r" (__res)
- : "r" (__sysno) ASM_ARGS_6
+ : "r" (__sysno) PIC_REG_USE ASM_ARGS_6
: "memory", CALL_CLOB_REGS CLOB_ARGS_6);
__sys_res = __res;
}
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 69ed700..96632a1 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -1,5 +1,6 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@@ -40,7 +41,9 @@
# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
-# define USING_TREG TREG_ASM,
+# define CLOB_TREG TREG_ASM ,
+# define PIC_REG_DEF register unsigned long __r19 asm("r19");
+# define PIC_REG_USE , "r" (__r19)
#else
# define TREG %r3
# define SAVE_PIC(SREG) nop ASM_LINE_SEP
@@ -49,7 +52,9 @@
# define TREG_ASM
# define SAVE_ASM_PIC "nop \n"
# define LOAD_ASM_PIC "nop \n"
-# define USING_TREG
+# define CLOB_TREG
+# define PIC_REG_DEF
+# define PIC_REG_USE
#endif
#ifdef __ASSEMBLER__
@@ -344,7 +349,7 @@ L(pre_end): ASM_LINE_SEP \
TREG is clobbered and use that register to save/restore r19
across the syscall. */
-#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \
+#define CALL_CLOB_REGS "%r1", "%r2", CLOB_TREG \
"%r20", "%r29", "%r31"
#undef INLINE_SYSCALL
@@ -353,6 +358,7 @@ L(pre_end): ASM_LINE_SEP \
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -361,7 +367,7 @@ L(pre_end): ASM_LINE_SEP \
" ldi %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
@@ -398,6 +404,7 @@ L(pre_end): ASM_LINE_SEP \
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -406,7 +413,7 @@ L(pre_end): ASM_LINE_SEP \
" ldi %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
@@ -422,6 +429,7 @@ L(pre_end): ASM_LINE_SEP \
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -430,7 +438,7 @@ L(pre_end): ASM_LINE_SEP \
" copy %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "r" (name) ASM_ARGS_##nr \
+ : "r" (name) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bdef6f9a424ae9aec3bd1ebf50f711232da2bb6e
commit bdef6f9a424ae9aec3bd1ebf50f711232da2bb6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 10 21:39:43 2007 +0000
Define UTIME_NOW and UTIME_OMIT.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 40b6853..42748be 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -149,3 +149,9 @@ struct stat64
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
+
+#if defined __USE_ATFILE || defined __USE_GNU
+/* XXX This will change to the macro for the next 2008 POSIX revision. */
+# define UTIME_NOW ((1l << 30) - 1l)
+# define UTIME_OMIT ((1l << 30) - 2l)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91d46f8a9b3120fa59aa1fbf772a8bba3012a360
commit 91d46f8a9b3120fa59aa1fbf772a8bba3012a360
Author: Richard Henderson <rth@redhat.com>
Date: Mon May 7 22:57:20 2007 +0000
2007-05-07 Richard Henderson <rth@redhat.com>
* sysdeps/alpha/fpu/bits/mathinline.h (__isnanl): Don't define
if __NO_LONG_DOUBLE_MATH.
* sysdeps/unix/sysv/linux/alpha/ioperm.c: If BWX insns not
available in the compiler, add .arch directive to ethe assembly.
2007-05-07 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/fpu/s_nearbyint.c (nearbyintl): Fix version on
compat_symbol to GLIBC_2_1.
* sysdeps/alpha/fpu/s_fmin.S (fminl): Likewise.
* sysdeps/alpha/fpu/s_trunc.c (truncl): Likewise.
* sysdeps/alpha/fpu/s_fmax.S (fmaxl): Likewise.
* sysdeps/alpha/fpu/s_lrint.c (lrintl, llrintl): Likewise.
* sysdeps/alpha/fpu/s_lround.c (lroundl, llroundl): Likewise.
* sysdeps/alpha/fpu/s_round.c (roundl): Likewise.
* sysdeps/alpha/fpu/s_isnan.c (isnanl): Provide compat_symbol in
libc, not libm.
(__isnanl): New compat_symbol.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index a126dcf..250171e 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -137,11 +137,14 @@ __NTH (__isnan (double __x))
return isunordered (__x, __x);
}
+#ifndef __NO_LONG_DOUBLE_MATH
__MATH_INLINE int
__NTH (__isnanl (long double __x))
{
return isunordered (__x, __x);
}
+#endif
+
#endif /* C99 */
#endif /* __NO_MATH_INLINES */
diff --git a/sysdeps/alpha/fpu/s_fmax.S b/sysdeps/alpha/fpu/s_fmax.S
index 4f2ace7..d638eec 100644
--- a/sysdeps/alpha/fpu/s_fmax.S
+++ b/sysdeps/alpha/fpu/s_fmax.S
@@ -53,6 +53,6 @@ weak_alias (__fmax, fmax)
strong_alias (__fmax, __fmaxl)
weak_alias (__fmaxl, fmaxl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_fmin.S b/sysdeps/alpha/fpu/s_fmin.S
index 10de529..d70fab6 100644
--- a/sysdeps/alpha/fpu/s_fmin.S
+++ b/sysdeps/alpha/fpu/s_fmin.S
@@ -53,6 +53,6 @@ weak_alias (__fmin, fmin)
strong_alias (__fmin, __fminl)
weak_alias (__fminl, fminl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __fmin, fminl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c
index 4403a50..a923032 100644
--- a/sysdeps/alpha/fpu/s_isnan.c
+++ b/sysdeps/alpha/fpu/s_isnan.c
@@ -53,6 +53,7 @@ weak_alias (__isnanf, isnanf)
strong_alias (__isnan, __isnanl)
weak_alias (__isnan, isnanl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __isnan, isnanl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_lrint.c b/sysdeps/alpha/fpu/s_lrint.c
index 4c32f61..1696408 100644
--- a/sysdeps/alpha/fpu/s_lrint.c
+++ b/sysdeps/alpha/fpu/s_lrint.c
@@ -42,7 +42,7 @@ strong_alias (__lrint, __llrintl)
weak_alias (__lrintl, lrintl)
weak_alias (__llrintl, llrintl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_0);
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_lround.c b/sysdeps/alpha/fpu/s_lround.c
index bc5cb88..0e0e988 100644
--- a/sysdeps/alpha/fpu/s_lround.c
+++ b/sysdeps/alpha/fpu/s_lround.c
@@ -42,7 +42,7 @@ strong_alias (__lround, __llroundl)
weak_alias (__lroundl, lroundl)
weak_alias (__llroundl, llroundl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_0);
-compat_symbol (libm, __llround, llroundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_nearbyint.c b/sysdeps/alpha/fpu/s_nearbyint.c
index 7a91bd1..b18db8b 100644
--- a/sysdeps/alpha/fpu/s_nearbyint.c
+++ b/sysdeps/alpha/fpu/s_nearbyint.c
@@ -43,6 +43,6 @@ weak_alias (__nearbyint, nearbyint)
strong_alias (__nearbyint, __nearbyintl)
weak_alias (__nearbyint, nearbyintl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_round.c b/sysdeps/alpha/fpu/s_round.c
index 3999e61..71763cf 100644
--- a/sysdeps/alpha/fpu/s_round.c
+++ b/sysdeps/alpha/fpu/s_round.c
@@ -44,6 +44,6 @@ weak_alias (__round, round)
strong_alias (__round, __roundl)
weak_alias (__roundl, roundl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __round, roundl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __round, roundl, GLIBC_2_1);
#endif
diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c
index 1c1a666..11a279a 100644
--- a/sysdeps/alpha/fpu/s_trunc.c
+++ b/sysdeps/alpha/fpu/s_trunc.c
@@ -48,6 +48,6 @@ weak_alias (__trunc, trunc)
strong_alias (__trunc, __truncl)
weak_alias (__trunc, truncl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 6c4115d..32e96ec 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -32,6 +32,11 @@
sparse address space would work (e.g., the Low Cost Alpha chip has an
I/O address space that's 512MB large!). */
+/* Make sure the ldbu/stb asms below are not expaneded to macros. */
+#ifndef __alpha_bwx__
+asm(".arch ev56");
+#endif
+
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=854901bebe730b126ca035abcca1d816cfe4693e
commit 854901bebe730b126ca035abcca1d816cfe4693e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed May 2 02:07:38 2007 +0000
2007-05-01 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
[__USE_XOPEN2K]: Define pthread_rwlock_t and
pthread_rwlockattr_t.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 068044a..7d38ab0 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2007-05-01 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
+ [__USE_XOPEN2K]: Define pthread_rwlock_t and
+ pthread_rwlockattr_t.
+
2007-02-02 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define.
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
index e2c6f59..7173718 100644
--- a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
@@ -111,8 +111,7 @@ typedef struct
/* Once-only execution */
typedef int pthread_once_t;
-
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Read-write locks. */
typedef struct _pthread_rwlock_t
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d4fccc44295d622a4fe6c22d7047c9cf93e95fd
commit 8d4fccc44295d622a4fe6c22d7047c9cf93e95fd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 17 17:04:09 2007 +0000
Use __extern_inline and __extern_always_inline where appropriate.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 3ea021a..a126dcf 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -26,7 +26,7 @@
#ifdef __cplusplus
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_inline
#endif
#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 80f8750..bd27d2a 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -1,5 +1,5 @@
/* Machine-specific definition for spin locks. Alpha version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@ typedef __volatile long int __spin_lock_t;
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#define _EXTERN_INLINE __extern_inline
#endif
/* Unlock LOCK. */
diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h
index b737525..e6df63c 100644
--- a/sysdeps/mach/alpha/machine-sp.h
+++ b/sysdeps/mach/alpha/machine-sp.h
@@ -1,5 +1,5 @@
/* Machine-specific function to return the stack pointer. Alpha version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
/* Return the current stack pointer. */
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+#define _EXTERN_INLINE __extern_inline
#endif
_EXTERN_INLINE void *
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f878f0bbc8bb39c945b0578969300217d55d3651
commit f878f0bbc8bb39c945b0578969300217d55d3651
Author: Richard Henderson <rth@redhat.com>
Date: Wed Mar 14 20:01:05 2007 +0000
* sysdeps/alpha/fpu/s_llround.c: New file.
* sysdeps/alpha/fpu/s_llroundf.c: New file.
* sysdeps/alpha/fpu/s_lround.c: New file.
* sysdeps/alpha/fpu/s_lroundf.c: New file.
* sysdeps/alpha/fpu/s_round.c: New file.
* sysdeps/alpha/fpu/s_roundf.c: New file.
* sysdeps/alpha/fpu/s_trunc.c: New file.
* sysdeps/alpha/fpu/s_truncf.c: New file.
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index 29fc924..5af6386 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -21,9 +21,7 @@
#include <math_ldbl_opt.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
+/* Use the -inf rounding mode conversion instructions to implement floor. */
double
__floor (double x)
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index 2283264..8b42170 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -20,9 +20,7 @@
#include <math.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
+/* Use the -inf rounding mode conversion instructions to implement floor. */
float
__floorf (float x)
diff --git a/sysdeps/alpha/fpu/s_llround.c b/sysdeps/alpha/fpu/s_llround.c
new file mode 100644
index 0000000..b212fbd
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_llround.c
@@ -0,0 +1 @@
+/* In s_lround.c. */
diff --git a/sysdeps/alpha/fpu/s_llroundf.c b/sysdeps/alpha/fpu/s_llroundf.c
new file mode 100644
index 0000000..73bdf31
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_llroundf.c
@@ -0,0 +1 @@
+/* In s_lroundf.c. */
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_lround.c
similarity index 53%
copy from sysdeps/alpha/fpu/s_floorf.c
copy to sysdeps/alpha/fpu/s_lround.c
index 2283264..bc5cb88 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_lround.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,31 +16,33 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define __llround not___llround
+#define llround not_llround
#include <math.h>
+#include <math_ldbl_opt.h>
+#undef __llround
+#undef llround
-
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
-float
-__floorf (float x)
+long int
+__lround (double x)
{
- float two23 = copysignf (0x1.0p23, x);
- float r, tmp;
-
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
-#else
- "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
-#endif
- : "=&f"(r), "=&f"(tmp)
- : "f"(x), "f"(two23));
+ double adj;
- /* floor(-0) == -0, and in general we'll always have the same
- sign as our input. */
- return copysignf (r, x);
+ adj = 0x1.fffffffffffffp-2; /* nextafter (0.5, 0.0) */
+ adj = copysign (adj, x);
+ return x + adj;
}
-weak_alias (__floorf, floorf)
+strong_alias (__lround, __llround)
+weak_alias (__lround, lround)
+weak_alias (__llround, llround)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__lround, __lroundl)
+strong_alias (__lround, __llroundl)
+weak_alias (__lroundl, lroundl)
+weak_alias (__llroundl, llroundl)
+#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_0);
+compat_symbol (libm, __llround, llroundl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_lroundf.c
similarity index 52%
copy from sysdeps/alpha/fpu/s_floorf.c
copy to sysdeps/alpha/fpu/s_lroundf.c
index 2283264..16ff348 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_lroundf.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,31 +16,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define __llroundf not___llroundf
+#define llroundf not_llroundf
#include <math.h>
+#undef __llroundf
+#undef llroundf
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
-float
-__floorf (float x)
+long int
+__lroundf (float x)
{
- float two23 = copysignf (0x1.0p23, x);
- float r, tmp;
-
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
-#else
- "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
-#endif
- : "=&f"(r), "=&f"(tmp)
- : "f"(x), "f"(two23));
-
- /* floor(-0) == -0, and in general we'll always have the same
- sign as our input. */
- return copysignf (r, x);
+ float adj;
+
+ adj = 0x1.fffffep-2; /* nextafterf (0.5f, 0.0f) */
+ adj = copysignf (adj, x);
+ return x + adj;
}
-weak_alias (__floorf, floorf)
+strong_alias (__lroundf, __llroundf)
+weak_alias (__lroundf, lroundf)
+weak_alias (__llroundf, llroundf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_round.c
similarity index 57%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_round.c
index 29fc924..3999e61 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_round.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 1998, 1999, 2000, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -21,35 +20,30 @@
#include <math_ldbl_opt.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
double
-__floor (double x)
+__round (double x)
{
- double two52 = copysign (0x1.0p52, x);
- double r, tmp;
-
+ const double almost_half = 0x1.fffffffffffffp-2;
+ const double two52 = 0x1.0p52;
+ double tmp, r;
+
__asm (
#ifdef _IEEE_FP_INEXACT
- "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
+ "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0"
#else
- "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
+ "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0"
#endif
: "=&f"(r), "=&f"(tmp)
- : "f"(x), "f"(two52));
+ : "f"(fabs (x) + almost_half), "f"(two52));
- /* floor(-0) == -0, and in general we'll always have the same
- sign as our input. */
return copysign (r, x);
}
-weak_alias (__floor, floor)
+weak_alias (__round, round)
#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
+strong_alias (__round, __roundl)
+weak_alias (__roundl, roundl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __floor, floorl, GLIBC_2_0);
+compat_symbol (libm, __round, roundl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_roundf.c
similarity index 64%
copy from sysdeps/alpha/fpu/s_floorf.c
copy to sysdeps/alpha/fpu/s_roundf.c
index 2283264..89584f0 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_roundf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -20,28 +20,25 @@
#include <math.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
float
-__floorf (float x)
+__roundf (float x)
{
- float two23 = copysignf (0x1.0p23, x);
+ const float almost_half = 0x1.fffffep-2;
+ const float two23 = 0x1.0p23;
float r, tmp;
__asm (
#ifdef _IEEE_FP_INEXACT
- "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
+ "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0"
#else
- "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
+ "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0"
#endif
: "=&f"(r), "=&f"(tmp)
- : "f"(x), "f"(two23));
+ : "f"(fabsf (x) + almost_half), "f"(two23));
- /* floor(-0) == -0, and in general we'll always have the same
+ /* round(-0) == -0, and in general we'll always have the same
sign as our input. */
return copysignf (r, x);
}
-weak_alias (__floorf, floorf)
+weak_alias (__roundf, roundf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_trunc.c
similarity index 66%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_trunc.c
index 29fc924..1c1a666 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_trunc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -21,35 +21,33 @@
#include <math_ldbl_opt.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
+/* Use the chopped rounding mode conversion instructions to implement trunc. */
double
-__floor (double x)
+__trunc (double x)
{
double two52 = copysign (0x1.0p52, x);
double r, tmp;
__asm (
#ifdef _IEEE_FP_INEXACT
- "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
+ "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0"
#else
- "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
+ "addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0"
#endif
: "=&f"(r), "=&f"(tmp)
: "f"(x), "f"(two52));
- /* floor(-0) == -0, and in general we'll always have the same
+ /* trunc(-0) == -0, and in general we'll always have the same
sign as our input. */
return copysign (r, x);
}
-weak_alias (__floor, floor)
+weak_alias (__trunc, trunc)
#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
+strong_alias (__trunc, __truncl)
+weak_alias (__trunc, truncl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __floor, floorl, GLIBC_2_0);
+compat_symbol (libm, __trunc, truncl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_truncf.c
similarity index 69%
copy from sysdeps/alpha/fpu/s_floorf.c
copy to sysdeps/alpha/fpu/s_truncf.c
index 2283264..094997b 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_truncf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -20,28 +20,26 @@
#include <math.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
+/* Use the chopped rounding mode conversion instructions to implement trunc. */
float
-__floorf (float x)
+__truncf (float x)
{
float two23 = copysignf (0x1.0p23, x);
float r, tmp;
__asm (
#ifdef _IEEE_FP_INEXACT
- "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
+ "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0"
#else
- "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
+ "adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0"
#endif
: "=&f"(r), "=&f"(tmp)
: "f"(x), "f"(two23));
- /* floor(-0) == -0, and in general we'll always have the same
+ /* trunc(-0) == -0, and in general we'll always have the same
sign as our input. */
return copysignf (r, x);
}
-weak_alias (__floorf, floorf)
+weak_alias (__truncf, truncf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bebc49030c157a3c2b88bff16115029508bac1a8
commit bebc49030c157a3c2b88bff16115029508bac1a8
Author: Richard Henderson <rth@redhat.com>
Date: Wed Mar 14 17:44:14 2007 +0000
* sysdeps/alpha/fpu/s_ceil.c: Rewrite without branches.
* sysdeps/alpha/fpu/s_ceilf.c: Likewise.
* sysdeps/alpha/fpu/s_floor.c: Likewise.
* sysdeps/alpha/fpu/s_floorf.c: Likewise.
* sysdeps/alpha/fpu/s_rint.c: Likewise.
* sysdeps/alpha/fpu/s_rintf.c: Likewise.
* sysdeps/alpha/fpu/s_fmax.S: New file.
* sysdeps/alpha/fpu/s_fmaxf.S: New file.
* sysdeps/alpha/fpu/s_fmin.S: New file.
* sysdeps/alpha/fpu/s_fminf.S: New file.
* sysdeps/alpha/fpu/s_isnan.c: New file.
* sysdeps/alpha/fpu/s_isnanf.c: New file.
* sysdeps/alpha/fpu/s_llrint.c: New file.
* sysdeps/alpha/fpu/s_llrintf.c: New file.
* sysdeps/alpha/fpu/s_lrint.c: New file.
* sysdeps/alpha/fpu/s_lrintf.c: New file.
* sysdeps/alpha/fpu/s_nearbyint.c: New file.
* sysdeps/alpha/fpu/s_nearbyintf.c: New file.
* sysdeps/alpha/fpu/bits/mathinline.h (__floorf, __floor): Remove.
(__fdimf, fdimf, __fdim, fdim): Remove.
(__signbitf, __signbit, __signbitl): Use gcc builtin if available.
(__isnanf, __isnan, __isnanl): New.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index bcc1b56..3ea021a 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -1,5 +1,6 @@
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997, 1999-2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999-2001, 2004, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
@@ -83,111 +84,64 @@ __inline_fabs (fabs, double)
# undef __inline_fabs
#endif
-
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
-__MATH_INLINE float
-__NTH (__floorf (float __x))
-{
- /* Check not zero since floor(-0) == -0. */
- if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
- {
- /* Note that Alpha S_Floating is stored in registers in a
- restricted T_Floating format, so we don't even need to
- convert back to S_Floating in the end. The initial
- conversion to T_Floating is needed to handle denormals. */
-
- float __tmp1, __tmp2;
-
- __asm ("cvtst/s %3,%2\n\t"
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
-#else
- "cvttq/svm %2,%1\n\t"
-#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(__x), "=&f"(__tmp1), "=&f"(__tmp2)
- : "f"(__x));
- }
- return __x;
-}
-
-__MATH_INLINE double
-__NTH (__floor (double __x))
-{
- if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
- {
- double __tmp1;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
-#else
- "cvttq/svm %2,%1\n\t"
-#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(__x), "=&f"(__tmp1)
- : "f"(__x));
- }
- return __x;
-}
-
-__MATH_INLINE float __NTH (floorf (float __x)) { return __floorf(__x); }
-__MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); }
-
-
#ifdef __USE_ISOC99
-__MATH_INLINE float
-__NTH (__fdimf (float __x, float __y))
-{
- return __x <= __y ? 0.0f : __x - __y;
-}
-
-__MATH_INLINE float
-__NTH (fdimf (float __x, float __y))
-{
- return __x <= __y ? 0.0f : __x - __y;
-}
-
-__MATH_INLINE double
-__NTH (__fdim (double __x, double __y))
-{
- return __x <= __y ? 0.0 : __x - __y;
-}
-
-__MATH_INLINE double
-__NTH (fdim (double __x, double __y))
-{
- return __x <= __y ? 0.0 : __x - __y;
-}
-
/* Test for negative number. Used in the signbit() macro. */
__MATH_INLINE int
__NTH (__signbitf (float __x))
{
+#if !__GNUC_PREREQ (4, 0)
__extension__ union { float __f; int __i; } __u = { __f: __x };
return __u.__i < 0;
+#else
+ return __builtin_signbitf (__x);
+#endif
}
__MATH_INLINE int
__NTH (__signbit (double __x))
{
+#if !__GNUC_PREREQ (4, 0)
__extension__ union { double __d; long __i; } __u = { __d: __x };
return __u.__i < 0;
+#else
+ return __builtin_signbit (__x);
+#endif
}
__MATH_INLINE int
__NTH (__signbitl (long double __x))
{
+#if !__GNUC_PREREQ (4, 0)
__extension__ union {
long double __d;
long __i[sizeof(long double)/sizeof(long)];
} __u = { __d: __x };
return __u.__i[sizeof(long double)/sizeof(long) - 1] < 0;
+#else
+ return __builtin_signbitl (__x);
+#endif
}
+/* Test for NaN. Used in the isnan() macro. */
+
+__MATH_INLINE int
+__NTH (__isnanf (float __x))
+{
+ return isunordered (__x, __x);
+}
+
+__MATH_INLINE int
+__NTH (__isnan (double __x))
+{
+ return isunordered (__x, __x);
+}
+
+__MATH_INLINE int
+__NTH (__isnanl (long double __x))
+{
+ return isunordered (__x, __x);
+}
#endif /* C99 */
#endif /* __NO_MATH_INLINES */
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
index ec58fd9..40c2379 100644
--- a/sysdeps/alpha/fpu/s_ceil.c
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -27,25 +27,20 @@
double
__ceil (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
-
- new_x = -x;
- __asm (
+ double two52 = copysign (0x1.0p52, x);
+ double r, tmp;
+
+ __asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
#else
- "cvttq/svm %2,%1\n\t"
+ "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(new_x));
-
- /* Fix up the negation we did above, as well as handling -0 properly. */
- x = copysign(new_x, x);
- }
- return x;
+ : "=&f"(r), "=&f"(tmp)
+ : "f"(-x), "f"(-two52));
+
+ /* Fix up the negation we did above, as well as handling -0 properly. */
+ return copysign (r, x);
}
weak_alias (__ceil, ceil)
diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c
index aba1697..0df651f 100644
--- a/sysdeps/alpha/fpu/s_ceilf.c
+++ b/sysdeps/alpha/fpu/s_ceilf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -26,30 +26,20 @@
float
__ceilf (float x)
{
- if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
- {
- /* Note that Alpha S_Floating is stored in registers in a
- restricted T_Floating format, so we don't even need to
- convert back to S_Floating in the end. The initial
- conversion to T_Floating is needed to handle denormals. */
-
- float tmp1, tmp2, new_x;
-
- new_x = -x;
- __asm ("cvtst/s %3,%2\n\t"
+ float two23 = copysignf (0x1.0p23, x);
+ float r, tmp;
+
+ __asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
#else
- "cvttq/svm %2,%1\n\t"
+ "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
- : "f"(new_x));
-
- /* Fix up the negation we did above, as well as handling -0 properly. */
- x = copysignf(new_x, x);
- }
- return x;
+ : "=&f"(r), "=&f"(tmp)
+ : "f"(-x), "f"(-two23));
+
+ /* Fix up the negation we did above, as well as handling -0 properly. */
+ return copysignf (r, x);
}
weak_alias (__ceilf, ceilf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index b22c523..29fc924 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -28,25 +28,21 @@
double
__floor (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
-
- __asm (
+ double two52 = copysign (0x1.0p52, x);
+ double r, tmp;
+
+ __asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "addt/suim %2, %3, %1\n\tsubt/suim %1, %3, %0"
#else
- "cvttq/svm %2,%1\n\t"
+ "addt/sum %2, %3, %1\n\tsubt/sum %1, %3, %0"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* floor(-0) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ : "=&f"(r), "=&f"(tmp)
+ : "f"(x), "f"(two52));
+
+ /* floor(-0) == -0, and in general we'll always have the same
+ sign as our input. */
+ return copysign (r, x);
}
weak_alias (__floor, floor)
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index fd1ddab..2283264 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -27,30 +27,21 @@
float
__floorf (float x)
{
- if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
- {
- /* Note that Alpha S_Floating is stored in registers in a
- restricted T_Floating format, so we don't even need to
- convert back to S_Floating in the end. The initial
- conversion to T_Floating is needed to handle denormals. */
-
- float tmp1, tmp2, new_x;
-
- __asm ("cvtst/s %3,%2\n\t"
+ float two23 = copysignf (0x1.0p23, x);
+ float r, tmp;
+
+ __asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "adds/suim %2, %3, %1\n\tsubs/suim %1, %3, %0"
#else
- "cvttq/svm %2,%1\n\t"
+ "adds/sum %2, %3, %1\n\tsubs/sum %1, %3, %0"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
- : "f"(x));
-
- /* floor(-0) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysignf(new_x, x);
- }
- return x;
+ : "=&f"(r), "=&f"(tmp)
+ : "f"(x), "f"(two23));
+
+ /* floor(-0) == -0, and in general we'll always have the same
+ sign as our input. */
+ return copysignf (r, x);
}
weak_alias (__floorf, floorf)
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_fmax.S
similarity index 58%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_fmax.S
index be09651..4f2ace7 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_fmax.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -17,38 +17,42 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
+#include <sysdep.h>
#include <math_ldbl_opt.h>
+ .set noat
+ .set noreorder
-double
-__rint (double x)
-{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
-}
-
-weak_alias (__rint, rint)
+ .text
+ENTRY (__fmax)
+ .prologue 0
+
+ cmptun/su $f16, $f16, $f10
+ cmptun/su $f17, $f17, $f11
+ fmov $f17, $f0
+ unop
+
+ trapb
+ fbne $f10, $ret
+ fmov $f16, $f0
+ fbne $f11, $ret
+
+ cmptlt/su $f16, $f17, $f11
+ trapb
+ fcmovne $f11, $f17, $f0
+$ret: ret
+
+END (__fmax)
+
+/* Given the in-register format of single-precision, this works there too. */
+strong_alias (__fmax, __fmaxf)
+weak_alias (__fmaxf, fmaxf)
+
+weak_alias (__fmax, fmax)
#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
+strong_alias (__fmax, __fmaxl)
+weak_alias (__fmaxl, fmaxl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_fmaxf.S b/sysdeps/alpha/fpu/s_fmaxf.S
new file mode 100644
index 0000000..3c2d62b
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_fmaxf.S
@@ -0,0 +1 @@
+/* __fmaxf is in s_fmax.c */
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_fmin.S
similarity index 58%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_fmin.S
index be09651..10de529 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_fmin.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -17,38 +17,42 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
+#include <sysdep.h>
#include <math_ldbl_opt.h>
+ .set noat
+ .set noreorder
-double
-__rint (double x)
-{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
-}
-
-weak_alias (__rint, rint)
+ .text
+ENTRY (__fmin)
+ .prologue 0
+
+ cmptun/su $f16, $f16, $f10
+ cmptun/su $f17, $f17, $f11
+ fmov $f17, $f0
+ unop
+
+ trapb
+ fbne $f10, $ret
+ fmov $f16, $f0
+ fbne $f11, $ret
+
+ cmptlt/su $f17, $f16, $f11
+ trapb
+ fcmovne $f11, $f17, $f0
+$ret: ret
+
+END (__fmin)
+
+/* Given the in-register format of single-precision, this works there too. */
+strong_alias (__fmin, __fminf)
+weak_alias (__fminf, fminf)
+
+weak_alias (__fmin, fmin)
#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
+strong_alias (__fmin, __fminl)
+weak_alias (__fminl, fminl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+compat_symbol (libm, __fmin, fminl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_fminf.S b/sysdeps/alpha/fpu/s_fminf.S
new file mode 100644
index 0000000..10ab7fe
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_fminf.S
@@ -0,0 +1 @@
+/* __fminf is in s_fmin.c */
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_isnan.c
similarity index 53%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_isnan.c
index be09651..4403a50 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_isnan.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Return 1 if argument is a NaN, else 0.
+ Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,38 +17,42 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+/* Ugly kludge to avoid declarations. */
+#define __isnanf not___isnanf
+#define isnanf not_isnanf
+#define __GI___isnanf not__GI___isnanf
+
#include <math.h>
#include <math_ldbl_opt.h>
+#undef __isnanf
+#undef isnanf
+#undef __GI___isnanf
+
+/* The hidden_proto in include/math.h was obscured by the macro hackery. */
+__typeof (__isnan) __isnanf;
+hidden_proto (__isnanf)
+
-double
-__rint (double x)
+int
+__isnan (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ return isunordered (x, x);
}
-weak_alias (__rint, rint)
+hidden_def (__isnan)
+weak_alias (__isnan, isnan)
+
+/* It turns out that the 'double' version will also always work for
+ single-precision. */
+strong_alias (__isnan, __isnanf)
+hidden_def (__isnanf)
+weak_alias (__isnanf, isnanf)
+
#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
+strong_alias (__isnan, __isnanl)
+weak_alias (__isnan, isnanl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+compat_symbol (libm, __isnan, isnanl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_isnanf.c b/sysdeps/alpha/fpu/s_isnanf.c
new file mode 100644
index 0000000..af41e43
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_isnanf.c
@@ -0,0 +1 @@
+/* In s_isnan.c */
diff --git a/sysdeps/alpha/fpu/s_llrint.c b/sysdeps/alpha/fpu/s_llrint.c
new file mode 100644
index 0000000..5db97be
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_llrint.c
@@ -0,0 +1 @@
+/* In s_lrint.c */
diff --git a/sysdeps/alpha/fpu/s_llrintf.c b/sysdeps/alpha/fpu/s_llrintf.c
new file mode 100644
index 0000000..18f2885
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_llrintf.c
@@ -0,0 +1 @@
+/* In s_lrintf.c */
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_lrint.c
similarity index 57%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_lrint.c
index be09651..4c32f61 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_lrint.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,38 +16,33 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define __llrint not___llrint
+#define llrint not_llrint
#include <math.h>
#include <math_ldbl_opt.h>
+#undef __llrint
+#undef llrint
-
-double
-__rint (double x)
+long int
+__lrint (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ long ret;
+
+ __asm ("cvttq/svd %1,%0" : "=&f"(ret) : "f"(x));
+
+ return ret;
}
-weak_alias (__rint, rint)
+strong_alias (__lrint, __llrint)
+weak_alias (__lrint, lrint)
+weak_alias (__llrint, llrint)
#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
+strong_alias (__lrint, __lrintl)
+strong_alias (__lrint, __llrintl)
+weak_alias (__lrintl, lrintl)
+weak_alias (__llrintl, llrintl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_0);
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_lrintf.c
similarity index 51%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_lrintf.c
index be09651..20a6a6c 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_lrintf.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,38 +16,24 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#define __llrintf not___llrintf
+#define llrintf not_llrintf
#include <math.h>
-#include <math_ldbl_opt.h>
+#undef __llrintf
+#undef llrintf
-
-double
-__rint (double x)
+long int
+__lrintf (float x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ double tmp;
+ long ret;
+
+ __asm ("cvtst/s %2,%1\n\tcvttq/svd %1,%0"
+ : "=&f"(ret), "=&f"(tmp) : "f"(x));
+
+ return ret;
}
-weak_alias (__rint, rint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
-#endif
+strong_alias (__lrintf, __llrintf)
+weak_alias (__lrintf, lrintf)
+weak_alias (__llrintf, llrintf)
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_nearbyint.c
similarity index 62%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_nearbyint.c
index be09651..7a91bd1 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_nearbyint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -20,35 +20,29 @@
#include <math.h>
#include <math_ldbl_opt.h>
+#ifdef _IEEE_FP_INEXACT
+#error "Don't compile with -mieee-with-inexact"
+#endif
double
-__rint (double x)
+__nearbyint (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ double two52 = copysign (0x1.0p52, x);
+ double r;
+
+ r = x + two52;
+ r = r - two52;
+
+ /* nearbyint(-0.1) == -0, and in general we'll always have the same sign
+ as our input. */
+ return copysign (r, x);
}
-weak_alias (__rint, rint)
+weak_alias (__nearbyint, nearbyint)
#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
+strong_alias (__nearbyint, __nearbyintl)
+weak_alias (__nearbyint, nearbyintl)
#endif
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
#endif
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_nearbyintf.c
similarity index 55%
copy from sysdeps/alpha/fpu/s_rint.c
copy to sysdeps/alpha/fpu/s_nearbyintf.c
index be09651..ee63798 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_nearbyintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,37 +18,23 @@
02111-1307 USA. */
#include <math.h>
-#include <math_ldbl_opt.h>
-
-double
-__rint (double x)
-{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
+#error "Don't compile with -mieee-with-inexact"
#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+
+float
+__nearbyintf (float x)
+{
+ float two23 = copysignf (0x1.0p23, x);
+ float r;
+
+ r = x + two23;
+ r = r - two23;
+
+ /* nearbyint(-0.1) == -0, and in general we'll always have the same sign
+ as our input. */
+ return copysign (r, x);
}
-weak_alias (__rint, rint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__rint, __rintl)
-weak_alias (__rint, rintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __rint, rintl, GLIBC_2_0);
-#endif
+weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c
index be09651..e9aa028 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -24,24 +24,15 @@
double
__rint (double x)
{
- if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
- {
- double tmp1, new_x;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysign(new_x, x);
- }
- return x;
+ double two52 = copysign (0x1.0p52, x);
+ double r;
+
+ r = x + two52;
+ r = r - two52;
+
+ /* rint(-0.1) == -0, and in general we'll always have the same sign
+ as our input. */
+ return copysign (r, x);
}
weak_alias (__rint, rint)
diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c
index d5d019d..9e4cbd1 100644
--- a/sysdeps/alpha/fpu/s_rintf.c
+++ b/sysdeps/alpha/fpu/s_rintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -23,30 +23,15 @@
float
__rintf (float x)
{
- if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
- {
- /* Note that Alpha S_Floating is stored in registers in a
- restricted T_Floating format, so we don't even need to
- convert back to S_Floating in the end. The initial
- conversion to T_Floating is needed to handle denormals. */
-
- float tmp1, tmp2, new_x;
-
- __asm ("cvtst/s %3,%2\n\t"
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svid %2,%1\n\t"
-#else
- "cvttq/svd %2,%1\n\t"
-#endif
- "cvtqt/d %1,%0\n\t"
- : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
- : "f"(x));
-
- /* rint(-0.1) == -0, and in general we'll always have the same
- sign as our input. */
- x = copysignf(new_x, x);
- }
- return x;
+ float two23 = copysignf (0x1.0p23, x);
+ float r;
+
+ r = x + two23;
+ r = r - two23;
+
+ /* rint(-0.1) == -0, and in general we'll always have the same sign
+ as our input. */
+ return copysign (r, x);
}
weak_alias (__rintf, rintf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ea0d865795ca73b4e5bb13f7721b1e091bc6eee
commit 9ea0d865795ca73b4e5bb13f7721b1e091bc6eee
Author: Richard Henderson <rth@redhat.com>
Date: Wed Mar 14 00:40:50 2007 +0000
* sysdeps/alpha/Makefile (sysdep-CFLAGS): Force dynamic rounding.
* sysdeps/alpha/fpu/bits/mathinline.h (__signbitl): New.
* sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
* sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies: New file.
* sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies: New file.
* sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 1e74d82..725ae43 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -38,9 +38,10 @@ ifeq ($(subdir),elf)
CFLAGS-rtld.c = -mbuild-constants
endif
-# For now, build everything with full IEEE math support.
-# TODO: build separate libm and libm-ieee.
-sysdep-CFLAGS += -mieee
+# Build everything with full IEEE math support, and with dynamic rounding;
+# there are a number of math routines that are defined to work with the
+# "current" rounding mode, and it's easiest to set this with all of them.
+sysdep-CFLAGS += -mieee -mfp-rounding-mode=d
# libc.so requires about 16k for the small data area, which is well
# below the 64k maximum.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 87d4005..bcc1b56 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -178,6 +178,16 @@ __NTH (__signbit (double __x))
return __u.__i < 0;
}
+__MATH_INLINE int
+__NTH (__signbitl (long double __x))
+{
+ __extension__ union {
+ long double __d;
+ long __i[sizeof(long double)/sizeof(long)];
+ } __u = { __d: __x };
+ return __u.__i[sizeof(long double)/sizeof(long) - 1] < 0;
+}
+
#endif /* C99 */
#endif /* __NO_MATH_INLINES */
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 6b882e3..d9df631 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -2,34 +2,40 @@
# atan2
Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
-float: 6
-ifloat: 6
+ildouble: 1
+ldouble: 1
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# atanh
Test "atanh (0.75) == 0.972955074527656652552676371721589865":
float: 1
ifloat: 1
+# cacos
+Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
# casin
Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
@@ -37,6 +43,9 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -44,48 +53,55 @@ double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 4
+ldouble: 4
Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
+ildouble: 2
+ldouble: 2
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# catan
-Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
-float: 3
-ifloat: 3
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
-float: 4
-ifloat: 4
+Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+ildouble: 1
+ldouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
double: 4
idouble: 4
-Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
-float: 4
-ifloat: 4
Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
-float: 6
-ifloat: 6
+ildouble: 1
+ldouble: 1
# cbrt
+Test "cbrt (-0.001) == -0.1":
+ildouble: 1
+ldouble: 1
Test "cbrt (-27.0) == -3.0":
double: 1
idouble: 1
@@ -97,9 +113,14 @@ double: 1
idouble: 1
# ccos
+Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
double: 1
float: 1
@@ -113,9 +134,13 @@ ifloat: 1
Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
double: 1
float: 1
@@ -126,89 +151,130 @@ float: 1
ifloat: 1
# cexp
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
-float: 3
-ifloat: 3
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
-float: 5
idouble: 1
-ifloat: 5
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
-float: 1
idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "cos (pi/2) == 0":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
# cpow
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
@@ -222,16 +288,31 @@ double: 1
float: 4
idouble: 1
ifloat: 4
+ildouble: 4
+ldouble: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
double: 2
float: 3
idouble: 2
ifloat: 3
+ildouble: 10
+ldouble: 10
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
idouble: 1
ifloat: 4
+ildouble: 3
+ldouble: 3
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
float: 2
ifloat: 2
@@ -240,8 +321,21 @@ double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# csin
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+ildouble: 1
+ldouble: 1
# csinh
+Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
@@ -256,14 +350,29 @@ ifloat: 1
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
+ildouble: 1
+ldouble: 1
# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -271,6 +380,11 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
@@ -287,6 +401,9 @@ idouble: 1
Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
double: 1
idouble: 1
+Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
+ildouble: 1
+ldouble: 1
Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
double: 1
idouble: 1
@@ -307,14 +424,30 @@ double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# exp2
+Test "exp2 (10) == 1024":
+ildouble: 2
+ldouble: 2
# expm1
Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
double: 1
idouble: 1
Test "expm1 (1) == M_El - 1.0":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# gamma
+Test "gamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
@@ -356,9 +489,13 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "j0 (2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
float: 1
@@ -367,17 +504,32 @@ ifloat: 1
Test "j0 (8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# j1
+Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "j1 (1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "j1 (2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
Test "j1 (8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 4
+ldouble: 4
# jn
Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -393,9 +545,13 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
float: 1
@@ -404,30 +560,57 @@ ifloat: 1
Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 4
+ldouble: 4
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 2
+ldouble: 2
Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 4
ifloat: 4
@@ -446,6 +629,8 @@ double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
double: 1
float: 2
@@ -453,16 +638,23 @@ idouble: 1
ifloat: 2
# lgamma
+Test "lgamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
# log10
Test "log10 (0.75) == -0.124938736608299953132449886193870744":
@@ -473,36 +665,54 @@ ifloat: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# log1p
Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
ifloat: 1
+# log2
+Test "log2 (0.75) == -.415037499278843818546261056052183492":
+ildouble: 1
+ldouble: 1
+
# sincos
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
-float: 1
idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
ifloat: 1
-# tan
-Test "tan (pi/4) == 1":
-double: 1
-idouble: 1
+# sqrt
+Test "sqrt (2) == M_SQRT2l":
+ildouble: 1
+ldouble: 1
+
+# tanh
+Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+Test "tanh (0.75) == 0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -510,6 +720,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
@@ -518,6 +730,9 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "tgamma (4) == 6":
+ildouble: 1
+ldouble: 1
# y0
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
@@ -533,19 +748,28 @@ ifloat: 1
Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "y0 (8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
# y1
Test "y1 (0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
+Test "y1 (0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "y1 (10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
@@ -556,11 +780,15 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
# yn
Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
@@ -576,17 +804,26 @@ ifloat: 1
Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
+Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
@@ -597,30 +834,44 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 5
+ldouble: 5
Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
double: 2
idouble: 2
+ildouble: 2
+ldouble: 2
Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
double: 1
idouble: 1
@@ -629,35 +880,39 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
double: 1
idouble: 1
# Maximal error of functions:
Function: "atan2":
-float: 6
-ifloat: 6
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "atanh":
float: 1
ifloat: 1
-Function: Real part of "cacosh":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
+Function: Imaginary part of "cacos":
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "cacosh":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "casin":
double: 1
@@ -665,107 +920,147 @@ float: 1
idouble: 1
ifloat: 1
+Function: Imaginary part of "casin":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "casinh":
double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "casinh":
double: 3
float: 6
idouble: 3
ifloat: 6
-
-Function: Real part of "catan":
-float: 4
-ifloat: 4
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "catan":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "catanh":
double: 4
idouble: 4
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "catanh":
-float: 6
-ifloat: 6
+ildouble: 1
+ldouble: 1
Function: "cbrt":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ccos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccos":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ccosh":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccosh":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "cexp":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "cexp":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "clog":
float: 1
ifloat: 1
-
-Function: Imaginary part of "clog":
-float: 3
-ifloat: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "clog10":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "clog10":
double: 1
-float: 5
+float: 1
idouble: 1
-ifloat: 5
+ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "cos":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "cpow":
double: 2
float: 4
idouble: 2
ifloat: 4
+ildouble: 10
+ldouble: 10
Function: Imaginary part of "cpow":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csin":
+ildouble: 1
+ldouble: 1
Function: Real part of "csinh":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "csinh":
double: 1
@@ -776,20 +1071,36 @@ ifloat: 1
Function: Real part of "csqrt":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan":
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctan":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
Function: Real part of "ctanh":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctanh":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "erf":
double: 1
@@ -798,18 +1109,32 @@ idouble: 1
Function: "erfc":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: "exp10":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "exp2":
+ildouble: 2
+ldouble: 2
Function: "expm1":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "gamma":
+ildouble: 1
+ldouble: 1
Function: "hypot":
float: 1
@@ -820,67 +1145,101 @@ double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "j1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 4
+ldouble: 4
Function: "jn":
double: 4
float: 4
idouble: 4
ifloat: 4
+ildouble: 4
+ldouble: 4
Function: "lgamma":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log10":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log1p":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log2":
+ildouble: 1
+ldouble: 1
Function: "sincos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sqrt":
+ildouble: 1
+ldouble: 1
Function: "tan":
double: 1
idouble: 1
+Function: "tanh":
+ildouble: 1
+ldouble: 1
+
Function: "tgamma":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "y0":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 3
+ldouble: 3
Function: "y1":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "yn":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 5
+ldouble: 5
# end of automatic generation
diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies
new file mode 100644
index 0000000..0d7000d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/alphaev6/fpu/Implies
@@ -0,0 +1,2 @@
+# Override ldbl-opt with alpha specific routines.
+alpha/alphaev6/fpu
diff --git a/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies
new file mode 100644
index 0000000..617c388
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/alphaev67/fpu/Implies
@@ -0,0 +1,2 @@
+# Override ldbl-opt with alpha specific routines.
+alpha/alphaev67/fpu
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
new file mode 100644
index 0000000..d76f511
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
@@ -0,0 +1,2 @@
+# Override ldbl-opt with alpha specific routines.
+alpha/fpu
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c3c8450b7a24d94b107e4e736ba0d5d6e3c2d9b
commit 0c3c8450b7a24d94b107e4e736ba0d5d6e3c2d9b
Author: Richard Henderson <rth@redhat.com>
Date: Tue Mar 13 21:28:03 2007 +0000
* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
separate cfi regions for the two subsections.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index aa42768..1db847c 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -55,6 +55,7 @@ __LABEL(name) \
bne a3, SYSCALL_ERROR_LABEL; \
__LABEL($pseudo_ret) \
.subsection 2; \
+ cfi_startproc; \
__LABEL($pseudo_cancel) \
subq sp, 64, sp; \
cfi_def_cfa_offset(64); \
@@ -90,12 +91,13 @@ __LABEL($multi_error) \
cfi_def_cfa_offset(0); \
__LABEL($syscall_error) \
SYSCALL_ERROR_HANDLER; \
+ cfi_endproc; \
.previous
# undef PSEUDO_END
# define PSEUDO_END(sym) \
- .subsection 2; \
cfi_endproc; \
+ .subsection 2; \
.size sym, .-sym
# define SAVE_ARGS_0 /* Nothing. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8f9994576b3a663e324975508e56cc0f877a33b
commit e8f9994576b3a663e324975508e56cc0f877a33b
Author: Richard Henderson <rth@redhat.com>
Date: Tue Mar 13 21:25:16 2007 +0000
* elf/dl-support.c (_dl_aux_init): Honor DL_PLATFORM_AUXV.
* sysdeps/unix/sysv/linux/alpha/dl-auxv.h: New file.
* sysdeps/unix/sysv/linux/alpha/dl-support.c: New file.
* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (__libc_alpha_cache_shape):
Move to dl-auxv.h; initialize instead of extern weak.
(DL_PLATFORM_AUXV): Move to dl-auxv.h; don't test for undef
weak symbol.
* sysdeps/unix/sysv/linux/alpha/sysconf.c (__libc_alpha_cache_shape):
Extern instead of initialized.
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h
similarity index 53%
copy from sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
copy to sysdeps/unix/sysv/linux/alpha/dl-auxv.h
index d95e46f..8afc4db 100644
--- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/alpha/dl-auxv.h
@@ -1,5 +1,5 @@
-/* Operating system support for run-time dynamic linker. Linux/Alpha version.
- Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
+/* Auxiliary vector processing for Linux/Alpha.
+ Copyright (C) 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,43 +17,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <config.h>
-#include <kernel-features.h>
-#include <ldsodefs.h>
-
-extern long __libc_alpha_cache_shape[4];
-weak_extern (__libc_alpha_cache_shape);
+/* Scan the Aux Vector for the cache shape entries. */
+long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
-/* Scan the Aux Vector for the cache shape entries. */
#define DL_PLATFORM_AUXV \
case AT_L1I_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[0] = av->a_un.a_val; \
- break; \
- } \
+ __libc_alpha_cache_shape[0] = av->a_un.a_val; \
+ break; \
case AT_L1D_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[1] = av->a_un.a_val; \
- break; \
- } \
+ __libc_alpha_cache_shape[1] = av->a_un.a_val; \
+ break; \
case AT_L2_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[2] = av->a_un.a_val; \
- break; \
- } \
+ __libc_alpha_cache_shape[2] = av->a_un.a_val; \
+ break; \
case AT_L3_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[3] = av->a_un.a_val; \
- break; \
- }
-
-#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
+ __libc_alpha_cache_shape[3] = av->a_un.a_val; \
+ break;
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-support.c b/sysdeps/unix/sysv/linux/alpha/dl-support.c
new file mode 100644
index 0000000..2902176
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/dl-support.c
@@ -0,0 +1,2 @@
+#include "dl-auxv.h"
+#include <elf/dl-support.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
index d95e46f..4034820 100644
--- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
@@ -1,59 +1,2 @@
-/* Operating system support for run-time dynamic linker. Linux/Alpha version.
- Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <config.h>
-#include <kernel-features.h>
-#include <ldsodefs.h>
-
-extern long __libc_alpha_cache_shape[4];
-weak_extern (__libc_alpha_cache_shape);
-
-
-/* Scan the Aux Vector for the cache shape entries. */
-#define DL_PLATFORM_AUXV \
- case AT_L1I_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[0] = av->a_un.a_val; \
- break; \
- } \
- case AT_L1D_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[1] = av->a_un.a_val; \
- break; \
- } \
- case AT_L2_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[2] = av->a_un.a_val; \
- break; \
- } \
- case AT_L3_CACHESHAPE: \
- { \
- long *cls = __libc_alpha_cache_shape; \
- if (cls != NULL) \
- cls[3] = av->a_un.a_val; \
- break; \
- }
-
+#include "dl-auxv.h"
#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c
index 2bbaf1f..3e5b4ee 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c
@@ -27,7 +27,7 @@ static long int linux_sysconf (int name);
#define CSHAPE(totalsize, linesize, assoc) \
((totalsize & ~0xff) | (linesize << 4) | assoc)
-long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+extern long __libc_alpha_cache_shape[4];
static inline unsigned long
implver (void)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22771b82f523fd8126fc9b0e828dd9ce83bb418c
commit 22771b82f523fd8126fc9b0e828dd9ce83bb418c
Author: Richard Henderson <rth@redhat.com>
Date: Tue Mar 13 16:05:44 2007 +0000
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Add support for
__sigsuspend_nocancel.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 48c3f27..6863c07 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -20,6 +20,19 @@
/* sigsuspend is a special syscall since it needs to dereference the
sigset. This will have to change when we have more than 64 signals. */
+#ifndef NO_CANCELLATION
+#include <sysdep.h>
+
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0);
+
+PSEUDO(__sigsuspend_nocancel, sigsuspend, 1)
+ ret
+/* Use END, not PSEUDO_END, so that we don't issue two $syscall_error
+ symbols; we'll jump into __sigsuspend for the error case. */
+END(__sigsuspend_nocancel)
+#endif /* NO_CANCELLATION */
+
#include <sysdep-cancel.h>
#undef PSEUDO_PREPARE_ARGS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b455ff91ed3854c11674e457888622748bc5c7f
commit 5b455ff91ed3854c11674e457888622748bc5c7f
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Feb 2 21:52:32 2007 +0000
2007-02-02 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define.
(PTR_DEMANGLE): Define.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index ca55308..068044a 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2007-02-02 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h (PTR_MANGLE): Define.
+ (PTR_DEMANGLE): Define.
+
2007-02-02 Guy Martin <gmsoft@tuxicoman.be>
* sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile):
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 5b12bc5..69ed700 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -479,3 +479,8 @@ L(pre_end): ASM_LINE_SEP \
#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26"
#endif /* __ASSEMBLER__ */
+
+/* Pointer mangling is not yet supported for HPPA. */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=186a83ab33198e5296157aa53faa29b07e750f2b
commit 186a83ab33198e5296157aa53faa29b07e750f2b
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Feb 2 21:50:19 2007 +0000
2007-02-02 Guy Martin <gmsoft@tuxicoman.be>
* sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile):
Add cfi_endproc.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 9c05eb1..ca55308 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2007-02-02 Guy Martin <gmsoft@tuxicoman.be>
+
+ * sysdeps/hppa/dl-trampoline.S (_dl_runtime_profile):
+ Add cfi_endproc.
+
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic
diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S
index e0d3b9b..c7c18ed 100644
--- a/sysdeps/hppa/dl-trampoline.S
+++ b/sysdeps/hppa/dl-trampoline.S
@@ -284,5 +284,6 @@ L(cont):
bv,n 0(%r2)
.EXIT
.PROCEND
+ cfi_endproc
.size _dl_runtime_profile, . - _dl_runtime_profile
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f50c692c2083ba1eaadc43696104b151bf9f40c3
commit f50c692c2083ba1eaadc43696104b151bf9f40c3
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Feb 1 15:43:00 2007 +0000
* sysdeps/mips/bits/mathdef.h (float_t): Change to float.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 6bf3313..159a4c2 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2007-02-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/bits/mathdef.h (float_t): Change to float.
+
2007-01-25 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/mips/bits/mathdef.h b/sysdeps/mips/bits/mathdef.h
index 99be0db..8ecce79 100644
--- a/sysdeps/mips/bits/mathdef.h
+++ b/sysdeps/mips/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,10 +26,9 @@
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
-/* Normally, there is no long double type and the `float' and `double'
- expressions are evaluated as `double'. */
-typedef double float_t; /* `float' expressions are evaluated as
- `double'. */
+/* MIPS has `float' and `double' operations. */
+typedef float float_t; /* `float' expressions are evaluated as
+ `float'. */
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb96755bb858e8a0db32f7ce360f21d902e4c306
commit eb96755bb858e8a0db32f7ce360f21d902e4c306
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Jan 25 13:08:14 2007 +0000
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl,
shmctl, and semctl.
* sysdeps/unix/sysv/linux/mips/misp64/semctl.c,
sysdeps/unix/sysv/linux/mips/mips64/shmctl.c,
sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7ee5bfd..6bf3313 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2007-01-25 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl,
+ shmctl, and semctl.
+ * sysdeps/unix/sysv/linux/mips/misp64/semctl.c,
+ sysdeps/unix/sysv/linux/mips/mips64/shmctl.c,
+ sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files.
+
2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE,
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c
new file mode 100644
index 0000000..646c348
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/msg.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+#include <bp-checks.h>
+
+int __msgctl (int msqid, int cmd, struct msqid_ds *buf);
+
+int
+__msgctl (int msqid, int cmd, struct msqid_ds *buf)
+{
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf));
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __msgctl, msgctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
new file mode 100644
index 0000000..4d38b38
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stdarg.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+/* Define a `union semun' suitable for Linux here. */
+union semun
+{
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
+ unsigned short int *array; /* array for GETALL & SETALL */
+ struct seminfo *__buf; /* buffer for IPC_INFO */
+};
+
+#include <bp-checks.h>
+#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
+
+int __semctl (int semid, int semnum, int cmd, ...);
+
+int
+__semctl (int semid, int semnum, int cmd, ...)
+{
+ union semun arg;
+ va_list ap;
+
+ va_start (ap, cmd);
+
+ /* Get the argument. */
+ arg = va_arg (ap, union semun);
+
+ va_end (ap);
+
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __semctl, semctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c
new file mode 100644
index 0000000..7e5150b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/shm.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+#include <bp-checks.h>
+
+int __shmctl (int shmid, int cmd, struct shmid_ds *buf);
+
+int
+__shmctl (int shmid, int cmd, struct shmid_ds *buf)
+{
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf));
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __shmctl, shmctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index 0d1657d..cac273c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -2,16 +2,14 @@
lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
-# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
+# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
+# wrappers (to set __IPC_64).
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
shmat - shmat i:ipi __shmat shmat
-shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
-semctl - semctl i:iiii __semctl semctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=908afa831ca4403a689304a86e2014b4baa66366
commit 908afa831ca4403a689304a86e2014b4baa66366
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 23 16:47:28 2007 +0000
* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):
Define.
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE,
PTR_DEMANGLE): Define.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (PTR_MANGLE,
PTR_DEMANGLE): Define.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (PTR_MANGLE,
PTR_DEMANGLE): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 299d930..ebad07a 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):
+ Define.
+
2007-01-08 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index facc304..7ee5bfd 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,14 @@
2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE,
+ PTR_DEMANGLE): Define.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (PTR_MANGLE,
+ PTR_DEMANGLE): Define.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (PTR_MANGLE,
+ PTR_DEMANGLE): Define.
+
+2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
(cfi_same_value): Delete definition.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 7692c1c..2952067 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -286,4 +286,8 @@ __local_syscall_error: \
#endif /* __ASSEMBLER__ */
+/* Pointer mangling is not yet supported for ARM. */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
#endif /* linux/arm/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 3da2412..3c19bff 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -289,4 +289,8 @@
#endif /* __ASSEMBLER__ */
+/* Pointer mangling is not yet supported for MIPS. */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
#endif /* linux/mips/mips32/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 247d4ff..d263598 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -245,4 +245,8 @@
"$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
+/* Pointer mangling is not yet supported for MIPS. */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index c238822..edf8786 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -245,4 +245,8 @@
"$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
+/* Pointer mangling is not yet supported for MIPS. */
+#define PTR_MANGLE(var) (void) (var)
+#define PTR_DEMANGLE(var) (void) (var)
+
#endif /* linux/mips/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3097800591bb59edf71359fddbf4693cb610dda
commit e3097800591bb59edf71359fddbf4693cb610dda
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 23 14:48:27 2007 +0000
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
(cfi_same_value): Delete definition.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 46fe53d..facc304 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
+ (cfi_same_value): Delete definition.
+
2007-01-08 Richard Sandiford <richard@codesourcery.com>
* sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
index 7e9d4bf..cb2cc07 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
@@ -28,12 +28,6 @@
happen before any instructions. So we use cfi_same_value instead of
cfi_restore. */
-#ifdef HAVE_ASM_CFI_DIRECTIVES
-# define cfi_same_value .cfi_same_value
-#else
-# define cfi_same_value
-#endif
-
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
#ifdef __PIC__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c73141f12a7ff4f99e14262c937f8c455a6a7965
commit c73141f12a7ff4f99e14262c937f8c455a6a7965
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Jan 23 14:47:02 2007 +0000
[BZ #2749]
* sysdeps/powerpc/nofpu/fenv_libc.h: New file.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 8f32962..015c95c 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,8 @@
+2007-01-23 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/powerpc/nofpu/fenv_libc.h: New file.
+
2007-01-08 Joseph Myers <joseph@codesourcery.com>
* sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions,
diff --git a/sysdeps/powerpc/nofpu/fenv_libc.h b/sysdeps/powerpc/nofpu/fenv_libc.h
new file mode 100644
index 0000000..db6996c
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fenv_libc.h
@@ -0,0 +1,29 @@
+/* Internal libc stuff for floating point environment routines.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _FENV_LIBC_H
+#define _FENV_LIBC_H 1
+
+/* fenv_libc.h is used in libm implementations of ldbl-128ibm. So we
+ need this version in the soft-fp to at minimum include fenv.h to
+ get the fegetround definition. */
+
+#include <fenv.h>
+
+#endif /* fenv_libc.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb5bcf7412057dcd78dc535b0eaf7c4c2e546c23
commit cb5bcf7412057dcd78dc535b0eaf7c4c2e546c23
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 15:34:50 2007 +0000
* sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete.
(elf_machine_reloc): New function, retaining the body of
elf_machine_rel. Take the reloc's r_info field as an argument,
not the reloc itself. Add extra r_addend and inplace_p arguments.
When inplace_p is false, use r_addend as the addend, not the contents
of the relocation field. Hoist the conversion of reloc_addr to
"ELFW(Addr) *". Don't try to apply TLS relocations against
undefined symbols. Add R_MIPS_GLOB_DAT support.
(elf_machine_rel, elf_machine_rela): Use elf_machine_reloc.
(elf_machine_lazy_rel): Change the reloc type from ElfW(Rel)
to ElfW(Rela).
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 82d0d0a..46fe53d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,17 @@
+2007-01-08 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete.
+ (elf_machine_reloc): New function, retaining the body of
+ elf_machine_rel. Take the reloc's r_info field as an argument,
+ not the reloc itself. Add extra r_addend and inplace_p arguments.
+ When inplace_p is false, use r_addend as the addend, not the contents
+ of the relocation field. Hoist the conversion of reloc_addr to
+ "ELFW(Addr) *". Don't try to apply TLS relocations against
+ undefined symbols. Add R_MIPS_GLOB_DAT support.
+ (elf_machine_rel, elf_machine_rela): Use elf_machine_reloc.
+ (elf_machine_lazy_rel): Change the reloc type from ElfW(Rel)
+ to ElfW(Rela).
+
2007-01-08 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index b912184..c92a1a3 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006
+ Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -282,9 +282,6 @@ do { \
".previous"\
);
-/* The MIPS never uses Elfxx_Rela relocations. */
-#define ELF_MACHINE_NO_RELA 1
-
/* Names of the architecture-specific auditing callback functions. */
# if _MIPS_SIM == _ABIO32
# define ARCH_LA_PLTENTER mips_o32_gnu_pltenter
@@ -301,16 +298,18 @@ do { \
#ifdef RESOLVE_MAP
-/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+/* Perform a relocation described by R_INFO at the location pointed to
+ by RELOC_ADDR. SYM is the relocation symbol specified by R_INFO and
MAP is the object containing the reloc. */
auto inline void
__attribute__ ((always_inline))
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- void *const reloc_addr)
+elf_machine_reloc (struct link_map *map, ElfW(Word) r_info,
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ void *reloc_addr, ElfW(Addr) r_addend, int inplace_p)
{
- const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
+ const unsigned long int r_type = ELFW(R_TYPE) (r_info);
+ ElfW(Addr) *addr_field = (ElfW(Addr) *) reloc_addr;
#if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a;
@@ -342,18 +341,28 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
case R_MIPS_TLS_DTPMOD64:
case R_MIPS_TLS_DTPMOD32:
if (sym_map)
- *(ElfW(Addr) *)reloc_addr = sym_map->l_tls_modid;
+ *addr_field = sym_map->l_tls_modid;
break;
case R_MIPS_TLS_DTPREL64:
case R_MIPS_TLS_DTPREL32:
- *(ElfW(Addr) *)reloc_addr += TLS_DTPREL_VALUE (sym);
+ if (sym)
+ {
+ if (inplace_p)
+ r_addend = *addr_field;
+ *addr_field = r_addend + TLS_DTPREL_VALUE (sym);
+ }
break;
case R_MIPS_TLS_TPREL32:
case R_MIPS_TLS_TPREL64:
- CHECK_STATIC_TLS (map, sym_map);
- *(ElfW(Addr) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym);
+ if (sym)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ if (inplace_p)
+ r_addend = *addr_field;
+ *addr_field = r_addend + TLS_TPREL_VALUE (sym_map, sym);
+ }
break;
}
@@ -367,13 +376,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
case R_MIPS_REL32:
#endif
{
- int symidx = ELFW(R_SYM) (reloc->r_info);
+ int symidx = ELFW(R_SYM) (r_info);
ElfW(Addr) reloc_value;
- /* Support relocations on mis-aligned offsets. Should we ever
- implement RELA, this should be replaced with an assignment
- from reloc->r_addend. */
- __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value));
+ if (inplace_p)
+ /* Support relocations on mis-aligned offsets. */
+ __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value));
+ else
+ reloc_value = r_addend;
if (symidx)
{
@@ -424,6 +434,31 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
__builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value));
}
break;
+#ifndef RTLD_BOOTSTRAP
+#if _MIPS_SIM == _ABI64
+ case (R_MIPS_64 << 8) | R_MIPS_GLOB_DAT:
+#else
+ case R_MIPS_GLOB_DAT:
+#endif
+ {
+ int symidx = ELFW(R_SYM) (r_info);
+ const ElfW(Word) gotsym
+ = (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+
+ if (__builtin_expect ((ElfW(Word)) symidx >= gotsym, 1))
+ {
+ const ElfW(Addr) *got
+ = (const ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
+ const ElfW(Word) local_gotno
+ = ((const ElfW(Word))
+ map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val);
+
+ ElfW(Addr) reloc_value = got[symidx + local_gotno - gotsym];
+ __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value));
+ }
+ }
+ break;
+#endif
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
#if _MIPS_SIM == _ABI64
@@ -436,7 +471,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
itself. For ABI compliance, we ignore such _64 dummy
relocations. For RELA, this may be simply removed, since
it's totally unnecessary. */
- if (ELFW(R_SYM) (reloc->r_info) == 0)
+ if (ELFW(R_SYM) (r_info) == 0)
break;
/* Fall through. */
#endif
@@ -446,6 +481,18 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
}
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+auto inline void
+__attribute__ ((always_inline))
+elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ void *const reloc_addr)
+{
+ elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, 0, 1);
+}
+
auto inline void
__attribute__((always_inline))
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
@@ -457,7 +504,7 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
auto inline void
__attribute__((always_inline))
elf_machine_lazy_rel (struct link_map *map,
- ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
+ ElfW(Addr) l_addr, const ElfW(Rela) *reloc)
{
/* Do nothing. */
}
@@ -468,6 +515,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr)
{
+ elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr,
+ reloc->r_addend, 0);
}
auto inline void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2caa93e20653788f4f85863edf877c1ab7e3ab45
commit 2caa93e20653788f4f85863edf877c1ab7e3ab45
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 15:26:51 2007 +0000
* sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct
multiple inclusion guard.
* sysdeps/mips/elf/ldsodefs.h: Delete file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 5996d26..82d0d0a 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2007-01-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/mips/ldsodefs.h: Merge sysdeps/mips/elf/ldsodefs.h. Correct
+ multiple inclusion guard.
+ * sysdeps/mips/elf/ldsodefs.h: Delete file.
+
2007-01-04 Thiemo Seufer <ths@networkno.de>
* sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update
diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h
deleted file mode 100644
index 3868b50..0000000
--- a/sysdeps/mips/elf/ldsodefs.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _MIPS_LDSODEFS_H
-#define _MIPS_LDSODEFS_H
-
-/* The MIPS ABI specifies that the dynamic section has to be read-only. */
-
-#define DL_RO_DYN_SECTION 1
-
-#include_next <ldsodefs.h>
-
-/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
- relocation entry specifies up to three actual relocations, all at
- the same address. The first relocation which required a symbol
- uses the symbol in the r_sym field. The second relocation which
- requires a symbol uses the symbol in the r_ssym field. If all
- three relocations require a symbol, the third one uses a zero
- value.
-
- We define these structures in internal headers because we're not
- sure we want to make them part of the ABI yet. Eventually, some of
- this may move into elf/elf.h. */
-
-/* An entry in a 64 bit SHT_REL section. */
-
-typedef struct
-{
- Elf32_Word r_sym; /* Symbol index */
- unsigned char r_ssym; /* Special symbol for 2nd relocation */
- unsigned char r_type3; /* 3rd relocation type */
- unsigned char r_type2; /* 2nd relocation type */
- unsigned char r_type1; /* 1st relocation type */
-} _Elf64_Mips_R_Info;
-
-typedef union
-{
- Elf64_Xword r_info_number;
- _Elf64_Mips_R_Info r_info_fields;
-} _Elf64_Mips_R_Info_union;
-
-typedef struct
-{
- Elf64_Addr r_offset; /* Address */
- _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
-} Elf64_Mips_Rel;
-
-typedef struct
-{
- Elf64_Addr r_offset; /* Address */
- _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
- Elf64_Sxword r_addend; /* Addend */
-} Elf64_Mips_Rela;
-
-#define ELF64_MIPS_R_SYM(i) \
- ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)
-#define ELF64_MIPS_R_TYPE(i) \
- (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \
- | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
- ).r_info_fields.r_type2 << 8) \
- | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
- ).r_info_fields.r_type3 << 16) \
- | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
- ).r_info_fields.r_ssym << 24))
-#define ELF64_MIPS_R_INFO(sym, type) \
- (__extension__ (_Elf64_Mips_R_Info_union) \
- (__extension__ (_Elf64_Mips_R_Info) \
- { (sym), ELF64_MIPS_R_SSYM (type), \
- ELF64_MIPS_R_TYPE3 (type), \
- ELF64_MIPS_R_TYPE2 (type), \
- ELF64_MIPS_R_TYPE1 (type) \
- }).r_info_number)
-/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and
- compose it back into a value that it can be used as an argument to
- ELF64_MIPS_R_INFO. */
-#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)
-#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)
-#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)
-#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff)
-#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \
- ((type1) \
- | ((Elf32_Word)(type2) << 8) \
- | ((Elf32_Word)(type3) << 16) \
- | ((Elf32_Word)(ssym) << 24))
-
-#undef ELF64_R_SYM
-#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i)
-#undef ELF64_R_TYPE
-#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i)
-#undef ELF64_R_INFO
-#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type))
-
-#endif
diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h
index 876f1c3..5f85eef 100644
--- a/sysdeps/mips/ldsodefs.h
+++ b/sysdeps/mips/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef __LDSODEFS_H \
+#ifndef _MIPS_LDSODEFS_H
#define _MIPS_LDSODEFS_H 1
#include <elf.h>
@@ -61,6 +61,90 @@ struct La_mips_64_retval;
struct La_mips_64_retval *, \
const char *);
+/* The MIPS ABI specifies that the dynamic section has to be read-only. */
+
+#define DL_RO_DYN_SECTION 1
+
#include_next <ldsodefs.h>
+/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
+ relocation entry specifies up to three actual relocations, all at
+ the same address. The first relocation which required a symbol
+ uses the symbol in the r_sym field. The second relocation which
+ requires a symbol uses the symbol in the r_ssym field. If all
+ three relocations require a symbol, the third one uses a zero
+ value.
+
+ We define these structures in internal headers because we're not
+ sure we want to make them part of the ABI yet. Eventually, some of
+ this may move into elf/elf.h. */
+
+/* An entry in a 64 bit SHT_REL section. */
+
+typedef struct
+{
+ Elf32_Word r_sym; /* Symbol index */
+ unsigned char r_ssym; /* Special symbol for 2nd relocation */
+ unsigned char r_type3; /* 3rd relocation type */
+ unsigned char r_type2; /* 2nd relocation type */
+ unsigned char r_type1; /* 1st relocation type */
+} _Elf64_Mips_R_Info;
+
+typedef union
+{
+ Elf64_Xword r_info_number;
+ _Elf64_Mips_R_Info r_info_fields;
+} _Elf64_Mips_R_Info_union;
+
+typedef struct
+{
+ Elf64_Addr r_offset; /* Address */
+ _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
+} Elf64_Mips_Rel;
+
+typedef struct
+{
+ Elf64_Addr r_offset; /* Address */
+ _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
+ Elf64_Sxword r_addend; /* Addend */
+} Elf64_Mips_Rela;
+
+#define ELF64_MIPS_R_SYM(i) \
+ ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)
+#define ELF64_MIPS_R_TYPE(i) \
+ (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_type2 << 8) \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_type3 << 16) \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_ssym << 24))
+#define ELF64_MIPS_R_INFO(sym, type) \
+ (__extension__ (_Elf64_Mips_R_Info_union) \
+ (__extension__ (_Elf64_Mips_R_Info) \
+ { (sym), ELF64_MIPS_R_SSYM (type), \
+ ELF64_MIPS_R_TYPE3 (type), \
+ ELF64_MIPS_R_TYPE2 (type), \
+ ELF64_MIPS_R_TYPE1 (type) \
+ }).r_info_number)
+/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and
+ compose it back into a value that it can be used as an argument to
+ ELF64_MIPS_R_INFO. */
+#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)
+#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)
+#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)
+#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff)
+#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \
+ ((type1) \
+ | ((Elf32_Word)(type2) << 8) \
+ | ((Elf32_Word)(type3) << 16) \
+ | ((Elf32_Word)(ssym) << 24))
+
+#undef ELF64_R_SYM
+#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i)
+#undef ELF64_R_TYPE
+#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i)
+#undef ELF64_R_INFO
+#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type))
+
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=234e3f65678348e3c050dcaec14f656cd08a60ec
commit 234e3f65678348e3c050dcaec14f656cd08a60ec
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 15:10:14 2007 +0000
* sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions,
__sim_disabled_exceptions, __sim_round_mode): Remove declarations.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index aee24e2..8f32962 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,8 @@
+2007-01-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/powerpc/nofpu/fesetenv.c (__sim_exceptions,
+ __sim_disabled_exceptions, __sim_round_mode): Remove declarations.
+
2006-10-05 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #2749]
diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c
index 43d03a4..90e084c 100644
--- a/sysdeps/powerpc/nofpu/fesetenv.c
+++ b/sysdeps/powerpc/nofpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Set floating point environment (soft-float edition).
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2007 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -22,10 +22,6 @@
#include "soft-supp.h"
#include <bp-sym.h>
-extern int __sim_exceptions attribute_hidden;
-extern int __sim_disabled_exceptions attribute_hidden;
-extern int __sim_round_mode attribute_hidden;
-
int
__fesetenv (const fenv_t *envp)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c916dad5b56adb0f1a256ccbd85f3eab148ddd7
commit 3c916dad5b56adb0f1a256ccbd85f3eab148ddd7
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 15:06:00 2007 +0000
* sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
* sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 32a1ca8..299d930 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2007-01-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/check_pf.c: New file.
+ * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: New file.
+
2007-01-08 Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/fpu/bits/mathdef.h: Move to
diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c
new file mode 100644
index 0000000..ee13d80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/check_pf.c
@@ -0,0 +1,274 @@
+/* Determine protocol families for which interfaces exist. ARM Linux version.
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <assert.h>
+#include <errno.h>
+#include <ifaddrs.h>
+#include <netdb.h>
+#include <stddef.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/socket.h>
+
+#include <asm/types.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+
+#include <not-cancel.h>
+#include <kernel-features.h>
+
+
+#ifndef IFA_F_TEMPORARY
+# define IFA_F_TEMPORARY IFA_F_SECONDARY
+#endif
+#ifndef IFA_F_HOMEADDRESS
+# define IFA_F_HOMEADDRESS 0
+#endif
+
+
+static int
+make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
+ struct in6addrinfo **in6ai, size_t *in6ailen)
+{
+ struct req
+ {
+ struct nlmsghdr nlh;
+ struct rtgenmsg g;
+ } req;
+ struct sockaddr_nl nladdr;
+
+ /* struct rtgenmsg consists of a single byte but the ARM ABI rounds
+ it up to a word. Clear the padding explicitly here. */
+ assert (sizeof (req.g) == 4);
+ memset (&req.g, '\0', sizeof (req.g));
+
+ req.nlh.nlmsg_len = sizeof (req);
+ req.nlh.nlmsg_type = RTM_GETADDR;
+ req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
+ req.nlh.nlmsg_pid = 0;
+ req.nlh.nlmsg_seq = time (NULL);
+ req.g.rtgen_family = AF_UNSPEC;
+
+ memset (&nladdr, '\0', sizeof (nladdr));
+ nladdr.nl_family = AF_NETLINK;
+
+ if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
+ (struct sockaddr *) &nladdr,
+ sizeof (nladdr))) < 0)
+ return -1;
+
+ *seen_ipv4 = false;
+ *seen_ipv6 = false;
+
+ bool done = false;
+ char buf[4096];
+ struct iovec iov = { buf, sizeof (buf) };
+ struct in6ailist
+ {
+ struct in6addrinfo info;
+ struct in6ailist *next;
+ } *in6ailist = NULL;
+ size_t in6ailistlen = 0;
+
+ do
+ {
+ struct msghdr msg =
+ {
+ (void *) &nladdr, sizeof (nladdr),
+ &iov, 1,
+ NULL, 0,
+ 0
+ };
+
+ ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
+ if (read_len < 0)
+ return -1;
+
+ if (msg.msg_flags & MSG_TRUNC)
+ return -1;
+
+ struct nlmsghdr *nlmh;
+ for (nlmh = (struct nlmsghdr *) buf;
+ NLMSG_OK (nlmh, (size_t) read_len);
+ nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
+ {
+ if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid
+ || nlmh->nlmsg_seq != req.nlh.nlmsg_seq)
+ continue;
+
+ if (nlmh->nlmsg_type == RTM_NEWADDR)
+ {
+ struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh);
+
+ switch (ifam->ifa_family)
+ {
+ case AF_INET:
+ *seen_ipv4 = true;
+ break;
+ case AF_INET6:
+ *seen_ipv6 = true;
+
+ if (ifam->ifa_flags & (IFA_F_DEPRECATED
+ | IFA_F_TEMPORARY
+ | IFA_F_HOMEADDRESS))
+ {
+ struct rtattr *rta = IFA_RTA (ifam);
+ size_t len = (nlmh->nlmsg_len
+ - NLMSG_LENGTH (sizeof (*ifam)));
+ void *local = NULL;
+ void *address = NULL;
+ while (RTA_OK (rta, len))
+ {
+ switch (rta->rta_type)
+ {
+ case IFA_LOCAL:
+ local = RTA_DATA (rta);
+ break;
+
+ case IFA_ADDRESS:
+ address = RTA_DATA (rta);
+ break;
+ }
+
+ rta = RTA_NEXT (rta, len);
+ }
+
+ struct in6ailist *newp = alloca (sizeof (*newp));
+ newp->info.flags = (((ifam->ifa_flags & IFA_F_DEPRECATED)
+ ? in6ai_deprecated : 0)
+ | ((ifam->ifa_flags
+ & IFA_F_TEMPORARY)
+ ? in6ai_temporary : 0)
+ | ((ifam->ifa_flags
+ & IFA_F_HOMEADDRESS)
+ ? in6ai_homeaddress : 0));
+ memcpy (newp->info.addr, address ?: local,
+ sizeof (newp->info.addr));
+ newp->next = in6ailist;
+ in6ailist = newp;
+ ++in6ailistlen;
+ }
+ break;
+ default:
+ /* Ignore. */
+ break;
+ }
+ }
+ else if (nlmh->nlmsg_type == NLMSG_DONE)
+ /* We found the end, leave the loop. */
+ done = true;
+ }
+ }
+ while (! done);
+
+ close_not_cancel_no_status (fd);
+
+ if (in6ailist != NULL)
+ {
+ *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
+ if (*in6ai == NULL)
+ return -1;
+
+ *in6ailen = in6ailistlen;
+
+ do
+ {
+ (*in6ai)[--in6ailistlen] = in6ailist->info;
+ in6ailist = in6ailist->next;
+ }
+ while (in6ailist != NULL);
+ }
+
+ return 0;
+}
+
+
+/* We don't know if we have NETLINK support compiled in in our
+ Kernel. */
+#if __ASSUME_NETLINK_SUPPORT == 0
+/* Define in ifaddrs.h. */
+extern int __no_netlink_support attribute_hidden;
+#else
+# define __no_netlink_support 0
+#endif
+
+
+void
+attribute_hidden
+__check_pf (bool *seen_ipv4, bool *seen_ipv6,
+ struct in6addrinfo **in6ai, size_t *in6ailen)
+{
+ *in6ai = NULL;
+ *in6ailen = 0;
+
+ if (! __no_netlink_support)
+ {
+ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
+
+ struct sockaddr_nl nladdr;
+ memset (&nladdr, '\0', sizeof (nladdr));
+ nladdr.nl_family = AF_NETLINK;
+
+ socklen_t addr_len = sizeof (nladdr);
+
+ if (fd >= 0
+ && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
+ && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0
+ && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
+ in6ai, in6ailen) == 0)
+ /* It worked. */
+ return;
+
+ if (fd >= 0)
+ __close (fd);
+
+#if __ASSUME_NETLINK_SUPPORT == 0
+ /* Remember that there is no netlink support. */
+ __no_netlink_support = 1;
+#else
+ /* We cannot determine what interfaces are available. Be
+ pessimistic. */
+ *seen_ipv4 = true;
+ *seen_ipv6 = true;
+#endif
+ }
+
+#if __ASSUME_NETLINK_SUPPORT == 0
+ /* No netlink. Get the interface list via getifaddrs. */
+ struct ifaddrs *ifa = NULL;
+ if (getifaddrs (&ifa) != 0)
+ {
+ /* We cannot determine what interfaces are available. Be
+ pessimistic. */
+ *seen_ipv4 = true;
+ *seen_ipv6 = true;
+ return;
+ }
+
+ struct ifaddrs *runp;
+ for (runp = ifa; runp != NULL; runp = runp->ifa_next)
+ if (runp->ifa_addr->sa_family == PF_INET)
+ *seen_ipv4 = true;
+ else if (runp->ifa_addr->sa_family == PF_INET6)
+ *seen_ipv6 = true;
+
+ (void) freeifaddrs (ifa);
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
new file mode 100644
index 0000000..3e80bbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/check_pf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d50fd6886654c9cd84e1df57ed86a19080e302e1
commit d50fd6886654c9cd84e1df57ed86a19080e302e1
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 14:58:21 2007 +0000
* sysdeps/arm/fpu/bits/mathdef.h: Move to
sysdeps/arm/bits/mathdef.h. Remove comment about FPA.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1acbbd2..32a1ca8 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2007-01-08 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/arm/fpu/bits/mathdef.h: Move to
+ sysdeps/arm/bits/mathdef.h. Remove comment about FPA.
+
+2007-01-08 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/arm/eabi/jmpbuf-offsets.h: New.
2006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/bits/mathdef.h
similarity index 91%
rename from sysdeps/arm/fpu/bits/mathdef.h
rename to sysdeps/arm/bits/mathdef.h
index e013e74..daca110 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/bits/mathdef.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2004, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +39,5 @@ typedef double double_t; /* `double' expressions are evaluated as
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. This disables the
declaration of all the `long double' function variants. */
-/* XXX The FPA does support this but the patterns in GCC are currently
- turned off. */
# define __NO_LONG_DOUBLE_MATH 1
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8545d6c0ab1cd5d17cb88385abafcb3f1ac7baa6
commit 8545d6c0ab1cd5d17cb88385abafcb3f1ac7baa6
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jan 8 14:53:26 2007 +0000
* sysdeps/arm/eabi/jmpbuf-offsets.h: New.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 88c3c87..1acbbd2 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2007-01-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/eabi/jmpbuf-offsets.h: New.
+
2006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
diff --git a/sysdeps/arm/eabi/jmpbuf-offsets.h b/sysdeps/arm/eabi/jmpbuf-offsets.h
new file mode 100644
index 0000000..1ca33ff
--- /dev/null
+++ b/sysdeps/arm/eabi/jmpbuf-offsets.h
@@ -0,0 +1,20 @@
+/* Private macros for accessing __jmp_buf contents. ARM EABI version.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __JMP_BUF_SP 8
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84f3ca6e4921f304e5bd2efc0a047a3365d3df12
commit 84f3ca6e4921f304e5bd2efc0a047a3365d3df12
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jan 5 02:21:54 2007 +0000
* sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update
to match the kernel.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7c46aa1..5996d26 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2007-01-04 Thiemo Seufer <ths@networkno.de>
+
+ * sysdeps/unix/sysv/linux/mips/bits/msq.h (struct msqid_ds): Update
+ to match the kernel.
+
2006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h
index c2c1dd2..5d72fc1 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/msq.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,16 +38,34 @@ typedef unsigned long int msglen_t;
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused1;
+#endif
__time_t msg_stime; /* time of last msgsnd command */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused1;
+#endif
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused2;
+#endif
__time_t msg_rtime; /* time of last msgrcv command */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused2;
+#endif
+#if __WORDSIZE == 32 && defined (__MIPSEB__)
+ unsigned long int __unused3;
+#endif
__time_t msg_ctime; /* time of last change */
+#if __WORDSIZE == 32 && defined (__MIPSEL__)
+ unsigned long int __unused3;
+#endif
unsigned long int __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
__pid_t msg_lspid; /* pid of last msgsnd() */
__pid_t msg_lrpid; /* pid of last msgrcv() */
- unsigned long int __unused1;
- unsigned long int __unused2;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
};
#ifdef __USE_MISC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ad1f14c7aef8982a7943e516477484dceb7abe0
commit 3ad1f14c7aef8982a7943e516477484dceb7abe0
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Dec 3 23:03:20 2006 +0000
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic
versions. Adjust jump target to '0b'.
2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/Makefile: Set long-double-fcts to `no'.
* sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
* sysdeps/hppa/fpu/bits/mathdef.h: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 429c6c2..9c05eb1 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,14 @@
+2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Remove non-atomic
+ versions. Adjust jump target to '0b'.
+
+2006-12-03 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/Makefile: Set long-double-fcts to `no'.
+ * sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
+ * sysdeps/hppa/fpu/bits/mathdef.h: New file.
+
2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_init.c: New file.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 7394703..3cdd6c8 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -39,3 +39,8 @@ sysdep_routines += libgcc-compat
shared-only-routines += libgcc-compat
endif
endif
+
+# We implement a 64-bit `long double'. The standard says we can do this.
+# This means our `long double' and `double' are identical.
+long-double-fcts = no
+
diff --git a/sysdeps/hppa/fpu/bits/mathdef.h b/sysdeps/hppa/fpu/bits/mathdef.h
new file mode 100644
index 0000000..8734ba1
--- /dev/null
+++ b/sysdeps/hppa/fpu/bits/mathdef.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
+/* GCC does not promote `float' values to `double'. */
+typedef float float_t; /* `float' expressions are evaluated as
+ `float'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN (2147483647)
+
+#endif /* ISO C99 */
+
+/* On hppa `long double' is 64-bits. */
+#undef __NO_LONG_DOUBLE_MATH
+
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
index c4ffefa..b8ec3d2 100644
--- a/sysdeps/hppa/fpu/libm-test-ulps
+++ b/sysdeps/hppa/fpu/libm-test-ulps
@@ -1,15 +1,12 @@
# Begin of automatic generation
# atan2
-Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380":
-float: 6
-ifloat: 6
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
-float: 3
-ifloat: 3
+float: 1
+ifloat: 1
Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
float: 1
ifloat: 1
@@ -20,16 +17,9 @@ float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
+float: 1
+ifloat: 1
# casin
Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
@@ -37,6 +27,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -44,11 +36,15 @@ double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 5
+ldouble: 5
Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
+ildouble: 3
+ldouble: 3
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -57,44 +53,46 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# catan
-Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
-float: 3
-ifloat: 3
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
-float: 4
-ifloat: 4
+ildouble: 1
+ldouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
double: 4
idouble: 4
-Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
-float: 4
-ifloat: 4
+ildouble: 4
+ldouble: 4
Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
double: 1
idouble: 1
-Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
-float: 6
-ifloat: 6
+ildouble: 1
+ldouble: 1
# cbrt
Test "cbrt (-27.0) == -3.0":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# ccos
Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
@@ -105,6 +103,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
float: 1
ifloat: 1
@@ -121,10 +121,32 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
float: 1
ifloat: 1
+# ceil
+Test "ceil (-4503599627370496.75) == -4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "ceil (-4503599627370497.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "ceil (-9007199254740991.5) == -9007199254740991.0":
+ildouble: 1
+ldouble: 1
+Test "ceil (-9007199254740993.5) == -9007199254740993.0":
+ildouble: 1
+ldouble: 1
+Test "ceil (4503599627370496.25) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "ceil (4503599627370496.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+
# cexp
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
@@ -134,9 +156,6 @@ float: 1
ifloat: 1
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
-float: 3
-ifloat: 3
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
@@ -150,9 +169,9 @@ float: 1
ifloat: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
-float: 5
idouble: 1
-ifloat: 5
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -196,19 +215,16 @@ ifloat: 1
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
-float: 1
idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "cos (pi/2) == 0":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+ildouble: 2
+ldouble: 2
# cpow
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
@@ -222,16 +238,22 @@ double: 1
float: 4
idouble: 1
ifloat: 4
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
double: 2
float: 3
idouble: 2
ifloat: 3
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
idouble: 1
ifloat: 4
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
float: 2
ifloat: 2
@@ -240,11 +262,15 @@ double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
# csinh
Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
@@ -264,6 +290,8 @@ ifloat: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -271,25 +299,35 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# erfc
Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# exp10
Test "exp10 (-1) == 0.1":
@@ -297,25 +335,53 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "exp10 (3) == 1000":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 6
+ldouble: 6
# expm1
Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "expm1 (1) == M_El - 1.0":
float: 1
ifloat: 1
+# floor
+Test "floor (-4503599627370496.25) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "floor (-4503599627370496.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "floor (4503599627370496.75) == 4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "floor (4503599627370497.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "floor (9007199254740991.5) == 9007199254740991.0":
+ildouble: 1
+ldouble: 1
+Test "floor (9007199254740993.5) == 9007199254740993.0":
+ildouble: 1
+ldouble: 1
+
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
@@ -348,6 +414,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "j0 (0.75) == 0.864242275166648623555731103820923211":
float: 1
ifloat: 1
@@ -356,6 +424,8 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "j0 (2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
@@ -364,6 +434,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "j0 (8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
@@ -375,9 +447,13 @@ ifloat: 2
Test "j1 (2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "j1 (8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# jn
Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -385,6 +461,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
float: 1
ifloat: 1
@@ -393,6 +471,8 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
@@ -401,6 +481,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
@@ -410,24 +492,34 @@ ifloat: 2
Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 4
+ldouble: 4
Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 4
ifloat: 4
@@ -436,21 +528,29 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
# lgamma
Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
@@ -458,11 +558,291 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# llrint
+Test "llrint (-72057594037927936.75) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint (-72057594037927937.5) == -72057594037927938LL":
+ildouble: 2
+ldouble: 2
+Test "llrint (-9007199254740992.75) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint (72057594037927936.75) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint (72057594037927937.5) == 72057594037927938LL":
+ildouble: -2
+ldouble: -2
+Test "llrint (9007199254740992.75) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+
+# llrint_downward
+Test "llrint_downward (-4503599627370496.25) == -4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-4503599627370496.4999999999999) == -4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-4503599627370496.5) == -4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-4503599627370497.4999999999999) == -4503599627370498LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-72057594037927936.25) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-72057594037927936.5) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-72057594037927936.75) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-72057594037927937.5) == -72057594037927938LL":
+ildouble: 2
+ldouble: 2
+Test "llrint_downward (-9007199254740991.4999999999999) == -9007199254740992LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-9007199254740992.25) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-9007199254740992.4999999999999) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-9007199254740992.5) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-9007199254740992.5000000000001) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (-9007199254740992.75) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (4503599627370496.5000000000001) == 4503599627370496LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (4503599627370496.75) == 4503599627370496LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (4503599627370497.5) == 4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (72057594037927935.5) == 72057594037927935LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (72057594037927937.5) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_downward (9007199254740991.5) == 9007199254740991LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (9007199254740991.5000000000001) == 9007199254740991LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (9007199254740993.4999999999999) == 9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (9007199254740993.5) == 9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_downward (9007199254740993.5000000000001) == 9007199254740993LL":
+ildouble: 1
+ldouble: 1
+
+# llrint_tonearest
+Test "llrint_tonearest (-72057594037927936.75) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_tonearest (-72057594037927937.5) == -72057594037927938LL":
+ildouble: 2
+ldouble: 2
+Test "llrint_tonearest (-9007199254740992.75) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_tonearest (72057594037927936.75) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_tonearest (72057594037927937.5) == 72057594037927938LL":
+ildouble: -2
+ldouble: -2
+Test "llrint_tonearest (9007199254740992.75) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+
+# llrint_towardzero
+Test "llrint_towardzero (-4503599627370496.75) == -4503599627370496LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (-4503599627370497.5) == -4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (-72057594037927935.5) == -72057594037927935LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (-72057594037927937.5) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_towardzero (-9007199254740991.5) == -9007199254740991LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (-9007199254740993.5) == -9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (4503599627370496.75) == 4503599627370496LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_towardzero (4503599627370497.5) == 4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_towardzero (72057594037927935.5) == 72057594037927935LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_towardzero (72057594037927937.5) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_towardzero (9007199254740991.5) == 9007199254740991LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_towardzero (9007199254740993.5) == 9007199254740993LL":
+ildouble: 1
+ldouble: 1
+
+# llrint_upward
+Test "llrint_upward (-4503599627370496.5000000000001) == -4503599627370496LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-4503599627370496.75) == -4503599627370496LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-4503599627370497.5) == -4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-72057594037927935.5) == -72057594037927935LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-72057594037927937.5) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llrint_upward (-9007199254740991.5) == -9007199254740991LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-9007199254740991.5000000000001) == -9007199254740991LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-9007199254740993.4999999999999) == -9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-9007199254740993.5) == -9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (-9007199254740993.5000000000001) == -9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (4503599627370496.25) == 4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (4503599627370496.4999999999999) == 4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (4503599627370496.5) == 4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (4503599627370497.4999999999999) == 4503599627370498LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (72057594037927936.25) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (72057594037927936.5) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (72057594037927936.75) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (72057594037927937.5) == 72057594037927938LL":
+ildouble: -2
+ldouble: -2
+Test "llrint_upward (9007199254740991.4999999999999) == 9007199254740992LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (9007199254740992.25) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (9007199254740992.4999999999999) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (9007199254740992.5) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (9007199254740992.5000000000001) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llrint_upward (9007199254740992.75) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+
+# llround
+Test "llround (-4503599627370496.5) == -4503599627370497LL":
+ildouble: 1
+ldouble: 1
+Test "llround (-72057594037927936.5) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llround (-72057594037927936.75) == -72057594037927937LL":
+ildouble: 1
+ldouble: 1
+Test "llround (-72057594037927937.5) == -72057594037927938LL":
+ildouble: 2
+ldouble: 2
+Test "llround (-9007199254740992.5) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llround (-9007199254740992.75) == -9007199254740993LL":
+ildouble: 1
+ldouble: 1
+Test "llround (-9223372036854775806.25) == -9223372036854775806LL":
+ildouble: -2
+ldouble: -2
+Test "llround (-9223372036854775806.5) == -9223372036854775807LL":
+ildouble: -1
+ldouble: -1
+Test "llround (-9223372036854775807.0) == -9223372036854775807LL":
+ildouble: -1
+ldouble: -1
+Test "llround (4503599627370496.5) == 4503599627370497LL":
+ildouble: -1
+ldouble: -1
+Test "llround (72057594037927936.5) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llround (72057594037927936.75) == 72057594037927937LL":
+ildouble: -1
+ldouble: -1
+Test "llround (72057594037927937.5) == 72057594037927938LL":
+ildouble: -2
+ldouble: -2
+Test "llround (9007199254740992.5) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llround (9007199254740992.75) == 9007199254740993LL":
+ildouble: -1
+ldouble: -1
+Test "llround (9223372036854775806.25) == 9223372036854775806LL":
+ildouble: 1
+ldouble: 1
# log10
Test "log10 (0.75) == -0.124938736608299953132449886193870744":
@@ -470,6 +850,8 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
@@ -479,42 +861,81 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
ifloat: 1
-# lround
-Test "lround (1071930.0008) == 1071930":
-double: -214511494
-idouble: -214511494
+# rint_downward
+Test "rint_downward (-4503599627370496.25) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "rint_downward (-4503599627370496.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "rint_downward (4503599627370496.75) == 4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "rint_downward (4503599627370497.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+
+# rint_towardzero
+Test "rint_towardzero (-4503599627370496.75) == -4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "rint_towardzero (-4503599627370497.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "rint_towardzero (4503599627370496.75) == 4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "rint_towardzero (4503599627370497.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+
+# rint_upward
+Test "rint_upward (-4503599627370496.75) == -4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "rint_upward (-4503599627370497.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "rint_upward (4503599627370496.25) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "rint_upward (4503599627370496.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+
+# round
+Test "round (-4503599627370496.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "round (4503599627370496.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
# sincos
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
-float: 1
idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
ifloat: 1
-# tan
-Test "tan (pi/4) == 1":
-double: 1
-idouble: 1
-
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
@@ -523,6 +944,34 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# trunc
+Test "trunc (-4503599627370496.75) == -4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (-4503599627370497.5) == -4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (-9007199254740991.5) == -9007199254740991.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (-9007199254740993.5) == -9007199254740993.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (4503599627370496.75) == 4503599627370496.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (4503599627370497.5) == 4503599627370497.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (9007199254740991.5) == 9007199254740991.0":
+ildouble: 1
+ldouble: 1
+Test "trunc (9007199254740993.5) == 9007199254740993.0":
+ildouble: 1
+ldouble: 1
# y0
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
@@ -530,11 +979,15 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "y0 (1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
@@ -543,11 +996,15 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# y1
Test "y1 (0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -556,16 +1013,22 @@ double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "y1 (2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
# yn
Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
@@ -573,11 +1036,15 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
@@ -586,9 +1053,13 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
@@ -597,118 +1068,140 @@ double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
double: 2
idouble: 2
+ildouble: 2
+ldouble: 2
Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# Maximal error of functions:
Function: "atan2":
-float: 6
-ifloat: 6
+float: 1
+ifloat: 1
Function: "atanh":
float: 1
ifloat: 1
-Function: Real part of "cacosh":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
-
Function: Imaginary part of "cacosh":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
+float: 1
+ifloat: 1
Function: Real part of "casin":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "casinh":
double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 5
+ldouble: 5
Function: Imaginary part of "casinh":
double: 3
float: 6
idouble: 3
ifloat: 6
-
-Function: Real part of "catan":
-float: 4
-ifloat: 4
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "catan":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "catanh":
double: 4
idouble: 4
-
-Function: Imaginary part of "catanh":
-float: 6
-ifloat: 6
+ildouble: 4
+ldouble: 4
Function: "cbrt":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ccos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccos":
float: 1
@@ -719,11 +1212,17 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccosh":
float: 1
ifloat: 1
+Function: "ceil":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "cexp":
float: 1
ifloat: 1
@@ -736,37 +1235,41 @@ Function: Real part of "clog":
float: 1
ifloat: 1
-Function: Imaginary part of "clog":
-float: 3
-ifloat: 3
-
Function: Real part of "clog10":
float: 1
ifloat: 1
Function: Imaginary part of "clog10":
double: 1
-float: 5
+float: 1
idouble: 1
-ifloat: 5
+ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "cos":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Real part of "cpow":
double: 2
float: 4
idouble: 2
ifloat: 4
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "cpow":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: Real part of "csinh":
float: 1
@@ -777,6 +1280,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "csqrt":
float: 1
@@ -785,12 +1290,16 @@ ifloat: 1
Function: Imaginary part of "ctan":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ctanh":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctanh":
float: 1
@@ -799,22 +1308,34 @@ ifloat: 1
Function: "erf":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: "erfc":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: "exp10":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 6
+ldouble: 6
Function: "expm1":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "floor":
+ildouble: 1
+ldouble: 1
Function: "hypot":
float: 1
@@ -825,67 +1346,109 @@ double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "j1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "jn":
double: 4
float: 4
idouble: 4
ifloat: 4
+ildouble: 4
+ldouble: 4
Function: "lgamma":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log10":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log1p":
float: 1
ifloat: 1
+Function: "rint_downward":
+ildouble: 1
+ldouble: 1
+
+Function: "rint_towardzero":
+ildouble: 1
+ldouble: 1
+
+Function: "rint_upward":
+ildouble: 1
+ldouble: 1
+
+Function: "round":
+ildouble: 1
+ldouble: 1
+
Function: "sincos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "tan":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: "tgamma":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "trunc":
+ildouble: 1
+ldouble: 1
Function: "y0":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: "y1":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 3
+ldouble: 3
Function: "yn":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 3
+ldouble: 3
# end of automatic generation
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index ee381dc..92a309d 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -22,14 +22,10 @@
#include <abort-instr.h>
#include <kernel-features.h>
-/* We need EFAULT, ENONSYS, and EAGAIN */
-#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN
-#undef EFAULT
-#undef ENOSYS
-#undef EAGAIN
+/* We need EFAULT, ENONSYS */
+#if !defined EFAULT && !defined ENOSYS
#define EFAULT 14
#define ENOSYS 251
-#define EAGAIN 11
#endif
#ifndef _BITS_ATOMIC_H
@@ -57,10 +53,10 @@ typedef uintmax_t uatomic_max_t;
/* Use the kernel atomic light weight syscalls on hppa */
#define LWS "0xb0"
-#define LWS_CAS 0x0
+#define LWS_CAS "0"
/* Note r31 is the link register */
#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
-#define ASM_EAGAIN -EAGAIN
+#define ASM_EAGAIN "11"
#if __ASSUME_LWS_CAS
/* The only basic operation needed is compare and exchange. */
@@ -74,8 +70,8 @@ typedef uintmax_t uatomic_max_t;
"copy %4, %%r25 \n\t" \
"copy %5, %%r24 \n\t" \
"ble " LWS "(%%sr2, %%r0) \n\t" \
- "ldi 0, %%r20 \n\t" \
- "cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \
+ "ldi " LWS_CAS ", %%r20 \n\t" \
+ "cmpib,=,n " ASM_EAGAIN ",%%r21,0b \n\t" \
"nop \n\t" \
"stw %%r28, %0 \n\t" \
"sub %%r0, %%r21, %%r21 \n\t" \
@@ -99,22 +95,9 @@ typedef uintmax_t uatomic_max_t;
(ret != oldval); \
})
#else
-/* Non-atomic primitives. */
-# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
- ({ __typeof (mem) __gmemp = (mem); \
- __typeof (*mem) __gret = *__gmemp; \
- __typeof (*mem) __gnewval = (newval); \
- \
- if (__gret == (oldval)) \
- *__gmemp = __gnewval; \
- __gret; })
+# error __ASSUME_LWS_CAS is required to build glibc.
+#endif
+/* __ASSUME_LWS_CAS */
-# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
- ({ __typeof (mem) __gmemp = (mem); \
- __typeof (*mem) __gnewval = (newval); \
- \
- *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; })
#endif
-
-#endif /* bits/atomic.h */
-
+/* _BITS_ATOMIC_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5dde01821ab359d51bc84d866654afe65102c32d
commit 5dde01821ab359d51bc84d866654afe65102c32d
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Nov 27 23:03:17 2006 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6)
(UNDOARGS_6): Define for 6-argument syscall stubs.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 44cdd8f..51f6dfa 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2006-11-28 Andreas Schwab <schwab@suse.de>
+
+ * sysdeps/unix/sysv/linux/m68k/sysdep.h (DOARGS_6, _DOARGS_6)
+ (UNDOARGS_6): Define for 6-argument syscall stubs.
+
2006-10-03 Andreas Schwab <schwab@suse.de>
* sysdeps/m68k/setjmp.c: Use __builtin_return_address and
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index be37c89..12687d8 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
December 1995.
@@ -195,6 +195,10 @@ SYSCALL_ERROR_LABEL: \
#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n)
#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5
+#define DOARGS_6 _DOARGS_6 (24)
+#define _DOARGS_6(n) _DOARGS_5 (n-4); move.l %a0, -(%sp); move.l n+12(%sp), %a0;
+#define UNDOARGS_6 move.l (%sp)+, %a0; UNDOARGS_5
+
#define ret rts
#if 0 /* Not used by Linux */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3de1043772e3ec22c32af472d2ca7cd6ab12b467
commit 3de1043772e3ec22c32af472d2ca7cd6ab12b467
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Nov 22 15:13:11 2006 +0000
2006-10-05 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #2749]
* sysdeps/powerpc/nofpu/Makefile
[subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines.
[subdirs-math] (CPPFLAGS): Add -I../soft-fp.
[subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl.
[subdirs-math] (CFLAGS-s_ccoshl.c): Likewise.
[subdirs-math] (CFLAGS-s_csinhl.c): Likewise.
[subdirs-math] (CFLAGS-s_clogl.c): Likewise.
[subdirs-math] (CFLAGS-s_clog10l.c): Likewise.
[subdirs-math] (CFLAGS-s_csinl.c): Likewise.
[subdirs-math] (CFLAGS-s_csqrtl.c): Likewise.
* sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi,
__fixtfsi, and __trunctfsf2.
(GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2.
Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2.
* sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp.
* sysdeps/powerpc/soft-fp/sfp-machine.h: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S:
New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S:
New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S:
New file.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index b04ad8c..aee24e2 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,31 @@
+2006-10-05 Steven Munroe <sjmunroe@us.ibm.com>
+
+ [BZ #2749]
+ * sysdeps/powerpc/nofpu/Makefile
+ [subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines.
+ [subdirs-math] (CPPFLAGS): Add -I../soft-fp.
+ [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl.
+ [subdirs-math] (CFLAGS-s_ccoshl.c): Likewise.
+ [subdirs-math] (CFLAGS-s_csinhl.c): Likewise.
+ [subdirs-math] (CFLAGS-s_clogl.c): Likewise.
+ [subdirs-math] (CFLAGS-s_clog10l.c): Likewise.
+ [subdirs-math] (CFLAGS-s_csinl.c): Likewise.
+ [subdirs-math] (CFLAGS-s_csqrtl.c): Likewise.
+ * sysdeps/powerpc/nofpu/Versions (GLIBC_2.3.2): Remove __fixtfdi,
+ __fixtfsi, and __trunctfsf2.
+ (GLIBC_2.4): Remove __floatunditf, __floatunsitf, and __unordtf2.
+ Add __nedf2, __nesf2, __gtdf2, __gtsf2, __ltdf2, __ltsf2.
+ * sysdeps/powerpc/nofpu/libm-test-ulps: Update for soft-fp.
+ * sysdeps/powerpc/soft-fp/sfp-machine.h: New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies: New file.
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S:
+ New file.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S:
+ New file.
+
2006-01-27 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/nofpu/Subdirs: New file.
diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
index 9fde4a5..c91acd9 100644
--- a/sysdeps/powerpc/nofpu/Makefile
+++ b/sysdeps/powerpc/nofpu/Makefile
@@ -2,9 +2,23 @@
ifeq ($(subdir),soft-fp)
sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
- $(gcc-quad-routines) sim-full
+ sim-full
endif
ifeq ($(subdir),math)
libm-support += fenv_const fe_nomask
+CPPFLAGS += -I../soft-fp/
+# The follow CFLAGS are a work around for GCC Bugzilla Bug 29253
+# "expand_abs wrong default code for floating point"
+# As this is not a regression, a fix is not likely to go into
+# gcc-4.1.1 and may be too late for gcc-4.2. So we need these flags
+# until the fix in a gcc release and glibc drops support for earlier
+# versions of gcc.
+CFLAGS-e_powl.c += -fno-builtin-fabsl
+CFLAGS-s_ccoshl.c += -fno-builtin-fabsl
+CFLAGS-s_csinhl.c += -fno-builtin-fabsl
+CFLAGS-s_clogl.c += -fno-builtin-fabsl
+CFLAGS-s_clog10l.c += -fno-builtin-fabsl
+CFLAGS-s_csinl.c += -fno-builtin-fabsl
+CFLAGS-s_csqrtl.c += -fno-builtin-fabsl
endif
diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions
index 037af68..1a29319 100644
--- a/sysdeps/powerpc/nofpu/Versions
+++ b/sysdeps/powerpc/nofpu/Versions
@@ -3,16 +3,18 @@ libc {
__sim_exceptions; __sim_disabled_exceptions; __sim_round_mode;
__adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
__extendsfdf2; __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
- __fixtfdi; __fixtfsi;
__fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
__floatdidf; __floatdisf; __floatsidf; __floatsisf;
__gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
__negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3;
- __subsf3; __truncdfsf2; __trunctfsf2;
+ __subsf3; __truncdfsf2;
}
GLIBC_2.4 {
- __floatundidf; __floatundisf; __floatunditf;
- __floatunsidf; __floatunsisf; __floatunsitf;
- __unorddf2; __unordsf2; __unordtf2;
+ __floatundidf; __floatundisf;
+ __floatunsidf; __floatunsisf;
+ __unorddf2; __unordsf2;
+ __nedf2; __nesf2;
+ __gtdf2; __gtsf2;
+ __ltdf2; __ltsf2;
}
}
diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps
index 73172b4..c7d58be 100644
--- a/sysdeps/powerpc/nofpu/libm-test-ulps
+++ b/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -1,5 +1,15 @@
# Begin of automatic generation
+# acos
+Test "acos (2e-17) == 1.57079632679489659923132169163975144":
+ildouble: 1
+ldouble: 1
+
+# asin
+Test "asin (0.75) == 0.848062078981481008052944338998418080":
+ildouble: 2
+ldouble: 2
+
# atan2
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 3
@@ -10,23 +20,33 @@ ifloat: 3
Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
+ildouble: 1
+ldouble: 1
# atanh
Test "atanh (0.75) == 0.972955074527656652552676371721589865":
float: 1
ifloat: 1
+# cabs
+Test "cabs (0.75 + 1.25 i) == 1.45773797371132511771853821938639577":
+ildouble: 1
+ldouble: 1
+
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
-float: 7
+float: 1
idouble: 1
-ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+ifloat: 1
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
-float: 3
+float: 1
idouble: 1
-ifloat: 3
+ifloat: 1
# casin
Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
@@ -34,6 +54,11 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i":
+ildouble: 1
+ldouble: 1
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -41,11 +66,15 @@ double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 4
+ldouble: 4
Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -59,11 +88,15 @@ ifloat: 1
Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
float: 3
ifloat: 3
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
float: 4
ifloat: 4
@@ -118,77 +151,132 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+ildouble: 2
+ldouble: 2
# cexp
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
float: 3
ifloat: 3
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+ildouble: 1
+ldouble: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
ifloat: 5
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
float: 1
ifloat: 1
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
@@ -211,19 +299,34 @@ ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
idouble: 1
ifloat: 4
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 2
+ldouble: 2
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
double: 2
float: 3
idouble: 2
ifloat: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
@@ -232,22 +335,32 @@ ifloat: 4
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
# csinh
Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
+ldouble: 1
+ildouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
+ldouble: 1
+ildouble: 1
Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
+ldouble: 1
+ildouble: 1
# csqrt
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
@@ -277,6 +390,8 @@ ifloat: 1
Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
@@ -291,22 +406,41 @@ Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
double: 1
idouble: 1
+# exp
+Test "exp (0.75) == 2.11700001661267466854536981983709561":
+ildouble: 1
+ldouble: 1
+Test "exp (50.0) == 5184705528587072464087.45332293348538":
+ildouble: 1
+ldouble: 1
+
# exp10
Test "exp10 (-1) == 0.1":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "exp10 (3) == 1000":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 8
+ldouble: 8
+
+# exp2
+Test "exp2 (10) == 1024":
+ildouble: 2
+ldouble: 2
# expm1
Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
@@ -315,6 +449,8 @@ idouble: 1
Test "expm1 (1) == M_El - 1.0":
float: 1
ifloat: 1
+double: 1
+idouble: 1
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
@@ -341,6 +477,9 @@ ifloat: 1
Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
+Test "hypot (0.75, 1.25) == 1.45773797371132511771853821938639577":
+ildouble: 1
+ldouble: 1
# j0
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -372,12 +511,16 @@ ifloat: 1
Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "j1 (2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
Test "j1 (8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
# jn
Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -385,6 +528,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
float: 1
ifloat: 1
@@ -393,6 +538,8 @@ double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
@@ -401,36 +548,57 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 4
+ldouble: 4
Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 4
ifloat: 4
+Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083":
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
float: 1
@@ -441,16 +609,23 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083":
+ildouble: 1
+ldouble: 1
Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 2
+ldouble: 2
# lgamma
Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
@@ -463,6 +638,8 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 3
+ldouble: 3
# log10
Test "log10 (0.75) == -0.124938736608299953132449886193870744":
@@ -474,6 +651,11 @@ Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
+# log2
+Test "log2 (e) == M_LOG2El":
+ldouble: 1
+ildouble: 1
+
# log1p
Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
@@ -499,10 +681,25 @@ Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646763723170752936
float: 1
ifloat: 1
+# sinh
+Test "sinh (0.75) == 0.822316731935829980703661634446913849":
+ildouble: 1
+ldouble: 1
+
# tan
Test "tan (pi/4) == 1":
double: 1
idouble: 1
+ldouble: 1
+ildouble: 1
+
+# tanh
+Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (0.75) == 0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -520,11 +717,19 @@ idouble: 1
ifloat: 1
# y0
+Test "y0 (0.125) == -1.38968062514384052915582277745018693":
+ildouble: 1
+ldouble: 1
+Test "y0 (0.75) == -0.137172769385772397522814379396581855":
+ildouble: 1
+ldouble: 1
Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "y0 (1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
@@ -533,11 +738,18 @@ ifloat: 1
Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (2.0) == 0.510375672649745119596606592727157873":
+double: 1
+idouble: 1
Test "y0 (8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# y1
Test "y1 (0.125) == -5.19993611253477499595928744876579921":
@@ -551,23 +763,37 @@ double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "y1 (2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 2
+ldouble: 2
# yn
+Test "yn (0, 0.125) == -1.38968062514384052915582277745018693":
+ildouble: 1
+ldouble: 1
+Test "yn (0, 0.75) == -0.137172769385772397522814379396581855":
+ildouble: 1
+ldouble: 1
Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
@@ -576,11 +802,15 @@ ifloat: 1
Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
@@ -592,16 +822,22 @@ double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
@@ -618,9 +854,13 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
double: 2
idouble: 2
+ildouble: 2
+ldouble: 2
Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
double: 1
idouble: 1
@@ -634,58 +874,108 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
double: 1
idouble: 1
# Maximal error of functions:
+Function: "acos":
+ildouble: 1
+ldouble: 1
+
+Function: "acosh":
+ildouble: 1
+ldouble: 1
+
+Function: "asin":
+ildouble: 2
+ldouble: 2
+
+Function: "asinh":
+ildouble: 1
+ldouble: 1
+
Function: "atan2":
float: 3
ifloat: 3
+ildouble: 1
+ldouble: 1
Function: "atanh":
float: 1
ifloat: 1
+Function: "cabs":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cacos":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cacos":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "cacosh":
double: 1
float: 7
idouble: 1
ifloat: 7
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "cacosh":
double: 1
float: 3
idouble: 1
ifloat: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "casin":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "casin":
+ildouble: 1
+ldouble: 1
Function: Real part of "casinh":
double: 5
float: 1
idouble: 5
ifloat: 1
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "casinh":
double: 3
float: 6
idouble: 3
ifloat: 6
+ildouble: 1
+ldouble: 1
Function: Real part of "catan":
float: 4
ifloat: 4
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "catan":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "catanh":
double: 4
@@ -698,116 +988,188 @@ ifloat: 6
Function: "cbrt":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ccos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccos":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ccosh":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccosh":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Real part of "cexp":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "cexp":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "clog":
float: 1
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "clog":
float: 3
ifloat: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "clog10":
float: 1
ifloat: 1
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "clog10":
double: 1
float: 5
idouble: 1
ifloat: 5
+ildouble: 1
+ldouble: 1
Function: "cos":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "cosh":
+ildouble: 1
+ldouble: 1
Function: Real part of "cpow":
double: 2
float: 4
idouble: 2
ifloat: 4
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "cpow":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "cproj":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csin":
+ildouble: 1
+ldouble: 1
Function: Real part of "csinh":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "csinh":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "csqrt":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
Function: Real part of "ctan":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctan":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "ctanh":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctanh":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "erf":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Function: "erfc":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "exp":
+ildouble: 1
+ldouble: 1
Function: "exp10":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 8
+ldouble: 8
+
+Function: "exp2":
+ildouble: 2
+ldouble: 2
Function: "expm1":
double: 1
@@ -815,76 +1177,130 @@ float: 1
idouble: 1
ifloat: 1
+Function: "gamma":
+ildouble: 1
+ldouble: 1
+
Function: "hypot":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "j0":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "j1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "jn":
double: 4
float: 4
idouble: 4
ifloat: 4
+ildouble: 4
+ldouble: 4
Function: "lgamma":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: "log":
+ildouble: 1
+ldouble: 1
Function: "log10":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log1p":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log2":
+ildouble: 1
+ldouble: 1
+
+Function: "pow":
+ildouble: 1
+ldouble: 1
+
+Function: "sin":
+ildouble: 1
+ldouble: 1
Function: "sincos":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sinh":
+ildouble: 1
+ldouble: 1
Function: "tan":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "tanh":
+ildouble: 1
+ldouble: 1
Function: "tgamma":
double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "y0":
double: 2
float: 1
idouble: 2
ifloat: 1
+ildouble: 2
+ldouble: 2
Function: "y1":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "yn":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 2
+ldouble: 2
# end of automatic generation
diff --git a/sysdeps/powerpc/soft-fp/sfp-machine.h b/sysdeps/powerpc/soft-fp/sfp-machine.h
new file mode 100644
index 0000000..e7eafe2
--- /dev/null
+++ b/sysdeps/powerpc/soft-fp/sfp-machine.h
@@ -0,0 +1,63 @@
+#define _FP_W_TYPE_SIZE 32
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
+
+#define _FP_KEEPNANFRACP 1
+
+/* Someone please check this. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ if ((_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs) \
+ && !(_FP_FRAC_HIGH_RAW_##fs(Y) & _FP_QNANBIT_##fs)) \
+ { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,Y); \
+ } \
+ else \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ } \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
+
+/* Exception flags. We use the bit positions of the appropriate bits
+ in the FPSCR, which also correspond to the FE_* bits. This makes
+ everything easier ;-). */
+#define FP_EX_INVALID (1 << (31 - 2))
+#define FP_EX_OVERFLOW (1 << (31 - 3))
+#define FP_EX_UNDERFLOW (1 << (31 - 4))
+#define FP_EX_DENORM FP_EX_UNDERFLOW
+#define FP_EX_DIVZERO (1 << (31 - 5))
+#define FP_EX_INEXACT (1 << (31 - 6))
+
+#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex)
+#define FP_ROUNDMODE __sim_round_mode
+
+extern int __sim_exceptions;
+libc_hidden_proto (__sim_exceptions);
+extern int __sim_disabled_exceptions;
+libc_hidden_proto (__sim_disabled_exceptions);
+extern int __sim_round_mode;
+libc_hidden_proto (__sim_round_mode);
+
+extern void __simulate_exceptions (int x) attribute_hidden;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
new file mode 100644
index 0000000..40836b6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/Implies
@@ -0,0 +1,2 @@
+powerpc/nofpu
+powerpc/soft-fp
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
new file mode 100644
index 0000000..77af6dc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S
@@ -0,0 +1,59 @@
+/* Save current context.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <rtld-global-offsets.h>
+#include <shlib-compat.h>
+
+#define __ASSEMBLY__
+#include <asm/ptrace.h>
+#include "ucontext_i.h"
+
+#define __CONTEXT_FUNC_NAME __getcontext
+#undef __CONTEXT_ENABLE_FPRS
+#undef __CONTEXT_ENABLE_VRS
+
+#include "getcontext-common.S"
+
+versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
+
+#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
+
+/* For the nofpu case the old/new versions are the same function. */
+strong_alias (__getcontext, __novec_getcontext)
+
+compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3_3)
+
+#endif
+
+#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
+
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+ compat_text_section
+ENTRY (__getcontext_stub)
+ li r3,ENOSYS
+ b __syscall_error@local
+END (__getcontext_stub)
+ .previous
+
+compat_symbol (libc, __getcontext_stub, getcontext, GLIBC_2_1)
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
new file mode 100644
index 0000000..95ee34c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S
@@ -0,0 +1,59 @@
+/* Jump to a new context.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <rtld-global-offsets.h>
+#include <shlib-compat.h>
+
+#define __ASSEMBLY__
+#include <asm/ptrace.h>
+#include "ucontext_i.h"
+
+#define __CONTEXT_FUNC_NAME __setcontext
+#undef __CONTEXT_ENABLE_FPRS
+#undef __CONTEXT_ENABLE_VRS
+
+#include "setcontext-common.S"
+
+versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4)
+
+#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
+
+/* For the nofpu case the old/new versions are the same function. */
+strong_alias (__setcontext, __novec_setcontext)
+
+compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3)
+
+#endif
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_3)
+
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+ compat_text_section
+ENTRY (__setcontext_stub)
+ li r3,ENOSYS
+ b __syscall_error@local
+END (__setcontext_stub)
+ .previous
+
+compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_0)
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S
new file mode 100644
index 0000000..d4934a5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S
@@ -0,0 +1,59 @@
+/* Save current context and jump to a new context.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <rtld-global-offsets.h>
+#include <shlib-compat.h>
+
+#define __ASSEMBLY__
+#include <asm/ptrace.h>
+#include "ucontext_i.h"
+
+#define __CONTEXT_FUNC_NAME __swapcontext
+#undef __CONTEXT_ENABLE_FPRS
+#undef __CONTEXT_ENABLE_VRS
+
+# include "swapcontext-common.S"
+
+versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4)
+
+#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
+
+/* For the nofpu case the old/new versions are the same function. */
+strong_alias (__swapcontext, __novec_swapcontext)
+
+compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3_3)
+
+#endif
+
+#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3)
+
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+ compat_text_section
+ENTRY (__swapcontext_stub)
+ li r3,ENOSYS
+ b __syscall_error@local
+END (__swapcontext_stub)
+ .previous
+
+compat_symbol (libc, __swapcontext_stub, swapcontext, GLIBC_2_1)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d396ccd5ec2c37a162608ad64bbf6319aac9da2e
commit d396ccd5ec2c37a162608ad64bbf6319aac9da2e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat Nov 11 14:33:27 2006 +0000
2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_init.c: New file.
* sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias
to pthread_spin_init.
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define
RTLD_SINGLE_THREAD_P.
2006-09-20 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin
and offout arguments to the prototype.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 8d3132f..429c6c2 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,16 @@
+2006-11-10 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/nptl/pthread_spin_init.c: New file.
+ * sysdeps/hppa/nptl/pthread_spin_unlock.c: Remove strong alias
+ to pthread_spin_init.
+ * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Define
+ RTLD_SINGLE_THREAD_P.
+
+2006-09-20 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (splice): Add offin
+ and offout arguments to the prototype.
+
2006-09-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET.
diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_init.c
similarity index 74%
copy from sysdeps/hppa/nptl/pthread_spin_unlock.c
copy to sysdeps/hppa/nptl/pthread_spin_init.c
index 463d23c..95b9eb8 100644
--- a/sysdeps/hppa/nptl/pthread_spin_unlock.c
+++ b/sysdeps/hppa/nptl/pthread_spin_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Ugly hack to avoid the declaration of pthread_spin_init. */
-#define pthread_spin_init pthread_spin_init_XXX
#include "pthreadP.h"
-#undef pthread_spin_init
int
-pthread_spin_unlock (pthread_spinlock_t *lock)
+pthread_spin_init (pthread_spinlock_t *lock, int pshared)
{
-#if 0
- volatile unsigned int *a = __ldcw_align (lock);
-#endif
int tmp = 0;
/* This should be a memory barrier to newer compilers */
__asm__ __volatile__ ("stw,ma %1,0(%0)"
: : "r" (lock), "r" (tmp) : "memory");
return 0;
}
-strong_alias (pthread_spin_unlock, pthread_spin_init)
diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c
index 463d23c..4b1b2be 100644
--- a/sysdeps/hppa/nptl/pthread_spin_unlock.c
+++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c
@@ -16,21 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Ugly hack to avoid the declaration of pthread_spin_init. */
-#define pthread_spin_init pthread_spin_init_XXX
#include "pthreadP.h"
-#undef pthread_spin_init
int
pthread_spin_unlock (pthread_spinlock_t *lock)
{
-#if 0
- volatile unsigned int *a = __ldcw_align (lock);
-#endif
int tmp = 0;
/* This should be a memory barrier to newer compilers */
__asm__ __volatile__ ("stw,ma %1,0(%0)"
: : "r" (lock), "r" (tmp) : "memory");
return 0;
}
-strong_alias (pthread_spin_unlock, pthread_spin_init)
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index fc70758..328df54 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -210,7 +210,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+extern int splice (int __fdin, __off64_t *offin, int __fdout,
+ __off64_t *__offout, size_t __len, unsigned int __flags)
__THROW;
/* In-kernel implementation of tee for pipe buffers. */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
index 2d3de3e..375f732 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
@@ -212,4 +212,11 @@ L(pre_end): ASM_LINE_SEP \
# define NO_CANCELLATION 1
#endif
-/* !defined NOT_IN_libc || defined IS_IN_libpthread */
+/* !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt */
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ed8d993f9ff5a68606a4c20d87e70f981fc227c
commit 3ed8d993f9ff5a68606a4c20d87e70f981fc227c
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:39:15 2006 +0000
* sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
(RTLD_SINGLE_THREAD_P): Define.
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 9c0ccf5..7c46aa1 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
+ (RTLD_SINGLE_THREAD_P): Define.
+ * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: Likewise.
+
2006-10-31 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
index e184c91..7e9d4bf 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
@@ -181,3 +181,9 @@
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
index 02508e2..f2bf2d7 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
@@ -168,3 +168,9 @@
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80d6637fd2862a4eef1a581a2ffbb75cb2de8398
commit 80d6637fd2862a4eef1a581a2ffbb75cb2de8398
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:39:02 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
(RTLD_SINGLE_THREAD_P): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 48c1a74..88c3c87 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,4 +1,9 @@
-2006-10-21 Joseph S. Myers <joseph@codesourcery.com>
+2006-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+ (RTLD_SINGLE_THREAD_P): Define.
+
+2006-10-31 Joseph S. Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
(DOCARGS_6): Change ".pad #20" to ".pad #16".
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
index aa1cfea..73912d5 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
@@ -151,3 +151,9 @@ extern int __local_multiple_threads attribute_hidden;
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1d7a56c38233b3ea34a5cb1f09be292446bb369
commit c1d7a56c38233b3ea34a5cb1f09be292446bb369
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:21:40 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
(DOCARGS_6): Change ".pad #20" to ".pad #16".
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ec5f05e..48c1a74 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-10-21 Joseph S. Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+ (DOCARGS_6): Change ".pad #20" to ".pad #16".
+
2006-10-31 Joseph S. Myers <joseph@codesourcery.com>
* sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
index 92fe903..aa1cfea 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
@@ -94,7 +94,7 @@
# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
-# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20
+# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
# define RESTORE_LR_6 RESTORE_LR_0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b610dc849a5486fecfd7cb85dca1083c9cacc963
commit b610dc849a5486fecfd7cb85dca1083c9cacc963
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:20:42 2006 +0000
* sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
<asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
* sysdeps/arm/eabi/fedisblxcpt.c: Likewise.
* sysdeps/arm/eabi/feenablxcpt.c: Likewise.
* sysdeps/arm/eabi/fegetenv.c: Likewise.
* sysdeps/arm/eabi/fegetexcept.c: Likewise.
* sysdeps/arm/eabi/fegetround.c: Likewise.
* sysdeps/arm/eabi/feholdexcpt.c: Likewise.
* sysdeps/arm/eabi/fesetenv.c: Likewise.
* sysdeps/arm/eabi/fesetround.c: Likewise.
* sysdeps/arm/eabi/fraiseexcpt.c: Likewise.
* sysdeps/arm/eabi/fsetexcptflg.c: Likewise.
* sysdeps/arm/eabi/ftestexcept.c: Likewise.
* sysdeps/arm/eabi/setfpucw.c: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index bff4409..ec5f05e 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,20 @@
+2006-10-31 Joseph S. Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
+ <asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
+ * sysdeps/arm/eabi/fedisblxcpt.c: Likewise.
+ * sysdeps/arm/eabi/feenablxcpt.c: Likewise.
+ * sysdeps/arm/eabi/fegetenv.c: Likewise.
+ * sysdeps/arm/eabi/fegetexcept.c: Likewise.
+ * sysdeps/arm/eabi/fegetround.c: Likewise.
+ * sysdeps/arm/eabi/feholdexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fesetenv.c: Likewise.
+ * sysdeps/arm/eabi/fesetround.c: Likewise.
+ * sysdeps/arm/eabi/fraiseexcpt.c: Likewise.
+ * sysdeps/arm/eabi/fsetexcptflg.c: Likewise.
+ * sysdeps/arm/eabi/ftestexcept.c: Likewise.
+ * sysdeps/arm/eabi/setfpucw.c: Likewise.
+
2006-10-31 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update
diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c
index 6e5d242..8287dc6 100644
--- a/sysdeps/arm/eabi/fclrexcpt.c
+++ b/sysdeps/arm/eabi/fclrexcpt.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
__feclearexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long int temp;
diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c
index 414d34b..ab6fe79 100644
--- a/sysdeps/arm/eabi/fedisblxcpt.c
+++ b/sysdeps/arm/eabi/fedisblxcpt.c
@@ -24,12 +24,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
fedisableexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long int new_exc, old_exc;
diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c
index e104bc4..f12b453 100644
--- a/sysdeps/arm/eabi/feenablxcpt.c
+++ b/sysdeps/arm/eabi/feenablxcpt.c
@@ -24,12 +24,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
feenableexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long int new_exc, old_exc;
diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c
index 178d22a..35bfac8 100644
--- a/sysdeps/arm/eabi/fegetenv.c
+++ b/sysdeps/arm/eabi/fegetenv.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
__fegetenv (fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long int temp;
_FPU_GETCW (temp);
diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c
index 811c8ae..8e29ff7 100644
--- a/sysdeps/arm/eabi/fegetexcept.c
+++ b/sysdeps/arm/eabi/fegetexcept.c
@@ -24,12 +24,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
fegetexcept (void)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long temp;
diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c
index 1c4be04..6a3442a 100644
--- a/sysdeps/arm/eabi/fegetround.c
+++ b/sysdeps/arm/eabi/fegetround.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
fegetround (void)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned int temp;
diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c
index 9872ea1..33c88e7 100644
--- a/sysdeps/arm/eabi/feholdexcpt.c
+++ b/sysdeps/arm/eabi/feholdexcpt.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
feholdexcept (fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned long int temp;
diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c
index bf25384..c47aa65 100644
--- a/sysdeps/arm/eabi/fesetenv.c
+++ b/sysdeps/arm/eabi/fesetenv.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
__fesetenv (const fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
unsigned int temp;
diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c
index f6e20cb..5523522 100644
--- a/sysdeps/arm/eabi/fesetround.c
+++ b/sysdeps/arm/eabi/fesetround.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
fesetround (int round)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
fpu_control_t temp;
diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c
index c0ab419..53ccd9d 100644
--- a/sysdeps/arm/eabi/fraiseexcpt.c
+++ b/sysdeps/arm/eabi/fraiseexcpt.c
@@ -24,12 +24,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
feraiseexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
int fpscr;
const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c
index e76d746..2e05514 100644
--- a/sysdeps/arm/eabi/fsetexcptflg.c
+++ b/sysdeps/arm/eabi/fsetexcptflg.c
@@ -24,12 +24,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
fexcept_t temp;
diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c
index 230ccbd..846bb01 100644
--- a/sysdeps/arm/eabi/ftestexcept.c
+++ b/sysdeps/arm/eabi/ftestexcept.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
int
fetestexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
fexcept_t temp;
diff --git a/sysdeps/arm/eabi/setfpucw.c b/sysdeps/arm/eabi/setfpucw.c
index 2bd1f55..cd680df 100644
--- a/sysdeps/arm/eabi/setfpucw.c
+++ b/sysdeps/arm/eabi/setfpucw.c
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <ldsodefs.h>
#include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
void
__setfpucw (fpu_control_t set)
{
- if (GLRO (dl_hwcap) & HWCAP_VFP)
+ if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
{
fpu_control_t cw;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57ba32a810df29d2a3f45ffc2d1c1f6170a5a9f7
commit 57ba32a810df29d2a3f45ffc2d1c1f6170a5a9f7
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:18:09 2006 +0000
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update
prototype.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e23a291..bff4409 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2006-10-31 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (splice): Update
+ prototype.
+
+2006-10-31 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__
conditional.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 287dbd5..7c7b7c2 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -223,7 +223,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+extern int splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len, unsigned int __flags)
__THROW;
/* In-kernel implementation of tee for pipe buffers. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7d03b9189c8ed5fefe566f61cec0da6c4ad4276
commit a7d03b9189c8ed5fefe566f61cec0da6c4ad4276
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:17:46 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update
prototype.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 0c9fb72..9c0ccf5 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-10-31 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (splice): Update
+ prototype.
+
2006-09-22 Richard Sandiford <richard@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index b6672b7..d40b4b6 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -237,7 +237,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+extern int splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len, unsigned int __flags)
__THROW;
/* In-kernel implementation of tee for pipe buffers. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2ff5a57f978b10976daa7969676bb1176b3f2c1
commit d2ff5a57f978b10976daa7969676bb1176b3f2c1
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:09:24 2006 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__
conditional.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 6d49bde..e23a291 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-10-31 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h: Remove __i386__
+ conditional.
+
2006-10-31 Nicolas Pitre <nico@cam.org>
Joseph Myers <joseph@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 6839e87..5bedfe1 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -42,7 +42,7 @@
#endif
/* The vfork syscall on arm was definitely available in 2.4. */
-#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__
+#if __LINUX_KERNEL_VERSION >= 132097
# define __ASSUME_VFORK_SYSCALL 1
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0572b91bdb6cf4dda3bb2edbf1078aeb0e8fa99b
commit 0572b91bdb6cf4dda3bb2edbf1078aeb0e8fa99b
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Oct 31 17:07:54 2006 +0000
* sysdeps/arm/memcpy.S: New file.
* sysdeps/arm/memmove.S: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index b28f7b5..6d49bde 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-10-31 Nicolas Pitre <nico@cam.org>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/memcpy.S: New file.
+ * sysdeps/arm/memmove.S: Likewise.
+
2006-09-22 Khem Raj <kraj@mvista.com>
* sysdeps/unix/sysv/linux/arm/fxstatat.c: New file.
diff --git a/sysdeps/arm/memcpy.S b/sysdeps/arm/memcpy.S
new file mode 100644
index 0000000..61cf33c
--- /dev/null
+++ b/sysdeps/arm/memcpy.S
@@ -0,0 +1,227 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+/*
+ * Data preload for architectures that support it (ARM V5TE and above)
+ */
+#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
+ && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__) \
+ && !defined (__ARM_ARCH_4T__) && !defined (__ARM_ARCH_5__) \
+ && !defined (__ARM_ARCH_5T__))
+#define PLD(code...) code
+#else
+#define PLD(code...)
+#endif
+
+/*
+ * This can be used to enable code to cacheline align the source pointer.
+ * Experiments on tested architectures (StrongARM and XScale) didn't show
+ * this a worthwhile thing to do. That might be different in the future.
+ */
+//#define CALGN(code...) code
+#define CALGN(code...)
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pull lsr
+#define push lsl
+#else
+#define pull lsl
+#define push lsr
+#endif
+
+ .text
+
+/* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
+
+ENTRY(memcpy)
+
+ stmfd sp!, {r0, r4, lr}
+
+ subs r2, r2, #4
+ blt 8f
+ ands ip, r0, #3
+ PLD( pld [r1, #0] )
+ bne 9f
+ ands ip, r1, #3
+ bne 10f
+
+1: subs r2, r2, #(28)
+ stmfd sp!, {r5 - r8}
+ blt 5f
+
+ CALGN( ands ip, r1, #31 )
+ CALGN( rsb r3, ip, #32 )
+ CALGN( sbcnes r4, r3, r2 ) @ C is always set here
+ CALGN( bcs 2f )
+ CALGN( adr r4, 6f )
+ CALGN( subs r2, r2, r3 ) @ C gets set
+ CALGN( add pc, r4, ip )
+
+ PLD( pld [r1, #0] )
+2: PLD( subs r2, r2, #96 )
+ PLD( pld [r1, #28] )
+ PLD( blt 4f )
+ PLD( pld [r1, #60] )
+ PLD( pld [r1, #92] )
+
+3: PLD( pld [r1, #124] )
+4: ldmia r1!, {r3, r4, r5, r6, r7, r8, ip, lr}
+ subs r2, r2, #32
+ stmia r0!, {r3, r4, r5, r6, r7, r8, ip, lr}
+ bge 3b
+ PLD( cmn r2, #96 )
+ PLD( bge 4b )
+
+5: ands ip, r2, #28
+ rsb ip, ip, #32
+ addne pc, pc, ip @ C is always clear here
+ b 7f
+6: nop
+ ldr r3, [r1], #4
+ ldr r4, [r1], #4
+ ldr r5, [r1], #4
+ ldr r6, [r1], #4
+ ldr r7, [r1], #4
+ ldr r8, [r1], #4
+ ldr lr, [r1], #4
+
+ add pc, pc, ip
+ nop
+ nop
+ str r3, [r0], #4
+ str r4, [r0], #4
+ str r5, [r0], #4
+ str r6, [r0], #4
+ str r7, [r0], #4
+ str r8, [r0], #4
+ str lr, [r0], #4
+
+ CALGN( bcs 2b )
+
+7: ldmfd sp!, {r5 - r8}
+
+8: movs r2, r2, lsl #31
+ ldrneb r3, [r1], #1
+ ldrcsb r4, [r1], #1
+ ldrcsb ip, [r1]
+ strneb r3, [r0], #1
+ strcsb r4, [r0], #1
+ strcsb ip, [r0]
+
+ ldmfd sp!, {r0, r4, pc}
+
+9: rsb ip, ip, #4
+ cmp ip, #2
+ ldrgtb r3, [r1], #1
+ ldrgeb r4, [r1], #1
+ ldrb lr, [r1], #1
+ strgtb r3, [r0], #1
+ strgeb r4, [r0], #1
+ subs r2, r2, ip
+ strb lr, [r0], #1
+ blt 8b
+ ands ip, r1, #3
+ beq 1b
+
+10: bic r1, r1, #3
+ cmp ip, #2
+ ldr lr, [r1], #4
+ beq 17f
+ bgt 18f
+
+
+ .macro forward_copy_shift pull push
+
+ subs r2, r2, #28
+ blt 14f
+
+ CALGN( ands ip, r1, #31 )
+ CALGN( rsb ip, ip, #32 )
+ CALGN( sbcnes r4, ip, r2 ) @ C is always set here
+ CALGN( subcc r2, r2, ip )
+ CALGN( bcc 15f )
+
+11: stmfd sp!, {r5 - r9}
+
+ PLD( pld [r1, #0] )
+ PLD( subs r2, r2, #96 )
+ PLD( pld [r1, #28] )
+ PLD( blt 13f )
+ PLD( pld [r1, #60] )
+ PLD( pld [r1, #92] )
+
+12: PLD( pld [r1, #124] )
+13: ldmia r1!, {r4, r5, r6, r7}
+ mov r3, lr, pull #\pull
+ subs r2, r2, #32
+ ldmia r1!, {r8, r9, ip, lr}
+ orr r3, r3, r4, push #\push
+ mov r4, r4, pull #\pull
+ orr r4, r4, r5, push #\push
+ mov r5, r5, pull #\pull
+ orr r5, r5, r6, push #\push
+ mov r6, r6, pull #\pull
+ orr r6, r6, r7, push #\push
+ mov r7, r7, pull #\pull
+ orr r7, r7, r8, push #\push
+ mov r8, r8, pull #\pull
+ orr r8, r8, r9, push #\push
+ mov r9, r9, pull #\pull
+ orr r9, r9, ip, push #\push
+ mov ip, ip, pull #\pull
+ orr ip, ip, lr, push #\push
+ stmia r0!, {r3, r4, r5, r6, r7, r8, r9, ip}
+ bge 12b
+ PLD( cmn r2, #96 )
+ PLD( bge 13b )
+
+ ldmfd sp!, {r5 - r9}
+
+14: ands ip, r2, #28
+ beq 16f
+
+15: mov r3, lr, pull #\pull
+ ldr lr, [r1], #4
+ subs ip, ip, #4
+ orr r3, r3, lr, push #\push
+ str r3, [r0], #4
+ bgt 15b
+ CALGN( cmp r2, #0 )
+ CALGN( bge 11b )
+
+16: sub r1, r1, #(\push / 8)
+ b 8b
+
+ .endm
+
+
+ forward_copy_shift pull=8 push=24
+
+17: forward_copy_shift pull=16 push=16
+
+18: forward_copy_shift pull=24 push=8
+
+END(memcpy)
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/arm/memmove.S b/sysdeps/arm/memmove.S
new file mode 100644
index 0000000..2dd0790
--- /dev/null
+++ b/sysdeps/arm/memmove.S
@@ -0,0 +1,237 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ Contributed by MontaVista Software, Inc. (written by Nicolas Pitre)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+/*
+ * Data preload for architectures that support it (ARM V5TE and above)
+ */
+#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
+ && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__) \
+ && !defined (__ARM_ARCH_4T__) && !defined (__ARM_ARCH_5__) \
+ && !defined (__ARM_ARCH_5T__))
+#define PLD(code...) code
+#else
+#define PLD(code...)
+#endif
+
+/*
+ * This can be used to enable code to cacheline align the source pointer.
+ * Experiments on tested architectures (StrongARM and XScale) didn't show
+ * this a worthwhile thing to do. That might be different in the future.
+ */
+//#define CALGN(code...) code
+#define CALGN(code...)
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#ifndef __ARMEB__
+#define pull lsr
+#define push lsl
+#else
+#define pull lsl
+#define push lsr
+#endif
+
+ .text
+
+/*
+ * Prototype: void *memmove(void *dest, const void *src, size_t n);
+ *
+ * Note:
+ *
+ * If the memory regions don't overlap, we simply branch to memcpy which is
+ * normally a bit faster. Otherwise the copy is done going downwards.
+ */
+
+ENTRY(memmove)
+
+ subs ip, r0, r1
+ cmphi r2, ip
+ bls memcpy
+
+ stmfd sp!, {r0, r4, lr}
+ add r1, r1, r2
+ add r0, r0, r2
+ subs r2, r2, #4
+ blt 8f
+ ands ip, r0, #3
+ PLD( pld [r1, #-4] )
+ bne 9f
+ ands ip, r1, #3
+ bne 10f
+
+1: subs r2, r2, #(28)
+ stmfd sp!, {r5 - r8}
+ blt 5f
+
+ CALGN( ands ip, r1, #31 )
+ CALGN( sbcnes r4, ip, r2 ) @ C is always set here
+ CALGN( bcs 2f )
+ CALGN( adr r4, 6f )
+ CALGN( subs r2, r2, ip ) @ C is set here
+ CALGN( add pc, r4, ip )
+
+ PLD( pld [r1, #-4] )
+2: PLD( subs r2, r2, #96 )
+ PLD( pld [r1, #-32] )
+ PLD( blt 4f )
+ PLD( pld [r1, #-64] )
+ PLD( pld [r1, #-96] )
+
+3: PLD( pld [r1, #-128] )
+4: ldmdb r1!, {r3, r4, r5, r6, r7, r8, ip, lr}
+ subs r2, r2, #32
+ stmdb r0!, {r3, r4, r5, r6, r7, r8, ip, lr}
+ bge 3b
+ PLD( cmn r2, #96 )
+ PLD( bge 4b )
+
+5: ands ip, r2, #28
+ rsb ip, ip, #32
+ addne pc, pc, ip @ C is always clear here
+ b 7f
+6: nop
+ ldr r3, [r1, #-4]!
+ ldr r4, [r1, #-4]!
+ ldr r5, [r1, #-4]!
+ ldr r6, [r1, #-4]!
+ ldr r7, [r1, #-4]!
+ ldr r8, [r1, #-4]!
+ ldr lr, [r1, #-4]!
+
+ add pc, pc, ip
+ nop
+ nop
+ str r3, [r0, #-4]!
+ str r4, [r0, #-4]!
+ str r5, [r0, #-4]!
+ str r6, [r0, #-4]!
+ str r7, [r0, #-4]!
+ str r8, [r0, #-4]!
+ str lr, [r0, #-4]!
+
+ CALGN( bcs 2b )
+
+7: ldmfd sp!, {r5 - r8}
+
+8: movs r2, r2, lsl #31
+ ldrneb r3, [r1, #-1]!
+ ldrcsb r4, [r1, #-1]!
+ ldrcsb ip, [r1, #-1]
+ strneb r3, [r0, #-1]!
+ strcsb r4, [r0, #-1]!
+ strcsb ip, [r0, #-1]
+ ldmfd sp!, {r0, r4, pc}
+
+9: cmp ip, #2
+ ldrgtb r3, [r1, #-1]!
+ ldrgeb r4, [r1, #-1]!
+ ldrb lr, [r1, #-1]!
+ strgtb r3, [r0, #-1]!
+ strgeb r4, [r0, #-1]!
+ subs r2, r2, ip
+ strb lr, [r0, #-1]!
+ blt 8b
+ ands ip, r1, #3
+ beq 1b
+
+10: bic r1, r1, #3
+ cmp ip, #2
+ ldr r3, [r1, #0]
+ beq 17f
+ blt 18f
+
+
+ .macro backward_copy_shift push pull
+
+ subs r2, r2, #28
+ blt 14f
+
+ CALGN( ands ip, r1, #31 )
+ CALGN( rsb ip, ip, #32 )
+ CALGN( sbcnes r4, ip, r2 ) @ C is always set here
+ CALGN( subcc r2, r2, ip )
+ CALGN( bcc 15f )
+
+11: stmfd sp!, {r5 - r9}
+
+ PLD( pld [r1, #-4] )
+ PLD( subs r2, r2, #96 )
+ PLD( pld [r1, #-32] )
+ PLD( blt 13f )
+ PLD( pld [r1, #-64] )
+ PLD( pld [r1, #-96] )
+
+12: PLD( pld [r1, #-128] )
+13: ldmdb r1!, {r7, r8, r9, ip}
+ mov lr, r3, push #\push
+ subs r2, r2, #32
+ ldmdb r1!, {r3, r4, r5, r6}
+ orr lr, lr, ip, pull #\pull
+ mov ip, ip, push #\push
+ orr ip, ip, r9, pull #\pull
+ mov r9, r9, push #\push
+ orr r9, r9, r8, pull #\pull
+ mov r8, r8, push #\push
+ orr r8, r8, r7, pull #\pull
+ mov r7, r7, push #\push
+ orr r7, r7, r6, pull #\pull
+ mov r6, r6, push #\push
+ orr r6, r6, r5, pull #\pull
+ mov r5, r5, push #\push
+ orr r5, r5, r4, pull #\pull
+ mov r4, r4, push #\push
+ orr r4, r4, r3, pull #\pull
+ stmdb r0!, {r4 - r9, ip, lr}
+ bge 12b
+ PLD( cmn r2, #96 )
+ PLD( bge 13b )
+
+ ldmfd sp!, {r5 - r9}
+
+14: ands ip, r2, #28
+ beq 16f
+
+15: mov lr, r3, push #\push
+ ldr r3, [r1, #-4]!
+ subs ip, ip, #4
+ orr lr, lr, r3, pull #\pull
+ str lr, [r0, #-4]!
+ bgt 15b
+ CALGN( cmp r2, #0 )
+ CALGN( bge 11b )
+
+16: add r1, r1, #(\pull / 8)
+ b 8b
+
+ .endm
+
+
+ backward_copy_shift push=8 pull=24
+
+17: backward_copy_shift push=16 pull=16
+
+18: backward_copy_shift push=24 pull=8
+
+
+END(memmove)
+libc_hidden_builtin_def (memmove)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf0494f3e7841fcbd4a996a2bacdce71fa62ca3e
commit cf0494f3e7841fcbd4a996a2bacdce71fa62ca3e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 29 21:48:06 2006 +0000
(RTLD_SINGLE_THREAD_P): Define.
(SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index 7e61d68..aa42768 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -163,13 +163,13 @@ extern int __local_multiple_threads attribute_hidden;
#else
-# ifdef IS_IN_rtld
-# define SINGLE_THREAD_P \
- __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
- header.multiple_threads) == 0, 1)
-# else
-# define SINGLE_THREAD_P (1)
-# endif
+# define SINGLE_THREAD_P (1)
# define NO_CANCELLATION 1
#endif
+
+#ifndef __ASSEMBLER__
+# define RTLD_SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=069ba66371cc8566540f22195ffadab7eb83cef4
commit 069ba66371cc8566540f22195ffadab7eb83cef4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 27 23:11:45 2006 +0000
USE_TLS support is now default.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 88c357e..29f500b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -232,14 +232,14 @@ $fixup_stack: \n\
to one of the main executable's symbols, as for a COPY reloc.
This is unused on Alpha. */
-#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
-#define elf_machine_type_class(type) \
+#if !defined RTLD_BOOTSTRAP || USE___THREAD
+# define elf_machine_type_class(type) \
(((type) == R_ALPHA_JMP_SLOT \
|| (type) == R_ALPHA_DTPMOD64 \
|| (type) == R_ALPHA_DTPREL64 \
|| (type) == R_ALPHA_TPREL64) * ELF_RTYPE_CLASS_PLT)
#else
-#define elf_machine_type_class(type) \
+# define elf_machine_type_class(type) \
(((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
#endif
@@ -439,40 +439,40 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_arg, &sym_value, 8);
}
#endif
-#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+#if !defined RTLD_BOOTSTRAP || USE___THREAD
else if (r_type == R_ALPHA_DTPMOD64)
{
-#ifdef RTLD_BOOTSTRAP
+# ifdef RTLD_BOOTSTRAP
/* During startup the dynamic linker is always index 1. */
*reloc_addr = 1;
-#else
+# else
/* Get the information from the link map returned by the
resolv function. */
if (sym_map != NULL)
*reloc_addr = sym_map->l_tls_modid;
-#endif
+# endif
}
else if (r_type == R_ALPHA_DTPREL64)
{
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
/* During relocation all TLS symbols are defined and used.
Therefore the offset is already correct. */
*reloc_addr = sym_raw_value;
-#endif
+# endif
}
else if (r_type == R_ALPHA_TPREL64)
{
-#ifdef RTLD_BOOTSTRAP
+# ifdef RTLD_BOOTSTRAP
*reloc_addr = sym_raw_value + map->l_tls_offset;
-#else
+# else
if (sym_map)
{
CHECK_STATIC_TLS (map, sym_map);
*reloc_addr = sym_raw_value + sym_map->l_tls_offset;
}
-#endif
+# endif
}
-#endif /* USE_TLS */
+#endif
else
_dl_reloc_bad_type (map, r_type, 0);
}
diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c
index 24629e9..7e02769 100644
--- a/sysdeps/alpha/libc-tls.c
+++ b/sysdeps/alpha/libc-tls.c
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. Alpha version.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,6 @@
#include <csu/libc-tls.c>
#include <dl-tls.h>
-#if USE_TLS
-
/* On Alpha, linker optimizations are not required, so __tls_get_addr
can be called even in statically linked binaries. In this case module
must be always 1 and PT_TLS segment exist in the binary, otherwise it
@@ -33,5 +31,3 @@ __tls_get_addr (tls_index *ti)
dtv_t *dtv = THREAD_DTV ();
return (char *) dtv[1].pointer.val + ti->ti_offset;
}
-
-#endif
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 20f780c..be2430f 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/Alpha version.
- Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,9 +48,6 @@ typedef union dtv
# error "TLS support is required."
#endif
-/* Signal that TLS support is available. */
-# define USE_TLS 1
-
#ifndef __ASSEMBLER__
/* Get system call information. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7985141bdc16f16d39c51b49195d424ba5223187
commit 7985141bdc16f16d39c51b49195d424ba5223187
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 27 15:16:00 2006 +0000
(SINGLE_THREAD_P): Define to THREAD_SELF->header.multiple_threads.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index f3f7718..7e61d68 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -163,7 +163,13 @@ extern int __local_multiple_threads attribute_hidden;
#else
-# define SINGLE_THREAD_P (1)
+# ifdef IS_IN_rtld
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+# else
+# define SINGLE_THREAD_P (1)
+# endif
# define NO_CANCELLATION 1
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d32d7858472c0537051fb1ddac931ae5f8c8495
commit 3d32d7858472c0537051fb1ddac931ae5f8c8495
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 12 21:35:06 2006 +0000
Remove SEM_VALUE_MAX.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
index 6dadfda..be4469c 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
@@ -26,9 +26,6 @@
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647)
-
typedef union
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b24bde2d1b674e80ac93bb416bb98fcc112ad287
commit b24bde2d1b674e80ac93bb416bb98fcc112ad287
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 12 21:30:42 2006 +0000
Add SEM_VALUE_MAX.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
index e071878..9b27b1f 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
@@ -87,3 +87,6 @@
/* Maximum message queue priority level. */
#define MQ_PRIO_MAX 32768
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX (2147483647)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23cd7e446d65460def5b26bb46147702432886a6
commit 23cd7e446d65460def5b26bb46147702432886a6
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 3 15:50:57 2006 +0000
* sysdeps/m68k/setjmp.c: Use __builtin_return_address and
__builtin_frame_address. Don't call __sigjmp_save in ld.so.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 94e35b6..44cdd8f 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,5 +1,8 @@
2006-10-03 Andreas Schwab <schwab@suse.de>
+ * sysdeps/m68k/setjmp.c: Use __builtin_return_address and
+ __builtin_frame_address. Don't call __sigjmp_save in ld.so.
+
* sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter.
2006-10-03 Richard Sandiford <richard@codesourcery.com>
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index e2ba0e7..2ebe97e 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1997, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,17 +37,17 @@ __sigsetjmp (jmp_buf env, int savemask)
: : "m" (env[0].__jmpbuf[0].__dregs[0]));
/* Save return address in place of register A0. */
- env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
+ env[0].__jmpbuf[0].__aregs[0] = __builtin_return_address (0);
/* Save address registers A1 through A5. */
asm volatile ("movem%.l %/a1-%/a5, %0"
: : "m" (env[0].__jmpbuf[0].__aregs[1]));
/* Save caller's FP, not our own. */
- env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
+ env[0].__jmpbuf[0].__fp = *(int **) __builtin_frame_address (0);
/* Save caller's SP, not our own. */
- env[0].__jmpbuf[0].__sp = (void *) &env;
+ env[0].__jmpbuf[0].__sp = (int *) __builtin_frame_address (0) + 2;
#if defined __HAVE_68881__ || defined __HAVE_FPU__
/* Save floating-point (68881) registers FP0 through FP7. */
@@ -58,8 +58,13 @@ __sigsetjmp (jmp_buf env, int savemask)
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
+#if defined NOT_IN_libc && defined IS_IN_rtld
+ /* In ld.so we never save the signal mask. */
+ return 0;
+#else
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
+#endif
}
#if !defined BSD_SETJMP && !defined BSD__SETJMP
libc_hidden_def (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b32aae99b6696ee5e25a7563bd0356be2bb59dd
commit 4b32aae99b6696ee5e25a7563bd0356be2bb59dd
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 3 15:49:06 2006 +0000
* sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index b12f7f4..94e35b6 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,7 @@
+2006-10-03 Andreas Schwab <schwab@suse.de>
+
+ * sysdeps/unix/sysv/linux/m68k/mremap.S: Accept fifth parameter.
+
2006-10-03 Richard Sandiford <richard@codesourcery.com>
* sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
index 68d961b..6e6f3b6 100644
--- a/sysdeps/unix/sysv/linux/m68k/mremap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mremap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
its value in register %a0. */
.text
-PSEUDO (__mremap, mremap, 4)
+PSEUDO (__mremap, mremap, 5)
move.l %d0, %a0
rts
PSEUDO_END (__mremap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c986f878af1392b02170336a52e5a59e7fe55ed
commit 9c986f878af1392b02170336a52e5a59e7fe55ed
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 3 14:44:27 2006 +0000
2006-10-03 Richard Sandiford <richard@codesourcery.com>
* sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to
sysdeps/m68k/m680x0.
* sysdeps/m68k/m68020/submul_1.S: Likewise.
* sysdeps/m68k/m68020/Makefile: Likewise.
* sysdeps/m68k/m68020/mul_1.S: Likewise.
* sysdeps/m68k/m68020/wordcopy.S: Likewise.
* sysdeps/m68k/m68020/addmul_1.S: Likewise.
* sysdeps/m68k/m68020/bits/string.h: Likewise.
* sysdeps/m68k/m68020/bits/atomic.h: Likewise.
* sysdeps/m68k/sub_n.S: Likewise.
* sysdeps/m68k/add_n.S: Likewise.
* sysdeps/m68k/s_isnanl.c: Likewise.
* sysdeps/m68k/fpu/s_log1p.c: Likewise.
* sysdeps/m68k/fpu/e_asinf.c: Likewise.
* sysdeps/m68k/fpu/s_cosl.c: Likewise.
* sysdeps/m68k/fpu/s_isinff.c: Likewise.
* sysdeps/m68k/fpu/k_rem_pio2.c: Likewise.
* sysdeps/m68k/fpu/s_ccos.c: Likewise.
* sysdeps/m68k/fpu/s_expm1.c: Likewise.
* sysdeps/m68k/fpu/slowexp.c: Likewise.
* sysdeps/m68k/fpu/k_rem_pio2l.c: Likewise.
* sysdeps/m68k/fpu/s_ccoshf.c: Likewise.
* sysdeps/m68k/fpu/s_ilogbl.c: Likewise.
* sysdeps/m68k/fpu/Makefile: Likewise.
* sysdeps/m68k/fpu/s_expm1f.c: Likewise.
* sysdeps/m68k/fpu/s_significandf.c: Likewise.
* sysdeps/m68k/fpu/e_pow.c: Likewise.
* sysdeps/m68k/fpu/s_csinh.c: Likewise.
* sysdeps/m68k/fpu/e_exp.c: Likewise.
* sysdeps/m68k/fpu/s_remquof.c: Likewise.
* sysdeps/m68k/fpu/s_ilogbf.c: Likewise.
* sysdeps/m68k/fpu/s_truncl.c: Likewise.
* sysdeps/m68k/fpu/s_frexpf.c: Likewise.
* sysdeps/m68k/fpu/s_cos.c: Likewise.
* sysdeps/m68k/fpu/fraiseexcpt.c: Likewise.
* sysdeps/m68k/fpu/branred.c: Likewise.
* sysdeps/m68k/fpu/s_frexpl.c: Likewise.
* sysdeps/m68k/fpu/s_atan.c: Likewise.
* sysdeps/m68k/fpu/e_rem_pio2f.c: Likewise.
* sysdeps/m68k/fpu/e_scalbl.c: Likewise.
* sysdeps/m68k/fpu/e_exp2.c: Likewise.
* sysdeps/m68k/fpu/s_cexpf.c: Likewise.
* sysdeps/m68k/fpu/mplog.c: Likewise.
* sysdeps/m68k/fpu/s_rintf.c: Likewise.
* sysdeps/m68k/fpu/s_tanh.c: Likewise.
* sysdeps/m68k/fpu/e_scalbf.c: Likewise.
* sysdeps/m68k/fpu/s_csinhl.c: Likewise.
* sysdeps/m68k/fpu/s_floorl.c: Likewise.
* sysdeps/m68k/fpu/k_tanf.c: Likewise.
* sysdeps/m68k/fpu/k_tanl.c: Likewise.
* sysdeps/m68k/fpu/e_fmodf.c: Likewise.
* sysdeps/m68k/fpu/e_atanhf.c: Likewise.
* sysdeps/m68k/fpu/s_isnanf.c: Likewise.
* sysdeps/m68k/fpu/s_fpclassifyl.c: Likewise.
* sysdeps/m68k/fpu/s_modf.c: Likewise.
* sysdeps/m68k/fpu/e_log2.c: Likewise.
* sysdeps/m68k/fpu/e_acosf.c: Likewise.
* sysdeps/m68k/fpu/s_log1pl.c: Likewise.
* sysdeps/m68k/fpu/e_log2f.c: Likewise.
* sysdeps/m68k/fpu/mpa.c: Likewise.
* sysdeps/m68k/fpu/t_exp.c: Likewise.
* sysdeps/m68k/fpu/e_acos.c: Likewise.
* sysdeps/m68k/fpu/s_expm1l.c: Likewise.
* sysdeps/m68k/fpu/s_ccoshl.c: Likewise.
* sysdeps/m68k/fpu/s_sinf.c: Likewise.
* sysdeps/m68k/fpu/k_tan.c: Likewise.
* sysdeps/m68k/fpu/k_cosl.c: Likewise.
* sysdeps/m68k/fpu/e_remainder.c: Likewise.
* sysdeps/m68k/fpu/s_trunc.c: Likewise.
* sysdeps/m68k/fpu/s_sincos.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnl.c: Likewise.
* sysdeps/m68k/fpu/s_finitef.c: Likewise.
* sysdeps/m68k/fpu/s_tanhl.c: Likewise.
* sysdeps/m68k/fpu/s_lrintl.c: Likewise.
* sysdeps/m68k/fpu/slowpow.c: Likewise.
* sysdeps/m68k/fpu/mpexp.c: Likewise.
* sysdeps/m68k/fpu/s_isnanl.c: Likewise.
* sysdeps/m68k/fpu/e_expf.c: Likewise.
* sysdeps/m68k/fpu/s_significand.c: Likewise.
* sysdeps/m68k/fpu/e_sinhf.c: Likewise.
* sysdeps/m68k/fpu/s_tanl.c: Likewise.
* sysdeps/m68k/fpu/s_tanhf.c: Likewise.
* sysdeps/m68k/fpu/s_cexp.c: Likewise.
* sysdeps/m68k/fpu/e_sqrtf.c: Likewise.
* sysdeps/m68k/fpu/s_isinf.c: Likewise.
* sysdeps/m68k/fpu/s_nearbyint.c: Likewise.
* sysdeps/m68k/fpu/e_fmod.c: Likewise.
* sysdeps/m68k/fpu/sincos32.c: Likewise.
* sysdeps/m68k/fpu/e_sqrtl.c: Likewise.
* sysdeps/m68k/fpu/s_sincosl.c: Likewise.
* sysdeps/m68k/fpu/e_atan2f.c: Likewise.
* sysdeps/m68k/fpu/s_nearbyintf.c: Likewise.
* sysdeps/m68k/fpu/e_fmodl.c: Likewise.
* sysdeps/m68k/fpu/e_coshf.c: Likewise.
* sysdeps/m68k/fpu/s_csinf.c: Likewise.
* sysdeps/m68k/fpu/s_ccosl.c: Likewise.
* sysdeps/m68k/fpu/e_sqrt.c: Likewise.
* sysdeps/m68k/fpu/s_sin.c: Likewise.
* sysdeps/m68k/fpu/e_asin.c: Likewise.
* sysdeps/m68k/fpu/mptan.c: Likewise.
* sysdeps/m68k/fpu/e_exp10f.c: Likewise.
* sysdeps/m68k/fpu/e_scalb.c: Likewise.
* sysdeps/m68k/fpu/s_finitel.c: Likewise.
* sysdeps/m68k/fpu/e_log10.c: Likewise.
* sysdeps/m68k/fpu/k_sinl.c: Likewise.
* sysdeps/m68k/fpu/e_remainderl.c: Likewise.
* sysdeps/m68k/fpu/s_remquol.c: Likewise.
* sysdeps/m68k/fpu/s_scalblnf.c: Likewise.
* sysdeps/m68k/fpu/s_llrint.c: Likewise.
* sysdeps/m68k/fpu/e_rem_pio2.c: Likewise.
* sysdeps/m68k/fpu/e_asinl.c: Likewise.
* sysdeps/m68k/fpu/e_logl.c: Likewise.
* sysdeps/m68k/fpu/s_cosf.c: Likewise.
* sysdeps/m68k/fpu/s_rint.c: Likewise.
* sysdeps/m68k/fpu/s_ceill.c: Likewise.
* sysdeps/m68k/fpu/s_modfl.c: Likewise.
* sysdeps/m68k/fpu/s_csinl.c: Likewise.
* sysdeps/m68k/fpu/s_tan.c: Likewise.
* sysdeps/m68k/fpu/s_sincosf.c: Likewise.
* sysdeps/m68k/fpu/dosincos.c: Likewise.
* sysdeps/m68k/fpu/e_powl.c: Likewise.
* sysdeps/m68k/fpu/s_ilogb.c: Likewise.
* sysdeps/m68k/fpu/s_llrintl.c: Likewise.
* sysdeps/m68k/fpu/e_expl.c: Likewise.
* sysdeps/m68k/fpu/libm-test-ulps: Likewise.
* sysdeps/m68k/fpu/s_tanf.c: Likewise.
* sysdeps/m68k/fpu/mpsqrt.c: Likewise.
* sysdeps/m68k/fpu/s_sinl.c: Likewise.
* sysdeps/m68k/fpu/mathimpl.h: Likewise.
* sysdeps/m68k/fpu/e_acosl.c: Likewise.
* sysdeps/m68k/fpu/e_cosh.c: Likewise.
* sysdeps/m68k/fpu/s_cexpl.c: Likewise.
* sysdeps/m68k/fpu/s_fabsl.c: Likewise.
* sysdeps/m68k/fpu/halfulp.c: Likewise.
* sysdeps/m68k/fpu/s_modff.c: Likewise.
* sysdeps/m68k/fpu/s_isnan.c: Likewise.
* sysdeps/m68k/fpu/e_atan2.c: Likewise.
* sysdeps/m68k/fpu/s_fabs.c: Likewise.
* sysdeps/m68k/fpu/e_log10f.c: Likewise.
* sysdeps/m68k/fpu/k_cosf.c: Likewise.
* sysdeps/m68k/fpu/e_sinh.c: Likewise.
* sysdeps/m68k/fpu/s_truncf.c: Likewise.
* sysdeps/m68k/fpu/s_ceil.c: Likewise.
* sysdeps/m68k/fpu/s_log1pf.c: Likewise.
* sysdeps/m68k/fpu/e_logf.c: Likewise.
* sysdeps/m68k/fpu/mpatan.c: Likewise.
* sysdeps/m68k/fpu/s_csin.c: Likewise.
* sysdeps/m68k/fpu/e_exp2l.c: Likewise.
* sysdeps/m68k/fpu/e_sinhl.c: Likewise.
* sysdeps/m68k/fpu/e_atan2l.c: Likewise.
* sysdeps/m68k/fpu/s_scalbn.c: Likewise.
* sysdeps/m68k/fpu/s_floorf.c: Likewise.
* sysdeps/m68k/fpu/e_log2l.c: Likewise.
* sysdeps/m68k/fpu/s_atanl.c: Likewise.
* sysdeps/m68k/fpu/s_llrintf.c: Likewise.
* sysdeps/m68k/fpu/k_sinf.c: Likewise.
* sysdeps/m68k/fpu/s_csinhf.c: Likewise.
* sysdeps/m68k/fpu/s_frexp.c: Likewise.
* sysdeps/m68k/fpu/s_atanf.c: Likewise.
* sysdeps/m68k/fpu/s_floor.c: Likewise.
* sysdeps/m68k/fpu/e_exp10l.c: Likewise.
* sysdeps/m68k/fpu/doasin.c: Likewise.
* sysdeps/m68k/fpu/s_rintl.c: Likewise.
* sysdeps/m68k/fpu/e_atanhl.c: Likewise.
* sysdeps/m68k/fpu/e_remainderf.c: Likewise.
* sysdeps/m68k/fpu/s_scalbln.c: Likewise.
* sysdeps/m68k/fpu/e_rem_pio2l.c: Likewise.
* sysdeps/m68k/fpu/e_exp10.c: Likewise.
* sysdeps/m68k/fpu/s_lrintf.c: Likewise.
* sysdeps/m68k/fpu/k_cos.c: Likewise.
* sysdeps/m68k/fpu/s_lrint.c: Likewise.
* sysdeps/m68k/fpu/s_ccosf.c: Likewise.
* sysdeps/m68k/fpu/s_scalblnl.c: Likewise.
* sysdeps/m68k/fpu/switch/Makefile: Likewise.
* sysdeps/m68k/fpu/switch/switch.c: Likewise.
* sysdeps/m68k/fpu/switch/68881-sw.h: Likewise.
* sysdeps/m68k/fpu/switch/bits/mathinline.h: Likewise.
* sysdeps/m68k/fpu/e_log.c: Likewise.
* sysdeps/m68k/fpu/s_nextafterl.c: Likewise.
* sysdeps/m68k/fpu/s_nearbyintl.c: Likewise.
* sysdeps/m68k/fpu/mpatan2.c: Likewise.
* sysdeps/m68k/fpu/k_sin.c: Likewise.
* sysdeps/m68k/fpu/e_atanh.c: Likewise.
* sysdeps/m68k/fpu/s_remquo.c: Likewise.
* sysdeps/m68k/fpu/e_log10l.c: Likewise.
* sysdeps/m68k/fpu/s_ceilf.c: Likewise.
* sysdeps/m68k/fpu/s_fabsf.c: Likewise.
* sysdeps/m68k/fpu/s_significandl.c: Likewise.
* sysdeps/m68k/fpu/s_ccosh.c: Likewise.
* sysdeps/m68k/fpu/e_coshl.c: Likewise.
* sysdeps/m68k/fpu/s_scalbnf.c: Likewise.
* sysdeps/m68k/fpu/s_finite.c: Likewise.
* sysdeps/m68k/fpu/e_exp2f.c: Likewise.
* sysdeps/m68k/fpu/k_rem_pio2f.c: Likewise.
* sysdeps/m68k/fpu/s_isinfl.c: Likewise.
* sysdeps/m68k/fpu/bits/mathinline.h: Likewise.
* sysdeps/m68k/fpu/e_powf.c: Likewise.
* sysdeps/m68k/rshift.S: Likewise.
* sysdeps/m68k/lshift.S: Likewise.
* sysdeps/m68k/strtold_l.c: Likewise.
* sysdeps/m68k/printf_fphex.c: Likewise.
* sysdeps/m68k/s_isinfl.c: Likewise.
* sysdeps/m68k/bits/huge_vall.h: Likewise.
* sysdeps/m68k/asm-syntax.h (andw, andl, subqw, tstw, tstl): New.
* sysdeps/m68k/bits/byteswap.h (__bswap32): Don't define for
Coldfire targets.
* sysdeps/m68k/bits/setjmp.h (__jmp_buf): Add a 64-byte
__fpregs field for Coldfire FPUs.
* sysdeps/m68k/dl-machine.h: Include sysdep.h.
(elf_machine_load_address): Use PCREL_OP.
(_dl_start_user): Likewise.
* sysdeps/m68k/dl-trampoline.S (_dl_runtime_resolve): Avoid jmp (%dN)
on Coldfire; push the target address and use rts instead.
(_dl_runtime_profile): Likewise. Round up the frame size to longword
rather than word alignment. Avoid dbra on Coldfire. Avoid using
jsr (%d0) on Coldfire; push the return address and target address
and use rts instead. Use fmovem.l rather than fmovem.x on Coldfire.
Add missing initialization of lrv_a0 and restore a0 from it after
calling _dl_call_pltexit. Adjust the stack offsets of later data
accordingly, fixing a previously incorrect offset for the inregs
parameter.
* sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Save the control
registers individually on Coldfire targets.
* sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise.
Add missing libm_hidden_def.
* sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Save and restore the
control registers individually on Coldfire targets.
* sysdeps/m68k/fpu/fesetround.c (fesetround): Add missing
libm_hidden_def.
* sysdeps/m68k/fpu_control.h: Add the Coldfire bit assignments to
the main comment.
(_FPU_DOUBLE): Define to 0 for Coldfire.
(_FPU_EXTENDED): Don't define for Coldfire.
(_FPU_RESERVED): Include bit 15 for Coldfire.
* sysdeps/m68k/Implies: Remove ieee754/ldbl-96.
* sysdeps/m68k/m680x0/Implies: Add it to this new file instead.
* sysdeps/m68k/ldsodefs.h: New file.
* sysdeps/m68k/__longjmp.c (__longjmp): Restore the floating-point
registers when using a Coldfire FPU.
* sysdeps/m68k/Makefile (long-double-fcts): Delete.
* sysdeps/m68k/m680x0/Makefile: Add it to this new file instead.
* sysdeps/m68k/memchr.S (__memchr): Add Coldfire code. Avoid
unnecessary moves.
* sysdeps/m68k/preconfigure (m680?0): Add "m680x0" to $machine.
(m68k): Use the compiler to decide whether $machine should be
set to m68k/coldfire or m68k/m680x0/m68020.
* sysdeps/m68k/rawmemchr.S (__rawmemchr): Add Coldfire code. Avoid
unnecessary moves.
* sysdeps/m68k/setjmp.c (__sigsetjmp): Save the floating-point
registers when using a Coldfire FPU. Use libc_hidden_def rather
than hidden_def.
* sysdeps/m68k/strchrnul.S (__strchrnul): Add Coldfire code. Avoid
unnecessary moves.
* sysdeps/m68k/strchr.S (strchr): Likewise.
* sysdeps/m68k/sysdep.h (PCREL_OP): Define.
* sysdeps/m68k/tst-audit.h: New file.
* sysdeps/m68k/wcpcpy.c: Likewise.
* sysdeps/m68k/wcpcpy_chk.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/configure.in: New file.
* sysdeps/unix/sysv/linux/m68k/configure: Likewise.
* sysdeps/unix/sysv/linux/m68k/clone.S (__clone): Add Coldfire code.
* sysdeps/unix/sysv/linux/m68k/register-dump.h (real_catch_segfault):
Do not define on Coldfire.
(catch_segfault): Likewise.
(register_dump): Use the Coldfire-specific sigcontext fields to
display call-saved data and address registers (rather than the
data stored in sc_fpstate by real_catch_segfault). Display 8-byte
floating-point registers on Coldfire.
* sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary
register to SINGLE_THREAD_P.
* sysdeps/unix/sysv/linux/m68k/sys/reg.h (PT_FP0): Redefine for
Coldfire.
(PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7): Likewise.
* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (fpregset): Sync field
order with linux. Make f_fpregs an 8*2 array on Coldfire.
(ucontext): Sync field order with linux.
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Guard against multiple
inclusion.
(SYSCALL_ERROR_HANDLER): Use PCREL_OP.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (oldgetrlimit): Delete.
(oldsetrlimit): Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list: New file.
List oldgetrlimit and oldsetrlimit here instead.
* sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: New file.
* sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Likewise.
* sysdeps/m68k/coldfire/bits/atomic.h: Likewise.
* sysdeps/m68k/coldfire/fpu/e_sqrt.c: Likewise.
* sysdeps/m68k/coldfire/fpu/e_sqrtf.c: Likewise.
* sysdeps/m68k/coldfire/fpu/fraiseexcpt.c: Likewise.
* sysdeps/m68k/coldfire/fpu/libm-test-ulps: Likewise.
* sysdeps/m68k/coldfire/fpu/s_fabs.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_fabsf.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_lrint.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_lrintf.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise.
* sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise.
* sysdeps/m68k/coldfire/shlib-versions: Likewise.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 328f858..b12f7f4 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,304 @@
+2006-10-03 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/m68k/bits/mathdef.h: Moved from sysdeps/m68k to
+ sysdeps/m68k/m680x0.
+ * sysdeps/m68k/m68020/submul_1.S: Likewise.
+ * sysdeps/m68k/m68020/Makefile: Likewise.
+ * sysdeps/m68k/m68020/mul_1.S: Likewise.
+ * sysdeps/m68k/m68020/wordcopy.S: Likewise.
+ * sysdeps/m68k/m68020/addmul_1.S: Likewise.
+ * sysdeps/m68k/m68020/bits/string.h: Likewise.
+ * sysdeps/m68k/m68020/bits/atomic.h: Likewise.
+ * sysdeps/m68k/sub_n.S: Likewise.
+ * sysdeps/m68k/add_n.S: Likewise.
+ * sysdeps/m68k/s_isnanl.c: Likewise.
+ * sysdeps/m68k/fpu/s_log1p.c: Likewise.
+ * sysdeps/m68k/fpu/e_asinf.c: Likewise.
+ * sysdeps/m68k/fpu/s_cosl.c: Likewise.
+ * sysdeps/m68k/fpu/s_isinff.c: Likewise.
+ * sysdeps/m68k/fpu/k_rem_pio2.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccos.c: Likewise.
+ * sysdeps/m68k/fpu/s_expm1.c: Likewise.
+ * sysdeps/m68k/fpu/slowexp.c: Likewise.
+ * sysdeps/m68k/fpu/k_rem_pio2l.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccoshf.c: Likewise.
+ * sysdeps/m68k/fpu/s_ilogbl.c: Likewise.
+ * sysdeps/m68k/fpu/Makefile: Likewise.
+ * sysdeps/m68k/fpu/s_expm1f.c: Likewise.
+ * sysdeps/m68k/fpu/s_significandf.c: Likewise.
+ * sysdeps/m68k/fpu/e_pow.c: Likewise.
+ * sysdeps/m68k/fpu/s_csinh.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp.c: Likewise.
+ * sysdeps/m68k/fpu/s_remquof.c: Likewise.
+ * sysdeps/m68k/fpu/s_ilogbf.c: Likewise.
+ * sysdeps/m68k/fpu/s_truncl.c: Likewise.
+ * sysdeps/m68k/fpu/s_frexpf.c: Likewise.
+ * sysdeps/m68k/fpu/s_cos.c: Likewise.
+ * sysdeps/m68k/fpu/fraiseexcpt.c: Likewise.
+ * sysdeps/m68k/fpu/branred.c: Likewise.
+ * sysdeps/m68k/fpu/s_frexpl.c: Likewise.
+ * sysdeps/m68k/fpu/s_atan.c: Likewise.
+ * sysdeps/m68k/fpu/e_rem_pio2f.c: Likewise.
+ * sysdeps/m68k/fpu/e_scalbl.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp2.c: Likewise.
+ * sysdeps/m68k/fpu/s_cexpf.c: Likewise.
+ * sysdeps/m68k/fpu/mplog.c: Likewise.
+ * sysdeps/m68k/fpu/s_rintf.c: Likewise.
+ * sysdeps/m68k/fpu/s_tanh.c: Likewise.
+ * sysdeps/m68k/fpu/e_scalbf.c: Likewise.
+ * sysdeps/m68k/fpu/s_csinhl.c: Likewise.
+ * sysdeps/m68k/fpu/s_floorl.c: Likewise.
+ * sysdeps/m68k/fpu/k_tanf.c: Likewise.
+ * sysdeps/m68k/fpu/k_tanl.c: Likewise.
+ * sysdeps/m68k/fpu/e_fmodf.c: Likewise.
+ * sysdeps/m68k/fpu/e_atanhf.c: Likewise.
+ * sysdeps/m68k/fpu/s_isnanf.c: Likewise.
+ * sysdeps/m68k/fpu/s_fpclassifyl.c: Likewise.
+ * sysdeps/m68k/fpu/s_modf.c: Likewise.
+ * sysdeps/m68k/fpu/e_log2.c: Likewise.
+ * sysdeps/m68k/fpu/e_acosf.c: Likewise.
+ * sysdeps/m68k/fpu/s_log1pl.c: Likewise.
+ * sysdeps/m68k/fpu/e_log2f.c: Likewise.
+ * sysdeps/m68k/fpu/mpa.c: Likewise.
+ * sysdeps/m68k/fpu/t_exp.c: Likewise.
+ * sysdeps/m68k/fpu/e_acos.c: Likewise.
+ * sysdeps/m68k/fpu/s_expm1l.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccoshl.c: Likewise.
+ * sysdeps/m68k/fpu/s_sinf.c: Likewise.
+ * sysdeps/m68k/fpu/k_tan.c: Likewise.
+ * sysdeps/m68k/fpu/k_cosl.c: Likewise.
+ * sysdeps/m68k/fpu/e_remainder.c: Likewise.
+ * sysdeps/m68k/fpu/s_trunc.c: Likewise.
+ * sysdeps/m68k/fpu/s_sincos.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalbnl.c: Likewise.
+ * sysdeps/m68k/fpu/s_finitef.c: Likewise.
+ * sysdeps/m68k/fpu/s_tanhl.c: Likewise.
+ * sysdeps/m68k/fpu/s_lrintl.c: Likewise.
+ * sysdeps/m68k/fpu/slowpow.c: Likewise.
+ * sysdeps/m68k/fpu/mpexp.c: Likewise.
+ * sysdeps/m68k/fpu/s_isnanl.c: Likewise.
+ * sysdeps/m68k/fpu/e_expf.c: Likewise.
+ * sysdeps/m68k/fpu/s_significand.c: Likewise.
+ * sysdeps/m68k/fpu/e_sinhf.c: Likewise.
+ * sysdeps/m68k/fpu/s_tanl.c: Likewise.
+ * sysdeps/m68k/fpu/s_tanhf.c: Likewise.
+ * sysdeps/m68k/fpu/s_cexp.c: Likewise.
+ * sysdeps/m68k/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/m68k/fpu/s_isinf.c: Likewise.
+ * sysdeps/m68k/fpu/s_nearbyint.c: Likewise.
+ * sysdeps/m68k/fpu/e_fmod.c: Likewise.
+ * sysdeps/m68k/fpu/sincos32.c: Likewise.
+ * sysdeps/m68k/fpu/e_sqrtl.c: Likewise.
+ * sysdeps/m68k/fpu/s_sincosl.c: Likewise.
+ * sysdeps/m68k/fpu/e_atan2f.c: Likewise.
+ * sysdeps/m68k/fpu/s_nearbyintf.c: Likewise.
+ * sysdeps/m68k/fpu/e_fmodl.c: Likewise.
+ * sysdeps/m68k/fpu/e_coshf.c: Likewise.
+ * sysdeps/m68k/fpu/s_csinf.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccosl.c: Likewise.
+ * sysdeps/m68k/fpu/e_sqrt.c: Likewise.
+ * sysdeps/m68k/fpu/s_sin.c: Likewise.
+ * sysdeps/m68k/fpu/e_asin.c: Likewise.
+ * sysdeps/m68k/fpu/mptan.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp10f.c: Likewise.
+ * sysdeps/m68k/fpu/e_scalb.c: Likewise.
+ * sysdeps/m68k/fpu/s_finitel.c: Likewise.
+ * sysdeps/m68k/fpu/e_log10.c: Likewise.
+ * sysdeps/m68k/fpu/k_sinl.c: Likewise.
+ * sysdeps/m68k/fpu/e_remainderl.c: Likewise.
+ * sysdeps/m68k/fpu/s_remquol.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalblnf.c: Likewise.
+ * sysdeps/m68k/fpu/s_llrint.c: Likewise.
+ * sysdeps/m68k/fpu/e_rem_pio2.c: Likewise.
+ * sysdeps/m68k/fpu/e_asinl.c: Likewise.
+ * sysdeps/m68k/fpu/e_logl.c: Likewise.
+ * sysdeps/m68k/fpu/s_cosf.c: Likewise.
+ * sysdeps/m68k/fpu/s_rint.c: Likewise.
+ * sysdeps/m68k/fpu/s_ceill.c: Likewise.
+ * sysdeps/m68k/fpu/s_modfl.c: Likewise.
+ * sysdeps/m68k/fpu/s_csinl.c: Likewise.
+ * sysdeps/m68k/fpu/s_tan.c: Likewise.
+ * sysdeps/m68k/fpu/s_sincosf.c: Likewise.
+ * sysdeps/m68k/fpu/dosincos.c: Likewise.
+ * sysdeps/m68k/fpu/e_powl.c: Likewise.
+ * sysdeps/m68k/fpu/s_ilogb.c: Likewise.
+ * sysdeps/m68k/fpu/s_llrintl.c: Likewise.
+ * sysdeps/m68k/fpu/e_expl.c: Likewise.
+ * sysdeps/m68k/fpu/libm-test-ulps: Likewise.
+ * sysdeps/m68k/fpu/s_tanf.c: Likewise.
+ * sysdeps/m68k/fpu/mpsqrt.c: Likewise.
+ * sysdeps/m68k/fpu/s_sinl.c: Likewise.
+ * sysdeps/m68k/fpu/mathimpl.h: Likewise.
+ * sysdeps/m68k/fpu/e_acosl.c: Likewise.
+ * sysdeps/m68k/fpu/e_cosh.c: Likewise.
+ * sysdeps/m68k/fpu/s_cexpl.c: Likewise.
+ * sysdeps/m68k/fpu/s_fabsl.c: Likewise.
+ * sysdeps/m68k/fpu/halfulp.c: Likewise.
+ * sysdeps/m68k/fpu/s_modff.c: Likewise.
+ * sysdeps/m68k/fpu/s_isnan.c: Likewise.
+ * sysdeps/m68k/fpu/e_atan2.c: Likewise.
+ * sysdeps/m68k/fpu/s_fabs.c: Likewise.
+ * sysdeps/m68k/fpu/e_log10f.c: Likewise.
+ * sysdeps/m68k/fpu/k_cosf.c: Likewise.
+ * sysdeps/m68k/fpu/e_sinh.c: Likewise.
+ * sysdeps/m68k/fpu/s_truncf.c: Likewise.
+ * sysdeps/m68k/fpu/s_ceil.c: Likewise.
+ * sysdeps/m68k/fpu/s_log1pf.c: Likewise.
+ * sysdeps/m68k/fpu/e_logf.c: Likewise.
+ * sysdeps/m68k/fpu/mpatan.c: Likewise.
+ * sysdeps/m68k/fpu/s_csin.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp2l.c: Likewise.
+ * sysdeps/m68k/fpu/e_sinhl.c: Likewise.
+ * sysdeps/m68k/fpu/e_atan2l.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalbn.c: Likewise.
+ * sysdeps/m68k/fpu/s_floorf.c: Likewise.
+ * sysdeps/m68k/fpu/e_log2l.c: Likewise.
+ * sysdeps/m68k/fpu/s_atanl.c: Likewise.
+ * sysdeps/m68k/fpu/s_llrintf.c: Likewise.
+ * sysdeps/m68k/fpu/k_sinf.c: Likewise.
+ * sysdeps/m68k/fpu/s_csinhf.c: Likewise.
+ * sysdeps/m68k/fpu/s_frexp.c: Likewise.
+ * sysdeps/m68k/fpu/s_atanf.c: Likewise.
+ * sysdeps/m68k/fpu/s_floor.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp10l.c: Likewise.
+ * sysdeps/m68k/fpu/doasin.c: Likewise.
+ * sysdeps/m68k/fpu/s_rintl.c: Likewise.
+ * sysdeps/m68k/fpu/e_atanhl.c: Likewise.
+ * sysdeps/m68k/fpu/e_remainderf.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalbln.c: Likewise.
+ * sysdeps/m68k/fpu/e_rem_pio2l.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp10.c: Likewise.
+ * sysdeps/m68k/fpu/s_lrintf.c: Likewise.
+ * sysdeps/m68k/fpu/k_cos.c: Likewise.
+ * sysdeps/m68k/fpu/s_lrint.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccosf.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalblnl.c: Likewise.
+ * sysdeps/m68k/fpu/switch/Makefile: Likewise.
+ * sysdeps/m68k/fpu/switch/switch.c: Likewise.
+ * sysdeps/m68k/fpu/switch/68881-sw.h: Likewise.
+ * sysdeps/m68k/fpu/switch/bits/mathinline.h: Likewise.
+ * sysdeps/m68k/fpu/e_log.c: Likewise.
+ * sysdeps/m68k/fpu/s_nextafterl.c: Likewise.
+ * sysdeps/m68k/fpu/s_nearbyintl.c: Likewise.
+ * sysdeps/m68k/fpu/mpatan2.c: Likewise.
+ * sysdeps/m68k/fpu/k_sin.c: Likewise.
+ * sysdeps/m68k/fpu/e_atanh.c: Likewise.
+ * sysdeps/m68k/fpu/s_remquo.c: Likewise.
+ * sysdeps/m68k/fpu/e_log10l.c: Likewise.
+ * sysdeps/m68k/fpu/s_ceilf.c: Likewise.
+ * sysdeps/m68k/fpu/s_fabsf.c: Likewise.
+ * sysdeps/m68k/fpu/s_significandl.c: Likewise.
+ * sysdeps/m68k/fpu/s_ccosh.c: Likewise.
+ * sysdeps/m68k/fpu/e_coshl.c: Likewise.
+ * sysdeps/m68k/fpu/s_scalbnf.c: Likewise.
+ * sysdeps/m68k/fpu/s_finite.c: Likewise.
+ * sysdeps/m68k/fpu/e_exp2f.c: Likewise.
+ * sysdeps/m68k/fpu/k_rem_pio2f.c: Likewise.
+ * sysdeps/m68k/fpu/s_isinfl.c: Likewise.
+ * sysdeps/m68k/fpu/bits/mathinline.h: Likewise.
+ * sysdeps/m68k/fpu/e_powf.c: Likewise.
+ * sysdeps/m68k/rshift.S: Likewise.
+ * sysdeps/m68k/lshift.S: Likewise.
+ * sysdeps/m68k/strtold_l.c: Likewise.
+ * sysdeps/m68k/printf_fphex.c: Likewise.
+ * sysdeps/m68k/s_isinfl.c: Likewise.
+ * sysdeps/m68k/bits/huge_vall.h: Likewise.
+
+ * sysdeps/m68k/asm-syntax.h (andw, andl, subqw, tstw, tstl): New.
+ * sysdeps/m68k/bits/byteswap.h (__bswap32): Don't define for
+ Coldfire targets.
+ * sysdeps/m68k/bits/setjmp.h (__jmp_buf): Add a 64-byte
+ __fpregs field for Coldfire FPUs.
+ * sysdeps/m68k/dl-machine.h: Include sysdep.h.
+ (elf_machine_load_address): Use PCREL_OP.
+ (_dl_start_user): Likewise.
+ * sysdeps/m68k/dl-trampoline.S (_dl_runtime_resolve): Avoid jmp (%dN)
+ on Coldfire; push the target address and use rts instead.
+ (_dl_runtime_profile): Likewise. Round up the frame size to longword
+ rather than word alignment. Avoid dbra on Coldfire. Avoid using
+ jsr (%d0) on Coldfire; push the return address and target address
+ and use rts instead. Use fmovem.l rather than fmovem.x on Coldfire.
+ Add missing initialization of lrv_a0 and restore a0 from it after
+ calling _dl_call_pltexit. Adjust the stack offsets of later data
+ accordingly, fixing a previously incorrect offset for the inregs
+ parameter.
+ * sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Save the control
+ registers individually on Coldfire targets.
+ * sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise.
+ Add missing libm_hidden_def.
+ * sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Save and restore the
+ control registers individually on Coldfire targets.
+ * sysdeps/m68k/fpu/fesetround.c (fesetround): Add missing
+ libm_hidden_def.
+ * sysdeps/m68k/fpu_control.h: Add the Coldfire bit assignments to
+ the main comment.
+ (_FPU_DOUBLE): Define to 0 for Coldfire.
+ (_FPU_EXTENDED): Don't define for Coldfire.
+ (_FPU_RESERVED): Include bit 15 for Coldfire.
+ * sysdeps/m68k/Implies: Remove ieee754/ldbl-96.
+ * sysdeps/m68k/m680x0/Implies: Add it to this new file instead.
+ * sysdeps/m68k/ldsodefs.h: New file.
+ * sysdeps/m68k/__longjmp.c (__longjmp): Restore the floating-point
+ registers when using a Coldfire FPU.
+ * sysdeps/m68k/Makefile (long-double-fcts): Delete.
+ * sysdeps/m68k/m680x0/Makefile: Add it to this new file instead.
+ * sysdeps/m68k/memchr.S (__memchr): Add Coldfire code. Avoid
+ unnecessary moves.
+ * sysdeps/m68k/preconfigure (m680?0): Add "m680x0" to $machine.
+ (m68k): Use the compiler to decide whether $machine should be
+ set to m68k/coldfire or m68k/m680x0/m68020.
+ * sysdeps/m68k/rawmemchr.S (__rawmemchr): Add Coldfire code. Avoid
+ unnecessary moves.
+ * sysdeps/m68k/setjmp.c (__sigsetjmp): Save the floating-point
+ registers when using a Coldfire FPU. Use libc_hidden_def rather
+ than hidden_def.
+ * sysdeps/m68k/strchrnul.S (__strchrnul): Add Coldfire code. Avoid
+ unnecessary moves.
+ * sysdeps/m68k/strchr.S (strchr): Likewise.
+ * sysdeps/m68k/sysdep.h (PCREL_OP): Define.
+ * sysdeps/m68k/tst-audit.h: New file.
+ * sysdeps/m68k/wcpcpy.c: Likewise.
+ * sysdeps/m68k/wcpcpy_chk.c: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/configure.in: New file.
+ * sysdeps/unix/sysv/linux/m68k/configure: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/clone.S (__clone): Add Coldfire code.
+ * sysdeps/unix/sysv/linux/m68k/register-dump.h (real_catch_segfault):
+ Do not define on Coldfire.
+ (catch_segfault): Likewise.
+ (register_dump): Use the Coldfire-specific sigcontext fields to
+ display call-saved data and address registers (rather than the
+ data stored in sc_fpstate by real_catch_segfault). Display 8-byte
+ floating-point registers on Coldfire.
+ * sysdeps/unix/sysv/linux/m68k/socket.S (__socket): Pass a temporary
+ register to SINGLE_THREAD_P.
+ * sysdeps/unix/sysv/linux/m68k/sys/reg.h (PT_FP0): Redefine for
+ Coldfire.
+ (PT_FP1, PT_FP2, PT_FP3, PT_FP4, PT_FP5, PT_FP6, PT_FP7): Likewise.
+ * sysdeps/unix/sysv/linux/m68k/sys/ucontext.h (fpregset): Sync field
+ order with linux. Make f_fpregs an 8*2 array on Coldfire.
+ (ucontext): Sync field order with linux.
+ * sysdeps/unix/sysv/linux/m68k/sysdep.h: Guard against multiple
+ inclusion.
+ (SYSCALL_ERROR_HANDLER): Use PCREL_OP.
+ * sysdeps/unix/sysv/linux/m68k/syscalls.list (oldgetrlimit): Delete.
+ (oldsetrlimit): Likewise.
+ * sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list: New file.
+ List oldgetrlimit and oldsetrlimit here instead.
+ * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: New file.
+ * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Likewise.
+ * sysdeps/m68k/coldfire/bits/atomic.h: Likewise.
+ * sysdeps/m68k/coldfire/fpu/e_sqrt.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/fraiseexcpt.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/libm-test-ulps: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_fabs.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_fabsf.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_lrint.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_lrintf.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_rint.c: Likewise.
+ * sysdeps/m68k/coldfire/fpu/s_rintf.c: Likewise.
+ * sysdeps/m68k/coldfire/shlib-versions: Likewise.
+
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/m68k/preconfigure: New file.
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
index 5c778d4..beaba93 100644
--- a/sysdeps/m68k/Implies
+++ b/sysdeps/m68k/Implies
@@ -1,5 +1,4 @@
wordsize-32
# 68k uses IEEE 754 floating point.
-ieee754/ldbl-96
ieee754/dbl-64
ieee754/flt-32
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index fab6bd5..ca0d500 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -30,9 +30,6 @@ pic-ccflag = -fpic
# Make sure setjmp.c is compiled with a frame pointer
CFLAGS-setjmp.c := -fno-omit-frame-pointer
-# The 68k `long double' is a distinct type we support.
-long-double-fcts = yes
-
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 89ff5ba..7d876a7 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -31,6 +31,9 @@ __longjmp (__jmp_buf env, int val)
/* Restore the floating-point registers. */
asm volatile("fmovem%.x %0, %/fp0-%/fp7" :
/* No outputs. */ : "g" (env[0].__fpregs[0]));
+#elif defined (__mcffpu__)
+ asm volatile("fmovem %0, %/fp0-%/fp7" :
+ /* No outputs. */ : "m" (env[0].__fpregs[0]));
#endif
/* Put VAL in D0. */
diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h
index 8e2a4ca..645e906 100644
--- a/sysdeps/m68k/asm-syntax.h
+++ b/sysdeps/m68k/asm-syntax.h
@@ -93,7 +93,9 @@
#define cmpl cmp.l
#define orl or.l
#define clrl clr.l
+#define andw and.w
#define eorw eor.w
+#define andl and.l
#define lsrl lsr.l
#define lsll lsl.l
#define roxrl roxr.l
@@ -103,7 +105,10 @@
#define addql addq.l
#define subl sub.l
#define subxl subx.l
+#define subqw subq.w
#define subql subq.l
#define negl neg.l
#define mulul mulu.l
+#define tstw tst.w
+#define tstl tst.l
#endif
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index 549d445..41b386b 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -35,7 +35,7 @@
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
-#if defined __GNUC__ && __GNUC__ >= 2
+#if defined __GNUC__ && __GNUC__ >= 2 && !defined(__mcoldfire__)
# define __bswap_32(x) \
__extension__ \
({ unsigned int __bswap_32_v; \
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 2d5a082..27ec051 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -38,6 +38,8 @@ typedef struct
/* There are eight floating point registers which
are saved in IEEE 96-bit extended format. */
char __fpregs[8 * (96 / 8)];
+#elif defined __mcffpu__
+ char __fpregs[8 * (64 / 8)];
#endif
} __jmp_buf[1];
diff --git a/sysdeps/m68k/coldfire/bits/atomic.h b/sysdeps/m68k/coldfire/bits/atomic.h
new file mode 100644
index 0000000..8b5403e
--- /dev/null
+++ b/sysdeps/m68k/coldfire/bits/atomic.h
@@ -0,0 +1,69 @@
+/* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_ATOMIC_H
+#define _BITS_ATOMIC_H 1
+
+#include <stdint.h>
+
+/* Coldfire has no atomic compare-and-exchange operation, and the
+ kernel provides no userspace atomicity operations. Here we just
+ use generic non-atomic implementations instead. */
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int16_t atomic16_t;
+typedef uint16_t uatomic16_t;
+typedef int_fast16_t atomic_fast16_t;
+typedef uint_fast16_t uatomic_fast16_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef int64_t atomic64_t;
+typedef uint64_t uatomic64_t;
+typedef int_fast64_t atomic_fast64_t;
+typedef uint_fast64_t uatomic_fast64_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+/* The only basic operation needed is compare and exchange. */
+#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+ ({ __typeof (mem) __gmemp = (mem); \
+ __typeof (*mem) __gret = *__gmemp; \
+ __typeof (*mem) __gnewval = (newval); \
+ \
+ if (__gret == (oldval)) \
+ *__gmemp = __gnewval; \
+ __gret; })
+
+#define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+ ({ __typeof (mem) __gmemp = (mem); \
+ __typeof (*mem) __gnewval = (newval); \
+ \
+ *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; })
+
+#endif
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/e_sqrt.c
similarity index 72%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/e_sqrt.c
index c9f6c6a..a160308 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+double
+__ieee754_sqrt (double x)
{
- return __m81_u(FUNC)(x);
+ asm ("fdsqrt.d %1,%0" : "=f" (x) : "fm" (x));
+ return x;
}
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c
similarity index 72%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/e_sqrtf.c
index c9f6c6a..7cfc0dd 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/e_sqrtf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+float
+__ieee754_sqrtf (float x)
{
- return __m81_u(FUNC)(x);
+ double result;
+ asm ("fssqrt.s %1,%0" : "=f" (result) : "dm" (x));
+ return result;
}
diff --git a/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..c62ddaa
--- /dev/null
+++ b/sysdeps/m68k/coldfire/fpu/fraiseexcpt.c
@@ -0,0 +1,67 @@
+/* Raise given exceptions.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+
+int
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXCEPTS. But we must raise only one
+ signal at a time. It is important that if the overflow/underflow
+ exception and the divide by zero exception are given at the same
+ time, the overflow/underflow exception follows the divide by zero
+ exception.
+
+ The Coldfire FPU allows an exception to be raised by asserting
+ the associated EXC bit and then executing an arbitrary arithmetic
+ instruction. fmove.l is classified as an arithmetic instruction
+ and suffices for this purpose.
+
+ We therefore raise an exception by setting both the EXC and AEXC
+ bit associated with the exception (the former being 6 bits to the
+ left of the latter) and then loading the longword at (%sp) into an
+ FP register. */
+
+ inline void
+ raise_one_exception (int mask)
+ {
+ if (excepts & mask)
+ {
+ int fpsr;
+ double unused;
+
+ asm volatile ("fmove%.l %/fpsr,%0" : "=d" (fpsr));
+ fpsr |= (mask << 6) | mask;
+ asm volatile ("fmove%.l %0,%/fpsr" :: "d" (fpsr));
+ asm volatile ("fmove%.l (%%sp),%0" : "=f" (unused));
+ }
+ }
+
+ raise_one_exception (FE_INVALID);
+ raise_one_exception (FE_DIVBYZERO);
+ raise_one_exception (FE_OVERFLOW);
+ raise_one_exception (FE_UNDERFLOW);
+ raise_one_exception (FE_INEXACT);
+
+ /* Success. */
+ return 0;
+}
+libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/coldfire/fpu/libm-test-ulps
similarity index 57%
copy from sysdeps/m68k/fpu/libm-test-ulps
copy to sysdeps/m68k/coldfire/fpu/libm-test-ulps
index 854c10c..8608c0d 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/coldfire/fpu/libm-test-ulps
@@ -1,89 +1,44 @@
# Begin of automatic generation
-# acosh
-Test "acosh (7) == 2.63391579384963341725009269461593689":
-ildouble: 1
-ldouble: 1
-
-# asinh
-Test "asinh (0.75) == 0.693147180559945309417232121458176568":
-ildouble: 1
-ldouble: 1
-
# atan2
-Test "atan2 (0.390625, .00029) == 1.57005392693128974780151246612928941":
-ildouble: 1
-ldouble: 1
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
# atanh
Test "atanh (0.75) == 0.972955074527656652552676371721589865":
-ildouble: 1
-ldouble: 1
-
-# cacos
-Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
-ildouble: 6
-ldouble: 6
Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
-double: 1
-idouble: 1
-ildouble: 2
-ldouble: 2
-Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i":
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i":
float: 1
ifloat: 1
# casin
Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
double: 1
-float: 5
-idouble: 1
-ifloat: 5
-ildouble: 3
-ldouble: 3
-Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
float: 1
+idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
-double: 6
-float: 19
-idouble: 6
-ifloat: 19
-ildouble: 5
-ldouble: 5
-Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
-double: 13
+double: 5
float: 1
-idouble: 13
+idouble: 5
ifloat: 1
-ildouble: 6
-ldouble: 6
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -92,8 +47,6 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# catan
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -101,40 +54,38 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
-ildouble: 1
-ldouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
-ildouble: 1
-ldouble: 1
+double: 4
+idouble: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
# cbrt
-Test "cbrt (-0.001) == -0.1":
-ildouble: 1
-ldouble: 1
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
# ccos
-Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
-float: 1
-ifloat: 1
Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# ccosh
Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
@@ -143,42 +94,27 @@ ifloat: 1
Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# cexp
-Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
-float: 1
-ifloat: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
-float: 2
-ifloat: 2
-Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# clog
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
-ildouble: 1
-ldouble: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -187,9 +123,9 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
-ildouble: 1
-ldouble: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -202,9 +138,6 @@ ifloat: 1
Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
-double: 1
-idouble: 1
Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
float: 1
ifloat: 1
@@ -218,17 +151,8 @@ Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
-double: 1
float: 1
-idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
-double: 1
-idouble: 1
-ildouble: 2
-ldouble: 2
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -245,25 +169,12 @@ ifloat: 1
# cos
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "cos (pi/2) == 0":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
# cpow
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
@@ -273,149 +184,103 @@ Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.3318254391776088
float: 1
ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
-float: 1
-ifloat: 1
-ildouble: 9
-ldouble: 9
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
-float: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
double: 1
-float: 2
+float: 4
idouble: 1
-ifloat: 2
-ildouble: 15
-ldouble: 15
-Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
-ildouble: 5
-ldouble: 5
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
-float: 1
+float: 4
idouble: 1
-ifloat: 1
-ildouble: 4
-ldouble: 4
+ifloat: 4
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
-float: 6
-ifloat: 6
-ildouble: 2
-ldouble: 2
-Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
-float: 1
-ifloat: 1
+float: 2
+ifloat: 2
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
double: 2
-float: 3
+float: 2
idouble: 2
-ifloat: 3
-ildouble: 1
-ldouble: 1
+ifloat: 2
-# csin
-Test "Real part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
-float: 1
-ifloat: 1
-Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
-# csinh
-Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
-float: 1
-ifloat: 1
-Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
-Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
-ildouble: 2
-ldouble: 2
# ctanh
-Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
-ildouble: 1
-ldouble: 1
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
idouble: 1
-Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
# erfc
-Test "erfc (0.75) == 0.288844366346484868401062165408589223":
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
float: 1
+idouble: 2
ifloat: 1
-Test "erfc (1.25) == 0.0770998717435417698634765188027188596":
-ildouble: 1
-ldouble: 1
-Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
Test "expm1 (1) == M_El - 1.0":
-ildouble: 1
-ldouble: 1
-
-# gamma
-Test "gamma (-0.5) == log(2*sqrt(pi))":
-ildouble: 1
-ldouble: 1
-Test "gamma (0.5) == log(sqrt(pi))":
-ildouble: 1
-ldouble: 1
-Test "gamma (3) == M_LN2l":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
@@ -445,234 +310,153 @@ ifloat: 1
# j0
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "j0 (0.75) == 0.864242275166648623555731103820923211":
float: 1
ifloat: 1
-Test "j0 (1.5) == 0.511827671735918128749051744283411720":
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
float: 1
+idouble: 2
ifloat: 1
-Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
+float: 1
idouble: 1
-Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# j1
-Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
-float: 1
-ifloat: 1
-Test "j1 (1.0) == 0.440050585744933515959682203718914913":
-float: 1
-ifloat: 1
-Test "j1 (1.5) == 0.557936507910099641990121213156089400":
-float: 1
-ifloat: 1
Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-ildouble: 1
-ldouble: 1
Test "j1 (2.0) == 0.576724807756873387202448242269137087":
-float: 1
-ifloat: 1
+double: 1
+idouble: 1
Test "j1 (8.0) == 0.234636346853914624381276651590454612":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
# jn
Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
float: 1
ifloat: 1
-Test "jn (0, 1.5) == 0.511827671735918128749051744283411720":
-float: 1
-ifloat: 1
Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
-double: 1
-idouble: 1
-Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
+double: 2
float: 1
+idouble: 2
ifloat: 1
-Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-Test "jn (1, 1.5) == 0.557936507910099641990121213156089400":
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-ildouble: 1
-ldouble: 1
Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
-float: 1
-ifloat: 1
+double: 1
+idouble: 1
Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
-float: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
-Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 1
-float: 5
+float: 1
idouble: 1
-ifloat: 5
-ildouble: 2
-ldouble: 2
+ifloat: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083":
+float: 4
+ifloat: 4
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083":
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
-double: 1
+double: 3
float: 1
-idouble: 1
+idouble: 3
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
-ildouble: 1
-ldouble: 1
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
# lgamma
-Test "lgamma (-0.5) == log(2*sqrt(pi))":
-ildouble: 1
-ldouble: 1
-Test "lgamma (0.5) == log(sqrt(pi))":
-ildouble: 1
-ldouble: 1
Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "lgamma (3) == M_LN2l":
-ildouble: 1
-ldouble: 1
-
-# log
-Test "log (0.75) == -0.287682072451780927439219005993827432":
-ildouble: 1
-ldouble: 1
-Test "log (2) == M_LN2l":
-ildouble: 1
-ldouble: 1
-Test "log (e) == 1":
-float: 1
-ifloat: 1
# log10
Test "log10 (0.75) == -0.124938736608299953132449886193870744":
-ildouble: 2
-ldouble: 2
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
# log1p
Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
-ildouble: 1
-ldouble: 1
-
-# log2
-Test "log2 (0.75) == -.415037499278843818546261056052183492":
-ildouble: 1
-ldouble: 1
-
-# pow
-Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
# sincos
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
-idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-
-# sinh
-Test "sinh (0.75) == 0.822316731935829980703661634446913849":
-ildouble: 1
-ldouble: 1
-
-# tan
-Test "tan (0.75) == 0.931596459944072461165202756573936428":
-ildouble: 1
-ldouble: 1
-Test "tan (pi/4) == 1":
-double: 1
-idouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -680,231 +464,164 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "tgamma (4) == 6":
-ildouble: 1
-ldouble: 1
# y0
-Test "y0 (0.125) == -1.38968062514384052915582277745018693":
-double: 1
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
float: 1
-idouble: 1
+idouble: 2
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "y0 (0.75) == -0.137172769385772397522814379396581855":
-double: 1
-idouble: 1
-ildouble: 2
-ldouble: 2
-Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
-ildouble: 1
-ldouble: 1
Test "y0 (1.5) == 0.382448923797758843955068554978089862":
-ildouble: 1
-ldouble: 1
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
-ildouble: 1
-ldouble: 1
-Test "y0 (2.0) == 0.510375672649745119596606592727157873":
float: 1
ifloat: 1
Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# y1
Test "y1 (0.125) == -5.19993611253477499595928744876579921":
-ildouble: 1
-ldouble: 1
-Test "y1 (1.0) == -0.781212821300288716547150000047964821":
double: 1
idouble: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
float: 1
+idouble: 3
ifloat: 1
Test "y1 (2.0) == -0.107032431540937546888370772277476637":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "y1 (8.0) == -0.158060461731247494255555266187483550":
-ildouble: 1
-ldouble: 1
-
-# yn
-Test "yn (0, 0.125) == -1.38968062514384052915582277745018693":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "yn (0, 0.75) == -0.137172769385772397522814379396581855":
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
+float: 2
idouble: 1
-ildouble: 2
-ldouble: 2
+ifloat: 2
+
+# yn
Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
-ildouble: 1
-ldouble: 1
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
-ildouble: 1
-ldouble: 1
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
-ildouble: 1
-ldouble: 1
-Test "yn (0, 2.0) == 0.510375672649745119596606592727157873":
float: 1
ifloat: 1
Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
float: 1
+idouble: 3
ifloat: 1
-Test "yn (1, 1.0) == -0.781212821300288716547150000047964821":
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
double: 1
-idouble: 1
-Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
float: 1
+idouble: 1
ifloat: 1
-Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
float: 2
+idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
-Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
-ildouble: 1
-ldouble: 1
Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
-ildouble: 2
-ldouble: 2
Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 4
-ldouble: 4
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
-Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
# Maximal error of functions:
-Function: "acosh":
-ildouble: 1
-ldouble: 1
-
-Function: "asinh":
-ildouble: 1
-ldouble: 1
-
Function: "atan2":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
Function: "atanh":
-ildouble: 1
-ldouble: 1
-
-Function: Real part of "cacos":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
-
-Function: Imaginary part of "cacos":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "cacosh":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
-ildouble: 6
-ldouble: 6
Function: Imaginary part of "cacosh":
-double: 1
float: 1
-idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
Function: Real part of "casin":
double: 1
-float: 5
-idouble: 1
-ifloat: 5
-ildouble: 3
-ldouble: 3
-
-Function: Imaginary part of "casin":
float: 1
+idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
Function: Real part of "casinh":
-double: 6
-float: 19
-idouble: 6
-ifloat: 19
-ildouble: 5
-ldouble: 5
-
-Function: Imaginary part of "casinh":
-double: 13
+double: 5
float: 1
-idouble: 13
+idouble: 5
ifloat: 1
-ildouble: 6
-ldouble: 6
-Function: Real part of "catan":
-ildouble: 1
-ldouble: 1
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
Function: Imaginary part of "catan":
double: 1
@@ -913,253 +630,191 @@ idouble: 1
ifloat: 1
Function: Real part of "catanh":
-ildouble: 1
-ldouble: 1
+double: 4
+idouble: 4
Function: "cbrt":
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
Function: Real part of "ccos":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Imaginary part of "ccos":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Real part of "ccosh":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Function: Imaginary part of "ccosh":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Real part of "cexp":
-float: 2
-ifloat: 2
+float: 1
+ifloat: 1
Function: Imaginary part of "cexp":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Real part of "clog":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: Imaginary part of "clog":
-ildouble: 1
-ldouble: 1
Function: Real part of "clog10":
-double: 1
float: 1
-idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Imaginary part of "clog10":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
Function: "cos":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: Real part of "cpow":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
-ildouble: 15
-ldouble: 15
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
Function: Imaginary part of "cpow":
double: 2
-float: 6
+float: 2
idouble: 2
-ifloat: 6
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "csin":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+ifloat: 2
-Function: Imaginary part of "csin":
+Function: Real part of "csinh":
float: 1
ifloat: 1
-Function: Real part of "csinh":
+Function: Imaginary part of "csinh":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-Function: Imaginary part of "csinh":
+Function: Real part of "csqrt":
float: 1
ifloat: 1
-Function: Real part of "ctan":
+Function: Imaginary part of "ctan":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
-Function: Imaginary part of "ctan":
-ildouble: 2
-ldouble: 2
+Function: Real part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Function: Imaginary part of "ctanh":
-double: 1
float: 1
-idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+
+Function: "erf":
+double: 1
+idouble: 1
Function: "erfc":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 1
+idouble: 1
-Function: "expm1":
-ildouble: 1
-ldouble: 1
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
-Function: "gamma":
-ildouble: 1
-ldouble: 1
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Function: "hypot":
float: 1
ifloat: 1
Function: "j0":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
Function: "j1":
+double: 1
float: 2
+idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
Function: "jn":
-double: 1
-float: 5
-idouble: 1
-ifloat: 5
-ildouble: 2
-ldouble: 2
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
Function: "lgamma":
double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 1
-ldouble: 1
-
-Function: "log":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
Function: "log10":
-float: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
Function: "log1p":
-ildouble: 1
-ldouble: 1
-
-Function: "log2":
-ildouble: 1
-ldouble: 1
-
-Function: "pow":
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
Function: "sincos":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: "sinh":
-ildouble: 1
-ldouble: 1
Function: "tan":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
Function: "tgamma":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: "y0":
-double: 1
+double: 2
float: 1
-idouble: 1
+idouble: 2
ifloat: 1
-ildouble: 2
-ldouble: 2
Function: "y1":
-double: 1
+double: 3
float: 2
-idouble: 1
+idouble: 3
ifloat: 2
-ildouble: 1
-ldouble: 1
Function: "yn":
-double: 1
+double: 3
float: 2
-idouble: 1
+idouble: 3
ifloat: 2
-ildouble: 4
-ldouble: 4
# end of automatic generation
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_fabs.c
similarity index 73%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_fabs.c
index c9f6c6a..45403cb 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_fabs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+double
+__fabs (double x)
{
- return __m81_u(FUNC)(x);
+ asm ("fdabs.d %1,%0" : "=f" (x) : "fm" (x));
+ return x;
}
+weak_alias (__fabs, fabs)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__fabs, __fabsl)
+weak_alias (__fabs, fabsl)
+#endif
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_fabsf.c
similarity index 72%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_fabsf.c
index c9f6c6a..7622cc9 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_fabsf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+float
+__fabsf (float x)
{
- return __m81_u(FUNC)(x);
+ asm ("fsabs.s %1,%0" : "=f" (x) : "dm" (x));
+ return x;
}
+weak_alias (__fabsf, fabsf)
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_lrint.c
similarity index 73%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_lrint.c
index c9f6c6a..81fae95 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_lrint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+long int
+__lrint (double x)
{
- return __m81_u(FUNC)(x);
+ long int result;
+ asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x));
+ return result;
}
+weak_alias (__lrint, lrint)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__lrint, __lrintl)
+weak_alias (__lrint, lrintl)
+#endif
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_lrintf.c
similarity index 72%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_lrintf.c
index c9f6c6a..87ae5e0 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_lrintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+long int
+__lrintf (float x)
{
- return __m81_u(FUNC)(x);
+ long int result;
+ asm ("fmove.l %1,%0" : "=dm" (result) : "f" (x));
+ return result;
}
+weak_alias (__lrintf, lrintf)
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_rint.c
similarity index 73%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_rint.c
index c9f6c6a..7be8bb6 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_rint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+double
+__rint (double x)
{
- return __m81_u(FUNC)(x);
+ asm ("fint.d %1,%0" : "=f" (x) : "fm" (x));
+ return x;
}
+weak_alias (__rint, rint)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__rint, __rintl)
+weak_alias (__rint, rintl)
+#endif
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/coldfire/fpu/s_rintf.c
similarity index 72%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/coldfire/fpu/s_rintf.c
index c9f6c6a..2337d74 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/coldfire/fpu/s_rintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
+float
+__rintf (float x)
{
- return __m81_u(FUNC)(x);
+ double result;
+ asm ("fint.s %1,%0" : "=f" (result) : "dm" (x));
+ return (float) result;
}
+weak_alias (__rintf, rintf)
diff --git a/sysdeps/m68k/coldfire/shlib-versions b/sysdeps/m68k/coldfire/shlib-versions
new file mode 100644
index 0000000..f4c68b2
--- /dev/null
+++ b/sysdeps/m68k/coldfire/shlib-versions
@@ -0,0 +1 @@
+m68k-.*-linux.* DEFAULT GLIBC_2.4
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index f31b687..fad1ef9 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -23,6 +23,7 @@
#define ELF_MACHINE_NAME "m68k"
#include <sys/param.h>
+#include <sysdep.h>
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
@@ -48,7 +49,7 @@ static inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
- asm ("lea _dl_start(%%pc), %0\n\t"
+ asm (PCREL_OP ("lea", "_dl_start", "%0", "%0", "%%pc") "\n\t"
"sub.l _dl_start@GOT.w(%%a5), %0"
: "=a" (addr));
return addr;
@@ -130,7 +131,7 @@ _dl_start_user:\n\
move.l %d0, %a4\n\
| See if we were run as a command with the executable file\n\
| name as an extra leading argument.\n\
- move.l _dl_skip_args(%pc), %d0\n\
+ " PCREL_OP ("move.l", "_dl_skip_args", "%d0", "%d0", "%pc") "\n\
| Pop the original argument count\n\
move.l (%sp)+, %d1\n\
| Subtract _dl_skip_args from it.\n\
@@ -143,12 +144,12 @@ _dl_start_user:\n\
pea 8(%sp, %d1*4)\n\
pea 8(%sp)\n\
move.l %d1, -(%sp)\n\
- move.l _rtld_local(%pc), -(%sp)\n\
+ " PCREL_OP ("move.l", "_rtld_local", "-(%sp)", "%d0", "%pc") "\n\
jbsr _dl_init_internal@PLTPC\n\
addq.l #8, %sp\n\
addq.l #8, %sp\n\
| Pass our finalizer function to the user in %a1.\n\
- lea _dl_fini(%pc), %a1\n\
+ " PCREL_OP ("lea", "_dl_fini", "%a1", "%a1", "%pc") "\n\
| Initialize %fp with the stack pointer.\n\
move.l %sp, %fp\n\
| Jump to the user's entry point.\n\
diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S
index 8791280..e324da1 100644
--- a/sysdeps/m68k/dl-trampoline.S
+++ b/sysdeps/m68k/dl-trampoline.S
@@ -34,7 +34,12 @@ _dl_runtime_resolve:
| Pop parameters
addq.l #8, %sp
| Call real function.
+#ifdef __mcoldfire__
+ move.l %d0,-(%sp)
+ rts
+#else
jmp (%d0)
+#endif
.size _dl_runtime_resolve, . - _dl_runtime_resolve
.text
@@ -64,7 +69,12 @@ _dl_runtime_profile:
move.l (%sp)+, %a1
lea 12(%sp), %sp
| Call real function.
+#ifdef __mcoldfire__
+ move.l %d0,-(%sp)
+ rts
+#else
jmp (%d0)
+#endif
/*
+24 return address
@@ -79,15 +89,24 @@ _dl_runtime_profile:
move.l %sp, %a2
move.l %sp, %a0
lea 28(%sp), %a1
- | Round framesize up to even
- addq.l #1, %d1
- lsr #1, %d1
- sub.l %d1, %a0
+ | Round framesize up to longword alignment
+ addq.l #3, %d1
+ and.l #-3, %d1
sub.l %d1, %a0
move.l %a0, %sp
+#ifdef __mcoldfire__
+ tst.l %d1
+ beq 2f
+1: move.l (%a0)+, (%a1)+
+ subq.l #4,%d1
+ bne 1b
+2:
+#else
+ lsr.l #2,%d1
jra 2f
-1: move.w (%a1)+, (%a0)+
+1: move.l (%a1)+, (%a0)+
2: dbra %d1,1b
+#endif
/*
%a2+24 return address
%a2+20 PLT1
@@ -101,7 +120,14 @@ _dl_runtime_profile:
move.l 4(%a2), %a0
move.l 8(%a2), %a1
+#ifdef __mcoldfire__
+ pea 2f(%pc)
+ move.l %d0,-(%sp)
+ rts
+2:
+#else
jsr (%d0)
+#endif
move.l %a2, %sp
move.l (%sp)+, %a2
/*
@@ -112,18 +138,34 @@ _dl_runtime_profile:
+4 %a1
%sp %a0
*/
+#ifdef __mcoldfire__
+ fmove.l %fp0, -(%sp)
+#else
fmove.x %fp0, -(%sp)
+#endif
+ move.l %a0, -(%sp)
move.l %d1, -(%sp)
move.l %d0, -(%sp)
pea (%sp)
- pea 20(%sp)
+#ifdef __mcoldfire__
+ pea 24(%sp)
move.l 40(%sp), -(%sp)
move.l 40(%sp), -(%sp)
+#else
+ pea 28(%sp)
+ move.l 44(%sp), -(%sp)
+ move.l 44(%sp), -(%sp)
+#endif
jbsr _dl_call_pltexit
lea 16(%sp), %sp
move.l (%sp)+, %d0
move.l (%sp)+, %d1
+ move.l (%sp)+, %a0
+#ifdef __mcoldfire__
+ fmove.d (%sp)+, %fp0
+#else
fmove.x (%sp)+, %fp0
+#endif
lea 20(%sp), %sp
rts
.size _dl_runtime_profile, . - _dl_runtime_profile
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index 6c94b07..6f23e8b 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -23,7 +23,13 @@
int
__fegetenv (fenv_t *envp)
{
+#ifdef __mcoldfire__
+ __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (envp->__control_register));
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (envp->__status_register));
+ __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (envp->__instruction_address));
+#else
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
+#endif
/* Success. */
return 0;
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index 88fb1c5..8f0d15f 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -26,7 +26,13 @@ feholdexcept (fenv_t *envp)
fexcept_t fpcr, fpsr;
/* Store the environment. */
+#ifdef __mcoldfire__
+ __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (envp->__control_register));
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (envp->__status_register));
+ __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (envp->__instruction_address));
+#else
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
+#endif
/* Now clear all exceptions. */
fpsr = envp->__status_register & ~FE_ALL_EXCEPT;
@@ -37,3 +43,4 @@ feholdexcept (fenv_t *envp)
return 0;
}
+libm_hidden_def (feholdexcept);
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index 20653f0..931b2e4 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -29,7 +29,13 @@ __fesetenv (const fenv_t *envp)
values which we do not want to come from the saved environment.
Therefore, we get the current environment and replace the values
we want to use from the environment specified by the parameter. */
+#ifdef __mcoldfire__
+ __asm__ ("fmove%.l %/fpcr,%0" : "=dm" (temp.__control_register));
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (temp.__status_register));
+ __asm__ ("fmove%.l %/fpiar,%0" : "=dm" (temp.__instruction_address));
+#else
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp));
+#endif
temp.__status_register &= ~FE_ALL_EXCEPT;
temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
@@ -44,7 +50,16 @@ __fesetenv (const fenv_t *envp)
temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT;
}
+#ifdef __mcoldfire__
+ __asm__ __volatile__ ("fmove%.l %0,%/fpiar"
+ :: "dm" (temp.__instruction_address));
+ __asm__ __volatile__ ("fmove%.l %0,%/fpcr"
+ :: "dm" (temp.__control_register));
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr"
+ :: "dm" (temp.__status_register));
+#else
__asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));
+#endif
/* Success. */
return 0;
diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c
index 956325d..f9c1da8 100644
--- a/sysdeps/m68k/fpu/fesetround.c
+++ b/sysdeps/m68k/fpu/fesetround.c
@@ -36,3 +36,4 @@ fesetround (int round)
return 0;
}
+libm_hidden_def (fesetround);
diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h
index 86358e6..cef5625 100644
--- a/sysdeps/m68k/fpu_control.h
+++ b/sysdeps/m68k/fpu_control.h
@@ -30,9 +30,9 @@
* 12 -> enable trap for OVFL exception
* 11 -> enable trap for UNFL exception
* 10 -> enable trap for DZ exception
- * 9 -> enable trap for INEX2 exception
- * 8 -> enable trap for INEX1 exception
- * 7-6 -> Precision Control
+ * 9 -> enable trap for INEX2 exception (INEX on Coldfire)
+ * 8 -> enable trap for INEX1 exception (IDE on Coldfire)
+ * 7-6 -> Precision Control (only bit 6 is used on Coldfire)
* 5-4 -> Rounding Control
* 3-0 -> zero (read as 0, write as 0)
*
@@ -65,8 +65,12 @@
#define _FPU_MASK_INEX2 0x0100
/* precision control */
+#ifdef __mcoldfire__
+#define _FPU_DOUBLE 0x00
+#else
#define _FPU_EXTENDED 0x00 /* RECOMMENDED */
#define _FPU_DOUBLE 0x80
+#endif
#define _FPU_SINGLE 0x40 /* DO NOT USE */
/* rounding control */
@@ -75,7 +79,11 @@
#define _FPU_RC_DOWN 0x20
#define _FPU_RC_UP 0x30
+#ifdef __mcoldfire__
+#define _FPU_RESERVED 0xFFFF800F
+#else
#define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */
+#endif
/* Now two recommended fpucr */
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/ldsodefs.h
similarity index 52%
copy from sysdeps/m68k/fpu/s_ilogb.c
copy to sysdeps/m68k/ldsodefs.h
index ee1e397..2eda4a8 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/ldsodefs.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,36 +17,27 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "mathimpl.h"
+#ifndef __LDSODEFS_H
-#ifndef SUFF
-#define SUFF
-#endif
-#ifndef float_type
-#define float_type double
-#endif
+#include <elf.h>
+
+struct La_m68k_regs;
+struct La_m68k_retval;
+
+#define ARCH_PLTENTER_MEMBERS \
+ Elf32_Addr (*m68k_gnu_pltenter) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_m68k_regs *, \
+ unsigned int *, const char *name, \
+ long int *framesizep);
-#define CONCATX(a,b) __CONCAT(a,b)
-#define s(name) CONCATX(name,SUFF)
-#define m81(func) __m81_u(s(func))
-
-int
-s(__ilogb) (float_type x)
-{
- float_type result;
- unsigned long x_cond;
-
- x_cond = __m81_test (x);
- /* We must return consistent values for zero and NaN. */
- if (x_cond & __M81_COND_ZERO)
- return FP_ILOGB0;
- if (x_cond & (__M81_COND_NAN | __M81_COND_INF))
- return FP_ILOGBNAN;
-
- __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x));
- return (int) result;
-}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (s(__ilogb), s(ilogb))
+#define ARCH_PLTEXIT_MEMBERS \
+ unsigned int (*m68k_gnu_pltexit) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_m68k_regs *, \
+ struct La_m68k_retval *, \
+ const char *);
+
+#include_next <ldsodefs.h>
+
+#endif
diff --git a/sysdeps/m68k/m680x0/Implies b/sysdeps/m68k/m680x0/Implies
new file mode 100644
index 0000000..abf356d
--- /dev/null
+++ b/sysdeps/m68k/m680x0/Implies
@@ -0,0 +1 @@
+ieee754/ldbl-96
diff --git a/sysdeps/m68k/m680x0/Makefile b/sysdeps/m68k/m680x0/Makefile
new file mode 100644
index 0000000..582fa6f
--- /dev/null
+++ b/sysdeps/m68k/m680x0/Makefile
@@ -0,0 +1,2 @@
+# The 68k `long double' is a distinct type we support.
+long-double-fcts = yes
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/m680x0/add_n.S
similarity index 100%
rename from sysdeps/m68k/add_n.S
rename to sysdeps/m68k/m680x0/add_n.S
diff --git a/sysdeps/m68k/bits/huge_vall.h b/sysdeps/m68k/m680x0/bits/huge_vall.h
similarity index 100%
rename from sysdeps/m68k/bits/huge_vall.h
rename to sysdeps/m68k/m680x0/bits/huge_vall.h
diff --git a/sysdeps/m68k/bits/mathdef.h b/sysdeps/m68k/m680x0/bits/mathdef.h
similarity index 100%
rename from sysdeps/m68k/bits/mathdef.h
rename to sysdeps/m68k/m680x0/bits/mathdef.h
diff --git a/sysdeps/m68k/fpu/Makefile b/sysdeps/m68k/m680x0/fpu/Makefile
similarity index 100%
rename from sysdeps/m68k/fpu/Makefile
rename to sysdeps/m68k/m680x0/fpu/Makefile
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h
similarity index 100%
rename from sysdeps/m68k/fpu/bits/mathinline.h
rename to sysdeps/m68k/m680x0/fpu/bits/mathinline.h
diff --git a/sysdeps/m68k/fpu/branred.c b/sysdeps/m68k/m680x0/fpu/branred.c
similarity index 100%
rename from sysdeps/m68k/fpu/branred.c
rename to sysdeps/m68k/m680x0/fpu/branred.c
diff --git a/sysdeps/m68k/fpu/doasin.c b/sysdeps/m68k/m680x0/fpu/doasin.c
similarity index 100%
rename from sysdeps/m68k/fpu/doasin.c
rename to sysdeps/m68k/m680x0/fpu/doasin.c
diff --git a/sysdeps/m68k/fpu/dosincos.c b/sysdeps/m68k/m680x0/fpu/dosincos.c
similarity index 100%
rename from sysdeps/m68k/fpu/dosincos.c
rename to sysdeps/m68k/m680x0/fpu/dosincos.c
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/m680x0/fpu/e_acos.c
similarity index 100%
copy from sysdeps/m68k/fpu/e_acos.c
copy to sysdeps/m68k/m680x0/fpu/e_acos.c
diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/m680x0/fpu/e_acosf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_acosf.c
rename to sysdeps/m68k/m680x0/fpu/e_acosf.c
diff --git a/sysdeps/m68k/fpu/e_acosl.c b/sysdeps/m68k/m680x0/fpu/e_acosl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_acosl.c
rename to sysdeps/m68k/m680x0/fpu/e_acosl.c
diff --git a/sysdeps/m68k/fpu/e_asin.c b/sysdeps/m68k/m680x0/fpu/e_asin.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_asin.c
rename to sysdeps/m68k/m680x0/fpu/e_asin.c
diff --git a/sysdeps/m68k/fpu/e_asinf.c b/sysdeps/m68k/m680x0/fpu/e_asinf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_asinf.c
rename to sysdeps/m68k/m680x0/fpu/e_asinf.c
diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/m680x0/fpu/e_asinl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_asinl.c
rename to sysdeps/m68k/m680x0/fpu/e_asinl.c
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/m680x0/fpu/e_atan2.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atan2.c
rename to sysdeps/m68k/m680x0/fpu/e_atan2.c
diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/m680x0/fpu/e_atan2f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atan2f.c
rename to sysdeps/m68k/m680x0/fpu/e_atan2f.c
diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/m680x0/fpu/e_atan2l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atan2l.c
rename to sysdeps/m68k/m680x0/fpu/e_atan2l.c
diff --git a/sysdeps/m68k/fpu/e_atanh.c b/sysdeps/m68k/m680x0/fpu/e_atanh.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atanh.c
rename to sysdeps/m68k/m680x0/fpu/e_atanh.c
diff --git a/sysdeps/m68k/fpu/e_atanhf.c b/sysdeps/m68k/m680x0/fpu/e_atanhf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atanhf.c
rename to sysdeps/m68k/m680x0/fpu/e_atanhf.c
diff --git a/sysdeps/m68k/fpu/e_atanhl.c b/sysdeps/m68k/m680x0/fpu/e_atanhl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_atanhl.c
rename to sysdeps/m68k/m680x0/fpu/e_atanhl.c
diff --git a/sysdeps/m68k/fpu/e_cosh.c b/sysdeps/m68k/m680x0/fpu/e_cosh.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_cosh.c
rename to sysdeps/m68k/m680x0/fpu/e_cosh.c
diff --git a/sysdeps/m68k/fpu/e_coshf.c b/sysdeps/m68k/m680x0/fpu/e_coshf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_coshf.c
rename to sysdeps/m68k/m680x0/fpu/e_coshf.c
diff --git a/sysdeps/m68k/fpu/e_coshl.c b/sysdeps/m68k/m680x0/fpu/e_coshl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_coshl.c
rename to sysdeps/m68k/m680x0/fpu/e_coshl.c
diff --git a/sysdeps/m68k/fpu/e_exp.c b/sysdeps/m68k/m680x0/fpu/e_exp.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp.c
rename to sysdeps/m68k/m680x0/fpu/e_exp.c
diff --git a/sysdeps/m68k/fpu/e_exp10.c b/sysdeps/m68k/m680x0/fpu/e_exp10.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp10.c
rename to sysdeps/m68k/m680x0/fpu/e_exp10.c
diff --git a/sysdeps/m68k/fpu/e_exp10f.c b/sysdeps/m68k/m680x0/fpu/e_exp10f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp10f.c
rename to sysdeps/m68k/m680x0/fpu/e_exp10f.c
diff --git a/sysdeps/m68k/fpu/e_exp10l.c b/sysdeps/m68k/m680x0/fpu/e_exp10l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp10l.c
rename to sysdeps/m68k/m680x0/fpu/e_exp10l.c
diff --git a/sysdeps/m68k/fpu/e_exp2.c b/sysdeps/m68k/m680x0/fpu/e_exp2.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp2.c
rename to sysdeps/m68k/m680x0/fpu/e_exp2.c
diff --git a/sysdeps/m68k/fpu/e_exp2f.c b/sysdeps/m68k/m680x0/fpu/e_exp2f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp2f.c
rename to sysdeps/m68k/m680x0/fpu/e_exp2f.c
diff --git a/sysdeps/m68k/fpu/e_exp2l.c b/sysdeps/m68k/m680x0/fpu/e_exp2l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_exp2l.c
rename to sysdeps/m68k/m680x0/fpu/e_exp2l.c
diff --git a/sysdeps/m68k/fpu/e_expf.c b/sysdeps/m68k/m680x0/fpu/e_expf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_expf.c
rename to sysdeps/m68k/m680x0/fpu/e_expf.c
diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/m680x0/fpu/e_expl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_expl.c
rename to sysdeps/m68k/m680x0/fpu/e_expl.c
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/m680x0/fpu/e_fmod.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_fmod.c
rename to sysdeps/m68k/m680x0/fpu/e_fmod.c
diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/m680x0/fpu/e_fmodf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_fmodf.c
rename to sysdeps/m68k/m680x0/fpu/e_fmodf.c
diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/m680x0/fpu/e_fmodl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_fmodl.c
rename to sysdeps/m68k/m680x0/fpu/e_fmodl.c
diff --git a/sysdeps/m68k/fpu/e_log.c b/sysdeps/m68k/m680x0/fpu/e_log.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log.c
rename to sysdeps/m68k/m680x0/fpu/e_log.c
diff --git a/sysdeps/m68k/fpu/e_log10.c b/sysdeps/m68k/m680x0/fpu/e_log10.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log10.c
rename to sysdeps/m68k/m680x0/fpu/e_log10.c
diff --git a/sysdeps/m68k/fpu/e_log10f.c b/sysdeps/m68k/m680x0/fpu/e_log10f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log10f.c
rename to sysdeps/m68k/m680x0/fpu/e_log10f.c
diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/m680x0/fpu/e_log10l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log10l.c
rename to sysdeps/m68k/m680x0/fpu/e_log10l.c
diff --git a/sysdeps/m68k/fpu/e_log2.c b/sysdeps/m68k/m680x0/fpu/e_log2.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log2.c
rename to sysdeps/m68k/m680x0/fpu/e_log2.c
diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/m680x0/fpu/e_log2f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log2f.c
rename to sysdeps/m68k/m680x0/fpu/e_log2f.c
diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/m680x0/fpu/e_log2l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_log2l.c
rename to sysdeps/m68k/m680x0/fpu/e_log2l.c
diff --git a/sysdeps/m68k/fpu/e_logf.c b/sysdeps/m68k/m680x0/fpu/e_logf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_logf.c
rename to sysdeps/m68k/m680x0/fpu/e_logf.c
diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/m680x0/fpu/e_logl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_logl.c
rename to sysdeps/m68k/m680x0/fpu/e_logl.c
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/m680x0/fpu/e_pow.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_pow.c
rename to sysdeps/m68k/m680x0/fpu/e_pow.c
diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/m680x0/fpu/e_powf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_powf.c
rename to sysdeps/m68k/m680x0/fpu/e_powf.c
diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/m680x0/fpu/e_powl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_powl.c
rename to sysdeps/m68k/m680x0/fpu/e_powl.c
diff --git a/sysdeps/m68k/fpu/e_rem_pio2.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_rem_pio2.c
rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2.c
diff --git a/sysdeps/m68k/fpu/e_rem_pio2f.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_rem_pio2f.c
rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2f.c
diff --git a/sysdeps/m68k/fpu/e_rem_pio2l.c b/sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_rem_pio2l.c
rename to sysdeps/m68k/m680x0/fpu/e_rem_pio2l.c
diff --git a/sysdeps/m68k/fpu/e_remainder.c b/sysdeps/m68k/m680x0/fpu/e_remainder.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_remainder.c
rename to sysdeps/m68k/m680x0/fpu/e_remainder.c
diff --git a/sysdeps/m68k/fpu/e_remainderf.c b/sysdeps/m68k/m680x0/fpu/e_remainderf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_remainderf.c
rename to sysdeps/m68k/m680x0/fpu/e_remainderf.c
diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/m680x0/fpu/e_remainderl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_remainderl.c
rename to sysdeps/m68k/m680x0/fpu/e_remainderl.c
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/m680x0/fpu/e_scalb.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_scalb.c
rename to sysdeps/m68k/m680x0/fpu/e_scalb.c
diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/m680x0/fpu/e_scalbf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_scalbf.c
rename to sysdeps/m68k/m680x0/fpu/e_scalbf.c
diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/m680x0/fpu/e_scalbl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_scalbl.c
rename to sysdeps/m68k/m680x0/fpu/e_scalbl.c
diff --git a/sysdeps/m68k/fpu/e_sinh.c b/sysdeps/m68k/m680x0/fpu/e_sinh.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sinh.c
rename to sysdeps/m68k/m680x0/fpu/e_sinh.c
diff --git a/sysdeps/m68k/fpu/e_sinhf.c b/sysdeps/m68k/m680x0/fpu/e_sinhf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sinhf.c
rename to sysdeps/m68k/m680x0/fpu/e_sinhf.c
diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/m680x0/fpu/e_sinhl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sinhl.c
rename to sysdeps/m68k/m680x0/fpu/e_sinhl.c
diff --git a/sysdeps/m68k/fpu/e_sqrt.c b/sysdeps/m68k/m680x0/fpu/e_sqrt.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sqrt.c
rename to sysdeps/m68k/m680x0/fpu/e_sqrt.c
diff --git a/sysdeps/m68k/fpu/e_sqrtf.c b/sysdeps/m68k/m680x0/fpu/e_sqrtf.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sqrtf.c
rename to sysdeps/m68k/m680x0/fpu/e_sqrtf.c
diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/m680x0/fpu/e_sqrtl.c
similarity index 100%
rename from sysdeps/m68k/fpu/e_sqrtl.c
rename to sysdeps/m68k/m680x0/fpu/e_sqrtl.c
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/m680x0/fpu/fraiseexcpt.c
similarity index 100%
rename from sysdeps/m68k/fpu/fraiseexcpt.c
rename to sysdeps/m68k/m680x0/fpu/fraiseexcpt.c
diff --git a/sysdeps/m68k/fpu/halfulp.c b/sysdeps/m68k/m680x0/fpu/halfulp.c
similarity index 100%
rename from sysdeps/m68k/fpu/halfulp.c
rename to sysdeps/m68k/m680x0/fpu/halfulp.c
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/m680x0/fpu/k_cos.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_cos.c
rename to sysdeps/m68k/m680x0/fpu/k_cos.c
diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/m680x0/fpu/k_cosf.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_cosf.c
rename to sysdeps/m68k/m680x0/fpu/k_cosf.c
diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/m680x0/fpu/k_cosl.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_cosl.c
rename to sysdeps/m68k/m680x0/fpu/k_cosl.c
diff --git a/sysdeps/m68k/fpu/k_rem_pio2.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_rem_pio2.c
rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2.c
diff --git a/sysdeps/m68k/fpu/k_rem_pio2f.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_rem_pio2f.c
rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2f.c
diff --git a/sysdeps/m68k/fpu/k_rem_pio2l.c b/sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_rem_pio2l.c
rename to sysdeps/m68k/m680x0/fpu/k_rem_pio2l.c
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/m680x0/fpu/k_sin.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_sin.c
rename to sysdeps/m68k/m680x0/fpu/k_sin.c
diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/m680x0/fpu/k_sinf.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_sinf.c
rename to sysdeps/m68k/m680x0/fpu/k_sinf.c
diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/m680x0/fpu/k_sinl.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_sinl.c
rename to sysdeps/m68k/m680x0/fpu/k_sinl.c
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/m680x0/fpu/k_tan.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_tan.c
rename to sysdeps/m68k/m680x0/fpu/k_tan.c
diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/m680x0/fpu/k_tanf.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_tanf.c
rename to sysdeps/m68k/m680x0/fpu/k_tanf.c
diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/m680x0/fpu/k_tanl.c
similarity index 100%
rename from sysdeps/m68k/fpu/k_tanl.c
rename to sysdeps/m68k/m680x0/fpu/k_tanl.c
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps
similarity index 100%
rename from sysdeps/m68k/fpu/libm-test-ulps
rename to sysdeps/m68k/m680x0/fpu/libm-test-ulps
diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/m680x0/fpu/mathimpl.h
similarity index 100%
rename from sysdeps/m68k/fpu/mathimpl.h
rename to sysdeps/m68k/m680x0/fpu/mathimpl.h
diff --git a/sysdeps/m68k/fpu/mpa.c b/sysdeps/m68k/m680x0/fpu/mpa.c
similarity index 100%
rename from sysdeps/m68k/fpu/mpa.c
rename to sysdeps/m68k/m680x0/fpu/mpa.c
diff --git a/sysdeps/m68k/fpu/mpatan.c b/sysdeps/m68k/m680x0/fpu/mpatan.c
similarity index 100%
rename from sysdeps/m68k/fpu/mpatan.c
rename to sysdeps/m68k/m680x0/fpu/mpatan.c
diff --git a/sysdeps/m68k/fpu/mpatan2.c b/sysdeps/m68k/m680x0/fpu/mpatan2.c
similarity index 100%
rename from sysdeps/m68k/fpu/mpatan2.c
rename to sysdeps/m68k/m680x0/fpu/mpatan2.c
diff --git a/sysdeps/m68k/fpu/mpexp.c b/sysdeps/m68k/m680x0/fpu/mpexp.c
similarity index 100%
rename from sysdeps/m68k/fpu/mpexp.c
rename to sysdeps/m68k/m680x0/fpu/mpexp.c
diff --git a/sysdeps/m68k/fpu/mplog.c b/sysdeps/m68k/m680x0/fpu/mplog.c
similarity index 100%
rename from sysdeps/m68k/fpu/mplog.c
rename to sysdeps/m68k/m680x0/fpu/mplog.c
diff --git a/sysdeps/m68k/fpu/mpsqrt.c b/sysdeps/m68k/m680x0/fpu/mpsqrt.c
similarity index 100%
rename from sysdeps/m68k/fpu/mpsqrt.c
rename to sysdeps/m68k/m680x0/fpu/mpsqrt.c
diff --git a/sysdeps/m68k/fpu/mptan.c b/sysdeps/m68k/m680x0/fpu/mptan.c
similarity index 100%
rename from sysdeps/m68k/fpu/mptan.c
rename to sysdeps/m68k/m680x0/fpu/mptan.c
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/m680x0/fpu/s_atan.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_atan.c
rename to sysdeps/m68k/m680x0/fpu/s_atan.c
diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/m680x0/fpu/s_atanf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_atanf.c
rename to sysdeps/m68k/m680x0/fpu/s_atanf.c
diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/m680x0/fpu/s_atanl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_atanl.c
rename to sysdeps/m68k/m680x0/fpu/s_atanl.c
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/m680x0/fpu/s_ccos.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccos.c
rename to sysdeps/m68k/m680x0/fpu/s_ccos.c
diff --git a/sysdeps/m68k/fpu/s_ccosf.c b/sysdeps/m68k/m680x0/fpu/s_ccosf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccosf.c
rename to sysdeps/m68k/m680x0/fpu/s_ccosf.c
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/m680x0/fpu/s_ccosh.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccosh.c
rename to sysdeps/m68k/m680x0/fpu/s_ccosh.c
diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/m680x0/fpu/s_ccoshf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccoshf.c
rename to sysdeps/m68k/m680x0/fpu/s_ccoshf.c
diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/m680x0/fpu/s_ccoshl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccoshl.c
rename to sysdeps/m68k/m680x0/fpu/s_ccoshl.c
diff --git a/sysdeps/m68k/fpu/s_ccosl.c b/sysdeps/m68k/m680x0/fpu/s_ccosl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ccosl.c
rename to sysdeps/m68k/m680x0/fpu/s_ccosl.c
diff --git a/sysdeps/m68k/fpu/s_ceil.c b/sysdeps/m68k/m680x0/fpu/s_ceil.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ceil.c
rename to sysdeps/m68k/m680x0/fpu/s_ceil.c
diff --git a/sysdeps/m68k/fpu/s_ceilf.c b/sysdeps/m68k/m680x0/fpu/s_ceilf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ceilf.c
rename to sysdeps/m68k/m680x0/fpu/s_ceilf.c
diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/m680x0/fpu/s_ceill.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ceill.c
rename to sysdeps/m68k/m680x0/fpu/s_ceill.c
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/m680x0/fpu/s_cexp.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cexp.c
rename to sysdeps/m68k/m680x0/fpu/s_cexp.c
diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/m680x0/fpu/s_cexpf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cexpf.c
rename to sysdeps/m68k/m680x0/fpu/s_cexpf.c
diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/m680x0/fpu/s_cexpl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cexpl.c
rename to sysdeps/m68k/m680x0/fpu/s_cexpl.c
diff --git a/sysdeps/m68k/fpu/s_cos.c b/sysdeps/m68k/m680x0/fpu/s_cos.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cos.c
rename to sysdeps/m68k/m680x0/fpu/s_cos.c
diff --git a/sysdeps/m68k/fpu/s_cosf.c b/sysdeps/m68k/m680x0/fpu/s_cosf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cosf.c
rename to sysdeps/m68k/m680x0/fpu/s_cosf.c
diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/m680x0/fpu/s_cosl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_cosl.c
rename to sysdeps/m68k/m680x0/fpu/s_cosl.c
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/m680x0/fpu/s_csin.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csin.c
rename to sysdeps/m68k/m680x0/fpu/s_csin.c
diff --git a/sysdeps/m68k/fpu/s_csinf.c b/sysdeps/m68k/m680x0/fpu/s_csinf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csinf.c
rename to sysdeps/m68k/m680x0/fpu/s_csinf.c
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/m680x0/fpu/s_csinh.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csinh.c
rename to sysdeps/m68k/m680x0/fpu/s_csinh.c
diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/m680x0/fpu/s_csinhf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csinhf.c
rename to sysdeps/m68k/m680x0/fpu/s_csinhf.c
diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/m680x0/fpu/s_csinhl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csinhl.c
rename to sysdeps/m68k/m680x0/fpu/s_csinhl.c
diff --git a/sysdeps/m68k/fpu/s_csinl.c b/sysdeps/m68k/m680x0/fpu/s_csinl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_csinl.c
rename to sysdeps/m68k/m680x0/fpu/s_csinl.c
diff --git a/sysdeps/m68k/fpu/s_expm1.c b/sysdeps/m68k/m680x0/fpu/s_expm1.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_expm1.c
rename to sysdeps/m68k/m680x0/fpu/s_expm1.c
diff --git a/sysdeps/m68k/fpu/s_expm1f.c b/sysdeps/m68k/m680x0/fpu/s_expm1f.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_expm1f.c
rename to sysdeps/m68k/m680x0/fpu/s_expm1f.c
diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/m680x0/fpu/s_expm1l.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_expm1l.c
rename to sysdeps/m68k/m680x0/fpu/s_expm1l.c
diff --git a/sysdeps/m68k/fpu/s_fabs.c b/sysdeps/m68k/m680x0/fpu/s_fabs.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_fabs.c
rename to sysdeps/m68k/m680x0/fpu/s_fabs.c
diff --git a/sysdeps/m68k/fpu/s_fabsf.c b/sysdeps/m68k/m680x0/fpu/s_fabsf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_fabsf.c
rename to sysdeps/m68k/m680x0/fpu/s_fabsf.c
diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/m680x0/fpu/s_fabsl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_fabsl.c
rename to sysdeps/m68k/m680x0/fpu/s_fabsl.c
diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/m680x0/fpu/s_finite.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_finite.c
rename to sysdeps/m68k/m680x0/fpu/s_finite.c
diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/m680x0/fpu/s_finitef.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_finitef.c
rename to sysdeps/m68k/m680x0/fpu/s_finitef.c
diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/m680x0/fpu/s_finitel.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_finitel.c
rename to sysdeps/m68k/m680x0/fpu/s_finitel.c
diff --git a/sysdeps/m68k/fpu/s_floor.c b/sysdeps/m68k/m680x0/fpu/s_floor.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_floor.c
rename to sysdeps/m68k/m680x0/fpu/s_floor.c
diff --git a/sysdeps/m68k/fpu/s_floorf.c b/sysdeps/m68k/m680x0/fpu/s_floorf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_floorf.c
rename to sysdeps/m68k/m680x0/fpu/s_floorf.c
diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/m680x0/fpu/s_floorl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_floorl.c
rename to sysdeps/m68k/m680x0/fpu/s_floorl.c
diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_fpclassifyl.c
rename to sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/m680x0/fpu/s_frexp.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_frexp.c
rename to sysdeps/m68k/m680x0/fpu/s_frexp.c
diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/m680x0/fpu/s_frexpf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_frexpf.c
rename to sysdeps/m68k/m680x0/fpu/s_frexpf.c
diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/m680x0/fpu/s_frexpl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_frexpl.c
rename to sysdeps/m68k/m680x0/fpu/s_frexpl.c
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/m680x0/fpu/s_ilogb.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ilogb.c
rename to sysdeps/m68k/m680x0/fpu/s_ilogb.c
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/m680x0/fpu/s_ilogbf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ilogbf.c
rename to sysdeps/m68k/m680x0/fpu/s_ilogbf.c
diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/m680x0/fpu/s_ilogbl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_ilogbl.c
rename to sysdeps/m68k/m680x0/fpu/s_ilogbl.c
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/m680x0/fpu/s_isinf.c
similarity index 100%
copy from sysdeps/m68k/fpu/s_isinf.c
copy to sysdeps/m68k/m680x0/fpu/s_isinf.c
diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/m680x0/fpu/s_isinff.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_isinff.c
rename to sysdeps/m68k/m680x0/fpu/s_isinff.c
diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/m680x0/fpu/s_isinfl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_isinfl.c
rename to sysdeps/m68k/m680x0/fpu/s_isinfl.c
diff --git a/sysdeps/m68k/fpu/s_isnan.c b/sysdeps/m68k/m680x0/fpu/s_isnan.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_isnan.c
rename to sysdeps/m68k/m680x0/fpu/s_isnan.c
diff --git a/sysdeps/m68k/fpu/s_isnanf.c b/sysdeps/m68k/m680x0/fpu/s_isnanf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_isnanf.c
rename to sysdeps/m68k/m680x0/fpu/s_isnanf.c
diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/m680x0/fpu/s_isnanl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_isnanl.c
rename to sysdeps/m68k/m680x0/fpu/s_isnanl.c
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/m680x0/fpu/s_llrint.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_llrint.c
rename to sysdeps/m68k/m680x0/fpu/s_llrint.c
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/m680x0/fpu/s_llrintf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_llrintf.c
rename to sysdeps/m68k/m680x0/fpu/s_llrintf.c
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/m680x0/fpu/s_llrintl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_llrintl.c
rename to sysdeps/m68k/m680x0/fpu/s_llrintl.c
diff --git a/sysdeps/m68k/fpu/s_log1p.c b/sysdeps/m68k/m680x0/fpu/s_log1p.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_log1p.c
rename to sysdeps/m68k/m680x0/fpu/s_log1p.c
diff --git a/sysdeps/m68k/fpu/s_log1pf.c b/sysdeps/m68k/m680x0/fpu/s_log1pf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_log1pf.c
rename to sysdeps/m68k/m680x0/fpu/s_log1pf.c
diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/m680x0/fpu/s_log1pl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_log1pl.c
rename to sysdeps/m68k/m680x0/fpu/s_log1pl.c
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/m680x0/fpu/s_lrint.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_lrint.c
rename to sysdeps/m68k/m680x0/fpu/s_lrint.c
diff --git a/sysdeps/m68k/fpu/s_lrintf.c b/sysdeps/m68k/m680x0/fpu/s_lrintf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_lrintf.c
rename to sysdeps/m68k/m680x0/fpu/s_lrintf.c
diff --git a/sysdeps/m68k/fpu/s_lrintl.c b/sysdeps/m68k/m680x0/fpu/s_lrintl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_lrintl.c
rename to sysdeps/m68k/m680x0/fpu/s_lrintl.c
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/m680x0/fpu/s_modf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_modf.c
rename to sysdeps/m68k/m680x0/fpu/s_modf.c
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/m680x0/fpu/s_modff.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_modff.c
rename to sysdeps/m68k/m680x0/fpu/s_modff.c
diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/m680x0/fpu/s_modfl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_modfl.c
rename to sysdeps/m68k/m680x0/fpu/s_modfl.c
diff --git a/sysdeps/m68k/fpu/s_nearbyint.c b/sysdeps/m68k/m680x0/fpu/s_nearbyint.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_nearbyint.c
rename to sysdeps/m68k/m680x0/fpu/s_nearbyint.c
diff --git a/sysdeps/m68k/fpu/s_nearbyintf.c b/sysdeps/m68k/m680x0/fpu/s_nearbyintf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_nearbyintf.c
rename to sysdeps/m68k/m680x0/fpu/s_nearbyintf.c
diff --git a/sysdeps/m68k/fpu/s_nearbyintl.c b/sysdeps/m68k/m680x0/fpu/s_nearbyintl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_nearbyintl.c
rename to sysdeps/m68k/m680x0/fpu/s_nearbyintl.c
diff --git a/sysdeps/m68k/fpu/s_nextafterl.c b/sysdeps/m68k/m680x0/fpu/s_nextafterl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_nextafterl.c
rename to sysdeps/m68k/m680x0/fpu/s_nextafterl.c
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/m680x0/fpu/s_remquo.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_remquo.c
rename to sysdeps/m68k/m680x0/fpu/s_remquo.c
diff --git a/sysdeps/m68k/fpu/s_remquof.c b/sysdeps/m68k/m680x0/fpu/s_remquof.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_remquof.c
rename to sysdeps/m68k/m680x0/fpu/s_remquof.c
diff --git a/sysdeps/m68k/fpu/s_remquol.c b/sysdeps/m68k/m680x0/fpu/s_remquol.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_remquol.c
rename to sysdeps/m68k/m680x0/fpu/s_remquol.c
diff --git a/sysdeps/m68k/fpu/s_rint.c b/sysdeps/m68k/m680x0/fpu/s_rint.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_rint.c
rename to sysdeps/m68k/m680x0/fpu/s_rint.c
diff --git a/sysdeps/m68k/fpu/s_rintf.c b/sysdeps/m68k/m680x0/fpu/s_rintf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_rintf.c
rename to sysdeps/m68k/m680x0/fpu/s_rintf.c
diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/m680x0/fpu/s_rintl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_rintl.c
rename to sysdeps/m68k/m680x0/fpu/s_rintl.c
diff --git a/sysdeps/m68k/fpu/s_scalbln.c b/sysdeps/m68k/m680x0/fpu/s_scalbln.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalbln.c
rename to sysdeps/m68k/m680x0/fpu/s_scalbln.c
diff --git a/sysdeps/m68k/fpu/s_scalblnf.c b/sysdeps/m68k/m680x0/fpu/s_scalblnf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalblnf.c
rename to sysdeps/m68k/m680x0/fpu/s_scalblnf.c
diff --git a/sysdeps/m68k/fpu/s_scalblnl.c b/sysdeps/m68k/m680x0/fpu/s_scalblnl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalblnl.c
rename to sysdeps/m68k/m680x0/fpu/s_scalblnl.c
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/m680x0/fpu/s_scalbn.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalbn.c
rename to sysdeps/m68k/m680x0/fpu/s_scalbn.c
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/m680x0/fpu/s_scalbnf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalbnf.c
rename to sysdeps/m68k/m680x0/fpu/s_scalbnf.c
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/m680x0/fpu/s_scalbnl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_scalbnl.c
rename to sysdeps/m68k/m680x0/fpu/s_scalbnl.c
diff --git a/sysdeps/m68k/fpu/s_significand.c b/sysdeps/m68k/m680x0/fpu/s_significand.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_significand.c
rename to sysdeps/m68k/m680x0/fpu/s_significand.c
diff --git a/sysdeps/m68k/fpu/s_significandf.c b/sysdeps/m68k/m680x0/fpu/s_significandf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_significandf.c
rename to sysdeps/m68k/m680x0/fpu/s_significandf.c
diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/m680x0/fpu/s_significandl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_significandl.c
rename to sysdeps/m68k/m680x0/fpu/s_significandl.c
diff --git a/sysdeps/m68k/fpu/s_sin.c b/sysdeps/m68k/m680x0/fpu/s_sin.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sin.c
rename to sysdeps/m68k/m680x0/fpu/s_sin.c
diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/m680x0/fpu/s_sincos.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sincos.c
rename to sysdeps/m68k/m680x0/fpu/s_sincos.c
diff --git a/sysdeps/m68k/fpu/s_sincosf.c b/sysdeps/m68k/m680x0/fpu/s_sincosf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sincosf.c
rename to sysdeps/m68k/m680x0/fpu/s_sincosf.c
diff --git a/sysdeps/m68k/fpu/s_sincosl.c b/sysdeps/m68k/m680x0/fpu/s_sincosl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sincosl.c
rename to sysdeps/m68k/m680x0/fpu/s_sincosl.c
diff --git a/sysdeps/m68k/fpu/s_sinf.c b/sysdeps/m68k/m680x0/fpu/s_sinf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sinf.c
rename to sysdeps/m68k/m680x0/fpu/s_sinf.c
diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/m680x0/fpu/s_sinl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_sinl.c
rename to sysdeps/m68k/m680x0/fpu/s_sinl.c
diff --git a/sysdeps/m68k/fpu/s_tan.c b/sysdeps/m68k/m680x0/fpu/s_tan.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tan.c
rename to sysdeps/m68k/m680x0/fpu/s_tan.c
diff --git a/sysdeps/m68k/fpu/s_tanf.c b/sysdeps/m68k/m680x0/fpu/s_tanf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tanf.c
rename to sysdeps/m68k/m680x0/fpu/s_tanf.c
diff --git a/sysdeps/m68k/fpu/s_tanh.c b/sysdeps/m68k/m680x0/fpu/s_tanh.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tanh.c
rename to sysdeps/m68k/m680x0/fpu/s_tanh.c
diff --git a/sysdeps/m68k/fpu/s_tanhf.c b/sysdeps/m68k/m680x0/fpu/s_tanhf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tanhf.c
rename to sysdeps/m68k/m680x0/fpu/s_tanhf.c
diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/m680x0/fpu/s_tanhl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tanhl.c
rename to sysdeps/m68k/m680x0/fpu/s_tanhl.c
diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/m680x0/fpu/s_tanl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_tanl.c
rename to sysdeps/m68k/m680x0/fpu/s_tanl.c
diff --git a/sysdeps/m68k/fpu/s_trunc.c b/sysdeps/m68k/m680x0/fpu/s_trunc.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_trunc.c
rename to sysdeps/m68k/m680x0/fpu/s_trunc.c
diff --git a/sysdeps/m68k/fpu/s_truncf.c b/sysdeps/m68k/m680x0/fpu/s_truncf.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_truncf.c
rename to sysdeps/m68k/m680x0/fpu/s_truncf.c
diff --git a/sysdeps/m68k/fpu/s_truncl.c b/sysdeps/m68k/m680x0/fpu/s_truncl.c
similarity index 100%
rename from sysdeps/m68k/fpu/s_truncl.c
rename to sysdeps/m68k/m680x0/fpu/s_truncl.c
diff --git a/sysdeps/m68k/fpu/sincos32.c b/sysdeps/m68k/m680x0/fpu/sincos32.c
similarity index 100%
rename from sysdeps/m68k/fpu/sincos32.c
rename to sysdeps/m68k/m680x0/fpu/sincos32.c
diff --git a/sysdeps/m68k/fpu/slowexp.c b/sysdeps/m68k/m680x0/fpu/slowexp.c
similarity index 100%
rename from sysdeps/m68k/fpu/slowexp.c
rename to sysdeps/m68k/m680x0/fpu/slowexp.c
diff --git a/sysdeps/m68k/fpu/slowpow.c b/sysdeps/m68k/m680x0/fpu/slowpow.c
similarity index 100%
rename from sysdeps/m68k/fpu/slowpow.c
rename to sysdeps/m68k/m680x0/fpu/slowpow.c
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/m680x0/fpu/switch/68881-sw.h
similarity index 100%
rename from sysdeps/m68k/fpu/switch/68881-sw.h
rename to sysdeps/m68k/m680x0/fpu/switch/68881-sw.h
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/m680x0/fpu/switch/Makefile
similarity index 100%
rename from sysdeps/m68k/fpu/switch/Makefile
rename to sysdeps/m68k/m680x0/fpu/switch/Makefile
diff --git a/sysdeps/m68k/fpu/switch/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h
similarity index 100%
rename from sysdeps/m68k/fpu/switch/bits/mathinline.h
rename to sysdeps/m68k/m680x0/fpu/switch/bits/mathinline.h
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/m680x0/fpu/switch/switch.c
similarity index 100%
rename from sysdeps/m68k/fpu/switch/switch.c
rename to sysdeps/m68k/m680x0/fpu/switch/switch.c
diff --git a/sysdeps/m68k/fpu/t_exp.c b/sysdeps/m68k/m680x0/fpu/t_exp.c
similarity index 100%
rename from sysdeps/m68k/fpu/t_exp.c
rename to sysdeps/m68k/m680x0/fpu/t_exp.c
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/m680x0/lshift.S
similarity index 100%
rename from sysdeps/m68k/lshift.S
rename to sysdeps/m68k/m680x0/lshift.S
diff --git a/sysdeps/m68k/m68020/Makefile b/sysdeps/m68k/m680x0/m68020/Makefile
similarity index 100%
rename from sysdeps/m68k/m68020/Makefile
rename to sysdeps/m68k/m680x0/m68020/Makefile
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m680x0/m68020/addmul_1.S
similarity index 100%
rename from sysdeps/m68k/m68020/addmul_1.S
rename to sysdeps/m68k/m680x0/m68020/addmul_1.S
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m680x0/m68020/bits/atomic.h
similarity index 100%
rename from sysdeps/m68k/m68020/bits/atomic.h
rename to sysdeps/m68k/m680x0/m68020/bits/atomic.h
diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m680x0/m68020/bits/string.h
similarity index 100%
rename from sysdeps/m68k/m68020/bits/string.h
rename to sysdeps/m68k/m680x0/m68020/bits/string.h
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m680x0/m68020/mul_1.S
similarity index 100%
rename from sysdeps/m68k/m68020/mul_1.S
rename to sysdeps/m68k/m680x0/m68020/mul_1.S
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m680x0/m68020/submul_1.S
similarity index 100%
rename from sysdeps/m68k/m68020/submul_1.S
rename to sysdeps/m68k/m680x0/m68020/submul_1.S
diff --git a/sysdeps/m68k/m68020/wordcopy.S b/sysdeps/m68k/m680x0/m68020/wordcopy.S
similarity index 100%
rename from sysdeps/m68k/m68020/wordcopy.S
rename to sysdeps/m68k/m680x0/m68020/wordcopy.S
diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/m680x0/printf_fphex.c
similarity index 100%
rename from sysdeps/m68k/printf_fphex.c
rename to sysdeps/m68k/m680x0/printf_fphex.c
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/m680x0/rshift.S
similarity index 100%
rename from sysdeps/m68k/rshift.S
rename to sysdeps/m68k/m680x0/rshift.S
diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/m680x0/s_isinfl.c
similarity index 100%
rename from sysdeps/m68k/s_isinfl.c
rename to sysdeps/m68k/m680x0/s_isinfl.c
diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/m680x0/s_isnanl.c
similarity index 100%
rename from sysdeps/m68k/s_isnanl.c
rename to sysdeps/m68k/m680x0/s_isnanl.c
diff --git a/sysdeps/m68k/strtold_l.c b/sysdeps/m68k/m680x0/strtold_l.c
similarity index 100%
rename from sysdeps/m68k/strtold_l.c
rename to sysdeps/m68k/m680x0/strtold_l.c
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/m680x0/sub_n.S
similarity index 100%
rename from sysdeps/m68k/sub_n.S
rename to sysdeps/m68k/m680x0/sub_n.S
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
index fab65a9..77e86a3 100644
--- a/sysdeps/m68k/memchr.S
+++ b/sysdeps/m68k/memchr.S
@@ -26,7 +26,13 @@
TEXT
ENTRY(__memchr)
/* Save the callee-saved registers we use. */
+#ifdef __mcoldfire__
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(d3),MEM_PREDEC(sp)
+ movel R(d4),MEM_PREDEC(sp)
+#else
moveml R(d2)-R(d4),MEM_PREDEC(sp)
+#endif
/* Get string pointer, character and length. */
movel MEM_DISP(sp,16),R(a0)
@@ -34,9 +40,15 @@ ENTRY(__memchr)
movel MEM_DISP(sp,24),R(d4)
/* Check if at least four bytes left to search. */
+#ifdef __mcoldfire__
+ subql #4,R(d4)
+ bcs L(L6)
+ addql #4,R(d4)
+#else
moveql #4,R(d1)
cmpl R(d1),R(d4)
bcs L(L6)
+#endif
/* Distribute the character to all bytes of a longword. */
movel R(d0),R(d1)
@@ -49,7 +61,11 @@ ENTRY(__memchr)
/* First search for the character one byte at a time until the
pointer is aligned to a longword boundary. */
movel R(a0),R(d1)
+#ifdef __mcoldfire__
+ andl #3,R(d1)
+#else
andw #3,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
@@ -57,8 +73,11 @@ ENTRY(__memchr)
subql #1,R(d4)
beq L(L7)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ subql #3,R(d1)
+#else
+ subqw #3,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
@@ -66,8 +85,11 @@ ENTRY(__memchr)
subql #1,R(d4)
beq L(L7)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ addql #1,R(d1)
+#else
+ addqw #1,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
@@ -177,19 +199,31 @@ L(L2:)
L(L6:)
/* Search one byte at a time in the remaining less than 4 bytes. */
+#ifdef __mcoldfire__
+ addql #4,R(d4)
+#else
andw #3,R(d4)
+#endif
beq L(L7)
cmpb MEM(a0),R(d0)
beq L(L9)
addql #1,R(a0)
+#ifdef __mcoldfire__
+ subql #1,R(d4)
+#else
subqw #1,R(d4)
+#endif
beq L(L7)
cmpb MEM(a0),R(d0)
beq L(L9)
addql #1,R(a0)
+#ifdef __mcoldfire__
+ subql #1,R(d4)
+#else
subqw #1,R(d4)
+#endif
beq L(L7)
cmpb MEM(a0),R(d0)
beq L(L9)
@@ -198,7 +232,13 @@ L(L7:)
/* Return NULL. */
clrl R(d0)
movel R(d0),R(a0)
+#ifdef __mcoldfire__
+ movel MEM_POSTINC(sp),R(d4)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+#else
moveml MEM_POSTINC(sp),R(d2)-R(d4)
+#endif
rts
L(L8:)
@@ -221,7 +261,13 @@ L(L8:)
/* Otherwise the fourth byte must equal C. */
L(L9:)
movel R(a0),R(d0)
+#ifdef __mcoldfire__
+ movel MEM_POSTINC(sp),R(d4)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+#else
moveml MEM_POSTINC(sp),R(d2)-R(d4)
+#endif
rts
END(__memchr)
diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure
index 35dcea4..94fc1aa 100644
--- a/sysdeps/m68k/preconfigure
+++ b/sysdeps/m68k/preconfigure
@@ -1,6 +1,17 @@
# This fragment canonicalizes the machine names for m68k variants.
case "$machine" in
-m680?0) base_machine=m68k machine=m68k/$machine ;;
-m68k) base_machine=m68k machine=m68k/m68020 ;;
+m680?0) base_machine=m68k machine=m68k/m680x0/$machine ;;
+m68k) variant=`(echo "#ifdef __mcoldfire__"
+ echo "coldfire"
+ echo "#else"
+ echo "m680x0/m68020"
+ echo "#endif") |
+ $CC $CFLAGS $CPPFLAGS -E - |
+ grep '^[a-z]'`
+ if test -z "$variant"; then
+ echo >&2 "Cannot determine m68k processor variant"
+ exit 1
+ fi
+ base_machine=m68k machine=m68k/$variant ;;
esac
diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S
index acd8f76..97735f6 100644
--- a/sysdeps/m68k/rawmemchr.S
+++ b/sysdeps/m68k/rawmemchr.S
@@ -43,21 +43,31 @@ ENTRY(__rawmemchr)
/* First search for the character one byte at a time until the
pointer is aligned to a longword boundary. */
movel R(a0),R(d1)
+#ifdef __mcoldfire__
+ andl #3,R(d1)
+#else
andw #3,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ subql #3,R(d1)
+#else
+ subqw #3,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ addql #1,R(d1)
+#else
+ addqw #1,R(d1)
+#endif
beq L(L1)
cmpb MEM(a0),R(d0)
beq L(L9)
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 8a6c3f9..e2ba0e7 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -53,11 +53,14 @@ __sigsetjmp (jmp_buf env, int savemask)
/* Save floating-point (68881) registers FP0 through FP7. */
asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+#elif defined (__mcffpu__)
+ asm volatile ("fmovem %/fp0-%/fp7, %0"
+ : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
}
#if !defined BSD_SETJMP && !defined BSD__SETJMP
-hidden_def (__sigsetjmp)
+libc_hidden_def (__sigsetjmp)
#endif
diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S
index 04626ff..2e1e324 100644
--- a/sysdeps/m68k/strchr.S
+++ b/sysdeps/m68k/strchr.S
@@ -43,32 +43,42 @@ ENTRY(strchr)
/* First search for the character one byte at a time until the
pointer is aligned to a longword boundary. */
movel R(a0),R(d1)
+#ifdef __mcoldfire__
+ andl #3,R(d1)
+#else
andw #3,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L3)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ subql #3,R(d1)
+#else
+ subqw #3,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L3)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ addql #1,R(d1)
+#else
+ addqw #1,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L3)
addql #1,R(a0)
diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S
index 3fee2b2..9d13ec1 100644
--- a/sysdeps/m68k/strchrnul.S
+++ b/sysdeps/m68k/strchrnul.S
@@ -44,32 +44,42 @@ ENTRY(__strchrnul)
/* First search for the character one byte at a time until the
pointer is aligned to a longword boundary. */
movel R(a0),R(d1)
+#ifdef __mcoldfire__
+ andl #3,R(d1)
+#else
andw #3,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L9)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ subql #3,R(d1)
+#else
+ subqw #3,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L9)
addql #1,R(a0)
- movel R(a0),R(d1)
- andw #3,R(d1)
+#ifdef __mcoldfire__
+ addql #1,R(d1)
+#else
+ addqw #1,R(d1)
+#endif
beq L(L1)
- moveb MEM(a0),R(d1)
- cmpb R(d0),R(d1)
+ moveb MEM(a0),R(d2)
+ cmpb R(d0),R(d2)
beq L(L9)
- tstb R(d1)
+ tstb R(d2)
beq L(L9)
addql #1,R(a0)
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
index f492ff6..3698628 100644
--- a/sysdeps/m68k/sysdep.h
+++ b/sysdeps/m68k/sysdep.h
@@ -97,4 +97,26 @@
# define JUMPTARGET(name) name
# endif
+/* Perform operation OP with PC-relative SRC as the first operand and
+ DST as the second. TMP is available as a temporary if needed. */
+#ifdef __mcoldfire__
+#define PCREL_OP(OP, SRC, DST, TMP) \
+ move.l &SRC - ., TMP; OP (-8, %pc, TMP), DST
+#else
+#define PCREL_OP(OP, SRC, DST, TMP) \
+ OP SRC(%pc), DST
+#endif
+
+#else
+
+/* As above, but PC is the spelling of the PC register. We need this
+ so that the macro can be used in both normal and extended asms. */
+#ifdef __mcoldfire__
+#define PCREL_OP(OP, SRC, DST, TMP, PC) \
+ "move.l #" SRC " - ., " TMP "\n\t" OP " (-8, " PC ", " TMP "), " DST
+#else
+#define PCREL_OP(OP, SRC, DST, TMP, PC) \
+ OP " " SRC "(" PC "), " DST
+#endif
+
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/tst-audit.h
similarity index 72%
rename from sysdeps/m68k/fpu/e_acos.c
rename to sysdeps/m68k/tst-audit.h
index c9f6c6a..5254ab3 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/tst-audit.h
@@ -1,4 +1,6 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Definitions for testing PLT entry/exit auditing. m68k version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
-#include "math_private.h"
-#include "mathimpl.h"
-
-#ifndef FUNC
-#define FUNC __ieee754_acos
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-float_type
-FUNC (x)
- float_type x;
-{
- return __m81_u(FUNC)(x);
-}
+#define pltenter la_m68k_gnu_pltenter
+#define pltexit la_m68k_gnu_pltexit
+#define La_regs La_m68k_regs
+#define La_retval La_m68k_retval
+#define int_retval lrv_d0
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/wcpcpy.c
similarity index 60%
rename from sysdeps/m68k/fpu/s_isinf.c
rename to sysdeps/m68k/wcpcpy.c
index 5fb43ea..c838af1 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/wcpcpy.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,25 +17,21 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
+/* The generic version of this file assumes that __alignof__(wchar_t) ==
+ sizeof (wchar_t). We therefore use this port-specific implementation
+ instead. */
+#include <wchar.h>
-#ifndef FUNC
-#define FUNC isinf
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-#define __CONCATX(a,b) __CONCAT(a,b)
-
-int
-__CONCATX(__,FUNC) (x)
- float_type x;
+/* Copy SRC to DEST, returning the address of the terminating L'\0' in
+ DEST. */
+wchar_t *
+__wcpcpy (wchar_t *dest, const wchar_t *src)
{
- return __m81_u(__CONCATX(__,FUNC))(x);
+ do
+ ;
+ while ((*dest++ = *src++));
+
+ return dest - 1;
}
-#define hidden_defx(a) hidden_def(a)
-hidden_defx(__CONCATX(__,FUNC))
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+weak_alias (__wcpcpy, wcpcpy)
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/wcpcpy_chk.c
similarity index 57%
copy from sysdeps/m68k/fpu/fegetenv.c
copy to sysdeps/m68k/wcpcpy_chk.c
index 6c94b07..525c1d5 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/wcpcpy_chk.c
@@ -1,7 +1,6 @@
-/* Store current floating-point environment.
- Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -18,21 +17,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+/* The generic version of this file assumes that __alignof__(wchar_t) ==
+ sizeof (wchar_t). We therefore use this port-specific implementation
+ instead. */
+#include <wchar.h>
-int
-__fegetenv (fenv_t *envp)
+/* Copy SRC to DEST, returning the address of the terminating L'\0' in
+ DEST. Check for overflows. */
+wchar_t *
+__wcpcpy_chk (wchar_t *dest, const wchar_t *src, size_t destlen)
{
- __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
+ do
+ if (destlen-- == 0)
+ __chk_fail ();
+ while ((*dest++ = *src++));
- /* Success. */
- return 0;
+ return dest - 1;
}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fegetenv, __old_fegetenv)
-compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
-#endif
-
-versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
new file mode 100644
index 0000000..8ad0c96
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+struct sigcontext {
+ unsigned long sc_mask;
+ unsigned long sc_usp;
+ unsigned long sc_d0;
+ unsigned long sc_d1;
+#ifdef __mcoldfire__
+ unsigned long sc_d2;
+ unsigned long sc_d3;
+ unsigned long sc_d4;
+ unsigned long sc_d5;
+ unsigned long sc_d6;
+ unsigned long sc_d7;
+#endif
+ unsigned long sc_a0;
+ unsigned long sc_a1;
+#ifdef __mcoldfire__
+ unsigned long sc_a2;
+ unsigned long sc_a3;
+ unsigned long sc_a4;
+ unsigned long sc_a5;
+ unsigned long sc_a6;
+#endif
+ unsigned short sc_sr;
+ unsigned long sc_pc;
+ unsigned short sc_formatvec;
+#ifdef __mcoldfire__
+ unsigned long sc_fpregs[8][2];
+ unsigned long sc_fpcntl[3];
+ unsigned char sc_fpstate[16];
+#else
+ unsigned long sc_fpregs[2*3];
+ unsigned long sc_fpcntl[3];
+ unsigned char sc_fpstate[216];
+#endif
+};
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h b/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
new file mode 100644
index 0000000..1ded1c2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/siginfo.h
@@ -0,0 +1,316 @@
+/* siginfo_t, sigevent and constants. m68k linux version.
+ Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t \
+ && !defined __need_sigevent_t
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+#if (!defined __have_sigval_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t \
+ || defined __need_sigevent_t))
+# define __have_sigval_t 1
+
+/* Type for data associated with a signal. */
+typedef union sigval
+ {
+ int sival_int;
+ void *sival_ptr;
+ } sigval_t;
+#endif
+
+#if (!defined __have_siginfo_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t 1
+
+# define __SI_MAX_SIZE 128
+# if __WORDSIZE == 64
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_errno; /* If non-zero, an errno value associated with
+ this signal, as defined in <errno.h>. */
+ int si_code; /* Signal code. */
+
+ union
+ {
+ int _pad[__SI_PAD_SIZE];
+
+ /* kill(). */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ unsigned short __pad; /* 16-bit version of si_uid. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ } _kill;
+
+ /* POSIX.1b timers. */
+ struct
+ {
+ int si_tid; /* Timer ID. */
+ int si_overrun; /* Overrun count. */
+ sigval_t si_sigval; /* Signal value. */
+ } _timer;
+
+ /* POSIX.1b signals. */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ unsigned short __pad; /* 16-bit version of si_uid. */
+ sigval_t si_sigval; /* Signal value. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ } _rt;
+
+ /* SIGCHLD. */
+ struct
+ {
+ __pid_t si_pid; /* Which child. */
+ unsigned short __pad; /* 16-bit version of si_uid. */
+ int si_status; /* Exit value or signal. */
+ __clock_t si_utime;
+ __clock_t si_stime;
+ __uid_t si_uid; /* Real user ID of sending process. */
+ } _sigchld;
+
+ /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
+ struct
+ {
+ void *si_addr; /* Faulting insn/memory ref. */
+ } _sigfault;
+
+ /* SIGPOLL. */
+ struct
+ {
+ long int si_band; /* Band event for SIGPOLL. */
+ int si_fd;
+ } _sigpoll;
+ } _sifields;
+ } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names. */
+# define si_pid _sifields._kill.si_pid
+# define si_uid _sifields._kill.si_uid
+# define si_timerid _sifields._timer.si_tid
+# define si_overrun _sifields._timer.si_overrun
+# define si_status _sifields._sigchld.si_status
+# define si_utime _sifields._sigchld.si_utime
+# define si_stime _sifields._sigchld.si_stime
+# define si_value _sifields._rt.si_sigval
+# define si_int _sifields._rt.si_sigval.sival_int
+# define si_ptr _sifields._rt.si_sigval.sival_ptr
+# define si_addr _sifields._sigfault.si_addr
+# define si_band _sifields._sigpoll.si_band
+# define si_fd _sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'. Positive values are reserved for kernel-generated
+ signals. */
+enum
+{
+ SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
+# define SI_ASYNCNL SI_ASYNCNL
+ SI_TKILL = -6, /* Sent by tkill. */
+# define SI_TKILL SI_TKILL
+ SI_SIGIO, /* Sent by queued SIGIO. */
+# define SI_SIGIO SI_SIGIO
+ SI_ASYNCIO, /* Sent by AIO completion. */
+# define SI_ASYNCIO SI_ASYNCIO
+ SI_MESGQ, /* Sent by real time mesq state change. */
+# define SI_MESGQ SI_MESGQ
+ SI_TIMER, /* Sent by timer expiration. */
+# define SI_TIMER SI_TIMER
+ SI_QUEUE, /* Sent by sigqueue. */
+# define SI_QUEUE SI_QUEUE
+ SI_USER, /* Sent by kill, sigsend, raise. */
+# define SI_USER SI_USER
+ SI_KERNEL = 0x80 /* Send by kernel. */
+#define SI_KERNEL SI_KERNEL
+};
+
+
+/* `si_code' values for SIGILL signal. */
+enum
+{
+ ILL_ILLOPC = 1, /* Illegal opcode. */
+# define ILL_ILLOPC ILL_ILLOPC
+ ILL_ILLOPN, /* Illegal operand. */
+# define ILL_ILLOPN ILL_ILLOPN
+ ILL_ILLADR, /* Illegal addressing mode. */
+# define ILL_ILLADR ILL_ILLADR
+ ILL_ILLTRP, /* Illegal trap. */
+# define ILL_ILLTRP ILL_ILLTRP
+ ILL_PRVOPC, /* Privileged opcode. */
+# define ILL_PRVOPC ILL_PRVOPC
+ ILL_PRVREG, /* Privileged register. */
+# define ILL_PRVREG ILL_PRVREG
+ ILL_COPROC, /* Coprocessor error. */
+# define ILL_COPROC ILL_COPROC
+ ILL_BADSTK /* Internal stack error. */
+# define ILL_BADSTK ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal. */
+enum
+{
+ FPE_INTDIV = 1, /* Integer divide by zero. */
+# define FPE_INTDIV FPE_INTDIV
+ FPE_INTOVF, /* Integer overflow. */
+# define FPE_INTOVF FPE_INTOVF
+ FPE_FLTDIV, /* Floating point divide by zero. */
+# define FPE_FLTDIV FPE_FLTDIV
+ FPE_FLTOVF, /* Floating point overflow. */
+# define FPE_FLTOVF FPE_FLTOVF
+ FPE_FLTUND, /* Floating point underflow. */
+# define FPE_FLTUND FPE_FLTUND
+ FPE_FLTRES, /* Floating point inexact result. */
+# define FPE_FLTRES FPE_FLTRES
+ FPE_FLTINV, /* Floating point invalid operation. */
+# define FPE_FLTINV FPE_FLTINV
+ FPE_FLTSUB /* Subscript out of range. */
+# define FPE_FLTSUB FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal. */
+enum
+{
+ SEGV_MAPERR = 1, /* Address not mapped to object. */
+# define SEGV_MAPERR SEGV_MAPERR
+ SEGV_ACCERR /* Invalid permissions for mapped object. */
+# define SEGV_ACCERR SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal. */
+enum
+{
+ BUS_ADRALN = 1, /* Invalid address alignment. */
+# define BUS_ADRALN BUS_ADRALN
+ BUS_ADRERR, /* Non-existant physical address. */
+# define BUS_ADRERR BUS_ADRERR
+ BUS_OBJERR /* Object specific hardware error. */
+# define BUS_OBJERR BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal. */
+enum
+{
+ TRAP_BRKPT = 1, /* Process breakpoint. */
+# define TRAP_BRKPT TRAP_BRKPT
+ TRAP_TRACE /* Process trace trap. */
+# define TRAP_TRACE TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal. */
+enum
+{
+ CLD_EXITED = 1, /* Child has exited. */
+# define CLD_EXITED CLD_EXITED
+ CLD_KILLED, /* Child was killed. */
+# define CLD_KILLED CLD_KILLED
+ CLD_DUMPED, /* Child terminated abnormally. */
+# define CLD_DUMPED CLD_DUMPED
+ CLD_TRAPPED, /* Traced child has trapped. */
+# define CLD_TRAPPED CLD_TRAPPED
+ CLD_STOPPED, /* Child has stopped. */
+# define CLD_STOPPED CLD_STOPPED
+ CLD_CONTINUED /* Stopped child has continued. */
+# define CLD_CONTINUED CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal. */
+enum
+{
+ POLL_IN = 1, /* Data input available. */
+# define POLL_IN POLL_IN
+ POLL_OUT, /* Output buffers available. */
+# define POLL_OUT POLL_OUT
+ POLL_MSG, /* Input message available. */
+# define POLL_MSG POLL_MSG
+ POLL_ERR, /* I/O error. */
+# define POLL_ERR POLL_ERR
+ POLL_PRI, /* High priority input available. */
+# define POLL_PRI POLL_PRI
+ POLL_HUP /* Device disconnected. */
+# define POLL_HUP POLL_HUP
+};
+
+# undef __need_siginfo_t
+#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
+
+
+#if (defined _SIGNAL_H || defined __need_sigevent_t) \
+ && !defined __have_sigevent_t
+# define __have_sigevent_t 1
+
+/* Structure to transport application-defined values with signals. */
+# define __SIGEV_MAX_SIZE 64
+# if __WORDSIZE == 64
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct sigevent
+ {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+
+ union
+ {
+ int _pad[__SIGEV_PAD_SIZE];
+
+ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
+ thread to receive the signal. */
+ __pid_t _tid;
+
+ struct
+ {
+ void (*_function) (sigval_t); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
+ } _sigev_thread;
+ } _sigev_un;
+ } sigevent_t;
+
+/* POSIX names to access some of the members. */
+# define sigev_notify_function _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values. */
+enum
+{
+ SIGEV_SIGNAL = 0, /* Notify via signal. */
+# define SIGEV_SIGNAL SIGEV_SIGNAL
+ SIGEV_NONE, /* Other notification: meaningless. */
+# define SIGEV_NONE SIGEV_NONE
+ SIGEV_THREAD, /* Deliver via thread creation. */
+# define SIGEV_THREAD SIGEV_THREAD
+
+ SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
+#define SIGEV_THREAD_ID SIGEV_THREAD_ID
+};
+
+#endif /* have _SIGNAL_H. */
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 6baf723..a179f8e 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -42,11 +42,21 @@ ENTRY (__clone)
movel 16(%sp), -(%a1)
/* Do the system call */
- exg %d2, %a1 /* save %d2 and get stack pointer */
movel 12(%sp), %d1 /* get flags */
+#ifdef __mcoldfire__
+ movel %d2, -(%a1)
+ movel %d2, -(%sp)
+ movel %a1, %d2
+#else
+ exg %d2, %a1 /* save %d2 and get stack pointer */
+#endif
movel #SYS_ify (clone), %d0
trap #0
+#ifdef __mcoldfire__
+ movel (%sp)+, %d2
+#else
exg %d2, %a1 /* restore %d2 */
+#endif
tstl %d0
jmi SYSCALL_ERROR_LABEL
diff --git a/sysdeps/unix/sysv/linux/m68k/configure b/sysdeps/unix/sysv/linux/m68k/configure
new file mode 100644
index 0000000..94ccc50
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/configure
@@ -0,0 +1,6 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ case $machine in
+m68k/coldfire)
+ arch_minimum_kernel=2.6.10
+ ;;
+esac
diff --git a/sysdeps/unix/sysv/linux/m68k/configure.in b/sysdeps/unix/sysv/linux/m68k/configure.in
new file mode 100644
index 0000000..285b81f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/configure.in
@@ -0,0 +1,7 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+case $machine in
+m68k/coldfire)
+ arch_minimum_kernel=2.6.10
+ ;;
+esac
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list
similarity index 77%
copy from sysdeps/unix/sysv/linux/m68k/syscalls.list
copy to sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list
index 98d3066..913f051 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/syscalls.list
@@ -1,5 +1,4 @@
# File name Caller Syscall name Args Strong name Weak names
-cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush
oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
index a7ac3ca..391902f 100644
--- a/sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -40,6 +40,7 @@
*/
+#ifndef __mcoldfire__
/* Linux saves only the call-clobbered registers in the sigcontext. We
need to use a trampoline that saves the rest so that the C code can
access them. We use the sc_fpstate field, since the handler is not
@@ -65,6 +66,7 @@ catch_segfault:\n\
}
#define catch_segfault(a,b) \
__attribute_used__ real_catch_segfault(a,b)
+#endif
static void
hexvalue (unsigned long int value, char *buf, size_t len)
@@ -81,6 +83,8 @@ register_dump (int fd, struct sigcontext *ctx)
char fpregs[11][24];
struct iovec iov[63], *next_iov = iov;
unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1;
+ unsigned long *pfp = (unsigned long *) ctx->sc_fpregs;
+ int i, j, fpreg_size;
#define ADD_STRING(str) \
next_iov->iov_base = (char *) (str); \
@@ -91,51 +95,59 @@ register_dump (int fd, struct sigcontext *ctx)
next_iov->iov_len = (len); \
++next_iov
+#ifdef __mcoldfire__
+ fpreg_size = 16;
+#else
+ fpreg_size = 24;
+#endif
+
/* Generate strings of register contents. */
hexvalue (ctx->sc_d0, regs[0], 8);
hexvalue (ctx->sc_d1, regs[1], 8);
+#ifdef __mcoldfire__
+ hexvalue (ctx->sc_d2, regs[2], 8);
+ hexvalue (ctx->sc_d3, regs[3], 8);
+ hexvalue (ctx->sc_d4, regs[4], 8);
+ hexvalue (ctx->sc_d5, regs[5], 8);
+ hexvalue (ctx->sc_d6, regs[6], 8);
+ hexvalue (ctx->sc_d7, regs[7], 8);
+#else
hexvalue (*p++, regs[2], 8);
hexvalue (*p++, regs[3], 8);
hexvalue (*p++, regs[4], 8);
hexvalue (*p++, regs[5], 8);
hexvalue (*p++, regs[6], 8);
hexvalue (*p++, regs[7], 8);
+#endif
hexvalue (ctx->sc_a0, regs[8], 8);
hexvalue (ctx->sc_a1, regs[9], 8);
+#ifdef __mcoldfire__
+ hexvalue (ctx->sc_a2, regs[10], 8);
+ hexvalue (ctx->sc_a3, regs[11], 8);
+ hexvalue (ctx->sc_a4, regs[12], 8);
+ hexvalue (ctx->sc_a5, regs[13], 8);
+ hexvalue (ctx->sc_a6, regs[14], 8);
+#else
hexvalue (*p++, regs[10], 8);
hexvalue (*p++, regs[11], 8);
hexvalue (*p++, regs[12], 8);
hexvalue (*p++, regs[13], 8);
hexvalue (*p++, regs[14], 8);
+#endif
hexvalue (ctx->sc_usp, regs[15], 8);
hexvalue (ctx->sc_pc, regs[16], 8);
hexvalue (ctx->sc_sr, regs[17], 4);
hexvalue (ctx->sc_mask, regs[18], 8);
hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4);
- hexvalue (ctx->sc_fpregs[0], fpregs[0], 8);
- hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8);
- hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8);
- hexvalue (ctx->sc_fpregs[3], fpregs[1], 8);
- hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8);
- hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8);
- hexvalue (*p++, fpregs[2], 8);
- hexvalue (*p++, fpregs[2] + 8, 8);
- hexvalue (*p++, fpregs[2] + 16, 8);
- hexvalue (*p++, fpregs[3], 8);
- hexvalue (*p++, fpregs[3] + 8, 8);
- hexvalue (*p++, fpregs[3] + 16, 8);
- hexvalue (*p++, fpregs[4], 8);
- hexvalue (*p++, fpregs[4] + 8, 8);
- hexvalue (*p++, fpregs[4] + 16, 8);
- hexvalue (*p++, fpregs[5], 8);
- hexvalue (*p++, fpregs[5] + 8, 8);
- hexvalue (*p++, fpregs[5] + 16, 8);
- hexvalue (*p++, fpregs[6], 8);
- hexvalue (*p++, fpregs[6] + 8, 8);
- hexvalue (*p++, fpregs[6] + 16, 8);
- hexvalue (*p++, fpregs[7], 8);
- hexvalue (*p++, fpregs[7] + 8, 8);
- hexvalue (*p++, fpregs[7] + 16, 8);
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < fpreg_size; j += 8)
+ hexvalue (*pfp++, fpregs[i] + j, 8);
+#ifdef __mcoldfire__
+ p = pfp;
+#endif
+ for (i = 2; i < 8; i++)
+ for (j = 0; j < fpreg_size; j += 8)
+ hexvalue (*p++, fpregs[i] + j, 8);
hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8);
hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8);
hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8);
@@ -184,21 +196,21 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_MEM (regs[19], 4);
ADD_STRING ("\n\n FP0: ");
- ADD_MEM (fpregs[0], 24);
+ ADD_MEM (fpregs[0], fpreg_size);
ADD_STRING (" FP1: ");
- ADD_MEM (fpregs[1], 24);
+ ADD_MEM (fpregs[1], fpreg_size);
ADD_STRING ("\n FP2: ");
- ADD_MEM (fpregs[2], 24);
+ ADD_MEM (fpregs[2], fpreg_size);
ADD_STRING (" FP3: ");
- ADD_MEM (fpregs[3], 24);
+ ADD_MEM (fpregs[3], fpreg_size);
ADD_STRING ("\n FP4: ");
- ADD_MEM (fpregs[4], 24);
+ ADD_MEM (fpregs[4], fpreg_size);
ADD_STRING (" FP5: ");
- ADD_MEM (fpregs[5], 24);
+ ADD_MEM (fpregs[5], fpreg_size);
ADD_STRING ("\n FP6: ");
- ADD_MEM (fpregs[6], 24);
+ ADD_MEM (fpregs[6], fpreg_size);
ADD_STRING (" FP7: ");
- ADD_MEM (fpregs[7], 24);
+ ADD_MEM (fpregs[7], fpreg_size);
ADD_STRING ("\n FPCR: ");
ADD_MEM (fpregs[8], 8);
ADD_STRING (" FPSR: ");
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 1d10f33..2690f18 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -42,7 +42,7 @@
.globl __socket
ENTRY (__socket)
#if defined NEED_CANCELLATION && defined CENABLE
- SINGLE_THREAD_P
+ SINGLE_THREAD_P (%a0)
jne 1f
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
index 418f832..230fd2d 100644
--- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h
+++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
@@ -62,22 +62,35 @@ enum
#define PT_SR PT_SR
PT_PC = 18,
#define PT_PC PT_PC
+
+#ifdef __mcoldfire__
+ PT_FP0 = 21,
+ PT_FP1 = 23,
+ PT_FP2 = 25,
+ PT_FP3 = 27,
+ PT_FP4 = 29,
+ PT_FP5 = 31,
+ PT_FP6 = 33,
+ PT_FP7 = 35,
+#else
PT_FP0 = 21,
-#define PT_FP0 PT_FP0
PT_FP1 = 24,
-#define PT_FP1 PT_FP1
PT_FP2 = 27,
-#define PT_FP2 PT_FP2
PT_FP3 = 30,
-#define PT_FP3 PT_FP3
PT_FP4 = 33,
-#define PT_FP4 PT_FP4
PT_FP5 = 36,
-#define PT_FP5 PT_FP5
PT_FP6 = 39,
-#define PT_FP6 PT_FP6
PT_FP7 = 42,
+#endif
+#define PT_FP0 PT_FP0
+#define PT_FP1 PT_FP1
+#define PT_FP2 PT_FP2
+#define PT_FP3 PT_FP3
+#define PT_FP4 PT_FP4
+#define PT_FP5 PT_FP5
+#define PT_FP6 PT_FP6
#define PT_FP7 PT_FP7
+
PT_FPCR = 45,
#define PT_FPCR PT_FPCR
PT_FPSR = 46,
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
index 3c441dc..776466b 100644
--- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
@@ -79,10 +79,14 @@ enum
/* Structure to describe FPU registers. */
typedef struct fpregset
{
- int f_fpregs[8][3];
int f_pcr;
int f_psr;
int f_fpiaddr;
+#ifdef __mcoldfire__
+ int f_fpregs[8][2];
+#else
+ int f_fpregs[8][3];
+#endif
} fpregset_t;
/* Context to describe whole processor state. */
@@ -98,12 +102,12 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
- unsigned long int uc_flags;
+ unsigned long uc_flags;
struct ucontext *uc_link;
- __sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
- long int uc_filler[174];
+ unsigned long uc_filler[80];
+ __sigset_t uc_sigmask;
} ucontext_t;
#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 98d3066..5367ef0 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,5 +1,3 @@
# File name Caller Syscall name Args Strong name Weak names
cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush
-oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
-oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 091dfc9..be37c89 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -18,6 +18,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _LINUX_M68K_SYSDEP_H
+#define _LINUX_M68K_SYSDEP_H 1
+
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/m68k/sysdep.h>
@@ -98,7 +101,7 @@
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
- lea (rtld_errno, %pc), %a0; \
+ PCREL_OP (lea, rtld_errno, %a0, %a0); \
neg.l %d0; \
move.l %d0, (%a0); \
move.l &-1, %d0; \
@@ -293,3 +296,4 @@ SYSCALL_ERROR_LABEL: \
#define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0)
#endif /* not __ASSEMBLER__ */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a852b06d972cdf3415988939e4b7b592d6b2f1cc
commit a852b06d972cdf3415988939e4b7b592d6b2f1cc
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Sep 22 17:40:26 2006 +0000
* sysdeps/unix/sysv/linux/arm/fxstatat.c: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 45e8a87..b28f7b5 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2006-09-22 Khem Raj <kraj@mvista.com>
+
+ * sysdeps/unix/sysv/linux/arm/fxstatat.c: New file.
+
2006-09-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):
diff --git a/sysdeps/unix/sysv/linux/arm/fxstatat.c b/sysdeps/unix/sysv/linux/arm/fxstatat.c
new file mode 100644
index 0000000..0f8b313
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/fxstatat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ea630251e84cdaabe7c5567d1640af82e4010bc
commit 6ea630251e84cdaabe7c5567d1640af82e4010bc
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Sep 22 17:36:23 2006 +0000
* sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT
code.
(__xstat_conv): Use memset to clear padding arrays. Check for
overflow.
(__xstat64_conv): Use memset to clear padding arrays.
(__xstat32_conv): New function.
* sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b849ffa..0c9fb72 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,14 @@
+2006-09-22 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/xstatconv.c: Remove STAT_IS_KERNEL_STAT
+ code.
+ (__xstat_conv): Use memset to clear padding arrays. Check for
+ overflow.
+ (__xstat64_conv): Use memset to clear padding arrays.
+ (__xstat32_conv): New function.
+ * sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c: Likewise.
+
2006-09-21 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/fpu_control.h: If soft-float, don't use
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c b/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c
new file mode 100644
index 0000000..0f8b313
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fxstatat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
new file mode 100644
index 0000000..21a6309
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/fxstatat64.c
@@ -0,0 +1,113 @@
+/* Copyright (C) 2005,2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file NAME in BUF. */
+
+int
+__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
+{
+ if (__builtin_expect (vers != _STAT_VER_LINUX, 0))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ int result;
+ INTERNAL_SYSCALL_DECL (err);
+ struct kernel_stat kst;
+
+#ifdef __NR_newfstatat
+# ifndef __ASSUME_ATFCTS
+ if (__have_atfcts >= 0)
+# endif
+ {
+ result = INTERNAL_SYSCALL (newfstatat, err, 4, fd, file, &kst, flag);
+# ifndef __ASSUME_ATFCTS
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1)
+ && INTERNAL_SYSCALL_ERRNO (result, err) == ENOSYS)
+ __have_atfcts = -1;
+ else
+# endif
+ if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat64_conv (vers, &kst, st);
+ else
+ {
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
+ return -1;
+ }
+ }
+#endif
+
+#ifndef __ASSUME_ATFCTS
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ char *buf = NULL;
+
+ if (fd != AT_FDCWD && file[0] != '/')
+ {
+ size_t filelen = strlen (file);
+ static const char procfd[] = "/proc/self/fd/%d/%s";
+ /* Buffer for the path name we are going to use. It consists of
+ - the string /proc/self/fd/
+ - the file descriptor number
+ - the file name provided.
+ The final NUL is included in the sizeof. A bit of overhead
+ due to the format elements compensates for possible negative
+ numbers. */
+ size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
+ buf = alloca (buflen);
+
+ __snprintf (buf, buflen, procfd, fd, file);
+ file = buf;
+ }
+
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file),
+ __ptrvalue (&kst));
+ else
+ result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file),
+ __ptrvalue (&kst));
+
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat64_conv (vers, &kst, st);
+
+ __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+ return -1;
+#endif
+}
+libc_hidden_def (__fxstatat64)
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index ccab6b6..068c087 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -21,16 +21,8 @@
#include <sys/stat.h>
#include <kernel_stat.h>
-#ifdef STAT_IS_KERNEL_STAT
-
-/* Dummy. */
-struct kernel_stat;
-
-#else
-
#include <string.h>
-
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
@@ -49,30 +41,43 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
/* Convert to current kernel version of `struct stat'. */
buf->st_dev = kbuf->st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ memset (&buf->st_pad1, 0, sizeof (buf->st_pad1));
buf->st_ino = kbuf->st_ino;
+ /* Check for overflow. */
+ if (buf->st_ino != kbuf->st_ino)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
buf->st_mode = kbuf->st_mode;
buf->st_nlink = kbuf->st_nlink;
buf->st_uid = kbuf->st_uid;
buf->st_gid = kbuf->st_gid;
buf->st_rdev = kbuf->st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
- buf->st_pad3 = 0;
+ memset (&buf->st_pad2, 0, sizeof (buf->st_pad2));
buf->st_size = kbuf->st_size;
- buf->st_blksize = kbuf->st_blksize;
- buf->st_blocks = kbuf->st_blocks;
-
+ /* Check for overflow. */
+ if (buf->st_size != kbuf->st_size)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ buf->st_pad3 = 0;
buf->st_atim.tv_sec = kbuf->st_atime_sec;
buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
-
- buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
- buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
- buf->st_pad5[4] = 0; buf->st_pad5[5] = 0;
- buf->st_pad5[6] = 0; buf->st_pad5[7] = 0;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+ /* Check for overflow. */
+ if (buf->st_blocks != kbuf->st_blocks)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ memset (&buf->st_pad5, 0, sizeof (buf->st_pad5));
}
break;
@@ -97,14 +102,14 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
struct stat64 *buf = ubuf;
buf->st_dev = kbuf->st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ memset (&buf->st_pad1, 0, sizeof (buf->st_pad1));
buf->st_ino = kbuf->st_ino;
buf->st_mode = kbuf->st_mode;
buf->st_nlink = kbuf->st_nlink;
buf->st_uid = kbuf->st_uid;
buf->st_gid = kbuf->st_gid;
buf->st_rdev = kbuf->st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; buf->st_pad2[2] = 0;
+ memset (&buf->st_pad2, 0, sizeof (buf->st_pad2));
buf->st_pad3 = 0;
buf->st_size = kbuf->st_size;
buf->st_blksize = kbuf->st_blksize;
@@ -117,10 +122,7 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ memset (&buf->st_pad4, 0, sizeof (buf->st_pad4));
}
break;
@@ -136,4 +138,65 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
#endif
}
-#endif /* ! STAT_IS_KERNEL_STAT */
+#if _MIPS_SIM == _ABIO32
+int
+__xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf)
+{
+ switch (vers)
+ {
+ case _STAT_VER_LINUX:
+ /* Convert current kernel version of `struct stat64' to
+ `struct stat'. The layout of the fields in the kernel's
+ stat64 is the same as that in the user stat64; the only
+ difference is that the latter has more trailing padding. */
+ buf->st_dev = kbuf->st_dev;
+ memset (&buf->st_pad1, 0, sizeof (buf->st_pad1));
+ buf->st_ino = kbuf->st_ino;
+ /* Check for overflow. */
+ if (buf->st_ino != kbuf->st_ino)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+ memset (&buf->st_pad2, 0, sizeof (buf->st_pad2));
+ buf->st_size = kbuf->st_size;
+ /* Check for overflow. */
+ if (buf->st_size != kbuf->st_size)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ buf->st_pad3 = 0;
+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+ /* Check for overflow. */
+ if (buf->st_blocks != kbuf->st_blocks)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ memset (&buf->st_pad5, 0, sizeof (buf->st_pad5));
+ break;
+
+ /* If struct stat64 is different from struct stat then
+ _STAT_VER_KERNEL does not make sense. */
+ case _STAT_VER_KERNEL:
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
+#endif /* _MIPS_SIM == _ABIO32 */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b4d184dc943ba57697dbbc9c05c829fce24ebff
commit 6b4d184dc943ba57697dbbc9c05c829fce24ebff
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Sep 21 21:01:02 2006 +0000
* sysdeps/mips/fpu_control.h: If soft-float, don't use
floating-point registers.
* sysdeps/mips/__longjmp.c, sysdeps/mips/setjmp_aux.c,
sysdeps/mips/mips64/__longjmp.c, sysdeps/mips/mips64/setjmp_aux.c:
Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b3bf090..b849ffa 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2006-09-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/fpu_control.h: If soft-float, don't use
+ floating-point registers.
+ * sysdeps/mips/__longjmp.c, sysdeps/mips/setjmp_aux.c,
+ sysdeps/mips/mips64/__longjmp.c, sysdeps/mips/mips64/setjmp_aux.c:
+ Likewise.
+
2006-08-04 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI,
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 750a71f..386c056 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -37,6 +37,7 @@ __longjmp (env, val_arg)
along the way. */
register int val asm ("a1");
+#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0]));
asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1]));
@@ -48,6 +49,7 @@ __longjmp (env, val_arg)
/* Get and reconstruct the floating point csr. */
asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
asm volatile ("ctc1 $2, $31");
+#endif
/* Get the GP. */
asm volatile ("lw $gp, %0" : : "m" (env[0].__gp));
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index da18dea..5712ac5 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -58,6 +58,17 @@
#include <features.h>
+#ifdef __mips_soft_float
+
+#define _FPU_RESERVED 0xffffffff
+#define _FPU_DEFAULT 0x00000000
+typedef unsigned int fpu_control_t;
+#define _FPU_GETCW(cw) 0
+#define _FPU_SETCW(cw) do { } while (0)
+extern fpu_control_t __fpu_control;
+
+#else /* __mips_soft_float */
+
/* masking of interrupts */
#define _FPU_MASK_V 0x0800 /* Invalid operation */
#define _FPU_MASK_Z 0x0400 /* Division by zero */
@@ -95,4 +106,6 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
+#endif /* __mips_soft_float */
+
#endif /* fpu_control.h */
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 546493f..973b078 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -39,6 +39,7 @@ __longjmp (env, val_arg)
along the way. */
register int val asm ("a1");
+#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
#if _MIPS_SIM == _ABI64
asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
@@ -61,6 +62,7 @@ __longjmp (env, val_arg)
/* Get and reconstruct the floating point csr. */
asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
asm volatile ("ctc1 $2, $31");
+#endif
/* Get the GP. */
asm volatile ("ld $gp, %0" : : "m" (env[0].__gp));
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index 26b4739..49d0915 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -29,6 +29,7 @@ int
__sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
long long gp)
{
+#ifdef __mips_hard_float
/* Store the floating point callee-saved registers... */
#if _MIPS_SIM == _ABI64
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
@@ -47,6 +48,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
#endif
+#endif
/* .. and the PC; */
asm volatile ("sd $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
@@ -70,8 +72,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
asm volatile ("sd $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
asm volatile ("sd $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
+#ifdef __mips_hard_float
/* .. and finally get and reconstruct the floating point csr. */
asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
+#endif
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index 7125cc4..269d0fd 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -27,6 +27,7 @@
int
__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
{
+#ifdef __mips_hard_float
/* Store the floating point callee-saved registers... */
asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
@@ -34,6 +35,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
+#endif
/* .. and the PC; */
asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
@@ -57,8 +59,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
+#ifdef __mips_hard_float
/* .. and finally get and reconstruct the floating point csr. */
asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
+#endif
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b860fb9c0bae72e6bfcffb44509183eb1763706
commit 4b860fb9c0bae72e6bfcffb44509183eb1763706
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Sep 21 18:39:51 2006 +0000
* sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):
Add "java" and "iwmmxt".
* sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use <sysdep.h> for
HWCAP values.
(_DL_HWCAP_COUNT): Increase to 10.
* sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP,
HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT,
HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP,
HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define.
* sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers
if HWCAP_ARM_IWMMXT set. Don't include <asm/procinfo.h>. Use
HWCAP_ARM_VFP instead of HWCAP_VFP.
* sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt
registers if HWCAP_ARM_IWMMXT set. Don't include
<asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 3effa9d..45e8a87 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,21 @@
+2006-09-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (_dl_arm_cap_flags):
+ Add "java" and "iwmmxt".
+ * sysdeps/unix/sysv/linux/arm/dl-procinfo.h: Use <sysdep.h> for
+ HWCAP values.
+ (_DL_HWCAP_COUNT): Increase to 10.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (HWCAP_ARM_SWP,
+ HWCAP_ARM_HALF, HWCAP_ARM_THUMB, HWCAP_ARM_26BIT,
+ HWCAP_ARM_FAST_MULT, HWCAP_ARM_FPA, HWCAP_ARM_VFP, HWCAP_ARM_EDSP,
+ HWCAP_ARM_JAVA, HWCAP_ARM_IWMMXT): Define.
+ * sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Save iWMMXt registers
+ if HWCAP_ARM_IWMMXT set. Don't include <asm/procinfo.h>. Use
+ HWCAP_ARM_VFP instead of HWCAP_VFP.
+ * sysdeps/arm/eabi/__longjmp.S (__longjmp): Restore iWMMXt
+ registers if HWCAP_ARM_IWMMXT set. Don't include
+ <asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP.
+
2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined
diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S
index 5677633..fff25cd 100644
--- a/sysdeps/arm/eabi/__longjmp.S
+++ b/sysdeps/arm/eabi/__longjmp.S
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,6 @@
#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
-#define __ASSEMBLY__
-#include <asm/procinfo.h>
#include <rtld-global-offsets.h>
/* __longjmp(jmpbuf, val) */
@@ -53,7 +51,7 @@ ENTRY (__longjmp)
#endif
#endif
- tst a2, #HWCAP_VFP
+ tst a2, #HWCAP_ARM_VFP
beq Lno_vfp
/* Restore the VFP registers. */
@@ -65,6 +63,19 @@ ENTRY (__longjmp)
mcr p10, 7, r1, cr1, cr0, 0
Lno_vfp:
+ tst a2, #HWCAP_ARM_IWMMXT
+ beq Lno_iwmmxt
+
+ /* Restore the call-preserved iWMMXt registers. */
+ /* Following instructions are wldrd wr10, [ip], #8 (etc.) */
+ ldcl p1, cr10, [r12], #8
+ ldcl p1, cr11, [r12], #8
+ ldcl p1, cr12, [r12], #8
+ ldcl p1, cr13, [r12], #8
+ ldcl p1, cr14, [r12], #8
+ ldcl p1, cr15, [r12], #8
+Lno_iwmmxt:
+
DO_RET(lr)
#ifdef IS_IN_rtld
diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S
index d9ad26a..b7d2400 100644
--- a/sysdeps/arm/eabi/setjmp.S
+++ b/sysdeps/arm/eabi/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +21,6 @@
#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
-#define __ASSEMBLY__
-#include <asm/procinfo.h>
#include <rtld-global-offsets.h>
ENTRY (__sigsetjmp)
@@ -51,7 +49,7 @@ ENTRY (__sigsetjmp)
#endif
#endif
- tst a3, #HWCAP_VFP
+ tst a3, #HWCAP_ARM_VFP
beq Lno_vfp
/* Store the VFP registers. */
@@ -63,6 +61,19 @@ ENTRY (__sigsetjmp)
str r2, [ip], #4
Lno_vfp:
+ tst a3, #HWCAP_ARM_IWMMXT
+ beq Lno_iwmmxt
+
+ /* Save the call-preserved iWMMXt registers. */
+ /* Following instructions are wstrd wr10, [ip], #8 (etc.) */
+ stcl p1, cr10, [r12], #8
+ stcl p1, cr11, [r12], #8
+ stcl p1, cr12, [r12], #8
+ stcl p1, cr13, [r12], #8
+ stcl p1, cr14, [r12], #8
+ stcl p1, cr15, [r12], #8
+Lno_iwmmxt:
+
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 9b87a20..5c913f5 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -1,5 +1,5 @@
/* Data for Linux/ARM version of processor capability information.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -47,11 +47,12 @@
#if !defined PROCINFO_DECL && defined SHARED
._dl_arm_cap_flags
#else
-PROCINFO_CLASS const char _dl_arm_cap_flags[8][10]
+PROCINFO_CLASS const char _dl_arm_cap_flags[10][10]
#endif
#ifndef PROCINFO_DECL
= {
"swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
+ "java", "iwmmxt",
}
#endif
#if !defined SHARED || defined PROCINFO_DECL
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 35b3334..0c675c6 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -1,5 +1,5 @@
/* Linux/ARM version of processor capability information handling macros.
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -22,8 +22,9 @@
#define _DL_PROCINFO_H 1
#include <ldsodefs.h>
+#include <sysdep.h>
-#define _DL_HWCAP_COUNT 8
+#define _DL_HWCAP_COUNT 10
/* The kernel provides platform data but it is not interesting. */
#define _DL_HWCAP_PLATFORM 0
@@ -53,19 +54,7 @@ _dl_hwcap_string (int idx)
return GLRO(dl_arm_cap_flags)[idx];
};
-enum
-{
- HWCAP_ARM_SWP = 1 << 0,
- HWCAP_ARM_HALF = 1 << 1,
- HWCAP_ARM_THUMB = 1 << 2,
- HWCAP_ARM_26BIT = 1 << 3,
- HWCAP_ARM_FAST_MULT = 1 << 4,
- HWCAP_ARM_FPA = 1 << 5,
- HWCAP_ARM_VFP = 1 << 6,
- HWCAP_ARM_EDSP = 1 << 7,
-
- HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
-};
+#define HWCAP_IMPORTANT (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
static inline int
__attribute__ ((unused))
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index e40add3..7692c1c 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -37,6 +37,18 @@
#define SYS_ify(syscall_name) (__NR_##syscall_name)
+/* The following must match the kernel's <asm/procinfo.h>. */
+#define HWCAP_ARM_SWP 1
+#define HWCAP_ARM_HALF 2
+#define HWCAP_ARM_THUMB 4
+#define HWCAP_ARM_26BIT 8
+#define HWCAP_ARM_FAST_MULT 16
+#define HWCAP_ARM_FPA 32
+#define HWCAP_ARM_VFP 64
+#define HWCAP_ARM_EDSP 128
+#define HWCAP_ARM_JAVA 256
+#define HWCAP_ARM_IWMMXT 512
+
#ifdef __ASSEMBLER__
/* Linux uses a negative return value to indicate syscall errors,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56865130d06d032b2c44b188eb841d481a3d0bad
commit 56865130d06d032b2c44b188eb841d481a3d0bad
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Sep 21 18:21:19 2006 +0000
* sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined
symbols.
(elf_machine_rela): Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 8702925..3effa9d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_rel): Handle undefined
+ symbols.
+ (elf_machine_rela): Likewise.
+
2006-08-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl,
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index ff8a170..1a45a26 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -447,12 +447,16 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_TLS_DTPOFF32:
- *reloc_addr += sym->st_value;
+ if (sym != NULL)
+ *reloc_addr += sym->st_value;
break;
case R_ARM_TLS_TPOFF32:
- CHECK_STATIC_TLS (map, sym_map);
- *reloc_addr += sym->st_value + sym_map->l_tls_offset;
+ if (sym != NULL)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr += sym->st_value + sym_map->l_tls_offset;
+ }
break;
#endif
default:
@@ -544,13 +548,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
case R_ARM_TLS_DTPOFF32:
- *reloc_addr = sym->st_value + reloc->r_addend;
+ *reloc_addr = (sym == NULL ? 0 : sym->st_value) + reloc->r_addend;
break;
case R_ARM_TLS_TPOFF32:
- CHECK_STATIC_TLS (map, sym_map);
- *reloc_addr = (sym->st_value + sym_map->l_tls_offset
- + reloc->r_addend);
+ if (sym != NULL)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr = (sym->st_value + sym_map->l_tls_offset
+ + reloc->r_addend);
+ }
break;
#endif
default:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7cad09f90b24a38e5b013b7c7c9711aaa1593797
commit 7cad09f90b24a38e5b013b7c7c9711aaa1593797
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat Sep 16 00:46:19 2006 +0000
2006-09-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET.
* sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and
restore r19 before call to _exit.
* sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 7b1adeb..8d3132f 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,10 @@
+2006-09-15 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/nptl/tcb-offsets.sym: Define TID_THREAD_OFFSET.
+ * sysdeps/unix/sysv/linux/hppa/clone.S: Handle RESET_PID, and
+ restore r19 before call to _exit.
+ * sysdeps/unix/sysv/linux/hppa/nptl/clone.S: New file.
+
2006-09-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of
diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/sysdeps/hppa/nptl/tcb-offsets.sym
index 1c8aef4..f3cc826 100644
--- a/sysdeps/hppa/nptl/tcb-offsets.sym
+++ b/sysdeps/hppa/nptl/tcb-offsets.sym
@@ -15,4 +15,5 @@ MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
-- preceeds the thread pointer (which points to the dtv).
#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
PID_THREAD_OFFSET thread_offsetof (pid)
+TID_THREAD_OFFSET thread_offsetof (tid)
MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads)
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 2319895..6cb74b0 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -63,17 +63,20 @@
.text
ENTRY(__clone)
/* Prologue */
- stwm %r3, 64(%sp)
+ stwm %r4, 64(%sp)
stw %sp, -4(%sp)
+#ifdef PIC
stw %r19, -32(%sp)
+#endif
/* Sanity check arguments. */
comib,=,n 0, %arg0, .LerrorSanity /* no NULL function pointers */
comib,=,n 0, %arg1, .LerrorSanity /* no NULL stack pointers */
- /* Save the fn ptr and arg on the new stack. */
+ /* Save the function pointer, arg, and flags on the new stack. */
stwm %r26, 64(%r25)
stw %r23, -60(%r25)
+ stw %r24, -56(%r25)
/* Clone arguments are (int flags, void * child_stack) */
copy %r24, %r26 /* flags are first */
/* User stack pointer is in the correct register already */
@@ -85,7 +88,7 @@ ENTRY(__clone)
/* Save the PIC register. */
#ifdef PIC
- copy %r19, %r3 /* parent */
+ copy %r19, %r4 /* parent */
#endif
/* Do the system call */
@@ -96,6 +99,11 @@ ENTRY(__clone)
comclr,>>= %r1, %ret0, %r0 /* Note: unsigned compare. */
b,n .LerrorRest
+ /* Restore the PIC register. */
+#ifdef PIC
+ copy %r4, %r19 /* parent */
+#endif
+
comib,=,n 0, %ret0, .LthreadStart
/* Successful return from the parent
@@ -104,32 +112,46 @@ ENTRY(__clone)
ldw -84(%sp), %rp
bv %r0(%rp)
- ldwm -64(%sp), %r3
+ ldwm -64(%sp), %r4
.LerrorRest:
- /* Restore the PIC register on error */
-#ifdef PIC
- copy %r3, %r19 /* parent */
-#endif
/* Something bad happened -- no child created */
bl __syscall_error, %rp
sub %r0, %ret0, %arg0
ldw -84(%sp), %rp
/* Return after setting errno, ret0 is set to -1 by __syscall_error. */
bv %r0(%rp)
- ldwm -64(%sp), %r3
+ ldwm -64(%sp), %r4
.LerrorSanity:
/* Sanity checks failed, return -1, and set errno to EINVAL. */
bl __syscall_error, %rp
ldi EINVAL, %arg0
- /* Lazy, don't restore r19 */
ldw -84(%sp), %rp
bv %r0(%rp)
- ldwm -64(%sp), %r3
+ ldwm -64(%sp), %r4
.LthreadStart:
-
+#ifdef RESET_PID
+# define CLONE_VM_BIT 23 /* 0x00000100 */
+# define CLONE_THREAD_BIT 15 /* 0x00010000 */
+ /* Load original clone flags.
+ If CLONE_THREAD was passed, don't reset the PID/TID.
+ If CLONE_VM was passed, we need to store -1 to PID/TID.
+ If CLONE_VM and CLONE_THREAD were not set store the result
+ of getpid to PID/TID. */
+ ldw -56(%sp), %r26
+ bb,<,n %r26, CLONE_THREAD_BIT, 1f
+ bb,< %r26, CLONE_VM_BIT, 2f
+ ldi -1, %ret0
+ ble 0x100(%sr2, %r0)
+ ldi __NR_getpid, %r20
+2:
+ mfctl %cr27, %r26
+ stw %ret0, PID_THREAD_OFFSET(%r26)
+ stw %ret0, TID_THREAD_OFFSET(%r26)
+1:
+#endif
/* Load up the arguments. */
ldw -60(%sp), %arg0
ldw -64(%sp), %r22
@@ -137,13 +159,20 @@ ENTRY(__clone)
/* $$dyncall fixes childs PIC register */
/* Call the user's function */
+#ifdef PIC
+ copy %r19, %r4
+#endif
bl $$dyncall, %r31
copy %r31, %rp
-
+#ifdef PIC
+ copy %r4, %r19
+#endif
+ /* The call to _exit needs saved r19. */
bl _exit, %rp
copy %ret0, %arg0
- /* We should not return from _exit. */
+ /* We should not return from _exit.
+ We do not restore r4, or the stack state. */
iitlbp %r0, (%sr0, %r0)
PSEUDO_END(__clone)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/clone.S b/sysdeps/unix/sysv/linux/hppa/nptl/clone.S
new file mode 100644
index 0000000..23750b3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/clone.S
@@ -0,0 +1,3 @@
+#define RESET_PID
+#include <tcb-offsets.h>
+#include "../clone.S"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66d4074acdee6e3d38fee8caa38bd1260ab5dd9f
commit 66d4074acdee6e3d38fee8caa38bd1260ab5dd9f
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Sep 13 22:10:05 2006 +0000
Checkin ChangeLog.hppa
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index b0ccb98..7b1adeb 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,11 @@
+2006-09-13 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of
+ _dl_fini_plabel.
+ * sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of
+ __libc_start_main. Comment the order of arguments at entry and
+ those to __libc_start_main.
+
2006-09-07 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2625a1fb08889f3b4f02a8e3139cf7a6947604c0
commit 2625a1fb08889f3b4f02a8e3139cf7a6947604c0
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Sep 13 21:56:09 2006 +0000
2006-09-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of
_dl_fini_plabel.
* sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of
__libc_start_main. Comment the order of arguments at entry and
those to __libc_start_main.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 67536c3..0854295 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -447,8 +447,10 @@ asm ( \
" ldw -40(%sp),%r25\n" \
" ldw -44(%sp),%r24\n" \
\
- /* _dl_fini does have a PLT slot now. I don't know how to get \
- to it though, so this hack will remain. */ \
+ /* _dl_fini is a local function in the loader, so we construct \
+ a false OPD here and pass this to the application. */ \
+ /* FIXME: Should be able to use P%, and LR RR to have the \
+ the linker construct a proper OPD. */ \
" .section .data\n" \
"__dl_fini_plabel:\n" \
" .word _dl_fini\n" \
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index 94edeaa..216b14d 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -40,8 +40,9 @@
.import __libc_csu_fini, code
.import __libc_csu_init, code
- /* Have the linker create plabel words
- so we get PLABEL32 relocs and not 21/14 */
+ /* Have the linker create plabel words so we get PLABEL32
+ relocs and not 21/14. The use of 21/14 relocs is only
+ supported in the latest dynamic linker. */
.section .rodata
.align 4
.Lpmain:
@@ -59,20 +60,45 @@
.export _start, ENTRY
.type _start,@function
_start:
+ /* At entry to the function we have:
+
+ r26 - Unused
+ r25 - argc
+ r24 - argv
+ r23 - False _dl_fini plabel address
+
+ This function is called from the lower half of RTLD_START.
+
+ The call to __libc_start_main expects:
+
+ 1. r26 - Application main
+ 2. r25 - argc
+ 3. r24 - argv
+ 4. r23 - __libc_csu_init
+ 5. sp-52 - __libc_csu_fini
+ 6. sp-56 - rtld_fini
+ 7. sp-60 - stackend */
.proc
.callinfo
-
- /* Expand the stack to store the 5th through 7th args */
+ /* Clear previous-sp. */
+ stw %r0, -4(%sp)
+ /* Setup the stack and frame. */
+ stw %rp, -20(%sp)
ldo 64(%sp), %sp
- /* TODO: Follow ABI? Place more things on the stack here... */
+ stw %sp, -4(%sp)
+ stw %r19, -32(%sp)
+
+ /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
+ /* void (*rtld_fini) (void) (6th argument) */
+ stw %r23, -56(%sp)
+ /* Need to setup 1, 4, 5, and 7th arguments */
#if SHARED
/* load main (1st argument) */
addil LR'.Lpmain, %r19
ldw RR'.Lpmain(%r1), %r26
ldw 0(%r26),%r26
- /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
/* void (*init) (void) (4th argument) */
addil LR'.Lp__libc_csu_init, %r19
ldw RR'.Lp__libc_csu_init(%r1), %r23
@@ -85,7 +111,6 @@ _start:
/* load main (1st argument) */
ldil LR'.Lpmain, %r26
ldw RR'.Lpmain(%r26), %r26
- /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
/* void (*init) (void) (4th argument) */
ldil LR'.Lp__libc_csu_init, %r23
ldw RR'.Lp__libc_csu_init(%r23), %r23
@@ -95,8 +120,6 @@ _start:
#endif
/* Store 5th argument */
stw %r22, -52(%sp)
- /* void (*rtld_fini) (void) (6th argument) */
- stw %r23, -56(%sp)
/* void *stack_end (7th argument) */
stw %sp, -60(%sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0daa050021a9dcc212d47e9ecc584f0610c1b388
commit 0daa050021a9dcc212d47e9ecc584f0610c1b388
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Sep 7 16:34:43 2006 +0000
2006-09-07 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove
lvalue cast.
* sysdeps/hppa/dl-trampoline.S (_dl_fixup): Correct stack usage.
(_dl_runtime_profile): LA fixups.
* sysdeps/unix/sysv/linux/hppa/clone.S: Correct stack usage. Return
-1 on error. Use branch and link for error handler funciton.
* sysdeps/unix/sysv/linux/hppa/sysdep.h: Correct stack usage.
Avoid register shuffling.
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h (ASM_EAGAIN): Define
as -EAGAIN.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to
match required standards.
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
(lll_futex_wait): Return __ret.
(lll_futex_timed_wait): Likewise.
(lll_futex_wake): Likewise.
(lll_futex_requeue): Likewise.
* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Correct stack
usage and adjust error return.
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Adjust
stack usage for gdb, and avoid extra register loads.
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Copy
nptl/sysdeps/pthread/unwind-forcedunwind.c.
(LIBGCC_SO): Define and use.
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Copy
nptl/sysdeps/pthread/unwind-resume.c.
(LIBGCC_SO): Define and use.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 1f90c8d..b0ccb98 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,33 @@
+2006-09-07 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove
+ lvalue cast.
+ * sysdeps/hppa/dl-trampoline.S (_dl_fixup): Correct stack usage.
+ (_dl_runtime_profile): LA fixups.
+ * sysdeps/unix/sysv/linux/hppa/clone.S: Correct stack usage. Return
+ -1 on error. Use branch and link for error handler funciton.
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Correct stack usage.
+ Avoid register shuffling.
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h (ASM_EAGAIN): Define
+ as -EAGAIN.
+ * sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to
+ match required standards.
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+ (lll_futex_wait): Return __ret.
+ (lll_futex_timed_wait): Likewise.
+ (lll_futex_wake): Likewise.
+ (lll_futex_requeue): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Correct stack
+ usage and adjust error return.
+ * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Adjust
+ stack usage for gdb, and avoid extra register loads.
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Copy
+ nptl/sysdeps/pthread/unwind-forcedunwind.c.
+ (LIBGCC_SO): Define and use.
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Copy
+ nptl/sysdeps/pthread/unwind-resume.c.
+ (LIBGCC_SO): Define and use.
+
2006-08-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI,
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index dd5a281..67536c3 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -123,12 +123,13 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, struct fdesc value)
{
+ volatile Elf32_Addr *rfdesc = reloc_addr;
/* map is the link_map for the caller, t is the link_map for the object
being called */
- reloc_addr[1] = value.gp;
+ rfdesc[1] = value.gp;
/* Need to ensure that the gp is visible before the code
entry point is updated */
- ((volatile Elf32_Addr *) reloc_addr)[0] = value.ip;
+ rfdesc[0] = value.ip;
return value;
}
diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S
index c476138..e0d3b9b 100644
--- a/sysdeps/hppa/dl-trampoline.S
+++ b/sysdeps/hppa/dl-trampoline.S
@@ -1,5 +1,5 @@
/* PLT trampolines. hppa version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,9 @@
/* This code gets called via the .plt stub, and is used in
dl-runtime.c to call the `_dl_fixup' function and then redirect
- to the address it returns. `_dl_fixup' takes two
- arguments, however `_dl_profile_fixup' takes a number of
- parameters for use with library auditing (LA).
+ to the address it returns. `_dl_fixup' takes two arguments, however
+ `_dl_profile_fixup' takes a number of parameters for use with
+ library auditing (LA).
WARNING: This template is also used by gcc's __cffc, and expects
that the "bl" for _dl_runtime_resolve exist at a particular offset.
@@ -34,43 +34,46 @@
Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
- /* FAKE bl to provide gcc's __cffc with fixup loc. */
+ /* RELOCATION MARKER: bl to provide gcc's __cffc with fixup loc. */
.text
+ /* THIS CODE DOES NOT EXECUTE */
bl _dl_fixup, %r2
.text
- .align 4
.global _dl_runtime_resolve
.type _dl_runtime_resolve,@function
+ cfi_startproc
+ .align 4
_dl_runtime_resolve:
.PROC
.CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
.ENTRY
/* SAVE_RP says we do */
- stw %rp, -20(%sp)
+ stw %rp, -20(%sp)
/* Save static link register */
stw %r29,-16(%sp)
- /* Save argument registers in the call stack frame. */
+ /* Save argument registers */
stw %r26,-36(%sp)
stw %r25,-40(%sp)
stw %r24,-44(%sp)
stw %r23,-48(%sp)
/* Build a call frame, and save structure pointer. */
- copy %sp, %r26 /* Copy previous sp */
+ copy %sp, %r1 /* Copy previous sp */
/* Save function result address (on entry) */
stwm %r28,128(%sp)
-
- /* Save floating point argument registers */
- ldo -56(%sp),%r26
- fstd,ma %fr4,-8(%r26)
- fstd,ma %fr5,-8(%r26)
- fstd,ma %fr6,-8(%r26)
- fstd %fr7,0(%r26)
-
/* Fillin some frame info to follow ABI */
+ stw %r1,-4(%sp) /* Previous sp */
stw %r21,-32(%sp) /* PIC register value */
- stw %r26,-4(%sp) /* Previous sp */
+
+ /* Save input floating point registers. This must be done
+ in the new frame since the previous frame doesn't have
+ enough space */
+ ldo -56(%sp),%r1
+ fstd,ma %fr4,-8(%r1)
+ fstd,ma %fr5,-8(%r1)
+ fstd,ma %fr6,-8(%r1)
+ fstd,ma %fr7,-8(%r1)
/* Set up args to fixup func, needs only two arguments */
ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
@@ -81,15 +84,15 @@ _dl_runtime_resolve:
copy %r21,%r19 /* set fixup func ltp */
/* Load up the returned func descriptor */
- copy %ret0, %r22
- copy %ret1, %r19
+ copy %r28, %r22
+ copy %r29, %r19
/* Reload arguments fp args */
- ldo -80(%sp),%r26
- fldd,ma 8(%r26),%fr7
- fldd,ma 8(%r26),%fr6
- fldd,ma 8(%r26),%fr5
- fldd 0(%r26),%fr4
+ ldo -56(%sp),%r1
+ fldd,ma -8(%r1),%fr4
+ fldd,ma -8(%r1),%fr5
+ fldd,ma -8(%r1),%fr6
+ fldd,ma -8(%r1),%fr7
/* Adjust sp, and restore function result address*/
ldwm -128(%sp),%r28
@@ -107,91 +110,179 @@ _dl_runtime_resolve:
ldw -20(%sp),%rp
.EXIT
.PROCEND
+ cfi_endproc
.size _dl_runtime_resolve, . - _dl_runtime_resolve
-
- /* FIXME:
- Need to largely rewrite the bottom half of
- this code in order to save and restore the
- LA struct from the stack along with
- interpreted parameters.
- */
.text
- .align 4
.global _dl_runtime_profile
.type _dl_runtime_profile,@function
+ cfi_startproc
+ .align 4
_dl_runtime_profile:
.PROC
- .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
+ .CALLINFO FRAME=192,CALLS,SAVE_RP,ENTRY_GR=3
.ENTRY
/* SAVE_RP says we do */
- stw %rp, -20(%sp)
-
+ stw %rp, -20(%sp)
/* Save static link register */
stw %r29,-16(%sp)
- /* Save argument registers in the call stack frame. */
- stw %r26,-36(%sp)
- stw %r25,-40(%sp)
- stw %r24,-44(%sp)
- stw %r23,-48(%sp)
/* Build a call frame, and save structure pointer. */
- copy %sp, %r26 /* Copy previous sp */
+ copy %sp, %r1 /* Copy previous sp */
/* Save function result address (on entry) */
- stwm %r28,128(%sp)
-
- /* Save floating point argument registers */
- ldo -56(%sp),%r26
- fstd,ma %fr4,-8(%r26)
- fstd,ma %fr5,-8(%r26)
- fstd,ma %fr6,-8(%r26)
- fstd %fr7,0(%r26)
-
+ stwm %r28,192(%sp)
/* Fillin some frame info to follow ABI */
+ stw %r1,-4(%sp) /* Previous sp */
stw %r21,-32(%sp) /* PIC register value */
- stw %r26,-4(%sp) /* Previous sp */
+
+ /* Create La_hppa_retval */
+ /* -140, lrv_r28
+ -136, lrv_r29
+ -132, 4 byte pad
+ -128, lr_fr4 (8 bytes) */
+
+ /* Create save space for _dl_profile_fixup arguments
+ -120, Saved reloc offset
+ -116, Saved struct link_map
+ -112, *framesizep */
+
+ /* Create La_hppa_regs */
+ /* 32-bit registers */
+ stw %r26,-108(%sp)
+ stw %r25,-104(%sp)
+ stw %r24,-100(%sp)
+ stw %r23,-96(%sp)
+ /* -92, 4 byte pad */
+ /* 64-bit floating point registers */
+ ldo -88(%sp),%r1
+ fstd,ma %fr4,8(%r1)
+ fstd,ma %fr5,8(%r1)
+ fstd,ma %fr6,8(%r1)
+ fstd,ma %fr7,8(%r1)
+ /* 32-bit stack pointer and return register */
+ stw %sp,-56(%sp)
+ stw %r2,-52(%sp)
+
/* Set up args to fixup func, needs five arguments */
ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
+ stw %r26,-116(%sp) /* Save struct link_map */
copy %r19,%r25 /* (2) reloc offset */
+ stw %r25,-120(%sp) /* Save reloc offset */
copy %rp,%r24 /* (3) profile_fixup needs rp */
- copy %r0,%r23 /* (4) regs */
- ldo -56(%sp), %r1
+ ldo -56(%sp),%r23 /* (4) La_hppa_regs */
+ ldo -112(%sp), %r1
stw %r1, -52(%sp) /* (5) long int *framesizep */
/* Call the real address resolver. */
bl _dl_profile_fixup,%rp
copy %r21,%r19 /* set fixup func ltp */
- /* Load up the returned func descriptor */
- copy %ret0, %r22
- copy %ret1, %r19
-
- /* Reload arguments fp args */
- ldo -80(%sp),%r26
- fldd,ma 8(%r26),%fr7
- fldd,ma 8(%r26),%fr6
- fldd,ma 8(%r26),%fr5
- fldd 0(%r26),%fr4
+ /* Load up the returned function descriptor */
+ copy %r28, %r22
+ copy %r29, %r19
+
+ /* Restore gr/fr/sp/rp */
+ ldw -108(%sp),%r26
+ ldw -104(%sp),%r25
+ ldw -100(%sp),%r24
+ ldw -96(%sp),%r23
+ /* -92, 4 byte pad, skip */
+ ldo -88(%sp),%r1
+ fldd,ma 8(%r1),%fr4
+ fldd,ma 8(%r1),%fr5
+ fldd,ma 8(%r1),%fr6
+ fldd,ma 8(%r1),%fr7
+ ldw -52(%sp),%rp
+
+ /* Reload static link register -(192+16) without adjusting stack */
+ ldw -208(%sp),%r29
+
+ /* *framesizep is >= 0 if we have to run pltexit */
+ ldw -112(%sp),%r28
+ cmpb,>>=,N %r0,%r28,L(cpe)
/* Adjust sp, and restore function result address*/
- ldwm -128(%sp),%r28
-
- /* Reload static link register */
- ldw -16(%sp),%r29
- /* Reload general args */
- ldw -36(%sp),%r26
- ldw -40(%sp),%r25
- ldw -44(%sp),%r24
- ldw -48(%sp),%r23
-
+ ldwm -192(%sp),%r28
/* Jump to new function, but return to previous function */
bv %r0(%r22)
ldw -20(%sp),%rp
+ /* NO RETURN */
+
+L(nf):
+ /* Call the returned function descriptor */
+ bv %r0(%r22)
+ nop
+ b,n L(cont)
+
+L(cpe):
+ /* We are going to call the resolved function, but we have a
+ stack frame in the middle. We use the value of framesize to
+ guess how much extra frame we need, and how much frame to
+ copy forward. */
+
+ /* Round to nearest multiple of 64 */
+ addi 63, %r28, %r28
+ depi 0, 27, 6, %r28
+
+ /* Calcualte start of stack copy */
+ ldo -192(%sp),%r2
+
+ /* Increate the stack by *framesizep */
+ copy %sp, %r1
+ add %sp, %r28, %sp
+ /* Save stack pointer */
+ stw %r1, -4(%sp)
+
+ /* Single byte copy of prevous stack onto newly allocated stack */
+1: ldb %r28(%r2), %r1
+ add %r28, %sp, %r26
+ stb %r1, 0(%r26)
+ addi,< -1,%r28,%r28
+ b,n 1b
+
+ /* Retore r28 and r27 and r2 already points at -192(%sp) */
+ ldw 0(%r2),%r28
+ ldw 84(%r2),%r26
+
+ /* Calculate address of L(cont) */
+ b,l L(nf),%r2
+ depwi 0,31,2,%r2
+L(cont):
+ /* Undo fake stack */
+ ldw -4(%sp),%r1
+ copy %r1, %sp
+
+ /* Arguments to _dl_call_pltexit */
+ ldw -116(%sp), %r26 /* (1) got[1] == struct link_map */
+ ldw -120(%sp), %r25 /* (2) reloc offsets */
+ ldo -56(%sp), %r24 /* (3) *La_hppa_regs */
+ ldo -124(%sp), %r23 /* (4) *La_hppa_retval */
+
+ /* Fill *La_hppa_retval */
+ stw %r28,-140(%sp)
+ stw %r29,-136(%sp)
+ ldo -128(%sp), %r1
+ fstd %fr4,0(%r1)
+
+ /* Call _dl_call_pltexit */
+ bl _dl_call_pltexit,%rp
+ nop
+
+ /* Restore *La_hppa_retval */
+ ldw -140(%sp), %r28
+ ldw -136(%sp), %r29
+ ldo -128(%sp), %r1
+ fldd 0(%r1), %fr4
+
+ /* Unwind the stack */
+ ldo 192(%sp),%sp
+ /* Retore callers rp */
+ ldw -20(%sp),%rp
+ /* Return */
+ bv,n 0(%r2)
.EXIT
.PROCEND
.size _dl_runtime_profile, . - _dl_runtime_profile
-
-
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
index 36a5407..ee381dc 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -60,7 +60,7 @@ typedef uintmax_t uatomic_max_t;
#define LWS_CAS 0x0
/* Note r31 is the link register */
#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
-#define ASM_EAGAIN "11"
+#define ASM_EAGAIN -EAGAIN
#if __ASSUME_LWS_CAS
/* The only basic operation needed is compare and exchange. */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index 54531ec..f065322 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -21,12 +21,12 @@
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
-/* these are basically taken from the kernel definitions */
+/* These are taken from the kernel definitions. */
-#define PROT_READ 0x1 /* page can be read */
-#define PROT_WRITE 0x2 /* page can be written */
-#define PROT_EXEC 0x4 /* page can be executed */
-#define PROT_NONE 0x0 /* page can not be accessed */
+#define PROT_READ 0x1 /* Page can be read */
+#define PROT_WRITE 0x2 /* Page can be written */
+#define PROT_EXEC 0x4 /* Page can be executed */
+#define PROT_NONE 0x0 /* Page can not be accessed */
#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
growsdown vma (mprotect only). */
#define PROT_GROWSUP 0x02000000 /* Extend change to start of
@@ -34,33 +34,53 @@
#define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */
-#define MAP_TYPE 0x03 /* Mask for type of mapping */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x03 /* Mask for type of mapping */
+#endif
+
+/* Other flags. */
#define MAP_FIXED 0x04 /* Interpret addr exactly */
-#define MAP_ANONYMOUS 0x10 /* don't use a file */
+#ifdef __USE_MISC
+# define MAP_FILE 0x0
+# define MAP_ANONYMOUS 0x10 /* Don't use a file */
+# define MAP_ANON MAP_ANONYMOUS
+# define MAP_VARIABLE 0
+#endif
-#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
-#define MAP_LOCKED 0x2000 /* pages are locked */
-#define MAP_NORESERVE 0x4000 /* don't check for reservations */
-#define MAP_GROWSDOWN 0x8000 /* stack-like segment */
-#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
-#define MAP_NONBLOCK 0x20000 /* do not block on IO */
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable */
+# define MAP_LOCKED 0x2000 /* Pages are locked */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations */
+# define MAP_GROWSDOWN 0x8000 /* Stack-like segment */
+# define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables */
+# define MAP_NONBLOCK 0x20000 /* Do not block on IO */
+#endif
-#define MS_SYNC 1 /* synchronous memory sync */
-#define MS_ASYNC 2 /* sync memory asynchronously */
-#define MS_INVALIDATE 4 /* invalidate the caches */
+/* Flags to "msync" */
+#define MS_SYNC 1 /* Synchronous memory sync */
+#define MS_ASYNC 2 /* Sync memory asynchronously */
+#define MS_INVALIDATE 4 /* Invalidate the caches */
-#define MCL_CURRENT 1 /* lock all current mappings */
-#define MCL_FUTURE 2 /* lock all future mappings */
+/* Flags to "mlockall" */
+#define MCL_CURRENT 1 /* Lock all current mappings */
+#define MCL_FUTURE 2 /* Lock all future mappings */
-/* Advice to "madvise" */
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
+#endif
+
+/* Advice to "madvise" */
#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* no further special treatment */
-# define MADV_RANDOM 1 /* expect random page references */
-# define MADV_SEQUENTIAL 2 /* expect sequential page references */
-# define MADV_WILLNEED 3 /* will need these pages */
-# define MADV_DONTNEED 4 /* dont need these pages */
-# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
+# define MADV_NORMAL 0 /* No further special treatment */
+# define MADV_RANDOM 1 /* Expect random page references */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references */
+# define MADV_WILLNEED 3 /* Will need these pages */
+# define MADV_DONTNEED 4 /* Dont need these pages */
+# define MADV_SPACEAVAIL 5 /* Insure that resources are reserved */
# define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
# define MADV_VPS_INHERIT 7 /* Inherit parents page size */
# define MADV_REMOVE 9 /* Remove these pages and resources. */
@@ -78,15 +98,11 @@
#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
-/* compatibility flags */
-#define MAP_ANON MAP_ANONYMOUS
-#define MAP_FILE 0
-#define MAP_VARIABLE 0
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
#endif
-
-
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 1884518..2319895 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -27,11 +27,19 @@
#include <bits/errno.h>
/* Non-thread code calls __clone with the following parameters:
- int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg)
+ int clone(int (*fn)(void *arg),
+ void *child_stack,
+ int flags,
+ void *arg)
NPTL Code will call __clone with the following parameters:
- int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
- int *parent_tidptr, struct user_desc *newtls, int *child_pidptr)
+ int clone(int (*fn)(void *arg),
+ void *child_stack,
+ int flags,
+ void *arg,
+ int *parent_tidptr,
+ struct user_desc *newtls,
+ int *child_pidptr)
The code should not mangle the extra input registers.
Syscall expects: Input to __clone:
@@ -43,32 +51,37 @@
r23 - struct user_desc newtls pointer. (stack - 56)
r22 - child tid pointer. (stack - 60)
r20 - clone syscall number (constant)
+
+ Return:
+
+ On success the thread ID of the child process is returend in
+ the callers context.
+ On error return -1, and set errno to the value returned by
+ the syscall.
*/
.text
ENTRY(__clone)
+ /* Prologue */
+ stwm %r3, 64(%sp)
+ stw %sp, -4(%sp)
+ stw %r19, -32(%sp)
/* Sanity check arguments. */
- ldi -EINVAL,%ret0
- comib,=,n 0,%arg0,.Lerror /* no NULL function pointers */
- comib,=,n 0,%arg1,.Lerror /* no NULL stack pointers */
+ comib,=,n 0, %arg0, .LerrorSanity /* no NULL function pointers */
+ comib,=,n 0, %arg1, .LerrorSanity /* no NULL stack pointers */
/* Save the fn ptr and arg on the new stack. */
- stwm %r26,64(%r25)
- stw %r23,-60(%r25)
+ stwm %r26, 64(%r25)
+ stw %r23, -60(%r25)
/* Clone arguments are (int flags, void * child_stack) */
- copy %r24,%r26 /* flags are first */
+ copy %r24, %r26 /* flags are first */
/* User stack pointer is in the correct register already */
/* Load args from stack... */
- ldw -52(%sp), %r24 /* Load parent_tidptr */
- ldw -56(%sp), %r23 /* Load newtls */
- ldw -60(%sp), %r22 /* Load child_tidptr */
-
- /* Create frame to get r3 free */
- copy %sp, %r21
- stwm %r3, 64(%sp)
- stw %r21, -4(%sp)
+ ldw -116(%sp), %r24 /* Load parent_tidptr */
+ ldw -120(%sp), %r23 /* Load newtls */
+ ldw -124(%sp), %r22 /* Load child_tidptr */
/* Save the PIC register. */
#ifdef PIC
@@ -76,19 +89,20 @@ ENTRY(__clone)
#endif
/* Do the system call */
- ble 0x100(%sr2,%r0)
- ldi __NR_clone,%r20
+ ble 0x100(%sr2, %r0)
+ ldi __NR_clone, %r20
- ldi -4096,%r1
- comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
+ ldi -4096, %r1
+ comclr,>>= %r1, %ret0, %r0 /* Note: unsigned compare. */
b,n .LerrorRest
- comib,=,n 0,%ret0,thread_start
+ comib,=,n 0, %ret0, .LthreadStart
/* Successful return from the parent
No need to restore the PIC register,
since we return immediately. */
+ ldw -84(%sp), %rp
bv %r0(%rp)
ldwm -64(%sp), %r3
@@ -97,36 +111,40 @@ ENTRY(__clone)
#ifdef PIC
copy %r3, %r19 /* parent */
#endif
-
/* Something bad happened -- no child created */
-.Lerror:
-
- /* Set errno, save ret0 so we return with that value. */
- copy %ret0, %r3
- b __syscall_error
- sub %r0,%ret0,%arg0
- copy %r3, %ret0
- /* Return after setting errno, and restoring ret0 */
+ bl __syscall_error, %rp
+ sub %r0, %ret0, %arg0
+ ldw -84(%sp), %rp
+ /* Return after setting errno, ret0 is set to -1 by __syscall_error. */
+ bv %r0(%rp)
+ ldwm -64(%sp), %r3
+
+.LerrorSanity:
+ /* Sanity checks failed, return -1, and set errno to EINVAL. */
+ bl __syscall_error, %rp
+ ldi EINVAL, %arg0
+ /* Lazy, don't restore r19 */
+ ldw -84(%sp), %rp
bv %r0(%rp)
ldwm -64(%sp), %r3
-thread_start:
+.LthreadStart:
/* Load up the arguments. */
- ldw -60(%sr0, %sp),%arg0
- ldw -64(%sr0, %sp),%r22
+ ldw -60(%sp), %arg0
+ ldw -64(%sp), %r22
/* $$dyncall fixes childs PIC register */
/* Call the user's function */
- bl $$dyncall,%r31
- copy %r31,%rp
+ bl $$dyncall, %r31
+ copy %r31, %rp
- bl _exit,%rp
- copy %ret0,%arg0
+ bl _exit, %rp
+ copy %ret0, %arg0
- /* Die horribly. */
- iitlbp %r0,(%sr0,%r0)
+ /* We should not return from _exit. */
+ iitlbp %r0, (%sr0, %r0)
PSEUDO_END(__clone)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index a5412bf..3b2b0f1 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -25,34 +25,10 @@
#include <sysdep.h>
#include <atomic.h>
-#if 0
/* The hppa only has one atomic read and modify memory operation,
- load and clear, so hppa spinlocks must use zero to signify that
- someone is holding the lock. The address used for the ldcw
- semaphore must be 16-byte aligned. */
-#define __ldcw(a) \
-({ \
- unsigned int __ret; \
- __asm__ __volatile__("ldcw 0(%1),%0" \
- : "=r" (__ret) : "r" (a) : "memory"); \
- __ret; \
-})
-
-/* Because malloc only guarantees 8-byte alignment for malloc'd data,
- and GCC only guarantees 8-byte alignment for stack locals, we can't
- be assured of 16-byte alignment for atomic lock data even if we
- specify "__attribute ((aligned(16)))" in the type declaration. So,
- we use a struct containing an array of four ints for the atomic lock
- type and dynamically select the 16-byte aligned int from the array
- for the semaphore. */
-#define __PA_LDCW_ALIGNMENT 16
-#define __ldcw_align(a) ({ \
- volatile unsigned int __ret = (unsigned int) a; \
- if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
- __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
- (unsigned int *) __ret; \
-})
-#endif
+ load and clear, so hppa uses a kernel helper routine to implement
+ compare_and_exchange. See atomic.h for the userspace calling
+ sequence. */
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@@ -64,11 +40,7 @@
#define FUTEX_UNLOCK_PI 7
#define FUTEX_TRYLOCK_PI 8
-/* Initializer for compatibility lock. */
-#if 0
-#define LLL_INITIALIZER_NOT_ZERO
-#define LLL_MUTEX_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
-#endif
+/* Initialize locks to zero. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -82,7 +54,7 @@ typedef int lll_lock_t;
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAIT, (val), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ __ret; \
})
#define lll_futex_timed_wait(futexp, val, timespec) \
@@ -91,7 +63,7 @@ typedef int lll_lock_t;
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAIT, (val), (timespec)); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ __ret; \
})
#define lll_futex_wake(futexp, nr) \
@@ -100,7 +72,7 @@ typedef int lll_lock_t;
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAKE, (nr), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ __ret; \
})
#define lll_robust_mutex_dead(futexv) \
@@ -120,7 +92,7 @@ typedef int lll_lock_t;
__ret = INTERNAL_SYSCALL (futex, __err, 6, \
(futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
(nr_move), (mutex), (val)); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
+ __ret; \
})
/* Returns non-zero if error happened, zero if success. */
@@ -253,25 +225,12 @@ __lll_mutex_unlock_force (lll_lock_t *futex)
}
#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
-
-static inline int __attribute__ ((always_inline))
-__lll_mutex_islocked (lll_lock_t *futex)
-{
- return (*futex != 0);
-}
-#define lll_mutex_islocked(futex) __lll_mutex_islocked(&(futex))
-
+#define lll_mutex_islocked(futex) \
+ (futex != 0)
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Initializers for lock. */
-#if 0
-#define LLL_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
-#define LLL_LOCK_INITIALIZER_CONST { { 1, 1, 1, 1 } }
-#define LLL_LOCK_INITIALIZER_LOCKED ((__atomic_lock_t){ { 0, 0, 0, 0 } })
-#endif
-
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_CONST (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
index a44e785..83a70b7 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
@@ -50,6 +50,10 @@
/* r26, r25, r24, r23 are free since vfork has no arguments */
ENTRY(__vfork)
+ /* Prologue */
+ stwm %r3, 64(%sp)
+ stw %sp, -4(%sp)
+ stw %r19, -32(%sp)
/* Save the PIC register. */
#ifdef PIC
@@ -72,9 +76,12 @@ ENTRY(__vfork)
b,n .Lerror
/* Return, no need to restore the PIC register. */
- bv,n %r0(%rp)
+ ldw -84(%sp), %rp
+ bv %r0(%rp)
+ ldwm -64(%sp), %r3
.Lerror:
+ sub %r0,%ret0,%r3
SYSCALL_ERROR_HANDLER
/* Restore the PIC register (in delay slot) on error */
#ifdef PIC
@@ -82,8 +89,11 @@ ENTRY(__vfork)
#else
nop
#endif
- sub %r0,%ret0,%arg0
- /* Return error */
+ /* Write syscall return into errno location */
+ stw %r3, 0(%ret0)
+ ldw -84(%sp), %rp
+ bv %r0(%rp)
+ ldwm -64(%sp), %r3
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
index 748fe69..2d3de3e 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
@@ -63,11 +63,9 @@
# define PSEUDO(name, syscall_name, args) \
ENTRY (name) \
DOARGS_##args ASM_LINE_SEP \
- copy TREG, %r1 ASM_LINE_SEP \
- copy %sp, TREG ASM_LINE_SEP \
- stwm %r1, 64(%sp) ASM_LINE_SEP \
- stw %rp, -20(%sp) ASM_LINE_SEP \
- stw TREG, -4(%sp) ASM_LINE_SEP \
+ stwm TREG, 64(%sp) ASM_LINE_SEP \
+ stw %sp, -4(%sp) ASM_LINE_SEP \
+ stw %r19, -32(%sp) ASM_LINE_SEP \
/* Done setting up frame, continue... */ ASM_LINE_SEP \
SINGLE_THREAD_P ASM_LINE_SEP \
cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
@@ -91,7 +89,7 @@ L(unthreaded): ASM_LINE_SEP \
stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
b L(pre_end) ASM_LINE_SEP \
/* return -1 as error */ ASM_LINE_SEP \
- ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \
+ ldi -1, %ret0 /* delay */ ASM_LINE_SEP \
L(pseudo_cancel): ASM_LINE_SEP \
PUSHARGS_##args /* Save args */ ASM_LINE_SEP \
/* Save r19 into TREG */ ASM_LINE_SEP \
@@ -125,13 +123,13 @@ L(pseudo_cancel): ASM_LINE_SEP \
/* store into errno location */ ASM_LINE_SEP \
stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
/* return -1 */ ASM_LINE_SEP \
- ldo -1(%r0), %ret0 ASM_LINE_SEP \
+ ldi -1, %ret0 ASM_LINE_SEP \
L(pre_end): ASM_LINE_SEP \
- /* Restore rp before exit */ ASM_LINE_SEP \
- ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP \
/* Undo frame */ ASM_LINE_SEP \
ldwm -64(%sp),TREG ASM_LINE_SEP \
- /* No need to LOAD_PIC */ ASM_LINE_SEP
+ /* Restore rp before exit */ ASM_LINE_SEP \
+ ldw -20(%sp), %rp ASM_LINE_SEP
/* Save arguments into our frame */
# define PUSHARGS_0 /* nothing to do */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
index c8142cb..8666bbb 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,100 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define LIBGCC_S_SO "libgcc_s.so.2"
-#include <sysdeps/pthread/unwind-forcedunwind.c>
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+#include <pthreadP.h>
+#define LIBGCC_S_SO "libgcc_s.so.4"
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
+ struct _Unwind_Context *);
+static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
+
+#ifndef LIBGCC_S_SO
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#endif
+
+void
+__attribute_noinline__
+pthread_cancel_init (void)
+{
+ void *resume, *personality, *forcedunwind, *getcfa;
+ void *handle;
+
+ if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ {
+ /* Force gcc to reload all values. */
+ asm volatile ("" ::: "memory");
+ return;
+ }
+
+ handle = __libc_dlopen (LIBGCC_S_SO);
+
+ if (handle == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL
+ || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind"))
+ == NULL
+ || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
+#ifdef ARCH_CANCEL_INIT
+ || ARCH_CANCEL_INIT (handle)
+#endif
+ )
+ __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+ libgcc_s_forcedunwind = forcedunwind;
+ /* Make sure libgcc_s_getcfa is written last. Otherwise,
+ pthread_cancel_init might return early even when the pointer the
+ caller is interested in is not initialized yet. */
+ atomic_write_barrier ();
+ libgcc_s_getcfa = getcfa;
+}
+
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ pthread_cancel_init ();
+
+ libgcc_s_resume (exc);
+}
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (int version, _Unwind_Action actions,
+ _Unwind_Exception_Class exception_class,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ pthread_cancel_init ();
+
+ return libgcc_s_personality (version, actions, exception_class,
+ ue_header, context);
+}
+
+_Unwind_Reason_Code
+_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
+ void *stop_argument)
+{
+ if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
+ pthread_cancel_init ();
+
+ return libgcc_s_forcedunwind (exc, stop, stop_argument);
+}
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
+ pthread_cancel_init ();
+
+ return libgcc_s_getcfa (context);
+}
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
index 6d1da85..a7485e9 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,55 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define LIBGCC_S_SO "libgcc_s.so.2"
-#include <sysdeps/pthread/unwind-resume.c>
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+#define LIBGCC_S_SO "libgcc_s.so.4"
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
+ struct _Unwind_Context *);
+
+#ifndef LIBGCC_S_SO
+#error LIBGCC_S_SO
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#endif
+
+static void
+init (void)
+{
+ void *resume, *personality;
+ void *handle;
+
+ handle = __libc_dlopen (LIBGCC_S_SO);
+
+ if (handle == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
+ __libc_fatal ("libgcc_s.so must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+}
+
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ init ();
+ libgcc_s_resume (exc);
+}
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (int version, _Unwind_Action actions,
+ _Unwind_Exception_Class exception_class,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ init ();
+ return libgcc_s_personality (version, actions, exception_class,
+ ue_header, context);
+}
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index b302d37..5b12bc5 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -278,12 +278,10 @@
#undef DO_CALL
#define DO_CALL(syscall_name, args) \
- copy TREG,%r1 ASM_LINE_SEP \
- copy %sp,TREG ASM_LINE_SEP \
/* Create a frame */ ASM_LINE_SEP \
- stwm %r1, 64(%sp) ASM_LINE_SEP \
- stw %rp, -20(%sp) ASM_LINE_SEP \
- stw TREG, -4(%sp) ASM_LINE_SEP \
+ stwm TREG, 64(%sp) ASM_LINE_SEP \
+ stw %sp, -4(%sp) ASM_LINE_SEP \
+ stw %r19, -32(%sp) ASM_LINE_SEP \
/* Save r19 */ ASM_LINE_SEP \
SAVE_PIC(TREG) ASM_LINE_SEP \
/* Do syscall, delay loads # */ ASM_LINE_SEP \
@@ -304,10 +302,10 @@
/* return -1 as error */ ASM_LINE_SEP \
ldo -1(%r0), %ret0 ASM_LINE_SEP \
L(pre_end): ASM_LINE_SEP \
- /* Restore return pointer */ ASM_LINE_SEP \
- ldw -84(%sp),%rp ASM_LINE_SEP \
/* Restore our frame, restoring TREG */ ASM_LINE_SEP \
- ldwm -64(%sp), TREG ASM_LINE_SEP
+ ldwm -64(%sp), TREG ASM_LINE_SEP \
+ /* Restore return pointer */ ASM_LINE_SEP \
+ ldw -20(%sp),%rp ASM_LINE_SEP
/* We do nothing with the return, except hand it back to someone else */
#undef DO_CALL_NOERRNO
@@ -386,10 +384,9 @@ L(pre_end): ASM_LINE_SEP \
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err)
-/* Equivalent to (val < 0)&&(val > -4095) which is what we want */
#undef INTERNAL_SYSCALL_ERROR_P
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
- ((unsigned long)val >= (unsigned long)-4095)
+ ((val < 0) && (val > -4095))
#undef INTERNAL_SYSCALL_ERRNO
#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=34cb4e8082506c176b5d8e2d1c7e7175ff3eaffd
commit 34cb4e8082506c176b5d8e2d1c7e7175ff3eaffd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 30 15:04:43 2006 +0000
(splice): Add offin and offout arguments to the prototype.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 6084c38..f17dc2b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -216,7 +216,8 @@ extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
unsigned int __flags);
/* Splice two files together. */
-extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+extern int splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len, unsigned int __flags)
__THROW;
/* In-kernel implementation of tee for pipe buffers. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=557df9aacae859b75357c1581cd10a5d9775c403
commit 557df9aacae859b75357c1581cd10a5d9775c403
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Aug 21 20:07:33 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl,
shmctl, and semctl.
* sysdeps/unix/sysv/linux/arm/eabi/semctl.c,
sysdeps/unix/sysv/linux/arm/eabi/shmctl.c,
sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 9b0cd77..8702925 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,11 @@
+2006-08-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list: Remove msgctl,
+ shmctl, and semctl.
+ * sysdeps/unix/sysv/linux/arm/eabi/semctl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/shmctl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/msgctl.c: New files.
+
2006-08-04 Daniel Jacobowitz <dan@codesourcery.com>
Reported by Joseph Myers <joseph@codesourcery.com>:
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c b/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
new file mode 100644
index 0000000..38aedad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/msgctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/msgctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semctl.c b/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
new file mode 100644
index 0000000..1451629
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/semctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/semctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c b/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
new file mode 100644
index 0000000..c121e99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/shmctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/shmctl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
index 31e1cd6..e896902 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
@@ -1,18 +1,16 @@
# File name Caller Syscall name # args Strong name Weak names
-# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
+# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
+# wrappers (to set __IPC_64).
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
shmat - shmat i:ipi __shmat shmat
-shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
-semctl - semctl i:iiii __semctl semctl
# proper socket implementations:
accept - accept Ci:iBN __libc_accept __accept accept
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e0b72525bcbfb872950ab3e847b866d03a65a2a
commit 6e0b72525bcbfb872950ab3e847b866d03a65a2a
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Aug 13 18:26:45 2006 +0000
2006-08-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI,
FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 9e23f80..1f90c8d 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2006-08-13 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h (FUTEX_LOCK_PI,
+ FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
+
2006-07-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index fc5ff99..a5412bf 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -60,6 +60,9 @@
#define FUTEX_CMP_REQUEUE 4
#define FUTEX_WAKE_OP 5
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
/* Initializer for compatibility lock. */
#if 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0700eb704643a10abaf113fb4a218f03b998a60c
commit 0700eb704643a10abaf113fb4a218f03b998a60c
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Aug 4 18:56:15 2006 +0000
Reported by Joseph Myers <joseph@codesourcery.com>:
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (FUTEX_LOCK_PI,
FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 15a83cd..9b0cd77 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-08-04 Daniel Jacobowitz <dan@codesourcery.com>
+
+ Reported by Joseph Myers <joseph@codesourcery.com>:
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h (FUTEX_LOCK_PI,
+ FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
+
2006-07-24 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index d1d0d65..4bae953 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -31,6 +31,9 @@
#define FUTEX_CMP_REQUEUE 4
#define FUTEX_WAKE_OP 5
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ad4d3b0cb94d5d0d62067b5c4d810da8cae204b
commit 0ad4d3b0cb94d5d0d62067b5c4d810da8cae204b
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Aug 4 18:54:56 2006 +0000
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI,
FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 95cd815..b3bf090 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-08-04 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_LOCK_PI,
+ FUTEX_UNLOCK_PI, FUTEX_TRYLOCK_PI): Define.
+
2006-07-24 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/mips64/n32/libm-test-ulps,
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index d5070e8..36a20f1 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -32,6 +32,9 @@
#define FUTEX_CMP_REQUEUE 4
#define FUTEX_WAKE_OP 5
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0fccb665e0b49ad738217a15c90ea588694456f
commit e0fccb665e0b49ad738217a15c90ea588694456f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 29 05:06:07 2006 +0000
Define FUTEX_LOCK_PI, FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 1a2e8cb..58b4806 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -33,6 +33,9 @@
#define FUTEX_CMP_REQUEUE 4
#define FUTEX_WAKE_OP 5
#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2361f0b82af4256ac56d3a9497ff36104a4dc701
commit 2361f0b82af4256ac56d3a9497ff36104a4dc701
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 26 01:27:06 2006 +0000
Fix comment.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 9b2e635..6084c38 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -94,7 +94,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* for F_[GET|SET]FL */
+/* for F_[GET|SET]FD */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=259437280cf07970982d5c224f53dfa5b8027024
commit 259437280cf07970982d5c224f53dfa5b8027024
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue Jul 25 01:58:10 2006 +0000
2006-07-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
__SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 08da881..9e23f80 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2006-07-24 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
+ __SIZEOF_PTHREAD_COND_T is 64 bytes. Remove __PAD_ATOMIC_LOCK_T.
+
2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index 6b23be5..e1c5325 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -24,6 +24,7 @@
sizeof(pthread_mutex_t) = 0x30 (48)
sizeof(pthread_mutexattr_t) = 0x4 (4)
sizeof(pthread_cond_t) = 0x30 (48)
+ = Grew to 64 bytes in NPTL.
No pthread_cond_compat_t ...
sizeof(pthread_condattr_t) = 0x4 (4)
sizeof(pthread_rwlock_t) = 0x40 (64)
@@ -34,7 +35,7 @@
#define __SIZEOF_PTHREAD_ATTR_T 36
#define __SIZEOF_PTHREAD_MUTEX_T 48
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
-#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_COND_T 64
#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
#define __SIZEOF_PTHREAD_CONDATTR_T 4
#define __SIZEOF_PTHREAD_RWLOCK_T 64
@@ -42,8 +43,6 @@
#define __SIZEOF_PTHREAD_BARRIER_T 48
#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
-#define __PAD_ATOMIC_LOCK_T 12
-
/* Thread identifiers. The structure of the attribute type is not
exposed on purpose. */
typedef unsigned long int pthread_t;
@@ -78,7 +77,6 @@ typedef union
struct __pthread_mutex_s
{
int __lock;
- char __size[__PAD_ATOMIC_LOCK_T];
unsigned int __count;
int __owner;
/* KIND must stay at this position in the structure to maintain
@@ -109,7 +107,6 @@ typedef union
struct
{
int __lock;
- char __size[__PAD_ATOMIC_LOCK_T];
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
@@ -145,7 +142,6 @@ typedef union
struct
{
int __lock;
- char __size[__PAD_ATOMIC_LOCK_T];
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74321891c1f00215e4f41bb64fd98261f2c3703e
commit 74321891c1f00215e4f41bb64fd98261f2c3703e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jul 24 15:51:50 2006 +0000
* sysdeps/mips/mips64/n32/libm-test-ulps,
sysdeps/mips/mips64/n64/libm-test-ulps: New.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 358a486..95cd815 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2006-07-24 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/mips/mips64/n32/libm-test-ulps,
+ sysdeps/mips/mips64/n64/libm-test-ulps: New.
+
+2006-07-24 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is
defined, include the named file.
diff --git a/sysdeps/mips/mips64/n32/libm-test-ulps b/sysdeps/mips/mips64/n32/libm-test-ulps
new file mode 100644
index 0000000..d9df631
--- /dev/null
+++ b/sysdeps/mips/mips64/n32/libm-test-ulps
@@ -0,0 +1,1245 @@
+# Begin of automatic generation
+
+# atan2
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
+ildouble: 1
+ldouble: 1
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
+# cacosh
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# casin
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+ildouble: 2
+ldouble: 2
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# catan
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+ildouble: 1
+ldouble: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+double: 4
+idouble: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+ildouble: 1
+ldouble: 1
+
+# cbrt
+Test "cbrt (-0.001) == -0.1":
+ildouble: 1
+ldouble: 1
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
+
+# ccos
+Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
+
+# cexp
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
+
+# clog
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# cos
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+ildouble: 4
+ldouble: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+ildouble: 10
+ldouble: 10
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# csin
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+ildouble: 1
+ldouble: 1
+
+# csinh
+Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
+ildouble: 1
+ldouble: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
+
+# erfc
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
+Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
+ildouble: 1
+ldouble: 1
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# exp2
+Test "exp2 (10) == 1024":
+ildouble: 2
+ldouble: 2
+
+# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
+Test "expm1 (1) == M_El - 1.0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# gamma
+Test "gamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# j1
+Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "j1 (1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+ildouble: 4
+ldouble: 4
+
+# jn
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+ildouble: 4
+ldouble: 4
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+ildouble: 2
+ldouble: 2
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# log10
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# log1p
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
+float: 1
+ifloat: 1
+
+# log2
+Test "log2 (0.75) == -.415037499278843818546261056052183492":
+ildouble: 1
+ldouble: 1
+
+# sincos
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
+
+# sqrt
+Test "sqrt (2) == M_SQRT2l":
+ildouble: 1
+ldouble: 1
+
+# tanh
+Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+Test "tanh (0.75) == 0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (4) == 6":
+ildouble: 1
+ldouble: 1
+
+# y0
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+# y1
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "y1 (0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# yn
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+ildouble: 2
+ldouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "atan2":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "atanh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "cacos":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cacosh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "casin":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "catanh":
+double: 4
+idouble: 4
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "catanh":
+ildouble: 1
+ldouble: 1
+
+Function: "cbrt":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ccos":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cexp":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog10":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cpow":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+ildouble: 10
+ldouble: 10
+
+Function: Imaginary part of "cpow":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctanh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "erf":
+double: 1
+idouble: 1
+
+Function: "erfc":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "exp2":
+ildouble: 2
+ldouble: 2
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "gamma":
+ildouble: 1
+ldouble: 1
+
+Function: "hypot":
+float: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 4
+ldouble: 4
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 4
+ldouble: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "log10":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "log1p":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log2":
+ildouble: 1
+ldouble: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sqrt":
+ildouble: 1
+ldouble: 1
+
+Function: "tan":
+double: 1
+idouble: 1
+
+Function: "tanh":
+ildouble: 1
+ldouble: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 5
+ldouble: 5
+
+# end of automatic generation
diff --git a/sysdeps/mips/mips64/n64/libm-test-ulps b/sysdeps/mips/mips64/n64/libm-test-ulps
new file mode 100644
index 0000000..d9df631
--- /dev/null
+++ b/sysdeps/mips/mips64/n64/libm-test-ulps
@@ -0,0 +1,1245 @@
+# Begin of automatic generation
+
+# atan2
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
+ildouble: 1
+ldouble: 1
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
+# cacosh
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# casin
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+ildouble: 2
+ldouble: 2
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# catan
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+ildouble: 1
+ldouble: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+double: 4
+idouble: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+ildouble: 1
+ldouble: 1
+
+# cbrt
+Test "cbrt (-0.001) == -0.1":
+ildouble: 1
+ldouble: 1
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
+
+# ccos
+Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
+
+# cexp
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
+
+# clog
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# cos
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+ildouble: 4
+ldouble: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+ildouble: 10
+ldouble: 10
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# csin
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+ildouble: 1
+ldouble: 1
+
+# csinh
+Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
+ildouble: 1
+ldouble: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
+
+# erfc
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
+Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
+ildouble: 1
+ldouble: 1
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# exp2
+Test "exp2 (10) == 1024":
+ildouble: 2
+ldouble: 2
+
+# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
+Test "expm1 (1) == M_El - 1.0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# gamma
+Test "gamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# j1
+Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "j1 (1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+ildouble: 4
+ldouble: 4
+
+# jn
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+ildouble: 4
+ldouble: 4
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+ildouble: 2
+ldouble: 2
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# log10
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# log1p
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
+float: 1
+ifloat: 1
+
+# log2
+Test "log2 (0.75) == -.415037499278843818546261056052183492":
+ildouble: 1
+ldouble: 1
+
+# sincos
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
+
+# sqrt
+Test "sqrt (2) == M_SQRT2l":
+ildouble: 1
+ldouble: 1
+
+# tanh
+Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+Test "tanh (0.75) == 0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (4) == 6":
+ildouble: 1
+ldouble: 1
+
+# y0
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+# y1
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "y1 (0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# yn
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+ildouble: 2
+ldouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "atan2":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "atanh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "cacos":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cacosh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "casin":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "catanh":
+double: 4
+idouble: 4
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "catanh":
+ildouble: 1
+ldouble: 1
+
+Function: "cbrt":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ccos":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cexp":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog10":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cpow":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+ildouble: 10
+ldouble: 10
+
+Function: Imaginary part of "cpow":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctanh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "erf":
+double: 1
+idouble: 1
+
+Function: "erfc":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "exp2":
+ildouble: 2
+ldouble: 2
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "gamma":
+ildouble: 1
+ldouble: 1
+
+Function: "hypot":
+float: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 4
+ldouble: 4
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 4
+ldouble: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "log10":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "log1p":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log2":
+ildouble: 1
+ldouble: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sqrt":
+ildouble: 1
+ldouble: 1
+
+Function: "tan":
+double: 1
+idouble: 1
+
+Function: "tanh":
+ildouble: 1
+ldouble: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 5
+ldouble: 5
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4151d899dfab142599500113acba3cb72bf261b
commit f4151d899dfab142599500113acba3cb72bf261b
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jul 24 15:43:02 2006 +0000
* sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is
defined, include the named file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 7e0d19c..15a83cd 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-07-24 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/sigaction.c: If WRAPPER_INCLUDE is
+ defined, include the named file.
+
2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 6dd189b..2d890d0 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -151,6 +151,10 @@ __libc_sigaction (sig, act, oact)
}
libc_hidden_def (__libc_sigaction)
+#ifdef WRAPPER_INCLUDE
+# include WRAPPER_INCLUDE
+#endif
+
#ifndef LIBC_SIGACTION
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb600a60fb47ddb9fba97ed95f72bbd9c46a5fe9
commit bb600a60fb47ddb9fba97ed95f72bbd9c46a5fe9
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Jul 24 15:42:07 2006 +0000
* sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is
defined, include the named file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 16e092f..358a486 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-07-24 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/sigaction.c: If WRAPPER_INCLUDE is
+ defined, include the named file.
+
2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat.
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 8e2ca42..c05dfd1 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -153,6 +153,10 @@ __libc_sigaction (sig, act, oact)
}
libc_hidden_def (__libc_sigaction)
+#ifdef WRAPPER_INCLUDE
+# include WRAPPER_INCLUDE
+#endif
+
#ifndef LIBC_SIGACTION
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6dc958e5dd7a648516569725cdf845ff08c94e3e
commit 6dc958e5dd7a648516569725cdf845ff08c94e3e
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue Jul 18 22:46:12 2006 +0000
2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap
newval and oldval.
* sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock):
Likewise.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index d2c19a3..08da881 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,10 @@
+2006-07-18 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/nptl/pthread_spin_lock.c (pthread_spin_lock): Swap
+ newval and oldval.
+ * sysdeps/hppa/nptl/pthread_spin_trylock.c (pthread_spin_trylock):
+ Likewise.
+
2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
* sysdeps/hppa/tst-audit.h: New file.
diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/sysdeps/hppa/nptl/pthread_spin_lock.c
index 9a36967..966f5c9 100644
--- a/sysdeps/hppa/nptl/pthread_spin_lock.c
+++ b/sysdeps/hppa/nptl/pthread_spin_lock.c
@@ -31,7 +31,7 @@ pthread_spin_lock (pthread_spinlock_t *lock)
return 0;
#endif
- while (atomic_compare_and_exchange_val_acq(lock, 0, 1) == 1)
+ while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1)
while (*lock == 1);
return 0;
diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/sysdeps/hppa/nptl/pthread_spin_trylock.c
index 8d0ec1d..609a62f 100644
--- a/sysdeps/hppa/nptl/pthread_spin_trylock.c
+++ b/sysdeps/hppa/nptl/pthread_spin_trylock.c
@@ -29,6 +29,6 @@ pthread_spin_trylock (pthread_spinlock_t *lock)
return __ldcw (a) ? 0 : EBUSY;
#endif
- return atomic_compare_and_exchange_val_acq(lock, 0, 1) ? EBUSY : 0;
+ return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f765aca3da66aa960ec8901613362c75ea755833
commit f765aca3da66aa960ec8901613362c75ea755833
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Jul 16 18:31:20 2006 +0000
2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
* sysdeps/hppa/tst-audit.h: New file.
2006-07-16 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/tls-macros.h: Cleanup formatting.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index b4c45d7..d2c19a3 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,11 @@
+2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
+
+ * sysdeps/hppa/tst-audit.h: New file.
+
+2006-07-16 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/tls-macros.h: Cleanup formatting.
+
2006-07-15 Jeff Bailey <jbailey@ubuntu.com>
* sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL.
diff --git a/sysdeps/hppa/tls-macros.h b/sysdeps/hppa/tls-macros.h
index 4c5564b..f5a1cd8 100644
--- a/sysdeps/hppa/tls-macros.h
+++ b/sysdeps/hppa/tls-macros.h
@@ -1,6 +1,7 @@
+/* TLS Access Macros for HP PARISC Linux */
/* HPPA Local Exec TLS access. */
-# define TLS_LE(x) \
+#define TLS_LE(x) \
({ int * __result; \
unsigned long __tmp; \
asm ( \
@@ -14,7 +15,7 @@
})
/* HPPA Initial Exec TLS access. */
-# ifdef PIC
+#ifdef PIC
# define TLS_IE(x) \
({ int * __result; \
unsigned long __tmp, __tmp2; \
@@ -28,7 +29,7 @@
: "r1" ); \
__result; \
})
-# else
+#else
# define TLS_IE(x) \
({ int * __result; \
unsigned long __tmp, __tmp2; \
@@ -42,9 +43,9 @@
: "r1" ); \
__result; \
})
-# endif
+#endif
-# ifdef PIC
+#ifdef PIC
/* HPPA Local Dynamic TLS access. */
# define TLS_LD(x) \
({ int * __result; \
@@ -62,7 +63,7 @@
"r25", "r26", "r28", "r29", "r31" ); \
__result; \
})
-# else
+#else
# define TLS_LD(x) \
({ int * __result; \
asm ( \
@@ -77,10 +78,10 @@
"r25", "r26", "r28", "r29", "r31" ); \
__result; \
})
-# endif
+#endif
/* HPPA General Dynamic TLS access. */
-# ifdef PIC
+#ifdef PIC
# define TLS_GD(x) \
({ int * __result; \
asm ( \
@@ -96,7 +97,7 @@
"r25", "r26", "r28", "r29", "r31" ); \
__result; \
})
-# else
+#else
# define TLS_GD(x) \
({ int * __result; \
asm ( \
diff --git a/sysdeps/hppa/tst-audit.h b/sysdeps/hppa/tst-audit.h
new file mode 100644
index 0000000..93b4592
--- /dev/null
+++ b/sysdeps/hppa/tst-audit.h
@@ -0,0 +1,26 @@
+/* Definitions for testing PLT entry/exit auditing. HP-PARISC version.
+
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define pltenter la_hppa_gnu_pltenter
+#define pltexit la_hppa_gnu_pltexit
+#define La_regs La_hppa_regs
+#define La_retval La_hppa_retval
+#define int_retval lrv_r28
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f9c5a916b67e097cfc48240420f506d96c3e0d5
commit 4f9c5a916b67e097cfc48240420f506d96c3e0d5
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun Jul 16 18:25:24 2006 +0000
2006-07-15 Jeff Bailey <jbailey@ubuntu.com>
* sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 076ce1f..b4c45d7 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,7 @@
+2006-07-15 Jeff Bailey <jbailey@ubuntu.com>
+
+ * sysdeps/hppa/nptl/tls.h (TLS_INIT_TP): Return NULL.
+
2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/xstat.c: New file.
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index 1bbeeaa..0759aec 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -102,7 +102,7 @@ typedef struct
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
- ({ __set_cr27(tcbp); 0; })
+ ({ __set_cr27(tcbp); NULL; })
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da1ea0f056beb5dc32a52bdf228bf058230a76b7
commit da1ea0f056beb5dc32a52bdf228bf058230a76b7
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Jul 14 13:51:24 2006 +0000
2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/xstat.c: New file.
* sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise.
2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/nptl/Makefile: New file
* sysdeps/hppa/nptl/jmpbuf-unwind.h: Likewise
* sysdeps/hppa/nptl/pthread_spin_lock.c: Likewise
* sysdeps/hppa/nptl/pthread_spin_trylock.c: Likewise
* sysdeps/hppa/nptl/pthread_spin_unlock.c: Likewise
* sysdeps/hppa/nptl/pthreaddef.h: Likewise
* sysdeps/hppa/nptl/tcb-offsets.sym: Likewise
* sysdeps/hppa/nptl/tls.h: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/bits: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/createthread.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/fork.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Likewise
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Likewise
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 7355ee9..076ce1f 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,36 @@
2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/xstat.c: New file.
+ * sysdeps/unix/sysv/linux/hppa/lxstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/fxstat.c: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/fxstatat.c: Likewise.
+
+2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/nptl/Makefile: New file
+ * sysdeps/hppa/nptl/jmpbuf-unwind.h: Likewise
+ * sysdeps/hppa/nptl/pthread_spin_lock.c: Likewise
+ * sysdeps/hppa/nptl/pthread_spin_trylock.c: Likewise
+ * sysdeps/hppa/nptl/pthread_spin_unlock.c: Likewise
+ * sysdeps/hppa/nptl/pthreaddef.h: Likewise
+ * sysdeps/hppa/nptl/tcb-offsets.sym: Likewise
+ * sysdeps/hppa/nptl/tls.h: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/createthread.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/fork.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Likewise
+ * sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Likewise
+
+2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry
for up to 256 errnos
diff --git a/sysdeps/hppa/nptl/Makefile b/sysdeps/hppa/nptl/Makefile
new file mode 100644
index 0000000..0300693
--- /dev/null
+++ b/sysdeps/hppa/nptl/Makefile
@@ -0,0 +1,21 @@
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/hppa/nptl/jmpbuf-unwind.h b/sysdeps/hppa/nptl/jmpbuf-unwind.h
new file mode 100644
index 0000000..7f92627
--- /dev/null
+++ b/sysdeps/hppa/nptl/jmpbuf-unwind.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <jmpbuf-offsets.h>
+#include <stdint.h>
+#include <unwind.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) > (uintptr_t)(((unsigned long *) _jmpbuf)[JB_SP]) - (_adj))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/hppa/nptl/pthread_spin_lock.c b/sysdeps/hppa/nptl/pthread_spin_lock.c
new file mode 100644
index 0000000..9a36967
--- /dev/null
+++ b/sysdeps/hppa/nptl/pthread_spin_lock.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <atomic.h>
+#include "pthreadP.h"
+
+int
+pthread_spin_lock (pthread_spinlock_t *lock)
+{
+#if 0
+ volatile unsigned int *addr = __ldcw_align (lock);
+
+ while (__ldcw (addr) == 0)
+ while (*addr == 0) ;
+
+ return 0;
+#endif
+
+ while (atomic_compare_and_exchange_val_acq(lock, 0, 1) == 1)
+ while (*lock == 1);
+
+ return 0;
+}
diff --git a/sysdeps/hppa/nptl/pthread_spin_trylock.c b/sysdeps/hppa/nptl/pthread_spin_trylock.c
new file mode 100644
index 0000000..8d0ec1d
--- /dev/null
+++ b/sysdeps/hppa/nptl/pthread_spin_trylock.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <atomic.h>
+#include "pthreadP.h"
+
+int
+pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+#if 0
+ volatile unsigned int *a = __ldcw_align (lock);
+
+ return __ldcw (a) ? 0 : EBUSY;
+#endif
+
+ return atomic_compare_and_exchange_val_acq(lock, 0, 1) ? EBUSY : 0;
+
+}
diff --git a/sysdeps/hppa/nptl/pthread_spin_unlock.c b/sysdeps/hppa/nptl/pthread_spin_unlock.c
new file mode 100644
index 0000000..463d23c
--- /dev/null
+++ b/sysdeps/hppa/nptl/pthread_spin_unlock.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Ugly hack to avoid the declaration of pthread_spin_init. */
+#define pthread_spin_init pthread_spin_init_XXX
+#include "pthreadP.h"
+#undef pthread_spin_init
+
+int
+pthread_spin_unlock (pthread_spinlock_t *lock)
+{
+#if 0
+ volatile unsigned int *a = __ldcw_align (lock);
+#endif
+ int tmp = 0;
+ /* This should be a memory barrier to newer compilers */
+ __asm__ __volatile__ ("stw,ma %1,0(%0)"
+ : : "r" (lock), "r" (tmp) : "memory");
+ return 0;
+}
+strong_alias (pthread_spin_unlock, pthread_spin_init)
diff --git a/sysdeps/hppa/nptl/pthreaddef.h b/sysdeps/hppa/nptl/pthreaddef.h
new file mode 100644
index 0000000..6445f7b
--- /dev/null
+++ b/sysdeps/hppa/nptl/pthreaddef.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (8 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning. */
+#define STACK_ALIGN 64
+
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 2048
+
+/* Alignment requirement for TCB, note that this must be larger than STACK_ALIGN */
+#define TCB_ALIGNMENT STACK_ALIGN
+
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME stack_pointer
+register char * stack_pointer __asm__ ("%r30");
+
+
+/* XXX Until we have a better place keep the definitions here. */
+
+#define __exit_thread_inline(val) \
+ INLINE_SYSCALL (exit, 1, (val))
diff --git a/sysdeps/hppa/nptl/tcb-offsets.sym b/sysdeps/hppa/nptl/tcb-offsets.sym
new file mode 100644
index 0000000..1c8aef4
--- /dev/null
+++ b/sysdeps/hppa/nptl/tcb-offsets.sym
@@ -0,0 +1,18 @@
+#include <sysdep.h>
+#include <tls.h>
+
+RESULT offsetof (struct pthread, result)
+TID offsetof (struct pthread, tid)
+PID offsetof (struct pthread, pid)
+CANCELHANDLING offsetof (struct pthread, cancelhandling)
+CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
+MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
+TLS_PRE_TCB_SIZE sizeof (struct pthread)
+MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
+
+-- Use a thread_offset when working with asm to make things simpler
+-- This way we get the offset of a member in the struct pthread that
+-- preceeds the thread pointer (which points to the dtv).
+#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
+PID_THREAD_OFFSET thread_offsetof (pid)
+MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads)
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
new file mode 100644
index 0000000..1bbeeaa
--- /dev/null
+++ b/sysdeps/hppa/nptl/tls.h
@@ -0,0 +1,151 @@
+/* Definition for thread-local data handling. NPTL/hppa version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H 1
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
+} dtv_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+#endif /* __ASSEMBLER__ */
+
+
+/* We require TLS support in the tools. */
+#ifndef HAVE_TLS_SUPPORT
+# error "TLS support is required."
+#endif
+
+/* Signal that TLS support is available. */
+#define USE_TLS 1
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information. */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks. */
+# define TLS_DTV_AT_TP 1
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
+
+typedef struct
+{
+ dtv_t *dtv;
+ void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+
+/* This is the size of the TCB. */
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size we need before TCB */
+# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ ((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) \
+ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
+ __tcbp->dtv = dtv; \
+ })
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))->dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(tcbp, secondcall) \
+ ({ __set_cr27(tcbp); 0; })
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
+ __tcbp->dtv; \
+ })
+
+/* Return the thread descriptor for the current thread. */
+# define THREAD_SELF \
+ ({ struct pthread *__self; \
+ __self = __get_cr27(); \
+ __self - 1; \
+ })
+
+/* FIXME */
+/* Magic for libthread_db to know how to do THREAD_SELF. */
+# define DB_THREAD_SELF \
+ REGISTER (32, 32, 32 * 4, -sizeof (struct pthread))
+
+/* Access to data in the thread descriptor is easy. */
+# define THREAD_GETMEM(descr, member) \
+ descr->member
+# define THREAD_GETMEM_NC(descr, member, idx) \
+ descr->member[idx]
+# define THREAD_SETMEM(descr, member, value) \
+ descr->member = (value)
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+ descr->member[idx] = (value)
+
+static inline struct pthread *__get_cr27(void)
+{
+ long cr27;
+ asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
+ return (struct pthread *) cr27;
+}
+
+static inline void __set_cr27(struct pthread *cr27)
+{
+ asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
+ "copy %0, %%r26"
+ : : "r" (cr27) : "r26" );
+}
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/fxstat.c b/sysdeps/unix/sysv/linux/hppa/fxstat.c
new file mode 100644
index 0000000..4f219f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/fxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/fxstatat.c b/sysdeps/unix/sysv/linux/hppa/fxstatat.c
new file mode 100644
index 0000000..0f8b313
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/fxstatat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/lxstat.c b/sysdeps/unix/sysv/linux/hppa/lxstat.c
new file mode 100644
index 0000000..0efa0ae
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/lxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
new file mode 100644
index 0000000..6b23be5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -0,0 +1,192 @@
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H 1
+
+/* Linuxthread type sizes:
+ sizeof(pthread_attr_t) = 0x24 (36)
+ sizeof(pthread_mutex_t) = 0x30 (48)
+ sizeof(pthread_mutexattr_t) = 0x4 (4)
+ sizeof(pthread_cond_t) = 0x30 (48)
+ No pthread_cond_compat_t ...
+ sizeof(pthread_condattr_t) = 0x4 (4)
+ sizeof(pthread_rwlock_t) = 0x40 (64)
+ sizeof(pthread_rwlockattr_t) = 0x8 (8)
+ sizeof(pthread_barrier_t) = 0x30 (48)
+ sizeof(pthread_barrierattr_t) = 0x4 (4) */
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 48
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 64
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 48
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+#define __PAD_ATOMIC_LOCK_T 12
+
+/* Thread identifiers. The structure of the attribute type is not
+ exposed on purpose. */
+typedef unsigned long int pthread_t;
+
+/* Our old basic lock type, listed here for posterity.
+ We needed self-aligning locks for linuxthreads LDCW
+ implementation. For NPTL we use LWS Compare and
+ Exchange to implement primitives. */
+#if 0
+typedef struct {
+ int lock[4];
+} __atomic_lock_t;
+#endif
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_ATTR_T];
+ long int __align;
+} pthread_attr_t;
+
+
+typedef struct __pthread_internal_slist
+{
+ struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+
+
+/* Data structures for mutex handling. The structure of the attribute
+ type is not exposed on purpose. */
+typedef union
+{
+ struct __pthread_mutex_s
+ {
+ int __lock;
+ char __size[__PAD_ATOMIC_LOCK_T];
+ unsigned int __count;
+ int __owner;
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility. */
+ int __kind;
+ unsigned int __nusers;
+ __extension__ union
+ {
+ int __spins;
+ __pthread_slist_t __list;
+ };
+ } __data;
+ char __size[__SIZEOF_PTHREAD_MUTEX_T];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+ long int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling. The structure of
+ the attribute type is not exposed on purpose. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ char __size[__PAD_ATOMIC_LOCK_T];
+ unsigned int __futex;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
+ void *__mutex;
+ unsigned int __nwaiters;
+ unsigned int __broadcast_seq;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_COND_T];
+ __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+ long int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Data structure for read-write lock variable handling. The
+ structure of the attribute type is not exposed on purpose. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ char __size[__PAD_ATOMIC_LOCK_T];
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned int __flags;
+ int __writer;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+ long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type. */
+typedef volatile int pthread_spinlock_t;
+
+
+/* POSIX barriers data type. The structure of the type is
+ deliberately not exposed. */
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIER_T];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+ int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#endif /* bits/pthreadtypes.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
new file mode 100644
index 0000000..3d274ee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+
+#define __SIZEOF_SEM_T 16
+
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t;
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c
new file mode 100644
index 0000000..01bd8ce
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/createthread.c
@@ -0,0 +1,23 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Value passed to 'clone' for initialization of the thread register. */
+#define TLS_VALUE (pd + 1)
+
+/* Get the real implementation. */
+#include <nptl/sysdeps/pthread/createthread.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/fork.c b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c
new file mode 100644
index 0000000..4dc38e1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/fork.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sched.h>
+#include <signal.h>
+#include <sysdep.h>
+#include <tls.h>
+
+/* Argument 1 - Clone flags.
+ 2 - Child stack pointer.
+ 3 - Parent tid pointer.
+ 4 - New TLS area pointer.
+ 5 - Child tid pointer. */
+#define ARCH_FORK() \
+ INLINE_SYSCALL (clone, 5, \
+ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
+ NULL, NULL, NULL, &THREAD_SELF->tid)
+
+#include <nptl/sysdeps/unix/sysv/linux/fork.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h
new file mode 100644
index 0000000..528c2a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/internaltypes.h
@@ -0,0 +1,153 @@
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _INTERNALTYPES_H
+#define _INTERNALTYPES_H 1
+
+#include <stdint.h>
+
+
+struct pthread_attr
+{
+ /* Scheduler parameters and priority. */
+ struct sched_param schedparam;
+ int schedpolicy;
+ /* Various flags like detachstate, scope, etc. */
+ int flags;
+ /* Size of guard area. */
+ size_t guardsize;
+ /* Stack handling. */
+ void *stackaddr;
+ size_t stacksize;
+ /* Affinity map. */
+ cpu_set_t *cpuset;
+ size_t cpusetsize;
+};
+
+#define ATTR_FLAG_DETACHSTATE 0x0001
+#define ATTR_FLAG_NOTINHERITSCHED 0x0002
+#define ATTR_FLAG_SCOPEPROCESS 0x0004
+#define ATTR_FLAG_STACKADDR 0x0008
+#define ATTR_FLAG_OLDATTR 0x0010
+#define ATTR_FLAG_SCHED_SET 0x0020
+#define ATTR_FLAG_POLICY_SET 0x0040
+
+
+/* Mutex attribute data structure. */
+struct pthread_mutexattr
+{
+ /* Identifier for the kind of mutex.
+
+ Bit 31 is set if the mutex is to be shared between processes.
+
+ Bit 0 to 30 contain one of the PTHREAD_MUTEX_ values to identify
+ the type of the mutex. */
+ int mutexkind;
+};
+
+
+/* Conditional variable attribute data structure. */
+struct pthread_condattr
+{
+ /* Combination of values:
+
+ Bit 0 : flag whether coditional variable will be shareable between
+ processes.
+
+ Bit 1-7: clock ID. */
+ int value;
+};
+
+
+/* The __NWAITERS field is used as a counter and to house the number
+ of bits which represent the clock. COND_CLOCK_BITS is the number
+ of bits reserved for the clock. */
+#define COND_CLOCK_BITS 1
+
+
+/* Read-write lock variable attribute data structure. */
+struct pthread_rwlockattr
+{
+ int lockkind;
+ int pshared;
+};
+
+
+/* Barrier data structure. */
+struct pthread_barrier
+{
+ unsigned int curr_event;
+ int lock;
+ unsigned int left;
+ unsigned int init_count;
+};
+
+
+/* Barrier variable attribute data structure. */
+struct pthread_barrierattr
+{
+ int pshared;
+};
+
+
+/* Thread-local data handling. */
+struct pthread_key_struct
+{
+ /* Sequence numbers. Even numbers indicated vacant entries. Note
+ that zero is even. We use uintptr_t to not require padding on
+ 32- and 64-bit machines. On 64-bit machines it helps to avoid
+ wrapping, too. */
+ uintptr_t seq;
+
+ /* Destructor for the data. */
+ void (*destr) (void *);
+};
+
+/* Check whether an entry is unused. */
+#define KEY_UNUSED(p) (((p) & 1) == 0)
+/* Check whether a key is usable. We cannot reuse an allocated key if
+ the sequence counter would overflow after the next destroy call.
+ This would mean that we potentially free memory for a key with the
+ same sequence. This is *very* unlikely to happen, A program would
+ have to create and destroy a key 2^31 times (on 32-bit platforms,
+ on 64-bit platforms that would be 2^63). If it should happen we
+ simply don't use this specific key anymore. */
+#define KEY_USABLE(p) (((uintptr_t) (p)) < ((uintptr_t) ((p) + 2)))
+
+
+/* Handling of read-write lock data. */
+// XXX For now there is only one flag. Maybe more in future.
+#define RWLOCK_RECURSIVE(rwlock) ((rwlock)->__data.__flags != 0)
+
+
+/* Semaphore variable structure. */
+struct sem
+{
+ unsigned int count;
+};
+
+
+/* Compatibility type for old conditional variable interfaces. */
+typedef struct
+{
+ pthread_cond_t *cond;
+} pthread_cond_2_0_t;
+
+#endif /* internaltypes.h */
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c
new file mode 100644
index 0000000..7b1a7c7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/libc-lowlevellock.c
@@ -0,0 +1,21 @@
+/* low level locking for pthread library. Generic futex-using version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "lowlevellock.c"
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
new file mode 100644
index 0000000..d2919ee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
@@ -0,0 +1,130 @@
+/* low level locking for pthread library. Generic futex-using version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <sys/time.h>
+
+
+void
+__lll_lock_wait (lll_lock_t *futex)
+{
+ do
+ {
+ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_wait (futex, 2);
+ }
+ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
+}
+
+
+int
+__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
+{
+ /* Reject invalid timeouts. */
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ do
+ {
+ struct timeval tv;
+ struct timespec rt;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ /* Wait. */
+ int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
+ if (oldval != 0)
+ lll_futex_timed_wait (futex, 2, &rt);
+ }
+ while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
+ return 0;
+}
+
+
+/* These don't get included in libc.so */
+#ifdef IS_IN_libpthread
+int
+lll_unlock_wake_cb (lll_lock_t *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+ return 0;
+}
+
+
+int
+__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
+{
+ int tid;
+
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ /* Repeat until thread terminated. */
+ while ((tid = *tidp) != 0)
+ {
+ struct timeval tv;
+ struct timespec rt;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ /* Wait until thread terminates. */
+ if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
+ return ETIMEDOUT;
+ }
+
+ return 0;
+}
+
+#endif
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
new file mode 100644
index 0000000..fc5ff99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -0,0 +1,336 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LOWLEVELLOCK_H
+#define _LOWLEVELLOCK_H 1
+
+#include <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <sysdep.h>
+#include <atomic.h>
+
+#if 0
+/* The hppa only has one atomic read and modify memory operation,
+ load and clear, so hppa spinlocks must use zero to signify that
+ someone is holding the lock. The address used for the ldcw
+ semaphore must be 16-byte aligned. */
+#define __ldcw(a) \
+({ \
+ unsigned int __ret; \
+ __asm__ __volatile__("ldcw 0(%1),%0" \
+ : "=r" (__ret) : "r" (a) : "memory"); \
+ __ret; \
+})
+
+/* Because malloc only guarantees 8-byte alignment for malloc'd data,
+ and GCC only guarantees 8-byte alignment for stack locals, we can't
+ be assured of 16-byte alignment for atomic lock data even if we
+ specify "__attribute ((aligned(16)))" in the type declaration. So,
+ we use a struct containing an array of four ints for the atomic lock
+ type and dynamically select the 16-byte aligned int from the array
+ for the semaphore. */
+#define __PA_LDCW_ALIGNMENT 16
+#define __ldcw_align(a) ({ \
+ volatile unsigned int __ret = (unsigned int) a; \
+ if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
+ __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
+ (unsigned int *) __ret; \
+})
+#endif
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+
+/* Initializer for compatibility lock. */
+#if 0
+#define LLL_INITIALIZER_NOT_ZERO
+#define LLL_MUTEX_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
+#endif
+#define LLL_MUTEX_LOCK_INITIALIZER (0)
+
+
+/* Type for lock object. */
+typedef int lll_lock_t;
+
+
+#define lll_futex_wait(futexp, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+#define lll_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+#define lll_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE, (nr), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+#define lll_robust_mutex_dead(futexv) \
+ do \
+ { \
+ int *__futexp = &(futexv); \
+ atomic_or (__futexp, FUTEX_OWNER_DIED); \
+ lll_futex_wake (__futexp, 1); \
+ } \
+ while (0)
+
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
+ (nr_move), (mutex), (val)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
+ })
+
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_WAKE_OP, (nr_wake), \
+ (nr_wake2), (futexp2), \
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
+ __ret; \
+ })
+
+static inline int __attribute__((always_inline))
+__lll_mutex_trylock(lll_lock_t *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
+}
+#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+
+static inline int __attribute__((always_inline))
+__lll_robust_mutex_trylock(int *futex, int id)
+{
+ return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
+}
+#define lll_robust_mutex_trylock(lock, id) \
+ __lll_robust_mutex_trylock (&(lock), id)
+
+
+static inline int __attribute__((always_inline))
+__lll_mutex_cond_trylock(lll_lock_t *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
+}
+#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+
+
+extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden;
+
+static inline void __attribute__((always_inline))
+__lll_mutex_lock(lll_lock_t *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+
+extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
+
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_lock (int *futex, int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_lock_wait (futex);
+ return result;
+}
+#define lll_robust_mutex_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), id)
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_cond_lock (lll_lock_t *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+
+
+#define lll_robust_mutex_cond_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+
+
+extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *)
+ attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
+
+static inline int __attribute__ ((always_inline))
+__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ result = __lll_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_mutex_timedlock(futex, abstime) \
+ __lll_mutex_timedlock (&(futex), abstime)
+
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
+ int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_robust_mutex_timedlock(futex, abstime, id) \
+ __lll_robust_mutex_timedlock (&(futex), abstime, id)
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock (lll_lock_t *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_robust_mutex_unlock (int *futex, int mask)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val & mask, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_robust_mutex_unlock(futex) \
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock_force (lll_lock_t *futex)
+{
+ (void) atomic_exchange_rel (futex, 0);
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+
+
+static inline int __attribute__ ((always_inline))
+__lll_mutex_islocked (lll_lock_t *futex)
+{
+ return (*futex != 0);
+}
+#define lll_mutex_islocked(futex) __lll_mutex_islocked(&(futex))
+
+
+/* Our internal lock implementation is identical to the binary-compatible
+ mutex implementation. */
+
+/* Initializers for lock. */
+#if 0
+#define LLL_LOCK_INITIALIZER ((__atomic_lock_t){ { 1, 1, 1, 1 } })
+#define LLL_LOCK_INITIALIZER_CONST { { 1, 1, 1, 1 } }
+#define LLL_LOCK_INITIALIZER_LOCKED ((__atomic_lock_t){ { 0, 0, 0, 0 } })
+#endif
+
+#define LLL_LOCK_INITIALIZER (0)
+#define LLL_LOCK_INITIALIZER_CONST (0)
+#define LLL_LOCK_INITIALIZER_LOCKED (1)
+
+
+#define THREAD_INIT_LOCK(PD, LOCK) \
+ (PD)->LOCK = LLL_LOCK_INITIALIZER
+
+extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
+
+/* The states of a lock are:
+ 0 - untaken
+ 1 - taken by one user
+ >1 - taken by more users */
+
+#define lll_trylock(lock) lll_mutex_trylock (lock)
+#define lll_lock(lock) lll_mutex_lock (lock)
+#define lll_unlock(lock) lll_mutex_unlock (lock)
+#define lll_islocked(lock) lll_mutex_islocked (lock)
+
+/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+ wakeup when the clone terminates. The memory location contains the
+ thread ID while the clone is running and is reset to zero
+ afterwards. */
+#define lll_wait_tid(tid) \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid); \
+ } while (0)
+
+extern int __lll_timedwait_tid (int *, const struct timespec *)
+ attribute_hidden;
+
+#define lll_timedwait_tid(tid, abstime) \
+ ({ \
+ int __res = 0; \
+ if ((tid) != 0) \
+ __res = __lll_timedwait_tid (&(tid), (abstime)); \
+ __res; \
+ })
+
+
+/* Conditional variable handling. */
+
+extern void __lll_cond_wait (pthread_cond_t *cond)
+ attribute_hidden;
+extern int __lll_cond_timedwait (pthread_cond_t *cond,
+ const struct timespec *abstime)
+ attribute_hidden;
+extern void __lll_cond_wake (pthread_cond_t *cond)
+ attribute_hidden;
+extern void __lll_cond_broadcast (pthread_cond_t *cond)
+ attribute_hidden;
+
+#define lll_cond_wait(cond) \
+ __lll_cond_wait (cond)
+#define lll_cond_timedwait(cond, abstime) \
+ __lll_cond_timedwait (cond, abstime)
+#define lll_cond_wake(cond) \
+ __lll_cond_wake (cond)
+#define lll_cond_broadcast(cond) \
+ __lll_cond_broadcast (cond)
+
+#endif /* lowlevellock.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
new file mode 100644
index 0000000..845e1fe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
@@ -0,0 +1,109 @@
+/* Special .init and .fini section support for HPPA. NPTL version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ The GNU C Library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file is compiled into assembly code which is then munged by a sed
+ script into two files: crti.s and crtn.s.
+
+ * crti.s puts a function prologue at the beginning of the
+ .init and .fini sections and defines global symbols for
+ those addresses, so they can be called as functions.
+
+ * crtn.s puts the corresponding function epilogues
+ in the .init and .fini sections. */
+
+/* If we use the standard C version, the linkage table pointer won't
+ be properly preserved due to the splitting up of function prologues
+ and epilogues. Therefore we write these in assembly to make sure
+ they do the right thing. */
+
+__asm__ (
+"#include \"defs.h\"\n"
+"\n"
+"/*@HEADER_ENDS*/\n"
+"\n"
+"/*@_init_PROLOG_BEGINS*/\n"
+" .section .init\n"
+" .align 4\n"
+" .globl _init\n"
+" .type _init,@function\n"
+"_init:\n"
+" stw %rp,-20(%sp)\n"
+" stwm %r4,64(%sp)\n"
+" stw %r19,-32(%sp)\n"
+" bl __pthread_initialize_minimal_internal,%rp\n"
+" copy %r19,%r4 /* delay slot */\n"
+" copy %r4,%r19\n"
+"/*@_init_PROLOG_ENDS*/\n"
+"\n"
+"/*@_init_EPILOG_BEGINS*/\n"
+"/* Here is the tail end of _init. */\n"
+" .section .init\n"
+" ldw -84(%sp),%rp\n"
+" copy %r4,%r19\n"
+" bv %r0(%rp)\n"
+"_end_init:\n"
+" ldwm -64(%sp),%r4\n"
+"\n"
+"/* Our very own unwind info, because the assembler can't handle\n"
+" functions split into two or more pieces. */\n"
+" .section .PARISC.unwind,\"a\",@progbits\n"
+" .extern _init\n"
+" .word _init, _end_init\n"
+" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
+"\n"
+"/*@_init_EPILOG_ENDS*/\n"
+"\n"
+"/*@_fini_PROLOG_BEGINS*/\n"
+" .section .fini\n"
+" .align 4\n"
+" .globl _fini\n"
+" .type _fini,@function\n"
+"_fini:\n"
+" stw %rp,-20(%sp)\n"
+" stwm %r4,64(%sp)\n"
+" stw %r19,-32(%sp)\n"
+" copy %r19,%r4\n"
+"/*@_fini_PROLOG_ENDS*/\n"
+"\n"
+"/*@_fini_EPILOG_BEGINS*/\n"
+" .section .fini\n"
+" ldw -84(%sp),%rp\n"
+" copy %r4,%r19\n"
+" bv %r0(%rp)\n"
+"_end_fini:\n"
+" ldwm -64(%sp),%r4\n"
+"\n"
+" .section .PARISC.unwind,\"a\",@progbits\n"
+" .extern _fini\n"
+" .word _fini, _end_fini\n"
+" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
+"\n"
+"/*@_fini_EPILOG_ENDS*/\n"
+"\n"
+"/*@TRAILER_BEGINS*/\n"
+);
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
new file mode 100644
index 0000000..a44e785
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S
@@ -0,0 +1,90 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#include <tcb-offsets.h>
+
+/* Clone the calling process, but without copying the whole address space.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+/* Load the thread register.
+ Load the saved PID value.
+ Negate the value.
+ Store the temporary PID. */
+#define SAVE_PID \
+ mfctl %cr27, %r26 ASM_LINE_SEP \
+ ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \
+ sub %r0,%r1,%r1 ASM_LINE_SEP \
+ stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP
+/* If we are the parent...
+ Get the thread pointer.
+ Load the saved PID.
+ Negate the value (got back original)
+ Restore the PID. */
+#define RESTORE_PID \
+ cmpb,=,n %r0,%ret0,.Lthread_start ASM_LINE_SEP \
+ mfctl %cr27, %r26 ASM_LINE_SEP \
+ ldw PID_THREAD_OFFSET(%r26),%r1 ASM_LINE_SEP \
+ sub %r0,%r1,%r1 ASM_LINE_SEP \
+ stw %r1,PID_THREAD_OFFSET(%r26) ASM_LINE_SEP \
+.Lthread_start: ASM_LINE_SEP
+
+ /* r26, r25, r24, r23 are free since vfork has no arguments */
+ENTRY(__vfork)
+
+ /* Save the PIC register. */
+#ifdef PIC
+ copy %r19, %r25 /* parent */
+#endif
+
+ /* Save the process PID */
+ SAVE_PID
+
+ /* Syscall saves and restores all register states */
+ ble 0x100(%sr2,%r0)
+ ldi __NR_vfork,%r20
+
+ /* Conditionally restore the PID */
+ RESTORE_PID
+
+ /* Check for error */
+ ldi -4096,%r1
+ comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
+ b,n .Lerror
+
+ /* Return, no need to restore the PIC register. */
+ bv,n %r0(%rp)
+
+.Lerror:
+ SYSCALL_ERROR_HANDLER
+ /* Restore the PIC register (in delay slot) on error */
+#ifdef PIC
+ copy %r25, %r19 /* parent */
+#else
+ nop
+#endif
+ sub %r0,%ret0,%arg0
+ /* Return error */
+PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
+weak_alias (__vfork, vfork)
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
new file mode 100644
index 0000000..649b752
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/pthread_once.c
@@ -0,0 +1,94 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "pthreadP.h"
+#include <lowlevellock.h>
+
+
+unsigned long int __fork_generation attribute_hidden;
+
+
+static void
+clear_once_control (void *arg)
+{
+ pthread_once_t *once_control = (pthread_once_t *) arg;
+
+ *once_control = 0;
+ lll_futex_wake (once_control, INT_MAX);
+}
+
+
+int
+__pthread_once (once_control, init_routine)
+ pthread_once_t *once_control;
+ void (*init_routine) (void);
+{
+ while (1)
+ {
+ int oldval, val, newval;
+
+ val = *once_control;
+ do
+ {
+ /* Check if the initialized has already been done. */
+ if ((val & 2) != 0)
+ return 0;
+
+ oldval = val;
+ newval = (oldval & 3) | __fork_generation | 1;
+ val = atomic_compare_and_exchange_val_acq (once_control, newval,
+ oldval);
+ }
+ while (__builtin_expect (val != oldval, 0));
+
+ /* Check if another thread already runs the initializer. */
+ if ((oldval & 1) != 0)
+ {
+ /* Check whether the initializer execution was interrupted
+ by a fork. */
+ if (((oldval ^ newval) & -4) == 0)
+ {
+ /* Same generation, some other thread was faster. Wait. */
+ lll_futex_wait (once_control, newval);
+ continue;
+ }
+ }
+
+ /* This thread is the first here. Do the initialization.
+ Register a cleanup handler so that in case the thread gets
+ interrupted the initialization can be restarted. */
+ pthread_cleanup_push (clear_once_control, once_control);
+
+ init_routine ();
+
+ pthread_cleanup_pop (0);
+
+
+ /* Add one to *once_control. */
+ atomic_increment (once_control);
+
+ /* Wake up all other threads. */
+ lll_futex_wake (once_control, INT_MAX);
+ break;
+ }
+
+ return 0;
+}
+weak_alias (__pthread_once, pthread_once)
+strong_alias (__pthread_once, __pthread_once_internal)
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..748fe69
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h
@@ -0,0 +1,217 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <sysdeps/generic/sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# ifndef NO_ERROR
+# define NO_ERROR -0x1000
+# endif
+
+/* The syscall cancellation mechanism requires userspace
+ assistance, the following code does roughly this:
+
+ do arguments (read arg5 and arg6 to registers)
+ setup frame
+
+ check if there are threads, yes jump to pseudo_cancel
+
+ unthreaded:
+ syscall
+ check syscall return (jump to pre_end)
+ set errno
+ set return to -1
+ (jump to pre_end)
+
+ pseudo_cancel:
+ cenable
+ syscall
+ cdisable
+ check syscall return (jump to pre_end)
+ set errno
+ set return to -1
+
+ pre_end
+ restore stack
+
+ It is expected that 'ret' and 'END' macros will
+ append an 'undo arguments' and 'return' to the
+ this PSEUDO macro. */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ DOARGS_##args ASM_LINE_SEP \
+ copy TREG, %r1 ASM_LINE_SEP \
+ copy %sp, TREG ASM_LINE_SEP \
+ stwm %r1, 64(%sp) ASM_LINE_SEP \
+ stw %rp, -20(%sp) ASM_LINE_SEP \
+ stw TREG, -4(%sp) ASM_LINE_SEP \
+ /* Done setting up frame, continue... */ ASM_LINE_SEP \
+ SINGLE_THREAD_P ASM_LINE_SEP \
+ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
+L(unthreaded): ASM_LINE_SEP \
+ /* Save r19 */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) ASM_LINE_SEP \
+ /* Do syscall, delay loads # */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
+ /* Restore r19 from TREG */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* Use TREG for temp storage */ ASM_LINE_SEP \
+ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
+ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
+ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
+ sub %r0, TREG, TREG ASM_LINE_SEP \
+ /* Store into errno location */ ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ b L(pre_end) ASM_LINE_SEP \
+ /* return -1 as error */ ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \
+L(pseudo_cancel): ASM_LINE_SEP \
+ PUSHARGS_##args /* Save args */ ASM_LINE_SEP \
+ /* Save r19 into TREG */ ASM_LINE_SEP \
+ CENABLE /* FUNC CALL */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ /* restore syscall args */ ASM_LINE_SEP \
+ POPARGS_##args ASM_LINE_SEP \
+ /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \
+ stw %ret0, -24(%sp) ASM_LINE_SEP \
+ /* ... SYSCALL ... */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
+ /* ............... */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) ASM_LINE_SEP \
+ /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \
+ ldw -24(%sp), %r26 ASM_LINE_SEP \
+ CDISABLE ASM_LINE_SEP \
+ stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \
+ /* Restore syscall return */ ASM_LINE_SEP \
+ ldw -24(%sp), %ret0 ASM_LINE_SEP \
+ /* compare error */ ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ /* branch if no error */ ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \
+ copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* make syscall res value positive */ ASM_LINE_SEP \
+ sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP \
+ /* store into errno location */ ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ /* return -1 */ ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 ASM_LINE_SEP \
+L(pre_end): ASM_LINE_SEP \
+ /* Restore rp before exit */ ASM_LINE_SEP \
+ ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \
+ /* Undo frame */ ASM_LINE_SEP \
+ ldwm -64(%sp),TREG ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP
+
+/* Save arguments into our frame */
+# define PUSHARGS_0 /* nothing to do */
+# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP
+
+/* Bring them back from the stack */
+# define POPARGS_0 /* nothing to do */
+# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP
+# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP
+# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP
+# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP
+# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP
+# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP
+
+# ifdef IS_IN_libpthread
+# ifdef PIC
+# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# elif !defined NOT_IN_libc
+# ifdef PIC
+# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# else
+# ifdef PIC
+# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# endif
+
+# ifdef IS_IN_libpthread
+# define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+# define __local_multiple_threads __libc_multiple_threads
+# else
+# define __local_multiple_threads __librt_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+# else
+/* Read the value of header.multiple_threads from the thread pointer */
+# define SINGLE_THREAD_P \
+ mfctl %cr27, %ret0 ASM_LINE_SEP \
+ ldw MULTIPLE_THREADS_THREAD_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP
+# endif
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+# define NO_CANCELLATION 1
+
+#endif
+/* !defined NOT_IN_libc || defined IS_IN_libpthread */
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
new file mode 100644
index 0000000..c8142cb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define LIBGCC_S_SO "libgcc_s.so.2"
+#include <sysdeps/pthread/unwind-forcedunwind.c>
+
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
new file mode 100644
index 0000000..6d1da85
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define LIBGCC_S_SO "libgcc_s.so.2"
+#include <sysdeps/pthread/unwind-resume.c>
+
diff --git a/sysdeps/unix/sysv/linux/hppa/xstat.c b/sysdeps/unix/sysv/linux/hppa/xstat.c
new file mode 100644
index 0000000..e9869f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/xstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/xstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b725f54b9a513d5363ca2c350cbcf48a69eb984d
commit b725f54b9a513d5363ca2c350cbcf48a69eb984d
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Jul 13 16:24:19 2006 +0000
2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry
for up to 256 errnos
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 9373705..7355ee9 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2006-07-13 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/Versions: new errlist compat entry
+ for up to 256 errnos
+
2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128.
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
index e15c822..26eed69 100644
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -16,6 +16,9 @@ libc {
#errlist-compat 254
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_2.4 {
+ #errlist-compat 256
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
librt {
GLIBC_2.3 {
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a11d626a73689f554fd315987e989e4725538ec
commit 7a11d626a73689f554fd315987e989e4725538ec
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Jul 5 16:58:01 2006 +0000
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include
<bits/sigcontext.h>.
(NGREG, mcontext_t, struct ucontext): Update to match the kernel.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index d8ba247..7e0d19c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,11 @@
2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Include
+ <bits/sigcontext.h>.
+ (NGREG, mcontext_t, struct ucontext): Update to match the kernel.
+
+2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to
load the _DYNAMIC slot.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index 6d6c8e3..9ecff7b 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,10 +25,14 @@
#include <signal.h>
#include <sys/procfs.h>
+/* We need the signal context definitions even if they are not used
+ included in <signal.h>. */
+#include <bits/sigcontext.h>
+
typedef int greg_t;
/* Number of general registers. */
-#define NGREG 16
+#define NGREG 18
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;
@@ -73,22 +77,21 @@ enum
/* Structure to describe FPU registers. */
typedef elf_fpregset_t fpregset_t;
-/* Context to describe whole processor state. */
-typedef struct
- {
- gregset_t gregs;
- fpregset_t fpregs;
- } mcontext_t;
+/* Context to describe whole processor state. This only describes
+ the core registers; coprocessor registers get saved elsewhere
+ (e.g. in uc_regspace, or somewhere unspecified on the stack
+ during non-RT signal handlers). */
+typedef struct sigcontext mcontext_t;
/* Userlevel context. */
typedef struct ucontext
{
- unsigned long int uc_flags;
+ unsigned long uc_flags;
struct ucontext *uc_link;
- __sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
- long int uc_filler[5];
+ __sigset_t uc_sigmask;
+ unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
} ucontext_t;
#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3dff8d29780b563648c31c3d4a3f2902916d29dc
commit 3dff8d29780b563648c31c3d4a3f2902916d29dc
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Jul 5 16:46:20 2006 +0000
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to
load the _DYNAMIC slot.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index c76374c..d8ba247 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-07-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Correct GOT access to
+ load the _DYNAMIC slot.
+
2006-06-08 Mark Shinwell <shinwell@codesourcery.com>
* sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 5347d8b..ff8a170 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -54,7 +54,7 @@ elf_machine_dynamic (void)
{
Elf32_Addr dynamic;
asm ("ldr %0, 2f\n"
- "1: add %0, pc, %0\n"
+ "1: ldr %0, [pc, %0]\n"
"b 3f\n"
"2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
"3:" : "=r" (dynamic));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6752404e779e38f9a125fe43339b6993073b1e4a
commit 6752404e779e38f9a125fe43339b6993073b1e4a
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Jun 9 01:25:30 2006 +0000
2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS.
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 32f0f3f..9373705 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,12 @@
2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/hppa/hppa1.1/Implies: Remove ieee754/ldbl-128.
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ [__LINUX_KERNEL_VERSION >= 0x020609]: Define __ASSUME_LWS_CAS.
+ * sysdeps/unix/sysv/linux/hppa/bits/atomic.h: New file.
+
+2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat
(SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
Define.
diff --git a/sysdeps/hppa/hppa1.1/Implies b/sysdeps/hppa/hppa1.1/Implies
index 5f935a2..780c4e2 100644
--- a/sysdeps/hppa/hppa1.1/Implies
+++ b/sysdeps/hppa/hppa1.1/Implies
@@ -1,4 +1,3 @@
wordsize-32
ieee754/flt-32
ieee754/dbl-64
-ieee754/ldbl-128
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/atomic.h b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
new file mode 100644
index 0000000..36a5407
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/atomic.h
@@ -0,0 +1,120 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2005.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdint.h>
+#include <sysdep.h>
+#include <abort-instr.h>
+#include <kernel-features.h>
+
+/* We need EFAULT, ENONSYS, and EAGAIN */
+#if !defined EFAULT && !defined ENOSYS && !defined EAGAIN
+#undef EFAULT
+#undef ENOSYS
+#undef EAGAIN
+#define EFAULT 14
+#define ENOSYS 251
+#define EAGAIN 11
+#endif
+
+#ifndef _BITS_ATOMIC_H
+#define _BITS_ATOMIC_H 1
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+/* prev = *addr;
+ if (prev == old)
+ *addr = new;
+ return prev; */
+
+/* Use the kernel atomic light weight syscalls on hppa */
+#define LWS "0xb0"
+#define LWS_CAS 0x0
+/* Note r31 is the link register */
+#define LWS_CLOBBER "r1", "r26", "r25", "r24", "r23", "r22", "r21", "r20", "r28", "r31", "memory"
+#define ASM_EAGAIN "11"
+
+#if __ASSUME_LWS_CAS
+/* The only basic operation needed is compare and exchange. */
+# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+ ({ \
+ volatile int lws_errno = EFAULT; \
+ volatile int lws_ret = 0xdeadbeef; \
+ asm volatile( \
+ "0: \n\t" \
+ "copy %3, %%r26 \n\t" \
+ "copy %4, %%r25 \n\t" \
+ "copy %5, %%r24 \n\t" \
+ "ble " LWS "(%%sr2, %%r0) \n\t" \
+ "ldi 0, %%r20 \n\t" \
+ "cmpib,=,n " ASM_EAGAIN ",%%r21,0 \n\t" \
+ "nop \n\t" \
+ "stw %%r28, %0 \n\t" \
+ "sub %%r0, %%r21, %%r21 \n\t" \
+ "stw %%r21, %1 \n\t" \
+ : "=m" (lws_ret), "=m" (lws_errno), "=m" (*mem) \
+ : "r" (mem), "r" (oldval), "r" (newval) \
+ : LWS_CLOBBER \
+ ); \
+ \
+ if(lws_errno == EFAULT || lws_errno == ENOSYS) \
+ ABORT_INSTRUCTION; \
+ \
+ lws_ret; \
+ })
+
+# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+ ({ \
+ int ret; \
+ ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
+ /* Return 1 if it was already acquired */ \
+ (ret != oldval); \
+ })
+#else
+/* Non-atomic primitives. */
+# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+ ({ __typeof (mem) __gmemp = (mem); \
+ __typeof (*mem) __gret = *__gmemp; \
+ __typeof (*mem) __gnewval = (newval); \
+ \
+ if (__gret == (oldval)) \
+ *__gmemp = __gnewval; \
+ __gret; })
+
+# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+ ({ __typeof (mem) __gmemp = (mem); \
+ __typeof (*mem) __gnewval = (newval); \
+ \
+ *__gmemp == (oldval) ? (*__gmemp = __gnewval, 0) : 1; })
+#endif
+
+#endif /* bits/atomic.h */
+
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
index 2fd4163..e29f6e0 100644
--- a/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
@@ -31,4 +31,9 @@
#define __ASSUME_FCNTL64 1
#define __ASSUME_GETDENTS64_SYSCALL 1
+/* PA-RISC 2.6.9 kernels had the first LWS CAS support */
+#if __LINUX_KERNEL_VERSION >= 0x020609
+# define __ASSUME_LWS_CAS 1
+#endif
+
#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26be3bf7dea3c9afd39409f870c5a44dad8ba2c4
commit 26be3bf7dea3c9afd39409f870c5a44dad8ba2c4
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Jun 9 00:48:17 2006 +0000
2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat
(SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
Define.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 3097ceb..32f0f3f 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,9 @@
+2006-06-08 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Reformat
+ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
+ Define.
+
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index e2bf526..fc70758 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -46,10 +46,10 @@
#ifdef __USE_GNU
-# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */
-# define O_DIRECTORY 00010000 /* must be a directory */
-# define O_NOFOLLOW 00000200 /* don't follow links */
-# define O_NOATIME 04000000 /* Do not set atime. */
+# define O_DIRECT 00040000 /* Direct disk access. */
+# define O_DIRECTORY 00010000 /* Must be a directory. */
+# define O_NOFOLLOW 00000200 /* Do not follow links. */
+# define O_NOATIME 04000000 /* Do not set atime. */
#endif
#ifdef __USE_LARGEFILE64
@@ -76,7 +76,6 @@
# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
-
#define F_GETLK64 8 /* Get record locking info. */
#define F_SETLK64 9 /* Set record locking info (non-blocking). */
#define F_SETLKW64 10 /* Set record locking info (blocking). */
@@ -184,6 +183,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5b8dd54a664c3b9c64a238093a8bfaa74e07d3e
commit f5b8dd54a664c3b9c64a238093a8bfaa74e07d3e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Jun 8 17:38:55 2006 +0000
* sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5d2b051..c76374c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2006-06-08 Mark Shinwell <shinwell@codesourcery.com>
+
+ * sysdeps/arm/nptl/pthreaddef.h (CURRENT_STACK_FRAME): Add -12.
+
2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat.
diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h
index 783828a..b1a06cd 100644
--- a/sysdeps/arm/nptl/pthreaddef.h
+++ b/sysdeps/arm/nptl/pthreaddef.h
@@ -30,8 +30,16 @@
#define TCB_ALIGNMENT 16
-/* Location of current stack frame. */
-#define CURRENT_STACK_FRAME __builtin_frame_address (0)
+/* Location of current stack frame.
+
+ __builtin_frame_address (0) returns the value of the hard frame
+ pointer, which will point at the location of the saved PC on the
+ stack. Below this in memory is the remainder of the linkage info,
+ occupying 12 bytes. Therefore in order to address from
+ CURRENT_STACK_FRAME using "struct layout", we need to have the macro
+ return the hard FP minus 12. Of course, this makes no sense
+ without the obsolete APCS stack layout... */
+#define CURRENT_STACK_FRAME (__builtin_frame_address (0) - 12)
/* XXX Until we have a better place keep the definitions here. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02678e17f963cc353042e368369ac4242360b416
commit 02678e17f963cc353042e368369ac4242360b416
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Jun 8 17:16:29 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat.
(SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 6263540..16e092f 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Reformat.
+ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
+ Define.
+
2006-06-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY,
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index e7aae60..b6672b7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -18,7 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _FCNTL_H
+#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
@@ -31,23 +31,20 @@
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
-#define O_ACCMODE 0x0003
-#define O_RDONLY 0x0000
-#define O_WRONLY 0x0001
-#define O_RDWR 0x0002
-#define O_APPEND 0x0008
-#define O_SYNC 0x0010
-#define O_NONBLOCK 0x0080
-#define O_CREAT 0x0100 /* not fcntl */
-#define O_TRUNC 0x0200 /* not fcntl */
-#define O_EXCL 0x0400 /* not fcntl */
-#define O_NOCTTY 0x0800 /* not fcntl */
-#define O_FSYNC O_SYNC
-#define O_ASYNC 0x1000
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0x2000 /* Allow large file opens. */
-#endif
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_APPEND 0x0008
+#define O_SYNC 0x0010
+#define O_NONBLOCK 0x0080
+#define O_NDELAY O_NONBLOCK
+#define O_CREAT 0x0100 /* not fcntl */
+#define O_TRUNC 0x0200 /* not fcntl */
+#define O_EXCL 0x0400 /* not fcntl */
+#define O_NOCTTY 0x0800 /* not fcntl */
+#define O_FSYNC O_SYNC
+#define O_ASYNC 0x1000
#ifdef __USE_GNU
# define O_NOFOLLOW 0x20000 /* Do not follow links. */
@@ -56,16 +53,18 @@
# define O_NOATIME 0x40000 /* Do not set atime. */
#endif
-#define O_NDELAY O_NONBLOCK
-
-/* For now Linux has no synchronisity options for data and read
- operations. We define the symbols here but let them do the same as
- O_SYNC since this is a superset. */
+/* For now Linux has no synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC O_SYNC /* Synchronize data. */
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+#endif
+
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
@@ -102,7 +101,7 @@
# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
-/* for F_[GET|SET]FL */
+/* For F_[GET|SET]FL. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
@@ -110,12 +109,12 @@
#define F_WRLCK 1 /* Write lock. */
#define F_UNLCK 2 /* Remove lock. */
-/* for old implementation of bsd flock () */
+/* For old implementation of bsd flock(). */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
+/* Operations for bsd flock(), also used by the kernel implementation. */
# define LOCK_SH 1 /* shared lock */
# define LOCK_EX 2 /* exclusive lock */
# define LOCK_NB 4 /* or'd with one of the above to prevent
@@ -141,7 +140,7 @@
# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
#endif
-typedef struct flock
+struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
@@ -163,7 +162,8 @@ typedef struct flock
flock in o32 and n32, never has this field. */
long int pad[4];
#endif
-} flock_t;
+ };
+typedef struct flock flock_t;
#ifdef __USE_LARGEFILE64
struct flock64
@@ -176,7 +176,6 @@ struct flock64
};
#endif
-
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
@@ -199,15 +198,24 @@ struct flock64
#ifdef __USE_GNU
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
+/* Flags for SYNC_FILE_RANGE. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
@@ -221,12 +229,12 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
- unsigned int __flags);
+ unsigned int __flags);
/* Splice address range into a pipe. */
extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+ unsigned int __flags);
/* Splice two files together. */
extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b395a209f1ca12550371b2bcef1f7e0ef3cee085
commit b395a209f1ca12550371b2bcef1f7e0ef3cee085
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Jun 8 17:16:08 2006 +0000
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat.
(SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 0f6d751..5d2b051 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-06-08 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Reformat.
+ (SPLICE_F_MOVE, SPLICE_F_NONBLOCK, SPLICE_F_MORE, SPLICE_F_GIFT):
+ Define.
+
2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/initfini.c: New file.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 54510a3..287dbd5 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -21,38 +21,34 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
#ifdef __USE_GNU
# include <bits/uio.h>
#endif
+
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
#define O_NDELAY O_NONBLOCK
-#define O_SYNC 010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
#ifdef __USE_GNU
-# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0400000
+# define O_NOATIME 01000000 /* Do not set atime. */
#endif
/* For now Linux has synchronisity options for data and read operations.
@@ -63,13 +59,16 @@
# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0400000
+#endif
+
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
@@ -107,12 +106,12 @@
#define F_WRLCK 1 /* Write lock. */
#define F_UNLCK 2 /* Remove lock. */
-/* for old implementation of bsd flock () */
+/* For old implementation of bsd flock(). */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
+/* Operations for bsd flock(), also used by the kernel implementation. */
# define LOCK_SH 1 /* shared lock */
# define LOCK_EX 2 /* exclusive lock */
# define LOCK_NB 4 /* or'd with one of the above to prevent
@@ -185,15 +184,24 @@ struct flock64
#ifdef __USE_GNU
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
+/* Flags for SYNC_FILE_RANGE. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
@@ -207,12 +215,12 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
/* Selective file content synch'ing. */
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
- unsigned int __flags);
+ unsigned int __flags);
/* Splice address range into a pipe. */
extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
- unsigned int __flags);
+ unsigned int __flags);
/* Splice two files together. */
extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd34510699e36cad3a44d28c55b88556bee916ee
commit bd34510699e36cad3a44d28c55b88556bee916ee
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jun 2 15:37:27 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY,
RLIM64_INFINITY): Define appropriately for N64. Use unsigned
types.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index c446ae7..6263540 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,11 @@
2006-06-02 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIM_INFINITY,
+ RLIM64_INFINITY): Define appropriately for N64. Use unsigned
+ types.
+
+2006-06-02 Joseph Myers <joseph@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
Don't use struct timespec.
* sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv,
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 9e99f5d..1c8b99a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -107,14 +107,22 @@ enum __rlimit_resource
};
/* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((long int)(~0UL >> 1))
+#if _MIPS_SIM == _ABI64
+/* The N64 syscall uses this value. */
+# define RLIM_INFINITY 0xffffffffffffffffUL
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffUL
+# endif
#else
-# define RLIM_INFINITY 0x7fffffffffffffffLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0x7fffffffffffffffLL
+/* The O32 and N32 syscalls use 0x7fffffff. */
+# ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+# else
+# define RLIM_INFINITY 0x7fffffffffffffffULL
+# endif
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffULL
+# endif
#endif
/* We can represent all limits. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7f9cd89c25fb82b6d22b5f31ef55755bd53d61e
commit d7f9cd89c25fb82b6d22b5f31ef55755bd53d61e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jun 2 15:29:03 2006 +0000
* sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
Don't use struct timespec.
* sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv,
__xstat64_conv): Copy individual timespec fields.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index d970dd8..c446ae7 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,10 @@
+2006-06-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
+ Don't use struct timespec.
+ * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv,
+ __xstat64_conv): Copy individual timespec fields.
+
2006-06-02 Richard Sandiford <richard@codesourcery.com>
* sysdeps/mips/Makefile (ASFLAGS-.os): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 9de33df..e785bcd 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -16,9 +16,12 @@ struct kernel_stat
unsigned int st_rdev;
unsigned int __pad2[3];
long long st_size;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
+ unsigned int st_atime_sec;
+ unsigned int st_atime_nsec;
+ unsigned int st_mtime_sec;
+ unsigned int st_mtime_nsec;
+ unsigned int st_ctime_sec;
+ unsigned int st_ctime_nsec;
unsigned int st_blksize;
unsigned int __pad3;
unsigned long long st_blocks;
@@ -37,9 +40,12 @@ struct kernel_stat
long int __pad2[2];
long int st_size;
long int __pad3;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
+ unsigned int st_atime_sec;
+ unsigned int st_atime_nsec;
+ unsigned int st_mtime_sec;
+ unsigned int st_mtime_nsec;
+ unsigned int st_ctime_sec;
+ unsigned int st_ctime_nsec;
long int st_blksize;
long int st_blocks;
char st_fstype[16]; /* Filesystem type name, unsupported */
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index a2c8e84..ccab6b6 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -62,9 +62,12 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks;
- buf->st_atim = kbuf->st_atim;
- buf->st_mtim = kbuf->st_mtim;
- buf->st_ctim = kbuf->st_ctim;
+ buf->st_atim.tv_sec = kbuf->st_atime_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
@@ -107,9 +110,12 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks;
- buf->st_atim = kbuf->st_atim;
- buf->st_mtim = kbuf->st_mtim;
- buf->st_ctim = kbuf->st_ctim;
+ buf->st_atim.tv_sec = kbuf->st_atime_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atime_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtime_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctime_nsec;
buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6e2897b1c2184c975e677d0a670a9e6e7ffa9ec
commit c6e2897b1c2184c975e677d0a670a9e6e7ffa9ec
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jun 2 15:09:39 2006 +0000
* sysdeps/mips/Makefile (ASFLAGS-.os): Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 4ab64f3..d970dd8 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,7 @@
+2006-06-02 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/mips/Makefile (ASFLAGS-.os): Define.
+
2006-06-02 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def.
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 49ad3e1..9d01522 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -10,3 +10,5 @@ endif
ifeq ($(subdir),rt)
librt-sysdep_routines += rt-sysdep
endif
+
+ASFLAGS-.os += $(pic-ccflag)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37896d398009d61fd904aa4bbc3a90f1c8342226
commit 37896d398009d61fd904aa4bbc3a90f1c8342226
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Jun 2 15:06:07 2006 +0000
* sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def.
* sysdeps/mips/fpu/fesetround.c: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 2122477..4ab64f3 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-06-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/fpu/feholdexcpt.c: Add libm_hidden_def.
+ * sysdeps/mips/fpu/fesetround.c: Likewise.
+
2006-05-10 Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c
index bb37148..02ddc1b 100644
--- a/sysdeps/mips/fpu/feholdexcpt.c
+++ b/sysdeps/mips/fpu/feholdexcpt.c
@@ -36,3 +36,5 @@ feholdexcept (fenv_t *envp)
return 0;
}
+
+libm_hidden_def (feholdexcept)
diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c
index af73a72..9477109 100644
--- a/sysdeps/mips/fpu/fesetround.c
+++ b/sysdeps/mips/fpu/fesetround.c
@@ -41,3 +41,5 @@ fesetround (int round)
return 0;
}
+
+libm_hidden_def (fesetround)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=233db6e886ba086e851aae60097ed5b71efac955
commit 233db6e886ba086e851aae60097ed5b71efac955
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue May 30 15:31:04 2006 +0000
* sysdeps/arm/initfini.c: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index a80313d..0f6d751 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,9 @@
2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/initfini.c: New file.
+
+2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load
_GLOBAL_OFFSET_TABLE_ explicitly.
diff --git a/sysdeps/arm/initfini.c b/sysdeps/arm/initfini.c
new file mode 100644
index 0000000..659ee91
--- /dev/null
+++ b/sysdeps/arm/initfini.c
@@ -0,0 +1,42 @@
+/* Special .init and .fini section support. ARM version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Prevent this function from being inlined. Otherwise half of its
+ constant pool will end up in crti and the other half in crtn. */
+
+static void call_gmon_start (void) __attribute__((noinline));
+
+#include <sysdeps/generic/initfini.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8256668f37af6af3f72738f871cf2b2f0addf19
commit e8256668f37af6af3f72738f871cf2b2f0addf19
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue May 30 15:18:49 2006 +0000
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load
_GLOBAL_OFFSET_TABLE_ explicitly.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 097491f..a80313d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/dl-machine.h (elf_machine_dynamic): Rewrite to load
+ _GLOBAL_OFFSET_TABLE_ explicitly.
+
+2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals
for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index f176ff1..5347d8b 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -46,13 +46,19 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
+ first element of the GOT. We used to use the PIC register to do this
+ without a constant pool reference, but GCC 4.2 will use a pseudo-register
+ for the PIC base, so it may not be in r10. */
static inline Elf32_Addr __attribute__ ((unused))
elf_machine_dynamic (void)
{
- register Elf32_Addr *got asm ("r10");
- return *got;
+ Elf32_Addr dynamic;
+ asm ("ldr %0, 2f\n"
+ "1: add %0, pc, %0\n"
+ "b 3f\n"
+ "2: .word _GLOBAL_OFFSET_TABLE_ - (1b+8)\n"
+ "3:" : "=r" (dynamic));
+ return dynamic;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=023a0de155889342edede9c86fd53d051d85e577
commit 023a0de155889342edede9c86fd53d051d85e577
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue May 30 15:12:30 2006 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals
for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
__ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and
__ASSUME_VFORK_SYSCALL.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 2db13d0..097491f 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,10 @@
+2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h: Add conditionals
+ for __ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL,
+ __ASSUME_STAT64_SYSCALL, __ASSUME_FCNTL64, and
+ __ASSUME_VFORK_SYSCALL.
+
2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 6b70f33..6839e87 100644
--- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -28,4 +28,22 @@
#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
#endif
+/* On ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
+ syscalls were introduced in 2.3.35. */
+#if __LINUX_KERNEL_VERSION >= 131875
+# define __ASSUME_TRUNCATE64_SYSCALL 1
+# define __ASSUME_MMAP2_SYSCALL 1
+# define __ASSUME_STAT64_SYSCALL 1
+#endif
+
+/* Arm got fcntl64 in 2.4.4. */
+#if __LINUX_KERNEL_VERSION >= 132100
+# define __ASSUME_FCNTL64 1
+#endif
+
+/* The vfork syscall on arm was definitely available in 2.4. */
+#if __LINUX_KERNEL_VERSION >= 132097 && defined __i386__
+# define __ASSUME_VFORK_SYSCALL 1
+#endif
+
#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=31e69e34ab8d63768e2a03b412c975e3c042a4a3
commit 31e69e34ab8d63768e2a03b412c975e3c042a4a3
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed May 24 15:33:28 2006 +0000
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest
is a label.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 4aeaac4..3097ceb 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,10 @@
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/clone.S: .LerrorRest
+ is a label.
+
+2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/hppa/ldsodefs.h: New file.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h:
Only define MADV_* macros when __USE_BSD is present.
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 042ffa5..1884518 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -92,7 +92,7 @@ ENTRY(__clone)
bv %r0(%rp)
ldwm -64(%sp), %r3
-.LerrorRest
+.LerrorRest:
/* Restore the PIC register on error */
#ifdef PIC
copy %r3, %r19 /* parent */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c2f8f84c7eec39a073ea503ad05bc4671fcad26
commit 2c2f8f84c7eec39a073ea503ad05bc4671fcad26
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed May 24 15:31:25 2006 +0000
2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/ldsodefs.h: New file.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h:
Only define MADV_* macros when __USE_BSD is present.
(MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index fe73322..4aeaac4 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,10 @@
+2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/ldsodefs.h: New file.
+ * sysdeps/unix/sysv/linux/hppa/bits/mman.h:
+ Only define MADV_* macros when __USE_BSD is present.
+ (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
+
2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments
diff --git a/sysdeps/hppa/ldsodefs.h b/sysdeps/hppa/ldsodefs.h
new file mode 100644
index 0000000..5bd7887
--- /dev/null
+++ b/sysdeps/hppa/ldsodefs.h
@@ -0,0 +1,42 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _HPPA_LDSODEFS_H
+#define _HPPA_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_hppa_regs;
+struct La_hppa_retval;
+
+#define ARCH_PLTENTER_MEMBERS \
+ Elf32_Addr (*hppa_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \
+ uintptr_t *, struct La_hppa_regs *, \
+ unsigned int *, const char *name, \
+ long int *framesizep);
+
+#define ARCH_PLTEXIT_MEMBERS \
+ unsigned int (*hppa_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \
+ uintptr_t *, \
+ const struct La_hppa_regs *, \
+ struct La_hppa_retval *, const char *);
+
+#include_next <ldsodefs.h>
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index 0b23bd3..54531ec 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -53,14 +53,20 @@
#define MCL_CURRENT 1 /* lock all current mappings */
#define MCL_FUTURE 2 /* lock all future mappings */
-#define MADV_NORMAL 0 /* no further special treatment */
-#define MADV_RANDOM 1 /* expect random page references */
-#define MADV_SEQUENTIAL 2 /* expect sequential page references */
-#define MADV_WILLNEED 3 /* will need these pages */
-#define MADV_DONTNEED 4 /* dont need these pages */
-#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
-#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
-#define MADV_VPS_INHERIT 7 /* Inherit parents page size */
+/* Advice to "madvise" */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* no further special treatment */
+# define MADV_RANDOM 1 /* expect random page references */
+# define MADV_SEQUENTIAL 2 /* expect sequential page references */
+# define MADV_WILLNEED 3 /* will need these pages */
+# define MADV_DONTNEED 4 /* dont need these pages */
+# define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
+# define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
+# define MADV_VPS_INHERIT 7 /* Inherit parents page size */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+#endif
/* The range 12-64 is reserved for page size specification. */
#define MADV_4K_PAGES 12 /* Use 4K pages */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a29e6e84ed9e828f87dd4999eba3a6dcef1e4191
commit a29e6e84ed9e828f87dd4999eba3a6dcef1e4191
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Mon May 15 00:44:14 2006 +0000
2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments
required for NPTL.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Use var args for 6 arg
syscall.
* sysdeps/unix/sysv/linux/hppa/sysdep.h: Move DOARGS and UNDOARGS
into PSEUDO_*'s.
(ENTRY_LEAF): Define.
(PSEUDO_NOERRNO, PSEUDO_ERRVAL): Use ENTRY_LEAF.
(DO_CALL): Create frame.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index d3be675..fe73322 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,17 @@
2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/clone.S: Accept extra arguments
+ required for NPTL.
+ * sysdeps/unix/sysv/linux/hppa/sysdep.c: Use var args for 6 arg
+ syscall.
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Move DOARGS and UNDOARGS
+ into PSEUDO_*'s.
+ (ENTRY_LEAF): Define.
+ (PSEUDO_NOERRNO, PSEUDO_ERRVAL): Use ENTRY_LEAF.
+ (DO_CALL): Create frame.
+
+2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/hppa/dl-machine.h: Include tls.h
(elf_machine_fixup_plt): Returns fdesc.
(elf_machine_profile_fixup_plt): Remove.
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index f497bca..042ffa5 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -26,35 +26,62 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
+/* Non-thread code calls __clone with the following parameters:
+ int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg)
+
+ NPTL Code will call __clone with the following parameters:
+ int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
+ int *parent_tidptr, struct user_desc *newtls, int *child_pidptr)
+
+ The code should not mangle the extra input registers.
+ Syscall expects: Input to __clone:
+ 4(r25) - function pointer (r26, arg0)
+ 0(r25) - argument (r23, arg3)
+ r26 - clone flags. (r24, arg2)
+ r25+64 - user stack pointer. (r25, arg1)
+ r24 - parent tid pointer. (stack - 52)
+ r23 - struct user_desc newtls pointer. (stack - 56)
+ r22 - child tid pointer. (stack - 60)
+ r20 - clone syscall number (constant)
+ */
.text
ENTRY(__clone)
- /* FIXME: I have no idea how profiling works on hppa. */
/* Sanity check arguments. */
- comib,= 0,%arg0,.Lerror /* no NULL function pointers */
ldi -EINVAL,%ret0
- comib,= 0,%arg1,.Lerror /* no NULL stack pointers */
- nop
+ comib,=,n 0,%arg0,.Lerror /* no NULL function pointers */
+ comib,=,n 0,%arg1,.Lerror /* no NULL stack pointers */
/* Save the fn ptr and arg on the new stack. */
- stwm %arg0,64(%arg1)
- stw %arg3,-60(%arg1)
+ stwm %r26,64(%r25)
+ stw %r23,-60(%r25)
+ /* Clone arguments are (int flags, void * child_stack) */
+ copy %r24,%r26 /* flags are first */
+ /* User stack pointer is in the correct register already */
+
+ /* Load args from stack... */
+ ldw -52(%sp), %r24 /* Load parent_tidptr */
+ ldw -56(%sp), %r23 /* Load newtls */
+ ldw -60(%sp), %r22 /* Load child_tidptr */
+
+ /* Create frame to get r3 free */
+ copy %sp, %r21
+ stwm %r3, 64(%sp)
+ stw %r21, -4(%sp)
/* Save the PIC register. */
#ifdef PIC
- stw %r19,-32(%sr0, %sp) /* parent */
+ copy %r19, %r3 /* parent */
#endif
/* Do the system call */
- copy %arg2,%arg0
ble 0x100(%sr2,%r0)
ldi __NR_clone,%r20
ldi -4096,%r1
comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
- b,n .Lerror
+ b,n .LerrorRest
comib,=,n 0,%ret0,thread_start
@@ -63,18 +90,25 @@ ENTRY(__clone)
since we return immediately. */
bv %r0(%rp)
- nop
-
- /* Something bad happened -- no child created */
-.Lerror:
+ ldwm -64(%sp), %r3
+.LerrorRest
/* Restore the PIC register on error */
#ifdef PIC
- ldw -32(%sr0, %sp), %r19 /* parent */
+ copy %r3, %r19 /* parent */
#endif
+ /* Something bad happened -- no child created */
+.Lerror:
+
+ /* Set errno, save ret0 so we return with that value. */
+ copy %ret0, %r3
b __syscall_error
sub %r0,%ret0,%arg0
+ copy %r3, %ret0
+ /* Return after setting errno, and restoring ret0 */
+ bv %r0(%rp)
+ ldwm -64(%sp), %r3
thread_start:
@@ -92,7 +126,7 @@ thread_start:
copy %ret0,%arg0
/* Die horribly. */
- iitlbp %r0,(%r0)
+ iitlbp %r0,(%sr0,%r0)
PSEUDO_END(__clone)
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index 192efba..8637c51 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -16,12 +16,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <stdarg.h>
#include <sysdep.h>
#include <errno.h>
extern int __syscall_error(int err_no);
-extern int syscall (int sysnum, int arg0, int arg1, int arg2,
- int arg3, int arg4, int arg5);
+extern long int syscall (long int __sysno, ...) __THROW;
/* This routine is jumped to by all the syscall handlers, to stash
an error number into errno. */
@@ -37,22 +37,35 @@ __syscall_error (int err_no)
typically be in syscall.S. Also note that we have INLINE_SYSCALL,
INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers.
How often the function is used is unknown. */
-int
-syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4,
- int arg5)
+
+long int
+syscall (long int __sysno, ...)
{
/* FIXME: Keep this matching INLINE_SYSCALL for hppa */
+ va_list args;
+ long int arg0, arg1, arg2, arg3, arg4, arg5;
long int __sys_res;
+
+ /* Load varargs */
+ va_start (args, __sysno);
+ arg0 = va_arg (args, long int);
+ arg1 = va_arg (args, long int);
+ arg2 = va_arg (args, long int);
+ arg3 = va_arg (args, long int);
+ arg4 = va_arg (args, long int);
+ arg5 = va_arg (args, long int);
+ va_end (args);
+
{
register unsigned long int __res asm("r28");
LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
- asm volatile (STW_ASM_PIC
+ asm volatile (SAVE_ASM_PIC
" ble 0x100(%%sr2, %%r0) \n"
" copy %1, %%r20 \n"
- LDW_ASM_PIC
+ LOAD_ASM_PIC
: "=r" (__res)
- : "r" (sysnum) ASM_ARGS_6
- : CALL_CLOB_REGS CLOB_ARGS_6);
+ : "r" (__sysno) ASM_ARGS_6
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_6);
__sys_res = __res;
}
if ((unsigned long int) __sys_res >= (unsigned long int) -4095)
@@ -62,3 +75,4 @@ syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4,
}
return __sys_res;
}
+
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 4cfe63c..b302d37 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -22,28 +22,34 @@
#include <asm/unistd.h>
#include <sysdeps/generic/sysdep.h>
#include <sys/syscall.h>
-#include "config.h"
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
+#undef ASM_LINE_SEP
+#define ASM_LINE_SEP !
#undef SYS_ify
#define SYS_ify(syscall_name) (__NR_##syscall_name)
+/* WARNING: TREG must be a callee saves register so
+ that it doesn't have to be restored after a call
+ to another function */
#ifdef PIC
-/* WARNING: CANNOT BE USED IN A NOP! */
-# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP
-# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP
-# define STW_ASM_PIC " copy %%r19, %%r4\n"
-# define LDW_ASM_PIC " copy %%r4, %%r19\n"
-# define USING_GR4 "%r4",
+# define TREG %r3
+# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP
+# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP
+/* Inline assembly defines */
+# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
+# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
+# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
+# define USING_TREG TREG_ASM,
#else
-# define STW_PIC ASM_LINE_SEP
-# define LDW_PIC ASM_LINE_SEP
-# define STW_ASM_PIC " \n"
-# define LDW_ASM_PIC " \n"
-# define USING_GR4
+# define TREG %r3
+# define SAVE_PIC(SREG) nop ASM_LINE_SEP
+# define LOAD_PIC(LREG) nop ASM_LINE_SEP
+/* Inline assembly defines */
+# define TREG_ASM
+# define SAVE_ASM_PIC "nop \n"
+# define LOAD_ASM_PIC "nop \n"
+# define USING_TREG
#endif
#ifdef __ASSEMBLER__
@@ -76,31 +82,73 @@
/* We don't want the label for the error handle to be global when we define
it here. */
-#ifdef PIC
+/*#ifdef PIC
# define SYSCALL_ERROR_LABEL 0f
#else
# define SYSCALL_ERROR_LABEL syscall_error
-#endif
+#endif*/
+
+/* Argument manipulation from the stack for preparing to
+ make a syscall */
+
+#define DOARGS_0 /* nothing */
+#define DOARGS_1 /* nothing */
+#define DOARGS_2 /* nothing */
+#define DOARGS_3 /* nothing */
+#define DOARGS_4 /* nothing */
+#define DOARGS_5 ldw -52(%sp), %r22 ASM_LINE_SEP
+#define DOARGS_6 DOARGS_5 ldw -56(%sp), %r21 ASM_LINE_SEP
+
+#define UNDOARGS_0 /* nothing */
+#define UNDOARGS_1 /* nothing */
+#define UNDOARGS_2 /* nothing */
+#define UNDOARGS_3 /* nothing */
+#define UNDOARGS_4 /* nothing */
+#define UNDOARGS_5 /* nothing */
+#define UNDOARGS_6 /* nothing */
/* Define an entry point visible from C.
There is currently a bug in gdb which prevents us from specifying
incomplete stabs information. Fake some entries here which specify
the current source file. */
-#define ENTRY(name) \
- .text ASM_LINE_SEP \
- .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
- .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
- C_LABEL(name) ASM_LINE_SEP \
- CALL_MCOUNT ASM_LINE_SEP
+#define ENTRY(name) \
+ .text ASM_LINE_SEP \
+ .align ALIGNARG(4) ASM_LINE_SEP \
+ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
+ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ C_LABEL(name) ASM_LINE_SEP \
+ .PROC ASM_LINE_SEP \
+ .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
+ .ENTRY ASM_LINE_SEP \
+ /* SAVE_RP says we do */ ASM_LINE_SEP \
+ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ /*FIXME: Call mcount? (carefull with stack!) */
+
+/* Some syscall wrappers do not call other functions, and
+ hence are classified as leaf, so add NO_CALLS for gdb */
+#define ENTRY_LEAF(name) \
+ .text ASM_LINE_SEP \
+ .align ALIGNARG(4) ASM_LINE_SEP \
+ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
+ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ C_LABEL(name) ASM_LINE_SEP \
+ .PROC ASM_LINE_SEP \
+ .CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
+ .ENTRY ASM_LINE_SEP \
+ /* SAVE_RP says we do */ ASM_LINE_SEP \
+ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ /*FIXME: Call mcount? (carefull with stack!) */
#undef END
#define END(name) \
-1: ASM_LINE_SEP \
-.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP
+ .EXIT ASM_LINE_SEP \
+ .PROCEND ASM_LINE_SEP \
+.size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP
-/* If compiled for profiling, call `mcount' at the start of each function. */
-/* No, don't bother. gcc will put the call in for us. */
+/* If compiled for profiling, call `mcount' at the start
+ of each function. No, don't bother. gcc will put the
+ call in for us. */
#define CALL_MCOUNT /* Do nothing. */
/* syscall wrappers consist of
@@ -118,14 +166,16 @@
*/
#define PSEUDO(name, syscall_name, args) \
- ENTRY (name) \
- DO_CALL(syscall_name, args) ASM_LINE_SEP \
+ ENTRY (name) ASM_LINE_SEP \
+ /* If necc. load args from stack */ ASM_LINE_SEP \
+ DOARGS_##args ASM_LINE_SEP \
+ DO_CALL (syscall_name, args) ASM_LINE_SEP \
+ UNDOARGS_##args ASM_LINE_SEP \
nop ASM_LINE_SEP
#define ret \
- /* Return value set by ERRNO code */ ASM_LINE_SEP \
- bv 0(2) ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ /* Return value set by ERRNO code */ ASM_LINE_SEP \
+ bv,n 0(2) ASM_LINE_SEP
#undef PSEUDO_END
#define PSEUDO_END(name) \
@@ -133,8 +183,10 @@
/* We don't set the errno on the return from the syscall */
#define PSEUDO_NOERRNO(name, syscall_name, args) \
- ENTRY (name) \
- DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \
+ ENTRY_LEAF (name) ASM_LINE_SEP \
+ DOARGS_##args ASM_LINE_SEP \
+ DO_CALL_NOERRNO (syscall_name, args) ASM_LINE_SEP \
+ UNDOARGS_##args ASM_LINE_SEP \
nop ASM_LINE_SEP
#define ret_NOERRNO ret
@@ -146,9 +198,11 @@
/* This has to return the error value */
#undef PSEUDO_ERRVAL
#define PSEUDO_ERRVAL(name, syscall_name, args) \
- ENTRY(name) \
- DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ ENTRY_LEAF (name) ASM_LINE_SEP \
+ DOARGS_##args ASM_LINE_SEP \
+ DO_CALL_ERRVAL (syscall_name, args) ASM_LINE_SEP \
+ UNDOARGS_##args ASM_LINE_SEP \
+ nop ASM_LINE_SEP
#define ret_ERRVAL ret
@@ -161,7 +215,8 @@
#define SYSCALL_PIC_SETUP /* Nothing. */
-/* All the syscall assembly macros rely on finding the approriate
+/* FIXME: This comment is not true.
+ * All the syscall assembly macros rely on finding the approriate
SYSCALL_ERROR_LABEL or rather HANDLER. */
/* int * __errno_location(void) so you have to store your value
@@ -209,8 +264,8 @@
arg 2 gr25
arg 3 gr24
arg 4 gr23
- arg 5 -52(gr30)
- arg 6 -56(gr30)
+ arg 5 -52(sp)
+ arg 6 -56(sp)
gr22 and gr21 are caller-saves, so we can just load the arguments
there and generally be happy. */
@@ -219,46 +274,48 @@
* is intended to mimic the if (__sys_res...)
* code inside INLINE_SYSCALL
*/
+#define NO_ERROR -0x1000
#undef DO_CALL
#define DO_CALL(syscall_name, args) \
- DOARGS_##args ASM_LINE_SEP \
- STW_PIC ASM_LINE_SEP \
+ copy TREG,%r1 ASM_LINE_SEP \
+ copy %sp,TREG ASM_LINE_SEP \
+ /* Create a frame */ ASM_LINE_SEP \
+ stwm %r1, 64(%sp) ASM_LINE_SEP \
+ stw %rp, -20(%sp) ASM_LINE_SEP \
+ stw TREG, -4(%sp) ASM_LINE_SEP \
+ /* Save r19 */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) ASM_LINE_SEP \
/* Do syscall, delay loads # */ ASM_LINE_SEP \
ble 0x100(%sr2,%r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
- ldi -0x1000,%r1 ASM_LINE_SEP \
- cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
- /* save rp or we get lost */ ASM_LINE_SEP \
- stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
- /* Restore r19 from frame */ ASM_LINE_SEP \
- LDW_PIC ASM_LINE_SEP \
- stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
+ /* Restore r19 from TREG */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
- /* create frame */ ASM_LINE_SEP \
- ldo 64(%sp), %sp ASM_LINE_SEP \
- ldo -64(%sp), %sp ASM_LINE_SEP \
+ /* Use TREG for temp storage */ ASM_LINE_SEP \
+ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
/* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
/* do a -1*syscall_ret0 */ ASM_LINE_SEP \
- ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \
- sub %r0, %r26, %r26 ASM_LINE_SEP \
+ sub %r0, TREG, TREG ASM_LINE_SEP \
/* Store into errno location */ ASM_LINE_SEP \
- stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
/* return -1 as error */ ASM_LINE_SEP \
ldo -1(%r0), %ret0 ASM_LINE_SEP \
- ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \
-0: ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP
+L(pre_end): ASM_LINE_SEP \
+ /* Restore return pointer */ ASM_LINE_SEP \
+ ldw -84(%sp),%rp ASM_LINE_SEP \
+ /* Restore our frame, restoring TREG */ ASM_LINE_SEP \
+ ldwm -64(%sp), TREG ASM_LINE_SEP
/* We do nothing with the return, except hand it back to someone else */
#undef DO_CALL_NOERRNO
#define DO_CALL_NOERRNO(syscall_name, args) \
- DOARGS_##args \
/* No need to store r19 */ ASM_LINE_SEP \
ble 0x100(%sr2,%r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
- /* Caller will restore r19 */ ASM_LINE_SEP \
- UNDOARGS_##args
+ /* Caller will restore r19 */ ASM_LINE_SEP
/* Here, we return the ERRVAL in assembly, note we don't call the
error handler function, but we do 'negate' the return _IF_
@@ -266,34 +323,15 @@
#undef DO_CALL_ERRVAL
#define DO_CALL_ERRVAL(syscall_name, args) \
- DOARGS_##args ASM_LINE_SEP \
/* No need to store r19 */ ASM_LINE_SEP \
ble 0x100(%sr2,%r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
/* Caller will restore r19 */ ASM_LINE_SEP \
- ldi -0x1000,%r1 ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
sub %r0, %ret0, %ret0 ASM_LINE_SEP \
-0: ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP
-
-#define DOARGS_0 /* nothing */
-#define DOARGS_1 /* nothing */
-#define DOARGS_2 /* nothing */
-#define DOARGS_3 /* nothing */
-#define DOARGS_4 /* nothing */
-#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP
-#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \
- ldw -56(%r30), %r21 ASM_LINE_SEP
-
+0: ASM_LINE_SEP
-#define UNDOARGS_0 /* nothing */
-#define UNDOARGS_1 /* nothing */
-#define UNDOARGS_2 /* nothing */
-#define UNDOARGS_3 /* nothing */
-#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 /* nothing */
-#define UNDOARGS_6 /* nothing */
#else
@@ -305,27 +343,28 @@
registers r20 -> r26 will conflict with the list so they
are treated specially. Although r19 is clobbered by the syscall
we cannot say this because it would violate ABI, thus we say
- r4 is clobbered and use that register to save/restore r19
+ TREG is clobbered and use that register to save/restore r19
across the syscall. */
-#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \
+#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \
"%r20", "%r29", "%r31"
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) ({ \
+#define INLINE_SYSCALL(name, nr, args...) \
+({ \
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
LOAD_ARGS_##nr(args) \
- /* FIXME: HACK stw/ldw r19 around syscall */ \
+ /* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
- STW_ASM_PIC \
+ SAVE_ASM_PIC \
" ble 0x100(%%sr2, %%r0)\n" \
" ldi %1, %%r20\n" \
- LDW_ASM_PIC \
+ LOAD_ASM_PIC \
: "=r" (__res) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
- : CALL_CLOB_REGS CLOB_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
} \
@@ -339,13 +378,13 @@
/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
value to use within the context of the syscall
INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
- You are allowed to use the syscall result (val) and the DECL error variable
- to determine what went wrong.
+ You are allowed to use the syscall result (val) and the DECL error
+ variable to determine what went wrong.
INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
In our case we just flip the sign. */
#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+#define INTERNAL_SYSCALL_DECL(err)
/* Equivalent to (val < 0)&&(val > -4095) which is what we want */
#undef INTERNAL_SYSCALL_ERROR_P
@@ -357,46 +396,72 @@
/* Similar to INLINE_SYSCALL but we don't set errno */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
-({ \
- long __sys_res; \
- { \
- register unsigned long __res asm("r28"); \
- LOAD_ARGS_##nr(args) \
- /* FIXME: HACK stw/ldw r19 around syscall */ \
- asm volatile( \
- STW_ASM_PIC \
- " ble 0x100(%%sr2, %%r0)\n" \
- " ldi %1, %%r20\n" \
- LDW_ASM_PIC \
- : "=r" (__res) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
- : CALL_CLOB_REGS CLOB_ARGS_##nr \
- ); \
- __sys_res = (long)__res; \
- } \
- __sys_res; \
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+({ \
+ long __sys_res; \
+ { \
+ register unsigned long __res asm("r28"); \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+ LOAD_ASM_PIC \
+ : "=r" (__res) \
+ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ __sys_res = (long)__res; \
+ } \
+ __sys_res; \
})
+
+/* The _NCS variant allows non-constant syscall numbers. */
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+({ \
+ long __sys_res; \
+ { \
+ register unsigned long __res asm("r28"); \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK save/load r19 around syscall */ \
+ asm volatile( \
+ SAVE_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " copy %1, %%r20\n" \
+ LOAD_ASM_PIC \
+ : "=r" (__res) \
+ : "r" (name) ASM_ARGS_##nr \
+ : "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ __sys_res = (long)__res; \
+ } \
+ __sys_res; \
+ })
+
+
+
#define LOAD_ARGS_0()
-#define LOAD_ARGS_1(r26) \
- register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
- LOAD_ARGS_0()
-#define LOAD_ARGS_2(r26,r25) \
- register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
- LOAD_ARGS_1(r26)
-#define LOAD_ARGS_3(r26,r25,r24) \
- register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
- LOAD_ARGS_2(r26,r25)
-#define LOAD_ARGS_4(r26,r25,r24,r23) \
- register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
- LOAD_ARGS_3(r26,r25,r24)
-#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
- register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
- LOAD_ARGS_4(r26,r25,r24,r23)
-#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
- register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
- LOAD_ARGS_5(r26,r25,r24,r23,r22)
+#define LOAD_ARGS_1(r26) \
+ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
+ LOAD_ARGS_0()
+#define LOAD_ARGS_2(r26,r25) \
+ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
+ LOAD_ARGS_1(r26)
+#define LOAD_ARGS_3(r26,r25,r24) \
+ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
+ LOAD_ARGS_2(r26,r25)
+#define LOAD_ARGS_4(r26,r25,r24,r23) \
+ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
+ LOAD_ARGS_3(r26,r25,r24)
+#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
+ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
+ LOAD_ARGS_4(r26,r25,r24,r23)
+#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
+ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
+ LOAD_ARGS_5(r26,r25,r24,r23,r22)
/* Even with zero args we use r20 for the syscall number */
#define ASM_ARGS_0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=084442fce3d029f1c04ecf6b3dea5c7856fdc02a
commit 084442fce3d029f1c04ecf6b3dea5c7856fdc02a
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sun May 14 23:54:47 2006 +0000
2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h: Include tls.h
(elf_machine_fixup_plt): Returns fdesc.
(elf_machine_profile_fixup_plt): Remove.
(elf_machine_plt_value): Returns fdesc.
(elf_machine_runtime_setup): Check that dl_profile != NULL.
(ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define.
(RTLD_START): Use iitlbp with sr0.
(elf_machine_type_class): Include TLS relocs.
(reassemble_21, reassemble_14): Define.
(elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R,
TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support.
(TRAMPOLINE_TEMPLATE): Move to ...
* sysdeps/hppa/dl-trampoline.S: ... here.
* sysdeps/hppa/abort-instr.h: Use iitlbp with sr0.
* sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h.
(DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR,
DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define.
* sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments.
* sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define.
Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index b927ecf..d3be675 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,26 @@
+2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-machine.h: Include tls.h
+ (elf_machine_fixup_plt): Returns fdesc.
+ (elf_machine_profile_fixup_plt): Remove.
+ (elf_machine_plt_value): Returns fdesc.
+ (elf_machine_runtime_setup): Check that dl_profile != NULL.
+ (ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define.
+ (RTLD_START): Use iitlbp with sr0.
+ (elf_machine_type_class): Include TLS relocs.
+ (reassemble_21, reassemble_14): Define.
+ (elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R,
+ TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support.
+ (TRAMPOLINE_TEMPLATE): Move to ...
+ * sysdeps/hppa/dl-trampoline.S: ... here.
+ * sysdeps/hppa/abort-instr.h: Use iitlbp with sr0.
+ * sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h.
+ (DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR,
+ DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define.
+ * sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments.
+ * sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define.
+ Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit.
+
2006-04-27 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and
diff --git a/sysdeps/hppa/abort-instr.h b/sysdeps/hppa/abort-instr.h
index f1afea4..c13b0e5 100644
--- a/sysdeps/hppa/abort-instr.h
+++ b/sysdeps/hppa/abort-instr.h
@@ -3,4 +3,4 @@
We go with iitlbp because it has a history of being used to crash
programs. */
-#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)")
+#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%sr0, %r0)")
diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h
index e69de29..2c1c81d 100644
--- a/sysdeps/hppa/bits/link.h
+++ b/sysdeps/hppa/bits/link.h
@@ -0,0 +1,57 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+/* Registers for entry into PLT on hppa. */
+typedef struct La_hppa_regs
+{
+ uint32_t lr_reg[4];
+ double lr_fpreg[4];
+ uint32_t lr_sp;
+ uint32_t lr_ra;
+} La_hppa_regs;
+
+/* Return values for calls from PLT on hppa. */
+typedef struct La_hppa_retval
+{
+ uint32_t lrv_r28;
+ uint32_t lrv_r29;
+ double lr_fr4;
+} La_hppa_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_hppa_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_hppa_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_hppa_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_hppa_regs *__inregs,
+ La_hppa_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 84436e7..89a2d22 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -20,6 +20,8 @@
#define ELF_FUNCTION_PTR_IS_SPECIAL
#define DL_UNMAP_IS_SPECIAL
+#include <dl-fptr.h>
+
/* Forward declaration. */
struct link_map;
@@ -63,3 +65,16 @@ void _dl_unmap (struct link_map *map);
((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
#define DL_DT_FINI_ADDRESS(map, addr) \
((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
+
+/* The type of the return value of fixup/profile_fixup */
+#define DL_FIXUP_VALUE_TYPE struct fdesc
+
+/* Construct a fixup value from the address and linkmap */
+#define DL_FIXUP_MAKE_VALUE(map, addr) \
+ ((struct fdesc) { (addr), (map)->l_info[DT_PLTGOT]->d_un.d_ptr })
+
+/* Extract the code address from a fixup value */
+#define DL_FIXUP_VALUE_CODE_ADDR(value) ((value).ip)
+#define DL_FIXUP_VALUE_ADDR(value) ((uintptr_t) &(value))
+#define DL_FIXUP_ADDR_VALUE(addr) (*(struct fdesc *) (addr))
+
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index d29501d..dd5a281 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -31,6 +31,7 @@
#include <errno.h>
#include <dl-fptr.h>
#include <abort-instr.h>
+#include <tls.h>
# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX))
# define VALID_ELF_ABIVERSION(ver) (ver == 0)
@@ -116,43 +117,28 @@ elf_machine_load_address (void)
return dynamic - elf_machine_dynamic ();
}
-/* Fixup a PLT entry to bounce directly to the function at VALUE.
- Optimized non-profile version. */
-static inline Elf32_Addr
+/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+static inline struct fdesc __attribute__ ((always_inline))
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
const Elf32_Rela *reloc,
- Elf32_Addr *reloc_addr, Elf32_Addr value)
+ Elf32_Addr *reloc_addr, struct fdesc value)
{
/* map is the link_map for the caller, t is the link_map for the object
being called */
- reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]);
- reloc_addr[0] = value;
- /* Return the PLT slot rather than the function value so that the
- trampoline can load the new LTP. */
- return (Elf32_Addr) reloc_addr;
-}
-
-/* Fixup a PLT entry to bounce directly to the function at VALUE. */
-#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt
-static inline Elf32_Addr
-elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t,
- const Elf32_Rela *reloc,
- Elf32_Addr *reloc_addr, Elf32_Addr value)
-{
- if(__builtin_expect (t == NULL, 1))
- return (Elf32_Addr) reloc_addr;
- /* Return the PLT slot rather than the function value so that the
- trampoline can load the new LTP. */
- return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value);
+ reloc_addr[1] = value.gp;
+ /* Need to ensure that the gp is visible before the code
+ entry point is updated */
+ ((volatile Elf32_Addr *) reloc_addr)[0] = value.ip;
+ return value;
}
/* Return the final value of a plt relocation. */
-static inline Elf32_Addr
+static inline struct fdesc
elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
- Elf32_Addr value)
+ struct fdesc value)
{
- /* We are rela only */
- return value + reloc->r_addend;
+ /* We are rela only, return a function descriptor as a plt entry. */
+ return (struct fdesc) { value.ip + reloc->r_addend, value.gp };
}
/* Set up the loaded object described by L so its unrelocated PLT
@@ -181,7 +167,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
extern void _dl_runtime_resolve (void);
extern void _dl_runtime_profile (void);
-
+
/* Linking lazily */
if (lazy)
{
@@ -215,9 +201,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
/* Found the GOT! */
register Elf32_Addr ltp __asm__ ("%r19");
- /* Identify this shared object. */
+
+ /* Identify this shared object. Second entry in the got. */
got[1] = (Elf32_Addr) l;
-
+
/* This function will be called to perform the relocation. */
if (__builtin_expect (!profile, 1))
{
@@ -236,7 +223,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
}
else
{
- if (_dl_name_match_p (GLRO(dl_profile), l))
+ if (GLRO(dl_profile) != NULL
+ && _dl_name_match_p (GLRO(dl_profile), l))
{
/* This is the object we are looking for. Say that
we really want profiling and the timers are
@@ -316,6 +304,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
+
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER hppa_gnu_pltenter
+#define ARCH_LA_PLTEXIT hppa_gnu_pltexit
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -367,7 +360,7 @@ asm ( \
" ldw,ma 8(%r26),%r19\n" \
\
/* Uh oh! We didn't find one. Abort. */ \
-" iitlbp %r0,(%r0)\n" \
+" iitlbp %r0,(%sr0,%r0)\n" \
\
"2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \
" add %r19,%r20,%r19\n" /* And add the load offset. */ \
@@ -471,85 +464,28 @@ asm ( \
" ldw 4(%r3),%r19\n" /* load the object's gp */ \
" bv %r0(%r2)\n" \
" depi 2,31,2,%r23\n" /* delay slot */ \
- );
-
+);
-/* This code gets called via the .plt stub, and is used in
- dl-runtime.c to call the `fixup' function and then redirect to the
- address it returns.
-
- WARNING: This template is also used by gcc's __cffc, and expects
- that the "bl" for fixup() exist at a particular offset.
- Do not change this template without changing gcc, while the prefix
- "bl" should fix everything so gcc finds the right spot, it will
- slow down __cffc when it attempts to call fixup to resolve function
- descriptor references. Please refer to gcc/gcc/config/pa/fptr.c
-
- Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
- extern void tramp_name (void); \
- asm ( \
- " .text\n" \
- /* FAKE bl to provide gcc's __cffc with fixup's address */ \
- " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \
- " .globl " #tramp_name "\n" \
- " .type " #tramp_name ",@function\n" \
- #tramp_name ":\n" \
- " .proc\n" \
- " .callinfo frame=64,calls,save_rp\n" \
- " .entry\n" \
- /* Save return pointer */ \
- " stw %r2,-20(%sp)\n" \
- /* Save argument registers in the call stack frame. */ \
- " stw %r26,-36(%sp)\n" \
- " stw %r25,-40(%sp)\n" \
- " stw %r24,-44(%sp)\n" \
- " stw %r23,-48(%sp)\n" \
- /* Build a call frame, and save structure pointer. */ \
- " stwm %r28,64(%sp)\n" \
- \
- /* Set up args to fixup func. */ \
- " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \
- " copy %r19,%r25\n" /* (2) reloc offset */ \
- " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \
- \
- /* Call the real address resolver. */ \
- " bl " #fixup_name ",%r2\n" \
- " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \
- \
- " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \
- " ldw 4(%r28),%r19\n" \
- " ldwm -64(%sp),%r28\n" \
- /* Arguments. */ \
- " ldw -36(%sp),%r26\n" \
- " ldw -40(%sp),%r25\n" \
- " ldw -44(%sp),%r24\n" \
- " ldw -48(%sp),%r23\n" \
- /* Call the real function. */ \
- " bv %r0(%r22)\n" \
- /* Return pointer. */ \
- " ldw -20(%sp),%r2\n" \
- " .exit\n" \
- " .procend\n");
-
-#ifndef PROF
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup);
-#else
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
- strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
-#endif
-
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ a TLS variable, so references should not be allowed to define the value.
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
of the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_type_class(type) \
- ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \
- * ELF_RTYPE_CLASS_PLT) \
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+# define elf_machine_type_class(type) \
+ ((((type) == R_PARISC_IPLT \
+ || (type) == R_PARISC_EPLT \
+ || (type) == R_PARISC_TLS_DTPMOD32 \
+ || (type) == R_PARISC_TLS_DTPOFF32 \
+ || (type) == R_PARISC_TLS_TPREL32) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
+#else
+#define elf_machine_type_class(type) \
+ ((((type) == R_PARISC_IPLT \
+ || (type) == R_PARISC_EPLT) \
+ * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
+#endif
/* Used by the runtime in fixup to figure out if reloc is *really* PLT */
#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
@@ -579,9 +515,22 @@ dl_platform_init (void)
/* These are only actually used where RESOLVE_MAP is defined, anyway. */
#ifdef RESOLVE_MAP
+#define reassemble_21(as21) \
+ ( (((as21) & 0x100000) >> 20) \
+ | (((as21) & 0x0ffe00) >> 8) \
+ | (((as21) & 0x000180) << 7) \
+ | (((as21) & 0x00007c) << 14) \
+ | (((as21) & 0x000003) << 12))
+
+#define reassemble_14(as14) \
+ ( (((as14) & 0x1fff) << 1) \
+ | (((as14) & 0x2000) >> 13))
+
auto void __attribute__((always_inline))
-elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
- const Elf32_Sym *sym, const struct r_found_version *version,
+elf_machine_rela (struct link_map *map,
+ const Elf32_Rela *reloc,
+ const Elf32_Sym *sym,
+ const struct r_found_version *version,
void *const reloc_addr_arg)
{
Elf32_Addr *const reloc_addr = reloc_addr_arg;
@@ -590,7 +539,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
struct link_map *sym_map;
Elf32_Addr value;
-# if !defined RTLD_BOOTSTRAP && !defined SHARED
+# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
@@ -612,6 +561,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
# else
sym_map = RESOLVE_MAP (&sym, version, r_type);
# endif
+
if (sym_map)
{
value = sym ? sym_map->l_addr + sym->st_value : 0;
@@ -635,6 +585,27 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
break;
+ case R_PARISC_DIR21L:
+ {
+ unsigned int insn = *(unsigned int *)reloc_addr;
+ value = sym_map->l_addr + sym->st_value
+ + ((reloc->r_addend + 0x1000) & -0x2000);
+ value = value >> 11;
+ insn = (insn &~ 0x1fffff) | reassemble_21 (value);
+ *(unsigned int *)reloc_addr = insn;
+ }
+ return;
+
+ case R_PARISC_DIR14R:
+ {
+ unsigned int insn = *(unsigned int *)reloc_addr;
+ value = ((sym_map->l_addr + sym->st_value) & 0x7ff)
+ + (((reloc->r_addend & 0x1fff) ^ 0x1000) - 0x1000);
+ insn = (insn &~ 0x3fff) | reassemble_14 (value);
+ *(unsigned int *)reloc_addr = insn;
+ }
+ return;
+
case R_PARISC_PLABEL32:
/* Easy rule: If there is a symbol and it is global, then we
need to make a dynamic function descriptor. Otherwise we
@@ -653,15 +624,42 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2);
break;
+ case R_PARISC_PLABEL21L:
+ case R_PARISC_PLABEL14R:
+ {
+ unsigned int insn = *(unsigned int *)reloc_addr;
+
+ if (__builtin_expect (sym == NULL, 0))
+ break;
+
+ value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2);
+
+ if (r_type == R_PARISC_PLABEL21L)
+ {
+ value >>= 11;
+ insn = (insn &~ 0x1fffff) | reassemble_21 (value);
+ }
+ else
+ {
+ value &= 0x7ff;
+ insn = (insn &~ 0x3fff) | reassemble_14 (value);
+ }
+
+ *(unsigned int *)reloc_addr = insn;
+ }
+ return;
+
case R_PARISC_IPLT:
if (__builtin_expect (sym_map != NULL, 1))
{
- elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value);
+ elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr,
+ DL_FIXUP_MAKE_VALUE(sym_map, value));
}
else
{
/* If we get here, it's a (weak) undefined sym. */
- elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
+ elf_machine_fixup_plt (NULL, map, reloc, reloc_addr,
+ DL_FIXUP_MAKE_VALUE(map, value));
}
return;
@@ -685,6 +683,28 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
memcpy (reloc_addr_arg, (void *) value,
MIN (sym->st_size, refsym->st_size));
return;
+
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP)
+ case R_PARISC_TLS_DTPMOD32:
+ value = sym_map->l_tls_modid;
+ break;
+
+ case R_PARISC_TLS_DTPOFF32:
+ /* During relocation all TLS symbols are defined and used.
+ Therefore the offset is already correct. */
+ if (sym != NULL)
+ *reloc_addr = sym->st_value;
+ return;
+
+ case R_PARISC_TLS_TPREL32:
+ /* The offset is negative, forward from the thread pointer */
+ if (sym != NULL)
+ {
+ CHECK_STATIC_TLS (map, sym_map);
+ value = sym_map->l_tls_offset + sym->st_value + reloc->r_addend;
+ }
+ break;
+#endif /* use TLS */
case R_PARISC_NONE: /* Alright, Wilbur. */
return;
diff --git a/sysdeps/hppa/dl-trampoline.S b/sysdeps/hppa/dl-trampoline.S
new file mode 100644
index 0000000..c476138
--- /dev/null
+++ b/sysdeps/hppa/dl-trampoline.S
@@ -0,0 +1,197 @@
+/* PLT trampolines. hppa version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+/* This code gets called via the .plt stub, and is used in
+ dl-runtime.c to call the `_dl_fixup' function and then redirect
+ to the address it returns. `_dl_fixup' takes two
+ arguments, however `_dl_profile_fixup' takes a number of
+ parameters for use with library auditing (LA).
+
+ WARNING: This template is also used by gcc's __cffc, and expects
+ that the "bl" for _dl_runtime_resolve exist at a particular offset.
+ Do not change this template without changing gcc, while the prefix
+ "bl" should fix everything so gcc finds the right spot, it will
+ slow down __cffc when it attempts to call fixup to resolve function
+ descriptor references. Please refer to gcc/gcc/config/pa/fptr.c
+
+ Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
+
+ /* FAKE bl to provide gcc's __cffc with fixup loc. */
+ .text
+ bl _dl_fixup, %r2
+ .text
+ .align 4
+ .global _dl_runtime_resolve
+ .type _dl_runtime_resolve,@function
+_dl_runtime_resolve:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
+ .ENTRY
+ /* SAVE_RP says we do */
+ stw %rp, -20(%sp)
+
+ /* Save static link register */
+ stw %r29,-16(%sp)
+ /* Save argument registers in the call stack frame. */
+ stw %r26,-36(%sp)
+ stw %r25,-40(%sp)
+ stw %r24,-44(%sp)
+ stw %r23,-48(%sp)
+
+ /* Build a call frame, and save structure pointer. */
+ copy %sp, %r26 /* Copy previous sp */
+ /* Save function result address (on entry) */
+ stwm %r28,128(%sp)
+
+ /* Save floating point argument registers */
+ ldo -56(%sp),%r26
+ fstd,ma %fr4,-8(%r26)
+ fstd,ma %fr5,-8(%r26)
+ fstd,ma %fr6,-8(%r26)
+ fstd %fr7,0(%r26)
+
+ /* Fillin some frame info to follow ABI */
+ stw %r21,-32(%sp) /* PIC register value */
+ stw %r26,-4(%sp) /* Previous sp */
+
+ /* Set up args to fixup func, needs only two arguments */
+ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
+ copy %r19,%r25 /* (2) reloc offset */
+
+ /* Call the real address resolver. */
+ bl _dl_fixup,%rp
+ copy %r21,%r19 /* set fixup func ltp */
+
+ /* Load up the returned func descriptor */
+ copy %ret0, %r22
+ copy %ret1, %r19
+
+ /* Reload arguments fp args */
+ ldo -80(%sp),%r26
+ fldd,ma 8(%r26),%fr7
+ fldd,ma 8(%r26),%fr6
+ fldd,ma 8(%r26),%fr5
+ fldd 0(%r26),%fr4
+
+ /* Adjust sp, and restore function result address*/
+ ldwm -128(%sp),%r28
+
+ /* Reload static link register */
+ ldw -16(%sp),%r29
+ /* Reload general args */
+ ldw -36(%sp),%r26
+ ldw -40(%sp),%r25
+ ldw -44(%sp),%r24
+ ldw -48(%sp),%r23
+
+ /* Jump to new function, but return to previous function */
+ bv %r0(%r22)
+ ldw -20(%sp),%rp
+ .EXIT
+ .PROCEND
+ .size _dl_runtime_resolve, . - _dl_runtime_resolve
+
+
+ /* FIXME:
+ Need to largely rewrite the bottom half of
+ this code in order to save and restore the
+ LA struct from the stack along with
+ interpreted parameters.
+ */
+ .text
+ .align 4
+ .global _dl_runtime_profile
+ .type _dl_runtime_profile,@function
+_dl_runtime_profile:
+ .PROC
+ .CALLINFO FRAME=128,CALLS,SAVE_RP,ENTRY_GR=3
+ .ENTRY
+
+ /* SAVE_RP says we do */
+ stw %rp, -20(%sp)
+
+ /* Save static link register */
+ stw %r29,-16(%sp)
+ /* Save argument registers in the call stack frame. */
+ stw %r26,-36(%sp)
+ stw %r25,-40(%sp)
+ stw %r24,-44(%sp)
+ stw %r23,-48(%sp)
+
+ /* Build a call frame, and save structure pointer. */
+ copy %sp, %r26 /* Copy previous sp */
+ /* Save function result address (on entry) */
+ stwm %r28,128(%sp)
+
+ /* Save floating point argument registers */
+ ldo -56(%sp),%r26
+ fstd,ma %fr4,-8(%r26)
+ fstd,ma %fr5,-8(%r26)
+ fstd,ma %fr6,-8(%r26)
+ fstd %fr7,0(%r26)
+
+ /* Fillin some frame info to follow ABI */
+ stw %r21,-32(%sp) /* PIC register value */
+ stw %r26,-4(%sp) /* Previous sp */
+
+ /* Set up args to fixup func, needs five arguments */
+ ldw 8+4(%r20),%r26 /* (1) got[1] == struct link_map */
+ copy %r19,%r25 /* (2) reloc offset */
+ copy %rp,%r24 /* (3) profile_fixup needs rp */
+ copy %r0,%r23 /* (4) regs */
+ ldo -56(%sp), %r1
+ stw %r1, -52(%sp) /* (5) long int *framesizep */
+
+ /* Call the real address resolver. */
+ bl _dl_profile_fixup,%rp
+ copy %r21,%r19 /* set fixup func ltp */
+
+ /* Load up the returned func descriptor */
+ copy %ret0, %r22
+ copy %ret1, %r19
+
+ /* Reload arguments fp args */
+ ldo -80(%sp),%r26
+ fldd,ma 8(%r26),%fr7
+ fldd,ma 8(%r26),%fr6
+ fldd,ma 8(%r26),%fr5
+ fldd 0(%r26),%fr4
+
+ /* Adjust sp, and restore function result address*/
+ ldwm -128(%sp),%r28
+
+ /* Reload static link register */
+ ldw -16(%sp),%r29
+ /* Reload general args */
+ ldw -36(%sp),%r26
+ ldw -40(%sp),%r25
+ ldw -44(%sp),%r24
+ ldw -48(%sp),%r23
+
+ /* Jump to new function, but return to previous function */
+ bv %r0(%r22)
+ ldw -20(%sp),%rp
+ .EXIT
+ .PROCEND
+ .size _dl_runtime_profile, . - _dl_runtime_profile
+
+
+
diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h
index be36567..5d02f37 100644
--- a/sysdeps/hppa/sysdep.h
+++ b/sysdeps/hppa/sysdep.h
@@ -22,9 +22,8 @@
#include <sys/syscall.h>
#include "config.h"
-#ifndef ASM_LINE_SEP
-#define ASM_LINE_SEP ;
-#endif
+#undef ASM_LINE_SEP
+#define ASM_LINE_SEP !
#ifdef __ASSEMBLER__
@@ -51,13 +50,9 @@
#define END(name) \
.PROCEND
-
-/* If compiled for profiling, call `mcount' at the start of each function. */
+/* GCC does everything for us. */
#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- XXX ASM_LINE_SEP
+#define CALL_MCOUNT
#else
#define CALL_MCOUNT /* Do nothing. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42e36d16b391a79d6a6b204c56138f5b2294e1e4
commit 42e36d16b391a79d6a6b204c56138f5b2294e1e4
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed May 10 18:57:03 2006 +0000
* sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Don't
dump sc_cause, sc_status or sc_badvaddr.
* sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Rewrite. Update
structure definitions after DSP kernel changes.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update
after the same DSP changes.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7106b9d..2122477 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,13 @@
+2006-05-10 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump): Don't
+ dump sc_cause, sc_status or sc_badvaddr.
+ * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Rewrite. Update
+ structure definitions after DSP kernel changes.
+ * sysdeps/unix/sysv/linux/mips/sys/ucontext.h (mcontext_t): Update
+ after the same DSP changes.
+
2006-05-08 Richard Sandiford <richard@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
index 079964e..99faeed 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997, 1998, 2003, 2004, 2006 Free Software
+ Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,90 +16,69 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
#include <sgidefs.h>
-#ifndef sigcontext_struct
-/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
- we need sigcontext. */
-# define sigcontext_struct sigcontext
-
-/* # include <asm/sigcontext.h> */
-/* Instead of including the kernel header, that will vary depending on
- whether the 32- or the 64-bit kernel is installed, we paste the
- contents here. In case you're wondering about the different
- licenses, the fact that the file is pasted, instead of included,
- doesn't really make any difference for the program that includes
- this header. */
#if _MIPS_SIM == _ABIO32
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
-/*
- * Keep this struct definition in sync with the sigcontext fragment
- * in arch/mips/tools/offset.c
- */
-struct sigcontext {
- unsigned int sc_regmask; /* Unused */
- unsigned int sc_status;
- unsigned long long sc_pc;
- unsigned long long sc_regs[32];
- unsigned long long sc_fpregs[32];
- unsigned int sc_ownedfp; /* Unused */
- unsigned int sc_fpc_csr;
- unsigned int sc_fpc_eir; /* Unused */
- unsigned int sc_used_math;
- unsigned int sc_ssflags; /* Unused */
- unsigned long long sc_mdhi;
- unsigned long long sc_mdlo;
+/* Certain unused fields were replaced with new ones in 2.6.12-rc4.
+ The changes were as follows:
- unsigned int sc_cause; /* Unused */
- unsigned int sc_badvaddr; /* Unused */
+ sc_cause -> sc_hi1
+ sc_badvaddr -> sc_lo1
+ sc_sigset[0] -> sc_hi2
+ sc_sigset[1] -> sc_lo2
+ sc_sigset[2] -> sc_hi3
+ sc_sigset[3] -> sc_lo3
- unsigned long sc_sigset[4]; /* kernel's sigset_t */
+ sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */
+struct sigcontext {
+ unsigned int sc_regmask;
+ unsigned int sc_status;
+ unsigned long long sc_pc;
+ unsigned long long sc_regs[32];
+ unsigned long long sc_fpregs[32];
+ unsigned int sc_ownedfp;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ unsigned long long sc_mdhi;
+ unsigned long long sc_mdlo;
+ unsigned long sc_hi1;
+ unsigned long sc_lo1;
+ unsigned long sc_hi2;
+ unsigned long sc_lo2;
+ unsigned long sc_hi3;
+ unsigned long sc_lo3;
};
-#endif /* _ASM_SIGCONTEXT_H */
-#else /* _MIPS_SIM != _ABIO32 */
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- */
-#ifndef _ASM_SIGCONTEXT_H
-#define _ASM_SIGCONTEXT_H
+#else
-/*
- * Keep this struct definition in sync with the sigcontext fragment
- * in arch/mips/tools/offset.c
- */
+/* This structure changed in 2.6.12-rc4 when DSP support was added. */
struct sigcontext {
- unsigned long long sc_regs[32];
- unsigned long long sc_fpregs[32];
- unsigned long long sc_mdhi;
- unsigned long long sc_mdlo;
- unsigned long long sc_pc;
- unsigned int sc_status;
- unsigned int sc_fpc_csr;
- unsigned int sc_fpc_eir;
- unsigned int sc_used_math;
- unsigned int sc_cause;
- unsigned int sc_badvaddr;
+ unsigned long long sc_regs[32];
+ unsigned long long sc_fpregs[32];
+ unsigned long long sc_mdhi;
+ unsigned long long sc_hi1;
+ unsigned long long sc_hi2;
+ unsigned long long sc_hi3;
+ unsigned long long sc_mdlo;
+ unsigned long long sc_lo1;
+ unsigned long long sc_lo2;
+ unsigned long long sc_lo3;
+ unsigned long long sc_pc;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ unsigned int sc_reserved;
};
-#endif /* _ASM_SIGCONTEXT_H */
#endif /* _MIPS_SIM != _ABIO32 */
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index f5bd3a2..8d2ec75 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -27,8 +27,8 @@
R8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
R16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
R24 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
- pc cause status badvaddr lo hi
- XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ pc lo hi
+ XXXXXXXX XXXXXXXX XXXXXXXX
The FPU registers will not be printed.
*/
@@ -61,11 +61,8 @@ register_dump (int fd, struct sigcontext *ctx)
for (i = 0; i < 32; i++)
hexvalue (ctx->sc_regs[i], regs[i], 8);
hexvalue (ctx->sc_pc, regs[32], 8);
- hexvalue (ctx->sc_cause, regs[33], 8);
- hexvalue (ctx->sc_status, regs[34], 8);
- hexvalue (ctx->sc_badvaddr, regs[35], 8);
- hexvalue (ctx->sc_mdhi, regs[36], 8);
- hexvalue (ctx->sc_mdlo, regs[37], 8);
+ hexvalue (ctx->sc_mdhi, regs[33], 8);
+ hexvalue (ctx->sc_mdlo, regs[34], 8);
/* Generate the output. */
ADD_STRING ("Register dump:\n\n R0 ");
@@ -92,8 +89,8 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_MEM (regs[i], 8);
ADD_STRING (" ");
}
- ADD_STRING ("\n pc cause status badvaddr lo hi\n ");
- for (i = 32; i < 38; i++)
+ ADD_STRING ("\n pc lo hi\n ");
+ for (i = 32; i < 35; i++)
{
ADD_MEM (regs[i], 8);
ADD_STRING (" ");
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index ddb499f..ac496f3 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2006 Free Software
+ Foundation, Inc. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -73,11 +73,15 @@ typedef struct
unsigned int fpc_csr;
unsigned int fpc_eir;
unsigned int used_math;
- unsigned int ssflags;
+ unsigned int dsp;
greg_t mdhi;
greg_t mdlo;
- unsigned int cause;
- unsigned int badvaddr;
+ unsigned long hi1;
+ unsigned long lo1;
+ unsigned long hi2;
+ unsigned long lo2;
+ unsigned long hi3;
+ unsigned long lo3;
} mcontext_t;
#else
typedef struct
@@ -85,14 +89,18 @@ typedef struct
gregset_t gregs;
fpregset_t fpregs;
greg_t mdhi;
+ greg_t hi1;
+ greg_t hi2;
+ greg_t hi3;
greg_t mdlo;
+ greg_t lo1;
+ greg_t lo2;
+ greg_t lo3;
greg_t pc;
- unsigned int status;
unsigned int fpc_csr;
- unsigned int fpc_eir;
unsigned int used_math;
- unsigned int cause;
- unsigned int badvaddr;
+ unsigned int dsp;
+ unsigned int reserved;
} mcontext_t;
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dab7578866433bdf07ccf6ccab8e04b33e67c547
commit dab7578866433bdf07ccf6ccab8e04b33e67c547
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon May 8 19:23:37 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add
st_atim, st_mtim and st_ctim interface.
(struct stat64): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
Replace st_atime and its padding field with st_atim. Likewise
st_mtime/st_mtim and st_ctime/st_ctim.
* sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv): Update
after above changes.
(__xstat64_conv): Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index ba14421..7106b9d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,17 @@
2006-05-08 Richard Sandiford <richard@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/bits/stat.h (struct stat): Add
+ st_atim, st_mtim and st_ctim interface.
+ (struct stat64): Likewise.
+ * sysdeps/unix/sysv/linux/mips/kernel_stat.h (struct kernel_stat):
+ Replace st_atime and its padding field with st_atim. Likewise
+ st_mtime/st_mtim and st_ctime/st_ctim.
+ * sysdeps/unix/sysv/linux/mips/xstatconv.c (__xstat_conv): Update
+ after above changes.
+ (__xstat64_conv): Likewise.
+
+2006-05-08 Richard Sandiford <richard@codesourcery.com>
+
* sysdeps/mips/ldsodefs.h: New file.
* sysdeps/mips/tst-audit.h: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 9ae38cd..2081978 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -61,16 +61,27 @@ struct stat
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
#endif
- /*
- * Actually this should be timestruc_t st_atime, st_mtime and
- * st_ctime but we don't have it under Linux.
- */
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
__time_t st_atime; /* Time of last access. */
long int __reserved0;
__time_t st_mtime; /* Time of last modification. */
long int __reserved1;
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
+#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
@@ -94,16 +105,24 @@ struct stat64
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
- /*
- * Actually this should be timestruc_t st_atime, st_mtime and
- * st_ctime but we don't have it under Linux.
- */
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+#else
__time_t st_atime; /* Time of last access. */
long int __reserved0;
__time_t st_mtime; /* Time of last modification. */
long int __reserved1;
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
+#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
long int st_pad3;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
@@ -133,12 +152,27 @@ struct stat
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
#endif
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
__time_t st_atime;
int __reserved0;
__time_t st_mtime;
int __reserved1;
__time_t st_ctime;
int __reserved2;
+#endif
__blksize_t st_blksize;
unsigned int st_pad4;
#ifndef __USE_FILE_OFFSET64
@@ -162,12 +196,24 @@ struct stat64
__dev_t st_rdev;
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+#else
__time_t st_atime;
int __reserved0;
__time_t st_mtime;
int __reserved1;
__time_t st_ctime;
int __reserved2;
+#endif
__blksize_t st_blksize;
unsigned int st_pad3;
__blkcnt64_t st_blocks;
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index cab1e71..9de33df 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -16,12 +16,9 @@ struct kernel_stat
unsigned int st_rdev;
unsigned int __pad2[3];
long long st_size;
- unsigned int st_atime;
- unsigned int __unused1;
- unsigned int st_mtime;
- unsigned int __unused2;
- unsigned int st_ctime;
- unsigned int __unused3;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
unsigned int st_blksize;
unsigned int __pad3;
unsigned long long st_blocks;
@@ -40,12 +37,9 @@ struct kernel_stat
long int __pad2[2];
long int st_size;
long int __pad3;
- long int st_atime;
- long int __unused1;
- long int st_mtime;
- long int __unused2;
- long int st_ctime;
- long int __unused3;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
long int st_blksize;
long int st_blocks;
char st_fstype[16]; /* Filesystem type name, unsupported */
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index 41d1cbb..a2c8e84 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -62,9 +62,9 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks;
- buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
+ buf->st_atim = kbuf->st_atim;
+ buf->st_mtim = kbuf->st_mtim;
+ buf->st_ctim = kbuf->st_ctim;
buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
@@ -107,9 +107,9 @@ __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks;
- buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
+ buf->st_atim = kbuf->st_atim;
+ buf->st_mtim = kbuf->st_mtim;
+ buf->st_ctim = kbuf->st_ctim;
buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19723bddeda726ca40251bfa6491ee71976d2fd5
commit 19723bddeda726ca40251bfa6491ee71976d2fd5
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon May 8 19:19:56 2006 +0000
* sysdeps/mips/ldsodefs.h: New file.
* sysdeps/mips/tst-audit.h: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 015c86f..ba14421 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-05-08 Richard Sandiford <richard@codesourcery.com>
+
+ * sysdeps/mips/ldsodefs.h: New file.
+ * sysdeps/mips/tst-audit.h: New file.
+
2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes
diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h
new file mode 100644
index 0000000..876f1c3
--- /dev/null
+++ b/sysdeps/mips/ldsodefs.h
@@ -0,0 +1,66 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef __LDSODEFS_H \
+#define _MIPS_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_mips_32_regs;
+struct La_mips_32_retval;
+struct La_mips_64_regs;
+struct La_mips_64_retval;
+
+#define ARCH_PLTENTER_MEMBERS \
+ Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_32_regs *, \
+ unsigned int *, const char *name, \
+ long int *framesizep); \
+ Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_64_regs *, \
+ unsigned int *, const char *name, \
+ long int *framesizep); \
+ Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_64_regs *, \
+ unsigned int *, const char *name, \
+ long int *framesizep);
+
+#define ARCH_PLTEXIT_MEMBERS \
+ unsigned int (*mips_o32_gnu_pltexit) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_32_regs *, \
+ struct La_mips_32_retval *, \
+ const char *); \
+ unsigned int (*mips_n32_gnu_pltexit) (Elf32_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_64_regs *, \
+ struct La_mips_64_retval *, \
+ const char *); \
+ unsigned int (*mips_n64_gnu_pltexit) (Elf64_Sym *, unsigned int, \
+ uintptr_t *, uintptr_t *, \
+ const struct La_mips_64_regs *, \
+ struct La_mips_64_retval *, \
+ const char *);
+
+#include_next <ldsodefs.h>
+
+#endif
diff --git a/sysdeps/mips/tst-audit.h b/sysdeps/mips/tst-audit.h
new file mode 100644
index 0000000..cafa3eb
--- /dev/null
+++ b/sysdeps/mips/tst-audit.h
@@ -0,0 +1,40 @@
+/* Definitions for testing PLT entry/exit auditing. ARM version.
+
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sgidefs.h>
+
+#if _MIPS_SIM == _ABIO32
+#define pltenter la_mips_o32_gnu_pltenter
+#define pltexit la_mips_o32_gnu_pltexit
+#define La_regs La_mips_32_regs
+#define La_retval La_mips_32_retval
+#else
+#if _MIPS_SIM == _ABIN32
+#define pltenter la_mips_n32_gnu_pltenter
+#define pltexit la_mips_n32_gnu_pltexit
+#else
+#define pltenter la_mips_n64_gnu_pltenter
+#define pltexit la_mips_n64_gnu_pltexit
+#endif
+#define La_regs La_mips_64_regs
+#define La_retval La_mips_64_retval
+#endif
+#define int_retval lrv_v0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18436f584f31381dea82e7a6fd211f163be90e14
commit 18436f584f31381dea82e7a6fd211f163be90e14
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 5 19:09:15 2006 +0000
Define SPLICE_F_*.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 4a20f1d..9b2e635 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -177,6 +177,7 @@ struct flock64
#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
in the range before performing the
write. */
@@ -186,6 +187,14 @@ struct flock64
# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
the range after performing the
write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
#endif
__BEGIN_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=075f1edd06726184f9e5464004043d265f268ddd
commit 075f1edd06726184f9e5464004043d265f268ddd
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri May 5 14:17:22 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes
for consistency with other ports.
(MADV_REMOVE): Correct value.
(MADV_DONTFORK, MADV_DOFORK, POSIX_MADV_NORMAL,
POSIX_MADV_RANDOM, POSIX_MADV_SEQUENTIAL, POSIX_MADV_WILLNEED,
POSIX_MADV_DONTNEED): Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 201252a..015c86f 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/mman.h: Formatting changes
+ for consistency with other ports.
+ (MADV_REMOVE): Correct value.
+ (MADV_DONTFORK, MADV_DOFORK, POSIX_MADV_NORMAL,
+ POSIX_MADV_RANDOM, POSIX_MADV_SEQUENTIAL, POSIX_MADV_WILLNEED,
+ POSIX_MADV_DONTNEED): Define.
+
2006-05-05 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index e287e3b..47d3393 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -50,7 +50,7 @@
/* Other flags. */
#define MAP_FIXED 0x10 /* Interpret addr exactly. */
#ifdef __USE_MISC
-# define MAP_FILE 0x00
+# define MAP_FILE 0
# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
# define MAP_ANON MAP_ANONYMOUS
# define MAP_RENAME MAP_ANONYMOUS
@@ -70,26 +70,37 @@
/* Flags to `msync'. */
#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
/* Flags for `mlockall'. */
#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
#define MCL_FUTURE 2 /* Lock all additions to address
space. */
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-#define MADV_NORMAL 0 /* default page-in behavior */
-#define MADV_RANDOM 1 /* page-in minimum required */
-#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
-#define MADV_WILLNEED 3 /* pre-fault pages */
-#define MADV_DONTNEED 4 /* discard these pages */
-#define MADV_REMOVE 5 /* remove these pages & resources */
-#endif
-
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
# define MREMAP_FIXED 2
#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23d0322571f85a50d325f3d94424810ad99d2424
commit 23d0322571f85a50d325f3d94424810ad99d2424
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri May 5 14:17:13 2006 +0000
* sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message
for consistency with other ports.
(MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index aaf4573..2db13d0 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-05-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/mman.h: Update error message
+ for consistency with other ports.
+ (MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK): Define.
+
2006-05-05 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 7430f15..828ec94 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/ARM version.
- Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
02111-1307 USA. */
#ifndef _SYS_MMAN_H
-# error "Never include this file directly. Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* The following definitions basically come from the kernel headers.
@@ -88,6 +88,9 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=142b51e416cfc53274386371898e6780f96d7bd4
commit 142b51e416cfc53274386371898e6780f96d7bd4
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri May 5 14:03:22 2006 +0000
2006-05-05 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove
LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
and SYNC_FILE_RANGE_WAIT_AFTER.
Declare sync_file_range, vmsplice, splice and tee.
2006-05-05 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove
LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
and SYNC_FILE_RANGE_WAIT_AFTER.
Declare sync_file_range, vmsplice, splice and tee.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5907503..aaf4573 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,11 @@
+2006-05-05 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove
+ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
+ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
+ and SYNC_FILE_RANGE_WAIT_AFTER.
+ Declare sync_file_range, vmsplice, splice and tee.
+
2006-03-27 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 19f4b41..201252a 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2006-05-05 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove
+ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
+ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE
+ and SYNC_FILE_RANGE_WAIT_AFTER.
+ Declare sync_file_range, vmsplice, splice and tee.
+
2006-03-27 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 5368515..54510a3 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -23,6 +23,9 @@
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -180,16 +183,45 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
-/* Linux-specific operations for posix_fadvise. */
+
#ifdef __USE_GNU
-# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
-# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
#endif
__BEGIN_DECLS
+#ifdef __USE_GNU
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+/* Splice address range into a pipe. */
+extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
+ unsigned int __flags);
+
+/* Splice two files together. */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+/* In-kernel implementation of tee for pipe buffers. */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 87affe3..e7aae60 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -24,6 +24,10 @@
#include <sgidefs.h>
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
+
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -193,16 +197,45 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
-/* Linux-specific operations for posix_fadvise. */
+
#ifdef __USE_GNU
-# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
-# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
#endif
__BEGIN_DECLS
+#ifdef __USE_GNU
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+/* Splice address range into a pipe. */
+extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
+ unsigned int __flags);
+
+/* Splice two files together. */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+/* In-kernel implementation of tee for pipe buffers. */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=290806a914fea8d16ab56993c10cf4c253b87645
commit 290806a914fea8d16ab56993c10cf4c253b87645
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 2 14:33:44 2006 +0000
Fix MADV_REMOVE value.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 2a84709..2f0e564 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -96,7 +96,7 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 6 /* Don't need these pages. */
-# define MADV_REMOVE 7 /* Remove these pages and resources. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
# define MADV_DONTFORK 10 /* Do not inherit across fork. */
# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1593583d58a3bbc5ab0a19bfe8319f9307113da1
commit 1593583d58a3bbc5ab0a19bfe8319f9307113da1
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Thu Apr 27 15:49:46 2006 +0000
2006-04-27 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and
define vmsplice.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 89e45ca..b927ecf 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,8 @@
+2006-04-27 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Include uio.h, and
+ define vmsplice.
+
2006-04-21 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-tls.h: New file
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 867b093..e2bf526 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -23,7 +23,9 @@
#endif
#include <sys/types.h>
-
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -196,6 +198,10 @@ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
unsigned int __flags);
+/* Splice address range into a pipe. */
+extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
+ unsigned int __flags);
+
/* Splice two files together. */
extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a122819861060aebe134b17f45f795b7559c0082
commit a122819861060aebe134b17f45f795b7559c0082
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 26 22:28:15 2006 +0000
Declare vmsplice.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 6898fe8..4a20f1d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -21,8 +21,10 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
#include <sys/types.h>
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
@@ -200,6 +202,10 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
unsigned int __flags);
+/* Splice address range into a pipe. */
+extern int vmsplice (int __fdout, const struct iovec *__iov, size_t __count,
+ unsigned int __flags);
+
/* Splice two files together. */
extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2dd372ef4e931f905c398c68e0e2cf9c7396578
commit c2dd372ef4e931f905c398c68e0e2cf9c7396578
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Sat Apr 22 02:21:00 2006 +0000
2006-04-21 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-tls.h: New file
* sysdeps/hppa/libc-tls.c: Likewise.
* sysdeps/hppa/tls-macros.h: Likewise.
* sysdeps/hppa/elf/configure: Likewise.
* sysdeps/hppa/elf/configure.in: Likewise.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index e937d9b..89e45ca 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,11 @@
+2006-04-21 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/dl-tls.h: New file
+ * sysdeps/hppa/libc-tls.c: Likewise.
+ * sysdeps/hppa/tls-macros.h: Likewise.
+ * sysdeps/hppa/elf/configure: Likewise.
+ * sysdeps/hppa/elf/configure.in: Likewise.
+
2006-04-20 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to
diff --git a/sysdeps/hppa/dl-tls.h b/sysdeps/hppa/dl-tls.h
new file mode 100644
index 0000000..1bc9aae
--- /dev/null
+++ b/sysdeps/hppa/dl-tls.h
@@ -0,0 +1,29 @@
+/* Thread-local storage handling in the ELF dynamic linker. hppa version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* Type used for the representation of TLS information in the GOT. */
+typedef struct
+{
+ unsigned long int ti_module;
+ unsigned long int ti_offset;
+} tls_index;
+
+
+extern void *__tls_get_addr (tls_index *ti);
diff --git a/sysdeps/hppa/elf/configure b/sysdeps/hppa/elf/configure
new file mode 100644
index 0000000..226c30d
--- /dev/null
+++ b/sysdeps/hppa/elf/configure
@@ -0,0 +1,63 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/hppa/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+echo "$as_me:$LINENO: checking for hppa TLS support" >&5
+echo $ECHO_N "checking for hppa TLS support... $ECHO_C" >&6
+if test "${libc_cv_hppa_tls+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.s <<\EOF
+; Setup tls data
+.section ".tdata","awT",@progbits
+foo: .data 32
+ .text
+; Test general dyanmic relocations
+test0:
+ addil LT'foo-$tls_gdidx$, %r19
+ ldo RT'foo-$tls_gdidx$(%r1), %r26
+ b __tls_get_addr
+ nop
+; Test local dynamic relocations
+test1:
+ addil LT'foo-$tls_ldidx$, %r19
+ b __tls_get_addr
+ ldo RT'foo-$tls_ldidx$(%r1), %r26
+ ldo RR'foo-$tls_dtpoff$(%r1), %r25
+ ; More variables can be loaded...
+; Test initial exec reloctiosn
+test2:
+ mfctl %cr27, %r26
+ addil LT'foo-$tls_ieoff$, %r19
+ ldw RT'foo-$tls_ieoff$(%r1), %r25
+ add %r26, %r25, %r24
+; Test local exec relocations
+test3:
+ mfctl %cr27, %r26
+ addil LR'foo-$tls_leoff$, %r26
+ ldo RR'foo-$tls_leoff$(%r1), %r25
+; Done all the TLS tests.
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_hppa_tls=yes
+else
+ libc_cv_hppa_tls=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_hppa_tls" >&5
+echo "${ECHO_T}$libc_cv_hppa_tls" >&6
+if test $libc_cv_hppa_tls = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TLS_SUPPORT 1
+_ACEOF
+
+fi
+fi
diff --git a/sysdeps/hppa/elf/configure.in b/sysdeps/hppa/elf/configure.in
new file mode 100644
index 0000000..1b70a5b
--- /dev/null
+++ b/sysdeps/hppa/elf/configure.in
@@ -0,0 +1,49 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/hppa/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for hppa TLS support, libc_cv_hppa_tls, [dnl
+cat > conftest.s <<\EOF
+; Setup tls data
+.section ".tdata","awT",@progbits
+foo: .data 32
+ .text
+; Test general dyanmic relocations
+test0:
+ addil LT'foo-$tls_gdidx$, %r19
+ ldo RT'foo-$tls_gdidx$(%r1), %r26
+ b __tls_get_addr
+ nop
+; Test local dynamic relocations
+test1:
+ addil LT'foo-$tls_ldidx$, %r19
+ b __tls_get_addr
+ ldo RT'foo-$tls_ldidx$(%r1), %r26
+ ldo RR'foo-$tls_dtpoff$(%r1), %r25
+ ; More variables can be loaded...
+; Test initial exec reloctiosn
+test2:
+ mfctl %cr27, %r26
+ addil LT'foo-$tls_ieoff$, %r19
+ ldw RT'foo-$tls_ieoff$(%r1), %r25
+ add %r26, %r25, %r24
+; Test local exec relocations
+test3:
+ mfctl %cr27, %r26
+ addil LR'foo-$tls_leoff$, %r26
+ ldo RR'foo-$tls_leoff$(%r1), %r25
+; Done all the TLS tests.
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_hppa_tls=yes
+else
+ libc_cv_hppa_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_hppa_tls = yes; then
+ AC_DEFINE(HAVE_TLS_SUPPORT)
+fi
+fi
diff --git a/sysdeps/hppa/libc-tls.c b/sysdeps/hppa/libc-tls.c
new file mode 100644
index 0000000..232f80f
--- /dev/null
+++ b/sysdeps/hppa/libc-tls.c
@@ -0,0 +1,38 @@
+/* Thread-local storage handling in the ELF dynamic linker. hppa version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <csu/libc-tls.c>
+#include <dl-tls.h>
+
+#if USE_TLS
+
+/* On hppa, linker optimizations are not required, so __tls_get_addr
+ can be called even in statically linked binaries. In this case module
+ must be always 1 and PT_TLS segment exist in the binary, otherwise it
+ would not link. */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ return (char *) dtv[1].pointer.val + ti->ti_offset;
+}
+
+#endif
+
diff --git a/sysdeps/hppa/tls-macros.h b/sysdeps/hppa/tls-macros.h
new file mode 100644
index 0000000..4c5564b
--- /dev/null
+++ b/sysdeps/hppa/tls-macros.h
@@ -0,0 +1,114 @@
+
+/* HPPA Local Exec TLS access. */
+# define TLS_LE(x) \
+ ({ int * __result; \
+ unsigned long __tmp; \
+ asm ( \
+ " mfctl %%cr27, %1\n" \
+ " addil LR'" #x "-$tls_leoff$, %1\n" \
+ " ldo RR'" #x "-$tls_leoff$(%%r1), %0\n" \
+ : "=r" (__result), "=r" (__tmp) \
+ : \
+ : "r1" ); \
+ __result; \
+ })
+
+/* HPPA Initial Exec TLS access. */
+# ifdef PIC
+# define TLS_IE(x) \
+ ({ int * __result; \
+ unsigned long __tmp, __tmp2; \
+ asm ( \
+ " mfctl %%cr27, %1\n" \
+ " addil LT'" #x "-$tls_ieoff$, %%r19\n" \
+ " ldw RT'" #x "-$tls_ieoff$(%%r1), %2\n" \
+ " add %1, %2, %0\n" \
+ : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \
+ : \
+ : "r1" ); \
+ __result; \
+ })
+# else
+# define TLS_IE(x) \
+ ({ int * __result; \
+ unsigned long __tmp, __tmp2; \
+ asm ( \
+ " mfctl %%cr27, %1\n" \
+ " addil LR'" #x "-$tls_ieoff$, %%r27\n" \
+ " ldw RR'" #x "-$tls_ieoff$(%%r1), %2\n" \
+ " add %1, %2, %0\n" \
+ : "=r" (__result), "=r" (__tmp), "=r" (__tmp2) \
+ : \
+ : "r1" ); \
+ __result; \
+ })
+# endif
+
+# ifdef PIC
+/* HPPA Local Dynamic TLS access. */
+# define TLS_LD(x) \
+ ({ int * __result; \
+ asm ( \
+ " copy %%r19, %%r4\n" \
+ " addil LT'" #x "-$tls_ldidx$, %%r19\n" \
+ " bl __tls_get_addr, %%r2\n" \
+ " ldo RT'" #x "-$tls_ldidx$(%%r1), %%r26\n" \
+ " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \
+ " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \
+ " copy %%r4, %%r19\n" \
+ : "=r" (__result) \
+ : \
+ : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \
+ "r25", "r26", "r28", "r29", "r31" ); \
+ __result; \
+ })
+# else
+# define TLS_LD(x) \
+ ({ int * __result; \
+ asm ( \
+ " addil LR'" #x "-$tls_ldidx$, %%r27\n" \
+ " bl __tls_get_addr, %%r2\n" \
+ " ldo RR'" #x "-$tls_ldidx$(%%r1), %%r26\n" \
+ " addil LR'" #x "-$tls_dtpoff$, %%r28\n" \
+ " ldo RR'" #x "-$tls_dtpoff$(%%r1), %0\n" \
+ : "=r" (__result) \
+ : \
+ : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \
+ "r25", "r26", "r28", "r29", "r31" ); \
+ __result; \
+ })
+# endif
+
+/* HPPA General Dynamic TLS access. */
+# ifdef PIC
+# define TLS_GD(x) \
+ ({ int * __result; \
+ asm ( \
+ " copy %%r19, %%r4\n" \
+ " addil LT'" #x "-$tls_gdidx$, %%r19\n" \
+ " bl __tls_get_addr, %%r2\n" \
+ " ldo RT'" #x "-$tls_gdidx$(%%r1), %%r26\n" \
+ " copy %%r28, %0\n" \
+ " copy %%r4, %%r19\n" \
+ : "=r" (__result) \
+ : \
+ : "r1", "r2", "r4", "r20", "r21", "r22", "r23", "r24", \
+ "r25", "r26", "r28", "r29", "r31" ); \
+ __result; \
+ })
+# else
+# define TLS_GD(x) \
+ ({ int * __result; \
+ asm ( \
+ " addil LR'" #x "-$tls_gdidx$, %%r27\n" \
+ " bl __tls_get_addr, %%r2\n" \
+ " ldo RR'" #x "-$tls_gdidx$(%%r1), %%r26\n" \
+ " copy %%r28, %0\n" \
+ : "=r" (__result) \
+ : \
+ : "r1", "r2", "r20", "r21", "r22", "r23", "r24", \
+ "r25", "r26", "r28", "r29", "r31" ); \
+ __result; \
+ })
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48dcf1c597b5e90d40020319758467fe6d35b15f
commit 48dcf1c597b5e90d40020319758467fe6d35b15f
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri Apr 21 00:27:20 2006 +0000
2006-04-20 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to
align parameters. Specify memory clobbers.
* sysdeps/hppa/fpu/fedisblxcpt.c (fedisableexcept): Likewise.
* sysdeps/hppa/fpu/feenablxcpt.c (feenableexcept): Likewise.
* sysdeps/hppa/fpu/fegetenv.c (fegetenv): Do not save exception
register. Use memcpy to align buffer.
* sysdeps/hppa/fpu/fegetexcept.c (fegetexcept): Store and reload
fr0. Use union to align parameters.
* sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Do not save
exception registers. Define libm_hidden_def.
* sysdeps/hppa/fpu/fesetenv.c (fesetenv): Do not save exception
registers.
* sysdeps/hppa/fpu/fesetround.c (fesetround): Use union to
align parameters, speficy memory clobbers. Define libm_hidde_def
* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use union to align
parameters. Use memcpy to align buffer.
* sysdeps/hppa/fpu/fgetexcptflg.c (fegetexceptflag): Likewise.
* sysdeps/hppa/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
* sysdeps/hppa/fpu/ftestexcept.c (fetestexcept): Likewise.
* sysdeps/hppa/fpu/libm-test-ulps: Update.
* sysdeps/hppa/fpu/bits/fenv.h: Add ABI comments.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 401a2a2..e937d9b 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,28 @@
+2006-04-20 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/fpu/fclrexcpt.c (feclearexcept): Use union to
+ align parameters. Specify memory clobbers.
+ * sysdeps/hppa/fpu/fedisblxcpt.c (fedisableexcept): Likewise.
+ * sysdeps/hppa/fpu/feenablxcpt.c (feenableexcept): Likewise.
+ * sysdeps/hppa/fpu/fegetenv.c (fegetenv): Do not save exception
+ register. Use memcpy to align buffer.
+ * sysdeps/hppa/fpu/fegetexcept.c (fegetexcept): Store and reload
+ fr0. Use union to align parameters.
+ * sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise.
+ * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Do not save
+ exception registers. Define libm_hidden_def.
+ * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Do not save exception
+ registers.
+ * sysdeps/hppa/fpu/fesetround.c (fesetround): Use union to
+ align parameters, speficy memory clobbers. Define libm_hidde_def
+ * sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use union to align
+ parameters. Use memcpy to align buffer.
+ * sysdeps/hppa/fpu/fgetexcptflg.c (fegetexceptflag): Likewise.
+ * sysdeps/hppa/fpu/fsetexcptflg.c (fesetexceptflag): Likewise.
+ * sysdeps/hppa/fpu/ftestexcept.c (fetestexcept): Likewise.
+ * sysdeps/hppa/fpu/libm-test-ulps: Update.
+ * sysdeps/hppa/fpu/bits/fenv.h: Add ABI comments.
+
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]:
diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h
index c5f8c43..6d83b14 100644
--- a/sysdeps/hppa/fpu/bits/fenv.h
+++ b/sysdeps/hppa/fpu/bits/fenv.h
@@ -62,7 +62,12 @@ typedef unsigned int fexcept_t;
/* Type representing floating-point environment. This structure
corresponds to the layout of the status and exception words in the
- register file. */
+ register file. The exception registers are never saved/stored by
+ userspace. This structure is also not correctly aligned ever, in
+ an ABI error we left out __aligned(8) and subsequently all of our
+ fenv functions must accept unaligned input, align the input, and
+ then use assembly to store fr0. This is a performance hit, but
+ means the ABI is stable. */
typedef struct
{
unsigned int __status_word;
diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c
index a7c6982..d74a449 100644
--- a/sysdeps/hppa/fpu/fclrexcpt.c
+++ b/sysdeps/hppa/fpu/fclrexcpt.c
@@ -23,14 +23,13 @@
int
feclearexcept (int excepts)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2]; } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
-
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
/* Clear all the relevant bits. */
- sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27);
- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+ s.sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
/* Success. */
return 0;
diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c
index aac6bbf..8d2e664 100644
--- a/sysdeps/hppa/fpu/fedisblxcpt.c
+++ b/sysdeps/hppa/fpu/fedisblxcpt.c
@@ -23,15 +23,16 @@
int
fedisableexcept (int excepts)
{
- unsigned int sw[2], old_exc;
+ union { unsigned long long l; unsigned int sw[2]; } s;
+ unsigned int old_exc;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
- old_exc = sw[0] & FE_ALL_EXCEPT;
+ old_exc = s.sw[0] & FE_ALL_EXCEPT;
- sw[0] &= ~(excepts & FE_ALL_EXCEPT);
- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+ s.sw[0] &= ~(excepts & FE_ALL_EXCEPT);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
return old_exc;
}
diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c
index 9ce3ca8..4b17a60 100644
--- a/sysdeps/hppa/fpu/feenablxcpt.c
+++ b/sysdeps/hppa/fpu/feenablxcpt.c
@@ -23,15 +23,16 @@
int
feenableexcept (int excepts)
{
- unsigned int sw[2], old_exc;
+ union { unsigned long long l; unsigned int sw[2]; } s;
+ unsigned int old_exc;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
- old_exc = sw[0] & FE_ALL_EXCEPT;
+ old_exc = s.sw[0] & FE_ALL_EXCEPT;
- sw[0] |= (excepts & FE_ALL_EXCEPT);
- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+ s.sw[0] |= (excepts & FE_ALL_EXCEPT);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
return old_exc;
}
diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c
index b87317b..fcf5d2d 100644
--- a/sysdeps/hppa/fpu/fegetenv.c
+++ b/sysdeps/hppa/fpu/fegetenv.c
@@ -19,15 +19,17 @@
02111-1307 USA. */
#include <fenv.h>
+#include <string.h>
int
fegetenv (fenv_t *envp)
{
+ unsigned long long buf[4], *bufptr = buf;
+
__asm__ (
- "fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
- : "=m" (*envp), "+r" (envp));
+ "fstd,ma %%fr0,8(%1) \n\t"
+ "fldd -8(%1),%%fr0 \n\t"
+ : "=m" (buf), "+r" (bufptr) : : "%r0");
+ memcpy(envp, buf, sizeof (*envp));
return 0;
}
diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c
index efd1d7d..d249dc6 100644
--- a/sysdeps/hppa/fpu/fegetexcept.c
+++ b/sysdeps/hppa/fpu/fegetexcept.c
@@ -23,10 +23,12 @@
int
fegetexcept (void)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2] } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1) \n\t"
+ "fldd 0(%1),%%fr0 \n\t"
+ : "=m" (s.l) : "r" (&s.l) : "%r0");
- return sw[0] & FE_ALL_EXCEPT;
+ return (s.sw[0] & FE_ALL_EXCEPT);
}
diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c
index aefedbc..1e606c9 100644
--- a/sysdeps/hppa/fpu/fegetround.c
+++ b/sysdeps/hppa/fpu/fegetround.c
@@ -23,10 +23,12 @@
int
fegetround (void)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2] } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1) \n\t"
+ "fldd 0(%1),%%fr0 \n\t"
+ : "=m" (s.l) : "r" (&s.l));
- return sw[0] & FE_DOWNWARD;
+ return (s.sw[0] & FE_DOWNWARD);
}
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index 5aec015..ac6eb58 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -24,33 +24,32 @@
int
feholdexcept (fenv_t *envp)
{
- fenv_t clear;
- fenv_t * _regs = envp;
+ union { unsigned long long buf[4]; fenv_t env; } clear;
+ unsigned long long *bufptr;
/* Store the environment. */
+ bufptr = clear.buf;
__asm__ (
"fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
- : "=m" (*_regs), "+r" (_regs));
- memcpy (&clear, envp, sizeof (clear));
-
- /* Now clear all exceptions. */
- clear.__status_word &= ~(FE_ALL_EXCEPT << 27);
- memset (clear.__exception, 0, sizeof (clear.__exception));
+ : "=m" (clear), "+r" (bufptr) : : "%r0");
+ memcpy (envp, &clear.env, sizeof (fenv_t));
+ /* Clear exception queues */
+ memset (clear.env.__exception, 0, sizeof (clear.env.__exception));
/* And set all exceptions to non-stop. */
- clear.__status_word &= ~FE_ALL_EXCEPT;
+ clear.env.__status_word &= ~FE_ALL_EXCEPT;
+ /* Now clear all flags */
+ clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27);
- /* Load the new environment. */
- _regs = &clear;
+ /* Load the new environment. Note: fr0 must load last to enable T-bit
+ Thus we start bufptr at the end and work backwards */
+ bufptr = (unsigned int)(clear.buf) + sizeof(unsigned int)*4;
__asm__ (
- "fldd,ma 8(%0),%%fr0\n"
- "fldd,ma 8(%0),%%fr1\n"
- "fldd,ma 8(%0),%%fr2\n"
- "fldd 0(%0),%%fr3\n"
- : : "r" (_regs));
+ "fldd,mb -8(%0),%%fr0\n"
+ : : "r" (bufptr), "m" (clear) : "%r0");
return 0;
}
+
+libm_hidden_def (feholdexcept)
+
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index 5267732..b5753ef 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -25,40 +25,38 @@
int
fesetenv (const fenv_t *envp)
{
- fenv_t temp;
- fenv_t * _regs = &temp;
+ union { unsigned long long buf[4]; fenv_t env; } temp;
+ unsigned long long *bufptr;
/* Install the environment specified by ENVP. But there are a few
values which we do not want to come from the saved environment.
Therefore, we get the current environment and replace the values
we want to use from the environment specified by the parameter. */
+ bufptr = temp.buf;
__asm__ (
"fstd,ma %%fr0,8(%1)\n"
- "fstd,ma %%fr1,8(%1)\n"
- "fstd,ma %%fr2,8(%1)\n"
- "fstd %%fr3,0(%1)\n"
- : "=m" (*_regs), "+r" (_regs));
+ : "=m" (temp), "+r" (bufptr) : : "%r0");
- temp.__status_word &= ~(FE_ALL_EXCEPT
- | (FE_ALL_EXCEPT << 27)
- | FE_DOWNWARD);
+ temp.env.__status_word &= ~(FE_ALL_EXCEPT
+ | (FE_ALL_EXCEPT << 27)
+ | FE_DOWNWARD);
if (envp == FE_DFL_ENV)
;
else if (envp == FE_NOMASK_ENV)
- temp.__status_word |= FE_ALL_EXCEPT;
+ temp.env.__status_word |= FE_ALL_EXCEPT;
else
- temp.__status_word |= (envp->__status_word
- & (FE_ALL_EXCEPT
- | FE_DOWNWARD
- | (FE_ALL_EXCEPT << 27)));
+ temp.env.__status_word |= (envp->__status_word
+ & (FE_ALL_EXCEPT
+ | FE_DOWNWARD
+ | (FE_ALL_EXCEPT << 27)));
- /* Load the new environment. */
+ /* Load the new environment. We use bufptr again since the
+ initial asm has modified the value of the register and here
+ we take advantage of that to load in reverse order so fr0
+ is loaded last and T-Bit is enabled. */
__asm__ (
- "fldd,ma -8(%1),%%fr3\n"
- "fldd,ma -8(%1),%%fr2\n"
- "fldd,ma -8(%1),%%fr1\n"
- "fldd 0(%1),%%fr0\n"
- : "=m" (*_regs), "+r" (_regs));
+ "fldd,mb -8(%1),%%fr0\n"
+ : "=m" (temp), "+r" (bufptr) : : "%r0" );
/* Success. */
return 0;
diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c
index 3687624..9f30c24 100644
--- a/sysdeps/hppa/fpu/fesetround.c
+++ b/sysdeps/hppa/fpu/fesetround.c
@@ -23,17 +23,19 @@
int
fesetround (int round)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2]; } s;
if (round & ~FE_DOWNWARD)
- /* ROUND is not a valid rounding mode. */
+ /* round is not a valid rounding mode. */
return 1;
-
+
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= ~FE_DOWNWARD;
- sw[0] |= round;
- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
+ s.sw[0] &= ~FE_DOWNWARD;
+ s.sw[0] |= round & FE_DOWNWARD;
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
return 0;
}
+
+libm_hidden_def (fesetround)
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index 7d50282..1714006 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -19,19 +19,22 @@
02111-1307 USA. */
#include <fenv.h>
+#include <string.h>
int
feupdateenv (const fenv_t *envp)
{
- unsigned int sw[2];
-
- /* Get the current exception status. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ union { unsigned long long l; unsigned int sw[2]; } s;
+ fenv_t temp;
+ /* Get the current exception status */
+ __asm__ ("fstd %%fr0,0(%1) \n\t"
+ "fldd 0(%1),%%fr0 \n\t"
+ : "=m" (s.l) : "r" (&s.l));
+ memcpy(&temp, envp, sizeof(fenv_t));
+ /* Currently raised exceptions not cleared */
+ temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27);
/* Install new environment. */
- fesetenv (envp);
- /* Raise the saved exceptions */
- feraiseexcept(sw[0] & FE_ALL_EXCEPT);
-
+ fesetenv (&temp);
/* Success. */
return 0;
}
diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c
index 27766ec..d5bcfe3 100644
--- a/sysdeps/hppa/fpu/fgetexcptflg.c
+++ b/sysdeps/hppa/fpu/fgetexcptflg.c
@@ -23,12 +23,14 @@
int
fegetexceptflag (fexcept_t *flagp, int excepts)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2]; } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1) \n\t"
+ "fldd 0(%1),%%fr0 \n\t"
+ : "=m" (s.l) : "r" (&s.l) : "%r0");
- *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+ *flagp = (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
/* Success. */
return 0;
diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c
index af35f5a..4ec3a92 100644
--- a/sysdeps/hppa/fpu/fsetexcptflg.c
+++ b/sysdeps/hppa/fpu/fsetexcptflg.c
@@ -24,16 +24,14 @@
int
fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2]; } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
-
- /* Install new enable trap bits */
- sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
-
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0");
+ /* Install new raised trap bits */
+ s.sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
/* Store the new status word. */
- __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0");
/* Success. */
return 0;
diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c
index d08d4d6..ac6d4b2 100644
--- a/sysdeps/hppa/fpu/ftestexcept.c
+++ b/sysdeps/hppa/fpu/ftestexcept.c
@@ -23,10 +23,12 @@
int
fetestexcept (int excepts)
{
- unsigned int sw[2];
+ union { unsigned long long l; unsigned int sw[2] } s;
/* Get the current status word. */
- __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ __asm__ ("fstd %%fr0,0(%1) \n\t"
+ "fldd 0(%1),%%fr0 \n\t"
+ : "=m" (s.l) : "r" (&s.l));
- return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+ return (s.sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
}
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
index b514496..c4ffefa 100644
--- a/sysdeps/hppa/fpu/libm-test-ulps
+++ b/sysdeps/hppa/fpu/libm-test-ulps
@@ -1,6 +1,9 @@
# Begin of automatic generation
# atan2
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380":
+float: 6
+ifloat: 6
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 3
ifloat: 3
@@ -258,9 +261,6 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
-double: 1
-idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
@@ -479,6 +479,11 @@ Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
ifloat: 1
+# lround
+Test "lround (1071930.0008) == 1071930":
+double: -214511494
+idouble: -214511494
+
# sincos
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
@@ -640,8 +645,8 @@ idouble: 1
# Maximal error of functions:
Function: "atan2":
-float: 3
-ifloat: 3
+float: 6
+ifloat: 6
Function: "atanh":
float: 1
@@ -777,10 +782,6 @@ Function: Real part of "csqrt":
float: 1
ifloat: 1
-Function: Real part of "ctan":
-double: 1
-idouble: 1
-
Function: Imaginary part of "ctan":
double: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb1636152429f05766214ca1a70cc867500f8553
commit cb1636152429f05766214ca1a70cc867500f8553
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Apr 19 05:43:52 2006 +0000
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]:
Define MMAP_FIXED.
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]:
Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index d01248b..401a2a2 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,13 @@
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]:
+ Define MMAP_FIXED.
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_GNU]:
+ Define SYNC_FILE_RANGE_WAIT_BEFORE, SYNC_FILE_RANGE_WRITE,
+ SYNC_FILE_RANGE_WAIT_AFTER, sync_file_range, splice, tee.
+
+2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file.
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 9d967c6..867b093 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -172,10 +172,38 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+#ifdef __USE_GNU
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+#endif
+
__BEGIN_DECLS
+#ifdef __USE_GNU
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+/* Splice two files together. */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+/* In-kernel implementation of tee for pipe buffers. */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index 1eb1233..0b23bd3 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -80,4 +80,7 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
+
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e86e37a903fc79d6bd28d0a72b173f301026caf
commit 8e86e37a903fc79d6bd28d0a72b173f301026caf
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Apr 19 05:37:33 2006 +0000
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 15a1f00..d01248b 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,5 +1,9 @@
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h: New file.
+
+2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
+
* sysdeps/hppa/linuxthreads/pspinlock.c: New file.
* sysdeps/hppa/linuxthreads/pt-machine.h: Likewise.
* sysdeps/hppa/linuxthreads/tls.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
new file mode 100644
index 0000000..2fd4163
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/kernel-features.h
@@ -0,0 +1,34 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* There are an infinite number of PA-RISC kernel versions numbered
+ 2.4.0. But they've not really been released as such. We require
+ and expect the final version here. */
+#define __ASSUME_32BITUIDS 1
+#define __ASSUME_TRUNCATE64_SYSCALL 1
+#define __ASSUME_MMAP2_SYSCALL 1
+#define __ASSUME_STAT64_SYSCALL 1
+#define __ASSUME_IPC64 1
+#define __ASSUME_ST_INO_64_BIT 1
+#define __ASSUME_FCNTL64 1
+#define __ASSUME_GETDENTS64_SYSCALL 1
+
+#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d3b4a7723a58d00e26c3a144b67d97ec25e241a
commit 5d3b4a7723a58d00e26c3a144b67d97ec25e241a
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Apr 19 05:35:34 2006 +0000
2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/linuxthreads/pspinlock.c: New file.
* sysdeps/hppa/linuxthreads/pt-machine.h: Likewise.
* sysdeps/hppa/linuxthreads/tls.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h:
Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h:
Likewise.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 0968014..15a1f00 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,17 @@
+2006-04-19 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/hppa/linuxthreads/pspinlock.c: New file.
+ * sysdeps/hppa/linuxthreads/pt-machine.h: Likewise.
+ * sysdeps/hppa/linuxthreads/tls.h: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h:
+ Likewise.
+
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/hppa/shlib-versions: New file.
diff --git a/sysdeps/hppa/linuxthreads/pspinlock.c b/sysdeps/hppa/linuxthreads/pspinlock.c
new file mode 100644
index 0000000..e5a5545
--- /dev/null
+++ b/sysdeps/hppa/linuxthreads/pspinlock.c
@@ -0,0 +1,82 @@
+/* POSIX spinlock implementation. hppa version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <pthread.h>
+#include "internals.h"
+
+int
+__pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ volatile unsigned int *addr = __ldcw_align (lock);
+
+ while (__ldcw (addr) == 0)
+ while (*addr == 0) ;
+
+ return 0;
+}
+weak_alias (__pthread_spin_lock, pthread_spin_lock)
+
+
+int
+__pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+ volatile unsigned int *a = __ldcw_align (lock);
+
+ return __ldcw (a) ? 0 : EBUSY;
+}
+weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
+
+
+int
+__pthread_spin_unlock (pthread_spinlock_t *lock)
+{
+ volatile unsigned int *a = __ldcw_align (lock);
+ int tmp = 1;
+ /* This should be a memory barrier to newer compilers */
+ __asm__ __volatile__ ("stw,ma %1,0(%0)"
+ : : "r" (a), "r" (tmp) : "memory");
+ return 0;
+}
+weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
+
+
+int
+__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
+{
+ /* We can ignore the `pshared' parameter. Since we are busy-waiting
+ all processes which can access the memory location `lock' points
+ to can use the spinlock. */
+ volatile unsigned int *a = __ldcw_align (lock);
+ int tmp = 1;
+ /* This should be a memory barrier to newer compilers */
+ __asm__ __volatile__ ("stw,ma %1,0(%0)"
+ : : "r" (a), "r" (tmp) : "memory");
+ return 0;
+}
+weak_alias (__pthread_spin_init, pthread_spin_init)
+
+
+int
+__pthread_spin_destroy (pthread_spinlock_t *lock)
+{
+ /* Nothing to do. */
+ return 0;
+}
+weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
diff --git a/sysdeps/hppa/linuxthreads/pt-machine.h b/sysdeps/hppa/linuxthreads/pt-machine.h
new file mode 100644
index 0000000..f35523f
--- /dev/null
+++ b/sysdeps/hppa/linuxthreads/pt-machine.h
@@ -0,0 +1,134 @@
+/* Machine-dependent pthreads configuration and inline functions.
+ hppa version.
+ Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H 1
+
+#include <sys/types.h>
+#include <bits/initspin.h>
+
+#ifndef PT_EI
+# define PT_EI extern inline __attribute__ ((always_inline))
+#endif
+
+extern inline long int testandset (__atomic_lock_t *spinlock);
+extern inline int __compare_and_swap (long int *p, long int oldval, long int newval);
+extern inline int lock_held (__atomic_lock_t *spinlock);
+extern inline int __load_and_clear (__atomic_lock_t *spinlock);
+
+/* Get some notion of the current stack. Need not be exactly the top
+ of the stack, just something somewhere in the current frame. */
+#define CURRENT_STACK_FRAME stack_pointer
+register char * stack_pointer __asm__ ("%r30");
+
+/* Get/Set thread-specific pointer. We have to call into the kernel to
+ * modify it, but we can read it in user mode. */
+#ifndef THREAD_SELF
+#define THREAD_SELF __get_cr27()
+#endif
+
+#ifndef SET_THREAD_SELF
+#define SET_THREAD_SELF(descr) __set_cr27(descr)
+#endif
+/* Use this to determine type */
+struct _pthread_descr_struct *__thread_self;
+
+static inline struct _pthread_descr_struct * __get_cr27(void)
+{
+ long cr27;
+ asm ("mfctl %%cr27, %0" : "=r" (cr27) : );
+ return (struct _pthread_descr_struct *) cr27;
+}
+
+#ifndef INIT_THREAD_SELF
+#define INIT_THREAD_SELF(descr, nr) __set_cr27(descr)
+#endif
+
+static inline void __set_cr27(struct _pthread_descr_struct * cr27)
+{
+ asm ( "ble 0xe0(%%sr2, %%r0)\n\t"
+ "copy %0, %%r26"
+ : : "r" (cr27) : "r26" );
+}
+
+/* We want the OS to assign stack addresses. */
+#define FLOATING_STACKS 1
+#define ARCH_STACK_MAX_SIZE 8*1024*1024
+
+/* The hppa only has one atomic read and modify memory operation,
+ load and clear, so hppa spinlocks must use zero to signify that
+ someone is holding the lock. The address used for the ldcw
+ semaphore must be 16-byte aligned. */
+#define __ldcw(a) \
+({ \
+ unsigned int __ret; \
+ __asm__ __volatile__("ldcw 0(%1),%0" \
+ : "=r" (__ret) : "r" (a) : "memory"); \
+ __ret; \
+})
+
+/* Strongly ordered lock reset */
+#define __lock_reset(lock_addr, tmp) \
+({ \
+ __asm__ __volatile__ ("stw,ma %1,0(%0)" \
+ : : "r" (lock_addr), "r" (tmp) : "memory"); \
+})
+
+/* Because malloc only guarantees 8-byte alignment for malloc'd data,
+ and GCC only guarantees 8-byte alignment for stack locals, we can't
+ be assured of 16-byte alignment for atomic lock data even if we
+ specify "__attribute ((aligned(16)))" in the type declaration. So,
+ we use a struct containing an array of four ints for the atomic lock
+ type and dynamically select the 16-byte aligned int from the array
+ for the semaphore. */
+#define __PA_LDCW_ALIGNMENT 16
+#define __ldcw_align(a) ({ \
+ volatile unsigned int __ret = (unsigned int) a; \
+ if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
+ __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
+ (unsigned int *) __ret; \
+})
+
+/* Spinlock implementation; required. */
+PT_EI int
+__load_and_clear (__atomic_lock_t *spinlock)
+{
+ volatile unsigned int *a = __ldcw_align (spinlock);
+
+ return __ldcw (a);
+}
+
+/* Emulate testandset */
+PT_EI long int
+testandset (__atomic_lock_t *spinlock)
+{
+ return (__load_and_clear(spinlock) == 0);
+}
+
+PT_EI int
+lock_held (__atomic_lock_t *spinlock)
+{
+ volatile unsigned int *a = __ldcw_align (spinlock);
+
+ return *a == 0;
+}
+
+#endif /* pt-machine.h */
diff --git a/sysdeps/hppa/linuxthreads/tls.h b/sysdeps/hppa/linuxthreads/tls.h
new file mode 100644
index 0000000..3d33a18
--- /dev/null
+++ b/sysdeps/hppa/linuxthreads/tls.h
@@ -0,0 +1,163 @@
+/* Definition for thread-local data handling. linuxthreads/hppa version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H
+
+#ifndef __ASSEMBLER__
+# include <pt-machine.h>
+# include <stdbool.h>
+# include <stddef.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
+} dtv_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+#endif /* __ASSEMBLER__ */
+
+
+#if defined HAVE_TLS_SUPPORT
+
+/* Signal that TLS support is available. */
+# define USE_TLS 1
+
+# ifndef __ASSEMBLER__
+
+typedef struct
+{
+ dtv_t *dtv;
+ void *private;
+} tcbhead_t;
+
+/* Include some syscall information for other headers */
+# include <sysdep.h>
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+
+/* This is the size of the TCB. */
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
+
+/* This is the size we need before TCB. */
+# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
+
+/* The TLS blocks start right after the TCB. */
+# define TLS_DTV_AT_TP 1
+
+/* Return the thread descriptor for the current thread. */
+# undef THREAD_SELF
+# define THREAD_SELF \
+ ({ struct _pthread_descr_struct *__self; \
+ __self = __get_cr27(); \
+ __self - 1; \
+ })
+
+# undef INIT_THREAD_SELF
+# define INIT_THREAD_SELF(descr, nr) \
+ ({ struct _pthread_descr_struct *__self = (void *)descr; \
+ __set_cr27(__self + 1); \
+ 0; \
+ })
+
+/* Access to data in the thread descriptor is easy. */
+#define THREAD_GETMEM(descr, member) \
+ ((void) sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) \
+ ((void) sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+ ((void) sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+ ((void) sizeof (descr), THREAD_SELF->member = (value))
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ ((tcbhead_t *) (tcbp))->dtv = dtvp + 1
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) \
+ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
+ __tcbp->dtv = dtv; \
+ })
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))->dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(tcbp, secondcall) \
+ ({ __set_cr27(tcbp); 0; })
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ ({ tcbhead_t *__tcbp = (tcbhead_t *)__get_cr27(); \
+ __tcbp->dtv; \
+ })
+
+# define TLS_MULTIPLE_THREADS_IN_TCB 1
+
+/* Get the thread descriptor definition. This must be after the
+ the definition of THREAD_SELF for TLS. */
+# include <linuxthreads/descr.h>
+
+# endif /* __ASSEMBLER__ */
+
+#else
+
+# ifndef __ASSEMBLER__
+
+typedef struct
+{
+ void *tcb;
+ dtv_t *dtv;
+ void *self;
+ int multiple_threads;
+} tcbhead_t;
+
+/* Get the thread descriptor definition. */
+# include <linuxthreads/descr.h>
+
+# define NONTLS_INIT_TP \
+ do { \
+ static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 }; \
+ INIT_THREAD_SELF(&nontls_init_tp, 0); \
+ } while (0)
+
+# endif /* __ASSEMBLER__ */
+
+#endif /* HAVE_TLS_SUPPORT */
+
+#endif /* tls.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c
new file mode 100644
index 0000000..0d6da82
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/aio_cancel.c
@@ -0,0 +1,33 @@
+#include <shlib-compat.h>
+
+#define aio_cancel64 XXX
+#include <aio.h>
+#undef aio_cancel64
+#include <errno.h>
+
+extern __typeof (aio_cancel) __new_aio_cancel;
+extern __typeof (aio_cancel) __old_aio_cancel;
+
+#define aio_cancel __new_aio_cancel
+
+#include <sysdeps/pthread/aio_cancel.c>
+
+#undef aio_cancel
+strong_alias (__new_aio_cancel, __new_aio_cancel64);
+versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3);
+versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3);
+
+#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3)
+
+#undef ECANCELED
+#define aio_cancel __old_aio_cancel
+#define ECANCELED 125
+
+#include <sysdeps/pthread/aio_cancel.c>
+
+#undef aio_cancel
+strong_alias (__old_aio_cancel, __old_aio_cancel64);
+compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1);
+compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1);
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h
new file mode 100644
index 0000000..ff0ec20
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/initspin.h
@@ -0,0 +1,41 @@
+/* PA-RISC specific definitions for spinlock initializers.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Initial value of a spinlock. PA-RISC only implements atomic load
+ and clear so this must be non-zero. */
+#define __LT_SPINLOCK_INIT ((__atomic_lock_t) { { 1, 1, 1, 1 } })
+
+/* Initialize global spinlocks without cast, generally macro wrapped */
+#define __LT_SPINLOCK_ALT_INIT { { 1, 1, 1, 1 } }
+
+/* Macros for lock initializers, not using the above definition.
+ The above definition is not used in the case that static initializers
+ use this value. */
+#define __LOCK_ALT_INITIALIZER { __LT_SPINLOCK_ALT_INIT, 0 }
+
+/* Used to initialize _pthread_fastlock's in non-static case */
+#define __LOCK_INITIALIZER ((struct _pthread_fastlock){ __LT_SPINLOCK_INIT, 0 })
+
+/* Used in pthread_atomic initialization */
+#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_ALT_INIT }
+
+/* Tell the rest of the code that the initializer is non-zero without
+ explaining it's internal structure */
+#define __LT_INITIALIZER_NOT_ZERO
+
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
new file mode 100644
index 0000000..e2c6f59
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
@@ -0,0 +1,160 @@
+/* Linuxthreads - a simple clone()-based implementation of Posix */
+/* threads for Linux. */
+/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
+/* */
+/* This program is free software; you can redistribute it and/or */
+/* modify it under the terms of the GNU Library General Public License */
+/* as published by the Free Software Foundation; either version 2 */
+/* of the License, or (at your option) any later version. */
+/* */
+/* This program is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU Library General Public License for more details. */
+
+#if !defined _BITS_TYPES_H && !defined _PTHREAD_H
+# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H 1
+
+#define __need_schedparam
+#include <bits/sched.h>
+
+/* We need 128-bit alignment for the ldcw semaphore. At most, we are
+ assured of 64-bit alignment for stack locals and malloc'd data. Thus,
+ we use a struct with four ints for the atomic lock type. The locking
+ code will figure out which of the four to use for the ldcw semaphore. */
+typedef volatile struct {
+ int lock[4];
+} __attribute__ ((aligned(16))) __atomic_lock_t;
+
+/* Fast locks (not abstract because mutexes and conditions aren't abstract). */
+struct _pthread_fastlock
+{
+ __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also,
+ adaptive SMP lock stores spin count here. */
+ long int __status; /* "Free" or "taken" or head of waiting list */
+};
+
+#ifndef _PTHREAD_DESCR_DEFINED
+/* Thread descriptors */
+typedef struct _pthread_descr_struct *_pthread_descr;
+# define _PTHREAD_DESCR_DEFINED
+#endif
+
+
+/* Attributes for threads. */
+typedef struct __pthread_attr_s
+{
+ int __detachstate;
+ int __schedpolicy;
+ struct __sched_param __schedparam;
+ int __inheritsched;
+ int __scope;
+ size_t __guardsize;
+ int __stackaddr_set;
+ void *__stackaddr;
+ size_t __stacksize;
+} pthread_attr_t;
+
+
+/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
+
+#ifdef __GLIBC_HAVE_LONG_LONG
+__extension__ typedef long long __pthread_cond_align_t;
+#else
+typedef long __pthread_cond_align_t;
+#endif
+
+typedef struct
+{
+ struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
+ _pthread_descr __c_waiting; /* Threads waiting on this condition */
+ char __padding[48 - sizeof (struct _pthread_fastlock)
+ - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
+ __pthread_cond_align_t __align;
+} pthread_cond_t;
+
+
+/* Attribute for conditionally variables. */
+typedef struct
+{
+ int __dummy;
+} pthread_condattr_t;
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */
+/* (The layout is unnatural to maintain binary compatibility
+ with earlier releases of LinuxThreads.) */
+typedef struct
+{
+ int __m_reserved; /* Reserved for future use */
+ int __m_count; /* Depth of recursive locking */
+ _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */
+ int __m_kind; /* Mutex kind: fast, recursive or errcheck */
+ struct _pthread_fastlock __m_lock; /* Underlying fast lock */
+} pthread_mutex_t;
+
+
+/* Attribute for mutex. */
+typedef struct
+{
+ int __mutexkind;
+} pthread_mutexattr_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#ifdef __USE_UNIX98
+/* Read-write locks. */
+typedef struct _pthread_rwlock_t
+{
+ struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */
+ int __rw_readers; /* Number of readers */
+ _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */
+ _pthread_descr __rw_read_waiting; /* Threads waiting for reading */
+ _pthread_descr __rw_write_waiting; /* Threads waiting for writing */
+ int __rw_kind; /* Reader/Writer preference selection */
+ int __rw_pshared; /* Shared between processes or not */
+} pthread_rwlock_t;
+
+
+/* Attribute for read-write locks. */
+typedef struct
+{
+ int __lockkind;
+ int __pshared;
+} pthread_rwlockattr_t;
+#endif
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type. */
+typedef __atomic_lock_t pthread_spinlock_t;
+
+/* POSIX barrier. */
+typedef struct {
+ struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */
+ int __ba_required; /* Threads needed for completion */
+ int __ba_present; /* Threads waiting */
+ _pthread_descr __ba_waiting; /* Queue of waiting threads */
+} pthread_barrier_t;
+
+/* barrier attribute */
+typedef struct {
+ int __pshared;
+} pthread_barrierattr_t;
+
+#endif
+
+
+/* Thread identifiers */
+typedef unsigned long int pthread_t;
+
+#endif /* bits/pthreadtypes.h */
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
new file mode 100644
index 0000000..817cf59
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/malloc-machine.h
@@ -0,0 +1,73 @@
+/* HP-PARISC macro definitions for mutexes, thread-specific data
+ and parameters for malloc.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MALLOC_MACHINE_H
+#define _MALLOC_MACHINE_H
+
+#undef thread_atfork_static
+
+#include <atomic.h>
+#include <bits/libc-lock.h>
+
+__libc_lock_define (typedef, mutex_t)
+
+/* Since our lock structure does not tolerate being initialized to zero, we must
+ modify the standard function calls made by malloc */
+# define mutex_init(m) \
+ __libc_maybe_call (__pthread_mutex_init, (m, NULL), \
+ (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) )
+# define mutex_lock(m) \
+ __libc_maybe_call (__pthread_mutex_lock, (m), \
+ (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))
+# define mutex_trylock(m) \
+ __libc_maybe_call (__pthread_mutex_trylock, (m), \
+ (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)))
+# define mutex_unlock(m) \
+ __libc_maybe_call (__pthread_mutex_unlock, (m), \
+ (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) )
+
+/* This is defined by newer gcc version unique for each module. */
+extern void *__dso_handle __attribute__ ((__weak__));
+
+#include <fork.h>
+
+#ifdef SHARED
+# define thread_atfork(prepare, parent, child) \
+ __register_atfork (prepare, parent, child, __dso_handle)
+#else
+# define thread_atfork(prepare, parent, child) \
+ __register_atfork (prepare, parent, child, \
+ &__dso_handle == NULL ? NULL : __dso_handle)
+#endif
+
+/* thread specific data for glibc */
+
+#include <bits/libc-tsd.h>
+
+typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
+__libc_tsd_define (static, MALLOC) /* declaration/common definition */
+#define tsd_key_create(key, destr) ((void) (key))
+#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
+#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
+
+#include <sysdeps/generic/malloc-machine.h>
+
+#endif /* !defined(_MALLOC_MACHINE_H) */
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c b/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c
new file mode 100644
index 0000000..27f850c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/pt-initfini.c
@@ -0,0 +1,109 @@
+/* Special .init and .fini section support for HPPA. Linuxthreads version.
+ Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ The GNU C Library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file is compiled into assembly code which is then munged by a sed
+ script into two files: crti.s and crtn.s.
+
+ * crti.s puts a function prologue at the beginning of the
+ .init and .fini sections and defines global symbols for
+ those addresses, so they can be called as functions.
+
+ * crtn.s puts the corresponding function epilogues
+ in the .init and .fini sections. */
+
+/* If we use the standard C version, the linkage table pointer won't
+ be properly preserved due to the splitting up of function prologues
+ and epilogues. Therefore we write these in assembly to make sure
+ they do the right thing. */
+
+__asm__ (
+"#include \"defs.h\"\n"
+"\n"
+"/*@HEADER_ENDS*/\n"
+"\n"
+"/*@_init_PROLOG_BEGINS*/\n"
+" .section .init\n"
+" .align 4\n"
+" .globl _init\n"
+" .type _init,@function\n"
+"_init:\n"
+" stw %rp,-20(%sp)\n"
+" stwm %r4,64(%sp)\n"
+" stw %r19,-32(%sp)\n"
+" bl __pthread_initialize_minimal,%rp\n"
+" copy %r19,%r4 /* delay slot */\n"
+" copy %r4,%r19\n"
+"/*@_init_PROLOG_ENDS*/\n"
+"\n"
+"/*@_init_EPILOG_BEGINS*/\n"
+"/* Here is the tail end of _init. */\n"
+" .section .init\n"
+" ldw -84(%sp),%rp\n"
+" copy %r4,%r19\n"
+" bv %r0(%rp)\n"
+"_end_init:\n"
+" ldwm -64(%sp),%r4\n"
+"\n"
+"/* Our very own unwind info, because the assembler can't handle\n"
+" functions split into two or more pieces. */\n"
+" .section .PARISC.unwind,\"a\",@progbits\n"
+" .extern _init\n"
+" .word _init, _end_init\n"
+" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
+"\n"
+"/*@_init_EPILOG_ENDS*/\n"
+"\n"
+"/*@_fini_PROLOG_BEGINS*/\n"
+" .section .fini\n"
+" .align 4\n"
+" .globl _fini\n"
+" .type _fini,@function\n"
+"_fini:\n"
+" stw %rp,-20(%sp)\n"
+" stwm %r4,64(%sp)\n"
+" stw %r19,-32(%sp)\n"
+" copy %r19,%r4\n"
+"/*@_fini_PROLOG_ENDS*/\n"
+"\n"
+"/*@_fini_EPILOG_BEGINS*/\n"
+" .section .fini\n"
+" ldw -84(%sp),%rp\n"
+" copy %r4,%r19\n"
+" bv %r0(%rp)\n"
+"_end_fini:\n"
+" ldwm -64(%sp),%r4\n"
+"\n"
+" .section .PARISC.unwind,\"a\",@progbits\n"
+" .extern _fini\n"
+" .word _fini, _end_fini\n"
+" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
+"\n"
+"/*@_fini_EPILOG_ENDS*/\n"
+"\n"
+"/*@TRAILER_BEGINS*/\n"
+);
diff --git a/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
new file mode 100644
index 0000000..e01936a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/linuxthreads/sysdep-cancel.h
@@ -0,0 +1,238 @@
+/* cancellable system calls for Linux/HPPA.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Carlos O'Donell <carlos@baldric.uwo.ca>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# ifndef NO_ERROR
+# define NO_ERROR -0x1000
+# endif
+
+/* The syscall cancellation mechanism requires userspace
+ assistance, the following code does roughly this:
+
+ do arguments (read arg5 and arg6 to registers)
+ setup frame
+
+ check if there are threads, yes jump to pseudo_cancel
+
+ unthreaded:
+ syscall
+ check syscall return (jump to pre_end)
+ set errno
+ set return to -1
+ (jump to pre_end)
+
+ pseudo_cancel:
+ cenable
+ syscall
+ cdisable
+ check syscall return (jump to pre_end)
+ set errno
+ set return to -1
+
+ pre_end
+ restore stack
+
+ It is expected that 'ret' and 'END' macros will
+ append an 'undo arguments' and 'return' to the
+ this PSEUDO macro. */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ DOARGS_##args ASM_LINE_SEP \
+ copy TREG, %r1 ASM_LINE_SEP \
+ copy %sp, TREG ASM_LINE_SEP \
+ stwm %r1, 64(%sp) ASM_LINE_SEP \
+ stw %rp, -20(%sp) ASM_LINE_SEP \
+ stw TREG, -4(%sp) ASM_LINE_SEP \
+ /* Done setting up frame, continue... */ ASM_LINE_SEP \
+ SINGLE_THREAD_P ASM_LINE_SEP \
+ cmpib,<>,n 0,%ret0,L(pseudo_cancel) ASM_LINE_SEP \
+L(unthreaded): ASM_LINE_SEP \
+ /* Save r19 */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) ASM_LINE_SEP \
+ /* Do syscall, delay loads # */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
+ /* Restore r19 from TREG */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* Use TREG for temp storage */ ASM_LINE_SEP \
+ copy %ret0, TREG /* delay */ ASM_LINE_SEP \
+ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
+ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
+ sub %r0, TREG, TREG ASM_LINE_SEP \
+ /* Store into errno location */ ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ b L(pre_end) ASM_LINE_SEP \
+ /* return -1 as error */ ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 /* delay */ ASM_LINE_SEP \
+L(pseudo_cancel): ASM_LINE_SEP \
+ PUSHARGS_##args /* Save args */ ASM_LINE_SEP \
+ /* Save r19 into TREG */ ASM_LINE_SEP \
+ CENABLE /* FUNC CALL */ ASM_LINE_SEP \
+ SAVE_PIC(TREG) /* delay */ ASM_LINE_SEP \
+ /* restore syscall args */ ASM_LINE_SEP \
+ POPARGS_##args ASM_LINE_SEP \
+ /* save mask from cenable (use stub rp slot) */ ASM_LINE_SEP \
+ stw %ret0, -24(%sp) ASM_LINE_SEP \
+ /* ... SYSCALL ... */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 /* delay */ ASM_LINE_SEP \
+ /* ............... */ ASM_LINE_SEP \
+ LOAD_PIC(TREG) ASM_LINE_SEP \
+ /* pass mask as arg0 to cdisable */ ASM_LINE_SEP \
+ ldw -24(%sp), %r26 ASM_LINE_SEP \
+ CDISABLE ASM_LINE_SEP \
+ stw %ret0, -24(%sp) /* delay */ ASM_LINE_SEP \
+ /* Restore syscall return */ ASM_LINE_SEP \
+ ldw -24(%sp), %ret0 ASM_LINE_SEP \
+ /* compare error */ ASM_LINE_SEP \
+ ldi NO_ERROR,%r1 ASM_LINE_SEP \
+ /* branch if no error */ ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,L(pre_end) ASM_LINE_SEP \
+ LOAD_PIC(TREG) /* cond. nullify */ ASM_LINE_SEP \
+ copy %ret0, TREG /* save syscall return */ ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* make syscall res value positive */ ASM_LINE_SEP \
+ sub %r0, TREG, TREG /* delay */ ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP \
+ /* store into errno location */ ASM_LINE_SEP \
+ stw TREG, 0(%sr0,%ret0) ASM_LINE_SEP \
+ /* return -1 */ ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 ASM_LINE_SEP \
+L(pre_end): ASM_LINE_SEP \
+ /* Restore rp before exit */ ASM_LINE_SEP \
+ ldw -84(%sr0,%sp), %rp ASM_LINE_SEP \
+ /* Undo frame */ ASM_LINE_SEP \
+ ldwm -64(%sp),TREG ASM_LINE_SEP \
+ /* No need to LOAD_PIC */ ASM_LINE_SEP
+
+/* Save arguments into our frame */
+# define PUSHARGS_0 /* nothing to do */
+# define PUSHARGS_1 PUSHARGS_0 stw %r26, -36(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_2 PUSHARGS_1 stw %r25, -40(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_3 PUSHARGS_2 stw %r24, -44(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_4 PUSHARGS_3 stw %r23, -48(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_5 PUSHARGS_4 stw %r22, -52(%sr0,%sp) ASM_LINE_SEP
+# define PUSHARGS_6 PUSHARGS_5 stw %r21, -56(%sr0,%sp) ASM_LINE_SEP
+
+/* Bring them back from the stack */
+# define POPARGS_0 /* nothing to do */
+# define POPARGS_1 POPARGS_0 ldw -36(%sr0,%sp), %r26 ASM_LINE_SEP
+# define POPARGS_2 POPARGS_1 ldw -40(%sr0,%sp), %r25 ASM_LINE_SEP
+# define POPARGS_3 POPARGS_2 ldw -44(%sr0,%sp), %r24 ASM_LINE_SEP
+# define POPARGS_4 POPARGS_3 ldw -48(%sr0,%sp), %r23 ASM_LINE_SEP
+# define POPARGS_5 POPARGS_4 ldw -52(%sr0,%sp), %r22 ASM_LINE_SEP
+# define POPARGS_6 POPARGS_5 ldw -56(%sr0,%sp), %r21 ASM_LINE_SEP
+
+# ifdef IS_IN_libpthread
+# ifdef PIC
+# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __pthread_enable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __pthread_disable_asynccancel,code ASM_LINE_SEP \
+ bl __pthread_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# elif !defined NOT_IN_libc
+# ifdef PIC
+# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __libc_enable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __libc_disable_asynccancel,code ASM_LINE_SEP \
+ bl __libc_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# else
+# ifdef PIC
+# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
+# else
+# define CENABLE .import __librt_enable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_enable_asynccancel,%r2 ASM_LINE_SEP
+# define CDISABLE .import __librt_disable_asynccancel,code ASM_LINE_SEP \
+ bl __librt_disable_asynccancel,%r2 ASM_LINE_SEP
+# endif
+# endif
+
+/* p_header.multiple_threads is +12 from the pthread_descr struct start,
+ We could have called __get_cr27() but we really want less overhead */
+# define MULTIPLE_THREADS_OFFSET 0xC
+
+/* cr27 has been initialized to 0x0 by kernel */
+# define NO_THREAD_CR27 0x0
+
+# ifdef IS_IN_libpthread
+# define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+# define __local_multiple_threads __libc_multiple_threads
+# else
+# define __local_multiple_threads __librt_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+ extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+/* This ALT version requires newer kernel support */
+# define SINGLE_THREAD_P_MFCTL \
+ mfctl %cr27, %ret0 ASM_LINE_SEP \
+ cmpib,= NO_THREAD_CR27,%ret0,L(stp) ASM_LINE_SEP \
+ nop ASM_LINE_SEP \
+ ldw MULTIPLE_THREADS_OFFSET(%sr0,%ret0),%ret0 ASM_LINE_SEP \
+L(stp): ASM_LINE_SEP
+# ifdef PIC
+/* Slower version uses GOT to get value of __local_multiple_threads */
+# define SINGLE_THREAD_P \
+ addil LT%__local_multiple_threads, %r19 ASM_LINE_SEP \
+ ldw RT%__local_multiple_threads(%sr0,%r1), %ret0 ASM_LINE_SEP \
+ ldw 0(%sr0,%ret0), %ret0 ASM_LINE_SEP
+# else
+/* Slow non-pic version using DP */
+# define SINGLE_THREAD_P \
+ addil LR%__local_multiple_threads-$global$,%r27 ASM_LINE_SEP \
+ ldw RR%__local_multiple_threads-$global$(%sr0,%r1),%ret0 ASM_LINE_SEP
+# endif
+# endif
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+
+#endif
+/* !defined NOT_IN_libc || defined IS_IN_libpthread */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44f4e767265e025e254f40ff02cd3793048d362d
commit 44f4e767265e025e254f40ff02cd3793048d362d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 14 21:55:00 2006 +0000
Add prototype for tee.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index f06201c..6898fe8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -204,6 +204,10 @@ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
__THROW;
+/* In-kernel implementation of tee for pipe buffers. */
+extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=111e56f80cc0c1b2a589ed672e169e6fb1b3501e
commit 111e56f80cc0c1b2a589ed672e169e6fb1b3501e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 31 21:45:38 2006 +0000
Remove LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
Declare sync_file_range and splice.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 0f32cec..f06201c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -173,16 +173,37 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
-/* Linux-specific operations for posix_fadvise. */
+
#ifdef __USE_GNU
-# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
-# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
#endif
__BEGIN_DECLS
+#ifdef __USE_GNU
+
/* Provide kernel hint to read ahead. */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
__THROW;
+
+/* Selective file content synch'ing. */
+extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
+ unsigned int __flags);
+
+
+/* Splice two files together. */
+extern int splice (int __fdin, int __fdout, size_t __len, unsigned int __flags)
+ __THROW;
+
+#endif
+
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=711daa3092fee256a9b374140750d8fedb5a257d
commit 711daa3092fee256a9b374140750d8fedb5a257d
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 28 04:32:41 2006 +0000
2006-03-27 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define
LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 72a977c..5907503 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-03-27 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define
+ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
+
2006-03-21 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 3574e75..5368515 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -180,6 +180,12 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+/* Linux-specific operations for posix_fadvise. */
+#ifdef __USE_GNU
+# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
+# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+#endif
+
__BEGIN_DECLS
/* Provide kernel hint to read ahead. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3fb78ec4eb081545fe71974ca88433037af4a74
commit f3fb78ec4eb081545fe71974ca88433037af4a74
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 28 04:32:14 2006 +0000
2006-03-27 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define
LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Add readahead
prototype.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 4acb253..19f4b41 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,9 @@
+2006-03-27 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define
+ LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT. Add readahead
+ prototype.
+
2006-03-27 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP):
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index aa039b4..87affe3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -192,3 +192,17 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+/* Linux-specific operations for posix_fadvise. */
+#ifdef __USE_GNU
+# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
+# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bfc23f5a3631b869f2a8824ca616831d4a8f6c23
commit bfc23f5a3631b869f2a8824ca616831d4a8f6c23
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 28 04:25:50 2006 +0000
* sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP):
Define.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 292e33b..4acb253 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-03-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/bits/poll.h (POLLREMOVE, POLLRDHUP):
+ Define.
+
2006-03-27 Denis Barbier <barbier@linuxfr.org>
* sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
index f62b9c3..eee4ea2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,8 +36,10 @@
#endif
#ifdef __USE_GNU
-/* This is an extension for Linux. */
+/* These are extensions for Linux. */
# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
#endif
/* Event types always implicitly polled for. These bits need not be set in
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b415b963c25939819fd14606410a4450bf9a34d3
commit b415b963c25939819fd14606410a4450bf9a34d3
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 28 04:13:22 2006 +0000
2006-03-27 Denis Barbier <barbier@linuxfr.org>
* sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix
typo.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 1d20fd3..292e33b 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,8 @@
+2006-03-27 Denis Barbier <barbier@linuxfr.org>
+
+ * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_RTPRIO): Fix
+ typo.
+
2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 7e71529..9e99f5d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -98,7 +98,7 @@ enum __rlimit_resource
/* Maximum realtime priority allowed for non-priviledged
processes. */
__RLIMIT_RTPRIO = 14,
-#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
+#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
__RLIMIT_NLIMITS = 15,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea5f32769ed893a0680ce95dabcd494720844024
commit ea5f32769ed893a0680ce95dabcd494720844024
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 24 16:36:38 2006 +0000
Define LINUX_FADV_ASYNC_WRITE and LINUX_FADV_WRITE_WAIT.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index c4a9b77..0f32cec 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1999, 2000, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -173,6 +173,12 @@ struct flock64
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+/* Linux-specific operations for posix_fadvise. */
+#ifdef __USE_GNU
+# define LINUX_FADV_ASYNC_WRITE 32 /* Start writeout on range. */
+# define LINUX_FADV_WRITE_WAIT 33 /* Wait upon writeout to range. */
+#endif
+
__BEGIN_DECLS
/* Provide kernel hint to read ahead. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebabc882d0c9ac3dc5235a2ca3522b7578c2e5cb
commit ebabc882d0c9ac3dc5235a2ca3522b7578c2e5cb
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 21 21:00:16 2006 +0000
* sysdeps/unix/sysv/linux/arm/kernel-features.h: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 21f9abd..72a977c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -2,6 +2,7 @@
* sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete.
* sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
+ sysdeps/unix/sysv/linux/arm/kernel-features.h,
sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files.
* sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
(DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
new file mode 100644
index 0000000..6b70f33
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -0,0 +1,31 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The utimes syscall was added before 2.6.1. */
+#if __LINUX_KERNEL_VERSION >= 132609
+# define __ASSUME_UTIMES 1
+#endif
+
+/* The new getrlimit syscall was added sometime before 2.4.6. */
+#if __LINUX_KERNEL_VERSION >= 132102
+#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
+#endif
+
+#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5b5ba471f30f1237d6a92e1408a641dcd76175c
commit e5b5ba471f30f1237d6a92e1408a641dcd76175c
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Mar 21 20:54:56 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete.
* sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files.
* sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
(DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
(DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Undefine
__NR_stime and __NR_alarm.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 0178475..21f9abd 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,15 @@
+2006-03-21 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Delete.
+ * sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
+ sysdeps/unix/sysv/linux/arm/eabi/umount.c: New files.
+ * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
+ (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
+ * sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+ (DOCARGS_6, UNDOCARGS_6, RESTORE_LR_6): Define.
+ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h: Undefine
+ __NR_stime and __NR_alarm.
+
2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
index f77333f..bc52042 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
@@ -53,9 +53,9 @@
UNDOARGS_##args; \
cmn r0, $4096;
-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
- otherwise. In order to preserve doubleword alignment, sometimes we must
- save an extra register. */
+/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
+ six arguments, and nothing for fewer. In order to preserve doubleword
+ alignment, sometimes we must save an extra register. */
# define DOCARGS_0 stmfd sp!, {r7, lr}
# define UNDOCARGS_0
@@ -81,6 +81,10 @@
# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}
# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr}
+# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}
+# define RESTORE_LR_6 RESTORE_LR_0
+
# ifdef IS_IN_libpthread
# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
index 5e89399..92fe903 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
@@ -64,9 +64,9 @@
UNDOARGS_##args; \
cmn r0, $4096;
-/* DOARGS pushes four bytes on the stack for five arguments, and nothing
- otherwise. In order to preserve doubleword alignment, sometimes we must
- save an extra register. */
+/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
+ six arguments, and nothing for fewer. In order to preserve doubleword
+ alignment, sometimes we must save an extra register. */
# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
@@ -94,6 +94,10 @@
# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20
+# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
+# define RESTORE_LR_6 RESTORE_LR_0
+
# ifdef IS_IN_libpthread
# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S
deleted file mode 100644
index f614213..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/socket.S
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep-cancel.h>
-#include <socketcall.h>
-
-#define P(a, b) P2(a, b)
-#define P2(a, b) a##b
-
- .text
-/* The socket-oriented system calls are handled unusally in Linux.
- They are all gated through the single `socketcall' system call number.
- `socketcall' takes two arguments: the first is the subcode, specifying
- which socket function is being called; and the second is a pointer to
- the arguments to the specific function.
-
- The .S files for the other calls just #define socket and #include this. */
-
-#ifndef __socket
-# ifndef NO_WEAK_ALIAS
-# define __socket P(__,socket)
-# else
-# define __socket socket
-# endif
-#endif
-
-#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
-#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
-
-#define POPARGS_1 add sp, sp, #8
-#define POPARGS_2 add sp, sp, #8
-#define POPARGS_3 add sp, sp, #16
-#define POPARGS_4 add sp, sp, #16
-#define POPARGS_5 add sp, sp, #16
-#define POPARGS_6 add sp, sp, #16
-
-#ifndef NARGS
-#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
-#endif
-
-#if defined NEED_CANCELLATION && defined CENABLE
- PSEUDO_PROLOGUE
-#endif
-
-.globl __socket
-ENTRY (__socket)
- .fnstart
-
- /* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
- instruction and meant no stack cleanup work was required.
-
- This will not work in the case of a socket call being interrupted
- by a signal. If the signal handler uses any stack the arguments
- to socket will be trashed. The results of a restart of any
- socket call are then unpredictable. */
-
- /* Push args onto the stack. */
- P(PUSHARGS_,NARGS)
-
-#if defined NEED_CANCELLATION && defined CENABLE
- SINGLE_THREAD_P
- bne 1f
-#endif
-
- /* Do the system call trap. */
- mov a1, $P(SOCKOP_,socket)
- mov a2, sp
- DO_CALL (socketcall, 0)
-
- /* Pop args off the stack */
- P(POPARGS_,NARGS)
-
- /* r0 is < 0 if there was an error. */
- cmn r0, $124
- RETINSTR(cc, r14)
- b PLTJMP(SYSCALL_ERROR)
-
-#if defined NEED_CANCELLATION && defined CENABLE
-1:
- stmfd sp!, {r7, lr}
- .save {r7, lr}
- CENABLE
- mov ip, r0
-
- mov r0, #P(SOCKOP_,socket)
- add r1, sp, #8
- mov r7, #SYS_ify(socketcall)
- swi 0x0
-
- mov r7, r0
- mov r0, ip
- CDISABLE
- mov r0, r7
- ldmfd sp!, {r7, lr}
-
- P(POPARGS_,NARGS)
-
- /* r0 is < 0 if there was an error. */
- cmn r0, $124
- RETINSTR(cc, r14)
- b PLTJMP(SYSCALL_ERROR)
-#endif
-
- .fnend
-PSEUDO_END (__socket)
-
-#ifndef NO_WEAK_ALIAS
-weak_alias (__socket, socket)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
new file mode 100644
index 0000000..31e1cd6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
@@ -0,0 +1,34 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+# semaphore and shm system calls
+msgctl - msgctl i:iip __msgctl msgctl
+msgget - msgget i:ii __msgget msgget
+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
+shmat - shmat i:ipi __shmat shmat
+shmctl - shmctl i:iip __shmctl shmctl
+shmdt - shmdt i:s __shmdt shmdt
+shmget - shmget i:iii __shmget shmget
+semop - semop i:ipi __semop semop
+semtimedop - semtimedop i:ipip semtimedop
+semget - semget i:iii __semget semget
+semctl - semctl i:iiii __semctl semctl
+
+# proper socket implementations:
+accept - accept Ci:iBN __libc_accept __accept accept
+bind - bind i:ipi __bind bind
+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
+getpeername - getpeername i:ipp __getpeername getpeername
+getsockname - getsockname i:ipp __getsockname getsockname
+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
+listen - listen i:ii __listen listen
+recv - recv Ci:ibni __libc_recv __recv recv
+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
+send - send Ci:ibni __libc_send __send send
+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
+shutdown - shutdown i:ii __shutdown shutdown
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiif __socketpair socketpair
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
index 7f5ded5..bf9c8d7 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005
+/* Copyright (C) 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -29,6 +29,12 @@
# error Kernel headers are too old
#endif
+/* Don't use stime, even if the kernel headers define it. We have
+ settimeofday, and some EABI kernels have removed stime. Similarly
+ use setitimer to implement alarm. */
+#undef __NR_stime
+#undef __NR_alarm
+
/* The ARM EABI user interface passes the syscall number in r7, instead
of in the swi. This is more efficient, because the kernel does not need
to fetch the swi from memory to find out the number; which can be painful
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/umount.c b/sysdeps/unix/sysv/linux/arm/eabi/umount.c
new file mode 100644
index 0000000..e7c5690
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/umount.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Since we don't have an oldumount system call, do what the kernel
+ does down here. */
+
+extern long int __umount2 (const char *name, int flags);
+
+long int
+__umount (const char *name)
+{
+ return __umount2 (name, 0);
+}
+
+weak_alias (__umount, umount);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0353e641e95cb40971a8bbc92a401465bf820b26
commit 0353e641e95cb40971a8bbc92a401465bf820b26
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 16 23:27:45 2006 +0000
2006-03-16 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/getcontext.S (__getcontext_x):
Use .set noat to quiet assembler warning.
diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S
index bf9820a..f010f33 100644
--- a/sysdeps/unix/sysv/linux/alpha/getcontext.S
+++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S
@@ -1,5 +1,5 @@
/* Save current context.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,6 +57,8 @@ weak_alias (__getcontext, getcontext)
__getcontext_x:
cfi_register (64, 0)
+ .set noat
+
/* Return value of getcontext. $0 is the only register
whose value is not preserved. */
stq $31, UC_SIGCTX+SC_REGS($16)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=712619d7b62cd8b3fb604744104148aff0907533
commit 712619d7b62cd8b3fb604744104148aff0907533
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Sat Mar 11 16:20:03 2006 +0000
* sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to
i386/fork.c.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 2412429..1d20fd3 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/nptl/fork.c: Correct path to
+ i386/fork.c.
+
+2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir,
libc_cv_localedir, libdir, arch_minimum_kernel, and
libc_cv_gcc_unwind_find_fde.
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/fork.c b/sysdeps/unix/sysv/linux/mips/nptl/fork.c
index 06b7e1c..d31889e 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/fork.c
+++ b/sysdeps/unix/sysv/linux/mips/nptl/fork.c
@@ -1 +1 @@
-#include "../i386/fork.c"
+#include <sysdeps/unix/sysv/linux/i386/fork.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aea6074434ba3619b86a6ab2ea6bcb6b7b726758
commit aea6074434ba3619b86a6ab2ea6bcb6b7b726758
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Sat Mar 11 16:18:41 2006 +0000
* sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir,
libc_cv_localedir, libdir, arch_minimum_kernel, and
libc_cv_gcc_unwind_find_fde.
* sysdeps/unix/sysv/linux/mips/mips64/configure.in: New file.
* sysdeps/unix/sysv/linux/mips/configure: Regenerated.
* sysdeps/unix/sysv/linux/mips/mips64/configure: Generated.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7debe9d..2412429 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2006-03-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/configure.in: Set libc_cv_slibdir,
+ libc_cv_localedir, libdir, arch_minimum_kernel, and
+ libc_cv_gcc_unwind_find_fde.
+ * sysdeps/unix/sysv/linux/mips/mips64/configure.in: New file.
+ * sysdeps/unix/sysv/linux/mips/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/mips/mips64/configure: Generated.
+
2006-03-02 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index 4d9568f..cad59b5 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -76,3 +76,37 @@ mips*)
echo '#include <asm/unistd.h>' > asm-unistd.h
;;
esac
+
+case "$prefix" in
+/usr | /usr/)
+ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
+ # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
+ # and libc_cv_localedir.
+ test -n "$libc_cv_slibdir" || \
+ case $machine in
+ mips/mips64/n64/* )
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+ mips/mips64/n32/* )
+ libc_cv_slibdir="/lib32"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib32';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+ *)
+ libc_cv_slibdir="/lib"
+ ;;
+ esac
+esac
+
+if test -z "$arch_minimum_kernel"; then
+ arch_minimum_kernel=2.4.0
+ libc_cv_gcc_unwind_find_fde=yes
+fi
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index e2e5d16..7248e1f 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -76,3 +76,37 @@ mips*)
echo '#include <asm/unistd.h>' > asm-unistd.h
;;
esac
+
+case "$prefix" in
+/usr | /usr/)
+ # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
+ # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
+ # and libc_cv_localedir.
+ test -n "$libc_cv_slibdir" || \
+ case $machine in
+ mips/mips64/n64/* )
+ libc_cv_slibdir="/lib64"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib64';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+ mips/mips64/n32/* )
+ libc_cv_slibdir="/lib32"
+ if test "$libdir" = '${exec_prefix}/lib'; then
+ libdir='${exec_prefix}/lib32';
+ # Locale data can be shared between 32bit and 64bit libraries
+ libc_cv_localedir='${exec_prefix}/lib/locale'
+ fi
+ ;;
+ *)
+ libc_cv_slibdir="/lib"
+ ;;
+ esac
+esac
+
+if test -z "$arch_minimum_kernel"; then
+ arch_minimum_kernel=2.4.0
+ libc_cv_gcc_unwind_find_fde=yes
+fi
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure b/sysdeps/unix/sysv/linux/mips/mips64/configure
new file mode 100644
index 0000000..c331f98
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64.
+
+ldd_rewrite_script=$dest/ldd-rewrite.sed
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/configure.in b/sysdeps/unix/sysv/linux/mips/mips64/configure.in
new file mode 100644
index 0000000..a28638a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/configure.in
@@ -0,0 +1,5 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/mips/mips64.
+
+ldd_rewrite_script=$dest/ldd-rewrite.sed
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dfbbf9b44ebf0c10a455c9d67e276ce629b4c06c
commit dfbbf9b44ebf0c10a455c9d67e276ce629b4c06c
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 6 11:05:33 2006 +0000
.
diff --git a/ChangeLog b/ChangeLog
index 5974507..fcd2011 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-06 Roland McGrath <roland@redhat.com>
+
+ * Makefile (%.bz2, %.gz): New pattern rules.
+
2006-02-28 Roland McGrath <roland@redhat.com>
* Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba580a176dd76bdef89ea0ca27e8aefa02877c59
commit ba580a176dd76bdef89ea0ca27e8aefa02877c59
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 6 11:05:27 2006 +0000
2006-03-06 Roland McGrath <roland@redhat.com>
* Makefile (%.bz2, %.gz): New pattern rules.
diff --git a/Makefile b/Makefile
index 01985d9..657fdee 100644
--- a/Makefile
+++ b/Makefile
@@ -38,3 +38,6 @@ glibc-port-%-$(dist-version).tar: ChangeLog.%
find $(basename $@) -name configure -print | xargs touch
tar cf $@ $(basename $@)
rm -fr $(basename $@)
+
+%.bz2: %; bzip2 -9vk $<
+%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b834ecbda3c0656675fb2b591a1c93cd03272cb3
commit b834ecbda3c0656675fb2b591a1c93cd03272cb3
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 3 11:21:28 2006 +0000
2006-03-02 Roland McGrath <roland@redhat.com>
* sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Use __typeof in cast.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 2260ec5..2e5bc79 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -415,7 +415,7 @@ __LABEL(name) \
# else
extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
# define PTR_DEMANGLE(var) PTR_MANGLE(var)
# endif
#elif defined PIC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13d7881aeb813188d3da8ac11386d1cf88526f75
commit 13d7881aeb813188d3da8ac11386d1cf88526f75
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Mar 3 01:16:30 2006 +0000
2006-03-02 Lior Balkohen <balkohen@gmail.com>
* sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
(__pthread_list_t, __pthread_slist_t): New typedefs.
(pthread_mutex_t): Replace __next and __prev fields with __list.
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_WAKE_OP,
FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
(lll_futex_wake_unlock): Define.
(lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock,
lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
lll_robust_mutex_unlock): New macros.
(__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
* sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to
vfork.S.
* sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 32566f9..7debe9d 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,19 @@
+2006-03-02 Lior Balkohen <balkohen@gmail.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+ (__pthread_list_t, __pthread_slist_t): New typedefs.
+ (pthread_mutex_t): Replace __next and __prev fields with __list.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (FUTEX_WAKE_OP,
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
+ (lll_futex_wake_unlock): Define.
+ (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock,
+ lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
+ lll_robust_mutex_unlock): New macros.
+ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
+ * sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to
+ vfork.S.
+ * sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise.
+
2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file.
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
index d5e89a9..eda0a2f 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -55,6 +55,20 @@ typedef union
} pthread_attr_t;
+#if _MIPS_SIM == _ABI64
+typedef struct __pthread_internal_list
+{
+ struct __pthread_internal_list *__prev;
+ struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+ struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
/* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */
typedef union
@@ -72,15 +86,14 @@ typedef union
int __kind;
#if _MIPS_SIM == _ABI64
int __spins;
- struct __pthread_mutex_s *__next;
- struct __pthread_mutex_s *__prev;
+ __pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
unsigned int __nusers;
__extension__ union
{
int __spins;
- struct __pthread_mutex_s *__next;
+ __pthread_slist_t __list;
};
#endif
} __data;
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 5e3dd48..d5070e8 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -30,6 +30,8 @@
#define FUTEX_WAKE 1
#define FUTEX_REQUEUE 3
#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -61,6 +63,15 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
+#define lll_robust_mutex_dead(futexv) \
+ do \
+ { \
+ int *__futexp = &(futexv); \
+ atomic_or (__futexp, FUTEX_OWNER_DIED); \
+ lll_futex_wake (__futexp, 1); \
+ } \
+ while (0)
+
/* Returns non-zero if error happened, zero if success. */
#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
({ \
@@ -72,6 +83,18 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_WAKE_OP, (nr_wake), \
+ (nr_wake2), (futexp2), \
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
+ })
static inline int __attribute__((always_inline))
__lll_mutex_trylock(int *futex)
@@ -89,7 +112,16 @@ __lll_mutex_cond_trylock(int *futex)
#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+static inline int __attribute__((always_inline))
+__lll_robust_mutex_trylock(int *futex, int id)
+{
+ return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
+}
+#define lll_robust_mutex_trylock(lock, id) \
+ __lll_robust_mutex_trylock (&(lock), id)
+
extern void __lll_lock_wait (int *futex) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
static inline void __attribute__((always_inline))
__lll_mutex_lock(int *futex)
@@ -100,6 +132,18 @@ __lll_mutex_lock(int *futex)
#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_lock (int *futex, int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_lock_wait (futex);
+ return result;
+}
+#define lll_robust_mutex_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_cond_lock (int *futex)
{
@@ -109,8 +153,14 @@ __lll_mutex_cond_lock (int *futex)
#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_robust_mutex_cond_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+
+
extern int __lll_timedlock_wait (int *futex, const struct timespec *)
attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
static inline int __attribute__ ((always_inline))
__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
@@ -124,6 +174,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime)
__lll_mutex_timedlock (&(futex), abstime)
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
+ int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_robust_mutex_timedlock(futex, abstime, id) \
+ __lll_robust_mutex_timedlock (&(futex), abstime, id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_unlock (int *futex)
{
@@ -135,6 +198,17 @@ __lll_mutex_unlock (int *futex)
static inline void __attribute__ ((always_inline))
+__lll_robust_mutex_unlock (int *futex, int mask)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val & mask, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_robust_mutex_unlock(futex) \
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+
+
+static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (int *futex)
{
(void) atomic_exchange_rel (futex, 0);
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S
index fe2b81b..652dfb1 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S
+++ b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,4 +34,4 @@
sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
1:
-#include <../sysdeps/unix/sysv/linux/mips/vfork.S>
+#include <sysdeps/unix/sysv/linux/mips/vfork.S>
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S
index 874a2e2..b93a924 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S
+++ b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,4 +39,4 @@
2: sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
1:
-#include <../sysdeps/unix/sysv/linux/mips/vfork.S>
+#include <sysdeps/unix/sysv/linux/mips/vfork.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73204807705263b5db2209783ca007112eda7265
commit 73204807705263b5db2209783ca007112eda7265
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Mar 3 01:13:52 2006 +0000
* sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file.
* sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Delete file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 66ff73c..32566f9 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,10 @@
2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/mips/ptrace.c: Delete file.
+ * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Delete file.
+
+2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
(INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
(INTERNAL_SYSCALL_NCS): New.
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
deleted file mode 100644
index 19d7c2d..0000000
--- a/sysdeps/unix/sysv/linux/mips/ptrace.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sgidefs.h>
-#include <sys/types.h>
-#include <sys/ptrace.h>
-#include <sys/user.h>
-#include <stdarg.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-#include <sgidefs.h>
-
-#if _MIPS_SIM == _ABIN32
-__extension__ typedef long long int reg_type;
-#else
-typedef long int reg_type;
-#endif
-
-reg_type
-ptrace (enum __ptrace_request request, ...)
-{
- reg_type res, ret;
- va_list ap;
- pid_t pid;
- void *addr;
- reg_type data;
-
- va_start (ap, request);
- pid = va_arg (ap, pid_t);
- addr = va_arg (ap, void *);
- data = va_arg (ap, reg_type);
- va_end (ap);
-
- if (request > 0 && request < 4)
- data = &ret;
-
-#if __BOUNDED_POINTERS__
- switch (request)
- {
- case PTRACE_PEEKTEXT:
- case PTRACE_PEEKDATA:
- case PTRACE_PEEKUSER:
- case PTRACE_POKETEXT:
- case PTRACE_POKEDATA:
- case PTRACE_POKEUSER:
- (void) CHECK_1 ((int *) addr);
- (void) CHECK_1 ((int *) data);
- break;
-
- case PTRACE_GETREGS:
- case PTRACE_SETREGS:
- /* We don't know the size of data, so the best we can do is ensure
- that `data' is valid for at least one word. */
- (void) CHECK_1 ((int *) data);
- break;
-
- case PTRACE_GETFPREGS:
- case PTRACE_SETFPREGS:
- /* We don't know the size of data, so the best we can do is ensure
- that `data' is valid for at least one word. */
- (void) CHECK_1 ((int *) data);
- break;
-
- case PTRACE_GETFPXREGS:
- case PTRACE_SETFPXREGS:
- /* We don't know the size of data, so the best we can do is ensure
- that `data' is valid for at least one word. */
- (void) CHECK_1 ((int *) data);
- break;
-
- case PTRACE_TRACEME:
- case PTRACE_CONT:
- case PTRACE_KILL:
- case PTRACE_SINGLESTEP:
- case PTRACE_ATTACH:
- case PTRACE_DETACH:
- case PTRACE_SYSCALL:
- /* Neither `data' nor `addr' needs any checks. */
- break;
- };
-#endif
-
- res = INLINE_SYSCALL (ptrace, 4, request, pid,
- __ptrvalue (addr), __ptrvalue (data));
- if (res >= 0 && request > 0 && request < 4)
- {
- __set_errno (0);
- return ret;
- }
-
- return res;
-}
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
deleted file mode 100644
index d05853d..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_PTRACE_H
-#define _SYS_PTRACE_H 1
-
-#include <features.h>
-#include <sgidefs.h>
-
-__BEGIN_DECLS
-
-/* Type of the REQUEST argument to `ptrace.' */
-enum __ptrace_request
-{
- /* Indicate that the process making this request should be traced.
- All signals received by this process can be intercepted by its
- parent, and its parent can use the other `ptrace' requests. */
- PTRACE_TRACEME = 0,
-#define PT_TRACE_ME PTRACE_TRACEME
-
- /* Return the word in the process's text space at address ADDR. */
- PTRACE_PEEKTEXT = 1,
-#define PT_READ_I PTRACE_PEEKTEXT
-
- /* Return the word in the process's data space at address ADDR. */
- PTRACE_PEEKDATA = 2,
-#define PT_READ_D PTRACE_PEEKDATA
-
- /* Return the word in the process's user area at offset ADDR. */
- PTRACE_PEEKUSER = 3,
-#define PT_READ_U PTRACE_PEEKUSER
-
- /* Write the word DATA into the process's text space at address ADDR. */
- PTRACE_POKETEXT = 4,
-#define PT_WRITE_I PTRACE_POKETEXT
-
- /* Write the word DATA into the process's data space at address ADDR. */
- PTRACE_POKEDATA = 5,
-#define PT_WRITE_D PTRACE_POKEDATA
-
- /* Write the word DATA into the process's user area at offset ADDR. */
- PTRACE_POKEUSER = 6,
-#define PT_WRITE_U PTRACE_POKEUSER
-
- /* Continue the process. */
- PTRACE_CONT = 7,
-#define PT_CONTINUE PTRACE_CONT
-
- /* Kill the process. */
- PTRACE_KILL = 8,
-#define PT_KILL PTRACE_KILL
-
- /* Single step the process.
- This is not supported on all machines. */
- PTRACE_SINGLESTEP = 9,
-#define PT_STEP PTRACE_SINGLESTEP
-
- /* Get all general purpose registers used by a processes.
- This is not supported on all machines. */
- PTRACE_GETREGS = 12,
-#define PT_GETREGS PTRACE_GETREGS
-
- /* Set all general purpose registers used by a processes.
- This is not supported on all machines. */
- PTRACE_SETREGS = 13,
-#define PT_SETREGS PTRACE_SETREGS
-
- /* Get all floating point registers used by a processes.
- This is not supported on all machines. */
- PTRACE_GETFPREGS = 14,
-#define PT_GETFPREGS PTRACE_GETFPREGS
-
- /* Set all floating point registers used by a processes.
- This is not supported on all machines. */
- PTRACE_SETFPREGS = 15,
-#define PT_SETFPREGS PTRACE_SETFPREGS
-
- /* Attach to a process that is already running. */
- PTRACE_ATTACH = 16,
-#define PT_ATTACH PTRACE_ATTACH
-
- /* Detach from a process attached to with PTRACE_ATTACH. */
- PTRACE_DETACH = 17,
-#define PT_DETACH PTRACE_DETACH
-
- /* Get all extended floating point registers used by a processes.
- This is not supported on all machines. */
- PTRACE_GETFPXREGS = 18,
-#define PT_GETFPXREGS PTRACE_GETFPXREGS
-
- /* Set all extended floating point registers used by a processes.
- This is not supported on all machines. */
- PTRACE_SETFPXREGS = 19,
-#define PT_SETFPXREGS PTRACE_SETFPXREGS
-
- /* Continue and stop at the next (return from) syscall. */
- PTRACE_SYSCALL = 24
-#define PT_SYSCALL PTRACE_SYSCALL
-};
-
-/* Perform process tracing functions. REQUEST is one of the values
- above, and determines the action to be taken.
- For all requests except PTRACE_TRACEME, PID specifies the process to be
- traced.
-
- PID and the other arguments described above for the various requests should
- appear (those that are used for the particular request) as:
- pid_t PID, void *ADDR, int DATA, void *ADDR2
- after REQUEST. */
-#if _MIPS_SIM == _ABIN32
-__extension__ extern long long int ptrace
- (enum __ptrace_request __request, ...) __THROW;
-#else
-extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
-#endif
-
-__END_DECLS
-
-#endif /* _SYS_PTRACE_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6428ce3cdad3d587fb77f2f1d0d7036f780fa9e0
commit 6428ce3cdad3d587fb77f2f1d0d7036f780fa9e0
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Fri Mar 3 01:06:48 2006 +0000
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
(INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
(INTERNAL_SYSCALL_NCS): New.
(internal_syscall0, internal_syscall1, internal_syscall2,
internal_syscall3, internal_syscall4, internal_syscall5,
internal_syscall6): Take ncs_init, cs_init, and input arguments.
Use them. Correct types for registers.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
(INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
(INTERNAL_SYSCALL_NCS): New.
(internal_syscall0, internal_syscall1, internal_syscall2,
internal_syscall3, internal_syscall4, internal_syscall5,
internal_syscall6): Take ncs_init, cs_init, and input arguments.
Use them.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove
recvfrom and sendto. Mark lseek, msgrcv, and msgsnd as cancellation
points.
* sysdeps/mips/dl-machine.h (elf_machine_rel): Remove unused "value".
Use Elf(Addr) for TLS relocation targets.
* sysdeps/unix/sysv/linux/mips/mips64/Makefile: New file.
* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (lll_futex_wait,
lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): Cast
futexp to long for n64.
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: New file.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 2881533..66ff73c 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,30 @@
+2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+ (INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
+ (INTERNAL_SYSCALL_NCS): New.
+ (internal_syscall0, internal_syscall1, internal_syscall2,
+ internal_syscall3, internal_syscall4, internal_syscall5,
+ internal_syscall6): Take ncs_init, cs_init, and input arguments.
+ Use them. Correct types for registers.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+ (INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
+ (INTERNAL_SYSCALL_NCS): New.
+ (internal_syscall0, internal_syscall1, internal_syscall2,
+ internal_syscall3, internal_syscall4, internal_syscall5,
+ internal_syscall6): Take ncs_init, cs_init, and input arguments.
+ Use them.
+ * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove
+ recvfrom and sendto. Mark lseek, msgrcv, and msgsnd as cancellation
+ points.
+ * sysdeps/mips/dl-machine.h (elf_machine_rel): Remove unused "value".
+ Use Elf(Addr) for TLS relocation targets.
+ * sysdeps/unix/sysv/linux/mips/mips64/Makefile: New file.
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (lll_futex_wait,
+ lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): Cast
+ futexp to long for n64.
+ * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: New file.
+
2006-02-20 Roland McGrath <roland@redhat.com>
* sysdeps/mips/shlib-versions: New file.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c04609f..b912184 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996-2001, 2002, 2003, 2004, 2005
+ Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -336,28 +336,24 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
# endif
{
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
- Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
-
- if (sym)
- value += sym->st_value;
switch (r_type)
{
case R_MIPS_TLS_DTPMOD64:
case R_MIPS_TLS_DTPMOD32:
if (sym_map)
- *(ElfW(Word) *)reloc_addr = sym_map->l_tls_modid;
+ *(ElfW(Addr) *)reloc_addr = sym_map->l_tls_modid;
break;
case R_MIPS_TLS_DTPREL64:
case R_MIPS_TLS_DTPREL32:
- *(ElfW(Word) *)reloc_addr += TLS_DTPREL_VALUE (sym);
+ *(ElfW(Addr) *)reloc_addr += TLS_DTPREL_VALUE (sym);
break;
case R_MIPS_TLS_TPREL32:
case R_MIPS_TLS_TPREL64:
CHECK_STATIC_TLS (map, sym_map);
- *(ElfW(Word) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym);
+ *(ElfW(Addr) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym);
break;
}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/Makefile
new file mode 100644
index 0000000..0a37c5b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/Makefile
@@ -0,0 +1,9 @@
+ifeq ($(subdir),socket)
+CFLAGS-recv.c += -fexceptions
+CFLAGS-send.c += -fexceptions
+endif
+
+ifeq ($(subdir),nptl)
+CFLAGS-recv.c += -fexceptions
+CFLAGS-send.c += -fexceptions
+endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index e601366..247d4ff 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -66,22 +67,28 @@
#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+ internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \
+ "i" (SYS_ify (name)), err, args)
-#define internal_syscall0(name, err, dummy...) \
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ internal_syscall##nr (= number, , "r" (__v0), err, args)
+
+#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a3 asm("$7"); \
+ register long long __v0 asm("$2") ncs_init; \
+ register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %2\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
- : "i" (SYS_ify(name)) \
+ : input \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -89,21 +96,21 @@
_sys_result; \
})
-#define internal_syscall1(name, err, arg1) \
+#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %3\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "i" (SYS_ify(name)) \
+ : input, "r" (__a0) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -111,22 +118,22 @@
_sys_result; \
})
-#define internal_syscall2(name, err, arg1, arg2) \
+#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a1 asm("$5") = (long long) arg2; \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %4\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -134,23 +141,23 @@
_sys_result; \
})
-#define internal_syscall3(name, err, arg1, arg2, arg3) \
+#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a1 asm("$5") = (long long) arg2; \
register long long __a2 asm("$6") = (long long) arg3; \
register long long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -158,23 +165,23 @@
_sys_result; \
})
-#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
+#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a1 asm("$5") = (long long) arg2; \
register long long __a2 asm("$6") = (long long) arg3; \
register long long __a3 asm("$7") = (long long) arg4; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -182,12 +189,12 @@
_sys_result; \
})
-#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
+#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a1 asm("$5") = (long long) arg2; \
register long long __a2 asm("$6") = (long long) arg3; \
@@ -195,12 +202,11 @@
register long long __a4 asm("$8") = (long long) arg5; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -208,12 +214,12 @@
_sys_result; \
})
-#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
long _sys_result; \
\
{ \
- register long long __v0 asm("$2"); \
+ register long long __v0 asm("$2") ncs_init; \
register long long __a0 asm("$4") = (long long) arg1; \
register long long __a1 asm("$5") = (long long) arg2; \
register long long __a2 asm("$6") = (long long) arg3; \
@@ -222,12 +228,12 @@
register long long __a5 asm("$9") = (long long) arg6; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), \
+ "r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index dc0a1a0..c238822 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -66,22 +67,28 @@
#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+ internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \
+ "i" (SYS_ify (name)), err, args)
-#define internal_syscall0(name, err, dummy...) \
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ internal_syscall##nr (= number, , "r" (__v0), err, args)
+
+#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a3 asm("$7"); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %2\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
- : "i" (SYS_ify(name)) \
+ : input \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -89,21 +96,21 @@
_sys_result; \
})
-#define internal_syscall1(name, err, arg1) \
+#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %3\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set reorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "i" (SYS_ify(name)) \
+ : input, "r" (__a0) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -111,22 +118,22 @@
_sys_result; \
})
-#define internal_syscall2(name, err, arg1, arg2) \
+#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a1 asm("$5") = (long) arg2; \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %4\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -134,23 +141,23 @@
_sys_result; \
})
-#define internal_syscall3(name, err, arg1, arg2, arg3) \
+#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a1 asm("$5") = (long) arg2; \
register long __a2 asm("$6") = (long) arg3; \
register long __a3 asm("$7"); \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -158,23 +165,23 @@
_sys_result; \
})
-#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
+#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a1 asm("$5") = (long) arg2; \
register long __a2 asm("$6") = (long) arg3; \
register long __a3 asm("$7") = (long) arg4; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -182,12 +189,12 @@
_sys_result; \
})
-#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
+#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a1 asm("$5") = (long) arg2; \
register long __a2 asm("$6") = (long) arg3; \
@@ -195,12 +202,11 @@
register long __a4 asm("$8") = (long) arg5; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -208,12 +214,12 @@
_sys_result; \
})
-#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6) \
({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
+ register long __v0 asm("$2") ncs_init; \
register long __a0 asm("$4") = (long) arg1; \
register long __a1 asm("$5") = (long) arg2; \
register long __a2 asm("$6") = (long) arg3; \
@@ -222,12 +228,12 @@
register long __a5 asm("$9") = (long) arg6; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
+ cs_init \
"syscall\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), \
+ "r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..e184c91
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
@@ -0,0 +1,183 @@
+/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <sysdeps/generic/sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+#include <sys/asm.h>
+
+/* Gas will put the initial save of $gp into the CIE, because it appears to
+ happen before any instructions. So we use cfi_same_value instead of
+ cfi_restore. */
+
+#ifdef HAVE_ASM_CFI_DIRECTIVES
+# define cfi_same_value .cfi_same_value
+#else
+# define cfi_same_value
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+#ifdef __PIC__
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ L(pseudo_start): \
+ cfi_startproc; \
+ cfi_adjust_cfa_offset (STKSPACE); \
+ cfi_rel_offset (gp, STKOFF_GP); \
+ 99: PTR_LA t9,__syscall_error; \
+ /* manual cpreturn */ \
+ REG_L gp, STKOFF_GP(sp); \
+ cfi_same_value (gp); \
+ RESTORESTK; \
+ jr t9; \
+ .type __##syscall_name##_nocancel, @function; \
+ .globl __##syscall_name##_nocancel; \
+ __##syscall_name##_nocancel: \
+ SAVESTK; \
+ .cpsetup t9, STKOFF_GP, name; \
+ cfi_rel_offset (gp, STKOFF_GP); \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ /* manual cpreturn */ \
+ REG_L gp, STKOFF_GP(sp); \
+ cfi_same_value (gp); \
+ RESTORESTK; \
+ ret; \
+ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
+ ENTRY (name) \
+ SAVESTK; \
+ .cpsetup t9, STKOFF_GP, name; \
+ cfi_rel_offset (gp, STKOFF_GP); \
+ SINGLE_THREAD_P(v1); \
+ bne zero, v1, L(pseudo_cancel); \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ /* manual cpreturn */ \
+ REG_L gp, STKOFF_GP(sp); \
+ cfi_same_value (gp); \
+ RESTORESTK; \
+ ret; \
+ L(pseudo_cancel): \
+ cfi_adjust_cfa_offset (STKSPACE); \
+ cfi_rel_offset (gp, STKOFF_GP); \
+ REG_S ra, STKOFF_RA(sp); \
+ cfi_rel_offset (ra, STKOFF_RA); \
+ PUSHARGS_##args; /* save syscall args */ \
+ CENABLE; \
+ REG_S v0, STKOFF_SVMSK(sp); /* save mask */ \
+ POPARGS_##args; /* restore syscall args */ \
+ .set noreorder; \
+ li v0, SYS_ify (syscall_name); \
+ syscall; \
+ .set reorder; \
+ REG_S v0, STKOFF_SC_V0(sp); /* save syscall result */ \
+ REG_S a3, STKOFF_SC_ERR(sp); /* save syscall error flag */ \
+ REG_L a0, STKOFF_SVMSK(sp); /* pass mask as arg1 */ \
+ CDISABLE; \
+ REG_L a3, STKOFF_SC_ERR(sp); /* restore syscall error flag */ \
+ REG_L ra, STKOFF_RA(sp); /* restore return address */ \
+ REG_L v0, STKOFF_SC_V0(sp); /* restore syscall result */ \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ /* manual cpreturn */ \
+ REG_L gp, STKOFF_GP(sp); \
+ cfi_same_value (gp); \
+ RESTORESTK; \
+ L(pseudo_end):
+
+
+# undef PSEUDO_END
+# define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
+
+#endif
+
+# define PUSHARGS_0 /* nothing to do */
+# define PUSHARGS_1 PUSHARGS_0 REG_S a0, STKOFF_A0(sp); cfi_rel_offset (a0, STKOFF_A0);
+# define PUSHARGS_2 PUSHARGS_1 REG_S a1, STKOFF_A1(sp); cfi_rel_offset (a1, STKOFF_A1);
+# define PUSHARGS_3 PUSHARGS_2 REG_S a2, STKOFF_A2(sp); cfi_rel_offset (a2, STKOFF_A2);
+# define PUSHARGS_4 PUSHARGS_3 REG_S a3, STKOFF_A3(sp); cfi_rel_offset (a3, STKOFF_A3);
+# define PUSHARGS_5 PUSHARGS_4 REG_S a4, STKOFF_A4(sp); cfi_rel_offset (a3, STKOFF_A4);
+# define PUSHARGS_6 PUSHARGS_5 REG_S a5, STKOFF_A5(sp); cfi_rel_offset (a3, STKOFF_A5);
+
+# define POPARGS_0 /* nothing to do */
+# define POPARGS_1 POPARGS_0 REG_L a0, STKOFF_A0(sp);
+# define POPARGS_2 POPARGS_1 REG_L a1, STKOFF_A1(sp);
+# define POPARGS_3 POPARGS_2 REG_L a2, STKOFF_A2(sp);
+# define POPARGS_4 POPARGS_3 REG_L a3, STKOFF_A3(sp);
+# define POPARGS_5 POPARGS_4 REG_L a4, STKOFF_A4(sp);
+# define POPARGS_6 POPARGS_5 REG_L a5, STKOFF_A5(sp);
+
+/* Save an even number of slots. Should be 0 if an even number of slots
+ are used below, or SZREG if an odd number are used. */
+# define STK_PAD SZREG
+
+/* Place values that we are more likely to use later in this sequence, i.e.
+ closer to the SP at function entry. If you do that, the are more
+ likely to already be in your d-cache. */
+# define STKOFF_A5 (STK_PAD)
+# define STKOFF_A4 (STKOFF_A5 + SZREG)
+# define STKOFF_A3 (STKOFF_A4 + SZREG)
+# define STKOFF_A2 (STKOFF_A3 + SZREG) /* MT and more args. */
+# define STKOFF_A1 (STKOFF_A2 + SZREG) /* MT and 2 args. */
+# define STKOFF_A0 (STKOFF_A1 + SZREG) /* MT and 1 arg. */
+# define STKOFF_RA (STKOFF_A0 + SZREG) /* Used if MT. */
+# define STKOFF_SC_V0 (STKOFF_RA + SZREG) /* Used if MT. */
+# define STKOFF_SC_ERR (STKOFF_SC_V0 + SZREG) /* Used if MT. */
+# define STKOFF_SVMSK (STKOFF_SC_ERR + SZREG) /* Used if MT. */
+# define STKOFF_GP (STKOFF_SVMSK + SZREG) /* Always used. */
+
+# define STKSPACE (STKOFF_GP + SZREG)
+# define SAVESTK PTR_SUBU sp, STKSPACE; cfi_adjust_cfa_offset(STKSPACE)
+# define RESTORESTK PTR_ADDU sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE)
+
+# ifdef IS_IN_libpthread
+# define CENABLE PTR_LA t9, __pthread_enable_asynccancel; jalr t9
+# define CDISABLE PTR_LA t9, __pthread_disable_asynccancel; jalr t9
+# elif defined IS_IN_librt
+# define CENABLE PTR_LA t9, __librt_enable_asynccancel; jalr t9
+# define CDISABLE PTR_LA t9, __librt_disable_asynccancel; jalr t9
+# else
+# define CENABLE PTR_LA t9, __libc_enable_asynccancel; jalr t9
+# define CDISABLE PTR_LA t9, __libc_disable_asynccancel; jalr t9
+# endif
+
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) \
+ == 0, 1)
+# else
+# define SINGLE_THREAD_P(reg) \
+ READ_THREAD_POINTER(reg); \
+ lw reg, MULTIPLE_THREADS_OFFSET(reg)
+#endif
+
+#elif !defined __ASSEMBLER__
+
+# define SINGLE_THREAD_P 1
+# define NO_CANCELLATION 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index b0d79ff..0d1657d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -1,16 +1,12 @@
# File name Caller Syscall name Args Strong name Weak names
-lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
-
-# proper socket implementations:
-recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
-sendto - sendto i:ibnibn __libc_sendto __sendto sendto
+lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
-msgrcv - msgrcv i:ibnii __msgrcv msgrcv
-msgsnd - msgsnd i:ibni __msgsnd msgsnd
+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
shmat - shmat i:ipi __shmat shmat
shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 7edb287..5e3dd48 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), 0); \
+ (long) (futexp), FUTEX_WAIT, (val), 0); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
@@ -48,7 +48,7 @@
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAIT, (val), (timespec)); \
+ (long) (futexp), FUTEX_WAIT, (val), (timespec));\
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
@@ -57,7 +57,7 @@
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
- (futexp), FUTEX_WAKE, (nr), 0); \
+ (long) (futexp), FUTEX_WAKE, (nr), 0); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
})
@@ -67,7 +67,7 @@
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 6, \
- (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
+ (long) (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
(nr_move), (mutex), (val)); \
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43b83c6fe172730ffe39b3fbcf54add3ce92b084
commit 43b83c6fe172730ffe39b3fbcf54add3ce92b084
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Mar 2 15:23:41 2006 +0000
* sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
(PSEUDO): Inline correct versions of PSEUDO_RET_MOV and MAYBE_SAVE_LR.
(PSEUDO_RET_MOV, MAYBE_SAVE_LR): Don't define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 3f510d2..0178475 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,11 @@
2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+ (PSEUDO): Inline correct versions of PSEUDO_RET_MOV and MAYBE_SAVE_LR.
+ (PSEUDO_RET_MOV, MAYBE_SAVE_LR): Don't define.
+
+2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set.
* sysdeps/unix/sysv/linux/arm/nptl/Makefile: New file.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index cd4d171..b35d347 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -50,9 +50,10 @@
bne .Lpseudo_cancel; \
DO_CALL (syscall_name, args); \
cmn r0, $4096; \
- PSEUDO_RET_MOV; \
+ RETINSTR(cc, lr); \
+ b PLTJMP(SYSCALL_ERROR); \
.Lpseudo_cancel: \
- MAYBE_SAVE_LR; \
+ str lr, [sp, $-4]!; \
DOCARGS_##args; /* save syscall args around CENABLE. */ \
CENABLE; \
mov ip, r0; /* put mask in safe place. */ \
@@ -108,11 +109,6 @@ extern int __local_multiple_threads attribute_hidden;
ldr ip, =__local_multiple_threads; \
ldr ip, [ip]; \
teq ip, #0;
-# define MAYBE_SAVE_LR \
- str lr, [sp, $-4]!;
-# define PSEUDO_RET_MOV \
- RETINSTR(cc, lr); \
- b PLTJMP(SYSCALL_ERROR)
# define PSEUDO_PROLOGUE
# else
# define SINGLE_THREAD_P \
@@ -122,8 +118,6 @@ extern int __local_multiple_threads attribute_hidden;
teq ip, #0;
# define PSEUDO_PROLOGUE \
1: .word __local_multiple_threads - 2f - 8;
-# define MAYBE_SAVE_LR /* lr already saved */
-# define PSEUDO_RET_MOV PSEUDO_RET
# endif
# endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33ca998a4f3272beb0f2e75db7c535d77c03347f
commit 33ca998a4f3272beb0f2e75db7c535d77c03347f
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Mar 2 15:19:51 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set.
* sysdeps/unix/sysv/linux/arm/nptl/Makefile: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index d7217bb..3f510d2 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2006-03-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): Set.
+ * sysdeps/unix/sysv/linux/arm/nptl/Makefile: New file.
+
2006-02-28 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S,
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile
index d3c02a2..9f2b0fe 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile
@@ -1,3 +1,6 @@
+# Set this flag here so that arm/nptl/Makefile will see it.
+arm-using-eabi = yes
+
ifeq ($(subdir),csu)
# In order for unwinding to fail when it falls out of main, we need a
# cantunwind marker. There's one in start.S. To make sure we reach it, add
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile
new file mode 100644
index 0000000..f270f19
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/Makefile
@@ -0,0 +1,8 @@
+ifeq ($(subdir),nptl)
+ifneq ($(arm-using-eabi),yes)
+# These tests rely on PTHREAD_KEYS_MAX. The SJLJ exception machinery
+# in libgcc registers one key, however, so only PTHREAD_KEYS_MAX-1
+# keys are available. This works fine for EABI targets.
+tests := $(filter-out tst-key1 tst-key4,$(tests))
+endif
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc65a7e706e0b38c97d79064e818538289e907ec
commit cc65a7e706e0b38c97d79064e818538289e907ec
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 22:20:13 2006 +0000
.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
index 0051a0c..0968014 100644
--- a/ChangeLog.hppa
+++ b/ChangeLog.hppa
@@ -1,3 +1,4 @@
2006-02-28 Roland McGrath <roland@redhat.com>
+ * sysdeps/hppa/shlib-versions: New file.
* sysdeps/hppa/preconfigure: New file.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16c82ad7150f420430b15c3be39880716bf94528
commit 16c82ad7150f420430b15c3be39880716bf94528
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Tue Feb 28 19:26:36 2006 +0000
* sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S,
sysdeps/unix/sysv/linux/arm/sysdep.h: Remove ports/ from include
paths.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index abc3563..d7217bb 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-02-28 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.S,
+ sysdeps/unix/sysv/linux/arm/sysdep.h: Remove ports/ from include
+ paths.
+
2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index d6eb713..2cc0a9d 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +18,7 @@
02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
-#include <ports/sysdeps/arm/sysdep.h>
+#include <sysdeps/arm/sysdep.h>
/* Some definitions to allow the assembler in sysdeps/unix/ to build
without needing ARM-specific versions of all the files. */
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index b2906f7..72541dd 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,4 +32,4 @@ ENTRY (__syscall_error)
rsb r0, r0, $0
#define __syscall_error __syscall_error_1
-#include <ports/sysdeps/unix/arm/sysdep.S>
+#include <sysdeps/unix/arm/sysdep.S>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 01b3717..e40add3 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -22,7 +23,7 @@
#define _LINUX_ARM_SYSDEP_H 1
/* There is some commonality. */
-#include <ports/sysdeps/unix/arm/sysdep.h>
+#include <sysdeps/unix/arm/sysdep.h>
/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */
#include <dl-sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bd382dcab939130ba926e3c0bdd4d2b65d77daf
commit 9bd382dcab939130ba926e3c0bdd4d2b65d77daf
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 10:15:32 2006 +0000
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/hppa/shlib-versions: New file.
* sysdeps/hppa/preconfigure: New file.
diff --git a/sysdeps/hppa/shlib-versions b/sysdeps/hppa/shlib-versions
new file mode 100644
index 0000000..5a1a865
--- /dev/null
+++ b/sysdeps/hppa/shlib-versions
@@ -0,0 +1,7 @@
+hppa.*-.*-.* libm=6 GLIBC_2.2
+
+hppa.*-.*-.* libc=6 GLIBC_2.2
+
+hppa.*-.*-.* ld=ld.so.1 GLIBC_2.2
+
+hppa-.*-.* libBrokenLocale=1 GLIBC_2.2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8197a54750a764b9741dca142834ef66d22d9803
commit 8197a54750a764b9741dca142834ef66d22d9803
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 10:12:50 2006 +0000
.
diff --git a/ChangeLog.hppa b/ChangeLog.hppa
new file mode 100644
index 0000000..0051a0c
--- /dev/null
+++ b/ChangeLog.hppa
@@ -0,0 +1,3 @@
+2006-02-28 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/hppa/preconfigure: New file.
diff --git a/ChangeLog.m68k b/ChangeLog.m68k
new file mode 100644
index 0000000..328f858
--- /dev/null
+++ b/ChangeLog.m68k
@@ -0,0 +1,3 @@
+2006-02-28 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/m68k/preconfigure: New file.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0bd510a6d67823fa601227d709628a62dfa79dc
commit f0bd510a6d67823fa601227d709628a62dfa79dc
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 10:12:23 2006 +0000
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/hppa/preconfigure: New file.
diff --git a/sysdeps/hppa/preconfigure b/sysdeps/hppa/preconfigure
new file mode 100644
index 0000000..4d7fdcd
--- /dev/null
+++ b/sysdeps/hppa/preconfigure
@@ -0,0 +1,6 @@
+# This fragment canonicalizes the machine names for hppa variants.
+
+case "$machine" in
+hppa*64*) base_machine=hppa machine=hppa/hppa64 ;;
+hppa*) base_machine=hppa machine=hppa/hppa1.1 ;;
+esac
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=041187bdd16d173fad4ba40a77a6a5fa31be5c7a
commit 041187bdd16d173fad4ba40a77a6a5fa31be5c7a
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 10:10:56 2006 +0000
2006-02-28 Roland McGrath <roland@redhat.com>
* sysdeps/m68k/preconfigure: New file.
diff --git a/sysdeps/m68k/preconfigure b/sysdeps/m68k/preconfigure
new file mode 100644
index 0000000..35dcea4
--- /dev/null
+++ b/sysdeps/m68k/preconfigure
@@ -0,0 +1,6 @@
+# This fragment canonicalizes the machine names for m68k variants.
+
+case "$machine" in
+m680?0) base_machine=m68k machine=m68k/$machine ;;
+m68k) base_machine=m68k machine=m68k/m68020 ;;
+esac
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7cd33704682156047af5c4391ca8a9cc16012a1
commit d7cd33704682156047af5c4391ca8a9cc16012a1
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 08:33:08 2006 +0000
.
diff --git a/ChangeLog b/ChangeLog
index f0ff75c..5974507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2006-02-28 Roland McGrath <roland@redhat.com>
+ * Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level
+ stuff.
+
* README: Update for new add-on scheme.
2006-02-27 Roland McGrath <roland@redhat.com>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=400dc23c6413cdb3c838fddd5a7dc310292727ba
commit 400dc23c6413cdb3c838fddd5a7dc310292727ba
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 08:33:00 2006 +0000
2006-02-28 Roland McGrath <roland@redhat.com>
* Makefile (glibc-port-%-$(dist-version).tar): Don't include top-level
stuff.
diff --git a/Makefile b/Makefile
index 79c7e0b..01985d9 100644
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,8 @@ sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$*
.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
md5sum $^
-glibc-port-%-$(dist-version).tar: configure ChangeLog
+glibc-port-%-$(dist-version).tar: ChangeLog.%
@rm -fr $(basename $@)
- $(do-export) -l ports
- rm -f $(basename $@)/ChangeLog.[a-z]*
$(MAKE) -q `find $(sysdeps-of-stem) -name configure`
$(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem))
mv $(basename $@)/ports/* $(basename $@)/
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b1830489bd51d7d860cd96ec502f02ff5c91b53
commit 7b1830489bd51d7d860cd96ec502f02ff5c91b53
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 08:23:43 2006 +0000
.
diff --git a/ChangeLog b/ChangeLog
index 391c882..f0ff75c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-28 Roland McGrath <roland@redhat.com>
+
+ * README: Update for new add-on scheme.
+
2006-02-27 Roland McGrath <roland@redhat.com>
* Makefile: Remove libc boilerplate.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43d37683379da221611dcad9fc1b151bbb9df6c9
commit 43d37683379da221611dcad9fc1b151bbb9df6c9
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 08:23:38 2006 +0000
2006-02-28 Roland McGrath <roland@redhat.com>
* README: Update for new add-on scheme.
diff --git a/README b/README
index 8e416b7..f395a05 100644
--- a/README
+++ b/README
@@ -1,13 +1,24 @@
-This directory is an add-on for the GNU C Library (glibc).
-It provides additional ports to machines and/or operating systems that are
-not maintained in the official glibc source tree.
+This is the glibc ports repository, an add-on for the GNU C Library (glibc).
+It contains code that is not maintained in the official glibc source tree.
-The scripts in the top level of this directory provide the infrastructure
-necessary for a glibc add-on. You can make a new add-on containing one or
-more ports by copying configure, configure.in, and Makeconfig into your own
-add-on directory, which you can give any name (it doesn't have to be
-`ports'). You may want to include a README and Banner of your own talking
-about your port's code in particular, rather than the generic ones here.
+This includes working ports to GNU/Linux on some machine architectures that
+are not maintained in the official glibc source tree. It also includes
+some code once used by old libc ports now defunct, which has been abandoned
+but may be useful for some future porter to examine. It may also include
+some optimized functions tailored for specific CPU implementations of an
+architecture, to be selected using --with-cpu.
+
+The ports repository is cooperatively maintained by volunteers on the
+<libc-ports@sourceware.org> mailing list, and housed in the glibc CVS as a
+module called "ports". See http://www.gnu.org/software/libc/resources.html
+for details on using CVS. To report a bug in code housed in the ports
+repository, please go to http://sources.redhat.com/bugzilla/ and file a bug
+report under the glibc "ports" component.
+
+An add-on for an individual port can be made from just the sysdeps/
+subdirectories containing the port's code. You may want to include a
+README and Banner of your own talking about your port's code in particular,
+rather than the generic ones here.
The real source code for any ports is found in the sysdeps/ subdirectories.
These should be exactly what would go into the main libc source tree if you
@@ -25,15 +36,8 @@ rules for glibc add-on configure fragments. No preconfigure file should do
anything on an unrelated configuration, so that disparate ports can be put
into a single add-on without interfering with each other.
-Like all glibc add-ons, the only way to use this is to place this directory
-(just a symlink won't do) inside the top-level glibc source directory.
-Then include the name of this directory (e.g. `ports') when you specify
-`--enable-add-ons=...' to glibc's configure (or use just --enable-add-ons
-to have it try every add-on directory sitting in your source tree).
-
-If you find problems with the top-level scripts in this add-on, please go
-to http://sources.redhat.com/bugzilla/ and file a report for the glibc
-under the "admin" component.
+Like all glibc add-ons, this must be used by specifying the directory in
+the --enable-add-ons option when running glibc's configure script.
$Id$
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dea41b77f0b2ab8de6243479525a853e48316fa4
commit dea41b77f0b2ab8de6243479525a853e48316fa4
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 07:12:30 2006 +0000
.
diff --git a/ChangeLog b/ChangeLog
index 6ddb225..391c882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-27 Roland McGrath <roland@redhat.com>
+
+ * Makefile: Remove libc boilerplate.
+ * Makeconfig: File removed.
+ * configure.in: File removed.
+ * configure: File removed.
+
2005-03-22 Roland McGrath <roland@redhat.com>
* Makefile ($(distname).tar): Fail if sysdeps/.../configure files are
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0bfd5cb70595af9432f20fac2925c375bfa12ed
commit c0bfd5cb70595af9432f20fac2925c375bfa12ed
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 07:12:24 2006 +0000
obsolete files removed
diff --git a/Makeconfig b/Makeconfig
deleted file mode 100644
index 92158be..0000000
--- a/Makeconfig
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makeconfig fragment for glibc ports add-on.
-
-# These rules make sure that sysdeps/CPU/preconfigure changes are noticed.
-# preconfigure fragments can be written by hand, or they can be generated
-# from preconfigure.in by autoconf like sysdeps/.../configure.in files.
-
-# Figure out the name of this add-on. The ports add-on infrastructure
-# scripts can be copied into separate add-on packages by any name.
-ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps
-
-$(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure)
-
-ifneq ($(AUTOCONF),no)
-
-ifeq ($(with-cvs),yes)
-define autoconf-it-cvs
-test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
-endef
-else
-autoconf-it-cvs =
-endif
-
-define autoconf-it
-@-rm -f $@.new
-$(AUTOCONF) $(ACFLAGS) $< > $@.new
-chmod a-w,a+x $@.new
-mv -f $@.new $@
-$(autoconf-it-cvs)
-endef
-
-$(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \
- aclocal.m4
- $(autoconf-it)
-
-endif # $(AUTOCONF) = no
-
-# This allows e.g. `make ports/dist' from a build directory.
-ifndef subdir
-ports/%:
- $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
-endif
diff --git a/configure b/configure
deleted file mode 100755
index 77d4ea4..0000000
--- a/configure
+++ /dev/null
@@ -1,18 +0,0 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-
-# The configure fragment in this file provides infrastructure for a glibc
-# add-on containing one or more glibc ports. Only these few script files
-# need exist in the top-level source directory of the add-on. The ports
-# themselves are contained entirely within their new sysdeps/ directories.
-# This makes it easy to take these few top-level files plus a new port's
-# additions to the sysdeps tree, and package a small add-on for that port.
-# The same infrastructure scripts work for any number of such glibc ports
-# collected together into a single shared add-on package.
-
-cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
-test x"$cpu_frags" = x'sysdeps/*/preconfigure' ||
-for frag in $cpu_frags; do
- echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5
-echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6
- . $srcdir/$libc_add_on/$frag
-done
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 93b987a..0000000
--- a/configure.in
+++ /dev/null
@@ -1,18 +0,0 @@
-dnl glibc add-on configure.in fragment for a ports add-on.
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-
-# The configure fragment in this file provides infrastructure for a glibc
-# add-on containing one or more glibc ports. Only these few script files
-# need exist in the top-level source directory of the add-on. The ports
-# themselves are contained entirely within their new sysdeps/ directories.
-# This makes it easy to take these few top-level files plus a new port's
-# additions to the sysdeps tree, and package a small add-on for that port.
-# The same infrastructure scripts work for any number of such glibc ports
-# collected together into a single shared add-on package.
-
-cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
-test x"$cpu_frags" = x'sysdeps/*/preconfigure' ||
-for frag in $cpu_frags; do
- AC_MSG_RESULT(ports add-on running preconfigure fragment $frag)
- . $srcdir/$libc_add_on/$frag
-done
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc949526a63e184807b6372a6cebe37ad83ffb74
commit cc949526a63e184807b6372a6cebe37ad83ffb74
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 07:11:55 2006 +0000
2006-02-27 Roland McGrath <roland@redhat.com>
* Makefile: Remove libc boilerplate.
* Makeconfig: File removed.
* configure.in: File removed.
* configure: File removed.
diff --git a/Makefile b/Makefile
index d1cbbef..79c7e0b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,5 @@
-# This boilerplate is necessary just because any add-on directory
-# gets added as a normal subdirectory for the glibc build process.
-
-subdir = ports
-
-include ../Rules
+# This makefile is not used by the glibc build process.
+# It's purely for making ports tarballs.
.PHONY: dist dist-ports
dist: dist-ports
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c67709f59ccf092af82c77eef005a2180824b7f
commit 5c67709f59ccf092af82c77eef005a2180824b7f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 28 07:09:47 2006 +0000
2006-02-27 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
self to get main source tree's file.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
* sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S
index eea1cbe..675a997 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S
@@ -1,2 +1,9 @@
-#define RESET_PID
-#include <sysdeps/unix/sysv/linux/alpha/clone.S>
+/* We want an #include_next, but we are the main source file.
+ So, #include ourselves and in that incarnation we can use #include_next. */
+#ifndef INCLUDED_SELF
+# define INCLUDED_SELF
+# include <clone.S>
+#else
+# define RESET_PID
+# include_next <clone.S>
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a883978723ca006fa66c5a13c28c4791779bd0e0
commit a883978723ca006fa66c5a13c28c4791779bd0e0
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Feb 27 15:36:07 2006 +0000
* sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
(struct __pthread_internal_slist): New.
(union pthread_mutex_t): Give struct a tag. Add __list
in an anonymous union.
(union pthread_cond_t): Use __extension__.
* sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
(__lll_mutex_lock_outlined, __lll_mutex_timedlock_outlined): Remove
prototypes.
(lll_robust_mutex_dead, __lll_robust_mutex_trylock,
lll_robust_mutex_trylock, __lll_robust_mutex_lock,
lll_robust_mutex_lock, lll_robust_mutex_cond_lock,
__lll_robust_mutex_timedlock, lll_robust_mutex_timedlock,
__lll_robust_mutex_unlock, lll_robust_mutex_unlock): New.
(__lll_robust_lock_wait, __lll_robust_timedlock_wait): New
prototypes.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 0d4f5fd..abc3563 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,23 @@
2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
+ (struct __pthread_internal_slist): New.
+ (union pthread_mutex_t): Give struct a tag. Add __list
+ in an anonymous union.
+ (union pthread_cond_t): Use __extension__.
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+ (__lll_mutex_lock_outlined, __lll_mutex_timedlock_outlined): Remove
+ prototypes.
+ (lll_robust_mutex_dead, __lll_robust_mutex_trylock,
+ lll_robust_mutex_trylock, __lll_robust_mutex_lock,
+ lll_robust_mutex_lock, lll_robust_mutex_cond_lock,
+ __lll_robust_mutex_timedlock, lll_robust_mutex_timedlock,
+ __lll_robust_mutex_unlock, lll_robust_mutex_unlock): New.
+ (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New
+ prototypes.
+
+2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use
sysdeps/generic/.
* sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
index fb0fe3f..ea8d6a2 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,11 +43,17 @@ typedef union
} pthread_attr_t;
+typedef struct __pthread_internal_slist
+{
+ struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+
+
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
{
- struct
+ struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
@@ -56,7 +62,11 @@ typedef union
binary compatibility. */
int __kind;
unsigned int __nusers;
- int __spins;
+ __extension__ union
+ {
+ int __spins;
+ __pthread_slist_t __list;
+ };
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
@@ -77,15 +87,15 @@ typedef union
{
int __lock;
unsigned int __futex;
- unsigned long long int __total_seq;
- unsigned long long int __wakeup_seq;
- unsigned long long int __woken_seq;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
- long long int __align;
+ __extension__ long long int __align;
} pthread_cond_t;
typedef union
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index 7f1c291..d1d0d65 100644
--- a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -62,6 +62,15 @@
__ret; \
})
+#define lll_robust_mutex_dead(futexv) \
+ do \
+ { \
+ int *__futexp = &(futexv); \
+ atomic_or (__futexp, FUTEX_OWNER_DIED); \
+ lll_futex_wake (__futexp, 1); \
+ } \
+ while (0)
+
/* Returns non-zero if error happened, zero if success. */
#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
({ \
@@ -125,7 +134,15 @@ __lll_mutex_cond_trylock (int *futex)
#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
-extern void __lll_mutex_lock_outlined (int *futex) attribute_hidden;
+static inline int __attribute__((always_inline))
+__lll_robust_mutex_trylock(int *futex, int id)
+{
+ return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
+}
+#define lll_robust_mutex_trylock(lock, id) \
+ __lll_robust_mutex_trylock (&(lock), id)
+
+extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
static inline void __attribute__((always_inline))
__lll_mutex_lock (int *futex)
@@ -141,6 +158,18 @@ __lll_mutex_lock (int *futex)
#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_lock (int *futex, int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_lock_wait (futex);
+ return result;
+}
+#define lll_robust_mutex_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_cond_lock (int *futex)
{
@@ -155,11 +184,13 @@ __lll_mutex_cond_lock (int *futex)
#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_robust_mutex_cond_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+
+
extern int __lll_timedlock_wait (int *futex, const struct timespec *)
attribute_hidden;
-
-extern int __lll_mutex_timedlock_outlined (int *futex,
- const struct timespec *)
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
attribute_hidden;
static inline int __attribute__ ((always_inline))
@@ -176,6 +207,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime)
__lll_mutex_timedlock (&(futex), abstime)
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
+ int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_robust_mutex_timedlock(futex, abstime, id) \
+ __lll_robust_mutex_timedlock (&(futex), abstime, id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_unlock (int *futex)
{
@@ -187,6 +231,17 @@ __lll_mutex_unlock (int *futex)
static inline void __attribute__ ((always_inline))
+__lll_robust_mutex_unlock (int *futex, int mask)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val & mask, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_robust_mutex_unlock(futex) \
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+
+
+static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (int *futex)
{
(void) atomic_exchange_rel (futex, 0);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e674bfd64c2d16fde34795f18969b137d82f1c0
commit 8e674bfd64c2d16fde34795f18969b137d82f1c0
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Feb 27 15:22:31 2006 +0000
* sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use
sysdeps/generic/.
* sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 51b135d..0d4f5fd 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c: Don't use
+ sysdeps/generic/.
+ * sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: Likewise.
+
2006-01-12 Roland McGrath <roland@redhat.com>
* sysdeps/arm/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
index 295d12f..38a4fbc 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
@@ -73,5 +73,5 @@ weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
-# include <sysdeps/generic/ftruncate64.c>
+# include <misc/ftruncate64.c>
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
index d788733..6a9c348 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
@@ -71,5 +71,5 @@ truncate64 (const char *path, off64_t length)
#else
/* Use the generic implementation. */
-# include <sysdeps/generic/truncate64.c>
+# include <misc/truncate64.c>
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de18c6e81f7bcfa766423790841ee8279a087298
commit de18c6e81f7bcfa766423790841ee8279a087298
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 25 01:26:22 2006 +0000
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
* soft-fp/single.h (SFtype): Define.
(union _FP_UNION_S): Use it.
* soft-fp/double.h (DFtype): Define.
(union _FP_UNION_D): Use it.
* soft-fp/extended.h (XFtype): Define.
(union _FP_UNION_E): Use it.
* soft-fp/quad.h (TFtype): Define.
(union _FP_UNION_Q): Use it.
* soft-fp/soft-fp.h: Add _LIBC conditionals.
(SI_BITS, DI_BITS): Define.
* soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for
X##_c.
(_FP_CMP_EQ): Use parentheses for && inside ||.
(_FP_TO_INT): Use statement expressions in conditional controlling
constant shift.
(_FP_FROM_INT): Likewise. Take unsigned type as argument.
* soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2,
_FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in
conditional controlling possibly constant shift.
(_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||.
* soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
__FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags.
* soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
* soft-fp/floatdidf.c: Pass unsigned type and macro for type size.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/fixdfdi.c: Pass macro for type size.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise.
* sysdeps/powerpc/soft-fp/q_itoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
* soft-fp/adddf3.c: Use typedefs for argument and return types.
* soft-fp/addsf3.c: Likewise.
* soft-fp/addtf3.c: Likewise.
* soft-fp/divdf3.c: Likewise.
* soft-fp/divsf3.c: Likewise.
* soft-fp/divtf3.c: Likewise.
* soft-fp/eqdf2.c: Likewise.
* soft-fp/eqsf2.c: Likewise.
* soft-fp/eqtf2.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/fixdfdi.c: Likewise.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* soft-fp/floatdidf.c: Likewise.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/gedf2.c: Likewise.
* soft-fp/gesf2.c: Likewise.
* soft-fp/getf2.c: Likewise.
* soft-fp/ledf2.c: Likewise.
* soft-fp/lesf2.c: Likewise.
* soft-fp/letf2.c: Likewise.
* soft-fp/muldf3.c: Likewise.
* soft-fp/mulsf3.c: Likewise.
* soft-fp/multf3.c: Likewise.
* soft-fp/negdf2.c: Likewise.
* soft-fp/negsf2.c: Likewise.
* soft-fp/negtf2.c: Likewise.
* soft-fp/sqrtdf2.c: Likewise.
* soft-fp/sqrtsf2.c: Likewise.
* soft-fp/sqrttf2.c: Likewise.
* soft-fp/subdf3.c: Likewise.
* soft-fp/subsf3.c: Likewise.
* soft-fp/subtf3.c: Likewise.
* soft-fp/truncdfsf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* soft-fp/unorddf2.c: Likewise.
* soft-fp/unordsf2.c: Likewise.
* soft-fp/unordtf2.c: Likewise.
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c
index cdb83c8..82c5080 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtqux.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c
@@ -33,7 +33,7 @@ _OtsCvtQUX (unsigned long a)
FP_DECL_Q(C);
FP_DECL_RETURN(c);
- FP_FROM_INT_Q(C, a, 64, long);
+ FP_FROM_INT_Q(C, a, 64, unsigned long);
FP_PACK_RAW_Q(c, C);
FP_RETURN(c);
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c
index 6248f9a..dc80291 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtqx.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c
@@ -33,7 +33,7 @@ _OtsCvtQX (long a)
FP_DECL_Q(C);
FP_DECL_RETURN(c);
- FP_FROM_INT_Q(C, a, 64, long);
+ FP_FROM_INT_Q(C, a, 64, unsigned long);
FP_PACK_RAW_Q(c, C);
FP_RETURN(c);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a991de32677e4cfba3ef2418475c7d4ef36fe0c7
commit a991de32677e4cfba3ef2418475c7d4ef36fe0c7
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 25 01:24:57 2006 +0000
2006-02-09 Joseph S. Myers <joseph@codesourcery.com>
* soft-fp/op-common.h (_FP_UNPACK_SEMIRAW): Define.
(_FP_OVERFLOW_SEMIRAW): Likewise.
(_FP_CHECK_SIGNAN_SEMIRAW): Likewise.
(_FP_CHOOSENAN_SEMIRAW): Likewise.
(_FP_EXP_NORMAL): Likewise.
(_FP_PACK_SEMIRAW): Likewise.
(_FP_ADD_INTERNAL): Rewrite to operate on semi-raw value.
(_FP_SUB): Likewise.
(_FP_TO_INT): Rewrite to operate on raw values. Don't set INVALID
exception for conversions where most negative representable
integer is correct truncated value, but do set INEXACT for such
conversions where appropriate. Don't always left-shift for
converting to a wider integer.
(_FP_FROM_INT): Rewrite to yield raw value. Correct shift for
integers with one more bits than (mantissa + guard) bits for the
floating point format. Don't use __FP_FRAC_SRS_1 for shifting
integers that may be wider than _FP_W_TYPE_SIZE.
(FP_CONV): Don't define.
(FP_EXTEND): Define.
(FP_TRUNC): Likewise.
* soft-fp/op-1.h (_FP_FRAC_SRST_1, __FP_FRAC_SRST_1): Define.
(_FP_FRAC_CONV_1_1): Don't define.
(_FP_FRAC_COPY_1_1): Define.
* soft-fp/op-2.h (_FP_FRAC_SRST_2): Define.
(_FP_FRAC_CONV_1_2, _FP_FRAC_CONV_2_1): Don't define.
(_FP_FRAC_COPY_1_2, _FP_FRAC_COPY_2_1): Define.
* soft-fp/op-4.h (_FP_FRAC_SRST_4): Define.
(_FP_FRAC_SRS_4): Define based on _FP_FRAC_SRST_4.
(_FP_FRAC_CONV_1_4, _FP_FRAC_CONV_2_4): Don't define.
(_FP_FRAC_COPY_1_4, _FP_FRAC_COPY_2_4): Define.
(_FP_FRAC_CONV_4_1, _FP_FRAC_CONV_4_2): Don't define.
(_FP_FRAC_COPY_4_1, _FP_FRAC_COPY_4_2): Define.
* soft-fp/single.h (_FP_FRACTBITS_S): Define.
(_FP_FRACXBITS_S): Define in terms of _FP_FRACXBITS_S.
(_FP_WFRACXBITS_S): Likewise.
(_FP_QNANBIT_SH_S, _FP_IMPLBIT_SH_S): Define.
(FP_UNPACK_SEMIRAW_S, FP_UNPACK_SEMIRAW_SP): Define.
(FP_PACK_SEMIRAW_S, FP_PACK_SEMIRAW_SP): Define.
* soft-fp/double.h (_FP_QNANBIT_SH_D, _FP_IMPLBIT_SH_D): Define.
(FP_UNPACK_SEMIRAW_D, FP_UNPACK_SEMIRAW_D): Define
(FP_PACK_SEMIRAW_D, FP_PACK_SEMIRAW_DP): Define.
* soft-fp/extended.h (_FP_QNANBIT_SH_E, _FP_IMPLBIT_SH_E): Define.
(FP_UNPACK_EP): Correct typo.
(FP_UNPACK_SEMIRAW_E, FP_UNPACK_SEMIRAW_EP): Define.
(FP_PACK_SEMIRAW_E, FP_PACK_SEMIRAW_EP): Define.
* soft-fp/quad.h (_FP_QNANBIT_SH_Q, _FP_IMPLBIT_SH_Q): Define.
(FP_UNPACK_SEMIRAW_Q, FP_UNPACK_SEMIRAW_QP): Define.
(FP_PACK_SEMIRAW_Q, FP_PACK_SEMIRAW_QP): Define.
* soft-fp/fixdfdi.c: Use unsigned type for result of conversion.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise.
* soft-fp/adddf3.c: Update for changed soft-fp interfaces.
* soft-fp/addsf3.c: Likewise.
* soft-fp/addtf3.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/fixdfdi.c: Likewise.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* soft-fp/floatdidf.c: Likewise.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/subdf3.c: Likewise.
* soft-fp/subsf3.c: Likewise.
* soft-fp/subtf3.c: Likewise.
* soft-fp/truncdfsf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* sysdeps/alpha/soft-fp/ots_add.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvttx.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtxt.c: Likewise.
* sysdeps/alpha/soft-fp/ots_nintxq.c: Likewise.
* sysdeps/alpha/soft-fp/ots_sub.c: Likewise.
* sysdeps/powerpc/soft-fp/q_add.c: Likewise.
* sysdeps/powerpc/soft-fp/q_dtoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_itoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtod.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoi.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoll.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtos.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtou.c: Likewise.
* sysdeps/powerpc/soft-fp/q_qtoull.c: Likewise.
* sysdeps/powerpc/soft-fp/q_stoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_sub.c: Likewise.
* sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_add.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_dtoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtod.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoi.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtos.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtou.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_stoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_sub.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_add.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_dtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtod.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtos.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_qtox.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_stoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_sub.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c
index b4f6c28..acf66f3 100644
--- a/sysdeps/alpha/soft-fp/ots_add.c
+++ b/sysdeps/alpha/soft-fp/ots_add.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: addition.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -29,10 +29,10 @@ _OtsAddX(long al, long ah, long bl, long bh, long _round)
FP_DECL_RETURN(c);
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
- FP_UNPACK_Q(B, b);
+ FP_UNPACK_SEMIRAW_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(B, b);
FP_ADD_Q(C, A, B);
- FP_PACK_Q(c, C);
+ FP_PACK_SEMIRAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
FP_RETURN(c);
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c
index d7ab5ba..cdb83c8 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtqux.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: unsigned integer to float conversion.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -34,7 +34,7 @@ _OtsCvtQUX (unsigned long a)
FP_DECL_RETURN(c);
FP_FROM_INT_Q(C, a, 64, long);
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
FP_RETURN(c);
}
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c
index 0e1c6bd..6248f9a 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtqx.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: signed integer to float conversion.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -34,6 +34,6 @@ _OtsCvtQX (long a)
FP_DECL_RETURN(c);
FP_FROM_INT_Q(C, a, 64, long);
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
FP_RETURN(c);
}
diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c
index ee5ac32..2d0bc9b 100644
--- a/sysdeps/alpha/soft-fp/ots_cvttx.c
+++ b/sysdeps/alpha/soft-fp/ots_cvttx.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: floating point extension.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -35,13 +35,13 @@ _OtsConvertFloatTX(double a)
FP_DECL_Q(C);
FP_DECL_RETURN(c);
- FP_UNPACK_D(A, a);
+ FP_UNPACK_RAW_D(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(Q,D,4,2,C,A);
+ FP_EXTEND(Q,D,4,2,C,A);
#else
- FP_CONV(Q,D,2,1,C,A);
+ FP_EXTEND(Q,D,2,1,C,A);
#endif
- FP_PACK_Q(c, C);
+ FP_PACK_RAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
FP_RETURN(c);
diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c
index 1fd47da..2c9df52 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtxq.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: float to integer conversion.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -26,14 +26,15 @@ _OtsCvtXQ (long al, long ah, long _round)
{
FP_DECL_EX;
FP_DECL_Q(A);
- long r, s;
+ unsigned long r;
+ long s;
/* If bit 3 is set, then integer overflow detection is requested. */
s = _round & 8 ? 1 : -1;
_round = _round & 3;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_RAW_Q(A, a);
FP_TO_INT_Q(r, A, 64, s);
if (s > 0 && (_fex &= FP_EX_INVALID))
diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c
index 2629dd9..6221a23 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtxt.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: floating point truncation.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -31,13 +31,13 @@ _OtsConvertFloatXT (long al, long ah, long _round)
double r;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(A, a);
#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
- FP_CONV(D,Q,2,4,R,A);
+ FP_TRUNC(D,Q,2,4,R,A);
#else
- FP_CONV(D,Q,1,2,R,A);
+ FP_TRUNC(D,Q,1,2,R,A);
#endif
- FP_PACK_D(r, R);
+ FP_PACK_SEMIRAW_D(r, R);
FP_HANDLE_EXCEPTIONS;
return r;
diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c
index 2cb1ca4..a718372 100644
--- a/sysdeps/alpha/soft-fp/ots_nintxq.c
+++ b/sysdeps/alpha/soft-fp/ots_nintxq.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: convert to fortran nearest.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -26,22 +26,24 @@ _OtsNintXQ (long al, long ah, long _round)
{
FP_DECL_EX;
FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
- long r, s;
+ unsigned long r;
+ long s;
/* If bit 3 is set, then integer overflow detection is requested. */
s = _round & 8 ? 1 : -1;
_round = _round & 3;
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(A, a);
/* Build 0.5 * sign(A) */
B_e = _FP_EXPBIAS_Q;
- __FP_FRAC_SET_2 (B, _FP_IMPLBIT_Q, 0);
+ __FP_FRAC_SET_2 (B, 0, 0);
B_s = A_s;
- _FP_UNPACK_CANONICAL(Q,2,B);
FP_ADD_Q(C, A, B);
+ _FP_FRAC_SRL_2(C, _FP_WORKBITS);
+ _FP_FRAC_HIGH_RAW_Q(C) &= ~(_FP_W_TYPE)_FP_IMPLBIT_Q;
FP_TO_INT_Q(r, C, 64, s);
if (s > 0 && (_fex &= FP_EX_INVALID))
FP_HANDLE_EXCEPTIONS;
diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c
index c10043f..5147266 100644
--- a/sysdeps/alpha/soft-fp/ots_sub.c
+++ b/sysdeps/alpha/soft-fp/ots_sub.c
@@ -1,5 +1,5 @@
/* Software floating-point emulation: subtraction.
- Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@cygnus.com) and
Jakub Jelinek (jj@ultra.linux.cz).
@@ -29,10 +29,10 @@ _OtsSubX(long al, long ah, long bl, long bh, long _round)
FP_DECL_RETURN(c);
FP_INIT_ROUNDMODE;
- FP_UNPACK_Q(A, a);
- FP_UNPACK_Q(B, b);
+ FP_UNPACK_SEMIRAW_Q(A, a);
+ FP_UNPACK_SEMIRAW_Q(B, b);
FP_SUB_Q(C, A, B);
- FP_PACK_Q(c, C);
+ FP_PACK_SEMIRAW_Q(c, C);
FP_HANDLE_EXCEPTIONS;
FP_RETURN(c);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2575768d0b4a3b4b4e6d3537b3044eca202d12f5
commit 2575768d0b4a3b4b4e6d3537b3044eca202d12f5
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 21 02:13:02 2006 +0000
.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index 53fd44e..f794cc5 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,7 @@
+2006-01-12 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/am33/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
+
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ...
diff --git a/ChangeLog.arm b/ChangeLog.arm
index b8fca1a..51b135d 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2006-01-12 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/arm/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
+
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ...
diff --git a/ChangeLog.mips b/ChangeLog.mips
new file mode 100644
index 0000000..2881533
--- /dev/null
+++ b/ChangeLog.mips
@@ -0,0 +1,5 @@
+2006-02-20 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/mips/shlib-versions: New file.
+ * sysdeps/mips/preconfigure: New file.
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h: New file.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92724ebc20eab7058a169c656549a4f5d97bf45c
commit 92724ebc20eab7058a169c656549a4f5d97bf45c
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 21 02:12:56 2006 +0000
2006-02-20 Roland McGrath <roland@redhat.com>
* sysdeps/mips/shlib-versions: New file.
* sysdeps/mips/preconfigure: New file.
* sysdeps/unix/sysv/linux/mips/kernel-features.h: New file.
diff --git a/sysdeps/mips/preconfigure b/sysdeps/mips/preconfigure
new file mode 100644
index 0000000..9190eee
--- /dev/null
+++ b/sysdeps/mips/preconfigure
@@ -0,0 +1,29 @@
+case "$machine" in
+mips64*) base_machine=mips64
+ case "$CC $CFLAGS $CPPFLAGS " in
+ *" -mabi=n32 "*) mips_cc_abi=n32 ;;
+ *" -mabi=64 "*|*" -mabi=n64 "*) mips_cc_abi=64 ;;
+ *" -mabi=32 "*|*" -mabi=o32 "*) mips_cc_abi=32 ;;
+ *) mips_cc_abi=default ;;
+ esac
+ case $config_os in
+ *abin32*) mips_config_abi=n32 ;;
+ *abi64*|*abin64*) mips_config_abi=64 ;;
+ *abi32*|*abio32*) mips_config_abi=32 ;;
+ *) mips_config_abi=$mips_cc_abi ;;
+ esac
+ case $mips_config_abi in
+ default) machine=mips/mips64/n32 mips_config_abi=n32 ;;
+ n32) machine=mips/mips64/n32 ;;
+ 64) machine=mips/mips64/n64 ;;
+ 32) machine=mips/mips32/kern64 ;;
+ esac
+ machine=$machine/$config_machine
+ if test $mips_config_abi != $mips_cc_abi; then
+ # This won't make it to config.make, but we want to
+ # set this in case configure tests depend on it.
+ CPPFLAGS="$CPPFLAGS -mabi=$mips_config_abi"
+ fi
+ ;;
+mips*) base_machine=mips machine=mips/mips32/$machine ;;
+esac
diff --git a/sysdeps/mips/shlib-versions b/sysdeps/mips/shlib-versions
new file mode 100644
index 0000000..7809393
--- /dev/null
+++ b/sysdeps/mips/shlib-versions
@@ -0,0 +1,21 @@
+mips.*-.*-linux.* libm=6 GLIBC_2.0 GLIBC_2.2
+
+# Working mips versions were never released between 2.0 and 2.2.
+mips.*-.*-linux.* libc=6 GLIBC_2.0 GLIBC_2.2
+
+mips.*-.*-linux.* ld=ld.so.1 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libdl=2 GLIBC_2.0 GLIBC_2.2
+
+mips.*-.*-linux.* libresolv=2 GLIBC_2.0 GLIBC_2.2
+
+mips.*-.*-linux.* libnss_files=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_dns=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_compat=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_nis=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_nisplus=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_ldap=2 GLIBC_2.0 GLIBC_2.2
+mips.*-.*-linux.* libnss_hesiod=2 GLIBC_2.0 GLIBC_2.2
+
+mips.*-.*-linux.* libnsl=1 GLIBC_2.0 GLIBC_2.2
+
+mips.*-.*-linux.* librt=1 GLIBC_2.0 GLIBC_2.2
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
new file mode 100644
index 0000000..f479b60
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -0,0 +1,34 @@
+/* Set flags signalling availability of kernel features based on given
+ kernel version number.
+ Copyright (C) 1999-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sgidefs.h>
+
+/* Linux 2.3.39 introduced 32bit UID/GIDs. Some platforms had 32
+ bit type all along. */
+#define __ASSUME_32BITUIDS 1
+
+/* MIPS platforms had IPC64 all along. */
+#define __ASSUME_IPC64 1
+
+#if _MIPS_SIM == _ABIN32
+# define __ASSUME_FCNTL64 1
+#endif
+
+#include_next <kernel-features.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2f8c9b96bab6151dd7c5190c3b07a17228f52d4
commit b2f8c9b96bab6151dd7c5190c3b07a17228f52d4
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 21 02:02:57 2006 +0000
2006-01-12 Roland McGrath <roland@redhat.com>
* sysdeps/am33/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
diff --git a/sysdeps/am33/jmpbuf-unwind.h b/sysdeps/am33/jmpbuf-unwind.h
index e2c4f0c..1566a0b 100644
--- a/sysdeps/am33/jmpbuf-unwind.h
+++ b/sysdeps/am33/jmpbuf-unwind.h
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <jmpbuf-offsets.h>
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52701b0cfd103a527ac243ec329649f403b075a9
commit 52701b0cfd103a527ac243ec329649f403b075a9
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 21 02:02:44 2006 +0000
2006-01-12 Roland McGrath <roland@redhat.com>
* sysdeps/arm/jmpbuf-unwind.h: Include <jmpbuf-offsets.h>.
diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h
index 1e86662..7990eeb 100644
--- a/sysdeps/arm/jmpbuf-unwind.h
+++ b/sysdeps/arm/jmpbuf-unwind.h
@@ -17,6 +17,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <jmpbuf-offsets.h>
#include <stdint.h>
#include <unwind.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=143006bf1d086f25367c381289c19630d5e3fa6f
commit 143006bf1d086f25367c381289c19630d5e3fa6f
Author: Richard Henderson <rth@redhat.com>
Date: Mon Feb 20 22:51:48 2006 +0000
* sysdeps/alpha/soft-fp/Makefile (CPPFLAGS): Add soft-fp include
to math subdir.
* sysdeps/alpha/soft-fp/e_sqrtl.c: Don't use local-soft-fp.h.
(__ieee754_sqrtl): Add _round local variable.
* sysdeps/unix/sysv/linux/alpha/fpu/Implies: Remove.
* sysdeps/unix/sysv/linux/alpha/fxstatat.c: Fix hidden defs.
diff --git a/sysdeps/alpha/soft-fp/Makefile b/sysdeps/alpha/soft-fp/Makefile
index d7e7e26..5410a78 100644
--- a/sysdeps/alpha/soft-fp/Makefile
+++ b/sysdeps/alpha/soft-fp/Makefile
@@ -4,3 +4,7 @@ ifeq ($(subdir),soft-fp)
sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \
ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq
endif
+
+ifeq ($(subdir),math)
+CPPFLAGS += -I../soft-fp
+endif
diff --git a/sysdeps/alpha/soft-fp/e_sqrtl.c b/sysdeps/alpha/soft-fp/e_sqrtl.c
index a1d0972..717d170 100644
--- a/sysdeps/alpha/soft-fp/e_sqrtl.c
+++ b/sysdeps/alpha/soft-fp/e_sqrtl.c
@@ -19,7 +19,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include "local-soft-fp.h"
+#include <stdlib.h>
+#include <soft-fp.h>
+#include <quad.h>
long double
__ieee754_sqrtl (const long double a)
@@ -27,6 +29,7 @@ __ieee754_sqrtl (const long double a)
FP_DECL_EX;
FP_DECL_Q(A); FP_DECL_Q(C);
long double c;
+ long _round = 4; /* dynamic rounding */
FP_INIT_ROUNDMODE;
FP_UNPACK_Q(A, a);
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
deleted file mode 100644
index d76f511..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# Override ldbl-opt with alpha specific routines.
-alpha/fpu
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 4cb304c..4976946 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -94,5 +94,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
return -1;
}
-strong_alias (__fxstatat, __fxstatat64)
-strong_alias (__fxstatat64, __GI___fxstatat64)
+libc_hidden_def (__fxstatat)
+strong_alias (__fxstatat, __fxstatat64);
+libc_hidden_ver(__fxstatat, __fxstatat64);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26d77dc296bc1f78bc0ac3e1d5662d44b634c19a
commit 26d77dc296bc1f78bc0ac3e1d5662d44b634c19a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 17 18:44:32 2006 +0000
(lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock,
lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
lll_robust_mutex_unlock): New macros.
(__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index ab325d2..1a2e8cb 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,6 +64,15 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
+#define lll_robust_mutex_dead(futexv) \
+ do \
+ { \
+ int *__futexp = &(futexv); \
+ atomic_or (__futexp, FUTEX_OWNER_DIED); \
+ lll_futex_wake (__futexp, 1); \
+ } \
+ while (0)
+
/* Returns non-zero if error happened, zero if success. */
#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
({ \
@@ -106,7 +115,16 @@ __lll_mutex_cond_trylock(int *futex)
#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+static inline int __attribute__((always_inline))
+__lll_robust_mutex_trylock(int *futex, int id)
+{
+ return atomic_compare_and_exchange_val_acq (futex, id, 0) != 0;
+}
+#define lll_robust_mutex_trylock(lock, id) \
+ __lll_robust_mutex_trylock (&(lock), id)
+
extern void __lll_lock_wait (int *futex) attribute_hidden;
+extern int __lll_robust_lock_wait (int *futex) attribute_hidden;
static inline void __attribute__((always_inline))
__lll_mutex_lock(int *futex)
@@ -117,6 +135,18 @@ __lll_mutex_lock(int *futex)
#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_lock (int *futex, int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_lock_wait (futex);
+ return result;
+}
+#define lll_robust_mutex_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_cond_lock (int *futex)
{
@@ -126,8 +156,14 @@ __lll_mutex_cond_lock (int *futex)
#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+#define lll_robust_mutex_cond_lock(futex, id) \
+ __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
+
+
extern int __lll_timedlock_wait (int *futex, const struct timespec *)
attribute_hidden;
+extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
static inline int __attribute__ ((always_inline))
__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
@@ -141,6 +177,19 @@ __lll_mutex_timedlock (int *futex, const struct timespec *abstime)
__lll_mutex_timedlock (&(futex), abstime)
+static inline int __attribute__ ((always_inline))
+__lll_robust_mutex_timedlock (int *futex, const struct timespec *abstime,
+ int id)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, id, 0) != 0)
+ result = __lll_robust_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_robust_mutex_timedlock(futex, abstime, id) \
+ __lll_robust_mutex_timedlock (&(futex), abstime, id)
+
+
static inline void __attribute__ ((always_inline))
__lll_mutex_unlock (int *futex)
{
@@ -152,6 +201,17 @@ __lll_mutex_unlock (int *futex)
static inline void __attribute__ ((always_inline))
+__lll_robust_mutex_unlock (int *futex, int mask)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val & mask, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_robust_mutex_unlock(futex) \
+ __lll_robust_mutex_unlock(&(futex), FUTEX_WAITERS)
+
+
+static inline void __attribute__ ((always_inline))
__lll_mutex_unlock_force (int *futex)
{
(void) atomic_exchange_rel (futex, 0);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e112446e01bbad4716a4e7efa3757668d005d60a
commit e112446e01bbad4716a4e7efa3757668d005d60a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 16 00:15:09 2006 +0000
Correct MADV_DO{,NOT}FORK values.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 869bbed..2a84709 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -97,8 +97,8 @@
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 6 /* Don't need these pages. */
# define MADV_REMOVE 7 /* Remove these pages and resources. */
-# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */
-# define MADV_DOFORK 0x31 /* Do inherit across fork. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 9c66b2e..fbec1a0 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -88,8 +88,8 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */
-# define MADV_DOFORK 0x31 /* Do inherit across fork. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab28c061e98e8a9e6951c095b645115dcfe68efd
commit ab28c061e98e8a9e6951c095b645115dcfe68efd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 15 18:12:03 2006 +0000
Define MADV_DONTFORK and MADV_DOFORK.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 8ef939a..869bbed 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -97,6 +97,8 @@
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 6 /* Don't need these pages. */
# define MADV_REMOVE 7 /* Remove these pages and resources. */
+# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */
+# define MADV_DOFORK 0x31 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 6e7bdc9..9c66b2e 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -88,6 +88,8 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_DONTFORK 0x30 /* Do not inherit across fork. */
+# define MADV_DOFORK 0x31 /* Do inherit across fork. */
#endif
/* The POSIX people had to invent similar names for the same things. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5876a1aa6c48f496fe9e8b2a12c7c0c0088078c
commit b5876a1aa6c48f496fe9e8b2a12c7c0c0088078c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 15 17:13:30 2006 +0000
(__pthread_list_t): New typedef.
(pthread_mutex_t): Replace __next and __prev fields with __list.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index cb91691..41a54d4 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -43,6 +43,13 @@ typedef union
} pthread_attr_t;
+typedef struct __pthread_internal_list
+{
+ struct __pthread_internal_list *__prev;
+ struct __pthread_internal_list *__next;
+} __pthread_list_t;
+
+
/* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */
typedef union
@@ -57,8 +64,7 @@ typedef union
binary compatibility. */
int __kind;
int __spins;
- struct __pthread_mutex_s *__next;
- struct __pthread_mutex_s *__prev;
+ __pthread_list_t __list;
#define __PTHREAD_MUTEX_HAVE_PREV 1
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87a694c9bc135e4706fdb945aba459360a7d3b05
commit 87a694c9bc135e4706fdb945aba459360a7d3b05
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 1 03:13:49 2006 +0000
2006-01-31 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/bits/wordsize.h: New file.
* sysdeps/unix/sysv/linux/alpha/Implies: Add ieee754/ldbl-64-128,
ieee754/ldbl-opt.
* sysdeps/alpha/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove.
* sysdeps/unix/sysv/linux/alpha/nldbl-abi.h: New file.
* sysdeps/unix/sysv/linux/alpha/Makefile
[$(subdir) = math] (libm-routines): Add multc3, divtc3.
diff --git a/sysdeps/alpha/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h
index d5f2d5a..cbfaf68 100644
--- a/sysdeps/alpha/bits/mathdef.h
+++ b/sysdeps/alpha/bits/mathdef.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2003,2004,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,12 +55,6 @@ typedef double double_t;
#endif /* ISO C99 && MATH_H */
-#ifndef __NO_LONG_DOUBLE_MATH
-/* Signal that we do not really have a `long double'. The disables the
- declaration of all the `long double' function variants. */
-# define __NO_LONG_DOUBLE_MATH 1
-#endif
-
#if defined _COMPLEX_H && !defined _COMPLEX_H_MATHDEF
# define _COMPLEX_H_MATHDEF 1
# if defined(__GNUC__) && !__GNUC_PREREQ(3,4)
diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/sysdeps/unix/sysv/linux/alpha/Implies
index 8d91c80..1616efe 100644
--- a/sysdeps/unix/sysv/linux/alpha/Implies
+++ b/sysdeps/unix/sysv/linux/alpha/Implies
@@ -1 +1,4 @@
unix/sysv/linux/wordsize-64
+# These supply the ABI compatibility for when long double was double.
+ieee754/ldbl-64-128
+ieee754/ldbl-opt
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 37a9214..f64f23f 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -26,3 +26,13 @@ endif
ifeq ($(subdir),signal)
sysdep_routines += rt_sigaction
endif
+
+ifeq ($(subdir),math)
+# These 2 routines are normally in libgcc{.a,_s.so.1}.
+# However, alpha -mlong-double-128 libgcc relies on
+# glibc providing _Ots* routines and without these files
+# glibc relies on __multc3/__divtc3 only provided
+# by libgcc if configured with -mlong-double-128.
+# Provide these routines here as well.
+libm-routines += multc3 divtc3
+endif # math
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
new file mode 100644
index 0000000..22fc641
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/wordsize.h
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __WORDSIZE 64
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
+
+/* Signal that we didn't used to have a `long double'. The changes all
+ the `long double' function variants to be redirects to the double
+ functions. */
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h b/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h
new file mode 100644
index 0000000..bd985cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nldbl-abi.h
@@ -0,0 +1,8 @@
+/* ABI version for long double switch.
+ This is used by the Versions and math_ldbl_opt.h files in
+ sysdeps/ieee754/ldbl-opt/. It gives the ABI version where
+ long double == double was replaced with proper long double
+ for libm *l functions and libc functions using long double. */
+
+#define NLDBL_VERSION GLIBC_2.4
+#define LONG_DOUBLE_COMPAT_VERSION GLIBC_2_4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92ed9d7ad16cd7abb9970219a325188f58a1cb8c
commit 92ed9d7ad16cd7abb9970219a325188f58a1cb8c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 1 03:13:45 2006 +0000
2006-01-31 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/fpu/Implies: New file.
* sysdeps/alpha/fpu/s_ceil.c: Include math_ldbl_opt.h, add
compat_symbol if LONG_DOUBLE_COMPAT.
* sysdeps/alpha/fpu/s_copysign.c: Likewise.
* sysdeps/alpha/fpu/s_fabs.c: Likewise.
* sysdeps/alpha/fpu/s_floor.c: Likewise.
* sysdeps/alpha/fpu/s_rint.c: Likewise.
* sysdeps/alpha/soft-fp/e_sqrtl.c: New file.
* sysdeps/alpha/Implies: Add ieee754/ldbl-128.
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
index 4b354f3..18c3590 100644
--- a/sysdeps/alpha/Implies
+++ b/sysdeps/alpha/Implies
@@ -1,5 +1,6 @@
wordsize-64
-# Alpha uses IEEE 754 single and double precision floating point.
-ieee754/flt-32
+# Alpha uses IEEE 754 single, double and quad precision floating point.
+ieee754/ldbl-128
ieee754/dbl-64
+ieee754/flt-32
alpha/soft-fp
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
index a7a46bb..ec58fd9 100644
--- a/sysdeps/alpha/fpu/s_ceil.c
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <math.h>
+#include <math_ldbl_opt.h>
/* Use the -inf rounding mode conversion instructions to implement
ceil, via something akin to -floor(-x). This is much faster than
@@ -52,3 +53,6 @@ weak_alias (__ceil, ceil)
strong_alias (__ceil, __ceill)
weak_alias (__ceil, ceill)
#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ceil, ceill, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c
index e86778e..52c632e 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <math.h>
+#include <math_ldbl_opt.h>
double
__copysign (double x, double y)
@@ -31,3 +32,10 @@ weak_alias (__copysign, copysign)
strong_alias (__copysign, __copysignl)
weak_alias (__copysign, copysignl)
#endif
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c
index f7a2f93..9bc42f6 100644
--- a/sysdeps/alpha/fpu/s_fabs.c
+++ b/sysdeps/alpha/fpu/s_fabs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <math.h>
+#include <math_ldbl_opt.h>
double
__fabs (double x)
@@ -35,3 +36,6 @@ weak_alias (__fabs, fabs)
strong_alias (__fabs, __fabsl)
weak_alias (__fabs, fabsl)
#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index c6872f5..b22c523 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <math.h>
+#include <math_ldbl_opt.h>
/* Use the -inf rounding mode conversion instructions to implement
@@ -53,3 +54,6 @@ weak_alias (__floor, floor)
strong_alias (__floor, __floorl)
weak_alias (__floor, floorl)
#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __floor, floorl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c
index 61cba04..be09651 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <math.h>
+#include <math_ldbl_opt.h>
double
@@ -48,3 +49,6 @@ weak_alias (__rint, rint)
strong_alias (__rint, __rintl)
weak_alias (__rint, rintl)
#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+#endif
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/soft-fp/e_sqrtl.c
similarity index 62%
copy from sysdeps/alpha/fpu/s_copysign.c
copy to sysdeps/alpha/soft-fp/e_sqrtl.c
index e86778e..a1d0972 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/soft-fp/e_sqrtl.c
@@ -1,6 +1,8 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* long double square root in software floating-point emulation.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,17 +19,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <math.h>
+#include "local-soft-fp.h"
-double
-__copysign (double x, double y)
+long double
+__ieee754_sqrtl (const long double a)
{
- __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
- return x;
-}
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(C);
+ long double c;
-weak_alias (__copysign, copysign)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__copysign, __copysignl)
-weak_alias (__copysign, copysignl)
-#endif
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_SQRT_Q(C, A);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+ return c;
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu/Implies b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
new file mode 100644
index 0000000..d76f511
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fpu/Implies
@@ -0,0 +1,2 @@
+# Override ldbl-opt with alpha specific routines.
+alpha/fpu
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=400a25460a3988107c5f28346c635110a5afe81d
commit 400a25460a3988107c5f28346c635110a5afe81d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 1 02:59:59 2006 +0000
2006-01-31 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/fpu/bits/mathdef.h: Moved to ...
* sysdeps/alpha/bits/mathdef.h: ... here.
* sysdeps/i386/fpu/bits/mathdef.h: Moved to ...
* sysdeps/i386/bits/mathdef.h: ... here.
* sysdeps/mips/fpu/bits/mathdef.h: Moved to ...
* sysdeps/mips/bits/mathdef.h: ... here.
* sysdeps/m68k/fpu/bits/mathdef.h: Moved to ...
* sysdeps/m68k/bits/mathdef.h: ... here.
* sysdeps/powerpc/fpu/bits/mathdef.h: Moved to ...
* sysdeps/powerpc/bits/mathdef.h: ... here.
* sysdeps/sparc/fpu/bits/mathdef.h: Moved to ...
* sysdeps/sparc/bits/mathdef.h: ... here.
* sysdeps/ia64/fpu/bits/mathdef.h: Moved to ...
* sysdeps/ia64/bits/mathdef.h: ... here.
* sysdeps/sh/sh4/fpu/bits/mathdef.h: Moved to ...
* sysdeps/sh/sh4/bits/mathdef.h: ... here.
* sysdeps/x86_64/fpu/bits/mathdef.h: Moved to ...
* sysdeps/x86_64/bits/mathdef.h: ... here.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/bits/mathdef.h
similarity index 100%
rename from sysdeps/alpha/fpu/bits/mathdef.h
rename to sysdeps/alpha/bits/mathdef.h
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/bits/mathdef.h
similarity index 100%
rename from sysdeps/m68k/fpu/bits/mathdef.h
rename to sysdeps/m68k/bits/mathdef.h
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/bits/mathdef.h
similarity index 100%
rename from sysdeps/mips/fpu/bits/mathdef.h
rename to sysdeps/mips/bits/mathdef.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=123d009b4c7d0763aa8384a7f41a50e9197a6979
commit 123d009b4c7d0763aa8384a7f41a50e9197a6979
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 31 01:26:05 2006 +0000
2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_REMOVE): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 92d4b8a..e287e3b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,6 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -84,6 +85,7 @@
#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
#define MADV_WILLNEED 3 /* pre-fault pages */
#define MADV_DONTNEED 4 /* discard these pages */
+#define MADV_REMOVE 5 /* remove these pages & resources */
#endif
/* Flags for `mremap'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f44dd9a312b5e080a4cb798dae2f50fdddcba6e4
commit f44dd9a312b5e080a4cb798dae2f50fdddcba6e4
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 31 01:26:02 2006 +0000
2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h (struct msghdr): Use
size_t for msg_controllen.
(__cmsg_nxthdr): Correct test.
(__SCM_CONNECT): Delete.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 4c70eff..0e4a2be 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,6 +1,6 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -222,7 +222,7 @@ struct msghdr
size_t msg_iovlen; /* Number of elements in the vector. */
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- socklen_t msg_controllen; /* Ancillary data buffer length. */
+ size_t msg_controllen; /* Ancillary data buffer length. */
int msg_flags; /* Flags on received message. */
};
@@ -270,8 +270,8 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
- if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
- + __mhdr->msg_controllen)
+ if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
> ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
@@ -284,13 +284,12 @@ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
<linux/socket.h>. */
enum
{
- SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
+ SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
#define SCM_RIGHTS SCM_RIGHTS
#ifdef __USE_BSD
- SCM_CREDENTIALS = 0x02, /* Credentials passing. */
+ , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
# define SCM_CREDENTIALS SCM_CREDENTIALS
#endif
- __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
};
/* User visible structure for SCM_CREDENTIALS message */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8f5c49a5436af319d81a2effe8e351284a7e3a57
commit 8f5c49a5436af319d81a2effe8e351284a7e3a57
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 31 01:26:00 2006 +0000
2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/errno.h (ECANCELED,
EOWNERDEAD, ENOTRECOVERABLE): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index 8220c2e..5ff11c0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -1,5 +1,6 @@
/* Error constants. MIPS/Linux specific version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +28,16 @@
/* Linux has no ENOTSUP error code. */
# define ENOTSUP EOPNOTSUPP
+# ifndef ECANCELED
+# define ECANCELED 158
+# endif
+
+/* Support for error codes to support robust mutexes was added later, too. */
+# ifndef EOWNERDEAD
+# define EOWNERDEAD 165
+# define ENOTRECOVERABLE 166
+# endif
+
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3fd1052d4b8ba54421cb1e3d85fb8a700df0509b
commit 3fd1052d4b8ba54421cb1e3d85fb8a700df0509b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 31 01:25:58 2006 +0000
2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for
N64.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index aa2cef8..c04609f 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -266,13 +266,13 @@ do { \
" STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
# Make sure the stack pointer is aligned for _dl_init_internal.\n\
and $2, $29, -2 * " STRINGXP(SZREG) "\n\
- " STRINGXP(PTR_S) " $29, -4($2)\n\
+ " STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\
" STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
" STRINGXP(SAVE_GP(16)) "\n\
# Call the function to run the initializers.\n\
jal _dl_init_internal\n\
# Restore the stack pointer for _start.\n\
- " STRINGXP(PTR_L) " $29, 28($29)\n\
+ " STRINGXP(PTR_L) " $29, 32-" STRINGXP(SZREG) "($29)\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab2abd53195a48adc5bed338f3c825ca5d2505c4
commit ab2abd53195a48adc5bed338f3c825ca5d2505c4
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 30 22:12:59 2006 +0000
.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index e7fe340..b04ad8c 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,10 @@
+2006-01-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/powerpc/nofpu/Subdirs: New file.
+
+ * sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp]
+ (sysdep_routines): Add $(gcc-quad-routines) here.
+
2006-01-06 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=798def4ce314b8726802fd9c0a0c7e428969c038
commit 798def4ce314b8726802fd9c0a0c7e428969c038
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 30 22:12:48 2006 +0000
2006-01-27 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/nofpu/Subdirs: New file.
diff --git a/sysdeps/powerpc/nofpu/Subdirs b/sysdeps/powerpc/nofpu/Subdirs
new file mode 100644
index 0000000..87eadf3
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/Subdirs
@@ -0,0 +1 @@
+soft-fp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84c3f2089d40311a0354321a05d2b6079e4904ff
commit 84c3f2089d40311a0354321a05d2b6079e4904ff
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 30 22:12:44 2006 +0000
2006-01-27 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/nofpu/Makefile [$(subdir) = soft-fp]
(sysdep_routines): Add $(gcc-quad-routines) here.
diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
index f85cb0b..9fde4a5 100644
--- a/sysdeps/powerpc/nofpu/Makefile
+++ b/sysdeps/powerpc/nofpu/Makefile
@@ -1,7 +1,8 @@
# Makefile fragment for PowerPC with no FPU.
ifeq ($(subdir),soft-fp)
-sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) sim-full
+sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
+ $(gcc-quad-routines) sim-full
endif
ifeq ($(subdir),math)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3398852b27041c9509eb4440e0b60efe3341e312
commit 3398852b27041c9509eb4440e0b60efe3341e312
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jan 18 08:41:47 2006 +0000
[BZ #2167]
* sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
(pthread_mutex_t): Follow changes for other archs. Based on patch
by Jim Gifford <patches@jg555.com>.
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
index e14a487..d5e89a9 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. MIPS version.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -59,7 +59,7 @@ typedef union
type is deliberately not exposed. */
typedef union
{
- struct
+ struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
@@ -70,10 +70,19 @@ typedef union
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
-#if _MIPS_SIM != _ABI64
+#if _MIPS_SIM == _ABI64
+ int __spins;
+ struct __pthread_mutex_s *__next;
+ struct __pthread_mutex_s *__prev;
+# define __PTHREAD_MUTEX_HAVE_PREV 1
+#else
unsigned int __nusers;
+ __extension__ union
+ {
+ int __spins;
+ struct __pthread_mutex_s *__next;
+ };
#endif
- int __spins;
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cfa63a341c82fa83c79764f6c694c1ce843ebf4
commit 8cfa63a341c82fa83c79764f6c694c1ce843ebf4
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Jan 15 17:59:37 2006 +0000
Adopt for cacosh test change.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 7e8140c..6b882e3 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -20,12 +20,12 @@ float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
index 73172b4..b514496 100644
--- a/sysdeps/hppa/fpu/libm-test-ulps
+++ b/sysdeps/hppa/fpu/libm-test-ulps
@@ -17,12 +17,12 @@ float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index cab9501..854c10c 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -36,14 +36,14 @@ ildouble: 2
ldouble: 2
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
ildouble: 6
ldouble: 6
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
idouble: 1
ildouble: 2
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index 73172b4..b514496 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -17,12 +17,12 @@ float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fffa8a07754b292e175ace560d7fe4ab0519e409
commit fffa8a07754b292e175ace560d7fe4ab0519e409
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 13 21:47:54 2006 +0000
Define __GI___fxstatat64.
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 127f7f3..4cb304c 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -94,4 +94,5 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
return -1;
}
-strong_alias (__fxstatat, __fxstatat64);
+strong_alias (__fxstatat, __fxstatat64)
+strong_alias (__fxstatat64, __GI___fxstatat64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12d4d227266577d6039cf842bb7970db5fceb69a
commit 12d4d227266577d6039cf842bb7970db5fceb69a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 13 21:46:29 2006 +0000
Define PTR_MANGLE, PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index a154db8..2260ec5 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -397,4 +397,42 @@ __LABEL(name) \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
+/* Pointer mangling support. Note that tls access is slow enough that
+ we don't deoptimize things by placing the pointer check value there. */
+
+#include <stdint.h>
+
+#if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#elif defined PIC
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldq tmp, __pointer_chk_guard; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard attribute_relro;
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#endif
+
#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9847c5cb2fd2d67e1edfc33ed7f5575e48d09eed
commit 9847c5cb2fd2d67e1edfc33ed7f5575e48d09eed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 13 21:41:29 2006 +0000
Pretty printing.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index b8e30f8..bc5da0f 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -28,7 +28,7 @@ __sigsetjmp:
$sigsetjmp_local:
#ifndef PIC
-#define FRAME 16
+#define FRAME 16
subq sp, FRAME, sp
.frame sp, FRAME, ra, 0
stq ra, 0(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f22d954bd72072f3eab4dd12c8d9bff3da79f620
commit f22d954bd72072f3eab4dd12c8d9bff3da79f620
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 13 21:40:37 2006 +0000
(PTR_MANGLE, PTR_MANGLE2, PTR_DEMANGLE, PTR_DEMANGLE2): Move to
sysdeps/unix/alpha/sysdep.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index ccbce81..a22da71 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -24,8 +24,6 @@
#ifdef __ASSEMBLER__
#include <asm/pal.h>
#include <alpha/regdef.h>
-#else
-#include <stdint.h>
#endif
/* There is some commonality. */
@@ -98,39 +96,4 @@
INTERNAL_SYSCALL1(name, err_out, nr, args); \
})
-/* Pointer mangling support. Note that tls access is slow enough that
- we don't deoptimize things by placing the pointer check value there. */
-#if defined NOT_IN_libc && defined IS_IN_rtld
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(dst, src, tmp) \
- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
- xor src, tmp, dst
-# define PTR_MANGLE2(dst, src, tmp) \
- xor src, tmp, dst
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
-# endif
-#elif defined PIC
-# ifdef __ASSEMBLER__
-# define PTR_MANGLE(dst, src, tmp) \
- ldq tmp, __pointer_chk_guard; \
- xor src, tmp, dst
-# define PTR_MANGLE2(dst, src, tmp) \
- xor src, tmp, dst
-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard attribute_relro;
-# define PTR_MANGLE(var) \
- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
-# endif
-#endif
-
#endif /* _LINUX_ALPHA_SYSDEP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dca1cac0fb35152be6291c7826b05f882b3d02ad
commit dca1cac0fb35152be6291c7826b05f882b3d02ad
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 13 21:38:17 2006 +0000
(tcbhead_t): Rename member to __private.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index fa3c832..20f780c 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -65,7 +65,7 @@ typedef union dtv
typedef struct
{
dtv_t *dtv;
- void *private;
+ void *__private;
} tcbhead_t;
/* This is the size of the initial TCB. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c07312e955149423476f445d111ee020f341258a
commit c07312e955149423476f445d111ee020f341258a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 12 09:27:47 2006 +0000
2006-01-12 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/__longjmp.S: Include <jmpbuf-offsets.h>
instead of <bits/setjmp.h>.
* sysdeps/alpha/setjmp.S: Likewise.
* sysdeps/i386/__longjmp.S: Likewise.
* sysdeps/i386/bsd-_setjmp.S: Likewise.
* sysdeps/i386/bsd-setjmp.S: Likewise.
* sysdeps/i386/setjmp.S: Likewise.
* sysdeps/powerpc/powerpc32/__longjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S:
* sysdeps/powerpc/powerpc32/setjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise.
* sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise.
* sysdeps/sh/sh3/setjmp.S: Likewise.
* sysdeps/sh/sh4/setjmp.S: Likewise.
* sysdeps/sparc/sparc32/__longjmp.S: Likewise.
* sysdeps/sparc/sparc32/setjmp.S: Likewise.
* sysdeps/x86_64/__longjmp.S: Likewise.
* sysdeps/x86_64/setjmp.S: Likewise.
* sysdeps/mach/hurd/i386/longjmp-ts.c: Include <jmpbuf-offsets.h>.
* sysdeps/mach/hurd/powerpc/longjmp-ts.c: Likewise.
* sysdeps/mach/hurd/alpha/longjmp-ts.c: Likewise.
* sysdeps/alpha/jmpbuf-unwind.h: Likewise.
* sysdeps/hppa/jmpbuf-unwind.h: Likewise.
* sysdeps/i386/jmpbuf-unwind.h: Likewise.
* sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
* sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
* setjmp/jmpbuf-offsets.h: File removed.
* include/bits/setjmp.h: File removed.
diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S
index 43ab7ba..bed2665 100644
--- a/sysdeps/alpha/__longjmp.S
+++ b/sysdeps/alpha/__longjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1997, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,9 +19,7 @@
#define __ASSEMBLY__
#include <sysdep.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
ENTRY(__longjmp)
diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h
index 1faa16f..ca5f693 100644
--- a/sysdeps/alpha/jmpbuf-unwind.h
+++ b/sysdeps/alpha/jmpbuf-unwind.h
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <jmpbuf-offsets.h>
#include <stdint.h>
#include <unwind.h>
#include <sysdep.h>
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 1b352f3..b8e30f8 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1994,1996,1997,2002,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,9 +19,7 @@
#define __ASSEMBLY__
#include <sysdep.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.ent __sigsetjmp
.global __sigsetjmp
diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h
index 15cae66..6ea1876 100644
--- a/sysdeps/hppa/jmpbuf-unwind.h
+++ b/sysdeps/hppa/jmpbuf-unwind.h
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <jmpbuf-offsets.h>
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
index b271d6d..f472dbc 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ts.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -1,5 +1,5 @@
/* Perform a `longjmp' on a Mach thread_state. Alpha version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
#include <hurd/signal.h>
#include <setjmp.h>
+#include <jmpbuf-offsets.h>
#include <mach/thread_status.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53d1d237fcb3f391d758f942dc33ebc2c2fb9193
commit 53d1d237fcb3f391d758f942dc33ebc2c2fb9193
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 11 22:16:27 2006 +0000
(PTR_MANGLE): Define.
(PTR_MANGLE2): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index c3de78f..ccbce81 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -22,10 +22,10 @@
#define _LINUX_ALPHA_SYSDEP_H 1
#ifdef __ASSEMBLER__
-
#include <asm/pal.h>
#include <alpha/regdef.h>
-
+#else
+#include <stdint.h>
#endif
/* There is some commonality. */
@@ -98,4 +98,39 @@
INTERNAL_SYSCALL1(name, err_out, nr, args); \
})
+/* Pointer mangling support. Note that tls access is slow enough that
+ we don't deoptimize things by placing the pointer check value there. */
+#if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#elif defined PIC
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(dst, src, tmp) \
+ ldq tmp, __pointer_chk_guard; \
+ xor src, tmp, dst
+# define PTR_MANGLE2(dst, src, tmp) \
+ xor src, tmp, dst
+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard attribute_relro;
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
+# endif
+#endif
+
#endif /* _LINUX_ALPHA_SYSDEP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8470e5f2ee9da65bbf2b067005f5e9bf7081eaff
commit 8470e5f2ee9da65bbf2b067005f5e9bf7081eaff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 11 22:15:28 2006 +0000
Use PTR_DEMANGLE.
Avoid __sigjmp_save for rtld; tailcall in libc.so.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 14a0320..1b352f3 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -23,16 +23,22 @@
#define _SETJMP_H
#include <bits/setjmp.h>
- .ent __sigsetjmp
- .global __sigsetjmp
+ .ent __sigsetjmp
+ .global __sigsetjmp
__sigsetjmp:
- ldgp gp, 0(pv)
+ ldgp gp, 0(pv)
$sigsetjmp_local:
- subq sp, 16, sp
- .frame sp, 16, ra, 0
- stq ra, 0(sp)
- .mask 0x04000000, -16
+#ifndef PIC
+#define FRAME 16
+ subq sp, FRAME, sp
+ .frame sp, FRAME, ra, 0
+ stq ra, 0(sp)
+ .mask 0x04000000, -FRAME
+#else
+#define FRAME 0
+ .frame sp, FRAME, ra, 0
+#endif
#ifdef PROF
.set noat
lda AT, _mcount
@@ -47,10 +53,27 @@ $sigsetjmp_local:
stq s3, JB_S3*8(a0)
stq s4, JB_S4*8(a0)
stq s5, JB_S5*8(a0)
+#ifdef PTR_MANGLE
+ PTR_MANGLE(t1, ra, t0)
+ stq t1, JB_PC*8(a0)
+#else
stq ra, JB_PC*8(a0)
- addq sp, 16, t0
+#endif
+#if defined(PTR_MANGLE) && FRAME == 0
+ PTR_MANGLE2(t1, sp, t0)
+#else
+ addq sp, FRAME, t1
+# ifdef PTR_MANGLE
+ PTR_MANGLE2(t1, t1, t0)
+# endif
+#endif
+ stq t1, JB_SP*8(a0)
+#ifdef PTR_MANGLE
+ PTR_MANGLE2(t1, fp, t0)
+ stq t1, JB_FP*8(a0)
+#else
stq fp, JB_FP*8(a0)
- stq t0, JB_SP*8(a0)
+#endif
stt $f2, JB_F2*8(a0)
stt $f3, JB_F3*8(a0)
stt $f4, JB_F4*8(a0)
@@ -60,12 +83,20 @@ $sigsetjmp_local:
stt $f8, JB_F8*8(a0)
stt $f9, JB_F9*8(a0)
+#ifndef PIC
/* Call to C to (potentially) save our signal mask. */
jsr ra, __sigjmp_save
-
ldq ra, 0(sp)
addq sp, 16, sp
ret
+#elif defined NOT_IN_libc && defined IS_IN_rtld
+ /* In ld.so we never save the signal mask. */
+ mov 0, v0
+ ret
+#else
+ /* Tailcall to save the signal mask. */
+ br $31, __sigjmp_save !samegp
+#endif
END(__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be3497882a6d8ae8613e8f448166e8c6ae548d0f
commit be3497882a6d8ae8613e8f448166e8c6ae548d0f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 11 22:14:19 2006 +0000
Use PTR_DEMANGLE.
diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S
index 40d5031..43ab7ba 100644
--- a/sysdeps/alpha/__longjmp.S
+++ b/sysdeps/alpha/__longjmp.S
@@ -54,6 +54,11 @@ ENTRY(__longjmp)
ldt $f7, JB_F7*8(a0)
ldt $f8, JB_F8*8(a0)
ldt $f9, JB_F9*8(a0)
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE(ra, t1)
+ PTR_DEMANGLE2(t0, t1)
+ PTR_DEMANGLE2(fp, t1)
+#endif
cmoveq v0, 1, v0
mov t0, sp
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec3d8ea6c120ac67661f3a7c27b8bb49919c7c54
commit ec3d8ea6c120ac67661f3a7c27b8bb49919c7c54
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 10:18:16 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* include/bits/setjmp.h: New file.
* setjmp/jmpbuf-offsets.h: New file.
* sysdeps/alpha/bits/setjmp.h: Move JB_* macros ...
* sysdeps/alpha/jmpbuf-offsets.h: ... here, new file.
* sysdeps/hppa/bits/setjmp.h (JB_SP): Macro moved ...
* sysdeps/hppa/jmpbuf-offsets.h: ... here, new file.
* sysdeps/i386/bits/setjmp.h: Move JB_* macros ...
* sysdeps/i386/jmpbuf-offsets.h: ... here, new file.
* sysdeps/mips/bits/setjmp.h (JB_PC): Macro removed.
* sysdeps/powerpc/bits/setjmp.h: Move JB_* macros ...
* sysdeps/powerpc/jmpbuf-offsets.h: ... here, new file.
* sysdeps/s390/bits/setjmp.h: Remove __JB_* macros.
* sysdeps/sh/bits/setjmp.h (JB_SIZE): Macro moved ...
* sysdeps/sh/jmpbuf-offsets.h: ... here, new file.
* sysdeps/sparc/sparc32/bits/setjmp.h: Move JB_* macros ...
* sysdeps/sparc/sparc32/jmpbuf-offsets.h: ... here, new file.
* sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Remove JB_* macros.
* sysdeps/x86_64/bits/setjmp.h: Move JB_* macros ...
* sysdeps/x86_64/jmpbuf-offsets.h: ... here, new file.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index 7db0dbf..eb0b478 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -55,26 +55,6 @@
* registers.
*/
-#if defined __USE_MISC || defined __ASSEMBLY__
-# define JB_S0 0
-# define JB_S1 1
-# define JB_S2 2
-# define JB_S3 3
-# define JB_S4 4
-# define JB_S5 5
-# define JB_PC 6
-# define JB_FP 7
-# define JB_SP 8
-# define JB_F2 9
-# define JB_F3 10
-# define JB_F4 11
-# define JB_F5 12
-# define JB_F6 13
-# define JB_F7 14
-# define JB_F8 15
-# define JB_F9 16
-#endif
-
#ifndef __ASSEMBLY__
typedef long int __jmp_buf[17];
#endif
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/alpha/jmpbuf-offsets.h
similarity index 52%
copy from sysdeps/hppa/bits/setjmp.h
copy to sysdeps/alpha/jmpbuf-offsets.h
index 4c8ed07..c2503d4 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/alpha/jmpbuf-offsets.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
+/* Private macros for accessing __jmp_buf contents. Alpha version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,25 +17,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. HPPA version. */
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
- We use an array of 'double' instead, to make writing the assembler
- easier, and to ensure proper alignment. Naturally, user code should
- not depend on either representation. */
-
-#if defined __USE_MISC || defined _ASM
-#define JB_SP (76/4)
-#endif
-
-#ifndef _ASM
-typedef double __jmp_buf[21];
-#endif
-
-#endif /* bits/setjmp.h */
+#define JB_S0 0
+#define JB_S1 1
+#define JB_S2 2
+#define JB_S3 3
+#define JB_S4 4
+#define JB_S5 5
+#define JB_PC 6
+#define JB_FP 7
+#define JB_SP 8
+#define JB_F2 9
+#define JB_F3 10
+#define JB_F4 11
+#define JB_F5 12
+#define JB_F6 13
+#define JB_F7 14
+#define JB_F8 15
+#define JB_F9 16
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 4c8ed07..d5ae7e7 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -29,10 +29,6 @@
easier, and to ensure proper alignment. Naturally, user code should
not depend on either representation. */
-#if defined __USE_MISC || defined _ASM
-#define JB_SP (76/4)
-#endif
-
#ifndef _ASM
typedef double __jmp_buf[21];
#endif
diff --git a/sysdeps/hppa/jmpbuf-offsets.h b/sysdeps/hppa/jmpbuf-offsets.h
new file mode 100644
index 0000000..d95ed8a
--- /dev/null
+++ b/sysdeps/hppa/jmpbuf-offsets.h
@@ -0,0 +1,20 @@
+/* Private macros for accessing __jmp_buf contents. HPPA version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define JB_SP (76/4)
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 7b94623..4f159c4 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -72,9 +72,4 @@ typedef struct
#endif
} __jmp_buf[1];
-#ifdef __USE_MISC
-/* Offset to the program counter in `jmp_buf'. */
-# define JB_PC 0
-#endif
-
#endif /* _MIPS_BITS_SETJMP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f8d2b717f7d4873c3b5b697b4ca6409657f6d89
commit 6f8d2b717f7d4873c3b5b697b4ca6409657f6d89
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 09:22:33 2006 +0000
.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index 8503e03..53fd44e 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,6 +1,10 @@
2006-01-10 Roland McGrath <roland@redhat.com>
- * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
+ * sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ...
+ * sysdeps/am33/jmpbuf-offsets.h: ... here, new file.
+
+ * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS, __JMP_BUF_SP):
+ Move macros ...
* sysdeps/am33/jmpbuf-unwind.h: ... here, new file.
2005-12-27 Roland McGrath <roland@redhat.com>
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 4b9d00b..b8fca1a 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,11 @@
2006-01-10 Roland McGrath <roland@redhat.com>
+ * sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ...
+ * sysdeps/arm/jmpbuf-offsets.h: ... here, new file.
+ * sysdeps/arm/fpu/bits/setjmp.h: (__JMP_BUF_SP): Macro moved to ...
+ * sysdeps/arm/fpu/jmpbuf-offsets.h: ... here, new file.
+ * sysdeps/arm/eabi/bits/setjmp.h (__JMP_BUF_SP): Macro removed.
+
* sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/arm/jmpbuf-unwind.h: ... here.
* sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8fd00472ed0370c956b0697cb5cc22acf389d77
commit d8fd00472ed0370c956b0697cb5cc22acf389d77
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 09:22:16 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/arm/bits/setjmp.h (__JMP_BUF_SP): Macro moved to ...
* sysdeps/arm/jmpbuf-offsets.h: ... here, new file.
* sysdeps/arm/fpu/bits/setjmp.h: (__JMP_BUF_SP): Macro moved to ...
* sysdeps/arm/fpu/jmpbuf-offsets.h: ... here, new file.
* sysdeps/arm/eabi/bits/setjmp.h (__JMP_BUF_SP): Macro removed.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index dbc7a50..2792350 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -31,6 +31,4 @@
typedef int __jmp_buf[10];
#endif
-#define __JMP_BUF_SP 8
-
#endif
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
index 8582907..dd7679d 100644
--- a/sysdeps/arm/eabi/bits/setjmp.h
+++ b/sysdeps/arm/eabi/bits/setjmp.h
@@ -35,6 +35,4 @@
typedef int __jmp_buf[64] __attribute__((aligned (8)));
#endif
-#define __JMP_BUF_SP 8
-
#endif
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index 7d675c5..431fa03 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -31,6 +31,4 @@
typedef int __jmp_buf[22];
#endif
-#define __JMP_BUF_SP 20
-
#endif
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/jmpbuf-offsets.h
similarity index 64%
copy from sysdeps/arm/fpu/bits/setjmp.h
copy to sysdeps/arm/fpu/jmpbuf-offsets.h
index 7d675c5..ad2a75b 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/jmpbuf-offsets.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+/* Private macros for accessing __jmp_buf contents. ARM/FPU version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +17,4 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. ARM version. */
-
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
-typedef int __jmp_buf[22];
-#endif
-
#define __JMP_BUF_SP 20
-
-#endif
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/jmpbuf-offsets.h
similarity index 64%
copy from sysdeps/arm/bits/setjmp.h
copy to sysdeps/arm/jmpbuf-offsets.h
index dbc7a50..d4f7fe2 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/jmpbuf-offsets.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
+/* Private macros for accessing __jmp_buf contents. ARM version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +17,4 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. ARM version. */
-
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
-typedef int __jmp_buf[10];
-#endif
-
#define __JMP_BUF_SP 8
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a0205b002596566f9aacaec607c5a26cd012ea52
commit a0205b002596566f9aacaec607c5a26cd012ea52
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 09:21:53 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/am33/bits/setjmp.h (__JMP_BUF_SP): Macro moved ...
* sysdeps/am33/jmpbuf-offsets.h: ... here, new file.
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h
index 0247fad..3e578a4 100644
--- a/sysdeps/am33/bits/setjmp.h
+++ b/sysdeps/am33/bits/setjmp.h
@@ -25,5 +25,3 @@
#ifndef _ASM
typedef int __jmp_buf[26];
#endif
-
-#define __JMP_BUF_SP 20
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/jmpbuf-offsets.h
similarity index 75%
copy from sysdeps/am33/bits/setjmp.h
copy to sysdeps/am33/jmpbuf-offsets.h
index 0247fad..1a8520a 100644
--- a/sysdeps/am33/bits/setjmp.h
+++ b/sysdeps/am33/jmpbuf-offsets.h
@@ -1,4 +1,5 @@
-/* Copyright 2001 Free Software Foundation, Inc.
+/* Private macros for accessing __jmp_buf contents. AM33 version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +17,4 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. AM33 version. */
-
-#ifndef _SETJMP_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-typedef int __jmp_buf[26];
-#endif
-
#define __JMP_BUF_SP 20
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a64a511dd57fbc1428736c12a2440d33b68a25ac
commit a64a511dd57fbc1428736c12a2440d33b68a25ac
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:51:59 2006 +0000
.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index 0f6d2f4..8503e03 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,8 @@
+2006-01-10 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
+ * sysdeps/am33/jmpbuf-unwind.h: ... here, new file.
+
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
diff --git a/ChangeLog.arm b/ChangeLog.arm
index fcce9d6..4b9d00b 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,13 @@
+2006-01-10 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
+ * sysdeps/arm/jmpbuf-unwind.h: ... here.
+ * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
+ * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
+
+ * sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ...
+ * sysdeps/arm/jmpbuf-unwind.h: ... here.
+
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=389ae90ef25148b1b56b1a21ea9f528030f0da10
commit 389ae90ef25148b1b56b1a21ea9f528030f0da10
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:51:11 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/arm/jmpbuf-unwind.h: ... here.
* sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
* sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
* sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ...
* sysdeps/arm/jmpbuf-unwind.h: ... here.
diff --git a/sysdeps/arm/jmpbuf-unwind.h b/sysdeps/arm/jmpbuf-unwind.h
new file mode 100644
index 0000000..1e86662
--- /dev/null
+++ b/sysdeps/arm/jmpbuf-unwind.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2005,2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=442314c0d0696ce62d8ef5c0d676e195868d43c0
commit 442314c0d0696ce62d8ef5c0d676e195868d43c0
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:51:03 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/arm/jmpbuf-unwind.h: ... here.
* sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
* sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Macro removed.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index 4eb237a..dbc7a50 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,4 @@ typedef int __jmp_buf[10];
#define __JMP_BUF_SP 8
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
-
#endif
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
index 458e47f..8582907 100644
--- a/sysdeps/arm/eabi/bits/setjmp.h
+++ b/sysdeps/arm/eabi/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,9 +37,4 @@ typedef int __jmp_buf[64] __attribute__((aligned (8)));
#define __JMP_BUF_SP 8
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
-
#endif
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index 1adf94e..7d675c5 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,4 @@ typedef int __jmp_buf[22];
#define __JMP_BUF_SP 20
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
-
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c429209435963f0bedbccebdd1bbd5b13229c4d
commit 4c429209435963f0bedbccebdd1bbd5b13229c4d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:50:56 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/arm/nptl/jmpbuf-unwind.h: Moved to ...
* sysdeps/arm/jmpbuf-unwind.h: ... here.
diff --git a/sysdeps/arm/nptl/jmpbuf-unwind.h b/sysdeps/arm/nptl/jmpbuf-unwind.h
deleted file mode 100644
index f05e27f..0000000
--- a/sysdeps/arm/nptl/jmpbuf-unwind.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <setjmp.h>
-#include <stdint.h>
-#include <unwind.h>
-
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-
-#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
-
-/* We use the normal longjmp for unwinding. */
-#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c9c4525ed023b713bac13f346becd63d087f44e3
commit c9c4525ed023b713bac13f346becd63d087f44e3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:50:31 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/am33/jmpbuf-unwind.h: ... here, new file.
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h
index 879ecb6..0247fad 100644
--- a/sysdeps/am33/bits/setjmp.h
+++ b/sysdeps/am33/bits/setjmp.h
@@ -27,8 +27,3 @@ typedef int __jmp_buf[26];
#endif
#define __JMP_BUF_SP 20
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/jmpbuf-unwind.h
similarity index 77%
copy from sysdeps/am33/bits/setjmp.h
copy to sysdeps/am33/jmpbuf-unwind.h
index 879ecb6..e2c4f0c 100644
--- a/sysdeps/am33/bits/setjmp.h
+++ b/sysdeps/am33/jmpbuf-unwind.h
@@ -1,4 +1,5 @@
-/* Copyright 2001 Free Software Foundation, Inc.
+/* Examine __jmp_buf for unwinding frames. AM33 version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,17 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. AM33 version. */
-
-#ifndef _SETJMP_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-typedef int __jmp_buf[26];
-#endif
-
-#define __JMP_BUF_SP 20
+#include <setjmp.h>
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a55fb17a5881b75f9e5eccae87456ca6c8e8b06
commit 9a55fb17a5881b75f9e5eccae87456ca6c8e8b06
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:49:29 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/powerpc/jmpbuf-unwind.h: ... here.
* sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/alpha/jmpbuf-unwind.h: ... here.
* sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: ... here.
* sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/i386/jmpbuf-unwind.h: ... here.
* sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/x86_64/jmpbuf-unwind.h: ... here.
* sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/sh/jmpbuf-unwind.h: ... here.
* sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/hppa/jmpbuf-unwind.h: ... here, new file.
* sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/mips/jmpbuf-unwind.h: ... here.
* sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/m68k/jmpbuf-unwind.h: ... here, new file.
* sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/s390/jmpbuf-unwind.h: ... here.
* sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS):
Move macro ...
* sysdeps/ia64/jmpbuf-unwind.h: ... here.
* sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS):
Move macro ...
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: ... here.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index 71b7738..7db0dbf 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1992,1997,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -77,11 +77,6 @@
#ifndef __ASSEMBLY__
typedef long int __jmp_buf[17];
-
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
#endif
#endif /* bits/setjmp.h */
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 07ea01e..4c8ed07 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,10 +37,4 @@
typedef double __jmp_buf[21];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *) (_address) > \
- (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/jmpbuf-unwind.h
similarity index 59%
copy from sysdeps/hppa/bits/setjmp.h
copy to sysdeps/hppa/jmpbuf-unwind.h
index 07ea01e..15cae66 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/jmpbuf-unwind.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+/* Examine __jmp_buf for unwinding frames. HPPA version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,31 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. HPPA version. */
-#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
-
-#if !defined _SETJMP_H && !defined _PTHREAD_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
- We use an array of 'double' instead, to make writing the assembler
- easier, and to ensure proper alignment. Naturally, user code should
- not depend on either representation. */
-
-#if defined __USE_MISC || defined _ASM
-#define JB_SP (76/4)
-#endif
-
-#ifndef _ASM
-typedef double __jmp_buf[21];
-#endif
+#include <setjmp.h>
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
((void *) (_address) > \
(void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
-
-#endif /* bits/setjmp.h */
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 612582a..2d5a082 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,9 +42,4 @@ typedef struct
} __jmp_buf[1];
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h
new file mode 100644
index 0000000..3490c79
--- /dev/null
+++ b/sysdeps/m68k/jmpbuf-unwind.h
@@ -0,0 +1,25 @@
+/* Examine __jmp_buf for unwinding frames. m68k version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 5f7c82b..7b94623 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004, 2005
+ Copyright (C) 1992,1993,1995,1997,2000,2002,2003,2004,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -77,10 +77,4 @@ typedef struct
# define JB_PC 0
#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
-
#endif /* _MIPS_BITS_SETJMP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0d5e44dc441fafe1863f5998887e16a5de69fd6
commit b0d5e44dc441fafe1863f5998887e16a5de69fd6
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:43:32 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/.
diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h
index ca445f8..1faa16f 100644
--- a/sysdeps/alpha/jmpbuf-unwind.h
+++ b/sysdeps/alpha/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h
index 1ff8fc8..bfa1a64 100644
--- a/sysdeps/mips/jmpbuf-unwind.h
+++ b/sysdeps/mips/jmpbuf-unwind.h
@@ -21,6 +21,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f509f30808a482dc5cec2ddfbf63fb4331827852
commit f509f30808a482dc5cec2ddfbf63fb4331827852
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:23:22 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
* sysdeps/i386/jmpbuf-unwind.h: Likewise.
* sysdeps/mips/jmpbuf-unwind.h: Likewise.
* sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
* sysdeps/s390/jmpbuf-unwind.h: Likewise.
* sysdeps/sh/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
* sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h
deleted file mode 100644
index 83b7a01..0000000
--- a/sysdeps/alpha/nptl/jmpbuf-unwind.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <setjmp.h>
-#include <stdint.h>
-#include <unwind.h>
-#include <sysdep.h>
-
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-
-static inline uintptr_t __attribute__ ((unused))
-_jmpbuf_sp (__jmp_buf regs)
-{
- uintptr_t sp = regs[JB_SP];
-#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (sp);
-#endif
- return sp;
-}
-
-#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
-
-/* We use the normal lobngjmp for unwinding. */
-#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h
deleted file mode 100644
index 9ee0310..0000000
--- a/sysdeps/mips/nptl/jmpbuf-unwind.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <setjmp.h>
-#include <stdint.h>
-#include <unwind.h>
-#include <sysdep.h>
-
-#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
- _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-
-static inline uintptr_t __attribute__ ((unused))
-_jmpbuf_sp (__jmp_buf regs)
-{
- uintptr_t sp = regs[0].__sp;
-#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (sp);
-#endif
- return sp;
-}
-
-#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
-
-/* We use the normal longjmp for unwinding. */
-#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c881d743582b8ff34362222a5516ab98ab4aad55
commit c881d743582b8ff34362222a5516ab98ab4aad55
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 08:23:02 2006 +0000
2006-01-10 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/i386/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/mips/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/powerpc/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/s390/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sh/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file, moved from nptl/.
* sysdeps/x86_64/jmpbuf-unwind.h: New file, moved from nptl/.
diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h
new file mode 100644
index 0000000..ca445f8
--- /dev/null
+++ b/sysdeps/alpha/jmpbuf-unwind.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+#include <sysdep.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h
new file mode 100644
index 0000000..1ff8fc8
--- /dev/null
+++ b/sysdeps/mips/jmpbuf-unwind.h
@@ -0,0 +1,41 @@
+/* Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+#include <sysdep.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96007fb0154e47c87bfbb4e09f9a7b0acd915c03
commit 96007fb0154e47c87bfbb4e09f9a7b0acd915c03
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 10 07:54:47 2006 +0000
2006-01-07 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocations
by using LR and RR. Add %sr0 to iitlbp.
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index 4cf832a..94edeaa 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -34,16 +34,27 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
- .text
-
- .align 4
-
.import main, code
.import $global$, data
.import __libc_start_main, code
.import __libc_csu_fini, code
.import __libc_csu_init, code
+ /* Have the linker create plabel words
+ so we get PLABEL32 relocs and not 21/14 */
+ .section .rodata
+ .align 4
+.Lpmain:
+ .word P%main
+.Lp__libc_start_main:
+ .word P%__libc_start_main
+.Lp__libc_csu_fini:
+ .word P%__libc_csu_fini
+.Lp__libc_csu_init:
+ .word P%__libc_csu_init
+
+ .text
+ .align 4
.globl _start
.export _start, ENTRY
.type _start,@function
@@ -52,28 +63,41 @@ _start:
.proc
.callinfo
- /* load main */
- ldil LP%main, %r26
- ldo RP%main(%r26), %r26
-
- /* argc and argv should be in 25 and 24 */
-
/* Expand the stack to store the 5th through 7th args */
ldo 64(%sp), %sp
-
- /* void (*rtld_fini) (void) (actually the 6th arg) */
- stw %r23, -56(%sp)
-
- /* void (*init) (void) */
- ldil LP%__libc_csu_init, %r23
- ldo RP%__libc_csu_init(%r23), %r23
-
- /* void (*fini) (void) */
- ldil LP%__libc_csu_fini, %r22
- ldo RP%__libc_csu_fini(%r22), %r22
+ /* TODO: Follow ABI? Place more things on the stack here... */
+
+#if SHARED
+ /* load main (1st argument) */
+ addil LR'.Lpmain, %r19
+ ldw RR'.Lpmain(%r1), %r26
+ ldw 0(%r26),%r26
+ /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
+ /* void (*init) (void) (4th argument) */
+ addil LR'.Lp__libc_csu_init, %r19
+ ldw RR'.Lp__libc_csu_init(%r1), %r23
+ ldw 0(%r23), %r23
+ /* void (*fini) (void) (5th argument) */
+ addil LR'.Lp__libc_csu_fini, %r19
+ ldw RR'.Lp__libc_csu_fini(%r1), %r22
+ ldw 0(%r22), %r22
+#else
+ /* load main (1st argument) */
+ ldil LR'.Lpmain, %r26
+ ldw RR'.Lpmain(%r26), %r26
+ /* argc and argv should be in 25 and 24 (2nd and 3rd argument) */
+ /* void (*init) (void) (4th argument) */
+ ldil LR'.Lp__libc_csu_init, %r23
+ ldw RR'.Lp__libc_csu_init(%r23), %r23
+ /* void (*fini) (void) (5th argument) */
+ ldil LR'.Lp__libc_csu_fini, %r22
+ ldw RR'.Lp__libc_csu_fini(%r22), %r22
+#endif
+ /* Store 5th argument */
stw %r22, -52(%sp)
-
- /* void *stack_end */
+ /* void (*rtld_fini) (void) (6th argument) */
+ stw %r23, -56(%sp)
+ /* void *stack_end (7th argument) */
stw %sp, -60(%sp)
/* load global */
@@ -83,7 +107,7 @@ _start:
bl __libc_start_main,%r2
nop
/* die horribly if it returned (it shouldn't) */
- iitlbp %r0,(%r0)
+ iitlbp %r0,(%sr0,%r0)
nop
.procend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e1470fba7d2429902c724d5321a54f8257b88e8
commit 3e1470fba7d2429902c724d5321a54f8257b88e8
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 9 23:38:27 2006 +0000
2006-01-08 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
Don't give the union a name because it changes the mangled name.
Instead name the struct for __data.
* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 5004937..cb91691 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Alpha version.
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,9 +45,9 @@ typedef union
/* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */
-typedef union __pthread_mutex_u
+typedef union
{
- struct
+ struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
@@ -57,8 +57,8 @@ typedef union __pthread_mutex_u
binary compatibility. */
int __kind;
int __spins;
- union __pthread_mutex_u *__next;
- union __pthread_mutex_u *__prev;
+ struct __pthread_mutex_s *__next;
+ struct __pthread_mutex_s *__prev;
#define __PTHREAD_MUTEX_HAVE_PREV 1
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44422d11301188147fde50d11307b268b0ae7a6d
commit 44422d11301188147fde50d11307b268b0ae7a6d
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 8 08:21:17 2006 +0000
2006-01-08 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/adjtime.c: Use <> instead of "" in
#include for kernel-features.h.
* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
* sysdeps/unix/sysv/linux/check_pf.c: Likewise.
* sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise.
* sysdeps/unix/sysv/linux/clock_getres.c: Likewise.
* sysdeps/unix/sysv/linux/clock_gettime.c: Likewise.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
* sysdeps/unix/sysv/linux/clock_settime.c: Likewise.
* sysdeps/unix/sysv/linux/dl-execstack.c: Likewise.
* sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise.
* sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise.
* sysdeps/unix/sysv/linux/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/futimes.c: Likewise.
* sysdeps/unix/sysv/linux/futimesat.c: Likewise.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/fxstatat64.c: Likewise.
* sysdeps/unix/sysv/linux/getcwd.c: Likewise.
* sysdeps/unix/sysv/linux/getdents.c: Likewise.
* sysdeps/unix/sysv/linux/i386/chown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fchown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fchownat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fxstatat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lockf64.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
* sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Likewise.
* sysdeps/unix/sysv/linux/i386/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setfsuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setregid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/ifreq.c: Likewise.
* sysdeps/unix/sysv/linux/ldsodefs.h: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/chown.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/fchownat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mmap64.c: Likewise.
* sysdeps/unix/sysv/linux/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise.
* sysdeps/unix/sysv/linux/opendir.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
* sysdeps/unix/sysv/linux/pread.c: Likewise.
* sysdeps/unix/sysv/linux/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/prof-freq.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/chown.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/setegid.c: Likewise.
* sysdeps/unix/sysv/linux/seteuid.c: Likewise.
* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/statvfs64.c: Likewise.
* sysdeps/unix/sysv/linux/syslog.c: Likewise.
* sysdeps/unix/sysv/linux/testrtsig.h: Likewise.
* sysdeps/unix/sysv/linux/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/utimes.c: Likewise.
* sysdeps/unix/sysv/linux/xstat64.c: Likewise.
* sysdeps/unix/sysv/linux/xstatconv.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index e206cb4..1700524 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2000,2002,2003,2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <shlib-compat.h>
#include <sysdep.h>
#include <sys/time.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
struct timeval32
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
index a0214b0..d95e46f 100644
--- a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
@@ -1,5 +1,5 @@
-/* Operating system support for run-time dynamic linker. Linux/PPC version.
- Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
+/* Operating system support for run-time dynamic linker. Linux/Alpha version.
+ Copyright (C) 1997, 1998, 2001, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,9 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-
-#include "config.h"
-#include "kernel-features.h"
+#include <config.h>
+#include <kernel-features.h>
#include <ldsodefs.h>
extern long __libc_alpha_cache_shape[4];
diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
index 07f0558..5e63be5 100644
--- a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
+++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <fenv_libc.h>
#include <sysdep.h>
#include <float.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#include "kernel_sysinfo.h"
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index c2bc565..6644a5c 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 46797aa..0bca4b5 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 1a6f88b..7c9183a 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 1b75af2..a59911f 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -26,7 +26,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
struct __old_msqid_ds
{
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 458cda9..35a81e9 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2002,2003,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep-cancel.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
@@ -63,7 +63,7 @@ LEAF(SELECT, 64)
ldl t0, __libc_missing_axp_tv64
#endif
- /* Save timeout early, since we'll need to recover this after
+ /* Save timeout early, since we'll need to recover this after
the system call. */
stq a4, 48(sp)
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 6925c3f..9957f98 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,1998,2000,2003,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -26,7 +27,7 @@
#include <string.h>
#include <sys/syscall.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
struct __old_semid_ds
{
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index 16bbd22..59caeac 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index b49c770..e39eadc 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index 4a9d944..e63211f 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,1998,2000,2003,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -27,7 +27,7 @@
#include <bits/wordsize.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
struct __old_shmid_ds
{
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index c210e1d..0dd0a93 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 8d89e3d..634993d 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h
index 846bb02..094d11e 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.h
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include "kernel-features.h"
+#include <kernel-features.h>
extern int __libc_missing_axp_stat64 attribute_hidden;
extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index 735fa57..e7193dc 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998,2000,2002,2003,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@
#include <bp-checks.h>
#include <linux/posix_types.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_chown32
# if __ASSUME_32BITUIDS == 0
diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c
index 0da8cd8..6cc0932 100644
--- a/sysdeps/unix/sysv/linux/m68k/fchownat.c
+++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
#include <bp-checks.h>
#include <linux/posix_types.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_chown32
# if __ASSUME_32BITUIDS == 0
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index 11e2425..a46e22f 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_ftruncate64
#ifndef __ASSUME_TRUNCATE64_SYSCALL
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 09fbe79..8e2ca42 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2004,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
#include <sgidefs.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
/* The difference here is that the sigaction structure used in the
kernel is not the same as we use in the libc. Therefore we must
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index d01d25b..01cc148 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
- Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003,2005,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-#include "kernel-features.h"
+#include <kernel-features.h>
#ifdef __NR_truncate64
#ifndef __ASSUME_TRUNCATE64_SYSCALL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=660a71b93bda0e6d11ff0a9e4c6c8994dcd53c6f
commit 660a71b93bda0e6d11ff0a9e4c6c8994dcd53c6f
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 8 06:50:00 2006 +0000
Update abandoned code for sysdeps/generic demise.
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index 6f080db..9abd2c6 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Amd 290x0.
- Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -39,5 +39,5 @@ weak_alias (__ffs, ffs)
libc_hidden_builtin_def (ffs)
#else
-#include <sysdeps/generic/ffs.c>
+#include <string/ffs.c>
#endif
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
index ad907a4..090d114 100644
--- a/sysdeps/i960/ffs.c
+++ b/sysdeps/i960/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For i960 Core architecture
This file is part of the GNU C Library.
- Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2004, 2005 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -41,6 +41,6 @@ libc_hidden_builtin_def (ffs)
#else
-#include <sysdeps/generic/ffs.c>
+#include <string/ffs.c>
#endif
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index b7db70f..9381f54 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Motorola 88000.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -41,5 +41,5 @@ weak_alias (__ffs, ffs)
libc_hidden_builtin_def (ffs)
#else
-#include <sysdeps/generic/ffs.c>
+#include <string/ffs.c>
#endif
diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c
index aeb2940..6c0d39d 100644
--- a/sysdeps/unix/bsd/sun/sethostid.c
+++ b/sysdeps/unix/bsd/sun/sethostid.c
@@ -1 +1 @@
-#include <sysdeps/generic/sethostid.c>
+#include <misc/sethostid.c>
diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c
index 4d90e6f..7c9dbba 100644
--- a/sysdeps/unix/sysv/irix4/reboot.c
+++ b/sysdeps/unix/sysv/irix4/reboot.c
@@ -1 +1 @@
-#include <sysdeps/generic/reboot.c>
+#include <misc/reboot.c>
diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c
index 54885a8..43c5222 100644
--- a/sysdeps/unix/sysv/irix4/swapon.c
+++ b/sysdeps/unix/sysv/irix4/swapon.c
@@ -1 +1 @@
-#include <sysdeps/generic/swapon.c>
+#include <misc/swapon.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74df46e30f351b4bf4d25455ff43209a1a6077e3
commit 74df46e30f351b4bf4d25455ff43209a1a6077e3
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 8 06:49:16 2006 +0000
Dist files no longer required
diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist
deleted file mode 100644
index 441c9ba..0000000
--- a/sysdeps/arm/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-ieee754.h
-bits/link.h
diff --git a/sysdeps/cris/Dist b/sysdeps/cris/Dist
deleted file mode 100644
index cf1ffb6..0000000
--- a/sysdeps/cris/Dist
+++ /dev/null
@@ -1 +0,0 @@
-_mcount.S
diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist
deleted file mode 100644
index 35a33ab..0000000
--- a/sysdeps/powerpc/nofpu/Dist
+++ /dev/null
@@ -1,3 +0,0 @@
-sim-full.c
-fenv_const.c
-soft-supp.h
diff --git a/sysdeps/standalone/Dist b/sysdeps/standalone/Dist
deleted file mode 100644
index b6b12b7..0000000
--- a/sysdeps/standalone/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-filedesc.h
-standalone.h
diff --git a/sysdeps/standalone/i386/Dist b/sysdeps/standalone/i386/Dist
deleted file mode 100644
index 98d13be..0000000
--- a/sysdeps/standalone/i386/Dist
+++ /dev/null
@@ -1 +0,0 @@
-i386.h
diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist
deleted file mode 100644
index 8b7b09e..0000000
--- a/sysdeps/standalone/i386/force_cpu386/Dist
+++ /dev/null
@@ -1 +0,0 @@
-target.ld
diff --git a/sysdeps/standalone/i960/Dist b/sysdeps/standalone/i960/Dist
deleted file mode 100644
index e1747ef..0000000
--- a/sysdeps/standalone/i960/Dist
+++ /dev/null
@@ -1 +0,0 @@
-i960ca.h
diff --git a/sysdeps/standalone/m68k/m68020/Dist b/sysdeps/standalone/m68k/m68020/Dist
deleted file mode 100644
index 90b37b4..0000000
--- a/sysdeps/standalone/m68k/m68020/Dist
+++ /dev/null
@@ -1 +0,0 @@
-m68020.h
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Dist b/sysdeps/standalone/m68k/m68020/mvme136/Dist
deleted file mode 100644
index 97b9058..0000000
--- a/sysdeps/standalone/m68k/m68020/mvme136/Dist
+++ /dev/null
@@ -1 +0,0 @@
-mvme136.ld
diff --git a/sysdeps/unix/arm/Dist b/sysdeps/unix/arm/Dist
deleted file mode 100644
index 7785d5e..0000000
--- a/sysdeps/unix/arm/Dist
+++ /dev/null
@@ -1 +0,0 @@
-dl-brk.S
diff --git a/sysdeps/unix/bsd/hp/Dist b/sysdeps/unix/bsd/hp/Dist
deleted file mode 100644
index ccd3a61..0000000
--- a/sysdeps/unix/bsd/hp/Dist
+++ /dev/null
@@ -1 +0,0 @@
-m68k/dl-brk.S
diff --git a/sysdeps/unix/bsd/osf/Dist b/sysdeps/unix/bsd/osf/Dist
deleted file mode 100644
index e792f44..0000000
--- a/sysdeps/unix/bsd/osf/Dist
+++ /dev/null
@@ -1 +0,0 @@
-alpha/dl-brk.S
diff --git a/sysdeps/unix/bsd/sun/Dist b/sysdeps/unix/bsd/sun/Dist
deleted file mode 100644
index ccd3a61..0000000
--- a/sysdeps/unix/bsd/sun/Dist
+++ /dev/null
@@ -1 +0,0 @@
-m68k/dl-brk.S
diff --git a/sysdeps/unix/bsd/sun/m68k/Dist b/sysdeps/unix/bsd/sun/m68k/Dist
deleted file mode 100644
index cd893ff..0000000
--- a/sysdeps/unix/bsd/sun/m68k/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sigtramp.c
diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist
deleted file mode 100644
index cd893ff..0000000
--- a/sysdeps/unix/bsd/sun/sparc/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sigtramp.c
diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist
deleted file mode 100644
index 06cf9cc..0000000
--- a/sysdeps/unix/bsd/ultrix4/mips/Dist
+++ /dev/null
@@ -1 +0,0 @@
-__handler.S
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
deleted file mode 100644
index 609fd77..0000000
--- a/sysdeps/unix/sysv/aix/Dist
+++ /dev/null
@@ -1,15 +0,0 @@
-dl-support.c
-dl-error.c
-dl-addr.c
-dl-sym.c
-dl-open.c
-dl-close.c
-dl-libc.c
-dlldr.h
-kernel_proto.h
-start-libc.c
-sysv_termio.h
-bits/utmpx.h
-gnu/lib-names.h
-uitrunc.c
-utmpx.h
diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist
deleted file mode 100644
index 09026af..0000000
--- a/sysdeps/unix/sysv/irix4/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-__handler.S
-sigtramp.c
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
deleted file mode 100644
index aa9eb1a..0000000
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ /dev/null
@@ -1,14 +0,0 @@
-clone.S
-dl-procinfo.h
-ioperm.c
-setresuid.c
-setresgid.c
-setfsuid.c
-setfsgid.c
-sigrestorer.S
-bits/armsigctx.h
-sys/elf.h
-sys/io.h
-sys/procfs.h
-sys/user.h
-oldgetrlimit64.c
diff --git a/sysdeps/unix/sysv/linux/cris/Dist b/sysdeps/unix/sysv/linux/cris/Dist
deleted file mode 100644
index 1b8a7e6..0000000
--- a/sysdeps/unix/sysv/linux/cris/Dist
+++ /dev/null
@@ -1,5 +0,0 @@
-clone.S
-setresuid.c
-setresgid.c
-setfsuid.c
-setfsgid.c
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
deleted file mode 100644
index 984b473..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/Dist
+++ /dev/null
@@ -1 +0,0 @@
-__setpgid.c
diff --git a/sysdeps/unix/sysv/sco3.2/Dist b/sysdeps/unix/sysv/sco3.2/Dist
deleted file mode 100644
index 60fab2b..0000000
--- a/sysdeps/unix/sysv/sco3.2/Dist
+++ /dev/null
@@ -1 +0,0 @@
-__fltused.c
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
deleted file mode 100644
index 6395064..0000000
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ /dev/null
@@ -1,4 +0,0 @@
-__getpgid.c
-__setpgid.c
-sysconfig.h
-siginfo.h
diff --git a/sysdeps/unix/sysv/sysv4/i386/Dist b/sysdeps/unix/sysv/sysv4/i386/Dist
deleted file mode 100644
index 69d16ac..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sys-sig.S
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
deleted file mode 100644
index 7832507..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sys/trap.h
diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist
deleted file mode 100644
index 22a6930..0000000
--- a/sysdeps/vax/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-DEFS.h
-fl.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3250468baf89680890a65d308c1d4a541fa39fd7
commit 3250468baf89680890a65d308c1d4a541fa39fd7
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 8 06:44:00 2006 +0000
2006-01-07 Roland McGrath <roland@redhat.com>
* manual/maint.texi (Porting): Don't mention Dist files.
* sysdeps/alpha/soft-fp/Dist: File removed.
* sysdeps/alpha/Dist: File removed.
* sysdeps/i386/i686/Dist: File removed.
* sysdeps/i386/soft-fp/Dist: File removed.
* sysdeps/i386/Dist: File removed.
* sysdeps/mips/soft-fp/Dist: File removed.
* sysdeps/mips/mips64/soft-fp/Dist: File removed.
* sysdeps/mips/mips64/Dist: File removed.
* sysdeps/mips/Dist: File removed.
* sysdeps/wordsize-32/Dist: File removed.
* sysdeps/m68k/fpu/switch/Dist: File removed.
* sysdeps/m68k/fpu/Dist: File removed.
* sysdeps/powerpc/powerpc64/Dist: File removed.
* sysdeps/powerpc/soft-fp/Dist: File removed.
* sysdeps/powerpc/powerpc32/fpu/Dist: File removed.
* sysdeps/powerpc/powerpc32/Dist: File removed.
* sysdeps/powerpc/fpu/Dist: File removed.
* sysdeps/powerpc/Dist: File removed.
* sysdeps/unix/common/Dist: File removed.
* sysdeps/unix/bsd/bsd4.4/Dist: File removed.
* sysdeps/unix/bsd/Dist: File removed.
* sysdeps/unix/sysv/linux/alpha/Dist: File removed.
* sysdeps/unix/sysv/linux/i386/Dist: File removed.
* sysdeps/unix/sysv/linux/mips/mips64/Dist: File removed.
* sysdeps/unix/sysv/linux/mips/Dist: File removed.
* sysdeps/unix/sysv/linux/m68k/Dist: File removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Dist: File removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: File removed.
* sysdeps/unix/sysv/linux/powerpc/aix/Dist: File removed.
* sysdeps/unix/sysv/linux/powerpc/Dist: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc32/Dist: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/Dist: File removed.
* sysdeps/unix/sysv/linux/sparc/Dist: File removed.
* sysdeps/unix/sysv/linux/ia64/Dist: File removed.
* sysdeps/unix/sysv/linux/s390/s390-64/Dist: File removed.
* sysdeps/unix/sysv/linux/s390/Dist: File removed.
* sysdeps/unix/sysv/linux/s390/s390-32/Dist: File removed.
* sysdeps/unix/sysv/linux/sh/Dist: File removed.
* sysdeps/unix/sysv/linux/x86_64/Dist: File removed.
* sysdeps/unix/sysv/linux/hppa/Dist: File removed.
* sysdeps/unix/sysv/linux/Dist: File removed.
* sysdeps/unix/sysv/Dist: File removed.
* sysdeps/unix/Dist: File removed.
* sysdeps/generic/Dist: File removed.
* sysdeps/sparc/sparc32/soft-fp/Dist: File removed.
* sysdeps/sparc/sparc32/sparcv9/Dist: File removed.
* sysdeps/sparc/sparc32/sparcv8/Dist: File removed.
* sysdeps/sparc/sparc32/Dist: File removed.
* sysdeps/sparc/sparc64/soft-fp/Dist: File removed.
* sysdeps/sparc/sparc64/Dist: File removed.
* sysdeps/sparc/Dist: File removed.
* sysdeps/gnu/Dist: File removed.
* sysdeps/ia64/fpu/Dist: File removed.
* sysdeps/ia64/Dist: File removed.
* sysdeps/mach/mips/Dist: File removed.
* sysdeps/mach/hurd/alpha/Dist: File removed.
* sysdeps/mach/hurd/i386/Dist: File removed.
* sysdeps/mach/hurd/mips/Dist: File removed.
* sysdeps/mach/hurd/powerpc/Dist: File removed.
* sysdeps/mach/hurd/Dist: File removed.
* sysdeps/s390/s390-64/Dist: File removed.
* sysdeps/s390/Dist: File removed.
* sysdeps/s390/s390-32/Dist: File removed.
* sysdeps/sh/Dist: File removed.
* sysdeps/posix/Dist: File removed.
* sysdeps/ieee754/dbl-64/Dist: File removed.
* sysdeps/ieee754/ldbl-128/Dist: File removed.
* sysdeps/ieee754/flt-32/Dist: File removed.
* sysdeps/ieee754/Dist: File removed.
* sysdeps/x86_64/soft-fp/Dist: File removed.
* sysdeps/x86_64/Dist: File removed.
* sysdeps/hppa/Dist: File removed.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
deleted file mode 100644
index 7cf4911..0000000
--- a/sysdeps/alpha/Dist
+++ /dev/null
@@ -1,11 +0,0 @@
-divrem.h
-divl.S
-divq.S
-reml.S
-remq.S
-_mcount.S
-stxcpy.S
-stxncpy.S
-fpu/fenv_libc.h
-alphaev6/stxncpy.S
-alphaev6/stxcpy.S
diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist
deleted file mode 100644
index 3d75ee7..0000000
--- a/sysdeps/alpha/soft-fp/Dist
+++ /dev/null
@@ -1,14 +0,0 @@
-local-soft-fp.h
-ots_add.c
-ots_cmp.c
-ots_cmpe.c
-ots_cvtqux.c
-ots_cvtqx.c
-ots_cvttx.c
-ots_cvtxq.c
-ots_cvtxt.c
-ots_div.c
-ots_mul.c
-ots_nintxq.c
-ots_sub.c
-sfp-machine.h
diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist
deleted file mode 100644
index 5a0df47..0000000
--- a/sysdeps/hppa/Dist
+++ /dev/null
@@ -1,5 +0,0 @@
-libgcc-compat.c
-dl-symaddr.c
-dl-fptr.c
-bits/link.h
-elf/entry.h
diff --git a/sysdeps/m68k/fpu/Dist b/sysdeps/m68k/fpu/Dist
deleted file mode 100644
index e649e8d..0000000
--- a/sysdeps/m68k/fpu/Dist
+++ /dev/null
@@ -1 +0,0 @@
-mathimpl.h
diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist
deleted file mode 100644
index 9288bdd..0000000
--- a/sysdeps/m68k/fpu/switch/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-68881-sw.h
-switch.c
diff --git a/sysdeps/mach/hurd/alpha/Dist b/sysdeps/mach/hurd/alpha/Dist
deleted file mode 100644
index c581802..0000000
--- a/sysdeps/mach/hurd/alpha/Dist
+++ /dev/null
@@ -1 +0,0 @@
-static-start.S
diff --git a/sysdeps/mach/hurd/mips/Dist b/sysdeps/mach/hurd/mips/Dist
deleted file mode 100644
index b6f3ffa..0000000
--- a/sysdeps/mach/hurd/mips/Dist
+++ /dev/null
@@ -1,3 +0,0 @@
-longjmp-ctx.c
-init-fault.c
-dl-machine.c
diff --git a/sysdeps/mach/mips/Dist b/sysdeps/mach/mips/Dist
deleted file mode 100644
index f2699bf..0000000
--- a/sysdeps/mach/mips/Dist
+++ /dev/null
@@ -1 +0,0 @@
-cacheflush.c
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
deleted file mode 100644
index 1fbf36a..0000000
--- a/sysdeps/mips/Dist
+++ /dev/null
@@ -1,8 +0,0 @@
-setjmp_aux.c
-regdef.h
-sgidefs.h
-fpregdef.h
-fpu/fenv_libc.h
-sys/fpregdef.h
-sys/regdef.h
-sys/asm.h
diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist
deleted file mode 100644
index ad6ea03..0000000
--- a/sysdeps/mips/mips64/Dist
+++ /dev/null
@@ -1 +0,0 @@
-setjmp_aux.c
diff --git a/sysdeps/mips/mips64/soft-fp/Dist b/sysdeps/mips/mips64/soft-fp/Dist
deleted file mode 100644
index 7e9914f..0000000
--- a/sysdeps/mips/mips64/soft-fp/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sfp-machine.h
diff --git a/sysdeps/mips/soft-fp/Dist b/sysdeps/mips/soft-fp/Dist
deleted file mode 100644
index 7e9914f..0000000
--- a/sysdeps/mips/soft-fp/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sfp-machine.h
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
deleted file mode 100644
index bba6642..0000000
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ /dev/null
@@ -1,19 +0,0 @@
-alpha/ptrace.h
-alpha/regdef.h
-clone.S
-dl-brk.S
-ieee_get_fp_control.S
-ieee_set_fp_control.S
-ioperm.c
-ipc_priv.h
-kernel_sigaction.h
-kernel_stat.h
-kernel_termios.h
-oldglob.c
-rt_sigaction.S
-sizes.h
-sys/acct.h
-sys/io.h
-sys/procfs.h
-sys/user.h
-xstatconv.c
diff --git a/sysdeps/unix/sysv/linux/hppa/Dist b/sysdeps/unix/sysv/linux/hppa/Dist
deleted file mode 100644
index 2954d3c..0000000
--- a/sysdeps/unix/sysv/linux/hppa/Dist
+++ /dev/null
@@ -1,5 +0,0 @@
-umount.c
-kernel_stat.h
-kernel_sigaction.h
-clone.S
-sys/procfs.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
deleted file mode 100644
index 35fad7f..0000000
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ /dev/null
@@ -1,9 +0,0 @@
-clone.S
-mremap.S
-oldgetrlimit64.c
-setresuid.c
-setresgid.c
-setfsuid.c
-setfsgid.c
-sys/reg.h
-sys/procfs.h
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
deleted file mode 100644
index 1d74119..0000000
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ /dev/null
@@ -1,13 +0,0 @@
-_test_and_set.c
-clone.S
-entry.h
-ipc_priv.h
-kernel_sigaction.h
-kernel_stat.h
-kernel_termios.h
-sys/cachectl.h
-sys/procfs.h
-sys/sysmips.h
-sys/tas.h
-sys/user.h
-xstatconv.c
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Dist b/sysdeps/unix/sysv/linux/mips/mips64/Dist
deleted file mode 100644
index b8fa28f..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/Dist
+++ /dev/null
@@ -1 +0,0 @@
-ldd-rewrite.sed
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6397f4517e55bf0d657d975f598729115ccd35cf
commit 6397f4517e55bf0d657d975f598729115ccd35cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 6 18:06:40 2006 +0000
Define MADV_REMOVE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 5957426..8ef939a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/Alpha version.
- Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -96,6 +96,7 @@
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 6 /* Don't need these pages. */
+# define MADV_REMOVE 7 /* Remove these pages and resources. */
#endif
/* The POSIX people had to invent similar names for the same things. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7381e0b953af014b560846b953ff27a14006c871
commit 7381e0b953af014b560846b953ff27a14006c871
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 6 10:50:50 2006 +0000
.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
index 7136a0b..e7fe340 100644
--- a/ChangeLog.powerpc
+++ b/ChangeLog.powerpc
@@ -1,3 +1,9 @@
+2006-01-06 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set.
+ Add __floatundidf, __floatundisf, __floatunditf, __floatunsidf,
+ __floatunsisf, __floatunsitf, __unorddf2, __unordsf2, __unordtf2.
+
2005-10-11 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a0a18f1f084081c1dd496f0ca0b9f95f7f0f7e4
commit 5a0a18f1f084081c1dd496f0ca0b9f95f7f0f7e4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 6 10:50:45 2006 +0000
2006-01-06 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/nofpu/Versions (libc: GLIBC_2.4): New set.
Add __floatundidf, __floatundisf, __floatunditf, __floatunsidf,
__floatunsisf, __floatunsitf, __unorddf2, __unordsf2, __unordtf2.
diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions
index 4103db5..037af68 100644
--- a/sysdeps/powerpc/nofpu/Versions
+++ b/sysdeps/powerpc/nofpu/Versions
@@ -10,4 +10,9 @@ libc {
__negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3;
__subsf3; __truncdfsf2; __trunctfsf2;
}
+ GLIBC_2.4 {
+ __floatundidf; __floatundisf; __floatunditf;
+ __floatunsidf; __floatunsisf; __floatunsitf;
+ __unorddf2; __unordsf2; __unordtf2;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b27504c9fc9463645cdb297b8e8973a3dfbd760
commit 1b27504c9fc9463645cdb297b8e8973a3dfbd760
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jan 4 12:37:37 2006 +0000
Fix last commit.
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 33e51a2..00056be 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -41,7 +41,7 @@ __brk (void *addr)
"syscall" /* Perform the system call. */
: "=r" (res)
: "I" (SYS_ify (brk)), "r" (addr)
-+ : "$4", "$7", __SYSCALL_CLOBBERS);
+ : "$4", "$7", __SYSCALL_CLOBBERS);
newbrk = (void *) res;
}
__curbrk = newbrk;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52039e96e0fb04a5e98aa577faa418b20939f3a4
commit 52039e96e0fb04a5e98aa577faa418b20939f3a4
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jan 4 06:46:45 2006 +0000
(__brk): Use __SYSCALL_CLOBBERS.
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 5c31bec..33e51a2 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/MIPS.
- Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ __brk (void *addr)
"syscall" /* Perform the system call. */
: "=r" (res)
: "I" (SYS_ify (brk)), "r" (addr)
- : "$4", "$7");
++ : "$4", "$7", __SYSCALL_CLOBBERS);
newbrk = (void *) res;
}
__curbrk = newbrk;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3472928acf79c43d909b9cc24e4533f8e6048c0
commit d3472928acf79c43d909b9cc24e4533f8e6048c0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 3 23:35:29 2006 +0000
Include string.h.
diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c
index 71df4fe..0da8cd8 100644
--- a/sysdeps/unix/sysv/linux/m68k/fchownat.c
+++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
+#include <string.h>
#include <sysdep.h>
#include <sys/syscall.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91d53051d9f662064b93f19db48d6100d52837c1
commit 91d53051d9f662064b93f19db48d6100d52837c1
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Dec 30 09:27:42 2005 +0000
[BZ #1067]
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Fix struct msghdr
for 64-bit mips kernel.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 1dd82eb..4c70eff 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -219,7 +219,7 @@ struct msghdr
socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
- int msg_iovlen; /* Number of elements in the vector. */
+ size_t msg_iovlen; /* Number of elements in the vector. */
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
socklen_t msg_controllen; /* Ancillary data buffer length. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a4d8332bd2891c2f989f6aaae3f3a0fec2cf96e
commit 0a4d8332bd2891c2f989f6aaae3f3a0fec2cf96e
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:47:16 2005 +0000
.
diff --git a/ChangeLog.aix b/ChangeLog.aix
new file mode 100644
index 0000000..5305d33
--- /dev/null
+++ b/ChangeLog.aix
@@ -0,0 +1,6 @@
+2005-12-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third
+ argument DEMANGLE, and pass SP value through it.
+
+ * sysdeps/unix/sysv/aix/powerpc/memset.c: Don't use sysdeps/generic.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index 7fa5c79..0f6d2f4 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,8 @@
+2005-12-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
+ DEMANGLE, and pass SP value through it.
+
2004-10-25 Alexandre Oliva <aoliva@redhat.com>
* ChangeLog.am33: Added emacs local variables for mode setting and
@@ -66,7 +71,7 @@
* sysdeps/am33/fpu/fraiseexcpt.c: New file.
* sysdeps/am33/fpu/fsetexcptflg.c: New file.
* sysdeps/am33/fpu/ftestexcept.c: New file.
-
+
* sysdeps/unix/am33/sysdep.h: Use relative pathnames.
* sysdeps/unix/sysv/linux/am33/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/am33/sysdep.S: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 81f98f7..fcce9d6 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,14 @@
+2005-12-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
+ DEMANGLE, and pass SP value through it.
+ * sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+ * sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
+
+2005-12-15 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/arm/libc-tls.c: Use csu/ instead of sysdeps/generic/.
+
2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h,
@@ -217,7 +228,7 @@
* sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h,
sysdeps/arm/_mcount.S: Revert previous bogus changes.
-
+
2005-10-10 Philip Blundell <philb@gnu.org>
* sysdeps/arm/_mcount.S: Suppress profiling when building this
@@ -274,7 +285,7 @@
* sysdeps/arm/ieee754.h: Deleted.
* sysdeps/arm/gmp-mparam.h: Support VFP and big endian.
* sysdeps/arm/bits/endian.h: Likewise.
-
+
2005-06-11 Phil Blundell <pb@reciva.com>
* sysdeps/arm/init-first.c: Deleted.
diff --git a/ChangeLog.cris b/ChangeLog.cris
index ba77489..af91a1d 100644
--- a/ChangeLog.cris
+++ b/ChangeLog.cris
@@ -1,3 +1,8 @@
+2005-12-27 Roland McGrath <roland@redhat.com>
+
+ * sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
+ DEMANGLE, and pass SP value through it.
+
2004-10-25 Roland McGrath <roland@frob.com>
* sysdeps/cris/configure.in: New file, with test moved out of main
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7031b26a6b950ac2aae555dc1cf2ee4befc3caa5
commit 7031b26a6b950ac2aae555dc1cf2ee4befc3caa5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:47:03 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/aix/powerpc/memset.c: Don't use sysdeps/generic.
diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c
index 6955ef5..352db13 100644
--- a/sysdeps/unix/sysv/aix/powerpc/memset.c
+++ b/sysdeps/unix/sysv/aix/powerpc/memset.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,4 +18,4 @@
/* Until the cache line issues are resolved use the generic implementation. */
-#include <sysdeps/generic/memset.c>
+#include <string/memset.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5263067562a004273a7349532cf490dd2b2802c
commit e5263067562a004273a7349532cf490dd2b2802c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:46:19 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/arm/eabi/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
DEMANGLE, and pass SP value through it.
* sysdeps/arm/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/arm/fpu/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index 9b74906..4eb237a 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -35,7 +35,7 @@ typedef int __jmp_buf[10];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
#endif
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
index 3bb92dd..458e47f 100644
--- a/sysdeps/arm/eabi/bits/setjmp.h
+++ b/sysdeps/arm/eabi/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ typedef int __jmp_buf[64] __attribute__((aligned (8)));
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
#endif
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index 0a19d2c..1adf94e 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -35,7 +35,7 @@ typedef int __jmp_buf[22];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9260afa563c464c70d8ed6c4178f2b69270168ac
commit 9260afa563c464c70d8ed6c4178f2b69270168ac
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:46:16 2005 +0000
2005-12-15 Roland McGrath <roland@redhat.com>
* sysdeps/arm/libc-tls.c: Use csu/ instead of sysdeps/generic/.
diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c
index 53c2923..affb189 100644
--- a/sysdeps/arm/libc-tls.c
+++ b/sysdeps/arm/libc-tls.c
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdeps/generic/libc-tls.c>
+#include <csu/libc-tls.c>
#include <dl-tls.h>
#if USE_TLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a35566071ced0925cac62b694cb106fe76d7d87
commit 4a35566071ced0925cac62b694cb106fe76d7d87
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:44:53 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/cris/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
DEMANGLE, and pass SP value through it.
diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h
index 0d7825b..fa62a85 100644
--- a/sysdeps/cris/bits/setjmp.h
+++ b/sysdeps/cris/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,5 +50,5 @@ typedef unsigned long int __jmp_buf[18];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((unsigned long int) (address) < (jmpbuf)[JB_SP])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((unsigned long int) (address) < demangle ((jmpbuf)[JB_SP]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a0cc660126b9eb490c3a63d477e61b4ab36d3d4
commit 0a0cc660126b9eb490c3a63d477e61b4ab36d3d4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:44:02 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/am33/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
DEMANGLE, and pass SP value through it.
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h
index 5864b92..879ecb6 100644
--- a/sysdeps/am33/bits/setjmp.h
+++ b/sysdeps/am33/bits/setjmp.h
@@ -30,5 +30,5 @@ typedef int __jmp_buf[26];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c54e1e52db481bae2178f5e306f1eceb2fe18e4a
commit c54e1e52db481bae2178f5e306f1eceb2fe18e4a
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:43:52 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/aix/bits/setjmp.h (_JMPBUF_UNWINDS): Take third
argument DEMANGLE, and pass SP value through it.
diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h
index 82a58ae..c7a736b 100644
--- a/sysdeps/unix/sysv/aix/bits/setjmp.h
+++ b/sysdeps/unix/sysv/aix/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,5 +42,5 @@ typedef long int __jmp_buf[64];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bdbd93b5efefcade9d161cb6b21a1845f5e1fc8d
commit bdbd93b5efefcade9d161cb6b21a1845f5e1fc8d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:41:36 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Take third argument
DEMANGLE, and pass SP value through it.
* sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/setjmp.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Likewise.
* sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Likewise.
* hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Pass inline
demangler function to _JMPBUF_UNWINDS.
* sysdeps/mach/hurd/jmp-unwind.c (demangle_ptr): New function.
(_longjmp_unwind): Pass it to _JMPBUF_UNWINDS.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index c603a35..71b7738 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1997, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -80,8 +80,8 @@ typedef long int __jmp_buf[17];
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
#endif
#endif /* bits/setjmp.h */
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 4395b8f..07ea01e 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,8 @@ typedef double __jmp_buf[21];
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *) (_address) > \
+ (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
#endif /* bits/setjmp.h */
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 193eec3..612582a 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)->__sp)
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
#endif /* bits/setjmp.h */
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 74caae8..5f7c82b 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -80,7 +80,7 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[0].__sp)
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
#endif /* _MIPS_BITS_SETJMP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52abb5ce242502ec54edd095b429c88d3c0d9a3c
commit 52abb5ce242502ec54edd095b429c88d3c0d9a3c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 05:41:16 2005 +0000
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
(_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
* sysdeps/alpha/jmpbuf-unwind.h: Likewise.
* sysdeps/i386/jmpbuf-unwind.h: Likewise.
* sysdeps/mips/jmpbuf-unwind.h: Likewise.
* sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
* sysdeps/s390/jmpbuf-unwind.h: Likewise.
* sysdeps/sh/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
* sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h
index 5cef8b1..83b7a01 100644
--- a/sysdeps/alpha/nptl/jmpbuf-unwind.h
+++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -20,12 +20,23 @@
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal lobngjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h
index 67cc969..9ee0310 100644
--- a/sysdeps/mips/nptl/jmpbuf-unwind.h
+++ b/sysdeps/mips/nptl/jmpbuf-unwind.h
@@ -19,12 +19,23 @@
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal longjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7951fa108f8e3c2885604b32e1cee273ff0479ea
commit 7951fa108f8e3c2885604b32e1cee273ff0479ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 27 15:23:06 2005 +0000
Define EOWNERDEAD and ENOTRECOVERABLE if not already defined.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h
index 9cdc167..8b2f152 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux/Alpha specific version.
- Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,6 +31,12 @@
# define ECANCELED 131
# endif
+/* Support for error codes to support robust mutexes was added later, too. */
+# ifndef EOWNERDEAD
+# define EOWNERDEAD 136
+# define ENOTRECOVERABLE 137
+# endif
+
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=112ae4478bee6166974542ed7df6959db6d988ad
commit 112ae4478bee6166974542ed7df6959db6d988ad
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 27 15:21:33 2005 +0000
dd new errlist-compat entry for up to 138 errnos.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index ca79c7e..8709dd2 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -73,6 +73,10 @@ libc {
#errlist-compat 132
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_2.4 {
+ #errlist-compat 138
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
GLIBC_PRIVATE {
__libc_alpha_cache_shape;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee8aaccf260a7e8ce75e237b5228ff85c44906df
commit ee8aaccf260a7e8ce75e237b5228ff85c44906df
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 27 15:08:35 2005 +0000
Add __next and __prev field to pthread_mutex_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 86b4703..5004937 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -45,7 +45,7 @@ typedef union
/* Data structures for mutex handling. The structure of the attribute
type is deliberately not exposed. */
-typedef union
+typedef union __pthread_mutex_u
{
struct
{
@@ -57,6 +57,9 @@ typedef union
binary compatibility. */
int __kind;
int __spins;
+ union __pthread_mutex_u *__next;
+ union __pthread_mutex_u *__prev;
+#define __PTHREAD_MUTEX_HAVE_PREV 1
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ec1c6e238acc66e11bf9c110a1e2389e28990bc
commit 8ec1c6e238acc66e11bf9c110a1e2389e28990bc
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 21 22:16:21 2005 +0000
2005-12-21 Roland McGrath <roland@redhat.com>
* elf/cache.c: Use <> rather than "" #includes.
* elf/chroot_canon.c: Likewise.
* elf/dl-lookup.c: Likewise.
* elf/ldconfig.c: Likewise.
* elf/readlib.c: Likewise.
* elf/rtld.c: Likewise.
* gmon/mcount.c: Likewise.
* hurd/hurdfault.c: Likewise.
* hurd/hurdsig.c: Likewise.
* hurd/report-wait.c: Likewise.
* hurd/sigunwind.c: Likewise.
* mach/setup-thread.c: Likewise.
* rt/aio_read64.c: Likewise.
* rt/aio_sigqueue.c: Likewise.
* rt/aio_write64.c: Likewise.
* soft-fp/soft-fp.h: Likewise.
* stdio-common/tmpfile64.c: Likewise.
* sysdeps/mach/hurd/fork.c: Likewise.
* sysdeps/mach/hurd/hppa/trampoline.c: Likewise.
* sysdeps/mach/hurd/i386/trampoline.c: Likewise.
* sysdeps/mach/hurd/mips/trampoline.c: Likewise.
* sysdeps/mach/hurd/powerpc/trampoline.c: Likewise.
* sysdeps/posix/sprofil.c: Likewise.
* sysdeps/pthread/aio_cancel.c: Likewise.
* sysdeps/pthread/aio_fsync.c: Likewise.
* sysdeps/pthread/aio_read64.c: Likewise.
* sysdeps/pthread/aio_read.c: Likewise.
* sysdeps/pthread/aio_suspend.c: Likewise.
* sysdeps/pthread/aio_write64.c: Likewise.
* sysdeps/pthread/aio_write.c: Likewise.
* sysdeps/pthread/lio_listio64.c: Likewise.
* sysdeps/pthread/lio_listio.c: Likewise.
* sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise.
* sysdeps/unix/sysv/tcflow.c: Likewise.
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
index bbb5b96..fc811c5 100644
--- a/sysdeps/mach/hurd/hppa/trampoline.c
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. HPPA version.
- Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <hurd/signal.h>
-#include "thread_state.h"
+#include <thread_state.h>
#include <assert.h>
#include <errno.h>
#include "hurdfault.h"
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index dd42dfc..34e363b 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. MIPS version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,11 +19,11 @@
#include <hurd/signal.h>
#include <hurd/userlink.h>
-#include "thread_state.h"
+#include <thread_state.h>
#include <assert.h>
#include <errno.h>
#include "hurdfault.h"
-#include "intr-msg.h"
+#include <intr-msg.h>
struct sigcontext *
@@ -35,7 +35,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
__label__ trampoline, rpc_wait_trampoline, firewall;
void *volatile sigsp;
struct sigcontext *scp;
- struct
+ struct
{
int signo;
long int sigcode;
@@ -163,7 +163,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
still waiting for a reply. We will have it run the special
trampoline code which retries the message receive before running
the signal handler.
-
+
To do this we change the OPTION argument in its registers to
enable only message reception, since the request message has
already been sent. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7d0379e45d11a7bc0c613d2c083fea7d4e955e0
commit c7d0379e45d11a7bc0c613d2c083fea7d4e955e0
Author: Richard Henderson <rth@redhat.com>
Date: Sun Dec 18 22:47:08 2005 +0000
* sysdeps/alpha/libc-tls.c: Fix directory on include of base file.
diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c
index 84e9bec..24629e9 100644
--- a/sysdeps/alpha/libc-tls.c
+++ b/sysdeps/alpha/libc-tls.c
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <misc/libc-tls.c>
+#include <csu/libc-tls.c>
#include <dl-tls.h>
#if USE_TLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=333697c5a7566e349beade7e9f80f258f6d57a23
commit 333697c5a7566e349beade7e9f80f258f6d57a23
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 15 21:10:12 2005 +0000
2005-12-15 Roland McGrath <roland@redhat.com>
* sysdeps/alpha/fpu/s_cacosf.c: Don't use sysdeps/generic/.
* sysdeps/alpha/fpu/s_cacoshf.c: Likewise.
* sysdeps/alpha/fpu/s_casinf.c: Likewise.
* sysdeps/alpha/fpu/s_casinhf.c: Likewise.
* sysdeps/alpha/fpu/s_catanf.c: Likewise.
* sysdeps/alpha/fpu/s_catanhf.c: Likewise.
* sysdeps/alpha/fpu/s_ccosf.c: Likewise.
* sysdeps/alpha/fpu/s_ccoshf.c: Likewise.
* sysdeps/alpha/fpu/s_cexpf.c: Likewise.
* sysdeps/alpha/fpu/s_clog10f.c: Likewise.
* sysdeps/alpha/fpu/s_clogf.c: Likewise.
* sysdeps/alpha/fpu/s_cpowf.c: Likewise.
* sysdeps/alpha/fpu/s_cprojf.c: Likewise.
* sysdeps/alpha/fpu/s_csinf.c: Likewise.
* sysdeps/alpha/fpu/s_csinhf.c: Likewise.
* sysdeps/alpha/fpu/s_csqrtf.c: Likewise.
* sysdeps/alpha/fpu/s_ctanf.c: Likewise.
* sysdeps/alpha/fpu/s_ctanhf.c: Likewise.
* sysdeps/alpha/libc-tls.c: Likewise.
* sysdeps/gnu/glob64.c: Likewise.
* sysdeps/gnu/updwtmp.c: Likewise.
* sysdeps/gnu/utmp_file.c: Likewise.
* sysdeps/i386/bzero.c: Likewise.
* sysdeps/i386/ffs.c: Likewise.
* sysdeps/i386/i686/ffs.c: Likewise.
* sysdeps/i386/memset.c: Likewise.
* sysdeps/ia64/fpu/printf_fphex.c: Likewise.
* sysdeps/ia64/libc-tls.c: Likewise.
* sysdeps/ieee754/ldbl-128/printf_fphex.c: Likewise.
* sysdeps/m68k/ffs.c: Likewise.
* sysdeps/mach/hurd/getdents.c: Likewise.
* sysdeps/mach/hurd/init-posix.c: Likewise.
* sysdeps/mach/msync.c: Likewise.
* sysdeps/mips/libc-tls.c: Likewise.
* sysdeps/posix/profil.c: Likewise.
* sysdeps/posix/shm_open.c: Likewise.
* sysdeps/posix/shm_unlink.c: Likewise.
* sysdeps/posix/sprofil.c: Likewise.
* sysdeps/rs6000/ffs.c: Likewise.
* sysdeps/s390/libc-tls.c: Likewise.
* sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/glob.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/wordexp.c: Likewise.
* sysdeps/unix/sysv/linux/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/gai_sigqueue.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getmsg.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/putmsg.c: Likewise.
* sysdeps/unix/sysv/linux/i386/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mq_close.c: Likewise.
* sysdeps/unix/sysv/linux/mq_getattr.c: Likewise.
* sysdeps/unix/sysv/linux/mq_notify.c: Likewise.
* sysdeps/unix/sysv/linux/mq_open.c: Likewise.
* sysdeps/unix/sysv/linux/mq_receive.c: Likewise.
* sysdeps/unix/sysv/linux/mq_send.c: Likewise.
* sysdeps/unix/sysv/linux/mq_unlink.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/s390/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/sched_getaffinity.c: Likewise.
* sysdeps/unix/sysv/linux/sched_setaffinity.c: Likewise.
* sysdeps/unix/sysv/linux/sigqueue.c: Likewise.
* sysdeps/unix/sysv/linux/sigstack.c: Likewise.
* sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/readelflib.c: Likewise.
* sysdeps/unix/sysv/linux/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/vfork.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/readelflib.c: Likewise.
diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c
index 20e67f4..46dca5a 100644
--- a/sysdeps/alpha/fpu/s_cacosf.c
+++ b/sysdeps/alpha/fpu/s_cacosf.c
@@ -1,5 +1,5 @@
/* Return arc cosine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_cacosf (_Complex float x);
-#include <sysdeps/generic/s_cacosf.c>
+#include <math/s_cacosf.c>
#include "cfloat-compat.h"
#undef __cacosf
diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c
index 86cb4fb..6b61d1d 100644
--- a/sysdeps/alpha/fpu/s_cacoshf.c
+++ b/sysdeps/alpha/fpu/s_cacoshf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole cosine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_cacoshf (_Complex float x);
-#include <sysdeps/generic/s_cacoshf.c>
+#include <math/s_cacoshf.c>
#include "cfloat-compat.h"
#undef __cacoshf
diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c
index 3d0d4ea..fd41042 100644
--- a/sysdeps/alpha/fpu/s_casinf.c
+++ b/sysdeps/alpha/fpu/s_casinf.c
@@ -1,5 +1,5 @@
/* Return arc sine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_casinf (_Complex float x);
-#include <sysdeps/generic/s_casinf.c>
+#include <math/s_casinf.c>
#include "cfloat-compat.h"
#undef __casinf
diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c
index 698ce10..0b72a24 100644
--- a/sysdeps/alpha/fpu/s_casinhf.c
+++ b/sysdeps/alpha/fpu/s_casinhf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole sine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_casinhf (_Complex float x);
-#include <sysdeps/generic/s_casinhf.c>
+#include <math/s_casinhf.c>
#include "cfloat-compat.h"
#undef __casinhf
diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c
index 221a461..8f40616 100644
--- a/sysdeps/alpha/fpu/s_catanf.c
+++ b/sysdeps/alpha/fpu/s_catanf.c
@@ -1,5 +1,5 @@
/* Return arc tangent of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_catanf (_Complex float x);
-#include <sysdeps/generic/s_catanf.c>
+#include <math/s_catanf.c>
#include "cfloat-compat.h"
#undef __catanf
diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c
index 7465a43..ac11945 100644
--- a/sysdeps/alpha/fpu/s_catanhf.c
+++ b/sysdeps/alpha/fpu/s_catanhf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole tangent of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_catanhf (_Complex float x);
-#include <sysdeps/generic/s_catanhf.c>
+#include <math/s_catanhf.c>
#include "cfloat-compat.h"
#undef __catanhf
diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c
index fd77590..04036f4 100644
--- a/sysdeps/alpha/fpu/s_ccosf.c
+++ b/sysdeps/alpha/fpu/s_ccosf.c
@@ -1,5 +1,5 @@
/* Return cosine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_ccosf (_Complex float x);
-#include <sysdeps/generic/s_ccosf.c>
+#include <math/s_ccosf.c>
#include "cfloat-compat.h"
#undef __ccosf
diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c
index 0e8eab2..e9fb34c 100644
--- a/sysdeps/alpha/fpu/s_ccoshf.c
+++ b/sysdeps/alpha/fpu/s_ccoshf.c
@@ -1,5 +1,5 @@
/* Return hyperbole cosine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_ccoshf (_Complex float x);
-#include <sysdeps/generic/s_ccoshf.c>
+#include <math/s_ccoshf.c>
#include "cfloat-compat.h"
#undef __ccoshf
diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c
index 2cf6db4..4a28dcd 100644
--- a/sysdeps/alpha/fpu/s_cexpf.c
+++ b/sysdeps/alpha/fpu/s_cexpf.c
@@ -1,5 +1,5 @@
/* Return exponent of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_cexpf (_Complex float x);
-#include <sysdeps/generic/s_cexpf.c>
+#include <math/s_cexpf.c>
#include "cfloat-compat.h"
#undef __cexpf
diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c
index 12ecdea..e7dc7bb 100644
--- a/sysdeps/alpha/fpu/s_clog10f.c
+++ b/sysdeps/alpha/fpu/s_clog10f.c
@@ -1,5 +1,5 @@
/* Return base 10 logarithm of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_clog10f (_Complex float x);
-#include <sysdeps/generic/s_clog10f.c>
+#include <math/s_clog10f.c>
#include "cfloat-compat.h"
#undef __clog10f
diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c
index 9eefe9f..364dcec 100644
--- a/sysdeps/alpha/fpu/s_clogf.c
+++ b/sysdeps/alpha/fpu/s_clogf.c
@@ -1,5 +1,5 @@
/* Return natural logarithm of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_clogf (_Complex float x);
-#include <sysdeps/generic/s_clogf.c>
+#include <math/s_clogf.c>
#include "cfloat-compat.h"
#undef __clogf
diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c
index f4cb354..cc61b18 100644
--- a/sysdeps/alpha/fpu/s_cpowf.c
+++ b/sysdeps/alpha/fpu/s_cpowf.c
@@ -1,5 +1,5 @@
/* Return power of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_cpowf (_Complex float x, _Complex float c);
-#include <sysdeps/generic/s_cpowf.c>
+#include <math/s_cpowf.c>
#include "cfloat-compat.h"
#undef __cpowf
diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c
index eac8687..5cfb526 100644
--- a/sysdeps/alpha/fpu/s_cprojf.c
+++ b/sysdeps/alpha/fpu/s_cprojf.c
@@ -1,5 +1,5 @@
/* Return projection of complex float value to Riemann sphere.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_cprojf (_Complex float x);
-#include <sysdeps/generic/s_cprojf.c>
+#include <math/s_cprojf.c>
#include "cfloat-compat.h"
#undef __cprojf
diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c
index eba70e9..8eb9a10 100644
--- a/sysdeps/alpha/fpu/s_csinf.c
+++ b/sysdeps/alpha/fpu/s_csinf.c
@@ -1,5 +1,5 @@
/* Return sine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_csinf (_Complex float x);
-#include <sysdeps/generic/s_csinf.c>
+#include <math/s_csinf.c>
#include "cfloat-compat.h"
#undef __csinf
diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c
index 9db81a8..0e2c186 100644
--- a/sysdeps/alpha/fpu/s_csinhf.c
+++ b/sysdeps/alpha/fpu/s_csinhf.c
@@ -1,5 +1,5 @@
/* Return hyperbole sine of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_csinhf (_Complex float x);
-#include <sysdeps/generic/s_csinhf.c>
+#include <math/s_csinhf.c>
#include "cfloat-compat.h"
#undef __csinhf
diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c
index cc4a8e0..ebf23a8 100644
--- a/sysdeps/alpha/fpu/s_csqrtf.c
+++ b/sysdeps/alpha/fpu/s_csqrtf.c
@@ -1,5 +1,5 @@
/* Return square root of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_csqrtf (_Complex float x);
-#include <sysdeps/generic/s_csqrtf.c>
+#include <math/s_csqrtf.c>
#include "cfloat-compat.h"
#undef __csqrtf
diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c
index 843ee53..e26db96 100644
--- a/sysdeps/alpha/fpu/s_ctanf.c
+++ b/sysdeps/alpha/fpu/s_ctanf.c
@@ -1,5 +1,5 @@
/* Return tangent of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_ctanf (_Complex float x);
-#include <sysdeps/generic/s_ctanf.c>
+#include <math/s_ctanf.c>
#include "cfloat-compat.h"
#undef __ctanf
diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c
index f1f74ab..5d047bd 100644
--- a/sysdeps/alpha/fpu/s_ctanhf.c
+++ b/sysdeps/alpha/fpu/s_ctanhf.c
@@ -1,5 +1,5 @@
/* Return hyperbole tangent of complex float value.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
static _Complex float internal_ctanhf (_Complex float x);
-#include <sysdeps/generic/s_ctanhf.c>
+#include <math/s_ctanhf.c>
#include "cfloat-compat.h"
#undef __ctanhf
diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c
index a3b68e9..84e9bec 100644
--- a/sysdeps/alpha/libc-tls.c
+++ b/sysdeps/alpha/libc-tls.c
@@ -1,5 +1,5 @@
/* Thread-local storage handling in the ELF dynamic linker. Alpha version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdeps/generic/libc-tls.c>
+#include <misc/libc-tls.c>
#include <dl-tls.h>
#if USE_TLS
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index 189936b..2032e86 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For mc68020, mc68030, mc68040.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 1998, 2004, 2005 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -43,6 +43,6 @@ weak_alias (__ffs, ffsl)
#else
-#include <sysdeps/generic/ffs.c>
+#include <string/ffs.c>
#endif
diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c
index 157ba33..a3d6301 100644
--- a/sysdeps/mips/libc-tls.c
+++ b/sysdeps/mips/libc-tls.c
@@ -17,7 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdeps/generic/libc-tls.c>
+#include <csu/libc-tls.c>
#include <dl-tls.h>
#if USE_TLS
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index 4d01727..619412c 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -38,5 +38,5 @@ weak_alias (__ffs, ffs)
libc_hidden_builtin_def (ffs)
#else
-#include <sysdeps/generic/ffs.c>
+#include <string/ffs.c>
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index a51020d..8457389 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ extern int __new_glob (const char *__pattern, int __flags,
glob_t *__pglob);
extern void __new_globfree (glob_t *__pglob);
-#include <sysdeps/generic/glob.c>
+#include <posix/glob.c>
#undef glob
#undef globfree
diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c
index 1921a03..c2972e4 100644
--- a/sysdeps/unix/sysv/linux/alpha/wordexp.c
+++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#define wordexp(words, pwordexp, flags) \
__new_wordexp (words, pwordexp, flags)
-#include <sysdeps/generic/wordexp.c>
+#include <posix/wordexp.c>
versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index cdb2d56..11e2425 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -72,5 +72,5 @@ weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
-# include <sysdeps/generic/ftruncate64.c>
+# include <misc/ftruncate64.c>
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
index 73fd43f..baa92fe 100644
--- a/sysdeps/unix/sysv/linux/mips/readelflib.c
+++ b/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Alexandre Oliva <aoliva@redhat.com>
Based on work ../x86_64/readelflib.c,
@@ -62,10 +62,10 @@ process_elf_file (const char *file_name, const char *lib, int *flag,
#undef process_elf_file
#define process_elf_file process_elf32_file
#define __ELF_NATIVE_CLASS 32
-#include "sysdeps/generic/readelflib.c"
+#include "elf/readelflib.c"
#undef __ELF_NATIVE_CLASS
#undef process_elf_file
#define process_elf_file process_elf64_file
#define __ELF_NATIVE_CLASS 64
-#include "sysdeps/generic/readelflib.c"
+#include "elf/readelflib.c"
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index e955f18..d01d25b 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -72,5 +72,5 @@ truncate64 (const char *path, off64_t length)
#else
/* Use the generic implementation. */
-# include <sysdeps/generic/truncate64.c>
+# include <misc/truncate64.c>
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=407fe247124382de29566028eb419a51d822b16d
commit 407fe247124382de29566028eb419a51d822b16d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 14 11:16:23 2005 +0000
Generic strtsupp.c.
diff --git a/bare/strtsupp.c b/bare/strtsupp.c
new file mode 100644
index 0000000..c66495b
--- /dev/null
+++ b/bare/strtsupp.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <standalone.h>
+
+/* This file is only required when a "bare" board is configured. */
+
+/* Start Support Routines
+
+The start code for some CPUs (e.g. i386) require target dependent
+support. For more info, consult the start file for your CPU. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d3c538a39ad9ce712825d9b799ebacf1b2dfc22
commit 0d3c538a39ad9ce712825d9b799ebacf1b2dfc22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 14 08:30:30 2005 +0000
Generic console.c.
diff --git a/bare/console.c b/bare/console.c
new file mode 100644
index 0000000..326ebed
--- /dev/null
+++ b/bare/console.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <standalone.h>
+
+/* This file is only required when a "bare" board is configured. */
+
+/* These routines provide console IO routines for your embedded target. */
+
+int
+_Console_Putc (ch)
+ char ch;
+{
+ /* eat the character */
+
+ return 0;
+}
+
+int
+_Console_Getc (poll)
+ int poll;
+{
+ /* boring user, never types anything */
+ return -1;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0546598845e5deea5f0a5313bf5868c642e24812
commit 0546598845e5deea5f0a5313bf5868c642e24812
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 14 08:22:40 2005 +0000
Generic brdinit.c.
diff --git a/bare/brdinit.c b/bare/brdinit.c
new file mode 100644
index 0000000..af96bcd
--- /dev/null
+++ b/bare/brdinit.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <standalone.h>
+
+/* This file is only required when a "bare" board is configured. */
+
+/* _Board_Initialize
+
+This routine normally performs board specific initialization. */
+
+void
+_Board_Initialize ()
+{
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6023225d0f05eb07aead4f02133a769ce6d1fcb
commit f6023225d0f05eb07aead4f02133a769ce6d1fcb
Author: Roland McGrath <roland@gnu.org>
Date: Tue Dec 6 01:38:24 2005 +0000
2005-11-15 Mike Frysinger <vapier@gentoo.org>
* sysdeps/hppa/bits/setjmp.h: Add _BITS_SETJMP_H preprocessor
protection and allow pthread.h to include bits/setjmp.h as well as
setjmp.h.
* sysdeps/m68k/bits/setjmp.h: Likewise.
* sysdeps/s390/bits/setjmp.h: Make sure only setjmp.h or pthread.h
are allow to include bits/setjmp.h.
* sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Cast rhs to match lhs
cast of address.
* sysdeps/sh/bits/setjmp.h: Likewise.
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 7fb2af7..4395b8f 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -17,8 +17,10 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. HPPA version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -39,3 +41,5 @@ typedef double __jmp_buf[21];
variable at ADDRESS. */
#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
+
+#endif /* bits/setjmp.h */
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 2c2b3ee..193eec3 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -17,8 +17,10 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. m68k version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -44,3 +46,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)->__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 2b42b22..74caae8 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -81,6 +81,6 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (jmpbuf)[0].__sp)
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
#endif /* _MIPS_BITS_SETJMP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3fcfbb038aa0093c65f0579394718c81047d328
commit d3fcfbb038aa0093c65f0579394718c81047d328
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 28 08:25:55 2005 +0000
(MREMAP_FIXED): Added.
Patch by René Rebe <rene@exactcode.de>.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 154501f..92d4b8a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -89,4 +89,5 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6b36472ee73510f86cfef496c18a3909da4902b
commit a6b36472ee73510f86cfef496c18a3909da4902b
Author: Richard Henderson <rth@redhat.com>
Date: Sun Nov 27 06:05:33 2005 +0000
* sysdeps/alpha/strncmp.S: Don't read too much data when pointers
are co-aligned, and count is aligned with the end of the word.
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
index e2b4ebf..ff199eb 100644
--- a/sysdeps/alpha/strncmp.S
+++ b/sysdeps/alpha/strncmp.S
@@ -61,8 +61,10 @@ $aligned:
ornot t0, t3, t0 # .. e1 :
cmpbge zero, t1, t7 # e0 : bits set iff null found
beq a2, $eoc # .. e1 : check end of count
- subq a2, 1, a2 # e0 :
+ unop # e0 :
bne t7, $eos # .. e1 :
+ unop # e0 :
+ beq t10, $ant_loop # .. e1 :
/* Aligned compare main loop.
On entry to this basic block:
@@ -74,13 +76,30 @@ $a_loop:
bne t2, $wordcmp # .. e1 (zdb)
ldq_u t1, 8(a1) # e0 :
ldq_u t0, 8(a0) # .. e1 :
+ subq a2, 1, a2 # e0 :
+ addq a1, 8, a1 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ beq a2, $eoc # .. e1 :
+ cmpbge zero, t1, t7 # e0 :
+ beq t7, $a_loop # .. e1 :
+ unop # e0 :
+ br $eos # .. e1 :
+
+ /* Alternate aligned compare loop, for when there's no trailing
+ bytes on the count. We have to avoid reading too much data. */
+$ant_loop:
+ xor t0, t1, t2 # e0 :
+ bne t2, $wordcmp # .. e1 (zdb)
+ subq a2, 1, a2 # e0 :
+ beq a2, $zerolength # .. e1 :
+ ldq_u t1, 8(a1) # e0 :
+ ldq_u t0, 8(a0) # .. e1 :
addq a1, 8, a1 # e0 :
addq a0, 8, a0 # .. e1 :
cmpbge zero, t1, t7 # e0 :
- beq a2, $eoc # .. e1 :
- subq a2, 1, a2 # e0 :
- beq t7, $a_loop # .. e1 :
- br $eos # e1 :
+ beq t7, $ant_loop # .. e1 :
+ unop # e0 :
+ br $eos # .. e1 :
/* The two strings are not co-aligned. Align s1 and cope. */
$unaligned:
@@ -184,6 +203,8 @@ $u_final:
$eoc:
mskql t0, t10, t0
mskql t1, t10, t1
+ unop
+ cmpbge zero, t1, t7
/* We've found a zero somewhere in a word we just read.
On entry to this basic block:
@@ -203,6 +224,7 @@ $eos:
/* Here we have two differing co-aligned words in t0 & t1.
Bytewise compare them and return (t0 > t1 ? 1 : -1). */
+ .align 3
$wordcmp:
cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge
cmpbge t1, t0, t3 # .. e1 :
@@ -216,6 +238,7 @@ $wordcmp:
$done:
ret # e1 :
+ .align 3
$zerolength:
clr v0
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=971a928ce0796cc7b48ed1112fb1d66b6ac5f79a
commit 971a928ce0796cc7b48ed1112fb1d66b6ac5f79a
Author: Richard Henderson <rth@redhat.com>
Date: Sat Nov 26 00:52:45 2005 +0000
* sysdeps/unix/sysv/linux/alpha/fxstatat.c (__fxstatat): Fix typo.
(__fxstatat64): Alias from __fxstatat; remove other cnp errors.
* sysdeps/unix/sysv/linux/alpha/sigaction.c: Include sys/cdefs.h
and stddef.h.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h (MREMAP_FIXED): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index bb41887..5957426 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -86,6 +86,7 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
/* Advice to `madvise'. */
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 65b7ad9..127f7f3 100644
--- a/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -67,7 +67,7 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
{
- if (flags & AT_SYMLINK_NOFOLLOW)
+ if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
else
result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
@@ -94,7 +94,4 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
return -1;
}
-hidden_def (__xstat)
-weak_alias (__xstat, _xstat);
-strong_alias (__xstat, __xstat64);
-hidden_ver (__xstat, __xstat64)
+strong_alias (__fxstatat, __fxstatat64);
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c
index 21a2063..26b081d 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigaction.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c
@@ -17,6 +17,8 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <sys/cdefs.h>
+#include <stddef.h>
/*
* In order to get the hidden arguments for rt_sigaction set up
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fefb4f111356fb66991f2652ac1b9c01e625cce1
commit fefb4f111356fb66991f2652ac1b9c01e625cce1
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 18 22:46:31 2005 +0000
2005-11-18 Paul Brook <paul@codesourcery.com>
* sysdeps/unix/sysv/linux/m68k/bits/mman.h (MREMAP_FIXED): New macro.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 815a3da..6e7bdc9 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,6 +78,7 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
/* Advice to `madvise'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e968c00cb4e3fd6d6073c23efa4d58454bbb4b7
commit 8e968c00cb4e3fd6d6073c23efa4d58454bbb4b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 18 02:40:36 2005 +0000
Define SHM_NORESERVE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index bbee434..35226c1 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -71,6 +71,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
index 1c022fd..a91f1f5 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -79,6 +79,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=34e59f5bfb0afd6185c6c619bc1252967eb4ad06
commit 34e59f5bfb0afd6185c6c619bc1252967eb4ad06
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Nov 16 19:22:59 2005 +0000
* sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h,
sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c,
sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c,
sysdeps/unix/sysv/linux/arm/nptl/unwind.h,
sysdeps/arm/unwind-dw2-fde-glibc.c,
sysdeps/arm/unwind-pe.c, sysdeps/arm/framestate.c: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 795b363..81f98f7 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,14 @@
2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h,
+ sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c,
+ sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c,
+ sysdeps/unix/sysv/linux/arm/nptl/unwind.h,
+ sysdeps/arm/unwind-dw2-fde-glibc.c,
+ sysdeps/arm/unwind-pe.c, sysdeps/arm/framestate.c: New files.
+
+2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update
include guards.
diff --git a/sysdeps/arm/framestate.c b/sysdeps/arm/framestate.c
new file mode 100644
index 0000000..710cecc
--- /dev/null
+++ b/sysdeps/arm/framestate.c
@@ -0,0 +1 @@
+/* Empty */
diff --git a/sysdeps/arm/unwind-dw2-fde-glibc.c b/sysdeps/arm/unwind-dw2-fde-glibc.c
new file mode 100644
index 0000000..6c0d735
--- /dev/null
+++ b/sysdeps/arm/unwind-dw2-fde-glibc.c
@@ -0,0 +1,80 @@
+/* Dummy exception handling and frame unwind runtime interface routines.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* ARM uses setjmp-longjmp exceptions. However, previous versions of
+ GNU libc exported some DWARF-2 exception handling support routines.
+ They are not necessary, but older (or broken) configurations of GCC
+ will do so. Even though all references to these are weak, because
+ they refer to versioned symbols, they must be provided. */
+
+#include <stdlib.h>
+#include <unwind.h>
+#include <unwind-dw2-fde.h>
+
+/* These may be called from startup code, but don't need to do
+ anything. */
+
+void __register_frame_info_bases (void *a1, struct object *a2,
+ void *a3, void *a4)
+{
+}
+
+void __register_frame_info (void *a1, struct object *a2)
+{
+}
+
+void __register_frame (void *a1)
+{
+}
+
+void __register_frame_info_table_bases (void *a1, struct object *a2,
+ void *a3, void *a4)
+{
+}
+
+void __register_frame_info_table (void *a1, struct object *a2)
+{
+}
+
+void __register_frame_table (void *a1)
+{
+}
+
+void *__deregister_frame_info (void *a1)
+{
+ return NULL;
+}
+
+void *__deregister_frame_info_bases (void *a1)
+{
+ return NULL;
+}
+
+void __deregister_frame (void *a1)
+{
+}
+
+/* This should not be called. */
+
+fde *
+_Unwind_Find_FDE (void *a1, struct dwarf_eh_bases *a2)
+{
+ abort ();
+}
diff --git a/sysdeps/arm/unwind-pe.c b/sysdeps/arm/unwind-pe.c
new file mode 100644
index 0000000..710cecc
--- /dev/null
+++ b/sysdeps/arm/unwind-pe.c
@@ -0,0 +1 @@
+/* Empty */
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..a44ee95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
@@ -0,0 +1,128 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .section ".text"; \
+ PSEUDO_PROLOGUE; \
+ .type __##syscall_name##_nocancel,%function; \
+ .globl __##syscall_name##_nocancel; \
+ __##syscall_name##_nocancel: \
+ DO_CALL (syscall_name, args); \
+ PSEUDO_RET; \
+ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
+ ENTRY (name); \
+ SINGLE_THREAD_P; \
+ DOARGS_##args; \
+ bne .Lpseudo_cancel; \
+ DO_CALL (syscall_name, 0); \
+ UNDOARGS_##args; \
+ cmn r0, $4096; \
+ PSEUDO_RET; \
+ .Lpseudo_cancel: \
+ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
+ CENABLE; \
+ mov ip, r0; /* put mask in safe place. */ \
+ UNDOCARGS_##args; /* restore syscall args. */ \
+ swi SYS_ify (syscall_name); /* do the call. */ \
+ str r0, [sp, $-4]!; /* save syscall return value. */ \
+ mov r0, ip; /* get mask back. */ \
+ CDISABLE; \
+ ldmfd sp!, {r0, lr}; /* retrieve return value and address. */ \
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+# define DOCARGS_0 str lr, [sp, #-4]!;
+# define UNDOCARGS_0
+
+# define DOCARGS_1 stmfd sp!, {r0, lr};
+# define UNDOCARGS_1 ldr r0, [sp], #4;
+
+# define DOCARGS_2 stmfd sp!, {r0, r1, lr};
+# define UNDOCARGS_2 ldmfd sp!, {r0, r1};
+
+# define DOCARGS_3 stmfd sp!, {r0, r1, r2, lr};
+# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2};
+
+# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, lr};
+# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3};
+
+# define DOCARGS_5 DOCARGS_4
+# define UNDOCARGS_5 UNDOCARGS_4
+
+# ifdef IS_IN_libpthread
+# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+# define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+# define CENABLE bl PLTJMP(__libc_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__libc_disable_asynccancel)
+# define __local_multiple_threads __libc_multiple_threads
+# elif defined IS_IN_librt
+# define CENABLE bl PLTJMP(__librt_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__librt_disable_asynccancel)
+# else
+# error Unsupported library
+# endif
+
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P \
+ ldr ip, 1b; \
+2: \
+ ldr ip, [pc, ip]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE \
+ 1: .word __local_multiple_threads - 2f - 8;
+# endif
+# else
+/* There is no __local_multiple_threads for librt, so use the TCB. */
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+# else
+# define PSEUDO_PROLOGUE
+# define SINGLE_THREAD_P \
+ stmfd sp!, {r0, lr}; \
+ bl __aeabi_read_tp; \
+ ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \
+ ldmfd sp!, {r0, lr}; \
+ teq ip, #0
+# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
+# endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* For rtld, et cetera. */
+# define SINGLE_THREAD_P 1
+# define NO_CANCELLATION 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
new file mode 100644
index 0000000..ba5327a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -0,0 +1,117 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+#include <pthreadP.h>
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
+ struct _Unwind_Context *);
+static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
+static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *);
+static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *);
+
+void
+pthread_cancel_init (void)
+{
+ void *resume, *personality, *forcedunwind, *getcfa;
+ void *handle;
+ void *sjlj_register, *sjlj_unregister;
+
+ if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ return;
+
+ handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (handle == NULL
+ || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL
+ || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL
+ || (forcedunwind = __libc_dlsym (handle, "_Unwind_SjLj_ForcedUnwind"))
+ == NULL
+ || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
+ )
+ __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+ libgcc_s_forcedunwind = forcedunwind;
+ libgcc_s_getcfa = getcfa;
+ libgcc_s_sjlj_register = sjlj_register;
+ libgcc_s_sjlj_unregister = sjlj_unregister;
+}
+
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ pthread_cancel_init ();
+ libgcc_s_resume (exc);
+}
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (int version, _Unwind_Action actions,
+ _Unwind_Exception_Class exception_class,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_personality (version, actions, exception_class,
+ ue_header, context);
+}
+
+_Unwind_Reason_Code
+_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
+ void *stop_argument)
+{
+ if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_forcedunwind (exc, stop, stop_argument);
+}
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_getcfa (context);
+}
+
+void
+_Unwind_SjLj_Register (struct SjLj_Function_Context *fc)
+{
+ if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0))
+ pthread_cancel_init ();
+ libgcc_s_sjlj_register (fc);
+}
+
+void
+_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc)
+{
+ if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0))
+ pthread_cancel_init ();
+ libgcc_s_sjlj_unregister (fc);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
new file mode 100644
index 0000000..8dcfd34
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -0,0 +1,87 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
+ struct _Unwind_Context *);
+static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *);
+static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *);
+
+static void
+init (void)
+{
+ void *resume, *personality;
+ void *handle;
+ void *sjlj_register, *sjlj_unregister;
+
+ handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (handle == NULL
+ || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL
+ || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL)
+ __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+ libgcc_s_sjlj_register = sjlj_register;
+ libgcc_s_sjlj_unregister = sjlj_unregister;
+}
+
+void
+_Unwind_Resume (struct _Unwind_Exception *exc)
+{
+ if (__builtin_expect (libgcc_s_resume == NULL, 0))
+ init ();
+ libgcc_s_resume (exc);
+}
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (int version, _Unwind_Action actions,
+ _Unwind_Exception_Class exception_class,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ init ();
+ return libgcc_s_personality (version, actions, exception_class,
+ ue_header, context);
+}
+
+void
+_Unwind_SjLj_Register (struct SjLj_Function_Context *fc)
+{
+ if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0))
+ init ();
+ libgcc_s_sjlj_register (fc);
+}
+
+void
+_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc)
+{
+ if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0))
+ init ();
+ libgcc_s_sjlj_unregister (fc);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
new file mode 100644
index 0000000..8dd834e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h
@@ -0,0 +1,31 @@
+/* Exception handling and frame unwind runtime interface routines.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _ARM_UNWIND_H
+#define _ARM_UNWIND_H 1
+
+#include <sysdeps/generic/unwind.h>
+
+/* Call the SjLj versions of these functions. */
+#define _Unwind_ForcedUnwind _Unwind_SjLj_ForcedUnwind
+#define _Unwind_Resume _Unwind_SjLj_Resume
+#define __gcc_personality_v0 __gcc_personality_sj0
+
+#endif /* unwind.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02a9f771e32e1fd39f5338ad111e3adad804b6a2
commit 02a9f771e32e1fd39f5338ad111e3adad804b6a2
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Nov 16 19:03:42 2005 +0000
* sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update
include guards.
* sysdeps/unix/arm/sysdep.S (syscall_error): Handle USE___THREAD and
RTLD_PRIVATE_ERRNO.
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Handle RESET_PID.
Handle new arguments.
* sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use SAVE_PID and
RESTORE_PID. Use the right syscall error handler.
* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
(__default_sa_restorer, __default_rt_sa_restorer): Add unwind
information.
* sysdeps/unix/sysv/linux/arm/eabi/socket.S: Update formatting.
Add unwind information. Correct stack alignment typo.
* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
(INTERNAL_SYSCALL_NCS): Define.
* sysdeps/unix/sysv/linux/arm/sigaction.c
(__libc_sigaction): Remove never-valid handling for SA_ONSTACK.
* sysdeps/unix/sysv/linux/arm/socket.S: Whitespace cleanup.
* sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER): Handle
RTLD_PRIVATE_ERRNO.
(INTERNAL_SYSCALL_NCS): Implement.
* sysdeps/arm/nptl/Makefile, sysdeps/arm/nptl/jmpbuf-unwind.h,
sysdeps/arm/nptl/pthread_spin_lock.S,
sysdeps/arm/nptl/pthread_spin_trylock.S,
sysdeps/arm/nptl/pthreaddef.h, sysdeps/arm/nptl/tcb-offsets.sym,
sysdeps/arm/nptl/tls.h, sysdeps/unix/sysv/linux/arm/eabi/Makefile,
sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile,
sysdeps/unix/sysv/linux/arm/eabi/nptl/configure,
sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in,
sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c,
sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c,
sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h,
sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c,
sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c,
sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h,
sysdeps/unix/sysv/linux/arm/nptl/Versions,
sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h,
sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h,
sysdeps/unix/sysv/linux/arm/nptl/clone.S,
sysdeps/unix/sysv/linux/arm/nptl/createthread.c,
sysdeps/unix/sysv/linux/arm/nptl/fork.c,
sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c,
sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h,
sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S,
sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c,
sysdeps/unix/sysv/linux/arm/nptl/vfork.S: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 21e15ce..795b363 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,63 @@
2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/bits/setjmp.h, sysdeps/arm/fpu/bits/setjmp.h: Update
+ include guards.
+
+ * sysdeps/unix/arm/sysdep.S (syscall_error): Handle USE___THREAD and
+ RTLD_PRIVATE_ERRNO.
+
+ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Handle RESET_PID.
+ Handle new arguments.
+ * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use SAVE_PID and
+ RESTORE_PID. Use the right syscall error handler.
+
+ * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+ (__default_sa_restorer, __default_rt_sa_restorer): Add unwind
+ information.
+
+ * sysdeps/unix/sysv/linux/arm/eabi/socket.S: Update formatting.
+ Add unwind information. Correct stack alignment typo.
+
+ * sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+ (INTERNAL_SYSCALL_NCS): Define.
+
+ * sysdeps/unix/sysv/linux/arm/sigaction.c
+ (__libc_sigaction): Remove never-valid handling for SA_ONSTACK.
+
+ * sysdeps/unix/sysv/linux/arm/socket.S: Whitespace cleanup.
+
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER): Handle
+ RTLD_PRIVATE_ERRNO.
+ (INTERNAL_SYSCALL_NCS): Implement.
+
+ * sysdeps/arm/nptl/Makefile, sysdeps/arm/nptl/jmpbuf-unwind.h,
+ sysdeps/arm/nptl/pthread_spin_lock.S,
+ sysdeps/arm/nptl/pthread_spin_trylock.S,
+ sysdeps/arm/nptl/pthreaddef.h, sysdeps/arm/nptl/tcb-offsets.sym,
+ sysdeps/arm/nptl/tls.h, sysdeps/unix/sysv/linux/arm/eabi/Makefile,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/configure,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c,
+ sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h,
+ sysdeps/unix/sysv/linux/arm/nptl/Versions,
+ sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h,
+ sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h,
+ sysdeps/unix/sysv/linux/arm/nptl/clone.S,
+ sysdeps/unix/sysv/linux/arm/nptl/createthread.c,
+ sysdeps/unix/sysv/linux/arm/nptl/fork.c,
+ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c,
+ sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h,
+ sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S,
+ sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c,
+ sysdeps/unix/sysv/linux/arm/nptl/vfork.S: New files.
+
+2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM.
* sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL.
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index e0a4657..9b74906 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,10 @@
/* Define the machine-dependent type `jmp_buf'. ARM version. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -34,3 +37,5 @@ typedef int __jmp_buf[10];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+#endif
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index dd85243..0a19d2c 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,10 @@
/* Define the machine-dependent type `jmp_buf'. ARM version. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -34,3 +37,5 @@ typedef int __jmp_buf[22];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+#endif
diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile
new file mode 100644
index 0000000..0300693
--- /dev/null
+++ b/sysdeps/arm/nptl/Makefile
@@ -0,0 +1,21 @@
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/arm/nptl/jmpbuf-unwind.h
similarity index 61%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/arm/nptl/jmpbuf-unwind.h
index d68c8a5..f05e27f 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/arm/nptl/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
-#ifdef __NR_rt_sigreturn
-
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
-
-#endif
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/arm/nptl/pthread_spin_lock.S
similarity index 64%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/arm/nptl/pthread_spin_lock.S
index d68c8a5..bd6adf7 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/arm/nptl/pthread_spin_lock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,18 +18,14 @@
#include <sysdep.h>
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
-
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
-
-#ifdef __NR_rt_sigreturn
-
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
-
-#endif
+ .text
+ .align 4
+
+ENTRY (pthread_spin_lock)
+ mov r1, #1
+1: swp r2, r1, [r0]
+ teq r2, #0
+ bne 1b
+ mov r0, #0
+ PSEUDO_RET_NOERRNO
+END (pthread_spin_lock)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/arm/nptl/pthread_spin_trylock.S
similarity index 64%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/arm/nptl/pthread_spin_trylock.S
index d68c8a5..8593150 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/arm/nptl/pthread_spin_trylock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
-
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
-
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
+#define _ERRNO_H 1
+#include <bits/errno.h>
-#ifdef __NR_rt_sigreturn
-
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
+#include <sysdep.h>
-#endif
+ .text
+ .align 4
+
+ENTRY (pthread_spin_trylock)
+ mov r1, #1
+ swp r2, r1, [r0]
+ teq r2, #0
+ moveq r0, #0
+ movne r0, #EBUSY
+ PSEUDO_RET_NOERRNO
+END (pthread_spin_trylock)
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/nptl/pthreaddef.h
similarity index 55%
copy from sysdeps/arm/bits/setjmp.h
copy to sysdeps/arm/nptl/pthreaddef.h
index e0a4657..783828a 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/nptl/pthreaddef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +16,24 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. ARM version. */
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
-#ifndef _SETJMP_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
+/* Required stack pointer alignment at beginning. SSE requires 16
+ bytes. */
+#define STACK_ALIGN 16
-#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
-typedef int __jmp_buf[10];
-#endif
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 2048
-#define __JMP_BUF_SP 8
+/* Alignment requirement for TCB. */
+#define TCB_ALIGNMENT 16
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
+
+
+/* XXX Until we have a better place keep the definitions here. */
+#define __exit_thread_inline(val) \
+ INLINE_SYSCALL (exit, 1, (val))
diff --git a/sysdeps/arm/nptl/tcb-offsets.sym b/sysdeps/arm/nptl/tcb-offsets.sym
new file mode 100644
index 0000000..92cc441
--- /dev/null
+++ b/sysdeps/arm/nptl/tcb-offsets.sym
@@ -0,0 +1,11 @@
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Derive offsets relative to the thread register.
+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
+
+MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
+PID_OFFSET thread_offsetof (pid)
+TID_OFFSET thread_offsetof (tid)
diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h
new file mode 100644
index 0000000..26ef709
--- /dev/null
+++ b/sysdeps/arm/nptl/tls.h
@@ -0,0 +1,137 @@
+/* Definition for thread-local data handling. NPTL/ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H 1
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
+} dtv_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+#endif /* __ASSEMBLER__ */
+
+
+/* We require TLS support in the tools. */
+#ifndef HAVE_TLS_SUPPORT
+# error "TLS support is required."
+#endif
+
+/* Signal that TLS support is available. */
+# define USE_TLS 1
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information. */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks. */
+# define TLS_DTV_AT_TP 1
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
+
+typedef struct
+{
+ dtv_t *dtv;
+ void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN 16
+
+/* This is the size of the TCB. */
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
+
+/* This is the size we need before TCB. */
+# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN 16
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1)
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) \
+ (THREAD_DTV() = (dtv))
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))->dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(tcbp, secondcall) \
+ ({ INTERNAL_SYSCALL_DECL (err); \
+ long result_var; \
+ result_var = INTERNAL_SYSCALL_ARM (set_tls, err, 1, (tcbp)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; })
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
+
+/* Return the thread descriptor for the current thread. */
+# define THREAD_SELF \
+ ((struct pthread *)__builtin_thread_pointer () - 1)
+
+/* Magic for libthread_db to know how to do THREAD_SELF. */
+# define DB_THREAD_SELF \
+ CONST_THREAD_AREA (32, sizeof (struct pthread))
+
+/* Access to data in the thread descriptor is easy. */
+#define THREAD_GETMEM(descr, member) \
+ descr->member
+#define THREAD_GETMEM_NC(descr, member, idx) \
+ descr->member[idx]
+#define THREAD_SETMEM(descr, member, value) \
+ descr->member = (value)
+#define THREAD_SETMEM_NC(descr, member, idx, value) \
+ descr->member[idx] = (value)
+
+/* Initializing the thread pointer will generate a SIGILL if the syscall
+ is not available. */
+#define TLS_INIT_TP_EXPENSIVE 1
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 4810805..dcb427e 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -1,4 +1,6 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,2002,03 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003,
+ 2004, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +22,11 @@
#define _ERRNO_H
#include <bits/errno.h>
-.globl C_SYMBOL_NAME(errno)
-.globl syscall_error
+#ifdef IS_IN_rtld
+# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
+#endif
+
+#include <tls.h>
#undef syscall_error
#ifdef NO_UNDERSCORES
@@ -37,7 +42,29 @@ syscall_error:
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
-#ifdef _LIBC_REENTRANT
+#if USE___THREAD
+ mov ip, lr
+ mov r1, r0
+
+ mov r0, #0xffff0fff
+ mov lr, pc
+ sub pc, r0, #31
+
+ ldr r2, 1f
+2: ldr r2, [pc, r2]
+ str r1, [r0, r2]
+ mvn r0, #0
+ RETINSTR (, ip)
+
+1: .word errno(gottpoff) + (. - 2b - 8)
+#elif RTLD_PRIVATE_ERRNO
+ ldr r1, 1f
+0: str r0, [pc, r1]
+ mvn r0, $0
+ DO_RET(r14)
+
+1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8
+#elif defined(_LIBC_REENTRANT)
str lr, [sp, #-4]!
str r0, [sp, #-4]!
bl PLTJMP(C_SYMBOL_NAME(__errno_location))
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index b46281c..6c8f8e8 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -25,7 +25,11 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+#define CLONE_VM 0x00000100
+#define CLONE_THREAD 0x00010000
+
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
+ pid_t *ptid, struct user_desc *tls, pid_t *ctid); */
.text
ENTRY(__clone)
@@ -42,16 +46,58 @@ ENTRY(__clone)
@ do the system call
@ get flags
mov r0, r2
+#ifdef RESET_PID
+ mov ip, r2
+#endif
@ new sp is already in r1
- DO_CALL (clone, 0)
- movs a1, a1
+#ifdef __ARM_EABI__
+ stmfd sp!, {r4, r7}
+#else
+ str r4, [sp, #-8]!
+#endif
+ ldr r2, [sp, #8]
+ ldr r3, [sp, #12]
+ ldr r4, [sp, #16]
+#ifdef __ARM_EABI__
+ ldr r7, =SYS_ify(clone)
+ swi 0x0
+#else
+ swi SYS_ify(clone)
+#endif
+ cmp r0, #0
+ beq 1f
+#ifdef __ARM_EABI__
+ ldmfd sp!, {r4, r7}
+#else
+ ldr r4, [sp], #8
+#endif
blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
- RETINSTR(ne, lr)
+ RETINSTR(, lr)
+1:
+#ifdef RESET_PID
+ tst ip, #CLONE_THREAD
+ bne 3f
+ mov r0, #0xffff0fff
+ mov lr, pc
+ sub pc, r0, #31
+ mov r1, r0
+ tst ip, #CLONE_VM
+ movne r0, #-1
+#ifdef __ARM_EABI__
+ ldr r7, =SYS_ify(getpid)
+ swieq 0x0
+#else
+ swieq SYS_ify(getpid)
+#endif
+ str r0, [r1, #PID_OFFSET]
+ str r0, [r1, #TID_OFFSET]
+3:
+#endif
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
mov lr, pc
- ldr pc, [sp]
+ ldr pc, [sp], #8
@ and we are done, passing the return value through r0
b PLTJMP(_exit)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile
new file mode 100644
index 0000000..d3c02a2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile
@@ -0,0 +1,6 @@
+ifeq ($(subdir),csu)
+# In order for unwinding to fail when it falls out of main, we need a
+# cantunwind marker. There's one in start.S. To make sure we reach it, add
+# unwind tables for __libc_start_main.
+CFLAGS-libc-start.c += -fexceptions
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile
new file mode 100644
index 0000000..ef8076c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile
@@ -0,0 +1,17 @@
+ifeq ($(subdir),rt)
+librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1
+librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1
+libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1
+
+# This test relies on compiling part of the binary with EH information,
+# part without, and unwinding through. The .ARM.exidx tables have
+# start addresses for EH regions, but no end addresses. Every
+# region an exception needs to propogate through must have unwind
+# information, or a previous function's unwind table may be used
+# by mistake.
+tests := $(filter-out tst-cleanupx4,$(tests))
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure
new file mode 100644
index 0000000..5182699
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+
+libc_cv_gcc_exceptions=yes
+exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in
new file mode 100644
index 0000000..22f6f4b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in
@@ -0,0 +1,8 @@
+dnl configure fragment for NPTL and ARM/Linux EABI.
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+dnl The normal configure check for gcc -fexecptions fails because it can't
+dnl find __aeabi_unwind_cpp_pr0. Work around this here; our GCC definitely
+dnl has -fexceptions.
+libc_cv_gcc_exceptions=yes
+exceptions=-fexceptions
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..5e89399
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
@@ -0,0 +1,149 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+/* NOTE: We do mark syscalls with unwind annotations, for the benefit of
+ cancellation; but they're really only accurate at the point of the
+ syscall. The ARM unwind directives are not rich enough without adding
+ a custom personality function. */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .section ".text"; \
+ PSEUDO_PROLOGUE; \
+ .type __##syscall_name##_nocancel,%function; \
+ .globl __##syscall_name##_nocancel; \
+ __##syscall_name##_nocancel: \
+ DO_CALL (syscall_name, args); \
+ PSEUDO_RET; \
+ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
+ ENTRY (name); \
+ SINGLE_THREAD_P; \
+ DOARGS_##args; \
+ bne .Lpseudo_cancel; \
+ DO_CALL (syscall_name, 0); \
+ UNDOARGS_##args; \
+ cmn r0, $4096; \
+ PSEUDO_RET; \
+ .Lpseudo_cancel: \
+ .fnstart; \
+ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
+ CENABLE; \
+ mov ip, r0; /* put mask in safe place. */ \
+ UNDOCARGS_##args; /* restore syscall args. */ \
+ ldr r7, =SYS_ify (syscall_name); \
+ swi 0x0; /* do the call. */ \
+ .fnend; /* Past here we can't easily unwind. */ \
+ mov r7, r0; /* save syscall return value. */ \
+ mov r0, ip; /* get mask back. */ \
+ CDISABLE; \
+ mov r0, r7; /* retrieve return value. */ \
+ RESTORE_LR_##args; \
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+ otherwise. In order to preserve doubleword alignment, sometimes we must
+ save an extra register. */
+
+# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
+
+# define DOCARGS_0 stmfd sp!, {r7, lr}; .save {r7, lr}
+# define UNDOCARGS_0
+# define RESTORE_LR_0 ldmfd sp!, {r7, lr};
+
+# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
+# define UNDOCARGS_1 ldr r0, [sp], #8; RESTART_UNWIND
+# define RESTORE_LR_1 RESTORE_LR_0
+
+# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
+# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; RESTART_UNWIND
+# define RESTORE_LR_2 RESTORE_LR_0
+
+# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
+# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
+# define RESTORE_LR_3 RESTORE_LR_0
+
+# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
+# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
+# define RESTORE_LR_4 RESTORE_LR_0
+
+# define DOCARGS_5 .save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, lr}; .pad #20
+# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
+# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
+# ifdef IS_IN_libpthread
+# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+# define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+# define CENABLE bl PLTJMP(__libc_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__libc_disable_asynccancel)
+# define __local_multiple_threads __libc_multiple_threads
+# elif defined IS_IN_librt
+# define CENABLE bl PLTJMP(__librt_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__librt_disable_asynccancel)
+# else
+# error Unsupported library
+# endif
+
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P \
+ ldr ip, 1b; \
+2: \
+ ldr ip, [pc, ip]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE \
+ 1: .word __local_multiple_threads - 2f - 8;
+# endif
+# else
+/* There is no __local_multiple_threads for librt, so use the TCB. */
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+# else
+# define PSEUDO_PROLOGUE
+# define SINGLE_THREAD_P \
+ stmfd sp!, {r0, lr}; \
+ bl __aeabi_read_tp; \
+ ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \
+ ldmfd sp!, {r0, lr}; \
+ teq ip, #0
+# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
+# endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* For rtld, et cetera. */
+# define SINGLE_THREAD_P 1
+# define NO_CANCELLATION 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
new file mode 100644
index 0000000..ca1cc8d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
@@ -0,0 +1,113 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+#include <pthreadP.h>
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+ (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
+static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *);
+
+void
+pthread_cancel_init (void)
+{
+ void *resume, *personality, *forcedunwind, *getcfa;
+ void *handle;
+
+ if (__builtin_expect (libgcc_s_getcfa != NULL, 1))
+ return;
+
+ handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (handle == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL
+ || (forcedunwind = __libc_dlsym (handle, "_Unwind_ForcedUnwind"))
+ == NULL
+ || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL
+#ifdef ARCH_CANCEL_INIT
+ || ARCH_CANCEL_INIT (handle)
+#endif
+ )
+ __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+ libgcc_s_forcedunwind = forcedunwind;
+ libgcc_s_getcfa = getcfa;
+}
+
+/* It's vitally important that _Unwind_Resume not have a stack frame; the
+ ARM unwinder relies on register state at entrance. So we write this in
+ assembly. */
+
+asm (
+" .globl _Unwind_Resume\n"
+" .type _Unwind_Resume, %function\n"
+"_Unwind_Resume:\n"
+" stmfd sp!, {r4, r5, r6, lr}\n"
+" ldr r4, 1f\n"
+" ldr r5, 2f\n"
+"3: add r4, pc, r4\n"
+" ldr r3, [r4, r5]\n"
+" mov r6, r0\n"
+" cmp r3, #0\n"
+" beq 4f\n"
+"5: mov r0, r6\n"
+" ldmfd sp!, {r4, r5, r6, lr}\n"
+" bx r3\n"
+"4: bl pthread_cancel_init\n"
+" ldr r3, [r4, r5]\n"
+" b 5b\n"
+"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+"2: .word libgcc_s_resume(GOTOFF)\n"
+" .size _Unwind_Resume, .-_Unwind_Resume\n"
+);
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (_Unwind_State state,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_personality (state, ue_header, context);
+}
+
+_Unwind_Reason_Code
+_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
+ void *stop_argument)
+{
+ if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_forcedunwind (exc, stop, stop_argument);
+}
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_getcfa == NULL, 0))
+ pthread_cancel_init ();
+ return libgcc_s_getcfa (context);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
new file mode 100644
index 0000000..a9c9d18
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
@@ -0,0 +1,82 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdio.h>
+#include <unwind.h>
+
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+
+static void init (void) __attribute_used__;
+
+static void
+init (void)
+{
+ void *resume, *personality;
+ void *handle;
+
+ handle = __libc_dlopen ("libgcc_s.so.1");
+
+ if (handle == NULL
+ || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
+ || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
+ __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
+
+ libgcc_s_resume = resume;
+ libgcc_s_personality = personality;
+}
+
+/* It's vitally important that _Unwind_Resume not have a stack frame; the
+ ARM unwinder relies on register state at entrance. So we write this in
+ assembly. */
+
+asm (
+" .globl _Unwind_Resume\n"
+" .type _Unwind_Resume, %function\n"
+"_Unwind_Resume:\n"
+" stmfd sp!, {r4, r5, r6, lr}\n"
+" ldr r4, 1f\n"
+" ldr r5, 2f\n"
+"3: add r4, pc, r4\n"
+" ldr r3, [r4, r5]\n"
+" mov r6, r0\n"
+" cmp r3, #0\n"
+" beq 4f\n"
+"5: mov r0, r6\n"
+" ldmfd sp!, {r4, r5, r6, lr}\n"
+" bx r3\n"
+"4: bl init\n"
+" ldr r3, [r4, r5]\n"
+" b 5b\n"
+"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
+"2: .word libgcc_s_resume(GOTOFF)\n"
+" .size _Unwind_Resume, .-_Unwind_Resume\n"
+);
+
+_Unwind_Reason_Code
+__gcc_personality_v0 (_Unwind_State state,
+ struct _Unwind_Exception *ue_header,
+ struct _Unwind_Context *context)
+{
+ if (__builtin_expect (libgcc_s_personality == NULL, 0))
+ init ();
+ return libgcc_s_personality (state, ue_header, context);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
new file mode 100644
index 0000000..d625fb2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h
@@ -0,0 +1,274 @@
+/* Header file for the ARM EABI unwinder
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Contributed by Paul Brook
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option) any
+ later version.
+
+ In addition to the permissions in the GNU General Public License, the
+ Free Software Foundation gives you unlimited permission to link the
+ compiled version of this file into combinations with other programs,
+ and to distribute those combinations without any restriction coming
+ from the use of this file. (The General Public License restrictions
+ do apply in other respects; for example, they cover modification of
+ the file, and distribution when not linked into a combine
+ executable.)
+
+ This file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* Language-independent unwinder header public defines. This contains both
+ ABI defined objects, and GNU support routines. */
+
+#ifndef UNWIND_ARM_H
+#define UNWIND_ARM_H
+
+#define __ARM_EABI_UNWINDER__ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+ typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
+ typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
+ typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
+ typedef _Unwind_Word _uw;
+ typedef unsigned _uw64 __attribute__((mode(__DI__)));
+ typedef unsigned _uw16 __attribute__((mode(__HI__)));
+ typedef unsigned _uw8 __attribute__((mode(__QI__)));
+
+ typedef enum
+ {
+ _URC_OK = 0, /* operation completed successfully */
+ _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
+ _URC_END_OF_STACK = 5,
+ _URC_HANDLER_FOUND = 6,
+ _URC_INSTALL_CONTEXT = 7,
+ _URC_CONTINUE_UNWIND = 8,
+ _URC_FAILURE = 9 /* unspecified failure of some kind */
+ }
+ _Unwind_Reason_Code;
+
+ typedef enum
+ {
+ _US_VIRTUAL_UNWIND_FRAME = 0,
+ _US_UNWIND_FRAME_STARTING = 1,
+ _US_UNWIND_FRAME_RESUME = 2,
+ _US_ACTION_MASK = 3,
+ _US_FORCE_UNWIND = 8,
+ _US_END_OF_STACK = 16
+ }
+ _Unwind_State;
+
+ /* Provided only for for compatibility with existing code. */
+ typedef int _Unwind_Action;
+#define _UA_SEARCH_PHASE 1
+#define _UA_CLEANUP_PHASE 2
+#define _UA_HANDLER_FRAME 4
+#define _UA_FORCE_UNWIND 8
+#define _UA_END_OF_STACK 16
+#define _URC_NO_REASON _URC_OK
+
+ typedef struct _Unwind_Control_Block _Unwind_Control_Block;
+ typedef struct _Unwind_Context _Unwind_Context;
+ typedef _uw _Unwind_EHT_Header;
+
+
+ /* UCB: */
+
+ struct _Unwind_Control_Block
+ {
+#ifdef _LIBC
+ /* For the benefit of code which assumes this is a scalar. All
+ glibc ever does is clear it. */
+ _uw64 exception_class;
+#else
+ char exception_class[8];
+#endif
+ void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
+ /* Unwinder cache, private fields for the unwinder's use */
+ struct
+ {
+ _uw reserved1; /* Forced unwind stop fn, 0 if not forced */
+ _uw reserved2; /* Personality routine address */
+ _uw reserved3; /* Saved callsite address */
+ _uw reserved4; /* Forced unwind stop arg */
+ _uw reserved5;
+ }
+ unwinder_cache;
+ /* Propagation barrier cache (valid after phase 1): */
+ struct
+ {
+ _uw sp;
+ _uw bitpattern[5];
+ }
+ barrier_cache;
+ /* Cleanup cache (preserved over cleanup): */
+ struct
+ {
+ _uw bitpattern[4];
+ }
+ cleanup_cache;
+ /* Pr cache (for pr's benefit): */
+ struct
+ {
+ _uw fnstart; /* function start address */
+ _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
+ _uw additional; /* additional data */
+ _uw reserved1;
+ }
+ pr_cache;
+ long long int :0; /* Force alignment to 8-byte boundary */
+ };
+
+ /* Virtual Register Set*/
+
+ typedef enum
+ {
+ _UVRSC_CORE = 0, /* integer register */
+ _UVRSC_VFP = 1, /* vfp */
+ _UVRSC_FPA = 2, /* fpa */
+ _UVRSC_WMMXD = 3, /* Intel WMMX data register */
+ _UVRSC_WMMXC = 4 /* Intel WMMX control register */
+ }
+ _Unwind_VRS_RegClass;
+
+ typedef enum
+ {
+ _UVRSD_UINT32 = 0,
+ _UVRSD_VFPX = 1,
+ _UVRSD_FPAX = 2,
+ _UVRSD_UINT64 = 3,
+ _UVRSD_FLOAT = 4,
+ _UVRSD_DOUBLE = 5
+ }
+ _Unwind_VRS_DataRepresentation;
+
+ typedef enum
+ {
+ _UVRSR_OK = 0,
+ _UVRSR_NOT_IMPLEMENTED = 1,
+ _UVRSR_FAILED = 2
+ }
+ _Unwind_VRS_Result;
+
+ /* Frame unwinding state. */
+ typedef struct
+ {
+ /* The current word (bytes packed msb first). */
+ _uw data;
+ /* Pointer to the next word of data. */
+ _uw *next;
+ /* The number of bytes left in this word. */
+ _uw8 bytes_left;
+ /* The number of words pointed to by ptr. */
+ _uw8 words_left;
+ }
+ __gnu_unwind_state;
+
+ typedef _Unwind_Reason_Code (*personality_routine) (_Unwind_State,
+ _Unwind_Control_Block *, _Unwind_Context *);
+
+ _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *, _Unwind_VRS_RegClass,
+ _uw, _Unwind_VRS_DataRepresentation,
+ void *);
+
+ _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *, _Unwind_VRS_RegClass,
+ _uw, _Unwind_VRS_DataRepresentation,
+ void *);
+
+ _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *, _Unwind_VRS_RegClass,
+ _uw, _Unwind_VRS_DataRepresentation);
+
+
+ /* Support functions for the PR. */
+#define _Unwind_Exception _Unwind_Control_Block
+ typedef char _Unwind_Exception_Class[8];
+
+ void * _Unwind_GetLanguageSpecificData (_Unwind_Context *);
+ _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *);
+
+ /* These two should never be used. */
+ _Unwind_Ptr _Unwind_GetDataRelBase (_Unwind_Context *);
+ _Unwind_Ptr _Unwind_GetTextRelBase (_Unwind_Context *);
+
+ /* Interface functions: */
+ _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
+ void __attribute__((noreturn)) _Unwind_Resume(_Unwind_Control_Block *ucbp);
+ _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (_Unwind_Control_Block *ucbp);
+
+ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
+ (int, _Unwind_Action, _Unwind_Exception_Class,
+ _Unwind_Control_Block *, struct _Unwind_Context *, void *);
+ _Unwind_Reason_Code _Unwind_ForcedUnwind (_Unwind_Control_Block *,
+ _Unwind_Stop_Fn, void *);
+ _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
+ void _Unwind_Complete(_Unwind_Control_Block *ucbp);
+ void _Unwind_DeleteException (_Unwind_Exception *);
+
+ _Unwind_Reason_Code __gnu_unwind_frame (_Unwind_Control_Block *,
+ _Unwind_Context *);
+ _Unwind_Reason_Code __gnu_unwind_execute (_Unwind_Context *,
+ __gnu_unwind_state *);
+
+ /* Decode an R_ARM_TARGET2 relocation. */
+ static inline _Unwind_Word
+ _Unwind_decode_target2 (_Unwind_Word ptr)
+ {
+ _Unwind_Word tmp;
+
+ tmp = *(_Unwind_Word *) ptr;
+ /* Zero values are always NULL. */
+ if (!tmp)
+ return 0;
+
+#if defined(linux) || defined(__NetBSD__)
+ /* Pc-relative indirect. */
+ tmp += ptr;
+ tmp = *(_Unwind_Word *) tmp;
+#elif defined(__symbian__)
+ /* Absolute pointer. Nothing more to do. */
+#else
+ /* Pc-relative pointer. */
+ tmp += ptr;
+#endif
+ return tmp;
+ }
+
+ static inline _Unwind_Word
+ _Unwind_GetGR (_Unwind_Context *context, int regno)
+ {
+ _uw val;
+ _Unwind_VRS_Get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+ return val;
+ }
+
+ /* Return the address of the instruction, not the actual IP value. */
+#define _Unwind_GetIP(context) \
+ (_Unwind_GetGR (context, 15) & ~(_Unwind_Word)1)
+
+ static inline void
+ _Unwind_SetGR (_Unwind_Context *context, int regno, _Unwind_Word val)
+ {
+ _Unwind_VRS_Set (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &val);
+ }
+
+ /* The dwarf unwinder doesn't understand arm/thumb state. We assume the
+ landing pad uses the same instruction set as the call site. */
+#define _Unwind_SetIP(context, val) \
+ _Unwind_SetGR (context, 15, val | (_Unwind_GetGR (context, 15) & 1))
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* defined UNWIND_ARM_H */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
index d68c8a5..543d48c 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
@@ -20,16 +20,35 @@
/* If no SA_RESTORER function was specified by the application we use
one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
+ instruction on the stack, which would involve expensive cache flushes.
+ Nowadays (2.6 series, and somewhat earlier) the kernel uses a high page
+ for signal trampolines, so the cache flushes are not an issue. But since
+ we do not have a vDSO, continue to use these so that we can provide
+ unwind information.
+
+ Start the unwind tables at least one instruction before the signal
+ trampoline, because the unwinder will assume we are returning after
+ a call site. */
+
+ .fnstart
+ .save {r0-r15}
+ .pad #12
+ nop
ENTRY(__default_sa_restorer)
mov r7, $SYS_ify(sigreturn)
swi 0x0
+ .fnend
#ifdef __NR_rt_sigreturn
+ .fnstart
+ .save {r0-r15}
+ .pad #168
+ nop
ENTRY(__default_rt_sa_restorer)
mov r7, $SYS_ify(rt_sigreturn)
swi 0x0
+ .fnend
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S
index 7fa2b1e..f614213 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/eabi/socket.S
@@ -33,19 +33,19 @@
The .S files for the other calls just #define socket and #include this. */
#ifndef __socket
-#ifndef NO_WEAK_ALIAS
-#define __socket P(__,socket)
-#else
-#define __socket socket
-#endif
+# ifndef NO_WEAK_ALIAS
+# define __socket P(__,socket)
+# else
+# define __socket socket
+# endif
#endif
-#define PUSHARGS_1 str a1, [sp, $-8]!
-#define PUSHARGS_2 stmfd sp!, {a1, a2}
-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4} /* a4 pushed for padding */
-#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}
-#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
-#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}
+#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8
+#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8
+#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */
+#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16
+#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */
+#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16
#define POPARGS_1 add sp, sp, #8
#define POPARGS_2 add sp, sp, #8
@@ -64,6 +64,8 @@
.globl __socket
ENTRY (__socket)
+ .fnstart
+
/* This code previously moved sp into ip and stored the args using
stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
to be restored after the syscall completed. It saved an
@@ -98,11 +100,12 @@ ENTRY (__socket)
#if defined NEED_CANCELLATION && defined CENABLE
1:
stmfd sp!, {r7, lr}
+ .save {r7, lr}
CENABLE
mov ip, r0
mov r0, #P(SOCKOP_,socket)
- add r1, sp, #4
+ add r1, sp, #8
mov r7, #SYS_ify(socketcall)
swi 0x0
@@ -120,6 +123,7 @@ ENTRY (__socket)
b PLTJMP(SYSCALL_ERROR)
#endif
+ .fnend
PSEUDO_END (__socket)
#ifndef NO_WEAK_ALIAS
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
index 84a4f04..7f5ded5 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -48,6 +48,11 @@
: "memory"); \
_a1; })
+/* For EABI, non-constant syscalls are actually pretty easy... */
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW (number, err, nr, args)
+
/* We must save and restore r7 (call-saved) for the syscall number.
We never make function calls from inside here (only potentially
signal handlers), so we do not bother with doubleword alignment.
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Versions b/sysdeps/unix/sysv/linux/arm/nptl/Versions
new file mode 100644
index 0000000..c74a06f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # A copy of sigaction lives in NPTL, and needs these.
+ __default_sa_restorer; __default_rt_sa_restorer;
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
new file mode 100644
index 0000000..71ed714
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
@@ -0,0 +1,95 @@
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdint.h>
+#include <sysdep.h>
+
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+void __arm_link_error (void);
+
+#define atomic_exchange_acq(mem, newvalue) \
+ ({ __typeof (*mem) result; \
+ if (sizeof (*mem) == 1) \
+ __asm__ __volatile__ ("swpb %0, %1, [%2]" \
+ : "=&r,&r" (result) \
+ : "r,0" (newvalue), "r,r" (mem) : "memory"); \
+ else if (sizeof (*mem) == 4) \
+ __asm__ __volatile__ ("swp %0, %1, [%2]" \
+ : "=&r,&r" (result) \
+ : "r,0" (newvalue), "r,r" (mem) : "memory"); \
+ else \
+ { \
+ result = 0; \
+ abort (); \
+ } \
+ result; })
+
+/* Atomic compare and exchange. This sequence relies on the kernel to
+ provide a compare and exchange operation which is atomic on the
+ current architecture, either via cleverness on pre-ARMv6 or via
+ ldrex / strex on ARMv6. */
+
+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+/* It doesn't matter what register is used for a_oldval2, but we must
+ specify one to work around GCC PR rtl-optimization/21223. Otherwise
+ it may cause a_oldval or a_tmp to be moved to a different register. */
+
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ register __typeof (oldval) a_oldval asm ("r0"); \
+ register __typeof (oldval) a_newval asm ("r1") = (newval); \
+ register __typeof (mem) a_ptr asm ("r2") = (mem); \
+ register __typeof (oldval) a_tmp asm ("r3"); \
+ register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
+ __asm__ __volatile__ \
+ ("0:\tldr\t%1,[%3]\n\t" \
+ "cmp\t%1, %4\n\t" \
+ "bne\t1f\n\t" \
+ "mov\t%0, %4\n\t" \
+ "mov\t%1, #0xffff0fff\n\t" \
+ "mov\tlr, pc\n\t" \
+ "add\tpc, %1, #(0xffff0fc0 - 0xffff0fff)\n\t" \
+ "bcc\t0b\n\t" \
+ "mov\t%1, %4\n\t" \
+ "1:" \
+ : "=&r" (a_oldval), "=&r" (a_tmp) \
+ : "r" (a_newval), "r" (a_ptr), "r" (a_oldval2) \
+ : "ip", "lr", "cc", "memory"); \
+ a_tmp; })
+
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
new file mode 100644
index 0000000..fb0fe3f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
@@ -0,0 +1,157 @@
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H 1
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+
+/* Thread identifiers. The structure of the attribute type is not
+ exposed on purpose. */
+typedef unsigned long int pthread_t;
+
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_ATTR_T];
+ long int __align;
+} pthread_attr_t;
+
+
+/* Data structures for mutex handling. The structure of the attribute
+ type is not exposed on purpose. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility. */
+ int __kind;
+ unsigned int __nusers;
+ int __spins;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_MUTEX_T];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+ long int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling. The structure of
+ the attribute type is not exposed on purpose. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __futex;
+ unsigned long long int __total_seq;
+ unsigned long long int __wakeup_seq;
+ unsigned long long int __woken_seq;
+ void *__mutex;
+ unsigned int __nwaiters;
+ unsigned int __broadcast_seq;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_COND_T];
+ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+ long int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Data structure for read-write lock variable handling. The
+ structure of the attribute type is not exposed on purpose. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned int __flags;
+ int __writer;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+ long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type. */
+typedef volatile int pthread_spinlock_t;
+
+
+/* POSIX barriers data type. The structure of the type is
+ deliberately not exposed. */
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIER_T];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+ int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#endif /* bits/pthreadtypes.h */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
similarity index 63%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
index d68c8a5..3fc647d 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
+#define __SIZEOF_SEM_T 16
-#ifdef __NR_rt_sigreturn
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
-#endif
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t;
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/clone.S b/sysdeps/unix/sysv/linux/arm/nptl/clone.S
new file mode 100644
index 0000000..23750b3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/clone.S
@@ -0,0 +1,3 @@
+#define RESET_PID
+#include <tcb-offsets.h>
+#include "../clone.S"
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c
similarity index 57%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/unix/sysv/linux/arm/nptl/createthread.c
index d68c8a5..01bd8ce 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/nptl/createthread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -8,7 +8,7 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
@@ -16,20 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+/* Value passed to 'clone' for initialization of the thread register. */
+#define TLS_VALUE (pd + 1)
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
-
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
-
-#ifdef __NR_rt_sigreturn
-
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
-
-#endif
+/* Get the real implementation. */
+#include <nptl/sysdeps/pthread/createthread.c>
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/nptl/fork.c
similarity index 64%
copy from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
copy to sysdeps/unix/sysv/linux/arm/nptl/fork.c
index d68c8a5..310676f 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/nptl/fork.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Phil Blundell <pb@nexus.co.uk>, 2005
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,20 +17,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sched.h>
+#include <signal.h>
#include <sysdep.h>
+#include <tls.h>
-/* If no SA_RESTORER function was specified by the application we use
- one of these. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
-ENTRY(__default_sa_restorer)
- mov r7, $SYS_ify(sigreturn)
- swi 0x0
+#define ARCH_FORK() \
+ INLINE_SYSCALL (clone, 5, \
+ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
+ NULL, NULL, NULL, &THREAD_SELF->tid)
-#ifdef __NR_rt_sigreturn
-
-ENTRY(__default_rt_sa_restorer)
- mov r7, $SYS_ify(rt_sigreturn)
- swi 0x0
-
-#endif
+#include <nptl/sysdeps/unix/sysv/linux/fork.c>
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
new file mode 100644
index 0000000..e0643a9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.c
@@ -0,0 +1,118 @@
+/* low level locking for pthread library. Generic futex-using version.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sysdep.h>
+#include <lowlevellock.h>
+#include <sys/time.h>
+
+int
+__lll_timedlock_wait (int *futex, const struct timespec *abstime)
+{
+ struct timespec rt;
+
+ /* Reject invalid timeouts. */
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ /* Upgrade the lock. */
+ if (atomic_exchange_acq (futex, 2) == 0)
+ return 0;
+
+ do
+ {
+ struct timeval tv;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ lll_futex_timed_wait (futex, 2, &rt);
+ }
+ while (atomic_exchange_acq (futex, 2) != 0);
+
+ return 0;
+}
+
+
+/* These don't get included in libc.so */
+#ifdef IS_IN_libpthread
+int
+lll_unlock_wake_cb (int *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+
+ return 0;
+}
+
+
+int
+__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
+{
+ int tid;
+
+ if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+ return EINVAL;
+
+ /* Repeat until thread terminated. */
+ while ((tid = *tidp) != 0)
+ {
+ struct timeval tv;
+ struct timespec rt;
+
+ /* Get the current time. */
+ (void) __gettimeofday (&tv, NULL);
+
+ /* Compute relative timeout. */
+ rt.tv_sec = abstime->tv_sec - tv.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
+ if (rt.tv_nsec < 0)
+ {
+ rt.tv_nsec += 1000000000;
+ --rt.tv_sec;
+ }
+
+ /* Already timed out? */
+ if (rt.tv_sec < 0)
+ return ETIMEDOUT;
+
+ /* Wait until thread terminates. */
+ if (lll_futex_timed_wait (tidp, tid, &rt) == -ETIMEDOUT)
+ return ETIMEDOUT;
+ }
+
+ return 0;
+}
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
new file mode 100644
index 0000000..7f1c291
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -0,0 +1,268 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Libr \ary; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LOWLEVELLOCK_H
+#define _LOWLEVELLOCK_H 1
+
+#include <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <atomic.h>
+#include <sysdep.h>
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
+
+/* Initializer for compatibility lock. */
+#define LLL_MUTEX_LOCK_INITIALIZER (0)
+
+#define lll_futex_wait(futexp, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), 0); \
+ __ret; \
+ })
+
+#define lll_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
+ __ret; \
+ })
+
+#define lll_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE, (nr), 0); \
+ __ret; \
+ })
+
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
+ (nr_move), (mutex), (val)); \
+ __ret; \
+ })
+
+
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_WAKE_OP, (nr_wake), \
+ (nr_wake2), (futexp2), \
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
+ __ret; \
+ })
+
+
+static inline int __attribute__((always_inline))
+__lll_mutex_trylock (int *futex)
+{
+ int flag = 1, old;
+ asm volatile (
+ "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
+ "\tcmp %[old], #1 @ check old lock value\n"
+ "\tmovlo %[flag], #0 @ if we got it, return 0\n"
+ "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
+ " @ restore the contested flag,\n"
+ " @ and check whether that won."
+ : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
+ : : "memory" );
+
+ return flag;
+}
+#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+
+
+static inline int __attribute__((always_inline))
+__lll_mutex_cond_trylock (int *futex)
+{
+ int flag = 2, old;
+ asm volatile (
+ "\tswp %[old], %[flag], [%[futex]] @ try to take the lock\n"
+ "\tcmp %[old], #1 @ check old lock value\n"
+ "\tmovlo %[flag], #0 @ if we got it, return 0\n"
+ "\tswphi %[flag], %[old], [%[futex]] @ if it was contested,\n"
+ " @ restore the contested flag,\n"
+ " @ and check whether that won."
+ : [futex] "+&r" (futex), [flag] "+&r" (flag), [old] "=&r" (old)
+ : : "memory" );
+
+ return flag;
+}
+#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+
+
+extern void __lll_mutex_lock_outlined (int *futex) attribute_hidden;
+
+static inline void __attribute__((always_inline))
+__lll_mutex_lock (int *futex)
+{
+ int val = atomic_exchange_acq (futex, 1);
+
+ if (__builtin_expect (val != 0, 0))
+ {
+ while (atomic_exchange_acq (futex, 2) != 0)
+ lll_futex_wait (futex, 2);
+ }
+}
+#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_cond_lock (int *futex)
+{
+ int val = atomic_exchange_acq (futex, 2);
+
+ if (__builtin_expect (val != 0, 0))
+ {
+ while (atomic_exchange_acq (futex, 2) != 0)
+ lll_futex_wait (futex, 2);
+ }
+}
+#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+
+
+extern int __lll_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
+
+extern int __lll_mutex_timedlock_outlined (int *futex,
+ const struct timespec *)
+ attribute_hidden;
+
+static inline int __attribute__ ((always_inline))
+__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
+{
+ int result = 0;
+ int val = atomic_exchange_acq (futex, 1);
+
+ if (__builtin_expect (val != 0, 0))
+ result = __lll_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_mutex_timedlock(futex, abstime) \
+ __lll_mutex_timedlock (&(futex), abstime)
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock (int *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock_force (int *futex)
+{
+ (void) atomic_exchange_rel (futex, 0);
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+
+
+#define lll_mutex_islocked(futex) \
+ (futex != 0)
+
+
+/* Our internal lock implementation is identical to the binary-compatible
+ mutex implementation. */
+
+/* Type for lock object. */
+typedef int lll_lock_t;
+
+/* Initializers for lock. */
+#define LLL_LOCK_INITIALIZER (0)
+#define LLL_LOCK_INITIALIZER_LOCKED (1)
+
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
+/* The states of a lock are:
+ 0 - untaken
+ 1 - taken by one user
+ >1 - taken by more users */
+
+#define lll_trylock(lock) lll_mutex_trylock (lock)
+#define lll_lock(lock) lll_mutex_lock (lock)
+#define lll_unlock(lock) lll_mutex_unlock (lock)
+#define lll_islocked(lock) lll_mutex_islocked (lock)
+
+/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+ wakeup when the clone terminates. The memory location contains the
+ thread ID while the clone is running and is reset to zero
+ afterwards. */
+#define lll_wait_tid(tid) \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid); \
+ } while (0)
+
+extern int __lll_timedwait_tid (int *, const struct timespec *)
+ attribute_hidden;
+
+#define lll_timedwait_tid(tid, abstime) \
+ ({ \
+ int __res = 0; \
+ if ((tid) != 0) \
+ __res = __lll_timedwait_tid (&(tid), (abstime)); \
+ __res; \
+ })
+
+
+/* Conditional variable handling. */
+
+extern void __lll_cond_wait (pthread_cond_t *cond)
+ attribute_hidden;
+extern int __lll_cond_timedwait (pthread_cond_t *cond,
+ const struct timespec *abstime)
+ attribute_hidden;
+extern void __lll_cond_wake (pthread_cond_t *cond)
+ attribute_hidden;
+extern void __lll_cond_broadcast (pthread_cond_t *cond)
+ attribute_hidden;
+
+#define lll_cond_wait(cond) \
+ __lll_cond_wait (cond)
+#define lll_cond_timedwait(cond, abstime) \
+ __lll_cond_timedwait (cond, abstime)
+#define lll_cond_wake(cond) \
+ __lll_cond_wake (cond)
+#define lll_cond_broadcast(cond) \
+ __lll_cond_broadcast (cond)
+
+#endif /* lowlevellock.h */
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
similarity index 51%
copy from sysdeps/arm/bits/setjmp.h
copy to sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
index e0a4657..1c2e1f5 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,21 +16,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Define the machine-dependent type `jmp_buf'. ARM version. */
-
-#ifndef _SETJMP_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
- saved. */
-typedef int __jmp_buf[10];
-#endif
-
-#define __JMP_BUF_SP 8
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+#include <tcb-offsets.h>
+
+/* Save the PID value. */
+#define SAVE_PID \
+ str lr, [sp, #-4]!; /* Save LR. */ \
+ mov r0, #0xffff0fff; /* Point to the high page. */ \
+ mov lr, pc; /* Save our return address. */ \
+ sub pc, r0, #31; /* Jump to the TLS entry. */ \
+ ldr lr, [sp], #4; /* Restore LR. */ \
+ mov r2, r0; /* Save the TLS addr in r2. */ \
+ ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
+ rsb r0, r3, #0; /* Negate it. */ \
+ str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
+
+/* Restore the old PID value in the parent. */
+#define RESTORE_PID \
+ cmp r0, #0; /* If we are the parent... */ \
+ strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
+
+#include "../vfork.S"
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
new file mode 100644
index 0000000..c892581
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/pthread_once.c
@@ -0,0 +1,99 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "pthreadP.h"
+#include <lowlevellock.h>
+
+unsigned long int __fork_generation attribute_hidden;
+
+static void
+clear_once_control (void *arg)
+{
+ pthread_once_t *once_control = (pthread_once_t *) arg;
+
+ *once_control = 0;
+ lll_futex_wake (once_control, INT_MAX);
+}
+
+int
+__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
+{
+ for (;;)
+ {
+ int oldval;
+ int newval;
+
+ /* Pseudo code:
+ newval = __fork_generation | 1;
+ oldval = *once_control;
+ if ((oldval & 2) == 0)
+ *once_control = newval;
+ Do this atomically.
+ */
+ do
+ {
+ newval = __fork_generation | 1;
+ oldval = *once_control;
+ if (oldval & 2)
+ break;
+ } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval);
+
+ /* Check if the initializer has already been done. */
+ if ((oldval & 2) != 0)
+ return 0;
+
+ /* Check if another thread already runs the initializer. */
+ if ((oldval & 1) == 0)
+ break;
+
+ /* Check whether the initializer execution was interrupted by a fork. */
+ if (oldval != newval)
+ break;
+
+ /* Same generation, some other thread was faster. Wait. */
+ lll_futex_wait (once_control, oldval);
+ }
+
+ /* This thread is the first here. Do the initialization.
+ Register a cleanup handler so that in case the thread gets
+ interrupted the initialization can be restarted. */
+ pthread_cleanup_push (clear_once_control, once_control);
+
+ init_routine ();
+
+ pthread_cleanup_pop (0);
+
+ /* Say that the initialisation is done. */
+ *once_control = __fork_generation | 2;
+
+ /* Wake up all other threads. */
+ lll_futex_wake (once_control, INT_MAX);
+
+ return 0;
+}
+weak_alias (__pthread_once, pthread_once)
+strong_alias (__pthread_once, __pthread_once_internal)
+
+#if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__)
+/* When statically linked, if pthread_create is used, this file
+ will be brought in. The exception handling code in GCC assumes
+ that if pthread_create is available, so are these. */
+const void *include_pthread_getspecific attribute_hidden = pthread_getspecific;
+const void *include_pthread_setspecific attribute_hidden = pthread_setspecific;
+const void *include_pthread_key_create attribute_hidden = pthread_key_create;
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
new file mode 100644
index 0000000..87e055e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
@@ -0,0 +1,39 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <tcb-offsets.h>
+
+/* Save the PID value. */
+#define SAVE_PID \
+ str lr, [sp, #-4]!; /* Save LR. */ \
+ mov r0, #0xffff0fff; /* Point to the high page. */ \
+ mov lr, pc; /* Save our return address. */ \
+ sub pc, r0, #31; /* Jump to the TLS entry. */ \
+ ldr lr, [sp], #4; /* Restore LR. */ \
+ mov r2, r0; /* Save the TLS addr in r2. */ \
+ ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
+ rsbs r0, r3, #0; /* Negate it. */ \
+ moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \
+ str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
+
+/* Restore the old PID value in the parent. */
+#define RESTORE_PID \
+ cmp r0, #0; /* If we are the parent... */ \
+ strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
+
+#include "../vfork.S"
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 81b29ad..6dd189b 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,14 +79,7 @@ __libc_sigaction (sig, act, oact)
memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
kact.sa_flags = act->sa_flags;
# ifdef HAVE_SA_RESTORER
- /* If the user specified SA_ONSTACK this means she is trying to
- use the old-style stack switching. Unfortunately this
- requires the sa_restorer field so we cannot install our own
- handler. (In fact the user is likely to be out of luck anyway
- since the kernel currently only supports stack switching via
- the X/Open sigaltstack interface, but we allow for the
- possibility that this might change in the future.) */
- if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK))
+ if (kact.sa_flags & SA_RESTORER)
kact.sa_restorer = act->sa_restorer;
else
{
@@ -131,8 +125,7 @@ __libc_sigaction (sig, act, oact)
k_sigact.sa_mask = act->sa_mask.__val[0];
k_sigact.sa_flags = act->sa_flags;
# ifdef HAVE_SA_RESTORER
- /* See the comments above for why we test SA_ONSTACK. */
- if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK))
+ if (k_sigact.sa_flags & SA_RESTORER)
k_sigact.sa_restorer = act->sa_restorer;
else
{
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 4c0fdfb..22d0c1a 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -34,11 +34,11 @@
The .S files for the other calls just #define socket and #include this. */
#ifndef __socket
-#ifndef NO_WEAK_ALIAS
-#define __socket P(__,socket)
-#else
-#define __socket socket
-#endif
+# ifndef NO_WEAK_ALIAS
+# define __socket P(__,socket)
+# else
+# define __socket socket
+# endif
#endif
#define PUSHARGS_1 str a1, [sp, $-4]!
@@ -53,7 +53,7 @@
#define POPARGS_3 add sp, sp, #12
#define POPARGS_4 add sp, sp, #16
#define POPARGS_5 add sp, sp, #16
-#define POPARGS_6 add sp, sp, #16
+#define POPARGS_6 add sp, sp, #16
#ifndef NARGS
#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
@@ -66,8 +66,8 @@
.globl __socket
ENTRY (__socket)
/* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
+ stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+ to be restored after the syscall completed. It saved an
instruction and meant no stack cleanup work was required.
This will not work in the case of a socket call being interrupted
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 4df3e37..01b3717 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -24,6 +24,9 @@
/* There is some commonality. */
#include <ports/sysdeps/unix/arm/sysdep.h>
+/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */
+#include <dl-sysdep.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
@@ -43,7 +46,7 @@
might return a large offset. Therefore we must not anymore test
for < 0, but test for a real error by making sure the value in R0
is a real error number. Linus said he will make sure the no syscall
- returns a value in -1 .. -4095 as a valid result so we can savely
+ returns a value in -1 .. -4095 as a valid result so we can safely
test with -4095. */
#undef PSEUDO
@@ -96,7 +99,17 @@
#if NOT_IN_libc
# define SYSCALL_ERROR __local_syscall_error
-# define SYSCALL_ERROR_HANDLER \
+# if RTLD_PRIVATE_ERRNO
+# define SYSCALL_ERROR_HANDLER \
+__local_syscall_error: \
+ ldr r1, 1f; \
+ rsb r0, r0, #0; \
+0: str r0, [pc, r1]; \
+ mvn r0, #0; \
+ DO_RET(lr); \
+1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
+# else
+# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
str lr, [sp, #-4]!; \
str r0, [sp, #-4]!; \
@@ -106,6 +119,7 @@ __local_syscall_error: \
str r1, [r0]; \
mvn r0, #0; \
ldr pc, [sp], #4;
+# endif
#else
# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
# define SYSCALL_ERROR __syscall_error
@@ -239,6 +253,24 @@ __local_syscall_error: \
LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)
#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
+/* We can't implement non-constant syscalls directly since the syscall
+ number is normally encoded in the instruction. So use SYS_syscall. */
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ INTERNAL_SYSCALL_NCS_##nr (number, err, args)
+
+#define INTERNAL_SYSCALL_NCS_0(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 1, number, args)
+#define INTERNAL_SYSCALL_NCS_1(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 2, number, args)
+#define INTERNAL_SYSCALL_NCS_2(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 3, number, args)
+#define INTERNAL_SYSCALL_NCS_3(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 4, number, args)
+#define INTERNAL_SYSCALL_NCS_4(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 5, number, args)
+#define INTERNAL_SYSCALL_NCS_5(number, err, args...) \
+ INTERNAL_SYSCALL (syscall, err, 6, number, args)
+
#endif /* __ASSEMBLER__ */
#endif /* linux/arm/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 0e267b3..a020658 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -30,16 +30,22 @@
ENTRY (__vfork)
#ifdef __NR_vfork
+#ifdef SAVE_PID
+ SAVE_PID
+#endif
DO_CALL (vfork, 0)
+#ifdef RESTORE_PID
+ RESTORE_PID
+#endif
cmn a1, #4096
RETINSTR(cc, lr)
# ifdef __ASSUME_VFORK_SYSCALL
- b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ b PLTJMP(SYSCALL_ERROR)
# else
/* Check if vfork syscall is known at all. */
- cmn a2, #ENOSYS
- bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ cmn a1, #ENOSYS
+ bne PLTJMP(SYSCALL_ERROR)
# endif
#endif
@@ -48,7 +54,7 @@ ENTRY (__vfork)
DO_CALL (fork, 0)
cmn a1, #4096
RETINSTR(cc, lr)
- b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ b PLTJMP(SYSCALL_ERROR)
#elif !defined __NR_vfork
# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de96d1483f365654270a4291e11ed257a2687322
commit de96d1483f365654270a4291e11ed257a2687322
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Nov 16 18:08:53 2005 +0000
* sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM.
* sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL.
* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL.
* sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump
arch_minimum_kernel.
* sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
* sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
sysdeps/unix/sysv/linux/arm/eabi/fcntl.c,
sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c,
sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h,
sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
sysdeps/unix/sysv/linux/arm/eabi/lockf64.c,
sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
sysdeps/unix/sysv/linux/arm/eabi/semop.c,
sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
sysdeps/unix/sysv/linux/arm/eabi/uname.c,
sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed.
* sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h,
sysdeps/unix/sysv/linux/arm/eabi/mmap64.S,
sysdeps/unix/sysv/linux/arm/eabi/pread.c,
sysdeps/unix/sysv/linux/arm/eabi/pread64.c,
sysdeps/unix/sysv/linux/arm/eabi/pwrite.c,
sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c,
sysdeps/unix/sysv/linux/arm/eabi/readahead.c,
sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S,
sysdeps/unix/sysv/linux/arm/eabi/socket.S,
sysdeps/unix/sysv/linux/arm/eabi/syscall.S,
sysdeps/unix/sysv/linux/arm/eabi/sysdep.h,
sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files.
* sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
(SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed.
(SINGLE_THREAD_P): Rewritten to use only ip.
* sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use
DO_CALL.
* sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL.
* sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL.
Don't handle EABI here.
* sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use
SINGLE_THREAD_P.
* sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1379078..21e15ce 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,53 @@
+2005-11-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Use INTERNAL_SYSCALL_ARM.
+ * sysdeps/unix/sysv/linux/arm/brk.c (__brk): Use INLINE_SYSCALL.
+ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use DO_CALL.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure.in: Bump
+ arch_minimum_kernel.
+ * sysdeps/unix/sysv/linux/arm/eabi/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fcntl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h,
+ sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
+ sysdeps/unix/sysv/linux/arm/eabi/lockf64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
+ sysdeps/unix/sysv/linux/arm/eabi/uname.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: Removed.
+ * sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h,
+ sysdeps/unix/sysv/linux/arm/eabi/mmap64.S,
+ sysdeps/unix/sysv/linux/arm/eabi/pread.c,
+ sysdeps/unix/sysv/linux/arm/eabi/pread64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/pwrite.c,
+ sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/readahead.c,
+ sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S,
+ sysdeps/unix/sysv/linux/arm/eabi/socket.S,
+ sysdeps/unix/sysv/linux/arm/eabi/syscall.S,
+ sysdeps/unix/sysv/linux/arm/eabi/sysdep.h,
+ sysdeps/unix/sysv/linux/arm/eabi/truncate64.c: New files.
+ * sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+ (SINGLE_THREAD_P_INT, SINGLE_THREAD_P_PIC): Removed.
+ (SINGLE_THREAD_P): Rewritten to use only ip.
+ * sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S (__vfork): Use
+ DO_CALL.
+ * sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Use DO_CALL.
+ * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Use DO_CALL.
+ Don't handle EABI here.
+ * sysdeps/unix/sysv/linux/arm/socket.S (__socket): Use
+ SINGLE_THREAD_P.
+ * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Use DO_CALL.
+
2005-11-03 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 8011706..f176ff1 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -35,15 +35,7 @@
&& VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
#define CLEAR_CACHE(BEG,END) \
-{ \
- register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \
- register unsigned long _end __asm ("a2") = (unsigned long)(END); \
- register unsigned long _flg __asm ("a3") = 0; \
- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
- : /* no outputs */ \
- : /* no inputs */ \
- : "a1"); \
-}
+ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c
index 153d893..842688a 100644
--- a/sysdeps/unix/sysv/linux/arm/brk.c
+++ b/sysdeps/unix/sysv/linux/arm/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/ARM.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,14 +29,7 @@ __brk (void *addr)
{
void *newbrk;
- asm ("mov a1, %1\n" /* save the argment in r0 */
- "swi %2\n" /* do the system call */
- "mov %0, a1;" /* keep the return value */
- : "=r"(newbrk)
- : "r"(addr), "i" (SYS_ify (brk))
- : "a1");
-
- __curbrk = newbrk;
+ __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr);
if (newbrk < addr)
{
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index bf07fb3..b46281c 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -42,7 +43,7 @@ ENTRY(__clone)
@ get flags
mov r0, r2
@ new sp is already in r1
- swi SYS_ify(clone)
+ DO_CALL (clone, 0)
movs a1, a1
blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
RETINSTR(ne, lr)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
index bb6a261..ab83048 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
@@ -1,5 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-arch_minimum_kernel=2.4.17
+arch_minimum_kernel=2.6.14
libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
index 14c25a5..83aa8fc 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
@@ -1,5 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
-arch_minimum_kernel=2.4.17
+arch_minimum_kernel=2.6.14
libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
deleted file mode 100644
index 463e30f..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* epoll_ctl wrapper for ARM EABI.
- Copyright (C) 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-#include <errno.h>
-#include <sys/epoll.h>
-#include <stdlib.h>
-
-#include <kernel_epoll.h>
-
-int
-epoll_wait (int __epfd, struct epoll_event *__events,
- int __maxevents, int __timeout);
-{
- struct kernel_epoll_event *k_events;
- int result;
-
- k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
- if (k_events == NULL)
- {
- __set_errno (ENOMEM);
- return -1;
- }
-
- result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
- __timeout);
-
- for (i = 0; i < result; i++)
- {
- __events[i].events = k_events[i].events;
- memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
- }
-
- free (k_events);
- return result;
-}
-
-libc_hidden_def (epoll_wait)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c
deleted file mode 100644
index 7394c6a..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <errno.h>
-#include <sysdep-cancel.h> /* Must come before <fcntl.h>. */
-#include <fcntl.h>
-#include <stdarg.h>
-
-#include <sys/syscall.h>
-#include "kernel-features.h"
-
-#if __ASSUME_FCNTL64 == 0
-/* This variable is shared with all files that check for fcntl64. */
-int __have_no_fcntl64;
-#endif
-
-struct kernel_flock64 {
- short l_type;
- short l_whence;
- off64_t l_start;
- off64_t l_len;
- pid_t l_pid;
-} __attribute__((packed));
-
-#if defined NO_CANCELLATION && __ASSUME_FCNTL64 == 0
-# define __fcntl_nocancel __libc_fcntl
-#endif
-
-static inline void
-__flock64_to_kernel (struct kernel_flock64 *kfl64,
- const struct flock64 *fl64)
-{
- kfl64->l_type = fl64->l_type;
- kfl64->l_whence = fl64->l_whence;
- kfl64->l_start = fl64->l_start;
- kfl64->l_len = fl64->l_len;
- kfl64->l_pid = fl64->l_pid;
-}
-
-static inline void
-__flock64_from_kernel (struct flock64 *fl64,
- const struct kernel_flock64 *kfl64)
-{
- fl64->l_type = kfl64->l_type;
- fl64->l_whence = kfl64->l_whence;
- fl64->l_start = kfl64->l_start;
- fl64->l_len = kfl64->l_len;
- fl64->l_pid = kfl64->l_pid;
-}
-
-#if !defined NO_CANCELLATION || __ASSUME_FCNTL64 == 0
-int
-__fcntl_nocancel (int fd, int cmd, ...)
-{
- va_list ap;
- void *arg;
- struct kernel_flock64 kfl;
- struct flock64 *orig_arg;
-
- va_start (ap, cmd);
- arg = va_arg (ap, void *);
- va_end (ap);
-
-#if __ASSUME_FCNTL64 == 0
-# ifdef __NR_fcntl64
- if (! __have_no_fcntl64)
- {
- orig_arg = arg;
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
- {
- arg = &kfl;
- __flock64_to_kernel (&kfl, orig_arg);
- }
-
- int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- if (result >= 0 || errno != ENOSYS)
- {
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
- __flock64_from_kernel (orig_arg, &kfl);
- return result;
- }
-
- __have_no_fcntl64 = 1;
- }
-# endif
- switch (cmd)
- {
- case F_GETLK64:
- /* Convert arg from flock64 to flock and back. */
- {
- struct flock fl;
- struct flock64 *fl64 = arg;
- int res;
-
- fl.l_start = (off_t)fl64->l_start;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_start != fl64->l_start)
- {
- eoverflow:
- __set_errno (EOVERFLOW);
- return -1;
- }
- fl.l_len = (off_t) fl64->l_len;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_len != fl64->l_len)
- goto eoverflow;
-
- fl.l_type = fl64->l_type;
- fl.l_whence = fl64->l_whence;
- fl.l_pid = fl64->l_pid;
-
- res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl);
- if (res != 0)
- return res;
- /* Everything ok, convert back. */
- fl64->l_type = fl.l_type;
- fl64->l_whence = fl.l_whence;
- fl64->l_start = fl.l_start;
- fl64->l_len = fl.l_len;
- fl64->l_pid = fl.l_pid;
-
- return 0;
- }
- case F_SETLK64:
- case F_SETLKW64:
- /* Try to convert arg from flock64 to flock. */
- {
- struct flock fl;
- struct flock64 *fl64 = arg;
-
- fl.l_start = (off_t) fl64->l_start;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_start != fl64->l_start)
- goto eoverflow;
-
- fl.l_len = (off_t)fl64->l_len;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_len != fl64->l_len)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
- fl.l_type = fl64->l_type;
- fl.l_whence = fl64->l_whence;
- fl.l_pid = fl64->l_pid;
- assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64);
- return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl);
- }
- default:
- return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- }
- return -1;
-#else
- return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
-#endif /* !__ASSUME_FCNTL64 */
-}
-#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */
-
-
-#ifndef __fcntl_nocancel
-int
-__libc_fcntl (int fd, int cmd, ...)
-{
- va_list ap;
- void *arg;
- struct kernel_flock64 kfl;
- struct flock64 *orig_arg;
-
- va_start (ap, cmd);
- arg = va_arg (ap, void *);
- va_end (ap);
-
-#if __ASSUME_FCNTL64 > 0
- orig_arg = arg;
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
- {
- arg = &kfl;
- __flock64_to_kernel (&kfl, orig_arg);
- }
-
- if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
- {
- int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
- __flock64_from_kernel (orig_arg, &kfl);
- return result;
- }
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
-
- if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
- __flock64_from_kernel (orig_arg, &kfl);
-#else
- if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
- return __fcntl_nocancel (fd, cmd, arg);
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- int result = __fcntl_nocancel (fd, cmd, arg);
-#endif
-
- LIBC_CANCEL_RESET (oldtype);
-
- return result;
-}
-#endif
-libc_hidden_def (__libc_fcntl)
-
-weak_alias (__libc_fcntl, __fcntl)
-libc_hidden_weak (__fcntl)
-weak_alias (__libc_fcntl, fcntl)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
deleted file mode 100644
index 9057b2c..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996,1997,1998,1999,2000,2003,2005
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <string.h>
-#include <sys/statfs.h>
-#include <stddef.h>
-#include <sysdep.h>
-
-/* Defined in statfs64.c. */
-extern int __no_statfs64 attribute_hidden;
-
-/* Return information about the filesystem on which FD resides. */
-int
-__fstatfs64 (int fd, struct statfs64 *buf)
-{
-#ifdef __NR_fstatfs64
-# if __ASSUME_STATFS64 == 0
- if (! __no_statfs64)
-# endif
- {
- /* The EABI structure is the same as the old ABI structure, except
- that it has four additional bytes of padding - at the end. We can
- ignore them. */
- int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
-
-# if __ASSUME_STATFS64 == 0
- if (result == 0 || errno != ENOSYS)
-# endif
- return result;
-
-# if __ASSUME_STATFS64 == 0
- __no_statfs64 = 1;
-# endif
- }
-#endif
-
-#if __ASSUME_STATFS64 == 0
- struct statfs buf32;
-
- if (__fstatfs (fd, &buf32) < 0)
- return -1;
-
- buf->f_type = buf32.f_type;
- buf->f_bsize = buf32.f_bsize;
- buf->f_blocks = buf32.f_blocks;
- buf->f_bfree = buf32.f_bfree;
- buf->f_bavail = buf32.f_bavail;
- buf->f_files = buf32.f_files;
- buf->f_ffree = buf32.f_ffree;
- buf->f_fsid = buf32.f_fsid;
- buf->f_namelen = buf32.f_namelen;
- buf->f_frsize = buf32.f_frsize;
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
-
- return 0;
-#endif
-}
-weak_alias (__fstatfs64, fstatfs64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
new file mode 100644
index 0000000..295d12f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c
@@ -0,0 +1,77 @@
+/* Copyright (C) 1997,1998,1999,2000,2001,2003, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_ftruncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+extern int __have_no_truncate64;
+#endif
+
+
+/* Truncate the file FD refers to to LENGTH bytes. */
+int
+__ftruncate64 (int fd, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (! __have_no_truncate64)
+#endif
+ {
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ int saved_errno = errno;
+#endif
+ int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
+ __LONG_LONG_PAIR (high, low));
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (result != -1 || errno != ENOSYS)
+#endif
+ return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ __set_errno (saved_errno);
+ __have_no_truncate64 = 1;
+#endif
+ }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if ((off_t) length != length)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ return __ftruncate (fd, (off_t) length);
+#endif
+}
+weak_alias (__ftruncate64, ftruncate64)
+
+#else
+/* Use the generic implementation. */
+# include <sysdeps/generic/ftruncate64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
deleted file mode 100644
index ae6637e..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* fxstat64 using old-style Unix fstat system call.
- Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <kernel_stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include "kernel-features.h"
-
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_fstat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
-/* Get information about the file FD in BUF. */
-
-int
-___fxstat64 (int vers, int fd, struct stat64 *buf)
-{
- int result;
- struct kernel_stat64 kbuf64;
-
-#if __ASSUME_STAT64_SYSCALL > 0
- result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# if defined __NR_fstat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
-
- if (result != -1 || errno != ENOSYS)
- {
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
- result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
-#endif
-}
-
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
-strong_alias (___fxstat64, __old__fxstat64)
-compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
-hidden_ver (___fxstat64, __fxstat64)
-#else
-strong_alias (___fxstat64, __fxstat64)
-hidden_def (__fxstat64)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
deleted file mode 100644
index a4a8472..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdeps/unix/sysv/linux/kernel_stat.h>
-
-/* kernel_stat64 is just like stat64, except packed. The EABI aligns
- st_size to an eight byte boundary but the old ABI only aligns it to
- four. Similarly st_blocks. */
-struct kernel_stat64
- {
- __dev_t st_dev; /* Device. */
- unsigned int __pad1;
-
- __ino_t __st_ino; /* 32bit file serial number. */
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- __dev_t st_rdev; /* Device number, if device. */
- unsigned int __pad2;
- __off64_t st_size; /* Size of file, in bytes. */
- __blksize_t st_blksize; /* Optimal block size for I/O. */
-
- __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#ifdef __USE_MISC
- /* Nanosecond resolution timestamps are stored in a format
- equivalent to 'struct timespec'. This is the type used
- whenever possible but the Unix namespace rules do not allow the
- identifier 'timespec' to appear in the <sys/stat.h> header.
- Therefore we have to handle the use of this header in strictly
- standard-compliant sources special. */
- struct timespec st_atim; /* Time of last access. */
- struct timespec st_mtim; /* Time of last modification. */
- struct timespec st_ctim; /* Time of last status change. */
-#else
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
- __ino64_t st_ino; /* File serial number. */
- } __attribute__ ((packed,aligned(4)));
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
new file mode 100644
index 0000000..f77333f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h
@@ -0,0 +1,112 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .section ".text"; \
+ PSEUDO_PROLOGUE; \
+ ENTRY (name); \
+ SINGLE_THREAD_P; \
+ DOARGS_##args; \
+ bne .Lpseudo_cancel; \
+ mov ip, r7; \
+ ldr r7, =SYS_ify (syscall_name); \
+ swi 0x0; \
+ mov r7, ip; \
+ UNDOARGS_##args; \
+ cmn r0, $4096; \
+ PSEUDO_RET; \
+ .Lpseudo_cancel: \
+ DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
+ CENABLE; \
+ mov ip, r0; /* put mask in safe place. */ \
+ UNDOCARGS_##args; /* restore syscall args. */ \
+ ldr r7, =SYS_ify (syscall_name); \
+ swi 0x0; /* do the call. */ \
+ mov r7, r0; /* save syscall return value. */ \
+ mov r0, ip; /* get mask back. */ \
+ CDISABLE; \
+ mov r0, r7; /* retrieve return value. */ \
+ RESTORE_LR_##args; \
+ UNDOARGS_##args; \
+ cmn r0, $4096;
+
+/* DOARGS pushes four bytes on the stack for five arguments, and nothing
+ otherwise. In order to preserve doubleword alignment, sometimes we must
+ save an extra register. */
+
+# define DOCARGS_0 stmfd sp!, {r7, lr}
+# define UNDOCARGS_0
+# define RESTORE_LR_0 ldmfd sp!, {r7, lr}
+
+# define DOCARGS_1 stmfd sp!, {r0, r1, r7, lr}
+# define UNDOCARGS_1 ldr r0, [sp], #8
+# define RESTORE_LR_1 RESTORE_LR_0
+
+# define DOCARGS_2 stmfd sp!, {r0, r1, r7, lr}
+# define UNDOCARGS_2 ldmfd sp!, {r0, r1}
+# define RESTORE_LR_2 RESTORE_LR_0
+
+# define DOCARGS_3 stmfd sp!, {r0, r1, r2, r3, r7, lr}
+# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2, r3}
+# define RESTORE_LR_3 RESTORE_LR_0
+
+# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, r7, lr}
+# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}
+# define RESTORE_LR_4 RESTORE_LR_0
+
+# define DOCARGS_5 stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}
+# define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}
+# define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr}
+
+# ifdef IS_IN_libpthread
+# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+# define __local_multiple_threads __pthread_multiple_threads
+# else
+# define CENABLE bl PLTJMP(__libc_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__libc_disable_asynccancel)
+# define __local_multiple_threads __libc_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# define SINGLE_THREAD_P \
+ ldr ip, 1b; \
+2: \
+ ldr ip, [pc, ip]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE \
+ 1: .word __local_multiple_threads - 2f - 8;
+# endif
+
+#else
+
+/* For rtld, et cetera. */
+# define SINGLE_THREAD_P 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c
deleted file mode 100644
index 79dcceb..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2003
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sysdep.h>
-
-#include "kernel-features.h"
-
-/* lockf is a simplified interface to fcntl's locking facilities. */
-
-#ifdef __NR_fcntl64
-# if __ASSUME_FCNTL64 == 0
-/* This variable is shared with all files that check for fcntl64. The
- declaration is in fcntl.c. */
-extern int __have_no_fcntl64;
-# endif
-#endif
-
-struct kernel_flock64 {
- short l_type;
- short l_whence;
- off64_t l_start;
- off64_t l_len;
- pid_t l_pid;
-} __attribute__((packed));
-
-int
-lockf64 (int fd, int cmd, off64_t len64)
-{
-#if __ASSUME_FCNTL64 == 0
- struct flock fl;
- off_t len = (off_t) len64;
-#endif
-#ifdef __NR_fcntl64
- struct kernel_flock64 fl64;
- int cmd64;
-#endif
-
-#if __ASSUME_FCNTL64 == 0
- memset ((char *) &fl, '\0', sizeof (fl));
-
- /* lockf is always relative to the current file position. */
- fl.l_whence = SEEK_CUR;
- fl.l_start = 0;
- fl.l_len = len;
-#endif
-#ifdef __NR_fcntl64
-# if __ASSUME_FCNTL64 == 0
- if (!__have_no_fcntl64)
- {
-# endif
- memset ((char *) &fl64, '\0', sizeof (fl64));
- fl64.l_whence = SEEK_CUR;
- fl64.l_start = 0;
- fl64.l_len = len64;
-# if __ASSUME_FCNTL64 == 0
- }
-# endif
-#endif
-
-#if __ASSUME_FCNTL64 == 0 && !defined __NR_fcntl64
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
-#endif
- switch (cmd)
- {
- case F_TEST:
- /* Test the lock: return 0 if FD is unlocked or locked by this process;
- return -1, set errno to EACCES, if another process holds the lock. */
-#if __ASSUME_FCNTL64 > 0
- fl64.l_type = F_RDLCK;
- if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64) < 0)
- return -1;
- if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
- return 0;
- __set_errno (EACCES);
- return -1;
-#else
-# ifdef __NR_fcntl64
- if (!__have_no_fcntl64)
- {
- int res;
-
- fl64.l_type = F_RDLCK;
- res = INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64);
- /* If errno == ENOSYS try the 32bit interface if len64 can
- be represented with 32 bits. */
-
- if (res == 0)
- {
- if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
- return 0;
- __set_errno (EACCES);
- return -1;
- }
- else if (errno == ENOSYS)
- __have_no_fcntl64 = 1;
- else
- /* res < 0 && errno != ENOSYS. */
- return -1;
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
- }
-# endif
- fl.l_type = F_RDLCK;
- if (__fcntl (fd, F_GETLK, &fl) < 0)
- return -1;
- if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())
- return 0;
- __set_errno (EACCES);
- return -1;
-#endif
- case F_ULOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_UNLCK;
- cmd = F_SETLK;
-#endif
-#ifdef __NR_fcntl64
- fl64.l_type = F_UNLCK;
- cmd64 = F_SETLK64;
-#endif
- break;
- case F_LOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_WRLCK;
- cmd = F_SETLKW;
-#endif
-#ifdef __NR_fcntl64
- fl64.l_type = F_WRLCK;
- cmd64 = F_SETLKW64;
-#endif
- break;
- case F_TLOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_WRLCK;
- cmd = F_SETLK;
-#endif
-#ifdef __NR_fcntl64
- fl64.l_type = F_WRLCK;
- cmd64 = F_SETLK64;
-#endif
- break;
-
- default:
- __set_errno (EINVAL);
- return -1;
- }
-#if __ASSUME_FCNTL64 > 0
- return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
-#else
-# ifdef __NR_fcntl64
-
- if (!__have_no_fcntl64)
- {
- int res = INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
-
- /* If errno == ENOSYS try the 32bit interface if len64 can
- be represented with 32 bits. */
- if (res == 0 || errno != ENOSYS)
- return res;
-
- __have_no_fcntl64 = 1;
-
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
- }
-# endif
- return __fcntl (fd, cmd, &fl);
-#endif
-}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
deleted file mode 100644
index bb5be39..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* lxstat64 using old-style Unix lstat system call.
- Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <kernel_stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include "kernel-features.h"
-
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_lstat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
-/* Get information about the file NAME in BUF. */
-int
-___lxstat64 (int vers, const char *name, struct stat64 *buf)
-{
- int result;
- struct kernel_stat64 kbuf64;
-
-#ifdef __ASSUME_STAT64_SYSCALL
- result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# ifdef __NR_lstat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
-
- if (result != -1 || errno != ENOSYS)
- {
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
- result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
-#endif
-}
-
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
-strong_alias (___lxstat64, __old__lxstat64)
-compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
-hidden_ver (___lxstat64, __lxstat64)
-#else
-strong_alias (___lxstat64, __lxstat64);
-hidden_def (__lxstat64)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
new file mode 100644
index 0000000..38fac06
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
@@ -0,0 +1,56 @@
+/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#define EINVAL 22
+
+#ifdef __ARMEB__
+# define LOW_OFFSET 8 + 4
+/* The initial + 4 is for the stack postdecrement. */
+# define HIGH_OFFSET 4 + 8 + 0
+#else
+# define LOW_OFFSET 8 + 0
+# define HIGH_OFFSET 4 + 8 + 4
+#endif
+
+ /* The mmap2 system call takes six arguments, all in registers. */
+ .text
+ENTRY (__mmap64)
+ ldr ip, [sp, $LOW_OFFSET]
+ str r5, [sp, #-4]!
+ ldr r5, [sp, $HIGH_OFFSET]
+ str r4, [sp, #-4]!
+ movs r4, ip, lsl $20 @ check that offset is page-aligned
+ mov ip, ip, lsr $12
+ moveqs r4, r5, lsr $12 @ check for overflow
+ bne .Linval
+ ldr r4, [sp, $8] @ load fd
+ orr r5, ip, r5, lsl $20 @ compose page offset
+ DO_CALL (mmap2, 0)
+ cmn r0, $4096
+ ldmfd sp!, {r4, r5}
+ RETINSTR(cc, lr)
+ b PLTJMP(syscall_error)
+.Linval:
+ mov r0, $-EINVAL
+ ldmfd sp!, {r4, r5}
+ b PLTJMP(syscall_error)
+PSEUDO_END (__mmap64)
+
+weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread.c b/sysdeps/unix/sysv/linux/arm/eabi/pread.c
new file mode 100644
index 0000000..b6d2aea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/pread.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pread (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ {
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+strong_alias (__libc_pread, __pread)
+weak_alias (__libc_pread, pread)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pread64.c b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c
new file mode 100644
index 0000000..3b4608e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/pread64.c
@@ -0,0 +1,63 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pread64 (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ {
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pread64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+weak_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, pread64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c
new file mode 100644
index 0000000..0200b9c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pwrite (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ {
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+strong_alias (__libc_pwrite, __pwrite)
+weak_alias (__libc_pwrite, pwrite)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c
new file mode 100644
index 0000000..cf33165
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c
@@ -0,0 +1,64 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+ssize_t
+__libc_pwrite64 (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ {
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ /* In the ARM EABI, 64-bit values are aligned to even/odd register
+ pairs for syscalls. */
+ result = INLINE_SYSCALL (pwrite64, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+weak_alias (__libc_pwrite64, __pwrite64)
+libc_hidden_weak (__pwrite64)
+weak_alias (__libc_pwrite64, pwrite64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/uname.c b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c
similarity index 59%
rename from sysdeps/unix/sysv/linux/arm/eabi/uname.c
rename to sysdeps/unix/sysv/linux/arm/eabi/readahead.c
index 82482e4..946745c 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/uname.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/readahead.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2005
- Free Software Foundation, Inc.
+/* Provide kernel hint to read ahead.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,26 +18,34 @@
02111-1307 USA. */
#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <endian.h>
+
#include <sysdep.h>
#include <sys/syscall.h>
-#include <string.h>
-#include <sys/utsname.h>
-
-/* The kernel's struct utsname is two bytes larger than a userland struct
- utsname due to the APCS structure size boundary. */
-int
-__uname (struct utsname *__name)
-{
- char buf[sizeof (struct utsname) + 2];
- int result = INLINE_SYSCALL (uname, 1, buf);
- if (result == 0)
- memcpy (__name, buf, sizeof (struct utsname));
+#ifdef __NR_readahead
- return result;
+ssize_t
+__readahead (int fd, off64_t offset, size_t count)
+{
+ return INLINE_SYSCALL (readahead, 5, fd, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)),
+ count);
}
+#else
+ssize_t
+__readahead (int fd, off64_t offset, size_t count)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (readahead)
+
+# include <stub-tag.h>
+#endif
-libc_hidden_def (__uname)
-strong_alias (__uname, uname)
-libc_hidden_weak (uname)
+weak_alias (__readahead, readahead)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semop.c b/sysdeps/unix/sysv/linux/arm/eabi/semop.c
deleted file mode 100644
index 42b2036..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/semop.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/sem.h>
-#include <ipc_priv.h>
-#include <alloca.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-struct kernel_sembuf
-{
- unsigned short int sem_num; /* semaphore number */
- short int sem_op; /* semaphore operation */
- short int sem_flg; /* operation flag */
- short int __pad1;
-};
-
-/* Perform user-defined atomical operation of array of semaphores. */
-
-int
-semop (semid, sops, nsops)
- int semid;
- struct sembuf *sops;
- size_t nsops;
-{
- struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops);
- size_t i;
- int result;
-
- for (i = 0; i < nsops; i++)
- {
- ksops[i].sem_num = sops[i].sem_num;
- ksops[i].sem_op = sops[i].sem_op;
- ksops[i].sem_flg = sops[i].sem_flg;
- }
-
- result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
- semid, (int) nsops, 0, CHECK_N (ksops, nsops));
-
- for (i = 0; i < nsops; i++)
- {
- sops[i].sem_num = ksops[i].sem_num;
- sops[i].sem_op = ksops[i].sem_op;
- sops[i].sem_flg = ksops[i].sem_flg;
- }
-
- return result;
-}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
deleted file mode 100644
index 463dea4..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/sem.h>
-#include <ipc_priv.h>
-#include <alloca.h>
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-struct kernel_sembuf
-{
- unsigned short int sem_num; /* semaphore number */
- short int sem_op; /* semaphore operation */
- short int sem_flg; /* operation flag */
- short int __pad1;
-};
-
-/* Perform user-defined atomical operation of array of semaphores. */
-
-int
-semtimedop (semid, sops, nsops, timeout)
- int semid;
- struct sembuf *sops;
- size_t nsops;
- const struct timespec *timeout;
-{
- struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops);
- size_t i;
- int result;
-
- for (i = 0; i < nsops; i++)
- {
- ksops[i].sem_num = sops[i].sem_num;
- ksops[i].sem_op = sops[i].sem_op;
- ksops[i].sem_flg = sops[i].sem_flg;
- }
-
- result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
- semid, (int) nsops, 0, CHECK_N (sops, nsops),
- timeout);
-
- for (i = 0; i < nsops; i++)
- {
- sops[i].sem_num = ksops[i].sem_num;
- sops[i].sem_op = ksops[i].sem_op;
- sops[i].sem_flg = ksops[i].sem_flg;
- }
-
- return result;
-}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
similarity index 63%
rename from sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
rename to sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
index eac925b..d68c8a5 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
@@ -1,5 +1,4 @@
-/* epoll_ctl wrapper for ARM EABI.
- Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,20 +17,19 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <errno.h>
-#include <sys/epoll.h>
-#include <kernel_epoll.h>
+/* If no SA_RESTORER function was specified by the application we use
+ one of these. This avoids the need for the kernel to synthesise a return
+ instruction on the stack, which would involve expensive cache flushes. */
-int
-epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
-{
- struct kernel_epoll_event k_event;
+ENTRY(__default_sa_restorer)
+ mov r7, $SYS_ify(sigreturn)
+ swi 0x0
- k_event.events = __event->events;
- memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
+#ifdef __NR_rt_sigreturn
- return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
-}
+ENTRY(__default_rt_sa_restorer)
+ mov r7, $SYS_ify(rt_sigreturn)
+ swi 0x0
-libc_hidden_def (epoll_ctl)
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/eabi/socket.S
similarity index 86%
copy from sysdeps/unix/sysv/linux/arm/socket.S
copy to sysdeps/unix/sysv/linux/arm/eabi/socket.S
index 69f88eb..7fa2b1e 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/eabi/socket.S
@@ -1,6 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005
Free Software Foundation, Inc.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,19 +40,19 @@
#endif
#endif
-#define PUSHARGS_1 str a1, [sp, $-4]!
+#define PUSHARGS_1 str a1, [sp, $-8]!
#define PUSHARGS_2 stmfd sp!, {a1, a2}
-#define PUSHARGS_3 stmfd sp!, {a1, a2, a3}
+#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4} /* a4 pushed for padding */
#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}
#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}
-#define POPARGS_1 add sp, sp, #4
+#define POPARGS_1 add sp, sp, #8
#define POPARGS_2 add sp, sp, #8
-#define POPARGS_3 add sp, sp, #12
+#define POPARGS_3 add sp, sp, #16
#define POPARGS_4 add sp, sp, #16
#define POPARGS_5 add sp, sp, #16
-#define POPARGS_6 add sp, sp, #16
+#define POPARGS_6 add sp, sp, #16
#ifndef NARGS
#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
@@ -66,8 +65,8 @@
.globl __socket
ENTRY (__socket)
/* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
+ stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+ to be restored after the syscall completed. It saved an
instruction and meant no stack cleanup work was required.
This will not work in the case of a socket call being interrupted
@@ -79,18 +78,14 @@ ENTRY (__socket)
P(PUSHARGS_,NARGS)
#if defined NEED_CANCELLATION && defined CENABLE
-#ifdef PIC
- SINGLE_THREAD_P_PIC(r3)
-#else
SINGLE_THREAD_P
-#endif
bne 1f
#endif
/* Do the system call trap. */
mov a1, $P(SOCKOP_,socket)
mov a2, sp
- swi SYS_ify(socketcall)
+ DO_CALL (socketcall, 0)
/* Pop args off the stack */
P(POPARGS_,NARGS)
@@ -102,19 +97,20 @@ ENTRY (__socket)
#if defined NEED_CANCELLATION && defined CENABLE
1:
- str lr, [sp, #-4]!
+ stmfd sp!, {r7, lr}
CENABLE
mov ip, r0
mov r0, #P(SOCKOP_,socket)
add r1, sp, #4
- swi SYS_ify(socketcall)
+ mov r7, #SYS_ify(socketcall)
+ swi 0x0
- str r0, [sp, #-4]!
+ mov r7, r0
mov r0, ip
CDISABLE
- ldr r0, [sp], #4
- ldr lr, [sp], #4
+ mov r0, r7
+ ldmfd sp!, {r7, lr}
P(POPARGS_,NARGS)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
deleted file mode 100644
index 3c74453..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Return information about the filesystem on which FILE resides.
- Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <string.h>
-#include <sys/statfs.h>
-#include <stddef.h>
-#include <sysdep.h>
-
-
-# if __ASSUME_STATFS64 == 0
-int __no_statfs64 attribute_hidden;
-#endif
-
-/* Return information about the filesystem on which FILE resides. */
-int
-__statfs64 (const char *file, struct statfs64 *buf)
-{
-#ifdef __NR_statfs64
-# if __ASSUME_STATFS64 == 0
- if (! __no_statfs64)
-# endif
- {
- /* The EABI structure is the same as the old ABI structure, except
- that it has four additional bytes of padding - at the end. We can
- ignore them. */
- int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
-
-# if __ASSUME_STATFS64 == 0
- if (result == 0 || errno != ENOSYS)
-# endif
- return result;
-
-# if __ASSUME_STATFS64 == 0
- __no_statfs64 = 1;
-# endif
- }
-#endif
-
-#if __ASSUME_STATFS64 == 0
- struct statfs buf32;
-
- if (__statfs (file, &buf32) < 0)
- return -1;
-
- buf->f_type = buf32.f_type;
- buf->f_bsize = buf32.f_bsize;
- buf->f_blocks = buf32.f_blocks;
- buf->f_bfree = buf32.f_bfree;
- buf->f_bavail = buf32.f_bavail;
- buf->f_files = buf32.f_files;
- buf->f_ffree = buf32.f_ffree;
- buf->f_fsid = buf32.f_fsid;
- buf->f_namelen = buf32.f_namelen;
- buf->f_frsize = buf32.f_frsize;
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
-
- return 0;
-#endif
-}
-weak_alias (__statfs64, statfs64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
similarity index 64%
rename from sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h
rename to sysdeps/unix/sysv/linux/arm/eabi/syscall.S
index 410b5c0..59ca051 100644
--- a/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h
+++ b/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
@@ -16,8 +16,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-struct kernel_epoll_event
-{
- uint32_t events; /* Epoll events */
- epoll_data_t data; /* User data variable */
-} __attribute__ ((packed,aligned(4)));
+#include <sysdep.h>
+
+/* In the EABI syscall interface, we don't need a special syscall to
+ implement syscall(). It won't work reliably with 64-bit arguments
+ (but that is true on many modern platforms). */
+
+ENTRY (syscall)
+ mov ip, sp
+ stmfd sp!, {r4, r5, r6, r7}
+ mov r7, r0
+ mov r0, r1
+ mov r1, r2
+ mov r2, r3
+ ldmfd ip, {r3, r4, r5, r6}
+ swi 0x0
+ ldmfd sp!, {r4, r5, r6, r7}
+ cmn r0, #4096
+ RETINSTR(cc, lr)
+ b PLTJMP(syscall_error)
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
deleted file mode 100644
index 85bc04f..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
+++ /dev/null
@@ -1,4 +0,0 @@
-# File name Caller Syscall name # args Strong name Weak names
-
-epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
-epoll_wait EXTRA epoll_wait i:ipii epoll_wait
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
new file mode 100644
index 0000000..84a4f04
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
@@ -0,0 +1,72 @@
+/* Copyright (C) 2005
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ Contributed by Daniel Jacobowitz <dan@codesourcery.com>, Oct 2005.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINUX_ARM_EABI_SYSDEP_H
+#define _LINUX_ARM_EABI_SYSDEP_H 1
+
+#include <arm/sysdep.h>
+
+#if __NR_SYSCALL_BASE != 0
+# error Kernel headers are too old
+#endif
+
+/* The ARM EABI user interface passes the syscall number in r7, instead
+ of in the swi. This is more efficient, because the kernel does not need
+ to fetch the swi from memory to find out the number; which can be painful
+ with separate I-cache and D-cache. Make sure to use 0 for the SWI
+ argument; otherwise the (optional) compatibility code for APCS binaries
+ may be invoked. */
+
+#undef INTERNAL_SYSCALL_RAW
+#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
+ ({ \
+ register int _a1 asm ("r0"), _nr asm ("r7"); \
+ LOAD_ARGS_##nr (args) \
+ _nr = name; \
+ asm volatile ("swi 0x0 @ syscall " #name \
+ : "=r" (_a1) \
+ : "r" (_nr) ASM_ARGS_##nr \
+ : "memory"); \
+ _a1; })
+
+/* We must save and restore r7 (call-saved) for the syscall number.
+ We never make function calls from inside here (only potentially
+ signal handlers), so we do not bother with doubleword alignment.
+
+ Just like the APCS syscall convention, the EABI syscall convention uses
+ r0 through r6 for up to seven syscall arguments. None are ever passed to
+ the kernel on the stack, although incoming arguments are on the stack for
+ syscalls with five or more arguments.
+
+ The assembler will convert the literal pool load to a move for most
+ syscalls. */
+
+#undef DO_CALL
+#define DO_CALL(syscall_name, args) \
+ DOARGS_##args \
+ mov ip, r7; \
+ ldr r7, =SYS_ify (syscall_name); \
+ swi 0x0; \
+ mov r7, ip; \
+ UNDOARGS_##args
+
+#endif /* _LINUX_ARM_EABI_SYSDEP_H */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
new file mode 100644
index 0000000..d788733
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/truncate64.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1997-2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <endian.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_truncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+int __have_no_truncate64;
+#endif
+
+/* Truncate the file FD refers to to LENGTH bytes. */
+int
+truncate64 (const char *path, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (! __have_no_truncate64)
+#endif
+ {
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ int saved_errno = errno;
+#endif
+ int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
+ __LONG_LONG_PAIR (high, low));
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (result != -1 || errno != ENOSYS)
+#endif
+ return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ __set_errno (saved_errno);
+ __have_no_truncate64 = 1;
+#endif
+ }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if ((off_t) length != length)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ return __truncate (path, (off_t) length);
+#endif
+}
+
+#else
+/* Use the generic implementation. */
+# include <sysdeps/generic/truncate64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
deleted file mode 100644
index 5edafd8..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* xstat64 using old-style Unix stat system call.
- Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <kernel_stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include "kernel-features.h"
-
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls.
- This is the definition. */
-int __have_no_stat64;
-# endif
-#endif
-
-/* Get information about the file NAME in BUF. */
-
-int
-___xstat64 (int vers, const char *name, struct stat64 *buf)
-{
- int result;
- struct kernel_stat64 kbuf64;
-
-#if __ASSUME_STAT64_SYSCALL > 0
- result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# if defined __NR_stat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
-
- if (result != -1 || errno != ENOSYS)
- {
- if (result == 0)
- result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
-
- result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
-#endif
-}
-
-
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
-strong_alias (___xstat64, __old__xstat64)
-compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
-hidden_ver (___xstat64, __xstat64)
-#else
-strong_alias (___xstat64, __xstat64)
-hidden_def (__xstat64)
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
deleted file mode 100644
index 28c4dae..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/stat.h>
-#include <kernel_stat.h>
-
-#ifdef STAT_IS_KERNEL_STAT
-
-/* Dummy. */
-struct kernel_stat;
-
-#else
-
-#include <string.h>
-
-
-#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
-int
-__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
-{
- switch (vers)
- {
- case _STAT_VER_KERNEL:
- /* Nothing to do. The struct is in the form the kernel expects.
- We should have short-circuted before we got here, but for
- completeness... */
- *(struct kernel_stat *) ubuf = *kbuf;
- break;
-
- case _STAT_VER_LINUX:
- {
- struct stat *buf = ubuf;
-
- /* Convert to current kernel version of `struct stat'. */
- buf->st_dev = kbuf->st_dev;
-#ifdef _HAVE_STAT___PAD1
- buf->__pad1 = 0;
-#endif
- buf->st_ino = kbuf->st_ino;
- buf->st_mode = kbuf->st_mode;
- buf->st_nlink = kbuf->st_nlink;
- buf->st_uid = kbuf->st_uid;
- buf->st_gid = kbuf->st_gid;
- buf->st_rdev = kbuf->st_rdev;
-#ifdef _HAVE_STAT___PAD2
- buf->__pad2 = 0;
-#endif
- buf->st_size = kbuf->st_size;
- buf->st_blksize = kbuf->st_blksize;
- buf->st_blocks = kbuf->st_blocks;
-#ifdef _HAVE_STAT_NSEC
- buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
- buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
- buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
- buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
- buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
- buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
-#else
- buf->st_atime = kbuf->st_atime;
- buf->st_mtime = kbuf->st_mtime;
- buf->st_ctime = kbuf->st_ctime;
-#endif
-#ifdef _HAVE_STAT___UNUSED1
- buf->__unused1 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED2
- buf->__unused2 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED3
- buf->__unused3 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED4
- buf->__unused4 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED5
- buf->__unused5 = 0;
-#endif
- }
- break;
-
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- return 0;
-}
-#endif
-
-int
-__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
-{
-#ifdef XSTAT_IS_XSTAT64
- return __xstat_conv (vers, kbuf, ubuf);
-#else
- switch (vers)
- {
- case _STAT_VER_LINUX:
- {
- struct stat64 *buf = ubuf;
-
- /* Convert to current kernel version of `struct stat64'. */
- buf->st_dev = kbuf->st_dev;
-#ifdef _HAVE_STAT64___PAD1
- buf->__pad1 = 0;
-#endif
- buf->st_ino = kbuf->st_ino;
-#ifdef _HAVE_STAT64___ST_INO
- buf->__st_ino = kbuf->st_ino;
-#endif
- buf->st_mode = kbuf->st_mode;
- buf->st_nlink = kbuf->st_nlink;
- buf->st_uid = kbuf->st_uid;
- buf->st_gid = kbuf->st_gid;
- buf->st_rdev = kbuf->st_rdev;
-#ifdef _HAVE_STAT64___PAD2
- buf->__pad2 = 0;
-#endif
- buf->st_size = kbuf->st_size;
- buf->st_blksize = kbuf->st_blksize;
- buf->st_blocks = kbuf->st_blocks;
-#ifdef _HAVE_STAT64_NSEC
- buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
- buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
- buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
- buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
- buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
- buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
-#else
- buf->st_atime = kbuf->st_atime;
- buf->st_mtime = kbuf->st_mtime;
- buf->st_ctime = kbuf->st_ctime;
-#endif
-#ifdef _HAVE_STAT64___UNUSED1
- buf->__unused1 = 0;
-#endif
-#ifdef _HAVE_STAT64___UNUSED2
- buf->__unused2 = 0;
-#endif
-#ifdef _HAVE_STAT64___UNUSED3
- buf->__unused3 = 0;
-#endif
-#ifdef _HAVE_STAT64___UNUSED4
- buf->__unused4 = 0;
-#endif
-#ifdef _HAVE_STAT64___UNUSED5
- buf->__unused5 = 0;
-#endif
- }
- break;
-
- /* If struct stat64 is different from struct stat then
- _STAT_VER_KERNEL does not make sense. */
- case _STAT_VER_KERNEL:
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- return 0;
-#endif
-}
-
-int
-__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
-{
- struct kernel_stat64 *kbuf = kbuf_;
-
- switch (vers)
- {
- case _STAT_VER_LINUX:
- {
- /* Convert current kernel version of `struct stat64' to
- `struct stat'. */
- buf->st_dev = kbuf->st_dev;
-#ifdef _HAVE_STAT___PAD1
- buf->__pad1 = 0;
-#endif
-#ifdef _HAVE_STAT64___ST_INO
-# if __ASSUME_ST_INO_64_BIT == 0
- if (kbuf->st_ino == 0)
- buf->st_ino = kbuf->__st_ino;
- else
-# endif
- {
- buf->st_ino = kbuf->st_ino;
- if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
- && buf->st_ino != kbuf->st_ino)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
- }
-#else
- buf->st_ino = kbuf->st_ino;
- if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
- && buf->st_ino != kbuf->st_ino)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
-#endif
- buf->st_mode = kbuf->st_mode;
- buf->st_nlink = kbuf->st_nlink;
- buf->st_uid = kbuf->st_uid;
- buf->st_gid = kbuf->st_gid;
- buf->st_rdev = kbuf->st_rdev;
-#ifdef _HAVE_STAT___PAD2
- buf->__pad2 = 0;
-#endif
- buf->st_size = kbuf->st_size;
- /* Check for overflow. */
- if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
- && buf->st_size != kbuf->st_size)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
- buf->st_blksize = kbuf->st_blksize;
- buf->st_blocks = kbuf->st_blocks;
- /* Check for overflow. */
- if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
- && buf->st_blocks != kbuf->st_blocks)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
-#ifdef _HAVE_STAT_NSEC
- buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
- buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
- buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
- buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
- buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
- buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
-#else
- buf->st_atime = kbuf->st_atime;
- buf->st_mtime = kbuf->st_mtime;
- buf->st_ctime = kbuf->st_ctime;
-#endif
-
-#ifdef _HAVE_STAT___UNUSED1
- buf->__unused1 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED2
- buf->__unused2 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED3
- buf->__unused3 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED4
- buf->__unused4 = 0;
-#endif
-#ifdef _HAVE_STAT___UNUSED5
- buf->__unused5 = 0;
-#endif
- }
- break;
-
- /* If struct stat64 is different from struct stat then
- _STAT_VER_KERNEL does not make sense. */
- case _STAT_VER_KERNEL:
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- return 0;
-}
-
-int
-__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
-{
- struct kernel_stat64 *kbuf = kbuf_;
-
- switch (vers)
- {
- case _STAT_VER_LINUX:
- {
- /* Convert current kernel version of `struct stat64' to
- user version of `struct stat64'. */
- buf->st_dev = kbuf->st_dev;
-#ifdef _HAVE_STAT64___PAD1
- buf->__pad1 = kbuf->__pad1;
-#endif
-#ifdef _HAVE_STAT64___ST_INO
- buf->__st_ino = kbuf->__st_ino;
-#endif
- buf->st_mode = kbuf->st_mode;
- buf->st_nlink = kbuf->st_nlink;
- buf->st_uid = kbuf->st_uid;
- buf->st_gid = kbuf->st_gid;
- buf->st_rdev = kbuf->st_rdev;
-#ifdef _HAVE_STAT64___PAD2
- buf->__pad2 = kbuf->__pad2;
-#endif
- buf->st_size = kbuf->st_size;
- buf->st_blksize = kbuf->st_blksize;
- buf->st_blocks = kbuf->st_blocks;
-#ifdef _HAVE_STAT64_NSEC
- buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
- buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
- buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
- buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
- buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
- buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
-#else
- buf->st_atime = kbuf->st_atime;
- buf->st_mtime = kbuf->st_mtime;
- buf->st_ctime = kbuf->st_ctime;
-#endif
- buf->st_ino = kbuf->st_ino;
- }
- break;
-
- case _STAT_VER_KERNEL:
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- return 0;
-}
-
-#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
deleted file mode 100644
index abe65f4..0000000
--- a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "kernel-features.h"
-
-#ifndef STAT_IS_KERNEL_STAT
-extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
-extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
-#endif
-extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
-extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
- struct stat64 *buf);
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 019bd54..cd4d171 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell <pb@nexus.co.uk>, 2003.
@@ -46,7 +46,7 @@
.section ".text"; \
PSEUDO_PROLOGUE; \
ENTRY (name); \
- SINGLE_THREAD_P_INT; \
+ SINGLE_THREAD_P; \
bne .Lpseudo_cancel; \
DO_CALL (syscall_name, args); \
cmn r0, $4096; \
@@ -104,11 +104,10 @@ extern int __local_multiple_threads attribute_hidden;
# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
# else
# if !defined PIC
-# define SINGLE_THREAD_P_INT \
+# define SINGLE_THREAD_P \
ldr ip, =__local_multiple_threads; \
ldr ip, [ip]; \
teq ip, #0;
-# define SINGLE_THREAD_P SINGLE_THREAD_P_INT
# define MAYBE_SAVE_LR \
str lr, [sp, $-4]!;
# define PSEUDO_RET_MOV \
@@ -116,22 +115,13 @@ extern int __local_multiple_threads attribute_hidden;
b PLTJMP(SYSCALL_ERROR)
# define PSEUDO_PROLOGUE
# else
-# define SINGLE_THREAD_P_PIC(reg) \
+# define SINGLE_THREAD_P \
ldr ip, 1b; \
- ldr reg, 2b; \
-3: \
- add ip, pc, ip; \
- ldr ip, [ip, reg]; \
+2: \
+ ldr ip, [pc, ip]; \
teq ip, #0;
-# define SINGLE_THREAD_P_INT \
- str lr, [sp, $-4]!; \
- SINGLE_THREAD_P_PIC(lr)
-# define SINGLE_THREAD_P \
- SINGLE_THREAD_P_INT; \
- ldr lr, [sp], $4
# define PSEUDO_PROLOGUE \
- 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \
- 2: .word __local_multiple_threads(GOTOFF);
+ 1: .word __local_multiple_threads - 2f - 8;
# define MAYBE_SAVE_LR /* lr already saved */
# define PSEUDO_RET_MOV PSEUDO_RET
# endif
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
index 2708c70..b826a99 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -27,8 +27,6 @@
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
- PSEUDO_PROLOGUE
-
ENTRY (__vfork)
#ifdef __NR_vfork
@@ -44,7 +42,7 @@ ENTRY (__vfork)
movs r0, r0
bne HIDDEN_JUMPTARGET (__fork)
- swi __NR_vfork
+ DO_CALL (vfork, 0)
cmn a1, #4096
RETINSTR(cc, lr)
@@ -58,7 +56,7 @@ ENTRY (__vfork)
#ifndef __ASSUME_VFORK_SYSCALL
/* If we don't have vfork, fork is close enough. */
- swi __NR_fork
+ DO_CALL (fork, 0)
cmn a1, #4096
RETINSTR(cc, lr)
#elif !defined __NR_vfork
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index cf6f253..9227bd7 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,7 +43,7 @@ ENTRY (__mmap)
mov r5, r5, lsr #12
/* do the syscall */
- swi SYS_ify (mmap2)
+ DO_CALL (mmap2, 0)
/* restore registers */
2:
@@ -77,7 +77,7 @@ ENTRY (__mmap)
/* do the syscall */
mov a1, sp
- swi SYS_ify (mmap)
+ DO_CALL (mmap, 0)
/* pop args off the stack. */
add sp, sp, #16
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index bb5e1dc..3c1f247 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -23,21 +23,13 @@
#include "kernel-features.h"
-/* For the EABI, there are four extra bytes of padding in the
- incoming arguments to mmap64, to preserve alignment. */
-#ifdef __ARM_EABI__
-# define INITIAL_OFFSET 8
-#else
-# define INITIAL_OFFSET 4
-#endif
-
#ifdef __ARMEB__
-# define LOW_OFFSET INITIAL_OFFSET + 4
+# define LOW_OFFSET 4 + 4
/* The initial + 4 is for the stack postdecrement. */
-# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
+# define HIGH_OFFSET 4 + 4 + 0
#else
-# define LOW_OFFSET INITIAL_OFFSET + 0
-# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
+# define LOW_OFFSET 4 + 0
+# define HIGH_OFFSET 4 + 4 + 4
#endif
/* The mmap2 system call takes six arguments, all in registers. */
@@ -55,7 +47,7 @@ ENTRY (__mmap64)
ldr r4, [sp, $8] @ load fd
orr r5, ip, r5, lsl $20 @ compose page offset
mov ip, r0
- swi SYS_ify (mmap2)
+ DO_CALL (mmap2, 0)
cmn r0, $4096
# ifdef __ASSUME_MMAP2_SYSCALL
ldr r4, [sp], #4
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 69f88eb..4c0fdfb 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -79,11 +79,7 @@ ENTRY (__socket)
P(PUSHARGS_,NARGS)
#if defined NEED_CANCELLATION && defined CENABLE
-#ifdef PIC
- SINGLE_THREAD_P_PIC(r3)
-#else
SINGLE_THREAD_P
-#endif
bne 1f
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 9ef5114..0e267b3 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -30,7 +30,7 @@
ENTRY (__vfork)
#ifdef __NR_vfork
- swi __NR_vfork
+ DO_CALL (vfork, 0)
cmn a1, #4096
RETINSTR(cc, lr)
@@ -45,7 +45,7 @@ ENTRY (__vfork)
#ifndef __ASSUME_VFORK_SYSCALL
/* If we don't have vfork, fork is close enough. */
- swi __NR_fork
+ DO_CALL (fork, 0)
cmn a1, #4096
RETINSTR(cc, lr)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c80f86b75e65a277c6999d07d7cb72bdbe02d281
commit c80f86b75e65a277c6999d07d7cb72bdbe02d281
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 11 19:42:24 2005 +0000
Linux/m68k fchownat implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/fchownat.c b/sysdeps/unix/sysv/linux/m68k/fchownat.c
new file mode 100644
index 0000000..71df4fe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fchownat.c
@@ -0,0 +1,121 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <linux/posix_types.h>
+#include "kernel-features.h"
+
+#ifdef __NR_chown32
+# if __ASSUME_32BITUIDS == 0
+/* This variable is shared with all files that need to check for 32bit
+ uids. */
+extern int __libc_missing_32bit_uids;
+# endif
+#endif /* __NR_chown32 */
+
+int
+fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+{
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ char *buf = NULL;
+
+ if (fd != AT_FDCWD && file[0] != '/')
+ {
+ size_t filelen = strlen (file);
+ static const char procfd[] = "/proc/self/fd/%d/%s";
+ /* Buffer for the path name we are going to use. It consists of
+ - the string /proc/self/fd/
+ - the file descriptor number
+ - the file name provided.
+ The final NUL is included in the sizeof. A bit of overhead
+ due to the format elements compensates for possible negative
+ numbers. */
+ size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
+ buf = alloca (buflen);
+
+ __snprintf (buf, buflen, procfd, fd, file);
+ file = buf;
+ }
+
+ int result;
+ INTERNAL_SYSCALL_DECL (err);
+
+#if __ASSUME_32BITUIDS > 0
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner,
+ group);
+ else
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+ group);
+#else
+# ifdef __NR_chown32
+ if (__libc_missing_32bit_uids <= 0)
+ {
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file),
+ owner, group);
+ else
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+ group);
+
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
+ goto fail;
+
+ __libc_missing_32bit_uids = 1;
+ }
+# endif /* __NR_chown32 */
+
+ if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
+ group);
+ else
+ result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner,
+ group);
+#endif
+
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+ {
+ fail:
+ __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+ result = -1;
+ }
+
+ return result;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e448eedb646d277eb4e7aafe482597dda454d640
commit e448eedb646d277eb4e7aafe482597dda454d640
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 11 19:17:50 2005 +0000
Linux/m68k fxstatat implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/fxstatat.c b/sysdeps/unix/sysv/linux/m68k/fxstatat.c
new file mode 100644
index 0000000..0f8b313
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fxstatat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstatat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=421e9748727643a89404fba439c4a235c2fa9a4e
commit 421e9748727643a89404fba439c4a235c2fa9a4e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 11 19:15:37 2005 +0000
Linux/Alpha fxstatat implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
new file mode 100644
index 0000000..65b7ad9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -0,0 +1,100 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __fxstatat64 __fxstatat64_disable
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <xstatconv.h>
+
+#undef __fxstatat64
+
+
+/* Get information about the file NAME in BUF. */
+int
+__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
+{
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ char *buf = NULL;
+
+ if (fd != AT_FDCWD && file[0] != '/')
+ {
+ size_t filelen = strlen (file);
+ static const char procfd[] = "/proc/self/fd/%d/%s";
+ /* Buffer for the path name we are going to use. It consists of
+ - the string /proc/self/fd/
+ - the file descriptor number
+ - the file name provided.
+ The final NUL is included in the sizeof. A bit of overhead
+ due to the format elements compensates for possible negative
+ numbers. */
+ size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
+ buf = alloca (buflen);
+
+ __snprintf (buf, buflen, procfd, fd, file);
+ file = buf;
+ }
+
+ INTERNAL_SYSCALL_DECL (err);
+ int result, errno_out;
+ struct kernel_stat kst;
+
+ if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
+ {
+ if (flags & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
+ else
+ result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
+
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ if (errno_out != ENOSYS)
+ goto fail;
+ __libc_missing_axp_stat64 = 1;
+ }
+
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
+ else
+ result = INTERNAL_SYSCALL (stat, err, 2, file, &kst);
+
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat_conv (vers, &kst, st);
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+
+ fail:
+ __atfct_seterrno (errno_out, fd, buf);
+
+ return -1;
+}
+hidden_def (__xstat)
+weak_alias (__xstat, _xstat);
+strong_alias (__xstat, __xstat64);
+hidden_ver (__xstat, __xstat64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=105d6c8a15b66ef8681636be1c34ae0477e066a5
commit 105d6c8a15b66ef8681636be1c34ae0477e066a5
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 00:57:19 2005 +0000
.
diff --git a/ChangeLog.powerpc b/ChangeLog.powerpc
new file mode 100644
index 0000000..7136a0b
--- /dev/null
+++ b/ChangeLog.powerpc
@@ -0,0 +1,3 @@
+2005-10-11 Steven Munroe <sjmunroe@us.ibm.com>
+
+ * sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ff54449d657d4559e655846d81b920258a7447e
commit 0ff54449d657d4559e655846d81b920258a7447e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 00:56:23 2005 +0000
2005-10-11 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/nofpu/fesetround.c: Add libm_hidden_def.
diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/sysdeps/powerpc/nofpu/fesetround.c
index 842614a..a5f8367 100644
--- a/sysdeps/powerpc/nofpu/fesetround.c
+++ b/sysdeps/powerpc/nofpu/fesetround.c
@@ -31,3 +31,4 @@ fesetround (int round)
return 0;
}
+libm_hidden_def (fesetround)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb519ed7bc401867a2975bc445515369bd8c8072
commit eb519ed7bc401867a2975bc445515369bd8c8072
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Nov 6 02:05:16 2005 +0000
Remove use of HAVE_GNU_LD.
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 07af96d..9f821a0 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994,1995,1997,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,6 @@
#define SYS_brk 17
#endif
-#ifndef HAVE_GNU_LD
-#define __end _end
-#endif
-
.data
.globl ___curbrk
___curbrk:
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index 73ee796..13af476 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,11 +34,7 @@ _sethostid:
moveq #-1, d0
rts
-#ifdef HAVE_GNU_LD
-
.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0
.stabs "_sethostid",1,0,0,0
#endif
-
-#endif
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index d07fd38..100fb1c 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,11 +36,8 @@ ENTRY (sethostid)
retl
sub %g0, 1, %o0
-#ifdef HAVE_GNU_LD
.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0
.stabs "_sethostid",1,0,0,0
#endif
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4962a991a381451841f0c19650e487198e341247
commit 4962a991a381451841f0c19650e487198e341247
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Nov 3 14:42:00 2005 +0000
* sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 3b59189..1379078 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2005-11-03 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Add LGPL exception.
+
2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c,
diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
index 4a7b951..7691a94 100644
--- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
+++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
@@ -6,6 +6,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ffe91e225254d4bc2c3db3e1f5e2a115535fd265
commit ffe91e225254d4bc2c3db3e1f5e2a115535fd265
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 31 21:05:09 2005 +0000
* sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c,
sysdeps/arm/eabi/aeabi_sighandlers.S: Add LGPL exception.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 5a27250..3b59189 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/eabi/aeabi_lcsts.c, sysdeps/arm/eabi/aeabi_math.c,
+ sysdeps/arm/eabi/aeabi_sighandlers.S: Add LGPL exception.
+
+2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/eabi/Makefile (static-only-routines): Remove
$(aeabi_routines).
* sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability
diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c
index 6ca2ea3..99c7985 100644
--- a/sysdeps/arm/eabi/aeabi_lcsts.c
+++ b/sysdeps/arm/eabi/aeabi_lcsts.c
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/arm/eabi/aeabi_math.c b/sysdeps/arm/eabi/aeabi_math.c
index b33330d..e7f1dbf 100644
--- a/sysdeps/arm/eabi/aeabi_math.c
+++ b/sysdeps/arm/eabi/aeabi_math.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -6,6 +6,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/arm/eabi/aeabi_sighandlers.S b/sysdeps/arm/eabi/aeabi_sighandlers.S
index 586ba88..ff8162e 100644
--- a/sysdeps/arm/eabi/aeabi_sighandlers.S
+++ b/sysdeps/arm/eabi/aeabi_sighandlers.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f56b8b7c820e8e6cf44a80a4e2c9b2ba5e48aa47
commit f56b8b7c820e8e6cf44a80a4e2c9b2ba5e48aa47
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 31 20:49:25 2005 +0000
* sysdeps/arm/eabi/Makefile (static-only-routines): Remove
$(aeabi_routines).
* sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability
routines.
* sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
sysdeps/arm/eabi/aeabi_errno_addr.c,
sysdeps/arm/eabi/aeabi_localeconv.c,
sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c,
sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c,
sysdeps/arm/eabi/aeabi_memset.c: Remove attribute_hidden.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 38bfdf0..5a27250 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,18 @@
2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/eabi/Makefile (static-only-routines): Remove
+ $(aeabi_routines).
+ * sysdeps/arm/eabi/Versions (GLIBC_2.4): Add ARM EABI portability
+ routines.
+ * sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
+ sysdeps/arm/eabi/aeabi_errno_addr.c,
+ sysdeps/arm/eabi/aeabi_localeconv.c,
+ sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c,
+ sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c,
+ sysdeps/arm/eabi/aeabi_memset.c: Remove attribute_hidden.
+
+2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define.
2005-10-27 Daniel Jacobowitz <dan@codesourcery.com>
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
index 34b0027..0f92d7a 100644
--- a/sysdeps/arm/eabi/Makefile
+++ b/sysdeps/arm/eabi/Makefile
@@ -5,7 +5,7 @@ aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
aeabi_memmove aeabi_memset
sysdep_routines += $(aeabi_constants) $(aeabi_routines)
-static-only-routines += $(aeabi_constants) $(aeabi_routines)
+static-only-routines += $(aeabi_constants)
# get offset to rtld_global._dl_hwcap
gen-as-const-headers += rtld-global-offsets.sym
diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions
index 6d7a734..ca51099 100644
--- a/sysdeps/arm/eabi/Versions
+++ b/sysdeps/arm/eabi/Versions
@@ -1,5 +1,16 @@
libc {
GLIBC_2.4 {
+ # ARM EABI compatibility routines
+ __aeabi_assert;
+ __aeabi_atexit;
+ __aeabi_errno_addr;
+ __aeabi_localeconv;
+ __aeabi_MB_CUR_MAX;
+ __aeabi_memclr; __aeabi_memclr4; __aeabi_memclr8;
+ __aeabi_memcpy; __aeabi_memcpy4; __aeabi_memcpy8;
+ __aeabi_memmove; __aeabi_memmove4; __aeabi_memmove8;
+ __aeabi_memset; __aeabi_memset4; __aeabi_memset8;
+
# Helper routines
__gnu_Unwind_Find_exidx;
}
diff --git a/sysdeps/arm/eabi/aeabi_assert.c b/sysdeps/arm/eabi/aeabi_assert.c
index ccedbe6..14801c2 100644
--- a/sysdeps/arm/eabi/aeabi_assert.c
+++ b/sysdeps/arm/eabi/aeabi_assert.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <assert.h>
#include <stdlib.h>
-void attribute_hidden
+void
__aeabi_assert (const char *assertion, const char *file,
unsigned int line)
{
diff --git a/sysdeps/arm/eabi/aeabi_atexit.c b/sysdeps/arm/eabi/aeabi_atexit.c
index b12cda4..697f54c 100644
--- a/sysdeps/arm/eabi/aeabi_atexit.c
+++ b/sysdeps/arm/eabi/aeabi_atexit.c
@@ -21,7 +21,7 @@
/* Register a function to be called by exit or when a shared library
is unloaded. This routine is like __cxa_atexit, but uses the
calling sequence required by the ARM EABI. */
-int attribute_hidden
+int
__aeabi_atexit (void *arg, void (*func) (void *), void *d)
{
return __cxa_atexit (func, arg, d);
diff --git a/sysdeps/arm/eabi/aeabi_errno_addr.c b/sysdeps/arm/eabi/aeabi_errno_addr.c
index 748edd3..09bdc1e 100644
--- a/sysdeps/arm/eabi/aeabi_errno_addr.c
+++ b/sysdeps/arm/eabi/aeabi_errno_addr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <errno.h>
-attribute_hidden
volatile int *
__aeabi_errno_addr (void)
{
diff --git a/sysdeps/arm/eabi/aeabi_localeconv.c b/sysdeps/arm/eabi/aeabi_localeconv.c
index 2dd82df..f4e51d0 100644
--- a/sysdeps/arm/eabi/aeabi_localeconv.c
+++ b/sysdeps/arm/eabi/aeabi_localeconv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <locale.h>
-attribute_hidden
struct lconv *
__aeabi_localeconv (void)
{
diff --git a/sysdeps/arm/eabi/aeabi_mb_cur_max.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c
index 62e4c4b..866da79 100644
--- a/sysdeps/arm/eabi/aeabi_mb_cur_max.c
+++ b/sysdeps/arm/eabi/aeabi_mb_cur_max.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <locale/localeinfo.h>
-int attribute_hidden
+int
__aeabi_MB_CUR_MAX (void)
{
return MB_CUR_MAX;
diff --git a/sysdeps/arm/eabi/aeabi_memclr.c b/sysdeps/arm/eabi/aeabi_memclr.c
index 8add8af..986de85 100644
--- a/sysdeps/arm/eabi/aeabi_memclr.c
+++ b/sysdeps/arm/eabi/aeabi_memclr.c
@@ -20,12 +20,12 @@
/* Clear memory. Can't alias to bzero because it's not defined in the
same translation unit. */
-void attribute_hidden
+void
__aeabi_memclr (void *dest, size_t n)
{
__bzero (dest, n);
}
/* Versions of the above which may assume memory alignment. */
-strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr4)
-strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr8)
+strong_alias (__aeabi_memclr, __aeabi_memclr4)
+strong_alias (__aeabi_memclr, __aeabi_memclr8)
diff --git a/sysdeps/arm/eabi/aeabi_memcpy.c b/sysdeps/arm/eabi/aeabi_memcpy.c
index d7cd403..7d7c47b 100644
--- a/sysdeps/arm/eabi/aeabi_memcpy.c
+++ b/sysdeps/arm/eabi/aeabi_memcpy.c
@@ -21,12 +21,12 @@
/* Copy memory like memcpy, but no return value required. Can't alias
to memcpy because it's not defined in the same translation
unit. */
-void attribute_hidden
+void
__aeabi_memcpy (void *dest, const void *src, size_t n)
{
memcpy (dest, src, n);
}
/* Versions of the above which may assume memory alignment. */
-strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy4)
-strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy8)
+strong_alias (__aeabi_memcpy, __aeabi_memcpy4)
+strong_alias (__aeabi_memcpy, __aeabi_memcpy8)
diff --git a/sysdeps/arm/eabi/aeabi_memmove.c b/sysdeps/arm/eabi/aeabi_memmove.c
index 32ed3b1..b2a4e35 100644
--- a/sysdeps/arm/eabi/aeabi_memmove.c
+++ b/sysdeps/arm/eabi/aeabi_memmove.c
@@ -21,12 +21,12 @@
/* Copy memory like memmove, but no return value required. Can't
alias to memmove because it's not defined in the same translation
unit. */
-void attribute_hidden
+void
__aeabi_memmove (void *dest, const void *src, size_t n)
{
memmove (dest, src, n);
}
/* Versions of the above which may assume memory alignment. */
-strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove4)
-strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove8)
+strong_alias (__aeabi_memmove, __aeabi_memmove4)
+strong_alias (__aeabi_memmove, __aeabi_memmove8)
diff --git a/sysdeps/arm/eabi/aeabi_memset.c b/sysdeps/arm/eabi/aeabi_memset.c
index d7232af..ed38bde 100644
--- a/sysdeps/arm/eabi/aeabi_memset.c
+++ b/sysdeps/arm/eabi/aeabi_memset.c
@@ -20,12 +20,12 @@
/* Set memory like memset, but different argument order and no return
value required. */
-void attribute_hidden
+void
__aeabi_memset (void *dest, size_t n, int c)
{
memset (dest, c, n);
}
/* Versions of the above which may assume memory alignment. */
-strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset4)
-strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset8)
+strong_alias (__aeabi_memset, __aeabi_memset4)
+strong_alias (__aeabi_memset, __aeabi_memset8)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56cf6cc523f4b6e589f517c843aab8e913903b99
commit 56cf6cc523f4b6e589f517c843aab8e913903b99
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 31 20:41:32 2005 +0000
* sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 4cf9c1a..38bfdf0 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2005-10-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/bits/mman.h (MREMAP_FIXED): Define.
+
2005-10-27 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 4ec6839..7430f15 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/ARM version.
- Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,6 +78,7 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
/* Advice to `madvise'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7837483d3d1baaae6ef46f0634e059f1ca15e83
commit e7837483d3d1baaae6ef46f0634e059f1ca15e83
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Thu Oct 27 18:50:12 2005 +0000
* sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index f38a929..4cf9c1a 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,7 @@
+2005-10-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/socket.S: Honor NO_WEAK_ALIAS.
+
2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Julian Brown <julian@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 212a489..69f88eb 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -1,4 +1,6 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +34,11 @@
The .S files for the other calls just #define socket and #include this. */
#ifndef __socket
+#ifndef NO_WEAK_ALIAS
#define __socket P(__,socket)
+#else
+#define __socket socket
+#endif
#endif
#define PUSHARGS_1 str a1, [sp, $-4]!
@@ -120,4 +126,6 @@ ENTRY (__socket)
PSEUDO_END (__socket)
+#ifndef NO_WEAK_ALIAS
weak_alias (__socket, socket)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=011363465f62d18b898601d590615a97a203cc61
commit 011363465f62d18b898601d590615a97a203cc61
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 20 05:24:59 2005 +0000
Return the correct result when the same dividend and divisor are provided,
and they're negative numbers.
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index f2a8a4d..ef3cdb1 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -240,7 +240,7 @@ $y_is_neg:
/* If we get here, Y is so big that bit 63 is set. The results
from the divide will be completely wrong. Fortunately, the
quotient must be either 0 or 1, so just compute it directly. */
- cmpult Y, X, RV
+ cmpule Y, X, RV
excb
mt_fpcr $f3
ldt $f0, 0(sp)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index dcc1c88..398a345 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -246,7 +246,7 @@ $y_is_neg:
from the divide will be completely wrong. Fortunately, the
quotient must be either 0 or 1, so the remainder must be X
or X-Y, so just compute it directly. */
- cmpult Y, X, AT
+ cmpule Y, X, AT
subq X, Y, RV
ldt $f0, 0(sp)
cmoveq AT, X, RV
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb34460f46706ee12f1b4eeb58162023f009436e
commit eb34460f46706ee12f1b4eeb58162023f009436e
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 10 15:36:01 2005 +0000
Correct attribution goof.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 35119ca..f38a929 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,4 +1,8 @@
2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
* sysdeps/arm/dl-machine.h (_dl_start_user): Preserve eight-byte
stack alignment.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f10eff5832a482175932652149a25eb76cf88a29
commit f10eff5832a482175932652149a25eb76cf88a29
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 10 15:29:32 2005 +0000
Add ARM EABI port.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index edb7517..35119ca 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,64 @@
2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/dl-machine.h (_dl_start_user): Preserve eight-byte
+ stack alignment.
+
+ * sysdeps/arm/elf/start.S (_start): Add unwind markers for EABI
+ targets.
+
+ * sysdeps/arm/preconfigure: Set machine for EABI targets. Remove
+ obsolete Thumb support.
+
+ * sysdeps/arm/shlib-versions: Add EABI support.
+
+ * sysdeps/unix/sysv/linux/arm/mmap64.S (__mmap64): Allow for padding
+ in the argument list for EABI targets.
+
+ * sysdeps/arm/fpu/feholdexcpt.c, sysdeps/arm/fpu/fesetround.c: Add
+ libm_hidden_def.
+
+ * sysdeps/arm/dl-sysdep.h, sysdeps/arm/eabi/Makefile,
+ sysdeps/arm/eabi/Versions, sysdeps/arm/eabi/__longjmp.S,
+ sysdeps/arm/eabi/aeabi_assert.c, sysdeps/arm/eabi/aeabi_atexit.c,
+ sysdeps/arm/eabi/aeabi_errno_addr.c, sysdeps/arm/eabi/aeabi_lcsts.c,
+ sysdeps/arm/eabi/aeabi_localeconv.c, sysdeps/arm/eabi/aeabi_math.c,
+ sysdeps/arm/eabi/aeabi_mb_cur_max.c, sysdeps/arm/eabi/aeabi_memclr.c,
+ sysdeps/arm/eabi/aeabi_memcpy.c, sysdeps/arm/eabi/aeabi_memmove.c
+ sysdeps/arm/eabi/aeabi_memset.c, sysdeps/arm/eabi/aeabi_sighandlers.S,
+ sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c, sysdeps/arm/eabi/bits/fenv.h,
+ sysdeps/arm/eabi/bits/huge_val.h, sysdeps/arm/eabi/bits/setjmp.h,
+ sysdeps/arm/eabi/fclrexcpt.c, sysdeps/arm/eabi/fedisblxcpt.c,
+ sysdeps/arm/eabi/feenablxcpt.c, sysdeps/arm/eabi/fegetenv.c,
+ sysdeps/arm/eabi/fegetexcept.c, sysdeps/arm/eabi/fegetround.c,
+ sysdeps/arm/eabi/feholdexcpt.c, sysdeps/arm/eabi/fesetenv.c,
+ sysdeps/arm/eabi/fesetround.c, sysdeps/arm/eabi/find_exidx.c,
+ sysdeps/arm/eabi/fpu_control.h, sysdeps/arm/eabi/fraiseexcpt.c,
+ sysdeps/arm/eabi/fsetexcptflg.c, sysdeps/arm/eabi/ftestexcept.c,
+ sysdeps/arm/eabi/setjmp.S, sysdeps/unix/sysv/linux/arm/eabi/configure,
+ sysdeps/arm/eabi/rtld-global-offsets.sym, sysdeps/arm/eabi/setfpucw.c,
+ sysdeps/unix/sysv/linux/arm/eabi/configure.in,
+ sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fcntl.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h,
+ sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h,
+ sysdeps/unix/sysv/linux/arm/eabi/lockf64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c,
+ sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c,
+ sysdeps/unix/sysv/linux/arm/eabi/statfs64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/syscalls.list,
+ sysdeps/unix/sysv/linux/arm/eabi/uname.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstat64.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c,
+ sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h: New files.
+
+2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/memset.S (memset): Correct handling of negative
arguments.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2534be1..8011706 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -157,22 +157,19 @@ _dl_start_user:\n\
add sl, pc, sl\n\
.L_GOT_GOT:\n\
ldr r4, [sl, r4]\n\
- @ get the original arg count\n\
- ldr r1, [sp]\n\
@ save the entry point in another register\n\
mov r6, r0\n\
- @ adjust the stack pointer to skip the extra args\n\
- add sp, sp, r4, lsl #2\n\
- @ subtract _dl_skip_args from original arg count\n\
- sub r1, r1, r4\n\
+ @ get the original arg count\n\
+ ldr r1, [sp]\n\
@ get the argv address\n\
add r2, sp, #4\n\
- @ store the new argc in the new stack location\n\
- str r1, [sp]\n\
+ @ Fix up the stack if necessary.\n\
+ cmp r4, #0\n\
+ bne .L_fixup_stack\n\
+.L_done_fixup:\n\
@ compute envp\n\
add r3, r2, r1, lsl #2\n\
add r3, r3, #4\n\
-\n\
@ now we call _dl_init\n\
ldr r0, .L_LOADED\n\
ldr r0, [sl, r0]\n\
@@ -183,12 +180,45 @@ _dl_start_user:\n\
add r0, sl, r0\n\
@ jump to the user_s entry point\n\
" BX(r6) "\n\
+\n\
+ @ iWMMXt and EABI targets require the stack to be eight byte\n\
+ @ aligned - shuffle arguments etc.\n\
+.L_fixup_stack:\n\
+ @ subtract _dl_skip_args from original arg count\n\
+ sub r1, r1, r4\n\
+ @ store the new argc in the new stack location\n\
+ str r1, [sp]\n\
+ @ find the first unskipped argument\n\
+ mov r3, r2\n\
+ add r4, r2, r4, lsl #2\n\
+ @ shuffle argv down\n\
+1: ldr r5, [r4], #4\n\
+ str r5, [r3], #4\n\
+ cmp r5, #0\n\
+ bne 1b\n\
+ @ shuffle envp down\n\
+1: ldr r5, [r4], #4\n\
+ str r5, [r3], #4\n\
+ cmp r5, #0\n\
+ bne 1b\n\
+ @ shuffle auxv down\n\
+1: ldmia r4!, {r0, r5}\n\
+ stmia r3!, {r0, r5}\n\
+ cmp r0, #0\n\
+ bne 1b\n\
+ @ Update _dl_argv\n\
+ ldr r3, .L_ARGV\n\
+ str r2, [sl, r3]\n\
+ b .L_done_fixup\n\
+\n\
.L_GET_GOT:\n\
.word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
.L_SKIP_ARGS:\n\
.word _dl_skip_args(GOTOFF)\n\
.L_FINI_PROC:\n\
.word _dl_fini(GOTOFF)\n\
+.L_ARGV:\n\
+ .word _dl_argv(GOTOFF)\n\
.L_LOADED:\n\
.word _rtld_local(GOTOFF)\n\
.previous\n\
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/dl-sysdep.h
similarity index 72%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/dl-sysdep.h
index bdb849f..cd678f4 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/dl-sysdep.h
@@ -1,5 +1,5 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* System-specific settings for dynamic linker code. Alpha version.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include_next <dl-sysdep.h>
-int
-fesetround (int round)
-{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
-}
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
diff --git a/sysdeps/arm/eabi/Makefile b/sysdeps/arm/eabi/Makefile
new file mode 100644
index 0000000..34b0027
--- /dev/null
+++ b/sysdeps/arm/eabi/Makefile
@@ -0,0 +1,22 @@
+ifeq ($(subdir),csu)
+aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
+aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
+ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+ aeabi_memmove aeabi_memset
+
+sysdep_routines += $(aeabi_constants) $(aeabi_routines)
+static-only-routines += $(aeabi_constants) $(aeabi_routines)
+
+# get offset to rtld_global._dl_hwcap
+gen-as-const-headers += rtld-global-offsets.sym
+endif
+
+ifeq ($(subdir),elf)
+sysdep_routines += aeabi_unwind_cpp_pr1 find_exidx
+shared-only-routines += aeabi_unwind_cpp_pr1
+sysdep-rtld-routines += aeabi_unwind_cpp_pr1
+endif
+
+ifeq ($(subdir),math)
+$(objpfx)libm.so: $(elfobjdir)/ld.so
+endif
diff --git a/sysdeps/arm/eabi/Versions b/sysdeps/arm/eabi/Versions
new file mode 100644
index 0000000..6d7a734
--- /dev/null
+++ b/sysdeps/arm/eabi/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.4 {
+ # Helper routines
+ __gnu_Unwind_Find_exidx;
+ }
+}
diff --git a/sysdeps/arm/eabi/__longjmp.S b/sysdeps/arm/eabi/__longjmp.S
new file mode 100644
index 0000000..5677633
--- /dev/null
+++ b/sysdeps/arm/eabi/__longjmp.S
@@ -0,0 +1,85 @@
+/* longjmp for ARM.
+ Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+#define __ASSEMBLY__
+#include <asm/procinfo.h>
+#include <rtld-global-offsets.h>
+
+/* __longjmp(jmpbuf, val) */
+
+ENTRY (__longjmp)
+ mov ip, r0
+ movs r0, r1 /* get the return value in place */
+ moveq r0, #1 /* can't let setjmp() return zero! */
+
+ LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
+
+#ifdef IS_IN_rtld
+ ldr a2, 1f
+ ldr a3, Lrtld_local_ro
+0: add a2, pc, a2
+ add a2, a2, a3
+ ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+#ifdef PIC
+ ldr a2, 1f
+ ldr a3, Lrtld_global_ro
+0: add a2, pc, a2
+ ldr a2, [a2, a3]
+ ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+ ldr a2, Lhwcap
+ ldr a2, [a2, #0]
+#endif
+#endif
+
+ tst a2, #HWCAP_VFP
+ beq Lno_vfp
+
+ /* Restore the VFP registers. */
+ /* Following instruction is fldmiax ip!, {d8-d15}. */
+ ldc p11, cr8, [r12], #68
+ /* Restore the floating-point status register. */
+ ldr r1, [ip], #4
+ /* Following instruction is fmxr fpscr, r1. */
+ mcr p10, 7, r1, cr1, cr0, 0
+Lno_vfp:
+
+ DO_RET(lr)
+
+#ifdef IS_IN_rtld
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_local_ro:
+ .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+#else
+#ifdef PIC
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_global_ro:
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+#else
+Lhwcap:
+ .long C_SYMBOL_NAME(_dl_hwcap)
+#endif
+#endif
+
+END (__longjmp)
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_assert.c
similarity index 76%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_assert.c
index bdb849f..ccedbe6 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_assert.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <assert.h>
+#include <stdlib.h>
-int
-fesetround (int round)
+void attribute_hidden
+__aeabi_assert (const char *assertion, const char *file,
+ unsigned int line)
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
+ __assert_fail (assertion, file, line, NULL);
}
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_atexit.c
similarity index 68%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_atexit.c
index bdb849f..b12cda4 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_atexit.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <stdlib.h>
-int
-fesetround (int round)
+/* Register a function to be called by exit or when a shared library
+ is unloaded. This routine is like __cxa_atexit, but uses the
+ calling sequence required by the ARM EABI. */
+int attribute_hidden
+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
+ return __cxa_atexit (func, arg, d);
}
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_errno_addr.c
similarity index 76%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_errno_addr.c
index bdb849f..748edd3 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_errno_addr.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <errno.h>
-int
-fesetround (int round)
+attribute_hidden
+volatile int *
+__aeabi_errno_addr (void)
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
+ return &errno;
}
diff --git a/sysdeps/arm/eabi/aeabi_lcsts.c b/sysdeps/arm/eabi/aeabi_lcsts.c
new file mode 100644
index 0000000..6ca2ea3
--- /dev/null
+++ b/sysdeps/arm/eabi/aeabi_lcsts.c
@@ -0,0 +1,67 @@
+/* Link-time constants for ARM EABI.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The ARM EABI requires that we provide ISO compile-time constants as
+ link-time constants. Some portable applications may reference these. */
+
+#include <errno.h>
+#include <limits.h>
+#include <locale.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+#include <time.h>
+
+#define eabi_constant2(X,Y) const int __aeabi_##X attribute_hidden = Y
+#define eabi_constant(X) const int __aeabi_##X attribute_hidden = X
+
+eabi_constant (EDOM);
+eabi_constant (ERANGE);
+eabi_constant (EILSEQ);
+
+eabi_constant (MB_LEN_MAX);
+
+eabi_constant (LC_COLLATE);
+eabi_constant (LC_CTYPE);
+eabi_constant (LC_MONETARY);
+eabi_constant (LC_NUMERIC);
+eabi_constant (LC_TIME);
+eabi_constant (LC_ALL);
+
+/* The value of __aeabi_JMP_BUF_SIZE is the number of doublewords in a
+ jmp_buf. */
+eabi_constant2 (JMP_BUF_SIZE, sizeof (jmp_buf) / 8);
+
+eabi_constant (SIGABRT);
+eabi_constant (SIGFPE);
+eabi_constant (SIGILL);
+eabi_constant (SIGINT);
+eabi_constant (SIGSEGV);
+eabi_constant (SIGTERM);
+
+eabi_constant2 (IOFBF, _IOFBF);
+eabi_constant2 (IOLBF, _IOLBF);
+eabi_constant2 (IONBF, _IONBF);
+eabi_constant (BUFSIZ);
+eabi_constant (FOPEN_MAX);
+eabi_constant (TMP_MAX);
+eabi_constant (FILENAME_MAX);
+eabi_constant (L_tmpnam);
+
+eabi_constant (CLOCKS_PER_SEC);
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_localeconv.c
similarity index 76%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_localeconv.c
index bdb849f..2dd82df 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_localeconv.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <locale.h>
-int
-fesetround (int round)
+attribute_hidden
+struct lconv *
+__aeabi_localeconv (void)
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
+ return localeconv ();
}
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_math.c
similarity index 68%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_math.c
index bdb849f..b33330d 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_math.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <math.h>
-int
-fesetround (int round)
-{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
-}
+const double __aeabi_HUGE_VAL attribute_hidden = HUGE_VAL;
+const long double __aeabi_HUGE_VALL attribute_hidden = HUGE_VALL;
+const float __aeabi_HUGE_VALF attribute_hidden = HUGE_VALF;
+const float __aeabi_INFINITY attribute_hidden = INFINITY;
+const float __aeabi_NAN attribute_hidden = NAN;
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/eabi/aeabi_mb_cur_max.c
similarity index 76%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/arm/eabi/aeabi_mb_cur_max.c
index bdb849f..62e4c4b 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/eabi/aeabi_mb_cur_max.c
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <langinfo.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <locale/localeinfo.h>
-int
-fesetround (int round)
+int attribute_hidden
+__aeabi_MB_CUR_MAX (void)
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
+ return MB_CUR_MAX;
}
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_memclr.c
similarity index 64%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_memclr.c
index 203b068..8add8af 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_memclr.c
@@ -1,5 +1,4 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <string.h>
-int
-feholdexcept (fenv_t *envp)
+/* Clear memory. Can't alias to bzero because it's not defined in the
+ same translation unit. */
+void attribute_hidden
+__aeabi_memclr (void *dest, size_t n)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
-
- return 0;
+ __bzero (dest, n);
}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr4)
+strong_alias (__aeabi_memclr, attribute_hidden __aeabi_memclr8)
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_memcpy.c
similarity index 61%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_memcpy.c
index 203b068..d7cd403 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_memcpy.c
@@ -1,5 +1,4 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +16,17 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <string.h>
-int
-feholdexcept (fenv_t *envp)
+/* Copy memory like memcpy, but no return value required. Can't alias
+ to memcpy because it's not defined in the same translation
+ unit. */
+void attribute_hidden
+__aeabi_memcpy (void *dest, const void *src, size_t n)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
-
- return 0;
+ memcpy (dest, src, n);
}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy4)
+strong_alias (__aeabi_memcpy, attribute_hidden __aeabi_memcpy8)
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_memmove.c
similarity index 60%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_memmove.c
index 203b068..32ed3b1 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_memmove.c
@@ -1,5 +1,4 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +16,17 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <string.h>
-int
-feholdexcept (fenv_t *envp)
+/* Copy memory like memmove, but no return value required. Can't
+ alias to memmove because it's not defined in the same translation
+ unit. */
+void attribute_hidden
+__aeabi_memmove (void *dest, const void *src, size_t n)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
-
- return 0;
+ memmove (dest, src, n);
}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove4)
+strong_alias (__aeabi_memmove, attribute_hidden __aeabi_memmove8)
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_memset.c
similarity index 64%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_memset.c
index 203b068..d7232af 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_memset.c
@@ -1,5 +1,4 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +16,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <string.h>
-int
-feholdexcept (fenv_t *envp)
+/* Set memory like memset, but different argument order and no return
+ value required. */
+void attribute_hidden
+__aeabi_memset (void *dest, size_t n, int c)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
-
- return 0;
+ memset (dest, c, n);
}
+
+/* Versions of the above which may assume memory alignment. */
+strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset4)
+strong_alias (__aeabi_memset, attribute_hidden __aeabi_memset8)
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_sighandlers.S
similarity index 61%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_sighandlers.S
index 203b068..586ba88 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_sighandlers.S
@@ -1,5 +1,5 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Link-time constants for ARM EABI - signal handlers.
+ Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,21 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+/* The ARM EABI defines these as "functions". */
-int
-feholdexcept (fenv_t *envp)
-{
- unsigned long int temp;
+#include <sysdep.h>
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
+ .global __aeabi_SIG_DFL
+ .hidden __aeabi_SIG_DFL
+ .type __aeabi_SIG_DFL, %function
+ .set __aeabi_SIG_DFL, 0
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
+ .global __aeabi_SIG_IGN
+ .hidden __aeabi_SIG_IGN
+ .type __aeabi_SIG_IGN, %function
+ .set __aeabi_SIG_IGN, 1
- return 0;
-}
+ .global __aeabi_SIG_ERR
+ .hidden __aeabi_SIG_ERR
+ .type __aeabi_SIG_ERR, %function
+ .set __aeabi_SIG_ERR, -1
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
similarity index 55%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
index 203b068..91df013 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/aeabi_unwind_cpp_pr1.c
@@ -1,5 +1,4 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +16,37 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+/* Because some objects in ld.so and libc.so are built with
+ -fexceptions, we end up with references to this personality
+ routine. However, these libraries are not linked against
+ libgcc_eh.a, so we need a dummy definition. This routine will
+ never actually be called. */
-int
-feholdexcept (fenv_t *envp)
-{
- unsigned long int temp;
+#include <stdlib.h>
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr0 (void)
+{
+#ifndef IS_IN_rtld
+ abort ();
+#endif
+}
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr1 (void)
+{
+#ifndef IS_IN_rtld
+ abort ();
+#endif
+}
- return 0;
+attribute_hidden
+void
+__aeabi_unwind_cpp_pr2 (void)
+{
+#ifndef IS_IN_rtld
+ abort ();
+#endif
}
diff --git a/sysdeps/arm/eabi/bits/fenv.h b/sysdeps/arm/eabi/bits/fenv.h
new file mode 100644
index 0000000..49e3862
--- /dev/null
+++ b/sysdeps/arm/eabi/bits/fenv.h
@@ -0,0 +1,74 @@
+/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing exceptions in the FPU status word. */
+enum
+ {
+ FE_INVALID = 1,
+#define FE_INVALID FE_INVALID
+ FE_DIVBYZERO = 2,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_OVERFLOW = 4,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 8,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 16,
+#define FE_INEXACT FE_INEXACT
+ };
+
+/* Amount to shift by to convert an exception to a mask bit. */
+#define FE_EXCEPT_SHIFT 8
+
+/* All supported exceptions. */
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)
+
+/* VFP supports all of the four defined rounding modes. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_UPWARD = 0x400000,
+#define FE_UPWARD FE_UPWARD
+ FE_DOWNWARD = 0x800000,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_TOWARDZERO = 0xc00000
+#define FE_TOWARDZERO FE_TOWARDZERO
+ };
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef struct
+ {
+ unsigned int __cw;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1l)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
+#endif
diff --git a/sysdeps/arm/eabi/bits/huge_val.h b/sysdeps/arm/eabi/bits/huge_val.h
new file mode 100644
index 0000000..11ca11f
--- /dev/null
+++ b/sysdeps/arm/eabi/bits/huge_val.h
@@ -0,0 +1,55 @@
+/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VAL (__builtin_huge_val())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VAL (__extension__ 0x1.0p2047)
+#elif defined __GNUC__
+
+# define HUGE_VAL \
+ (__extension__ \
+ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
+ { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+# include <endian.h>
+
+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+# endif
+
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+# define HUGE_VAL (__huge_val.__d)
+
+#endif /* GCC. */
diff --git a/sysdeps/arm/eabi/bits/setjmp.h b/sysdeps/arm/eabi/bits/setjmp.h
new file mode 100644
index 0000000..3bb92dd
--- /dev/null
+++ b/sysdeps/arm/eabi/bits/setjmp.h
@@ -0,0 +1,45 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Define the machine-dependent type `jmp_buf'. ARM EABI version. */
+
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+/* The exact set of registers saved may depend on the particular core
+ in use, as some coprocessor registers may need to be saved. The C
+ Library ABI requires that the buffer be 8-byte aligned, and
+ recommends that the buffer contain 64 words. The first 28 words
+ are occupied by v1-v6, sl, fp, sp, pc, d8-d15, and fpscr. (Note
+ that d8-15 require 17 words, due to the use of fstmx.) */
+typedef int __jmp_buf[64] __attribute__((aligned (8)));
+#endif
+
+#define __JMP_BUF_SP 8
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+#endif
diff --git a/sysdeps/arm/eabi/fclrexcpt.c b/sysdeps/arm/eabi/fclrexcpt.c
new file mode 100644
index 0000000..6e5d242
--- /dev/null
+++ b/sysdeps/arm/eabi/fclrexcpt.c
@@ -0,0 +1,61 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+__feclearexcept (int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long int temp;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Get the current floating point status. */
+ _FPU_GETCW (temp);
+
+ /* Clear the relevant bits. */
+ temp = (temp & ~FE_ALL_EXCEPT) | (temp & FE_ALL_EXCEPT & ~excepts);
+
+ /* Put the new data in effect. */
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feclearexcept, __old_feclearexcept)
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fedisblxcpt.c b/sysdeps/arm/eabi/fedisblxcpt.c
new file mode 100644
index 0000000..414d34b
--- /dev/null
+++ b/sysdeps/arm/eabi/fedisblxcpt.c
@@ -0,0 +1,51 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+fedisableexcept (int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+ _FPU_GETCW(new_exc);
+
+ old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc &= ~(excepts << FE_EXCEPT_SHIFT);
+
+ _FPU_SETCW(new_exc);
+
+ return old_exc;
+ }
+
+ /* Unsupported, so return -1 for failure. */
+ return -1;
+}
diff --git a/sysdeps/arm/eabi/feenablxcpt.c b/sysdeps/arm/eabi/feenablxcpt.c
new file mode 100644
index 0000000..e104bc4
--- /dev/null
+++ b/sysdeps/arm/eabi/feenablxcpt.c
@@ -0,0 +1,51 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+feenableexcept (int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long int new_exc, old_exc;
+
+ _FPU_GETCW(new_exc);
+
+ old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc |= (excepts << FE_EXCEPT_SHIFT);
+
+ _FPU_SETCW(new_exc);
+
+ return old_exc;
+ }
+
+ /* Unsupported, so return -1 for failure. */
+ return -1;
+}
diff --git a/sysdeps/arm/eabi/fegetenv.c b/sysdeps/arm/eabi/fegetenv.c
new file mode 100644
index 0000000..178d22a
--- /dev/null
+++ b/sysdeps/arm/eabi/fegetenv.c
@@ -0,0 +1,51 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+__fegetenv (fenv_t *envp)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long int temp;
+ _FPU_GETCW (temp);
+ envp->__cw = temp;
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fegetenv, __old_fegetenv)
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fegetexcept.c b/sysdeps/arm/eabi/fegetexcept.c
new file mode 100644
index 0000000..811c8ae
--- /dev/null
+++ b/sysdeps/arm/eabi/fegetexcept.c
@@ -0,0 +1,43 @@
+/* Get floating-point exceptions.
+ Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+fegetexcept (void)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long temp;
+
+ _FPU_GETCW (temp);
+
+ return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+ }
+
+ /* Unsupported. Return all exceptions disabled. */
+ return 0;
+}
diff --git a/sysdeps/arm/eabi/fegetround.c b/sysdeps/arm/eabi/fegetround.c
new file mode 100644
index 0000000..1c4be04
--- /dev/null
+++ b/sysdeps/arm/eabi/fegetround.c
@@ -0,0 +1,43 @@
+/* Return current rounding direction.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+fegetround (void)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned int temp;
+
+ /* Get the current environment. */
+ _FPU_GETCW (temp);
+
+ return temp & FE_TOWARDZERO;
+ }
+
+ /* The current soft-float implementation only handles TONEAREST. */
+ return FE_TONEAREST;
+}
diff --git a/sysdeps/arm/eabi/feholdexcpt.c b/sysdeps/arm/eabi/feholdexcpt.c
new file mode 100644
index 0000000..9872ea1
--- /dev/null
+++ b/sysdeps/arm/eabi/feholdexcpt.c
@@ -0,0 +1,54 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned long int temp;
+
+ /* Store the environment. */
+ _FPU_GETCW(temp);
+ envp->__cw = temp;
+
+ /* Now set all exceptions to non-stop. */
+ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
+
+ /* And clear all exception flags. */
+ temp &= ~FE_ALL_EXCEPT;
+
+ _FPU_SETCW(temp);
+
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+libm_hidden_def (feholdexcept)
diff --git a/sysdeps/arm/eabi/fesetenv.c b/sysdeps/arm/eabi/fesetenv.c
new file mode 100644
index 0000000..bf25384
--- /dev/null
+++ b/sysdeps/arm/eabi/fesetenv.c
@@ -0,0 +1,57 @@
+/* Install given floating-point environment.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+__fesetenv (const fenv_t *envp)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ unsigned int temp;
+
+ _FPU_GETCW (temp);
+ temp &= _FPU_RESERVED;
+
+ if (envp == FE_DFL_ENV)
+ temp |= _FPU_DEFAULT;
+ else if (envp == FE_NOMASK_ENV)
+ temp |= _FPU_IEEE;
+ else
+ temp |= envp->__cw & ~_FPU_RESERVED;
+
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+#include <shlib-compat.h>
+libm_hidden_ver (__fesetenv, fesetenv)
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/fesetround.c b/sysdeps/arm/eabi/fesetround.c
new file mode 100644
index 0000000..f6e20cb
--- /dev/null
+++ b/sysdeps/arm/eabi/fesetround.c
@@ -0,0 +1,57 @@
+/* Set current rounding direction.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+fesetround (int round)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ fpu_control_t temp;
+
+ switch (round)
+ {
+ case FE_TONEAREST:
+ case FE_UPWARD:
+ case FE_DOWNWARD:
+ case FE_TOWARDZERO:
+ _FPU_GETCW (temp);
+ temp = (temp & ~FE_TOWARDZERO) | round;
+ _FPU_SETCW (temp);
+ return 0;
+ default:
+ return 1;
+ }
+ }
+ else if (round == FE_TONEAREST)
+ /* This is the only supported rounding mode for soft-fp. */
+ return 0;
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+libm_hidden_def (fesetround)
diff --git a/sysdeps/arm/eabi/find_exidx.c b/sysdeps/arm/eabi/find_exidx.c
new file mode 100644
index 0000000..9e4f401
--- /dev/null
+++ b/sysdeps/arm/eabi/find_exidx.c
@@ -0,0 +1,80 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <link.h>
+#include <unwind.h>
+
+struct unw_eh_callback_data
+{
+ _Unwind_Ptr pc;
+ _Unwind_Ptr exidx_start;
+ int exidx_len;
+};
+
+
+/* Callback to determins if the PC lies within an object, and remember the
+ location of the exception index table if it does. */
+
+static int
+find_exidx_callback (struct dl_phdr_info * info, size_t size, void * ptr)
+{
+ struct unw_eh_callback_data * data;
+ const ElfW(Phdr) *phdr;
+ int i;
+ int match;
+ _Unwind_Ptr load_base;
+
+ data = (struct unw_eh_callback_data *) ptr;
+ load_base = info->dlpi_addr;
+ phdr = info->dlpi_phdr;
+
+ match = 0;
+ for (i = info->dlpi_phnum; i > 0; i--, phdr++)
+ {
+ if (phdr->p_type == PT_LOAD)
+ {
+ _Unwind_Ptr vaddr = phdr->p_vaddr + load_base;
+ if (data->pc >= vaddr && data->pc < vaddr + phdr->p_memsz)
+ match = 1;
+ }
+ else if (phdr->p_type == PT_ARM_EXIDX)
+ {
+ data->exidx_start = (_Unwind_Ptr) (phdr->p_vaddr + load_base);
+ data->exidx_len = phdr->p_memsz;
+ }
+ }
+
+ return match;
+}
+
+
+/* Find the exception index table containing PC. */
+
+_Unwind_Ptr
+__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
+{
+ struct unw_eh_callback_data data;
+
+ data.pc = pc;
+ data.exidx_start = 0;
+ if (dl_iterate_phdr (find_exidx_callback, &data) <= 0)
+ return 0;
+
+ *pcount = data.exidx_len / 8;
+ return data.exidx_start;
+}
diff --git a/sysdeps/arm/eabi/fpu_control.h b/sysdeps/arm/eabi/fpu_control.h
new file mode 100644
index 0000000..55d7764
--- /dev/null
+++ b/sysdeps/arm/eabi/fpu_control.h
@@ -0,0 +1,51 @@
+/* FPU control word definitions. ARM VFP version.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* masking of interrupts */
+#define _FPU_MASK_IM 0x00000100 /* invalid operation */
+#define _FPU_MASK_ZM 0x00000200 /* divide by zero */
+#define _FPU_MASK_OM 0x00000400 /* overflow */
+#define _FPU_MASK_UM 0x00000800 /* underflow */
+#define _FPU_MASK_PM 0x00001000 /* inexact */
+
+/* Some bits in the FPSCR are not yet defined. They must be preserved when
+ modifying the contents. */
+#define _FPU_RESERVED 0x0e08e0e0
+#define _FPU_DEFAULT 0x00000000
+/* Default + exceptions enabled. */
+#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00)
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+/* This is fmrx %0, fpscr. */
+#define _FPU_GETCW(cw) \
+ __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw))
+/* This is fmxr fpscr, %0. */
+#define _FPU_SETCW(cw) \
+ __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/arm/eabi/fraiseexcpt.c b/sysdeps/arm/eabi/fraiseexcpt.c
new file mode 100644
index 0000000..c0ab419
--- /dev/null
+++ b/sysdeps/arm/eabi/fraiseexcpt.c
@@ -0,0 +1,110 @@
+/* Raise given exceptions.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fpu_control.h>
+#include <fenv.h>
+#include <float.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+feraiseexcept (int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ int fpscr;
+ const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
+ fp_min = FLT_MIN, fp_1e32 = 1.0e32f, fp_two = 2.0,
+ fp_three = 3.0;
+
+ /* Raise exceptions represented by EXPECTS. But we must raise only
+ one signal at a time. It is important that if the overflow/underflow
+ exception and the inexact exception are given at the same time,
+ the overflow/underflow exception follows the inexact exception. After
+ each exception we read from the fpscr, to force the exception to be
+ raised immediately. */
+
+ /* There are additional complications because this file may be compiled
+ without VFP support enabled, and we also can't assume that the
+ assembler has VFP instructions enabled. To get around this we use the
+ generic coprocessor mnemonics and avoid asking GCC to put float values
+ in VFP registers. */
+
+ /* First: invalid exception. */
+ if (FE_INVALID & excepts)
+ __asm__ __volatile__ (
+ "ldc p10, cr0, %1\n\t" /* flds s0, %1 */
+ "cdp p10, 8, cr0, cr0, cr0, 0\n\t" /* fdivs s0, s0, s0 */
+ "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */
+ : "m" (fp_zero)
+ : "s0");
+
+ /* Next: division by zero. */
+ if (FE_DIVBYZERO & excepts)
+ __asm__ __volatile__ (
+ "ldc p10, cr0, %1\n\t" /* flds s0, %1 */
+ "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */
+ "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */
+ "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */
+ : "m" (fp_one), "m" (fp_zero)
+ : "s0", "s1");
+
+ /* Next: overflow. */
+ if (FE_OVERFLOW & excepts)
+ /* There's no way to raise overflow without also raising inexact. */
+ __asm__ __volatile__ (
+ "ldc p10, cr0, %1\n\t" /* flds s0, %1 */
+ "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */
+ "cdp p10, 3, cr0, cr0, cr0, 1\n\t" /* fadds s0, s0, s1 */
+ "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */
+ : "m" (fp_max), "m" (fp_1e32)
+ : "s0", "s1");
+
+ /* Next: underflow. */
+ if (FE_UNDERFLOW & excepts)
+ __asm__ __volatile__ (
+ "ldc p10, cr0, %1\n\t" /* flds s0, %1 */
+ "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */
+ "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */
+ "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */
+ : "m" (fp_min), "m" (fp_three)
+ : "s0", "s1");
+
+ /* Last: inexact. */
+ if (FE_INEXACT & excepts)
+ __asm__ __volatile__ (
+ "ldc p10, cr0, %1\n\t" /* flds s0, %1 */
+ "ldcl p10, cr0, %2\n\t" /* flds s1, %2 */
+ "cdp p10, 8, cr0, cr0, cr0, 1\n\t" /* fdivs s0, s0, s1 */
+ "mrc p10, 7, %0, cr1, cr0, 0" : "=r" (fpscr) /* fmrx %0, fpscr */
+ : "m" (fp_two), "m" (fp_three)
+ : "s0", "s1");
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/arm/eabi/fsetexcptflg.c b/sysdeps/arm/eabi/fsetexcptflg.c
new file mode 100644
index 0000000..e76d746
--- /dev/null
+++ b/sysdeps/arm/eabi/fsetexcptflg.c
@@ -0,0 +1,60 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997,98,99,2000,01,05 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <math.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ fexcept_t temp;
+
+ /* Get the current environment. */
+ _FPU_GETCW (temp);
+
+ /* Set the desired exception mask. */
+ temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
+ temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
+
+ /* Save state back to the FPU. */
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
+ }
+
+ /* Unsupported, so fail. */
+ return 1;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/eabi/ftestexcept.c b/sysdeps/arm/eabi/ftestexcept.c
new file mode 100644
index 0000000..230ccbd
--- /dev/null
+++ b/sysdeps/arm/eabi/ftestexcept.c
@@ -0,0 +1,43 @@
+/* Test exception in current environment.
+ Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+int
+fetestexcept (int excepts)
+{
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ fexcept_t temp;
+
+ /* Get current exceptions. */
+ _FPU_GETCW(temp);
+
+ return temp & excepts & FE_ALL_EXCEPT;
+ }
+
+ /* Unsupported, return 0. */
+ return 0;
+}
diff --git a/sysdeps/arm/eabi/rtld-global-offsets.sym b/sysdeps/arm/eabi/rtld-global-offsets.sym
new file mode 100644
index 0000000..ff4e97f
--- /dev/null
+++ b/sysdeps/arm/eabi/rtld-global-offsets.sym
@@ -0,0 +1,7 @@
+#define SHARED 1
+
+#include <ldsodefs.h>
+
+#define rtld_global_ro_offsetof(mem) offsetof (struct rtld_global_ro, mem)
+
+RTLD_GLOBAL_RO_DL_HWCAP_OFFSET rtld_global_ro_offsetof (_dl_hwcap)
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/eabi/setfpucw.c
similarity index 56%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/arm/eabi/setfpucw.c
index 203b068..2bd1f55 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/eabi/setfpucw.c
@@ -1,5 +1,5 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Set the FPU control word.
+ Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,31 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
+#include <math.h>
#include <fpu_control.h>
-int
-feholdexcept (fenv_t *envp)
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+#include <asm/procinfo.h>
+
+void
+__setfpucw (fpu_control_t set)
{
- unsigned long int temp;
+ if (GLRO (dl_hwcap) & HWCAP_VFP)
+ {
+ fpu_control_t cw;
+
+ /* Fetch the current control word. */
+ _FPU_GETCW (cw);
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
+ /* Preserve the reserved bits, and set the rest as the user
+ specified (or the default, if the user gave zero). */
+ cw &= _FPU_RESERVED;
+ cw |= set & ~_FPU_RESERVED;
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
+ _FPU_SETCW (cw);
+ }
- return 0;
+ /* Do nothing if a VFP unit isn't present. */
}
diff --git a/sysdeps/arm/eabi/setjmp.S b/sysdeps/arm/eabi/setjmp.S
new file mode 100644
index 0000000..d9ad26a
--- /dev/null
+++ b/sysdeps/arm/eabi/setjmp.S
@@ -0,0 +1,85 @@
+/* setjmp for ARM.
+ Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+#define __ASSEMBLY__
+#include <asm/procinfo.h>
+#include <rtld-global-offsets.h>
+
+ENTRY (__sigsetjmp)
+ mov ip, r0
+
+ /* Save registers */
+ stmia ip!, {v1-v6, sl, fp, sp, lr}
+
+ /* Check if we have a VFP unit. */
+#ifdef IS_IN_rtld
+ ldr a3, 1f
+ ldr a4, Lrtld_local_ro
+0: add a3, pc, a3
+ add a3, a3, a4
+ ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+#ifdef PIC
+ ldr a3, 1f
+ ldr a4, Lrtld_global_ro
+0: add a3, pc, a3
+ ldr a3, [a3, a4]
+ ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+#else
+ ldr a3, Lhwcap
+ ldr a3, [a3, #0]
+#endif
+#endif
+
+ tst a3, #HWCAP_VFP
+ beq Lno_vfp
+
+ /* Store the VFP registers. */
+ /* Following instruction is fstmiax ip!, {d8-d15}. */
+ stc p11, cr8, [r12], #68
+ /* Store the floating-point status register. */
+ /* Following instruction is fmrx r2, fpscr. */
+ mrc p10, 7, r2, cr1, cr0, 0
+ str r2, [ip], #4
+Lno_vfp:
+
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
+
+#ifdef IS_IN_rtld
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_local_ro:
+ .long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
+#else
+#ifdef PIC
+1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
+Lrtld_global_ro:
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+#else
+Lhwcap:
+ .long C_SYMBOL_NAME(_dl_hwcap)
+#endif
+#endif
+
+END (__sigsetjmp)
+
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index cc076ab..2e0a8b1 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -1,5 +1,6 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -62,6 +63,10 @@
.globl _start
.type _start,#function
_start:
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+ /* Protect against unhandled exceptions. */
+ .fnstart
+#endif
/* Fetch address of fini */
ldr ip, =__libc_csu_fini
@@ -93,6 +98,11 @@ _start:
/* should never get here....*/
bl abort
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
+ .cantunwind
+ .fnend
+#endif
+
/* Define a symbol for the first piece of initialized data. */
.data
.globl __data_start
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c
index 203b068..ae8c6a6 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/fpu/feholdexcpt.c
@@ -35,3 +35,5 @@ feholdexcept (fenv_t *envp)
return 0;
}
+
+libm_hidden_def (feholdexcept)
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c
index bdb849f..2733e7f 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/fpu/fesetround.c
@@ -25,3 +25,5 @@ fesetround (int round)
/* We only support FE_TONEAREST, so there is no need for any work. */
return (round == FE_TONEAREST)?0:1;
}
+
+libm_hidden_def (fesetround)
diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
index e63848d..337e84f 100644
--- a/sysdeps/arm/preconfigure
+++ b/sysdeps/arm/preconfigure
@@ -1,4 +1,13 @@
case "$machine" in
-arm*) base_machine=arm machine=arm/arm32/$machine ;;
-thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
+arm*)
+ base_machine=arm
+ case $config_os in
+ linux-gnueabi)
+ machine=arm/eabi/$machine
+ ;;
+ *)
+ machine=arm/$machine
+ ;;
+ esac
+ ;;
esac
diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions
index d603d6e..ed6603f 100644
--- a/sysdeps/arm/shlib-versions
+++ b/sysdeps/arm/shlib-versions
@@ -1 +1,4 @@
+arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4
+
+arm.*-.*-linux-gnueabi ld=ld-linux.so.3
arm.*-.*-linux.* ld=ld-linux.so.2
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/eabi/configure
new file mode 100644
index 0000000..bb6a261
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure
@@ -0,0 +1,5 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
+
+arch_minimum_kernel=2.4.17
+libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
new file mode 100644
index 0000000..14c25a5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/configure.in
@@ -0,0 +1,5 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi.
+
+arch_minimum_kernel=2.4.17
+libc_cv_gcc_unwind_find_fde=no
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
similarity index 62%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
index 203b068..eac925b 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/epoll_ctl.c
@@ -1,5 +1,5 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* epoll_ctl wrapper for ARM EABI.
+ Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,21 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <sysdep.h>
+#include <errno.h>
+#include <sys/epoll.h>
+
+#include <kernel_epoll.h>
int
-feholdexcept (fenv_t *envp)
+epoll_ctl (int __epfd, int __op, int __fd, struct epoll_event *__event)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
+ struct kernel_epoll_event k_event;
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
+ k_event.events = __event->events;
+ memcpy (&k_event.data, &__event->data, sizeof (k_event.data));
- return 0;
+ return INLINE_SYSCALL (epoll_ctl, 4, __epfd, __op, __fd, &k_event);
}
+
+libc_hidden_def (epoll_ctl)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
new file mode 100644
index 0000000..463e30f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/epoll_wait.c
@@ -0,0 +1,54 @@
+/* epoll_ctl wrapper for ARM EABI.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <errno.h>
+#include <sys/epoll.h>
+#include <stdlib.h>
+
+#include <kernel_epoll.h>
+
+int
+epoll_wait (int __epfd, struct epoll_event *__events,
+ int __maxevents, int __timeout);
+{
+ struct kernel_epoll_event *k_events;
+ int result;
+
+ k_events = malloc (sizeof (struct kernel_epoll_event) * __maxevents);
+ if (k_events == NULL)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ result = INLINE_SYSCALL (epoll_wait, 4, __epfd, __events, k_events,
+ __timeout);
+
+ for (i = 0; i < result; i++)
+ {
+ __events[i].events = k_events[i].events;
+ memcpy (&__events[i].data, &k_events[i].data, sizeof (k_events[i].data));
+ }
+
+ free (k_events);
+ return result;
+}
+
+libc_hidden_def (epoll_wait)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c
new file mode 100644
index 0000000..7394c6a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/fcntl.c
@@ -0,0 +1,229 @@
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <assert.h>
+#include <errno.h>
+#include <sysdep-cancel.h> /* Must come before <fcntl.h>. */
+#include <fcntl.h>
+#include <stdarg.h>
+
+#include <sys/syscall.h>
+#include "kernel-features.h"
+
+#if __ASSUME_FCNTL64 == 0
+/* This variable is shared with all files that check for fcntl64. */
+int __have_no_fcntl64;
+#endif
+
+struct kernel_flock64 {
+ short l_type;
+ short l_whence;
+ off64_t l_start;
+ off64_t l_len;
+ pid_t l_pid;
+} __attribute__((packed));
+
+#if defined NO_CANCELLATION && __ASSUME_FCNTL64 == 0
+# define __fcntl_nocancel __libc_fcntl
+#endif
+
+static inline void
+__flock64_to_kernel (struct kernel_flock64 *kfl64,
+ const struct flock64 *fl64)
+{
+ kfl64->l_type = fl64->l_type;
+ kfl64->l_whence = fl64->l_whence;
+ kfl64->l_start = fl64->l_start;
+ kfl64->l_len = fl64->l_len;
+ kfl64->l_pid = fl64->l_pid;
+}
+
+static inline void
+__flock64_from_kernel (struct flock64 *fl64,
+ const struct kernel_flock64 *kfl64)
+{
+ fl64->l_type = kfl64->l_type;
+ fl64->l_whence = kfl64->l_whence;
+ fl64->l_start = kfl64->l_start;
+ fl64->l_len = kfl64->l_len;
+ fl64->l_pid = kfl64->l_pid;
+}
+
+#if !defined NO_CANCELLATION || __ASSUME_FCNTL64 == 0
+int
+__fcntl_nocancel (int fd, int cmd, ...)
+{
+ va_list ap;
+ void *arg;
+ struct kernel_flock64 kfl;
+ struct flock64 *orig_arg;
+
+ va_start (ap, cmd);
+ arg = va_arg (ap, void *);
+ va_end (ap);
+
+#if __ASSUME_FCNTL64 == 0
+# ifdef __NR_fcntl64
+ if (! __have_no_fcntl64)
+ {
+ orig_arg = arg;
+ if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
+ {
+ arg = &kfl;
+ __flock64_to_kernel (&kfl, orig_arg);
+ }
+
+ int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
+ if (result >= 0 || errno != ENOSYS)
+ {
+ if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
+ __flock64_from_kernel (orig_arg, &kfl);
+ return result;
+ }
+
+ __have_no_fcntl64 = 1;
+ }
+# endif
+ switch (cmd)
+ {
+ case F_GETLK64:
+ /* Convert arg from flock64 to flock and back. */
+ {
+ struct flock fl;
+ struct flock64 *fl64 = arg;
+ int res;
+
+ fl.l_start = (off_t)fl64->l_start;
+ /* Check if we can represent the values with the smaller type. */
+ if ((off64_t) fl.l_start != fl64->l_start)
+ {
+ eoverflow:
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ fl.l_len = (off_t) fl64->l_len;
+ /* Check if we can represent the values with the smaller type. */
+ if ((off64_t) fl.l_len != fl64->l_len)
+ goto eoverflow;
+
+ fl.l_type = fl64->l_type;
+ fl.l_whence = fl64->l_whence;
+ fl.l_pid = fl64->l_pid;
+
+ res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl);
+ if (res != 0)
+ return res;
+ /* Everything ok, convert back. */
+ fl64->l_type = fl.l_type;
+ fl64->l_whence = fl.l_whence;
+ fl64->l_start = fl.l_start;
+ fl64->l_len = fl.l_len;
+ fl64->l_pid = fl.l_pid;
+
+ return 0;
+ }
+ case F_SETLK64:
+ case F_SETLKW64:
+ /* Try to convert arg from flock64 to flock. */
+ {
+ struct flock fl;
+ struct flock64 *fl64 = arg;
+
+ fl.l_start = (off_t) fl64->l_start;
+ /* Check if we can represent the values with the smaller type. */
+ if ((off64_t) fl.l_start != fl64->l_start)
+ goto eoverflow;
+
+ fl.l_len = (off_t)fl64->l_len;
+ /* Check if we can represent the values with the smaller type. */
+ if ((off64_t) fl.l_len != fl64->l_len)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ fl.l_type = fl64->l_type;
+ fl.l_whence = fl64->l_whence;
+ fl.l_pid = fl64->l_pid;
+ assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64);
+ return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl);
+ }
+ default:
+ return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
+ }
+ return -1;
+#else
+ return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
+#endif /* !__ASSUME_FCNTL64 */
+}
+#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */
+
+
+#ifndef __fcntl_nocancel
+int
+__libc_fcntl (int fd, int cmd, ...)
+{
+ va_list ap;
+ void *arg;
+ struct kernel_flock64 kfl;
+ struct flock64 *orig_arg;
+
+ va_start (ap, cmd);
+ arg = va_arg (ap, void *);
+ va_end (ap);
+
+#if __ASSUME_FCNTL64 > 0
+ orig_arg = arg;
+ if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
+ {
+ arg = &kfl;
+ __flock64_to_kernel (&kfl, orig_arg);
+ }
+
+ if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
+ {
+ int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
+ if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
+ __flock64_from_kernel (orig_arg, &kfl);
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
+
+ if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64)
+ __flock64_from_kernel (orig_arg, &kfl);
+#else
+ if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
+ return __fcntl_nocancel (fd, cmd, arg);
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = __fcntl_nocancel (fd, cmd, arg);
+#endif
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+#endif
+libc_hidden_def (__libc_fcntl)
+
+weak_alias (__libc_fcntl, __fcntl)
+libc_hidden_weak (__fcntl)
+weak_alias (__libc_fcntl, fcntl)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
new file mode 100644
index 0000000..9057b2c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/fstatfs64.c
@@ -0,0 +1,76 @@
+/* Return information about the filesystem on which FD resides.
+ Copyright (C) 1996,1997,1998,1999,2000,2003,2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <string.h>
+#include <sys/statfs.h>
+#include <stddef.h>
+#include <sysdep.h>
+
+/* Defined in statfs64.c. */
+extern int __no_statfs64 attribute_hidden;
+
+/* Return information about the filesystem on which FD resides. */
+int
+__fstatfs64 (int fd, struct statfs64 *buf)
+{
+#ifdef __NR_fstatfs64
+# if __ASSUME_STATFS64 == 0
+ if (! __no_statfs64)
+# endif
+ {
+ /* The EABI structure is the same as the old ABI structure, except
+ that it has four additional bytes of padding - at the end. We can
+ ignore them. */
+ int result = INLINE_SYSCALL (fstatfs64, 3, fd, sizeof (*buf) - 4, buf);
+
+# if __ASSUME_STATFS64 == 0
+ if (result == 0 || errno != ENOSYS)
+# endif
+ return result;
+
+# if __ASSUME_STATFS64 == 0
+ __no_statfs64 = 1;
+# endif
+ }
+#endif
+
+#if __ASSUME_STATFS64 == 0
+ struct statfs buf32;
+
+ if (__fstatfs (fd, &buf32) < 0)
+ return -1;
+
+ buf->f_type = buf32.f_type;
+ buf->f_bsize = buf32.f_bsize;
+ buf->f_blocks = buf32.f_blocks;
+ buf->f_bfree = buf32.f_bfree;
+ buf->f_bavail = buf32.f_bavail;
+ buf->f_files = buf32.f_files;
+ buf->f_ffree = buf32.f_ffree;
+ buf->f_fsid = buf32.f_fsid;
+ buf->f_namelen = buf32.f_namelen;
+ buf->f_frsize = buf32.f_frsize;
+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
+
+ return 0;
+#endif
+}
+weak_alias (__fstatfs64, fstatfs64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
new file mode 100644
index 0000000..ae6637e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/fxstat64.c
@@ -0,0 +1,100 @@
+/* fxstat64 using old-style Unix fstat system call.
+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include "kernel-features.h"
+
+#if __ASSUME_STAT64_SYSCALL == 0
+# include <xstatconv.h>
+#endif
+
+#ifdef __NR_fstat64
+# if __ASSUME_STAT64_SYSCALL == 0
+/* The variable is shared between all wrappers around *stat64 calls. */
+extern int __have_no_stat64;
+# endif
+#endif
+
+/* Get information about the file FD in BUF. */
+
+int
+___fxstat64 (int vers, int fd, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat64 kbuf64;
+
+#if __ASSUME_STAT64_SYSCALL > 0
+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+#else
+ struct kernel_stat kbuf;
+# if defined __NR_fstat64
+ if (! __have_no_stat64)
+ {
+ int saved_errno = errno;
+ result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (&kbuf64));
+
+ if (result != -1 || errno != ENOSYS)
+ {
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+ }
+
+ __set_errno (saved_errno);
+ __have_no_stat64 = 1;
+ }
+# endif
+ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
+versioned_symbol (libc, ___fxstat64, __fxstat64, GLIBC_2_2);
+strong_alias (___fxstat64, __old__fxstat64)
+compat_symbol (libc, __old__fxstat64, __fxstat64, GLIBC_2_1);
+hidden_ver (___fxstat64, __fxstat64)
+#else
+strong_alias (___fxstat64, __fxstat64)
+hidden_def (__fxstat64)
+#endif
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h
similarity index 75%
copy from sysdeps/arm/fpu/fesetround.c
copy to sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h
index bdb849f..410b5c0 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/kernel_epoll.h
@@ -1,5 +1,4 @@
-/* Set current rounding direction.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-
-int
-fesetround (int round)
+struct kernel_epoll_event
{
- /* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?0:1;
-}
+ uint32_t events; /* Epoll events */
+ epoll_data_t data; /* User data variable */
+} __attribute__ ((packed,aligned(4)));
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
new file mode 100644
index 0000000..a4a8472
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/kernel_stat.h
@@ -0,0 +1,59 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/unix/sysv/linux/kernel_stat.h>
+
+/* kernel_stat64 is just like stat64, except packed. The EABI aligns
+ st_size to an eight byte boundary but the old ABI only aligns it to
+ four. Similarly st_blocks. */
+struct kernel_stat64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned int __pad1;
+
+ __ino_t __st_ino; /* 32bit file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+#else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
+ __ino64_t st_ino; /* File serial number. */
+ } __attribute__ ((packed,aligned(4)));
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c
new file mode 100644
index 0000000..79dcceb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/lockf64.c
@@ -0,0 +1,202 @@
+/* Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <sysdep.h>
+
+#include "kernel-features.h"
+
+/* lockf is a simplified interface to fcntl's locking facilities. */
+
+#ifdef __NR_fcntl64
+# if __ASSUME_FCNTL64 == 0
+/* This variable is shared with all files that check for fcntl64. The
+ declaration is in fcntl.c. */
+extern int __have_no_fcntl64;
+# endif
+#endif
+
+struct kernel_flock64 {
+ short l_type;
+ short l_whence;
+ off64_t l_start;
+ off64_t l_len;
+ pid_t l_pid;
+} __attribute__((packed));
+
+int
+lockf64 (int fd, int cmd, off64_t len64)
+{
+#if __ASSUME_FCNTL64 == 0
+ struct flock fl;
+ off_t len = (off_t) len64;
+#endif
+#ifdef __NR_fcntl64
+ struct kernel_flock64 fl64;
+ int cmd64;
+#endif
+
+#if __ASSUME_FCNTL64 == 0
+ memset ((char *) &fl, '\0', sizeof (fl));
+
+ /* lockf is always relative to the current file position. */
+ fl.l_whence = SEEK_CUR;
+ fl.l_start = 0;
+ fl.l_len = len;
+#endif
+#ifdef __NR_fcntl64
+# if __ASSUME_FCNTL64 == 0
+ if (!__have_no_fcntl64)
+ {
+# endif
+ memset ((char *) &fl64, '\0', sizeof (fl64));
+ fl64.l_whence = SEEK_CUR;
+ fl64.l_start = 0;
+ fl64.l_len = len64;
+# if __ASSUME_FCNTL64 == 0
+ }
+# endif
+#endif
+
+#if __ASSUME_FCNTL64 == 0 && !defined __NR_fcntl64
+ if (len64 != (off64_t) len)
+ {
+ /* We can't represent the length. */
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+#endif
+ switch (cmd)
+ {
+ case F_TEST:
+ /* Test the lock: return 0 if FD is unlocked or locked by this process;
+ return -1, set errno to EACCES, if another process holds the lock. */
+#if __ASSUME_FCNTL64 > 0
+ fl64.l_type = F_RDLCK;
+ if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64) < 0)
+ return -1;
+ if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
+ return 0;
+ __set_errno (EACCES);
+ return -1;
+#else
+# ifdef __NR_fcntl64
+ if (!__have_no_fcntl64)
+ {
+ int res;
+
+ fl64.l_type = F_RDLCK;
+ res = INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64);
+ /* If errno == ENOSYS try the 32bit interface if len64 can
+ be represented with 32 bits. */
+
+ if (res == 0)
+ {
+ if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
+ return 0;
+ __set_errno (EACCES);
+ return -1;
+ }
+ else if (errno == ENOSYS)
+ __have_no_fcntl64 = 1;
+ else
+ /* res < 0 && errno != ENOSYS. */
+ return -1;
+ if (len64 != (off64_t) len)
+ {
+ /* We can't represent the length. */
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ }
+# endif
+ fl.l_type = F_RDLCK;
+ if (__fcntl (fd, F_GETLK, &fl) < 0)
+ return -1;
+ if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())
+ return 0;
+ __set_errno (EACCES);
+ return -1;
+#endif
+ case F_ULOCK:
+#if __ASSUME_FCNTL64 == 0
+ fl.l_type = F_UNLCK;
+ cmd = F_SETLK;
+#endif
+#ifdef __NR_fcntl64
+ fl64.l_type = F_UNLCK;
+ cmd64 = F_SETLK64;
+#endif
+ break;
+ case F_LOCK:
+#if __ASSUME_FCNTL64 == 0
+ fl.l_type = F_WRLCK;
+ cmd = F_SETLKW;
+#endif
+#ifdef __NR_fcntl64
+ fl64.l_type = F_WRLCK;
+ cmd64 = F_SETLKW64;
+#endif
+ break;
+ case F_TLOCK:
+#if __ASSUME_FCNTL64 == 0
+ fl.l_type = F_WRLCK;
+ cmd = F_SETLK;
+#endif
+#ifdef __NR_fcntl64
+ fl64.l_type = F_WRLCK;
+ cmd64 = F_SETLK64;
+#endif
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+#if __ASSUME_FCNTL64 > 0
+ return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
+#else
+# ifdef __NR_fcntl64
+
+ if (!__have_no_fcntl64)
+ {
+ int res = INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
+
+ /* If errno == ENOSYS try the 32bit interface if len64 can
+ be represented with 32 bits. */
+ if (res == 0 || errno != ENOSYS)
+ return res;
+
+ __have_no_fcntl64 = 1;
+
+ if (len64 != (off64_t) len)
+ {
+ /* We can't represent the length. */
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ }
+# endif
+ return __fcntl (fd, cmd, &fl);
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
new file mode 100644
index 0000000..bb5be39
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/lxstat64.c
@@ -0,0 +1,99 @@
+/* lxstat64 using old-style Unix lstat system call.
+ Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include "kernel-features.h"
+
+#if __ASSUME_STAT64_SYSCALL == 0
+# include <xstatconv.h>
+#endif
+
+#ifdef __NR_lstat64
+# if __ASSUME_STAT64_SYSCALL == 0
+/* The variable is shared between all wrappers around *stat64 calls. */
+extern int __have_no_stat64;
+# endif
+#endif
+
+/* Get information about the file NAME in BUF. */
+int
+___lxstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat64 kbuf64;
+
+#ifdef __ASSUME_STAT64_SYSCALL
+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+#else
+ struct kernel_stat kbuf;
+# ifdef __NR_lstat64
+ if (! __have_no_stat64)
+ {
+ int saved_errno = errno;
+ result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
+
+ if (result != -1 || errno != ENOSYS)
+ {
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+ }
+
+ __set_errno (saved_errno);
+ __have_no_stat64 = 1;
+ }
+# endif
+ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
+versioned_symbol (libc, ___lxstat64, __lxstat64, GLIBC_2_2);
+strong_alias (___lxstat64, __old__lxstat64)
+compat_symbol (libc, __old__lxstat64, __lxstat64, GLIBC_2_1);
+hidden_ver (___lxstat64, __lxstat64)
+#else
+strong_alias (___lxstat64, __lxstat64);
+hidden_def (__lxstat64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c
@@ -0,0 +1 @@
+/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c b/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c
@@ -0,0 +1 @@
+/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semop.c b/sysdeps/unix/sysv/linux/arm/eabi/semop.c
new file mode 100644
index 0000000..42b2036
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/semop.c
@@ -0,0 +1,67 @@
+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+#include <alloca.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+struct kernel_sembuf
+{
+ unsigned short int sem_num; /* semaphore number */
+ short int sem_op; /* semaphore operation */
+ short int sem_flg; /* operation flag */
+ short int __pad1;
+};
+
+/* Perform user-defined atomical operation of array of semaphores. */
+
+int
+semop (semid, sops, nsops)
+ int semid;
+ struct sembuf *sops;
+ size_t nsops;
+{
+ struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops);
+ size_t i;
+ int result;
+
+ for (i = 0; i < nsops; i++)
+ {
+ ksops[i].sem_num = sops[i].sem_num;
+ ksops[i].sem_op = sops[i].sem_op;
+ ksops[i].sem_flg = sops[i].sem_flg;
+ }
+
+ result = INLINE_SYSCALL (ipc, 5, IPCOP_semop,
+ semid, (int) nsops, 0, CHECK_N (ksops, nsops));
+
+ for (i = 0; i < nsops; i++)
+ {
+ sops[i].sem_num = ksops[i].sem_num;
+ sops[i].sem_op = ksops[i].sem_op;
+ sops[i].sem_flg = ksops[i].sem_flg;
+ }
+
+ return result;
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
new file mode 100644
index 0000000..463dea4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/semtimedop.c
@@ -0,0 +1,69 @@
+/* Copyright (C) 1995, 1997, 1998, 1999, 2000, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+#include <alloca.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+struct kernel_sembuf
+{
+ unsigned short int sem_num; /* semaphore number */
+ short int sem_op; /* semaphore operation */
+ short int sem_flg; /* operation flag */
+ short int __pad1;
+};
+
+/* Perform user-defined atomical operation of array of semaphores. */
+
+int
+semtimedop (semid, sops, nsops, timeout)
+ int semid;
+ struct sembuf *sops;
+ size_t nsops;
+ const struct timespec *timeout;
+{
+ struct kernel_sembuf *ksops = alloca (sizeof (ksops[0]) * nsops);
+ size_t i;
+ int result;
+
+ for (i = 0; i < nsops; i++)
+ {
+ ksops[i].sem_num = sops[i].sem_num;
+ ksops[i].sem_op = sops[i].sem_op;
+ ksops[i].sem_flg = sops[i].sem_flg;
+ }
+
+ result = INLINE_SYSCALL (ipc, 6, IPCOP_semtimedop,
+ semid, (int) nsops, 0, CHECK_N (sops, nsops),
+ timeout);
+
+ for (i = 0; i < nsops; i++)
+ {
+ sops[i].sem_num = ksops[i].sem_num;
+ sops[i].sem_op = ksops[i].sem_op;
+ sops[i].sem_flg = ksops[i].sem_flg;
+ }
+
+ return result;
+}
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
new file mode 100644
index 0000000..3c74453
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/statfs64.c
@@ -0,0 +1,77 @@
+/* Return information about the filesystem on which FILE resides.
+ Copyright (C) 1996-2000,2003,2004,2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <string.h>
+#include <sys/statfs.h>
+#include <stddef.h>
+#include <sysdep.h>
+
+
+# if __ASSUME_STATFS64 == 0
+int __no_statfs64 attribute_hidden;
+#endif
+
+/* Return information about the filesystem on which FILE resides. */
+int
+__statfs64 (const char *file, struct statfs64 *buf)
+{
+#ifdef __NR_statfs64
+# if __ASSUME_STATFS64 == 0
+ if (! __no_statfs64)
+# endif
+ {
+ /* The EABI structure is the same as the old ABI structure, except
+ that it has four additional bytes of padding - at the end. We can
+ ignore them. */
+ int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf) - 4, buf);
+
+# if __ASSUME_STATFS64 == 0
+ if (result == 0 || errno != ENOSYS)
+# endif
+ return result;
+
+# if __ASSUME_STATFS64 == 0
+ __no_statfs64 = 1;
+# endif
+ }
+#endif
+
+#if __ASSUME_STATFS64 == 0
+ struct statfs buf32;
+
+ if (__statfs (file, &buf32) < 0)
+ return -1;
+
+ buf->f_type = buf32.f_type;
+ buf->f_bsize = buf32.f_bsize;
+ buf->f_blocks = buf32.f_blocks;
+ buf->f_bfree = buf32.f_bfree;
+ buf->f_bavail = buf32.f_bavail;
+ buf->f_files = buf32.f_files;
+ buf->f_ffree = buf32.f_ffree;
+ buf->f_fsid = buf32.f_fsid;
+ buf->f_namelen = buf32.f_namelen;
+ buf->f_frsize = buf32.f_frsize;
+ memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
+
+ return 0;
+#endif
+}
+weak_alias (__statfs64, statfs64)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
new file mode 100644
index 0000000..85bc04f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list
@@ -0,0 +1,4 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl
+epoll_wait EXTRA epoll_wait i:ipii epoll_wait
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/unix/sysv/linux/arm/eabi/uname.c
similarity index 58%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/unix/sysv/linux/arm/eabi/uname.c
index 203b068..82482e4 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/uname.c
@@ -1,5 +1,5 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,27 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include <errno.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <string.h>
+#include <sys/utsname.h>
+
+/* The kernel's struct utsname is two bytes larger than a userland struct
+ utsname due to the APCS structure size boundary. */
int
-feholdexcept (fenv_t *envp)
+__uname (struct utsname *__name)
{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
+ char buf[sizeof (struct utsname) + 2];
+ int result = INLINE_SYSCALL (uname, 1, buf);
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
+ if (result == 0)
+ memcpy (__name, buf, sizeof (struct utsname));
- return 0;
+ return result;
}
+
+libc_hidden_def (__uname)
+strong_alias (__uname, uname)
+libc_hidden_weak (uname)
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
new file mode 100644
index 0000000..5edafd8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/xstat64.c
@@ -0,0 +1,103 @@
+/* xstat64 using old-style Unix stat system call.
+ Copyright (C) 1991, 1995-2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include "kernel-features.h"
+
+#if __ASSUME_STAT64_SYSCALL == 0
+# include <xstatconv.h>
+#endif
+
+#ifdef __NR_stat64
+# if __ASSUME_STAT64_SYSCALL == 0
+/* The variable is shared between all wrappers around *stat64 calls.
+ This is the definition. */
+int __have_no_stat64;
+# endif
+#endif
+
+/* Get information about the file NAME in BUF. */
+
+int
+___xstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat64 kbuf64;
+
+#if __ASSUME_STAT64_SYSCALL > 0
+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+#else
+ struct kernel_stat kbuf;
+# if defined __NR_stat64
+ if (! __have_no_stat64)
+ {
+ int saved_errno = errno;
+ result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (&kbuf64));
+
+ if (result != -1 || errno != ENOSYS)
+ {
+ if (result == 0)
+ result = __xstat64_kernel64_conv (vers, &kbuf64, buf);
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+ if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
+ buf->st_ino = buf->__st_ino;
+# endif
+ return result;
+ }
+
+ __set_errno (saved_errno);
+ __have_no_stat64 = 1;
+ }
+# endif
+
+ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+#endif
+}
+
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
+versioned_symbol (libc, ___xstat64, __xstat64, GLIBC_2_2);
+strong_alias (___xstat64, __old__xstat64)
+compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1);
+hidden_ver (___xstat64, __xstat64)
+#else
+strong_alias (___xstat64, __xstat64)
+hidden_def (__xstat64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
new file mode 100644
index 0000000..28c4dae
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.c
@@ -0,0 +1,341 @@
+/* Convert between the kernel's `struct stat' format, and libc's.
+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#ifdef STAT_IS_KERNEL_STAT
+
+/* Dummy. */
+struct kernel_stat;
+
+#else
+
+#include <string.h>
+
+
+#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
+int
+__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+{
+ switch (vers)
+ {
+ case _STAT_VER_KERNEL:
+ /* Nothing to do. The struct is in the form the kernel expects.
+ We should have short-circuted before we got here, but for
+ completeness... */
+ *(struct kernel_stat *) ubuf = *kbuf;
+ break;
+
+ case _STAT_VER_LINUX:
+ {
+ struct stat *buf = ubuf;
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf->st_dev;
+#ifdef _HAVE_STAT___PAD1
+ buf->__pad1 = 0;
+#endif
+ buf->st_ino = kbuf->st_ino;
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+#ifdef _HAVE_STAT___PAD2
+ buf->__pad2 = 0;
+#endif
+ buf->st_size = kbuf->st_size;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+#ifdef _HAVE_STAT_NSEC
+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
+#else
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+#endif
+#ifdef _HAVE_STAT___UNUSED1
+ buf->__unused1 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED2
+ buf->__unused2 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED3
+ buf->__unused3 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED4
+ buf->__unused4 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED5
+ buf->__unused5 = 0;
+#endif
+ }
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
+#endif
+
+int
+__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+{
+#ifdef XSTAT_IS_XSTAT64
+ return __xstat_conv (vers, kbuf, ubuf);
+#else
+ switch (vers)
+ {
+ case _STAT_VER_LINUX:
+ {
+ struct stat64 *buf = ubuf;
+
+ /* Convert to current kernel version of `struct stat64'. */
+ buf->st_dev = kbuf->st_dev;
+#ifdef _HAVE_STAT64___PAD1
+ buf->__pad1 = 0;
+#endif
+ buf->st_ino = kbuf->st_ino;
+#ifdef _HAVE_STAT64___ST_INO
+ buf->__st_ino = kbuf->st_ino;
+#endif
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+#ifdef _HAVE_STAT64___PAD2
+ buf->__pad2 = 0;
+#endif
+ buf->st_size = kbuf->st_size;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+#ifdef _HAVE_STAT64_NSEC
+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
+#else
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+#endif
+#ifdef _HAVE_STAT64___UNUSED1
+ buf->__unused1 = 0;
+#endif
+#ifdef _HAVE_STAT64___UNUSED2
+ buf->__unused2 = 0;
+#endif
+#ifdef _HAVE_STAT64___UNUSED3
+ buf->__unused3 = 0;
+#endif
+#ifdef _HAVE_STAT64___UNUSED4
+ buf->__unused4 = 0;
+#endif
+#ifdef _HAVE_STAT64___UNUSED5
+ buf->__unused5 = 0;
+#endif
+ }
+ break;
+
+ /* If struct stat64 is different from struct stat then
+ _STAT_VER_KERNEL does not make sense. */
+ case _STAT_VER_KERNEL:
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+#endif
+}
+
+int
+__xstat32_conv (int vers, void *kbuf_, struct stat *buf)
+{
+ struct kernel_stat64 *kbuf = kbuf_;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX:
+ {
+ /* Convert current kernel version of `struct stat64' to
+ `struct stat'. */
+ buf->st_dev = kbuf->st_dev;
+#ifdef _HAVE_STAT___PAD1
+ buf->__pad1 = 0;
+#endif
+#ifdef _HAVE_STAT64___ST_INO
+# if __ASSUME_ST_INO_64_BIT == 0
+ if (kbuf->st_ino == 0)
+ buf->st_ino = kbuf->__st_ino;
+ else
+# endif
+ {
+ buf->st_ino = kbuf->st_ino;
+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
+ && buf->st_ino != kbuf->st_ino)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ }
+#else
+ buf->st_ino = kbuf->st_ino;
+ if (sizeof (buf->st_ino) != sizeof (kbuf->st_ino)
+ && buf->st_ino != kbuf->st_ino)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+#endif
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+#ifdef _HAVE_STAT___PAD2
+ buf->__pad2 = 0;
+#endif
+ buf->st_size = kbuf->st_size;
+ /* Check for overflow. */
+ if (sizeof (buf->st_size) != sizeof (kbuf->st_size)
+ && buf->st_size != kbuf->st_size)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+ /* Check for overflow. */
+ if (sizeof (buf->st_blocks) != sizeof (kbuf->st_blocks)
+ && buf->st_blocks != kbuf->st_blocks)
+ {
+ __set_errno (EOVERFLOW);
+ return -1;
+ }
+#ifdef _HAVE_STAT_NSEC
+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
+#else
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+#endif
+
+#ifdef _HAVE_STAT___UNUSED1
+ buf->__unused1 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED2
+ buf->__unused2 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED3
+ buf->__unused3 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED4
+ buf->__unused4 = 0;
+#endif
+#ifdef _HAVE_STAT___UNUSED5
+ buf->__unused5 = 0;
+#endif
+ }
+ break;
+
+ /* If struct stat64 is different from struct stat then
+ _STAT_VER_KERNEL does not make sense. */
+ case _STAT_VER_KERNEL:
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+__xstat64_kernel64_conv (int vers, void *kbuf_, struct stat64 *buf)
+{
+ struct kernel_stat64 *kbuf = kbuf_;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX:
+ {
+ /* Convert current kernel version of `struct stat64' to
+ user version of `struct stat64'. */
+ buf->st_dev = kbuf->st_dev;
+#ifdef _HAVE_STAT64___PAD1
+ buf->__pad1 = kbuf->__pad1;
+#endif
+#ifdef _HAVE_STAT64___ST_INO
+ buf->__st_ino = kbuf->__st_ino;
+#endif
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+#ifdef _HAVE_STAT64___PAD2
+ buf->__pad2 = kbuf->__pad2;
+#endif
+ buf->st_size = kbuf->st_size;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+#ifdef _HAVE_STAT64_NSEC
+ buf->st_atim.tv_sec = kbuf->st_atim.tv_sec;
+ buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec;
+ buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec;
+ buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec;
+ buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec;
+ buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec;
+#else
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+#endif
+ buf->st_ino = kbuf->st_ino;
+ }
+ break;
+
+ case _STAT_VER_KERNEL:
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
+
+#endif
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
similarity index 60%
copy from sysdeps/arm/fpu/feholdexcpt.c
copy to sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
index 203b068..abe65f4 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/unix/sysv/linux/arm/eabi/xstatconv.h
@@ -1,5 +1,5 @@
-/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Convert between the kernel's `struct stat' format, and libc's.
+ Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,21 +17,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <fenv.h>
-#include <fpu_control.h>
+#include "kernel-features.h"
-int
-feholdexcept (fenv_t *envp)
-{
- unsigned long int temp;
-
- /* Store the environment. */
- _FPU_GETCW(temp);
- envp->__cw = temp;
-
- /* Now set all exceptions to non-stop. */
- temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
- _FPU_SETCW(temp);
-
- return 0;
-}
+#ifndef STAT_IS_KERNEL_STAT
+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
+extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
+#endif
+extern int __xstat32_conv (int vers, void *kbuf, struct stat *buf);
+extern int __xstat64_kernel64_conv (int vers, struct kernel_stat64 *kbuf,
+ struct stat64 *buf);
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 5899140..bb5e1dc 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,21 +23,31 @@
#include "kernel-features.h"
+/* For the EABI, there are four extra bytes of padding in the
+ incoming arguments to mmap64, to preserve alignment. */
+#ifdef __ARM_EABI__
+# define INITIAL_OFFSET 8
+#else
+# define INITIAL_OFFSET 4
+#endif
+
+#ifdef __ARMEB__
+# define LOW_OFFSET INITIAL_OFFSET + 4
+/* The initial + 4 is for the stack postdecrement. */
+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 0
+#else
+# define LOW_OFFSET INITIAL_OFFSET + 0
+# define HIGH_OFFSET 4 + INITIAL_OFFSET + 4
+#endif
+
/* The mmap2 system call takes six arguments, all in registers. */
.text
ENTRY (__mmap64)
#ifdef __NR_mmap2
-#ifdef __ARMEB__
- ldr ip, [sp, $8] @ offset low part
+ ldr ip, [sp, $LOW_OFFSET]
str r5, [sp, #-4]!
- ldr r5, [sp, $8] @ offset high part
+ ldr r5, [sp, $HIGH_OFFSET]
str r4, [sp, #-4]!
-#else
- ldr ip, [sp, $4] @ offset low part
- str r5, [sp, #-4]!
- ldr r5, [sp, $12] @ offset high part
- str r4, [sp, #-4]!
-#endif
movs r4, ip, lsl $20 @ check that offset is page-aligned
mov ip, ip, lsr $12
moveqs r4, r5, lsr $12 @ check for overflow
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ce0c8e4c89cf14955d2115c05fcc19139f56153
commit 4ce0c8e4c89cf14955d2115c05fcc19139f56153
Author: Phil Blundell <pb@reciva.com>
Date: Mon Oct 10 15:09:14 2005 +0000
2005-10-10 Philip Blundell <philb@gnu.org>
* sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h,
sysdeps/arm/_mcount.S: Revert previous bogus changes.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1615689..edb7517 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -5,6 +5,11 @@
2005-10-10 Philip Blundell <philb@gnu.org>
+ * sysdeps/arm/Makefile, sysdeps/arm/machine-gmon.h,
+ sysdeps/arm/_mcount.S: Revert previous bogus changes.
+
+2005-10-10 Philip Blundell <philb@gnu.org>
+
* sysdeps/arm/_mcount.S: Suppress profiling when building this
file.
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
deleted file mode 100644
index cf18ded..0000000
--- a/sysdeps/arm/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-ifeq ($(subdir),gmon)
-sysdep_routines += _mcount
-endif
diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S
deleted file mode 100644
index 795d999..0000000
--- a/sysdeps/arm/_mcount.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Profiling entry point. ARM version.
- Copyright (C) 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#undef PROF
-
-#include <sysdep.h>
-
-ENTRY(_mcount)
- stmfd sp!, {r0-r3, lr}
- mov r0, lr
- mov r1, ip
- bl mcount_internal
- ldmfd sp!, {r0-r3, pc}
-END(_mcount)
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index 0af6b5e..fa3f652 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -20,7 +20,48 @@
/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
so we must use an assembly stub. */
+#include <sysdep.h>
+#ifndef NO_UNDERSCORES
+/* The asm symbols for C functions are `_function'.
+ The canonical name for the counter function is `mcount', no _. */
+void _mcount (void) asm ("mcount");
+#else
+/* The canonical name for the function is `_mcount' in both C and asm,
+ but some old asm code might assume it's `mcount'. */
+void _mcount (void);
+weak_alias (_mcount, mcount)
+#endif
+
+static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
+
#define _MCOUNT_DECL(frompc, selfpc) \
- void mcount_internal (u_long frompc, u_long selfpc)
+static void mcount_internal (u_long frompc, u_long selfpc)
+
+/* This macro/func MUST save r0, r1 because the compiler inserts
+ blind calls to _mount(), ignoring the fact that _mcount may
+ clobber registers; therefore, _mcount may NOT clobber registers */
+/* if (this_fp!=0) {
+ r0 = this_fp
+ r1 = this_lr
+ r1 = [r1-4] which is caller's lr
+ if (r1!=0)
+ r1 = caller's lr
+ call mcount_internal(this_lr, caller's_lr)
+ }
+*/
+
+#define MCOUNT \
+void _mcount (void) \
+{ \
+ __asm__("stmdb sp!, {r0, r1, r2, r3};" \
+ "movs fp, fp;" \
+ "moveq r1, #0;" \
+ "ldrne r1, [fp, $-4];" \
+ "ldrne r0, [fp, $-12];" \
+ "movnes r0, r0;" \
+ "ldrne r0, [r0, $-4];" \
+ "movs r0, r0;" \
+ "blne mcount_internal;" \
+ "ldmia sp!, {r0, r1, r2, r3}"); \
+}
-#define MCOUNT /* Nothing herel code in _mcount.S is used. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7ed1adbecb6aac49af75aae3b3498798cf63abc
commit a7ed1adbecb6aac49af75aae3b3498798cf63abc
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Mon Oct 10 15:00:47 2005 +0000
* sysdeps/arm/memset.S (memset): Correct handling of negative
arguments.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index f2a8a84..1615689 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/memset.S (memset): Correct handling of negative
+ arguments.
+
2005-10-10 Philip Blundell <philb@gnu.org>
* sysdeps/arm/_mcount.S: Suppress profiling when building this
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index 1e2699d..b37451b 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -32,6 +32,7 @@ ENTRY(memset)
subne r2, r2, #1
bne 1b
+ and r1, r1, #255 @ clear any sign bits
orr r1, r1, r1, lsl $8
orr r1, r1, r1, lsl $16
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b033155aa9d0976a5c4f59e890d2f64e9a4bd4c0
commit b033155aa9d0976a5c4f59e890d2f64e9a4bd4c0
Author: Phil Blundell <pb@reciva.com>
Date: Mon Oct 10 14:51:13 2005 +0000
2005-10-10 Philip Blundell <philb@gnu.org>
* sysdeps/arm/_mcount.S: Suppress profiling when building this
file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1cc4925..f2a8a84 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2005-10-10 Philip Blundell <philb@gnu.org>
+
+ * sysdeps/arm/_mcount.S: Suppress profiling when building this
+ file.
+
2005-10-09 Phil Blundell <pb@reciva.com>
* sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add
diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S
index 471af5c..795d999 100644
--- a/sysdeps/arm/_mcount.S
+++ b/sysdeps/arm/_mcount.S
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#undef PROF
+
#include <sysdep.h>
ENTRY(_mcount)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f7c48c17f99274f06fd77d90a5b653a5fa2596a
commit 5f7c48c17f99274f06fd77d90a5b653a5fa2596a
Author: Phil Blundell <pb@reciva.com>
Date: Sun Oct 9 18:29:25 2005 +0000
2005-10-09 Phil Blundell <pb@reciva.com>
* sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add
_mcount.
* sysdeps/arm/machine-gmon.h (MCOUNT): Replace with empty
definition.
(_MCOUNT_DECL): Make linkage global.
* sysdeps/arm/_mcount.S: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index a4e547c..1cc4925 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,14 @@
2005-10-09 Phil Blundell <pb@reciva.com>
+ * sysdeps/arm/Makefile [subdir=gmon] (sysdep_routines): Add
+ _mcount.
+ * sysdeps/arm/machine-gmon.h (MCOUNT): Replace with empty
+ definition.
+ (_MCOUNT_DECL): Make linkage global.
+ * sysdeps/arm/_mcount.S: New file.
+
+2005-10-09 Phil Blundell <pb@reciva.com>
+
* sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile):
Don't compile. Correct cut'n'paste error with .size.
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
new file mode 100644
index 0000000..cf18ded
--- /dev/null
+++ b/sysdeps/arm/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),gmon)
+sysdep_routines += _mcount
+endif
diff --git a/sysdeps/arm/_mcount.S b/sysdeps/arm/_mcount.S
new file mode 100644
index 0000000..471af5c
--- /dev/null
+++ b/sysdeps/arm/_mcount.S
@@ -0,0 +1,28 @@
+/* Profiling entry point. ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ENTRY(_mcount)
+ stmfd sp!, {r0-r3, lr}
+ mov r0, lr
+ mov r1, ip
+ bl mcount_internal
+ ldmfd sp!, {r0-r3, pc}
+END(_mcount)
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index fa3f652..0af6b5e 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -20,48 +20,7 @@
/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
so we must use an assembly stub. */
-#include <sysdep.h>
-#ifndef NO_UNDERSCORES
-/* The asm symbols for C functions are `_function'.
- The canonical name for the counter function is `mcount', no _. */
-void _mcount (void) asm ("mcount");
-#else
-/* The canonical name for the function is `_mcount' in both C and asm,
- but some old asm code might assume it's `mcount'. */
-void _mcount (void);
-weak_alias (_mcount, mcount)
-#endif
-
-static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
-
#define _MCOUNT_DECL(frompc, selfpc) \
-static void mcount_internal (u_long frompc, u_long selfpc)
-
-/* This macro/func MUST save r0, r1 because the compiler inserts
- blind calls to _mount(), ignoring the fact that _mcount may
- clobber registers; therefore, _mcount may NOT clobber registers */
-/* if (this_fp!=0) {
- r0 = this_fp
- r1 = this_lr
- r1 = [r1-4] which is caller's lr
- if (r1!=0)
- r1 = caller's lr
- call mcount_internal(this_lr, caller's_lr)
- }
-*/
-
-#define MCOUNT \
-void _mcount (void) \
-{ \
- __asm__("stmdb sp!, {r0, r1, r2, r3};" \
- "movs fp, fp;" \
- "moveq r1, #0;" \
- "ldrne r1, [fp, $-4];" \
- "ldrne r0, [fp, $-12];" \
- "movnes r0, r0;" \
- "ldrne r0, [r0, $-4];" \
- "movs r0, r0;" \
- "blne mcount_internal;" \
- "ldmia sp!, {r0, r1, r2, r3}"); \
-}
+ void mcount_internal (u_long frompc, u_long selfpc)
+#define MCOUNT /* Nothing herel code in _mcount.S is used. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=609908d77052a1c4aaebd536420a4a618d6b3e95
commit 609908d77052a1c4aaebd536420a4a618d6b3e95
Author: Phil Blundell <pb@reciva.com>
Date: Sun Oct 9 18:24:09 2005 +0000
2005-10-09 Phil Blundell <pb@reciva.com>
* sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile):
Don't compile. Correct cut'n'paste error with .size.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index f3a2c25..a4e547c 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2005-10-09 Phil Blundell <pb@reciva.com>
+
+ * sysdeps/arm/dl-trampoline.S: [PROF] (_dl_runtime_profile):
+ Don't compile. Correct cut'n'paste error with .size.
+
2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/posix_fadvise.c,
diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S
index dc7494f..0224fa1 100644
--- a/sysdeps/arm/dl-trampoline.S
+++ b/sysdeps/arm/dl-trampoline.S
@@ -74,6 +74,7 @@ _dl_runtime_resolve:
cfi_endproc
.size _dl_runtime_resolve, .-_dl_runtime_resolve
+#ifndef PROF
.globl _dl_runtime_profile
.type _dl_runtime_profile, #function
cfi_startproc
@@ -210,5 +211,6 @@ _dl_runtime_profile:
BX(lr)
cfi_endproc
- .size _dl_runtime_resolve, .-_dl_runtime_resolve
+ .size _dl_runtime_profile, .-_dl_runtime_profile
+#endif
.previous
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecaa5eab07606c6482190bc50ed37f202ceb8048
commit ecaa5eab07606c6482190bc50ed37f202ceb8048
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 5 20:17:08 2005 +0000
* sysdeps/unix/sysv/linux/arm/posix_fadvise.c,
sysdeps/unix/sysv/linux/arm/posix_fadvise64.c: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 0c0568e..f3a2c25 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/unix/sysv/linux/arm/posix_fadvise.c,
+ sysdeps/unix/sysv/linux/arm/posix_fadvise64.c: New files.
+
+2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/dl-machine.h: Include <tls.h>.
(elf_machine_type_class, elf_machine_rel, elf_machine_rela): Handle
TLS relocations.
diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c
new file mode 100644
index 0000000..bb5dd0e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fcntl.h>
+
+int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+posix_fadvise (int fd, off_t offset, off_t len, int advise)
+{
+ /* ARM only has a syscall for fadvise64_64. */
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
diff --git a/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
new file mode 100644
index 0000000..86752f8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
@@ -0,0 +1,78 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+#include <kernel-features.h>
+
+int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
+int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
+{
+#ifdef __NR_arm_fadvise64_64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
+ __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
+ __LONG_LONG_PAIR ((long)(len >> 32), (long)len));
+ if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return 0;
+# ifndef __ASSUME_FADVISE64_64_SYSCALL
+ if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
+# endif
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+#endif
+#ifndef __ASSUME_FADVISE64_64_SYSCALL
+# ifdef __NR_fadvise64
+ if (len != (off_t) len)
+ return EOVERFLOW;
+
+ INTERNAL_SYSCALL_DECL (err2);
+ int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 6, fd, 0,
+ __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
+ (off_t) len, advise);
+ if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
+ return 0;
+ return INTERNAL_SYSCALL_ERRNO (ret2, err2);
+# else
+ return ENOSYS;
+# endif
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
+
+int
+attribute_compat_text_section
+__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
+{
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
+
+versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
+compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
+#else
+strong_alias (__posix_fadvise64_l64, posix_fadvise64);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=485a9bb9f02c45f15bdb326d32a232037b1de31b
commit 485a9bb9f02c45f15bdb326d32a232037b1de31b
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 5 20:15:22 2005 +0000
* sysdeps/arm/dl-machine.h: Include <tls.h>.
(elf_machine_type_class, elf_machine_rel, elf_machine_rela): Handle
TLS relocations.
* sysdeps/unix/sysv/linux/arm/Makefile: Build __aeabi_read_tp.
* sysdeps/unix/sysv/linux/arm/sysdep.h (INTERNAL_SYSCALL_RAW): Renamed
from INTERNAL_SYSCALL.
(INTERNAL_SYSCALL, INTERNAL_SYSCALL_ARM): New macros.
* sysdeps/arm/dl-tls.h, sysdeps/arm/elf/configure.in,
sysdeps/arm/elf/configure, sysdeps/arm/libc-tls.c,
sysdeps/arm/linuxthreads/tls.h, sysdeps/arm/tls-macros.h,
sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S,
sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 2579d71..0c0568e 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,20 @@
2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/dl-machine.h: Include <tls.h>.
+ (elf_machine_type_class, elf_machine_rel, elf_machine_rela): Handle
+ TLS relocations.
+ * sysdeps/unix/sysv/linux/arm/Makefile: Build __aeabi_read_tp.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (INTERNAL_SYSCALL_RAW): Renamed
+ from INTERNAL_SYSCALL.
+ (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ARM): New macros.
+ * sysdeps/arm/dl-tls.h, sysdeps/arm/elf/configure.in,
+ sysdeps/arm/elf/configure, sysdeps/arm/libc-tls.c,
+ sysdeps/arm/linuxthreads/tls.h, sysdeps/arm/tls-macros.h,
+ sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S,
+ sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S: New files.
+
+2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/atomicity.h: Delete.
* sysdeps/arm/bits/atomic.h: New file.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index be03e7b..2534be1 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -24,6 +24,7 @@
#define ELF_MACHINE_NAME "ARM"
#include <sys/param.h>
+#include <tls.h>
#define VALID_ELF_ABIVERSION(ver) (ver == 0)
#define VALID_ELF_OSABI(osabi) \
@@ -193,13 +194,22 @@ _dl_start_user:\n\
.previous\n\
");
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ define the value.
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
of the main executable's symbols, as for a COPY reloc. */
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+# define elf_machine_type_class(type) \
+ ((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \
+ || (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
+#else
#define elf_machine_type_class(type) \
((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
+#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
@@ -399,7 +409,24 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
*reloc_addr = value;
}
- break;
+ break;
+#if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ case R_ARM_TLS_DTPMOD32:
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+ break;
+
+ case R_ARM_TLS_DTPOFF32:
+ *reloc_addr += sym->st_value;
+ break;
+
+ case R_ARM_TLS_TPOFF32:
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr += sym->st_value + sym_map->l_tls_offset;
+ break;
+#endif
default:
_dl_reloc_bad_type (map, r_type, 0);
break;
@@ -480,6 +507,24 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = value;
}
break;
+#if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ case R_ARM_TLS_DTPMOD32:
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+ break;
+
+ case R_ARM_TLS_DTPOFF32:
+ *reloc_addr = sym->st_value + reloc->r_addend;
+ break;
+
+ case R_ARM_TLS_TPOFF32:
+ CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr = (sym->st_value + sym_map->l_tls_offset
+ + reloc->r_addend);
+ break;
+#endif
default:
_dl_reloc_bad_type (map, r_type, 0);
break;
diff --git a/sysdeps/arm/dl-tls.h b/sysdeps/arm/dl-tls.h
new file mode 100644
index 0000000..e0324a7
--- /dev/null
+++ b/sysdeps/arm/dl-tls.h
@@ -0,0 +1,29 @@
+/* Thread-local storage handling in the ELF dynamic linker. ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* Type used for the representation of TLS information in the GOT. */
+typedef struct
+{
+ unsigned long int ti_module;
+ unsigned long int ti_offset;
+} tls_index;
+
+
+extern void *__tls_get_addr (tls_index *ti);
diff --git a/sysdeps/arm/elf/configure b/sysdeps/arm/elf/configure
new file mode 100644
index 0000000..234fc20
--- /dev/null
+++ b/sysdeps/arm/elf/configure
@@ -0,0 +1,45 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/arm/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+echo "$as_me:$LINENO: checking for ARM TLS support" >&5
+echo $ECHO_N "checking for ARM TLS support... $ECHO_C" >&6
+if test "${libc_cv_arm_tls+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.s <<\EOF
+ .section ".tdata", "awT", %progbits
+ .globl foo
+foo: .long 1
+ .section ".tbss", "awT", %nobits
+ .globl bar
+bar: .skip 4
+ .text
+.word foo(tpoff)
+.word foo(tlsgd)
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_arm_tls=yes
+else
+ libc_cv_arm_tls=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_arm_tls" >&5
+echo "${ECHO_T}$libc_cv_arm_tls" >&6
+if test $libc_cv_arm_tls = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TLS_SUPPORT 1
+_ACEOF
+
+fi
+fi
+
+#AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/arm/elf/configure.in b/sysdeps/arm/elf/configure.in
new file mode 100644
index 0000000..1045296
--- /dev/null
+++ b/sysdeps/arm/elf/configure.in
@@ -0,0 +1,35 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/arm/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl
+cat > conftest.s <<\EOF
+ .section ".tdata", "awT", %progbits
+ .globl foo
+foo: .long 1
+ .section ".tbss", "awT", %nobits
+ .globl bar
+bar: .skip 4
+ .text
+.word foo(tpoff)
+.word foo(tlsgd)
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_arm_tls=yes
+else
+ libc_cv_arm_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_arm_tls = yes; then
+ AC_DEFINE(HAVE_TLS_SUPPORT)
+fi
+fi
+
+dnl It is always possible to access static and hidden symbols in an
+dnl position independent way.
+dnl NOTE: This feature was added by the GCC TLS patches. We should test for
+dnl it. Until we do, don't define it.
+#AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/arm/libc-tls.c b/sysdeps/arm/libc-tls.c
new file mode 100644
index 0000000..53c2923
--- /dev/null
+++ b/sysdeps/arm/libc-tls.c
@@ -0,0 +1,37 @@
+/* Thread-local storage handling in the ELF dynamic linker. ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/generic/libc-tls.c>
+#include <dl-tls.h>
+
+#if USE_TLS
+
+/* On ARM, linker optimizations are not required, so __tls_get_addr
+ can be called even in statically linked binaries. In this case module
+ must be always 1 and PT_TLS segment exist in the binary, otherwise it
+ would not link. */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ return (char *) dtv[1].pointer.val + ti->ti_offset;
+}
+
+#endif
diff --git a/sysdeps/arm/linuxthreads/tls.h b/sysdeps/arm/linuxthreads/tls.h
new file mode 100644
index 0000000..8057a54
--- /dev/null
+++ b/sysdeps/arm/linuxthreads/tls.h
@@ -0,0 +1,172 @@
+/* Definitions for thread-local data handling. linuxthreads/ARM version.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H
+
+#ifndef __ASSEMBLER__
+
+# include <stdbool.h>
+# include <pt-machine.h>
+# include <stddef.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
+} dtv_t;
+
+typedef struct
+{
+ dtv_t *dtv;
+
+ /* Reserved for the thread implementation. Unused in LinuxThreads. */
+ void *private;
+} tcbhead_t;
+#endif
+
+
+/* We can support TLS only if the floating-stack support is available.
+ However, we want to compile in the support and test at runtime whether
+ the running kernel can support it or not. To avoid bothering with the
+ TLS support code at all, use configure --without-tls.
+
+ We need USE_TLS to be consistently defined, for ldsodefs.h conditionals.
+ But some of the code below can cause problems in building libpthread
+ (e.g. useldt.h will defined FLOATING_STACKS when it shouldn't). */
+
+/* LinuxThreads can only support TLS if both floating stacks and support
+ from the tools are available.
+
+ We have to define USE_TLS consistently, or ldsodefs.h will lay out types
+ differently between an NPTL build and a LinuxThreads build. It can be set
+ for libc.so and not libpthread.so, but only if we provide appropriate padding
+ in the _pthread_descr_struct.
+
+ Currently nothing defines FLOATING_STACKS. We could assume this based on
+ kernel version once the TLS patches are available in kernel.org.
+
+ To avoid bothering with the TLS support code at all, use configure
+ --without-tls. */
+
+#if defined HAVE_TLS_SUPPORT \
+ && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
+
+/* Signal that TLS support is available. */
+# define USE_TLS 1
+
+/* Include padding in _pthread_descr_struct so that libc can find p_errno,
+ if libpthread will only include the padding because of the !IS_IN_libpthread
+ check. */
+#ifndef FLOATING_STACKS
+# define INCLUDE_TLS_PADDING 1
+#endif
+
+# ifndef __ASSEMBLER__
+/* Get system call information. */
+# include <sysdep.h>
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+
+/* This is the size of the TCB. */
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (tcbhead_t)
+
+/* This is the size we need before TCB. */
+# define TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
+
+/* The DTV is allocated at the TP; the TCB is placed elsewhere. */
+# define TLS_DTV_AT_TP 1
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(TCBP, DTVP) \
+ (((tcbhead_t *) (TCBP))->dtv = (DTVP) + 1)
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(DTV) \
+ (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (DTV))
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(TCBP) \
+ (((tcbhead_t *) (TCBP))->dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(TCBP, SECONDCALL) \
+ ({ INTERNAL_SYSCALL_DECL (err); \
+ long result_var; \
+ result_var = INTERNAL_SYSCALL_ARM (set_tls, err, 1, (TCBP)); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; })
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ (((tcbhead_t *)__builtin_thread_pointer ())->dtv)
+
+/* Return the thread descriptor for the current thread. */
+# undef THREAD_SELF
+# define THREAD_SELF \
+ ((pthread_descr)__builtin_thread_pointer () - 1)
+
+# undef INIT_THREAD_SELF
+# define INIT_THREAD_SELF(DESCR, NR) \
+ TLS_INIT_TP ((struct _pthread_descr_struct *)(DESCR) + 1, 0)
+
+/* Get the thread descriptor definition. */
+# include <linuxthreads/descr.h>
+
+/* ??? Generic bits of LinuxThreads may call these macros with
+ DESCR set to NULL. We are expected to be able to reference
+ the "current" value.
+
+ In our case, we'd really prefer to use DESCR, since lots of
+ PAL_code calls would be expensive. We can only trust that
+ the compiler does its job and unifies the multiple
+ __builtin_thread_pointer instances. */
+
+#define THREAD_GETMEM(descr, member) \
+ ((void) sizeof (descr), THREAD_SELF->member)
+#define THREAD_GETMEM_NC(descr, member) \
+ ((void) sizeof (descr), THREAD_SELF->member)
+#define THREAD_SETMEM(descr, member, value) \
+ ((void) sizeof (descr), THREAD_SELF->member = (value))
+#define THREAD_SETMEM_NC(descr, member, value) \
+ ((void) sizeof (descr), THREAD_SELF->member = (value))
+
+/* Initializing the thread pointer will generate a SIGILL if the syscall
+ is not available. */
+#define TLS_INIT_TP_EXPENSIVE 1
+
+# endif /* HAVE_TLS_SUPPORT */
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
diff --git a/sysdeps/arm/tls-macros.h b/sysdeps/arm/tls-macros.h
new file mode 100644
index 0000000..94aa3a8
--- /dev/null
+++ b/sysdeps/arm/tls-macros.h
@@ -0,0 +1,51 @@
+#define TLS_LE(x) \
+ ({ int *__result; \
+ void *tp = __builtin_thread_pointer (); \
+ asm ("ldr %0, 1f; " \
+ "add %0, %1, %0; " \
+ "b 2f; " \
+ "1: .word " #x "(tpoff); " \
+ "2: " \
+ : "=&r" (__result) : "r" (tp)); \
+ __result; })
+
+#define TLS_IE(x) \
+ ({ int *__result; \
+ void *tp = __builtin_thread_pointer (); \
+ asm ("ldr %0, 1f; " \
+ "3: ldr %0, [pc, %0];" \
+ "add %0, %1, %0; " \
+ "b 2f; " \
+ "1: .word " #x "(gottpoff) + (. - 3b - 8); " \
+ "2: " \
+ : "=&r" (__result) : "r" (tp)); \
+ __result; })
+
+#define TLS_LD(x) \
+ ({ char *__result; \
+ int __offset; \
+ extern void *__tls_get_addr (void *); \
+ asm ("ldr %0, 2f; " \
+ "1: add %0, pc, %0; " \
+ "b 3f; " \
+ "2: .word " #x "(tlsldm) + (. - 1b - 8); " \
+ "3: " \
+ : "=r" (__result)); \
+ __result = (char *)__tls_get_addr (__result); \
+ asm ("ldr %0, 1f; " \
+ "b 2f; " \
+ "1: .word " #x "(tlsldo); " \
+ "2: " \
+ : "=r" (__offset)); \
+ (int *) (__result + __offset); })
+
+#define TLS_GD(x) \
+ ({ int *__result; \
+ extern void *__tls_get_addr (void *); \
+ asm ("ldr %0, 2f; " \
+ "1: add %0, pc, %0; " \
+ "b 3f; " \
+ "2: .word " #x "(tlsgd) + (. - 1b - 8); " \
+ "3: " \
+ : "=r" (__result)); \
+ (int *)__tls_get_addr (__result); })
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 0ccdbe8..d91b968 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,3 +1,13 @@
+ifeq ($(subdir),csu)
+sysdep_routines += aeabi_read_tp libc-aeabi_read_tp
+static-only-routines += aeabi_read_tp
+shared-only-routines += libc-aeabi_read_tp
+endif
+
+ifeq ($(subdir),elf)
+sysdep-rtld-routines += aeabi_read_tp
+endif
+
ifeq ($(subdir),misc)
sysdep_routines += ioperm
sysdep_headers += sys/elf.h sys/io.h
diff --git a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
new file mode 100644
index 0000000..4a7b951
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
@@ -0,0 +1,34 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#ifdef HAVE_TLS_SUPPORT
+
+/* GCC will emit calls to this routine under -mtp=soft. Linux has an
+ equivalent helper function (which clobbers fewer registers than
+ a normal function call) in a high page of memory; tail call to the
+ helper. */
+
+ .hidden __aeabi_read_tp
+ENTRY (__aeabi_read_tp)
+ mov r0, #0xffff0fff
+ sub pc, r0, #31
+END (__aeabi_read_tp)
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S
new file mode 100644
index 0000000..6132afc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S
@@ -0,0 +1 @@
+#include <aeabi_read_tp.S>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index f42a5c8..4df3e37 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -179,20 +179,28 @@ __local_syscall_error: \
#undef INTERNAL_SYSCALL_DECL
#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
-#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) \
+#undef INTERNAL_SYSCALL_RAW
+#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \
({ unsigned int _sys_result; \
{ \
register int _a1 asm ("a1"); \
LOAD_ARGS_##nr (args) \
asm volatile ("swi %1 @ syscall " #name \
: "=r" (_a1) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (name) ASM_ARGS_##nr \
: "memory"); \
_sys_result = _a1; \
} \
(int) _sys_result; })
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
+
+#undef INTERNAL_SYSCALL_ARM
+#define INTERNAL_SYSCALL_ARM(name, err, nr, args...) \
+ INTERNAL_SYSCALL_RAW(__ARM_NR_##name, err, nr, args)
+
#undef INTERNAL_SYSCALL_ERROR_P
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
((unsigned int) (val) >= 0xfffff001u)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4900b98dc1dfd60b1f7a4141f67e398ec6930cf
commit b4900b98dc1dfd60b1f7a4141f67e398ec6930cf
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 5 20:14:10 2005 +0000
* sysdeps/arm/atomicity.h: Delete.
* sysdeps/arm/bits/atomic.h: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e7b6b24..2579d71 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,5 +1,10 @@
2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+ * sysdeps/arm/atomicity.h: Delete.
+ * sysdeps/arm/bits/atomic.h: New file.
+
+2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+
* sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER,
ARCH_LA_PLTEXIT): Define.
* sysdeps/arm/ldsodefs.h, sysdeps/arm/tst-audit.h: New files.
diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h
deleted file mode 100644
index 1a437a6..0000000
--- a/sysdeps/arm/atomicity.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Low-level functions for atomic operations. ARM version.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ATOMICITY_H
-#define _ATOMICITY_H 1
-
-#include <inttypes.h>
-
-
-static inline int
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, int val)
-{
- int tmp1;
- int tmp2;
- int result;
- __asm__ ("\n"
- "0:\tldr\t%0,[%3]\n\t"
- "add\t%1,%0,%4\n\t"
- "swp\t%2,%1,[%3]\n\t"
- "cmp\t%0,%2\n\t"
- "swpne\t%1,%2,[%3]\n\t"
- "bne\t0b"
- : "=&r" (result), "=&r" (tmp1), "=&r" (tmp2)
- : "r" (mem), "r"(val)
- : "cc", "memory");
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- int tmp1;
- int tmp2;
- int tmp3;
- __asm__ ("\n"
- "0:\tldr\t%0,[%3]\n\t"
- "add\t%1,%0,%4\n\t"
- "swp\t%2,%1,[%3]\n\t"
- "cmp\t%0,%2\n\t"
- "swpne\t%1,%2,[%3]\n\t"
- "bne\t0b"
- : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3)
- : "r" (mem), "r"(val)
- : "cc", "memory");
-}
-
-static inline int
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- int result, tmp;
- __asm__ ("\n"
- "0:\tldr\t%1,[%2]\n\t"
- "mov\t%0,#0\n\t"
- "cmp\t%1,%4\n\t"
- "bne\t1f\n\t"
- "swp\t%0,%3,[%2]\n\t"
- "cmp\t%1,%0\n\t"
- "swpne\t%1,%0,[%2]\n\t"
- "bne\t0b\n\t"
- "mov\t%0,#1\n"
- "1:"
- : "=&r" (result), "=&r" (tmp)
- : "r" (p), "r" (newval), "r" (oldval)
- : "cc", "memory");
- return result;
-}
-
-#endif /* atomicity.h */
diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h
new file mode 100644
index 0000000..14d2dbe
--- /dev/null
+++ b/sysdeps/arm/bits/atomic.h
@@ -0,0 +1,101 @@
+/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdint.h>
+#include <sysdep.h>
+
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+void __arm_link_error (void);
+
+#define atomic_exchange_acq(mem, newvalue) \
+ ({ __typeof (*mem) result; \
+ if (sizeof (*mem) == 1) \
+ __asm__ __volatile__ ("swpb %0, %1, [%2]" \
+ : "=&r,&r" (result) \
+ : "r,0" (newvalue), "r,r" (mem) : "memory"); \
+ else if (sizeof (*mem) == 4) \
+ __asm__ __volatile__ ("swp %0, %1, [%2]" \
+ : "=&r,&r" (result) \
+ : "r,0" (newvalue), "r,r" (mem) : "memory"); \
+ else \
+ { \
+ result = 0; \
+ abort (); \
+ } \
+ result; })
+
+/* Atomic compare and exchange. These sequences are not actually atomic;
+ there is a race if *MEM != OLDVAL and we are preempted between the two
+ swaps. However, they are very close to atomic, and are the best that a
+ pre-ARMv6 implementation can do without operating system support.
+ LinuxThreads has been using these sequences for many years. */
+
+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
+ ({ __typeof (oldval) result, tmp; \
+ __asm__ ("\n" \
+ "0:\tldr\t%1,[%2]\n\t" \
+ "cmp\t%1,%4\n\t" \
+ "movne\t%0,%1\n\t" \
+ "bne\t1f\n\t" \
+ "swpb\t%0,%3,[%2]\n\t" \
+ "cmp\t%1,%0\n\t" \
+ "swpbne\t%1,%0,[%2]\n\t" \
+ "bne\t0b\n\t" \
+ "1:" \
+ : "=&r" (result), "=&r" (tmp) \
+ : "r" (mem), "r" (newval), "r" (oldval) \
+ : "cc", "memory"); \
+ result; })
+
+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ __typeof (oldval) result, tmp; \
+ __asm__ ("\n" \
+ "0:\tldr\t%1,[%2]\n\t" \
+ "cmp\t%1,%4\n\t" \
+ "movne\t%0,%1\n\t" \
+ "bne\t1f\n\t" \
+ "swp\t%0,%3,[%2]\n\t" \
+ "cmp\t%1,%0\n\t" \
+ "swpne\t%1,%0,[%2]\n\t" \
+ "bne\t0b\n\t" \
+ "1:" \
+ : "=&r" (result), "=&r" (tmp) \
+ : "r" (mem), "r" (newval), "r" (oldval) \
+ : "cc", "memory"); \
+ result; })
+
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=867700cb74293e99c5b91155aa4254c50fd4a6ce
commit 867700cb74293e99c5b91155aa4254c50fd4a6ce
Author: Daniel Jacobowitz <dan@codesourcery.com>
Date: Wed Oct 5 20:13:03 2005 +0000
* sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER,
ARCH_LA_PLTEXIT): Define.
* sysdeps/arm/ldsodefs.h, sysdeps/arm/tst-audit.h: New files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 1148fae..e7b6b24 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2005-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h (ARCH_LA_PLTENTER,
+ ARCH_LA_PLTEXIT): Define.
+ * sysdeps/arm/ldsodefs.h, sysdeps/arm/tst-audit.h: New files.
+
2005-06-13 Philip Blundell <philb@gnu.org>
Patch from addsub@eyou.com:
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index abff153..be03e7b 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -243,6 +243,10 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
Prelinked libraries may use Elf32_Rela though. */
#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER arm_gnu_pltenter
+#define ARCH_LA_PLTEXIT arm_gnu_pltexit
+
#ifdef RESOLVE_MAP
/* Deal with an out-of-range PC24 reloc. */
diff --git a/sysdeps/arm/ldsodefs.h b/sysdeps/arm/ldsodefs.h
new file mode 100644
index 0000000..d700e22
--- /dev/null
+++ b/sysdeps/arm/ldsodefs.h
@@ -0,0 +1,41 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _ARM_LDSODEFS_H
+#define _ARM_LDSODEFS_H 1
+
+#include <elf.h>
+
+struct La_arm_regs;
+struct La_arm_retval;
+
+#define ARCH_PLTENTER_MEMBERS \
+ Elf32_Addr (*arm_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \
+ uintptr_t *, struct La_arm_regs *, \
+ unsigned int *, const char *, \
+ long int *)
+
+#define ARCH_PLTEXIT_MEMBERS \
+ Elf32_Addr (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \
+ uintptr_t *, struct La_arm_regs *, \
+ struct La_arm_retval *, const char *)
+
+#include_next <ldsodefs.h>
+
+#endif
diff --git a/sysdeps/arm/tst-audit.h b/sysdeps/arm/tst-audit.h
new file mode 100644
index 0000000..bec743c
--- /dev/null
+++ b/sysdeps/arm/tst-audit.h
@@ -0,0 +1,26 @@
+/* Definitions for testing PLT entry/exit auditing. ARM version.
+
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define pltenter la_arm_gnu_pltenter
+#define pltexit la_arm_gnu_pltexit
+#define La_regs La_arm_regs
+#define La_retval La_arm_retval
+#define int_retval lrv_reg[0]
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc5ca5d1f6bf8c585713181f7b022302a5af195e
commit dc5ca5d1f6bf8c585713181f7b022302a5af195e
Author: Richard Henderson <rth@redhat.com>
Date: Tue Sep 20 05:35:42 2005 +0000
[BZ #1358]
* sysdeps/unix/alpha/sysdep.h (inline_syscall1): Copy argument(s)
to a temporary first.
(inline_syscall2, inline_syscall3, inline_syscall4): Likewise.
(inline_syscall5, inline_syscall6): Likewise.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index f9f1dd6..a154db8 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -242,9 +242,10 @@ __LABEL(name) \
register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_19 __asm__("$19"); \
+ register long _tmp_16 = (long) (arg1); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
+ _sc_16 = _tmp_16; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -261,10 +262,12 @@ __LABEL(name) \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
+ register long _tmp_16 = (long) (arg1); \
+ register long _tmp_17 = (long) (arg2); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
+ _sc_16 = _tmp_16; \
+ _sc_17 = _tmp_17; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -282,11 +285,14 @@ __LABEL(name) \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
+ register long _tmp_16 = (long) (arg1); \
+ register long _tmp_17 = (long) (arg2); \
+ register long _tmp_18 = (long) (arg3); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
+ _sc_16 = _tmp_16; \
+ _sc_17 = _tmp_17; \
+ _sc_18 = _tmp_18; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4 %5" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -305,12 +311,16 @@ __LABEL(name) \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
+ register long _tmp_16 = (long) (arg1); \
+ register long _tmp_17 = (long) (arg2); \
+ register long _tmp_18 = (long) (arg3); \
+ register long _tmp_19 = (long) (arg4); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
+ _sc_16 = _tmp_16; \
+ _sc_17 = _tmp_17; \
+ _sc_18 = _tmp_18; \
+ _sc_19 = _tmp_19; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -330,13 +340,18 @@ __LABEL(name) \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
register long _sc_20 __asm__("$20"); \
+ register long _tmp_16 = (long) (arg1); \
+ register long _tmp_17 = (long) (arg2); \
+ register long _tmp_18 = (long) (arg3); \
+ register long _tmp_19 = (long) (arg4); \
+ register long _tmp_20 = (long) (arg5); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
+ _sc_16 = _tmp_16; \
+ _sc_17 = _tmp_17; \
+ _sc_18 = _tmp_18; \
+ _sc_19 = _tmp_19; \
+ _sc_20 = _tmp_20; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -357,14 +372,20 @@ __LABEL(name) \
register long _sc_19 __asm__("$19"); \
register long _sc_20 __asm__("$20"); \
register long _sc_21 __asm__("$21"); \
+ register long _tmp_16 = (long) (arg1); \
+ register long _tmp_17 = (long) (arg2); \
+ register long _tmp_18 = (long) (arg3); \
+ register long _tmp_19 = (long) (arg4); \
+ register long _tmp_20 = (long) (arg5); \
+ register long _tmp_21 = (long) (arg6); \
\
_sc_0 = name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- _sc_21 = (long) (arg6); \
+ _sc_16 = _tmp_16; \
+ _sc_17 = _tmp_17; \
+ _sc_18 = _tmp_18; \
+ _sc_19 = _tmp_19; \
+ _sc_20 = _tmp_20; \
+ _sc_21 = _tmp_21; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
: inline_syscall_r0_out_constraint (_sc_0), \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=228f398a3004e1a24dabd7e01c009f416b760b03
commit 228f398a3004e1a24dabd7e01c009f416b760b03
Author: Richard Henderson <rth@redhat.com>
Date: Tue Sep 20 05:35:13 2005 +0000
* sysdeps/alpha/ldiv.S (lldiv): Add alias.
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index 3909672..0a971a7 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -214,3 +214,5 @@ $divbyzero:
ret
.end ldiv
+
+weak_alias (ldiv, lldiv)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32e1823eb3e13e8f9f09d2970f393ed4f60c9685
commit 32e1823eb3e13e8f9f09d2970f393ed4f60c9685
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 16 13:12:44 2005 +0000
[BZ #1047]
* sysdeps/unix/sysv/linux/mips/getpagesize.c: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/getpagesize.c b/sysdeps/unix/sysv/linux/mips/getpagesize.c
new file mode 100644
index 0000000..49492e5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getpagesize.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/ia64/getpagesize.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea78d8fa650ea6cc0d911d99bbd56a44e85296d9
commit ea78d8fa650ea6cc0d911d99bbd56a44e85296d9
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 16 12:20:48 2005 +0000
2005-09-16 Maciej W. Rozycki <macro@linux-mips.org>
[BZ #933]
* sysdeps/unix/sysv/linux/mips/brk.c (__brk): Load the number of
the syscall immediately before invocation.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S (__ioctl): Use
macros to handle GP.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S (syscall):
Likewise. Update inaccurate comments.
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index 4be88a9..5c31bec 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/MIPS.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,9 +37,10 @@ __brk (void *addr)
register long int res __asm__ ("$2");
asm ("move\t$4,%2\n\t"
+ "li\t%0,%1\n\t"
"syscall" /* Perform the system call. */
: "=r" (res)
- : "0" (SYS_ify (brk)), "r" (addr)
+ : "I" (SYS_ify (brk)), "r" (addr)
: "$4", "$7");
newbrk = (void *) res;
}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
index 7b14089..e4b4f00 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
@@ -1,4 +1,4 @@
-/* Copyright 2003 Free Software Foundation, Inc.
+/* Copyright 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,16 +25,16 @@
.text
ENTRY (__ioctl)
+ sll a1, a1, 0
li v0, __NR_ioctl
- sll a1,a1,0
syscall /* Do the system call. */
bne a3, zero, L(error)
ret
L(error):
- .cpsetup t9, a0, __ioctl
- PTR_LA t9,__syscall_error
- .cprestore
+ SETUP_GP64 (a0, __ioctl)
+ PTR_LA t9, __syscall_error
+ RESTORE_GP64
jr t9
PSEUDO_END (__ioctl)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
index ea5bf49..3c6aaac 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,17 +20,20 @@
#include <sys/asm.h>
-/* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for
- more information about the value -4095 used below. */
+/* Usage:
+ long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-/* Usage: long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5)
- We need to do some arg shifting, the syscall_number will be in
- rax. */
+ We need to do some arg shifting, syscall_number will be in v0. */
.text
-ENTRY (syscall)
- move v0, a0 /* Syscall number -> v0 */
+NESTED (syscall, SZREG, ra)
+ .mask 0x00010000, -SZREG
+ .fmask 0x00000000, 0
+ PTR_ADDIU sp, -SZREG
+ REG_S s0, (sp)
+
+ move s0, a0
move a0, a1 /* shift arg1 - arg7. */
move a1, a2
move a2, a3
@@ -39,15 +42,19 @@ ENTRY (syscall)
move a5, a6
move a6, a7
+ move v0, s0 /* Syscall number -> v0 */
syscall /* Do the system call. */
+
+ REG_L s0, (sp)
+ PTR_ADDIU sp, SZREG
bne a3, zero, L(error)
ret
L(error):
- .cpsetup t9, a0, syscall
- PTR_LA t9,__syscall_error
- .cprestore
+ SETUP_GP64 (a0, syscall)
+ PTR_LA t9, __syscall_error
+ RESTORE_GP64
jr t9
-PSEUDO_END (syscall)
+END (syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb4e0abb406333e563e1ea9c41f4c04dfa9d1676
commit eb4e0abb406333e563e1ea9c41f4c04dfa9d1676
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 8 17:39:04 2005 +0000
(FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
(lll_futex_wake_unlock): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index fd4a7ca..ab325d2 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -31,6 +31,8 @@
#define FUTEX_WAKE 1
#define FUTEX_REQUEUE 3
#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -73,6 +75,20 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_WAKE_OP, (nr_wake), \
+ (nr_wake2), (futexp2), \
+ FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
+ })
+
+
+
static inline int __attribute__((always_inline))
__lll_mutex_trylock(int *futex)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e582e2ddcf4c681d0b0e6bed0ecb706b30382e27
commit e582e2ddcf4c681d0b0e6bed0ecb706b30382e27
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 11 15:48:29 2005 +0000
(pthread_rwlock_t): Make sure __flags are located at offset 48 from the
start of the structure.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index d13d6e8..86b4703 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Alpha version.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -117,8 +117,9 @@ typedef union
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
-
- unsigned int __reserved[6];
+ int __pad1;
+ unsigned long int __pad2;
+ unsigned long int __pad3;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15aff3c956571d045873d587437e11259d88b81d
commit 15aff3c956571d045873d587437e11259d88b81d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 8 18:52:47 2005 +0000
Add libm_hidden_def.
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c
index 77d4cc1..79aa970 100644
--- a/sysdeps/alpha/fpu/feholdexcpt.c
+++ b/sysdeps/alpha/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -31,3 +31,4 @@ feholdexcept (fenv_t *envp)
return 0;
}
+libm_hidden_def (feholdexcept)
diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c
index c4dc196..54b2bcf 100644
--- a/sysdeps/alpha/fpu/fesetround.c
+++ b/sysdeps/alpha/fpu/fesetround.c
@@ -1,5 +1,5 @@
/* Set current rounding direction.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -40,3 +40,4 @@ fesetround (int round)
return 0;
}
+libm_hidden_def (fesetround)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb699c14c2758b8c3a919aacecda561f711377eb
commit eb699c14c2758b8c3a919aacecda561f711377eb
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 8 06:11:21 2005 +0000
2005-07-08 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/setjmp.S (__sigsetjmp): Use %r1 not %r19.
diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S
index f10a7a3..0da34db 100644
--- a/sysdeps/hppa/setjmp.S
+++ b/sysdeps/hppa/setjmp.S
@@ -53,17 +53,17 @@ __sigsetjmp:
stw %rp, 80(%r26)
- ldo 88(%r26),%r19
- fstds,ma %fr12, 8(%r19) /* 88 */
- fstds,ma %fr13, 8(%r19) /* 96 */
- fstds,ma %fr14, 8(%r19) /* 104 */
- fstds,ma %fr15, 8(%r19) /* 112 */
- fstds,ma %fr16, 8(%r19) /* 120 */
- fstds,ma %fr17, 8(%r19) /* 128 */
- fstds,ma %fr18, 8(%r19) /* 136 */
- fstds,ma %fr19, 8(%r19) /* 144 */
- fstds,ma %fr20, 8(%r19) /* 152 */
- fstds %fr21, 0(%r19) /* 160 */
+ ldo 88(%r26),%r1
+ fstds,ma %fr12, 8(%r1) /* 88 */
+ fstds,ma %fr13, 8(%r1) /* 96 */
+ fstds,ma %fr14, 8(%r1) /* 104 */
+ fstds,ma %fr15, 8(%r1) /* 112 */
+ fstds,ma %fr16, 8(%r1) /* 120 */
+ fstds,ma %fr17, 8(%r1) /* 128 */
+ fstds,ma %fr18, 8(%r1) /* 136 */
+ fstds,ma %fr19, 8(%r1) /* 144 */
+ fstds,ma %fr20, 8(%r1) /* 152 */
+ fstds %fr21, 0(%r1) /* 160 */
b __sigjmp_save
nop
.procend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4782a56881f858a071008c5477f5e4f76129ac3
commit e4782a56881f858a071008c5477f5e4f76129ac3
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 8 06:10:13 2005 +0000
2005-07-08 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/add_n.s (__mpn_add_n): Use sr0 or r0, not 0.
* sysdeps/hppa/lshift.s (__mpn_lshift): Likewise.
* sysdeps/hppa/rshift.s (__mpn_rshift): Likewise.
* sysdeps/hppa/sub_n.s (__mpn_sub_n): Likewise.
* sysdeps/hppa/udiv_qrnnd.s (__udiv_qrnnd): Likewise.
* sysdeps/hppa/hppa1.1/udiv_qrnnd.s (__udiv_qrnnd): Likewise.
diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s
index aaabd72..a396b34 100644
--- a/sysdeps/hppa/add_n.s
+++ b/sysdeps/hppa/add_n.s
@@ -38,19 +38,19 @@ __mpn_add_n:
.callinfo frame=0,no_calls
.entry
- ldws,ma 4(0,%r25),%r21
- ldws,ma 4(0,%r24),%r20
+ ldws,ma 4(%r25),%r21
+ ldws,ma 4(%r24),%r20
addib,= -1,%r23,L$end ;! check for (SIZE == 1)
add %r21,%r20,%r28 ;! add first limbs ignoring cy
-L$loop: ldws,ma 4(0,%r25),%r21
- ldws,ma 4(0,%r24),%r20
- stws,ma %r28,4(0,%r26)
+L$loop: ldws,ma 4(%r25),%r21
+ ldws,ma 4(%r24),%r20
+ stws,ma %r28,4(%r26)
addib,<> -1,%r23,L$loop
addc %r21,%r20,%r28
-L$end: stws %r28,0(0,%r26)
+L$end: stws %r28,0(%r26)
bv 0(%r2)
addc %r0,%r0,%r28
diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
index fdc63e5..7b83619 100644
--- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
+++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
@@ -38,20 +38,20 @@ __udiv_qrnnd:
.entry
ldo 64(%r30),%r30
- stws %r25,-16(0,%r30) ;! n_hi
- stws %r24,-12(0,%r30) ;! n_lo
+ stws %r25,-16(%r30) ;! n_hi
+ stws %r24,-12(%r30) ;! n_lo
b,l L$0,%r1
ldo L$0000-L$0(%r1),%r1
L$0:
- fldds -16(0,%r30),%fr5
- stws %r23,-12(0,%r30)
+ fldds -16(%r30),%fr5
+ stws %r23,-12(%r30)
comib,<= 0,%r25,L$1
fcnvxf,dbl,dbl %fr5,%fr5
- fldds 0(0,%r1),%fr4
+ fldds 0(%r1),%fr4
fadd,dbl %fr4,%fr5,%fr5
L$1:
fcpy,sgl %fr0,%fr6L
- fldws -12(0,%r30),%fr6R
+ fldws -12(%r30),%fr6R
fcnvxf,dbl,dbl %fr6,%fr4
fdiv,dbl %fr5,%fr4,%fr5
@@ -60,9 +60,9 @@ L$1:
fstws %fr4R,-16(%r30)
xmpyu %fr4R,%fr6R,%fr6
ldws -16(%r30),%r28
- fstds %fr6,-16(0,%r30)
- ldws -12(0,%r30),%r21
- ldws -16(0,%r30),%r20
+ fstds %fr6,-16(%r30)
+ ldws -12(%r30),%r21
+ ldws -16(%r30),%r20
sub %r24,%r21,%r22
subb %r25,%r20,%r1
comib,= 0,%r1,L$2
@@ -72,7 +72,7 @@ L$1:
ldo -1(%r28),%r28
L$2:
bv 0(%r2)
- stws %r22,0(0,%r26)
+ stws %r22,0(%r26)
.exit
.procend
diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s
index 400fbcf..151b283 100644
--- a/sysdeps/hppa/lshift.s
+++ b/sysdeps/hppa/lshift.s
@@ -35,32 +35,32 @@ __mpn_lshift:
sh2add %r24,%r25,%r25
sh2add %r24,%r26,%r26
- ldws,mb -4(0,%r25),%r22
+ ldws,mb -4(%r25),%r22
subi 32,%r23,%r1
mtsar %r1
addib,= -1,%r24,L$0004
vshd %r0,%r22,%r28 ;! compute carry out limb
- ldws,mb -4(0,%r25),%r29
+ ldws,mb -4(%r25),%r29
addib,= -1,%r24,L$0002
vshd %r22,%r29,%r20
-L$loop: ldws,mb -4(0,%r25),%r22
- stws,mb %r20,-4(0,%r26)
+L$loop: ldws,mb -4(%r25),%r22
+ stws,mb %r20,-4(%r26)
addib,= -1,%r24,L$0003
vshd %r29,%r22,%r20
- ldws,mb -4(0,%r25),%r29
- stws,mb %r20,-4(0,%r26)
+ ldws,mb -4(%r25),%r29
+ stws,mb %r20,-4(%r26)
addib,<> -1,%r24,L$loop
vshd %r22,%r29,%r20
-L$0002: stws,mb %r20,-4(0,%r26)
+L$0002: stws,mb %r20,-4(%r26)
vshd %r29,%r0,%r20
bv 0(%r2)
- stw %r20,-4(0,%r26)
-L$0003: stws,mb %r20,-4(0,%r26)
+ stw %r20,-4(%r26)
+L$0003: stws,mb %r20,-4(%r26)
L$0004: vshd %r22,%r0,%r20
bv 0(%r2)
- stw %r20,-4(0,%r26)
+ stw %r20,-4(%r26)
.exit
.procend
diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s
index acb772f..dff189d 100644
--- a/sysdeps/hppa/rshift.s
+++ b/sysdeps/hppa/rshift.s
@@ -33,31 +33,31 @@ __mpn_rshift:
.callinfo frame=64,no_calls
.entry
- ldws,ma 4(0,%r25),%r22
+ ldws,ma 4(%r25),%r22
mtsar %r23
addib,= -1,%r24,L$0004
vshd %r22,%r0,%r28 ;! compute carry out limb
- ldws,ma 4(0,%r25),%r29
+ ldws,ma 4(%r25),%r29
addib,= -1,%r24,L$0002
vshd %r29,%r22,%r20
-L$loop: ldws,ma 4(0,%r25),%r22
- stws,ma %r20,4(0,%r26)
+L$loop: ldws,ma 4(%r25),%r22
+ stws,ma %r20,4(%r26)
addib,= -1,%r24,L$0003
vshd %r22,%r29,%r20
- ldws,ma 4(0,%r25),%r29
- stws,ma %r20,4(0,%r26)
+ ldws,ma 4(%r25),%r29
+ stws,ma %r20,4(%r26)
addib,<> -1,%r24,L$loop
vshd %r29,%r22,%r20
-L$0002: stws,ma %r20,4(0,%r26)
+L$0002: stws,ma %r20,4(%r26)
vshd %r0,%r29,%r20
bv 0(%r2)
- stw %r20,0(0,%r26)
-L$0003: stws,ma %r20,4(0,%r26)
+ stw %r20,0(%r26)
+L$0003: stws,ma %r20,4(%r26)
L$0004: vshd %r0,%r22,%r20
bv 0(%r2)
- stw %r20,0(0,%r26)
+ stw %r20,0(%r26)
.exit
.procend
diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s
index 34f1968..7764961 100644
--- a/sysdeps/hppa/sub_n.s
+++ b/sysdeps/hppa/sub_n.s
@@ -38,19 +38,19 @@ __mpn_sub_n:
.callinfo frame=0,no_calls
.entry
- ldws,ma 4(0,%r25),%r21
- ldws,ma 4(0,%r24),%r20
+ ldws,ma 4(%r25),%r21
+ ldws,ma 4(%r24),%r20
addib,= -1,%r23,L$end ;! check for (SIZE == 1)
sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy
-L$loop: ldws,ma 4(0,%r25),%r21
- ldws,ma 4(0,%r24),%r20
- stws,ma %r28,4(0,%r26)
+L$loop: ldws,ma 4(%r25),%r21
+ ldws,ma 4(%r24),%r20
+ stws,ma %r28,4(%r26)
addib,<> -1,%r23,L$loop
subb %r21,%r20,%r28
-L$end: stws %r28,0(0,%r26)
+L$end: stws %r28,0(%r26)
addc %r0,%r0,%r28
bv 0(%r2)
subi 1,%r28,%r28
diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s
index cd2b58d..8e9c07a 100644
--- a/sysdeps/hppa/udiv_qrnnd.s
+++ b/sysdeps/hppa/udiv_qrnnd.s
@@ -38,7 +38,7 @@ __udiv_qrnnd:
.callinfo frame=0,no_calls
.entry
- comb,< %r23,0,L$largedivisor
+ comb,< %r23,%r0,L$largedivisor
sub %r0,%r23,%r1 ;! clear cy as side-effect
ds %r0,%r1,%r0
addc %r24,%r24,%r24
@@ -107,7 +107,7 @@ __udiv_qrnnd:
ds %r25,%r23,%r25
comclr,>= %r25,%r0,%r0
addl %r25,%r23,%r25
- stws %r25,0(0,%r26)
+ stws %r25,0(%r26)
bv 0(%r2)
addc %r28,%r28,%r28
@@ -186,7 +186,7 @@ L$largedivisor:
comclr,>= %r25,%r0,%r0
addl %r25,%r22,%r25
sh1addl %r25,%r20,%r25
- stws %r25,0(0,%r26)
+ stws %r25,0(%r26)
bv 0(%r2)
addc %r24,%r24,%r28
@@ -269,7 +269,7 @@ L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1)
addc %r0,%r28,%r28
sub,<< %r25,%r23,%r0
addl %r25,%r1,%r25
- stws %r25,0(0,%r26)
+ stws %r25,0(%r26)
bv 0(%r2)
addc %r0,%r28,%r28
@@ -278,7 +278,7 @@ L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1)
L$FF..: add,uv %r25,%r24,%r24
sub,<< %r24,%r23,%r0
ldo 1(%r24),%r24
- stws %r24,0(0,%r26)
+ stws %r24,0(%r26)
bv 0(%r2)
addc %r0,%r25,%r28
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=baee7540a45fa5069f095800c73655adea35a296
commit baee7540a45fa5069f095800c73655adea35a296
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 21 18:38:49 2005 +0000
(RLIMIT_RTPRIO): Fix typo.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index 8bbd301..2163745 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -98,7 +98,7 @@ enum __rlimit_resource
/* Maximum realtime priority allowed for non-priviledged
processes. */
__RLIMIT_RTPRIO = 14,
-#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
+#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
__RLIMIT_NLIMITS = 15,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e742931994029e1bfd3cd8b632d90aeec35a58e
commit 5e742931994029e1bfd3cd8b632d90aeec35a58e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 20 15:07:34 2005 +0000
(RLIMIT_NICE, RLIMIT_RTPRIO): Add.
(RLIMIT_NLIMITS): Adjust.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index 54d6819..8bbd301 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Alpha/Linux version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -89,7 +89,18 @@ enum __rlimit_resource
__RLIMIT_MSGQUEUE = 12,
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
- __RLIMIT_NLIMITS = 13,
+ /* Maximum nice priority allowed to raise to.
+ Nice levels 19 .. -20 correspond to 0 .. 39
+ values of this resource limit. */
+ __RLIMIT_NICE = 13,
+#define RLIMIT_NICE __RLIMIT_NICE
+
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
+
+ __RLIMIT_NLIMITS = 15,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
#define RLIM_NLIMITS __RLIM_NLIMITS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 2b6c887..7e71529 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -89,7 +89,18 @@ enum __rlimit_resource
__RLIMIT_MSGQUEUE = 12,
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
- __RLIMIT_NLIMITS = 13,
+ /* Maximum nice priority allowed to raise to.
+ Nice levels 19 .. -20 correspond to 0 .. 39
+ values of this resource limit. */
+ __RLIMIT_NICE = 13,
+#define RLIMIT_NICE __RLIMIT_NICE
+
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+#define RLIMIT_RTPRIO _RLIMIT_RTPRIO
+
+ __RLIMIT_NLIMITS = 15,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
#define RLIM_NLIMITS __RLIM_NLIMITS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3bdeb53ad653d964ab7569c3468ac9ee6f33b593
commit 3bdeb53ad653d964ab7569c3468ac9ee6f33b593
Author: Phil Blundell <pb@reciva.com>
Date: Mon Jun 13 10:11:47 2005 +0000
2005-06-13 Philip Blundell <philb@gnu.org>
Patch from addsub@eyou.com:
* sysdeps/arm/ieee754.h: Deleted.
* sysdeps/arm/gmp-mparam.h: Support VFP and big endian.
* sysdeps/arm/bits/endian.h: Likewise.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 7383cb3..1148fae 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,10 @@
+2005-06-13 Philip Blundell <philb@gnu.org>
+
+ Patch from addsub@eyou.com:
+ * sysdeps/arm/ieee754.h: Deleted.
+ * sysdeps/arm/gmp-mparam.h: Support VFP and big endian.
+ * sysdeps/arm/bits/endian.h: Likewise.
+
2005-06-11 Phil Blundell <pb@reciva.com>
* sysdeps/arm/init-first.c: Deleted.
diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h
index 5e54cc7..dc909c3 100644
--- a/sysdeps/arm/bits/endian.h
+++ b/sysdeps/arm/bits/endian.h
@@ -1,12 +1,19 @@
-/* ARM is (usually) little-endian but with a big-endian FPU. */
-
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
+/* ARM can be either big or little endian. */
#ifdef __ARMEB__
#define __BYTE_ORDER __BIG_ENDIAN
#else
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
+
+/* FPA floating point units are always big-endian, irrespective of the
+ CPU endianness. VFP floating point units use the same endianness
+ as the rest of the system. */
+#ifdef __VFP_FP__
+#define __FLOAT_WORD_ORDER __BYTE_ORDER
+#else
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif
diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h
index c880be3..57ad7e2 100644
--- a/sysdeps/arm/gmp-mparam.h
+++ b/sysdeps/arm/gmp-mparam.h
@@ -1,6 +1,6 @@
/* gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1995, 2005 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
#define BITS_PER_SHORTINT 16
#define BITS_PER_CHAR 8
-#define IEEE_DOUBLE_BIG_ENDIAN 0
-#define IEEE_DOUBLE_MIXED_ENDIAN 1
+#if defined(__ARMEB__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 1
+#elif defined(__VFP_FP__)
+# define IEEE_DOUBLE_MIXED_ENDIAN 0
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+#else
+# define IEEE_DOUBLE_BIG_ENDIAN 0
+# define IEEE_DOUBLE_MIXED_ENDIAN 1
+#endif
diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h
deleted file mode 100644
index 629b97f..0000000
--- a/sysdeps/arm/ieee754.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _IEEE754_H
-
-#define _IEEE754_H 1
-#include <features.h>
-
-#include <endian.h>
-
-__BEGIN_DECLS
-
-union ieee754_float
- {
- float f;
-
- /* This is the IEEE 754 single-precision format. */
- struct
- {
- unsigned int mantissa:23;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa:22;
- unsigned int quiet_nan:1;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee_nan;
- };
-
-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
-
-
-union ieee754_double
- {
- double d;
-
- /* This is the IEEE 754 double-precision format. */
- struct
- {
- unsigned int mantissa0:20;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa0:19;
- unsigned int quiet_nan:1;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee_nan;
- };
-
-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
-
-
-/* The following two structures are correct for `new' floating point systems but
- wrong for the old FPPC. The only solution seems to be to avoid their use on
- old hardware. */
-
-union ieee854_long_double
- {
- long double d;
-
- /* This is the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:32;
- } ieee;
-
- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:30;
- unsigned int quiet_nan:1;
- unsigned int one:1;
- } ieee_nan;
- };
-
-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
-
-__END_DECLS
-
-#endif /* ieee754.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19f2e4ebef5133473a04035fae727b6c250e92a0
commit 19f2e4ebef5133473a04035fae727b6c250e92a0
Author: Phil Blundell <pb@reciva.com>
Date: Sat Jun 11 10:15:27 2005 +0000
2005-06-11 Phil Blundell <pb@reciva.com>
* sysdeps/arm/init-first.c: Deleted.
* sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index b5186cd..7383cb3 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,8 @@
+2005-06-11 Phil Blundell <pb@reciva.com>
+
+ * sysdeps/arm/init-first.c: Deleted.
+ * sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c: New file.
+
2005-06-10 Phil Blundell <pb@reciva.com>
Bug #957:
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
deleted file mode 100644
index 652cf95..0000000
--- a/sysdeps/arm/init-first.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Initialization code run first thing by the ELF startup code. For ARM.
- Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <unistd.h>
-
-extern void __libc_init (int, char **, char **);
-#ifdef USE_NONOPTION_FLAGS
-extern void __getopt_clean_environment (char **);
-#endif
-extern void __libc_global_ctors (void);
-
-int __libc_multiple_libcs attribute_hidden = 1;
-
-static void
-init (int *data)
-{
- int argc = *data;
- char **argv = (void *) (data + 1);
- char **envp = &argv[argc + 1];
-
- __environ = envp;
- __libc_init (argc, argv, envp);
-
-#ifdef USE_NONOPTION_FLAGS
- /* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment (envp);
-#endif
-}
-
-#ifdef SHARED
-/* This function is called to initialize the shared C library.
- It is called just before the user _start code from i386/elf/start.S,
- with the stack set up as that code gets it. */
-
-/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
- pointer in the dynamic section based solely on that. It is convention
- for this function to be in the `.init' section, but the symbol name is
- the only thing that really matters!! */
-/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
-
-void
-_init (int argc, ...)
-{
- init (&argc);
-
- __libc_global_ctors ();
-}
-#endif
-
-
-void
-__libc_init_first (int argc __attribute__ ((unused)), ...)
-{
-#ifndef SHARED
- init (&argc);
-#endif
-}
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c b/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c
new file mode 100644
index 0000000..4fb0db2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/fork.c
@@ -0,0 +1 @@
+#include <linuxthreads/sysdeps/unix/sysv/linux/fork.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51ae9dc83d6b52a46a9f5d00f43a0c6b49d7029c
commit 51ae9dc83d6b52a46a9f5d00f43a0c6b49d7029c
Author: Phil Blundell <pb@reciva.com>
Date: Fri Jun 10 18:10:47 2005 +0000
2005-06-10 Phil Blundell <pb@reciva.com>
Bug #957:
* sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on
big endian machines. Reported by Sven Henkel <shenkel@gmail.com>.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index 360b06f..b5186cd 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2005-06-10 Phil Blundell <pb@reciva.com>
+
+ Bug #957:
+ * sysdeps/unix/sysv/linux/arm/mmap64.S: Handle offset correctly on
+ big endian machines. Reported by Sven Henkel <shenkel@gmail.com>.
+
2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index b4b712c..5899140 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -27,10 +27,17 @@
.text
ENTRY (__mmap64)
#ifdef __NR_mmap2
+#ifdef __ARMEB__
+ ldr ip, [sp, $8] @ offset low part
+ str r5, [sp, #-4]!
+ ldr r5, [sp, $8] @ offset high part
+ str r4, [sp, #-4]!
+#else
ldr ip, [sp, $4] @ offset low part
str r5, [sp, #-4]!
ldr r5, [sp, $12] @ offset high part
str r4, [sp, #-4]!
+#endif
movs r4, ip, lsl $20 @ check that offset is page-aligned
mov ip, ip, lsr $12
moveqs r4, r5, lsr $12 @ check for overflow
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=849e84dde3da78ba1462106329a64baf7eb68e42
commit 849e84dde3da78ba1462106329a64baf7eb68e42
Author: Phil Blundell <pb@reciva.com>
Date: Fri Jun 10 11:33:52 2005 +0000
2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* sysdeps/arm/bits/link.h: New file.
* sysdeps/arm/dl-trampoline.S: New file.
* sysdeps/arm/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE.
(elf_machine_runtime_setup): Check dl_profile before calling
_dl_name_match_p.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Delete.
(elf_machine_rel, elf_machine_rela): Use RESOLVE_MAP.
(fix_bad_pc24): Use auto instead of static.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e36328b..360b06f 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,6 +1,18 @@
2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
+ * sysdeps/arm/bits/link.h: New file.
+ * sysdeps/arm/dl-trampoline.S: New file.
+ * sysdeps/arm/dl-machine.h: Check RESOLVE_MAP instead of RESOLVE.
+ (elf_machine_runtime_setup): Check dl_profile before calling
+ _dl_name_match_p.
+ (ELF_MACHINE_RUNTIME_TRAMPOLINE): Delete.
+ (elf_machine_rel, elf_machine_rela): Use RESOLVE_MAP.
+ (fix_bad_pc24): Use auto instead of static.
+
+2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
* sysdeps/unix/sysv/linux/arm/ioperm.c (BUS_ISA): Define for new
kernel headers.
diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h
index e69de29..8dbd2c7 100644
--- a/sysdeps/arm/bits/link.h
+++ b/sysdeps/arm/bits/link.h
@@ -0,0 +1,66 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+/* Registers for entry into PLT on ARM. */
+typedef struct La_arm_regs
+{
+ uint32_t lr_reg[4];
+ uint32_t lr_sp;
+ uint32_t lr_lr;
+ /* Coprocessor registers used for argument passing. The data
+ stored here depends on the coprocessors available in the
+ system which are used for function calls in the current ABI.
+ VFP uses eight 64-bit registers, and iWMMXt uses ten. */
+ uint32_t lr_coproc[42];
+} La_arm_regs;
+
+/* Return values for calls from PLT on ARM. */
+typedef struct La_arm_retval
+{
+ /* Up to four integer registers can be used for a return value in
+ some ABIs (APCS complex long double). */
+ uint32_t lrv_reg[4];
+
+ /* Any coprocessor registers which might be used to return values
+ in the current ABI. */
+ uint32_t lrv_coproc[12];
+} La_arm_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_arm_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_arm_regs *__inregs,
+ La_arm_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 0fe47b2..abff153 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -110,7 +110,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GLRO(dl_profile), l))
+ if (GLRO(dl_profile) != NULL
+ && _dl_name_match_p (GLRO(dl_profile), l))
/* Say that we really want profiling and the timers are
started. */
GL(dl_profile_map) = l;
@@ -129,119 +130,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define BX(x) "mov\tpc, " #x
#endif
-#ifndef PROF
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .type _dl_runtime_resolve, #function\n\
- .align 2\n\
-_dl_runtime_resolve:\n\
- @ we get called with\n\
- @ stack[0] contains the return address from this call\n\
- @ ip contains &GOT[n+3] (pointer to function)\n\
- @ lr points to &GOT[2]\n\
-\n\
- @ stack arguments\n\
- stmdb sp!,{r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call fixup routine\n\
- bl fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
-\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_profile, #function\n\
- .align 2\n\
-_dl_runtime_profile:\n\
- @ stack arguments\n\
- stmdb sp!, {r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call profiling fixup routine\n\
- bl profile_fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
- .previous\n\
-");
-#else // PROF
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_resolve, #function\n\
- .type _dl_runtime_profile, #function\n\
- .align 2\n\
-_dl_runtime_resolve:\n\
-_dl_runtime_profile:\n\
- @ we get called with\n\
- @ stack[0] contains the return address from this call\n\
- @ ip contains &GOT[n+3] (pointer to function)\n\
- @ lr points to &GOT[2]\n\
-\n\
- @ stack arguments\n\
- stmdb sp!, {r0-r3}\n\
-\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
- @ prepare to call fixup()\n\
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
- sub r1, ip, lr\n\
- sub r1, r1, #4\n\
- add r1, r1, r1\n\
-\n\
- @ call profiling fixup routine\n\
- bl fixup\n\
-\n\
- @ save the return\n\
- mov ip, r0\n\
-\n\
- @ get arguments and return address back\n\
- ldmia sp!, {r0-r3,lr}\n\
-\n\
- @ jump to the newly found address\n\
- " BX(ip) "\n\
-\n\
- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
- .previous\n\
-");
-#endif //PROF
-
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
@@ -355,10 +243,10 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
Prelinked libraries may use Elf32_Rela though. */
#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
-#ifdef RESOLVE
+#ifdef RESOLVE_MAP
/* Deal with an out-of-range PC24 reloc. */
-static Elf32_Addr
+auto Elf32_Addr
fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
{
static void *fix_page;
@@ -425,9 +313,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
#endif
{
const Elf32_Sym *const refsym = sym;
- Elf32_Addr value = RESOLVE (&sym, version, r_type);
- if (sym)
- value += sym->st_value;
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
switch (r_type)
{
@@ -535,9 +422,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
# ifndef RESOLVE_CONFLICT_FIND_MAP
const Elf32_Sym *const refsym = sym;
# endif
- Elf32_Addr value = RESOLVE (&sym, version, r_type);
- if (sym)
- value += sym->st_value;
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
switch (r_type)
{
@@ -637,4 +523,4 @@ elf_machine_lazy_rel (struct link_map *map,
_dl_reloc_bad_type (map, r_type, 1);
}
-#endif /* RESOLVE */
+#endif /* RESOLVE_MAP */
diff --git a/sysdeps/arm/dl-trampoline.S b/sysdeps/arm/dl-trampoline.S
new file mode 100644
index 0000000..dc7494f
--- /dev/null
+++ b/sysdeps/arm/dl-trampoline.S
@@ -0,0 +1,214 @@
+/* PLT trampolines. ARM version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <libc-symbols.h>
+
+#if defined(__USE_BX__)
+#define BX(x) bx x
+#else
+#define BX(x) mov pc, x
+#endif
+
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, #function
+ cfi_startproc
+ .align 2
+_dl_runtime_resolve:
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (lr, 0)
+
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ Save arguments. We save r4 to realign the stack.
+ stmdb sp!,{r0-r4}
+ cfi_adjust_cfa_offset (20)
+ cfi_rel_offset (r0, 0)
+ cfi_rel_offset (r1, 4)
+ cfi_rel_offset (r2, 8)
+ cfi_rel_offset (r3, 12)
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ @ prepare to call _dl_fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ call fixup routine
+ bl _dl_fixup
+
+ @ save the return
+ mov ip, r0
+
+ @ get arguments and return address back. We restore r4
+ @ only to realign the stack.
+ ldmia sp!, {r0-r4,lr}
+ cfi_adjust_cfa_offset (-24)
+
+ @ jump to the newly found address
+ BX(ip)
+
+ cfi_endproc
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
+
+ .globl _dl_runtime_profile
+ .type _dl_runtime_profile, #function
+ cfi_startproc
+ .align 2
+_dl_runtime_profile:
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (lr, 0)
+
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ Stack layout:
+ @ 212 - saved lr
+ @ 208 - framesize returned from pltenter
+ @ 16 - La_arm_regs
+ @ 8 - Saved two arguments to _dl_profile_fixup
+ @ 4 - Saved result of _dl_profile_fixup
+ @ 0 - outgoing argument to _dl_profile_fixup
+ @ For now, we only save the general purpose registers.
+
+ sub sp, sp, #196
+ cfi_adjust_cfa_offset (196)
+ stmia sp, {r0-r3}
+ cfi_rel_offset (r0, 0)
+ cfi_rel_offset (r1, 4)
+ cfi_rel_offset (r2, 8)
+ cfi_rel_offset (r3, 12)
+
+ sub sp, sp, #16
+ cfi_adjust_cfa_offset (16)
+
+ @ Save sp and lr.
+ add r0, sp, #216
+ str r0, [sp, #32]
+ ldr r2, [sp, #212]
+ str r2, [sp, #36]
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ @ prepare to call _dl_profile_fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ Save these two arguments for pltexit.
+ add r3, sp, #8
+ stmia r3!, {r0,r1}
+
+ @ Set up extra args for _dl_profile_fixup.
+ @ r2 and r3 are already loaded.
+ add ip, sp, #208
+ str ip, [sp, #0]
+
+ @ call profiling fixup routine
+ bl _dl_profile_fixup
+
+ @ The address to call is now in r0.
+
+ @ Check whether we're wrapping this function.
+ ldr ip, [sp, #208]
+ cmp ip, #0
+ bge 1f
+ cfi_remember_state
+
+ @ save the return
+ mov ip, r0
+
+ @ get arguments and return address back
+ add sp, sp, #16
+ cfi_adjust_cfa_offset (-16)
+ ldmia sp, {r0-r3,sp,lr}
+ cfi_adjust_cfa_offset (-200)
+
+ @ jump to the newly found address
+ BX(ip)
+
+ cfi_restore_state
+1:
+ @ The new frame size is in ip.
+
+ @ New stack layout:
+ @ 268 - saved r7
+ @ 264 - saved result of _dl_profile_fixup
+ @ 72 - La_arm_regs
+ @ 64 - Saved two arguments to _dl_profile_fixup
+ @ 0 - La_arm_retval
+ @ For now, we only save the general purpose registers.
+
+ @ Build the new frame.
+ str r7, [sp, #212]
+ cfi_rel_offset (r7, 212)
+ sub r7, sp, #56
+ cfi_def_cfa_register (r7)
+ cfi_adjust_cfa_offset (56)
+ sub sp, sp, ip
+ bic sp, sp, #7
+
+ @ Save the _dl_profile_fixup result around the call to memcpy.
+ str r0, [r7, #264]
+
+ @ Copy the stack arguments.
+ mov r0, sp
+ add r1, r7, #272
+ mov r2, ip
+ bl memcpy
+
+ @ Call the function.
+ add ip, r7, #72
+ ldmia ip, {r0-r3}
+ ldr ip, [r7, #264]
+ mov lr, pc
+ BX(ip)
+ stmia r7, {r0-r3}
+
+ @ Call pltexit.
+ add ip, r7, #64
+ ldmia ip, {r0,r1}
+ add r2, r7, #72
+ add r3, r7, #0
+ bl _dl_call_pltexit
+
+ @ Return to caller.
+ ldmia r7, {r0-r3}
+ mov sp, r7
+ cfi_def_cfa_register (sp)
+ ldr r7, [sp, #268]
+ ldr lr, [sp, #92]
+ add sp, sp, #272
+ cfi_adjust_cfa_offset (-272)
+ BX(lr)
+
+ cfi_endproc
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
+ .previous
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efaef362b3282935fd7f3b0e25152afbd2f82434
commit efaef362b3282935fd7f3b0e25152afbd2f82434
Author: Phil Blundell <pb@reciva.com>
Date: Fri Jun 10 11:12:09 2005 +0000
2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
Mark Mitchell <mark@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/ioperm.c (BUS_ISA): Define for new
kernel headers.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index e3e7fa1..e36328b 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2005-05-09 Daniel Jacobowitz <dan@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/ioperm.c (BUS_ISA): Define for new
+ kernel headers.
+
2005-06-09 Phil Blundell <pb@reciva.com>
* sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h,
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 558b485..65ec077 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -44,6 +44,7 @@
#include <sys/types.h>
#include <sys/mman.h>
+#include <linux/version.h>
#include <asm/page.h>
#include <sys/sysctl.h>
@@ -80,7 +81,7 @@ static struct platform {
* Initialize I/O system. There are several ways to get the information
* we need. Each is tried in turn until one succeeds.
*
- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
* but not all kernels support it.
*
* 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
@@ -95,6 +96,12 @@ static struct platform {
* values.
*/
+/* The Linux kernel headers renamed this constant between 2.5.26 and
+ 2.5.27. It was backported to 2.4 between 2.4.22 and 2.4.23. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,23)
+# define BUS_ISA CTL_BUS_ISA
+#endif
+
static int
init_iosys (void)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7051b72105cc17d7218ebd7868a31d3b9ab9da20
commit 7051b72105cc17d7218ebd7868a31d3b9ab9da20
Author: Phil Blundell <pb@reciva.com>
Date: Thu Jun 9 21:48:16 2005 +0000
2005-06-09 Phil Blundell <pb@reciva.com>
* sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h,
sysdeps/unix/sysv/linux/arm/sysdep.S: Correct paths to included
files.
diff --git a/ChangeLog.arm b/ChangeLog.arm
index ef324f7..e3e7fa1 100644
--- a/ChangeLog.arm
+++ b/ChangeLog.arm
@@ -1,3 +1,9 @@
+2005-06-09 Phil Blundell <pb@reciva.com>
+
+ * sysdeps/unix/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/sysdep.h,
+ sysdeps/unix/sysv/linux/arm/sysdep.S: Correct paths to included
+ files.
+
2005-05-23 Roland McGrath <roland@redhat.com>
* ChangeLog.arm: New file (this one).
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index 5f36272..d6eb713 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
-#include <sysdeps/arm/sysdep.h>
+#include <ports/sysdeps/arm/sysdep.h>
/* Some definitions to allow the assembler in sysdeps/unix/ to build
without needing ARM-specific versions of all the files. */
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index 1a4de2a..b2906f7 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,4 +31,4 @@ ENTRY (__syscall_error)
rsb r0, r0, $0
#define __syscall_error __syscall_error_1
-#include <sysdeps/unix/arm/sysdep.S>
+#include <ports/sysdeps/unix/arm/sysdep.S>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 668aa1a..f42a5c8 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -22,7 +22,7 @@
#define _LINUX_ARM_SYSDEP_H 1
/* There is some commonality. */
-#include <sysdeps/unix/arm/sysdep.h>
+#include <ports/sysdeps/unix/arm/sysdep.h>
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=685896ef5aeb2ff0c98954af91a7459313555a8c
commit 685896ef5aeb2ff0c98954af91a7459313555a8c
Author: Richard Henderson <rth@redhat.com>
Date: Sat May 28 23:40:09 2005 +0000
* elf/elf.h (DT_ALPHA_PLTRO, DT_ALPHA_NUM): New.
* sysdeps/alpha/dl-dtprocnum.h: New file.
* sysdeps/alpha/dl-machine.h (DT_ALPHA): New.
(elf_machine_load_address): Simplify to rely on gprel relocations.
(elf_machine_runtime_setup): Handle DT_ALPHA_PLTRO plt format.
Remove thread safety workaround for binutils 2.6.
(elf_machine_fixup_plt): Handle DT_ALPHA_PLTRO plt format.
* sysdeps/alpha/dl-trampoline.S (_dl_runtime_resolve_new): New.
(_dl_runtime_profile_new): New.
(_dl_runtime_resolve_old): Rename from _dl_runtime_resolve.
(_dl_runtime_profile_old): Rename from _dl_runtime_profile. Fix
typo in _dl_call_pltexit argument loading.
* sysdeps/alpha/div_libc.h (funcnoplt): New.
* sysdeps/alpha/divl.S, sysdeps/alpha/divq.S: Use it.
* sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S: Likewise.
* sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Likewise.
diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h
index 62b4470..b731b02 100644
--- a/sysdeps/alpha/div_libc.h
+++ b/sysdeps/alpha/div_libc.h
@@ -34,6 +34,12 @@
#define RV t12
#define RA t9
+/* The secureplt format does not allow the division routines to be called
+ via plt; there aren't enough registers free to be clobbered. Avoid
+ setting the symbol type to STT_FUNC, so that the linker won't be tempted
+ to create a plt entry. */
+#define funcnoplt notype
+
/* None of these functions should use implicit anything. */
.set nomacro
.set noat
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 408d66d..9bac045 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -36,7 +36,7 @@
.text
.align 4
.globl __divl
- .type __divl, @function
+ .type __divl, @funcnoplt
.usepv __divl, no
cfi_startproc
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 7f245ac..d2ed2c5 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -43,7 +43,7 @@
.text
.align 4
.globl __divq
- .type __divq, @function
+ .type __divq, @funcnoplt
.usepv __divq, no
cfi_startproc
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index fc00fa1..f2a8a4d 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -43,7 +43,7 @@
.text
.align 4
.globl __divqu
- .type __divqu, @function
+ .type __divqu, @funcnoplt
.usepv __divqu, no
cfi_startproc
diff --git a/sysdeps/alpha/dl-dtprocnum.h b/sysdeps/alpha/dl-dtprocnum.h
new file mode 100644
index 0000000..67845cd
--- /dev/null
+++ b/sysdeps/alpha/dl-dtprocnum.h
@@ -0,0 +1,3 @@
+/* Number of extra dynamic section entries for this architecture. By
+ default there are none. */
+#define DT_THISPROCNUM DT_ALPHA_NUM
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 173a411..88c357e 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -33,6 +33,9 @@
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0x120000000UL
+/* Translate a processor specific dynamic tag to the index in l_info array. */
+#define DT_ALPHA(x) (DT_ALPHA_##x - DT_LOPROC + DT_NUM)
+
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
elf_machine_matches_host (const Elf64_Ehdr *ehdr)
@@ -55,105 +58,74 @@ elf_machine_dynamic (void)
}
/* Return the run-time load address of the shared object. */
+
static inline Elf64_Addr
elf_machine_load_address (void)
{
- /* NOTE: While it is generally unfriendly to put data in the text
- segment, it is only slightly less so when the "data" is an
- instruction. While we don't have to worry about GLD just yet, an
- optimizing linker might decide that our "data" is an unreachable
- instruction and throw it away -- with the right switches, DEC's
- linker will do this. What ought to happen is we should add
- something to GAS to allow us access to the new GPREL_HI32/LO32
- relocation types stolen from OSF/1 3.0. */
- /* This code relies on the fact that BRADDR relocations do not
- appear in dynamic relocation tables. Not that that would be very
- useful anyway -- br/bsr has a 4MB range and the shared libraries
- are usually many many terabytes away. */
-
- Elf64_Addr dot;
- long int zero_disp;
-
- asm("br %0, 1f\n"
- "0:\n\t"
- "br $0, 2f\n"
- "1:\n\t"
- ".section\t.data\n"
- "2:\n\t"
- ".quad 0b\n\t"
- ".previous"
- : "=r"(dot));
-
- zero_disp = *(int *) dot;
- zero_disp = (zero_disp << 43) >> 41;
-
- return dot - *(Elf64_Addr *) (dot + 4 + zero_disp);
+ /* This relies on the compiler using gp-relative addresses for static symbols. */
+ static void *dot = ˙
+ return (void *)&dot - dot;
}
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
{
- Elf64_Addr plt;
- extern void _dl_runtime_resolve (void);
- extern void _dl_runtime_profile (void);
+ extern char _dl_runtime_resolve_new[] attribute_hidden;
+ extern char _dl_runtime_profile_new[] attribute_hidden;
+ extern char _dl_runtime_resolve_old[] attribute_hidden;
+ extern char _dl_runtime_profile_old[] attribute_hidden;
+
+ struct pltgot {
+ char *resolve;
+ struct link_map *link;
+ };
+
+ struct pltgot *pg;
+ long secureplt;
+ char *resolve;
+
+ if (map->l_info[DT_JMPREL] == 0 || !lazy)
+ return lazy;
+
+ /* Check to see if we're using the read-only plt form. */
+ secureplt = map->l_info[DT_ALPHA(PLTRO)] != 0;
+
+ /* If the binary uses the read-only secure plt format, PG points to
+ the .got.plt section, which is the right place for ld.so to place
+ its hooks. Otherwise, PG is currently pointing at the start of
+ the plt; the hooks go at offset 16. */
+ pg = (struct pltgot *) D_PTR (map, l_info[DT_PLTGOT]);
+ pg += !secureplt;
+
+ /* This function will be called to perform the relocation. They're
+ not declared as functions to convince the compiler to use gp
+ relative relocations for them. */
+ if (secureplt)
+ resolve = _dl_runtime_resolve_new;
+ else
+ resolve = _dl_runtime_resolve_old;
- if (l->l_info[DT_JMPREL] && lazy)
+ if (__builtin_expect (profile, 0))
{
- /* The GOT entries for the functions in the PLT have not been
- filled in yet. Their initial contents are directed to the
- PLT which arranges for the dynamic linker to be called. */
- plt = D_PTR (l, l_info[DT_PLTGOT]);
-
- /* This function will be called to perform the relocation. */
- if (__builtin_expect (profile, 0))
- {
- *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
-
- if (GLRO(dl_profile) != NULL
- && _dl_name_match_p (GLRO(dl_profile), l))
- {
- /* This is the object we are looking for. Say that we really
- want profiling and the timers are started. */
- GL(dl_profile_map) = l;
- }
- }
+ if (secureplt)
+ resolve = _dl_runtime_profile_new;
else
- *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
-
- /* Identify this shared object */
- *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
+ resolve = _dl_runtime_profile_old;
- /* If the first instruction of the plt entry is not
- "br $28, plt0", we have to reinitialize .plt for lazy relocation. */
- if (*(unsigned int *)(plt + 32) != 0xc39ffff7)
+ if (GLRO(dl_profile) && _dl_name_match_p (GLRO(dl_profile), map))
{
- unsigned int val = 0xc39ffff7;
- unsigned int *slot, *end;
- const Elf64_Rela *rela = (const Elf64_Rela *)
- D_PTR (l, l_info[DT_JMPREL]);
- Elf64_Addr l_addr = l->l_addr;
-
- /* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */
- *(unsigned long *)plt = 0xa77b000cc3600000;
- *(unsigned long *)(plt + 8) = 0x6b7b000047ff041f;
- slot = (unsigned int *)(plt + 32);
- end = (unsigned int *)(plt + 32
- + l->l_info[DT_PLTRELSZ]->d_un.d_val / 2);
- while (slot < end)
- {
- /* br at,.plt+0 */
- *slot = val;
- *(Elf64_Addr *) rela->r_offset = (Elf64_Addr) slot - l_addr;
- val -= 3;
- slot += 3;
- ++rela;
- }
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ GL(dl_profile_map) = map;
}
}
+ pg->resolve = resolve;
+ pg->link = map;
+
return lazy;
}
@@ -280,7 +252,7 @@ $fixup_stack: \n\
/* Fix up the instructions of a PLT entry to invoke the function
rather than the dynamic linker. */
static inline Elf64_Addr
-elf_machine_fixup_plt (struct link_map *l, lookup_t t,
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
const Elf64_Rela *reloc,
Elf64_Addr *got_addr, Elf64_Addr value)
{
@@ -291,10 +263,16 @@ elf_machine_fixup_plt (struct link_map *l, lookup_t t,
/* Store the value we are going to load. */
*got_addr = value;
+ /* If this binary uses the read-only secure plt format, we're done. */
+ if (map->l_info[DT_ALPHA(PLTRO)])
+ return value;
+
+ /* Otherwise we have to modify the plt entry in place to do the branch. */
+
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
- rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]);
- plte = (void *) (D_PTR (l, l_info[DT_PLTGOT]) + 32);
+ rela_plt = (const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL]);
+ plte = (Elf64_Word *) (D_PTR (map, l_info[DT_PLTGOT]) + 32);
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
diff --git a/sysdeps/alpha/dl-trampoline.S b/sysdeps/alpha/dl-trampoline.S
index 4235083..c52efbb 100644
--- a/sysdeps/alpha/dl-trampoline.S
+++ b/sysdeps/alpha/dl-trampoline.S
@@ -21,13 +21,202 @@
.set noat
- .globl _dl_runtime_resolve
- .ent _dl_runtime_resolve
+.macro savei regno, offset
+ stq $\regno, \offset($30)
+ cfi_rel_offset(\regno, \offset)
+.endm
+
+.macro savef regno, offset
+ stt $f\regno, \offset($30)
+ cfi_rel_offset(\regno+32, \offset)
+.endm
+
+ .align 4
+ .globl _dl_runtime_resolve_new
+ .ent _dl_runtime_resolve_new
+
+#undef FRAMESIZE
+#define FRAMESIZE 14*8
+
+_dl_runtime_resolve_new:
+ .frame $30, FRAMESIZE, $26, 0
+ .mask 0x4000000, 0
+
+ ldah $29, 0($27) !gpdisp!1
+ lda $30, -FRAMESIZE($30)
+ stq $26, 0*8($30)
+ stq $16, 2*8($30)
+
+ stq $17, 3*8($30)
+ lda $29, 0($29) !gpdisp!1
+ stq $18, 4*8($30)
+ mov $28, $16 /* link_map from .got.plt */
+
+ stq $19, 5*8($30)
+ mov $25, $17 /* offset of reloc entry */
+ stq $20, 6*8($30)
+ mov $26, $18 /* return address */
+
+ stq $21, 7*8($30)
+ stt $f16, 8*8($30)
+ stt $f17, 9*8($30)
+ stt $f18, 10*8($30)
+
+ stt $f19, 11*8($30)
+ stt $f20, 12*8($30)
+ stt $f21, 13*8($30)
+ .prologue 2
+
+ bsr $26, _dl_fixup !samegp
+ mov $0, $27
+
+ ldq $26, 0*8($30)
+ ldq $16, 2*8($30)
+ ldq $17, 3*8($30)
+ ldq $18, 4*8($30)
+ ldq $19, 5*8($30)
+ ldq $20, 6*8($30)
+ ldq $21, 7*8($30)
+ ldt $f16, 8*8($30)
+ ldt $f17, 9*8($30)
+ ldt $f18, 10*8($30)
+ ldt $f19, 11*8($30)
+ ldt $f20, 12*8($30)
+ ldt $f21, 13*8($30)
+ lda $30, FRAMESIZE($30)
+ jmp $31, ($27), 0
+ .end _dl_runtime_resolve_new
+
+ .globl _dl_runtime_profile_new
+ .type _dl_runtime_profile_new, @function
+
+#undef FRAMESIZE
+#define FRAMESIZE 20*8
+
+ /* We save the registers in a different order than desired by
+ .mask/.fmask, so we have to use explicit cfi directives. */
+ cfi_startproc
+
+_dl_runtime_profile_new:
+ ldah $29, 0($27) !gpdisp!2
+ lda $30, -FRAMESIZE($30)
+ savei 26, 0*8
+ stq $16, 2*8($30)
+
+ stq $17, 3*8($30)
+ lda $29, 0($29) !gpdisp!2
+ stq $18, 4*8($30)
+ lda $1, FRAMESIZE($30) /* incoming sp value */
+
+ stq $1, 1*8($30)
+ stq $19, 5*8($30)
+ stq $20, 6*8($30)
+ mov $28, $16 /* link_map from .got.plt */
+
+ stq $21, 7*8($30)
+ mov $25, $17 /* offset of reloc entry */
+ stt $f16, 8*8($30)
+ mov $26, $18 /* return address */
+
+ stt $f17, 9*8($30)
+ mov $30, $19 /* La_alpha_regs address */
+ stt $f18, 10*8($30)
+ lda $20, 14*8($30) /* framesize address */
+
+ stt $f19, 11*8($30)
+ stt $f20, 12*8($30)
+ stt $f21, 13*8($30)
+ stq $28, 16*8($30)
+ stq $25, 17*8($30)
+
+ bsr $26, _dl_profile_fixup !samegp
+ mov $0, $27
+
+ /* Discover if we're wrapping this call. */
+ ldq $18, 14*8($30)
+ bge $18, 1f
+
+ ldq $26, 0*8($30)
+ ldq $16, 2*8($30)
+ ldq $17, 3*8($30)
+ ldq $18, 4*8($30)
+ ldq $19, 5*8($30)
+ ldq $20, 6*8($30)
+ ldq $21, 7*8($30)
+ ldt $f16, 8*8($30)
+ ldt $f17, 9*8($30)
+ ldt $f18, 10*8($30)
+ ldt $f19, 11*8($30)
+ ldt $f20, 12*8($30)
+ ldt $f21, 13*8($30)
+ lda $30, FRAMESIZE($30)
+ jmp $31, ($27), 0
+
+1:
+ /* Create a frame pointer and allocate a new argument frame. */
+ savei 15, 15*8
+ mov $30, $15
+ cfi_def_cfa_register (15)
+ addq $18, 15, $18
+ bic $18, 15, $18
+ subq $30, $18, $30
+
+ /* Save the call destination around memcpy. */
+ stq $0, 14*8($30)
+
+ /* Copy the stack arguments into place. */
+ lda $16, 0($30)
+ lda $17, FRAMESIZE($15)
+ jsr $26, memcpy
+ ldgp $29, 0($26)
+
+ /* Reload the argument registers. */
+ ldq $27, 14*8($30)
+ ldq $16, 2*8($15)
+ ldq $17, 3*8($15)
+ ldq $18, 4*8($15)
+ ldq $19, 5*8($15)
+ ldq $20, 6*8($15)
+ ldq $21, 7*8($15)
+ ldt $f16, 8*8($15)
+ ldt $f17, 9*8($15)
+ ldt $f18, 10*8($15)
+ ldt $f19, 11*8($15)
+ ldt $f20, 12*8($15)
+ ldt $f21, 13*8($15)
+
+ jsr $26, ($27), 0
+ ldgp $29, 0($26)
+
+ /* Set up for call to _dl_call_pltexit. */
+ ldq $16, 16*8($15)
+ ldq $17, 17*8($15)
+ stq $0, 16*8($15)
+ lda $18, 0($15)
+ stq $1, 17*8($15)
+ lda $19, 16*8($15)
+ stt $f0, 18*8($15)
+ stt $f1, 19*8($15)
+ bsr $26, _dl_call_pltexit !samegp
+
+ mov $15, $30
+ cfi_def_cfa_register (30)
+ ldq $26, 0($30)
+ ldq $15, 15*8($30)
+ lda $30, FRAMESIZE($30)
+ ret
+
+ cfi_endproc
+ .size _dl_runtime_profile_new, .-_dl_runtime_profile_new
+
+ .align 4
+ .globl _dl_runtime_resolve_old
+ .ent _dl_runtime_resolve_old
#undef FRAMESIZE
#define FRAMESIZE 44*8
-_dl_runtime_resolve:
+_dl_runtime_resolve_old:
lda $30, -FRAMESIZE($30)
.frame $30, FRAMESIZE, $26
/* Preserve all registers that C normally doesn't. */
@@ -146,30 +335,21 @@ _dl_runtime_resolve:
lda $30, FRAMESIZE($30)
jmp $31, ($27)
- .end _dl_runtime_resolve
+ .end _dl_runtime_resolve_old
- .globl _dl_runtime_profile
- .usepv _dl_runtime_profile, no
- .type _dl_runtime_profile, @function
+ .globl _dl_runtime_profile_old
+ .usepv _dl_runtime_profile_old, no
+ .type _dl_runtime_profile_old, @function
/* We save the registers in a different order than desired by
.mask/.fmask, so we have to use explicit cfi directives. */
cfi_startproc
-.macro savei regno, offset
- stq $\regno, \offset($30)
- cfi_rel_offset(\regno, \offset)
-.endm
-
-.macro savef regno, offset
- stt $f\regno, \offset($30)
- cfi_rel_offset(\regno+32, \offset)
-.endm
-
#undef FRAMESIZE
#define FRAMESIZE 50*8
-_dl_runtime_profile:
+ .align 4
+_dl_runtime_profile_old:
lda $30, -FRAMESIZE($30)
cfi_adjust_cfa_offset (FRAMESIZE)
@@ -340,8 +520,8 @@ _dl_runtime_profile:
ldgp $29, 0($26)
/* Set up for call to _dl_call_pltexit. */
- ldq $16, 48($15)
- ldq $17, 49($15)
+ ldq $16, 48*8($15)
+ ldq $17, 49*8($15)
stq $0, 46*8($15)
lda $18, 0($15)
stq $1, 47*8($15)
@@ -358,4 +538,4 @@ _dl_runtime_profile:
ret
cfi_endproc
- .size _dl_runtime_profile, .-_dl_runtime_profile
+ .size _dl_runtime_profile_old, .-_dl_runtime_profile_old
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index bfc3be5..ae291b0 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -38,7 +38,7 @@
.text
.align 4
.globl __reml
- .type __reml, @function
+ .type __reml, @funcnoplt
.usepv __reml, no
cfi_startproc
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index 645a834..64e958b 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -43,7 +43,7 @@
.text
.align 4
.globl __remq
- .type __remq, @function
+ .type __remq, @funcnoplt
.usepv __remq, no
cfi_startproc
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index bfa78df..dcc1c88 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -43,7 +43,7 @@
.text
.align 4
.globl __remqu
- .type __remqu, @function
+ .type __remqu, @funcnoplt
.usepv __remqu, no
cfi_startproc
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3597225d0f7195df628c7dc2e97aaf9f008e4bf8
commit 3597225d0f7195df628c7dc2e97aaf9f008e4bf8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 26 18:49:14 2005 +0000
(O_DIRECT): Fix value.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index ce4a5da..c4a9b77 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1999, 2000, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,9 +44,9 @@
#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
# define O_DIRECTORY 0100000 /* Must be a directory. */
# define O_NOFOLLOW 0200000 /* Do not follow links. */
+# define O_DIRECT 02000000 /* Direct disk access. */
# define O_NOATIME 04000000 /* Do not set atime. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8796ce2127c66be370c387194d2acf87245a8794
commit 8796ce2127c66be370c387194d2acf87245a8794
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 26 14:30:48 2005 +0000
Add space inf weak_alias use.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 3c2bc59..ebe14b4 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -77,7 +77,7 @@ _start:
.end _start
/* For ECOFF backwards compatibility. */
-weak_alias(_start, __start)
+weak_alias (_start, __start)
/* Define a symbol for the first piece of initialized data. */
.data
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index eb4fbd2..ef2a575 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -41,4 +41,4 @@ ENTRY(htonl)
END(htonl)
-weak_alias(htonl, ntohl)
+weak_alias (htonl, ntohl)
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index f1ef754..7c62702 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -37,4 +37,4 @@ ENTRY(htons)
END(htons)
-weak_alias(htons, ntohs)
+weak_alias (htons, ntohs)
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 1c450d1..5e0b21e 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -146,4 +146,4 @@ thread_start:
.end thread_start
-weak_alias(__clone, clone)
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S
index 3566890..bf9820a 100644
--- a/sysdeps/unix/sysv/linux/alpha/getcontext.S
+++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S
@@ -41,7 +41,7 @@ ENTRY (__getcontext)
ret
END(__getcontext)
-weak_alias(__getcontext, getcontext)
+weak_alias (__getcontext, getcontext)
/* An internal routine used by getcontext and setcontext.
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 2c34e98..46797aa 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -145,5 +145,5 @@ strong_alias(__getrusage_tv64, ____getrusage_tv64)
default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1)
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
#else
-weak_alias(__getrusage, getrusage)
+weak_alias (__getrusage, getrusage)
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S
index 7d443d4..27abfd0 100644
--- a/sysdeps/unix/sysv/linux/alpha/setcontext.S
+++ b/sysdeps/unix/sysv/linux/alpha/setcontext.S
@@ -32,4 +32,4 @@
PSEUDO(__setcontext, sigreturn, 1)
ret
PSEUDO_END(__setcontext)
-weak_alias(__setcontext, setcontext)
+weak_alias (__setcontext, setcontext)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index e5de55f..48c3f27 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -29,5 +29,5 @@ PSEUDO(__sigsuspend, sigsuspend, 1)
ret
PSEUDO_END(__sigsuspend)
libc_hidden_def (__sigsuspend)
-weak_alias(__sigsuspend, sigsuspend)
+weak_alias (__sigsuspend, sigsuspend)
strong_alias (__sigsuspend, __libc_sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S
index 5f6615e..1221f67 100644
--- a/sysdeps/unix/sysv/linux/alpha/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S
@@ -48,4 +48,4 @@ ENTRY(__swapcontext)
#endif
END(__swapcontext)
-weak_alias(__swapcontext, swapcontext)
+weak_alias (__swapcontext, swapcontext)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 10a32d5..0c40813 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -74,4 +74,4 @@ $error:
END(__syscall)
-weak_alias(__syscall, syscall)
+weak_alias (__syscall, syscall)
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 4f3bb9e..f497bca 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -96,4 +96,4 @@ thread_start:
PSEUDO_END(__clone)
-weak_alias(__clone, clone)
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 8b8e007..f521df1 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -163,4 +163,4 @@ L(gotpid):
END(__thread_start)
-weak_alias(__clone, clone)
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
index 1383ddc..38b6195 100644
--- a/sysdeps/unix/sysv/linux/mips/vfork.S
+++ b/sysdeps/unix/sysv/linux/mips/vfork.S
@@ -95,4 +95,4 @@ L(error):
END(__vfork)
libc_hidden_def(__vfork)
-weak_alias(__vfork, vfork)
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a980ecbe317ca6cda18d6db3162f356add93aa2
commit 3a980ecbe317ca6cda18d6db3162f356add93aa2
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 24 06:13:06 2005 +0000
.
diff --git a/ChangeLog b/ChangeLog
index 071fc8d..6ddb225 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-22 Roland McGrath <roland@redhat.com>
+
+ * Makefile ($(distname).tar): Fail if sysdeps/.../configure files are
+ not all up to date. Touch configure files after cvs export.
+ (glibc-port-%-$(dist-version).tar): Likewise.
+
2004-10-22 Roland McGrath <roland@frob.com>
* Makefile (dist, dist-ports): New target.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc490942606ac2394160ab6f12cac100038c8929
commit fc490942606ac2394160ab6f12cac100038c8929
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 24 06:13:03 2005 +0000
2005-03-22 Roland McGrath <roland@redhat.com>
* Makefile ($(distname).tar): Fail if sysdeps/.../configure files are
not all up to date. Touch configure files after cvs export.
(glibc-port-%-$(dist-version).tar): Likewise.
diff --git a/Makefile b/Makefile
index a65257b..d1cbbef 100644
--- a/Makefile
+++ b/Makefile
@@ -22,10 +22,14 @@ dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z)
md5sum $^
$(distname).tar:
@rm -fr $(basename $@)
+ $(MAKE) -q `find sysdeps -name configure`
$(do-export) ports
+ find $(basename $@) -name configure -print | xargs touch
tar cf $@ $(basename $@)
rm -fr $(basename $@)
+sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$*
+
.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
md5sum $^
@@ -33,9 +37,10 @@ glibc-port-%-$(dist-version).tar: configure ChangeLog
@rm -fr $(basename $@)
$(do-export) -l ports
rm -f $(basename $@)/ChangeLog.[a-z]*
- $(do-export) ports/ChangeLog.$* \
- ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$*
+ $(MAKE) -q `find $(sysdeps-of-stem) -name configure`
+ $(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem))
mv $(basename $@)/ports/* $(basename $@)/
rmdir $(basename $@)/ports
+ find $(basename $@) -name configure -print | xargs touch
tar cf $@ $(basename $@)
rm -fr $(basename $@)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39f0b3ca13d547a896666a85d5aed63e601c98ec
commit 39f0b3ca13d547a896666a85d5aed63e601c98ec
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 24 06:12:39 2005 +0000
* ChangeLog.arm: New file (this one).
* sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm:
Subdirectories moved here from main repository.
* sysdeps/arm/preconfigure: New file.
* sysdeps/arm/shlib-versions: New file.
diff --git a/ChangeLog.arm b/ChangeLog.arm
new file mode 100644
index 0000000..ef324f7
--- /dev/null
+++ b/ChangeLog.arm
@@ -0,0 +1,13 @@
+2005-05-23 Roland McGrath <roland@redhat.com>
+
+ * ChangeLog.arm: New file (this one).
+ * sysdeps/arm, sysdeps/unix/arm, sysdeps/unix/sysv/linux/arm:
+ Subdirectories moved here from main repository.
+ * sysdeps/arm/preconfigure: New file.
+ * sysdeps/arm/shlib-versions: New file.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+End:
diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
new file mode 100644
index 0000000..e63848d
--- /dev/null
+++ b/sysdeps/arm/preconfigure
@@ -0,0 +1,4 @@
+case "$machine" in
+arm*) base_machine=arm machine=arm/arm32/$machine ;;
+thumb*) base_machine=thumb machine=arm/thumb/$machine ;;
+esac
diff --git a/sysdeps/arm/shlib-versions b/sysdeps/arm/shlib-versions
new file mode 100644
index 0000000..d603d6e
--- /dev/null
+++ b/sysdeps/arm/shlib-versions
@@ -0,0 +1 @@
+arm.*-.*-linux.* ld=ld-linux.so.2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef0ae0f57ec3b3f219fcb143a20398c5a9444c7a
commit ef0ae0f57ec3b3f219fcb143a20398c5a9444c7a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 28 22:28:50 2005 +0000
2005-04-28 Roland McGrath <roland@redhat.com>
* sysdeps/generic/dl-sysdep.h: Remove multiple inclusion protection.
* sysdeps/alpha/dl-sysdep.h: Likewise.
Use #include_next instead of duplicating generic file's contents.
* sysdeps/ia64/dl-sysdep.h: Likewise.
* sysdeps/sparc/dl-sysdep.h: Likewise.
diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h
index 0b4c805..cd678f4 100644
--- a/sysdeps/alpha/dl-sysdep.h
+++ b/sysdeps/alpha/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. Alpha version.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,25 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _DL_SYSDEP_H
-#define _DL_SYSDEP_H 1
-
-/* This macro must be defined to either 0 or 1.
-
- If 1, then an errno global variable hidden in ld.so will work right with
- all the errno-using libc code compiled for ld.so, and there is never a
- need to share the errno location with libc. This is appropriate only if
- all the libc functions that ld.so uses are called without PLT and always
- get the versions linked into ld.so rather than the libc ones. */
-
-#ifdef IS_IN_rtld
-# define RTLD_PRIVATE_ERRNO 1
-#else
-# define RTLD_PRIVATE_ERRNO 0
-#endif
+#include_next <dl-sysdep.h>
/* _dl_argv cannot be attribute_relro, because _dl_start_user
might write into it after _dl_start returns. */
#define DL_ARGV_NOT_RELRO 1
-
-#endif /* dl-sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60bb0e618881a3d15acfdc43eca88def72479d9e
commit 60bb0e618881a3d15acfdc43eca88def72479d9e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Mar 29 19:56:26 2005 +0000
MIPS NPTL specific pthreadtypes.h
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
new file mode 100644
index 0000000..e14a487
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -0,0 +1,193 @@
+/* Machine-specific pthread type layouts. MIPS version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H 1
+
+#if _MIPS_SIM == _ABI64
+# define __SIZEOF_PTHREAD_ATTR_T 56
+# define __SIZEOF_PTHREAD_MUTEX_T 40
+# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+# define __SIZEOF_PTHREAD_COND_T 48
+# define __SIZEOF_PTHREAD_CONDATTR_T 4
+# define __SIZEOF_PTHREAD_RWLOCK_T 56
+# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+# define __SIZEOF_PTHREAD_BARRIER_T 32
+# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+#else
+# define __SIZEOF_PTHREAD_ATTR_T 36
+# define __SIZEOF_PTHREAD_MUTEX_T 24
+# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+# define __SIZEOF_PTHREAD_COND_T 48
+# define __SIZEOF_PTHREAD_CONDATTR_T 4
+# define __SIZEOF_PTHREAD_RWLOCK_T 32
+# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+# define __SIZEOF_PTHREAD_BARRIER_T 20
+# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+#endif
+
+
+/* Thread identifiers. The structure of the attribute type is
+ deliberately not exposed. */
+typedef unsigned long int pthread_t;
+
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_ATTR_T];
+ long int __align;
+} pthread_attr_t;
+
+
+/* Data structures for mutex handling. The structure of the attribute
+ type is deliberately not exposed. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+#if _MIPS_SIM == _ABI64
+ unsigned int __nusers;
+#endif
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility. */
+ int __kind;
+#if _MIPS_SIM != _ABI64
+ unsigned int __nusers;
+#endif
+ int __spins;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_MUTEX_T];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+ int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling. The structure of
+ the attribute type is deliberately not exposed. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __futex;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
+ void *__mutex;
+ unsigned int __nwaiters;
+ unsigned int __broadcast_seq;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_COND_T];
+ __extension__ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+ int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+/* Data structure for read-write lock variable handling. The
+ structure of the attribute type is deliberately not exposed. */
+typedef union
+{
+# if _MIPS_SIM == _ABI64
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ int __writer;
+ int __pad1;
+ unsigned long int __pad2;
+ unsigned long int __pad3;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned int __flags;
+ } __data;
+# else
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned int __flags;
+ int __writer;
+ } __data;
+# endif
+ char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+ long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type. */
+typedef volatile int pthread_spinlock_t;
+
+
+/* POSIX barriers data type. The structure of the type is
+ deliberately not exposed. */
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIER_T];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+ int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#endif /* bits/pthreadtypes.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=511642252944a8eb40eaa3e303f33e9c5e5b5128
commit 511642252944a8eb40eaa3e303f33e9c5e5b5128
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 28 20:42:43 2005 +0000
2005-03-28 Roland McGrath <roland@redhat.com>
* sysdeps/generic/w_exp2.c [NO_LONG_DOUBLE]: Fix typos in alias names.
Reported by Mark Mitchell <mark@codesourcery.com>.
* Versions.def (libm): Define GLIBC_2.4 set.
* math/Versions (libm: GLIBC_2.4): Add this set, with exp2l.
* sysdeps/i386/Versions (libm: GLIBC_2.1): Add this set, with exp2l.
* sysdeps/ia64/Versions: Likewise.
* sysdeps/m68k/Versions: Likewise.
* sysdeps/sparc/sparc64/Versions: Likewise.
* sysdeps/x86_64/Versions: New file.
* sysdeps/mips/mips64/Versions: New file.
diff --git a/sysdeps/m68k/Versions b/sysdeps/m68k/Versions
index 2b020f8..f450291 100644
--- a/sysdeps/m68k/Versions
+++ b/sysdeps/m68k/Versions
@@ -4,3 +4,10 @@ libc {
__divdi3; __moddi3; __udivdi3; __umoddi3;
}
}
+libm {
+ GLIBC_2.1 {
+ # A generic bug got this omitted from other configurations' version
+ # sets, but we always had it.
+ exp2l;
+ }
+}
diff --git a/sysdeps/mips/mips64/Versions b/sysdeps/mips/mips64/Versions
new file mode 100644
index 0000000..253a65f
--- /dev/null
+++ b/sysdeps/mips/mips64/Versions
@@ -0,0 +1,7 @@
+libm {
+ GLIBC_2.1 {
+ # A generic bug got this omitted from other configurations' version
+ # sets, but we always had it.
+ exp2l;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9eb4f57796c7031bb4398e7321a7f2f56dc7b79
commit e9eb4f57796c7031bb4398e7321a7f2f56dc7b79
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:32:27 2005 +0000
Protect against multiple inclusion.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index ec0aaa0..2b42b22 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004
+ Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SETJMP_H
+#ifndef _MIPS_BITS_SETJMP_H
+#define _MIPS_BITS_SETJMP_H 1
+
+#if !defined(_SETJMP_H) && !defined(_PTHREAD_H)
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -79,3 +82,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (jmpbuf)[0].__sp)
+
+#endif /* _MIPS_BITS_SETJMP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=305fae3b1977fcffb72b9b2a18c9830bb36dabfd
commit 305fae3b1977fcffb72b9b2a18c9830bb36dabfd
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:32:04 2005 +0000
(elf_machine_rel): Add TLS relocations.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index a8a41ff..aa2cef8 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -34,6 +35,7 @@
#include <sgidefs.h>
#include <sys/asm.h>
+#include <dl-tls.h>
/* The offset of gp from GOT might be system-dependent. It's set by
ld. The same value is also */
@@ -322,6 +324,47 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
switch (r_type)
{
+#if defined (USE_TLS) && !defined (RTLD_BOOTSTRAP)
+# if _MIPS_SIM == _ABI64
+ case R_MIPS_TLS_DTPMOD64:
+ case R_MIPS_TLS_DTPREL64:
+ case R_MIPS_TLS_TPREL64:
+# else
+ case R_MIPS_TLS_DTPMOD32:
+ case R_MIPS_TLS_DTPREL32:
+ case R_MIPS_TLS_TPREL32:
+# endif
+ {
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+
+ if (sym)
+ value += sym->st_value;
+
+ switch (r_type)
+ {
+ case R_MIPS_TLS_DTPMOD64:
+ case R_MIPS_TLS_DTPMOD32:
+ if (sym_map)
+ *(ElfW(Word) *)reloc_addr = sym_map->l_tls_modid;
+ break;
+
+ case R_MIPS_TLS_DTPREL64:
+ case R_MIPS_TLS_DTPREL32:
+ *(ElfW(Word) *)reloc_addr += TLS_DTPREL_VALUE (sym);
+ break;
+
+ case R_MIPS_TLS_TPREL32:
+ case R_MIPS_TLS_TPREL64:
+ CHECK_STATIC_TLS (map, sym_map);
+ *(ElfW(Word) *)reloc_addr += TLS_TPREL_VALUE (sym_map, sym);
+ break;
+ }
+
+ break;
+ }
+#endif
+
#if _MIPS_SIM == _ABI64
case (R_MIPS_64 << 8) | R_MIPS_REL32:
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2568b67466f185769889a9581a09911d6b619d71
commit 2568b67466f185769889a9581a09911d6b619d71
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:21:52 2005 +0000
MIPS NPTL support
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h
new file mode 100644
index 0000000..c4440f9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/semaphore.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+#if _MIPS_SIM == _ABI64
+# define __SIZEOF_SEM_T 32
+#else
+# define __SIZEOF_SEM_T 16
+#endif
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX (2147483647)
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t;
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/clone.S b/sysdeps/unix/sysv/linux/mips/nptl/clone.S
new file mode 100644
index 0000000..80c265b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/clone.S
@@ -0,0 +1,2 @@
+#define RESET_PID
+#include <sysdeps/unix/sysv/linux/mips/clone.S>
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/createthread.c b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c
new file mode 100644
index 0000000..5b2234f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/createthread.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Value passed to 'clone' for initialization of the thread register. */
+#define TLS_VALUE ((void *) (pd) \
+ + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
+/* Get the real implementation. */
+#include <nptl/sysdeps/pthread/createthread.c>
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/fork.c b/sysdeps/unix/sysv/linux/mips/nptl/fork.c
new file mode 100644
index 0000000..06b7e1c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/fork.c
@@ -0,0 +1 @@
+#include "../i386/fork.c"
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
new file mode 100644
index 0000000..7edb287
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -0,0 +1,216 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LOWLEVELLOCK_H
+#define _LOWLEVELLOCK_H 1
+
+#include <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <atomic.h>
+#include <sysdep.h>
+
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+
+/* Initializer for compatibility lock. */
+#define LLL_MUTEX_LOCK_INITIALIZER (0)
+
+#define lll_futex_wait(futexp, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+#define lll_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+#define lll_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE, (nr), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err) ? -__ret : __ret; \
+ })
+
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
+ (nr_move), (mutex), (val)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
+ })
+
+
+static inline int __attribute__((always_inline))
+__lll_mutex_trylock(int *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
+}
+#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+
+
+static inline int __attribute__((always_inline))
+__lll_mutex_cond_trylock(int *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
+}
+#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+
+
+extern void __lll_lock_wait (int *futex) attribute_hidden;
+
+static inline void __attribute__((always_inline))
+__lll_mutex_lock(int *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_cond_lock (int *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
+
+
+extern int __lll_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
+
+static inline int __attribute__ ((always_inline))
+__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ result = __lll_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_mutex_timedlock(futex, abstime) \
+ __lll_mutex_timedlock (&(futex), abstime)
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock (int *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock_force (int *futex)
+{
+ (void) atomic_exchange_rel (futex, 0);
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+
+
+#define lll_mutex_islocked(futex) \
+ (futex != 0)
+
+
+/* Our internal lock implementation is identical to the binary-compatible
+ mutex implementation. */
+
+/* Type for lock object. */
+typedef int lll_lock_t;
+
+/* Initializers for lock. */
+#define LLL_LOCK_INITIALIZER (0)
+#define LLL_LOCK_INITIALIZER_LOCKED (1)
+
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
+/* The states of a lock are:
+ 0 - untaken
+ 1 - taken by one user
+ >1 - taken by more users */
+
+#define lll_trylock(lock) lll_mutex_trylock (lock)
+#define lll_lock(lock) lll_mutex_lock (lock)
+#define lll_unlock(lock) lll_mutex_unlock (lock)
+#define lll_islocked(lock) lll_mutex_islocked (lock)
+
+/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+ wakeup when the clone terminates. The memory location contains the
+ thread ID while the clone is running and is reset to zero
+ afterwards. */
+#define lll_wait_tid(tid) \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid); \
+ } while (0)
+
+extern int __lll_timedwait_tid (int *, const struct timespec *)
+ attribute_hidden;
+
+#define lll_timedwait_tid(tid, abstime) \
+ ({ \
+ int __res = 0; \
+ if ((tid) != 0) \
+ __res = __lll_timedwait_tid (&(tid), (abstime)); \
+ __res; \
+ })
+
+
+/* Conditional variable handling. */
+
+extern void __lll_cond_wait (pthread_cond_t *cond)
+ attribute_hidden;
+extern int __lll_cond_timedwait (pthread_cond_t *cond,
+ const struct timespec *abstime)
+ attribute_hidden;
+extern void __lll_cond_wake (pthread_cond_t *cond)
+ attribute_hidden;
+extern void __lll_cond_broadcast (pthread_cond_t *cond)
+ attribute_hidden;
+
+#define lll_cond_wait(cond) \
+ __lll_cond_wait (cond)
+#define lll_cond_timedwait(cond, abstime) \
+ __lll_cond_timedwait (cond, abstime)
+#define lll_cond_wake(cond) \
+ __lll_cond_wake (cond)
+#define lll_cond_broadcast(cond) \
+ __lll_cond_broadcast (cond)
+
+#endif /* lowlevellock.h */
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S
new file mode 100644
index 0000000..fe2b81b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S
@@ -0,0 +1,37 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <tls.h>
+
+/* Save the PID value. */
+#define SAVE_PID \
+ READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
+ lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
+ subu a2, $0, a2; /* Negate it. */ \
+ sw a2, PID_OFFSET(v1); /* Store the temporary PID. */
+
+/* Restore the old PID value in the parent. */
+#define RESTORE_PID \
+ beqz v0, 1f; /* If we are the parent... */ \
+ READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
+ lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
+ subu a2, $0, a2; /* Re-negate it. */ \
+ sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
+1:
+
+#include <../sysdeps/unix/sysv/linux/mips/vfork.S>
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
new file mode 100644
index 0000000..649b752
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c
@@ -0,0 +1,94 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "pthreadP.h"
+#include <lowlevellock.h>
+
+
+unsigned long int __fork_generation attribute_hidden;
+
+
+static void
+clear_once_control (void *arg)
+{
+ pthread_once_t *once_control = (pthread_once_t *) arg;
+
+ *once_control = 0;
+ lll_futex_wake (once_control, INT_MAX);
+}
+
+
+int
+__pthread_once (once_control, init_routine)
+ pthread_once_t *once_control;
+ void (*init_routine) (void);
+{
+ while (1)
+ {
+ int oldval, val, newval;
+
+ val = *once_control;
+ do
+ {
+ /* Check if the initialized has already been done. */
+ if ((val & 2) != 0)
+ return 0;
+
+ oldval = val;
+ newval = (oldval & 3) | __fork_generation | 1;
+ val = atomic_compare_and_exchange_val_acq (once_control, newval,
+ oldval);
+ }
+ while (__builtin_expect (val != oldval, 0));
+
+ /* Check if another thread already runs the initializer. */
+ if ((oldval & 1) != 0)
+ {
+ /* Check whether the initializer execution was interrupted
+ by a fork. */
+ if (((oldval ^ newval) & -4) == 0)
+ {
+ /* Same generation, some other thread was faster. Wait. */
+ lll_futex_wait (once_control, newval);
+ continue;
+ }
+ }
+
+ /* This thread is the first here. Do the initialization.
+ Register a cleanup handler so that in case the thread gets
+ interrupted the initialization can be restarted. */
+ pthread_cleanup_push (clear_once_control, once_control);
+
+ init_routine ();
+
+ pthread_cleanup_pop (0);
+
+
+ /* Add one to *once_control. */
+ atomic_increment (once_control);
+
+ /* Wake up all other threads. */
+ lll_futex_wake (once_control, INT_MAX);
+ break;
+ }
+
+ return 0;
+}
+weak_alias (__pthread_once, pthread_once)
+strong_alias (__pthread_once, __pthread_once_internal)
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..02508e2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/sysdep-cancel.h
@@ -0,0 +1,170 @@
+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <sysdeps/generic/sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+#ifdef __PIC__
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ L(pseudo_start): \
+ cfi_startproc; \
+ 99: la t9,__syscall_error; \
+ jr t9; \
+ .type __##syscall_name##_nocancel, @function; \
+ .globl __##syscall_name##_nocancel; \
+ __##syscall_name##_nocancel: \
+ .set noreorder; \
+ .cpload t9; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ ret; \
+ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \
+ ENTRY (name) \
+ .set noreorder; \
+ .cpload t9; \
+ .set reorder; \
+ SINGLE_THREAD_P(v1); \
+ bne zero, v1, L(pseudo_cancel); \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ ret; \
+ L(pseudo_cancel): \
+ SAVESTK_##args; \
+ sw ra, 28(sp); \
+ cfi_rel_offset (ra, 28); \
+ sw gp, 32(sp); \
+ cfi_rel_offset (gp, 32); \
+ PUSHARGS_##args; /* save syscall args */ \
+ CENABLE; \
+ lw gp, 32(sp); \
+ sw v0, 44(sp); /* save mask */ \
+ POPARGS_##args; /* restore syscall args */ \
+ .set noreorder; \
+ li v0, SYS_ify (syscall_name); \
+ syscall; \
+ .set reorder; \
+ sw v0, 36(sp); /* save syscall result */ \
+ sw a3, 40(sp); /* save syscall error flag */ \
+ lw a0, 44(sp); /* pass mask as arg1 */ \
+ CDISABLE; \
+ lw gp, 32(sp); \
+ lw v0, 36(sp); /* restore syscall result */ \
+ lw a3, 40(sp); /* restore syscall error flag */ \
+ lw ra, 28(sp); /* restore return address */ \
+ .set noreorder; \
+ bne a3, zero, SYSCALL_ERROR_LABEL; \
+ RESTORESTK; \
+ L(pseudo_end): \
+ .set reorder;
+
+# undef PSEUDO_END
+# define PSEUDO_END(sym) cfi_endproc; .end sym; .size sym,.-sym
+
+#endif
+
+# define PUSHARGS_0 /* nothing to do */
+# define PUSHARGS_1 PUSHARGS_0 sw a0, 0(sp); cfi_rel_offset (a0, 0);
+# define PUSHARGS_2 PUSHARGS_1 sw a1, 4(sp); cfi_rel_offset (a1, 4);
+# define PUSHARGS_3 PUSHARGS_2 sw a2, 8(sp); cfi_rel_offset (a2, 8);
+# define PUSHARGS_4 PUSHARGS_3 sw a3, 12(sp); cfi_rel_offset (a3, 12);
+# define PUSHARGS_5 PUSHARGS_4 /* handled by SAVESTK_## */
+# define PUSHARGS_6 PUSHARGS_5
+# define PUSHARGS_7 PUSHARGS_6
+
+# define POPARGS_0 /* nothing to do */
+# define POPARGS_1 POPARGS_0 lw a0, 0(sp);
+# define POPARGS_2 POPARGS_1 lw a1, 4(sp);
+# define POPARGS_3 POPARGS_2 lw a2, 8(sp);
+# define POPARGS_4 POPARGS_3 lw a3, 12(sp);
+# define POPARGS_5 POPARGS_4 /* args already in new stackframe */
+# define POPARGS_6 POPARGS_5
+# define POPARGS_7 POPARGS_6
+
+
+# define STKSPACE 48
+# define SAVESTK_0 subu sp, STKSPACE; cfi_adjust_cfa_offset(STKSPACE)
+# define SAVESTK_1 SAVESTK_0
+# define SAVESTK_2 SAVESTK_1
+# define SAVESTK_3 SAVESTK_2
+# define SAVESTK_4 SAVESTK_3
+# define SAVESTK_5 lw t0, 16(sp); \
+ SAVESTK_0; \
+ sw t0, 16(sp)
+
+# define SAVESTK_6 lw t0, 16(sp); \
+ lw t1, 20(sp); \
+ SAVESTK_0; \
+ sw t0, 16(sp); \
+ sw t1, 20(sp)
+
+# define SAVESTK_7 lw t0, 16(sp); \
+ lw t1, 20(sp); \
+ lw t2, 24(sp); \
+ SAVESTK_0; \
+ sw t0, 16(sp); \
+ sw t1, 20(sp); \
+ sw t2, 24(sp)
+
+# define RESTORESTK addu sp, STKSPACE; cfi_adjust_cfa_offset(-STKSPACE)
+
+
+/* We use jalr rather than jal. This means that the assembler will not
+ automatically restore $gp (in case libc has multiple GOTs) so we must
+ do it manually - which we have to do anyway since we don't use .cprestore.
+ It also shuts up the assembler warning about not using .cprestore. */
+# ifdef IS_IN_libpthread
+# define CENABLE la t9, __pthread_enable_asynccancel; jalr t9;
+# define CDISABLE la t9, __pthread_disable_asynccancel; jalr t9;
+# elif defined IS_IN_librt
+# define CENABLE la t9, __librt_enable_asynccancel; jalr t9;
+# define CDISABLE la t9, __librt_disable_asynccancel; jalr t9;
+# else
+# define CENABLE la t9, __libc_enable_asynccancel; jalr t9;
+# define CDISABLE la t9, __libc_disable_asynccancel; jalr t9;
+# endif
+
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) \
+ == 0, 1)
+# else
+# define SINGLE_THREAD_P(reg) \
+ READ_THREAD_POINTER(reg); \
+ lw reg, MULTIPLE_THREADS_OFFSET(reg)
+#endif
+
+#elif !defined __ASSEMBLER__
+
+# define SINGLE_THREAD_P 1
+# define NO_CANCELLATION 1
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/vfork.S b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S
new file mode 100644
index 0000000..874a2e2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/nptl/vfork.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <tls.h>
+
+/* Save the PID value. */
+#define SAVE_PID \
+ READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
+ lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
+ subu a2, $0, a2; /* Negate it. */ \
+ bnez a2, 1f; /* If it was zero... */ \
+ lui a2, 0x8000; /* use 0x80000000 instead. */ \
+1: sw a2, PID_OFFSET(v1); /* Store the temporary PID. */
+
+/* Restore the old PID value in the parent. */
+#define RESTORE_PID \
+ beqz v0, 1f; /* If we are the parent... */ \
+ READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
+ lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
+ subu a2, $0, a2; /* Re-negate it. */ \
+ lui a0, 0x8000; /* Load 0x80000000... */ \
+ bne a2, a0, 2f; /* ... compare against it... */ \
+ li a2, 0; /* ... use 0 instead. */ \
+2: sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
+1:
+
+#include <../sysdeps/unix/sysv/linux/mips/vfork.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e36da2da8f7886f8a32f49821d611800f24f9f3c
commit e36da2da8f7886f8a32f49821d611800f24f9f3c
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:19:38 2005 +0000
Add MIPS NPTL support
diff --git a/sysdeps/mips/nptl/Makefile b/sysdeps/mips/nptl/Makefile
new file mode 100644
index 0000000..d0c59a5
--- /dev/null
+++ b/sysdeps/mips/nptl/Makefile
@@ -0,0 +1,25 @@
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += nptl-sysdep
+endif
diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h
new file mode 100644
index 0000000..67cc969
--- /dev/null
+++ b/sysdeps/mips/nptl/jmpbuf-unwind.h
@@ -0,0 +1,30 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
+
+/* We use the normal longjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/sysdeps/mips/nptl/nptl-sysdep.S b/sysdeps/mips/nptl/nptl-sysdep.S
new file mode 100644
index 0000000..3f5c2a3
--- /dev/null
+++ b/sysdeps/mips/nptl/nptl-sysdep.S
@@ -0,0 +1,2 @@
+/* Pull in __syscall_error. */
+#include <sysdep.S>
diff --git a/sysdeps/mips/nptl/pthread_spin_lock.S b/sysdeps/mips/nptl/pthread_spin_lock.S
new file mode 100644
index 0000000..d5f2a72
--- /dev/null
+++ b/sysdeps/mips/nptl/pthread_spin_lock.S
@@ -0,0 +1,37 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/asm.h>
+#include <sysdep.h>
+#include <sgidefs.h>
+
+ENTRY (pthread_spin_lock)
+ .set push
+#if _MIPS_SIM == _ABIO32
+ .set mips2
+#endif
+1: ll a2, 0(a0)
+ li a1, 1
+ bnez a2, 1b
+ sc a1, 0(a0)
+ beqz a1, 1b
+ MIPS_SYNC
+ .set pop
+ li v0, 0
+ ret
+PSEUDO_END (pthread_spin_lock)
diff --git a/sysdeps/mips/nptl/pthread_spin_trylock.S b/sysdeps/mips/nptl/pthread_spin_trylock.S
new file mode 100644
index 0000000..9c6e740
--- /dev/null
+++ b/sysdeps/mips/nptl/pthread_spin_trylock.S
@@ -0,0 +1,41 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/asm.h>
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#include <sgidefs.h>
+
+ENTRY (pthread_spin_trylock)
+ .set push
+#if _MIPS_SIM == _ABIO32
+ .set mips2
+#endif
+ ll a2, 0(a0)
+ li a1, 1
+ bnez a2, 1f
+ sc a1, 0(a0)
+ beqz a1, 1f
+ MIPS_SYNC
+ .set pop
+ li v0, 0
+ ret
+1: li v0, EBUSY
+ ret
+PSEUDO_END (pthread_spin_trylock)
diff --git a/sysdeps/mips/nptl/pthreaddef.h b/sysdeps/mips/nptl/pthreaddef.h
new file mode 100644
index 0000000..e72b4bc
--- /dev/null
+++ b/sysdeps/mips/nptl/pthreaddef.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning. */
+#define STACK_ALIGN 16
+
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 2048
+
+/* Alignment requirement for TCB. */
+#define TCB_ALIGNMENT 16
+
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
+
+
+/* XXX Until we have a better place keep the definitions here. */
+
+#define __exit_thread_inline(val) \
+ INLINE_SYSCALL (exit, 1, (val))
diff --git a/sysdeps/mips/nptl/tcb-offsets.sym b/sysdeps/mips/nptl/tcb-offsets.sym
new file mode 100644
index 0000000..e0e71dc
--- /dev/null
+++ b/sysdeps/mips/nptl/tcb-offsets.sym
@@ -0,0 +1,11 @@
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Abuse tls.h macros to derive offsets relative to the thread register.
+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+
+MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
+PID_OFFSET thread_offsetof (pid)
+TID_OFFSET thread_offsetof (tid)
diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h
new file mode 100644
index 0000000..1cef161
--- /dev/null
+++ b/sysdeps/mips/nptl/tls.h
@@ -0,0 +1,161 @@
+/* Definition for thread-local data handling. NPTL/MIPS version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H 1
+
+#include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stdbool.h>
+# include <stddef.h>
+# include <stdint.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
+} dtv_t;
+
+/* Note: rd must be $v1 to be ABI-conformant. */
+# define READ_THREAD_POINTER() \
+ ({ void *__result; \
+ asm volatile (".set\tpush\n\t.set\tmips32r2\n\t" \
+ "rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result)); \
+ __result; })
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+
+# define READ_THREAD_POINTER(rd) \
+ .set push; \
+ .set mips32r2; \
+ rdhwr rd, $29; \
+ .set pop
+#endif /* __ASSEMBLER__ */
+
+
+/* We require TLS support in the tools. */
+#ifndef HAVE_TLS_SUPPORT
+# error "TLS support is required."
+#endif
+
+/* Signal that TLS support is available. */
+#define USE_TLS 1
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information. */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks. */
+# define TLS_DTV_AT_TP 1
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
+
+typedef struct
+{
+ dtv_t *dtv;
+ void *private;
+} tcbhead_t;
+
+/* This is the size of the initial TCB. Because our TCB is before the thread
+ pointer, we don't need this. */
+# define TLS_INIT_TCB_SIZE 0
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size of the TCB. Because our TCB is before the thread
+ pointer, we don't need this. */
+# define TLS_TCB_SIZE 0
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size we need before TCB - actually, it includes the TCB. */
+# define TLS_PRE_TCB_SIZE \
+ (sizeof (struct pthread) \
+ + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
+
+/* The thread pointer (in hardware register $29) points to the end of
+ the TCB + 0x7000, as for PowerPC. The pthread_descr structure is
+ immediately in front of the TCB. */
+# define TLS_TCB_OFFSET 0x7000
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ (((tcbhead_t *) (tcbp))[-1].dtv = (dtvp) + 1)
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) \
+ (THREAD_DTV() = (dtv))
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))[-1].dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(tcbp, secondcall) \
+ ({ INTERNAL_SYSCALL_DECL (err); \
+ long result_var; \
+ result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
+ (char *) (tcbp) + TLS_TCB_OFFSET); \
+ INTERNAL_SYSCALL_ERROR_P (result_var, err) \
+ ? "unknown error" : NULL; })
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ (((tcbhead_t *) (READ_THREAD_POINTER () - TLS_TCB_OFFSET))[-1].dtv)
+
+/* Return the thread descriptor for the current thread. */
+# define THREAD_SELF \
+ ((struct pthread *) (READ_THREAD_POINTER () \
+ - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+
+/* Magic for libthread_db to know how to do THREAD_SELF. */
+# define DB_THREAD_SELF \
+ CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
+/* Access to data in the thread descriptor is easy. */
+# define THREAD_GETMEM(descr, member) \
+ descr->member
+# define THREAD_GETMEM_NC(descr, member, idx) \
+ descr->member[idx]
+# define THREAD_SETMEM(descr, member, value) \
+ descr->member = (value)
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+ descr->member[idx] = (value)
+
+/* l_tls_offset == 0 is perfectly valid on MIPS, so we have to use some
+ different value to mean unset l_tls_offset. */
+# define NO_TLS_OFFSET -1
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27aae96e5b9f684eede6d76bf7bca006507c2124
commit 27aae96e5b9f684eede6d76bf7bca006507c2124
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:17:43 2005 +0000
(SIGEV_THREAD, SIGEV_CALLBACK, SIGEV_THREAD_ID): Update to match the kernel.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 54eba41..787e365 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/MIPS version.
- Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -300,10 +300,11 @@ enum
# define SIGEV_SIGNAL SIGEV_SIGNAL
SIGEV_NONE, /* Other notification: meaningless. */
# define SIGEV_NONE SIGEV_NONE
- SIGEV_CALLBACK, /* Deliver via thread creation. */
-# define SIGEV_CALLBACK SIGEV_CALLBACK
- SIGEV_THREAD /* Deliver via thread creation. */
+ SIGEV_THREAD, /* Deliver via thread creation. */
# define SIGEV_THREAD SIGEV_THREAD
+
+ SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
+#define SIGEV_THREAD_ID SIGEV_THREAD_ID
};
#endif /* have _SIGNAL_H. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1ae85a58e486debc6f5b1c53cd4c4a30fbdd493
commit e1ae85a58e486debc6f5b1c53cd4c4a30fbdd493
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:17:26 2005 +0000
(INTERNAL_SYSCALL_NCS): New.
(INTERNAL_SYSCALL, internal_syscall0, internal_syscall1,
internal_syscall2, internal_syscall3, internal_syscall4,
internal_syscall5, internal_syscall6, internal_syscall7): Update
for non-constant support.
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 682ec3d..3da2412 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,12 +48,12 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL(err); \
- long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
- if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
- { \
- __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
- result_var = -1L; \
- } \
+ long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
+ result_var = -1L; \
+ } \
result_var; })
#undef INTERNAL_SYSCALL_DECL
@@ -66,203 +66,218 @@
#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+ internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \
+ "i" (SYS_ify (name)), err, args)
-#define internal_syscall0(name, err, dummy...) \
-({ \
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
+ internal_syscall##nr (= number, , "r" (__v0), err, args)
+
+#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \
+({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a3 asm("$7"); \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %2\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set reorder" \
- : "=r" (__v0), "=r" (__a3) \
- : "i" (SYS_ify(name)) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : input \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall1(name, err, arg1) \
-({ \
+#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \
+({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a3 asm("$7"); \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %3\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set reorder" \
- : "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "i" (SYS_ify(name)) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : input, "r" (__a0) \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall2(name, err, arg1, arg2) \
-({ \
+#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \
+({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a3 asm("$7"); \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %4\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : input, "r" (__a0), "r" (__a1) \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall3(name, err, arg1, arg2, arg3) \
-({ \
+#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\
+({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7"); \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "=r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
-({ \
+#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\
+({ \
long _sys_result; \
\
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2) \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
-({ \
+/* We need to use a frame pointer for the functions in which we
+ adjust $sp around the syscall, or debug information and unwind
+ information will be $sp relative and thus wrong during the syscall. As
+ of GCC 3.4.3, this is sufficient. */
+#define FORCE_FRAME_POINTER alloca (4)
+
+#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\
+({ \
long _sys_result; \
\
+ FORCE_FRAME_POINTER; \
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "subu\t$29, 32\n\t" \
- "sw\t%6, 16($29)\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- "addiu\t$29, 32\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" ((long)arg5) \
- : __SYSCALL_CLOBBERS); \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t%6, 16($29)\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), \
+ "r" ((long)arg5) \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
-({ \
+#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+({ \
long _sys_result; \
\
+ FORCE_FRAME_POINTER; \
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "subu\t$29, 32\n\t" \
- "sw\t%6, 16($29)\n\t" \
- "sw\t%7, 20($29)\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- "addiu\t$29, 32\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 20($29)\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), \
"r" ((long)arg5), "r" ((long)arg6) \
- : __SYSCALL_CLOBBERS); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
_sys_result; \
})
-#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({ \
+#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
+({ \
long _sys_result; \
\
+ FORCE_FRAME_POINTER; \
{ \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "subu\t$29, 32\n\t" \
- "sw\t%6, 16($29)\n\t" \
- "sw\t%7, 20($29)\n\t" \
- "sw\t%8, 24($29)\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- "addiu\t$29, 32\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ register long __v0 asm("$2") ncs_init; \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 20($29)\n\t" \
+ "sw\t%8, 24($29)\n\t" \
+ cs_init \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : input, "r" (__a0), "r" (__a1), "r" (__a2), \
"r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \
- : __SYSCALL_CLOBBERS); \
+ : __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
} \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08650996eacdf06747e1a3bacce797f0182abc6b
commit 08650996eacdf06747e1a3bacce797f0182abc6b
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:17:06 2005 +0000
Add NPTL and five-argument clone support.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 043f592..8b8e007 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@linux-mips.org>, 1996.
@@ -24,11 +24,23 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#ifdef RESET_PID
+#include <tls.h>
+#endif
+
+#define CLONE_VM 0x00000100
+#define CLONE_THREAD 0x00010000
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
+ void *parent_tidptr, void *tls, void *child_tidptr) */
.text
-LOCALSZ= 1
+#if _MIPS_SIM == _ABIO32
+# define EXTRA_LOCALS 1
+#else
+# define EXTRA_LOCALS 0
+#endif
+LOCALSZ= 4
FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
GPOFF= FRAMESZ-(1*SZREG)
NESTED(__clone,4*SZREG,sp)
@@ -56,10 +68,26 @@ NESTED(__clone,4*SZREG,sp)
PTR_SUBU a1,32 /* Reserve argument save space. */
PTR_S a0,0(a1) /* Save function pointer. */
PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */
+#ifdef RESET_PID
+ LONG_S a2,(PTRSIZE*2)(a1) /* Save clone flags. */
+#endif
+ move a0,a2
+
+ /* Shuffle in the last three arguments - arguments 5, 6, and 7 to
+ this function, but arguments 3, 4, and 5 to the syscall. */
+#if _MIPS_SIM == _ABIO32
+ PTR_L a2,(FRAMESZ+PTRSIZE+PTRSIZE+16)(sp)
+ PTR_S a2,16(sp)
+ PTR_L a2,(FRAMESZ+16)(sp)
+ PTR_L a3,(FRAMESZ+PTRSIZE+16)(sp)
+#else
+ move a2,a4
+ move a3,a5
+ move a4,a6
+#endif
/* Do the system call */
- move a0,a2
li v0,__NR_clone
syscall
@@ -94,6 +122,15 @@ L(thread_start):
/* cp is already loaded. */
SAVE_GP (GPOFF)
/* The stackframe has been created on entry of clone(). */
+
+#ifdef RESET_PID
+ /* Check and see if we need to reset the PID. */
+ LONG_L a0,(PTRSIZE*2)(sp)
+ and a1,a0,CLONE_THREAD
+ beqz a1,L(restore_pid)
+L(donepid):
+#endif
+
/* Restore the arg for user's function. */
PTR_L t9,0(sp) /* Function pointer. */
PTR_L a0,PTRSIZE(sp) /* Argument pointer. */
@@ -109,6 +146,21 @@ L(thread_start):
#else
jal _exit
#endif
+
+#ifdef RESET_PID
+L(restore_pid):
+ and a1,a0,CLONE_VM
+ li v0,-1
+ bnez a1,L(gotpid)
+ li v0,__NR_getpid
+ syscall
+L(gotpid):
+ READ_THREAD_POINTER(v1)
+ INT_S v0,PID_OFFSET(v1)
+ INT_S v0,TID_OFFSET(v1)
+ b L(donepid)
+#endif
+
END(__thread_start)
weak_alias(__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4abf7dea27548820d4f3b80c350333ba3c7b1683
commit 4abf7dea27548820d4f3b80c350333ba3c7b1683
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:16:12 2005 +0000
Linux/MIPS vfork implementation.
diff --git a/sysdeps/unix/sysv/linux/mips/vfork.S b/sysdeps/unix/sysv/linux/mips/vfork.S
new file mode 100644
index 0000000..1383ddc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/vfork.S
@@ -0,0 +1,98 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* vfork() is just a special case of clone(). */
+
+#include <sys/asm.h>
+#include <sysdep.h>
+#include <asm/unistd.h>
+#include <sgidefs.h>
+
+#ifndef SAVE_PID
+#define SAVE_PID
+#endif
+
+#ifndef RESTORE_PID
+#define RESTORE_PID
+#endif
+
+
+/* int vfork() */
+
+ .text
+LOCALSZ= 1
+FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
+GPOFF= FRAMESZ-(1*SZREG)
+NESTED(__vfork,FRAMESZ,sp)
+#ifdef __PIC__
+ SETUP_GP
+#endif
+ PTR_SUBU sp, FRAMESZ
+ SETUP_GP64 (a5, __vfork)
+#ifdef __PIC__
+ SAVE_GP (GPOFF)
+#endif
+#ifdef PROF
+# if (_MIPS_SIM != _ABIO32)
+ PTR_S a5, GPOFF(sp)
+# endif
+ .set noat
+ move $1, ra
+# if (_MIPS_SIM == _ABIO32)
+ subu sp,sp,8
+# endif
+ jal _mcount
+ .set at
+# if (_MIPS_SIM != _ABIO32)
+ PTR_L a5, GPOFF(sp)
+# endif
+#endif
+
+ PTR_ADDU sp, FRAMESZ
+
+ SAVE_PID
+
+ li a0, 0x4112 /* CLONE_VM | CLONE_VFORK | SIGCHLD */
+ move a1, sp
+
+ /* Do the system call */
+ li v0,__NR_clone
+ syscall
+
+ RESTORE_PID
+
+ bnez a3,L(error)
+
+ /* Successful return from the parent or child. */
+ RESTORE_GP64
+ ret
+
+ /* Something bad happened -- no child created. */
+L(error):
+#ifdef __PIC__
+ PTR_LA t9, __syscall_error
+ RESTORE_GP64
+ jr t9
+#else
+ RESTORE_GP64
+ j __syscall_error
+#endif
+ END(__vfork)
+
+libc_hidden_def(__vfork)
+weak_alias(__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=638418213e7a51fad20074071b7ad8f35b8bc2d3
commit 638418213e7a51fad20074071b7ad8f35b8bc2d3
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:15:45 2005 +0000
New file.
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index b04c36b..b590802 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -470,4 +471,20 @@ symbol = value
# define MTC0 dmtc0
#endif
+/* The MIPS archtectures do not have a uniform memory model. Particular
+ platforms may provide additional guarantees - for instance, the R4000
+ LL and SC instructions implicitly perform a SYNC, and the 4K promises
+ strong ordering.
+
+ However, in the absence of those guarantees, we must assume weak ordering
+ and SYNC explicitly where necessary.
+
+ Some obsolete MIPS processors may not support the SYNC instruction. This
+ applies to "true" MIPS I processors; most of the processors which compile
+ using MIPS I implement parts of MIPS II. */
+
+#ifndef MIPS_SYNC
+# define MIPS_SYNC sync
+#endif
+
#endif /* sys/asm.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0af5154802a9293019b85d3cef815708450ae3a3
commit 0af5154802a9293019b85d3cef815708450ae3a3
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 09:14:59 2005 +0000
New files for MIPS TLS support.
diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h
new file mode 100644
index 0000000..167d9a5
--- /dev/null
+++ b/sysdeps/mips/bits/atomic.h
@@ -0,0 +1,303 @@
+/* Low-level functions for atomic operations. Mips version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MIPS_BITS_ATOMIC_H
+#define _MIPS_BITS_ATOMIC_H 1
+
+#include <inttypes.h>
+#include <sgidefs.h>
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef int64_t atomic64_t;
+typedef uint64_t uatomic64_t;
+typedef int_fast64_t atomic_fast64_t;
+typedef uint_fast64_t uatomic_fast64_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+#if _MIPS_SIM == _ABIO32
+#define MIPS_PUSH_MIPS2 ".set mips2\n\t"
+#else
+#define MIPS_PUSH_MIPS2
+#endif
+
+/* See the comments in <sys/asm.h> about the use of the sync instruction. */
+#ifndef MIPS_SYNC
+# define MIPS_SYNC sync
+#endif
+
+#define MIPS_SYNC_STR_2(X) #X
+#define MIPS_SYNC_STR_1(X) MIPS_SYNC_STR_2(X)
+#define MIPS_SYNC_STR MIPS_SYNC_STR_1(MIPS_SYNC)
+
+/* Compare and exchange. For all of the "xxx" routines, we expect a
+ "__prev" and a "__cmp" variable to be provided by the enclosing scope,
+ in which values are returned. */
+
+#define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \
+ (abort (), __prev = __cmp = 0)
+
+#define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \
+ (abort (), __prev = __cmp = 0)
+
+#define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \
+ __asm__ __volatile__ ( \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\t" \
+ "ll %0,%4\n\t" \
+ "move %1,$0\n\t" \
+ "bne %0,%2,2f\n\t" \
+ "move %1,%3\n\t" \
+ "sc %1,%4\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (oldval), "r" (newval), "m" (*mem) \
+ : "memory")
+
+#if _MIPS_SIM == _ABIO32
+/* We can't do an atomic 64-bit operation in O32. */
+#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
+ (abort (), __prev = __cmp = 0)
+#else
+#define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
+ __asm__ __volatile__ ("\n" \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\t" \
+ "lld %0,%4\n\t" \
+ "move %1,$0\n\t" \
+ "bne %0,%2,2f\n\t" \
+ "move %1,%3\n\t" \
+ "scd %1,%4\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (oldval), "r" (newval), "m" (*mem) \
+ : "memory")
+#endif
+
+/* For all "bool" routines, we return FALSE if exchange succesful. */
+
+#define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
+ !__cmp; })
+
+#define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
+ !__cmp; })
+
+#define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
+ !__cmp; })
+
+#define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
+ !__cmp; })
+
+/* For all "val" routines, return the old value whether exchange
+ successful or not. */
+
+#define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
+ (typeof (*mem))__prev; })
+
+#define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
+ (typeof (*mem))__prev; })
+
+#define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
+ (typeof (*mem))__prev; })
+
+#define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
+ (typeof (*mem))__prev; })
+
+/* Compare and exchange with "acquire" semantics, ie barrier after. */
+
+#define atomic_compare_and_exchange_bool_acq(mem, new, old) \
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, "", MIPS_SYNC_STR)
+
+#define atomic_compare_and_exchange_val_acq(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, "", MIPS_SYNC_STR)
+
+/* Compare and exchange with "release" semantics, ie barrier before. */
+
+#define atomic_compare_and_exchange_bool_rel(mem, new, old) \
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, MIPS_SYNC_STR, "")
+
+#define atomic_compare_and_exchange_val_rel(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, MIPS_SYNC_STR, "")
+
+
+
+/* Atomic exchange (without compare). */
+
+#define __arch_exchange_xxx_8_int(mem, newval, rel, acq) \
+ (abort (), 0)
+
+#define __arch_exchange_xxx_16_int(mem, newval, rel, acq) \
+ (abort (), 0)
+
+#define __arch_exchange_xxx_32_int(mem, newval, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __asm__ __volatile__ ("\n" \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\t" \
+ "ll %0,%3\n\t" \
+ "move %1,%2\n\t" \
+ "sc %1,%3\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (newval), "m" (*mem) \
+ : "memory"); \
+ __prev; })
+
+#if _MIPS_SIM == _ABIO32
+/* We can't do an atomic 64-bit operation in O32. */
+#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
+ (abort (), 0)
+#else
+#define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __asm__ __volatile__ ("\n" \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\n" \
+ "lld %0,%3\n\t" \
+ "move %1,%2\n\t" \
+ "scd %1,%3\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (newval), "m" (*mem) \
+ : "memory"); \
+ __prev; })
+#endif
+
+#define atomic_exchange_acq(mem, value) \
+ __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, "", MIPS_SYNC_STR)
+
+#define atomic_exchange_rel(mem, value) \
+ __atomic_val_bysize (__arch_exchange_xxx, int, mem, value, MIPS_SYNC_STR, "")
+
+
+/* Atomically add value and return the previous (unincremented) value. */
+
+#define __arch_exchange_and_add_8_int(mem, newval, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
+
+#define __arch_exchange_and_add_16_int(mem, newval, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
+
+#define __arch_exchange_and_add_32_int(mem, value, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __asm__ __volatile__ ("\n" \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\t" \
+ "ll %0,%3\n\t" \
+ "addu %1,%0,%2\n\t" \
+ "sc %1,%3\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (value), "m" (*mem) \
+ : "memory"); \
+ __prev; })
+
+#if _MIPS_SIM == _ABIO32
+/* We can't do an atomic 64-bit operation in O32. */
+#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
+ (abort (), (typeof(*mem)) 0)
+#else
+#define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
+({ typeof (*mem) __prev; int __cmp; \
+ __asm__ __volatile__ ( \
+ ".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ rel "\n" \
+ "1:\t" \
+ "lld %0,%3\n\t" \
+ "daddu %1,%0,%2\n\t" \
+ "scd %1,%3\n\t" \
+ "beqz %1,1b\n" \
+ acq "\n\t" \
+ ".set pop\n" \
+ "2:\n\t" \
+ : "=&r" (__prev), "=&r" (__cmp) \
+ : "r" (value), "m" (*mem) \
+ : "memory"); \
+ __prev; })
+#endif
+
+/* ??? Barrier semantics for atomic_exchange_and_add appear to be
+ undefined. Use full barrier for now, as that's safe. */
+#define atomic_exchange_and_add(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
+ MIPS_SYNC_STR, MIPS_SYNC_STR)
+
+/* TODO: More atomic operations could be implemented efficiently; only the
+ basic requirements are done. */
+
+#define atomic_full_barrier() \
+ __asm__ __volatile__ (".set push\n\t" \
+ MIPS_PUSH_MIPS2 \
+ MIPS_SYNC_STR "\n\t" \
+ ".set pop" : : : "memory")
+
+#endif /* bits/atomic.h */
diff --git a/sysdeps/mips/dl-tls.h b/sysdeps/mips/dl-tls.h
new file mode 100644
index 0000000..6d3ed6f
--- /dev/null
+++ b/sysdeps/mips/dl-tls.h
@@ -0,0 +1,46 @@
+/* Thread-local storage handling in the ELF dynamic linker. MIPS version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* Type used for the representation of TLS information in the GOT. */
+typedef struct
+{
+ unsigned long int ti_module;
+ unsigned long int ti_offset;
+} tls_index;
+
+/* The thread pointer points 0x7000 past the first static TLS block. */
+#define TLS_TP_OFFSET 0x7000
+
+/* Dynamic thread vector pointers point 0x8000 past the start of each
+ TLS block. */
+#define TLS_DTV_OFFSET 0x8000
+
+/* Compute the value for a GOTTPREL reloc. */
+#define TLS_TPREL_VALUE(sym_map, sym) \
+ ((sym_map)->l_tls_offset + (sym)->st_value - TLS_TP_OFFSET)
+
+/* Compute the value for a DTPREL reloc. */
+#define TLS_DTPREL_VALUE(sym) \
+ ((sym)->st_value - TLS_DTV_OFFSET)
+
+extern void *__tls_get_addr (tls_index *ti);
+
+# define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET)
+# define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET)
diff --git a/sysdeps/mips/elf/configure b/sysdeps/mips/elf/configure
new file mode 100644
index 0000000..3d90a1e
--- /dev/null
+++ b/sysdeps/mips/elf/configure
@@ -0,0 +1,46 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/mips/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+echo "$as_me:$LINENO: checking for MIPS TLS support" >&5
+echo $ECHO_N "checking for MIPS TLS support... $ECHO_C" >&6
+if test "${libc_cv_mips_tls+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.s <<\EOF
+ .section ".tdata", "awT", %progbits
+ .globl foo
+foo: .long 1
+ .section ".tbss", "awT", %nobits
+ .globl bar
+bar: .skip 4
+ .text
+
+ lw $25, %call16(__tls_get_addr)($28)
+ jalr $25
+ addiu $4, $28, %tlsgd(x)
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_mips_tls=yes
+else
+ libc_cv_mips_tls=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_mips_tls" >&5
+echo "${ECHO_T}$libc_cv_mips_tls" >&6
+if test $libc_cv_mips_tls = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TLS_SUPPORT 1
+_ACEOF
+
+fi
+fi
+
diff --git a/sysdeps/mips/elf/configure.in b/sysdeps/mips/elf/configure.in
new file mode 100644
index 0000000..ecb9108
--- /dev/null
+++ b/sysdeps/mips/elf/configure.in
@@ -0,0 +1,35 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/mips/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for MIPS TLS support, libc_cv_mips_tls, [dnl
+cat > conftest.s <<\EOF
+ .section ".tdata", "awT", %progbits
+ .globl foo
+foo: .long 1
+ .section ".tbss", "awT", %nobits
+ .globl bar
+bar: .skip 4
+ .text
+
+ lw $25, %call16(__tls_get_addr)($28)
+ jalr $25
+ addiu $4, $28, %tlsgd(x)
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_mips_tls=yes
+else
+ libc_cv_mips_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_mips_tls = yes; then
+ AC_DEFINE(HAVE_TLS_SUPPORT)
+fi
+fi
+
+dnl No MIPS GCC supports accessing static and hidden symbols in an
+dnl position independent way.
+dnl AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/mips/libc-tls.c b/sysdeps/mips/libc-tls.c
new file mode 100644
index 0000000..157ba33
--- /dev/null
+++ b/sysdeps/mips/libc-tls.c
@@ -0,0 +1,37 @@
+/* Thread-local storage handling in the ELF dynamic linker. MIPS version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/generic/libc-tls.c>
+#include <dl-tls.h>
+
+#if USE_TLS
+
+/* On MIPS, linker optimizations are not required, so __tls_get_addr
+ can be called even in statically linked binaries. In this case module
+ must be always 1 and PT_TLS segment exist in the binary, otherwise it
+ would not link. */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ return (char *) dtv[1].pointer.val + GET_ADDR_OFFSET;
+}
+
+#endif
diff --git a/sysdeps/mips/tls-macros.h b/sysdeps/mips/tls-macros.h
new file mode 100644
index 0000000..2d0516b
--- /dev/null
+++ b/sysdeps/mips/tls-macros.h
@@ -0,0 +1,88 @@
+/* Macros to support TLS testing in times of missing compiler support. */
+
+#if _MIPS_SIM != _ABI64
+
+/* These versions are for o32 and n32. */
+
+# define TLS_GD(x) \
+ ({ void *__result; \
+ extern void *__tls_get_addr (void *); \
+ asm ("addiu %0, $28, %%tlsgd(" #x ")" \
+ : "=r" (__result)); \
+ (int *)__tls_get_addr (__result); })
+#else
+# define TLS_GD(x) \
+ ({ void *__result; \
+ extern void *__tls_get_addr (void *); \
+ asm ("daddiu %0, $28, %%tlsgd(" #x ")" \
+ : "=r" (__result)); \
+ (int *)__tls_get_addr (__result); })
+#endif
+
+#if _MIPS_SIM != _ABI64
+# define TLS_LD(x) \
+ ({ void *__result; \
+ extern void *__tls_get_addr (void *); \
+ asm ("addiu %0, $28, %%tlsldm(" #x ")" \
+ : "=r" (__result)); \
+ __result = __tls_get_addr (__result); \
+ asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \
+ "addiu $3,$3,%%dtprel_lo(" #x ")\n\t" \
+ "addu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+# define TLS_IE(x) \
+ ({ void *__result; \
+ asm (".set push\n\t.set mips32r2\n\t" \
+ "rdhwr\t%0,$29\n\t.set pop" \
+ : "=v" (__result)); \
+ asm ("lw $3,%%gottprel(" #x ")($28)\n\t" \
+ "addu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+# define TLS_LE(x) \
+ ({ void *__result; \
+ asm (".set push\n\t.set mips32r2\n\t" \
+ "rdhwr\t%0,$29\n\t.set pop" \
+ : "=v" (__result)); \
+ asm ("lui $3,%%tprel_hi(" #x ")\n\t" \
+ "addiu $3,$3,%%tprel_lo(" #x ")\n\t" \
+ "addu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+
+#else
+
+/* These versions are for n64. */
+
+# define TLS_LD(x) \
+ ({ void *__result; \
+ extern void *__tls_get_addr (void *); \
+ asm ("daddiu %0, $28, %%tlsldm(" #x ")" \
+ : "=r" (__result)); \
+ __result = __tls_get_addr (__result); \
+ asm ("lui $3,%%dtprel_hi(" #x ")\n\t" \
+ "daddiu $3,$3,%%dtprel_lo(" #x ")\n\t" \
+ "daddu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+# define TLS_IE(x) \
+ ({ void *__result; \
+ asm (".set push\n\t.set mips32r2\n\t" \
+ "rdhwr\t%0,$29\n\t.set pop" \
+ : "=v" (__result)); \
+ asm ("ld $3,%%gottprel(" #x ")($28)\n\t" \
+ "daddu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+# define TLS_LE(x) \
+ ({ void *__result; \
+ asm (".set push\n\t.set mips32r2\n\t" \
+ "rdhwr\t%0,$29\n\t.set pop" \
+ : "=v" (__result)); \
+ asm ("lui $3,%%tprel_hi(" #x ")\n\t" \
+ "daddiu $3,$3,%%tprel_lo(" #x ")\n\t" \
+ "daddu %0,%0,$3" \
+ : "+r" (__result) : : "$3"); \
+ __result; })
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32e5182ae0c1ab7c62141096fe67cd55b71d30e7
commit 32e5182ae0c1ab7c62141096fe67cd55b71d30e7
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 08:59:05 2005 +0000
Remove unused file.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
deleted file mode 100644
index 7380e10..0000000
--- a/sysdeps/mips/atomicity.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Low-level functions for atomic operations. Mips version.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _MIPS_ATOMICITY_H
-#define _MIPS_ATOMICITY_H 1
-
-#include <inttypes.h>
-#include <sgidefs.h>
-
-static inline int
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, int val)
-{
- int result, tmp;
-
- __asm__ __volatile__
- ("/* Inline exchange & add */\n"
- "1:\n\t"
- ".set push\n\t"
-#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-#endif
- "ll %0,%3\n\t"
- "addu %1,%4,%0\n\t"
- "sc %1,%2\n\t"
- ".set pop\n\t"
- "beqz %1,1b\n\t"
- "/* End exchange & add */"
- : "=&r"(result), "=&r"(tmp), "=m"(*mem)
- : "m" (*mem), "r"(val)
- : "memory");
-
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- int result;
-
- __asm__ __volatile__
- ("/* Inline atomic add */\n"
- "1:\n\t"
- ".set push\n\t"
-#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-#endif
- "ll %0,%2\n\t"
- "addu %0,%3,%0\n\t"
- "sc %0,%1\n\t"
- ".set pop\n\t"
- "beqz %0,1b\n\t"
- "/* End atomic add */"
- : "=&r"(result), "=m"(*mem)
- : "m" (*mem), "r"(val)
- : "memory");
-}
-
-static inline int
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- long int ret, temp;
-
- __asm__ __volatile__
- ("/* Inline compare & swap */\n"
- "1:\n\t"
- ".set push\n\t"
-#if _MIPS_SIM == _ABIO32
- ".set mips2\n\t"
-#endif
-#if _MIPS_SIM == _ABI64
- "lld %1,%5\n\t"
-#else
- "ll %1,%5\n\t"
-#endif
- "move %0,$0\n\t"
- "bne %1,%3,2f\n\t"
- "move %0,%4\n\t"
-#if _MIPS_SIM == _ABI64
- "scd %0,%2\n\t"
-#else
- "sc %0,%2\n\t"
-#endif
- ".set pop\n\t"
- "beqz %0,1b\n"
- "2:\n\t"
- "/* End compare & swap */"
- : "=&r" (ret), "=&r" (temp), "=m" (*p)
- : "r" (oldval), "r" (newval), "m" (*p)
- : "memory");
-
- return ret;
-}
-
-#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7dda24b2038425663de6122620a8b10b8538092f
commit 7dda24b2038425663de6122620a8b10b8538092f
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 07:58:05 2005 +0000
Remove whitespace at eol
diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c
index c5ea59c..459adf9 100644
--- a/sysdeps/mips/dl-trampoline.c
+++ b/sysdeps/mips/dl-trampoline.c
@@ -153,7 +153,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index,
if (version->hash != 0)
{
- sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l,
+ sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l,
&sym, l->l_scope, version,
ELF_RTYPE_CLASS_PLT, 0, 0);
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=54316090f1fdb145bf939e85589d3c8fe264865e
commit 54316090f1fdb145bf939e85589d3c8fe264865e
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 07:48:26 2005 +0000
(internal_syscall5): Use register operands instead of non-lvalue
memory operands.
(internal_syscall6): Likewise.
(internal_syscall7): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 5eaf7a2..682ec3d 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -194,16 +194,15 @@
register long __a3 asm("$7") = (long) arg4; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "lw\t$2, %6\n\t" \
"subu\t$29, 32\n\t" \
- "sw\t$2, 16($29)\n\t" \
+ "sw\t%6, 16($29)\n\t" \
"li\t$2, %5\t\t\t# " #name "\n\t" \
"syscall\n\t" \
"addiu\t$29, 32\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "m" ((long)arg5) \
+ "r" ((long)arg5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -223,18 +222,16 @@
register long __a3 asm("$7") = (long) arg4; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "lw\t$2, %6\n\t" \
- "lw\t$8, %7\n\t" \
"subu\t$29, 32\n\t" \
- "sw\t$2, 16($29)\n\t" \
- "sw\t$8, 20($29)\n\t" \
+ "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 20($29)\n\t" \
"li\t$2, %5\t\t\t# " #name "\n\t" \
"syscall\n\t" \
"addiu\t$29, 32\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "m" ((long)arg5), "m" ((long)arg6) \
+ "r" ((long)arg5), "r" ((long)arg6) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -254,20 +251,17 @@
register long __a3 asm("$7") = (long) arg4; \
__asm__ volatile ( \
".set\tnoreorder\n\t" \
- "lw\t$2, %6\n\t" \
- "lw\t$8, %7\n\t" \
- "lw\t$9, %8\n\t" \
"subu\t$29, 32\n\t" \
- "sw\t$2, 16($29)\n\t" \
- "sw\t$8, 20($29)\n\t" \
- "sw\t$9, 24($29)\n\t" \
+ "sw\t%6, 16($29)\n\t" \
+ "sw\t%7, 20($29)\n\t" \
+ "sw\t%8, 24($29)\n\t" \
"li\t$2, %5\t\t\t# " #name "\n\t" \
"syscall\n\t" \
"addiu\t$29, 32\n\t" \
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "m" ((long)arg5), "m" ((long)arg6), "m" ((long)arg7) \
+ "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd9fad095a16ea27dbf38037d4d7a7d066407f44
commit bd9fad095a16ea27dbf38037d4d7a7d066407f44
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 07:47:27 2005 +0000
(elf_machine_runtime_link_map, ELF_DL_FRAME_SIZE,
ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS,
ELF_MACHINE_RUNTIME_TRAMPOLINE): Move to dl-trampoline.c.
(RTLD_START): Align the stack before calling _dl_init_internal.
Use .ent for _dl_start_user.
(ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define.
(elf_machine_rel, elf_machine_rel_relative, elf_machine_lazy_rel)
(elf_machine_runtime_setup): Use "auto inline".
(elf_machine_rela, elf_machine_rela_relative): Provide empty versions.
(elf_machine_got_rel): Likewise. Use RESOLVE_MAP.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 0d87b65..a8a41ff 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -188,248 +188,6 @@ do { \
} while(0)
-/* Get link map for callers object containing STUB_PC. */
-static inline struct link_map *
-elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
-{
- extern int _dl_mips_gnu_objects;
-
- /* got[1] is reserved to keep its link map address for the shared
- object generated by the gnu linker. If all are such objects, we
- can find the link map from current GPREG simply. If not so, get
- the link map for caller's object containing STUB_PC. */
-
- if (_dl_mips_gnu_objects)
- {
- ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
- ElfW(Word) g1;
-
- g1 = ((ElfW(Word) *) got)[1];
-
- if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
- {
- struct link_map *l =
- (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
- ElfW(Addr) base, limit;
- const ElfW(Phdr) *p = l->l_phdr;
- ElfW(Half) this, nent = l->l_phnum;
-
- /* For the common case of a stub being called from the containing
- object, STUB_PC will point to somewhere within the object that
- is described by the link map fetched via got[1]. Otherwise we
- have to scan all maps. */
- for (this = 0; this < nent; this++)
- {
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- limit = base + p[this].p_memsz;
- if (stub_pc >= base && stub_pc < limit)
- return l;
- }
- }
- }
- }
-
- struct link_map *l;
- Lmid_t nsid;
-
- for (nsid = 0; nsid < DL_NNS; ++nsid)
- for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
- {
- ElfW(Addr) base, limit;
- const ElfW(Phdr) *p = l->l_phdr;
- ElfW(Half) this, nent = l->l_phnum;
-
- for (this = 0; this < nent; ++this)
- {
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- limit = base + p[this].p_memsz;
- if (stub_pc >= base && stub_pc < limit)
- return l;
- }
- }
- }
-
- _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
- return NULL;
-}
-
-#if _MIPS_SIM == _ABIO32
-#define ELF_DL_FRAME_SIZE 40
-
-#define ELF_DL_SAVE_ARG_REGS "\
- sw $15, 36($29)\n \
- sw $4, 16($29)\n \
- sw $5, 20($29)\n \
- sw $6, 24($29)\n \
- sw $7, 28($29)\n \
-"
-
-#define ELF_DL_RESTORE_ARG_REGS "\
- lw $31, 36($29)\n \
- lw $4, 16($29)\n \
- lw $5, 20($29)\n \
- lw $6, 24($29)\n \
- lw $7, 28($29)\n \
-"
-
-#define IFABIO32(X) X
-
-#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */
-
-#define ELF_DL_FRAME_SIZE 80
-
-#define ELF_DL_SAVE_ARG_REGS "\
- sd $15, 72($29)\n \
- sd $4, 8($29)\n \
- sd $5, 16($29)\n \
- sd $6, 24($29)\n \
- sd $7, 32($29)\n \
- sd $8, 40($29)\n \
- sd $9, 48($29)\n \
- sd $10, 56($29)\n \
- sd $11, 64($29)\n \
-"
-
-#define ELF_DL_RESTORE_ARG_REGS "\
- ld $31, 72($29)\n \
- ld $4, 8($29)\n \
- ld $5, 16($29)\n \
- ld $6, 24($29)\n \
- ld $7, 32($29)\n \
- ld $8, 40($29)\n \
- ld $9, 48($29)\n \
- ld $10, 56($29)\n \
- ld $11, 64($29)\n \
-"
-
-#define IFABIO32(X)
-
-#endif
-
-/* Define mips specific runtime resolver. The function __dl_runtime_resolve
- is called from assembler function _dl_runtime_resolve which converts
- special argument registers t7 ($15) and t8 ($24):
- t7 address to return to the caller of the function
- t8 index for this function symbol in .dynsym
- to usual c arguments.
-
- Other architectures call fixup from dl-runtime.c in
- _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
- have to use our own version because of the way the got section is
- treated on MIPS (we've also got ELF_MACHINE_PLT defined). */
-
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
- generated by the gnu linker. */ \
-int _dl_mips_gnu_objects = 1; \
- \
-/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute_used__; \
- \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word) sym_index, \
- ElfW(Word) return_address, \
- ElfW(Addr) old_gpreg, \
- ElfW(Addr) stub_pc) \
-{ \
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
- const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \
- const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
- ElfW(Addr) *got \
- = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
- const ElfW(Word) local_gotno \
- = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
- const ElfW(Word) gotsym \
- = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
- const ElfW(Sym) *sym = &symtab[sym_index]; \
- ElfW(Addr) value; \
- \
- /* FIXME: The symbol versioning stuff is not tested yet. */ \
- if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \
- { \
- switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
- { \
- default: \
- { \
- const ElfW(Half) *vernum = \
- (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \
- ElfW(Half) ndx = vernum[sym_index] & 0x7fff; \
- const struct r_found_version *version = &l->l_versions[ndx]; \
- \
- if (version->hash != 0) \
- { \
- value = _dl_lookup_symbol_x (strtab + sym->st_name, l, \
- &sym, l->l_scope, version, \
- ELF_RTYPE_CLASS_PLT, 0, 0); \
- break; \
- } \
- /* Fall through. */ \
- } \
- case 0: \
- value = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, \
- l->l_scope, 0, ELF_RTYPE_CLASS_PLT, \
- DL_LOOKUP_ADD_DEPENDENCY, 0); \
- } \
- \
- /* Currently value contains the base load address of the object \
- that defines sym. Now add in the symbol offset. */ \
- value = (sym ? value + sym->st_value : 0); \
- } \
- else \
- /* We already found the symbol. The module (and therefore its load \
- address) is also known. */ \
- value = l->l_addr + sym->st_value; \
- \
- /* Apply the relocation with that value. */ \
- *(got + local_gotno + sym_index - gotsym) = value; \
- \
- return value; \
-} \
- \
-asm ("\n \
- .text\n \
- .align 2\n \
- .globl _dl_runtime_resolve\n \
- .type _dl_runtime_resolve,@function\n \
- .ent _dl_runtime_resolve\n \
-_dl_runtime_resolve:\n \
- .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n \
- .set noreorder\n \
- # Save GP.\n \
- move $3, $28\n \
- # Save arguments and sp value in stack.\n \
- " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \
- # Modify t9 ($25) so as to point .cpload instruction.\n \
- " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") " \
- # Compute GP.\n \
- " STRINGXP(SETUP_GP) "\n \
- " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n \
- .set reorder\n \
- # Save slot call pc.\n \
- move $2, $31\n \
- " IFABIO32(STRINGXP(CPRESTORE(32))) "\n \
- " ELF_DL_SAVE_ARG_REGS " \
- move $4, $24\n \
- move $5, $15\n \
- move $6, $3\n \
- move $7, $2\n \
- jal __dl_runtime_resolve\n \
- " ELF_DL_RESTORE_ARG_REGS " \
- " STRINGXP(RESTORE_GP64) "\n \
- " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \
- move $25, $2\n \
- jr $25\n \
- .end _dl_runtime_resolve\n \
- .previous\n \
-");
-
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
@@ -451,8 +209,8 @@ _dl_runtime_resolve:\n \
and not just plain _start. */
#define RTLD_START asm (\
- ".text\n"\
- _RTLD_PROLOGUE(ENTRY_POINT) "\
+ ".text\n\
+ " _RTLD_PROLOGUE(ENTRY_POINT) "\
" STRINGXV(SETUP_GPX($25)) "\n\
" STRINGXV(SETUP_GPX64($18,$25)) "\n\
# i386 ABI book says that the first entry of GOT holds\n\
@@ -475,10 +233,10 @@ _dl_runtime_resolve:\n \
" STRINGXP(PTR_ADDIU) " $29, 16\n\
# Get the value of label '_dl_start_user' in t9 ($25).\n\
" STRINGXP(PTR_LA) " $25, _dl_start_user\n\
- .globl _dl_start_user\n\
- .type _dl_start_user,@function\n\
- .aent _dl_start_user\n\
-_dl_start_user:\n\
+ " _RTLD_EPILOGUE(ENTRY_POINT) "\
+ \n\
+ \n\
+ " _RTLD_PROLOGUE(_dl_start_user) "\
" STRINGXP(SETUP_GP) "\n\
" STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
move $16, $28\n\
@@ -504,34 +262,48 @@ _dl_start_user:\n\
sll $7, $5, " STRINGXP (PTRLOG) "\n\
" STRINGXP(PTR_ADDU) " $7, $7, $6\n\
" STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
- " STRINGXP(PTR_SUBIU) " $29, 32\n\
+ # Make sure the stack pointer is aligned for _dl_init_internal.\n\
+ and $2, $29, -2 * " STRINGXP(SZREG) "\n\
+ " STRINGXP(PTR_S) " $29, -4($2)\n\
+ " STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
" STRINGXP(SAVE_GP(16)) "\n\
# Call the function to run the initializers.\n\
jal _dl_init_internal\n\
- " STRINGXP(PTR_ADDIU) " $29, 32\n\
+ # Restore the stack pointer for _start.\n\
+ " STRINGXP(PTR_L) " $29, 28($29)\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
jr $25\n\t"\
- _RTLD_EPILOGUE(ENTRY_POINT)\
+ _RTLD_EPILOGUE(_dl_start_user)\
".previous"\
);
/* The MIPS never uses Elfxx_Rela relocations. */
#define ELF_MACHINE_NO_RELA 1
+/* Names of the architecture-specific auditing callback functions. */
+# if _MIPS_SIM == _ABIO32
+# define ARCH_LA_PLTENTER mips_o32_gnu_pltenter
+# define ARCH_LA_PLTEXIT mips_o32_gnu_pltexit
+# elif _MIPS_SIM == _ABIN32
+# define ARCH_LA_PLTENTER mips_n32_gnu_pltenter
+# define ARCH_LA_PLTEXIT mips_n32_gnu_pltexit
+# else
+# define ARCH_LA_PLTENTER mips_n64_gnu_pltenter
+# define ARCH_LA_PLTEXIT mips_n64_gnu_pltexit
+# endif
+
#endif /* !dl_machine_h */
-#ifdef RESOLVE
+#ifdef RESOLVE_MAP
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void
-#ifdef RTLD_BOOTSTRAP
- __attribute__ ((always_inline))
-#endif
+auto inline void
+__attribute__ ((always_inline))
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *const reloc_addr)
@@ -635,23 +407,41 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
}
-static inline void
+auto inline void
+__attribute__((always_inline))
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
void *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
-static inline void
+auto inline void
+__attribute__((always_inline))
elf_machine_lazy_rel (struct link_map *map,
ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
/* Do nothing. */
}
+auto inline void
+__attribute__ ((always_inline))
+elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ void *const reloc_addr)
+{
+}
+
+auto inline void
+__attribute__((always_inline))
+elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
+ void *const reloc_addr)
+{
+}
+
#ifndef RTLD_BOOTSTRAP
/* Relocate GOT. */
-static inline void
+auto inline void
+__attribute__((always_inline))
elf_machine_got_rel (struct link_map *map, int lazy)
{
ElfW(Addr) *got;
@@ -664,9 +454,9 @@ elf_machine_got_rel (struct link_map *map, int lazy)
const ElfW(Sym) *ref = sym; \
const struct r_found_version *version \
= vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \
- ElfW(Addr) value; \
- value = RESOLVE (&ref, version, R_MIPS_REL32); \
- (ref)? value + ref->st_value: 0; \
+ struct link_map *sym_map; \
+ sym_map = RESOLVE_MAP (&ref, version, R_MIPS_REL32); \
+ ref ? sym_map->l_addr + ref->st_value : 0; \
})
if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
@@ -738,7 +528,8 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Set up the loaded object described by L so its stub function
will jump to the on-demand fixup code __dl_runtime_resolve. */
-static inline int
+auto inline int
+__attribute__((always_inline))
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
# ifndef RTLD_BOOTSTRAP
@@ -774,4 +565,4 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
-#endif /* RESOLVE */
+#endif /* RESOLVE_MAP */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43dbf87f2078806865fe82d11287dd14d81dc135
commit 43dbf87f2078806865fe82d11287dd14d81dc135
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 07:44:17 2005 +0000
MIPS specific dl-trampoline.c.
diff --git a/sysdeps/mips/dl-trampoline.c b/sysdeps/mips/dl-trampoline.c
new file mode 100644
index 0000000..c5ea59c
--- /dev/null
+++ b/sysdeps/mips/dl-trampoline.c
@@ -0,0 +1,272 @@
+/* PLT trampoline. MIPS version.
+ Copyright (C) 1996-2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* FIXME: Profiling of shared libraries is not implemented yet. */
+
+#include <sysdep.h>
+#include <link.h>
+#include <elf.h>
+#include <ldsodefs.h>
+#include <dl-machine.h>
+
+/* Get link map for callers object containing STUB_PC. */
+static inline struct link_map *
+elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
+{
+ extern int _dl_mips_gnu_objects;
+
+ /* got[1] is reserved to keep its link map address for the shared
+ object generated by the gnu linker. If all are such objects, we
+ can find the link map from current GPREG simply. If not so, get
+ the link map for caller's object containing STUB_PC. */
+
+ if (_dl_mips_gnu_objects)
+ {
+ ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
+ ElfW(Word) g1;
+
+ g1 = ((ElfW(Word) *) got)[1];
+
+ if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ {
+ struct link_map *l =
+ (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ ElfW(Addr) base, limit;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ /* For the common case of a stub being called from the containing
+ object, STUB_PC will point to somewhere within the object that
+ is described by the link map fetched via got[1]. Otherwise we
+ have to scan all maps. */
+ for (this = 0; this < nent; this++)
+ {
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
+ }
+ }
+ }
+
+ struct link_map *l;
+ Lmid_t nsid;
+
+ for (nsid = 0; nsid < DL_NNS; ++nsid)
+ for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
+ {
+ ElfW(Addr) base, limit;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ for (this = 0; this < nent; ++this)
+ {
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
+ }
+ }
+
+ _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
+ return NULL;
+}
+
+/* Define mips specific runtime resolver. The function __dl_runtime_resolve
+ is called from assembler function _dl_runtime_resolve which converts
+ special argument registers t7 ($15) and t8 ($24):
+ t7 address to return to the caller of the function
+ t8 index for this function symbol in .dynsym
+ to usual c arguments.
+
+ Other architectures call fixup from dl-runtime.c in
+ _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
+ have to use our own version because of the way the got section is
+ treated on MIPS (we've also got ELF_MACHINE_PLT defined). */
+
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are
+ generated by the gnu linker. */
+int _dl_mips_gnu_objects = 1;
+
+#define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
+
+/* This is called from assembly stubs below which the compiler can't see. */
+static ElfW(Addr)
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr))
+ __attribute_used__;
+
+static ElfW(Addr)
+__dl_runtime_resolve (ElfW(Word) sym_index,
+ ElfW(Word) return_address,
+ ElfW(Addr) old_gpreg,
+ ElfW(Addr) stub_pc)
+{
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);
+ const ElfW(Sym) *const symtab
+ = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]);
+ const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
+ ElfW(Addr) *got
+ = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
+ const ElfW(Word) local_gotno
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
+ const ElfW(Word) gotsym
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ const ElfW(Sym) *sym = &symtab[sym_index];
+ struct link_map *sym_map;
+ ElfW(Addr) value;
+
+ /* FIXME: The symbol versioning stuff is not tested yet. */
+ if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0)
+ {
+ switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
+ {
+ default:
+ {
+ const ElfW(Half) *vernum =
+ (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]);
+ ElfW(Half) ndx = vernum[sym_index] & 0x7fff;
+ const struct r_found_version *version = &l->l_versions[ndx];
+
+ if (version->hash != 0)
+ {
+ sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l,
+ &sym, l->l_scope, version,
+ ELF_RTYPE_CLASS_PLT, 0, 0);
+ break;
+ }
+ /* Fall through. */
+ }
+ case 0:
+ sym_map = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym,
+ l->l_scope, 0, ELF_RTYPE_CLASS_PLT,
+ DL_LOOKUP_ADD_DEPENDENCY, 0);
+ }
+
+ /* Currently value contains the base load address of the object
+ that defines sym. Now add in the symbol offset. */
+ value = (sym ? sym_map->l_addr + sym->st_value : 0);
+ }
+ else
+ /* We already found the symbol. The module (and therefore its load
+ address) is also known. */
+ value = l->l_addr + sym->st_value;
+
+ /* Apply the relocation with that value. */
+ *(got + local_gotno + sym_index - gotsym) = value;
+
+ return value;
+}
+
+#if _MIPS_SIM == _ABIO32
+#define ELF_DL_FRAME_SIZE 40
+
+#define ELF_DL_SAVE_ARG_REGS "\
+ sw $15, 36($29)\n \
+ sw $4, 16($29)\n \
+ sw $5, 20($29)\n \
+ sw $6, 24($29)\n \
+ sw $7, 28($29)\n \
+"
+
+#define ELF_DL_RESTORE_ARG_REGS "\
+ lw $31, 36($29)\n \
+ lw $4, 16($29)\n \
+ lw $5, 20($29)\n \
+ lw $6, 24($29)\n \
+ lw $7, 28($29)\n \
+"
+
+#define IFABIO32(X) X
+
+#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */
+
+#define ELF_DL_FRAME_SIZE 80
+
+#define ELF_DL_SAVE_ARG_REGS "\
+ sd $15, 72($29)\n \
+ sd $4, 8($29)\n \
+ sd $5, 16($29)\n \
+ sd $6, 24($29)\n \
+ sd $7, 32($29)\n \
+ sd $8, 40($29)\n \
+ sd $9, 48($29)\n \
+ sd $10, 56($29)\n \
+ sd $11, 64($29)\n \
+"
+
+#define ELF_DL_RESTORE_ARG_REGS "\
+ ld $31, 72($29)\n \
+ ld $4, 8($29)\n \
+ ld $5, 16($29)\n \
+ ld $6, 24($29)\n \
+ ld $7, 32($29)\n \
+ ld $8, 40($29)\n \
+ ld $9, 48($29)\n \
+ ld $10, 56($29)\n \
+ ld $11, 64($29)\n \
+"
+
+#define IFABIO32(X)
+
+#endif
+
+asm ("\n\
+ .text\n\
+ .align 2\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve,@function\n\
+ .ent _dl_runtime_resolve\n\
+_dl_runtime_resolve:\n\
+ .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n\
+ .set noreorder\n\
+ # Save GP.\n\
+ move $3, $28\n\
+ # Save arguments and sp value in stack.\n\
+ " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\
+ # Modify t9 ($25) so as to point .cpload instruction.\n\
+ " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") "\
+ # Compute GP.\n\
+ " STRINGXP(SETUP_GP) "\n\
+ " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n\
+ .set reorder\n\
+ # Save slot call pc.\n\
+ move $2, $31\n\
+ " IFABIO32(STRINGXP(CPRESTORE(32))) "\n\
+ " ELF_DL_SAVE_ARG_REGS "\
+ move $4, $24\n\
+ move $5, $15\n\
+ move $6, $3\n\
+ move $7, $2\n\
+ jal __dl_runtime_resolve\n\
+ " ELF_DL_RESTORE_ARG_REGS "\
+ " STRINGXP(RESTORE_GP64) "\n\
+ " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n\
+ move $25, $2\n\
+ jr $25\n\
+ .end _dl_runtime_resolve\n\
+ .previous\n\
+");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5e233c54ec3528cffc638e0f088f147aeab167b
commit f5e233c54ec3528cffc638e0f088f147aeab167b
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Mar 28 07:43:51 2005 +0000
MIPS specific <bits/link.h>
diff --git a/sysdeps/mips/bits/link.h b/sysdeps/mips/bits/link.h
new file mode 100644
index 0000000..3d77a4c
--- /dev/null
+++ b/sysdeps/mips/bits/link.h
@@ -0,0 +1,118 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+#include <sgidefs.h>
+
+#if _MIPS_SIM == _ABIO32
+
+/* Registers for entry into PLT on MIPS. */
+typedef struct La_mips_32_regs
+{
+ uint32_t lr_reg[4]; /* $a0 through $a3 */
+ double lr_fpreg[2]; /* $f12 and $f14 */
+ uint32_t lr_ra;
+ uint32_t lr_sp;
+} La_mips_32_regs;
+
+/* Return values for calls from PLT on MIPS. */
+typedef struct La_mips_32_retval
+{
+ uint32_t lrv_v0;
+ uint32_t lrv_v1;
+ double lrv_f0;
+ double lrv_f2;
+} La_mips_32_retval;
+
+#else
+
+typedef struct La_mips_64_regs
+{
+ uint64_t lr_reg[8]; /* $a0 through $a7 */
+ double lr_fpreg[8]; /* $f12 throgh $f19 */
+ uint64_t lr_ra;
+ uint64_t lr_sp;
+} La_mips_64_regs;
+
+/* Return values for calls from PLT on MIPS. */
+typedef struct La_mips_64_retval
+{
+ uint64_t lrv_v0;
+ uint64_t lrv_v1;
+ double lrv_f0;
+ double lrv_f2;
+} La_mips_64_retval;
+
+#endif
+
+__BEGIN_DECLS
+
+#if _MIPS_SIM == _ABIO32
+
+extern Elf32_Addr la_mips_o32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_mips_32_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_mips_32_regs *__inregs,
+ La_mips_32_retval *__outregs,
+ const char *symname);
+
+#elif _MIPS_SIM == _ABIN32
+
+extern Elf32_Addr la_mips_n32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_mips_64_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_mips_64_regs *__inregs,
+ La_mips_64_retval *__outregs,
+ const char *symname);
+
+#else
+
+extern Elf64_Addr la_mips_n64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_mips_64_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_mips_64_regs *__inregs,
+ La_mips_64_retval *__outregs,
+ const char *symname);
+
+#endif
+
+__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86462436329531f91dd2b97442b455443831819b
commit 86462436329531f91dd2b97442b455443831819b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 20 04:30:28 2005 +0000
Add __USE_MISC and __USE_XOPEN guards to match linux/bits/termios.h.
(CMSPAR): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index f26e84c..966ccf9 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. Linux version.
- Copyright (C) 1993,1994,1995,1996,1997,1999,2003
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2003, 2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -91,34 +91,42 @@ struct termios
#define OFILL 00000100
#define OFDEL 00000200
-#define NLDLY 00001400
-#define NL0 00000000
-#define NL1 00000400
-#define NL2 00001000
-#define NL3 00001400
-#define TABDLY 00006000
-#define TAB0 00000000
-#define TAB1 00002000
-#define TAB2 00004000
-#define TAB3 00006000
-#define CRDLY 00030000
-#define CR0 00000000
-#define CR1 00010000
-#define CR2 00020000
-#define CR3 00030000
-#define FFDLY 00040000
-#define FF0 00000000
-#define FF1 00040000
-#define BSDLY 00100000
-#define BS0 00000000
-#define BS1 00100000
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 00001400
+# define NL0 00000000
+# define NL1 00000400
+# define NL2 00001000
+# define NL3 00001400
+# define TABDLY 00006000
+# define TAB0 00000000
+# define TAB1 00002000
+# define TAB2 00004000
+# define TAB3 00006000
+# define CRDLY 00030000
+# define CR0 00000000
+# define CR1 00010000
+# define CR2 00020000
+# define CR3 00030000
+# define FFDLY 00040000
+# define FF0 00000000
+# define FF1 00040000
+# define BSDLY 00100000
+# define BS0 00000000
+# define BS1 00100000
+#endif
+
#define VTDLY 00200000
#define VT0 00000000
#define VT1 00200000
-#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+
+#ifdef __USE_MISC
+# define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+#endif
/* c_cflag bit meaning */
-#define CBAUD 0000037
+#ifdef __USE_MISC
+# define CBAUD 0000037
+#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -135,9 +143,11 @@ struct termios
#define B9600 0000015
#define B19200 0000016
#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CBAUDEX 0000000
+#ifdef __USE_MISC
+# define EXTA B19200
+# define EXTB B38400
+# define CBAUDEX 0000000
+#endif
#define B57600 00020
#define B115200 00021
#define B230400 00022
@@ -169,23 +179,30 @@ struct termios
#define HUPCL 00040000
#define CLOCAL 00100000
-#define CRTSCTS 020000000000 /* flow control */
+#ifdef __USE_MISC
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
/* c_lflag bits */
#define ISIG 0x00000080
#define ICANON 0x00000100
-#define XCASE 0x00004000
+#if defined __USE_MISC || defined __USE_XOPEN
+# define XCASE 0x00004000
+#endif
#define ECHO 0x00000008
#define ECHOE 0x00000002
#define ECHOK 0x00000004
#define ECHONL 0x00000010
#define NOFLSH 0x80000000
#define TOSTOP 0x00400000
-#define ECHOCTL 0x00000040
-#define ECHOPRT 0x00000020
-#define ECHOKE 0x00000001
-#define FLUSHO 0x00800000
-#define PENDIN 0x20000000
+#ifdef __USE_MISC
+# define ECHOCTL 0x00000040
+# define ECHOPRT 0x00000020
+# define ECHOKE 0x00000001
+# define FLUSHO 0x00800000
+# define PENDIN 0x20000000
+#endif
#define IEXTEN 0x00000400
/* Values for the ACTION argument to `tcflow'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b25b6ab543c0350446a7b78c0dc7820f2d97dcc
commit 5b25b6ab543c0350446a7b78c0dc7820f2d97dcc
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 17 00:32:10 2005 +0000
Finish remove not committed properly
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
deleted file mode 100644
index e69de29..0000000
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dda081dd500405f6eb281444138e4a8fea229637
commit dda081dd500405f6eb281444138e4a8fea229637
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 15 22:57:26 2005 +0000
2005-03-15 Jakub Jelinek <jakub@redhat.com>
* elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative,
elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel):
Add inline keyword.
* sysdeps/alpha/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline
attribute.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change
static inline into auto inline.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
* sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela):
Likewise.
* sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative,
elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel):
Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 4166e8c..173a411 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -376,6 +376,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
auto inline void
+__attribute__ ((always_inline))
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
@@ -504,6 +505,7 @@ elf_machine_rela (struct link_map *map,
#define ELF_MACHINE_REL_RELATIVE 1
auto inline void
+__attribute__ ((always_inline))
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
void *const reloc_addr_arg)
{
@@ -520,6 +522,7 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
}
auto inline void
+__attribute__ ((always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index b85b4f1..0fe47b2 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -391,7 +391,8 @@ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void
+auto inline void
+__attribute__ ((always_inline))
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
void *const reloc_addr_arg)
@@ -516,7 +517,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
# ifndef RTLD_BOOTSTRAP
-static inline void
+auto inline void
+__attribute__ ((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
void *const reloc_addr_arg)
@@ -596,7 +598,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
# endif
-static inline void
+auto inline void
+__attribute__ ((always_inline))
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
void *const reloc_addr_arg)
{
@@ -605,7 +608,8 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
}
# ifndef RTLD_BOOTSTRAP
-static inline void
+auto inline void
+__attribute__ ((always_inline))
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
void *const reloc_addr_arg)
{
@@ -614,7 +618,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
}
# endif
-static inline void
+auto inline void
+__attribute__ ((always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rel *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d48195c9fb478d825cc04e93fd0ea1b8f2cccfa
commit 2d48195c9fb478d825cc04e93fd0ea1b8f2cccfa
Author: Roland McGrath <roland@gnu.org>
Date: Sun Mar 13 03:27:22 2005 +0000
2005-03-10 GOTO Masanori <gotom@debian.or.jp>
* sysdeps/hppa/configure.in: Remove old Makefile leftovers.
* sysdeps/hppa/configure: Regenerated.
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index 07bde0e..bc01e46 100644
--- a/sysdeps/hppa/configure
+++ b/sysdeps/hppa/configure
@@ -1,6 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-hppa*linux*)
echo "$as_me:$LINENO: checking for assembler line separator" >&5
echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6
if test "${libc_cv_asm_line_sep+set}" = set; then
diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in
index 1ec6780..1ec417b 100644
--- a/sysdeps/hppa/configure.in
+++ b/sysdeps/hppa/configure.in
@@ -2,7 +2,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
dnl The standard hppa assembler uses `;' to start comments and `!'
dnl as a line separator.
-hppa*linux*)
AC_CACHE_CHECK(for assembler line separator,
libc_cv_asm_line_sep, [dnl
cat > conftest.s <<EOF
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=816c550ea586fe871bd3baa33e42a9c284f5cdc8
commit 816c550ea586fe871bd3baa33e42a9c284f5cdc8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 6 00:07:58 2005 +0000
(ELF_MACHINE_NO_RELA): Define unconditionally to defined RTLD_BOOTSTRAP.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index e8015ac..b85b4f1 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -353,9 +353,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
/* ARM never uses Elf32_Rela relocations for the dynamic linker.
Prelinked libraries may use Elf32_Rela though. */
-#ifdef RTLD_BOOTSTRAP
-# define ELF_MACHINE_NO_RELA 1
-#endif
+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
#ifdef RESOLVE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c5cb341b7214beaba08096180729020d7a543b91
commit c5cb341b7214beaba08096180729020d7a543b91
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 1 20:34:40 2005 +0000
2005-03-01 Roland McGrath <roland@redhat.com>
[BZ #721]
* sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside
of [RESOLVE_MAP].
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 761f8da..e8015ac 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -350,13 +350,14 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
#endif /* !dl_machine_h */
-#ifdef RESOLVE
/* ARM never uses Elf32_Rela relocations for the dynamic linker.
Prelinked libraries may use Elf32_Rela though. */
-# ifdef RTLD_BOOTSTRAP
-# define ELF_MACHINE_NO_RELA 1
-# endif
+#ifdef RTLD_BOOTSTRAP
+# define ELF_MACHINE_NO_RELA 1
+#endif
+
+#ifdef RESOLVE
/* Deal with an out-of-range PC24 reloc. */
static Elf32_Addr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68f3ec56719c41f72b8212c3f9daaa0ec8080ff7
commit 68f3ec56719c41f72b8212c3f9daaa0ec8080ff7
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 25 15:18:13 2005 +0000
2004-11-11 Richard Sandiford <rsandifo@redhat.com>
[BZ #758]
* sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): Only
preprocess <asm/unistd.h> if it defines ABI-prefixed syscall names
like __NR_N32_open. Just include <asm/unistd.h> otherwise.
* sysdeps/unix/sysv/linux/mips/configure: Regenerate.
* sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: Delete
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (SYS_ify): Use the
standard __NR prefix.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (SYS_ify): Likewise.
* sysdeps/unix/sysv/linux/mips/Makefile (syscall-%.h): Rework so that
the output file is compatible with both pre-2.6 and 2.6 kernel headers.
Extract separate syscall lists for each ABI.
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index d5e4f6b..72fa87b 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -9,11 +9,73 @@ sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
no_syscall_list_h = 1
-# Generate the list of SYS_* macros for the system calls (__NR_* macros).
-# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
-# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
+# A callable macro that expands to a shell command. Preprocess file $(1)
+# using ABI option $(2) and see which macros it defines. Print FOO for each
+# macro of the form __NR$(3)_FOO, filtering out ABI-specific __NR macros
+# that have a prefix other than $(3).
+mips_list_syscalls = $(filter-out -m%,$(CC)) -E -x c $(+includes) \
+ $(sysincludes) -D_LIBC -dM -mabi=$(2) $(1) | \
+ sed -n 's@^\#define __NR$(3)_\([^ ]*\) .*@\1@p' | \
+ sed -e '/^[ON]32_/d' -e '/^N64_/d' -e '/^64_/d' | \
+ LC_ALL=C sort
+
+# Generate a list of SYS_* macros from the linux __NR macros.
+#
+# Before version 2.6, linux had separate 32-bit and 64-bit MIPS ports,
+# each with its own set of headers. The ports were merged for 2.6 and
+# this merged port defines the syscalls in a slightly different way.
+# There are therefore three sets of headers that we need to consider:
+#
+# (1) Headers from the separate 32-bit MIPS port. They just define
+# a single list of __NR macros.
+#
+# (2) Headers from the separate 64-bit MIPS port. They unconditionally
+# define syscalls for all three ABIs, with o32 syscalls prefixed
+# by __NR_O32, n32 syscalls prefixed by __NR_N32 and n64 syscalls
+# prefixed by plain __NR.
+#
+# (3) Headers from the combined port. They use the _MIPS_SIM macro to
+# define the right set of syscalls for the current ABI. The syscalls
+# themselves have no special ABI prefix, but the headers also define:
+#
+# __NR_O32_Linux{,_syscalls}
+# __NR_N32_Linux{,_syscalls}
+# __NR_64_Linux{,_syscalls}
+#
+# In case (1) we just want a simple list of SYS_* macros. In cases (2)
+# and (3) we want a file that will work for all three ABIs, regardless
+# of which ABI we are currently using. We also want the file to work
+# if the user later moves from (2) to (3). Thus the file we create
+# for (2) and (3) has the form:
+#
+# #if _MIPS_SIM == _ABIN32
+# # ifdef __NR_N32_open
+# # define SYS_n32syscall1 __NR_N32_n32syscall1
+# # ...
+# # else
+# # define SYS_n32syscall1 __NR_n32syscall1
+# # ...
+# # endif
+# #elif _MIPS_SIM == _ABI64
+# # define SYS_n64syscall1 __NR_n64syscall1
+# # ...
+# #else
+# # ifdef __NR_O32_open
+# # define SYS_o32syscall1 __NR_O32_o32syscall1
+# # ...
+# # else
+# # define SYS_o32syscall1 __NR_o32syscall1
+# # ...
+# # endif
+# #endif
+#
+# Here, __NR_N32_open and __NR_O32_open are used to detect case (2)
+# over case (3). The n64 SYS_* macros can always use the normal
+# ABI-less names.
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
$(make-target-directory)
+ $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC $< -MD -MP \
+ -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' > /dev/null
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
echo ''; \
@@ -22,28 +84,38 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
echo '#endif'; \
echo ''; \
echo '#include <sgidefs.h>'; \
- rm -f $(@:.d=.h).newt; \
- $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
- -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
- sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
- > $(@:.d=.h).newt; \
- if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
+ rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
+ $(call mips_list_syscalls,$<,n32,_N32) > $(@:.d=.h).newn32; \
+ if test -s $(@:.d=.h).newn32; then \
+ if grep open $(@:.d=.h).newn32 > /dev/null; then \
+ $(call mips_list_syscalls,$<,32,_O32) > $(@:.d=.h).new32; \
+ $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
+ else \
+ $(call mips_list_syscalls,$<,32,) > $(@:.d=.h).new32; \
+ $(call mips_list_syscalls,$<,n32,) > $(@:.d=.h).newn32; \
+ $(call mips_list_syscalls,$<,64,) > $(@:.d=.h).new64; \
+ fi; \
echo '#if _MIPS_SIM == _ABIN32'; \
- sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
+ echo '# ifdef __NR_N32_open'; \
+ sed 's@\(.*\)@# define SYS_\1 __NR_N32_\1@' < $(@:.d=.h).newn32; \
+ echo '# else'; \
+ sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).newn32; \
+ echo '# endif'; \
echo '#elif _MIPS_SIM == _ABI64'; \
- sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
+ sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new64; \
echo '#else'; \
- sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort; \
+ echo '# ifdef __NR_O32_open'; \
+ sed 's@\(.*\)@# define SYS_\1 __NR_O32_\1@' < $(@:.d=.h).new32; \
+ echo '# else'; \
+ sed 's@\(.*\)@# define SYS_\1 __NR_\1@' < $(@:.d=.h).new32; \
+ echo '# endif'; \
echo '#endif'; \
- sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
- LC_ALL=C sort +1.8; \
else \
- cat $(@:.d=.h).newt; \
+ $(CC) -E -x c $(+includes) $(sysincludes) -D_LIBC -dM $< | \
+ sed -n 's@^\#define __NR_\([^ ]*\) .*@\#define SYS_\1 __NR_\1@p' | \
+ LC_ALL=C sort; \
fi; \
- rm $(@:.d=.h).newt; \
+ rm -f $(@:.d=.h).new32 $(@:.d=.h).newn32 $(@:.d=.h).new64; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
ifneq (,$(objpfx))
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index c081795..4d9568f 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -18,7 +18,7 @@ mips*64*)
{ echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
echo '#include <asm/unistd.h>' > asm-unistd.h
- else
+ elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
# The point of this preprocessing is to turn __NR_<syscall> into
# __NR_N64_<syscall>, as well as to define __NR_<syscall> to
# __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
@@ -68,6 +68,8 @@ BEGIN { print "#include <sgidefs.h>"; }
{
print;
}'
+ else
+ echo '#include <asm/unistd.h>' > asm-unistd.h
fi ;;
mips*)
rm -f asm-unistd.h
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index 67d965d..e2e5d16 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -18,7 +18,7 @@ mips*64*)
if test ! -f "$asm_unistd_h"; then
AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
echo '#include <asm/unistd.h>' > asm-unistd.h
- else
+ elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
# The point of this preprocessing is to turn __NR_<syscall> into
# __NR_N64_<syscall>, as well as to define __NR_<syscall> to
# __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
@@ -68,6 +68,8 @@ BEGIN { print "#include <sgidefs.h>"; }
{
print;
}'
+ else
+ echo '#include <asm/unistd.h>' > asm-unistd.h
fi ;;
mips*)
rm -f asm-unistd.h
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
index b0316b6..e69de29 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
@@ -1,36 +0,0 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H
-#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1
-
-/* There is some commonality. */
-#include <sysdeps/unix/sysv/linux/mips/mips32/sysdep.h>
-
-/* For Linux we can use the system call table in the header file
- /usr/include/asm/unistd.h
- of the kernel. But these symbols do not follow the SYS_* syntax
- so we have to redefine the `SYS_ify' macro here. */
-#undef SYS_ify
-#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_O32_##syscall_name
-#else
-# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name
-#endif
-
-#endif /* linux/mips/mips32/kern64/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index be343aa..e601366 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,9 +28,9 @@
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_N32_##syscall_name
+# define SYS_ify(syscall_name) __NR_##syscall_name
#else
-# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
#ifdef __ASSEMBLER__
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index f30a465..dc0a1a0 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,9 +28,9 @@
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
#ifdef __STDC__
-# define SYS_ify(syscall_name) __NR_N64_##syscall_name
+# define SYS_ify(syscall_name) __NR_##syscall_name
#else
-# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
#ifdef __ASSEMBLER__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=890e858b8cd49526a333df9653dd662e49575438
commit 890e858b8cd49526a333df9653dd662e49575438
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 15 00:12:18 2005 +0000
2005-02-14 GOTO Masanori <gotom@debian.or.jp>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove the duplicated
getpeername entry.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 3bbce1c..7b3f233 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -16,7 +16,6 @@ oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0
sigstack - sigstack 2 sigstack
vfork - vfork 0 __vfork vfork
-getpeername - getpeername i:ipp __getpeername getpeername
getpriority - getpriority i:ii __getpriority getpriority
open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64
open64 open -
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cab192c3ebfd5bbd45eec81549900a2bd1fcf2c
commit 8cab192c3ebfd5bbd45eec81549900a2bd1fcf2c
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Feb 8 20:02:24 2005 +0000
(elf_machine_rela): Remove use of
RESOLVE.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 89d7106..f31b687 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -211,15 +211,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
else
{
const Elf32_Sym *const refsym = sym;
-#ifndef RTLD_BOOTSTRAP
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
-#else
- Elf32_Addr value = RESOLVE (&sym, version, r_type);
-
- if (sym)
- value += sym->st_value;
-#endif /* !RTLD_BOOTSTRAP */
switch (r_type)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a795af472db9f3a4c46c23439fec724ba15c6e84
commit a795af472db9f3a4c46c23439fec724ba15c6e84
Author: Richard Henderson <rth@redhat.com>
Date: Tue Feb 8 04:37:48 2005 +0000
* math/math_private.h (__copysign): Define as builtin for gcc 4.
(__copysignf, __copysignl): Likewise.
* sysdeps/alpha/fpu/bits/mathinline.h (copysign): Don't define
for gcc 4.0.
(copysignf, copysignl, fabsf, fabs): Likewise.
(__copysign, __copysignf, __copysignl): Remove.
(__fabs, __fabsf): Remove.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 187bd42..87d4005 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -46,7 +46,8 @@
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
&& defined __OPTIMIZE__
-#define __inline_copysign(NAME, TYPE) \
+#if !__GNUC_PREREQ (4, 0)
+# define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
__NTH (NAME (TYPE __x, TYPE __y)) \
{ \
@@ -60,19 +61,11 @@ __inline_copysign (copysignf, float)
__inline_copysign (__copysign, double)
__inline_copysign (copysign, double)
-#undef __MATH_INLINE_copysign
+# undef __inline_copysign
+#endif
-#if __GNUC_PREREQ (2, 8)
-__MATH_INLINE float
-__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); }
-__MATH_INLINE float
-__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); }
-__MATH_INLINE double
-__NTH (__fabs (double __x)) { return __builtin_fabs (__x); }
-__MATH_INLINE double
-__NTH (fabs (double __x)) { return __builtin_fabs (__x); }
-#else
+#if !__GNUC_PREREQ (2, 8)
# define __inline_fabs(NAME, TYPE) \
__MATH_INLINE TYPE \
__NTH (NAME (TYPE __x)) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2aa0a6fafe2269b9b0458b021e4dd163548e28a9
commit 2aa0a6fafe2269b9b0458b021e4dd163548e28a9
Author: Richard Henderson <rth@redhat.com>
Date: Mon Feb 7 03:11:46 2005 +0000
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Use RESOLVE_MAP
all the time.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index fd2269b..4166e8c 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -423,26 +423,16 @@ elf_machine_rela (struct link_map *map,
return;
else
{
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
Elf64_Addr sym_value;
Elf64_Addr sym_raw_value;
-#if defined USE_TLS && !defined RTLD_BOOTSTRAP
- struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
sym_raw_value = sym_value = reloc->r_addend;
- if (sym)
+ if (sym_map)
{
sym_raw_value += sym->st_value;
sym_value = sym_raw_value + sym_map->l_addr;
}
-#else
- Elf64_Addr loadbase = RESOLVE (&sym, version, r_type);
- sym_raw_value = sym_value = reloc->r_addend;
- if (sym)
- {
- sym_raw_value += sym->st_value;
- sym_value = sym_raw_value + loadbase;
- }
-#endif
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9259ad13c309eca896ae5ef24f8402ac9bb7519e
commit 9259ad13c309eca896ae5ef24f8402ac9bb7519e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 27 20:52:04 2005 +0000
(__old_globfree): Also copy gl_offs.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index 9d39176..6d9b79f 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -91,6 +91,7 @@ __old_globfree (old_glob_t *pglob)
/* We only need these two symbols. */
correct.gl_pathc = pglob->gl_pathc;
correct.gl_pathv = pglob->gl_pathv;
+ correct.gl_offs = pglob->gl_offs;
globfree (&correct);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ba6212c8bcc820d49fb1c6f6bf4e3f4d497fa75
commit 1ba6212c8bcc820d49fb1c6f6bf4e3f4d497fa75
Author: Richard Henderson <rth@redhat.com>
Date: Sun Jan 23 08:02:38 2005 +0000
* sysdeps/alpha/dl-trampoline.S: New file.
* sysdeps/alpha/dl-machine.h: Move PLT trampolines there.
Use RESOLVE_MAP instead of RESOLVE to protect relocation code.
(elf_machine_runtime_setup): Test for dl_profile non-null.
(ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): New.
* sysdeps/alpha/bits/link.h: New file.
* sysdeps/generic/ldsodefs.h (La_alpha_regs, La_alpha_retval): New.
(struct audit_ifaces): Add alpha entries.
* elf/tst-auditmod1.c: Add alpha entries.
diff --git a/sysdeps/alpha/bits/link.h b/sysdeps/alpha/bits/link.h
new file mode 100644
index 0000000..429faff
--- /dev/null
+++ b/sysdeps/alpha/bits/link.h
@@ -0,0 +1,69 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+/* Registers for entry into PLT on Alpha. */
+typedef struct La_alpha_regs
+{
+ uint64_t lr_r26;
+ uint64_t lr_sp;
+ uint64_t lr_r16;
+ uint64_t lr_r17;
+ uint64_t lr_r18;
+ uint64_t lr_r19;
+ uint64_t lr_r20;
+ uint64_t lr_r21;
+ double lr_f16;
+ double lr_f17;
+ double lr_f18;
+ double lr_f19;
+ double lr_f20;
+ double lr_f21;
+} La_alpha_regs;
+
+/* Return values for calls from PLT on Alpha. */
+typedef struct La_alpha_retval
+{
+ uint64_t lrv_r0;
+ uint64_t lrv_r1;
+ double lrv_f0;
+ double lrv_f1;
+} La_alpha_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf64_Addr la_alpha_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_alpha_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_alpha_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_alpha_regs *__inregs,
+ La_alpha_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 780a3a5..fd2269b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -108,19 +108,20 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
plt = D_PTR (l, l_info[DT_PLTGOT]);
/* This function will be called to perform the relocation. */
- if (!profile)
- *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
- else
+ if (__builtin_expect (profile, 0))
{
*(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GLRO(dl_profile), l))
+ if (GLRO(dl_profile) != NULL
+ && _dl_name_match_p (GLRO(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
GL(dl_profile_map) = l;
}
}
+ else
+ *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
/* Identify this shared object */
*(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
@@ -156,143 +157,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
-/* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \
- extern void tramp_name (void); \
- asm ( "\
- .globl " #tramp_name " \n\
- .ent " #tramp_name " \n\
-" #tramp_name ": \n\
- lda $sp, -44*8($sp) \n\
- .frame $sp, 44*8, $26 \n\
- /* Preserve all integer registers that C normally \n\
- doesn't. */ \n\
- stq $26, 0*8($sp) \n\
- stq $0, 1*8($sp) \n\
- stq $1, 2*8($sp) \n\
- stq $2, 3*8($sp) \n\
- stq $3, 4*8($sp) \n\
- stq $4, 5*8($sp) \n\
- stq $5, 6*8($sp) \n\
- stq $6, 7*8($sp) \n\
- stq $7, 8*8($sp) \n\
- stq $8, 9*8($sp) \n\
- stq $16, 10*8($sp) \n\
- stq $17, 11*8($sp) \n\
- stq $18, 12*8($sp) \n\
- stq $19, 13*8($sp) \n\
- stq $20, 14*8($sp) \n\
- stq $21, 15*8($sp) \n\
- stq $22, 16*8($sp) \n\
- stq $23, 17*8($sp) \n\
- stq $24, 18*8($sp) \n\
- stq $25, 19*8($sp) \n\
- stq $29, 20*8($sp) \n\
- stt $f0, 21*8($sp) \n\
- stt $f1, 22*8($sp) \n\
- stt $f10, 23*8($sp) \n\
- stt $f11, 24*8($sp) \n\
- stt $f12, 25*8($sp) \n\
- stt $f13, 26*8($sp) \n\
- stt $f14, 27*8($sp) \n\
- stt $f15, 28*8($sp) \n\
- stt $f16, 29*8($sp) \n\
- stt $f17, 30*8($sp) \n\
- stt $f18, 31*8($sp) \n\
- stt $f19, 32*8($sp) \n\
- stt $f20, 33*8($sp) \n\
- stt $f21, 34*8($sp) \n\
- stt $f22, 35*8($sp) \n\
- stt $f23, 36*8($sp) \n\
- stt $f24, 37*8($sp) \n\
- stt $f25, 38*8($sp) \n\
- stt $f26, 39*8($sp) \n\
- stt $f27, 40*8($sp) \n\
- stt $f28, 41*8($sp) \n\
- stt $f29, 42*8($sp) \n\
- stt $f30, 43*8($sp) \n\
- .mask 0x27ff01ff, -44*8 \n\
- .fmask 0xfffffc03, -(44-21)*8 \n\
- /* Set up our $gp */ \n\
- br $gp, .+4 \n\
- ldgp $gp, 0($gp) \n\
- .prologue 0 \n\
- /* Set up the arguments for fixup: */ \n\
- /* $16 = link_map out of plt0 */ \n\
- /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */\n\
- /* $18 = return address */ \n\
- subq $28, $27, $17 \n\
- ldq $16, 8($27) \n\
- subq $17, 20, $17 \n\
- mov $26, $18 \n\
- addq $17, $17, $17 \n\
- /* Do the fixup */ \n\
- bsr $26, " #fixup_name " !samegp \n\
- /* Move the destination address into position. */ \n\
- mov $0, $27 \n\
- /* Restore program registers. */ \n\
- ldq $26, 0*8($sp) \n\
- ldq $0, 1*8($sp) \n\
- ldq $1, 2*8($sp) \n\
- ldq $2, 3*8($sp) \n\
- ldq $3, 4*8($sp) \n\
- ldq $4, 5*8($sp) \n\
- ldq $5, 6*8($sp) \n\
- ldq $6, 7*8($sp) \n\
- ldq $7, 8*8($sp) \n\
- ldq $8, 9*8($sp) \n\
- ldq $16, 10*8($sp) \n\
- ldq $17, 11*8($sp) \n\
- ldq $18, 12*8($sp) \n\
- ldq $19, 13*8($sp) \n\
- ldq $20, 14*8($sp) \n\
- ldq $21, 15*8($sp) \n\
- ldq $22, 16*8($sp) \n\
- ldq $23, 17*8($sp) \n\
- ldq $24, 18*8($sp) \n\
- ldq $25, 19*8($sp) \n\
- ldq $29, 20*8($sp) \n\
- ldt $f0, 21*8($sp) \n\
- ldt $f1, 22*8($sp) \n\
- ldt $f10, 23*8($sp) \n\
- ldt $f11, 24*8($sp) \n\
- ldt $f12, 25*8($sp) \n\
- ldt $f13, 26*8($sp) \n\
- ldt $f14, 27*8($sp) \n\
- ldt $f15, 28*8($sp) \n\
- ldt $f16, 29*8($sp) \n\
- ldt $f17, 30*8($sp) \n\
- ldt $f18, 31*8($sp) \n\
- ldt $f19, 32*8($sp) \n\
- ldt $f20, 33*8($sp) \n\
- ldt $f21, 34*8($sp) \n\
- ldt $f22, 35*8($sp) \n\
- ldt $f23, 36*8($sp) \n\
- ldt $f24, 37*8($sp) \n\
- ldt $f25, 38*8($sp) \n\
- ldt $f26, 39*8($sp) \n\
- ldt $f27, 40*8($sp) \n\
- ldt $f28, 41*8($sp) \n\
- ldt $f29, 42*8($sp) \n\
- ldt $f30, 43*8($sp) \n\
- /* Flush the Icache after having modified the .plt code. */\n\
- " #IMB " \n\
- /* Clean up and turn control to the destination */ \n\
- lda $sp, 44*8($sp) \n\
- jmp $31, ($27) \n\
- .end " #tramp_name)
-
-#ifndef PROF
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */);
-#else
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
-#endif
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -501,9 +365,13 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
return value + reloc->r_addend;
}
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER alpha_gnu_pltenter
+#define ARCH_LA_PLTEXIT alpha_gnu_pltexit
+
#endif /* !dl_machine_h */
-#ifdef RESOLVE
+#ifdef RESOLVE_MAP
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
@@ -680,4 +548,4 @@ elf_machine_lazy_rel (struct link_map *map,
_dl_reloc_bad_type (map, r_type, 1);
}
-#endif /* RESOLVE */
+#endif /* RESOLVE_MAP */
diff --git a/sysdeps/alpha/dl-trampoline.S b/sysdeps/alpha/dl-trampoline.S
new file mode 100644
index 0000000..4235083
--- /dev/null
+++ b/sysdeps/alpha/dl-trampoline.S
@@ -0,0 +1,361 @@
+/* PLT trampolines. Alpha version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .set noat
+
+ .globl _dl_runtime_resolve
+ .ent _dl_runtime_resolve
+
+#undef FRAMESIZE
+#define FRAMESIZE 44*8
+
+_dl_runtime_resolve:
+ lda $30, -FRAMESIZE($30)
+ .frame $30, FRAMESIZE, $26
+ /* Preserve all registers that C normally doesn't. */
+ stq $26, 0*8($30)
+ stq $0, 1*8($30)
+ stq $1, 2*8($30)
+ stq $2, 3*8($30)
+ stq $3, 4*8($30)
+ stq $4, 5*8($30)
+ stq $5, 6*8($30)
+ stq $6, 7*8($30)
+ stq $7, 8*8($30)
+ stq $8, 9*8($30)
+ stq $16, 10*8($30)
+ stq $17, 11*8($30)
+ stq $18, 12*8($30)
+ stq $19, 13*8($30)
+ stq $20, 14*8($30)
+ stq $21, 15*8($30)
+ stq $22, 16*8($30)
+ stq $23, 17*8($30)
+ stq $24, 18*8($30)
+ stq $25, 19*8($30)
+ stq $29, 20*8($30)
+ stt $f0, 21*8($30)
+ stt $f1, 22*8($30)
+ stt $f10, 23*8($30)
+ stt $f11, 24*8($30)
+ stt $f12, 25*8($30)
+ stt $f13, 26*8($30)
+ stt $f14, 27*8($30)
+ stt $f15, 28*8($30)
+ stt $f16, 29*8($30)
+ stt $f17, 30*8($30)
+ stt $f18, 31*8($30)
+ stt $f19, 32*8($30)
+ stt $f20, 33*8($30)
+ stt $f21, 34*8($30)
+ stt $f22, 35*8($30)
+ stt $f23, 36*8($30)
+ stt $f24, 37*8($30)
+ stt $f25, 38*8($30)
+ stt $f26, 39*8($30)
+ stt $f27, 40*8($30)
+ stt $f28, 41*8($30)
+ stt $f29, 42*8($30)
+ stt $f30, 43*8($30)
+ .mask 0x27ff01ff, -FRAMESIZE
+ .fmask 0xfffffc03, -FRAMESIZE+21*8
+ /* Set up our GP. */
+ br $29, .+4
+ ldgp $29, 0($29)
+ .prologue 0
+ /* Set up the arguments for _dl_fixup:
+ $16 = link_map out of plt0
+ $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24
+ $18 = return address
+ */
+ subq $28, $27, $17
+ ldq $16, 8($27)
+ subq $17, 20, $17
+ mov $26, $18
+ addq $17, $17, $17
+ bsr $26, _dl_fixup !samegp
+
+ /* Move the destination address into position. */
+ mov $0, $27
+ /* Restore program registers. */
+ ldq $26, 0*8($30)
+ ldq $0, 1*8($30)
+ ldq $1, 2*8($30)
+ ldq $2, 3*8($30)
+ ldq $3, 4*8($30)
+ ldq $4, 5*8($30)
+ ldq $5, 6*8($30)
+ ldq $6, 7*8($30)
+ ldq $7, 8*8($30)
+ ldq $8, 9*8($30)
+ ldq $16, 10*8($30)
+ ldq $17, 11*8($30)
+ ldq $18, 12*8($30)
+ ldq $19, 13*8($30)
+ ldq $20, 14*8($30)
+ ldq $21, 15*8($30)
+ ldq $22, 16*8($30)
+ ldq $23, 17*8($30)
+ ldq $24, 18*8($30)
+ ldq $25, 19*8($30)
+ ldq $29, 20*8($30)
+ ldt $f0, 21*8($30)
+ ldt $f1, 22*8($30)
+ ldt $f10, 23*8($30)
+ ldt $f11, 24*8($30)
+ ldt $f12, 25*8($30)
+ ldt $f13, 26*8($30)
+ ldt $f14, 27*8($30)
+ ldt $f15, 28*8($30)
+ ldt $f16, 29*8($30)
+ ldt $f17, 30*8($30)
+ ldt $f18, 31*8($30)
+ ldt $f19, 32*8($30)
+ ldt $f20, 33*8($30)
+ ldt $f21, 34*8($30)
+ ldt $f22, 35*8($30)
+ ldt $f23, 36*8($30)
+ ldt $f24, 37*8($30)
+ ldt $f25, 38*8($30)
+ ldt $f26, 39*8($30)
+ ldt $f27, 40*8($30)
+ ldt $f28, 41*8($30)
+ ldt $f29, 42*8($30)
+ ldt $f30, 43*8($30)
+ /* Flush the Icache after having modified the .plt code. */
+ imb
+ /* Clean up and turn control to the destination */
+ lda $30, FRAMESIZE($30)
+ jmp $31, ($27)
+
+ .end _dl_runtime_resolve
+
+ .globl _dl_runtime_profile
+ .usepv _dl_runtime_profile, no
+ .type _dl_runtime_profile, @function
+
+ /* We save the registers in a different order than desired by
+ .mask/.fmask, so we have to use explicit cfi directives. */
+ cfi_startproc
+
+.macro savei regno, offset
+ stq $\regno, \offset($30)
+ cfi_rel_offset(\regno, \offset)
+.endm
+
+.macro savef regno, offset
+ stt $f\regno, \offset($30)
+ cfi_rel_offset(\regno+32, \offset)
+.endm
+
+#undef FRAMESIZE
+#define FRAMESIZE 50*8
+
+_dl_runtime_profile:
+ lda $30, -FRAMESIZE($30)
+ cfi_adjust_cfa_offset (FRAMESIZE)
+
+ /* Preserve all argument registers. This also constructs the
+ La_alpha_regs structure. */
+ savei 26, 0*8
+ savei 16, 2*8
+ savei 17, 3*8
+ savei 18, 4*8
+ savei 19, 5*8
+ savei 20, 6*8
+ savei 21, 7*8
+ lda $16, FRAMESIZE($30)
+ savef 16, 8*8
+ savef 17, 9*8
+ savef 18, 10*8
+ savef 19, 11*8
+ savef 20, 12*8
+ savef 21, 13*8
+ stq $16, 1*8($30)
+
+ /* Preserve all registers that C normally doesn't. */
+ savei 0, 14*8
+ savei 1, 15*8
+ savei 2, 16*8
+ savei 3, 17*8
+ savei 4, 18*8
+ savei 5, 19*8
+ savei 6, 20*8
+ savei 7, 21*8
+ savei 8, 22*8
+ savei 22, 23*8
+ savei 23, 24*8
+ savei 24, 25*8
+ savei 25, 26*8
+ savei 29, 27*8
+ savef 0, 28*8
+ savef 1, 29*8
+ savef 10, 30*8
+ savef 11, 31*8
+ savef 12, 32*8
+ savef 13, 33*8
+ savef 14, 34*8
+ savef 15, 35*8
+ savef 22, 36*8
+ savef 23, 37*8
+ savef 24, 38*8
+ savef 25, 39*8
+ savef 26, 40*8
+ savef 27, 41*8
+ savef 28, 42*8
+ savef 29, 43*8
+ savef 30, 44*8
+
+ /* Set up our GP. */
+ br $29, .+4
+ ldgp $29, 0($29)
+
+ /* Set up the arguments for _dl_profile_fixup:
+ $16 = link_map out of plt0
+ $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24
+ $18 = return address
+ $19 = La_alpha_regs address
+ $20 = framesize address
+ */
+ subq $28, $27, $17
+ ldq $16, 8($27)
+ subq $17, 20, $17
+ mov $26, $18
+ addq $17, $17, $17
+ lda $19, 0($30)
+ lda $20, 45*8($30)
+ stq $16, 48*8($30)
+ stq $17, 49*8($30)
+
+ bsr $26, _dl_profile_fixup !samegp
+
+ /* Discover if we're wrapping this call. */
+ ldq $18, 45*8($30)
+ bge $18, 1f
+
+ /* Move the destination address into position. */
+ mov $0, $27
+ /* Restore program registers. */
+ ldq $26, 0*8($30)
+ ldq $16, 2*8($30)
+ ldq $17, 3*8($30)
+ ldq $18, 4*8($30)
+ ldq $19, 5*8($30)
+ ldq $20, 6*8($30)
+ ldq $21, 7*8($30)
+ ldt $f16, 8*8($30)
+ ldt $f17, 9*8($30)
+ ldt $f18, 10*8($30)
+ ldt $f19, 11*8($30)
+ ldt $f20, 12*8($30)
+ ldt $f21, 13*8($30)
+ ldq $0, 14*8($30)
+ ldq $1, 15*8($30)
+ ldq $2, 16*8($30)
+ ldq $3, 17*8($30)
+ ldq $4, 18*8($30)
+ ldq $5, 19*8($30)
+ ldq $6, 20*8($30)
+ ldq $7, 21*8($30)
+ ldq $8, 22*8($30)
+ ldq $22, 23*8($30)
+ ldq $23, 24*8($30)
+ ldq $24, 25*8($30)
+ ldq $25, 26*8($30)
+ ldq $29, 27*8($30)
+ ldt $f0, 28*8($30)
+ ldt $f1, 29*8($30)
+ ldt $f10, 30*8($30)
+ ldt $f11, 31*8($30)
+ ldt $f12, 32*8($30)
+ ldt $f13, 33*8($30)
+ ldt $f14, 34*8($30)
+ ldt $f15, 35*8($30)
+ ldt $f22, 36*8($30)
+ ldt $f23, 37*8($30)
+ ldt $f24, 38*8($30)
+ ldt $f25, 39*8($30)
+ ldt $f26, 40*8($30)
+ ldt $f27, 41*8($30)
+ ldt $f28, 42*8($30)
+ ldt $f29, 43*8($30)
+ ldt $f30, 44*8($30)
+
+ /* Clean up and turn control to the destination. */
+ lda $30, FRAMESIZE($30)
+ jmp $31, ($27)
+
+1:
+ /* Create a frame pointer and allocate a new argument frame. */
+ savei 15, 45*8
+ mov $30, $15
+ cfi_def_cfa_register (15)
+ addq $18, 15, $18
+ bic $18, 15, $18
+ subq $30, $18, $30
+
+ /* Save the call destination around memcpy. */
+ stq $0, 46*8($30)
+
+ /* Copy the stack arguments into place. */
+ lda $16, 0($30)
+ lda $17, FRAMESIZE($15)
+ jsr $26, memcpy
+ ldgp $29, 0($26)
+
+ /* Reload the argument registers. */
+ ldq $27, 46*8($30)
+ ldq $16, 2*8($15)
+ ldq $17, 3*8($15)
+ ldq $18, 4*8($15)
+ ldq $19, 5*8($15)
+ ldq $20, 6*8($15)
+ ldq $21, 7*8($15)
+ ldt $f16, 8*8($15)
+ ldt $f17, 9*8($15)
+ ldt $f18, 10*8($15)
+ ldt $f19, 11*8($15)
+ ldt $f20, 12*8($15)
+ ldt $f21, 13*8($15)
+
+ jsr $26, ($27), 0
+ ldgp $29, 0($26)
+
+ /* Set up for call to _dl_call_pltexit. */
+ ldq $16, 48($15)
+ ldq $17, 49($15)
+ stq $0, 46*8($15)
+ lda $18, 0($15)
+ stq $1, 47*8($15)
+ lda $19, 46*8($15)
+ stt $f0, 48*8($15)
+ stt $f1, 49*8($15)
+ bsr $26, _dl_call_pltexit !samegp
+
+ mov $15, $30
+ cfi_def_cfa_register (30)
+ ldq $26, 0($30)
+ ldq $15, 45*8($30)
+ lda $30, FRAMESIZE($30)
+ ret
+
+ cfi_endproc
+ .size _dl_runtime_profile, .-_dl_runtime_profile
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00f36bfbb71dbfa1457ad2bdd9886965f7d67313
commit 00f36bfbb71dbfa1457ad2bdd9886965f7d67313
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jan 16 02:07:29 2005 +0000
* sysdeps/m68k/dl-machine.h: Remove trampoline code. Define
ARCH_LA_PLTENTER and ARCH_LA_PLTEXIT.
(elf_machine_runtime_setup): If profile != 0 does not anymore mean
GLRO(dl_profile) != NULL.
* sysdeps/m68k/dl-trampoline.S: New file.
* sysdeps/m68k/bits/link.h: New file.
* sysdeps/generic/ldsodefs.h (struct audit_ifaces): Add m68k
variants.
* elf/tst-auditmod1.c: Add m68k support.
diff --git a/sysdeps/m68k/bits/link.h b/sysdeps/m68k/bits/link.h
new file mode 100644
index 0000000..9d0a945
--- /dev/null
+++ b/sysdeps/m68k/bits/link.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+/* Registers for entry into PLT on M68K. */
+typedef struct La_m68k_regs
+{
+ uint32_t lr_a0;
+ uint32_t lr_a1;
+ uint32_t lr_sp;
+} La_m68k_regs;
+
+/* Return values for calls from PLT on M68K. */
+typedef struct La_m68k_retval
+{
+ uint32_t lrv_d0;
+ uint32_t lrv_d1;
+ uint32_t lrv_a0;
+ long double lrv_fp0;
+} La_m68k_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_m68k_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_m68k_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_m68k_regs *__inregs,
+ La_m68k_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 146c586..89d7106 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,7 +85,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GLRO(dl_profile), l))
+ if (GLRO(dl_profile) != NULL
+ && _dl_name_match_p (GLRO(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
@@ -101,36 +102,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
-/* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
-"| Trampoline for " #fixup_name "\n\
- .globl " #tramp_name "\n\
- .type " #tramp_name ", @function\n\
-" #tramp_name ":\n\
- | Save %a0 (struct return address) and %a1.\n\
- move.l %a0, -(%sp)\n\
- move.l %a1, -(%sp)\n\
- | Call the real address resolver.\n\
- jbsr " #fixup_name "\n\
- | Restore register %a0 and %a1.\n\
- move.l (%sp)+, %a1\n\
- move.l (%sp)+, %a0\n\
- | Pop parameters\n\
- addq.l #8, %sp\n\
- | Call real function.\n\
- jmp (%d0)\n\
- .size " #tramp_name ", . - " #tramp_name "\n"
-#ifndef PROF
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup));
-#else
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
- ".globl _dl_runtime_profile\n" \
- ".set _dl_runtime_profile, _dl_runtime_resolve");
-#endif
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
@@ -216,9 +187,13 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
return value;
}
+/* Names of the architecture-specific auditing callback functions. */
+#define ARCH_LA_PLTENTER m68k_gnu_pltenter
+#define ARCH_LA_PLTEXIT m68k_gnu_pltexit
+
#endif /* !dl_machine_h */
-#ifdef RESOLVE
+#ifdef RESOLVE_MAP
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
@@ -236,9 +211,15 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
else
{
const Elf32_Sym *const refsym = sym;
+#ifndef RTLD_BOOTSTRAP
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
+#else
Elf32_Addr value = RESOLVE (&sym, version, r_type);
+
if (sym)
value += sym->st_value;
+#endif /* !RTLD_BOOTSTRAP */
switch (r_type)
{
@@ -313,4 +294,4 @@ elf_machine_lazy_rel (struct link_map *map,
_dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
}
-#endif /* RESOLVE */
+#endif /* RESOLVE_MAP */
diff --git a/sysdeps/m68k/dl-trampoline.S b/sysdeps/m68k/dl-trampoline.S
new file mode 100644
index 0000000..8791280
--- /dev/null
+++ b/sysdeps/m68k/dl-trampoline.S
@@ -0,0 +1,129 @@
+/* PLT trampolines. m68k version.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, @function
+_dl_runtime_resolve:
+ | Save %a0 (struct return address) and %a1.
+ move.l %a0, -(%sp)
+ move.l %a1, -(%sp)
+ | Call the real address resolver.
+ jbsr _dl_fixup
+ | Restore register %a0 and %a1.
+ move.l (%sp)+, %a1
+ move.l (%sp)+, %a0
+ | Pop parameters
+ addq.l #8, %sp
+ | Call real function.
+ jmp (%d0)
+ .size _dl_runtime_resolve, . - _dl_runtime_resolve
+
+ .text
+ .globl _dl_runtime_profile
+ .type _dl_runtime_profile, @function
+_dl_runtime_profile:
+ pea 8(%sp)
+ move.l %a1, -(%sp)
+ move.l %a0, -(%sp)
+ pea -1.w
+ | Push parameters for _dl_profile_fixup
+ pea (%sp)
+ pea 8(%sp)
+ move.l 32(%sp), -(%sp)
+ move.l 32(%sp), -(%sp)
+ move.l 32(%sp), -(%sp)
+ subq.l #8, %sp
+ | Call the real address resolver.
+ jbsr _dl_profile_fixup
+ | Pop parameters
+ lea 28(%sp), %sp
+ move.l (%sp), %d1
+ jpl 1f
+ addq.l #4, %sp
+ | Restore register %a0 and %a1.
+ move.l (%sp)+, %a0
+ move.l (%sp)+, %a1
+ lea 12(%sp), %sp
+ | Call real function.
+ jmp (%d0)
+
+ /*
+ +24 return address
+ +20 PLT1
+ +16 PLT2
+ +12 %sp
+ +8 %a1
+ +4 %a0
+ %sp free
+ */
+1: move.l %a2, (%sp)
+ move.l %sp, %a2
+ move.l %sp, %a0
+ lea 28(%sp), %a1
+ | Round framesize up to even
+ addq.l #1, %d1
+ lsr #1, %d1
+ sub.l %d1, %a0
+ sub.l %d1, %a0
+ move.l %a0, %sp
+ jra 2f
+1: move.w (%a1)+, (%a0)+
+2: dbra %d1,1b
+ /*
+ %a2+24 return address
+ %a2+20 PLT1
+ %a2+16 PLT2
+ %a2+12 %sp
+ %a2+8 %a1
+ %a2+4 %a0
+ %a2 %a2
+ %sp copied stack frame
+ */
+
+ move.l 4(%a2), %a0
+ move.l 8(%a2), %a1
+ jsr (%d0)
+ move.l %a2, %sp
+ move.l (%sp)+, %a2
+ /*
+ +20 return address
+ +16 PLT1
+ +12 PLT2
+ +8 %sp
+ +4 %a1
+ %sp %a0
+ */
+ fmove.x %fp0, -(%sp)
+ move.l %d1, -(%sp)
+ move.l %d0, -(%sp)
+ pea (%sp)
+ pea 20(%sp)
+ move.l 40(%sp), -(%sp)
+ move.l 40(%sp), -(%sp)
+ jbsr _dl_call_pltexit
+ lea 16(%sp), %sp
+ move.l (%sp)+, %d0
+ move.l (%sp)+, %d1
+ fmove.x (%sp)+, %fp0
+ lea 20(%sp), %sp
+ rts
+ .size _dl_runtime_profile, . - _dl_runtime_profile
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cac7d7f9a11615e2606a89241d5044a3004e5ea2
commit cac7d7f9a11615e2606a89241d5044a3004e5ea2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 02:41:50 2005 +0000
(__tls_get_addr): Updated for dtv_t union.
diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c
index 434d5d9..a3b68e9 100644
--- a/sysdeps/alpha/libc-tls.c
+++ b/sysdeps/alpha/libc-tls.c
@@ -31,7 +31,7 @@ void *
__tls_get_addr (tls_index *ti)
{
dtv_t *dtv = THREAD_DTV ();
- return (char *) dtv[1].pointer + ti->ti_offset;
+ return (char *) dtv[1].pointer.val + ti->ti_offset;
}
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9c3f06f2863fc115f55048a8cd3e9f1a4f2eeb6
commit e9c3f06f2863fc115f55048a8cd3e9f1a4f2eeb6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 6 22:40:24 2005 +0000
* csu/elf-init.c (__libc_csu_fini): Don't do anything here.
* sysdeps/generic/libc-start.c: Don't register program destructor here.
* dlfcn/Makefile: Add rules to build dlfcn.c.
(LDFLAGS-dl.so): Removed.
* dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer
table.
* dlfcn/dlmopen.c: Likewise for _dl_open.
* dlfcn/dlopen.c: Likewise.
* dlfcn/dlopenold.c: Likewise.
* elf/dl-libc.c: Likewise for _dl_open and _dl_close.
* elf/Makefile (routines): Remove dl-open and dl-close.
(dl-routines): Add dl-open, dl-close, and dl-trampoline.
Add rules to build and run tst-audit1.
* elf/tst-audit1.c: New file.
* elf/tst-auditmod1.c: New file.
* elf/Versions [libc]: Remove _dl_open and _dl_close.
* elf/dl-close.c: Change for use inside ld.so instead of libc.so.
* elf/dl-open.c: Likewise.
* elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization,
signaled by nonzero parameter.
* elf/dl-init.c: Fix use of r_state.
* elf/dl-load.c: Likewise.
* elf/dl-close.c: Add auditing checkpoints.
* elf/dl-open.c: Likewise.
* elf/dl-fini.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-sym.c: Likewise.
* sysdeps/generic/libc-start.c: Likewise.
* elf/dl-object.c: Allocate memory for auditing information.
* elf/dl-reloc.c: Remove RESOLV. We now always need the map.
Correctly initialize slotinfo.
* elf/dynamic-link.h: Adjust after removal of RESOLV.
* sysdeps/hppa/dl-lookupcfg.h: Likewise.
* sysdeps/ia64/dl-lookupcfg.h: Likewise.
* sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed.
* elf/dl-runtime.c (_dl_fixup): Little cleanup.
(_dl_profile_fixup): New parameters to point to register struct and
variable for frame size.
Add auditing checkpoints.
(_dl_call_pltexit): New function.
Don't define trampoline code here.
* elf/rtld.c: Recognize LD_AUDIT. Load modules on startup.
Remove all the functions from _rtld_global_ro which only _dl_open
and _dl_close needed.
Add auditing checkpoints.
* elf/link.h: Define symbols for auditing interfaces.
* include/link.h: Likewise.
* include/dlfcn.h: Define __RTLD_AUDIT.
Remove prototypes for _dl_open and _dl_close.
Adjust access to argc and argv in libdl.
* dlfcn/dlfcn.c: New file.
* sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE
is gone.
* sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces.
* sysdeps/generic/unsecvars.h: Add LD_AUDIT.
* sysdeps/i386/dl-machine.h: Remove trampoline code here.
Adjust for removal of RESOLVE.
* sysdeps/x86_64/dl-machine.h: Likewise.
* sysdeps/generic/dl-trampoline.c: New file.
* sysdeps/i386/dl-trampoline.c: New file.
* sysdeps/x86_64/dl-trampoline.c: New file.
* sysdeps/generic/dl-tls.c: Cleanups. Fixup for dtv_t change.
Fix updating of DTV.
* sysdeps/generic/libc-tls.c: Likewise.
* sysdeps/arm/bits/link.h: Renamed to ...
* sysdeps/arm/buts/linkmap.h: ...this.
* sysdeps/generic/bits/link.h: Renamed to...
* sysdeps/generic/bits/linkmap.h: ...this.
* sysdeps/hppa/bits/link.h: Renamed to...
* sysdeps/hppa/bits/linkmap.h: ...this.
* sysdeps/hppa/i386/link.h: Renamed to...
* sysdeps/hppa/i386/linkmap.h: ...this.
* sysdeps/hppa/ia64/link.h: Renamed to...
* sysdeps/hppa/ia64/linkmap.h: ...this.
* sysdeps/hppa/s390/link.h: Renamed to...
* sysdeps/hppa/s390/linkmap.h: ...this.
* sysdeps/hppa/sh/link.h: Renamed to...
* sysdeps/hppa/sh/linkmap.h: ...this.
* sysdeps/hppa/x86_64/link.h: Renamed to...
* sysdeps/hppa/x86_64/linkmap.h: ...this.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index bc66309..fa3c832 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. NPTL/Alpha version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@
# include <dl-sysdep.h>
#ifndef __ASSEMBLER__
+# include <stdbool.h>
# include <stddef.h>
# include <stdint.h>
@@ -30,7 +31,11 @@
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
#else /* __ASSEMBLER__ */
diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h
index 648976d..e69de29 100644
--- a/sysdeps/arm/bits/link.h
+++ b/sysdeps/arm/bits/link.h
@@ -1,4 +0,0 @@
-struct link_map_machine
- {
- Elf32_Addr plt; /* Address of .plt */
- };
diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/linkmap.h
similarity index 100%
copy from sysdeps/arm/bits/link.h
copy to sysdeps/arm/bits/linkmap.h
diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h
index 54842b2..e69de29 100644
--- a/sysdeps/hppa/bits/link.h
+++ b/sysdeps/hppa/bits/link.h
@@ -1,6 +0,0 @@
-/* Used to store the function descriptor table */
-struct link_map_machine
- {
- size_t fptr_table_len;
- ElfW(Addr) *fptr_table;
- };
diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/linkmap.h
similarity index 100%
copy from sysdeps/hppa/bits/link.h
copy to sysdeps/hppa/bits/linkmap.h
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index d393b3e..84436e7 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -1,5 +1,5 @@
/* Configuration of lookup functions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,9 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Like IA-64, PA-RISC needs more information from the symbol lookup
- function than just the address. */
-#define DL_LOOKUP_RETURNS_MAP
#define ELF_FUNCTION_PTR_IS_SPECIAL
#define DL_UNMAP_IS_SPECIAL
@@ -66,4 +63,3 @@ void _dl_unmap (struct link_map *map);
((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
#define DL_DT_FINI_ADDRESS(map, addr) \
((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2cc89a4967134a6511a14f6d9e249b0f7a72e6d2
commit 2cc89a4967134a6511a14f6d9e249b0f7a72e6d2
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Dec 20 08:34:03 2004 +0000
2004-12-20 Jakub Jelinek <jakub@redhat.com>,
Jim Gifford <giffordj@linkline.com>
[BZ #562]
* sysdeps/mips/Makefile (librt-sysdep_routines): Add.
* sysdeps/unix/mips/rt-sysdep.S: New file.
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 849785a..49ad3e1 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -6,3 +6,7 @@ endif
ifeq ($(subdir),setjmp)
sysdep_routines += setjmp_aux
endif
+
+ifeq ($(subdir),rt)
+librt-sysdep_routines += rt-sysdep
+endif
diff --git a/sysdeps/unix/mips/rt-sysdep.S b/sysdeps/unix/mips/rt-sysdep.S
new file mode 100644
index 0000000..f966bf1
--- /dev/null
+++ b/sysdeps/unix/mips/rt-sysdep.S
@@ -0,0 +1 @@
+#include <sysdep.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0141927118f687c61234382de1980928d52f5f2b
commit 0141927118f687c61234382de1980928d52f5f2b
Author: Richard Henderson <rth@redhat.com>
Date: Fri Dec 17 10:11:44 2004 +0000
* sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Add support
for NPTL where the PID is stored at userlevel and needs to be
reset when CLONE_THREAD is not used.
nptl/
* sysdeps/unix/sysv/linux/alpha/clone.S: New file.
* sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym
index ebd84f3..c21a791 100644
--- a/sysdeps/alpha/nptl/tcb-offsets.sym
+++ b/sysdeps/alpha/nptl/tcb-offsets.sym
@@ -11,3 +11,4 @@
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
PID_OFFSET thread_offsetof (pid)
+TID_OFFSET thread_offsetof (tid)
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index b4766ec..1c450d1 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -24,6 +24,9 @@
#define _ERRNO_H 1
#include <bits/errno.h>
+#define CLONE_VM 0x00000100
+#define CLONE_THREAD 0x00010000
+
/* int clone(int (*fn)(void *arg), void *child_stack, int flags,
void *arg, pid_t *ptid, void *tls, pid_t *ctid);
@@ -51,9 +54,12 @@ ENTRY(__clone)
beq a1,$error /* no NULL stack pointers */
/* Save the fn ptr and arg on the new stack. */
- subq a1,16,a1
+ subq a1,32,a1
stq a0,0(a1)
stq a3,8(a1)
+#ifdef RESET_PID
+ stq a2,16(a1)
+#endif
/* The syscall is of the form clone(flags, usp, ptid, ctid, tls).
Shift the flags, ptid, ctid, tls arguments into place; the
@@ -93,10 +99,19 @@ thread_start:
mov 0, fp
.prologue 0
+#ifdef RESET_PID
+ /* Check and see if we need to reset the PID. */
+ ldq t0,16(sp)
+ lda t1,CLONE_THREAD
+ and t0,t1,t2
+ beq t2,2f
+1:
+#endif
+
/* Load up the arguments. */
ldq pv,0(sp)
ldq a0,8(sp)
- addq sp,16,sp
+ addq sp,32,sp
/* Call the user's function. */
jsr ra,(pv)
@@ -113,6 +128,22 @@ thread_start:
/* Die horribly. */
halt
+#ifdef RESET_PID
+2:
+ rduniq
+ lda t1, CLONE_VM
+ mov v0, s0
+ lda v0, -1
+ and t0, t1, t2
+ bne t2, 3f
+ lda v0, __NR_getxpid
+ callsys
+3:
+ stl v0, PID_OFFSET(s0)
+ stl v0, TID_OFFSET(s0)
+ br 1b
+#endif
+
.end thread_start
weak_alias(__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/clone.S b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S
new file mode 100644
index 0000000..eea1cbe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/clone.S
@@ -0,0 +1,2 @@
+#define RESET_PID
+#include <sysdeps/unix/sysv/linux/alpha/clone.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8779468479633e558d9739129ffcf492adf47aa6
commit 8779468479633e558d9739129ffcf492adf47aa6
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Dec 17 06:49:58 2004 +0000
Adjust for changed result.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 80942e9..7e8140c 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -1,7 +1,7 @@
# Begin of automatic generation
# atan2
-Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380":
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
float: 6
ifloat: 6
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fbac7cf7e639328aa52c32c3d5f0e700b4573a1
commit 5fbac7cf7e639328aa52c32c3d5f0e700b4573a1
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 15 01:00:56 2004 +0000
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use
__NTH instead of __THROW in the inline definition.
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index a10c3a7..1dd82eb 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,6 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -261,7 +262,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
# define _EXTERN_INLINE extern __inline
# endif
_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index e5180f9..1183b86 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -34,7 +34,7 @@ extern int _test_and_set (int *p, int v) __THROW;
# endif
_EXTERN_INLINE int
-_test_and_set (int *p, int v) __THROW
+__NTH (_test_and_set (int *p, int v))
{
int r, t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2863de95ab57e54d3bb7487bf1c1eb4eba280a30
commit 2863de95ab57e54d3bb7487bf1c1eb4eba280a30
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 15 01:00:51 2004 +0000
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): New macro.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index c5b4c59..a5b5bf5 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -1,5 +1,6 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,8 +25,9 @@
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x0001 /* Lazy function call binding. */
#define RTLD_NOW 0x0002 /* Immediate function call binding. */
-#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00008 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b35938bce57e94d8ccfbc4c0c6816bc363f037f
commit 2b35938bce57e94d8ccfbc4c0c6816bc363f037f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 15 01:00:48 2004 +0000
2004-10-18 Maciej W. Rozycki <macro@mips.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h
(PROT_GROWSDOWN, PROT_GROWSUP): New macros.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index e05f2a6..154501f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9db87dc9e2a1f66270f3164384cfcc4e41f9731e
commit 9db87dc9e2a1f66270f3164384cfcc4e41f9731e
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 4 21:20:30 2004 +0000
2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
* sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 92d8460..019bd54 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -112,7 +112,7 @@ extern int __local_multiple_threads attribute_hidden;
# define MAYBE_SAVE_LR \
str lr, [sp, $-4]!;
# define PSEUDO_RET_MOV \
- RETINSTR(movcc, pc, lr); \
+ RETINSTR(cc, lr); \
b PLTJMP(SYSCALL_ERROR)
# define PSEUDO_PROLOGUE
# else
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
index 2368734..2708c70 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
@@ -46,7 +46,7 @@ ENTRY (__vfork)
swi __NR_vfork
cmn a1, #4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
#ifndef __ASSUME_VFORK_SYSCALL
/* Check if vfork syscall is known at all. */
@@ -60,7 +60,7 @@ ENTRY (__vfork)
/* If we don't have vfork, fork is close enough. */
swi __NR_fork
cmn a1, #4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
#elif !defined __NR_vfork
# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47f0752a488e8d8106811595b3a0534c7edf4b5b
commit 47f0752a488e8d8106811595b3a0534c7edf4b5b
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 4 21:20:17 2004 +0000
2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/arm/sysdep.h: Define __USE_BX__ if bx is available.
Use it instead of __THUMB_INTERWORK__. Make RETINSTR take
only a condition and a register.
* sysdeps/arm/dl-machine.h: Use __USE_BX__ instead of
__THUMB_INTERWORK__.
(_dl_start_user): Use BX.
* sysdeps/arm/strlen.S: Use DO_RET.
* sysdeps/unix/arm/brk.S, sysdeps/unix/arm/fork.S,
sysdeps/unix/arm/sysdep.S, sysdeps/unix/arm/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/arm/clone.S,
sysdeps/unix/sysv/linux/arm/mmap.S,
sysdeps/unix/sysv/linux/arm/mmap64.S,
sysdeps/unix/sysv/linux/arm/socket.S,
sysdeps/unix/sysv/linux/arm/sysdep.h,
sysdeps/unix/sysv/linux/arm/vfork.S: Update uses of RETINSTR.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 5dfe334..761f8da 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -123,7 +123,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
-#if defined(__THUMB_INTERWORK__)
+#if defined(__USE_BX__)
#define BX(x) "bx\t" #x
#else
#define BX(x) "mov\tpc, " #x
@@ -293,7 +293,7 @@ _dl_start_user:\n\
ldr r0, .L_FINI_PROC\n\
add r0, sl, r0\n\
@ jump to the user_s entry point\n\
- mov pc, r6\n\
+ " BX(r6) "\n\
.L_GET_GOT:\n\
.word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
.L_SKIP_ARGS:\n\
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
index a83c41d..86e1665 100644
--- a/sysdeps/arm/strlen.S
+++ b/sysdeps/arm/strlen.S
@@ -68,6 +68,6 @@ Llastword: @ drop through to here once we find a
tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th
addne r0, r0, $1 @ must be zero)
#endif
- RETINSTR(mov,pc,lr)
+ DO_RET(lr)
END(strlen)
libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index cb3f105..8ca77a6 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -19,6 +19,11 @@
#include <sysdeps/generic/sysdep.h>
+#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
+ && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__))
+# define __USE_BX__
+#endif
+
#ifdef __ASSEMBLER__
/* Syntactic details of assembler. */
@@ -50,20 +55,22 @@
#ifdef __APCS_32__
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist
-#define RETINSTR(instr, regs...)\
- instr regs
-#ifdef __THUMB_INTERWORK__
+#ifdef __USE_BX__
+#define RETINSTR(cond, reg) \
+ bx##cond reg
#define DO_RET(_reg) \
bx _reg
#else
+#define RETINSTR(cond, reg) \
+ mov##cond pc, reg
#define DO_RET(_reg) \
mov pc, _reg
#endif
#else /* APCS-26 */
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist^
-#define RETINSTR(instr, regs...)\
- instr##s regs
+#define RETINSTR(cond, reg) \
+ mov##cond##s pc, reg
#define DO_RET(_reg) \
movs pc, _reg
#endif
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index 9e20dc6..914e8a8 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -43,7 +43,7 @@ SYSCALL__ (brk, 1)
#endif
str r0, [r1]
mov r0, $0
- RETINSTR(mov, pc, r14)
+ DO_RET (r14)
#ifdef PIC
1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8
_cb_addr:
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index b317b66..bd00c92 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -27,7 +27,7 @@ SYSCALL__ (fork, 0)
R0&-1==R0, and the child gets R0&0==0. */
sub r1, r1, $1
and r0, r0, r1
- RETINSTR(mov, pc, r14)
+ DO_RET (r14)
PSEUDO_END (__fork)
libc_hidden_def (__fork)
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 5fc80a8..4810805 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -50,7 +50,7 @@ syscall_error:
ldr r1, 1f
str r0, [r1]
mvn r0, $0
- RETINSTR(mov, pc, r14)
+ DO_RET (r14)
1: .long C_SYMBOL_NAME(errno)
#else
@@ -60,7 +60,7 @@ syscall_error:
0: add r2, pc, r2
str r0, [r1, r2]
mvn r0, $0
- RETINSTR(mov, pc, r14)
+ DO_RET (r14)
1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8
2: .word C_SYMBOL_NAME(errno)(GOTOFF)
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index d776b45..5f36272 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -24,7 +24,7 @@
#ifdef __ASSEMBLER__
-#define ret RETINSTR(mov, pc, r14)
+#define ret DO_RET (r14)
#define MOVE(a,b) mov b,a
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 1c6f786..bf07fb3 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -45,7 +45,7 @@ ENTRY(__clone)
swi SYS_ify(clone)
movs a1, a1
blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
- RETINSTR(movne, pc, lr)
+ RETINSTR(ne, lr)
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index 7beba68..cf6f253 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -51,7 +51,7 @@ ENTRY (__mmap)
ldr r5, [sp], #4
cmn r0, $4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
b PLTJMP(syscall_error)
.Linval:
@@ -83,7 +83,7 @@ ENTRY (__mmap)
add sp, sp, #16
cmn r0, $4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
b PLTJMP(syscall_error);
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index f8361b5..b4b712c 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -43,12 +43,12 @@ ENTRY (__mmap64)
# ifdef __ASSUME_MMAP2_SYSCALL
ldr r4, [sp], #4
ldr r5, [sp], #4
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
b PLTJMP(syscall_error)
# else
ldrcc r4, [sp], #4
ldrcc r5, [sp], #4
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
cmn r0, $ENOSYS
bne .Lerror
/* The current kernel does not support mmap2. Fall back to plain
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 3e93ceb..212a489 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -91,7 +91,7 @@ ENTRY (__socket)
/* r0 is < 0 if there was an error. */
cmn r0, $124
- RETINSTR(movcc, pc, r14)
+ RETINSTR(cc, r14)
b PLTJMP(SYSCALL_ERROR)
#if defined NEED_CANCELLATION && defined CENABLE
@@ -114,7 +114,7 @@ ENTRY (__socket)
/* r0 is < 0 if there was an error. */
cmn r0, $124
- RETINSTR(movcc, pc, r14)
+ RETINSTR(cc, r14)
b PLTJMP(SYSCALL_ERROR)
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index fda7c5b..668aa1a 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -54,7 +54,7 @@
cmn r0, $4096;
#define PSEUDO_RET \
- RETINSTR(movcc, pc, lr); \
+ RETINSTR(cc, lr); \
b PLTJMP(SYSCALL_ERROR)
#undef ret
#define ret PSEUDO_RET
@@ -71,7 +71,7 @@
DO_CALL (syscall_name, args);
#define PSEUDO_RET_NOERRNO \
- RETINSTR(mov, pc, lr);
+ DO_RET (lr);
#undef ret_NOERRNO
#define ret_NOERRNO PSEUDO_RET_NOERRNO
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index bba1a54..9ef5114 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -32,7 +32,7 @@ ENTRY (__vfork)
#ifdef __NR_vfork
swi __NR_vfork
cmn a1, #4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
# ifdef __ASSUME_VFORK_SYSCALL
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
@@ -47,7 +47,7 @@ ENTRY (__vfork)
/* If we don't have vfork, fork is close enough. */
swi __NR_fork
cmn a1, #4096
- RETINSTR(movcc, pc, lr)
+ RETINSTR(cc, lr)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
#elif !defined __NR_vfork
# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0b94226b11df6a80706d8ebe5dd04dc2e6b4aa3
commit f0b94226b11df6a80706d8ebe5dd04dc2e6b4aa3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 27 20:01:03 2004 +0000
Include sgidefs.h only if NO_SGIDEFS_H isn't defined. Don't include
sgidefs.h twice.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index d0947be..eff7d47 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -20,7 +20,9 @@
#include <assert.h>
#include <errno.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#include <unistd.h>
#include <endian.h>
@@ -29,9 +31,6 @@
#include <bp-checks.h>
#include <kernel-features.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index e8a45da..d8763ac 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -19,7 +19,9 @@
02111-1307 USA. */
#include <errno.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#include <unistd.h>
#include <endian.h>
@@ -28,9 +30,6 @@
#include <bp-checks.h>
#include <kernel-features.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 130515a..4378ebc 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -20,7 +20,9 @@
#include <assert.h>
#include <errno.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#include <unistd.h>
#include <endian.h>
@@ -29,9 +31,6 @@
#include <bp-checks.h>
#include <kernel-features.h>
-#ifndef NO_SGIDEFS_H
-#include <sgidefs.h>
-#endif
#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pwrite
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index e4908fa..e5853e4 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -19,7 +19,9 @@
02111-1307 USA. */
#include <errno.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#include <unistd.h>
#include <endian.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=232e0cb8d69e482329be05bda516a6286bccf973
commit 232e0cb8d69e482329be05bda516a6286bccf973
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:42:45 2004 +0000
Regenerate.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index 8ee636f..c081795 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -42,7 +42,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_O32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "#if _MIPS_SIM == _ABIO32";
print "# define " name " " $2;
print "#endif";
next;
@@ -51,7 +51,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_N32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
+ print "#if _MIPS_SIM == _ABIN32";
print "# define " name " " $2;
print "#endif";
next;
@@ -60,7 +60,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_N64_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
+ print "#if _MIPS_SIM == _ABI64";
print "# define " name " " $2;
print "#endif";
next;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae9e3809f9e36e248ecade18a69220b851e5f1dd
commit ae9e3809f9e36e248ecade18a69220b851e5f1dd
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:38:31 2004 +0000
Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated asm-unistd.h.
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index 6783bc2..67d965d 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -42,7 +42,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_O32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "#if _MIPS_SIM == _ABIO32";
print "# define " name " " $2;
print "#endif";
next;
@@ -51,7 +51,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_N32_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
+ print "#if _MIPS_SIM == _ABIN32";
print "# define " name " " $2;
print "#endif";
next;
@@ -60,7 +60,7 @@ BEGIN { print "#include <sgidefs.h>"; }
name = $2;
sub (/_N64_/, "_", name);
print;
- print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
+ print "#if _MIPS_SIM == _ABI64";
print "# define " name " " $2;
print "#endif";
next;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8de3c5f1fef94d96a1229a937ea04eb22051d5ab
commit 8de3c5f1fef94d96a1229a937ea04eb22051d5ab
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:38:15 2004 +0000
Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated syscall-list.h
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index db06a48..d5e4f6b 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -28,10 +28,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
> $(@:.d=.h).newt; \
if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
- echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \
+ echo '#if _MIPS_SIM == _ABIN32'; \
sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
LC_ALL=C sort; \
- echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \
+ echo '#elif _MIPS_SIM == _ABI64'; \
sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
LC_ALL=C sort; \
echo '#else'; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b7b62e64d71eaae0f17376f2b0f173f844867f9
commit 9b7b62e64d71eaae0f17376f2b0f173f844867f9
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:37:58 2004 +0000
Prevent <asm/sgidefs.h> from being
included by kernel headers and undo its settings if already
included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use
them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and
_MIPS_SIM_ABI64 for compatibility.
diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h
index 1d48935..74509fd 100644
--- a/sysdeps/mips/sgidefs.h
+++ b/sysdeps/mips/sgidefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -21,6 +21,27 @@
#define _SGIDEFS_H 1
/*
+ * A crude hack to stop <asm/sgidefs.h>
+ */
+#undef __ASM_SGIDEFS_H
+#define __ASM_SGIDEFS_H
+
+/*
+ * And remove any damage it might have already done
+ */
+#undef _MIPS_ISA_MIPS1
+#undef _MIPS_ISA_MIPS2
+#undef _MIPS_ISA_MIPS3
+#undef _MIPS_ISA_MIPS4
+#undef _MIPS_ISA_MIPS5
+#undef _MIPS_ISA_MIPS32
+#undef _MIPS_ISA_MIPS64
+
+#undef _MIPS_SIM_ABI32
+#undef _MIPS_SIM_NABI32
+#undef _MIPS_SIM_ABI64
+
+/*
* Definitions for the ISA level
*/
#define _MIPS_ISA_MIPS1 1
@@ -33,14 +54,20 @@
/*
* Subprogram calling convention
- *
- * At the moment only _MIPS_SIM_ABI32 is in use. This will change rsn.
- * Until GCC 2.8.0 is released don't rely on this definitions because the
- * 64bit code is essentially using the 32bit interface model just with
- * 64bit registers.
*/
-#define _MIPS_SIM_ABI32 1
-#define _MIPS_SIM_NABI32 2
-#define _MIPS_SIM_ABI64 3
+#ifndef _ABIO32
+# define _ABIO32 1
+#endif
+#define _MIPS_SIM_ABI32 _ABIO32
+
+#ifndef _ABIN32
+# define _ABIN32 2
+#endif
+#define _MIPS_SIM_NABI32 _ABIN32
+
+#ifndef _ABI64
+# define _ABI64 3
+#endif
+#define _MIPS_SIM_ABI64 _ABI64
#endif /* sgidefs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73a227e20020c9505c7fd1c66c37ffa9097f5e11
commit 73a227e20020c9505c7fd1c66c37ffa9097f5e11
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:37:35 2004 +0000
Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index f3d05bd..7380e10 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, int val)
("/* Inline exchange & add */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,%3\n\t"
@@ -59,7 +59,7 @@ atomic_add (volatile uint32_t *mem, int val)
("/* Inline atomic add */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,%2\n\t"
@@ -83,10 +83,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
("/* Inline compare & swap */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
"lld %1,%5\n\t"
#else
"ll %1,%5\n\t"
@@ -94,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
"move %0,%4\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
"scd %0,%2\n\t"
#else
"sc %0,%2\n\t"
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 4ca199d..ec0aaa0 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -26,7 +26,7 @@
typedef struct
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/* Program counter. */
__ptr_t __pc;
@@ -62,7 +62,7 @@ typedef struct
int __fpc_csr;
/* Callee-saved floating point registers. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
double __fpregs[8];
#else
double __fpregs[6];
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h
index c1ce876..99be0db 100644
--- a/sysdeps/mips/fpu/bits/mathdef.h
+++ b/sysdeps/mips/fpu/bits/mathdef.h
@@ -39,7 +39,7 @@ typedef double double_t; /* `double' expressions are evaluated as
#endif /* ISO C99 */
-#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32
+#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
/* Signal that we do not really have a `long double'. This disables the
declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index f23a4c3..7a089fa 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -26,7 +26,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
/* Call __mcount with the return PC for our caller,
and the return PC our caller will return to. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
#ifdef __PIC__
# define CPLOAD ".cpload $25;"
@@ -83,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
# define CPRETURN
#endif
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
# define PTR_ADDU_STRING "add" /* no u */
# define PTR_SUBU_STRING "sub" /* no u */
-#elif _MIPS_SIM == _MIPS_SIM_ABI64
+#elif _MIPS_SIM == _ABI64
# define PTR_ADDU_STRING "daddu"
# define PTR_SUBU_STRING "dsubu"
#else
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index 76f6af3..b04c36b 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -37,11 +37,11 @@
* 64 bit address space isn't used yet, so we may use the R3000 32 bit
* defines for now.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
# define PTR .word
# define PTRSIZE 4
# define PTRLOG 2
-#elif (_MIPS_SIM == _MIPS_SIM_ABI64)
+#elif _MIPS_SIM == _ABI64
# define PTR .dword
# define PTRSIZE 8
# define PTRLOG 3
@@ -50,7 +50,7 @@
/*
* PIC specific declarations
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#if _MIPS_SIM == _ABIO32
# ifdef __PIC__
# define CPRESTORE(register) \
.cprestore register
@@ -97,7 +97,7 @@ l: \
# define SETUP_GPX64_L(cp_reg, ra_save, l)
# define RESTORE_GP64
# define USE_ALT_CP(a)
-#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */
+#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
/*
* For callee-saved gp calling convention:
*/
@@ -131,15 +131,15 @@ l: \
/* Use alternate register for context pointer. */
# define USE_ALT_CP(reg) \
.cplocal reg
-#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM != _ABIO32 */
/*
* Stack Frame Definitions
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#if _MIPS_SIM == _ABIO32
# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */
#endif
-#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define NARGSAVE 0 /* No caller responsibilities. */
#endif
@@ -287,7 +287,7 @@ symbol = value
/*
* Stack alignment
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define ALSZ 15
# define ALMASK ~15
#else
@@ -298,7 +298,7 @@ symbol = value
/*
* Size of a register
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define SZREG 8
#else
# define SZREG 4
@@ -389,7 +389,7 @@ symbol = value
/*
* How to add/sub/load/store/shift pointers.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32)
+#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32)
# define PTR_ADD add
# define PTR_ADDI addi
# define PTR_ADDU addu
@@ -411,7 +411,7 @@ symbol = value
# define PTR_SCALESHIFT 2
#endif
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
# define PTR_ADD add
# define PTR_ADDI addi
# define PTR_ADDU add /* no u */
@@ -433,8 +433,8 @@ symbol = value
# define PTR_SCALESHIFT 2
#endif
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \
- || _MIPS_SIM == _MIPS_SIM_ABI64
+#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \
+ || _MIPS_SIM == _ABI64
# define PTR_ADD dadd
# define PTR_ADDI daddi
# define PTR_ADDU daddu
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 550593b..aa039b4 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -22,8 +22,8 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
#include <sgidefs.h>
+#include <sys/types.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -144,7 +144,7 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
-#if _MIPS_SIM != _MIPS_SIM_ABI64
+#if _MIPS_SIM != _ABI64
/* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
fcntls in o32 and n32, never has this field. */
long int l_sysid;
@@ -154,7 +154,7 @@ typedef struct flock
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
-#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _MIPS_SIM_ABI64
+#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64
/* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
flock in o32 and n32, never has this field. */
long int pad[4];
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
index 19f5881..079964e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
@@ -34,7 +34,7 @@
licenses, the fact that the file is pasted, instead of included,
doesn't really make any difference for the program that includes
this header. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -70,7 +70,7 @@ struct sigcontext {
};
#endif /* _ASM_SIGCONTEXT_H */
-#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#else /* _MIPS_SIM != _ABIO32 */
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -101,5 +101,5 @@ struct sigcontext {
};
#endif /* _ASM_SIGCONTEXT_H */
-#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM != _ABIO32 */
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 2dd4cab..9ae38cd 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -36,7 +36,7 @@
#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/* Structure describing file characteristics. */
struct stat
{
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 6a4c409..cab1e71 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -3,7 +3,7 @@
userland data structures are not identical, because of different
padding. */
/* Definition of `struct stat' used in the kernel. */
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
struct kernel_stat
{
unsigned int st_dev;
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 2b50647..f453c8d 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -20,7 +20,7 @@
#include <sgidefs.h>
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
#define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
index 9badeb3..d05853d 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
@@ -124,7 +124,7 @@ enum __ptrace_request
appear (those that are used for the particular request) as:
pid_t PID, void *ADDR, int DATA, void *ADDR2
after REQUEST. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
__extension__ extern long long int ptrace
(enum __ptrace_request __request, ...) __THROW;
#else
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 006e161..e5180f9 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -21,7 +21,6 @@
#define _SYS_TAS_H 1
#include <features.h>
-
#include <sgidefs.h>
__BEGIN_DECLS
@@ -43,7 +42,7 @@ _test_and_set (int *p, int v) __THROW
("/* Inline test and set */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,%3\n\t"
diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h
index dc3ee83..d5b3b05 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/user.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/user.h
@@ -32,7 +32,7 @@
instead of included separately, doesn't change in any way the
licensing status of a program that includes user.h. Since this is
for gdb alone, and gdb is GPLed, no surprises here. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/*
* Various register offset definitions for debuggers, core file
* examiners and whatnot.
@@ -100,7 +100,7 @@
#endif /* __ASM_MIPS_REG_H */
-#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#else /* _MIPS_SIM != _ABIO32 */
/*
* Various register offset definitions for debuggers, core file
@@ -170,9 +170,9 @@
#endif /* _ASM_REG_H */
-#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM != _ABIO32 */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
struct user
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8ddf7a11ff27cc513fa12841fcbbfcba6d47426
commit b8ddf7a11ff27cc513fa12841fcbbfcba6d47426
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 24 04:36:11 2004 +0000
Include <sgidefs.h>. Use _ABIO32, _ABIN32 and _ABI64 for ABI selection
throughout.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 49fdffb..0d87b65 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -32,6 +32,7 @@
#error ENTRY_POINT needs to be defined for MIPS.
#endif
+#include <sgidefs.h>
#include <sys/asm.h>
/* The offset of gp from GOT might be system-dependent. It's set by
@@ -74,10 +75,9 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
static inline int __attribute_used__
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
/* Don't link o32 and n32 together. */
- if (((ehdr->e_flags & EF_MIPS_ABI2) != 0)
- != (_MIPS_SIM != _MIPS_SIM_ABI32))
+ if (((ehdr->e_flags & EF_MIPS_ABI2) != 0) != (_MIPS_SIM == _ABIN32))
return 0;
#endif
@@ -130,7 +130,7 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
#else
# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
@@ -257,7 +257,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
return NULL;
}
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
#define ELF_DL_FRAME_SIZE 40
#define ELF_DL_SAVE_ARG_REGS "\
@@ -278,7 +278,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
#define IFABIO32(X) X
-#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */
+#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */
#define ELF_DL_FRAME_SIZE 80
@@ -550,7 +550,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
switch (r_type)
{
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
case (R_MIPS_64 << 8) | R_MIPS_REL32:
#else
case R_MIPS_REL32:
@@ -615,7 +615,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
break;
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
case R_MIPS_64:
/* For full compliance with the ELF64 ABI, one must precede the
_REL32/_64 pair of relocations with a _64 relocation, such
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 3dd5137..d9cc3b7 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003
+ Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -37,6 +37,7 @@
#define __ASSEMBLY__ 1
#include <entry.h>
+#include <sgidefs.h>
#include <sys/asm.h>
#ifndef ENTRY_POINT
@@ -93,12 +94,12 @@ ENTRY_POINT:
on o32 and quad words (16 bytes) on n32 and n64. */
and $29, -2 * SZREG
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
PTR_SUBIU $29, 32
#endif
PTR_LA $7, __libc_csu_init /* init */
PTR_LA $8, __libc_csu_fini
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
PTR_S $8, 16($29) /* fini */
PTR_S $2, 20($29) /* rtld_fini */
PTR_S $29, 24($29) /* stack_end */
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index b270579..546493f 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <sgidefs.h>
#include <stdlib.h>
#undef __longjmp
@@ -39,7 +40,7 @@ __longjmp (env, val_arg)
register int val asm ("a1");
/* Pull back the floating point callee-saved registers. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1]));
asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2]));
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index 73f5cc2..7620cf3 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -1,5 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +22,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
+#include <sgidefs.h>
#include <sysdep.h>
#include <sys/asm.h>
@@ -33,7 +35,7 @@ ENTRY (_setjmp)
#endif
SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp))
PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
nop
#endif
RESTORE_GP64
diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S
index f542cb5..2a1fd9c 100644
--- a/sysdeps/mips/mips64/bsd-setjmp.S
+++ b/sysdeps/mips/mips64/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
+#include <sgidefs.h>
#include <sysdep.h>
#include <sys/asm.h>
@@ -33,7 +34,7 @@ ENTRY (setjmp)
#endif
SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp))
PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
nop
#endif
RESTORE_GP64
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
index d566921..bdfd9cd 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sgidefs.h>
#include <sysdep.h>
#include <sys/asm.h>
@@ -33,11 +35,11 @@ ENTRY (__sigsetjmp)
move a2, sp
move a3, fp
PTR_LA t9, __sigsetjmp_aux
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
nop
#endif
RESTORE_GP64
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
move a4, gp
#endif
jr t9
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index b5afd14..26b4739 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <sgidefs.h>
/* This function is only called via the assembly language routine
__sigsetjmp, which arranges to pass in the stack pointer and the frame
@@ -29,7 +30,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
long long gp)
{
/* Store the floating point callee-saved registers... */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
index 9d2c4c1..8fb898a 100644
--- a/sysdeps/mips/sys/regdef.h
+++ b/sysdeps/mips/sys/regdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -20,6 +20,8 @@
#ifndef _SYS_REGDEF_H
#define _SYS_REGDEF_H
+#include <sgidefs.h>
+
/*
* Symbolic register names for 32 bit ABI
*/
@@ -31,7 +33,7 @@
#define a1 $5
#define a2 $6
#define a3 $7
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
#define a4 $8
#define a5 $9
#define a6 $10
@@ -44,7 +46,7 @@
#define ta1 a5
#define ta2 a6
#define ta3 a7
-#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
+#else /* if _MIPS_SIM == _ABIO32 */
#define t0 $8 /* caller saved */
#define t1 $9
#define t2 $10
@@ -57,7 +59,7 @@
#define ta1 t5
#define ta2 t6
#define ta3 t7
-#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM == _ABIO32 */
#define s0 $16 /* callee saved */
#define s1 $17
#define s2 $18
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index 90aa09a..fe378e9 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,10 +22,11 @@
#define _SYS_UCONTEXT_H 1
#include <features.h>
+#include <sgidefs.h>
#include <signal.h>
/* Type for general register. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
typedef __uint32_t greg_t;
#else
typedef __uint64_t greg_t;
@@ -119,7 +120,7 @@ typedef struct fpregset
{
union
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
double fp_dregs[16];
float fp_fregs[32];
unsigned int fp_regs[32];
@@ -143,7 +144,7 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
unsigned long int uc_flags;
#else
__uint64_t uc_flags;
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 9302710..7148301 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
+/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -18,6 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sgidefs.h>
#include <sysdeps/unix/sysdep.h>
#ifdef __ASSEMBLER__
@@ -69,7 +70,7 @@
/* The mips move insn is d,s. */
#define MOVE(x,y) move y , x
-#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
+#if _MIPS_SIM == _ABIO32
# define L(label) $L ## label
#else
# define L(label) .L ## label
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 8fba034..d0947be 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -20,6 +20,7 @@
#include <assert.h>
#include <errno.h>
+#include <sgidefs.h>
#include <unistd.h>
#include <endian.h>
@@ -55,14 +56,14 @@ __libc_pread (fd, buf, count, offset)
{
ssize_t result;
-#if _MIPS_SIM != _MIPS_SIM_ABI64
+#if _MIPS_SIM != _ABI64
assert (sizeof (offset) == 4);
#endif
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -80,7 +81,7 @@ __libc_pread (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 238c8e0..e8a45da 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <errno.h>
+#include <sgidefs.h>
#include <unistd.h>
#include <endian.h>
@@ -58,7 +59,7 @@ __libc_pread64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -77,7 +78,7 @@ __libc_pread64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
index af8266d..19d7c2d 100644
--- a/sysdeps/unix/sysv/linux/mips/ptrace.c
+++ b/sysdeps/unix/sysv/linux/mips/ptrace.c
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <errno.h>
+#include <sgidefs.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <sys/user.h>
@@ -28,7 +29,7 @@
#include <bp-checks.h>
#include <sgidefs.h>
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
__extension__ typedef long long int reg_type;
#else
typedef long int reg_type;
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index d0e3fe5..130515a 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -20,6 +20,7 @@
#include <assert.h>
#include <errno.h>
+#include <sgidefs.h>
#include <unistd.h>
#include <endian.h>
@@ -55,14 +56,14 @@ __libc_pwrite (fd, buf, count, offset)
{
ssize_t result;
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM != _ABI64
assert (sizeof (offset) == 4);
#endif
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -80,7 +81,7 @@ __libc_pwrite (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 109b2c5..e4908fa 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <errno.h>
+#include <sgidefs.h>
#include <unistd.h>
#include <endian.h>
@@ -54,7 +55,7 @@ __libc_pwrite64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -74,7 +75,7 @@ __libc_pwrite64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 83b71de..09fbe79 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <errno.h>
+#include <sgidefs.h>
#include <signal.h>
#include <string.h>
@@ -40,7 +41,7 @@ int __libc_missing_rt_sigs;
#endif
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
# ifdef __NR_rt_sigreturn
static void restore_rt (void) asm ("__restore_rt");
@@ -82,7 +83,7 @@ __libc_sigaction (sig, act, oact)
memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t));
kact.sa_flags = act->sa_flags;
# ifdef HAVE_SA_RESTORER
-# if _MIPS_SIM == _MIPS_SIM_ABI32
+# if _MIPS_SIM == _ABIO32
kact.sa_restorer = act->sa_restorer;
# else
kact.sa_restorer = &restore_rt;
@@ -140,7 +141,7 @@ __libc_sigaction (sig, act, oact)
oact->sa_mask.__val[0] = k_osigact.sa_mask;
oact->sa_flags = k_osigact.sa_flags;
# ifdef HAVE_SA_RESTORER
-# if _MIPS_SIM == _MIPS_SIM_ABI32
+# if _MIPS_SIM == _ABIO32
oact->sa_restorer = k_osigact.sa_restorer;
# else
oact->sa_restorer = &restore;
@@ -177,7 +178,7 @@ asm \
);
/* The return code for realtime-signals. */
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
# ifdef __NR_rt_sigreturn
RESTORE (restore_rt, __NR_rt_sigreturn)
# endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index cb84677..2bf07be 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -25,6 +25,7 @@
used on Linux. */
#include <features.h>
+#include <sgidefs.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/user.h>
@@ -34,7 +35,7 @@
#define ELF_NGREG 45
#define ELF_NFPREG 33
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
__extension__ typedef unsigned long long elf_greg_t;
#else
typedef unsigned long elf_greg_t;
@@ -65,7 +66,7 @@ struct elf_prstatus
{
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
__extension__ unsigned long long int pr_sigpend;
__extension__ unsigned long long int pr_sighold;
#else
@@ -93,7 +94,7 @@ struct elf_prpsinfo
char pr_sname; /* Char for pr_state. */
char pr_zomb; /* Zombie. */
char pr_nice; /* Nice val. */
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
__extension__ unsigned long long int pr_flag;
#else
unsigned long int pr_flag; /* Flags. */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index c03566b..ddb499f 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -22,14 +22,13 @@
#define _SYS_UCONTEXT_H 1
#include <features.h>
+#include <sgidefs.h>
#include <signal.h>
/* We need the signal context definitions even if they are not used
included in <signal.h>. */
#include <bits/sigcontext.h>
-#include <sgidefs.h>
-
/* Type for general register. Even in o32 we assume 64-bit registers,
like the kernel. */
__extension__ typedef unsigned long long int greg_t;
@@ -54,7 +53,7 @@ typedef struct fpregset {
/* Context to describe whole processor state. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/* Earlier versions of glibc for mips had an entirely different
definition of mcontext_t, that didn't even resemble the
corresponding kernel data structure. Since all legitimate uses of
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56eb7d3add62e27e798c4610856cd9fffe4b2d0e
commit 56eb7d3add62e27e798c4610856cd9fffe4b2d0e
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 22 12:47:50 2004 +0000
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h (__SI_MAX_SIZE):
Define appropriately based on __WORDSIZE.
[struct siginfo] (__pad0): Add for explicit padding.
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Formatting fixes
throughout.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 629a055..54eba41 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,6 @@
/* siginfo_t, sigevent and constants. Linux/MIPS version.
- Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +23,8 @@
# error "Never include this file directly. Use <signal.h> instead"
#endif
+#include <bits/wordsize.h>
+
#if (!defined __have_sigval_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t \
|| defined __need_sigevent_t))
@@ -39,8 +42,13 @@ typedef union sigval
&& (defined _SIGNAL_H || defined __need_siginfo_t))
# define __have_siginfo_t 1
-# define __SI_MAX_SIZE 128
-# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# define __SI_MAX_SIZE 128
+# if __WORDSIZE == 64
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
typedef struct siginfo
{
@@ -48,6 +56,8 @@ typedef struct siginfo
int si_code; /* Signal code. */
int si_errno; /* If non-zero, an errno value associated with
this signal, as defined in <errno.h>. */
+ int __pad0[__SI_MAX_SIZE / sizeof (int) - __SI_PAD_SIZE - 3];
+ /* Explicit padding. */
union
{
@@ -121,9 +131,9 @@ enum
{
SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
# define SI_ASYNCNL SI_ASYNCNL
- SI_TKILL = -6, /* Sent by tkill. */
+ SI_TKILL = -6, /* Sent by tkill. */
# define SI_TKILL SI_TKILL
- SI_SIGIO, /* Sent by queued SIGIO. */
+ SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_MESGQ, /* Sent by real time mesq state change. */
# define SI_MESGQ SI_MESGQ
@@ -149,7 +159,7 @@ enum
# define ILL_ILLOPN ILL_ILLOPN
ILL_ILLADR, /* Illegal addressing mode. */
# define ILL_ILLADR ILL_ILLADR
- ILL_ILLTRP, /* Illegal trap. */
+ ILL_ILLTRP, /* Illegal trap. */
# define ILL_ILLTRP ILL_ILLTRP
ILL_PRVOPC, /* Privileged opcode. */
# define ILL_PRVOPC ILL_PRVOPC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8608e6698db7fe9c01d79164a406c6770b0cb897
commit 8608e6698db7fe9c01d79164a406c6770b0cb897
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 19 00:01:25 2004 +0000
(TRAMPOLINE_TEMPLATE): Add unwind annotations.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index bc9ed10..d29501d 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -495,6 +495,9 @@ asm ( \
" .globl " #tramp_name "\n" \
" .type " #tramp_name ",@function\n" \
#tramp_name ":\n" \
+ " .proc\n" \
+ " .callinfo frame=64,calls,save_rp\n" \
+ " .entry\n" \
/* Save return pointer */ \
" stw %r2,-20(%sp)\n" \
/* Save argument registers in the call stack frame. */ \
@@ -526,7 +529,8 @@ asm ( \
" bv %r0(%r22)\n" \
/* Return pointer. */ \
" ldw -20(%sp),%r2\n" \
- );
+ " .exit\n" \
+ " .procend\n");
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6deb629a5447613bfddf7f24cffbcd28b985667f
commit 6deb629a5447613bfddf7f24cffbcd28b985667f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 12 01:15:06 2004 +0000
Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and
pthread-functions.h includes. Include setxid.h. Use
INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the
HAVE_PTR__NPTL_SETXID guarded snippets.
diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c
index cfc8283..0973fe4 100644
--- a/sysdeps/unix/sysv/linux/alpha/setregid.c
+++ b/sysdeps/unix/sysv/linux/alpha/setregid.c
@@ -18,35 +18,13 @@
#include <errno.h>
#include <unistd.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <linux/posix_types.h>
-#include "kernel-features.h"
-#include <pthread-functions.h>
+#include <setxid.h>
int
__setregid (gid_t rgid, gid_t egid)
{
- int result;
-
- result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid);
-
-#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
- if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
- {
- struct xid_command cmd;
- cmd.syscall_no = __NR_setregid;
- cmd.id[0] = rgid;
- cmd.id[1] = egid;
- __libc_pthread_functions.ptr__nptl_setxid (&cmd);
- }
-#endif
-
- return result;
+ return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid);
}
#ifndef __setregid
weak_alias (__setregid, setregid)
diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c
index fdfa486..50e29e3 100644
--- a/sysdeps/unix/sysv/linux/alpha/setresgid.c
+++ b/sysdeps/unix/sysv/linux/alpha/setresgid.c
@@ -18,36 +18,14 @@
#include <errno.h>
#include <unistd.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <linux/posix_types.h>
-#include "kernel-features.h"
-#include <pthread-functions.h>
+#include <setxid.h>
int
__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
{
- int result;
-
- result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid);
-
-#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
- if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
- {
- struct xid_command cmd;
- cmd.syscall_no = __NR_setresgid;
- cmd.id[0] = rgid;
- cmd.id[1] = egid;
- cmd.id[2] = sgid;
- __libc_pthread_functions.ptr__nptl_setxid (&cmd);
- }
-#endif
-
- return result;
+ return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid,
+ (int) egid, (int) sgid);
}
libc_hidden_def (__setresgid)
#ifndef __setresgid
diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c
index 4967127..e76413b 100644
--- a/sysdeps/unix/sysv/linux/alpha/setresuid.c
+++ b/sysdeps/unix/sysv/linux/alpha/setresuid.c
@@ -18,36 +18,14 @@
#include <errno.h>
#include <unistd.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <linux/posix_types.h>
-#include "kernel-features.h"
-#include <pthread-functions.h>
+#include <setxid.h>
int
__setresuid (uid_t ruid, uid_t euid, uid_t suid)
{
- int result;
-
- result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid);
-
-#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
- if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
- {
- struct xid_command cmd;
- cmd.syscall_no = __NR_setresuid;
- cmd.id[0] = ruid;
- cmd.id[1] = euid;
- cmd.id[2] = suid;
- __libc_pthread_functions.ptr__nptl_setxid (&cmd);
- }
-#endif
-
- return result;
+ return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid,
+ (int) euid, (int) suid);
}
libc_hidden_def (__setresuid)
#ifndef __setresuid
diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c
index b29aed4..a23a347 100644
--- a/sysdeps/unix/sysv/linux/alpha/setreuid.c
+++ b/sysdeps/unix/sysv/linux/alpha/setreuid.c
@@ -18,35 +18,13 @@
#include <errno.h>
#include <unistd.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <linux/posix_types.h>
-#include "kernel-features.h"
-#include <pthread-functions.h>
+#include <setxid.h>
int
__setreuid (uid_t ruid, uid_t euid)
{
- int result;
-
- result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid);
-
-#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
- if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
- {
- struct xid_command cmd;
- cmd.syscall_no = __NR_setreuid;
- cmd.id[0] = ruid;
- cmd.id[1] = euid;
- __libc_pthread_functions.ptr__nptl_setxid (&cmd);
- }
-#endif
-
- return result;
+ return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid);
}
#ifndef __setreuid
weak_alias (__setreuid, setreuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=463402af3aa80a0c408a1228c6587e56ebf58067
commit 463402af3aa80a0c408a1228c6587e56ebf58067
Author: Richard Henderson <rth@redhat.com>
Date: Thu Nov 4 18:39:10 2004 +0000
* sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align.
(linefeed): Remove.
(register_dump): Rewrite to generate into a flat buffer instead
of into iovecs.
diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h
index d55899a..77f9629 100644
--- a/sysdeps/unix/sysv/linux/alpha/register-dump.h
+++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h
@@ -18,7 +18,7 @@
02111-1307 USA. */
#include <stddef.h>
-#include <sys/uio.h>
+#include <string.h>
/* We will print the register dump in this format:
@@ -51,7 +51,7 @@
#define NREGS (32+32+3)
-static const char regnames[NREGS][8] =
+static const char __attribute__((aligned(8))) regnames[NREGS][8] =
{
" V0: ", " T0: ", " T1: ",
" T2: ", " T3: ", " T4: ",
@@ -113,49 +113,45 @@ static const int offsets[NREGS] =
#undef O
-static const char linefeed[2] = "\n\n";
-
static void
register_dump (int fd, struct sigcontext *ctx)
{
- char regs[NREGS][16];
- struct iovec iov[2*NREGS+24];
- size_t iov_i = 0, i, j;
+ char buf[NREGS*(8+16) + 25 + 80];
+ char *p = buf;
+ size_t i;
-#define ADD_MEM(str, len) \
- (iov[iov_i].iov_base = (void *)(str), \
- iov[iov_i].iov_len = len, \
- ++iov_i)
-
-#define ADD_STRING(str) ADD_MEM(str, strlen(str))
-
- ADD_STRING ("Register dump:\n\n");
+ p = stpcpy (p, "Register dump:\n\n");
for (i = 0; i < NREGS; ++i)
{
int this_offset, this_lf;
unsigned long val;
+ signed long j;
this_offset = offsets[i];
this_lf = this_offset & 7;
- this_offset &= -8;
- val = *(unsigned long *)((char *)ctx + this_offset);
+ val = *(unsigned long *)(((size_t)ctx + this_offset) & -8);
- for (j = 0; j < 16; ++j)
+ memcpy (p, regnames[i], 8);
+ p += 8;
+
+ for (j = 60; j >= 0; j -= 4)
{
- unsigned long x = (val >> (64 - (j + 1) * 4)) & 15;
+ unsigned long x = (val >> j) & 15;
x += x < 10 ? '0' : 'a' - 10;
- regs[i][j] = x;
+ *p++ = x;
}
- ADD_MEM (regnames[i], 8);
- ADD_MEM (regs[i], 16);
- if (this_lf)
- ADD_MEM (linefeed, this_lf);
+ if (this_lf > 0)
+ {
+ if (this_lf > 1)
+ *p++ = '\n';
+ *p++ = '\n';
+ }
}
- writev (fd, iov, iov_i);
+ write (fd, buf, p - buf);
}
#define REGISTER_DUMP register_dump (fd, ctx)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cc7e0507ddf32c72b2fc341214c949ae61cf093
commit 8cc7e0507ddf32c72b2fc341214c949ae61cf093
Author: Richard Henderson <rth@redhat.com>
Date: Mon Nov 1 05:31:54 2004 +0000
* sysdeps/unix/sysv/linux/alpha/setregid.c: New file.
* sysdeps/unix/sysv/linux/alpha/setresgid.c: New file.
* sysdeps/unix/sysv/linux/alpha/setresuid.c: New file.
* sysdeps/unix/sysv/linux/alpha/setreuid.c: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c
new file mode 100644
index 0000000..cfc8283
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setregid.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+#include "kernel-features.h"
+#include <pthread-functions.h>
+
+
+int
+__setregid (gid_t rgid, gid_t egid)
+{
+ int result;
+
+ result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid);
+
+#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
+ if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
+ {
+ struct xid_command cmd;
+ cmd.syscall_no = __NR_setregid;
+ cmd.id[0] = rgid;
+ cmd.id[1] = egid;
+ __libc_pthread_functions.ptr__nptl_setxid (&cmd);
+ }
+#endif
+
+ return result;
+}
+#ifndef __setregid
+weak_alias (__setregid, setregid)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c
new file mode 100644
index 0000000..fdfa486
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setresgid.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+#include "kernel-features.h"
+#include <pthread-functions.h>
+
+
+int
+__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
+{
+ int result;
+
+ result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid);
+
+#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
+ if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
+ {
+ struct xid_command cmd;
+ cmd.syscall_no = __NR_setresgid;
+ cmd.id[0] = rgid;
+ cmd.id[1] = egid;
+ cmd.id[2] = sgid;
+ __libc_pthread_functions.ptr__nptl_setxid (&cmd);
+ }
+#endif
+
+ return result;
+}
+libc_hidden_def (__setresgid)
+#ifndef __setresgid
+weak_alias (__setresgid, setresgid)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c
new file mode 100644
index 0000000..4967127
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setresuid.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+#include "kernel-features.h"
+#include <pthread-functions.h>
+
+
+int
+__setresuid (uid_t ruid, uid_t euid, uid_t suid)
+{
+ int result;
+
+ result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid);
+
+#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
+ if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
+ {
+ struct xid_command cmd;
+ cmd.syscall_no = __NR_setresuid;
+ cmd.id[0] = ruid;
+ cmd.id[1] = euid;
+ cmd.id[2] = suid;
+ __libc_pthread_functions.ptr__nptl_setxid (&cmd);
+ }
+#endif
+
+ return result;
+}
+libc_hidden_def (__setresuid)
+#ifndef __setresuid
+weak_alias (__setresuid, setresuid)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c
new file mode 100644
index 0000000..b29aed4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setreuid.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+#include "kernel-features.h"
+#include <pthread-functions.h>
+
+
+int
+__setreuid (uid_t ruid, uid_t euid)
+{
+ int result;
+
+ result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid);
+
+#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
+ if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
+ {
+ struct xid_command cmd;
+ cmd.syscall_no = __NR_setreuid;
+ cmd.id[0] = ruid;
+ cmd.id[1] = euid;
+ __libc_pthread_functions.ptr__nptl_setxid (&cmd);
+ }
+#endif
+
+ return result;
+}
+#ifndef __setreuid
+weak_alias (__setreuid, setreuid)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7618b354bfae9b944d8d6deeecc24fefcf30b559
commit 7618b354bfae9b944d8d6deeecc24fefcf30b559
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Oct 30 21:44:13 2004 +0000
(elf_machine_rela)
(elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto
instead of static.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e528938..146c586 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -223,7 +223,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void __attribute__ ((always_inline))
+auto inline void __attribute__ ((unused, always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
void *const reloc_addr_arg)
@@ -294,7 +294,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
}
-static inline void
+auto inline void __attribute__ ((unused, always_inline))
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
void *const reloc_addr_arg)
{
@@ -302,7 +302,7 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
*reloc_addr = l_addr + reloc->r_addend;
}
-static inline void
+auto inline void __attribute__ ((unused, always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe3dd5144ede4633f448b924dd074bed394b3802
commit fe3dd5144ede4633f448b924dd074bed394b3802
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 26 02:15:24 2004 +0000
Nonworking non-GNU OS port code moved to ports repository.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd14fe4536a8ce78084807b244d9b8594e1fc9a0
commit fd14fe4536a8ce78084807b244d9b8594e1fc9a0
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 26 01:36:11 2004 +0000
.
diff --git a/ChangeLog.cris b/ChangeLog.cris
new file mode 100644
index 0000000..ba77489
--- /dev/null
+++ b/ChangeLog.cris
@@ -0,0 +1,10 @@
+2004-10-25 Roland McGrath <roland@frob.com>
+
+ * sysdeps/cris/configure.in: New file, with test moved out of main
+ libc configure.in file.
+ * sysdeps/cris/configure: New generated file.
+
+2004-10-23 Roland McGrath <roland@frob.com>
+
+ * sysdeps/cris, sysdeps/unix/sysv/linux/cris: Moved here from main
+ libc source tree.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b4558c1c5a4102db1c0a26fef91147cb2aee2f1
commit 1b4558c1c5a4102db1c0a26fef91147cb2aee2f1
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 26 01:35:53 2004 +0000
2004-10-25 Roland McGrath <roland@frob.com>
* configure.in (ASM_LINE_SEP): Move this setting to ...
* sysdeps/hppa/configure.in: ... here, new file.
* sysdeps/hppa/configure: New generated file.
* configure: Regenerated.
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
new file mode 100644
index 0000000..07bde0e
--- /dev/null
+++ b/sysdeps/hppa/configure
@@ -0,0 +1,34 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+
+hppa*linux*)
+echo "$as_me:$LINENO: checking for assembler line separator" >&5
+echo $ECHO_N "checking for assembler line separator... $ECHO_C" >&6
+if test "${libc_cv_asm_line_sep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.s <<EOF
+nop ; is_old_puffin
+EOF
+if { ac_try='${CC-cc} -c $ASFLAGS conftest.s 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ libc_cv_asm_line_sep='!'
+else
+ if test -z "$enable_hacker_mode"; then
+ echo "*** You need a newer assembler to compile glibc"
+ rm -f conftest*
+ exit 1
+ fi
+ libc_cv_asm_line_sep=';'
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_asm_line_sep" >&5
+echo "${ECHO_T}$libc_cv_asm_line_sep" >&6
+cat >>confdefs.h <<_ACEOF
+#define ASM_LINE_SEP $libc_cv_asm_line_sep
+_ACEOF
+
diff --git a/sysdeps/hppa/configure.in b/sysdeps/hppa/configure.in
new file mode 100644
index 0000000..1ec6780
--- /dev/null
+++ b/sysdeps/hppa/configure.in
@@ -0,0 +1,22 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+dnl The standard hppa assembler uses `;' to start comments and `!'
+dnl as a line separator.
+hppa*linux*)
+AC_CACHE_CHECK(for assembler line separator,
+ libc_cv_asm_line_sep, [dnl
+cat > conftest.s <<EOF
+nop ; is_old_puffin
+EOF
+if AC_TRY_COMMAND(${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_asm_line_sep='!'
+else
+ if test -z "$enable_hacker_mode"; then
+ echo "*** You need a newer assembler to compile glibc"
+ rm -f conftest*
+ exit 1
+ fi
+ libc_cv_asm_line_sep=';'
+fi
+rm -f conftest*])
+AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99e519ba0a2a6912b32b44d53774c0a7210e37cc
commit 99e519ba0a2a6912b32b44d53774c0a7210e37cc
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 26 01:33:30 2004 +0000
2004-10-25 Roland McGrath <roland@frob.com>
* sysdeps/cris/configure.in: New file, with test moved out of main
libc configure.in file.
* sysdeps/cris/configure: New generated file.
diff --git a/sysdeps/cris/configure b/sysdeps/cris/configure
new file mode 100755
index 0000000..205bbac
--- /dev/null
+++ b/sysdeps/cris/configure
@@ -0,0 +1,7 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+
+libc_cv_asm_line_sep='@'
+cat >>confdefs.h <<_ACEOF
+#define ASM_LINE_SEP $libc_cv_asm_line_sep
+_ACEOF
+
diff --git a/sysdeps/cris/configure.in b/sysdeps/cris/configure.in
new file mode 100644
index 0000000..94bc137
--- /dev/null
+++ b/sysdeps/cris/configure.in
@@ -0,0 +1,5 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+dnl CRIS uses `;' to start comments and `@' for line separator.
+libc_cv_asm_line_sep='@'
+AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe66f7f2143b385888f9ff61fac6295c6e56f23c
commit fe66f7f2143b385888f9ff61fac6295c6e56f23c
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Oct 25 07:16:32 2004 +0000
* ChangeLog.am33: Added emacs local variables for mode setting and
default changelog name.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index b8fd2f1..7fa5c79 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,5 +1,8 @@
2004-10-25 Alexandre Oliva <aoliva@redhat.com>
+ * ChangeLog.am33: Added emacs local variables for mode setting and
+ default changelog name.
+
* sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved...
* sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h:
... here, where it should have been added in the first place.
@@ -211,3 +214,11 @@
* sysdeps/unix/sysv/linux/am33/sysdep.h: New file.
* sysdeps/unix/sysv/linux/am33/bits/fcntl.h: New file.
* sysdeps/unix/sysv/linux/am33/bits/mman.h: New file.
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+change-log-default-name: "ChangeLog.am33"
+End:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbd6a07c568c51ec4e5daca9725d6a2f78296468
commit cbd6a07c568c51ec4e5daca9725d6a2f78296468
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Oct 25 07:11:57 2004 +0000
* sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved...
* sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h:
... here, where it should have been added in the first place.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
index dfca6e8..b8fd2f1 100644
--- a/ChangeLog.am33
+++ b/ChangeLog.am33
@@ -1,3 +1,9 @@
+2004-10-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h: Moved...
+ * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h:
+ ... here, where it should have been added in the first place.
+
2004-10-22 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/unix/sysv/linux/am33/bits/mman.h (PROT_GROWSDOWN): New.
diff --git a/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h
rename to sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c706b040a01487df066208e6f39a22629ccc9463
commit c706b040a01487df066208e6f39a22629ccc9463
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 04:33:14 2004 +0000
add it
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..613f66d
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1 @@
+glibc-ports-*.tar* glibc-port-*.tar*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa3f0bd8c70385da698c71efacbf82e3291df59c
commit aa3f0bd8c70385da698c71efacbf82e3291df59c
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 04:07:10 2004 +0000
.
diff --git a/ChangeLog b/ChangeLog
index 8712997..071fc8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2004-10-22 Roland McGrath <roland@frob.com>
+ * Makefile (dist, dist-ports): New target.
+ (dist-port-%): New pattern rule.
+ * Makeconfig [!subdir] (ports/%): New pattern rule.
+
* configure.in: Cope if there are no sysdeps/*/preconfigure files.
* configure: Regenerated.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=556e06df466df56066f7154ea6c14dd4b3193ea4
commit 556e06df466df56066f7154ea6c14dd4b3193ea4
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 04:07:06 2004 +0000
2004-10-22 Roland McGrath <roland@frob.com>
* Makefile (dist, dist-ports): New target.
(dist-port-%): New pattern rule.
* Makeconfig [!subdir] (ports/%): New pattern rule.
diff --git a/Makeconfig b/Makeconfig
index 20a0f08..92158be 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -33,3 +33,9 @@ $(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \
$(autoconf-it)
endif # $(AUTOCONF) = no
+
+# This allows e.g. `make ports/dist' from a build directory.
+ifndef subdir
+ports/%:
+ $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+endif
diff --git a/Makefile b/Makefile
index 463f278..a65257b 100644
--- a/Makefile
+++ b/Makefile
@@ -4,3 +4,38 @@
subdir = ports
include ../Rules
+
+.PHONY: dist dist-ports
+dist: dist-ports
+
+# Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
+dist-version = $(version)
+# Also try 'dist-tag=some="-r TAG"' (or -D DATE) to get some tag rather
+# than the release tag for X.Y.Z.
+dist-tag = -r glibc-$(subst .,_,$(dist-version))
+
+distname = glibc-ports-$(dist-version)
+
+do-export = cvs $(CVSOPTS) -Q export -d $(basename $@) $(dist-tag)
+
+dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z)
+ md5sum $^
+$(distname).tar:
+ @rm -fr $(basename $@)
+ $(do-export) ports
+ tar cf $@ $(basename $@)
+ rm -fr $(basename $@)
+
+.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
+dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
+ md5sum $^
+glibc-port-%-$(dist-version).tar: configure ChangeLog
+ @rm -fr $(basename $@)
+ $(do-export) -l ports
+ rm -f $(basename $@)/ChangeLog.[a-z]*
+ $(do-export) ports/ChangeLog.$* \
+ ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$*
+ mv $(basename $@)/ports/* $(basename $@)/
+ rmdir $(basename $@)/ports
+ tar cf $@ $(basename $@)
+ rm -fr $(basename $@)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3696a6e9f1ec36503443e0d322060b9fc6878a49
commit 3696a6e9f1ec36503443e0d322060b9fc6878a49
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 03:04:42 2004 +0000
.
diff --git a/ChangeLog b/ChangeLog
index d7b0ea3..8712997 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-22 Roland McGrath <roland@frob.com>
+
+ * configure.in: Cope if there are no sysdeps/*/preconfigure files.
+ * configure: Regenerated.
+
2004-08-16 Roland McGrath <roland@frob.com>
* Makefile: New file.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b189b569598a7deb461bbbdc6d42b72063dc8bd
commit 1b189b569598a7deb461bbbdc6d42b72063dc8bd
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 03:04:33 2004 +0000
2004-10-22 Roland McGrath <roland@frob.com>
* configure.in: Cope if there are no sysdeps/*/preconfigure files.
* configure: Regenerated.
diff --git a/configure b/configure
index e90ab67..77d4ea4 100755
--- a/configure
+++ b/configure
@@ -10,6 +10,7 @@
# collected together into a single shared add-on package.
cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
+test x"$cpu_frags" = x'sysdeps/*/preconfigure' ||
for frag in $cpu_frags; do
echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5
echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6
diff --git a/configure.in b/configure.in
index d37cb8d..93b987a 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,7 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# collected together into a single shared add-on package.
cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
+test x"$cpu_frags" = x'sysdeps/*/preconfigure' ||
for frag in $cpu_frags; do
AC_MSG_RESULT(ports add-on running preconfigure fragment $frag)
. $srcdir/$libc_add_on/$frag
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d115c0d8f666ec4d55ccb8e42ec2c2effd99f75b
commit d115c0d8f666ec4d55ccb8e42ec2c2effd99f75b
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Oct 23 00:33:35 2004 +0000
Added Matsushita AM33/2.0 port.
diff --git a/ChangeLog.am33 b/ChangeLog.am33
new file mode 100644
index 0000000..dfca6e8
--- /dev/null
+++ b/ChangeLog.am33
@@ -0,0 +1,207 @@
+2004-10-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/bits/mman.h (PROT_GROWSDOWN): New.
+ (PROT_GROWSUP): New.
+
+2004-08-16 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/shlib-versions: Moved from top level.
+
+2004-08-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/preconfigure: Renamed from configure.
+ * Makefile: Removed.
+
+2004-07-20 Alexandre Oliva <aoliva@redhat.com>
+
+ Moved from separate linuxthreads tree into am33/linuxthreads
+ subdirs:
+ 2004-07-01 Alexandre Oliva <aoliva@redhat.com>
+ * sysdeps/unix/sysv/linux/am33/linuxthreads/sysdep-cancel.h
+ (PSEUDO): Save value returned by CENABLE and pass it to CDISABLE.
+ * sysdeps/am33/linuxthreads/pt-machine.h (testandset): Take
+ volatile argument. Improve asm statement.
+ 2001-10-31 Alexandre Oliva <aoliva@redhat.com>
+ * sysdeps/am33/linuxthreads/pspinlock.c: New file.
+ * sysdeps/am33/linuxthreads/pt-machine.h: New file.
+
+2004-07-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: New.
+ * mach.sh: Removed.
+ * sysdeps/am33/Makefile: Likewise.
+
+2004-06-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/Makefile: New file.
+ * sysdeps/unix/sysv/linux/am33/configure.in: New file.
+ * sysdeps/unix/sysv/linux/am33/configure: New file.
+ * mach.sh: New file.
+
+2004-06-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/fpu/bits/fenv.h: New file.
+ * sysdeps/am33/fpu/fpu_control.h: New file.
+ * sysdeps/am33/fpu/fenv_libc.h: New file.
+ * sysdeps/am33/fpu/fclrexcpt.c: New file.
+ * sysdeps/am33/fpu/fedisblxcpt.c: New file.
+ * sysdeps/am33/fpu/feenablxcpt.c: New file.
+ * sysdeps/am33/fpu/fegetenv.c: New file.
+ * sysdeps/am33/fpu/fegetexcept.c: New file.
+ * sysdeps/am33/fpu/fegetround.c: New file.
+ * sysdeps/am33/fpu/feholdexcpt.c: New file.
+ * sysdeps/am33/fpu/fesetenv.c: New file.
+ * sysdeps/am33/fpu/fesetround.c: New file.
+ * sysdeps/am33/fpu/feupdateenv.c: New file.
+ * sysdeps/am33/fpu/fgetexcptflg.c: New file.
+ * sysdeps/am33/fpu/fraiseexcpt.c: New file.
+ * sysdeps/am33/fpu/fsetexcptflg.c: New file.
+ * sysdeps/am33/fpu/ftestexcept.c: New file.
+
+ * sysdeps/unix/am33/sysdep.h: Use relative pathnames.
+ * sysdeps/unix/sysv/linux/am33/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/am33/sysdep.S: Likewise.
+ * configure, Makefile: Do nothing.
+
+2004-06-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/bsd-setjmp.S: Move into...
+ * sysdeps/am33/setjmp.S: ... this file.
+ * sysdeps/am33/bsd-_setjmp.S: Likewise.
+ * sysdeps/am33/dl-machine.h (_dl_start_user): Do not do double
+ indirection to obtain _dl_loaded.
+ (elf_machine_rela_relative): Do not add addend.
+
+2004-06-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/sysdep.h (JUMPTARGET): Undef before redefining.
+ * sysdeps/unix/sysv/linux/am33/sysdep.h (PSEUDO_NOERROR,
+ PSEUDO_END_NOERROR, ret_NOERROR, PSEUDO_ERRVAL, PSEUDO_END_ERRVAL,
+ ret_ERRVAL, INTERNAL_SYSCALL, INTERNAL_SYSCALL_DECL,
+ INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New.
+ (INLINE_SYSCALL): Rewrite in terms of INTERNAL_SYSCALL macros.
+ (DO_CALL): Reorder arguments.
+ * sysdeps/am33/dl-machine.h (elf_machine_rela): Update prototype.
+
+2003-05-16 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/Makefile: New file.
+ * sysdeps/unix/sysv/linux/am33/sysdep.h (INLINE_SYSCALL1): Drop
+ comma before args when calling inline_syscall0.
+ * sysdeps/unix/sysv/linux/am33/chown.c: New file.
+ * sysdeps/unix/sysv/linux/am33/fchown.c: New file.
+ * sysdeps/unix/sysv/linux/am33/fxstat.c: New file.
+ * sysdeps/unix/sysv/linux/am33/getegid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/geteuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/getgid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/getrlimit.c: New file.
+ * sysdeps/unix/sysv/linux/am33/getuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/lchown.c: New file.
+ * sysdeps/unix/sysv/linux/am33/lockf64.c: New file.
+ * sysdeps/unix/sysv/linux/am33/lxstat.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setegid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/seteuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setfsgid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setfsuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setgid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setregid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setresgid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setresuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setreuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setrlimit.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setuid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/xstat.c: New file.
+ * sysdeps/unix/sysv/linux/am33/syscalls.list: Removed, reverting
+ 2003-03-26's patch.
+ * sysdeps/unix/sysv/linux/am33/getresgid.c: New file.
+ * sysdeps/unix/sysv/linux/am33/getresuid.c: New file.
+
+2003-05-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/getgroups.c: New file.
+ * sysdeps/unix/sysv/linux/am33/setgroups.c: New file.
+
+2003-05-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/getmsg.c: New file.
+ * sysdeps/unix/sysv/linux/am33/putmsg.c: New file.
+
+2003-03-26 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/syscalls.list: Added getresuid and
+ getresgid.
+
+2003-01-17 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/fcntl.c: New file.
+
+2002-02-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/sys/ucontext.h (fpregset_t): Make it a structure.
+
+2002-01-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/sys/ucontext.h (NFREG): Increment by 1, to make
+ room for FPCR.
+
+2001-12-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * shlib-versions: Set GLIBC_2.2.5 as the earliest symbol set.
+
+2001-12-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/am33/__longjmp.S: Tabify.
+ * sysdeps/am33/setjmp.S: Likewise.
+ * sysdeps/am33/dl-debug.h: Remove.
+ * sysdeps/am33/dl-machine.h: Delete commented-out uses of
+ macros defined in dl-debug.
+ (elf_machine_rela): Optimize if HAVE_Z_COMBRELOC. Fix
+ prediction of R_MN10300_NONE. Don't test for impossible
+ condition.
+ * sysdeps/am33/sysdep.h (ASM_TYPE_DIRECTIVE,
+ ASM_SIZE_DIRECTIVE): Define to nothing if ! HAVE_ELF.
+
+2001-11-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/clone.S: Avoid branch overflow in
+ static link.
+
+2001-11-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/clone.S: Load arguments correctly
+ for syscall.
+
+2001-11-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * sysdeps/unix/sysv/linux/am33/clone.S: Fix argument-passing
+ to thread_start.
+
+2001-10-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * shlib-versions: Added am33_2.0 support.
+ * sysdeps/am33/Implies: New file.
+ * sysdeps/am33/__longjmp.S: New file.
+ * sysdeps/am33/atomicity.h: New file.
+ * sysdeps/am33/bsd-_setjmp.S: New file.
+ * sysdeps/am33/bsd-setjmp.S: New file.
+ * sysdeps/am33/dl-debug.h: New file.
+ * sysdeps/am33/dl-machine.h: New file.
+ * sysdeps/am33/memusage.h: New file.
+ * sysdeps/am33/setjmp.S: New file.
+ * sysdeps/am33/stackinfo.h: New file.
+ * sysdeps/am33/sysdep.h: New file.
+ * sysdeps/am33/bits/endian.h: New file.
+ * sysdeps/am33/bits/setjmp.h: New file.
+ * sysdeps/am33/elf/start.S: New file.
+ * sysdeps/am33/sys/ucontext.h: New file.
+ * sysdeps/unix/am33/sysdep.S: New file.
+ * sysdeps/unix/am33/sysdep.h: New file.
+ * sysdeps/unix/sysv/linux/am33/brk.c: New file.
+ * sysdeps/unix/sysv/linux/am33/clone.S: New file.
+ * sysdeps/unix/sysv/linux/am33/profil-counter.h: New file.
+ * sysdeps/unix/sysv/linux/am33/socket.S: New file.
+ * sysdeps/unix/sysv/linux/am33/syscall.S: New file.
+ * sysdeps/unix/sysv/linux/am33/sysdep.S: New file.
+ * sysdeps/unix/sysv/linux/am33/sysdep.h: New file.
+ * sysdeps/unix/sysv/linux/am33/bits/fcntl.h: New file.
+ * sysdeps/unix/sysv/linux/am33/bits/mman.h: New file.
diff --git a/sysdeps/am33/Implies b/sysdeps/am33/Implies
new file mode 100644
index 0000000..780c4e2
--- /dev/null
+++ b/sysdeps/am33/Implies
@@ -0,0 +1,3 @@
+wordsize-32
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/am33/__longjmp.S b/sysdeps/am33/__longjmp.S
new file mode 100644
index 0000000..9bdcc48
--- /dev/null
+++ b/sysdeps/am33/__longjmp.S
@@ -0,0 +1,61 @@
+/* longjmp for AM33.
+ Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
+#include <asm-syntax.h>
+
+ENTRY (__longjmp)
+ mov d0,a0
+ mov (8,a0),d2
+ mov d2,mdr
+ mov (0,a0),d2
+ mov (4,a0),d3
+ mov (12,a0),a2
+ mov (16,a0),a3
+ mov (20,a0),a1
+ mov a1,sp
+ add 24,a0
+ mov (a0+),r4
+ mov (a0+),r5
+ mov (a0+),r6
+ mov (a0+),r7
+#ifdef __AM33_2__
+ fmov (a0+),fs4
+ fmov (a0+),fs5
+ fmov (a0+),fs6
+ fmov (a0+),fs7
+ fmov (a0+),fs8
+ fmov (a0+),fs9
+ fmov (a0+),fs10
+ fmov (a0+),fs11
+ fmov (a0+),fs12
+ fmov (a0+),fs13
+ fmov (a0+),fs14
+ fmov (a0+),fs15
+ fmov (a0+),fs16
+ fmov (a0+),fs17
+ fmov (a0+),fs18
+ fmov (a0+),fs19
+#endif
+ mov d1,d0
+ retf [],0
+END (__longjmp)
diff --git a/sysdeps/am33/atomicity.h b/sysdeps/am33/atomicity.h
new file mode 100644
index 0000000..d776533
--- /dev/null
+++ b/sysdeps/am33/atomicity.h
@@ -0,0 +1,87 @@
+/* Low-level functions for atomic operations. AM33 version.
+ Copyright 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../sparc/sparc32/atomicity.h
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H 1
+
+#include <inttypes.h>
+
+#define __acquire_lock(lock) \
+ __asm__ __volatile__("1: bset %1, (%0)\n\t" \
+ " beq 1b" \
+ : : "a" (&(lock)), "d" (1) \
+ : "memory")
+
+#define __release_lock(lock) lock = 0
+
+static int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ static unsigned char lock;
+ int result;
+
+ __acquire_lock (lock);
+
+ result = *mem;
+ *mem += val;
+
+ __release_lock (lock);
+
+ return result;
+}
+
+static void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ static unsigned char lock;
+
+ __acquire_lock (lock);
+
+ *mem += val;
+
+ __release_lock (lock);
+}
+
+static int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ static unsigned char lock;
+ int ret;
+
+ __acquire_lock (lock);
+
+ if (*p != oldval)
+ ret = 0;
+ else
+ {
+ *p = newval;
+ ret = 1;
+ }
+
+ __release_lock (lock);
+
+ return ret;
+}
+
+#endif /* atomicity.h */
diff --git a/sysdeps/am33/bits/endian.h b/sysdeps/am33/bits/endian.h
new file mode 100644
index 0000000..7423f09
--- /dev/null
+++ b/sysdeps/am33/bits/endian.h
@@ -0,0 +1,7 @@
+/* AM33 is little-endian. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/am33/bits/setjmp.h b/sysdeps/am33/bits/setjmp.h
new file mode 100644
index 0000000..5864b92
--- /dev/null
+++ b/sysdeps/am33/bits/setjmp.h
@@ -0,0 +1,34 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Define the machine-dependent type `jmp_buf'. AM33 version. */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+typedef int __jmp_buf[26];
+#endif
+
+#define __JMP_BUF_SP 20
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
diff --git a/sysdeps/am33/bsd-_setjmp.S b/sysdeps/am33/bsd-_setjmp.S
new file mode 100644
index 0000000..9bbfcbb
--- /dev/null
+++ b/sysdeps/am33/bsd-_setjmp.S
@@ -0,0 +1 @@
+/* _setjmp is in setjmp.S */
diff --git a/sysdeps/am33/bsd-setjmp.S b/sysdeps/am33/bsd-setjmp.S
new file mode 100644
index 0000000..b6b239e
--- /dev/null
+++ b/sysdeps/am33/bsd-setjmp.S
@@ -0,0 +1 @@
+/* setjmp is in setjmp.S */
diff --git a/sysdeps/am33/dl-machine.h b/sysdeps/am33/dl-machine.h
new file mode 100644
index 0000000..808fd9c
--- /dev/null
+++ b/sysdeps/am33/dl-machine.h
@@ -0,0 +1,481 @@
+/* Machine-dependent ELF dynamic relocation inline functions. AM33 version.
+ Copyright (C) 1995,96,97,98,99,2000,2001, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "mn10300"
+
+#include <sys/param.h>
+
+/* Return nonzero iff ELF header is compatible with the running host. */
+static inline int __attribute__ ((unused))
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
+{
+ return ehdr->e_machine == EM_MN10300;
+}
+
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr __attribute__ ((unused))
+elf_machine_dynamic (void)
+{
+ register Elf32_Addr *got asm ("a2");
+ return *got;
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline Elf32_Addr __attribute__ ((unused))
+elf_machine_load_address (void)
+{
+ register Elf32_Addr gotaddr asm ("a2");
+ Elf32_Addr off, gotval;
+
+ asm ("mov _dl_start@GOTOFF,%0" : "=r" (off));
+ asm ("mov (_dl_start@GOT,%1),%0" : "=r" (gotval) : "r" (gotaddr));
+
+ return off + gotaddr - gotval;
+}
+
+#if !defined PROF && !__BOUNDED_POINTERS__
+/* We add a declaration of this function here so that in dl-runtime.c
+ the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters
+ in registers.
+
+ We cannot use this scheme for profiling because the _mcount call
+ destroys the passed register information. */
+/* GKM FIXME: Fix trampoline to pass bounds so we can do
+ without the `__unbounded' qualifier. */
+static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
+ __attribute__ ((unused));
+static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
+ ElfW(Addr) retaddr)
+ __attribute__ ((unused));
+#endif
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int __attribute__ ((unused))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ Elf32_Addr *got;
+ extern void _dl_runtime_resolve (Elf32_Word) attribute_hidden;
+ extern void _dl_runtime_profile (Elf32_Word) attribute_hidden;
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* The GOT entries for functions in the PLT have not yet been filled
+ in. Their initial contents will arrange when called to push an
+ offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
+ and then jump to _GLOBAL_OFFSET_TABLE[2]. */
+ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
+
+ /* The got[2] entry contains the address of a function which gets
+ called to get the address of a so far unresolved function and
+ jump to it. The profiling extension of the dynamic linker allows
+ to intercept the calls to collect information. In this case we
+ don't store the address in the GOT so that all future calls also
+ end in this function. */
+ if (__builtin_expect (profile, 0))
+ {
+ got[2] = (Elf32_Addr) &_dl_runtime_profile;
+
+ if (_dl_name_match_p (GLRO(dl_profile), l))
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ GL(dl_profile_map) = l;
+ }
+ else
+ /* This function will get called to fix up the GOT entry indicated by
+ the offset on the stack, and then jump to the resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+
+ return lazy;
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
+#if !defined PROF && !__BOUNDED_POINTERS__
+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve, @function\n\
+_dl_runtime_resolve:\n\
+ add -12,sp # Preserve registers otherwise clobbered.\n\
+ mov d1,(20,sp)\n\
+ mov d0,(16,sp)\n\
+ mov r1,d0\n\
+ mov r0,d1\n\
+ call fixup,[],0 # Call resolver.\n\
+ mov d0,a0\n\
+ mov (12,sp),d1 # Copy return address back to mdr,\n\
+ mov d1,mdr # in case the callee returns with retf\n\
+ mov (16,sp),d0 # Get register content back.\n\
+ mov (20,sp),d1\n\
+ add 12,sp\n\
+ jmp (a0)\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_profile, @function\n\
+_dl_runtime_profile:\n\
+ add -12,sp # Preserve registers otherwise clobbered.\n\
+ mov d1,(20,sp)\n\
+ mov d0,(16,sp)\n\
+ mov r1,d0\n\
+ mov r0,d1\n\
+ call profile_fixup,[],0 # Call resolver.\n\
+ mov d0,a0\n\
+ mov (12,sp),d1 # Copy return address back to mdr,\n\
+ mov d1,mdr # in case the callee returns with retf\n\
+ mov (16,sp),d0 # Get register content back.\n\
+ mov (20,sp),d1\n\
+ add 12,sp\n\
+ jmp (a0)\n\
+ .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+ .previous\n\
+");
+#else
+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_resolve, @function\n\
+ .type _dl_runtime_profile, @function\n\
+_dl_runtime_resolve:\n\
+_dl_runtime_profile:\n\
+ add -12,sp # Preserve registers otherwise clobbered.\n\
+ mov d1,(20,sp)\n\
+ mov d0,(16,sp)\n\
+ mov r1,d0\n\
+ mov r0,d1\n\
+ call profile_fixup,[],0 # Call resolver.\n\
+ mov d0,a0\n\
+ mov (12,sp),d1 # Copy return address back to mdr,\n\
+ mov d1,mdr # in case the callee returns with retf\n\
+ mov (16,sp),d0 # Get register content back.\n\
+ mov (20,sp),d1\n\
+ add 12,sp\n\
+ jmp (a0)\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+ .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+ .previous\n\
+");
+#endif
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+#define RTLD_START asm ("\n\
+ .text\n\
+.globl _start\n\
+.globl _dl_start_user\n\
+_start:\n\
+ mov 0,a3 # Mark the top of the stack\n\
+ mov sp,a1\n\
+ add -20,sp # Prepare for function call\n\
+ mov a1,d0\n\
+ call _dl_start,[],0\n\
+_dl_start_user:\n\
+ # Save the user entry point address in d2.\n\
+ mov d0,d2\n\
+ # Point a2 at the GOT.\n\
+0: mov pc,a2\n\
+ add _GLOBAL_OFFSET_TABLE_ - (0b-.),a2\n\
+ # Store the highest stack address\n\
+ mov (__libc_stack_end@GOT,a2),a0\n\
+ mov a1,(a0)\n\
+ # See if we were run as a command with the executable file\n\
+ # name as an extra leading argument.\n\
+ mov (_dl_skip_args@GOT,a2),a0\n\
+ mov (a0),d0\n\
+ # Pop the original argument count.\n\
+ mov (20,sp),d3\n\
+ # Subtract _dl_skip_args from it.\n\
+ sub d0,d3\n\
+ # Adjust the stack pointer to skip _dl_skip_args words.\n\
+ asl2 d0\n\
+ mov sp,a0\n\
+ add d0,a0\n\
+ mov a0,sp\n\
+ # Push argc back on the stack.\n\
+ mov d3,(20,sp)\n\
+ # The special initializer gets called with the stack just\n\
+ # as the application's entry point will see it; it can\n\
+ # switch stacks if it moves these contents over.\n\
+" RTLD_START_SPECIAL_INIT "\n\
+ # Load the parameters again.\n\
+ # (d0, d1, (12,sp), (16,sp)) = (_dl_loaded, argc, argv, envp)\n\
+ add 24,a0\n\
+ mov a0,(12,sp) # a0 is 24+sp\n\
+ mov d3,d1 # d3 contained argc\n\
+ inc d3\n\
+ asl2 d3 # d3 is now (argc+1)*4,\n\
+ add d3,a0 # the offset between argv and envp\n\
+ mov a0,(16,sp)\n\
+ mov (_rtld_local@GOTOFF,a2),d0\n\
+ # Call the function to run the initializers.\n\
+ call _dl_init@PLT,[],0\n\
+ # Pass our finalizer function to the user in d0, as per ELF ABI.\n\
+ mov (_dl_fini@GOT,a2),d0\n\
+ add 20,sp\n\
+ # Jump to the user's entry point.\n\
+ mov d2,a1\n\
+ jmp (a1)\n\
+ .previous\n\
+");
+
+#ifndef RTLD_START_SPECIAL_INIT
+#define RTLD_START_SPECIAL_INIT /* nothing */
+#endif
+
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_MN10300_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_MN10300_COPY) * ELF_RTYPE_CLASS_COPY))
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_JMP_SLOT R_MN10300_JMP_SLOT
+
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr value)
+{
+ return value + reloc->r_addend;
+}
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
+/* The mn10300 never uses Elf32_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ void *const reloc_addr_arg)
+{
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+ Elf32_Addr value, *reloc_addr;
+
+ /* Make sure we drop any previous alignment assumptions. */
+ asm ("" : "=r" (reloc_addr) : "0" (reloc_addr_arg));
+
+#define COPY_UNALIGNED_WORD(sw, tw, align) \
+ { \
+ unsigned long *__sl = (void*)&(sw), *__tl = (void*)&(tw); \
+ unsigned short *__ss = (void*)&(sw), *__ts = (void*)&(tw); \
+ unsigned char *__sc = (void*)&(sw), *__tc = (void*)&(tw); \
+ switch ((align)) \
+ { \
+ case 0: \
+ *__tl = *__sl; \
+ break; \
+ case 2: \
+ *__ts++ = *__ss++; \
+ *__ts = *__ss; \
+ break; \
+ default: \
+ *__tc++ = *__sc++; \
+ *__tc++ = *__sc++; \
+ *__tc++ = *__sc++; \
+ *__tc = *__sc; \
+ break; \
+ } \
+ }
+
+#define COPY_UNALIGNED_HALFWORD(sw, tw, align) \
+ { \
+ unsigned short *__ss = (void*)&(sw), *__ts = (void*)&(tw); \
+ unsigned char *__sc = (void*)&(sw), *__tc = (void*)&(tw); \
+ switch ((align)) \
+ { \
+ case 0: \
+ *__ts = *__ss; \
+ break; \
+ default: \
+ *__tc++ = *__sc++; \
+ *__tc = *__sc; \
+ break; \
+ } \
+ }
+
+#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
+ if (__builtin_expect (r_type == R_MN10300_RELATIVE, 0))
+ {
+# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link.
+ This declaration cannot be done when compiling rtld.c (i.e.
+ #ifdef RTLD_BOOTSTRAP) because rtld.c contains the common
+ defn for _dl_rtld_map, which is incompatible with a weak decl
+ in the same file. */
+ weak_extern (_dl_rtld_map);
+ if (map != &_dl_rtld_map) /* Already done in rtld itself. */
+# endif
+ {
+ COPY_UNALIGNED_WORD (*reloc_addr, value, (int) reloc_addr & 3);
+ value += map->l_addr;
+ COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3);
+ }
+ }
+# ifndef RTLD_BOOTSTRAP
+ else if (__builtin_expect (r_type == R_MN10300_NONE, 0))
+ return;
+# endif
+ else
+#endif
+ {
+#ifndef RTLD_BOOTSTRAP
+ const Elf32_Sym *const refsym = sym;
+#endif
+
+ value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ if (sym)
+ value += sym->st_value;
+ value += reloc->r_addend; /* Assume copy relocs have zero addend. */
+
+ switch (r_type)
+ {
+#ifndef RTLD_BOOTSTRAP
+ case R_MN10300_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (sym->st_size > refsym->st_size
+ || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
+ {
+ extern char **_dl_argv;
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_argv[0] ?: "<program name unknown>",
+ strtab + refsym->st_name);
+ }
+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
+ refsym->st_size));
+ break;
+#endif
+ case R_MN10300_GLOB_DAT:
+ case R_MN10300_JMP_SLOT:
+ /* These addresses are always aligned. */
+ *reloc_addr = value;
+ break;
+ case R_MN10300_32:
+ COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3);
+ break;
+#ifndef RTLD_BOOTSTRAP
+ case R_MN10300_16:
+ COPY_UNALIGNED_HALFWORD (value, *reloc_addr, (int) reloc_addr & 1);
+ break;
+ case R_MN10300_8:
+ *(char *) reloc_addr = value;
+ break;
+ case R_MN10300_PCREL32:
+ value -= (Elf32_Addr) reloc_addr;
+ COPY_UNALIGNED_WORD (value, *reloc_addr, (int) reloc_addr & 3);
+ break;
+ case R_MN10300_PCREL16:
+ value -= (Elf32_Addr) reloc_addr;
+ COPY_UNALIGNED_HALFWORD (value, *reloc_addr, (int) reloc_addr & 1);
+ break;
+ case R_MN10300_PCREL8:
+ value -= (Elf32_Addr) reloc_addr;
+ *(char *) reloc_addr = (value - (Elf32_Addr) reloc_addr);
+ break;
+#endif
+ case R_MN10300_NONE: /* Alright, Wilbur. */
+ break;
+#if !defined RTLD_BOOTSTRAP || defined _NDEBUG
+ default:
+ _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
+ break;
+#endif
+ }
+
+ }
+}
+
+static inline void
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ void *const reloc_addr_arg)
+{
+ Elf32_Addr value, *reloc_addr;
+
+ asm ("" : "=r" (reloc_addr) : "0" (reloc_addr_arg));
+
+ COPY_UNALIGNED_WORD (*reloc_addr, value, (int)reloc_addr & 3);
+ value += l_addr;
+ COPY_UNALIGNED_WORD (value, *reloc_addr, (int)reloc_addr & 3);
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map,
+ Elf32_Addr l_addr, const Elf32_Rela *reloc)
+{
+ unsigned long int const r_type = ELF32_R_TYPE (reloc->r_info);
+
+ /* Check for unexpected PLT reloc type. */
+ if (__builtin_expect (r_type, R_MN10300_JMP_SLOT) == R_MN10300_JMP_SLOT)
+ {
+ Elf32_Addr* const reloc_addr = (void *)(l_addr + reloc->r_offset);
+ Elf32_Addr value;
+
+ /* Perform a RELATIVE reloc on the .got entry that transfers
+ to the .plt. */
+ COPY_UNALIGNED_WORD (*reloc_addr, value, (int)reloc_addr & 3);
+ value += l_addr;
+ COPY_UNALIGNED_WORD (value, *reloc_addr, (int)reloc_addr & 3);
+ }
+ else if (__builtin_expect (r_type, R_MN10300_NONE) != R_MN10300_NONE)
+ _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1);
+
+}
+
+#endif /* RESOLVE */
diff --git a/sysdeps/am33/elf/start.S b/sysdeps/am33/elf/start.S
new file mode 100644
index 0000000..1b65459
--- /dev/null
+++ b/sysdeps/am33/elf/start.S
@@ -0,0 +1,81 @@
+/* Startup code compliant to the ELF MN10300 ABI.
+ Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ Based on ../../i386/elf/start.S.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
+ point runs, most registers' values are unspecified, except for:
+
+ a0 Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ sp The stack contains the arguments and environment:
+ (4,sp) argc
+ (8,sp) argv[0]
+ ...
+ (4*(argc+1),sp) NULL
+ (4*(argc+2),sp) envp[0]
+ ...
+ NULL
+*/
+
+#include "bp-sym.h"
+
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* Extract the arguments as encoded on the stack and set up
+ the arguments for `main': argc, argv. envp will be determined
+ later in __libc_start_main. */
+ mov sp,a3
+ add -32,sp
+
+ mov a3,(28,sp) /* stack_end. */
+ mov d0,(24,sp) /* rtld_fini. */
+ mov _fini, d3
+ mov d3,(20,sp) /* fini. */
+ mov _init, d2
+ mov d2,(16,sp) /* init. */
+ inc4 a3
+ mov a3,(12,sp) /* argv. */
+
+ /* Set the initial frame pointer as 0, so that the bottom of
+ the stack is clearly marked. */
+ mov 0,a3
+
+ mov (32,sp), d1 /* argc. */
+ mov BP_SYM (main), d0 /* main. */
+
+ /* Call the user's main function, and exit with its value.
+ But let the libc call main. */
+ call BP_SYM (__libc_start_main),[],0
+
+ call BP_SYM (abort),[],0 /* Crash if somehow `exit' does return. */
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
diff --git a/sysdeps/am33/fpu/bits/fenv.h b/sysdeps/am33/fpu/bits/fenv.h
new file mode 100644
index 0000000..04fe293
--- /dev/null
+++ b/sysdeps/am33/fpu/bits/fenv.h
@@ -0,0 +1,67 @@
+/* Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on the corresponding file in the mips port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the EF bit
+ positions of the appropriate bits in the FPCR register. */
+enum
+ {
+ FE_INEXACT = 0x01,
+#define FE_INEXACT FE_INEXACT
+ FE_UNDERFLOW = 0x02,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_OVERFLOW = 0x04,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_DIVBYZERO = 0x08,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_INVALID = 0x10,
+#define FE_INVALID FE_INVALID
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The AM33/2.0 FPU supports only Round to nearest. Bits 3<<16 are
+ reserved to represent other rounding modes. */
+enum
+ {
+ FE_TONEAREST = 0x00000,
+#define FE_TONEAREST FE_TONEAREST
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+
+/* Type representing floating-point environment. */
+typedef unsigned int fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((__const fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
+#endif
diff --git a/sysdeps/am33/fpu/fclrexcpt.c b/sysdeps/am33/fpu/fclrexcpt.c
new file mode 100644
index 0000000..0c98b4e
--- /dev/null
+++ b/sysdeps/am33/fpu/fclrexcpt.c
@@ -0,0 +1,52 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__feclearexcept (int excepts)
+{
+ fpu_control_t cw;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Read the complete control word. */
+ _FPU_GETCW (cw);
+
+ /* Clear exception flag bits and cause bits. EF bits are cleared by
+ assigning 1 to them (and there's no way to set them); other bits
+ are copied normally. */
+
+ cw &= ~((excepts << CAUSE_SHIFT) | FE_ALL_EXCEPT);
+ cw |= excepts;
+
+ /* Put the new data in effect. */
+ _FPU_SETFCW (cw);
+
+ /* Success. */
+ return 0;
+}
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fedisblxcpt.c b/sysdeps/am33/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..b4a5977
--- /dev/null
+++ b/sysdeps/am33/fpu/fedisblxcpt.c
@@ -0,0 +1,42 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+fedisableexcept (int excepts)
+{
+ fpu_control_t new_exc, old_exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (new_exc);
+
+ old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc &= ~(excepts << ENABLE_SHIFT);
+ _FPU_SETCW (new_exc);
+
+ return old_exc;
+}
diff --git a/sysdeps/am33/fpu/feenablxcpt.c b/sysdeps/am33/fpu/feenablxcpt.c
new file mode 100644
index 0000000..0ecaa18
--- /dev/null
+++ b/sysdeps/am33/fpu/feenablxcpt.c
@@ -0,0 +1,42 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+feenableexcept (int excepts)
+{
+ fpu_control_t new_exc, old_exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (new_exc);
+
+ old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc |= excepts << ENABLE_SHIFT;
+ _FPU_SETCW (new_exc);
+
+ return old_exc;
+}
diff --git a/sysdeps/am33/fpu/fegetenv.c b/sysdeps/am33/fpu/fegetenv.c
new file mode 100644
index 0000000..f082801
--- /dev/null
+++ b/sysdeps/am33/fpu/fegetenv.c
@@ -0,0 +1,35 @@
+/* Store current floating-point environment.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__fegetenv (fenv_t *envp)
+{
+ _FPU_GETCW (*envp);
+
+ /* Success. */
+ return 0;
+}
+
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fegetexcept.c b/sysdeps/am33/fpu/fegetexcept.c
new file mode 100644
index 0000000..500a0f8
--- /dev/null
+++ b/sysdeps/am33/fpu/fegetexcept.c
@@ -0,0 +1,35 @@
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+fegetexcept (void)
+{
+ unsigned int exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (exc);
+
+ return (exc & ENABLE_MASK) >> ENABLE_SHIFT;
+}
diff --git a/sysdeps/am33/fpu/fegetround.c b/sysdeps/am33/fpu/fegetround.c
new file mode 100644
index 0000000..2b91407
--- /dev/null
+++ b/sysdeps/am33/fpu/fegetround.c
@@ -0,0 +1,35 @@
+/* Return current rounding direction.
+ Copyright (C) 1998, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+int
+fegetround (void)
+{
+ int cw;
+
+ /* Get control word. */
+ _FPU_GETCW (cw);
+
+ return (cw & ROUND_MASK);
+}
diff --git a/sysdeps/am33/fpu/feholdexcpt.c b/sysdeps/am33/fpu/feholdexcpt.c
new file mode 100644
index 0000000..e90fb67
--- /dev/null
+++ b/sysdeps/am33/fpu/feholdexcpt.c
@@ -0,0 +1,39 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ fpu_control_t cw;
+
+ /* Save the current state. */
+ _FPU_GETCW (cw);
+ *envp = cw;
+
+ /* Clear all exception enable bits and flags. */
+ cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I);
+ _FPU_SETFCW (cw);
+
+ return 0;
+}
diff --git a/sysdeps/am33/fpu/fenv_libc.h b/sysdeps/am33/fpu/fenv_libc.h
new file mode 100644
index 0000000..5081454
--- /dev/null
+++ b/sysdeps/am33/fpu/fenv_libc.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on the corresponding file in the mips port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _FENV_LIBC_H
+#define _FENV_LIBC_H 1
+
+/* Mask for enabling exceptions and for the CAUSE bits. */
+#define ENABLE_MASK 0x003E0U
+#define CAUSE_MASK 0x07C00U
+#define ROUND_MASK 0x30000U
+
+/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits. */
+#define ENABLE_SHIFT 5
+#define CAUSE_SHIFT 10
+
+#endif /* _FENV_LIBC_H */
diff --git a/sysdeps/am33/fpu/fesetenv.c b/sysdeps/am33/fpu/fesetenv.c
new file mode 100644
index 0000000..4c551a5
--- /dev/null
+++ b/sysdeps/am33/fpu/fesetenv.c
@@ -0,0 +1,60 @@
+/* Install given floating-point environment.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__fesetenv (const fenv_t *envp)
+{
+ fpu_control_t cw;
+
+ /* We want to clear all EF bits for the default end IEEE. */
+
+ if (envp == FE_DFL_ENV)
+ _FPU_SETFCW (_FPU_DEFAULT|FE_ALL_EXCEPT);
+ else if (envp == FE_NOMASK_ENV)
+ _FPU_SETFCW (_FPU_IEEE|FE_ALL_EXCEPT);
+ else
+ {
+ fpu_control_t temp;
+
+ _FPU_GETCW (temp);
+ cw = *envp;
+
+ /* If EF bits are cleared and the user requests them to be set,
+ we have to fail, because there's no way to do it. */
+ if (~temp & cw & FE_ALL_EXCEPT)
+ return -1;
+
+ /* We clear EF bits by storing a 1 in them, so flip the
+ FE_ALL_EXCEPT bits. */
+ cw = (cw & ~FE_ALL_EXCEPT) | (~cw & FE_ALL_EXCEPT);
+ _FPU_SETFCW (cw);
+ }
+
+ /* Success. */
+ return 0;
+}
+
+libm_hidden_ver (__fesetenv, fesetenv)
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fesetround.c b/sysdeps/am33/fpu/fesetround.c
new file mode 100644
index 0000000..b1e2b24
--- /dev/null
+++ b/sysdeps/am33/fpu/fesetround.c
@@ -0,0 +1,29 @@
+/* Set current rounding direction.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ /* The only supported rounding mode is to-nearest. Just check
+ whether we're switching to it. */
+ return (round != FE_TONEAREST);
+}
diff --git a/sysdeps/am33/fpu/feupdateenv.c b/sysdeps/am33/fpu/feupdateenv.c
new file mode 100644
index 0000000..e4a0e39
--- /dev/null
+++ b/sysdeps/am33/fpu/feupdateenv.c
@@ -0,0 +1,47 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+ int temp;
+
+ /* Save current exceptions. */
+ _FPU_GETCW (temp);
+ temp &= FE_ALL_EXCEPT;
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the safed exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept (temp);
+
+ /* Success. */
+ return 0;
+}
+
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fgetexcptflg.c b/sysdeps/am33/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..0e8512c
--- /dev/null
+++ b/sysdeps/am33/fpu/fgetexcptflg.c
@@ -0,0 +1,44 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (temp);
+
+ /* We only save the relevant bits here. In particular, care has to be
+ taken with the CAUSE bits, as an inadvertent restore later on could
+ generate unexpected exceptions. */
+
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
+}
+
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fpu_control.h b/sysdeps/am33/fpu/fpu_control.h
new file mode 100644
index 0000000..c0612ba
--- /dev/null
+++ b/sysdeps/am33/fpu/fpu_control.h
@@ -0,0 +1,75 @@
+/* FPU control word bits. AM33/2.0 version.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on the corresponding file in the mips port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* AM33/2.0 FPU floating point control register bits.
+ *
+ * 31-22 -> reserved
+ * 21-18 -> floating-point condition codes (L, G, E, U)
+ * 17-16 -> rounding modes (00 is to-nearest; other values are reserved
+ * 15 -> reserved (read as 0, write with 0)
+ * 14-10 -> Exception Cause (inValid, divZero, Overflow, Underflow, Inexact)
+ * 9- 5 -> Exception Enable
+ * 4- 0 -> Exception Flag, cleared when exception cause is set
+ */
+
+#include <features.h>
+#include <fenv.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_V 0x0200 /* Invalid operation */
+#define _FPU_MASK_Z 0x0100 /* Division by zero */
+#define _FPU_MASK_O 0x0080 /* Overflow */
+#define _FPU_MASK_U 0x0040 /* Underflow */
+#define _FPU_MASK_I 0x0020 /* Inexact operation */
+
+/* rounding control */
+#define _FPU_RC_NEAREST 0x0 /* Only available mode */
+
+#define _FPU_RESERVED 0xffc08000 /* Reserved bits in fpcr */
+
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+ and no interrupts for exceptions, rounding to nearest. */
+
+#define _FPU_DEFAULT 0x0000001f
+
+/* IEEE: same as above, but exceptions */
+#define _FPU_IEEE 0x000003ff
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. _FPU_SETCW is
+ defined such that it won't modify the EF bits, that are cleared
+ when assigned bits that are set. Use SETFCW to get them actually
+ reset. */
+#define _FPU_SETFCW(cw) __asm__ ("fmov %0,fpcr" : : "ri" (cw))
+#define _FPU_SETCW(cw) _FPU_SETFCW((cw) & ~FE_ALL_EXCEPT)
+#define _FPU_GETCW(cw) __asm__ ("fmov fpcr,%0" : "=r" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif /* fpu_control.h */
diff --git a/sysdeps/am33/fpu/fraiseexcpt.c b/sysdeps/am33/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..3405ce5
--- /dev/null
+++ b/sysdeps/am33/fpu/fraiseexcpt.c
@@ -0,0 +1,79 @@
+/* Raise given exceptions.
+ Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the M68K port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <shlib-compat.h>
+
+int
+__feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXCEPTS. But we must raise only one
+ signal at a time. It is important that if the overflow/underflow
+ exception and the divide by zero exception are given at the same
+ time, the overflow/underflow exception follows the divide by zero
+ exception. */
+
+ /* First: invalid exception. */
+ if (excepts & FE_INVALID)
+ {
+ /* One example of a invalid operation is 0 * Infinity. */
+ float x = HUGE_VALF, y = 0.0f;
+ __asm__ __volatile__ ("fmul %1,%0" : "+f" (x) : "f" (y));
+ }
+
+ /* Next: division by zero. */
+ if (excepts & FE_DIVBYZERO)
+ {
+ float x = 1.0f, y = 0.0f;
+ __asm__ __volatile__ ("fdiv %1,%0" : "+f" (x) : "f" (y));
+ }
+
+ /* Next: overflow. */
+ if (excepts & FE_OVERFLOW)
+ {
+ float x = FLT_MAX;
+
+ __asm__ __volatile__ ("fmul %0,%0" : "+f" (x));
+ }
+
+ /* Next: underflow. */
+ if (excepts & FE_UNDERFLOW)
+ {
+ float x = -FLT_MIN;
+
+ __asm__ __volatile__ ("fmul %0,%0" : "+f" (x));
+ }
+
+ /* Last: inexact. */
+ if (excepts & FE_INEXACT)
+ {
+ float x = 1.0f, y = 3.0f;
+ __asm__ __volatile__ ("fdiv %1,%0" : "=f" (x) : "f" (y));
+ }
+
+ /* Success. */
+ return 0;
+}
+
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/fsetexcptflg.c b/sysdeps/am33/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..be315a4
--- /dev/null
+++ b/sysdeps/am33/fpu/fsetexcptflg.c
@@ -0,0 +1,57 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <shlib-compat.h>
+
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fpu_control_t cw, temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (cw);
+
+ /* Make sure the flags we want restored are legal. */
+ excepts &= FE_ALL_EXCEPT;
+ temp = *flagp & excepts;
+
+ /* If EF bits are clear and the user requests them to be set,
+ we have to fail, because there's no way to do it. */
+ if (~(cw & excepts) & temp)
+ return -1;
+
+ /* We clear EF bits by storing a 1 in them, so flip the
+ FE_ALL_EXCEPT bits. */
+ temp = (~temp & FE_ALL_EXCEPT);
+
+ /* Now clear the bits called for, and copy them in from flagp. Note that
+ we ignore all non-flag bits from *flagp, so they don't matter. */
+ cw = (cw & ~FE_ALL_EXCEPT) | temp;
+
+ _FPU_SETFCW (cw);
+
+ /* Success. */
+ return 0;
+}
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/am33/fpu/ftestexcept.c b/sysdeps/am33/fpu/ftestexcept.c
new file mode 100644
index 0000000..0e0db4c
--- /dev/null
+++ b/sysdeps/am33/fpu/ftestexcept.c
@@ -0,0 +1,34 @@
+/* Test exception in current environment.
+ Copyright (C) 1998, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ based on corresponding file in the MIPS port.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fetestexcept (int excepts)
+{
+ int cw;
+
+ /* Get current control word. */
+ _FPU_GETCW (cw);
+
+ return cw & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/am33/linuxthreads/pspinlock.c b/sysdeps/am33/linuxthreads/pspinlock.c
new file mode 100644
index 0000000..5eaf816
--- /dev/null
+++ b/sysdeps/am33/linuxthreads/pspinlock.c
@@ -0,0 +1,74 @@
+/* POSIX spinlock implementation. AM33 version.
+ Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <pthread.h>
+#include "internals.h"
+
+int
+__pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ __asm__ __volatile__("1: bset %1, (%0); beq 1b"
+ : : "a" (lock), "d" (1) : "memory");
+ return 0;
+}
+weak_alias (__pthread_spin_lock, pthread_spin_lock)
+
+
+int
+__pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+ int oldval = 1;
+
+ __asm__ __volatile__ ("bset %0, (%1); beq 1f; clr %0; 1:" :
+ "+d" (oldval) : "a" (lock) : "memory");
+
+ return oldval ? EBUSY : 0;
+}
+weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
+
+
+int
+__pthread_spin_unlock (pthread_spinlock_t *lock)
+{
+ *lock = 0;
+ return 0;
+}
+weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
+
+
+int
+__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
+{
+ /* We can ignore the `pshared' parameter. Since we are busy-waiting
+ all processes which can access the memory location `lock' points
+ to can use the spinlock. */
+ *lock = 0;
+ return 0;
+}
+weak_alias (__pthread_spin_init, pthread_spin_init)
+
+
+int
+__pthread_spin_destroy (pthread_spinlock_t *lock)
+{
+ /* Nothing to do. */
+ return 0;
+}
+weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
diff --git a/sysdeps/am33/linuxthreads/pt-machine.h b/sysdeps/am33/linuxthreads/pt-machine.h
new file mode 100644
index 0000000..ba80bfb
--- /dev/null
+++ b/sysdeps/am33/linuxthreads/pt-machine.h
@@ -0,0 +1,68 @@
+/* Machine-dependent pthreads configuration and inline functions.
+ am33 version.
+ Copyright (C) 1996,1997,1998,1999,2000,2001, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ Based on ../i386/pt-machine.h.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H 1
+
+#ifndef __ASSEMBLER__
+#ifndef PT_EI
+# define PT_EI extern inline
+#endif
+
+/* Get some notion of the current stack. Need not be exactly the top
+ of the stack, just something somewhere in the current frame. */
+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
+
+/* Spinlock implementation; required. */
+PT_EI long int
+testandset (int *spinlock)
+{
+ long int ret = 1;
+
+ /* This won't test&set the entire int, only the least significant
+ byte. I hope this doesn't matter, since we can't do better. */
+ __asm__ __volatile__ ("bset %0, %1; bne 1f; clr %0; 1:" :
+ "+d" (ret), "+m" (*(volatile int *)spinlock));
+
+ return ret;
+}
+
+
+PT_EI int
+get_eflags (void)
+{
+ int res;
+ __asm__ __volatile__ ("mov psw,%0" : "=d" (res));
+ return res;
+}
+
+
+PT_EI void
+set_eflags (int newflags)
+{
+ __asm__ __volatile__ ("mov %0,psw" : : "d" (newflags) : "cc");
+}
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* pt-machine.h */
diff --git a/sysdeps/am33/memusage.h b/sysdeps/am33/memusage.h
new file mode 100644
index 0000000..9913e78
--- /dev/null
+++ b/sysdeps/am33/memusage.h
@@ -0,0 +1,23 @@
+/* Copyright 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define GETSP() ({ uintptr_t stack_ptr; \
+ asm ("mov sp,%0" : "=a" (stack_ptr)); \
+ stack_ptr; })
+
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/am33/preconfigure b/sysdeps/am33/preconfigure
new file mode 100644
index 0000000..9495465
--- /dev/null
+++ b/sysdeps/am33/preconfigure
@@ -0,0 +1,5 @@
+case "$machine" in
+am33*)
+ base_machine=am33 machine=am33
+ ;;
+esac
diff --git a/sysdeps/am33/setjmp.S b/sysdeps/am33/setjmp.S
new file mode 100644
index 0000000..26ec2ed
--- /dev/null
+++ b/sysdeps/am33/setjmp.S
@@ -0,0 +1,80 @@
+/* setjmp for am33.
+ Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
+#include <asm-syntax.h>
+
+
+ENTRY (__sigsetjmp)
+.Lsigsetjmp:
+ /* Save registers. */
+ mov d0,a0
+ mov d2,(0,a0)
+ mov d3,(4,a0)
+ mov mdr,d0
+ mov d0,(8,a0)
+ /* Restore d0 for __sigjmp_save. */
+ mov a0,d0
+ mov a2,(12,a0)
+ mov a3,(16,a0)
+ mov sp,a1
+ mov a1,(20,a0)
+ add 24,a0
+ mov r4,(a0+)
+ mov r5,(a0+)
+ mov r6,(a0+)
+ mov r7,(a0+)
+#ifdef __AM33_2__
+ fmov fs4,(a0+)
+ fmov fs5,(a0+)
+ fmov fs6,(a0+)
+ fmov fs7,(a0+)
+ fmov fs8,(a0+)
+ fmov fs9,(a0+)
+ fmov fs10,(a0+)
+ fmov fs11,(a0+)
+ fmov fs12,(a0+)
+ fmov fs13,(a0+)
+ fmov fs14,(a0+)
+ fmov fs15,(a0+)
+ fmov fs16,(a0+)
+ fmov fs17,(a0+)
+ fmov fs18,(a0+)
+ fmov fs19,(a0+)
+#endif
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ jmp __sigjmp_save
+END (__sigsetjmp)
+
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. */
+ENTRY (setjmp)
+ /* Tail-call setsetjmp with savesigs==1. */
+ mov 1,d1
+ bra .Lsigsetjmp
+END (setjmp)
+
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. */
+ENTRY (_setjmp)
+ /* Tail-call setsetjmp with savesigs==0. */
+ clr d1
+ bra .Lsigsetjmp
+END (_setjmp)
diff --git a/sysdeps/am33/shlib-versions b/sysdeps/am33/shlib-versions
new file mode 100644
index 0000000..ad6ded9
--- /dev/null
+++ b/sysdeps/am33/shlib-versions
@@ -0,0 +1 @@
+am33.*-.*-linux.* DEFAULT GLIBC_2.2.5
diff --git a/sysdeps/am33/stackinfo.h b/sysdeps/am33/stackinfo.h
new file mode 100644
index 0000000..a64027a
--- /dev/null
+++ b/sysdeps/am33/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On am33 the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
diff --git a/sysdeps/am33/sys/ucontext.h b/sysdeps/am33/sys/ucontext.h
new file mode 100644
index 0000000..7995aae
--- /dev/null
+++ b/sysdeps/am33/sys/ucontext.h
@@ -0,0 +1,123 @@
+/* Copyright 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* AM33/2.0 context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* Type for general register. */
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 28
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ REG_D0 = 0,
+#define REG_D0 REG_D0
+ REG_D1,
+#define REG_D1 REG_D1
+ REG_D2,
+#define REG_D2 REG_D2
+ REG_D3,
+#define REG_D3 REG_D3
+ REG_A0,
+#define REG_A0 REG_A0
+ REG_A1,
+#define REG_A1 REG_A1
+ REG_A2,
+#define REG_A2 REG_A2
+ REG_A3,
+#define REG_A3 REG_A3
+ REG_E0,
+#define REG_E0 REG_E0
+ REG_E1,
+#define REG_E1 REG_E1
+ REG_E2,
+#define REG_E2 REG_E2
+ REG_E3,
+#define REG_E3 REG_E3
+ REG_E4,
+#define REG_E4 REG_E4
+ REG_E5,
+#define REG_E5 REG_E5
+ REG_E6,
+#define REG_E6 REG_E6
+ REG_E7,
+#define REG_E7 REG_E7
+ REG_LAR,
+#define REG_LAR REG_LAR
+ REG_LIR,
+#define REG_LIR REG_LIR
+ REG_MDR,
+#define REG_MDR REG_MDR
+ REG_MCVF,
+#define REG_MCVF REG_MCVF
+ REG_MCRL,
+#define REG_MCRL REG_MCRL
+ REG_MCRH,
+#define REG_MCRH REG_MCRH
+ REG_MDRQ,
+#define REG_MDRQ REG_MDRQ
+ REG_SP,
+#define REG_SP REG_SP
+ REG_EPSW,
+#define REG_EPSW REG_EPSW
+ REG_PC,
+#define REG_PC REG_PC
+};
+
+typedef int freg_t;
+
+/* Structure to describe FPU registers. */
+typedef struct {
+ union {
+ double fp_dregs[16];
+ float fp_fregs[32];
+ freg_t fp_regs[32];
+ } regs;
+ freg_t fpcr;
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[5];
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/am33/sysdep.h b/sysdeps/am33/sysdep.h
new file mode 100644
index 0000000..efd0527
--- /dev/null
+++ b/sysdeps/am33/sysdep.h
@@ -0,0 +1,82 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/sysdep.h.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembler. */
+
+#ifdef HAVE_ELF
+/* For ELF we need the `.type' directive to make shared libs work right. */
+#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
+
+/* In ELF C symbols are asm symbols. */
+#undef NO_UNDERSCORES
+#define NO_UNDERSCORES
+#else
+#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
+#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
+#endif
+
+/* Define an entry point visible from C. */
+#define ENTRY(name) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
+ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ C_LABEL(name) \
+ CALL_MCOUNT
+
+#undef END
+#define END(name) \
+ ASM_SIZE_DIRECTIVE(name) \
+
+/* If compiled for profiling, call `mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT \
+ movm [a3],(sp); mov sp,a3; add -12,sp; \
+ call JUMPTARGET(mcount),[],0; add 12,sp; movm (sp),[a3];
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+#ifdef NO_UNDERSCORES
+/* Since C identifiers are not normally prefixed with an underscore
+ on this system, the asm identifier `syscall_error' intrudes on the
+ C name space. Make sure we use an innocuous name. */
+#define syscall_error __syscall_error
+#define mcount _mcount
+#endif
+
+#undef JUMPTARGET
+#ifdef PIC
+#define JUMPTARGET(name) name##@PLT
+#else
+#define JUMPTARGET(name) name
+#endif
+
+/* Local label name for asm code. */
+#ifndef L
+#define L(name) name
+#endif
+
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/am33/sysdep.S b/sysdeps/unix/am33/sysdep.S
new file mode 100644
index 0000000..d6df22e
--- /dev/null
+++ b/sysdeps/unix/am33/sysdep.S
@@ -0,0 +1,64 @@
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/sysdep.S.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <bits/errno.h>
+
+.globl C_SYMBOL_NAME(errno)
+.globl syscall_error
+
+#undef syscall_error
+#ifdef NO_UNDERSCORES
+__syscall_error:
+#else
+syscall_error:
+#endif
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ cmp EWOULDBLOCK_sys,d0 /* Is it the old EWOULDBLOCK? */
+ bne .Lnotb /* Branch if not. */
+ mov EAGAIN,d0 /* Yes; translate it to EAGAIN. */
+.Lnotb:
+#endif
+#ifndef PIC
+# ifndef _LIBC_REENTRANT
+ mov d0,(C_SYMBOL_NAME (errno))
+# else
+ movm [d2],(sp)
+ add -12,sp
+ mov d0,d2
+ call __errno_location,[],0
+ mov d2,(a0)
+ add 12,sp
+ movm (sp),[d2]
+# endif
+#else
+# error "This shouldn't be assembled for PIC"
+#endif
+ mov -1,d0
+ mov d0,a0
+ ret
+
+#undef __syscall_error
+END (__syscall_error)
diff --git a/sysdeps/unix/am33/sysdep.h b/sysdeps/unix/am33/sysdep.h
new file mode 100644
index 0000000..11578e7
--- /dev/null
+++ b/sysdeps/unix/am33/sysdep.h
@@ -0,0 +1,33 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/sysdep.h.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+#include "../../am33/sysdep.h"
+
+#ifdef __ASSEMBLER__
+
+#define r0 d0 /* Normal return-value register. */
+#define r1 !!!! /* Secondary return-value register. */
+#define scratch d1 /* Call-clobbered register for random use. */
+#define MOVE(x,y) mov x, y
+
+#define ret ret [],0
+
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/am33/Makefile b/sysdeps/unix/sysv/linux/am33/Makefile
new file mode 100644
index 0000000..ece39e8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),misc)
+sysdep_routines += setfsgid setfsuid
+endif
diff --git a/sysdeps/unix/sysv/linux/am33/bits/fcntl.h b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
new file mode 100644
index 0000000..4c276c5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
@@ -0,0 +1,179 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#ifdef __USE_GNU
+# define O_DIRECT 040000 /* Direct disk access. */
+# define O_DIRECTORY 0200000 /* Must be a directory. */
+# define O_NOFOLLOW 0400000 /* Do not follow links. */
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0100000
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 12 /* Get record locking info. */
+#define F_SETLK64 13 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
+
+#if defined __USE_BSD || defined __USE_XOPEN2K
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
+
+/* For old implementation of bsd flock(). */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation. */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
diff --git a/sysdeps/unix/sysv/linux/am33/bits/mman.h b/sysdeps/unix/sysv/linux/am33/bits/mman.h
new file mode 100644
index 0000000..99fceda
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/bits/mman.h
@@ -0,0 +1,97 @@
+/* Definitions for POSIX memory map interface. Linux/AM33 version.
+ Copyright (C) 1997, 2000, 2001, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x2000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
diff --git a/sysdeps/unix/sysv/linux/am33/brk.c b/sysdeps/unix/sysv/linux/am33/brk.c
new file mode 100644
index 0000000..f567363
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/brk.c
@@ -0,0 +1,46 @@
+/* brk system call for Linux/am33.
+ Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/brk.c.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* This must be initialized data because commons can't have aliases. */
+void *__curbrk = 0;
+
+int
+__brk (void *addr)
+{
+ void *newbrk;
+
+ newbrk = INLINE_SYSCALL (brk, 1, __ptrvalue (addr));
+
+ __curbrk = newbrk;
+
+ if (newbrk < addr)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/am33/chown.c b/sysdeps/unix/sysv/linux/am33/chown.c
new file mode 100644
index 0000000..819923e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/chown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/chown.c>
diff --git a/sysdeps/unix/sysv/linux/am33/clone.S b/sysdeps/unix/sysv/linux/am33/clone.S
new file mode 100644
index 0000000..26ba740
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/clone.S
@@ -0,0 +1,81 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/clone.S.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#include <asm-syntax.h>
+#include <bp-sym.h>
+
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+
+ .text
+ENTRY (BP_SYM (__clone))
+ /* Sanity check arguments. */
+ cmp 0,d0 /* no NULL function pointers */
+ beq L(error_inval)
+ cmp 0,d1 /* no NULL stack pointers */
+ beq L(error_inval)
+
+ /* Allocate room for a function call in the new stack, and
+ store fn and arg in it. They will be read back in
+ thread_start. */
+ mov d1,a0
+ sub 12,a0
+ mov d0,(a0)
+ mov (16,sp),d1
+ mov d1,(4,a0)
+
+ /* Do the system call */
+ mov a0,d1
+ mov (12,sp),a0
+ mov SYS_ify(clone),d0
+ syscall 0
+
+ cmp 0,d0
+ beq thread_start
+ blt L(to_SYSCALL_ERROR_LABEL)
+
+L(pseudo_end):
+ ret
+
+L(error_inval):
+ mov -EINVAL,d0
+L(to_SYSCALL_ERROR_LABEL):
+ jmp SYSCALL_ERROR_LABEL
+
+thread_start:
+ mov 0,a3 /* terminate the stack frame */
+ mov (4,sp),d0
+ mov (sp),a0
+ calls (a0)
+#ifdef PIC
+L(here):
+ mov pc,a2
+ add _GLOBAL_OFFSET_TABLE_-(L(here) - .),a2
+#endif
+ call JUMPTARGET (_exit),[],0
+
+PSEUDO_END (BP_SYM (__clone))
+
+weak_alias (BP_SYM (__clone), BP_SYM (clone))
diff --git a/sysdeps/unix/sysv/linux/am33/configure b/sysdeps/unix/sysv/linux/am33/configure
new file mode 100755
index 0000000..d449012
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/configure
@@ -0,0 +1,4 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for am33/sysdeps/unix/sysv/linux/am33
+
+arch_minimum_kernel=2.4.0
diff --git a/sysdeps/unix/sysv/linux/am33/configure.in b/sysdeps/unix/sysv/linux/am33/configure.in
new file mode 100644
index 0000000..a94c370
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/configure.in
@@ -0,0 +1,4 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33
+
+arch_minimum_kernel=2.4.0
diff --git a/sysdeps/unix/sysv/linux/am33/fchown.c b/sysdeps/unix/sysv/linux/am33/fchown.c
new file mode 100644
index 0000000..3a69ecc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/fchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fchown.c>
diff --git a/sysdeps/unix/sysv/linux/am33/fcntl.c b/sysdeps/unix/sysv/linux/am33/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/am33/fxstat.c b/sysdeps/unix/sysv/linux/am33/fxstat.c
new file mode 100644
index 0000000..4f219f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/fxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getegid.c b/sysdeps/unix/sysv/linux/am33/getegid.c
new file mode 100644
index 0000000..37b4b4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getegid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/geteuid.c b/sysdeps/unix/sysv/linux/am33/geteuid.c
new file mode 100644
index 0000000..ebcb555
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/geteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getgid.c b/sysdeps/unix/sysv/linux/am33/getgid.c
new file mode 100644
index 0000000..0a4d606
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getgroups.c b/sysdeps/unix/sysv/linux/am33/getgroups.c
new file mode 100644
index 0000000..20a7166
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getgroups.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getmsg.c b/sysdeps/unix/sysv/linux/am33/getmsg.c
new file mode 100644
index 0000000..3a1fa08
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getmsg.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getmsg.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getresgid.c b/sysdeps/unix/sysv/linux/am33/getresgid.c
new file mode 100644
index 0000000..b703a41
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getresuid.c b/sysdeps/unix/sysv/linux/am33/getresuid.c
new file mode 100644
index 0000000..0b14cef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getrlimit.c b/sysdeps/unix/sysv/linux/am33/getrlimit.c
new file mode 100644
index 0000000..fc06dbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/am33/getuid.c b/sysdeps/unix/sysv/linux/am33/getuid.c
new file mode 100644
index 0000000..d682c79
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/getuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/lchown.c b/sysdeps/unix/sysv/linux/am33/lchown.c
new file mode 100644
index 0000000..c89de99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/lchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lchown.c>
diff --git a/sysdeps/unix/sysv/linux/am33/lockf64.c b/sysdeps/unix/sysv/linux/am33/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/sysdeps/unix/sysv/linux/am33/lxstat.c b/sysdeps/unix/sysv/linux/am33/lxstat.c
new file mode 100644
index 0000000..0efa0ae
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/lxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
diff --git a/sysdeps/unix/sysv/linux/am33/profil-counter.h b/sysdeps/unix/sysv/linux/am33/profil-counter.h
new file mode 100644
index 0000000..31422bb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/profil-counter.h
@@ -0,0 +1,27 @@
+/* Low-level statistical profiling support function. Linux/am33 version.
+ Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <signal.h>
+#include <sigcontextinfo.h>
+
+static void
+profil_counter (int signo, SIGCONTEXT scp)
+{
+ profil_count ((void *) GET_PC (scp));
+}
diff --git a/sysdeps/unix/sysv/linux/am33/putmsg.c b/sysdeps/unix/sysv/linux/am33/putmsg.c
new file mode 100644
index 0000000..ebc1680
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/putmsg.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/putmsg.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setegid.c b/sysdeps/unix/sysv/linux/am33/setegid.c
new file mode 100644
index 0000000..2e3a54c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setegid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/seteuid.c b/sysdeps/unix/sysv/linux/am33/seteuid.c
new file mode 100644
index 0000000..18e41d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/seteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/seteuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setfsgid.c b/sysdeps/unix/sysv/linux/am33/setfsgid.c
new file mode 100644
index 0000000..0886712
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setfsgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsgid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setfsuid.c b/sysdeps/unix/sysv/linux/am33/setfsuid.c
new file mode 100644
index 0000000..a9f22eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setfsuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setgid.c b/sysdeps/unix/sysv/linux/am33/setgid.c
new file mode 100644
index 0000000..377021d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setgid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setgroups.c b/sysdeps/unix/sysv/linux/am33/setgroups.c
new file mode 100644
index 0000000..cb9a770
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setgroups.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setgroups.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setregid.c b/sysdeps/unix/sysv/linux/am33/setregid.c
new file mode 100644
index 0000000..99c57ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setregid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setresgid.c b/sysdeps/unix/sysv/linux/am33/setresgid.c
new file mode 100644
index 0000000..daca1a4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setresuid.c b/sysdeps/unix/sysv/linux/am33/setresuid.c
new file mode 100644
index 0000000..3aeabe9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setreuid.c b/sysdeps/unix/sysv/linux/am33/setreuid.c
new file mode 100644
index 0000000..8ad6122
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setreuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setrlimit.c b/sysdeps/unix/sysv/linux/am33/setrlimit.c
new file mode 100644
index 0000000..bfaef74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/am33/setuid.c b/sysdeps/unix/sysv/linux/am33/setuid.c
new file mode 100644
index 0000000..de39437
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/setuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setuid.c>
diff --git a/sysdeps/unix/sysv/linux/am33/socket.S b/sysdeps/unix/sysv/linux/am33/socket.S
new file mode 100644
index 0000000..2c09239
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/socket.S
@@ -0,0 +1,73 @@
+/* Copyright 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/socket.S.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include <socketcall.h>
+
+#define P(a, b) P2(a, b)
+#define P2(a, b) a##b
+
+ .text
+/* The socket-oriented system calls are handled unusally in Linux.
+ They are all gated through the single `socketcall' system call number.
+ `socketcall' takes two arguments: the first is the subcode, specifying
+ which socket function is being called; and the second is a pointer to
+ the arguments to the specific function.
+
+ The .S files for the other calls just #define socket and #include this. */
+
+#ifndef __socket
+#ifndef NO_WEAK_ALIAS
+#define __socket P(__,socket)
+#else
+#define __socket socket
+#endif
+#endif
+
+.globl __socket
+ENTRY (__socket)
+
+ mov d0,(4,sp)
+ mov d1,(8,sp)
+
+ mov SYS_ify(socketcall),d0 /* System call number in d0. */
+
+ /* Use ## so `socket' is a separate token that might be #define'd. */
+ mov P(SOCKOP_,socket),a0 /* Subcode is first arg to syscall. */
+ mov sp,d1
+ add 4,d1 /* Address of args is 2nd arg. */
+
+ /* Do the system call trap. */
+ syscall 0
+
+ /* d0 is < 0 if there was an error. */
+ cmp -126,d0
+ bls L(pseudo_end)
+ jmp SYSCALL_ERROR_LABEL
+
+ /* Successful; return the syscall's value. */
+L(pseudo_end):
+ ret
+
+PSEUDO_END (__socket)
+
+#ifndef NO_WEAK_ALIAS
+weak_alias (__socket, socket)
+#endif
diff --git a/sysdeps/unix/sysv/linux/am33/syscall.S b/sysdeps/unix/sysv/linux/am33/syscall.S
new file mode 100644
index 0000000..180e582
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/syscall.S
@@ -0,0 +1,43 @@
+/* Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/syscall.S.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* Please consult the file sysdeps/unix/sysv/linux/am33/sysdep.h for
+ more information about the value -126 used below.*/
+
+ .text
+ENTRY (syscall)
+ movm [d2,d3,a2,a3],(sp) /* Save register contents. */
+ mov d1,a0
+ mov (28,sp),d1
+ mov (32,sp),a3
+ mov (36,sp),a2
+ mov (40,sp),d3
+ mov (44,sp),d2
+ syscall 0 /* Do the system call. */
+ movm (sp),[d2,d3,a2,a3] /* Restore register contents. */
+ cmp -126,d0 /* Check for error. */
+ bls L(pseudo_end)
+ jmp SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
+L(pseudo_end):
+ ret /* Return to caller. */
+
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.S b/sysdeps/unix/sysv/linux/am33/sysdep.S
new file mode 100644
index 0000000..b41bfce
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/sysdep.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2001, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/sysdep.S.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* The following code is only used in the shared library when we
+ compile the reentrant version. Otherwise each system call defines
+ each own version. */
+
+#ifndef PIC
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */
+
+ .text
+ENTRY (__syscall_error)
+ mov d0,d1
+ clr d0
+ sub d1,d0
+
+#define __syscall_error __syscall_error_1
+#include <../../../am33/sysdep.S>
+
+#endif /* !PIC */
diff --git a/sysdeps/unix/sysv/linux/am33/sysdep.h b/sysdeps/unix/sysv/linux/am33/sysdep.h
new file mode 100644
index 0000000..b0ff4ec
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/sysdep.h
@@ -0,0 +1,317 @@
+/* Copyright 2001, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Based on ../i386/sysdep.h.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _LINUX_AM33_SYSDEP_H
+#define _LINUX_AM33_SYSDEP_H 1
+
+/* There is some commonality. */
+#include "../../../am33/sysdep.h"
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#define SYS_ify(syscall_name) __NR_##syscall_name
+
+/* ELF-like local names start with `.L'. */
+#undef L
+#define L(name) .L##name
+
+#ifdef __ASSEMBLER__
+
+/* Linux uses a negative return value to indicate syscall errors,
+ unlike most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be
+ negative even if the call succeeded. E.g., the `lseek' system call
+ might return a large offset. Therefore we must not anymore test
+ for < 0, but test for a real error by making sure the value in %eax
+ is a real error number. Linus said he will make sure the no syscall
+ returns a value in -1 .. -4095 as a valid result so we can savely
+ test with -4095. */
+
+/* We don't want the label for the error handle to be global when we define
+ it here. */
+#ifdef PIC
+# define SYSCALL_ERROR_LABEL 0f
+#else
+# define SYSCALL_ERROR_LABEL syscall_error
+#endif
+
+#undef PSEUDO
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ cmp -126,d0; \
+ bls L(pseudo_end); \
+ jmp SYSCALL_ERROR_LABEL; \
+ L(pseudo_end): \
+ mov d0,a0;
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) \
+ SYSCALL_ERROR_HANDLER \
+ END (name)
+
+#undef PSEUDO_NOERROR
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args)
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
+#define ret_NOERRNO ret
+
+/* The function has to return the error code. */
+#undef PSEUDO_ERRVAL
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ clr d1; \
+ sub d0,d1,d0
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(name) \
+ END (name)
+
+#define ret_ERRVAL ret
+
+#ifndef PIC
+#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+#else
+/* Store (- d0) into errno through the GOT. */
+#ifdef _LIBC_REENTRANT
+#define SYSCALL_ERROR_HANDLER \
+0:movm [d2,a2],(sp); \
+ add -12,sp; \
+1:mov pc,a2; \
+ add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \
+ clr d2; \
+ sub d0,d2; \
+ call __errno_location@PLT,[],0; \
+ mov d2,(a0); \
+ add 12,sp; \
+ movm (sp),[d2,a2]; \
+ mov -1,d0; \
+ mov d0,a0; \
+ jmp L(pseudo_end);
+/* A quick note: it is assumed that the call to `__errno_location' does
+ not modify the stack! */
+#else
+#define SYSCALL_ERROR_HANDLER \
+0:mov pc,a0; \
+ add _GLOBAL_OFFSET_TABLE_-(0b-.),a0; \
+ clr d1; \
+ sub d0,d1; \
+ mov (errno@GOT,a0),a1; \
+ mov d1,(a0); \
+ mov -1,d0; \
+ mov d0,a0; \
+ jmp L(pseudo_end);
+#endif /* _LIBC_REENTRANT */
+#endif /* PIC */
+
+/* Linux takes system call arguments in registers:
+
+ syscall number d0 call-clobbered
+ arg 1 a0 call-clobbered
+ arg 2 d1 call-clobbered
+ arg 3 a3 call-saved
+ arg 4 a2 call-saved
+ arg 5 d3 call-saved
+ arg 6 d2 call-saved
+
+ The stack layout upon entering the function is:
+
+ (24,sp) Arg# 6
+ (20,sp) Arg# 5
+ (16,sp) Arg# 4
+ (12,sp) Arg# 3
+ d1 Arg# 2
+ d0 Arg# 1
+ (sp) Return address
+
+ (Of course a function with say 3 arguments does not have entries for
+ arguments 4, 5 and 6.) */
+
+#undef DO_CALL
+#define DO_CALL(syscall_name, args) \
+ PUSHARGS_##args \
+ DOARGS_##args \
+ mov SYS_ify (syscall_name),d0; \
+ syscall 0 \
+ POPARGS_##args
+
+#define PUSHARGS_0 /* No arguments to push. */
+#define _DOARGS_0(N) /* No arguments to frob. */
+#define DOARGS_0 /* No arguments to frob. */
+#define POPARGS_0 /* No arguments to pop. */
+
+#define PUSHARGS_1 /* No arguments to push. */
+#define _DOARGS_1(N) _DOARGS_0 (N-4) mov d0,a0;
+#define DOARGS_1 _DOARGS_1 (4)
+#define POPARGS_1 /* No arguments to pop. */
+
+#define PUSHARGS_2 /* No arguments to push. */
+#define _DOARGS_2(N) _DOARGS_1 (N-4) /* Argument already in d1. */
+#define DOARGS_2 _DOARGS_2 (8)
+#define POPARGS_2 /* No arguments to pop. */
+
+#define PUSHARGS_3 movm [a3],(sp);
+#define _DOARGS_3(N) _DOARGS_2 (N-4) mov (N,sp),a3;
+#define DOARGS_3 _DOARGS_3 (16)
+#define POPARGS_3 ; movm (sp),[a3]
+
+#define PUSHARGS_4 movm [a2,a3],(sp);
+#define _DOARGS_4(N) _DOARGS_3 (N-4) mov (N,sp),a2;
+#define DOARGS_4 _DOARGS_4 (24)
+#define POPARGS_4 ; movm (sp),[a2,a3]
+
+#define PUSHARGS_5 movm [d3,a2,a3],(sp);
+#define _DOARGS_5(N) _DOARGS_4 (N-4) mov (N,sp),d3;
+#define DOARGS_5 _DOARGS_5 (32)
+#define POPARGS_5 ; movm (sp),[d3,a2,a3]
+
+#define PUSHARGS_6 movm [d2,d3,a2,a3],(sp);
+#define _DOARGS_6(N) _DOARGS_5 (N-4) mov (N,sp),d2;
+#define DOARGS_6 _DOARGS_6 (40)
+#define POPARGS_6 ; movm (sp),[d2,d3,a2,a3]
+
+#else /* !__ASSEMBLER__ */
+
+/* Define a macro which expands inline into the wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ \
+ unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0)) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
+ resultvar = 0xffffffff; \
+ } \
+ (int) resultvar; })
+
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+({ \
+ register long __sc0 asm ("d0") = __NR_##name; \
+ inline_syscall##nr(name, ## args); \
+ __sc0; \
+})
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((unsigned int) (val) >= (unsigned long)-125)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
+
+#define inline_syscall0(name,dummy...) \
+__asm__ __volatile__ ("syscall 0" \
+ : "+d" (__sc0) \
+ : : "memory")
+
+#define inline_syscall1(name,arg1) \
+register long __sc1 asm ("a0") = (long) (arg1); \
+inline_syscall0 (name); \
+__asm__ __volatile__ ("" : : "r" (__sc1))
+
+#define inline_syscall2(name,arg1,arg2) \
+register long __sc2 asm ("d1") = (long) (arg2); \
+inline_syscall1 (name,(arg1)); \
+__asm__ __volatile__ ("" : : "r" (__sc2))
+
+/* We can't tell whether a3 is going to be eliminated in the enclosing
+ function, so we have to assume it isn't. We first load the value
+ of any arguments into their registers, except for a3 itself, that
+ may be needed to load the value of the other arguments. Then, we
+ save a3's value in some other register, and load the argument value
+ into a3. We have to force both a3 and its copy to be live in
+ different registers at the same time, to avoid having the copy
+ spilled and the value reloaded into the same register, in which
+ case we'd be unable to get the value of a3 back, should the stack
+ slot reference be (offset,a3). */
+#define inline_syscall3(name,arg1,arg2,arg3) \
+long __sc3v = (long) (arg3); \
+register long __sc1 asm ("a0") = (long) (arg1); \
+register long __sc2 asm ("d1") = (long) (arg2); \
+register long __sc3 asm ("a3") = __sc3; \
+register long __sc3c; \
+__asm__ __volatile__ ("mov %1,%0" : "=&r" (__sc3c) : "r" (__sc3)); \
+__sc3 = __sc3v; \
+__asm__ __volatile__ ("" : : "r" (__sc3c), "r" (__sc3)); \
+inline_syscall0 (name); \
+__sc3 = __sc3c; \
+__asm__ __volatile__ ("" : : "r" (__sc3), "r" (__sc2), "r" (__sc1))
+
+#ifdef PIC
+/* Since a2 is the PIC register, it requires similar handling as a3
+ when we're generating PIC, as a2's value may be needed to load
+ arguments whose values live in global variables. The difference is
+ that we don't need to require its value to be live in a register;
+ it may well be in a stack slot, as long as we save it before
+ clobbering a3 and restore it after restoring a3. */
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+long __sc4v = (long) (arg4); \
+long __sc3v = (long) (arg3); \
+register long __sc1 asm ("a0") = (long) (arg1); \
+register long __sc2 asm ("d1") = (long) (arg2); \
+register long __sc3 asm ("a3") = __sc3; \
+register long __sc3c; \
+register long __sc4 asm ("a2") = __sc4; \
+long __sc4c = __sc4; \
+__sc4 = __sc4v; \
+__asm__ __volatile__ ("mov %1,%0" : "=&r" (__sc3c) : "r" (__sc3)); \
+__sc3 = __sc3v; \
+__asm__ __volatile__ ("" : : "r" (__sc3c), "r" (__sc3), "r" (__sc4)); \
+inline_syscall0 (name); \
+__sc3 = __sc3c; \
+__sc4 = __sc4c; \
+__asm__ __volatile__ ("" : : "r" (__sc4), "r" (__sc3), \
+ "r" (__sc2), "r" (__sc1))
+#else
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+register long __sc4 asm ("a2") = (long) (arg4); \
+inline_syscall3 (name,(arg1),(arg2),(arg3)); \
+__asm__ __volatile__ ("" : : "r" (__sc4))
+#endif
+
+#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
+register long __sc5 asm ("d3") = (long) (arg5); \
+inline_syscall4 (name,(arg1),(arg2),(arg3),(arg4)); \
+__asm__ __volatile__ ("" : : "r" (__sc5))
+
+#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
+register long __sc6 asm ("d2") = (long) (arg6); \
+inline_syscall5 (name,(arg1),(arg2),(arg3),(arg4),(arg5)); \
+__asm__ __volatile__ ("" : : "r" (__sc6))
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* linux/am33/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/am33/xstat.c b/sysdeps/unix/sysv/linux/am33/xstat.c
new file mode 100644
index 0000000..e9869f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/am33/xstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/xstat.c>
diff --git a/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h
new file mode 100644
index 0000000..56d3bb6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/linuxthreads/sysdep-cancel.h
@@ -0,0 +1,159 @@
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+#include <pt-machine.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .text ; \
+ ENTRY (name) \
+ PUSHARGS_##args \
+ DOARGS_##args \
+ SINGLE_THREAD_P; \
+ bne L(pseudo_cancel); \
+ mov SYS_ify (syscall_name),d0; \
+ syscall 0 \
+ POPARGS_##args ; \
+ cmp -126,d0; \
+ bls L(pseudo_end); \
+ jmp SYSCALL_ERROR_LABEL; \
+ L(pseudo_cancel): \
+ add -(16+STACK_SPACE (args)),sp; \
+ SAVE_ARGS_##args \
+ CENABLE \
+ mov d0,r0; \
+ LOAD_ARGS_##args \
+ mov SYS_ify (syscall_name),d0; \
+ syscall 0; \
+ mov d0,(12,sp); \
+ mov r0,d0; \
+ CDISABLE \
+ mov (12,sp),d0; \
+ add +16+STACK_SPACE (args),sp \
+ POPARGS_##args ; \
+ cmp -126,d0; \
+ bls L(pseudo_end); \
+ jmp SYSCALL_ERROR_LABEL; \
+ L(pseudo_end): \
+ mov d0,a0
+
+/* Reserve up to 2 stack slots for a0 and d1, but fewer than that if
+ we don't have that many arguments. */
+# define STACK_SPACE(n) (((((n) < 3) * (2 - (n))) + 2) * 4)
+
+# define SAVE_ARGS_0
+# define SAVE_ARGS_1 mov a0,(20,sp) ;
+# define SAVE_ARGS_2 SAVE_ARGS_1 mov d1,(24,sp) ;
+# define SAVE_ARGS_3 SAVE_ARGS_2
+# define SAVE_ARGS_4 SAVE_ARGS_3
+# define SAVE_ARGS_5 SAVE_ARGS_4
+# define SAVE_ARGS_6 SAVE_ARGS_5
+
+# define LOAD_ARGS_0
+# define LOAD_ARGS_1 mov (20,sp),a0 ;
+# define LOAD_ARGS_2 LOAD_ARGS_1 mov (24,sp),d1 ;
+# define LOAD_ARGS_3 LOAD_ARGS_2
+# define LOAD_ARGS_4 LOAD_ARGS_3
+# define LOAD_ARGS_5 LOAD_ARGS_4
+# define LOAD_ARGS_6 LOAD_ARGS_5
+
+# ifdef IS_IN_libpthread
+# define CENABLE call __pthread_enable_asynccancel,[],0;
+# define CDISABLE call __pthread_disable_asynccancel,[],0;
+# elif defined IS_IN_librt
+# ifdef PIC
+# define CENABLE movm [a2],(sp); \
+ 1: mov pc,a2; \
+ add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \
+ call +__librt_enable_asynccancel@PLT,[],0; \
+ movm (sp),[a2];
+# define CENABLE movm [a2],(sp); \
+ 1: mov pc,a2; \
+ add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \
+ call +__librt_disable_asynccancel@PLT,[],0; \
+ movm (sp),[a2];
+# else
+# define CENABLE call +__librt_enable_asynccancel,[],0;
+# define CDISABLE call +__librt_disable_asynccancel,[],0;
+# endif
+# else
+# define CENABLE call +__libc_enable_asynccancel,[],0;
+# define CDISABLE call +__libc_disable_asynccancel,[],0;
+# endif
+
+#if !defined NOT_IN_libc
+# define __local_multiple_threads __libc_multiple_threads
+#elif defined IS_IN_libpthread
+# define __local_multiple_threads __pthread_multiple_threads
+#else
+# define __local_multiple_threads __librt_multiple_threads
+#endif
+
+# ifndef __ASSEMBLER__
+# if defined FLOATING_STACKS && USE___THREAD && defined PIC
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ p_header.data.multiple_threads) == 0, 1)
+# else
+extern int __local_multiple_threads
+# if !defined NOT_IN_libc || defined IS_IN_libpthread
+ attribute_hidden;
+# else
+ ;
+# endif
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# endif
+# else
+# if !defined PIC
+# define SINGLE_THREAD_P \
+ mov (+__local_multiple_threads),d0; \
+ cmp 0,d0
+# elif !defined NOT_IN_libc || defined IS_IN_libpthread
+# define SINGLE_THREAD_P \
+ movm [a2],(sp); \
+ 1: mov pc,a2; \
+ add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \
+ mov (+__local_multiple_threads@GOTOFF,a2),d0; \
+ movm (sp),[a2]; \
+ cmp 0,d0
+# else
+# define SINGLE_THREAD_P \
+ movm [a2],(sp); \
+ 1: mov pc,a2; \
+ add _GLOBAL_OFFSET_TABLE_-(1b-.),a2; \
+ mov (+__local_multiple_threads@GOT,a2),a2; \
+ mov (a2),d0; \
+ movm (sp),[a2]; \
+ cmp 0,d0
+# endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=145f3f8a3cc5dd41ead26ce0b709064e60a73fb9
commit 145f3f8a3cc5dd41ead26ce0b709064e60a73fb9
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 18 05:16:08 2004 +0000
(__SYSCALL_CLOBBERS): Add "memory".
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 1f56671..5eaf7a2 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -275,7 +275,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 2b2aefa..be343aa 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -235,7 +235,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index e2d8707..f30a465 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -235,7 +235,8 @@
_sys_result; \
})
-#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \
+ "$14", "$15", "$24", "$25", "memory"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=885186d0858f8bf367ae76a3e80dcbc75bc252a8
commit 885186d0858f8bf367ae76a3e80dcbc75bc252a8
Author: Richard Henderson <rth@redhat.com>
Date: Fri Oct 15 09:34:45 2004 +0000
* sysdeps/unix/sysv/linux/alpha/register-dump.h: New file.
* sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h (SIGCONTEXT): Add
_code argument, pass sigcontext by pointer.
(SIGCONTEXT_EXTRA_ARGS): Likewise.
(GET_PC, GET_FRAME, GET_STACK): Expect ctx as pointer.
diff --git a/sysdeps/unix/sysv/linux/alpha/register-dump.h b/sysdeps/unix/sysv/linux/alpha/register-dump.h
new file mode 100644
index 0000000..d55899a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/register-dump.h
@@ -0,0 +1,161 @@
+/* Dump registers.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stddef.h>
+#include <sys/uio.h>
+
+/* We will print the register dump in this format:
+
+ V0: XXXXXXXXXXXXXXXX T0: XXXXXXXXXXXXXXXX T1: XXXXXXXXXXXXXXXX
+ T2: XXXXXXXXXXXXXXXX T3: XXXXXXXXXXXXXXXX T4: XXXXXXXXXXXXXXXX
+ T5: XXXXXXXXXXXXXXXX T6: XXXXXXXXXXXXXXXX T7: XXXXXXXXXXXXXXXX
+ S0: XXXXXXXXXXXXXXXX S1: XXXXXXXXXXXXXXXX S2: XXXXXXXXXXXXXXXX
+ S3: XXXXXXXXXXXXXXXX S4: XXXXXXXXXXXXXXXX S5: XXXXXXXXXXXXXXXX
+ S6: XXXXXXXXXXXXXXXX A0: XXXXXXXXXXXXXXXX A1: XXXXXXXXXXXXXXXX
+ A2: XXXXXXXXXXXXXXXX A3: XXXXXXXXXXXXXXXX A4: XXXXXXXXXXXXXXXX
+ A5: XXXXXXXXXXXXXXXX T8: XXXXXXXXXXXXXXXX T9: XXXXXXXXXXXXXXXX
+ T10: XXXXXXXXXXXXXXXX T11: XXXXXXXXXXXXXXXX RA: XXXXXXXXXXXXXXXX
+ T12: XXXXXXXXXXXXXXXX AT: XXXXXXXXXXXXXXXX GP: XXXXXXXXXXXXXXXX
+ SP: XXXXXXXXXXXXXXXX PC: XXXXXXXXXXXXXXXX
+
+ FP0: XXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXX FP2: XXXXXXXXXXXXXXXX
+ FP3: XXXXXXXXXXXXXXXX FP4: XXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXX
+ FP6: XXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXX FP8: XXXXXXXXXXXXXXXX
+ FP9: XXXXXXXXXXXXXXXX FP10: XXXXXXXXXXXXXXXX FP11: XXXXXXXXXXXXXXXX
+ FP12: XXXXXXXXXXXXXXXX FP13: XXXXXXXXXXXXXXXX FP14: XXXXXXXXXXXXXXXX
+ FP15: XXXXXXXXXXXXXXXX FP16: XXXXXXXXXXXXXXXX FP17: XXXXXXXXXXXXXXXX
+ FP18: XXXXXXXXXXXXXXXX FP19: XXXXXXXXXXXXXXXX FP20: XXXXXXXXXXXXXXXX
+ FP21: XXXXXXXXXXXXXXXX FP22: XXXXXXXXXXXXXXXX FP23: XXXXXXXXXXXXXXXX
+ FP24: XXXXXXXXXXXXXXXX FP25: XXXXXXXXXXXXXXXX FP26: XXXXXXXXXXXXXXXX
+ FP27: XXXXXXXXXXXXXXXX FP28: XXXXXXXXXXXXXXXX FP29: XXXXXXXXXXXXXXXX
+ FP30: XXXXXXXXXXXXXXXX FPCR: XXXXXXXXXXXXXXXX
+
+ TA0: XXXXXXXXXXXXXXXX TA1: XXXXXXXXXXXXXXXX TA2: XXXXXXXXXXXXXXXX
+*/
+
+#define NREGS (32+32+3)
+
+static const char regnames[NREGS][8] =
+{
+ " V0: ", " T0: ", " T1: ",
+ " T2: ", " T3: ", " T4: ",
+ " T5: ", " T6: ", " T7: ",
+ " S0: ", " S1: ", " S2: ",
+ " S3: ", " S4: ", " S5: ",
+ " S6: ", " A0: ", " A1: ",
+ " A2: ", " A3: ", " A4: ",
+ " A5: ", " T8: ", " T9: ",
+ " T10: ", " T11: ", " RA: ",
+ " T12: ", " AT: ", " GP: ",
+ " SP: ", " PC: ",
+
+ " FP0: ", " FP1: ", " FP2: ",
+ " FP3: ", " FP4: ", " FP5: ",
+ " FP6: ", " FP7: ", " FP8: ",
+ " FP9: ", " FP10: ", " FP11: ",
+ " FP12: ", " FP13: ", " FP14: ",
+ " FP15: ", " FP16: ", " FP17: ",
+ " FP18: ", " FP19: ", " FP20: ",
+ " FP21: ", " FP22: ", " FP23: ",
+ " FP24: ", " FP25: ", " FP26: ",
+ " FP27: ", " FP28: ", " FP29: ",
+ " FP30: ", " FPCR: ",
+
+ " TA0: ", " TA1: ", " TA2: "
+};
+
+#define O(FIELD, LF) offsetof(struct sigcontext, FIELD) + LF
+
+static const int offsets[NREGS] =
+{
+ O(sc_regs[0], 0), O(sc_regs[1], 0), O(sc_regs[2], 1),
+ O(sc_regs[3], 0), O(sc_regs[4], 0), O(sc_regs[5], 1),
+ O(sc_regs[6], 0), O(sc_regs[7], 0), O(sc_regs[8], 1),
+ O(sc_regs[9], 0), O(sc_regs[10], 0), O(sc_regs[11], 1),
+ O(sc_regs[12], 0), O(sc_regs[13], 0), O(sc_regs[14], 1),
+ O(sc_regs[15], 0), O(sc_regs[16], 0), O(sc_regs[17], 1),
+ O(sc_regs[18], 0), O(sc_regs[19], 0), O(sc_regs[20], 1),
+ O(sc_regs[21], 0), O(sc_regs[22], 0), O(sc_regs[23], 1),
+ O(sc_regs[24], 0), O(sc_regs[25], 0), O(sc_regs[26], 1),
+ O(sc_regs[27], 0), O(sc_regs[28], 0), O(sc_regs[29], 1),
+ O(sc_regs[30], 0), O(sc_pc, 2),
+
+ O(sc_fpregs[0], 0), O(sc_fpregs[1], 0), O(sc_fpregs[2], 1),
+ O(sc_fpregs[3], 0), O(sc_fpregs[4], 0), O(sc_fpregs[5], 1),
+ O(sc_fpregs[6], 0), O(sc_fpregs[7], 0), O(sc_fpregs[8], 1),
+ O(sc_fpregs[9], 0), O(sc_fpregs[10], 0), O(sc_fpregs[11], 1),
+ O(sc_fpregs[12], 0), O(sc_fpregs[13], 0), O(sc_fpregs[14], 1),
+ O(sc_fpregs[15], 0), O(sc_fpregs[16], 0), O(sc_fpregs[17], 1),
+ O(sc_fpregs[18], 0), O(sc_fpregs[19], 0), O(sc_fpregs[20], 1),
+ O(sc_fpregs[21], 0), O(sc_fpregs[22], 0), O(sc_fpregs[23], 1),
+ O(sc_fpregs[24], 0), O(sc_fpregs[25], 0), O(sc_fpregs[26], 1),
+ O(sc_fpregs[27], 0), O(sc_fpregs[28], 0), O(sc_fpregs[29], 1),
+ O(sc_fpregs[30], 0), O(sc_fpcr, 2),
+
+ O(sc_traparg_a0, 0), O(sc_traparg_a1, 0), O(sc_traparg_a2, 1)
+};
+
+#undef O
+
+static const char linefeed[2] = "\n\n";
+
+static void
+register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[NREGS][16];
+ struct iovec iov[2*NREGS+24];
+ size_t iov_i = 0, i, j;
+
+#define ADD_MEM(str, len) \
+ (iov[iov_i].iov_base = (void *)(str), \
+ iov[iov_i].iov_len = len, \
+ ++iov_i)
+
+#define ADD_STRING(str) ADD_MEM(str, strlen(str))
+
+ ADD_STRING ("Register dump:\n\n");
+
+ for (i = 0; i < NREGS; ++i)
+ {
+ int this_offset, this_lf;
+ unsigned long val;
+
+ this_offset = offsets[i];
+ this_lf = this_offset & 7;
+ this_offset &= -8;
+
+ val = *(unsigned long *)((char *)ctx + this_offset);
+
+ for (j = 0; j < 16; ++j)
+ {
+ unsigned long x = (val >> (64 - (j + 1) * 4)) & 15;
+ x += x < 10 ? '0' : 'a' - 10;
+ regs[i][j] = x;
+ }
+
+ ADD_MEM (regnames[i], 8);
+ ADD_MEM (regs[i], 16);
+ if (this_lf)
+ ADD_MEM (linefeed, this_lf);
+ }
+
+ writev (fd, iov, iov_i);
+}
+
+#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
index eb6f4f0..16c5dcb 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
-#define GET_PC(ctx) ((void *) (ctx).sc_pc)
-#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15])
-#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30])
+#define SIGCONTEXT int _code, struct sigcontext *
+#define SIGCONTEXT_EXTRA_ARGS _code,
+#define GET_PC(ctx) ((void *) (ctx)->sc_pc)
+#define GET_FRAME(ctx) ((void *) (ctx)->sc_regs[15])
+#define GET_STACK(ctx) ((void *) (ctx)->sc_regs[30])
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73e530000856b30d7040c6fe10e8b58e17174041
commit 73e530000856b30d7040c6fe10e8b58e17174041
Author: Richard Henderson <rth@redhat.com>
Date: Fri Oct 15 07:07:57 2004 +0000
* sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
make gcc4 happy.
diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym
index 14494ee..ebd84f3 100644
--- a/sysdeps/alpha/nptl/tcb-offsets.sym
+++ b/sysdeps/alpha/nptl/tcb-offsets.sym
@@ -4,8 +4,10 @@
--
-- Abuse tls.h macros to derive offsets relative to the thread register.
-# define __builtin_thread_pointer() ((void *) 0)
-# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
+-- # define __builtin_thread_pointer() ((void *) 0)
+-- # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
+-- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF
+#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
PID_OFFSET thread_offsetof (pid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36f86ab9acaf0788c05777f50897bb7e61b85fd0
commit 36f86ab9acaf0788c05777f50897bb7e61b85fd0
Author: Richard Henderson <rth@redhat.com>
Date: Fri Oct 15 07:06:56 2004 +0000
* sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use prototype
style definition.
* sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIME): If
__ASSUME_TIMEVAL64, define __adjtime directly rather than
via strong_alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index f8b272e..e206cb4 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -87,14 +87,15 @@ compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
#define TIMEVAL timeval
#undef TIMEX
#define TIMEX timex
-#undef ADJTIME
-#define ADJTIME __adjtime_tv64
#undef ADJTIMEX
#define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x)
+
#undef LINKAGE
+#undef ADJTIME
+#if !defined __ASSUME_TIMEVAL64
#define LINKAGE static
-
-LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+#define ADJTIME __adjtime_tv64
+#endif
#include <sysdeps/unix/sysv/linux/adjtime.c>
#include <stdbool.h>
@@ -135,8 +136,6 @@ __adjtime (itv, otv)
return ret;
}
-#else
-strong_alias (__adjtime_tv64, __adjtime);
#endif
versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1795e40c5dbaffe580c8c0168f2128c9fb3ffdaa
commit 1795e40c5dbaffe580c8c0168f2128c9fb3ffdaa
Author: Richard Henderson <rth@redhat.com>
Date: Fri Oct 15 07:06:11 2004 +0000
* sysdeps/alpha/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto
instead of static.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7c5f3c1..780a3a5 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -507,7 +507,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void
+auto inline void
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
@@ -645,7 +645,7 @@ elf_machine_rela (struct link_map *map,
can be skipped. */
#define ELF_MACHINE_REL_RELATIVE 1
-static inline void
+auto inline void
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
void *const reloc_addr_arg)
{
@@ -661,7 +661,7 @@ elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
memcpy (reloc_addr_arg, &reloc_addr_val, 8);
}
-static inline void
+auto inline void
elf_machine_lazy_rel (struct link_map *map,
Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a270d32ff2a400eea60f9c8f1c5a48bc26c062b6
commit a270d32ff2a400eea60f9c8f1c5a48bc26c062b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 14 16:08:53 2004 +0000
(elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded)
chain with iteration over all namespaces' _ns_loaded chains.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 944f3c1..49fdffb 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -231,10 +231,11 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
}
- {
- struct link_map *l = GL(dl_loaded);
+ struct link_map *l;
+ Lmid_t nsid;
- while (l)
+ for (nsid = 0; nsid < DL_NNS; ++nsid)
+ for (l = GL(dl_ns)[nsid]._ns_loaded; l != NULL; l = l->l_next)
{
ElfW(Addr) base, limit;
const ElfW(Phdr) *p = l->l_phdr;
@@ -250,9 +251,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
return l;
}
}
- l = l->l_next;
}
- }
_dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
return NULL;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ffbfb80e1ffa02ea4eee82abab0b04577aec31a
commit 6ffbfb80e1ffa02ea4eee82abab0b04577aec31a
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Oct 9 21:19:06 2004 +0000
(WORD_COPY_BWD): Remove use of cast as lvalue.
diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h
index cdc268a..0951eea 100644
--- a/sysdeps/m68k/memcopy.h
+++ b/sysdeps/m68k/memcopy.h
@@ -1,5 +1,5 @@
/* memcopy.h -- definitions for memory copy functions. Motorola 68020 version.
- Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -68,29 +68,33 @@
do \
{ \
size_t __nblocks = (nbytes) / 32 + 1; \
+ op_t *__dst_ep = (op_t *) (dst_ep); \
+ op_t *__src_ep = (op_t *) (src_ep); \
switch ((nbytes) / sizeof (op_t) % 8) \
do \
{ \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 7: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 6: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 5: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 4: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 3: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 2: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 1: \
- *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
+ *--__dst_ep = *--__src_ep; \
case 0: \
__nblocks--; \
} \
while (__nblocks != 0); \
(nbytes_left) = (nbytes) % sizeof (op_t); \
+ (dst_ep) = (unsigned long) __dst_ep; \
+ (src_ep) = (unsigned long) __src_ep; \
} while (0)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bd55d8b3ace979e644283361725b74b3a4c97b0
commit 1bd55d8b3ace979e644283361725b74b3a4c97b0
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Oct 9 21:18:03 2004 +0000
Remove __THROW from inline definitions.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 1e43e43..acbac47 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003
+ Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -110,7 +110,7 @@
#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
- __inline_mathop1(float, __CONCAT(func,f), op) \
+ __inline_mathop1(float, __CONCAT(func,f), op) \
__inline_mathop1(long double, __CONCAT(func,l), op)
#else
# define __inline_mathop(func, op) \
@@ -118,7 +118,7 @@
#endif
#define __inline_mathop1(float_type,func, op) \
- __m81_defun (float_type, func, (float_type __mathop_x)) __THROW \
+ __m81_defun (float_type, func, (float_type __mathop_x)) \
{ \
float_type __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
@@ -175,7 +175,7 @@ __inline_mathop(trunc, intrz)
for the function names. */
#define __inline_functions(float_type, s) \
-__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \
+__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -191,7 +191,7 @@ __m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \
return __result; \
} \
\
-__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) __THROW \
+__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -217,7 +217,7 @@ __inline_functions(long double,l)
#ifdef __USE_MISC
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \
+__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, \
so we must extract and examine the condition codes manually. */ \
@@ -227,7 +227,7 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \
return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
} \
\
-__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \
+__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, so we must extract and \
examine the condition codes manually. */ \
@@ -238,7 +238,7 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \
} \
\
__m81_defun (float_type, __CONCAT(__scalbn,s), \
- (float_type __x, int __n)) __THROW \
+ (float_type __x, int __n)) \
{ \
float_type __result; \
__asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
@@ -255,7 +255,7 @@ __inline_functions(long double,l)
#if defined __USE_MISC || defined __USE_XOPEN
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) __THROW \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
{ \
char __result; \
__asm("ftst%.x %1\n" \
@@ -275,7 +275,7 @@ __inline_functions(long double,l)
#ifdef __USE_ISOC99
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \
+__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
{ \
/* There is no branch-condition for the sign bit, so we must extract \
and examine the condition codes manually. */ \
@@ -285,13 +285,13 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \
return (__fpsr >> 27) & 1; \
} \
\
-__m81_defun (float_type, __CONCAT(__scalbln,s), \
- (float_type __x, long int __n)) __THROW \
+ __m81_defun (float_type, __CONCAT(__scalbln,s), \
+ (float_type __x, long int __n)) \
{ \
return __CONCAT(__scalbn,s) (__x, __n); \
} \
\
-__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \
+__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -305,7 +305,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \
return __result; \
} \
\
-__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \
+__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \
{ \
long int __result; \
__asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \
@@ -314,7 +314,7 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \
\
__m81_inline float_type \
__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
- float_type __z) __THROW \
+ float_type __z) \
{ \
return (__x * __y) + __z; \
}
@@ -331,7 +331,7 @@ __inline_functions (long double,l)
# define __inline_functions(float_type, s) \
__m81_inline void \
__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
- float_type *__cosx) __THROW \
+ float_type *__cosx) \
{ \
__asm ("fsincos%.x %2,%1:%0" \
: "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
@@ -351,14 +351,14 @@ __inline_functions (long double,l)
/* Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work correctly with -traditional. */
# define __inline_forward_c(rettype, name, args1, args2) \
-extern __inline rettype __attribute__((__const__)) \
-name args1 __THROW \
-{ \
- return __CONCAT(__,name) args2; \
+extern __inline rettype __attribute__((__const__)) \
+ name args1 \
+{ \
+ return __CONCAT(__,name) args2; \
}
# define __inline_forward(rettype, name, args1, args2) \
-extern __inline rettype name args1 __THROW \
+extern __inline rettype name args1 \
{ \
return __CONCAT(__,name) args2; \
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94645659a459f25c973922a2909dc8f58fbb0b12
commit 94645659a459f25c973922a2909dc8f58fbb0b12
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 4 20:59:38 2004 +0000
2004-10-04 Roland McGrath <roland@redhat.com>
* include/errno.h [RTLD_PRIVATE_ERRNO] (errno): Rename the real symbol
to rtld_errno.
* sysdeps/generic/errno.c [RTLD_PRIVATE_ERRNO] (rtld_errno): Define it,
and don't define any other errno names.
* sysdeps/unix/alpha/sysdep.h [RTLD_PRIVATE_ERRNO]: Use rtld_errno in
place of errno.
* sysdeps/unix/i386/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/x86_64/sysdep.S: Likewise.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 5259c09..f9f1dd6 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -82,7 +82,7 @@
#if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
- stl v0, errno(gp) !gprel; \
+ stl v0, rtld_errno(gp) !gprel; \
lda v0, -1; \
ret
#elif defined(PIC)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 234ce32..091dfc9 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -98,7 +98,7 @@
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
- lea (errno, %pc), %a0; \
+ lea (rtld_errno, %pc), %a0; \
neg.l %d0; \
move.l %d0, (%a0); \
move.l &-1, %d0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e08e73f580f2c0a8f93227f477865eefd732458
commit 3e08e73f580f2c0a8f93227f477865eefd732458
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 30 06:16:28 2004 +0000
(__fdimf, __fdim, fdimf, fdim): Handle +inf/+inf.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index d3a76ba..187bd42 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -149,25 +149,25 @@ __MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); }
__MATH_INLINE float
__NTH (__fdimf (float __x, float __y))
{
- return __x < __y ? 0.0f : __x - __y;
+ return __x <= __y ? 0.0f : __x - __y;
}
__MATH_INLINE float
__NTH (fdimf (float __x, float __y))
{
- return __x < __y ? 0.0f : __x - __y;
+ return __x <= __y ? 0.0f : __x - __y;
}
__MATH_INLINE double
__NTH (__fdim (double __x, double __y))
{
- return __x < __y ? 0.0 : __x - __y;
+ return __x <= __y ? 0.0 : __x - __y;
}
__MATH_INLINE double
__NTH (fdim (double __x, double __y))
{
- return __x < __y ? 0.0 : __x - __y;
+ return __x <= __y ? 0.0 : __x - __y;
}
/* Test for negative number. Used in the signbit() macro. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fae1eca92192539d416730d9f26c3b6a9425e9d
commit 6fae1eca92192539d416730d9f26c3b6a9425e9d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 28 10:29:32 2004 +0000
(pthread_cond_t): Add __extension__ to long long types.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 79d43fe..d13d6e8 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -77,15 +77,15 @@ typedef union
{
int __lock;
unsigned int __futex;
- unsigned long long int __total_seq;
- unsigned long long int __wakeup_seq;
- unsigned long long int __woken_seq;
+ __extension__ unsigned long long int __total_seq;
+ __extension__ unsigned long long int __wakeup_seq;
+ __extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
- long long int __align;
+ __extension__ long long int __align;
} pthread_cond_t;
typedef union
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=def004d70914c83474ba4052779cca722b92e3dc
commit def004d70914c83474ba4052779cca722b92e3dc
Author: Richard Henderson <rth@redhat.com>
Date: Sun Sep 26 17:40:31 2004 +0000
* sysdeps/alpha/alphaev6/memcpy.S: Mark .prologue.
* sysdeps/unix/alpha/sysdep.h (LEAF, ENTRY): Align entry points
to 16 byte boundaries.
diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S
index d16bc03..7cff521 100644
--- a/sysdeps/alpha/alphaev6/memcpy.S
+++ b/sysdeps/alpha/alphaev6/memcpy.S
@@ -39,6 +39,7 @@
.set noat
ENTRY(memcpy)
+ .prologue 0
mov $16, $0 # E : copy dest to return
ble $18, $nomoredata # U : done with the copy?
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 5378f81..5259c09 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -43,14 +43,14 @@
#define LEAF(name, framesize) \
.globl name; \
- .align 3; \
+ .align 4; \
.ent name, 0; \
__LABEL(name) \
.frame sp, framesize, ra
#define ENTRY(name) \
.globl name; \
- .align 3; \
+ .align 4; \
.ent name, 0; \
__LABEL(name) \
.frame sp, 0, ra
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d627d8fb46b565059b99f396e982c7a7992251a8
commit d627d8fb46b565059b99f396e982c7a7992251a8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 23 05:15:41 2004 +0000
(inline_syscall[0-6]): Change name argument to numbers from syscall names.
(INLINE_SYSCALL1): Pass __NR_##name to inline_syscall##nr.
(INTERNAL_SYSCALL_NCS): Renamed from...
(INTERNAL_SYSCALL_1): ... this. Use INTERNAL_SYSCALL_NCS.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index f60eafe..5378f81 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -167,7 +167,7 @@ __LABEL(name) \
#define INLINE_SYSCALL1(name, nr, args...) \
({ \
long _sc_ret, _sc_err; \
- inline_syscall##nr(name, args); \
+ inline_syscall##nr(__NR_##name, args); \
if (__builtin_expect (_sc_err, 0)) \
{ \
__set_errno (_sc_ret); \
@@ -180,6 +180,9 @@ __LABEL(name) \
INTERNAL_SYSCALL1(name, err_out, nr, args)
#define INTERNAL_SYSCALL1(name, err_out, nr, args...) \
+ INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args)
+
+#define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \
({ \
long _sc_ret, _sc_err; \
inline_syscall##nr(name, args); \
@@ -223,7 +226,7 @@ __LABEL(name) \
register long _sc_0 inline_syscall_r0_asm; \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2" \
: inline_syscall_r0_out_constraint (_sc_0), \
@@ -240,7 +243,7 @@ __LABEL(name) \
register long _sc_16 __asm__("$16"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3" \
@@ -259,7 +262,7 @@ __LABEL(name) \
register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
__asm__ __volatile__ \
@@ -280,7 +283,7 @@ __LABEL(name) \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -303,7 +306,7 @@ __LABEL(name) \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -328,7 +331,7 @@ __LABEL(name) \
register long _sc_19 __asm__("$19"); \
register long _sc_20 __asm__("$20"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -355,7 +358,7 @@ __LABEL(name) \
register long _sc_20 __asm__("$20"); \
register long _sc_21 __asm__("$21"); \
\
- _sc_0 = __NR_##name; \
+ _sc_0 = name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a63b83c91bb00ea5e0c5940944e4e003e7c8d8d
commit 6a63b83c91bb00ea5e0c5940944e4e003e7c8d8d
Author: Richard Henderson <rth@redhat.com>
Date: Wed Sep 15 12:23:39 2004 +0000
* sysdeps/alpha/fpu/libm-test-ulps: Update.
* scripts/data/c++-types-alpha-linux-gnu.data: New file.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 73172b4..80942e9 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -1,6 +1,9 @@
# Begin of automatic generation
# atan2
+Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994380":
+float: 6
+ifloat: 6
Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 3
ifloat: 3
@@ -258,9 +261,6 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
-double: 1
-idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
idouble: 1
@@ -640,8 +640,8 @@ idouble: 1
# Maximal error of functions:
Function: "atan2":
-float: 3
-ifloat: 3
+float: 6
+ifloat: 6
Function: "atanh":
float: 1
@@ -777,10 +777,6 @@ Function: Real part of "csqrt":
float: 1
ifloat: 1
-Function: Real part of "ctan":
-double: 1
-idouble: 1
-
Function: Imaginary part of "ctan":
double: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93207f7d2d4de29b5fd9ad58c1f14959dfe8968c
commit 93207f7d2d4de29b5fd9ad58c1f14959dfe8968c
Author: Richard Henderson <rth@redhat.com>
Date: Wed Sep 15 12:22:09 2004 +0000
* sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S
index 8bdf0eb..f4ed931 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S
@@ -42,5 +42,5 @@ PSEUDO (__vfork, vfork, 0)
1: ret
PSEUDO_END (__vfork)
-
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2bb0696559676bf4c80eca8158c93f761730332a
commit 2bb0696559676bf4c80eca8158c93f761730332a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 14 04:24:52 2004 +0000
Remove uses of __P and __PMT.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index d7db91d..8e10754 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1994,1996,1997,1998,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -62,4 +62,4 @@
/* Function to get address of global `errno' variable. */
-extern int *__errno_location __P ((void)) __attribute__ ((__const__));
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));
diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c
index 2b1d090..2da822e 100644
--- a/sysdeps/standalone/i386/force_cpu386/_exit.c
+++ b/sysdeps/standalone/i386/force_cpu386/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -23,7 +23,7 @@
/* This returns control to FORCEbug. */
-void Bsp_cleanup __P ((void));
+void Bsp_cleanup (void);
/* The function `_exit' should take a status argument and simply
terminate program execution, using the low-order 8 bits of the
diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c
index e94dc35..8392ce5 100644
--- a/sysdeps/standalone/i386/force_cpu386/brdinit.c
+++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -25,7 +25,7 @@
This routine initializes the FORCE CPU386 board. */
-void _Console_Initialize __P ((void));
+void _Console_Initialize (void);
void
_Board_Initialize ()
diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h
index 4a88199..20a0c33 100644
--- a/sysdeps/standalone/standalone.h
+++ b/sysdeps/standalone/standalone.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -23,9 +23,9 @@
#include <sys/cdefs.h>
-extern void _Board_Initialize __P ((void));
+extern void _Board_Initialize (void);
-extern int _Console_Putc __P ((char c));
-extern int _Console_Getc __P ((int poll));
+extern int _Console_Putc (char c);
+extern int _Console_Getc (int poll);
#endif
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
index 8e291cc..6bf08b1 100644
--- a/sysdeps/unix/arm/start.c
+++ b/sysdeps/unix/arm/start.c
@@ -1,5 +1,5 @@
/* Special startup code for ARM a.out binaries.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,8 +45,8 @@ int __data_start = 0;
weak_alias (__data_start, data_start)
#endif
-extern void __libc_init __P ((int argc, char **argv, char **envp));
-extern int main __P ((int argc, char **argv, char **envp));
+extern void __libc_init (int argc, char **argv, char **envp);
+extern int main (int argc, char **argv, char **envp);
/* N.B.: It is important that this be the first function.
This file is the first thing in the text section. */
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index bb10848..5a3ca3c 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -82,8 +82,8 @@ trampoline (sig, code, context, addr)
/* XXX should save/restore FP regs */
/* Call the user's handler. */
- (*((void (*) __P ((int sig, int code, struct sigcontext *context,
- PTR addr))) handlers[sig]))
+ (*((void (*) (int sig, int code, struct sigcontext *context,
+ PTR addr)) handlers[sig]))
(sig, code, context, addr);
/* Restore the call-clobbered registers. */
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 2b0be13..e11f7e5 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994,1996,1997,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,8 +50,8 @@
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec (int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec);
/* User-specified signal handlers. */
#define mytramp 1
@@ -146,8 +146,8 @@ trampoline (sig)
glsave[2] = g6;
/* Call the user's handler. */
- (*((void (*) __P ((int sig, int code, struct sigcontext *context,
- void *addr))) handlers[sig]))
+ (*((void (*) (int sig, int code, struct sigcontext *context,
+ void *addr)) handlers[sig]))
(sig, code, context, addr);
/* Restore the Y register. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index a128234..097c15e 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -1,7 +1,7 @@
/* This implements wait4 with the 4.4 BSD semantics (also those documented in
SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
different from those documented. Go Sun!
- Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991,1992,1993,1995,1997,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,8 +23,8 @@
#include <sys/wait.h>
#include <unistd.h>
-extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc,
- int options, struct rusage *usage));
+extern pid_t __wait4_syscall (pid_t pid, __WAIT_STATUS_DEFN stat_loc,
+ int options, struct rusage *usage);
pid_t
__wait4 (pid, stat_loc, options, usage)
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
index f6c8f1f..5775c9a 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,15 +35,15 @@
/* The user's signal handler is called with three arguments. */
typedef void (*handler_type) (int sig, int code, struct sigcontext *);
-extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
- struct sigvec *ovec,
- void (*)(int sig, int code,
- struct sigcontext *,
- handler_type)));
+extern int __raw_sigvec (int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type));
-extern void __handler __P ((int sig, int code,
- struct sigcontext *,
- handler_type));
+extern void __handler (int sig, int code,
+ struct sigcontext *,
+ handler_type);
int
__sigvec (sig, vec, ovec)
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index 39e7730..0982fc8 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ian Lance Taylor (ian@airs.com).
@@ -27,9 +27,9 @@
/* This is an Ultrix header file. */
#include <sys/sysinfo.h>
-extern int __getsysinfo __P ((unsigned int op, void *buffer,
- size_t nbytes, int *start, void *arg));
-extern long int __default_sysconf __P ((int name));
+extern int __getsysinfo (unsigned int op, void *buffer,
+ size_t nbytes, int *start, void *arg);
+extern long int __default_sysconf (int name);
long int
__sysconf (name)
diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c
index dbee0bb..236eb1a 100644
--- a/sysdeps/unix/sysv/irix4/fpathconf.c
+++ b/sysdeps/unix/sysv/irix4/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <sys/syssgi.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi (int, ...);
/* Get file-specific information about descriptor FD. */
long int
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index 5208053..4c859ea 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <sys/types.h>
#include <grp.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi (int, ...);
/* Set the group set for the current user to GROUPS (N of them). */
int
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index baf945e..807ac2f 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,96,97,2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 1994,96,97,2000,02, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <sys/resource.h>
#include <sys/sysmp.h>
-extern int __sysmp __P ((int, ...));
+extern int __sysmp (int, ...);
/* Return the highest priority of any process specified by WHICH and WHO
(see <sys/resource.h>); if WHO is zero, the current process, process group,
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
index 8d0c400..3cabbdf 100644
--- a/sysdeps/unix/sysv/irix4/getrusage.c
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <errno.h>
#include <sys/syssgi.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi (int, ...);
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c
index 7439c73..51da0c5 100644
--- a/sysdeps/unix/sysv/irix4/pathconf.c
+++ b/sysdeps/unix/sysv/irix4/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <sys/syssgi.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi (int, ...);
/* Get file-specific information about PATH. */
long int
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
index 8f5b379..cca816b 100644
--- a/sysdeps/unix/sysv/irix4/setgroups.c
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994,97,2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <sys/types.h>
#include <grp.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi (int, ...);
/* Set the group set for the current user to GROUPS (N of them). */
int
diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c
index d6cfd33..f8de75a 100644
--- a/sysdeps/unix/sysv/irix4/sigtramp.c
+++ b/sysdeps/unix/sysv/irix4/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,14 +36,13 @@
typedef void (*handler_type) (int sig, int code, struct sigcontext *);
/* Defined in signal.S. */
-extern __sighandler_t __raw_signal __P((int sig, __sighandler_t func,
- void (*)(int sig, int code,
- struct sigcontext *,
- handler_type)));
-
-extern void __handler __P((int sig, int code,
- struct sigcontext *,
- handler_type));
+extern __sighandler_t __raw_signal (int sig, __sighandler_t func,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type));
+
+extern void __handler (int sig, int code, struct sigcontext *,
+ handler_type);
__sighandler_t
signal (sig, func)
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index 6b4b00a..fdda880 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995,1996,1997,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,8 +44,8 @@
/* The first piece of initialized data. */
int __data_start = 0;
-extern void __libc_init __P ((int argc, char **argv, char **envp));
-extern int main __P ((int argc, char **argv, char **envp));
+extern void __libc_init (int argc, char **argv, char **envp);
+extern int main (int argc, char **argv, char **envp);
/* Use the stack pointer to access the arguments. This assumes that
we can guess how big the frame will be. */
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index 2f89491..ef7606e 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <unistd.h>
#include <sys/syssgi.h>
-extern int __syssgi __P ((int, ...));
+extern int __syssgi ((int, ...);
/* Get the value of the system variable NAME. */
long int
diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
index e58f22e..d51fa60 100644
--- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#include <unistd.h>
#include <sys/types.h>
-extern int __pgrpsys __P ((int type, ...));
+extern int __pgrpsys (int type, ...);
/* Get the process group ID of process PID. */
int
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
index ef27df2..2aac40b 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#include <limits.h>
#include <alloca.h>
-extern int __sco_getgroups __P ((int size, unsigned short int *list));
+extern int __sco_getgroups (int size, unsigned short int *list);
int
__getgroups (size, list)
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
index ea9a238..74ca3e0 100644
--- a/sysdeps/unix/sysv/sysv4/__getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <sys/types.h>
-extern int __pgrpsys __P ((int type, ...));
+extern int __pgrpsys (int type, ...);
/* Get the process group ID of process PID. */
int
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
index ac096a4..36ad5cc 100644
--- a/sysdeps/unix/sysv/sysv4/__setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <sys/types.h>
-extern int __pgrpsys __P ((int type, ...));
+extern int __pgrpsys (int type, ...);
/* Get the process group ID of process PID. */
int
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index 39fb728..95f9641 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997,1999,2002,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <unistd.h>
#include <sys/types.h>
-extern pid_t __pgrpsys __P ((int type, ...));
+extern pid_t __pgrpsys (int type, ...);
/* Get the process group ID of process PID. */
pid_t
diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c
index f4e7b4e..d74b0f4 100644
--- a/sysdeps/unix/sysv/sysv4/sethostname.c
+++ b/sysdeps/unix/sysv/sysv4/sethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <sys/systeminfo.h>
-extern int __sysinfo __P ((int command, const char *buf, long count));
+extern int __sysinfo (int command, const char *buf, long count);
int
sethostname (name, namelen)
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 1ffb182..80f4ad6 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1996,1997,1999,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995-1997,1999,2002,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <errno.h>
#include <unistd.h>
-extern int __pgrpsys __P ((pid_t type, ...));
+extern int __pgrpsys (pid_t type, ...);
/* Set the process group ID of the process matching PID to PGID.
If PID is zero, the current process's process group ID is set.
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index 44cbaf0..faa2c42 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 1999, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <errno.h>
#include <unistd.h>
-extern pid_t __pgrpsys __P ((int type, ...));
+extern pid_t __pgrpsys (int type, ...);
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
index 8627245..ab782ff 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,95,96,97,98 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,96,97,98, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-extern int __getdents __P ((int fd, char *buf, size_t nbytes));
+extern int __getdents (int fd, char *buf, size_t nbytes);
/* For Solaris we need a special version of this file since the
definition of `struct dirent' is not the same for the kernel and
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index d8ffafc..bfe7823 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,2002,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -24,7 +24,7 @@
#include <time.h>
#include <sysconfig.h>
-extern int __sysconfig __P ((int));
+extern int __sysconfig (int);
/* Get the value of the system variable NAME. */
long int
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index f4700c6..23f9ceb 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,94,95,96,97,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,96,97,2002,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -35,9 +35,9 @@ typedef enum __idtype
P_ALL = 7,
} __idtype_t;
-extern __pid_t __getpgid __P ((__pid_t pid));
-extern int __waitid __P ((__idtype_t idtype, __pid_t id,
- __siginfo_t *infop, int options));
+extern __pid_t __getpgid (__pid_t pid);
+extern int __waitid (__idtype_t idtype, __pid_t id,
+ __siginfo_t *infop, int options);
/* Wait for a child matching PID to die.
If PID is greater than 0, match any process whose process ID is PID.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebb9960651a8bbc3e899afa7a877d1b947f47e92
commit ebb9960651a8bbc3e899afa7a877d1b947f47e92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 12 18:40:45 2004 +0000
Define rwlock types also for __USE_XOPEN2K.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index fd20d57..79d43fe 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -103,7 +103,7 @@ typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
-#ifdef __USE_UNIX98
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Data structure for read-write lock variable handling. The
structure of the attribute type is deliberately not exposed. */
typedef union
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d74bdcd3064a6d0d336f92ec7e7c629cc682686
commit 6d74bdcd3064a6d0d336f92ec7e7c629cc682686
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 12 18:13:16 2004 +0000
Use __NTH instead of __THROW in inline function definitions.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 0ba79f9..d3a76ba 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999-2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
@@ -48,42 +48,46 @@
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
-NAME (TYPE __x, TYPE __y) __THROW \
+__NTH (NAME (TYPE __x, TYPE __y)) \
{ \
TYPE __z; \
__asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \
return __z; \
}
-__inline_copysign(__copysignf, float)
-__inline_copysign(copysignf, float)
-__inline_copysign(__copysign, double)
-__inline_copysign(copysign, double)
+__inline_copysign (__copysignf, float)
+__inline_copysign (copysignf, float)
+__inline_copysign (__copysign, double)
+__inline_copysign (copysign, double)
#undef __MATH_INLINE_copysign
#if __GNUC_PREREQ (2, 8)
-__MATH_INLINE float __fabsf (float __x) __THROW { return __builtin_fabsf (__x); }
-__MATH_INLINE float fabsf (float __x) __THROW { return __builtin_fabsf (__x); }
-__MATH_INLINE double __fabs (double __x) __THROW { return __builtin_fabs (__x); }
-__MATH_INLINE double fabs (double __x) __THROW { return __builtin_fabs (__x); }
+__MATH_INLINE float
+__NTH (__fabsf (float __x)) { return __builtin_fabsf (__x); }
+__MATH_INLINE float
+__NTH (fabsf (float __x)) { return __builtin_fabsf (__x); }
+__MATH_INLINE double
+__NTH (__fabs (double __x)) { return __builtin_fabs (__x); }
+__MATH_INLINE double
+__NTH (fabs (double __x)) { return __builtin_fabs (__x); }
#else
-#define __inline_fabs(NAME, TYPE) \
+# define __inline_fabs(NAME, TYPE) \
__MATH_INLINE TYPE \
-NAME (TYPE __x) __THROW \
+__NTH (NAME (TYPE __x)) \
{ \
TYPE __z; \
__asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \
return __z; \
}
-__inline_fabs(__fabsf, float)
-__inline_fabs(fabsf, float)
-__inline_fabs(__fabs, double)
-__inline_fabs(fabs, double)
+__inline_fabs (__fabsf, float)
+__inline_fabs (fabsf, float)
+__inline_fabs (__fabs, double)
+__inline_fabs (fabs, double)
-#undef __inline_fabs
+# undef __inline_fabs
#endif
@@ -92,7 +96,7 @@ __inline_fabs(fabs, double)
must be integral, as this avoids unpleasant integer overflows. */
__MATH_INLINE float
-__floorf (float __x) __THROW
+__NTH (__floorf (float __x))
{
/* Check not zero since floor(-0) == -0. */
if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
@@ -118,7 +122,7 @@ __floorf (float __x) __THROW
}
__MATH_INLINE double
-__floor (double __x) __THROW
+__NTH (__floor (double __x))
{
if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
{
@@ -136,40 +140,46 @@ __floor (double __x) __THROW
return __x;
}
-__MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); }
-__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); }
+__MATH_INLINE float __NTH (floorf (float __x)) { return __floorf(__x); }
+__MATH_INLINE double __NTH (floor (double __x)) { return __floor(__x); }
#ifdef __USE_ISOC99
-__MATH_INLINE float __fdimf (float __x, float __y) __THROW
+__MATH_INLINE float
+__NTH (__fdimf (float __x, float __y))
{
return __x < __y ? 0.0f : __x - __y;
}
-__MATH_INLINE float fdimf (float __x, float __y) __THROW
+__MATH_INLINE float
+__NTH (fdimf (float __x, float __y))
{
return __x < __y ? 0.0f : __x - __y;
}
-__MATH_INLINE double __fdim (double __x, double __y) __THROW
+__MATH_INLINE double
+__NTH (__fdim (double __x, double __y))
{
return __x < __y ? 0.0 : __x - __y;
}
-__MATH_INLINE double fdim (double __x, double __y) __THROW
+__MATH_INLINE double
+__NTH (fdim (double __x, double __y))
{
return __x < __y ? 0.0 : __x - __y;
}
/* Test for negative number. Used in the signbit() macro. */
-__MATH_INLINE int __signbitf (float __x) __THROW
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
{
__extension__ union { float __f; int __i; } __u = { __f: __x };
return __u.__i < 0;
}
-__MATH_INLINE int __signbit (double __x) __THROW
+__MATH_INLINE int
+__NTH (__signbit (double __x))
{
__extension__ union { double __d; long __i; } __u = { __d: __x };
return __u.__i < 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=493814089be51ba1c5752a45cbb1d4abe8941a83
commit 493814089be51ba1c5752a45cbb1d4abe8941a83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 8 06:11:35 2004 +0000
(__pthread_once): Use atomic_increment instead of atomic_exchange_and_add.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
index 82f72de..79a3c47 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
pthread_cleanup_pop (0);
/* Add one to *once_control to take the bottom 2 bits from 01 to 10. */
- atomic_exchange_and_add (once_control, 1);
+ atomic_increment (once_control);
/* Wake up all other threads. */
lll_futex_wake (once_control, INT_MAX);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0af1bbc9f2ff2b977b1d6b388413647f60689832
commit 0af1bbc9f2ff2b977b1d6b388413647f60689832
Author: Richard Henderson <rth@redhat.com>
Date: Mon Sep 6 02:19:36 2004 +0000
* sysdeps/alpha/fpu/fraiseexcpt.c: Remove file.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_IEEE_RAISE_EXCEPTION): New.
* sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: New file.
* sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h: New file.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use it.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
deleted file mode 100644
index 7a589e4..0000000
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Raise given exceptions.
- Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <fenv_libc.h>
-
-int
-__feraiseexcept (int excepts)
-{
- unsigned long int tmp;
-
- /* Get the current exception state. */
- tmp = __ieee_get_fp_control ();
-
- /* Set all the bits that were called for. */
- tmp |= (excepts & SWCR_STATUS_MASK);
-
- /* And store it back. */
- __ieee_set_fp_control (tmp);
-
- /* Success. */
- return 0;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feraiseexcept, __old_feraiseexcept)
-compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
-#endif
-
-libm_hidden_ver (__feraiseexcept, feraiseexcept)
-versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
new file mode 100644
index 0000000..07f0558
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
@@ -0,0 +1,92 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv_libc.h>
+#include <sysdep.h>
+#include <float.h>
+#include "kernel-features.h"
+#include "kernel_sysinfo.h"
+
+
+int
+__feraiseexcept (int excepts)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ unsigned long t = excepts;
+ long r;
+
+ r = INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_RAISE_EXCEPTION, &t);
+
+#ifndef __ASSUME_IEEE_RAISE_EXCEPTION
+ if (!INTERNAL_SYSCALL_ERROR_P (r, err))
+ return 0;
+
+ double d;
+
+ /* If we got an error from SSI_IEEE_RAISE_EXCEPTION, assume it means that
+ the system call isn't actually implemented. Do the best we can. */
+
+ /* Invalid implemented with 0 / 0 -> NaN. */
+ if (excepts & FE_INVALID)
+ __asm__ __volatile__ ("divs/su $f31,$f31,%0; trapb" : "=f"(d) : );
+
+ /* Division By Zero implemented with 1 / 0 -> NaN. */
+ if (excepts & FE_DIVBYZERO)
+ __asm__ __volatile__ ("divs/su %1,$f31,%0; trapb" : "=&f"(d) : "f"(1.0f));
+
+ /* Overflow and underflow cannot be had all by themselves. We can
+ generate them with arithmetic, but we always get INEXACT raised
+ at the same time. Prepare to undo. */
+ if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) && !(excepts & FE_INEXACT))
+ INTERNAL_SYSCALL (osf_getsysinfo, err, 2, GSI_IEEE_FP_CONTROL, &t);
+
+ /* Overflow implemented with FLT_MAX + FLT_MAX -> Inf. */
+ if (excepts & FE_OVERFLOW)
+ __asm__ __volatile__ ("adds/sui %1,%1,%0; trapb"
+ : "=&f"(d) : "f"(FLT_MAX));
+
+ /* Underflow implemented with FLT_MIN * FLT_MIN -> 0. */
+ if (excepts & FE_UNDERFLOW)
+ __asm__ __volatile__ ("muls/sui %1,%1,%0; trapb"
+ : "=&f"(d) : "f"(FLT_MIN));
+
+ /* Inexact implemented with (long)0.5 -> 0. */
+ if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)) == FE_INEXACT)
+ __asm__ __volatile__ ("cvttq/svi %1,%0; trapb" : "=&f"(d) : "f"(0.5f));
+
+ /* If we raised inexact when not asked, and inexact was not previously
+ raised, then clear that exception. */
+ if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW))
+ && !((excepts | t) & FE_INEXACT))
+ {
+ t |= excepts & SWCR_STATUS_MASK;
+ INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_FP_CONTROL, &t);
+ }
+#endif /* !__ASSUME_IEEE_RAISE_EXCEPTION */
+
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 3cabd0b..4779f17 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -18,8 +18,8 @@
02111-1307 USA. */
#include <sysdep.h>
+#include "kernel_sysinfo.h"
-#define GSI_IEEE_FP_CONTROL 45
.text
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 302ed06..a9c0891 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -18,8 +19,8 @@
02111-1307 USA. */
#include <sysdep.h>
+#include "kernel_sysinfo.h"
-#define SSI_IEEE_FP_CONTROL 14
LEAF(__ieee_set_fp_control, 16)
#ifdef PROF
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h b/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h
new file mode 100644
index 0000000..a3edec2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h
@@ -0,0 +1,6 @@
+/* A copy of the couple of bits we need from <asm/sysinfo.h>. */
+
+#define GSI_IEEE_FP_CONTROL 45
+
+#define SSI_IEEE_FP_CONTROL 14
+#define SSI_IEEE_RAISE_EXCEPTION 1001
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a61c91b0ca2fce7f63c95e5dd7ed385872ab3f4d
commit a61c91b0ca2fce7f63c95e5dd7ed385872ab3f4d
Author: Richard Henderson <rth@redhat.com>
Date: Mon Sep 6 02:01:35 2004 +0000
* sysdeps/alpha/div.S: Save and restore FPCR around fp operations.
* sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S,
sysdeps/alpha/ldiv.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S,
sysdeps/alpha/remqu.S: Likewise.
* sysdeps/alpha/div_libc.h (FRAME): Increase to 64.
diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S
index e0eb7e9..d1a724d 100644
--- a/sysdeps/alpha/div.S
+++ b/sysdeps/alpha/div.S
@@ -48,6 +48,8 @@ div:
#endif
beq $18, $divbyzero
+ excb
+ mf_fpcr $f10
_ITOFT2 $17, $f0, 0, $18, $f1, 8
@@ -55,7 +57,8 @@ div:
cvtqt $f1, $f1
divt/c $f0, $f1, $f0
cvttq/c $f0, $f0
-
+ excb
+ mt_fpcr $f10
_FTOIT $f0, $0, 0
mull $0, $18, $1
diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h
index 2f06282..62b4470 100644
--- a/sysdeps/alpha/div_libc.h
+++ b/sysdeps/alpha/div_libc.h
@@ -71,7 +71,7 @@
/* In order to make the below work, all top-level divide routines must
use the same frame size. */
-#define FRAME 48
+#define FRAME 64
/* Code fragment to generate an integer divide-by-zero fault. When
building libc.so, we arrange for there to be one copy of this code
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 90cd686..408d66d 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -22,7 +22,12 @@
registers are t10 and t11, the result goes in t12. Only t12 and AT may
be clobbered.
- The FPU can handle all input values except zero. Whee! */
+ The FPU can handle all input values except zero. Whee!
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
#ifndef EXTEND
#define EXTEND(S,D) sextl S, D
@@ -41,25 +46,34 @@ __divl:
cfi_def_cfa_offset (FRAME)
CALL_MCOUNT
stt $f0, 0(sp)
- stt $f1, 8(sp)
+ excb
beq Y, DIVBYZERO
+
+ stt $f1, 8(sp)
+ stt $f2, 16(sp)
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f2, 16)
+ mf_fpcr $f2
EXTEND (X, RV)
EXTEND (Y, AT)
- _ITOFT2 RV, $f0, 16, AT, $f1, 24
+ _ITOFT2 RV, $f0, 24, AT, $f1, 32
cvtqt $f0, $f0
cvtqt $f1, $f1
divt/c $f0, $f1, $f0
cvttq/c $f0, $f0
- _FTOIT $f0, RV, 16
+ excb
+ mt_fpcr $f2
+ _FTOIT $f0, RV, 24
ldt $f0, 0(sp)
ldt $f1, 8(sp)
+ ldt $f2, 16(sp)
lda sp, FRAME(sp)
cfi_restore ($f0)
cfi_restore ($f1)
+ cfi_restore ($f2)
cfi_def_cfa_offset (0)
sextl RV, RV
ret $31, (RA), 1
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index cab6c34..7f245ac 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -33,7 +33,12 @@
When the dividend is outside the range for which we can compute exact
results, we use the fp quotent as an estimate from which we begin refining
an exact integral value. This reduces the number of iterations in the
- shift-and-subtract loop significantly. */
+ shift-and-subtract loop significantly.
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
.text
.align 4
@@ -53,10 +58,15 @@ __divq:
ready -- all the time in the world to figure out how we're
going to use the results. */
stt $f0, 0(sp)
- stt $f1, 8(sp)
+ excb
beq Y, DIVBYZERO
+
+ stt $f1, 8(sp)
+ stt $f3, 48(sp)
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f3, 48)
+ mf_fpcr $f3
_ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
@@ -73,12 +83,16 @@ __divq:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert and clean up. */
cvttq/c $f0, $f0
+ excb
+ mt_fpcr $f3
_FTOIT $f0, RV, 16
ldt $f0, 0(sp)
+ ldt $f3, 48(sp)
cfi_restore ($f1)
cfi_remember_state
cfi_restore ($f0)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
lda sp, FRAME(sp)
ret $31, (RA), 1
@@ -121,9 +135,9 @@ $fix_sign_in_ret2:
cfi_rel_offset (t3, 0)
mulq Q, Y, QY
- unop
+ excb
stq t4, 8(sp)
- unop
+ mt_fpcr $f3
cfi_rel_offset (t4, 8)
subq QY, X, R
@@ -147,6 +161,7 @@ $fix_sign_out_ret:
ldq t3, 0(sp)
ldq t4, 8(sp)
ldq t5, 40(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_remember_state
cfi_restore (t0)
@@ -155,6 +170,7 @@ $fix_sign_out_ret:
cfi_restore (t3)
cfi_restore (t4)
cfi_restore (t5)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
ret $31, (RA), 1
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index 63b575f..fc00fa1 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -33,7 +33,12 @@
When the dividend is outside the range for which we can compute exact
results, we use the fp quotent as an estimate from which we begin refining
an exact integral value. This reduces the number of iterations in the
- shift-and-subtract loop significantly. */
+ shift-and-subtract loop significantly.
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
.text
.align 4
@@ -53,10 +58,15 @@ __divqu:
ready -- all the time in the world to figure out how we're
going to use the results. */
stt $f0, 0(sp)
- stt $f1, 8(sp)
+ excb
beq Y, DIVBYZERO
+
+ stt $f1, 8(sp)
+ stt $f3, 48(sp)
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f3, 48)
+ mf_fpcr $f3
_ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
@@ -65,10 +75,7 @@ __divqu:
divt/c $f0, $f1, $f0
/* Check to see if Y was mis-converted as signed value. */
- .align 4
ldt $f1, 8(sp)
- unop
- nop
blt Y, $y_is_neg
/* Check to see if X fit in the double as an exact value. */
@@ -78,11 +85,16 @@ __divqu:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert and clean up. */
cvttq/c $f0, $f0
+ excb
+ mt_fpcr $f3
_FTOIT $f0, RV, 16
+
ldt $f0, 0(sp)
+ ldt $f3, 48(sp)
cfi_remember_state
cfi_restore ($f0)
cfi_restore ($f1)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
lda sp, FRAME(sp)
ret $31, (RA), 1
@@ -140,9 +152,9 @@ $x_big:
.align 4
stq t4, 8(sp)
- unop
+ excb
ldt $f0, 0(sp)
- unop
+ mt_fpcr $f3
cfi_rel_offset (t4, 8)
cfi_restore ($f0)
@@ -164,6 +176,7 @@ $q_low_ret:
ldq t2, 32(sp)
ldq t3, 40(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_remember_state
cfi_restore (t0)
@@ -171,6 +184,7 @@ $q_low_ret:
cfi_restore (t2)
cfi_restore (t3)
cfi_restore (t4)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
ret $31, (RA), 1
@@ -227,9 +241,13 @@ $y_is_neg:
from the divide will be completely wrong. Fortunately, the
quotient must be either 0 or 1, so just compute it directly. */
cmpult Y, X, RV
+ excb
+ mt_fpcr $f3
ldt $f0, 0(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_restore ($f0)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
ret $31, (RA), 1
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index c90edfb..3909672 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -53,6 +53,8 @@ ldiv:
#endif
beq Y, $divbyzero
+ excb
+ mf_fpcr $f10
_ITOFT2 X, $f0, 0, Y, $f1, 8
@@ -71,6 +73,8 @@ ldiv:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert and clean up. */
cvttq/c $f0, $f0
+ excb
+ mt_fpcr $f10
_FTOIT $f0, $0, 0
$egress:
@@ -107,9 +111,10 @@ $fix_sign_in_ret1:
cvttq/c $f0, $f0
_FTOIT $f0, Q, 8
- .align 3
$fix_sign_in_ret2:
mulq Q, Y, QY
+ excb
+ mt_fpcr $f10
.align 4
subq QY, X, R
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index 1bbb978..bfc3be5 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -24,7 +24,12 @@
be clobbered.
The FPU can handle the division for all input values except zero.
- All we have to do is compute the remainder via multiply-and-subtract. */
+ All we have to do is compute the remainder via multiply-and-subtract.
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
#ifndef EXTEND
#define EXTEND(S,D) sextl S, D
@@ -43,26 +48,35 @@ __reml:
cfi_def_cfa_offset (FRAME)
CALL_MCOUNT
stt $f0, 0(sp)
- stt $f1, 8(sp)
+ excb
beq Y, DIVBYZERO
+
+ stt $f1, 8(sp)
+ stt $f2, 16(sp)
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f2, 16)
+ mf_fpcr $f2
EXTEND (X, RV)
EXTEND (Y, AT)
- _ITOFT2 RV, $f0, 16, AT, $f1, 24
+ _ITOFT2 RV, $f0, 24, AT, $f1, 32
cvtqt $f0, $f0
cvtqt $f1, $f1
divt/c $f0, $f1, $f0
cvttq/c $f0, $f0
- _FTOIT $f0, RV, 16
+ excb
+ mt_fpcr $f2
+ _FTOIT $f0, RV, 24
ldt $f0, 0(sp)
mull RV, Y, RV
ldt $f1, 8(sp)
+ ldt $f2, 16(sp)
lda sp, FRAME(sp)
cfi_restore ($f0)
cfi_restore ($f1)
+ cfi_restore ($f2)
cfi_def_cfa_offset (0)
subl X, RV, RV
ret $31, (RA), 1
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index 40c68d7..645a834 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -33,7 +33,12 @@
When the dividend is outside the range for which we can compute exact
results, we use the fp quotent as an estimate from which we begin refining
an exact integral value. This reduces the number of iterations in the
- shift-and-subtract loop significantly. */
+ shift-and-subtract loop significantly.
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
.text
.align 4
@@ -53,10 +58,15 @@ __remq:
ready -- all the time in the world to figure out how we're
going to use the results. */
stt $f0, 0(sp)
- stt $f1, 8(sp)
+ excb
beq Y, DIVBYZERO
+
+ stt $f1, 8(sp)
+ stt $f3, 48(sp)
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f3, 48)
+ mf_fpcr $f3
_ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
@@ -73,12 +83,16 @@ __remq:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert, compute remainder, clean up. */
cvttq/c $f0, $f0
+ excb
+ mt_fpcr $f3
_FTOIT $f0, AT, 16
mulq AT, Y, AT
ldt $f0, 0(sp)
+ ldt $f3, 48(sp)
cfi_restore ($f1)
cfi_remember_state
cfi_restore ($f0)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
lda sp, FRAME(sp)
subq X, AT, RV
@@ -122,9 +136,9 @@ $fix_sign_in_ret2:
cfi_rel_offset (t3, 0)
mulq Q, Y, QY
- unop
+ excb
stq t4, 8(sp)
- unop
+ mt_fpcr $f3
cfi_rel_offset (t4, 8)
subq QY, X, R
@@ -148,6 +162,7 @@ $fix_sign_out_ret:
ldq t3, 0(sp)
ldq t4, 8(sp)
ldq t5, 40(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_remember_state
cfi_restore (t0)
@@ -156,6 +171,7 @@ $fix_sign_out_ret:
cfi_restore (t3)
cfi_restore (t4)
cfi_restore (t5)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
ret $31, (RA), 1
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index f8deebb..bfa78df 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -33,7 +33,12 @@
When the dividend is outside the range for which we can compute exact
results, we use the fp quotent as an estimate from which we begin refining
an exact integral value. This reduces the number of iterations in the
- shift-and-subtract loop significantly. */
+ shift-and-subtract loop significantly.
+
+ The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
+ for cvttq/c even without /sui being set. It will not, however, properly
+ raise the exception, so we don't have to worry about FPCR_INED being clear
+ and so dying by SIGFPE. */
.text
.align 4
@@ -57,11 +62,15 @@ __remqu:
and Y, AT, AT
stt $f1, 8(sp)
+ excb
+ stt $f3, 48(sp)
beq AT, $powerof2
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+ cfi_rel_offset ($f3, 48)
_ITOFT2 X, $f0, 16, Y, $f1, 24
+ mf_fpcr $f3
cvtqt $f0, $f0
cvtqt $f1, $f1
@@ -79,14 +88,18 @@ __remqu:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert, compute remainder, clean up. */
cvttq/c $f0, $f0
+ excb
+ mt_fpcr $f3
_FTOIT $f0, AT, 16
mulq AT, Y, AT
ldt $f0, 0(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_remember_state
cfi_restore ($f0)
cfi_restore ($f1)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
.align 4
@@ -144,9 +157,9 @@ $x_big:
.align 4
stq t4, 8(sp)
- unop
+ excb
ldt $f0, 0(sp)
- unop
+ mt_fpcr $f3
cfi_rel_offset (t4, 8)
cfi_restore ($f0)
@@ -168,6 +181,7 @@ $q_low_ret:
ldq t2, 32(sp)
ldq t3, 40(sp)
+ ldt $f3, 48(sp)
lda sp, FRAME(sp)
cfi_remember_state
cfi_restore (t0)
@@ -175,6 +189,7 @@ $q_low_ret:
cfi_restore (t2)
cfi_restore (t3)
cfi_restore (t4)
+ cfi_restore ($f3)
cfi_def_cfa_offset (0)
ret $31, (RA), 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df8419fe0a67841bcc7ab47283eaa8cd20bf9043
commit df8419fe0a67841bcc7ab47283eaa8cd20bf9043
Author: Richard Henderson <rth@redhat.com>
Date: Mon Sep 6 01:12:02 2004 +0000
* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
Move definition inside libpthread, libc, librt check. Provide
definition for rtld.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index 794d7fc..f3f7718 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -137,28 +137,33 @@ __LABEL($syscall_error) \
# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
# endif
-#endif
-
-#if defined IS_IN_libpthread || !defined NOT_IN_libc
-# ifndef __ASSEMBLER__
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
extern int __local_multiple_threads attribute_hidden;
-# define SINGLE_THREAD_P \
+# define SINGLE_THREAD_P \
__builtin_expect (__local_multiple_threads == 0, 1)
-# elif defined(PIC)
-# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
-# else
-# define SINGLE_THREAD_P(reg) \
+# elif defined(PIC)
+# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
+# else
+# define SINGLE_THREAD_P(reg) \
ldah reg, __local_multiple_threads(gp) !gprelhigh; \
ldl reg, __local_multiple_threads(reg) !gprellow
-# endif
-#else
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
+# endif
+# else
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
header.multiple_threads) == 0, 1)
-# else
-# define SINGLE_THREAD_P(reg) \
+# else
+# define SINGLE_THREAD_P(reg) \
call_pal PAL_rduniq; \
ldl reg, MULTIPLE_THREADS_OFFSET($0)
+# endif
# endif
+
+#else
+
+# define SINGLE_THREAD_P (1)
+# define NO_CANCELLATION 1
+
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99e111a7c22d9da5f7a7b2930e71bbea2fec40b4
commit 99e111a7c22d9da5f7a7b2930e71bbea2fec40b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 2 22:46:02 2004 +0000
Define __libc_unwind_longjmp.
diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h
index ad77816..5cef8b1 100644
--- a/sysdeps/alpha/nptl/jmpbuf-unwind.h
+++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -26,3 +26,6 @@
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
+
+/* We use the normal lobngjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19eca5d62f8da63ae660f569c653c88b1e86c46c
commit 19eca5d62f8da63ae660f569c653c88b1e86c46c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 2 18:51:31 2004 +0000
(pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make it
unsigned int.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 62c853c..fd20d57 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -81,7 +81,7 @@ typedef union
unsigned long long int __wakeup_seq;
unsigned long long int __woken_seq;
void *__mutex;
- int __clock;
+ unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c80ce440fbbcec62f4e1706737c8b29271678911
commit c80ce440fbbcec62f4e1706737c8b29271678911
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 26 16:59:14 2004 +0000
Include sgidefs.h only if NO_SGIDEFS_H isn't defined.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index d2a6c69..8fba034 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -28,7 +28,9 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index b63bb9c..238c8e0 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -27,7 +27,9 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 50c8265..d0e3fe5 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -28,7 +28,9 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#ifndef NO_SGIDEFS_H
#include <sgidefs.h>
+#endif
#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pwrite
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13e579e4f99b1a450fb899076bd53d2784686580
commit 13e579e4f99b1a450fb899076bd53d2784686580
Author: Richard Henderson <rth@redhat.com>
Date: Wed Aug 25 19:59:01 2004 +0000
* sysdeps/alpha/elf/start.S (_start): Use $15 as frame unwind
instead of $31. Zero $15.
* sysdeps/unix/sysv/linux/alpha/clone.S (thread_start): Likewise.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index c6d7587..3c2bc59 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -44,10 +44,11 @@
.ent _start, 0
.type _start,@function
_start:
- .frame $31, 0, $31
+ .frame $15, 0, $15
br gp, 1f
1: ldgp gp, 0(gp)
subq sp, 16, sp
+ mov 0, $15
.prologue 0
/* Load address of the user's main function. */
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index daa804c..b4766ec 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -89,7 +89,8 @@ $error:
.ent thread_start
thread_start:
- .frame zero,0,zero,0
+ .frame fp,0,fp,0
+ mov 0, fp
.prologue 0
/* Load up the arguments. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7048b1bff0b3e097df66be9ac526c6c6dcf66a54
commit 7048b1bff0b3e097df66be9ac526c6c6dcf66a54
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Aug 25 05:57:35 2004 +0000
(_dl_start_user): Don't set __libc_stack_end.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index bfd3a62..944f3c1 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -485,8 +485,6 @@ _dl_start_user:\n\
move $16, $28\n\
# Save the user entry point address in a saved register.\n\
move $17, $2\n\
- # Store the highest stack address\n\
- " STRINGXP(PTR_S) " $29, __libc_stack_end\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
lw $2, _dl_skip_args\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8805e8d3fbe3290a1e580e2b4267134cc40dc32
commit e8805e8d3fbe3290a1e580e2b4267134cc40dc32
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Aug 23 07:28:45 2004 +0000
[BZ #341]
(O_NOATIME): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 828cc75..ce4a5da 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -47,6 +47,7 @@
# define O_DIRECT 040000 /* Direct disk access. */
# define O_DIRECTORY 0100000 /* Must be a directory. */
# define O_NOFOLLOW 0200000 /* Do not follow links. */
+# define O_NOATIME 04000000 /* Do not set atime. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index d050f7f..3574e75 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -45,6 +45,7 @@
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
+# define O_NOATIME 01000000 /* Do not set atime. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 6abdd1d..36799aa 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -46,6 +46,7 @@
# define O_DIRECT 040000 /* Direct disk access. */
# define O_DIRECTORY 0200000 /* Must be a directory. */
# define O_NOFOLLOW 0400000 /* Do not follow links. */
+# define O_NOATIME 01000000 /* Do not set atime. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 6cc96cf..9d967c6 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -47,6 +47,7 @@
# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */
# define O_DIRECTORY 00010000 /* must be a directory */
# define O_NOFOLLOW 00000200 /* don't follow links */
+# define O_NOATIME 04000000 /* Do not set atime. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 2e85d1e..90c0a48 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -45,6 +45,7 @@
# define O_DIRECTORY 040000 /* Must be a directory. */
# define O_NOFOLLOW 0100000 /* Do not follow links. */
# define O_DIRECT 0200000 /* Direct disk access. */
+# define O_NOATIME 01000000 /* Do not set atime. */
#endif
/* For now Linux has synchronisity options for data and read operations.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 48531d8..550593b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -49,6 +49,7 @@
# define O_NOFOLLOW 0x20000 /* Do not follow links. */
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
+# define O_NOATIME 0x40000 /* Do not set atime. */
#endif
#define O_NDELAY O_NONBLOCK
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3e4621ebc171f6394dc5a230e235545cacb71d9
commit e3e4621ebc171f6394dc5a230e235545cacb71d9
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 16 09:21:38 2004 +0000
.
diff --git a/ChangeLog b/ChangeLog
index efaee34..d7b0ea3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-16 Roland McGrath <roland@frob.com>
+
+ * Makefile: New file.
+
2004-08-04 Roland McGrath <roland@frob.com>
New directory implementing glibc add-on infrastructure for
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=191601e3108e2675172d52d71c06c687e87b47cc
commit 191601e3108e2675172d52d71c06c687e87b47cc
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 16 09:21:34 2004 +0000
2004-08-16 Roland McGrath <roland@frob.com>
* Makefile: New file.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..463f278
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,6 @@
+# This boilerplate is necessary just because any add-on directory
+# gets added as a normal subdirectory for the glibc build process.
+
+subdir = ports
+
+include ../Rules
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca5c03379c8a56e0e2eadcaf5f1a2b276503e385
commit ca5c03379c8a56e0e2eadcaf5f1a2b276503e385
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 16 08:51:46 2004 +0000
2004-08-15 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/bits/resource.h (enum __rusage_who):
Remove __RUSAGE_BOTH constant and RUSAGE_BOTH macro.
* sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index 868fd7b..54d6819 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -147,12 +147,8 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
+ RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- __RUSAGE_BOTH = -2
-#define RUSAGE_BOTH __RUSAGE_BOTH
};
#define __need_timeval
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 40fc949..2b6c887 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -147,12 +147,8 @@ enum __rusage_who
#define RUSAGE_SELF RUSAGE_SELF
/* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
+ RUSAGE_CHILDREN = -1
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- __RUSAGE_BOTH = -2
-#define RUSAGE_BOTH __RUSAGE_BOTH
};
#define __need_timeval
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0bec0145c4854228a95d3e83da5d2647d3f145d3
commit 0bec0145c4854228a95d3e83da5d2647d3f145d3
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 16 04:51:04 2004 +0000
2004-08-15 Roland McGrath <roland@frob.com>
* csu/elf-init.c: Update copyright terms including special exception
for these trivial files, which are statically linked into executables
that use dynamic linking for the significant library code.
* io/fstat.c: Likewise.
* io/fstat64.c: Likewise.
* io/lstat.c: Likewise.
* io/lstat64.c: Likewise.
* io/stat.c: Likewise.
* io/stat64.c: Likewise.
* stdlib/atexit.c: Likewise.
* sysdeps/alpha/elf/initfini.c: Likewise.
* sysdeps/alpha/elf/start.S: Likewise.
* sysdeps/arm/elf/start.S: Likewise.
* sysdeps/cris/elf/start.S: Likewise.
* sysdeps/generic/initfini.c: Likewise.
* sysdeps/generic/mknod.c: Likewise.
* sysdeps/hppa/elf/initfini.c: Likewise.
* sysdeps/hppa/elf/start.S: Likewise.
* sysdeps/i386/elf/start.S: Likewise.
* sysdeps/i386/i686/hp-timing.c: Likewise.
* sysdeps/ia64/elf/initfini.c: Likewise.
* sysdeps/ia64/elf/start.S: Likewise.
* sysdeps/ia64/hp-timing.c: Likewise.
* sysdeps/m68k/elf/start.S: Likewise.
* sysdeps/mach/start.c: Likewise.
* sysdeps/mips/elf/start.S: Likewise.
* sysdeps/powerpc/powerpc32/elf/start.S: Likewise.
* sysdeps/powerpc/powerpc64/elf/start.S: Likewise.
* sysdeps/s390/s390-32/elf/start.S: Likewise.
* sysdeps/s390/s390-32/initfini.c: Likewise.
* sysdeps/s390/s390-64/elf/start.S: Likewise.
* sysdeps/s390/s390-64/initfini.c: Likewise.
* sysdeps/sh/elf/initfini.c: Likewise.
* sysdeps/sh/elf/start.S: Likewise.
* sysdeps/sparc/sparc32/elf/start.S: Likewise.
* sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise.
* sysdeps/sparc/sparc64/elf/start.S: Likewise.
* sysdeps/sparc/sparc64/hp-timing.c: Likewise.
* sysdeps/standalone/i386/start.S: Likewise.
* sysdeps/standalone/i960/start.S: Likewise.
* sysdeps/standalone/m68k/m68020/start.S: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/osf/alpha/start.S: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/sysv/aix/start.s: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/x86_64/elf/initfini.c: Likewise.
* sysdeps/x86_64/elf/start.S: Likewise.
diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c
index 5da7dc6..4d3342d 100644
--- a/sysdeps/alpha/elf/initfini.c
+++ b/sysdeps/alpha/elf/initfini.c
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index dbe4223..c6d7587 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -9,6 +9,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 13d4229..cc076ab 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index dbe408a..a3f85bc 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c
index 4275cd5..35f5dd5 100644
--- a/sysdeps/hppa/elf/initfini.c
+++ b/sysdeps/hppa/elf/initfini.c
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index c7e300c..4cf832a 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index f65cda7..8c89b37 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 7567423..3dd5137 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -8,6 +8,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S
index d003763..b3fd315 100644
--- a/sysdeps/standalone/i386/start.S
+++ b/sysdeps/standalone/i386/start.S
@@ -8,6 +8,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S
index 993a3f2..579beb7 100644
--- a/sysdeps/standalone/i960/start.S
+++ b/sysdeps/standalone/i960/start.S
@@ -8,6 +8,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
index 855652b..166605f 100644
--- a/sysdeps/standalone/m68k/m68020/start.S
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -8,6 +8,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
index 6088faa..8e291cc 100644
--- a/sysdeps/unix/arm/start.c
+++ b/sysdeps/unix/arm/start.c
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
index ffe6651..1fa52a6 100644
--- a/sysdeps/unix/bsd/osf/alpha/start.S
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index c2fc488..a88268a 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/unix/sysv/aix/start.s b/sysdeps/unix/sysv/aix/start.s
index bf17b8c..79d8ef4 100644
--- a/sysdeps/unix/sysv/aix/start.s
+++ b/sysdeps/unix/sysv/aix/start.s
@@ -6,6 +6,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index a88d0d4..6b4b00a 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -6,6 +6,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba5a329dddb66aece2276fd09d7d9c0572583327
commit ba5a329dddb66aece2276fd09d7d9c0572583327
Author: Roland McGrath <roland@gnu.org>
Date: Sat Aug 14 06:54:41 2004 +0000
2004-08-13 Daniel Jacobowitz <dan@debian.org>
* sysdeps/arm/machine-gmon.h (mcount_internal): Mark as
__attribute_used__.
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index 039dfd9..fa3f652 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -32,7 +32,7 @@ void _mcount (void);
weak_alias (_mcount, mcount)
#endif
-static void mcount_internal (u_long frompc, u_long selfpc);
+static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__;
#define _MCOUNT_DECL(frompc, selfpc) \
static void mcount_internal (u_long frompc, u_long selfpc)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea0b49e7f858a815a814def0be68bc4395ccc4fc
commit ea0b49e7f858a815a814def0be68bc4395ccc4fc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 13 05:46:37 2004 +0000
Define non-standard RUSAGE_ enums as __RUSAGE_ and adjust macros
accordingly.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index abf5c69..868fd7b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -151,8 +151,8 @@ enum __rusage_who
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
/* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+ __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
};
#define __need_timeval
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 01cd5b5..40fc949 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -56,30 +56,30 @@ enum __rlimit_resource
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
- RLIMIT_RSS = 7,
-#define RLIMIT_RSS RLIMIT_RSS
+ __RLIMIT_RSS = 7,
+#define RLIMIT_RSS __RLIMIT_RSS
/* Number of open files. */
RLIMIT_NOFILE = 5,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
/* Address space limit (?) */
RLIMIT_AS = 6,
#define RLIMIT_AS RLIMIT_AS
/* Number of processes. */
- RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC RLIMIT_NPROC
+ __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
/* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+ __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
/* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
/* Maximum number of pending signals. */
__RLIMIT_SIGPENDING = 11,
@@ -89,10 +89,10 @@ enum __rlimit_resource
__RLIMIT_MSGQUEUE = 12,
#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
- RLIMIT_NLIMITS = 13,
- RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+ __RLIMIT_NLIMITS = 13,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
};
/* Value to indicate that there is no limit. */
@@ -151,8 +151,8 @@ enum __rusage_who
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
/* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
+ __RUSAGE_BOTH = -2
+#define RUSAGE_BOTH __RUSAGE_BOTH
};
#define __need_timeval
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4214993aa0de76400ea3e895f0ce69d3a2cb0b80
commit 4214993aa0de76400ea3e895f0ce69d3a2cb0b80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 12 18:05:26 2004 +0000
(RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE): Add.
(RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index b8551a2..01cd5b5 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,5 +1,6 @@
/* Bit values & structures for resource limits. Linux/MIPS version.
- Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -80,7 +81,16 @@ enum __rlimit_resource
RLIMIT_LOCKS = 10,
#define RLIMIT_LOCKS RLIMIT_LOCKS
- RLIM_NLIMITS = 11
+ /* Maximum number of pending signals. */
+ __RLIMIT_SIGPENDING = 11,
+#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
+
+ /* Maximum bytes in POSIX message queues. */
+ __RLIMIT_MSGQUEUE = 12,
+#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
+
+ RLIMIT_NLIMITS = 13,
+ RLIM_NLIMITS = RLIMIT_NLIMITS
#define RLIMIT_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIM_NLIMITS
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=744a7b202eaa010935ab3276d8ad276eb40bdd57
commit 744a7b202eaa010935ab3276d8ad276eb40bdd57
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 12 18:04:51 2004 +0000
(RLIMIT_SIGPENDING, RLIMIT_MSGQUEUE): Add.
(RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust.
Define non-standard RLIMIT__ enums as __RLIMIT_ and adjust macros
accordingly.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index 3f4e72c..abf5c69 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -1,5 +1,6 @@
/* Bit values & structures for resource limits. Alpha/Linux version.
- Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,34 +56,43 @@ enum __rlimit_resource
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
+ __RLIMIT_RSS = 5,
+#define RLIMIT_RSS __RLIMIT_RSS
/* Number of open files. */
RLIMIT_NOFILE = 6,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
/* Address space limit (?) */
RLIMIT_AS = 7,
#define RLIMIT_AS RLIMIT_AS
/* Number of processes. */
- RLIMIT_NPROC = 8,
-#define RLIMIT_NPROC RLIMIT_NPROC
+ __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
/* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 9,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+ __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
/* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
- RLIM_NLIMITS = 11
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
+ /* Maximum number of pending signals. */
+ __RLIMIT_SIGPENDING = 11,
+#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
+
+ /* Maximum bytes in POSIX message queues. */
+ __RLIMIT_MSGQUEUE = 12,
+#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
+
+ __RLIMIT_NLIMITS = 13,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
};
/* Value to indicate that there is no limit. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c908feca74ab5fe4191c060ff336fa9a4cbc36f4
commit c908feca74ab5fe4191c060ff336fa9a4cbc36f4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 12 17:27:20 2004 +0000
Add __BEGIN_DECLS for __getpagesize declaration.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 4184265..bbee434 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +36,8 @@
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+__BEGIN_DECLS
+
/* Segment low boundary address multiple. */
#define SHMLBA (__getpagesize ())
extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -93,3 +96,5 @@ struct shm_info
};
#endif /* __USE_MISC */
+
+__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=717de822dcc29cc7f34e7c94e63b3f4cf572f470
commit 717de822dcc29cc7f34e7c94e63b3f4cf572f470
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 5 03:46:43 2004 +0000
2004-08-04 Roland McGrath <roland@frob.com>
New directory implementing glibc add-on infrastructure for
ports maintained separate from the core glibc source tree.
* README, configure.in, Makeconfig, Banner, ChangeLog: New files.
* configure: New generated file.
diff --git a/Banner b/Banner
new file mode 100644
index 0000000..6b9c1f0
--- /dev/null
+++ b/Banner
@@ -0,0 +1 @@
+Support for some architectures added on, not maintained in glibc core.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..efaee34
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,6 @@
+2004-08-04 Roland McGrath <roland@frob.com>
+
+ New directory implementing glibc add-on infrastructure for
+ ports maintained separate from the core glibc source tree.
+ * README, configure.in, Makeconfig, Banner, ChangeLog: New files.
+ * configure: New generated file.
diff --git a/Makeconfig b/Makeconfig
new file mode 100644
index 0000000..20a0f08
--- /dev/null
+++ b/Makeconfig
@@ -0,0 +1,35 @@
+# Makeconfig fragment for glibc ports add-on.
+
+# These rules make sure that sysdeps/CPU/preconfigure changes are noticed.
+# preconfigure fragments can be written by hand, or they can be generated
+# from preconfigure.in by autoconf like sysdeps/.../configure.in files.
+
+# Figure out the name of this add-on. The ports add-on infrastructure
+# scripts can be copied into separate add-on packages by any name.
+ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps
+
+$(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure)
+
+ifneq ($(AUTOCONF),no)
+
+ifeq ($(with-cvs),yes)
+define autoconf-it-cvs
+test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
+endef
+else
+autoconf-it-cvs =
+endif
+
+define autoconf-it
+@-rm -f $@.new
+$(AUTOCONF) $(ACFLAGS) $< > $@.new
+chmod a-w,a+x $@.new
+mv -f $@.new $@
+$(autoconf-it-cvs)
+endef
+
+$(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \
+ aclocal.m4
+ $(autoconf-it)
+
+endif # $(AUTOCONF) = no
diff --git a/README b/README
new file mode 100644
index 0000000..8e416b7
--- /dev/null
+++ b/README
@@ -0,0 +1,39 @@
+This directory is an add-on for the GNU C Library (glibc).
+It provides additional ports to machines and/or operating systems that are
+not maintained in the official glibc source tree.
+
+The scripts in the top level of this directory provide the infrastructure
+necessary for a glibc add-on. You can make a new add-on containing one or
+more ports by copying configure, configure.in, and Makeconfig into your own
+add-on directory, which you can give any name (it doesn't have to be
+`ports'). You may want to include a README and Banner of your own talking
+about your port's code in particular, rather than the generic ones here.
+
+The real source code for any ports is found in the sysdeps/ subdirectories.
+These should be exactly what would go into the main libc source tree if you
+were to incorporate it directly. The only exceptions are the files
+sysdeps/*/preconfigure and sysdeps/*/preconfigure.in; these are fragments
+used by this add-on's configure fragment. The purpose of these is to set
+$base_machine et al when the main libc configure's defaults are not right
+for some machine. Everything else can and should be done from a normal
+sysdeps/.../configure fragment that is used only when the configuration
+selects that sysdeps subdirectory. Each port that requires some special
+treatment before the sysdeps directory list is calculated, should add a
+sysdeps/CPU/preconfigure file; this can either be written by hand or
+generated by Autoconf from sysdeps/CPU/preconfigure.in, and follow the
+rules for glibc add-on configure fragments. No preconfigure file should do
+anything on an unrelated configuration, so that disparate ports can be put
+into a single add-on without interfering with each other.
+
+Like all glibc add-ons, the only way to use this is to place this directory
+(just a symlink won't do) inside the top-level glibc source directory.
+Then include the name of this directory (e.g. `ports') when you specify
+`--enable-add-ons=...' to glibc's configure (or use just --enable-add-ons
+to have it try every add-on directory sitting in your source tree).
+
+If you find problems with the top-level scripts in this add-on, please go
+to http://sources.redhat.com/bugzilla/ and file a report for the glibc
+under the "admin" component.
+
+
+$Id$
diff --git a/configure b/configure
new file mode 100755
index 0000000..e90ab67
--- /dev/null
+++ b/configure
@@ -0,0 +1,17 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+
+# The configure fragment in this file provides infrastructure for a glibc
+# add-on containing one or more glibc ports. Only these few script files
+# need exist in the top-level source directory of the add-on. The ports
+# themselves are contained entirely within their new sysdeps/ directories.
+# This makes it easy to take these few top-level files plus a new port's
+# additions to the sysdeps tree, and package a small add-on for that port.
+# The same infrastructure scripts work for any number of such glibc ports
+# collected together into a single shared add-on package.
+
+cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
+for frag in $cpu_frags; do
+ echo "$as_me:$LINENO: result: ports add-on running preconfigure fragment $frag" >&5
+echo "${ECHO_T}ports add-on running preconfigure fragment $frag" >&6
+ . $srcdir/$libc_add_on/$frag
+done
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..d37cb8d
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,17 @@
+dnl glibc add-on configure.in fragment for a ports add-on.
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+
+# The configure fragment in this file provides infrastructure for a glibc
+# add-on containing one or more glibc ports. Only these few script files
+# need exist in the top-level source directory of the add-on. The ports
+# themselves are contained entirely within their new sysdeps/ directories.
+# This makes it easy to take these few top-level files plus a new port's
+# additions to the sysdeps tree, and package a small add-on for that port.
+# The same infrastructure scripts work for any number of such glibc ports
+# collected together into a single shared add-on package.
+
+cpu_frags=`(cd $srcdir/$libc_add_on; echo sysdeps/*/preconfigure)`
+for frag in $cpu_frags; do
+ AC_MSG_RESULT(ports add-on running preconfigure fragment $frag)
+ . $srcdir/$libc_add_on/$frag
+done
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd68d85075a86736c25df42fc53cc41c73a3ded5
commit bd68d85075a86736c25df42fc53cc41c73a3ded5
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jul 30 18:15:57 2004 +0000
* sysdeps/alpha/divq.S: Save t3 before it gets clobbered.
* sysdeps/alpha/remq.S: Likewise.
* sysdeps/alpha/div.S, sysdeps/alpha/ldiv.S: Rewrite with the
new division algorithms in divl.S and divq.S respectively.
diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S
index 2bc3d56..e0eb7e9 100644
--- a/sysdeps/alpha/div.S
+++ b/sysdeps/alpha/div.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -17,13 +17,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include "div_libc.h"
-#ifdef __linux__
-# include <asm/gentrap.h>
-# include <asm/pal.h>
+#undef FRAME
+#ifdef __alpha_fix__
+#define FRAME 0
#else
-# include <machine/pal.h>
+#define FRAME 16
#endif
.set noat
@@ -32,78 +32,54 @@
.globl div
.ent div
div:
- .frame sp, 0, ra
+ .frame sp, FRAME, ra
+#if FRAME > 0
+ lda sp, -FRAME(sp)
+#endif
#ifdef PROF
+ .set macro
ldgp gp, 0(pv)
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set nomacro
.prologue 1
#else
.prologue 0
#endif
-#define divisor t1
-#define mask t2
-#define quotient t3
-#define modulus t4
-#define tmp1 t5
-#define tmp2 t6
-#define compare t7
-
- /* find correct sign for input to unsigned divide loop. */
- negl a1, modulus # e0 :
- negl a2, divisor # .. e1 :
- sextl a1, a1 # e0 :
- sextl a2, a2 # .. e1 :
- mov zero, quotient # e0 :
- mov 1, mask # .. e1 :
- cmovge a1, a1, modulus # e0 :
- cmovge a2, a2, divisor # .. e1 :
- beq a2, $divbyzero # e1 :
- unop # :
-
- /* shift divisor left, using 3-bit shifts for 32-bit divides as we
- can't overflow. Three-bit shifts will result in looping three
- times less here, but can result in two loops more later. Thus
- using a large shift isn't worth it (and s8addq pairs better than
- a shift). */
-
-1: cmpult divisor, modulus, compare # e0 :
- s8addq divisor, zero, divisor # .. e1 :
- s8addq mask, zero, mask # e0 :
- bne compare, 1b # .. e1 :
-
- /* start to go right again. */
-2: addq quotient, mask, tmp2 # e1 :
- srl mask, 1, mask # .. e0 :
- cmpule divisor, modulus, compare # e0 :
- subq modulus, divisor, tmp1 # .. e1 :
- cmovne compare, tmp2, quotient # e1 :
- srl divisor, 1, divisor # .. e0 :
- cmovne compare, tmp1, modulus # e0 :
- bne mask, 2b # .. e1 :
-
- /* find correct sign for result. */
- xor a1, a2, compare # e0 :
- negl quotient, tmp1 # .. e1 :
- negl modulus, tmp2 # e0 :
- cmovlt compare, tmp1, quotient # .. e1 :
- cmovlt a1, tmp2, modulus # e1 :
-
- /* and store it away in the structure. */
- stl quotient, 0(a0) # .. e0 :
- mov a0, v0 # e1 :
- stl modulus, 4(a0) # .. e0 :
- ret # e1 :
+ beq $18, $divbyzero
+
+ _ITOFT2 $17, $f0, 0, $18, $f1, 8
+
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ divt/c $f0, $f1, $f0
+ cvttq/c $f0, $f0
+
+ _FTOIT $f0, $0, 0
+
+ mull $0, $18, $1
+ subl $17, $1, $1
+
+ stl $0, 0(a0)
+ stl $1, 4(a0)
+ mov a0, v0
+
+#if FRAME > 0
+ lda sp, FRAME(sp)
+#endif
+ ret
$divbyzero:
mov a0, v0
- ldiq a0, GEN_INTDIV
+ lda a0, GEN_INTDIV
call_pal PAL_gentrap
-
- /* if trap returns, return zero. */
stl zero, 0(v0)
stl zero, 4(v0)
+
+#if FRAME > 0
+ lda sp, FRAME(sp)
+#endif
ret
.end div
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 4df7982..cab6c34 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -115,16 +115,16 @@ $fix_sign_in_ret1:
_FTOIT $f0, Q, 8
.align 3
$fix_sign_in_ret2:
+ ldt $f0, 0(sp)
+ stq t3, 0(sp)
+ cfi_restore ($f0)
+ cfi_rel_offset (t3, 0)
+
mulq Q, Y, QY
+ unop
stq t4, 8(sp)
-
- ldt $f0, 0(sp)
unop
cfi_rel_offset (t4, 8)
- cfi_restore ($f0)
- stq t3, 0(sp)
- unop
- cfi_rel_offset (t3, 0)
subq QY, X, R
mov Y, SY
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index 81b48cd..c90edfb 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -17,93 +17,195 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include "div_libc.h"
-#ifdef __linux__
-# include <asm/gentrap.h>
-# include <asm/pal.h>
+#undef FRAME
+#ifdef __alpha_fix__
+#define FRAME 0
#else
-# include <machine/pal.h>
+#define FRAME 16
#endif
+#undef X
+#undef Y
+#define X $17
+#define Y $18
+
.set noat
.align 4
.globl ldiv
.ent ldiv
ldiv:
- .frame sp, 0, ra
+ .frame sp, FRAME, ra
+#if FRAME > 0
+ lda sp, -FRAME(sp)
+#endif
#ifdef PROF
+ .set macro
ldgp gp, 0(pv)
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set nomacro
.prologue 1
#else
.prologue 0
#endif
-#define divisor t1
-#define mask t2
-#define quotient t3
-#define modulus t4
-#define tmp1 t5
-#define tmp2 t6
-#define compare t7
-
- /* find correct sign for input to unsigned divide loop. */
- mov a1, modulus # e0 :
- mov a2, divisor # .. e1 :
- negq a1, tmp1 # e0 :
- negq a2, tmp2 # .. e1 :
- mov zero, quotient # e0 :
- mov 1, mask # .. e1 :
- cmovlt a1, tmp1, modulus # e0 :
- cmovlt a2, tmp2, divisor # .. e1 :
- beq a2, $divbyzero # e1 :
- unop # :
-
- /* shift divisor left. */
-1: cmpult divisor, modulus, compare # e0 :
- blt divisor, 2f # .. e1 :
- addq divisor, divisor, divisor # e0 :
- addq mask, mask, mask # .. e1 :
- bne compare, 1b # e1 :
- unop # :
-
- /* start to go right again. */
-2: addq quotient, mask, tmp2 # e1 :
- srl mask, 1, mask # .. e0 :
- cmpule divisor, modulus, compare # e0 :
- subq modulus, divisor, tmp1 # .. e1 :
- cmovne compare, tmp2, quotient # e1 :
- srl divisor, 1, divisor # .. e0 :
- cmovne compare, tmp1, modulus # e0 :
- bne mask, 2b # .. e1 :
-
- /* find correct sign for result. */
- xor a1, a2, compare # e0 :
- negq quotient, tmp1 # .. e1 :
- negq modulus, tmp2 # e0 :
- cmovlt compare, tmp1, quotient # .. e1 :
- cmovlt a1, tmp2, modulus # e1 :
-
- /* and store it away in the structure. */
-9: stq quotient, 0(a0) # .. e0 :
- mov a0, v0 # e1 :
- stq modulus, 8(a0) # .. e0 :
- ret # e1 :
+ beq Y, $divbyzero
+
+ _ITOFT2 X, $f0, 0, Y, $f1, 8
+
+ .align 4
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ divt/c $f0, $f1, $f0
+ unop
+
+ /* Check to see if X fit in the double as an exact value. */
+ sll X, (64-53), AT
+ sra AT, (64-53), AT
+ cmpeq X, AT, AT
+ beq AT, $x_big
+
+ /* If we get here, we're expecting exact results from the division.
+ Do nothing else besides convert and clean up. */
+ cvttq/c $f0, $f0
+ _FTOIT $f0, $0, 0
+
+$egress:
+ mulq $0, Y, $1
+ subq X, $1, $1
+
+ stq $0, 0($16)
+ stq $1, 8($16)
+ mov $16, $0
+
+#if FRAME > 0
+ lda sp, FRAME(sp)
+#endif
+ ret
+
+ .align 4
+$x_big:
+ /* If we get here, X is large enough that we don't expect exact
+ results, and neither X nor Y got mis-translated for the fp
+ division. Our task is to take the fp result, figure out how
+ far it's off from the correct result and compute a fixup. */
+
+#define Q v0 /* quotient */
+#define R t0 /* remainder */
+#define SY t1 /* scaled Y */
+#define S t2 /* scalar */
+#define QY t3 /* Q*Y */
+
+ /* The fixup code below can only handle unsigned values. */
+ or X, Y, AT
+ mov $31, t5
+ blt AT, $fix_sign_in
+$fix_sign_in_ret1:
+ cvttq/c $f0, $f0
+
+ _FTOIT $f0, Q, 8
+ .align 3
+$fix_sign_in_ret2:
+ mulq Q, Y, QY
+
+ .align 4
+ subq QY, X, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_high
+
+$q_high_ret:
+ subq X, QY, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_low
+
+$q_low_ret:
+ negq Q, t4
+ cmovlbs t5, t4, Q
+ br $egress
+
+ .align 4
+ /* The quotient that we computed was too large. We need to reduce
+ it by S such that Y*S >= R. Obviously the closer we get to the
+ correct value the better, but overshooting high is ok, as we'll
+ fix that up later. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_high:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ subq Q, S, Q
+ unop
+ subq QY, SY, QY
+ br $q_high_ret
+
+ .align 4
+ /* The quotient that we computed was too small. Divide Y by the
+ current remainder (R) and add that to the existing quotient (Q).
+ The expectation, of course, is that R is much smaller than X. */
+ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We
+ already have a copy of Y in SY and the value 1 in S. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_low:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ /* Shift-down and subtract loop. Each iteration compares our scaled
+ Y (SY) with the remainder (R); if SY <= R then X is divisible by
+ Y's scalar (S) so add it to the quotient (Q). */
+2: addq Q, S, t3
+ srl S, 1, S
+ cmpule SY, R, AT
+ subq R, SY, t4
+
+ cmovne AT, t3, Q
+ cmovne AT, t4, R
+ srl SY, 1, SY
+ bne S, 2b
+
+ br $q_low_ret
+
+ .align 4
+$fix_sign_in:
+ /* If we got here, then X|Y is negative. Need to adjust everything
+ such that we're doing unsigned division in the fixup loop. */
+ /* T5 is true if result should be negative. */
+ xor X, Y, AT
+ cmplt AT, 0, t5
+ cmplt X, 0, AT
+ negq X, t0
+
+ cmovne AT, t0, X
+ cmplt Y, 0, AT
+ negq Y, t0
+
+ cmovne AT, t0, Y
+ blbc t5, $fix_sign_in_ret1
+
+ cvttq/c $f0, $f0
+ _FTOIT $f0, Q, 8
+ .align 3
+ negq Q, Q
+ br $fix_sign_in_ret2
$divbyzero:
mov a0, v0
lda a0, GEN_INTDIV
call_pal PAL_gentrap
-
- /* if trap returns, return zero. */
stq zero, 0(v0)
stq zero, 8(v0)
- ret
- .end ldiv
+#if FRAME > 0
+ lda sp, FRAME(sp)
+#endif
+ ret
-weak_alias(ldiv, lldiv)
-weak_alias(ldiv, imaxdiv)
+ .end ldiv
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index a8795c8..40c68d7 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -116,16 +116,16 @@ $fix_sign_in_ret1:
_FTOIT $f0, Q, 8
.align 3
$fix_sign_in_ret2:
+ ldt $f0, 0(sp)
+ stq t3, 0(sp)
+ cfi_restore ($f0)
+ cfi_rel_offset (t3, 0)
+
mulq Q, Y, QY
+ unop
stq t4, 8(sp)
-
- ldt $f0, 0(sp)
unop
cfi_rel_offset (t4, 8)
- cfi_restore ($f0)
- stq t3, 0(sp)
- unop
- cfi_rel_offset (t3, 0)
subq QY, X, R
mov Y, SY
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c3c0a7a13ed5fc69dae54a8fdae0b56c9c6a761
commit 5c3c0a7a13ed5fc69dae54a8fdae0b56c9c6a761
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jul 21 06:13:15 2004 +0000
Add semtimedop.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index b6d2e94..b0d79ff 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -16,5 +16,6 @@ shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
+semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c65436649678d4ff02ae73ac9207e7e682462c90
commit c65436649678d4ff02ae73ac9207e7e682462c90
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 20 16:37:41 2004 +0000
($(objpfx)syscall-%.h): Sort by syscalls. Make sure we get headers such
as sgidefs.h from the build tree before just-installed ones.
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index c3ab6ed..db06a48 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -24,18 +24,22 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
echo '#include <sgidefs.h>'; \
rm -f $(@:.d=.h).newt; \
$(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
- -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
+ -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
> $(@:.d=.h).newt; \
if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
- echo '#if _MIPS_SIM == _MIPS_SIM_ABI64'; \
- sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \
- echo '#elif _MIPS_SIM == _MIPS_SIM_NABI32'; \
- sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \
+ echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \
+ sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
+ LC_ALL=C sort; \
+ echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \
+ sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
+ LC_ALL=C sort; \
echo '#else'; \
- sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \
+ sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
+ LC_ALL=C sort; \
echo '#endif'; \
- sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt; \
+ sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
+ LC_ALL=C sort +1.8; \
else \
cat $(@:.d=.h).newt; \
fi; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=24c4c341e3b4231bf13d6c4634089f0b6ee0c41c
commit 24c4c341e3b4231bf13d6c4634089f0b6ee0c41c
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 20 16:35:32 2004 +0000
Use standard names for ABI macros, include sgidefs.h where appropriate.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index 5148121..f3d05bd 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -1,5 +1,5 @@
/* Low-level functions for atomic operations. Mips version.
- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
#define _MIPS_ATOMICITY_H 1
#include <inttypes.h>
+#include <sgidefs.h>
static inline int
__attribute__ ((unused))
@@ -85,7 +86,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
#endif
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
"lld %1,%5\n\t"
#else
"ll %1,%5\n\t"
@@ -93,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
"move %0,%4\n\t"
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
"scd %0,%2\n\t"
#else
"sc %0,%2\n\t"
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index b2ee374..4ca199d 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003
+ Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -22,6 +22,8 @@
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
+#include <sgidefs.h>
+
typedef struct
{
#if _MIPS_SIM == _MIPS_SIM_ABI32
@@ -60,7 +62,7 @@ typedef struct
int __fpc_csr;
/* Callee-saved floating point registers. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
double __fpregs[8];
#else
double __fpregs[6];
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 570ac5b..bfd3a62 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -130,7 +130,7 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
#else
# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h
index 4a51768..c1ce876 100644
--- a/sysdeps/mips/fpu/bits/mathdef.h
+++ b/sysdeps/mips/fpu/bits/mathdef.h
@@ -21,6 +21,8 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
+#include <sgidefs.h>
+
#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
# define _MATH_H_MATHDEF 1
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index 5a87c85..f23a4c3 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
+ Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sgidefs.h>
+
#define _MCOUNT_DECL(frompc,selfpc) \
static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
@@ -81,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
# define CPRETURN
#endif
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
# define PTR_ADDU_STRING "add" /* no u */
# define PTR_SUBU_STRING "sub" /* no u */
-#elif defined _ABI64 && _MIPS_SIM == _ABI64
+#elif _MIPS_SIM == _MIPS_SIM_ABI64
# define PTR_ADDU_STRING "daddu"
# define PTR_SUBU_STRING "dsubu"
#else
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 32587d1..b270579 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -38,7 +39,7 @@ __longjmp (env, val_arg)
register int val asm ("a1");
/* Pull back the floating point callee-saved registers. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1]));
asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2]));
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index b55a3c6..b5afd14 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -29,7 +29,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
long long gp)
{
/* Store the floating point callee-saved registers... */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+#if _MIPS_SIM == _MIPS_SIM_ABI64
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index d65175f..c3ab6ed 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -21,15 +21,16 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
echo '#endif'; \
echo ''; \
+ echo '#include <sgidefs.h>'; \
rm -f $(@:.d=.h).newt; \
$(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
-x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
> $(@:.d=.h).newt; \
if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
- echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \
+ echo '#if _MIPS_SIM == _MIPS_SIM_ABI64'; \
sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \
- echo '#elif defined _ABIN32 && _MIPS_SIM == _ABIN32'; \
+ echo '#elif _MIPS_SIM == _MIPS_SIM_NABI32'; \
sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \
echo '#else'; \
sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 720e0a9..48531d8 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -23,7 +23,7 @@
#endif
#include <sys/types.h>
-
+#include <sgidefs.h>
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -143,7 +143,7 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
-#if ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM != _MIPS_SIM_ABI64
/* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
fcntls in o32 and n32, never has this field. */
long int l_sysid;
@@ -153,7 +153,7 @@ typedef struct flock
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
-#if ! defined __USE_FILE_OFFSET64 && ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _MIPS_SIM_ABI64
/* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
flock in o32 and n32, never has this field. */
long int pad[4];
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
index 888c05f..19f5881 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
+#include <sgidefs.h>
+
#ifndef sigcontext_struct
/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
we need sigcontext. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index c3819d3..2dd4cab 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,6 +21,8 @@
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
+#include <sgidefs.h>
+
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_LINUX_OLD 1
#define _STAT_VER_KERNEL 1
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index 9a7b423..8ee636f 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -30,6 +30,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed"
-e 's,__NR_N64_N32_,__NR_N32_,g' \
-e 's,__NR_N64_N64_,__NR_N64_,g' \
| awk > asm-unistd.h '
+BEGIN { print "#include <sgidefs.h>"; }
/^#define __NR.*unused/ { print; next; }
/^#define __NR_N64__exit __NR_N64_exit/ {
print "#define __NR__exit __NR_exit";
@@ -50,7 +51,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed"
name = $2;
sub (/_N32_/, "_", name);
print;
- print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32";
+ print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
print "# define " name " " $2;
print "#endif";
next;
@@ -59,7 +60,7 @@ echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed"
name = $2;
sub (/_N64_/, "_", name);
print;
- print "#if defined _ABI64 && _MIPS_SIM == _ABI64";
+ print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
print "# define " name " " $2;
print "#endif";
next;
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index 3df0c91..6783bc2 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -30,6 +30,7 @@ mips*64*)
-e 's,__NR_N64_N32_,__NR_N32_,g' \
-e 's,__NR_N64_N64_,__NR_N64_,g' \
| awk > asm-unistd.h '
+BEGIN { print "#include <sgidefs.h>"; }
/^#define __NR.*unused/ { print; next; }
/^#define __NR_N64__exit __NR_N64_exit/ {
print "#define __NR__exit __NR_exit";
@@ -50,7 +51,7 @@ mips*64*)
name = $2;
sub (/_N32_/, "_", name);
print;
- print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32";
+ print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
print "# define " name " " $2;
print "#endif";
next;
@@ -59,7 +60,7 @@ mips*64*)
name = $2;
sub (/_N64_/, "_", name);
print;
- print "#if defined _ABI64 && _MIPS_SIM == _ABI64";
+ print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
print "# define " name " " $2;
print "#endif";
next;
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 3f1bce5..6a4c409 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -1,3 +1,4 @@
+#include <sgidefs.h>
/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
userland data structures are not identical, because of different
padding. */
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 7a9b086..d2a6c69 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -27,6 +28,7 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#include <sgidefs.h>
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
@@ -51,14 +53,14 @@ __libc_pread (fd, buf, count, offset)
{
ssize_t result;
-#if (defined _ABI64 && _MIPS_SIM != _ABI64)
+#if _MIPS_SIM != _MIPS_SIM_ABI64
assert (sizeof (offset) == 4);
#endif
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -76,7 +78,7 @@ __libc_pread (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 25f80df..b63bb9c 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -26,6 +27,7 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#include <sgidefs.h>
#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pread
@@ -54,7 +56,7 @@ __libc_pread64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -73,7 +75,7 @@ __libc_pread64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
index 78c662a..af8266d 100644
--- a/sysdeps/unix/sysv/linux/mips/ptrace.c
+++ b/sysdeps/unix/sysv/linux/mips/ptrace.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,8 +26,9 @@
#include <sysdep.h>
#include <sys/syscall.h>
#include <bp-checks.h>
+#include <sgidefs.h>
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
__extension__ typedef long long int reg_type;
#else
typedef long int reg_type;
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 3c0eba5..50c8265 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -27,6 +28,7 @@
#include <bp-checks.h>
#include <kernel-features.h>
+#include <sgidefs.h>
#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pwrite
@@ -51,14 +53,14 @@ __libc_pwrite (fd, buf, count, offset)
{
ssize_t result;
-#if (defined _ABI64 && _MIPS_SIM != _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_ABI64
assert (sizeof (offset) == 4);
#endif
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -76,7 +78,7 @@ __libc_pwrite (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index fef333b..109b2c5 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
@@ -53,7 +54,7 @@ __libc_pwrite64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
offset);
#else
@@ -73,7 +74,7 @@ __libc_pwrite64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index bc7db2b..83b71de 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +24,8 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <sgidefs.h>
+
#include "kernel-features.h"
/* The difference here is that the sigaction structure used in the
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 3ab6d99..2b50647 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -18,6 +18,8 @@
02111-1307 USA. */
+#include <sgidefs.h>
+
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define SIGCONTEXT unsigned long _code, struct sigcontext *
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 0beb332..cb84677 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -28,12 +28,13 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/user.h>
+#include <sgidefs.h>
/* ELF register definitions */
#define ELF_NGREG 45
#define ELF_NFPREG 33
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
__extension__ typedef unsigned long long elf_greg_t;
#else
typedef unsigned long elf_greg_t;
@@ -64,7 +65,7 @@ struct elf_prstatus
{
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
__extension__ unsigned long long int pr_sigpend;
__extension__ unsigned long long int pr_sighold;
#else
@@ -92,7 +93,7 @@ struct elf_prpsinfo
char pr_sname; /* Char for pr_state. */
char pr_zomb; /* Zombie. */
char pr_nice; /* Nice val. */
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
__extension__ unsigned long long int pr_flag;
#else
unsigned long int pr_flag; /* Flags. */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
index a8e4a47..9badeb3 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
@@ -1,5 +1,5 @@
/* `ptrace' debugger support interface. Linux version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -22,6 +22,7 @@
#define _SYS_PTRACE_H 1
#include <features.h>
+#include <sgidefs.h>
__BEGIN_DECLS
@@ -123,7 +124,7 @@ enum __ptrace_request
appear (those that are used for the particular request) as:
pid_t PID, void *ADDR, int DATA, void *ADDR2
after REQUEST. */
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+#if _MIPS_SIM == _MIPS_SIM_NABI32
__extension__ extern long long int ptrace
(enum __ptrace_request __request, ...) __THROW;
#else
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index a840a94..006e161 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
@@ -22,6 +22,8 @@
#include <features.h>
+#include <sgidefs.h>
+
__BEGIN_DECLS
extern int _test_and_set (int *p, int v) __THROW;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index b097bf2..c03566b 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
included in <signal.h>. */
#include <bits/sigcontext.h>
+#include <sgidefs.h>
/* Type for general register. Even in o32 we assume 64-bit registers,
like the kernel. */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h
index 8b21ff2..dc3ee83 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/user.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
+#include <sgidefs.h>
+
/* The whole purpose of this file is for GDB and GDB only. Don't read
too much into it. Don't use it for anything other than GDB unless
you know what you are doing. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef827649e7c8c23607b91f4ca4161e879857fd50
commit ef827649e7c8c23607b91f4ca4161e879857fd50
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 20 09:24:49 2004 +0000
(__dl_runtime_resolve): Update to use _dl_lookup_symbol_x.
(elf_machine_runtime_link_map): Don't INTUSE _dl_signal_error.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c8397b2..570ac5b 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -254,7 +254,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
}
- INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
+ _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
return NULL;
}
@@ -366,17 +366,17 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
\
if (version->hash != 0) \
{ \
- value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
- &sym, l->l_scope, version,\
- ELF_RTYPE_CLASS_PLT, 0); \
+ value = _dl_lookup_symbol_x (strtab + sym->st_name, l, \
+ &sym, l->l_scope, version, \
+ ELF_RTYPE_CLASS_PLT, 0, 0); \
break; \
} \
/* Fall through. */ \
} \
case 0: \
- value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
- l->l_scope, ELF_RTYPE_CLASS_PLT, \
- DL_LOOKUP_ADD_DEPENDENCY); \
+ value = _dl_lookup_symbol_x (strtab + sym->st_name, l, &sym, \
+ l->l_scope, 0, ELF_RTYPE_CLASS_PLT, \
+ DL_LOOKUP_ADD_DEPENDENCY, 0); \
} \
\
/* Currently value contains the base load address of the object \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=38c0241ea9b69d7d0058445c89fa230bcd37ed42
commit 38c0241ea9b69d7d0058445c89fa230bcd37ed42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 5 17:36:14 2004 +0000
(ffs): Add libc_hidden_builtin_def.
diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S
index 6d87008..fb1cdd9 100644
--- a/sysdeps/alpha/alphaev67/ffs.S
+++ b/sysdeps/alpha/alphaev67/ffs.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,3 +48,4 @@ ENTRY(__ffs)
END(__ffs)
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index c73d822..5f2074e 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2004 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -86,5 +86,6 @@ $ffsl..ng:
END(ffsl)
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
weak_extern (ffsl)
weak_alias (ffsl, ffsll)
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index a1a7444..6f080db 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Amd 290x0.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -36,6 +36,7 @@ __ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
#else
#include <sysdeps/generic/ffs.c>
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
index 979696e..ad907a4 100644
--- a/sysdeps/i960/ffs.c
+++ b/sysdeps/i960/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For i960 Core architecture
This file is part of the GNU C Library.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -37,6 +37,7 @@ __ffs (x)
return cnt;
}
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
#else
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index a296121..189936b 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For mc68020, mc68030, mc68040.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -37,6 +37,7 @@ __ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
#undef ffsl
weak_alias (__ffs, ffsl)
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index fe78ebc..b7db70f 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Motorola 88000.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,7 @@ __ffs (x)
return cnt + 1;
}
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
#else
#include <sysdeps/generic/ffs.c>
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index 802bbc8..4d01727 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
@@ -35,6 +35,7 @@ __ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
+libc_hidden_builtin_def (ffs)
#else
#include <sysdeps/generic/ffs.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a18e04cfb5565352dfd0f2ab006b39b76d9311fd
commit a18e04cfb5565352dfd0f2ab006b39b76d9311fd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 28 21:03:34 2004 +0000
[BZ #230]
(_dl_start_user): Use ldah/ldl to load _dl_skip_args.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 35d7e1d..7c5f3c1 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -321,7 +321,8 @@ _dl_start_user: \n\
mov $0, $9 \n\
/* See if we were run as a command with the executable \n\
file name as an extra leading argument. */ \n\
- ldl $1, _dl_skip_args($gp) !gprel \n\
+ ldah $1, _dl_skip_args($gp) !gprelhigh \n\
+ ldl $1, _dl_skip_args($1) !gprellow \n\
bne $1, $fixup_stack \n\
$fixup_stack_ret: \n\
/* The special initializer gets called with the stack \n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2acd67aa30c85e0b57e16026c35a35248edf380a
commit 2acd67aa30c85e0b57e16026c35a35248edf380a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 28 21:02:47 2004 +0000
[BZ #231]
(__syscall_error): Avoid !samegp relocation in librt.so.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index ce848f4..c67a654 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -95,7 +96,7 @@ __syscall_error:
PROLOGUE
/* Find our per-thread errno address */
-#ifdef PIC
+#if defined PIC && !defined IS_IN_librt
bsr ra, __errno_location !samegp
#else
jsr ra, __errno_location
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d32bff863e4224b869c1539d24a2d16056776c1e
commit d32bff863e4224b869c1539d24a2d16056776c1e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 28 21:02:06 2004 +0000
(inline_syscall6): Fix a typo.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 26cf918..f60eafe 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -364,7 +365,7 @@ __LABEL(name) \
__asm__ __volatile__ \
("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
: inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
"=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \
"1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=594e390a371bf9aa09cc7a813ed3beeeda7d886c
commit 594e390a371bf9aa09cc7a813ed3beeeda7d886c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 28 20:57:50 2004 +0000
(MULTIPLE_THREADS_OFFSET): Define unconditionally.
diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym
index a1a1e45..14494ee 100644
--- a/sysdeps/alpha/nptl/tcb-offsets.sym
+++ b/sysdeps/alpha/nptl/tcb-offsets.sym
@@ -7,7 +7,5 @@
# define __builtin_thread_pointer() ((void *) 0)
# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
-#if TLS_MULTIPLE_THREADS_IN_TCB
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-#endif
PID_OFFSET thread_offsetof (pid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e79bfc6741e5e2c9e1c8eafff7419c2ccded4b6
commit 5e79bfc6741e5e2c9e1c8eafff7419c2ccded4b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 22 05:55:22 2004 +0000
Lowlevel system dependent code for Unix/Alpha.
diff --git a/sysdeps/unix/alpha/rt-sysdep.S b/sysdeps/unix/alpha/rt-sysdep.S
new file mode 100644
index 0000000..f966bf1
--- /dev/null
+++ b/sysdeps/unix/alpha/rt-sysdep.S
@@ -0,0 +1 @@
+#include <sysdep.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be8cedf82f3d6b7542c34eef97e2a714d1202b67
commit be8cedf82f3d6b7542c34eef97e2a714d1202b67
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 22 05:54:44 2004 +0000
Additional makefile for Unix on Alpha.
diff --git a/sysdeps/unix/alpha/Makefile b/sysdeps/unix/alpha/Makefile
new file mode 100644
index 0000000..441aa02
--- /dev/null
+++ b/sysdeps/unix/alpha/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),rt)
+librt-sysdep_routines += rt-sysdep
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48a7f702e8a022530a05e58fe3c94bec5159044f
commit 48a7f702e8a022530a05e58fe3c94bec5159044f
Author: Richard Henderson <rth@redhat.com>
Date: Mon Jun 14 18:04:25 2004 +0000
* sysdeps/alpha/div_libc.h (_ITOFS): Use "sp" not "$sp".
(_ITOFT, _FTOIT, _ITOFT2): Likewise.
diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h
index 27209bd..2f06282 100644
--- a/sysdeps/alpha/div_libc.h
+++ b/sysdeps/alpha/div_libc.h
@@ -120,8 +120,8 @@ DIVBYZERO:
#ifdef __alpha_fix__
itofs \gr, \fr
#else
- stl \gr, \slot($sp)
- lds \fr, \slot($sp)
+ stl \gr, \slot(sp)
+ lds \fr, \slot(sp)
#endif
.endm
@@ -129,8 +129,8 @@ DIVBYZERO:
#ifdef __alpha_fix__
itoft \gr, \fr
#else
- stq \gr, \slot($sp)
- ldt \fr, \slot($sp)
+ stq \gr, \slot(sp)
+ ldt \fr, \slot(sp)
#endif
.endm
@@ -138,8 +138,8 @@ DIVBYZERO:
#ifdef __alpha_fix__
ftoit \fr, \gr
#else
- stt \fr, \slot($sp)
- ldq \gr, \slot($sp)
+ stt \fr, \slot(sp)
+ ldq \gr, \slot(sp)
#endif
.endm
@@ -150,9 +150,9 @@ DIVBYZERO:
itoft \gr1, \fr1
itoft \gr2, \fr2
#else
- stq \gr1, \slot1($sp)
- stq \gr2, \slot2($sp)
- ldt \fr1, \slot1($sp)
- ldt \fr2, \slot2($sp)
+ stq \gr1, \slot1(sp)
+ stq \gr2, \slot2(sp)
+ ldt \fr1, \slot1(sp)
+ ldt \fr2, \slot2(sp)
#endif
.endm
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=482f87008140f8aa5354822fdffd160cd25e0e6b
commit 482f87008140f8aa5354822fdffd160cd25e0e6b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 11 10:15:34 2004 +0000
2004-06-11 Roland McGrath <roland@redhat.com>
* sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian.
From Krzysztof Halasa <khc@pm.waw.pl>.
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
index f29528a..a83c41d 100644
--- a/sysdeps/arm/strlen.S
+++ b/sysdeps/arm/strlen.S
@@ -53,12 +53,21 @@ Laligned: @ here, we have a word in r2. Does it
ldrne r2, [r1], $4 @ and we continue to the next word
bne Laligned @
Llastword: @ drop through to here once we find a
+#ifdef __ARMEB__
+ tst r2, $0xff000000 @ word that has a zero byte in it
+ addne r0, r0, $1 @
+ tstne r2, $0x00ff0000 @ and add up to 3 bytes on to it
+ addne r0, r0, $1 @
+ tstne r2, $0x0000ff00 @ (if first three all non-zero, 4th
+ addne r0, r0, $1 @ must be zero)
+#else
tst r2, $0x000000ff @ word that has a zero byte in it
addne r0, r0, $1 @
tstne r2, $0x0000ff00 @ and add up to 3 bytes on to it
addne r0, r0, $1 @
tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th
addne r0, r0, $1 @ must be zero)
+#endif
RETINSTR(mov,pc,lr)
END(strlen)
libc_hidden_builtin_def (strlen)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64d5339733aa65f02c532f37d71206190c140d40
commit 64d5339733aa65f02c532f37d71206190c140d40
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 3 15:57:42 2004 +0000
(pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 1bb2968..62c853c 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -76,11 +76,12 @@ typedef union
struct
{
int __lock;
- int __clock;
+ unsigned int __futex;
unsigned long long int __total_seq;
unsigned long long int __wakeup_seq;
unsigned long long int __woken_seq;
void *__mutex;
+ int __clock;
unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0a27e2f477393464964b9c80577345583246057
commit e0a27e2f477393464964b9c80577345583246057
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 3 15:57:25 2004 +0000
(FUTEX_CMP_REQUEUE): Define.
(lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
internally. Return non-zero if error, zero if success.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index a7079a8..fd4a7ca 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -30,6 +30,7 @@
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
/* Initializer for compatibility lock. */
#define LLL_MUTEX_LOCK_INITIALIZER (0)
@@ -61,14 +62,15 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
-#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \
+/* Returns non-zero if error happened, zero if success. */
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- __ret = INTERNAL_SYSCALL (futex, __err, 5, \
- (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \
- (mutex)); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 6, \
+ (futexp), FUTEX_CMP_REQUEUE, (nr_wake), \
+ (nr_move), (mutex), (val)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a9a971c4d859504a14fbb3cf1d2d71e52917609
commit 8a9a971c4d859504a14fbb3cf1d2d71e52917609
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 28 06:39:36 2004 +0000
Add libc_hidden_builtin_def.
diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S
index d09babc..b5da4e0 100644
--- a/sysdeps/alpha/alphaev67/stpcpy.S
+++ b/sysdeps/alpha/alphaev67/stpcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@redhat.com>.
@@ -51,3 +51,4 @@ ENTRY(__stpcpy)
weak_alias (__stpcpy, stpcpy)
libc_hidden_def (__stpcpy)
+libc_hidden_builtin_def (stpcpy)
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
index a37a308..b73e85f 100644
--- a/sysdeps/alpha/stpcpy.S
+++ b/sysdeps/alpha/stpcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -53,3 +53,4 @@ ENTRY(__stpcpy)
weak_alias (__stpcpy, stpcpy)
libc_hidden_def (__stpcpy)
+libc_hidden_builtin_def (stpcpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=945ec97938d552e2461c8e24dd84d35b250e5fbe
commit 945ec97938d552e2461c8e24dd84d35b250e5fbe
Author: Andreas Schwab <schwab@suse.de>
Date: Sun May 23 10:22:47 2004 +0000
Use "+m" constraint instead
of separate "m" constraints.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
index 746dc2e..6b6db71 100644
--- a/sysdeps/m68k/m68020/bits/atomic.h
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>, 2003.
@@ -48,22 +48,22 @@ typedef uintmax_t uatomic_max_t;
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
({ __typeof (*(mem)) __ret; \
__asm __volatile ("cas%.b %0,%2,%1" \
- : "=d" (__ret), "=m" (*(mem)) \
- : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ : "=d" (__ret), "+m" (*(mem)) \
+ : "d" (newval), "0" (oldval)); \
__ret; })
#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
({ __typeof (*(mem)) __ret; \
__asm __volatile ("cas%.w %0,%2,%1" \
- : "=d" (__ret), "=m" (*(mem)) \
- : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ : "=d" (__ret), "+m" (*(mem)) \
+ : "d" (newval), "0" (oldval)); \
__ret; })
#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
({ __typeof (*(mem)) __ret; \
__asm __volatile ("cas%.l %0,%2,%1" \
- : "=d" (__ret), "=m" (*(mem)) \
- : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ : "=d" (__ret), "+m" (*(mem)) \
+ : "d" (newval), "0" (oldval)); \
__ret; })
# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
@@ -81,18 +81,18 @@ typedef uintmax_t uatomic_max_t;
if (sizeof (*(mem)) == 1) \
__asm __volatile ("1: cas%.b %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)) \
- : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ : "=d" (__result), "+m" (*(mem)) \
+ : "d" (newvalue), "0" (__result)); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("1: cas%.w %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)) \
- : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ : "=d" (__result), "+m" (*(mem)) \
+ : "d" (newvalue), "0" (__result)); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("1: cas%.l %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)) \
- : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ : "=d" (__result), "+m" (*(mem)) \
+ : "d" (newvalue), "0" (__result)); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -113,25 +113,25 @@ typedef uintmax_t uatomic_max_t;
" add%.b %3,%2;" \
" cas%.b %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)), \
+ : "=d" (__result), "+m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "m" (*(mem)), "0" (__result)); \
+ : "d" (value), "0" (__result)); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("1: move%.w %0,%2;" \
" add%.w %3,%2;" \
" cas%.w %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)), \
+ : "=d" (__result), "+m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "m" (*(mem)), "0" (__result)); \
+ : "d" (value), "0" (__result)); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("1: move%.l %0,%2;" \
" add%.l %3,%2;" \
" cas%.l %0,%2,%1;" \
" jbne 1b" \
- : "=d" (__result), "=m" (*(mem)), \
+ : "=d" (__result), "+m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "m" (*(mem)), "0" (__result)); \
+ : "d" (value), "0" (__result)); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -151,16 +151,16 @@ typedef uintmax_t uatomic_max_t;
#define atomic_add(mem, value) \
(void) ({ if (sizeof (*(mem)) == 1) \
__asm __volatile ("add%.b %1,%0" \
- : "=m" (*(mem)) \
- : "id" (value), "m" (*(mem))); \
+ : "+m" (*(mem)) \
+ : "id" (value)); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("add%.w %1,%0" \
- : "=m" (*(mem)) \
- : "id" (value), "m" (*(mem))); \
+ : "+m" (*(mem)) \
+ : "id" (value)); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("add%.l %1,%0" \
- : "=m" (*(mem)) \
- : "id" (value), "m" (*(mem))); \
+ : "+m" (*(mem)) \
+ : "id" (value)); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -183,16 +183,13 @@ typedef uintmax_t uatomic_max_t;
({ char __result; \
if (sizeof (*(mem)) == 1) \
__asm __volatile ("addq%.b %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("addq%.w %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("addq%.l %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -217,16 +214,13 @@ typedef uintmax_t uatomic_max_t;
({ char __result; \
if (sizeof (*(mem)) == 1) \
__asm __volatile ("subq%.b %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("subq%.w %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("subq%.l %#1,%1; seq %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem))); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -249,13 +243,12 @@ typedef uintmax_t uatomic_max_t;
#define atomic_bit_set(mem, bit) \
__asm __volatile ("bfset %0{%1,#1}" \
- : "=m" (*(mem)) \
- : "di" (sizeof (*(mem)) * 8 - (bit) - 1), "m" (*(mem)))
+ : "+m" (*(mem)) \
+ : "di" (sizeof (*(mem)) * 8 - (bit) - 1))
#define atomic_bit_test_set(mem, bit) \
({ char __result; \
__asm __volatile ("bfset %1{%2,#1}; sne %0" \
- : "=dm" (__result), "=m" (*(mem)) \
- : "di" (sizeof (*(mem)) * 8 - (bit) - 1), \
- "m" (*(mem))); \
+ : "=dm" (__result), "+m" (*(mem)) \
+ : "di" (sizeof (*(mem)) * 8 - (bit) - 1)); \
__result; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7255da777a96b81af3554ca32d1fae8740488b51
commit 7255da777a96b81af3554ca32d1fae8740488b51
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 20 22:07:15 2004 +0000
2004-05-15 Chris Demetriou <cgd@broadcom.com>
* sysdeps/mips/dl-machine.h (ELF_DL_FRAME_SIZE)
(ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS): For the N32
and 64 ABIs, save and restore regs $10 and $11 (a6 and a7).
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index aff843d..c8397b2 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -281,26 +281,30 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */
-#define ELF_DL_FRAME_SIZE 64
+#define ELF_DL_FRAME_SIZE 80
#define ELF_DL_SAVE_ARG_REGS "\
- sd $15, 56($29)\n \
+ sd $15, 72($29)\n \
sd $4, 8($29)\n \
sd $5, 16($29)\n \
sd $6, 24($29)\n \
sd $7, 32($29)\n \
sd $8, 40($29)\n \
sd $9, 48($29)\n \
+ sd $10, 56($29)\n \
+ sd $11, 64($29)\n \
"
#define ELF_DL_RESTORE_ARG_REGS "\
- ld $31, 56($29)\n \
+ ld $31, 72($29)\n \
ld $4, 8($29)\n \
ld $5, 16($29)\n \
ld $6, 24($29)\n \
ld $7, 32($29)\n \
ld $8, 40($29)\n \
ld $9, 48($29)\n \
+ ld $10, 56($29)\n \
+ ld $11, 64($29)\n \
"
#define IFABIO32(X)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5341b8057c23728e3f04c9481528e96617c47bb1
commit 5341b8057c23728e3f04c9481528e96617c47bb1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 18 20:16:32 2004 +0000
(pthread_cond_t): Add __broadcast_seq field.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 0fed5cc..1bb2968 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -81,6 +81,7 @@ typedef union
unsigned long long int __wakeup_seq;
unsigned long long int __woken_seq;
void *__mutex;
+ unsigned int __broadcast_seq;
} __data;
char __size[__SIZEOF_PTHREAD_COND_T];
long long int __align;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=524a69be2a62da8cba7c1d5b7c983bdf4b1e99c1
commit 524a69be2a62da8cba7c1d5b7c983bdf4b1e99c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 7 01:57:35 2004 +0000
Export __libc_alpha_cache_shape as a private symbol.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 89ec9db..ca79c7e 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -73,6 +73,14 @@ libc {
#errlist-compat 132
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_PRIVATE {
+ __libc_alpha_cache_shape;
+ }
+}
+ld {
+ GLIBC_PRIVATE {
+ __libc_alpha_cache_shape;
+ }
}
librt {
GLIBC_2.3 {
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8dbe95aa6adffe90b37091550f57ceafa84a6305
commit 8dbe95aa6adffe90b37091550f57ceafa84a6305
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 7 01:57:19 2004 +0000
Linux/Alpha sysconf definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysconf.c b/sysdeps/unix/sysv/linux/alpha/sysconf.c
new file mode 100644
index 0000000..2bbaf1f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sysconf.c
@@ -0,0 +1,152 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+static long int linux_sysconf (int name);
+
+#define CSHAPE(totalsize, linesize, assoc) \
+ ((totalsize & ~0xff) | (linesize << 4) | assoc)
+
+long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+
+static inline unsigned long
+implver (void)
+{
+ unsigned long i;
+#if __GNUC_PREREQ(3,3)
+ i = __builtin_alpha_implver ();
+#else
+ asm ("implver %0" : "=r" (i));
+#endif
+ return i;
+}
+
+static inline unsigned long
+amask (unsigned long x)
+{
+ unsigned long r;
+#if __GNUC_PREREQ(3,3)
+ r = __builtin_alpha_amask (x);
+#else
+ asm ("amask %1,%0" : "=r"(r) : "Ir"(x));
+#endif
+ return r;
+}
+
+/* Get the value of the system variable NAME. */
+long int
+__sysconf (int name)
+{
+ long shape, index;
+
+ /* We only handle the cache information here (for now). */
+ if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE)
+ return linux_sysconf (name);
+
+ /* No Alpha has L4 caches. */
+ if (name >= _SC_LEVEL4_CACHE_SIZE)
+ return -1;
+
+ index = (name - _SC_LEVEL1_ICACHE_SIZE) / 3;
+ shape = __libc_alpha_cache_shape[index];
+ if (shape == -2)
+ {
+ long shape_l1i, shape_l1d, shape_l2, shape_l3 = -1;
+
+ /* ??? In the cases below for which we do not know L1 cache sizes,
+ we could do timings to measure sizes. But for the Bcache, it's
+ generally big enough that (without additional help) TLB effects
+ get in the way. We'd either need to be able to allocate large
+ pages or have the kernel do the timings from KSEG. Fortunately,
+ kernels beginning with 2.6.5 will pass us this info in auxvec. */
+
+ switch (implver())
+ {
+ case 0: /* EV4 */
+ /* EV4/LCA45 had 8k L1 caches; EV45 had 16k L1 caches. */
+ /* EV4/EV45 had 128k to 16M 32-byte direct Bcache. LCA45
+ had 64k to 8M 8-byte direct Bcache. Can't tell. */
+ shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 5, 1);
+ break;
+
+ case 1: /* EV5 */
+ if (amask (1 << 8))
+ {
+ /* MAX insns not present; either EV5 or EV56. */
+ shape_l1i = shape_l1d = CSHAPE(8*1024, 5, 1);
+ /* ??? L2 and L3 *can* be configured as 32-byte line. */
+ shape_l2 = CSHAPE (96*1024, 6, 3);
+ /* EV5/EV56 has 1M to 16M Bcache. */
+ shape_l3 = CSHAPE (0, 6, 1);
+ }
+ else
+ {
+ /* MAX insns present; either PCA56 or PCA57. */
+ /* PCA56 had 16k 64-byte cache; PCA57 had 32k Icache. */
+ /* PCA56 had 8k 64-byte cache; PCA57 had 16k Dcache. */
+ /* PCA5[67] had 512k to 4M Bcache. */
+ shape_l1i = shape_l1d = shape_l2 = CSHAPE (0, 6, 1);
+ }
+ break;
+
+ case 2: /* EV6 */
+ shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2);
+ /* EV6/EV67/EV68* had 1M to 16M Bcache. */
+ shape_l2 = CSHAPE (0, 6, 1);
+ break;
+
+ case 3: /* EV7 */
+ shape_l1i = shape_l1d = CSHAPE(64*1024, 6, 2);
+ shape_l2 = CSHAPE(7*1024*1024/4, 6, 7);
+ break;
+
+ default:
+ shape_l1i = shape_l1d = shape_l2 = 0;
+ break;
+ }
+
+ __libc_alpha_cache_shape[0] = shape_l1i;
+ __libc_alpha_cache_shape[1] = shape_l1d;
+ __libc_alpha_cache_shape[2] = shape_l2;
+ __libc_alpha_cache_shape[3] = shape_l3;
+ shape = __libc_alpha_cache_shape[index];
+ }
+
+ if (shape <= 0)
+ return shape;
+
+ switch (name % 3)
+ {
+ case 0: /* total size */
+ return shape & -0x100;
+ case 1: /* associativity */
+ return shape & 0xf;
+ default: /* line size */
+ return 1L << ((shape >> 4) & 0xf);
+ }
+}
+
+/* Now the generic Linux version. */
+#undef __sysconf
+#define __sysconf static linux_sysconf
+#include "../sysconf.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58ed091a43db9bd1ce77c7be211ea116cce6940d
commit 58ed091a43db9bd1ce77c7be211ea116cce6940d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 7 01:57:04 2004 +0000
Linux/Alpha startup code in ld.so.
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
new file mode 100644
index 0000000..a0214b0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
@@ -0,0 +1,60 @@
+/* Operating system support for run-time dynamic linker. Linux/PPC version.
+ Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include "config.h"
+#include "kernel-features.h"
+#include <ldsodefs.h>
+
+extern long __libc_alpha_cache_shape[4];
+weak_extern (__libc_alpha_cache_shape);
+
+
+/* Scan the Aux Vector for the cache shape entries. */
+#define DL_PLATFORM_AUXV \
+ case AT_L1I_CACHESHAPE: \
+ { \
+ long *cls = __libc_alpha_cache_shape; \
+ if (cls != NULL) \
+ cls[0] = av->a_un.a_val; \
+ break; \
+ } \
+ case AT_L1D_CACHESHAPE: \
+ { \
+ long *cls = __libc_alpha_cache_shape; \
+ if (cls != NULL) \
+ cls[1] = av->a_un.a_val; \
+ break; \
+ } \
+ case AT_L2_CACHESHAPE: \
+ { \
+ long *cls = __libc_alpha_cache_shape; \
+ if (cls != NULL) \
+ cls[2] = av->a_un.a_val; \
+ break; \
+ } \
+ case AT_L3_CACHESHAPE: \
+ { \
+ long *cls = __libc_alpha_cache_shape; \
+ if (cls != NULL) \
+ cls[3] = av->a_un.a_val; \
+ break; \
+ }
+
+#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de47cb70128b878276e258864aa353504f21c0d6
commit de47cb70128b878276e258864aa353504f21c0d6
Author: Richard Henderson <rth@redhat.com>
Date: Thu May 6 22:01:01 2004 +0000
* sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New.
* sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S,
sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S:
Use them.
diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h
index 9856643..27209bd 100644
--- a/sysdeps/alpha/div_libc.h
+++ b/sysdeps/alpha/div_libc.h
@@ -111,3 +111,48 @@ DIVBYZERO:
cfi_endproc
.size DIVBYZERO, .-DIVBYZERO
.endm
+
+/* Like the ev6 instructions, but fall back to stack use on prior machines. */
+
+ .arch ev6
+
+.macro _ITOFS gr, fr, slot
+#ifdef __alpha_fix__
+ itofs \gr, \fr
+#else
+ stl \gr, \slot($sp)
+ lds \fr, \slot($sp)
+#endif
+.endm
+
+.macro _ITOFT gr, fr, slot
+#ifdef __alpha_fix__
+ itoft \gr, \fr
+#else
+ stq \gr, \slot($sp)
+ ldt \fr, \slot($sp)
+#endif
+.endm
+
+.macro _FTOIT fr, gr, slot
+#ifdef __alpha_fix__
+ ftoit \fr, \gr
+#else
+ stt \fr, \slot($sp)
+ ldq \gr, \slot($sp)
+#endif
+.endm
+
+/* Similarly, but move two registers. Schedules better for pre-ev6. */
+
+.macro _ITOFT2 gr1, fr1, slot1, gr2, fr2, slot2
+#ifdef __alpha_fix__
+ itoft \gr1, \fr1
+ itoft \gr2, \fr2
+#else
+ stq \gr1, \slot1($sp)
+ stq \gr2, \slot2($sp)
+ ldt \fr1, \slot1($sp)
+ ldt \fr2, \slot2($sp)
+#endif
+.endm
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 33fa118..90cd686 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -48,25 +48,20 @@ __divl:
EXTEND (X, RV)
EXTEND (Y, AT)
- stq RV, 16(sp)
- stq AT, 24(sp)
-
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 RV, $f0, 16, AT, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
-
divt/c $f0, $f1, $f0
cvttq/c $f0, $f0
- stt $f0, 16(sp)
- ldt $f0, 0(sp)
+ _FTOIT $f0, RV, 16
+ ldt $f0, 0(sp)
ldt $f1, 8(sp)
- ldl RV, 16(sp)
lda sp, FRAME(sp)
cfi_restore ($f0)
cfi_restore ($f1)
cfi_def_cfa_offset (0)
+ sextl RV, RV
ret $31, (RA), 1
cfi_endproc
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 464536d..4df7982 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -52,17 +52,13 @@ __divq:
that's done, we have at least 22 cycles until its results are
ready -- all the time in the world to figure out how we're
going to use the results. */
- stq X, 16(sp)
- stq Y, 24(sp)
- beq Y, DIVBYZERO
-
stt $f0, 0(sp)
stt $f1, 8(sp)
+ beq Y, DIVBYZERO
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
divt/c $f0, $f1, $f0
@@ -77,9 +73,8 @@ __divq:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert and clean up. */
cvttq/c $f0, $f0
- stt $f0, 16(sp)
+ _FTOIT $f0, RV, 16
- ldq RV, 16(sp)
ldt $f0, 0(sp)
cfi_restore ($f1)
cfi_remember_state
@@ -117,8 +112,8 @@ $x_big:
$fix_sign_in_ret1:
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
+ _FTOIT $f0, Q, 8
+ .align 3
$fix_sign_in_ret2:
mulq Q, Y, QY
stq t4, 8(sp)
@@ -234,10 +229,8 @@ $fix_sign_in:
blbc t5, $fix_sign_in_ret1
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
- unop
-
+ _FTOIT $f0, Q, 8
+ .align 3
negq Q, Q
br $fix_sign_in_ret2
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index 6ff6c03..63b575f 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -52,23 +52,20 @@ __divqu:
that's done, we have at least 22 cycles until its results are
ready -- all the time in the world to figure out how we're
going to use the results. */
- stq X, 16(sp)
- stq Y, 24(sp)
- beq Y, DIVBYZERO
-
stt $f0, 0(sp)
stt $f1, 8(sp)
+ beq Y, DIVBYZERO
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
blt X, $x_is_neg
divt/c $f0, $f1, $f0
/* Check to see if Y was mis-converted as signed value. */
+ .align 4
ldt $f1, 8(sp)
unop
nop
@@ -81,9 +78,7 @@ __divqu:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert and clean up. */
cvttq/c $f0, $f0
- stt $f0, 16(sp)
-
- ldq RV, 16(sp)
+ _FTOIT $f0, RV, 16
ldt $f0, 0(sp)
cfi_remember_state
cfi_restore ($f0)
@@ -101,9 +96,9 @@ $x_is_neg:
ldah AT, 0x5f80 /* 2**64 as float. */
stt $f2, 24(sp)
cfi_rel_offset ($f2, 24)
- stl AT, 16(sp)
- lds $f2, 16(sp)
+ _ITOFS AT, $f2, 16
+ .align 4
addt $f0, $f2, $f0
unop
divt/c $f0, $f1, $f0
@@ -140,10 +135,10 @@ $x_big:
#define QY t3 /* Q*Y */
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
+ _FTOIT $f0, Q, 8
mulq Q, Y, QY
+ .align 4
stq t4, 8(sp)
unop
ldt $f0, 0(sp)
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index c4eb426..1bbb978 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -50,18 +50,12 @@ __reml:
EXTEND (X, RV)
EXTEND (Y, AT)
- stq RV, 16(sp)
- stq AT, 24(sp)
-
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 RV, $f0, 16, AT, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
-
divt/c $f0, $f1, $f0
cvttq/c $f0, $f0
- stt $f0, 16(sp)
- ldq RV, 16(sp)
+ _FTOIT $f0, RV, 16
ldt $f0, 0(sp)
mull RV, Y, RV
@@ -70,7 +64,6 @@ __reml:
cfi_restore ($f0)
cfi_restore ($f1)
cfi_def_cfa_offset (0)
-
subl X, RV, RV
ret $31, (RA), 1
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index ce527d1..a8795c8 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -52,17 +52,13 @@ __remq:
that's done, we have at least 22 cycles until its results are
ready -- all the time in the world to figure out how we're
going to use the results. */
- stq X, 16(sp)
- stq Y, 24(sp)
- beq Y, DIVBYZERO
-
stt $f0, 0(sp)
stt $f1, 8(sp)
+ beq Y, DIVBYZERO
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
divt/c $f0, $f1, $f0
@@ -77,9 +73,7 @@ __remq:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert, compute remainder, clean up. */
cvttq/c $f0, $f0
- stt $f0, 16(sp)
-
- ldq AT, 16(sp)
+ _FTOIT $f0, AT, 16
mulq AT, Y, AT
ldt $f0, 0(sp)
cfi_restore ($f1)
@@ -87,7 +81,6 @@ __remq:
cfi_restore ($f0)
cfi_def_cfa_offset (0)
lda sp, FRAME(sp)
-
subq X, AT, RV
ret $31, (RA), 1
@@ -120,8 +113,8 @@ $x_big:
$fix_sign_in_ret1:
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
+ _FTOIT $f0, Q, 8
+ .align 3
$fix_sign_in_ret2:
mulq Q, Y, QY
stq t4, 8(sp)
@@ -233,9 +226,8 @@ $fix_sign_in:
bge t1, $fix_sign_in_ret1
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
-
+ _FTOIT $f0, Q, 8
+ .align 3
negq Q, Q
br $fix_sign_in_ret2
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index fa2eb62..f8deebb 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -52,19 +52,16 @@ __remqu:
that's done, we have at least 22 cycles until its results are
ready -- all the time in the world to figure out how we're
going to use the results. */
- stq X, 16(sp)
- stq Y, 24(sp)
subq Y, 1, AT
-
stt $f0, 0(sp)
and Y, AT, AT
+
stt $f1, 8(sp)
beq AT, $powerof2
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
- ldt $f0, 16(sp)
- ldt $f1, 24(sp)
+ _ITOFT2 X, $f0, 16, Y, $f1, 24
cvtqt $f0, $f0
cvtqt $f1, $f1
@@ -82,9 +79,8 @@ __remqu:
/* If we get here, we're expecting exact results from the division.
Do nothing else besides convert, compute remainder, clean up. */
cvttq/c $f0, $f0
- stt $f0, 16(sp)
+ _FTOIT $f0, AT, 16
- ldq AT, 16(sp)
mulq AT, Y, AT
ldt $f0, 0(sp)
lda sp, FRAME(sp)
@@ -93,6 +89,7 @@ __remqu:
cfi_restore ($f1)
cfi_def_cfa_offset (0)
+ .align 4
subq X, AT, RV
ret $31, (RA), 1
@@ -105,15 +102,13 @@ $x_is_neg:
ldah AT, 0x5f80 /* 2**64 as float. */
stt $f2, 24(sp)
cfi_rel_offset ($f2, 24)
- stl AT, 16(sp)
- lds $f2, 16(sp)
+ _ITOFS AT, $f2, 16
addt $f0, $f2, $f0
- unop
divt/c $f0, $f1, $f0
- unop
/* Ok, we've now the divide issued. Continue with other checks. */
+ .align 4
ldt $f1, 8(sp)
unop
ldt $f2, 24(sp)
@@ -144,10 +139,10 @@ $x_big:
#define QY t3 /* Q*Y */
cvttq/c $f0, $f0
- stt $f0, 8(sp)
- ldq Q, 8(sp)
+ _FTOIT $f0, Q, 8
mulq Q, Y, QY
+ .align 4
stq t4, 8(sp)
unop
ldt $f0, 0(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=272d8363ef5b72707b0aba603b8af4212d0ee63b
commit 272d8363ef5b72707b0aba603b8af4212d0ee63b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 5 18:42:44 2004 +0000
Not needed anymore.
diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h
deleted file mode 100644
index 9388f23..0000000
--- a/sysdeps/alpha/atomicity.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Low-level functions for atomic operations. Alpha version.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ATOMICITY_H
-#define _ATOMICITY_H 1
-
-#include <inttypes.h>
-
-
-static inline int
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, int val)
-{
- register int result, tmp;
-
- __asm__ __volatile__ (
- "/* Inline exchange & add */\n"
- "1:\t"
- "ldl_l %0,%3\n\t"
- "addl %0,%4,%1\n\t"
- "stl_c %1,%2\n\t"
- "beq %1,2f\n"
- ".subsection 1\n"
- "2:\t"
- "br 1b\n"
- ".previous\n\t"
- "mb\n\t"
- "/* End exchange & add */"
- : "=&r"(result), "=&r"(tmp), "=m"(*mem)
- : "m" (*mem), "r"(val));
-
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- register int result;
-
- __asm__ __volatile__ (
- "/* Inline exchange & add */\n"
- "1:\t"
- "ldl_l %0,%2\n\t"
- "addl %0,%3,%0\n\t"
- "stl_c %0,%1\n\t"
- "beq %0,2f\n\t"
- ".subsection 1\n"
- "2:\t"
- "br 1b\n"
- ".previous\n\t"
- "mb\n\t"
- "/* End exchange & add */"
- : "=&r"(result), "=m"(*mem)
- : "m" (*mem), "r"(val));
-}
-
-static inline long
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- long int ret;
-
- __asm__ __volatile__ (
- "/* Inline compare & swap */\n"
- "1:\t"
- "ldq_l %0,%4\n\t"
- "cmpeq %0,%2,%0\n\t"
- "beq %0,3f\n\t"
- "mov %3,%0\n\t"
- "stq_c %0,%1\n\t"
- "beq %0,2f\n\t"
- ".subsection 1\n"
- "2:\t"
- "br 1b\n"
- ".previous\n\t"
- "3:\t"
- "mb\n\t"
- "/* End compare & swap */"
- : "=&r"(ret), "=m"(*p)
- : "r"(oldval), "r"(newval), "m"(*p));
-
- return ret;
-}
-
-#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1225f7208bfaf42c26ac9f1ce4fc21b134eba53
commit b1225f7208bfaf42c26ac9f1ce4fc21b134eba53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 3 21:39:39 2004 +0000
(F_SETOWN, F_GETOWN): Define if __USE_BSD or __USE_UNIX98.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
index e09fa33..a30b352 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for SunOS 4.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,7 +86,7 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
index 9dbd7ba..6392bc3 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Ultrix 4.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,7 +87,7 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_UNIX98
#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
index 28a8fae..c65b8be 100644
--- a/sysdeps/unix/sysv/aix/bits/fcntl.h
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -74,7 +74,7 @@
# define F_SETLKW64 13 /* Set record locking info (blocking). */
#endif
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h
index dcba25f..5eb7c76 100644
--- a/sysdeps/unix/sysv/irix4/bits/fcntl.h
+++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for SGI Irix 4.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -67,6 +67,8 @@
#define F_RGETLK 20 /* Get info on a remote lock. */
#define F_RSETLK 21 /* Set or unlock a remote lock. */
#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */
+#endif
+#if defined __USE_BSD || defined __USE_UNIX98
#define F_GETOWN 10 /* Get owner; only works on sockets. */
#define F_SETOWN 11 /* Set owner; only works on sockets. */
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7d1197a..828cc75 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -75,7 +75,7 @@
#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */
#define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index ce17d68..d050f7f 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -79,7 +79,7 @@
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
#define F_SETLKW64 14 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 69ce6a5..6abdd1d 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,7 +79,7 @@
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
#define F_SETLKW64 14 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 6f13871..6cc96cf 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/HPPA.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2002
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -78,7 +78,7 @@
#define F_SETLK64 9 /* Set record locking info (non-blocking). */
#define F_SETLKW64 10 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
# define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index af7c0ea..2e85d1e 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,7 +78,7 @@
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
#define F_SETLKW64 14 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 97e1867..720e0a9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -81,7 +81,7 @@
#define F_SETLK64 34 /* Set record locking info (non-blocking). */
#define F_SETLKW64 35 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08b55be5f90ae5ad6f77071e714b5c86f593de17
commit 08b55be5f90ae5ad6f77071e714b5c86f593de17
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 29 20:06:49 2004 +0000
2004-04-29 Philip Blundell <pb@nexus.co.uk>
* sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT
entries.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index a131676..5dfe334 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -255,26 +255,27 @@ _dl_runtime_profile:\n\
.globl _start\n\
.globl _dl_start_user\n\
_start:\n\
+ @ we are PIC code, so get global offset table\n\
+ ldr sl, .L_GET_GOT\n\
+ @ See if we were run as a command with the executable file\n\
+ @ name as an extra leading argument.\n\
+ ldr r4, .L_SKIP_ARGS\n\
@ at start time, all the args are on the stack\n\
mov r0, sp\n\
bl _dl_start\n\
@ returns user entry point in r0\n\
_dl_start_user:\n\
- mov r6, r0\n\
- @ we are PIC code, so get global offset table\n\
- ldr sl, .L_GET_GOT\n\
add sl, pc, sl\n\
.L_GOT_GOT:\n\
- @ See if we were run as a command with the executable file\n\
- @ name as an extra leading argument.\n\
- ldr r4, .L_SKIP_ARGS\n\
ldr r4, [sl, r4]\n\
@ get the original arg count\n\
ldr r1, [sp]\n\
- @ subtract _dl_skip_args from it\n\
- sub r1, r1, r4\n\
- @ adjust the stack pointer to skip them\n\
+ @ save the entry point in another register\n\
+ mov r6, r0\n\
+ @ adjust the stack pointer to skip the extra args\n\
add sp, sp, r4, lsl #2\n\
+ @ subtract _dl_skip_args from original arg count\n\
+ sub r1, r1, r4\n\
@ get the argv address\n\
add r2, sp, #4\n\
@ store the new argc in the new stack location\n\
@@ -286,29 +287,21 @@ _dl_start_user:\n\
@ now we call _dl_init\n\
ldr r0, .L_LOADED\n\
ldr r0, [sl, r0]\n\
- ldr r0, [r0]\n\
@ call _dl_init\n\
bl _dl_init_internal(PLT)\n\
- @ clear the startup flag\n\
- ldr r2, .L_STARTUP_FLAG\n\
- ldr r1, [sl, r2]\n\
- mov r0, #0\n\
- str r0, [r1]\n\
@ load the finalizer function\n\
ldr r0, .L_FINI_PROC\n\
- ldr r0, [sl, r0]\n\
+ add r0, sl, r0\n\
@ jump to the user_s entry point\n\
mov pc, r6\n\
.L_GET_GOT:\n\
.word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
.L_SKIP_ARGS:\n\
.word _dl_skip_args(GOTOFF)\n\
-.L_STARTUP_FLAG:\n\
- .word _dl_starting_up(GOT)\n\
.L_FINI_PROC:\n\
- .word _dl_fini(GOT)\n\
+ .word _dl_fini(GOTOFF)\n\
.L_LOADED:\n\
- .word _rtld_local(GOT)\n\
+ .word _rtld_local(GOTOFF)\n\
.previous\n\
");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e52ded18095ec2f2ad513828c3cd7b815158d21a
commit e52ded18095ec2f2ad513828c3cd7b815158d21a
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Apr 23 20:41:42 2004 +0000
Use __attribute_used__.
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
index bece6d5..a7ac3ca 100644
--- a/sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -48,7 +48,7 @@
/* static */ void catch_segfault (int, int, struct sigcontext *);
/* Dummy function so that we can use asm with arguments. */
-static void __attribute__ ((unused))
+static void __attribute_used__
__dummy__ (void)
{
asm ("\n\
@@ -64,7 +64,7 @@ catch_segfault:\n\
: : "n" (offsetof (struct sigcontext, sc_fpstate)));
}
#define catch_segfault(a,b) \
- __attribute__ ((unused)) real_catch_segfault(a,b)
+ __attribute_used__ real_catch_segfault(a,b)
static void
hexvalue (unsigned long int value, char *buf, size_t len)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88aa65dae8eec5f3570763941548d8a87cffddd2
commit 88aa65dae8eec5f3570763941548d8a87cffddd2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 22 07:31:08 2004 +0000
(elf_machine_rela): Don't use INTUSE when calling _dl_signal_error.
(elf_machine_rel): Likewise.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 25a8515..a131676 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -507,9 +507,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
- INTUSE (_dl_signal_error)
- (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
+ _dl_signal_error (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
}
}
newvalue >>= 2;
@@ -588,9 +587,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
- INTUSE (_dl_signal_error)
- (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
+ _dl_signal_error (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
}
}
newvalue >>= 2;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fdde6b9d4ed5a51dc5e563873bf5e4df10de3a4
commit 6fdde6b9d4ed5a51dc5e563873bf5e4df10de3a4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 19 06:49:28 2004 +0000
Don't use x86 version.
diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h
index 8a6a0bc..b108be8 100644
--- a/sysdeps/unix/sysv/linux/hppa/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/hppa/profil-counter.h
@@ -1,2 +1,25 @@
-/* We can use the ix86 version. */
-#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
+/* Machine-dependent SIGPROF signal handler. PA-RISC version
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+static void
+profil_counter (int signr, siginfo_t *si, struct ucontext *uctx)
+{
+ unsigned long ip = uctx->uc_mcontext.sc_iaoq[0] & ~0x3;
+ profil_count ((void *) ip);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50ce18cd245f66c3f4595f9df29b8dee64cf09d2
commit 50ce18cd245f66c3f4595f9df29b8dee64cf09d2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 19 06:49:15 2004 +0000
hppa specific part of profiling code.
diff --git a/sysdeps/hppa/machine-gmon.h b/sysdeps/hppa/machine-gmon.h
new file mode 100644
index 0000000..3eeef67
--- /dev/null
+++ b/sysdeps/hppa/machine-gmon.h
@@ -0,0 +1,25 @@
+/* Machine-specific calling sequence for `mcount' profiling function. PA-RISC
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* We can call _mcount directly since gcc supplies the correct
+ * arguments */
+#define _MCOUNT_DECL(from, self) \
+ void _mcount (u_long from, u_long self)
+
+#define MCOUNT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5931923b659ce18e191e455551c899859df341c
commit e5931923b659ce18e191e455551c899859df341c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 19 06:48:59 2004 +0000
Entry point definition for hppa.
diff --git a/sysdeps/hppa/elf/entry.h b/sysdeps/hppa/elf/entry.h
new file mode 100644
index 0000000..b024db2
--- /dev/null
+++ b/sysdeps/hppa/elf/entry.h
@@ -0,0 +1,10 @@
+#ifndef __ASSEMBLY__
+extern void _start (void);
+#endif
+
+/* The function's entry point is stored in the first word of the
+ function descriptor (plabel) of _start(). */
+#define ENTRY_POINT __canonicalize_funcptr_for_compare(_start)
+
+/* We have to provide a special declaration. */
+#define ENTRY_POINT_DECL(class) class void _start (void);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c1ebdffa635c1e83bea0b51b1135c8535e40989
commit 7c1ebdffa635c1e83bea0b51b1135c8535e40989
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 17 23:06:39 2004 +0000
(SEM_VALUE_MAX): Jusr use a plain number.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
index 65298fa..6dadfda 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
@@ -27,7 +27,7 @@
#define SEM_FAILED ((sem_t *) 0)
/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
+#define SEM_VALUE_MAX (2147483647)
typedef union
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce0cf67279c7b60a019caeccb0c7b19886cf58fb
commit ce0cf67279c7b60a019caeccb0c7b19886cf58fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 17 22:55:20 2004 +0000
Add bits/link.h elf/entry.h.
diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist
index e26e411..5a0df47 100644
--- a/sysdeps/hppa/Dist
+++ b/sysdeps/hppa/Dist
@@ -1,3 +1,5 @@
libgcc-compat.c
dl-symaddr.c
dl-fptr.c
+bits/link.h
+elf/entry.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=660404d72bcc5ed7fc963f7e33fc55a0e52c782f
commit 660404d72bcc5ed7fc963f7e33fc55a0e52c782f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 17 22:54:23 2004 +0000
Dynamic linking definitions for HPPA.
diff --git a/sysdeps/hppa/bits/link.h b/sysdeps/hppa/bits/link.h
new file mode 100644
index 0000000..54842b2
--- /dev/null
+++ b/sysdeps/hppa/bits/link.h
@@ -0,0 +1,6 @@
+/* Used to store the function descriptor table */
+struct link_map_machine
+ {
+ size_t fptr_table_len;
+ ElfW(Addr) *fptr_table;
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32e5b41b173e025976f606b6209871a131cdfc6c
commit 32e5b41b173e025976f606b6209871a131cdfc6c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 17 22:53:29 2004 +0000
(__hppa_init_bootstrap_fdesc_table):
Initialze the fdesc table for the generic code.
(elf_machine_dynamic): Use asm version.
(elf_machine_load_addresss): Simplify asm by calling
elf_machine_dynamic.
(elf_machine_fixup_plt): Correct comment.
(elf_machine_profile_fixup_plt): New.
(elf_machine_runtime_setup): Check PLT exists, if lazy=1 process
normally, else relocate all the absolute entries.
(RTLD_START): Fix comments.
(TRAMPOLINE_TEMPLATE): Reformat assembly, add return pointer for
calls to profile_fixup.
(ELF_MACHINE_SIZEOF_JMP_SLOT, DL_STATIC_FUNCTION_ADDRESS,
DL_PLATFORM_INIT): Define.
(DL_FUNCTION_ADDRESS): Remove.
(dl_platform_init): New.
(elf_machine_rela): Use generic fdesc code, and process all COPY
relocations. Use __attribute__((always_inline)).
(elf_machine_rela_relative): Add sanity checks, remove IPLT
processing, print error message in default case. Use
__attribute__((always_inline)).
(elf_machine_lazy_rel): Use __attribute__((always_inline)).
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index cd180e7..bc9ed10 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995-1997,1999,2000,2001,2002, 2003
+ Copyright (C) 1995-1997,1999-2003
Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
@@ -25,40 +25,52 @@
#define ELF_MACHINE_NAME "hppa"
#include <sys/param.h>
+#include <assert.h>
#include <string.h>
#include <link.h>
-#include <assert.h>
-
-/* These must match the definition of the stub in bfd/elf32-hppa.c. */
-#define SIZEOF_PLT_STUB (4*4)
+#include <errno.h>
+#include <dl-fptr.h>
+#include <abort-instr.h>
+
+# define VALID_ELF_OSABI(osabi) ((osabi == ELFOSABI_SYSV) || (osabi == ELFOSABI_LINUX))
+# define VALID_ELF_ABIVERSION(ver) (ver == 0)
+# define VALID_ELF_HEADER(hdr,exp,size) \
+ memcmp (hdr,exp,size-2) == 0 \
+ && VALID_ELF_OSABI (hdr[EI_OSABI]) \
+ && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
+
+/* These two definitions must match the definition of the stub in
+ bfd/elf32-hppa.c (see plt_stub[]).
+
+ a. Define the size of the *entire* stub we place at the end of the PLT
+ table (right up against the GOT).
+
+ b. Define the number of bytes back from the GOT to the entry point of
+ the PLT stub. You see the PLT stub must be entered in the middle
+ so it can depwi to find it's own address (long jump stub)
+
+ c. Define the size of a single PLT entry so we can jump over the
+ last entry to get the stub address */
+
+#define SIZEOF_PLT_STUB (7*4)
#define GOT_FROM_PLT_STUB (4*4)
+#define PLT_ENTRY_SIZE (2*4)
-/* A PLABEL is a function descriptor. Properly they consist of just
- FUNC and GP. But we want to traverse a binary tree too. See
- dl-fptr.c for the code (it may be made common between HPPA and
- IA-64 in the future).
-
- We call these 'fptr' to make it easier to steal code from IA-64. */
-
-/* ld.so currently has 12 PLABEL32 relocs. We'll keep this constant
- large for now in case we require more, as the rest of these will be
- used by the dynamic program itself (libc.so has quite a few
- PLABEL32 relocs in it). */
-#define HPPA_BOOT_FPTR_SIZE 256
-
-struct hppa_fptr
+/* Initialize the function descriptor table before relocations */
+static inline void
+__hppa_init_bootstrap_fdesc_table (struct link_map *map)
{
- Elf32_Addr func;
- Elf32_Addr gp;
- struct hppa_fptr *next;
-};
+ ElfW(Addr) *boot_table;
+
+ /* Careful: this will be called before got has been relocated... */
+ ELF_MACHINE_LOAD_ADDRESS(boot_table,_dl_boot_fptr_table);
-extern struct hppa_fptr __boot_ldso_fptr[];
-extern struct hppa_fptr *__fptr_root;
-extern int __fptr_count;
+ map->l_mach.fptr_table_len = ELF_MACHINE_BOOT_FPTR_TABLE_LEN;
+ map->l_mach.fptr_table = boot_table;
+}
-extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr,
- struct hppa_fptr **, struct hppa_fptr *);
+#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
+ __hppa_init_bootstrap_fdesc_table (&bootstrap_map);
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
@@ -67,55 +79,52 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
return ehdr->e_machine == EM_PARISC;
}
-
/* Return the link-time address of _DYNAMIC. */
static inline Elf32_Addr
+elf_machine_dynamic (void) __attribute__ ((const));
+
+static inline Elf32_Addr
elf_machine_dynamic (void)
{
Elf32_Addr dynamic;
-#if 0
- /* Use this method if GOT address not yet set up. */
- asm (
-" b,l 1f,%0\n"
+ asm ("b,l 1f,%0\n"
" depi 0,31,2,%0\n"
"1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0\n"
" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0\n"
- : "=r" (dynamic) : : "r1");
-#else
- /* This works because we already have our GOT address available. */
- dynamic = (Elf32_Addr) &_DYNAMIC;
-#endif
+ : "=r" (dynamic) : : "r1");
return dynamic;
}
/* Return the run-time load address of the shared object. */
static inline Elf32_Addr
+elf_machine_load_address (void) __attribute__ ((const));
+
+static inline Elf32_Addr
elf_machine_load_address (void)
{
- Elf32_Addr dynamic, dynamic_linkaddress;
+ Elf32_Addr dynamic;
asm (
" b,l 1f,%0\n"
" depi 0,31,2,%0\n"
"1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0\n"
-" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1\n"
-" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0\n"
-" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0\n"
- : "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1");
+" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%0\n"
+ : "=r" (dynamic) : : "r1");
- return dynamic - dynamic_linkaddress;
+ return dynamic - elf_machine_dynamic ();
}
-/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+/* Fixup a PLT entry to bounce directly to the function at VALUE.
+ Optimized non-profile version. */
static inline Elf32_Addr
elf_machine_fixup_plt (struct link_map *map, lookup_t t,
const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
- /* l is the link_map for the caller, t is the link_map for the object
- * being called */
+ /* map is the link_map for the caller, t is the link_map for the object
+ being called */
reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]);
reloc_addr[0] = value;
/* Return the PLT slot rather than the function value so that the
@@ -123,6 +132,20 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t,
return (Elf32_Addr) reloc_addr;
}
+/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+#define ELF_MACHINE_PROFILE_FIXUP_PLT elf_machine_profile_fixup_plt
+static inline Elf32_Addr
+elf_machine_profile_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ if(__builtin_expect (t == NULL, 1))
+ return (Elf32_Addr) reloc_addr;
+ /* Return the PLT slot rather than the function value so that the
+ trampoline can load the new LTP. */
+ return (Elf32_Addr) elf_machine_fixup_plt(map, t, reloc, reloc_addr, value);
+}
+
/* Return the final value of a plt relocation. */
static inline Elf32_Addr
elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
@@ -138,110 +161,158 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
+ Elf32_Addr *got = NULL;
+ Elf32_Addr l_addr, iplt, jmprel, end_jmprel, r_type, r_sym;
+ const Elf32_Rela *reloc;
+ struct fdesc *fptr;
+ static union {
+ unsigned char c[8];
+ Elf32_Addr i[2];
+ } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}};
+
+ /* If we don't have a PLT we can just skip all this... */
+ if (__builtin_expect (l->l_info[DT_JMPREL] == NULL,0))
+ return lazy;
+
+ /* All paths use these values */
+ l_addr = l->l_addr;
+ jmprel = D_PTR(l, l_info[DT_JMPREL]);
+ end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val;
+
extern void _dl_runtime_resolve (void);
extern void _dl_runtime_profile (void);
- Elf32_Addr jmprel = D_PTR(l, l_info[DT_JMPREL]);
-
- if (lazy && jmprel)
+
+ /* Linking lazily */
+ if (lazy)
{
- Elf32_Addr *got = NULL;
- Elf32_Addr l_addr;
- Elf32_Addr end_jmprel;
- Elf32_Addr iplt;
-
- /* Relocate all the PLT slots. */
- l_addr = l->l_addr;
- end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val;
+ /* FIXME: Search for the got, but backwards through the relocs, technically we should
+ find it on the first try. However, assuming the relocs got out of order the
+ routine is made a bit more robust by searching them all in case of failure. */
+ for (iplt = (end_jmprel - sizeof(Elf32_Rela)); iplt >= jmprel; iplt -= sizeof (Elf32_Rela))
+ {
+
+ reloc = (const Elf32_Rela *) iplt;
+ r_type = ELF32_R_TYPE (reloc->r_info);
+ r_sym = ELF32_R_SYM (reloc->r_info);
+
+ got = (Elf32_Addr *) (reloc->r_offset + l_addr + PLT_ENTRY_SIZE + SIZEOF_PLT_STUB);
+
+ /* If we aren't an IPLT, and we aren't NONE then it's a bad reloc */
+ if (__builtin_expect (r_type != R_PARISC_IPLT, 0))
+ {
+ if (__builtin_expect (r_type != R_PARISC_NONE, 0))
+ _dl_reloc_bad_type (l, r_type, 1);
+ continue;
+ }
+
+ /* Check for the plt_stub that binutils placed here for us
+ to use with _dl_runtime_resolve */
+ if (got[-2] != sig.i[0] || got[-1] != sig.i[1])
+ {
+ got = NULL; /* Not the stub... keep looking */
+ }
+ else
+ {
+ /* Found the GOT! */
+ register Elf32_Addr ltp __asm__ ("%r19");
+ /* Identify this shared object. */
+ got[1] = (Elf32_Addr) l;
+
+ /* This function will be called to perform the relocation. */
+ if (__builtin_expect (!profile, 1))
+ {
+ /* If a static application called us, then _dl_runtime_resolve is not
+ a function descriptor, but the *real* address of the function... */
+ if((unsigned long) &_dl_runtime_resolve & 3)
+ {
+ got[-2] = (Elf32_Addr) ((struct fdesc *)
+ ((unsigned long) &_dl_runtime_resolve & ~3))->ip;
+ }
+ else
+ {
+ /* Static executable! */
+ got[-2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+ }
+ else
+ {
+ if (_dl_name_match_p (GLRO(dl_profile), l))
+ {
+ /* This is the object we are looking for. Say that
+ we really want profiling and the timers are
+ started. */
+ GL(dl_profile_map) = l;
+ }
+
+ if((unsigned long) &_dl_runtime_resolve & 3)
+ {
+ got[-2] = (Elf32_Addr) ((struct fdesc *)
+ ((unsigned long) &_dl_runtime_profile & ~3))->ip;
+ }
+ else
+ {
+ /* Static executable */
+ got[-2] = (Elf32_Addr) &_dl_runtime_profile;
+ }
+ }
+ /* Plunk in the gp of this function descriptor so we
+ can make the call to _dl_runtime_xxxxxx */
+ got[-1] = ltp;
+ break;
+ /* Done looking for the GOT, and stub is setup */
+ } /* else we found the GOT */
+ } /* for, walk the relocs backwards */
+
+ if(!got)
+ return 0; /* No lazy linking for you! */
+
+ /* Process all the relocs, now that we know the GOT... */
for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela))
{
- const Elf32_Rela *reloc;
- Elf32_Word r_type;
- Elf32_Word r_sym;
- struct hppa_fptr *fptr;
-
reloc = (const Elf32_Rela *) iplt;
r_type = ELF32_R_TYPE (reloc->r_info);
r_sym = ELF32_R_SYM (reloc->r_info);
if (__builtin_expect (r_type == R_PARISC_IPLT, 1))
{
- fptr = (struct hppa_fptr *) (reloc->r_offset + l_addr);
+ fptr = (struct fdesc *) (reloc->r_offset + l_addr);
if (r_sym != 0)
{
/* Relocate the pointer to the stub. */
- fptr->func += l_addr;
+ fptr->ip = (Elf32_Addr) got - GOT_FROM_PLT_STUB;
+
/* Instead of the LTP value, we put the reloc offset
here. The trampoline code will load the proper
LTP and pass the reloc offset to the fixup
function. */
fptr->gp = iplt - jmprel;
- if (!got)
- {
- static union {
- unsigned char c[8];
- Elf32_Addr i[2];
- } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}};
-
- /* Find our .got section. It's right after the
- stub. */
- got = (Elf32_Addr *) (fptr->func + GOT_FROM_PLT_STUB);
-
- /* Sanity check to see if the address we are
- going to check below is within a reasonable
- approximation of the bounds of the PLT (or,
- at least, is at an address that won't fault
- on read). Then check for the magic signature
- above. */
- if (fptr->func < (Elf32_Addr) fptr + sizeof(*fptr))
- return 0;
- if (fptr->func >
- ((Elf32_Addr) fptr
- + SIZEOF_PLT_STUB
- + ((l->l_info[DT_PLTRELSZ]->d_un.d_val / sizeof (Elf32_Rela))
- * 8)))
- return 0;
- if (got[-2] != sig.i[0] || got[-1] != sig.i[1])
- return 0; /* No lazy linking for you! */
- }
- }
+ } /* r_sym != 0 */
else
{
/* Relocate this *ABS* entry. */
- fptr->func = reloc->r_addend + l_addr;
+ fptr->ip = reloc->r_addend + l_addr;
fptr->gp = D_PTR (l, l_info[DT_PLTGOT]);
}
- }
- else if (__builtin_expect (r_type != R_PARISC_NONE, 0))
- _dl_reloc_bad_type (l, r_type, 1);
- }
-
- if (got)
- {
- register Elf32_Addr ltp __asm__ ("%r19");
- /* Identify this shared object. */
- got[1] = (Elf32_Addr) l;
-
- /* This function will be called to perform the relocation. */
- if (__builtin_expect (!profile, 1))
- got[-2] =
- (Elf32_Addr) ((struct hppa_fptr *)
- ((unsigned long) &_dl_runtime_resolve & ~3))->func;
- else
- {
- if (_dl_name_match_p (GL(dl_profile), l))
- {
- /* This is the object we are looking for. Say that
- we really want profiling and the timers are
- started. */
- GL(dl_profile_map) = l;
- }
- got[-2] =
- (Elf32_Addr) ((struct hppa_fptr *)
- ((unsigned long) &_dl_runtime_profile & ~3))->func;
- }
- got[-1] = ltp;
- }
- }
+ } /* r_type == R_PARISC_IPLT */
+ } /* for all the relocations */
+ } /* if lazy */
+ else
+ {
+ for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela))
+ {
+ reloc = (const Elf32_Rela *) iplt;
+ r_type = ELF32_R_TYPE (reloc->r_info);
+ r_sym = ELF32_R_SYM (reloc->r_info);
+
+ if (__builtin_expect ((r_type == R_PARISC_IPLT) && (r_sym == 0), 1))
+ {
+ fptr = (struct fdesc *) (reloc->r_offset + l_addr);
+ /* Relocate this *ABS* entry, set only the gp, the rest is set later
+ when elf_machine_rela_relative is called (WITHOUT the linkmap) */
+ fptr->gp = D_PTR (l, l_info[DT_PLTGOT]);
+ } /* r_type == R_PARISC_IPLT */
+ } /* for all the relocations */
+ }
return lazy;
}
@@ -251,7 +322,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define RTLD_START \
/* Set up dp for any non-PIC lib constructors that may be called. */ \
-static struct link_map * \
+static struct link_map * __attribute__((used)) \
set_dp (struct link_map *map) \
{ \
register Elf32_Addr dp asm ("%r27"); \
@@ -272,22 +343,24 @@ asm ( \
" stw %r25,-40(%sp)\n" /* argc */ \
" stw %r24,-44(%sp)\n" /* argv */ \
\
- /* We need the LTP, and we need it now. */ \
- /* $PIC_pcrel$0 points 8 bytes past the current instruction, \
- just like a branch reloc. This sequence gets us the runtime \
- address of _DYNAMIC. */ \
+ /* We need the LTP, and we need it now. \
+ $PIC_pcrel$0 points 8 bytes past the current instruction, \
+ just like a branch reloc. This sequence gets us the \
+ runtime address of _DYNAMIC. */ \
" bl 0f,%r19\n" \
" depi 0,31,2,%r19\n" /* clear priviledge bits */ \
"0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19\n" \
" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26\n" \
\
- /* Also get the link time address from the first entry of the GOT. */ \
+ /* The link time address is stored in the first entry of the \
+ GOT. */ \
" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19\n" \
" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20\n" \
\
" sub %r26,%r20,%r20\n" /* Calculate load offset */ \
\
- /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ \
+ /* Rummage through the dynamic entries, looking for \
+ DT_PLTGOT. */ \
" ldw,ma 8(%r26),%r19\n" \
"1: cmpib,=,n 3,%r19,2f\n" /* tag == DT_PLTGOT? */ \
" cmpib,<>,n 0,%r19,1b\n" \
@@ -307,8 +380,8 @@ asm ( \
| 32 bytes of magic | \
|---------------------------------| \
| 32 bytes argument/sp save area | \
- |---------------------------------| ((current->mm->env_end) + 63 & ~63) \
- | N bytes of slack | \
+ |---------------------------------| ((current->mm->env_end) \
+ | N bytes of slack | + 63 & ~63) \
|---------------------------------| \
| envvar and arg strings | \
|---------------------------------| \
@@ -354,7 +427,7 @@ asm ( \
" ldw 0(%r20),%r20\n" \
\
" ldw -40(%sp),%r25\n" /* argc */ \
-" comib,= 0,%r20,.Lnofix\n" /* FIXME: will be mispredicted */ \
+" comib,= 0,%r20,.Lnofix\n" /* FIXME: Mispredicted branch */\
" ldw -44(%sp),%r24\n" /* argv (delay slot) */ \
\
" sub %r25,%r20,%r25\n" \
@@ -376,7 +449,7 @@ asm ( \
" bl _dl_init_internal,%r2\n" \
" ldo 4(%r23),%r23\n" /* delay slot */ \
\
- /* Reload argc, argv to the registers start.S expects them in (feh) */ \
+ /* Reload argc, argv to the registers start.S expects. */ \
" ldw -40(%sp),%r25\n" \
" ldw -44(%sp),%r24\n" \
\
@@ -388,8 +461,8 @@ asm ( \
" .word 0xdeadbeef\n" \
" .previous\n" \
\
- /* %r3 contains a function pointer, we need to mask out the lower \
- * bits and load the gp and jump address. */ \
+ /* %r3 contains a function pointer, we need to mask out the \
+ lower bits and load the gp and jump address. */ \
" depi 0,31,2,%r3\n" \
" ldw 0(%r3),%r2\n" \
" addil LT'__dl_fini_plabel,%r19\n" \
@@ -404,46 +477,57 @@ asm ( \
/* This code gets called via the .plt stub, and is used in
dl-runtime.c to call the `fixup' function and then redirect to the
address it returns.
+
+ WARNING: This template is also used by gcc's __cffc, and expects
+ that the "bl" for fixup() exist at a particular offset.
+ Do not change this template without changing gcc, while the prefix
+ "bl" should fix everything so gcc finds the right spot, it will
+ slow down __cffc when it attempts to call fixup to resolve function
+ descriptor references. Please refer to gcc/gcc/config/pa/fptr.c
+
Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
- extern void tramp_name (void); \
- asm ( "\
- /* Trampoline for " #tramp_name " */ \n\
- .globl " #tramp_name " \n\
- .type " #tramp_name ",@function \n\
-" #tramp_name ": \n\
- /* Save return pointer */ \n\
- stw %r2,-20(%sp) \n\
- /* Save argument registers in the call stack frame. */ \n\
- stw %r26,-36(%sp) \n\
- stw %r25,-40(%sp) \n\
- stw %r24,-44(%sp) \n\
- stw %r23,-48(%sp) \n\
- /* Build a call frame. */ \n\
- stwm %sp,64(%sp) \n\
- \n\
- /* Set up args to fixup func. */ \n\
- ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ \n\
- copy %r19,%r25 /* reloc offset */ \n\
- \n\
- /* Call the real address resolver. */ \n\
- bl " #fixup_name ",%r2 \n\
- copy %r21,%r19 /* delay slot, set fixup func ltp */ \n\
- \n\
- ldwm -64(%sp),%sp \n\
- /* Arguments. */ \n\
- ldw -36(%sp),%r26 \n\
- ldw -40(%sp),%r25 \n\
- ldw -44(%sp),%r24 \n\
- ldw -48(%sp),%r23 \n\
- /* Return pointer. */ \n\
- ldw -20(%sp),%r2 \n\
- /* Call the real function. */ \n\
- ldw 0(%r28),%r22 \n\
- bv %r0(%r22) \n\
- ldw 4(%r28),%r19 \n\
-");
-
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
+ extern void tramp_name (void); \
+ asm ( \
+ " .text\n" \
+ /* FAKE bl to provide gcc's __cffc with fixup's address */ \
+ " bl " #fixup_name ",%r2\n" /* Runtime address of fixup */ \
+ " .globl " #tramp_name "\n" \
+ " .type " #tramp_name ",@function\n" \
+ #tramp_name ":\n" \
+ /* Save return pointer */ \
+ " stw %r2,-20(%sp)\n" \
+ /* Save argument registers in the call stack frame. */ \
+ " stw %r26,-36(%sp)\n" \
+ " stw %r25,-40(%sp)\n" \
+ " stw %r24,-44(%sp)\n" \
+ " stw %r23,-48(%sp)\n" \
+ /* Build a call frame, and save structure pointer. */ \
+ " stwm %r28,64(%sp)\n" \
+ \
+ /* Set up args to fixup func. */ \
+ " ldw 8+4(%r20),%r26\n" /* (1) got[1] == struct link_map */ \
+ " copy %r19,%r25\n" /* (2) reloc offset */ \
+ " copy %r2,%r24\n" /* (3) profile_fixup needs rp */ \
+ \
+ /* Call the real address resolver. */ \
+ " bl " #fixup_name ",%r2\n" \
+ " copy %r21,%r19\n" /* set fixup func ltp (DELAY SLOT)*/ \
+ \
+ " ldw 0(%r28),%r22\n" /* load up the returned func ptr */ \
+ " ldw 4(%r28),%r19\n" \
+ " ldwm -64(%sp),%r28\n" \
+ /* Arguments. */ \
+ " ldw -36(%sp),%r26\n" \
+ " ldw -40(%sp),%r25\n" \
+ " ldw -44(%sp),%r24\n" \
+ " ldw -48(%sp),%r23\n" \
+ /* Call the real function. */ \
+ " bv %r0(%r22)\n" \
+ /* Return pointer. */ \
+ " ldw -20(%sp),%r2\n" \
+ );
+
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
@@ -454,7 +538,6 @@ asm ( \
strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
#endif
-
/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value.
ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
@@ -464,22 +547,35 @@ asm ( \
* ELF_RTYPE_CLASS_PLT) \
| (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
-/* Used by ld.so for ... something ... */
+/* Used by the runtime in fixup to figure out if reloc is *really* PLT */
#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
+#define ELF_MACHINE_SIZEOF_JMP_SLOT PLT_ENTRY_SIZE
/* We only use RELA. */
#define ELF_MACHINE_NO_REL 1
/* Return the address of the entry point. */
#define ELF_MACHINE_START_ADDRESS(map, start) \
- DL_FUNCTION_ADDRESS (map, start)
+ DL_STATIC_FUNCTION_ADDRESS (map, start)
+
+/* We define an initialization functions. This is called very early in
+ * _dl_sysdep_start. */
+#define DL_PLATFORM_INIT dl_platform_init ()
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+ if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
+ /* Avoid an empty string which would disturb us. */
+ GLRO(dl_platform) = NULL;
+}
+
#endif /* !dl_machine_h */
/* These are only actually used where RESOLVE_MAP is defined, anyway. */
#ifdef RESOLVE_MAP
-static inline void
+auto void __attribute__((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
void *const reloc_addr_arg)
@@ -490,14 +586,14 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
struct link_map *sym_map;
Elf32_Addr value;
-#if !defined RTLD_BOOTSTRAP && !defined SHARED
+# if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
because rtld.c contains the common defn for _dl_rtld_map, which is
incompatible with a weak decl in the same file. */
weak_extern (GL(dl_rtld_map));
-#endif
+# endif
/* RESOLVE_MAP will return a null value for undefined syms, and
non-null for all other syms. In particular, relocs with no
@@ -505,13 +601,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
resolved to MAP. (The first entry in a symbol table is all
zeros, and an all zero Elf32_Sym has a binding of STB_LOCAL.)
See RESOLVE_MAP definition in elf/dl-reloc.c */
-#ifdef RTLD_BOOTSTRAP
+# ifdef RTLD_BOOTSTRAP
/* RESOLVE_MAP in rtld.c doesn't have the local sym test. */
sym_map = (ELF32_ST_BIND (sym->st_info) != STB_LOCAL
? RESOLVE_MAP (&sym, version, r_type) : map);
-#else
+# else
sym_map = RESOLVE_MAP (&sym, version, r_type);
-#endif
+# endif
if (sym_map)
{
value = sym ? sym_map->l_addr + sym->st_value : 0;
@@ -523,15 +619,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (r_type)
{
case R_PARISC_DIR32:
-#ifndef RTLD_BOOTSTRAP
- /* All hell breaks loose if we try to relocate these twice,
- because any initialized variables in ld.so that refer to
- other ones will have their values reset. In particular,
- __fptr_next will be reset, sometimes causing endless loops in
- __hppa_make_fptr(). So don't do that. */
- if (map == &GL(dl_rtld_map))
- return;
-#endif
/* .eh_frame can have unaligned relocs. */
if ((unsigned long) reloc_addr_arg & 3)
{
@@ -552,51 +639,26 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (sym == NULL
|| sym_map == NULL
|| ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
- break;
-
- /* Okay, we need to make ourselves a PLABEL then. See the IA64
- code for an explanation of how this works. */
-#ifndef RTLD_BOOTSTRAP
- value = __hppa_make_fptr (sym_map, value, &__fptr_root, NULL);
-#else
- {
- struct hppa_fptr *p_boot_ldso_fptr;
- struct hppa_fptr **p_fptr_root;
- int *p_fptr_count;
- unsigned long dot;
-
- /* Go from the top of __boot_ldso_fptr. As on IA64, we
- probably haven't relocated the necessary values by this
- point so we have to find them ourselves. */
-
- asm ("bl 0f,%0 \n\
- depi 0,31,2,%0 \n\
-0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 \n\
- ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 \n\
- addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 \n\
- ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 \n\
- addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 \n\
- ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3"
- :
- "=r" (dot),
- "=r" (p_boot_ldso_fptr),
- "=r" (p_fptr_root),
- "=r" (p_fptr_count));
-
- value = __hppa_make_fptr (sym_map, value, p_fptr_root,
- &p_boot_ldso_fptr[--*p_fptr_count]);
- }
-#endif
+ {
+ break;
+ }
+ /* Set bit 30 to indicate to $$dyncall that this is a PLABEL.
+ We have to do this outside of the generic function descriptor
+ code, since it doesn't know about our requirement for setting
+ protection bits */
+ value = (Elf32_Addr)((unsigned int)_dl_make_fptr (sym_map, sym, value) | 2);
break;
case R_PARISC_IPLT:
if (__builtin_expect (sym_map != NULL, 1))
- elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value);
- else
- {
+ {
+ elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value);
+ }
+ else
+ {
/* If we get here, it's a (weak) undefined sym. */
elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
- }
+ }
return;
case R_PARISC_COPY:
@@ -606,20 +668,20 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
if (__builtin_expect (sym->st_size > refsym->st_size, 0)
|| (__builtin_expect (sym->st_size < refsym->st_size, 0)
- && __builtin_expect (GL(dl_verbose), 0)))
+ && __builtin_expect (GLRO(dl_verbose), 0)))
{
const char *strtab;
strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
- _dl_error_printf ("\
-%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_error_printf ("%s: Symbol `%s' has different size in shared object, "
+ "consider re-linking\n",
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr_arg, (void *) value,
MIN (sym->st_size, refsym->st_size));
return;
-
+
case R_PARISC_NONE: /* Alright, Wilbur. */
return;
@@ -630,25 +692,27 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = value;
}
-#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
- elf_machine_rel_relative (map, l_addr, relative, \
- (void *) (l_addr + relative->r_offset))
-
/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with
ELF32_R_SYM (info) == 0 for a similar purpose. */
-static inline void
-elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
+auto void __attribute__((always_inline))
+elf_machine_rela_relative (Elf32_Addr l_addr,
const Elf32_Rela *reloc,
void *const reloc_addr_arg)
{
- Elf32_Addr *const reloc_addr = reloc_addr_arg;
unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
+ static char msgbuf[] = { "Unknown" };
+ struct link_map map;
Elf32_Addr value;
value = l_addr + reloc->r_addend;
- if (ELF32_R_SYM (reloc->r_info) != 0)
- asm volatile ("iitlbp %r0,(%r0)"); /* Crash. */
+ if (ELF32_R_SYM (reloc->r_info) != 0){
+ _dl_error_printf ("%s: In elf_machine_rela_relative "
+ "ELF32_R_SYM (reloc->r_info) != 0. Aborting.",
+ rtld_progname ?: "<program name unknown>");
+ ABORT_INSTRUCTION; /* Crash. */
+ }
switch (r_type)
{
@@ -668,21 +732,22 @@ elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
case R_PARISC_PLABEL32:
break;
- case R_PARISC_IPLT:
- elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
- return;
+ case R_PARISC_IPLT: /* elf_machine_runtime_setup already set gp */
+ break;
case R_PARISC_NONE:
return;
- default:
- _dl_reloc_bad_type (map, r_type, 0);
+ default: /* Bad reloc, map unknown (really it's the current map) */
+ map.l_name = msgbuf;
+ _dl_reloc_bad_type (&map, r_type, 0);
+ return;
}
*reloc_addr = value;
}
-static inline void
+auto void __attribute__((always_inline))
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87ffc6ec7972f7abe7174199addf2911c876d24a
commit 87ffc6ec7972f7abe7174199addf2911c876d24a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 17 22:51:43 2004 +0000
(feupdateenv): Use only sw[0] and call feraiseexcept.
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index 8980dfd..7d50282 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -27,11 +27,10 @@ feupdateenv (const fenv_t *envp)
/* Get the current exception status. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= FE_ALL_EXCEPT;
- envp->__status_word = envp->__status_word | sw[0];
-
/* Install new environment. */
fesetenv (envp);
+ /* Raise the saved exceptions */
+ feraiseexcept(sw[0] & FE_ALL_EXCEPT);
/* Success. */
return 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57f4291c9d3ed7892d0aaaf153540fc5b290ace8
commit 57f4291c9d3ed7892d0aaaf153540fc5b290ace8
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 15 14:08:16 2004 +0000
Fix last commit.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index b92a813..aff843d 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -512,7 +512,7 @@ _dl_start_user:\n\
" STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
- jr $25\n\
+ jr $25\n\t"\
_RTLD_EPILOGUE(ENTRY_POINT)\
".previous"\
);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af6aab77a667ece4bd7afb70970946e40f91cc55
commit af6aab77a667ece4bd7afb70970946e40f91cc55
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 15 04:50:11 2004 +0000
(RTLD_START): Do not use nested .end.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index a402b39..b92a813 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -474,7 +474,7 @@ _dl_runtime_resolve:\n \
" STRINGXP(PTR_LA) " $25, _dl_start_user\n\
.globl _dl_start_user\n\
.type _dl_start_user,@function\n\
- .ent _dl_start_user\n\
+ .aent _dl_start_user\n\
_dl_start_user:\n\
" STRINGXP(SETUP_GP) "\n\
" STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
@@ -513,7 +513,6 @@ _dl_start_user:\n\
# Jump to the user entry point.\n\
move $25, $17\n\
jr $25\n\
- .end _dl_start_user\n\t"\
_RTLD_EPILOGUE(ENTRY_POINT)\
".previous"\
);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13bf16320937efd533aebde1aaf944dba00e584b
commit 13bf16320937efd533aebde1aaf944dba00e584b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 13 02:00:09 2004 +0000
(MQ_PRIO_MAX): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
index bb3c4c0..e071878 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
@@ -84,3 +84,6 @@
/* Maximum host name length. */
#define HOST_NAME_MAX 64
+
+/* Maximum message queue priority level. */
+#define MQ_PRIO_MAX 32768
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=693687e64e918ac5dc1eeb0da3adf4c401a942e1
commit 693687e64e918ac5dc1eeb0da3adf4c401a942e1
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Apr 8 23:30:26 2004 +0000
(INTERNAL_SYSCALL): Add
LOAD_REGS_##nr.
(LOAD_ARGS_0, LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4)
(LOAD_ARGS_5, LOAD_ARGS_6): Load argument values into temporary
variables.
(LOAD_REGS_0, LOAD_REGS_1, LOAD_REGS_2, LOAD_REGS_3, LOAD_REGS_4)
(LOAD_REGS_5, LOAD_REGS_6): New macros to actually load the
syscall argument registers.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 3c6266b..234ce32 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
December 1995.
@@ -225,7 +225,11 @@ SYSCALL_ERROR_LABEL: \
#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ unsigned int _sys_result; \
{ \
+ /* Load argument values in temporary variables
+ to perform side effects like function calls
+ before the call used registers are set. */ \
LOAD_ARGS_##nr (args) \
+ LOAD_REGS_##nr \
register int _d0 asm ("%d0") = __NR_##name; \
asm volatile ("trap #0" \
: "=d" (_d0) \
@@ -243,30 +247,49 @@ SYSCALL_ERROR_LABEL: \
#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
#define LOAD_ARGS_0()
+#define LOAD_REGS_0
#define ASM_ARGS_0
#define LOAD_ARGS_1(a1) \
- register int _d1 asm ("d1") = (int) (a1); \
- LOAD_ARGS_0 ()
+ LOAD_ARGS_0 () \
+ int __arg1 = (int) (a1);
+#define LOAD_REGS_1 \
+ register int _d1 asm ("d1") = __arg1; \
+ LOAD_REGS_0
#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1)
#define LOAD_ARGS_2(a1, a2) \
- register int _d2 asm ("d2") = (int) (a2); \
- LOAD_ARGS_1 (a1)
+ LOAD_ARGS_1 (a1) \
+ int __arg2 = (int) (a2);
+#define LOAD_REGS_2 \
+ register int _d2 asm ("d2") = __arg2; \
+ LOAD_REGS_1
#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2)
#define LOAD_ARGS_3(a1, a2, a3) \
- register int _d3 asm ("d3") = (int) (a3); \
- LOAD_ARGS_2 (a1, a2)
+ LOAD_ARGS_2 (a1, a2) \
+ int __arg3 = (int) (a3);
+#define LOAD_REGS_3 \
+ register int _d3 asm ("d3") = __arg3; \
+ LOAD_REGS_2
#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3)
#define LOAD_ARGS_4(a1, a2, a3, a4) \
- register int _d4 asm ("d4") = (int) (a4); \
- LOAD_ARGS_3 (a1, a2, a3)
+ LOAD_ARGS_3 (a1, a2, a3) \
+ int __arg4 = (int) (a4);
+#define LOAD_REGS_4 \
+ register int _d4 asm ("d4") = __arg4; \
+ LOAD_REGS_3
#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4)
#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
- register int _d5 asm ("d5") = (int) (a5); \
- LOAD_ARGS_4 (a1, a2, a3, a4)
+ LOAD_ARGS_4 (a1, a2, a3, a4) \
+ int __arg5 = (int) (a5);
+#define LOAD_REGS_5 \
+ register int _d5 asm ("d5") = __arg5; \
+ LOAD_REGS_4
#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5)
#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
- register int _a0 asm ("a0") = (int) (a6); \
- LOAD_ARGS_5 (a1, a2, a3, a4, a5)
+ LOAD_ARGS_5 (a1, a2, a3, a4, a5) \
+ int __arg6 = (int) (a6);
+#define LOAD_REGS_6 \
+ register int _a0 asm ("a0") = __arg6; \
+ LOAD_REGS_5
#define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0)
#endif /* not __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=635d5fe3883bd4cfab7bab919ba2b18897fb97ba
commit 635d5fe3883bd4cfab7bab919ba2b18897fb97ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 31 08:53:29 2004 +0000
Add IUTF8.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 0abe34f..f26e84c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -77,6 +77,7 @@ struct termios
# define IXANY 0004000
# define IUCLC 0010000
# define IMAXBEL 0020000
+# define IUTF8 0040000
#endif
/* c_oflag bits */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 546faa0..4ff6e37 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -73,6 +73,7 @@ struct termios
#define IXANY 0004000 /* Any character will restart after stop. */
#define IXOFF 0010000 /* Enable start/stop input control. */
#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
+#define IUTF8 0040000 /* Input is UTF8. */
/* c_oflag bits */
#define OPOST 0000001 /* Perform output processing. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b89b1957dd0a036b99c34b3d8b0c1d57633ddc8
commit 2b89b1957dd0a036b99c34b3d8b0c1d57633ddc8
Author: Richard Henderson <rth@redhat.com>
Date: Wed Mar 31 02:34:13 2004 +0000
* sysdeps/alpha/remqu.S: Detect power-of-two special case.
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index 1a1dcad..fa2eb62 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -54,24 +54,25 @@ __remqu:
going to use the results. */
stq X, 16(sp)
stq Y, 24(sp)
- beq Y, DIVBYZERO
+ subq Y, 1, AT
stt $f0, 0(sp)
+ and Y, AT, AT
stt $f1, 8(sp)
+ beq AT, $powerof2
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+
ldt $f0, 16(sp)
ldt $f1, 24(sp)
-
cvtqt $f0, $f0
cvtqt $f1, $f1
+
blt X, $x_is_neg
divt/c $f0, $f1, $f0
/* Check to see if Y was mis-converted as signed value. */
ldt $f1, 8(sp)
- unop
- nop
blt Y, $y_is_neg
/* Check to see if X fit in the double as an exact value. */
@@ -245,6 +246,16 @@ $y_is_neg:
cfi_def_cfa_offset (0)
ret $31, (RA), 1
+ .align 4
+ cfi_def_cfa_offset (FRAME)
+$powerof2:
+ subq Y, 1, AT
+ beq Y, DIVBYZERO
+ and X, AT, RV
+ lda sp, FRAME(sp)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
cfi_endproc
.size __remqu, .-__remqu
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08e3c578caa2559652923e67d73ca7b43dc22d97
commit 08e3c578caa2559652923e67d73ca7b43dc22d97
Author: Richard Henderson <rth@redhat.com>
Date: Sat Mar 27 00:32:28 2004 +0000
* sysdeps/alpha/Makefile <gnulib> (sysdep_routines): Merge divrem
variable, add unsigned variants.
* sysdeps/alpha/divrem.h: Remove file.
* sysdeps/alpha/div_libc.h: New file.
* sysdeps/alpha/divl.S: Rewrite from scratch.
* sysdeps/alpha/reml.S: Likewise.
* sysdeps/alpha/divq.S: Likewise.
* sysdeps/alpha/remq.S: Likewise.
* sysdeps/alpha/divlu.S: New file.
* sysdeps/alpha/remlu.S: New file.
* sysdeps/alpha/divqu.S: New file.
* sysdeps/alpha/remqu.S: New file.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index ce8f9b3..1e74d82 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -26,7 +26,7 @@ sysdep_routines += _mcount
endif
ifeq ($(subdir),gnulib)
-sysdep_routines += $(divrem)
+sysdep_routines += divl divlu divq divqu reml remlu remq remqu
endif
ifeq ($(subdir),string)
@@ -38,8 +38,6 @@ ifeq ($(subdir),elf)
CFLAGS-rtld.c = -mbuild-constants
endif
-divrem := divl divq reml remq
-
# For now, build everything with full IEEE math support.
# TODO: build separate libm and libm-ieee.
sysdep-CFLAGS += -mieee
diff --git a/sysdeps/alpha/div_libc.h b/sysdeps/alpha/div_libc.h
new file mode 100644
index 0000000..9856643
--- /dev/null
+++ b/sysdeps/alpha/div_libc.h
@@ -0,0 +1,113 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Common bits for implementing software divide. */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <asm/gentrap.h>
+# include <asm/pal.h>
+#else
+# include <machine/pal.h>
+#endif
+
+/* These are not normal C functions. Argument registers are t10 and t11;
+ the result goes in t12; the return address is in t9. Only t12 and AT
+ may be clobbered. */
+#define X t10
+#define Y t11
+#define RV t12
+#define RA t9
+
+/* None of these functions should use implicit anything. */
+ .set nomacro
+ .set noat
+
+/* Code fragment to invoke _mcount for profiling. This should be invoked
+ directly after allocation of the stack frame. */
+.macro CALL_MCOUNT
+#ifdef PROF
+ stq ra, 0(sp)
+ stq pv, 8(sp)
+ stq gp, 16(sp)
+ cfi_rel_offset (ra, 0)
+ cfi_rel_offset (pv, 8)
+ cfi_rel_offset (gp, 16)
+ br AT, 1f
+ .set macro
+1: ldgp gp, 0(AT)
+ mov RA, ra
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set nomacro
+ ldq ra, 0(sp)
+ ldq pv, 8(sp)
+ ldq gp, 16(sp)
+ cfi_restore (ra)
+ cfi_restore (pv)
+ cfi_restore (gp)
+ /* Realign subsequent code with what we'd have without this
+ macro at all. This means aligned with one arithmetic insn
+ used within the bundle. */
+ .align 4
+ nop
+#endif
+.endm
+
+/* In order to make the below work, all top-level divide routines must
+ use the same frame size. */
+#define FRAME 48
+
+/* Code fragment to generate an integer divide-by-zero fault. When
+ building libc.so, we arrange for there to be one copy of this code
+ placed late in the dso, such that all branches are forward. When
+ building libc.a, we use multiple copies to avoid having an out of
+ range branch. Users should jump to DIVBYZERO. */
+
+.macro DO_DIVBYZERO
+#ifdef PIC
+#define DIVBYZERO __divbyzero
+ .section .gnu.linkonce.t.divbyzero, "ax", @progbits
+ .globl __divbyzero
+ .type __divbyzero, @function
+ .usepv __divbyzero, no
+ .hidden __divbyzero
+#else
+#define DIVBYZERO $divbyzero
+#endif
+
+ .align 4
+DIVBYZERO:
+ cfi_startproc
+ cfi_return_column (RA)
+ cfi_def_cfa_offset (FRAME)
+
+ mov a0, RV
+ unop
+ lda a0, GEN_INTDIV
+ call_pal PAL_gentrap
+
+ mov RV, a0
+ clr RV
+ lda sp, FRAME(sp)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ cfi_endproc
+ .size DIVBYZERO, .-DIVBYZERO
+.endm
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index fdf053f..33fa118 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -1,6 +1,75 @@
-#define IS_REM 0
-#define SIZE 4
-#define UFUNC_NAME __divlu
-#define SFUNC_NAME __divl
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-#include "divrem.h"
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+/* 32-bit signed int divide. This is not a normal C function. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may
+ be clobbered.
+
+ The FPU can handle all input values except zero. Whee! */
+
+#ifndef EXTEND
+#define EXTEND(S,D) sextl S, D
+#endif
+
+ .text
+ .align 4
+ .globl __divl
+ .type __divl, @function
+ .usepv __divl, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__divl:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ beq Y, DIVBYZERO
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+
+ EXTEND (X, RV)
+ EXTEND (Y, AT)
+ stq RV, 16(sp)
+ stq AT, 24(sp)
+
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+
+ divt/c $f0, $f1, $f0
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+ ldt $f0, 0(sp)
+
+ ldt $f1, 8(sp)
+ ldl RV, 16(sp)
+ lda sp, FRAME(sp)
+ cfi_restore ($f0)
+ cfi_restore ($f1)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ cfi_endproc
+ .size __divl, .-__divl
+
+ DO_DIVBYZERO
diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S
new file mode 100644
index 0000000..5c54bb5
--- /dev/null
+++ b/sysdeps/alpha/divlu.S
@@ -0,0 +1,4 @@
+#define UNSIGNED
+#define EXTEND(S,D) zapnot S, 15, D
+#define __divl __divlu
+#include <divl.S>
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 8c88af9..464536d 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -1,6 +1,265 @@
-#define IS_REM 0
-#define SIZE 8
-#define UFUNC_NAME __divqu
-#define SFUNC_NAME __divq
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-#include "divrem.h"
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+
+/* 64-bit signed long divide. These are not normal C functions. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may
+ be clobbered.
+
+ Theory of operation here is that we can use the FPU divider for virtually
+ all operands that we see: all dividend values between -2**53 and 2**53-1
+ can be computed directly. Note that divisor values need not be checked
+ against that range because the rounded fp value will be close enough such
+ that the quotient is < 1, which will properly be truncated to zero when we
+ convert back to integer.
+
+ When the dividend is outside the range for which we can compute exact
+ results, we use the fp quotent as an estimate from which we begin refining
+ an exact integral value. This reduces the number of iterations in the
+ shift-and-subtract loop significantly. */
+
+ .text
+ .align 4
+ .globl __divq
+ .type __divq, @function
+ .usepv __divq, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__divq:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+
+ /* Get the fp divide insn issued as quickly as possible. After
+ that's done, we have at least 22 cycles until its results are
+ ready -- all the time in the world to figure out how we're
+ going to use the results. */
+ stq X, 16(sp)
+ stq Y, 24(sp)
+ beq Y, DIVBYZERO
+
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ divt/c $f0, $f1, $f0
+
+ /* Check to see if X fit in the double as an exact value. */
+ sll X, (64-53), AT
+ ldt $f1, 8(sp)
+ sra AT, (64-53), AT
+ cmpeq X, AT, AT
+ beq AT, $x_big
+
+ /* If we get here, we're expecting exact results from the division.
+ Do nothing else besides convert and clean up. */
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+
+ ldq RV, 16(sp)
+ ldt $f0, 0(sp)
+ cfi_restore ($f1)
+ cfi_remember_state
+ cfi_restore ($f0)
+ cfi_def_cfa_offset (0)
+ lda sp, FRAME(sp)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+$x_big:
+ /* If we get here, X is large enough that we don't expect exact
+ results, and neither X nor Y got mis-translated for the fp
+ division. Our task is to take the fp result, figure out how
+ far it's off from the correct result and compute a fixup. */
+ stq t0, 16(sp)
+ stq t1, 24(sp)
+ stq t2, 32(sp)
+ stq t5, 40(sp)
+ cfi_rel_offset (t0, 16)
+ cfi_rel_offset (t1, 24)
+ cfi_rel_offset (t2, 32)
+ cfi_rel_offset (t5, 40)
+
+#define Q RV /* quotient */
+#define R t0 /* remainder */
+#define SY t1 /* scaled Y */
+#define S t2 /* scalar */
+#define QY t3 /* Q*Y */
+
+ /* The fixup code below can only handle unsigned values. */
+ or X, Y, AT
+ mov $31, t5
+ blt AT, $fix_sign_in
+$fix_sign_in_ret1:
+ cvttq/c $f0, $f0
+
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+$fix_sign_in_ret2:
+ mulq Q, Y, QY
+ stq t4, 8(sp)
+
+ ldt $f0, 0(sp)
+ unop
+ cfi_rel_offset (t4, 8)
+ cfi_restore ($f0)
+ stq t3, 0(sp)
+ unop
+ cfi_rel_offset (t3, 0)
+
+ subq QY, X, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_high
+
+$q_high_ret:
+ subq X, QY, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_low
+
+$q_low_ret:
+ ldq t0, 16(sp)
+ ldq t1, 24(sp)
+ ldq t2, 32(sp)
+ bne t5, $fix_sign_out
+
+$fix_sign_out_ret:
+ ldq t3, 0(sp)
+ ldq t4, 8(sp)
+ ldq t5, 40(sp)
+ lda sp, FRAME(sp)
+ cfi_remember_state
+ cfi_restore (t0)
+ cfi_restore (t1)
+ cfi_restore (t2)
+ cfi_restore (t3)
+ cfi_restore (t4)
+ cfi_restore (t5)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+ /* The quotient that we computed was too large. We need to reduce
+ it by S such that Y*S >= R. Obviously the closer we get to the
+ correct value the better, but overshooting high is ok, as we'll
+ fix that up later. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_high:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ subq Q, S, Q
+ unop
+ subq QY, SY, QY
+ br $q_high_ret
+
+ .align 4
+ /* The quotient that we computed was too small. Divide Y by the
+ current remainder (R) and add that to the existing quotient (Q).
+ The expectation, of course, is that R is much smaller than X. */
+ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We
+ already have a copy of Y in SY and the value 1 in S. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_low:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ /* Shift-down and subtract loop. Each iteration compares our scaled
+ Y (SY) with the remainder (R); if SY <= R then X is divisible by
+ Y's scalar (S) so add it to the quotient (Q). */
+2: addq Q, S, t3
+ srl S, 1, S
+ cmpule SY, R, AT
+ subq R, SY, t4
+
+ cmovne AT, t3, Q
+ cmovne AT, t4, R
+ srl SY, 1, SY
+ bne S, 2b
+
+ br $q_low_ret
+
+ .align 4
+$fix_sign_in:
+ /* If we got here, then X|Y is negative. Need to adjust everything
+ such that we're doing unsigned division in the fixup loop. */
+ /* T5 records the changes we had to make:
+ bit 0: set if result should be negative.
+ bit 2: set if X was negated.
+ bit 3: set if Y was negated.
+ */
+ xor X, Y, AT
+ cmplt AT, 0, t5
+ cmplt X, 0, AT
+ negq X, t0
+
+ s4addq AT, t5, t5
+ cmovne AT, t0, X
+ cmplt Y, 0, AT
+ negq Y, t0
+
+ s8addq AT, t5, t5
+ cmovne AT, t0, Y
+ unop
+ blbc t5, $fix_sign_in_ret1
+
+ cvttq/c $f0, $f0
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+ unop
+
+ negq Q, Q
+ br $fix_sign_in_ret2
+
+ .align 4
+$fix_sign_out:
+ /* Now we get to undo what we did above. */
+ /* ??? Is this really faster than just increasing the size of
+ the stack frame and storing X and Y in memory? */
+ and t5, 8, AT
+ negq Y, t4
+ cmovne AT, t4, Y
+
+ and t5, 4, AT
+ negq X, t4
+ cmovne AT, t4, X
+
+ negq RV, t4
+ cmovlbs t5, t4, RV
+
+ br $fix_sign_out_ret
+
+ cfi_endproc
+ .size __divq, .-__divq
+
+ DO_DIVBYZERO
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
new file mode 100644
index 0000000..6ff6c03
--- /dev/null
+++ b/sysdeps/alpha/divqu.S
@@ -0,0 +1,244 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+
+/* 64-bit unsigned long divide. These are not normal C functions. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may be
+ clobbered.
+
+ Theory of operation here is that we can use the FPU divider for virtually
+ all operands that we see: all dividend values between -2**53 and 2**53-1
+ can be computed directly. Note that divisor values need not be checked
+ against that range because the rounded fp value will be close enough such
+ that the quotient is < 1, which will properly be truncated to zero when we
+ convert back to integer.
+
+ When the dividend is outside the range for which we can compute exact
+ results, we use the fp quotent as an estimate from which we begin refining
+ an exact integral value. This reduces the number of iterations in the
+ shift-and-subtract loop significantly. */
+
+ .text
+ .align 4
+ .globl __divqu
+ .type __divqu, @function
+ .usepv __divqu, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__divqu:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+
+ /* Get the fp divide insn issued as quickly as possible. After
+ that's done, we have at least 22 cycles until its results are
+ ready -- all the time in the world to figure out how we're
+ going to use the results. */
+ stq X, 16(sp)
+ stq Y, 24(sp)
+ beq Y, DIVBYZERO
+
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ blt X, $x_is_neg
+ divt/c $f0, $f1, $f0
+
+ /* Check to see if Y was mis-converted as signed value. */
+ ldt $f1, 8(sp)
+ unop
+ nop
+ blt Y, $y_is_neg
+
+ /* Check to see if X fit in the double as an exact value. */
+ srl X, 53, AT
+ bne AT, $x_big
+
+ /* If we get here, we're expecting exact results from the division.
+ Do nothing else besides convert and clean up. */
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+
+ ldq RV, 16(sp)
+ ldt $f0, 0(sp)
+ cfi_remember_state
+ cfi_restore ($f0)
+ cfi_restore ($f1)
+ cfi_def_cfa_offset (0)
+ lda sp, FRAME(sp)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+$x_is_neg:
+ /* If we get here, X is so big that bit 63 is set, which made the
+ conversion come out negative. Fix it up lest we not even get
+ a good estimate. */
+ ldah AT, 0x5f80 /* 2**64 as float. */
+ stt $f2, 24(sp)
+ cfi_rel_offset ($f2, 24)
+ stl AT, 16(sp)
+ lds $f2, 16(sp)
+
+ addt $f0, $f2, $f0
+ unop
+ divt/c $f0, $f1, $f0
+ unop
+
+ /* Ok, we've now the divide issued. Continue with other checks. */
+ ldt $f1, 8(sp)
+ unop
+ ldt $f2, 24(sp)
+ blt Y, $y_is_neg
+ cfi_restore ($f1)
+ cfi_restore ($f2)
+ cfi_remember_state /* for y_is_neg */
+
+ .align 4
+$x_big:
+ /* If we get here, X is large enough that we don't expect exact
+ results, and neither X nor Y got mis-translated for the fp
+ division. Our task is to take the fp result, figure out how
+ far it's off from the correct result and compute a fixup. */
+ stq t0, 16(sp)
+ stq t1, 24(sp)
+ stq t2, 32(sp)
+ stq t3, 40(sp)
+ cfi_rel_offset (t0, 16)
+ cfi_rel_offset (t1, 24)
+ cfi_rel_offset (t2, 32)
+ cfi_rel_offset (t3, 40)
+
+#define Q RV /* quotient */
+#define R t0 /* remainder */
+#define SY t1 /* scaled Y */
+#define S t2 /* scalar */
+#define QY t3 /* Q*Y */
+
+ cvttq/c $f0, $f0
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+ mulq Q, Y, QY
+
+ stq t4, 8(sp)
+ unop
+ ldt $f0, 0(sp)
+ unop
+ cfi_rel_offset (t4, 8)
+ cfi_restore ($f0)
+
+ subq QY, X, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_high
+
+$q_high_ret:
+ subq X, QY, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_low
+
+$q_low_ret:
+ ldq t4, 8(sp)
+ ldq t0, 16(sp)
+ ldq t1, 24(sp)
+ ldq t2, 32(sp)
+
+ ldq t3, 40(sp)
+ lda sp, FRAME(sp)
+ cfi_remember_state
+ cfi_restore (t0)
+ cfi_restore (t1)
+ cfi_restore (t2)
+ cfi_restore (t3)
+ cfi_restore (t4)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+ /* The quotient that we computed was too large. We need to reduce
+ it by S such that Y*S >= R. Obviously the closer we get to the
+ correct value the better, but overshooting high is ok, as we'll
+ fix that up later. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_high:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ subq Q, S, Q
+ unop
+ subq QY, SY, QY
+ br $q_high_ret
+
+ .align 4
+ /* The quotient that we computed was too small. Divide Y by the
+ current remainder (R) and add that to the existing quotient (Q).
+ The expectation, of course, is that R is much smaller than X. */
+ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We
+ already have a copy of Y in SY and the value 1 in S. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_low:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ /* Shift-down and subtract loop. Each iteration compares our scaled
+ Y (SY) with the remainder (R); if SY <= R then X is divisible by
+ Y's scalar (S) so add it to the quotient (Q). */
+2: addq Q, S, t3
+ srl S, 1, S
+ cmpule SY, R, AT
+ subq R, SY, t4
+
+ cmovne AT, t3, Q
+ cmovne AT, t4, R
+ srl SY, 1, SY
+ bne S, 2b
+
+ br $q_low_ret
+
+ .align 4
+ cfi_restore_state
+$y_is_neg:
+ /* If we get here, Y is so big that bit 63 is set. The results
+ from the divide will be completely wrong. Fortunately, the
+ quotient must be either 0 or 1, so just compute it directly. */
+ cmpult Y, X, RV
+ ldt $f0, 0(sp)
+ lda sp, FRAME(sp)
+ cfi_restore ($f0)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ cfi_endproc
+ .size __divqu, .-__divqu
+
+ DO_DIVBYZERO
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
deleted file mode 100644
index 032308d..0000000
--- a/sysdeps/alpha/divrem.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* The current Alpha chips don't provide hardware for integer
- division. The C compiler expects the functions
-
- __divqu: 64-bit unsigned long divide
- __remqu: 64-bit unsigned long remainder
- __divqs/__remqs: signed 64-bit
- __divlu/__remlu: unsigned 32-bit
- __divls/__remls: signed 32-bit
-
- These are not normal C functions: instead of the normal calling
- sequence, these expect their arguments in registers t10 and t11, and
- return the result in t12 (aka pv). Register AT may be clobbered
- (assembly temporary), anything else must be saved. */
-
-#include <sysdep.h>
-
-#ifdef __linux__
-# include <asm/gentrap.h>
-# include <asm/pal.h>
-#else
-# include <machine/pal.h>
-#endif
-
-#define mask v0
-#define divisor t0
-#define compare AT
-#define tmp1 t2
-#define tmp2 t3
-#define retaddr t9
-#define arg1 t10
-#define arg2 t11
-#define result t12
-
-#if IS_REM
-# define DIV_ONLY(x,y...)
-# define REM_ONLY(x,y...) x,##y
-# define modulus result
-# define quotient t1
-# define GETSIGN(x) mov arg1, x
-# define STACK 32
-#else
-# define DIV_ONLY(x,y...) x,##y
-# define REM_ONLY(x,y...)
-# define modulus t1
-# define quotient result
-# define GETSIGN(x) xor arg1, arg2, x
-# define STACK 48
-#endif
-
-#if SIZE == 8
-# define LONGIFY(x,y) mov x,y
-# define SLONGIFY(x,y) mov x,y
-# define _SLONGIFY(x)
-# define NEG(x,y) negq x,y
-#else
-# define LONGIFY(x,y) zapnot x,15,y
-# define SLONGIFY(x,y) sextl x,y
-# define _SLONGIFY(x) sextl x,x
-# define NEG(x,y) negl x,y
-#endif
-
- .set noreorder
- .set noat
-
- .ent UFUNC_NAME
- .globl UFUNC_NAME
-
- .align 3
-UFUNC_NAME:
-$udiv_entry:
- lda sp, -STACK(sp)
- .frame sp, STACK, retaddr, 0
-#ifdef PROF
- stq ra, 0(sp)
- stq pv, 8(sp)
- stq gp, 16(sp)
-
- br AT, 1f
-1: ldgp gp, 0(AT)
-
- mov retaddr, ra
- lda AT, _mcount
- jsr AT, (AT), _mcount
-
- ldq ra, 0(sp)
- ldq pv, 8(sp)
- ldq gp, 16(sp)
-#endif
- .prologue 0
-
-$udiv:
- stq t0, 0(sp)
- LONGIFY (arg2, divisor)
- stq t1, 8(sp)
- LONGIFY (arg1, modulus)
- stq v0, 16(sp)
- clr quotient
- stq tmp1, 24(sp)
- ldiq mask, 1
- DIV_ONLY(stq tmp2,32(sp))
-
- beq divisor, $divbyzero
-
- .align 3
-#if SIZE == 8
- /* Shift divisor left. */
-1: cmpult divisor, modulus, compare
- blt divisor, 2f
- addq divisor, divisor, divisor
- addq mask, mask, mask
- bne compare, 1b
- unop
-2:
-#else
- /* Shift divisor left using 3-bit shifts as we can't overflow.
- This results in looping three times less here, but up to
- two more times later. Thus using a large shift isn't worth it. */
-1: cmpult divisor, modulus, compare
- s8addq divisor, zero, divisor
- s8addq mask, zero, mask
- bne compare, 1b
-#endif
-
- /* Now go back to the right. */
-3: DIV_ONLY(addq quotient, mask, tmp2)
- srl mask, 1, mask
- cmpule divisor, modulus, compare
- subq modulus, divisor, tmp1
- DIV_ONLY(cmovne compare, tmp2, quotient)
- srl divisor, 1, divisor
- cmovne compare, tmp1, modulus
- bne mask, 3b
-
-$done: ldq t0, 0(sp)
- ldq t1, 8(sp)
- ldq v0, 16(sp)
- ldq tmp1, 24(sp)
- DIV_ONLY(ldq tmp2, 32(sp))
- lda sp, STACK(sp)
- ret zero, (retaddr), 1
-
-$divbyzero:
- mov a0, tmp1
- ldiq a0, GEN_INTDIV
- call_pal PAL_gentrap
- mov tmp1, a0
- clr result /* If trap returns, return zero. */
- br $done
-
- .end UFUNC_NAME
-
- .ent SFUNC_NAME
- .globl SFUNC_NAME
-
- .align 3
-SFUNC_NAME:
- lda sp, -STACK(sp)
- .frame sp, STACK, retaddr, 0
-#ifdef PROF
- stq ra, 0(sp)
- stq pv, 8(sp)
- stq gp, 16(sp)
-
- br AT, 1f
-1: ldgp gp, 0(AT)
-
- mov retaddr, ra
- jsr AT, _mcount
-
- ldq ra, 0(sp)
- ldq pv, 8(sp)
- ldq gp, 16(sp)
-#endif
- .prologue 0
-
- or arg1, arg2, AT
- _SLONGIFY(AT)
- bge AT, $udiv /* don't need to mess with signs */
-
- /* Save originals and find absolute values. */
- stq arg1, 0(sp)
- NEG (arg1, AT)
- stq arg2, 8(sp)
- cmovge AT, AT, arg1
- stq retaddr, 16(sp)
- NEG (arg2, AT)
- stq tmp1, 24(sp)
- cmovge AT, AT, arg2
-
- /* Do the unsigned division. */
- bsr retaddr, $udiv_entry
-
- /* Restore originals and adjust the sign of the result. */
- ldq arg1, 0(sp)
- ldq arg2, 8(sp)
- GETSIGN (AT)
- NEG (result, tmp1)
- _SLONGIFY(AT)
- ldq retaddr, 16(sp)
- cmovlt AT, tmp1, result
- ldq tmp1, 24(sp)
-
- lda sp, STACK(sp)
- ret zero, (retaddr), 1
-
- .end SFUNC_NAME
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index 8c00365..c4eb426 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -1,6 +1,80 @@
-#define IS_REM 1
-#define SIZE 4
-#define UFUNC_NAME __remlu
-#define SFUNC_NAME __reml
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@twiddle.net>
+ This file is part of the GNU C Library.
-#include "divrem.h"
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+/* 32-bit signed int remainder. This is not a normal C function. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may
+ be clobbered.
+
+ The FPU can handle the division for all input values except zero.
+ All we have to do is compute the remainder via multiply-and-subtract. */
+
+#ifndef EXTEND
+#define EXTEND(S,D) sextl S, D
+#endif
+
+ .text
+ .align 4
+ .globl __reml
+ .type __reml, @function
+ .usepv __reml, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__reml:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ beq Y, DIVBYZERO
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+
+ EXTEND (X, RV)
+ EXTEND (Y, AT)
+ stq RV, 16(sp)
+ stq AT, 24(sp)
+
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+
+ divt/c $f0, $f1, $f0
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+ ldq RV, 16(sp)
+
+ ldt $f0, 0(sp)
+ mull RV, Y, RV
+ ldt $f1, 8(sp)
+ lda sp, FRAME(sp)
+ cfi_restore ($f0)
+ cfi_restore ($f1)
+ cfi_def_cfa_offset (0)
+
+ subl X, RV, RV
+ ret $31, (RA), 1
+
+ cfi_endproc
+ .size __reml, .-__reml
+
+ DO_DIVBYZERO
diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S
new file mode 100644
index 0000000..f8691e1
--- /dev/null
+++ b/sysdeps/alpha/remlu.S
@@ -0,0 +1,4 @@
+#define UNSIGNED
+#define EXTEND(S,D) zapnot S, 15, D
+#define __reml __remlu
+#include <reml.S>
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index cd1064a..ce527d1 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -1,6 +1,261 @@
-#define IS_REM 1
-#define SIZE 8
-#define UFUNC_NAME __remqu
-#define SFUNC_NAME __remq
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-#include "divrem.h"
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+
+/* 64-bit signed long remainder. These are not normal C functions. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may
+ be clobbered.
+
+ Theory of operation here is that we can use the FPU divider for virtually
+ all operands that we see: all dividend values between -2**53 and 2**53-1
+ can be computed directly. Note that divisor values need not be checked
+ against that range because the rounded fp value will be close enough such
+ that the quotient is < 1, which will properly be truncated to zero when we
+ convert back to integer.
+
+ When the dividend is outside the range for which we can compute exact
+ results, we use the fp quotent as an estimate from which we begin refining
+ an exact integral value. This reduces the number of iterations in the
+ shift-and-subtract loop significantly. */
+
+ .text
+ .align 4
+ .globl __remq
+ .type __remq, @function
+ .usepv __remq, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__remq:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+
+ /* Get the fp divide insn issued as quickly as possible. After
+ that's done, we have at least 22 cycles until its results are
+ ready -- all the time in the world to figure out how we're
+ going to use the results. */
+ stq X, 16(sp)
+ stq Y, 24(sp)
+ beq Y, DIVBYZERO
+
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ divt/c $f0, $f1, $f0
+
+ /* Check to see if X fit in the double as an exact value. */
+ sll X, (64-53), AT
+ ldt $f1, 8(sp)
+ sra AT, (64-53), AT
+ cmpeq X, AT, AT
+ beq AT, $x_big
+
+ /* If we get here, we're expecting exact results from the division.
+ Do nothing else besides convert, compute remainder, clean up. */
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+
+ ldq AT, 16(sp)
+ mulq AT, Y, AT
+ ldt $f0, 0(sp)
+ cfi_restore ($f1)
+ cfi_remember_state
+ cfi_restore ($f0)
+ cfi_def_cfa_offset (0)
+ lda sp, FRAME(sp)
+
+ subq X, AT, RV
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+$x_big:
+ /* If we get here, X is large enough that we don't expect exact
+ results, and neither X nor Y got mis-translated for the fp
+ division. Our task is to take the fp result, figure out how
+ far it's off from the correct result and compute a fixup. */
+ stq t0, 16(sp)
+ stq t1, 24(sp)
+ stq t2, 32(sp)
+ stq t5, 40(sp)
+ cfi_rel_offset (t0, 16)
+ cfi_rel_offset (t1, 24)
+ cfi_rel_offset (t2, 32)
+ cfi_rel_offset (t5, 40)
+
+#define Q t0 /* quotient */
+#define R RV /* remainder */
+#define SY t1 /* scaled Y */
+#define S t2 /* scalar */
+#define QY t3 /* Q*Y */
+
+ /* The fixup code below can only handle unsigned values. */
+ or X, Y, AT
+ mov $31, t5
+ blt AT, $fix_sign_in
+$fix_sign_in_ret1:
+ cvttq/c $f0, $f0
+
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+$fix_sign_in_ret2:
+ mulq Q, Y, QY
+ stq t4, 8(sp)
+
+ ldt $f0, 0(sp)
+ unop
+ cfi_rel_offset (t4, 8)
+ cfi_restore ($f0)
+ stq t3, 0(sp)
+ unop
+ cfi_rel_offset (t3, 0)
+
+ subq QY, X, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_high
+
+$q_high_ret:
+ subq X, QY, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_low
+
+$q_low_ret:
+ ldq t0, 16(sp)
+ ldq t1, 24(sp)
+ ldq t2, 32(sp)
+ bne t5, $fix_sign_out
+
+$fix_sign_out_ret:
+ ldq t3, 0(sp)
+ ldq t4, 8(sp)
+ ldq t5, 40(sp)
+ lda sp, FRAME(sp)
+ cfi_remember_state
+ cfi_restore (t0)
+ cfi_restore (t1)
+ cfi_restore (t2)
+ cfi_restore (t3)
+ cfi_restore (t4)
+ cfi_restore (t5)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+ /* The quotient that we computed was too large. We need to reduce
+ it by S such that Y*S >= R. Obviously the closer we get to the
+ correct value the better, but overshooting high is ok, as we'll
+ fix that up later. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_high:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ subq Q, S, Q
+ unop
+ subq QY, SY, QY
+ br $q_high_ret
+
+ .align 4
+ /* The quotient that we computed was too small. Divide Y by the
+ current remainder (R) and add that to the existing quotient (Q).
+ The expectation, of course, is that R is much smaller than X. */
+ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We
+ already have a copy of Y in SY and the value 1 in S. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_low:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ /* Shift-down and subtract loop. Each iteration compares our scaled
+ Y (SY) with the remainder (R); if SY <= R then X is divisible by
+ Y's scalar (S) so add it to the quotient (Q). */
+2: addq Q, S, t3
+ srl S, 1, S
+ cmpule SY, R, AT
+ subq R, SY, t4
+
+ cmovne AT, t3, Q
+ cmovne AT, t4, R
+ srl SY, 1, SY
+ bne S, 2b
+
+ br $q_low_ret
+
+ .align 4
+$fix_sign_in:
+ /* If we got here, then X|Y is negative. Need to adjust everything
+ such that we're doing unsigned division in the fixup loop. */
+ /* T5 records the changes we had to make:
+ bit 0: set if X was negated. Note that the sign of the
+ remainder follows the sign of the divisor.
+ bit 2: set if Y was negated.
+ */
+ xor X, Y, t1
+ cmplt X, 0, t5
+ negq X, t0
+ cmovne t5, t0, X
+
+ cmplt Y, 0, AT
+ negq Y, t0
+ s4addq AT, t5, t5
+ cmovne AT, t0, Y
+
+ bge t1, $fix_sign_in_ret1
+ cvttq/c $f0, $f0
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+
+ negq Q, Q
+ br $fix_sign_in_ret2
+
+ .align 4
+$fix_sign_out:
+ /* Now we get to undo what we did above. */
+ /* ??? Is this really faster than just increasing the size of
+ the stack frame and storing X and Y in memory? */
+ and t5, 4, AT
+ negq Y, t4
+ cmovne AT, t4, Y
+
+ negq X, t4
+ cmovlbs t5, t4, X
+ negq RV, t4
+ cmovlbs t5, t4, RV
+
+ br $fix_sign_out_ret
+
+ cfi_endproc
+ .size __remq, .-__remq
+
+ DO_DIVBYZERO
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
new file mode 100644
index 0000000..1a1dcad
--- /dev/null
+++ b/sysdeps/alpha/remqu.S
@@ -0,0 +1,251 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "div_libc.h"
+
+
+/* 64-bit unsigned long remainder. These are not normal C functions. Argument
+ registers are t10 and t11, the result goes in t12. Only t12 and AT may be
+ clobbered.
+
+ Theory of operation here is that we can use the FPU divider for virtually
+ all operands that we see: all dividend values between -2**53 and 2**53-1
+ can be computed directly. Note that divisor values need not be checked
+ against that range because the rounded fp value will be close enough such
+ that the quotient is < 1, which will properly be truncated to zero when we
+ convert back to integer.
+
+ When the dividend is outside the range for which we can compute exact
+ results, we use the fp quotent as an estimate from which we begin refining
+ an exact integral value. This reduces the number of iterations in the
+ shift-and-subtract loop significantly. */
+
+ .text
+ .align 4
+ .globl __remqu
+ .type __remqu, @function
+ .usepv __remqu, no
+
+ cfi_startproc
+ cfi_return_column (RA)
+__remqu:
+ lda sp, -FRAME(sp)
+ cfi_def_cfa_offset (FRAME)
+ CALL_MCOUNT
+
+ /* Get the fp divide insn issued as quickly as possible. After
+ that's done, we have at least 22 cycles until its results are
+ ready -- all the time in the world to figure out how we're
+ going to use the results. */
+ stq X, 16(sp)
+ stq Y, 24(sp)
+ beq Y, DIVBYZERO
+
+ stt $f0, 0(sp)
+ stt $f1, 8(sp)
+ cfi_rel_offset ($f0, 0)
+ cfi_rel_offset ($f1, 8)
+ ldt $f0, 16(sp)
+ ldt $f1, 24(sp)
+
+ cvtqt $f0, $f0
+ cvtqt $f1, $f1
+ blt X, $x_is_neg
+ divt/c $f0, $f1, $f0
+
+ /* Check to see if Y was mis-converted as signed value. */
+ ldt $f1, 8(sp)
+ unop
+ nop
+ blt Y, $y_is_neg
+
+ /* Check to see if X fit in the double as an exact value. */
+ srl X, 53, AT
+ bne AT, $x_big
+
+ /* If we get here, we're expecting exact results from the division.
+ Do nothing else besides convert, compute remainder, clean up. */
+ cvttq/c $f0, $f0
+ stt $f0, 16(sp)
+
+ ldq AT, 16(sp)
+ mulq AT, Y, AT
+ ldt $f0, 0(sp)
+ lda sp, FRAME(sp)
+ cfi_remember_state
+ cfi_restore ($f0)
+ cfi_restore ($f1)
+ cfi_def_cfa_offset (0)
+
+ subq X, AT, RV
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+$x_is_neg:
+ /* If we get here, X is so big that bit 63 is set, which made the
+ conversion come out negative. Fix it up lest we not even get
+ a good estimate. */
+ ldah AT, 0x5f80 /* 2**64 as float. */
+ stt $f2, 24(sp)
+ cfi_rel_offset ($f2, 24)
+ stl AT, 16(sp)
+ lds $f2, 16(sp)
+
+ addt $f0, $f2, $f0
+ unop
+ divt/c $f0, $f1, $f0
+ unop
+
+ /* Ok, we've now the divide issued. Continue with other checks. */
+ ldt $f1, 8(sp)
+ unop
+ ldt $f2, 24(sp)
+ blt Y, $y_is_neg
+ cfi_restore ($f1)
+ cfi_restore ($f2)
+ cfi_remember_state /* for y_is_neg */
+
+ .align 4
+$x_big:
+ /* If we get here, X is large enough that we don't expect exact
+ results, and neither X nor Y got mis-translated for the fp
+ division. Our task is to take the fp result, figure out how
+ far it's off from the correct result and compute a fixup. */
+ stq t0, 16(sp)
+ stq t1, 24(sp)
+ stq t2, 32(sp)
+ stq t3, 40(sp)
+ cfi_rel_offset (t0, 16)
+ cfi_rel_offset (t1, 24)
+ cfi_rel_offset (t2, 32)
+ cfi_rel_offset (t3, 40)
+
+#define Q t0 /* quotient */
+#define R RV /* remainder */
+#define SY t1 /* scaled Y */
+#define S t2 /* scalar */
+#define QY t3 /* Q*Y */
+
+ cvttq/c $f0, $f0
+ stt $f0, 8(sp)
+ ldq Q, 8(sp)
+ mulq Q, Y, QY
+
+ stq t4, 8(sp)
+ unop
+ ldt $f0, 0(sp)
+ unop
+ cfi_rel_offset (t4, 8)
+ cfi_restore ($f0)
+
+ subq QY, X, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_high
+
+$q_high_ret:
+ subq X, QY, R
+ mov Y, SY
+ mov 1, S
+ bgt R, $q_low
+
+$q_low_ret:
+ ldq t4, 8(sp)
+ ldq t0, 16(sp)
+ ldq t1, 24(sp)
+ ldq t2, 32(sp)
+
+ ldq t3, 40(sp)
+ lda sp, FRAME(sp)
+ cfi_remember_state
+ cfi_restore (t0)
+ cfi_restore (t1)
+ cfi_restore (t2)
+ cfi_restore (t3)
+ cfi_restore (t4)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ .align 4
+ cfi_restore_state
+ /* The quotient that we computed was too large. We need to reduce
+ it by S such that Y*S >= R. Obviously the closer we get to the
+ correct value the better, but overshooting high is ok, as we'll
+ fix that up later. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_high:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ subq Q, S, Q
+ unop
+ subq QY, SY, QY
+ br $q_high_ret
+
+ .align 4
+ /* The quotient that we computed was too small. Divide Y by the
+ current remainder (R) and add that to the existing quotient (Q).
+ The expectation, of course, is that R is much smaller than X. */
+ /* Begin with a shift-up loop. Compute S such that Y*S >= R. We
+ already have a copy of Y in SY and the value 1 in S. */
+0:
+ addq SY, SY, SY
+ addq S, S, S
+$q_low:
+ cmpult SY, R, AT
+ bne AT, 0b
+
+ /* Shift-down and subtract loop. Each iteration compares our scaled
+ Y (SY) with the remainder (R); if SY <= R then X is divisible by
+ Y's scalar (S) so add it to the quotient (Q). */
+2: addq Q, S, t3
+ srl S, 1, S
+ cmpule SY, R, AT
+ subq R, SY, t4
+
+ cmovne AT, t3, Q
+ cmovne AT, t4, R
+ srl SY, 1, SY
+ bne S, 2b
+
+ br $q_low_ret
+
+ .align 4
+ cfi_restore_state
+$y_is_neg:
+ /* If we get here, Y is so big that bit 63 is set. The results
+ from the divide will be completely wrong. Fortunately, the
+ quotient must be either 0 or 1, so the remainder must be X
+ or X-Y, so just compute it directly. */
+ cmpult Y, X, AT
+ subq X, Y, RV
+ ldt $f0, 0(sp)
+ cmoveq AT, X, RV
+
+ lda sp, FRAME(sp)
+ cfi_restore ($f0)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
+ cfi_endproc
+ .size __remqu, .-__remqu
+
+ DO_DIVBYZERO
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a66be890064cd9626e2659bb7240686a26421e8e
commit a66be890064cd9626e2659bb7240686a26421e8e
Author: Richard Henderson <rth@redhat.com>
Date: Fri Mar 26 07:56:26 2004 +0000
* sysdeps/alpha/backtrace.c: New.
diff --git a/sysdeps/alpha/backtrace.c b/sysdeps/alpha/backtrace.c
new file mode 100644
index 0000000..2970294
--- /dev/null
+++ b/sysdeps/alpha/backtrace.c
@@ -0,0 +1 @@
+#include <sysdeps/ia64/backtrace.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce3f7d21bd70fc5475a6c2bfcb85b253e588309b
commit ce3f7d21bd70fc5475a6c2bfcb85b253e588309b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 24 06:34:59 2004 +0000
Define lll_mutex_cond_trylock.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index 9d125e0..a7079a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -80,6 +80,14 @@ __lll_mutex_trylock(int *futex)
#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
+static inline int __attribute__((always_inline))
+__lll_mutex_cond_trylock(int *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
+}
+#define lll_mutex_cond_trylock(lock) __lll_mutex_cond_trylock (&(lock))
+
+
extern void __lll_lock_wait (int *futex) attribute_hidden;
static inline void __attribute__((always_inline))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04520d8eebe787181b5d74e5f5ddb0c068ee4117
commit 04520d8eebe787181b5d74e5f5ddb0c068ee4117
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 24 06:29:57 2004 +0000
(pthread_mutex_t): Add __spins field.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index 2d8a00b..0fed5cc 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -1,5 +1,5 @@
/* Machine-specific pthread type layouts. Alpha version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -56,6 +56,7 @@ typedef union
/* KIND must stay at this position in the structure to maintain
binary compatibility. */
int __kind;
+ int __spins;
} __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=240d71125afb33eb78f38686e450a4f600fa73c9
commit 240d71125afb33eb78f38686e450a4f600fa73c9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 23 23:31:47 2004 +0000
(__NR_pread, __NR_pwrite): Define to __NR_p{read,write}64 if not defined.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 3c0988a..c3de78f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -65,6 +65,16 @@
# define __NR_semtimedop 423
#endif
+/* This is a kludge to make syscalls.list find these under the names
+ pread and pwrite, since some kernel headers define those names
+ and some define the *64 names for the same system calls. */
+#if !defined __NR_pread && defined __NR_pread64
+# define __NR_pread __NR_pread64
+#endif
+#if !defined __NR_pwrite && defined __NR_pwrite64
+# define __NR_pwrite __NR_pwrite64
+#endif
+
/*
* In order to get the hidden arguments for rt_sigaction set up
* properly, we need to call the assembly version. This shouldn't
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a01905d02002a321119b7fbbdd03ce8139d5a399
commit a01905d02002a321119b7fbbdd03ce8139d5a399
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 23 23:31:19 2004 +0000
Move common syscalls for 64bit arches to
sysdeps/unix/sysv/linux/wordsize-64/syscalls.list.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index b3168de..3bbce1c 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -18,19 +18,6 @@ vfork - vfork 0 __vfork vfork
getpeername - getpeername i:ipp __getpeername getpeername
getpriority - getpriority i:ii __getpriority getpriority
-mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
-lseek llseek -
-pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs i:sp __statfs statfs statfs64
-getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
-ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
-truncate - truncate 2 truncate truncate64
-readahead - readahead 3 __readahead readahead
-sendfile - sendfile i:iipi sendfile sendfile64
open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64
open64 open -
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=31e954134aef96ddacea638db5a7b211f6526391
commit 31e954134aef96ddacea638db5a7b211f6526391
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 23 23:26:58 2004 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
deleted file mode 100644
index 2be4e59..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
diff --git a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c
deleted file mode 100644
index 673a8b5..0000000
--- a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c
deleted file mode 100644
index 9eff9eb..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fxstat64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c
deleted file mode 100644
index 9feab0e..0000000
--- a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
diff --git a/sysdeps/unix/sysv/linux/alpha/glob64.c b/sysdeps/unix/sysv/linux/alpha/glob64.c
deleted file mode 100644
index 33918ea..0000000
--- a/sysdeps/unix/sysv/linux/alpha/glob64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat64.c b/sysdeps/unix/sysv/linux/alpha/lxstat64.c
deleted file mode 100644
index bb5dbd0..0000000
--- a/sysdeps/unix/sysv/linux/alpha/lxstat64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/mmap64.c b/sysdeps/unix/sysv/linux/alpha/mmap64.c
deleted file mode 100644
index 0dbd384..0000000
--- a/sysdeps/unix/sysv/linux/alpha/mmap64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c
deleted file mode 100644
index a87426c..0000000
--- a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c
deleted file mode 100644
index c9f72c4..0000000
--- a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/pread64.c b/sysdeps/unix/sysv/linux/alpha/pread64.c
deleted file mode 100644
index b7f298d..0000000
--- a/sysdeps/unix/sysv/linux/alpha/pread64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/alpha/pwrite64.c b/sysdeps/unix/sysv/linux/alpha/pwrite64.c
deleted file mode 100644
index b7f298d..0000000
--- a/sysdeps/unix/sysv/linux/alpha/pwrite64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/alpha/sendfile64.c b/sysdeps/unix/sysv/linux/alpha/sendfile64.c
deleted file mode 100644
index 4c451bd..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sendfile64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* sendfile64 is alias of sendfile syscall. */
diff --git a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c
deleted file mode 100644
index 8edcff0..0000000
--- a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/sysdeps/unix/sysv/linux/alpha/statfs64.c
deleted file mode 100644
index 06bc688..0000000
--- a/sysdeps/unix/sysv/linux/alpha/statfs64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
diff --git a/sysdeps/unix/sysv/linux/alpha/truncate64.c b/sysdeps/unix/sysv/linux/alpha/truncate64.c
deleted file mode 100644
index 8999768..0000000
--- a/sysdeps/unix/sysv/linux/alpha/truncate64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
diff --git a/sysdeps/unix/sysv/linux/alpha/xstat64.c b/sysdeps/unix/sysv/linux/alpha/xstat64.c
deleted file mode 100644
index e7acd3b..0000000
--- a/sysdeps/unix/sysv/linux/alpha/xstat64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0dfe557c64409473e5bafbfba4d03b81b185f45a
commit 0dfe557c64409473e5bafbfba4d03b81b185f45a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 23 23:26:24 2004 +0000
Implied additional directories.
diff --git a/sysdeps/unix/sysv/linux/alpha/Implies b/sysdeps/unix/sysv/linux/alpha/Implies
new file mode 100644
index 0000000..8d91c80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/Implies
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=006de7120298bcadc38e7ebd884e1fee47a772e5
commit 006de7120298bcadc38e7ebd884e1fee47a772e5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 23 23:25:52 2004 +0000
Consolidated 64bit support for Linux.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c
new file mode 100644
index 0000000..e53570c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c
@@ -0,0 +1 @@
+#include "../getdents64.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb14e096b5c53950581b2f168f4b09e5ed111350
commit fb14e096b5c53950581b2f168f4b09e5ed111350
Author: Richard Henderson <rth@redhat.com>
Date: Tue Mar 23 01:18:23 2004 +0000
* sysdeps/alpha/s_fabs.S: Remove file.
* sysdeps/alpha/s_copysign.S: Remove file.
diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S
deleted file mode 100644
index 51a5e22..0000000
--- a/sysdeps/alpha/s_copysign.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-
-ENTRY(__copysign)
-#ifdef PROF
- ldgp gp, 0(pv)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- cpys $f17,$f16,$f0
- ret
-
- END(__copysign)
-
-weak_alias(__copysign, copysign)
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
deleted file mode 100644
index dd3b584..0000000
--- a/sysdeps/alpha/s_fabs.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger <davidm@azstarnet.com>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-
-ENTRY(__fabs)
-#ifdef PROF
- .set noat
- ldgp gp, 0(pv)
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- cpys $f31,$f16,$f0
- ret
-
- END(__fabs)
-weak_alias (__fabs, fabs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=154a5429ac5525e57e9465697475a73b21b817a9
commit 154a5429ac5525e57e9465697475a73b21b817a9
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 15 21:44:10 2004 +0000
* math/Makefile (headers): Add bits/huge_valf.h, bits/huge_vall.h,
and bits/inf.h.
* math/math.h: Include them.
* sysdeps/alpha/fpu/bits/mathdef.h, sysdeps/arm/fpu/bits/mathdef.h,
sysdeps/generic/bits/mathdef.h, sysdeps/i386/fpu/bits/mathdef.h,
sysdeps/ia64/fpu/bits/mathdef.h, sysdeps/m68k/fpu/bits/mathdef.h,
sysdeps/mips/fpu/bits/mathdef.h, sysdeps/powerpc/fpu/bits/mathdef.h,
sysdeps/sh/sh4/fpu/bits/mathdef.h, sysdeps/sparc/fpu/bits/mathdef.h,
sysdeps/x86_64/fpu/bits/mathdef.h: Remove INFINITY.
* sysdeps/arm/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val.
(HUGE_VALF, HUGE_VALL): Remove.
* sysdeps/ieee754/bits/huge_val.h: Likewise.
* sysdeps/sh/bits/huge_val.h: Likewise.
* sysdeps/generic/bits/huge_val.h (HUGE_VAL): Use __builtin_huge_val.
* sysdeps/generic/bits/huge_valf.h: New file.
* sysdeps/generic/bits/huge_vall.h: New file.
* sysdeps/generic/bits/inf.h: New file.
* sysdeps/ieee754/bits/huge_valf.h: New file.
* sysdeps/ieee754/bits/inf.h: New file.
* sysdeps/i386/bits/huge_val.h: Remove file.
* sysdeps/i386/bits/huge_vall.h: New file.
* sysdeps/ia64/bits/huge_val.h: Remove file.
* sysdeps/ia64/bits/huge_vall.h: New file.
* sysdeps/ieee754/ldbl-128/bits/huge_vall.h: New file.
* sysdeps/m68k/bits/huge_val.h: Remove file.
* sysdeps/m68k/bits/huge_vall.h: New file.
* sysdeps/s390/bits/huge_val.h: Remove file.
* sysdeps/sh/sh4/fpu/bits/huge_val.h: Remove file.
* sysdeps/sparc/bits/huge_vall.h: New file.
* sysdeps/sparc/sparc32/fpu/bits/huge_val.h: Remove file.
* sysdeps/sparc/sparc64/fpu/bits/huge_val.h: Remove file.
* sysdeps/ieee754/bits/nan.h (NAN): Use __builtin_nanf.
* sysdeps/mips/bits/nan.h (NAN): Likewise.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 7979822..d5f2d5a 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,18 +34,12 @@
typedef float float_t;
typedef double double_t;
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
# else
/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
typedef double float_t;
typedef double double_t;
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
# endif
# else
@@ -52,9 +47,6 @@ typedef double double_t;
typedef double float_t;
typedef double double_t;
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 625cdc5..3339a0d 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -1,7 +1,8 @@
-/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
+/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
ARM version.
- Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,25 +24,19 @@
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
-#include <features.h>
-
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#ifdef __GNUC__
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VAL (__extension__ 0x1.0p2047)
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VAL (__builtin_huge_val())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VAL (__extension__ 0x1.0p2047)
+#elif defined __GNUC__
-# else
-
-# define HUGE_VAL \
+# define HUGE_VAL \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
{ __l: 0x000000007ff00000ULL }).__d)
-# endif
-
#else /* not GCC */
# include <endian.h>
@@ -59,46 +54,3 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# define HUGE_VAL (__huge_val.__d)
#endif /* GCC. */
-
-
-/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-
-#ifdef __USE_ISOC99
-
-# ifdef __GNUC__
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VALF (__extension__ 0x1.0p255f)
-
-# else
-
-# define HUGE_VALF \
- (__extension__ \
- ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
- { __l: 0x7f800000UL }).__d)
-
-# endif
-
-# else /* not GCC */
-
-typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
-
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
-# endif
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-# endif
-
-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-# define HUGE_VALF (__huge_valf.__f)
-
-# endif /* GCC. */
-
-
-/* Generally there is no separate `long double' format and it is the
- same as `double'. */
-# define HUGE_VALL HUGE_VAL
-
-#endif /* __USE_ISOC99. */
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
index 44d7f0d..e013e74 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,10 +29,6 @@ typedef float float_t; /* `float' expressions are evaluated as
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
-
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN (2147483647)
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
deleted file mode 100644
index ad52534..0000000
--- a/sysdeps/m68k/bits/huge_val.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* `HUGE_VAL' constants for m68k (where it is infinity).
- Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _MATH_H
-# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
-#endif
-
-
-#include <features.h>
-#include <sys/cdefs.h>
-
-/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-
-#ifdef __GNUC__
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VAL (__extension__ 0x1.0p2047)
-
-# else
-
-# define HUGE_VAL \
- (__extension__ \
- ((union { unsigned long long __l; double __d; }) \
- { __l: 0x7ff0000000000000ULL }).__d)
-
-# endif
-
-#else /* not GCC */
-
-static union { unsigned char __c[8]; double __d; } __huge_val =
- { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
-# define HUGE_VAL (__huge_val.__d)
-
-#endif /* GCC. */
-
-
-/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-
-#ifdef __USE_ISOC99
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VALF (__extension__ 0x1.0p255f)
-# define HUGE_VALL (__extension__ 0x1.0p32767L)
-
-# else
-
-# ifdef __GNUC__
-
-# define HUGE_VALF \
- (__extension__ \
- ((union { unsigned long __l; float __f; }) \
- { __l: 0x7f800000UL }).__f)
-
-# define HUGE_VALL \
- (__extension__ \
- ((union { unsigned long __l[3]; long double __ld; }) \
- { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
-
-# else /* not GCC */
-
-static union { unsigned char __c[4]; float __f; } __huge_valf =
- { { 0x7f, 0x80, 0, 0 } };
-# define HUGE_VALF (__huge_valf.__f)
-
-static union { unsigned char __c[12]; long double __ld; } __huge_vall =
- { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
-# define HUGE_VALL (__huge_vall.__ld)
-
-# endif /* GCC. */
-
-# endif /* GCC 2.95. */
-
-#endif /* __USE_ISOC99. */
diff --git a/sysdeps/m68k/bits/huge_vall.h b/sysdeps/m68k/bits/huge_vall.h
new file mode 100644
index 0000000..8b9630c
--- /dev/null
+++ b/sysdeps/m68k/bits/huge_vall.h
@@ -0,0 +1,43 @@
+/* `HUGE_VALL' constant for m68k (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+#if __GNUC_PREREQ(3,3)
+# define HUGE_VALL (__builtin_huge_vall ())
+#elif __GNUC_PREREQ(2,96)
+# define HUGE_VALL (__extension__ 0x1.0p32767L)
+#elif defined__GNUC__
+
+# define HUGE_VALL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
+
+#else /* not GCC */
+
+static union { unsigned char __c[12]; long double __ld; } __huge_vall =
+ { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
+# define HUGE_VALL (__huge_vall.__ld)
+
+#endif /* GCC 2.95. */
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 90146f1..65cf8d4 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,9 +31,6 @@ typedef long double float_t; /* `float' expressions are evaluated as
typedef long double double_t; /* `double' expressions are evaluated as
`long double'. */
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647 - 1)
# define FP_ILOGBNAN (2147483647)
diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h
index 193ab3c..baaaa55 100644
--- a/sysdeps/mips/bits/nan.h
+++ b/sysdeps/mips/bits/nan.h
@@ -1,5 +1,6 @@
/* `NAN' constant for IEEE 754 machines.
- Copyright (C) 1992, 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 1997, 1999, 2002, 2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +28,11 @@
the definition of this open to implementations, and for MIPS the top
bit of the mantissa must be SET to indicate a SNaN. */
-#ifdef __GNUC__
+#if __GNUC_PREREQ(3,3)
+
+# define NAN (__builtin_nanf(""))
+
+#elif defined __GNUC__
# define NAN \
(__extension__ \
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h
index fd73c35..4a51768 100644
--- a/sysdeps/mips/fpu/bits/mathdef.h
+++ b/sysdeps/mips/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -31,10 +31,6 @@ typedef double float_t; /* `float' expressions are evaluated as
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
-/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
-
-
/* The values returned by `ilogb' for 0 and NaN respectively. */
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN 2147483647
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=399e12d4707feace197afed90447eff448647187
commit 399e12d4707feace197afed90447eff448647187
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 14 21:01:14 2004 +0000
strtold_l for m68k long double.
diff --git a/sysdeps/m68k/strtold_l.c b/sysdeps/m68k/strtold_l.c
new file mode 100644
index 0000000..481d992
--- /dev/null
+++ b/sysdeps/m68k/strtold_l.c
@@ -0,0 +1,2 @@
+#define DENORM_EXP (MIN_EXP - 1)
+#include <sysdeps/ieee754/ldbl-96/strtold_l.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=360b2fddf14cf5f55d386bb67020078daa986df9
commit 360b2fddf14cf5f55d386bb67020078daa986df9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 14 20:59:44 2004 +0000
Not needed anymore.
diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c
deleted file mode 100644
index f756488..0000000
--- a/sysdeps/m68k/strtold.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define DENORM_EXP (MIN_EXP - 1)
-#include <sysdeps/ieee754/ldbl-96/strtold.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0f09d9abaaa038313e69b18a4f4201f9115ea42
commit e0f09d9abaaa038313e69b18a4f4201f9115ea42
Author: Richard Henderson <rth@redhat.com>
Date: Sat Mar 13 05:29:45 2004 +0000
* sysdeps/unix/sysv/linux/alpha/select.S: Fix unwind. Propagate
oldvalue from CENABLE to CDISABLE.
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 4a0594c..458cda9 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -53,6 +53,8 @@ LEAF(SELECT, 64)
jsr AT, (AT), _mcount
.set at
#endif
+ stq ra, 40(sp)
+ .mask 0x4000000, 40-64
.prologue 1
#ifdef CENABLE
@@ -131,9 +133,9 @@ $do_cancel:
stq a1, 16(sp)
stq a2, 24(sp)
stq a3, 32(sp)
- stq ra, 40(sp)
CENABLE
+ mov v0, ra
ldl t0, __libc_missing_axp_tv64
bne t0, $do_cancel32
@@ -147,6 +149,8 @@ $do_cancel:
ldi v0, SYS_ify(select)
callsys
+
+ mov ra, a0
bne a3, $cancel_err64
stq v0, 8(sp)
@@ -184,6 +188,8 @@ $do_cancel32:
1: ldi v0, SYS_ify(osf_select)
callsys
+
+ mov ra, a0
bne a3, $cancel_error
/* ... and bounce the remaining timeout back. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5e72ef81aad6662c1281bc0df26f55c23a419dd
commit a5e72ef81aad6662c1281bc0df26f55c23a419dd
Author: Richard Henderson <rth@redhat.com>
Date: Sat Mar 13 05:29:24 2004 +0000
* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
oldvalue from CENABLE to CDISABLE.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index 3b08b22..794d7fc 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -63,9 +63,14 @@ __LABEL($pseudo_cancel) \
SAVE_ARGS_##args; \
CENABLE; \
LOAD_ARGS_##args; \
+ /* Save the CENABLE return value in RA. That register \
+ is preserved across syscall and the real return \
+ address is saved on the stack. */ \
+ mov v0, ra; \
lda v0, SYS_ify(syscall_name); \
call_pal PAL_callsys; \
stq v0, 8(sp); \
+ mov ra, a0; \
bne a3, $multi_error; \
CDISABLE; \
ldq ra, 0(sp); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=24a4e2b0c96ad26335446cdc34608d59d581354f
commit 24a4e2b0c96ad26335446cdc34608d59d581354f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 12 20:24:21 2004 +0000
Define HOST_NAME_MAX.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
index e2a363f..bb3c4c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Linux/Alpha version.
- Copyright (C) 1993-1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -81,3 +81,6 @@
/* Maximum login name length. This is arbitrary. */
#define LOGIN_NAME_MAX 256
+
+/* Maximum host name length. */
+#define HOST_NAME_MAX 64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76deb69747662d5a6e9d461cfd36447371369342
commit 76deb69747662d5a6e9d461cfd36447371369342
Author: Richard Henderson <rth@redhat.com>
Date: Thu Mar 11 21:34:25 2004 +0000
* sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
* sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
* sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym
index 3f6433d..a1a1e45 100644
--- a/sysdeps/alpha/nptl/tcb-offsets.sym
+++ b/sysdeps/alpha/nptl/tcb-offsets.sym
@@ -10,3 +10,4 @@
#if TLS_MULTIPLE_THREADS_IN_TCB
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
#endif
+PID_OFFSET thread_offsetof (pid)
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S
index 4a2df42..ec5d175 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +16,28 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep-cancel.h>
+#include <sysdep.h>
+#include <tcb-offsets.h>
+
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS \
+ /* Load the current cached pid value across the vfork. */ \
+ rduniq; \
+ ldl a2, PID_OFFSET(v0); \
+ mov v0, a1; \
+ /* Write back its negation, to indicate that the pid value is \
+ uninitialized in the the child, and in the window between \
+ here and the point at which we restore the value. */ \
+ negl a2, t0; \
+ stl t0, PID_OFFSET(v0);
+
+PSEUDO (__vfork, vfork, 0)
+
+ /* If we're back in the parent, restore the saved pid. */
+ beq v0, 1f
+ stl a2, PID_OFFSET(a1)
+1: ret
-PSEUDO(__vfork, vfork, 0)
- ret
PSEUDO_END (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S
new file mode 100644
index 0000000..8bdf0eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/vfork.S
@@ -0,0 +1,46 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tcb-offsets.h>
+
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS \
+ /* Load the current cached pid value across the vfork. */ \
+ rduniq; \
+ ldl a2, PID_OFFSET(v0); \
+ mov v0, a1; \
+ /* If the cached value is initialized (nonzero), then write \
+ back its negation, or INT_MIN, to indicate that the pid \
+ value is uninitialized in the the child, and in the window \
+ between here and the point at which we restore the value. */ \
+ ldah t0, -0x8000; \
+ negl a2, t1; \
+ cmovne a2, t1, t0; \
+ stl t0, PID_OFFSET(v0);
+
+PSEUDO (__vfork, vfork, 0)
+
+ /* If we're back in the parent, restore the saved pid. */
+ beq v0, 1f
+ stl a2, PID_OFFSET(a1)
+1: ret
+
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4d2a4238c35114c143fc35849acf69ba92a393e
commit b4d2a4238c35114c143fc35849acf69ba92a393e
Author: Richard Henderson <rth@redhat.com>
Date: Thu Mar 11 02:58:44 2004 +0000
* sysdeps/unix/sysv/linux/alpha/kernel_stat.h (kernel_stat64): New.
(glibc21_stat): New.
* sysdeps/unix/sysv/linux/alpha/fxstat.c: New file.
* sysdeps/unix/sysv/linux/alpha/lxstat.c: New file.
* sysdeps/unix/sysv/linux/alpha/xstat.c: New file.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c (__xstat_conv): Add
code for _STAT_VER_GLIBC2_3_4.
(__libc_missing_axp_stat64): New.
* sysdeps/unix/sysv/linux/alpha/xstatconv.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/stat.h (__ST_TIME): New.
(_STAT_VER_GLIBC2_3_4, _STAT_VER_KERNEL64): New.
(struct stat, struct stat64): Update to new format.
(_STATBUF_ST_NSEC): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 921283a..40b6853 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001,2004
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,11 +25,45 @@
#define _STAT_VER_KERNEL 0
#define _STAT_VER_GLIBC2 1
#define _STAT_VER_GLIBC2_1 2
-#define _STAT_VER _STAT_VER_GLIBC2_1
+#define _STAT_VER_KERNEL64 3
+#define _STAT_VER_GLIBC2_3_4 3
+#define _STAT_VER _STAT_VER_GLIBC2_3_4
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
+
+/* Nanosecond resolution timestamps are stored in a format equivalent to
+ 'struct timespec'. This is the type used whenever possible but the
+ Unix namespace rules do not allow the identifier 'timespec' to appear
+ in the <sys/stat.h> header. Therefore we have to handle the use of
+ this header in strictly standard-compliant sources special.
+
+ Use neat tidy anonymous unions and structures when possible. */
+
+#ifdef __USE_MISC
+# if __GNUC_PREREQ(3,3)
+# define __ST_TIME(X) \
+ __extension__ union { \
+ struct timespec st_##X##tim; \
+ struct { \
+ __time_t st_##X##time; \
+ unsigned long st_##X##timensec; \
+ }; \
+ }
+# else
+# define __ST_TIME(X) struct timespec st_##X##tim
+# define st_atime st_atim.tv_sec
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# endif
+#else
+# define __ST_TIME(X) \
+ __time_t st_##X##time; \
+ unsigned long st_##X##timensec
+#endif
+
+
struct stat
{
__dev_t st_dev; /* Device. */
@@ -36,28 +71,26 @@ struct stat
__ino64_t st_ino; /* File serial number. */
#else
__ino_t st_ino; /* File serial number. */
- int __pad1;
+ int __pad0; /* 64-bit st_ino. */
#endif
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
- __time_t st_atime; /* Time of last access. */
- __time_t st_mtime; /* Time of last modification. */
- __time_t st_ctime; /* Time of last status change. */
#ifdef __USE_FILE_OFFSET64
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
#else
__blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */
- int __pad2;
+ int __pad1; /* 64-bit st_blocks. */
#endif
+ __mode_t st_mode; /* File mode. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
__blksize_t st_blksize; /* Optimal block size for I/O. */
- unsigned int st_flags;
- unsigned int st_gen;
- int __pad3;
- long __unused[4];
+ __nlink_t st_nlink; /* Link count. */
+ int __pad2; /* Real padding. */
+ __ST_TIME(a); /* Time of last access. */
+ __ST_TIME(m); /* Time of last modification. */
+ __ST_TIME(c); /* Time of last status change. */
+ long __unused[3];
};
#ifdef __USE_LARGEFILE64
@@ -66,27 +99,28 @@ struct stat64
{
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
- __time_t st_atime; /* Time of last access. */
- __time_t st_mtime; /* Time of last modification. */
- __time_t st_ctime; /* Time of last status change. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
+ __mode_t st_mode; /* File mode. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
__blksize_t st_blksize; /* Optimal block size for I/O. */
- unsigned int st_flags;
- unsigned int st_gen;
- int __pad3;
- long __unused[4];
+ __nlink_t st_nlink; /* Link count. */
+ int __pad0; /* Real padding. */
+ __ST_TIME(a); /* Time of last access. */
+ __ST_TIME(m); /* Time of last modification. */
+ __ST_TIME(c); /* Time of last status change. */
+ long __unused[3];
};
#endif
+#undef __ST_TIME
+
/* Tell code we have these members. */
#define _STATBUF_ST_BLKSIZE
#define _STATBUF_ST_RDEV
+#define _STATBUF_ST_NSEC
/* Encoding of the file mode. */
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat.c b/sysdeps/unix/sysv/linux/alpha/fxstat.c
new file mode 100644
index 0000000..40e08fd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fxstat.c
@@ -0,0 +1,64 @@
+/* fxstat using old-style Unix stat system call.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __fxstat64 __fxstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <xstatconv.h>
+
+#undef __fxstat64
+
+
+/* Get information about the file NAME in BUF. */
+int
+__fxstat (int vers, int fd, struct stat *buf)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ int result, errno_out;
+ struct kernel_stat kbuf;
+
+ if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
+ {
+ result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ if (errno_out != ENOSYS)
+ goto fail;
+ __libc_missing_axp_stat64 = 1;
+ }
+
+ result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat_conv (vers, &kbuf, buf);
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+
+ fail:
+ __set_errno (errno_out);
+ return -1;
+}
+hidden_def (__fxstat)
+weak_alias (__fxstat, _fxstat);
+strong_alias (__fxstat, __fxstat64);
+hidden_ver (__fxstat, __fxstat64)
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
index 75540c0..a1d012a 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
@@ -18,6 +18,31 @@ struct kernel_stat
unsigned int st_gen;
};
+/* Definition of `struct stat64' used in the kernel. */
+struct kernel_stat64
+ {
+ unsigned long st_dev;
+ unsigned long st_ino;
+ unsigned long st_rdev;
+ long st_size;
+ unsigned long st_blocks;
+
+ unsigned int st_mode;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned int st_blksize;
+ unsigned int st_nlink;
+ unsigned int __pad0;
+
+ unsigned long st_atime;
+ unsigned long st_atimensec;
+ unsigned long st_mtime;
+ unsigned long st_mtimensec;
+ unsigned long st_ctime;
+ unsigned long st_ctimensec;
+ long __unused[3];
+ };
+
/* Definition of `struct stat' used by glibc 2.0. */
struct glibc2_stat
{
@@ -38,4 +63,26 @@ struct glibc2_stat
unsigned int st_gen;
};
+/* Definition of `struct stat' used by glibc 2.1. */
+struct glibc21_stat
+ {
+ __dev_t st_dev;
+ __ino64_t st_ino;
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ __off_t st_size;
+ __time_t st_atime;
+ __time_t st_mtime;
+ __time_t st_ctime;
+ __blkcnt64_t st_blocks;
+ __blksize_t st_blksize;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ int __pad3;
+ long __unused[4];
+ };
+
#define XSTAT_IS_XSTAT64 1
diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat.c b/sysdeps/unix/sysv/linux/alpha/lxstat.c
new file mode 100644
index 0000000..38fac2e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/lxstat.c
@@ -0,0 +1,64 @@
+/* lxstat using old-style Unix stat system call.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __lxstat64 __lxstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <xstatconv.h>
+
+#undef __lxstat64
+
+
+/* Get information about the file NAME in BUF. */
+int
+__lxstat (int vers, const char *name, struct stat *buf)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ int result, errno_out;
+ struct kernel_stat kbuf;
+
+ if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
+ {
+ result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ if (errno_out != ENOSYS)
+ goto fail;
+ __libc_missing_axp_stat64 = 1;
+ }
+
+ result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat_conv (vers, &kbuf, buf);
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+
+ fail:
+ __set_errno (errno_out);
+ return -1;
+}
+hidden_def (__lxstat)
+weak_alias (__lxstat, _lxstat);
+strong_alias (__lxstat, __lxstat64);
+hidden_ver (__lxstat, __lxstat64)
diff --git a/sysdeps/unix/sysv/linux/alpha/xstat.c b/sysdeps/unix/sysv/linux/alpha/xstat.c
new file mode 100644
index 0000000..b7488e4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/xstat.c
@@ -0,0 +1,64 @@
+/* xstat using old-style Unix stat system call.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __xstat64 __xstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <xstatconv.h>
+
+#undef __xstat64
+
+
+/* Get information about the file NAME in BUF. */
+int
+__xstat (int vers, const char *name, struct stat *buf)
+{
+ INTERNAL_SYSCALL_DECL (err);
+ int result, errno_out;
+ struct kernel_stat kbuf;
+
+ if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
+ {
+ result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return result;
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ if (errno_out != ENOSYS)
+ goto fail;
+ __libc_missing_axp_stat64 = 1;
+ }
+
+ result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat_conv (vers, &kbuf, buf);
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+
+ fail:
+ __set_errno (errno_out);
+ return -1;
+}
+hidden_def (__xstat)
+weak_alias (__xstat, _xstat);
+strong_alias (__xstat, __xstat64);
+hidden_ver (__xstat, __xstat64)
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index 3f15dfe..a193b62 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,15 +24,14 @@
#include <xstatconv.h>
+int __libc_missing_axp_stat64;
+
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
switch (vers)
{
case _STAT_VER_KERNEL:
- /* Nothing to do. The struct is in the form the kernel expects.
- We should have short-circuted before we got here, but for
- completeness... */
*(struct kernel_stat *) ubuf = *kbuf;
break;
@@ -60,7 +59,7 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
case _STAT_VER_GLIBC2_1:
{
- struct stat64 *buf = ubuf;
+ struct glibc21_stat *buf = ubuf;
buf->st_dev = kbuf->st_dev;
buf->st_ino = kbuf->st_ino;
@@ -85,6 +84,36 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
}
break;
+ case _STAT_VER_GLIBC2_3_4:
+ {
+ struct stat64 *buf = ubuf;
+
+ buf->st_dev = kbuf->st_dev;
+ buf->st_ino = kbuf->st_ino;
+ buf->st_rdev = kbuf->st_rdev;
+ buf->st_size = kbuf->st_size;
+ buf->st_blocks = kbuf->st_blocks;
+
+ buf->st_mode = kbuf->st_mode;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->__pad0 = 0;
+
+ buf->st_atime = kbuf->st_atime;
+ buf->st_atimensec = 0;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_mtimensec = 0;
+ buf->st_ctime = kbuf->st_ctime;
+ buf->st_ctimensec = 0;
+
+ buf->__unused[0] = 0;
+ buf->__unused[1] = 0;
+ buf->__unused[2] = 0;
+ }
+ break;
+
default:
__set_errno (EINVAL);
return -1;
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/sysdeps/unix/sysv/linux/alpha/xstatconv.h
new file mode 100644
index 0000000..846bb02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -0,0 +1,24 @@
+/* Convert between the kernel's `struct stat' format, and libc's.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "kernel-features.h"
+
+extern int __libc_missing_axp_stat64 attribute_hidden;
+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+ attribute_hidden;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25366174f23560810197b9e5daa51874ee0f56e6
commit 25366174f23560810197b9e5daa51874ee0f56e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 19:21:39 2004 +0000
(__old_glob, __old_globfree): Add attribute_compat_text_section.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index 68cda76..9d39176 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +44,7 @@ typedef struct
int
+attribute_compat_text_section
__old_glob (const char *pattern, int flags,
int (*errfunc) (const char *, int),
old_glob_t *pglob)
@@ -82,6 +83,7 @@ compat_symbol (libc, __old_glob, glob, GLIBC_2_0);
/* Free storage allocated in PGLOB by a previous `glob' call. */
void
+attribute_compat_text_section
__old_globfree (old_glob_t *pglob)
{
glob_t correct;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=826bbef91e621df1d0a2d7e1d51499dd00d97be7
commit 826bbef91e621df1d0a2d7e1d51499dd00d97be7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 19:21:18 2004 +0000
(__old_wordexp): Add attribute_compat_text_section.
diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c
index 1027204..1921a03 100644
--- a/sysdeps/unix/sysv/linux/alpha/wordexp.c
+++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,7 @@ typedef struct
int
+attribute_compat_text_section
__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
{
wordexp_t we;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36727f22a1e9b40acd7024e0d3f04ff3ba9b4f53
commit 36727f22a1e9b40acd7024e0d3f04ff3ba9b4f53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 19:20:11 2004 +0000
(ADJTIME): Add attribute_compat_text_section.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index e036896..f8b272e 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,7 +58,7 @@ struct timex32 {
#define TIMEVAL timeval32
#define TIMEX timex32
-#define ADJTIME __adjtime_tv32
+#define ADJTIME attribute_compat_text_section __adjtime_tv32
#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x)
#define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x)
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
@@ -72,7 +72,9 @@ LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
#include <sysdeps/unix/sysv/linux/adjtime.c>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-int __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
+int
+attribute_compat_text_section
+__adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
strong_alias (__adjtimex_tv32, __adjtimex_tv32_1);
strong_alias (__adjtimex_tv32, __adjtimex_tv32_2);
compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15d7e9922c41b31c3f1689be8cde6bb36754f522
commit 15d7e9922c41b31c3f1689be8cde6bb36754f522
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 05:58:46 2004 +0000
(isgreater, isgreaterequal, isless, islessequal, islessgreater): Remove;
use default.
(isunordered): Convert inputs to double.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 8141485..0ba79f9 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -28,34 +28,19 @@
# define __MATH_INLINE extern __inline
#endif
-#ifdef __USE_ISOC99
-# define isunordered(x, y) \
+#if defined __USE_ISOC99 && defined __GNUC__ && !__GNUC_PREREQ(3,0)
+# undef isgreater
+# undef isgreaterequal
+# undef isless
+# undef islessequal
+# undef islessgreater
+# undef isunordered
+# define isunordered(u, v) \
(__extension__ \
- ({ double __r; \
+ ({ double __r, __u = (u), __v = (v); \
__asm ("cmptun/su %1,%2,%0\n\ttrapb" \
- : "=&f" (__r) : "f" (x), "f"(y)); \
+ : "=&f" (__r) : "f" (__u), "f"(__v)); \
__r != 0; }))
-
-# define isgreater(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x > __y; }))
-# define isgreaterequal(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x >= __y; }))
-# define isless(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x < __y; }))
-# define islessequal(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x <= __y; }))
-# define islessgreater(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23386e2249314455ab5b6eb380b000679c6790e2
commit 23386e2249314455ab5b6eb380b000679c6790e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 05:58:17 2004 +0000
Don't define via builtins.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index ec00b4b..1e43e43 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -21,20 +21,18 @@
#ifdef __GNUC__
#ifdef __USE_ISOC99
-
-# if __GNUC_PREREQ (3,1)
/* GCC 3.1 and up have builtins that actually can be used. */
-# define isgreater(x, y) __builtin_isgreater (x, y)
-# define isgreaterequal(x, y) __builtin_isgreaterequal (x, y)
-# define isless(x, y) __builtin_isless (x, y)
-# define islessequal(x, y) __builtin_islessequal (x, y)
-# define islessgreater(x, y) __builtin_islessgreater (x, y)
-# define isunordered(x, y) __builtin_isunordered (x, y)
-# else
+# if !__GNUC_PREREQ (3,1)
/* ISO C99 defines some macros to perform unordered comparisons. The
m68k FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
+# undef isgreater
+# undef isgreaterequal
+# undef isless
+# undef islessequal
+# undef islessgreater
+# undef isunordered
# define isgreater(x, y) \
__extension__ \
({ char __result; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19fecb537fbf30ca75b44b0fee99e6c4e951996e
commit 19fecb537fbf30ca75b44b0fee99e6c4e951996e
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 8 12:34:18 2004 +0000
* sysdeps/alpha/soft-fp/ots_cvtxt.c (_OtsConvertFloatXT): Fix typo
in name.
diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c
index d1f8d2b..2629dd9 100644
--- a/sysdeps/alpha/soft-fp/ots_cvtxt.c
+++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c
@@ -23,7 +23,7 @@
#include "double.h"
double
-_Ots_ConvertFloatXT (long al, long ah, long _round)
+_OtsConvertFloatXT (long al, long ah, long _round)
{
FP_DECL_EX;
FP_DECL_Q(A);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33ebb515d1147853a967f635bfefb1d7536f9ffc
commit 33ebb515d1147853a967f635bfefb1d7536f9ffc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 7 08:38:42 2004 +0000
Use GLRO instead of GL where appropriate.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 0ced274..35b3334 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -1,5 +1,5 @@
/* Linux/ARM version of processor capability information handling macros.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -39,7 +39,7 @@ _dl_procinfo (int word)
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
if (word & (1 << i))
- _dl_printf (" %s", GL(dl_arm_cap_flags)[i]);
+ _dl_printf (" %s", GLRO(dl_arm_cap_flags)[i]);
_dl_printf ("\n");
@@ -50,7 +50,7 @@ static inline const char *
__attribute__ ((unused))
_dl_hwcap_string (int idx)
{
- return GL(dl_arm_cap_flags)[idx];
+ return GLRO(dl_arm_cap_flags)[idx];
};
enum
@@ -75,7 +75,7 @@ _dl_string_hwcap (const char *str)
for (i = 0; i < _DL_HWCAP_COUNT; i++)
{
- if (strcmp (str, GL(dl_arm_cap_flags)[i]) == 0)
+ if (strcmp (str, GLRO(dl_arm_cap_flags)[i]) == 0)
return i;
}
return -1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb08891109faa933372d16d69a1209b1783f8ee8
commit fb08891109faa933372d16d69a1209b1783f8ee8
Author: Richard Henderson <rth@redhat.com>
Date: Sat Mar 6 20:46:23 2004 +0000
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
index 2c6af5b..4b354f3 100644
--- a/sysdeps/alpha/Implies
+++ b/sysdeps/alpha/Implies
@@ -2,3 +2,4 @@ wordsize-64
# Alpha uses IEEE 754 single and double precision floating point.
ieee754/flt-32
ieee754/dbl-64
+alpha/soft-fp
diff --git a/sysdeps/alpha/Subdirs b/sysdeps/alpha/Subdirs
new file mode 100644
index 0000000..87eadf3
--- /dev/null
+++ b/sysdeps/alpha/Subdirs
@@ -0,0 +1 @@
+soft-fp
diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist
index 7e9914f..3d75ee7 100644
--- a/sysdeps/alpha/soft-fp/Dist
+++ b/sysdeps/alpha/soft-fp/Dist
@@ -1 +1,14 @@
+local-soft-fp.h
+ots_add.c
+ots_cmp.c
+ots_cmpe.c
+ots_cvtqux.c
+ots_cvtqx.c
+ots_cvttx.c
+ots_cvtxq.c
+ots_cvtxt.c
+ots_div.c
+ots_mul.c
+ots_nintxq.c
+ots_sub.c
sfp-machine.h
diff --git a/sysdeps/alpha/soft-fp/Makefile b/sysdeps/alpha/soft-fp/Makefile
new file mode 100644
index 0000000..d7e7e26
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/Makefile
@@ -0,0 +1,6 @@
+# Software floating-point emulation.
+
+ifeq ($(subdir),soft-fp)
+sysdep_routines += ots_add ots_sub ots_mul ots_div ots_cmp ots_cmpe \
+ ots_cvtxq ots_cvtqx ots_cvtqux ots_cvttx ots_cvtxt ots_nintxq
+endif
diff --git a/sysdeps/alpha/soft-fp/Versions b/sysdeps/alpha/soft-fp/Versions
new file mode 100644
index 0000000..3901287
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/Versions
@@ -0,0 +1,8 @@
+libc {
+ GLIBC_2.3.4 {
+ _OtsAddX; _OtsSubX; _OtsMulX; _OtsDivX;
+ _OtsEqlX; _OtsNeqX; _OtsLssX; _OtsLeqX; _OtsGtrX; _OtsGeqX;
+ _OtsCvtQX; _OtsCvtQUX; _OtsCvtXQ; _OtsNintXQ;
+ _OtsConvertFloatTX; _OtsConvertFloatXT;
+ }
+}
diff --git a/sysdeps/alpha/soft-fp/local-soft-fp.h b/sysdeps/alpha/soft-fp/local-soft-fp.h
new file mode 100644
index 0000000..e93a2ad
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/local-soft-fp.h
@@ -0,0 +1,44 @@
+#include <stdlib.h>
+#include <soft-fp.h>
+#include <quad.h>
+
+/* Helpers for the Ots functions which receive long double arguments
+ in two integer registers, and return values in $16+$17. */
+
+#undef _FP_UNPACK_RAW_2
+#define _FP_UNPACK_RAW_2(fs, X, val) \
+ do { \
+ union _FP_UNION_##fs _flo; \
+ _flo.longs.a = val##l; \
+ _flo.longs.b = val##h; \
+ X##_f0 = _flo.bits.frac0; \
+ X##_f1 = _flo.bits.frac1; \
+ X##_e = _flo.bits.exp; \
+ X##_s = _flo.bits.sign; \
+ } while (0)
+
+#undef _FP_PACK_RAW_2
+#define _FP_PACK_RAW_2(fs, val, X) \
+ do { \
+ union _FP_UNION_##fs _flo; \
+ _flo.bits.frac0 = X##_f0; \
+ _flo.bits.frac1 = X##_f1; \
+ _flo.bits.exp = X##_e; \
+ _flo.bits.sign = X##_s; \
+ val##l = _flo.longs.a; \
+ val##h = _flo.longs.b; \
+ } while (0)
+
+#define FP_DECL_RETURN(X) \
+ long X##l, X##h
+
+/* ??? We don't have a real way to tell the compiler that we're wanting
+ to return values in $16+$17. Instead use a volatile asm to make sure
+ that the values are live, and just hope that nothing kills the values
+ in between here and the end of the function. */
+#define FP_RETURN(X) \
+do { \
+ register long r16 __asm__("16") = X##l; \
+ register long r17 __asm__("17") = X##h; \
+ asm volatile ("" : : "r"(r16), "r"(r17)); \
+} while (0)
diff --git a/sysdeps/alpha/soft-fp/ots_add.c b/sysdeps/alpha/soft-fp/ots_add.c
new file mode 100644
index 0000000..b4f6c28
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_add.c
@@ -0,0 +1,39 @@
+/* Software floating-point emulation: addition.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+void
+_OtsAddX(long al, long ah, long bl, long bh, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_UNPACK_Q(B, b);
+ FP_ADD_Q(C, A, B);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cmp.c b/sysdeps/alpha/soft-fp/ots_cmp.c
new file mode 100644
index 0000000..c356b48
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cmp.c
@@ -0,0 +1,64 @@
+/* Software floating-point emulation: comparison.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+static long
+internal_equality (long al, long ah, long bl, long bh, long neq)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B);
+ long r;
+
+ FP_UNPACK_RAW_Q(A, a);
+ FP_UNPACK_RAW_Q(B, b);
+
+ if ((A_e == _FP_EXPMAX_Q && !_FP_FRAC_ZEROP_2(A))
+ || (B_e == _FP_EXPMAX_Q && !_FP_FRAC_ZEROP_2(B)))
+ {
+ /* EQ and NE signal invalid operation only if either operand is SNaN. */
+ if (FP_ISSIGNAN_Q(A) || FP_ISSIGNAN_Q(B))
+ {
+ FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_HANDLE_EXCEPTIONS;
+ }
+ return -1;
+ }
+
+ r = (A_e == B_e
+ && _FP_FRAC_EQ_2 (A, B)
+ && (A_s == B_s || (!A_e && _FP_FRAC_ZEROP_2(A))));
+ r ^= neq;
+
+ return r;
+}
+
+long
+_OtsEqlX (long al, long ah, long bl, long bh)
+{
+ return internal_equality (al, ah, bl, bh, 0);
+}
+
+long
+_OtsNeqX (long al, long ah, long bl, long bh)
+{
+ return internal_equality (al, ah, bl, bh, 1);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cmpe.c b/sysdeps/alpha/soft-fp/ots_cmpe.c
new file mode 100644
index 0000000..001eb75
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cmpe.c
@@ -0,0 +1,83 @@
+/* Software floating-point emulation: comparison.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+static long
+internal_compare (long al, long ah, long bl, long bh)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B);
+ long r;
+
+ FP_UNPACK_RAW_Q(A, a);
+ FP_UNPACK_RAW_Q(B, b);
+ FP_CMP_Q (r, A, B, 2);
+
+ /* Relative comparisons signal invalid operation if either operand is NaN. */
+ if (r == 2)
+ {
+ FP_SET_EXCEPTION(FP_EX_INVALID);
+ FP_HANDLE_EXCEPTIONS;
+ }
+
+ return r;
+}
+
+long
+_OtsLssX (long al, long ah, long bl, long bh)
+{
+ long r = internal_compare (al, ah, bl, bh);
+ if (r == 2)
+ return -1;
+ else
+ return r < 0;
+}
+
+long
+_OtsLeqX (long al, long ah, long bl, long bh)
+{
+ long r = internal_compare (al, ah, bl, bh);
+ if (r == 2)
+ return -1;
+ else
+ return r <= 0;
+}
+
+long
+_OtsGtrX (long al, long ah, long bl, long bh)
+{
+ long r = internal_compare (al, ah, bl, bh);
+ if (r == 2)
+ return -1;
+ else
+ return r > 0;
+}
+
+long
+_OtsGeqX (long al, long ah, long bl, long bh)
+{
+ long r = internal_compare (al, ah, bl, bh);
+ if (r == 2)
+ return -1;
+ else
+ return r >= 0;
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqux.c b/sysdeps/alpha/soft-fp/ots_cvtqux.c
new file mode 100644
index 0000000..d7ab5ba
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cvtqux.c
@@ -0,0 +1,40 @@
+/* Software floating-point emulation: unsigned integer to float conversion.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+/* Should never actually be used, since we've more bits of precision
+ than the incomming long, but needed for linkage. */
+#undef FP_ROUNDMODE
+#define FP_ROUNDMODE FP_RND_ZERO
+
+void
+_OtsCvtQUX (unsigned long a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_FROM_INT_Q(C, a, 64, long);
+ FP_PACK_Q(c, C);
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cvtqx.c b/sysdeps/alpha/soft-fp/ots_cvtqx.c
new file mode 100644
index 0000000..0e1c6bd
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cvtqx.c
@@ -0,0 +1,39 @@
+/* Software floating-point emulation: signed integer to float conversion.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+/* Should never actually be used, since we've more bits of precision
+ than the incomming long, but needed for linkage. */
+#undef FP_ROUNDMODE
+#define FP_ROUNDMODE FP_RND_ZERO
+
+void
+_OtsCvtQX (long a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_FROM_INT_Q(C, a, 64, long);
+ FP_PACK_Q(c, C);
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cvttx.c b/sysdeps/alpha/soft-fp/ots_cvttx.c
new file mode 100644
index 0000000..ee5ac32
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cvttx.c
@@ -0,0 +1,48 @@
+/* Software floating-point emulation: floating point extension.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+#include "double.h"
+
+/* Should never actually be used, since we're extending, but needed
+ for linkage. */
+#undef FP_ROUNDMODE
+#define FP_ROUNDMODE FP_RND_ZERO
+
+void
+_OtsConvertFloatTX(double a)
+{
+ FP_DECL_EX;
+ FP_DECL_D(A);
+ FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_UNPACK_D(A, a);
+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+ FP_CONV(Q,D,4,2,C,A);
+#else
+ FP_CONV(Q,D,2,1,C,A);
+#endif
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cvtxq.c b/sysdeps/alpha/soft-fp/ots_cvtxq.c
new file mode 100644
index 0000000..1fd47da
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cvtxq.c
@@ -0,0 +1,43 @@
+/* Software floating-point emulation: float to integer conversion.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+long
+_OtsCvtXQ (long al, long ah, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ long r, s;
+
+ /* If bit 3 is set, then integer overflow detection is requested. */
+ s = _round & 8 ? 1 : -1;
+ _round = _round & 3;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_TO_INT_Q(r, A, 64, s);
+
+ if (s > 0 && (_fex &= FP_EX_INVALID))
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/sysdeps/alpha/soft-fp/ots_cvtxt.c b/sysdeps/alpha/soft-fp/ots_cvtxt.c
new file mode 100644
index 0000000..d1f8d2b
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_cvtxt.c
@@ -0,0 +1,44 @@
+/* Software floating-point emulation: floating point truncation.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+#include "double.h"
+
+double
+_Ots_ConvertFloatXT (long al, long ah, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A);
+ FP_DECL_D(R);
+ double r;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+#if (2 * _FP_W_TYPE_SIZE) < _FP_FRACBITS_Q
+ FP_CONV(D,Q,2,4,R,A);
+#else
+ FP_CONV(D,Q,1,2,R,A);
+#endif
+ FP_PACK_D(r, R);
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/sysdeps/alpha/soft-fp/ots_div.c b/sysdeps/alpha/soft-fp/ots_div.c
new file mode 100644
index 0000000..eb07489
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_div.c
@@ -0,0 +1,39 @@
+/* Software floating-point emulation: division.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+void
+_OtsDivX(long al, long ah, long bl, long bh, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_UNPACK_Q(B, b);
+ FP_DIV_Q(C, A, B);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_mul.c b/sysdeps/alpha/soft-fp/ots_mul.c
new file mode 100644
index 0000000..f88ee33
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_mul.c
@@ -0,0 +1,39 @@
+/* Software floating-point emulation: multiplication.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+void
+_OtsMulX(long al, long ah, long bl, long bh, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_UNPACK_Q(B, b);
+ FP_MUL_Q(C, A, B);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/ots_nintxq.c b/sysdeps/alpha/soft-fp/ots_nintxq.c
new file mode 100644
index 0000000..2cb1ca4
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_nintxq.c
@@ -0,0 +1,50 @@
+/* Software floating-point emulation: convert to fortran nearest.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+long
+_OtsNintXQ (long al, long ah, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
+ long r, s;
+
+ /* If bit 3 is set, then integer overflow detection is requested. */
+ s = _round & 8 ? 1 : -1;
+ _round = _round & 3;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+
+ /* Build 0.5 * sign(A) */
+ B_e = _FP_EXPBIAS_Q;
+ __FP_FRAC_SET_2 (B, _FP_IMPLBIT_Q, 0);
+ B_s = A_s;
+ _FP_UNPACK_CANONICAL(Q,2,B);
+
+ FP_ADD_Q(C, A, B);
+ FP_TO_INT_Q(r, C, 64, s);
+ if (s > 0 && (_fex &= FP_EX_INVALID))
+ FP_HANDLE_EXCEPTIONS;
+
+ return r;
+}
diff --git a/sysdeps/alpha/soft-fp/ots_sub.c b/sysdeps/alpha/soft-fp/ots_sub.c
new file mode 100644
index 0000000..c10043f
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/ots_sub.c
@@ -0,0 +1,39 @@
+/* Software floating-point emulation: subtraction.
+ Copyright (C) 1997,1999,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com) and
+ Jakub Jelinek (jj@ultra.linux.cz).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "local-soft-fp.h"
+
+void
+_OtsSubX(long al, long ah, long bl, long bh, long _round)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(B); FP_DECL_Q(C);
+ FP_DECL_RETURN(c);
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_UNPACK_Q(B, b);
+ FP_SUB_Q(C, A, B);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+
+ FP_RETURN(c);
+}
diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h
index 73b934d..2bad4e9 100644
--- a/sysdeps/alpha/soft-fp/sfp-machine.h
+++ b/sysdeps/alpha/soft-fp/sfp-machine.h
@@ -1,35 +1,94 @@
+/* Machine-dependent software floating-point definitions.
+ Alpha userland IEEE 128-bit version.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@cygnus.com),
+ Jakub Jelinek (jj@ultra.linux.cz) and
+ David S. Miller (davem@redhat.com).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv_libc.h>
+
#define _FP_W_TYPE_SIZE 64
#define _FP_W_TYPE unsigned long
#define _FP_WS_TYPE signed long
#define _FP_I_TYPE long
-#define _alpha_mul_64_128(rhi, rlo, x, y) \
- __asm__("umulh %2,%3,%0; mulq %2,%3,%1" \
- : "=&r"(rhi), "=r"(rlo) : "r"(x), "r"(y))
-
#define _FP_MUL_MEAT_S(R,X,Y) \
_FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
#define _FP_MUL_MEAT_D(R,X,Y) \
- _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,_alpha_mul_64_128)
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_Q(R,X,Y) \
- _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,_alpha_mul_64_128)
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
-#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
-#define _FP_NANFRAC_S _FP_QNANBIT_S
-#define _FP_NANFRAC_D _FP_QNANBIT_D
-#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
-/* FIXME: This is just a wild guess */
-#define _FP_NANSIGN_S 1
-#define _FP_NANSIGN_D 1
-#define _FP_NANSIGN_Q 1
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1)
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
#define _FP_KEEPNANFRACP 1
-#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
- do { \
- R##_s = Y##_s; \
- _FP_FRAC_COPY_##wc(R,Y); \
- R##_c = FP_CLS_NAN; \
+
+/* Alpha Architecture Handbook, 4.7.10.4 sez that we should prefer any
+ type of NaN in Fb, then Fa. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ R##_c = FP_CLS_NAN; \
} while (0)
+
+/* Rounding mode settings. */
+#define FP_RND_NEAREST FE_TONEAREST
+#define FP_RND_ZERO FE_TOWARDZERO
+#define FP_RND_PINF FE_UPWARD
+#define FP_RND_MINF FE_DOWNWARD
+
+/* Obtain the current rounding mode. It's given as an argument to
+ all the Ots functions, with 4 meaning "dynamic". */
+#define FP_ROUNDMODE _round
+
+/* Exception flags. */
+#define FP_EX_INVALID FE_INVALID
+#define FP_EX_OVERFLOW FE_OVERFLOW
+#define FP_EX_UNDERFLOW FE_UNDERFLOW
+#define FP_EX_DIVZERO FE_DIVBYZERO
+#define FP_EX_INEXACT FE_INEXACT
+
+#define FP_INIT_ROUNDMODE \
+do { \
+ if (__builtin_expect (_round == 4, 0)) \
+ { \
+ unsigned long t; \
+ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(t)); \
+ _round = (t >> FPCR_ROUND_SHIFT) & 3; \
+ } \
+} while (0)
+
+#define FP_HANDLE_EXCEPTIONS \
+do { \
+ if (__builtin_expect (_fex, 0)) \
+ { \
+ unsigned long t = __ieee_get_fp_control (); \
+ __ieee_set_fp_control (t | _fex); \
+ } \
+} while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7c187d616a197ac7387c90a517de4cef7a0157a
commit a7c187d616a197ac7387c90a517de4cef7a0157a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 6 08:06:01 2004 +0000
Use GLRO instead of GL where appropriate.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 10a437b..f7ffdc5 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>.
@@ -33,8 +33,8 @@ __getpagesize ()
int result;
#endif
- if (GL(dl_pagesize) != 0)
- return GL(dl_pagesize);
+ if (GLRO(dl_pagesize) != 0)
+ return GLRO(dl_pagesize);
#ifdef __NR_getpagesize
INTERNAL_SYSCALL_DECL (err);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cebbd6e78d1a4b5ab6d22ecaa5c6516dce166d5d
commit cebbd6e78d1a4b5ab6d22ecaa5c6516dce166d5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 5 10:22:54 2004 +0000
Use GLRO instead of GL where appropriate.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3616fae..35d7e1d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -114,7 +114,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
*(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GL(dl_profile), l))
+ if (_dl_name_match_p (GLRO(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
@@ -648,7 +648,7 @@ static inline void
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
void *const reloc_addr_arg)
{
- /* XXX Make some timings. Maybe it's preferable to test for
+ /* XXX Make some timings. Maybe it's preferable to test for
unaligned access and only do it the complex way if necessary. */
Elf64_Addr reloc_addr_val;
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 9b1d53a..25a8515 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -110,7 +110,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GL(dl_profile), l))
+ if (_dl_name_match_p (GLRO(dl_profile), l))
/* Say that we really want profiling and the timers are
started. */
GL(dl_profile_map) = l;
@@ -334,9 +334,9 @@ _dl_start_user:\n\
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
+ if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0')
/* Avoid an empty string which would disturb us. */
- GL(dl_platform) = NULL;
+ GLRO(dl_platform) = NULL;
}
static inline Elf32_Addr
@@ -444,7 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+ || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
{
const char *strtab;
@@ -556,7 +556,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+ || (GLRO(dl_verbose) && sym->st_size < refsym->st_size))
{
const char *strtab;
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index d3bc83a..e528938 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (GL(dl_profile), l))
+ if (_dl_name_match_p (GLRO(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
@@ -248,7 +248,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (sym->st_size < refsym->st_size && GL(dl_verbose)))
+ || (sym->st_size < refsym->st_size && GLRO(dl_verbose)))
{
const char *strtab;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f519f549509a6b196fb02d93a4422fac4c0eee29
commit f519f549509a6b196fb02d93a4422fac4c0eee29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 3 18:56:20 2004 +0000
posix_fadvise implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c
new file mode 100644
index 0000000..a87426c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c
@@ -0,0 +1,2 @@
+#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d2146a9e29b706783bd346f233a270f9f8759f3
commit 5d2146a9e29b706783bd346f233a270f9f8759f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 3 18:56:03 2004 +0000
posix_fadvise64 implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c
new file mode 100644
index 0000000..c9f72c4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c
@@ -0,0 +1 @@
+/* posix_fadvise64 is in posix_fadvise.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3bc82bb9b580bf94cf30f3abb2b5324c683864f4
commit 3bc82bb9b580bf94cf30f3abb2b5324c683864f4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 3 18:55:08 2004 +0000
(posix_fadvise64): Remove.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index d30a9b6..b3168de 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,7 +21,6 @@ getpriority - getpriority i:ii __getpriority getpriority
mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
-posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise
pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e98a88227fad0d66607a64968c6b92ffc5542034
commit e98a88227fad0d66607a64968c6b92ffc5542034
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 21 02:10:01 2004 +0000
(feholdexcept): Fix order of fp status register loads.
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index db9fb40..5aec015 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -46,11 +46,11 @@ feholdexcept (fenv_t *envp)
/* Load the new environment. */
_regs = &clear;
__asm__ (
- "fldd,ma -8(%1),%%fr3\n"
- "fldd,ma -8(%1),%%fr2\n"
- "fldd,ma -8(%1),%%fr1\n"
- "fldd 0(%1),%%fr0\n"
- : "=m" (*_regs), "+r" (_regs));
+ "fldd,ma 8(%0),%%fr0\n"
+ "fldd,ma 8(%0),%%fr1\n"
+ "fldd,ma 8(%0),%%fr2\n"
+ "fldd 0(%0),%%fr3\n"
+ : : "r" (_regs));
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45f79d6b6a4f6ffcb002ba87bb86bf1a01bbbae6
commit 45f79d6b6a4f6ffcb002ba87bb86bf1a01bbbae6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 20 20:14:55 2004 +0000
Alpha specific definition for ld.so.
diff --git a/sysdeps/alpha/dl-sysdep.h b/sysdeps/alpha/dl-sysdep.h
new file mode 100644
index 0000000..0b4c805
--- /dev/null
+++ b/sysdeps/alpha/dl-sysdep.h
@@ -0,0 +1,41 @@
+/* System-specific settings for dynamic linker code. Alpha version.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _DL_SYSDEP_H
+#define _DL_SYSDEP_H 1
+
+/* This macro must be defined to either 0 or 1.
+
+ If 1, then an errno global variable hidden in ld.so will work right with
+ all the errno-using libc code compiled for ld.so, and there is never a
+ need to share the errno location with libc. This is appropriate only if
+ all the libc functions that ld.so uses are called without PLT and always
+ get the versions linked into ld.so rather than the libc ones. */
+
+#ifdef IS_IN_rtld
+# define RTLD_PRIVATE_ERRNO 1
+#else
+# define RTLD_PRIVATE_ERRNO 0
+#endif
+
+/* _dl_argv cannot be attribute_relro, because _dl_start_user
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
+
+#endif /* dl-sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f742623a42855372127e838fc5acd1a86539e7a6
commit f742623a42855372127e838fc5acd1a86539e7a6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 20 20:14:00 2004 +0000
(DL_ARGV_NOT_RELRO): Remove.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index cf96b77..3616fae 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -293,10 +293,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
#endif
-/* _dl_argv cannot be attribute_relro, because _dl_start_user below
- might write into it after _dl_start returns. */
-#define DL_ARGV_NOT_RELRO 1
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83eb9f210dd51f87f2a029170bfe659b327f7171
commit 83eb9f210dd51f87f2a029170bfe659b327f7171
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 20 05:41:20 2004 +0000
(DL_ARGV_NOT_RELRO): Define.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3616fae..cf96b77 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -293,6 +293,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
#endif
+/* _dl_argv cannot be attribute_relro, because _dl_start_user below
+ might write into it after _dl_start returns. */
+#define DL_ARGV_NOT_RELRO 1
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2de6922e31dbf00d5be7da996ecd094fc18baac8
commit 2de6922e31dbf00d5be7da996ecd094fc18baac8
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 23 21:08:08 2004 +0000
* Versions.def (libm): Replace GLIBC_2.3.3 with GLIBC_2.3.4.
* sysdeps/alpha/fpu/Versions (libm): Likewise.
* sysdeps/alpha/fpu/cfloat-compat.h (cfloat_versions): Likewise.
* sysdeps/alpha/fpu/s_clog10f.c (clog10f): Likewise.
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions
index e2925e2..c9b0e03 100644
--- a/sysdeps/alpha/fpu/Versions
+++ b/sysdeps/alpha/fpu/Versions
@@ -5,7 +5,7 @@ libc {
}
}
libm {
- GLIBC_2.3.3 {
+ GLIBC_2.3.4 {
# functions implementing old complex float abi
__c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf;
__c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf;
diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h
index cb40f55..d325a76 100644
--- a/sysdeps/alpha/fpu/cfloat-compat.h
+++ b/sysdeps/alpha/fpu/cfloat-compat.h
@@ -60,7 +60,7 @@
#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4)
#define cfloat_versions_compat(func) \
compat_symbol (libm, __c1_##func, func, GLIBC_2_1)
#else
@@ -69,6 +69,6 @@
#define cfloat_versions(func) \
cfloat_versions_compat(func); \
- versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_3); \
+ versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_4); \
extern typeof(__c2_##func) __##func attribute_hidden; \
strong_alias (__c2_##func, __##func)
diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c
index bd60ed1..12ecdea 100644
--- a/sysdeps/alpha/fpu/s_clog10f.c
+++ b/sysdeps/alpha/fpu/s_clog10f.c
@@ -51,11 +51,11 @@ __c2_clog10f (c2_cfloat_decl (x))
/* Ug. __clog10f was exported from GLIBC_2.1. This is the only
complex function whose double-underscore symbol was exported,
so we get to handle that specially. */
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4)
strong_alias (__c1_clog10f, __c1_clog10f_2);
compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1);
compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1);
#endif
-versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_3);
+versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_4);
extern typeof(__c2_clog10f) __clog10f attribute_hidden;
strong_alias (__c2_clog10f, __clog10f)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9efb40c83605d89e1e897ddebc1a186435a5a210
commit 9efb40c83605d89e1e897ddebc1a186435a5a210
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 20 23:23:55 2004 +0000
Add readahead prototype.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index a84d335..7d1197a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -171,3 +171,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 152858d..ce17d68 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -178,3 +178,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 7e841f8..69ce6a5 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -177,3 +177,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index fca17b1..6f13871 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -170,3 +170,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 7de111a..af7c0ea 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -177,3 +177,11 @@ struct flock64
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
+
+__BEGIN_DECLS
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=def952dc40b0f533c7c6c91c9cecb84bd48cea6e
commit def952dc40b0f533c7c6c91c9cecb84bd48cea6e
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 17 01:38:55 2004 +0000
2004-01-13 Daniel Jacobowitz <drow@mvista.com>
* sysdeps/powerpc/nofpu/sim-full.c (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Declare with
hidden data and nocommon.
* sysdeps/powerpc/nofpu/soft-supp.h (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Use
libc_hidden_proto.
* sysdeps/powerpc/soft-fp/sfp-machine.h (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Likewise.
diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c
index 9f4c96f..d018240 100644
--- a/sysdeps/powerpc/nofpu/sim-full.c
+++ b/sysdeps/powerpc/nofpu/sim-full.c
@@ -1,5 +1,5 @@
/* Software floating-point exception handling emulation.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -23,12 +23,15 @@
#include "soft-supp.h"
/* Global to store sticky exceptions. */
-int __sim_exceptions;
+int __sim_exceptions __attribute__ ((nocommon));
+libc_hidden_data_def (__sim_exceptions);
/* By default, no exceptions should trap. */
int __sim_disabled_exceptions = 0xffffffff;
+libc_hidden_data_def (__sim_disabled_exceptions);
-int __sim_round_mode;
+int __sim_round_mode __attribute__ ((nocommon));
+libc_hidden_data_def (__sim_round_mode);
void
__simulate_exceptions (int x)
diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/sysdeps/powerpc/nofpu/soft-supp.h
index e358eda..3922426 100644
--- a/sysdeps/powerpc/nofpu/soft-supp.h
+++ b/sysdeps/powerpc/nofpu/soft-supp.h
@@ -1,5 +1,5 @@
/* Internal support stuff for complete soft float.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -27,7 +27,11 @@ typedef union
} fenv_union_t;
-extern int __sim_exceptions attribute_hidden;
-extern int __sim_disabled_exceptions attribute_hidden;
-extern int __sim_round_mode attribute_hidden;
+extern int __sim_exceptions;
+libc_hidden_proto (__sim_exceptions);
+extern int __sim_disabled_exceptions;
+libc_hidden_proto (__sim_disabled_exceptions);
+extern int __sim_round_mode;
+libc_hidden_proto (__sim_round_mode);
+
extern void __simulate_exceptions (int x) attribute_hidden;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6092f9e018bffe2fa6739ae1bdcda00819e9fe13
commit 6092f9e018bffe2fa6739ae1bdcda00819e9fe13
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 06:04:53 2004 +0000
* sysdeps/unix/alpha/sysdep.h: Revert last change.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index d3ed2a9..26cf918 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -85,11 +85,13 @@
lda v0, -1; \
ret
#elif defined(PIC)
-# define SYSCALL_ERROR_LABEL __syscall_error !samegp
-# define SYSCALL_ERROR_HANDLER br $31, SYSCALL_ERROR_LABEL
+# define SYSCALL_ERROR_LABEL __syscall_error
+# define SYSCALL_ERROR_HANDLER \
+ br $31, __syscall_error !samegp
#else
# define SYSCALL_ERROR_LABEL $syscall_error
-# define SYSCALL_ERROR_HANDLER jmp $31, __syscall_error
+# define SYSCALL_ERROR_HANDLER \
+ jmp $31, __syscall_error
#endif /* RTLD_PRIVATE_ERRNO */
/* Overridden by specific syscalls. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7bd9f5453c7a62e56dd4d979340d8dfcaa9745e0
commit 7bd9f5453c7a62e56dd4d979340d8dfcaa9745e0
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 06:02:52 2004 +0000
* sysdeps/unix/alpha/sysdep.h [PIC] (SYSCALL_ERROR_HANDLER): Use
!samegp relocation.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 26cf918..d3ed2a9 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -85,13 +85,11 @@
lda v0, -1; \
ret
#elif defined(PIC)
-# define SYSCALL_ERROR_LABEL __syscall_error
-# define SYSCALL_ERROR_HANDLER \
- br $31, __syscall_error !samegp
+# define SYSCALL_ERROR_LABEL __syscall_error !samegp
+# define SYSCALL_ERROR_HANDLER br $31, SYSCALL_ERROR_LABEL
#else
# define SYSCALL_ERROR_LABEL $syscall_error
-# define SYSCALL_ERROR_HANDLER \
- jmp $31, __syscall_error
+# define SYSCALL_ERROR_HANDLER jmp $31, __syscall_error
#endif /* RTLD_PRIVATE_ERRNO */
/* Overridden by specific syscalls. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56a46fe4b9c6e7fd7e4ce6dfdba2dab3bc673931
commit 56a46fe4b9c6e7fd7e4ce6dfdba2dab3bc673931
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 05:59:42 2004 +0000
* sysdeps/alpha/dl-machine.h (RTLD_START): Use _dl_argv_internal.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 6680abf..3616fae 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -348,15 +348,16 @@ $fixup_stack: \n\
/* Adjust the stack pointer to skip _dl_skip_args words.\n\
This involves copying everything down, since the \n\
stack pointer must always be 16-byte aligned. */ \n\
+ ldah $7, _dl_argv_internal($gp) !gprelhigh \n\
ldq $2, 0($sp) \n\
- ldq $5, _dl_argv \n\
+ ldq $5, _dl_argv_internal($7) !gprellow \n\
subq $31, $1, $6 \n\
subq $2, $1, $2 \n\
s8addq $6, $5, $5 \n\
mov $sp, $4 \n\
s8addq $1, $sp, $3 \n\
stq $2, 0($sp) \n\
- stq $5, _dl_argv \n\
+ stq $5, _dl_argv_internal($7) !gprellow \n\
/* Copy down argv. */ \n\
0: ldq $5, 8($3) \n\
addq $4, 8, $4 \n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbbfa1b98e8c19a03afbfe469a59e767e3acdfae
commit bbbfa1b98e8c19a03afbfe469a59e767e3acdfae
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 05:23:05 2004 +0000
* sysdeps/alpha/tls.h (tcbhead_t): Add private.
(TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
(TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
(THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
(THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
* sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index f947fcf..bc66309 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -57,93 +57,67 @@ typedef union dtv
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
-/* This layout is actually wholly private and not affected by the ABI.
- Nor does it overlap the pthread data structure, so we need nothing
- extra here at all. */
typedef struct
{
dtv_t *dtv;
+ void *private;
} tcbhead_t;
/* This is the size of the initial TCB. */
-# define TLS_INIT_TCB_SIZE 0
+# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
+# define TLS_INIT_TCB_ALIGN 16
/* This is the size of the TCB. */
-# define TLS_TCB_SIZE 0
-
-/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (struct pthread)
+# define TLS_TCB_SIZE sizeof (tcbhead_t)
/* This is the size we need before TCB. */
-# define TLS_PRE_TCB_SIZE \
- (sizeof (struct pthread) \
- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
-
-/* The following assumes that TP (R2 or R13) points to the end of the
- TCB + 0x7000 (per the ABI). This implies that TCB address is
- TP - 0x7000. As we define TLS_DTV_AT_TP we can
- assume that the pthread struct is allocated immediately ahead of the
- TCB. This implies that the pthread_descr address is
- TP - (TLS_PRE_TCB_SIZE + 0x7000). */
-/* ??? PPC uses offset 0x7000; seems like a good idea for alpha too,
- but binutils not yet changed to match. */
-# define TLS_TCB_OFFSET 0
+# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN 16
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */
# define INSTALL_DTV(tcbp, dtvp) \
- ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1
+ (((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1)
/* Install new dtv for current thread. */
-# define INSTALL_NEW_DTV(dtv) (THREAD_DTV() = (dtv))
+# define INSTALL_NEW_DTV(dtv) \
+ (THREAD_DTV() = (dtv))
/* Return dtv of given thread descriptor. */
-# define GET_DTV(tcbp) (((tcbhead_t *) (tcbp))[-1].dtv)
+# define GET_DTV(tcbp) \
+ (((tcbhead_t *) (tcbp))->dtv)
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched. */
# define TLS_INIT_TP(tcbp, secondcall) \
- (__builtin_set_thread_pointer ((void *) (tcbp) + TLS_TCB_OFFSET), NULL)
+ (__builtin_set_thread_pointer ((void *)(tcbp)), NULL)
/* Return the address of the dtv for the current thread. */
# define THREAD_DTV() \
- (((tcbhead_t *) (__builtin_thread_pointer () - TLS_TCB_OFFSET))[-1].dtv)
+ (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
/* Return the thread descriptor for the current thread. */
# define THREAD_SELF \
- ((struct pthread *) (__builtin_thread_pointer () \
- - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+ ((struct pthread *)__builtin_thread_pointer () - 1)
/* Magic for libthread_db to know how to do THREAD_SELF. */
# define DB_THREAD_SELF \
- REGISTER (64, 64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-
-/* Identifier for the current thread. THREAD_SELF is usable but
- sometimes more expensive than necessary as in this case. */
-# define THREAD_ID (__builtin_thread_pointer ())
-
-/* Read member of the thread descriptor directly. */
-# define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member)
-
-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */
-# define THREAD_GETMEM_NC(descr, member, idx) \
- ((void)(descr), (THREAD_SELF)->member[idx])
-
-/* Set member of the thread descriptor directly. */
-# define THREAD_SETMEM(descr, member, value) \
- ((void)(descr), (THREAD_SELF)->member = (value))
-
-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */
-# define THREAD_SETMEM_NC(descr, member, idx, value) \
- ((void)(descr), (THREAD_SELF)->member[idx] = (value))
-
-/* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some
- different value to mean unset l_tls_offset. */
-# define NO_TLS_OFFSET -1
+ REGISTER (64, 64, 32 * 8, -sizeof (struct pthread))
+
+/* Access to data in the thread descriptor is easy. */
+#define THREAD_GETMEM(descr, member) \
+ descr->member
+#define THREAD_GETMEM_NC(descr, member, idx) \
+ descr->member[idx]
+#define THREAD_SETMEM(descr, member, value) \
+ descr->member = (value)
+#define THREAD_SETMEM_NC(descr, member, idx, value) \
+ descr->member[idx] = (value)
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c
index b29c57b..6a51e73 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c
@@ -17,8 +17,7 @@
02111-1307 USA. */
/* Value passed to 'clone' for initialization of the thread register. */
-#define TLS_VALUE ((void *) (pd) \
- + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+#define TLS_VALUE (pd + 1)
/* Get the real implementation. */
#include <nptl/sysdeps/pthread/createthread.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4dbd216dc3fedfdafe055f1a14a99cbc7ee88a76
commit 4dbd216dc3fedfdafe055f1a14a99cbc7ee88a76
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 05:04:59 2004 +0000
* sysdeps/unix/sysv/linux/alpha/Makefile [stdlib]: Process
ucontext-offsets.sym.
* sysdeps/unix/sysv/linux/alpha/getcontext.S: New file.
* sysdeps/unix/sysv/linux/alpha/makecontext.S: New file.
* sysdeps/unix/sysv/linux/alpha/setcontext.S: New file.
* sysdeps/unix/sysv/linux/alpha/swapcontext.S: New file.
* sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 3097cc3..37a9214 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -2,6 +2,10 @@ ifeq ($(subdir),posix)
sysdep_routines += oldglob
endif
+ifeq ($(subdir),stdlib)
+gen-as-const-headers += ucontext-offsets.sym
+endif
+
ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
diff --git a/sysdeps/unix/sysv/linux/alpha/getcontext.S b/sysdeps/unix/sysv/linux/alpha/getcontext.S
new file mode 100644
index 0000000..3566890
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getcontext.S
@@ -0,0 +1,186 @@
+/* Save current context.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <ucontext-offsets.h>
+
+/* ??? Should be a better place for this that's asm friendly. */
+#define SIG_BLOCK 1
+
+
+ENTRY (__getcontext)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ bsr $0, __getcontext_x
+ mov $31, $0
+ ret
+
+END(__getcontext)
+weak_alias(__getcontext, getcontext)
+
+
+/* An internal routine used by getcontext and setcontext.
+ The incomming return address register is $0. */
+
+ .align 4
+ .globl __getcontext_x
+ .hidden __getcontext_x
+ .usepv __getcontext_x, no
+
+ cfi_startproc
+ cfi_return_column (64)
+__getcontext_x:
+ cfi_register (64, 0)
+
+ /* Return value of getcontext. $0 is the only register
+ whose value is not preserved. */
+ stq $31, UC_SIGCTX+SC_REGS($16)
+
+ /* Store all registers into the context. */
+ stq $1, UC_SIGCTX+SC_REGS+1*8($16)
+ stq $2, UC_SIGCTX+SC_REGS+2*8($16)
+ stq $3, UC_SIGCTX+SC_REGS+3*8($16)
+ stq $4, UC_SIGCTX+SC_REGS+4*8($16)
+ stq $5, UC_SIGCTX+SC_REGS+5*8($16)
+ stq $6, UC_SIGCTX+SC_REGS+6*8($16)
+ stq $7, UC_SIGCTX+SC_REGS+7*8($16)
+ stq $8, UC_SIGCTX+SC_REGS+8*8($16)
+ stq $9, UC_SIGCTX+SC_REGS+9*8($16)
+ stq $10, UC_SIGCTX+SC_REGS+10*8($16)
+ stq $11, UC_SIGCTX+SC_REGS+11*8($16)
+ stq $12, UC_SIGCTX+SC_REGS+12*8($16)
+ stq $13, UC_SIGCTX+SC_REGS+13*8($16)
+ stq $14, UC_SIGCTX+SC_REGS+14*8($16)
+ stq $15, UC_SIGCTX+SC_REGS+15*8($16)
+ stq $16, UC_SIGCTX+SC_REGS+16*8($16)
+ stq $17, UC_SIGCTX+SC_REGS+17*8($16)
+ stq $18, UC_SIGCTX+SC_REGS+18*8($16)
+ stq $19, UC_SIGCTX+SC_REGS+19*8($16)
+ stq $20, UC_SIGCTX+SC_REGS+20*8($16)
+ stq $21, UC_SIGCTX+SC_REGS+21*8($16)
+ stq $22, UC_SIGCTX+SC_REGS+22*8($16)
+ stq $23, UC_SIGCTX+SC_REGS+23*8($16)
+ stq $24, UC_SIGCTX+SC_REGS+24*8($16)
+ stq $25, UC_SIGCTX+SC_REGS+25*8($16)
+ stq $26, UC_SIGCTX+SC_REGS+26*8($16)
+ stq $27, UC_SIGCTX+SC_REGS+27*8($16)
+ stq $28, UC_SIGCTX+SC_REGS+28*8($16)
+ stq $29, UC_SIGCTX+SC_REGS+29*8($16)
+ stq $30, UC_SIGCTX+SC_REGS+30*8($16)
+ stq $31, UC_SIGCTX+SC_REGS+31*8($16)
+
+ stt $f0, UC_SIGCTX+SC_FPREGS+0*8($16)
+ stt $f1, UC_SIGCTX+SC_FPREGS+1*8($16)
+ stt $f2, UC_SIGCTX+SC_FPREGS+2*8($16)
+ stt $f3, UC_SIGCTX+SC_FPREGS+3*8($16)
+ stt $f4, UC_SIGCTX+SC_FPREGS+4*8($16)
+ stt $f5, UC_SIGCTX+SC_FPREGS+5*8($16)
+ stt $f6, UC_SIGCTX+SC_FPREGS+6*8($16)
+ stt $f7, UC_SIGCTX+SC_FPREGS+7*8($16)
+ stt $f8, UC_SIGCTX+SC_FPREGS+8*8($16)
+ stt $f9, UC_SIGCTX+SC_FPREGS+9*8($16)
+ stt $f10, UC_SIGCTX+SC_FPREGS+10*8($16)
+ stt $f11, UC_SIGCTX+SC_FPREGS+11*8($16)
+ stt $f12, UC_SIGCTX+SC_FPREGS+12*8($16)
+ stt $f13, UC_SIGCTX+SC_FPREGS+13*8($16)
+ stt $f14, UC_SIGCTX+SC_FPREGS+14*8($16)
+ stt $f15, UC_SIGCTX+SC_FPREGS+15*8($16)
+ stt $f16, UC_SIGCTX+SC_FPREGS+16*8($16)
+ stt $f17, UC_SIGCTX+SC_FPREGS+17*8($16)
+ stt $f18, UC_SIGCTX+SC_FPREGS+18*8($16)
+ stt $f19, UC_SIGCTX+SC_FPREGS+19*8($16)
+ stt $f20, UC_SIGCTX+SC_FPREGS+20*8($16)
+ stt $f21, UC_SIGCTX+SC_FPREGS+21*8($16)
+ stt $f22, UC_SIGCTX+SC_FPREGS+22*8($16)
+ stt $f23, UC_SIGCTX+SC_FPREGS+23*8($16)
+ stt $f24, UC_SIGCTX+SC_FPREGS+24*8($16)
+ stt $f25, UC_SIGCTX+SC_FPREGS+25*8($16)
+ stt $f26, UC_SIGCTX+SC_FPREGS+26*8($16)
+ stt $f27, UC_SIGCTX+SC_FPREGS+27*8($16)
+ stt $f28, UC_SIGCTX+SC_FPREGS+28*8($16)
+ stt $f29, UC_SIGCTX+SC_FPREGS+29*8($16)
+ stt $f30, UC_SIGCTX+SC_FPREGS+30*8($16)
+ stt $f31, UC_SIGCTX+SC_FPREGS+31*8($16)
+
+ mf_fpcr $f0
+ lda $1, 8
+ stt $f0, UC_SIGCTX+SC_FPCR($16)
+
+ /* The return address of getcontext is the restart pc. */
+ stq $26, UC_SIGCTX+SC_PC($16)
+
+ /* Userlevel always has a processor status word of 8. */
+ stq $1, UC_SIGCTX+SC_PS($16)
+
+ /* Save registers around the syscall. We preserve $17
+ for the benefit of swapcontext. */
+ subq $30, 4*8, $30
+ cfi_adjust_cfa_offset(4*8)
+ stq $0, 0($30)
+ cfi_rel_offset(64, 0)
+ stq $16, 8($30)
+ stq $17, 16($30)
+
+ /* Save the current signal mask. Whee, there are three
+ copies of this in the alpha ucontext_t. */
+ lda $16, SIG_BLOCK
+ lda $17, 0
+ lda $0, __NR_osf_sigprocmask
+ callsys
+
+ ldq $16, 8($30)
+ ldq $17, 16($30)
+
+ stq $0, UC_OSF_SIGMASK($16)
+ stq $0, UC_SIGCTX+SC_MASK($16)
+ stq $0, UC_SIGMASK($16)
+ stq $31, UC_SIGMASK + 1*8($16)
+ stq $31, UC_SIGMASK + 2*8($16)
+ stq $31, UC_SIGMASK + 3*8($16)
+ stq $31, UC_SIGMASK + 4*8($16)
+ stq $31, UC_SIGMASK + 5*8($16)
+ stq $31, UC_SIGMASK + 6*8($16)
+ stq $31, UC_SIGMASK + 7*8($16)
+ stq $31, UC_SIGMASK + 8*8($16)
+ stq $31, UC_SIGMASK + 9*8($16)
+ stq $31, UC_SIGMASK +10*8($16)
+ stq $31, UC_SIGMASK +11*8($16)
+ stq $31, UC_SIGMASK +12*8($16)
+ stq $31, UC_SIGMASK +13*8($16)
+ stq $31, UC_SIGMASK +14*8($16)
+ stq $31, UC_SIGMASK +15*8($16)
+
+ ldq $0, 0($30)
+ addq $30, 4*8, $30
+ cfi_register (64, 0)
+ cfi_adjust_cfa_offset(-4*8)
+ ret $31, ($0), 1
+
+ cfi_endproc
+ .size __getcontext_x, .-__getcontext_x
+ .type __getcontext_x, @function
diff --git a/sysdeps/unix/sysv/linux/alpha/makecontext.S b/sysdeps/unix/sysv/linux/alpha/makecontext.S
new file mode 100644
index 0000000..223117e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/makecontext.S
@@ -0,0 +1,164 @@
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <ucontext-offsets.h>
+
+
+ENTRY(__makecontext)
+ ldgp $29, 0($27)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ /* Compute top of stack, including arguments. */
+ ldq $1, UC_STACK+SS_SP($16)
+ ldq $2, UC_STACK+SS_SIZE($16)
+ addq $1, $2, $8
+ subq $18, 6, $1
+ cmovlt $1, 0, $1
+ s8addq $1, 0, $2
+ subq $8, $2, $8
+
+ /* Copy all parameters. Switch statement header here. */
+ ldah $3, $jumptable($29) !gprelhigh
+ cmple $18, 6, $1
+ mov $18, $2
+ cmoveq $1, 7, $2
+ s4addq $2, $3, $3
+ ldl $4, $jumptable($3) !gprellow
+ addq $4, $29, $4
+ jmp $31, ($4), $args1
+
+ .section .rodata
+ .align 2
+$jumptable:
+ .gprel32 $args0
+ .gprel32 $args1
+ .gprel32 $args2
+ .gprel32 $args3
+ .gprel32 $args4
+ .gprel32 $args5
+ .gprel32 $args6
+ .gprel32 $argsN
+ .text
+
+ /* Here we process arguments 7 through N. This is a straight
+ stack-to-stack copy. */
+ .align 4
+$argsN:
+ subq $18, 6, $1
+ lda $2, 0($8)
+ lda $3, 3*8($30)
+ .align 4
+1:
+ ldq $0, 0($3)
+ subq $1, 1, $1
+ lda $3, 8($3)
+ stq $0, 0($2)
+ lda $2, 8($2)
+ bne $1, 1b
+
+ /* Here we process arguments 6 through 0. This involves
+ copying into the register save areas of the ucontext. */
+ .align 4
+$args6:
+ ldq $0, 2*8($30)
+ stq $0, UC_SIGCTX+SC_REGS+21*8($16)
+ unop
+ stq $0, UC_SIGCTX+SC_FPREGS+21*8($16)
+$args5:
+ ldq $0, 1*8($30)
+ stq $0, UC_SIGCTX+SC_REGS+20*8($16)
+ unop
+ stq $0, UC_SIGCTX+SC_FPREGS+20*8($16)
+$args4:
+ ldq $0, 0*8($30)
+ stq $0, UC_SIGCTX+SC_REGS+19*8($16)
+ unop
+ stq $0, UC_SIGCTX+SC_FPREGS+19*8($16)
+$args3:
+ unop
+ stq $21, UC_SIGCTX+SC_REGS+18*8($16)
+ unop
+ stt $f21, UC_SIGCTX+SC_FPREGS+18*8($16)
+$args2:
+ unop
+ stq $20, UC_SIGCTX+SC_REGS+17*8($16)
+ unop
+ stt $f20, UC_SIGCTX+SC_FPREGS+17*8($16)
+$args1:
+ unop
+ stq $19, UC_SIGCTX+SC_REGS+16*8($16)
+ unop
+ stt $f19, UC_SIGCTX+SC_FPREGS+16*8($16)
+$args0:
+
+ /* Set up the registers ready to invoke __startcontext.
+ We seed $27 with the target function address, and $9
+ with the link from ucp. */
+ ldah $0, __startcontext($29) !gprelhigh
+ ldq $1, UC_LINK($16)
+ lda $0, __startcontext($0) !gprellow
+ stq $17, UC_SIGCTX+SC_REGS+27*8($16)
+ stq $8, UC_SIGCTX+SC_REGS+30*8($16)
+ stq $0, UC_SIGCTX+SC_PC($16)
+ stq $1, UC_SIGCTX+SC_REGS+9*8($16)
+
+ /* No return value from makecontext. */
+ ret
+
+END(__makecontext)
+weak_alias (__makecontext, makecontext)
+
+/* This function is where a new makecontext "thread" begins life.
+ We have already set up $27 for calling the target function, and
+ we've set $9 to the UC_LINK of the parent context.
+
+ If the function returns, we either jump to the linked context
+ (if non-null) or exit. */
+
+ .align 4
+ .ent __startcontext
+__startcontext:
+ .frame $31, 0, $31, 0
+ .prologue 0
+
+ jsr $26, ($27), 0
+ ldgp $29, 0($26)
+ mov $9, $16
+ beq $9, 1f
+
+#ifdef PIC
+ bsr $26, __setcontext !samegp
+1: mov $31, $16
+ bsr $26, HIDDEN_JUMPTARGET(exit) !samegp
+#else
+ jsr $26, __setcontext
+ ldgp $29, 0($26)
+1: mov $31, $16
+ jsr $26, HIDDEN_JUMPTARGET(exit)
+#endif
+
+ halt
+
+ .end __startcontext
diff --git a/sysdeps/unix/sysv/linux/alpha/setcontext.S b/sysdeps/unix/sysv/linux/alpha/setcontext.S
new file mode 100644
index 0000000..7d443d4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setcontext.S
@@ -0,0 +1,35 @@
+/* Install given context.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <ucontext-offsets.h>
+
+
+/* In case the user fiddled it, copy the "official" signal mask
+ from the ucontext_t into the sigcontext structure. */
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS \
+ ldq $0, UC_SIGMASK($16); \
+ stq $0, UC_SIGCTX+SC_MASK($16); \
+ lda $16, UC_SIGCTX($16);
+
+PSEUDO(__setcontext, sigreturn, 1)
+ ret
+PSEUDO_END(__setcontext)
+weak_alias(__setcontext, setcontext)
diff --git a/sysdeps/unix/sysv/linux/alpha/swapcontext.S b/sysdeps/unix/sysv/linux/alpha/swapcontext.S
new file mode 100644
index 0000000..5f6615e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/swapcontext.S
@@ -0,0 +1,51 @@
+/* Save current context and install the given one.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <ucontext-offsets.h>
+
+ENTRY(__swapcontext)
+
+#ifdef PROF
+ ldgp $29, 0($27)
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+ .prologue 1
+#elif defined PIC
+ .prologue 0
+#else
+ ldgp $29, 0($27)
+ .prologue 1
+#endif
+
+#ifdef PIC
+ unop
+ bsr $0, __getcontext_x !samegp
+ mov $17, $16
+ br $31, __setcontext !samegp
+#else
+ jsr $0, __getcontext_x
+ mov $17, $16
+ jmp $31, __setcontext
+#endif
+
+END(__swapcontext)
+weak_alias(__swapcontext, swapcontext)
diff --git a/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym b/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym
new file mode 100644
index 0000000..f95ff75
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym
@@ -0,0 +1,18 @@
+#include <stddef.h>
+#include <sys/ucontext.h>
+
+--
+UC_LINK offsetof (ucontext_t, uc_link)
+UC_OSF_SIGMASK offsetof (ucontext_t, __uc_osf_sigmask)
+UC_STACK offsetof (ucontext_t, uc_stack)
+UC_SIGCTX offsetof (ucontext_t, uc_mcontext)
+UC_SIGMASK offsetof (ucontext_t, uc_sigmask)
+SC_REGS offsetof (struct sigcontext, sc_regs)
+SC_FPREGS offsetof (struct sigcontext, sc_fpregs)
+SC_PC offsetof (struct sigcontext, sc_pc)
+SC_PS offsetof (struct sigcontext, sc_ps)
+SC_FPCRS offsetof (struct sigcontext, sc_fpcr)
+SC_MASK offsetof (struct sigcontext, sc_mask)
+SC_FPCR offsetof (struct sigcontext, sc_fpcr)
+SS_SP offsetof (stack_t, ss_sp)
+SS_SIZE offsetof (stack_t, ss_size)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83c784e84cc90cdcceaa7e4e32d863ca8619c7ee
commit 83c784e84cc90cdcceaa7e4e32d863ca8619c7ee
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jan 16 04:59:55 2004 +0000
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Prefix stubs with
__syscall_, move nop inside, adjust users by +4.
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index aad988b..e27949f 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -26,7 +26,6 @@
This just about halves signal delivery time. */
-#ifdef __NR_rt_sigaction
.text
ENTRY(__syscall_rt_sigaction)
@@ -42,12 +41,20 @@ ENTRY(__syscall_rt_sigaction)
beq a1, 0f
ldl t0, 8(a1) # sa_flags
- ldah a4, sigreturn(gp) !gprelhigh
- ldah t1, rt_sigreturn(gp) !gprelhigh
- lda a4, sigreturn(a4) !gprellow
- lda t1, rt_sigreturn(t1) !gprellow
- and t0, 0x00000040, t0 # SA_SIGINFO
+
+ /* The unwinder will subtract one from the return address when
+ attempting to find the call instruction that led us here.
+ Since we didn't get here via a normal call, if we do nothing
+ we would pick up the wrong symbol and the wrong FDE. Account
+ for this by adding a nop to the start of the function and
+ then skipping it here by adding 4. */
+ ldah a4, __syscall_sigreturn+4(gp) !gprelhigh
+ ldah t1, __syscall_rt_sigreturn+4(gp) !gprelhigh
+ lda a4, __syscall_sigreturn+4(a4) !gprellow
+ lda t1, __syscall_rt_sigreturn+4(t1) !gprellow
+ and t0, 0x40, t0 # SA_SIGINFO
cmovne t0, t1, a4
+
0: ldi v0, __NR_rt_sigaction
callsys
bne a3, SYSCALL_ERROR_LABEL
@@ -57,10 +64,10 @@ PSEUDO_END(__syscall_rt_sigaction)
/* To enable unwinding through the signal frame without special hackery
elsewhere, describe the entire struct sigcontext with unwind info.
- Note that we begin the unwind info one instruction before the start
- of the function; the unwinder will subtract one from the return address
- attempting to find the call instruction that led us here, since we
- didn't get here via a normal call. */
+
+ In order to minimize the size of the encoding, we set the CFA to the
+ end of the sigcontext, which makes all of the registers have small
+ negative offsets from that. */
.macro SIGCONTEXT_REGS_I base, from=0
cfi_offset (\from, \base + (4 + \from) * 8)
@@ -91,34 +98,23 @@ PSEUDO_END(__syscall_rt_sigaction)
cfi_startproc
cfi_return_column (64)
SIGCONTEXT_REGS -648
+
cfi_def_cfa_offset (648)
+__syscall_sigreturn:
nop
-sigreturn:
mov sp, a0
ldi v0, __NR_sigreturn
callsys
- cfi_endproc
- .size sigreturn, .-sigreturn
- .type sigreturn, @function
+ .size __syscall_sigreturn, .-__syscall_sigreturn
+ .type __syscall_sigreturn, @function
- cfi_startproc
- cfi_return_column (64)
- SIGCONTEXT_REGS -648
cfi_def_cfa_offset (176 + 648)
+__syscall_rt_sigreturn:
nop
-rt_sigreturn:
mov sp,a0
ldi v0,__NR_rt_sigreturn
callsys
- cfi_endproc
- .size rt_sigreturn, .-rt_sigreturn
- .type rt_sigreturn, @function
+ .size __syscall_rt_sigreturn, .-__syscall_rt_sigreturn
+ .type __syscall_rt_sigreturn, @function
-#else
-ENTRY(__syscall_rt_sigaction)
- ldgp $29,0($27)
- .prologue 1
- ldi $0,ENOSYS
- SYSCALL_ERROR_HANDLER
-END(__syscall_rt_sigaction)
-#endif
+ cfi_endproc
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df6e7e29ebcd57b6a6b856b2761e712fa38d5303
commit df6e7e29ebcd57b6a6b856b2761e712fa38d5303
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jan 13 20:47:01 2004 +0000
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix typo.
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 3e02a66..aad988b 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@cygnus.com>, 1998
@@ -45,7 +45,7 @@ ENTRY(__syscall_rt_sigaction)
ldah a4, sigreturn(gp) !gprelhigh
ldah t1, rt_sigreturn(gp) !gprelhigh
lda a4, sigreturn(a4) !gprellow
- lda t1, rt_sigreturn(a4) !gprellow
+ lda t1, rt_sigreturn(t1) !gprellow
and t0, 0x00000040, t0 # SA_SIGINFO
cmovne t0, t1, a4
0: ldi v0, __NR_rt_sigaction
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b17d80b12f30adecf0eb60fc8e9025b4bbb0980f
commit b17d80b12f30adecf0eb60fc8e9025b4bbb0980f
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jan 13 09:36:22 2004 +0000
* sysdeps/alpha/Makefile: New file.
* sysdeps/alpha/tcb-offsets.sym: New file.
* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
on powerpc version.
diff --git a/sysdeps/alpha/nptl/Makefile b/sysdeps/alpha/nptl/Makefile
new file mode 100644
index 0000000..88c106b
--- /dev/null
+++ b/sysdeps/alpha/nptl/Makefile
@@ -0,0 +1,21 @@
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+ifeq ($(subdir),csu)
+gen-as-const-headers += tcb-offsets.sym
+endif
diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym
new file mode 100644
index 0000000..3f6433d
--- /dev/null
+++ b/sysdeps/alpha/nptl/tcb-offsets.sym
@@ -0,0 +1,12 @@
+#include <sysdep.h>
+#include <tls.h>
+
+--
+
+-- Abuse tls.h macros to derive offsets relative to the thread register.
+# define __builtin_thread_pointer() ((void *) 0)
+# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
+
+#if TLS_MULTIPLE_THREADS_IN_TCB
+MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index cc054f9..9d125e0 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -23,6 +23,7 @@
#include <sys/param.h>
#include <bits/pthreadtypes.h>
#include <atomic.h>
+#include <sysdep.h>
#define __NR_futex 394
@@ -70,79 +71,68 @@
INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
-/* Set *futex to 1 if it is 0, atomically. Returns the old value */
-#define __lll_trylock(futex) \
- ({ int __oldval, __temp; \
- __asm __volatile ( \
- "1: ldl_l %[__oldval], %[__mem]\n" \
- " lda %[__temp], 1\n" \
- " bne %[__oldval], 2f\n" \
- " stl_c %[__temp], %[__mem]\n" \
- " beq %[__temp], 1b\n" \
- __MB \
- "2:" \
- : [__oldval] "=&r" (__oldval), \
- [__temp] "=&r" (__temp) \
- : [__mem] "m" (*(futex)) \
- : "memory"); \
- __oldval; \
- })
-#define lll_mutex_trylock(lock) __lll_trylock (&(lock))
+static inline int __attribute__((always_inline))
+__lll_mutex_trylock(int *futex)
+{
+ return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
+}
+#define lll_mutex_trylock(lock) __lll_mutex_trylock (&(lock))
-extern void __lll_lock_wait (int *futex, int val) attribute_hidden;
+extern void __lll_lock_wait (int *futex) attribute_hidden;
-#define lll_mutex_lock(lock) \
- (void) ({ \
- int *__futex = &(lock); \
- int __val = atomic_exchange_and_add (__futex, 1); \
- atomic_full_barrier(); \
- if (__builtin_expect (__val != 0, 0)) \
- __lll_lock_wait (__futex, __val); \
- })
+static inline void __attribute__((always_inline))
+__lll_mutex_lock(int *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_lock(futex) __lll_mutex_lock (&(futex))
-#define lll_mutex_cond_lock(lock) \
- (void) ({ \
- int *__futex = &(lock); \
- int __val = atomic_exchange_and_add (__futex, 2); \
- atomic_full_barrier(); \
- if (__builtin_expect (__val != 0, 0)) \
- /* Note, the val + 1 is kind of ugly here. __lll_lock_wait will \
- add 1 again. But we added 2 to the futex value so this is the \
- right value which will be passed to the kernel. */ \
- __lll_lock_wait (__futex, __val + 1); \
- })
-extern int __lll_timedlock_wait
- (int *futex, int val, const struct timespec *) attribute_hidden;
+static inline void __attribute__ ((always_inline))
+__lll_mutex_cond_lock (int *futex)
+{
+ if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
+ __lll_lock_wait (futex);
+}
+#define lll_mutex_cond_lock(futex) __lll_mutex_cond_lock (&(futex))
-#define lll_mutex_timedlock(lock, abstime) \
- ({ int *__futex = &(lock); \
- int __val = atomic_exchange_and_add (__futex, 1); \
- atomic_full_barrier(); \
- if (__builtin_expect (__val != 0, 0)) \
- __val = __lll_timedlock_wait (__futex, __val, (abstime)); \
- __val; \
- })
-#define lll_mutex_unlock(lock) \
- ((void) ({ \
- int *__futex = &(lock), __val; \
- atomic_write_barrier(); \
- __val = atomic_exchange_rel (__futex, 0); \
- if (__builtin_expect (__val > 1, 0)) \
- lll_futex_wake (__futex, 1); \
- }))
-
-#define lll_mutex_unlock_force(lock) \
- ((void) ({ \
- int *__futex = &(lock); \
- atomic_write_barrier(); \
- *__futex = 0; \
- atomic_full_barrier(); \
- lll_futex_wake (__futex, 1); \
- }))
+extern int __lll_timedlock_wait (int *futex, const struct timespec *)
+ attribute_hidden;
+
+static inline int __attribute__ ((always_inline))
+__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
+{
+ int result = 0;
+ if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
+ result = __lll_timedlock_wait (futex, abstime);
+ return result;
+}
+#define lll_mutex_timedlock(futex, abstime) \
+ __lll_mutex_timedlock (&(futex), abstime)
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock (int *futex)
+{
+ int val = atomic_exchange_rel (futex, 0);
+ if (__builtin_expect (val > 1, 0))
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock(futex) __lll_mutex_unlock(&(futex))
+
+
+static inline void __attribute__ ((always_inline))
+__lll_mutex_unlock_force (int *futex)
+{
+ (void) atomic_exchange_rel (futex, 0);
+ lll_futex_wake (futex, 1);
+}
+#define lll_mutex_unlock_force(futex) __lll_mutex_unlock_force(&(futex))
+
#define lll_mutex_islocked(futex) \
(futex != 0)
@@ -175,21 +165,21 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
thread ID while the clone is running and is reset to zero
afterwards. */
#define lll_wait_tid(tid) \
- do { \
- __typeof (tid) __tid; \
- while ((__tid = (tid)) != 0) \
- lll_futex_wait (&(tid), __tid); \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid); \
} while (0)
extern int __lll_timedwait_tid (int *, const struct timespec *)
attribute_hidden;
#define lll_timedwait_tid(tid, abstime) \
- ({ \
- int __res = 0; \
- if ((tid) != 0) \
- __res = __lll_timedwait_tid (&(tid), (abstime)); \
- __res; \
+ ({ \
+ int __res = 0; \
+ if ((tid) != 0) \
+ __res = __lll_timedwait_tid (&(tid), (abstime)); \
+ __res; \
})
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index 1b27e27..3b08b22 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -132,26 +132,28 @@ __LABEL($syscall_error) \
# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
# endif
-# if defined IS_IN_libpthread || !defined NOT_IN_libc
-# ifndef __ASSEMBLER__
+#endif
+
+#if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
extern int __local_multiple_threads attribute_hidden;
-# define SINGLE_THREAD_P \
+# define SINGLE_THREAD_P \
__builtin_expect (__local_multiple_threads == 0, 1)
-# elif defined(PIC)
-# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
-# else
-# define SINGLE_THREAD_P(reg) \
+# elif defined(PIC)
+# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
+# else
+# define SINGLE_THREAD_P(reg) \
ldah reg, __local_multiple_threads(gp) !gprelhigh; \
ldl reg, __local_multiple_threads(reg) !gprellow
-# endif
-# else
-# ifndef __ASSEMBLER__
-# define SINGLE_THREAD_P \
+# endif
+#else
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
header.multiple_threads) == 0, 1)
-# else
-# error Not done
-# endif
+# else
+# define SINGLE_THREAD_P(reg) \
+ call_pal PAL_rduniq; \
+ ldl reg, MULTIPLE_THREADS_OFFSET($0)
# endif
-
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfbf1a2f78fcc1f3184eb2a5ea905075cde6988b
commit cfbf1a2f78fcc1f3184eb2a5ea905075cde6988b
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jan 13 09:15:58 2004 +0000
* sysdeps/alpha/bits/atomic.h (__arch_compare_and_exchange_xxx_8_int):
Cast old up to uint64_t before back down to inner width.
(__arch_compare_and_exchange_xxx_16_int): Likewise.
(__arch_compare_and_exchange_xxx_32_int): Likewise.
(__arch_compare_and_exchange_xxx_64_int): Likewise.
(__arch_compare_and_exchange_val_8_int): Cast result to
the type of the memory.
(__arch_compare_and_exchange_val_16_int): Likewise.
(__arch_compare_and_exchange_val_32_int): Likewise.
(__arch_compare_and_exchange_val_64_int): Likewise.
(atomic_compare_and_exchange_bool_acq): Use __atomic_bool_bysize.
(atomic_compare_and_exchange_bool_rel): Likewise.
* sysdeps/unix/alpha/sysdep.h: Select inline_syscall_r0_asm
based on HAVE___THREAD instead of USE_TLS.
* sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIMEX32): New.
(__adjtimex_tv64): Use it.
* sysdeps/unix/sysv/linux/alpha/semctl.c (__new_semctl): Cast
to void* rather than directly to the compatibility structure type.
* sysdeps/unix/sysv/linux/alpha/shmctl.c (__new_shmctl): Likewise.
* sysdeps/unix/sysv/linux/alpha/sigaction.c (struct kernel_sigaction):
Forward declare.
diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h
index 073e650..36a740c 100644
--- a/sysdeps/alpha/bits/atomic.h
+++ b/sysdeps/alpha/bits/atomic.h
@@ -78,7 +78,7 @@ typedef uintmax_t uatomic_max_t;
[__cmp] "=&r" (__cmp), \
[__addr64] "=&r" (__addr64) \
: [__addr8] "r" (mem), \
- [__old] "Ir" ((uint64_t)(uint8_t)(old)), \
+ [__old] "Ir" ((uint64_t)(uint8_t)(uint64_t)(old)), \
[__new] "r" (new) \
: "memory"); \
})
@@ -106,7 +106,7 @@ typedef uintmax_t uatomic_max_t;
[__cmp] "=&r" (__cmp), \
[__addr64] "=&r" (__addr64) \
: [__addr16] "r" (mem), \
- [__old] "Ir" ((uint64_t)(uint16_t)(old)), \
+ [__old] "Ir" ((uint64_t)(uint16_t)(uint64_t)(old)), \
[__new] "r" (new) \
: "memory"); \
})
@@ -126,7 +126,7 @@ typedef uintmax_t uatomic_max_t;
: [__prev] "=&r" (__prev), \
[__cmp] "=&r" (__cmp) \
: [__mem] "m" (*(mem)), \
- [__old] "Ir" ((uint64_t)(atomic32_t)(old)), \
+ [__old] "Ir" ((uint64_t)(atomic32_t)(uint64_t)(old)), \
[__new] "Ir" (new) \
: "memory"); \
})
@@ -146,7 +146,7 @@ typedef uintmax_t uatomic_max_t;
: [__prev] "=&r" (__prev), \
[__cmp] "=&r" (__cmp) \
: [__mem] "m" (*(mem)), \
- [__old] "Ir" (old), \
+ [__old] "Ir" ((uint64_t)(old)), \
[__new] "Ir" (new) \
: "memory"); \
})
@@ -179,28 +179,28 @@ typedef uintmax_t uatomic_max_t;
#define __arch_compare_and_exchange_val_8_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \
- __prev; })
+ (typeof (*mem))__prev; })
#define __arch_compare_and_exchange_val_16_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \
- __prev; })
+ (typeof (*mem))__prev; })
#define __arch_compare_and_exchange_val_32_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \
- __prev; })
+ (typeof (*mem))__prev; })
#define __arch_compare_and_exchange_val_64_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \
- __prev; })
+ (typeof (*mem))__prev; })
/* Compare and exchange with "acquire" semantics, ie barrier after. */
#define atomic_compare_and_exchange_bool_acq(mem, new, old) \
- __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \
- mem, new, old, "", __MB)
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, "", __MB)
#define atomic_compare_and_exchange_val_acq(mem, new, old) \
__atomic_val_bysize (__arch_compare_and_exchange_val, int, \
@@ -209,8 +209,8 @@ typedef uintmax_t uatomic_max_t;
/* Compare and exchange with "release" semantics, ie barrier before. */
#define atomic_compare_and_exchange_bool_rel(mem, new, old) \
- __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \
- mem, new, old, __MB, "")
+ __atomic_bool_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, __MB, "")
#define atomic_compare_and_exchange_val_rel(mem, new, old) \
__atomic_val_bysize (__arch_compare_and_exchange_val, int, \
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 515b93a..7979822 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -61,10 +61,34 @@ typedef double double_t;
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN (2147483647)
-#endif /* ISO C99 */
+#endif /* ISO C99 && MATH_H */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1
#endif
+
+#if defined _COMPLEX_H && !defined _COMPLEX_H_MATHDEF
+# define _COMPLEX_H_MATHDEF 1
+# if defined(__GNUC__) && !__GNUC_PREREQ(3,4)
+
+/* Due to an ABI change, we need to remap the complex float symbols. */
+# define _Mdouble_ float
+# define __MATHCALL(function, args) \
+ __MATHDECL (_Complex float, function, args)
+# define __MATHDECL(type, function, args) \
+ __MATHDECL_1(type, function##f, args, __c1_##function##f); \
+ __MATHDECL_1(type, __##function##f, args, __c1_##function##f)
+# define __MATHDECL_1(type, function, args, alias) \
+ extern type function args __asm__(#alias) __THROW
+
+# include <bits/cmathcalls.h>
+
+# undef _Mdouble_
+# undef __MATHCALL
+# undef __MATHDECL
+# undef __MATHDECL_1
+
+# endif /* GNUC before 3.4 */
+#endif /* COMPLEX_H */
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index f12edef..26cf918 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -205,7 +205,7 @@ __LABEL(name) \
output. We don't do this unconditionally to allow compilation with
older compilers. */
-#ifdef USE_TLS
+#ifdef HAVE___THREAD
#define inline_syscall_r0_asm
#define inline_syscall_r0_out_constraint "=v"
#else
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index 69f63d4..e036896 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -60,6 +60,7 @@ struct timex32 {
#define TIMEX timex32
#define ADJTIME __adjtime_tv32
#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x)
+#define ADJTIMEX32(x) INLINE_SYSCALL (old_adjtimex, 1, x)
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
#define LINKAGE
#else
@@ -180,7 +181,7 @@ __adjtimex_tv64 (struct timex *tx)
tx32.errcnt = tx->errcnt;
tx32.stbcnt = tx->stbcnt;
- ret = __adjtimex_tv32 (&tx32);
+ ret = ADJTIMEX32 (&tx32);
if (ret == 0)
{
tx->modes = tx32.modes;
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 224baf3..6925c3f 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -97,7 +97,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
__set_errno(save_errno);
buf = arg.buf;
- arg.buf = (struct semid_ds *)&old;
+ arg.buf = (void *)&old;
if (cmd == IPC_SET)
{
old.sem_perm.uid = buf->sem_perm.uid;
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index 7dec3a7..4a9d944 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -116,7 +116,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
}
else if (result != -1 && cmd == IPC_INFO)
{
- struct __old_shminfo *oldi = (struct __old_shminfo *)&old;
+ struct __old_shminfo *oldi = (void *)&old;
struct shminfo *i = (struct shminfo *)buf;
memset(i, 0, sizeof(*i));
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c
index 952ee40..21a2063 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigaction.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c
@@ -30,6 +30,7 @@
? __syscall_rt_sigaction(args) \
: INLINE_SYSCALL1(name, nr, args))
+struct kernel_sigaction;
extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
struct kernel_sigaction *__unbounded, size_t);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e42ca8f27b2f68290efae534c29be58781822d9
commit 9e42ca8f27b2f68290efae534c29be58781822d9
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jan 13 09:08:04 2004 +0000
* Versions.def (libm): Add GLIBC_2.3.3.
* sysdeps/alpha/fpu/Versions: Add __c1_c*f and c*f to GLIBC_2.3.3.
* sysdeps/alpha/fpu/cabsf.c, sysdeps/alpha/fpu/cargf.c,
sysdeps/alpha/fpu/cfloat-compat.h, sysdeps/alpha/fpu/cimagf.c,
sysdeps/alpha/fpu/conjf.c, sysdeps/alpha/fpu/crealf.c,
sysdeps/alpha/fpu/s_cacosf.c, sysdeps/alpha/fpu/s_cacoshf.c,
sysdeps/alpha/fpu/s_casinf.c, sysdeps/alpha/fpu/s_casinhf.c,
sysdeps/alpha/fpu/s_catanf.c, sysdeps/alpha/fpu/s_catanhf.c,
sysdeps/alpha/fpu/s_ccosf.c, sysdeps/alpha/fpu/s_ccoshf.c,
sysdeps/alpha/fpu/s_cexpf.c, sysdeps/alpha/fpu/s_clog10f.c,
sysdeps/alpha/fpu/s_clogf.c, sysdeps/alpha/fpu/s_cpowf.c,
sysdeps/alpha/fpu/s_cprojf.c, sysdeps/alpha/fpu/s_csinf.c,
sysdeps/alpha/fpu/s_csinhf.c, sysdeps/alpha/fpu/s_csqrtf.c,
sysdeps/alpha/fpu/s_ctanf.c, sysdeps/alpha/fpu/s_ctanhf.c: New files.
* sysdeps/alpha/fpu/bits/mathdef.h: Rename complex float
functions for gcc 3.3.
* sysdeps/generic/s_cacosf.c, sysdeps/generic/s_cacoshf.c,
sysdeps/generic/s_casinf.c, sysdeps/generic/s_casinhf.c,
sysdeps/generic/s_catanf.c, sysdeps/generic/s_catanhf.c,
sysdeps/generic/s_ccosf.c, sysdeps/generic/s_ccoshf.c,
sysdeps/generic/s_cexpf.c, sysdeps/generic/s_clog10f.c,
sysdeps/generic/s_clogf.c, sysdeps/generic/s_cpowf.c,
sysdeps/generic/s_cprojf.c, sysdeps/generic/s_csinf.c,
sysdeps/generic/s_csinhf.c, sysdeps/generic/s_csqrtf.c,
sysdeps/generic/s_ctanf.c, sysdeps/generic/s_ctanhf.c: Don't
weak_alias if the function name has been #defined.
* math/cabsf.c: Move ...
* sysdeps/generic/cabsf.c: ... here.
* math/cargf.c: Move ...
* sysdeps/generic/cargf.c: ... here.
* math/cimagf.c: Move ...
* sysdeps/generic/cimagf.c: ... here.
* math/conjf.c: Move ...
* sysdeps/generic/conjf.c: ... here.
* math/crealf.c: Move ...
* sysdeps/generic/crealf.c: ... here.
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions
index fa3d810..e2925e2 100644
--- a/sysdeps/alpha/fpu/Versions
+++ b/sysdeps/alpha/fpu/Versions
@@ -4,3 +4,20 @@ libc {
__ieee_get_fp_control; __ieee_set_fp_control;
}
}
+libm {
+ GLIBC_2.3.3 {
+ # functions implementing old complex float abi
+ __c1_cabsf; __c1_cacosf; __c1_cacoshf; __c1_cargf; __c1_casinf;
+ __c1_casinhf; __c1_catanf; __c1_catanhf; __c1_ccosf; __c1_ccoshf;
+ __c1_cexpf; __c1_cimagf; __c1_clog10f; __c1_clogf; __c1_conjf;
+ __c1_cpowf; __c1_cprojf; __c1_crealf; __c1_csinf; __c1_csinhf;
+ __c1_csqrtf; __c1_ctanf; __c1_ctanhf;
+
+ # functions implementing new complex float abi
+ cabsf; cacosf; cacoshf; cargf; casinf;
+ casinhf; catanf; catanhf; ccosf; ccoshf;
+ cexpf; cimagf; clog10f; clogf; conjf;
+ cpowf; cprojf; crealf; csinf; csinhf;
+ csqrtf; ctanf; ctanhf;
+ }
+}
diff --git a/sysdeps/alpha/fpu/cabsf.c b/sysdeps/alpha/fpu/cabsf.c
new file mode 100644
index 0000000..de8e6b5
--- /dev/null
+++ b/sysdeps/alpha/fpu/cabsf.c
@@ -0,0 +1,42 @@
+/* Return the complex absolute value of float complex value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cabsf __cabsf_not_defined
+#define cabsf cabsf_not_defined
+
+#include <complex.h>
+#include <math.h>
+#include "cfloat-compat.h"
+
+#undef __cabsf
+#undef cabsf
+
+float
+__c1_cabsf (c1_cfloat_decl (z))
+{
+ return __hypotf (c1_cfloat_real (z), c1_cfloat_imag (z));
+}
+
+float
+__c2_cabsf (c2_cfloat_decl (z))
+{
+ return __hypotf (c2_cfloat_real (z), c2_cfloat_imag (z));
+}
+
+cfloat_versions (cabsf);
diff --git a/sysdeps/alpha/fpu/cargf.c b/sysdeps/alpha/fpu/cargf.c
new file mode 100644
index 0000000..1d96e58
--- /dev/null
+++ b/sysdeps/alpha/fpu/cargf.c
@@ -0,0 +1,42 @@
+/* Compute argument of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cargf __cargf_not_defined
+#define cargf cargf_not_defined
+
+#include <complex.h>
+#include <math.h>
+#include "cfloat-compat.h"
+
+#undef __cargf
+#undef cargf
+
+float
+__c1_cargf (c1_cfloat_decl (x))
+{
+ return __atan2f (c1_cfloat_imag (x), c1_cfloat_real (x));
+}
+
+float
+__c2_cargf (c2_cfloat_decl (x))
+{
+ return __atan2f (c2_cfloat_imag (x), c2_cfloat_real (x));
+}
+
+cfloat_versions (cargf);
diff --git a/sysdeps/alpha/fpu/cfloat-compat.h b/sysdeps/alpha/fpu/cfloat-compat.h
new file mode 100644
index 0000000..cb40f55
--- /dev/null
+++ b/sysdeps/alpha/fpu/cfloat-compat.h
@@ -0,0 +1,74 @@
+/* Compatibility macros for old and new Alpha complex float ABI.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* The behaviour of complex float changed between GCC 3.3 and 3.4.
+
+ In 3.3 and before (below, complex version 1, or "c1"), complex float
+ values were packed into one floating point register.
+
+ In 3.4 and later (below, complex version 2, or "c2"), GCC changed to
+ follow the official Tru64 ABI, which passes the components of a complex
+ as separate parameters. */
+
+#if __GNUC_PREREQ(3,4)
+ typedef union { double d; _Complex float cf; } c1_compat;
+# define c1_cfloat_decl(x) double x
+# define c1_cfloat_real(x) __real__ c1_cfloat_value (x)
+# define c1_cfloat_imag(x) __imag__ c1_cfloat_value (x)
+# define c1_cfloat_value(x) (((c1_compat *)(void *)&x)->cf)
+# define c1_cfloat_rettype double
+# define c1_cfloat_return(x) ({ c1_compat _; _.cf = (x); _.d; })
+# define c2_cfloat_decl(x) _Complex float x
+# define c2_cfloat_real(x) __real__ x
+# define c2_cfloat_imag(x) __imag__ x
+# define c2_cfloat_value(x) x
+# define c2_cfloat_rettype _Complex float
+# define c2_cfloat_return(x) x
+#else
+# define c1_cfloat_decl(x) _Complex float x
+# define c1_cfloat_real(x) __real__ x
+# define c1_cfloat_imag(x) __imag__ x
+# define c1_cfloat_value(x) x
+# define c1_cfloat_rettype _Complex float
+# define c1_cfloat_return(x) x
+# define c2_cfloat_decl(x) float x ## r, float x ## i
+# define c2_cfloat_real(x) x ## r
+# define c2_cfloat_imag(x) x ## i
+# define c2_cfloat_value(x) \
+ ({ _Complex float _; __real__ _ = x##r; __imag__ _ = x##i; _; })
+# define c2_cfloat_rettype double _Complex
+# define c2_cfloat_return(x) x
+#endif
+
+/* Get the proper symbol versions defined for each function. */
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+#define cfloat_versions_compat(func) \
+ compat_symbol (libm, __c1_##func, func, GLIBC_2_1)
+#else
+#define cfloat_versions_compat(func)
+#endif
+
+#define cfloat_versions(func) \
+ cfloat_versions_compat(func); \
+ versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_3); \
+ extern typeof(__c2_##func) __##func attribute_hidden; \
+ strong_alias (__c2_##func, __##func)
diff --git a/sysdeps/alpha/fpu/cimagf.c b/sysdeps/alpha/fpu/cimagf.c
new file mode 100644
index 0000000..a9b351f
--- /dev/null
+++ b/sysdeps/alpha/fpu/cimagf.c
@@ -0,0 +1,41 @@
+/* Return imaginary part of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cimagf __cimagf_not_defined
+#define cimagf cimagf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __cimagf
+#undef cimagf
+
+float
+__c1_cimagf (c1_cfloat_decl (z))
+{
+ return c1_cfloat_imag (z);
+}
+
+float
+__c2_cimagf (c2_cfloat_decl (z))
+{
+ return c2_cfloat_imag (z);
+}
+
+cfloat_versions (cimagf);
diff --git a/sysdeps/alpha/fpu/conjf.c b/sysdeps/alpha/fpu/conjf.c
new file mode 100644
index 0000000..6ff92b9
--- /dev/null
+++ b/sysdeps/alpha/fpu/conjf.c
@@ -0,0 +1,43 @@
+/* Return complex conjugate of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __conjf __conjf_not_defined
+#define conjf conjf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __conjf
+#undef conjf
+
+c1_cfloat_rettype
+__c1_conjf (c1_cfloat_decl (z))
+{
+ _Complex float r = ~ c1_cfloat_value (z);
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_conjf (c2_cfloat_decl (z))
+{
+ _Complex float r = ~ c2_cfloat_value (z);
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (conjf);
diff --git a/sysdeps/alpha/fpu/crealf.c b/sysdeps/alpha/fpu/crealf.c
new file mode 100644
index 0000000..52ab271
--- /dev/null
+++ b/sysdeps/alpha/fpu/crealf.c
@@ -0,0 +1,41 @@
+/* Return real part of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __crealf __crealf_not_defined
+#define crealf crealf_not_defined
+
+#include <complex.h>
+#include "cfloat-compat.h"
+
+#undef __crealf
+#undef crealf
+
+float
+__c1_crealf (c1_cfloat_decl (z))
+{
+ return c1_cfloat_real (z);
+}
+
+float
+__c2_crealf (c2_cfloat_decl (z))
+{
+ return c2_cfloat_real (z);
+}
+
+cfloat_versions (crealf);
diff --git a/sysdeps/alpha/fpu/s_cacosf.c b/sysdeps/alpha/fpu/s_cacosf.c
new file mode 100644
index 0000000..20e67f4
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cacosf.c
@@ -0,0 +1,51 @@
+/* Return arc cosine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cacosf __cacosf_not_defined
+#define cacosf cacosf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cacosf
+#undef cacosf
+#define __cacosf internal_cacosf
+
+static _Complex float internal_cacosf (_Complex float x);
+
+#include <sysdeps/generic/s_cacosf.c>
+#include "cfloat-compat.h"
+
+#undef __cacosf
+
+c1_cfloat_rettype
+__c1_cacosf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_cacosf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cacosf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_cacosf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (cacosf);
diff --git a/sysdeps/alpha/fpu/s_cacoshf.c b/sysdeps/alpha/fpu/s_cacoshf.c
new file mode 100644
index 0000000..86cb4fb
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cacoshf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole cosine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cacoshf __cacoshf_not_defined
+#define cacoshf cacoshf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cacoshf
+#undef cacoshf
+#define __cacoshf internal_cacoshf
+
+static _Complex float internal_cacoshf (_Complex float x);
+
+#include <sysdeps/generic/s_cacoshf.c>
+#include "cfloat-compat.h"
+
+#undef __cacoshf
+
+c1_cfloat_rettype
+__c1_cacoshf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_cacoshf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cacoshf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_cacoshf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (cacoshf);
diff --git a/sysdeps/alpha/fpu/s_casinf.c b/sysdeps/alpha/fpu/s_casinf.c
new file mode 100644
index 0000000..3d0d4ea
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_casinf.c
@@ -0,0 +1,51 @@
+/* Return arc sine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __casinf __casinf_not_defined
+#define casinf casinf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __casinf
+#undef casinf
+#define __casinf internal_casinf
+
+static _Complex float internal_casinf (_Complex float x);
+
+#include <sysdeps/generic/s_casinf.c>
+#include "cfloat-compat.h"
+
+#undef __casinf
+
+c1_cfloat_rettype
+__c1_casinf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_casinf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_casinf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_casinf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (casinf);
diff --git a/sysdeps/alpha/fpu/s_casinhf.c b/sysdeps/alpha/fpu/s_casinhf.c
new file mode 100644
index 0000000..698ce10
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_casinhf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole sine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __casinhf __casinhf_not_defined
+#define casinhf casinhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __casinhf
+#undef casinhf
+#define __casinhf internal_casinhf
+
+static _Complex float internal_casinhf (_Complex float x);
+
+#include <sysdeps/generic/s_casinhf.c>
+#include "cfloat-compat.h"
+
+#undef __casinhf
+
+c1_cfloat_rettype
+__c1_casinhf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_casinhf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_casinhf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_casinhf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (casinhf);
diff --git a/sysdeps/alpha/fpu/s_catanf.c b/sysdeps/alpha/fpu/s_catanf.c
new file mode 100644
index 0000000..221a461
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_catanf.c
@@ -0,0 +1,51 @@
+/* Return arc tangent of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __catanf __catanf_not_defined
+#define catanf catanf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __catanf
+#undef catanf
+#define __catanf internal_catanf
+
+static _Complex float internal_catanf (_Complex float x);
+
+#include <sysdeps/generic/s_catanf.c>
+#include "cfloat-compat.h"
+
+#undef __catanf
+
+c1_cfloat_rettype
+__c1_catanf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_catanf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_catanf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_catanf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (catanf);
diff --git a/sysdeps/alpha/fpu/s_catanhf.c b/sysdeps/alpha/fpu/s_catanhf.c
new file mode 100644
index 0000000..7465a43
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_catanhf.c
@@ -0,0 +1,51 @@
+/* Return arc hyperbole tangent of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __catanhf __catanhf_not_defined
+#define catanhf catanhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __catanhf
+#undef catanhf
+#define __catanhf internal_catanhf
+
+static _Complex float internal_catanhf (_Complex float x);
+
+#include <sysdeps/generic/s_catanhf.c>
+#include "cfloat-compat.h"
+
+#undef __catanhf
+
+c1_cfloat_rettype
+__c1_catanhf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_catanhf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_catanhf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_catanhf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (catanhf);
diff --git a/sysdeps/alpha/fpu/s_ccosf.c b/sysdeps/alpha/fpu/s_ccosf.c
new file mode 100644
index 0000000..fd77590
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ccosf.c
@@ -0,0 +1,51 @@
+/* Return cosine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __ccosf __ccosf_not_defined
+#define ccosf ccosf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ccosf
+#undef ccosf
+#define __ccosf internal_ccosf
+
+static _Complex float internal_ccosf (_Complex float x);
+
+#include <sysdeps/generic/s_ccosf.c>
+#include "cfloat-compat.h"
+
+#undef __ccosf
+
+c1_cfloat_rettype
+__c1_ccosf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_ccosf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ccosf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_ccosf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (ccosf);
diff --git a/sysdeps/alpha/fpu/s_ccoshf.c b/sysdeps/alpha/fpu/s_ccoshf.c
new file mode 100644
index 0000000..0e8eab2
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ccoshf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole cosine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __ccoshf __ccoshf_not_defined
+#define ccoshf ccoshf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ccoshf
+#undef ccoshf
+#define __ccoshf internal_ccoshf
+
+static _Complex float internal_ccoshf (_Complex float x);
+
+#include <sysdeps/generic/s_ccoshf.c>
+#include "cfloat-compat.h"
+
+#undef __ccoshf
+
+c1_cfloat_rettype
+__c1_ccoshf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_ccoshf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ccoshf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_ccoshf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (ccoshf);
diff --git a/sysdeps/alpha/fpu/s_cexpf.c b/sysdeps/alpha/fpu/s_cexpf.c
new file mode 100644
index 0000000..2cf6db4
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cexpf.c
@@ -0,0 +1,51 @@
+/* Return exponent of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cexpf __cexpf_not_defined
+#define cexpf cexpf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cexpf
+#undef cexpf
+#define __cexpf internal_cexpf
+
+static _Complex float internal_cexpf (_Complex float x);
+
+#include <sysdeps/generic/s_cexpf.c>
+#include "cfloat-compat.h"
+
+#undef __cexpf
+
+c1_cfloat_rettype
+__c1_cexpf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_cexpf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cexpf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_cexpf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (cexpf);
diff --git a/sysdeps/alpha/fpu/s_clog10f.c b/sysdeps/alpha/fpu/s_clog10f.c
new file mode 100644
index 0000000..bd60ed1
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_clog10f.c
@@ -0,0 +1,61 @@
+/* Return base 10 logarithm of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __clog10f __clog10f_not_defined
+#define clog10f clog10f_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __clog10f
+#undef clog10f
+#define __clog10f internal_clog10f
+
+static _Complex float internal_clog10f (_Complex float x);
+
+#include <sysdeps/generic/s_clog10f.c>
+#include "cfloat-compat.h"
+
+#undef __clog10f
+
+c1_cfloat_rettype
+__c1_clog10f (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_clog10f (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_clog10f (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_clog10f (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+/* Ug. __clog10f was exported from GLIBC_2.1. This is the only
+ complex function whose double-underscore symbol was exported,
+ so we get to handle that specially. */
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_3)
+strong_alias (__c1_clog10f, __c1_clog10f_2);
+compat_symbol (libm, __c1_clog10f, clog10f, GLIBC_2_1);
+compat_symbol (libm, __c1_clog10f_2, __clog10f, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_3);
+extern typeof(__c2_clog10f) __clog10f attribute_hidden;
+strong_alias (__c2_clog10f, __clog10f)
diff --git a/sysdeps/alpha/fpu/s_clogf.c b/sysdeps/alpha/fpu/s_clogf.c
new file mode 100644
index 0000000..9eefe9f
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_clogf.c
@@ -0,0 +1,51 @@
+/* Return natural logarithm of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __clogf __clogf_not_defined
+#define clogf clogf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __clogf
+#undef clogf
+#define __clogf internal_clogf
+
+static _Complex float internal_clogf (_Complex float x);
+
+#include <sysdeps/generic/s_clogf.c>
+#include "cfloat-compat.h"
+
+#undef __clogf
+
+c1_cfloat_rettype
+__c1_clogf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_clogf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_clogf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_clogf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (clogf);
diff --git a/sysdeps/alpha/fpu/s_cpowf.c b/sysdeps/alpha/fpu/s_cpowf.c
new file mode 100644
index 0000000..f4cb354
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cpowf.c
@@ -0,0 +1,51 @@
+/* Return power of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cpowf __cpowf_not_defined
+#define cpowf cpowf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cpowf
+#undef cpowf
+#define __cpowf internal_cpowf
+
+static _Complex float internal_cpowf (_Complex float x, _Complex float c);
+
+#include <sysdeps/generic/s_cpowf.c>
+#include "cfloat-compat.h"
+
+#undef __cpowf
+
+c1_cfloat_rettype
+__c1_cpowf (c1_cfloat_decl (x), c1_cfloat_decl (c))
+{
+ _Complex float r = internal_cpowf (c1_cfloat_value (x), c1_cfloat_value (c));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cpowf (c2_cfloat_decl (x), c2_cfloat_decl (c))
+{
+ _Complex float r = internal_cpowf (c2_cfloat_value (x), c2_cfloat_value (c));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (cpowf);
diff --git a/sysdeps/alpha/fpu/s_cprojf.c b/sysdeps/alpha/fpu/s_cprojf.c
new file mode 100644
index 0000000..eac8687
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_cprojf.c
@@ -0,0 +1,51 @@
+/* Return projection of complex float value to Riemann sphere.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __cprojf __cprojf_not_defined
+#define cprojf cprojf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __cprojf
+#undef cprojf
+#define __cprojf internal_cprojf
+
+static _Complex float internal_cprojf (_Complex float x);
+
+#include <sysdeps/generic/s_cprojf.c>
+#include "cfloat-compat.h"
+
+#undef __cprojf
+
+c1_cfloat_rettype
+__c1_cprojf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_cprojf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_cprojf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_cprojf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (cprojf);
diff --git a/sysdeps/alpha/fpu/s_csinf.c b/sysdeps/alpha/fpu/s_csinf.c
new file mode 100644
index 0000000..eba70e9
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csinf.c
@@ -0,0 +1,51 @@
+/* Return sine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __csinf __csinf_not_defined
+#define csinf csinf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csinf
+#undef csinf
+#define __csinf internal_csinf
+
+static _Complex float internal_csinf (_Complex float x);
+
+#include <sysdeps/generic/s_csinf.c>
+#include "cfloat-compat.h"
+
+#undef __csinf
+
+c1_cfloat_rettype
+__c1_csinf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_csinf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csinf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_csinf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (csinf);
diff --git a/sysdeps/alpha/fpu/s_csinhf.c b/sysdeps/alpha/fpu/s_csinhf.c
new file mode 100644
index 0000000..9db81a8
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csinhf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole sine of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __csinhf __csinhf_not_defined
+#define csinhf csinhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csinhf
+#undef csinhf
+#define __csinhf internal_csinhf
+
+static _Complex float internal_csinhf (_Complex float x);
+
+#include <sysdeps/generic/s_csinhf.c>
+#include "cfloat-compat.h"
+
+#undef __csinhf
+
+c1_cfloat_rettype
+__c1_csinhf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_csinhf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csinhf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_csinhf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (csinhf);
diff --git a/sysdeps/alpha/fpu/s_csqrtf.c b/sysdeps/alpha/fpu/s_csqrtf.c
new file mode 100644
index 0000000..cc4a8e0
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_csqrtf.c
@@ -0,0 +1,51 @@
+/* Return square root of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __csqrtf __csinhf_not_defined
+#define csqrtf csqrtf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __csqrtf
+#undef csqrtf
+#define __csqrtf internal_csqrtf
+
+static _Complex float internal_csqrtf (_Complex float x);
+
+#include <sysdeps/generic/s_csqrtf.c>
+#include "cfloat-compat.h"
+
+#undef __csqrtf
+
+c1_cfloat_rettype
+__c1_csqrtf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_csqrtf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_csqrtf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_csqrtf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (csqrtf);
diff --git a/sysdeps/alpha/fpu/s_ctanf.c b/sysdeps/alpha/fpu/s_ctanf.c
new file mode 100644
index 0000000..843ee53
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ctanf.c
@@ -0,0 +1,51 @@
+/* Return tangent of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __ctanf __ctanf_not_defined
+#define ctanf ctanf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ctanf
+#undef ctanf
+#define __ctanf internal_ctanf
+
+static _Complex float internal_ctanf (_Complex float x);
+
+#include <sysdeps/generic/s_ctanf.c>
+#include "cfloat-compat.h"
+
+#undef __ctanf
+
+c1_cfloat_rettype
+__c1_ctanf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_ctanf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ctanf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_ctanf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (ctanf);
diff --git a/sysdeps/alpha/fpu/s_ctanhf.c b/sysdeps/alpha/fpu/s_ctanhf.c
new file mode 100644
index 0000000..f1f74ab
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ctanhf.c
@@ -0,0 +1,51 @@
+/* Return hyperbole tangent of complex float value.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define __ctanhf __ctanhf_not_defined
+#define ctanhf ctanhf_not_defined
+
+#include <complex.h>
+#include <math.h>
+
+#undef __ctanhf
+#undef ctanhf
+#define __ctanhf internal_ctanhf
+
+static _Complex float internal_ctanhf (_Complex float x);
+
+#include <sysdeps/generic/s_ctanhf.c>
+#include "cfloat-compat.h"
+
+#undef __ctanhf
+
+c1_cfloat_rettype
+__c1_ctanhf (c1_cfloat_decl (x))
+{
+ _Complex float r = internal_ctanhf (c1_cfloat_value (x));
+ return c1_cfloat_return (r);
+}
+
+c2_cfloat_rettype
+__c2_ctanhf (c2_cfloat_decl (x))
+{
+ _Complex float r = internal_ctanhf (c2_cfloat_value (x));
+ return c2_cfloat_return (r);
+}
+
+cfloat_versions (ctanhf);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1c81c0040a3b23e634de13180e66f40f62d879b
commit b1c81c0040a3b23e634de13180e66f40f62d879b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 6 10:31:07 2004 +0000
2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
* sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
register as second parameter to the REGISTER macro.
* sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
* sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
* sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
* sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
* sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
of thread register as second parameter to REGISTER macro in 64 case.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 8f61bb7..f947fcf 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -120,7 +120,7 @@ typedef struct
/* Magic for libthread_db to know how to do THREAD_SELF. */
# define DB_THREAD_SELF \
- REGISTER (64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+ REGISTER (64, 64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
/* Identifier for the current thread. THREAD_SELF is usable but
sometimes more expensive than necessary as in this case. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=646ae9f22839be9cb74c73fcb5fd97c78ca703be
commit 646ae9f22839be9cb74c73fcb5fd97c78ca703be
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Dec 21 17:31:58 2003 +0000
Avoid matching memory constraints.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
index bbffc52..746dc2e 100644
--- a/sysdeps/m68k/m68020/bits/atomic.h
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -115,7 +115,7 @@ typedef uintmax_t uatomic_max_t;
" jbne 1b" \
: "=d" (__result), "=m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "1" (*(mem)), "0" (__result)); \
+ : "d" (value), "m" (*(mem)), "0" (__result)); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("1: move%.w %0,%2;" \
" add%.w %3,%2;" \
@@ -123,7 +123,7 @@ typedef uintmax_t uatomic_max_t;
" jbne 1b" \
: "=d" (__result), "=m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "1" (*(mem)), "0" (__result)); \
+ : "d" (value), "m" (*(mem)), "0" (__result)); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("1: move%.l %0,%2;" \
" add%.l %3,%2;" \
@@ -131,7 +131,7 @@ typedef uintmax_t uatomic_max_t;
" jbne 1b" \
: "=d" (__result), "=m" (*(mem)), \
"=&d" (__temp) \
- : "d" (value), "1" (*(mem)), "0" (__result)); \
+ : "d" (value), "m" (*(mem)), "0" (__result)); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -152,15 +152,15 @@ typedef uintmax_t uatomic_max_t;
(void) ({ if (sizeof (*(mem)) == 1) \
__asm __volatile ("add%.b %1,%0" \
: "=m" (*(mem)) \
- : "id" (value), "0" (*(mem))); \
+ : "id" (value), "m" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("add%.w %1,%0" \
: "=m" (*(mem)) \
- : "id" (value), "0" (*(mem))); \
+ : "id" (value), "m" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("add%.l %1,%0" \
: "=m" (*(mem)) \
- : "id" (value), "0" (*(mem))); \
+ : "id" (value), "m" (*(mem))); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -184,15 +184,15 @@ typedef uintmax_t uatomic_max_t;
if (sizeof (*(mem)) == 1) \
__asm __volatile ("addq%.b %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("addq%.w %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("addq%.l %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else \
{ \
__typeof (mem) __memp = (mem); \
@@ -218,15 +218,15 @@ typedef uintmax_t uatomic_max_t;
if (sizeof (*(mem)) == 1) \
__asm __volatile ("subq%.b %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("subq%.w %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("subq%.l %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
- : "1" (*(mem))); \
+ : "m" (*(mem))); \
else \
{ \
__typeof (mem) __memp = (mem); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e445ac3d4960d464ea6026f8a5995b516d71838d
commit e445ac3d4960d464ea6026f8a5995b516d71838d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 19 01:35:07 2003 +0000
Setjmp buffer unwinding helper code for Alpha.
diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h
new file mode 100644
index 0000000..ad77816
--- /dev/null
+++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=46bf1d81a4245cf10f4ae364721b5dea429a4503
commit 46bf1d81a4245cf10f4ae364721b5dea429a4503
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 06:05:03 2003 +0000
(__clone) [PIC]: Save PIC, reload PIC if we need to call __syscall_error,
cleanup asm.
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 459eaff..4f3bb9e 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -42,6 +42,11 @@ ENTRY(__clone)
stwm %arg0,64(%arg1)
stw %arg3,-60(%arg1)
+ /* Save the PIC register. */
+#ifdef PIC
+ stw %r19,-32(%sr0, %sp) /* parent */
+#endif
+
/* Do the system call */
copy %arg2,%arg0
ble 0x100(%sr2,%r0)
@@ -53,19 +58,31 @@ ENTRY(__clone)
comib,=,n 0,%ret0,thread_start
- /* Successful return from the parent */
+ /* Successful return from the parent
+ No need to restore the PIC register,
+ since we return immediately. */
+
bv %r0(%rp)
nop
/* Something bad happened -- no child created */
.Lerror:
+
+ /* Restore the PIC register on error */
+#ifdef PIC
+ ldw -32(%sr0, %sp), %r19 /* parent */
+#endif
+
b __syscall_error
sub %r0,%ret0,%arg0
thread_start:
+
/* Load up the arguments. */
- ldw -60(%sp),%arg0
- ldw -64(%sp),%r22
+ ldw -60(%sr0, %sp),%arg0
+ ldw -64(%sr0, %sp),%r22
+
+ /* $$dyncall fixes childs PIC register */
/* Call the user's function */
bl $$dyncall,%r31
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1f024c3e11470a425cd6f8072c2b74a93b3e69d
commit c1f024c3e11470a425cd6f8072c2b74a93b3e69d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:58:26 2003 +0000
(fesetexceptflag): Set enable bits not raised exception bits.
diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c
index 343ddad..af35f5a 100644
--- a/sysdeps/hppa/fpu/fsetexcptflg.c
+++ b/sysdeps/hppa/fpu/fsetexcptflg.c
@@ -29,8 +29,7 @@ fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Get the current status word. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- /* Install the new exception flags bits. */
- sw[0] &= ~(excepts & (FE_ALL_EXCEPT >> 27));
+ /* Install new enable trap bits */
sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
/* Store the new status word. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2da72a511e59b665a77e707b82e17f851bed4d1b
commit 2da72a511e59b665a77e707b82e17f851bed4d1b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:58:09 2003 +0000
(feraiseexcept): Add delayed exception flushing, FE_UNDERFLOW is DBL_MIN/3.0,
FE_INEXACT is triggered by M_PI/69.69 converted to single precision.
diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c
index a13668f..b064dc1 100644
--- a/sysdeps/hppa/fpu/fraiseexcpt.c
+++ b/sysdeps/hppa/fpu/fraiseexcpt.c
@@ -22,6 +22,9 @@
#include <float.h>
#include <math.h>
+/* Please see section 10,
+ page 10-5 "Delayed Trapping" in the PA-RISC 2.0 Architecture manual */
+
int
feraiseexcept (int excepts)
{
@@ -33,56 +36,64 @@ feraiseexcept (int excepts)
/* We do these bits in assembly to be certain GCC doesn't optimize
away something important, and so we can force delayed traps to
- occur. */
-
- /* FIXME: These all need verification! */
+ occur. */
- /* First: invalid exception. */
+ /* We use "fldd 0(%%sr0,%%sp),%0" to flush the delayed exception */
+
+ /* First: Invalid exception. */
if (excepts & FE_INVALID)
{
/* One example of a invalid operation is 0 * Infinity. */
double d = HUGE_VAL;
- __asm__ __volatile__ ("fmpy,dbl %1,%%fr0,%0\n\t"
- /* FIXME: is this a proper trap barrier? */
- "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ __asm__ __volatile__ (
+ " fcpy,dbl %%fr0,%%fr22\n"
+ " fmpy,dbl %0,%%fr22,%0\n"
+ " fldd 0(%%sr0,%%sp),%0"
+ : "+f" (d) : : "%fr22" );
}
- /* Next: division by zero. */
+ /* Second: Division by zero. */
if (excepts & FE_DIVBYZERO)
{
double d = 1.0;
- __asm__ __volatile__ ("fdiv,dbl %1,%%fr0,%0\n\t"
- "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ __asm__ __volatile__ (
+ " fcpy,dbl %%fr0,%%fr22\n"
+ " fdiv,dbl %0,%%fr22,%0\n"
+ " fldd 0(%%sr0,%%sp),%0"
+ : "+f" (d) : : "%fr22" );
}
- /* Next: overflow. */
- /* FIXME: Compare with IA-64 - do we have the same problem? */
+ /* Third: Overflow. */
if (excepts & FE_OVERFLOW)
{
double d = DBL_MAX;
-
- __asm__ __volatile__ ("fmpy,dbl %1,%1,%0\n\t"
- "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ __asm__ __volatile__ (
+ " fadd,dbl %0,%0,%0\n"
+ " fldd 0(%%sr0,%%sp),%0"
+ : "+f" (d) );
}
- /* Next: underflow. */
+ /* Fourth: Underflow. */
if (excepts & FE_UNDERFLOW)
{
double d = DBL_MIN;
- double e = 69.69;
-
- __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t"
- "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e));
+ double e = 3.0;
+ __asm__ __volatile__ (
+ " fdiv,dbl %0,%1,%0\n"
+ " fldd 0(%%sr0,%%sp),%0"
+ : "+f" (d) : "f" (e) );
}
- /* Last: inexact. */
+ /* Fifth: Inexact */
if (excepts & FE_INEXACT)
{
- double d = 1.0;
- double e = M_PI;
-
- __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t"
- "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e));
+ double d = M_PI;
+ double e = 69.69;
+ __asm__ __volatile__ (
+ " fdiv,dbl %0,%1,%%fr22\n"
+ " fcnvfxt,dbl,sgl %%fr22,%%fr22L\n"
+ " fldd 0(%%sr0,%%sp),%%fr22"
+ : : "f" (d), "f" (e) : "%fr22" );
}
/* Success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bff455e8a5d59aba93e5c5af38dac610f572077
commit 1bff455e8a5d59aba93e5c5af38dac610f572077
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:57:50 2003 +0000
(feupdateenv): Read raised exception bits, OR with envp, pass to fesetenv.
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index c61b7b2..8980dfd 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -27,14 +27,12 @@ feupdateenv (const fenv_t *envp)
/* Get the current exception status. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= (FE_ALL_EXCEPT << 27);
-
+ sw[0] &= FE_ALL_EXCEPT;
+ envp->__status_word = envp->__status_word | sw[0];
+
/* Install new environment. */
fesetenv (envp);
- /* Raise the saved exception. */
- feraiseexcept (sw[0] >> 27);
-
/* Success. */
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c5cf6f4a3d954964646dfcef8d6bbb4616900ab7
commit c5cf6f4a3d954964646dfcef8d6bbb4616900ab7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:57:31 2003 +0000
(fesetenv): Use asm 'ma,' completer, and gcc '+r' constraint.
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index 2c79869..5267732 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -26,20 +26,18 @@ int
fesetenv (const fenv_t *envp)
{
fenv_t temp;
+ fenv_t * _regs = &temp;
/* Install the environment specified by ENVP. But there are a few
values which we do not want to come from the saved environment.
Therefore, we get the current environment and replace the values
we want to use from the environment specified by the parameter. */
- {
- fenv_t * _regs = &temp;
- __asm__ (
- "fstd %%fr0,0(%2)\n"
- "fstd,ma %%fr1,8(%2)\n"
- "fstd,ma %%fr2,8(%2)\n"
- "fstd %%fr3,0(%2)\n"
- : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
- }
+ __asm__ (
+ "fstd,ma %%fr0,8(%1)\n"
+ "fstd,ma %%fr1,8(%1)\n"
+ "fstd,ma %%fr2,8(%1)\n"
+ "fstd %%fr3,0(%1)\n"
+ : "=m" (*_regs), "+r" (_regs));
temp.__status_word &= ~(FE_ALL_EXCEPT
| (FE_ALL_EXCEPT << 27)
@@ -55,15 +53,12 @@ fesetenv (const fenv_t *envp)
| (FE_ALL_EXCEPT << 27)));
/* Load the new environment. */
- {
- fenv_t * _regs = &temp + 1;
- __asm__ (
- "fldd,mb -8(%2),%%fr3\n"
- "fldd,mb -8(%2),%%fr2\n"
- "fldd,mb -8(%2),%%fr1\n"
- "fldd -8(%2),%%fr0\n"
- : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
- }
+ __asm__ (
+ "fldd,ma -8(%1),%%fr3\n"
+ "fldd,ma -8(%1),%%fr2\n"
+ "fldd,ma -8(%1),%%fr1\n"
+ "fldd 0(%1),%%fr0\n"
+ : "=m" (*_regs), "+r" (_regs));
/* Success. */
return 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4923dcf1bd3d163aff53344ad9cde64f6b2eb16d
commit 4923dcf1bd3d163aff53344ad9cde64f6b2eb16d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:57:14 2003 +0000
(feholdexcept): Use asm 'ma,' completer, and gcc '+r' constraint.
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index 2713336..db9fb40 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -25,18 +25,16 @@ int
feholdexcept (fenv_t *envp)
{
fenv_t clear;
+ fenv_t * _regs = envp;
/* Store the environment. */
- {
- fenv_t * _regs = envp;
- __asm__ (
- "fstd %%fr0,0(%2)\n"
- "fstd,ma %%fr1,8(%2)\n"
- "fstd,ma %%fr2,8(%2)\n"
- "fstd %%fr3,0(%2)\n"
- : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
- memcpy (&clear, envp, sizeof (clear));
- }
+ __asm__ (
+ "fstd,ma %%fr0,8(%1)\n"
+ "fstd,ma %%fr1,8(%1)\n"
+ "fstd,ma %%fr2,8(%1)\n"
+ "fstd %%fr3,0(%1)\n"
+ : "=m" (*_regs), "+r" (_regs));
+ memcpy (&clear, envp, sizeof (clear));
/* Now clear all exceptions. */
clear.__status_word &= ~(FE_ALL_EXCEPT << 27);
@@ -46,15 +44,13 @@ feholdexcept (fenv_t *envp)
clear.__status_word &= ~FE_ALL_EXCEPT;
/* Load the new environment. */
- {
- fenv_t * _regs = &clear + 1;
- __asm__ (
- "fldd,mb -8(%2),%%fr3\n"
- "fldd,mb -8(%2),%%fr2\n"
- "fldd,mb -8(%2),%%fr1\n"
- "fldd -8(%2),%%fr0\n"
- : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
- }
+ _regs = &clear;
+ __asm__ (
+ "fldd,ma -8(%1),%%fr3\n"
+ "fldd,ma -8(%1),%%fr2\n"
+ "fldd,ma -8(%1),%%fr1\n"
+ "fldd 0(%1),%%fr0\n"
+ : "=m" (*_regs), "+r" (_regs));
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78f9fd64197420b48770a6acd35c4496a130bf09
commit 78f9fd64197420b48770a6acd35c4496a130bf09
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:56:50 2003 +0000
(fegetenv): use asm 'ma,' completer, and gcc '+r' constraint.
diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c
index 1ed18da..b87317b 100644
--- a/sysdeps/hppa/fpu/fegetenv.c
+++ b/sysdeps/hppa/fpu/fegetenv.c
@@ -24,10 +24,10 @@ int
fegetenv (fenv_t *envp)
{
__asm__ (
- "fstd %%fr0,0(%2)\n"
- "fstd,ma %%fr1,8(%2)\n"
- "fstd,ma %%fr2,8(%2)\n"
- "fstd %%fr3,0(%2)\n"
- : "=m" (*envp), "=r" (envp) : "1" (envp));
+ "fstd,ma %%fr0,8(%1)\n"
+ "fstd,ma %%fr1,8(%1)\n"
+ "fstd,ma %%fr2,8(%1)\n"
+ "fstd %%fr3,0(%1)\n"
+ : "=m" (*envp), "+r" (envp));
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4db359168e060fd5762f4e934347ff2b3670f6e1
commit 4db359168e060fd5762f4e934347ff2b3670f6e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:56:15 2003 +0000
(feclearexcept): Right shift FE_ALL_EXCEPT before complimenting.
diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c
index 8ad67b9..a7c6982 100644
--- a/sysdeps/hppa/fpu/fclrexcpt.c
+++ b/sysdeps/hppa/fpu/fclrexcpt.c
@@ -29,7 +29,7 @@ feclearexcept (int excepts)
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
/* Clear all the relevant bits. */
- sw[0] &= ~(excepts & FE_ALL_EXCEPT) << 27;
+ sw[0] &= ~((excepts & FE_ALL_EXCEPT) << 27);
__asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
/* Success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69751d3f42978a57c51f251c24a244eb3e27c416
commit 69751d3f42978a57c51f251c24a244eb3e27c416
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:53:47 2003 +0000
DL_LOOKUP_ADDRESS must clear PLABEL32 bits, define DL_AUTO_FUNCTION_ADDRESS and
DL_STATIC_FUNCTION_ADDRESS, DL_DT_INIT_ADDRESS and DL_DT_FINI_ADDRESS use the
previous two macros.
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index d76ea12..d393b3e 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -26,27 +26,44 @@
/* Forward declaration. */
struct link_map;
-void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref);
+void *_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref);
#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)
Elf32_Addr _dl_lookup_address (const void *address);
-#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr)
+/* Clear the bottom two bits so generic code can find the fdesc entry */
+#define DL_LOOKUP_ADDRESS(addr) \
+ (_dl_lookup_address ((void *)((unsigned long)addr & ~3)))
void _dl_unmap (struct link_map *map);
#define DL_UNMAP(map) _dl_unmap (map)
-extern Elf32_Addr _dl_function_address (const struct link_map *map,
- Elf32_Addr start);
+#define DL_AUTO_FUNCTION_ADDRESS(map, addr) \
+({ \
+ unsigned int fptr[2]; \
+ fptr[0] = (unsigned int) (addr); \
+ fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \
+ /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \
+ (ElfW(Addr))((unsigned int)fptr | 2); \
+})
+
+#define DL_STATIC_FUNCTION_ADDRESS(map, addr) \
+({ \
+ static unsigned int fptr[2]; \
+ fptr[0] = (unsigned int) (addr); \
+ fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr; \
+ /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */ \
+ (ElfW(Addr))((unsigned int)fptr | 2); \
+})
-#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
/* The test for "addr & 2" below is to accomodate old binaries which
violated the ELF ABI by pointing DT_INIT and DT_FINI at a function
- pointer. */
+ descriptor. */
#define DL_DT_INIT_ADDRESS(map, addr) \
- ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
#define DL_DT_FINI_ADDRESS(map, addr) \
- ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba0b86d09fa1b701220fee9f93c497d4e5b98f5e
commit ba0b86d09fa1b701220fee9f93c497d4e5b98f5e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:53:22 2003 +0000
(_dl_symbol_address): Use _dl_make_ftpr, remove const qualifier for map.
(_dl_function_address): Removed.
diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
index 1aec19a..e5ce6a9 100644
--- a/sysdeps/hppa/dl-symaddr.c
+++ b/sysdeps/hppa/dl-symaddr.c
@@ -21,19 +21,16 @@
#include <dl-machine.h>
void *
-_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
+_dl_symbol_address (struct link_map *map, const ElfW(Sym) *ref)
{
+ /* Find the "ip" from the "map" and symbol "ref" */
Elf32_Addr value = (map ? map->l_addr : 0) + ref->st_value;
- /* On hppa, we have to return the pointer to function descriptor. */
- if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC)
- return (void *) __hppa_make_fptr (map, value, &__fptr_root, NULL);
+ /* On hppa, we have to return the pointer to function descriptor.
+ This involves an "| 2" to inform $$dyncall that this is a plabel32 */
+ if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC){
+ return (void *)((unsigned long)_dl_make_fptr (map, ref, value) | 2);
+ }
else
return (void *) value;
}
-
-ElfW(Addr)
-_dl_function_address (const struct link_map *map, ElfW(Addr) start)
-{
- return __hppa_make_fptr (map, start, &__fptr_root, NULL);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=866956e5c3f49ceaf6bf9a8f85fc35929136a9a6
commit 866956e5c3f49ceaf6bf9a8f85fc35929136a9a6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:53:02 2003 +0000
Not needed anymore.
diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c
deleted file mode 100644
index f8b6424..0000000
--- a/sysdeps/hppa/dl-fptr.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Make dynamic PLABELs for function pointers. HPPA version.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <unistd.h>
-#include <string.h>
-#include <sys/param.h>
-#include <sys/mman.h>
-#include <link.h>
-#include <errno.h>
-#include <ldsodefs.h>
-#include <elf/dynamic-link.h>
-#include <dl-machine.h>
-#ifdef _LIBC_REENTRANT
-# include <pt-machine.h>
-
-/* Remember, we use 0 to mean that a lock is taken on PA-RISC. */
-static int __hppa_fptr_lock = 1;
-#endif
-
-/* Because ld.so is now versioned, these functions can be in their own
- file; no relocations need to be done to call them. Of course, if
- ld.so is not versioned... */
-#if 0
-#ifndef DO_VERSIONING
-# error "This will not work with versioning turned off, sorry."
-#endif
-#endif
-
-#ifdef MAP_ANON
-/* The fd is not examined when using MAP_ANON. */
-# define ANONFD -1
-#else
-# define ANONFD GL(dl_zerofd)
-#endif
-
-struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE];
-struct hppa_fptr *__fptr_root = NULL;
-struct hppa_fptr *__fptr_next = __boot_ldso_fptr;
-static struct hppa_fptr *__fptr_free = NULL;
-int __fptr_count = HPPA_BOOT_FPTR_SIZE;
-
-Elf32_Addr
-__hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
- struct hppa_fptr **root, struct hppa_fptr *mem)
-{
- struct hppa_fptr **loc;
- struct hppa_fptr *f;
-
-#ifdef _LIBC_REENTRANT
- /* Make sure we are alone. We don't need a lock during bootstrap. */
- if (mem == NULL)
- while (testandset (&__hppa_fptr_lock));
-#endif
-
- /* Search the sorted linked list for an existing entry for this
- symbol. */
- loc = root;
- f = *loc;
- while (f != NULL && f->func <= value)
- {
- if (f->func == value)
- goto found;
- loc = &f->next;
- f = *loc;
- }
-
- /* Not found. Create a new one. */
- if (mem != NULL)
- f = mem;
- else if (__fptr_free != NULL)
- {
- f = __fptr_free;
- __fptr_free = f->next;
- }
- else
- {
- if (__fptr_count == 0)
- {
-#ifndef MAP_ANON
-# define MAP_ANON 0
- if (GL(dl_zerofd) == -1)
- {
- GL(dl_zerofd) = _dl_sysdep_open_zero_fill ();
- if (GL(dl_zerofd) == -1)
- {
- __close (fd);
- _dl_signal_error (errno, NULL, NULL,
- "cannot open zero fill device");
- }
- }
-#endif
-
- __fptr_next = __mmap (0, GL(dl_pagesize), PROT_READ | PROT_WRITE,
- MAP_ANON | MAP_PRIVATE, ANONFD, 0);
- if (__fptr_next == MAP_FAILED)
- _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr");
- __fptr_count = GL(dl_pagesize) / sizeof (struct hppa_fptr);
- }
- f = __fptr_next++;
- __fptr_count--;
- }
-
- f->func = value;
- /* GOT has already been relocated in elf_get_dynamic_info - don't
- try to relocate it again. */
- f->gp = sym_map->l_info[DT_PLTGOT]->d_un.d_ptr;
- f->next = *loc;
- *loc = f;
-
-found:
-#ifdef _LIBC_REENTRANT
- /* Release the lock. Again, remember, zero means the lock is taken! */
- if (mem == NULL)
- __hppa_fptr_lock = 1;
-#endif
-
- /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */
- return (Elf32_Addr) f | 2;
-}
-
-void
-_dl_unmap (struct link_map *map)
-{
- struct hppa_fptr **floc;
- struct hppa_fptr *f;
- struct hppa_fptr **lloc;
- struct hppa_fptr *l;
-
- __munmap ((void *) map->l_map_start, map->l_map_end - map->l_map_start);
-
-#ifdef _LIBC_REENTRANT
- /* Make sure we are alone. */
- while (testandset (&__hppa_fptr_lock));
-#endif
-
- /* Search the sorted linked list for the first entry for this object. */
- floc = &__fptr_root;
- f = *floc;
- while (f != NULL && f->func < map->l_map_start)
- {
- floc = &f->next;
- f = *floc;
- }
-
- /* We found one. */
- if (f != NULL && f->func < map->l_map_end)
- {
- /* Get the last entry. */
- lloc = floc;
- l = f;
- while (l && l->func < map->l_map_end)
- {
- lloc = &l->next;
- l = *lloc;
- }
-
- /* Updated FPTR. */
- *floc = l;
-
- /* Prepend them to the free list. */
- *lloc = __fptr_free;
- __fptr_free = f;
- }
-
-#ifdef _LIBC_REENTRANT
- /* Release the lock. */
- __hppa_fptr_lock = 1;
-#endif
-}
-
-Elf32_Addr
-_dl_lookup_address (const void *address)
-{
- Elf32_Addr addr = (Elf32_Addr) address;
- struct hppa_fptr *f;
-
-#ifdef _LIBC_REENTRANT
- /* Make sure we are alone. */
- while (testandset (&__hppa_fptr_lock));
-#endif
-
- for (f = __fptr_root; f != NULL; f = f->next)
- if (f == address)
- {
- addr = f->func;
- break;
- }
-
-#ifdef _LIBC_REENTRANT
- /* Release the lock. */
- __hppa_fptr_lock = 1;
-#endif
-
- return addr;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1294f72885610445b629a6a4fe1ebcd3f5e5b5a0
commit 1294f72885610445b629a6a4fe1ebcd3f5e5b5a0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:52:28 2003 +0000
Configuration for hppa function descriptor handling.
diff --git a/sysdeps/hppa/dl-fptr.h b/sysdeps/hppa/dl-fptr.h
new file mode 100644
index 0000000..2ac9740
--- /dev/null
+++ b/sysdeps/hppa/dl-fptr.h
@@ -0,0 +1,35 @@
+/* Function descriptors. HPPA version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef dl_hppa_fptr_h
+#define dl_hppa_fptr_h 1
+
+#include <sysdeps/generic/dl-fptr.h>
+
+/* There are currently 20 dynamic symbols in ld.so.
+ ELF_MACHINE_BOOT_FPTR_TABLE_LEN needs to be at least that big. */
+#define ELF_MACHINE_BOOT_FPTR_TABLE_LEN 200
+
+#define ELF_MACHINE_LOAD_ADDRESS(var, symbol) \
+ asm (" addil LT%%" #symbol ", %%r19\n" \
+ " ldw RT%%" #symbol "(%%sr0,%%r1), %0\n" \
+ : "=&r" (var));
+
+
+#endif /* !dl_hppa_fptr_h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dfc6dfb9a6e0af08ee449989392c937fa1482fdb
commit dfc6dfb9a6e0af08ee449989392c937fa1482fdb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 18 03:51:49 2003 +0000
Add dl-symaddr and dl-fptr to the correct build strings.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index bd9c96c..7394703 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -24,8 +24,9 @@ LDFLAGS-c_pic.os += -Wl,--unique=.text*
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -mdisable-fpregs
-dl-routines += dl-symaddr dl-fptr
-rtld-routines += dl-symaddr dl-fptr
+sysdep-dl-routines += dl-symaddr dl-fptr
+sysdep_routines += $(sysdep-dl-routines)
+sysdep-rtld-routines += $(sysdep-dl-routines)
endif
ifeq ($(subdir),csu)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c34667d768063397fef477f50c25f56bc4a85b2c
commit c34667d768063397fef477f50c25f56bc4a85b2c
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Dec 10 05:45:29 2003 +0000
Mark sqrt_data as used.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index a371896..c5ab25f 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,2002,2003 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -33,7 +33,7 @@ const static struct sqrt_data_struct {
unsigned long dn, up, half, almost_three_half;
unsigned long one_and_a_half, two_to_minus_30, one, nan;
const int T2[64];
-} sqrt_data = {
+} sqrt_data __attribute__((used)) = {
0x3fefffffffffffff, /* __dn = nextafter(1,-Inf) */
0x3ff0000000000001, /* __up = nextafter(1,+Inf) */
0x3fe0000000000000, /* half */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9f0b23a78ba3dc5deee8c987562a521a2018c23
commit d9f0b23a78ba3dc5deee8c987562a521a2018c23
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 6 07:16:41 2003 +0000
(__fegetexceptflag): Add masking of fenv.
diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/sysdeps/powerpc/nofpu/fgetexcptflg.c
index 9d4f078..713bd92 100644
--- a/sysdeps/powerpc/nofpu/fgetexcptflg.c
+++ b/sysdeps/powerpc/nofpu/fgetexcptflg.c
@@ -24,7 +24,7 @@
__fegetexceptflag (fexcept_t *flagp, int excepts)
{
- *flagp = (fexcept_t) __sim_exceptions;
+ *flagp = (fexcept_t) __sim_exceptions & excepts & FE_ALL_EXCEPT;
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd1f2c4aab382c2438a59dc8ad5e2b4822024d1f
commit fd1f2c4aab382c2438a59dc8ad5e2b4822024d1f
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Nov 30 16:44:48 2003 +0000
(PSEUDO_ERRVAL)
(PSEUDO_END_ERRVAL, ret_ERRVAL): Define.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index aabd46f..3c6266b 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -78,7 +78,21 @@
#define PSEUDO_END_NOERRNO(name) \
END (name)
-#define ret_NOERRNO ret
+#define ret_NOERRNO rts
+
+/* The function has to return the error code. */
+#undef PSEUDO_ERRVAL
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ negl %d0
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(name) \
+ END (name)
+
+#define ret_ERRVAL rts
#ifdef PIC
# if RTLD_PRIVATE_ERRNO
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49096d939f7737a7a88066a28955cdf9bfdfeb2d
commit 49096d939f7737a7a88066a28955cdf9bfdfeb2d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 3 17:18:38 2003 +0000
(LOAD_ARGS_0) (LOAD_ARGS_1, LOAD_ARGS_2, LOAD_ARGS_3, LOAD_ARGS_4)
(LOAD_ARGS_5, LOAD_ARGS_6): Add missing parentheses.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 1085db3..4cfe63c 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -380,22 +380,22 @@
#define LOAD_ARGS_0()
#define LOAD_ARGS_1(r26) \
- register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \
+ register unsigned long __r26 __asm__("r26") = (unsigned long)(r26); \
LOAD_ARGS_0()
#define LOAD_ARGS_2(r26,r25) \
- register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \
+ register unsigned long __r25 __asm__("r25") = (unsigned long)(r25); \
LOAD_ARGS_1(r26)
#define LOAD_ARGS_3(r26,r25,r24) \
- register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \
+ register unsigned long __r24 __asm__("r24") = (unsigned long)(r24); \
LOAD_ARGS_2(r26,r25)
#define LOAD_ARGS_4(r26,r25,r24,r23) \
- register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \
+ register unsigned long __r23 __asm__("r23") = (unsigned long)(r23); \
LOAD_ARGS_3(r26,r25,r24)
#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
- register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \
+ register unsigned long __r22 __asm__("r22") = (unsigned long)(r22); \
LOAD_ARGS_4(r26,r25,r24,r23)
#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
- register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \
+ register unsigned long __r21 __asm__("r21") = (unsigned long)(r21); \
LOAD_ARGS_5(r26,r25,r24,r23,r22)
/* Even with zero args we use r20 for the syscall number */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb86edea204c16b9f6f86df9594e8053618957db
commit fb86edea204c16b9f6f86df9594e8053618957db
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 22 07:09:31 2003 +0000
2003-10-18 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/hppa/sysdep.h: Fix merge error.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index bb5e31d..1085db3 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -371,7 +371,6 @@
LDW_ASM_PIC \
: "=r" (__res) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
- ); \
: CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f19a935e1b4e950cacc0446bb003dd6600864d15
commit f19a935e1b4e950cacc0446bb003dd6600864d15
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 15 05:46:00 2003 +0000
Define PSEUDO_ERRVAL, SYSCALL_ERROR_LABEL under all conditions,
INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERROR_P,
INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL, and undef
JUMPTARGET before use.
[PIC]: Save pic register around syscall.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 771c55c..bb5e31d 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -25,12 +25,26 @@
#include "config.h"
#ifndef ASM_LINE_SEP
-#define ASM_LINE_SEP ;
+# define ASM_LINE_SEP ;
#endif
#undef SYS_ify
#define SYS_ify(syscall_name) (__NR_##syscall_name)
+#ifdef PIC
+/* WARNING: CANNOT BE USED IN A NOP! */
+# define STW_PIC stw %r19, -32(%sr0, %sp) ASM_LINE_SEP
+# define LDW_PIC ldw -32(%sr0, %sp), %r19 ASM_LINE_SEP
+# define STW_ASM_PIC " copy %%r19, %%r4\n"
+# define LDW_ASM_PIC " copy %%r4, %%r19\n"
+# define USING_GR4 "%r4",
+#else
+# define STW_PIC ASM_LINE_SEP
+# define LDW_PIC ASM_LINE_SEP
+# define STW_ASM_PIC " \n"
+# define LDW_ASM_PIC " \n"
+# define USING_GR4
+#endif
#ifdef __ASSEMBLER__
@@ -77,20 +91,13 @@
.text ASM_LINE_SEP \
.export C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
- C_LABEL(name) \
- CALL_MCOUNT
-
-#define ret \
- bv 0(2) ASM_LINE_SEP \
- nop
-
-#define ret_NOERRNO \
- bv 0(2) ASM_LINE_SEP \
- nop
+ C_LABEL(name) ASM_LINE_SEP \
+ CALL_MCOUNT ASM_LINE_SEP
#undef END
-#define END(name) \
-1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
+#define END(name) \
+1: ASM_LINE_SEP \
+.size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name) ASM_LINE_SEP
/* If compiled for profiling, call `mcount' at the start of each function. */
/* No, don't bother. gcc will put the call in for us. */
@@ -110,27 +117,83 @@
nop
*/
-#define PSEUDO(name, syscall_name, args) \
- ENTRY (name) \
- DO_CALL(syscall_name, args) ASM_LINE_SEP \
- nop
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ DO_CALL(syscall_name, args) ASM_LINE_SEP \
+ nop ASM_LINE_SEP
+
+#define ret \
+ /* Return value set by ERRNO code */ ASM_LINE_SEP \
+ bv 0(2) ASM_LINE_SEP \
+ nop ASM_LINE_SEP
#undef PSEUDO_END
-#define PSEUDO_END(name) \
+#define PSEUDO_END(name) \
END (name)
-#define PSEUDO_NOERRNO(name, syscall_name, args) \
- ENTRY (name) \
- DO_CALL(syscall_name, args) ASM_LINE_SEP \
- nop
+/* We don't set the errno on the return from the syscall */
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ ENTRY (name) \
+ DO_CALL_NOERRNO(syscall_name, args) ASM_LINE_SEP \
+ nop ASM_LINE_SEP
+
+#define ret_NOERRNO ret
#undef PSEUDO_END_NOERRNO
-#define PSEUDO_END_NOERRNO(name) \
+#define PSEUDO_END_NOERRNO(name) \
END (name)
+/* This has to return the error value */
+#undef PSEUDO_ERRVAL
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ ENTRY(name) \
+ DO_CALL_ERRVAL(syscall_name, args) ASM_LINE_SEP \
+ nop ASM_LINE_SEP
+
+#define ret_ERRVAL ret
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(name) \
+ END(name)
+
+#undef JUMPTARGET
#define JUMPTARGET(name) name
#define SYSCALL_PIC_SETUP /* Nothing. */
+
+/* All the syscall assembly macros rely on finding the approriate
+ SYSCALL_ERROR_LABEL or rather HANDLER. */
+
+/* int * __errno_location(void) so you have to store your value
+ into the return address! */
+#define DEFAULT_SYSCALL_ERROR_HANDLER \
+ .import __errno_location,code ASM_LINE_SEP \
+ /* branch to errno handler */ ASM_LINE_SEP \
+ bl __errno_location,%rp ASM_LINE_SEP
+
+/* Here are the myriad of configuration options that the above can
+ work for... what we've done is provide the framework for future
+ changes if required to each section */
+
+#ifdef PIC
+# if RTLD_PRIVATE_ERRNO
+# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
+# else /* !RTLD_PRIVATE_ERRNO */
+# if defined _LIBC_REENTRANT
+# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
+# else /* !_LIBC_REENTRANT */
+# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
+# endif /* _LIBC_REENTRANT */
+# endif /* RTLD_PRIVATE_ERRNO */
+#else
+# ifndef _LIBC_REENTRANT
+# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
+# else
+# define SYSCALL_ERROR_HANDLER DEFAULT_SYSCALL_ERROR_HANDLER
+# endif
+#endif
+
+
/* Linux takes system call arguments in registers:
syscall number gr20
arg 1 gr26
@@ -159,25 +222,61 @@
#undef DO_CALL
#define DO_CALL(syscall_name, args) \
- DOARGS_##args \
+ DOARGS_##args ASM_LINE_SEP \
+ STW_PIC ASM_LINE_SEP \
+ /* Do syscall, delay loads # */ ASM_LINE_SEP \
ble 0x100(%sr2,%r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
ldi -0x1000,%r1 ASM_LINE_SEP \
cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
- stw %rp, -20(%sr0,%r30) ASM_LINE_SEP \
- stw %ret0, -24(%sr0,%r30) ASM_LINE_SEP \
- .import __errno_location,code ASM_LINE_SEP \
- bl __errno_location,%rp ASM_LINE_SEP \
- ldo 64(%r30), %r30 ASM_LINE_SEP \
- ldo -64(%r30), %r30 ASM_LINE_SEP \
- ldw -24(%r30), %r26 ASM_LINE_SEP \
+ /* save rp or we get lost */ ASM_LINE_SEP \
+ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ /* Restore r19 from frame */ ASM_LINE_SEP \
+ LDW_PIC ASM_LINE_SEP \
+ stw %ret0, -24(%sr0,%sp) ASM_LINE_SEP \
+ SYSCALL_ERROR_HANDLER ASM_LINE_SEP \
+ /* create frame */ ASM_LINE_SEP \
+ ldo 64(%sp), %sp ASM_LINE_SEP \
+ ldo -64(%sp), %sp ASM_LINE_SEP \
+ /* OPTIMIZE: Don't reload r19 */ ASM_LINE_SEP \
+ /* do a -1*syscall_ret0 */ ASM_LINE_SEP \
+ ldw -24(%sr0,%sp), %r26 ASM_LINE_SEP \
sub %r0, %r26, %r26 ASM_LINE_SEP \
+ /* Store into errno location */ ASM_LINE_SEP \
stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \
+ /* return -1 as error */ ASM_LINE_SEP \
ldo -1(%r0), %ret0 ASM_LINE_SEP \
- ldw -20(%r30), %rp ASM_LINE_SEP \
+ ldw -20(%sr0,%sp), %rp ASM_LINE_SEP \
0: ASM_LINE_SEP \
+ UNDOARGS_##args ASM_LINE_SEP
+
+/* We do nothing with the return, except hand it back to someone else */
+#undef DO_CALL_NOERRNO
+#define DO_CALL_NOERRNO(syscall_name, args) \
+ DOARGS_##args \
+ /* No need to store r19 */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+ /* Caller will restore r19 */ ASM_LINE_SEP \
UNDOARGS_##args
+/* Here, we return the ERRVAL in assembly, note we don't call the
+ error handler function, but we do 'negate' the return _IF_
+ it's an error. Not sure if this is the right semantic. */
+
+#undef DO_CALL_ERRVAL
+#define DO_CALL_ERRVAL(syscall_name, args) \
+ DOARGS_##args ASM_LINE_SEP \
+ /* No need to store r19 */ ASM_LINE_SEP \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+ /* Caller will restore r19 */ ASM_LINE_SEP \
+ ldi -0x1000,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
+ sub %r0, %ret0, %ret0 ASM_LINE_SEP \
+0: ASM_LINE_SEP \
+ UNDOARGS_##args ASM_LINE_SEP
+
#define DOARGS_0 /* nothing */
#define DOARGS_1 /* nothing */
#define DOARGS_2 /* nothing */
@@ -198,53 +297,124 @@
#else
+/* GCC has to be warned that a syscall may clobber all the ABI
+ registers listed as "caller-saves", see page 8, Table 2
+ in section 2.2.6 of the PA-RISC RUN-TIME architecture
+ document. However! r28 is the result and will conflict with
+ the clobber list so it is left out. Also the input arguments
+ registers r20 -> r26 will conflict with the list so they
+ are treated specially. Although r19 is clobbered by the syscall
+ we cannot say this because it would violate ABI, thus we say
+ r4 is clobbered and use that register to save/restore r19
+ across the syscall. */
+
+#define CALL_CLOB_REGS "%r1", "%r2", USING_GR4 \
+ "%r20", "%r29", "%r31"
+
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) ({ \
+#define INLINE_SYSCALL(name, nr, args...) ({ \
+ long __sys_res; \
+ { \
+ register unsigned long __res asm("r28"); \
+ LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK stw/ldw r19 around syscall */ \
+ asm volatile( \
+ STW_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+ LDW_ASM_PIC \
+ : "=r" (__res) \
+ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ __sys_res = (long)__res; \
+ } \
+ if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){ \
+ __set_errno(-__sys_res); \
+ __sys_res = -1; \
+ } \
+ __sys_res; \
+})
+
+/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
+ value to use within the context of the syscall
+ INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
+ You are allowed to use the syscall result (val) and the DECL error variable
+ to determine what went wrong.
+ INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
+ In our case we just flip the sign. */
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
+/* Equivalent to (val < 0)&&(val > -4095) which is what we want */
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((unsigned long)val >= (unsigned long)-4095)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
+
+/* Similar to INLINE_SYSCALL but we don't set errno */
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
+({ \
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
LOAD_ARGS_##nr(args) \
+ /* FIXME: HACK stw/ldw r19 around syscall */ \
asm volatile( \
- "ble 0x100(%%sr2, %%r0)\n\t" \
- " ldi %1, %%r20" \
+ STW_ASM_PIC \
+ " ble 0x100(%%sr2, %%r0)\n" \
+ " ldi %1, %%r20\n" \
+ LDW_ASM_PIC \
: "=r" (__res) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
); \
- __sys_res = __res; \
- } \
- if ((unsigned long)__sys_res >= (unsigned long)-4095) { \
- __set_errno(-__sys_res); \
- __sys_res = -1; \
+ : CALL_CLOB_REGS CLOB_ARGS_##nr \
+ ); \
+ __sys_res = (long)__res; \
} \
__sys_res; \
-})
+ })
#define LOAD_ARGS_0()
#define LOAD_ARGS_1(r26) \
- register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \
+ register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \
LOAD_ARGS_0()
#define LOAD_ARGS_2(r26,r25) \
- register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \
+ register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \
LOAD_ARGS_1(r26)
#define LOAD_ARGS_3(r26,r25,r24) \
- register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \
+ register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \
LOAD_ARGS_2(r26,r25)
#define LOAD_ARGS_4(r26,r25,r24,r23) \
- register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \
+ register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \
LOAD_ARGS_3(r26,r25,r24)
#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
- register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \
+ register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \
LOAD_ARGS_4(r26,r25,r24,r23)
#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
- register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \
+ register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \
LOAD_ARGS_5(r26,r25,r24,r23,r22)
+/* Even with zero args we use r20 for the syscall number */
#define ASM_ARGS_0
-#define ASM_ARGS_1 , "r" (__r26)
-#define ASM_ARGS_2 , "r" (__r26), "r" (__r25)
-#define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24)
-#define ASM_ARGS_4 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23)
-#define ASM_ARGS_5 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22)
-#define ASM_ARGS_6 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22), "r" (__r21)
+#define ASM_ARGS_1 ASM_ARGS_0, "r" (__r26)
+#define ASM_ARGS_2 ASM_ARGS_1, "r" (__r25)
+#define ASM_ARGS_3 ASM_ARGS_2, "r" (__r24)
+#define ASM_ARGS_4 ASM_ARGS_3, "r" (__r23)
+#define ASM_ARGS_5 ASM_ARGS_4, "r" (__r22)
+#define ASM_ARGS_6 ASM_ARGS_5, "r" (__r21)
+
+/* The registers not listed as inputs but clobbered */
+#define CLOB_ARGS_6
+#define CLOB_ARGS_5 CLOB_ARGS_6, "%r21"
+#define CLOB_ARGS_4 CLOB_ARGS_5, "%r22"
+#define CLOB_ARGS_3 CLOB_ARGS_4, "%r23"
+#define CLOB_ARGS_2 CLOB_ARGS_3, "%r24"
+#define CLOB_ARGS_1 CLOB_ARGS_2, "%r25"
+#define CLOB_ARGS_0 CLOB_ARGS_1, "%r26"
#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5420f85dbe86b32d36dbf12e1358551d8de762ee
commit 5420f85dbe86b32d36dbf12e1358551d8de762ee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 15 05:45:16 2003 +0000
(syscall): Cleanup asm statment.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index bf4d4af..192efba 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,10 @@
#include <sysdep.h>
#include <errno.h>
+extern int __syscall_error(int err_no);
+extern int syscall (int sysnum, int arg0, int arg1, int arg2,
+ int arg3, int arg4, int arg5);
+
/* This routine is jumped to by all the syscall handlers, to stash
an error number into errno. */
int
@@ -30,25 +34,31 @@ __syscall_error (int err_no)
/* HPPA implements syscall() in 'C'; the assembler version would
- typically be in syscall.S. */
-
+ typically be in syscall.S. Also note that we have INLINE_SYSCALL,
+ INTERNAL_SYSCALL, and all the generated pure assembly syscall wrappers.
+ How often the function is used is unknown. */
int
-syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
+syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4,
+ int arg5)
{
- long __sys_res;
+ /* FIXME: Keep this matching INLINE_SYSCALL for hppa */
+ long int __sys_res;
{
- register unsigned long __res asm("r28");
- LOAD_ARGS_6(arg0, arg1, arg2, arg3, arg4, arg5)
- asm volatile ("ble 0x100(%%sr2, %%r0)\n\t"
- "copy %1, %%r20"
- : "=r" (__res)
- : "r" (sysnum) ASM_ARGS_6);
+ register unsigned long int __res asm("r28");
+ LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
+ asm volatile (STW_ASM_PIC
+ " ble 0x100(%%sr2, %%r0) \n"
+ " copy %1, %%r20 \n"
+ LDW_ASM_PIC
+ : "=r" (__res)
+ : "r" (sysnum) ASM_ARGS_6
+ : CALL_CLOB_REGS CLOB_ARGS_6);
__sys_res = __res;
}
- if ((unsigned long) __sys_res >= (unsigned long)-4095)
+ if ((unsigned long int) __sys_res >= (unsigned long int) -4095)
{
- __set_errno(-__sys_res);
- __sys_res = -1;
- }
+ __set_errno (-__sys_res);
+ __sys_res = -1;
+ }
return __sys_res;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aca984867e7770eeddacc9f1425fcda4d5d6444e
commit aca984867e7770eeddacc9f1425fcda4d5d6444e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 15 05:31:42 2003 +0000
Undef JUMPTARGET before use.
diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h
index 1f47fad..be36567 100644
--- a/sysdeps/hppa/sysdep.h
+++ b/sysdeps/hppa/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for HP/PA.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
@@ -70,6 +70,7 @@
#define PSEUDO_END(name) \
END (name)
+#undef JUMPTARGET
#define JUMPTARGET(name) name
#define SYSCALL_PIC_SETUP /* Nothing. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f12dcc7b8cb5067de8f00c9e6ad590bb6f3092b
commit 6f12dcc7b8cb5067de8f00c9e6ad590bb6f3092b
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 11 01:28:59 2003 +0000
2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/hppa/Makefile (CFLAGS-malloc.c): Variable removed.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 68651f6..bd9c96c 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -22,10 +22,6 @@
# CFLAGS-.os += -ffunction-sections
LDFLAGS-c_pic.os += -Wl,--unique=.text*
-ifeq ($(subdir),malloc)
-CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16
-endif
-
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -mdisable-fpregs
dl-routines += dl-symaddr dl-fptr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66a1dc8705b6f3d43369eddf49408b90c51dc1d0
commit 66a1dc8705b6f3d43369eddf49408b90c51dc1d0
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 1 06:59:40 2003 +0000
2003-09-10 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Remove
"#if 0" surrounding most of contents.
(SYSCALL_ERROR_LABEL): Define.
(__SYSCALL_CLOBBERS): Add $10.
(internal_syscall7): Remove.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 7109971..2b2aefa 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -33,9 +33,16 @@
# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
#endif
+#ifdef __ASSEMBLER__
+
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef __PIC__
+# define SYSCALL_ERROR_LABEL 99b
+#endif
+
+#else /* ! __ASSEMBLER__ */
-#ifndef __ASSEMBLER__
-#if 0 /* untested */
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -228,36 +235,7 @@
_sys_result; \
})
-#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({ \
- long _sys_result; \
- \
- { \
- register long long __v0 asm("$2"); \
- register long long __a0 asm("$4") = (long long) arg1; \
- register long long __a1 asm("$5") = (long long) arg2; \
- register long long __a2 asm("$6") = (long long) arg3; \
- register long long __a3 asm("$7") = (long long) arg4; \
- register long long __a4 asm("$8") = (long long) arg5; \
- register long long __a5 asm("$9") = (long long) arg6; \
- register long long __a6 asm("$10") = (long long) arg7; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5), "r" (__a6) \
- : __SYSCALL_CLOBBERS); \
- err = __a3; \
- _sys_result = __v0; \
- } \
- _sys_result; \
-})
-
-#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
-#endif /* untested */
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 4341c18..e2d8707 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -33,9 +33,16 @@
# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
#endif
+#ifdef __ASSEMBLER__
+
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef __PIC__
+# define SYSCALL_ERROR_LABEL 99b
+#endif
+
+#else /* ! __ASSEMBLER__ */
-#ifndef __ASSEMBLER__
-#if 0 /* untested */
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
@@ -228,36 +235,7 @@
_sys_result; \
})
-#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
-({ \
- long _sys_result; \
- \
- { \
- register long __v0 asm("$2"); \
- register long __a0 asm("$4") = (long) arg1; \
- register long __a1 asm("$5") = (long) arg2; \
- register long __a2 asm("$6") = (long) arg3; \
- register long __a3 asm("$7") = (long) arg4; \
- register long __a4 asm("$8") = (long) arg5; \
- register long __a5 asm("$9") = (long) arg6; \
- register long __a6 asm("$10") = (long) arg7; \
- __asm__ volatile ( \
- ".set\tnoreorder\n\t" \
- "li\t$2, %5\t\t\t# " #name "\n\t" \
- "syscall\n\t" \
- ".set\treorder" \
- : "=r" (__v0), "+r" (__a3) \
- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a4), "r" (__a5), "r" (__a6) \
- : __SYSCALL_CLOBBERS); \
- err = __a3; \
- _sys_result = __v0; \
- } \
- _sys_result; \
-})
-
-#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
-#endif /* untested */
+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
#endif /* __ASSEMBLER__ */
#endif /* linux/mips/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d87932d45aaf20a38dbda3a6ebbac0e50b90f43
commit 3d87932d45aaf20a38dbda3a6ebbac0e50b90f43
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 25 16:42:43 2003 +0000
Define PROT_GROWSDOWN and PROT_GROWSUP.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 9180439..bb41887 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
@@ -52,7 +56,7 @@
/* Not used by Linux, but here to make sure we don't clash with
OSF/1 defines. */
-#if 0 && defined(__USE_BSD)
+#if 0 && defined __USE_BSD
# define MAP_HASSEMAPHORE 0x0200
# define MAP_INHERIT 0x0400
# define MAP_UNALIGNED 0x0800
@@ -104,7 +108,7 @@
/* Not used by Linux, but here to make sure we don't clash with
OSF/1 defines. */
-#if 0 && defined(__USE_BSD)
+#if 0 && defined __USE_BSD
# define MADV_DONTNEED_COMPAT 4 /* Old version? */
# define MADV_SPACEAVAIL 5 /* Ensure resources are available. */
#endif
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index c6d475b..4ec6839 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h
index 2813f09..b66c0bd 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/CRIS version.
- Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index 40db9f9..1eb1233 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -27,6 +27,10 @@
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
#define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 350ea95..815a3da 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -34,6 +34,10 @@
#define PROT_WRITE 0x2 /* Page can be written. */
#define PROT_EXEC 0x4 /* Page can be executed. */
#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b82390a8da4f7006b380a6cd45a97699837ca73a
commit b82390a8da4f7006b380a6cd45a97699837ca73a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 21:08:31 2003 +0000
(RTLD_START): Remove setting of __libc_stack_end.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index b3c1eac..6680abf 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -319,8 +319,6 @@ _dl_start_user: \n\
.prologue 0 \n\
/* Save the user entry point address in s0. */ \n\
mov $0, $9 \n\
- /* Store the highest stack address. */ \n\
- stq $30, __libc_stack_end \n\
/* See if we were run as a command with the executable \n\
file name as an extra leading argument. */ \n\
ldl $1, _dl_skip_args($gp) !gprel \n\
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 15de939..9b1d53a 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -265,10 +265,6 @@ _dl_start_user:\n\
ldr sl, .L_GET_GOT\n\
add sl, pc, sl\n\
.L_GOT_GOT:\n\
- @ Store the highest stack address\n\
- ldr r1, .L_STACK_END\n\
- ldr r1, [sl, r1]\n\
- str sp, [r1]\n\
@ See if we were run as a command with the executable file\n\
@ name as an extra leading argument.\n\
ldr r4, .L_SKIP_ARGS\n\
@@ -311,8 +307,6 @@ _dl_start_user:\n\
.word _dl_starting_up(GOT)\n\
.L_FINI_PROC:\n\
.word _dl_fini(GOT)\n\
-.L_STACK_END:\n\
- .word __libc_stack_end(GOT)\n\
.L_LOADED:\n\
.word _rtld_local(GOT)\n\
.previous\n\
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 206e621..368733e 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -188,9 +188,6 @@ _dl_start_user:\n\
; Point R0 at the GOT.\n\
move.d $pc,$r0\n\
sub.d .:GOTOFF,$r0\n\
- ; Remember the highest stack address.\n\
- move.d [$r0+__libc_stack_end:GOT16],$r13\n\
- move.d $sp,[$r13]\n\
; See if we were run as a command with the executable file\n\
; name as an extra leading argument.\n\
move.d [$r0+_dl_skip_args:GOT16],$r13\n\
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 5ae53a4..d3bc83a 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -157,9 +157,6 @@ _start:\n\
_dl_start_user:\n\
| Save the user entry point address in %a4.\n\
move.l %d0, %a4\n\
- | Remember the highest stack address.\n\
- move.l __libc_stack_end@GOTPC(%pc), %a0\n\
- move.l %sp, (%a0)\n\
| See if we were run as a command with the executable file\n\
| name as an extra leading argument.\n\
move.l _dl_skip_args(%pc), %d0\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aec9c3ef295991ce532f8bd76fb5c4406a195822
commit aec9c3ef295991ce532f8bd76fb5c4406a195822
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 05:36:39 2003 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
deleted file mode 100644
index 43ec376..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Definitions of macros to access `dev_t' values.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_SYSMACROS_H
-#define _SYS_SYSMACROS_H 1
-
-/* For compatibility we provide alternative names. */
-#define major(dev) ((int)(((dev) >> 8) & 0xff))
-#define minor(dev) ((int)((dev) & 0xff))
-#define makedev(major, minor) ((((unsigned int) (major)) << 8) \
- | ((unsigned int) (minor)))
-
-#endif /* sys/sysmacros.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c
deleted file mode 100644
index 4e3bf63..0000000
--- a/sysdeps/unix/sysv/linux/alpha/ustat.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1997, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/ustat.h>
-#include <sys/sysmacros.h>
-#include <sysdep.h>
-
-int
-ustat (dev_t dev, struct ustat *ubuf)
-{
- unsigned int k_dev;
-
- /* We must convert the value to dev_t type used by the kernel. */
- k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
-
- return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
-}
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
deleted file mode 100644
index e74f4c0..0000000
--- a/sysdeps/unix/sysv/linux/alpha/xmknod.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991,1993,1995,1996,1997,2002,2003
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#include <sysdep.h>
-
-/* Create a device file named PATH, with permission and special bits MODE
- and device number DEV (which can be constructed from major and minor
- device numbers with the `makedev' macro above). */
-int
-__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
-{
- unsigned int k_dev;
-
- if (vers != _MKNOD_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* We must convert the value to dev_t type used by the kernel. */
- k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
-
- return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
-}
-
-weak_alias (__xmknod, _xmknod)
-libc_hidden_def (__xmknod)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de251c974b30ca8d6042a80e042706d475f12474
commit de251c974b30ca8d6042a80e042706d475f12474
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 03:14:27 2003 +0000
[GLIBC_2.2]: Add __clz_tab.
diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions
index 909d50b..2ae3cbd 100644
--- a/sysdeps/hppa/Versions
+++ b/sysdeps/hppa/Versions
@@ -5,3 +5,8 @@ ld {
_dl_function_address;
}
}
+libc {
+ GLIBC_2.2 {
+ __clz_tab;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e62e873e95ce55e7b1ff8fb04d2786f2befe559a
commit e62e873e95ce55e7b1ff8fb04d2786f2befe559a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 03:14:14 2003 +0000
Add libgcc-compat.c.
diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist
index 9fc1de2..e26e411 100644
--- a/sysdeps/hppa/Dist
+++ b/sysdeps/hppa/Dist
@@ -1,2 +1,3 @@
+libgcc-compat.c
dl-symaddr.c
dl-fptr.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=131d66906b388cbee64fcf953e79e69536674218
commit 131d66906b388cbee64fcf953e79e69536674218
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 03:13:56 2003 +0000
libgcc compatibility code.
diff --git a/sysdeps/hppa/libgcc-compat.c b/sysdeps/hppa/libgcc-compat.c
new file mode 100644
index 0000000..2957eba
--- /dev/null
+++ b/sysdeps/hppa/libgcc-compat.c
@@ -0,0 +1,43 @@
+/* pre-.hidden libgcc compatibility
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Randolph Chung
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+symbol_version (__clz_tab_internal, __clz_tab, GLIBC_2.2);
+
+typedef unsigned int UQItype __attribute__ ((mode (QI)));
+
+const UQItype __clz_tab_internal[] =
+{
+ 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
+ 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+ 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+};
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f32742b08826b4f0129964cc17b52d4e52b25c45
commit f32742b08826b4f0129964cc17b52d4e52b25c45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 24 03:13:28 2003 +0000
Include compat code in build.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 170bd07..68651f6 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -31,3 +31,14 @@ CFLAGS-rtld.c += -mdisable-fpregs
dl-routines += dl-symaddr dl-fptr
rtld-routines += dl-symaddr dl-fptr
endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+ifeq (yes,$(have-protected))
+CPPFLAGS-libgcc-compat.c = -DHAVE_DOT_HIDDEN
+endif
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=011f9a85d26d02c3dd27a1b64d64391e9127e792
commit 011f9a85d26d02c3dd27a1b64d64391e9127e792
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 17 18:09:53 2003 +0000
Add #error if __NR_vfork required but not defined.
Improve test of error code.
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 0630c7f..bba1a54 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -38,8 +38,7 @@ ENTRY (__vfork)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
# else
/* Check if vfork syscall is known at all. */
- ldr a2, =-ENOSYS
- teq a1, a2
+ cmn a2, #ENOSYS
bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
# endif
#endif
@@ -50,6 +49,8 @@ ENTRY (__vfork)
cmn a1, #4096
RETINSTR(movcc, pc, lr)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#elif !defined __NR_vfork
+# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
#endif
PSEUDO_END (__vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=644d82249f8cc39df2db3b97105380b6c12f9722
commit 644d82249f8cc39df2db3b97105380b6c12f9722
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 17 18:09:36 2003 +0000
(DO_RET): New.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 4bc7d82..cb3f105 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -52,11 +52,20 @@
ldm##cond base,reglist
#define RETINSTR(instr, regs...)\
instr regs
+#ifdef __THUMB_INTERWORK__
+#define DO_RET(_reg) \
+ bx _reg
+#else
+#define DO_RET(_reg) \
+ mov pc, _reg
+#endif
#else /* APCS-26 */
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist^
#define RETINSTR(instr, regs...)\
instr##s regs
+#define DO_RET(_reg) \
+ movs pc, _reg
#endif
/* Define an entry point visible from C. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12a15026b8729a19acba9fc6ad286da25536768d
commit 12a15026b8729a19acba9fc6ad286da25536768d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 17 18:09:25 2003 +0000
(CALL_ROUTINE): Deleted.
(BX): Define.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Optimise a little.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 9c11f0b..15de939 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -123,22 +123,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
return lazy;
}
-/* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
- // macro for handling PIC situation....
-#ifdef PIC
-#define CALL_ROUTINE(x) "\
- ldr sl,0f\n\
- add sl, pc, sl\n\
-1: ldr r2, 2f\n\
- mov lr, pc\n\
- add pc, sl, r2\n\
- b 3f\n\
-0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\
-2: .word " #x "(GOTOFF)\n\
-3: "
+#if defined(__THUMB_INTERWORK__)
+#define BX(x) "bx\t" #x
#else
-#define CALL_ROUTINE(x) " bl " #x
+#define BX(x) "mov\tpc, " #x
#endif
#ifndef PROF
@@ -153,8 +141,11 @@ _dl_runtime_resolve:\n\
@ ip contains &GOT[n+3] (pointer to function)\n\
@ lr points to &GOT[2]\n\
\n\
- @ save almost everything; lr is already on the stack\n\
- stmdb sp!,{r0-r3,sl,fp}\n\
+ @ stack arguments\n\
+ stmdb sp!,{r0-r3}\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
\n\
@ prepare to call fixup()\n\
@ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
@@ -162,20 +153,17 @@ _dl_runtime_resolve:\n\
sub r1, r1, #4\n\
add r1, r1, r1\n\
\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
@ call fixup routine\n\
- " CALL_ROUTINE(fixup) "\n\
+ bl fixup\n\
\n\
@ save the return\n\
mov ip, r0\n\
\n\
- @ restore the stack\n\
- ldmia sp!,{r0-r3,sl,fp,lr}\n\
+ @ get arguments and return address back\n\
+ ldmia sp!, {r0-r3,lr}\n\
\n\
@ jump to the newly found address\n\
- mov pc, ip\n\
+ " BX(ip) "\n\
\n\
.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
\n\
@@ -183,8 +171,11 @@ _dl_runtime_resolve:\n\
.type _dl_runtime_profile, #function\n\
.align 2\n\
_dl_runtime_profile:\n\
- @ save almost everything; lr is already on the stack\n\
- stmdb sp!,{r0-r3,sl,fp}\n\
+ @ stack arguments\n\
+ stmdb sp!, {r0-r3}\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
\n\
@ prepare to call fixup()\n\
@ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
@@ -192,20 +183,17 @@ _dl_runtime_profile:\n\
sub r1, r1, #4\n\
add r1, r1, r1\n\
\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
@ call profiling fixup routine\n\
- " CALL_ROUTINE(profile_fixup) "\n\
+ bl profile_fixup\n\
\n\
@ save the return\n\
mov ip, r0\n\
\n\
- @ restore the stack\n\
- ldmia sp!,{r0-r3,sl,fp,lr}\n\
+ @ get arguments and return address back\n\
+ ldmia sp!, {r0-r3,lr}\n\
\n\
@ jump to the newly found address\n\
- mov pc, ip\n\
+ " BX(ip) "\n\
\n\
.size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
.previous\n\
@@ -225,8 +213,11 @@ _dl_runtime_profile:\n\
@ ip contains &GOT[n+3] (pointer to function)\n\
@ lr points to &GOT[2]\n\
\n\
- @ save almost everything; return add is already on the stack\n\
- stmdb sp!,{r0-r3,sl,fp}\n\
+ @ stack arguments\n\
+ stmdb sp!, {r0-r3}\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
\n\
@ prepare to call fixup()\n\
@ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
@@ -234,20 +225,17 @@ _dl_runtime_profile:\n\
sub r1, r1, #4\n\
add r1, r1, r1\n\
\n\
- @ get pointer to linker struct\n\
- ldr r0, [lr, #-4]\n\
-\n\
@ call profiling fixup routine\n\
- " CALL_ROUTINE(fixup) "\n\
+ bl fixup\n\
\n\
@ save the return\n\
mov ip, r0\n\
\n\
- @ restore the stack\n\
- ldmia sp!,{r0-r3,sl,fp,lr}\n\
+ @ get arguments and return address back\n\
+ ldmia sp!, {r0-r3,lr}\n\
\n\
@ jump to the newly found address\n\
- mov pc, ip\n\
+ " BX(ip) "\n\
\n\
.size _dl_runtime_profile, .-_dl_runtime_profile\n\
.previous\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=170880ee2676e8a454cf4521ed7635cd8d8ce4c4
commit 170880ee2676e8a454cf4521ed7635cd8d8ce4c4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 17 18:07:04 2003 +0000
Branch to fork if libpthread is loaded. Elide backwards compatibility code
when not required.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
index 8d3338a..2368734 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
@@ -20,37 +20,60 @@
#include <sysdep-cancel.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include <kernel-features.h>
-/* Clone the calling process, but without copying the whole address
-pace.
+/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
- replaced by a call to `execve'. Return -1 for errors, 0 to the new
-rocess,
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
PSEUDO_PROLOGUE
ENTRY (__vfork)
- SINGLE_THREAD_P
- bne HIDDEN_JUMPTARGET (__fork)
#ifdef __NR_vfork
+
+#ifdef SHARED
+ ldr ip, 1f
+ ldr r0, 2f
+3: add ip, pc, ip
+ ldr r0, [ip, r0]
+#else
+ ldr r0, 1f
+#endif
+ movs r0, r0
+ bne HIDDEN_JUMPTARGET (__fork)
+
swi __NR_vfork
cmn a1, #4096
RETINSTR(movcc, pc, lr)
+#ifndef __ASSUME_VFORK_SYSCALL
/* Check if vfork syscall is known at all. */
- ldr a2, =-ENOSYS
- teq a1, a2
+ cmn a1, #ENOSYS
bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
#endif
+#endif
+
+#ifndef __ASSUME_VFORK_SYSCALL
/* If we don't have vfork, fork is close enough. */
swi __NR_fork
cmn a1, #4096
RETINSTR(movcc, pc, lr)
+#elif !defined __NR_vfork
+# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
+#endif
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#ifdef SHARED
+1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8
+2: .word __libc_pthread_functions(GOTOFF)
+#else
+ .weak pthread_create
+1: .word pthread_create
+#endif
+
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5abcf869491bbdf340b4cc147aa6af0980d6a021
commit 5abcf869491bbdf340b4cc147aa6af0980d6a021
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 17 02:47:48 2003 +0000
2003-09-17 Uwe Reimann <Uwe_Reimann@gmx.net> Hans-Peter Nilsson <hp@axis.com>
* sysdeps/cris/dl-machine.h (elf_machine_type_class): Classify
R_CRIS_GLOB_DAT as ELF_RTYPE_CLASS_PLT. Clarify comment.
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 7354c49..206e621 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -228,12 +228,20 @@ _dl_start_user:\n\
.size _dl_start_user, . - _dl_start_user\n\
.previous");
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- of the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_type_class(type) \
- ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+/* The union of reloc-type-classes where the reloc TYPE is a member.
+
+ TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a
+ relocation for a PLT entry, that is, for which a PLT entry should not
+ be allowed to define the value. The GNU linker for CRIS can merge a
+ .got.plt entry (R_CRIS_JUMP_SLOT) with a .got entry (R_CRIS_GLOB_DAT),
+ so we need to match both these reloc types.
+
+ TYPE is in the class ELF_RTYPE_CLASS_NOCOPY if it should not be allowed
+ to resolve to one of the main executable's symbols, as for a COPY
+ reloc. */
+#define elf_machine_type_class(type) \
+ ((((((type) == R_CRIS_JUMP_SLOT)) \
+ || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3dc8a4b2546995462f7e99f46b38c353d47afe30
commit 3dc8a4b2546995462f7e99f46b38c353d47afe30
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Sep 15 08:43:12 2003 +0000
Add hidden_def.
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 19aa131..8a6c3f9 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -58,3 +58,6 @@ __sigsetjmp (jmp_buf env, int savemask)
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
}
+#if !defined BSD_SETJMP && !defined BSD__SETJMP
+hidden_def (__sigsetjmp)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60f4eece709fca8e4ffd72ad85ca238c420a73e7
commit 60f4eece709fca8e4ffd72ad85ca238c420a73e7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 14 19:54:53 2003 +0000
Optimise code a little.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 3936e25..f8361b5 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -27,38 +27,44 @@
.text
ENTRY (__mmap64)
#ifdef __NR_mmap2
- stmfd sp!, {r4, r5, lr}
- ldr r5, [sp, $16]
- ldr r4, [sp, $12]
- movs ip, r5, lsl $20 @ check that offset is page-aligned
+ ldr ip, [sp, $4] @ offset low part
+ str r5, [sp, #-4]!
+ ldr r5, [sp, $12] @ offset high part
+ str r4, [sp, #-4]!
+ movs r4, ip, lsl $20 @ check that offset is page-aligned
+ mov ip, ip, lsr $12
+ moveqs r4, r5, lsr $12 @ check for overflow
bne .Linval
- ldr ip, [sp, $20]
- mov r5, r5, lsr $12
- orr r5, r5, ip, lsl $20 @ compose page offset
- movs ip, ip, lsr $12
- bne .Linval @ check for overflow
+ ldr r4, [sp, $8] @ load fd
+ orr r5, ip, r5, lsl $20 @ compose page offset
mov ip, r0
swi SYS_ify (mmap2)
cmn r0, $4096
- LOADREGS(ccfd, sp!, {r4, r5, pc})
# ifdef __ASSUME_MMAP2_SYSCALL
- ldmfd sp!, {r4, r5, lr}
+ ldr r4, [sp], #4
+ ldr r5, [sp], #4
+ RETINSTR(movcc, pc, lr)
b PLTJMP(syscall_error)
# else
+ ldrcc r4, [sp], #4
+ ldrcc r5, [sp], #4
+ RETINSTR(movcc, pc, lr)
cmn r0, $ENOSYS
- ldmnefd sp!, {r4, r5, lr}
- bne PLTJMP(syscall_error)
+ bne .Lerror
/* The current kernel does not support mmap2. Fall back to plain
mmap if the offset is small enough. */
- ldr r5, [sp, $20]
+ ldr r5, [sp, $16]
mov r0, ip @ first arg was clobbered
teq r5, $0
- ldmeqfd sp!, {r4, r5, lr}
+ ldreq r4, [sp], #4
+ ldreq r5, [sp], #4
beq PLTJMP(__mmap)
# endif
.Linval:
mov r0, $-EINVAL
- ldmfd sp!, {r4, r5, lr}
+.Lerror:
+ ldr r4, [sp], #4
+ ldr r5, [sp], #4
b PLTJMP(syscall_error)
#else
/* The kernel headers do not support mmap2. Fall back to plain
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c65912458927f5ccc934e5caa6dfb5f101c97b4
commit 2c65912458927f5ccc934e5caa6dfb5f101c97b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 14 19:54:40 2003 +0000
Use sys_mmap2 if it's known to be available.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index af93c7b..7beba68 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,47 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <kernel-features.h>
+
+#define EINVAL 22
.text
ENTRY (__mmap)
+# ifdef __ASSUME_MMAP2_SYSCALL
+ /* This code is actually a couple of cycles slower than the
+ sys_mmap version below, so it might seem like a loss. But the
+ code path inside the kernel is sufficiently much shorter to
+ make it a net gain to use mmap2 when it's known to be
+ available. */
+
+ /* shuffle args */
+ str r5, [sp, #-4]!
+ ldr r5, [sp, #8]
+ str r4, [sp, #-4]!
+ ldr r4, [sp, #8]
+
+ /* convert offset to pages */
+ movs ip, r5, lsl #20
+ bne .Linval
+ mov r5, r5, lsr #12
+
+ /* do the syscall */
+ swi SYS_ify (mmap2)
+
+ /* restore registers */
+2:
+ ldr r4, [sp], #4
+ ldr r5, [sp], #4
+
+ cmn r0, $4096
+ RETINSTR(movcc, pc, lr)
+ b PLTJMP(syscall_error)
+.Linval:
+ mov r0, #-EINVAL
+ b 2b
+# else
/* Because we can only get five args through the syscall interface, and
mmap() takes six, we need to build a parameter block and pass its
address instead. The 386 port does a similar trick. */
@@ -49,6 +85,7 @@ ENTRY (__mmap)
cmn r0, $4096
RETINSTR(movcc, pc, lr)
b PLTJMP(syscall_error);
+#endif
PSEUDO_END (__mmap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e7d334885507579fc9114cca9ae730b8e7740ee
commit 7e7d334885507579fc9114cca9ae730b8e7740ee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 14 19:53:42 2003 +0000
Rewrite.
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index 0b62413..1e2699d 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -22,47 +22,46 @@
/* void *memset (dstpp, c, len) */
ENTRY(memset)
- mov a4, a1
- cmp a3, $8 @ at least 8 bytes to do?
- blt 2f
- orr a2, a2, a2, lsl $8
- orr a2, a2, a2, lsl $16
+ mov r3, r0
+ cmp r2, #8
+ bcc 2f @ less than 8 bytes to move
+
1:
- tst a4, $3 @ aligned yet?
- strneb a2, [a4], $1
- subne a3, a3, $1
+ tst r3, #3 @ aligned yet?
+ strneb r1, [r3], #1
+ subne r2, r2, #1
bne 1b
- mov ip, a2
+
+ orr r1, r1, r1, lsl $8
+ orr r1, r1, r1, lsl $16
+
1:
- cmp a3, $8 @ 8 bytes still to do?
- blt 2f
- stmia a4!, {a2, ip}
- sub a3, a3, $8
- cmp a3, $8 @ 8 bytes still to do?
- blt 2f
- stmia a4!, {a2, ip}
- sub a3, a3, $8
- cmp a3, $8 @ 8 bytes still to do?
- blt 2f
- stmia a4!, {a2, ip}
- sub a3, a3, $8
- cmp a3, $8 @ 8 bytes still to do?
- stmgeia a4!, {a2, ip}
- subge a3, a3, $8
- bge 1b
+ subs r2, r2, #8
+ strcs r1, [r3], #4 @ store up to 32 bytes per loop iteration
+ strcs r1, [r3], #4
+ subcss r2, r2, #8
+ strcs r1, [r3], #4
+ strcs r1, [r3], #4
+ subcss r2, r2, #8
+ strcs r1, [r3], #4
+ strcs r1, [r3], #4
+ subcss r2, r2, #8
+ strcs r1, [r3], #4
+ strcs r1, [r3], #4
+ bcs 1b
+
+ and r2, r2, #7
2:
- movs a3, a3 @ anything left?
- RETINSTR(moveq,pc,lr) @ nope
- rsb a3, a3, $7
- add pc, pc, a3, lsl $2
- mov r0, r0
- strb a2, [a4], $1
- strb a2, [a4], $1
- strb a2, [a4], $1
- strb a2, [a4], $1
- strb a2, [a4], $1
- strb a2, [a4], $1
- strb a2, [a4], $1
- RETINSTR(mov,pc,lr)
+ subs r2, r2, #1 @ store up to 4 bytes per loop iteration
+ strcsb r1, [r3], #1
+ subcss r2, r2, #1
+ strcsb r1, [r3], #1
+ subcss r2, r2, #1
+ strcsb r1, [r3], #1
+ subcss r2, r2, #1
+ strcsb r1, [r3], #1
+ bcs 2b
+
+ DO_RET(lr)
END(memset)
libc_hidden_builtin_def (memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8525f64d52ab5a757622e426eb6a46fd0e5897bb
commit 8525f64d52ab5a757622e426eb6a46fd0e5897bb
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 10 23:38:52 2003 +0000
2003-09-10 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Fix
syscall invocation.
* sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise.
Also, only assert off_t size is 4 for N32 and O32, and clean up
white space.
* sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 86d47e9..7a9b086 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -51,32 +51,33 @@ __libc_pread (fd, buf, count, offset)
{
ssize_t result;
+#if (defined _ABI64 && _MIPS_SIM != _ABI64)
+ assert (sizeof (offset) == 4);
+#endif
+
if (SINGLE_THREAD_P)
{
- /* First try the syscall. */
- assert (sizeof (offset) == 4);
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+ /* First try the syscall. */
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
+ offset);
#else
- result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (offset >> 31, offset));
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
#endif
# if __ASSUME_PREAD_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pread (fd, buf, count, offset);
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread (fd, buf, count, offset);
# endif
- return result;
+ return result;
}
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
- assert (sizeof (offset) == 4);
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (offset >> 31, offset));
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 9a20987..25f80df 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -54,8 +54,8 @@ __libc_pread64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count,
offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
@@ -73,9 +73,8 @@ __libc_pread64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pread, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 6fb7453..3c0eba5 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -51,33 +51,33 @@ __libc_pwrite (fd, buf, count, offset)
{
ssize_t result;
+#if (defined _ABI64 && _MIPS_SIM != _ABI64)
+ assert (sizeof (offset) == 4);
+#endif
+
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
- assert (sizeof (offset) == 4);
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
+ offset);
#else
- result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (offset >> 31, offset));
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
#endif
# if __ASSUME_PWRITE_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pwrite (fd, buf, count, offset);
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite (fd, buf, count, offset);
# endif
-
return result;
}
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
- assert (sizeof (offset) == 4);
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (offset >> 31, offset));
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 3ac4233..fef333b 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -53,8 +53,8 @@ __libc_pwrite64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count,
offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
@@ -73,9 +73,8 @@ __libc_pwrite64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
- offset);
+#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) || (defined _ABI64 && _MIPS_SIM == _ABI64)
+ result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=855bf8c1dfcc708aa7cdcceedead8bec04329b5b
commit 855bf8c1dfcc708aa7cdcceedead8bec04329b5b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 9 20:10:22 2003 +0000
2003-09-08 Chris Demetriou <cgd@broadcom.com>
* sysdeps/mips/mips64/n32/Implies: Move ieee754/ldbl-128 to
the top of the list.
* sysdeps/mips/mips64/n64/Implies: Likewise.
diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies
index b2072be..a7cb280 100644
--- a/sysdeps/mips/mips64/n32/Implies
+++ b/sysdeps/mips/mips64/n32/Implies
@@ -1,4 +1,4 @@
+ieee754/ldbl-128
mips/mips64
mips
wordsize-32
-ieee754/ldbl-128
diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies
index 5e88e3a..e507786 100644
--- a/sysdeps/mips/mips64/n64/Implies
+++ b/sysdeps/mips/mips64/n64/Implies
@@ -1,4 +1,4 @@
+ieee754/ldbl-128
mips/mips64
mips
wordsize-64
-ieee754/ldbl-128
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa38a5c081eaa3cacbb48fbc068a226195c391a8
commit aa38a5c081eaa3cacbb48fbc068a226195c391a8
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 9 19:21:51 2003 +0000
2003-09-09 Chris Demetriou <cgd@broadcom.com>
* sysdeps/unix/mips/sysdep.h (PSEUDO_END): Undef before defining.
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index dd2795e..9302710 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -37,6 +37,7 @@
#define ret j ra ; nop
+#undef PSEUDO_END
#define PSEUDO_END(sym) .end sym; .size sym,.-sym
#define PSEUDO_NOERRNO(name, syscall_name, args) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad8d610d5cef042fef5d04facab4787aa94e3598
commit ad8d610d5cef042fef5d04facab4787aa94e3598
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 9 07:00:21 2003 +0000
2003-09-05 Roland McGrath <roland@redhat.com>
* pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
Instead, include ../nptl_db/db_info.c to do its magic.
* pthread_key_create.c (__pthread_pthread_keys_max): Removed.
(__pthread_pthread_key_2ndlevel_size): Likewise.
* sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
* sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
* sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
* sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
* sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
* sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
* sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
* sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
* sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
* sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
diff --git a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c
deleted file mode 100644
index b30b10b..0000000
--- a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Which thread is running on an LWP? PowerPC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-#include <tls.h>
-
-
-td_err_e
-td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
-{
- LOG ("td_ta_map_lwp2thr");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- prgregset_t regs;
- if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
- return TD_ERR;
-
- /* The uniq value is stored in slot 33 in recent gdb; it isn't stored
- anywhere otherwise. */
- th->th_unique = ((void *) regs[32]
- - TLS_TCB_OFFSET - TLS_TCB_SIZE - TLS_PRE_TCB_SIZE);
-
- /* Found it. Now complete the `td_thrhandle_t' object. */
- th->th_ta_p = (td_thragent_t *) ta;
-
- return TD_OK;
-}
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 1718b3e..8f61bb7 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -118,6 +118,10 @@ typedef struct
((struct pthread *) (__builtin_thread_pointer () \
- TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+/* Magic for libthread_db to know how to do THREAD_SELF. */
+# define DB_THREAD_SELF \
+ REGISTER (64, 32 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+
/* Identifier for the current thread. THREAD_SELF is usable but
sometimes more expensive than necessary as in this case. */
# define THREAD_ID (__builtin_thread_pointer ())
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25c0b916b6bdf86470d8977839d505f4da23bbce
commit 25c0b916b6bdf86470d8977839d505f4da23bbce
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 9 06:44:48 2003 +0000
2003-09-08 Roland McGrath <roland@frob.com>
* sysdeps/unix/sysv/linux/speed.c
(cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED].
(cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED].
* sysdeps/unix/sysv/linux/bits/termios.h
(_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 079073d..0abe34f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -1,5 +1,6 @@
/* termios type and macro definitions. Linux version.
- Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
+ Copyright (C) 1993,1994,1995,1996,1997,1999,2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +37,8 @@ struct termios
cc_t c_line; /* line discipline (== c_cc[33]) */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
};
/* c_cc characters */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea72a68d42cb620ccd38a309f6036361300a3151
commit ea72a68d42cb620ccd38a309f6036361300a3151
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 8 23:56:13 2003 +0000
Change type of pthread_t to be compatible with LT.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
index bd5ab97..2d8a00b 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -33,7 +33,7 @@
/* Thread identifiers. The structure of the attribute type is
deliberately not exposed. */
-typedef struct __opaque_pthread *pthread_t;
+typedef unsigned long int pthread_t;
typedef union
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49d7842ab59c52d91a71ad1c32502f9eddb17eb6
commit 49d7842ab59c52d91a71ad1c32502f9eddb17eb6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:21:27 2003 +0000
Remove unused __syscall_* prototypes.
diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c
index 3a48afc..4e15ee4 100644
--- a/sysdeps/unix/sysv/linux/alpha/gethostname.c
+++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001
@@ -25,9 +25,6 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-extern int __syscall_gethostname (char *name, size_t len);
-
-
int
__gethostname (char *name, size_t len)
{
diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
index f0b47d2..0328dc0 100644
--- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
+++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
@@ -32,15 +32,7 @@ struct __old_ipc_perm
};
-__BEGIN_DECLS
-
-/* The actual system call: all functions are multiplexed by this. */
-extern int __syscall_ipc (int __call, int __first, int __second,
- int __third, void *__ptr);
-
-__END_DECLS
-
-/* The codes for the functions to use the multiplexer `__syscall_ipc'. */
+/* The codes for the functions to use the ipc syscall multiplexer. */
#define IPCOP_semop 1
#define IPCOP_semget 2
#define IPCOP_semctl 3
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index d543fe3..1b75af2 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -45,8 +45,6 @@ struct __old_msqid_ds
__ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
};
-extern int __syscall_msgctl (int, int, void *);
-
/* Allows to control internal state and destruction of message queue
objects. */
int __new_msgctl (int, int, struct msqid_ds *);
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 6f164b4..224baf3 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -52,8 +52,6 @@ union semun
#include <bp-checks.h>
#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
-extern int __syscall_semctl (int, int, int, void *);
-
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
int __new_semctl (int semid, int semnum, int cmd, ...);
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index 0a6cdf1..7dec3a7 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@@ -53,8 +53,6 @@ struct __old_shminfo
int shmall;
};
-extern int __syscall_shmctl (int, int, void *);
-
/* Provide operations to control over shared memory segments. */
int __new_shmctl (int, int, struct shmid_ds *);
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 82e22b6..81b29ad 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -29,11 +29,6 @@
translate it here. */
#include <kernel_sigaction.h>
-extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
- struct old_kernel_sigaction *__unbounded);
-extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
- struct kernel_sigaction *__unbounded, size_t);
-
/* The variable is shared between all wrappers around signal handling
functions which have RT equivalents. */
int __libc_missing_rt_sigs;
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index ad0386d..735fa57 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,13 +26,7 @@
#include <linux/posix_types.h>
#include "kernel-features.h"
-extern int __syscall_chown (const char *__unbounded __file,
- __kernel_uid_t __owner, __kernel_gid_t __group);
-
#ifdef __NR_chown32
-extern int __syscall_chown32 (const char *__unbounded __file,
- __kernel_uid32_t owner, __kernel_gid32_t group);
-
# if __ASSUME_32BITUIDS == 0
/* This variable is shared with all files that need to check for 32bit
uids. */
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index fc88539..cdb2d56 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,11 +33,6 @@
extern int __have_no_truncate64;
#endif
-/* The order of hight, low depends on endianness. */
-extern int __syscall_ftruncate64 (int fd, int dummy, int high_length,
- int low_length);
-
-
/* Truncate the file FD refers to to LENGTH bytes. */
int
__ftruncate64 (int fd, off64_t length)
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 28fdca6..86d47e9 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -41,16 +41,6 @@
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
# endif
-extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
- int dummy,
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- off_t offset
-#else
- off_t offset_hi, off_t offset_lo
-#endif
- );
-
-
ssize_t
__libc_pread (fd, buf, count, offset)
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 7dcd008..9a20987 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -41,17 +41,6 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
off64_t offset) internal_function;
# endif
-extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
- int dummy,
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- off_t offset
-#else
- off_t offset_hi, off_t offset_lo
-#endif
- );
-
-
-
ssize_t
__libc_pread64 (fd, buf, count, offset)
int fd;
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
index b67fe83..78c662a 100644
--- a/sysdeps/unix/sysv/linux/mips/ptrace.c
+++ b/sysdeps/unix/sysv/linux/mips/ptrace.c
@@ -33,9 +33,6 @@ __extension__ typedef long long int reg_type;
typedef long int reg_type;
#endif
-extern reg_type __syscall_ptrace (int, pid_t, void *__unbounded,
- reg_type __unbounded);
-
reg_type
ptrace (enum __ptrace_request request, ...)
{
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index fa3de15..6fb7453 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -37,15 +37,6 @@
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
- int dummy,
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- off_t offset
-#else
- off_t offset_hi, off_t offset_lo
-#endif
- );
-
# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
off_t offset) internal_function;
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 5b481b2..3ac4233 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -36,15 +36,6 @@
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
- int dummy,
-#if defined _ABI64 && _MIPS_SIM == _ABI64
- off_t offset
-#else
- off_t offset_hi, off_t offset_lo
-#endif
- );
-
# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
off64_t offset) internal_function;
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 2a99bac..bc7db2b 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -35,11 +35,7 @@
functions which have RT equivalents. This is the definition. */
int __libc_missing_rt_sigs;
-extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
- struct old_kernel_sigaction *__unbounded);
#endif
-extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
- struct kernel_sigaction *__unbounded, size_t);
#if _MIPS_SIM != _MIPS_SIM_ABI32
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index 3bb73ce..e955f18 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,11 +34,6 @@
int __have_no_truncate64;
#endif
-/* The order of hight, low depends on endianness. */
-extern int __syscall_truncate64 (const char *__unbounded path, int dummy,
- int high_length, int low_length);
-
-
/* Truncate the file FD refers to to LENGTH bytes. */
int
truncate64 (const char *path, off64_t length)
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
index 8f5002c..a309f71 100644
--- a/sysdeps/unix/sysv/linux/mips/ustat.c
+++ b/sysdeps/unix/sysv/linux/mips/ustat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -25,8 +25,6 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-extern int __syscall_ustat (unsigned long dev, struct ustat *__unbounded ubuf);
-
int
ustat (dev_t dev, struct ustat *ubuf)
{
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
index 217c9c2..2d09752 100644
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -1,5 +1,6 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991,93,95,96,97,98,00,2002 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,8 +27,6 @@
#include <sys/syscall.h>
#include <bp-checks.h>
-extern int __syscall_mknod (const char *__unbounded, unsigned long, unsigned int);
-
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=679ee4e361a3a6a65034d61277c133bdca6df120
commit 679ee4e361a3a6a65034d61277c133bdca6df120
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:16:54 2003 +0000
(sysdep_routines): Remove rt_*.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 24c7ee9..0ccdbe8 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -4,9 +4,7 @@ sysdep_headers += sys/elf.h sys/io.h
endif
ifeq ($(subdir),signal)
-sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending \
- sigrestorer
+sysdep_routines += sigrestorer
endif
ifeq ($(subdir),resource)
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 6703778..d65175f 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -1,6 +1,4 @@
ifeq ($(subdir),signal)
-sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending
#sysdep_routines += sigsuspend
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3c37d6c951619f28e984deb5c74435119bcc15e
commit b3c37d6c951619f28e984deb5c74435119bcc15e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:16:40 2003 +0000
(__syscall_*): Remove unused __syscall_ stubs.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 61ac699..1db0030 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -1,16 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
-s_getgroups getgroups getgroups 2 __syscall_getgroups
-s_llseek llseek _llseek 5 __syscall__llseek
-s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
-s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
-s_setgid setgid setgid 1 __syscall_setgid
-s_setgroups setgroups setgroups 2 __syscall_setgroups
-s_setregid setregid setregid 2 __syscall_setregid
-s_setresgid setresgid setresgid 3 __syscall_setresgid
-s_setresuid setresuid setresuid 3 __syscall_setresuid
-s_setreuid setreuid setreuid 2 __syscall_setreuid
-s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 7 syscall
oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 51789a7..518f2a2 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -8,8 +8,6 @@ cachectl - cachectl i:pii __cachectl cachectl
cacheflush - cacheflush i:pii _flush_cache cacheflush
sysmips - sysmips i:iiii __sysmips sysmips
-s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
-
#
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
@@ -31,11 +29,3 @@ setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
socketpair - socketpair i:iiif __socketpair socketpair
-
-# System calls with wrappers.
-rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction
-rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df9cbb61e321ac5a0a87b787e99ccf3b67d6ad29
commit df9cbb61e321ac5a0a87b787e99ccf3b67d6ad29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:16:25 2003 +0000
(__syscall_recvfrom, __syscall_sendto): Remove unused aliases.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index 14ad564..b6d2e94 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -3,8 +3,8 @@
lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
# proper socket implementations:
-recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom __syscall_recvfrom
-sendto - sendto i:ibnibn __libc_sendto __sendto sendto __syscall_sendto
+recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
+sendto - sendto i:ibnibn __libc_sendto __sendto sendto
# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b89b553b5495aec89a9546ec26943de36441e5b7
commit b89b553b5495aec89a9546ec26943de36441e5b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:15:51 2003 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile
deleted file mode 100644
index 9d02ace..0000000
--- a/sysdeps/unix/sysv/linux/cris/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-ifeq ($(subdir),signal)
-sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc7f67a8e83d8a66cf0a7be9fe61538be2796a54
commit dc7f67a8e83d8a66cf0a7be9fe61538be2796a54
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:15:08 2003 +0000
(__syscall_rt_sigaction): New prototype.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c
index 1bfba1b..952ee40 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigaction.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c
@@ -30,4 +30,7 @@
? __syscall_rt_sigaction(args) \
: INLINE_SYSCALL1(name, nr, args))
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
+ struct kernel_sigaction *__unbounded, size_t);
+
#include <sysdeps/unix/sysv/linux/sigaction.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e4d3d9dbdcc67a7f1783c52dfad83d8e32aac59
commit 0e4d3d9dbdcc67a7f1783c52dfad83d8e32aac59
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:14:43 2003 +0000
(sysdep_routines): Remove rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait,
rt_sigqueueinfo and rt_sigpending.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 6ec4976..3097cc3 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -20,6 +20,5 @@ CFLAGS-ioperm.c = -Wa,-mev6
endif
ifeq ($(subdir),signal)
-sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending
+sysdep_routines += rt_sigaction
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d87ab9bc127edfcf7b4bfccd77bd2bec6b68e2a0
commit d87ab9bc127edfcf7b4bfccd77bd2bec6b68e2a0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:10:25 2003 +0000
Additional versions for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Versions b/sysdeps/unix/sysv/linux/alpha/nptl/Versions
index 3b111dd..437c4da 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/Versions
@@ -1,3 +1,9 @@
+libpthread {
+ GLIBC_2.3.3 {
+ # Changed PTHREAD_STACK_MIN.
+ pthread_attr_setstack; pthread_attr_setstacksize;
+ }
+}
librt {
GLIBC_2.3.3 {
# Changed timer_t.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=82019706cf1e3eb089ed620b95913e47e0599936
commit 82019706cf1e3eb089ed620b95913e47e0599936
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 3 03:10:01 2003 +0000
POSIX limits for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
new file mode 100644
index 0000000..e2a363f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/local_lim.h
@@ -0,0 +1,83 @@
+/* Minimum guaranteed maximum values for system limits. Linux/Alpha version.
+ Copyright (C) 1993-1998, 2000, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The kernel header pollutes the namespace with the NR_OPEN symbol
+ and defines LINK_MAX although filesystems have different maxima. A
+ similar thing is true for OPEN_MAX: the limit can be changed at
+ runtime and therefore the macro must not be defined. Remove this
+ after including the header if necessary. */
+#ifndef NR_OPEN
+# define __undef_NR_OPEN
+#endif
+#ifndef LINK_MAX
+# define __undef_LINK_MAX
+#endif
+#ifndef OPEN_MAX
+# define __undef_OPEN_MAX
+#endif
+
+/* The kernel sources contain a file with all the needed information. */
+#include <linux/limits.h>
+
+/* Have to remove NR_OPEN? */
+#ifdef __undef_NR_OPEN
+# undef NR_OPEN
+# undef __undef_NR_OPEN
+#endif
+/* Have to remove LINK_MAX? */
+#ifdef __undef_LINK_MAX
+# undef LINK_MAX
+# undef __undef_LINK_MAX
+#endif
+/* Have to remove OPEN_MAX? */
+#ifdef __undef_OPEN_MAX
+# undef OPEN_MAX
+# undef __undef_OPEN_MAX
+#endif
+
+/* The number of data keys per process. */
+#define _POSIX_THREAD_KEYS_MAX 128
+/* This is the value this implementation supports. */
+#define PTHREAD_KEYS_MAX 1024
+
+/* Controlling the iterations of destructors for thread-specific data. */
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
+/* Number of iterations this implementation does. */
+#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
+
+/* The number of threads per process. */
+#define _POSIX_THREAD_THREADS_MAX 64
+/* We have no predefined limit on the number of threads. */
+#undef PTHREAD_THREADS_MAX
+
+/* Maximum amount by which a process can descrease its asynchronous I/O
+ priority level. */
+#define AIO_PRIO_DELTA_MAX 20
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 24576
+
+/* Maximum number of timer expiration overruns. */
+#define DELAYTIMER_MAX 2147483647
+
+/* Maximum tty name length. */
+#define TTY_NAME_MAX 32
+
+/* Maximum login name length. This is arbitrary. */
+#define LOGIN_NAME_MAX 256
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6df9debb1db4c2a8db5b1989d60cf58c48e2627
commit c6df9debb1db4c2a8db5b1989d60cf58c48e2627
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Sep 1 21:38:14 2003 +0000
New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Versions b/sysdeps/unix/sysv/linux/alpha/nptl/Versions
new file mode 100644
index 0000000..3b111dd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/Versions
@@ -0,0 +1,7 @@
+librt {
+ GLIBC_2.3.3 {
+ # Changed timer_t.
+ timer_create; timer_delete; timer_getoverrun; timer_gettime;
+ timer_settime;
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c b/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c
new file mode 100644
index 0000000..0d6da82
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/aio_cancel.c
@@ -0,0 +1,33 @@
+#include <shlib-compat.h>
+
+#define aio_cancel64 XXX
+#include <aio.h>
+#undef aio_cancel64
+#include <errno.h>
+
+extern __typeof (aio_cancel) __new_aio_cancel;
+extern __typeof (aio_cancel) __old_aio_cancel;
+
+#define aio_cancel __new_aio_cancel
+
+#include <sysdeps/pthread/aio_cancel.c>
+
+#undef aio_cancel
+strong_alias (__new_aio_cancel, __new_aio_cancel64);
+versioned_symbol (librt, __new_aio_cancel, aio_cancel, GLIBC_2_3);
+versioned_symbol (librt, __new_aio_cancel64, aio_cancel64, GLIBC_2_3);
+
+#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3)
+
+#undef ECANCELED
+#define aio_cancel __old_aio_cancel
+#define ECANCELED 125
+
+#include <sysdeps/pthread/aio_cancel.c>
+
+#undef aio_cancel
+strong_alias (__old_aio_cancel, __old_aio_cancel64);
+compat_symbol (librt, __old_aio_cancel, aio_cancel, GLIBC_2_1);
+compat_symbol (librt, __old_aio_cancel64, aio_cancel64, GLIBC_2_1);
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
new file mode 100644
index 0000000..172223a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_create.c
@@ -0,0 +1 @@
+#include "../x86_64/timer_create.c"
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
new file mode 100644
index 0000000..537516e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_delete.c
@@ -0,0 +1 @@
+#include "../x86_64/timer_delete.c"
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
new file mode 100644
index 0000000..3f21a73
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_getoverr.c
@@ -0,0 +1 @@
+#include "../x86_64/timer_getoverr.c"
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
new file mode 100644
index 0000000..a50143a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_gettime.c
@@ -0,0 +1 @@
+#include "../x86_64/timer_gettime.c"
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
new file mode 100644
index 0000000..37baeff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/timer_settime.c
@@ -0,0 +1 @@
+#include "../x86_64/timer_settime.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ff5cf2c6f0d6918d017ac02a6172e0dcd9f32e4
commit 8ff5cf2c6f0d6918d017ac02a6172e0dcd9f32e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 31 18:13:35 2003 +0000
Add posix_fadvise64 and posix_fallocate64 at GLIBC_2.3.3.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 32cb185..2ddb2af 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -31,4 +31,7 @@ libc {
# v*
versionsort64;
}
+ GLIBC_2.3.3 {
+ posix_fadvise64; posix_fallocate64;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62810a52b584246c77d8d8bb8d6cf7f9f76534d2
commit 62810a52b584246c77d8d8bb8d6cf7f9f76534d2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 30 00:23:14 2003 +0000
Add semtimedop.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index bc977e2..0f7537c 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -10,6 +10,7 @@ shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
+semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae53e7a785e1af5b1ad189c64c474236becbe75d
commit ae53e7a785e1af5b1ad189c64c474236becbe75d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 25 18:30:43 2003 +0000
(PSEUDO_ERRVAL): Define.
(PSEUDO_END_ERRVAL, ret_ERRVAL): Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 47383aa..fda7c5b 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -80,6 +80,20 @@
#define PSEUDO_END_NOERRNO(name) \
END (name)
+/* The function has to return the error code. */
+#undef PSEUDO_ERRVAL
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ rsb r0, r0, #0
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(name) \
+ END (name)
+
+#define ret_ERRVAL PSEUDO_RET_NOERRNO
+
#if NOT_IN_libc
# define SYSCALL_ERROR __local_syscall_error
# define SYSCALL_ERROR_HANDLER \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6df4fa6a266c05db06f28672b0396cfb64aa19d
commit a6df4fa6a266c05db06f28672b0396cfb64aa19d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 17 00:34:12 2003 +0000
(posix_fadvise64): Add V flag.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 60235d0..d30a9b6 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,7 +21,7 @@ getpriority - getpriority i:ii __getpriority getpriority
mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
-posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
+posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise
pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=724bab37c1fe6c38bdff0dca2512309a5a971ea4
commit 724bab37c1fe6c38bdff0dca2512309a5a971ea4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 17 00:33:13 2003 +0000
(PSEUDO_ERRVAL, PSEUDO_RET_ERRVAL, ret_ERRVAL, PSEUDO_END_ERRVAL): Define.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index b9bc1c0..f12edef 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -134,6 +134,21 @@ __LABEL(name) \
#define ret_NOERRNO ret
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .globl name; \
+ .align 4; \
+ .ent name,0; \
+__LABEL(name) \
+ PSEUDO_PROLOGUE; \
+ PSEUDO_PREPARE_ARGS \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys;
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(sym) END(sym)
+
+#define ret_ERRVAL ret
+
#define r0 v0
#define r1 a4
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 13a3752..dd2795e 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -51,6 +51,18 @@
#define ret_NOERRNO ret
+#define PSEUDO_ERRVAL(name, syscall_name, args) \
+ .align 2; \
+ ENTRY(name) \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall
+
+#undef PSEUDO_END_ERRVAL
+#define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
+
+#define ret_ERRVAL ret
+
#define r0 v0
#define r1 v1
/* The mips move insn is d,s. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f98259f8e3e46623d75e1cd09f99cbdf6e1e699e
commit f98259f8e3e46623d75e1cd09f99cbdf6e1e699e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 16 08:06:54 2003 +0000
Don't add new posix_fadvise64_64 syscall.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 78feb7a..60235d0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,8 +21,7 @@ getpriority - getpriority i:ii __getpriority getpriority
mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
-posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.2
-posix_fadvise64_64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.3.3
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4164f54c6ab5ccbd6b9ce0d9ba2483362acb260
commit a4164f54c6ab5ccbd6b9ce0d9ba2483362acb260
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 16 06:18:46 2003 +0000
Define posix_fadvise64_64 entry. Add version info to posix_fadvise64 entry.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 60235d0..78feb7a 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,7 +21,8 @@ getpriority - getpriority i:ii __getpriority getpriority
mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
-posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.2
+posix_fadvise64_64 - fadvise64 4 posix_fadvise64 posix_fadvise@GLIBC_2.3.3
pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0be7f50d109347678e55eaa140ce4b60b1112c23
commit 0be7f50d109347678e55eaa140ce4b60b1112c23
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 16 06:13:49 2003 +0000
AIX posix_madvise implementation.
diff --git a/sysdeps/unix/sysv/aix/posix_madvise.c b/sysdeps/unix/sysv/aix/posix_madvise.c
new file mode 100644
index 0000000..7ab4bed
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/posix_madvise.c
@@ -0,0 +1,8 @@
+#include <errno.h>
+#include <sys/mman.h>
+
+int
+posix_madvise (void *addr, size_t len, int advise)
+{
+ return madvise (addr, len, advise) ? errno : 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=591ef241f8e6e003de64ba07a3dded04d737ef1e
commit 591ef241f8e6e003de64ba07a3dded04d737ef1e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 31 19:34:16 2003 +0000
(__SSIZE_T_TYPE): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
index 2fb0388..201585a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -57,6 +57,7 @@
#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __U32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
+#define __SSIZE_T_TYPE __SWORD_TYPE
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab69220d3cfa3214de15ca3fc61940e9dd17ac43
commit ab69220d3cfa3214de15ca3fc61940e9dd17ac43
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 31 19:15:42 2003 +0000
(PT_EI): Add __attribute__((always_inline)).
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index 71001eb..a4c2f31 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent pthreads configuration and inline functions.
ARM version.
- Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -23,7 +23,7 @@
#define _PT_MACHINE_H 1
#ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
#endif
extern long int testandset (int *spinlock);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5027ae109a7168f340ba83781f14d68df162f868
commit 5027ae109a7168f340ba83781f14d68df162f868
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Jul 31 06:33:52 2003 +0000
* elf/dynamic-link.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Don't assume
reloc_addr is aligned.
* sysdeps/alpha/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
* sysdeps/cris/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/hppa/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
* sysdeps/ia64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/m68k/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/mips/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/powerpc/powerpc64/dl-machine.h
(elf_machine_rela_relative, elf_machine_rela): Adjust.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative):
* sysdeps/sh/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/x86_64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 0101ba4..b3c1eac 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -512,8 +512,9 @@ elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
const struct r_found_version *version,
- Elf64_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf64_Addr *const reloc_addr = reloc_addr_arg;
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
@@ -538,15 +539,14 @@ elf_machine_rela (struct link_map *map,
{
/* XXX Make some timings. Maybe it's preferable to test for
unaligned access and only do it the complex way if necessary. */
- void *reloc_addr_1 = reloc_addr;
Elf64_Addr reloc_addr_val;
/* Load value without causing unaligned trap. */
- memcpy (&reloc_addr_val, reloc_addr_1, 8);
+ memcpy (&reloc_addr_val, reloc_addr_arg, 8);
reloc_addr_val += map->l_addr;
/* Store value without causing unaligned trap. */
- memcpy (reloc_addr_1, &reloc_addr_val, 8);
+ memcpy (reloc_addr_arg, &reloc_addr_val, 8);
}
}
else
@@ -598,10 +598,8 @@ elf_machine_rela (struct link_map *map,
#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
{
- void *reloc_addr_1 = reloc_addr;
-
/* Store value without causing unaligned trap. */
- memcpy (reloc_addr_1, &sym_value, 8);
+ memcpy (reloc_addr_arg, &sym_value, 8);
}
#endif
#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
@@ -649,19 +647,18 @@ elf_machine_rela (struct link_map *map,
static inline void
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
- Elf64_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
- /* XXX Make some timings. Maybe it's preverable to test for
+ /* XXX Make some timings. Maybe it's preferable to test for
unaligned access and only do it the complex way if necessary. */
- void *reloc_addr_1 = reloc_addr;
Elf64_Addr reloc_addr_val;
/* Load value without causing unaligned trap. */
- memcpy (&reloc_addr_val, reloc_addr_1, 8);
+ memcpy (&reloc_addr_val, reloc_addr_arg, 8);
reloc_addr_val += l_addr;
/* Store value without causing unaligned trap. */
- memcpy (reloc_addr_1, &reloc_addr_val, 8);
+ memcpy (reloc_addr_arg, &reloc_addr_val, 8);
}
static inline void
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 074762e..9c11f0b 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -419,8 +420,9 @@ fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
static inline void
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
@@ -470,8 +472,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
- memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
- refsym->st_size));
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
@@ -544,8 +546,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
@@ -581,8 +584,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
- memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
- refsym->st_size));
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
break;
# endif /* !RESOLVE_CONFLICT_FIND_MAP */
case R_ARM_GLOB_DAT:
@@ -623,16 +626,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
static inline void
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
*reloc_addr += l_addr;
}
# ifndef RTLD_BOOTSTRAP
static inline void
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
*reloc_addr = l_addr + reloc->r_addend;
}
# endif
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 0fa13a7..7354c49 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. CRIS version.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -280,8 +280,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0))
@@ -322,8 +323,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
- memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
- refsym->st_size));
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
break;
case R_CRIS_32:
@@ -364,8 +365,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
static inline void
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
*reloc_addr = l_addr + reloc->r_addend;
}
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 9cc10c4..cd180e7 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -1,5 +1,6 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997,1999,2000,2001,2002, 2003
+ Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
@@ -481,8 +482,9 @@ asm ( \
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
const Elf32_Sym *const refsym = sym;
unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
struct link_map *sym_map;
@@ -531,9 +533,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
return;
#endif
/* .eh_frame can have unaligned relocs. */
- if ((unsigned long) reloc_addr & 3)
+ if ((unsigned long) reloc_addr_arg & 3)
{
- char *rel_addr = (char *) reloc_addr;
+ char *rel_addr = (char *) reloc_addr_arg;
rel_addr[0] = value >> 24;
rel_addr[1] = value >> 16;
rel_addr[2] = value >> 8;
@@ -614,7 +616,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
- memcpy (reloc_addr, (void *) value,
+ memcpy (reloc_addr_arg, (void *) value,
MIN (sym->st_size, refsym->st_size));
return;
@@ -637,8 +639,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
static inline void
elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
Elf32_Addr value;
@@ -651,9 +654,9 @@ elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
{
case R_PARISC_DIR32:
/* .eh_frame can have unaligned relocs. */
- if ((unsigned long) reloc_addr & 3)
+ if ((unsigned long) reloc_addr_arg & 3)
{
- char *rel_addr = (char *) reloc_addr;
+ char *rel_addr = (char *) reloc_addr_arg;
rel_addr[0] = value >> 24;
rel_addr[1] = value >> 16;
rel_addr[2] = value >> 8;
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index a09f611..5ae53a4 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -229,8 +229,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
static inline void __attribute__ ((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
if (__builtin_expect (r_type == R_68K_RELATIVE, 0))
@@ -260,8 +261,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
- memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
- refsym->st_size));
+ memcpy (reloc_addr_arg, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
break;
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
@@ -298,8 +299,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
static inline void
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+ void *const reloc_addr_arg)
{
+ Elf32_Addr *const reloc_addr = reloc_addr_arg;
*reloc_addr = l_addr + reloc->r_addend;
}
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index f644441..a402b39 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -534,10 +534,7 @@ static inline void
#endif
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
- /* We use void* because the location to be relocated
- is not required to be properly aligned for a
- ELFW(Addr). */
- void /* ElfW(Addr) */ *const reloc_addr)
+ void *const reloc_addr)
{
const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
@@ -640,7 +637,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
static inline void
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- void /* ElfW(Addr) */ *const reloc_addr)
+ void *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=775a8c02e14723569f70f2109d32a3db93fc8aed
commit 775a8c02e14723569f70f2109d32a3db93fc8aed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 25 09:04:57 2003 +0000
Header with a.out binary format definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/a.out.h b/sysdeps/unix/sysv/linux/alpha/a.out.h
new file mode 100644
index 0000000..a7699f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/a.out.h
@@ -0,0 +1,197 @@
+#ifndef __A_OUT_GNU_H__
+#define __A_OUT_GNU_H__
+
+#include <bits/a.out.h>
+
+#define __GNU_EXEC_MACROS__
+
+/*
+ * OSF/1 ECOFF header structs. ECOFF files consist of:
+ * - a file header (struct filehdr),
+ * - an a.out header (struct aouthdr),
+ * - one or more section headers (struct scnhdr).
+ * The filhdr's "f_nscns" field contains the
+ * number of section headers.
+ */
+
+struct filehdr
+{
+ /* OSF/1 "file" header */
+ unsigned short f_magic, f_nscns;
+ unsigned int f_timdat;
+ unsigned long f_symptr;
+ unsigned int f_nsyms;
+ unsigned short f_opthdr, f_flags;
+};
+
+struct aouthdr
+{
+ unsigned long info; /* After that it looks quite normal.. */
+ unsigned long tsize;
+ unsigned long dsize;
+ unsigned long bsize;
+ unsigned long entry;
+ unsigned long text_start; /* With a few additions that actually make sense. */
+ unsigned long data_start;
+ unsigned long bss_start;
+ unsigned int gprmask, fprmask; /* Bitmask of general & floating point regs used in binary. */
+ unsigned long gpvalue;
+};
+
+struct scnhdr
+{
+ char s_name[8];
+ unsigned long s_paddr;
+ unsigned long s_vaddr;
+ unsigned long s_size;
+ unsigned long s_scnptr;
+ unsigned long s_relptr;
+ unsigned long s_lnnoptr;
+ unsigned short s_nreloc;
+ unsigned short s_nlnno;
+ unsigned int s_flags;
+};
+
+struct exec
+{
+ /* OSF/1 "file" header */
+ struct filehdr fh;
+ struct aouthdr ah;
+};
+
+#define a_info ah.info
+#define a_text ah.tsize
+#define a_data ah.dsize
+#define a_bss ah.bsize
+#define a_entry ah.entry
+#define a_textstart ah.text_start
+#define a_datastart ah.data_start
+#define a_bssstart ah.bss_start
+#define a_gprmask ah.gprmask
+#define a_fprmask ah.fprmask
+#define a_gpvalue ah.gpvalue
+
+
+#define AOUTHSZ sizeof(struct aouthdr)
+#define SCNHSZ sizeof(struct scnhdr)
+#define SCNROUND 16
+
+enum machine_type
+{
+ M_OLDSUN2 = 0,
+ M_68010 = 1,
+ M_68020 = 2,
+ M_SPARC = 3,
+ M_386 = 100,
+ M_MIPS1 = 151,
+ M_MIPS2 = 152
+};
+
+#define N_MAGIC(exec) ((exec).a_info & 0xffff)
+#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+#define N_SET_INFO(exec, magic, type, flags) \
+ ((exec).a_info = ((magic) & 0xffff) \
+ | (((int)(type) & 0xff) << 16) \
+ | (((flags) & 0xff) << 24))
+#define N_SET_MAGIC(exec, magic) \
+ ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff))
+#define N_SET_MACHTYPE(exec, machtype) \
+ ((exec).a_info = \
+ ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+#define N_SET_FLAGS(exec, flags) \
+ ((exec).a_info = \
+ ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+
+/* Code indicating object file or impure executable. */
+#define OMAGIC 0407
+/* Code indicating pure executable. */
+#define NMAGIC 0410
+/* Code indicating demand-paged executable. */
+#define ZMAGIC 0413
+/* This indicates a demand-paged executable with the header in the text.
+ The first page is unmapped to help trap NULL pointer references. */
+#define QMAGIC 0314
+/* Code indicating core file. */
+#define CMAGIC 0421
+
+#define N_TRSIZE(x) 0
+#define N_DRSIZE(x) 0
+#define N_SYMSIZE(x) 0
+#define N_BADMAG(x) \
+ (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \
+ && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
+#define _N_HDROFF(x) (1024 - sizeof (struct exec))
+#define N_TXTOFF(x) \
+ ((long) N_MAGIC(x) == ZMAGIC ? 0 : \
+ (sizeof (struct exec) + (x).fh.f_nscns * SCNHSZ + SCNROUND - 1) \
+ & ~(SCNROUND - 1))
+
+#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
+#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
+#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
+#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
+#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
+
+/* Address of text segment in memory after it is loaded. */
+#define N_TXTADDR(x) ((x).a_textstart)
+
+/* Address of data segment in memory after it is loaded. */
+#define SEGMENT_SIZE 1024
+
+#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1))
+#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
+
+#define N_DATADDR(x) ((x).a_datastart)
+#define N_BSSADDR(x) ((x).a_bssstart)
+
+#if !defined (N_NLIST_DECLARED)
+struct nlist
+{
+ union
+ {
+ char *n_name;
+ struct nlist *n_next;
+ long n_strx;
+ } n_un;
+ unsigned char n_type;
+ char n_other;
+ short n_desc;
+ unsigned long n_value;
+};
+#endif /* no N_NLIST_DECLARED. */
+
+#define N_UNDF 0
+#define N_ABS 2
+#define N_TEXT 4
+#define N_DATA 6
+#define N_BSS 8
+#define N_FN 15
+#define N_EXT 1
+#define N_TYPE 036
+#define N_STAB 0340
+#define N_INDR 0xa
+#define N_SETA 0x14 /* Absolute set element symbol. */
+#define N_SETT 0x16 /* Text set element symbol. */
+#define N_SETD 0x18 /* Data set element symbol. */
+#define N_SETB 0x1A /* Bss set element symbol. */
+#define N_SETV 0x1C /* Pointer to set vector in data area. */
+
+#if !defined (N_RELOCATION_INFO_DECLARED)
+/* This structure describes a single relocation to be performed.
+ The text-relocation section of the file is a vector of these structures,
+ all of which apply to the text section.
+ Likewise, the data-relocation section applies to the data section. */
+
+struct relocation_info
+{
+ int r_address;
+ unsigned int r_symbolnum:24;
+ unsigned int r_pcrel:1;
+ unsigned int r_length:2;
+ unsigned int r_extern:1;
+ unsigned int r_pad:4;
+};
+#endif /* no N_RELOCATION_INFO_DECLARED. */
+
+#endif /* __A_OUT_GNU_H__ */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/a.out.h b/sysdeps/unix/sysv/linux/alpha/bits/a.out.h
new file mode 100644
index 0000000..82a3dd4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/a.out.h
@@ -0,0 +1,9 @@
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/a.out.h b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h
new file mode 100644
index 0000000..0fb52c3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/a.out.h
@@ -0,0 +1,3 @@
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff46117d2f800597cb2d53d726ef67d16e947650
commit ff46117d2f800597cb2d53d726ef67d16e947650
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 22:07:18 2003 +0000
(PROCINFO_CLASS): Define if not yet defined. Use it instead of EXTERN.
Undefine at the end of the file.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 9acd079..9b87a20 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -1,5 +1,5 @@
/* Data for Linux/ARM version of processor capability information.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -40,13 +40,14 @@
needed.
*/
-#ifdef PROCINFO_DECL
-EXTERN
+#ifndef PROCINFO_CLASS
+#define PROCINFO_CLASS
#endif
+
#if !defined PROCINFO_DECL && defined SHARED
._dl_arm_cap_flags
#else
-const char _dl_arm_cap_flags[8][10]
+PROCINFO_CLASS const char _dl_arm_cap_flags[8][10]
#endif
#ifndef PROCINFO_DECL
= {
@@ -60,3 +61,4 @@ const char _dl_arm_cap_flags[8][10]
#endif
#undef PROCINFO_DECL
+#undef PROCINFO_CLASS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8d826fc8557756da1770a5e505b2f729d820525
commit f8d826fc8557756da1770a5e505b2f729d820525
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jul 16 07:39:07 2003 +0000
2003-07-16 Daniel Jacobowitz <drow@mvista.com>
Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/bits/shm.h (SHMLBA): Define to
256K, remove unneeded declaration of __getpagesize.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index a512afe..b308334 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,8 +36,7 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
/* Segment low boundary address multiple. */
-#define SHMLBA (__getpagesize ())
-extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+#define SHMLBA 0x40000
/* Type to count number of attaches. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85d3b8cbf52afc385491a8922dbfb687ebec0a84
commit 85d3b8cbf52afc385491a8922dbfb687ebec0a84
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 19:30:54 2003 +0000
(_STATFS_F_FRSIZE): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
index d39c6f0..d838e6b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
@@ -64,3 +64,4 @@ struct statfs64
/* Tell code we have this member. */
#define _STATFS_F_NAMELEN
+#define _STATFS_F_FRSIZE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4bdf10e33494aee01d4362947e05dd63791b980d
commit 4bdf10e33494aee01d4362947e05dd63791b980d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 10 09:22:13 2003 +0000
Remove CLFAGS-.oS addition.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 68dc258..fab6bd5 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -26,7 +26,6 @@ endif
asm-CPPFLAGS += $(m68k-syntax-flag)
pic-ccflag = -fpic
-CFLAGS-.oS += -fPIC
# Make sure setjmp.c is compiled with a frame pointer
CFLAGS-setjmp.c := -fno-omit-frame-pointer
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc7d6605c8b7852c3bbcb0fe33e3adb8a983d00a
commit dc7d6605c8b7852c3bbcb0fe33e3adb8a983d00a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 8 03:42:27 2003 +0000
(lll_futex_wait, lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On
success return actual return value from the syscall, not 0.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index e286ef3..cc054f9 100644
--- a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -39,7 +39,7 @@
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAIT, (val), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
#define lll_futex_timed_wait(futexp, val, timespec) \
@@ -48,7 +48,7 @@
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAIT, (val), (timespec)); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
#define lll_futex_wake(futexp, nr) \
@@ -57,18 +57,17 @@
long int __ret; \
__ret = INTERNAL_SYSCALL (futex, __err, 4, \
(futexp), FUTEX_WAKE, (nr), 0); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \
({ \
INTERNAL_SYSCALL_DECL (__err); \
long int __ret; \
- \
__ret = INTERNAL_SYSCALL (futex, __err, 5, \
(futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \
(mutex)); \
- INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret : __ret; \
})
/* Set *futex to 1 if it is 0, atomically. Returns the old value */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16fc430a76011b5cb4a443585341f3d46e502b35
commit 16fc430a76011b5cb4a443585341f3d46e502b35
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 8 03:41:53 2003 +0000
Avoid .ent/.end.
diff --git a/sysdeps/alpha/nptl/elf/pt-initfini.c b/sysdeps/alpha/nptl/elf/pt-initfini.c
index d48c571..ba2e419 100644
--- a/sysdeps/alpha/nptl/elf/pt-initfini.c
+++ b/sysdeps/alpha/nptl/elf/pt-initfini.c
@@ -45,17 +45,15 @@ __asm__ (" \n\
/*@_init_PROLOG_BEGINS*/ \n\
.section .init, \"ax\", @progbits \n\
.globl _init \n\
- .ent _init \n\
+ .type _init,@function \n\
+ .usepv _init,std \n\
_init: \n\
ldgp $29, 0($27) \n\
subq $30, 16, $30 \n\
stq $26, 0($30) \n\
stq $29, 8($30) \n\
- .prologue 1 \n\
bsr $26, __pthread_initialize_minimal_internal !samegp \n\
.align 3 \n\
- .end _init \n\
- .size _init, 0 \n\
/*@_init_PROLOG_ENDS*/ \n\
\n\
/*@_init_EPILOG_BEGINS*/ \n\
@@ -69,16 +67,14 @@ _init: \n\
/*@_fini_PROLOG_BEGINS*/ \n\
.section .fini, \"ax\", @progbits \n\
.globl _fini \n\
- .ent _fini \n\
+ .type _fini,@function \n\
+ .usepv _fini,std \n\
_fini: \n\
ldgp $29, 0($27) \n\
subq $30, 16, $30 \n\
stq $26, 0($30) \n\
stq $29, 8($30) \n\
- .prologue 1 \n\
.align 3 \n\
- .end _fini \n\
- .size _fini, 0 \n\
/*@_fini_PROLOG_ENDS*/ \n\
\n\
/*@_fini_EPILOG_BEGINS*/ \n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee13e79fc845ee41a9fe60a41dab23436c7cebca
commit ee13e79fc845ee41a9fe60a41dab23436c7cebca
Author: Richard Henderson <rth@redhat.com>
Date: Sat Jul 5 22:56:39 2003 +0000
* sysdeps/alpha/elf/initfini.c: Avoid .ent/.end.
* sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c
index 6c4d04b..5da7dc6 100644
--- a/sysdeps/alpha/elf/initfini.c
+++ b/sysdeps/alpha/elf/initfini.c
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for Alpha.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,21 +45,19 @@ __asm__ (" \n\
/*@_init_PROLOG_BEGINS*/ \n\
.section .init, \"ax\", @progbits \n\
.globl _init \n\
- .ent _init \n\
+ .type _init, @function \n\
+ .usepv _init, std \n\
_init: \n\
ldgp $29, 0($27) \n\
subq $30, 16, $30 \n\
lda $27, __gmon_start__ \n\
stq $26, 0($30) \n\
stq $29, 8($30) \n\
- .prologue 1 \n\
beq $27, 1f \n\
jsr $26, ($27), __gmon_start__ \n\
ldq $29, 8($30) \n\
.align 3 \n\
1: \n\
- .end _init \n\
- .size _init, 0 \n\
/*@_init_PROLOG_ENDS*/ \n\
\n\
/*@_init_EPILOG_BEGINS*/ \n\
@@ -73,16 +71,14 @@ _init: \n\
/*@_fini_PROLOG_BEGINS*/ \n\
.section .fini, \"ax\", @progbits \n\
.globl _fini \n\
- .ent _fini \n\
+ .type _fini,@function \n\
+ .usepv _fini,std \n\
_fini: \n\
ldgp $29, 0($27) \n\
subq $30, 16, $30 \n\
stq $26, 0($30) \n\
stq $29, 8($30) \n\
- .prologue 1 \n\
.align 3 \n\
- .end _fini \n\
- .size _fini, 0 \n\
/*@_fini_PROLOG_ENDS*/ \n\
\n\
/*@_fini_EPILOG_BEGINS*/ \n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5400aba69960de9b2b2f535e1aae27627438c2a1
commit 5400aba69960de9b2b2f535e1aae27627438c2a1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:22:49 2003 +0000
Asm macros for definition of cancelable syscall wrappers for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
new file mode 100644
index 0000000..1b27e27
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -0,0 +1,157 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <tls.h>
+#ifndef __ASSEMBLER__
+# include <nptl/pthreadP.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+
+# ifdef PROF
+# define PSEUDO_PROF \
+ .set noat; \
+ lda AT, _mcount; \
+ jsr AT, (AT), _mcount; \
+ .set at
+# else
+# define PSEUDO_PROF
+# endif
+
+/* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END
+ besides "ret". */
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .globl name; \
+ .align 4; \
+ .type name, @function; \
+ .usepv name, std; \
+ cfi_startproc; \
+__LABEL(name) \
+ ldgp gp, 0(pv); \
+ PSEUDO_PROF; \
+ PSEUDO_PREPARE_ARGS \
+ SINGLE_THREAD_P(t0); \
+ bne t0, $pseudo_cancel; \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys; \
+ bne a3, SYSCALL_ERROR_LABEL; \
+__LABEL($pseudo_ret) \
+ .subsection 2; \
+__LABEL($pseudo_cancel) \
+ subq sp, 64, sp; \
+ cfi_def_cfa_offset(64); \
+ stq ra, 0(sp); \
+ cfi_offset(ra, -64); \
+ SAVE_ARGS_##args; \
+ CENABLE; \
+ LOAD_ARGS_##args; \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys; \
+ stq v0, 8(sp); \
+ bne a3, $multi_error; \
+ CDISABLE; \
+ ldq ra, 0(sp); \
+ ldq v0, 8(sp); \
+ addq sp, 64, sp; \
+ cfi_remember_state; \
+ cfi_restore(ra); \
+ cfi_def_cfa_offset(0); \
+ ret; \
+ cfi_restore_state; \
+__LABEL($multi_error) \
+ CDISABLE; \
+ ldq ra, 0(sp); \
+ ldq v0, 8(sp); \
+ addq sp, 64, sp; \
+ cfi_restore(ra); \
+ cfi_def_cfa_offset(0); \
+__LABEL($syscall_error) \
+ SYSCALL_ERROR_HANDLER; \
+ .previous
+
+# undef PSEUDO_END
+# define PSEUDO_END(sym) \
+ .subsection 2; \
+ cfi_endproc; \
+ .size sym, .-sym
+
+# define SAVE_ARGS_0 /* Nothing. */
+# define SAVE_ARGS_1 SAVE_ARGS_0; stq a0, 8(sp)
+# define SAVE_ARGS_2 SAVE_ARGS_1; stq a1, 16(sp)
+# define SAVE_ARGS_3 SAVE_ARGS_2; stq a2, 24(sp)
+# define SAVE_ARGS_4 SAVE_ARGS_3; stq a3, 32(sp)
+# define SAVE_ARGS_5 SAVE_ARGS_4; stq a4, 40(sp)
+# define SAVE_ARGS_6 SAVE_ARGS_5; stq a5, 48(sp)
+
+# define LOAD_ARGS_0 /* Nothing. */
+# define LOAD_ARGS_1 LOAD_ARGS_0; ldq a0, 8(sp)
+# define LOAD_ARGS_2 LOAD_ARGS_1; ldq a1, 16(sp)
+# define LOAD_ARGS_3 LOAD_ARGS_2; ldq a2, 24(sp)
+# define LOAD_ARGS_4 LOAD_ARGS_3; ldq a3, 32(sp)
+# define LOAD_ARGS_5 LOAD_ARGS_4; ldq a4, 40(sp)
+# define LOAD_ARGS_6 LOAD_ARGS_5; ldq a5, 48(sp)
+
+# ifdef IS_IN_libpthread
+# define __local_enable_asynccancel __pthread_enable_asynccancel
+# define __local_disable_asynccancel __pthread_disable_asynccancel
+# define __local_multiple_threads __pthread_multiple_threads
+# elif !defined NOT_IN_libc
+# define __local_enable_asynccancel __libc_enable_asynccancel
+# define __local_disable_asynccancel __libc_disable_asynccancel
+# define __local_multiple_threads __libc_multiple_threads
+# elif defined IS_IN_librt
+# define __local_enable_asynccancel __librt_enable_asynccancel
+# define __local_disable_asynccancel __librt_disable_asynccancel
+# else
+# error Unsupported library
+# endif
+
+# ifdef PIC
+# define CENABLE bsr ra, __local_enable_asynccancel !samegp
+# define CDISABLE bsr ra, __local_disable_asynccancel !samegp
+# else
+# define CENABLE jsr ra, __local_enable_asynccancel; ldgp ra, 0(gp)
+# define CDISABLE jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
+# endif
+
+# if defined IS_IN_libpthread || !defined NOT_IN_libc
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P \
+ __builtin_expect (__local_multiple_threads == 0, 1)
+# elif defined(PIC)
+# define SINGLE_THREAD_P(reg) ldl reg, __local_multiple_threads(gp) !gprel
+# else
+# define SINGLE_THREAD_P(reg) \
+ ldah reg, __local_multiple_threads(gp) !gprelhigh; \
+ ldl reg, __local_multiple_threads(reg) !gprellow
+# endif
+# else
+# ifndef __ASSEMBLER__
+# define SINGLE_THREAD_P \
+ __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
+ header.multiple_threads) == 0, 1)
+# else
+# error Not done
+# endif
+# endif
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22c9b5efb9049eb0c9121e285e287df89206ffbb
commit 22c9b5efb9049eb0c9121e285e287df89206ffbb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:22:23 2003 +0000
sem_post implementation for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
new file mode 100644
index 0000000..27fd817
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/sem_post.c
@@ -0,0 +1,5 @@
+/* ??? This is an ass-backwards way to do this. We should simply define
+ the acquire/release semantics of atomic_exchange_and_add. And even if
+ we don't do this, we should be using atomic_full_barrier or otherwise. */
+#define __lll_rel_instr "mb"
+#include "../sem_post.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b47913dc896067c471819aee46f90a45cc8c346
commit 3b47913dc896067c471819aee46f90a45cc8c346
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:22:10 2003 +0000
pthread_once implementation for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
new file mode 100644
index 0000000..82f72de
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/pthread_once.c
@@ -0,0 +1,96 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "pthreadP.h"
+#include <lowlevellock.h>
+
+
+unsigned long int __fork_generation attribute_hidden;
+
+static void
+clear_once_control (void *arg)
+{
+ pthread_once_t *once_control = (pthread_once_t *) arg;
+
+ *once_control = 0;
+ lll_futex_wake (once_control, INT_MAX);
+}
+
+int
+__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
+{
+ for (;;)
+ {
+ int oldval;
+ int newval;
+ int tmp;
+
+ /* Pseudo code:
+ newval = __fork_generation | 1;
+ oldval = *once_control;
+ if ((oldval & 2) == 0)
+ *once_control = newval;
+ Do this atomically.
+ */
+ newval = __fork_generation | 1;
+ __asm __volatile (
+ "1: ldl_l %0, %2\n"
+ " and %0, 2, %1\n"
+ " bne %1, 2f\n"
+ " mov %3, %1\n"
+ " stl_c %1, %2\n"
+ " beq %1, 1b\n"
+ "2: mb"
+ : "=&r" (oldval), "=&r" (tmp), "=m" (*once_control)
+ : "r" (newval), "m" (*once_control));
+
+ /* Check if the initializer has already been done. */
+ if ((oldval & 2) != 0)
+ return 0;
+
+ /* Check if another thread already runs the initializer. */
+ if ((oldval & 1) == 0)
+ break;
+
+ /* Check whether the initializer execution was interrupted by a fork. */
+ if (oldval != newval)
+ break;
+
+ /* Same generation, some other thread was faster. Wait. */
+ lll_futex_wait (once_control, oldval);
+ }
+
+ /* This thread is the first here. Do the initialization.
+ Register a cleanup handler so that in case the thread gets
+ interrupted the initialization can be restarted. */
+ pthread_cleanup_push (clear_once_control, once_control);
+
+ init_routine ();
+
+ pthread_cleanup_pop (0);
+
+ /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */
+ atomic_exchange_and_add (once_control, 1);
+
+ /* Wake up all other threads. */
+ lll_futex_wake (once_control, INT_MAX);
+
+ return 0;
+}
+weak_alias (__pthread_once, pthread_once)
+strong_alias (__pthread_once, __pthread_once_internal)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a06fb001ba2291fec7f2c761ef4f8175e67bc2d9
commit a06fb001ba2291fec7f2c761ef4f8175e67bc2d9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:21:45 2003 +0000
vfork implementation for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S
new file mode 100644
index 0000000..4a2df42
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/pt-vfork.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep-cancel.h>
+
+PSEUDO(__vfork, vfork, 0)
+ ret
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92f7ea1cbca33674edcaae8079ee80248253ef99
commit 92f7ea1cbca33674edcaae8079ee80248253ef99
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:21:32 2003 +0000
Low level lock definitions for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
new file mode 100644
index 0000000..e286ef3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -0,0 +1,218 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Libr \ary; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LOWLEVELLOCK_H
+#define _LOWLEVELLOCK_H 1
+
+#include <time.h>
+#include <sys/param.h>
+#include <bits/pthreadtypes.h>
+#include <atomic.h>
+
+
+#define __NR_futex 394
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_REQUEUE 3
+
+/* Initializer for compatibility lock. */
+#define LLL_MUTEX_LOCK_INITIALIZER (0)
+
+#define lll_futex_wait(futexp, val) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ })
+
+#define lll_futex_timed_wait(futexp, val, timespec) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAIT, (val), (timespec)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ })
+
+#define lll_futex_wake(futexp, nr) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ __ret = INTERNAL_SYSCALL (futex, __err, 4, \
+ (futexp), FUTEX_WAKE, (nr), 0); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ })
+
+#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex) \
+ ({ \
+ INTERNAL_SYSCALL_DECL (__err); \
+ long int __ret; \
+ \
+ __ret = INTERNAL_SYSCALL (futex, __err, 5, \
+ (futexp), FUTEX_REQUEUE, (nr_wake), (nr_move), \
+ (mutex)); \
+ INTERNAL_SYSCALL_ERROR_P (__ret, __err)? -__ret: 0; \
+ })
+
+/* Set *futex to 1 if it is 0, atomically. Returns the old value */
+#define __lll_trylock(futex) \
+ ({ int __oldval, __temp; \
+ __asm __volatile ( \
+ "1: ldl_l %[__oldval], %[__mem]\n" \
+ " lda %[__temp], 1\n" \
+ " bne %[__oldval], 2f\n" \
+ " stl_c %[__temp], %[__mem]\n" \
+ " beq %[__temp], 1b\n" \
+ __MB \
+ "2:" \
+ : [__oldval] "=&r" (__oldval), \
+ [__temp] "=&r" (__temp) \
+ : [__mem] "m" (*(futex)) \
+ : "memory"); \
+ __oldval; \
+ })
+
+#define lll_mutex_trylock(lock) __lll_trylock (&(lock))
+
+
+extern void __lll_lock_wait (int *futex, int val) attribute_hidden;
+
+#define lll_mutex_lock(lock) \
+ (void) ({ \
+ int *__futex = &(lock); \
+ int __val = atomic_exchange_and_add (__futex, 1); \
+ atomic_full_barrier(); \
+ if (__builtin_expect (__val != 0, 0)) \
+ __lll_lock_wait (__futex, __val); \
+ })
+
+#define lll_mutex_cond_lock(lock) \
+ (void) ({ \
+ int *__futex = &(lock); \
+ int __val = atomic_exchange_and_add (__futex, 2); \
+ atomic_full_barrier(); \
+ if (__builtin_expect (__val != 0, 0)) \
+ /* Note, the val + 1 is kind of ugly here. __lll_lock_wait will \
+ add 1 again. But we added 2 to the futex value so this is the \
+ right value which will be passed to the kernel. */ \
+ __lll_lock_wait (__futex, __val + 1); \
+ })
+
+extern int __lll_timedlock_wait
+ (int *futex, int val, const struct timespec *) attribute_hidden;
+
+#define lll_mutex_timedlock(lock, abstime) \
+ ({ int *__futex = &(lock); \
+ int __val = atomic_exchange_and_add (__futex, 1); \
+ atomic_full_barrier(); \
+ if (__builtin_expect (__val != 0, 0)) \
+ __val = __lll_timedlock_wait (__futex, __val, (abstime)); \
+ __val; \
+ })
+
+#define lll_mutex_unlock(lock) \
+ ((void) ({ \
+ int *__futex = &(lock), __val; \
+ atomic_write_barrier(); \
+ __val = atomic_exchange_rel (__futex, 0); \
+ if (__builtin_expect (__val > 1, 0)) \
+ lll_futex_wake (__futex, 1); \
+ }))
+
+#define lll_mutex_unlock_force(lock) \
+ ((void) ({ \
+ int *__futex = &(lock); \
+ atomic_write_barrier(); \
+ *__futex = 0; \
+ atomic_full_barrier(); \
+ lll_futex_wake (__futex, 1); \
+ }))
+
+#define lll_mutex_islocked(futex) \
+ (futex != 0)
+
+
+/* Our internal lock implementation is identical to the binary-compatible
+ mutex implementation. */
+
+/* Type for lock object. */
+typedef int lll_lock_t;
+
+/* Initializers for lock. */
+#define LLL_LOCK_INITIALIZER (0)
+#define LLL_LOCK_INITIALIZER_LOCKED (1)
+
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
+
+/* The states of a lock are:
+ 0 - untaken
+ 1 - taken by one user
+ >1 - taken by more users */
+
+#define lll_trylock(lock) lll_mutex_trylock (lock)
+#define lll_lock(lock) lll_mutex_lock (lock)
+#define lll_unlock(lock) lll_mutex_unlock (lock)
+#define lll_islocked(lock) lll_mutex_islocked (lock)
+
+/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+ wakeup when the clone terminates. The memory location contains the
+ thread ID while the clone is running and is reset to zero
+ afterwards. */
+#define lll_wait_tid(tid) \
+ do { \
+ __typeof (tid) __tid; \
+ while ((__tid = (tid)) != 0) \
+ lll_futex_wait (&(tid), __tid); \
+ } while (0)
+
+extern int __lll_timedwait_tid (int *, const struct timespec *)
+ attribute_hidden;
+
+#define lll_timedwait_tid(tid, abstime) \
+ ({ \
+ int __res = 0; \
+ if ((tid) != 0) \
+ __res = __lll_timedwait_tid (&(tid), (abstime)); \
+ __res; \
+ })
+
+
+/* Conditional variable handling. */
+
+extern void __lll_cond_wait (pthread_cond_t *cond)
+ attribute_hidden;
+extern int __lll_cond_timedwait (pthread_cond_t *cond,
+ const struct timespec *abstime)
+ attribute_hidden;
+extern void __lll_cond_wake (pthread_cond_t *cond)
+ attribute_hidden;
+extern void __lll_cond_broadcast (pthread_cond_t *cond)
+ attribute_hidden;
+
+#define lll_cond_wait(cond) \
+ __lll_cond_wait (cond)
+#define lll_cond_timedwait(cond, abstime) \
+ __lll_cond_timedwait (cond, abstime)
+#define lll_cond_wake(cond) \
+ __lll_cond_wake (cond)
+#define lll_cond_broadcast(cond) \
+ __lll_cond_broadcast (cond)
+
+#endif /* lowlevellock.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f34839aa4d36697094637fa11c2c1e7aae7bda47
commit f34839aa4d36697094637fa11c2c1e7aae7bda47
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:20:57 2003 +0000
Alpha specific fork in nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/fork.c b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
new file mode 100644
index 0000000..ca85fc0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/fork.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sched.h>
+#include <signal.h>
+#include <sysdep.h>
+#include <tls.h>
+
+
+#define ARCH_FORK() \
+ INLINE_SYSCALL (clone, 5, \
+ CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
+ NULL, NULL, &THREAD_SELF->tid, NULL)
+
+#include "../fork.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=877333746e138a130224af9033ebde1018fcf112
commit 877333746e138a130224af9033ebde1018fcf112
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:20:36 2003 +0000
Alpha specific nptl code to start thread.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c
new file mode 100644
index 0000000..b29c57b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/createthread.c
@@ -0,0 +1,24 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Value passed to 'clone' for initialization of the thread register. */
+#define TLS_VALUE ((void *) (pd) \
+ + TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
+/* Get the real implementation. */
+#include <nptl/sysdeps/pthread/createthread.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=707cd6ca79d5982271bbd106f31f128bfa1d6ffc
commit 707cd6ca79d5982271bbd106f31f128bfa1d6ffc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:20:19 2003 +0000
Public semaphore type definitions for Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
new file mode 100644
index 0000000..65298fa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/semaphore.h
@@ -0,0 +1,37 @@
+/* Machine-specific POSIX semaphore type layouts. Alpha version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+# define __SIZEOF_SEM_T 32
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align;
+} sem_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77e4ae304e999ede40501311f103337b127c4f71
commit 77e4ae304e999ede40501311f103337b127c4f71
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:20:04 2003 +0000
Public type definitions for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
new file mode 100644
index 0000000..bd5ab97
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
@@ -0,0 +1,155 @@
+/* Machine-specific pthread type layouts. Alpha version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_PTHREADTYPES_H
+#define _BITS_PTHREADTYPES_H 1
+
+#define __SIZEOF_PTHREAD_ATTR_T 56
+#define __SIZEOF_PTHREAD_MUTEX_T 40
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 56
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 32
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+
+/* Thread identifiers. The structure of the attribute type is
+ deliberately not exposed. */
+typedef struct __opaque_pthread *pthread_t;
+
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_ATTR_T];
+ long int __align;
+} pthread_attr_t;
+
+
+/* Data structures for mutex handling. The structure of the attribute
+ type is deliberately not exposed. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __count;
+ int __owner;
+ unsigned int __nusers;
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility. */
+ int __kind;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_MUTEX_T];
+ long int __align;
+} pthread_mutex_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
+ int __align;
+} pthread_mutexattr_t;
+
+
+/* Data structure for conditional variable handling. The structure of
+ the attribute type is deliberately not exposed. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ int __clock;
+ unsigned long long int __total_seq;
+ unsigned long long int __wakeup_seq;
+ unsigned long long int __woken_seq;
+ void *__mutex;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_COND_T];
+ long long int __align;
+} pthread_cond_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_CONDATTR_T];
+ int __align;
+} pthread_condattr_t;
+
+
+/* Keys for thread-specific data */
+typedef unsigned int pthread_key_t;
+
+
+/* Once-only execution */
+typedef int pthread_once_t;
+
+
+#ifdef __USE_UNIX98
+/* Data structure for read-write lock variable handling. The
+ structure of the attribute type is deliberately not exposed. */
+typedef union
+{
+ struct
+ {
+ int __lock;
+ unsigned int __nr_readers;
+ unsigned int __readers_wakeup;
+ unsigned int __writer_wakeup;
+ unsigned int __nr_readers_queued;
+ unsigned int __nr_writers_queued;
+ int __writer;
+
+ unsigned int __reserved[6];
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
+ unsigned int __flags;
+ } __data;
+ char __size[__SIZEOF_PTHREAD_RWLOCK_T];
+ long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
+ long int __align;
+} pthread_rwlockattr_t;
+#endif
+
+
+#ifdef __USE_XOPEN2K
+/* POSIX spinlock data type. */
+typedef volatile int pthread_spinlock_t;
+
+/* POSIX barriers data type. The structure of the type is
+ deliberately not exposed. */
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIER_T];
+ long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+ char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
+ int __align;
+} pthread_barrierattr_t;
+#endif
+
+
+#endif /* bits/pthreadtypes.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10578c2ed31d899fd93fda0b2cd2aa305c7832c9
commit 10578c2ed31d899fd93fda0b2cd2aa305c7832c9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 20:19:46 2003 +0000
Makefile for nptl on Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/Makefile b/sysdeps/unix/sysv/linux/alpha/nptl/Makefile
new file mode 100644
index 0000000..8c80840
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/Makefile
@@ -0,0 +1,2 @@
+# pull in __syscall_error routine, __sigprocmask, __syscall_rt_sigaction
+libpthread-routines += ptw-sysdep ptw-sigprocmask ptw-rt_sigaction
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=690359671c74d2081c12b30d2c522fec50ae55b1
commit 690359671c74d2081c12b30d2c522fec50ae55b1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:25:45 2003 +0000
TLS access definitions for Alpha.
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
new file mode 100644
index 0000000..1718b3e
--- /dev/null
+++ b/sysdeps/alpha/nptl/tls.h
@@ -0,0 +1,146 @@
+/* Definition for thread-local data handling. NPTL/Alpha version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H 1
+
+# include <dl-sysdep.h>
+
+#ifndef __ASSEMBLER__
+# include <stddef.h>
+# include <stdint.h>
+
+/* Type for the dtv. */
+typedef union dtv
+{
+ size_t counter;
+ void *pointer;
+} dtv_t;
+
+#else /* __ASSEMBLER__ */
+# include <tcb-offsets.h>
+#endif /* __ASSEMBLER__ */
+
+
+/* We require TLS support in the tools. */
+#ifndef HAVE_TLS_SUPPORT
+# error "TLS support is required."
+#endif
+
+/* Signal that TLS support is available. */
+# define USE_TLS 1
+
+#ifndef __ASSEMBLER__
+
+/* Get system call information. */
+# include <sysdep.h>
+
+/* The TP points to the start of the thread blocks. */
+# define TLS_DTV_AT_TP 1
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
+
+/* This layout is actually wholly private and not affected by the ABI.
+ Nor does it overlap the pthread data structure, so we need nothing
+ extra here at all. */
+typedef struct
+{
+ dtv_t *dtv;
+} tcbhead_t;
+
+/* This is the size of the initial TCB. */
+# define TLS_INIT_TCB_SIZE 0
+
+/* Alignment requirements for the initial TCB. */
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size of the TCB. */
+# define TLS_TCB_SIZE 0
+
+/* Alignment requirements for the TCB. */
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
+
+/* This is the size we need before TCB. */
+# define TLS_PRE_TCB_SIZE \
+ (sizeof (struct pthread) \
+ + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
+
+/* The following assumes that TP (R2 or R13) points to the end of the
+ TCB + 0x7000 (per the ABI). This implies that TCB address is
+ TP - 0x7000. As we define TLS_DTV_AT_TP we can
+ assume that the pthread struct is allocated immediately ahead of the
+ TCB. This implies that the pthread_descr address is
+ TP - (TLS_PRE_TCB_SIZE + 0x7000). */
+/* ??? PPC uses offset 0x7000; seems like a good idea for alpha too,
+ but binutils not yet changed to match. */
+# define TLS_TCB_OFFSET 0
+
+/* Install the dtv pointer. The pointer passed is to the element with
+ index -1 which contain the length. */
+# define INSTALL_DTV(tcbp, dtvp) \
+ ((tcbhead_t *) (tcbp))[-1].dtv = dtvp + 1
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) (THREAD_DTV() = (dtv))
+
+/* Return dtv of given thread descriptor. */
+# define GET_DTV(tcbp) (((tcbhead_t *) (tcbp))[-1].dtv)
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(tcbp, secondcall) \
+ (__builtin_set_thread_pointer ((void *) (tcbp) + TLS_TCB_OFFSET), NULL)
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() \
+ (((tcbhead_t *) (__builtin_thread_pointer () - TLS_TCB_OFFSET))[-1].dtv)
+
+/* Return the thread descriptor for the current thread. */
+# define THREAD_SELF \
+ ((struct pthread *) (__builtin_thread_pointer () \
+ - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
+
+/* Identifier for the current thread. THREAD_SELF is usable but
+ sometimes more expensive than necessary as in this case. */
+# define THREAD_ID (__builtin_thread_pointer ())
+
+/* Read member of the thread descriptor directly. */
+# define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member)
+
+/* Same as THREAD_GETMEM, but the member offset can be non-constant. */
+# define THREAD_GETMEM_NC(descr, member, idx) \
+ ((void)(descr), (THREAD_SELF)->member[idx])
+
+/* Set member of the thread descriptor directly. */
+# define THREAD_SETMEM(descr, member, value) \
+ ((void)(descr), (THREAD_SELF)->member = (value))
+
+/* Same as THREAD_SETMEM, but the member offset can be non-constant. */
+# define THREAD_SETMEM_NC(descr, member, idx, value) \
+ ((void)(descr), (THREAD_SELF)->member[idx] = (value))
+
+/* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some
+ different value to mean unset l_tls_offset. */
+# define NO_TLS_OFFSET -1
+
+#endif /* __ASSEMBLER__ */
+
+#endif /* tls.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb9d4969c949144a16a570c665a85e5c4e1f8712
commit cb9d4969c949144a16a570c665a85e5c4e1f8712
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:25:32 2003 +0000
libthread_db interface to map LWP ID to thread for Alpha.
diff --git a/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c
new file mode 100644
index 0000000..b30b10b
--- /dev/null
+++ b/sysdeps/alpha/nptl/td_ta_map_lwp2thr.c
@@ -0,0 +1,46 @@
+/* Which thread is running on an LWP? PowerPC version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "thread_dbP.h"
+#include <tls.h>
+
+
+td_err_e
+td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
+{
+ LOG ("td_ta_map_lwp2thr");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+ return TD_BADTA;
+
+ prgregset_t regs;
+ if (ps_lgetregs (ta->ph, lwpid, regs) != PS_OK)
+ return TD_ERR;
+
+ /* The uniq value is stored in slot 33 in recent gdb; it isn't stored
+ anywhere otherwise. */
+ th->th_unique = ((void *) regs[32]
+ - TLS_TCB_OFFSET - TLS_TCB_SIZE - TLS_PRE_TCB_SIZE);
+
+ /* Found it. Now complete the `td_thrhandle_t' object. */
+ th->th_ta_p = (td_thragent_t *) ta;
+
+ return TD_OK;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1b42f805231aac77bee7a6f0bed80d636b8f686
commit c1b42f805231aac77bee7a6f0bed80d636b8f686
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:25:02 2003 +0000
General definition for libpthread on Alpha.
diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/sysdeps/alpha/nptl/pthreaddef.h
new file mode 100644
index 0000000..26c4daf
--- /dev/null
+++ b/sysdeps/alpha/nptl/pthreaddef.h
@@ -0,0 +1,38 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Default stack size. */
+#define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
+
+/* Required stack pointer alignment at beginning. The ABI requires 16. */
+#define STACK_ALIGN 16
+
+/* Minimal stack size after allocating thread descriptor and guard size. */
+#define MINIMAL_REST_STACK 4096
+
+/* Alignment requirement for TCB. */
+#define TCB_ALIGNMENT 16
+
+/* Location of current stack frame. */
+#define CURRENT_STACK_FRAME __builtin_frame_address (0)
+
+/* XXX Until we have a better place keep the definitions here. */
+
+/* While there is no such syscall. */
+#define __exit_thread_inline(val) \
+ INLINE_SYSCALL (exit, 1, (val))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=29da0ceb72520e45a37b591c37292175f1bdfd58
commit 29da0ceb72520e45a37b591c37292175f1bdfd58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:24:47 2003 +0000
Spinlock trylock implementation for Alpha.
diff --git a/sysdeps/alpha/nptl/pthread_spin_trylock.S b/sysdeps/alpha/nptl/pthread_spin_trylock.S
new file mode 100644
index 0000000..0948da6
--- /dev/null
+++ b/sysdeps/alpha/nptl/pthread_spin_trylock.S
@@ -0,0 +1,46 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@twiddle.net>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+ .text
+ .align 4
+
+ .globl pthread_spin_trylock
+ .ent pthread_spin_trylock
+pthread_spin_trylock:
+ .frame $sp, 0, $26, 0
+ .prologue 0
+
+0: ldl_l $1, 0($16)
+ lda $2, 1
+ lda $0, EBUSY
+ bne $1, 1f
+
+ stl_c $2, 0($16)
+ beq $2, 2f
+ mb
+ lda $0, 0
+
+1: ret
+2: br 0b
+
+ .end pthread_spin_trylock
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81b6201ae0ebaaa8a63b8caff5285b74488a48eb
commit 81b6201ae0ebaaa8a63b8caff5285b74488a48eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:24:33 2003 +0000
Spinlock implementation for Alpha.
diff --git a/sysdeps/alpha/nptl/pthread_spin_lock.S b/sysdeps/alpha/nptl/pthread_spin_lock.S
new file mode 100644
index 0000000..ce6cd41
--- /dev/null
+++ b/sysdeps/alpha/nptl/pthread_spin_lock.S
@@ -0,0 +1,45 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@twiddle.net>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+ .text
+ .align 4
+
+ .globl pthread_spin_lock
+ .ent pthread_spin_lock
+pthread_spin_lock:
+ .frame $sp, 0, $26, 0
+ .prologue 0
+
+0: ldl_l $1, 0($16)
+ lda $2, 1
+ lda $0, 0
+ bne $1, 1f
+
+ stl_c $2, 0($16)
+ beq $2, 1f
+ mb
+ ret
+
+1: ldl $1, 0($16)
+ bne $1, 1b
+ unop
+ br 0b
+
+ .end pthread_spin_lock
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bba28b0ec03dbe9cdad4ff1a7c56f221537b687a
commit bba28b0ec03dbe9cdad4ff1a7c56f221537b687a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 1 19:23:36 2003 +0000
Initialization code for libpthread on Alpha.
diff --git a/sysdeps/alpha/nptl/elf/pt-initfini.c b/sysdeps/alpha/nptl/elf/pt-initfini.c
new file mode 100644
index 0000000..d48c571
--- /dev/null
+++ b/sysdeps/alpha/nptl/elf/pt-initfini.c
@@ -0,0 +1,93 @@
+/* Special .init and .fini section support for Alpha. NPTL version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This file is compiled into assembly code which is then munged by a sed
+ script into two files: crti.s and crtn.s.
+
+ * crti.s puts a function prologue at the beginning of the .init and .fini
+ sections and defines global symbols for those addresses, so they can be
+ called as functions.
+
+ * crtn.s puts the corresponding function epilogues in the .init and .fini
+ sections.
+
+ This differs from what would be generated by the generic code in that
+ we save and restore the GP within the function. In order for linker
+ relaxation to work, the value in the GP register on exit from a function
+ must be valid for the function entry point. Normally, a function is
+ contained within one object file and this is not an issue, provided
+ that the function reloads the gp after making any function calls.
+ However, _init and _fini are constructed from pieces of many object
+ files, all of which may have different GP values. So we must reload
+ the GP value from crti.o in crtn.o. */
+
+__asm__ (" \n\
+#include \"defs.h\" \n\
+ \n\
+/*@HEADER_ENDS*/ \n\
+ \n\
+/*@_init_PROLOG_BEGINS*/ \n\
+ .section .init, \"ax\", @progbits \n\
+ .globl _init \n\
+ .ent _init \n\
+_init: \n\
+ ldgp $29, 0($27) \n\
+ subq $30, 16, $30 \n\
+ stq $26, 0($30) \n\
+ stq $29, 8($30) \n\
+ .prologue 1 \n\
+ bsr $26, __pthread_initialize_minimal_internal !samegp \n\
+ .align 3 \n\
+ .end _init \n\
+ .size _init, 0 \n\
+/*@_init_PROLOG_ENDS*/ \n\
+ \n\
+/*@_init_EPILOG_BEGINS*/ \n\
+ .section .init, \"ax\", @progbits \n\
+ ldq $26, 0($30) \n\
+ ldq $29, 8($30) \n\
+ addq $30, 16, $30 \n\
+ ret \n\
+/*@_init_EPILOG_ENDS*/ \n\
+ \n\
+/*@_fini_PROLOG_BEGINS*/ \n\
+ .section .fini, \"ax\", @progbits \n\
+ .globl _fini \n\
+ .ent _fini \n\
+_fini: \n\
+ ldgp $29, 0($27) \n\
+ subq $30, 16, $30 \n\
+ stq $26, 0($30) \n\
+ stq $29, 8($30) \n\
+ .prologue 1 \n\
+ .align 3 \n\
+ .end _fini \n\
+ .size _fini, 0 \n\
+/*@_fini_PROLOG_ENDS*/ \n\
+ \n\
+/*@_fini_EPILOG_BEGINS*/ \n\
+ .section .fini, \"ax\", @progbits \n\
+ ldq $26, 0($30) \n\
+ ldq $29, 8($30) \n\
+ addq $30, 16, $30 \n\
+ ret \n\
+/*@_fini_EPILOG_ENDS*/ \n\
+ \n\
+/*@TRAILER_BEGINS*/ \n\
+");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4feb1bb5b668fc555123c8d5f875c8cec706fee2
commit 4feb1bb5b668fc555123c8d5f875c8cec706fee2
Author: Richard Henderson <rth@redhat.com>
Date: Mon Jun 30 23:21:49 2003 +0000
* sysdeps/unix/sysv/linux/alpha/clone.S: Load child_tid properly.
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index a0aa771..daa804c 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -24,9 +24,13 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
- pid_t *tid, void *tls);
- */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags,
+ void *arg, pid_t *ptid, void *tls, pid_t *ctid);
+
+ Note that everything past ARG is technically optional, based
+ on FLAGS, and that CTID is arg 7, and thus is on the stack.
+ However, since a load from top-of-stack better be legal always,
+ we don't bother checking FLAGS. */
.text
ENTRY(__clone)
@@ -51,11 +55,13 @@ ENTRY(__clone)
stq a0,0(a1)
stq a3,8(a1)
- /* Shift the flags, tid and tls arguments into place; the
+ /* The syscall is of the form clone(flags, usp, ptid, ctid, tls).
+ Shift the flags, ptid, ctid, tls arguments into place; the
child_stack argument is already correct. */
mov a2,a0
mov a4,a2
- mov a5,a3
+ ldq a3,0(sp)
+ mov a5,a4
/* Do the system call. */
ldiq v0,__NR_clone
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7978e8d84ad3c66c94cd317b7c47f6872ec5e99
commit b7978e8d84ad3c66c94cd317b7c47f6872ec5e99
Author: Richard Henderson <rth@redhat.com>
Date: Mon Jun 30 23:21:38 2003 +0000
* sysdeps/alpha/bits/atomic.h (__arch_compare_and_exchange_bool_*_int):
Invert the sense of the return value.
(__arch_exchange_16_int): Fix paste-o.
(__arch_exchange_{32,64}_int): Fix think-o.
diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h
index ead76a7..073e650 100644
--- a/sysdeps/alpha/bits/atomic.h
+++ b/sysdeps/alpha/bits/atomic.h
@@ -151,27 +151,27 @@ typedef uintmax_t uatomic_max_t;
: "memory"); \
})
-/* For all "bool" routines, we return true if exchange succesful. */
+/* For all "bool" routines, we return FALSE if exchange succesful. */
#define __arch_compare_and_exchange_bool_8_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \
- __cmp; })
+ !__cmp; })
#define __arch_compare_and_exchange_bool_16_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \
- __cmp; })
+ !__cmp; })
#define __arch_compare_and_exchange_bool_32_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \
- __cmp; })
+ !__cmp; })
#define __arch_compare_and_exchange_bool_64_int(mem, new, old, mb1, mb2) \
({ unsigned long __prev; int __cmp; \
__arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \
- __cmp; })
+ !__cmp; })
/* For all "val" routines, return the old value whether exchange
successful or not. */
@@ -247,7 +247,7 @@ typedef uintmax_t uatomic_max_t;
unsigned long __ret, __tmp, __addr64, __sval; \
__asm__ __volatile__ ( \
mb1 \
- " andnot %[__addr8],7,%[__addr64]\n" \
+ " andnot %[__addr16],7,%[__addr64]\n" \
" inswl %[__value],%[__addr16],%[__sval]\n" \
"1: ldq_l %[__tmp],0(%[__addr64])\n" \
" extwl %[__tmp],%[__addr16],%[__ret]\n" \
@@ -271,13 +271,14 @@ typedef uintmax_t uatomic_max_t;
__asm__ __volatile__ ( \
mb1 \
"1: ldl_l %[__ret],%[__mem]\n" \
- " mov %[__ret],%[__tmp]\n" \
+ " mov %[__val],%[__tmp]\n" \
" stl_c %[__tmp],%[__mem]\n" \
" beq %[__tmp],1b\n" \
mb2 \
: [__ret] "=&r" (__ret), \
[__tmp] "=&r" (__tmp) \
- : [__mem] "m" (*(mem)) \
+ : [__mem] "m" (*(mem)), \
+ [__val] "Ir" (value) \
: "memory"); \
__ret; })
@@ -287,13 +288,14 @@ typedef uintmax_t uatomic_max_t;
__asm__ __volatile__ ( \
mb1 \
"1: ldq_l %[__ret],%[__mem]\n" \
- " mov %[__ret],%[__tmp]\n" \
+ " mov %[__val],%[__tmp]\n" \
" stq_c %[__tmp],%[__mem]\n" \
" beq %[__tmp],1b\n" \
mb2 \
: [__ret] "=&r" (__ret), \
[__tmp] "=&r" (__tmp) \
- : [__mem] "m" (*(mem)) \
+ : [__mem] "m" (*(mem)), \
+ [__val] "Ir" (value) \
: "memory"); \
__ret; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8ba6f063355f63a7550cb71a52b4d5f4f4062bd
commit b8ba6f063355f63a7550cb71a52b4d5f4f4062bd
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jun 30 09:33:13 2003 +0000
2003-06-17 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/xstatconv.c: Handle STAT_IS_KERNEL_STAT
case.
(xstat_conv): Rename to __xstat_conv and remove static inline.
(xstat64_conv): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index b3b7634..41d1cbb 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
+ Copyright (C) 1991,1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,22 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#ifdef STAT_IS_KERNEL_STAT
+
+/* Dummy. */
+struct kernel_stat;
+
+#else
+
#include <string.h>
-static inline int
-xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+int
+__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
switch (vers)
{
@@ -70,8 +81,8 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
return 0;
}
-static inline int
-xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+int
+__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
#ifdef XSTAT_IS_XSTAT64
return xstat_conv (vers, kbuf, ubuf);
@@ -118,3 +129,5 @@ xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
return 0;
#endif
}
+
+#endif /* ! STAT_IS_KERNEL_STAT */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00dedb1574b4e61a37c3e1d1d1e6432bf36d5f8f
commit 00dedb1574b4e61a37c3e1d1d1e6432bf36d5f8f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 27 20:58:22 2003 +0000
2003-06-27 Jeroen Dekkers <jeroen@dekkers.cx>
* sysdeps/mach/hurd/alpha/init-first.c: Remove call to __libc_init.
* sysdeps/mach/hurd/i386/init-first.c: Likewise.
* sysdeps/mach/hurd/mips/init-first.c: Likewise.
* sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c
index e15e2ca..6e55225 100644
--- a/sysdeps/mach/hurd/alpha/init-first.c
+++ b/sysdeps/mach/hurd/alpha/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. Alpha/Hurd.
- Copyright (C) 1995,96,97,98,99,2000,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000,01,02,03 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,6 @@
#include "hurdmalloc.h" /* XXX */
extern void __mach_init (void);
-extern void __libc_init (int, char **, char **);
extern void __init_misc (int, char **, char **);
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
@@ -72,7 +71,6 @@ posixland_init (int argc, char **argv, char **envp)
_dl_non_dynamic_init ();
#endif
__init_misc (argc, argv, envp);
- __libc_init (argc, argv, envp);
#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 5f76de7..6f53e83 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,2000,01,02,03 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,6 @@
#include "hurdmalloc.h" /* XXX */
extern void __mach_init (void);
-extern void __libc_init (int, char **, char **);
extern void __init_misc (int, char **, char **);
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
@@ -114,7 +113,6 @@ init1 (int argc, char *arg0, ...)
_dl_non_dynamic_init ();
#endif
__init_misc (argc, argv, __environ);
- __libc_init (argc, argv, __environ);
#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66f558e194c1a6a760381037e65a23b01709e27a
commit 66f558e194c1a6a760381037e65a23b01709e27a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 17:00:37 2003 +0000
Define _STATBUF_ST_NSEC.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index 3f1f343..dc06b13 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -132,6 +132,8 @@ struct stat64
/* Tell code we have these members. */
#define _STATBUF_ST_BLKSIZE
#define _STATBUF_ST_RDEV
+/* Nanosecond resolution time values are supported. */
+#define _STATBUF_ST_NSEC
/* Encoding of the file mode. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbdd196b523018f800f7e803a898983c0e0bf779
commit fbdd196b523018f800f7e803a898983c0e0bf779
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jun 26 16:18:13 2003 +0000
* sysdeps/m68k/fpu/bits/mathinline.h: Don't inline frexp.
* sysdeps/m68k/fpu/s_frexp.c: Put implementation here.
* sysdeps/m68k/fpu/s_frexpl.c: Fix to handle unnormalized numbers.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 4b1bfea..ec00b4b 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,6 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -176,28 +177,6 @@ __inline_mathop(trunc, intrz)
for the function names. */
#define __inline_functions(float_type, s) \
-__m81_inline float_type \
-__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) __THROW \
-{ \
- float_type __mantissa, __exponent; \
- int __iexponent; \
- unsigned long __fpsr; \
- __asm("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- if (__fpsr & (7 << 24)) \
- { \
- /* Not finite or zero. */ \
- *__expptr = 0; \
- return __value; \
- } \
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
- __iexponent = (int) __exponent + 1; \
- *__expptr = __iexponent; \
- __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
- : "0" (__value), "dmi" (-__iexponent)); \
- return __mantissa; \
-} \
- \
__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \
{ \
float_type __result; \
@@ -386,8 +365,6 @@ extern __inline rettype name args1 __THROW \
return __CONCAT(__,name) args2; \
}
-__inline_forward(double,frexp, (double __value, int *__expptr),
- (__value, __expptr))
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
# ifdef __USE_MISC
@@ -416,8 +393,6 @@ __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
# if defined __USE_MISC || defined __USE_ISOC99
-__inline_forward(float,frexpf, (float __value, int *__expptr),
- (__value, __expptr))
__inline_forward_c(float,floorf, (float __x), (__x))
__inline_forward_c(float,ceilf, (float __x), (__x))
# ifdef __USE_MISC
@@ -438,8 +413,6 @@ __inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
(__x, __sinx, __cosx))
# endif
-__inline_forward(long double,frexpl, (long double __value, int *__expptr),
- (__value, __expptr))
__inline_forward_c(long double,floorl, (long double __x), (__x))
__inline_forward_c(long double,ceill, (long double __x), (__x))
# ifdef __USE_MISC
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 0cdb577..b061412 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,11 +28,28 @@
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-__CONCATX(__,FUNC) (value, expptr)
- float_type value;
- int *expptr;
+__CONCATX(__,FUNC) (float_type value, int *expptr)
{
- return __m81_u(__CONCATX(__,FUNC))(value, expptr);
+ float_type mantissa, exponent;
+ int iexponent;
+ unsigned long fpsr;
+
+ __asm ("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0"
+ : "=dm" (fpsr) : "f" (value));
+ if (fpsr & (7 << 24))
+ {
+ /* Not finite or zero. */
+ *expptr = 0;
+ return value;
+ }
+ __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value));
+ iexponent = (int) exponent + 1;
+ *expptr = iexponent;
+ __asm ("fscale%.l %2, %0"
+ : "=f" (mantissa)
+ : "0" (value), "dmi" (-iexponent));
+ return mantissa;
}
#define weak_aliasx(a,b) weak_alias(a,b)
diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c
index fe9466f..f9a5315 100644
--- a/sysdeps/m68k/fpu/s_frexpl.c
+++ b/sysdeps/m68k/fpu/s_frexpl.c
@@ -1,3 +1,59 @@
-#define FUNC frexpl
-#define float_type long double
-#include <s_frexp.c>
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <math.h>
+
+long double
+__frexpl (long double value, int *expptr)
+{
+ long double mantissa, exponent;
+ int iexponent;
+ unsigned long fpsr;
+
+ __asm ("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0"
+ : "=dm" (fpsr) : "f" (value));
+ if (fpsr & (7 << 24))
+ {
+ /* Not finite or zero. */
+ *expptr = 0;
+ return value;
+ }
+ __asm ("fgetexp%.x %1, %0" : "=f" (exponent) : "f" (value));
+ iexponent = (int) exponent + 1;
+ *expptr = iexponent;
+ /* Unnormalized numbers must be handled specially, otherwise fscale
+ results in overflow. */
+ if (iexponent <= -16384)
+ {
+ value *= 0x1p16383L;
+ iexponent += 16383;
+ }
+ else if (iexponent >= 16384)
+ {
+ value *= 0x1p-16383L;
+ iexponent -= 16383;
+ }
+
+ __asm ("fscale%.l %2, %0"
+ : "=f" (mantissa)
+ : "0" (value), "dmi" (-iexponent));
+ return mantissa;
+}
+
+weak_alias (__frexpl, frexpl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fba1515d2456482fc853be8ac27c14b0975cf564
commit fba1515d2456482fc853be8ac27c14b0975cf564
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 25 08:18:08 2003 +0000
(INLINE_SYSCALL): Cast result to long int.
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h
index ba40491..5013dd5 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.h
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.h
@@ -170,7 +170,7 @@
__set_errno (- __sys_res); \
__sys_res = (unsigned long) -1; \
} \
- __sys_res; \
+ (long int) __sys_res; \
})
#define LOAD_ARGS_c_0()
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50b45ef61cb66deaa9c3a24416e0447fa58b6b18
commit 50b45ef61cb66deaa9c3a24416e0447fa58b6b18
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 25 08:03:24 2003 +0000
ld.so cache deifnitions for mips.
diff --git a/sysdeps/unix/sysv/linux/mips/dl-cache.h b/sysdeps/unix/sysv/linux/mips/dl-cache.h
new file mode 100644
index 0000000..4fa5d3a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/dl-cache.h
@@ -0,0 +1,43 @@
+/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define add_system_dir(dir) \
+ do \
+ { \
+ size_t len = strlen (dir); \
+ char path[len + 3]; \
+ memcpy (path, dir, len + 1); \
+ if (len >= 6 \
+ && (! memcmp (path + len - 6, "/lib64", 6) \
+ || ! memcmp (path + len - 6, "/lib32", 6))) \
+ { \
+ len -= 2; \
+ path[len] = '\0'; \
+ } \
+ add_dir (path); \
+ if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \
+ { \
+ memcpy (path + len, "32", 3); \
+ add_dir (path); \
+ memcpy (path + len, "64", 3); \
+ add_dir (path); \
+ } \
+ } while (0)
+
+#include_next <dl-cache.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e31adc65328aff689243913af489685cff5e050d
commit e31adc65328aff689243913af489685cff5e050d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 24 17:13:44 2003 +0000
(struct statfs): Add f_frsize field.
(struct statfs64): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
index b8e37e6..d39c6f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,8 @@ struct statfs
#endif
__fsid_t f_fsid;
int f_namelen;
- int f_spare[6];
+ int f_frsize;
+ int f_spare[5];
};
#ifdef __USE_LARGEFILE64
@@ -56,7 +57,8 @@ struct statfs64
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
int f_namelen;
- int f_spare[6];
+ int f_frsize;
+ int f_spare[5];
};
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adaab7298afe5cc014daa23d5550aae229964a61
commit adaab7298afe5cc014daa23d5550aae229964a61
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jun 24 17:03:59 2003 +0000
* sysdeps/alpha/bits/atomic.h: New file.
diff --git a/sysdeps/alpha/bits/atomic.h b/sysdeps/alpha/bits/atomic.h
new file mode 100644
index 0000000..ead76a7
--- /dev/null
+++ b/sysdeps/alpha/bits/atomic.h
@@ -0,0 +1,367 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdint.h>
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int16_t atomic16_t;
+typedef uint16_t uatomic16_t;
+typedef int_fast16_t atomic_fast16_t;
+typedef uint_fast16_t uatomic_fast16_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef int64_t atomic64_t;
+typedef uint64_t uatomic64_t;
+typedef int_fast64_t atomic_fast64_t;
+typedef uint_fast64_t uatomic_fast64_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+
+#ifdef UP
+# define __MB /* nothing */
+#else
+# define __MB " mb\n"
+#endif
+
+
+/* Compare and exchange. For all of the "xxx" routines, we expect a
+ "__prev" and a "__cmp" variable to be provided by the enclosing scope,
+ in which values are returned. */
+
+#define __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2) \
+({ \
+ unsigned long __tmp, __snew, __addr64; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ " andnot %[__addr8],7,%[__addr64]\n" \
+ " insbl %[__new],%[__addr8],%[__snew]\n" \
+ "1: ldq_l %[__tmp],0(%[__addr64])\n" \
+ " extbl %[__tmp],%[__addr8],%[__prev]\n" \
+ " cmpeq %[__prev],%[__old],%[__cmp]\n" \
+ " beq %[__cmp],2f\n" \
+ " mskbl %[__tmp],%[__addr8],%[__tmp]\n" \
+ " or %[__snew],%[__tmp],%[__tmp]\n" \
+ " stq_c %[__tmp],0(%[__addr64])\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ "2:" \
+ : [__prev] "=&r" (__prev), \
+ [__snew] "=&r" (__snew), \
+ [__tmp] "=&r" (__tmp), \
+ [__cmp] "=&r" (__cmp), \
+ [__addr64] "=&r" (__addr64) \
+ : [__addr8] "r" (mem), \
+ [__old] "Ir" ((uint64_t)(uint8_t)(old)), \
+ [__new] "r" (new) \
+ : "memory"); \
+})
+
+#define __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2) \
+({ \
+ unsigned long __tmp, __snew, __addr64; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ " andnot %[__addr16],7,%[__addr64]\n" \
+ " inswl %[__new],%[__addr16],%[__snew]\n" \
+ "1: ldq_l %[__tmp],0(%[__addr64])\n" \
+ " extwl %[__tmp],%[__addr16],%[__prev]\n" \
+ " cmpeq %[__prev],%[__old],%[__cmp]\n" \
+ " beq %[__cmp],2f\n" \
+ " mskwl %[__tmp],%[__addr16],%[__tmp]\n" \
+ " or %[__snew],%[__tmp],%[__tmp]\n" \
+ " stq_c %[__tmp],0(%[__addr64])\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ "2:" \
+ : [__prev] "=&r" (__prev), \
+ [__snew] "=&r" (__snew), \
+ [__tmp] "=&r" (__tmp), \
+ [__cmp] "=&r" (__cmp), \
+ [__addr64] "=&r" (__addr64) \
+ : [__addr16] "r" (mem), \
+ [__old] "Ir" ((uint64_t)(uint16_t)(old)), \
+ [__new] "r" (new) \
+ : "memory"); \
+})
+
+#define __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2) \
+({ \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldl_l %[__prev],%[__mem]\n" \
+ " cmpeq %[__prev],%[__old],%[__cmp]\n" \
+ " beq %[__cmp],2f\n" \
+ " mov %[__new],%[__cmp]\n" \
+ " stl_c %[__cmp],%[__mem]\n" \
+ " beq %[__cmp],1b\n" \
+ mb2 \
+ "2:" \
+ : [__prev] "=&r" (__prev), \
+ [__cmp] "=&r" (__cmp) \
+ : [__mem] "m" (*(mem)), \
+ [__old] "Ir" ((uint64_t)(atomic32_t)(old)), \
+ [__new] "Ir" (new) \
+ : "memory"); \
+})
+
+#define __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2) \
+({ \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldq_l %[__prev],%[__mem]\n" \
+ " cmpeq %[__prev],%[__old],%[__cmp]\n" \
+ " beq %[__cmp],2f\n" \
+ " mov %[__new],%[__cmp]\n" \
+ " stq_c %[__cmp],%[__mem]\n" \
+ " beq %[__cmp],1b\n" \
+ mb2 \
+ "2:" \
+ : [__prev] "=&r" (__prev), \
+ [__cmp] "=&r" (__cmp) \
+ : [__mem] "m" (*(mem)), \
+ [__old] "Ir" (old), \
+ [__new] "Ir" (new) \
+ : "memory"); \
+})
+
+/* For all "bool" routines, we return true if exchange succesful. */
+
+#define __arch_compare_and_exchange_bool_8_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \
+ __cmp; })
+
+#define __arch_compare_and_exchange_bool_16_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \
+ __cmp; })
+
+#define __arch_compare_and_exchange_bool_32_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \
+ __cmp; })
+
+#define __arch_compare_and_exchange_bool_64_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \
+ __cmp; })
+
+/* For all "val" routines, return the old value whether exchange
+ successful or not. */
+
+#define __arch_compare_and_exchange_val_8_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_8_int(mem, new, old, mb1, mb2); \
+ __prev; })
+
+#define __arch_compare_and_exchange_val_16_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_16_int(mem, new, old, mb1, mb2); \
+ __prev; })
+
+#define __arch_compare_and_exchange_val_32_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_32_int(mem, new, old, mb1, mb2); \
+ __prev; })
+
+#define __arch_compare_and_exchange_val_64_int(mem, new, old, mb1, mb2) \
+({ unsigned long __prev; int __cmp; \
+ __arch_compare_and_exchange_xxx_64_int(mem, new, old, mb1, mb2); \
+ __prev; })
+
+/* Compare and exchange with "acquire" semantics, ie barrier after. */
+
+#define atomic_compare_and_exchange_bool_acq(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, "", __MB)
+
+#define atomic_compare_and_exchange_val_acq(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, "", __MB)
+
+/* Compare and exchange with "release" semantics, ie barrier before. */
+
+#define atomic_compare_and_exchange_bool_rel(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_bool, int, \
+ mem, new, old, __MB, "")
+
+#define atomic_compare_and_exchange_val_rel(mem, new, old) \
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __MB, "")
+
+
+/* Atomically store value and return the previous value. */
+
+#define __arch_exchange_8_int(mem, value, mb1, mb2) \
+({ \
+ unsigned long __ret, __tmp, __addr64, __sval; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ " andnot %[__addr8],7,%[__addr64]\n" \
+ " insbl %[__value],%[__addr8],%[__sval]\n" \
+ "1: ldq_l %[__tmp],0(%[__addr64])\n" \
+ " extbl %[__tmp],%[__addr8],%[__ret]\n" \
+ " mskbl %[__tmp],%[__addr8],%[__tmp]\n" \
+ " or %[__sval],%[__tmp],%[__tmp]\n" \
+ " stq_c %[__tmp],0(%[__addr64])\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__sval] "=&r" (__sval), \
+ [__tmp] "=&r" (__tmp), \
+ [__addr64] "=&r" (__addr64) \
+ : [__addr8] "r" (mem), \
+ [__value] "r" (value) \
+ : "memory"); \
+ __ret; })
+
+#define __arch_exchange_16_int(mem, value, mb1, mb2) \
+({ \
+ unsigned long __ret, __tmp, __addr64, __sval; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ " andnot %[__addr8],7,%[__addr64]\n" \
+ " inswl %[__value],%[__addr16],%[__sval]\n" \
+ "1: ldq_l %[__tmp],0(%[__addr64])\n" \
+ " extwl %[__tmp],%[__addr16],%[__ret]\n" \
+ " mskwl %[__tmp],%[__addr16],%[__tmp]\n" \
+ " or %[__sval],%[__tmp],%[__tmp]\n" \
+ " stq_c %[__tmp],0(%[__addr64])\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__sval] "=&r" (__sval), \
+ [__tmp] "=&r" (__tmp), \
+ [__addr64] "=&r" (__addr64) \
+ : [__addr16] "r" (mem), \
+ [__value] "r" (value) \
+ : "memory"); \
+ __ret; })
+
+#define __arch_exchange_32_int(mem, value, mb1, mb2) \
+({ \
+ signed int __ret, __tmp; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldl_l %[__ret],%[__mem]\n" \
+ " mov %[__ret],%[__tmp]\n" \
+ " stl_c %[__tmp],%[__mem]\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__tmp] "=&r" (__tmp) \
+ : [__mem] "m" (*(mem)) \
+ : "memory"); \
+ __ret; })
+
+#define __arch_exchange_64_int(mem, value, mb1, mb2) \
+({ \
+ unsigned long __ret, __tmp; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldq_l %[__ret],%[__mem]\n" \
+ " mov %[__ret],%[__tmp]\n" \
+ " stq_c %[__tmp],%[__mem]\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__tmp] "=&r" (__tmp) \
+ : [__mem] "m" (*(mem)) \
+ : "memory"); \
+ __ret; })
+
+#define atomic_exchange_acq(mem, value) \
+ __atomic_val_bysize (__arch_exchange, int, mem, value, "", __MB)
+
+#define atomic_exchange_rel(mem, value) \
+ __atomic_val_bysize (__arch_exchange, int, mem, value, __MB, "")
+
+
+/* Atomically add value and return the previous (unincremented) value. */
+
+#define __arch_exchange_and_add_8_int(mem, value, mb1, mb2) \
+ ({ __builtin_trap (); 0; })
+
+#define __arch_exchange_and_add_16_int(mem, value, mb1, mb2) \
+ ({ __builtin_trap (); 0; })
+
+#define __arch_exchange_and_add_32_int(mem, value, mb1, mb2) \
+({ \
+ signed int __ret, __tmp; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldl_l %[__ret],%[__mem]\n" \
+ " addl %[__ret],%[__val],%[__tmp]\n" \
+ " stl_c %[__tmp],%[__mem]\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__tmp] "=&r" (__tmp) \
+ : [__mem] "m" (*(mem)), \
+ [__val] "Ir" ((signed int)(value)) \
+ : "memory"); \
+ __ret; })
+
+#define __arch_exchange_and_add_64_int(mem, value, mb1, mb2) \
+({ \
+ unsigned long __ret, __tmp; \
+ __asm__ __volatile__ ( \
+ mb1 \
+ "1: ldq_l %[__ret],%[__mem]\n" \
+ " addq %[__ret],%[__val],%[__tmp]\n" \
+ " stq_c %[__tmp],%[__mem]\n" \
+ " beq %[__tmp],1b\n" \
+ mb2 \
+ : [__ret] "=&r" (__ret), \
+ [__tmp] "=&r" (__tmp) \
+ : [__mem] "m" (*(mem)), \
+ [__val] "Ir" ((unsigned long)(value)) \
+ : "memory"); \
+ __ret; })
+
+/* ??? Barrier semantics for atomic_exchange_and_add appear to be
+ undefined. Use full barrier for now, as that's safe. */
+#define atomic_exchange_and_add(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, __MB, __MB)
+
+
+/* ??? Blah, I'm lazy. Implement these later. Can do better than the
+ compare-and-exchange loop provided by generic code.
+
+#define atomic_decrement_if_positive(mem)
+#define atomic_bit_test_set(mem, bit)
+
+*/
+
+#ifndef UP
+# define atomic_full_barrier() __asm ("mb" : : : "memory");
+# define atomic_read_barrier() __asm ("mb" : : : "memory");
+# define atomic_write_barrier() __asm ("wmb" : : : "memory");
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1fbb61a95d42134c36bd7865424a1915d72f26f8
commit 1fbb61a95d42134c36bd7865424a1915d72f26f8
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jun 24 16:38:45 2003 +0000
* sysdeps/unix/sysv/linux/alpha/clone.S: Use HIDDEN_JUMPTARGET.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use
libc_hidden_def.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setfpucw.c: Use libc_hidden_proto
on them.
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 2aa9bb7..a0aa771 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -97,7 +97,11 @@ thread_start:
/* Call _exit rather than doing it inline for breakpoint purposes. */
mov v0,a0
- jsr ra,_exit
+#ifdef PIC
+ bsr ra, HIDDEN_JUMPTARGET(_exit) !samegp
+#else
+ jsr ra, HIDDEN_JUMPTARGET(_exit)
+#endif
/* Die horribly. */
halt
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index f436a52..3cabd0b 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -57,4 +57,5 @@ $error:
END(__ieee_get_fp_control)
+libc_hidden_def(__ieee_get_fp_control)
weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 54762e1..302ed06 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -56,4 +56,5 @@ $error:
END(__ieee_set_fp_control)
+libc_hidden_def(__ieee_set_fp_control)
weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index 5622d84..a7e3a55 100644
--- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,5 +1,5 @@
/* Set FP exception mask and rounding mode.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,9 +20,11 @@
#include <fpu_control.h>
#include <asm/fpu.h>
-
extern void __ieee_set_fp_control (unsigned long);
+libc_hidden_proto(__ieee_set_fp_control)
+
extern unsigned long __ieee_get_fp_control (void);
+libc_hidden_proto(__ieee_get_fp_control)
static inline unsigned long
rdfpcr (void)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=981e63c822093ece2981e3667d284b78a2731005
commit 981e63c822093ece2981e3667d284b78a2731005
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jun 24 16:33:49 2003 +0000
* sysdeps/alpha/fpu/bits/mathinline.h: Honor
__LIBC_INTERNAL_MATH_INLINES. Implement __signbitf, __signbit.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 3fb6ec2..8141485 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -58,7 +58,8 @@
!isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+#if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+ && defined __OPTIMIZE__
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
@@ -176,6 +177,19 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW
return __x < __y ? 0.0 : __x - __y;
}
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int __signbitf (float __x) __THROW
+{
+ __extension__ union { float __f; int __i; } __u = { __f: __x };
+ return __u.__i < 0;
+}
+
+__MATH_INLINE int __signbit (double __x) __THROW
+{
+ __extension__ union { double __d; long __i; } __u = { __d: __x };
+ return __u.__i < 0;
+}
+
#endif /* C99 */
#endif /* __NO_MATH_INLINES */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bb08f1582d3914003456d751b708ff27ebeae41
commit 1bb08f1582d3914003456d751b708ff27ebeae41
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jun 24 16:29:21 2003 +0000
* sysdeps/alpha/setjmp.S (_setjmp, setjmp): Mark .prologue.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 2e38f00..14a0320 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -74,6 +74,7 @@ END(__sigsetjmp)
ENTRY(_setjmp)
ldgp gp, 0(pv)
+ .prologue 1
mov 0, a1
br $sigsetjmp_local
END(_setjmp)
@@ -81,6 +82,7 @@ libc_hidden_def (_setjmp)
ENTRY(setjmp)
ldgp gp, 0(pv)
+ .prologue 1
mov 1, a1
br $sigsetjmp_local
END(setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f6923e1f5a776bcf601154c2b4beb7b704c34c9
commit 4f6923e1f5a776bcf601154c2b4beb7b704c34c9
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jun 24 16:26:34 2003 +0000
* sysdeps/unix/sysv/linux/alpha/syscalls.list (pread, pwrite): Use
the 64-bit syscall name.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 1e28c11..60235d0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -22,8 +22,8 @@ mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
-pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs i:sp __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0fadfc223dc81bef82589ae3189d30a90d700d60
commit 0fadfc223dc81bef82589ae3189d30a90d700d60
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Jun 24 11:06:57 2003 +0000
Update.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index b4749d0..cab9501 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -125,8 +125,6 @@ ifloat: 1
Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
float: 1
ifloat: 1
@@ -192,9 +190,6 @@ ifloat: 1
Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
ildouble: 1
ldouble: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -358,8 +353,6 @@ ifloat: 1
Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
@@ -371,9 +364,8 @@ ifloat: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
-ildouble: 439
-ldouble: 439
-Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+double: 1
+idouble: 1
ildouble: 1
ldouble: 1
Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -384,12 +376,9 @@ ildouble: 2
ldouble: 2
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
-ildouble: 2
-ldouble: 2
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
double: 1
idouble: 1
@@ -1032,28 +1021,24 @@ ldouble: 1
Function: Imaginary part of "csinh":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
Function: Real part of "ctan":
-ildouble: 439
-ldouble: 439
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctan":
ildouble: 2
ldouble: 2
-Function: Real part of "ctanh":
-ildouble: 2
-ldouble: 2
-
Function: Imaginary part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Function: "erfc":
float: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=200266341338ab84b84889cd9f5388fee1db4b92
commit 200266341338ab84b84889cd9f5388fee1db4b92
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jun 20 19:24:17 2003 +0000
* sysdeps/unix/make-syscalls.sh: Implement ! prefix for strong aliases.
* sysdeps/unix/sysv/linux/alpha/syscalls.list (open, open64): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 5b63755..1e28c11 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -32,6 +32,8 @@ ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
truncate - truncate 2 truncate truncate64
readahead - readahead 3 __readahead readahead
sendfile - sendfile i:iipi sendfile sendfile64
+open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64
+open64 open -
# proper socket implementations:
accept - accept Ci:iBN __libc_accept __accept accept
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebcd2cd199fc5c4ec0446dbcc34bec22c8edf6c9
commit ebcd2cd199fc5c4ec0446dbcc34bec22c8edf6c9
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jun 20 16:24:36 2003 +0000
* sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL1): Use __builtin_expect.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ST_INO_64_BIT)
Unset for alpha.
(__ASSUME_TIMEVAL64): Set for alpha.
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove
adjtimex, osf_sigprocmask, old_adjtimex.
* sysdeps/unix/sysv/linux/alpha/adjtime.c: Use INLINE_SYSCALL,
__ASSUME_TIMEVAL64. Reorg tv64 functions to avoid uninit variable.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Use __ASSUME_TIMEVAL64.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Streamline
PIC code sequence.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigaction.c: New file.
* sysdeps/unix/sysv/linux/alpha/sigprocmask.c: Use INLINE_SYSCALL.
* sysdeps/unix/sysv/linux/alpha/ustat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove osf_sigprocmask,
sys_ustat, sys_mknod, adjtimex, old_adjtimex.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (INLINE_SYSCALL): Don't
defer to __syscall_name; error for rt_sigaction.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Include kernel_stat.h.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 6e55061..b9bc1c0 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -152,7 +152,7 @@ __LABEL(name) \
({ \
long _sc_ret, _sc_err; \
inline_syscall##nr(name, args); \
- if (_sc_err) \
+ if (__builtin_expect (_sc_err, 0)) \
{ \
__set_errno (_sc_ret); \
_sc_ret = -1L; \
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 62536ae..6ec4976 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -6,12 +6,12 @@ ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
- ioperm osf_sigprocmask llseek adjtimex
+ ioperm llseek
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
- osf_getrusage osf_wait4 old_adjtimex
+ osf_getrusage osf_wait4
# Support old ipc control
sysdep_routines += oldmsgctl oldsemctl oldshmctl
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index 34df942..69f63d4 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -17,7 +17,11 @@
02111-1307 USA. */
#include <shlib-compat.h>
+#include <sysdep.h>
+#include <sys/time.h>
+#include "kernel-features.h"
+#if !defined __ASSUME_TIMEVAL64 || SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
struct timeval32
{
int tv_sec, tv_usec;
@@ -55,7 +59,7 @@ struct timex32 {
#define TIMEVAL timeval32
#define TIMEX timex32
#define ADJTIME __adjtime_tv32
-#define ADJTIMEX(x) __adjtimex_tv32 (x)
+#define ADJTIMEX(x) INLINE_SYSCALL (old_adjtimex, 1, x)
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
#define LINKAGE
#else
@@ -63,13 +67,18 @@ struct timex32 {
#endif
LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
-extern int ADJTIMEX (struct TIMEX *);
#include <sysdeps/unix/sysv/linux/adjtime.c>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+int __adjtimex_tv32 (struct timex32 *tx) { return ADJTIMEX (tx); }
+strong_alias (__adjtimex_tv32, __adjtimex_tv32_1);
+strong_alias (__adjtimex_tv32, __adjtimex_tv32_2);
+compat_symbol (libc, __adjtimex_tv32_1, __adjtimex, GLIBC_2_0);
+compat_symbol (libc, __adjtimex_tv32_2, adjtimex, GLIBC_2_0);
compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
#endif
+#endif /* !__ASSUME_TIMEVAL64 || SHLIB_COMPAT */
#undef TIMEVAL
#define TIMEVAL timeval
@@ -78,34 +87,38 @@ compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
#undef ADJTIME
#define ADJTIME __adjtime_tv64
#undef ADJTIMEX
-#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x)
+#define ADJTIMEX(x) INLINE_SYSCALL (adjtimex, 1, x)
#undef LINKAGE
#define LINKAGE static
LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
-extern int ADJTIMEX (struct TIMEX *);
#include <sysdeps/unix/sysv/linux/adjtime.c>
-static int missing_adjtimex = 0;
+#include <stdbool.h>
+
+#if !defined __ASSUME_TIMEVAL64
+static bool missing_adjtimex;
int
__adjtime (itv, otv)
const struct timeval *itv;
struct timeval *otv;
{
+ struct timeval32 itv32, otv32;
int ret;
- if (!missing_adjtimex)
+ switch (missing_adjtimex)
{
+ case false:
ret = __adjtime_tv64 (itv, otv);
if (ret && errno == ENOSYS)
missing_adjtimex = 1;
- }
+ else
+ break;
- if (missing_adjtimex)
- {
- struct timeval32 itv32, otv32;
+ /* FALLTHRU */
+ default:
itv32.tv_sec = itv->tv_sec;
itv32.tv_usec = itv->tv_usec;
ret = __adjtime_tv32 (&itv32, &otv32);
@@ -114,31 +127,38 @@ __adjtime (itv, otv)
otv->tv_sec = otv32.tv_sec;
otv->tv_usec = otv32.tv_usec;
}
+ break;
}
return ret;
}
+#else
+strong_alias (__adjtime_tv64, __adjtime);
+#endif
versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);
-extern int __syscall_adjtimex_tv64 (struct timex *tx);
-
int
__adjtimex_tv64 (struct timex *tx)
{
+#if defined __ASSUME_TIMEVAL64
+ return ADJTIMEX (tx);
+#else
+ struct timex32 tx32;
int ret;
- if (!missing_adjtimex)
- {
- ret = __syscall_adjtimex_tv64 (tx);
- if (ret && errno == ENOSYS)
+ switch (missing_adjtimex)
+ {
+ case false:
+ ret = ADJTIMEX (tx);
+ if (ret && errno == ENOSYS)
missing_adjtimex = 1;
- }
+ else
+ break;
- if (missing_adjtimex)
- {
- struct timex32 tx32;
+ /* FALLTHRU */
+ default:
tx32.modes = tx->modes;
tx32.offset = tx->offset;
tx32.freq = tx->freq;
@@ -184,9 +204,11 @@ __adjtimex_tv64 (struct timex *tx)
tx->errcnt = tx32.errcnt;
tx->stbcnt = tx32.stbcnt;
}
+ break;
}
return ret;
+#endif
}
strong_alias (__adjtimex_tv64, __adjtimex_internal);
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 5432562..c2bc565 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETITIMER __getitimer_tv64
+#else
+#define GETITIMER getitimer
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(GETITIMER, getitimer, 2)
+ ret
+PSEUDO_END(GETITIMER)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define GETITIMER __getitimer_tv64
-#else
-#define GETITIMER getitimer
-#endif
-
LEAF(GETITIMER, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
@@ -100,6 +106,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(GETITIMER)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index dd3eced..2c34e98 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETRUSAGE __getrusage_tv64
+#else
+#define GETRUSAGE __getrusage
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(GETRUSAGE, getrusage, 2)
+ ret
+PSEUDO_END(GETRUSAGE)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define GETRUSAGE __getrusage_tv64
-#else
-#define GETRUSAGE __getrusage
-#endif
-
LEAF(GETRUSAGE, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
@@ -132,6 +138,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(GETRUSAGE)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
strong_alias(__getrusage_tv64, ____getrusage_tv64)
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 221a113..1a6f88b 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETTIMEOFDAY __gettimeofday_tv64
+#else
+#define GETTIMEOFDAY __gettimeofday
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(GETTIMEOFDAY, gettimeofday, 2)
+ ret
+PSEUDO_END(GETTIMEOFDAY)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
@@ -30,14 +45,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define GETTIMEOFDAY __gettimeofday_tv64
-#else
-#define GETTIMEOFDAY __gettimeofday
-#endif
-
LEAF(GETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
@@ -97,6 +104,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(GETTIMEOFDAY)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 89e08b3..f436a52 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -32,9 +32,13 @@ LEAF(__ieee_get_fp_control, 16)
jsr AT, (AT), _mcount
.set at
.prologue 1
-#else
+#elif defined PIC
lda sp, -16(sp)
.prologue 0
+#else
+ ldgp gp, 0(pv)
+ lda sp, -16(sp)
+ .prologue 1
#endif
mov sp, a1
@@ -48,10 +52,6 @@ LEAF(__ieee_get_fp_control, 16)
ret
$error:
-#ifndef PROF
- br gp, 1f
-1: ldgp gp, 0(gp)
-#endif
lda sp, 16(sp)
SYSCALL_ERROR_HANDLER
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index dc1bbbb..54762e1 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -30,9 +30,13 @@ LEAF(__ieee_set_fp_control, 16)
jsr AT, (AT), _mcount
.set at
.prologue 1
-#else
+#elif defined PIC
lda sp, -16(sp)
.prologue 0
+#else
+ ldgp gp, 0(pv)
+ lda sp, -16(sp)
+ .prologue 1
#endif
stq a0, 0(sp)
@@ -47,10 +51,6 @@ LEAF(__ieee_set_fp_control, 16)
ret
$error:
-#ifndef PROF
- br gp, 1f
-1: ldgp gp, 0(gp)
-#endif
lda sp, 16(sp)
SYSCALL_ERROR_HANDLER
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 9cfd63f..4a0594c 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -19,7 +19,21 @@
#include <sysdep-cancel.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SELECT __select_tv64
+#else
+#define SELECT __select
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(SELECT, select, 5)
+ ret
+PSEUDO_END(SELECT)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define SELECT __select_tv64
-#else
-#define SELECT __select
-#endif
-
LEAF(SELECT, 64)
ldgp gp, 0(pv)
subq sp, 64, sp
@@ -210,6 +216,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(SELECT)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__select_tv64, __select, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index fdc3d27..16bbd22 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETITIMER __setitimer_tv64
+#else
+#define SETITIMER __setitimer
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(SETITIMER, setitimer, 3)
+ ret
+PSEUDO_END(SETITIMER)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define SETITIMER __setitimer_tv64
-#else
-#define SETITIMER __setitimer
-#endif
-
LEAF(SETITIMER, 48)
ldgp gp, 0(pv)
subq sp, 48, sp
@@ -116,6 +122,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(SETITIMER)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index 339913f..b49c770 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETTIMEOFDAY __settimeofday_tv64
+#else
+#define SETTIMEOFDAY __settimeofday
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(SETTIMEOFDAY, settimeofday, 2)
+ ret
+PSEUDO_END(SETTIMEOFDAY)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define SETTIMEOFDAY __settimeofday_tv64
-#else
-#define SETTIMEOFDAY __settimeofday
-#endif
-
LEAF(SETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
@@ -97,6 +103,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(SETTIMEOFDAY)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/sigaction.c
similarity index 59%
copy from sysdeps/unix/sysv/linux/alpha/ustat.c
copy to sysdeps/unix/sysv/linux/alpha/sigaction.c
index 5fe25ff..1bfba1b 100644
--- a/sysdeps/unix/sysv/linux/alpha/ustat.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigaction.c
@@ -1,6 +1,5 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -17,19 +16,18 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sys/ustat.h>
-#include <sys/sysmacros.h>
+#include <sysdep.h>
+/*
+ * In order to get the hidden arguments for rt_sigaction set up
+ * properly, we need to call the assembly version. Detect this in the
+ * INLINE_SYSCALL macro, and fail to expand inline in that case.
+ */
-extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf);
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ (__NR_##name == __NR_rt_sigaction \
+ ? __syscall_rt_sigaction(args) \
+ : INLINE_SYSCALL1(name, nr, args))
-int
-ustat (dev_t dev, struct ustat *ubuf)
-{
- unsigned int k_dev;
-
- /* We must convert the value to dev_t type used by the kernel. */
- k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
-
- return __syscall_ustat (k_dev, ubuf);
-}
+#include <sysdeps/unix/sysv/linux/sigaction.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
index 4d22192..1916111 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@azstarnet.com).
@@ -17,14 +17,13 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <sysdep.h>
#include <signal.h>
/* When there is kernel support for more than 64 signals, we'll have to
switch to a new system call convention here. */
-extern unsigned long __osf_sigprocmask (int how, unsigned long newmask);
-
int
__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
{
@@ -32,15 +31,14 @@ __sigprocmask (int how, const sigset_t *set, sigset_t *oset)
long result;
if (set)
- {
- setval = set->__val[0];
- }
+ setval = set->__val[0];
else
{
setval = 0;
how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
}
- result = __osf_sigprocmask (how, setval);
+
+ result = INLINE_SYSCALL (osf_sigprocmask, 2, how, setval);
if (result == -1)
/* If there are ever more than 63 signals, we need to recode this
in assembler since we wouldn't be able to distinguish a mask of
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 62522e7..5b63755 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -13,7 +13,6 @@ semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0
-osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
sigstack - sigstack 2 sigstack
vfork - vfork 0 __vfork vfork
@@ -34,10 +33,6 @@ truncate - truncate 2 truncate truncate64
readahead - readahead 3 __readahead readahead
sendfile - sendfile i:iipi sendfile sendfile64
-# these are actually common with the x86:
-sys_ustat ustat ustat i:ip __syscall_ustat
-sys_mknod xmknod mknod i:sii __syscall_mknod
-
# proper socket implementations:
accept - accept Ci:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
@@ -64,9 +59,6 @@ pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase
-# Wrapper for adjtimex.
-adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex
-
# support old timeval32 entry points
osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
@@ -76,7 +68,3 @@ osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
-old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
-
-# and one for timeval64 entry points
-adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 272dceb..3c0988a 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -67,15 +67,18 @@
/*
* In order to get the hidden arguments for rt_sigaction set up
- * properly, we need to call the assembly version. Detect this in the
- * INLINE_SYSCALL macro, and fail to expand inline in that case.
+ * properly, we need to call the assembly version. This shouldn't
+ * happen except for inside sigaction.c, where we handle this
+ * specially. Catch other uses and error.
*/
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
- (__NR_##name == __NR_rt_sigaction \
- ? __syscall_##name(args) \
- : INLINE_SYSCALL1(name, nr, args))
+#define INLINE_SYSCALL(name, nr, args...) \
+({ \
+ extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
+ __attribute__((unused)); \
+ INLINE_SYSCALL1(name, nr, args); \
+})
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c
index 5fe25ff..4e3bf63 100644
--- a/sysdeps/unix/sysv/linux/alpha/ustat.c
+++ b/sysdeps/unix/sysv/linux/alpha/ustat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,11 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <sys/ustat.h>
#include <sys/sysmacros.h>
-
-
-extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf);
+#include <sysdep.h>
int
ustat (dev_t dev, struct ustat *ubuf)
@@ -31,5 +30,5 @@ ustat (dev_t dev, struct ustat *ubuf)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
- return __syscall_ustat (k_dev, ubuf);
+ return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
}
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index a939255..c210e1d 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define UTIMES __utimes_tv64
+#else
+#define UTIMES __utimes
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(UTIMES, utimes, 2)
+ ret
+PSEUDO_END(UTIMES)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define UTIMES __utimes_tv64
-#else
-#define UTIMES __utimes
-#endif
-
LEAF(UTIMES, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
@@ -102,6 +108,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(UTIMES)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 17c5a97..8d89e3d 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,21 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include "kernel-features.h"
+.text
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define WAIT4 __wait4_tv64
+#else
+#define WAIT4 __wait4
+#endif
+
+#if defined __ASSUME_TIMEVAL64
+PSEUDO(WAIT4, wait4, 4)
+ ret
+PSEUDO_END(WAIT4)
+#else
/* The problem here is that initially we made struct timeval compatible with
OSF/1, using int32. But we defined time_t with uint64, and later found
that POSIX requires tv_sec to be time_t.
@@ -30,14 +44,6 @@
functions which have RT equivalents. */
.comm __libc_missing_axp_tv64, 4
-.text
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-#define WAIT4 __wait4_tv64
-#else
-#define WAIT4 __wait4
-#endif
-
LEAF(WAIT4, 32)
ldgp gp, 0(pv)
subq sp, 32, sp
@@ -135,6 +141,7 @@ $error:
SYSCALL_ERROR_HANDLER
END(WAIT4)
+#endif /* __ASSUME_TIMEVAL64 */
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
index d7e8d2a..e74f4c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/xmknod.c
+++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c
@@ -1,5 +1,6 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc.
+ Copyright (C) 1991,1993,1995,1996,1997,2002,2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,8 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-
-extern int __syscall_mknod (const char *, unsigned int, unsigned int);
+#include <sysdep.h>
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
@@ -41,7 +41,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
- return __syscall_mknod (path, mode, k_dev);
+ return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
}
weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index 1084049..3f15dfe 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -20,7 +20,7 @@
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
-
+#include <kernel_stat.h>
#include <xstatconv.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e650efca313e5ce230f96b2c2c10f6fbc3204319
commit e650efca313e5ce230f96b2c2c10f6fbc3204319
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Jun 15 14:41:02 2003 +0000
2003-06-15 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/Makefile: Add missing endif and
create $(objpfx).
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 424fb5e..6703778 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -15,6 +15,7 @@ no_syscall_list_h = 1
# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
+ $(make-target-directory)
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
echo ''; \
@@ -49,3 +50,4 @@ ifneq (,$(objpfx))
else
mv -f $(@:.h=.d)-t $(@:.h=.d)
endif
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6e14c55d3807e26f499b3c5615603a4d69bedf6
commit e6e14c55d3807e26f499b3c5615603a4d69bedf6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 12 16:18:11 2003 +0000
Fix handling of syscalls with more than four parameters.
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h
index f22a3d2..ba40491 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.h
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.h
@@ -209,7 +209,7 @@
#define LOAD_ARGS_c_5(r10, r11, r12, r13, mof) \
LOAD_ARGS_c_4(r10, r11, r12, r13)
#define LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \
- LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %5,$mof\n\t"
+ LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %6,$mof\n\t"
#define ASM_CLOBBER_5 ASM_CLOBBER_4
#define ASM_ARGS_5(r10, r11, r12, r13, mof) \
ASM_ARGS_4 (r10, r11, r12, r13), "g" (mof)
@@ -218,7 +218,7 @@
LOAD_ARGS_c_5(r10, r11, r12, r13, mof)
#define LOAD_ARGS_asm_6(r10, r11, r12, r13, mof, srp) \
LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \
- "move %6,$srp\n\t"
+ "move %7,$srp\n\t"
#define ASM_CLOBBER_6 ASM_CLOBBER_5, "srp"
#define ASM_ARGS_6(r10, r11, r12, r13, mof, srp) \
ASM_ARGS_5 (r10, r11, r12, r13, mof), "g" (srp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c27758e9c6bd7d832547a64609542b1fde68d2c8
commit c27758e9c6bd7d832547a64609542b1fde68d2c8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 11 22:37:05 2003 +0000
Don't inline the function. Export them. Prepend __ to name.
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index 31fe7a5..1084049 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <string.h>
+#include <sys/stat.h>
+#include <xstatconv.h>
-static inline int
-xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+
+int
+__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
switch (vers)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ca4471f970f0ef6ed4d6104efb3e09383c4868b
commit 1ca4471f970f0ef6ed4d6104efb3e09383c4868b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 6 17:31:40 2003 +0000
New sequences for 5+ arg syscalls only needed for PIC.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index d2043aa..92d8460 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -26,12 +26,14 @@
/* We push lr onto the stack, so we have to use ldmib instead of ldmia
to find the saved arguments. */
-#undef DOARGS_5
-#undef DOARGS_6
-#undef DOARGS_7
-#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
-#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
-#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
+# ifdef PIC
+# undef DOARGS_5
+# undef DOARGS_6
+# undef DOARGS_7
+# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
+# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
+# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
+# endif
# undef PSEUDO_RET
# define PSEUDO_RET \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48e0ec3c4856a52105dd9771aac7865f3b6a6c3a
commit 48e0ec3c4856a52105dd9771aac7865f3b6a6c3a
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jun 6 05:54:15 2003 +0000
* sysdeps/alpha/dl-machine.h (RTLD_START): Fix top-of-stack backtrace.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/alpha/elf/start.S: Likewise. Remove pointless allocation.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use standard ldgp
entry sequence and explicit relocs. Add unwind info for sigreturn
and rt_sigreturn.
* configure.in (libc_cv_asm_cfi_directives): Test .cfi_remember_state.
* configure: Regenerate.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 4704428..0101ba4 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -303,6 +303,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.globl _start \n\
.ent _start \n\
_start: \n\
+ .frame $31,0,$31,0 \n\
br $gp, 0f \n\
0: ldgp $gp, 0($gp) \n\
.prologue 0 \n\
@@ -314,7 +315,7 @@ _start: \n\
.globl _dl_start_user \n\
.ent _dl_start_user \n\
_dl_start_user: \n\
- .frame $30,0,$31,0 \n\
+ .frame $31,0,$31,0 \n\
.prologue 0 \n\
/* Save the user entry point address in s0. */ \n\
mov $0, $9 \n\
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 3f98111..dbe4223 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,6 @@
/* Startup code for Alpha/ELF.
- Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>
@@ -26,8 +27,7 @@
.ent _start, 0
.type _start,@function
_start:
- .frame fp, 0, zero
- mov zero, fp
+ .frame $31, 0, $31
br gp, 1f
1: ldgp gp, 0(gp)
subq sp, 16, sp
@@ -65,6 +65,5 @@ weak_alias(_start, __start)
.data
.globl __data_start
__data_start:
- .long 0
.weak data_start
data_start = __data_start
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 42df98a..2aa9bb7 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -83,8 +83,7 @@ $error:
.ent thread_start
thread_start:
- .frame fp,0,zero,0
- mov zero,fp
+ .frame zero,0,zero,0
.prologue 0
/* Load up the arguments. */
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 5f166a7..3e02a66 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@cygnus.com>, 1998
@@ -28,55 +28,92 @@
#ifdef __NR_rt_sigaction
.text
+
ENTRY(__syscall_rt_sigaction)
.frame sp,0,ra,0
-#ifdef PROF
ldgp gp,0(pv)
+#ifdef PROF
.set noat
lda AT, _mcount
jsr AT, (AT), _mcount
.set at
#endif
- /* Indicate non-standard use of our PV. */
- .prologue 2
+ .prologue 1
beq a1, 0f
- ldl t0, 8(a1) # sa_flags
- lda a4, sigreturn-__syscall_rt_sigaction(pv)
- lda t1, rt_sigreturn-__syscall_rt_sigaction(pv)
- and t0, 0x00000040, t0 # SA_SIGINFO
+ ldl t0, 8(a1) # sa_flags
+ ldah a4, sigreturn(gp) !gprelhigh
+ ldah t1, rt_sigreturn(gp) !gprelhigh
+ lda a4, sigreturn(a4) !gprellow
+ lda t1, rt_sigreturn(a4) !gprellow
+ and t0, 0x00000040, t0 # SA_SIGINFO
cmovne t0, t1, a4
-0: ldi v0,__NR_rt_sigaction
+0: ldi v0, __NR_rt_sigaction
callsys
- bne a3,1f
+ bne a3, SYSCALL_ERROR_LABEL
ret
-1:
-#ifndef PROF
- br gp,2f
-2: ldgp gp,0(gp)
-#endif
- SYSCALL_ERROR_HANDLER
+PSEUDO_END(__syscall_rt_sigaction)
-END(__syscall_rt_sigaction)
+/* To enable unwinding through the signal frame without special hackery
+ elsewhere, describe the entire struct sigcontext with unwind info.
+ Note that we begin the unwind info one instruction before the start
+ of the function; the unwinder will subtract one from the return address
+ attempting to find the call instruction that led us here, since we
+ didn't get here via a normal call. */
+
+ .macro SIGCONTEXT_REGS_I base, from=0
+ cfi_offset (\from, \base + (4 + \from) * 8)
+ .if 30-\from
+ SIGCONTEXT_REGS_I \base, "(\from+1)"
+ .endif
+ .endm
- .align 5
- .ent sigreturn
+ .macro SIGCONTEXT_REGS_F base, from=32
+ cfi_offset (\from, \base + (4 + 1 + \from) * 8)
+ .if 62-\from
+ SIGCONTEXT_REGS_F \base, "(\from+1)"
+ .endif
+ .endm
+
+ .macro SIGCONTEXT_REGS base
+ SIGCONTEXT_REGS_I \base
+ SIGCONTEXT_REGS_F \base
+ cfi_offset (63, \base + (4 + 32 + 1 + 32) * 8)
+ cfi_offset (64, \base + 2 * 8)
+ .endm
+
+ .align 4
+ nop
+ nop
+ nop
+
+ cfi_startproc
+ cfi_return_column (64)
+ SIGCONTEXT_REGS -648
+ cfi_def_cfa_offset (648)
+ nop
sigreturn:
- .prologue 0
- mov sp,a0
- ldi v0,__NR_sigreturn
+ mov sp, a0
+ ldi v0, __NR_sigreturn
callsys
- .end sigreturn
+ cfi_endproc
+ .size sigreturn, .-sigreturn
+ .type sigreturn, @function
- .align 4
- .ent rt_sigreturn
+ cfi_startproc
+ cfi_return_column (64)
+ SIGCONTEXT_REGS -648
+ cfi_def_cfa_offset (176 + 648)
+ nop
rt_sigreturn:
- .prologue 0
mov sp,a0
ldi v0,__NR_rt_sigreturn
callsys
- .end rt_sigreturn
+ cfi_endproc
+ .size rt_sigreturn, .-rt_sigreturn
+ .type rt_sigreturn, @function
+
#else
ENTRY(__syscall_rt_sigaction)
ldgp $29,0($27)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a382880a4c32975fd1d4e76ae3f647f76484fff9
commit a382880a4c32975fd1d4e76ae3f647f76484fff9
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jun 6 05:52:52 2003 +0000
* sysdeps/unix/sysv/linux/alpha/syscalls.list (semtimedop): New.
Annotate some parameters.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_semtimedop): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 96bc8a5..62522e7 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -1,30 +1,32 @@
# File name Caller Syscall name # args Strong name Weak names
-oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0
-msgget - msgget 2 __msgget msgget
-msgrcv - msgrcv C:5 __msgrcv msgrcv
-msgsnd - msgsnd C:4 __msgsnd msgsnd
-shmat - osf_shmat 3 __shmat shmat
-oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0
-shmdt - shmdt 1 __shmdt shmdt
-shmget - shmget 3 __shmget shmget
-semop - semop 3 __semop semop
-semget - semget 3 __semget semget
-oldsemctl EXTRA semctl 4 __old_semctl semctl@GLIBC_2.0
+oldmsgctl EXTRA msgctl i:iip __old_msgctl msgctl@GLIBC_2.0
+msgget - msgget i:ii __msgget msgget
+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
+shmat - osf_shmat i:ipi __shmat shmat
+oldshmctl EXTRA shmctl i:iip __old_shmctl shmctl@GLIBC_2.0
+shmdt - shmdt i:s __shmdt shmdt
+shmget - shmget i:iii __shmget shmget
+semop - semop i:ipi __semop semop
+semtimedop - semtimedop i:ipip semtimedop
+semget - semget i:iii __semget semget
+oldsemctl EXTRA semctl i:iiii __old_semctl semctl@GLIBC_2.0
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
sigstack - sigstack 2 sigstack
vfork - vfork 0 __vfork vfork
-getpeername - getpeername 3 __getpeername getpeername
-getpriority - getpriority 2 __getpriority getpriority
-mmap - mmap 6 __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64
+getpeername - getpeername i:ipp __getpeername getpeername
+getpriority - getpriority i:ii __getpriority getpriority
+mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
+llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
+lseek llseek -
posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs 2 __statfs statfs statfs64
+fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
+statfs - statfs i:sp __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
@@ -33,28 +35,29 @@ readahead - readahead 3 __readahead readahead
sendfile - sendfile i:iipi sendfile sendfile64
# these are actually common with the x86:
-sys_ustat ustat ustat 2 __syscall_ustat
-sys_mknod xmknod mknod 3 __syscall_mknod
+sys_ustat ustat ustat i:ip __syscall_ustat
+sys_mknod xmknod mknod i:sii __syscall_mknod
# proper socket implementations:
-accept - accept C:3 __libc_accept __accept accept
-bind - bind 3 __bind bind
-connect - connect C:3 __libc_connect __connect_internal __connect connect
-getpeername - getpeername 3 __getpeername getpeername
-getsockname - getsockname 3 __getsockname getsockname
-getsockopt - getsockopt 5 __getsockopt getsockopt
-listen - listen 2 __listen listen
-recv - recv C:4 __libc_recv __recv recv
-recvfrom - recvfrom C:6 __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg C:3 __libc_recvmsg __recvmsg recvmsg
+accept - accept Ci:iBN __libc_accept __accept accept
+bind - bind i:ipi __bind bind
+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
+getpeername - getpeername i:ipp __getpeername getpeername
+getsockname - getsockname i:ipp __getsockname getsockname
+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
+listen - listen i:ii __listen listen
+recv - recv Ci:ibni __libc_recv __recv recv
+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
+send - send Ci:ibni __libc_send __send send
+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
+shutdown - shutdown i:ii __shutdown shutdown
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiif __socketpair socketpair
+
ptrace - ptrace 4 __ptrace ptrace
-send - send C:4 __libc_send __send send
-sendmsg - sendmsg C:3 __libc_sendmsg __sendmsg sendmsg
-sendto - sendto C:6 __libc_sendto __sendto sendto
-setsockopt - setsockopt 5 __setsockopt setsockopt
-shutdown - shutdown 2 __shutdown shutdown
-socket - socket 3 __socket socket
-socketpair - socketpair 4 __socketpair socketpair
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 62e308b..272dceb 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -60,6 +60,11 @@
#define __NR_osf_getsysinfo 256
#define __NR_osf_setsysinfo 257
+/* Help old kernel headers where particular syscalls are not available. */
+#ifndef __NR_semtimedop
+# define __NR_semtimedop 423
+#endif
+
/*
* In order to get the hidden arguments for rt_sigaction set up
* properly, we need to call the assembly version. Detect this in the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44774a1c27e041105474cb7820ecea2a709e06b2
commit 44774a1c27e041105474cb7820ecea2a709e06b2
Author: Richard Henderson <rth@redhat.com>
Date: Fri Jun 6 05:51:53 2003 +0000
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Fix typo in conversion.
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 71b8c13..221a113 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -86,7 +86,7 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday)
ldl t0, 0(a0)
ldl t1, 4(a0)
stq t0, 0(a0)
- stq t1, 0(a0)
+ stq t1, 8(a0)
2: addq sp, 16, sp
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=784c002b10b4a2f79484af2d6cd1e62271de9872
commit 784c002b10b4a2f79484af2d6cd1e62271de9872
Author: Andreas Jaeger <aj@suse.de>
Date: Fri May 30 17:41:46 2003 +0000
2003-05-30 Guido Guenther <agx@sigxcpu.org>
* sysdeps/mips/mips64/bsd-_setjmp.S: Include <sys/asm.h> for
SETUP_GP64 and friends.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Fix register
names in internal_syscall{6,7}.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c [_MIPS_SIM == _ABI64]: Fix
number of syscall arguments.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index 9d79ab0..73f5cc2 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -22,6 +22,7 @@
in setjmp doesn't clobber the state restored by longjmp. */
#include <sysdep.h>
+#include <sys/asm.h>
#ifdef __PIC__
.option pic2
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index 55a405c..7109971 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -220,7 +220,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a5), "r" (__a6) \
+ "r" (__a4), "r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -248,7 +248,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a5), "r" (__a6), "r" (__a7) \
+ "r" (__a4), "r" (__a5), "r" (__a6) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 401470b..4341c18 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -220,7 +220,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a5), "r" (__a6) \
+ "r" (__a4), "r" (__a5) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
@@ -248,7 +248,7 @@
".set\treorder" \
: "=r" (__v0), "+r" (__a3) \
: "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
- "r" (__a5), "r" (__a6), "r" (__a7) \
+ "r" (__a4), "r" (__a5), "r" (__a6) \
: __SYSCALL_CLOBBERS); \
err = __a3; \
_sys_result = __v0; \
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index dc278d4..28fdca6 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -66,7 +66,7 @@ __libc_pread (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
@@ -85,7 +85,7 @@ __libc_pread (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 12c9cc0..7dcd008 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -66,7 +66,7 @@ __libc_pread64 (fd, buf, count, offset)
{
/* First try the syscall. */
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
@@ -85,7 +85,7 @@ __libc_pread64 (fd, buf, count, offset)
/* First try the syscall. */
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 1778d07..fa3de15 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -65,7 +65,7 @@ __libc_pwrite (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
@@ -85,7 +85,7 @@ __libc_pwrite (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index e43a378..5b481b2 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -63,7 +63,7 @@ __libc_pwrite64 (fd, buf, count, offset)
{
/* First try the syscall. */
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
@@ -83,7 +83,7 @@ __libc_pwrite64 (fd, buf, count, offset)
/* First try the syscall. */
#if defined _ABI64 && _MIPS_SIM == _ABI64
- result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, 0,
offset);
#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=489797ebf08753149bc631b13ea61cb6714f5545
commit 489797ebf08753149bc631b13ea61cb6714f5545
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 28 21:05:12 2003 +0000
2003-05-11 Andreas Schwab <schwab@suse.de>
* Makerules: Always use -MP together with -MD.
(sed-remove-dotot): Substitute $(..) also at start of line.
($(stdio_lim:h=st)): Use -MD instead of SUNPRO_DEPENDENCIES.
Generated defines with a single compiler call.
Use $(sed-remove-dotdot).
* mach/Makefile ($(objpfx)mach-syscalls.mk): Use -MD instead
of DEPENDENCIES_OUTPUT, and use $(sed-remove-objpfx).
* sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h):
Use -MD instead of SUNPRO_DEPENDENCIES, and use $(sed-remove-objpfx).
* sysdeps/unix/sysv/linux/mips/Makefile
($(objpfx)syscall-%.h): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 799f5ae..424fb5e 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -15,7 +15,6 @@ no_syscall_list_h = 1
# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
- rm -f $(@:.h=.d)-t
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
echo ''; \
@@ -24,9 +23,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
echo '#endif'; \
echo ''; \
rm -f $(@:.d=.h).newt; \
- SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
- $(CC) -E -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
- sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' > $(@:.d=.h).newt; \
+ $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
+ -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
+ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
+ > $(@:.d=.h).newt; \
if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \
sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \
@@ -42,9 +42,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
rm $(@:.d=.h).newt; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
- sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \
- -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\
- $(@:.d=.h) $(@:.h=.d)),'
+ifneq (,$(objpfx))
+ sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
rm -f $(@:.h=.d)-t
mv -f $(@:.h=.d)-t2 $(@:.h=.d)
+else
+ mv -f $(@:.h=.d)-t $(@:.h=.d)
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a99b4fcf5a070673791a52d81f97e50d971563b7
commit a99b4fcf5a070673791a52d81f97e50d971563b7
Author: Andreas Jaeger <aj@suse.de>
Date: Thu May 22 02:26:29 2003 +0000
2003-05-20 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Change SI_ASYNCNL
to -60 and define SI_TKILL.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 7d5cfa9..629a055 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/MIPS version.
- Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -119,8 +119,10 @@ typedef struct siginfo
signals. */
enum
{
- SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */
+ SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
# define SI_ASYNCNL SI_ASYNCNL
+ SI_TKILL = -6, /* Sent by tkill. */
+# define SI_TKILL SI_TKILL
SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_MESGQ, /* Sent by real time mesq state change. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25e5f254ab61f9fbf224f0d6ebfdcf30f37dd0eb
commit 25e5f254ab61f9fbf224f0d6ebfdcf30f37dd0eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 10 05:29:30 2003 +0000
(atomic_exchange_acq): Renamed from atomic_exchange.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
index 6978b27..bbffc52 100644
--- a/sysdeps/m68k/m68020/bits/atomic.h
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -76,7 +76,7 @@ typedef uintmax_t uatomic_max_t;
: "memory"); \
__ret; })
-#define atomic_exchange(mem, newvalue) \
+#define atomic_exchange_acq(mem, newvalue) \
({ __typeof (*(mem)) __result = *(mem); \
if (sizeof (*(mem)) == 1) \
__asm __volatile ("1: cas%.b %0,%2,%1;" \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9219434c89bef71058c9b2078b1fe1b774b9c826
commit 9219434c89bef71058c9b2078b1fe1b774b9c826
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 2 23:24:56 2003 +0000
(IPCOP_semtimedop): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
index b754a1f..f0b47d2 100644
--- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
+++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +44,7 @@ __END_DECLS
#define IPCOP_semop 1
#define IPCOP_semget 2
#define IPCOP_semctl 3
+#define IPCOP_semtimedop 4
#define IPCOP_msgsnd 11
#define IPCOP_msgrcv 12
#define IPCOP_msgget 13
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fefdd2a630c837d992639abe3f75dd0496090bbb
commit fefdd2a630c837d992639abe3f75dd0496090bbb
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Wed Apr 30 23:22:09 2003 +0000
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h (ucontext): Make
uc_flags long for all ABIs.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index 66c729a..b097bf2 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -99,11 +99,7 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
- __extension__ unsigned long long int uc_flags;
-#else
unsigned long int uc_flags;
-#endif
struct ucontext *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79b7c8634d6b14f8143089c88fa5704ca890b8d3
commit 79b7c8634d6b14f8143089c88fa5704ca890b8d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 29 22:47:20 2003 +0000
Add libc_hidden_builtin_def.
diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S
index 05e00dd..88e91fa 100644
--- a/sysdeps/alpha/alphaev6/memchr.S
+++ b/sysdeps/alpha/alphaev6/memchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
@@ -190,3 +190,4 @@ weak_alias (__memchr, memchr)
#if !__BOUNDED_POINTERS__
weak_alias (__memchr, __ubp_memchr)
#endif
+libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S
index 5e59a04..d16bc03 100644
--- a/sysdeps/alpha/alphaev6/memcpy.S
+++ b/sysdeps/alpha/alphaev6/memcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
@@ -252,3 +252,4 @@ $nomoredata:
nop # E :
END(memcpy)
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S
index e700d3d..3b3c4ba 100644
--- a/sysdeps/alpha/alphaev6/memset.S
+++ b/sysdeps/alpha/alphaev6/memset.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -221,3 +221,4 @@ $end:
ret $31,($26),1 # L0 :
END(memset)
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S
index 3bd4789..ae7c488 100644
--- a/sysdeps/alpha/alphaev67/strcat.S
+++ b/sysdeps/alpha/alphaev67/strcat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -59,3 +59,4 @@ $found: cttz $2, $3 # U0 :
jmp $31, __stxcpy # L0 :
END(strcat)
+libc_hidden_builtin_def (strcat)
diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S
index 9c1e88b..101c7d4 100644
--- a/sysdeps/alpha/alphaev67/strchr.S
+++ b/sysdeps/alpha/alphaev67/strchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -98,3 +98,4 @@ $found:
END(strchr)
weak_alias (strchr, index)
+libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S
index bbe7cfc..b83eacc 100644
--- a/sysdeps/alpha/alphaev67/strlen.S
+++ b/sysdeps/alpha/alphaev67/strlen.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -58,3 +58,4 @@ $found:
ret $31, ($26) # L0 :
END(strlen)
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S
index cb51d21..c46a3df 100644
--- a/sysdeps/alpha/alphaev67/strrchr.S
+++ b/sysdeps/alpha/alphaev67/strrchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -114,3 +114,4 @@ $eos:
END(strrchr)
weak_alias (strrchr, rindex)
+libc_hidden_builtin_def (strrchr)
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index b50b69a..5d713d5 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
@@ -173,3 +173,4 @@ weak_alias (__memchr, memchr)
#if !__BOUNDED_POINTERS__
weak_alias (__memchr, __ubp_memchr)
#endif
+libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S
index d621aee..e34af2b 100644
--- a/sysdeps/alpha/memset.S
+++ b/sysdeps/alpha/memset.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -134,3 +134,4 @@ $oneq:
$done: ret
END(memset)
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
index d385c83..d8ef8f1 100644
--- a/sysdeps/alpha/strcat.S
+++ b/sysdeps/alpha/strcat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -69,3 +69,4 @@ $found: negq t1, t2 # clear all but least set bit
jmp $31, __stxcpy
END(strcat)
+libc_hidden_builtin_def (strcat)
diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S
index 5643df4..e0b1741 100644
--- a/sysdeps/alpha/strchr.S
+++ b/sysdeps/alpha/strchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
@@ -92,3 +92,4 @@ $retnull:
END(strchr)
weak_alias (strchr, index)
+libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S
index ee87b4f..9196be2 100644
--- a/sysdeps/alpha/strcmp.S
+++ b/sysdeps/alpha/strcmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -192,3 +192,4 @@ $done:
ret # e1 :
END(strcmp)
+libc_hidden_builtin_def (strcmp)
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
index 11dc8e1..02bfe52 100644
--- a/sysdeps/alpha/strcpy.S
+++ b/sysdeps/alpha/strcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -39,3 +39,4 @@ ENTRY(strcpy)
jmp $31, __stxcpy # do the copy
END(strcpy)
+libc_hidden_builtin_def (strcpy)
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 66b1731..2560b97 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -74,3 +74,4 @@ $found: negq t1, t2 # clear all but least set bit
ret
END(strlen)
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
index f0dcfb9..e2b4ebf 100644
--- a/sysdeps/alpha/strncmp.S
+++ b/sysdeps/alpha/strncmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -221,3 +221,4 @@ $zerolength:
ret
END(strncmp)
+libc_hidden_builtin_def (strncmp)
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
index 575c907..5d3e72e 100644
--- a/sysdeps/alpha/strncpy.S
+++ b/sysdeps/alpha/strncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -85,3 +85,4 @@ $zerocount:
ret # .. e1 :
END(strncpy)
+libc_hidden_builtin_def (strncpy)
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index e5e847f..248181f 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -108,3 +108,4 @@ $retnull:
END(strrchr)
weak_alias (strrchr, rindex)
+libc_hidden_builtin_def (strrchr)
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index 6ba8486..0b62413 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>
@@ -65,3 +65,4 @@ ENTRY(memset)
strb a2, [a4], $1
RETINSTR(mov,pc,lr)
END(memset)
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
index 7ebfe63..f29528a 100644
--- a/sysdeps/arm/strlen.S
+++ b/sysdeps/arm/strlen.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Code contributed by Matthew Wilcox <willy@odie.barnet.ac.uk>
@@ -61,3 +61,4 @@ Llastword: @ drop through to here once we find a
addne r0, r0, $1 @ must be zero)
RETINSTR(mov,pc,lr)
END(strlen)
+libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
index bd4da6a..fab65a9 100644
--- a/sysdeps/m68k/memchr.S
+++ b/sysdeps/m68k/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the
first N bytes of STR.
For Motorola 68000.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -229,3 +229,4 @@ weak_alias (__memchr, memchr)
#if !__BOUNDED_POINTERS__
weak_alias (__memchr, __ubp_memchr)
#endif
+libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S
index af91dc7..04626ff 100644
--- a/sysdeps/m68k/strchr.S
+++ b/sysdeps/m68k/strchr.S
@@ -1,6 +1,6 @@
/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For Motorola 68000.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -255,3 +255,4 @@ L(L9:)
END(strchr)
weak_alias (strchr, index)
+libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 05d2097..2049d05 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -133,3 +133,4 @@ L(shfth):
.set reorder
END (memcpy)
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index f120123..694ee8f 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -83,3 +83,4 @@ L(exit):
.set reorder
END (memset)
+libc_hidden_builtin_def (memset)
diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S
index e9fc2b7..eab9463 100644
--- a/sysdeps/mips/mips64/memcpy.S
+++ b/sysdeps/mips/mips64/memcpy.S
@@ -137,3 +137,4 @@ L(shfth):
.set reorder
END (memcpy)
+libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S
index 784fa5d..b50aaba 100644
--- a/sysdeps/mips/mips64/memset.S
+++ b/sysdeps/mips/mips64/memset.S
@@ -89,3 +89,4 @@ L(exit):
.set reorder
END (memset)
+libc_hidden_builtin_def (memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d90f5e569f14b2aeaaf480f771b4652d7d9ad5b
commit 9d90f5e569f14b2aeaaf480f771b4652d7d9ad5b
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Apr 27 17:08:00 2003 +0000
semtimedop implementation for Linux/m68k.
diff --git a/sysdeps/unix/sysv/linux/m68k/semtimedop.S b/sysdeps/unix/sysv/linux/m68k/semtimedop.S
new file mode 100644
index 0000000..2775c12
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/semtimedop.S
@@ -0,0 +1,60 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#define SYSOP_semtimedop 4
+
+#define SVRSP 8 /* saved register space */
+#define PARMS 4+SVRSP /* space for 3 saved regs */
+#define SEMID PARMS
+#define SOPS SEMID+4
+#define NSOPS SOPS+4
+#define TIMEOUT NSOPS+4
+
+ .text
+ENTRY (semtimedop)
+
+ /* Save registers. */
+ move.l %d2, %a1
+ move.l %d3, -(%sp)
+ move.l %d5, -(%sp)
+
+ move.l #SYSOP_semtimedop, %d1
+ move.l SEMID(%sp), %d2
+ move.l NSOPS(%sp), %d3
+ move.l SOPS(%sp), %d5
+ move.l TIMEOUT(%sp), %a0
+ move.l #SYS_ify (ipc), %d0
+
+ trap #0
+
+ /* Restore registers. */
+ move.l (%sp)+, %d5
+ move.l (%sp)+, %d3
+ move.l %a1, %d2
+
+ /* Check for error. */
+ tst.l %d0
+ jmi SYSCALL_ERROR_LABEL
+
+ /* Successful; return the syscall's value. */
+ ret
+
+PSEUDO_END (semtimedop)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3e16ef8edc224314488465a1f548d8ff69c6c53
commit c3e16ef8edc224314488465a1f548d8ff69c6c53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 07:27:10 2003 +0000
Define SI_TKILL.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 446394f..a2aacc0 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -122,8 +122,10 @@ typedef struct siginfo
signals. */
enum
{
- SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */
+ SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
# define SI_ASYNCNL SI_ASYNCNL
+ SI_TKILL = -6, /* Sent by tkill. */
+# define SI_TKILL SI_TKILL
SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_ASYNCIO, /* Sent by AIO completion. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a05f4cc0892c56b00b4aa1bfa11a5a2e9962121
commit 4a05f4cc0892c56b00b4aa1bfa11a5a2e9962121
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 19 18:31:57 2003 +0000
Sync with Linux 2.5.67.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 8aee77f..a84d335 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -168,6 +168,6 @@ struct flock64
# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d25102aa735f78a5cd9b0920db66ab12c703891a
commit d25102aa735f78a5cd9b0920db66ab12c703891a
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sun Apr 13 11:36:32 2003 +0000
* sysdeps/unix/sysv/linux/mips/profil-counter: New.
* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Port to n32/n64.
* sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: New.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Port to n32/n64.
(mcontext_t): Make it match the 32-bit mips kernel in o32.
* sysdeps/unix/sysv/linux/mips/sys/user.h: Bring in constants from
the mips and mips64 headers.
(struct user): Port to n32/n64.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
new file mode 100644
index 0000000..888c05f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
@@ -0,0 +1,103 @@
+/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#ifndef sigcontext_struct
+/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
+ we need sigcontext. */
+# define sigcontext_struct sigcontext
+
+/* # include <asm/sigcontext.h> */
+/* Instead of including the kernel header, that will vary depending on
+ whether the 32- or the 64-bit kernel is installed, we paste the
+ contents here. In case you're wondering about the different
+ licenses, the fact that the file is pasted, instead of included,
+ doesn't really make any difference for the program that includes
+ this header. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
+ */
+#ifndef _ASM_SIGCONTEXT_H
+#define _ASM_SIGCONTEXT_H
+
+/*
+ * Keep this struct definition in sync with the sigcontext fragment
+ * in arch/mips/tools/offset.c
+ */
+struct sigcontext {
+ unsigned int sc_regmask; /* Unused */
+ unsigned int sc_status;
+ unsigned long long sc_pc;
+ unsigned long long sc_regs[32];
+ unsigned long long sc_fpregs[32];
+ unsigned int sc_ownedfp; /* Unused */
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir; /* Unused */
+ unsigned int sc_used_math;
+ unsigned int sc_ssflags; /* Unused */
+ unsigned long long sc_mdhi;
+ unsigned long long sc_mdlo;
+
+ unsigned int sc_cause; /* Unused */
+ unsigned int sc_badvaddr; /* Unused */
+
+ unsigned long sc_sigset[4]; /* kernel's sigset_t */
+};
+
+#endif /* _ASM_SIGCONTEXT_H */
+#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#ifndef _ASM_SIGCONTEXT_H
+#define _ASM_SIGCONTEXT_H
+
+/*
+ * Keep this struct definition in sync with the sigcontext fragment
+ * in arch/mips/tools/offset.c
+ */
+struct sigcontext {
+ unsigned long long sc_regs[32];
+ unsigned long long sc_fpregs[32];
+ unsigned long long sc_mdhi;
+ unsigned long long sc_mdlo;
+ unsigned long long sc_pc;
+ unsigned int sc_status;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir;
+ unsigned int sc_used_math;
+ unsigned int sc_cause;
+ unsigned int sc_badvaddr;
+};
+
+#endif /* _ASM_SIGCONTEXT_H */
+#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/profil-counter.h b/sysdeps/unix/sysv/linux/mips/profil-counter.h
new file mode 100644
index 0000000..8a6a0bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/profil-counter.h
@@ -0,0 +1,2 @@
+/* We can use the ix86 version. */
+#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index a51c6f0..3ab6d99 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -18,6 +18,8 @@
02111-1307 USA. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+
#define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
#define GET_PC(ctx) ((void *) ctx->sc_pc)
@@ -25,3 +27,15 @@
#define GET_STACK(ctx) ((void *) ctx->sc_regs[29])
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+#else
+
+#define SIGCONTEXT unsigned long _code, ucontext_t *
+#define SIGCONTEXT_EXTRA_ARGS _code,
+#define GET_PC(ctx) ((void *) ctx->uc_mcontext.pc)
+#define GET_FRAME(ctx) ((void *) ctx->uc_mcontext.gregs[30])
+#define GET_STACK(ctx) ((void *) ctx->uc_mcontext.gregs[29])
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index 9d80b40..66c729a 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -29,47 +29,72 @@
#include <bits/sigcontext.h>
-/* Type for general register. */
-#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+/* Type for general register. Even in o32 we assume 64-bit registers,
+ like the kernel. */
__extension__ typedef unsigned long long int greg_t;
-#else
-typedef unsigned long int greg_t;
-#endif
/* Number of general registers. */
-#define NGREG 37
-#define NFPREG 33
+#define NGREG 32
+#define NFPREG 32
/* Container for all general registers. */
-/* gregset_t must be an array. The below declared array corresponds to:
-typedef struct gregset {
- greg_t g_regs[32];
- greg_t g_hi;
- greg_t g_lo;
- greg_t g_pad[3];
-} gregset_t; */
typedef greg_t gregset_t[NGREG];
/* Container for all FPU registers. */
typedef struct fpregset {
union {
- double fp_dregs[32];
+ double fp_dregs[NFPREG];
struct {
float _fp_fregs;
unsigned int _fp_pad;
- } fp_fregs[32];
+ } fp_fregs[NFPREG];
} fp_r;
- unsigned int fp_csr;
- unsigned int fp_pad;
} fpregset_t;
/* Context to describe whole processor state. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+/* Earlier versions of glibc for mips had an entirely different
+ definition of mcontext_t, that didn't even resemble the
+ corresponding kernel data structure. Since all legitimate uses of
+ ucontext_t in glibc mustn't have accessed anything beyond
+ uc_mcontext and, even then, taking a pointer to it, casting it to
+ sigcontext_t, and accessing it as such, which is what it has always
+ been, this can still be rectified. Fortunately, makecontext,
+ [gs]etcontext et all have never been implemented. */
+typedef struct
+ {
+ unsigned int regmask;
+ unsigned int status;
+ greg_t pc;
+ gregset_t gregs;
+ fpregset_t fpregs;
+ unsigned int fp_owned;
+ unsigned int fpc_csr;
+ unsigned int fpc_eir;
+ unsigned int used_math;
+ unsigned int ssflags;
+ greg_t mdhi;
+ greg_t mdlo;
+ unsigned int cause;
+ unsigned int badvaddr;
+ } mcontext_t;
+#else
typedef struct
{
gregset_t gregs;
fpregset_t fpregs;
+ greg_t mdhi;
+ greg_t mdlo;
+ greg_t pc;
+ unsigned int status;
+ unsigned int fpc_csr;
+ unsigned int fpc_eir;
+ unsigned int used_math;
+ unsigned int cause;
+ unsigned int badvaddr;
} mcontext_t;
+#endif
/* Userlevel context. */
typedef struct ucontext
diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h
index 21f7b28..8b21ff2 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/user.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,154 @@
too much into it. Don't use it for anything other than GDB unless
you know what you are doing. */
-#include <asm/reg.h>
+/* #include <asm/reg.h> */
+/* Instead of including the kernel header, that will vary depending on
+ whether the 32- or the 64-bit kernel is installed, we paste its
+ contents here. Note that the fact that the file is inline here,
+ instead of included separately, doesn't change in any way the
+ licensing status of a program that includes user.h. Since this is
+ for gdb alone, and gdb is GPLed, no surprises here. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+/*
+ * Various register offset definitions for debuggers, core file
+ * examiners and whatnot.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 1999 by Ralf Baechle
+ */
+#ifndef __ASM_MIPS_REG_H
+#define __ASM_MIPS_REG_H
+
+/*
+ * This defines/structures correspond to the register layout on stack -
+ * if the order here is changed, it needs to be updated in
+ * include/asm-mips/stackframe.h
+ */
+#define EF_REG0 6
+#define EF_REG1 7
+#define EF_REG2 8
+#define EF_REG3 9
+#define EF_REG4 10
+#define EF_REG5 11
+#define EF_REG6 12
+#define EF_REG7 13
+#define EF_REG8 14
+#define EF_REG9 15
+#define EF_REG10 16
+#define EF_REG11 17
+#define EF_REG12 18
+#define EF_REG13 19
+#define EF_REG14 20
+#define EF_REG15 21
+#define EF_REG16 22
+#define EF_REG17 23
+#define EF_REG18 24
+#define EF_REG19 25
+#define EF_REG20 26
+#define EF_REG21 27
+#define EF_REG22 28
+#define EF_REG23 29
+#define EF_REG24 30
+#define EF_REG25 31
+/*
+ * k0/k1 unsaved
+ */
+#define EF_REG28 34
+#define EF_REG29 35
+#define EF_REG30 36
+#define EF_REG31 37
+
+/*
+ * Saved special registers
+ */
+#define EF_LO 38
+#define EF_HI 39
+
+#define EF_CP0_EPC 40
+#define EF_CP0_BADVADDR 41
+#define EF_CP0_STATUS 42
+#define EF_CP0_CAUSE 43
+
+#define EF_SIZE 180 /* size in bytes */
+
+#endif /* __ASM_MIPS_REG_H */
+
+#else /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+
+/*
+ * Various register offset definitions for debuggers, core file
+ * examiners and whatnot.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 1999 Ralf Baechle
+ * Copyright (C) 1995, 1999 Silicon Graphics
+ */
+#ifndef _ASM_REG_H
+#define _ASM_REG_H
+
+/*
+ * This defines/structures correspond to the register layout on stack -
+ * if the order here is changed, it needs to be updated in
+ * include/asm-mips/stackframe.h
+ */
+#define EF_REG0 0
+#define EF_REG1 1
+#define EF_REG2 2
+#define EF_REG3 3
+#define EF_REG4 4
+#define EF_REG5 5
+#define EF_REG6 6
+#define EF_REG7 7
+#define EF_REG8 8
+#define EF_REG9 9
+#define EF_REG10 10
+#define EF_REG11 11
+#define EF_REG12 12
+#define EF_REG13 13
+#define EF_REG14 14
+#define EF_REG15 15
+#define EF_REG16 16
+#define EF_REG17 17
+#define EF_REG18 18
+#define EF_REG19 19
+#define EF_REG20 20
+#define EF_REG21 21
+#define EF_REG22 22
+#define EF_REG23 23
+#define EF_REG24 24
+#define EF_REG25 25
+/*
+ * k0/k1 unsaved
+ */
+#define EF_REG28 28
+#define EF_REG29 29
+#define EF_REG30 30
+#define EF_REG31 31
+
+/*
+ * Saved special registers
+ */
+#define EF_LO 32
+#define EF_HI 33
+
+#define EF_CP0_EPC 34
+#define EF_CP0_BADVADDR 35
+#define EF_CP0_STATUS 36
+#define EF_CP0_CAUSE 37
+
+#define EF_SIZE 304 /* size in bytes */
+
+#endif /* _ASM_REG_H */
+
+#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+
+#if _MIPS_SIM == _MIPS_SIM_ABI32
struct user
{
@@ -40,6 +187,24 @@ struct user
char u_comm[32]; /* user command name */
};
+#else
+
+struct user {
+ __extension__ unsigned long regs[EF_SIZE/8+64]; /* integer and fp regs */
+ __extension__ unsigned long u_tsize; /* text size (pages) */
+ __extension__ unsigned long u_dsize; /* data size (pages) */
+ __extension__ unsigned long u_ssize; /* stack size (pages) */
+ __extension__ unsigned long long start_code; /* text starting address */
+ __extension__ unsigned long long start_data; /* data starting address */
+ __extension__ unsigned long long start_stack; /* stack starting address */
+ __extension__ long long signal; /* signal causing core dump */
+ __extension__ unsigned long long u_ar0; /* help gdb find registers */
+ __extension__ unsigned long long magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+};
+
+#endif
+
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4caa0b1c3e1c26113d29c2bdaef7791109dc6670
commit 4caa0b1c3e1c26113d29c2bdaef7791109dc6670
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 12 00:51:50 2003 +0000
Allow file to be included multiple times.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index fcd57d6..c603a35 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -80,3 +83,5 @@ typedef long int __jmp_buf[17];
#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
#endif
+
+#endif /* bits/setjmp.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be3abeade22e92bb360cf1f3bf505c60da80d0e4
commit be3abeade22e92bb360cf1f3bf505c60da80d0e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 9 07:39:17 2003 +0000
Remove FLT_EVAL_METHOD definition.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 5e962c8..515b93a 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,6 @@
typedef float float_t;
typedef double double_t;
-/* Signal that types stay as they were declared. */
-# define FLT_EVAL_METHOD 0
-
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
@@ -45,9 +42,6 @@ typedef double double_t;
typedef double float_t;
typedef double double_t;
-/* Signal that both types are `double'. */
-# define FLT_EVAL_METHOD 1
-
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96c095cf0db4e0960a6fcb58bc5f786fdf78e028
commit 96c095cf0db4e0960a6fcb58bc5f786fdf78e028
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Wed Apr 9 02:51:04 2003 +0000
* sysdeps/mips/sys/regdef.h (t4,t5,t6,t7): Renamed to t0..t3 on
NewABI.
(ta0, ta1, ta2, ta3): Defined to t4..t7 on o32, and a4..a7 on
NewABI.
* sysdeps/mips/mips64/memcpy.S: Adjust register naming
conventions.
* sysdeps/mips/mips64/memset.S: Likewise.
* sysdeps/unix/mips/sysdep.S (__syscall_error) [_LIBC_REENTRANT]:
Use t0 instead of t4 as temporary.
diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S
index c4ba7a8..e9fc2b7 100644
--- a/sysdeps/mips/mips64/memcpy.S
+++ b/sysdeps/mips/mips64/memcpy.S
@@ -42,71 +42,71 @@
ENTRY (memcpy)
.set noreorder
- slti a4, a2, 16 # Less than 16?
- bne a4, zero, L(last16)
+ slti t0, a2, 16 # Less than 16?
+ bne t0, zero, L(last16)
move v0, a0 # Setup exit value before too late
- xor a4, a1, a0 # Find a0/a1 displacement
- andi a4, 0x7
- bne a4, zero, L(shift) # Go handle the unaligned case
- PTR_SUBU a5, zero, a1
- andi a5, 0x7 # a0/a1 are aligned, but are we
- beq a5, zero, L(chk8w) # starting in the middle of a word?
- PTR_SUBU a2, a5
- LDHI a4, 0(a1) # Yes we are... take care of that
- PTR_ADDU a1, a5
- SDHI a4, 0(a0)
- PTR_ADDU a0, a5
+ xor t0, a1, a0 # Find a0/a1 displacement
+ andi t0, 0x7
+ bne t0, zero, L(shift) # Go handle the unaligned case
+ PTR_SUBU t1, zero, a1
+ andi t1, 0x7 # a0/a1 are aligned, but are we
+ beq t1, zero, L(chk8w) # starting in the middle of a word?
+ PTR_SUBU a2, t1
+ LDHI t0, 0(a1) # Yes we are... take care of that
+ PTR_ADDU a1, t1
+ SDHI t0, 0(a0)
+ PTR_ADDU a0, t1
L(chk8w):
- andi a4, a2, 0x3f # 64 or more bytes left?
- beq a4, a2, L(chk1w)
- PTR_SUBU a3, a2, a4 # Yes
+ andi t0, a2, 0x3f # 64 or more bytes left?
+ beq t0, a2, L(chk1w)
+ PTR_SUBU a3, a2, t0 # Yes
PTR_ADDU a3, a1 # a3 = end address of loop
- move a2, a4 # a2 = what will be left after loop
+ move a2, t0 # a2 = what will be left after loop
L(lop8w):
- ld a4, 0(a1) # Loop taking 8 words at a time
- ld a5, 8(a1)
- ld a6, 16(a1)
- ld a7, 24(a1)
- ld t4, 32(a1)
- ld t5, 40(a1)
- ld t6, 48(a1)
- ld t7, 56(a1)
+ ld t0, 0(a1) # Loop taking 8 words at a time
+ ld t1, 8(a1)
+ ld t2, 16(a1)
+ ld t3, 24(a1)
+ ld ta0, 32(a1)
+ ld ta1, 40(a1)
+ ld ta2, 48(a1)
+ ld ta3, 56(a1)
PTR_ADDIU a0, 64
PTR_ADDIU a1, 64
- sd a4, -64(a0)
- sd a5, -56(a0)
- sd a6, -48(a0)
- sd a7, -40(a0)
- sd t4, -32(a0)
- sd t5, -24(a0)
- sd t6, -16(a0)
+ sd t0, -64(a0)
+ sd t1, -56(a0)
+ sd t2, -48(a0)
+ sd t3, -40(a0)
+ sd ta0, -32(a0)
+ sd ta1, -24(a0)
+ sd ta2, -16(a0)
bne a1, a3, L(lop8w)
- sd t7, -8(a0)
+ sd ta3, -8(a0)
L(chk1w):
- andi a4, a2, 0x7 # 8 or more bytes left?
- beq a4, a2, L(last16)
- PTR_SUBU a3, a2, a4 # Yes, handle them one dword at a time
+ andi t0, a2, 0x7 # 8 or more bytes left?
+ beq t0, a2, L(last16)
+ PTR_SUBU a3, a2, t0 # Yes, handle them one dword at a time
PTR_ADDU a3, a1 # a3 again end address
- move a2, a4
+ move a2, t0
L(lop1w):
- ld a4, 0(a1)
+ ld t0, 0(a1)
PTR_ADDIU a0, 8
PTR_ADDIU a1, 8
bne a1, a3, L(lop1w)
- sd a4, -8(a0)
+ sd t0, -8(a0)
L(last16):
blez a2, L(lst16e) # Handle last 16 bytes, one at a time
PTR_ADDU a3, a2, a1
L(lst16l):
- lb a4, 0(a1)
+ lb t0, 0(a1)
PTR_ADDIU a0, 1
PTR_ADDIU a1, 1
bne a1, a3, L(lst16l)
- sb a4, -1(a0)
+ sb t0, -1(a0)
L(lst16e):
jr ra # Bye, bye
nop
@@ -116,24 +116,24 @@ L(shift):
andi a3, 0x7 # (unoptimized case...)
beq a3, zero, L(shft1)
PTR_SUBU a2, a3 # a2 = bytes left
- LDHI a4, 0(a1) # Take care of first odd part
- LDLO a4, 7(a1)
+ LDHI t0, 0(a1) # Take care of first odd part
+ LDLO t0, 7(a1)
PTR_ADDU a1, a3
- SDHI a4, 0(a0)
+ SDHI t0, 0(a0)
PTR_ADDU a0, a3
L(shft1):
- andi a4, a2, 0x7
- PTR_SUBU a3, a2, a4
+ andi t0, a2, 0x7
+ PTR_SUBU a3, a2, t0
PTR_ADDU a3, a1
L(shfth):
- LDHI a5, 0(a1) # Limp through, dword by dword
- LDLO a5, 7(a1)
+ LDHI t1, 0(a1) # Limp through, dword by dword
+ LDLO t1, 7(a1)
PTR_ADDIU a0, 8
PTR_ADDIU a1, 8
bne a1, a3, L(shfth)
- sd a5, -8(a0)
+ sd t1, -8(a0)
b L(last16) # Handle anything which may be left
- move a2, a4
+ move a2, t0
.set reorder
END (memcpy)
diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S
index d6e1790..784fa5d 100644
--- a/sysdeps/mips/mips64/memset.S
+++ b/sysdeps/mips/mips64/memset.S
@@ -36,33 +36,33 @@
ENTRY (memset)
.set noreorder
- slti t5, a2, 16 # Less than 16?
- bne t5, zero, L(last16)
+ slti ta1, a2, 16 # Less than 16?
+ bne ta1, zero, L(last16)
move v0, a0 # Setup exit value before too late
beq a1, zero, L(ueven) # If zero pattern, no need to extend
andi a1, 0xff # Avoid problems with bogus arguments
- dsll t4, a1, 8
- or a1, t4
- dsll t4, a1, 16
- or a1, t4 # a1 is now pattern in full word
- dsll t4, a1, 32
- or a1, t4 # a1 is now pattern in double word
+ dsll ta0, a1, 8
+ or a1, ta0
+ dsll ta0, a1, 16
+ or a1, ta0 # a1 is now pattern in full word
+ dsll ta0, a1, 32
+ or a1, ta0 # a1 is now pattern in double word
L(ueven):
- PTR_SUBU t4, zero, a0 # Unaligned address?
- andi t4, 0x7
- beq t4, zero, L(chkw)
- PTR_SUBU a2, t4
+ PTR_SUBU ta0, zero, a0 # Unaligned address?
+ andi ta0, 0x7
+ beq ta0, zero, L(chkw)
+ PTR_SUBU a2, ta0
SDHI a1, 0(a0) # Yes, handle first unaligned part
- PTR_ADDU a0, t4 # Now both a0 and a2 are updated
+ PTR_ADDU a0, ta0 # Now both a0 and a2 are updated
L(chkw):
- andi t4, a2, 0xf # Enough left for one loop iteration?
- beq t4, a2, L(chkl)
- PTR_SUBU a3, a2, t4
+ andi ta0, a2, 0xf # Enough left for one loop iteration?
+ beq ta0, a2, L(chkl)
+ PTR_SUBU a3, a2, ta0
PTR_ADDU a3, a0 # a3 is last loop address +1
- move a2, t4 # a2 is now # of bytes left after loop
+ move a2, ta0 # a2 is now # of bytes left after loop
L(loopw):
PTR_ADDIU a0, 16 # Handle 2 dwords pr. iteration
sd a1, -16(a0)
@@ -70,9 +70,9 @@ L(loopw):
sd a1, -8(a0)
L(chkl):
- andi t4, a2, 0x8 # Check if there is at least a double
- beq t4, zero, L(last16) # word remaining after the loop
- PTR_SUBU a2, t4
+ andi ta0, a2, 0x8 # Check if there is at least a double
+ beq ta0, zero, L(last16) # word remaining after the loop
+ PTR_SUBU a2, ta0
sd a1, 0(a0) # Yes...
PTR_ADDIU a0, 8
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
index f3a0df5..9d2c4c1 100644
--- a/sysdeps/mips/sys/regdef.h
+++ b/sysdeps/mips/sys/regdef.h
@@ -32,20 +32,32 @@
#define a2 $6
#define a3 $7
#if _MIPS_SIM != _MIPS_SIM_ABI32
-#define a4 $8
-#define a5 $9
-#define a6 $10
-#define a7 $11
+#define a4 $8
+#define a5 $9
+#define a6 $10
+#define a7 $11
+#define t0 $12
+#define t1 $13
+#define t2 $14
+#define t3 $15
+#define ta0 a4
+#define ta1 a5
+#define ta2 a6
+#define ta3 a7
#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
#define t0 $8 /* caller saved */
#define t1 $9
#define t2 $10
#define t3 $11
-#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
#define t4 $12
#define t5 $13
#define t6 $14
#define t7 $15
+#define ta0 t4
+#define ta1 t5
+#define ta2 t6
+#define ta3 t7
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
#define s0 $16 /* callee saved */
#define s1 $17
#define s2 $18
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 8c23b4f..8c172db 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -60,8 +60,8 @@ L(skip):
jal __errno_location
/* Store the error value. */
- REG_L t4, V0OFF(sp)
- sw t4, 0(v0)
+ REG_L t0, V0OFF(sp)
+ sw t0, 0(v0)
/* And just kick back a -1. */
REG_L ra, RAOFF(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e635cc8cc2d8fd1f76a8affbab9a031367fb141a
commit e635cc8cc2d8fd1f76a8affbab9a031367fb141a
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Apr 5 19:57:35 2003 +0000
* sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: New.
* sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c: New.
* sysdeps/unix/sysv/linux/kernel-features.h: fcntl64 is available
on mips n32.
* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Explain why
XSTAT_IS_XSTAT64 must not be used for mips n64. Use 64-bit data
structure on n32 as well.
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Use POSIX-compliant
data types on n32 and n64.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index c0e6984..c3819d3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +34,7 @@
#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
/* Structure describing file characteristics. */
struct stat
{
@@ -106,6 +108,71 @@ struct stat64
long int st_pad4[14];
};
#endif
+#else
+struct stat
+ {
+ __dev_t st_dev;
+ int st_pad1[3]; /* Reserved for st_dev expansion */
+#ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino;
+#else
+ __ino64_t st_ino;
+#endif
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+#if !defined __USE_FILE_OFFSET64
+ unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
+ __off_t st_size;
+ int st_pad3;
+#else
+ unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
+ __off64_t st_size;
+#endif
+ __time_t st_atime;
+ int __reserved0;
+ __time_t st_mtime;
+ int __reserved1;
+ __time_t st_ctime;
+ int __reserved2;
+ __blksize_t st_blksize;
+ unsigned int st_pad4;
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks;
+#else
+ __blkcnt64_t st_blocks;
+#endif
+ int st_pad5[14];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev;
+ unsigned int st_pad1[3]; /* Reserved for st_dev expansion */
+ __ino64_t st_ino;
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
+ __off64_t st_size;
+ __time_t st_atime;
+ int __reserved0;
+ __time_t st_mtime;
+ int __reserved1;
+ __time_t st_ctime;
+ int __reserved2;
+ __blksize_t st_blksize;
+ unsigned int st_pad3;
+ __blkcnt64_t st_blocks;
+ int st_pad4[14];
+};
+#endif
+#endif
/* Tell code we have these members. */
#define _STATBUF_ST_BLKSIZE
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index b5fcd00..3f1bce5 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -1,17 +1,20 @@
-/* Definition of `struct stat' used in the kernel.. */
-#if defined _ABI64 && _MIPS_SIM == _ABI64
+/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
+ userland data structures are not identical, because of different
+ padding. */
+/* Definition of `struct stat' used in the kernel. */
+#if _MIPS_SIM != _MIPS_SIM_ABI32
struct kernel_stat
{
unsigned int st_dev;
unsigned int __pad1[3];
- unsigned long st_ino;
+ unsigned long long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
int st_uid;
int st_gid;
unsigned int st_rdev;
unsigned int __pad2[3];
- long st_size;
+ long long st_size;
unsigned int st_atime;
unsigned int __unused1;
unsigned int st_mtime;
@@ -20,7 +23,7 @@ struct kernel_stat
unsigned int __unused3;
unsigned int st_blksize;
unsigned int __pad3;
- unsigned long st_blocks;
+ unsigned long long st_blocks;
};
#else
struct kernel_stat
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
new file mode 100644
index 0000000..42efcba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+
+#include <sysdep.h>
+
+extern int ftruncate (int fd, off64_t length);
+
+int __ftruncate64 (int fd, off64_t length) {
+ return ftruncate (fd, length);
+}
+weak_alias (__ftruncate64, ftruncate64)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
new file mode 100644
index 0000000..339023f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/truncate64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <bp-checks.h>
+
+extern int truncate (const char *__unbounded path, int dummy,
+ off64_t length);
+
+int truncate64 (const char *__unbounded path, int dummy,
+ off64_t length) {
+ return truncate (path, dummy, length);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7277ebafe5b3855bd1dd7142a867f2899ed4922
commit f7277ebafe5b3855bd1dd7142a867f2899ed4922
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Apr 4 05:12:00 2003 +0000
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (struct flock): Adjust
for n64 abi.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 6a09a09..97e1867 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -142,14 +143,20 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
- long int l_sysid; /* XXX */
+#if ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ fcntls in o32 and n32, never has this field. */
+ long int l_sysid;
+#endif
#else
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
__pid_t l_pid; /* Process holding the lock. */
-#ifndef __USE_FILE_OFFSET64
- long int pad[4]; /* XXX */
+#if ! defined __USE_FILE_OFFSET64 && ! (defined _ABI64 && _MIPS_SIM == _ABI64)
+ /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit
+ flock in o32 and n32, never has this field. */
+ long int pad[4];
#endif
} flock_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97012650e20a55130c734af68d7a5d5ab16d71f7
commit 97012650e20a55130c734af68d7a5d5ab16d71f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 3 19:32:34 2003 +0000
(PSEUDO): Add missing ; after ENTRY use.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 25dbb9e..d2043aa 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -43,7 +43,7 @@
# define PSEUDO(name, syscall_name, args) \
.section ".text"; \
PSEUDO_PROLOGUE; \
- ENTRY (name) \
+ ENTRY (name); \
SINGLE_THREAD_P_INT; \
bne .Lpseudo_cancel; \
DO_CALL (syscall_name, args); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=614ba8f7495a24ad4a7d62fd074cb43b75cea6d6
commit 614ba8f7495a24ad4a7d62fd074cb43b75cea6d6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 1 06:16:53 2003 +0000
(_NSIG): Define to 65.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 44c96a2..477c131 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -69,7 +69,7 @@
#define SIGPWR SIGINFO
#define SIGIOT SIGABRT
-#define _NSIG 64 /* Biggest signal number + 1. */
+#define _NSIG 65 /* Biggest signal number + 1. */
#define SIGRTMIN (__libc_current_sigrtmin ())
#define SIGRTMAX (__libc_current_sigrtmax ())
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
index 14346bf..bf46006 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/HPPA version.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -68,7 +68,7 @@
#define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */
#define SIGSTKFLT 36 /* Stack fault. */
-#define _NSIG 64 /* Biggest signal number + 1
+#define _NSIG 65 /* Biggest signal number + 1
(including real-time signals). */
#define SIGRTMIN (__libc_current_sigrtmin ())
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28d6ca4b60ef362dd30f28ed9a48f6d36c9741af
commit 28d6ca4b60ef362dd30f28ed9a48f6d36c9741af
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Mar 31 16:01:09 2003 +0000
(atomic_increment_and_test): Define.
(atomic_decrement_and_test): Fix test.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
index 80b5b8f..6978b27 100644
--- a/sysdeps/m68k/m68020/bits/atomic.h
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -179,18 +179,52 @@ typedef uintmax_t uatomic_max_t;
} \
})
+#define atomic_increment_and_test(mem) \
+ ({ char __result; \
+ if (sizeof (*(mem)) == 1) \
+ __asm __volatile ("addq%.b %#1,%1; seq %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else if (sizeof (*(mem)) == 2) \
+ __asm __volatile ("addq%.w %#1,%1; seq %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else if (sizeof (*(mem)) == 4) \
+ __asm __volatile ("addq%.l %#1,%1; seq %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else \
+ { \
+ __typeof (mem) __memp = (mem); \
+ __typeof (*(mem)) __oldval = *__memp; \
+ __typeof (*(mem)) __temp; \
+ __asm __volatile ("1: move%.l %1,%2;" \
+ " move%.l %R1,%R2;" \
+ " addq%.l %#1,%2;" \
+ " addx%.l %5,%R2;" \
+ " seq %0;" \
+ " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \
+ " jbne 1b" \
+ : "=&dm" (__result), "=d" (__oldval), \
+ "=&d" (__temp) \
+ : "r" (__memp), "r" ((char *) __memp + 4), \
+ "d" (0), "1" (__oldval) \
+ : "memory"); \
+ } \
+ __result; })
+
#define atomic_decrement_and_test(mem) \
({ char __result; \
if (sizeof (*(mem)) == 1) \
- __asm __volatile ("subq%.b %#1,%1; scs %0" \
+ __asm __volatile ("subq%.b %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
: "1" (*(mem))); \
else if (sizeof (*(mem)) == 2) \
- __asm __volatile ("subq%.w %#1,%1; scs %0" \
+ __asm __volatile ("subq%.w %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
: "1" (*(mem))); \
else if (sizeof (*(mem)) == 4) \
- __asm __volatile ("subq%.l %#1,%1; scs %0" \
+ __asm __volatile ("subq%.l %#1,%1; seq %0" \
: "=dm" (__result), "=m" (*(mem)) \
: "1" (*(mem))); \
else \
@@ -202,7 +236,7 @@ typedef uintmax_t uatomic_max_t;
" move%.l %R1,%R2;" \
" subq%.l %#1,%2;" \
" subx%.l %5,%R2;" \
- " scs %0;" \
+ " seq %0;" \
" cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \
" jbne 1b" \
: "=&dm" (__result), "=d" (__oldval), \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef055a744e3f0fd916b71400e768a060b58ba989
commit ef055a744e3f0fd916b71400e768a060b58ba989
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Mar 29 08:15:29 2003 +0000
* configure.in: Add mips64* support.
* configure: Rebuilt.
* sysdeps/mips/bits/endian.h: Make it bi-endian.
* sysdeps/mips/mipsel/bits/endian.h: Removed.
* sysdeps/mips/mips64/n32/el/bits/endian.h: Removed.
* sysdeps/mips/mips64/n64/el/bits/endian.h: Removed.
* sysdeps/mips/mips32/Makefile (CC): Add -mabi=32.
* sysdeps/mips/mips64/n32/Makefile (CC): Add -mabi=n32.
* sysdeps/mips/mips64/n64/Makefile (CC): Add -mabi=64.
* sysdeps/mips/Implies: Moved wordsize-32 to...
* sysdeps/mips/mips32/Implies: New file.
* sysdeps/unix/mips/sysdep.h (PSEUDO_NOERRNO, PSEUDO_END_NOERRNO,
ret_NOERRNO): New.
(ret, PSEUDO_END): Moved past END.
(PSEUDO): Moved to...
* sysdeps/unix/mips/mips32/sysdep.h: New file.
* sysdeps/unix/mips/mips64/n32/sysdep.h: Removed #undef PSEUDO.
* sysdeps/unix/mips/mips64/n64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.h: Move to...
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h: New file.
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 9f60963..8c18cb3 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,4 +1,3 @@
-wordsize-32
# MIPS uses IEEE 754 floating point.
ieee754/flt-32
ieee754/dbl-64
diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h
index 40321a2..9586104 100644
--- a/sysdeps/mips/bits/endian.h
+++ b/sysdeps/mips/bits/endian.h
@@ -5,4 +5,9 @@
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
-#define __BYTE_ORDER __BIG_ENDIAN
+#if __MIPSEB
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif
+#if __MIPSEL
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
diff --git a/sysdeps/mips/mips32/Implies b/sysdeps/mips/mips32/Implies
new file mode 100644
index 0000000..fab98d7
--- /dev/null
+++ b/sysdeps/mips/mips32/Implies
@@ -0,0 +1,2 @@
+mips
+wordsize-32
diff --git a/sysdeps/mips/mips32/Makefile b/sysdeps/mips/mips32/Makefile
new file mode 100644
index 0000000..dec0b02
--- /dev/null
+++ b/sysdeps/mips/mips32/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(filter -mabi=32,$(CC)),)
+CC += -mabi=32
+endif
diff --git a/sysdeps/mips/mips64/n32/Makefile b/sysdeps/mips/mips64/n32/Makefile
index 26f3857..a84d2a5 100644
--- a/sysdeps/mips/mips64/n32/Makefile
+++ b/sysdeps/mips/mips64/n32/Makefile
@@ -1,2 +1,6 @@
# `long double' is a distinct type we support.
long-double-fcts = yes
+
+ifeq ($(filter -mabi=n32,$(CC)),)
+CC += -mabi=n32
+endif
diff --git a/sysdeps/mips/mips64/n32/el/bits/endian.h b/sysdeps/mips/mips64/n32/el/bits/endian.h
deleted file mode 100644
index 2241190..0000000
--- a/sysdeps/mips/mips64/n32/el/bits/endian.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- This file is for a machine using little-endian mode. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/mips64/n64/Makefile b/sysdeps/mips/mips64/n64/Makefile
index 26f3857..a823f32 100644
--- a/sysdeps/mips/mips64/n64/Makefile
+++ b/sysdeps/mips/mips64/n64/Makefile
@@ -1,2 +1,6 @@
# `long double' is a distinct type we support.
long-double-fcts = yes
+
+ifeq ($(filter -mabi=64,$(CC)),)
+CC += -mabi=64
+endif
diff --git a/sysdeps/mips/mips64/n64/el/bits/endian.h b/sysdeps/mips/mips64/n64/el/bits/endian.h
deleted file mode 100644
index 2241190..0000000
--- a/sysdeps/mips/mips64/n64/el/bits/endian.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- This file is for a machine using little-endian mode. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h
deleted file mode 100644
index 2241190..0000000
--- a/sysdeps/mips/mipsel/bits/endian.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- This file is for a machine using little-endian mode. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips32/sysdep.h
similarity index 84%
copy from sysdeps/unix/mips/mips64/n32/sysdep.h
copy to sysdeps/unix/mips/mips32/sysdep.h
index 3564c6b..0b5d118 100644
--- a/sysdeps/unix/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/mips/mips32/sysdep.h
@@ -1,7 +1,7 @@
/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Alexandre Oliva <aoliva@redhat.com>.
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -20,25 +20,20 @@
#include <sysdeps/unix/mips/sysdep.h>
-#ifdef __ASSEMBLER__
-
-# undef PSEUDO
/* Note that while it's better structurally, going back to call __syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
#ifdef __PIC__
#define PSEUDO(name, syscall_name, args) \
.align 2; \
- 99:; \
- .set noat; \
- .cpsetup t9, $1, name; \
- .set at; \
- la t9,__syscall_error; \
- .cpreturn; \
+ 99: la t9,__syscall_error; \
jr t9; \
ENTRY(name) \
+ .set noreorder; \
+ .cpload t9; \
li v0, SYS_ify(syscall_name); \
syscall; \
+ .set reorder; \
bne a3, zero, 99b; \
L(syse1):
#else
@@ -46,6 +41,7 @@ L(syse1):
.set noreorder; \
.align 2; \
99: j __syscall_error; \
+ nop; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_ify(syscall_name); \
@@ -54,5 +50,3 @@ L(syse1):
bne a3, zero, 99b; \
L(syse1):
#endif
-
-#endif
diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h
index 3564c6b..ec93fad 100644
--- a/sysdeps/unix/mips/mips64/n32/sysdep.h
+++ b/sysdeps/unix/mips/mips64/n32/sysdep.h
@@ -22,7 +22,6 @@
#ifdef __ASSEMBLER__
-# undef PSEUDO
/* Note that while it's better structurally, going back to call __syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h
index 982d905..502b667 100644
--- a/sysdeps/unix/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/mips/mips64/n64/sysdep.h
@@ -22,7 +22,6 @@
#ifdef __ASSEMBLER__
-# undef PSEUDO
/* Note that while it's better structurally, going back to call __syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 8ba84e2..13a3752 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -30,47 +30,27 @@
.ent name,0; \
name##:
-/* Note that while it's better structurally, going back to call __syscall_error
- can make things confusing if you're debugging---it looks like it's jumping
- backwards into the previous fn. */
-#ifdef __PIC__
-#define PSEUDO(name, syscall_name, args) \
- .align 2; \
- 99: la t9,__syscall_error; \
- jr t9; \
- ENTRY(name) \
- .set noreorder; \
- .cpload t9; \
- li v0, SYS_ify(syscall_name); \
- syscall; \
- .set reorder; \
- bne a3, zero, 99b; \
-L(syse1):
-#else
-#define PSEUDO(name, syscall_name, args) \
- .set noreorder; \
- .align 2; \
- 99: j __syscall_error; \
- nop; \
- ENTRY(name) \
- .set noreorder; \
- li v0, SYS_ify(syscall_name); \
- syscall; \
- .set reorder; \
- bne a3, zero, 99b; \
-L(syse1):
-#endif
-
-#undef PSEUDO_END
-#define PSEUDO_END(sym) .end sym
-
-#define ret j ra ; nop
-
#undef END
#define END(function) \
.end function; \
.size function,.-function
+#define ret j ra ; nop
+
+#define PSEUDO_END(sym) .end sym; .size sym,.-sym
+
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .align 2; \
+ ENTRY(name) \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(sym) .end sym; .size sym,.-sym
+
+#define ret_NOERRNO ret
+
#define r0 v0
#define r1 v1
/* The mips move insn is d,s. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
new file mode 100644
index 0000000..b0316b6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H
+#define _LINUX_MIPS_MIPS32_KERN64_SYSDEP_H 1
+
+/* There is some commonality. */
+#include <sysdeps/unix/sysv/linux/mips/mips32/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_O32_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name
+#endif
+
+#endif /* linux/mips/mips32/kern64/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
similarity index 97%
rename from sysdeps/unix/sysv/linux/mips/sysdep.h
rename to sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 710479a..1f56671 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,11 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _LINUX_MIPS_SYSDEP_H
-#define _LINUX_MIPS_SYSDEP_H 1
+#ifndef _LINUX_MIPS_MIPS32_SYSDEP_H
+#define _LINUX_MIPS_MIPS32_SYSDEP_H 1
/* There is some commonality. */
-#include <sysdeps/unix/mips/sysdep.h>
+#include <sysdeps/unix/mips/mips32/sysdep.h>
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
@@ -279,4 +279,4 @@
#endif /* __ASSEMBLER__ */
-#endif /* linux/mips/sysdep.h */
+#endif /* linux/mips/mips32/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f3bcde0d1b6312799e7769afdc0f9066d1a410e
commit 7f3bcde0d1b6312799e7769afdc0f9066d1a410e
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Mar 29 08:01:57 2003 +0000
* sysdeps/unix/sysv/linux/mips/clone.S (__thread_start):
Re-introduce ENTRY.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index e00351d..043f592 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -89,6 +89,7 @@ L(error):
its own function so that we can terminate the stack trace with our
debug info. */
+ENTRY(__thread_start)
L(thread_start):
/* cp is already loaded. */
SAVE_GP (GPOFF)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9b0e91911513043188c9590acd305982fd6b1c4
commit a9b0e91911513043188c9590acd305982fd6b1c4
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 28 07:02:35 2003 +0000
* sysdeps/unix/mips/sysdep.S: Include sys/asm.h.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 09e8a0a..8c23b4f 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -21,6 +21,7 @@
#include <sysdep.h>
#define _ERRNO_H
#include <bits/errno.h>
+#include <sys/asm.h>
#ifdef _LIBC_REENTRANT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=faef8a3c25baf8678aa89d9241e2385a4269dacb
commit faef8a3c25baf8678aa89d9241e2385a4269dacb
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 28 06:11:03 2003 +0000
* sysdeps/unix/sysv/linux/mips/configure: Rebuilt.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index e69de29..9a7b423 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -0,0 +1,75 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/mips.
+
+case $machine in
+mips*64*)
+ rm -f asm-unistd.h
+ asm_unistd_h=$sysheaders/asm/unistd.h
+ if test ! -f $asm_unistd_h; then
+ # Try to find asm/unistd.h in compiler header search path.
+ try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
+ sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
+ if test -n "$try_asm_unistd_h" &&
+ test -f "$try_asm_unistd_h"; then
+ asm_unistd_h=$try_asm_unistd_h
+ fi
+ fi
+ if test ! -f "$asm_unistd_h"; then
+ { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
+echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ else
+ # The point of this preprocessing is to turn __NR_<syscall> into
+ # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
+ # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
+ # and <abi> is the compiler-enabled ABI.
+ cat "$asm_unistd_h" |
+ sed -e 's,__NR_,__NR_N64_,g' \
+ -e 's,__NR_N64_##,__NR_##,g' \
+ -e 's,__NR_N64_O32_,__NR_O32_,g' \
+ -e 's,__NR_N64_N32_,__NR_N32_,g' \
+ -e 's,__NR_N64_N64_,__NR_N64_,g' \
+ | awk > asm-unistd.h '
+/^#define __NR.*unused/ { print; next; }
+/^#define __NR_N64__exit __NR_N64_exit/ {
+ print "#define __NR__exit __NR_exit";
+ print "#define __NR_O32__exit __NR_O32_exit";
+ print "#define __NR_N32__exit __NR_N32_exit";
+ print; next;
+}
+/^#define __NR_O32_/ {
+ name = $2;
+ sub (/_O32_/, "_", name);
+ print;
+ print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+/^#define __NR_N32_/ {
+ name = $2;
+ sub (/_N32_/, "_", name);
+ print;
+ print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+/^#define __NR_N64_/ {
+ name = $2;
+ sub (/_N64_/, "_", name);
+ print;
+ print "#if defined _ABI64 && _MIPS_SIM == _ABI64";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+{
+ print;
+}'
+ fi ;;
+mips*)
+ rm -f asm-unistd.h
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ ;;
+esac
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44acff5d0433510d3d530d18a6b61e4f79070434
commit 44acff5d0433510d3d530d18a6b61e4f79070434
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 27 02:45:49 2003 +0000
2003-03-27 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET_NOERRNO): Use
unconditional mov. Remove nop.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 1b1fc51..47383aa 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -71,8 +71,8 @@
DO_CALL (syscall_name, args);
#define PSEUDO_RET_NOERRNO \
- RETINSTR(movcc, pc, lr); \
- nop
+ RETINSTR(mov, pc, lr);
+
#undef ret_NOERRNO
#define ret_NOERRNO PSEUDO_RET_NOERRNO
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=227de9dd23296efa12c9e4e0d0ee5c1d32805d05
commit 227de9dd23296efa12c9e4e0d0ee5c1d32805d05
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 27 02:45:46 2003 +0000
2003-03-27 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_VFORK_SYSCALL): Define for kernel 2.4 on arm.
* sysdeps/unix/sysv/linux/arm/vfork.S: Elide compatibility code
when __ASSUME_VFORK_SYSCALL is defined.
* sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise for
__ASSUME_MMAP2_SYSCALL.
* sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise for
__ASSUME_REALTIME_SIGNALS.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 1f19bf0..3936e25 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
#define EINVAL 22
#define ENOSYS 38
+#include "kernel-features.h"
+
/* The mmap2 system call takes six arguments, all in registers. */
.text
ENTRY (__mmap64)
@@ -39,6 +41,10 @@ ENTRY (__mmap64)
swi SYS_ify (mmap2)
cmn r0, $4096
LOADREGS(ccfd, sp!, {r4, r5, pc})
+# ifdef __ASSUME_MMAP2_SYSCALL
+ ldmfd sp!, {r4, r5, lr}
+ b PLTJMP(syscall_error)
+# else
cmn r0, $ENOSYS
ldmnefd sp!, {r4, r5, lr}
bne PLTJMP(syscall_error)
@@ -49,6 +55,7 @@ ENTRY (__mmap64)
teq r5, $0
ldmeqfd sp!, {r4, r5, lr}
beq PLTJMP(__mmap)
+# endif
.Linval:
mov r0, $-EINVAL
ldmfd sp!, {r4, r5, lr}
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 46ff2b1..82e22b6 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -22,6 +22,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <kernel-features.h>
/* The difference here is that the sigaction structure used in the
kernel is not the same as we use in the libc. Therefore we must
@@ -60,15 +61,21 @@ __libc_sigaction (sig, act, oact)
const struct sigaction *act;
struct sigaction *oact;
{
+#ifndef __ASSUME_REALTIME_SIGNALS
struct old_kernel_sigaction k_sigact, k_osigact;
+#endif
int result;
#ifdef __NR_rt_sigaction
/* First try the RT signals. */
+# ifndef __ASSUME_REALTIME_SIGNALS
if (!__libc_missing_rt_sigs)
+# endif
{
struct kernel_sigaction kact, koact;
+# ifndef __ASSUME_REALTIME_SIGNALS
int saved_errno = errno;
+# endif
if (act)
{
@@ -99,7 +106,9 @@ __libc_sigaction (sig, act, oact)
act ? __ptrvalue (&kact) : NULL,
oact ? __ptrvalue (&koact) : NULL, _NSIG / 8);
+# ifndef __ASSUME_REALTIME_SIGNALS
if (result >= 0 || errno != ENOSYS)
+# endif
{
if (oact && result >= 0)
{
@@ -113,17 +122,20 @@ __libc_sigaction (sig, act, oact)
return result;
}
+# ifndef __ASSUME_REALTIME_SIGNALS
__set_errno (saved_errno);
__libc_missing_rt_sigs = 1;
+# endif
}
#endif
+#ifndef __ASSUME_REALTIME_SIGNALS
if (act)
{
k_sigact.k_sa_handler = act->sa_handler;
k_sigact.sa_mask = act->sa_mask.__val[0];
k_sigact.sa_flags = act->sa_flags;
-#ifdef HAVE_SA_RESTORER
+# ifdef HAVE_SA_RESTORER
/* See the comments above for why we test SA_ONSTACK. */
if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK))
k_sigact.sa_restorer = act->sa_restorer;
@@ -132,7 +144,7 @@ __libc_sigaction (sig, act, oact)
k_sigact.sa_restorer = choose_restorer (k_sigact.sa_flags);
k_sigact.sa_flags |= SA_RESTORER;
}
-#endif
+# endif
}
result = INLINE_SYSCALL (sigaction, 3, sig,
act ? __ptrvalue (&k_sigact) : NULL,
@@ -142,11 +154,12 @@ __libc_sigaction (sig, act, oact)
oact->sa_handler = k_osigact.k_sa_handler;
oact->sa_mask.__val[0] = k_osigact.sa_mask;
oact->sa_flags = k_osigact.sa_flags;
-#ifdef HAVE_SA_RESTORER
+# ifdef HAVE_SA_RESTORER
oact->sa_restorer = k_osigact.sa_restorer;
-#endif
+# endif
}
return result;
+#endif
}
libc_hidden_def (__libc_sigaction)
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index a2c6bf3..0630c7f 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -20,6 +20,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include <kernel-features.h>
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
@@ -33,17 +34,23 @@ ENTRY (__vfork)
cmn a1, #4096
RETINSTR(movcc, pc, lr)
+# ifdef __ASSUME_VFORK_SYSCALL
+ b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+# else
/* Check if vfork syscall is known at all. */
ldr a2, =-ENOSYS
teq a1, a2
bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
+# endif
#endif
+#ifndef __ASSUME_VFORK_SYSCALL
/* If we don't have vfork, fork is close enough. */
swi __NR_fork
cmn a1, #4096
RETINSTR(movcc, pc, lr)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#endif
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49d354ccdccd9ce09104f39ed79304f671294265
commit 49d354ccdccd9ce09104f39ed79304f671294265
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 26 23:41:57 2003 +0000
(struct siginfo): Avoid no-op padding element.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index d2e72c8..446394f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -65,7 +65,6 @@ typedef struct siginfo
{
int si_tid; /* Timer ID. */
int si_overrun; /* Overrun count. */
- char _pad[sizeof (__uid_t) - sizeof (int)];
sigval_t si_sigval; /* Signal value. */
} _timer;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8eecb601ef48ada27ca1c87bf4281025472d40e1
commit 8eecb601ef48ada27ca1c87bf4281025472d40e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 26 04:48:10 2003 +0000
(struct siginfo): Adjust timer info for what the kernel provides these days.
(struct sigevent): Add _tid field.
Define SIGEV_THREAD_ID.
Remove struct __pthread_attr_s forward declaration.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 11da792..d2e72c8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/Alpha version.
- Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,6 @@
# error "Never include this file directly. Use <signal.h> instead"
#endif
-#include <bits/wordsize.h>
-
#if (!defined __have_sigval_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t \
|| defined __need_sigevent_t))
@@ -42,11 +40,7 @@ typedef union sigval
# define __have_siginfo_t 1
# define __SI_MAX_SIZE 128
-# if __WORDSIZE == 64
-# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
-# else
-# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
-# endif
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
typedef struct siginfo
{
@@ -69,8 +63,10 @@ typedef struct siginfo
/* POSIX.1b timers. */
struct
{
- unsigned int _timer1;
- unsigned int _timer2;
+ int si_tid; /* Timer ID. */
+ int si_overrun; /* Overrun count. */
+ char _pad[sizeof (__uid_t) - sizeof (int)];
+ sigval_t si_sigval; /* Signal value. */
} _timer;
/* POSIX.1b signals. */
@@ -110,8 +106,8 @@ typedef struct siginfo
/* X/Open requires some more fields with fixed names. */
# define si_pid _sifields._kill.si_pid
# define si_uid _sifields._kill.si_uid
-# define si_timer1 _sifields._timer._timer1
-# define si_timer2 _sifields._timer._timer2
+# define si_timerid _sifields._timer.si_tid
+# define si_overrun _sifields._timer.si_overrun
# define si_status _sifields._sigchld.si_status
# define si_utime _sifields._sigchld.si_utime
# define si_stime _sifields._sigchld.si_stime
@@ -261,14 +257,7 @@ enum
/* Structure to transport application-defined values with signals. */
# define __SIGEV_MAX_SIZE 64
-# if __WORDSIZE == 64
-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
-# else
-# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
-# endif
-
-/* Forward declaration of the `pthread_attr_t' type. */
-struct __pthread_attr_s;
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
typedef struct sigevent
{
@@ -280,6 +269,10 @@ typedef struct sigevent
{
int _pad[__SIGEV_PAD_SIZE];
+ /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
+ thread to receive the signal. */
+ __pid_t _tid;
+
struct
{
void (*_function) (sigval_t); /* Function to start. */
@@ -299,8 +292,11 @@ enum
# define SIGEV_SIGNAL SIGEV_SIGNAL
SIGEV_NONE, /* Other notification: meaningless. */
# define SIGEV_NONE SIGEV_NONE
- SIGEV_THREAD /* Deliver via thread creation. */
+ SIGEV_THREAD, /* Deliver via thread creation. */
# define SIGEV_THREAD SIGEV_THREAD
+
+ SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
+#define SIGEV_THREAD_ID SIGEV_THREAD_ID
};
#endif /* have _SIGNAL_H. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97b729d37998e877123d68cd9faf458cb19a6380
commit 97b729d37998e877123d68cd9faf458cb19a6380
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Mar 25 23:40:18 2003 +0000
Fix typos.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
index 09c33c1..80b5b8f 100644
--- a/sysdeps/m68k/m68020/bits/atomic.h
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -99,7 +99,7 @@ typedef uintmax_t uatomic_max_t;
__asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \
" jbne 1b" \
: "=d" (__result) \
- : "d" (newval), "r" (__memp), \
+ : "d" (newvalue), "r" (__memp), \
"r" ((char *) __memp + 4), "0" (__result) \
: "memory"); \
} \
@@ -195,7 +195,7 @@ typedef uintmax_t uatomic_max_t;
: "1" (*(mem))); \
else \
{ \
- __typef (mem) __memp = (mem); \
+ __typeof (mem) __memp = (mem); \
__typeof (*(mem)) __oldval = *__memp; \
__typeof (*(mem)) __temp; \
__asm __volatile ("1: move%.l %1,%2;" \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64928a88897688dad9ee4067cab448b063f57502
commit 64928a88897688dad9ee4067cab448b063f57502
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Mar 25 23:15:40 2003 +0000
Define ret_NOERRNO.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 23e4202..aabd46f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -78,6 +78,8 @@
#define PSEUDO_END_NOERRNO(name) \
END (name)
+#define ret_NOERRNO ret
+
#ifdef PIC
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f30a759d97a1b845476644bba4d73aa83fecabc9
commit f30a759d97a1b845476644bba4d73aa83fecabc9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 21:59:17 2003 +0000
(__TIMER_T_TYPE): Define as void*.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
index 235acf8..2fb0388 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,7 +54,7 @@
#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
-#define __TIMER_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE void *
#define __BLKSIZE_T_TYPE __U32_TYPE
#define __FSID_T_TYPE struct { int __val[2]; }
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4e9c08c590b37a11562513f69708683a4ffd1a2
commit f4e9c08c590b37a11562513f69708683a4ffd1a2
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Tue Mar 25 21:51:53 2003 +0000
* sysdeps/mips/sgidefs.h (_MIPS_ISA_MIPS32, _MIPS_ISA_MIPS64):
Define.
* sysdeps/mips/sys/asm.h: Test _MIPS_ISA against them on all
ISA tests.
(ALSZ, ALMASK, SZREG, REG_S, REG_L): Define based on ABI, not ISA.
(PTR_ADD, etc): Test _MIPS_SZPTR instead of _MIPS_SZLONG.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR
to decide whether to add padding.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Use _MIPS_SZPTR
to decide whether to add padding.
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h (struct
old_kernel_sigaction): Likewise.
diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h
index 16b7c8c..1d48935 100644
--- a/sysdeps/mips/sgidefs.h
+++ b/sysdeps/mips/sgidefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -28,6 +28,8 @@
#define _MIPS_ISA_MIPS3 3
#define _MIPS_ISA_MIPS4 4
#define _MIPS_ISA_MIPS5 5
+#define _MIPS_ISA_MIPS32 6
+#define _MIPS_ISA_MIPS64 7
/*
* Subprogram calling convention
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index 0ebf561..76f6af3 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -230,7 +230,8 @@ symbol = value
* MIPS IV implementations are free to treat this as a nop. The R5000
* is one of them. So we should have an option not to use this instruction.
*/
-#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
# define PREF(hint,addr) \
pref hint,addr
# define PREFX(hint,addr) \
@@ -275,7 +276,8 @@ symbol = value
.set pop; \
9:
#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
# define MOVN(rd,rs,rt) \
movn rd,rs,rt
# define MOVZ(rd,rs,rt) \
@@ -285,20 +287,18 @@ symbol = value
/*
* Stack alignment
*/
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
-# define ALSZ 7
-# define ALMASK ~7
-#endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
- (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
# define ALSZ 15
# define ALMASK ~15
+#else
+# define ALSZ 7
+# define ALMASK ~7
#endif
/*
* Size of a register
*/
-#ifdef __mips64
+#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
# define SZREG 8
#else
# define SZREG 4
@@ -308,7 +308,7 @@ symbol = value
* Use the following macros in assemblercode to load/store registers,
* pointers etc.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#if (SZREG == 4)
# define REG_S sw
# define REG_L lw
#else
@@ -389,7 +389,7 @@ symbol = value
/*
* How to add/sub/load/store/shift pointers.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32)
# define PTR_ADD add
# define PTR_ADDI addi
# define PTR_ADDU addu
@@ -433,7 +433,7 @@ symbol = value
# define PTR_SCALESHIFT 2
#endif
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 64) \
+#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \
|| _MIPS_SIM == _MIPS_SIM_ABI64
# define PTR_ADD dadd
# define PTR_ADDI daddi
@@ -459,12 +459,13 @@ symbol = value
/*
* Some cp0 registers were extended to 64bit for MIPS III.
*/
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS32)
# define MFC0 mfc0
# define MTC0 mtc0
#endif
#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
- (_MIPS_ISA == _MIPS_ISA_MIPS5)
+ (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
# define MFC0 dmfc0
# define MTC0 dmtc0
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 93a7598..d04e25f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -1,5 +1,6 @@
/* The proper definitions for Linux/MIPS's sigaction.
- Copyright (C) 1993,94,95,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +50,7 @@ struct sigaction
/* Restore handler. */
void (*sa_restorer) (void);
-#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2
+#if _MIPS_SZPTR < 64
int sa_resv[1];
#endif
};
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
index 36d2667..b6f52cc 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -12,7 +12,7 @@ struct old_kernel_sigaction {
/* Abi says here follows reserved int[2] */
void (*sa_restorer)(void);
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#if (_MIPS_SZPTR < 64)
/*
* For 32 bit code we have to pad struct sigaction to get
* constant size for the ABI
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0dc73c1e33bec0274474b85a12d544cbdd90b2b
commit e0dc73c1e33bec0274474b85a12d544cbdd90b2b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 25 09:44:29 2003 +0000
2003-03-24 Daniel Jacobowitz <drow@mvista.com>
* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
(DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 47af280..25dbb9e 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -24,6 +24,15 @@
#if !defined NOT_IN_libc || defined IS_IN_libpthread
+/* We push lr onto the stack, so we have to use ldmib instead of ldmia
+ to find the saved arguments. */
+#undef DOARGS_5
+#undef DOARGS_6
+#undef DOARGS_7
+#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
+#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
+#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
+
# undef PSEUDO_RET
# define PSEUDO_RET \
ldrcc pc, [sp], $4; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf666e4bf936c0a1528172d56c95067006a7612c
commit cf666e4bf936c0a1528172d56c95067006a7612c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 24 19:00:28 2003 +0000
INTERNAL_SYSCALL): Remove a1 from clobber list.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 3e3c874..1b1fc51 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -174,7 +174,7 @@ __local_syscall_error: \
asm volatile ("swi %1 @ syscall " #name \
: "=r" (_a1) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
- : "a1", "memory"); \
+ : "memory"); \
_sys_result = _a1; \
} \
(int) _sys_result; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98f7320f0780d3238f8196c6f03c0cf256e7d6fb
commit 98f7320f0780d3238f8196c6f03c0cf256e7d6fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 23 19:42:23 2003 +0000
Define PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, and ret_NOERRNO.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index cb04cec..6e55061 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -119,6 +119,21 @@ $syscall_error: \
END(sym)
#endif
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .globl name; \
+ .align 4; \
+ .ent name,0; \
+__LABEL(name) \
+ PSEUDO_PROLOGUE; \
+ PSEUDO_PREPARE_ARGS \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys;
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(sym) END(sym)
+
+#define ret_NOERRNO ret
+
#define r0 v0
#define r1 a4
@@ -167,8 +182,8 @@ $syscall_error: \
/* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
as modeled within GCC, and explicit use of the R0 register. If we use
the register via the asm, the scheduler may place the PAL_rduniq insn
- before we've copied the data from R0 into _sc_ret. If this happens
- we'll get a reload abort, since R0 is live at the same time it is
+ before we've copied the data from R0 into _sc_ret. If this happens
+ we'll get a reload abort, since R0 is live at the same time it is
needed for the PAL_rduniq.
Solve this by using the "v" constraint instead of an asm for the syscall
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 785d3cf..3e3c874 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -64,6 +64,22 @@
SYSCALL_ERROR_HANDLER \
END (name)
+#undef PSEUDO_NOERRNO
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .text; \
+ ENTRY (name); \
+ DO_CALL (syscall_name, args);
+
+#define PSEUDO_RET_NOERRNO \
+ RETINSTR(movcc, pc, lr); \
+ nop
+#undef ret_NOERRNO
+#define ret_NOERRNO PSEUDO_RET_NOERRNO
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
#if NOT_IN_libc
# define SYSCALL_ERROR __local_syscall_error
# define SYSCALL_ERROR_HANDLER \
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h
index 4446b26..f22a3d2 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.h
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for CRIS.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -106,6 +106,18 @@
PLTJUMP (syscall_error) @ \
END (name)
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ ENTRY (name) @ \
+ DOARGS_##args @ \
+ movu.w SYS_ify (syscall_name),$r9 @ \
+ break 13 @ \
+ UNDOARGS_return_##args
+
+#define ret_NOERRNO
+
+#define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
#define DOARGS_0
#define DOARGS_1
#define DOARGS_2
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 4f08cc6..771c55c 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@@ -84,6 +84,10 @@
bv 0(2) ASM_LINE_SEP \
nop
+#define ret_NOERRNO \
+ bv 0(2) ASM_LINE_SEP \
+ nop
+
#undef END
#define END(name) \
1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
@@ -115,6 +119,15 @@
#define PSEUDO_END(name) \
END (name)
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ ENTRY (name) \
+ DO_CALL(syscall_name, args) ASM_LINE_SEP \
+ nop
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
#define JUMPTARGET(name) name
#define SYSCALL_PIC_SETUP /* Nothing. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 125c584..23e4202 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -68,6 +68,16 @@
SYSCALL_ERROR_HANDLER; \
END (name)
+#undef PSEUDO_NOERRNO
+#define PSEUDO_NOERRNO(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args)
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(name) \
+ END (name)
+
#ifdef PIC
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fad367110e49bb8a732a307db499b2a637b3f4d2
commit fad367110e49bb8a732a307db499b2a637b3f4d2
Author: Roland McGrath <roland@gnu.org>
Date: Sun Mar 23 00:52:10 2003 +0000
2003-03-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/fpu/libm-test-ulps: Update.
* sysdeps/arm/libm-test-ulps: Update.
* sysdeps/hppa/fpu/libm-test-ulps: Update.
* sysdeps/ia64/fpu/libm-test-ulps: Update.
* sysdeps/mips/fpu/libm-test-ulps: Update.
* sysdeps/powerpc/nofpu/libm-test-ulps: Update.
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
* sysdeps/sh/sh4/fpu/libm-test-ulps: Update.
* sysdeps/s390/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index e2091f8..73172b4 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -94,7 +94,7 @@ double: 1
idouble: 1
# ccos
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
@@ -107,10 +107,10 @@ float: 1
ifloat: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
@@ -145,7 +145,7 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
@@ -239,7 +239,7 @@ idouble: 2
ifloat: 2
# csinh
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
@@ -258,7 +258,7 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -266,7 +266,7 @@ double: 1
idouble: 1
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
idouble: 1
@@ -453,12 +453,12 @@ idouble: 1
ifloat: 2
# lgamma
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -513,7 +513,7 @@ ifloat: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
index 260ba58..6a4bcc6 100644
--- a/sysdeps/arm/libm-test-ulps
+++ b/sysdeps/arm/libm-test-ulps
@@ -134,7 +134,7 @@ double: 1
idouble: 1
# ccos
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
@@ -145,10 +145,10 @@ double: 1
idouble: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
@@ -187,7 +187,7 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
@@ -280,7 +280,7 @@ float: 1
ifloat: 1
# csinh
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
@@ -307,7 +307,7 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
@@ -320,7 +320,7 @@ idouble: 1
ifloat: 1
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
idouble: 1
@@ -509,12 +509,12 @@ idouble: 1
ifloat: 2
# lgamma
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -604,7 +604,7 @@ ifloat: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
index e2091f8..73172b4 100644
--- a/sysdeps/hppa/fpu/libm-test-ulps
+++ b/sysdeps/hppa/fpu/libm-test-ulps
@@ -94,7 +94,7 @@ double: 1
idouble: 1
# ccos
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
@@ -107,10 +107,10 @@ float: 1
ifloat: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
@@ -145,7 +145,7 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
@@ -239,7 +239,7 @@ idouble: 2
ifloat: 2
# csinh
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
@@ -258,7 +258,7 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -266,7 +266,7 @@ double: 1
idouble: 1
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
idouble: 1
@@ -453,12 +453,12 @@ idouble: 1
ifloat: 2
# lgamma
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -513,7 +513,7 @@ ifloat: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index e2091f8..73172b4 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -94,7 +94,7 @@ double: 1
idouble: 1
# ccos
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
@@ -107,10 +107,10 @@ float: 1
ifloat: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
@@ -145,7 +145,7 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
@@ -239,7 +239,7 @@ idouble: 2
ifloat: 2
# csinh
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
@@ -258,7 +258,7 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -266,7 +266,7 @@ double: 1
idouble: 1
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
idouble: 1
@@ -453,12 +453,12 @@ idouble: 1
ifloat: 2
# lgamma
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -513,7 +513,7 @@ ifloat: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps
index e2091f8..73172b4 100644
--- a/sysdeps/powerpc/nofpu/libm-test-ulps
+++ b/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -94,7 +94,7 @@ double: 1
idouble: 1
# ccos
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
@@ -107,10 +107,10 @@ float: 1
ifloat: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
@@ -145,7 +145,7 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
float: 5
idouble: 1
@@ -239,7 +239,7 @@ idouble: 2
ifloat: 2
# csinh
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
double: 1
idouble: 1
Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
@@ -258,7 +258,7 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -266,7 +266,7 @@ double: 1
idouble: 1
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
idouble: 1
@@ -453,12 +453,12 @@ idouble: 1
ifloat: 2
# lgamma
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -513,7 +513,7 @@ ifloat: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c33a5b512436e87dd1f5aa52748fcbce5f23a250
commit c33a5b512436e87dd1f5aa52748fcbce5f23a250
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Mar 22 21:17:47 2003 +0000
Update.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index b8b1d26..b4749d0 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -119,10 +119,10 @@ ildouble: 1
ldouble: 1
# ccos
-Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
float: 1
ifloat: 1
ildouble: 1
@@ -139,10 +139,10 @@ ildouble: 1
ldouble: 1
# ccosh
-Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
-Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
float: 1
ifloat: 1
ildouble: 1
@@ -189,10 +189,10 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
ildouble: 1
ldouble: 1
-Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
@@ -336,10 +336,10 @@ ildouble: 1
ldouble: 1
# csin
-Test "Real part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
+Test "Real part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
float: 1
ifloat: 1
Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
@@ -352,10 +352,10 @@ float: 1
ifloat: 1
# csinh
-Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
float: 1
ifloat: 1
ildouble: 2
@@ -370,10 +370,10 @@ float: 1
ifloat: 1
# ctan
-Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
ildouble: 439
ldouble: 439
-Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
ildouble: 1
ldouble: 1
Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
@@ -384,10 +384,10 @@ ildouble: 2
ldouble: 2
# ctanh
-Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
ildouble: 2
ldouble: 2
-Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
ildouble: 25
ldouble: 25
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
@@ -599,12 +599,12 @@ ldouble: 1
Test "lgamma (0.5) == log(sqrt(pi))":
ildouble: 1
ldouble: 1
-Test "lgamma (0.7) == 0.26086724653166651439":
+Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "lgamma (1.2) == -0.853740900033158497197e-1":
+Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
double: 1
float: 2
idouble: 1
@@ -698,7 +698,7 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "tgamma (0.7) == 1.29805533264755778568":
+Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
double: 1
float: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be1628459d784542a10ab56ca4d6e503b05899f1
commit be1628459d784542a10ab56ca4d6e503b05899f1
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Mar 22 21:00:48 2003 +0000
Superceded by atomic.h.
diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h
deleted file mode 100644
index 4649480..0000000
--- a/sysdeps/m68k/m68020/atomicity.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Low-level functions for atomic operations. m680x0 version, x >= 2.
- Copyright (C) 1997 Free Software Foundation, Inc.
- Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ATOMICITY_H
-#define _ATOMICITY_H 1
-
-#include <inttypes.h>
-
-
-static inline int
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, int val)
-{
- register int result = *mem;
- register int temp;
- __asm__ __volatile__ ("1: move%.l %0,%1;"
- " add%.l %2,%1;"
- " cas%.l %0,%1,%3;"
- " jbne 1b"
- : "=d" (result), "=&d" (temp)
- : "d" (val), "m" (*mem), "0" (result) : "memory");
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- /* XXX Use cas here as well? */
- __asm__ __volatile__ ("add%.l %0,%1"
- : : "id" (val), "m" (*mem) : "memory");
-}
-
-static inline int
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- char ret;
- long int readval;
-
- __asm__ __volatile__ ("cas%.l %2,%3,%1; seq %0"
- : "=dm" (ret), "=m" (*p), "=d" (readval)
- : "d" (newval), "m" (*p), "2" (oldval));
- return ret;
-}
-
-#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9a3227e9cfa3eae979c6a035919ea2b3836c932
commit d9a3227e9cfa3eae979c6a035919ea2b3836c932
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Mar 22 20:59:49 2003 +0000
Atomic operations for m68020 and up.
diff --git a/sysdeps/m68k/m68020/bits/atomic.h b/sysdeps/m68k/m68020/bits/atomic.h
new file mode 100644
index 0000000..09c33c1
--- /dev/null
+++ b/sysdeps/m68k/m68020/bits/atomic.h
@@ -0,0 +1,227 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdint.h>
+
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int16_t atomic16_t;
+typedef uint16_t uatomic16_t;
+typedef int_fast16_t atomic_fast16_t;
+typedef uint_fast16_t uatomic_fast16_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef int64_t atomic64_t;
+typedef uint64_t uatomic64_t;
+typedef int_fast64_t atomic_fast64_t;
+typedef uint_fast64_t uatomic_fast64_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
+ ({ __typeof (*(mem)) __ret; \
+ __asm __volatile ("cas%.b %0,%2,%1" \
+ : "=d" (__ret), "=m" (*(mem)) \
+ : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ __ret; })
+
+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
+ ({ __typeof (*(mem)) __ret; \
+ __asm __volatile ("cas%.w %0,%2,%1" \
+ : "=d" (__ret), "=m" (*(mem)) \
+ : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ __ret; })
+
+#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ __typeof (*(mem)) __ret; \
+ __asm __volatile ("cas%.l %0,%2,%1" \
+ : "=d" (__ret), "=m" (*(mem)) \
+ : "d" (newval), "m" (*(mem)), "0" (oldval)); \
+ __ret; })
+
+# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ ({ __typeof (*(mem)) __ret; \
+ __typeof (mem) __memp = (mem); \
+ __asm __volatile ("cas2%.l %0:%R0,%1:%R1,(%2):(%3)" \
+ : "=d" (__ret) \
+ : "d" (newval), "r" (__memp), \
+ "r" ((char *) __memp + 4), "0" (oldval) \
+ : "memory"); \
+ __ret; })
+
+#define atomic_exchange(mem, newvalue) \
+ ({ __typeof (*(mem)) __result = *(mem); \
+ if (sizeof (*(mem)) == 1) \
+ __asm __volatile ("1: cas%.b %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)) \
+ : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ else if (sizeof (*(mem)) == 2) \
+ __asm __volatile ("1: cas%.w %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)) \
+ : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ else if (sizeof (*(mem)) == 4) \
+ __asm __volatile ("1: cas%.l %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)) \
+ : "d" (newvalue), "m" (*(mem)), "0" (__result)); \
+ else \
+ { \
+ __typeof (mem) __memp = (mem); \
+ __asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \
+ " jbne 1b" \
+ : "=d" (__result) \
+ : "d" (newval), "r" (__memp), \
+ "r" ((char *) __memp + 4), "0" (__result) \
+ : "memory"); \
+ } \
+ __result; })
+
+#define atomic_exchange_and_add(mem, value) \
+ ({ __typeof (*(mem)) __result = *(mem); \
+ __typeof (*(mem)) __temp; \
+ if (sizeof (*(mem)) == 1) \
+ __asm __volatile ("1: move%.b %0,%2;" \
+ " add%.b %3,%2;" \
+ " cas%.b %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)), \
+ "=&d" (__temp) \
+ : "d" (value), "1" (*(mem)), "0" (__result)); \
+ else if (sizeof (*(mem)) == 2) \
+ __asm __volatile ("1: move%.w %0,%2;" \
+ " add%.w %3,%2;" \
+ " cas%.w %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)), \
+ "=&d" (__temp) \
+ : "d" (value), "1" (*(mem)), "0" (__result)); \
+ else if (sizeof (*(mem)) == 4) \
+ __asm __volatile ("1: move%.l %0,%2;" \
+ " add%.l %3,%2;" \
+ " cas%.l %0,%2,%1;" \
+ " jbne 1b" \
+ : "=d" (__result), "=m" (*(mem)), \
+ "=&d" (__temp) \
+ : "d" (value), "1" (*(mem)), "0" (__result)); \
+ else \
+ { \
+ __typeof (mem) __memp = (mem); \
+ __asm __volatile ("1: move%.l %0,%1;" \
+ " move%.l %R0,%R1;" \
+ " add%.l %2,%1;" \
+ " addx%.l %R2,%R1;" \
+ " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \
+ " jbne 1b" \
+ : "=d" (__result), "=&d" (__temp) \
+ : "d" (value), "r" (__memp), \
+ "r" ((char *) __memp + 4), "0" (__result) \
+ : "memory"); \
+ } \
+ __result; })
+
+#define atomic_add(mem, value) \
+ (void) ({ if (sizeof (*(mem)) == 1) \
+ __asm __volatile ("add%.b %1,%0" \
+ : "=m" (*(mem)) \
+ : "id" (value), "0" (*(mem))); \
+ else if (sizeof (*(mem)) == 2) \
+ __asm __volatile ("add%.w %1,%0" \
+ : "=m" (*(mem)) \
+ : "id" (value), "0" (*(mem))); \
+ else if (sizeof (*(mem)) == 4) \
+ __asm __volatile ("add%.l %1,%0" \
+ : "=m" (*(mem)) \
+ : "id" (value), "0" (*(mem))); \
+ else \
+ { \
+ __typeof (mem) __memp = (mem); \
+ __typeof (*(mem)) __oldval = *__memp; \
+ __typeof (*(mem)) __temp; \
+ __asm __volatile ("1: move%.l %0,%1;" \
+ " move%.l %R0,%R1;" \
+ " add%.l %2,%1;" \
+ " addx%.l %R2,%R1;" \
+ " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \
+ " jbne 1b" \
+ : "=d" (__oldval), "=&d" (__temp) \
+ : "d" (value), "r" (__memp), \
+ "r" ((char *) __memp + 4), "0" (__oldval) \
+ : "memory"); \
+ } \
+ })
+
+#define atomic_decrement_and_test(mem) \
+ ({ char __result; \
+ if (sizeof (*(mem)) == 1) \
+ __asm __volatile ("subq%.b %#1,%1; scs %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else if (sizeof (*(mem)) == 2) \
+ __asm __volatile ("subq%.w %#1,%1; scs %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else if (sizeof (*(mem)) == 4) \
+ __asm __volatile ("subq%.l %#1,%1; scs %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "1" (*(mem))); \
+ else \
+ { \
+ __typef (mem) __memp = (mem); \
+ __typeof (*(mem)) __oldval = *__memp; \
+ __typeof (*(mem)) __temp; \
+ __asm __volatile ("1: move%.l %1,%2;" \
+ " move%.l %R1,%R2;" \
+ " subq%.l %#1,%2;" \
+ " subx%.l %5,%R2;" \
+ " scs %0;" \
+ " cas2%.l %1:%R1,%2:%R2,(%3):(%4);" \
+ " jbne 1b" \
+ : "=&dm" (__result), "=d" (__oldval), \
+ "=&d" (__temp) \
+ : "r" (__memp), "r" ((char *) __memp + 4), \
+ "d" (0), "1" (__oldval) \
+ : "memory"); \
+ } \
+ __result; })
+
+#define atomic_bit_set(mem, bit) \
+ __asm __volatile ("bfset %0{%1,#1}" \
+ : "=m" (*(mem)) \
+ : "di" (sizeof (*(mem)) * 8 - (bit) - 1), "m" (*(mem)))
+
+#define atomic_bit_test_set(mem, bit) \
+ ({ char __result; \
+ __asm __volatile ("bfset %1{%2,#1}; sne %0" \
+ : "=dm" (__result), "=m" (*(mem)) \
+ : "di" (sizeof (*(mem)) * 8 - (bit) - 1), \
+ "m" (*(mem))); \
+ __result; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfd77e42b8fc6021cd7f3a224953b6d4f8fa3802
commit cfd77e42b8fc6021cd7f3a224953b6d4f8fa3802
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Mar 22 15:07:05 2003 +0000
* sysdeps/mips/elf/ldsodefs.h: Add mips-specific elf64 relocation
data structures and macros. Protect from multiple inclusion.
diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h
index cabc51d..3868b50 100644
--- a/sysdeps/mips/elf/ldsodefs.h
+++ b/sysdeps/mips/elf/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,9 +17,93 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _MIPS_LDSODEFS_H
+#define _MIPS_LDSODEFS_H
/* The MIPS ABI specifies that the dynamic section has to be read-only. */
#define DL_RO_DYN_SECTION 1
#include_next <ldsodefs.h>
+
+/* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each
+ relocation entry specifies up to three actual relocations, all at
+ the same address. The first relocation which required a symbol
+ uses the symbol in the r_sym field. The second relocation which
+ requires a symbol uses the symbol in the r_ssym field. If all
+ three relocations require a symbol, the third one uses a zero
+ value.
+
+ We define these structures in internal headers because we're not
+ sure we want to make them part of the ABI yet. Eventually, some of
+ this may move into elf/elf.h. */
+
+/* An entry in a 64 bit SHT_REL section. */
+
+typedef struct
+{
+ Elf32_Word r_sym; /* Symbol index */
+ unsigned char r_ssym; /* Special symbol for 2nd relocation */
+ unsigned char r_type3; /* 3rd relocation type */
+ unsigned char r_type2; /* 2nd relocation type */
+ unsigned char r_type1; /* 1st relocation type */
+} _Elf64_Mips_R_Info;
+
+typedef union
+{
+ Elf64_Xword r_info_number;
+ _Elf64_Mips_R_Info r_info_fields;
+} _Elf64_Mips_R_Info_union;
+
+typedef struct
+{
+ Elf64_Addr r_offset; /* Address */
+ _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
+} Elf64_Mips_Rel;
+
+typedef struct
+{
+ Elf64_Addr r_offset; /* Address */
+ _Elf64_Mips_R_Info_union r_info; /* Relocation type and symbol index */
+ Elf64_Sxword r_addend; /* Addend */
+} Elf64_Mips_Rela;
+
+#define ELF64_MIPS_R_SYM(i) \
+ ((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)
+#define ELF64_MIPS_R_TYPE(i) \
+ (((_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_type1 \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_type2 << 8) \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_type3 << 16) \
+ | ((Elf32_Word)(__extension__ (_Elf64_Mips_R_Info_union)(i) \
+ ).r_info_fields.r_ssym << 24))
+#define ELF64_MIPS_R_INFO(sym, type) \
+ (__extension__ (_Elf64_Mips_R_Info_union) \
+ (__extension__ (_Elf64_Mips_R_Info) \
+ { (sym), ELF64_MIPS_R_SSYM (type), \
+ ELF64_MIPS_R_TYPE3 (type), \
+ ELF64_MIPS_R_TYPE2 (type), \
+ ELF64_MIPS_R_TYPE1 (type) \
+ }).r_info_number)
+/* These macros decompose the value returned by ELF64_MIPS_R_TYPE, and
+ compose it back into a value that it can be used as an argument to
+ ELF64_MIPS_R_INFO. */
+#define ELF64_MIPS_R_SSYM(i) (((i) >> 24) & 0xff)
+#define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff)
+#define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff)
+#define ELF64_MIPS_R_TYPE1(i) ((i) & 0xff)
+#define ELF64_MIPS_R_TYPEENC(type1, type2, type3, ssym) \
+ ((type1) \
+ | ((Elf32_Word)(type2) << 8) \
+ | ((Elf32_Word)(type3) << 16) \
+ | ((Elf32_Word)(ssym) << 24))
+
+#undef ELF64_R_SYM
+#define ELF64_R_SYM(i) ELF64_MIPS_R_SYM (i)
+#undef ELF64_R_TYPE
+#define ELF64_R_TYPE(i) ELF64_MIPS_R_TYPE (i)
+#undef ELF64_R_INFO
+#define ELF64_R_INFO(sym, type) ELF64_MIPS_R_INFO ((sym), (type))
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=721e2474d60830416b95a1a73e5d15280210f916
commit 721e2474d60830416b95a1a73e5d15280210f916
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Sat Mar 22 12:50:46 2003 +0000
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Fix harmless
typo in #if test.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c7031dc..f644441 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -130,7 +130,7 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#ifdef _ABI64 && _MIPS_SIM == _ABI64
+#if defined _ABI64 && _MIPS_SIM == _ABI64
# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
#else
# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b15a211808e92234b984fd9c4c71af90eb9ade3
commit 2b15a211808e92234b984fd9c4c71af90eb9ade3
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 21 21:39:39 2003 +0000
* sysdeps/mips/mips64/memcpy.S: Fix porting bug that broke
unaligned copying of 8-15 bytes. From Chris Demetriou
<cgd@broadcom.com>. Fix label names.
* sysdeps/mips/mips64/memset.S: Fix label names. Make similar
change as to memcpy.S.
* sysdeps/mips/memcpy.S: Formatting changes.
* sysdeps/mips/memset.S: Likewise.
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 1e9130f..05d2097 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -54,12 +54,14 @@ ENTRY (memcpy)
SWHI t0, 0(a0)
addu a0, t1
-L(chk8w): andi t0, a2, 0x1f # 32 or more bytes left?
+L(chk8w):
+ andi t0, a2, 0x1f # 32 or more bytes left?
beq t0, a2, L(chk1w)
subu a3, a2, t0 # Yes
addu a3, a1 # a3 = end address of loop
move a2, t0 # a2 = what will be left after loop
-L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time
+L(lop8w):
+ lw t0, 0(a1) # Loop taking 8 words at a time
lw t1, 4(a1)
lw t2, 8(a1)
lw t3, 12(a1)
@@ -79,28 +81,34 @@ L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time
bne a1, a3, L(lop8w)
sw t7, -4(a0)
-L(chk1w): andi t0, a2, 0x3 # 4 or more bytes left?
+L(chk1w):
+ andi t0, a2, 0x3 # 4 or more bytes left?
beq t0, a2, L(last8)
subu a3, a2, t0 # Yes, handle them one word at a time
addu a3, a1 # a3 again end address
move a2, t0
-L(lop1w): lw t0, 0(a1)
+L(lop1w):
+ lw t0, 0(a1)
addiu a0, 4
addiu a1, 4
bne a1, a3, L(lop1w)
sw t0, -4(a0)
-L(last8): blez a2, L(lst8e) # Handle last 8 bytes, one at a time
+L(last8):
+ blez a2, L(lst8e) # Handle last 8 bytes, one at a time
addu a3, a2, a1
-L(lst8l): lb t0, 0(a1)
+L(lst8l):
+ lb t0, 0(a1)
addiu a0, 1
addiu a1, 1
bne a1, a3, L(lst8l)
sb t0, -1(a0)
-L(lst8e): jr ra # Bye, bye
+L(lst8e):
+ jr ra # Bye, bye
nop
-L(shift): subu a3, zero, a0 # Src and Dest unaligned
+L(shift):
+ subu a3, zero, a0 # Src and Dest unaligned
andi a3, 0x3 # (unoptimized case...)
beq a3, zero, L(shft1)
subu a2, a3 # a2 = bytes left
@@ -109,16 +117,18 @@ L(shift): subu a3, zero, a0 # Src and Dest unaligned
addu a1, a3
SWHI t0, 0(a0)
addu a0, a3
-L(shft1): andi t0, a2, 0x3
+L(shft1):
+ andi t0, a2, 0x3
subu a3, a2, t0
addu a3, a1
-L(shfth): LWHI t1, 0(a1) # Limp through, word by word
+L(shfth):
+ LWHI t1, 0(a1) # Limp through, word by word
LWLO t1, 3(a1)
addiu a0, 4
addiu a1, 4
bne a1, a3, L(shfth)
sw t1, -4(a0)
- b L(last8) # Handle anything which may be left
+ b L(last8) # Handle anything which may be left
move a2, t0
.set reorder
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index b372d29..f120123 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -43,35 +43,42 @@ ENTRY (memset)
sll t0, a1, 16
or a1, t0 # a1 is now pattern in full word
-L(ueven): subu t0, zero, a0 # Unaligned address?
+L(ueven):
+ subu t0, zero, a0 # Unaligned address?
andi t0, 0x3
beq t0, zero, L(chkw)
subu a2, t0
SWHI a1, 0(a0) # Yes, handle first unaligned part
addu a0, t0 # Now both a0 and a2 are updated
-L(chkw): andi t0, a2, 0x7 # Enough left for one loop iteration?
+L(chkw):
+ andi t0, a2, 0x7 # Enough left for one loop iteration?
beq t0, a2, L(chkl)
subu a3, a2, t0
addu a3, a0 # a3 is last loop address +1
move a2, t0 # a2 is now # of bytes left after loop
-L(loopw): addiu a0, 8 # Handle 2 words pr. iteration
+L(loopw):
+ addiu a0, 8 # Handle 2 words pr. iteration
sw a1, -8(a0)
bne a0, a3, L(loopw)
sw a1, -4(a0)
-L(chkl): andi t0, a2, 0x4 # Check if there is at least a full
+L(chkl):
+ andi t0, a2, 0x4 # Check if there is at least a full
beq t0, zero, L(last8) # word remaining after the loop
subu a2, t0
sw a1, 0(a0) # Yes...
addiu a0, 4
-L(last8): blez a2, L(exit) # Handle last 8 bytes (if cnt>0)
+L(last8):
+ blez a2, L(exit) # Handle last 8 bytes (if cnt>0)
addu a3, a2, a0 # a3 is last address +1
-L(lst8l): addiu a0, 1
+L(lst8l):
+ addiu a0, 1
bne a0, a3, L(lst8l)
sb a1, -1(a0)
-L(exit): j ra # Bye, bye
+L(exit):
+ j ra # Bye, bye
nop
.set reorder
diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S
index 3dbb31f..c4ba7a8 100644
--- a/sysdeps/mips/mips64/memcpy.S
+++ b/sysdeps/mips/mips64/memcpy.S
@@ -42,8 +42,8 @@
ENTRY (memcpy)
.set noreorder
- slti a4, a2, 8 # Less than 8?
- bne a4, zero, L(last8)
+ slti a4, a2, 16 # Less than 16?
+ bne a4, zero, L(last16)
move v0, a0 # Setup exit value before too late
xor a4, a1, a0 # Find a0/a1 displacement
@@ -86,53 +86,53 @@ L(lop8w):
sd t7, -8(a0)
L(chk1w):
- andi a4, a2, 0x7 # 4 or more bytes left?
- beq a4, a2, L(last8)
- PTR_SUBU a3, a2, a4 # Yes, handle them one word at a time
+ andi a4, a2, 0x7 # 8 or more bytes left?
+ beq a4, a2, L(last16)
+ PTR_SUBU a3, a2, a4 # Yes, handle them one dword at a time
PTR_ADDU a3, a1 # a3 again end address
move a2, a4
-L(lop1w):
+L(lop1w):
ld a4, 0(a1)
PTR_ADDIU a0, 8
PTR_ADDIU a1, 8
bne a1, a3, L(lop1w)
sd a4, -8(a0)
-L(last8):
- blez a2, L(lst8e) # Handle last 8 bytes, one at a time
+L(last16):
+ blez a2, L(lst16e) # Handle last 16 bytes, one at a time
PTR_ADDU a3, a2, a1
-L(lst8l):
+L(lst16l):
lb a4, 0(a1)
PTR_ADDIU a0, 1
PTR_ADDIU a1, 1
- bne a1, a3, L(lst8l)
+ bne a1, a3, L(lst16l)
sb a4, -1(a0)
-L(lst8e):
+L(lst16e):
jr ra # Bye, bye
nop
L(shift):
PTR_SUBU a3, zero, a0 # Src and Dest unaligned
andi a3, 0x7 # (unoptimized case...)
- beq a3, zero, L(shfa5)
+ beq a3, zero, L(shft1)
PTR_SUBU a2, a3 # a2 = bytes left
LDHI a4, 0(a1) # Take care of first odd part
LDLO a4, 7(a1)
PTR_ADDU a1, a3
SDHI a4, 0(a0)
PTR_ADDU a0, a3
-L(shfa5):
+L(shft1):
andi a4, a2, 0x7
PTR_SUBU a3, a2, a4
PTR_ADDU a3, a1
L(shfth):
- LDHI a5, 0(a1) # Limp through, word by word
+ LDHI a5, 0(a1) # Limp through, dword by dword
LDLO a5, 7(a1)
PTR_ADDIU a0, 8
PTR_ADDIU a1, 8
bne a1, a3, L(shfth)
sd a5, -8(a0)
- b L(last8) # Handle anything which may be left
+ b L(last16) # Handle anything which may be left
move a2, a4
.set reorder
diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S
index 6a3b154..d6e1790 100644
--- a/sysdeps/mips/mips64/memset.S
+++ b/sysdeps/mips/mips64/memset.S
@@ -36,8 +36,8 @@
ENTRY (memset)
.set noreorder
- slti t5, a2, 8 # Less than 8?
- bne t5, zero, L(last8)
+ slti t5, a2, 16 # Less than 16?
+ bne t5, zero, L(last16)
move v0, a0 # Setup exit value before too late
beq a1, zero, L(ueven) # If zero pattern, no need to extend
@@ -64,24 +64,24 @@ L(chkw):
PTR_ADDU a3, a0 # a3 is last loop address +1
move a2, t4 # a2 is now # of bytes left after loop
L(loopw):
- PTR_ADDIU a0, 16 # Handle 2 words pr. iteration
+ PTR_ADDIU a0, 16 # Handle 2 dwords pr. iteration
sd a1, -16(a0)
bne a0, a3, L(loopw)
sd a1, -8(a0)
L(chkl):
andi t4, a2, 0x8 # Check if there is at least a double
- beq t4, zero, L(last8) # word remaining after the loop
+ beq t4, zero, L(last16) # word remaining after the loop
PTR_SUBU a2, t4
sd a1, 0(a0) # Yes...
PTR_ADDIU a0, 8
-L(last8):
- blez a2, L(exit) # Handle last 8 bytes (if cnt>0)
+L(last16):
+ blez a2, L(exit) # Handle last 16 bytes (if cnt>0)
PTR_ADDU a3, a2, a0 # a3 is last address +1
-L(lst8l):
+L(lst16l):
PTR_ADDIU a0, 1
- bne a0, a3, L(lst8l)
+ bne a0, a3, L(lst16l)
sb a1, -1(a0)
L(exit):
j ra # Bye, bye
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4208b5c7710e2a6da54f163a173a56393d1ed620
commit 4208b5c7710e2a6da54f163a173a56393d1ed620
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 21 20:51:59 2003 +0000
2003-03-21 Roland McGrath <roland@redhat.com>
* sysdeps/arm/sysdep.h (CALL_MCOUNT): Add trailing semicolon.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 8d5ab95..4bc7d82 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,7 +76,7 @@
#define CALL_MCOUNT \
str lr,[sp, #-4]! ; \
bl PLTJMP(mcount) ; \
- ldr lr, [sp], #4
+ ldr lr, [sp], #4 ;
#else
#define CALL_MCOUNT /* Do nothing. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f15520df9c1dec61192ae3b4c5ac0e42f58af04
commit 2f15520df9c1dec61192ae3b4c5ac0e42f58af04
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 21 20:49:58 2003 +0000
2003-03-21 Daniel Jacobowitz <drow@mvista.com>
* sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
(SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 38e472d..47af280 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -110,7 +110,7 @@ extern int __local_multiple_threads attribute_hidden;
ldr reg, 2b; \
3: \
add ip, pc, ip; \
- ldr ip, [ip, lr]; \
+ ldr ip, [ip, reg]; \
teq ip, #0;
# define SINGLE_THREAD_P_INT \
str lr, [sp, $-4]!; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=500308e11d71fb512ef05708858f9e8ef66d9a8a
commit 500308e11d71fb512ef05708858f9e8ef66d9a8a
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 21 19:44:24 2003 +0000
* sysdeps/mips/mips64/memcpy.S, sysdeps/mips/mips64/memset.S: New.
* sysdeps/mips/memcpy.S, sysdeps/mips/memset.S: Update comments.
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index c77f1b8..1e9130f 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -21,12 +21,7 @@
#include <endian.h>
-/* void *memcpy(void *s1, const void *s2, size_t n);
-
- This routine could be optimized further for MIPS64, but this is left
- as an exercise for the future. When it is done, the file should be kept
- as a sisterfile to this one, and placed in the sysdeps/mips/mips64
- directory. */
+/* void *memcpy(void *s1, const void *s2, size_t n); */
#if __BYTE_ORDER == __BIG_ENDIAN
# define LWHI lwl /* high part is left in big-endian */
@@ -40,19 +35,6 @@
# define SWLO swl /* low part is left in little-endian */
#endif
-#ifndef t0
-# define t0 a4
-#endif
-#ifndef t1
-# define t1 a5
-#endif
-#ifndef t2
-# define t2 a6
-#endif
-#ifndef t3
-# define t3 a7
-#endif
-
ENTRY (memcpy)
.set noreorder
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index 4681134..b372d29 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -21,12 +21,7 @@
#include <endian.h>
-/* void *memset(void *s, int c, size_t n).
-
- This routine could be optimized further for MIPS64, but this is left
- as an exercise for the future. When it is done, the file should be kept
- as a sisterfile to this one, and placed in the sysdeps/mips/mips64
- directory. */
+/* void *memset(void *s, int c, size_t n). */
#if __BYTE_ORDER == __BIG_ENDIAN
# define SWHI swl /* high part is left in big-endian */
@@ -34,13 +29,6 @@
# define SWHI swr /* high part is right in little-endian */
#endif
-#ifndef t0
-# define t0 a4
-#endif
-#ifndef t1
-# define t1 a5
-#endif
-
ENTRY (memset)
.set noreorder
diff --git a/sysdeps/mips/mips64/memcpy.S b/sysdeps/mips/mips64/memcpy.S
new file mode 100644
index 0000000..3dbb31f
--- /dev/null
+++ b/sysdeps/mips/mips64/memcpy.S
@@ -0,0 +1,139 @@
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+ Ported to mips3 n32/n64 by Alexandre Oliva <aoliva@redhat.com>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <endian.h>
+#include <sys/asm.h>
+
+
+/* void *memcpy(void *s1, const void *s2, size_t n);
+
+ This could probably be optimized further. */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define LDHI ldl /* high part is left in big-endian */
+# define SDHI sdl /* high part is left in big-endian */
+# define LDLO ldr /* low part is right in big-endian */
+# define SDLO sdr /* low part is right in big-endian */
+#else
+# define LDHI ldr /* high part is right in little-endian */
+# define SDHI sdr /* high part is right in little-endian */
+# define LDLO ldl /* low part is left in little-endian */
+# define SDLO sdl /* low part is left in little-endian */
+#endif
+
+ENTRY (memcpy)
+ .set noreorder
+
+ slti a4, a2, 8 # Less than 8?
+ bne a4, zero, L(last8)
+ move v0, a0 # Setup exit value before too late
+
+ xor a4, a1, a0 # Find a0/a1 displacement
+ andi a4, 0x7
+ bne a4, zero, L(shift) # Go handle the unaligned case
+ PTR_SUBU a5, zero, a1
+ andi a5, 0x7 # a0/a1 are aligned, but are we
+ beq a5, zero, L(chk8w) # starting in the middle of a word?
+ PTR_SUBU a2, a5
+ LDHI a4, 0(a1) # Yes we are... take care of that
+ PTR_ADDU a1, a5
+ SDHI a4, 0(a0)
+ PTR_ADDU a0, a5
+
+L(chk8w):
+ andi a4, a2, 0x3f # 64 or more bytes left?
+ beq a4, a2, L(chk1w)
+ PTR_SUBU a3, a2, a4 # Yes
+ PTR_ADDU a3, a1 # a3 = end address of loop
+ move a2, a4 # a2 = what will be left after loop
+L(lop8w):
+ ld a4, 0(a1) # Loop taking 8 words at a time
+ ld a5, 8(a1)
+ ld a6, 16(a1)
+ ld a7, 24(a1)
+ ld t4, 32(a1)
+ ld t5, 40(a1)
+ ld t6, 48(a1)
+ ld t7, 56(a1)
+ PTR_ADDIU a0, 64
+ PTR_ADDIU a1, 64
+ sd a4, -64(a0)
+ sd a5, -56(a0)
+ sd a6, -48(a0)
+ sd a7, -40(a0)
+ sd t4, -32(a0)
+ sd t5, -24(a0)
+ sd t6, -16(a0)
+ bne a1, a3, L(lop8w)
+ sd t7, -8(a0)
+
+L(chk1w):
+ andi a4, a2, 0x7 # 4 or more bytes left?
+ beq a4, a2, L(last8)
+ PTR_SUBU a3, a2, a4 # Yes, handle them one word at a time
+ PTR_ADDU a3, a1 # a3 again end address
+ move a2, a4
+L(lop1w):
+ ld a4, 0(a1)
+ PTR_ADDIU a0, 8
+ PTR_ADDIU a1, 8
+ bne a1, a3, L(lop1w)
+ sd a4, -8(a0)
+
+L(last8):
+ blez a2, L(lst8e) # Handle last 8 bytes, one at a time
+ PTR_ADDU a3, a2, a1
+L(lst8l):
+ lb a4, 0(a1)
+ PTR_ADDIU a0, 1
+ PTR_ADDIU a1, 1
+ bne a1, a3, L(lst8l)
+ sb a4, -1(a0)
+L(lst8e):
+ jr ra # Bye, bye
+ nop
+
+L(shift):
+ PTR_SUBU a3, zero, a0 # Src and Dest unaligned
+ andi a3, 0x7 # (unoptimized case...)
+ beq a3, zero, L(shfa5)
+ PTR_SUBU a2, a3 # a2 = bytes left
+ LDHI a4, 0(a1) # Take care of first odd part
+ LDLO a4, 7(a1)
+ PTR_ADDU a1, a3
+ SDHI a4, 0(a0)
+ PTR_ADDU a0, a3
+L(shfa5):
+ andi a4, a2, 0x7
+ PTR_SUBU a3, a2, a4
+ PTR_ADDU a3, a1
+L(shfth):
+ LDHI a5, 0(a1) # Limp through, word by word
+ LDLO a5, 7(a1)
+ PTR_ADDIU a0, 8
+ PTR_ADDIU a1, 8
+ bne a1, a3, L(shfth)
+ sd a5, -8(a0)
+ b L(last8) # Handle anything which may be left
+ move a2, a4
+
+ .set reorder
+END (memcpy)
diff --git a/sysdeps/mips/mips64/memset.S b/sysdeps/mips/mips64/memset.S
new file mode 100644
index 0000000..6a3b154
--- /dev/null
+++ b/sysdeps/mips/mips64/memset.S
@@ -0,0 +1,91 @@
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+ Ported to mips3 n32/n64 by Alexandre Oliva <aoliva@redhat.com>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <endian.h>
+#include <sys/asm.h>
+
+
+/* void *memset(void *s, int c, size_t n);
+
+ This could probably be optimized further. */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define SDHI sdl /* high part is left in big-endian */
+#else
+# define SDHI sdr /* high part is right in little-endian */
+#endif
+
+ENTRY (memset)
+ .set noreorder
+
+ slti t5, a2, 8 # Less than 8?
+ bne t5, zero, L(last8)
+ move v0, a0 # Setup exit value before too late
+
+ beq a1, zero, L(ueven) # If zero pattern, no need to extend
+ andi a1, 0xff # Avoid problems with bogus arguments
+ dsll t4, a1, 8
+ or a1, t4
+ dsll t4, a1, 16
+ or a1, t4 # a1 is now pattern in full word
+ dsll t4, a1, 32
+ or a1, t4 # a1 is now pattern in double word
+
+L(ueven):
+ PTR_SUBU t4, zero, a0 # Unaligned address?
+ andi t4, 0x7
+ beq t4, zero, L(chkw)
+ PTR_SUBU a2, t4
+ SDHI a1, 0(a0) # Yes, handle first unaligned part
+ PTR_ADDU a0, t4 # Now both a0 and a2 are updated
+
+L(chkw):
+ andi t4, a2, 0xf # Enough left for one loop iteration?
+ beq t4, a2, L(chkl)
+ PTR_SUBU a3, a2, t4
+ PTR_ADDU a3, a0 # a3 is last loop address +1
+ move a2, t4 # a2 is now # of bytes left after loop
+L(loopw):
+ PTR_ADDIU a0, 16 # Handle 2 words pr. iteration
+ sd a1, -16(a0)
+ bne a0, a3, L(loopw)
+ sd a1, -8(a0)
+
+L(chkl):
+ andi t4, a2, 0x8 # Check if there is at least a double
+ beq t4, zero, L(last8) # word remaining after the loop
+ PTR_SUBU a2, t4
+ sd a1, 0(a0) # Yes...
+ PTR_ADDIU a0, 8
+
+L(last8):
+ blez a2, L(exit) # Handle last 8 bytes (if cnt>0)
+ PTR_ADDU a3, a2, a0 # a3 is last address +1
+L(lst8l):
+ PTR_ADDIU a0, 1
+ bne a0, a3, L(lst8l)
+ sb a1, -1(a0)
+L(exit):
+ j ra # Bye, bye
+ nop
+
+ .set reorder
+END (memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5b668cc8ac96ee35372c7e0df114fc76246d0d7
commit a5b668cc8ac96ee35372c7e0df114fc76246d0d7
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 22:29:44 2003 +0000
* sysdeps/mips/bits/setjmp.h: n32 has only 6 call-saved fpregs.
* sysdeps/mips/mips64/setjmp_aux.c (__sigsetjmp_aux): Adjust.
* sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 562c132..b2ee374 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -60,10 +60,10 @@ typedef struct
int __fpc_csr;
/* Callee-saved floating point registers. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
- double __fpregs[6];
-#else
+#if defined _ABI64 && _MIPS_SIM == _ABI64
double __fpregs[8];
+#else
+ double __fpregs[6];
#endif
} __jmp_buf[1];
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 6523d49..32587d1 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -38,6 +38,7 @@ __longjmp (env, val_arg)
register int val asm ("a1");
/* Pull back the floating point callee-saved registers. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1]));
asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2]));
@@ -46,6 +47,14 @@ __longjmp (env, val_arg)
asm volatile ("l.d $f29, %0" : : "m" (env[0].__fpregs[5]));
asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6]));
asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7]));
+#else
+ asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0]));
+ asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1]));
+ asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[2]));
+ asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3]));
+ asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4]));
+ asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5]));
+#endif
/* Get and reconstruct the floating point csr. */
asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index db75a21..b55a3c6 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -29,6 +29,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
long long gp)
{
/* Store the floating point callee-saved registers... */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
@@ -37,6 +38,14 @@ __sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6]));
asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7]));
+#else
+ asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+ asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
+ asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
+ asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
+ asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
+ asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
+#endif
/* .. and the PC; */
asm volatile ("sd $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe638fda3cee91f808b90a371768e3d44bf88245
commit fe638fda3cee91f808b90a371768e3d44bf88245
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 20:58:02 2003 +0000
* sysdeps/unix/sysv/linux/mips/pread.c: Don't break up offset
into high and low halves on n64.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index e6cb21f..dc278d4 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -42,7 +42,13 @@ static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
# endif
extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
+ int dummy,
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ off_t offset
+#else
+ off_t offset_hi, off_t offset_lo
+#endif
+ );
@@ -59,8 +65,13 @@ __libc_pread (fd, buf, count, offset)
{
/* First try the syscall. */
assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (offset >> 31, offset));
+#endif
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
@@ -73,8 +84,13 @@ __libc_pread (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (offset >> 31, offset));
+#endif
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 36ec100..12c9cc0 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -42,7 +42,13 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
# endif
extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
+ int dummy,
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ off_t offset
+#else
+ off_t offset_hi, off_t offset_lo
+#endif
+ );
@@ -59,9 +65,14 @@ __libc_pread64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
+#endif
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
@@ -73,9 +84,14 @@ __libc_pread64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
+#endif
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index f25e327..1778d07 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -38,7 +38,13 @@
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
+ int dummy,
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ off_t offset
+#else
+ off_t offset_hi, off_t offset_lo
+#endif
+ );
# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
@@ -58,8 +64,13 @@ __libc_pwrite (fd, buf, count, offset)
{
/* First try the syscall. */
assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (offset >> 31, offset));
+ offset);
+#else
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+#endif
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
@@ -73,8 +84,13 @@ __libc_pwrite (fd, buf, count, offset)
/* First try the syscall. */
assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (offset >> 31, offset));
+ offset);
+#else
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+#endif
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 0accc1d..e43a378 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
@@ -37,7 +37,13 @@
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
+ int dummy,
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ off_t offset
+#else
+ off_t offset_hi, off_t offset_lo
+#endif
+ );
# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
@@ -56,9 +62,14 @@ __libc_pwrite64 (fd, buf, count, offset)
if (SINGLE_THREAD_P)
{
/* First try the syscall. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
+#endif
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
@@ -71,9 +82,14 @@ __libc_pwrite64 (fd, buf, count, offset)
int oldtype = LIBC_CANCEL_ASYNC ();
/* First try the syscall. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ offset);
+#else
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
+#endif
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a58876cc71bd11da3f8c70c4e0c18d566bd84eb
commit 1a58876cc71bd11da3f8c70c4e0c18d566bd84eb
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 17:59:45 2003 +0000
* sysdeps/mips/ieee754.h: Remove excess #endif.
diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h
index febae1d..ed13de2 100644
--- a/sysdeps/mips/ieee754.h
+++ b/sysdeps/mips/ieee754.h
@@ -182,7 +182,6 @@ union ieee854_long_double
unsigned int negative:1;
#endif /* Little endian. */
} ieee_nan;
-#endif
};
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19ca28fb3fc99b6eb332ecee1d6425827b3301ac
commit 19ca28fb3fc99b6eb332ecee1d6425827b3301ac
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 10:27:55 2003 +0000
* sysdeps/mips/bits/setjmp.h: Store all N32 and N64 registers,
including pc, gp, sp and fp, as long long.
* sysdeps/mips/mips64/setjmp.S: Pass gp to __sigsetjmp_aux.
* sysdeps/mips/mips64/setjmp_aux.c: Adjust type of arguments.
Add gp argument, and set gp in the jmpbuf to it.
* sysdeps/mips/setjmp_aux.c: Revert to o32-only.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index fa48676..562c132 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -24,6 +24,7 @@
typedef struct
{
+#if _MIPS_SIM == _MIPS_SIM_ABI32
/* Program counter. */
__ptr_t __pc;
@@ -31,17 +32,29 @@ typedef struct
__ptr_t __sp;
/* Callee-saved registers s0 through s7. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
int __regs[8];
-#else
- __extension__ long long __regs[8];
-#endif
/* The frame pointer. */
__ptr_t __fp;
/* The global pointer. */
__ptr_t __gp;
+#else
+ /* Program counter. */
+ __extension__ long long __pc;
+
+ /* Stack pointer. */
+ __extension__ long long __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ __extension__ long long __regs[8];
+
+ /* The frame pointer. */
+ __extension__ long long __fp;
+
+ /* The global pointer. */
+ __extension__ long long __gp;
+#endif
/* Floating point status register. */
int __fpc_csr;
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
index 3d2bf20..d566921 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -37,5 +37,8 @@ ENTRY (__sigsetjmp)
nop
#endif
RESTORE_GP64
+#if _MIPS_SIM != _MIPS_SIM_ABI32
+ move a4, gp
+#endif
jr t9
.end __sigsetjmp
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index 6d1c939..db75a21 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -25,7 +25,8 @@
access them in C. */
int
-__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
+__sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp,
+ long long gp)
{
/* Store the floating point callee-saved registers... */
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
@@ -47,7 +48,7 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
env[0].__jmpbuf[0].__fp = fp;
/* .. and the GP; */
- asm volatile ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
+ env[0].__jmpbuf[0].__gp = gp;
/* .. and the callee-saved registers; */
asm volatile ("sd $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index 9e6766f..7125cc4 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -18,11 +18,6 @@
02111-1307 USA. */
#include <setjmp.h>
-#include <sys/asm.h>
-
-#define STRINGXP(X) __STRING(X)
-#define REGS STRINGXP(REG_S)
-#define PTRS STRINGXP(PTR_S)
/* This function is only called via the assembly language routine
__sigsetjmp, which arranges to pass in the stack pointer and the frame
@@ -33,26 +28,15 @@ int
__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
{
/* Store the floating point callee-saved registers... */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
-#else
- asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
- asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
- asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
- asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
- asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
- asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
- asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6]));
- asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7]));
-#endif
/* .. and the PC; */
- asm volatile (PTRS " $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
+ asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
/* .. and the stack pointer; */
env[0].__jmpbuf[0].__sp = (void *) sp;
@@ -61,17 +45,17 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
env[0].__jmpbuf[0].__fp = (void *) fp;
/* .. and the GP; */
- asm volatile (PTRS " $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
+ asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
/* .. and the callee-saved registers; */
- asm volatile (REGS " $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
- asm volatile (REGS " $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
- asm volatile (REGS " $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
- asm volatile (REGS " $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
- asm volatile (REGS " $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
- asm volatile (REGS " $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
- asm volatile (REGS " $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
- asm volatile (REGS " $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
+ asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
+ asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
+ asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
+ asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
+ asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
+ asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
+ asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
+ asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
/* .. and finally get and reconstruct the floating point csr. */
asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8a1e840a144cad5fed50fa6aed7d0424fceca6b
commit a8a1e840a144cad5fed50fa6aed7d0424fceca6b
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 07:54:56 2003 +0000
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: Sign-extend
with a single instruction.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
index ed3b407..7b14089 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
@@ -26,8 +26,7 @@
.text
ENTRY (__ioctl)
li v0, __NR_ioctl
- dsll a1,a1,32
- dsra a1,a1,32
+ sll a1,a1,0
syscall /* Do the system call. */
bne a3, zero, L(error)
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d06657c5313e9b55cd0f3f6580ff3a6d9ca68b2
commit 3d06657c5313e9b55cd0f3f6580ff3a6d9ca68b2
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 07:54:21 2003 +0000
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define
properly for n64.
(elf_machine_runtime_setup): Cast link_map pointer to Elf Addr
type.
(elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf
Word before comparing with gotsym. Take reloc_addr argument as
void*. Remove the code added for the compiler to drop any
alignment assumptions.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 62c3f20..c7031dc 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -130,7 +130,11 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+#ifdef _ABI64 && _MIPS_SIM == _ABI64
+# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
+#else
+# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
+#endif
/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope
fiddles with global data. */
@@ -530,7 +534,10 @@ static inline void
#endif
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
- ElfW(Addr) *const reloc_addr)
+ /* We use void* because the location to be relocated
+ is not required to be properly aligned for a
+ ELFW(Addr). */
+ void /* ElfW(Addr) */ *const reloc_addr)
{
const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
@@ -565,7 +572,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Word) gotsym
= (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
- if (symidx < gotsym)
+ if ((ElfW(Word))symidx < gotsym)
{
/* This wouldn't work for a symbol imported from other
libraries for which there's no GOT entry, but MIPS
@@ -633,7 +640,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
static inline void
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- ElfW(Addr) *const reloc_addr)
+ void /* ElfW(Addr) */ *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
@@ -758,7 +765,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
of got[1] of a gnu object is set to identify gnu objects.
Where we can store l for non gnu objects? XXX */
if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ got[1] = ((ElfW(Addr)) l | ELF_MIPS_GNU_GOT1_MASK);
else
_dl_mips_gnu_objects = 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79bd05645769c3494d434977a4672f2a3d67f312
commit 79bd05645769c3494d434977a4672f2a3d67f312
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Thu Mar 20 00:39:32 2003 +0000
* sysdeps/mips/ieee754.h: New file, suitable to replace both
../ieee754/ieee754.h and ../ieee754/ldbl-128/ieee754.h, kept
mips-specific for now.
diff --git a/sysdeps/mips/ieee754.h b/sysdeps/mips/ieee754.h
new file mode 100644
index 0000000..febae1d
--- /dev/null
+++ b/sysdeps/mips/ieee754.h
@@ -0,0 +1,326 @@
+/* Copyright (C) 1992, 1995, 1996, 1999, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _IEEE754_H
+
+#define _IEEE754_H 1
+#include <features.h>
+
+#include <endian.h>
+
+#include <float.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int mantissa:23;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa:22;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif /* Little endian. */
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#if LDBL_MANT_DIG == 113
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 quad-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:16;
+ unsigned int mantissa1:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa3:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa3:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:16;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:15;
+ unsigned int mantissa1:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa3:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa3:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:15;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+#endif
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
+
+#elif LDBL_MANT_DIG == 64
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:32;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee;
+
+ /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int one:1;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa0:30;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+#elif LDBL_MANT_DIG == 53
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif /* Little endian. */
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#endif /* LDBL_MANT_DIG == 53 */
+
+__END_DECLS
+
+#endif /* ieee754.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be1222911f4d5700d64b006e3c131711c26a9353
commit be1222911f4d5700d64b006e3c131711c26a9353
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 16:20:44 2003 +0000
* sysdeps/mips/mips64/Implies: Move wordsize-64 to...
* sysdeps/mips/mips64/n64/Implies: New file.
* sysdeps/mips/mips64/n64/Makefile: New file.
* sysdeps/mips/mips64/n64/el/bits/endian.h: New file.
* sysdeps/mips/mips64/n32/Implies: New file.
* sysdeps/mips/mips64/n32/Makefile: New file.
* sysdeps/mips/mips64/n32/el/bits/endian.h: New file.
* sysdeps/unix/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h: New file.
* sysdeps/unix/sysv/linux/mips/mips64/llseek.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/recv.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/send.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscall.S: New file.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: New file.
* sysdeps/unix/sysv/linux/mips/mips64/umount.c: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: New file.
diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies
index 25106df..8c18cb3 100644
--- a/sysdeps/mips/mips64/Implies
+++ b/sysdeps/mips/mips64/Implies
@@ -1,4 +1,3 @@
-wordsize-64
# MIPS uses IEEE 754 floating point.
ieee754/flt-32
ieee754/dbl-64
diff --git a/sysdeps/mips/mips64/n32/Implies b/sysdeps/mips/mips64/n32/Implies
new file mode 100644
index 0000000..b2072be
--- /dev/null
+++ b/sysdeps/mips/mips64/n32/Implies
@@ -0,0 +1,4 @@
+mips/mips64
+mips
+wordsize-32
+ieee754/ldbl-128
diff --git a/sysdeps/mips/mips64/n32/Makefile b/sysdeps/mips/mips64/n32/Makefile
new file mode 100644
index 0000000..26f3857
--- /dev/null
+++ b/sysdeps/mips/mips64/n32/Makefile
@@ -0,0 +1,2 @@
+# `long double' is a distinct type we support.
+long-double-fcts = yes
diff --git a/sysdeps/mips/mips64/n32/el/bits/endian.h b/sysdeps/mips/mips64/n32/el/bits/endian.h
new file mode 100644
index 0000000..2241190
--- /dev/null
+++ b/sysdeps/mips/mips64/n32/el/bits/endian.h
@@ -0,0 +1,8 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using little-endian mode. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/mips64/n64/Implies b/sysdeps/mips/mips64/n64/Implies
new file mode 100644
index 0000000..5e88e3a
--- /dev/null
+++ b/sysdeps/mips/mips64/n64/Implies
@@ -0,0 +1,4 @@
+mips/mips64
+mips
+wordsize-64
+ieee754/ldbl-128
diff --git a/sysdeps/mips/mips64/n64/Makefile b/sysdeps/mips/mips64/n64/Makefile
new file mode 100644
index 0000000..26f3857
--- /dev/null
+++ b/sysdeps/mips/mips64/n64/Makefile
@@ -0,0 +1,2 @@
+# `long double' is a distinct type we support.
+long-double-fcts = yes
diff --git a/sysdeps/mips/mips64/n64/el/bits/endian.h b/sysdeps/mips/mips64/n64/el/bits/endian.h
new file mode 100644
index 0000000..2241190
--- /dev/null
+++ b/sysdeps/mips/mips64/n64/el/bits/endian.h
@@ -0,0 +1,8 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using little-endian mode. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/unix/mips/mips64/n32/sysdep.h b/sysdeps/unix/mips/mips64/n32/sysdep.h
new file mode 100644
index 0000000..3564c6b
--- /dev/null
+++ b/sysdeps/unix/mips/mips64/n32/sysdep.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/unix/mips/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+# undef PSEUDO
+/* Note that while it's better structurally, going back to call __syscall_error
+ can make things confusing if you're debugging---it looks like it's jumping
+ backwards into the previous fn. */
+#ifdef __PIC__
+#define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ 99:; \
+ .set noat; \
+ .cpsetup t9, $1, name; \
+ .set at; \
+ la t9,__syscall_error; \
+ .cpreturn; \
+ jr t9; \
+ ENTRY(name) \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ bne a3, zero, 99b; \
+L(syse1):
+#else
+#define PSEUDO(name, syscall_name, args) \
+ .set noreorder; \
+ .align 2; \
+ 99: j __syscall_error; \
+ ENTRY(name) \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, 99b; \
+L(syse1):
+#endif
+
+#endif
diff --git a/sysdeps/unix/mips/mips64/n64/sysdep.h b/sysdeps/unix/mips/mips64/n64/sysdep.h
new file mode 100644
index 0000000..982d905
--- /dev/null
+++ b/sysdeps/unix/mips/mips64/n64/sysdep.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/unix/mips/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+# undef PSEUDO
+/* Note that while it's better structurally, going back to call __syscall_error
+ can make things confusing if you're debugging---it looks like it's jumping
+ backwards into the previous fn. */
+#ifdef __PIC__
+#define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ 99:; \
+ .set noat; \
+ .cpsetup t9, $1, name; \
+ .set at; \
+ dla t9,__syscall_error; \
+ .cpreturn; \
+ jr t9; \
+ ENTRY(name) \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ bne a3, zero, 99b; \
+L(syse1):
+#else
+#define PSEUDO(name, syscall_name, args) \
+ .set noreorder; \
+ .align 2; \
+ 99: j __syscall_error; \
+ ENTRY(name) \
+ .set noreorder; \
+ li v0, SYS_ify(syscall_name); \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, 99b; \
+L(syse1):
+#endif
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h
new file mode 100644
index 0000000..d490fb9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/ldconfig.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/generic/ldconfig.h>
+
+#define SYSDEP_KNOWN_INTERPRETER_NAMES \
+ { "/lib32/ld.so.1", FLAG_ELF_LIBC6 }, \
+ { "/lib64/ld.so.1", FLAG_ELF_LIBC6 },
+#define SYSDEP_KNOWN_LIBRARY_NAMES \
+ { "libc.so.6", FLAG_ELF_LIBC6 }, \
+ { "libm.so.6", FLAG_ELF_LIBC6 },
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/llseek.c b/sysdeps/unix/sysv/linux/mips/mips64/llseek.c
new file mode 100644
index 0000000..24013a8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/llseek.c
@@ -0,0 +1 @@
+/* lseek() is 64-bit capable already. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
new file mode 100644
index 0000000..55a405c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
@@ -0,0 +1,263 @@
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINUX_MIPS_SYSDEP_H
+#define _LINUX_MIPS_SYSDEP_H 1
+
+/* There is some commonality. */
+#include <sysdeps/unix/mips/mips64/n32/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_N32_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
+#endif
+
+
+#ifndef __ASSEMBLER__
+#if 0 /* untested */
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ INTERNAL_SYSCALL_DECL(err); \
+ long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
+ result_var = -1L; \
+ } \
+ result_var; })
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) long err
+
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+
+#define internal_syscall0(name, err, dummy...) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %2\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall1(name, err, arg1) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %3\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall2(name, err, arg1, arg2) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %4\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall3(name, err, arg1, arg2, arg3) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a3 asm("$7") = (long long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a3 asm("$7") = (long long) arg4; \
+ register long long __a4 asm("$8") = (long long) arg5; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a4) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a3 asm("$7") = (long long) arg4; \
+ register long long __a4 asm("$8") = (long long) arg5; \
+ register long long __a5 asm("$9") = (long long) arg6; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a5), "r" (__a6) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long long __v0 asm("$2"); \
+ register long long __a0 asm("$4") = (long long) arg1; \
+ register long long __a1 asm("$5") = (long long) arg2; \
+ register long long __a2 asm("$6") = (long long) arg3; \
+ register long long __a3 asm("$7") = (long long) arg4; \
+ register long long __a4 asm("$8") = (long long) arg5; \
+ register long long __a5 asm("$9") = (long long) arg6; \
+ register long long __a6 asm("$10") = (long long) arg7; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a5), "r" (__a6), "r" (__a7) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#endif /* untested */
+#endif /* __ASSEMBLER__ */
+
+#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
new file mode 100644
index 0000000..33918ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
@@ -0,0 +1 @@
+/* glob64 is in glob.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
new file mode 100644
index 0000000..ed3b407
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
@@ -0,0 +1,43 @@
+/* Copyright 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#include <sys/asm.h>
+
+/* Sign-extend the ioctl number, since the kernel wants it as a
+ sign-extended 32-bit value, but our prototype is that of a long. */
+
+ .text
+ENTRY (__ioctl)
+ li v0, __NR_ioctl
+ dsll a1,a1,32
+ dsra a1,a1,32
+ syscall /* Do the system call. */
+ bne a3, zero, L(error)
+ ret
+
+L(error):
+ .cpsetup t9, a0, __ioctl
+ PTR_LA t9,__syscall_error
+ .cprestore
+ jr t9
+
+PSEUDO_END (__ioctl)
+
+weak_alias (__ioctl, ioctl)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
new file mode 100644
index 0000000..401470b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -0,0 +1,263 @@
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINUX_MIPS_SYSDEP_H
+#define _LINUX_MIPS_SYSDEP_H 1
+
+/* There is some commonality. */
+#include <sysdeps/unix/mips/mips64/n64/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_N64_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
+#endif
+
+
+#ifndef __ASSEMBLER__
+#if 0 /* untested */
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ INTERNAL_SYSCALL_DECL(err); \
+ long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
+ result_var = -1L; \
+ } \
+ result_var; })
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) long err
+
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+
+#define internal_syscall0(name, err, dummy...) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %2\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall1(name, err, arg1) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %3\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall2(name, err, arg1, arg2) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %4\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall3(name, err, arg1, arg2, arg3) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ register long __a4 asm("$8") = (long) arg5; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a4) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ register long __a4 asm("$8") = (long) arg5; \
+ register long __a5 asm("$9") = (long) arg6; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a5), "r" (__a6) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ register long __a4 asm("$8") = (long) arg5; \
+ register long __a5 asm("$9") = (long) arg6; \
+ register long __a6 asm("$10") = (long) arg7; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "r" (__a5), "r" (__a6), "r" (__a7) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+#endif /* untested */
+#endif /* __ASSEMBLER__ */
+
+#endif /* linux/mips/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/recv.c b/sysdeps/unix/sysv/linux/mips/mips64/recv.c
new file mode 100644
index 0000000..b910525
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/recv.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/x86_64/recv.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/send.c b/sysdeps/unix/sysv/linux/mips/mips64/send.c
new file mode 100644
index 0000000..d2c2996
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/send.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/x86_64/send.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscall.S b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
new file mode 100644
index 0000000..ea5bf49
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscall.S
@@ -0,0 +1,53 @@
+/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+#include <sys/asm.h>
+
+/* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for
+ more information about the value -4095 used below. */
+
+/* Usage: long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5)
+ We need to do some arg shifting, the syscall_number will be in
+ rax. */
+
+
+ .text
+ENTRY (syscall)
+ move v0, a0 /* Syscall number -> v0 */
+ move a0, a1 /* shift arg1 - arg7. */
+ move a1, a2
+ move a2, a3
+ move a3, a4
+ move a4, a5
+ move a5, a6
+ move a6, a7
+
+ syscall /* Do the system call. */
+ bne a3, zero, L(error)
+
+ ret
+
+L(error):
+ .cpsetup t9, a0, syscall
+ PTR_LA t9,__syscall_error
+ .cprestore
+ jr t9
+
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
new file mode 100644
index 0000000..14ad564
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -0,0 +1,20 @@
+# File name Caller Syscall name Args Strong name Weak names
+
+lseek - lseek i:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
+
+# proper socket implementations:
+recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom __syscall_recvfrom
+sendto - sendto i:ibnibn __libc_sendto __sendto sendto __syscall_sendto
+
+# semaphore and shm system calls
+msgctl - msgctl i:iip __msgctl msgctl
+msgget - msgget i:ii __msgget msgget
+msgrcv - msgrcv i:ibnii __msgrcv msgrcv
+msgsnd - msgsnd i:ibni __msgsnd msgsnd
+shmat - shmat i:ipi __shmat shmat
+shmctl - shmctl i:iip __shmctl shmctl
+shmdt - shmdt i:s __shmdt shmdt
+shmget - shmget i:iii __shmget shmget
+semop - semop i:ipi __semop semop
+semget - semget i:iii __semget semget
+semctl - semctl i:iiii __semctl semctl
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/umount.c b/sysdeps/unix/sysv/linux/mips/mips64/umount.c
new file mode 100644
index 0000000..9a91ba5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/umount.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/hppa/umount.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5510eee99a91000221c7391fa0d96e73f0d6ebc
commit d5510eee99a91000221c7391fa0d96e73f0d6ebc
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 15:57:19 2003 +0000
* sysdeps/unix/sysv/linux/configure.in (libc_cv_slibdir): Use
lib64 for mips64/n64 and lib32 for mips64/n32.
(ldd_rewrite_script): Needed for all mips64 configurations.
* sysdeps/unix/sysv/linux/configure: Rebuilt.
* sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed: New file.
* sysdeps/unix/sysv/linux/mips/mips64/Dist: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Dist b/sysdeps/unix/sysv/linux/mips/mips64/Dist
new file mode 100644
index 0000000..b8fa28f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/Dist
@@ -0,0 +1 @@
+ldd-rewrite.sed
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed b/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
new file mode 100644
index 0000000..2c32732
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
@@ -0,0 +1 @@
+s_^\(RTLDLIST=\)\(.*lib\)\(\|32\|64\)\(/[^/]*\.so\.[0-9.]*\)[ ]*$_\1"\232\4 \264\4 \2\4"_
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b44519fbc2b4aae4f090d2e5d835640cbbc7eb4
commit 7b44519fbc2b4aae4f090d2e5d835640cbbc7eb4
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 15:53:37 2003 +0000
* sysdeps/mips/machine-gmon.h (MCOUNT): Define for N32 and N64 as
well.
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index 102da2c..5a87c85 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -1,5 +1,6 @@
/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,14 +21,17 @@
#define _MCOUNT_DECL(frompc,selfpc) \
static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
-/* Call __mcount with our the return PC for our caller,
+/* Call __mcount with the return PC for our caller,
and the return PC our caller will return to. */
+
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+
#ifdef __PIC__
-#define CPLOAD ".cpload $25;"
-#define CPRESTORE ".cprestore 44\n\t"
+# define CPLOAD ".cpload $25;"
+# define CPRESTORE ".cprestore 44\n\t"
#else
-#define CPLOAD
-#define CPRESTORE
+# define CPLOAD
+# define CPRESTORE
#endif
#define MCOUNT asm(\
@@ -66,3 +70,70 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
".set reorder;\n\t" \
".set at\n\t" \
".end _mcount");
+
+#else
+
+#ifdef __PIC__
+# define CPSETUP ".cpsetup $25, 88, _mcount;"
+# define CPRETURN ".cpreturn;"
+#else
+# define CPSETUP
+# define CPRETURN
+#endif
+
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+# define PTR_ADDU_STRING "add" /* no u */
+# define PTR_SUBU_STRING "sub" /* no u */
+#elif defined _ABI64 && _MIPS_SIM == _ABI64
+# define PTR_ADDU_STRING "daddu"
+# define PTR_SUBU_STRING "dsubu"
+#else
+# error "Unknown ABI"
+#endif
+
+#define MCOUNT asm(\
+ ".globl _mcount;\n\t" \
+ ".align 3;\n\t" \
+ ".type _mcount,@function;\n\t" \
+ ".ent _mcount\n\t" \
+ "_mcount:\n\t" \
+ ".frame $sp,88,$31\n\t" \
+ ".set noreorder;\n\t" \
+ ".set noat;\n\t" \
+ PTR_SUBU_STRING " $29,$29,96;\n\t" \
+ CPSETUP \
+ "sd $4,24($29);\n\t" \
+ "sd $5,32($29);\n\t" \
+ "sd $6,40($29);\n\t" \
+ "sd $7,48($29);\n\t" \
+ "sd $8,56($29);\n\t" \
+ "sd $9,64($29);\n\t" \
+ "sd $10,72($29);\n\t" \
+ "sd $11,80($29);\n\t" \
+ "sd $2,16($29);\n\t" \
+ "sd $1,0($29);\n\t" \
+ "sd $31,8($29);\n\t" \
+ "move $5,$31;\n\t" \
+ "move $4,$1;\n\t" \
+ "jal __mcount;\n\t" \
+ "nop;\n\t" \
+ "ld $4,24($29);\n\t" \
+ "ld $5,32($29);\n\t" \
+ "ld $6,40($29);\n\t" \
+ "ld $7,48($29);\n\t" \
+ "ld $8,56($29);\n\t" \
+ "ld $9,64($29);\n\t" \
+ "ld $10,72($29);\n\t" \
+ "ld $11,80($29);\n\t" \
+ "ld $2,16($29);\n\t" \
+ "ld $31,8($29);\n\t" \
+ "ld $1,0($29);\n\t" \
+ CPRETURN \
+ PTR_ADDU_STRING " $29,$29,96;\n\t" \
+ "j $31;\n\t" \
+ "move $31,$1;\n\t" \
+ ".set reorder;\n\t" \
+ ".set at\n\t" \
+ ".end _mcount");
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb4002d6017b0e6c830d3cfd0e87d6ea15e65678
commit bb4002d6017b0e6c830d3cfd0e87d6ea15e65678
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 15:50:05 2003 +0000
* sysdeps/unix/sysv/linux/mips/configure.in: New. Pre-process
asm/unistd.h into asm-unistd.h.
* sysdeps/unix/sysv/linux/mips/configure: Generated.
* sysdeps/unix/sysv/linux/mips/Makefile: Do custom processing
of syscall list.
* sysdeps/unix/sysv/linux/mips/sys/syscall.h: New file.
* sysdeps/unix/sysv/linux/mips/clone.S: Don't include
asm/unistd.h.
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 1f9fc2d..799f5ae 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -8,4 +8,43 @@ ifeq ($(subdir),misc)
sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
+
+no_syscall_list_h = 1
+
+# Generate the list of SYS_* macros for the system calls (__NR_* macros).
+# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
+# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
+$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
+ rm -f $(@:.h=.d)-t
+ { \
+ echo '/* Generated at libc build time from kernel syscall list. */';\
+ echo ''; \
+ echo '#ifndef _SYSCALL_H'; \
+ echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
+ echo '#endif'; \
+ echo ''; \
+ rm -f $(@:.d=.h).newt; \
+ SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
+ $(CC) -E -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
+ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' > $(@:.d=.h).newt; \
+ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
+ echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \
+ sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \
+ echo '#elif defined _ABIN32 && _MIPS_SIM == _ABIN32'; \
+ sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \
+ echo '#else'; \
+ sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \
+ echo '#endif'; \
+ sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt; \
+ else \
+ cat $(@:.d=.h).newt; \
+ fi; \
+ rm $(@:.d=.h).newt; \
+ } > $(@:.d=.h).new
+ mv -f $(@:.d=.h).new $(@:.d=.h)
+ sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \
+ -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\
+ $(@:.d=.h) $(@:.h=.d)),'
+ rm -f $(@:.h=.d)-t
+ mv -f $(@:.h=.d)-t2 $(@:.h=.d)
endif
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 7af2a16..e00351d 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -21,7 +21,6 @@
and invokes a function in the right context after its all over. */
#include <sys/asm.h>
-#include <asm/unistd.h>
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
new file mode 100644
index 0000000..3df0c91
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -0,0 +1,75 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/mips.
+
+case $machine in
+mips*64*)
+ rm -f asm-unistd.h
+ asm_unistd_h=$sysheaders/asm/unistd.h
+ if test ! -f $asm_unistd_h; then
+ # Try to find asm/unistd.h in compiler header search path.
+ try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
+ sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
+ if test -n "$try_asm_unistd_h" &&
+ test -f "$try_asm_unistd_h"; then
+ asm_unistd_h=$try_asm_unistd_h
+ fi
+ fi
+ if test ! -f "$asm_unistd_h"; then
+ AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ else
+ # The point of this preprocessing is to turn __NR_<syscall> into
+ # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
+ # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
+ # and <abi> is the compiler-enabled ABI.
+ cat "$asm_unistd_h" |
+ sed -e 's,__NR_,__NR_N64_,g' \
+ -e 's,__NR_N64_##,__NR_##,g' \
+ -e 's,__NR_N64_O32_,__NR_O32_,g' \
+ -e 's,__NR_N64_N32_,__NR_N32_,g' \
+ -e 's,__NR_N64_N64_,__NR_N64_,g' \
+ | awk > asm-unistd.h '
+/^#define __NR.*unused/ { print; next; }
+/^#define __NR_N64__exit __NR_N64_exit/ {
+ print "#define __NR__exit __NR_exit";
+ print "#define __NR_O32__exit __NR_O32_exit";
+ print "#define __NR_N32__exit __NR_N32_exit";
+ print; next;
+}
+/^#define __NR_O32_/ {
+ name = $2;
+ sub (/_O32_/, "_", name);
+ print;
+ print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+/^#define __NR_N32_/ {
+ name = $2;
+ sub (/_N32_/, "_", name);
+ print;
+ print "#if defined _ABIN32 && _MIPS_SIM == _ABIN32";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+/^#define __NR_N64_/ {
+ name = $2;
+ sub (/_N64_/, "_", name);
+ print;
+ print "#if defined _ABI64 && _MIPS_SIM == _ABI64";
+ print "# define " name " " $2;
+ print "#endif";
+ next;
+}
+{
+ print;
+}'
+ fi ;;
+mips*)
+ rm -f asm-unistd.h
+ echo '#include <asm/unistd.h>' > asm-unistd.h
+ ;;
+esac
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
new file mode 100644
index 0000000..f6458cd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYSCALL_H
+#define _SYSCALL_H 1
+
+/* This file should list the numbers of the system the system knows.
+ But instead of duplicating this we use the information available
+ from the kernel sources. */
+#ifdef _LIBC
+/* Since the kernel doesn't define macro names in a way usable for
+ glibc, we preprocess this header, and use it during the glibc build
+ process. */
+# include <asm-unistd.h>
+#else
+# include <asm/unistd.h>
+#endif
+
+#ifndef _LIBC
+/* The Linux kernel header file defines macros `__NR_<name>', but some
+ programs expect the traditional form `SYS_<name>'. So in building libc
+ we scan the kernel's list and produce <bits/syscall.h> with macros for
+ all the `SYS_' names. */
+# include <bits/syscall.h>
+#endif
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77f047e8a44e2b8e9be738eb877960ab900f49a7
commit 77f047e8a44e2b8e9be738eb877960ab900f49a7
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 15:48:52 2003 +0000
* sysdeps/unix/sysv/linux/mips/sys/ptrace.h: New file.
* sysdeps/unix/sysv/linux/mips/ptrace.c: New file. Use long
long type for registers on n32.
diff --git a/sysdeps/unix/sysv/linux/mips/ptrace.c b/sysdeps/unix/sysv/linux/mips/ptrace.c
new file mode 100644
index 0000000..b67fe83
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ptrace.c
@@ -0,0 +1,112 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/ptrace.h>
+#include <sys/user.h>
+#include <stdarg.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+__extension__ typedef long long int reg_type;
+#else
+typedef long int reg_type;
+#endif
+
+extern reg_type __syscall_ptrace (int, pid_t, void *__unbounded,
+ reg_type __unbounded);
+
+reg_type
+ptrace (enum __ptrace_request request, ...)
+{
+ reg_type res, ret;
+ va_list ap;
+ pid_t pid;
+ void *addr;
+ reg_type data;
+
+ va_start (ap, request);
+ pid = va_arg (ap, pid_t);
+ addr = va_arg (ap, void *);
+ data = va_arg (ap, reg_type);
+ va_end (ap);
+
+ if (request > 0 && request < 4)
+ data = &ret;
+
+#if __BOUNDED_POINTERS__
+ switch (request)
+ {
+ case PTRACE_PEEKTEXT:
+ case PTRACE_PEEKDATA:
+ case PTRACE_PEEKUSER:
+ case PTRACE_POKETEXT:
+ case PTRACE_POKEDATA:
+ case PTRACE_POKEUSER:
+ (void) CHECK_1 ((int *) addr);
+ (void) CHECK_1 ((int *) data);
+ break;
+
+ case PTRACE_GETREGS:
+ case PTRACE_SETREGS:
+ /* We don't know the size of data, so the best we can do is ensure
+ that `data' is valid for at least one word. */
+ (void) CHECK_1 ((int *) data);
+ break;
+
+ case PTRACE_GETFPREGS:
+ case PTRACE_SETFPREGS:
+ /* We don't know the size of data, so the best we can do is ensure
+ that `data' is valid for at least one word. */
+ (void) CHECK_1 ((int *) data);
+ break;
+
+ case PTRACE_GETFPXREGS:
+ case PTRACE_SETFPXREGS:
+ /* We don't know the size of data, so the best we can do is ensure
+ that `data' is valid for at least one word. */
+ (void) CHECK_1 ((int *) data);
+ break;
+
+ case PTRACE_TRACEME:
+ case PTRACE_CONT:
+ case PTRACE_KILL:
+ case PTRACE_SINGLESTEP:
+ case PTRACE_ATTACH:
+ case PTRACE_DETACH:
+ case PTRACE_SYSCALL:
+ /* Neither `data' nor `addr' needs any checks. */
+ break;
+ };
+#endif
+
+ res = INLINE_SYSCALL (ptrace, 4, request, pid,
+ __ptrvalue (addr), __ptrvalue (data));
+ if (res >= 0 && request > 0 && request < 4)
+ {
+ __set_errno (0);
+ return ret;
+ }
+
+ return res;
+}
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ptrace.h b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
new file mode 100644
index 0000000..a8e4a47
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/ptrace.h
@@ -0,0 +1,135 @@
+/* `ptrace' debugger support interface. Linux version.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_PTRACE_H
+#define _SYS_PTRACE_H 1
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Type of the REQUEST argument to `ptrace.' */
+enum __ptrace_request
+{
+ /* Indicate that the process making this request should be traced.
+ All signals received by this process can be intercepted by its
+ parent, and its parent can use the other `ptrace' requests. */
+ PTRACE_TRACEME = 0,
+#define PT_TRACE_ME PTRACE_TRACEME
+
+ /* Return the word in the process's text space at address ADDR. */
+ PTRACE_PEEKTEXT = 1,
+#define PT_READ_I PTRACE_PEEKTEXT
+
+ /* Return the word in the process's data space at address ADDR. */
+ PTRACE_PEEKDATA = 2,
+#define PT_READ_D PTRACE_PEEKDATA
+
+ /* Return the word in the process's user area at offset ADDR. */
+ PTRACE_PEEKUSER = 3,
+#define PT_READ_U PTRACE_PEEKUSER
+
+ /* Write the word DATA into the process's text space at address ADDR. */
+ PTRACE_POKETEXT = 4,
+#define PT_WRITE_I PTRACE_POKETEXT
+
+ /* Write the word DATA into the process's data space at address ADDR. */
+ PTRACE_POKEDATA = 5,
+#define PT_WRITE_D PTRACE_POKEDATA
+
+ /* Write the word DATA into the process's user area at offset ADDR. */
+ PTRACE_POKEUSER = 6,
+#define PT_WRITE_U PTRACE_POKEUSER
+
+ /* Continue the process. */
+ PTRACE_CONT = 7,
+#define PT_CONTINUE PTRACE_CONT
+
+ /* Kill the process. */
+ PTRACE_KILL = 8,
+#define PT_KILL PTRACE_KILL
+
+ /* Single step the process.
+ This is not supported on all machines. */
+ PTRACE_SINGLESTEP = 9,
+#define PT_STEP PTRACE_SINGLESTEP
+
+ /* Get all general purpose registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_GETREGS = 12,
+#define PT_GETREGS PTRACE_GETREGS
+
+ /* Set all general purpose registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_SETREGS = 13,
+#define PT_SETREGS PTRACE_SETREGS
+
+ /* Get all floating point registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_GETFPREGS = 14,
+#define PT_GETFPREGS PTRACE_GETFPREGS
+
+ /* Set all floating point registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_SETFPREGS = 15,
+#define PT_SETFPREGS PTRACE_SETFPREGS
+
+ /* Attach to a process that is already running. */
+ PTRACE_ATTACH = 16,
+#define PT_ATTACH PTRACE_ATTACH
+
+ /* Detach from a process attached to with PTRACE_ATTACH. */
+ PTRACE_DETACH = 17,
+#define PT_DETACH PTRACE_DETACH
+
+ /* Get all extended floating point registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_GETFPXREGS = 18,
+#define PT_GETFPXREGS PTRACE_GETFPXREGS
+
+ /* Set all extended floating point registers used by a processes.
+ This is not supported on all machines. */
+ PTRACE_SETFPXREGS = 19,
+#define PT_SETFPXREGS PTRACE_SETFPXREGS
+
+ /* Continue and stop at the next (return from) syscall. */
+ PTRACE_SYSCALL = 24
+#define PT_SYSCALL PTRACE_SYSCALL
+};
+
+/* Perform process tracing functions. REQUEST is one of the values
+ above, and determines the action to be taken.
+ For all requests except PTRACE_TRACEME, PID specifies the process to be
+ traced.
+
+ PID and the other arguments described above for the various requests should
+ appear (those that are used for the particular request) as:
+ pid_t PID, void *ADDR, int DATA, void *ADDR2
+ after REQUEST. */
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+__extension__ extern long long int ptrace
+ (enum __ptrace_request __request, ...) __THROW;
+#else
+extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
+#endif
+
+__END_DECLS
+
+#endif /* _SYS_PTRACE_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca2b264c24b12141df2139c8b5d20c0951d1018f
commit ca2b264c24b12141df2139c8b5d20c0951d1018f
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Mon Mar 17 15:47:13 2003 +0000
* sysdeps/mips/bits/wordsize.h: New file, appropriate for all
3 ABIs.
* sysdeps/mips/mips64/gmp-mparam.h: New file. Define
BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs.
* sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros.
(__sigsetjmp_aux): Use them. Adjust for all 3 ABIs.
* sysdeps/mips/elf/start.S: Adjust for all 3 ABIs.
* sysdeps/unix/mips/brk.S: Likewise.
* sysdeps/unix/mips/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
* sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise.
* sysdeps/mips/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
* sysdeps/mips/mips64/bsd-setjmp.S: Likewise.
* sysdeps/mips/mips64/setjmp.S: Likewise.
* sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete.
* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for
64-bit types.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 8cb53ee..fa48676 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,6 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,25 +25,33 @@
typedef struct
{
/* Program counter. */
- void * __pc;
+ __ptr_t __pc;
/* Stack pointer. */
- void * __sp;
+ __ptr_t __sp;
/* Callee-saved registers s0 through s7. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
int __regs[8];
+#else
+ __extension__ long long __regs[8];
+#endif
/* The frame pointer. */
- void * __fp;
+ __ptr_t __fp;
/* The global pointer. */
- void * __gp;
+ __ptr_t __gp;
/* Floating point status register. */
int __fpc_csr;
/* Callee-saved floating point registers. */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
double __fpregs[6];
+#else
+ double __fpregs[8];
+#endif
} __jmp_buf[1];
#ifdef __USE_MISC
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/bits/wordsize.h
similarity index 66%
copy from sysdeps/mips/mips64/setjmp.S
copy to sysdeps/mips/bits/wordsize.h
index 5e18897..666c7ad 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,4 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
-
-/* The function __sigsetjmp_aux saves all the registers, but it can't
- reliably access the stack or frame pointers, so we pass them in as
- extra arguments. */
-#ifdef __PIC__
- .option pic2
-#endif
-ENTRY (__sigsetjmp)
-#ifdef __PIC__
- .cpload t9
-#endif
- move a2, sp
- move a3, fp
- dla t9, __sigsetjmp_aux
- nop
- jr t9
+#define __WORDSIZE _MIPS_SZPTR
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index e85e9f5..7567423 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,6 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +20,7 @@
#define __ASSEMBLY__ 1
#include <entry.h>
+#include <sys/asm.h>
#ifndef ENTRY_POINT
#error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
@@ -52,42 +54,41 @@
char **argv, void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void), void *stack_end)
*/
-#ifdef __PIC__
-/* A macro to (re)initialize gp. We can get the run time address of 0f in
- ra ($31) by blezal instruction. In this early phase, we can't save gp
- in stack and .cprestore doesn't work properly. So we set gp by using
- this macro. */
-#define SET_GP \
- .set noreorder; \
- bltzal $0,0f; \
- nop; \
-0: .cpload $31; \
- .set reorder;
-#endif
-
+
.text
.globl ENTRY_POINT
.type ENTRY_POINT,@function
ENTRY_POINT:
#ifdef __PIC__
- SET_GP
+ SETUP_GPX($0)
+ SETUP_GPX64($25,$0)
#else
- la $28, _gp /* Setup GP correctly if we're non-PIC. */
-#endif
+ PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
move $31, $0
+#endif
- la $4, main /* main */
- lw $5, 0($29) /* argc */
- addu $6, $29, 4 /* argv */
- /* Allocate space on the stack for seven arguments and make sure
- the stack is aligned to double words (8 bytes). */
- and $29, 0xfffffff8
- subu $29, 32
- la $7, __libc_csu_init /* init */
- la $8, __libc_csu_fini
- sw $8, 16($29) /* fini */
- sw $2, 20($29) /* rtld_fini */
- sw $29, 24($29) /* stack_end */
+ PTR_LA $4, main /* main */
+ PTR_L $5, 0($29) /* argc */
+ PTR_ADDIU $6, $29, PTRSIZE /* argv */
+
+ /* Allocate space on the stack for seven arguments (o32 only)
+ and make sure the stack is aligned to double words (8 bytes)
+ on o32 and quad words (16 bytes) on n32 and n64. */
+
+ and $29, -2 * SZREG
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+ PTR_SUBIU $29, 32
+#endif
+ PTR_LA $7, __libc_csu_init /* init */
+ PTR_LA $8, __libc_csu_fini
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+ PTR_S $8, 16($29) /* fini */
+ PTR_S $2, 20($29) /* rtld_fini */
+ PTR_S $29, 24($29) /* stack_end */
+#else
+ move $9, $2 /* rtld_fini */
+ move $10, $29 /* stack_end */
+#endif
jal __libc_start_main
hlt: b hlt /* Crash if somehow it does return. */
diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h
deleted file mode 100644
index e126427..0000000
--- a/sysdeps/mips/mips64/bits/setjmp.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SETJMP_H
-# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
-#endif
-
-typedef struct
- {
- /* Program counter. */
- __ptr_t __pc;
-
- /* Stack pointer. */
- __ptr_t __sp;
-
- /* Callee-saved registers s0 through s7. */
- int __regs[8];
-
- /* The frame pointer. */
- __ptr_t __fp;
-
- /* The global pointer. */
- __ptr_t __gp;
-
- /* Floating point status register. */
- int __fpc_csr;
-
- /* Callee-saved floating point registers. */
- double __fpregs[8];
- } __jmp_buf[1];
-
-#ifdef __USE_MISC
-/* Offset to the program counter in `jmp_buf'. */
-# define JB_PC 0
-#endif
-
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((__ptr_t) (address) < (jmpbuf)[0].__sp)
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index c0ff0d7..9d79ab0 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,10 +28,19 @@
#endif
ENTRY (_setjmp)
#ifdef __PIC__
- .cpload t9
+ SETUP_GP
#endif
- dla t9, C_SYMBOL_NAME (__sigsetjmp)
+ SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp))
+ PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
+#if _MIPS_SIM == _MIPS_SIM_ABI32
nop
- jr t9
- dli a1, 0 /* Pass a second argument of zero. */
+#endif
+ RESTORE_GP64
+ move a1, zero /* Pass a second argument of zero. */
+#ifdef __PIC__
+ jr t9
+#else
+ j C_SYMBOL_NAME (__sigsetjmp)
+#endif
+ .end _setjmp
libc_hidden_def (_setjmp)
diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S
index ee86787..f542cb5 100644
--- a/sysdeps/mips/mips64/bsd-setjmp.S
+++ b/sysdeps/mips/mips64/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,15 +22,25 @@
in setjmp doesn't clobber the state restored by longjmp. */
#include <sysdep.h>
+#include <sys/asm.h>
#ifdef PIC
.option pic2
#endif
ENTRY (setjmp)
-#ifdef PIC
- .cpload t9
+#ifdef __PIC__
+ SETUP_GP
#endif
- dla t9, C_SYMBOL_NAME (__sigsetjmp)
+ SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp))
+ PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
+#if _MIPS_SIM == _MIPS_SIM_ABI32
nop
- jr t9
+#endif
+ RESTORE_GP64
dli a1, 1 /* Pass a second argument of one. */
+#ifdef __PIC__
+ jr t9
+#else
+ j C_SYMBOL_NAME (__sigsetjmp)
+#endif
+ .end setjmp
diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h
new file mode 100644
index 0000000..7666137
--- /dev/null
+++ b/sysdeps/mips/mips64/gmp-mparam.h
@@ -0,0 +1,31 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994, 2002, 2003 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#if defined __GMP_H__ && ! defined _LONG_LONG_LIMB
+#error "Included too late for _LONG_LONG_LIMB to take effect"
+#endif
+
+#define _LONG_LONG_LIMB
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
+#define BITS_PER_LONGINT __WORDSIZE
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
index 5e18897..3d2bf20 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <sys/asm.h>
/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
@@ -26,10 +27,15 @@
#endif
ENTRY (__sigsetjmp)
#ifdef __PIC__
- .cpload t9
+ SETUP_GP
#endif
+ SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp))
move a2, sp
move a3, fp
- dla t9, __sigsetjmp_aux
+ PTR_LA t9, __sigsetjmp_aux
+#if _MIPS_SIM == _MIPS_SIM_ABI32
nop
+#endif
+ RESTORE_GP64
jr t9
+ .end __sigsetjmp
diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
index 730deae..309a14a 100644
--- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h
+++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
@@ -1,7 +1,7 @@
#define _FP_W_TYPE_SIZE 64
-#define _FP_W_TYPE unsigned long
-#define _FP_WS_TYPE signed long
-#define _FP_I_TYPE long
+#define _FP_W_TYPE unsigned long long
+#define _FP_WS_TYPE signed long long
+#define _FP_I_TYPE long long
#define _FP_MUL_MEAT_S(R,X,Y) \
_FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index 1cd2b21..9e6766f 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -18,6 +18,11 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <sys/asm.h>
+
+#define STRINGXP(X) __STRING(X)
+#define REGS STRINGXP(REG_S)
+#define PTRS STRINGXP(PTR_S)
/* This function is only called via the assembly language routine
__sigsetjmp, which arranges to pass in the stack pointer and the frame
@@ -28,15 +33,26 @@ int
__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
{
/* Store the floating point callee-saved registers... */
+#if _MIPS_SIM == _MIPS_SIM_ABI32
asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
+#else
+ asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+ asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
+ asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
+ asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
+ asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
+ asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
+ asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6]));
+ asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7]));
+#endif
/* .. and the PC; */
- asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
+ asm volatile (PTRS " $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
/* .. and the stack pointer; */
env[0].__jmpbuf[0].__sp = (void *) sp;
@@ -45,17 +61,17 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
env[0].__jmpbuf[0].__fp = (void *) fp;
/* .. and the GP; */
- asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
+ asm volatile (PTRS " $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
/* .. and the callee-saved registers; */
- asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
- asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
- asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
- asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
- asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
- asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
- asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
- asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
+ asm volatile (REGS " $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
+ asm volatile (REGS " $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
+ asm volatile (REGS " $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
+ asm volatile (REGS " $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
+ asm volatile (REGS " $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
+ asm volatile (REGS " $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
+ asm volatile (REGS " $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
+ asm volatile (REGS " $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
/* .. and finally get and reconstruct the floating point csr. */
asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index 90c992d..90aa09a 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,11 @@
#include <signal.h>
/* Type for general register. */
-typedef unsigned int greg_t;
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+typedef __uint32_t greg_t;
+#else
+typedef __uint64_t greg_t;
+#endif
/* Number of general registers. */
#define NGREG 36
@@ -115,9 +119,15 @@ typedef struct fpregset
{
union
{
+#if _MIPS_SIM == _MIPS_SIM_ABI32
double fp_dregs[16];
float fp_fregs[32];
unsigned int fp_regs[32];
+#else
+ double fp_dregs[32];
+ /* float fp_fregs[32]; */
+ __uint64_t fp_regs[32];
+#endif
} fp_r;
unsigned int fp_csr;
unsigned int fp_pad;
@@ -133,12 +143,16 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
+#if _MIPS_SIM == _MIPS_SIM_ABI32
unsigned long int uc_flags;
+#else
+ __uint64_t uc_flags;
+#endif
struct ucontext *uc_link;
__sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
- long int uc_filler[48];
+ int uc_filler[48];
} ucontext_t;
#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index f094cda..a35b8b9 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <sysdep.h>
+#include <sys/asm.h>
#ifndef SYS_brk
#define SYS_brk 17
@@ -37,9 +38,9 @@ SYSCALL__(brk, 1)
.set reorder
/* Handle the query case. */
bnez a0, 1f
- move a0,v0
+ move a0, v0
1: /* Update __curbrk and exit cleanly. */
- sw a0, __curbrk
+ PTR_S a0, __curbrk
move v0, zero
jr ra
PSEUDO_END(__brk)
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index a1adf67..09e8a0a 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -24,24 +24,27 @@
#ifdef _LIBC_REENTRANT
+LOCALSZ= 3
+FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
+RAOFF= FRAMESZ-(1*SZREG)
+GPOFF= FRAMESZ-(2*SZREG)
+V0OFF= FRAMESZ-(3*SZREG)
+
ENTRY(__syscall_error)
#ifdef __PIC__
- .set noreorder
- .set noat
- move AT, ra
- bltzal zero, 0f
- nop
-0: .cpload ra
- move ra, AT
- .set at
- .set reorder
+ .set noat
+ SETUP_GPX (AT)
+ .set at
#endif
- subu sp, 32
+ PTR_SUBU sp, FRAMESZ
+ .set noat
+ SETUP_GPX64(GPOFF,AT)
+ .set at
#ifdef __PIC__
- .cprestore 16
+ SAVE_GP(GPOFF)
#endif
- sw v0, 20(sp)
- sw ra, 24(sp)
+ REG_S v0, V0OFF(sp)
+ REG_S ra, RAOFF(sp)
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
@@ -56,12 +59,13 @@ L(skip):
jal __errno_location
/* Store the error value. */
- lw t0, 20(sp)
- sw t0, 0(v0)
+ REG_L t4, V0OFF(sp)
+ sw t4, 0(v0)
/* And just kick back a -1. */
- lw ra, 24(sp)
- addiu sp, 32
+ REG_L ra, RAOFF(sp)
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
li v0, -1
j ra
END(__syscall_error)
@@ -71,16 +75,10 @@ L(skip):
ENTRY(__syscall_error)
#ifdef __PIC__
- .set noreorder
- .set noat
- move AT, ra
- bltzal zero, 0f
- nop
-0: .cpload ra
- move ra, AT
- .set at
- .set reorder
+ SETUP_GPX (AT)
#endif
+ SETUP_GPX64 (t9, AT)
+
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
@@ -94,6 +92,8 @@ L(skip):
/* And just kick back a -1. */
li v0, -1
+
+ RESTORE_GP64
j ra
END(__syscall_error)
#endif /* _LIBC_REENTRANT */
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 2b02a2b..7af2a16 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -29,15 +29,17 @@
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
.text
+LOCALSZ= 1
+FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
+GPOFF= FRAMESZ-(1*SZREG)
NESTED(__clone,4*SZREG,sp)
#ifdef __PIC__
- .set noreorder
- .cpload $25
- .set reorder
- subu sp,32
- .cprestore 16
-#else
- subu sp,32
+ SETUP_GP
+#endif
+ PTR_SUBU sp, FRAMESZ
+ SETUP_GP64 (GPOFF, __clone)
+#ifdef __PIC__
+ SAVE_GP (GPOFF)
#endif
#ifdef PROF
.set noat
@@ -52,9 +54,9 @@ NESTED(__clone,4*SZREG,sp)
beqz a0,L(error) /* No NULL function pointers. */
beqz a1,L(error) /* No NULL stack pointers. */
- subu a1,32 /* Reserve argument save space. */
- sw a0,0(a1) /* Save function pointer. */
- sw a3,4(a1) /* Save argument pointer. */
+ PTR_SUBU a1,32 /* Reserve argument save space. */
+ PTR_S a0,0(a1) /* Save function pointer. */
+ PTR_S a3,PTRSIZE(a1) /* Save argument pointer. */
/* Do the system call */
@@ -66,16 +68,20 @@ NESTED(__clone,4*SZREG,sp)
beqz v0,L(thread_start)
/* Successful return from the parent */
- addiu sp,32
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
ret
/* Something bad happened -- no child created */
L(error):
- addiu sp,32
#ifdef __PIC__
- la t9,__syscall_error
+ PTR_LA t9,__syscall_error
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
jr t9
#else
+ RESTORE_GP64
+ PTR_ADDU sp, FRAMESZ
j __syscall_error
#endif
END(__clone)
@@ -86,11 +92,11 @@ L(error):
L(thread_start):
/* cp is already loaded. */
- .cprestore 16
+ SAVE_GP (GPOFF)
/* The stackframe has been created on entry of clone(). */
/* Restore the arg for user's function. */
- lw t9,0(sp) /* Function pointer. */
- lw a0,4(sp) /* Argument pointer. */
+ PTR_L t9,0(sp) /* Function pointer. */
+ PTR_L a0,PTRSIZE(sp) /* Argument pointer. */
/* Call the user's function. */
jal t9
@@ -98,7 +104,7 @@ L(thread_start):
/* Call _exit rather than doing it inline for breakpoint purposes. */
move a0,v0
#ifdef __PIC__
- la t9,_exit
+ PTR_LA t9,_exit
jalr t9
#else
jal _exit
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index 41137b4..b5fcd00 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -1,4 +1,28 @@
/* Definition of `struct stat' used in the kernel.. */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+struct kernel_stat
+ {
+ unsigned int st_dev;
+ unsigned int __pad1[3];
+ unsigned long st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+ int st_uid;
+ int st_gid;
+ unsigned int st_rdev;
+ unsigned int __pad2[3];
+ long st_size;
+ unsigned int st_atime;
+ unsigned int __unused1;
+ unsigned int st_mtime;
+ unsigned int __unused2;
+ unsigned int st_ctime;
+ unsigned int __unused3;
+ unsigned int st_blksize;
+ unsigned int __pad3;
+ unsigned long st_blocks;
+ };
+#else
struct kernel_stat
{
unsigned long int st_dev;
@@ -26,3 +50,4 @@ struct kernel_stat
unsigned int st_flags;
unsigned int st_gen;
};
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index a21652e..0beb332 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +33,11 @@
#define ELF_NGREG 45
#define ELF_NFPREG 33
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+__extension__ typedef unsigned long long elf_greg_t;
+#else
typedef unsigned long elf_greg_t;
+#endif
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t;
@@ -59,8 +64,13 @@ struct elf_prstatus
{
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+ __extension__ unsigned long long int pr_sigpend;
+ __extension__ unsigned long long int pr_sighold;
+#else
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
+#endif
__pid_t pr_pid;
__pid_t pr_ppid;
__pid_t pr_pgrp;
@@ -82,7 +92,11 @@ struct elf_prpsinfo
char pr_sname; /* Char for pr_state. */
char pr_zomb; /* Zombie. */
char pr_nice; /* Nice val. */
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+ __extension__ unsigned long long int pr_flag;
+#else
unsigned long int pr_flag; /* Flags. */
+#endif
long pr_uid;
long pr_gid;
int pr_pid, pr_ppid, pr_pgrp, pr_sid;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index f57b91e..9d80b40 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,11 @@
/* Type for general register. */
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+__extension__ typedef unsigned long long int greg_t;
+#else
typedef unsigned long int greg_t;
+#endif
/* Number of general registers. */
#define NGREG 37
@@ -70,7 +74,11 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
+#if defined _ABIN32 && _MIPS_SIM == _ABIN32
+ __extension__ unsigned long long int uc_flags;
+#else
unsigned long int uc_flags;
+#endif
struct ucontext *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6631ae1acb269c52cd173bd1ad28f98fd55c5dd
commit e6631ae1acb269c52cd173bd1ad28f98fd55c5dd
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 15:30:43 2003 +0000
* sysdeps/mips/fpu/bits/mathdef.h: New.
(__NO_LONG_DOUBLE_MATH): Define for o32.
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h
new file mode 100644
index 0000000..fd73c35
--- /dev/null
+++ b/sysdeps/mips/fpu/bits/mathdef.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
+/* Normally, there is no long double type and the `float' and `double'
+ expressions are evaluated as `double'. */
+typedef double float_t; /* `float' expressions are evaluated as
+ `double'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
+
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN 2147483647
+
+#endif /* ISO C99 */
+
+#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32
+/* Signal that we do not really have a `long double'. This disables the
+ declaration of all the `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1a0b02eb4ac8b89edb7c24598820332052ae982
commit b1a0b02eb4ac8b89edb7c24598820332052ae982
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 11:06:32 2003 +0000
* sysdeps/mips/sys/asm.h: Formatting changes.
(PTR, PTRSIZE, PTRLOG): Adjust for all 3 ABIs.
(CPADD): Define for all of them.
(SETUP_GP, SETUP_GPX, SETUP_GPX_L, SAVE_GP, SETUP_GP64,
SETUP_GPX64, SETUP_GPX64_L, RESTORE_GP64, USE_ALT_CP,
NARGSAVE): Define per ABI spec.
(END): Don't redefine.
(LONG_SLL, LONG_SLLV, LONG_SRL, LONG_SRLV, LONG_SRA,
LONG_SRAV): Remove duplicate definitions.
(PTR_ADD, PTR_ADDI, PTR_ADDU, PTR_ADDIU, PTR_SUB, PTR_SUBI,
PTR_SUBU, PTR_SUBIU, PTR_L, PTR_S, PTR_SLL, PTR_SLLV, PTR_SRL,
PTR_SRLV, PTR_SRA, PTR_SRAV, PTR_SCALESHIFT): Define for n32.
(PTR_LA): Define for all 3 ABIs.
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index 1e5ea9a..0ebf561 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -23,12 +23,12 @@
#include <sgidefs.h>
#ifndef CAT
-#ifdef __STDC__
-#define __CAT(str1,str2) str1##str2
-#else
-#define __CAT(str1,str2) str1/**/str2
-#endif
-#define CAT(str1,str2) __CAT(str1,str2)
+# ifdef __STDC__
+# define __CAT(str1,str2) str1##str2
+# else
+# define __CAT(str1,str2) str1/**/str2
+# endif
+# define CAT(str1,str2) __CAT(str1,str2)
#endif
/*
@@ -37,25 +37,112 @@
* 64 bit address space isn't used yet, so we may use the R3000 32 bit
* defines for now.
*/
-#define PTR .word
-#define PTRSIZE 4
-#define PTRLOG 2
+#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+# define PTR .word
+# define PTRSIZE 4
+# define PTRLOG 2
+#elif (_MIPS_SIM == _MIPS_SIM_ABI64)
+# define PTR .dword
+# define PTRSIZE 8
+# define PTRLOG 3
+#endif
/*
* PIC specific declarations
*/
-#ifdef __PIC__
-#define CPRESTORE(register) \
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+# ifdef __PIC__
+# define CPRESTORE(register) \
.cprestore register
-#define CPADD(register) \
+# define CPLOAD(register) \
+ .cpload register
+# else
+# define CPRESTORE(register)
+# define CPLOAD(register)
+# endif
+
+# define CPADD(register) \
.cpadd register
-#define CPLOAD(register) \
- .cpload register
-#else
-#define CPRESTORE(register)
-#define CPADD(register)
-#define CPLOAD(register)
+
+/*
+ * Set gp when at 1st instruction
+ */
+# define SETUP_GP \
+ .set noreorder; \
+ .cpload $25; \
+ .set reorder
+/* Set gp when not at 1st instruction */
+# define SETUP_GPX(r) \
+ .set noreorder; \
+ move r, $31; /* Save old ra. */ \
+ bal 10f; /* Find addr of cpload. */ \
+ nop; \
+10: \
+ .cpload $31; \
+ move $31, r; \
+ .set reorder
+# define SETUP_GPX_L(r, l) \
+ .set noreorder; \
+ move r, $31; /* Save old ra. */ \
+ bal l; /* Find addr of cpload. */ \
+ nop; \
+l: \
+ .cpload $31; \
+ move $31, r; \
+ .set reorder
+# define SAVE_GP(x) \
+ .cprestore x /* Save gp trigger t9/jalr conversion. */
+# define SETUP_GP64(a, b)
+# define SETUP_GPX64(a, b)
+# define SETUP_GPX64_L(cp_reg, ra_save, l)
+# define RESTORE_GP64
+# define USE_ALT_CP(a)
+#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */
+/*
+ * For callee-saved gp calling convention:
+ */
+# define SETUP_GP
+# define SETUP_GPX(r)
+# define SETUP_GPX_L(r, l)
+# define SAVE_GP(x)
+
+# define SETUP_GP64(gpoffset, proc) \
+ .cpsetup $25, gpoffset, proc
+# define SETUP_GPX64(cp_reg, ra_save) \
+ move ra_save, $31; /* Save old ra. */ \
+ .set noreorder; \
+ bal 10f; /* Find addr of .cpsetup. */ \
+ nop; \
+10: \
+ .set reorder; \
+ .cpsetup $31, cp_reg, 10b; \
+ move $31, ra_save
+# define SETUP_GPX64_L(cp_reg, ra_save, l) \
+ move ra_save, $31; /* Save old ra. */ \
+ .set noreorder; \
+ bal l; /* Find addr of .cpsetup. */ \
+ nop; \
+l: \
+ .set reorder; \
+ .cpsetup $31, cp_reg, l; \
+ move $31, ra_save
+# define RESTORE_GP64 \
+ .cpreturn
+/* Use alternate register for context pointer. */
+# define USE_ALT_CP(reg) \
+ .cplocal reg
+#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+
+/*
+ * Stack Frame Definitions
+ */
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */
#endif
+#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32)
+# define NARGSAVE 0 /* No caller responsibilities. */
+#endif
+
/*
* LEAF - declare leaf routine
@@ -80,9 +167,11 @@ symbol: .frame sp, framesize, rpc
/*
* END - mark end of function
*/
-#define END(function) \
+#ifndef END
+# define END(function) \
.end function; \
.size function,.-function
+#endif
/*
* EXPORT - export definition of symbol
@@ -142,54 +231,54 @@ symbol = value
* is one of them. So we should have an option not to use this instruction.
*/
#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
-#define PREF(hint,addr) \
+# define PREF(hint,addr) \
pref hint,addr
-#define PREFX(hint,addr) \
+# define PREFX(hint,addr) \
prefx hint,addr
#else
-#define PREF
-#define PREFX
+# define PREF
+# define PREFX
#endif
/*
* MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs.
*/
#if _MIPS_ISA == _MIPS_ISA_MIPS1
-#define MOVN(rd,rs,rt) \
+# define MOVN(rd,rs,rt) \
.set push; \
.set reorder; \
- beqz rt,9f; \
- move rd,rs; \
+ beqz rt,9f; \
+ move rd,rs; \
.set pop; \
9:
-#define MOVZ(rd,rs,rt) \
+# define MOVZ(rd,rs,rt) \
.set push; \
.set reorder; \
- bnez rt,9f; \
- move rd,rt; \
+ bnez rt,9f; \
+ move rd,rt; \
.set pop; \
9:
#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */
#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3)
-#define MOVN(rd,rs,rt) \
+# define MOVN(rd,rs,rt) \
.set push; \
.set noreorder; \
- bnezl rt,9f; \
- move rd,rs; \
+ bnezl rt,9f; \
+ move rd,rs; \
.set pop; \
9:
-#define MOVZ(rd,rs,rt) \
+# define MOVZ(rd,rs,rt) \
.set push; \
.set noreorder; \
- beqzl rt,9f; \
- movz rd,rs; \
+ beqzl rt,9f; \
+ movz rd,rs; \
.set pop; \
9:
#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */
#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
-#define MOVN(rd,rs,rt) \
+# define MOVN(rd,rs,rt) \
movn rd,rs,rt
-#define MOVZ(rd,rs,rt) \
+# define MOVZ(rd,rs,rt) \
movz rd,rs,rt
#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */
@@ -197,181 +286,187 @@ symbol = value
* Stack alignment
*/
#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
-#define ALSZ 7
-#define ALMASK ~7
+# define ALSZ 7
+# define ALMASK ~7
#endif
#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
(_MIPS_ISA == _MIPS_ISA_MIPS5)
-#define ALSZ 15
-#define ALMASK ~15
+# define ALSZ 15
+# define ALMASK ~15
#endif
/*
* Size of a register
*/
#ifdef __mips64
-#define SZREG 8
+# define SZREG 8
#else
-#define SZREG 4
+# define SZREG 4
#endif
/*
* Use the following macros in assemblercode to load/store registers,
* pointers etc.
*/
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
-#define REG_S sw
-#define REG_L lw
-#define PTR_SUBU subu
-#define PTR_ADDU addu
-#endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
- (_MIPS_ISA == _MIPS_ISA_MIPS5)
-#define REG_S sd
-#define REG_L ld
-/* We still live in a 32 bit address space ... */
-#define PTR_SUBU subu
-#define PTR_ADDU addu
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+# define REG_S sw
+# define REG_L lw
+#else
+# define REG_S sd
+# define REG_L ld
#endif
/*
* How to add/sub/load/store/shift C int variables.
*/
#if (_MIPS_SZINT == 32)
-#define INT_ADD add
-#define INT_ADDI addi
-#define INT_ADDU addu
-#define INT_ADDIU addiu
-#define INT_SUB add
-#define INT_SUBI subi
-#define INT_SUBU subu
-#define INT_SUBIU subu
-#define INT_L lw
-#define INT_S sw
-#define LONG_SLL sll
-#define LONG_SLLV sllv
-#define LONG_SRL srl
-#define LONG_SRLV srlv
-#define LONG_SRA sra
-#define LONG_SRAV srav
+# define INT_ADD add
+# define INT_ADDI addi
+# define INT_ADDU addu
+# define INT_ADDIU addiu
+# define INT_SUB add
+# define INT_SUBI subi
+# define INT_SUBU subu
+# define INT_SUBIU subu
+# define INT_L lw
+# define INT_S sw
#endif
#if (_MIPS_SZINT == 64)
-#define INT_ADD dadd
-#define INT_ADDI daddi
-#define INT_ADDU daddu
-#define INT_ADDIU daddiu
-#define INT_SUB dadd
-#define INT_SUBI dsubi
-#define INT_SUBU dsubu
-#define INT_SUBIU dsubu
-#define INT_L ld
-#define INT_S sd
-#define LONG_SLL dsll
-#define LONG_SLLV dsllv
-#define LONG_SRL dsrl
-#define LONG_SRLV dsrlv
-#define LONG_SRA dsra
-#define LONG_SRAV dsrav
+# define INT_ADD dadd
+# define INT_ADDI daddi
+# define INT_ADDU daddu
+# define INT_ADDIU daddiu
+# define INT_SUB dadd
+# define INT_SUBI dsubi
+# define INT_SUBU dsubu
+# define INT_SUBIU dsubu
+# define INT_L ld
+# define INT_S sd
#endif
/*
* How to add/sub/load/store/shift C long variables.
*/
#if (_MIPS_SZLONG == 32)
-#define LONG_ADD add
-#define LONG_ADDI addi
-#define LONG_ADDU addu
-#define LONG_ADDIU addiu
-#define LONG_SUB add
-#define LONG_SUBI subi
-#define LONG_SUBU subu
-#define LONG_SUBIU subu
-#define LONG_L lw
-#define LONG_S sw
-#define LONG_SLL sll
-#define LONG_SLLV sllv
-#define LONG_SRL srl
-#define LONG_SRLV srlv
-#define LONG_SRA sra
-#define LONG_SRAV srav
+# define LONG_ADD add
+# define LONG_ADDI addi
+# define LONG_ADDU addu
+# define LONG_ADDIU addiu
+# define LONG_SUB add
+# define LONG_SUBI subi
+# define LONG_SUBU subu
+# define LONG_SUBIU subu
+# define LONG_L lw
+# define LONG_S sw
+# define LONG_SLL sll
+# define LONG_SLLV sllv
+# define LONG_SRL srl
+# define LONG_SRLV srlv
+# define LONG_SRA sra
+# define LONG_SRAV srav
#endif
#if (_MIPS_SZLONG == 64)
-#define LONG_ADD dadd
-#define LONG_ADDI daddi
-#define LONG_ADDU daddu
-#define LONG_ADDIU daddiu
-#define LONG_SUB dadd
-#define LONG_SUBI dsubi
-#define LONG_SUBU dsubu
-#define LONG_SUBIU dsubu
-#define LONG_L ld
-#define LONG_S sd
-#define LONG_SLL dsll
-#define LONG_SLLV dsllv
-#define LONG_SRL dsrl
-#define LONG_SRLV dsrlv
-#define LONG_SRA dsra
-#define LONG_SRAV dsrav
+# define LONG_ADD dadd
+# define LONG_ADDI daddi
+# define LONG_ADDU daddu
+# define LONG_ADDIU daddiu
+# define LONG_SUB dadd
+# define LONG_SUBI dsubi
+# define LONG_SUBU dsubu
+# define LONG_SUBIU dsubu
+# define LONG_L ld
+# define LONG_S sd
+# define LONG_SLL dsll
+# define LONG_SLLV dsllv
+# define LONG_SRL dsrl
+# define LONG_SRLV dsrlv
+# define LONG_SRA dsra
+# define LONG_SRAV dsrav
#endif
/*
* How to add/sub/load/store/shift pointers.
*/
-#if (_MIPS_SZLONG == 32)
-#define PTR_ADD add
-#define PTR_ADDI addi
-#define PTR_ADDU addu
-#define PTR_ADDIU addiu
-#define PTR_SUB add
-#define PTR_SUBI subi
-#define PTR_SUBU subu
-#define PTR_SUBIU subu
-#define PTR_L lw
-#define PTR_S sw
-#define PTR_SLL sll
-#define PTR_SLLV sllv
-#define PTR_SRL srl
-#define PTR_SRLV srlv
-#define PTR_SRA sra
-#define PTR_SRAV srav
-
-#define PTR_SCALESHIFT 2
+#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 32)
+# define PTR_ADD add
+# define PTR_ADDI addi
+# define PTR_ADDU addu
+# define PTR_ADDIU addiu
+# define PTR_SUB add
+# define PTR_SUBI subi
+# define PTR_SUBU subu
+# define PTR_SUBIU subu
+# define PTR_L lw
+# define PTR_LA la
+# define PTR_S sw
+# define PTR_SLL sll
+# define PTR_SLLV sllv
+# define PTR_SRL srl
+# define PTR_SRLV srlv
+# define PTR_SRA sra
+# define PTR_SRAV srav
+
+# define PTR_SCALESHIFT 2
#endif
-#if (_MIPS_SZLONG == 64)
-#define PTR_ADD dadd
-#define PTR_ADDI daddi
-#define PTR_ADDU daddu
-#define PTR_ADDIU daddiu
-#define PTR_SUB dadd
-#define PTR_SUBI dsubi
-#define PTR_SUBU dsubu
-#define PTR_SUBIU dsubu
-#define PTR_L ld
-#define PTR_S sd
-#define PTR_SLL dsll
-#define PTR_SLLV dsllv
-#define PTR_SRL dsrl
-#define PTR_SRLV dsrlv
-#define PTR_SRA dsra
-#define PTR_SRAV dsrav
-
-#define PTR_SCALESHIFT 3
+#if _MIPS_SIM == _MIPS_SIM_NABI32
+# define PTR_ADD add
+# define PTR_ADDI addi
+# define PTR_ADDU add /* no u */
+# define PTR_ADDIU addi /* no u */
+# define PTR_SUB add
+# define PTR_SUBI subi
+# define PTR_SUBU sub /* no u */
+# define PTR_SUBIU sub /* no u */
+# define PTR_L lw
+# define PTR_LA la
+# define PTR_S sw
+# define PTR_SLL sll
+# define PTR_SLLV sllv
+# define PTR_SRL srl
+# define PTR_SRLV srlv
+# define PTR_SRA sra
+# define PTR_SRAV srav
+
+# define PTR_SCALESHIFT 2
+#endif
+
+#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZLONG == 64) \
+ || _MIPS_SIM == _MIPS_SIM_ABI64
+# define PTR_ADD dadd
+# define PTR_ADDI daddi
+# define PTR_ADDU daddu
+# define PTR_ADDIU daddiu
+# define PTR_SUB dadd
+# define PTR_SUBI dsubi
+# define PTR_SUBU dsubu
+# define PTR_SUBIU dsubu
+# define PTR_L ld
+# define PTR_LA dla
+# define PTR_S sd
+# define PTR_SLL dsll
+# define PTR_SLLV dsllv
+# define PTR_SRL dsrl
+# define PTR_SRLV dsrlv
+# define PTR_SRA dsra
+# define PTR_SRAV dsrav
+
+# define PTR_SCALESHIFT 3
#endif
/*
* Some cp0 registers were extended to 64bit for MIPS III.
*/
#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
-#define MFC0 mfc0
-#define MTC0 mtc0
+# define MFC0 mfc0
+# define MTC0 mtc0
#endif
#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
(_MIPS_ISA == _MIPS_ISA_MIPS5)
-#define MFC0 dmfc0
-#define MTC0 dmtc0
+# define MFC0 dmfc0
+# define MTC0 dmtc0
#endif
#endif /* sys/asm.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d5b725772d11d8ad335d1948f490a81593cc03d
commit 0d5b725772d11d8ad335d1948f490a81593cc03d
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 08:43:13 2003 +0000
* sysdeps/mips/dl-machine.h: Include sys/asm.h.
(elf_machine_matches_host): Prevent linking of o32 and n32
together.
(elf_machine_dynamic): Document assumption on $gp.
(STRINGXP, STRINGXV, STRINGV_): New macros.
(elf_machine_load_address): Use them to stringize PTR_LA and
PTR_SUBU.
(ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS,
ELF_DL_RESTORE_ARG_REGS, IFABIO32): New macros used in...
(_dl_runtime_resolve): Adjust it for all 3 ABIs.
(__dl_runtime_resolve): Cast the symtab initializer to the
right type.
(RTLD_START): Use it. Adjust it for all 3 ABIs.
(elf_machine_rel): Mark as always_inline in RTLD_BOOTSTRAP.
Handle 64-bit R_MIPS_REL composite relocation and accept
R_MIPS_64 relocations to shift addend size to 64 bits.
Document assumption regarding local GOT entries. Document
backward-compatibility departing from the ABI behavior in
applying relocations that reference section symbols, no longer
used. Support relocations to mis-aligned offsets.
* sysdeps/mips/mips64/dl-machine.h: Deleted, obsolete.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c4864c2..62c3f20 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -32,6 +32,8 @@
#error ENTRY_POINT needs to be defined for MIPS.
#endif
+#include <sys/asm.h>
+
/* The offset of gp from GOT might be system-dependent. It's set by
ld. The same value is also */
#define OFFSET_GP_GOT 0x7ff0
@@ -72,6 +74,13 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
static inline int __attribute_used__
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
+#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32
+ /* Don't link o32 and n32 together. */
+ if (((ehdr->e_flags & EF_MIPS_ABI2) != 0)
+ != (_MIPS_SIM != _MIPS_SIM_ABI32))
+ return 0;
+#endif
+
switch (ehdr->e_machine)
{
case EM_MIPS:
@@ -91,7 +100,7 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
- uses global data. */
+ uses global data. We assume its $gp points to the primary GOT. */
static inline ElfW(Addr)
elf_machine_dynamic (void)
{
@@ -99,6 +108,9 @@ elf_machine_dynamic (void)
return *elf_mips_got_from_gpreg (gp);
}
+#define STRINGXP(X) __STRING(X)
+#define STRINGXV(X) STRINGV_(X)
+#define STRINGV_(...) # __VA_ARGS__
/* Return the run-time load address of the shared object. */
static inline ElfW(Addr)
@@ -106,10 +118,10 @@ elf_machine_load_address (void)
{
ElfW(Addr) addr;
asm (" .set noreorder\n"
- " la %0, here\n"
- " bltzal $0, here\n"
+ " " STRINGXP (PTR_LA) " %0, 0f\n"
+ " bltzal $0, 0f\n"
" nop\n"
- "here: subu %0, $31, %0\n"
+ "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n"
" .set reorder\n"
: "=r" (addr)
: /* No inputs */
@@ -242,6 +254,55 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
return NULL;
}
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+#define ELF_DL_FRAME_SIZE 40
+
+#define ELF_DL_SAVE_ARG_REGS "\
+ sw $15, 36($29)\n \
+ sw $4, 16($29)\n \
+ sw $5, 20($29)\n \
+ sw $6, 24($29)\n \
+ sw $7, 28($29)\n \
+"
+
+#define ELF_DL_RESTORE_ARG_REGS "\
+ lw $31, 36($29)\n \
+ lw $4, 16($29)\n \
+ lw $5, 20($29)\n \
+ lw $6, 24($29)\n \
+ lw $7, 28($29)\n \
+"
+
+#define IFABIO32(X) X
+
+#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */
+
+#define ELF_DL_FRAME_SIZE 64
+
+#define ELF_DL_SAVE_ARG_REGS "\
+ sd $15, 56($29)\n \
+ sd $4, 8($29)\n \
+ sd $5, 16($29)\n \
+ sd $6, 24($29)\n \
+ sd $7, 32($29)\n \
+ sd $8, 40($29)\n \
+ sd $9, 48($29)\n \
+"
+
+#define ELF_DL_RESTORE_ARG_REGS "\
+ ld $31, 56($29)\n \
+ ld $4, 8($29)\n \
+ ld $5, 16($29)\n \
+ ld $6, 24($29)\n \
+ ld $7, 32($29)\n \
+ ld $8, 40($29)\n \
+ ld $9, 48($29)\n \
+"
+
+#define IFABIO32(X)
+
+#endif
+
/* Define mips specific runtime resolver. The function __dl_runtime_resolve
is called from assembler function _dl_runtime_resolve which converts
special argument registers t7 ($15) and t8 ($24):
@@ -272,9 +333,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const void *) D_PTR (l, l_info[DT_SYMTAB]); \
- const char *strtab \
- = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
+ = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \
+ const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
ElfW(Addr) *got \
= (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
const ElfW(Word) local_gotno \
@@ -333,36 +393,30 @@ asm ("\n \
.type _dl_runtime_resolve,@function\n \
.ent _dl_runtime_resolve\n \
_dl_runtime_resolve:\n \
- .frame $29, 40, $31\n \
+ .frame $29, " STRINGXP(ELF_DL_FRAME_SIZE) ", $31\n \
.set noreorder\n \
# Save GP.\n \
move $3, $28\n \
+ # Save arguments and sp value in stack.\n \
+ " STRINGXP(PTR_SUBIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \
# Modify t9 ($25) so as to point .cpload instruction.\n \
- addu $25, 8\n \
+ " IFABIO32(STRINGXP(PTR_ADDIU) " $25, 12\n") " \
# Compute GP.\n \
- .cpload $25\n \
+ " STRINGXP(SETUP_GP) "\n \
+ " STRINGXV(SETUP_GP64 (0, _dl_runtime_resolve)) "\n \
.set reorder\n \
# Save slot call pc.\n \
move $2, $31\n \
- # Save arguments and sp value in stack.\n \
- subu $29, 40\n \
- .cprestore 32\n \
- sw $15, 36($29)\n \
- sw $4, 16($29)\n \
- sw $5, 20($29)\n \
- sw $6, 24($29)\n \
- sw $7, 28($29)\n \
+ " IFABIO32(STRINGXP(CPRESTORE(32))) "\n \
+ " ELF_DL_SAVE_ARG_REGS " \
move $4, $24\n \
move $5, $15\n \
move $6, $3\n \
move $7, $2\n \
jal __dl_runtime_resolve\n \
- lw $31, 36($29)\n \
- lw $4, 16($29)\n \
- lw $5, 20($29)\n \
- lw $6, 24($29)\n \
- lw $7, 28($29)\n \
- addu $29, 40\n \
+ " ELF_DL_RESTORE_ARG_REGS " \
+ " STRINGXP(RESTORE_GP64) "\n \
+ " STRINGXP(PTR_ADDIU) " $29, " STRINGXP(ELF_DL_FRAME_SIZE) "\n \
move $25, $2\n \
jr $25\n \
.end _dl_runtime_resolve\n \
@@ -374,7 +428,6 @@ _dl_runtime_resolve:\n \
#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point.
@@ -392,71 +445,71 @@ _dl_runtime_resolve:\n \
#define RTLD_START asm (\
".text\n"\
- _RTLD_PROLOGUE(ENTRY_POINT)\
- ".set noreorder\n\
- bltzal $0, 0f\n\
- nop\n\
-0: .cpload $31\n\
- .set reorder\n\
+ _RTLD_PROLOGUE(ENTRY_POINT) "\
+ " STRINGXV(SETUP_GPX($25)) "\n\
+ " STRINGXV(SETUP_GPX64($18,$25)) "\n\
# i386 ABI book says that the first entry of GOT holds\n\
# the address of the dynamic structure. Though MIPS ABI\n\
# doesn't say nothing about this, I emulate this here.\n\
- la $4, _DYNAMIC\n\
+ " STRINGXP(PTR_LA) " $4, _DYNAMIC\n\
# Subtract OFFSET_GP_GOT\n\
- sw $4, -0x7ff0($28)\n\
+ " STRINGXP(PTR_S) " $4, -0x7ff0($28)\n\
move $4, $29\n\
- subu $29, 16\n\
+ " STRINGXP(PTR_SUBIU) " $29, 16\n\
\n\
- la $8, coff\n\
- bltzal $8, coff\n\
-coff: subu $8, $31, $8\n\
+ " STRINGXP(PTR_LA) " $8, .Lcoff\n\
+ bltzal $8, .Lcoff\n\
+.Lcoff: " STRINGXP(PTR_SUBU) " $8, $31, $8\n\
\n\
- la $25, _dl_start\n\
- addu $25, $8\n\
+ " STRINGXP(PTR_LA) " $25, _dl_start\n\
+ " STRINGXP(PTR_ADDU) " $25, $8\n\
jalr $25\n\
\n\
- addiu $29, 16\n\
+ " STRINGXP(PTR_ADDIU) " $29, 16\n\
# Get the value of label '_dl_start_user' in t9 ($25).\n\
- la $25, _dl_start_user\n\
+ " STRINGXP(PTR_LA) " $25, _dl_start_user\n\
.globl _dl_start_user\n\
+ .type _dl_start_user,@function\n\
+ .ent _dl_start_user\n\
_dl_start_user:\n\
- .set noreorder\n\
- .cpload $25\n\
- .set reorder\n\
+ " STRINGXP(SETUP_GP) "\n\
+ " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
move $16, $28\n\
# Save the user entry point address in a saved register.\n\
move $17, $2\n\
# Store the highest stack address\n\
- sw $29, __libc_stack_end\n\
+ " STRINGXP(PTR_S) " $29, __libc_stack_end\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
lw $2, _dl_skip_args\n\
beq $2, $0, 1f\n\
# Load the original argument count.\n\
- lw $4, 0($29)\n\
+ " STRINGXP(PTR_L) " $4, 0($29)\n\
# Subtract _dl_skip_args from it.\n\
subu $4, $2\n\
# Adjust the stack pointer to skip _dl_skip_args words.\n\
- sll $2, 2\n\
- addu $29, $2\n\
+ sll $2, " STRINGXP (PTRLOG) "\n\
+ " STRINGXP(PTR_ADDU) " $29, $2\n\
# Save back the modified argument count.\n\
- sw $4, 0($29)\n\
+ " STRINGXP(PTR_S) " $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _rtld_local\n\
- lw $5, 0($29)\n\
- la $6, 4($29)\n\
- sll $7, $5, 2\n\
- addu $7, $7, $6\n\
- addu $7, $7, 4\n\
- subu $29, 16\n\
+ " STRINGXP(PTR_L) " $4, _rtld_local\n\
+ " STRINGXP(PTR_L) /* or lw??? fixme */ " $5, 0($29)\n\
+ " STRINGXP(PTR_LA) " $6, " STRINGXP (PTRSIZE) "($29)\n\
+ sll $7, $5, " STRINGXP (PTRLOG) "\n\
+ " STRINGXP(PTR_ADDU) " $7, $7, $6\n\
+ " STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
+ " STRINGXP(PTR_SUBIU) " $29, 32\n\
+ " STRINGXP(SAVE_GP(16)) "\n\
# Call the function to run the initializers.\n\
jal _dl_init_internal\n\
- addiu $29, 16\n\
+ " STRINGXP(PTR_ADDIU) " $29, 32\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
- la $2, _dl_fini\n\
+ " STRINGXP(PTR_LA) " $2, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
- jr $25\n\t"\
+ jr $25\n\
+ .end _dl_start_user\n\t"\
_RTLD_EPILOGUE(ENTRY_POINT)\
".previous"\
);
@@ -472,6 +525,9 @@ _dl_start_user:\n\
MAP is the object containing the reloc. */
static inline void
+#ifdef RTLD_BOOTSTRAP
+ __attribute__ ((always_inline))
+#endif
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
ElfW(Addr) *const reloc_addr)
@@ -490,9 +546,19 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
switch (r_type)
{
+#if _MIPS_SIM == _MIPS_SIM_ABI64
+ case (R_MIPS_64 << 8) | R_MIPS_REL32:
+#else
case R_MIPS_REL32:
+#endif
{
int symidx = ELFW(R_SYM) (reloc->r_info);
+ ElfW(Addr) reloc_value;
+
+ /* Support relocations on mis-aligned offsets. Should we ever
+ implement RELA, this should be replaced with an assignment
+ from reloc->r_addend. */
+ __builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value));
if (symidx)
{
@@ -501,10 +567,25 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
if (symidx < gotsym)
{
+ /* This wouldn't work for a symbol imported from other
+ libraries for which there's no GOT entry, but MIPS
+ requires every symbol referenced in a dynamic
+ relocation to have a GOT entry in the primary GOT,
+ so we only get here for locally-defined symbols.
+ For section symbols, we should *NOT* be adding
+ sym->st_value (per the definition of the meaning of
+ S in reloc expressions in the ELF64 MIPS ABI),
+ since it should have already been added to
+ reloc_value by the linker, but older versions of
+ GNU ld didn't add it, and newer versions don't emit
+ useless relocations to section symbols any more, so
+ it is safe to keep on adding sym->st_value, even
+ though it's not ABI compliant. Some day we should
+ bite the bullet and stop doing this. */
#ifndef RTLD_BOOTSTRAP
if (map != &GL(dl_rtld_map))
#endif
- *reloc_addr += sym->st_value + map->l_addr;
+ reloc_value += sym->st_value + map->l_addr;
}
else
{
@@ -515,7 +596,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
= (const ElfW(Word))
map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
- *reloc_addr += got[symidx + local_gotno - gotsym];
+ reloc_value += got[symidx + local_gotno - gotsym];
#endif
}
}
@@ -523,11 +604,27 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
#ifndef RTLD_BOOTSTRAP
if (map != &GL(dl_rtld_map))
#endif
- *reloc_addr += map->l_addr;
+ reloc_value += map->l_addr;
+
+ __builtin_memcpy (reloc_addr, &reloc_value, sizeof (reloc_value));
}
break;
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
+#if _MIPS_SIM == _MIPS_SIM_ABI64
+ case R_MIPS_64:
+ /* For full compliance with the ELF64 ABI, one must precede the
+ _REL32/_64 pair of relocations with a _64 relocation, such
+ that the in-place addend is read as a 64-bit value. IRIX
+ didn't pick up on this requirement, so we treat the
+ _REL32/_64 relocation as a 64-bit relocation even if it's by
+ itself. For ABI compliance, we ignore such _64 dummy
+ relocations. For RELA, this may be simply removed, since
+ it's totally unnecessary. */
+ if (ELFW(R_SYM) (reloc->r_info) == 0)
+ break;
+ /* Fall through. */
+#endif
default:
_dl_reloc_bad_type (map, r_type, 0);
break;
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
deleted file mode 100644
index 64731b8..0000000
--- a/sysdeps/mips/mips64/dl-machine.h
+++ /dev/null
@@ -1,594 +0,0 @@
-/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version.
- Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef dl_machine_h
-#define dl_machine_h
-
-#define ELF_MACHINE_NAME "MIPS"
-
-#define ELF_MACHINE_NO_PLT
-
-#include <entry.h>
-
-#ifndef ENTRY_POINT
-#error ENTRY_POINT needs to be defined for MIPS.
-#endif
-
-#ifndef _RTLD_PROLOGUE
-# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \
- "\n\t.ent " __STRING(entry) \
- "\n\t" __STRING(entry) ":\n\t"
-#endif
-
-#ifndef _RTLD_EPILOGUE
-# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n"
-#endif
-
-/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
- This makes no sense on MIPS but we have to define this to R_MIPS_REL32
- to avoid the asserts in dl-lookup.c from blowing. */
-#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
-#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT
-
-/* Translate a processor specific dynamic tag to the index
- in l_info array. */
-#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
-
-#if 0
-/* We may need 64k alignment. */
-#define ELF_MACHINE_ALIGN_MASK 0xffff
-#endif
-
-/*
- * MIPS libraries are usually linked to a non-zero base address. We
- * subtrace the base address from the address where we map the object
- * to. This results in more efficient address space usage.
- */
-#if 0
-#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
- (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
-#else
-#define MAP_BASE_ADDR(l) 0x5ffe0000
-#endif
-
-/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
- with the run-time address of the r_debug structure */
-#define ELF_MACHINE_DEBUG_SETUP(l,r) \
-do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
- *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
- (ElfW(Addr)) (r); \
- } while (0)
-
-/* Return nonzero iff ELF header is compatible with the running host. */
-static inline int __attribute__ ((unused))
-elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
-{
- switch (ehdr->e_machine)
- {
- case EM_MIPS:
- case EM_MIPS_RS3_LE:
- return 1;
- default:
- return 0;
- }
-}
-
-static inline ElfW(Addr) *
-elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
-{
- /* FIXME: the offset of gp from GOT may be system-dependent. */
- return (ElfW(Addr) *) (gpreg - 0x7ff0);
-}
-
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
-static inline ElfW(Addr)
-elf_machine_dynamic (void)
-{
- register ElfW(Addr) gp __asm__ ("$28");
-
- return *elf_mips_got_from_gpreg (gp);
-}
-
-
-/* Return the run-time load address of the shared object. */
-static inline ElfW(Addr)
-elf_machine_load_address (void)
-{
- ElfW(Addr) addr;
- asm (" .set noreorder\n"
- " dla %0, here\n"
- " bltzal $0, here\n"
- " nop\n"
- "here: dsubu %0, $31, %0\n"
- " .set reorder\n"
- : "=r" (addr)
- : /* No inputs */
- : "$31");
- return addr;
-}
-
-/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
-
-/* Relocate GOT. */
-static inline void
-elf_machine_got_rel (struct link_map *map, int lazy)
-{
- ElfW(Addr) *got;
- ElfW(Sym) *sym;
- int i, n;
- const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-
-#define RESOLVE_GOTSYM(sym) \
- ({ \
- const ElfW(Sym) *ref = sym; \
- ElfW(Addr) sym_loadaddr; \
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
- map->l_scope, \
- map->l_name, R_MIPS_REL32);\
- (ref)? sym_loadaddr + ref->st_value: 0; \
- })
-
- got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
-
- /* got[0] is reserved. got[1] is also reserved for the dynamic object
- generated by gnu ld. Skip these reserved entries from relocation. */
- i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
- n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
- /* Add the run-time display to all local got entries. */
- while (i < n)
- got[i++] += map->l_addr;
-
- /* Handle global got entries. */
- got += n;
- sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]);
- sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
- i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
-
- while (i--)
- {
- if (sym->st_shndx == SHN_UNDEF)
- {
- if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
- {
- if (sym->st_value && lazy)
- *got = sym->st_value + map->l_addr;
- else
- *got = RESOLVE_GOTSYM (sym);
- }
- else /* if (*got == 0 || *got == QS) */
- *got = RESOLVE_GOTSYM (sym);
- }
- else if (sym->st_shndx == SHN_COMMON)
- *got = RESOLVE_GOTSYM (sym);
- else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
- && *got != sym->st_value
- && lazy)
- *got += map->l_addr;
- else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
- {
- if (sym->st_other == 0)
- *got += map->l_addr;
- }
- else
- *got = RESOLVE_GOTSYM (sym);
-
- got++;
- sym++;
- }
-
-#undef RESOLVE_GOTSYM
-
- return;
-}
-
-/* Set up the loaded object described by L so its stub function
- will jump to the on-demand fixup code in dl-runtime.c. */
-
-static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
-{
- ElfW(Addr) *got;
- extern void _dl_runtime_resolve (ElfW(Word));
- extern int _dl_mips_gnu_objects;
-
-#ifdef RTLD_BOOTSTRAP
- {
- return lazy;
- }
-#endif
- if (lazy)
- {
- /* The GOT entries for functions have not yet been filled in.
- Their initial contents will arrange when called to put an
- offset into the .dynsym section in t8, the return address
- in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
-
- /* This function will get called to fix up the GOT entry indicated by
- the register t8, and then jump to the resolved address. */
- got[0] = (ElfW(Addr)) &_dl_runtime_resolve;
-
- /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB
- of got[1] of a gnu object is set to identify gnu objects.
- Where we can store l for non gnu objects? XXX */
- if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
- else
- _dl_mips_gnu_objects = 0;
- }
-
- /* Relocate global offset table. */
- elf_machine_got_rel (l, lazy);
-
- return lazy;
-}
-
-/* Get link_map for this object. */
-static inline struct link_map *
-elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
-{
- extern int _dl_mips_gnu_objects;
-
- /* got[1] is reserved to keep its link map address for the shared
- object generated by the gnu linker. If all are such objects, we
- can find the link map from current GPREG simply. If not so, get
- the link map for caller's object containing STUB_PC. */
-
- if (_dl_mips_gnu_objects)
- {
- ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
- ElfW(Word) g1;
-
- g1 = ((ElfW(Word) *) got)[1];
-
- if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
- {
- struct link_map *l =
- (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
- ElfW(Addr) base, limit;
- const ElfW(Phdr) *p = l->l_phdr;
- ElfW(Half) this, nent = l->l_phnum;
-
- /* For the common case of a stub being called from the containing
- object, STUB_PC will point to somewhere within the object that
- is described by the link map fetched via got[1]. Otherwise we
- have to scan all maps. */
- for (this = 0; this < nent; this++)
- {
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- limit = base + p[this].p_memsz;
- if (stub_pc >= base && stub_pc < limit)
- return l;
- }
- this++;
- }
- }
- }
-
- {
- struct link_map *l = GL(dl_loaded);
-
- while (l)
- {
- ElfW(Addr) base, limit;
- const ElfW(Phdr) *p = l->l_phdr;
- ElfW(Half) this, nent = l->l_phnum;
-
- for (this = 0; this < nent; this++)
- {
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- limit = base + p[this].p_memsz;
- if (stub_pc >= base && stub_pc < limit)
- return l;
- }
- }
- l = l->l_next;
- }
- }
-
- _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
- return NULL;
-}
-
-/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */
-#define elf_machine_relplt elf_machine_rel
-
-/* Define mips specific runtime resolver. The function __dl_runtime_resolve
- is called from assembler function _dl_runtime_resolve which converts
- special argument registers t7 ($15) and t8 ($24):
- t7 address to return to the caller of the function
- t8 index for this function symbol in .dynsym
- to usual c arguments. */
-
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
- generated by the gnu linker. */ \
-int _dl_mips_gnu_objects = 1; \
- \
-/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
- \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word) sym_index, \
- ElfW(Word) return_address, \
- ElfW(Addr) old_gpreg, \
- ElfW(Addr) stub_pc) \
-{ \
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
- const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \
- const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
- const ElfW(Addr) *got \
- = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
- const ElfW(Word) local_gotno \
- = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
- const ElfW(Word) gotsym \
- = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
- const ElfW(Sym) *definer; \
- ElfW(Addr) loadbase; \
- ElfW(Addr) funcaddr; \
- \
- /* Look up the symbol's run-time value. */ \
- definer = &symtab[sym_index]; \
- \
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
- l->l_scope, l->l_name, \
- R_MIPS_REL32); \
- \
- /* Apply the relocation with that value. */ \
- funcaddr = loadbase + definer->st_value; \
- *(got + local_gotno + sym_index - gotsym) = funcaddr; \
- \
- return funcaddr; \
-} \
- \
-asm ("\n \
- .text\n \
- .align 3\n \
- .globl _dl_runtime_resolve\n \
- .type _dl_runtime_resolve,@function\n \
- .ent _dl_runtime_resolve\n \
-_dl_runtime_resolve:\n \
- .set noreorder\n \
- # Save old GP to $3.\n \
- move $3,$28\n \
- # Modify t9 ($25) so as to point .cpload instruction.\n \
- daddu $25,2*8\n \
- # Compute GP.\n \
- .cpload $25\n \
- .set reorder\n \
- # Save slot call pc.\n \
- move $2, $31\n \
- # Save arguments and sp value in stack.\n \
- dsubu $29, 10*8\n \
- .cprestore 8*8\n \
- sd $15, 9*8($29)\n \
- sd $4, 3*8($29)\n \
- sd $5, 4*8($29)\n \
- sd $6, 5*8($29)\n \
- sd $7, 6*8($29)\n \
- sd $16, 7*8($29)\n \
- move $16, $29\n \
- move $4, $24\n \
- move $5, $15\n \
- move $6, $3\n \
- move $7, $2\n \
- jal __dl_runtime_resolve\n \
- move $29, $16\n \
- ld $31, 9*8($29)\n \
- ld $4, 3*8($29)\n \
- ld $5, 4*8($29)\n \
- ld $6, 5*8($29)\n \
- ld $7, 6*8($29)\n \
- ld $16, 7*8($29)\n \
- daddu $29, 10*8\n \
- move $25, $2\n \
- jr $25\n \
- .end _dl_runtime_resolve\n \
- .previous\n \
-");
-
-/* Mask identifying addresses reserved for the user program,
- where the dynamic linker should not map anything. */
-#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
-
-
-
-/* Initial entry point code for the dynamic linker.
- The C function `_dl_start' is the real entry point;
- its return value is the user program's entry point.
- Note how we have to be careful about two things:
-
- 1) That we allocate a minimal stack of 24 bytes for
- every function call, the MIPS ABI states that even
- if all arguments are passed in registers the procedure
- called can use the 16 byte area pointed to by $sp
- when it is called to store away the arguments passed
- to it.
-
- 2) That under Linux the entry is named __start
- and not just plain _start. */
-
-#define RTLD_START asm ("\
- .text\n\
- .align 3\n"\
-_RTLD_PROLOGUE (ENTRY_POINT)\
-" .globl _dl_start_user\n\
- .set noreorder\n\
- bltzal $0, 0f\n\
- nop\n\
-0: .cpload $31\n\
- .set reorder\n\
- # i386 ABI book says that the first entry of GOT holds\n\
- # the address of the dynamic structure. Though MIPS ABI\n\
- # doesn't say nothing about this, I emulate this here.\n\
- dla $4, _DYNAMIC\n\
- sd $4, -0x7ff0($28)\n\
- dsubu $29, 16\n\
- move $4, $29\n\
- jal _dl_start\n\
- daddiu $29, 16\n\
- # Get the value of label '_dl_start_user' in t9 ($25).\n\
- dla $25, _dl_start_user\n\
-_dl_start_user:\n\
- .set noreorder\n\
- .cpload $25\n\
- .set reorder\n\
- move $16, $28\n\
- # Save the user entry point address in saved register.\n\
- move $17, $2\n\
- # Store the highest stack address\n\
- sd $29, __libc_stack_end\n\
- # See if we were run as a command with the executable file\n\
- # name as an extra leading argument.\n\
- ld $2, _dl_skip_args\n\
- beq $2, $0, 1f\n\
- # Load the original argument count.\n\
- ld $4, 0($29)\n\
- # Subtract _dl_skip_args from it.\n\
- dsubu $4, $2\n\
- # Adjust the stack pointer to skip _dl_skip_args words.\n\
- dsll $2,2\n\
- daddu $29, $2\n\
- # Save back the modified argument count.\n\
- sd $4, 0($29)\n\
-1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- ld $4, _rtld_local\n\
- ld $5, 0($29)\n\
- dla $6, 4($29)\n\
- dla $7, 8($29)\n\
- dsubu $29, 16\n\
- # Call the function to run the initializers.\n\
- jal _dl_init_internal\n\
- daddiu $29, 16\n\
- # Pass our finalizer function to the user in ra.\n\
- dla $31, _dl_fini\n\
- # Jump to the user entry point.\n\
-1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _rtld_local\n\
- lw $5, 0($29)\n\
- la $6, 4($29)\n\
- la $7, 8($29)\n\
- subu $29, 16\n\
- # Call the function to run the initializers.\n\
- jal _dl_init_internal\n\
- addiu $29, 16\n\
- # Pass our finalizer function to the user in ra.\n\
- dla $31, _dl_fini\n\
- # Jump to the user entry point.\n\
- move $25, $17\n\
- ld $4, 0($29)\n\
- ld $5, 1*8($29)\n\
- ld $6, 2*8$29)\n\
- ld $7, 3*8($29)\n\
- jr $25\n"\
-_RTLD_EPILOGUE(ENTRY_POINT) \
- "\n.previous"\
-);
-
-
-/* The MIPS never uses Elfxx_Rela relocations. */
-#define ELF_MACHINE_NO_RELA 1
-
-#endif /* !dl_machine_h */
-
-#ifdef RESOLVE
-
-/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
- MAP is the object containing the reloc. */
-
-static inline void
-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version,
- ElfW(Addr) *const reloc_addr)
-{
- const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
- ElfW(Addr) loadbase;
- ElfW(Addr) undo __attribute__ ((unused));
-
- switch (r_type)
- {
- case R_MIPS_REL32:
- {
- ElfW(Addr) undo = 0;
-
- if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
- && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
- || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
- {
- *reloc_addr += map->l_addr;
- break;
- }
-#ifndef RTLD_BOOTSTRAP
- /* This is defined in rtld.c, but nowhere in the static libc.a;
- make the reference weak so static programs can still link. This
- declaration cannot be done when compiling rtld.c (i.e. #ifdef
- RTLD_BOOTSTRAP) because rtld.c contains the common defn for
- _dl_rtld_map, which is incompatible with a weak decl in the same
- file. */
-# ifndef SHARED
- weak_extern (GL(dl_rtld_map));
-# endif
- if (map == &GL(dl_rtld_map))
- /* Undo the relocation done here during bootstrapping. Now we will
- relocate it anew, possibly using a binding found in the user
- program or a loaded library rather than the dynamic linker's
- built-in definitions used while loading those libraries. */
- undo = map->l_addr + sym->st_value;
-#endif
- loadbase = RESOLVE (&sym, version, 0);
- *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
- }
- break;
-#ifndef RTLD_BOOTSTRAP
- case R_MIPS_NONE: /* Alright, Wilbur. */
- break;
-#endif
- default:
- _dl_reloc_bad_type (map, r_type, 0);
- break;
- }
-}
-
-static inline void
-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
- ElfW(Addr) *const reloc_addr)
-{
- /* XXX Nothing to do. There is no relative relocation, right? */
-}
-
-static inline void
-elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr,
- const ElfW(Rel) *reloc)
-{
- /* Do nothing. */
-}
-
-#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2e29db72203632d480042957765a8d6c2a454ee
commit d2e29db72203632d480042957765a8d6c2a454ee
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 07:52:05 2003 +0000
* sysdeps/unix/sysv/linux/mips/readelflib.c: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/readelflib.c b/sysdeps/unix/sysv/linux/mips/readelflib.c
new file mode 100644
index 0000000..73fd43f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/readelflib.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Alexandre Oliva <aoliva@redhat.com>
+ Based on work ../x86_64/readelflib.c,
+ contributed by Andreas Jaeger <aj@suse.de>, 1999 and
+ Jakub Jelinek <jakub@redhat.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+int process_elf32_file (const char *file_name, const char *lib, int *flag,
+ unsigned int *osversion, char **soname,
+ void *file_contents, size_t file_length);
+int process_elf64_file (const char *file_name, const char *lib, int *flag,
+ unsigned int *osversion, char **soname,
+ void *file_contents, size_t file_length);
+
+/* Returns 0 if everything is ok, != 0 in case of error. */
+int
+process_elf_file (const char *file_name, const char *lib, int *flag,
+ unsigned int *osversion, char **soname, void *file_contents,
+ size_t file_length)
+{
+ ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
+ int ret;
+
+ if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
+ {
+ ret = process_elf32_file (file_name, lib, flag, osversion, soname,
+ file_contents, file_length);
+
+ /* n32 libraries are always libc.so.6+. */
+ if (ret && (elf_header->e_flags & EF_MIPS_ABI2) != 0)
+ *flag = FLAG_MIPS64_LIBN32|FLAG_ELF_LIBC6;
+ }
+ else
+ {
+ ret = process_elf64_file (file_name, lib, flag, osversion, soname,
+ file_contents, file_length);
+ /* n64 libraries are always libc.so.6+. */
+ if (!ret)
+ *flag = FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6;
+ }
+
+ return ret;
+}
+
+#undef __ELF_NATIVE_CLASS
+#undef process_elf_file
+#define process_elf_file process_elf32_file
+#define __ELF_NATIVE_CLASS 32
+#include "sysdeps/generic/readelflib.c"
+
+#undef __ELF_NATIVE_CLASS
+#undef process_elf_file
+#define process_elf_file process_elf64_file
+#define __ELF_NATIVE_CLASS 64
+#include "sysdeps/generic/readelflib.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab35974e216286b0b4097b573a971ae7b258abee
commit ab35974e216286b0b4097b573a971ae7b258abee
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 07:49:05 2003 +0000
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
(_KERNEL_NSIG_BPW): Define in terms of _MIPS_SZLONG.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Define restore and
restore_rt functions. Use them.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
index 861866d..36d2667 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -23,7 +23,7 @@ struct old_kernel_sigaction {
#define _KERNEL_NSIG 128
-#define _KERNEL_NSIG_BPW 32
+#define _KERNEL_NSIG_BPW _MIPS_SZLONG
#define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW)
typedef struct {
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 0dee8cc..2a99bac 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -41,6 +41,15 @@ extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unboun
extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
struct kernel_sigaction *__unbounded, size_t);
+#if _MIPS_SIM != _MIPS_SIM_ABI32
+
+# ifdef __NR_rt_sigreturn
+static void restore_rt (void) asm ("__restore_rt");
+# endif
+# ifdef __NR_sigreturn
+static void restore (void) asm ("__restore");
+# endif
+#endif
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
@@ -74,7 +83,11 @@ __libc_sigaction (sig, act, oact)
memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t));
kact.sa_flags = act->sa_flags;
# ifdef HAVE_SA_RESTORER
+# if _MIPS_SIM == _MIPS_SIM_ABI32
kact.sa_restorer = act->sa_restorer;
+# else
+ kact.sa_restorer = &restore_rt;
+# endif
# endif
}
@@ -128,7 +141,11 @@ __libc_sigaction (sig, act, oact)
oact->sa_mask.__val[0] = k_osigact.sa_mask;
oact->sa_flags = k_osigact.sa_flags;
# ifdef HAVE_SA_RESTORER
+# if _MIPS_SIM == _MIPS_SIM_ABI32
oact->sa_restorer = k_osigact.sa_restorer;
+# else
+ oact->sa_restorer = &restore;
+# endif
# endif
}
return result;
@@ -141,3 +158,31 @@ weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
#endif
+
+/* NOTE: Please think twice before making any changes to the bits of
+ code below. GDB needs some intimate knowledge about it to
+ recognize them as signal trampolines, and make backtraces through
+ signal handlers work right. Important are both the names
+ (__restore_rt) and the exact instruction sequence.
+ If you ever feel the need to make any changes, please notify the
+ appropriate GDB maintainer. */
+
+#define RESTORE(name, syscall) RESTORE2 (name, syscall)
+#define RESTORE2(name, syscall) \
+asm \
+ ( \
+ ".align 4\n" \
+ "__" #name ":\n" \
+ " li $2, " #syscall "\n" \
+ " syscall\n" \
+ );
+
+/* The return code for realtime-signals. */
+#if _MIPS_SIM != _MIPS_SIM_ABI32
+# ifdef __NR_rt_sigreturn
+RESTORE (restore_rt, __NR_rt_sigreturn)
+# endif
+# ifdef __NR_sigreturn
+RESTORE (restore, __NR_sigreturn)
+# endif
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1dd24665befd04428beb07d8372bf083fe41d85c
commit 1dd24665befd04428beb07d8372bf083fe41d85c
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 07:03:36 2003 +0000
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Don't
.set mips2 on new abis.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 7ad916c..a840a94 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
@@ -41,7 +41,9 @@ _test_and_set (int *p, int v) __THROW
("/* Inline test and set */\n"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
"ll %0,%3\n\t"
"move %1,%4\n\t"
"beq %0,%4,2f\n\t"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b2c3a2a042439f69f5e13a26386d0865f7eb9e9
commit 2b2c3a2a042439f69f5e13a26386d0865f7eb9e9
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 05:31:28 2003 +0000
* sysdeps/mips/memcpy.S: Map t0-3 to a4-7 on new abis.
* sysdeps/mips/memset.S: Likewise.
* sysdeps/mips/sys/regdef.h: Alias a4-7 or t0-3 to $8-11
depending on the ABI.
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 3d49ac9..c77f1b8 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -40,6 +40,19 @@
# define SWLO swl /* low part is left in little-endian */
#endif
+#ifndef t0
+# define t0 a4
+#endif
+#ifndef t1
+# define t1 a5
+#endif
+#ifndef t2
+# define t2 a6
+#endif
+#ifndef t3
+# define t3 a7
+#endif
+
ENTRY (memcpy)
.set noreorder
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index 7825dea..4681134 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -34,6 +34,13 @@
# define SWHI swr /* high part is right in little-endian */
#endif
+#ifndef t0
+# define t0 a4
+#endif
+#ifndef t1
+# define t1 a5
+#endif
+
ENTRY (memset)
.set noreorder
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
index c4df603..f3a0df5 100644
--- a/sysdeps/mips/sys/regdef.h
+++ b/sysdeps/mips/sys/regdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -31,10 +31,17 @@
#define a1 $5
#define a2 $6
#define a3 $7
+#if _MIPS_SIM != _MIPS_SIM_ABI32
+#define a4 $8
+#define a5 $9
+#define a6 $10
+#define a7 $11
+#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
#define t0 $8 /* caller saved */
#define t1 $9
#define t2 $10
#define t3 $11
+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
#define t4 $12
#define t5 $13
#define t6 $14
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04a836884574da485f011830b501601c9e8a6f37
commit 04a836884574da485f011830b501601c9e8a6f37
Author: Alexandre Oliva <aoliva@redhat.com>
Date: Fri Mar 14 05:30:31 2003 +0000
* sysdeps/mips/atomicity.h (exchange_and_add, atomic_add):
Don't .set mips2 on new abi.
(compare_and_swap): Likewise. Support 64-bit longs on n64.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index bccacd9..5148121 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -1,5 +1,5 @@
/* Low-level functions for atomic operations. Mips version.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,9 @@ exchange_and_add (volatile uint32_t *mem, int val)
("/* Inline exchange & add */\n"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
"ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
@@ -56,7 +58,9 @@ atomic_add (volatile uint32_t *mem, int val)
("/* Inline atomic add */\n"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
"ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"
@@ -78,12 +82,22 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
("/* Inline compare & swap */\n"
"1:\n\t"
".set push\n\t"
+#if _MIPS_SIM == _MIPS_SIM_ABI32
".set mips2\n\t"
+#endif
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ "lld %1,%5\n\t"
+#else
"ll %1,%5\n\t"
+#endif
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
"move %0,%4\n\t"
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+ "scd %0,%2\n\t"
+#else
"sc %0,%2\n\t"
+#endif
".set pop\n\t"
"beqz %0,1b\n"
"2:\n\t"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e9a97580aa04fab180261f36bd774b24445d553
commit 3e9a97580aa04fab180261f36bd774b24445d553
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 14 03:59:37 2003 +0000
2003-03-13 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/mips/add_n.S: Use L macro for local labels.
* sysdeps/mips/addmul_1.S: Likewise.
* sysdeps/mips/lshift.S: Likewise.
* sysdeps/mips/memcpy.S: Likewise.
* sysdeps/mips/memset.S: Likewise.
* sysdeps/mips/mul_1.S: Likewise.
* sysdeps/mips/rshift.S: Likewise.
* sysdeps/mips/sub_n.S: Likewise.
* sysdeps/mips/submul_1.S: Likewise.
* sysdeps/mips/mips64/add_n.S: Likewise.
* sysdeps/mips/mips64/addmul_1.S: Likewise.
* sysdeps/mips/mips64/lshift.S: Likewise.
* sysdeps/mips/mips64/mul_1.S: Likewise.
* sysdeps/mips/mips64/rshift.S: Likewise.
* sysdeps/mips/mips64/sub_n.S: Likewise.
* sysdeps/mips/mips64/submul_1.S: Likewise.
* sysdeps/unix/mips/sysdep.h: Define L() according to ABI
conventions. Define END as in sys/asm.h.
* sysdeps/unix/mips/sysdep.S: Likewise.
* sysdeps/unix/mips/wait.S: Likewise.
* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index da7b2d4..c82871f 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -1,7 +1,7 @@
/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
store sum in a third limb vector.
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -43,12 +43,12 @@ ENTRY (__mpn_add_n)
addiu $7,$7,-1
and $9,$7,4-1 /* number of limbs in first loop */
- beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
+ beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */
move $2,$0
subu $7,$7,$9
-.Loop0: addiu $9,$9,-1
+L(Loop0): addiu $9,$9,-1
lw $12,4($5)
addu $11,$11,$2
lw $13,4($6)
@@ -62,13 +62,13 @@ ENTRY (__mpn_add_n)
addiu $6,$6,4
move $10,$12
move $11,$13
- bne $9,$0,.Loop0
- addiu $4,$4,4
+ bne $9,$0,L(Loop0)
+ addiu $4,$4,4
-.L0: beq $7,$0,.Lend
- nop
+L(L0): beq $7,$0,L(end)
+ nop
-.Loop: addiu $7,$7,-4
+L(Loop): addiu $7,$7,-4
lw $12,4($5)
addu $11,$11,$2
@@ -109,10 +109,10 @@ ENTRY (__mpn_add_n)
addiu $5,$5,16
addiu $6,$6,16
- bne $7,$0,.Loop
- addiu $4,$4,16
+ bne $7,$0,L(Loop)
+ addiu $4,$4,16
-.Lend: addu $11,$11,$2
+L(end): addu $11,$11,$2
sltu $8,$11,$2
addu $11,$10,$11
sltu $2,$11,$10
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
index 32df1d7..3e1fc09 100644
--- a/sysdeps/mips/addmul_1.S
+++ b/sysdeps/mips/addmul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
add the product to a second limb vector.
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -46,14 +46,14 @@ ENTRY (__mpn_addmul_1)
multu $8,$7
addiu $6,$6,-1
- beq $6,$0,$LC0
+ beq $6,$0,L(LC0)
move $2,$0 /* zero cy2 */
addiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
lw $8,0($5) /* load new s1 limb as early as possible */
-Loop: lw $10,0($4)
+L(Loop): lw $10,0($4)
mflo $3
mfhi $9
addiu $5,$5,4
@@ -67,11 +67,11 @@ Loop: lw $10,0($4)
addu $2,$2,$10
sw $3,0($4)
addiu $4,$4,4
- bne $6,$0,Loop /* should be "bnel" */
+ bne $6,$0,L(Loop) /* should be "bnel" */
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 1 */
-$LC1: lw $10,0($4)
+L(LC1): lw $10,0($4)
mflo $3
mfhi $9
addu $3,$3,$2
@@ -85,7 +85,7 @@ $LC1: lw $10,0($4)
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 0 */
-$LC0: lw $10,0($4)
+L(LC0): lw $10,0($4)
mflo $3
mfhi $9
addu $3,$3,$2
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
index b1a858d..0217bfc 100644
--- a/sysdeps/mips/lshift.S
+++ b/sysdeps/mips/lshift.S
@@ -1,6 +1,6 @@
/* MIPS2 __mpn_lshift --
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -44,12 +44,12 @@ ENTRY (__mpn_lshift)
addu $4,$4,$2 /* make r4 point at end of res */
addiu $6,$6,-1
and $9,$6,4-1 /* number of limbs in first loop */
- beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
- srl $2,$10,$13 /* compute function result */
+ beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */
+ srl $2,$10,$13 /* compute function result */
subu $6,$6,$9
-.Loop0: lw $3,-8($5)
+L(Loop0): lw $3,-8($5)
addiu $4,$4,-4
addiu $5,$5,-4
addiu $9,$9,-1
@@ -57,13 +57,13 @@ ENTRY (__mpn_lshift)
srl $12,$3,$13
move $10,$3
or $8,$11,$12
- bne $9,$0,.Loop0
- sw $8,0($4)
+ bne $9,$0,L(Loop0)
+ sw $8,0($4)
-.L0: beq $6,$0,.Lend
- nop
+L(L0): beq $6,$0,L(Lend)
+ nop
-.Loop: lw $3,-8($5)
+L(Loop): lw $3,-8($5)
addiu $4,$4,-16
addiu $6,$6,-4
sll $11,$10,$7
@@ -89,10 +89,10 @@ ENTRY (__mpn_lshift)
addiu $5,$5,-16
or $8,$14,$9
- bgtz $6,.Loop
- sw $8,0($4)
+ bgtz $6,L(Loop)
+ sw $8,0($4)
-.Lend: sll $8,$10,$7
+L(Lend): sll $8,$10,$7
j $31
sw $8,-4($4)
END (__mpn_lshift)
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
index 394265e..3d49ac9 100644
--- a/sysdeps/mips/memcpy.S
+++ b/sysdeps/mips/memcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
@@ -44,27 +44,27 @@ ENTRY (memcpy)
.set noreorder
slti t0, a2, 8 # Less than 8?
- bne t0, zero, $last8
+ bne t0, zero, L(last8)
move v0, a0 # Setup exit value before too late
xor t0, a1, a0 # Find a0/a1 displacement
andi t0, 0x3
- bne t0, zero, $shift # Go handle the unaligned case
+ bne t0, zero, L(shift) # Go handle the unaligned case
subu t1, zero, a1
andi t1, 0x3 # a0/a1 are aligned, but are we
- beq t1, zero, $chk8w # starting in the middle of a word?
+ beq t1, zero, L(chk8w) # starting in the middle of a word?
subu a2, t1
LWHI t0, 0(a1) # Yes we are... take care of that
addu a1, t1
SWHI t0, 0(a0)
addu a0, t1
-$chk8w: andi t0, a2, 0x1f # 32 or more bytes left?
- beq t0, a2, $chk1w
+L(chk8w): andi t0, a2, 0x1f # 32 or more bytes left?
+ beq t0, a2, L(chk1w)
subu a3, a2, t0 # Yes
addu a3, a1 # a3 = end address of loop
move a2, t0 # a2 = what will be left after loop
-$lop8w: lw t0, 0(a1) # Loop taking 8 words at a time
+L(lop8w): lw t0, 0(a1) # Loop taking 8 words at a time
lw t1, 4(a1)
lw t2, 8(a1)
lw t3, 12(a1)
@@ -81,49 +81,49 @@ $lop8w: lw t0, 0(a1) # Loop taking 8 words at a time
sw t4, -16(a0)
sw t5, -12(a0)
sw t6, -8(a0)
- bne a1, a3, $lop8w
+ bne a1, a3, L(lop8w)
sw t7, -4(a0)
-$chk1w: andi t0, a2, 0x3 # 4 or more bytes left?
- beq t0, a2, $last8
+L(chk1w): andi t0, a2, 0x3 # 4 or more bytes left?
+ beq t0, a2, L(last8)
subu a3, a2, t0 # Yes, handle them one word at a time
addu a3, a1 # a3 again end address
move a2, t0
-$lop1w: lw t0, 0(a1)
+L(lop1w): lw t0, 0(a1)
addiu a0, 4
addiu a1, 4
- bne a1, a3, $lop1w
+ bne a1, a3, L(lop1w)
sw t0, -4(a0)
-$last8: blez a2, $lst8e # Handle last 8 bytes, one at a time
+L(last8): blez a2, L(lst8e) # Handle last 8 bytes, one at a time
addu a3, a2, a1
-$lst8l: lb t0, 0(a1)
+L(lst8l): lb t0, 0(a1)
addiu a0, 1
addiu a1, 1
- bne a1, a3, $lst8l
+ bne a1, a3, L(lst8l)
sb t0, -1(a0)
-$lst8e: jr ra # Bye, bye
+L(lst8e): jr ra # Bye, bye
nop
-$shift: subu a3, zero, a0 # Src and Dest unaligned
+L(shift): subu a3, zero, a0 # Src and Dest unaligned
andi a3, 0x3 # (unoptimized case...)
- beq a3, zero, $shft1
+ beq a3, zero, L(shft1)
subu a2, a3 # a2 = bytes left
LWHI t0, 0(a1) # Take care of first odd part
LWLO t0, 3(a1)
addu a1, a3
SWHI t0, 0(a0)
addu a0, a3
-$shft1: andi t0, a2, 0x3
+L(shft1): andi t0, a2, 0x3
subu a3, a2, t0
addu a3, a1
-$shfth: LWHI t1, 0(a1) # Limp through, word by word
+L(shfth): LWHI t1, 0(a1) # Limp through, word by word
LWLO t1, 3(a1)
addiu a0, 4
addiu a1, 4
- bne a1, a3, $shfth
+ bne a1, a3, L(shfth)
sw t1, -4(a0)
- b $last8 # Handle anything which may be left
+ b L(last8) # Handle anything which may be left
move a2, t0
.set reorder
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
index 7e3f129..7825dea 100644
--- a/sysdeps/mips/memset.S
+++ b/sysdeps/mips/memset.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
@@ -38,45 +38,45 @@ ENTRY (memset)
.set noreorder
slti t1, a2, 8 # Less than 8?
- bne t1, zero, $last8
+ bne t1, zero, L(last8)
move v0, a0 # Setup exit value before too late
- beq a1, zero, $ueven # If zero pattern, no need to extend
+ beq a1, zero, L(ueven) # If zero pattern, no need to extend
andi a1, 0xff # Avoid problems with bogus arguments
sll t0, a1, 8
or a1, t0
sll t0, a1, 16
or a1, t0 # a1 is now pattern in full word
-$ueven: subu t0, zero, a0 # Unaligned address?
+L(ueven): subu t0, zero, a0 # Unaligned address?
andi t0, 0x3
- beq t0, zero, $chkw
+ beq t0, zero, L(chkw)
subu a2, t0
SWHI a1, 0(a0) # Yes, handle first unaligned part
addu a0, t0 # Now both a0 and a2 are updated
-$chkw: andi t0, a2, 0x7 # Enough left for one loop iteration?
- beq t0, a2, $chkl
+L(chkw): andi t0, a2, 0x7 # Enough left for one loop iteration?
+ beq t0, a2, L(chkl)
subu a3, a2, t0
addu a3, a0 # a3 is last loop address +1
move a2, t0 # a2 is now # of bytes left after loop
-$loopw: addiu a0, 8 # Handle 2 words pr. iteration
+L(loopw): addiu a0, 8 # Handle 2 words pr. iteration
sw a1, -8(a0)
- bne a0, a3, $loopw
+ bne a0, a3, L(loopw)
sw a1, -4(a0)
-$chkl: andi t0, a2, 0x4 # Check if there is at least a full
- beq t0, zero, $last8 # word remaining after the loop
+L(chkl): andi t0, a2, 0x4 # Check if there is at least a full
+ beq t0, zero, L(last8) # word remaining after the loop
subu a2, t0
sw a1, 0(a0) # Yes...
addiu a0, 4
-$last8: blez a2, $exit # Handle last 8 bytes (if cnt>0)
+L(last8): blez a2, L(exit) # Handle last 8 bytes (if cnt>0)
addu a3, a2, a0 # a3 is last address +1
-$lst8l: addiu a0, 1
- bne a0, a3, $lst8l
+L(lst8l): addiu a0, 1
+ bne a0, a3, L(lst8l)
sb a1, -1(a0)
-$exit: j ra # Bye, bye
+L(exit): j ra # Bye, bye
nop
.set reorder
diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S
index 771d519..072f4f0 100644
--- a/sysdeps/mips/mips64/add_n.S
+++ b/sysdeps/mips/mips64/add_n.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
* store sum in a third limb vector.
*
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -22,6 +22,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/*
* INPUT PARAMETERS
@@ -38,10 +39,10 @@
.globl __mpn_add_n
.ent __mpn_add_n
__mpn_add_n:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
ld $10,0($5)
@@ -49,12 +50,12 @@ __mpn_add_n:
daddiu $7,$7,-1
and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
+ beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop
+ move $2,$0
dsubu $7,$7,$9
-.Loop0: daddiu $9,$9,-1
+L(Loop0): daddiu $9,$9,-1
ld $12,8($5)
daddu $11,$11,$2
ld $13,8($6)
@@ -68,13 +69,13 @@ __mpn_add_n:
daddiu $6,$6,8
move $10,$12
move $11,$13
- bne $9,$0,.Loop0
- daddiu $4,$4,8
+ bne $9,$0,L(Loop0)
+ daddiu $4,$4,8
-.L0: beq $7,$0,.Lend
- nop
+L(L0): beq $7,$0,L(Lend)
+ nop
-.Loop: daddiu $7,$7,-4
+L(Loop): daddiu $7,$7,-4
ld $12,8($5)
daddu $11,$11,$2
@@ -115,10 +116,10 @@ __mpn_add_n:
daddiu $5,$5,32
daddiu $6,$6,32
- bne $7,$0,.Loop
- daddiu $4,$4,32
+ bne $7,$0,L(Loop)
+ daddiu $4,$4,32
-.Lend: daddu $11,$11,$2
+L(Lend): daddu $11,$11,$2
sltu $8,$11,$2
daddu $11,$10,$11
sltu $2,$11,$10
diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S
index f6cf428..f5ecd83 100644
--- a/sysdeps/mips/mips64/addmul_1.S
+++ b/sysdeps/mips/mips64/addmul_1.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
* add the product to a second limb vector.
*
- * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -22,6 +22,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -38,10 +39,10 @@
.globl __mpn_addmul_1
.ent __mpn_addmul_1
__mpn_addmul_1:
- .set noreorder
#ifdef PIC
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
# warm up phase 0
@@ -52,14 +53,14 @@ __mpn_addmul_1:
dmultu $8,$7
daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
+ beq $6,$0,L(LC0)
+ move $2,$0 # zero cy2
daddiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
ld $8,0($5) # load new s1 limb as early as possible
-Loop: ld $10,0($4)
+L(Loop): ld $10,0($4)
mflo $3
mfhi $9
daddiu $5,$5,8
@@ -73,11 +74,11 @@ Loop: ld $10,0($4)
daddu $2,$2,$10
sd $3,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
+ bne $6,$0,L(Loop)
+ daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
-$LC1: ld $10,0($4)
+L(LC1): ld $10,0($4)
mflo $3
mfhi $9
daddu $3,$3,$2
@@ -91,7 +92,7 @@ $LC1: ld $10,0($4)
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 0
-$LC0: ld $10,0($4)
+L(LC0): ld $10,0($4)
mflo $3
mfhi $9
daddu $3,$3,$2
diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S
index d06ba0d..20f9e3d 100644
--- a/sysdeps/mips/mips64/lshift.S
+++ b/sysdeps/mips/mips64/lshift.S
@@ -1,6 +1,6 @@
/* MIPS3 __mpn_lshift --
*
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -21,6 +21,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -37,10 +38,10 @@
.globl __mpn_lshift
.ent __mpn_lshift
__mpn_lshift:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
dsll $2,$6,3
@@ -50,12 +51,12 @@ __mpn_lshift:
daddu $4,$4,$2 # make r4 point at end of res
daddiu $6,$6,-1
and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- dsrl $2,$10,$13 # compute function result
+ beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop
+ dsrl $2,$10,$13 # compute function result
dsubu $6,$6,$9
-.Loop0: ld $3,-16($5)
+L(Loop0): ld $3,-16($5)
daddiu $4,$4,-8
daddiu $5,$5,-8
daddiu $9,$9,-1
@@ -63,13 +64,13 @@ __mpn_lshift:
dsrl $12,$3,$13
move $10,$3
or $8,$11,$12
- bne $9,$0,.Loop0
- sd $8,0($4)
+ bne $9,$0,L(Loop0)
+ sd $8,0($4)
-.L0: beq $6,$0,.Lend
- nop
+L(L0): beq $6,$0,L(Lend)
+ nop
-.Loop: ld $3,-16($5)
+L(Loop): ld $3,-16($5)
daddiu $4,$4,-32
daddiu $6,$6,-4
dsll $11,$10,$7
@@ -95,10 +96,10 @@ __mpn_lshift:
daddiu $5,$5,-32
or $8,$14,$9
- bgtz $6,.Loop
- sd $8,0($4)
+ bgtz $6,L(Loop)
+ sd $8,0($4)
-.Lend: dsll $8,$10,$7
+L(Lend): dsll $8,$10,$7
j $31
sd $8,-8($4)
.end __mpn_lshift
diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S
index bf32953..c711783 100644
--- a/sysdeps/mips/mips64/mul_1.S
+++ b/sysdeps/mips/mips64/mul_1.S
@@ -1,7 +1,8 @@
/* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
* store the product in a second limb vector.
*
- * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003
+ * Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -22,6 +23,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -38,10 +40,10 @@
.globl __mpn_mul_1
.ent __mpn_mul_1
__mpn_mul_1:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
# warm up phase 0
@@ -52,14 +54,14 @@ __mpn_mul_1:
dmultu $8,$7
daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
+ beq $6,$0,L(LC0)
+ move $2,$0 # zero cy2
daddiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
ld $8,0($5) # load new s1 limb as early as possible
-Loop: mflo $10
+L(Loop): mflo $10
mfhi $9
daddiu $5,$5,8
daddu $10,$10,$2 # add old carry limb to low product limb
@@ -69,11 +71,11 @@ Loop: mflo $10
sltu $2,$10,$2 # carry from previous addition -> $2
sd $10,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
+ bne $6,$0,L(Loop)
+ daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
-$LC1: mflo $10
+L(LC1): mflo $10
mfhi $9
daddu $10,$10,$2
sltu $2,$10,$2
@@ -83,7 +85,7 @@ $LC1: mflo $10
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 0
-$LC0: mflo $10
+L(LC0): mflo $10
mfhi $9
daddu $10,$10,$2
sltu $2,$10,$2
diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S
index f39c1b3..e6a8a06 100644
--- a/sysdeps/mips/mips64/rshift.S
+++ b/sysdeps/mips/mips64/rshift.S
@@ -1,6 +1,6 @@
/* MIPS3 __mpn_rshift --
*
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -21,6 +21,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -37,22 +38,22 @@
.globl __mpn_rshift
.ent __mpn_rshift
__mpn_rshift:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
ld $10,0($5) # load first limb
dsubu $13,$0,$7
daddiu $6,$6,-1
and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- dsll $2,$10,$13 # compute function result
+ beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop
+ dsll $2,$10,$13 # compute function result
dsubu $6,$6,$9
-.Loop0: ld $3,8($5)
+L(Loop0): ld $3,8($5)
daddiu $4,$4,8
daddiu $5,$5,8
daddiu $9,$9,-1
@@ -60,13 +61,13 @@ __mpn_rshift:
dsll $12,$3,$13
move $10,$3
or $8,$11,$12
- bne $9,$0,.Loop0
- sd $8,-8($4)
+ bne $9,$0,L(Loop0)
+ sd $8,-8($4)
-.L0: beq $6,$0,.Lend
- nop
+L(L0): beq $6,$0,L(Lend)
+ nop
-.Loop: ld $3,8($5)
+L(Loop): ld $3,8($5)
daddiu $4,$4,32
daddiu $6,$6,-4
dsrl $11,$10,$7
@@ -92,10 +93,10 @@ __mpn_rshift:
daddiu $5,$5,32
or $8,$14,$9
- bgtz $6,.Loop
- sd $8,-8($4)
+ bgtz $6,L(Loop)
+ sd $8,-8($4)
-.Lend: dsrl $8,$10,$7
+L(Lend): dsrl $8,$10,$7
j $31
sd $8,0($4)
.end __mpn_rshift
diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S
index d566658..aa8b0dc 100644
--- a/sysdeps/mips/mips64/sub_n.S
+++ b/sysdeps/mips/mips64/sub_n.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
* store difference in a third limb vector.
*
- * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -22,6 +22,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -38,10 +39,10 @@
.globl __mpn_sub_n
.ent __mpn_sub_n
__mpn_sub_n:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
ld $10,0($5)
@@ -49,12 +50,12 @@ __mpn_sub_n:
daddiu $7,$7,-1
and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
+ beq $9,$0,L(L0) # if multiple of 4 limbs, skip first loop
+ move $2,$0
dsubu $7,$7,$9
-.Loop0: daddiu $9,$9,-1
+L(Loop0): daddiu $9,$9,-1
ld $12,8($5)
daddu $11,$11,$2
ld $13,8($6)
@@ -68,13 +69,13 @@ __mpn_sub_n:
daddiu $6,$6,8
move $10,$12
move $11,$13
- bne $9,$0,.Loop0
- daddiu $4,$4,8
+ bne $9,$0,L(Loop0)
+ daddiu $4,$4,8
-.L0: beq $7,$0,.Lend
- nop
+L(L0): beq $7,$0,L(Lend)
+ nop
-.Loop: daddiu $7,$7,-4
+L(Loop): daddiu $7,$7,-4
ld $12,8($5)
daddu $11,$11,$2
@@ -115,10 +116,10 @@ __mpn_sub_n:
daddiu $5,$5,32
daddiu $6,$6,32
- bne $7,$0,.Loop
- daddiu $4,$4,32
+ bne $7,$0,L(Loop)
+ daddiu $4,$4,32
-.Lend: daddu $11,$11,$2
+L(Lend): daddu $11,$11,$2
sltu $8,$11,$2
dsubu $11,$10,$11
sltu $2,$10,$11
diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S
index 510923f..4971b99 100644
--- a/sysdeps/mips/mips64/submul_1.S
+++ b/sysdeps/mips/mips64/submul_1.S
@@ -1,7 +1,8 @@
/* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
* subtract the product from a second limb vector.
*
- * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000, 2002, 2003
+ * Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -22,6 +23,7 @@
*/
#include <sysdep.h>
+#include <sys/asm.h>
/* INPUT PARAMETERS
* res_ptr $4
@@ -38,10 +40,10 @@
.globl __mpn_submul_1
.ent __mpn_submul_1
__mpn_submul_1:
- .set noreorder
#ifdef __PIC__
- .cpload t9
+ SETUP_GP /* ??? unused */
#endif
+ .set noreorder
.set nomacro
# warm up phase 0
@@ -52,14 +54,14 @@ __mpn_submul_1:
dmultu $8,$7
daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
+ beq $6,$0,L(LC0)
+ move $2,$0 # zero cy2
daddiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
ld $8,0($5) # load new s1 limb as early as possible
-Loop: ld $10,0($4)
+L(Loop): ld $10,0($4)
mflo $3
mfhi $9
daddiu $5,$5,8
@@ -73,11 +75,11 @@ Loop: ld $10,0($4)
daddu $2,$2,$10
sd $3,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
+ bne $6,$0,L(Loop)
+ daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
-$LC1: ld $10,0($4)
+L(LC1): ld $10,0($4)
mflo $3
mfhi $9
daddu $3,$3,$2
@@ -91,7 +93,7 @@ $LC1: ld $10,0($4)
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 0
-$LC0: ld $10,0($4)
+L(LC0): ld $10,0($4)
mflo $3
mfhi $9
daddu $3,$3,$2
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index 255623e..72f5386 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
store the product in a second limb vector.
-Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -46,14 +46,14 @@ ENTRY (__mpn_mul_1)
multu $8,$7
addiu $6,$6,-1
- beq $6,$0,$LC0
+ beq $6,$0,L(LC0)
move $2,$0 /* zero cy2 */
addiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
lw $8,0($5) /* load new s1 limb as early as possible */
-Loop: mflo $10
+L(Loop): mflo $10
mfhi $9
addiu $5,$5,4
addu $10,$10,$2 /* add old carry limb to low product limb */
@@ -63,11 +63,11 @@ Loop: mflo $10
sltu $2,$10,$2 /* carry from previous addition -> $2 */
sw $10,0($4)
addiu $4,$4,4
- bne $6,$0,Loop /* should be "bnel" */
+ bne $6,$0,L(Loop) /* should be "bnel" */
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 1 */
-$LC1: mflo $10
+L(LC1): mflo $10
mfhi $9
addu $10,$10,$2
sltu $2,$10,$2
@@ -77,7 +77,7 @@ $LC1: mflo $10
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 0 */
-$LC0: mflo $10
+L(LC0): mflo $10
mfhi $9
addu $10,$10,$2
sltu $2,$10,$2
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
index 46df86b..cb688fe 100644
--- a/sysdeps/mips/rshift.S
+++ b/sysdeps/mips/rshift.S
@@ -1,6 +1,6 @@
/* MIPS2 __mpn_rshift --
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -41,12 +41,12 @@ ENTRY (__mpn_rshift)
subu $13,$0,$7
addiu $6,$6,-1
and $9,$6,4-1 /* number of limbs in first loop */
- beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop*/
+ beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop*/
sll $2,$10,$13 /* compute function result */
subu $6,$6,$9
-.Loop0: lw $3,4($5)
+L(Loop0): lw $3,4($5)
addiu $4,$4,4
addiu $5,$5,4
addiu $9,$9,-1
@@ -54,13 +54,13 @@ ENTRY (__mpn_rshift)
sll $12,$3,$13
move $10,$3
or $8,$11,$12
- bne $9,$0,.Loop0
+ bne $9,$0,L(Loop0)
sw $8,-4($4)
-.L0: beq $6,$0,.Lend
+L(L0): beq $6,$0,L(Lend)
nop
-.Loop: lw $3,4($5)
+L(Loop): lw $3,4($5)
addiu $4,$4,16
addiu $6,$6,-4
srl $11,$10,$7
@@ -86,10 +86,10 @@ ENTRY (__mpn_rshift)
addiu $5,$5,16
or $8,$14,$9
- bgtz $6,.Loop
+ bgtz $6,L(Loop)
sw $8,-4($4)
-.Lend: srl $8,$10,$7
+L(Lend): srl $8,$10,$7
j $31
sw $8,0($4)
END (__mpn_rshift)
diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S
index 633f3e3..53fa019 100644
--- a/sysdeps/mips/sub_n.S
+++ b/sysdeps/mips/sub_n.S
@@ -1,7 +1,7 @@
/* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -43,12 +43,12 @@ ENTRY (__mpn_sub_n)
addiu $7,$7,-1
and $9,$7,4-1 /* number of limbs in first loop */
- beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
- move $2,$0
+ beq $9,$0,L(L0) /* if multiple of 4 limbs, skip first loop */
+ move $2,$0
subu $7,$7,$9
-.Loop0: addiu $9,$9,-1
+L(Loop0): addiu $9,$9,-1
lw $12,4($5)
addu $11,$11,$2
lw $13,4($6)
@@ -62,13 +62,13 @@ ENTRY (__mpn_sub_n)
addiu $6,$6,4
move $10,$12
move $11,$13
- bne $9,$0,.Loop0
- addiu $4,$4,4
+ bne $9,$0,L(Loop0)
+ addiu $4,$4,4
-.L0: beq $7,$0,.Lend
- nop
+L(L0): beq $7,$0,L(Lend)
+ nop
-.Loop: addiu $7,$7,-4
+L(Loop): addiu $7,$7,-4
lw $12,4($5)
addu $11,$11,$2
@@ -109,10 +109,10 @@ ENTRY (__mpn_sub_n)
addiu $5,$5,16
addiu $6,$6,16
- bne $7,$0,.Loop
- addiu $4,$4,16
+ bne $7,$0,L(Loop)
+ addiu $4,$4,16
-.Lend: addu $11,$11,$2
+L(Lend): addu $11,$11,$2
sltu $8,$11,$2
subu $11,$10,$11
sltu $2,$10,$11
diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S
index 7de9ca7..4c8a612 100644
--- a/sysdeps/mips/submul_1.S
+++ b/sysdeps/mips/submul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
subtract the product from a second limb vector.
-Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -46,14 +46,14 @@ ENTRY (__mpn_submul_1)
multu $8,$7
addiu $6,$6,-1
- beq $6,$0,$LC0
+ beq $6,$0,L(LC0)
move $2,$0 /* zero cy2 */
addiu $6,$6,-1
- beq $6,$0,$LC1
+ beq $6,$0,L(LC1)
lw $8,0($5) /* load new s1 limb as early as possible */
-Loop: lw $10,0($4)
+L(Loop): lw $10,0($4)
mflo $3
mfhi $9
addiu $5,$5,4
@@ -67,11 +67,11 @@ Loop: lw $10,0($4)
addu $2,$2,$10
sw $3,0($4)
addiu $4,$4,4
- bne $6,$0,Loop /* should be "bnel" */
+ bne $6,$0,L(Loop) /* should be "bnel" */
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 1 */
-$LC1: lw $10,0($4)
+L(LC1): lw $10,0($4)
mflo $3
mfhi $9
addu $3,$3,$2
@@ -85,7 +85,7 @@ $LC1: lw $10,0($4)
addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 0 */
-$LC0: lw $10,0($4)
+L(LC0): lw $10,0($4)
mflo $3
mfhi $9
addu $3,$3,$2
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index c710b0c..a1adf67 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,93,94,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -46,10 +47,10 @@ ENTRY(__syscall_error)
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
- bne v0, EWOULDBLOCK_sys, skip
+ bne v0, EWOULDBLOCK_sys, L(skip)
nop
li v0, EAGAIN
-skip:
+L(skip):
#endif
/* Find our per-thread errno address */
jal __errno_location
@@ -84,9 +85,9 @@ ENTRY(__syscall_error)
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
- bne v0, EWOULDBLOCK_sys, skip
+ bne v0, EWOULDBLOCK_sys, L(skip)
li v0, EAGAIN
-skip:
+L(skip):
#endif
/* Store it in errno... */
sw v0, errno
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index fd51916..8ba84e2 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -33,7 +34,7 @@
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
#ifdef __PIC__
- #define PSEUDO(name, syscall_name, args) \
+#define PSEUDO(name, syscall_name, args) \
.align 2; \
99: la t9,__syscall_error; \
jr t9; \
@@ -44,7 +45,7 @@
syscall; \
.set reorder; \
bne a3, zero, 99b; \
-syse1:
+L(syse1):
#else
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
@@ -57,7 +58,7 @@ syse1:
syscall; \
.set reorder; \
bne a3, zero, 99b; \
-syse1:
+L(syse1):
#endif
#undef PSEUDO_END
@@ -66,11 +67,19 @@ syse1:
#define ret j ra ; nop
#undef END
-#define END(sym) .end sym
+#define END(function) \
+ .end function; \
+ .size function,.-function
#define r0 v0
#define r1 v1
/* The mips move insn is d,s. */
#define MOVE(x,y) move y , x
+#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
+# define L(label) $L ## label
+#else
+# define L(label) .L ## label
+#endif
+
#endif
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 4f4f84a..de0f6eb 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1997, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -28,18 +29,18 @@ ENTRY(__wait)
li v0, SYS_wait
syscall
- beqz a3, noerror
+ beqz a3, L(noerror)
nop
j __syscall_error
nop
-noerror:
+L(noerror):
/* If the arg is not NULL, store v1 there. */
- beqz a0, noarg
+ beqz a0, L(noarg)
nop
sw v1, 0(a0)
nop
-noarg:
+L(noarg):
ret
.end __wait
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 00b1317..2b02a2b 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -49,8 +49,8 @@ NESTED(__clone,4*SZREG,sp)
/* Sanity check arguments. */
li v0,EINVAL
- beqz a0,error /* No NULL function pointers. */
- beqz a1,error /* No NULL stack pointers. */
+ beqz a0,L(error) /* No NULL function pointers. */
+ beqz a1,L(error) /* No NULL stack pointers. */
subu a1,32 /* Reserve argument save space. */
sw a0,0(a1) /* Save function pointer. */
@@ -62,15 +62,15 @@ NESTED(__clone,4*SZREG,sp)
li v0,__NR_clone
syscall
- bnez a3,error
- beqz v0,.Lthread_start
+ bnez a3,L(error)
+ beqz v0,L(thread_start)
/* Successful return from the parent */
addiu sp,32
ret
/* Something bad happened -- no child created */
-error:
+L(error):
addiu sp,32
#ifdef __PIC__
la t9,__syscall_error
@@ -84,7 +84,7 @@ error:
its own function so that we can terminate the stack trace with our
debug info. */
-.Lthread_start:
+L(thread_start):
/* cp is already loaded. */
.cprestore 16
/* The stackframe has been created on entry of clone(). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28a8f6990191a351c4b1330f9d4ef2627b972ccc
commit 28a8f6990191a351c4b1330f9d4ef2627b972ccc
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Mar 13 15:07:13 2003 +0000
Introduce and use local
label .Lthread_start since current binutils don't allow branches
to globally visible symbols.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index eba4ad9..00b1317 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -63,7 +63,7 @@ NESTED(__clone,4*SZREG,sp)
syscall
bnez a3,error
- beqz v0,__thread_start
+ beqz v0,.Lthread_start
/* Successful return from the parent */
addiu sp,32
@@ -84,7 +84,7 @@ error:
its own function so that we can terminate the stack trace with our
debug info. */
-ENTRY(__thread_start)
+.Lthread_start:
/* cp is already loaded. */
.cprestore 16
/* The stackframe has been created on entry of clone(). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ced89ec318d6268c8c9d3530b8e57a23ade21b4e
commit ced89ec318d6268c8c9d3530b8e57a23ade21b4e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 12 01:04:51 2003 +0000
(__thread_start): Use jal instead of jalr to invoke subroutine so
restoring the $gp register will work properly.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 1e02968..eba4ad9 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>, 1996.
+ Contributed by Ralf Baechle <ralf@linux-mips.org>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -93,7 +93,7 @@ ENTRY(__thread_start)
lw a0,4(sp) /* Argument pointer. */
/* Call the user's function. */
- jalr t9
+ jal t9
/* Call _exit rather than doing it inline for breakpoint purposes. */
move a0,v0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3347c3ad39489470f3098edba47f45df76f69d73
commit 3347c3ad39489470f3098edba47f45df76f69d73
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 7 09:46:33 2003 +0000
2003-03-04 Guido Guenther <agx@sigxcpu.org>
* sysdeps/unix/sysv/linux/mips/syscalls.list: Remove unneeded
stubs, we have INLINE_SYSCALL.
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Define MAP_POPULATE,
MAP_NONBLOCK.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 61886e2..e05f2a6 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/MIPS version.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -59,6 +59,8 @@
# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
# define MAP_LOCKED 0x8000 /* pages are locked */
+# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
+# define MAP_NONBLOCK 0x20000 /* do not block on IO */
#endif
/* Flags to `msync'. */
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index ec75228..51789a7 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -32,14 +32,6 @@ shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
socketpair - socketpair i:iiif __socketpair socketpair
-#
-# These are defined locally because the caller is also defined in this dir.
-#
-s_llseek llseek _llseek i:iiipi __syscall__llseek
-s_sigaction sigaction sigaction i:ipp __syscall_sigaction
-s_ustat ustat ustat i:ip __syscall_ustat
-sys_mknod xmknod mknod i:sii __syscall_mknod
-
# System calls with wrappers.
rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction
rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending
@@ -47,35 +39,3 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask
rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
-s_execve EXTRA execve i:spp __syscall_execve
-s_exit _exit exit i:i __syscall_exit
-s_fcntl fcntl fcntl i:iiF __syscall_fcntl
-s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64
-s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
-s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
-s_getcwd getcwd getcwd i:pi __syscall_getcwd
-s_getdents getdents getdents i:ipi __syscall_getdents
-s_getdents64 getdents getdents64 i:ipi __syscall_getdents64
-s_getpriority getpriority getpriority i:ii __syscall_getpriority
-s_ipc msgget ipc i:iiiip __syscall_ipc
-s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
-s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2
-s_poll poll poll i:pii __syscall_poll
-s_pread64 pread64 pread i:ibniii __syscall_pread
-s_ptrace ptrace ptrace i:iipp __syscall_ptrace
-s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite
-s_readahead EXTRA readahead i:iiii __syscall_readahead
-s_reboot reboot reboot i:iii __syscall_reboot
-s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit
-s_sigpending sigpending sigpending i:p __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask i:ipp __syscall_sigprocmask
-s_stat64 xstat64 stat64 i:sp __syscall_stat64
-s_truncate64 truncate64 truncate64 i:siii __syscall_truncate64
-
-# Todo: we can pass 6 args in registers, no need for the wrapper
-sys_sysctl sysctl _sysctl i:p __syscall__sysctl
-sys_fstat fxstat fstat i:ip __syscall_fstat
-sys_lstat lxstat lstat i:sp __syscall_lstat
-sys_readv readv readv i:ipi __syscall_readv
-sys_stat xstat stat i:sp __syscall_stat
-sys_writev writev writev i:ipi __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aca56a7fa516f3a38c13fe995e0cb5335eef9e60
commit aca56a7fa516f3a38c13fe995e0cb5335eef9e60
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 3 09:58:55 2003 +0000
Define MAP_POPULATE and MAP_NONBLOCK.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 77b595a..9180439 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/Alpha version.
- Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,11 +60,13 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x8000 /* Lock the mapping. */
+# define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x02000 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x08000 /* Lock the mapping. */
# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
+# define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
+# define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
#endif
/* Flags to `msync'. */
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 715e0f0..c6d475b 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/ARM version.
- Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,11 +52,13 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x2000 /* Lock the mapping. */
-# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x02000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
#endif
/* Flags to `msync'. */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
index 78c0171..40db9f9 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -1,4 +1,21 @@
-/* Definitions for POSIX memory map interface. Insert rest of disclaimer here */
+/* Definitions for POSIX memory map interface. Linux/HPPA version.
+ Copyright (C) 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
@@ -22,6 +39,8 @@
#define MAP_LOCKED 0x2000 /* pages are locked */
#define MAP_NORESERVE 0x4000 /* don't check for reservations */
#define MAP_GROWSDOWN 0x8000 /* stack-like segment */
+#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
+#define MAP_NONBLOCK 0x20000 /* do not block on IO */
#define MS_SYNC 1 /* synchronous memory sync */
#define MS_ASYNC 2 /* sync memory asynchronously */
@@ -58,4 +77,3 @@
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
#endif
-
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 5c49fc8..350ea95 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -52,11 +52,13 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
-# define MAP_LOCKED 0x2000 /* Lock the mapping. */
-# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x02000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */
+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
#endif
/* Flags to `msync'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a25ef3f28608efbd4691ae7fda3774d5a31d7c6a
commit a25ef3f28608efbd4691ae7fda3774d5a31d7c6a
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Mar 1 15:33:11 2003 +0000
(_dl_start_user): Access
__libc_stack_end through GOT since it is a global symbol.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 0fd6495..a09f611 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -158,7 +158,7 @@ _dl_start_user:\n\
| Save the user entry point address in %a4.\n\
move.l %d0, %a4\n\
| Remember the highest stack address.\n\
- lea __libc_stack_end(%pc), %a0\n\
+ move.l __libc_stack_end@GOTPC(%pc), %a0\n\
move.l %sp, (%a0)\n\
| See if we were run as a command with the executable file\n\
| name as an extra leading argument.\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fa6c0ca31a613a224398c77ba461377213c68db
commit 6fa6c0ca31a613a224398c77ba461377213c68db
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 26 00:01:15 2003 +0000
Revert unintentional commits.
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 363c29e..80f8750 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -1,5 +1,5 @@
/* Machine-specific definition for spin locks. Alpha version.
- Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,8 +38,8 @@ typedef __volatile long int __spin_lock_t;
_EXTERN_INLINE void
__spin_unlock (__spin_lock_t *__lock)
{
- __asm__ __volatile__ ("mb");
- *__lock = 0;
+ __asm__ __volatile__ ("mb; stq $31, %0; mb"
+ : "=m" (__lock));
}
/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
@@ -47,9 +47,6 @@ __spin_unlock (__spin_lock_t *__lock)
_EXTERN_INLINE int
__spin_try_lock (register __spin_lock_t *__lock)
{
-#if 1
- return 1;
-#else
register long int __rtn, __tmp;
do
@@ -69,7 +66,6 @@ __spin_try_lock (register __spin_lock_t *__lock)
} while (! __rtn);
/* RTN is now nonzero; we have the lock. */
return __rtn;
-#endif
}
/* Return nonzero if LOCK is locked. */
diff --git a/sysdeps/mach/hurd/alpha/tls.h b/sysdeps/mach/hurd/alpha/tls.h
deleted file mode 100644
index e820a01..0000000
--- a/sysdeps/mach/hurd/alpha/tls.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Definition for thread-local data handling. Hurd/Alpha version.
- Copyright (C) 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _TLS_H
-#define _TLS_H
-
-#if defined HAVE_TLS_SUPPORT && 0
-
-/* Signal that TLS support is available. */
-# define USE_TLS 1
-
-/* Code to initially initialize the thread pointer. This might need
- special attention since 'errno' is not yet available and if the
- operation can cause a failure 'errno' must not be touched. */
-# define TLS_INIT_TP(descr) \
- do \
- { \
- register tcbhead_t *_a0 __asm__ ("$16") = (descr); \
- __asm__ ("call_pal %0" : : "i" (PAL_wruniq), "r" (_a0)); \
- } while (0)
-
-# define THREAD_TCB() \
- ({ \
- register tcbhead_t *_rv __asm__ ("$0"); \
- __asm__ ("call_pal %0" : "=r" (rv) : "i" (PAL_rduniq)); \
- _rv; \
- })
-
-/* Install new dtv for current thread. */
-# define INSTALL_NEW_DTV(dtv) (THREAD_DTV () = (dtv))
-
-/* Return the address of the dtv for the current thread. */
-# define THREAD_DTV() (THREAD_TCB ()->dtv)
-
-#endif /* HAVE_TLS_SUPPORT */
-
-#endif /* tls.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6562e81497a3a5a43df90ec84842b08c5bf24d5
commit b6562e81497a3a5a43df90ec84842b08c5bf24d5
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 25 23:45:16 2003 +0000
linuxthreads/ChangeLog
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 80f8750..363c29e 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -1,5 +1,5 @@
/* Machine-specific definition for spin locks. Alpha version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,8 +38,8 @@ typedef __volatile long int __spin_lock_t;
_EXTERN_INLINE void
__spin_unlock (__spin_lock_t *__lock)
{
- __asm__ __volatile__ ("mb; stq $31, %0; mb"
- : "=m" (__lock));
+ __asm__ __volatile__ ("mb");
+ *__lock = 0;
}
/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
@@ -47,6 +47,9 @@ __spin_unlock (__spin_lock_t *__lock)
_EXTERN_INLINE int
__spin_try_lock (register __spin_lock_t *__lock)
{
+#if 1
+ return 1;
+#else
register long int __rtn, __tmp;
do
@@ -66,6 +69,7 @@ __spin_try_lock (register __spin_lock_t *__lock)
} while (! __rtn);
/* RTN is now nonzero; we have the lock. */
return __rtn;
+#endif
}
/* Return nonzero if LOCK is locked. */
diff --git a/sysdeps/mach/hurd/alpha/tls.h b/sysdeps/mach/hurd/alpha/tls.h
new file mode 100644
index 0000000..e820a01
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/tls.h
@@ -0,0 +1,53 @@
+/* Definition for thread-local data handling. Hurd/Alpha version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _TLS_H
+#define _TLS_H
+
+#if defined HAVE_TLS_SUPPORT && 0
+
+/* Signal that TLS support is available. */
+# define USE_TLS 1
+
+/* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+# define TLS_INIT_TP(descr) \
+ do \
+ { \
+ register tcbhead_t *_a0 __asm__ ("$16") = (descr); \
+ __asm__ ("call_pal %0" : : "i" (PAL_wruniq), "r" (_a0)); \
+ } while (0)
+
+# define THREAD_TCB() \
+ ({ \
+ register tcbhead_t *_rv __asm__ ("$0"); \
+ __asm__ ("call_pal %0" : "=r" (rv) : "i" (PAL_rduniq)); \
+ _rv; \
+ })
+
+/* Install new dtv for current thread. */
+# define INSTALL_NEW_DTV(dtv) (THREAD_DTV () = (dtv))
+
+/* Return the address of the dtv for the current thread. */
+# define THREAD_DTV() (THREAD_TCB ()->dtv)
+
+#endif /* HAVE_TLS_SUPPORT */
+
+#endif /* tls.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc6a3664ffb416eac5dcee1f5e603b4b91674798
commit cc6a3664ffb416eac5dcee1f5e603b4b91674798
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 21 06:59:04 2003 +0000
Add soft-supp.h.
diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist
index cd155fd..35a33ab 100644
--- a/sysdeps/powerpc/nofpu/Dist
+++ b/sysdeps/powerpc/nofpu/Dist
@@ -1,2 +1,3 @@
sim-full.c
fenv_const.c
+soft-supp.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b6aa9b399cf5a73137ee13708a301f58cf07ac8
commit 2b6aa9b399cf5a73137ee13708a301f58cf07ac8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 20 22:22:35 2003 +0000
(init_iosys): Yield ENODEV on unknown systems.
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 40ac8e6..558b485 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -166,7 +166,7 @@ init_iosys (void)
}
/* systype is not a known platform name... */
- __set_errno (EINVAL);
+ __set_errno (ENODEV);
return -1;
}
@@ -194,8 +194,8 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
return -1;
io.base =
- (unsigned long int) __mmap (0, MAX_PORT << io.shift,
- PROT_READ | PROT_WRITE,
+ (unsigned long int) __mmap (0, MAX_PORT << io.shift,
+ PROT_READ | PROT_WRITE,
MAP_SHARED, fd, io.io_base);
close (fd);
if ((long) io.base == -1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2299417ee1ea7a5471e6f6990b6f67495bea43e5
commit 2299417ee1ea7a5471e6f6990b6f67495bea43e5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 20 22:19:28 2003 +0000
Extra files to distribute for powerpc/nofpu.
diff --git a/sysdeps/powerpc/nofpu/Dist b/sysdeps/powerpc/nofpu/Dist
new file mode 100644
index 0000000..cd155fd
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/Dist
@@ -0,0 +1,2 @@
+sim-full.c
+fenv_const.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=114e7d500560ce6e2d921e3f5334fcd9ac73916e
commit 114e7d500560ce6e2d921e3f5334fcd9ac73916e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 20 20:22:20 2003 +0000
(INLINE_SYSCALL): Add missing arguments to INTERNAL_SYSCALL_ERROR_P and
INTERNAL_SYSCALL_ERRNO.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 33ce123..785d3cf 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -138,10 +138,10 @@ __local_syscall_error: \
call. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \
+ ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
_sys_result = (unsigned int) -1; \
} \
(int) _sys_result; })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e96c2b656bdc50391657e24792f4bdf63784ded2
commit e96c2b656bdc50391657e24792f4bdf63784ded2
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Feb 20 13:23:24 2003 +0000
Add MADV_* and POSIX_MADV_* constants.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 34f14ee..5c49fc8 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -73,3 +73,21 @@
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e5bb2d5345f0f69db87c04522360d687ed71991
commit 6e5bb2d5345f0f69db87c04522360d687ed71991
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 14 06:02:01 2003 +0000
(elf_machine_rela): Add instead of subtracting map->l_tls_offset.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 25359d8..4704428 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -627,12 +627,12 @@ elf_machine_rela (struct link_map *map,
else if (r_type == R_ALPHA_TPREL64)
{
#ifdef RTLD_BOOTSTRAP
- *reloc_addr = sym_raw_value - map->l_tls_offset;
+ *reloc_addr = sym_raw_value + map->l_tls_offset;
#else
if (sym_map)
{
CHECK_STATIC_TLS (map, sym_map);
- *reloc_addr = sym_raw_value - sym_map->l_tls_offset;
+ *reloc_addr = sym_raw_value + sym_map->l_tls_offset;
}
#endif
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c157224cb867c98f4f171e0da588c23fe588512d
commit c157224cb867c98f4f171e0da588c23fe588512d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 12 09:42:48 2003 +0000
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix masking of version index.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 08e5a6e..c4864c2 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -293,7 +293,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
const ElfW(Half) *vernum = \
(const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \
- ElfW(Half) ndx = vernum[sym_index & 0x7fff]; \
+ ElfW(Half) ndx = vernum[sym_index] & 0x7fff; \
const struct r_found_version *version = &l->l_versions[ndx]; \
\
if (version->hash != 0) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28445fd3b2e24425247d5195115ac8ea707464a3
commit 28445fd3b2e24425247d5195115ac8ea707464a3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 5 23:29:25 2003 +0000
Add posix_fadvise64 syscall.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 6907ef1..96bc8a5 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -20,6 +20,7 @@ getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94b1e5e52f683fa3d99aee23fcb3f9383c5f9d92
commit 94b1e5e52f683fa3d99aee23fcb3f9383c5f9d92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 31 03:40:10 2003 +0000
Remove __GI_* aliases, already added by make-syscalls.sh.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index a053468..6907ef1 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,7 +36,7 @@ sys_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
# proper socket implementations:
-accept - accept C:3 __libc_accept __accept accept __GI_accept
+accept - accept C:3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect C:3 __libc_connect __connect_internal __connect connect
getpeername - getpeername 3 __getpeername getpeername
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 65fc3cb..bc977e2 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -14,7 +14,7 @@ semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
# proper socket implementations:
-accept - accept Ci:iBN __libc_accept __accept accept __GI_accept
+accept - accept Ci:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 35666c7..ec75228 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -14,7 +14,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept Ci:iBN __libc_accept __accept accept __GI_accept
+accept - accept Ci:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7495bfa6003a70ea4fc9e12747a3da81ba42eee8
commit 7495bfa6003a70ea4fc9e12747a3da81ba42eee8
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jan 30 23:52:52 2003 +0000
(sysdep-CFLAGS): Don't define, not needed any more.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 778a222..68dc258 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -37,6 +37,3 @@ long-double-fcts = yes
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
-
-# Use a more reasonable inline limit
-sysdep-CFLAGS += --param max-inline-insns-single=4000
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c25d936b99e07f3b6733c483be9936ccbf624c79
commit c25d936b99e07f3b6733c483be9936ccbf624c79
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 27 20:15:03 2003 +0000
(SYSCALL_ERROR_LABEL): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
index 1fd64e5..710479a 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -33,7 +33,15 @@
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
-#ifndef __ASSEMBLER__
+#ifdef __ASSEMBLER__
+
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef __PIC__
+# define SYSCALL_ERROR_LABEL 99b
+#endif
+
+#else /* ! __ASSEMBLER__ */
/* Define a macro which expands into the inline wrapper code for a system
call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f211d17483a13ff9c3f658c8821f0190765b258
commit 4f211d17483a13ff9c3f658c8821f0190765b258
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 27 19:01:25 2003 +0000
Don't set errno in the _LIBC_REENTRANT case, use register names consistently.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index fa1bfa1..c710b0c 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -27,11 +27,11 @@ ENTRY(__syscall_error)
#ifdef __PIC__
.set noreorder
.set noat
- move $1, $31
- bltzal $0, 0f
+ move AT, ra
+ bltzal zero, 0f
nop
-0: .cpload $31
- move $31, $1
+0: .cpload ra
+ move ra, AT
.set at
.set reorder
#endif
@@ -51,9 +51,6 @@ ENTRY(__syscall_error)
li v0, EAGAIN
skip:
#endif
- /* Store it in the "real" variable ... */
- sw v0, errno
-
/* Find our per-thread errno address */
jal __errno_location
@@ -75,11 +72,11 @@ ENTRY(__syscall_error)
#ifdef __PIC__
.set noreorder
.set noat
- move $1, $31
- bltzal $0, 0f
+ move AT, ra
+ bltzal zero, 0f
nop
-0: .cpload $31
- move $31, $1
+0: .cpload ra
+ move ra, AT
.set at
.set reorder
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca0eea4226dca8f4b6a6ac19b1ae63b454651846
commit ca0eea4226dca8f4b6a6ac19b1ae63b454651846
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 27 19:01:03 2003 +0000
Add support for cancellation handling and handle both __NR_pwrite64 and
__NR_pwrite.
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 44f9d30..f25e327 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -22,12 +22,19 @@
#include <unistd.h>
#include <endian.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <kernel-features.h>
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
+
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
@@ -47,16 +54,35 @@ __libc_pwrite (fd, buf, count, offset)
{
ssize_t result;
+ if (SINGLE_THREAD_P)
+ {
+ /* First try the syscall. */
+ assert (sizeof (offset) == 4);
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PWRITE_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite (fd, buf, count, offset);
+# endif
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
/* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (offset >> 31, offset));
+ __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
# endif
+ LIBC_CANCEL_RESET (oldtype);
+
return result;
}
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 4f7299e..0accc1d 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -21,12 +21,19 @@
#include <unistd.h>
#include <endian.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <kernel-features.h>
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pwrite64
+#endif
+
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
@@ -46,6 +53,23 @@ __libc_pwrite64 (fd, buf, count, offset)
{
ssize_t result;
+ if (SINGLE_THREAD_P)
+ {
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PWRITE_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
+
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
@@ -56,6 +80,8 @@ __libc_pwrite64 (fd, buf, count, offset)
result = __emulate_pwrite64 (fd, buf, count, offset);
# endif
+ LIBC_CANCEL_RESET (oldtype);
+
return result;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c5a1c7889c0759c494abf6655b640076d5d870a
commit 8c5a1c7889c0759c494abf6655b640076d5d870a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 27 19:00:40 2003 +0000
Add support for cancellation handling and handle both __NR_pread64 and
__NR_pread.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 45305d2..e6cb21f 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -22,12 +22,19 @@
#include <unistd.h>
#include <endian.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <kernel-features.h>
+#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pread
+# error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
# if __ASSUME_PREAD_SYSCALL == 0
@@ -48,6 +55,22 @@ __libc_pread (fd, buf, count, offset)
{
ssize_t result;
+ if (SINGLE_THREAD_P)
+ {
+ /* First try the syscall. */
+ assert (sizeof (offset) == 4);
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset));
+# if __ASSUME_PREAD_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread (fd, buf, count, offset);
+# endif
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
/* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
@@ -57,6 +80,9 @@ __libc_pread (fd, buf, count, offset)
/* No system call available. Use the emulation. */
result = __emulate_pread (fd, buf, count, offset);
# endif
+
+ LIBC_CANCEL_RESET (oldtype);
+
return result;
}
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index d36d689..36ec100 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -21,12 +21,19 @@
#include <unistd.h>
#include <endian.h>
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <sys/syscall.h>
#include <bp-checks.h>
#include <kernel-features.h>
+#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pread
+# error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
# if __ASSUME_PREAD_SYSCALL == 0
@@ -48,6 +55,23 @@ __libc_pread64 (fd, buf, count, offset)
{
ssize_t result;
+
+ if (SINGLE_THREAD_P)
+ {
+ /* First try the syscall. */
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
+# if __ASSUME_PREAD_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread64 (fd, buf, count, offset);
+# endif
+ return result;
+ }
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
/* First try the syscall. */
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
@@ -57,6 +81,9 @@ __libc_pread64 (fd, buf, count, offset)
/* No system call available. Use the emulation. */
result = __emulate_pread64 (fd, buf, count, offset);
# endif
+
+ LIBC_CANCEL_RESET (oldtype);
+
return result;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fab80146edc41050df9ef957729ad233c375b2e7
commit fab80146edc41050df9ef957729ad233c375b2e7
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Jan 25 23:07:04 2003 +0000
(_dl_start_user): Use pc-relative addressing to save GOT entries.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 61027c9..0fd6495 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -157,13 +157,12 @@ _start:\n\
_dl_start_user:\n\
| Save the user entry point address in %a4.\n\
move.l %d0, %a4\n\
- | Point %a5 at the GOT.\n\
- lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
| Remember the highest stack address.\n\
- move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
+ lea __libc_stack_end(%pc), %a0\n\
+ move.l %sp, (%a0)\n\
| See if we were run as a command with the executable file\n\
| name as an extra leading argument.\n\
- move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
+ move.l _dl_skip_args(%pc), %d0\n\
| Pop the original argument count\n\
move.l (%sp)+, %d1\n\
| Subtract _dl_skip_args from it.\n\
@@ -176,12 +175,12 @@ _dl_start_user:\n\
pea 8(%sp, %d1*4)\n\
pea 8(%sp)\n\
move.l %d1, -(%sp)\n\
- move.l ([_rtld_local@GOT.w, %a5]), -(%sp)\n\
+ move.l _rtld_local(%pc), -(%sp)\n\
jbsr _dl_init_internal@PLTPC\n\
addq.l #8, %sp\n\
addq.l #8, %sp\n\
| Pass our finalizer function to the user in %a1.\n\
- move.l _dl_fini@GOT.w(%a5), %a1\n\
+ lea _dl_fini(%pc), %a1\n\
| Initialize %fp with the stack pointer.\n\
move.l %sp, %fp\n\
| Jump to the user's entry point.\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3de1f4af04df8cb81be7315331a20ea8b3190420
commit 3de1f4af04df8cb81be7315331a20ea8b3190420
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 22 02:07:54 2003 +0000
2003-01-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/alpha/sysdep.h (inline_syscall0,
inline_syscall1, inline_syscall2, inline_syscall3,
inline_syscall4, inline_syscall5, inline_syscall6): Add __volatile__.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (INTERNAL_SYSCALL): Add
__attribute__((unused)) to ChEcK.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 01e7de0..cb04cec 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -193,12 +193,13 @@ $syscall_error: \
register long _sc_19 __asm__("$19"); \
\
_sc_0 = __NR_##name; \
- __asm__("callsys # %0 %1 <= %2" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19) \
- : "0"(_sc_0) \
- : inline_syscall_clobbers, \
- "$16", "$17", "$18", "$20", "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19) \
+ : "0"(_sc_0) \
+ : inline_syscall_clobbers, \
+ "$16", "$17", "$18", "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -210,12 +211,13 @@ $syscall_error: \
\
_sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
- __asm__("callsys # %0 %1 <= %2 %3" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16) \
- : "0"(_sc_0), "2"(_sc_16) \
- : inline_syscall_clobbers, \
- "$17", "$18", "$20", "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16) \
+ : "0"(_sc_0), "2"(_sc_16) \
+ : inline_syscall_clobbers, \
+ "$17", "$18", "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -229,12 +231,13 @@ $syscall_error: \
_sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
- __asm__("callsys # %0 %1 <= %2 %3 %4" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
- : inline_syscall_clobbers, \
- "$18", "$20", "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3 %4" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
+ : inline_syscall_clobbers, \
+ "$18", "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -250,13 +253,14 @@ $syscall_error: \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18) \
- : inline_syscall_clobbers, "$20", "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3 %4 %5" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18) \
+ : inline_syscall_clobbers, "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -273,13 +277,14 @@ $syscall_error: \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19) \
- : inline_syscall_clobbers, "$20", "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19) \
+ : inline_syscall_clobbers, "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -298,13 +303,14 @@ $syscall_error: \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18), "=r"(_sc_20) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
- : inline_syscall_clobbers, "$21"); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
+ : inline_syscall_clobbers, "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
@@ -325,14 +331,14 @@ $syscall_error: \
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
- "6"(_sc_21) \
- : inline_syscall_clobbers); \
+ __asm__ __volatile__ \
+ ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18), \
+ "1"(_sc_19), "5"(_sc_20), "6"(_sc_21) \
+ : inline_syscall_clobbers); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 6a07906..62e308b 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -75,7 +75,8 @@
#undef INTERNAL_SYSCALL
#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
({ \
- extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1]; \
+ extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1] \
+ __attribute__((unused)); \
INTERNAL_SYSCALL1(name, err_out, nr, args); \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af215add0a930efd488d0b73c20dfd9ebd1f4c80
commit af215add0a930efd488d0b73c20dfd9ebd1f4c80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 17 19:19:55 2003 +0000
(EPILOGUE, GPSAVEREG): New.
(LOADGP) [!PIC]: Rewrite to preserve caller's gp.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index c31508b..ce848f4 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -35,9 +35,26 @@
have we loaded PV with our address. Do both. */
# define LOADGP br pv, 1f; 1: ldgp gp, 0(pv)
# define PROLOGUE .prologue 0
+# define EPILOGUE
#else
-# define LOADGP ldgp gp, 0(pv)
+ /* When building the static library, we tail call here from
+ elsewhere, which might use a different GP. The entertaining
+ part is that we have to return with the GP of our caller
+ in place, so that linker relaxation works properly. */
+ /* ??? This is so ugly. Consider always putting the errno
+ setting code with the syscall in the static case. */
+# define GPSAVEREG t10
+# define LOADGP ldah t11, 0(pv) !gpdisp!1; \
+ br 1f; \
+ .subsection 2; \
+ 1: mov gp, GPSAVEREG; \
+ lda gp, 0(t11) !gpdisp!1; \
+ br 2f; \
+ .previous; \
+ mov gp, GPSAVEREG; \
+ 2:
# define PROLOGUE .prologue 1
+# define EPILOGUE mov GPSAVEREG, gp
#endif
.align 4
@@ -61,16 +78,20 @@ __syscall_error:
addq v0, t1, v0
stl t0, 0(v0)
lda v0, -1
+ EPILOGUE
ret
#elif defined(_LIBC_REENTRANT)
LOADGP
- lda sp, -16(sp)
- .frame sp, 16, ra, 0
+ lda sp, -32(sp)
+ .frame sp, 32, ra, 0
stq ra, 0(sp)
stq v0, 8(sp)
- .mask 0x4000001, -16
+#ifdef GPSAVEREG
+ stq GPSAVEREG, 16(sp)
+#endif
+ .mask 0x4000001, -32
PROLOGUE
/* Find our per-thread errno address */
@@ -78,6 +99,9 @@ __syscall_error:
bsr ra, __errno_location !samegp
#else
jsr ra, __errno_location
+#ifndef GPSAVEREG
+ ldgp gp, 0(ra)
+#endif
#endif
/* Store the error value. */
@@ -87,8 +111,12 @@ __syscall_error:
/* And kick back a -1. */
ldi v0, -1
+#ifdef GPSAVEREG
+ ldq GPSAVEREG, 16(sp)
+#endif
ldq ra, 0(sp)
- lda sp, 16(sp)
+ lda sp, 32(sp)
+ EPILOGUE
ret
#else
@@ -97,8 +125,10 @@ __syscall_error:
PROLOGUE
stl v0, errno
lda v0, -1
+ EPILOGUE
ret
#endif
+ .subsection 3
.end __syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c7ba672ef4c1c7d399fb9e8c5b4a7b9132065ac
commit 2c7ba672ef4c1c7d399fb9e8c5b4a7b9132065ac
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 17 19:19:37 2003 +0000
Helper code for TLS setup in static libc.
diff --git a/sysdeps/alpha/libc-tls.c b/sysdeps/alpha/libc-tls.c
new file mode 100644
index 0000000..434d5d9
--- /dev/null
+++ b/sysdeps/alpha/libc-tls.c
@@ -0,0 +1,37 @@
+/* Thread-local storage handling in the ELF dynamic linker. Alpha version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdeps/generic/libc-tls.c>
+#include <dl-tls.h>
+
+#if USE_TLS
+
+/* On Alpha, linker optimizations are not required, so __tls_get_addr
+ can be called even in statically linked binaries. In this case module
+ must be always 1 and PT_TLS segment exist in the binary, otherwise it
+ would not link. */
+
+void *
+__tls_get_addr (tls_index *ti)
+{
+ dtv_t *dtv = THREAD_DTV ();
+ return (char *) dtv[1].pointer + ti->ti_offset;
+}
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6edfd8f2f65446fe7c2ed26de4fd9176ddf9690e
commit 6edfd8f2f65446fe7c2ed26de4fd9176ddf9690e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 17 19:18:51 2003 +0000
(elf_machine_type_class): Add TLS relocs for class PLT.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 5016f13..25359d8 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -387,13 +387,24 @@ $fixup_stack: \n\
#define RTLD_START_SPECIAL_INIT /* nothing */
#endif
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- of the main executable's symbols, as for a COPY reloc, which we don't
- use. */
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry
+ or TLS variables, so undefined references should not be allowed
+ to define the value.
+
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve
+ to one of the main executable's symbols, as for a COPY reloc.
+ This is unused on Alpha. */
+
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+#define elf_machine_type_class(type) \
+ (((type) == R_ALPHA_JMP_SLOT \
+ || (type) == R_ALPHA_DTPMOD64 \
+ || (type) == R_ALPHA_DTPREL64 \
+ || (type) == R_ALPHA_TPREL64) * ELF_RTYPE_CLASS_PLT)
+#else
#define elf_machine_type_class(type) \
(((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
+#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0aced2c56994f635df6346e8b9435f4be8355dd1
commit 0aced2c56994f635df6346e8b9435f4be8355dd1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 15 01:06:06 2003 +0000
(__vfork): Conditionally branch to __fork even if __NR_vfork is not defined.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
index 6092bd9..8d3338a 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
@@ -32,9 +32,9 @@ rocess,
ENTRY (__vfork)
-#ifdef __NR_vfork
SINGLE_THREAD_P
bne HIDDEN_JUMPTARGET (__fork)
+#ifdef __NR_vfork
swi __NR_vfork
cmn a1, #4096
RETINSTR(movcc, pc, lr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9da3df102148ebd3e371b00886b9a3ffb811ce25
commit 9da3df102148ebd3e371b00886b9a3ffb811ce25
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 15 01:02:03 2003 +0000
(INTERNAL_SYSCALL, INTERNAL_SYSCALL_DECL, INTERNAL_SYSCALL_ERRNO,
INTERNAL_SYSCALL_ERROR_P, INLINE_SYSCALL): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
index be88479..1fd64e5 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -33,4 +33,242 @@
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
+#ifndef __ASSEMBLER__
+
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ INTERNAL_SYSCALL_DECL(err); \
+ long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
+ if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
+ result_var = -1L; \
+ } \
+ result_var; })
+
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) long err
+
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err, nr, args...) internal_syscall##nr(name, err, args)
+
+#define internal_syscall0(name, err, dummy...) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %2\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall1(name, err, arg1) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %3\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set reorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall2(name, err, arg1, arg2) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %4\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall3(name, err, arg1, arg2, arg3) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7"); \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "=r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall4(name, err, arg1, arg2, arg3, arg4) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall5(name, err, arg1, arg2, arg3, arg4, arg5) \
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "lw\t$2, %6\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t$2, 16($29)\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "m" ((long)arg5) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall6(name, err, arg1, arg2, arg3, arg4, arg5, arg6)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "lw\t$2, %6\n\t" \
+ "lw\t$8, %7\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t$2, 16($29)\n\t" \
+ "sw\t$8, 20($29)\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "m" ((long)arg5), "m" ((long)arg6) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
+({ \
+ long _sys_result; \
+ \
+ { \
+ register long __v0 asm("$2"); \
+ register long __a0 asm("$4") = (long) arg1; \
+ register long __a1 asm("$5") = (long) arg2; \
+ register long __a2 asm("$6") = (long) arg3; \
+ register long __a3 asm("$7") = (long) arg4; \
+ __asm__ volatile ( \
+ ".set\tnoreorder\n\t" \
+ "lw\t$2, %6\n\t" \
+ "lw\t$8, %7\n\t" \
+ "lw\t$9, %8\n\t" \
+ "subu\t$29, 32\n\t" \
+ "sw\t$2, 16($29)\n\t" \
+ "sw\t$8, 20($29)\n\t" \
+ "sw\t$9, 24($29)\n\t" \
+ "li\t$2, %5\t\t\t# " #name "\n\t" \
+ "syscall\n\t" \
+ "addiu\t$29, 32\n\t" \
+ ".set\treorder" \
+ : "=r" (__v0), "+r" (__a3) \
+ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
+ "m" ((long)arg5), "m" ((long)arg6), "m" ((long)arg7) \
+ : __SYSCALL_CLOBBERS); \
+ err = __a3; \
+ _sys_result = __v0; \
+ } \
+ _sys_result; \
+})
+
+#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
+
+#endif /* __ASSEMBLER__ */
+
#endif /* linux/mips/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=259eb5cdb82420ecdc9c1da9445a7dc4fd92496e
commit 259eb5cdb82420ecdc9c1da9445a7dc4fd92496e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 14 01:23:59 2003 +0000
(INLINE_SYSCALL): Undefined before defining.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 47d5f76..01e7de0 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -129,6 +129,7 @@ $syscall_error: \
/* ??? Linux needs to be able to override INLINE_SYSCALL for one
particular special case. Make this easy. */
+#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
INLINE_SYSCALL1(name, nr, args)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aaadd842d8899f70b6ea5b2820f394ffa0d65f4d
commit aaadd842d8899f70b6ea5b2820f394ffa0d65f4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 19:25:52 2003 +0000
Add inline syscall definitions.
(PSEUDO_LOADGP): Remove.
(PSEUDO_PROLOGUE): Load GP in non-pic case.
(SYSCALL_ERROR_LABEL): New.
(PSEUDO): Use it in error branch.
(PSEUDO_END): Add $syscall_error label.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 9dbcb38..47d5f76 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -58,9 +58,6 @@
#undef END
#define END(sym) .end sym
-/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a
- label of that number between those two macros! */
-
#ifdef PROF
# define PSEUDO_PROLOGUE \
.frame sp, 0, ra; \
@@ -70,28 +67,38 @@
jsr AT,(AT),_mcount; \
.set at; \
.prologue 1
-# define PSEUDO_LOADGP
-#else
+#elif defined PIC
# define PSEUDO_PROLOGUE \
.frame sp, 0, ra; \
.prologue 0
-# define PSEUDO_LOADGP \
- br gp, 2f; \
-2: ldgp gp, 0(gp)
+#else
+# define PSEUDO_PROLOGUE \
+ .frame sp, 0, ra; \
+ ldgp gp,0(pv); \
+ .prologue 1
#endif /* PROF */
#if RTLD_PRIVATE_ERRNO
+# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
stl v0, errno(gp) !gprel; \
lda v0, -1; \
ret
+#elif defined(PIC)
+# define SYSCALL_ERROR_LABEL __syscall_error
+# define SYSCALL_ERROR_HANDLER \
+ br $31, __syscall_error !samegp
#else
+# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
jmp $31, __syscall_error
#endif /* RTLD_PRIVATE_ERRNO */
-#if defined(PIC) && !RTLD_PRIVATE_ERRNO
-# define PSEUDO(name, syscall_name, args) \
+/* Overridden by specific syscalls. */
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS /* Nothing. */
+
+#define PSEUDO(name, syscall_name, args) \
.globl name; \
.align 4; \
.ent name,0; \
@@ -100,36 +107,232 @@ __LABEL(name) \
PSEUDO_PREPARE_ARGS \
lda v0, SYS_ify(syscall_name); \
call_pal PAL_callsys; \
- bne a3, __syscall_error !samegp; \
-3:
-# undef PSEUDO_END
+ bne a3, SYSCALL_ERROR_LABEL
+
+#undef PSEUDO_END
+#if defined(PIC) && !RTLD_PRIVATE_ERRNO
# define PSEUDO_END(sym) END(sym)
#else
-# define PSEUDO(name, syscall_name, args) \
- .globl name; \
- .align 4; \
- .ent name,0; \
-__LABEL(name) \
- PSEUDO_PREPARE_ARGS \
- lda v0, SYS_ify(syscall_name); \
- call_pal PAL_callsys; \
- bne a3, 1996f; \
-3:
-
-# undef PSEUDO_END
# define PSEUDO_END(sym) \
-1996: \
- PSEUDO_LOADGP; \
+$syscall_error: \
SYSCALL_ERROR_HANDLER; \
END(sym)
-#endif /* PIC && !RTLD_PRIVATE_ERRNO */
-
-#undef PSEUDO_PREPARE_ARGS
-#define PSEUDO_PREPARE_ARGS /* Nothing. */
+#endif
#define r0 v0
#define r1 a4
#define MOVE(x,y) mov x,y
+#else /* !ASSEMBLER */
+
+/* ??? Linux needs to be able to override INLINE_SYSCALL for one
+ particular special case. Make this easy. */
+
+#define INLINE_SYSCALL(name, nr, args...) \
+ INLINE_SYSCALL1(name, nr, args)
+
+#define INLINE_SYSCALL1(name, nr, args...) \
+({ \
+ long _sc_ret, _sc_err; \
+ inline_syscall##nr(name, args); \
+ if (_sc_err) \
+ { \
+ __set_errno (_sc_ret); \
+ _sc_ret = -1L; \
+ } \
+ _sc_ret; \
+})
+
+#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
+ INTERNAL_SYSCALL1(name, err_out, nr, args)
+
+#define INTERNAL_SYSCALL1(name, err_out, nr, args...) \
+({ \
+ long _sc_ret, _sc_err; \
+ inline_syscall##nr(name, args); \
+ err_out = _sc_err; \
+ _sc_ret; \
+})
+
+#define INTERNAL_SYSCALL_DECL(err) long int err
+#define INTERNAL_SYSCALL_ERROR_P(val, err) err
+#define INTERNAL_SYSCALL_ERRNO(val, err) val
+
+#define inline_syscall_clobbers \
+ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory"
+
+/* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
+ as modeled within GCC, and explicit use of the R0 register. If we use
+ the register via the asm, the scheduler may place the PAL_rduniq insn
+ before we've copied the data from R0 into _sc_ret. If this happens
+ we'll get a reload abort, since R0 is live at the same time it is
+ needed for the PAL_rduniq.
+
+ Solve this by using the "v" constraint instead of an asm for the syscall
+ output. We don't do this unconditionally to allow compilation with
+ older compilers. */
+
+#ifdef USE_TLS
+#define inline_syscall_r0_asm
+#define inline_syscall_r0_out_constraint "=v"
+#else
+#define inline_syscall_r0_asm __asm__("$0")
+#define inline_syscall_r0_out_constraint "=r"
+#endif
+
+/* It is moderately important optimization-wise to limit the lifetime
+ of the hard-register variables as much as possible. Thus we copy
+ in/out as close to the asm as possible. */
+
+#define inline_syscall0(name, args...) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ __asm__("callsys # %0 %1 <= %2" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19) \
+ : "0"(_sc_0) \
+ : inline_syscall_clobbers, \
+ "$16", "$17", "$18", "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall1(name,arg1) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ __asm__("callsys # %0 %1 <= %2 %3" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16) \
+ : "0"(_sc_0), "2"(_sc_16) \
+ : inline_syscall_clobbers, \
+ "$17", "$18", "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall2(name,arg1,arg2) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
+ : inline_syscall_clobbers, \
+ "$18", "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall3(name,arg1,arg2,arg3) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18) \
+ : inline_syscall_clobbers, "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19) \
+ : inline_syscall_clobbers, "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
+ : inline_syscall_clobbers, "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ register long _sc_21 __asm__("$21"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ _sc_21 = (long) (arg6); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
+ : inline_syscall_r0_out_constraint (_sc_0), \
+ "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
+ "6"(_sc_21) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=411c121bce89d50d8354114adc43fc4e91a2cc3d
commit 411c121bce89d50d8354114adc43fc4e91a2cc3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 19:23:41 2003 +0000
Move inline syscall bits to sysdeps/unix/alpha/sysdep.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 53af4b7..6a07906 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -72,192 +72,11 @@
? __syscall_##name(args) \
: INLINE_SYSCALL1(name, nr, args))
-#define INLINE_SYSCALL1(name, nr, args...) \
-({ \
- long _sc_ret, _sc_err; \
- inline_syscall##nr(name, args); \
- if (_sc_err) \
- { \
- __set_errno (_sc_ret); \
- _sc_ret = -1L; \
- } \
- _sc_ret; \
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, err_out, nr, args...) \
+({ \
+ extern char ChEcK[__NR_##name == __NR_rt_sigaction ? -1 : 1]; \
+ INTERNAL_SYSCALL1(name, err_out, nr, args); \
})
-#define inline_syscall_clobbers \
- "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
- "$22", "$23", "$24", "$25", "$27", "$28", "memory"
-
-/* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
- as modeled within GCC, and explicit use of the R0 register. If we use
- the register via the asm, the scheduler may place the PAL_rduniq insn
- before we've copied the data from R0 into _sc_ret. If this happens
- we'll get a reload abort, since R0 is live at the same time it is
- needed for the PAL_rduniq.
-
- Solve this by using the "v" constraint instead of an asm for the syscall
- output. We don't do this unconditionally to allow compilation with
- older compilers. */
-
-#ifdef USE_TLS
-#define inline_syscall_r0_asm
-#define inline_syscall_r0_out_constraint "=v"
-#else
-#define inline_syscall_r0_asm __asm__("$0")
-#define inline_syscall_r0_out_constraint "=r"
-#endif
-
-/* It is moderately important optimization-wise to limit the lifetime
- of the hard-register variables as much as possible. Thus we copy
- in/out as close to the asm as possible. */
-
-#define inline_syscall0(name, args...) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- __asm__("callsys # %0 %1 <= %2" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19) \
- : "0"(_sc_0) \
- : inline_syscall_clobbers, \
- "$16", "$17", "$18", "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall1(name,arg1) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- __asm__("callsys # %0 %1 <= %2 %3" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16) \
- : "0"(_sc_0), "2"(_sc_16) \
- : inline_syscall_clobbers, \
- "$17", "$18", "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall2(name,arg1,arg2) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- __asm__("callsys # %0 %1 <= %2 %3 %4" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
- : inline_syscall_clobbers, \
- "$18", "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall3(name,arg1,arg2,arg3) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18) \
- : inline_syscall_clobbers, "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19) \
- : inline_syscall_clobbers, "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- register long _sc_20 __asm__("$20"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18), "=r"(_sc_20) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
- : inline_syscall_clobbers, "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
-{ \
- register long _sc_0 inline_syscall_r0_asm; \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- register long _sc_20 __asm__("$20"); \
- register long _sc_21 __asm__("$21"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- _sc_21 = (long) (arg6); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : inline_syscall_r0_out_constraint (_sc_0), \
- "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
- "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
- : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
- "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
- "6"(_sc_21) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
#endif /* _LINUX_ALPHA_SYSDEP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df162e76028189161ed3d8ccefac6818999478a1
commit df162e76028189161ed3d8ccefac6818999478a1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 19:23:03 2003 +0000
Use correct definition of errno for NOT_IN_libc.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 4c7c134..c31508b 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -47,11 +47,17 @@ __syscall_error:
#if defined(_LIBC_REENTRANT) && USE___THREAD
+#ifndef NOT_IN_libc
+# define SYSCALL_ERROR_ERRNO __libc_errno
+#else
+# define SYSCALL_ERROR_ERRNO errno
+#endif
+
LOADGP
PROLOGUE
mov v0, t0
call_pal PAL_rduniq
- ldq t1, __libc_errno(gp) !gottprel
+ ldq t1, SYSCALL_ERROR_ERRNO(gp) !gottprel
addq v0, t1, v0
stl t0, 0(v0)
lda v0, -1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a48dbdf0443228064c425d5b9909e75f7b3dee0a
commit a48dbdf0443228064c425d5b9909e75f7b3dee0a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 19:22:32 2003 +0000
(elf_machine_rela): Compute DTPREL64 and TPREL64 without loadbase applied.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3a182ca..5016f13 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -544,15 +544,25 @@ elf_machine_rela (struct link_map *map,
else
{
Elf64_Addr sym_value;
+ Elf64_Addr sym_raw_value;
#if defined USE_TLS && !defined RTLD_BOOTSTRAP
struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
- sym_value = sym ? sym_map->l_addr + sym->st_value : 0;
+ sym_raw_value = sym_value = reloc->r_addend;
+ if (sym)
+ {
+ sym_raw_value += sym->st_value;
+ sym_value = sym_raw_value + sym_map->l_addr;
+ }
#else
Elf64_Addr loadbase = RESOLVE (&sym, version, r_type);
- sym_value = sym ? loadbase + sym->st_value : 0;
+ sym_raw_value = sym_value = reloc->r_addend;
+ if (sym)
+ {
+ sym_raw_value += sym->st_value;
+ sym_value = sym_raw_value + loadbase;
+ }
#endif
- sym_value += reloc->r_addend;
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
@@ -600,18 +610,18 @@ elf_machine_rela (struct link_map *map,
#ifndef RTLD_BOOTSTRAP
/* During relocation all TLS symbols are defined and used.
Therefore the offset is already correct. */
- *reloc_addr = sym_value;
+ *reloc_addr = sym_raw_value;
#endif
}
else if (r_type == R_ALPHA_TPREL64)
{
#ifdef RTLD_BOOTSTRAP
- *reloc_addr = sym_value - map->l_tls_offset;
+ *reloc_addr = sym_raw_value - map->l_tls_offset;
#else
if (sym_map)
{
CHECK_STATIC_TLS (map, sym_map);
- *reloc_addr = sym_value - sym_map->l_tls_offset;
+ *reloc_addr = sym_raw_value - sym_map->l_tls_offset;
}
#endif
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5e2ab0edb7ca64e3682ae305d0c04ef0eb37f6b
commit f5e2ab0edb7ca64e3682ae305d0c04ef0eb37f6b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 09:16:06 2003 +0000
vfork implementation for LinuxThreads/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
new file mode 100644
index 0000000..6092bd9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S
@@ -0,0 +1,57 @@
+/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep-cancel.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* Clone the calling process, but without copying the whole address
+pace.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new
+rocess,
+ and the process ID of the new process to the old process. */
+
+ PSEUDO_PROLOGUE
+
+ENTRY (__vfork)
+
+#ifdef __NR_vfork
+ SINGLE_THREAD_P
+ bne HIDDEN_JUMPTARGET (__fork)
+ swi __NR_vfork
+ cmn a1, #4096
+ RETINSTR(movcc, pc, lr)
+
+ /* Check if vfork syscall is known at all. */
+ ldr a2, =-ENOSYS
+ teq a1, a2
+ bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#endif
+
+ /* If we don't have vfork, fork is close enough. */
+ swi __NR_fork
+ cmn a1, #4096
+ RETINSTR(movcc, pc, lr)
+ b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+
+PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e62ed29b3b5e1de4df93dd1d54c5fb939834d4b4
commit e62ed29b3b5e1de4df93dd1d54c5fb939834d4b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 09:14:25 2003 +0000
(PSEUDO_RET): Correctly unstack lr.
(UNDOARGS_5): Fix ordering of pushes and pops.
(SINGLE_THREAD_P_PIC): New.
(SINGLE_THREAD_P_INT): Likewise.
(SINGLE_THREAD_P): Implement in terms of above. Restore lr if it was stacked.
(PSEUDO): Use SINGLE_THREAD_P_INT.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
index 5f3709f..38e472d 100644
--- a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -27,6 +27,7 @@
# undef PSEUDO_RET
# define PSEUDO_RET \
ldrcc pc, [sp], $4; \
+ ldr lr, [sp], $4; \
b PLTJMP(SYSCALL_ERROR)
# undef PSEUDO
@@ -34,7 +35,7 @@
.section ".text"; \
PSEUDO_PROLOGUE; \
ENTRY (name) \
- SINGLE_THREAD_P; \
+ SINGLE_THREAD_P_INT; \
bne .Lpseudo_cancel; \
DO_CALL (syscall_name, args); \
cmn r0, $4096; \
@@ -74,7 +75,7 @@
# define UNDOC2ARGS_4
# define DOCARGS_5 stmfd sp!, {r0-r3}
-# define UNDOCARGS_5 str r4, [sp, #-4]!; ldmfd sp, {r0-r4}
+# define UNDOCARGS_5 ldmfd sp, {r0-r3}; str r4, [sp, #-4]!; ldr r4, [sp, #24]
# define UNDOC2ARGS_5 ldr r4, [sp], #20
# ifdef IS_IN_libpthread
@@ -92,10 +93,11 @@ extern int __local_multiple_threads attribute_hidden;
# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
# else
# if !defined PIC
-# define SINGLE_THREAD_P \
+# define SINGLE_THREAD_P_INT \
ldr ip, =__local_multiple_threads; \
ldr ip, [ip]; \
teq ip, #0;
+# define SINGLE_THREAD_P SINGLE_THREAD_P_INT
# define MAYBE_SAVE_LR \
str lr, [sp, $-4]!;
# define PSEUDO_RET_MOV \
@@ -103,14 +105,19 @@ extern int __local_multiple_threads attribute_hidden;
b PLTJMP(SYSCALL_ERROR)
# define PSEUDO_PROLOGUE
# else
-# define SINGLE_THREAD_P \
- str lr, [sp, $-4]!; \
+# define SINGLE_THREAD_P_PIC(reg) \
ldr ip, 1b; \
- ldr lr, 2b; \
+ ldr reg, 2b; \
3: \
add ip, pc, ip; \
ldr ip, [ip, lr]; \
teq ip, #0;
+# define SINGLE_THREAD_P_INT \
+ str lr, [sp, $-4]!; \
+ SINGLE_THREAD_P_PIC(lr)
+# define SINGLE_THREAD_P \
+ SINGLE_THREAD_P_INT; \
+ ldr lr, [sp], $4
# define PSEUDO_PROLOGUE \
1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \
2: .word __local_multiple_threads(GOTOFF);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=191cbebf58c0af533ca98c2fc7d4892d4eea66c4
commit 191cbebf58c0af533ca98c2fc7d4892d4eea66c4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 09:06:28 2003 +0000
Add cancellation support.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index f4ccc54..3e93ceb 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <socketcall.h>
#define P(a, b) P2(a, b)
@@ -53,6 +53,10 @@
#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
#endif
+#if defined NEED_CANCELLATION && defined CENABLE
+ PSEUDO_PROLOGUE
+#endif
+
.globl __socket
ENTRY (__socket)
/* This code previously moved sp into ip and stored the args using
@@ -68,6 +72,15 @@ ENTRY (__socket)
/* Push args onto the stack. */
P(PUSHARGS_,NARGS)
+#if defined NEED_CANCELLATION && defined CENABLE
+#ifdef PIC
+ SINGLE_THREAD_P_PIC(r3)
+#else
+ SINGLE_THREAD_P
+#endif
+ bne 1f
+#endif
+
/* Do the system call trap. */
mov a1, $P(SOCKOP_,socket)
mov a2, sp
@@ -81,6 +94,30 @@ ENTRY (__socket)
RETINSTR(movcc, pc, r14)
b PLTJMP(SYSCALL_ERROR)
+#if defined NEED_CANCELLATION && defined CENABLE
+1:
+ str lr, [sp, #-4]!
+ CENABLE
+ mov ip, r0
+
+ mov r0, #P(SOCKOP_,socket)
+ add r1, sp, #4
+ swi SYS_ify(socketcall)
+
+ str r0, [sp, #-4]!
+ mov r0, ip
+ CDISABLE
+ ldr r0, [sp], #4
+ ldr lr, [sp], #4
+
+ P(POPARGS_,NARGS)
+
+ /* r0 is < 0 if there was an error. */
+ cmn r0, $124
+ RETINSTR(movcc, pc, r14)
+ b PLTJMP(SYSCALL_ERROR)
+#endif
+
PSEUDO_END (__socket)
weak_alias (__socket, socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ad3dd03b3f5790c75f03dbae653879e090ffd4f
commit 6ad3dd03b3f5790c75f03dbae653879e090ffd4f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 12 08:47:37 2003 +0000
(elf_machine_rela): Move CHECK_STATIC_TLS before l_tls_offset use.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 711bf10..3a182ca 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -610,8 +610,8 @@ elf_machine_rela (struct link_map *map,
#else
if (sym_map)
{
- *reloc_addr = sym_value - sym_map->l_tls_offset;
CHECK_STATIC_TLS (map, sym_map);
+ *reloc_addr = sym_value - sym_map->l_tls_offset;
}
#endif
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cc157d474ad2cd7bdffd0e5401db477eeb980b2
commit 9cc157d474ad2cd7bdffd0e5401db477eeb980b2
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Jan 11 15:26:35 2003 +0000
* sysdeps/unix/mips/fork.S: add PSEUDO_END.
* sysdeps/unix/mips/brk.S: Likewise.
* sysdeps/unix/mips/pipe.S: Likewise.
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index 9674571..f094cda 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -42,6 +42,6 @@ SYSCALL__(brk, 1)
sw a0, __curbrk
move v0, zero
jr ra
- .end __brk
+PSEUDO_END(__brk)
weak_alias (__brk, brk)
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index 1850c17..a7848ac 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -26,7 +26,7 @@ SYSCALL__ (fork, 0)
move v0, zero
parent:
ret
- .end __fork
-libc_hidden_def (__fork)
+PSEUDO_END(__fork)
+libc_hidden_def (__fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index 1aebb9b..ee7b76d 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -27,7 +27,7 @@ SYSCALL__ (pipe, 1)
/* Go out with a clean status. */
move v0, zero
j ra
- .end __pipe
+PSEUDO_END(__pipe)
libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7aa3cacfc38adfd5f1485cc59b5121f0810270c
commit c7aa3cacfc38adfd5f1485cc59b5121f0810270c
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jan 10 15:36:20 2003 +0000
GET_NPROCS_PARSER for m68k.
diff --git a/sysdeps/unix/sysv/linux/m68k/getsysstats.c b/sysdeps/unix/sysv/linux/m68k/getsysstats.c
new file mode 100644
index 0000000..23207e9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getsysstats.c
@@ -0,0 +1,37 @@
+/* Determine various system internal values, Linux/m68k version.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* We need to define a special parser for /proc/cpuinfo. */
+#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ (RESULT) = 0; \
+ /* Read all lines and count the lines starting with the string \
+ "CPU:". We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really \
+ enough. */ \
+ while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ if (strncmp (BUFFER, "CPU:", 4) == 0) \
+ ++(RESULT); \
+ } \
+ while (0)
+
+#include <sysdeps/unix/sysv/linux/getsysstats.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=defd0faa3fd70330f8b6bf12680d5cc04e273f53
commit defd0faa3fd70330f8b6bf12680d5cc04e273f53
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jan 10 14:08:16 2003 +0000
(JUMPTARGET): Undefine before defining it.
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
index 554b92d..f492ff6 100644
--- a/sysdeps/m68k/sysdep.h
+++ b/sysdeps/m68k/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for m68k.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,25 +23,25 @@
/* Syntactic details of assembler. */
-#ifdef HAVE_ELF
+# ifdef HAVE_ELF
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
-#define ALIGNARG(log2) 1<<log2
+# define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
-#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
+# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
/* In ELF C symbols are asm symbols. */
-#undef NO_UNDERSCORES
-#define NO_UNDERSCORES
+# undef NO_UNDERSCORES
+# define NO_UNDERSCORES
-#else
+# else
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
+# define ALIGNARG(log2) log2
+# define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
+# define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-#endif
+# endif
/* Define an entry point visible from C.
@@ -49,51 +49,52 @@
There is currently a bug in gdb which prevents us from specifying
incomplete stabs information. Fake some entries here which specify
the current source file. */
-#define ENTRY(name) \
+# define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \
.align ALIGNARG(2); \
C_LABEL(name) \
CALL_MCOUNT
-#undef END
-#define END(name) ASM_SIZE_DIRECTIVE(name)
+# undef END
+# define END(name) ASM_SIZE_DIRECTIVE(name)
/* If compiled for profiling, call `_mcount' at the start of each function. */
-#ifdef PROF
+# ifdef PROF
/* The mcount code relies on a normal frame pointer being on the stack
to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
+# define CALL_MCOUNT \
move.l %fp, -(%sp); move.l %sp, %fp; \
jbsr JUMPTARGET (mcount); \
move.l (%sp)+, %fp;
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
+# else
+# define CALL_MCOUNT /* Do nothing. */
+# endif
-#ifdef NO_UNDERSCORES
+# ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
C name space. Make sure we use an innocuous name. */
-#define syscall_error __syscall_error
-#define mcount _mcount
-#endif
+# define syscall_error __syscall_error
+# define mcount _mcount
+# endif
-#define PSEUDO(name, syscall_name, args) \
+# define PSEUDO(name, syscall_name, args) \
.globl syscall_error; \
ENTRY (name) \
DO_CALL (syscall_name, args); \
jcc JUMPTARGET(syscall_error)
-#undef PSEUDO_END
-#define PSEUDO_END(name) \
+# undef PSEUDO_END
+# define PSEUDO_END(name) \
END (name)
-#ifdef PIC
-#define JUMPTARGET(name) name##@PLTPC
-#else
-#define JUMPTARGET(name) name
-#endif
+# undef JUMPTARGET
+# ifdef PIC
+# define JUMPTARGET(name) name##@PLTPC
+# else
+# define JUMPTARGET(name) name
+# endif
#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2eb74642248f1a77600a6ad0ed01126d0ca3f9a4
commit 2eb74642248f1a77600a6ad0ed01126d0ca3f9a4
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jan 10 14:05:26 2003 +0000
Optimize for kernels which are known to have the vfork syscall.
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
index ed5e1e8..8027b2f 100644
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -20,6 +20,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
#include <bits/errno.h>
+#include <kernel-features.h>
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
@@ -46,13 +47,20 @@ ENTRY (__vfork)
/* Push back the return PC. */
movel %a0,%sp@-
+# ifdef __ASSUME_VFORK_SYSCALL
+# ifndef PIC
+ jbra SYSCALL_ERROR_LABEL
+# endif
+# else
/* Check if vfork syscall is known at all. */
movel #-ENOSYS,%d1
cmpl %d0,%d1
jne SYSCALL_ERROR_LABEL
+# endif
#endif
+#ifndef __ASSUME_VFORK_SYSCALL
/* If we don't have vfork, fork is close enough. */
movel #SYS_ify (fork), %d0
@@ -60,6 +68,7 @@ ENTRY (__vfork)
tstl %d0
jmi SYSCALL_ERROR_LABEL
rts
+#endif
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3555d408986b545ef0326d8ef67355778ac9a01
commit f3555d408986b545ef0326d8ef67355778ac9a01
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jan 9 15:30:03 2003 +0000
Regenerated.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index c6c3ffa..b8b1d26 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -1,65 +1,39 @@
# Begin of automatic generation
-# acos
-Test "acos (0.7) == 0.79539883018414355549096833892476432":
+# acosh
+Test "acosh (7) == 2.63391579384963341725009269461593689":
ildouble: 1
ldouble: 1
-# acosh
-Test "acosh (7) == 2.633915793849633417250092694615937":
+# asinh
+Test "asinh (0.75) == 0.693147180559945309417232121458176568":
ildouble: 1
ldouble: 1
-# asin
-Test "asin (0.7) == 0.77539749661075306374035335271498708":
-double: 1
-idouble: 1
+# atan2
+Test "atan2 (0.390625, .00029) == 1.57005392693128974780151246612928941":
+ildouble: 1
+ldouble: 1
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
ildouble: 1
ldouble: 1
-
-# asinh
-Test "asinh (0.7) == 0.652666566082355786":
-ildouble: 14
-ldouble: 14
# atanh
-Test "atanh (0.7) == 0.8673005276940531944":
-double: 1
-idouble: 1
-
-# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
ildouble: 1
ldouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
+Test "Real part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
# cacosh
Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
@@ -74,26 +48,26 @@ double: 1
idouble: 1
ildouble: 2
ldouble: 2
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
+Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834467 + 1.11752014915610270578240049553777969 i":
+float: 1
+ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -110,16 +84,16 @@ idouble: 13
ifloat: 1
ildouble: 6
ldouble: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
-float: 2
-ifloat: 2
-ildouble: 2
-ldouble: 2
# catan
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -127,28 +101,22 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
+Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
ildouble: 1
ldouble: 1
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
-float: 1
-ifloat: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
ildouble: 1
ldouble: 1
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
-ildouble: 1
-ldouble: 1
# cbrt
Test "cbrt (-0.001) == -0.1":
ildouble: 1
ldouble: 1
-Test "cbrt (0.7) == 0.8879040017426007084":
-double: 1
-idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+ildouble: 1
+ldouble: 1
# ccos
Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
@@ -159,9 +127,14 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
-double: 1
-idouble: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -174,16 +147,14 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
-ildouble: 2
-ldouble: 2
# cexp
Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
@@ -192,42 +163,91 @@ ifloat: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
-float: 3
-ifloat: 3
-ildouble: 2
-ldouble: 2
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 2
ifloat: 2
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# clog
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+ildouble: 1
+ldouble: 1
# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
double: 1
idouble: 1
-Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
float: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
# cos
-Test "cos (0.7) == 0.76484218728448842625585999019186495":
-double: 1
-idouble: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
float: 1
@@ -250,12 +270,45 @@ ifloat: 1
ildouble: 1
ldouble: 1
-# cosh
-Test "cosh (0.7) == 1.255169005630943018":
+# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+float: 1
+ifloat: 1
+ildouble: 9
+ldouble: 9
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+float: 2
+ifloat: 2
ildouble: 2
ldouble: 2
-
-# cpow
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 15
+ldouble: 15
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
ildouble: 5
ldouble: 5
@@ -289,7 +342,12 @@ ifloat: 1
Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
float: 1
ifloat: 1
@@ -302,17 +360,12 @@ float: 1
ifloat: 1
ildouble: 2
ldouble: 2
-Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
-float: 1
-ifloat: 1
-
-# csqrt
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
@@ -323,14 +376,10 @@ ldouble: 439
Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
ildouble: 1
ldouble: 1
-Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
-Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+Test "Real part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
ildouble: 2
ldouble: 2
@@ -344,76 +393,27 @@ ldouble: 25
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
double: 1
idouble: 1
-Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+Test "Imaginary part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
# erfc
-Test "erfc (0.7) == 0.32219880616258152702":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-Test "erfc (1.2) == 0.089686021770364619762":
-float: 2
-ifloat: 2
-ildouble: 3
-ldouble: 3
-Test "erfc (2.0) == 0.0046777349810472658379":
-double: 1
-idouble: 1
-Test "erfc (4.1) == 0.67000276540848983727e-8":
-double: 24
-float: 11
-idouble: 24
-ifloat: 11
-ildouble: 12
-ldouble: 12
-
-# exp10
-Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-
-# expm1
-Test "expm1 (1) == M_El - 1.0":
-ildouble: 1
-ldouble: 1
-
-# fmod
-Test "fmod (-6.5, -2.3) == -1.9":
-double: 2
+Test "erfc (0.75) == 0.288844366346484868401062165408589223":
float: 1
-idouble: 2
ifloat: 1
+Test "erfc (1.25) == 0.0770998717435417698634765188027188596":
ildouble: 1
ldouble: 1
-Test "fmod (-6.5, 2.3) == -1.9":
-double: 2
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
float: 1
-idouble: 2
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "fmod (6.5, -2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "fmod (6.5, 2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
ifloat: 1
+
+# expm1
+Test "expm1 (1) == M_El - 1.0":
ildouble: 1
ldouble: 1
@@ -444,9 +444,6 @@ ifloat: 1
Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
-ildouble: 1
-ldouble: 1
Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -463,10 +460,13 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "j0 (1.5) == 0.51182767173591812875":
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (1.5) == 0.511827671735918128749051744283411720":
float: 1
ifloat: 1
-Test "j0 (10.0) == -0.24593576445134833520":
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
double: 1
idouble: 1
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -476,113 +476,119 @@ ildouble: 1
ldouble: 1
# j1
-Test "j1 (-1.0) == -0.44005058574493351596":
+Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
float: 1
ifloat: 1
-Test "j1 (1.0) == 0.44005058574493351596":
+Test "j1 (1.0) == 0.440050585744933515959682203718914913":
float: 1
ifloat: 1
-Test "j1 (1.5) == 0.55793650791009964199":
+Test "j1 (1.5) == 0.557936507910099641990121213156089400":
float: 1
ifloat: 1
-Test "j1 (10.0) == 0.043472746168861436670":
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-ildouble: 2
-ldouble: 2
-Test "j1 (2.0) == 0.57672480775687338720":
+ildouble: 1
+ldouble: 1
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+float: 1
+ifloat: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
float: 1
ifloat: 1
-Test "j1 (8.0) == 0.23463634685391462438":
ildouble: 1
ldouble: 1
# jn
-Test "jn (0, 1.5) == 0.51182767173591812875":
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
float: 1
ifloat: 1
-Test "jn (0, 10.0) == -0.24593576445134833520":
+ildouble: 1
+ldouble: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 1.5) == 0.511827671735918128749051744283411720":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
double: 1
idouble: 1
-Test "jn (1, -1.0) == -0.44005058574493351596":
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
float: 1
ifloat: 1
-Test "jn (1, 1.0) == 0.44005058574493351596":
+Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
float: 1
ifloat: 1
-Test "jn (1, 1.5) == 0.55793650791009964199":
+Test "jn (1, 1.5) == 0.557936507910099641990121213156089400":
float: 1
ifloat: 1
-Test "jn (1, 10.0) == 0.043472746168861436670":
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-ildouble: 2
-ldouble: 2
-Test "jn (1, 2.0) == 0.57672480775687338720":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+float: 1
+ifloat: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
float: 1
ifloat: 1
-Test "jn (1, 8.0) == 0.23463634685391462438":
ildouble: 1
ldouble: 1
-Test "jn (10, -1.0) == 0.26306151236874532070e-9":
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
-Test "jn (10, 0.1) == 0.26905328954342155795e-19":
-double: 4
-float: 6
-idouble: 4
-ifloat: 6
-ildouble: 1
-ldouble: 1
-Test "jn (10, 0.7) == 0.75175911502153953928e-11":
-double: 3
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+float: 1
+ifloat: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
float: 2
-idouble: 3
ifloat: 2
ildouble: 2
ldouble: 2
-Test "jn (10, 1.0) == 0.26306151236874532070e-9":
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
-Test "jn (10, 10.0) == 0.20748610663335885770":
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 1
-float: 11
+float: 5
idouble: 1
-ifloat: 11
+ifloat: 5
ildouble: 2
ldouble: 2
-Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
-Test "jn (3, -1.0) == -0.019563353982668405919":
+Test "jn (3, -1.0) == -0.0195633539826684059189053216217515083":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "jn (3, 0.1) == 0.000020820315754756261429":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
-Test "jn (3, 0.7) == 0.0069296548267508408077":
-double: 2
-idouble: 2
-Test "jn (3, 1.0) == 0.019563353982668405919":
+Test "jn (3, 1.0) == 0.0195633539826684059189053216217515083":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "jn (3, 10.0) == 0.058379379305186812343":
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
double: 1
-float: 3
+float: 1
idouble: 1
-ifloat: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
ildouble: 1
ldouble: 1
@@ -610,13 +616,9 @@ ildouble: 1
ldouble: 1
# log
-Test "log (0.7) == -0.35667494393873237891263871124118447":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
+Test "log (0.75) == -0.287682072451780927439219005993827432":
+ildouble: 1
+ldouble: 1
Test "log (2) == M_LN2l":
ildouble: 1
ldouble: 1
@@ -625,50 +627,29 @@ float: 1
ifloat: 1
# log10
-Test "log10 (0.7) == -0.15490195998574316929":
-double: 1
-idouble: 1
-ildouble: 1
-ldouble: 1
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+ildouble: 2
+ldouble: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
-
-# log2
-Test "log2 (0.7) == -0.51457317282975824043":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
ildouble: 1
ldouble: 1
-# pow
-Test "pow (0.7, 1.2) == 0.65180494056638638188":
+# log2
+Test "log2 (0.75) == -.415037499278843818546261056052183492":
ildouble: 1
ldouble: 1
-# sin
-Test "sin (0.7) == 0.64421768723769105367261435139872014":
+# pow
+Test "pow (0.75, 1.25) == 0.697953644326574699205914060237425566":
ildouble: 1
ldouble: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res":
-ildouble: 1
-ldouble: 1
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
-double: 1
-idouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
float: 1
@@ -692,12 +673,12 @@ ildouble: 1
ldouble: 1
# sinh
-Test "sinh (0.7) == 0.75858370183953350346":
-float: 1
-ifloat: 1
+Test "sinh (0.75) == 0.822316731935829980703661634446913849":
+ildouble: 1
+ldouble: 1
# tan
-Test "tan (0.7) == 0.84228838046307944812813500221293775":
+Test "tan (0.75) == 0.931596459944072461165202756573936428":
ildouble: 1
ldouble: 1
Test "tan (pi/4) == 1":
@@ -727,197 +708,165 @@ ildouble: 1
ldouble: 1
# y0
-Test "y0 (0.1) == -1.5342386513503668441":
+Test "y0 (0.125) == -1.38968062514384052915582277745018693":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "y0 (0.75) == -0.137172769385772397522814379396581855":
double: 1
-float: 2
idouble: 1
-ifloat: 2
-Test "y0 (0.7) == -0.19066492933739506743":
-double: 2
-idouble: 2
ildouble: 2
ldouble: 2
-Test "y0 (1.5) == 0.38244892379775884396":
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
ildouble: 1
ldouble: 1
-Test "y0 (10.0) == 0.055671167283599391424":
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
ildouble: 1
ldouble: 1
-Test "y0 (2.0) == 0.51037567264974511960":
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+ildouble: 1
+ldouble: 1
+Test "y0 (2.0) == 0.510375672649745119596606592727157873":
float: 1
ifloat: 1
-Test "y0 (8.0) == 0.22352148938756622053":
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
# y1
-Test "y1 (0.1) == -6.4589510947020269877":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
ildouble: 1
ldouble: 1
-Test "y1 (0.7) == -1.1032498719076333697":
+Test "y1 (1.0) == -0.781212821300288716547150000047964821":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-Test "y1 (1.0) == -0.78121282130028871655":
-double: 1
-idouble: 1
-Test "y1 (1.5) == -0.41230862697391129595":
-float: 2
-ifloat: 2
-Test "y1 (10.0) == 0.24901542420695388392":
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
float: 1
ifloat: 1
-Test "y1 (2.0) == -0.10703243154093754689":
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
-Test "y1 (8.0) == -0.15806046173124749426":
-ildouble: 2
-ldouble: 2
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+ildouble: 1
+ldouble: 1
# yn
-Test "yn (0, 0.1) == -1.5342386513503668441":
+Test "yn (0, 0.125) == -1.38968062514384052915582277745018693":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "yn (0, 0.75) == -0.137172769385772397522814379396581855":
double: 1
-float: 2
idouble: 1
-ifloat: 2
-Test "yn (0, 0.7) == -0.19066492933739506743":
-double: 2
-idouble: 2
ildouble: 2
ldouble: 2
-Test "yn (0, 1.5) == 0.38244892379775884396":
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+ildouble: 1
+ldouble: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
ildouble: 1
ldouble: 1
-Test "yn (0, 10.0) == 0.055671167283599391424":
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
ildouble: 1
ldouble: 1
-Test "yn (0, 2.0) == 0.51037567264974511960":
+Test "yn (0, 2.0) == 0.510375672649745119596606592727157873":
float: 1
ifloat: 1
-Test "yn (0, 8.0) == 0.22352148938756622053":
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "yn (1, 0.1) == -6.4589510947020269877":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
-Test "yn (1, 0.7) == -1.1032498719076333697":
-double: 1
+Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
float: 1
-idouble: 1
ifloat: 1
-Test "yn (1, 1.0) == -0.78121282130028871655":
+Test "yn (1, 1.0) == -0.781212821300288716547150000047964821":
double: 1
idouble: 1
-Test "yn (1, 1.5) == -0.41230862697391129595":
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
float: 1
ifloat: 1
-Test "yn (1, 10.0) == 0.24901542420695388392":
-float: 1
-ifloat: 1
-Test "yn (1, 2.0) == -0.10703243154093754689":
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
-Test "yn (1, 8.0) == -0.15806046173124749426":
-ildouble: 2
-ldouble: 2
-Test "yn (10, 0.1) == -0.11831335132045197885e19":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+ildouble: 1
+ldouble: 1
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
ildouble: 2
ldouble: 2
-Test "yn (10, 0.7) == -0.42447194260703866924e10":
-double: 6
-idouble: 6
-ildouble: 7
-ldouble: 7
-Test "yn (10, 10.0) == -0.35981415218340272205":
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+float: 1
+ifloat: 1
+ildouble: 4
+ldouble: 4
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (10, 2.0) == -129184.54220803928264":
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
ildouble: 1
ldouble: 1
-Test "yn (3, 0.1) == -5099.3323786129048894":
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
double: 1
-float: 2
-idouble: 1
-ifloat: 2
-ildouble: 2
-ldouble: 2
-Test "yn (3, 0.7) == -15.819479052819633505":
-double: 2
float: 1
-idouble: 2
+idouble: 1
ifloat: 1
ildouble: 2
ldouble: 2
-Test "yn (3, 2.0) == -1.1277837768404277861":
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
float: 1
ifloat: 1
# Maximal error of functions:
-Function: "acos":
+Function: "acosh":
ildouble: 1
ldouble: 1
-Function: "acosh":
+Function: "asinh":
ildouble: 1
ldouble: 1
-Function: "asin":
-double: 1
-idouble: 1
+Function: "atan2":
ildouble: 1
ldouble: 1
-Function: "asinh":
-ildouble: 14
-ldouble: 14
-
Function: "atanh":
-double: 1
-idouble: 1
-
-Function: "cabs":
-float: 1
-ifloat: 1
ildouble: 1
ldouble: 1
Function: Real part of "cacos":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: Imaginary part of "cacos":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
+Function: Imaginary part of "cacos":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
Function: Real part of "cacosh":
double: 1
float: 7
@@ -928,21 +877,25 @@ ldouble: 6
Function: Imaginary part of "cacosh":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 2
ldouble: 2
Function: Real part of "casin":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "casin":
-float: 2
-ifloat: 2
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
Function: Real part of "casinh":
double: 6
@@ -954,9 +907,9 @@ ldouble: 5
Function: Imaginary part of "casinh":
double: 13
-float: 2
+float: 1
idouble: 13
-ifloat: 2
+ifloat: 1
ildouble: 6
ldouble: 6
@@ -975,47 +928,51 @@ ildouble: 1
ldouble: 1
Function: "cbrt":
-double: 1
-idouble: 1
ildouble: 1
ldouble: 1
Function: Real part of "ccos":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ccos":
-double: 1
float: 1
-idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
Function: Real part of "ccosh":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
-ildouble: 1
-ldouble: 1
+float: 1
+ifloat: 1
Function: Imaginary part of "ccosh":
float: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: Real part of "cexp":
-float: 3
-ifloat: 3
-ildouble: 2
-ldouble: 2
-
-Function: Imaginary part of "cexp":
float: 2
ifloat: 2
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "clog":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "clog10":
double: 1
float: 1
@@ -1029,8 +986,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
@@ -1040,17 +997,13 @@ ifloat: 1
ildouble: 1
ldouble: 1
-Function: "cosh":
-ildouble: 2
-ldouble: 2
-
Function: Real part of "cpow":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
-ildouble: 5
-ldouble: 5
+ifloat: 2
+ildouble: 15
+ldouble: 15
Function: Imaginary part of "cpow":
double: 2
@@ -1063,6 +1016,8 @@ ldouble: 2
Function: Real part of "csin":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "csin":
float: 1
@@ -1080,15 +1035,7 @@ ifloat: 1
ildouble: 2
ldouble: 2
-Function: Real part of "csqrt":
-float: 1
-ifloat: 1
-
Function: Real part of "ctan":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
ildouble: 439
ldouble: 439
@@ -1097,28 +1044,20 @@ ildouble: 2
ldouble: 2
Function: Real part of "ctanh":
-float: 1
-ifloat: 1
ildouble: 2
ldouble: 2
Function: Imaginary part of "ctanh":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 25
ldouble: 25
Function: "erfc":
-double: 24
-float: 11
-idouble: 24
-ifloat: 11
-ildouble: 12
-ldouble: 12
-
-Function: "exp10":
-double: 1
-idouble: 1
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -1126,14 +1065,6 @@ Function: "expm1":
ildouble: 1
ldouble: 1
-Function: "fmod":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
Function: "gamma":
ildouble: 1
ldouble: 1
@@ -1141,8 +1072,6 @@ ldouble: 1
Function: "hypot":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
Function: "j0":
double: 1
@@ -1155,14 +1084,14 @@ ldouble: 1
Function: "j1":
float: 2
ifloat: 2
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: "jn":
-double: 4
-float: 11
-idouble: 4
-ifloat: 11
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
ildouble: 2
ldouble: 2
@@ -1175,42 +1104,26 @@ ildouble: 1
ldouble: 1
Function: "log":
-double: 1
float: 1
-idouble: 1
-ifloat: 1
-ildouble: 2
-ldouble: 2
-
-Function: "log10":
-double: 1
-float: 1
-idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Function: "log1p":
-double: 1
+Function: "log10":
float: 1
-idouble: 1
ifloat: 1
ildouble: 2
ldouble: 2
-Function: "log2":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+Function: "log1p":
ildouble: 1
ldouble: 1
-Function: "pow":
+Function: "log2":
ildouble: 1
ldouble: 1
-Function: "sin":
+Function: "pow":
ildouble: 1
ldouble: 1
@@ -1223,8 +1136,8 @@ ildouble: 1
ldouble: 1
Function: "sinh":
-float: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "tan":
double: 1
@@ -1241,10 +1154,10 @@ ildouble: 1
ldouble: 1
Function: "y0":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
ildouble: 2
ldouble: 2
@@ -1253,15 +1166,15 @@ double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: "yn":
-double: 6
+double: 1
float: 2
-idouble: 6
+idouble: 1
ifloat: 2
-ildouble: 7
-ldouble: 7
+ildouble: 4
+ldouble: 4
# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d
commit aeeec7fb5eda5aaaa94d2e2a66780ef14a2dc57d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 9 04:09:26 2003 +0000
(INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO):
Add err argument.
(INTERNAL_SYSCALL_DECL): Define.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index e7caaa1..33ce123 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,93,95-99,2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 1995-2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -146,8 +146,11 @@ __local_syscall_error: \
} \
(int) _sys_result; })
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, nr, args...) \
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ unsigned int _sys_result; \
{ \
register int _a1 asm ("a1"); \
@@ -161,10 +164,11 @@ __local_syscall_error: \
(int) _sys_result; })
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= 0xfffff001u)
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((unsigned int) (val) >= 0xfffff001u)
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
+#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
#define LOAD_ARGS_0()
#define ASM_ARGS_0
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index e6fea78..125c584 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
December 1995.
@@ -180,20 +180,23 @@ SYSCALL_ERROR_LABEL: \
call. */
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
- ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \
+ ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result, ), 0))\
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \
_sys_result = (unsigned int) -1; \
} \
(int) _sys_result; })
+#undef INTERNAL_SYSCALL_DECL
+#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
+
/* Define a macro which expands inline into the wrapper code for a system
call. This use is for internal calls that do not need to handle errors
normally. It will never touch errno. This returns just what the kernel
gave back. */
#undef INTERNAL_SYSCALL
-#define INTERNAL_SYSCALL(name, nr, args...) \
+#define INTERNAL_SYSCALL(name, err, nr, args...) \
({ unsigned int _sys_result; \
{ \
LOAD_ARGS_##nr (args) \
@@ -207,10 +210,11 @@ SYSCALL_ERROR_LABEL: \
(int) _sys_result; })
#undef INTERNAL_SYSCALL_ERROR_P
-#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U)
+#define INTERNAL_SYSCALL_ERROR_P(val, err) \
+ ((unsigned int) (val) >= -4095U)
#undef INTERNAL_SYSCALL_ERRNO
-#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
+#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
#define LOAD_ARGS_0()
#define ASM_ARGS_0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51c050b0f7f8ec865e155cf34e2ace52a175d060
commit 51c050b0f7f8ec865e155cf34e2ace52a175d060
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 9 04:06:05 2003 +0000
Add INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 396b97d..6b2c928 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/m68k.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,8 @@ __brk (void *addr)
{
void *newbrk;
- newbrk = (void *) INTERNAL_SYSCALL (brk, 1, addr);
+ INTERNAL_SYSCALL_DECL (err);
+ newbrk = (void *) INTERNAL_SYSCALL (brk, err, 1, addr);
__curbrk = newbrk;
if (newbrk < addr)
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 266d81d..10a437b 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>.
@@ -37,9 +37,10 @@ __getpagesize ()
return GL(dl_pagesize);
#ifdef __NR_getpagesize
- result = INTERNAL_SYSCALL (getpagesize, 0);
+ INTERNAL_SYSCALL_DECL (err);
+ result = INTERNAL_SYSCALL (getpagesize, err, 0);
/* The only possible error is ENOSYS. */
- if (!INTERNAL_SYSCALL_ERROR_P (result))
+ if (!INTERNAL_SYSCALL_ERROR_P (result, err))
return result;
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c05bc2ca7b996f868046627cb81c8b446c140900
commit c05bc2ca7b996f868046627cb81c8b446c140900
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 8 00:15:33 2003 +0000
(__socket): Use SYSCALL_ERROR in place of __syscall_error.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 2672de7..f4ccc54 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -79,7 +79,7 @@ ENTRY (__socket)
/* r0 is < 0 if there was an error. */
cmn r0, $124
RETINSTR(movcc, pc, r14)
- b PLTJMP(syscall_error)
+ b PLTJMP(SYSCALL_ERROR)
PSEUDO_END (__socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f0910ca969f881cb379e6291f8894de3a7008fc
commit 2f0910ca969f881cb379e6291f8894de3a7008fc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 8 00:15:07 2003 +0000
(PSEUDO): Remove .type directive.
(PSEUDO_RET): Use SYSCALL_ERROR in place of __syscall_error.
(SYSCALL_ERROR): New.
(SYSCALL_ERROR_HANDLER) [NOT_IN_libc]: Provide local copy of error
handling code.
(INTERNAL_SYSCALL): Define.
(INLINE_SYSCALL): Use it.
(INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index cdb1d8e..e7caaa1 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -49,14 +49,13 @@
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
- .type syscall_error,%function; \
ENTRY (name); \
DO_CALL (syscall_name, args); \
cmn r0, $4096;
#define PSEUDO_RET \
RETINSTR(movcc, pc, lr); \
- b PLTJMP(__syscall_error)
+ b PLTJMP(SYSCALL_ERROR)
#undef ret
#define ret PSEUDO_RET
@@ -65,7 +64,22 @@
SYSCALL_ERROR_HANDLER \
END (name)
-#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+#if NOT_IN_libc
+# define SYSCALL_ERROR __local_syscall_error
+# define SYSCALL_ERROR_HANDLER \
+__local_syscall_error: \
+ str lr, [sp, #-4]!; \
+ str r0, [sp, #-4]!; \
+ bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \
+ ldr r1, [sp], #4; \
+ rsb r1, r1, #0; \
+ str r1, [r0]; \
+ mvn r0, #0; \
+ ldr pc, [sp], #4;
+#else
+# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+# define SYSCALL_ERROR __syscall_error
+#endif
/* Linux takes system call args in registers:
syscall number in the SWI instruction
@@ -123,7 +137,17 @@
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \
+ _sys_result = (unsigned int) -1; \
+ } \
+ (int) _sys_result; })
+
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, nr, args...) \
({ unsigned int _sys_result; \
{ \
register int _a1 asm ("a1"); \
@@ -134,13 +158,14 @@
: "a1", "memory"); \
_sys_result = _a1; \
} \
- if (_sys_result >= (unsigned int) -4095) \
- { \
- __set_errno (-_sys_result); \
- _sys_result = (unsigned int) -1; \
- } \
(int) _sys_result; })
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= 0xfffff001u)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
+
#define LOAD_ARGS_0()
#define ASM_ARGS_0
#define LOAD_ARGS_1(a1) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=721fe4656cd6969fa20e563825c0e0543e90e16b
commit 721fe4656cd6969fa20e563825c0e0543e90e16b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 8 00:14:43 2003 +0000
(syscall_error): Optimise a little.
[__LIBC_REENTRANT]: Unify PIC and non-PIC cases.
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 6487caa..5fc80a8 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98,2002,03 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,42 +37,34 @@ syscall_error:
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
-#ifndef PIC
- ldr r1, _errno_loc
- str r0, [r1]
#ifdef _LIBC_REENTRANT
- stmdb sp!, {r0, lr}
- /* put another copy of r0 at a specific errno location */
- bl C_SYMBOL_NAME(__errno_location)
- ldmia sp!, {r1, lr}
+ str lr, [sp, #-4]!
+ str r0, [sp, #-4]!
+ bl PLTJMP(C_SYMBOL_NAME(__errno_location))
+ ldr r1, [sp], #4
str r1, [r0]
-#endif
+ mvn r0, $0
+ ldr pc, [sp], #4
#else
- stmdb sp!,{r10, lr}
- @ we have to establish our PIC register
- ldr r10, 1f
- add r10, pc, r10
-0: ldr r1, 2f
- ldr r1, [r10, r1]
- @ store a copy in _errno_loc
+#ifndef PIC
+ ldr r1, 1f
str r0, [r1]
-#ifdef _LIBC_REENTRANT
- @ and another copy in thread copy of _errno_loc
- mov r10, r0
- bl __errno_location(PLT)
- str r10, [r0]
-#endif
- ldmia sp!, {r10, lr}
- b 4f
-1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 4
-2: .word C_SYMBOL_NAME(errno)(GOT)
-4:
-#endif
mvn r0, $0
RETINSTR(mov, pc, r14)
-#ifndef PIC
-_errno_loc: .long C_SYMBOL_NAME(errno)
+1: .long C_SYMBOL_NAME(errno)
+#else
+ @ we have to establish our PIC register
+ ldr r2, 1f
+ ldr r1, 2f
+0: add r2, pc, r2
+ str r0, [r1, r2]
+ mvn r0, $0
+ RETINSTR(mov, pc, r14)
+
+1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 8
+2: .word C_SYMBOL_NAME(errno)(GOTOFF)
+#endif
#endif
#undef __syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8cce412d2031e81d00167f16b295984c114342d
commit b8cce412d2031e81d00167f16b295984c114342d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 7 23:51:48 2003 +0000
(ntp_adjtime): New weak alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index 2bed884..34df942 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -191,5 +191,6 @@ __adjtimex_tv64 (struct timex *tx)
strong_alias (__adjtimex_tv64, __adjtimex_internal);
strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
+weak_alias (__adjtimex_tv64, ntp_adjtime);
versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1);
versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e2b5f5622dae199c2bee86d7d3fba9b9187f577
commit 2e2b5f5622dae199c2bee86d7d3fba9b9187f577
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 7 00:48:34 2003 +0000
Add cancellation handling.
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 7d5282d..9cfd63f 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#define _ERRNO_H 1
#include <bits/errno.h>
@@ -49,12 +49,20 @@ LEAF(SELECT, 64)
#endif
.prologue 1
+#ifdef CENABLE
+ SINGLE_THREAD_P (t1)
+#else
ldl t0, __libc_missing_axp_tv64
+#endif
/* Save timeout early, since we'll need to recover this after
the system call. */
stq a4, 48(sp)
+#ifdef CENABLE
+ bne t1, $do_cancel
+#endif
+
bne t0, $do32
/* Save arguments in case we do need to fall back. */
@@ -109,6 +117,93 @@ $do32:
2: addq sp, 64, sp
ret
+#ifdef CENABLE
+ .align 3
+$do_cancel:
+ /* Save arguments. */
+ stq a0, 8(sp)
+ stq a1, 16(sp)
+ stq a2, 24(sp)
+ stq a3, 32(sp)
+ stq ra, 40(sp)
+
+ CENABLE
+
+ ldl t0, __libc_missing_axp_tv64
+ bne t0, $do_cancel32
+
+ /* Recover the saved arguments. */
+ ldq a4, 48(sp)
+ ldq a3, 32(sp)
+ ldq a2, 24(sp)
+ ldq a1, 16(sp)
+ ldq a0, 8(sp)
+
+ ldi v0, SYS_ify(select)
+ callsys
+ bne a3, $cancel_err64
+
+ stq v0, 8(sp)
+ CDISABLE
+ ldq v0, 8(sp)
+ ldq ra, 40(sp)
+
+ /* Everything ok. */
+ addq sp, 64, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$cancel_err64:
+ cmpeq v0, ENOSYS, t0
+ beq t0, $cancel_error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ .align 3
+$do_cancel32:
+ ldq a4, 48(sp)
+ ldq a3, 32(sp)
+ ldq a2, 24(sp)
+ ldq a1, 16(sp)
+ ldq a0, 8(sp)
+
+ /* If the timeout argument is present bounce to the smaller fmt. */
+ beq a4, 1f
+ ldq t0, 0(a4)
+ ldq t1, 8(a4)
+ stl t0, 0(sp)
+ stl t1, 4(sp)
+ mov sp, a4
+
+1: ldi v0, SYS_ify(osf_select)
+ callsys
+ bne a3, $cancel_error
+
+ /* ... and bounce the remaining timeout back. */
+ ldq a4, 48(sp)
+ beq a4, 2f
+ ldl t0, 0(sp)
+ ldl t1, 4(sp)
+ stq t0, 0(a4)
+ stq t1, 8(a4)
+
+2: stq v0, 8(sp)
+ CDISABLE
+ ldq v0, 8(sp)
+ ldq ra, 40(sp)
+
+ addq sp, 64, sp
+ ret
+
+ .align 3
+$cancel_error:
+ stq v0, 8(sp)
+ CDISABLE
+ ldq v0, 8(sp)
+ ldq ra, 40(sp)
+#endif
+
.align 3
$error:
addq sp, 64, sp
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index e0f18c2..e5de55f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
@@ -20,37 +20,14 @@
/* sigsuspend is a special syscall since it needs to dereference the
sigset. This will have to change when we have more than 64 signals. */
-#include <sysdep.h>
+#include <sysdep-cancel.h>
- .text
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS ldq a0, 0(a0);
-LEAF(__sigsuspend, 0)
-#ifdef PROF
- ldgp gp, 0(pv)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- ldq a0, 0(a0)
- ldi v0, __NR_sigsuspend
- call_pal PAL_callsys
- bne a3, error
+PSEUDO(__sigsuspend, sigsuspend, 1)
ret
-
-error:
-#ifndef PROF
- br gp, 1f
-1: ldgp gp, 0(gp)
-#endif
- SYSCALL_ERROR_HANDLER
-
- END(__sigsuspend)
-
+PSEUDO_END(__sigsuspend)
libc_hidden_def (__sigsuspend)
weak_alias(__sigsuspend, sigsuspend)
strong_alias (__sigsuspend, __libc_sigsuspend)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d983cbb3613d0935e2fde4cf4c2d99fe3ef514c
commit 7d983cbb3613d0935e2fde4cf4c2d99fe3ef514c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 7 00:47:52 2003 +0000
(PSEUDO): Use PSEUDO_PREPARE_ARGS.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index f9aba3f..9dbcb38 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -97,6 +97,7 @@
.ent name,0; \
__LABEL(name) \
PSEUDO_PROLOGUE; \
+ PSEUDO_PREPARE_ARGS \
lda v0, SYS_ify(syscall_name); \
call_pal PAL_callsys; \
bne a3, __syscall_error !samegp; \
@@ -109,6 +110,7 @@ __LABEL(name) \
.align 4; \
.ent name,0; \
__LABEL(name) \
+ PSEUDO_PREPARE_ARGS \
lda v0, SYS_ify(syscall_name); \
call_pal PAL_callsys; \
bne a3, 1996f; \
@@ -122,6 +124,9 @@ __LABEL(name) \
END(sym)
#endif /* PIC && !RTLD_PRIVATE_ERRNO */
+#undef PSEUDO_PREPARE_ARGS
+#define PSEUDO_PREPARE_ARGS /* Nothing. */
+
#define r0 v0
#define r1 a4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ddf42be0e23af7a82c129a7d22de10cecd03c306
commit ddf42be0e23af7a82c129a7d22de10cecd03c306
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 7 00:39:17 2003 +0000
Syscall cancellation handling for Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
new file mode 100644
index 0000000..5f3709f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/linuxthreads/sysdep-cancel.h
@@ -0,0 +1,127 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Phil Blundell <pb@nexus.co.uk>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread
+
+# undef PSEUDO_RET
+# define PSEUDO_RET \
+ ldrcc pc, [sp], $4; \
+ b PLTJMP(SYSCALL_ERROR)
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .section ".text"; \
+ PSEUDO_PROLOGUE; \
+ ENTRY (name) \
+ SINGLE_THREAD_P; \
+ bne .Lpseudo_cancel; \
+ DO_CALL (syscall_name, args); \
+ cmn r0, $4096; \
+ PSEUDO_RET_MOV; \
+ .Lpseudo_cancel: \
+ MAYBE_SAVE_LR; \
+ DOCARGS_##args; /* save syscall args around CENABLE. */ \
+ CENABLE; \
+ mov ip, r0; /* put mask in safe place. */ \
+ UNDOCARGS_##args; /* restore syscall args. */ \
+ swi SYS_ify (syscall_name); /* do the call. */ \
+ str r0, [sp, $-4]!; /* save syscall return value. */ \
+ mov r0, ip; /* get mask back. */ \
+ CDISABLE; \
+ ldr r0, [sp], $4; /* retrieve return value. */ \
+ UNDOC2ARGS_##args; /* fix register damage. */ \
+ cmn r0, $4096;
+
+# define DOCARGS_0
+# define UNDOCARGS_0
+# define UNDOC2ARGS_0
+
+# define DOCARGS_1 str r0, [sp, #-4]!;
+# define UNDOCARGS_1 ldr r0, [sp], #4;
+# define UNDOC2ARGS_1
+
+# define DOCARGS_2 str r1, [sp, #-4]!; str r0, [sp, #-4]!;
+# define UNDOCARGS_2 ldr r0, [sp], #4; ldr r1, [sp], #4;
+# define UNDOC2ARGS_2
+
+# define DOCARGS_3 str r2, [sp, #-4]!; str r1, [sp, #-4]!; str r0, [sp, #-4]!;
+# define UNDOCARGS_3 ldr r0, [sp], #4; ldr r1, [sp], #4; ldr r2, [sp], #4
+# define UNDOC2ARGS_3
+
+# define DOCARGS_4 stmfd sp!, {r0-r3}
+# define UNDOCARGS_4 ldmfd sp!, {r0-r3}
+# define UNDOC2ARGS_4
+
+# define DOCARGS_5 stmfd sp!, {r0-r3}
+# define UNDOCARGS_5 str r4, [sp, #-4]!; ldmfd sp, {r0-r4}
+# define UNDOC2ARGS_5 ldr r4, [sp], #20
+
+# ifdef IS_IN_libpthread
+# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+# define __local_multiple_threads __pthread_multiple_threads
+# else
+# define CENABLE bl PLTJMP(__libc_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__libc_disable_asynccancel)
+# define __local_multiple_threads __libc_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# if !defined PIC
+# define SINGLE_THREAD_P \
+ ldr ip, =__local_multiple_threads; \
+ ldr ip, [ip]; \
+ teq ip, #0;
+# define MAYBE_SAVE_LR \
+ str lr, [sp, $-4]!;
+# define PSEUDO_RET_MOV \
+ RETINSTR(movcc, pc, lr); \
+ b PLTJMP(SYSCALL_ERROR)
+# define PSEUDO_PROLOGUE
+# else
+# define SINGLE_THREAD_P \
+ str lr, [sp, $-4]!; \
+ ldr ip, 1b; \
+ ldr lr, 2b; \
+3: \
+ add ip, pc, ip; \
+ ldr ip, [ip, lr]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE \
+ 1: .word _GLOBAL_OFFSET_TABLE_ - 3f - 8; \
+ 2: .word __local_multiple_threads(GOTOFF);
+# define MAYBE_SAVE_LR /* lr already saved */
+# define PSEUDO_RET_MOV PSEUDO_RET
+# endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d45a8f827ed0613c211018054ffd1e389aa3d796
commit d45a8f827ed0613c211018054ffd1e389aa3d796
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 6 23:52:06 2003 +0000
(inline_syscall_r0_constraint): Rename to...
(inline_syscall_r0_out_constraint): ... this. Add =.
(inline_syscall[0-6]): Use inline_syscall_r0_out_constraint.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 60b6eda..53af4b7 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -100,10 +101,10 @@
#ifdef USE_TLS
#define inline_syscall_r0_asm
-#define inline_syscall_r0_constraint "v"
+#define inline_syscall_r0_out_constraint "=v"
#else
-#define inline_syscall_r0_asm __asm__("$0")
-#define inline_syscall_r0_constraint "r"
+#define inline_syscall_r0_asm __asm__("$0")
+#define inline_syscall_r0_out_constraint "=r"
#endif
/* It is moderately important optimization-wise to limit the lifetime
@@ -117,7 +118,7 @@
\
_sc_0 = __NR_##name; \
__asm__("callsys # %0 %1 <= %2" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19) \
: "0"(_sc_0) \
: inline_syscall_clobbers, \
@@ -134,7 +135,7 @@
_sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
__asm__("callsys # %0 %1 <= %2 %3" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19), "=r"(_sc_16) \
: "0"(_sc_0), "2"(_sc_16) \
: inline_syscall_clobbers, \
@@ -153,7 +154,7 @@
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
__asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
: inline_syscall_clobbers, \
@@ -174,7 +175,7 @@
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
"=r"(_sc_18) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
@@ -197,7 +198,7 @@
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
"=r"(_sc_18) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
@@ -222,7 +223,7 @@
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
"=r"(_sc_18), "=r"(_sc_20) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
@@ -249,7 +250,7 @@
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=" inline_syscall_r0_constraint (_sc_0), \
+ : inline_syscall_r0_out_constraint (_sc_0), \
"=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
"=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eff2079d518b6c1e2f5ba9f55e50f8bac8a46717
commit eff2079d518b6c1e2f5ba9f55e50f8bac8a46717
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jan 6 18:11:24 2003 +0000
(sysdep-CFLAGS): Increase inline limit.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 68dc258..778a222 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -37,3 +37,6 @@ long-double-fcts = yes
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
+
+# Use a more reasonable inline limit
+sysdep-CFLAGS += --param max-inline-insns-single=4000
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a89c56aac49b2bb7fb9d6572c83fb7462056cb2a
commit a89c56aac49b2bb7fb9d6572c83fb7462056cb2a
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jan 6 18:10:46 2003 +0000
(elf_machine_runtime_setup): Make sure this is always inlined.
(elf_machine_rela): Likewise.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index ce80aad..61027c9 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -58,7 +58,7 @@ elf_machine_load_address (void)
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
-static inline int
+static inline int __attribute__ ((always_inline))
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf32_Addr *got;
@@ -227,7 +227,7 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void
+static inline void __attribute__ ((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0713cc0e035f0dc7d638102838972fb7f2a746f
commit c0713cc0e035f0dc7d638102838972fb7f2a746f
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jan 5 17:14:17 2003 +0000
(CFLAGS-.oS): Append -fPIC.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index c44b2d1..68dc258 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1996, 1997, 2003 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,7 @@ endif
asm-CPPFLAGS += $(m68k-syntax-flag)
pic-ccflag = -fpic
+CFLAGS-.oS += -fPIC
# Make sure setjmp.c is compiled with a frame pointer
CFLAGS-setjmp.c := -fno-omit-frame-pointer
@@ -36,8 +37,3 @@ long-double-fcts = yes
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
-
-ifeq ($(subdir),math)
-# Avoid a bug in gcc
-CFLAGS-s_copysignl.c += -mnobitfield
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2bf8a54e871bb3eebbcbf2293d7b180cf2a153b6
commit 2bf8a54e871bb3eebbcbf2293d7b180cf2a153b6
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Jan 4 22:51:16 2003 +0000
Add nanosecond fields.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index 213dbe2..3f1f343 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001,2002
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,12 +61,27 @@ struct stat
#else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
#endif
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1;
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2;
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3;
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
#ifndef __USE_FILE_OFFSET64
unsigned long int __unused4;
unsigned long int __unused5;
@@ -91,12 +107,24 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#ifdef __USE_MISC
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+#else
__time_t st_atime; /* Time of last access. */
- unsigned long int __unused1;
+ unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2;
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3;
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
__ino64_t st_ino; /* File serial number. */
};
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0a6689abfcc9edb28ede0f6912a0b446505fed1
commit d0a6689abfcc9edb28ede0f6912a0b446505fed1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 3 21:59:45 2003 +0000
(inline_syscall_r0_asm): New.
(inline_syscall_r0_constraint): New.
(inline_syscall[0-6]): Use them.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index da65cae..60b6eda 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -87,44 +87,64 @@
"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
"$22", "$23", "$24", "$25", "$27", "$28", "memory"
+/* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
+ as modeled within GCC, and explicit use of the R0 register. If we use
+ the register via the asm, the scheduler may place the PAL_rduniq insn
+ before we've copied the data from R0 into _sc_ret. If this happens
+ we'll get a reload abort, since R0 is live at the same time it is
+ needed for the PAL_rduniq.
+
+ Solve this by using the "v" constraint instead of an asm for the syscall
+ output. We don't do this unconditionally to allow compilation with
+ older compilers. */
+
+#ifdef USE_TLS
+#define inline_syscall_r0_asm
+#define inline_syscall_r0_constraint "v"
+#else
+#define inline_syscall_r0_asm __asm__("$0")
+#define inline_syscall_r0_constraint "r"
+#endif
+
/* It is moderately important optimization-wise to limit the lifetime
of the hard-register variables as much as possible. Thus we copy
in/out as close to the asm as possible. */
-#define inline_syscall0(name) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- __asm__("callsys # %0 %1 <= %2" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0) \
- : inline_syscall_clobbers, \
- "$16", "$17", "$18", "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+#define inline_syscall0(name, args...) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ __asm__("callsys # %0 %1 <= %2" \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19) \
+ : "0"(_sc_0) \
+ : inline_syscall_clobbers, \
+ "$16", "$17", "$18", "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
-#define inline_syscall1(name,arg1) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- __asm__("callsys # %0 %1 <= %2 %3" \
- : "=r"(_sc_0), "=r"(_sc_19), \
- "=r"(_sc_16) \
- : "0"(_sc_0), "2"(_sc_16) \
- : inline_syscall_clobbers, \
- "$17", "$18", "$20", "$21"); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+#define inline_syscall1(name,arg1) \
+{ \
+ register long _sc_0 inline_syscall_r0_asm; \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ __asm__("callsys # %0 %1 <= %2 %3" \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16) \
+ : "0"(_sc_0), "2"(_sc_16) \
+ : inline_syscall_clobbers, \
+ "$17", "$18", "$20", "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall2(name,arg1,arg2) \
{ \
- register long _sc_0 __asm__("$0"); \
+ register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
@@ -133,8 +153,8 @@
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
__asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=r"(_sc_0), "=r"(_sc_19), \
- "=r"(_sc_16), "=r"(_sc_17) \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
: inline_syscall_clobbers, \
"$18", "$20", "$21"); \
@@ -143,7 +163,7 @@
#define inline_syscall3(name,arg1,arg2,arg3) \
{ \
- register long _sc_0 __asm__("$0"); \
+ register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -154,8 +174,9 @@
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=r"(_sc_0), "=r"(_sc_19), \
- "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18) \
: inline_syscall_clobbers, "$20", "$21"); \
@@ -164,7 +185,7 @@
#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
{ \
- register long _sc_0 __asm__("$0"); \
+ register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -176,8 +197,9 @@
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=r"(_sc_0), "=r"(_sc_19), \
- "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19) \
: inline_syscall_clobbers, "$20", "$21"); \
@@ -186,7 +208,7 @@
#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
{ \
- register long _sc_0 __asm__("$0"); \
+ register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -200,9 +222,9 @@
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=r"(_sc_0), "=r"(_sc_19), \
- "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
- "=r"(_sc_20) \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
: inline_syscall_clobbers, "$21"); \
@@ -211,7 +233,7 @@
#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
{ \
- register long _sc_0 __asm__("$0"); \
+ register long _sc_0 inline_syscall_r0_asm; \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -227,9 +249,9 @@
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
- "=r"(_sc_20), "=r"(_sc_21) \
+ : "=" inline_syscall_r0_constraint (_sc_0), \
+ "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17), \
+ "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21) \
: "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
"6"(_sc_21) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb22472e6ff8ce112da053851f75a637220bac67
commit eb22472e6ff8ce112da053851f75a637220bac67
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 3 00:42:10 2003 +0000
(__sigaction, sigaction): Protect weak_alias and libc_hidden_weak with
#ifndef LIBC_SIGACTION.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 40ecb32..46ff2b1 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -149,6 +149,9 @@ __libc_sigaction (sig, act, oact)
return result;
}
libc_hidden_def (__libc_sigaction)
+
+#ifndef LIBC_SIGACTION
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 0e5cfb7..0dee8cc 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -135,6 +135,9 @@ __libc_sigaction (sig, act, oact)
#endif
}
libc_hidden_def (__libc_sigaction)
+
+#ifndef LIBC_SIGACTION
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7de021d5889866579fc78489d4c305d7de35ba4c
commit 7de021d5889866579fc78489d4c305d7de35ba4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 20:44:02 2002 +0000
(__GI_accept): New alias to accept.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 6907ef1..a053468 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,7 +36,7 @@ sys_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
# proper socket implementations:
-accept - accept C:3 __libc_accept __accept accept
+accept - accept C:3 __libc_accept __accept accept __GI_accept
bind - bind 3 __bind bind
connect - connect C:3 __libc_connect __connect_internal __connect connect
getpeername - getpeername 3 __getpeername getpeername
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index bc977e2..65fc3cb 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -14,7 +14,7 @@ semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
# proper socket implementations:
-accept - accept Ci:iBN __libc_accept __accept accept
+accept - accept Ci:iBN __libc_accept __accept accept __GI_accept
bind - bind i:ipi __bind bind
connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index ec75228..35666c7 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -14,7 +14,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept Ci:iBN __libc_accept __accept accept
+accept - accept Ci:iBN __libc_accept __accept accept __GI_accept
bind - bind i:ipi __bind bind
connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40efe6690b5e719c647944c0cbf3aaa45fe33ab4
commit 40efe6690b5e719c647944c0cbf3aaa45fe33ab4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 20:41:23 2002 +0000
(accept): Add libc_hidden_def.
diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c
index 0e8f67e..73f1149 100644
--- a/sysdeps/unix/sysv/aix/accept.c
+++ b/sysdeps/unix/sysv/aix/accept.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,4 @@ accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len)
assert (sizeof (socklen_t) == sizeof (int));
return naccept (fd, addr.__sockaddr__, addr_len);
}
+libc_hidden_def (accept)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff1d023da3d0354c0cb3e1519dc2c9937b312130
commit ff1d023da3d0354c0cb3e1519dc2c9937b312130
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 20:40:18 2002 +0000
(__lseek): Add libc_hidden_def.
diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c
index 387ebd0..d4cbdbe 100644
--- a/sysdeps/unix/sysv/aix/lseek.c
+++ b/sysdeps/unix/sysv/aix/lseek.c
@@ -7,3 +7,4 @@ __lseek (int fd, off_t offset, int whence)
return lseek (fd, offset, whence);
}
strong_alias (__lseek, __libc_lseek)
+libc_hidden_def (__lseek)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db160231939239df3105b30e86ec0c7dfc8ce85c
commit db160231939239df3105b30e86ec0c7dfc8ce85c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 20:37:32 2002 +0000
Use libc_hidden_def(name) instead of strong_alias (name, __GI_name).
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 5752da7..2e38f00 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -77,7 +77,7 @@ ENTRY(_setjmp)
mov 0, a1
br $sigsetjmp_local
END(_setjmp)
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
ENTRY(setjmp)
ldgp gp, 0(pv)
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index ac039ca..c4a094e 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -27,4 +27,4 @@ ENTRY (_setjmp)
mov r1, #0
b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
END (_setjmp)
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S
index 31aceb0..e5ec94c 100644
--- a/sysdeps/hppa/bsd-_setjmp.S
+++ b/sysdeps/hppa/bsd-_setjmp.S
@@ -36,4 +36,4 @@ _setjmp:
ldi 0, %r25
.procend
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index a175a9c..5e3ad50 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -40,4 +40,4 @@ ENTRY (_setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
#endif
.end _setjmp
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index 489bcef..c0ff0d7 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -34,4 +34,4 @@ ENTRY (_setjmp)
nop
jr t9
dli a1, 0 /* Pass a second argument of zero. */
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index 1998145..b317b66 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -29,6 +29,6 @@ SYSCALL__ (fork, 0)
and r0, r0, r1
RETINSTR(mov, pc, r14)
PSEUDO_END (__fork)
-strong_alias (__fork, __GI___fork)
+libc_hidden_def (__fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index 0e15a50..abcc1c3 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -51,6 +51,6 @@ error:
movel d0, _errno
moveq #-1, d0
jmp a0@
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
index 13b1223..a4ec14b 100644
--- a/sysdeps/unix/bsd/osf/alpha/fork.S
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -23,6 +23,6 @@ SYSCALL__ (fork, 0)
cmovne a4, 0, v0
ret
.end __fork
-strong_alias (__fork, __GI___fork)
+libc_hidden_def (__fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index 0066889..cf9e2e9 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -51,6 +51,6 @@ error:
movel d0, _errno
moveq #-1, d0
jmp a0@
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index 80e7328..d413e45 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -31,6 +31,6 @@ parent:
ret
nop
.end __vfork
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index 16f0e98..6c7e754 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -52,6 +52,6 @@ error:
movl r0, _errno
mnegl $1, r0
jmp (r2)
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index dcec965..1850c17 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -27,6 +27,6 @@ SYSCALL__ (fork, 0)
parent:
ret
.end __fork
-strong_alias (__fork, __GI___fork)
+libc_hidden_def (__fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 3364c68..a2c6bf3 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -46,6 +46,6 @@ ENTRY (__vfork)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
PSEUDO_END (__vfork)
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S
index f471efe..74a8556 100644
--- a/sysdeps/unix/sysv/linux/cris/vfork.S
+++ b/sysdeps/unix/sysv/linux/cris/vfork.S
@@ -22,6 +22,6 @@ PSEUDO (__vfork, vfork, 0)
Ret
nop
PSEUDO_END (__vfork)
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
index 8968cae..ed5e1e8 100644
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -62,6 +62,6 @@ ENTRY (__vfork)
rts
PSEUDO_END (__vfork)
-strong_alias (__vfork, __GI___vfork)
+libc_hidden_def (__vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S
index 68888d4..756e96b 100644
--- a/sysdeps/vax/bsd-_setjmp.S
+++ b/sysdeps/vax/bsd-_setjmp.S
@@ -30,4 +30,4 @@ ENTRY (_setjmp)
pushl r1 /* Push back first argument. */
pushl r0 /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)
-strong_alias (_setjmp, __GI__setjmp)
+libc_hidden_def (_setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7922283928f90745e840926d005d251c20d9d8c4
commit 7922283928f90745e840926d005d251c20d9d8c4
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Dec 31 13:24:33 2002 +0000
* sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h: Sync
with Linux kernel.
* sysdeps/unix/sysv/linux/sparc/sparc32/kernel_stat.h: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/kernel_stat.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel_stat.h: Likewise.
* sysdeps/unix/sysv/linux/kernel_stat.h
(_HAVE_STAT_NSEC,_HAVE_STAT_NSEC64): New.
* sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Readd
__unused[1-3] since they're needed by some platforms. Handle
_HAVE_STAT_NSEC and _HAVE_STAT_NSEC64.
* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Add nsec resolution
for structs stat and stat64.
* sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
index a1fa377..a85c5be 100644
--- a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
@@ -1,32 +1,31 @@
/* definition of "struct stat" from the kernel */
struct kernel_stat {
unsigned long st_dev; /* dev_t is 32 bits on parisc */
- unsigned long st_ino; /* 32 bits */
- unsigned short st_mode; /* 16 bits */
+ unsigned long st_ino; /* 32 bits */
+ unsigned short st_mode; /* 16 bits */
unsigned short st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */
- unsigned long st_rdev;
+ unsigned long st_rdev;
unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_spare1;
- unsigned long st_mtime;
- unsigned long st_spare2;
- unsigned long st_ctime;
- unsigned long st_spare3;
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
long st_blksize;
long st_blocks;
unsigned long __unused1; /* ACL stuff */
unsigned long __unused2; /* network */
- unsigned long __unused3; /* network */
+ unsigned long __unused3; /* network */
unsigned long __unused4; /* cnodes */
unsigned short __unused5; /* netsite */
short st_fstype;
- unsigned long st_realdev;
+ unsigned long st_realdev;
unsigned short st_basemode;
unsigned short st_spareshort;
- unsigned long st_uid;
+ unsigned long st_uid;
unsigned long st_gid;
unsigned long st_spare4[3];
};
+#define _HAVE_STAT_NSEC
+#define _HAVE_STAT64_NSEC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c505de0a40ab51521571ad9da11fdd387b63ba3a
commit c505de0a40ab51521571ad9da11fdd387b63ba3a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 11:10:33 2002 +0000
Add __GI___vfork alias.
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index 4bb5939..0e15a50 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,5 +51,6 @@ error:
movel d0, _errno
moveq #-1, d0
jmp a0@
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index fe0309e..0066889 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 97, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,5 +51,6 @@ error:
movel d0, _errno
moveq #-1, d0
jmp a0@
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index 9541eaf..80e7328 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -31,5 +31,6 @@ parent:
ret
nop
.end __vfork
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index 8098b0e..16f0e98 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,5 +52,6 @@ error:
movl r0, _errno
mnegl $1, r0
jmp (r2)
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index b10117e..3364c68 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -44,7 +44,8 @@ ENTRY (__vfork)
cmn a1, #4096
RETINSTR(movcc, pc, lr)
b PLTJMP(C_SYMBOL_NAME(__syscall_error))
-
+
PSEUDO_END (__vfork)
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S
index 39985a0..f471efe 100644
--- a/sysdeps/unix/sysv/linux/cris/vfork.S
+++ b/sysdeps/unix/sysv/linux/cris/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,5 +22,6 @@ PSEUDO (__vfork, vfork, 0)
Ret
nop
PSEUDO_END (__vfork)
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
index b77a7bd..8968cae 100644
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -62,5 +62,6 @@ ENTRY (__vfork)
rts
PSEUDO_END (__vfork)
+strong_alias (__vfork, __GI___vfork)
weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e587d1822a6f2a0020275c0e855dd9984a6977d
commit 7e587d1822a6f2a0020275c0e855dd9984a6977d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 11:07:26 2002 +0000
Add __GI___fork alias.
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index deb2254..1998145 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -29,5 +29,6 @@ SYSCALL__ (fork, 0)
and r0, r0, r1
RETINSTR(mov, pc, r14)
PSEUDO_END (__fork)
+strong_alias (__fork, __GI___fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
index 90cf4bd..13b1223 100644
--- a/sysdeps/unix/bsd/osf/alpha/fork.S
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -23,5 +23,6 @@ SYSCALL__ (fork, 0)
cmovne a4, 0, v0
ret
.end __fork
+strong_alias (__fork, __GI___fork)
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index 3273216..dcec965 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -27,5 +27,6 @@ SYSCALL__ (fork, 0)
parent:
ret
.end __fork
+strong_alias (__fork, __GI___fork)
weak_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a077bd196cd60f20298070c37fc6ef620b1aa0a
commit 7a077bd196cd60f20298070c37fc6ef620b1aa0a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 11:05:04 2002 +0000
Add libc_hidden_def for __fork.
diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c
index f3b02c9..478d4af 100644
--- a/sysdeps/unix/sysv/aix/fork.c
+++ b/sysdeps/unix/sysv/aix/fork.c
@@ -25,4 +25,5 @@ __fork (void)
{
return kfork ();
}
+libc_hidden_def (__fork)
strong_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c63e402a1272a0285470a6f86819dcfb7c263485
commit c63e402a1272a0285470a6f86819dcfb7c263485
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 10:22:40 2002 +0000
Add libc_hidden_def for __nanosleep.
diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c
index 3c6e508..842275f 100644
--- a/sysdeps/unix/sysv/aix/nanosleep.c
+++ b/sysdeps/unix/sysv/aix/nanosleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,4 +36,5 @@ __libc_nanosleep (const struct timespec *req, struct timespec *rem)
return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem);
}
strong_alias (__libc_nanosleep, __nanosleep)
+libc_hidden_def (__nanosleep)
strong_alias (__libc_nanosleep, nanosleep)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=044758323be3617dfe94bb373423201ce52c83d0
commit 044758323be3617dfe94bb373423201ce52c83d0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 31 09:35:36 2002 +0000
Add __GI__setjmp alias.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index b3bc38c..5752da7 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -77,6 +77,7 @@ ENTRY(_setjmp)
mov 0, a1
br $sigsetjmp_local
END(_setjmp)
+strong_alias (_setjmp, __GI__setjmp)
ENTRY(setjmp)
ldgp gp, 0(pv)
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index 649e89e..ac039ca 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,4 @@ ENTRY (_setjmp)
mov r1, #0
b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
END (_setjmp)
+strong_alias (_setjmp, __GI__setjmp)
diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S
index 6aacd48..31aceb0 100644
--- a/sysdeps/hppa/bsd-_setjmp.S
+++ b/sysdeps/hppa/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. HPPA version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <sysdep.h>
+
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
@@ -34,3 +36,4 @@ _setjmp:
ldi 0, %r25
.procend
+strong_alias (_setjmp, __GI__setjmp)
diff --git a/sysdeps/m68k/bsd-_setjmp.c b/sysdeps/m68k/bsd-_setjmp.c
index ee2964e..a6b404a 100644
--- a/sysdeps/m68k/bsd-_setjmp.c
+++ b/sysdeps/m68k/bsd-_setjmp.c
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version.
- Copyright (C) 1994, 1997, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,3 +19,4 @@
#define BSD__SETJMP
#include <sysdeps/m68k/setjmp.c>
+libc_hidden_def (_setjmp)
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 2a4e321..a175a9c 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,4 @@ ENTRY (_setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
#endif
.end _setjmp
+strong_alias (_setjmp, __GI__setjmp)
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index b92ac98..489bcef 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,3 +34,4 @@ ENTRY (_setjmp)
nop
jr t9
dli a1, 0 /* Pass a second argument of zero. */
+strong_alias (_setjmp, __GI__setjmp)
diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S
index 58204d2..68888d4 100644
--- a/sysdeps/vax/bsd-_setjmp.S
+++ b/sysdeps/vax/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,10 +23,11 @@
#include <sysdep.h>
-ENTRY (setjmp)
+ENTRY (_setjmp)
popl r0 /* Pop return PC. */
popl r1 /* Pop jmp_buf argument. */
pushl $0 /* Push second argument of zero. */
pushl r1 /* Push back first argument. */
pushl r0 /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)
+strong_alias (_setjmp, __GI__setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e88c122c4f7eb9d46436c0cb607e0f8e585c151b
commit e88c122c4f7eb9d46436c0cb607e0f8e585c151b
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Dec 27 22:15:18 2002 +0000
Add cancellation support.
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 3592d2a..1d10f33 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sysdep.h>
+#include <sysdep-cancel.h>
#include <socketcall.h>
#define P(a, b) P2(a, b)
@@ -41,6 +41,10 @@
.globl __socket
ENTRY (__socket)
+#if defined NEED_CANCELLATION && defined CENABLE
+ SINGLE_THREAD_P
+ jne 1f
+#endif
/* Save registers. */
move.l %d2, %a0
@@ -64,6 +68,42 @@ ENTRY (__socket)
/* Successful; return the syscall's value. */
rts
+
+#if defined NEED_CANCELLATION && defined CENABLE
+1: /* Enable asynchronous cancellation. */
+ CENABLE
+
+ /* Save registers. */
+ move.l %d2, -(%sp)
+ move.l %d0, -(%sp)
+
+ move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */
+
+ /* Use ## so `socket' is a separate token that might be #define'd. */
+ move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */
+ lea 4+8(%sp), %a1 /* Address of args is 2nd arg. */
+ move.l %a1, %d2
+
+ /* Do the system call trap. */
+ trap #0
+
+ /* Restore cancellation. */
+ move.l %d0, %d2
+ CDISABLE
+ addq.l #4, %sp
+ move.l %d2, %d0
+
+ /* Restore registers. */
+ move.l (%sp)+, %d2
+
+ /* %d0 is < 0 if there was an error. */
+ tst.l %d0
+ jmi SYSCALL_ERROR_LABEL
+
+ /* Successful; return the syscall's value. */
+ rts
+#endif
+
PSEUDO_END (__socket)
#ifndef NO_WEAK_ALIAS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b5b9a0718ecd714fb0620d5ba0b0b7101277e9b
commit 4b5b9a0718ecd714fb0620d5ba0b0b7101277e9b
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Dec 21 21:05:31 2002 +0000
Fix thinko.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 06033f4..e6fea78 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -69,7 +69,7 @@
END (name)
#ifdef PIC
-# ifdef RTLD_PRIVATE_ERRNO
+# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
lea (errno, %pc), %a0; \
@@ -83,7 +83,7 @@ SYSCALL_ERROR_LABEL: \
# else /* !RTLD_PRIVATE_ERRNO */
/* Store (- %d0) into errno through the GOT. */
# if defined _LIBC_REENTRANT
-# define SYSCALL_ERROR_HANDLER \
+# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
neg.l %d0; \
move.l %d0, -(%sp); \
@@ -95,7 +95,7 @@ SYSCALL_ERROR_LABEL: \
move.l %d0, %a0; \
rts;
# else /* !_LIBC_REENTRANT */
-# define SYSCALL_ERROR_HANDLER \
+# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d3831f3746528fa23716874f9e6180b1e5e1865
commit 9d3831f3746528fa23716874f9e6180b1e5e1865
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Dec 21 20:08:15 2002 +0000
(SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 005e60f..06033f4 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -21,6 +21,9 @@
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/m68k/sysdep.h>
+/* Defines RTLD_PRIVATE_ERRNO. */
+#include <dl-sysdep.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
@@ -66,9 +69,21 @@
END (name)
#ifdef PIC
+# ifdef RTLD_PRIVATE_ERRNO
+# define SYSCALL_ERROR_HANDLER \
+SYSCALL_ERROR_LABEL: \
+ lea (errno, %pc), %a0; \
+ neg.l %d0; \
+ move.l %d0, (%a0); \
+ move.l &-1, %d0; \
+ /* Copy return value to %a0 for syscalls that are declared to return \
+ a pointer (e.g., mmap). */ \
+ move.l %d0, %a0; \
+ rts;
+# else /* !RTLD_PRIVATE_ERRNO */
/* Store (- %d0) into errno through the GOT. */
-#ifdef _LIBC_REENTRANT
-#define SYSCALL_ERROR_HANDLER \
+# if defined _LIBC_REENTRANT
+# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
neg.l %d0; \
move.l %d0, -(%sp); \
@@ -79,8 +94,8 @@ SYSCALL_ERROR_LABEL: \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
rts;
-#else /* !_LIBC_REENTRANT */
-#define SYSCALL_ERROR_HANDLER \
+# else /* !_LIBC_REENTRANT */
+# define SYSCALL_ERROR_HANDLER \
SYSCALL_ERROR_LABEL: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
@@ -90,9 +105,10 @@ SYSCALL_ERROR_LABEL: \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
rts;
-#endif /* _LIBC_REENTRANT */
+# endif /* _LIBC_REENTRANT */
+# endif /* RTLD_PRIVATE_ERRNO */
#else
-#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
#endif /* PIC */
/* Linux takes system call arguments in registers:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb9016614da8293233f6a0eb8cbcb19f0cfc9b0d
commit fb9016614da8293233f6a0eb8cbcb19f0cfc9b0d
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Dec 21 20:07:49 2002 +0000
Fix warning.
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index adf6c64..396b97d 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -33,7 +33,7 @@ __brk (void *addr)
{
void *newbrk;
- newbrk = INTERNAL_SYSCALL (brk, 1, addr);
+ newbrk = (void *) INTERNAL_SYSCALL (brk, 1, addr);
__curbrk = newbrk;
if (newbrk < addr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d384858ff5a91e1a45b01553f61379178ba5bc1
commit 5d384858ff5a91e1a45b01553f61379178ba5bc1
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Dec 21 19:36:50 2002 +0000
(INTERNAL_SYSCALL): Define.
(INLINE_SYSCALL): Use it.
(INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): Define.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 1247cc4..005e60f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -163,7 +163,21 @@ SYSCALL_ERROR_LABEL: \
/* Define a macro which expands into the inline wrapper code for a system
call. */
#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, nr, args); \
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result), 0)) \
+ { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result)); \
+ _sys_result = (unsigned int) -1; \
+ } \
+ (int) _sys_result; })
+
+/* Define a macro which expands inline into the wrapper code for a system
+ call. This use is for internal calls that do not need to handle errors
+ normally. It will never touch errno. This returns just what the kernel
+ gave back. */
+#undef INTERNAL_SYSCALL
+#define INTERNAL_SYSCALL(name, nr, args...) \
({ unsigned int _sys_result; \
{ \
LOAD_ARGS_##nr (args) \
@@ -174,13 +188,14 @@ SYSCALL_ERROR_LABEL: \
: "memory"); \
_sys_result = _d0; \
} \
- if (_sys_result >= (unsigned int) -4095) \
- { \
- __set_errno (-_sys_result); \
- _sys_result = (unsigned int) -1; \
- } \
(int) _sys_result; })
+#undef INTERNAL_SYSCALL_ERROR_P
+#define INTERNAL_SYSCALL_ERROR_P(val) ((unsigned int) (val) >= -4095U)
+
+#undef INTERNAL_SYSCALL_ERRNO
+#define INTERNAL_SYSCALL_ERRNO(val) (-(val))
+
#define LOAD_ARGS_0()
#define ASM_ARGS_0
#define LOAD_ARGS_1(a1) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d68f861c07cec66da338a7396fccfe28c5187008
commit d68f861c07cec66da338a7396fccfe28c5187008
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Dec 21 19:36:29 2002 +0000
Use INTERNAL_SYSCALL.
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index d02b1f9..adf6c64 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -33,16 +33,7 @@ __brk (void *addr)
{
void *newbrk;
- {
- register long d0 __asm__ ("%d0");
-
- asm ("move%.l %2, %%d1\n"
- "trap #0" /* Perform the system call. */
- : "=d" (d0)
- : "0" (SYS_ify (brk)), "g" (addr)
- : "%d1");
- newbrk = (void *) d0;
- }
+ newbrk = INTERNAL_SYSCALL (brk, 1, addr);
__curbrk = newbrk;
if (newbrk < addr)
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 6645e2b..266d81d 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -37,9 +37,9 @@ __getpagesize ()
return GL(dl_pagesize);
#ifdef __NR_getpagesize
- result = INLINE_SYSCALL (getpagesize, 0);
+ result = INTERNAL_SYSCALL (getpagesize, 0);
/* The only possible error is ENOSYS. */
- if (result != -1)
+ if (!INTERNAL_SYSCALL_ERROR_P (result))
return result;
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c025bbf60963f0d15ee845724a7d9004b5928b2b
commit c025bbf60963f0d15ee845724a7d9004b5928b2b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 21 18:37:16 2002 +0000
Elide compatibility cruft when new enough kernel is assumed.
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index aebc3cf..30c2e3a 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 1999.
@@ -18,10 +18,22 @@
02111-1307 USA. */
#include <bits/armsigctx.h>
+#include "kernel-features.h"
#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
+/* The sigcontext structure changed between 2.0 and 2.1 kernels. On any
+ modern system we should be able to assume that the "new" format will be
+ in use. */
+#if __LINUX_KERNEL_VERSION > 131328
+
+#define GET_PC(ctx) ((void *) ctx.v21.arm_pc)
+#define GET_FRAME(ctx) ADVANCE_STACK_FRAME ((void *) ctx.v21.arm_fp)
+#define GET_STACK(ctx) ((void *) ctx.v21.arm_sp)
+
+#else
+
#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
#define GET_FRAME(ctx) \
@@ -29,7 +41,11 @@
ctx.v20.reg.ARM_fp : ctx.v21.arm_fp))
#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
+
+#endif
+
#define ADVANCE_STACK_FRAME(frm) \
((struct layout *)frm - 1)
+
#define CALL_SIGHANDLER(handler, signo, ctx) \
(handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b52ee17534e37097660ef44ee351f191cf248ea
commit 5b52ee17534e37097660ef44ee351f191cf248ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 21 18:36:55 2002 +0000
Small optimisation.
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index c9a1ec2..1c6f786 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -35,10 +35,8 @@ ENTRY(__clone)
beq PLTJMP(syscall_error)
@ insert the args onto the new stack
- sub r1, r1, #8
- str r3, [r1, #4]
- @ save the function pointer as the 0th element
- str r0, [r1]
+ str r3, [r1, #-4]!
+ str r0, [r1, #-4]!
@ do the system call
@ get flags
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a16ce997aa0b6778b9689a49f28dff0da4b7599a
commit a16ce997aa0b6778b9689a49f28dff0da4b7599a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 21 18:36:32 2002 +0000
(_start): Optimise a little. Push stack top as seventh arg to
__libc_start_main.
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 90a62f6..13d4229 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -45,26 +45,34 @@
.globl _start
.type _start,#function
_start:
+ /* Fetch address of fini */
+ ldr ip, =__libc_csu_fini
+
/* Clear the frame pointer since this is the outermost frame. */
mov fp, #0
/* Pop argc off the stack and save a pointer to argv */
- ldmfd sp!, {a2}
+ ldr a2, [sp], #4
mov a3, sp
- /* Push the last arguments to main() onto the stack */
- stmfd sp!, {a1}
- ldr a1, =__libc_csu_fini
- stmfd sp!, {a1}
+ /* Push stack limit */
+ str a3, [sp, #-4]!
+
+ /* Push rtld_fini */
+ str a1, [sp, #-4]!
- /* Set up the other arguments for main() that go in registers */
+ /* Set up the other arguments in registers */
ldr a1, =main
ldr a4, =__libc_csu_init
- /* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */
+ /* Push fini */
+ str ip, [sp, #-4]!
+
+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
/* Let the libc call main and exit with its return code. */
bl __libc_start_main
+
/* should never get here....*/
bl abort
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9526f1fb77719a87251e78fc3431fa11a6497d30
commit 9526f1fb77719a87251e78fc3431fa11a6497d30
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 20 10:31:10 2002 +0000
Define SHM_HUGETLB.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index ae51e75..4184265 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -67,6 +67,7 @@ struct shmid_ds
/* shm_mode upper byte flags */
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
index a07213c..1c022fd 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -78,6 +78,7 @@ struct shmid_ds
/* shm_mode upper byte flags */
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 85b286e..a512afe 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -67,6 +67,7 @@ struct shmid_ds
/* shm_mode upper byte flags */
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
struct shminfo
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=762566f73f51e78e32ed36d51575dd34d88bfde1
commit 762566f73f51e78e32ed36d51575dd34d88bfde1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 18 01:27:42 2002 +0000
(msgrcv, msgsnd): Make cancelable.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 7f5c9d0..6907ef1 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -2,8 +2,8 @@
oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0
msgget - msgget 2 __msgget msgget
-msgrcv - msgrcv 5 __msgrcv msgrcv
-msgsnd - msgsnd 4 __msgsnd msgsnd
+msgrcv - msgrcv C:5 __msgrcv msgrcv
+msgsnd - msgsnd C:4 __msgsnd msgsnd
shmat - osf_shmat 3 __shmat shmat
oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0
shmdt - shmdt 1 __shmdt shmdt
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 6edb2d2..bc977e2 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -3,8 +3,8 @@
# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
msgget - msgget i:ii __msgget msgget
-msgrcv - msgrcv i:ibnii __msgrcv msgrcv
-msgsnd - msgsnd i:ibni __msgsnd msgsnd
+msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
+msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
shmat - shmat i:ipi __shmat shmat
shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=519d2b2e9fb85751f46271545d20044a39c1f09d
commit 519d2b2e9fb85751f46271545d20044a39c1f09d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 16 23:17:43 2002 +0000
Convert GCC extension initializer syntax to C99.
diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c
index e40a075..d7e741a 100644
--- a/sysdeps/unix/sysv/aix/setitimer.c
+++ b/sysdeps/unix/sysv/aix/setitimer.c
@@ -56,7 +56,7 @@ __setitimer (which, new, old)
case -1: exit(-1);
case 0:
{
- struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0};
+ struct timespec ts ={.tv_sec = (long int)new->it_value.tv_sec, .tv_nsec = 0};
__libc_nanosleep(&ts,&ts);
__kill(getppid(), SIGALRM);
exit(0);
diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c
index 17a9702..aa8d76d 100644
--- a/sysdeps/unix/sysv/aix/sleep.c
+++ b/sysdeps/unix/sysv/aix/sleep.c
@@ -27,7 +27,7 @@ unsigned int
__sleep (seconds)
unsigned int seconds;
{
- struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0};
+ struct timespec ts ={.tv_sec = (long int)seconds, .tv_nsec = 0};
__libc_nanosleep(&ts,&ts);
return 0;
}
diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c
index e34fd08..a1d55eb 100644
--- a/sysdeps/unix/sysv/aix/usleep.c
+++ b/sysdeps/unix/sysv/aix/usleep.c
@@ -28,7 +28,7 @@ int
usleep (useconds)
useconds_t useconds;
{
- struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000};
+ struct timespec ts ={.tv_sec = 0, .tv_nsec = (long int)useconds * 1000};
__libc_nanosleep(&ts,&ts);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a9c8484904f5488f25dd8de5f7c2f2fe3625640
commit 5a9c8484904f5488f25dd8de5f7c2f2fe3625640
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 16 10:25:34 2002 +0000
2002-12-16 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/syscalls.list: Add getpmsg, putpmsg.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Remove s_getpmsg,
s_putpmsg.
* sysdeps/unix/sysv/linux/i386/getpmsg.c: File removed.
* sysdeps/unix/sysv/linux/i386/putpmsg.c: File removed.
* sysdeps/unix/sysv/linux/m68k/getpmsg.c: File removed.
* sysdeps/unix/sysv/linux/m68k/putpmsg.c: File removed.
* sysdeps/unix/sysv/linux/mips/getpmsg.c: File removed.
* sysdeps/unix/sysv/linux/mips/putpmsg.c: File removed.
* sysdeps/unix/sysv/linux/powerpc/getpmsg.c: File removed.
* sysdeps/unix/sysv/linux/powerpc/putpmsg.c: File removed.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c
deleted file mode 100644
index bb65f81..0000000
--- a/sysdeps/unix/sysv/linux/m68k/getpmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c
deleted file mode 100644
index fbfa598..0000000
--- a/sysdeps/unix/sysv/linux/m68k/putpmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c
deleted file mode 100644
index bb65f81..0000000
--- a/sysdeps/unix/sysv/linux/mips/getpmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c
deleted file mode 100644
index fbfa598..0000000
--- a/sysdeps/unix/sysv/linux/mips/putpmsg.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 685edc0..ec75228 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -56,14 +56,12 @@ s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
s_getdents getdents getdents i:ipi __syscall_getdents
s_getdents64 getdents getdents64 i:ipi __syscall_getdents64
-s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg
s_getpriority getpriority getpriority i:ii __syscall_getpriority
s_ipc msgget ipc i:iiiip __syscall_ipc
s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2
s_poll poll poll i:pii __syscall_poll
s_pread64 pread64 pread i:ibniii __syscall_pread
-s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
s_ptrace ptrace ptrace i:iipp __syscall_ptrace
s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite
s_readahead EXTRA readahead i:iiii __syscall_readahead
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e81a170b787272f014375ee70a5e4fb3ec72f2aa
commit e81a170b787272f014375ee70a5e4fb3ec72f2aa
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Dec 15 21:39:21 2002 +0000
Make inline syscall to _exit.
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index e19172a..6baf723 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -57,8 +57,9 @@ ENTRY (__clone)
thread_start:
subl %fp, %fp /* terminate the stack frame */
jsr (%a0)
- movel %d0, -(%sp)
- jbsr HIDDEN_JUMPTARGET (_exit)
+ movel %d0, %d1
+ movel #SYS_ify (exit), %d0
+ trap #0
PSEUDO_END (__clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ea965156db39663f7bdf7920e9dc5cd723669a9
commit 8ea965156db39663f7bdf7920e9dc5cd723669a9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 15 00:52:49 2002 +0000
(accept, connect, recv, recvfrom, recvmsg, send, sendmsg, sendto): Make
cancelable.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 6b18e1f..6edb2d2 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -14,19 +14,19 @@ semget - semget i:iii __semget semget
semctl - semctl i:iiii __semctl semctl
# proper socket implementations:
-accept - accept i:iBN __libc_accept __accept accept
+accept - accept Ci:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
-connect - connect i:ipi __libc_connect __connect_internal __connect connect
+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-recv - recv i:ibni __libc_recv __recv recv
-recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send
-sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
-sendto - sendto i:ibnibn __libc_sendto __sendto sendto
+recv - recv Ci:ibni __libc_recv __recv recv
+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
+send - send Ci:ibni __libc_send __send send
+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 76b8b0f..685edc0 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -14,19 +14,19 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept i:iBN __libc_accept __accept accept
+accept - accept Ci:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
-connect - connect i:ipi __libc_connect __connect_internal __connect connect
+connect - connect Ci:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-recv - recv i:ibni __libc_recv __recv recv
-recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send
-sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
-sendto - sendto i:ibnibn __libc_sendto __sendto sendto
+recv - recv Ci:ibni __libc_recv __recv recv
+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
+send - send Ci:ibni __libc_send __send send
+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9de983ba90721811ea4bb01baf837f17bdf7ca03
commit 9de983ba90721811ea4bb01baf837f17bdf7ca03
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 15 00:49:51 2002 +0000
(llseek, pread, pwrite, accept, connect, recv, recvfrom, recvmsg, send, sendmsg,
sendto, osf_select): Make cancelable.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index c8ab6ec..7f5c9d0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -19,9 +19,9 @@ vfork - vfork 0 __vfork vfork
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
-pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64
+pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
@@ -36,20 +36,20 @@ sys_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
# proper socket implementations:
-accept - accept 3 __libc_accept __accept accept
+accept - accept C:3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __libc_connect __connect_internal __connect connect
+connect - connect C:3 __libc_connect __connect_internal __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __libc_recv __recv recv
-recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+recv - recv C:4 __libc_recv __recv recv
+recvfrom - recvfrom C:6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg C:3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __libc_send __send send
-sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
-sendto - sendto 6 __libc_sendto __sendto sendto
+send - send C:4 __libc_send __send send
+sendmsg - sendmsg C:3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto C:6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
@@ -64,7 +64,7 @@ pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase
adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex
# support old timeval32 entry points
-osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
+osf_select - osf_select C:5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3bfd489bb9293ba9b13cdb29bd082aaa0e7a3ec6
commit 3bfd489bb9293ba9b13cdb29bd082aaa0e7a3ec6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 10 20:33:27 2002 +0000
(__libc_sigsuspend): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 955d82e..e0f18c2 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -53,3 +53,4 @@ error:
libc_hidden_def (__sigsuspend)
weak_alias(__sigsuspend, sigsuspend)
+strong_alias (__sigsuspend, __libc_sigsuspend)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b344de66b69ca37a1d2b170f4fa67645c418459b
commit b344de66b69ca37a1d2b170f4fa67645c418459b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 10 20:33:12 2002 +0000
(__libc_select): New alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index d3b206d..7d5282d 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -125,7 +125,9 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1)
strong_alias (__select_tv64, __select_tv64p)
default_symbol_version (__select_tv64p, select, GLIBC_2.1)
libc_hidden_ver (__select_tv64, __select)
+strong_alias (__select_tv64, __libc_select)
#else
+strong_alias (__select, __libc_select)
weak_alias (__select, select)
libc_hidden_def (__select)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8a26bed6f428d063fb335d3bb5ee51de91779b3
commit f8a26bed6f428d063fb335d3bb5ee51de91779b3
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 9 20:37:24 2002 +0000
2002-12-08 Roland McGrath <roland@redhat.com>
* elf/Makefile (tests): Uncomment tst-array[123].
* Makeconfig (CPPFLAGS-.oS): Add -DLIBC_NONSHARED=1.
* csu/elf-init.c: New file.
* csu/Makefile (routines, static-only-routines): Add elf-init.
* sysdeps/alpha/elf/start.S: Use __libc_csu_init in place of _init
and __libc_csu_fini in place of _fini.
* sysdeps/arm/elf/start.S: Likewise.
* sysdeps/cris/elf/start.S: Likewise.
* sysdeps/hppa/elf/start.S: Likewise.
* sysdeps/i386/elf/start.S: Likewise.
* sysdeps/ia64/elf/start.S: Likewise.
* sysdeps/m68k/elf/start.S: Likewise.
* sysdeps/mach/hurd/powerpc/static-start.S: Likewise.
* sysdeps/mips/elf/start.S: Likewise.
* sysdeps/powerpc/powerpc32/elf/start.S: Likewise.
* sysdeps/powerpc/powerpc64/elf/start.S: Likewise.
* sysdeps/s390/s390-32/elf/start.S: Likewise.
* sysdeps/s390/s390-64/elf/start.S: Likewise.
* sysdeps/sh/elf/start.S: Likewise.
* sysdeps/sparc/sparc32/elf/start.S: Likewise.
* sysdeps/sparc/sparc64/elf/start.S: Likewise.
* sysdeps/x86_64/elf/start.S: Likewise.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index b0cf119..3f98111 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for Alpha/ELF.
- Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>
@@ -40,8 +40,8 @@ _start:
lda a2, 24(sp) /* get argv */
/* Load address of our own entry points to .fini and .init. */
- lda a3, _init
- lda a4, _fini
+ lda a3, __libc_csu_init
+ lda a4, __libc_csu_fini
/* Store address of the shared library termination function. */
mov v0, a5
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 8d60b3d..90a62f6 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,12 +54,12 @@ _start:
/* Push the last arguments to main() onto the stack */
stmfd sp!, {a1}
- ldr a1, =_fini
+ ldr a1, =__libc_csu_fini
stmfd sp!, {a1}
/* Set up the other arguments for main() that go in registers */
ldr a1, =main
- ldr a4, =_init
+ ldr a4, =__libc_csu_init
/* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index e7f1d67..dbe408a 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF CRIS ABI (to-be-written).
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -89,15 +89,15 @@ _start:
move.d pc,r0
sub.d .:GOTOFF,r0
- move.d _init:PLTG,r13
+ move.d __libc_csu_init:PLTG,r13
add.d r0,r13
- move.d _fini:PLTG,r9
+ move.d __libc_csu_fini:PLTG,r9
add.d r0,r9
move.d main:PLTG,r10
add.d r0,r10
#else
- move.d _init,r13
- move.d _fini,r9
+ move.d __libc_csu_init,r13
+ move.d __libc_csu_fini,r9
move.d main,r10
#endif
push r9
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index b2f0bd2..c7e300c 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -1,3 +1,21 @@
+/* ELF startup code for HPPA.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
.text
@@ -6,12 +24,9 @@
.import main, code
.import $global$, data
.import __libc_start_main, code
- .import _fini, code
- .import _init, code
+ .import __libc_csu_fini, code
+ .import __libc_csu_init, code
-
-
-
.globl _start
.export _start, ENTRY
.type _start,@function
@@ -28,17 +43,17 @@ _start:
/* Expand the stack to store the 5th through 7th args */
ldo 64(%sp), %sp
-
+
/* void (*rtld_fini) (void) (actually the 6th arg) */
stw %r23, -56(%sp)
-
+
/* void (*init) (void) */
- ldil LP%_init, %r23
- ldo RP%_init(%r23), %r23
+ ldil LP%__libc_csu_init, %r23
+ ldo RP%__libc_csu_init(%r23), %r23
/* void (*fini) (void) */
- ldil LP%_fini, %r22
- ldo RP%_fini(%r22), %r22
+ ldil LP%__libc_csu_fini, %r22
+ ldo RP%__libc_csu_fini(%r22), %r22
stw %r22, -52(%sp)
/* void *stack_end */
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index eda7355..f65cda7 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF m68k ABI.
- Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,8 +60,8 @@ _start:
/* Push the address of our own entry points to `.fini' and
`.init'. */
- pea _fini
- pea _init
+ pea __libc_csu_fini
+ pea __libc_csu_init
pea (%a0) /* Push second argument: argv. */
move.l %d0, -(%sp) /* Push first argument: argc. */
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 01908e2..e85e9f5 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -83,8 +83,8 @@ ENTRY_POINT:
the stack is aligned to double words (8 bytes). */
and $29, 0xfffffff8
subu $29, 32
- la $7, _init /* init */
- la $8, _fini
+ la $7, __libc_csu_init /* init */
+ la $8, __libc_csu_fini
sw $8, 16($29) /* fini */
sw $2, 20($29) /* rtld_fini */
sw $29, 24($29) /* stack_end */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99c37bc7d86321f473cf6de7d7bafdea5fc5e88a
commit 99c37bc7d86321f473cf6de7d7bafdea5fc5e88a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 8 22:53:46 2002 +0000
Added SHMLBA #define.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
index 52b11ed..a07213c 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +36,8 @@
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Segment low boundary address multiple. */
+#define SHMLBA 0x00400000 /* address needs to be 4 Mb aligned */
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fec78d3f4e850cb2ecf2ed11a56077bbfd41f82a
commit fec78d3f4e850cb2ecf2ed11a56077bbfd41f82a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 5 23:46:39 2002 +0000
2002-12-05 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/syscalls.list (sendfile): Change
args to i:iipi.
(readahead): Change args to i:iii.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list (readahead):
Change args to i:iii.
* sysdeps/unix/sysv/linux/mips/syscalls.list (readahead): Change
args to i:iiii.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index f12195f..76b8b0f 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -66,7 +66,7 @@ s_pread64 pread64 pread i:ibniii __syscall_pread
s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
s_ptrace ptrace ptrace i:iipp __syscall_ptrace
s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite
-s_readahead EXTRA readahead i:iipi __syscall_readahead
+s_readahead EXTRA readahead i:iiii __syscall_readahead
s_reboot reboot reboot i:iii __syscall_reboot
s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit
s_sigpending sigpending sigpending i:p __syscall_sigpending
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a56243bb0e93c699f46e48efeca06fac139cfd6
commit 3a56243bb0e93c699f46e48efeca06fac139cfd6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 5 00:23:59 2002 +0000
(struct sigevent): Change type of _attribute to void*.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 2cc92ba..11da792 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/Alpha version.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -282,8 +282,8 @@ typedef struct sigevent
struct
{
- void (*_function) (sigval_t); /* Function to start. */
- struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */
+ void (*_function) (sigval_t); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index f385372..7d5cfa9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux/MIPS version.
- Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -271,8 +271,8 @@ typedef struct sigevent
struct
{
- void (*_function) (sigval_t); /* Function to start. */
- struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */
+ void (*_function) (sigval_t); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c49a7f2c2dcd3521d74a572458e739582711180
commit 3c49a7f2c2dcd3521d74a572458e739582711180
Author: Roland McGrath <roland@gnu.org>
Date: Tue Dec 3 07:28:08 2002 +0000
2002-12-02 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/syscalls.list (readahead): Change
caller from EXTRA to -.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 7c1a0be..c8ab6ec 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -28,7 +28,7 @@ getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
truncate - truncate 2 truncate truncate64
-readahead EXTRA readahead 3 __readahead readahead
+readahead - readahead 3 __readahead readahead
sendfile - sendfile i:iipi sendfile sendfile64
# these are actually common with the x86:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7d5c13d9d6aad8970dc026183ffed48fc433e66
commit b7d5c13d9d6aad8970dc026183ffed48fc433e66
Author: Roland McGrath <roland@gnu.org>
Date: Tue Dec 3 02:50:52 2002 +0000
2002-12-02 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/hppa/fpu/fesetround.c (fesetround): Use ~FE_DOWNWARD so both
bits of RM are cleared.
diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c
index 7634b1e..3687624 100644
--- a/sysdeps/hppa/fpu/fesetround.c
+++ b/sysdeps/hppa/fpu/fesetround.c
@@ -31,7 +31,7 @@ fesetround (int round)
/* Get the current status word. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= ~FE_UPWARD;
+ sw[0] &= ~FE_DOWNWARD;
sw[0] |= round;
__asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8545e2d25e3721319e5f76c65faa0a26a469070c
commit 8545e2d25e3721319e5f76c65faa0a26a469070c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 28 22:47:27 2002 +0000
(inline_syscall*): Avoid "=v" constraints.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 3bf25e6..da65cae 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -93,105 +93,117 @@
#define inline_syscall0(name) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
__asm__("callsys # %0 %1 <= %2" \
- : "=v"(_sc_ret), "=r"(_sc_19) \
- : "0"(__NR_##name) \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0) \
: inline_syscall_clobbers, \
"$16", "$17", "$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall1(name,arg1) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
__asm__("callsys # %0 %1 <= %2 %3" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16) \
- : "0"(__NR_##name), "2"(_sc_16) \
+ : "0"(_sc_0), "2"(_sc_16) \
: inline_syscall_clobbers, \
"$17", "$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall2(name,arg1,arg2) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
__asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
: inline_syscall_clobbers, \
"$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall3(name,arg1,arg2,arg3) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18) \
: inline_syscall_clobbers, "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19) \
: inline_syscall_clobbers, "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
register long _sc_20 __asm__("$20"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
"=r"(_sc_20) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
: inline_syscall_clobbers, "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
@@ -199,6 +211,7 @@
#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -206,6 +219,7 @@
register long _sc_20 __asm__("$20"); \
register long _sc_21 __asm__("$21"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -213,14 +227,14 @@
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=v"(_sc_ret), "=r"(_sc_19) \
+ : "=r"(_sc_0), "=r"(_sc_19) \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
"=r"(_sc_20), "=r"(_sc_21) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
"6"(_sc_21) \
: inline_syscall_clobbers); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#endif /* _LINUX_ALPHA_SYSDEP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab18ecf4a7332ea411536f7ef0cee3ade04ab679
commit ab18ecf4a7332ea411536f7ef0cee3ade04ab679
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 28 22:47:04 2002 +0000
Change defined(USE___THREAD) to USE___THREAD.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 50c84c1..4c7c134 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -45,7 +45,7 @@
.ent __syscall_error
__syscall_error:
-#if defined(_LIBC_REENTRANT) && defined(USE___THREAD)
+#if defined(_LIBC_REENTRANT) && USE___THREAD
LOADGP
PROLOGUE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0798f1ad5e743c5fb5906e9b6e7bb03aa1e5596b
commit 0798f1ad5e743c5fb5906e9b6e7bb03aa1e5596b
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Nov 24 19:41:42 2002 +0000
Support inline syscall with six arguments.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 6d0817c..1247cc4 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -203,5 +203,9 @@ SYSCALL_ERROR_LABEL: \
register int _d5 asm ("d5") = (int) (a5); \
LOAD_ARGS_4 (a1, a2, a3, a4)
#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5)
+#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
+ register int _a0 asm ("a0") = (int) (a6); \
+ LOAD_ARGS_5 (a1, a2, a3, a4, a5)
+#define ASM_ARGS_6 ASM_ARGS_5, "a" (_a0)
#endif /* not __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=859f3bbf75677defb0a7a4c757c2989e3d884f6d
commit 859f3bbf75677defb0a7a4c757c2989e3d884f6d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 19 09:26:56 2002 +0000
2002-11-11 Randolf Chung <tausq@debian.org>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_FILE_OFFSET64]
(F_GETLK, F_SETLK, F_SETLKW): Define to F_*64 versions.
* sysdeps/unix/sysv/linux/hppa/fcntl.c: New file.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index dc68122..fca17b1 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -1,5 +1,6 @@
/* O_*, F_*, FD_* bit values for Linux/HPPA.
- Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,1999,2000,2002
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,9 +64,15 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#define F_GETLK 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW 7 /* Set record locking info (blocking). */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking). */
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
#define F_GETLK64 8 /* Get record locking info. */
#define F_SETLK64 9 /* Set record locking info (non-blocking). */
diff --git a/sysdeps/unix/sysv/linux/hppa/fcntl.c b/sysdeps/unix/sysv/linux/hppa/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4eca6400535e8a1f863122d07a03ed35a078541
commit c4eca6400535e8a1f863122d07a03ed35a078541
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 19 06:41:05 2002 +0000
2002-11-11 Randolf Chung <tausq@debian.org>
* sysdeps/hppa/Makefile (CFLAGS-rtld.c): New variable.
Set -mdisable-fpregs for this file.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 22be575..170bd07 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -27,6 +27,7 @@ CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16
endif
ifeq ($(subdir),elf)
+CFLAGS-rtld.c += -mdisable-fpregs
dl-routines += dl-symaddr dl-fptr
rtld-routines += dl-symaddr dl-fptr
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d1f248e713bbd97c9f5e8a183a1d9e9191f4bae
commit 4d1f248e713bbd97c9f5e8a183a1d9e9191f4bae
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 19 06:41:02 2002 +0000
2002-11-11 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h:
Define mcontext_t as a sigcontext.
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
index 0f14b46..1431143 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -52,11 +52,7 @@ typedef struct fpregset
} fpregset_t;
/* Context to describe whole processor state. */
-typedef struct
- {
- gregset_t gregs;
- fpregset_t fpregs;
- } mcontext_t;
+typedef struct sigcontext mcontext_t;
/* Userlevel context. */
typedef struct ucontext
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a65a64534ab652117dfea1df2992d9d6b04d0e4
commit 1a65a64534ab652117dfea1df2992d9d6b04d0e4
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 19 06:40:57 2002 +0000
2002-11-11 Randolf Chung <tausq@debian.org>
* sysdeps/hppa/fpu/libm-test-ulps: New file (generated).
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
new file mode 100644
index 0000000..e2091f8
--- /dev/null
+++ b/sysdeps/hppa/fpu/libm-test-ulps
@@ -0,0 +1,890 @@
+# Begin of automatic generation
+
+# atan2
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 3
+ifloat: 3
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 3
+ifloat: 3
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+# casin
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# catan
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+float: 3
+ifloat: 3
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+float: 4
+ifloat: 4
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+double: 4
+idouble: 4
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+float: 4
+ifloat: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+float: 6
+ifloat: 6
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
+
+# cexp
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+float: 1
+ifloat: 1
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
+float: 3
+ifloat: 3
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+float: 1
+ifloat: 1
+
+# cos
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "cos (pi/2) == 0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+double: 1
+idouble: 1
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
+
+# erfc
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
+Test "expm1 (1) == M_El - 1.0":
+float: 1
+ifloat: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+
+# j1
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+
+# jn
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log10
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
+float: 1
+ifloat: 1
+
+# sincos
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
+
+# tan
+Test "tan (pi/4) == 1":
+double: 1
+idouble: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# yn
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "atan2":
+float: 3
+ifloat: 3
+
+Function: "atanh":
+float: 1
+ifloat: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+
+Function: Real part of "catan":
+float: 4
+ifloat: 4
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 4
+idouble: 4
+
+Function: Imaginary part of "catanh":
+float: 6
+ifloat: 6
+
+Function: "cbrt":
+double: 1
+idouble: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos":
+float: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog":
+float: 3
+ifloat: 3
+
+Function: Real part of "clog10":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+
+Function: Imaginary part of "cpow":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan":
+double: 1
+idouble: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+idouble: 1
+
+Function: Real part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+float: 1
+ifloat: 1
+
+Function: "erf":
+double: 1
+idouble: 1
+
+Function: "erfc":
+double: 1
+idouble: 1
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "hypot":
+float: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log10":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log1p":
+float: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan":
+double: 1
+idouble: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d15c9a78561e3a5879e1efdf8b5256ee65a9e431
commit d15c9a78561e3a5879e1efdf8b5256ee65a9e431
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 15 22:51:20 2002 +0000
2002-11-15 Jakub Jelinek <jakub@redhat.com>
* sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY.
* sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index e3e666a..074762e 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -554,12 +554,37 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
return;
else
{
+# ifndef RESOLVE_CONFLICT_FIND_MAP
+ const Elf32_Sym *const refsym = sym;
+# endif
Elf32_Addr value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
switch (r_type)
{
+# ifndef RESOLVE_CONFLICT_FIND_MAP
+ /* Not needed for dl-conflict.c. */
+ case R_ARM_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (sym->st_size > refsym->st_size
+ || (GL(dl_verbose) && sym->st_size < refsym->st_size))
+ {
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ rtld_progname ?: "<program name unknown>",
+ strtab + refsym->st_name);
+ }
+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
+ refsym->st_size));
+ break;
+# endif /* !RESOLVE_CONFLICT_FIND_MAP */
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
case R_ARM_ABS32:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b53661761beaf7130ba3f0564c61b8dee63f8650
commit b53661761beaf7130ba3f0564c61b8dee63f8650
Author: Roland McGrath <roland@gnu.org>
Date: Sat Nov 9 00:36:04 2002 +0000
2002-09-22 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ...
* sysdeps/unix/sysv/linux/mmap64.c: ... here.
* sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed,
diff --git a/sysdeps/unix/sysv/linux/hppa/mmap64.c b/sysdeps/unix/sysv/linux/hppa/mmap64.c
deleted file mode 100644
index cf7a5dc..0000000
--- a/sysdeps/unix/sysv/linux/hppa/mmap64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/powerpc/mmap64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbd3097515efe928ed8559e6f64c0ebe6661251f
commit fbd3097515efe928ed8559e6f64c0ebe6661251f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:19:00 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test.
* configure: Regenerated.
* config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef.
* sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp.
(RTLD_START): Likewise. Access _dl_skip_args, _rtld_local, and
_dl_fini via gp-relative relocations.
* sysdeps/alpha/fpu/e_sqrt.c: Use !samegp.
* elf/tls-macros.h: Add alpha versions.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
* sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
* sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER.
* sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 05d9882..711bf10 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -228,7 +228,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
mov $26, $18 \n\
addq $17, $17, $17 \n\
/* Do the fixup */ \n\
- bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng\n\
+ bsr $26, " #fixup_name " !samegp \n\
/* Move the destination address into position. */ \n\
mov $0, $27 \n\
/* Restore program registers. */ \n\
@@ -308,7 +308,7 @@ _start: \n\
.prologue 0 \n\
/* Pass pointer to argument block to _dl_start. */ \n\
mov $sp, $16 \n\
- bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng \n\
+ bsr $26, _dl_start !samegp \n\
.end _start \n\
/* FALLTHRU */ \n\
.globl _dl_start_user \n\
@@ -322,7 +322,7 @@ _dl_start_user: \n\
stq $30, __libc_stack_end \n\
/* See if we were run as a command with the executable \n\
file name as an extra leading argument. */ \n\
- ldl $1, _dl_skip_args \n\
+ ldl $1, _dl_skip_args($gp) !gprel \n\
bne $1, $fixup_stack \n\
$fixup_stack_ret: \n\
/* The special initializer gets called with the stack \n\
@@ -332,14 +332,16 @@ $fixup_stack_ret: \n\
" RTLD_START_SPECIAL_INIT " \n\
/* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\
initializers. */ \n\
- ldq $16, _rtld_local \n\
+ ldah $16, _rtld_local($gp) !gprelhigh \n\
+ ldq $16, _rtld_local($16) !gprellow \n\
ldq $17, 0($sp) \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
addq $19, $18, $19 \n\
- jsr $26, _dl_init_internal \n\
+ bsr $26, _dl_init_internal !samegp \n\
/* Pass our finalizer function to the user in $0. */ \n\
- lda $0, _dl_fini \n\
+ ldah $0, _dl_fini($gp) !gprelhigh \n\
+ lda $0, _dl_fini($0) !gprellow \n\
/* Jump to the user's entry point. */ \n\
mov $9, $27 \n\
jmp ($9) \n\
@@ -541,10 +543,15 @@ elf_machine_rela (struct link_map *map,
return;
else
{
- Elf64_Addr loadbase, sym_value;
+ Elf64_Addr sym_value;
- loadbase = RESOLVE (&sym, version, r_type);
+#if defined USE_TLS && !defined RTLD_BOOTSTRAP
+ struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+ sym_value = sym ? sym_map->l_addr + sym->st_value : 0;
+#else
+ Elf64_Addr loadbase = RESOLVE (&sym, version, r_type);
sym_value = sym ? loadbase + sym->st_value : 0;
+#endif
sym_value += reloc->r_addend;
if (r_type == R_ALPHA_GLOB_DAT)
@@ -575,6 +582,40 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_1, &sym_value, 8);
}
#endif
+#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
+ else if (r_type == R_ALPHA_DTPMOD64)
+ {
+#ifdef RTLD_BOOTSTRAP
+ /* During startup the dynamic linker is always index 1. */
+ *reloc_addr = 1;
+#else
+ /* Get the information from the link map returned by the
+ resolv function. */
+ if (sym_map != NULL)
+ *reloc_addr = sym_map->l_tls_modid;
+#endif
+ }
+ else if (r_type == R_ALPHA_DTPREL64)
+ {
+#ifndef RTLD_BOOTSTRAP
+ /* During relocation all TLS symbols are defined and used.
+ Therefore the offset is already correct. */
+ *reloc_addr = sym_value;
+#endif
+ }
+ else if (r_type == R_ALPHA_TPREL64)
+ {
+#ifdef RTLD_BOOTSTRAP
+ *reloc_addr = sym_value - map->l_tls_offset;
+#else
+ if (sym_map)
+ {
+ *reloc_addr = sym_value - sym_map->l_tls_offset;
+ CHECK_STATIC_TLS (map, sym_map);
+ }
+#endif
+ }
+#endif /* USE_TLS */
else
_dl_reloc_bad_type (map, r_type, 0);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18fefdbe946acb0f099e1998add076e47c9afba4
commit 18fefdbe946acb0f099e1998add076e47c9afba4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:18:58 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test.
* configure: Regenerated.
* config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef.
* sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp.
(RTLD_START): Likewise. Access _dl_skip_args, _rtld_local, and
_dl_fini via gp-relative relocations.
* sysdeps/alpha/fpu/e_sqrt.c: Use !samegp.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index c6262c8..a371896 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -153,7 +153,7 @@ __ieee754_sqrt: \n\
.align 4 \n\
$fixup: \n\
addq $sp, 16, $sp \n\
- br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng \n\
+ br __full_ieee754_sqrt !samegp \n\
\n\
.end __ieee754_sqrt");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0d0df1dd367f5021f4f2fe7f59832fc6780127c
commit d0d0df1dd367f5021f4f2fe7f59832fc6780127c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:18:51 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* linuxthreads/sysdeps/alpha/tls.h: New file.
* sysdeps/alpha/dl-tls.h: New file.
diff --git a/sysdeps/alpha/dl-tls.h b/sysdeps/alpha/dl-tls.h
new file mode 100644
index 0000000..f81f95d
--- /dev/null
+++ b/sysdeps/alpha/dl-tls.h
@@ -0,0 +1,29 @@
+/* Thread-local storage handling in the ELF dynamic linker. Alpha version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+/* Type used for the representation of TLS information in the GOT. */
+typedef struct
+{
+ unsigned long int ti_module;
+ unsigned long int ti_offset;
+} tls_index;
+
+
+extern void *__tls_get_addr (tls_index *ti);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=543d2ed9aa810aa5ae997eb891ba92cbcf1dbe5a
commit 543d2ed9aa810aa5ae997eb891ba92cbcf1dbe5a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:18:49 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.h: Re-include protect.
Kill argument registers across the inline syscall.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index e56adca..3bf25e6 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -17,6 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _LINUX_ALPHA_SYSDEP_H
+#define _LINUX_ALPHA_SYSDEP_H 1
+
#ifdef __ASSEMBLER__
#include <asm/pal.h>
@@ -88,118 +91,114 @@
of the hard-register variables as much as possible. Thus we copy
in/out as close to the asm as possible. */
-#define inline_syscall0(name) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- __asm__("callsys # %0 %1 <= %2" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall1(name,arg1) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- __asm__("callsys # %0 %1 <= %2 %3" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall2(name,arg1,arg2) \
+#define inline_syscall0(name) \
{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- __asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+ __asm__("callsys # %0 %1 <= %2" \
+ : "=v"(_sc_ret), "=r"(_sc_19) \
+ : "0"(__NR_##name) \
+ : inline_syscall_clobbers, \
+ "$16", "$17", "$18", "$20", "$21"); \
+ _sc_err = _sc_19; \
}
-#define inline_syscall3(name,arg1,arg2,arg3) \
+#define inline_syscall1(name,arg1) \
{ \
- register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
- _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+ __asm__("callsys # %0 %1 <= %2 %3" \
+ : "=v"(_sc_ret), "=r"(_sc_19), \
+ "=r"(_sc_16) \
+ : "0"(__NR_##name), "2"(_sc_16) \
+ : inline_syscall_clobbers, \
+ "$17", "$18", "$20", "$21"); \
+ _sc_err = _sc_19; \
}
-#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+#define inline_syscall2(name,arg1,arg2) \
+{ \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4" \
+ : "=v"(_sc_ret), "=r"(_sc_19), \
+ "=r"(_sc_16), "=r"(_sc_17) \
+ : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17) \
+ : inline_syscall_clobbers, \
+ "$18", "$20", "$21"); \
+ _sc_err = _sc_19; \
}
-#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- register long _sc_20 __asm__("$20"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+#define inline_syscall3(name,arg1,arg2,arg3) \
+{ \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
+ : "=v"(_sc_ret), "=r"(_sc_19), \
+ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
+ : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18) \
+ : inline_syscall_clobbers, "$20", "$21"); \
+ _sc_err = _sc_19; \
+}
+
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+{ \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
+ : "=v"(_sc_ret), "=r"(_sc_19), \
+ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
+ : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19) \
+ : inline_syscall_clobbers, "$20", "$21"); \
+ _sc_err = _sc_19; \
+}
+
+#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
+{ \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
+ : "=v"(_sc_ret), "=r"(_sc_19), \
+ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
+ "=r"(_sc_20) \
+ : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
+ : inline_syscall_clobbers, "$21"); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
{ \
- register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -207,7 +206,6 @@
register long _sc_20 __asm__("$20"); \
register long _sc_21 __asm__("$21"); \
\
- _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -215,10 +213,14 @@
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \
- "r"(_sc_21) \
+ : "=v"(_sc_ret), "=r"(_sc_19) \
+ "=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
+ "=r"(_sc_20), "=r"(_sc_21) \
+ : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ "4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
+ "6"(_sc_21) \
: inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
+ _sc_err = _sc_19; \
}
+
+#endif /* _LINUX_ALPHA_SYSDEP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5a256add301cb3b152901104e612f1040b3dc0a
commit d5a256add301cb3b152901104e612f1040b3dc0a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:18:48 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* elf/tls-macros.h: Add alpha versions.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
* sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
* sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER.
* sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 05c0091..50c84c1 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -20,24 +20,59 @@
#include <sysdep.h>
#include <features.h>
+#if defined(__ELF__) && defined(PIC)
+ /* Put this at the end of libc's text segment so that all of
+ the direct branches from the syscalls are forward, and
+ thus predicted not taken. */
+ .section .text.last, "ax", @progbits
+#else
.text
- .align 2
+#endif
-#ifdef _LIBC_REENTRANT
+#ifdef PIC
+ /* When building a shared library, we branch here without
+ having loaded the GP. Nor, since it was a direct branch,
+ have we loaded PV with our address. Do both. */
+# define LOADGP br pv, 1f; 1: ldgp gp, 0(pv)
+# define PROLOGUE .prologue 0
+#else
+# define LOADGP ldgp gp, 0(pv)
+# define PROLOGUE .prologue 1
+#endif
+ .align 4
.globl __syscall_error
.ent __syscall_error
__syscall_error:
- ldgp gp, 0(pv)
+
+#if defined(_LIBC_REENTRANT) && defined(USE___THREAD)
+
+ LOADGP
+ PROLOGUE
+ mov v0, t0
+ call_pal PAL_rduniq
+ ldq t1, __libc_errno(gp) !gottprel
+ addq v0, t1, v0
+ stl t0, 0(v0)
+ lda v0, -1
+ ret
+
+#elif defined(_LIBC_REENTRANT)
+
+ LOADGP
lda sp, -16(sp)
.frame sp, 16, ra, 0
stq ra, 0(sp)
stq v0, 8(sp)
.mask 0x4000001, -16
- .prologue 1
+ PROLOGUE
/* Find our per-thread errno address */
+#ifdef PIC
+ bsr ra, __errno_location !samegp
+#else
jsr ra, __errno_location
+#endif
/* Store the error value. */
ldq t0, 8(sp)
@@ -49,16 +84,15 @@ __syscall_error:
ldq ra, 0(sp)
lda sp, 16(sp)
ret
- .end __syscall_error
-#else
-ENTRY(__syscall_error)
- ldgp gp, 0(t12)
- .prologue 1
+#else
+ LOADGP
+ PROLOGUE
stl v0, errno
lda v0, -1
ret
- END(__syscall_error)
-#endif /* _LIBC_REENTRANT */
+#endif
+
+ .end __syscall_error
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 46b5214..f9aba3f 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -27,6 +27,13 @@
# include <regdef.h>
#endif
+#include <tls.h> /* Defines USE___THREAD. */
+
+#ifdef IS_IN_rtld
+# include <dl-sysdep.h> /* Defines RTLD_PRIVATE_ERRNO. */
+#endif
+
+
#ifdef __STDC__
#define __LABEL(x) x##:
#else
@@ -55,54 +62,65 @@
label of that number between those two macros! */
#ifdef PROF
-#define PSEUDO(name, syscall_name, args) \
- .globl name; \
- .align 3; \
- .ent name,0; \
+# define PSEUDO_PROLOGUE \
+ .frame sp, 0, ra; \
+ ldgp gp,0(pv); \
+ .set noat; \
+ lda AT,_mcount; \
+ jsr AT,(AT),_mcount; \
+ .set at; \
+ .prologue 1
+# define PSEUDO_LOADGP
+#else
+# define PSEUDO_PROLOGUE \
+ .frame sp, 0, ra; \
+ .prologue 0
+# define PSEUDO_LOADGP \
+ br gp, 2f; \
+2: ldgp gp, 0(gp)
+#endif /* PROF */
+
+#if RTLD_PRIVATE_ERRNO
+# define SYSCALL_ERROR_HANDLER \
+ stl v0, errno(gp) !gprel; \
+ lda v0, -1; \
+ ret
+#else
+# define SYSCALL_ERROR_HANDLER \
+ jmp $31, __syscall_error
+#endif /* RTLD_PRIVATE_ERRNO */
+
+#if defined(PIC) && !RTLD_PRIVATE_ERRNO
+# define PSEUDO(name, syscall_name, args) \
+ .globl name; \
+ .align 4; \
+ .ent name,0; \
__LABEL(name) \
- .frame sp, 0, ra; \
- ldgp gp,0(pv); \
- .set noat; \
- lda AT,_mcount; \
- jsr AT,(AT),_mcount; \
- .set at; \
- .prologue 1; \
- ldiq v0, SYS_ify(syscall_name); \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- bne a3, 1996f; \
+ PSEUDO_PROLOGUE; \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys; \
+ bne a3, __syscall_error !samegp; \
3:
+# undef PSEUDO_END
+# define PSEUDO_END(sym) END(sym)
#else
-#define PSEUDO(name, syscall_name, args) \
- .globl name; \
- .align 3; \
- .ent name,0; \
+# define PSEUDO(name, syscall_name, args) \
+ .globl name; \
+ .align 4; \
+ .ent name,0; \
__LABEL(name) \
- .frame sp, 0, ra \
- .prologue 0; \
- ldiq v0, SYS_ify(syscall_name); \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- bne a3, 1996f; \
+ lda v0, SYS_ify(syscall_name); \
+ call_pal PAL_callsys; \
+ bne a3, 1996f; \
3:
-#endif
-#undef PSEUDO_END
-#ifdef PROF
-#define PSEUDO_END(sym) \
+# undef PSEUDO_END
+# define PSEUDO_END(sym) \
1996: \
- jmp zero, __syscall_error; \
- END(sym)
-#else
-#define PSEUDO_END(sym) \
-1996: \
- br gp, 2f; \
-2: ldgp gp, 0(gp); \
- jmp zero, __syscall_error; \
- END(sym)
-#endif
+ PSEUDO_LOADGP; \
+ SYSCALL_ERROR_HANDLER; \
+ END(sym)
+#endif /* PIC && !RTLD_PRIVATE_ERRNO */
#define r0 v0
#define r1 a4
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 3cd1ae0..e01abeb 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -74,7 +74,7 @@ $ok: stq a0, __curbrk
/* What a horrible way to die. */
$err0: ldi v0, ENOMEM
$err1: addq sp, 8, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__brk)
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 03ceea1..5432562 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -97,7 +97,7 @@ $do32: ldi v0, SYS_ify(osf_getitimer)
.align 3
$error:
addq sp, 16, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(GETITIMER)
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 13762a8..dd3eced 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -129,7 +129,7 @@ $do32: ldi v0, SYS_ify(osf_getrusage)
.align 3
$error:
addq sp, 16, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(GETRUSAGE)
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 60d642a..71b8c13 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -94,7 +94,7 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday)
.align 3
$error:
addq sp, 16, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(GETTIMEOFDAY)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 650f7c0..89e08b3 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -53,7 +53,7 @@ $error:
1: ldgp gp, 0(gp)
#endif
lda sp, 16(sp)
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 53838fe..dc1bbbb 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -52,7 +52,7 @@ $error:
1: ldgp gp, 0(gp)
#endif
lda sp, 16(sp)
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index e3d01af..5f166a7 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -56,7 +56,7 @@ ENTRY(__syscall_rt_sigaction)
br gp,2f
2: ldgp gp,0(gp)
#endif
- jmp __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__syscall_rt_sigaction)
@@ -82,6 +82,6 @@ ENTRY(__syscall_rt_sigaction)
ldgp $29,0($27)
.prologue 1
ldi $0,ENOSYS
- jmp __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__syscall_rt_sigaction)
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 57030aa..d3b206d 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -112,7 +112,7 @@ $do32:
.align 3
$error:
addq sp, 64, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(SELECT)
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index 2cc1263..fdc3d27 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -113,7 +113,7 @@ $do32:
.align 3
$error:
addq sp, 48, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(SETITIMER)
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index 03e9206..339913f 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -94,7 +94,7 @@ $do32:
.align 3
$error:
addq sp, 16, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(SETTIMEOFDAY)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index d6a1785..955d82e 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -47,7 +47,7 @@ error:
br gp, 1f
1: ldgp gp, 0(gp)
#endif
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index c354bb6..10a32d5 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -70,7 +70,7 @@ $error:
br gp, 2f
2: ldgp gp, 0(gp)
#endif
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(__syscall)
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index e9c16db..a939255 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -99,7 +99,7 @@ $do32:
.align 3
$error:
addq sp, 16, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(UTIMES)
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index b695047..17c5a97 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -132,7 +132,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
.align 3
$error:
addq sp, 32, sp
- jmp zero, __syscall_error
+ SYSCALL_ERROR_HANDLER
END(WAIT4)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8b06fdf73f9fcb3cabb42e1f7e1e9b23d31c255
commit e8b06fdf73f9fcb3cabb42e1f7e1e9b23d31c255
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 8 02:18:45 2002 +0000
2002-11-07 Richard Henderson <rth@redhat.com>
* elf/tls-macros.h: Add alpha versions.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
* sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
* sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER.
* sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/clone.S: Add user_tid and tls args.
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index f1f6214..42df98a 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -24,7 +24,9 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
+ pid_t *tid, void *tls);
+ */
.text
ENTRY(__clone)
@@ -49,24 +51,29 @@ ENTRY(__clone)
stq a0,0(a1)
stq a3,8(a1)
- /* Do the system call */
+ /* Shift the flags, tid and tls arguments into place; the
+ child_stack argument is already correct. */
mov a2,a0
+ mov a4,a2
+ mov a5,a3
+
+ /* Do the system call. */
ldiq v0,__NR_clone
call_pal PAL_callsys
bne a3,$error
beq v0,thread_start
- /* Successful return from the parent */
+ /* Successful return from the parent. */
ret
- /* Something bad happened -- no child created */
+ /* Something bad happened -- no child created. */
$error:
#ifndef PROF
br gp,1f
1: ldgp gp,0(gp)
#endif
- jmp zero,__syscall_error
+ SYSCALL_ERROR_HANDLER
END(__clone)
@@ -85,11 +92,11 @@ thread_start:
ldq a0,8(sp)
addq sp,16,sp
- /* Call the user's function */
+ /* Call the user's function. */
jsr ra,(pv)
ldgp gp,0(ra)
- /* Call _exit rather than doing it inline for breakpoint purposes */
+ /* Call _exit rather than doing it inline for breakpoint purposes. */
mov v0,a0
jsr ra,_exit
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=598b541b8cfd9c4a57d807c8dc3639fd3c0ff570
commit 598b541b8cfd9c4a57d807c8dc3639fd3c0ff570
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 6 22:14:25 2002 +0000
2002-11-06 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/mips/configure.in: File removed.
* sysdeps/unix/sysv/linux/mips/configure: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
deleted file mode 100644
index bd173ef..0000000
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ /dev/null
@@ -1,69 +0,0 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/unix/sysv/linux/mips.
-
-for ac_prog in $AS
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AS+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_AS="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- echo "$as_me:$LINENO: result: $AS" >&5
-echo "${ECHO_T}$AS" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$AS" && break
-done
-
-if test -z "$AS"; then
- ac_verc_fail=yes
-else
- # Found it, now check the version.
- echo "$as_me:$LINENO: checking version of $AS" >&5
-echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
- esac
- echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6
-fi
-if test $ac_verc_fail = yes; then
- { echo "$as_me:$LINENO: WARNING: *** Your binutils versions are too old.
-*** We strongly advise to update binutils. For details check
-*** the FAQ and INSTALL documents." >&5
-echo "$as_me: WARNING: *** Your binutils versions are too old.
-*** We strongly advise to update binutils. For details check
-*** the FAQ and INSTALL documents." >&2;}
-fi
-
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
deleted file mode 100644
index 9d00064..0000000
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/mips.
-
-define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT
-AC_CHECK_PROG_VER(AS, $AS, --version,
- [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
- [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*],
-AC_MSG_WARN([*** Your binutils versions are too old.
-*** We strongly advise to update binutils. For details check
-*** the FAQ and INSTALL documents.]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9752ed23d7ad94d7539a0ddcd1288687aa5bb2a2
commit 9752ed23d7ad94d7539a0ddcd1288687aa5bb2a2
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 6 03:19:47 2002 +0000
2002-11-05 Roland McGrath <roland@redhat.com>
* sysdeps/unix/mips/sysdep.h [! __PIC__] (PSEUDO): Add nop after jump.
From Johannes Stezenbach <js@convergence.de>.
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index c259696..fd51916 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -49,7 +49,8 @@ syse1:
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
.align 2; \
- 99: j __syscall_error; \
+ 99: j __syscall_error; \
+ nop; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_ify(syscall_name); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f732ef26a87629981cc209309913899da42a6405
commit f732ef26a87629981cc209309913899da42a6405
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 6 02:53:24 2002 +0000
2002-11-05 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/mips/Versions (libc: GLIBC_2.0): Change
#errlist-compat magic comment to give 123 as size.
(libc: GLIBC_2.1): Remove this set, moving #errlist-compat magic to ...
(libc: GLIBC_2.2): ... here.
(libc: GLIBC_2.3): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 1569885..50bfac5 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -5,7 +5,7 @@ libc {
# for all GNU/Linux configurations.
GLIBC_2.0 {
- #errlist-compat 1134
+ #errlist-compat 123
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
# Exception handling support functions from libgcc
@@ -21,16 +21,11 @@ libc {
# s*
sysmips;
}
- GLIBC_2.1 {
+ GLIBC_2.2 {
#errlist-compat 1134
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
- }
- GLIBC_2.2 {
+
# _*
_test_and_set;
}
- GLIBC_2.3 {
- #errlist-compat 1134
- _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
- }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cd89c3a1f5faaf6c3f77c45afb446bf5376b060
commit 9cd89c3a1f5faaf6c3f77c45afb446bf5376b060
Author: Roland McGrath <roland@gnu.org>
Date: Sat Nov 2 23:13:16 2002 +0000
2002-11-02 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/mips/syscalls.list (s_execve): Set
caller to EXTRA instead of execve.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 07e942d..f12195f 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -47,7 +47,7 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask
rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
-s_execve execve execve i:spp __syscall_execve
+s_execve EXTRA execve i:spp __syscall_execve
s_exit _exit exit i:i __syscall_exit
s_fcntl fcntl fcntl i:iiF __syscall_fcntl
s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db8eb985106e383c1d582b9c5f4fc5d07847242c
commit db8eb985106e383c1d582b9c5f4fc5d07847242c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 1 20:48:33 2002 +0000
2002-10-29 Jakub Jelinek <jakub@redhat.com>
* sysdeps/gnu/siglist.c (PTR_SIZE_STR): Remove.
(__old_sys_siglist, __old_sys_sigabbrev): Use strong_alias and
declare_symbol.
* sysdeps/mach/hurd/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
(OLD_SIGLIST_SIZE): Define.
* sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
(OLD_SIGLIST_SIZE): Define.
* sysdeps/unix/sysv/linux/arm/siglist.c: Remove.
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
deleted file mode 100644
index d5fdb5d..0000000
--- a/sysdeps/unix/sysv/linux/arm/siglist.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <signal.h>
-#include <sizes.h>
-#include <libintl.h>
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-asm (".data; .globl __old_sys_siglist; __old_sys_siglist:");
-#endif
-
-const char *const __new_sys_siglist[NSIG] =
-{
-#define init_sig(sig, abbrev, desc) [sig] desc,
-#include "siglist.h"
-#undef init_sig
-};
-strong_alias (__new_sys_siglist, _sys_siglist_internal)
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-asm (".type __old_sys_siglist,%object;.size __old_sys_siglist,"
- OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
-
-asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:");
-#endif
-
-const char *const __new_sys_sigabbrev[NSIG] =
-{
-#define init_sig(sig, abbrev, desc) [sig] abbrev,
-#include "siglist.h"
-#undef init_sig
-};
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev,"
- OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
-
-extern const char *const *__old_sys_siglist;
-extern const char *const *__old_sys_sigabbrev;
-
-strong_alias (__old_sys_siglist, _old_sys_siglist)
-compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0);
-compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0);
-compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0);
-#endif
-
-strong_alias (__new_sys_siglist, _new_sys_siglist)
-versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1);
-versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1);
-versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b995f35b90a2ffd264aacc2462cf57bbfd2c9b4
commit 8b995f35b90a2ffd264aacc2462cf57bbfd2c9b4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 25 19:41:24 2002 +0000
2002-10-25 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/init-first.c (init): Remove [! SHARED]
conditional from __libc_multiple_libcs access. Remove kludge for weak
symbol access with old compilers we no longer support.
* sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
* sysdeps/generic/libc-start.c (__libc_start_main): Likewise.
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index 8272a62..24ef109 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -57,12 +57,8 @@ init (int argc, char **argv, char **envp)
If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */
-#ifndef SHARED
/* XXX disable dl for now
- int *dummy_addr = &_dl_starting_up;
-
- __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */
-#endif
+ __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; */
/* Save the command-line arguments. */
__libc_argc = argc;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35ebee609c908ba06dae83a469df77bcb0a90fa6
commit 35ebee609c908ba06dae83a469df77bcb0a90fa6
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 24 19:13:38 2002 +0000
2002-10-24 Roland McGrath <roland@redhat.com>
* sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here.
* sysdeps/unix/sysv/linux/init-first.c: Not here.
* sysdeps/powerpc/elf/libc-start.c: Or here.
* sysdeps/unix/sysv/aix/libc-start.c: Or here.
* sysdeps/unix/sysv/aix/start-libc.c: Or here.
* sysdeps/unix/sysv/aix/init-first.c: Or here.
* sysdeps/generic/libc-start.c: Or here.
* sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
access with [! SHARED].
* sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index 4c6768b..8272a62 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -37,9 +37,6 @@ extern void __libc_init (int, char **, char **);
/* The function is called from assembly stubs the compiler can't see. */
static void init (int, char **, char **) __attribute__ ((unused));
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
-
/* Set nonzero if we have to be prepared for more then one libc being
used in the process. Safe assumption if initializer never runs. */
int __libc_multiple_libcs attribute_hidden = 1;
@@ -60,10 +57,12 @@ init (int argc, char **argv, char **envp)
If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */
+#ifndef SHARED
/* XXX disable dl for now
int *dummy_addr = &_dl_starting_up;
__libc_multiple_libcs = dummy_addr && !_dl_starting_up; */
+#endif
/* Save the command-line arguments. */
__libc_argc = argc;
diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c
index 757b349..813e28d 100644
--- a/sysdeps/unix/sysv/aix/libc-start.c
+++ b/sysdeps/unix/sysv/aix/libc-start.c
@@ -31,8 +31,6 @@ typedef unsigned char uchar;
extern void __libc_init_first (int argc, char **argv, char **envp);
/* XXX disable for now
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
extern int __libc_multiple_libcs; */
/* XXX normally defined in generic/dl-sydep.c, hack it into existance
diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c
index 303caa7..0cbe79d 100644
--- a/sysdeps/unix/sysv/aix/start-libc.c
+++ b/sysdeps/unix/sysv/aix/start-libc.c
@@ -31,8 +31,6 @@ typedef unsigned char uchar;
extern void __libc_init_first (int argc, char **argv, char **envp);
/* XXX disable for now
-extern int _dl_starting_up;
-weak_extern (_dl_starting_up)
extern int __libc_multiple_libcs; */
/* XXX normally defined in generic/dl-sydep.c, hack it into existance
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c71e9ba7e7e25e30fa3f92c3dbbfc25cf38f44b7
commit c71e9ba7e7e25e30fa3f92c3dbbfc25cf38f44b7
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 23 23:49:01 2002 +0000
2002-10-23 Roland McGrath <roland@redhat.com>
* sysvipc/Makefile (headers): Add bits/ipctypes.h here.
* sysdeps/generic/bits/ipctypes.h: New file.
* sysdeps/mips/bits/ipctypes.h: New file.
* sysdeps/gnu/bits/shm.h: Include <bits/ipctypes.h>.
* sysdeps/gnu/bits/msq.h: Likewise.
* sysvipc/sys/ipc.h: Likewise.
diff --git a/sysdeps/mips/bits/ipctypes.h b/sysdeps/mips/bits/ipctypes.h
new file mode 100644
index 0000000..0956e7d
--- /dev/null
+++ b/sysdeps/mips/bits/ipctypes.h
@@ -0,0 +1,32 @@
+/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/*
+ * Never include <bits/ipctypes.h> directly.
+ */
+
+#ifndef _BITS_IPCTYPES_H
+#define _BITS_IPCTYPES_H 1
+
+#include <bits/types.h>
+
+typedef __SLONG32_TYPE __ipc_pid_t;
+
+
+#endif /* bits/ipctypes.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7bee643ffff23507c0434e7342d9515871551218
commit 7bee643ffff23507c0434e7342d9515871551218
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 23 23:48:58 2002 +0000
2002-10-23 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ...
* sysdeps/unix/sysv/linux/bits/statvfs.h: ... here.
(ST_NODIRATIME): Restore fixed value of 2048.
* sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
deleted file mode 100644
index 16bb895..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_STATVFS_H
-# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
-#endif
-
-#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */
-
-struct statvfs
- {
- unsigned long int f_bsize;
- unsigned long int f_frsize;
-#ifndef __USE_FILE_OFFSET64
- __fsblkcnt_t f_blocks;
- __fsblkcnt_t f_bfree;
- __fsblkcnt_t f_bavail;
- __fsfilcnt_t f_files;
- __fsfilcnt_t f_ffree;
- __fsfilcnt_t f_favail;
-#else
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsfilcnt64_t f_favail;
-#endif
- unsigned long int f_fsid;
- unsigned long int f_flag;
- unsigned long int f_namemax;
- int __f_spare[6];
- };
-
-#ifdef __USE_LARGEFILE64
-struct statvfs64
- {
- unsigned long int f_bsize;
- unsigned long int f_frsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsfilcnt64_t f_favail;
- unsigned long int f_fsid;
- unsigned long int f_flag;
- unsigned long int f_namemax;
- int __f_spare[6];
- };
-#endif
-
-/* Definitions for the flag in `f_flag'. These definitions should be
- kept in sync with the definitions in <sys/mount.h>. */
-enum
-{
- ST_RDONLY = 1, /* Mount read-only. */
-#define ST_RDONLY ST_RDONLY
- ST_NOSUID = 2 /* Ignore suid and sgid bits. */
-#define ST_NOSUID ST_NOSUID
-#ifdef __USE_GNU
- ,
- ST_NODEV = 4, /* Disallow access to device special files. */
-# define ST_NODEV ST_NODEV
- ST_NOEXEC = 8, /* Disallow program execution. */
-# define ST_NOEXEC ST_NOEXEC
- ST_SYNCHRONOUS = 16, /* Writes are synced at once. */
-# define ST_SYNCHRONOUS ST_SYNCHRONOUS
- ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
-# define ST_MANDLOCK ST_MANDLOCK
- ST_WRITE = 128, /* Write on file/directory/symlink. */
-# define ST_WRITE ST_WRITE
- ST_APPEND = 256, /* Append-only file. */
-# define ST_APPEND ST_APPEND
- ST_IMMUTABLE = 512, /* Immutable file. */
-# define ST_IMMUTABLE ST_IMMUTABLE
- ST_NOATIME = 1024, /* Do not update access times. */
-# define ST_NOATIME ST_NOATIME
- ST_NODIRATIME /* Do not update directory access times. */
-# define ST_NODIRATIME ST_NODIRATIME
-#endif /* Use GNU. */
-};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70c6be61653dc3c746059f7d3c2140c458750d0c
commit 70c6be61653dc3c746059f7d3c2140c458750d0c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 23 23:48:55 2002 +0000
2002-10-23 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs):
Use __SWORD_TYPE instead of int for member types.
(struct statfs64): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file.
* sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file.
* sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
new file mode 100644
index 0000000..b8e37e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statfs.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
+
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t. */
+
+struct statfs
+ {
+ int f_type;
+ int f_bsize;
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_bavail;
+ __fsfilcnt_t f_files;
+ __fsfilcnt_t f_ffree;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+#endif
+ __fsid_t f_fsid;
+ int f_namelen;
+ int f_spare[6];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct statfs64
+ {
+ int f_type;
+ int f_bsize;
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+ __fsid_t f_fsid;
+ int f_namelen;
+ int f_spare[6];
+ };
+#endif
+
+/* Tell code we have this member. */
+#define _STATFS_F_NAMELEN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c537c914302e8ed8f5e6618747d06a4a1464d662
commit c537c914302e8ed8f5e6618747d06a4a1464d662
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 23 23:48:50 2002 +0000
2002-10-23 Roland McGrath <roland@redhat.com>
Rearranged <bits/types.h> definitions to reduce duplication.
* sysdeps/generic/bits/types.h: Rewritten, using macros from
<bits/wordsize.h> and new header <bits/typesizes.h>.
* posix/Makefile (headers): Add bits/typesizes.h here.
* sysdeps/generic/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
* sysdeps/mach/hurd/bits/typesizes.h: New file.
* sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/mips/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/s390/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed.
* posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include
<bits/pthreadtypes.h> here, not in <bits/types.h>.
* signal/signal.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
deleted file mode 100644
index 1b809e2..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
- * Never include this file directly; use <sys/types.h> instead.
- */
-
-#ifndef _BITS_TYPES_H
-#define _BITS_TYPES_H 1
-
-#include <features.h>
-
-#define __need_size_t
-#include <stddef.h>
-
-/* Convenience types. */
-typedef unsigned char __u_char;
-typedef unsigned short int __u_short;
-typedef unsigned int __u_int;
-typedef unsigned long int __u_long;
-typedef unsigned long int __u_quad_t;
-typedef long int __quad_t;
-typedef signed char __int8_t;
-typedef unsigned char __uint8_t;
-typedef signed short int __int16_t;
-typedef unsigned short int __uint16_t;
-typedef signed int __int32_t;
-typedef unsigned int __uint32_t;
-typedef signed long int __int64_t;
-typedef unsigned long int __uint64_t;
-typedef __quad_t *__qaddr_t;
-
-typedef __uint64_t __dev_t; /* Type of device numbers. */
-typedef __uint32_t __uid_t; /* Type of user identifications. */
-typedef __uint32_t __gid_t; /* Type of group identifications. */
-typedef __uint32_t __ino_t; /* Type of file serial numbers. */
-typedef __uint64_t __ino64_t; /* "" (LFS) */
-typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */
-typedef __uint32_t __nlink_t; /* Type of file link counts. */
-typedef __int64_t __off_t; /* Type of file sizes and offsets. */
-typedef __int64_t __off64_t; /* "" (LFS) */
-typedef __int64_t __loff_t; /* Type of file sizes and offsets. */
-typedef __int32_t __pid_t; /* Type of process identifications. */
-typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
-typedef __uint64_t __rlim_t; /* Type of resource counts. */
-typedef __uint64_t __rlim64_t; /* "" (LFS) */
-typedef __uint32_t __blksize_t; /* Type to represnet block size. */
-typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
-typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
-typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */
-typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */
-typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
-typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
-typedef __uint32_t __id_t; /* General type for IDs. */
-
-typedef struct
- {
- int __val[2];
- } __fsid_t; /* Type of file system IDs. */
-
-/* Everythin' else. */
-typedef int __daddr_t; /* Type of a disk address. */
-typedef char *__caddr_t; /* Type of a core address. */
-typedef long int __time_t;
-typedef unsigned int __useconds_t;
-typedef long int __suseconds_t;
-typedef long int __swblk_t; /* Type of a swap block maybe? */
-typedef long int __clock_t;
-typedef int __key_t; /* Type of a SYSV IPC key. */
-
-/* Clock ID used in clock and timer functions. */
-typedef int __clockid_t;
-
-/* Timer ID returned by `timer_create'. */
-typedef int __timer_t;
-
-/* Used in `struct shmid_ds'. */
-typedef int __ipc_pid_t;
-
-/* Number of descriptors that can fit in an `fd_set'. */
-#define __FD_SETSIZE 1024
-
-
-/* Used in XTI. */
-typedef long int __t_scalar_t;
-typedef unsigned long int __t_uscalar_t;
-
-/* Duplicates info from stdint.h but this is used in unistd.h. */
-typedef long int __intptr_t;
-
-/* Duplicate info from sys/socket.h. */
-typedef unsigned int __socklen_t;
-
-
-/* Now add the thread types. */
-#if defined __USE_POSIX199506 || defined __USE_UNIX98
-# include <bits/pthreadtypes.h>
-#endif
-
-#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
new file mode 100644
index 0000000..235acf8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -0,0 +1,65 @@
+/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _BITS_TYPES_H
+# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
+#endif
+
+#ifndef _BITS_TYPESIZES_H
+#define _BITS_TYPESIZES_H 1
+
+/* See <bits/types.h> for the meaning of these macros. This file exists so
+ that <bits/types.h> need not vary across different GNU platforms. */
+
+#define __DEV_T_TYPE __U64_TYPE
+#define __UID_T_TYPE __U32_TYPE
+#define __GID_T_TYPE __U32_TYPE
+#define __INO_T_TYPE __U32_TYPE
+#define __INO64_T_TYPE __U64_TYPE
+#define __MODE_T_TYPE __U32_TYPE
+#define __NLINK_T_TYPE __U32_TYPE
+#define __OFF_T_TYPE __SLONGWORD_TYPE
+#define __OFF64_T_TYPE __S64_TYPE
+#define __PID_T_TYPE __S32_TYPE
+#define __RLIM_T_TYPE __ULONGWORD_TYPE
+#define __RLIM64_T_TYPE __U64_TYPE
+#define __BLKCNT_T_TYPE __U32_TYPE
+#define __BLKCNT64_T_TYPE __U64_TYPE
+#define __FSBLKCNT_T_TYPE __S32_TYPE
+#define __FSBLKCNT64_T_TYPE __S64_TYPE
+#define __FSFILCNT_T_TYPE __U32_TYPE
+#define __FSFILCNT64_T_TYPE __U64_TYPE
+#define __ID_T_TYPE __U32_TYPE
+#define __CLOCK_T_TYPE __SLONGWORD_TYPE
+#define __TIME_T_TYPE __SLONGWORD_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __S64_TYPE
+#define __DADDR_T_TYPE __S32_TYPE
+#define __SWBLK_T_TYPE __SLONGWORD_TYPE
+#define __KEY_T_TYPE __S32_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
+#define __TIMER_T_TYPE __S32_TYPE
+#define __BLKSIZE_T_TYPE __U32_TYPE
+#define __FSID_T_TYPE struct { int __val[2]; }
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+
+#endif /* bits/typesizes.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
deleted file mode 100644
index 141f0b2..0000000
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
- * Never include this file directly; use <sys/types.h> instead.
- */
-
-#ifndef _BITS_TYPES_H
-#define _BITS_TYPES_H 1
-
-#include <features.h>
-
-#define __need_size_t
-#include <stddef.h>
-
-/* Convenience types. */
-typedef unsigned char __u_char;
-typedef unsigned short __u_short;
-typedef unsigned int __u_int;
-typedef unsigned long __u_long;
-#ifdef __GNUC__
-__extension__ typedef unsigned long long int __u_quad_t;
-__extension__ typedef long long int __quad_t;
-#else
-typedef struct
- {
- long int __val[2];
- } __quad_t;
-typedef struct
- {
- __u_long __val[2];
- } __u_quad_t;
-#endif
-typedef signed char __int8_t;
-typedef unsigned char __uint8_t;
-typedef signed short int __int16_t;
-typedef unsigned short int __uint16_t;
-typedef signed int __int32_t;
-typedef unsigned int __uint32_t;
-#ifdef __GNUC__
-__extension__ typedef signed long long int __int64_t;
-__extension__ typedef unsigned long long int __uint64_t;
-#endif
-typedef __quad_t *__qaddr_t;
-
-typedef __u_quad_t __dev_t; /* Type of device numbers. */
-typedef __u_int __uid_t; /* Type of user identifications. */
-typedef __u_int __gid_t; /* Type of group identifications. */
-typedef __u_long __ino_t; /* Type of file serial numbers. */
-typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
-typedef __u_int __nlink_t; /* Type of file link counts. */
-typedef long int __off_t; /* Type of file sizes and offsets. */
-typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
-typedef int __pid_t; /* Type of process identifications. */
-typedef int __ssize_t; /* Type of a byte count, or error. */
-typedef __u_long __rlim_t; /* Type of resource counts. */
-typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */
-typedef __u_int __id_t; /* General type for ID. */
-
-typedef struct
- {
- int __val[2];
- } __fsid_t; /* Type of file system IDs. */
-
-/* Everythin' else. */
-typedef int __daddr_t; /* The type of a disk address. */
-typedef char *__caddr_t;
-typedef long int __time_t;
-typedef unsigned int __useconds_t;
-typedef long int __suseconds_t;
-typedef long int __swblk_t; /* Type of a swap block maybe? */
-
-typedef long int __clock_t;
-
-/* Clock ID used in clock and timer functions. */
-typedef int __clockid_t;
-
-/* Timer ID returned by `timer_create'. */
-typedef int __timer_t;
-
-/* Number of descriptors that can fit in an `fd_set'. */
-#define __FD_SETSIZE 1024
-
-
-typedef int __key_t;
-
-/* Used in `struct shmid_ds'. */
-typedef long int __ipc_pid_t;
-
-
-/* Type to represent block size. */
-typedef long int __blksize_t;
-
-/* Types from the Large File Support interface. */
-
-/* Type to count number os disk blocks. */
-typedef long int __blkcnt_t;
-typedef __quad_t __blkcnt64_t;
-
-/* Type to count file system blocks. */
-typedef __u_long __fsblkcnt_t;
-typedef __u_quad_t __fsblkcnt64_t;
-
-/* Type to count file system inodes. */
-typedef __u_long __fsfilcnt_t;
-typedef __u_quad_t __fsfilcnt64_t;
-
-/* Type of file serial numbers. */
-typedef __u_quad_t __ino64_t;
-
-/* Type of file sizes and offsets. */
-typedef __loff_t __off64_t;
-
-/* Used in XTI. */
-typedef long int __t_scalar_t;
-typedef unsigned long int __t_uscalar_t;
-
-/* Duplicates info from stdint.h but this is used in unistd.h. */
-typedef int __intptr_t;
-
-/* Duplicate info from sys/socket.h. */
-typedef unsigned int __socklen_t;
-
-
-/* Now add the thread types. */
-#if defined __USE_POSIX199506 || defined __USE_UNIX98
-# include <bits/pthreadtypes.h>
-#endif
-
-#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10fdbe1a5b3131878a182c2f1005cea20fee1a04
commit 10fdbe1a5b3131878a182c2f1005cea20fee1a04
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 19 20:06:29 2002 +0000
2002-10-19 Roland McGrath <roland@redhat.com>
* config.make.in: Nix completely-soft nonsense.
* configure.in: Likewise. Under --without-fp, use nofpu subdirectory
of machine directories instead of fpu subdirectory.
* sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change.
* sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead.
* sysdeps/powerpc/soft-fp/sim-full.c: Moved to ...
* sysdeps/powerpc/nofpu/sim-full.c: ... here.
* sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ...
* sysdeps/powerpc/nofpu/fraiseexcpt.c: ... here.
* sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ...
* sysdeps/powerpc/nofpu/fegetexcept.c: ... here.
* sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ...
* sysdeps/powerpc/nofpu/fclrexcpt.c: ... here.
* sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ...
* sysdeps/powerpc/nofpu/ftestexcept.c: ... here.
* sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ...
* sysdeps/powerpc/nofpu/fgetexcptflg.c: ... here.
* sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ...
* sysdeps/powerpc/nofpu/fsetexcptflg.c: ... here.
* sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ...
* sysdeps/powerpc/nofpu/fedisblxcpt.c: ... here.
* sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ...
* sysdeps/powerpc/nofpu/feenablxcpt.c: ... here.
* sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ...
* sysdeps/powerpc/nofpu/fegetenv.c: ... here.
* sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ...
* sysdeps/powerpc/nofpu/fesetenv.c: ... here.
* sysdeps/powerpc/soft-fp/fegetround.c: Moved to ...
* sysdeps/powerpc/nofpu/fegetround.c: ... here.
* sysdeps/powerpc/soft-fp/fesetround.c: Moved to ...
* sysdeps/powerpc/nofpu/fesetround.c: ... here.
* sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ...
* sysdeps/powerpc/nofpu/feupdateenv.c: ... here.
* sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ...
* sysdeps/powerpc/nofpu/feholdexcpt.c: ... here.
* sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ...
* sysdeps/powerpc/nofpu/fenv_const.c: ... here.
* sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ...
* sysdeps/powerpc/nofpu/libm-test-ulps: ... here.
* sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ...
* sysdeps/powerpc/nofpu/soft-supp.h: ... here.
* sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ...
* sysdeps/powerpc/nofpu/Versions: ... here, new file.
diff --git a/sysdeps/powerpc/nofpu/fclrexcpt.c b/sysdeps/powerpc/nofpu/fclrexcpt.c
new file mode 100644
index 0000000..16e96ba
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fclrexcpt.c
@@ -0,0 +1,37 @@
+/* Clear floating-point exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__feclearexcept (int x)
+{
+ __sim_exceptions &= ~x;
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feclearexcept, __old_feclearexcept)
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fedisblxcpt.c b/sysdeps/powerpc/nofpu/fedisblxcpt.c
new file mode 100644
index 0000000..3d8dd44
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fedisblxcpt.c
@@ -0,0 +1,33 @@
+/* Disable exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <fenv.h>
+
+int
+fedisableexcept (int x)
+{
+ int old_exceptions = ~__sim_disabled_exceptions & FE_ALL_EXCEPT;
+
+ __sim_disabled_exceptions |= x;
+
+ return old_exceptions;
+}
diff --git a/sysdeps/powerpc/nofpu/feenablxcpt.c b/sysdeps/powerpc/nofpu/feenablxcpt.c
new file mode 100644
index 0000000..060e450
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/feenablxcpt.c
@@ -0,0 +1,33 @@
+/* Enable exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+
+extern int __sim_disabled_exceptions;
+
+int
+feenableexcept (int exceptions)
+{
+ int old_exceptions = ~__sim_disabled_exceptions & FE_ALL_EXCEPT;
+
+ __sim_disabled_exceptions &= ~exceptions;
+
+ return old_exceptions;
+}
diff --git a/sysdeps/powerpc/nofpu/fegetenv.c b/sysdeps/powerpc/nofpu/fegetenv.c
new file mode 100644
index 0000000..3cc8b13
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fegetenv.c
@@ -0,0 +1,49 @@
+/* Store current floating-point environment (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <bp-sym.h>
+
+extern int __sim_exceptions;
+extern int __sim_disabled_exceptions;
+extern int __sim_round_mode;
+
+int
+__fegetenv (fenv_t *envp)
+{
+ fenv_union_t u;
+
+ u.l[0] = __sim_exceptions;
+ u.l[0] |= __sim_round_mode;
+ u.l[1] = __sim_disabled_exceptions;
+
+ *envp = u.fenv;
+
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fegetenv, __old_fegetenv)
+compat_symbol (libm, BP_SYM (__old_fegetenv), BP_SYM (fegetenv), GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, BP_SYM (__fegetenv), BP_SYM (fegetenv), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fegetexcept.c b/sysdeps/powerpc/nofpu/fegetexcept.c
new file mode 100644
index 0000000..0a47a09
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fegetexcept.c
@@ -0,0 +1,28 @@
+/* Get floating-point exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetexcept (void)
+{
+ return (__sim_disabled_exceptions ^ FE_ALL_EXCEPT) & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/powerpc/nofpu/fegetround.c b/sysdeps/powerpc/nofpu/fegetround.c
new file mode 100644
index 0000000..0d01e44
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fegetround.c
@@ -0,0 +1,29 @@
+/* Return current rounding mode (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+#undef fegetround
+int
+fegetround (void)
+{
+ return __sim_round_mode;
+}
diff --git a/sysdeps/powerpc/nofpu/feholdexcpt.c b/sysdeps/powerpc/nofpu/feholdexcpt.c
new file mode 100644
index 0000000..786c691
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/feholdexcpt.c
@@ -0,0 +1,43 @@
+/* Store current floating-point environment and clear exceptions
+ (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+int
+feholdexcept (fenv_t *envp)
+{
+ fenv_union_t u;
+
+ /* Get the current state. */
+ fegetenv (envp);
+
+ u.fenv = *envp;
+ /* Clear everything except the rounding mode. */
+ u.l[0] &= 0x3;
+
+ /* ?? Should we clear the disabled exceptions as well ?? */
+
+ /* Put the new state in effect. */
+ fesetenv (envp);
+
+ return 0;
+}
diff --git a/sysdeps/powerpc/nofpu/fenv_const.c b/sysdeps/powerpc/nofpu/fenv_const.c
new file mode 100644
index 0000000..7dc2e81
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fenv_const.c
@@ -0,0 +1,35 @@
+/* Constants for fenv_bits.h (soft float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* We want to specify the bit pattern of the __fe_*_env constants, so
+ pretend they're really `long long' instead of `double'. */
+
+/* If the default argument is used we use this value. Disable all
+ signalling exceptions as default. */
+const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) =
+0x000000003e000000ULL;
+
+/* Floating-point environment where none of the exceptions are masked. */
+const unsigned long long __fe_enabled_env __attribute__ ((aligned (8))) =
+0xfff80000000000f8ULL;
+
+/* Floating-point environment with the NI bit set. */
+const unsigned long long __fe_nonieee_env __attribute__ ((aligned (8))) =
+0xfff8000000000004ULL;
diff --git a/sysdeps/powerpc/nofpu/fesetenv.c b/sysdeps/powerpc/nofpu/fesetenv.c
new file mode 100644
index 0000000..43d03a4
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fesetenv.c
@@ -0,0 +1,48 @@
+/* Set floating point environment (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <bp-sym.h>
+
+extern int __sim_exceptions attribute_hidden;
+extern int __sim_disabled_exceptions attribute_hidden;
+extern int __sim_round_mode attribute_hidden;
+
+int
+__fesetenv (const fenv_t *envp)
+{
+ fenv_union_t u;
+
+ u.fenv = *envp;
+ __sim_exceptions = u.l[0] & FE_ALL_EXCEPT;
+ __sim_round_mode = u.l[0] & 0x3;
+ __sim_disabled_exceptions = u.l[1];
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fesetenv, __old_fesetenv)
+compat_symbol (libm, BP_SYM (__old_fesetenv), BP_SYM (fesetenv), GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__fesetenv, fesetenv)
+versioned_symbol (libm, BP_SYM (__fesetenv), BP_SYM (fesetenv), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fesetround.c b/sysdeps/powerpc/nofpu/fesetround.c
new file mode 100644
index 0000000..842614a
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fesetround.c
@@ -0,0 +1,33 @@
+/* Set rounding mode (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fesetround (int round)
+{
+ if ((unsigned int) round > FE_DOWNWARD)
+ return 1;
+
+ __sim_round_mode = round;
+
+ return 0;
+}
diff --git a/sysdeps/powerpc/nofpu/feupdateenv.c b/sysdeps/powerpc/nofpu/feupdateenv.c
new file mode 100644
index 0000000..5073776
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/feupdateenv.c
@@ -0,0 +1,50 @@
+/* Install given floating-point environment and raise exceptions
+ (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <bp-sym.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+ fenv_union_t u;
+ int saved_exceptions;
+
+ /* Save currently set exceptions. */
+ saved_exceptions = __sim_exceptions;
+
+ /* Set environment. */
+ fesetenv (envp);
+
+ /* Raise old exceptions. */
+ __sim_exceptions |= saved_exceptions;
+
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feupdateenv, __old_feupdateenv)
+compat_symbol (libm, BP_SYM (__old_feupdateenv), BP_SYM (feupdateenv), GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, BP_SYM (__feupdateenv), BP_SYM (feupdateenv), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fgetexcptflg.c b/sysdeps/powerpc/nofpu/fgetexcptflg.c
new file mode 100644
index 0000000..9d4f078
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fgetexcptflg.c
@@ -0,0 +1,38 @@
+/* Store current representation for exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <bp-sym.h>
+
+__fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ *flagp = (fexcept_t) __sim_exceptions;
+
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fraiseexcpt.c b/sysdeps/powerpc/nofpu/fraiseexcpt.c
new file mode 100644
index 0000000..cd91502
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fraiseexcpt.c
@@ -0,0 +1,46 @@
+/* Raise given exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+#include <bp-sym.h>
+
+#undef feraiseexcept
+int
+__feraiseexcept (int x)
+{
+ __sim_exceptions |= x;
+ if (x == 0 || __sim_disabled_exceptions & x)
+ /* Ignore exception. */
+ ;
+ else
+ raise (SIGFPE);
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+compat_symbol (libm, BP_SYM (__old_feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
+versioned_symbol (libm, BP_SYM (__feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/fsetexcptflg.c b/sysdeps/powerpc/nofpu/fsetexcptflg.c
new file mode 100644
index 0000000..85fd88f
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/fsetexcptflg.c
@@ -0,0 +1,40 @@
+/* Set floating-point environment exception handling (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+#include <bp-sym.h>
+
+int
+__fesetexceptflag(const fexcept_t *flagp, int excepts)
+{
+ /* Ignore exceptions not listed in 'excepts'. */
+ __sim_exceptions = *flagp & excepts;
+
+ return 0;
+}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+compat_symbol (libm, BP_SYM (__old_fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, BP_SYM (__fesetexceptflag), BP_SYM (fesetexceptflag), GLIBC_2_2);
diff --git a/sysdeps/powerpc/nofpu/ftestexcept.c b/sysdeps/powerpc/nofpu/ftestexcept.c
new file mode 100644
index 0000000..ce8044f
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/ftestexcept.c
@@ -0,0 +1,28 @@
+/* Test floating-point exceptions (soft-float edition).
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fetestexcept (int x)
+{
+ return __sim_exceptions & x;
+}
diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps
new file mode 100644
index 0000000..e2091f8
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/libm-test-ulps
@@ -0,0 +1,890 @@
+# Begin of automatic generation
+
+# atan2
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
+float: 3
+ifloat: 3
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
+float: 3
+ifloat: 3
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
+float: 1
+ifloat: 1
+
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
+float: 1
+ifloat: 1
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+# casin
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# catan
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+float: 3
+ifloat: 3
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+float: 4
+ifloat: 4
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+double: 4
+idouble: 4
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
+float: 4
+ifloat: 4
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+float: 6
+ifloat: 6
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
+
+# cexp
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+float: 1
+ifloat: 1
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+float: 1
+ifloat: 1
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
+float: 3
+ifloat: 3
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+float: 1
+ifloat: 1
+
+# cos
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "cos (pi/2) == 0":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
+float: 1
+ifloat: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
+double: 1
+idouble: 1
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
+
+# erfc
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
+double: 1
+idouble: 1
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
+double: 1
+idouble: 1
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
+Test "expm1 (1) == M_El - 1.0":
+float: 1
+ifloat: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+
+# j1
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+
+# jn
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
+float: 2
+ifloat: 2
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
+float: 2
+ifloat: 2
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
+double: 1
+idouble: 1
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log10
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
+float: 1
+ifloat: 1
+
+# sincos
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
+
+# tan
+Test "tan (pi/4) == 1":
+double: 1
+idouble: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# yn
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
+double: 1
+idouble: 1
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
+double: 1
+idouble: 1
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
+double: 1
+idouble: 1
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
+double: 1
+idouble: 1
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "atan2":
+float: 3
+ifloat: 3
+
+Function: "atanh":
+float: 1
+ifloat: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "casin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+
+Function: Real part of "catan":
+float: 4
+ifloat: 4
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 4
+idouble: 4
+
+Function: Imaginary part of "catanh":
+float: 6
+ifloat: 6
+
+Function: "cbrt":
+double: 1
+idouble: 1
+
+Function: Real part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos":
+float: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog":
+float: 3
+ifloat: 3
+
+Function: Real part of "clog10":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+
+Function: Imaginary part of "cpow":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan":
+double: 1
+idouble: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+idouble: 1
+
+Function: Real part of "ctanh":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+float: 1
+ifloat: 1
+
+Function: "erf":
+double: 1
+idouble: 1
+
+Function: "erfc":
+double: 1
+idouble: 1
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+Function: "expm1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "hypot":
+float: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log10":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log1p":
+float: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan":
+double: 1
+idouble: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+# end of automatic generation
diff --git a/sysdeps/powerpc/nofpu/sim-full.c b/sysdeps/powerpc/nofpu/sim-full.c
new file mode 100644
index 0000000..9f4c96f
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/sim-full.c
@@ -0,0 +1,42 @@
+/* Software floating-point exception handling emulation.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <signal.h>
+#include "soft-fp.h"
+#include "soft-supp.h"
+
+/* Global to store sticky exceptions. */
+int __sim_exceptions;
+
+/* By default, no exceptions should trap. */
+int __sim_disabled_exceptions = 0xffffffff;
+
+int __sim_round_mode;
+
+void
+__simulate_exceptions (int x)
+{
+ __sim_exceptions |= x;
+ if (x == 0 || __sim_disabled_exceptions & x)
+ /* Ignore exception. */
+ ;
+ else
+ raise (SIGFPE);
+}
diff --git a/sysdeps/powerpc/nofpu/soft-supp.h b/sysdeps/powerpc/nofpu/soft-supp.h
new file mode 100644
index 0000000..e358eda
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/soft-supp.h
@@ -0,0 +1,33 @@
+/* Internal support stuff for complete soft float.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+
+typedef union
+{
+ fenv_t fenv;
+ unsigned int l[2];
+} fenv_union_t;
+
+
+extern int __sim_exceptions attribute_hidden;
+extern int __sim_disabled_exceptions attribute_hidden;
+extern int __sim_round_mode attribute_hidden;
+extern void __simulate_exceptions (int x) attribute_hidden;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69211cccc68e9dc10476e1ed3486688857deb818
commit 69211cccc68e9dc10476e1ed3486688857deb818
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 19 20:03:50 2002 +0000
2002-10-19 Roland McGrath <roland@redhat.com>
* configure: Regenerated (using Autoconf 2.54).
* sysdeps/alpha/elf/configure: Likewise.
* sysdeps/generic/configure: Likewise.
* sysdeps/i386/elf/configure: Likewise.
* sysdeps/ia64/elf/configure: Likewise.
* sysdeps/mach/hurd/configure: Likewise.
* sysdeps/mach/configure: Likewise.
* sysdeps/unix/configure: Likewise.
* sysdeps/unix/common/configure: Likewise.
* sysdeps/unix/sysv/aix/configure: Likewise.
* sysdeps/unix/sysv/linux/configure: Likewise.
* sysdeps/unix/sysv/linux/mips/configure: Likewise.
* sysdeps/x86_64/elf/configure: Likewise.
diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure
index 3ca6793..ea99e35 100644
--- a/sysdeps/alpha/elf/configure
+++ b/sysdeps/alpha/elf/configure
@@ -1,12 +1,13 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/alpha/elf.
if test "$usetls" != no; then
# Check for support of thread-local storage handling in assembler and
# linker.
-echo $ac_n "checking for Alpha TLS support""... $ac_c" 1>&6
-echo "configure:8: checking for Alpha TLS support" >&5
-if eval "test \"`echo '$''{'libc_cv_alpha_tls'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
+echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
+if test "${libc_cv_alpha_tls+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.s <<\EOF
.section ".tdata", "awT", @progbits
@@ -42,27 +43,32 @@ baz:
lda $16, m($16) !tprello
lda $16, n($31) !tprel
EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:46: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
libc_cv_alpha_tls=yes
else
libc_cv_alpha_tls=no
fi
rm -f conftest*
fi
-
-echo "$ac_t""$libc_cv_alpha_tls" 1>&6
+echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
+echo "${ECHO_T}$libc_cv_alpha_tls" >&6
if test $libc_cv_alpha_tls = yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_TLS_SUPPORT 1
-EOF
+_ACEOF
fi
fi
-echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6
-echo "configure:64: checking for GP relative module local relocs" >&5
-if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
+echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
+if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat > conftest.c <<\EOF
static int bar;
@@ -75,7 +81,12 @@ int foo (void)
EOF
libc_cv_alpha_hidden_gprel=no
-if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:79: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
if grep -q 'bar.*!gprel' conftest.s \
&& grep -q 'baz.*!gprel' conftest.s \
&& ! grep -q 'bar.*!literal' conftest.s \
@@ -85,11 +96,11 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo config
fi
rm -f conftest*
fi
-
-echo "$ac_t""$libc_cv_alpha_hidden_gprel" 1>&6
+echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
+echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
if test $libc_cv_alpha_hidden_gprel = yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define PI_STATIC_AND_HIDDEN 1
-EOF
+_ACEOF
fi
diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure
index fa4a6c9..2c07b41 100644
--- a/sysdeps/unix/sysv/aix/configure
+++ b/sysdeps/unix/sysv/aix/configure
@@ -1,3 +1,4 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/aix.
# Don't bother trying to generate any glue code to be compatible with the
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index fb71310..bd173ef 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -1,45 +1,52 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
for ac_prog in $AS
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:9: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS"; then
ac_cv_prog_AS="$AS" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS="$ac_cv_prog_AS"
+AS=$ac_cv_prog_AS
if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
+ echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$AS" && break
+ test -n "$AS" && break
done
if test -z "$AS"; then
ac_verc_fail=yes
else
# Found it, now check the version.
- echo $ac_n "checking version of $AS""... $ac_c" 1>&6
-echo "configure:43: checking version of $AS" >&5
+ echo "$as_me:$LINENO: checking version of $AS" >&5
+echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -48,11 +55,15 @@ echo "configure:43: checking version of $AS" >&5
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
- echo "$ac_t""$ac_prog_version" 1>&6
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+echo "${ECHO_T}$ac_prog_version" >&6
fi
if test $ac_verc_fail = yes; then
- echo "configure: warning: *** Your binutils versions are too old.
-*** We strongly advise to update binutils. For details check
-*** the FAQ and INSTALL documents." 1>&2
+ { echo "$as_me:$LINENO: WARNING: *** Your binutils versions are too old.
+*** We strongly advise to update binutils. For details check
+*** the FAQ and INSTALL documents." >&5
+echo "$as_me: WARNING: *** Your binutils versions are too old.
+*** We strongly advise to update binutils. For details check
+*** the FAQ and INSTALL documents." >&2;}
fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea5a0c9530c681608dfa55f637e1dd7767472e07
commit ea5a0c9530c681608dfa55f637e1dd7767472e07
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 19 20:03:40 2002 +0000
2002-10-19 Roland McGrath <roland@redhat.com>
* config.make.in: Nix completely-soft nonsense.
* configure.in: Likewise. Under --without-fp, use nofpu subdirectory
of machine directories instead of fpu subdirectory.
* sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change.
* sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead.
* sysdeps/powerpc/soft-fp/sim-full.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fegetround.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fesetround.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ../nofpu.
* sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ...
* sysdeps/powerpc/nofpu/Versions: ... here, new file.
diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
new file mode 100644
index 0000000..f85cb0b
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/Makefile
@@ -0,0 +1,9 @@
+# Makefile fragment for PowerPC with no FPU.
+
+ifeq ($(subdir),soft-fp)
+sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) sim-full
+endif
+
+ifeq ($(subdir),math)
+libm-support += fenv_const fe_nomask
+endif
diff --git a/sysdeps/powerpc/nofpu/Versions b/sysdeps/powerpc/nofpu/Versions
new file mode 100644
index 0000000..4103db5
--- /dev/null
+++ b/sysdeps/powerpc/nofpu/Versions
@@ -0,0 +1,13 @@
+libc {
+ GLIBC_2.3.2 {
+ __sim_exceptions; __sim_disabled_exceptions; __sim_round_mode;
+ __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
+ __extendsfdf2; __fixdfdi; __fixdfsi; __fixsfdi; __fixsfsi;
+ __fixtfdi; __fixtfsi;
+ __fixunsdfdi; __fixunsdfsi; __fixunssfdi; __fixunssfsi;
+ __floatdidf; __floatdisf; __floatsidf; __floatsisf;
+ __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
+ __negdf2; __negsf2; __sqrtdf2; __sqrtsf2; __subdf3;
+ __subsf3; __truncdfsf2; __trunctfsf2;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=54df0cf57d86c5158f3d9d6076dc79154c876b2d
commit 54df0cf57d86c5158f3d9d6076dc79154c876b2d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 18 22:37:29 2002 +0000
2002-10-18 Roland McGrath <roland@redhat.com>
* sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1)
(inline_syscall_clobbers, inline_syscall0, inline_syscall1)
(inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5)
(inline_syscall6): Move these macros ...
* sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 7da33c8..46b5214 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -109,167 +109,4 @@ __LABEL(name) \
#define MOVE(x,y) mov x,y
-#else /* !ASSEMBLER */
-
-/* Define a macro which expands inline into the wrapper code for a
- system call. */
-
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) INLINE_SYSCALL1(name, nr, args)
-
-#define INLINE_SYSCALL1(name, nr, args...) \
-({ \
- long _sc_ret, _sc_err; \
- inline_syscall##nr(name, args); \
- if (_sc_err) \
- { \
- __set_errno (_sc_ret); \
- _sc_ret = -1L; \
- } \
- _sc_ret; \
-})
-
-#define inline_syscall_clobbers \
- "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
- "$22", "$23", "$24", "$25", "$27", "$28", "memory"
-
-/* It is moderately important optimization-wise to limit the lifetime
- of the hard-register variables as much as possible. Thus we copy
- in/out as close to the asm as possible. */
-
-#define inline_syscall0(name) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- __asm__("callsys # %0 %1 <= %2" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall1(name,arg1) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- __asm__("callsys # %0 %1 <= %2 %3" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall2(name,arg1,arg2) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- __asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall3(name,arg1,arg2,arg3) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- register long _sc_20 __asm__("$20"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
-#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
-{ \
- register long _sc_0 __asm__("$0"); \
- register long _sc_16 __asm__("$16"); \
- register long _sc_17 __asm__("$17"); \
- register long _sc_18 __asm__("$18"); \
- register long _sc_19 __asm__("$19"); \
- register long _sc_20 __asm__("$20"); \
- register long _sc_21 __asm__("$21"); \
- \
- _sc_0 = __NR_##name; \
- _sc_16 = (long) (arg1); \
- _sc_17 = (long) (arg2); \
- _sc_18 = (long) (arg3); \
- _sc_19 = (long) (arg4); \
- _sc_20 = (long) (arg5); \
- _sc_21 = (long) (arg6); \
- __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=r"(_sc_0), "=r"(_sc_19) \
- : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
- "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \
- "r"(_sc_21) \
- : inline_syscall_clobbers); \
- _sc_ret = _sc_0, _sc_err = _sc_19; \
-}
-
#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 05a4c3a..e56adca 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -67,3 +67,158 @@
(__NR_##name == __NR_rt_sigaction \
? __syscall_##name(args) \
: INLINE_SYSCALL1(name, nr, args))
+
+#define INLINE_SYSCALL1(name, nr, args...) \
+({ \
+ long _sc_ret, _sc_err; \
+ inline_syscall##nr(name, args); \
+ if (_sc_err) \
+ { \
+ __set_errno (_sc_ret); \
+ _sc_ret = -1L; \
+ } \
+ _sc_ret; \
+})
+
+#define inline_syscall_clobbers \
+ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory"
+
+/* It is moderately important optimization-wise to limit the lifetime
+ of the hard-register variables as much as possible. Thus we copy
+ in/out as close to the asm as possible. */
+
+#define inline_syscall0(name) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ __asm__("callsys # %0 %1 <= %2" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall1(name,arg1) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ __asm__("callsys # %0 %1 <= %2 %3" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall2(name,arg1,arg2) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall3(name,arg1,arg2,arg3) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ register long _sc_21 __asm__("$21"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ _sc_21 = (long) (arg6); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \
+ "r"(_sc_21) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6474e421d60c5617d85216b554fea53d31b17cb0
commit 6474e421d60c5617d85216b554fea53d31b17cb0
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 18 22:15:36 2002 +0000
2002-10-18 Jeff Bailey <jbailey@gnu.org>
* sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
* sysdeps/generic/configure.in: Likewise.
* sysdeps/i386/elf/configure.in: Likewise.
* sysdeps/ia64/elf/configure.in: Likewise.
* sysdeps/mach/configure.in: Likewise.
* sysdeps/mach/hurd/configure.in: Likewise.
* sysdeps/unix/configure.in: Likewise.
* sysdeps/unix/common/configure.in: Likewise.
* sysdeps/unix/sysv/aix/configure.in: Likewise.
* sysdeps/unix/sysv/linux/configure.in: Likewise.
* sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
* sysdeps/x86_64/elf/configure.in: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index 81515a5..9d00064 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -1,11 +1,10 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT
AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
- [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*],
-AC_MSG_WARN([*** Your binutils versions are too old.
-*** We strongly advise to update binutils. For details check
+ [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*],
+AC_MSG_WARN([*** Your binutils versions are too old.
+*** We strongly advise to update binutils. For details check
*** the FAQ and INSTALL documents.]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12e56cf46d2a17747b91bc3913c298bcac57d214
commit 12e56cf46d2a17747b91bc3913c298bcac57d214
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 18 20:27:53 2002 +0000
2002-10-18 Jeff Bailey <jbailey@gnu.org>
* configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
* sysdeps/alpha/elf/configure.in: Likewise.
* sysdeps/i386/elf/configure.in: Likewise.
* sysdeps/mach/hurd/configure.in: Likewise.
* sysdeps/x86_64/elf/configure.in: Likewise.
diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in
index 770a95e..7986814 100644
--- a/sysdeps/alpha/elf/configure.in
+++ b/sysdeps/alpha/elf/configure.in
@@ -40,7 +40,7 @@ baz:
lda $16, n($31) !tprel
EOF
dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
libc_cv_alpha_tls=yes
else
libc_cv_alpha_tls=no
@@ -64,7 +64,7 @@ EOF
dnl
libc_cv_alpha_hidden_gprel=no
-if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AC_FD_CC); then
+if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AS_MESSAGE_LOG_FD); then
if grep -q 'bar.*!gprel' conftest.s \
&& grep -q 'baz.*!gprel' conftest.s \
&& ! grep -q 'bar.*!literal' conftest.s \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa858c3e992a028efb7e374b2db6b52fb4711125
commit aa858c3e992a028efb7e374b2db6b52fb4711125
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 18 19:38:00 2002 +0000
2002-10-18 Jeff Bailey <jbailey@gnu.org>
* sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
* sysdeps/generic/configure.in: Likewise.
* sysdeps/i386/elf/configure.in: Likewise.
* sysdeps/ia64/elf/configure.in: Likewise.
* sysdeps/mach/configure.in: Likewise.
* sysdeps/mach/hurd/configure.in: Likewise.
* sysdeps/unix/configure.in: Likewise.
* sysdeps/unix/common/configure.in: Likewise.
* sysdeps/unix/sysv/aix/configure.in: Likewise.
* sysdeps/unix/sysv/linux/configure.in: Likewise.
* sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
* sysdeps/x86_64/elf/configure.in: Likewise.
diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in
index 29daf4f..770a95e 100644
--- a/sysdeps/alpha/elf/configure.in
+++ b/sysdeps/alpha/elf/configure.in
@@ -1,4 +1,3 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/alpha/elf.
diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in
index effa853..bb783fc 100644
--- a/sysdeps/unix/sysv/aix/configure.in
+++ b/sysdeps/unix/sysv/aix/configure.in
@@ -1,4 +1,3 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/aix.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccc5fdb26b6cb9ea4518794bdd492ed463ca2f48
commit ccc5fdb26b6cb9ea4518794bdd492ed463ca2f48
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 18 19:03:49 2002 +0000
2002-10-18 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/pathconf.h (statfs_link_max): Add inline.
(statfs_filesize_max): New function.
* sysdeps/unix/sysv/linux/linux_fsinfo.h (JFFS_SUPER_MAGIC,
JFFS2_SUPER_MAGIC, JFS_SUPER_MAGIC, NTFS_SUPER_MAGIC,
ROMFS_SUPER_MAGIC, UDF_SUPER_MAGIC): Define.
* sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use
statfs_filesize_max.
* sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
* sysdeps/unix/sysv/linux/alpha/fpathconf.c: Removed.
* sysdeps/unix/sysv/linux/alpha/pathconf.c: Removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
deleted file mode 100644
index a8a24de..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Get file-specific information about a descriptor. Linux/Alpha version.
- Copyright (C) 1991,95,96,98,99,2000,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <unistd.h>
-#include <sys/statfs.h>
-
-
-static long int linux_fpathconf (int fd, int name);
-
-/* Define this first, so it can be inlined. */
-#define __fpathconf static linux_fpathconf
-#include <sysdeps/unix/sysv/linux/fpathconf.c>
-
-
-/* Get file-specific information about FD. */
-long int
-__pathconf (int fd, int name)
-{
- if (name == _PC_FILESIZEBITS)
- {
- /* Test whether this is on a ext2 or UFS filesystem which
- support large files. */
- struct statfs fs;
-
- if (__fstatfs (fd, &fs) < 0
- || (fs.f_type != EXT2_SUPER_MAGIC
- && fs.f_type != UFS_MAGIC
- && fs.f_type != UFS_CIGAM))
- return 32;
-
- /* This filesystem supported files >2GB. */
- return 64;
- }
-
- return linux_fpathconf (fd, name);
-}
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
deleted file mode 100644
index 1b35dc8..0000000
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Get file-specific information about a file. Linux/Alpha version.
- Copyright (C) 1991,95,96,98,99,2000,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <unistd.h>
-#include <sys/statfs.h>
-
-static long int linux_pathconf (const char *file, int name);
-
-/* Define this first, so it can be inlined. */
-#define __pathconf static linux_pathconf
-#include <sysdeps/unix/sysv/linux/pathconf.c>
-
-
-/* Get file-specific information about FILE. */
-long int
-__pathconf (const char *file, int name)
-{
- if (name == _PC_FILESIZEBITS)
- {
- /* Test whether this is on a ext2 or UFS filesystem which
- support large files. */
- struct statfs fs;
-
- if (__statfs (file, &fs) < 0
- || (fs.f_type != EXT2_SUPER_MAGIC
- && fs.f_type != UFS_MAGIC
- && fs.f_type != UFS_CIGAM))
- return 32;
-
- /* This filesystem supported files >2GB. */
- return 64;
- }
-
- return linux_pathconf (file, name);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfe08a2c2a29a3b80a3773d649a551973d17a544
commit cfe08a2c2a29a3b80a3773d649a551973d17a544
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 16 22:09:41 2002 +0000
2002-10-16 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
* sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
* sysdeps/unix/sysv/linux/pathconf.h: New file.
(statfs_link_max): New function, guts from fpathconf.c.
* sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
* sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
* sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
to use the linux/pathconf.c code by #include rather than duplication.
* sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
index 1820e5b..a8a24de 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1996,1998,2000,2002 Free Software Foundation, Inc.
+/* Get file-specific information about a descriptor. Linux/Alpha version.
+ Copyright (C) 1991,95,96,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,36 +17,25 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <errno.h>
-#include <stddef.h>
#include <unistd.h>
-#include <limits.h>
#include <sys/statfs.h>
-#include <linux_fsinfo.h>
+static long int linux_fpathconf (int fd, int name);
-/* The Linux kernel header mentioned this as a kind of generic value. */
-#define LINUX_LINK_MAX 127
+/* Define this first, so it can be inlined. */
+#define __fpathconf static linux_fpathconf
+#include <sysdeps/unix/sysv/linux/fpathconf.c>
-static long int default_fpathconf (int fd, int name);
-/* Get file-specific information about descriptor FD. */
+/* Get file-specific information about FD. */
long int
-__fpathconf (fd, name)
- int fd;
- int name;
+__pathconf (int fd, int name)
{
- if (fd < 0)
- {
- __set_errno (EBADF);
- return -1;
- }
-
if (name == _PC_FILESIZEBITS)
{
- /* Test whether this is on a ext2 filesystem which supports large
- files. */
+ /* Test whether this is on a ext2 or UFS filesystem which
+ support large files. */
struct statfs fs;
if (__fstatfs (fd, &fs) < 0
@@ -57,56 +47,6 @@ __fpathconf (fd, name)
/* This filesystem supported files >2GB. */
return 64;
}
- if (name == _PC_LINK_MAX)
- {
- struct statfs fsbuf;
-
- /* Determine the filesystem type. */
- if (__fstatfs (fd, &fsbuf) < 0)
- /* not possible, return the default value. */
- return LINUX_LINK_MAX;
-
- switch (fsbuf.f_type)
- {
- case EXT2_SUPER_MAGIC:
- return EXT2_LINK_MAX;
-
- case MINIX_SUPER_MAGIC:
- case MINIX_SUPER_MAGIC2:
- return MINIX_LINK_MAX;
-
- case MINIX2_SUPER_MAGIC:
- case MINIX2_SUPER_MAGIC2:
- return MINIX2_LINK_MAX;
-
- case XENIX_SUPER_MAGIC:
- return XENIX_LINK_MAX;
- case SYSV4_SUPER_MAGIC:
- case SYSV2_SUPER_MAGIC:
- return SYSV_LINK_MAX;
-
- case COH_SUPER_MAGIC:
- return COH_LINK_MAX;
-
- case UFS_MAGIC:
- case UFS_CIGAM:
- return UFS_LINK_MAX;
-
- case REISERFS_SUPER_MAGIC:
- return REISERFS_LINK_MAX;
-
- case XFS_SUPER_MAGIC:
- return XFS_LINK_MAX;
-
- default:
- return LINUX_LINK_MAX;
- }
- }
-
- /* Fallback to the generic version. */
- return default_fpathconf (fd, name);
+ return linux_fpathconf (fd, name);
}
-
-#define __fpathconf static default_fpathconf
-#include <sysdeps/posix/fpathconf.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index 45c1724..1b35dc8 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+/* Get file-specific information about a file. Linux/Alpha version.
+ Copyright (C) 1991,95,96,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,24 +17,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <errno.h>
-#include <stddef.h>
#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
#include <sys/statfs.h>
-#include <linux_fsinfo.h>
+static long int linux_pathconf (const char *file, int name);
+/* Define this first, so it can be inlined. */
+#define __pathconf static linux_pathconf
+#include <sysdeps/unix/sysv/linux/pathconf.c>
-/* The Linux kernel header mentioned this as a kind of generic value. */
-#define LINUX_LINK_MAX 127
-static long int default_pathconf (const char *path, int name);
-
-/* Get file-specific information about PATH. */
+/* Get file-specific information about FILE. */
long int
-__pathconf (const char *path, int name)
+__pathconf (const char *file, int name)
{
if (name == _PC_FILESIZEBITS)
{
@@ -41,7 +37,7 @@ __pathconf (const char *path, int name)
support large files. */
struct statfs fs;
- if (__statfs (path, &fs) < 0
+ if (__statfs (file, &fs) < 0
|| (fs.f_type != EXT2_SUPER_MAGIC
&& fs.f_type != UFS_MAGIC
&& fs.f_type != UFS_CIGAM))
@@ -50,50 +46,6 @@ __pathconf (const char *path, int name)
/* This filesystem supported files >2GB. */
return 64;
}
- if (name == _PC_LINK_MAX)
- {
- struct statfs fsbuf;
-
- /* Determine the filesystem type. */
- if (__statfs (path, &fsbuf) < 0)
- /* not possible, return the default value. */
- return LINUX_LINK_MAX;
-
- switch (fsbuf.f_type)
- {
- case EXT2_SUPER_MAGIC:
- return EXT2_LINK_MAX;
-
- case MINIX_SUPER_MAGIC:
- case MINIX_SUPER_MAGIC2:
- return MINIX_LINK_MAX;
-
- case MINIX2_SUPER_MAGIC:
- case MINIX2_SUPER_MAGIC2:
- return MINIX2_LINK_MAX;
-
- case XENIX_SUPER_MAGIC:
- return XENIX_LINK_MAX;
- case SYSV4_SUPER_MAGIC:
- case SYSV2_SUPER_MAGIC:
- return SYSV_LINK_MAX;
-
- case COH_SUPER_MAGIC:
- return COH_LINK_MAX;
-
- case UFS_MAGIC:
- case UFS_CIGAM:
- return UFS_LINK_MAX;
-
- default:
- return LINUX_LINK_MAX;
- }
- }
-
- /* Fallback to the generic version. */
- return default_pathconf (path, name);
+ return linux_pathconf (file, name);
}
-
-#define __pathconf static default_pathconf
-#include <sysdeps/posix/pathconf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a52739414798c58bf90239a3b354ed0e948559f7
commit a52739414798c58bf90239a3b354ed0e948559f7
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 16 01:02:28 2002 +0000
2002-10-15 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Use size_t
instead of int for msg_iovlen, instead of socklen_t for msg_controllen.
Other than the previously incorrect sign of msg_iovlen, this is a
no-op on 32-bit platforms. On 64-bit platforms it makes this header
match their layouts as well, so the following are now identical to it.
* sysdeps/unix/sysv/linux/s390/bits/socket.h: File removed.
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/socket.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/socket.h: File removed.
* sysdeps/unix/sysv/linux/alpha/bits/socket.h: File removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
deleted file mode 100644
index 82c4302..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/* System-specific socket constants and types. Linux/Alpha version.
- Copyright (C) 1991,1992,1994-1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef __BITS_SOCKET_H
-#define __BITS_SOCKET_H
-
-#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
-# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
-#endif
-
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#include <limits.h>
-#include <sys/types.h>
-
-/* Type for length arguments in socket calls. */
-#ifndef __socklen_t_defined
-typedef __socklen_t socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets. */
-enum __socket_type
-{
- SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
- byte streams. */
-#define SOCK_STREAM SOCK_STREAM
- SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
- of fixed maximum length. */
-#define SOCK_DGRAM SOCK_DGRAM
- SOCK_RAW = 3, /* Raw protocol interface. */
-#define SOCK_RAW SOCK_RAW
- SOCK_RDM = 4, /* Reliably-delivered messages. */
-#define SOCK_RDM SOCK_RDM
- SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
- datagrams of fixed maximum length. */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
- SOCK_PACKET = 10 /* Linux specific way of getting packets
- at the dev level. For writing rarp and
- other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-};
-
-/* Protocol families. */
-#define PF_UNSPEC 0 /* Unspecified. */
-#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
-#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
-#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
-#define PF_INET 2 /* IP protocol family. */
-#define PF_AX25 3 /* Amateur Radio AX.25. */
-#define PF_IPX 4 /* Novell Internet Protocol. */
-#define PF_APPLETALK 5 /* Appletalk DDP. */
-#define PF_NETROM 6 /* Amateur radio NetROM. */
-#define PF_BRIDGE 7 /* Multiprotocol bridge. */
-#define PF_ATMPVC 8 /* ATM PVCs. */
-#define PF_X25 9 /* Reserved for X.25 project. */
-#define PF_INET6 10 /* IP version 6. */
-#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
-#define PF_DECnet 12 /* Reserved for DECnet project. */
-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
-#define PF_SECURITY 14 /* Security callback pseudo AF. */
-#define PF_KEY 15 /* PF_KEY key management API. */
-#define PF_NETLINK 16
-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
-#define PF_PACKET 17 /* Packet family. */
-#define PF_ASH 18 /* Ash. */
-#define PF_ECONET 19 /* Acorn Econet. */
-#define PF_ATMSVC 20 /* ATM SVCs. */
-#define PF_SNA 22 /* Linux SNA Project */
-#define PF_IRDA 23 /* IRDA sockets. */
-#define PF_PPPOX 24 /* PPPoX sockets. */
-#define PF_WANPIPE 25 /* Wanpipe API sockets. */
-#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
-#define PF_MAX 32 /* For now.. */
-
-/* Address families. */
-#define AF_UNSPEC PF_UNSPEC
-#define AF_LOCAL PF_LOCAL
-#define AF_UNIX PF_UNIX
-#define AF_FILE PF_FILE
-#define AF_INET PF_INET
-#define AF_AX25 PF_AX25
-#define AF_IPX PF_IPX
-#define AF_APPLETALK PF_APPLETALK
-#define AF_NETROM PF_NETROM
-#define AF_BRIDGE PF_BRIDGE
-#define AF_ATMPVC PF_ATMPVC
-#define AF_X25 PF_X25
-#define AF_INET6 PF_INET6
-#define AF_ROSE PF_ROSE
-#define AF_DECnet PF_DECnet
-#define AF_NETBEUI PF_NETBEUI
-#define AF_SECURITY PF_SECURITY
-#define AF_KEY PF_KEY
-#define AF_NETLINK PF_NETLINK
-#define AF_ROUTE PF_ROUTE
-#define AF_PACKET PF_PACKET
-#define AF_ASH PF_ASH
-#define AF_ECONET PF_ECONET
-#define AF_ATMSVC PF_ATMSVC
-#define AF_SNA PF_SNA
-#define AF_IRDA PF_IRDA
-#define AF_PPPOX PF_PPPOX
-#define AF_WANPIPE PF_WANPIPE
-#define AF_BLUETOOTH PF_BLUETOOTH
-#define AF_MAX PF_MAX
-
-/* Socket level values. Others are defined in the appropriate headers.
-
- XXX These definitions also should go into the appropriate headers as
- far as they are available. */
-#define SOL_RAW 255
-#define SOL_DECNET 261
-#define SOL_X25 262
-#define SOL_PACKET 263
-#define SOL_ATM 264 /* ATM layer (cell level). */
-#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
-#define SOL_IRDA 266
-
-/* Maximum queue length specifiable by listen. */
-#define SOMAXCONN 128
-
-/* Get the definition of the macro to define the common sockaddr members. */
-#include <bits/sockaddr.h>
-
-/* Structure describing a generic socket address. */
-struct sockaddr
- {
- __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
- char sa_data[14]; /* Address data. */
- };
-
-
-/* Structure large enough to hold any socket address (with the historical
- exception of AF_UNIX). We reserve 128 bytes. */
-#if ULONG_MAX > 0xffffffff
-# define __ss_aligntype __uint64_t
-#else
-# define __ss_aligntype __uint32_t
-#endif
-#define _SS_SIZE 128
-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
-
-struct sockaddr_storage
- {
- __SOCKADDR_COMMON (ss_); /* Address family, etc. */
- __ss_aligntype __ss_align; /* Force desired alignment. */
- char __ss_padding[_SS_PADSIZE];
- };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al. */
-enum
- {
- MSG_OOB = 0x01, /* Process out-of-band data. */
-#define MSG_OOB MSG_OOB
- MSG_PEEK = 0x02, /* Peek at incoming messages. */
-#define MSG_PEEK MSG_PEEK
- MSG_DONTROUTE = 0x04, /* Don't use local routing. */
-#define MSG_DONTROUTE MSG_DONTROUTE
-#ifdef __USE_GNU
- /* DECnet uses a different name. */
- MSG_TRYHARD = MSG_DONTROUTE,
-# define MSG_TRYHARD MSG_DONTROUTE
-#endif
- MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
-#define MSG_CTRUNC MSG_CTRUNC
- MSG_PROXY = 0x10, /* Supply or ask second address. */
-#define MSG_PROXY MSG_PROXY
- MSG_TRUNC = 0x20,
-#define MSG_TRUNC MSG_TRUNC
- MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
-#define MSG_DONTWAIT MSG_DONTWAIT
- MSG_EOR = 0x80, /* End of record. */
-#define MSG_EOR MSG_EOR
- MSG_WAITALL = 0x100, /* Wait for a full request. */
-#define MSG_WAITALL MSG_WAITALL
- MSG_FIN = 0x200,
-#define MSG_FIN MSG_FIN
- MSG_SYN = 0x400,
-#define MSG_SYN MSG_SYN
- MSG_CONFIRM = 0x800, /* Confirm path validity. */
-#define MSG_CONFIRM MSG_CONFIRM
- MSG_RST = 0x1000,
-#define MSG_RST MSG_RST
- MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
-#define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
-#define MSG_NOSIGNAL MSG_NOSIGNAL
- MSG_MORE = 0x8000 /* Sender will send more. */
-#define MSG_MORE MSG_MORE
- };
-
-
-/* Structure describing messages sent by
- `sendmsg' and received by `recvmsg'. */
-struct msghdr
- {
- void *msg_name; /* Address to send to/receive from. */
- socklen_t msg_namelen; /* Length of address data. */
-
- struct iovec *msg_iov; /* Vector of data to send/receive into. */
- size_t msg_iovlen; /* Number of elements in the vector. */
-
- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- size_t msg_controllen; /* Ancillary data buffer length. */
-
- int msg_flags; /* Flags on received message. */
- };
-
-/* Structure used for storage of ancillary data object information. */
-struct cmsghdr
- {
- size_t cmsg_len; /* Length of data in cmsg_data plus length
- of cmsghdr structure. */
- int cmsg_level; /* Originating protocol. */
- int cmsg_type; /* Protocol specific type. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
- __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
-#endif
- };
-
-/* Ancillary data object manipulation macros. */
-#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
- ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
-#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- & (size_t) ~(sizeof (size_t) - 1))
-#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
- + CMSG_ALIGN (sizeof (struct cmsghdr)))
-#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
-extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
- struct cmsghdr *__cmsg) __THROW;
-#ifdef __USE_EXTERN_INLINES
-# ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
-# endif
-_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
-{
- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- /* The kernel header does this so there may be a reason. */
- return 0;
-
- __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
- + CMSG_ALIGN (__cmsg->cmsg_len));
- if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
- + __mhdr->msg_controllen)
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
- /* No more entries. */
- return 0;
- return __cmsg;
-}
-#endif /* Use `extern inline'. */
-
-/* Socket level message types. This must match the definitions in
- <linux/socket.h>. */
-enum
- {
- SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
-#define SCM_RIGHTS SCM_RIGHTS
-#ifdef __USE_BSD
- SCM_CREDENTIALS = 0x02, /* Credentials passing. */
-# define SCM_CREDENTIALS SCM_CREDENTIALS
-#endif
- __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
- };
-
-/* User visible structure for SCM_CREDENTIALS message */
-
-struct ucred
-{
- pid_t pid; /* PID of sending process. */
- uid_t uid; /* UID of sending process. */
- gid_t gid; /* GID of sending process. */
-};
-
-/* Get socket manipulation related informations from kernel headers. */
-#include <asm/socket.h>
-
-
-/* Structure used to manipulate the SO_LINGER option. */
-struct linger
- {
- int l_onoff; /* Nonzero to linger on close. */
- int l_linger; /* Time to linger. */
- };
-
-#endif /* bits/socket.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac33e75b3e8833e7cb30dacd1813e71ce4a57825
commit ac33e75b3e8833e7cb30dacd1813e71ce4a57825
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 16 01:02:24 2002 +0000
2002-10-15 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/bits/resource.h: Replaced with the contents
of the sysdeps/unix/sysv/linux/i386/bits/resource.h file.
All the following files were identical or equivalent to it.
* sysdeps/unix/sysv/linux/i386/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/arm/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/cris/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/hppa/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/ia64/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/m68k/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/powerpc/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/s390/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/sh/bits/resource.h: File removed.
* sysdeps/unix/sysv/linux/x86_64/bits/resource.h: File removed.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h
deleted file mode 100644
index 3da13be..0000000
--- a/sysdeps/unix/sysv/linux/arm/bits/resource.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Bit values & structures for resource limits. Linux/Arm version.
- Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_RESOURCE_H
-# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Transmute defines to enumerations. The macro re-definitions are
- necessary because some programs want to test for operating system
- features with #ifdef RUSAGE_SELF. In ISO C the reflexive
- definition is a no-op. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
-{
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU = 0,
-#define RLIMIT_CPU RLIMIT_CPU
-
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE = 1,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
-
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA = 2,
-#define RLIMIT_DATA RLIMIT_DATA
-
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK = 3,
-#define RLIMIT_STACK RLIMIT_STACK
-
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE = 4,
-#define RLIMIT_CORE RLIMIT_CORE
-
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
-
- /* Number of open files. */
- RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
-
- /* Address space limit. */
- RLIMIT_AS = 9,
-#define RLIMIT_AS RLIMIT_AS
-
- /* Number of processes. */
- RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
-
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- /* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
-
- RLIMIT_NLIMITS = 11,
- RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
-};
-
-/* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((unsigned long int)(~0UL))
-#else
-# define RLIM_INFINITY 0xffffffffffffffffuLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0xffffffffffffffffuLL
-#endif
-
-/* We can represent all limits. */
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-
-/* Type for resource quantity measurement. */
-#ifndef __USE_FILE_OFFSET64
-typedef __rlim_t rlim_t;
-#else
-typedef __rlim64_t rlim_t;
-#endif
-#ifdef __USE_LARGEFILE64
-typedef __rlim64_t rlim64_t;
-#endif
-
-struct rlimit
- {
- /* The current (soft) limit. */
- rlim_t rlim_cur;
- /* The hard limit. */
- rlim_t rlim_max;
- };
-
-#ifdef __USE_LARGEFILE64
-struct rlimit64
- {
- /* The current (soft) limit. */
- rlim64_t rlim_cur;
- /* The hard limit. */
- rlim64_t rlim_max;
- };
-#endif
-
-/* Whose usage statistics do you want? */
-enum __rusage_who
-{
- /* The calling process. */
- RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
-
- /* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
-};
-
-#define __need_timeval
-#include <bits/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
-
-/* Priority limits. */
-#define PRIO_MIN -20 /* Minimum priority a process can have. */
-#define PRIO_MAX 20 /* Maximum priority a process can have. */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
- indicating what flavor of entity the WHO argument specifies. */
-enum __priority_which
-{
- PRIO_PROCESS = 0, /* WHO is a process ID. */
-#define PRIO_PROCESS PRIO_PROCESS
- PRIO_PGRP = 1, /* WHO is a process group ID. */
-#define PRIO_PGRP PRIO_PGRP
- PRIO_USER = 2 /* WHO is a user ID. */
-#define PRIO_USER PRIO_USER
-};
diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h
deleted file mode 100644
index 09c1b7e..0000000
--- a/sysdeps/unix/sysv/linux/cris/bits/resource.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Bit values & structures for resource limits. Linux/CRIS version.
- Copyright (C) 1994,1996,1997,1998,1999,2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_RESOURCE_H
-# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Transmute defines to enumerations. The macro re-definitions are
- necessary because some programs want to test for operating system
- features with #ifdef RUSAGE_SELF. In ISO C the reflexive
- definition is a no-op. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
-{
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU = 0,
-#define RLIMIT_CPU RLIMIT_CPU
-
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE = 1,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
-
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA = 2,
-#define RLIMIT_DATA RLIMIT_DATA
-
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK = 3,
-#define RLIMIT_STACK RLIMIT_STACK
-
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE = 4,
-#define RLIMIT_CORE RLIMIT_CORE
-
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
-
- /* Number of open files. */
- RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
-
- /* Address space limit. */
- RLIMIT_AS = 9,
-#define RLIMIT_AS RLIMIT_AS
-
- /* Number of processes. */
- RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
-
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- /* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
-
- RLIMIT_NLIMITS = 11,
- RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
-};
-
-/* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((unsigned long int)(~0UL))
-#else
-# define RLIM_INFINITY 0xffffffffffffffffuLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0xffffffffffffffffuLL
-#endif
-
-/* We can represent all limits. */
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-
-/* Type for resource quantity measurement. */
-#ifndef __USE_FILE_OFFSET64
-typedef __rlim_t rlim_t;
-#else
-typedef __rlim64_t rlim_t;
-#endif
-#ifdef __USE_LARGEFILE64
-typedef __rlim64_t rlim64_t;
-#endif
-
-struct rlimit
- {
- /* The current (soft) limit. */
- rlim_t rlim_cur;
- /* The hard limit. */
- rlim_t rlim_max;
- };
-
-#ifdef __USE_LARGEFILE64
-struct rlimit64
- {
- /* The current (soft) limit. */
- rlim64_t rlim_cur;
- /* The hard limit. */
- rlim64_t rlim_max;
- };
-#endif
-
-/* Whose usage statistics do you want? */
-enum __rusage_who
-{
- /* The calling process. */
- RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
-
- /* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
-};
-
-#define __need_timeval
-#include <bits/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
-
-/* Priority limits. */
-#define PRIO_MIN -20 /* Minimum priority a process can have. */
-#define PRIO_MAX 20 /* Maximum priority a process can have. */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
- indicating what flavor of entity the WHO argument specifies. */
-enum __priority_which
-{
- PRIO_PROCESS = 0, /* WHO is a process ID. */
-#define PRIO_PROCESS PRIO_PROCESS
- PRIO_PGRP = 1, /* WHO is a process group ID. */
-#define PRIO_PGRP PRIO_PGRP
- PRIO_USER = 2 /* WHO is a user ID. */
-#define PRIO_USER PRIO_USER
-};
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h
deleted file mode 100644
index 2e4958b..0000000
--- a/sysdeps/unix/sysv/linux/hppa/bits/resource.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Bit values & structures for resource limits. Linux/HPPA version.
- Copyright (C) 1994-99, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_RESOURCE_H
-# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Transmute defines to enumerations. The macro re-definitions are
- necessary because some programs want to test for operating system
- features with #ifdef RUSAGE_SELF. In ISO C the reflexive
- definition is a no-op. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
-{
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU = 0,
-#define RLIMIT_CPU RLIMIT_CPU
-
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE = 1,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
-
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA = 2,
-#define RLIMIT_DATA RLIMIT_DATA
-
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK = 3,
-#define RLIMIT_STACK RLIMIT_STACK
-
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE = 4,
-#define RLIMIT_CORE RLIMIT_CORE
-
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
-
- /* Number of open files. */
- RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
-
- /* Address space limit. */
- RLIMIT_AS = 9,
-#define RLIMIT_AS RLIMIT_AS
-
- /* Number of processes. */
- RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
-
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- /* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
-
- RLIMIT_NLIMITS = 11,
- RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
-};
-
-/* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((unsigned long int)(~0UL))
-#else
-# define RLIM_INFINITY 0xffffffffffffffffuLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0xffffffffffffffffuLL
-#endif
-
-/* We can represent all limits. */
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-
-/* Type for resource quantity measurement. */
-#ifndef __USE_FILE_OFFSET64
-typedef __rlim_t rlim_t;
-#else
-typedef __rlim64_t rlim_t;
-#endif
-#ifdef __USE_LARGEFILE64
-typedef __rlim64_t rlim64_t;
-#endif
-
-struct rlimit
- {
- /* The current (soft) limit. */
- rlim_t rlim_cur;
- /* The hard limit. */
- rlim_t rlim_max;
- };
-
-#ifdef __USE_LARGEFILE64
-struct rlimit64
- {
- /* The current (soft) limit. */
- rlim64_t rlim_cur;
- /* The hard limit. */
- rlim64_t rlim_max;
- };
-#endif
-
-/* Whose usage statistics do you want? */
-enum __rusage_who
-{
- /* The calling process. */
- RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
-
- /* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
-};
-
-#define __need_timeval
-#include <bits/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
-
-/* Priority limits. */
-#define PRIO_MIN -20 /* Minimum priority a process can have. */
-#define PRIO_MAX 20 /* Maximum priority a process can have. */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
- indicating what flavor of entity the WHO argument specifies. */
-enum __priority_which
-{
- PRIO_PROCESS = 0, /* WHO is a process ID. */
-#define PRIO_PROCESS PRIO_PROCESS
- PRIO_PGRP = 1, /* WHO is a process group ID. */
-#define PRIO_PGRP PRIO_PGRP
- PRIO_USER = 2 /* WHO is a user ID. */
-#define PRIO_USER PRIO_USER
-};
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/resource.h b/sysdeps/unix/sysv/linux/m68k/bits/resource.h
deleted file mode 100644
index e6fa04a..0000000
--- a/sysdeps/unix/sysv/linux/m68k/bits/resource.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Bit values & structures for resource limits. Linux/m68k version.
- Copyright (C) 1994,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_RESOURCE_H
-# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
-#endif
-
-#include <bits/types.h>
-
-/* Transmute defines to enumerations. The macro re-definitions are
- necessary because some programs want to test for operating system
- features with #ifdef RUSAGE_SELF. In ISO C the reflexive
- definition is a no-op. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
-{
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU = 0,
-#define RLIMIT_CPU RLIMIT_CPU
-
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE = 1,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
-
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA = 2,
-#define RLIMIT_DATA RLIMIT_DATA
-
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK = 3,
-#define RLIMIT_STACK RLIMIT_STACK
-
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE = 4,
-#define RLIMIT_CORE RLIMIT_CORE
-
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS = 5,
-#define RLIMIT_RSS RLIMIT_RSS
-
- /* Number of open files. */
- RLIMIT_NOFILE = 7,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
-
- /* Address space limit. */
- RLIMIT_AS = 9,
-#define RLIMIT_AS RLIMIT_AS
-
- /* Number of processes. */
- RLIMIT_NPROC = 6,
-#define RLIMIT_NPROC RLIMIT_NPROC
-
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK = 8,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- /* Maximum number of file locks. */
- RLIMIT_LOCKS = 10,
-#define RLIMIT_LOCKS RLIMIT_LOCKS
-
- RLIMIT_NLIMITS = 11,
- RLIM_NLIMITS = RLIMIT_NLIMITS
-#define RLIMIT_NLIMITS RLIMIT_NLIMITS
-#define RLIM_NLIMITS RLIM_NLIMITS
-};
-
-/* Value to indicate that there is no limit. */
-#ifndef __USE_FILE_OFFSET64
-# define RLIM_INFINITY ((unsigned long int)(~0UL))
-#else
-# define RLIM_INFINITY 0xffffffffffffffffuLL
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0xffffffffffffffffuLL
-#endif
-
-/* We can represent all limits. */
-#define RLIM_SAVED_MAX RLIM_INFINITY
-#define RLIM_SAVED_CUR RLIM_INFINITY
-
-
-/* Type for resource quantity measurement. */
-#ifndef __USE_FILE_OFFSET64
-typedef __rlim_t rlim_t;
-#else
-typedef __rlim64_t rlim_t;
-#endif
-#ifdef __USE_LARGEFILE64
-typedef __rlim64_t rlim64_t;
-#endif
-
-struct rlimit
- {
- /* The current (soft) limit. */
- rlim_t rlim_cur;
- /* The hard limit. */
- rlim_t rlim_max;
- };
-
-#ifdef __USE_LARGEFILE64
-struct rlimit64
- {
- /* The current (soft) limit. */
- rlim64_t rlim_cur;
- /* The hard limit. */
- rlim64_t rlim_max;
- };
-#endif
-
-/* Whose usage statistics do you want? */
-enum __rusage_who
-{
- /* The calling process. */
- RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
-
- /* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1,
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
-
- /* Both. */
- RUSAGE_BOTH = -2
-#define RUSAGE_BOTH RUSAGE_BOTH
-};
-
-#define __need_timeval
-#include <bits/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
-
-/* Priority limits. */
-#define PRIO_MIN -20 /* Minimum priority a process can have. */
-#define PRIO_MAX 20 /* Maximum priority a process can have. */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
- indicating what flavor of entity the WHO argument specifies. */
-enum __priority_which
-{
- PRIO_PROCESS = 0, /* WHO is a process ID. */
-#define PRIO_PROCESS PRIO_PROCESS
- PRIO_PGRP = 1, /* WHO is a process group ID. */
-#define PRIO_PGRP PRIO_PGRP
- PRIO_USER = 2 /* WHO is a user ID. */
-#define PRIO_USER PRIO_USER
-};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd4fba2b2bc20a631839ae39681610201ea2468d
commit cd4fba2b2bc20a631839ae39681610201ea2468d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 16 00:36:59 2002 +0000
(__fpathconf): Add support for reiserfs and xfs.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
index a7425d7..1820e5b 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1998,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -93,6 +93,12 @@ __fpathconf (fd, name)
case UFS_CIGAM:
return UFS_LINK_MAX;
+ case REISERFS_SUPER_MAGIC:
+ return REISERFS_LINK_MAX;
+
+ case XFS_SUPER_MAGIC:
+ return XFS_LINK_MAX;
+
default:
return LINUX_LINK_MAX;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75380e2be2f3dbbc8ba547d77ce22ad70994c202
commit 75380e2be2f3dbbc8ba547d77ce22ad70994c202
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 14 17:26:14 2002 +0000
(profil_counter): Add hack to prevent the compiler from clobbering the signal
context.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index 5d8be9d..7639883 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/ARM version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,4 +29,9 @@ profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc)
else
pc = (void *) sc.v21.arm_pc;
profil_count (pc);
+
+ /* This is a hack to prevent the compiler from implementing the
+ above function call as a sibcall. The sibcall would overwrite
+ the signal context. */
+ asm volatile ("");
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f51d25319152c18899334ae52045f84578e2ea86
commit f51d25319152c18899334ae52045f84578e2ea86
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 14 08:59:01 2002 +0000
Regenerated.
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index 1c18909..e2091f8 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -1,61 +1,18 @@
# Begin of automatic generation
-# asin
-Test "asin (-0.5) == -pi/6":
-float: 2
-ifloat: 2
-Test "asin (0.5) == pi/6":
-float: 2
-ifloat: 2
-Test "asin (0.7) == 0.77539749661075306374035335271498708":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
-
# atan2
-Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 3
ifloat: 3
-Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 3
ifloat: 3
-Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
-float: 4
-ifloat: 4
-
-# atanh
-Test "atanh (0.7) == 0.8673005276940531944":
-double: 1
-idouble: 1
-
-# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
-double: 1
-idouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
float: 1
ifloat: 1
-# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
float: 1
ifloat: 1
@@ -70,20 +27,12 @@ double: 1
float: 3
idouble: 1
ifloat: 3
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
# casinh
@@ -97,11 +46,13 @@ double: 3
float: 6
idouble: 3
ifloat: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
double: 1
-idouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
+idouble: 1
ifloat: 1
# catan
@@ -113,12 +64,9 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
+Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
float: 4
ifloat: 4
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
-double: 1
-idouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
@@ -127,20 +75,21 @@ idouble: 4
Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
float: 4
ifloat: 4
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
double: 1
-float: 6
idouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+float: 6
ifloat: 6
# cbrt
Test "cbrt (-27.0) == -3.0":
double: 1
idouble: 1
-Test "cbrt (0.970299) == 0.99":
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
double: 1
idouble: 1
@@ -148,12 +97,14 @@ idouble: 1
Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
float: 1
ifloat: 1
-Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
-double: 1
-idouble: 1
-Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
# ccosh
Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
@@ -162,34 +113,30 @@ ifloat: 1
Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
float: 1
ifloat: 1
-Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
-double: 1
-idouble: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
# cexp
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
-double: 1
float: 3
-idouble: 1
ifloat: 3
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -227,14 +174,9 @@ ifloat: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
-double: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 1
-idouble: 1
ifloat: 1
-Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
-double: 1
-idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -249,28 +191,39 @@ float: 1
ifloat: 1
# cos
-Test "cos (0.7) == 0.76484218728448842625585999019186495":
+Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "cos (M_PI_6l * 2.0) == 0.5":
-double: 1
-float: 0.5
-idouble: 1
-ifloat: 0.5
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
idouble: 2
ifloat: 1
Test "cos (pi/2) == 0":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
@@ -285,19 +238,14 @@ float: 2
idouble: 2
ifloat: 2
-# csin
-Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
-float: 1
-ifloat: 1
-
# csinh
Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
double: 1
idouble: 1
-Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
@@ -308,27 +256,14 @@ ifloat: 1
Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
-float: 1
-ifloat: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
double: 1
idouble: 1
-Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
-float: 1
idouble: 1
-ifloat: 1
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
@@ -339,34 +274,22 @@ ifloat: 2
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
-Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
# erfc
-Test "erfc (0.7) == 0.32219880616258152702":
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
double: 1
idouble: 1
-Test "erfc (1.2) == 0.089686021770364619762":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-Test "erfc (2.0) == 0.0046777349810472658379":
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
double: 1
idouble: 1
-Test "erfc (4.1) == 0.67000276540848983727e-8":
-double: 24
-float: 12
-idouble: 24
-ifloat: 12
# exp10
Test "exp10 (-1) == 0.1":
@@ -374,8 +297,10 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "exp10 (3) == 1000":
double: 6
@@ -384,32 +309,13 @@ idouble: 6
ifloat: 2
# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
Test "expm1 (1) == M_El - 1.0":
float: 1
ifloat: 1
-# fmod
-Test "fmod (-6.5, -2.3) == -1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (-6.5, 2.3) == -1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (6.5, -2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (6.5, 2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
@@ -426,9 +332,6 @@ ifloat: 1
Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
-double: 1
-idouble: 1
Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -440,95 +343,110 @@ float: 1
ifloat: 1
# j0
-Test "j0 (10.0) == -0.24593576445134833520":
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "j0 (2.0) == 0.22389077914123566805":
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
-Test "j0 (8.0) == 0.17165080713755390609":
-float: 1
-ifloat: 1
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
-double: 1
-float: 1
+float: 1
idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
+ifloat: 1
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
# j1
-Test "j1 (10.0) == 0.043472746168861436670":
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-Test "j1 (2.0) == 0.57672480775687338720":
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
-Test "j1 (8.0) == 0.23463634685391462438":
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
# jn
-Test "jn (0, 10.0) == -0.24593576445134833520":
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "jn (0, 2.0) == 0.22389077914123566805":
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
-Test "jn (0, 8.0) == 0.17165080713755390609":
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
-Test "jn (1, 10.0) == 0.043472746168861436670":
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-Test "jn (1, 2.0) == 0.57672480775687338720":
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
-Test "jn (1, 8.0) == 0.23463634685391462438":
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
-Test "jn (10, 0.1) == 0.26905328954342155795e-19":
-double: 6
-float: 4
-idouble: 6
-ifloat: 4
-Test "jn (10, 0.7) == 0.75175911502153953928e-11":
-double: 3
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
float: 1
-idouble: 3
+idouble: 1
+ifloat: 1
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
ifloat: 1
-Test "jn (10, 10.0) == 0.20748610663335885770":
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 4
float: 3
idouble: 4
ifloat: 3
-Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 4
ifloat: 4
-Test "jn (3, 0.1) == 0.000020820315754756261429":
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
+float: 1
idouble: 1
-Test "jn (3, 0.7) == 0.0069296548267508408077":
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-Test "jn (3, 10.0) == 0.058379379305186812343":
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "jn (3, 2.0) == 0.12894324947440205110":
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
double: 1
float: 2
idouble: 1
@@ -546,87 +464,45 @@ float: 2
idouble: 1
ifloat: 2
-# log
-Test "log (0.7) == -0.35667494393873237891263871124118447":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
# log10
-Test "log10 (0.7) == -0.15490195998574316929":
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
-# log2
-Test "log2 (0.7) == -0.51457317282975824043":
-double: 1
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
-idouble: 1
ifloat: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
-double: 1
-float: 0.5
-idouble: 1
-ifloat: 0.5
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
-Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
-float: 1
-ifloat: 1
-
-# sinh
-Test "sinh (0.7) == 0.75858370183953350346":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
# tan
Test "tan (pi/4) == 1":
-double: 0.5
-idouble: 0.5
-
-# tanh
-Test "tanh (0.7) == 0.60436777711716349631":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-Test "tanh (-0.7) == -0.60436777711716349631":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -644,174 +520,130 @@ idouble: 1
ifloat: 1
# y0
-Test "y0 (0.7) == -0.19066492933739506743":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "y0 (1.0) == 0.088256964215676957983":
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "y0 (1.5) == 0.38244892379775884396":
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "y0 (10.0) == 0.055671167283599391424":
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
-Test "y0 (8.0) == 0.22352148938756622053":
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
# y1
-Test "y1 (0.1) == -6.4589510947020269877":
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
-Test "y1 (0.7) == -1.1032498719076333697":
-double: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
-idouble: 1
ifloat: 1
-Test "y1 (1.5) == -0.41230862697391129595":
-float: 1
-ifloat: 1
-Test "y1 (10.0) == 0.24901542420695388392":
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "y1 (2.0) == -0.10703243154093754689":
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "y1 (8.0) == -0.15806046173124749426":
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
# yn
-Test "yn (0, 0.7) == -0.19066492933739506743":
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "yn (0, 1.0) == 0.088256964215676957983":
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "yn (0, 1.5) == 0.38244892379775884396":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "yn (0, 10.0) == 0.055671167283599391424":
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
-Test "yn (0, 8.0) == 0.22352148938756622053":
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (1, 0.1) == -6.4589510947020269877":
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
-Test "yn (1, 0.7) == -1.1032498719076333697":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "yn (1, 1.5) == -0.41230862697391129595":
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
-Test "yn (1, 10.0) == 0.24901542420695388392":
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "yn (1, 2.0) == -0.10703243154093754689":
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (1, 8.0) == -0.15806046173124749426":
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
-Test "yn (10, 0.1) == -0.11831335132045197885e19":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-Test "yn (10, 0.7) == -0.42447194260703866924e10":
-double: 3
-idouble: 3
-Test "yn (10, 1.0) == -0.12161801427868918929e9":
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
-Test "yn (10, 10.0) == -0.35981415218340272205":
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (10, 2.0) == -129184.54220803928264":
-double: 2
-idouble: 2
-Test "yn (3, 0.1) == -5099.3323786129048894":
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-Test "yn (3, 0.7) == -15.819479052819633505":
-double: 3
-float: 1
-idouble: 3
-ifloat: 1
-Test "yn (3, 10.0) == -0.25136265718383732978":
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (3, 2.0) == -1.1277837768404277861":
-double: 1
-idouble: 1
-
-# Maximal error of functions:
-Function: "asin":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
-
-Function: "atan2":
-float: 4
-ifloat: 4
-
-Function: "atanh":
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
double: 1
idouble: 1
-
-Function: "cabs":
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
double: 1
float: 1
idouble: 1
ifloat: 1
-
-Function: Real part of "cacos":
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "atan2":
+float: 3
+ifloat: 3
-Function: Imaginary part of "cacos":
+Function: "atanh":
float: 1
ifloat: 1
@@ -828,13 +660,9 @@ idouble: 1
ifloat: 3
Function: Real part of "casin":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-
-Function: Imaginary part of "casin":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Function: Real part of "casinh":
@@ -861,14 +689,10 @@ ifloat: 1
Function: Real part of "catanh":
double: 4
-float: 1
idouble: 4
-ifloat: 1
Function: Imaginary part of "catanh":
-double: 1
float: 6
-idouble: 1
ifloat: 6
Function: "cbrt":
@@ -877,12 +701,12 @@ idouble: 1
Function: Real part of "ccos":
double: 1
+float: 1
idouble: 1
+ifloat: 1
Function: Imaginary part of "ccos":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Real part of "ccosh":
@@ -892,31 +716,27 @@ idouble: 1
ifloat: 1
Function: Imaginary part of "ccosh":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Real part of "cexp":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Imaginary part of "cexp":
float: 1
ifloat: 1
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+
Function: Imaginary part of "clog":
-double: 1
float: 3
-idouble: 1
ifloat: 3
Function: Real part of "clog10":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Imaginary part of "clog10":
@@ -932,21 +752,17 @@ idouble: 2
ifloat: 1
Function: Real part of "cpow":
-double: 1
+double: 2
float: 4
-idouble: 1
+idouble: 2
ifloat: 4
Function: Imaginary part of "cpow":
-double: 1.1031
+double: 2
float: 2
-idouble: 1.1031
+idouble: 2
ifloat: 2
-Function: Imaginary part of "csin":
-float: 1
-ifloat: 1
-
Function: Real part of "csinh":
float: 1
ifloat: 1
@@ -958,44 +774,34 @@ idouble: 1
ifloat: 1
Function: Real part of "csqrt":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
-Function: Imaginary part of "csqrt":
float: 1
ifloat: 1
Function: Real part of "ctan":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: Imaginary part of "ctan":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: Real part of "ctanh":
-double: 2
+double: 1
float: 2
-idouble: 2
+idouble: 1
ifloat: 2
Function: Imaginary part of "ctanh":
-double: 2
float: 1
-idouble: 2
ifloat: 1
+Function: "erf":
+double: 1
+idouble: 1
+
Function: "erfc":
-double: 24
-float: 12
-idouble: 24
-ifloat: 12
+double: 1
+idouble: 1
Function: "exp10":
double: 6
@@ -1004,19 +810,13 @@ idouble: 6
ifloat: 2
Function: "expm1":
+double: 1
float: 1
-ifloat: 1
-
-Function: "fmod":
-double: 2
-float: 1
-idouble: 2
+idouble: 1
ifloat: 1
Function: "hypot":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: "j0":
@@ -1032,9 +832,9 @@ idouble: 1
ifloat: 2
Function: "jn":
-double: 6
+double: 4
float: 4
-idouble: 6
+idouble: 4
ifloat: 4
Function: "lgamma":
@@ -1043,28 +843,14 @@ float: 2
idouble: 1
ifloat: 2
-Function: "log":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
Function: "log10":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
Function: "log1p":
-double: 1
float: 1
-idouble: 1
-ifloat: 1
-
-Function: "log2":
-double: 1
-float: 1
-idouble: 1
ifloat: 1
Function: "sincos":
@@ -1073,21 +859,9 @@ float: 1
idouble: 1
ifloat: 1
-Function: "sinh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
Function: "tan":
-double: 0.5
-idouble: 0.5
-
-Function: "tanh":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: "tgamma":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=506ee216c432722336c59e7ca182d956b9f8d56c
commit 506ee216c432722336c59e7ca182d956b9f8d56c
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 14 01:03:03 2002 +0000
2002-10-13 Roland McGrath <roland@frob.com>
* posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
setresgid): Declare them.
* NEWS: Mention it.
* include/unistd.h
(__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
add libc_hidden_proto.
* posix/Versions (libc: GLIBC_2.3.2): New set. Add
getresuid, getresgid, setresuid, setresgid here.
* Versions.def (libc): Define GLIBC_2.3.2 set.
* sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
Add libc_hidden_def.
* sysdeps/generic/getresgid.c (__getresgid): Likewise.
* sysdeps/generic/setresgid.c: New file.
* sysdeps/generic/setresuid.c: New file.
* sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
(sysdep_routines): Don't add getresuid and getresgid here.
* sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
(sysdep_routines): Don't add setresuid and setresgid here.
* sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
* sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
* posix/Makefile (routines): Add them all here instead.
* sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
__getresuid. Add libc_hidden_def for that, and weak alias to old name.
* sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
__getresgid. Add libc_hidden_def for that, and weak alias to old name.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
[! __NR_setresuid]: Include generic file.
* sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
__setresgid. Add libc_hidden_def for that, and weak alias to old name.
[! __NR_setresuid]: Include generic file.
* sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
Caller is - now, not EXTRA.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
(setresuid, setresgid, getresuid, getresgid): Likewise.
* sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
Add these calls here.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 059f753..7c1a0be 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -55,9 +55,6 @@ shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
-getresuid - getresuid 3 getresuid
-getresgid - getresgid 3 getresgid
-
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 1c7a20d..6b18e1f 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -32,8 +32,5 @@ shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
socketpair - socketpair i:iiif __socketpair socketpair
-getresuid - getresuid i:ppp getresuid
-getresgid - getresgid i:ppp getresgid
-
setrlimit - setrlimit i:ip __setrlimit setrlimit
getrlimit - getrlimit i:ip __getrlimit getrlimit
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index fe01d76..07e942d 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -58,8 +58,6 @@ s_getdents getdents getdents i:ipi __syscall_getdents
s_getdents64 getdents getdents64 i:ipi __syscall_getdents64
s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg
s_getpriority getpriority getpriority i:ii __syscall_getpriority
-getresgid - getresgid i:ppp getresgid
-getresuid - getresuid i:ppp getresuid
s_ipc msgget ipc i:iiiip __syscall_ipc
s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a269341005305d69d3f0959b8af9eae9d2e9357
commit 0a269341005305d69d3f0959b8af9eae9d2e9357
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 14 01:02:53 2002 +0000
2002-10-13 Roland McGrath <roland@frob.com>
* posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
setresgid): Declare them.
* NEWS: Mention it.
* include/unistd.h
(__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
add libc_hidden_proto.
* posix/Versions (libc: GLIBC_2.3.2): New set. Add
getresuid, getresgid, setresuid, setresgid here.
* Versions.def (libc): Define GLIBC_2.3.2 set.
* sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
Add libc_hidden_def.
* sysdeps/generic/getresgid.c (__getresgid): Likewise.
* sysdeps/generic/setresgid.c: New file.
* sysdeps/generic/setresuid.c: New file.
* sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
(sysdep_routines): Don't add getresuid and getresgid here.
* sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
(sysdep_routines): Don't add setresuid and setresgid here.
* sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
* sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
* posix/Makefile (routines): Add them all here instead.
* sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
__getresuid. Add libc_hidden_def for that, and weak alias to old name.
* sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
__getresgid. Add libc_hidden_def for that, and weak alias to old name.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
[! __NR_setresuid]: Include generic file.
* sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
__setresgid. Add libc_hidden_def for that, and weak alias to old name.
[! __NR_setresuid]: Include generic file.
* sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
Caller is - now, not EXTRA.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
(setresuid, setresgid, getresuid, getresgid): Likewise.
* sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
Add these calls here.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
(sysdep_routines): Add setfsuid and setfsgid here.
* sysdeps/unix/sysv/linux/arm/Makefile: Not here.
* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
* sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
* sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 6040b20..24c7ee9 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,5 +1,5 @@
ifeq ($(subdir),misc)
-sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm
+sysdep_routines += ioperm
sysdep_headers += sys/elf.h sys/io.h
endif
diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile
index cebaa94..9d02ace 100644
--- a/sysdeps/unix/sysv/linux/cris/Makefile
+++ b/sysdeps/unix/sysv/linux/cris/Makefile
@@ -1,7 +1,3 @@
-ifeq ($(subdir),misc)
-sysdep_routines += setfsgid setfsuid setresgid setresuid
-endif
-
ifeq ($(subdir),signal)
sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 55eeeab..6bb4f6b 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -3,7 +3,7 @@
m68k-syntax-flag = -DMOTOROLA_SYNTAX
ifeq ($(subdir),misc)
-sysdep_routines += mremap setfsgid setfsuid setresgid setresuid
+sysdep_routines += mremap
sysdep_headers += sys/reg.h
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d030d52da237cfe4159a06fe78564368bb837d71
commit d030d52da237cfe4159a06fe78564368bb837d71
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 11 10:51:31 2002 +0000
2002-10-07 Roland McGrath <roland@redhat.com>
* sysdeps/generic/errno.c: New file.
* csu/Makefile (aux): New variable, list errno.
* sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
* sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
* sysdeps/unix/alpha/sysdep.S: Likewise.
* sysdeps/generic/start.c: Likewise.
* sysdeps/unix/start.c: Likewise.
* sysdeps/unix/arm/start.c: Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
* sysdeps/unix/sparc/start.c: Likewise.
* sysdeps/unix/sysv/irix4/start.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 5279b86..05c0091 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -20,19 +20,6 @@
#include <sysdep.h>
#include <features.h>
- .section .bss
- .globl errno
- .align 2
-errno: .space 4
-#ifdef __ELF__
- .type errno, @object
- .size errno, 4
-#endif
- .globl __errno
-__errno = errno
- .globl _errno
-_errno = errno
-
.text
.align 2
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
index a8fea14..6088faa 100644
--- a/sysdeps/unix/arm/start.c
+++ b/sysdeps/unix/arm/start.c
@@ -28,11 +28,6 @@ int __data_start = 0;
weak_alias (__data_start, data_start)
#endif
-#ifndef errno
-volatile int __errno;
-strong_alias (__errno, errno)
-#endif
-
extern void __libc_init __P ((int argc, char **argv, char **envp));
extern int main __P ((int argc, char **argv, char **envp));
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index df86229..c2fc488 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -19,9 +19,6 @@
#include <sysdep.h>
-__errno:
-.comm errno, 4
-
ENTRY(__start)
.set noreorder
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index 719d017..a88d0d4 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -27,9 +27,6 @@
/* The first piece of initialized data. */
int __data_start = 0;
-__volatile int __errno = 0;
-strong_alias (__errno, errno)
-
extern void __libc_init __P ((int argc, char **argv, char **envp));
extern int main __P ((int argc, char **argv, char **envp));
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index 48dcffa..1a4de2a 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -18,13 +18,6 @@
#include <sysdep.h>
-/* We define errno here, to be consistent with Linux/i386. */
- .bss
- .globl C_SYMBOL_NAME(errno)
- .type C_SYMBOL_NAME(errno),%object
- .size C_SYMBOL_NAME(errno),4
-C_SYMBOL_NAME(errno): .zero 4
-weak_alias (errno, _errno)
.text
/* The syscall stubs jump here when they detect an error.
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S
index 64fb850..e53e7bb 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.S
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.S
@@ -18,14 +18,6 @@
#include <sysdep.h>
-/* Make space for the errno variable. */
-
- .globl C_SYMBOL_NAME(errno)
- .type C_SYMBOL_NAME(errno),@object
- .lcomm C_SYMBOL_NAME(errno),4
-
-weak_alias (errno, _errno)
-
/* The syscall stubs jump here when they detect an error, bot for PIC and
non-PIC. */
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index b333b70..bf4d4af 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -28,11 +28,6 @@ __syscall_error (int err_no)
return -1;
}
-/* We also have to have a 'real' definition of errno. */
-#undef errno
-int errno = 0;
-weak_alias (errno, _errno)
-
/* HPPA implements syscall() in 'C'; the assembler version would
typically be in syscall.S. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 628335b..e4ec92d 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -18,19 +18,6 @@
#include <sysdep.h>
-/* The Linux version is in fact m68k/ELF and the start.? file for this
- system (sysdeps/m68k/elf/start.S) is also used by The Hurd. This file
- must not contain the definition of the `errno' variable, we have to
- define it somewhere else.
-
- ...and this place is here. */
- .bss
- .globl errno
- .type errno,@object
-errno: .space 4
- .size errno,4
-weak_alias (errno, _errno)
- .text
/* The following code is only used in the shared library when we
compile the reentrant version. Otherwise each system call defines
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S
deleted file mode 100644
index 2584982..0000000
--- a/sysdeps/unix/sysv/linux/mips/sysdep.S
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-
-/* The Linux version is in fact MIPS/ELF and the start.? file for this
- system (sysdeps/mips/elf/start.S) is also used by The Hurd. This file
- must not contain the definition of the `errno' variable, we have to
- define it somewhere else.
-
- ...and this place is here. */
- .bss
- .globl errno
- .type errno,@object
- .size errno,4
-errno: .word 4
- .text
-weak_alias(errno, _errno)
-
-#include <sysdeps/unix/mips/sysdep.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=402dbb2e81f71e5c0f1bbf04b14a82e7e74b4676
commit 402dbb2e81f71e5c0f1bbf04b14a82e7e74b4676
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 9 09:35:00 2002 +0000
(__writev): Rename to __libc_writev and make old name an alias.
diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c
index 0d5a333..d0e5741 100644
--- a/sysdeps/unix/sysv/aix/writev.c
+++ b/sysdeps/unix/sysv/aix/writev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995-1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,11 +27,12 @@ extern ssize_t kwritev (int fd, const struct iovec *iovp, size_t iovcnt,
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__writev (fd, vector, count)
+__libc_writev (fd, vector, count)
int fd;
const struct iovec *vector;
int count;
{
return kwritev (fd, vector, count, 0);
}
-strong_alias (__writev, writev)
+strong_alias (__libc_writev, __writev)
+weak_alias (__libc_writev, writev)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c45957343f55b91a10bdd376fcbb9ed28eab9c9e
commit c45957343f55b91a10bdd376fcbb9ed28eab9c9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 9 09:28:58 2002 +0000
(waitid): Rename to __waitid and make old name an alias.
diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c
index 36a012e..1d637df 100644
--- a/sysdeps/unix/sysv/aix/waitid.c
+++ b/sysdeps/unix/sysv/aix/waitid.c
@@ -1,5 +1,5 @@
/* Pseudo implementation of waitid.
- Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1997.
@@ -31,7 +31,7 @@ extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options,
struct rusage *ru_loc, siginfo_t *infop);
int
-waitid (idtype, id, infop, options)
+__waitid (idtype, id, infop, options)
idtype_t idtype;
id_t id;
siginfo_t *infop;
@@ -80,3 +80,4 @@ waitid (idtype, id, infop, options)
return 0;
}
+weak_alias (__waitid, waitid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce9fa295f04d169f45415c9585eef3bc72f3fe41
commit ce9fa295f04d169f45415c9585eef3bc72f3fe41
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 9 09:25:29 2002 +0000
(__readv): Rename to __libc_readv and make old name an alias.
diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c
index 8c12690..eddca0f 100644
--- a/sysdeps/unix/sysv/aix/readv.c
+++ b/sysdeps/unix/sysv/aix/readv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995-1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,11 +27,12 @@ extern ssize_t kreadv (int fd, const struct iovec *iovp, size_t iovcnt,
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__readv (fd, vector, count)
+__libc_readv (fd, vector, count)
int fd;
const struct iovec *vector;
int count;
{
return kreadv (fd, vector, count, 0);
}
-strong_alias (__readv, readv)
+strong_alias (__libc_readv, __readv)
+weak_alias (__libc_readv, readv)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d78045b1a279b5fd1de507e6762a14ca07810eb9
commit d78045b1a279b5fd1de507e6762a14ca07810eb9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 3 09:14:46 2002 +0000
Don't access memory beyond the source buffer.
diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S
index 21e94ba..f39c23a 100644
--- a/sysdeps/alpha/alphaev6/stxncpy.S
+++ b/sysdeps/alpha/alphaev6/stxncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
This file is part of the GNU C Library.
@@ -210,35 +210,30 @@ $u_head:
cmpbge zero, t6, t7 # E :
beq a2, $u_eocfin # U :
- nop
+ lda t6, -1 # E :
nop
bne t7, $u_final # U :
- lda t6, -1 # E : mask out the bits we have
- mskql t6, a1, t6 # U : already seen (stall)
+ mskql t6, a1, t6 # U : mask out bits already seen
stq_u t0, 0(a0) # L : store first output word
+ or t6, t2, t2 # E :
- or t6, t2, t2 # E :
- cmpbge zero, t2, t7 # E : find nulls in second partial (stall)
- addq a0, 8, a0 # E :
- subq a2, 1, a2 # E :
-
+ cmpbge zero, t2, t7 # E : find nulls in second partial
+ addq a0, 8, a0 # E :
+ subq a2, 1, a2 # E :
bne t7, $u_late_head_exit # U :
+
/* Finally, we've got all the stupid leading edge cases taken care
of and we can set up to enter the main loop. */
extql t2, a1, t1 # U : position hi-bits of lo word
+ beq a2, $u_eoc # U :
ldq_u t2, 8(a1) # L : read next high-order source word
addq a1, 8, a1 # E :
- cmpbge zero, t2, t7 # E : (stall)
- beq a2, $u_eoc # U :
- nop
- nop
-
- bne t7, $u_eos # e1 :
- nop
- nop
- nop
+ extqh t2, a1, t0 # U : position lo-bits of hi word (stall)
+ cmpbge zero, t2, t7 # E :
+ nop
+ bne t7, $u_eos # U :
/* Unaligned copy main loop. In order to avoid reading too much,
the loop is structured to detect zeros in aligned source words.
@@ -248,6 +243,7 @@ $u_head:
to run as fast as possible.
On entry to this basic block:
+ t0 == the shifted low-order bits from the current source word
t1 == the shifted high-order bits from the previous source word
t2 == the unshifted current source word
@@ -255,25 +251,20 @@ $u_head:
.align 4
$u_loop:
- extqh t2, a1, t0 # U : extract high bits for current word
- addq a1, 8, a1 # E :
- extql t2, a1, t3 # U : extract low bits for next time
+ or t0, t1, t0 # E : current dst word now complete
+ subq a2, 1, a2 # E : decrement word count
+ extql t2, a1, t1 # U : extract high bits for next time
addq a0, 8, a0 # E :
- or t0, t1, t0 # E : current dst word now complete
- ldq_u t2, 0(a1) # U : Latency=3 load high word for next time
- stq_u t0, -8(a0) # U : save the current word (stall)
- mov t3, t1 # E :
+ stq_u t0, -8(a0) # L : save the current word
+ beq a2, $u_eoc # U :
+ ldq_u t2, 8(a1) # L : Latency=3 load high word for next time
+ addq a1, 8, a1 # E :
- subq a2, 1, a2 # E :
- cmpbge zero, t2, t7 # E : test new word for eos (2 cycle stall for data)
- beq a2, $u_eoc # U : (stall)
+ extqh t2, a1, t0 # U : extract low bits (2 cycle stall)
+ cmpbge zero, t2, t7 # E : test new word for eos
nop
-
beq t7, $u_loop # U :
- nop
- nop
- nop
/* We've found a zero somewhere in the source word we just read.
If it resides in the lower half, we have one (probably partial)
@@ -281,11 +272,12 @@ $u_loop:
have one full and one partial word left to write out.
On entry to this basic block:
+ t0 == the shifted low-order bits from the current source word
t1 == the shifted high-order bits from the previous source word
t2 == the unshifted current source word. */
$u_eos:
- extqh t2, a1, t0 # U :
- or t0, t1, t0 # E : first (partial) source word complete (stall)
+ or t0, t1, t0 # E : first (partial) source word complete
+ nop
cmpbge zero, t0, t7 # E : is the null in this first bit? (stall)
bne t7, $u_final # U : (stall)
@@ -323,17 +315,26 @@ $u_final:
1: stq_u t0, 0(a0) # L :
ret (t9) # L0 : Latency=3
-$u_eoc: # end-of-count
- extqh t2, a1, t0 # U :
- or t0, t1, t0 # E : (stall)
- cmpbge zero, t0, t7 # E : (stall)
+ /* Got to end-of-count before end of string.
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word */
+$u_eoc:
+ and a1, 7, t6 # E :
+ sll t10, t6, t6 # U : (stall)
+ and t6, 0xff, t6 # E : (stall)
+ bne t6, 1f # U : (stall)
+
+ ldq_u t2, 8(a1) # L : load final src word
nop
+ extqh t2, a1, t0 # U : extract low bits for last word (stall)
+ or t1, t0, t1 # E : (stall)
+
+1: cmpbge zero, t1, t7 # E :
+ mov t1, t0
$u_eocfin: # end-of-count, final word
or t10, t7, t7 # E :
br $u_final # L0 : Latency=3
- nop
- nop
/* Unaligned copy entry point. */
.align 4
@@ -354,9 +355,7 @@ $unaligned:
mskql t6, a0, t6 # U :
nop
nop
- nop
-1:
- subq a1, t4, a1 # E : sub dest misalignment from src addr
+1: subq a1, t4, a1 # E : sub dest misalignment from src addr
/* If source misalignment is larger than dest misalignment, we need
extra startup checks to avoid SEGV. */
diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S
index 9330f6d..73bcd36 100644
--- a/sysdeps/alpha/stxncpy.S
+++ b/sysdeps/alpha/stxncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -183,10 +183,11 @@ $u_head:
or t0, t6, t6 # e1 : mask original data for zero test
cmpbge zero, t6, t7 # e0 :
beq a2, $u_eocfin # .. e1 :
- bne t7, $u_final # e1 :
+ lda t6, -1 # e0 :
+ bne t7, $u_final # .. e1 :
- lda t6, -1 # e1 : mask out the bits we have
- mskql t6, a1, t6 # e0 : already seen
+ mskql t6, a1, t6 # e0 : mask out bits already seen
+ nop # .. e1 :
stq_u t0, 0(a0) # e0 : store first output word
or t6, t2, t2 # .. e1 :
cmpbge zero, t2, t7 # e0 : find nulls in second partial
@@ -198,11 +199,13 @@ $u_head:
of and we can set up to enter the main loop. */
extql t2, a1, t1 # e0 : position hi-bits of lo word
- ldq_u t2, 8(a1) # .. e1 : read next high-order source word
- addq a1, 8, a1 # e0 :
- cmpbge zero, t2, t7 # e1 (stall)
- beq a2, $u_eoc # e1 :
- bne t7, $u_eos # e1 :
+ beq a2, $u_eoc # .. e1 :
+ ldq_u t2, 8(a1) # e0 : read next high-order source word
+ addq a1, 8, a1 # .. e1 :
+ extqh t2, a1, t0 # e0 : position lo-bits of hi word
+ cmpbge zero, t2, t7 # .. e1 : test new word for eos
+ nop # e0 :
+ bne t7, $u_eos # .. e1 :
/* Unaligned copy main loop. In order to avoid reading too much,
the loop is structured to detect zeros in aligned source words.
@@ -212,6 +215,7 @@ $u_head:
to run as fast as possible.
On entry to this basic block:
+ t0 == the shifted low-order bits from the current source word
t1 == the shifted high-order bits from the previous source word
t2 == the unshifted current source word
@@ -219,18 +223,18 @@ $u_head:
.align 3
$u_loop:
- extqh t2, a1, t0 # e0 : extract high bits for current word
- addq a1, 8, a1 # .. e1 :
- extql t2, a1, t3 # e0 : extract low bits for next time
- addq a0, 8, a0 # .. e1 :
or t0, t1, t0 # e0 : current dst word now complete
- ldq_u t2, 0(a1) # .. e1 : load high word for next time
- stq_u t0, -8(a0) # e0 : save the current word
- mov t3, t1 # .. e1 :
- subq a2, 1, a2 # e0 :
+ subq a2, 1, a2 # .. e1 : decrement word count
+ stq_u t0, 0(a0) # e0 : save the current word
+ addq a0, 8, a0 # .. e1 :
+ extql t2, a1, t1 # e0 : extract high bits for next time
+ beq a2, $u_eoc # .. e1 :
+ ldq_u t2, 8(a1) # e0 : load high word for next time
+ addq a1, 8, a1 # .. e1 :
+ nop # e0 :
cmpbge zero, t2, t7 # .. e1 : test new word for eos
- beq a2, $u_eoc # e1 :
- beq t7, $u_loop # e1 :
+ extqh t2, a1, t0 # e0 : extract low bits for current word
+ beq t7, $u_loop # .. e1 :
/* We've found a zero somewhere in the source word we just read.
If it resides in the lower half, we have one (probably partial)
@@ -238,25 +242,23 @@ $u_loop:
have one full and one partial word left to write out.
On entry to this basic block:
+ t0 == the shifted low-order bits from the current source word
t1 == the shifted high-order bits from the previous source word
t2 == the unshifted current source word. */
$u_eos:
- extqh t2, a1, t0 # e0 :
- or t0, t1, t0 # e1 : first (partial) source word complete
-
+ or t0, t1, t0 # e0 : first (partial) source word complete
cmpbge zero, t0, t7 # e0 : is the null in this first bit?
bne t7, $u_final # .. e1 (zdb)
stq_u t0, 0(a0) # e0 : the null was in the high-order bits
addq a0, 8, a0 # .. e1 :
- subq a2, 1, a2 # e1 :
+ subq a2, 1, a2 # e0 :
$u_late_head_exit:
- extql t2, a1, t0 # .. e0 :
+ extql t2, a1, t0 # e0 :
cmpbge zero, t0, t7 # e0 :
or t7, t10, t6 # e1 :
cmoveq a2, t6, t7 # e0 :
- nop # .. e1 :
/* Take care of a final (probably partial) result word.
On entry to this basic block:
@@ -279,10 +281,22 @@ $u_final:
1: stq_u t0, 0(a0) # e0 :
ret (t9) # .. e1 :
-$u_eoc: # end-of-count
- extqh t2, a1, t0
- or t0, t1, t0
- cmpbge zero, t0, t7
+ /* Got to end-of-count before end of string.
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word */
+$u_eoc:
+ and a1, 7, t6 # e1 :
+ sll t10, t6, t6 # e0 :
+ and t6, 0xff, t6 # e0 :
+ bne t6, 1f # e1 : avoid src word load if we can
+
+ ldq_u t2, 8(a1) # e0 : load final src word
+ nop # .. e1 :
+ extqh t2, a1, t0 # e0 : extract high bits for last word
+ or t1, t0, t1 # e1 :
+
+1: cmpbge zero, t1, t7
+ mov t1, t0
$u_eocfin: # end-of-count, final word
or t10, t7, t7
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96408c1d8c131a5b87cea783b0e489b0b73b181f
commit 96408c1d8c131a5b87cea783b0e489b0b73b181f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 3 08:57:30 2002 +0000
Not needed anymore. The generic version is sufficient.
diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h
deleted file mode 100644
index 98df75f..0000000
--- a/sysdeps/unix/sysv/linux/alpha/net/route.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Based on the 4.4BSD and Linux version of this file. */
-
-#ifndef _NET_ROUTE_H
-#define _NET_ROUTE_H 1
-
-#include <features.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-
-
-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
-struct rtentry
- {
- unsigned long int rt_pad1;
- struct sockaddr rt_dst; /* Target address. */
- struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */
- struct sockaddr rt_genmask; /* Target network mask (IP). */
- unsigned short int rt_flags;
- short int rt_pad2;
- unsigned long int rt_pad3;
- unsigned char rt_tos;
- unsigned char rt_class;
- short int rt_pad4[3];
- short int rt_metric; /* +1 for binary compatibility! */
- char *rt_dev; /* Forcing the device at add. */
- unsigned long int rt_mtu; /* Per route MTU/Window. */
- unsigned long int rt_window; /* Window clamping. */
- unsigned short int rt_irtt; /* Initial RTT. */
- };
-/* Compatibility hack. */
-#define rt_mss rt_mtu
-
-
-struct in6_rtmsg
- {
- struct in6_addr rtmsg_dst;
- struct in6_addr rtmsg_src;
- struct in6_addr rtmsg_gateway;
- u_int32_t rtmsg_type;
- u_int16_t rtmsg_dst_len;
- u_int16_t rtmsg_src_len;
- u_int32_t rtmsg_metric;
- unsigned long int rtmsg_info;
- u_int32_t rtmsg_flags;
- int rtmsg_ifindex;
- };
-
-
-#define RTF_UP 0x0001 /* Route usable. */
-#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */
-
-#define RTF_HOST 0x0004 /* Host entry (net otherwise). */
-#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */
-#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */
-#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */
-#define RTF_MTU 0x0040 /* Specific MTU for this route. */
-#define RTF_MSS RTF_MTU /* Compatibility. */
-#define RTF_WINDOW 0x0080 /* Per route window clamping. */
-#define RTF_IRTT 0x0100 /* Initial round trip time. */
-#define RTF_REJECT 0x0200 /* Reject route. */
-#define RTF_STATIC 0x0400 /* Manually injected route. */
-#define RTF_XRESOLVE 0x0800 /* External resolver. */
-#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */
-#define RTF_THROW 0x2000 /* Go to next class. */
-#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */
-
-/* for IPv6 */
-#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
-#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */
-#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */
-
-#define RTF_LINKRT 0x00100000 /* link specific - device match */
-#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
-
-#define RTF_CACHE 0x01000000 /* cache entry */
-#define RTF_FLOW 0x02000000 /* flow significant route */
-#define RTF_POLICY 0x04000000 /* policy route */
-
-#define RTCF_VALVE 0x00200000
-#define RTCF_MASQ 0x00400000
-#define RTCF_NAT 0x00800000
-#define RTCF_DOREDIRECT 0x01000000
-#define RTCF_LOG 0x02000000
-#define RTCF_DIRECTSRC 0x04000000
-
-#define RTF_LOCAL 0x80000000
-#define RTF_INTERFACE 0x40000000
-#define RTF_MULTICAST 0x20000000
-#define RTF_BROADCAST 0x10000000
-#define RTF_NAT 0x08000000
-
-#define RTF_ADDRCLASSMASK 0xF8000000
-#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23)
-
-#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK)
-
-#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \
- == (RTF_LOCAL|RTF_INTERFACE))
-
-#define RT_CLASS_UNSPEC 0
-#define RT_CLASS_DEFAULT 253
-
-#define RT_CLASS_MAIN 254
-#define RT_CLASS_LOCAL 255
-#define RT_CLASS_MAX 255
-
-
-#define RTMSG_ACK NLMSG_ACK
-#define RTMSG_OVERRUN NLMSG_OVERRUN
-
-#define RTMSG_NEWDEVICE 0x11
-#define RTMSG_DELDEVICE 0x12
-#define RTMSG_NEWROUTE 0x21
-#define RTMSG_DELROUTE 0x22
-#define RTMSG_NEWRULE 0x31
-#define RTMSG_DELRULE 0x32
-#define RTMSG_CONTROL 0x40
-
-#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */
-
-#endif /* net/route.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a0ab8474e843c7223a2ca87661e843edd6273dd
commit 5a0ab8474e843c7223a2ca87661e843edd6273dd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 3 08:54:48 2002 +0000
Remove net/route.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 63e68d3..bba6642 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -9,7 +9,6 @@ ipc_priv.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
-net/route.h
oldglob.c
rt_sigaction.S
sizes.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=01c4c1c9aa2cab806a1efb3ae51cf0edc0e8237c
commit 01c4c1c9aa2cab806a1efb3ae51cf0edc0e8237c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 3 00:17:29 2002 +0000
Avoid unterminated string literals.
diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c
index d325d53..4275cd5 100644
--- a/sysdeps/hppa/elf/initfini.c
+++ b/sysdeps/hppa/elf/initfini.c
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for HPPA
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,84 +39,84 @@
making the comparison and indirect call is quite expensive (see the
comment in sysdeps/generic/initfini.c). */
-__asm__ ("
-
-#include \"defs.h\"
-
-/*@HEADER_ENDS*/
-
-/*@_init_PROLOG_BEGINS*/
- .section .init
- .align 4
- .globl _init
- .type _init,@function
-_init:
- stw %rp,-20(%sp)
- stwm %r4,64(%sp)
- stw %r19,-32(%sp)
- bl __gmon_start__,%rp
- copy %r19,%r4 /* delay slot */
- copy %r4,%r19
-/*@_init_PROLOG_ENDS*/
-
-/*@_init_EPILOG_BEGINS*/
- .text
- .align 4
- .weak __gmon_start__
- .type __gmon_start__,@function
-__gmon_start__:
- .proc
- .callinfo
- .entry
- bv,n %r0(%r2)
- .exit
- .procend
-
-/* Here is the tail end of _init. We put __gmon_start before this so
- that the assembler creates the .PARISC.unwind section for us, ie.
- with the right attributes. */
- .section .init
- ldw -84(%sp),%rp
- copy %r4,%r19
- bv %r0(%rp)
-_end_init:
- ldwm -64(%sp),%r4
-
-/* Our very own unwind info, because the assembler can't handle
- functions split into two or more pieces. */
- .section .PARISC.unwind
- .extern _init
- .word _init, _end_init
- .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
-
-/*@_init_EPILOG_ENDS*/
-
-/*@_fini_PROLOG_BEGINS*/
- .section .fini
- .align 4
- .globl _fini
- .type _fini,@function
-_fini:
- stw %rp,-20(%sp)
- stwm %r4,64(%sp)
- stw %r19,-32(%sp)
- copy %r19,%r4
-/*@_fini_PROLOG_ENDS*/
-
-/*@_fini_EPILOG_BEGINS*/
- .section .fini
- ldw -84(%sp),%rp
- copy %r4,%r19
- bv %r0(%rp)
-_end_fini:
- ldwm -64(%sp),%r4
-
- .section .PARISC.unwind
- .extern _fini
- .word _fini, _end_fini
- .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
-
-/*@_fini_EPILOG_ENDS*/
-
-/*@TRAILER_BEGINS*/
+__asm__ ("\
+\n\
+#include \"defs.h\"\n\
+\n\
+/*@HEADER_ENDS*/\n\
+\n\
+/*@_init_PROLOG_BEGINS*/\n\
+ .section .init\n\
+ .align 4\n\
+ .globl _init\n\
+ .type _init,@function\n\
+_init:\n\
+ stw %rp,-20(%sp)\n\
+ stwm %r4,64(%sp)\n\
+ stw %r19,-32(%sp)\n\
+ bl __gmon_start__,%rp\n\
+ copy %r19,%r4 /* delay slot */\n\
+ copy %r4,%r19\n\
+/*@_init_PROLOG_ENDS*/\n\
+\n\
+/*@_init_EPILOG_BEGINS*/\n\
+ .text\n\
+ .align 4\n\
+ .weak __gmon_start__\n\
+ .type __gmon_start__,@function\n\
+__gmon_start__:\n\
+ .proc\n\
+ .callinfo\n\
+ .entry\n\
+ bv,n %r0(%r2)\n\
+ .exit\n\
+ .procend\n\
+\n\
+/* Here is the tail end of _init. We put __gmon_start before this so\n\
+ that the assembler creates the .PARISC.unwind section for us, ie.\n\
+ with the right attributes. */\n\
+ .section .init\n\
+ ldw -84(%sp),%rp\n\
+ copy %r4,%r19\n\
+ bv %r0(%rp)\n\
+_end_init:\n\
+ ldwm -64(%sp),%r4\n\
+\n\
+/* Our very own unwind info, because the assembler can't handle\n\
+ functions split into two or more pieces. */\n\
+ .section .PARISC.unwind\n\
+ .extern _init\n\
+ .word _init, _end_init\n\
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\
+\n\
+/*@_init_EPILOG_ENDS*/\n\
+\n\
+/*@_fini_PROLOG_BEGINS*/\n\
+ .section .fini\n\
+ .align 4\n\
+ .globl _fini\n\
+ .type _fini,@function\n\
+_fini:\n\
+ stw %rp,-20(%sp)\n\
+ stwm %r4,64(%sp)\n\
+ stw %r19,-32(%sp)\n\
+ copy %r19,%r4\n\
+/*@_fini_PROLOG_ENDS*/\n\
+\n\
+/*@_fini_EPILOG_BEGINS*/\n\
+ .section .fini\n\
+ ldw -84(%sp),%rp\n\
+ copy %r4,%r19\n\
+ bv %r0(%rp)\n\
+_end_fini:\n\
+ ldwm -64(%sp),%r4\n\
+\n\
+ .section .PARISC.unwind\n\
+ .extern _fini\n\
+ .word _fini, _end_fini\n\
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n\
+\n\
+/*@_fini_EPILOG_ENDS*/\n\
+\n\
+/*@TRAILER_BEGINS*/\
");
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 5adba3b..5f76de7 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -216,7 +216,7 @@ _init:\n\
jal preinit\n\
sd $28, 6*8($29)\n\
move $16, $29 # Save the old stack pointer to s0 ($16)\n\
- daddu $4, $29, 4*8
+ daddu $4, $29, 4*8\n\
jal __init\n\
# Restore saved registers from the old stack.\n\
ld $28, 6*8($16)\n\
@@ -251,7 +251,7 @@ _init:\n\
jal preinit\n\
sw $28, 24($29)\n\
move $16, $29 # Save the old stack pointer to s0 ($16)\n\
- addu $4, $29, 32
+ addu $4, $29, 32\n\
jal __init\n\
# Restore saved registers from the old stack.\n\
lw $28, 24($16)\n\
@@ -343,12 +343,12 @@ asm ("\
.globl __libc_init_first\n\
__libc_init_first:\n\
dsubu $29, 8\n\
- sd $31, 0($29)
+ sd $31, 0($29)\n\
jal __mach_init\n\
- ld $4, 0($29)
- ld $5, 1*8($29)
- ld $6, 2*8($29)
- ld $7, 3*8($29)
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8($29)\n\
+ ld $7, 3*8($29)\n\
j ___libc_init_first\n\
");
#else
@@ -358,12 +358,12 @@ asm ("\
.globl __libc_init_first\n\
__libc_init_first:\n\
subu $29, 4\n\
- sw $31, 0($29)
+ sw $31, 0($29)\n\
jal __mach_init\n\
- lw $4, 0($29)
- lw $5, 4($29)
- lw $6, 8($29)
- lw $7, 12($29)
+ lw $4, 0($29)\n\
+ lw $5, 4($29)\n\
+ lw $6, 8($29)\n\
+ lw $7, 12($29)\n\
j ___libc_init_first\n\
");
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d044736b2752433fb87306f04b86c303420eef19
commit d044736b2752433fb87306f04b86c303420eef19
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 2 20:24:20 2002 +0000
Temporarily enable R_*_NONE relocs in ld.so.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 2b15e33..05d9882 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -522,7 +522,7 @@ elf_machine_rela (struct link_map *map,
if (map != &GL(dl_rtld_map))
# endif
{
- /* XXX Make some timings. Maybe it's preverable to test for
+ /* XXX Make some timings. Maybe it's preferable to test for
unaligned access and only do it the complex way if necessary. */
void *reloc_addr_1 = reloc_addr;
Elf64_Addr reloc_addr_val;
@@ -535,12 +535,11 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_1, &reloc_addr_val, 8);
}
}
-# ifndef RTLD_BOOTSTRAP
- else if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
- return;
-# endif
else
#endif
+ if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
+ return;
+ else
{
Elf64_Addr loadbase, sym_value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e2fa76de29f942b4b0264bd87b9583f32502598
commit 5e2fa76de29f942b4b0264bd87b9583f32502598
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Oct 2 11:01:06 2002 +0000
* sysdeps/mips/fpu/fraiseexcpt.c: Add internal definition.
* sysdeps/mips/fpu/fesetenv.c: Likewise.
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index ce7fe2c..b71a877 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -39,3 +39,5 @@ fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+libm_hidden_def (fesetenv)
diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c
index 7f3d977..3e2ebe0 100644
--- a/sysdeps/mips/fpu/fraiseexcpt.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -43,3 +43,5 @@ feraiseexcept (int excepts)
return 0;
}
+
+libm_hidden_def (feraiseexcept)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91bd9858387a220d6ad09fd4112812befc42267c
commit 91bd9858387a220d6ad09fd4112812befc42267c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 2 05:08:36 2002 +0000
Regenerated: autoconf sysdeps/unix/sysv/aix/configure.in
diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure
index 7fc920e..fa4a6c9 100644
--- a/sysdeps/unix/sysv/aix/configure
+++ b/sysdeps/unix/sysv/aix/configure
@@ -1,7 +1,4 @@
- # Local configure fragment for sysdeps/unix/sysv/linux.
-
-# On Linux, the default is to use libio instead of stdio.
-test $stdio = default && stdio=libio
+ # Local configure fragment for sysdeps/unix/sysv/aix.
# Don't bother trying to generate any glue code to be compatible with the
# existing system library, because we are the only system library.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf16933e969c6b859ffc5d7c9324790c931ad043
commit cf16933e969c6b859ffc5d7c9324790c931ad043
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 2 05:07:46 2002 +0000
Regenerated: autoconf sysdeps/alpha/elf/configure.in
diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure
index ab3c093..3ca6793 100644
--- a/sysdeps/alpha/elf/configure
+++ b/sysdeps/alpha/elf/configure
@@ -60,7 +60,7 @@ fi
fi
echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6
-echo "configure:20: checking for GP relative module local relocs" >&5
+echo "configure:64: checking for GP relative module local relocs" >&5
if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -75,7 +75,7 @@ int foo (void)
EOF
libc_cv_alpha_hidden_gprel=no
-if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:35: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:79: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if grep -q 'bar.*!gprel' conftest.s \
&& grep -q 'baz.*!gprel' conftest.s \
&& ! grep -q 'bar.*!literal' conftest.s \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=692e7ab8e19521c4e3fa43b09c6cc0adcc646b49
commit 692e7ab8e19521c4e3fa43b09c6cc0adcc646b49
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 1 19:42:02 2002 +0000
2002-02-08 Randolph Chung <tausq@debian.org>
* sysdeps/hppa/elf/start.S: Define __data_start.
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index a5c3e52..b2f0bd2 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -56,3 +56,10 @@ _start:
.procend
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=700494fc4b18dda563b9344ab6de9ffc77d2a934
commit 700494fc4b18dda563b9344ab6de9ffc77d2a934
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 1 19:42:01 2002 +0000
2002-10-01 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
[__USE_GNU] (F_SETLEASE, F_GETLEASE, F_NOTIFY): New macros.
[__USE_GNU] (DN_ACCESS, DN_MODIFY, DN_CREATE, DN_DELETE, DN_RENAME,
DN_ATTRIB, DN_MULTISHOT): New macros.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index d8b110c..dc68122 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -81,6 +81,12 @@
# define F_GETSIG 14 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -102,6 +108,17 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a30e09230bdde365305fb008f3900ce4b7e8b212
commit a30e09230bdde365305fb008f3900ce4b7e8b212
Author: Roland McGrath <roland@gnu.org>
Date: Sat Sep 28 19:45:29 2002 +0000
2002-09-28 Roland McGrath <roland@redhat.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_important_hwcaps): Use INTUSE for
_dl_signal_error.
* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise.
* sysdeps/powerpc/powerpc64/dl-machine.c
(_dl_reloc_overflow): Likewise.
* sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise.
(elf_machine_rela): Likewise.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 9905d15..e3e666a 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -523,8 +523,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
- _dl_signal_error (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
+ INTUSE (_dl_signal_error)
+ (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
}
}
newvalue >>= 2;
@@ -577,8 +578,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
- _dl_signal_error (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
+ INTUSE (_dl_signal_error)
+ (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
}
}
newvalue >>= 2;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 7dbdd79..08e5a6e 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -238,7 +238,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
}
- _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
+ INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
return NULL;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9fe8d7ced1cfcb42b28ba5b6dfbd966e8f15f2cf
commit 9fe8d7ced1cfcb42b28ba5b6dfbd966e8f15f2cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 18:03:10 2002 +0000
Update comment and remove stdio=libio setting.
diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in
index e3fd4ef..effa853 100644
--- a/sysdeps/unix/sysv/aix/configure.in
+++ b/sysdeps/unix/sysv/aix/configure.in
@@ -1,9 +1,6 @@
sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux.
-
-# On Linux, the default is to use libio instead of stdio.
-test $stdio = default && stdio=libio
+# Local configure fragment for sysdeps/unix/sysv/aix.
# Don't bother trying to generate any glue code to be compatible with the
# existing system library, because we are the only system library.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ee7624e8734e2fa80dca8f8dbdff830ad3f0fc1
commit 8ee7624e8734e2fa80dca8f8dbdff830ad3f0fc1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 18:02:05 2002 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure
deleted file mode 100644
index b5675df..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/configure
+++ /dev/null
@@ -1,4 +0,0 @@
- # Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2
-
-# Concensus on stdio is that it's broken.
-test $stdio = default && stdio=libio
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in
deleted file mode 100644
index 76f3109..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/configure.in
+++ /dev/null
@@ -1,6 +0,0 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2
-
-# Concensus on stdio is that it's broken.
-test $stdio = default && stdio=libio
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1cbca217e82b95d43736e548ccf483070308e38
commit b1cbca217e82b95d43736e548ccf483070308e38
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Sep 28 13:40:10 2002 +0000
Fix number of args to syscall.
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index 047bcb5..fc88539 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ __ftruncate64 (int fd, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0,
+ int result = INLINE_SYSCALL (ftruncate64, 4, fd, 0,
__LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index 6f870b8..3bb73ce 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +51,7 @@ truncate64 (const char *path, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
- int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path), 0,
+ int result = INLINE_SYSCALL (truncate64, 4, CHECK_STRING (path), 0,
__LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=926092e8079b6a2ad3dd0f839d32dd4bae9e6e6d
commit 926092e8079b6a2ad3dd0f839d32dd4bae9e6e6d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 04:34:00 2002 +0000
Define macro DO_ELF_MACHINE_REL_RELATIVE for 'elf_machine_rel_relative' with
extra map parameter required by HPPA.
(elf_machine_rela_relative): Add plt relocation changes.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index f70b2b3..9cc10c4 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -628,11 +628,55 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = value;
}
+#define DO_ELF_MACHINE_REL_RELATIVE(map, l_addr, relative) \
+ elf_machine_rel_relative (map, l_addr, relative, \
+ (void *) (l_addr + relative->r_offset))
+
+/* hppa doesn't have an R_PARISC_RELATIVE reloc, but uses relocs with
+ ELF32_R_SYM (info) == 0 for a similar purpose. */
static inline void
-elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+elf_machine_rela_relative (struct link_map *map, Elf32_Addr l_addr,
+ const Elf32_Rela *reloc,
Elf32_Addr *const reloc_addr)
{
- /* XXX Nothing to do. There is no relative relocation, right? */
+ unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
+ Elf32_Addr value;
+
+ value = l_addr + reloc->r_addend;
+
+ if (ELF32_R_SYM (reloc->r_info) != 0)
+ asm volatile ("iitlbp %r0,(%r0)"); /* Crash. */
+
+ switch (r_type)
+ {
+ case R_PARISC_DIR32:
+ /* .eh_frame can have unaligned relocs. */
+ if ((unsigned long) reloc_addr & 3)
+ {
+ char *rel_addr = (char *) reloc_addr;
+ rel_addr[0] = value >> 24;
+ rel_addr[1] = value >> 16;
+ rel_addr[2] = value >> 8;
+ rel_addr[3] = value;
+ return;
+ }
+ break;
+
+ case R_PARISC_PLABEL32:
+ break;
+
+ case R_PARISC_IPLT:
+ elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
+ return;
+
+ case R_PARISC_NONE:
+ return;
+
+ default:
+ _dl_reloc_bad_type (map, r_type, 0);
+ }
+
+ *reloc_addr = value;
}
static inline void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a398af98d699e9a657ae5236a46545c72f56ff4
commit 0a398af98d699e9a657ae5236a46545c72f56ff4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 04:05:23 2002 +0000
SysV shared memory definitions for Linux/PA.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
new file mode 100644
index 0000000..52b11ed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -0,0 +1,103 @@
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* Permission flag for shmget. */
+#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
+#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+
+/* Flags for `shmat'. */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+
+/* Commands for `shmctl'. */
+#define SHM_LOCK 11 /* lock segment (root only) */
+#define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
+/* Data structure describing a set of semaphores. */
+struct shmid_ds
+ {
+ struct ipc_perm shm_perm; /* operation permission struct */
+#if __WORDSIZE == 32
+ unsigned int __pad1;
+#endif
+ __time_t shm_atime; /* time of last shmat() */
+#if __WORDSIZE == 32
+ unsigned int __pad2;
+#endif
+ __time_t shm_dtime; /* time of last shmdt() */
+#if __WORDSIZE == 32
+ unsigned int __pad3;
+#endif
+ __time_t shm_ctime; /* time of last change by shmctl() */
+#if __WORDSIZE == 32
+ unsigned int __pad4;
+#endif
+ size_t shm_segsz; /* size of segment in bytes */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ };
+
+#ifdef __USE_MISC
+
+/* ipcs ctl commands */
+# define SHM_STAT 13
+# define SHM_INFO 14
+
+/* shm_mode upper byte flags */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
+
+struct shminfo
+ {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+ };
+
+struct shm_info
+ {
+ int used_ids;
+ unsigned long int shm_tot; /* total allocated shm */
+ unsigned long int shm_rss; /* total resident shm */
+ unsigned long int shm_swp; /* total swapped shm */
+ unsigned long int swap_attempts;
+ unsigned long int swap_successes;
+ };
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=895185c62e97e28bc95e23432743f7975d1a9959
commit 895185c62e97e28bc95e23432743f7975d1a9959
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 04:04:44 2002 +0000
SysV semaphore definitions for Linux/PA.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sem.h b/sysdeps/unix/sysv/linux/hppa/bits/sem.h
new file mode 100644
index 0000000..2880765
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/sem.h
@@ -0,0 +1,92 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
+#endif
+
+#include <sys/types.h>
+#include <bits/wordsize.h>
+
+/* Flags for `semop'. */
+#define SEM_UNDO 0x1000 /* undo the operation on exit */
+
+/* Commands for `semctl'. */
+#define GETPID 11 /* get sempid */
+#define GETVAL 12 /* get semval */
+#define GETALL 13 /* get all semval's */
+#define GETNCNT 14 /* get semncnt */
+#define GETZCNT 15 /* get semzcnt */
+#define SETVAL 16 /* set semval */
+#define SETALL 17 /* set all semval's */
+
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+#if __WORDSIZE == 32
+ unsigned int __pad1;
+#endif
+ __time_t sem_otime; /* last semop() time */
+#if __WORDSIZE == 32
+ unsigned int __pad2;
+#endif
+ __time_t sem_ctime; /* last time changed by semctl() */
+ unsigned long int sem_nsems; /* number of semaphores in set */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+/* The user should define a union like the following to use it for arguments
+ for `semctl'.
+
+ union semun
+ {
+ int val; <= value for SETVAL
+ struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET
+ unsigned short int *array; <= array for GETALL & SETALL
+ struct seminfo *__buf; <= buffer for IPC_INFO
+ };
+
+ Previous versions of this file used to define this union but this is
+ incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether
+ one must define the union or not. */
+#define _SEM_SEMUN_UNDEFINED 1
+
+#ifdef __USE_MISC
+
+/* ipcs ctl cmds */
+# define SEM_STAT 18
+# define SEM_INFO 19
+
+struct seminfo
+{
+ int semmap;
+ int semmni;
+ int semmns;
+ int semmnu;
+ int semmsl;
+ int semopm;
+ int semume;
+ int semusz;
+ int semvmx;
+ int semaem;
+};
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=535cdc5140e2e148f43f417e37fcea8540b4efd4
commit 535cdc5140e2e148f43f417e37fcea8540b4efd4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 04:03:54 2002 +0000
SysV message queue definitions for Linux/PA.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/msq.h b/sysdeps/unix/sysv/linux/hppa/bits/msq.h
new file mode 100644
index 0000000..1268dc8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/msq.h
@@ -0,0 +1,84 @@
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* Define options for message queue functions. */
+#define MSG_NOERROR 010000 /* no error if message is too big */
+#ifdef __USE_GNU
+# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+#endif
+
+/* Types used in the structure definition. */
+typedef unsigned long int msgqnum_t;
+typedef unsigned long int msglen_t;
+
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+#if __WORDSIZE == 32
+ unsigned int __pad1;
+#endif
+ __time_t msg_stime; /* time of last msgsnd command */
+#if __WORDSIZE == 32
+ unsigned int __pad2;
+#endif
+ __time_t msg_rtime; /* time of last msgrcv command */
+#if __WORDSIZE == 32
+ unsigned int __pad3;
+#endif
+ __time_t msg_ctime; /* time of last change */
+ unsigned long int __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+#ifdef __USE_MISC
+
+# define msg_cbytes __msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+ {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short int msgseg;
+ };
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53c72cc1d6c3cc45d92d56873f245cd64cdcc1d8
commit 53c72cc1d6c3cc45d92d56873f245cd64cdcc1d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 28 04:02:56 2002 +0000
IPC definitions for Linux/PA.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ipc.h b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h
new file mode 100644
index 0000000..d80cf06
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/ipc.h
@@ -0,0 +1,63 @@
+/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <bits/wordsize.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'. */
+#define IPC_CREAT 01000 /* Create key if key does not exist. */
+#define IPC_EXCL 02000 /* Fail if key exists. */
+#define IPC_NOWAIT 04000 /* Return error on wait. */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'. */
+#define IPC_RMID 0 /* Remove identifier. */
+#define IPC_SET 1 /* Set `ipc_perm' options. */
+#define IPC_STAT 2 /* Get `ipc_perm' options. */
+#ifdef __USE_GNU
+# define IPC_INFO 3 /* See ipcs. */
+#endif
+
+/* Special key values. */
+#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
+
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+ {
+ __key_t __key; /* Key. */
+ __uid_t uid; /* Owner's user ID. */
+ __gid_t gid; /* Owner's group ID. */
+ __uid_t cuid; /* Creator's user ID. */
+ __gid_t cgid; /* Creator's group ID. */
+#if __WORDSIZE == 32
+ unsigned short int __pad1;
+ unsigned short int mode; /* Read/write permission. */
+ unsigned short int __pad2;
+#else
+ __mode_t mode; /* Read/write permission. */
+ unsigned short int __pad2;
+#endif
+ unsigned short int __seq; /* Sequence number. */
+ unsigned int __pad3;
+ unsigned long long int __unused1;
+ unsigned long long int __unused2;
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dafc949f6550bd9a8dbdf6fcf320b021c66c1c5f
commit dafc949f6550bd9a8dbdf6fcf320b021c66c1c5f
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Sep 25 11:09:55 2002 +0000
Add syscall_exit.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 57237d7..fe01d76 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -48,6 +48,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
s_execve execve execve i:spp __syscall_execve
+s_exit _exit exit i:i __syscall_exit
s_fcntl fcntl fcntl i:iiF __syscall_fcntl
s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64
s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20f7e3e794d10e00c389837af649f1f7b4333152
commit 20f7e3e794d10e00c389837af649f1f7b4333152
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 25 01:57:50 2002 +0000
2002-09-24 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/alpha/bits/time.h: File removed.
It was indentical to the linux/bits/time.h file.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
deleted file mode 100644
index dd4dfaf..0000000
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
- * Never include this file directly; use <time.h> instead.
- */
-
-#ifndef __need_timeval
-# ifndef _BITS_TIME_H
-# define _BITS_TIME_H 1
-
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
- The macro `CLOCKS_PER_SEC' is the number per second of the value
- returned by the `clock' function. */
-/* CAE XSH, Issue 4, Version 2: <time.h>
- The value of CLOCKS_PER_SEC is required to be 1 million on all
- XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000l
-
-# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
-/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
- presents the real value for clock ticks per second for the system. */
-# include <bits/types.h>
-extern long int __sysconf (int);
-# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
-# endif
-
-# ifdef __USE_POSIX199309
-/* Identifier for system-wide realtime clock. */
-# define CLOCK_REALTIME 0
-
-/* Flag to indicate time is absolute. */
-# define TIMER_ABSTIME 1
-# endif
-
-# endif /* bits/time.h */
-#endif /* !__need_timeval */
-
-#ifdef __need_timeval
-# undef __need_timeval
-# ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-# include <bits/types.h>
-
-/* A time value that is accurate to the nearest
- microsecond but also has a range of years. */
-struct timeval
- {
- __time_t tv_sec; /* Seconds. */
- __suseconds_t tv_usec; /* Microseconds. */
- };
-# endif /* struct timeval */
-#endif /* need timeval */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6697827c9dd2441185ff0aab44aa1b9292dc85c
commit e6697827c9dd2441185ff0aab44aa1b9292dc85c
Author: Roland McGrath <roland@gnu.org>
Date: Mon Sep 23 03:30:34 2002 +0000
2002-09-21 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/hppa/abort-instr.h: New file.
diff --git a/sysdeps/hppa/abort-instr.h b/sysdeps/hppa/abort-instr.h
new file mode 100644
index 0000000..f1afea4
--- /dev/null
+++ b/sysdeps/hppa/abort-instr.h
@@ -0,0 +1,6 @@
+/* An instruction privileged instruction to crash a userspace program.
+
+ We go with iitlbp because it has a history of being used to crash
+ programs. */
+
+#define ABORT_INSTRUCTION asm ("iitlbp %r0,(%r0)")
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0220ef788b32d53d68f01b4d952293f30d939ff4
commit 0220ef788b32d53d68f01b4d952293f30d939ff4
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Sep 22 16:47:55 2002 +0000
* sysdeps/m68k/fpu/bits/mathinline.h (isgreater, isgreaterequal)
(isless, islessequal, islessgreater, isunordered) [GCC >= 3.1]:
Use GCC builtins.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index dec89d8..4b1bfea 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991,92,93,94,96,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,96,97,98,99,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,51 +21,61 @@
#ifdef __USE_ISOC99
+# if __GNUC_PREREQ (3,1)
+/* GCC 3.1 and up have builtins that actually can be used. */
+# define isgreater(x, y) __builtin_isgreater (x, y)
+# define isgreaterequal(x, y) __builtin_isgreaterequal (x, y)
+# define isless(x, y) __builtin_isless (x, y)
+# define islessequal(x, y) __builtin_islessequal (x, y)
+# define islessgreater(x, y) __builtin_islessgreater (x, y)
+# define isunordered(x, y) __builtin_isunordered (x, y)
+# else
/* ISO C99 defines some macros to perform unordered comparisons. The
m68k FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
-# define isgreater(x, y) \
+# define isgreater(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
-# define isgreaterequal(x, y) \
+# define isgreaterequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsoge %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
-# define isless(x, y) \
+# define isless(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsolt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
-# define islessequal(x, y) \
+# define islessequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsole %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
-# define islessgreater(x, y) \
+# define islessgreater(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogl %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
-# define isunordered(x, y) \
+# define isunordered(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsun %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
__result != 0; })
+# endif /* GCC 3.1 */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93697b95ebf642260e1bd453512f9075e3d249a9
commit 93697b95ebf642260e1bd453512f9075e3d249a9
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 20 21:49:06 2002 +0000
2002-09-20 Roland McGrath <roland@redhat.com>
* sysdeps/generic/gmp-mparam.h: Include <bits/wordsize.h>.
(BITS_PER_MP_LIMB, BYTES_PER_MP_LIMB, BITS_PER_LONGINT): Define in
terms of __WORDSIZE.
* sysdeps/x86_64/gmp-mparam.h: File removed.
* sysdeps/sparc/gmp-mparam.h: File removed.
* sysdeps/mips/mips64/gmp-mparam.h: File removed.
* sysdeps/ia64/gmp-mparam.h: File removed.
* sysdeps/alpha/gmp-mparam.h: File removed.
diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h
deleted file mode 100644
index f565f0f..0000000
--- a/sysdeps/alpha/gmp-mparam.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* gmp-mparam.h -- Compiler/machine parameter header file.
-
-Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2.1 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
-
-#define BITS_PER_MP_LIMB 64
-#define BYTES_PER_MP_LIMB 8
-#define BITS_PER_LONGINT 64
-#define BITS_PER_INT 32
-#define BITS_PER_SHORTINT 16
-#define BITS_PER_CHAR 8
diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h
deleted file mode 100644
index 3779d1d..0000000
--- a/sysdeps/mips/mips64/gmp-mparam.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* gmp-mparam.h -- Compiler/machine parameter header file.
-
-Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2.1 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#define BITS_PER_MP_LIMB 64
-#define BYTES_PER_MP_LIMB 8
-#define BITS_PER_LONGINT 64
-#define BITS_PER_INT 64
-#define BITS_PER_SHORTINT 16
-#define BITS_PER_CHAR 8
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4a4647bce31f2cc34c87a1a490add334feae0f8
commit f4a4647bce31f2cc34c87a1a490add334feae0f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 19 06:46:37 2002 +0000
(sysdep_routines, shared-only-routines): Don't add divdi3 here.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 2515df7..c44b2d1 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -33,14 +33,6 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer
# The 68k `long double' is a distinct type we support.
long-double-fcts = yes
-ifeq ($(subdir),csu)
-ifeq (yes,$(build-shared))
-# Compatibility
-sysdep_routines += divdi3
-shared-only-routines += divdi3
-endif
-endif
-
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f756cedbffec3dc602c1bde88e5989a94b44975c
commit f756cedbffec3dc602c1bde88e5989a94b44975c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 19 06:44:24 2002 +0000
Not needed anymore.
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
deleted file mode 100644
index ccb6b03..0000000
--- a/sysdeps/arm/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-ifeq ($(subdir),csu)
-ifeq (yes,$(build-shared))
-# Compatibility
-sysdep_routines += divdi3
-shared-only-routines += divdi3
-endif
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce8a8f74e426b18f418ac7a3e90a32d2c874fdb4
commit ce8a8f74e426b18f418ac7a3e90a32d2c874fdb4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 18 18:28:43 2002 +0000
2002-09-18 Roland McGrath <roland@redhat.com>
* elf/do-rel.h (elf_dynamic_do_rel): Mask off 0x8000 bit (hidden flag)
from the value taken from the DT_VERSYM table.
* elf/dl-runtime.c (fixup, profile_fixup): Likewise.
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Likewise.
(RESOLVE_GOTSYM): Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index bc5e84f..7dbdd79 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -293,7 +293,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
const ElfW(Half) *vernum = \
(const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \
- ElfW(Half) ndx = vernum[sym_index]; \
+ ElfW(Half) ndx = vernum[sym_index & 0x7fff]; \
const struct r_found_version *version = &l->l_versions[ndx]; \
\
if (version->hash != 0) \
@@ -562,7 +562,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
({ \
const ElfW(Sym) *ref = sym; \
const struct r_found_version *version \
- = vernum ? &map->l_versions[vernum[sym_index]] : NULL; \
+ = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \
ElfW(Addr) value; \
value = RESOLVE (&ref, version, R_MIPS_REL32); \
(ref)? value + ref->st_value: 0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c5947147ec1c3611a51f4db1da1ea0bc2a8da227
commit c5947147ec1c3611a51f4db1da1ea0bc2a8da227
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 18 17:45:53 2002 +0000
2002-09-18 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/sigaction.c (__libc_sigaction):
Add libc_hidden_def.
* sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index a137ce7..40ecb32 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -148,7 +148,7 @@ __libc_sigaction (sig, act, oact)
}
return result;
}
-
+libc_hidden_def (__libc_sigaction)
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 17f678c..0e5cfb7 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -134,7 +134,7 @@ __libc_sigaction (sig, act, oact)
return result;
#endif
}
-
+libc_hidden_def (__libc_sigaction)
weak_alias (__libc_sigaction, __sigaction)
libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad9dff54b0683eaf41964511510dbabac047de42
commit ad9dff54b0683eaf41964511510dbabac047de42
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 13 07:12:28 2002 +0000
Add readahead syscall.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index f7d2e29..57237d7 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -67,6 +67,7 @@ s_pread64 pread64 pread i:ibniii __syscall_pread
s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
s_ptrace ptrace ptrace i:iipp __syscall_ptrace
s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite
+s_readahead EXTRA readahead i:iipi __syscall_readahead
s_reboot reboot reboot i:iii __syscall_reboot
s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit
s_sigpending sigpending sigpending i:p __syscall_sigpending
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0752643673b8f9f99f4efa14ec80a01bb18e2273
commit 0752643673b8f9f99f4efa14ec80a01bb18e2273
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 10 11:24:50 2002 +0000
Cleaned up the FPU exception stuff - was
not functional before. Also removed all SHLIB_COMPAT stuff.
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 2c35047..f773312 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -21,10 +21,9 @@
#include <fenv.h>
#include <fenv_libc.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__feclearexcept (int excepts)
+feclearexcept (int excepts)
{
int cw;
@@ -35,8 +34,8 @@ __feclearexcept (int excepts)
_FPU_GETCW (cw);
/* Clear exception flag bits and cause bits. If the cause bit is not
- cleared, the next CTC instruction (just below) will re-generate
- the exception. */
+ cleared, the next CTC instruction (just below) will re-generate the
+ exception. */
cw &= ~(excepts | (excepts << CAUSE_SHIFT));
@@ -46,9 +45,3 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
-
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feclearexcept, __old_feclearexcept)
-compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
index 1edb815..c174138 100644
--- a/sysdeps/mips/fpu/fegetenv.c
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -20,18 +20,12 @@
#include <fenv.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__fegetenv (fenv_t *envp)
+fegetenv (fenv_t *envp)
{
_FPU_GETCW (*envp);
/* Success. */
return 0;
}
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fegetenv, __old_fegetenv)
-compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index 197db5e..ce7fe2c 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -20,10 +20,9 @@
#include <fenv.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__fesetenv (const fenv_t *envp)
+fesetenv (const fenv_t *envp)
{
fpu_control_t cw;
@@ -40,10 +39,3 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
-
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fesetenv, __old_fesetenv)
-compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
-#endif
-libm_hidden_ver (__fesetenv, fesetenv)
-versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
index c883d07..20b20e1 100644
--- a/sysdeps/mips/fpu/feupdateenv.c
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -20,10 +20,9 @@
#include <fenv.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__feupdateenv (const fenv_t *envp)
+feupdateenv (const fenv_t *envp)
{
int temp;
@@ -42,8 +41,3 @@ __feupdateenv (const fenv_t *envp)
/* Success. */
return 0;
}
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feupdateenv, __old_feupdateenv)
-compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 4f802af..3412159 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -20,27 +20,21 @@
#include <fenv.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__fegetexceptflag (fexcept_t *flagp, int excepts)
+fegetexceptflag (fexcept_t *flagp, int excepts)
{
fexcept_t temp;
/* Get the current exceptions. */
_FPU_GETCW (temp);
- /* It is important that the CAUSE bits are not saved here. If they
- were, a call to fesetexceptflag() would generate an
- exception. */
+ /* We only save the relevant bits here. In particular, care has to be
+ taken with the CAUSE bits, as an inadvertent restore later on could
+ generate unexpected exceptions. */
*flagp = temp & excepts & FE_ALL_EXCEPT;
/* Success. */
return 0;
}
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c
index e3323dd..7f3d977 100644
--- a/sysdeps/mips/fpu/fraiseexcpt.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -21,19 +21,18 @@
#include <fenv.h>
#include <fenv_libc.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__feraiseexcept (int excepts)
+feraiseexcept (int excepts)
{
fpu_control_t cw;
/* Get current state. */
_FPU_GETCW (cw);
- /* Set flag bits (which are accumulative), and *also* set the cause
- bits. The setting of the cause bits is what actually causes the
- hardware to generate the exception, if the corresponding enable
+ /* Set flag bits (which are accumulative), and *also* set the
+ cause bits. The setting of the cause bits is what actually causes
+ the hardware to generate the exception, if the corresponding enable
bit is set as well. */
excepts &= FE_ALL_EXCEPT;
@@ -44,10 +43,3 @@ __feraiseexcept (int excepts)
return 0;
}
-
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feraiseexcept, __old_feraiseexcept)
-compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
-#endif
-libm_hidden_ver (__feraiseexcept, feraiseexcept)
-versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af43a56542c782dc006f555056f62b15bf732c47
commit af43a56542c782dc006f555056f62b15bf732c47
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 10 11:23:00 2002 +0000
MIPS specific optimizations.
diff --git a/sysdeps/mips/fpu/e_sqrt.c b/sysdeps/mips/fpu/e_sqrt.c
new file mode 100644
index 0000000..5449710
--- /dev/null
+++ b/sysdeps/mips/fpu/e_sqrt.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include <sgidefs.h>
+
+
+#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+
+double
+__ieee754_sqrt (double x)
+{
+ double z;
+ __asm__ ("sqrt.d %0,%1" : "=f" (z) : "f" (x));
+ return z;
+}
+
+#else
+
+#include <sysdeps/ieee754/dbl-64/e_sqrt.c>
+
+#endif
diff --git a/sysdeps/mips/fpu/e_sqrtf.c b/sysdeps/mips/fpu/e_sqrtf.c
new file mode 100644
index 0000000..3590ad4
--- /dev/null
+++ b/sysdeps/mips/fpu/e_sqrtf.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include <sgidefs.h>
+
+
+#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+
+float
+__ieee754_sqrtf (float x)
+{
+ float z;
+ __asm__ ("sqrt.s %0,%1" : "=f" (z) : "f" (x));
+ return z;
+}
+
+#else
+
+#include <sysdeps/ieee754/flt-32/e_sqrtf.c>
+
+#endif
+
diff --git a/sysdeps/mips/fpu/fsetexcptflg.c b/sysdeps/mips/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..c65d793
--- /dev/null
+++ b/sysdeps/mips/fpu/fsetexcptflg.c
@@ -0,0 +1,43 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (temp);
+
+ /* Make sure the flags we want restored are legal. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Now clear the bits called for, and copy them in from flagp. Note that
+ we ignore all non-flag bits from *flagp, so they don't matter. */
+ temp = (temp & ~excepts) | (*flagp & excepts);
+
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
+}
diff --git a/sysdeps/mips/memcpy.S b/sysdeps/mips/memcpy.S
new file mode 100644
index 0000000..394265e
--- /dev/null
+++ b/sysdeps/mips/memcpy.S
@@ -0,0 +1,130 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <endian.h>
+
+
+/* void *memcpy(void *s1, const void *s2, size_t n);
+
+ This routine could be optimized further for MIPS64, but this is left
+ as an exercise for the future. When it is done, the file should be kept
+ as a sisterfile to this one, and placed in the sysdeps/mips/mips64
+ directory. */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define LWHI lwl /* high part is left in big-endian */
+# define SWHI swl /* high part is left in big-endian */
+# define LWLO lwr /* low part is right in big-endian */
+# define SWLO swr /* low part is right in big-endian */
+#else
+# define LWHI lwr /* high part is right in little-endian */
+# define SWHI swr /* high part is right in little-endian */
+# define LWLO lwl /* low part is left in little-endian */
+# define SWLO swl /* low part is left in little-endian */
+#endif
+
+ENTRY (memcpy)
+ .set noreorder
+
+ slti t0, a2, 8 # Less than 8?
+ bne t0, zero, $last8
+ move v0, a0 # Setup exit value before too late
+
+ xor t0, a1, a0 # Find a0/a1 displacement
+ andi t0, 0x3
+ bne t0, zero, $shift # Go handle the unaligned case
+ subu t1, zero, a1
+ andi t1, 0x3 # a0/a1 are aligned, but are we
+ beq t1, zero, $chk8w # starting in the middle of a word?
+ subu a2, t1
+ LWHI t0, 0(a1) # Yes we are... take care of that
+ addu a1, t1
+ SWHI t0, 0(a0)
+ addu a0, t1
+
+$chk8w: andi t0, a2, 0x1f # 32 or more bytes left?
+ beq t0, a2, $chk1w
+ subu a3, a2, t0 # Yes
+ addu a3, a1 # a3 = end address of loop
+ move a2, t0 # a2 = what will be left after loop
+$lop8w: lw t0, 0(a1) # Loop taking 8 words at a time
+ lw t1, 4(a1)
+ lw t2, 8(a1)
+ lw t3, 12(a1)
+ lw t4, 16(a1)
+ lw t5, 20(a1)
+ lw t6, 24(a1)
+ lw t7, 28(a1)
+ addiu a0, 32
+ addiu a1, 32
+ sw t0, -32(a0)
+ sw t1, -28(a0)
+ sw t2, -24(a0)
+ sw t3, -20(a0)
+ sw t4, -16(a0)
+ sw t5, -12(a0)
+ sw t6, -8(a0)
+ bne a1, a3, $lop8w
+ sw t7, -4(a0)
+
+$chk1w: andi t0, a2, 0x3 # 4 or more bytes left?
+ beq t0, a2, $last8
+ subu a3, a2, t0 # Yes, handle them one word at a time
+ addu a3, a1 # a3 again end address
+ move a2, t0
+$lop1w: lw t0, 0(a1)
+ addiu a0, 4
+ addiu a1, 4
+ bne a1, a3, $lop1w
+ sw t0, -4(a0)
+
+$last8: blez a2, $lst8e # Handle last 8 bytes, one at a time
+ addu a3, a2, a1
+$lst8l: lb t0, 0(a1)
+ addiu a0, 1
+ addiu a1, 1
+ bne a1, a3, $lst8l
+ sb t0, -1(a0)
+$lst8e: jr ra # Bye, bye
+ nop
+
+$shift: subu a3, zero, a0 # Src and Dest unaligned
+ andi a3, 0x3 # (unoptimized case...)
+ beq a3, zero, $shft1
+ subu a2, a3 # a2 = bytes left
+ LWHI t0, 0(a1) # Take care of first odd part
+ LWLO t0, 3(a1)
+ addu a1, a3
+ SWHI t0, 0(a0)
+ addu a0, a3
+$shft1: andi t0, a2, 0x3
+ subu a3, a2, t0
+ addu a3, a1
+$shfth: LWHI t1, 0(a1) # Limp through, word by word
+ LWLO t1, 3(a1)
+ addiu a0, 4
+ addiu a1, 4
+ bne a1, a3, $shfth
+ sw t1, -4(a0)
+ b $last8 # Handle anything which may be left
+ move a2, t0
+
+ .set reorder
+END (memcpy)
diff --git a/sysdeps/mips/memset.S b/sysdeps/mips/memset.S
new file mode 100644
index 0000000..7e3f129
--- /dev/null
+++ b/sysdeps/mips/memset.S
@@ -0,0 +1,83 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+#include <endian.h>
+
+
+/* void *memset(void *s, int c, size_t n).
+
+ This routine could be optimized further for MIPS64, but this is left
+ as an exercise for the future. When it is done, the file should be kept
+ as a sisterfile to this one, and placed in the sysdeps/mips/mips64
+ directory. */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define SWHI swl /* high part is left in big-endian */
+#else
+# define SWHI swr /* high part is right in little-endian */
+#endif
+
+ENTRY (memset)
+ .set noreorder
+
+ slti t1, a2, 8 # Less than 8?
+ bne t1, zero, $last8
+ move v0, a0 # Setup exit value before too late
+
+ beq a1, zero, $ueven # If zero pattern, no need to extend
+ andi a1, 0xff # Avoid problems with bogus arguments
+ sll t0, a1, 8
+ or a1, t0
+ sll t0, a1, 16
+ or a1, t0 # a1 is now pattern in full word
+
+$ueven: subu t0, zero, a0 # Unaligned address?
+ andi t0, 0x3
+ beq t0, zero, $chkw
+ subu a2, t0
+ SWHI a1, 0(a0) # Yes, handle first unaligned part
+ addu a0, t0 # Now both a0 and a2 are updated
+
+$chkw: andi t0, a2, 0x7 # Enough left for one loop iteration?
+ beq t0, a2, $chkl
+ subu a3, a2, t0
+ addu a3, a0 # a3 is last loop address +1
+ move a2, t0 # a2 is now # of bytes left after loop
+$loopw: addiu a0, 8 # Handle 2 words pr. iteration
+ sw a1, -8(a0)
+ bne a0, a3, $loopw
+ sw a1, -4(a0)
+
+$chkl: andi t0, a2, 0x4 # Check if there is at least a full
+ beq t0, zero, $last8 # word remaining after the loop
+ subu a2, t0
+ sw a1, 0(a0) # Yes...
+ addiu a0, 4
+
+$last8: blez a2, $exit # Handle last 8 bytes (if cnt>0)
+ addu a3, a2, a0 # a3 is last address +1
+$lst8l: addiu a0, 1
+ bne a0, a3, $lst8l
+ sb a1, -1(a0)
+$exit: j ra # Bye, bye
+ nop
+
+ .set reorder
+END (memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=280ad607c77a68e927f03a399f7b8d868f7c5b80
commit 280ad607c77a68e927f03a399f7b8d868f7c5b80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:26:37 2002 +0000
Add libm_hidden_ver.
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 63b7240..c76e882 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -53,4 +53,5 @@ strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fesetenv, fesetenv)
versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 7f18f39..7a589e4 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -44,4 +44,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept)
compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
#endif
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index 5bc1978..bb8812a 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,4 +41,5 @@ strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fesetenv, fesetenv)
versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
index 75cd1ba..f7dede2 100644
--- a/sysdeps/arm/fpu/fraiseexcpt.c
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,4 +40,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept)
compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
#endif
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index f0c6856..2c79869 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
Based on the m68k version by
@@ -68,3 +68,4 @@ fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+libm_hidden_def (fesetenv)
diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c
index 5164bc4..a13668f 100644
--- a/sysdeps/hppa/fpu/fraiseexcpt.c
+++ b/sysdeps/hppa/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>
@@ -88,3 +88,4 @@ feraiseexcept (int excepts)
/* Success. */
return 0;
}
+libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index d3cac1c..20653f0 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -56,4 +56,5 @@ strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fesetenv, fesetenv)
versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index d410fde..69f746c 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -79,4 +79,5 @@ strong_alias (__feraiseexcept, __old_feraiseexcept)
compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
#endif
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index 6bd894a..197db5e 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -45,4 +45,5 @@ __fesetenv (const fenv_t *envp)
strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
#endif
+libm_hidden_ver (__fesetenv, fesetenv)
versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c
index e2472e3..e3323dd 100644
--- a/sysdeps/mips/fpu/fraiseexcpt.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -49,4 +49,5 @@ __feraiseexcept (int excepts)
strong_alias (__feraiseexcept, __old_feraiseexcept)
compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
#endif
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd8d18b3d8eccb7985e7a1c780372ef02107ae60
commit fd8d18b3d8eccb7985e7a1c780372ef02107ae60
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:14:47 2002 +0000
(__isnanl): Add hidden_def.
diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c
index 0a9ddf9..999746f 100644
--- a/sysdeps/m68k/s_isnanl.c
+++ b/sysdeps/m68k/s_isnanl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,10 +19,6 @@
#include <math.h>
#include "ieee754.h"
-#undef __isnanl
-#undef isnanl
-
-
/* Return nonzero if VALUE is not a number. */
int
__isnanl (long double value)
@@ -38,4 +34,5 @@ __isnanl (long double value)
((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0));
}
+hidden_def (__isnanl)
weak_alias (__isnanl, isnanl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9a08fdfeb9a36239eb1096bb54ada35d4fb03ea
commit d9a08fdfeb9a36239eb1096bb54ada35d4fb03ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:12:49 2002 +0000
(__expm1l): Add libm_hidden_def.
diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c
index cd62cb3..feee07a 100644
--- a/sysdeps/m68k/fpu/s_expm1l.c
+++ b/sysdeps/m68k/fpu/s_expm1l.c
@@ -1,2 +1,3 @@
#define FUNC expm1l
#include <s_atanl.c>
+libm_hidden_def (__expm1l)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce73ae2db24e0aa98965e7dd8b031a2f2102dc8e
commit ce73ae2db24e0aa98965e7dd8b031a2f2102dc8e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:11:47 2002 +0000
(__fpclassifyl): Add libm_hidden_def.
diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c
index 9a38900..a8cb099 100644
--- a/sysdeps/m68k/fpu/s_fpclassifyl.c
+++ b/sysdeps/m68k/fpu/s_fpclassifyl.c
@@ -1,5 +1,5 @@
/* Return classification value corresponding to argument. m68k version.
- Copyright (C) 1997,2001 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Fixed for m68k by Andreas Schwab <schwab@suse.de>.
@@ -41,3 +41,4 @@ __fpclassifyl (long double x)
return retval;
}
+libm_hidden_def (__fpclassifyl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=059d7143ed58aebe0b5f90e46d3a3c109e652f77
commit 059d7143ed58aebe0b5f90e46d3a3c109e652f77
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:10:41 2002 +0000
(INTDEFX): Remove.
(hidden_defx): Define and use.
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index d87a231..5fb43ea 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -34,7 +34,7 @@ __CONCATX(__,FUNC) (x)
return __m81_u(__CONCATX(__,FUNC))(x);
}
-#define INTDEFX(a) INTDEF(a)
-INTDEFX(__CONCATX(__,FUNC))
+#define hidden_defx(a) hidden_def(a)
+hidden_defx(__CONCATX(__,FUNC))
#define weak_aliasx(a,b) weak_alias(a,b)
weak_aliasx (__CONCATX(__,FUNC), FUNC)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3a580877e1e14a8390f1e88769362f9aca57f98
commit f3a580877e1e14a8390f1e88769362f9aca57f98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:05:50 2002 +0000
(__isinfl): Remove INTDEF. Add hidden_def.
diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c
index 89880bc..2502039 100644
--- a/sysdeps/m68k/s_isinfl.c
+++ b/sysdeps/m68k/s_isinfl.c
@@ -19,10 +19,6 @@
#include <math.h>
#include "ieee754.h"
-#undef __isinfl
-#undef isinfl
-
-
/* Return 0 if VALUE is finite or NaN, +1 if it
is +Infinity, -1 if it is -Infinity. */
int
@@ -42,5 +38,5 @@ __isinfl (long double value)
return 0;
}
-INTDEF(__isinfl)
+hidden_def (__isinfl)
weak_alias (__isinfl, isinfl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e699500013bb17e7cdde5aae9692ee0342ff07a0
commit e699500013bb17e7cdde5aae9692ee0342ff07a0
Author: Roland McGrath <roland@gnu.org>
Date: Thu Sep 5 18:51:44 2002 +0000
2002-09-04 Bruno Haible <bruno@clisp.org>
* sysdeps/unix/sysv/linux/sigset-cvt-mask.h (sigset_set_old_mask,
sigset_get_old_mask): Turn into inline functions.
* sysdeps/unix/sysv/aix/sigset-cvt-mask.h (sigset_set_old_mask,
sigset_get_old_mask): Likewise.
* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h (sigset_set_old_mask,
sigset_get_old_mask): Likewise.
diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
index 50d70ae..cc05fb7 100644
--- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
@@ -18,8 +18,16 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigset_set_old_mask(set, mask) \
- ((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0)
+static inline int __attribute__ ((unused))
+sigset_set_old_mask (sigset_t *set, int mask)
+{
+ set->__losigs = (unsigned int) mask;
+ set->__hisigs = 0;
+ return 0;
+}
-#define sigset_get_old_mask(set, mask) \
- ((unsigned int) (set)->__losigs)
+static inline int __attribute__ ((unused))
+sigset_get_old_mask (const sigset_t *set)
+{
+ return (unsigned int) set->__losigs;
+}
diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
index f647dfe..5b7ea25 100644
--- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
@@ -19,15 +19,19 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define sigset_set_old_mask(set, mask) \
- ({ \
- unsigned long int *__ptr; \
- __ptr = &(set)->__sigbits[0]; \
- __ptr[0] = (mask); \
- __ptr[1] = 0ul; \
- __ptr[2] = 0ul; \
- __ptr[3] = 0ul; \
- 0; })
+static inline int __attribute__ ((unused))
+sigset_set_old_mask (sigset_t *set, int mask)
+{
+ set->__sigbits[0] = (unsigned int) mask;
+ set->__sigbits[1] = 0ul;
+ set->__sigbits[2] = 0ul;
+ set->__sigbits[3] = 0ul;
-#define sigset_get_old_mask(set) \
- ((unsigned int) (set)->__sigbits[0])
+ return 0;
+}
+
+static inline int __attribute__ ((unused))
+sigset_get_old_mask (const sigset_t *set)
+{
+ return (unsigned int) set->__sigbits[0];
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d272f7da545a5276659f591dcba3243c20df974
commit 0d272f7da545a5276659f591dcba3243c20df974
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 29 00:00:38 2002 +0000
pipe implementation for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
new file mode 100644
index 0000000..1e7ec1c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/alpha/pipe.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d86c4cf889f58e768d4a1dc25157dc69bfc8d0ef
commit d86c4cf889f58e768d4a1dc25157dc69bfc8d0ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 23:58:20 2002 +0000
(ECANCELED): Define to ECANCELLED if not defined by kernel headers.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
index 4d75ff1..003d71f 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux/HPPA specific version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,9 @@
/* Linux also has no ECANCELED error code. Since it is not used here
we define it to an invalid value. */
-# define ECANCELED 125
+# ifndef ECANCELED
+# define ECANCELED ECANCELLED
+# endif
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
@@ -44,6 +46,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__));
define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
defined. */
# define EDOM 33 /* Math argument out of domain of function. */
-# define EILSEQ 84 /* Illegal byte sequence. */
+# define EILSEQ 47 /* Illegal byte sequence. */
# define ERANGE 34 /* Math result not representable. */
#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50d9769d4b242ac20289d0880531cba5f65ed913
commit 50d9769d4b242ac20289d0880531cba5f65ed913
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 23:58:00 2002 +0000
Error codes for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/errno.h b/sysdeps/unix/sysv/linux/alpha/bits/errno.h
new file mode 100644
index 0000000..9cdc167
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/errno.h
@@ -0,0 +1,52 @@
+/* Error constants. Linux/Alpha specific version.
+ Copyright (C) 1996, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifdef _ERRNO_H
+
+# undef EDOM
+# undef EILSEQ
+# undef ERANGE
+# include <linux/errno.h>
+
+/* Linux has no ENOTSUP error code. */
+# define ENOTSUP EOPNOTSUPP
+
+# ifndef ECANCELED
+# define ECANCELED 131
+# endif
+
+# ifndef __ASSEMBLER__
+/* Function to get address of global `errno' variable. */
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+
+# if !defined _LIBC || defined _LIBC_REENTRANT
+/* When using threads, errno is a per-thread value. */
+# define errno (*__errno_location ())
+# endif
+# endif /* !__ASSEMBLER__ */
+#endif /* _ERRNO_H */
+
+#if !defined _ERRNO_H && defined __need_Emath
+/* This is ugly but the kernel header is not clean enough. We must
+ define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
+ defined. */
+# define EDOM 33 /* Math argument out of domain of function. */
+# define EILSEQ 116 /* Illegal byte sequence. */
+# define ERANGE 34 /* Math result not representable. */
+#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6735862339ddbbd9a4ad1503fa39dd6cc135db6e
commit 6735862339ddbbd9a4ad1503fa39dd6cc135db6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 23:55:01 2002 +0000
(libc): Add #errlist-compat comments at GLIBC_2.0, GLIBC_2.1 and GLIBC_2.3.
(librt): Add aio_cancel and aio_cancel64 as GLIBC_2.3.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index c18816c..89ec9db 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -1,5 +1,14 @@
libc {
+ # The comment lines with "#errlist-compat" are magic; see
+ # sysdeps/gnu/errlist-compat.awk.
+ # When you get an error from errlist-compat.awk, you need to add a new
+ # version here. Don't do this blindly, since this means changing the ABI
+ # for all GNU/Linux configurations.
+
GLIBC_2.0 {
+ #errlist-compat 131
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
# Unfortunately in wider use.
_inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse;
_hae_shift;
@@ -24,6 +33,9 @@ libc {
pciconfig_read; pciconfig_write; sethae;
}
GLIBC_2.1 {
+ #errlist-compat 131
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
# Linux/Alpha 64-bit timeval functions.
__select; select;
adjtime; adjtimex; __adjtimex;
@@ -57,4 +69,14 @@ libc {
# w*
wordexp;
}
+ GLIBC_2.3 {
+ #errlist-compat 132
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
+}
+librt {
+ GLIBC_2.3 {
+ # AIO functions.
+ aio_cancel; aio_cancel64;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
index 475fbe1..e15c822 100644
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -1,6 +1,25 @@
libc {
+ # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
+ # When you get an error from errlist-compat.awk, you need to add a new
+ # version here. Don't do this blindly, since this means changing the ABI
+ # for all GNU/Linux configurations.
+
+ GLIBC_2.1 {
+ #errlist-compat 253
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
GLIBC_2.2 {
# New rlimit interface
getrlimit; setrlimit; getrlimit64; setrlimit64;
}
-}
\ No newline at end of file
+ GLIBC_2.3 {
+ #errlist-compat 254
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
+}
+librt {
+ GLIBC_2.3 {
+ # AIO functions.
+ aio_cancel; aio_cancel64;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c605f50136059c6084994fc489f3481235e4281
commit 0c605f50136059c6084994fc489f3481235e4281
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 23:53:22 2002 +0000
(libc): Add #errlist-compat comments at GLIBC_2.0, GLIBC_2.1 and GLIBC_2.3.
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index f71d9b5..1569885 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -1,5 +1,13 @@
libc {
+ # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
+ # When you get an error from errlist-compat.awk, you need to add a new
+ # version here. Don't do this blindly, since this means changing the ABI
+ # for all GNU/Linux configurations.
+
GLIBC_2.0 {
+ #errlist-compat 1134
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;
__frame_state_for; __register_frame_info_table;
@@ -13,8 +21,16 @@ libc {
# s*
sysmips;
}
+ GLIBC_2.1 {
+ #errlist-compat 1134
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
GLIBC_2.2 {
# _*
_test_and_set;
}
+ GLIBC_2.3 {
+ #errlist-compat 1134
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efd36212ebeebf88a6cd2bb77e726a2787af09f5
commit efd36212ebeebf88a6cd2bb77e726a2787af09f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 22:15:36 2002 +0000
Regenerated.
diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure
index 3346b8e..ab3c093 100644
--- a/sysdeps/alpha/elf/configure
+++ b/sysdeps/alpha/elf/configure
@@ -58,3 +58,38 @@ EOF
fi
fi
+
+echo $ac_n "checking for GP relative module local relocs""... $ac_c" 1>&6
+echo "configure:20: checking for GP relative module local relocs" >&5
+if eval "test \"`echo '$''{'libc_cv_alpha_hidden_gprel'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<\EOF
+static int bar;
+int baz __attribute__((visibility("hidden")));
+
+int foo (void)
+{
+ return bar + baz;
+}
+EOF
+
+libc_cv_alpha_hidden_gprel=no
+if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'; { (eval echo configure:35: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if grep -q 'bar.*!gprel' conftest.s \
+ && grep -q 'baz.*!gprel' conftest.s \
+ && ! grep -q 'bar.*!literal' conftest.s \
+ && ! grep -q 'baz.*!literal' conftest.s; then
+ libc_cv_alpha_hidden_gprel=yes
+ fi
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_alpha_hidden_gprel" 1>&6
+if test $libc_cv_alpha_hidden_gprel = yes; then
+ cat >> confdefs.h <<\EOF
+#define PI_STATIC_AND_HIDDEN 1
+EOF
+
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d131243dfcd2c1fedb7b6fa009257ad471d22b4
commit 9d131243dfcd2c1fedb7b6fa009257ad471d22b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 22:15:22 2002 +0000
(libc_cv_alpha_hidden_gprel): New check.
(PI_STATIC_AND_HIDDEN): Define if check succeeded.
diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in
index 7548046..29daf4f 100644
--- a/sysdeps/alpha/elf/configure.in
+++ b/sysdeps/alpha/elf/configure.in
@@ -51,3 +51,29 @@ if test $libc_cv_alpha_tls = yes; then
AC_DEFINE(HAVE_TLS_SUPPORT)
fi
fi
+
+AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
+cat > conftest.c <<\EOF
+static int bar;
+int baz __attribute__((visibility("hidden")));
+
+int foo (void)
+{
+ return bar + baz;
+}
+EOF
+dnl
+
+libc_cv_alpha_hidden_gprel=no
+if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AC_FD_CC); then
+ if grep -q 'bar.*!gprel' conftest.s \
+ && grep -q 'baz.*!gprel' conftest.s \
+ && ! grep -q 'bar.*!literal' conftest.s \
+ && ! grep -q 'baz.*!literal' conftest.s; then
+ libc_cv_alpha_hidden_gprel=yes
+ fi
+fi
+rm -f conftest*])
+if test $libc_cv_alpha_hidden_gprel = yes; then
+ AC_DEFINE(PI_STATIC_AND_HIDDEN)
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbb3856d85b5c42826e6172b81991d5fd867f064
commit bbb3856d85b5c42826e6172b81991d5fd867f064
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 21:26:20 2002 +0000
Avoid unescaped newlines in string constants.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index aeee1d7..9905d15 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -126,14 +126,15 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
and then redirect to the address it returns. */
// macro for handling PIC situation....
#ifdef PIC
-#define CALL_ROUTINE(x) " ldr sl,0f
- add sl, pc, sl
-1: ldr r2, 2f
- mov lr, pc
- add pc, sl, r2
- b 3f
-0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4
-2: .word " #x "(GOTOFF)
+#define CALL_ROUTINE(x) "\
+ ldr sl,0f\n\
+ add sl, pc, sl\n\
+1: ldr r2, 2f\n\
+ mov lr, pc\n\
+ add pc, sl, r2\n\
+ b 3f\n\
+0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4\n\
+2: .word " #x "(GOTOFF)\n\
3: "
#else
#define CALL_ROUTINE(x) " bl " #x
@@ -141,114 +142,114 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#ifndef PROF
# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text
- .globl _dl_runtime_resolve
- .type _dl_runtime_resolve, #function
- .align 2
-_dl_runtime_resolve:
- @ we get called with
- @ stack[0] contains the return address from this call
- @ ip contains &GOT[n+3] (pointer to function)
- @ lr points to &GOT[2]
-
- @ save almost everything; lr is already on the stack
- stmdb sp!,{r0-r3,sl,fp}
-
- @ prepare to call fixup()
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
- sub r1, ip, lr
- sub r1, r1, #4
- add r1, r1, r1
-
- @ get pointer to linker struct
- ldr r0, [lr, #-4]
-
- @ call fixup routine
- " CALL_ROUTINE(fixup) "
-
- @ save the return
- mov ip, r0
-
- @ restore the stack
- ldmia sp!,{r0-r3,sl,fp,lr}
-
- @ jump to the newly found address
- mov pc, ip
-
- .size _dl_runtime_resolve, .-_dl_runtime_resolve
-
- .globl _dl_runtime_profile
- .type _dl_runtime_profile, #function
- .align 2
-_dl_runtime_profile:
- @ save almost everything; lr is already on the stack
- stmdb sp!,{r0-r3,sl,fp}
-
- @ prepare to call fixup()
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
- sub r1, ip, lr
- sub r1, r1, #4
- add r1, r1, r1
-
- @ get pointer to linker struct
- ldr r0, [lr, #-4]
-
- @ call profiling fixup routine
- " CALL_ROUTINE(profile_fixup) "
-
- @ save the return
- mov ip, r0
-
- @ restore the stack
- ldmia sp!,{r0-r3,sl,fp,lr}
-
- @ jump to the newly found address
- mov pc, ip
-
- .size _dl_runtime_resolve, .-_dl_runtime_resolve
- .previous
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve, #function\n\
+ .align 2\n\
+_dl_runtime_resolve:\n\
+ @ we get called with\n\
+ @ stack[0] contains the return address from this call\n\
+ @ ip contains &GOT[n+3] (pointer to function)\n\
+ @ lr points to &GOT[2]\n\
+\n\
+ @ save almost everything; lr is already on the stack\n\
+ stmdb sp!,{r0-r3,sl,fp}\n\
+\n\
+ @ prepare to call fixup()\n\
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+ sub r1, ip, lr\n\
+ sub r1, r1, #4\n\
+ add r1, r1, r1\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
+\n\
+ @ call fixup routine\n\
+ " CALL_ROUTINE(fixup) "\n\
+\n\
+ @ save the return\n\
+ mov ip, r0\n\
+\n\
+ @ restore the stack\n\
+ ldmia sp!,{r0-r3,sl,fp,lr}\n\
+\n\
+ @ jump to the newly found address\n\
+ mov pc, ip\n\
+\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_profile, #function\n\
+ .align 2\n\
+_dl_runtime_profile:\n\
+ @ save almost everything; lr is already on the stack\n\
+ stmdb sp!,{r0-r3,sl,fp}\n\
+\n\
+ @ prepare to call fixup()\n\
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+ sub r1, ip, lr\n\
+ sub r1, r1, #4\n\
+ add r1, r1, r1\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
+\n\
+ @ call profiling fixup routine\n\
+ " CALL_ROUTINE(profile_fixup) "\n\
+\n\
+ @ save the return\n\
+ mov ip, r0\n\
+\n\
+ @ restore the stack\n\
+ ldmia sp!,{r0-r3,sl,fp,lr}\n\
+\n\
+ @ jump to the newly found address\n\
+ mov pc, ip\n\
+\n\
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
+ .previous\n\
");
#else // PROF
# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text
- .globl _dl_runtime_resolve
- .globl _dl_runtime_profile
- .type _dl_runtime_resolve, #function
- .type _dl_runtime_profile, #function
- .align 2
-_dl_runtime_resolve:
-_dl_runtime_profile:
- @ we get called with
- @ stack[0] contains the return address from this call
- @ ip contains &GOT[n+3] (pointer to function)
- @ lr points to &GOT[2]
-
- @ save almost everything; return add is already on the stack
- stmdb sp!,{r0-r3,sl,fp}
-
- @ prepare to call fixup()
- @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
- sub r1, ip, lr
- sub r1, r1, #4
- add r1, r1, r1
-
- @ get pointer to linker struct
- ldr r0, [lr, #-4]
-
- @ call profiling fixup routine
- " CALL_ROUTINE(fixup) "
-
- @ save the return
- mov ip, r0
-
- @ restore the stack
- ldmia sp!,{r0-r3,sl,fp,lr}
-
- @ jump to the newly found address
- mov pc, ip
-
- .size _dl_runtime_profile, .-_dl_runtime_profile
- .previous
+ .text\n\
+ .globl _dl_runtime_resolve\n\
+ .globl _dl_runtime_profile\n\
+ .type _dl_runtime_resolve, #function\n\
+ .type _dl_runtime_profile, #function\n\
+ .align 2\n\
+_dl_runtime_resolve:\n\
+_dl_runtime_profile:\n\
+ @ we get called with\n\
+ @ stack[0] contains the return address from this call\n\
+ @ ip contains &GOT[n+3] (pointer to function)\n\
+ @ lr points to &GOT[2]\n\
+\n\
+ @ save almost everything; return add is already on the stack\n\
+ stmdb sp!,{r0-r3,sl,fp}\n\
+\n\
+ @ prepare to call fixup()\n\
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each\n\
+ sub r1, ip, lr\n\
+ sub r1, r1, #4\n\
+ add r1, r1, r1\n\
+\n\
+ @ get pointer to linker struct\n\
+ ldr r0, [lr, #-4]\n\
+\n\
+ @ call profiling fixup routine\n\
+ " CALL_ROUTINE(fixup) "\n\
+\n\
+ @ save the return\n\
+ mov ip, r0\n\
+\n\
+ @ restore the stack\n\
+ ldmia sp!,{r0-r3,sl,fp,lr}\n\
+\n\
+ @ jump to the newly found address\n\
+ mov pc, ip\n\
+\n\
+ .size _dl_runtime_profile, .-_dl_runtime_profile\n\
+ .previous\n\
");
#endif //PROF
@@ -261,70 +262,70 @@ _dl_runtime_profile:
its return value is the user program's entry point. */
#define RTLD_START asm ("\
-.text
-.globl _start
-.globl _dl_start_user
-_start:
- @ at start time, all the args are on the stack
- mov r0, sp
- bl _dl_start
- @ returns user entry point in r0
-_dl_start_user:
- mov r6, r0
- @ we are PIC code, so get global offset table
- ldr sl, .L_GET_GOT
- add sl, pc, sl
-.L_GOT_GOT:
- @ Store the highest stack address
- ldr r1, .L_STACK_END
- ldr r1, [sl, r1]
- str sp, [r1]
- @ See if we were run as a command with the executable file
- @ name as an extra leading argument.
- ldr r4, .L_SKIP_ARGS
- ldr r4, [sl, r4]
- @ get the original arg count
- ldr r1, [sp]
- @ subtract _dl_skip_args from it
- sub r1, r1, r4
- @ adjust the stack pointer to skip them
- add sp, sp, r4, lsl #2
- @ get the argv address
- add r2, sp, #4
- @ store the new argc in the new stack location
- str r1, [sp]
- @ compute envp
- add r3, r2, r1, lsl #2
- add r3, r3, #4
-
- @ now we call _dl_init
- ldr r0, .L_LOADED
- ldr r0, [sl, r0]
- ldr r0, [r0]
- @ call _dl_init
- bl _dl_init_internal(PLT)
- @ clear the startup flag
- ldr r2, .L_STARTUP_FLAG
- ldr r1, [sl, r2]
- mov r0, #0
- str r0, [r1]
- @ load the finalizer function
- ldr r0, .L_FINI_PROC
- ldr r0, [sl, r0]
- @ jump to the user_s entry point
- mov pc, r6
-.L_GET_GOT:
- .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\
-.L_SKIP_ARGS: \n\
- .word _dl_skip_args(GOTOFF) \n\
-.L_STARTUP_FLAG:
- .word _dl_starting_up(GOT)
-.L_FINI_PROC:
- .word _dl_fini(GOT)
-.L_STACK_END:
- .word __libc_stack_end(GOT)
-.L_LOADED:
- .word _rtld_local(GOT)
+.text\n\
+.globl _start\n\
+.globl _dl_start_user\n\
+_start:\n\
+ @ at start time, all the args are on the stack\n\
+ mov r0, sp\n\
+ bl _dl_start\n\
+ @ returns user entry point in r0\n\
+_dl_start_user:\n\
+ mov r6, r0\n\
+ @ we are PIC code, so get global offset table\n\
+ ldr sl, .L_GET_GOT\n\
+ add sl, pc, sl\n\
+.L_GOT_GOT:\n\
+ @ Store the highest stack address\n\
+ ldr r1, .L_STACK_END\n\
+ ldr r1, [sl, r1]\n\
+ str sp, [r1]\n\
+ @ See if we were run as a command with the executable file\n\
+ @ name as an extra leading argument.\n\
+ ldr r4, .L_SKIP_ARGS\n\
+ ldr r4, [sl, r4]\n\
+ @ get the original arg count\n\
+ ldr r1, [sp]\n\
+ @ subtract _dl_skip_args from it\n\
+ sub r1, r1, r4\n\
+ @ adjust the stack pointer to skip them\n\
+ add sp, sp, r4, lsl #2\n\
+ @ get the argv address\n\
+ add r2, sp, #4\n\
+ @ store the new argc in the new stack location\n\
+ str r1, [sp]\n\
+ @ compute envp\n\
+ add r3, r2, r1, lsl #2\n\
+ add r3, r3, #4\n\
+\n\
+ @ now we call _dl_init\n\
+ ldr r0, .L_LOADED\n\
+ ldr r0, [sl, r0]\n\
+ ldr r0, [r0]\n\
+ @ call _dl_init\n\
+ bl _dl_init_internal(PLT)\n\
+ @ clear the startup flag\n\
+ ldr r2, .L_STARTUP_FLAG\n\
+ ldr r1, [sl, r2]\n\
+ mov r0, #0\n\
+ str r0, [r1]\n\
+ @ load the finalizer function\n\
+ ldr r0, .L_FINI_PROC\n\
+ ldr r0, [sl, r0]\n\
+ @ jump to the user_s entry point\n\
+ mov pc, r6\n\
+.L_GET_GOT:\n\
+ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4\n\
+.L_SKIP_ARGS:\n\
+ .word _dl_skip_args(GOTOFF)\n\
+.L_STARTUP_FLAG:\n\
+ .word _dl_starting_up(GOT)\n\
+.L_FINI_PROC:\n\
+ .word _dl_fini(GOT)\n\
+.L_STACK_END:\n\
+ .word __libc_stack_end(GOT)\n\
+.L_LOADED:\n\
+ .word _rtld_local(GOT)\n\
.previous\n\
");
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 51ae43d..0fa13a7 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -129,27 +129,27 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
and the link map in MOF. */
#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
-"; Trampoline for " #fixup_name "
- .globl " #tramp_name "
- .type " #tramp_name ", @function
-" #tramp_name ":
- push $r13
- push $r12
- push $r11
- push $r10
- push $r9
- push $srp
- move.d [$sp+6*4],$r11
- move $mof,$r10
- " CALL_FN (fixup_name) "
- move.d $r10,[$sp+6*4]
- pop $srp
- pop $r9
- pop $r10
- pop $r11
- pop $r12
- pop $r13
- jump [$sp+]
+"; Trampoline for " #fixup_name "\n\
+ .globl " #tramp_name "\n\
+ .type " #tramp_name ", @function\n\
+" #tramp_name ":\n\
+ push $r13\n\
+ push $r12\n\
+ push $r11\n\
+ push $r10\n\
+ push $r9\n\
+ push $srp\n\
+ move.d [$sp+6*4],$r11\n\
+ move $mof,$r10\n\
+ " CALL_FN (fixup_name) "\n\
+ move.d $r10,[$sp+6*4]\n\
+ pop $srp\n\
+ pop $r9\n\
+ pop $r10\n\
+ pop $r11\n\
+ pop $r12\n\
+ pop $r13\n\
+ jump [$sp+]\n\
.size " #tramp_name ", . - " #tramp_name "\n"
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
@@ -172,60 +172,60 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
its return value is the user program's entry point. */
#define RTLD_START asm ("\
- .text
- .globl _start
- .type _start,@function
-_start:
- move.d $sp,$r10
- " CALL_FN (_dl_start) "
- /* FALLTHRU */
-
- .globl _dl_start_user
- .type _dl_start_user,@function
-_dl_start_user:
- ; Save the user entry point address in R1.
- move.d $r10,$r1
- ; Point R0 at the GOT.
- move.d $pc,$r0
- sub.d .:GOTOFF,$r0
- ; Remember the highest stack address.
- move.d [$r0+__libc_stack_end:GOT16],$r13
- move.d $sp,[$r13]
- ; See if we were run as a command with the executable file
- ; name as an extra leading argument.
- move.d [$r0+_dl_skip_args:GOT16],$r13
- move.d [$r13],$r9
- ; Get the original argument count
- move.d [$sp],$r11
- ; Subtract _dl_skip_args from it.
- sub.d $r9,$r11
- ; Adjust the stack pointer to skip _dl_skip_args words.
- addi $r9.d,$sp
- ; Put the new argc in place as expected by the user entry.
- move.d $r11,[$sp]
- ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
- ; env: skip scaled argc and skip stored argc and NULL at end of argv[].
- move.d $sp,$r13
- addi $r11.d,$r13
- addq 8,$r13
- ; argv: skip stored argc.
- move.d $sp,$r12
- addq 4,$r12
- ; main_map: at _dl_loaded.
- move.d [$r0+_rtld_local:GOT16],$r9
- move.d [$r9],$r10
- move.d _dl_init_internal:PLTG,$r9
- add.d $r0,$r9
- jsr $r9
- ; Pass our finalizer function to the user in R10.
- move.d [$r0+_dl_fini:GOT16],$r10
- ; Terminate the frame-pointer.
- moveq 0,$r8
- ; Cause SEGV if user entry returns.
- move $r8,$srp
- ; Jump to the user's entry point.
- jump $r1
- .size _dl_start_user, . - _dl_start_user
+ .text\n\
+ .globl _start\n\
+ .type _start,@function\n\
+_start:\n\
+ move.d $sp,$r10\n\
+ " CALL_FN (_dl_start) "\n\
+ /* FALLTHRU */\n\
+\n\
+ .globl _dl_start_user\n\
+ .type _dl_start_user,@function\n\
+_dl_start_user:\n\
+ ; Save the user entry point address in R1.\n\
+ move.d $r10,$r1\n\
+ ; Point R0 at the GOT.\n\
+ move.d $pc,$r0\n\
+ sub.d .:GOTOFF,$r0\n\
+ ; Remember the highest stack address.\n\
+ move.d [$r0+__libc_stack_end:GOT16],$r13\n\
+ move.d $sp,[$r13]\n\
+ ; See if we were run as a command with the executable file\n\
+ ; name as an extra leading argument.\n\
+ move.d [$r0+_dl_skip_args:GOT16],$r13\n\
+ move.d [$r13],$r9\n\
+ ; Get the original argument count\n\
+ move.d [$sp],$r11\n\
+ ; Subtract _dl_skip_args from it.\n\
+ sub.d $r9,$r11\n\
+ ; Adjust the stack pointer to skip _dl_skip_args words.\n\
+ addi $r9.d,$sp\n\
+ ; Put the new argc in place as expected by the user entry.\n\
+ move.d $r11,[$sp]\n\
+ ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
+ ; env: skip scaled argc and skip stored argc and NULL at end of argv[].\n\
+ move.d $sp,$r13\n\
+ addi $r11.d,$r13\n\
+ addq 8,$r13\n\
+ ; argv: skip stored argc.\n\
+ move.d $sp,$r12\n\
+ addq 4,$r12\n\
+ ; main_map: at _dl_loaded.\n\
+ move.d [$r0+_rtld_local:GOT16],$r9\n\
+ move.d [$r9],$r10\n\
+ move.d _dl_init_internal:PLTG,$r9\n\
+ add.d $r0,$r9\n\
+ jsr $r9\n\
+ ; Pass our finalizer function to the user in R10.\n\
+ move.d [$r0+_dl_fini:GOT16],$r10\n\
+ ; Terminate the frame-pointer.\n\
+ moveq 0,$r8\n\
+ ; Cause SEGV if user entry returns.\n\
+ move $r8,$srp\n\
+ ; Jump to the user's entry point.\n\
+ jump $r1\n\
+ .size _dl_start_user, . - _dl_start_user\n\
.previous");
/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index a0105ae..34a92eb 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -32,12 +32,12 @@ extern int rtc_upper (void);
extern int rtc_lower (void);
/* Assembler Routines to access the timer registers */
-asm("
-.rtc_upper: mfspr 3,4 # copy RTCU to return register
- blr
-
-.rtc_lower: mfspr 3,5 # copy RTCL to return register
- blr
+asm("\n\
+.rtc_upper: mfspr 3,4 # copy RTCU to return register\n\
+ blr\n\
+\n\
+.rtc_lower: mfspr 3,5 # copy RTCL to return register\n\
+ blr\n\
");
/* Get the current time of day and timezone information,
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
index ab9a155..bece6d5 100644
--- a/sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -51,15 +51,15 @@
static void __attribute__ ((unused))
__dummy__ (void)
{
- asm ("
-catch_segfault:
- move.l 12(%%sp),%%a0
- lea %c0(%%a0),%%a0
- /* Clear the first 4 bytes to make it a null fp state, just
- in case the handler does return. */
- clr.l (%%a0)+
- movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)
- fmovem.x %%fp2-%%fp7,11*4(%%a0)
+ asm ("\n\
+catch_segfault:\n\
+ move.l 12(%%sp),%%a0\n\
+ lea %c0(%%a0),%%a0\n\
+ /* Clear the first 4 bytes to make it a null fp state, just\n\
+ in case the handler does return. */\n\
+ clr.l (%%a0)+\n\
+ movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\
+ fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\
jra real_catch_segfault"
: : "n" (offsetof (struct sigcontext, sc_fpstate)));
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48fa58aa122ab1ba5068b8455f7ece92c9767e94
commit 48fa58aa122ab1ba5068b8455f7ece92c9767e94
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 08:54:42 2002 +0000
Add dl-brk.S.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index d80c5c2..63e68d3 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,6 +1,7 @@
alpha/ptrace.h
alpha/regdef.h
clone.S
+dl-brk.S
ieee_get_fp_control.S
ieee_set_fp_control.S
ioperm.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=658e7fb4a4d645c7acefe8a6a0a47ba2ac27970d
commit 658e7fb4a4d645c7acefe8a6a0a47ba2ac27970d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 08:39:11 2002 +0000
Extra files to distribute for SunOS <= 4.
diff --git a/sysdeps/unix/bsd/sun/Dist b/sysdeps/unix/bsd/sun/Dist
new file mode 100644
index 0000000..ccd3a61
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/Dist
@@ -0,0 +1 @@
+m68k/dl-brk.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbc364a939134b1a1ecb5440f4ce32d4d982894c
commit bbc364a939134b1a1ecb5440f4ce32d4d982894c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 08:36:00 2002 +0000
Extra files to distribute for OSF.
diff --git a/sysdeps/unix/bsd/osf/Dist b/sysdeps/unix/bsd/osf/Dist
new file mode 100644
index 0000000..e792f44
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/Dist
@@ -0,0 +1 @@
+alpha/dl-brk.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00167bfefd79c51240e4d6d38f9d3cab4d090ba8
commit 00167bfefd79c51240e4d6d38f9d3cab4d090ba8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 08:35:02 2002 +0000
Extra files to distribute on HP.
diff --git a/sysdeps/unix/bsd/hp/Dist b/sysdeps/unix/bsd/hp/Dist
new file mode 100644
index 0000000..ccd3a61
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/Dist
@@ -0,0 +1 @@
+m68k/dl-brk.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2547aab14a8ae5e92f236eda22b294b1f4a311dd
commit 2547aab14a8ae5e92f236eda22b294b1f4a311dd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 28 08:30:53 2002 +0000
Additional files to distribute for Unix on Arm.
diff --git a/sysdeps/unix/arm/Dist b/sysdeps/unix/arm/Dist
new file mode 100644
index 0000000..7785d5e
--- /dev/null
+++ b/sysdeps/unix/arm/Dist
@@ -0,0 +1 @@
+dl-brk.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b45f2816804954e716bece202614a33e0f31d716
commit b45f2816804954e716bece202614a33e0f31d716
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 27 16:06:03 2002 +0000
Add sys/user.h.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index dd43ebc..1d74119 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -9,4 +9,5 @@ sys/cachectl.h
sys/procfs.h
sys/sysmips.h
sys/tas.h
+sys/user.h
xstatconv.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e1676a5fd2d482ea21cfed88f01196df1f2a85a
commit 5e1676a5fd2d482ea21cfed88f01196df1f2a85a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 27 15:52:10 2002 +0000
Extra files to distribute for Hurd/Alpha.
diff --git a/sysdeps/mach/hurd/alpha/Dist b/sysdeps/mach/hurd/alpha/Dist
new file mode 100644
index 0000000..c581802
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/Dist
@@ -0,0 +1 @@
+static-start.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc2a913308e7afa99baed7bc70bdcd29066601c1
commit bc2a913308e7afa99baed7bc70bdcd29066601c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 27 12:07:22 2002 +0000
Add bits/link.h.
diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist
index d78de40..441c9ba 100644
--- a/sysdeps/arm/Dist
+++ b/sysdeps/arm/Dist
@@ -1 +1,2 @@
ieee754.h
+bits/link.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a59ce67bf40b3fda7da104eb39cd094f28d847f
commit 0a59ce67bf40b3fda7da104eb39cd094f28d847f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 27 09:22:36 2002 +0000
2002-08-26 Roland McGrath <roland@redhat.com>
* sysdeps/gnu/Versions: New file.
* sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.1): Remove
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr; from here.
* sysdeps/gnu/Makefile ($(..)sysdeps/gnu/errlist-compat.c): New target.
($(objpfx)errlist.d): Depend on $(..)sysdeps/gnu/errlist-compat.c.
* sysdeps/gnu/errlist.awk: Make output define _sys_errlist_internal
and _sys_nerr_internal instead of anything else. Make it include
"errlist-compat.c" if [!NOT_IN_libc && !ERRLIST_NO_COMPAT].
Make it emit some asm magic if [EMIT_ERR_MAX].
* sysdeps/gnu/errlist.c: Regenerated.
* sysdeps/gnu/errlist-compat.awk: New file.
* sysdeps/gnu/errlist-compat.c: New file (generated).
* sysdeps/mach/hurd/errlist.c (ERRLIST_NO_COMPAT): New macro.
(_sys_errlist_internal): Define this as a macro for _hurd_errlist.
(_sys_nerr_internal): Define this is a macro for _hurd_nerr.
(SYS_ERRLIST, SYS_NERR): Macros removed.
(sys_nerr, _sys_nerr): Remove these weak aliases.
* sysdeps/unix/sysv/linux/errlist.c: File removed.
* sysdeps/unix/sysv/linux/errlist.h: File removed.
* sysdeps/unix/sysv/linux/arm/errlist.c: File removed.
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
deleted file mode 100644
index ba8c44b..0000000
--- a/sysdeps/unix/sysv/linux/arm/errlist.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sizes.h>
-#include <errlist.h>
-#include <shlib-compat.h>
-
-#define SYS_ERRLIST __new_sys_errlist
-#define SYS_NERR __new_sys_nerr
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-asm (".data; .globl __old_sys_errlist; __old_sys_errlist:");
-#endif
-
-#include <sysdeps/gnu/errlist.c>
-
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-asm (".type __old_sys_errlist,%object;.size __old_sys_errlist,"
- OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
-
-extern const char *const *__old_sys_errlist;
-
-const int __old_sys_nerr = OLD_ERRLIST_SIZE;
-
-strong_alias (__old_sys_nerr, _old_sys_nerr);
-compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
-compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
-strong_alias (__old_sys_errlist, _old_sys_errlist);
-compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
-compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
-#endif
-
-strong_alias (__new_sys_nerr, _new_sys_nerr)
-versioned_symbol (libc, __new_sys_nerr, _sys_nerr, GLIBC_2_1);
-versioned_symbol (libc, _new_sys_nerr, sys_nerr, GLIBC_2_1);
-strong_alias (__new_sys_errlist, _new_sys_errlist)
-versioned_symbol (libc, __new_sys_errlist, _sys_errlist, GLIBC_2_1);
-versioned_symbol (libc, _new_sys_errlist, sys_errlist, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1717fd72fb6af42b85c6bc0612c5c22820dccb0f
commit 1717fd72fb6af42b85c6bc0612c5c22820dccb0f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 27 02:43:04 2002 +0000
2002-08-26 Roland McGrath <roland@redhat.com>
* sysdeps/generic/sigset-cvt-mask.h (sigset_set_old_mask): Replace
macro with inline function.
(sigset_get_old_mask): Likewise.
* sysdeps/posix/sigblock.c (__sigblock): Update callers.
* sysdeps/posix/sigsetmask.c (__sigsetmask): Likewise.
* sysdeps/posix/sigpause.c (__sigpause): Likewise.
* sysdeps/posix/sigvec.c (__sigvec, sigvec_wrapper_handler): Likewise.
* sysdeps/unix/sysv/aix/sigset-cvt-mask.h
(sigset_set_old_mask, sigset_get_old_mask): Make these macros return
values.
* sysdeps/unix/sysv/linux/sigset-cvt-mask.h: Likewise.
* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h: Likewise.
diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
index 762144e..50d70ae 100644
--- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
@@ -1,6 +1,6 @@
/* Convert between lowlevel sigmask and libc representation of sigset_t.
AIX version.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,10 +19,7 @@
02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
- do { \
- (set)->__losigs = (unsigned int) mask; \
- (set)->__hisigs = 0; \
- } while (0)
+ ((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0)
#define sigset_get_old_mask(set, mask) \
- ((mask) = (unsigned int) (set)->__losigs)
+ ((unsigned int) (set)->__losigs)
diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
index 7b082f7..f647dfe 100644
--- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
@@ -1,6 +1,6 @@
/* Convert between lowlevel sigmask and libc representation of sigset_t.
SysVr4 version.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joe Keane <jgk@jgk.org>.
@@ -20,14 +20,14 @@
02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
- do { \
+ ({ \
unsigned long int *__ptr; \
__ptr = &(set)->__sigbits[0]; \
__ptr[0] = (mask); \
__ptr[1] = 0ul; \
__ptr[2] = 0ul; \
__ptr[3] = 0ul; \
- } while (0)
+ 0; })
-#define sigset_get_old_mask(set, mask) \
- ((mask) = (unsigned int) (set)->__sigbits[0])
+#define sigset_get_old_mask(set) \
+ ((unsigned int) (set)->__sigbits[0])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f22dc06d3d24942b7c65cd6f593d35e18c2f8f32
commit f22dc06d3d24942b7c65cd6f593d35e18c2f8f32
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 26 22:39:52 2002 +0000
2002-08-26 Brian Youmans <3diff@gnu.org>
* crypt/crypt.c: Changed copying permission notice to Lesser GPL
from Library GPL.
* crypt/crypt_util.c: Likewise.
* crypt/ufc.c: Likewise.
* elf/dl-conflict.c: Likewise.
* elf/dl-iteratephdr.c: Likewise.
* iconv/iconvconfig.h: Likewise.
* linuxthreads/Examples/ex10.c: Likewise.
* linuxthreads/Examples/ex11.c: Likewise.
* linuxthreads/Examples/ex13.c: Likewise.
* linuxthreads/Examples/ex8.c: Likewise.
* linuxthreads/Examples/ex9.c: Likewise.
* linuxthreads/barrier.c: Likewise.
* linuxthreads/events.c: Likewise.
* linuxthreads/lockfile.c: Likewise.
* linuxthreads/no-tsd.c: Likewise.
* linuxthreads/pt-machine.c: Likewise.
* linuxthreads/ptclock_gettime.c: Likewise.
* linuxthreads/ptclock_settime.c: Likewise.
* linuxthreads/rwlock.c: Likewise.
* linuxthreads/sysdeps/alpha/pspinlock.c: Likewise.
* linuxthreads/sysdeps/alpha/pt-machine.h: Likewise.
* linuxthreads/sysdeps/arm/pspinlock.c: Likewise.
* linuxthreads/sysdeps/arm/pt-machine.h: Likewise.
* linuxthreads/sysdeps/cris/pspinlock.c: Likewise.
* linuxthreads/sysdeps/cris/pt-machine.h: Likewise.
* linuxthreads/sysdeps/hppa/pspinlock.c: Likewise.
* linuxthreads/sysdeps/hppa/pt-machine.h: Likewise.
* linuxthreads/sysdeps/i386/i686/pt-machine.h: Likewise.
* linuxthreads/sysdeps/i386/pspinlock.c: Likewise.
* linuxthreads/sysdeps/i386/pt-machine.h: Likewise.
* linuxthreads/sysdeps/i386/useldt.h: Likewise.
* linuxthreads/sysdeps/ia64/pspinlock.c: Likewise.
* linuxthreads/sysdeps/ia64/pt-machine.h: Likewise.
* linuxthreads/sysdeps/m68k/pspinlock.c: Likewise.
* linuxthreads/sysdeps/m68k/pt-machine.h: Likewise.
* linuxthreads/sysdeps/mips/pspinlock.c: Likewise.
* linuxthreads/sysdeps/mips/pt-machine.h: Likewise.
* linuxthreads/sysdeps/powerpc/pspinlock.c: Likewise.
* linuxthreads/sysdeps/powerpc/pt-machine.h: Likewise.
* linuxthreads/sysdeps/pthread/bits/initspin.h: Likewise.
* linuxthreads/sysdeps/pthread/bits/libc-lock.h: Likewise.
* linuxthreads/sysdeps/pthread/bits/libc-tsd.h: Likewise.
* linuxthreads/sysdeps/pthread/getcpuclockid.c: Likewise.
* linuxthreads/sysdeps/pthread/posix-timer.h: Likewise.
* linuxthreads/sysdeps/pthread/timer_create.c: Likewise.
* linuxthreads/sysdeps/pthread/timer_delete.c: Likewise.
* linuxthreads/sysdeps/pthread/timer_getoverr.c: Likewise.
* linuxthreads/sysdeps/pthread/timer_gettime.c: Likewise.
* linuxthreads/sysdeps/pthread/timer_routines.c: Likewise.
* linuxthreads/sysdeps/pthread/timer_settime.c: Likewise.
* linuxthreads/sysdeps/pthread/tst-timer.c: Likewise.
* linuxthreads/sysdeps/s390/pspinlock.c: Likewise.
* linuxthreads/sysdeps/s390/s390-32/pt-machine.h: Likewise.
* linuxthreads/sysdeps/s390/s390-64/pt-machine.h: Likewise.
* linuxthreads/sysdeps/sh/pspinlock.c: Likewise.
* linuxthreads/sysdeps/sh/pt-machine.h: Likewise.
* linuxthreads/sysdeps/sparc/sparc32/pspinlock.c: Likewise.
* linuxthreads/sysdeps/sparc/sparc32/pt-machine.h: Likewise.
* linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
* linuxthreads/sysdeps/sparc/sparc64/pspinlock.c: Likewise.
* linuxthreads/sysdeps/sparc/sparc64/pt-machine.h: Likewise.
* linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
* linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
* linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
* linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
* linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
* linuxthreads/tststack.c: Likewise.
* linuxthreads/unload.c: Likewise.
* linuxthreads/weaks.c: Likewise.
* linuxthreads/wrapsyscall.c: Likewise.
* malloc/arena.c: Likewise.
* malloc/hooks.c: Likewise.
* malloc/malloc.c: Likewise.
* posix/glob/Makefile.am: Likewise.
* posix/glob/Makefile.in: Likewise.
* stdlib/gmp-impl.h: Likewise.
* stdlib/gmp.h: Likewise.
* sysdeps/generic/dl-iteratephdr-static.c: Likewise.
* sysdeps/generic/strnlen.c: Likewise.
* sysdeps/mach/hurd/powerpc/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/recvmsg.c: Likewise.
* sysdeps/mach/hurd/sendmsg.c: Likewise.
* sysdeps/mach/hurd/spawni.c: Likewise.
* sysdeps/mach/powerpc/machine-sp.h: Likewise.
* sysdeps/mach/powerpc/sysdep.h: Likewise.
* sysdeps/mach/powerpc/thread_state.h: Likewise.
* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/dl-iteratephdr-static.c: Likewise.
* sysdeps/x86_64/gmp-mparam.h: Likewise.
diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c
index 010ad33..665e270 100644
--- a/sysdeps/arm/linuxthreads/pspinlock.c
+++ b/sysdeps/arm/linuxthreads/pspinlock.c
@@ -3,16 +3,16 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
+ You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index 11127ea..71001eb 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -5,16 +5,16 @@
Contributed by Philip Blundell <philb@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
+ You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae287b19004d82be9e5d93b843dc7b642dce3d26
commit ae287b19004d82be9e5d93b843dc7b642dce3d26
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 26 11:37:38 2002 +0000
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/unix/fork.S: Fix PSEUDO_END argument.
* sysdeps/unix/arm/fork.S: Likewise.
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index a03fbe2..deb2254 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,6 @@ SYSCALL__ (fork, 0)
sub r1, r1, $1
and r0, r0, r1
RETINSTR(mov, pc, r14)
-PSEUDO_END(fork)
+PSEUDO_END (__fork)
weak_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12ddb09b0a216d14997bdbca9030e6ed850131f1
commit 12ddb09b0a216d14997bdbca9030e6ed850131f1
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 26 11:37:35 2002 +0000
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/alpha/fpu/fpu_control.h: Comment fix.
diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
index f2214cb..28acdf1 100644
--- a/sysdeps/alpha/fpu/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -1,5 +1,5 @@
-/* FPU control word bits. Alpha-maped-to-Intel version.
- Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+/* FPU control word bits. Alpha-mapped-to-Intel version.
+ Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe.
@@ -65,7 +65,7 @@
#define _FPU_MASK_UM 0x10
#define _FPU_MASK_PM 0x20
-/* precision control */
+/* precision control -- without effect on Alpha */
#define _FPU_EXTENDED 0x300 /* RECOMMENDED */
#define _FPU_DOUBLE 0x200
#define _FPU_SINGLE 0x0 /* DO NOT USE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13d6ef283d22cb19a187c7c2d9d4e8ebf1d09b24
commit 13d6ef283d22cb19a187c7c2d9d4e8ebf1d09b24
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 26 11:37:32 2002 +0000
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/unix/sysv/linux/alpha/pipe.S: Moved to ...
* sysdeps/unix/alpha/pipe.S: ... here.
* sysdeps/unix/bsd/osf/alpha/pipe.S: File removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/alpha/pipe.S
similarity index 100%
rename from sysdeps/unix/sysv/linux/alpha/pipe.S
rename to sysdeps/unix/alpha/pipe.S
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
deleted file mode 100644
index b4eb216..0000000
--- a/sysdeps/unix/bsd/osf/alpha/pipe.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (pipe, 1)
- /* Plop in the two descriptors. */
- stl r0, 0(a0)
- stl r1, 4(a0)
-
- /* Go out with a clean status. */
- mov zero, r0
- ret
- .end __pipe
-
-libc_hidden_def (__pipe)
-weak_alias (__pipe, pipe)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=631d94cb300121c9d8a73b0b210cb8ba016290ce
commit 631d94cb300121c9d8a73b0b210cb8ba016290ce
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 26 11:37:24 2002 +0000
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/hppa/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/i386/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/sh/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h (PSEUDO): Swap DO_CALL
arguments.
(DO_CALL): Swap argument order.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 89ad194..cdb1d8e 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 95-99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,95-99,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -51,7 +51,7 @@
.text; \
.type syscall_error,%function; \
ENTRY (name); \
- DO_CALL (args, syscall_name); \
+ DO_CALL (syscall_name, args); \
cmn r0, $4096;
#define PSEUDO_RET \
@@ -95,7 +95,7 @@
*/
#undef DO_CALL
-#define DO_CALL(args, syscall_name) \
+#define DO_CALL(syscall_name, args) \
DOARGS_##args \
swi SYS_ify (syscall_name); \
UNDOARGS_##args
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index af255e1..4f08cc6 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@@ -108,7 +108,7 @@
#define PSEUDO(name, syscall_name, args) \
ENTRY (name) \
- DO_CALL(args, syscall_name) ASM_LINE_SEP \
+ DO_CALL(syscall_name, args) ASM_LINE_SEP \
nop
#undef PSEUDO_END
@@ -145,7 +145,7 @@
*/
#undef DO_CALL
-#define DO_CALL(args, syscall_name) \
+#define DO_CALL(syscall_name, args) \
DOARGS_##args \
ble 0x100(%sr2,%r0) ASM_LINE_SEP \
ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=564fb196d62636ab464c8639a1302e19e362ee6e
commit 564fb196d62636ab464c8639a1302e19e362ee6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 26 01:49:55 2002 +0000
SysV message queue definitions for Linux/MIPS.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/msq.h b/sysdeps/unix/sysv/linux/mips/bits/msq.h
new file mode 100644
index 0000000..c2c1dd2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/msq.h
@@ -0,0 +1,74 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Define options for message queue functions. */
+#define MSG_NOERROR 010000 /* no error if message is too big */
+#ifdef __USE_GNU
+# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+#endif
+
+/* Types used in the structure definition. */
+typedef unsigned long int msgqnum_t;
+typedef unsigned long int msglen_t;
+
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgrcv command */
+ __time_t msg_ctime; /* time of last change */
+ unsigned long int __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+#ifdef __USE_MISC
+
+# define msg_cbytes __msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+ {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short int msgseg;
+ };
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c3c87e2ec80968eddab2e4e6d548fdeb52ac1ce
commit 9c3c87e2ec80968eddab2e4e6d548fdeb52ac1ce
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 24 23:26:47 2002 +0000
Update comment regarding placement of errno definition.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 30beaf2..628335b 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,11 +18,10 @@
#include <sysdep.h>
-/* Because the Linux version is in fact m68k/ELF and the start.? file
- for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd
- and therefore this files must not contain the definition of the
- `errno' variable (I don't know why, ask Roland), we have to define
- it somewhere else.
+/* The Linux version is in fact m68k/ELF and the start.? file for this
+ system (sysdeps/m68k/elf/start.S) is also used by The Hurd. This file
+ must not contain the definition of the `errno' variable, we have to
+ define it somewhere else.
...and this place is here. */
.bss
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S
index d051c4f..2584982 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.S
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,11 +18,10 @@
#include <sysdep.h>
-/* Because the Linux version is in fact MIPS/ELF and the start.? file
- for this system (sysdeps/mips/elf/start.S) is also used by The Hurd
- and therefore this files must not contain the definition of the
- `errno' variable (I don't know why, ask Roland), we have to define
- it somewhere else.
+/* The Linux version is in fact MIPS/ELF and the start.? file for this
+ system (sysdeps/mips/elf/start.S) is also used by The Hurd. This file
+ must not contain the definition of the `errno' variable, we have to
+ define it somewhere else.
...and this place is here. */
.bss
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28fdb447c137f32abb3a95e3bfced78f4de42f25
commit 28fdb447c137f32abb3a95e3bfced78f4de42f25
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 23 22:26:25 2002 +0000
Define SHMLBA.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 8559ce3..ae51e75 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +35,10 @@
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Segment low boundary address multiple. */
+#define SHMLBA (__getpagesize ())
+extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index ddae6b0..85b286e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +35,11 @@
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Segment low boundary address multiple. */
+#define SHMLBA (__getpagesize ())
+extern int __getpagesize (void) __THROW __attribute__ ((__const__));
+
+
/* Type to count number of attaches. */
typedef unsigned long int shmatt_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1077d52cfb3c2f9e04579dff44074cb2e829530c
commit 1077d52cfb3c2f9e04579dff44074cb2e829530c
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Aug 23 09:29:00 2002 +0000
Remove *xattr syscalls.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 6882532..c18816c 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -57,21 +57,4 @@ libc {
# w*
wordexp;
}
- GLIBC_2.3 {
- # f*
- fgetxattr; flistxattr; fremovexattr; fsetxattr;
-
- # g*
- getxattr;
-
- # l*
- listxattr;
- lgetxattr; llistxattr; lremovexattr; lsetxattr;
-
- # r*
- removexattr;
-
- # s*
- setxattr;
- }
}
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index df5c9ec..32cb185 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -31,21 +31,4 @@ libc {
# v*
versionsort64;
}
- GLIBC_2.3 {
- # f*
- fgetxattr; flistxattr; fremovexattr; fsetxattr;
-
- # g*
- getxattr;
-
- # l*
- listxattr;
- lgetxattr; llistxattr; lremovexattr; lsetxattr;
-
- # r*
- removexattr;
-
- # s*
- setxattr;
- }
}
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index 62154b9..0799bf3 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -29,21 +29,4 @@ libc {
# v*
versionsort64;
}
- GLIBC_2.3 {
- # f*
- fgetxattr; flistxattr; fremovexattr; fsetxattr;
-
- # g*
- getxattr;
-
- # l*
- listxattr;
- lgetxattr; llistxattr; lremovexattr; lsetxattr;
-
- # r*
- removexattr;
-
- # s*
- setxattr;
- }
}
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 0c5d798..f71d9b5 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -17,21 +17,4 @@ libc {
# _*
_test_and_set;
}
- #GLIBC_2.3 {
- # # f*
- # fgetxattr; flistxattr; fremovexattr; fsetxattr;
- #
- # # g*
- # getxattr;
- #
- # # l*
- # listxattr;
- # lgetxattr; llistxattr; lremovexattr; lsetxattr;
- #
- # # r*
- # removexattr;
- #
- # # s*
- # setxattr;
- #}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=978d532dd96f0a33ac2553b1a0851b64467fadb0
commit 978d532dd96f0a33ac2553b1a0851b64467fadb0
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Aug 19 07:41:58 2002 +0000
Regenerate.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index eac5e8b..e2091f8 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -1,61 +1,18 @@
# Begin of automatic generation
-# asin
-Test "asin (-0.5) == -pi/6":
-float: 2
-ifloat: 2
-Test "asin (0.5) == pi/6":
-float: 2
-ifloat: 2
-Test "asin (0.7) == 0.77539749661075306374035335271498708":
-double: 1
-float: 2
-idouble: 1
-ifloat: 2
-
# atan2
-Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
+Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
float: 3
ifloat: 3
-Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
+Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
float: 3
ifloat: 3
-Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
-float: 4
-ifloat: 4
-
-# atanh
-Test "atanh (0.7) == 0.8673005276940531944":
-double: 1
-idouble: 1
-
-# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
-float: 1
-ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
-double: 1
-idouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
+Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
float: 1
ifloat: 1
-# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
+# atanh
+Test "atanh (0.75) == 0.972955074527656652552676371721589865":
float: 1
ifloat: 1
@@ -70,20 +27,12 @@ double: 1
float: 3
idouble: 1
ifloat: 3
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
+Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
# casinh
@@ -97,11 +46,13 @@ double: 3
float: 6
idouble: 3
ifloat: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
+Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
double: 1
-idouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
+idouble: 1
ifloat: 1
# catan
@@ -113,12 +64,9 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
+Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
float: 4
ifloat: 4
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
-double: 1
-idouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
@@ -127,20 +75,21 @@ idouble: 4
Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
float: 4
ifloat: 4
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
+Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
double: 1
-float: 6
idouble: 1
+Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
+float: 6
ifloat: 6
# cbrt
Test "cbrt (-27.0) == -3.0":
double: 1
idouble: 1
-Test "cbrt (0.970299) == 0.99":
+Test "cbrt (0.75) == 0.908560296416069829445605878163630251":
+double: 1
+idouble: 1
+Test "cbrt (0.9921875) == 0.997389022060725270579075195353955217":
double: 1
idouble: 1
@@ -148,12 +97,14 @@ idouble: 1
Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
float: 1
ifloat: 1
-Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
-double: 1
-idouble: 1
-Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
+float: 1
+ifloat: 1
# ccosh
Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
@@ -162,34 +113,30 @@ ifloat: 1
Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
float: 1
ifloat: 1
-Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
-double: 1
-idouble: 1
+Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
+float: 1
+ifloat: 1
# cexp
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
+Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
float: 1
ifloat: 1
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
-double: 1
float: 3
-idouble: 1
ifloat: 3
+Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -227,14 +174,9 @@ ifloat: 1
Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
-Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
-double: 1
+Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 1
-idouble: 1
ifloat: 1
-Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
-double: 1
-idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -249,28 +191,39 @@ float: 1
ifloat: 1
# cos
-Test "cos (0.7) == 0.76484218728448842625585999019186495":
+Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "cos (M_PI_6l * 2.0) == 0.5":
-double: 1
-float: 0.5
-idouble: 1
-ifloat: 0.5
Test "cos (M_PI_6l * 4.0) == -0.5":
double: 2
float: 1
idouble: 2
ifloat: 1
Test "cos (pi/2) == 0":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
# cpow
+Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
+float: 1
+ifloat: 1
+Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
float: 4
@@ -285,19 +238,14 @@ float: 2
idouble: 2
ifloat: 2
-# csin
-Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
-float: 1
-ifloat: 1
-
# csinh
Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
double: 1
idouble: 1
-Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
float: 1
ifloat: 1
@@ -308,27 +256,14 @@ ifloat: 1
Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
-float: 1
-ifloat: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
double: 1
idouble: 1
-Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
-float: 1
-ifloat: 1
-Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
double: 1
-float: 1
idouble: 1
-ifloat: 1
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
@@ -339,34 +274,22 @@ ifloat: 2
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
-Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
+Test "Real part of: ctanh (0.75 + 1.25 i) == 1.37260757053378320258048606571226857 + 0.385795952609750664177596760720790220 i":
+double: 1
+idouble: 1
+
+# erf
+Test "erf (1.25) == 0.922900128256458230136523481197281140":
+double: 1
+idouble: 1
# erfc
-Test "erfc (0.7) == 0.32219880616258152702":
+Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
double: 1
idouble: 1
-Test "erfc (1.2) == 0.089686021770364619762":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-Test "erfc (2.0) == 0.0046777349810472658379":
+Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
double: 1
idouble: 1
-Test "erfc (4.1) == 0.67000276540848983727e-8":
-double: 24
-float: 12
-idouble: 24
-ifloat: 12
# exp10
Test "exp10 (-1) == 0.1":
@@ -374,8 +297,10 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
+Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Test "exp10 (3) == 1000":
double: 6
@@ -384,32 +309,13 @@ idouble: 6
ifloat: 2
# expm1
+Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
+double: 1
+idouble: 1
Test "expm1 (1) == M_El - 1.0":
float: 1
ifloat: 1
-# fmod
-Test "fmod (-6.5, -2.3) == -1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (-6.5, 2.3) == -1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (6.5, -2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "fmod (6.5, 2.3) == 1.9":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
@@ -426,9 +332,6 @@ ifloat: 1
Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
-double: 1
-idouble: 1
Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -440,90 +343,110 @@ float: 1
ifloat: 1
# j0
-Test "j0 (10.0) == -0.24593576445134833520":
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "j0 (0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.245935764451348335197760862485328754":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "j0 (2.0) == 0.22389077914123566805":
+Test "j0 (2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
-Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1"
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
double: 1
-idouble: 1
float: 1
-ifloat: 1
-Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1"
-double: 1
idouble: 1
-float: 1
ifloat: 1
-Test "j0 (8.0) == 0.17165080713755390609":
+Test "j0 (8.0) == 0.171650807137553906090869407851972001":
float: 1
ifloat: 1
# j1
-Test "j1 (10.0) == 0.043472746168861436670":
+Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-Test "j1 (2.0) == 0.57672480775687338720":
+Test "j1 (2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
-Test "j1 (8.0) == 0.23463634685391462438":
+Test "j1 (8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
# jn
-Test "jn (0, 10.0) == -0.24593576445134833520":
+Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (0, 0.75) == 0.864242275166648623555731103820923211":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.245935764451348335197760862485328754":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "jn (0, 2.0) == 0.22389077914123566805":
+Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
float: 2
ifloat: 2
-Test "jn (0, 8.0) == 0.17165080713755390609":
+Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-Test "jn (1, 10.0) == 0.043472746168861436670":
+Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
float: 2
ifloat: 2
-Test "jn (1, 2.0) == 0.57672480775687338720":
+Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
double: 1
idouble: 1
-Test "jn (1, 8.0) == 0.23463634685391462438":
+Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
double: 1
idouble: 1
-Test "jn (10, 0.1) == 0.26905328954342155795e-19":
-double: 6
-float: 4
-idouble: 6
-ifloat: 4
-Test "jn (10, 0.7) == 0.75175911502153953928e-11":
-double: 3
+Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
+double: 1
float: 1
-idouble: 3
+idouble: 1
ifloat: 1
-Test "jn (10, 10.0) == 0.20748610663335885770":
+Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
double: 4
float: 3
idouble: 4
ifloat: 3
-Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
float: 4
ifloat: 4
-Test "jn (3, 0.1) == 0.000020820315754756261429":
+Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
+float: 1
idouble: 1
-Test "jn (3, 0.7) == 0.0069296548267508408077":
+ifloat: 1
+Test "jn (3, 0.75) == 0.848438342327410884392755236884386804e-2":
+double: 1
float: 1
+idouble: 1
ifloat: 1
-Test "jn (3, 10.0) == 0.058379379305186812343":
+Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "jn (3, 2.0) == 0.12894324947440205110":
+Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
double: 1
float: 2
idouble: 1
@@ -541,85 +464,45 @@ float: 2
idouble: 1
ifloat: 2
-# log
-Test "log (0.7) == -0.35667494393873237891263871124118447":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
# log10
-Test "log10 (0.7) == -0.15490195998574316929":
+Test "log10 (0.75) == -0.124938736608299953132449886193870744":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
-double: 1
+Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
float: 1
-idouble: 1
-ifloat: 1
-
-# log2
-Test "log2 (0.7) == -0.51457317282975824043":
-double: 1
-float: 1
-idouble: 1
ifloat: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
-double: 1
-float: 0.5
-idouble: 1
-ifloat: 0.5
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
-Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
-float: 1
-ifloat: 1
-
-# sinh
-Test "sinh (0.7) == 0.75858370183953350346":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
+float: 1
+ifloat: 1
# tan
Test "tan (pi/4) == 1":
-double: 0.5
-idouble: 0.5
-
-# tanh
-Test "tanh (-0.7) == -0.60436777711716349631":
double: 1
-float: 1
-idouble: 1
-ifloat: 1
-Test "tanh (0.7) == 0.60436777711716349631":
-double: 1
-float: 1
idouble: 1
-ifloat: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -637,174 +520,130 @@ idouble: 1
ifloat: 1
# y0
-Test "y0 (0.7) == -0.19066492933739506743":
+Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "y0 (1.0) == 0.088256964215676957983":
+Test "y0 (1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "y0 (1.5) == 0.38244892379775884396":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "y0 (10.0) == 0.055671167283599391424":
+Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
-Test "y0 (8.0) == 0.22352148938756622053":
+Test "y0 (8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
# y1
-Test "y1 (0.1) == -6.4589510947020269877":
+Test "y1 (0.125) == -5.19993611253477499595928744876579921":
double: 1
idouble: 1
-Test "y1 (0.7) == -1.1032498719076333697":
-double: 1
+Test "y1 (1.5) == -0.412308626973911295952829820633445323":
float: 1
-idouble: 1
ifloat: 1
-Test "y1 (1.5) == -0.41230862697391129595":
-float: 1
-ifloat: 1
-Test "y1 (10.0) == 0.24901542420695388392":
+Test "y1 (10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "y1 (2.0) == -0.10703243154093754689":
+Test "y1 (2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "y1 (8.0) == -0.15806046173124749426":
+Test "y1 (8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
# yn
-Test "yn (0, 0.7) == -0.19066492933739506743":
-double: 2
-float: 1
-idouble: 2
-ifloat: 1
-Test "yn (0, 1.0) == 0.088256964215676957983":
+Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "yn (0, 1.5) == 0.38244892379775884396":
+Test "yn (0, 1.5) == 0.382448923797758843955068554978089862":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "yn (0, 10.0) == 0.055671167283599391424":
+Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
float: 1
ifloat: 1
-Test "yn (0, 8.0) == 0.22352148938756622053":
+Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (1, 0.1) == -6.4589510947020269877":
-double: 1
-idouble: 1
-Test "yn (1, 0.7) == -1.1032498719076333697":
+Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-Test "yn (1, 1.5) == -0.41230862697391129595":
+Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
float: 1
ifloat: 1
-Test "yn (1, 10.0) == 0.24901542420695388392":
+Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
double: 3
float: 1
idouble: 3
ifloat: 1
-Test "yn (1, 2.0) == -0.10703243154093754689":
+Test "yn (1, 2.0) == -0.107032431540937546888370772277476637":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (1, 8.0) == -0.15806046173124749426":
+Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
double: 1
float: 2
idouble: 1
ifloat: 2
-Test "yn (10, 0.1) == -0.11831335132045197885e19":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
-Test "yn (10, 0.7) == -0.42447194260703866924e10":
-double: 3
-idouble: 3
-Test "yn (10, 1.0) == -0.12161801427868918929e9":
+Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
double: 1
idouble: 1
-Test "yn (10, 10.0) == -0.35981415218340272205":
+Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (10, 2.0) == -129184.54220803928264":
-double: 2
-idouble: 2
-Test "yn (3, 0.1) == -5099.3323786129048894":
+Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-Test "yn (3, 0.7) == -15.819479052819633505":
-double: 3
-float: 1
-idouble: 3
-ifloat: 1
-Test "yn (3, 10.0) == -0.25136265718383732978":
+Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "yn (3, 2.0) == -1.1277837768404277861":
-double: 1
-idouble: 1
-
-# Maximal error of functions:
-Function: "asin":
+Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
+double: 2
+idouble: 2
+Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
double: 1
-float: 2
idouble: 1
-ifloat: 2
-
-Function: "atan2":
-float: 4
-ifloat: 4
-
-Function: "atanh":
-double: 1
-idouble: 1
-
-Function: "cabs":
+Test "yn (3, 0.75) == -12.9877176234475433186319774484809207":
double: 1
float: 1
idouble: 1
ifloat: 1
-
-Function: Real part of "cacos":
+Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
+double: 1
+idouble: 1
-Function: Imaginary part of "cacos":
+# Maximal error of functions:
+Function: "atan2":
+float: 3
+ifloat: 3
+
+Function: "atanh":
float: 1
ifloat: 1
@@ -821,13 +660,9 @@ idouble: 1
ifloat: 3
Function: Real part of "casin":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-
-Function: Imaginary part of "casin":
+double: 1
float: 1
+idouble: 1
ifloat: 1
Function: Real part of "casinh":
@@ -854,14 +689,10 @@ ifloat: 1
Function: Real part of "catanh":
double: 4
-float: 1
idouble: 4
-ifloat: 1
Function: Imaginary part of "catanh":
-double: 1
float: 6
-idouble: 1
ifloat: 6
Function: "cbrt":
@@ -870,12 +701,12 @@ idouble: 1
Function: Real part of "ccos":
double: 1
+float: 1
idouble: 1
+ifloat: 1
Function: Imaginary part of "ccos":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Real part of "ccosh":
@@ -885,31 +716,27 @@ idouble: 1
ifloat: 1
Function: Imaginary part of "ccosh":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Real part of "cexp":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Imaginary part of "cexp":
float: 1
ifloat: 1
+Function: Real part of "clog":
+float: 1
+ifloat: 1
+
Function: Imaginary part of "clog":
-double: 1
float: 3
-idouble: 1
ifloat: 3
Function: Real part of "clog10":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: Imaginary part of "clog10":
@@ -925,21 +752,17 @@ idouble: 2
ifloat: 1
Function: Real part of "cpow":
-double: 1
+double: 2
float: 4
-idouble: 1
+idouble: 2
ifloat: 4
Function: Imaginary part of "cpow":
-double: 1.1031
+double: 2
float: 2
-idouble: 1.1031
+idouble: 2
ifloat: 2
-Function: Imaginary part of "csin":
-float: 1
-ifloat: 1
-
Function: Real part of "csinh":
float: 1
ifloat: 1
@@ -951,44 +774,34 @@ idouble: 1
ifloat: 1
Function: Real part of "csqrt":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
-Function: Imaginary part of "csqrt":
float: 1
ifloat: 1
Function: Real part of "ctan":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: Imaginary part of "ctan":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: Real part of "ctanh":
-double: 2
+double: 1
float: 2
-idouble: 2
+idouble: 1
ifloat: 2
Function: Imaginary part of "ctanh":
-double: 2
float: 1
-idouble: 2
ifloat: 1
+Function: "erf":
+double: 1
+idouble: 1
+
Function: "erfc":
-double: 24
-float: 12
-idouble: 24
-ifloat: 12
+double: 1
+idouble: 1
Function: "exp10":
double: 6
@@ -997,19 +810,13 @@ idouble: 6
ifloat: 2
Function: "expm1":
+double: 1
float: 1
-ifloat: 1
-
-Function: "fmod":
-double: 2
-float: 1
-idouble: 2
+idouble: 1
ifloat: 1
Function: "hypot":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: "j0":
@@ -1025,9 +832,9 @@ idouble: 1
ifloat: 2
Function: "jn":
-double: 6
+double: 4
float: 4
-idouble: 6
+idouble: 4
ifloat: 4
Function: "lgamma":
@@ -1036,28 +843,14 @@ float: 2
idouble: 1
ifloat: 2
-Function: "log":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
Function: "log10":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
Function: "log1p":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
-Function: "log2":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Function: "sincos":
@@ -1066,21 +859,9 @@ float: 1
idouble: 1
ifloat: 1
-Function: "sinh":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-
Function: "tan":
-double: 0.5
-idouble: 0.5
-
-Function: "tanh":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Function: "tgamma":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=074a6e5efa5598aa0197e68b9c05d758bc3fd910
commit 074a6e5efa5598aa0197e68b9c05d758bc3fd910
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Aug 15 09:01:52 2002 +0000
Add *xattr syscalls with version 2.3.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index c18816c..6882532 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -57,4 +57,21 @@ libc {
# w*
wordexp;
}
+ GLIBC_2.3 {
+ # f*
+ fgetxattr; flistxattr; fremovexattr; fsetxattr;
+
+ # g*
+ getxattr;
+
+ # l*
+ listxattr;
+ lgetxattr; llistxattr; lremovexattr; lsetxattr;
+
+ # r*
+ removexattr;
+
+ # s*
+ setxattr;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 32cb185..df5c9ec 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -31,4 +31,21 @@ libc {
# v*
versionsort64;
}
+ GLIBC_2.3 {
+ # f*
+ fgetxattr; flistxattr; fremovexattr; fsetxattr;
+
+ # g*
+ getxattr;
+
+ # l*
+ listxattr;
+ lgetxattr; llistxattr; lremovexattr; lsetxattr;
+
+ # r*
+ removexattr;
+
+ # s*
+ setxattr;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index 0799bf3..62154b9 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -29,4 +29,21 @@ libc {
# v*
versionsort64;
}
+ GLIBC_2.3 {
+ # f*
+ fgetxattr; flistxattr; fremovexattr; fsetxattr;
+
+ # g*
+ getxattr;
+
+ # l*
+ listxattr;
+ lgetxattr; llistxattr; lremovexattr; lsetxattr;
+
+ # r*
+ removexattr;
+
+ # s*
+ setxattr;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index f71d9b5..0c5d798 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -17,4 +17,21 @@ libc {
# _*
_test_and_set;
}
+ #GLIBC_2.3 {
+ # # f*
+ # fgetxattr; flistxattr; fremovexattr; fsetxattr;
+ #
+ # # g*
+ # getxattr;
+ #
+ # # l*
+ # listxattr;
+ # lgetxattr; llistxattr; lremovexattr; lsetxattr;
+ #
+ # # r*
+ # removexattr;
+ #
+ # # s*
+ # setxattr;
+ #}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94a376cc2cb4d93d0a76d16d6aa296cd18bbab1b
commit 94a376cc2cb4d93d0a76d16d6aa296cd18bbab1b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 13 01:07:58 2002 +0000
2002-08-12 Roland McGrath <roland@redhat.com>
* include/grp.h (setgroups): Add libc_hidden_proto.
* sysdeps/generic/setgroups.c: Add libc_hidden_def.
* sysdeps/mach/hurd/setgroups.c: Likewise.
* sysdeps/unix/sysv/irix4/setgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise.
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
index 57f0ed5..8f5b379 100644
--- a/sysdeps/unix/sysv/irix4/setgroups.c
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,4 @@ setgroups (n, groups)
{
return __syssgi (SGI_SETGROUPS, n, groups);
}
+libc_hidden_def (setgroups)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84091b65ffc88ca22d6d2410e54f440413400e28
commit 84091b65ffc88ca22d6d2410e54f440413400e28
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 13 01:07:52 2002 +0000
2002-08-12 Roland McGrath <roland@redhat.com>
* include/sys/wait.h (__waitpid): Add libc_hidden_proto.
* sysdeps/unix/sysv/sco3.2.4/waitpid.S: Add libc_hidden_def.
* sysdeps/unix/sysv/sysv4/waitpid.c: Add libc_hidden_weak.
* sysdeps/unix/sysv/linux/waitpid.c: Likewise.
* sysdeps/unix/sysv/aix/waitpid.c: Likewise.
* sysdeps/unix/bsd/bsd4.4/waitpid.c: Likewise.
* sysdeps/generic/waitpid.c: Likewise.
diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c
index 4875612..19bcbab 100644
--- a/sysdeps/unix/sysv/aix/waitpid.c
+++ b/sysdeps/unix/sysv/aix/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,95,96,97,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,4 +49,5 @@ __libc_waitpid (pid_t pid, int *stat_loc, int options)
return kwaitpid (stat_loc, pid, options, NULL, NULL);
}
weak_alias (__libc_waitpid, __waitpid)
+libc_hidden_weak (__waitpid)
weak_alias (__libc_waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index 53e08cf..ccbc812 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,4 +33,5 @@ ENTRY (__waitpid)
movl r1, (scratch) /* Yes; store the status there. */
null: ret
+libc_hidden_def (__waitpid)
weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index 8b899a7..f4700c6 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993,94,95,96,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -115,6 +115,6 @@ __libc_waitpid (__pid_t pid, int *stat_loc, int options)
any PID. */
return infop.__pid;
}
-
weak_alias (__libc_waitpid, __waitpid)
weak_alias (__libc_waitpid, waitpid)
+libc_hidden_weak (__waitpid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f994831e93b626d5d87d106ae7826605f9715545
commit f994831e93b626d5d87d106ae7826605f9715545
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 13 00:23:09 2002 +0000
2002-08-13 Jakub Jelinek <jakub@redhat.com>
* include/sys/stat.h (__fxstat_internal, __fxstat64_internal,
__lxstat_internal, __lxstat64_internal): Remove.
(__fxstat, __fxstat64, __lxstat, __lxstat64, __xstat, __xstat64):
Add hidden_proto.
* sysdeps/generic/fxstat.c (__fxstat): Add hidden_def.
Remove INTDEF where present, remove #undef at the beginning.
* sysdeps/generic/fxstat64.c (__fxstat64): Likewise.
* sysdeps/generic/lxstat.c (__lxstat): Likewise.
* sysdeps/generic/lxstat64.c (__lxstat64): Likewise.
* sysdeps/generic/xstat.c (__xstat): Likewise.
* sysdeps/generic/xstat64.c (__xstat64): Likewise.
* sysdeps/mach/hurd/dl-sysdep.c (__xstat64, __fxstat64): Likewise.
* sysdeps/mach/hurd/fxstat.c (__fxstat): Likewise.
* sysdeps/mach/hurd/fxstat64.c (__fxstat64): Likewise.
* sysdeps/mach/hurd/lxstat.c (__lxstat): Likewise.
* sysdeps/mach/hurd/lxstat64.c (__lxstat64): Likewise.
* sysdeps/mach/hurd/xstat.c (__xstat): Likewise.
* sysdeps/mach/hurd/xstat64.c (__xstat64): Likewise.
* sysdeps/unix/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/common/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/aix/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/sysv/aix/fxstat64.c (__fxstat64): Likewise.
* sysdeps/unix/sysv/aix/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/aix/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/sysv/aix/xstat.c (__xstat): Likewise.
* sysdeps/unix/sysv/aix/xstat64.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/ia64/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/sysv/linux/ia64/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/ia64/xstat.c (__xstat): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/xstat.c (__xstat): Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise.
* sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise.
* sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise.
* sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise.
* sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Likewise.
* sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise.
* sysdeps/unix/xstat.c (__xstat): Likewise.
diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c
index 4c1e145..1ba56f6 100644
--- a/sysdeps/unix/sysv/aix/fxstat.c
+++ b/sysdeps/unix/sysv/aix/fxstat.c
@@ -23,12 +23,10 @@
extern int fstatx (int fd, struct stat *st, int len, int cmd);
-#undef __fxstat
-
int
__fxstat (int ver, int fd, struct stat *st)
{
assert (ver == 0);
return fstatx (fd, st, sizeof (*st), STX_NORMAL);
}
-INTDEF(__fxstat)
+hidden_def (__fxstat)
diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c
index 509fb2c..5f75e07 100644
--- a/sysdeps/unix/sysv/aix/fxstat64.c
+++ b/sysdeps/unix/sysv/aix/fxstat64.c
@@ -22,16 +22,12 @@
#define STX_NORMAL 0x00
#define STX_64 0x08
-#undef __fxstat64
-
extern int fstatx (int fd, struct stat64 *st, int len, int cmd);
-#undef __fxstat64
-
int
__fxstat64 (int ver, int fd, struct stat64 *st)
{
assert (ver == 0);
return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64);
}
-INTDEF(__fxstat64)
+hidden_def (__fxstat64)
diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c
index 52562bd..879e80c 100644
--- a/sysdeps/unix/sysv/aix/lxstat.c
+++ b/sysdeps/unix/sysv/aix/lxstat.c
@@ -21,8 +21,6 @@
#define STX_LINK 0x01
-#undef __lxstat
-
extern int statx (const char *pathname, struct stat *st, int len, int cmd);
int
@@ -31,5 +29,4 @@ __lxstat (int ver, const char *pathname, struct stat *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_LINK);
}
-
-INTDEF(__lxstat)
+hidden_def (__lxstat)
diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c
index d68b458..73324fe 100644
--- a/sysdeps/unix/sysv/aix/lxstat64.c
+++ b/sysdeps/unix/sysv/aix/lxstat64.c
@@ -22,8 +22,6 @@
#define STX_LINK 0x01
#define STX_64 0x08
-#undef __lxstat64
-
extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
int
@@ -32,5 +30,4 @@ __lxstat64 (int ver, const char *pathname, struct stat64 *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_LINK | STX_64);
}
-
-INTDEF(__lxstat64)
+hidden_def (__lxstat64)
diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c
index bf901e2..c76ad07 100644
--- a/sysdeps/unix/sysv/aix/xstat.c
+++ b/sysdeps/unix/sysv/aix/xstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,6 @@
#define STX_NORMAL 0x00
-
extern int statx (const char *pathname, struct stat *st, int len, int cmd);
int
@@ -30,3 +29,4 @@ __xstat (int ver, const char *pathname, struct stat *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_NORMAL);
}
+hidden_def (__xstat)
diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c
index 91f8317..cb1bea1 100644
--- a/sysdeps/unix/sysv/aix/xstat64.c
+++ b/sysdeps/unix/sysv/aix/xstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,3 +31,4 @@ __xstat64 (int ver, const char *pathname, struct stat64 *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_NORMAL | STX_64);
}
+hidden_def (__xstat64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c1cc5c52c29a8662d64f94a4c84b1d44665c45e
commit 9c1cc5c52c29a8662d64f94a4c84b1d44665c45e
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 13 00:23:01 2002 +0000
2002-08-13 Jakub Jelinek <jakub@redhat.com>
* include/unistd.h (tcgetpgrp): Add libc_hidden_proto.
* include/termios.h (tcsetattr, cfsetispeed, cfsetospeed): Likewise.
* sysdeps/generic/tcgetpgrp.c (tcgetpgrp): Add libc_hidden_def.
* sysdeps/generic/tcsetattr.c (tcsetattr): Likewise.
* sysdeps/generic/speed.c (cfsetispeed, cfsetospeed): Likewise.
* sysdeps/unix/bsd/bsd4.4/tcsetattr.c (tcgetpgrp): Likewise.
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Likewise.
* sysdeps/unix/bsd/sun/sunos4/speed.c (cfsetispeed, cfsetospeed):
Likewise.
* sysdeps/unix/bsd/tcgetpgrp.c (tcgetpgrp): Likewise.
* sysdeps/unix/bsd/tcsetattr.c (tcsetattr): Likewise.
* sysdeps/unix/sysv/aix/tcsetattr.c (tcsetattr): Likewise.
* sysdeps/unix/sysv/aix/speed.c (cfsetispeed, cfsetospeed): Likewise.
* sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise.
* sysdeps/unix/sysv/linux/speed.c (cfsetispeed, cfsetospeed): Likewise.
* sysdeps/unix/sysv/tcgetpgrp.c (tcgetpgrp): Likewise.
* sysdeps/unix/sysv/tcsetattr.c (tcsetattr): Likewise.
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index dca3468..262d70f 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. SunOS 4 version.
- Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991,1992,1993,1996,1997,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,6 +87,7 @@ cfsetospeed (termios_p, speed)
__set_errno (EINVAL);
return -1;
}
+libc_hidden_def (cfsetospeed)
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
@@ -114,3 +115,4 @@ cfsetispeed (termios_p, speed)
__set_errno (EINVAL);
return -1;
}
+libc_hidden_def (cfsetispeed)
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index d61e392..934c4c8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,3 +47,4 @@ tcsetattr (fd, optional_actions, termios_p)
return __ioctl (fd, cmd, termios_p);
}
+libc_hidden_def (tcsetattr)
diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c
index c7fa51b..3a453a7 100644
--- a/sysdeps/unix/sysv/aix/speed.c
+++ b/sysdeps/unix/sysv/aix/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. AIX version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,6 +53,8 @@ cfsetospeed (termios_p, speed)
termios_p->c_cflag |= speed & 0x0000000f;
return 0;
}
+libc_hidden_def (cfsetospeed)
+
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
@@ -70,3 +72,4 @@ cfsetispeed (termios_p, speed)
termios_p->c_cflag |= (speed << 16) & ~0x000f0000;
return 0;
}
+libc_hidden_def (cfsetispeed)
diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c
index b11676e..8e78da1 100644
--- a/sysdeps/unix/sysv/aix/tcsetattr.c
+++ b/sysdeps/unix/sysv/aix/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -195,3 +195,4 @@ tcsetattr (fd, optional_actions, termios_p)
return -1;
return 0;
}
+libc_hidden_def (tcsetattr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0acc021ce7a0f42d455fac3f8874b2e827156b1
commit e0acc021ce7a0f42d455fac3f8874b2e827156b1
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 13 00:22:48 2002 +0000
2002-08-13 Jakub Jelinek <jakub@redhat.com>
* include/unistd.h (seteuid, setegid): Add libc_hidden_proto.
* sysdeps/generic/seteuid.c (seteuid): Add libc_hidden_def.
* sysdeps/generic/setegid.c (setegid): Likewise.
* sysdeps/mach/hurd/seteuid.c (seteuid): Likewise.
* sysdeps/mach/hurd/setegid.c (setegid): Likewise.
* sysdeps/unix/bsd/seteuid.c (seteuid): Likewise.
* sysdeps/unix/bsd/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/aix/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/aix/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise.
Remove fallback if __ASSUME_SETRESUID_SYSCALL.
diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c
index 75e96e3..75123ce 100644
--- a/sysdeps/unix/sysv/aix/setegid.c
+++ b/sysdeps/unix/sysv/aix/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,4 @@ __setegid (gid_t gid)
return setgidx (ID_EFFECTIVE, gid);
}
strong_alias (__setegid, setegid)
+libc_hidden_def (setegid)
diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c
index 17738e7..6ea7e7b 100644
--- a/sysdeps/unix/sysv/aix/seteuid.c
+++ b/sysdeps/unix/sysv/aix/seteuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,4 @@ __seteuid (uid_t uid)
return setuidx (ID_EFFECTIVE, uid);
}
strong_alias (__seteuid, seteuid)
+libc_hidden_def (seteuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=488003cd6b0982e1a97399f5960641d2883e861f
commit 488003cd6b0982e1a97399f5960641d2883e861f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 12 19:36:38 2002 +0000
Makefile for arm.
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
new file mode 100644
index 0000000..ccb6b03
--- /dev/null
+++ b/sysdeps/arm/Makefile
@@ -0,0 +1,7 @@
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += divdi3
+shared-only-routines += divdi3
+endif
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=216e12e222d4f0023390ece5cffe2ef392ddb6c8
commit 216e12e222d4f0023390ece5cffe2ef392ddb6c8
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 5 02:18:11 2002 +0000
2002-08-03 Roland McGrath <roland@redhat.com>
* include/sys/resource.h: Use libc_hidden_proto for getpriority,
setpriority.
* sysdeps/unix/sysv/linux/getpriority.c: Add libc_hidden_def.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/setpriority.c: Likewise.
* sysdeps/mach/hurd/setpriority.c: Likewise.
* sysdeps/mach/hurd/getpriority.c: Likewise.
* sysdeps/generic/setpriority.c: Likewise.
* sysdeps/generic/getpriority.c: Likewise.
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index 9254ed4..9935318 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994,96,97,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,3 +39,4 @@ setpriority (which, who, prio)
__set_errno (EINVAL);
return -1;
}
+libc_hidden_def (setpriority)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28b5d5afc678994b53a13c83902cac5ab09d85aa
commit 28b5d5afc678994b53a13c83902cac5ab09d85aa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 5 00:31:32 2002 +0000
(glob, globfree, globfree64): Add libc_hidden_ver.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 9a52ae8..a51020d 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +44,9 @@ extern void __new_globfree (glob_t *__pglob);
versioned_symbol (libc, __new_glob, glob, GLIBC_2_1);
versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1);
+libc_hidden_ver (__new_glob, glob)
+libc_hidden_ver (__new_globfree, globfree)
weak_alias (__new_glob, glob64)
weak_alias (__new_globfree, globfree64)
+libc_hidden_ver (__new_globfree, globfree64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b4c30e300c1531aa76bb52739ea0982d0e6cb11
commit 9b4c30e300c1531aa76bb52739ea0982d0e6cb11
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 4 23:26:50 2002 +0000
Add _sys_siglist_internal alias.
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
index e053339..d5fdb5d 100644
--- a/sysdeps/unix/sysv/linux/arm/siglist.c
+++ b/sysdeps/unix/sysv/linux/arm/siglist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,6 +32,7 @@ const char *const __new_sys_siglist[NSIG] =
#include "siglist.h"
#undef init_sig
};
+strong_alias (__new_sys_siglist, _sys_siglist_internal)
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".type __old_sys_siglist,%object;.size __old_sys_siglist,"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a42044dc37dca8e6fcbfb196e8922b9cdf664446
commit a42044dc37dca8e6fcbfb196e8922b9cdf664446
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 4 09:23:46 2002 +0000
(__xmknod): Add libc_hidden_def.
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
index a659c1f..d7e8d2a 100644
--- a/sysdeps/unix/sysv/linux/alpha/xmknod.c
+++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c
@@ -1,5 +1,5 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,3 +45,4 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
}
weak_alias (__xmknod, _xmknod)
+libc_hidden_def (__xmknod)
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
index d2a02f5..217c9c2 100644
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -1,5 +1,5 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 93, 95, 96, 97, 98, 00 Free Software Foundation, Inc.
+ Copyright (C) 1991,93,95,96,97,98,00,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,3 +49,4 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
}
weak_alias (__xmknod, _xmknod)
+libc_hidden_def (__xmknod)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d343348c1caf178c9bd98c3d79302a5c8688c6c
commit 1d343348c1caf178c9bd98c3d79302a5c8688c6c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 4 09:16:35 2002 +0000
(__sysconf): Add libc_hidden_def.
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index 3f350b5..2f89491 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,4 @@ __sysconf (name)
}
weak_alias (__sysconf, sysconf)
+libc_hidden_def (__sysconf)
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 77ce2d8..d8ffafc 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -363,3 +363,4 @@ __sysconf (name)
}
weak_alias (__sysconf, sysconf)
+libc_hidden_def (__sysconf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e38327be06ba8d2a726a2e1f3a73ad3dc94e0df0
commit e38327be06ba8d2a726a2e1f3a73ad3dc94e0df0
Author: Roland McGrath <roland@gnu.org>
Date: Sun Aug 4 03:50:10 2002 +0000
2002-08-03 Roland McGrath <roland@redhat.com>
* include/sys/resource.h: Use libc_hidden_proto for getpriority,
setpriority.
* sysdeps/unix/sysv/linux/getpriority.c: Add libc_hidden_def.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/mach/hurd/setpriority.c: Likewise.
* sysdeps/mach/hurd/getpriority.c: Likewise.
* sysdeps/generic/setpriority.c: Likewise.
* sysdeps/generic/getpriority.c: Likewise.
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 9fc2be9..baf945e 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994,96,97,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,3 +44,4 @@ getpriority (which, who)
__set_errno (EINVAL);
return -1;
}
+libc_hidden_def (getpriority)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=237b9f1c7bb44c02712745c02b8b982be442311e
commit 237b9f1c7bb44c02712745c02b8b982be442311e
Author: Roland McGrath <roland@gnu.org>
Date: Sun Aug 4 01:28:09 2002 +0000
2002-08-03 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/x86_64/clone.S (thread_start): Use
HIDDEN_JUMPTARGET for _exit.
* sysdeps/unix/sysv/linux/m68k/clone.S (thread_start): Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S (thread_start): Likewise.
* sysdeps/unix/sysv/linux/powerpc/clone.S: Likewise.
* sysdeps/unix/_exit.S (_exit): Add libc_hidden_def.
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 9ca789d..e19172a 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,98,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
@@ -58,7 +58,7 @@ thread_start:
subl %fp, %fp /* terminate the stack frame */
jsr (%a0)
movel %d0, -(%sp)
- jbsr JUMPTARGET (_exit)
+ jbsr HIDDEN_JUMPTARGET (_exit)
PSEUDO_END (__clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5d48d74e6e0ef2dd71fdb5b72b2eb58f90698aa
commit e5d48d74e6e0ef2dd71fdb5b72b2eb58f90698aa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 4 01:22:10 2002 +0000
(__stpcpy): Add libc_hidden_def.
diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S
index bb9da0c..d09babc 100644
--- a/sysdeps/alpha/alphaev67/stpcpy.S
+++ b/sysdeps/alpha/alphaev67/stpcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@redhat.com>.
@@ -50,3 +50,4 @@ ENTRY(__stpcpy)
END(__stpcpy)
weak_alias (__stpcpy, stpcpy)
+libc_hidden_def (__stpcpy)
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
index 1ed7442..a37a308 100644
--- a/sysdeps/alpha/stpcpy.S
+++ b/sysdeps/alpha/stpcpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -52,3 +52,4 @@ ENTRY(__stpcpy)
END(__stpcpy)
weak_alias (__stpcpy, stpcpy)
+libc_hidden_def (__stpcpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6af07791756ba2e015d659e268b4a8ff848209c4
commit 6af07791756ba2e015d659e268b4a8ff848209c4
Author: Roland McGrath <roland@gnu.org>
Date: Sat Aug 3 22:26:02 2002 +0000
2002-08-03 Roland McGrath <roland@redhat.com>
* include/signal.h: Use libc_hidden_proto for raise, sigemptyset,
sigfillset, sigismember, __sigpause, __libc_current_sigrtmin,
and __libc_current_sigrtmax.
* signal/sigismem.c: Add libc_hidden_def.
* signal/sigfillset.c: Likewise.
* signal/sigempty.c: Likewise.
* sysdeps/generic/sigpause.c (__sigpause): Likewise.
* sysdeps/posix/sigpause.c (__sigpause): Likewise.
* sysdeps/unix/bsd/osf/alpha/sigpause.S: Likewise.
diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S
index 021e603..7646366 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -25,5 +25,6 @@
SYSCALL__ (sigpause, 1)
ret
.end __sigpause
+libc_hidden_def (__sigpause)
weak_alias (__sigpause, sigpause)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f0c7fbd18f34931a802a6ba9cdae42001771afe
commit 9f0c7fbd18f34931a802a6ba9cdae42001771afe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 3 19:44:44 2002 +0000
Remove all __GI_* aliases.
diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list
index eb22a84..a57529e 100644
--- a/sysdeps/unix/sysv/irix4/syscalls.list
+++ b/sysdeps/unix/sysv/irix4/syscalls.list
@@ -1,8 +1,8 @@
# File name Caller Syscall name # args Strong name Weak names
-getpgid - bsdgetpgrp 1 __getpgid getpgid __GI___getpgid
+getpgid - bsdgetpgrp 1 __getpgid getpgid
msync - msync 3 msync
-setpgid - bsdsetpgrp 2 __setpgid setpgid __GI___setpgid
+setpgid - bsdsetpgrp 2 __setpgid setpgid
signal - signal 3 __raw_signal
sysmp - sysmp 4 __sysmp
syssgi - syssgi 2 __syssgi
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 7187f44..059f753 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,9 +21,9 @@ getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 __GI___pwrite64
+pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs 2 __statfs statfs statfs64 __GI___statfs
+statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
@@ -47,7 +47,7 @@ recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __libc_send __send send __GI___send
+send - send 4 __libc_send __send send
sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 0065ff0..1c7a20d 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -24,7 +24,7 @@ listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send __GI___send
+send - send i:ibni __libc_send __send send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
sendto - sendto i:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 1df662d..f7d2e29 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -24,7 +24,7 @@ listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send __GI___send
+send - send i:ibni __libc_send __send send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
sendto - sendto i:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
index fb08465..092d869 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
+++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
@@ -1,6 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
-sigaction - sigaction 3 __sigaction sigaction __GI___sigaction
+sigaction - sigaction 3 __sigaction sigaction
sigaltstack - sigaltstack 2 sigaltstack
sigpending - sigpending 2 __syscall_sigpending
sigqueue - sigqueue 3 __sigqueue sigqueue
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78413eec88754f46de273656df8fdd4c1eeeb8cc
commit 78413eec88754f46de273656df8fdd4c1eeeb8cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 3 06:58:54 2002 +0000
Add __GI_ aliases.
diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list
index a57529e..eb22a84 100644
--- a/sysdeps/unix/sysv/irix4/syscalls.list
+++ b/sysdeps/unix/sysv/irix4/syscalls.list
@@ -1,8 +1,8 @@
# File name Caller Syscall name # args Strong name Weak names
-getpgid - bsdgetpgrp 1 __getpgid getpgid
+getpgid - bsdgetpgrp 1 __getpgid getpgid __GI___getpgid
msync - msync 3 msync
-setpgid - bsdsetpgrp 2 __setpgid setpgid
+setpgid - bsdsetpgrp 2 __setpgid setpgid __GI___setpgid
signal - signal 3 __raw_signal
sysmp - sysmp 4 __sysmp
syssgi - syssgi 2 __syssgi
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 059f753..7187f44 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,9 +21,9 @@ getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 __GI___pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs 2 __statfs statfs statfs64
+statfs - statfs 2 __statfs statfs statfs64 __GI___statfs
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
@@ -47,7 +47,7 @@ recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __libc_send __send send
+send - send 4 __libc_send __send send __GI___send
sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 1c7a20d..0065ff0 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -24,7 +24,7 @@ listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send
+send - send i:ibni __libc_send __send send __GI___send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
sendto - sendto i:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index f7d2e29..1df662d 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -24,7 +24,7 @@ listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ibni __libc_send __send send
+send - send i:ibni __libc_send __send send __GI___send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
sendto - sendto i:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
index 092d869..fb08465 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
+++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
@@ -1,6 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
-sigaction - sigaction 3 __sigaction sigaction
+sigaction - sigaction 3 __sigaction sigaction __GI___sigaction
sigaltstack - sigaltstack 2 sigaltstack
sigpending - sigpending 2 __syscall_sigpending
sigqueue - sigqueue 3 __sigqueue sigqueue
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da5f5f79867173aa46c6626fe990e26bf4991fef
commit da5f5f79867173aa46c6626fe990e26bf4991fef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 3 06:57:53 2002 +0000
Add libc_hidden_def. Remove undef and INTDEF.
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index b0fa5f0..8c2caf1 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -39,6 +39,5 @@ __close (fd)
__FD_Table[ fd ].in_use = 0;
return 0;
}
-
-
+libc_hidden_def (__close)
weak_alias (__close, close)
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index 2be04f4..e0a3432 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -82,6 +82,7 @@ __open (file, oflag)
return newfd;
}
+libc_hidden_def (__open)
/* Initialization Code for Console I/O */
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 2daee87..0fb9e7a 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -80,6 +80,7 @@ __libc_read (int fd, void *buf, size_t nbytes)
*buffer = data;
return 1;
}
-
+libc_hidden_def (__libc_read)
weak_alias (__libc_read, __read)
+libc_hidden_weak (__read)
weak_alias (__libc_read, read)
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index a5fe44e..5d38230 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -67,5 +67,7 @@ __libc_write (int fd, const void *buf, size_t nbytes)
return count;
}
+libc_hidden_def (__libc_write)
weak_alias (__libc_write, __write)
+libc_hidden_weak (__write)
weak_alias (__libc_write, write)
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 93db95e..d7b8ec2 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1993,1995,1997,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1)
clrl d0
rts
+libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
index 0916ff4..b4eb216 100644
--- a/sysdeps/unix/bsd/osf/alpha/pipe.S
+++ b/sysdeps/unix/bsd/osf/alpha/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1)
ret
.end __pipe
+libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index 691cf3c..3ed7842 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,4 +25,5 @@ SYSCALL__ (pipe, 1)
clrl r0
ret
+libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index a2f4ec7..1aebb9b 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -29,4 +29,5 @@ SYSCALL__ (pipe, 1)
j ra
.end __pipe
+libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c
index 037b14b..2b6e82e 100644
--- a/sysdeps/unix/sysv/aix/chown.c
+++ b/sysdeps/unix/sysv/aix/chown.c
@@ -18,11 +18,9 @@
#include <unistd.h>
-#undef __chown
-
int
__chown (const char *file, uid_t owner, gid_t group)
{
return chown (file, owner, group);
}
-INTDEF(__chown)
+libc_hidden_def (__chown)
diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c
index f1b9a01..7be5956 100644
--- a/sysdeps/unix/sysv/aix/close.c
+++ b/sysdeps/unix/sysv/aix/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,4 @@ __close (int fd)
{
return close (fd);
}
+libc_hidden_def (__close)
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
index f9bb42a..7f16cbe 100644
--- a/sysdeps/unix/sysv/aix/fcntl.c
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -19,9 +19,6 @@
#include <fcntl.h>
#include <stdarg.h>
-#undef __libc_fcntl
-#undef __fcntl
-
extern int kfcntl (int fdes, int cmd, unsigned long int arg);
int
@@ -40,5 +37,7 @@ __fcntl (int fdes, int cmd, ...)
return res;
}
+libc_hidden_def (__fcntl)
strong_alias (__fcntl, fcntl)
strong_alias (__fcntl, __libc_fcntl)
+libc_hidden_def (__libc_fcntl)
diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c
index 889e3e1..a6e75f3 100644
--- a/sysdeps/unix/sysv/aix/getpgid.c
+++ b/sysdeps/unix/sysv/aix/getpgid.c
@@ -18,8 +18,6 @@
#include <unistd.h>
-#undef __getpgid
-
extern int kgetpgidx (pid_t pid);
int
@@ -27,5 +25,5 @@ __getgpid (pid_t pid)
{
return kgetpgidx (pid);
}
-INTDEF(__getgpid)
+libc_hidden_def (__getgpid)
strong_alias (__getpgid, getpgid)
diff --git a/sysdeps/unix/sysv/aix/getpid.c b/sysdeps/unix/sysv/aix/getpid.c
index 67ef7ea..8a74e22 100644
--- a/sysdeps/unix/sysv/aix/getpid.c
+++ b/sysdeps/unix/sysv/aix/getpid.c
@@ -1,6 +1,9 @@
/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
int
__getpid (void)
{
return getpid ();
}
+libc_hidden_def (__getpid)
diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c
index c41c708..2b42f8e 100644
--- a/sysdeps/unix/sysv/aix/open.c
+++ b/sysdeps/unix/sysv/aix/open.c
@@ -20,9 +20,6 @@
#include <stdarg.h>
#include <unistd.h>
-#undef __libc_open
-#undef __open
-
int
__open (const char *file, int oflag, ...)
{
@@ -38,5 +35,6 @@ __open (const char *file, int oflag, ...)
return open (file, oflag, mode);
}
+libc_hidden_def (__open)
strong_alias (__open, __libc_open)
-INTDEF(__open)
+libc_hidden_def (__libc_open)
diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c
index 385e0be..4a3ba1c 100644
--- a/sysdeps/unix/sysv/aix/pipe.c
+++ b/sysdeps/unix/sysv/aix/pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,3 +24,4 @@ __pipe (pipedes)
{
return pipe (pipedes);
}
+libc_hidden_def (__pipe)
diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c
index 890dcd0..5ce5409 100644
--- a/sysdeps/unix/sysv/aix/poll.c
+++ b/sysdeps/unix/sysv/aix/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,3 +26,4 @@ __poll (fds, nfds, timeout)
{
return poll (fds, nfds, timeout);
}
+libc_hidden_def (__poll)
diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c
index 50b59a3..ca0edb3 100644
--- a/sysdeps/unix/sysv/aix/read.c
+++ b/sysdeps/unix/sysv/aix/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,7 @@ __libc_read (int fd, void *buf, size_t len)
{
return kread (fd, buf, len);
}
+libc_hidden_def (__libc_read)
strong_alias (__libc_read, __read)
+libc_hidden_def (__read)
strong_alias (__libc_read, read)
diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c
index af56c4b..0a590ee 100644
--- a/sysdeps/unix/sysv/aix/sbrk.c
+++ b/sysdeps/unix/sysv/aix/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,4 @@ __sbrk (intptr_t delta)
{
return sbrk (delta);
}
+libc_hidden_def (__sbrk)
diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c
index e5c48dc..9bf5bae 100644
--- a/sysdeps/unix/sysv/aix/select.c
+++ b/sysdeps/unix/sysv/aix/select.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,3 +28,4 @@ __select (nfds, readfds, writefds, exceptfds, timeout)
{
return select (nfds, readfds, writefds, exceptfds, timeout);
}
+libc_hidden_def (__select)
diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c
index 5150929..b076f28 100644
--- a/sysdeps/unix/sysv/aix/setpgid.c
+++ b/sysdeps/unix/sysv/aix/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,4 @@ __setpgid (pid, pgid)
{
return setpgid (pid, pgid);
}
+libc_hidden_def (__setpgid)
diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c
index 272c271..6b48a50 100644
--- a/sysdeps/unix/sysv/aix/sigaction.c
+++ b/sysdeps/unix/sysv/aix/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,4 +32,5 @@ __sigaction (sig, act, oact)
{
return _sigaction (sig, act, oact);
}
+libc_hidden_def (__sigaction)
strong_alias (__sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c
index afca6b7..c9120d6 100644
--- a/sysdeps/unix/sysv/aix/sigsuspend.c
+++ b/sysdeps/unix/sysv/aix/sigsuspend.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995-1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,4 +29,5 @@ __sigsuspend (set)
{
return _sigsuspend (set);
}
+libc_hidden_def (__sigsuspend)
weak_alias (__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c
index f44a1c6..1ead597 100644
--- a/sysdeps/unix/sysv/aix/statfs.c
+++ b/sysdeps/unix/sysv/aix/statfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,4 @@ __statfs (const char *file, struct statfs *buf)
{
return statfs (file, buf);
}
+libc_hidden_def (__statfs)
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index 5a1ac10..0cc5d33 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -21,9 +21,6 @@
#include "kernel_proto.h"
-#undef __libc_write
-#undef __write
-
ssize_t
__write (fd, ptr, n)
int fd;
@@ -32,7 +29,8 @@ __write (fd, ptr, n)
{
return kwrite (fd, ptr, n);
}
-INTDEF(__write)
+libc_hidden_def (__write)
/* AIX has no weak aliases (yet) but let's hope for better times. */
weak_alias (__write, write)
strong_alias (__write, __libc_write)
+libc_hidden_def (__libc_write)
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index 5d2905a..2da4d78 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
@@ -28,4 +28,5 @@ PSEUDO (__pipe, pipe, 0)
ret
PSEUDO_END(__pipe)
+libc_hidden_def (__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 40c0f9f..57030aa 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -124,6 +124,8 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__select_tv64, __select_tv64p)
default_symbol_version (__select_tv64p, select, GLIBC_2.1)
+libc_hidden_ver (__select_tv64, __select)
#else
weak_alias (__select, select)
+libc_hidden_def (__select)
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 7aa851e..d6a1785 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
@@ -51,4 +51,5 @@ error:
END(__sigsuspend)
+libc_hidden_def (__sigsuspend)
weak_alias(__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index f39665f..a137ce7 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -150,4 +150,5 @@ __libc_sigaction (sig, act, oact)
}
weak_alias (__libc_sigaction, __sigaction)
+libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index f8f4b5c..ad0386d 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -71,5 +71,5 @@ __chown (const char *file, uid_t owner, gid_t group)
return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
#endif
}
-INTDEF(__chown)
+libc_hidden_def (__chown)
weak_alias (__chown, chown)
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 026a894..6645e2b 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -25,8 +25,6 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#undef __getpagesize
-
/* Return the system page size. */
int
__getpagesize ()
@@ -47,6 +45,5 @@ __getpagesize ()
return 4096;
}
-
-INTDEF(__getpagesize)
+libc_hidden_def (__getpagesize)
weak_alias (__getpagesize, getpagesize)
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index a655d6e..4f7299e 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
@@ -60,6 +60,7 @@ __libc_pwrite64 (fd, buf, count, offset)
}
weak_alias (__libc_pwrite64, __pwrite64)
+libc_hidden_weak (__pwrite64)
weak_alias (__libc_pwrite64, pwrite64)
# define __libc_pwrite64(fd, buf, count, offset) \
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index fb32b50..17f678c 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -136,4 +136,5 @@ __libc_sigaction (sig, act, oact)
}
weak_alias (__libc_sigaction, __sigaction)
+libc_hidden_weak (__sigaction)
weak_alias (__libc_sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
index 2064e67..e58f22e 100644
--- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,4 @@ __setpgid (pid, pgid)
{
return __pgrpsys (2, pid, pgid);
}
+libc_hidden_def (__setpgid)
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index 05f3333..ae50c17 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,4 +26,5 @@ ENTRY (__sigaction)
jb syscall_error
ret
+libc_hidden_def (__sigaction)
weak_alias (__sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
index 9313434..ea9a238 100644
--- a/sysdeps/unix/sysv/sysv4/__getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -21,8 +21,6 @@
#include <unistd.h>
#include <sys/types.h>
-#undef __getpgid
-
extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
@@ -32,4 +30,4 @@ __getpgid (pid)
{
return __pgrpsys (4, pid);
}
-INTDEF(__getpgid)
+libc_hidden_def (__getpgid)
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
index b497d7e..ac096a4 100644
--- a/sysdeps/unix/sysv/sysv4/__setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -31,3 +31,4 @@ __setpgid (pid, pgid)
{
return __pgrpsys (5, pid, pgid);
}
+libc_hidden_def (__setpgid)
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index 5ec9e2c..39fb728 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -19,8 +19,6 @@
#include <unistd.h>
#include <sys/types.h>
-#undef __getpgid
-
extern pid_t __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
@@ -30,6 +28,5 @@ __getpgid (pid)
{
return __pgrpsys (4, pid);
}
-
-INTDEF(__getpgid)
+libc_hidden_def (__getpgid)
weak_alias (__getpgid, getpgid)
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 27f4967..1ffb182 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1996,1997,1999,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,5 +30,5 @@ __setpgid (pid, pgid)
{
return __pgrpsys (5, pid, pgid);
}
-
+libc_hidden_def (__setpgid)
weak_alias (__setpgid, setpgid)
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index de0f5af..d5926b3 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1995,1996,1997,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,5 +76,5 @@ __sigaction (sig, act, oact)
return 0;
}
-
+libc_hidden_def (__sigaction)
weak_alias (__sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8daff95ddb57a306e28b6d27d8dabb2ce970c24
commit b8daff95ddb57a306e28b6d27d8dabb2ce970c24
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 3 06:41:33 2002 +0000
(__rawmemchr): Add libc_hidden_def.
diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S
index 0d60afe..8c7e942 100644
--- a/sysdeps/alpha/alphaev67/rawmemchr.S
+++ b/sysdeps/alpha/alphaev67/rawmemchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -89,4 +89,5 @@ $found:
END(__rawmemchr)
+libc_hidden_def (__rawmemchr)
weak_alias (__rawmemchr, rawmemchr)
diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S
index 521feaf..d3a69fa 100644
--- a/sysdeps/alpha/rawmemchr.S
+++ b/sysdeps/alpha/rawmemchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,4 +86,5 @@ $found:
END(__rawmemchr)
+libc_hidden_def (__rawmemchr)
weak_alias (__rawmemchr, rawmemchr)
diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S
index f52b74b..acd8f76 100644
--- a/sysdeps/m68k/rawmemchr.S
+++ b/sysdeps/m68k/rawmemchr.S
@@ -1,6 +1,6 @@
/* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR.
For Motorola 68000.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -176,4 +176,5 @@ L(L9:)
rts
END(__rawmemchr)
+libc_hidden_def (__rawmemchr)
weak_alias (__rawmemchr, rawmemchr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8c656cee5b17bd57ef52e8b99813c16330193d5
commit d8c656cee5b17bd57ef52e8b99813c16330193d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 3 06:30:45 2002 +0000
(__stpncpy): Add libc_hidden_def.
diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S
index 4b23731..4d61d71 100644
--- a/sysdeps/alpha/alphaev67/stpncpy.S
+++ b/sysdeps/alpha/alphaev67/stpncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@redhat.com)
This file is part of the GNU C Library.
@@ -112,4 +112,5 @@ $zerocount:
END(__stpncpy)
+libc_hidden_def (__stpncpy)
weak_alias (__stpncpy, stpncpy)
diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S
index 0a32356..e877cf1 100644
--- a/sysdeps/alpha/stpncpy.S
+++ b/sysdeps/alpha/stpncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
@@ -103,4 +103,5 @@ $zerocount:
END(__stpncpy)
+libc_hidden_def (__stpncpy)
weak_alias (__stpncpy, stpncpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4def79b563ca76070db7e4da055fe64d6516f1d5
commit 4def79b563ca76070db7e4da055fe64d6516f1d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 27 08:40:18 2002 +0000
(__adjtimex_internal): Add alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index d613ff0..2bed884 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -189,6 +189,7 @@ __adjtimex_tv64 (struct timex *tx)
return ret;
}
+strong_alias (__adjtimex_tv64, __adjtimex_internal);
strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1);
versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=31db6c4d741c7ea5ea447c8a890994368021345e
commit 31db6c4d741c7ea5ea447c8a890994368021345e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 24 17:36:44 2002 +0000
(PUSHARGS_1): Use more efficient instruction.
(__socket): Optimize return sequence.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index a672413..2672de7 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -35,7 +35,7 @@
#define __socket P(__,socket)
#endif
-#define PUSHARGS_1 stmfd sp!, {a1}
+#define PUSHARGS_1 str a1, [sp, $-4]!
#define PUSHARGS_2 stmfd sp!, {a1, a2}
#define PUSHARGS_3 stmfd sp!, {a1, a2, a3}
#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}
@@ -78,10 +78,8 @@ ENTRY (__socket)
/* r0 is < 0 if there was an error. */
cmn r0, $124
- bhs PLTJMP(syscall_error)
-
- /* Successful; return the syscall's value. */
- ret
+ RETINSTR(movcc, pc, r14)
+ b PLTJMP(syscall_error)
PSEUDO_END (__socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=541ee341982f94660a1b6e2e1edd4b3a7bc694c2
commit 541ee341982f94660a1b6e2e1edd4b3a7bc694c2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 24 17:36:14 2002 +0000
Improve schedule.
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index c68fec6..9e20dc6 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -35,8 +35,8 @@ C_LABEL(__curbrk)
SYSCALL__ (brk, 1)
#ifdef PIC
ldr r1, 1f
- add r1, r1, pc
-2: ldr r2, _cb_addr
+ ldr r2, _cb_addr
+2: add r1, pc, r1
add r1, r1, r2
#else
ldr r1, _cb_addr
@@ -45,7 +45,7 @@ SYSCALL__ (brk, 1)
mov r0, $0
RETINSTR(mov, pc, r14)
#ifdef PIC
-1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 4
+1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 8
_cb_addr:
.long C_SYMBOL_NAME(__curbrk)(GOTOFF)
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b24fa78c3b52bd9414e4025fb01e33a1eae9f172
commit b24fa78c3b52bd9414e4025fb01e33a1eae9f172
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 24 11:17:01 2002 +0000
Remove extra weak alias definiton of _old_sys_nerr. Define _old_sys_errlist
as strong alias.
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
index ba5e699..ba8c44b 100644
--- a/sysdeps/unix/sysv/linux/arm/errlist.c
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,10 +38,9 @@ extern const char *const *__old_sys_errlist;
const int __old_sys_nerr = OLD_ERRLIST_SIZE;
strong_alias (__old_sys_nerr, _old_sys_nerr);
-weak_alias (__old_sys_nerr, _old_sys_nerr)
compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
-weak_alias (__old_sys_errlist, _old_sys_errlist);
+strong_alias (__old_sys_errlist, _old_sys_errlist);
compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=841f536f46309c732e5ab8d644c85a826a77f90b
commit 841f536f46309c732e5ab8d644c85a826a77f90b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 20 01:02:01 2002 +0000
Remove __set_errno definition.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 2700c17..d7db91d 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -60,7 +60,6 @@
# define EOVERFLOW 32
#endif
-#define __set_errno(val) errno = (val)
/* Function to get address of global `errno' variable. */
extern int *__errno_location __P ((void)) __attribute__ ((__const__));
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
index c7d3755..217c6d5 100644
--- a/sysdeps/standalone/bits/errno.h
+++ b/sysdeps/standalone/bits/errno.h
@@ -57,5 +57,3 @@
# define ENOSPC 31
# define EBUSY 32
#endif
-
-#define __set_errno(val) errno = (val)
diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h
index f2cdba8..9f22a96 100644
--- a/sysdeps/unix/sysv/aix/bits/errno.h
+++ b/sysdeps/unix/sysv/aix/bits/errno.h
@@ -144,10 +144,6 @@
# define EMULTIHOP 125 /* Multihop is not allowed. */
# define ENOLINK 126 /* The link has been severed. */
# define EOVERFLOW 127 /* Value too large to be stored in data type.*/
-
-# ifdef _LIBC
-# define __set_errno(val) errno = (val)
-# endif
#endif
#if !defined _ERRNO_H && defined __need_Emath
diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h
index acae484..c9903c6 100644
--- a/sysdeps/unix/sysv/hpux/bits/errno.h
+++ b/sysdeps/unix/sysv/hpux/bits/errno.h
@@ -32,5 +32,3 @@
#define ENOMSG 35
#define ENOSYS 251
#endif
-
-#define __set_errno(val) errno = (val)
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
index 8b1fa44..4d75ff1 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -29,17 +29,9 @@
# define ECANCELED 125
# ifndef __ASSEMBLER__
-/* We now need a declaration of the `errno' variable. */
-extern int errno;
-
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
-# if defined _LIBC
-/* We wouldn't need a special macro anymore but it is history. */
-# define __set_errno(val) (*__errno_location ()) = (val)
-# endif /* _LIBC */
-
# if !defined _LIBC || defined _LIBC_REENTRANT
/* When using threads, errno is a per-thread value. */
# define errno (*__errno_location ())
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index 29ba980..8220c2e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -28,17 +28,9 @@
# define ENOTSUP EOPNOTSUPP
# ifndef __ASSEMBLER__
-/* We now need a declaration of the `errno' variable. */
-extern int errno;
-
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
-# if defined _LIBC
-/* We wouldn't need a special macro anymore but it is history. */
-# define __set_errno(val) (*__errno_location ()) = (val)
-# endif /* _LIBC */
-
# if !defined _LIBC || defined _LIBC_REENTRANT
/* When using threads, errno is a per-thread value. */
# define errno (*__errno_location ())
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
index 8d5d49e..6c0de92 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
@@ -166,5 +166,3 @@
# define ESTALE 151 /* Stale NFS file handle. */
#endif
-
-#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7fafc1a39a9fe939ab108c47396cce866de812f
commit d7fafc1a39a9fe939ab108c47396cce866de812f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 17 20:42:56 2002 +0000
Sign extend offset.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index b1c1c0d..45305d2 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <endian.h>
@@ -48,8 +49,9 @@ __libc_pread (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
+ assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (0, offset));
+ __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 40b2c8b..44f9d30 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <endian.h>
@@ -47,8 +48,9 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
+ assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
- __LONG_LONG_PAIR (0, offset));
+ __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=176b5726d77f172215090df8fe6b1137d63971fa
commit 176b5726d77f172215090df8fe6b1137d63971fa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 16 00:58:07 2002 +0000
Don't include <sgidefs.h>. Always use ll/sc.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index b4b7b64..bccacd9 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -20,11 +20,8 @@
#ifndef _MIPS_ATOMICITY_H
#define _MIPS_ATOMICITY_H 1
-#include <sgidefs.h>
#include <inttypes.h>
-#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
-
static inline int
__attribute__ ((unused))
exchange_and_add (volatile uint32_t *mem, int val)
@@ -34,9 +31,12 @@ exchange_and_add (volatile uint32_t *mem, int val)
__asm__ __volatile__
("/* Inline exchange & add */\n"
"1:\n\t"
+ ".set push\n\t"
+ ".set mips2\n\t"
"ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
+ ".set pop\n\t"
"beqz %1,1b\n\t"
"/* End exchange & add */"
: "=&r"(result), "=&r"(tmp), "=m"(*mem)
@@ -55,9 +55,12 @@ atomic_add (volatile uint32_t *mem, int val)
__asm__ __volatile__
("/* Inline atomic add */\n"
"1:\n\t"
+ ".set push\n\t"
+ ".set mips2\n\t"
"ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"
+ ".set pop\n\t"
"beqz %0,1b\n\t"
"/* End atomic add */"
: "=&r"(result), "=m"(*mem)
@@ -74,11 +77,14 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
__asm__ __volatile__
("/* Inline compare & swap */\n"
"1:\n\t"
+ ".set push\n\t"
+ ".set mips2\n\t"
"ll %1,%5\n\t"
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
"move %0,%4\n\t"
"sc %0,%2\n\t"
+ ".set pop\n\t"
"beqz %0,1b\n"
"2:\n\t"
"/* End compare & swap */"
@@ -89,37 +95,4 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
return ret;
}
-#else /* (_MIPS_ISA >= _MIPS_ISA_MIPS2) */
-
-#warning MIPS I atomicity functions are not atomic
-
-static inline int
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, int val)
-{
- int result = *mem;
- *mem += val;
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- *mem += val;
-}
-
-static inline int
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- if (*p != oldval)
- return 0;
-
- *p = newval;
- return 1;
-}
-
-#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
-
#endif /* atomicity.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 2a1a045..7ad916c 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -21,8 +21,6 @@
#define _SYS_TAS_H 1
#include <features.h>
-#include <sgidefs.h>
-#include <sys/sysmips.h>
__BEGIN_DECLS
@@ -34,8 +32,6 @@ extern int _test_and_set (int *p, int v) __THROW;
# define _EXTERN_INLINE extern __inline
# endif
-# if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
-
_EXTERN_INLINE int
_test_and_set (int *p, int v) __THROW
{
@@ -44,10 +40,13 @@ _test_and_set (int *p, int v) __THROW
__asm__ __volatile__
("/* Inline test and set */\n"
"1:\n\t"
+ ".set push\n\t"
+ ".set mips2\n\t"
"ll %0,%3\n\t"
"move %1,%4\n\t"
"beq %0,%4,2f\n\t"
"sc %1,%2\n\t"
+ ".set pop\n\t"
"beqz %1,1b\n"
"2:\n\t"
"/* End test and set */"
@@ -58,16 +57,6 @@ _test_and_set (int *p, int v) __THROW
return r;
}
-# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
-
-_EXTERN_INLINE int
-_test_and_set (int *p, int v) __THROW
-{
- return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0);
-}
-
-# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
-
#endif /* __USE_EXTERN_INLINES */
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94c91a35d6b2eaa6313be5876ddf91c91ade6b51
commit 94c91a35d6b2eaa6313be5876ddf91c91ade6b51
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 15 02:08:46 2002 +0000
(FIRST_FRAME_POINTER): Define.
diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
index 2a3f297..deb46c0 100644
--- a/sysdeps/arm/frame.h
+++ b/sysdeps/arm/frame.h
@@ -1,5 +1,5 @@
/* Definition of stack frame structure. ARM/APCS version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,3 +24,5 @@ struct layout
void *__unbounded sp;
void *__unbounded return_address;
};
+
+#define FIRST_FRAME_POINTER ADVANCE_STACK_FRAME (__builtin_frame_address (0))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8310ff42255ede207cab08f04ef76c5d214d9546
commit 8310ff42255ede207cab08f04ef76c5d214d9546
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 15 02:07:17 2002 +0000
[subdir=elf] (sysdep-rtld-routines, sysdep_routines, sysdep-dl-routines): Don't
define.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index aeaaa39..6040b20 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -12,11 +12,3 @@ endif
ifeq ($(subdir),resource)
sysdep_routines += oldgetrlimit64
endif
-
-ifeq ($(subdir),elf)
-# extra shared linker files to link into dl-allobjs.so and libc
-sysdep-dl-routines += dl-procinfo
-sysdep_routines += dl-procinfo
-# extra shared linker files to link only into dl-allobjs.so
-sysdep-rtld-routines += dl-procinfo
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2aac58fcdf41e5ba15720e7bfd0511e8841dd194
commit 2aac58fcdf41e5ba15720e7bfd0511e8841dd194
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 15 02:07:00 2002 +0000
(elf_machine_rel): Don't handle
R_ARM_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only check
for rtld map if neither RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined.
(elf_machine_rela): Remove unused variable.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 4a7ab38..aeee1d7 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -422,10 +422,20 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
{
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
{
-# ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map) /* Already done in rtld itself. */
+# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link.
+ This declaration cannot be done when compiling rtld.c
+ (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the
+ common defn for _dl_rtld_map, which is incompatible with a
+ weak decl in the same file. */
+# ifndef SHARED
+ weak_extern (_dl_rtld_map);
+# endif
+ if (map != &GL(dl_rtld_map)) /* Already done in rtld itself. */
# endif
*reloc_addr += map->l_addr;
}
@@ -434,6 +444,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
return;
# endif
else
+#endif
{
const Elf32_Sym *const refsym = sym;
Elf32_Addr value = RESOLVE (&sym, version, r_type);
@@ -483,7 +494,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
# ifndef SHARED
weak_extern (_dl_rtld_map);
# endif
- if (map == &_dl_rtld_map)
+ if (map == &GL(dl_rtld_map))
/* Undo the relocation done here during bootstrapping.
Now we will relocate it anew, possibly using a
binding found in the user program or a loaded library
@@ -541,7 +552,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
return;
else
{
- const Elf32_Sym *const refsym = sym;
Elf32_Addr value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6749b4a6151914f156d759e303467f61b99ef1c
commit d6749b4a6151914f156d759e303467f61b99ef1c
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jul 12 23:25:56 2002 +0000
* sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump):
Use correct indices.
Patch by Eliot Dresselhaus <eliot@ayrnetworks.com>.
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index f5fb344..f5bd3a2 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -43,8 +43,8 @@ hexvalue (unsigned long int value, char *buf, size_t len)
static void
register_dump (int fd, struct sigcontext *ctx)
{
- char regs[32][8];
- struct iovec iov[38];
+ char regs[38][8];
+ struct iovec iov[38 * 2 + 10];
size_t nr = 0;
int i;
@@ -58,7 +58,7 @@ register_dump (int fd, struct sigcontext *ctx)
++nr
/* Generate strings of register contents. */
- for (i = 0; i < 31; i++)
+ for (i = 0; i < 32; i++)
hexvalue (ctx->sc_regs[i], regs[i], 8);
hexvalue (ctx->sc_pc, regs[32], 8);
hexvalue (ctx->sc_cause, regs[33], 8);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d97abfcbcbc3d3852dbe17a3b0e4e01bc8b81742
commit d97abfcbcbc3d3852dbe17a3b0e4e01bc8b81742
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 10 20:24:32 2002 +0000
(__NSSBITS): Correct value.
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h
index bf0cae2..9093c72 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h
@@ -1,5 +1,5 @@
/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994-1996, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ typedef struct
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NSSBITS (sizeof (__sigset_t) * 8)
+#define __NSSBITS (sizeof (unsigned long int) * 8)
#define __SSELT(s) ((s) / __NSSBITS)
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=064d652e93e16bb3c4c79030eda1e3b8fe290a66
commit 064d652e93e16bb3c4c79030eda1e3b8fe290a66
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 10 20:22:09 2002 +0000
Wrong approach.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/shm.h b/sysdeps/unix/sysv/linux/mips/sys/shm.h
deleted file mode 100644
index 748c147..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/shm.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_SHM_H
-#define _SYS_SHM_H 1
-
-#include <features.h>
-
-#define __need_size_t
-#include <stddef.h>
-
-/* Get common definition of System V style IPC. */
-#include <sys/ipc.h>
-
-/* Get system dependent definition of `struct shmid_ds' and more. */
-#include <bits/shm.h>
-
-/* Define types required by the standard. */
-#define __need_time_t
-#include <time.h>
-
-#ifdef __USE_XOPEN
-# ifndef __pid_t_defined
-typedef __pid_t pid_t;
-# define __pid_t_defined
-# endif
-#endif /* X/Open */
-
-__BEGIN_DECLS
-
-/* Segment low boundary address multiple. */
-#define SHMLBA 0x40000
-
-/* The following System V style IPC functions implement a shared memory
- facility. The definition is found in XPG4.2. */
-
-/* Shared memory control operation. */
-extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
-
-/* Get shared memory segment. */
-extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
-
-/* Attach shared memory segment. */
-extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg)
- __THROW;
-
-/* Detach shared memory segment. */
-extern int shmdt (__const void *__shmaddr) __THROW;
-
-__END_DECLS
-
-#endif /* sys/shm.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3fb27d8d9a736d42c42f6aaf7a76807c46bf5474
commit 3fb27d8d9a736d42c42f6aaf7a76807c46bf5474
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 9 06:32:55 2002 +0000
Linux/MIPS specific file with extra value of SHMLBA.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/shm.h b/sysdeps/unix/sysv/linux/mips/sys/shm.h
new file mode 100644
index 0000000..748c147
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/shm.h
@@ -0,0 +1,67 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_SHM_H
+#define _SYS_SHM_H 1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Get common definition of System V style IPC. */
+#include <sys/ipc.h>
+
+/* Get system dependent definition of `struct shmid_ds' and more. */
+#include <bits/shm.h>
+
+/* Define types required by the standard. */
+#define __need_time_t
+#include <time.h>
+
+#ifdef __USE_XOPEN
+# ifndef __pid_t_defined
+typedef __pid_t pid_t;
+# define __pid_t_defined
+# endif
+#endif /* X/Open */
+
+__BEGIN_DECLS
+
+/* Segment low boundary address multiple. */
+#define SHMLBA 0x40000
+
+/* The following System V style IPC functions implement a shared memory
+ facility. The definition is found in XPG4.2. */
+
+/* Shared memory control operation. */
+extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
+
+/* Get shared memory segment. */
+extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
+
+/* Attach shared memory segment. */
+extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg)
+ __THROW;
+
+/* Detach shared memory segment. */
+extern int shmdt (__const void *__shmaddr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/shm.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1950a964a4c42cd275a088b670678ba0fda2b61
commit a1950a964a4c42cd275a088b670678ba0fda2b61
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jul 8 16:59:14 2002 +0000
Test for _SYS_UTSNAME_H, not _UTSNAME_H.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
index 08848f3..a0246c2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _UTSNAME_H
+#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
#endif
diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
index 47d46ff..5782047 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _UTSNAME_H
+#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4223e67fa1f398a6a150a7c9e53277ef9b93a39c
commit 4223e67fa1f398a6a150a7c9e53277ef9b93a39c
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jul 8 16:58:14 2002 +0000
Fix typo.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
index 6120cf7..16bb895 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
@@ -66,7 +66,7 @@ struct statvfs64
#endif
/* Definitions for the flag in `f_flag'. These definitions should be
- kept in sync which the definitions in <sys/mount.h>. */
+ kept in sync with the definitions in <sys/mount.h>. */
enum
{
ST_RDONLY = 1, /* Mount read-only. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7c273360c381c7b0838e8b5a6b4a4a2b543cd38
commit d7c273360c381c7b0838e8b5a6b4a4a2b543cd38
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Jul 6 06:36:02 2002 +0000
* sysdeps/ia64/fpu/e_acos.S: Added text of Intel license.
* sysdeps/ia64/fpu/e_acosf.S: Likewise.
* sysdeps/ia64/fpu/e_acosl.S: Likewise.
* sysdeps/ia64/fpu/e_asin.S: Likewise.
* sysdeps/ia64/fpu/e_asinf.S: Likewise.
* sysdeps/ia64/fpu/e_asinl.S: Likewise.
* sysdeps/ia64/fpu/e_atan2.S: Likewise.
* sysdeps/ia64/fpu/e_atan2f.S: Likewise.
* sysdeps/ia64/fpu/e_cosh.S: Likewise.
* sysdeps/ia64/fpu/e_coshf.S: Likewise.
* sysdeps/ia64/fpu/e_coshl.S: Likewise.
* sysdeps/ia64/fpu/e_exp.S: Likewise.
* sysdeps/ia64/fpu/e_expf.S: Likewise.
* sysdeps/ia64/fpu/e_fmod.S: Likewise.
* sysdeps/ia64/fpu/e_fmodf.S: Likewise.
* sysdeps/ia64/fpu/e_fmodl.S: Likewise.
* sysdeps/ia64/fpu/e_hypot.S: Likewise.
* sysdeps/ia64/fpu/e_hypotf.S: Likewise.
* sysdeps/ia64/fpu/e_hypotl.S: Likewise.
* sysdeps/ia64/fpu/e_log.S: Likewise.
* sysdeps/ia64/fpu/e_logf.S: Likewise.
* sysdeps/ia64/fpu/e_pow.S: Likewise.
* sysdeps/ia64/fpu/e_powf.S: Likewise.
* sysdeps/ia64/fpu/e_powl.S: Likewise.
* sysdeps/ia64/fpu/e_remainder.S: Likewise.
* sysdeps/ia64/fpu/e_remainderf.S: Likewise.
* sysdeps/ia64/fpu/e_remainderl.S: Likewise.
* sysdeps/ia64/fpu/e_scalb.S: Likewise.
* sysdeps/ia64/fpu/e_scalbf.S: Likewise.
* sysdeps/ia64/fpu/e_scalbl.S: Likewise.
* sysdeps/ia64/fpu/e_sinh.S: Likewise.
* sysdeps/ia64/fpu/e_sinhf.S: Likewise.
* sysdeps/ia64/fpu/e_sinhl.S: Likewise.
* sysdeps/ia64/fpu/e_sqrt.S: Likewise.
* sysdeps/ia64/fpu/e_sqrtf.S: Likewise.
* sysdeps/ia64/fpu/e_sqrtl.S: Likewise.
* sysdeps/ia64/fpu/libm_atan2_req.S: Likewise.
* sysdeps/ia64/fpu/libm_error.c: Likewise.
* sysdeps/ia64/fpu/libm_frexp4.S: Likewise.
* sysdeps/ia64/fpu/libm_frexp4f.S: Likewise.
* sysdeps/ia64/fpu/s_frexpl.c: Likewise.
* sysdeps/ia64/fpu/s_ilogb.S: Likewise.
* sysdeps/ia64/fpu/s_ilogbf.S: Likewise.
* sysdeps/ia64/fpu/s_ilogbl.S: Likewise.
* sysdeps/ia64/fpu/s_ldexp.S: Likewise.
* sysdeps/ia64/fpu/s_ldexpf.S: Likewise.
* sysdeps/ia64/fpu/s_ldexpl.S: Likewise.
* sysdeps/ia64/fpu/s_log1p.S: Likewise.
* sysdeps/ia64/fpu/s_log1pf.S: Likewise.
* sysdeps/ia64/fpu/s_log1pl.S: Likewise.
* sysdeps/ia64/fpu/s_logb.S: Likewise.
* sysdeps/ia64/fpu/s_logbf.S: Likewise.
* sysdeps/ia64/fpu/s_logbl.S: Likewise.
* sysdeps/ia64/fpu/s_modf.S: Likewise.
* sysdeps/ia64/fpu/s_modff.S: Likewise.
* sysdeps/ia64/fpu/s_modfl.S: Likewise.
* sysdeps/ia64/fpu/s_nearbyint.S: Likewise.
* sysdeps/ia64/fpu/s_nearbyintf.S: Likewise.
* sysdeps/ia64/fpu/s_nearbyintl.S: Likewise.
* sysdeps/ia64/fpu/s_rint.S: Likewise.
* sysdeps/ia64/fpu/s_rintf.S: Likewise.
* sysdeps/ia64/fpu/s_rintl.S: Likewise.
* sysdeps/ia64/fpu/s_round.S: Likewise.
* sysdeps/ia64/fpu/s_roundf.S: Likewise.
* sysdeps/ia64/fpu/s_roundl.S: Likewise.
* sysdeps/ia64/fpu/s_scalbn.S: Likewise.
* sysdeps/ia64/fpu/s_scalbnf.S: Likewise.
* sysdeps/ia64/fpu/s_scalbnl.S: Likewise.
* sysdeps/ia64/fpu/s_significand.S: Likewise.
* sysdeps/ia64/fpu/s_significandf.S: Likewise.
* sysdeps/ia64/fpu/s_significandl.S: Likewise.
* sysdeps/ia64/fpu/s_tan.S: Likewise.
* sysdeps/ia64/fpu/s_tanf.S: Likewise.
* sysdeps/ia64/fpu/s_tanl.S: Likewise.
* sysdeps/ia64/fpu/s_trunc.S: Likewise.
* sysdeps/ia64/fpu/s_truncf.S: Likewise.
* sysdeps/ia64/fpu/s_truncl.S: Likewise.
* sysdeps/ieee754/dbl-64/doasin.c: changed copyright notice to
reflect IBM donation of math library to FSF
* sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
* sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
* sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
* sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
* sysdeps/ieee754/dbl-64/e_log.c: Likewise.
* sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
* sysdeps/ieee754/dbl-64/e_remainder.c: Likewise.
* sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
* sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
* sysdeps/ieee754/dbl-64/mpa.c: Likewise.
* sysdeps/ieee754/dbl-64/mpatan.c: Likewise.
* sysdeps/ieee754/dbl-64/mpatan2.c: Likewise.
* sysdeps/ieee754/dbl-64/mpexp.c: Likewise.
* sysdeps/ieee754/dbl-64/mplog.c: Likewise.
* sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise.
* sysdeps/ieee754/dbl-64/mptan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
* sysdeps/ieee754/dbl-64/s_sin.c: Likewise.
* sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
* sysdeps/ieee754/dbl-64/sincos32.c: Likewise.
* sysdeps/ieee754/dbl-64/slowexp.c: Likewise.
* sysdeps/ieee754/dbl-64/slowpow.c: Likewise.
* sysdeps/gnu/netinet/udp.h: Added BSD copying permission notice
* sysdeps/vax/__longjmp.c: Likewise.
* sysdeps/vax/setjmp.c: Likewise.
* libio/filedoalloc.c: Fixed BSD copying permission notice to remove
advertising clause
* sysdeps/vax/htonl.s: Likewise.
* sysdeps/vax/htons.s: Likewise.
* libio/wfiledoalloc.c: Likewise.
* stdlib/random.c: Likewise.
* stdlib/random_r.c: Likewise.
* sysdeps/mach/sys/reboot.h: Likewise.
* inet/getnameinfo.c: Deleted advertising clause from Inner Net License
* sysdeps/posix/getaddrinfo.c: Likewise.
* sunrpc/des_impl.c: Updated license permission notice to Lesser GPL
and corrected pointer to point to the correct license.
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
index 0ab593f..8ffb8cd 100644
--- a/sysdeps/vax/__longjmp.c
+++ b/sysdeps/vax/__longjmp.c
@@ -1,9 +1,6 @@
/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
- Copyright (c) 1980 Regents of the University of California.
- This file is part of the GNU C Library.
-
+
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -17,7 +14,36 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 02111-1307 USA.
+
+ Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
+ Copyright (C) 1980 Regents of the University of California.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.*/
#include <setjmp.h>
diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s
index ba39986..f3e2195 100644
--- a/sysdeps/vax/htonl.s
+++ b/sysdeps/vax/htonl.s
@@ -1,18 +1,30 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (C) 1983 Regents of the University of California.
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s
index 1e781a1..5f9ea73 100644
--- a/sysdeps/vax/htons.s
+++ b/sysdeps/vax/htons.s
@@ -1,18 +1,30 @@
/*
- * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (C) 1983 Regents of the University of California.
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index c57e914..0e38f39 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -1,7 +1,5 @@
/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
- Copyright (c) 1980 Regents of the University of California.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,7 +14,37 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 02111-1307 USA.
+
+ Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
+ Copyright (C) 1980 Regents of the University of California.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 4. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+*/
#include <setjmp.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac309f11ea8995cf8323ab81038a72483f3d6af3
commit ac309f11ea8995cf8323ab81038a72483f3d6af3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 20 22:43:34 2002 +0000
(__fork): Remove INTDEF.
diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c
index 085342b..f3b02c9 100644
--- a/sysdeps/unix/sysv/aix/fork.c
+++ b/sysdeps/unix/sysv/aix/fork.c
@@ -25,5 +25,4 @@ __fork (void)
{
return kfork ();
}
-INTDEF(__fork)
strong_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b718f413e87a9c3925d56532c144d58e6e04582
commit 1b718f413e87a9c3925d56532c144d58e6e04582
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 20 06:23:14 2002 +0000
Don't use multi-line string literals.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 18d46e4..f70b2b3 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -407,40 +407,40 @@ asm ( \
#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
extern void tramp_name (void); \
asm ( "\
- /* Trampoline for " #tramp_name " */
- .globl " #tramp_name "
- .type " #tramp_name ",@function
-" #tramp_name ":
- /* Save return pointer */
- stw %r2,-20(%sp)
- /* Save argument registers in the call stack frame. */
- stw %r26,-36(%sp)
- stw %r25,-40(%sp)
- stw %r24,-44(%sp)
- stw %r23,-48(%sp)
- /* Build a call frame. */
- stwm %sp,64(%sp)
-
- /* Set up args to fixup func. */
- ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */
- copy %r19,%r25 /* reloc offset */
-
- /* Call the real address resolver. */
- bl " #fixup_name ",%r2
- copy %r21,%r19 /* delay slot, set fixup func ltp */
-
- ldwm -64(%sp),%sp
- /* Arguments. */
- ldw -36(%sp),%r26
- ldw -40(%sp),%r25
- ldw -44(%sp),%r24
- ldw -48(%sp),%r23
- /* Return pointer. */
- ldw -20(%sp),%r2
- /* Call the real function. */
- ldw 0(%r28),%r22
- bv %r0(%r22)
- ldw 4(%r28),%r19
+ /* Trampoline for " #tramp_name " */ \n\
+ .globl " #tramp_name " \n\
+ .type " #tramp_name ",@function \n\
+" #tramp_name ": \n\
+ /* Save return pointer */ \n\
+ stw %r2,-20(%sp) \n\
+ /* Save argument registers in the call stack frame. */ \n\
+ stw %r26,-36(%sp) \n\
+ stw %r25,-40(%sp) \n\
+ stw %r24,-44(%sp) \n\
+ stw %r23,-48(%sp) \n\
+ /* Build a call frame. */ \n\
+ stwm %sp,64(%sp) \n\
+ \n\
+ /* Set up args to fixup func. */ \n\
+ ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */ \n\
+ copy %r19,%r25 /* reloc offset */ \n\
+ \n\
+ /* Call the real address resolver. */ \n\
+ bl " #fixup_name ",%r2 \n\
+ copy %r21,%r19 /* delay slot, set fixup func ltp */ \n\
+ \n\
+ ldwm -64(%sp),%sp \n\
+ /* Arguments. */ \n\
+ ldw -36(%sp),%r26 \n\
+ ldw -40(%sp),%r25 \n\
+ ldw -44(%sp),%r24 \n\
+ ldw -48(%sp),%r23 \n\
+ /* Return pointer. */ \n\
+ ldw -20(%sp),%r2 \n\
+ /* Call the real function. */ \n\
+ ldw 0(%r28),%r22 \n\
+ bv %r0(%r22) \n\
+ ldw 4(%r28),%r19 \n\
");
#ifndef PROF
@@ -567,13 +567,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
probably haven't relocated the necessary values by this
point so we have to find them ourselves. */
- asm ("bl 0f,%0
- depi 0,31,2,%0
-0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0
- ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1
- addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0
- ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2
- addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0
+ asm ("bl 0f,%0 \n\
+ depi 0,31,2,%0 \n\
+0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0 \n\
+ ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1 \n\
+ addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0 \n\
+ ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2 \n\
+ addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0 \n\
ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3"
:
"=r" (dot),
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dced4334e403f5b4c9b8c03c556df8b51f257c72
commit dced4334e403f5b4c9b8c03c556df8b51f257c72
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jun 15 20:53:37 2002 +0000
2002-06-15 Roland McGrath <roland@frob.com>
* sysdeps/alpha/divrem.h: Use local label instead of global one for
jump to local subroutine.
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index 9e0d591..032308d 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -86,6 +86,7 @@
.align 3
UFUNC_NAME:
+$udiv_entry:
lda sp, -STACK(sp)
.frame sp, STACK, retaddr, 0
#ifdef PROF
@@ -206,7 +207,7 @@ SFUNC_NAME:
cmovge AT, AT, arg2
/* Do the unsigned division. */
- bsr retaddr, UFUNC_NAME
+ bsr retaddr, $udiv_entry
/* Restore originals and adjust the sign of the result. */
ldq arg1, 0(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ee46773b963ad3dd2ac6e4b16c17c2f79c30609
commit 0ee46773b963ad3dd2ac6e4b16c17c2f79c30609
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jun 13 12:38:20 2002 +0000
Remove INTDEF.
diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c
index c9e5718..dafbd59 100644
--- a/sysdeps/m68k/fpu/s_finite.c
+++ b/sysdeps/m68k/fpu/s_finite.c
@@ -1,3 +1,2 @@
#define FUNC finite
#include <s_isinf.c>
-INTDEF(__finite)
diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c
index 921b2f2..b81342e 100644
--- a/sysdeps/m68k/fpu/s_finitef.c
+++ b/sysdeps/m68k/fpu/s_finitef.c
@@ -1,3 +1,2 @@
#define FUNC finitef
#include <s_isinff.c>
-INTDEF(__finitef)
diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c
index 10a18a1..bd346a2 100644
--- a/sysdeps/m68k/fpu/s_finitel.c
+++ b/sysdeps/m68k/fpu/s_finitel.c
@@ -1,3 +1,2 @@
#define FUNC finitel
#include <s_isinfl.c>
-INTDEF(__finitel)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d18187562b4fd728cd86abf35053a74063fcee6
commit 4d18187562b4fd728cd86abf35053a74063fcee6
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 13 08:56:05 2002 +0000
2002-06-13 Roland McGrath <roland@frob.com>
* hurd/hurdstartup.h (_hurd_startup): int -> intptr_t in MAIN arg type.
* hurd/hurdstartup.c (_hurd_startup): Likewise.
Use intptr_t instead of int for argc in stack layout.
* sysdeps/mach/hurd/alpha/init-first.c (init): Fix argument type.
(_dl_init_first): Likewise.
(_hurd_stack_setup): Likewise.
(init1): Add a cast.
diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c
index bb60cd0..e15e2ca 100644
--- a/sysdeps/mach/hurd/alpha/init-first.c
+++ b/sysdeps/mach/hurd/alpha/init-first.c
@@ -89,7 +89,7 @@ static void
init1 (intptr_t *data)
{
int argc = (intptr_t) *data;
- char **argv = &data[1];
+ char **argv = (char **) &data[1];
char **envp = &argv[argc + 1];
struct hurd_startup_data *d;
@@ -136,7 +136,7 @@ init1 (intptr_t *data)
static inline void
-init (int *data)
+init (intptr_t *data)
{
int argc = *data;
char **argv = (void *) (data + 1);
@@ -255,7 +255,7 @@ first_init (void)
stack set up just as the user will see it, so it can switch stacks. */
void
-_dl_init_first (int argc, ...)
+_dl_init_first (intptr_t argc, ...)
{
first_init ();
@@ -283,7 +283,7 @@ strong_alias (posixland_init, __libc_init_first);
void
-_hurd_stack_setup (volatile int argc, ...)
+_hurd_stack_setup (volatile intptr_t argc, ...)
{
first_init ();
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=440fb8d5e6d5cd1963eb1d6f6853dfbc2e22a677
commit 440fb8d5e6d5cd1963eb1d6f6853dfbc2e22a677
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jun 13 07:52:09 2002 +0000
(INTDEFX): Define to get correct expansion order.
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 98a7c62..d87a231 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -34,6 +34,7 @@ __CONCATX(__,FUNC) (x)
return __m81_u(__CONCATX(__,FUNC))(x);
}
-INTDEF(__CONCATX(__,FUNC))
+#define INTDEFX(a) INTDEF(a)
+INTDEFX(__CONCATX(__,FUNC))
#define weak_aliasx(a,b) weak_alias(a,b)
weak_aliasx (__CONCATX(__,FUNC), FUNC)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8248bb200e2867eb883b0a0b7f2b255c75864220
commit 8248bb200e2867eb883b0a0b7f2b255c75864220
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jun 7 12:33:51 2002 +0000
* sysdeps/unix/sysv/linux/alpha/sendfile64.c: New.
* sysdeps/unix/sysv/linux/ia64/sendfile64.c: New.
* sysdeps/unix/sysv/linux/sparc/sparc64/sendfile64.c: New.
* sysdeps/unix/sysv/linux/x86_64/sendfile64.c: New.
* sysdeps/unix/sysv/linux/syscalls.list (sendfile): Remove EXTRA.
(sendfile64): Likewise.
* sysdeps/unix/sysv/linux/alpha/syscalls.list (sendfile): Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list (sendfile): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (sendfile):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list (sendfile): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/sendfile64.c b/sysdeps/unix/sysv/linux/alpha/sendfile64.c
new file mode 100644
index 0000000..4c451bd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sendfile64.c
@@ -0,0 +1 @@
+/* sendfile64 is alias of sendfile syscall. */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 28c60bb..059f753 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -29,7 +29,7 @@ setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
truncate - truncate 2 truncate truncate64
readahead EXTRA readahead 3 __readahead readahead
-sendfile EXTRA sendfile i:iipi sendfile sendfile64
+sendfile - sendfile i:iipi sendfile sendfile64
# these are actually common with the x86:
sys_ustat ustat ustat 2 __syscall_ustat
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c5f8b1a2620a45643944915f3d66df0f4f6fc232
commit c5f8b1a2620a45643944915f3d66df0f4f6fc232
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jun 6 14:16:07 2002 +0000
(elf_machine_rela): Cast reloc_addr to an integer type before performing
bit operations on it.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index b30a3ba..18d46e4 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -531,7 +531,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
return;
#endif
/* .eh_frame can have unaligned relocs. */
- if (reloc_addr & 3)
+ if ((unsigned long) reloc_addr & 3)
{
char *rel_addr = (char *) reloc_addr;
rel_addr[0] = value >> 24;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=988c5207b1646a13569f5f0aea601b507a669ac9
commit 988c5207b1646a13569f5f0aea601b507a669ac9
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jun 6 14:14:17 2002 +0000
Cris stack information.
diff --git a/sysdeps/cris/stackinfo.h b/sysdeps/cris/stackinfo.h
new file mode 100644
index 0000000..43c9448
--- /dev/null
+++ b/sysdeps/cris/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On cris the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c07e4b79e4d1f8963723bb5f8cec03d47d651c1
commit 5c07e4b79e4d1f8963723bb5f8cec03d47d651c1
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 5 08:55:48 2002 +0000
2002-06-04 Roland McGrath <roland@frob.com>
* sysdeps/alpha/elf/configure.in: New file. Check for TLS support.
* sysdeps/alpha/elf/configure: New file (generated).
diff --git a/sysdeps/alpha/elf/configure b/sysdeps/alpha/elf/configure
new file mode 100644
index 0000000..3346b8e
--- /dev/null
+++ b/sysdeps/alpha/elf/configure
@@ -0,0 +1,60 @@
+ # Local configure fragment for sysdeps/alpha/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+echo $ac_n "checking for Alpha TLS support""... $ac_c" 1>&6
+echo "configure:8: checking for Alpha TLS support" >&5
+if eval "test \"`echo '$''{'libc_cv_alpha_tls'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.s <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .quad 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 8
+ .text
+baz:
+ .set nomacro
+ ldq $27, __tls_get_addr($29) !literal!1
+ ldq $16, a($29) !tlsgd!1
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
+
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
+ ldq $27, __tls_get_addr($29) !literal!2
+ ldq $16, b($29) !tlsldm!2
+
+ ldq $16, c($29) !tlsgd
+ ldq $16, d($29) !tlsldm
+
+ ldq $16, e($29) !tlsgd!3
+ ldq $16, f($29) !tlsldm!4
+
+ ldq $16, g($29) !gotdtprel
+ ldah $16, h($31) !dtprelhi
+ lda $16, i($16) !dtprello
+ lda $16, j($31) !dtprel
+
+ ldq $16, k($29) !gottprel
+ ldah $16, l($31) !tprelhi
+ lda $16, m($16) !tprello
+ lda $16, n($31) !tprel
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:46: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ libc_cv_alpha_tls=yes
+else
+ libc_cv_alpha_tls=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_alpha_tls" 1>&6
+if test $libc_cv_alpha_tls = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_TLS_SUPPORT 1
+EOF
+
+fi
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3616a53d7d0af9c1606f5bec8adc0bf6d0192850
commit 3616a53d7d0af9c1606f5bec8adc0bf6d0192850
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 4 19:02:43 2002 +0000
2002-06-04 Roland McGrath <roland@frob.com>
* sysdeps/alpha/elf/configure.in: New file. Check for TLS support.
* sysdeps/alpha/elf/configure: New file (generated).
diff --git a/sysdeps/alpha/elf/configure.in b/sysdeps/alpha/elf/configure.in
new file mode 100644
index 0000000..7548046
--- /dev/null
+++ b/sysdeps/alpha/elf/configure.in
@@ -0,0 +1,53 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/alpha/elf.
+
+if test "$usetls" != no; then
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl
+cat > conftest.s <<\EOF
+ .section ".tdata", "awT", @progbits
+ .globl foo
+foo: .quad 1
+ .section ".tbss", "awT", @nobits
+ .globl bar
+bar: .skip 8
+ .text
+baz:
+ .set nomacro
+ ldq $27, __tls_get_addr($29) !literal!1
+ ldq $16, a($29) !tlsgd!1
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
+
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
+ ldq $27, __tls_get_addr($29) !literal!2
+ ldq $16, b($29) !tlsldm!2
+
+ ldq $16, c($29) !tlsgd
+ ldq $16, d($29) !tlsldm
+
+ ldq $16, e($29) !tlsgd!3
+ ldq $16, f($29) !tlsldm!4
+
+ ldq $16, g($29) !gotdtprel
+ ldah $16, h($31) !dtprelhi
+ lda $16, i($16) !dtprello
+ lda $16, j($31) !dtprel
+
+ ldq $16, k($29) !gottprel
+ ldah $16, l($31) !tprelhi
+ lda $16, m($16) !tprello
+ lda $16, n($31) !tprel
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
+ libc_cv_alpha_tls=yes
+else
+ libc_cv_alpha_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_alpha_tls = yes; then
+ AC_DEFINE(HAVE_TLS_SUPPORT)
+fi
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88a34a05ea15e2163978066b050701304950a30f
commit 88a34a05ea15e2163978066b050701304950a30f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 4 18:35:07 2002 +0000
2002-06-01 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/alpha/init-first.c: New file, modified from
i386/init-first.c by Andrew M. Miklic <miklic@attglobal.net>.
diff --git a/sysdeps/mach/hurd/alpha/init-first.c b/sysdeps/mach/hurd/alpha/init-first.c
new file mode 100644
index 0000000..bb60cd0
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/init-first.c
@@ -0,0 +1,304 @@
+/* Initialization code run first thing by the ELF startup code. Alpha/Hurd.
+ Copyright (C) 1995,96,97,98,99,2000,2001,02 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <assert.h>
+#include <hurd.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <sysdep.h>
+#include <set-hooks.h>
+#include "hurdstartup.h"
+#include "hurdmalloc.h" /* XXX */
+
+extern void __mach_init (void);
+extern void __libc_init (int, char **, char **);
+extern void __init_misc (int, char **, char **);
+#ifdef USE_NONOPTION_FLAGS
+extern void __getopt_clean_environment (char **);
+#endif
+#ifndef SHARED
+extern void _dl_non_dynamic_init (void) internal_function;
+#endif
+extern void __libc_global_ctors (void);
+
+unsigned int __hurd_threadvar_max;
+unsigned long int __hurd_threadvar_stack_offset;
+unsigned long int __hurd_threadvar_stack_mask;
+
+#ifndef SHARED
+int __libc_enable_secure;
+#endif
+int __libc_multiple_libcs attribute_hidden = 1;
+
+extern int __libc_argc attribute_hidden;
+extern char **__libc_argv attribute_hidden;
+extern char **_dl_argv;
+
+void *(*_cthread_init_routine) (void); /* Returns new SP to use. */
+void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
+
+/* Things that want to be run before _hurd_init or much anything else.
+ Importantly, these are called before anything tries to use malloc. */
+DEFINE_HOOK (_hurd_preinit_hook, (void));
+
+
+/* We call this once the Hurd magic is all set up and we are ready to be a
+ Posixoid program. This does the same things the generic version does. */
+static void
+posixland_init (int argc, char **argv, char **envp)
+{
+ __libc_argc = argc;
+ __libc_argv = argv;
+ __environ = envp;
+
+#ifndef SHARED
+ _dl_non_dynamic_init ();
+#endif
+ __init_misc (argc, argv, envp);
+ __libc_init (argc, argv, envp);
+
+#ifdef USE_NONOPTION_FLAGS
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment (envp);
+#endif
+
+#ifdef SHARED
+ __libc_global_ctors ();
+#endif
+}
+
+
+static void
+init1 (intptr_t *data)
+{
+ int argc = (intptr_t) *data;
+ char **argv = &data[1];
+ char **envp = &argv[argc + 1];
+ struct hurd_startup_data *d;
+
+ while (*envp)
+ ++envp;
+ d = (void *) ++envp;
+
+ /* If we are the bootstrap task started by the kernel,
+ then after the environment pointers there is no Hurd
+ data block; the argument strings start there. */
+ /* OSF Mach starts the bootstrap task with argc == 0.
+ XXX This fails if a non-bootstrap task gets started
+ with argc == 0. */
+ if (argc && (void *) d != argv[0])
+ {
+ _hurd_init_dtable = d->dtable;
+ _hurd_init_dtablesize = d->dtablesize;
+
+ {
+ /* Check if the stack we are now on is different from
+ the one described by _hurd_stack_{base,size}. */
+
+ char dummy;
+ const vm_address_t newsp = (vm_address_t) &dummy;
+
+ if (d->stack_size != 0 && (newsp < d->stack_base ||
+ newsp - d->stack_base > d->stack_size))
+ /* The new stack pointer does not intersect with the
+ stack the exec server set up for us, so free that stack. */
+ __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size);
+ }
+ }
+
+ if ((void *) d != argv[0] && (d->portarray || d->intarray))
+ /* Initialize library data structures, start signal processing, etc. */
+ _hurd_init (d->flags, argv,
+ d->portarray, d->portarraysize,
+ d->intarray, d->intarraysize);
+
+#ifndef SHARED
+ __libc_enable_secure = d->flags & EXEC_SECURE;
+#endif
+}
+
+
+static inline void
+init (int *data)
+{
+ int argc = *data;
+ char **argv = (void *) (data + 1);
+ char **envp = &argv[argc + 1];
+ struct hurd_startup_data *d;
+ unsigned long int threadvars[_HURD_THREADVAR_MAX];
+
+ /* Provide temporary storage for thread-specific variables on the
+ startup stack so the cthreads initialization code can use them
+ for malloc et al, or so we can use malloc below for the real
+ threadvars array. */
+ memset (threadvars, 0, sizeof threadvars);
+ __hurd_threadvar_stack_offset = (unsigned long int) threadvars;
+
+ /* Since the cthreads initialization code uses malloc, and the
+ malloc initialization code needs to get at the environment, make
+ sure we can find it. We'll need to do this again later on since
+ switching stacks changes the location where the environment is
+ stored. */
+ __environ = envp;
+
+ while (*envp)
+ ++envp;
+ d = (void *) ++envp;
+
+ /* The user might have defined a value for this, to get more variables.
+ Otherwise it will be zero on startup. We must make sure it is set
+ properly before before cthreads initialization, so cthreads can know
+ how much space to leave for thread variables. */
+ if (__hurd_threadvar_max < _HURD_THREADVAR_MAX)
+ __hurd_threadvar_max = _HURD_THREADVAR_MAX;
+
+
+ /* After possibly switching stacks, call `init1' (above) with the user
+ code as the return address, and the argument data immediately above
+ that on the stack. */
+
+ if (_cthread_init_routine)
+ {
+ /* Initialize cthreads, which will allocate us a new stack to run on. */
+ void *newsp = (*_cthread_init_routine) ();
+ struct hurd_startup_data *od;
+
+ void switch_stacks (void);
+
+ /* Copy per-thread variables from that temporary
+ area onto the new cthread stack. */
+ memcpy (__hurd_threadvar_location_from_sp (0, newsp),
+ threadvars, sizeof threadvars);
+
+ /* Copy the argdata from the old stack to the new one. */
+ newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data,
+ (char *) d - (char *) data);
+
+#ifdef SHARED
+ /* And readjust the dynamic linker's idea of where the argument
+ vector lives. */
+ assert (_dl_argv == argv);
+ _dl_argv = (void *) ((int *) newsp + 1);
+#endif
+
+ /* Set up the Hurd startup data block immediately following
+ the argument and environment pointers on the new stack. */
+ od = (newsp + ((char *) d - (char *) data));
+ if ((void *) argv[0] == d)
+ /* We were started up by the kernel with arguments on the stack.
+ There is no Hurd startup data, so zero the block. */
+ memset (od, 0, sizeof *od);
+ else
+ /* Copy the Hurd startup data block to the new stack. */
+ *od = *d;
+
+ /*
+ Force NEWSP into sp and &init1 into pv, then branch to pv (call init1).
+ */
+ asm volatile ("lda $30,0(%0); lda $27,0(%1); jsr $26,($27)"
+ : : "r" (newsp), "r" (&init1));
+ }
+ else
+ {
+ /* We are not using cthreads, so we will have just a single allocated
+ area for the per-thread variables of the main user thread. */
+ unsigned long int *array;
+ unsigned int i;
+
+ array = malloc (__hurd_threadvar_max * sizeof (unsigned long int));
+ if (array == NULL)
+ __libc_fatal ("Can't allocate single-threaded thread variables.");
+
+ /* Copy per-thread variables from the temporary array into the
+ newly malloc'd space. */
+ memcpy (array, threadvars, sizeof threadvars);
+ __hurd_threadvar_stack_offset = (unsigned long int) array;
+ for (i = _HURD_THREADVAR_MAX; i < __hurd_threadvar_max; ++i)
+ array[i] = 0;
+
+ init1 (data);
+ }
+}
+
+
+/* Do the first essential initializations that must precede all else. */
+static inline void
+first_init (void)
+{
+ /* Initialize data structures so we can do RPCs. */
+ __mach_init ();
+
+ RUN_HOOK (_hurd_preinit_hook, ());
+}
+
+#ifdef SHARED
+/* This function is called specially by the dynamic linker to do early
+ initialization of the shared C library before normal initializers
+ expecting a Posixoid environment can run. It gets called with the
+ stack set up just as the user will see it, so it can switch stacks. */
+
+void
+_dl_init_first (int argc, ...)
+{
+ first_init ();
+
+ init (&argc);
+}
+#endif
+
+
+#ifdef SHARED
+/* The regular posixland initialization is what goes into libc's
+ normal initializer. */
+/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
+ pointer in the dynamic section based solely on that. It is convention
+ for this function to be in the `.init' section, but the symbol name is
+ the only thing that really matters!! */
+strong_alias (posixland_init, _init);
+
+void
+__libc_init_first (int argc, char **argv, char **envp)
+{
+ /* Everything was done in the shared library initializer, _init. */
+}
+#else
+strong_alias (posixland_init, __libc_init_first);
+
+
+void
+_hurd_stack_setup (volatile int argc, ...)
+{
+ first_init ();
+
+ _hurd_startup ((void **) &argc, &init);
+}
+#endif
+
+
+/* This function is defined here so that if this file ever gets into
+ ld.so we will get a link error. Having this file silently included
+ in ld.so causes disaster, because the _init definition above will
+ cause ld.so to gain an init function, which is not a cool thing. */
+
+void
+_dl_start (void)
+{
+ abort ();
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79c8c187bbbeef4b456b66a12e9dc588f0ddbe3a
commit 79c8c187bbbeef4b456b66a12e9dc588f0ddbe3a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 30 23:23:09 2002 +0000
Add readahead syscall. Add sendfile64 alias to sendfile syscall.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 3dc0734..28c60bb 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -28,6 +28,8 @@ getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
truncate - truncate 2 truncate truncate64
+readahead EXTRA readahead 3 __readahead readahead
+sendfile EXTRA sendfile i:iipi sendfile sendfile64
# these are actually common with the x86:
sys_ustat ustat ustat 2 __syscall_ustat
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b2c91151309f6bb952aa72c5526b4c4a9719259
commit 2b2c91151309f6bb952aa72c5526b4c4a9719259
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 29 08:09:20 2002 +0000
2002-05-28 Roland McGrath <roland@frob.com>
* sysdeps/mach/alpha/setfpucw.c: New file.
diff --git a/sysdeps/mach/alpha/setfpucw.c b/sysdeps/mach/alpha/setfpucw.c
new file mode 100644
index 0000000..a2887c8
--- /dev/null
+++ b/sysdeps/mach/alpha/setfpucw.c
@@ -0,0 +1,69 @@
+/* Set FP exception mask and rounding mode. Mach/Alpha version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <fpu_control.h>
+
+
+#define FPCR_DYN_SHIFT 58 /* first dynamic rounding mode bit */
+#define FPCR_DYN_CHOPPED (0x0UL << FPCR_DYN_SHIFT) /* towards 0 */
+#define FPCR_DYN_MINUS (0x1UL << FPCR_DYN_SHIFT) /* towards -INF */
+#define FPCR_DYN_NORMAL (0x2UL << FPCR_DYN_SHIFT) /* towards nearest */
+#define FPCR_DYN_PLUS (0x3UL << FPCR_DYN_SHIFT) /* towards +INF */
+#define FPCR_DYN_MASK (0x3UL << FPCR_DYN_SHIFT)
+
+static inline unsigned long
+rdfpcr (void)
+{
+ unsigned long fpcr;
+ asm ("excb; mf_fpcr %0" : "=f"(fpcr));
+ return fpcr;
+}
+
+static inline void
+wrfpcr (unsigned long fpcr)
+{
+ asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr));
+}
+
+
+void
+__setfpucw (fpu_control_t fpu_control)
+{
+ unsigned long fpcr;
+
+ if (!fpu_control)
+ fpu_control = _FPU_DEFAULT;
+
+ /* first, set dynamic rounding mode: */
+
+ fpcr = rdfpcr();
+ fpcr &= ~FPCR_DYN_MASK;
+ switch (fpu_control & 0xc00)
+ {
+ case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break;
+ case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break;
+ case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break;
+ case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break;
+ }
+ wrfpcr(fpcr);
+
+ /* XXX trap bits? */
+
+ __fpu_control = fpu_control; /* update global copy */
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb7e1f616e25ec85ee8ce49612a0af4e3c6a09d3
commit eb7e1f616e25ec85ee8ce49612a0af4e3c6a09d3
Author: Andreas Jaeger <aj@suse.de>
Date: Sun May 19 16:24:27 2002 +0000
Don't use multiline string as argument of #error.
diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
index 109aa05..d8fe8c8 100644
--- a/sysdeps/unix/sysv/aix/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. AIX version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,7 @@
02111-1307 USA. */
#ifndef _SYS_IOCTL_H
-# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead
-"
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
#endif
/* Constants for use with `ioctl'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a51465638191ad1f768816bf85ca6a58e5c9b30f
commit a51465638191ad1f768816bf85ca6a58e5c9b30f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 15 00:20:02 2002 +0000
(__recvmsg, __sendmsg): Add aliases.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index eb64186..3dc0734 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -43,10 +43,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg 3 __libc_recvmsg recvmsg
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
send - send 4 __libc_send __send send
-sendmsg - sendmsg 3 __libc_sendmsg sendmsg
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 2c7a639..1c7a20d 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -23,9 +23,9 @@ getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg
+recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
send - send i:ibni __libc_send __send send
-sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg
+sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
sendto - sendto i:ibnibn __libc_sendto __sendto sendto
setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c68ac2b46b59c20f012ddabb2c56467fe398e4e
commit 4c68ac2b46b59c20f012ddabb2c56467fe398e4e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 15 00:14:45 2002 +0000
(__getsockname): Renamed from getsockname, add getsockname as weak alias.
diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c
index 822f9e9..ac1bf34 100644
--- a/sysdeps/unix/sysv/aix/getsockname.c
+++ b/sysdeps/unix/sysv/aix/getsockname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,9 @@
extern int ngetsockname (int s, void *uap_asa, int *uap_alen);
int
-getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len)
+__getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len)
{
return ngetsockname (fd, addr.__sockaddr__, len);
}
+
+weak_alias (__getsockname, getsockname)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd96b0cb1d15fe0fcb49a7bdff81e66b93597436
commit dd96b0cb1d15fe0fcb49a7bdff81e66b93597436
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 15 00:10:13 2002 +0000
(__sendmsg): Renamed from sendmsg, add sendmsg as weak alias.
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
index 054d374..5b1baf6 100644
--- a/sysdeps/unix/sysv/aix/sendmsg.c
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,10 @@
extern int nsendmsg (int s, const void *uap_msg, int flags);
ssize_t
-sendmsg (int fd, const struct msghdr *message, int flags)
+__sendmsg (int fd, const struct msghdr *message, int flags)
{
return nsendmsg (fd, message, flags);
}
+
+weak_alias (__sendmsg, sendmsg)
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa87d850d1ff354fb509366cc512b1245ab213e0
commit fa87d850d1ff354fb509366cc512b1245ab213e0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 15 00:08:25 2002 +0000
(__recvfrom): Renamed from recvfrom, add recvfrom as weak alias.
diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c
index 0826428..08ff111 100644
--- a/sysdeps/unix/sysv/aix/recvfrom.c
+++ b/sysdeps/unix/sysv/aix/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,10 @@ extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags,
void *uap_from, socklen_t *uap_fromlenaddr);
ssize_t
-recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
- socklen_t *addr_len)
+__recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
+ socklen_t *addr_len)
{
return nrecvfrom (fd, buf, n, flags, addr.__sockaddr__, addr_len);
}
+
+weak_alias (__recvfrom, recvfrom)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7fbbcc094fea6c4bd4972aae132f524cde829a2c
commit 7fbbcc094fea6c4bd4972aae132f524cde829a2c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 15 00:07:30 2002 +0000
(__recvmsg): Renamed from recvmsg, add recvmsg as weak alias.
diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c
index ea5af35..201c267 100644
--- a/sysdeps/unix/sysv/aix/recvmsg.c
+++ b/sysdeps/unix/sysv/aix/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,9 @@
extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags);
ssize_t
-recvmsg (int fd, struct msghdr *message, int flags)
+__recvmsg (int fd, struct msghdr *message, int flags)
{
return nrecvmsg (fd, message, flags);
}
+
+weak_alias (__recvmsg, recvmsg)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b282d81219d5abf526c7ef2e50dc177c4c3658c
commit 9b282d81219d5abf526c7ef2e50dc177c4c3658c
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 2 21:13:45 2002 +0000
2002-05-01 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/alpha/static-start.S: New file (unfinished).
diff --git a/sysdeps/mach/hurd/alpha/static-start.S b/sysdeps/mach/hurd/alpha/static-start.S
new file mode 100644
index 0000000..a31d0d0
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/static-start.S
@@ -0,0 +1,30 @@
+/* Startup code for statically linked Hurd/Alpha binaries.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .text
+ .align 3
+ .globl _start
+ .type _start,@function
+_start:
+ jsr ra, _hurd_stack_setup
+
+#define _start _start1
+#include <sysdeps/alpha/elf/start.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=942fe80901b6edc2ce0f154bbea7190cb3ceee1d
commit 942fe80901b6edc2ce0f154bbea7190cb3ceee1d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Apr 30 22:00:59 2002 +0000
2002-04-30 Roland McGrath <roland@frob.com>
Removed old GNU stdio implementation; GNU libio is now the only option.
* configure.in: Removed --enable-libio option and @stdio@ subst var.
Define USE_IN_LIBIO unconditionally.
* configure: Regenerated.
* Makeconfig (stdio): Set to libio by default.
* config.make.in (stdio): Variable removed.
* sysdeps/unix/sysv/linux/configure.in: Don't set $stdio.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/mach/hurd/configure.in: Don't test $stdio.
* sysdeps/mach/hurd/configure: Regenerated.
* stdio/.cvsignore: File removed.
* stdio/Makefile: File removed.
* stdio/Versions: File removed.
* stdio/__fbufsize.c: File removed.
* stdio/__flbf.c: File removed.
* stdio/__fpending.c: File removed.
* stdio/__fpurge.c: File removed.
* stdio/__freadable.c: File removed.
* stdio/__freading.c: File removed.
* stdio/__fsetlocking.c: File removed.
* stdio/__fwritable.c: File removed.
* stdio/__fwriting.c: File removed.
* stdio/clearerr.c: File removed.
* stdio/fclose.c: File removed.
* stdio/fcloseall.c: File removed.
* stdio/feof.c: File removed.
* stdio/ferror.c: File removed.
* stdio/fflush.c: File removed.
* stdio/fgetc.c: File removed.
* stdio/fgetpos.c: File removed.
* stdio/fgets.c: File removed.
* stdio/fileno.c: File removed.
* stdio/fmemopen.c: File removed.
* stdio/fopen.c: File removed.
* stdio/fopncook.c: File removed.
* stdio/fputc.c: File removed.
* stdio/fputs.c: File removed.
* stdio/fread.c: File removed.
* stdio/freopen.c: File removed.
* stdio/fseek.c: File removed.
* stdio/fsetpos.c: File removed.
* stdio/ftell.c: File removed.
* stdio/fwrite.c: File removed.
* stdio/getc.c: File removed.
* stdio/getchar.c: File removed.
* stdio/getdelim.c: File removed.
* stdio/gets.c: File removed.
* stdio/glue.c: File removed.
* stdio/internals.c: File removed.
* stdio/linewrap.c: File removed.
* stdio/linewrap.h: File removed.
* stdio/memstream.c: File removed.
* stdio/newstream.c: File removed.
* stdio/obstream.c: File removed.
* stdio/putc.c: File removed.
* stdio/putchar.c: File removed.
* stdio/puts.c: File removed.
* stdio/rewind.c: File removed.
* stdio/setbuf.c: File removed.
* stdio/setbuffer.c: File removed.
* stdio/setlinebuf.c: File removed.
* stdio/setvbuf.c: File removed.
* stdio/stdio.h: File removed.
* stdio/ungetc.c: File removed.
* stdio/vasprintf.c: File removed.
* stdio/vscanf.c: File removed.
* stdio/vsnprintf.c: File removed.
* stdio/vsprintf.c: File removed.
* stdio/vsscanf.c: File removed.
* sysdeps/generic/defs.c: File removed.
* sysdeps/generic/fdopen.c: File removed.
* sysdeps/generic/pipestream.c: File removed.
* sysdeps/generic/stdio_init.c: File removed.
* sysdeps/generic/sysd-stdio.c: File removed.
* sysdeps/generic/vdprintf.c: File removed.
* sysdeps/mach/hurd/defs.c: File removed.
* sysdeps/mach/hurd/fdopen.c: File removed.
* sysdeps/mach/hurd/pipestream.c: File removed.
* sysdeps/mach/hurd/stdio_init.c: File removed.
* sysdeps/mach/hurd/sysd-stdio.c: File removed.
* sysdeps/mach/hurd/vdprintf.c: File removed.
* sysdeps/posix/defs.c: File removed.
* sysdeps/posix/fdopen.c: File removed.
* sysdeps/posix/pipestream.c: File removed.
* sysdeps/posix/stdio_init.c: File removed.
* sysdeps/posix/vdprintf.c: File removed.
* sysdeps/unix/pipestream.c: File removed.
* sysdeps/unix/sysv/sysd-stdio.c: File removed.
* sysdeps/unix/sysv/sco3.2.4/pipestream.c: File removed.
* sysdeps/unix/sysv/sysv4/pipestream.c: File removed.
diff --git a/sysdeps/unix/sysv/sco3.2.4/pipestream.c b/sysdeps/unix/sysv/sco3.2.4/pipestream.c
deleted file mode 100644
index b768e62..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/pipestream.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* SCO 3.2v4 does have `waitpid'.
- Avoid unix/pipestream.c, which says we don't. */
-#include <sysdeps/posix/pipestream.c>
diff --git a/sysdeps/unix/sysv/sysv4/pipestream.c b/sysdeps/unix/sysv/sysv4/pipestream.c
deleted file mode 100644
index 6a32f95..0000000
--- a/sysdeps/unix/sysv/sysv4/pipestream.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We deliberately avoid having NO_WAITPID set. */
-#include <sysdeps/posix/pipestream.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21b4728e4f7408be7a6c0e4072dec8a8d1cc6309
commit 21b4728e4f7408be7a6c0e4072dec8a8d1cc6309
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 24 18:17:02 2002 +0000
2002-04-24 Roland McGrath <roland@frob.com>
* sysdeps/alpha/dl-machine.h (ELF_MACHINE_USER_ADDRESS_MASK): New
macro; we need this for Hurd.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index f6d3373..2b15e33 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -29,6 +29,10 @@
#include <string.h>
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x120000000UL
+
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
elf_machine_matches_host (const Elf64_Ehdr *ehdr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=486a12c2265e22022dd02351d6b362db6a9b3fb3
commit 486a12c2265e22022dd02351d6b362db6a9b3fb3
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 24 18:16:59 2002 +0000
2002-04-24 Roland McGrath <roland@frob.com>
* sysdeps/mach/alpha/syscall.S: Don't use .frame, ENTRY will have it;
use END macro instead of our own .end directive.
Use `callsys' insn mnemonic instead of `call_pal'.
diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S
index 8cb85bf..15fc5b7 100644
--- a/sysdeps/mach/alpha/syscall.S
+++ b/sysdeps/mach/alpha/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,10 +17,8 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <mach/machine/alpha_instruction.h>
ENTRY (syscall)
- .frame sp,0,ra
mov a0, v0 /* Load system call number from first arg. */
mov a1, a0
mov a2, a1
@@ -34,6 +32,6 @@ ENTRY (syscall)
ldq t2,24(sp)
ldq t3,32(sp)
ldq t4,40(sp)
- call_pal op_chmk
- RET
- .end syscall
+ callsys
+ ret
+END (syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ee700db50930fd1189407488eb127cb6fdc65fa
commit 2ee700db50930fd1189407488eb127cb6fdc65fa
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 24 18:16:54 2002 +0000
2002-04-24 Roland McGrath <roland@frob.com>
* sysdeps/mach/alpha/sysdep.h (ENTRY): New macro.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index ddd98d6..84e21c8 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -43,6 +43,15 @@
#define ALIGN 3
#include <sysdeps/mach/sysdep.h>
+/* Alpha needs the .ent and .frame magic that the generic version lacks. */
+#undef ENTRY
+#define ENTRY(name) \
+ .globl name; \
+ .align 3; \
+ .ent name, 0; \
+ name##: \
+ .frame sp, 0, ra
+
#include <mach/alpha/asm.h>
#undef at
#define at 28
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=337ca8062e5bed786b42772fdb17bfa4ffd733d6
commit 337ca8062e5bed786b42772fdb17bfa4ffd733d6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 19 07:56:42 2002 +0000
Add __connect_internal.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 651398c..eb64186 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,7 +36,7 @@ sys_mknod xmknod mknod 3 __syscall_mknod
# proper socket implementations:
accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __libc_connect __connect connect
+connect - connect 3 __libc_connect __connect_internal __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index ed9f1a3..2c7a639 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -16,7 +16,7 @@ semctl - semctl i:iiii __semctl semctl
# proper socket implementations:
accept - accept i:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
-connect - connect i:ipi __libc_connect __connect connect
+connect - connect i:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 25e31d1..f7d2e29 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -16,7 +16,7 @@ s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
#
accept - accept i:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
-connect - connect i:ipi __libc_connect __connect connect
+connect - connect i:ipi __libc_connect __connect_internal __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d337e61ff171cbc91a88ddc3ba6a360ffb66e37
commit 9d337e61ff171cbc91a88ddc3ba6a360ffb66e37
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 15 05:30:10 2002 +0000
Use INTDEF for __write.
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index 727ec82..5a1ac10 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -21,6 +21,8 @@
#include "kernel_proto.h"
+#undef __libc_write
+#undef __write
ssize_t
__write (fd, ptr, n)
@@ -30,6 +32,7 @@ __write (fd, ptr, n)
{
return kwrite (fd, ptr, n);
}
+INTDEF(__write)
/* AIX has no weak aliases (yet) but let's hope for better times. */
weak_alias (__write, write)
strong_alias (__write, __libc_write)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=548fe33d15ff56d40e72f8183176b14222199d8d
commit 548fe33d15ff56d40e72f8183176b14222199d8d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 15 05:28:30 2002 +0000
Use INTDEF for __lxstat64.
diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c
index d6376bd..d68b458 100644
--- a/sysdeps/unix/sysv/aix/lxstat64.c
+++ b/sysdeps/unix/sysv/aix/lxstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,8 @@
#define STX_LINK 0x01
#define STX_64 0x08
+#undef __lxstat64
+
extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
int
@@ -30,3 +32,5 @@ __lxstat64 (int ver, const char *pathname, struct stat64 *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_LINK | STX_64);
}
+
+INTDEF(__lxstat64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2093a68877d5492a0b651ef50060fb5845ca4f41
commit 2093a68877d5492a0b651ef50060fb5845ca4f41
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 15 05:27:20 2002 +0000
Use INTDEF for __lxstat.
diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c
index bd6f653..52562bd 100644
--- a/sysdeps/unix/sysv/aix/lxstat.c
+++ b/sysdeps/unix/sysv/aix/lxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@
#define STX_LINK 0x01
+#undef __lxstat
+
extern int statx (const char *pathname, struct stat *st, int len, int cmd);
int
@@ -29,3 +31,5 @@ __lxstat (int ver, const char *pathname, struct stat *st)
assert (ver == 0);
return statx (pathname, st, sizeof (*st), STX_LINK);
}
+
+INTDEF(__lxstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e36d9d57ee268a304016fed53ca1432c328ba9b
commit 0e36d9d57ee268a304016fed53ca1432c328ba9b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 20:12:24 2002 +0000
Use INTDEF for __open.
diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c
index 4116c4e..c41c708 100644
--- a/sysdeps/unix/sysv/aix/open.c
+++ b/sysdeps/unix/sysv/aix/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@
#include <stdarg.h>
#include <unistd.h>
+#undef __libc_open
+#undef __open
+
int
__open (const char *file, int oflag, ...)
{
@@ -36,3 +39,4 @@ __open (const char *file, int oflag, ...)
return open (file, oflag, mode);
}
strong_alias (__open, __libc_open)
+INTDEF(__open)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0a1614c810e7aee52bacd5f99733d49680ff21d
commit d0a1614c810e7aee52bacd5f99733d49680ff21d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 18:34:22 2002 +0000
Undefine __libc_fcntl as well.
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
index 43f21b6..f9bb42a 100644
--- a/sysdeps/unix/sysv/aix/fcntl.c
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -19,6 +19,7 @@
#include <fcntl.h>
#include <stdarg.h>
+#undef __libc_fcntl
#undef __fcntl
extern int kfcntl (int fdes, int cmd, unsigned long int arg);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=801777ebaf5abd1481913c7e153e46bea2fbcf5c
commit 801777ebaf5abd1481913c7e153e46bea2fbcf5c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 17:54:50 2002 +0000
Also define _internal alias.
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index e654e88..98a7c62 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,5 +34,6 @@ __CONCATX(__,FUNC) (x)
return __m81_u(__CONCATX(__,FUNC))(x);
}
+INTDEF(__CONCATX(__,FUNC))
#define weak_aliasx(a,b) weak_alias(a,b)
weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c
index 40e0b79..89880bc 100644
--- a/sysdeps/m68k/s_isinfl.c
+++ b/sysdeps/m68k/s_isinfl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,4 +42,5 @@ __isinfl (long double value)
return 0;
}
+INTDEF(__isinfl)
weak_alias (__isinfl, isinfl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=016f45be9bb8544dfb622a4f08ab8398d697492e
commit 016f45be9bb8544dfb622a4f08ab8398d697492e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 09:12:57 2002 +0000
Define __gettimeofday alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 22f3bb7..60d642a 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -109,3 +109,4 @@ default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1)
#else
weak_alias (__gettimeofday, gettimeofday)
#endif
+strong_alias(GETTIMEOFDAY, __gettimeofday_internal)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c7b01bd937caa3507a281d3debd6bdf2f5c502c
commit 4c7b01bd937caa3507a281d3debd6bdf2f5c502c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 09:11:55 2002 +0000
Use INTEDEF for __gettimeofday.
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index 031a84e..a0105ae 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,6 +26,8 @@
# define __tzname tzname
#endif
+#undef __gettimeofday
+
extern int rtc_upper (void);
extern int rtc_lower (void);
@@ -92,4 +94,5 @@ __gettimeofday (tv, tz)
return 0;
}
+INTDEF(__gettimeofday)
weak_alias (__gettimeofday, gettimeofday)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fe32a10cec103c4fab57bd5d561d9367fd92f81
commit 5fe32a10cec103c4fab57bd5d561d9367fd92f81
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 08:42:53 2002 +0000
Use INTDEF for __getpgid.
diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c
index 297fccc..889e3e1 100644
--- a/sysdeps/unix/sysv/aix/getpgid.c
+++ b/sysdeps/unix/sysv/aix/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,8 @@
#include <unistd.h>
+#undef __getpgid
+
extern int kgetpgidx (pid_t pid);
int
@@ -25,4 +27,5 @@ __getgpid (pid_t pid)
{
return kgetpgidx (pid);
}
+INTDEF(__getgpid)
strong_alias (__getpgid, getpgid)
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
index 4ee0e74..9313434 100644
--- a/sysdeps/unix/sysv/sysv4/__getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,6 +21,8 @@
#include <unistd.h>
#include <sys/types.h>
+#undef __getpgid
+
extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
@@ -30,3 +32,4 @@ __getpgid (pid)
{
return __pgrpsys (4, pid);
}
+INTDEF(__getpgid)
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index 0d4e4ca..5ec9e2c 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@
#include <unistd.h>
#include <sys/types.h>
+#undef __getpgid
+
extern pid_t __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
@@ -29,4 +31,5 @@ __getpgid (pid)
return __pgrpsys (4, pid);
}
+INTDEF(__getpgid)
weak_alias (__getpgid, getpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a02fe38fa821cfd8f41d949d18ad7dea9e420a0e
commit a02fe38fa821cfd8f41d949d18ad7dea9e420a0e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 08:41:04 2002 +0000
Use INTDEF for __getpagesize.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index ce1048b..026a894 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -25,6 +25,8 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#undef __getpagesize
+
/* Return the system page size. */
int
__getpagesize ()
@@ -46,4 +48,5 @@ __getpagesize ()
return 4096;
}
+INTDEF(__getpagesize)
weak_alias (__getpagesize, getpagesize)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9155b112e9e39428d6ca61cd879082022231a207
commit 9155b112e9e39428d6ca61cd879082022231a207
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 08:38:17 2002 +0000
Use INTDEF for __fxstat64.
diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c
index 39f8cd9..509fb2c 100644
--- a/sysdeps/unix/sysv/aix/fxstat64.c
+++ b/sysdeps/unix/sysv/aix/fxstat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,11 +22,16 @@
#define STX_NORMAL 0x00
#define STX_64 0x08
+#undef __fxstat64
+
extern int fstatx (int fd, struct stat64 *st, int len, int cmd);
+#undef __fxstat64
+
int
__fxstat64 (int ver, int fd, struct stat64 *st)
{
assert (ver == 0);
return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64);
}
+INTDEF(__fxstat64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=144484daa4b5f6c61935cc507349f914c7fd1fb4
commit 144484daa4b5f6c61935cc507349f914c7fd1fb4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 14 08:37:17 2002 +0000
Use INTDEF for __fxstat.
diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c
index e1f546d..4c1e145 100644
--- a/sysdeps/unix/sysv/aix/fxstat.c
+++ b/sysdeps/unix/sysv/aix/fxstat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,12 @@
extern int fstatx (int fd, struct stat *st, int len, int cmd);
+#undef __fxstat
+
int
__fxstat (int ver, int fd, struct stat *st)
{
assert (ver == 0);
return fstatx (fd, st, sizeof (*st), STX_NORMAL);
}
+INTDEF(__fxstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e60f3fa19841189c9164a764a7e8448f14664272
commit e60f3fa19841189c9164a764a7e8448f14664272
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Apr 13 15:41:53 2002 +0000
* sysdeps/m68k/fpu/s_finite.c: Add internal alias.
* sysdeps/m68k/fpu/s_finitef.c: Likewise.
* sysdeps/m68k/fpu/s_finitel.c: Likewise.
diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c
index dafbd59..c9e5718 100644
--- a/sysdeps/m68k/fpu/s_finite.c
+++ b/sysdeps/m68k/fpu/s_finite.c
@@ -1,2 +1,3 @@
#define FUNC finite
#include <s_isinf.c>
+INTDEF(__finite)
diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c
index b81342e..921b2f2 100644
--- a/sysdeps/m68k/fpu/s_finitef.c
+++ b/sysdeps/m68k/fpu/s_finitef.c
@@ -1,2 +1,3 @@
#define FUNC finitef
#include <s_isinff.c>
+INTDEF(__finitef)
diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c
index bd346a2..10a18a1 100644
--- a/sysdeps/m68k/fpu/s_finitel.c
+++ b/sysdeps/m68k/fpu/s_finitel.c
@@ -1,2 +1,3 @@
#define FUNC finitel
#include <s_isinfl.c>
+INTDEF(__finitel)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=404d6b4b4687ef0d1d975ef458e1a5e8b3cbf9e0
commit 404d6b4b4687ef0d1d975ef458e1a5e8b3cbf9e0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 13 07:53:04 2002 +0000
Adjust all callers of _dl_lookup_symbol and _dl_lookup_versioned_symbol.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index fcf37f6..bc5e84f 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -307,7 +307,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
} \
case 0: \
value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
- l->l_scope, ELF_RTYPE_CLASS_PLT, 0); \
+ l->l_scope, ELF_RTYPE_CLASS_PLT, \
+ DL_LOOKUP_ADD_DEPENDENCY); \
} \
\
/* Currently value contains the base load address of the object \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ab5bc8a522cad90d705b0b8de73dd1f133d1b21
commit 3ab5bc8a522cad90d705b0b8de73dd1f133d1b21
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 11 20:38:52 2002 +0000
LOC): Don't paste in a token.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index d9badf7..9a0db6a 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1994,1995,1997,1998,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -51,6 +51,6 @@
#define r1 %o1
#define MOVE(x,y) mov x, y
-#define LOC(name) .##L##name
+#define LOC(name) .L##name
#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4bf0032b0526769893e6c33a7b4063f28ce9dbb
commit e4bf0032b0526769893e6c33a7b4063f28ce9dbb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 9 20:26:17 2002 +0000
Use INTUSE for __chown calls.
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index 50e11c1..f8f4b5c 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,4 +71,5 @@ __chown (const char *file, uid_t owner, gid_t group)
return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
#endif
}
+INTDEF(__chown)
weak_alias (__chown, chown)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6a57cb89405cc626f2bfe7252ff367ed16cb17e
commit d6a57cb89405cc626f2bfe7252ff367ed16cb17e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 9 20:22:09 2002 +0000
Use INTDEF for __fork.
diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c
index f31f342..085342b 100644
--- a/sysdeps/unix/sysv/aix/fork.c
+++ b/sysdeps/unix/sysv/aix/fork.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,10 +18,12 @@
#include <unistd.h>
+#undef __fork
pid_t
__fork (void)
{
return kfork ();
}
+INTDEF(__fork)
strong_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1555f102ef6f0a8f080190585c842ba0eba58d63
commit 1555f102ef6f0a8f080190585c842ba0eba58d63
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 9 20:21:24 2002 +0000
Use INTDEF for __connect.
diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c
index 7fb636d..2f58be1 100644
--- a/sysdeps/unix/sysv/aix/connect.c
+++ b/sysdeps/unix/sysv/aix/connect.c
@@ -1,8 +1,11 @@
/* This is a system call. We only have to provide the wrapper. */
#include <sys/socket.h>
+#undef __connect
+
int
__connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
{
return connect (fd, addr, len);
}
+INTDEF(__connect)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db601cfcce3187c04674f6a0574a3bc916714a91
commit db601cfcce3187c04674f6a0574a3bc916714a91
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 9 20:20:23 2002 +0000
Use INTDEF for __chown.
diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c
index 568c26a..037b14b 100644
--- a/sysdeps/unix/sysv/aix/chown.c
+++ b/sysdeps/unix/sysv/aix/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,11 @@
#include <unistd.h>
+#undef __chown
+
int
__chown (const char *file, uid_t owner, gid_t group)
{
return chown (file, owner, group);
}
+INTDEF(__chown)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4b6834c4f68aaca22152fb2fb70d189c719eb20
commit a4b6834c4f68aaca22152fb2fb70d189c719eb20
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 9 19:49:11 2002 +0000
Use INTDEF for __fcntl.
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
index 8c5ba15..43f21b6 100644
--- a/sysdeps/unix/sysv/aix/fcntl.c
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@
#include <fcntl.h>
#include <stdarg.h>
+#undef __fcntl
+
extern int kfcntl (int fdes, int cmd, unsigned long int arg);
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc1e0ed4b262b79b0799420d0837a76a559022f5
commit bc1e0ed4b262b79b0799420d0837a76a559022f5
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 8 07:06:48 2002 +0000
2002-04-07 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/alpha/trampoline.c: Don't include
<mach/machine/alpha_instruction.h>.
(_hurd_setup_sighandler): Take proper arguments for current decls.
Update code to use _hurdsig_catch_fault.
Use `callsys' instruction instead of `call_pal'.
* sysdeps/mach/hurd/alpha/intr-msg.h: New file.
diff --git a/sysdeps/mach/hurd/alpha/intr-msg.h b/sysdeps/mach/hurd/alpha/intr-msg.h
new file mode 100644
index 0000000..4f17212
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/intr-msg.h
@@ -0,0 +1,100 @@
+/* Machine-dependent details of interruptible RPC messaging. Alpha version.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \
+({ \
+ error_t err; \
+ asm (".globl _hurd_intr_rpc_msg_do_trap\n" \
+ ".globl _hurd_intr_rpc_msg_in_trap\n" \
+ " mov %1, $16\n" \
+ " mov %2, $17\n" \
+ " mov %3, $18\n" \
+ " mov %4, $19\n" \
+ " mov %5, $20\n" \
+ " mov %6, $21\n" \
+ " mov %7, $1\n" \
+ " lda $0, -25\n" \
+ "_hurd_intr_rpc_msg_do_trap: callsys\n" \
+ "_hurd_intr_rpc_msg_in_trap: ret\n" \
+ : "=r" (err) \
+ : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \
+ "r" (rcv_name), "r" (timeout), "r" (notify) \
+ : "16", "17", "18", "19", "20", "21", "1", "0"); \
+ err; \
+})
+
+static void inline
+INTR_MSG_BACK_OUT (struct alpha_thread_state *state)
+{
+ return;
+}
+
+#include "hurdfault.h"
+
+/* This cannot be an inline function because it calls setjmp. */
+#define SYSCALL_EXAMINE(state, callno) \
+({ \
+ u_int32_t *p = (void *) ((state)->pc - 4); \
+ int result; \
+ _hurdsig_catch_memory_fault (p) ? 0 : \
+ ({ \
+ result = (*p == 0x00000083); \
+ _hurdsig_end_catch_fault (); \
+ if (result) \
+ /* The PC is just after a `callsys' instruction. \
+ This is a system call in progress; v0 holds the call number. */ \
+ *(callno) = (state)->r0; \
+ result; \
+ }); \
+})
+
+struct mach_msg_trap_args
+ {
+ /* This is the order of arguments to mach_msg_trap. */
+ mach_msg_header_t *msg;
+ mach_msg_option_t option;
+ mach_msg_size_t send_size;
+ mach_msg_size_t rcv_size;
+ mach_port_t rcv_name;
+ mach_msg_timeout_t timeout;
+ mach_port_t notify;
+ };
+
+/* This cannot be an inline function because it calls setjmp. */
+#define MSG_EXAMINE(state, msgid, rcv_name, send_name, option, timeout) \
+({ \
+ mach_msg_header_t *msg = (mach_msg_header_t *) (state)->r16; \
+ *(option) = (mach_msg_option_t) (state)->r17; \
+ *(rcv_name) = (mach_port_t) (state)->r18; \
+ *(timeout) = (mach_msg_timeout_t) (state)->r19; \
+ (msg == 0) ? \
+ ({ \
+ *(send_name) = MACH_PORT_NULL; \
+ *(msgid) = 0; \
+ 0; \
+ }) : \
+ (_hurdsig_catch_memory_fault (msg) ? -1 : \
+ ({ \
+ *(send_name) = msg->msgh_remote_port; \
+ *(msgid) = msg->msgh_id; \
+ _hurdsig_end_catch_fault (); \
+ 0; \
+ }) \
+ ); \
+})
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 152f935..2360cbb 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. Alpha version.
- Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,97,98,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,6 @@
#include <hurd/signal.h>
#include "thread_state.h"
-#include <mach/machine/alpha_instruction.h>
#include "hurdfault.h"
#include <assert.h>
@@ -38,9 +37,8 @@ struct mach_msg_trap_args
struct sigcontext *
_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
- int signo, long int sigcode,
- int rpc_wait,
- struct machine_thread_all_state *state)
+ int signo, struct hurd_signal_detail *detail,
+ int rpc_wait, struct machine_thread_all_state *state)
{
__label__ trampoline, rpc_wait_trampoline;
void *sigsp;
@@ -51,10 +49,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* We have a previous sigcontext that sigreturn was about
to restore when another signal arrived. We will just base
our setup on that. */
- if (_hurdsig_catch_fault (SIGSEGV))
- assert (_hurdsig_fault_sigcode >= (long int) ss->context &&
- _hurdsig_fault_sigcode < (long int) (ss->context + 1));
- else
+ if (! _hurdsig_catch_memory_fault (ss->context))
{
memcpy (&state->basic, &ss->context->sc_alpha_thread_state,
sizeof (state->basic));
@@ -79,6 +74,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
later. */
ss->intr_port = ss->context->sc_intr_port;
}
+ _hurdsig_end_catch_fault ();
+
/* If the sigreturn context was bogus, just ignore it. */
ss->context = NULL;
}
@@ -101,10 +98,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
sigsp -= sizeof (*scp);
scp = sigsp;
- if (_hurdsig_catch_fault (SIGSEGV))
+ if (_hurdsig_catch_memory_fault (scp))
{
- assert (_hurdsig_fault_sigcode >= (long int) scp &&
- _hurdsig_fault_sigcode < (long int) (scp + 1));
/* We got a fault trying to write the stack frame.
We cannot set up the signal handler.
Returning NULL tells our caller, who will nuke us with a SIGILL. */
@@ -137,6 +132,8 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
&scp->sc_alpha_float_state,
sizeof (state->fpu)))
return NULL;
+
+ _hurdsig_end_catch_fault ();
}
/* Modify the thread state to call the trampoline code on the new stack. */
@@ -176,14 +173,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
($16..$21, $1). Pass the handler args to the trampoline code in
t8..t10 ($22.$24). */
state->basic.r22 = signo;
- state->basic.r23 = sigcode;
+ state->basic.r23 = detail->code;
state->basic.r24 = (long int) scp;
}
else
{
state->basic.pc = (long int) &&trampoline;
state->basic.r16 = signo;
- state->basic.r17 = sigcode;
+ state->basic.r17 = detail->code;
state->basic.r18 = (long int) scp;
}
@@ -212,7 +209,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
asm volatile
(/* Retry the interrupted mach_msg system call. */
"lda $0, -25($31)\n" /* mach_msg_trap */
- "call_pal %0\n" /* Magic system call instruction. */
+ "callsys\n" /* Magic system call instruction. */
/* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
now the message receive has completed and the original caller of
the RPC (i.e. the code running when the signal arrived) needs to
@@ -225,8 +222,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
in registers t8..t10 ($22..$24). */
"mov $22, $16\n"
"mov $23, $17\n"
- "mov $24, $18\n"
- : : "i" (op_chmk));
+ "mov $24, $18\n");
trampoline:
/* Entry point for running the handler normally. The arguments to the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4dd357db6a802ad986a17049bcd7a6ffcfef0936
commit 4dd357db6a802ad986a17049bcd7a6ffcfef0936
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 8 07:06:46 2002 +0000
2002-04-07 Roland McGrath <roland@frob.com>
* sysdeps/mach/alpha/sysdep.h: Include <mach/alpha/asm.h>.
(ALIGN, at, AT, fp): New macros.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 9e7ace0..ddd98d6 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,8 +34,17 @@
asm volatile ("mov %0,$30; jmp $31, (%1); ldgp $29, 0(%1)" \
: : "r" (__sp), "r" (__fn)); })
-#define ENTRY(name) LEAF(name, ***loser no arg count***)
-
#define STACK_GROWTH_DOWN
+#define RETURN_TO(sp, pc, retval) \
+ asm volatile ("mov %0,$30; jmp $31, (%1); mov %2,$0" \
+ : : "r" (sp), "r" (pc), "r" ((long int) (retval)));
+
+#define ALIGN 3
#include <sysdeps/mach/sysdep.h>
+
+#include <mach/alpha/asm.h>
+#undef at
+#define at 28
+#define AT $28
+#define fp s6
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83aad43285c19b1ecd1db18385a38721ab5e6f5f
commit 83aad43285c19b1ecd1db18385a38721ab5e6f5f
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 8 02:16:12 2002 +0000
2002-04-06 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/alpha/exc2signal.c
(_hurd_exception2signal): Rewritten.
* sysdeps/mach/hurd/alpha/longjmp-ts.c
(_hurd_longjmp_thread_state): Rewritten.
diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c
index 3bceb64..5f3fbbb 100644
--- a/sysdeps/mach/hurd/alpha/exc2signal.c
+++ b/sysdeps/mach/hurd/alpha/exc2signal.c
@@ -1,5 +1,5 @@
/* Translate Mach exception codes into signal numbers. Alpha version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,52 +25,51 @@
into a signal number and signal subcode. */
void
-_hurd_exception2signal (int exception, int code, int subcode,
- int *signo, long int *sigcode, int *error)
+_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo)
{
- *error = 0;
+ detail->error = 0;
- switch (exception)
+ switch (detail->exc)
{
default:
*signo = SIGIOT;
- *sigcode = exception;
+ detail->code = detail->exc;
break;
case EXC_BAD_ACCESS:
- if (code == KERN_PROTECTION_FAILURE)
+ if (detail->exc_code == KERN_PROTECTION_FAILURE)
*signo = SIGSEGV;
else
*signo = SIGBUS;
- *sigcode = subcode;
- *error = code;
+ detail->code = detail->exc_subcode;
+ detail->error = detail->exc_code;
break;
case EXC_BAD_INSTRUCTION:
*signo = SIGILL;
- *sigcode = code;
+ detail->code = detail->exc_code;
break;
case EXC_ARITHMETIC:
*signo = SIGFPE;
- *sigcode = code;
+ detail->code = detail->exc_code;
break;
break;
case EXC_EMULATION:
/* 3.0 doesn't give this one, why, I don't know. */
*signo = SIGEMT;
- *sigcode = code;
+ detail->code = detail->exc_code;
break;
case EXC_SOFTWARE:
*signo = SIGEMT;
- *sigcode = code;
+ detail->code = detail->exc_code;
break;
case EXC_BREAKPOINT:
*signo = SIGTRAP;
- *sigcode = code;
+ detail->code = detail->exc_code;
break;
}
}
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
index eb27649..b271d6d 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ts.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -1,5 +1,5 @@
/* Perform a `longjmp' on a Mach thread_state. Alpha version.
- Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,15 +27,22 @@
void
_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
{
- struct alpha_thread_state *ts = state;
-
- ts->r9 = env[0].__jmpbuf[0].__9;
- ts->r11 = env[0].__jmpbuf[0].__11;
- ts->r12 = env[0].__jmpbuf[0].__12;
- ts->r13 = env[0].__jmpbuf[0].__13;
- ts->r14 = env[0].__jmpbuf[0].__14;
- ts->r15 = (long int) env[0].__jmpbuf[0].__fp;
- ts->r30 = (long int) env[0].__jmpbuf[0].__sp;
- ts->pc = (long int) env[0].__jmpbuf[0].__pc;
+ struct alpha_thread_state *const ts = state;
+
+ ts->r9 = env[0].__jmpbuf[JB_S0];
+ ts->r10 = env[0].__jmpbuf[JB_S1];
+ ts->r11 = env[0].__jmpbuf[JB_S2];
+ ts->r12 = env[0].__jmpbuf[JB_S3];
+ ts->r13 = env[0].__jmpbuf[JB_S4];
+ ts->r13 = env[0].__jmpbuf[JB_S5];
+ ts->pc = env[0].__jmpbuf[JB_PC];
+ ts->r15 = env[0].__jmpbuf[JB_FP];
+ ts->r30 = env[0].__jmpbuf[JB_SP];
ts->r0 = val ?: 1;
+
+ /* XXX
+ To mimic longjmp we ought to restore some fp registers too.
+ But those registers are in struct alpha_float_state.
+ The only use of this is in fork, and it probably won't matter.
+ */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=216190a955975901bc2a64f65334bfe1eef6c408
commit 216190a955975901bc2a64f65334bfe1eef6c408
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 8 02:16:04 2002 +0000
2002-04-06 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/alpha/sigreturn.c: Pass missing argument to
__msg_sig_post RPC.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index e520b35..182d4cb 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -1,5 +1,5 @@
/* Return from signal handler in GNU C library for Hurd. Alpha version.
- Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,97,98,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,6 @@
#include <hurd/msg.h>
#include <stdlib.h>
#include <string.h>
-#include <mach/machine/alpha_instruction.h>
int
__sigreturn (struct sigcontext *scp)
@@ -58,7 +57,7 @@ __sigreturn (struct sigcontext *scp)
thread will examine us while we are blocked in the sig_post RPC. */
ss->intr_port = MACH_PORT_NULL;
__spin_unlock (&ss->lock);
- __msg_sig_post (_hurd_msgport, 0, __mach_task_self ());
+ __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
/* If a pending signal was handled, sig_post never returned. */
__spin_lock (&ss->lock);
}
@@ -200,9 +199,9 @@ __sigreturn (struct sigcontext *scp)
the user stack and do the magical `rei' PAL call. */
asm volatile ("mov %0, $30\n"
"call_pal %1"
- : : "r" (rei_frame), "i" (op_rei));
+ : : "r" (rei_frame), "i" (63)); /* PAL_rti */
/* Firewall. */
- asm volatile ("call_pal %0" : : "i" (op_halt));
+ asm volatile ("halt");
}
/* NOTREACHED */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37296da75ed10e0c9b5fece07e62aa3d7f47b4ec
commit 37296da75ed10e0c9b5fece07e62aa3d7f47b4ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 6 04:05:14 2002 +0000
Protect against multiple inclusion.
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index cab724a..11127ea 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -19,6 +19,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _PT_MACHINE_H
+#define _PT_MACHINE_H 1
#ifndef PT_EI
# define PT_EI extern inline
@@ -49,3 +51,5 @@ testandset (int *spinlock)
of the stack, just something somewhere in the current frame. */
#define CURRENT_STACK_FRAME stack_pointer
register char * stack_pointer __asm__ ("sp");
+
+#endif /* pt-machine.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=521d1bc7f4e98beee498a839d8d72875fcd394d5
commit 521d1bc7f4e98beee498a839d8d72875fcd394d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 6 01:34:06 2002 +0000
brk implementation for dynamic linker.
diff --git a/sysdeps/unix/arm/dl-brk.S b/sysdeps/unix/arm/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/arm/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/bsd/hp/m68k/dl-brk.S b/sysdeps/unix/bsd/hp/m68k/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/bsd/osf/alpha/dl-brk.S b/sysdeps/unix/bsd/osf/alpha/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/bsd/sun/m68k/dl-brk.S b/sysdeps/unix/bsd/sun/m68k/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/bsd/vax/dl-brk.S b/sysdeps/unix/bsd/vax/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/mips/dl-brk.S b/sysdeps/unix/mips/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/mips/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
diff --git a/sysdeps/unix/sysv/linux/alpha/dl-brk.S b/sysdeps/unix/sysv/linux/alpha/dl-brk.S
new file mode 100644
index 0000000..eeb9654
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/dl-brk.S
@@ -0,0 +1 @@
+#include <brk.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b0a7e122e9100432c4bd1cd46543e46c4ea6fc0
commit 2b0a7e122e9100432c4bd1cd46543e46c4ea6fc0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 6 00:33:22 2002 +0000
(ELF_MACHINE_REL_RELATIVE): Define.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 490f1f1..f6d3373 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -577,6 +577,10 @@ elf_machine_rela (struct link_map *map,
}
}
+/* Let do-rel.h know that on Alpha if l_addr is 0, all RELATIVE relocs
+ can be skipped. */
+#define ELF_MACHINE_REL_RELATIVE 1
+
static inline void
elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
Elf64_Addr *const reloc_addr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9db53b0f7f1e8342ed5451b80a51f95b3c0c150a
commit 9db53b0f7f1e8342ed5451b80a51f95b3c0c150a
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 4 08:57:22 2002 +0000
Remove files since arch is not supported anymore.
diff --git a/sysdeps/mips/mips3/Implies b/sysdeps/mips/mips3/Implies
deleted file mode 100644
index 39a34c5..0000000
--- a/sysdeps/mips/mips3/Implies
+++ /dev/null
@@ -1 +0,0 @@
-wordsize-32
diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s
deleted file mode 100644
index 7a25341..0000000
--- a/sysdeps/mips/mips3/add_n.s
+++ /dev/null
@@ -1,120 +0,0 @@
- # MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
- # store sum in a third limb vector.
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # s2_ptr $6
- # size $7
-
- .text
- .align 2
- .globl __mpn_add_n
- .ent __mpn_add_n
-__mpn_add_n:
- .set noreorder
- .set nomacro
-
- ld $10,0($5)
- ld $11,0($6)
-
- daddiu $7,$7,-1
- and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
-
- dsubu $7,$7,$9
-
-.Loop0: daddiu $9,$9,-1
- ld $12,8($5)
- daddu $11,$11,$2
- ld $13,8($6)
- sltu $8,$11,$2
- daddu $11,$10,$11
- sltu $2,$11,$10
- sd $11,0($4)
- or $2,$2,$8
-
- daddiu $5,$5,8
- daddiu $6,$6,8
- move $10,$12
- move $11,$13
- bne $9,$0,.Loop0
- daddiu $4,$4,8
-
-.L0: beq $7,$0,.Lend
- nop
-
-.Loop: daddiu $7,$7,-4
-
- ld $12,8($5)
- daddu $11,$11,$2
- ld $13,8($6)
- sltu $8,$11,$2
- daddu $11,$10,$11
- sltu $2,$11,$10
- sd $11,0($4)
- or $2,$2,$8
-
- ld $10,16($5)
- daddu $13,$13,$2
- ld $11,16($6)
- sltu $8,$13,$2
- daddu $13,$12,$13
- sltu $2,$13,$12
- sd $13,8($4)
- or $2,$2,$8
-
- ld $12,24($5)
- daddu $11,$11,$2
- ld $13,24($6)
- sltu $8,$11,$2
- daddu $11,$10,$11
- sltu $2,$11,$10
- sd $11,16($4)
- or $2,$2,$8
-
- ld $10,32($5)
- daddu $13,$13,$2
- ld $11,32($6)
- sltu $8,$13,$2
- daddu $13,$12,$13
- sltu $2,$13,$12
- sd $13,24($4)
- or $2,$2,$8
-
- daddiu $5,$5,32
- daddiu $6,$6,32
-
- bne $7,$0,.Loop
- daddiu $4,$4,32
-
-.Lend: daddu $11,$11,$2
- sltu $8,$11,$2
- daddu $11,$10,$11
- sltu $2,$11,$10
- sd $11,0($4)
- j $31
- or $2,$2,$8
-
- .end __mpn_add_n
diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s
deleted file mode 100644
index 9a87c3f..0000000
--- a/sysdeps/mips/mips3/addmul_1.s
+++ /dev/null
@@ -1,97 +0,0 @@
- # MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
- # add the product to a second limb vector.
-
- # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_addmul_1
- .ent __mpn_addmul_1
-__mpn_addmul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- ld $8,0($5)
-
- # warm up phase 1
- daddiu $5,$5,8
- dmultu $8,$7
-
- daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- daddiu $6,$6,-1
- beq $6,$0,$LC1
- ld $8,0($5) # load new s1 limb as early as possible
-
-Loop: ld $10,0($4)
- mflo $3
- mfhi $9
- daddiu $5,$5,8
- daddu $3,$3,$2 # add old carry limb to low product limb
- dmultu $8,$7
- ld $8,0($5) # load new s1 limb as early as possible
- daddiu $6,$6,-1 # decrement loop counter
- sltu $2,$3,$2 # carry from previous addition -> $2
- daddu $3,$10,$3
- sltu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: ld $10,0($4)
- mflo $3
- mfhi $9
- daddu $3,$3,$2
- sltu $2,$3,$2
- dmultu $8,$7
- daddu $3,$10,$3
- sltu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- daddiu $4,$4,8
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: ld $10,0($4)
- mflo $3
- mfhi $9
- daddu $3,$3,$2
- sltu $2,$3,$2
- daddu $3,$10,$3
- sltu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- j $31
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_addmul_1
diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h
deleted file mode 100644
index 0d36735..0000000
--- a/sysdeps/mips/mips3/gmp-mparam.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* gmp-mparam.h -- Compiler/machine parameter header file.
-
-Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Lesser General Public License as published by
-the Free Software Foundation; either version 2.1 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
-License for more details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
-
-#define BITS_PER_MP_LIMB 64
-#define BYTES_PER_MP_LIMB 8
-#define BITS_PER_LONGINT 32
-#define BITS_PER_INT 32
-#define BITS_PER_SHORTINT 16
-#define BITS_PER_CHAR 8
diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s
deleted file mode 100644
index 2c39a1c..0000000
--- a/sysdeps/mips/mips3/lshift.s
+++ /dev/null
@@ -1,95 +0,0 @@
- # MIPS3 __mpn_lshift --
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # src_ptr $5
- # size $6
- # cnt $7
-
- .text
- .align 2
- .globl __mpn_lshift
- .ent __mpn_lshift
-__mpn_lshift:
- .set noreorder
- .set nomacro
-
- dsll $2,$6,3
- daddu $5,$5,$2 # make r5 point at end of src
- ld $10,-8($5) # load first limb
- dsubu $13,$0,$7
- daddu $4,$4,$2 # make r4 point at end of res
- daddiu $6,$6,-1
- and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- dsrl $2,$10,$13 # compute function result
-
- dsubu $6,$6,$9
-
-.Loop0: ld $3,-16($5)
- daddiu $4,$4,-8
- daddiu $5,$5,-8
- daddiu $9,$9,-1
- dsll $11,$10,$7
- dsrl $12,$3,$13
- move $10,$3
- or $8,$11,$12
- bne $9,$0,.Loop0
- sd $8,0($4)
-
-.L0: beq $6,$0,.Lend
- nop
-
-.Loop: ld $3,-16($5)
- daddiu $4,$4,-32
- daddiu $6,$6,-4
- dsll $11,$10,$7
- dsrl $12,$3,$13
-
- ld $10,-24($5)
- dsll $14,$3,$7
- or $8,$11,$12
- sd $8,24($4)
- dsrl $9,$10,$13
-
- ld $3,-32($5)
- dsll $11,$10,$7
- or $8,$14,$9
- sd $8,16($4)
- dsrl $12,$3,$13
-
- ld $10,-40($5)
- dsll $14,$3,$7
- or $8,$11,$12
- sd $8,8($4)
- dsrl $9,$10,$13
-
- daddiu $5,$5,-32
- or $8,$14,$9
- bgtz $6,.Loop
- sd $8,0($4)
-
-.Lend: dsll $8,$10,$7
- j $31
- sd $8,-8($4)
- .end __mpn_lshift
diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s
deleted file mode 100644
index d65e65c..0000000
--- a/sysdeps/mips/mips3/mul_1.s
+++ /dev/null
@@ -1,85 +0,0 @@
- # MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
- # store the product in a second limb vector.
-
- # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_mul_1
- .ent __mpn_mul_1
-__mpn_mul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- ld $8,0($5)
-
- # warm up phase 1
- daddiu $5,$5,8
- dmultu $8,$7
-
- daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- daddiu $6,$6,-1
- beq $6,$0,$LC1
- ld $8,0($5) # load new s1 limb as early as possible
-
-Loop: mflo $10
- mfhi $9
- daddiu $5,$5,8
- daddu $10,$10,$2 # add old carry limb to low product limb
- dmultu $8,$7
- ld $8,0($5) # load new s1 limb as early as possible
- daddiu $6,$6,-1 # decrement loop counter
- sltu $2,$10,$2 # carry from previous addition -> $2
- sd $10,0($4)
- daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: mflo $10
- mfhi $9
- daddu $10,$10,$2
- sltu $2,$10,$2
- dmultu $8,$7
- sd $10,0($4)
- daddiu $4,$4,8
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: mflo $10
- mfhi $9
- daddu $10,$10,$2
- sltu $2,$10,$2
- sd $10,0($4)
- j $31
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_mul_1
diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s
deleted file mode 100644
index fc4790a..0000000
--- a/sysdeps/mips/mips3/rshift.s
+++ /dev/null
@@ -1,92 +0,0 @@
- # MIPS3 __mpn_rshift --
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # src_ptr $5
- # size $6
- # cnt $7
-
- .text
- .align 2
- .globl __mpn_rshift
- .ent __mpn_rshift
-__mpn_rshift:
- .set noreorder
- .set nomacro
-
- ld $10,0($5) # load first limb
- dsubu $13,$0,$7
- daddiu $6,$6,-1
- and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- dsll $2,$10,$13 # compute function result
-
- dsubu $6,$6,$9
-
-.Loop0: ld $3,8($5)
- daddiu $4,$4,8
- daddiu $5,$5,8
- daddiu $9,$9,-1
- dsrl $11,$10,$7
- dsll $12,$3,$13
- move $10,$3
- or $8,$11,$12
- bne $9,$0,.Loop0
- sd $8,-8($4)
-
-.L0: beq $6,$0,.Lend
- nop
-
-.Loop: ld $3,8($5)
- daddiu $4,$4,32
- daddiu $6,$6,-4
- dsrl $11,$10,$7
- dsll $12,$3,$13
-
- ld $10,16($5)
- dsrl $14,$3,$7
- or $8,$11,$12
- sd $8,-32($4)
- dsll $9,$10,$13
-
- ld $3,24($5)
- dsrl $11,$10,$7
- or $8,$14,$9
- sd $8,-24($4)
- dsll $12,$3,$13
-
- ld $10,32($5)
- dsrl $14,$3,$7
- or $8,$11,$12
- sd $8,-16($4)
- dsll $9,$10,$13
-
- daddiu $5,$5,32
- or $8,$14,$9
- bgtz $6,.Loop
- sd $8,-8($4)
-
-.Lend: dsrl $8,$10,$7
- j $31
- sd $8,0($4)
- .end __mpn_rshift
diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s
deleted file mode 100644
index 0ea9413..0000000
--- a/sysdeps/mips/mips3/sub_n.s
+++ /dev/null
@@ -1,120 +0,0 @@
- # MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
- # store difference in a third limb vector.
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # s2_ptr $6
- # size $7
-
- .text
- .align 2
- .globl __mpn_sub_n
- .ent __mpn_sub_n
-__mpn_sub_n:
- .set noreorder
- .set nomacro
-
- ld $10,0($5)
- ld $11,0($6)
-
- daddiu $7,$7,-1
- and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
-
- dsubu $7,$7,$9
-
-.Loop0: daddiu $9,$9,-1
- ld $12,8($5)
- daddu $11,$11,$2
- ld $13,8($6)
- sltu $8,$11,$2
- dsubu $11,$10,$11
- sltu $2,$10,$11
- sd $11,0($4)
- or $2,$2,$8
-
- daddiu $5,$5,8
- daddiu $6,$6,8
- move $10,$12
- move $11,$13
- bne $9,$0,.Loop0
- daddiu $4,$4,8
-
-.L0: beq $7,$0,.Lend
- nop
-
-.Loop: daddiu $7,$7,-4
-
- ld $12,8($5)
- daddu $11,$11,$2
- ld $13,8($6)
- sltu $8,$11,$2
- dsubu $11,$10,$11
- sltu $2,$10,$11
- sd $11,0($4)
- or $2,$2,$8
-
- ld $10,16($5)
- daddu $13,$13,$2
- ld $11,16($6)
- sltu $8,$13,$2
- dsubu $13,$12,$13
- sltu $2,$12,$13
- sd $13,8($4)
- or $2,$2,$8
-
- ld $12,24($5)
- daddu $11,$11,$2
- ld $13,24($6)
- sltu $8,$11,$2
- dsubu $11,$10,$11
- sltu $2,$10,$11
- sd $11,16($4)
- or $2,$2,$8
-
- ld $10,32($5)
- daddu $13,$13,$2
- ld $11,32($6)
- sltu $8,$13,$2
- dsubu $13,$12,$13
- sltu $2,$12,$13
- sd $13,24($4)
- or $2,$2,$8
-
- daddiu $5,$5,32
- daddiu $6,$6,32
-
- bne $7,$0,.Loop
- daddiu $4,$4,32
-
-.Lend: daddu $11,$11,$2
- sltu $8,$11,$2
- dsubu $11,$10,$11
- sltu $2,$10,$11
- sd $11,0($4)
- j $31
- or $2,$2,$8
-
- .end __mpn_sub_n
diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s
deleted file mode 100644
index 60153da..0000000
--- a/sysdeps/mips/mips3/submul_1.s
+++ /dev/null
@@ -1,97 +0,0 @@
- # MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
- # subtract the product from a second limb vector.
-
- # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- # License for more details.
-
- # You should have received a copy of the GNU Lesser General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_submul_1
- .ent __mpn_submul_1
-__mpn_submul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- ld $8,0($5)
-
- # warm up phase 1
- daddiu $5,$5,8
- dmultu $8,$7
-
- daddiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- daddiu $6,$6,-1
- beq $6,$0,$LC1
- ld $8,0($5) # load new s1 limb as early as possible
-
-Loop: ld $10,0($4)
- mflo $3
- mfhi $9
- daddiu $5,$5,8
- daddu $3,$3,$2 # add old carry limb to low product limb
- dmultu $8,$7
- ld $8,0($5) # load new s1 limb as early as possible
- daddiu $6,$6,-1 # decrement loop counter
- sltu $2,$3,$2 # carry from previous addition -> $2
- dsubu $3,$10,$3
- sgtu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- daddiu $4,$4,8
- bne $6,$0,Loop
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: ld $10,0($4)
- mflo $3
- mfhi $9
- daddu $3,$3,$2
- sltu $2,$3,$2
- dmultu $8,$7
- dsubu $3,$10,$3
- sgtu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- daddiu $4,$4,8
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: ld $10,0($4)
- mflo $3
- mfhi $9
- daddu $3,$3,$2
- sltu $2,$3,$2
- dsubu $3,$10,$3
- sgtu $10,$3,$10
- daddu $2,$2,$10
- sd $3,0($4)
- j $31
- daddu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_submul_1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4007d1f0ad6380f934f6a07aabbc718ab63ff32
commit a4007d1f0ad6380f934f6a07aabbc718ab63ff32
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 4 08:53:30 2002 +0000
Remove, the archs are not supported anymore.
diff --git a/sysdeps/mips/dec/bits/endian.h b/sysdeps/mips/dec/bits/endian.h
deleted file mode 100644
index 0bdb378..0000000
--- a/sysdeps/mips/dec/bits/endian.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- The DECstation uses little-endian mode. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h
deleted file mode 100644
index f6cdde2..0000000
--- a/sysdeps/mips/p40/bits/endian.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* The MIPS has selectable endianness.
- The Japanese homebrew P40 architecture uses big-endian mode. */
-
-#ifndef _ENDIAN_H
-# error "Never use <bits/endian.h> directly; include <endian.h> instead."
-#endif
-
-#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef8af250ffeaf49b025dd34650ff0357ef840124
commit ef8af250ffeaf49b025dd34650ff0357ef840124
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 3 06:55:14 2002 +0000
(_DL_HWCAP_COUNT): Define as 8.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 7e7e66e..0ced274 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -23,7 +23,7 @@
#include <ldsodefs.h>
-#define _DL_HWCAP_COUNT 32
+#define _DL_HWCAP_COUNT 8
/* The kernel provides platform data but it is not interesting. */
#define _DL_HWCAP_PLATFORM 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a168f2b421743741f44ea082bd0214713ec9eb7
commit 9a168f2b421743741f44ea082bd0214713ec9eb7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 3 06:54:28 2002 +0000
Completely specify size of _dl_arm_cap_flags.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 9c6476c..9acd079 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -46,7 +46,7 @@ EXTERN
#if !defined PROCINFO_DECL && defined SHARED
._dl_arm_cap_flags
#else
-const char _dl_arm_cap_flags[][10]
+const char _dl_arm_cap_flags[8][10]
#endif
#ifndef PROCINFO_DECL
= {
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d5fe9e39b6700763b2337f1f7ed55eeae8e75bb
commit 2d5fe9e39b6700763b2337f1f7ed55eeae8e75bb
Author: Roland McGrath <roland@gnu.org>
Date: Sun Mar 24 01:55:18 2002 +0000
2002-03-23 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/i386/Makefile
(sysdep_routines, shared-only-routines): Don't add framestate,
reverting 2001-10-02 change.
* sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
* sysdeps/unix/sysv/linux/alpha/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
* sysdeps/unix/sysv/linux/mips/Makefile: Likewise.
* sysdeps/unix/sysv/linux/powerpc/Makefile: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
* sysdeps/unix/sysv/linux/sparc/Makefile: Likewise.
* sysdeps/generic/Makefile (sysdep_routines, shared-only-routines):
Do it here instead, only if [$(unwind-find-fde) = yes].
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 5c04677..62536ae 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -23,11 +23,3 @@ ifeq ($(subdir),signal)
sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending
endif
-
-ifeq ($(subdir),elf)
-ifeq (yes,$(build-shared))
-# This is needed to support g++ v2 and v3.
-sysdep_routines += framestate
-shared-only-routines += framestate
-endif
-endif
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 66a93ba..aeaaa39 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -19,10 +19,4 @@ sysdep-dl-routines += dl-procinfo
sysdep_routines += dl-procinfo
# extra shared linker files to link only into dl-allobjs.so
sysdep-rtld-routines += dl-procinfo
-
-ifeq (yes,$(build-shared))
-# This is needed to support g++ v2 and v3.
-sysdep_routines += framestate
-shared-only-routines += framestate
-endif
endif
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 83ea370..55eeeab 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -10,12 +10,6 @@ endif
ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
-
-ifeq (yes,$(build-shared))
-# This is needed to support g++ v2 and v3.
-sysdep_routines += framestate
-shared-only-routines += framestate
-endif
endif
ifeq ($(subdir),resource)
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index e46cfef..1f9fc2d 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -9,11 +9,3 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
endif
-
-ifeq ($(subdir),elf)
-ifeq (yes,$(build-shared))
-# This is needed to support g++ v2 and v3.
-sysdep_routines += framestate
-shared-only-routines += framestate
-endif
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a484daec03981669852dceeb63fade7fec25a54
commit 5a484daec03981669852dceeb63fade7fec25a54
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 22 10:10:19 2002 +0000
Copy from generic file with changes for NaNs on MIPS.
diff --git a/sysdeps/mips/bits/nan.h b/sysdeps/mips/bits/nan.h
new file mode 100644
index 0000000..193ab3c
--- /dev/null
+++ b/sysdeps/mips/bits/nan.h
@@ -0,0 +1,51 @@
+/* `NAN' constant for IEEE 754 machines.
+ Copyright (C) 1992, 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/nan.h> directly; include <math.h> instead."
+#endif
+
+
+/* IEEE Not A Number (QNaN). Note that MIPS has the QNaN and SNaN patterns
+ reversed compared to most other architectures. The IEEE spec left
+ the definition of this open to implementations, and for MIPS the top
+ bit of the mantissa must be SET to indicate a SNaN. */
+
+#ifdef __GNUC__
+
+# define NAN \
+ (__extension__ \
+ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
+ { __l: 0x7fbfffffUL }).__d)
+
+#else
+
+# include <endian.h>
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __nan_bytes { 0x7f, 0xbf, 0xff, 0xff }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __nan_bytes { 0xff, 0xff, 0xbf, 0x7f }
+# endif
+
+static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes };
+# define NAN (__nan_union.__d)
+
+#endif /* GCC. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d61bf265110367d74e39c5133fd0e4cbe2d2d90a
commit d61bf265110367d74e39c5133fd0e4cbe2d2d90a
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Mar 17 12:09:54 2002 +0000
* sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
prototpyes.
* sysdeps/alpha/pt-machine.h: Likewise.
* sysdeps/arm/pt-machine.h: Likewise.
* sysdeps/cris/pt-machine.h: Likewise.
* sysdeps/hppa/pt-machine.h: Likewise.
* sysdeps/i386/i686/pt-machine.h: Likewise.
* sysdeps/ia64/pt-machine.h: Likewise.
* sysdeps/m68k/pt-machine.h: Likewise.
* sysdeps/mips/pt-machine.h: Likewise.
* sysdeps/powerpc/pt-machine.h: Likewise.
* sysdeps/s390/s390-32/pt-machine.h: Likewise.
* sysdeps/s390/s390-64/pt-machine.h: Likewise.
* sysdeps/sh/pt-machine.h: Likewise.
* sysdeps/sparc/sparc32/pt-machine.h: Likewise.
* sysdeps/sparc/sparc64/pt-machine.h: Likewise.
* sysdeps/x86_64/pt-machine.h: Likewise.
* internals.h: Move testandset and __compare_and_swap prototypes
to pt-machine.h.
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index 1079de4..cab724a 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent pthreads configuration and inline functions.
ARM version.
- Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -19,10 +19,13 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
#ifndef PT_EI
# define PT_EI extern inline
#endif
+extern long int testandset (int *spinlock);
+extern int __compare_and_swap (long int *p, long int oldval, long int newval);
/* This will not work on ARM1 or ARM2 because SWP is lacking on those
machines. Unfortunately we have no way to detect this at compile
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f1cdba97f5000b0b436acff729008520e6a657a8
commit f1cdba97f5000b0b436acff729008520e6a657a8
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Mar 17 12:07:44 2002 +0000
* sysdeps/mips/fpu/fraiseexcpt.c (__feraiseexcept): Set cause bits.
* sysdeps/mips/fpu/fgetexcptflg.c (__fegetexceptflag): Add comment.
* sysdeps/mips/fpu/fclrexcpt.c (__feclearexcept): Clear also cause
bits.
* sysdeps/mips/fpu/fenv_libc.h (CAUSE_MASK): New.
(CAUSE_SHIFT): New.
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 9fb2d7e..2c35047 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <fenv.h>
+#include <fenv_libc.h>
#include <fpu_control.h>
#include <shlib-compat.h>
@@ -33,8 +34,11 @@ __feclearexcept (int excepts)
/* Read the complete control word. */
_FPU_GETCW (cw);
- /* Clear exception bits. */
- cw &= ~excepts;
+ /* Clear exception flag bits and cause bits. If the cause bit is not
+ cleared, the next CTC instruction (just below) will re-generate
+ the exception. */
+
+ cw &= ~(excepts | (excepts << CAUSE_SHIFT));
/* Put the new data in effect. */
_FPU_SETCW (cw);
@@ -42,6 +46,7 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
+
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h
index dc30888..d971d2c 100644
--- a/sysdeps/mips/fpu/fenv_libc.h
+++ b/sysdeps/mips/fpu/fenv_libc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>.
@@ -20,10 +20,13 @@
#ifndef _FENV_LIBC_H
#define _FENV_LIBC_H 1
-/* Mask for enabling exceptions. */
-#define ENABLE_MASK 0xF80U
+/* Mask for enabling exceptions and for the CAUSE bits. */
+#define ENABLE_MASK 0x00F80U
+#define CAUSE_MASK 0x1F000U
+
+/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits. */
+#define ENABLE_SHIFT 5
+#define CAUSE_SHIFT 10
-/* Shift for FE_* flags. */
-#define ENABLE_SHIFT 5
#endif /* _FENV_LIBC_H */
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index d4bbfc3..4f802af 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -30,6 +30,10 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
/* Get the current exceptions. */
_FPU_GETCW (temp);
+ /* It is important that the CAUSE bits are not saved here. If they
+ were, a call to fesetexceptflag() would generate an
+ exception. */
+
*flagp = temp & excepts & FE_ALL_EXCEPT;
/* Success. */
diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c
index 582210a..e2472e3 100644
--- a/sysdeps/mips/fpu/fraiseexcpt.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <fenv.h>
+#include <fenv_libc.h>
#include <fpu_control.h>
#include <shlib-compat.h>
@@ -30,8 +31,13 @@ __feraiseexcept (int excepts)
/* Get current state. */
_FPU_GETCW (cw);
- /* Set exceptions bits. */
- cw |= (excepts & FE_ALL_EXCEPT);
+ /* Set flag bits (which are accumulative), and *also* set the cause
+ bits. The setting of the cause bits is what actually causes the
+ hardware to generate the exception, if the corresponding enable
+ bit is set as well. */
+
+ excepts &= FE_ALL_EXCEPT;
+ cw |= excepts | (excepts << CAUSE_SHIFT);
/* Set new state. */
_FPU_SETCW (cw);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7862ef805bcf3c052f3d3a2eef49c0de56abd9ea
commit 7862ef805bcf3c052f3d3a2eef49c0de56abd9ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 14 20:44:11 2002 +0000
Dummy file fo rnot needed __clz_tab table.
diff --git a/sysdeps/hppa/mp_clz_tab.c b/sysdeps/hppa/mp_clz_tab.c
new file mode 100644
index 0000000..52d0638
--- /dev/null
+++ b/sysdeps/hppa/mp_clz_tab.c
@@ -0,0 +1 @@
+/* __clz_tab not needed on hppa. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15a7702daabad96042e780ff545da1e360b98ead
commit 15a7702daabad96042e780ff545da1e360b98ead
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 13 03:49:52 2002 +0000
(__libc_multiple_libcs): Define as hidden.
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index 6856314..652cf95 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For ARM.
- Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1998,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ extern void __getopt_clean_environment (char **);
#endif
extern void __libc_global_ctors (void);
-int __libc_multiple_libcs = 1;
+int __libc_multiple_libcs attribute_hidden = 1;
static void
init (int *data)
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index dbcad4b..5adba3b 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -40,7 +40,7 @@ unsigned int __hurd_threadvar_max;
unsigned long int __hurd_threadvar_stack_offset;
unsigned long int __hurd_threadvar_stack_mask;
-int __libc_multiple_libcs = 1;
+int __libc_multiple_libcs attribute_hidden = 1;
int __libc_argc attribute_hidden;
char **__libc_argv attribute_hidden;
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index 7b4773b..4c6768b 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -42,7 +42,7 @@ weak_extern (_dl_starting_up)
/* Set nonzero if we have to be prepared for more then one libc being
used in the process. Safe assumption if initializer never runs. */
-int __libc_multiple_libcs = 1;
+int __libc_multiple_libcs attribute_hidden = 1;
/* Remember the command line argument and enviroment contents for
later calls of initializers for dynamic libraries. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48e6095f0e7dcc0827d6c1ccb1b5bf461ae323b7
commit 48e6095f0e7dcc0827d6c1ccb1b5bf461ae323b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 12 21:37:08 2002 +0000
Define __libc_argc and __libc_argv as hidden.
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 07b8e9e..dbcad4b 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -31,7 +31,7 @@ extern void __init_misc (int, char **, char **);
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
#endif
-#ifndef SHARED
+#ifndef SHARED
extern void _dl_non_dynamic_init (void) internal_function;
#endif
extern void __libc_global_ctors (void);
@@ -42,8 +42,8 @@ unsigned long int __hurd_threadvar_stack_mask;
int __libc_multiple_libcs = 1;
-int __libc_argc;
-char **__libc_argv;
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
void *(*_cthread_init_routine) (void); /* Returns new SP to use. */
void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index 2a60a92..7b4773b 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -46,8 +46,8 @@ int __libc_multiple_libcs = 1;
/* Remember the command line argument and enviroment contents for
later calls of initializers for dynamic libraries. */
-int __libc_argc;
-char **__libc_argv;
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
static void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5f72d715efd5715986fdce112be4bf59ca4de2f
commit b5f72d715efd5715986fdce112be4bf59ca4de2f
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Mar 2 13:14:40 2002 +0000
Added initialization of GP (to _gp) if compiled non-PIC.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index e129930..01908e2 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,6 +71,8 @@
ENTRY_POINT:
#ifdef __PIC__
SET_GP
+#else
+ la $28, _gp /* Setup GP correctly if we're non-PIC. */
#endif
move $31, $0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ceb7d0bbbe3741d7bfdf1d8b30e1979e9aacc0c7
commit ceb7d0bbbe3741d7bfdf1d8b30e1979e9aacc0c7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 1 09:43:36 2002 +0000
Use rtld_progrname instead of _dl_argv[0].
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 177a375..4a7ab38 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -377,11 +377,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
/* ARM never uses Elf32_Rela relocations for the dynamic linker.
Prelinked libraries may use Elf32_Rela though. */
-#ifdef RTLD_BOOTSTRAP
-#define ELF_MACHINE_NO_RELA 1
-#endif
-
-extern char **_dl_argv;
+# ifdef RTLD_BOOTSTRAP
+# define ELF_MACHINE_NO_RELA 1
+# endif
/* Deal with an out-of-range PC24 reloc. */
static Elf32_Addr
@@ -426,15 +424,15 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
{
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-#endif
+# endif
*reloc_addr += map->l_addr;
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
else if (__builtin_expect (r_type == R_ARM_NONE, 0))
return;
-#endif
+# endif
else
{
const Elf32_Sym *const refsym = sym;
@@ -457,7 +455,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
_dl_error_printf ("\
%s: Symbol `%s' has different size in shared object, consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
@@ -465,26 +463,26 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
-#ifdef RTLD_BOOTSTRAP
+# ifdef RTLD_BOOTSTRAP
/* Fix weak undefined references. */
if (sym != NULL && sym->st_value == 0)
*reloc_addr = 0;
else
-#endif
+# endif
*reloc_addr = value;
break;
case R_ARM_ABS32:
{
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static
libc.a; make the reference weak so static programs can
still link. This declaration cannot be done when
compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because
rtld.c contains the common defn for _dl_rtld_map, which
is incompatible with a weak decl in the same file. */
-# ifndef SHARED
+# ifndef SHARED
weak_extern (_dl_rtld_map);
-# endif
+# endif
if (map == &_dl_rtld_map)
/* Undo the relocation done here during bootstrapping.
Now we will relocate it anew, possibly using a
@@ -492,7 +490,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
rather than the dynamic linker's built-in definitions
used while loading those libraries. */
value -= map->l_addr + refsym->st_value;
-#endif
+# endif
*reloc_addr += value;
break;
}
@@ -529,7 +527,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
@@ -539,10 +537,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
*reloc_addr = map->l_addr + reloc->r_addend;
-#ifndef RTLD_BOOTSTRAP
else if (__builtin_expect (r_type == R_ARM_NONE, 0))
return;
-#endif
else
{
const Elf32_Sym *const refsym = sym;
@@ -585,7 +581,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
}
}
-#endif
+# endif
static inline void
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
@@ -594,14 +590,14 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
*reloc_addr += l_addr;
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
static inline void
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
Elf32_Addr *const reloc_addr)
{
*reloc_addr = l_addr + reloc->r_addend;
}
-#endif
+# endif
static inline void
elf_machine_lazy_rel (struct link_map *map,
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 966d86b..51ae43d 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -314,13 +314,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (sym->st_size > refsym->st_size
|| (GL(dl_verbose) && sym->st_size < refsym->st_size))
{
- extern char **_dl_argv;
const char *strtab;
strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
_dl_error_printf ("\
%s: Symbol `%s' has different size in shared object, consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 6d42494..b30a3ba 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -611,7 +611,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
_dl_error_printf ("\
%s: Symbol `%s' has different size in shared object, consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value,
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index b2e1c6b..ce80aad 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -253,13 +253,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (sym->st_size > refsym->st_size
|| (sym->st_size < refsym->st_size && GL(dl_verbose)))
{
- extern char **_dl_argv;
const char *strtab;
strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
_dl_error_printf ("\
%s: Symbol `%s' has different size in shared object, consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dca9c7304b376285b255cd3b87f85eb62d029e5b
commit dca9c7304b376285b255cd3b87f85eb62d029e5b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 28 22:36:33 2002 +0000
Add HAVE_VISIBILITY_ATTRIBUTE and HAVE_SDATA_SECTION.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 6024f13..490f1f1 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -328,7 +328,7 @@ $fixup_stack_ret: \n\
" RTLD_START_SPECIAL_INIT " \n\
/* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\
initializers. */ \n\
- ldq $16, _rtld_global \n\
+ ldq $16, _rtld_local \n\
ldq $17, 0($sp) \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 5d16564..177a375 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -324,7 +324,7 @@ _dl_start_user:
.L_STACK_END:
.word __libc_stack_end(GOT)
.L_LOADED:
- .word _rtld_global(GOT)
+ .word _rtld_local(GOT)
.previous\n\
");
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 34d29fa..966d86b 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -212,7 +212,7 @@ _dl_start_user:
move.d $sp,$r12
addq 4,$r12
; main_map: at _dl_loaded.
- move.d [$r0+_rtld_global:GOT16],$r9
+ move.d [$r0+_rtld_local:GOT16],$r9
move.d [$r9],$r10
move.d _dl_init_internal:PLTG,$r9
add.d $r0,$r9
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index bc3a983..6d42494 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -362,8 +362,8 @@ asm ( \
" stw %r24,-44(%sp)\n" \
\
".Lnofix:\n" \
-" addil LT'_rtld_global,%r19\n" \
-" ldw RT'_rtld_global(%r1),%r26\n" \
+" addil LT'_rtld_local,%r19\n" \
+" ldw RT'_rtld_local(%r1),%r26\n" \
" bl set_dp, %r2\n" \
" ldw 0(%r26),%r26\n" \
\
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 1645d83..b2e1c6b 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -176,7 +176,7 @@ _dl_start_user:\n\
pea 8(%sp, %d1*4)\n\
pea 8(%sp)\n\
move.l %d1, -(%sp)\n\
- move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
+ move.l ([_rtld_local@GOT.w, %a5]), -(%sp)\n\
jbsr _dl_init_internal@PLTPC\n\
addq.l #8, %sp\n\
addq.l #8, %sp\n\
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 893f104..fcf37f6 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -441,7 +441,7 @@ _dl_start_user:\n\
# Save back the modified argument count.\n\
sw $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _rtld_global\n\
+ lw $4, _rtld_local\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
sll $7, $5, 2\n\
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 6f89c0b..64731b8 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -480,7 +480,7 @@ _dl_start_user:\n\
# Save back the modified argument count.\n\
sd $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- ld $4, _rtld_global\n\
+ ld $4, _rtld_local\n\
ld $5, 0($29)\n\
dla $6, 4($29)\n\
dla $7, 8($29)\n\
@@ -492,7 +492,7 @@ _dl_start_user:\n\
dla $31, _dl_fini\n\
# Jump to the user entry point.\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _rtld_global\n\
+ lw $4, _rtld_local\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
la $7, 8($29)\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23f357ebe1719e42453b95e99f7907200847d534
commit 23f357ebe1719e42453b95e99f7907200847d534
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 28 19:37:12 2002 +0000
(sysdep_routines): Add divdi3 in csu dir.
(shared-only-routines): Likewise.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index c44b2d1..2515df7 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -33,6 +33,14 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer
# The 68k `long double' is a distinct type we support.
long-double-fcts = yes
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += divdi3
+shared-only-routines += divdi3
+endif
+endif
+
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88706a4c849e4262dc4ec6911c3eecf61940056e
commit 88706a4c849e4262dc4ec6911c3eecf61940056e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 27 18:10:53 2002 +0000
(elf_machine_load_address, RTLD_START): Work around an Alpha gas bug.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 5feb46d..6024f13 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -74,7 +74,7 @@ elf_machine_load_address (void)
"0:\n\t"
"br $0, 2f\n"
"1:\n\t"
- ".data\n"
+ ".section\t.data\n"
"2:\n\t"
".quad 0b\n\t"
".previous"
@@ -294,7 +294,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
its return value is the user program's entry point. */
#define RTLD_START asm ("\
-.text \n\
+ .section .text \n\
.set at \n\
.globl _start \n\
.ent _start \n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53ea1a569ed53210d9ca041b555596c8bd66e005
commit 53ea1a569ed53210d9ca041b555596c8bd66e005
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 24 08:33:08 2002 +0000
Call _dl_non_dynamic_init for !SHARED.
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 525f510..07b8e9e 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -31,6 +31,9 @@ extern void __init_misc (int, char **, char **);
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
#endif
+#ifndef SHARED
+extern void _dl_non_dynamic_init (void) internal_function;
+#endif
extern void __libc_global_ctors (void);
unsigned int __hurd_threadvar_max;
@@ -107,6 +110,9 @@ init1 (int argc, char *arg0, ...)
d->portarray, d->portarraysize,
d->intarray, d->intarraysize);
+#ifndef SHARED
+ _dl_non_dynamic_init ();
+#endif
__init_misc (argc, argv, __environ);
__libc_init (argc, argv, __environ);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bb0396702e9bdfcd124da2ca95897586a8dc6ee
commit 1bb0396702e9bdfcd124da2ca95897586a8dc6ee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 23 08:45:12 2002 +0000
Call __init_misc in addition to __libc_init.
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index d0ab593..525f510 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
+extern void __init_misc (int, char **, char **);
#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
#endif
@@ -106,6 +107,7 @@ init1 (int argc, char *arg0, ...)
d->portarray, d->portarraysize,
d->intarray, d->intarraysize);
+ __init_misc (argc, argv, __environ);
__libc_init (argc, argv, __environ);
#ifdef USE_NONOPTION_FLAGS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8523a3c743ddf213ada026e8973b8e2c9c94026
commit c8523a3c743ddf213ada026e8973b8e2c9c94026
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Feb 11 10:23:36 2002 +0000
Update MCOUNT for current GCC behavior.
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index f9bd2b4..102da2c 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -24,36 +24,45 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
and the return PC our caller will return to. */
#ifdef __PIC__
#define CPLOAD ".cpload $25;"
+#define CPRESTORE ".cprestore 44\n\t"
#else
#define CPLOAD
+#define CPRESTORE
#endif
#define MCOUNT asm(\
- ".globl _mcount;" \
- ".align 2;" \
- ".type _mcount,@function;" \
- "_mcount:;" \
- ".set noreorder;" \
- ".set noat;" \
+ ".globl _mcount;\n\t" \
+ ".align 2;\n\t" \
+ ".type _mcount,@function;\n\t" \
+ ".ent _mcount\n\t" \
+ "_mcount:\n\t" \
+ ".frame $sp,44,$31\n\t" \
+ ".set noreorder;\n\t" \
+ ".set noat;\n\t" \
CPLOAD \
- "sw $4,8($29);" \
- "sw $5,12($29);" \
- "sw $6,16($29);" \
- "sw $7,20($29);" \
- "sw $1,0($29);" \
- "sw $31,4($29);" \
- "move $5,$31;" \
- "move $4,$1;" \
- "jal __mcount;" \
- "nop;" \
- "lw $4,8($29);" \
- "lw $5,12($29);" \
- "lw $6,16($29);" \
- "lw $7,20($29);" \
- "lw $31,4($29);" \
- "lw $1,0($29);" \
- "addu $29,$29,8;" \
- "j $31;" \
- "move $31,$1;" \
- ".set reorder;" \
- ".set at");
+ "subu $29,$29,48;\n\t" \
+ CPRESTORE \
+ "sw $4,24($29);\n\t" \
+ "sw $5,28($29);\n\t" \
+ "sw $6,32($29);\n\t" \
+ "sw $7,36($29);\n\t" \
+ "sw $2,40($29);\n\t" \
+ "sw $1,16($29);\n\t" \
+ "sw $31,20($29);\n\t" \
+ "move $5,$31;\n\t" \
+ "move $4,$1;\n\t" \
+ "jal __mcount;\n\t" \
+ "nop;\n\t" \
+ "lw $4,24($29);\n\t" \
+ "lw $5,28($29);\n\t" \
+ "lw $6,32($29);\n\t" \
+ "lw $7,36($29);\n\t" \
+ "lw $2,40($29);\n\t" \
+ "lw $31,20($29);\n\t" \
+ "lw $1,16($29);\n\t" \
+ "addu $29,$29,56;\n\t" \
+ "j $31;\n\t" \
+ "move $31,$1;\n\t" \
+ ".set reorder;\n\t" \
+ ".set at\n\t" \
+ ".end _mcount");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64e7a2bf11cfd39c9069bc9901fabbc1d369b7a2
commit 64e7a2bf11cfd39c9069bc9901fabbc1d369b7a2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 9 01:58:16 2002 +0000
Use \n\ for multiline string.
diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c
index e1c0f1c..6c4d04b 100644
--- a/sysdeps/alpha/elf/initfini.c
+++ b/sysdeps/alpha/elf/initfini.c
@@ -1,5 +1,5 @@
/* Special .init and .fini section support for Alpha.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,62 +37,61 @@
files, all of which may have different GP values. So we must reload
the GP value from crti.o in crtn.o. */
-__asm__ ("
-
-#include \"defs.h\"
-
-/*@HEADER_ENDS*/
-
-/*@_init_PROLOG_BEGINS*/
- .section .init, \"ax\", @progbits
- .globl _init
- .ent _init
-_init:
- ldgp $29, 0($27)
- subq $30, 16, $30
- lda $27, __gmon_start__
- stq $26, 0($30)
- stq $29, 8($30)
- .prologue 1
- beq $27, 1f
- jsr $26, ($27), __gmon_start__
- ldq $29, 8($30)
-1:
- .align 3
- .end _init
- .size _init, 0
-/*@_init_PROLOG_ENDS*/
-
-/*@_init_EPILOG_BEGINS*/
- .section .init, \"ax\", @progbits
- ldq $26, 0($30)
- ldq $29, 8($30)
- addq $30, 16, $30
- ret
-/*@_init_EPILOG_ENDS*/
-
-/*@_fini_PROLOG_BEGINS*/
- .section .fini, \"ax\", @progbits
- .globl _fini
- .ent _fini
-_fini:
- ldgp $29, 0($27)
- subq $30, 16, $30
- stq $26, 0($30)
- stq $29, 8($30)
- .prologue 1
- .align 3
- .end _fini
- .size _fini, 0
-/*@_fini_PROLOG_ENDS*/
-
-/*@_fini_EPILOG_BEGINS*/
- .section .fini, \"ax\", @progbits
- ldq $26, 0($30)
- ldq $29, 8($30)
- addq $30, 16, $30
- ret
-/*@_fini_EPILOG_ENDS*/
-
-/*@TRAILER_BEGINS*/
+__asm__ (" \n\
+#include \"defs.h\" \n\
+ \n\
+/*@HEADER_ENDS*/ \n\
+ \n\
+/*@_init_PROLOG_BEGINS*/ \n\
+ .section .init, \"ax\", @progbits \n\
+ .globl _init \n\
+ .ent _init \n\
+_init: \n\
+ ldgp $29, 0($27) \n\
+ subq $30, 16, $30 \n\
+ lda $27, __gmon_start__ \n\
+ stq $26, 0($30) \n\
+ stq $29, 8($30) \n\
+ .prologue 1 \n\
+ beq $27, 1f \n\
+ jsr $26, ($27), __gmon_start__ \n\
+ ldq $29, 8($30) \n\
+ .align 3 \n\
+1: \n\
+ .end _init \n\
+ .size _init, 0 \n\
+/*@_init_PROLOG_ENDS*/ \n\
+ \n\
+/*@_init_EPILOG_BEGINS*/ \n\
+ .section .init, \"ax\", @progbits \n\
+ ldq $26, 0($30) \n\
+ ldq $29, 8($30) \n\
+ addq $30, 16, $30 \n\
+ ret \n\
+/*@_init_EPILOG_ENDS*/ \n\
+ \n\
+/*@_fini_PROLOG_BEGINS*/ \n\
+ .section .fini, \"ax\", @progbits \n\
+ .globl _fini \n\
+ .ent _fini \n\
+_fini: \n\
+ ldgp $29, 0($27) \n\
+ subq $30, 16, $30 \n\
+ stq $26, 0($30) \n\
+ stq $29, 8($30) \n\
+ .prologue 1 \n\
+ .align 3 \n\
+ .end _fini \n\
+ .size _fini, 0 \n\
+/*@_fini_PROLOG_ENDS*/ \n\
+ \n\
+/*@_fini_EPILOG_BEGINS*/ \n\
+ .section .fini, \"ax\", @progbits \n\
+ ldq $26, 0($30) \n\
+ ldq $29, 8($30) \n\
+ addq $30, 16, $30 \n\
+ ret \n\
+/*@_fini_EPILOG_ENDS*/ \n\
+ \n\
+/*@TRAILER_BEGINS*/ \n\
");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4bf39226fac5704a1736b43704b97b177ba393cc
commit 4bf39226fac5704a1736b43704b97b177ba393cc
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 8 18:56:57 2002 +0000
* sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use
__attribute_used__.
(__dl_runtime_resolve): Likewise.
* sysdeps/mips/machine-gmon.h (_MCOUNT_DECL): Make it a real
declaration.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 18eb3eb..893f104 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -69,7 +69,7 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
} while (0)
/* Return nonzero iff ELF header is compatible with the running host. */
-static inline int __attribute__ ((unused))
+static inline int __attribute_used__
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
switch (ehdr->e_machine)
@@ -262,7 +262,7 @@ int _dl_mips_gnu_objects = 1; \
/* This is called from assembly stubs below which the compiler can't see. */ \
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
+ __attribute_used__; \
\
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word) sym_index, \
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index 4b6a939..f9bd2b4 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _MCOUNT_DECL static void __mcount
+#define _MCOUNT_DECL(frompc,selfpc) \
+static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
/* Call __mcount with our the return PC for our caller,
and the return PC our caller will return to. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b16fd2b0509ef10bdfd363ff325f99b941552d14
commit b16fd2b0509ef10bdfd363ff325f99b941552d14
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 8 16:21:00 2002 +0000
* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Don't include
<signal.h>, <sys/ucontext.h> nor <asm/elf.h>. Updated for gdb.
* sysdeps/unix/sysv/linux/mips/sys/user.h: New.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 76dd2bb..a21652e 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,12 +24,19 @@
used on Linux. */
#include <features.h>
-#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
+
+/* ELF register definitions */
+#define ELF_NGREG 45
+#define ELF_NFPREG 33
+
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
__BEGIN_DECLS
@@ -50,19 +57,10 @@ struct elf_siginfo
marked with "XXX". */
struct elf_prstatus
{
-#if 0
- long int pr_flags; /* XXX Process flags. */
- short int pr_why; /* XXX Reason for process halt. */
- short int pr_what; /* XXX More detailed reason. */
-#endif
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
-#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
- struct sigaction pr_action; /* Signal action for current sig. */
-#endif
__pid_t pr_pid;
__pid_t pr_ppid;
__pid_t pr_pgrp;
@@ -71,9 +69,6 @@ struct elf_prstatus
struct timeval pr_stime; /* System time. */
struct timeval pr_cutime; /* Cumulative user time. */
struct timeval pr_cstime; /* Cumulative system time. */
-#if 0
- long int pr_instr; /* Current instruction. */
-#endif
elf_gregset_t pr_reg; /* GP registers. */
int pr_fpvalid; /* True if math copro being used. */
};
@@ -101,8 +96,8 @@ struct elf_prpsinfo
typedef void *psaddr_t;
/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
/* We don't have any differences between processes and threads,
therefore habe only ine PID type. */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/user.h b/sysdeps/unix/sysv/linux/mips/sys/user.h
new file mode 100644
index 0000000..21f7b28
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/user.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* The whole purpose of this file is for GDB and GDB only. Don't read
+ too much into it. Don't use it for anything other than GDB unless
+ you know what you are doing. */
+
+#include <asm/reg.h>
+
+struct user
+{
+ unsigned long regs[EF_SIZE/4+64]; /* integer and fp regs */
+ size_t u_tsize; /* text size (pages) */
+ size_t u_dsize; /* data size (pages) */
+ size_t u_ssize; /* stack size (pages) */
+ unsigned long start_code; /* text starting address */
+ unsigned long start_data; /* data starting address */
+ unsigned long start_stack; /* stack starting address */
+ long int signal; /* signal causing core dump */
+ void* u_ar0; /* help gdb find registers */
+ unsigned long magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+};
+
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
+#define NBPG PAGE_SIZE
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_DATA_START_ADDR (u.start_data)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif /* _SYS_USER_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c149ac8f45398b0fffaa7d33192baabac1de0056
commit c149ac8f45398b0fffaa7d33192baabac1de0056
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 8 16:15:32 2002 +0000
* sysdeps/mips/atomicity.h (compare_and_swap): Remove
".set noreorder".
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set):
Likewise.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index a1a7761..b4b7b64 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -75,11 +75,8 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
("/* Inline compare & swap */\n"
"1:\n\t"
"ll %1,%5\n\t"
- ".set push\n\t"
- ".set noreorder\n\t"
+ "move %0,$0\n\t"
"bne %1,%3,2f\n\t"
- " move %0,$0\n\t"
- ".set pop\n\t"
"move %0,%4\n\t"
"sc %0,%2\n\t"
"beqz %0,1b\n"
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 1bfbbcf..2a1a045 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -45,11 +45,8 @@ _test_and_set (int *p, int v) __THROW
("/* Inline test and set */\n"
"1:\n\t"
"ll %0,%3\n\t"
- ".set push\n\t"
- ".set noreorder\n\t"
+ "move %1,%4\n\t"
"beq %0,%4,2f\n\t"
- " move %1,%4\n\t"
- ".set pop\n\t"
"sc %1,%2\n\t"
"beqz %1,1b\n"
"2:\n\t"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d1e7ba62393aa514c3f122d4263f00426a2e47e
commit 6d1e7ba62393aa514c3f122d4263f00426a2e47e
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Feb 7 10:39:06 2002 +0000
Do not use branch likely.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index 4d18507..a1a7761 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -1,5 +1,5 @@
/* Low-level functions for atomic operations. Mips version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,16 +32,12 @@ exchange_and_add (volatile uint32_t *mem, int val)
int result, tmp;
__asm__ __volatile__
- ("/* Inline exchange & add */\n\t"
- "ll %0,%3\n"
+ ("/* Inline exchange & add */\n"
"1:\n\t"
+ "ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
- ".set push\n\t"
- ".set noreorder\n\t"
- "beqzl %1,1b\n\t"
- " ll %0,%3\n\t"
- ".set pop\n\t"
+ "beqz %1,1b\n\t"
"/* End exchange & add */"
: "=&r"(result), "=&r"(tmp), "=m"(*mem)
: "m" (*mem), "r"(val)
@@ -57,16 +53,12 @@ atomic_add (volatile uint32_t *mem, int val)
int result;
__asm__ __volatile__
- ("/* Inline atomic add */\n\t"
- "ll %0,%2\n"
+ ("/* Inline atomic add */\n"
"1:\n\t"
+ "ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"
- ".set push\n\t"
- ".set noreorder\n\t"
- "beqzl %0,1b\n\t"
- " ll %0,%2\n\t"
- ".set pop\n\t"
+ "beqz %0,1b\n\t"
"/* End atomic add */"
: "=&r"(result), "=m"(*mem)
: "m" (*mem), "r"(val)
@@ -80,18 +72,17 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
long int ret, temp;
__asm__ __volatile__
- ("/* Inline compare & swap */\n\t"
- "ll %1,%5\n"
+ ("/* Inline compare & swap */\n"
"1:\n\t"
+ "ll %1,%5\n\t"
".set push\n\t"
".set noreorder\n\t"
"bne %1,%3,2f\n\t"
" move %0,$0\n\t"
+ ".set pop\n\t"
"move %0,%4\n\t"
"sc %0,%2\n\t"
- "beqzl %0,1b\n\t"
- " ll %1,%5\n\t"
- ".set pop\n"
+ "beqz %0,1b\n"
"2:\n\t"
"/* End compare & swap */"
: "=&r" (ret), "=&r" (temp), "=m" (*p)
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 3396708..1bfbbcf 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
@@ -42,17 +42,16 @@ _test_and_set (int *p, int v) __THROW
int r, t;
__asm__ __volatile__
- ("/* Inline test and set */\n\t"
- "ll %0,%3\n"
+ ("/* Inline test and set */\n"
"1:\n\t"
+ "ll %0,%3\n\t"
".set push\n\t"
".set noreorder\n\t"
"beq %0,%4,2f\n\t"
" move %1,%4\n\t"
+ ".set pop\n\t"
"sc %1,%2\n\t"
- "beqzl %1,1b\n\t"
- " ll %0,%3\n\t"
- ".set pop\n"
+ "beqz %1,1b\n"
"2:\n\t"
"/* End test and set */"
: "=&r" (r), "=&r" (t), "=m" (*p)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ff2687616dbedeade97869db460be7cd8e94f31
commit 9ff2687616dbedeade97869db460be7cd8e94f31
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Feb 6 22:48:35 2002 +0000
Make sure the right <ldsodefs.h> is included.
diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h
index 4054391..cabc51d 100644
--- a/sysdeps/mips/elf/ldsodefs.h
+++ b/sysdeps/mips/elf/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,4 +22,4 @@
#define DL_RO_DYN_SECTION 1
-#include <sysdeps/generic/ldsodefs.h>
+#include_next <ldsodefs.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63
commit d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 3 02:25:17 2002 +0000
(_test_and_set): Use branch likely.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 0c81dc2..3396708 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -42,16 +42,19 @@ _test_and_set (int *p, int v) __THROW
int r, t;
__asm__ __volatile__
- ("1:\n\t"
- "ll %0,%3\n\t"
+ ("/* Inline test and set */\n\t"
+ "ll %0,%3\n"
+ "1:\n\t"
".set push\n\t"
".set noreorder\n\t"
"beq %0,%4,2f\n\t"
" move %1,%4\n\t"
- ".set pop\n\t"
"sc %1,%2\n\t"
- "beqz %1,1b\n"
- "2:\n"
+ "beqzl %1,1b\n\t"
+ " ll %0,%3\n\t"
+ ".set pop\n"
+ "2:\n\t"
+ "/* End test and set */"
: "=&r" (r), "=&r" (t), "=m" (*p)
: "m" (*p), "r" (v)
: "memory");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f295ff32125aa9edb6d042e80295cf4c31b590ec
commit f295ff32125aa9edb6d042e80295cf4c31b590ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 3 02:24:53 2002 +0000
(exchange_and_add): Use branch likely.
(atomic_add): Likewise.
(compare_and_swap): Return 0 only when failed to compare. Use branch likely.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index 1fe1b7a..4d18507 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -33,11 +33,15 @@ exchange_and_add (volatile uint32_t *mem, int val)
__asm__ __volatile__
("/* Inline exchange & add */\n\t"
+ "ll %0,%3\n"
"1:\n\t"
- "ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
- "beqz %1,1b\n\t"
+ ".set push\n\t"
+ ".set noreorder\n\t"
+ "beqzl %1,1b\n\t"
+ " ll %0,%3\n\t"
+ ".set pop\n\t"
"/* End exchange & add */"
: "=&r"(result), "=&r"(tmp), "=m"(*mem)
: "m" (*mem), "r"(val)
@@ -54,11 +58,15 @@ atomic_add (volatile uint32_t *mem, int val)
__asm__ __volatile__
("/* Inline atomic add */\n\t"
+ "ll %0,%2\n"
"1:\n\t"
- "ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"
- "beqz %0,1b\n\t"
+ ".set push\n\t"
+ ".set noreorder\n\t"
+ "beqzl %0,1b\n\t"
+ " ll %0,%2\n\t"
+ ".set pop\n\t"
"/* End atomic add */"
: "=&r"(result), "=m"(*mem)
: "m" (*mem), "r"(val)
@@ -69,22 +77,24 @@ static inline int
__attribute__ ((unused))
compare_and_swap (volatile long int *p, long int oldval, long int newval)
{
- long int ret;
+ long int ret, temp;
__asm__ __volatile__
("/* Inline compare & swap */\n\t"
+ "ll %1,%5\n"
"1:\n\t"
- "ll %0,%4\n\t"
- ".set push\n"
+ ".set push\n\t"
".set noreorder\n\t"
- "bne %0,%2,2f\n\t"
- "move %0,%3\n\t"
- ".set pop\n\t"
- "sc %0,%1\n\t"
- "beqz %0,1b\n"
+ "bne %1,%3,2f\n\t"
+ " move %0,$0\n\t"
+ "move %0,%4\n\t"
+ "sc %0,%2\n\t"
+ "beqzl %0,1b\n\t"
+ " ll %1,%5\n\t"
+ ".set pop\n"
"2:\n\t"
"/* End compare & swap */"
- : "=&r" (ret), "=m" (*p)
+ : "=&r" (ret), "=&r" (temp), "=m" (*p)
: "r" (oldval), "r" (newval), "m" (*p)
: "memory");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c577723005382e6b1a4421f0dc2d27c856fa7099
commit c577723005382e6b1a4421f0dc2d27c856fa7099
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 3 00:29:15 2002 +0000
(RTLD_START): Call _dl_init_internal instead of _dl_init.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 9e4c6f4..5feb46d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -333,7 +333,7 @@ $fixup_stack_ret: \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
addq $19, $18, $19 \n\
- jsr $26, _dl_init \n\
+ jsr $26, _dl_init_internal \n\
/* Pass our finalizer function to the user in $0. */ \n\
lda $0, _dl_fini \n\
/* Jump to the user's entry point. */ \n\
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 4c302b5..5d16564 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -302,7 +302,7 @@ _dl_start_user:
ldr r0, [sl, r0]
ldr r0, [r0]
@ call _dl_init
- bl _dl_init(PLT)
+ bl _dl_init_internal(PLT)
@ clear the startup flag
ldr r2, .L_STARTUP_FLAG
ldr r1, [sl, r2]
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index ff27005..34d29fa 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -214,7 +214,7 @@ _dl_start_user:
; main_map: at _dl_loaded.
move.d [$r0+_rtld_global:GOT16],$r9
move.d [$r9],$r10
- move.d _dl_init:PLTG,$r9
+ move.d _dl_init_internal:PLTG,$r9
add.d $r0,$r9
jsr $r9
; Pass our finalizer function to the user in R10.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 449fa9d..bc3a983 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -372,7 +372,7 @@ asm ( \
\
/* envp = argv + argc + 1 */ \
" sh2add %r25,%r24,%r23\n" \
-" bl _dl_init,%r2\n" \
+" bl _dl_init_internal,%r2\n" \
" ldo 4(%r23),%r23\n" /* delay slot */ \
\
/* Reload argc, argv to the registers start.S expects them in (feh) */ \
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 3b99978..1645d83 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -177,7 +177,7 @@ _dl_start_user:\n\
pea 8(%sp)\n\
move.l %d1, -(%sp)\n\
move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
- jbsr _dl_init@PLTPC\n\
+ jbsr _dl_init_internal@PLTPC\n\
addq.l #8, %sp\n\
addq.l #8, %sp\n\
| Pass our finalizer function to the user in %a1.\n\
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 4c28e17..18eb3eb 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -449,7 +449,7 @@ _dl_start_user:\n\
addu $7, $7, 4\n\
subu $29, 16\n\
# Call the function to run the initializers.\n\
- jal _dl_init
+ jal _dl_init_internal\n\
addiu $29, 16\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
la $2, _dl_fini\n\
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 7ee3cf5..6f89c0b 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -486,7 +486,7 @@ _dl_start_user:\n\
dla $7, 8($29)\n\
dsubu $29, 16\n\
# Call the function to run the initializers.\n\
- jal _dl_init
+ jal _dl_init_internal\n\
daddiu $29, 16\n\
# Pass our finalizer function to the user in ra.\n\
dla $31, _dl_fini\n\
@@ -498,7 +498,7 @@ _dl_start_user:\n\
la $7, 8($29)\n\
subu $29, 16\n\
# Call the function to run the initializers.\n\
- jal _dl_init
+ jal _dl_init_internal\n\
addiu $29, 16\n\
# Pass our finalizer function to the user in ra.\n\
dla $31, _dl_fini\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae6cfd8bc146d34e8aae762d2d26164aa88385ed
commit ae6cfd8bc146d34e8aae762d2d26164aa88385ed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 1 23:14:50 2002 +0000
Move all symbols to GLIBC_PRIVATE.
diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions
index c5f35d4..909d50b 100644
--- a/sysdeps/hppa/Versions
+++ b/sysdeps/hppa/Versions
@@ -1,5 +1,5 @@
ld {
- GLIBC_2.2 {
+ GLIBC_PRIVATE {
# hppa specific functions in the dynamic linker, but used by libc.so.
_dl_symbol_address; _dl_unmap; _dl_lookup_address;
_dl_function_address;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a242df8440aed93d43c573b82ad712c77aea7a0d
commit a242df8440aed93d43c573b82ad712c77aea7a0d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 1 19:11:08 2002 +0000
Remove dl-procinfo.c.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 83f8719..aa9eb1a 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,5 +1,4 @@
clone.S
-dl-procinfo.c
dl-procinfo.h
ioperm.c
setresuid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8badabd8491773ea9cec0569d86a2c594171bbfd
commit 8badabd8491773ea9cec0569d86a2c594171bbfd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 1 19:03:37 2002 +0000
_dl_fpu_control, _dl_fpu_control_set): Remove unused externs.
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index f87e5c8..2a60a92 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the XCOFF startup code. AIX version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,9 +40,6 @@ static void init (int, char **, char **) __attribute__ ((unused));
extern int _dl_starting_up;
weak_extern (_dl_starting_up)
-extern fpu_control_t _dl_fpu_control;
-extern int _dl_fpu_control_set;
-
/* Set nonzero if we have to be prepared for more then one libc being
used in the process. Safe assumption if initializer never runs. */
int __libc_multiple_libcs = 1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d09d6903edb3a5276d3cc22242fefb0783e00adb
commit d09d6903edb3a5276d3cc22242fefb0783e00adb
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Feb 1 10:28:20 2002 +0000
Don't use multi-line string literals.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index bd2d1e2..3b99978 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -104,22 +104,22 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* This code is used in dl-runtime.c to call the `fixup' function
and then redirect to the address it returns. */
#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
-"| Trampoline for " #fixup_name "
- .globl " #tramp_name "
- .type " #tramp_name ", @function
-" #tramp_name ":
- | Save %a0 (struct return address) and %a1.
- move.l %a0, -(%sp)
- move.l %a1, -(%sp)
- | Call the real address resolver.
- jbsr " #fixup_name "
- | Restore register %a0 and %a1.
- move.l (%sp)+, %a1
- move.l (%sp)+, %a0
- | Pop parameters
- addq.l #8, %sp
- | Call real function.
- jmp (%d0)
+"| Trampoline for " #fixup_name "\n\
+ .globl " #tramp_name "\n\
+ .type " #tramp_name ", @function\n\
+" #tramp_name ":\n\
+ | Save %a0 (struct return address) and %a1.\n\
+ move.l %a0, -(%sp)\n\
+ move.l %a1, -(%sp)\n\
+ | Call the real address resolver.\n\
+ jbsr " #fixup_name "\n\
+ | Restore register %a0 and %a1.\n\
+ move.l (%sp)+, %a1\n\
+ move.l (%sp)+, %a0\n\
+ | Pop parameters\n\
+ addq.l #8, %sp\n\
+ | Call real function.\n\
+ jmp (%d0)\n\
.size " #tramp_name ", . - " #tramp_name "\n"
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
@@ -143,50 +143,50 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
its return value is the user program's entry point. */
#define RTLD_START asm ("\
- .text
- .globl _start
- .type _start,@function
-_start:
- move.l %sp, -(%sp)
- jbsr _dl_start
- addq.l #4, %sp
- /* FALLTHRU */
-
- .globl _dl_start_user
- .type _dl_start_user,@function
-_dl_start_user:
- | Save the user entry point address in %a4.
- move.l %d0, %a4
- | Point %a5 at the GOT.
- lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
- | Remember the highest stack address.
- move.l %sp, ([__libc_stack_end@GOT.w, %a5])
- | See if we were run as a command with the executable file
- | name as an extra leading argument.
- move.l ([_dl_skip_args@GOT.w, %a5]), %d0
- | Pop the original argument count
- move.l (%sp)+, %d1
- | Subtract _dl_skip_args from it.
- sub.l %d0, %d1
- | Adjust the stack pointer to skip _dl_skip_args words.
- lea (%sp, %d0*4), %sp
- | Push back the modified argument count.
- move.l %d1, -(%sp)
- # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
- pea 8(%sp, %d1*4)
- pea 8(%sp)
- move.l %d1, -(%sp)
- move.l ([_rtld_global@GOT.w, %a5]), -(%sp)
- jbsr _dl_init@PLTPC
- addq.l #8, %sp
- addq.l #8, %sp
- | Pass our finalizer function to the user in %a1.
- move.l _dl_fini@GOT.w(%a5), %a1
- | Initialize %fp with the stack pointer.
- move.l %sp, %fp
- | Jump to the user's entry point.
- jmp (%a4)
- .size _dl_start_user, . - _dl_start_user
+ .text\n\
+ .globl _start\n\
+ .type _start,@function\n\
+_start:\n\
+ move.l %sp, -(%sp)\n\
+ jbsr _dl_start\n\
+ addq.l #4, %sp\n\
+ /* FALLTHRU */\n\
+\n\
+ .globl _dl_start_user\n\
+ .type _dl_start_user,@function\n\
+_dl_start_user:\n\
+ | Save the user entry point address in %a4.\n\
+ move.l %d0, %a4\n\
+ | Point %a5 at the GOT.\n\
+ lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5\n\
+ | Remember the highest stack address.\n\
+ move.l %sp, ([__libc_stack_end@GOT.w, %a5])\n\
+ | See if we were run as a command with the executable file\n\
+ | name as an extra leading argument.\n\
+ move.l ([_dl_skip_args@GOT.w, %a5]), %d0\n\
+ | Pop the original argument count\n\
+ move.l (%sp)+, %d1\n\
+ | Subtract _dl_skip_args from it.\n\
+ sub.l %d0, %d1\n\
+ | Adjust the stack pointer to skip _dl_skip_args words.\n\
+ lea (%sp, %d0*4), %sp\n\
+ | Push back the modified argument count.\n\
+ move.l %d1, -(%sp)\n\
+ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)\n\
+ pea 8(%sp, %d1*4)\n\
+ pea 8(%sp)\n\
+ move.l %d1, -(%sp)\n\
+ move.l ([_rtld_global@GOT.w, %a5]), -(%sp)\n\
+ jbsr _dl_init@PLTPC\n\
+ addq.l #8, %sp\n\
+ addq.l #8, %sp\n\
+ | Pass our finalizer function to the user in %a1.\n\
+ move.l _dl_fini@GOT.w(%a5), %a1\n\
+ | Initialize %fp with the stack pointer.\n\
+ move.l %sp, %fp\n\
+ | Jump to the user's entry point.\n\
+ jmp (%a4)\n\
+ .size _dl_start_user, . - _dl_start_user\n\
.previous");
/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8bd56b60c47a3664e5179e523bcb6c0547d4fd26
commit 8bd56b60c47a3664e5179e523bcb6c0547d4fd26
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 1 07:48:43 2002 +0000
Move _dl_hp_timing_overhead and procinfo-related variables in
rtld_global struct.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 8bc18bf..9c6476c 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -1,5 +1,5 @@
/* Data for Linux/ARM version of processor capability information.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -19,13 +19,44 @@
02111-1307 USA. */
/* This information must be kept in sync with the _DL_HWCAP_COUNT and
- _DL_PLATFORM_COUNT definitions in procinfo.h. */
+ _DL_PLATFORM_COUNT definitions in procinfo.h.
+ If anything should be added here check whether the size of each string
+ is still ok with the given array size.
-/* If anything should be added here check whether the size of each string
- is still ok with the given array size. */
-const char _dl_arm_cap_flags[][10] =
- {
+ All the #ifdefs in the definitions ar equite irritating but
+ necessary if we want to avoid duplicating the information. There
+ are three different modes:
+
+ - PROCINFO_DECL is defined. This means we are only interested in
+ declarations.
+
+ - PROCINFO_DECL is not defined:
+
+ + if SHARED is defined the file is included in an array
+ initializer. The .element = { ... } syntax is needed.
+
+ + if SHARED is not defined a normal array initialization is
+ needed.
+ */
+
+#ifdef PROCINFO_DECL
+EXTERN
+#endif
+#if !defined PROCINFO_DECL && defined SHARED
+ ._dl_arm_cap_flags
+#else
+const char _dl_arm_cap_flags[][10]
+#endif
+#ifndef PROCINFO_DECL
+= {
"swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
- };
+ }
+#endif
+#if !defined SHARED || defined PROCINFO_DECL
+;
+#else
+,
+#endif
+#undef PROCINFO_DECL
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 87d114c..7e7e66e 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -1,5 +1,5 @@
/* Linux/ARM version of processor capability information handling macros.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -23,9 +23,6 @@
#include <ldsodefs.h>
-/* If anything should be added here check whether the size of each string
- is still ok with the given array size. */
-extern const char _dl_arm_cap_flags[][10];
#define _DL_HWCAP_COUNT 32
/* The kernel provides platform data but it is not interesting. */
@@ -42,7 +39,7 @@ _dl_procinfo (int word)
for (i = 0; i < _DL_HWCAP_COUNT; ++i)
if (word & (1 << i))
- _dl_printf (" %s", _dl_arm_cap_flags[i]);
+ _dl_printf (" %s", GL(dl_arm_cap_flags)[i]);
_dl_printf ("\n");
@@ -53,7 +50,7 @@ static inline const char *
__attribute__ ((unused))
_dl_hwcap_string (int idx)
{
- return _dl_arm_cap_flags[idx];
+ return GL(dl_arm_cap_flags)[idx];
};
enum
@@ -78,7 +75,7 @@ _dl_string_hwcap (const char *str)
for (i = 0; i < _DL_HWCAP_COUNT; i++)
{
- if (strcmp (str, _dl_arm_cap_flags[i]) == 0)
+ if (strcmp (str, GL(dl_arm_cap_flags)[i]) == 0)
return i;
}
return -1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f71d7f5726d075f16096b7e18d633db1bd3a85e9
commit f71d7f5726d075f16096b7e18d633db1bd3a85e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 1 01:32:06 2002 +0000
Move global variables for SHARED code in struct _rtld_global. Export
this struct, remove all exports for the signal variables.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7b6dcec..9e4c6f4 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -110,11 +110,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
*(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
@@ -328,7 +328,7 @@ $fixup_stack_ret: \n\
" RTLD_START_SPECIAL_INIT " \n\
/* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\
initializers. */ \n\
- ldq $16, _dl_loaded \n\
+ ldq $16, _rtld_global \n\
ldq $17, 0($sp) \n\
lda $18, 8($sp) \n\
s8addq $17, 8, $19 \n\
@@ -498,7 +498,7 @@ elf_machine_rela (struct link_map *map,
{
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
-#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
+#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
@@ -515,7 +515,7 @@ elf_machine_rela (struct link_map *map,
{
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
/* Already done in dynamic linker. */
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
# endif
{
/* XXX Make some timings. Maybe it's preverable to test for
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 73edd77..4c302b5 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -109,10 +109,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
/* Say that we really want profiling and the timers are
started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
else
/* This function will get called to fix up the GOT entry indicated by
@@ -324,7 +324,7 @@ _dl_start_user:
.L_STACK_END:
.word __libc_stack_end(GOT)
.L_LOADED:
- .word _dl_loaded(GOT)
+ .word _rtld_global(GOT)
.previous\n\
");
@@ -347,14 +347,12 @@ _dl_start_user:
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
-extern const char *_dl_platform;
-
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform != NULL && *_dl_platform == '\0')
+ if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
/* Avoid an empty string which would disturb us. */
- _dl_platform = NULL;
+ GL(dl_platform) = NULL;
}
static inline Elf32_Addr
@@ -452,7 +450,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (_dl_verbose && sym->st_size < refsym->st_size))
+ || (GL(dl_verbose) && sym->st_size < refsym->st_size))
{
const char *strtab;
@@ -484,7 +482,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because
rtld.c contains the common defn for _dl_rtld_map, which
is incompatible with a weak decl in the same file. */
+# ifndef SHARED
weak_extern (_dl_rtld_map);
+# endif
if (map == &_dl_rtld_map)
/* Undo the relocation done here during bootstrapping.
Now we will relocate it anew, possibly using a
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index e4778e3..ff27005 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. CRIS version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -106,11 +106,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
else
@@ -212,7 +212,7 @@ _dl_start_user:
move.d $sp,$r12
addq 4,$r12
; main_map: at _dl_loaded.
- move.d [$r0+_dl_loaded:GOT16],$r9
+ move.d [$r0+_rtld_global:GOT16],$r9
move.d [$r9],$r10
move.d _dl_init:PLTG,$r9
add.d $r0,$r9
@@ -246,14 +246,12 @@ _dl_start_user:
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
-extern const char *_dl_platform;
-
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform != NULL && *_dl_platform == '\0')
+ if (GL(dl_platform) != NULL && *GL(dl_platform) == '\0')
/* Avoid an empty string which would disturb us. */
- _dl_platform = NULL;
+ GL(dl_platform) = NULL;
}
static inline Elf32_Addr
@@ -314,7 +312,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (_dl_verbose && sym->st_size < refsym->st_size))
+ || (GL(dl_verbose) && sym->st_size < refsym->st_size))
{
extern char **_dl_argv;
const char *strtab;
diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c
index 4f8cc8b..f8b6424 100644
--- a/sysdeps/hppa/dl-fptr.c
+++ b/sysdeps/hppa/dl-fptr.c
@@ -1,5 +1,5 @@
/* Make dynamic PLABELs for function pointers. HPPA version.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,10 +44,9 @@ static int __hppa_fptr_lock = 1;
#ifdef MAP_ANON
/* The fd is not examined when using MAP_ANON. */
-#define ANONFD -1
+# define ANONFD -1
#else
-extern int _dl_zerofd;
-#define ANONFD _dl_zerofd
+# define ANONFD GL(dl_zerofd)
#endif
struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE];
@@ -95,10 +94,10 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
{
#ifndef MAP_ANON
# define MAP_ANON 0
- if (_dl_zerofd == -1)
+ if (GL(dl_zerofd) == -1)
{
- _dl_zerofd = _dl_sysdep_open_zero_fill ();
- if (_dl_zerofd == -1)
+ GL(dl_zerofd) = _dl_sysdep_open_zero_fill ();
+ if (GL(dl_zerofd) == -1)
{
__close (fd);
_dl_signal_error (errno, NULL, NULL,
@@ -107,11 +106,11 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
}
#endif
- __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE,
+ __fptr_next = __mmap (0, GL(dl_pagesize), PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, ANONFD, 0);
if (__fptr_next == MAP_FAILED)
_dl_signal_error(errno, NULL, NULL, "cannot map page for fptr");
- __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr);
+ __fptr_count = GL(dl_pagesize) / sizeof (struct hppa_fptr);
}
f = __fptr_next++;
__fptr_count--;
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index d13f15b..449fa9d 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997,1999,2000,2001,2002 Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
@@ -227,12 +227,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
((unsigned long) &_dl_runtime_resolve & ~3))->func;
else
{
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that
we really want profiling and the timers are
started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
got[-2] =
(Elf32_Addr) ((struct hppa_fptr *)
@@ -362,8 +362,8 @@ asm ( \
" stw %r24,-44(%sp)\n" \
\
".Lnofix:\n" \
-" addil LT'_dl_loaded,%r19\n" \
-" ldw RT'_dl_loaded(%r1),%r26\n" \
+" addil LT'_rtld_global,%r19\n" \
+" ldw RT'_rtld_global(%r1),%r26\n" \
" bl set_dp, %r2\n" \
" ldw 0(%r26),%r26\n" \
\
@@ -488,13 +488,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
struct link_map *sym_map;
Elf32_Addr value;
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
because rtld.c contains the common defn for _dl_rtld_map, which is
incompatible with a weak decl in the same file. */
- weak_extern (_dl_rtld_map);
+ weak_extern (GL(dl_rtld_map));
#endif
/* RESOLVE_MAP will return a null value for undefined syms, and
@@ -527,7 +527,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
other ones will have their values reset. In particular,
__fptr_next will be reset, sometimes causing endless loops in
__hppa_make_fptr(). So don't do that. */
- if (map == &_dl_rtld_map)
+ if (map == &GL(dl_rtld_map))
return;
#endif
/* .eh_frame can have unaligned relocs. */
@@ -604,7 +604,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
if (__builtin_expect (sym->st_size > refsym->st_size, 0)
|| (__builtin_expect (sym->st_size < refsym->st_size, 0)
- && __builtin_expect (_dl_verbose, 0)))
+ && __builtin_expect (GL(dl_verbose), 0)))
{
const char *strtab;
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index d9c8194..bd2d1e2 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,11 +85,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- if (_dl_name_match_p (_dl_profile, l))
+ if (_dl_name_match_p (GL(dl_profile), l))
{
/* This is the object we are looking for. Say that we really
want profiling and the timers are started. */
- _dl_profile_map = l;
+ GL(dl_profile_map) = l;
}
}
else
@@ -176,7 +176,7 @@ _dl_start_user:
pea 8(%sp, %d1*4)
pea 8(%sp)
move.l %d1, -(%sp)
- move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
+ move.l ([_rtld_global@GOT.w, %a5]), -(%sp)
jbsr _dl_init@PLTPC
addq.l #8, %sp
addq.l #8, %sp
@@ -251,7 +251,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (sym->st_size < refsym->st_size && _dl_verbose))
+ || (sym->st_size < refsym->st_size && GL(dl_verbose)))
{
extern char **_dl_argv;
const char *strtab;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index de51069..4c28e17 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -216,7 +216,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
{
- struct link_map *l = _dl_loaded;
+ struct link_map *l = GL(dl_loaded);
while (l)
{
@@ -441,7 +441,7 @@ _dl_start_user:\n\
# Save back the modified argument count.\n\
sw $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _dl_loaded\n\
+ lw $4, _rtld_global\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
sll $7, $5, 2\n\
@@ -477,14 +477,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
{
const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined SHARED
/* This is defined in rtld.c, but nowhere in the static libc.a;
make the reference weak so static programs can still link. This
declaration cannot be done when compiling rtld.c (i.e. #ifdef
RTLD_BOOTSTRAP) because rtld.c contains the common defn for
_dl_rtld_map, which is incompatible with a weak decl in the same
file. */
- weak_extern (_dl_rtld_map);
+ weak_extern (GL(dl_rtld_map));
#endif
switch (r_type)
@@ -501,7 +501,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
if (symidx < gotsym)
{
#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
#endif
*reloc_addr += sym->st_value + map->l_addr;
}
@@ -520,7 +520,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
else
#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
#endif
*reloc_addr += map->l_addr;
}
@@ -561,7 +561,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
({ \
const ElfW(Sym) *ref = sym; \
const struct r_found_version *version \
- = vernum ? &map->l_versions [vernum [sym_index]] : NULL; \
+ = vernum ? &map->l_versions[vernum[sym_index]] : NULL; \
ElfW(Addr) value; \
value = RESOLVE (&ref, version, R_MIPS_REL32); \
(ref)? value + ref->st_value: 0; \
@@ -576,7 +576,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
/* The dynamic linker's local got entries have already been relocated. */
- if (map != &_dl_rtld_map)
+ if (map != &GL(dl_rtld_map))
{
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index d51f1e3..7ee3cf5 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version.
- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -289,7 +289,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
{
- struct link_map *l = _dl_loaded;
+ struct link_map *l = GL(dl_loaded);
while (l)
{
@@ -480,7 +480,7 @@ _dl_start_user:\n\
# Save back the modified argument count.\n\
sd $4, 0($29)\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- ld $4, _dl_loaded\n\
+ ld $4, _rtld_global\n\
ld $5, 0($29)\n\
dla $6, 4($29)\n\
dla $7, 8($29)\n\
@@ -492,7 +492,7 @@ _dl_start_user:\n\
dla $31, _dl_fini\n\
# Jump to the user entry point.\n\
1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
- lw $4, _dl_loaded\n\
+ lw $4, _rtld_global\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
la $7, 8($29)\n\
@@ -553,8 +553,10 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
RTLD_BOOTSTRAP) because rtld.c contains the common defn for
_dl_rtld_map, which is incompatible with a weak decl in the same
file. */
- weak_extern (_dl_rtld_map);
- if (map == &_dl_rtld_map)
+# ifndef SHARED
+ weak_extern (GL(dl_rtld_map));
+# endif
+ if (map == &GL(dl_rtld_map))
/* Undo the relocation done here during bootstrapping. Now we will
relocate it anew, possibly using a binding found in the user
program or a loaded library rather than the dynamic linker's
diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c
index 1184664..757b349 100644
--- a/sysdeps/unix/sysv/aix/libc-start.c
+++ b/sysdeps/unix/sysv/aix/libc-start.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the XCOFF startup code. AIX version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -73,10 +73,6 @@ extern int __loadx (int flag, void *module, void *arg1, void *arg2,
/* Needed by setenv */
char **__environ;
-/* Needed by dl-support.c */
-/* XXX stubbing out dl-support.c for now..
- size_t _dl_pagesize = 0; */
-
/*
* Find __rtinit symbol
*
@@ -277,7 +273,7 @@ __libc_start_main (void)
/* Call the initializer of the program, if any. */
#ifdef SHARED
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ninitialize program: %s\n\n",
__libc_start_data.argv[0]);
#endif
@@ -285,7 +281,7 @@ __libc_start_main (void)
(*__libc_start_data.init) ();
#ifdef SHARED
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
_dl_debug_printf ("\ntransferring control: %s\n\n",
__libc_start_data.argv[0]);
#endif
diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c
index e3582e3..303caa7 100644
--- a/sysdeps/unix/sysv/aix/start-libc.c
+++ b/sysdeps/unix/sysv/aix/start-libc.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the XCOFF startup code. AIX version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -74,10 +74,6 @@ extern int __loadx (int flag, void *module, void *arg1, void *arg2,
/* Needed by setenv */
char **__environ;
-/* Needed by dl-support.c */
-/* XXX stubbing out dl-support.c for now..
- size_t _dl_pagesize = 0; */
-
/*
Find __rtinit symbol
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index bbabbb1..ce1048b 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@suse.de>.
@@ -21,6 +21,7 @@
#include <sys/param.h>
#include <errno.h>
+#include <ldsodefs.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -28,13 +29,12 @@
int
__getpagesize ()
{
- extern size_t _dl_pagesize;
#ifdef __NR_getpagesize
int result;
#endif
- if (_dl_pagesize != 0)
- return _dl_pagesize;
+ if (GL(dl_pagesize) != 0)
+ return GL(dl_pagesize);
#ifdef __NR_getpagesize
result = INLINE_SYSCALL (getpagesize, 0);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fbd2f3d0c69c94feaaf1df3d937aa1347f9f08f
commit 6fbd2f3d0c69c94feaaf1df3d937aa1347f9f08f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 29 03:53:32 2002 +0000
(pic-ccflag): New variable.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 4965984..ce8f9b3 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -43,3 +43,7 @@ divrem := divl divq reml remq
# For now, build everything with full IEEE math support.
# TODO: build separate libm and libm-ieee.
sysdep-CFLAGS += -mieee
+
+# libc.so requires about 16k for the small data area, which is well
+# below the 64k maximum.
+pic-ccflag = -fpic
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=872cf89f66ac40b9e9ad3f9c2093c31909bf3f4c
commit 872cf89f66ac40b9e9ad3f9c2093c31909bf3f4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 29 02:58:00 2002 +0000
(ELF_MACHINE_BEFORE_RTLD_RELOC): Don't use label at end of compound statement.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 1dc225e..de51069 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -132,7 +132,7 @@ do { \
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \
\
if (__builtin_expect (map->l_addr == 0, 1)) \
- goto done; \
+ break; \
\
/* got[0] is reserved. got[1] is also reserved for the dynamic object \
generated by gnu ld. Skip these reserved entries from \
@@ -169,7 +169,6 @@ do { \
got++; \
sym++; \
} \
-done: \
} while(0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f68ec79d24c6b364c3b97d45133b8ee419c752b
commit 6f68ec79d24c6b364c3b97d45133b8ee419c752b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 18 23:37:53 2002 +0000
Avoid warning about comma at end of enum for !_GNU_SOURCE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
index d37d0ff..6120cf7 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,9 +71,10 @@ enum
{
ST_RDONLY = 1, /* Mount read-only. */
#define ST_RDONLY ST_RDONLY
- ST_NOSUID = 2, /* Ignore suid and sgid bits. */
+ ST_NOSUID = 2 /* Ignore suid and sgid bits. */
#define ST_NOSUID ST_NOSUID
#ifdef __USE_GNU
+ ,
ST_NODEV = 4, /* Disallow access to device special files. */
# define ST_NODEV ST_NODEV
ST_NOEXEC = 8, /* Disallow program execution. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=046f02be6f9c5d813a32dea6c1c0cdf49706f18a
commit 046f02be6f9c5d813a32dea6c1c0cdf49706f18a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 17 23:21:33 2002 +0000
(__dl_runtime_resolve): Remove `const' from `got'.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index da9a5d3..1dc225e 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -276,8 +276,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
= (const void *) D_PTR (l, l_info[DT_SYMTAB]); \
const char *strtab \
= (const void *) D_PTR (l, l_info[DT_STRTAB]); \
- const ElfW(Addr) *got \
- = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
+ ElfW(Addr) *got \
+ = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18328fa8da6acc476cbdf9d2ccc2b37c9f8d8fa3
commit 18328fa8da6acc476cbdf9d2ccc2b37c9f8d8fa3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 11 01:03:15 2002 +0000
(__ieee754_sqrt): Don't use multi-line string literals.
(__full_ieee754_sqrt): Add __attribute_used__.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index a74e353..c6262c8 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
#if !defined(_IEEE_FP_INEXACT)
@@ -53,110 +54,110 @@ const static struct sqrt_data_struct {
};
asm ("\
- /* Define offsets into the structure defined in C above. */
- $DN = 0*8
- $UP = 1*8
- $HALF = 2*8
- $ALMOST_THREE_HALF = 3*8
- $NAN = 7*8
- $T2 = 8*8
-
- /* Stack variables. */
- $K = 0
- $Y = 8
-
- .text
- .align 5
- .globl __ieee754_sqrt
- .ent __ieee754_sqrt
-__ieee754_sqrt:
- ldgp $29, 0($27)
- subq $sp, 16, $sp
+ /* Define offsets into the structure defined in C above. */ \n\
+ $DN = 0*8 \n\
+ $UP = 1*8 \n\
+ $HALF = 2*8 \n\
+ $ALMOST_THREE_HALF = 3*8 \n\
+ $NAN = 7*8 \n\
+ $T2 = 8*8 \n\
+ \n\
+ /* Stack variables. */ \n\
+ $K = 0 \n\
+ $Y = 8 \n\
+ \n\
+ .text \n\
+ .align 5 \n\
+ .globl __ieee754_sqrt \n\
+ .ent __ieee754_sqrt \n\
+__ieee754_sqrt: \n\
+ ldgp $29, 0($27) \n\
+ subq $sp, 16, $sp \n\
.frame $sp, 16, $26, 0\n"
#ifdef PROF
-" lda $28, _mcount
+" lda $28, _mcount \n\
jsr $28, ($28), _mcount\n"
#endif
-" .prologue 1
-
- .align 4
- stt $f16, $K($sp) # e0 :
- mult $f31, $f31, $f31 # .. fm :
- lda $4, sqrt_data # e0 :
- fblt $f16, $fixup # .. fa :
-
- ldah $2, 0x5fe8 # e0 :
- ldq $3, $K($sp) # .. e1 :
- ldt $f12, $HALF($4) # e0 :
- ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 :
-
- sll $3, 52, $5 # e0 :
- lda $6, 0x7fd # .. e1 :
- fnop # .. fa :
- fnop # .. fm :
-
- subq $5, 1, $5 # e1 :
- srl $3, 33, $1 # .. e0 :
- cmpule $5, $6, $5 # e0 :
- beq $5, $fixup # .. e1 :
-
- mult $f16, $f12, $f11 # fm : $f11 = x * 0.5
- subl $2, $1, $2 # .. e0 :
- addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
- srl $2, 12, $1 # e0 :
-
- and $1, 0xfc, $1 # e0 :
- addq $1, $4, $1 # e1 :
- ldl $1, $T2($1) # e0 :
- addt $f12, $f17, $f15 # .. fa : $f15 = 1.5
-
- subl $2, $1, $2 # e0 :
- ldt $f14, $DN($4) # .. e1 :
- sll $2, 32, $2 # e0 :
- stq $2, $Y($sp) # e0 :
-
- ldt $f13, $Y($sp) # e0 :
- mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y
- mult $f10, $f13, $f10 # fm 4: $f10 = ((x * 0.5) * y) * y
- subt $f15, $f10, $f1 # fa 4: $f1 = (1.5 - 0.5*x*y*y)
-
- mult $f13, $f1, $f13 # fm 4: yp = y*(1.5 - 0.5*x*y*y)
- mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp
- mult $f1, $f13, $f11 # fm 4: $f11 = (x * 0.5 * yp) * yp
- subt $f18, $f11, $f1 # fa 4: $f1= (1.5-2^-30) - 0.5*x*yp*yp
-
- mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1
- subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5)
- ldt $f15, $UP($4) # .. e0 :
- mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp
-
- mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp
- mult $f10, $f12, $f12 # fm : $f12 = z*0.5
- subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp
- mult $f12, $f1, $f12 # fm 4: $f12 = z*0.5*(1 - z*ypp)
-
- addt $f10, $f12, $f0 # fa 4: zp=res= z + z*0.5*(1 - z*ypp)
- mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN
- mult/c $f0, $f15, $f11 # fm : zpl = zp * UP
- mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
-
- mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
- subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x
- subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x
- fcmovge $f13, $f12, $f0 # fa 3: res = (y1 >= 0) ? zmi : res
-
- fcmovlt $f14, $f11, $f0 # fa 4: res = (y2 < 0) ? zpl : res
- addq $sp, 16, $sp # .. e0 :
- ret # .. e1 :
-
- .align 4
-$fixup:
- addq $sp, 16, $sp
- br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng
-
+" .prologue 1 \n\
+ \n\
+ .align 4 \n\
+ stt $f16, $K($sp) # e0 : \n\
+ mult $f31, $f31, $f31 # .. fm : \n\
+ lda $4, sqrt_data # e0 : \n\
+ fblt $f16, $fixup # .. fa : \n\
+ \n\
+ ldah $2, 0x5fe8 # e0 : \n\
+ ldq $3, $K($sp) # .. e1 : \n\
+ ldt $f12, $HALF($4) # e0 : \n\
+ ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 : \n\
+ \n\
+ sll $3, 52, $5 # e0 : \n\
+ lda $6, 0x7fd # .. e1 : \n\
+ fnop # .. fa : \n\
+ fnop # .. fm : \n\
+ \n\
+ subq $5, 1, $5 # e1 : \n\
+ srl $3, 33, $1 # .. e0 : \n\
+ cmpule $5, $6, $5 # e0 : \n\
+ beq $5, $fixup # .. e1 : \n\
+ \n\
+ mult $f16, $f12, $f11 # fm : $f11 = x * 0.5 \n\
+ subl $2, $1, $2 # .. e0 : \n\
+ addt $f12, $f12, $f17 # .. fa : $f17 = 1.0 \n\
+ srl $2, 12, $1 # e0 : \n\
+ \n\
+ and $1, 0xfc, $1 # e0 : \n\
+ addq $1, $4, $1 # e1 : \n\
+ ldl $1, $T2($1) # e0 : \n\
+ addt $f12, $f17, $f15 # .. fa : $f15 = 1.5 \n\
+ \n\
+ subl $2, $1, $2 # e0 : \n\
+ ldt $f14, $DN($4) # .. e1 : \n\
+ sll $2, 32, $2 # e0 : \n\
+ stq $2, $Y($sp) # e0 : \n\
+ \n\
+ ldt $f13, $Y($sp) # e0 : \n\
+ mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y \n\
+ mult $f10, $f13, $f10 # fm 4: $f10 = ((x*0.5)*y)*y \n\
+ subt $f15, $f10, $f1 # fa 4: $f1 = (1.5-0.5*x*y*y) \n\
+ \n\
+ mult $f13, $f1, $f13 # fm 4: yp = y*(1.5-0.5*x*y^2)\n\
+ mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp \n\
+ mult $f1, $f13, $f11 # fm 4: $f11 = (x*0.5*yp)*yp \n\
+ subt $f18, $f11, $f1 # fa 4: $f1=(1.5-2^-30)-x/2*yp^2\n\
+ \n\
+ mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1 \n\
+ subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5) \n\
+ ldt $f15, $UP($4) # .. e0 : \n\
+ mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp \n\
+ \n\
+ mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp \n\
+ mult $f10, $f12, $f12 # fm : $f12 = z*0.5 \n\
+ subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp \n\
+ mult $f12, $f1, $f12 # fm 4: $f12 = z/2*(1 - z*ypp)\n\
+ \n\
+ addt $f10, $f12, $f0 # fa 4: zp=res= z+z/2*(1-z*ypp)\n\
+ mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN \n\
+ mult/c $f0, $f15, $f11 # fm : zpl = zp * UP \n\
+ mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi \n\
+ \n\
+ mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl \n\
+ subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x \n\
+ subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x \n\
+ fcmovge $f13, $f12, $f0 # fa 3: res = (y1>=0)?zmi:res \n\
+ \n\
+ fcmovlt $f14, $f11, $f0 # fa 4: res = (y2<0)?zpl:res \n\
+ addq $sp, 16, $sp # .. e0 : \n\
+ ret # .. e1 : \n\
+ \n\
+ .align 4 \n\
+$fixup: \n\
+ addq $sp, 16, $sp \n\
+ br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng \n\
+ \n\
.end __ieee754_sqrt");
-static double __full_ieee754_sqrt(double) __attribute__((unused));
+static double __full_ieee754_sqrt(double) __attribute_used__;
#define __ieee754_sqrt __full_ieee754_sqrt
#endif /* _IEEE_FP_INEXACT */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51e7253b8427d37178009f68639f8e45082a6d4d
commit 51e7253b8427d37178009f68639f8e45082a6d4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 8 21:54:58 2002 +0000
Add sysv_termio.h and start-libc.c.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index 2698761..609fd77 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -7,6 +7,8 @@ dl-close.c
dl-libc.c
dlldr.h
kernel_proto.h
+start-libc.c
+sysv_termio.h
bits/utmpx.h
gnu/lib-names.h
uitrunc.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5374babef37bf3aa6fd8f200d912035407abe77c
commit 5374babef37bf3aa6fd8f200d912035407abe77c
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jan 8 10:19:33 2002 +0000
Prevent double inclusion.
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index ea6aa96..549d445 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. m68k version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,9 @@
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
#endif
+#ifndef _BITS_BYTESWAP_H
+#define _BITS_BYTESWAP_H 1
+
/* Swap bytes in 16 bit value. We don't provide an assembler version
because GCC is smart enough to generate optimal assembler output, and
this allows for better cse. */
@@ -60,3 +63,5 @@
__bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
__bswap_64_r.__ll; })
#endif
+
+#endif /* _BITS_BYTESWAP_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c2105f0b07f490cd67d482c3b1bc442d8c8fab3
commit 3c2105f0b07f490cd67d482c3b1bc442d8c8fab3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 7 09:18:53 2002 +0000
Define _G_MMAP64.
diff --git a/sysdeps/unix/sysv/linux/cris/_G_config.h b/sysdeps/unix/sysv/linux/cris/_G_config.h
index 42fef4d..083a00a 100644
--- a/sysdeps/unix/sysv/linux/cris/_G_config.h
+++ b/sysdeps/unix/sysv/linux/cris/_G_config.h
@@ -81,6 +81,7 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
#define _G_OPEN64 __open64
#define _G_LSEEK64 __lseek64
+#define _G_MMAP64 __mmap64
#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
/* This is defined by <bits/stat.h> if `st_blksize' exists. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca439e9a54f07bc2010162f27900c2be9f082217
commit ca439e9a54f07bc2010162f27900c2be9f082217
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 2 09:52:27 2002 +0000
2002-01-02 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/i386/bits/sigcontext.h: Protect from
multiple inclusion. Inhibit #error under [_SYS_UCONTEXT_H].
* sysdeps/mach/hurd/alpha/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/hppa/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/mips/bits/sigcontext.h: Likewise.
* sysdeps/mach/hurd/powerpc/bits/sigcontext.h: Likewise.
diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
index 158db61..4f13a2c 100644
--- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
@@ -1,5 +1,5 @@
/* Machine-dependent signal context structure for GNU Hurd. Alpha version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994,97,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,10 +17,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
+#ifndef sc_alpha_thread_state
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
@@ -67,3 +69,5 @@ struct sigcontext
double sc_fpregs[31]; /* Floating point registers $f0..$f30. */
long int sc_fpcsr; /* Floating point control/status register. */
};
+
+#endif /* sc_alpha_thread_state */
diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
index 0042359..5db43fc 100644
--- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
@@ -1,5 +1,5 @@
/* Machine-dependent signal context structure for GNU Hurd. HPPA version.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995,97,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,10 +17,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
+#ifndef sc_parisc_thread_state
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
@@ -88,3 +90,5 @@ struct sigcontext
/* Floating point registers $f0..$f31. */
double sc_fpregs[32];
};
+
+#endif /* sc_parisc_thread_state */
diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h
index deea841..14c6188 100644
--- a/sysdeps/mach/hurd/mips/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Machine-dependent signal context structure for GNU Hurd. MIPS version.
+ Copyright (C) 1994,97,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +17,12 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SIGNAL_H
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
+#ifndef sc_mips_thread_state
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
@@ -73,3 +76,5 @@ struct sigcontext
int sc_fpcsr; /* FPU status register. */
int sc_fpeir; /* FP exception instruction register. */
};
+
+#endif /* sc_mips_thread_state */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a6fc182da4237428ce6f622a43c8290369b88f9
commit 0a6fc182da4237428ce6f622a43c8290369b88f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 31 17:33:59 2001 +0000
(elf_machine_runtime_setup): Avoid warning.
(TRAMPOLINE_TEMPLATE, RTLD_START): Don't use multi-line string
literals to avoid warnings.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index c93da66..7b6dcec 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -127,7 +127,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
unsigned int val = 0xc39ffff7;
unsigned int *slot, *end;
- const Elf64_Rela *rela = D_PTR (l, l_info[DT_JMPREL]);
+ const Elf64_Rela *rela = (const Elf64_Rela *)
+ D_PTR (l, l_info[DT_JMPREL]);
Elf64_Addr l_addr = l->l_addr;
/* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */
@@ -156,125 +157,126 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \
extern void tramp_name (void); \
asm ( "\
- .globl " #tramp_name "
- .ent " #tramp_name "
-" #tramp_name ":
- lda $sp, -44*8($sp)
- .frame $sp, 44*8, $26
- /* Preserve all integer registers that C normally doesn't. */
- stq $26, 0*8($sp)
- stq $0, 1*8($sp)
- stq $1, 2*8($sp)
- stq $2, 3*8($sp)
- stq $3, 4*8($sp)
- stq $4, 5*8($sp)
- stq $5, 6*8($sp)
- stq $6, 7*8($sp)
- stq $7, 8*8($sp)
- stq $8, 9*8($sp)
- stq $16, 10*8($sp)
- stq $17, 11*8($sp)
- stq $18, 12*8($sp)
- stq $19, 13*8($sp)
- stq $20, 14*8($sp)
- stq $21, 15*8($sp)
- stq $22, 16*8($sp)
- stq $23, 17*8($sp)
- stq $24, 18*8($sp)
- stq $25, 19*8($sp)
- stq $29, 20*8($sp)
- stt $f0, 21*8($sp)
- stt $f1, 22*8($sp)
- stt $f10, 23*8($sp)
- stt $f11, 24*8($sp)
- stt $f12, 25*8($sp)
- stt $f13, 26*8($sp)
- stt $f14, 27*8($sp)
- stt $f15, 28*8($sp)
- stt $f16, 29*8($sp)
- stt $f17, 30*8($sp)
- stt $f18, 31*8($sp)
- stt $f19, 32*8($sp)
- stt $f20, 33*8($sp)
- stt $f21, 34*8($sp)
- stt $f22, 35*8($sp)
- stt $f23, 36*8($sp)
- stt $f24, 37*8($sp)
- stt $f25, 38*8($sp)
- stt $f26, 39*8($sp)
- stt $f27, 40*8($sp)
- stt $f28, 41*8($sp)
- stt $f29, 42*8($sp)
- stt $f30, 43*8($sp)
- .mask 0x27ff01ff, -44*8
- .fmask 0xfffffc03, -(44-21)*8
- /* Set up our $gp */
- br $gp, .+4
- ldgp $gp, 0($gp)
- .prologue 0
- /* Set up the arguments for fixup: */
- /* $16 = link_map out of plt0 */
- /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
- /* $18 = return address */
- subq $28, $27, $17
- ldq $16, 8($27)
- subq $17, 20, $17
- mov $26, $18
- addq $17, $17, $17
- /* Do the fixup */
- bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng
- /* Move the destination address into position. */
- mov $0, $27
- /* Restore program registers. */
- ldq $26, 0*8($sp)
- ldq $0, 1*8($sp)
- ldq $1, 2*8($sp)
- ldq $2, 3*8($sp)
- ldq $3, 4*8($sp)
- ldq $4, 5*8($sp)
- ldq $5, 6*8($sp)
- ldq $6, 7*8($sp)
- ldq $7, 8*8($sp)
- ldq $8, 9*8($sp)
- ldq $16, 10*8($sp)
- ldq $17, 11*8($sp)
- ldq $18, 12*8($sp)
- ldq $19, 13*8($sp)
- ldq $20, 14*8($sp)
- ldq $21, 15*8($sp)
- ldq $22, 16*8($sp)
- ldq $23, 17*8($sp)
- ldq $24, 18*8($sp)
- ldq $25, 19*8($sp)
- ldq $29, 20*8($sp)
- ldt $f0, 21*8($sp)
- ldt $f1, 22*8($sp)
- ldt $f10, 23*8($sp)
- ldt $f11, 24*8($sp)
- ldt $f12, 25*8($sp)
- ldt $f13, 26*8($sp)
- ldt $f14, 27*8($sp)
- ldt $f15, 28*8($sp)
- ldt $f16, 29*8($sp)
- ldt $f17, 30*8($sp)
- ldt $f18, 31*8($sp)
- ldt $f19, 32*8($sp)
- ldt $f20, 33*8($sp)
- ldt $f21, 34*8($sp)
- ldt $f22, 35*8($sp)
- ldt $f23, 36*8($sp)
- ldt $f24, 37*8($sp)
- ldt $f25, 38*8($sp)
- ldt $f26, 39*8($sp)
- ldt $f27, 40*8($sp)
- ldt $f28, 41*8($sp)
- ldt $f29, 42*8($sp)
- ldt $f30, 43*8($sp)
- /* Flush the Icache after having modified the .plt code. */
- " #IMB "
- /* Clean up and turn control to the destination */
- lda $sp, 44*8($sp)
- jmp $31, ($27)
+ .globl " #tramp_name " \n\
+ .ent " #tramp_name " \n\
+" #tramp_name ": \n\
+ lda $sp, -44*8($sp) \n\
+ .frame $sp, 44*8, $26 \n\
+ /* Preserve all integer registers that C normally \n\
+ doesn't. */ \n\
+ stq $26, 0*8($sp) \n\
+ stq $0, 1*8($sp) \n\
+ stq $1, 2*8($sp) \n\
+ stq $2, 3*8($sp) \n\
+ stq $3, 4*8($sp) \n\
+ stq $4, 5*8($sp) \n\
+ stq $5, 6*8($sp) \n\
+ stq $6, 7*8($sp) \n\
+ stq $7, 8*8($sp) \n\
+ stq $8, 9*8($sp) \n\
+ stq $16, 10*8($sp) \n\
+ stq $17, 11*8($sp) \n\
+ stq $18, 12*8($sp) \n\
+ stq $19, 13*8($sp) \n\
+ stq $20, 14*8($sp) \n\
+ stq $21, 15*8($sp) \n\
+ stq $22, 16*8($sp) \n\
+ stq $23, 17*8($sp) \n\
+ stq $24, 18*8($sp) \n\
+ stq $25, 19*8($sp) \n\
+ stq $29, 20*8($sp) \n\
+ stt $f0, 21*8($sp) \n\
+ stt $f1, 22*8($sp) \n\
+ stt $f10, 23*8($sp) \n\
+ stt $f11, 24*8($sp) \n\
+ stt $f12, 25*8($sp) \n\
+ stt $f13, 26*8($sp) \n\
+ stt $f14, 27*8($sp) \n\
+ stt $f15, 28*8($sp) \n\
+ stt $f16, 29*8($sp) \n\
+ stt $f17, 30*8($sp) \n\
+ stt $f18, 31*8($sp) \n\
+ stt $f19, 32*8($sp) \n\
+ stt $f20, 33*8($sp) \n\
+ stt $f21, 34*8($sp) \n\
+ stt $f22, 35*8($sp) \n\
+ stt $f23, 36*8($sp) \n\
+ stt $f24, 37*8($sp) \n\
+ stt $f25, 38*8($sp) \n\
+ stt $f26, 39*8($sp) \n\
+ stt $f27, 40*8($sp) \n\
+ stt $f28, 41*8($sp) \n\
+ stt $f29, 42*8($sp) \n\
+ stt $f30, 43*8($sp) \n\
+ .mask 0x27ff01ff, -44*8 \n\
+ .fmask 0xfffffc03, -(44-21)*8 \n\
+ /* Set up our $gp */ \n\
+ br $gp, .+4 \n\
+ ldgp $gp, 0($gp) \n\
+ .prologue 0 \n\
+ /* Set up the arguments for fixup: */ \n\
+ /* $16 = link_map out of plt0 */ \n\
+ /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */\n\
+ /* $18 = return address */ \n\
+ subq $28, $27, $17 \n\
+ ldq $16, 8($27) \n\
+ subq $17, 20, $17 \n\
+ mov $26, $18 \n\
+ addq $17, $17, $17 \n\
+ /* Do the fixup */ \n\
+ bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng\n\
+ /* Move the destination address into position. */ \n\
+ mov $0, $27 \n\
+ /* Restore program registers. */ \n\
+ ldq $26, 0*8($sp) \n\
+ ldq $0, 1*8($sp) \n\
+ ldq $1, 2*8($sp) \n\
+ ldq $2, 3*8($sp) \n\
+ ldq $3, 4*8($sp) \n\
+ ldq $4, 5*8($sp) \n\
+ ldq $5, 6*8($sp) \n\
+ ldq $6, 7*8($sp) \n\
+ ldq $7, 8*8($sp) \n\
+ ldq $8, 9*8($sp) \n\
+ ldq $16, 10*8($sp) \n\
+ ldq $17, 11*8($sp) \n\
+ ldq $18, 12*8($sp) \n\
+ ldq $19, 13*8($sp) \n\
+ ldq $20, 14*8($sp) \n\
+ ldq $21, 15*8($sp) \n\
+ ldq $22, 16*8($sp) \n\
+ ldq $23, 17*8($sp) \n\
+ ldq $24, 18*8($sp) \n\
+ ldq $25, 19*8($sp) \n\
+ ldq $29, 20*8($sp) \n\
+ ldt $f0, 21*8($sp) \n\
+ ldt $f1, 22*8($sp) \n\
+ ldt $f10, 23*8($sp) \n\
+ ldt $f11, 24*8($sp) \n\
+ ldt $f12, 25*8($sp) \n\
+ ldt $f13, 26*8($sp) \n\
+ ldt $f14, 27*8($sp) \n\
+ ldt $f15, 28*8($sp) \n\
+ ldt $f16, 29*8($sp) \n\
+ ldt $f17, 30*8($sp) \n\
+ ldt $f18, 31*8($sp) \n\
+ ldt $f19, 32*8($sp) \n\
+ ldt $f20, 33*8($sp) \n\
+ ldt $f21, 34*8($sp) \n\
+ ldt $f22, 35*8($sp) \n\
+ ldt $f23, 36*8($sp) \n\
+ ldt $f24, 37*8($sp) \n\
+ ldt $f25, 38*8($sp) \n\
+ ldt $f26, 39*8($sp) \n\
+ ldt $f27, 40*8($sp) \n\
+ ldt $f28, 41*8($sp) \n\
+ ldt $f29, 42*8($sp) \n\
+ ldt $f30, 43*8($sp) \n\
+ /* Flush the Icache after having modified the .plt code. */\n\
+ " #IMB " \n\
+ /* Clean up and turn control to the destination */ \n\
+ lda $sp, 44*8($sp) \n\
+ jmp $31, ($27) \n\
.end " #tramp_name)
#ifndef PROF
@@ -292,85 +294,87 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
its return value is the user program's entry point. */
#define RTLD_START asm ("\
-.text
- .set at
- .globl _start
- .ent _start
-_start:
- br $gp, 0f
-0: ldgp $gp, 0($gp)
- .prologue 0
- /* Pass pointer to argument block to _dl_start. */
- mov $sp, $16
- bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng
- .end _start
- /* FALLTHRU */
- .globl _dl_start_user
- .ent _dl_start_user
-_dl_start_user:
- .frame $30,0,$31,0
- .prologue 0
- /* Save the user entry point address in s0. */
- mov $0, $9
- /* Store the highest stack address. */
- stq $30, __libc_stack_end
- /* See if we were run as a command with the executable file
- name as an extra leading argument. */
- ldl $1, _dl_skip_args
- bne $1, $fixup_stack
-$fixup_stack_ret:
- /* The special initializer gets called with the stack just
- as the application's entry point will see it; it can
- switch stacks if it moves these contents over. */
-" RTLD_START_SPECIAL_INIT "
- /* Call _dl_init(_dl_loaded, argc, argv, envp) to run initializers. */
- ldq $16, _dl_loaded
- ldq $17, 0($sp)
- lda $18, 8($sp)
- s8addq $17, 8, $19
- addq $19, $18, $19
- jsr $26, _dl_init
- /* Pass our finalizer function to the user in $0. */
- lda $0, _dl_fini
- /* Jump to the user's entry point. */
- mov $9, $27
- jmp ($9)
-$fixup_stack:
- /* Adjust the stack pointer to skip _dl_skip_args words. This
- involves copying everything down, since the stack pointer must
- always be 16-byte aligned. */
- ldq $2, 0($sp)
- ldq $5, _dl_argv
- subq $31, $1, $6
- subq $2, $1, $2
- s8addq $6, $5, $5
- mov $sp, $4
- s8addq $1, $sp, $3
- stq $2, 0($sp)
- stq $5, _dl_argv
- /* Copy down argv. */
-0: ldq $5, 8($3)
- addq $4, 8, $4
- addq $3, 8, $3
- stq $5, 0($4)
- bne $5, 0b
- /* Copy down envp. */
-1: ldq $5, 8($3)
- addq $4, 8, $4
- addq $3, 8, $3
- stq $5, 0($4)
- bne $5, 1b
- /* Copy down auxiliary table. */
-2: ldq $5, 8($3)
- ldq $6, 16($3)
- addq $4, 16, $4
- addq $3, 16, $3
- stq $5, -8($4)
- stq $6, 0($4)
- bne $5, 2b
- br $fixup_stack_ret
- .end _dl_start_user
- .set noat
+.text \n\
+ .set at \n\
+ .globl _start \n\
+ .ent _start \n\
+_start: \n\
+ br $gp, 0f \n\
+0: ldgp $gp, 0($gp) \n\
+ .prologue 0 \n\
+ /* Pass pointer to argument block to _dl_start. */ \n\
+ mov $sp, $16 \n\
+ bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng \n\
+ .end _start \n\
+ /* FALLTHRU */ \n\
+ .globl _dl_start_user \n\
+ .ent _dl_start_user \n\
+_dl_start_user: \n\
+ .frame $30,0,$31,0 \n\
+ .prologue 0 \n\
+ /* Save the user entry point address in s0. */ \n\
+ mov $0, $9 \n\
+ /* Store the highest stack address. */ \n\
+ stq $30, __libc_stack_end \n\
+ /* See if we were run as a command with the executable \n\
+ file name as an extra leading argument. */ \n\
+ ldl $1, _dl_skip_args \n\
+ bne $1, $fixup_stack \n\
+$fixup_stack_ret: \n\
+ /* The special initializer gets called with the stack \n\
+ just as the application's entry point will see it; \n\
+ it can switch stacks if it moves these contents \n\
+ over. */ \n\
+" RTLD_START_SPECIAL_INIT " \n\
+ /* Call _dl_init(_dl_loaded, argc, argv, envp) to run \n\
+ initializers. */ \n\
+ ldq $16, _dl_loaded \n\
+ ldq $17, 0($sp) \n\
+ lda $18, 8($sp) \n\
+ s8addq $17, 8, $19 \n\
+ addq $19, $18, $19 \n\
+ jsr $26, _dl_init \n\
+ /* Pass our finalizer function to the user in $0. */ \n\
+ lda $0, _dl_fini \n\
+ /* Jump to the user's entry point. */ \n\
+ mov $9, $27 \n\
+ jmp ($9) \n\
+$fixup_stack: \n\
+ /* Adjust the stack pointer to skip _dl_skip_args words.\n\
+ This involves copying everything down, since the \n\
+ stack pointer must always be 16-byte aligned. */ \n\
+ ldq $2, 0($sp) \n\
+ ldq $5, _dl_argv \n\
+ subq $31, $1, $6 \n\
+ subq $2, $1, $2 \n\
+ s8addq $6, $5, $5 \n\
+ mov $sp, $4 \n\
+ s8addq $1, $sp, $3 \n\
+ stq $2, 0($sp) \n\
+ stq $5, _dl_argv \n\
+ /* Copy down argv. */ \n\
+0: ldq $5, 8($3) \n\
+ addq $4, 8, $4 \n\
+ addq $3, 8, $3 \n\
+ stq $5, 0($4) \n\
+ bne $5, 0b \n\
+ /* Copy down envp. */ \n\
+1: ldq $5, 8($3) \n\
+ addq $4, 8, $4 \n\
+ addq $3, 8, $3 \n\
+ stq $5, 0($4) \n\
+ bne $5, 1b \n\
+ /* Copy down auxiliary table. */ \n\
+2: ldq $5, 8($3) \n\
+ ldq $6, 16($3) \n\
+ addq $4, 16, $4 \n\
+ addq $3, 16, $3 \n\
+ stq $5, -8($4) \n\
+ stq $6, 0($4) \n\
+ bne $5, 2b \n\
+ br $fixup_stack_ret \n\
+ .end _dl_start_user \n\
+ .set noat \n\
.previous");
#ifndef RTLD_START_SPECIAL_INIT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6845b6741608ddac553065a7665d4795a9b5b4c
commit b6845b6741608ddac553065a7665d4795a9b5b4c
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Dec 12 09:02:09 2001 +0000
(elf_machine_rela): Fix typo in last patch.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index cda4247..73edd77 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -566,7 +566,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
newvalue = fix_bad_pc24(reloc_addr, value)
- - (Elf32_Addr)reloc_addr + (addend << 2);
+ - (Elf32_Addr)reloc_addr + (reloc->r_addend << 2);
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bcb5a520da93a21866233006feb20fc099384400
commit bcb5a520da93a21866233006feb20fc099384400
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 12 00:11:47 2001 +0000
(elf_machine_runtime_setup): Save original content of .got[1].
(ELF_MACHINE_NO_RELA): Only define if RTLD_BOOTSTRAP.
(ELF_MACHINE_PLT_REL): Define.
(elf_machine_rela, elf_machine_rela_relative): New.
(elf_machine_lazy_rel): Reinitialize R_ARM_JUMP_SLOT address instead
of adjusting it if prelinked and prelinking cannot be used.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2d802b7..cda4247 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -92,6 +92,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3],
and then jump to _GLOBAL_OFFSET_TABLE[2]. */
got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+ /* If a library is prelinked but we have to relocate anyway,
+ we have to be able to undo the prelinking of .got.plt.
+ The prelinker saved us here address of .plt. */
+ if (got[1])
+ l->l_mach.plt = got[1] + l->l_addr;
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* The got[2] entry contains the address of a function which gets
@@ -334,8 +339,9 @@ _dl_start_user:
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
-/* The ARM never uses Elf32_Rela relocations. */
-#define ELF_MACHINE_NO_RELA 1
+/* ARM never uses Elf32_Rela relocations for the dynamic linker.
+ Prelinked libraries may use Elf32_Rela though. */
+#define ELF_MACHINE_PLT_REL 1
/* We define an initialization functions. This is called very early in
_dl_sysdep_start. */
@@ -371,6 +377,12 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
#ifdef RESOLVE
+/* ARM never uses Elf32_Rela relocations for the dynamic linker.
+ Prelinked libraries may use Elf32_Rela though. */
+#ifdef RTLD_BOOTSTRAP
+#define ELF_MACHINE_NO_RELA 1
+#endif
+
extern char **_dl_argv;
/* Deal with an out-of-range PC24 reloc. */
@@ -517,6 +529,64 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
}
+#ifndef RTLD_BOOTSTRAP
+static inline void
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ Elf32_Addr *const reloc_addr)
+{
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+
+ if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
+ *reloc_addr = map->l_addr + reloc->r_addend;
+#ifndef RTLD_BOOTSTRAP
+ else if (__builtin_expect (r_type == R_ARM_NONE, 0))
+ return;
+#endif
+ else
+ {
+ const Elf32_Sym *const refsym = sym;
+ Elf32_Addr value = RESOLVE (&sym, version, r_type);
+ if (sym)
+ value += sym->st_value;
+
+ switch (r_type)
+ {
+ case R_ARM_GLOB_DAT:
+ case R_ARM_JUMP_SLOT:
+ case R_ARM_ABS32:
+ *reloc_addr = value + reloc->r_addend;
+ break;
+ case R_ARM_PC24:
+ {
+ Elf32_Addr newvalue, topbits;
+
+ newvalue = value + reloc->r_addend - (Elf32_Addr)reloc_addr;
+ topbits = newvalue & 0xfe000000;
+ if (topbits != 0xfe000000 && topbits != 0x00000000)
+ {
+ newvalue = fix_bad_pc24(reloc_addr, value)
+ - (Elf32_Addr)reloc_addr + (addend << 2);
+ topbits = newvalue & 0xfe000000;
+ if (topbits != 0xfe000000 && topbits != 0x00000000)
+ {
+ _dl_signal_error (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
+ }
+ }
+ newvalue >>= 2;
+ value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
+ *reloc_addr = value;
+ }
+ break;
+ default:
+ _dl_reloc_bad_type (map, r_type, 0);
+ break;
+ }
+ }
+}
+#endif
+
static inline void
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
Elf32_Addr *const reloc_addr)
@@ -524,6 +594,15 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
*reloc_addr += l_addr;
}
+#ifndef RTLD_BOOTSTRAP
+static inline void
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ *reloc_addr = l_addr + reloc->r_addend;
+}
+#endif
+
static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rel *reloc)
@@ -532,7 +611,12 @@ elf_machine_lazy_rel (struct link_map *map,
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
/* Check for unexpected PLT reloc type. */
if (__builtin_expect (r_type == R_ARM_JUMP_SLOT, 1))
- *reloc_addr += l_addr;
+ {
+ if (__builtin_expect (map->l_mach.plt, 0) == 0)
+ *reloc_addr += l_addr;
+ else
+ *reloc_addr = map->l_mach.plt;
+ }
else
_dl_reloc_bad_type (map, r_type, 1);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef5f0af552ba4df453312b02ebedbbbf4bdbaaa3
commit ef5f0af552ba4df453312b02ebedbbbf4bdbaaa3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 12 00:11:15 2001 +0000
Arm specific additions to struct link.
diff --git a/sysdeps/arm/bits/link.h b/sysdeps/arm/bits/link.h
new file mode 100644
index 0000000..648976d
--- /dev/null
+++ b/sysdeps/arm/bits/link.h
@@ -0,0 +1,4 @@
+struct link_map_machine
+ {
+ Elf32_Addr plt; /* Address of .plt */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d70bbfe3bec9fa9a1402d76f8b8a1316d96183dd
commit d70bbfe3bec9fa9a1402d76f8b8a1316d96183dd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 12 00:10:27 2001 +0000
(elf_machine_runtime_setup): Reinitialize
.plt for prelinked libraries where prelinking info cannot be used.
(elf_machine_rela): If relocating R_ALPHA_JMP_SLOT in .gnu.conflict
section, use RESOLVE_CONFLICT_FIND_MAP to find out reloc's link_map.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a039f24..c93da66 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -122,8 +122,30 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
*(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
/* If the first instruction of the plt entry is not
- "br $28, plt0", we cannot do lazy relocation. */
- lazy = (*(unsigned int *)(plt + 32) == 0xc39ffff7);
+ "br $28, plt0", we have to reinitialize .plt for lazy relocation. */
+ if (*(unsigned int *)(plt + 32) != 0xc39ffff7)
+ {
+ unsigned int val = 0xc39ffff7;
+ unsigned int *slot, *end;
+ const Elf64_Rela *rela = D_PTR (l, l_info[DT_JMPREL]);
+ Elf64_Addr l_addr = l->l_addr;
+
+ /* br t12,.+4; ldq t12,12(t12); nop; jmp t12,(t12),.+4 */
+ *(unsigned long *)plt = 0xa77b000cc3600000;
+ *(unsigned long *)(plt + 8) = 0x6b7b000047ff041f;
+ slot = (unsigned int *)(plt + 32);
+ end = (unsigned int *)(plt + 32
+ + l->l_info[DT_PLTRELSZ]->d_un.d_val / 2);
+ while (slot < end)
+ {
+ /* br at,.plt+0 */
+ *slot = val;
+ *(Elf64_Addr *) rela->r_offset = (Elf64_Addr) slot - l_addr;
+ val -= 3;
+ slot += 3;
+ ++rela;
+ }
+ }
}
return lazy;
@@ -520,8 +542,23 @@ elf_machine_rela (struct link_map *map,
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
- else if (r_type == R_ALPHA_JMP_SLOT)
+#ifdef RESOLVE_CONFLICT_FIND_MAP
+ /* In .gnu.conflict section, R_ALPHA_JMP_SLOT relocations have
+ R_ALPHA_JMP_SLOT in lower 8 bits and the remaining 24 bits
+ are .rela.plt index. */
+ else if ((r_type & 0xff) == R_ALPHA_JMP_SLOT)
+ {
+ /* elf_machine_fixup_plt needs the map reloc_addr points into,
+ while in _dl_resolve_conflicts map is _dl_loaded. */
+ RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr);
+ reloc = ((const Elf64_Rela *) D_PTR (map, l_info[DT_JMPREL]))
+ + (r_type >> 8);
+ elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+ }
+#else
+ else if (r_type == R_ALPHA_JMP_SLOT)
elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+#endif
#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90a0de032a66d57d13508f2f3883dd106da8abef
commit 90a0de032a66d57d13508f2f3883dd106da8abef
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 26 08:37:35 2001 +0000
Remove __brk_addr alias, avoid warning.
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
index b534b17..a4b4df2 100644
--- a/sysdeps/unix/sysv/linux/hppa/brk.c
+++ b/sysdeps/unix/sysv/linux/hppa/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/HPPA.
- Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,17 +24,12 @@
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
-/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
- to work around different old braindamage in the old Linux ELF dynamic
- linker. */
-weak_alias (__curbrk, ___brk_addr)
-
int
__brk (void *addr)
{
void *newbrk;
- __curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr);
+ __curbrk = newbrk = (void *) INLINE_SYSCALL (brk, 1, addr);
if (newbrk < addr)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=decdce5e7c400d1dd0f8564642f50c36cc24bff1
commit decdce5e7c400d1dd0f8564642f50c36cc24bff1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:24:04 2001 +0000
(sysdep-routines): Add framestate.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 62536ae..5c04677 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -23,3 +23,11 @@ ifeq ($(subdir),signal)
sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending
endif
+
+ifeq ($(subdir),elf)
+ifeq (yes,$(build-shared))
+# This is needed to support g++ v2 and v3.
+sysdep_routines += framestate
+shared-only-routines += framestate
+endif
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index aeaaa39..66a93ba 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -19,4 +19,10 @@ sysdep-dl-routines += dl-procinfo
sysdep_routines += dl-procinfo
# extra shared linker files to link only into dl-allobjs.so
sysdep-rtld-routines += dl-procinfo
+
+ifeq (yes,$(build-shared))
+# This is needed to support g++ v2 and v3.
+sysdep_routines += framestate
+shared-only-routines += framestate
+endif
endif
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 55eeeab..83ea370 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -10,6 +10,12 @@ endif
ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
+
+ifeq (yes,$(build-shared))
+# This is needed to support g++ v2 and v3.
+sysdep_routines += framestate
+shared-only-routines += framestate
+endif
endif
ifeq ($(subdir),resource)
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 1f9fc2d..e46cfef 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -9,3 +9,11 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
endif
+
+ifeq ($(subdir),elf)
+ifeq (yes,$(build-shared))
+# This is needed to support g++ v2 and v3.
+sysdep_routines += framestate
+shared-only-routines += framestate
+endif
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bfdd6609c500814cd604460017214948628849d
commit 9bfdd6609c500814cd604460017214948628849d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:22:33 2001 +0000
(__register_frame_info, __deregister_frame_info): Move to elf/Versions.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index d89ef6a..c18816c 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -6,8 +6,7 @@ libc {
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;
- __register_frame_info; __deregister_frame_info; __frame_state_for;
- __register_frame_info_table;
+ __frame_state_for; __register_frame_info_table;
# b*
bus_base; bus_base_sparse;
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index aeda9fa..32cb185 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -2,8 +2,7 @@ libc {
GLIBC_2.0 {
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;
- __register_frame_info; __deregister_frame_info; __frame_state_for;
- __register_frame_info_table;
+ __frame_state_for; __register_frame_info_table;
}
GLIBC_2.1 {
ioperm; iopl;
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index 6c650e2..0799bf3 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -2,8 +2,7 @@ libc {
GLIBC_2.0 {
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;
- __register_frame_info; __deregister_frame_info; __frame_state_for;
- __register_frame_info_table;
+ __frame_state_for; __register_frame_info_table;
# c*
cacheflush;
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index d65bf18..f71d9b5 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -2,8 +2,7 @@ libc {
GLIBC_2.0 {
# Exception handling support functions from libgcc
__register_frame; __register_frame_table; __deregister_frame;
- __register_frame_info; __deregister_frame_info; __frame_state_for;
- __register_frame_info_table;
+ __frame_state_for; __register_frame_info_table;
# Needed by gcc:
_flush_cache;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=816763d76a19946824c1518deb25e0bf209feab4
commit 816763d76a19946824c1518deb25e0bf209feab4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:14:52 2001 +0000
GCC frame description for VAX.
diff --git a/sysdeps/vax/gccframe.h b/sysdeps/vax/gccframe.h
new file mode 100644
index 0000000..323d511
--- /dev/null
+++ b/sysdeps/vax/gccframe.h
@@ -0,0 +1,22 @@
+/* Definition of object in frame unwind info. vax version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define DWARF_FRAME_REGISTERS 16
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=532e4e4b65ba45a15bff60ba2d3f1e3ddd07fa29
commit 532e4e4b65ba45a15bff60ba2d3f1e3ddd07fa29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:12:04 2001 +0000
GCC frame description for MIPS.
diff --git a/sysdeps/mips/gccframe.h b/sysdeps/mips/gccframe.h
new file mode 100644
index 0000000..ec9311c
--- /dev/null
+++ b/sysdeps/mips/gccframe.h
@@ -0,0 +1,22 @@
+/* Definition of object in frame unwind info. mips version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define FIRST_PSEUDO_REGISTER 76
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03012549bd3408b5b72026a94d596f133086b000
commit 03012549bd3408b5b72026a94d596f133086b000
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:11:16 2001 +0000
GCC frame description for m68k.
diff --git a/sysdeps/m68k/gccframe.h b/sysdeps/m68k/gccframe.h
new file mode 100644
index 0000000..452f53f
--- /dev/null
+++ b/sysdeps/m68k/gccframe.h
@@ -0,0 +1,22 @@
+/* Definition of object in frame unwind info. m68k version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define FIRST_PSEUDO_REGISTER 24
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b72b3cc5af1b32c96d4b36949a761dded0eca503
commit b72b3cc5af1b32c96d4b36949a761dded0eca503
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:07:57 2001 +0000
GCC frame description for PA.
diff --git a/sysdeps/hppa/gccframe.h b/sysdeps/hppa/gccframe.h
new file mode 100644
index 0000000..65e44df
--- /dev/null
+++ b/sysdeps/hppa/gccframe.h
@@ -0,0 +1,23 @@
+/* Definition of object in frame unwind info. hppa version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Note: For hppa64 this is 61 */
+#define DWARF_FRAME_REGISTERS 89
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee448304d68ead71a666fa5d8553362980bb41f8
commit ee448304d68ead71a666fa5d8553362980bb41f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:07:20 2001 +0000
GCC frame description for Arm.
diff --git a/sysdeps/arm/gccframe.h b/sysdeps/arm/gccframe.h
new file mode 100644
index 0000000..ef8df26
--- /dev/null
+++ b/sysdeps/arm/gccframe.h
@@ -0,0 +1,22 @@
+/* Definition of object in frame unwind info. arm version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define FIRST_PSEUDO_REGISTER 27
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=89a817b0877b97fc93792f2387ad9b29c338fb7c
commit 89a817b0877b97fc93792f2387ad9b29c338fb7c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 16 01:06:40 2001 +0000
GCC frame description for Alpha.
diff --git a/sysdeps/alpha/gccframe.h b/sysdeps/alpha/gccframe.h
new file mode 100644
index 0000000..b670225
--- /dev/null
+++ b/sysdeps/alpha/gccframe.h
@@ -0,0 +1,22 @@
+/* Definition of object in frame unwind info. alpha version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define FIRST_PSEUDO_REGISTER 64
+
+#include <sysdeps/generic/gccframe.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ffd88164dcad8dc9620c3d2cb3aa9bd154af1a7b
commit ffd88164dcad8dc9620c3d2cb3aa9bd154af1a7b
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Nov 9 19:57:55 2001 +0000
New file to fix RLIM_INFINITY.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/resource.h b/sysdeps/unix/sysv/linux/m68k/bits/resource.h
new file mode 100644
index 0000000..e6fa04a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/resource.h
@@ -0,0 +1,209 @@
+/* Bit values & structures for resource limits. Linux/m68k version.
+ Copyright (C) 1994,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 7,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit. */
+ RLIMIT_AS = 9,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIMIT_NLIMITS = 11,
+ RLIM_NLIMITS = RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
+#else
+# define RLIM_INFINITY 0xffffffffffffffffuLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80ad17cac244c108fdccbe2fd10eaed91aa71e6c
commit 80ad17cac244c108fdccbe2fd10eaed91aa71e6c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 27 00:03:32 2001 +0000
(DL_CALL_FCT): Cast to void *.
Use __BEGIN_DECLS/__END_DECLS around prototypes.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 2380caa..c5b4c59 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,8 +52,13 @@
foo = DL_CALL_FCT (fctp, (arg1, arg2));
*/
# define DL_CALL_FCT(fctp, args) \
- (_dl_mcount_wrapper_check (fctp), (*(fctp)) args)
+ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
+
+__BEGIN_DECLS
/* This function calls the profiling functions. */
extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+
+__END_DECLS
+
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dcac2c1ec862e6e3417a27154a2dbcd75a0e5cb7
commit dcac2c1ec862e6e3417a27154a2dbcd75a0e5cb7
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 16 20:21:38 2001 +0000
Updated for fixed cbrtl implementation.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index a7372ab..c6c3ffa 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -144,22 +144,11 @@ ldouble: 1
# cbrt
Test "cbrt (-0.001) == -0.1":
-ildouble: 102
-ldouble: 102
-Test "cbrt (-27.0) == -3.0":
-ildouble: 948
-ldouble: 948
+ildouble: 1
+ldouble: 1
Test "cbrt (0.7) == 0.8879040017426007084":
double: 1
idouble: 1
-ildouble: 345
-ldouble: 345
-Test "cbrt (0.970299) == 0.99":
-ildouble: 142
-ldouble: 142
-Test "cbrt (8) == 2":
-ildouble: 191
-ldouble: 191
# ccos
Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
@@ -241,9 +230,9 @@ double: 1
idouble: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
-float: 0.5
+float: 1
idouble: 1
-ifloat: 0.5
+ifloat: 1
ildouble: 1
ldouble: 1
Test "cos (M_PI_6l * 4.0) == -0.5":
@@ -254,12 +243,12 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "cos (pi/2) == 0":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
-ildouble: 0.25
-ldouble: 0.25
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
# cosh
Test "cosh (0.7) == 1.255169005630943018":
@@ -283,13 +272,13 @@ ifloat: 6
ildouble: 2
ldouble: 2
Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
-float: 0.5
-ifloat: 0.5
+float: 1
+ifloat: 1
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
-double: 1.1031
-float: 2.5333
-idouble: 1.1031
-ifloat: 2.5333
+double: 2
+float: 3
+idouble: 2
+ifloat: 3
ildouble: 1
ldouble: 1
@@ -353,8 +342,8 @@ Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.00988437
ildouble: 25
ldouble: 25
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
-double: 0.5
-idouble: 0.5
+double: 1
+idouble: 1
Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
float: 1
ifloat: 1
@@ -632,8 +621,8 @@ Test "log (2) == M_LN2l":
ildouble: 1
ldouble: 1
Test "log (e) == 1":
-float: 0.5
-ifloat: 0.5
+float: 1
+ifloat: 1
# log10
Test "log10 (0.7) == -0.15490195998574316929":
@@ -682,9 +671,9 @@ double: 1
idouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
-float: 0.5
+float: 1
idouble: 1
-ifloat: 0.5
+ifloat: 1
ildouble: 1
ldouble: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
@@ -695,12 +684,12 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
-double: 0.2758
-float: 0.3667
-idouble: 0.2758
-ifloat: 0.3667
-ildouble: 0.25
-ldouble: 0.25
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
# sinh
Test "sinh (0.7) == 0.75858370183953350346":
@@ -712,8 +701,8 @@ Test "tan (0.7) == 0.84228838046307944812813500221293775":
ildouble: 1
ldouble: 1
Test "tan (pi/4) == 1":
-double: 0.5
-idouble: 0.5
+double: 1
+idouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
@@ -988,8 +977,8 @@ ldouble: 1
Function: "cbrt":
double: 1
idouble: 1
-ildouble: 948
-ldouble: 948
+ildouble: 1
+ldouble: 1
Function: Real part of "ccos":
float: 1
@@ -1064,9 +1053,9 @@ ildouble: 5
ldouble: 5
Function: Imaginary part of "cpow":
-double: 1.1031
+double: 2
float: 6
-idouble: 1.1031
+idouble: 2
ifloat: 6
ildouble: 2
ldouble: 2
@@ -1238,8 +1227,8 @@ float: 1
ifloat: 1
Function: "tan":
-double: 0.5
-idouble: 0.5
+double: 1
+idouble: 1
ildouble: 1
ldouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dfc1be7af0c5c28db0118a6af9b2462ca99e7fda
commit dfc1be7af0c5c28db0118a6af9b2462ca99e7fda
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 16 15:31:18 2001 +0000
Fix braino in last change.
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 80672ad..19aa131 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -22,9 +22,11 @@
int
#if defined BSD_SETJMP
# undef setjmp
+# define savemask 1
setjmp (jmp_buf env)
#elif defined BSD__SETJMP
# undef _setjmp
+# define savemask 0
_setjmp (jmp_buf env)
#else
__sigsetjmp (jmp_buf env, int savemask)
@@ -53,10 +55,6 @@ __sigsetjmp (jmp_buf env, int savemask)
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
-#if defined BSD_SETJMP || defined BSD__SETJMP
- return 0;
-#else
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
-#endif
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c70d76bb8e489b6a6855a43fd92cf66f0f6b249b
commit c70d76bb8e489b6a6855a43fd92cf66f0f6b249b
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 16 14:20:17 2001 +0000
* sysdeps/m68k/setjmp.c: Also define setjmp and _setjmp if
BSD_SETJMP or BSD__SETJMP is defined, resp.
* sysdeps/m68k/bsd-setjmp.c: Inline setjmp code instead of making
a tail call to __sigsetjmp that would require extending the
caller's frame.
* sysdeps/m68k/bsd-_setjmp.c: Likewise.
* sysdeps/m68k/bsd-setjmp.S: Deleted.
* sysdeps/m68k/bsd-_setjmp.S: Deleted.
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
deleted file mode 100644
index a0e32bd..0000000
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- in setjmp doesn't clobber the state restored by longjmp. */
-
-#include <sysdep.h>
-
-#ifdef MOTOROLA_SYNTAX
-#define d0 %d0
-#define d1 %d1
-#define PUSH(reg) move.l reg, -(%sp)
-#define POP(reg) move.l (%sp)+, reg
-#define PUSH0 clr.l -(%sp)
-#else
-#define PUSH(reg) movel reg, sp@-
-#define POP(reg) movel sp@+, reg
-#define PUSH0 clrl sp@-
-#endif
-
-ENTRY (_setjmp)
- POP (d0) /* Pop return PC. */
- POP (d1) /* Pop jmp_buf argument. */
- PUSH0 /* Push second argument of zero. */
- PUSH (d1) /* Push back first argument. */
- PUSH (d0) /* Push back return PC. */
-#ifdef PIC
- bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC)
-#else
- jmp C_SYMBOL_NAME (__sigsetjmp)
-#endif
-END (_setjmp)
diff --git a/sysdeps/m68k/bsd-_setjmp.c b/sysdeps/m68k/bsd-_setjmp.c
new file mode 100644
index 0000000..ee2964e
--- /dev/null
+++ b/sysdeps/m68k/bsd-_setjmp.c
@@ -0,0 +1,21 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version.
+ Copyright (C) 1994, 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define BSD__SETJMP
+#include <sysdeps/m68k/setjmp.c>
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
deleted file mode 100644
index e146247..0000000
--- a/sysdeps/m68k/bsd-setjmp.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- in setjmp doesn't clobber the state restored by longjmp. */
-
-#include <sysdep.h>
-
-#ifdef MOTOROLA_SYNTAX
-#define d0 %d0
-#define d1 %d1
-#define PUSH(reg) move.l reg, -(%sp)
-#define POP(reg) move.l (%sp)+, reg
-#else
-#define PUSH(reg) movel reg, sp@-
-#define POP(reg) movel sp@+, reg
-#endif
-
-ENTRY (setjmp)
- POP (d0) /* Pop return PC. */
- POP (d1) /* Pop jmp_buf argument. */
- pea 1 /* Push second argument of one. */
- PUSH (d1) /* Push back first argument. */
- PUSH (d0) /* Push back return PC. */
-#ifdef PIC
- bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC)
-#else
- jmp C_SYMBOL_NAME (__sigsetjmp)
-#endif
-END (setjmp)
diff --git a/sysdeps/m68k/bsd-setjmp.c b/sysdeps/m68k/bsd-setjmp.c
new file mode 100644
index 0000000..59b5acf
--- /dev/null
+++ b/sysdeps/m68k/bsd-setjmp.c
@@ -0,0 +1,21 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version.
+ Copyright (C) 1994, 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define BSD_SETJMP
+#include <sysdeps/m68k/setjmp.c>
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 0456862..80672ad 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,15 @@
/* Save the current program position in ENV and return 0. */
int
+#if defined BSD_SETJMP
+# undef setjmp
+setjmp (jmp_buf env)
+#elif defined BSD__SETJMP
+# undef _setjmp
+_setjmp (jmp_buf env)
+#else
__sigsetjmp (jmp_buf env, int savemask)
+#endif
{
/* Save data registers D1 through D7. */
asm volatile ("movem%.l %/d1-%/d7, %0"
@@ -39,12 +47,16 @@ __sigsetjmp (jmp_buf env, int savemask)
/* Save caller's SP, not our own. */
env[0].__jmpbuf[0].__sp = (void *) &env;
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __HAVE_FPU__
/* Save floating-point (68881) registers FP0 through FP7. */
asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
+#if defined BSD_SETJMP || defined BSD__SETJMP
+ return 0;
+#else
/* Save the signal mask if requested. */
return __sigjmp_save (env, savemask);
+#endif
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35b1d4b18efa11251adaaeca25f3b2983147734e
commit 35b1d4b18efa11251adaaeca25f3b2983147734e
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 15 11:56:11 2001 +0000
Make sysmips() prototype a varargs prototype. Remove dependency from kernel header files.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
index 642a316..0677caf 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,14 +22,21 @@
#include <features.h>
/*
- * Get the kernel definition for sysmips(2)
+ * Commands for the sysmips(2) call
+ *
+ * sysmips(2) is deprecated - though some existing software uses it.
+ * We only support the following commands. Sysmips exists for compatibility
+ * purposes only so new software should avoid it.
*/
-#include <asm/sysmips.h>
+#define SETNAME 1 /* set hostname */
+#define FLUSH_CACHE 3 /* writeback and invalidate caches */
+#define MIPS_FIXADE 7 /* control address error fixing */
+#define MIPS_RDNVRAM 10 /* read NVRAM */
+#define MIPS_ATOMIC_SET 2001 /* atomically set variable */
__BEGIN_DECLS
-extern int sysmips (__const int cmd, __const int arg1,
- __const int arg2, __const int arg3) __THROW;
+extern int sysmips (__const int cmd, ...) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f255cc121833849a9cc0fb112c898db14601d749
commit f255cc121833849a9cc0fb112c898db14601d749
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 15 11:55:20 2001 +0000
General cleanup, use __USE_MISC / __USE_XOPEN not __USE_BSD where appropriate.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index 87d0eae..546faa0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -25,40 +25,6 @@ typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-
-#ifdef __USE_BSD
-
-struct sgttyb
- {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- int sg_flags; /* SGI special - int, not short */
- };
-
-struct tchars
- {
- char t_intrc;
- char t_quitc;
- char t_startc;
- char t_stopc;
- char t_eofc;
- char t_brkc;
- };
-
-struct ltchars
- {
- char t_suspc; /* stop process signal */
- char t_dsuspc; /* delayed stop process signal */
- char t_rprntc; /* reprint line */
- char t_flushc; /* flush output (toggles) */
- char t_werasc; /* word erase */
- char t_lnextc; /* literal next character */
- };
-
-#endif /* defined(__BSD) */
-
#define NCCS 32
struct termios
{
@@ -66,44 +32,31 @@ struct termios
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
- cc_t c_line; /* line discipline */
+ cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
};
/* c_cc characters */
-#define VINTR 0 /* Interrupt character [ISIG]. */
-#define VQUIT 1 /* Quit character [ISIG]. */
-#define VERASE 2 /* Erase character [ICANON]. */
-#define VKILL 3 /* Kill-line character [ICANON]. */
-#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
-#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
-#ifdef __USE_BSD
-# define VEOL2 6 /* Second EOL character [ICANON]. */
-/* The next two are guesses ... */
-# define VSWTC 7 /* ??? */
-#endif
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VERASE 2 /* Erase character [ICANON]. */
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTC 7
#define VSWTCH VSWTC
-#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
-#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
-#define VSUSP 10 /* Suspend character [ISIG]. */
-#if 0
-/*
- * VDSUSP is not supported
- */
-#if defined __USE_BSD
-# define VDSUSP 11 /* Delayed suspend character [ISIG]. */
-#endif
-#endif
-#ifdef __USE_BSD
-# define VREPRINT 12 /* Reprint-line character [ICANON]. */
-#endif
-#ifdef __USE_BSD
-# define VDISCARD 13 /* Discard character [IEXTEN]. */
-# define VWERASE 14 /* Word-erase character [ICANON]. */
-# define VLNEXT 15 /* Literal-next character [IEXTEN]. */
-#endif
-#define VEOF 16 /* End-of-file character [ICANON]. */
-#define VEOL 17 /* End-of-line character [ICANON]. */
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+ /* VDSUSP is not supported on Linux. */
+/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VEOF 16 /* End-of-file character [ICANON]. */
+#define VEOL 17 /* End-of-line character [ICANON]. */
/* c_iflag bits */
#define IGNBRK 0000001 /* Ignore break condition. */
@@ -115,28 +68,22 @@ struct termios
#define INLCR 0000100 /* Map NL to CR on input. */
#define IGNCR 0000200 /* Ignore CR. */
#define ICRNL 0000400 /* Map CR to NL on input. */
-#ifdef __USE_BSD
-# define IUCLC 0001000 /* Map upper case to lower case on input. */
-#endif
+#define IUCLC 0001000 /* Map upper case to lower case on input. */
#define IXON 0002000 /* Enable start/stop output control. */
-#ifdef __USE_BSD
-# define IXANY 0004000 /* Any character will restart after stop. */
-#endif
+#define IXANY 0004000 /* Any character will restart after stop. */
#define IXOFF 0010000 /* Enable start/stop input control. */
-#ifdef __USE_BSD
-# define IMAXBEL 0020000 /* Ring bell when input queue is full. */
-#endif
+#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
/* c_oflag bits */
#define OPOST 0000001 /* Perform output processing. */
-#ifdef __USE_BSD
-# define OLCUC 0000002 /* Map lower case to upper case on output. */
-# define ONLCR 0000004 /* Map NL to CR-NL on output. */
-# define OCRNL 0000010
-# define ONOCR 0000020
-# define ONLRET 0000040
-# define OFILL 0000100
-# define OFDEL 0000200
+#define OLCUC 0000002 /* Map lower case to upper case on output. */
+#define ONLCR 0000004 /* Map NL to CR-NL on output. */
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+#if defined __USE_MISC || defined __USE_XOPEN
# define NLDLY 0000400
# define NL0 0000000
# define NL1 0000400
@@ -150,24 +97,26 @@ struct termios
# define TAB1 0004000
# define TAB2 0010000
# define TAB3 0014000
-# define XTABS 0014000
# define BSDLY 0020000
# define BS0 0000000
# define BS1 0020000
-# define VTDLY 0040000
-# define VT0 0000000
-# define VT1 0040000
# define FFDLY 0100000
# define FF0 0000000
# define FF1 0100000
-/*
-#define PAGEOUT ???
-#define WRAP ???
- */
+#endif
+
+#define VTDLY 0040000
+#define VT0 0000000
+#define VT1 0040000
+
+#ifdef __USE_MISC
+# define XTABS 0014000
#endif
/* c_cflag bit meaning */
-#define CBAUD 0010017
+#ifdef __USE_MISC
+# define CBAUD 0010017
+#endif
#define B0 0000000 /* hang up */
#define B50 0000001
#define B75 0000002
@@ -184,8 +133,10 @@ struct termios
#define B9600 0000015
#define B19200 0000016
#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
+#ifdef __USE_MISC
+# define EXTA B19200
+# define EXTB B38400
+#endif
#define CSIZE 0000060 /* Number of bits per byte (mask). */
#define CS5 0000000 /* 5 bits per byte. */
#define CS6 0000020 /* 6 bits per byte. */
@@ -197,24 +148,26 @@ struct termios
#define PARODD 0001000 /* Odd parity instead of even. */
#define HUPCL 0002000 /* Hang up on last close. */
#define CLOCAL 0004000 /* Ignore modem status lines. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define CBAUDEX 0010000
-# define B57600 0010001
-# define B115200 0010002
-# define B230400 0010003
-# define B460800 0010004
-# define B500000 0010005
-# define B576000 0010006
-# define B921600 0010007
-# define B1000000 0010010
-# define B1152000 0010011
-# define B1500000 0010012
-# define B2000000 0010013
-# define B2500000 0010014
-# define B3000000 0010015
-# define B3500000 0010016
-# define B4000000 0010017
-# define __MAX_BAUD B4000000
+#endif
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+#define B500000 0010005
+#define B576000 0010006
+#define B921600 0010007
+#define B1000000 0010010
+#define B1152000 0010011
+#define B1500000 0010012
+#define B2000000 0010013
+#define B2500000 0010014
+#define B3000000 0010015
+#define B3500000 0010016
+#define B4000000 0010017
+#define __MAX_BAUD B4000000
+#ifdef __USE_MISC
# define CIBAUD 002003600000 /* input baud rate (not used) */
# define CRTSCTS 020000000000 /* flow control */
#endif
@@ -222,20 +175,20 @@ struct termios
/* c_lflag bits */
#define ISIG 0000001 /* Enable signals. */
#define ICANON 0000002 /* Do erase and kill processing. */
-#define XCASE 0000004
+#if defined __USE_MISC || defined __USE_XOPEN
+# define XCASE 0000004
+#endif
#define ECHO 0000010 /* Enable echo. */
#define ECHOE 0000020 /* Visual erase for ERASE. */
#define ECHOK 0000040 /* Echo NL after KILL. */
#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
#define NOFLSH 0000200 /* Disable flush after interrupt. */
#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define ECHOCTL 0001000 /* Echo control characters as ^X. */
# define ECHOPRT 0002000 /* Hardcopy visual erase. */
# define ECHOKE 0004000 /* Visual erase for KILL. */
-#endif
-#define FLUSHO 0020000
-#ifdef __USE_BSD
+# define FLUSHO 0020000
# define PENDIN 0040000 /* Retype pending input (state). */
#endif
#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=916ea7e833299175911244898bf6665aaea7c166
commit 916ea7e833299175911244898bf6665aaea7c166
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 26 05:23:10 2001 +0000
(struct cmsghdr): Don't declare __cmsg_data field if its size would be bigger
than 0.
(CMSG_DATA): Adjust accordingly.
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
index 45877fa..1fdadfe 100644
--- a/sysdeps/unix/sysv/aix/bits/socket.h
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -203,14 +203,13 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
- unsigned char __cmsg_data[0]; /* Ancillary data. */
- /* XXX Perhaps this should be removed. */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+ __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
#endif
};
/* Ancillary data object manipulation macros. */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
#else
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
index 2d57128..82c4302 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
@@ -233,12 +233,13 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
__extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
- /* XXX Perhaps this should be removed. */
+#endif
};
/* Ancillary data object manipulation macros. */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
#else
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 482eefe..a10c3a7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -233,12 +233,13 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
__extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
- /* XXX Perhaps this should be removed. */
+#endif
};
/* Ancillary data object manipulation macros. */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
#else
# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8755441d32dec7eb305bdfe8eb50a8712c265f2c
commit 8755441d32dec7eb305bdfe8eb50a8712c265f2c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 22 21:32:57 2001 +0000
(elf_machine_load_address): Compute the difference between base address and
first PT_LOAD's virtual address, not the base address.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 2a414ca..a039f24 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -70,16 +70,20 @@ elf_machine_load_address (void)
Elf64_Addr dot;
long int zero_disp;
- asm("br %0, 1f\n\t"
- ".weak __load_address_undefined\n\t"
- "br $0, __load_address_undefined\n"
- "1:"
+ asm("br %0, 1f\n"
+ "0:\n\t"
+ "br $0, 2f\n"
+ "1:\n\t"
+ ".data\n"
+ "2:\n\t"
+ ".quad 0b\n\t"
+ ".previous"
: "=r"(dot));
- zero_disp = *(int *)dot;
+ zero_disp = *(int *) dot;
zero_disp = (zero_disp << 43) >> 41;
- return dot + 4 + zero_disp;
+ return dot - *(Elf64_Addr *) (dot + 4 + zero_disp);
}
/* Set up the loaded object described by L so its unrelocated PLT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=177ac300b9ed6d3515994c245b2528dd4745ec78
commit 177ac300b9ed6d3515994c245b2528dd4745ec78
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 22 21:28:25 2001 +0000
Add real implementation.
diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c
index 2dfc025..1184664 100644
--- a/sysdeps/unix/sysv/aix/libc-start.c
+++ b/sysdeps/unix/sysv/aix/libc-start.c
@@ -1 +1,296 @@
-/* stub libc-start.c */
+/* Initialization code run first thing by the XCOFF startup code. AIX version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* hack to use uchar's */
+typedef unsigned char uchar;
+#include <xcoff.h>
+#include <rtinit.h>
+#include <dlldr.h>
+#include <bits/libc-lock.h>
+
+extern void __libc_init_first (int argc, char **argv, char **envp);
+
+/* XXX disable for now
+extern int _dl_starting_up;
+weak_extern (_dl_starting_up)
+extern int __libc_multiple_libcs; */
+
+/* XXX normally defined in generic/dl-sydep.c, hack it into existance
+extern void *__libc_stack_end; */
+void *__libc_stack_end;
+
+ struct __libc_start_data_rec {
+ void *stack;
+ void *toc;
+ int argc;
+ char **argv;
+ char **envp;
+ char *data;
+ char *text;
+ unsigned mcount;
+ unsigned special;
+ int (*main)(int, char **, char **);
+ void (*init)(void);
+ void (*fini)(void);
+ void (*rtld_fini)(void);
+ };
+
+extern struct __libc_start_data_rec __libc_start_data;
+extern int errno;
+
+/* The first piece of initialized data. */
+int __data_start = 0;
+
+#ifndef HAVE_ELF
+/* Since gcc/crtstuff.c won't define it unless the ELF format is used
+ we will need to define it here. */
+void *__dso_handle = NULL;
+#endif
+
+/* AIX kernel function */
+extern int __loadx (int flag, void *module, void *arg1, void *arg2,
+ void *arg3);
+/* Needed by setenv */
+char **__environ;
+
+/* Needed by dl-support.c */
+/* XXX stubbing out dl-support.c for now..
+ size_t _dl_pagesize = 0; */
+
+/*
+ * Find __rtinit symbol
+ *
+ * __RTINIT *find_rtinit()
+ *
+ * __RTINIT *rti - pointer to __rtinit data structure
+ */
+
+static __RTINIT *
+find_rtinit (void)
+{
+ struct xcoffhdr *xcoff_hdr;
+ SCNHDR *sec_hdr;
+ SCNHDR *ldr_sec_hdr;
+ SCNHDR *data_sec_hdr;
+ LDSYM *ldsym_hdr;
+ __RTINIT *rtl;
+
+ xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text;
+ sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr
+ + xcoff_hdr->filehdr.f_opthdr);
+ ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1));
+ ldsym_hdr = (LDSYM *) ((caddr_t) xcoff_hdr + ldr_sec_hdr->s_scnptr
+ + LDHDRSZ);
+
+ if (__libc_start_data.mcount <= 0)
+ {
+ if (!ldr_sec_hdr->s_scnptr)
+ return NULL;
+
+ if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof(RTINIT_NAME) - 1) != 0)
+ return NULL;
+ }
+
+ data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1));
+ rtl = (__RTINIT *) (ldsym_hdr->l_value
+ + (__libc_start_data.data - data_sec_hdr->s_vaddr));
+ return rtl;
+}
+
+/* The mod_init1 calls every initialization function
+ for a given module.
+
+ void mod_init1(handler, rti)
+
+ void *handler - if NULL init funtions for modules loaded at exec time
+ are being executed. Otherwise, the handler points to the
+ module loaded.
+
+ __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset
+ not equal to zero)
+ */
+
+static void
+mod_init1 (void *handler,__RTINIT *rtl)
+{
+ __RTINIT_DESCRIPTOR *descriptor;
+
+ descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl
+ + rtl->init_offset);
+ while (descriptor->f != NULL)
+ {
+ if (!(descriptor->flags & _RT_CALLED))
+ {
+ descriptor->flags |= _RT_CALLED;
+ /* Execute init/fini. */
+ descriptor->f (handler, rtl, descriptor);
+ }
+ descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor
+ + rtl->__rtinit_descriptor_size);
+ }
+}
+
+/* The modinit() function performs run-time linking, if enabled, and calling
+ the init() function for all loaded modules.
+
+ int modinit()
+ */
+
+#define DL_BUFFER_SIZE 1000
+
+static int
+modinit (void)
+{
+ int *handler = NULL;
+ __RTINIT *rtinit_info = NULL;
+ int flag;
+ DL_INFO dl_buffer[DL_BUFFER_SIZE];
+ DL_INFO *dl_info = dl_buffer;
+ int i;
+
+ /* Find __rtinit symbols */
+ rtinit_info = find_rtinit ();
+
+ flag = DL_EXECQ;
+ if (rtinit_info && rtinit_info->rtl)
+ flag |= DL_LOAD_RTL;
+
+ /* Get a list of modules that have __rtinit. */
+ if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL))
+ exit (0x90);
+
+ if (( dl_info[0].dlinfo_xflags & DL_INFO_OK))
+ {
+ rtinit_info = find_rtinit ();
+ if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL))
+ {
+ if ((*rtinit_info->rtl) (dl_info, 0))
+ exit (0x90);
+ }
+ }
+
+ /* Initialization each module loaded that has __rtinit. */
+ if (dl_info[0].dlinfo_xflags & DL_INFO_OK)
+ {
+ for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i)
+ if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT)
+ {
+ rtinit_info = find_rtinit ();
+ if (rtinit_info)
+ mod_init1 (handler, rtinit_info);
+ }
+ }
+
+ return 0;
+}
+
+
+void
+__libc_start_init (void)
+{
+ /* Do run-time linking, if enabled and call the init()
+ for all loaded modules. */
+ if (__libc_start_data.mcount != __libc_start_data.special)
+ modinit ();
+}
+
+/* For now these are just stubs. */
+void
+__libc_start_fini (void)
+{
+}
+
+void
+__libc_start_rtld_fini (void)
+{
+}
+
+void
+__libc_start_main (void)
+{
+#ifndef SHARED
+
+ /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
+ If the address would be taken inside the expression the optimizer
+ would try to be too smart and throws it away. Grrr. */
+
+ /* XXX disable for now
+ int *dummy_addr = &_dl_starting_up;
+
+ __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */
+#endif
+
+ /* Store the lowest stack address. */
+ __libc_stack_end = __libc_start_data.stack;
+
+ /* Used by setenv */
+ __environ = __libc_start_data.envp;
+
+#ifndef SHARED
+ /* Clear errno. */
+ errno = 0;
+
+ /* Some security at this point. Prevent starting a SUID binary where
+ the standard file descriptors are not opened. We have to do this
+ only for statically linked applications since otherwise the dynamic
+ loader did the work already. */
+ if (__builtin_expect (__libc_enable_secure, 0))
+ __libc_check_standard_fds ();
+
+#endif
+
+ /* Register the destructor of the dynamic linker if there is any. */
+ if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1))
+ __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL);
+
+ /* Call the initializer of the libc. This is only needed here if we
+ are compiling for the static library in which case we haven't
+ run the constructors in `_dl_start_user'. */
+#ifndef SHARED
+ __libc_init_first (__libc_start_data.argc, __libc_start_data.argv,
+ __libc_start_data.envp);
+#endif
+
+ /* Register the destructor of the program, if any. */
+ if (__libc_start_data.fini)
+ __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL);
+
+ /* Call the initializer of the program, if any. */
+#ifdef SHARED
+ if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ _dl_debug_printf ("\ninitialize program: %s\n\n",
+ __libc_start_data.argv[0]);
+#endif
+ if (__libc_start_data.init)
+ (*__libc_start_data.init) ();
+
+#ifdef SHARED
+ if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
+ _dl_debug_printf ("\ntransferring control: %s\n\n",
+ __libc_start_data.argv[0]);
+#endif
+
+ exit ((*__libc_start_data.main) (__libc_start_data.argc,
+ __libc_start_data.argv,
+ __libc_start_data.envp));
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3805349500b991b580f141dcb0e97b718c6b4939
commit 3805349500b991b580f141dcb0e97b718c6b4939
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 22 21:19:47 2001 +0000
(init): Use USE_NONONPTION_FLAG ifdef for __getopt_clean_environment.
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
index 2c8e0b1..f87e5c8 100644
--- a/sysdeps/unix/sysv/aix/init-first.c
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -56,7 +56,9 @@ char **__libc_argv;
static void
init (int argc, char **argv, char **envp)
{
+#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
+#endif
/* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */
@@ -77,8 +79,10 @@ init (int argc, char **argv, char **envp)
__libc_init (argc, argv, envp);
+#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
+#endif
#ifdef SHARED
__libc_global_ctors ();
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe166e9e571c4ada40d081be27668f3de6584c98
commit fe166e9e571c4ada40d081be27668f3de6584c98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 15 03:01:21 2001 +0000
Updated.
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index d7711e5..1c18909 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -7,7 +7,7 @@ ifloat: 2
Test "asin (0.5) == pi/6":
float: 2
ifloat: 2
-Test "asin (0.7) == 0.7753974966107530637":
+Test "asin (0.7) == 0.77539749661075306374035335271498708":
double: 1
float: 2
idouble: 1
@@ -175,12 +175,12 @@ idouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 1
ifloat: 1
@@ -249,7 +249,7 @@ float: 1
ifloat: 1
# cos
-Test "cos (0.7) == 0.7648421872844884262":
+Test "cos (0.7) == 0.76484218728448842625585999019186495":
double: 1
float: 1
idouble: 1
@@ -374,7 +374,7 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-Test "exp10 (0.7) == 5.0118723362727228500":
+Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
float: 1
ifloat: 1
Test "exp10 (3) == 1000":
@@ -451,6 +451,21 @@ ifloat: 2
Test "j0 (8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
# j1
Test "j1 (10.0) == 0.043472746168861436670":
@@ -563,7 +578,7 @@ idouble: 1
ifloat: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
double: 1
float: 1
idouble: 1
@@ -573,7 +588,7 @@ double: 1
float: 0.5
idouble: 1
ifloat: 0.5
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
@@ -583,7 +598,7 @@ double: 0.2758
float: 0.3667
idouble: 0.2758
ifloat: 0.3667
-Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
ifloat: 1
@@ -605,6 +620,13 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "tanh (-0.7) == -0.60436777711716349631":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4ef613a245d48d5a4382b86ae5b3f6e59cffa94
commit d4ef613a245d48d5a4382b86ae5b3f6e59cffa94
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 21:31:40 2001 +0000
(elf_machine_rel): Fix thinko in usage of RESOLVE() (r_type, not
reloc->r_type).
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 6abac52..2d802b7 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -428,7 +428,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
else
{
const Elf32_Sym *const refsym = sym;
- Elf32_Addr value = RESOLVE (&sym, version, reloc->r_type);
+ Elf32_Addr value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a250cfd1e85bf6f6d622aa82e950bd8a32c6526
commit 7a250cfd1e85bf6f6d622aa82e950bd8a32c6526
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:45:10 2001 +0000
termio definitions for AIX.
diff --git a/sysdeps/unix/sysv/aix/sysv_termio.h b/sysdeps/unix/sysv/aix/sysv_termio.h
new file mode 100644
index 0000000..f314c0e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sysv_termio.h
@@ -0,0 +1,155 @@
+/* Copyright (C) 1992, 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* In various parts of this file we define the System V values for
+ things as _SYSV_<whatever>. Those are the values that System V
+ uses for termio, and also (SVR4) termios. Not necessarily the
+ same as the GNU termios that the library user sees. */
+
+/* Number of elements of c_cc. termio only. */
+#define _SYSV_NCC 8
+
+#define _SYSV_VINTR 0
+#define _SYSV_VQUIT 1
+#define _SYSV_VERASE 2
+#define _SYSV_VKILL 3
+#define _SYSV_VEOF 4
+/* This field means VEOF if ICANON, VMIN if not. */
+#define _SYSV_VMIN 4
+#define _SYSV_VEOL 5
+/* This field means VEOL if ICANON, VTIME if not. */
+#define _SYSV_VTIME 5
+#define _SYSV_VEOL2 6
+
+/* Flags in c_iflag. */
+#define _SYSV_IGNBRK 1
+#define _SYSV_BRKINT 2
+#define _SYSV_IGNPAR 4
+#define _SYSV_PARMRK 8
+#define _SYSV_INPCK 0x10
+#define _SYSV_ISTRIP 0x20
+#define _SYSV_INLCR 0x40
+#define _SYSV_IGNCR 0x80
+#define _SYSV_ICRNL 0x100
+#define _SYSV_IUCLC 0x200
+#define _SYSV_IXON 0x400
+#define _SYSV_IXANY 0x800
+#define _SYSV_IXOFF 0x1000
+#define _SYSV_IMAXBEL 0x2000
+
+/* Flags in c_cflag. */
+#define _SYSV_CBAUD 0xf
+#define _SYSV_CIBAUD 0xf0000 /* termios only. */
+#define _SYSV_IBSHIFT 16
+/* Values for CBAUD and CIBAUD. */
+#define _SYSV_B0 0
+#define _SYSV_B50 1
+#define _SYSV_B75 2
+#define _SYSV_B110 3
+#define _SYSV_B134 4
+#define _SYSV_B150 5
+#define _SYSV_B200 6
+#define _SYSV_B300 7
+#define _SYSV_B600 8
+#define _SYSV_B1200 9
+#define _SYSV_B1800 10
+#define _SYSV_B2400 11
+#define _SYSV_B4800 12
+#define _SYSV_B9600 13
+#define _SYSV_B19200 14
+#define _SYSV_B38400 15
+
+#define _SYSV_CS5 0
+#define _SYSV_CS6 0x10
+#define _SYSV_CS7 0x20
+#define _SYSV_CS8 0x30
+#define _SYSV_CSIZE 0x30
+#define _SYSV_CSTOPB 0x40
+#define _SYSV_CREAD 0x80
+#define _SYSV_PARENB 0x100
+#define _SYSV_PARODD 0x200
+#define _SYSV_HUPCL 0x400
+#define _SYSV_CLOCAL 0x800
+
+/* Flags in c_lflag. */
+#define _SYSV_ISIG 1
+#define _SYSV_ICANON 2
+#define _SYSV_ECHO 8
+#define _SYSV_ECHOE 0x10
+#define _SYSV_ECHOK 0x20
+#define _SYSV_ECHONL 0x40
+#define _SYSV_NOFLSH 0x80
+#define _SYSV_TOSTOP 0x100
+#define _SYSV_ECHOCTL 0x200
+#define _SYSV_ECHOPRT 0x400
+#define _SYSV_ECHOKE 0x800
+#define _SYSV_FLUSHO 0x2000
+#define _SYSV_PENDIN 0x4000
+#define _SYSV_IEXTEN 0x8000
+
+/* Flags in c_oflag. */
+#define _SYSV_OPOST 1
+#define _SYSV_OLCUC 2
+#define _SYSV_ONLCR 4
+#define _SYSV_NLDLY 0x100
+#define _SYSV_NL0 0
+#define _SYSV_NL1 0x100
+#define _SYSV_CRDLY 0x600
+#define _SYSV_CR0 0
+#define _SYSV_CR1 0x200
+#define _SYSV_CR2 0x400
+#define _SYSV_CR3 0x600
+#define _SYSV_TABDLY 0x1800
+#define _SYSV_TAB0 0
+#define _SYSV_TAB1 0x0800
+#define _SYSV_TAB2 0x1000
+/* TAB3 is an obsolete name for XTABS. But we provide it since some
+ programs expect it to exist. */
+#define _SYSV_TAB3 0x1800
+#define _SYSV_XTABS 0x1800
+#define _SYSV_BSDLY 0x2000
+#define _SYSV_BS0 0
+#define _SYSV_BS1 0x2000
+#define _SYSV_VTDLY 0x4000
+#define _SYSV_VT0 0
+#define _SYSV_VT1 0x4000
+#define _SYSV_FFDLY 0x8000
+#define _SYSV_FF0 0
+#define _SYSV_FF1 0x8000
+
+/* ioctl's. */
+
+#define _TCGETA 0x5405
+#define _TCSETA 0x5406
+#define _TCSETAW 0x5407
+#define _TCSETAF 0x5408
+#define _TCSBRK 0x5409
+#define _TCXONC 0x540B
+#define _TCFLSH 0x540C
+#define _TIOCGPGRP 0x7414
+#define _TIOCSPGRP 0x7415
+
+struct __sysv_termio
+ {
+ unsigned short c_iflag;
+ unsigned short c_oflag;
+ unsigned short c_cflag;
+ unsigned short c_lflag;
+ char c_line;
+ unsigned char c_cc[_SYSV_NCC];
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e2cf1dd41de78e9a2a314d39b20d4e5fbc913766
commit e2cf1dd41de78e9a2a314d39b20d4e5fbc913766
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:44:33 2001 +0000
Library startup code for AIX.
diff --git a/sysdeps/unix/sysv/aix/init-first.c b/sysdeps/unix/sysv/aix/init-first.c
new file mode 100644
index 0000000..2c8e0b1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/init-first.c
@@ -0,0 +1,107 @@
+/* Initialization code run first thing by the XCOFF startup code. AIX version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sysdep.h>
+#include <fpu_control.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <libc-internal.h>
+
+#ifndef SHARED
+# include <ldsodefs.h>
+# include "dl-osinfo.h"
+#endif
+
+extern void __libc_init (int, char **, char **);
+
+/* The function is called from assembly stubs the compiler can't see. */
+static void init (int, char **, char **) __attribute__ ((unused));
+
+extern int _dl_starting_up;
+weak_extern (_dl_starting_up)
+
+extern fpu_control_t _dl_fpu_control;
+extern int _dl_fpu_control_set;
+
+/* Set nonzero if we have to be prepared for more then one libc being
+ used in the process. Safe assumption if initializer never runs. */
+int __libc_multiple_libcs = 1;
+
+/* Remember the command line argument and enviroment contents for
+ later calls of initializers for dynamic libraries. */
+int __libc_argc;
+char **__libc_argv;
+
+
+static void
+init (int argc, char **argv, char **envp)
+{
+ extern void __getopt_clean_environment (char **);
+ /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
+ If the address would be taken inside the expression the optimizer
+ would try to be too smart and throws it away. Grrr. */
+
+ /* XXX disable dl for now
+ int *dummy_addr = &_dl_starting_up;
+
+ __libc_multiple_libcs = dummy_addr && !_dl_starting_up; */
+
+ /* Save the command-line arguments. */
+ __libc_argc = argc;
+ __libc_argv = argv;
+ __environ = envp;
+
+#ifndef SHARED
+ __libc_init_secure ();
+#endif
+
+ __libc_init (argc, argv, envp);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment (envp);
+
+#ifdef SHARED
+ __libc_global_ctors ();
+#endif
+}
+
+#ifdef SHARED
+
+strong_alias (init, _init);
+
+extern void __libc_init_first (void);
+
+void
+__libc_init_first (void)
+{
+}
+
+#else
+extern void __libc_init_first (int argc, char **argv, char **envp);
+
+void
+__libc_init_first (int argc, char **argv, char **envp)
+{
+ init (argc, argv, envp);
+}
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48255f4c66c0e244b7d1d846b860720a4e5dd010
commit 48255f4c66c0e244b7d1d846b860720a4e5dd010
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:41:25 2001 +0000
Program startup code for AIX.
diff --git a/sysdeps/unix/sysv/aix/start-libc.c b/sysdeps/unix/sysv/aix/start-libc.c
new file mode 100644
index 0000000..e3582e3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/start-libc.c
@@ -0,0 +1,271 @@
+/* Initialization code run first thing by the XCOFF startup code. AIX version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* hack to use uchar's */
+typedef unsigned char uchar;
+#include <xcoff.h>
+#include <rtinit.h>
+#include <dlldr.h>
+#include <bits/libc-lock.h>
+
+extern void __libc_init_first (int argc, char **argv, char **envp);
+
+/* XXX disable for now
+extern int _dl_starting_up;
+weak_extern (_dl_starting_up)
+extern int __libc_multiple_libcs; */
+
+/* XXX normally defined in generic/dl-sydep.c, hack it into existance
+extern void *__libc_stack_end; */
+void *__libc_stack_end;
+
+struct __libc_start_data_rec
+{
+ void *stack;
+ void *toc;
+ int argc;
+ char **argv;
+ char **envp;
+ char *data;
+ char *text;
+ unsigned int mcount;
+ unsigned int special;
+ int (*main) (int, char **, char **);
+ void (*init) (void);
+ void (*fini) (void);
+ void (*rtld_fini) (void);
+};
+
+extern struct __libc_start_data_rec __libc_start_data;
+extern int errno;
+
+/* The first piece of initialized data. */
+int __data_start = 0;
+
+#ifndef HAVE_ELF
+/* Since gcc/crtstuff.c won't define it unless the ELF format is used
+ we will need to define it here. */
+void *__dso_handle = NULL;
+#endif
+
+/* AIX kernel function */
+extern int __loadx (int flag, void *module, void *arg1, void *arg2,
+ void *arg3);
+/* Needed by setenv */
+char **__environ;
+
+/* Needed by dl-support.c */
+/* XXX stubbing out dl-support.c for now..
+ size_t _dl_pagesize = 0; */
+
+/*
+ Find __rtinit symbol
+
+ __RTINIT *find_rtinit()
+
+ __RTINIT *rti - pointer to __rtinit data structure
+ */
+
+static __RTINIT *
+find_rtinit (void)
+{
+ struct xcoffhdr *xcoff_hdr;
+ SCNHDR *sec_hdr;
+ SCNHDR *ldr_sec_hdr;
+ SCNHDR *data_sec_hdr;
+ LDSYM *ldsym_hdr;
+ __RTINIT *rtl;
+
+ xcoff_hdr = (struct xcoffhdr *) __libc_start_data.text;
+ sec_hdr = (SCNHDR *) ((caddr_t) &xcoff_hdr->aouthdr
+ + xcoff_hdr->filehdr.f_opthdr);
+ ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1));
+ ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr
+ + LDHDRSZ);
+
+ if ( __libc_start_data.mcount <= 0)
+ {
+ if (!ldr_sec_hdr->s_scnptr)
+ return (__RTINIT *) 0;
+
+ if (memcmp (ldsym_hdr, RTINIT_NAME, sizeof (RTINIT_NAME) - 1))
+ return (__RTINIT *) 0;
+ }
+
+ data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1));
+ rtl = (__RTINIT *) (ldsym_hdr->l_value
+ + (__libc_start_data.data - data_sec_hdr->s_vaddr));
+ return rtl;
+}
+
+/*
+ The mod_init1 calls every initialization function for a given module.
+
+ void mod_init1(handler, rti)
+
+ void *handler - if NULL init funtions for modules loaded at exec time
+ are being executed. Otherwise, the handler points to the
+ module loaded.
+
+ __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset
+ not equal to zero)
+ */
+
+static void
+mod_init1 (void *handler,__RTINIT *rtl)
+{
+ __RTINIT_DESCRIPTOR *descriptor;
+
+ descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) &rtl->rtl
+ + rtl->init_offset);
+ while (descriptor->f != NULL)
+ {
+ if (!(descriptor->flags & _RT_CALLED))
+ {
+ descriptor->flags |= _RT_CALLED;
+ (descriptor->f) (handler, rtl, descriptor); /* execute init/fini */
+ }
+ descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t) descriptor
+ + rtl->__rtinit_descriptor_size);
+ }
+}
+
+/* The modinit() function performs run-time linking, if enabled, and calling
+ the init() function for all loaded modules. */
+
+#define DL_BUFFER_SIZE 1000
+
+static int
+modinit (void)
+{
+ int *handler = 0;
+ __RTINIT *rtinit_info = 0;
+ int flag;
+ DL_INFO dl_buffer[DL_BUFFER_SIZE];
+ DL_INFO *dl_info = dl_buffer;
+ int i;
+
+ /* Find __rtinit symbols */
+ rtinit_info = find_rtinit ();
+
+ flag = DL_EXECQ;
+ if (rtinit_info && rtinit_info->rtl)
+ flag |= DL_LOAD_RTL;
+
+ /* Get a list of modules that have __rtinit */
+ if (__loadx (flag, dl_info, (void *) sizeof (dl_buffer), NULL, NULL))
+ exit (0x90);
+
+ if (dl_info[0].dlinfo_xflags & DL_INFO_OK)
+ {
+ rtinit_info = find_rtinit ();
+ if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL))
+ {
+ if ((*rtinit_info->rtl) (dl_info, 0))
+ exit (0x90);
+ }
+ }
+
+ /* Initialization each module loaded that has __rtinit. */
+ if (dl_info[0].dlinfo_xflags & DL_INFO_OK)
+ {
+ for (i = 1; i < dl_info[0].dlinfo_arraylen + 1; ++i)
+ if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT)
+ {
+ rtinit_info = find_rtini t();
+ if (rtinit_info)
+ mod_init1 (handler, rtinit_info);
+ }
+ }
+
+ return 0;
+}
+
+
+void
+__libc_start_init (void)
+{
+ /* Do run-time linking, if enabled and call the init()
+ for all loaded modules. */
+ if (__libc_start_data.mcount != __libc_start_data.special)
+ modinit ();
+}
+
+/* For now these are just stubs. */
+void
+__libc_start_fini (void)
+{
+}
+
+void
+__libc_start_rtld_fini (void)
+{
+}
+
+
+int
+__libc_start_main (void)
+{
+ /* Store the lowest stack address. */
+ __libc_stack_end = __libc_start_data.stack;
+
+ /* Used by setenv */
+ __environ = __libc_start_data.envp;
+
+#ifndef SHARED
+ /* Clear errno. */
+ errno = 0;
+
+ /* Some security at this point. Prevent starting a SUID binary where
+ the standard file descriptors are not opened. We have to do this
+ only for statically linked applications since otherwise the dynamic
+ loader did the work already. */
+ if (__builtin_expect (__libc_enable_secure, 0))
+ __libc_check_standard_fds ();
+
+#endif
+
+ /* Register the destructor of the dynamic linker if there is any. */
+ if (__builtin_expect (__libc_start_data.rtld_fini != NULL, 1))
+ __cxa_atexit ((void (*) (void *)) __libc_start_data.rtld_fini, NULL, NULL);
+
+ /* Call the initializer of the libc. This is only needed here if we
+ are compiling for the static library in which case we haven't
+ run the constructors in `_dl_start_user'. */
+#ifndef SHARED
+ __libc_init_first (__libc_start_data.argc, __libc_start_data.argv,
+ __libc_start_data.envp);
+#endif
+
+ /* Register the destructor of the program, if any. */
+ if (__libc_start_data.fini)
+ __cxa_atexit ((void (*) (void *)) __libc_start_data.fini, NULL, NULL);
+
+ /* Call the initializer of the program, if any. */
+ if (__libc_start_data.init)
+ (*__libc_start_data.init) ();
+
+ exit ((*__libc_start_data.main) (__libc_start_data.argc,
+ __libc_start_data.argv,
+ __libc_start_data.envp));
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de447e48ce0f6caa89599429ba0e27d7154a9732
commit de447e48ce0f6caa89599429ba0e27d7154a9732
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:40:41 2001 +0000
Alias __libc_fcntl to __fcntl.
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
index 196bbf5..8c5ba15 100644
--- a/sysdeps/unix/sysv/aix/fcntl.c
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,3 +38,4 @@ __fcntl (int fdes, int cmd, ...)
return res;
}
strong_alias (__fcntl, fcntl)
+strong_alias (__fcntl, __libc_fcntl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c25168ce575e68cac1a1de2f9d8f1d386048af5b
commit c25168ce575e68cac1a1de2f9d8f1d386048af5b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:24:19 2001 +0000
Startup code for glibc on AIX.
diff --git a/sysdeps/unix/sysv/aix/start.s b/sysdeps/unix/sysv/aix/start.s
new file mode 100644
index 0000000..bf17b8c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/start.s
@@ -0,0 +1,109 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+ .file "start.s"
+ .toc
+T.lsd: .tc __libc_start_data[tc], __libc_start_data[rw]
+T.main: .tc main[tc], main[rw]
+T.init: .tc __libc_start_init[tc], __libc_start_init[rw]
+T.fini: .tc __libc_start_fini[tc], __libc_start_init[rw]
+T.rtld_fini : .tc __libc_start_rtld_fini[tc], __libc_start_rtld_fini[rw]
+
+ .globl __start
+ .globl .__start
+ .globl __libc_start_data
+
+ .extern .__libc_start_main
+ .extern .main
+ .extern main
+ .extern __libc_start_init
+ .extern __libc_start_fini
+ .extern __libc_start_rtld_fini
+
+/* Text */
+
+ .csect __start[ds]
+__start:
+ .long .__start, TOC[tc0], 0
+
+ .csect .text[pr]
+.__start:
+
+/* No prologue needed, __start does not have to follow the ABI.
+
+ Input from kernel/loader
+ r1 : stack
+ r2 : TOC
+ r3 : argc
+ r4 : argv
+ r5 : envp
+ r28 : data origin
+ r29 : text origin
+ r30 : module count
+ r31 : default processing flag
+
+ If r31 == r30, no special processing is needed, ie r28, r29 & r30
+ are not used
+
+ Save input in __libc_start_data */
+ l 16, T.lsd(2)
+ st 1, 0(16) /* stack */
+ st 2, 4(16) /* toc */
+ st 3, 8(16) /* argc */
+ st 4, 12(16) /* argv */
+ st 5, 16(16) /* envp */
+ st 28, 20(16) /* data origin */
+ st 29, 24(16) /* text origin */
+ st 30, 28(16) /* module count */
+ st 31, 32(16) /* special */
+
+/* Call __libc_start_main() */
+
+ bl .__libc_start_main
+ nop
+
+/* No epilog needed, __start does not have to follow the ABI */
+
+/* Trace back */
+TB.__start:
+ .long 0x0
+ .long 0xc2040
+ .long 0x0
+ .long TB.__start - .__start
+ .short 7
+ .byte "__start"
+ .byte 0,0,0
+
+/* Data
+ __libc_start_data
+ Space to keep libc initialization information */
+
+ .csect __libc_start_data[rw]
+__libc_start_data:
+/* For kernel/loader input args */
+ .space 36
+
+/* Externs */
+ .long main
+init:
+ .long __libc_start_init
+fini:
+ .long __libc_start_fini
+rtld_fini:
+ .long __libc_start_rtld_fini
+ .space 0x1000 + (4 + rtld_fini - __libc_start_data)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51ca795a3ccc4873260aaea02daa210571152ee6
commit 51ca795a3ccc4873260aaea02daa210571152ee6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:23:45 2001 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c
deleted file mode 100644
index fd4d695..0000000
--- a/sysdeps/unix/sysv/aix/start.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/* Copyright (C) 1991, 93, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-
-/* Old compatibility names for C types. */
-typedef unsigned char uchar; /* sb in libc/posix/types.h */
-
-#include <stdarg.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <xcoff.h>
-#include <rtinit.h>
-#include <dlldr.h>
-#include <bits/libc-lock.h>
-
-/* The first piece of initialized data. */
-int __data_start = 0;
-
-#ifndef HAVE_ELF
-/* Since gcc/crtstuff.c won't define it unless the ELF format is used
- we will need to define it here. */
-void *__dso_handle = NULL;
-#endif
-
-extern int errno;
-
-/* extern __pthread_init; */
-
-typedef void (*FPV)(void);
-
-typedef struct crt0_info
-{
- int *p_argc;
- FPV threads_init;
-} INFO;
-
-
-INFO crt0_info;
-int argc;
-char **argv;
-char **__environ;
-int module_count;
-caddr_t text_origin;
-caddr_t data_origin;
-
-asm("
- .toc
-LL..0: .tc argc[TC],argc
-LL..1: .tc argv[TC],argv
-LL..2: .tc __environ[TC],__environ
-LL..3: .tc module_count[TC],module_count
-LL..4: .tc text_origin[TC],text_origin
-LL..5: .tc data_origin[TC],data_origin
-");
-
-int main (int argc,char **argv,char **__environ);
-int modinit(int argc,INFO *crt0_info, int module_count,
- caddr_t text_origin, caddr_t data_origin);
-
-void mod_init1(void *handler,__RTINIT *rti);
-
-__RTINIT *find_rtinit(caddr_t text_origin,caddr_t data_origin, int module_count);
-
-extern int *__loadx();
-
-void __start(void)
-{
-#ifdef __64BIT__
-asm("
- ld 17,LL..0(2) # argc
- std 14,0(17) # copy reg14 to argc
- ld 17,LL..1(2) # argv
- std 15,0(17) # copy reg15 to argv
- ld 17,LL..2(2) # envp
- std 16,0(17) # copy reg16 to envp
- ld 17,LL..3(2) # module_count
- std 30,0(17) # copy reg30 to module_count
- ld 17,LL..4(2) # text_origin
- std 29,0(17) # copy reg29 to text_origin
- ld 17,LL..5(2) # data_origin
- std 28,0(17) # copy reg28 to data_origin
-");
-#else
-asm("
- lwz 17,LL..0(2) # argc
- stw 3,0(17) # copy reg3 to argc
- lwz 17,LL..1(2) # argv
- stw 4,0(17) # copy reg4 to argv
- lwz 17,LL..2(2) # envp
- stw 5,0(17) # copy reg5 to envp
- lwz 17,LL..3(2) # module_count
- stw 30,0(17) # copy reg30 to module_count
- lwz 17,LL..4(2) # text_origin
- stw 29,0(17) # copy reg29 to text_origin
- lwz 17,LL..5(2) # data_origin
- stw 28,0(17) # copy reg28 to data_origin
-");
-#endif
- crt0_info.p_argc = (int*)&argc;
-
-/* crt0_info.threads_init = (FPV) &__pthread_init; */
-
- /*
- * Do run-time linking, if enabled and call the init()
- * for all loaded modules.
- */
- argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin);
-
- errno=0;
- /*
- * Call the user program.
- */
- exit (main (argc, argv, __environ));
-}
-
-/*
- * The modinit() function performs run-time linking,
- * if enabled, and calling the init() function for
- * all loaded modules.
- *
- * int modinit(argc,crt0_info,module_count,text,data)
- *
- * argc - current value of argc.
- * info - crt0 information passed
- * module_count - number of modules loaded.
- * text - Beginning of text address
- * data - Beginning of data address
- */
-
-#define DL_BUFFER_SIZE 1000
-
-int modinit(int argc,INFO *crt0_info, int module_count,
- caddr_t text_origin, caddr_t data_origin)
-{
- int *handler = 0;
- __RTINIT *rtinit_info = 0;
- int flag;
- DL_INFO dl_buffer[DL_BUFFER_SIZE];
- DL_INFO *dl_info = dl_buffer;
- int i;
- FPV p;
- __libc_lock_define_initialized(static,modinit_lock);
-
- /*
- * try to find __rtinit symbols
- */
- rtinit_info = find_rtinit(text_origin,data_origin,module_count);
-
- flag = DL_EXECQ;
- if (rtinit_info && rtinit_info->rtl) flag |= DL_LOAD_RTL;
-
- /*
- * get a list of modules that have __rtinit
- */
- if (__loadx(flag, dl_info, sizeof(dl_buffer))) exit(0x90);
-
- if (( dl_info[0].dlinfo_xflags & DL_INFO_OK))
- {
- rtinit_info = find_rtinit(dl_info[1].dlinfo_textorg,
- dl_info[1].dlinfo_dataorg,
- module_count);
- if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL))
- {
- if((*rtinit_info->rtl)(dl_info,0)) exit(0x90);
- }
- }
-
- /*
- * initialize threads in case any init
- * functions need thread functions
- */
- if (crt0_info->threads_init)
- (*crt0_info->threads_init)();
-
- p = (FPV) __loadx(DL_GLOBALSYM | DL_SRCHLOADLIST,"pthread_init");
- if (p)
- (*p)();
-
- __libc_lock_lock(modinit_lock);
-
- /*
- * initialization each module loaded that has __rtinit.
- */
- if (( dl_info[0].dlinfo_xflags & DL_INFO_OK))
- {
- for (i=1; i < dl_info[0].dlinfo_arraylen + 1; i++)
- {
- if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT)
- {
- rtinit_info = find_rtinit(dl_info[i].dlinfo_textorg,
- dl_info[i].dlinfo_dataorg,
- module_count);
- if (rtinit_info)
- {
- mod_init1(handler,rtinit_info);
- }
- }
- }
- }
-
- __libc_lock_unlock(modinit_lock);
- /*
- * reload argc if needed.
- */
- return((int) (*crt0_info->p_argc));
-}
-
-/*
- * The mod_init1 calls every initialization function
- * for a given module.
- *
- * void mod_init1(handler, rti)
- *
- * void *handler - if NULL init funtions for modules loaded at exec time
- * are being executed. Otherwise, the handler points to the
- * module loaded.
- *
- * __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset
- * not equal to zero)
- */
-
-void mod_init1(void *handler,__RTINIT *rtl)
-{
- __RTINIT_DESCRIPTOR *descriptor;
-
- descriptor =(__RTINIT_DESCRIPTOR *) ((caddr_t)&rtl->rtl + rtl->init_offset);
- while (descriptor->f)
- {
- if (!(descriptor->flags & _RT_CALLED))
- {
- descriptor->flags |= _RT_CALLED;
- ( descriptor->f )(handler,rtl,descriptor); /* execute init/fini */
- }
- descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t)descriptor +
- rtl->__rtinit_descriptor_size);
- }
-}
-
-
-/*
- * Find __rtinit symbol
- *
- * __RTINIT *find_rtinit(caddr_t text_origin)
- *
- * caddr_t text_origin - Beginning of text area
- * caddr_t data_origin - Beginning of data area
- * int module_count - Number of modules loaded
- * __RTINIT *rti - pointer to __rtinit data structure
- */
-
-__RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count)
-{
- struct xcoffhdr *xcoff_hdr;
- SCNHDR *sec_hdr;
- SCNHDR *ldr_sec_hdr;
- SCNHDR *data_sec_hdr;
- LDSYM *ldsym_hdr;
- __RTINIT *rtl;
-
- xcoff_hdr = (struct xcoffhdr *) text_origin;
- sec_hdr = (SCNHDR *) ((caddr_t)&xcoff_hdr->aouthdr +
- xcoff_hdr->filehdr.f_opthdr);
- ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1));
- ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr +
- LDHDRSZ);
-
- if ( module_count <= 0)
- {
- if ( !(ldr_sec_hdr->s_scnptr) ) return ((__RTINIT *) 0);
-
- if ( memcmp(ldsym_hdr,RTINIT_NAME,sizeof(RTINIT_NAME)-1))
- return ((__RTINIT *) 0);
- }
-
- data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1));
- rtl = (__RTINIT *) (ldsym_hdr->l_value +
- (data_origin - data_sec_hdr->s_vaddr));
- return(rtl);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3dd5528154c385c56a34e356101cfeaf96ef603c
commit 3dd5528154c385c56a34e356101cfeaf96ef603c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:22:27 2001 +0000
(aix-syscalls.o): More linker command line options.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 3fcf4bb..2da5311 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -11,11 +11,11 @@ sysdep_routines += aix-syscalls
$(objpfx)aix-syscalls.o : /lib/syscalls.exp
echo "static int a;" > foo.c
$(CC) -c foo.c
- ld -bM:SRE -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@
+ ld -bM:SRE -bpT:0x00000000 -bpD:0x00000000 -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@
rm foo.c foo.o
-endif
+endif
ifeq ($(subdir),misc)
sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \
@@ -39,4 +39,3 @@ inhibit-glue = yes
ifeq ($(subdir),timezone)
CPPFLAGS-zic.c = -Dunix
endif
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09d4f65308744ab3c2a42f4d8d29524e629f1851
commit 09d4f65308744ab3c2a42f4d8d29524e629f1851
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:16:44 2001 +0000
Fix usage of new _dl_signal_error() format.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2a4ce9f..6abac52 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -501,7 +501,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
topbits = newvalue & 0xfe000000;
if (topbits != 0xfe000000 && topbits != 0x00000000)
{
- _dl_signal_error (0, map->l_name,
+ _dl_signal_error (0, map->l_name, NULL,
"R_ARM_PC24 relocation out of range");
}
}
diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c
index 6cf8d37..4f8cc8b 100644
--- a/sysdeps/hppa/dl-fptr.c
+++ b/sysdeps/hppa/dl-fptr.c
@@ -101,7 +101,7 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
if (_dl_zerofd == -1)
{
__close (fd);
- _dl_signal_error (errno, NULL,
+ _dl_signal_error (errno, NULL, NULL,
"cannot open zero fill device");
}
}
@@ -110,7 +110,7 @@ __hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
__fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE, ANONFD, 0);
if (__fptr_next == MAP_FAILED)
- _dl_signal_error(errno, NULL, "cannot map page for fptr");
+ _dl_signal_error(errno, NULL, NULL, "cannot map page for fptr");
__fptr_count = _dl_pagesize / sizeof (struct hppa_fptr);
}
f = __fptr_next++;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index e066aad..da9a5d3 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -239,7 +239,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
}
- _dl_signal_error (0, NULL, "cannot find runtime link map");
+ _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
return NULL;
}
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 34a8161..d51f1e3 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -311,7 +311,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
}
- _dl_signal_error (0, NULL, "cannot find runtime link map");
+ _dl_signal_error (0, NULL, NULL, "cannot find runtime link map");
return NULL;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3a247a8b1035bde21be868d4ef4e5cea5baed69
commit a3a247a8b1035bde21be868d4ef4e5cea5baed69
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 8 17:13:52 2001 +0000
Forward declare struct link_map.
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index d15732b..d76ea12 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -23,6 +23,9 @@
#define ELF_FUNCTION_PTR_IS_SPECIAL
#define DL_UNMAP_IS_SPECIAL
+/* Forward declaration. */
+struct link_map;
+
void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref);
#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c2b0506ec9e5df69fd79def88de2601e12c24d8
commit 8c2b0506ec9e5df69fd79def88de2601e12c24d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 5 00:08:11 2001 +0000
Include <errno.h>.
(__syscall_gethostname): Add prototype.
diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c
index 28846ef..3a48afc 100644
--- a/sysdeps/unix/sysv/linux/alpha/gethostname.c
+++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <errno.h>
#include <string.h>
#include <unistd.h>
@@ -24,6 +25,8 @@
#include <sys/syscall.h>
#include <bp-checks.h>
+extern int __syscall_gethostname (char *name, size_t len);
+
int
__gethostname (char *name, size_t len)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19635181ccbadd9e1e82fc0eb99dd01bb5aa7615
commit 19635181ccbadd9e1e82fc0eb99dd01bb5aa7615
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 3 17:10:56 2001 +0000
gethostname implementation for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/gethostname.c b/sysdeps/unix/sysv/linux/alpha/gethostname.c
new file mode 100644
index 0000000..28846ef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/gethostname.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2001
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <string.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+
+int
+__gethostname (char *name, size_t len)
+{
+ int result;
+
+ result = INLINE_SYSCALL (gethostname, 2, CHECK_N (name, len), len);
+
+ if (result == 0
+ /* See whether the string is terminated. If not we will return
+ an error. */
+ && memchr (name, '\0', len) == NULL)
+ {
+ __set_errno (EOVERFLOW);
+ result = -1;
+ }
+
+ return result;
+}
+
+weak_alias (__gethostname, gethostname)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00268a805ba7953080e5bca63d7fddf7dad94496
commit 00268a805ba7953080e5bca63d7fddf7dad94496
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 1 19:24:46 2001 +0000
Startup code for Alpha/ELF.
diff --git a/sysdeps/alpha/elf/initfini.c b/sysdeps/alpha/elf/initfini.c
new file mode 100644
index 0000000..e1c0f1c
--- /dev/null
+++ b/sysdeps/alpha/elf/initfini.c
@@ -0,0 +1,98 @@
+/* Special .init and .fini section support for Alpha.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This file is compiled into assembly code which is then munged by a sed
+ script into two files: crti.s and crtn.s.
+
+ * crti.s puts a function prologue at the beginning of the .init and .fini
+ sections and defines global symbols for those addresses, so they can be
+ called as functions.
+
+ * crtn.s puts the corresponding function epilogues in the .init and .fini
+ sections.
+
+ This differs from what would be generated by the generic code in that
+ we save and restore the GP within the function. In order for linker
+ relaxation to work, the value in the GP register on exit from a function
+ must be valid for the function entry point. Normally, a function is
+ contained within one object file and this is not an issue, provided
+ that the function reloads the gp after making any function calls.
+ However, _init and _fini are constructed from pieces of many object
+ files, all of which may have different GP values. So we must reload
+ the GP value from crti.o in crtn.o. */
+
+__asm__ ("
+
+#include \"defs.h\"
+
+/*@HEADER_ENDS*/
+
+/*@_init_PROLOG_BEGINS*/
+ .section .init, \"ax\", @progbits
+ .globl _init
+ .ent _init
+_init:
+ ldgp $29, 0($27)
+ subq $30, 16, $30
+ lda $27, __gmon_start__
+ stq $26, 0($30)
+ stq $29, 8($30)
+ .prologue 1
+ beq $27, 1f
+ jsr $26, ($27), __gmon_start__
+ ldq $29, 8($30)
+1:
+ .align 3
+ .end _init
+ .size _init, 0
+/*@_init_PROLOG_ENDS*/
+
+/*@_init_EPILOG_BEGINS*/
+ .section .init, \"ax\", @progbits
+ ldq $26, 0($30)
+ ldq $29, 8($30)
+ addq $30, 16, $30
+ ret
+/*@_init_EPILOG_ENDS*/
+
+/*@_fini_PROLOG_BEGINS*/
+ .section .fini, \"ax\", @progbits
+ .globl _fini
+ .ent _fini
+_fini:
+ ldgp $29, 0($27)
+ subq $30, 16, $30
+ stq $26, 0($30)
+ stq $29, 8($30)
+ .prologue 1
+ .align 3
+ .end _fini
+ .size _fini, 0
+/*@_fini_PROLOG_ENDS*/
+
+/*@_fini_EPILOG_BEGINS*/
+ .section .fini, \"ax\", @progbits
+ ldq $26, 0($30)
+ ldq $29, 8($30)
+ addq $30, 16, $30
+ ret
+/*@_fini_EPILOG_ENDS*/
+
+/*@TRAILER_BEGINS*/
+");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fed1030448c03fe4f9bdcc197deb23aa04b9e976
commit fed1030448c03fe4f9bdcc197deb23aa04b9e976
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 1 19:23:47 2001 +0000
Not needed anymore.
diff --git a/sysdeps/alpha/elf/Dist b/sysdeps/alpha/elf/Dist
deleted file mode 100644
index 3e70101..0000000
--- a/sysdeps/alpha/elf/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-crtbegin.S
-crtend.S
diff --git a/sysdeps/alpha/elf/Makefile b/sysdeps/alpha/elf/Makefile
deleted file mode 100644
index db849bd..0000000
--- a/sysdeps/alpha/elf/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-ifeq ($(subdir), csu)
-extra-objs += crtbegin.o crtend.o
-install-lib += crtbegin.o crtend.o
-endif
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
deleted file mode 100644
index 08f6c04..0000000
--- a/sysdeps/alpha/elf/crtbegin.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@tamu.edu)
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-
-/*
- * Heads of the constructor/destructor lists.
- */
-
-/* The __*TOR_LIST__ symbols are not global because when this file is used
- in a shared library, we do not want the symbol to fall over to the
- application's lists. */
-
-.section .ctors,"aw"
-
- .align 3
-__CTOR_LIST__:
- .quad -1
-
-.section .dtors,"aw"
-
- .align 3
-__DTOR_LIST__:
- .quad -1
-
-
-/*
- * Fragment of the ELF _fini routine that invokes our dtor cleanup.
- */
-
-.section .fini,"ax"
-
- /* Since the bits of the _fini function are spread across many
- object files, each potentially with its own GP, we must
- assume we need to load ours. Further, our .fini section
- can easily be more than 4MB away from our .text bits so we
- can't use bsr. */
-
- br $gp,1f
-1: ldgp $gp,0($gp)
- jsr $26,__do_global_dtors_aux
-
- /* Must match the alignment we got from crti.o else we get
- zero-filled holes in our _fini function and then SIGILL. */
- .align 3
-
-/*
- * Invoke our destructors in order.
- */
-
-.text
-
- .align 3
- .ent __do_global_dtors_aux
-
-__do_global_dtors_aux:
- .frame $sp,16,$26,0
- /* GP already loaded in .fini */
- lda $sp,-16($sp)
- stq $9,8($sp)
- stq $26,0($sp)
- .mask (1<<26)|(1<<9), -16
- .prologue 0
-
- lda $9,__DTOR_LIST__
- br 1f
-0: jsr $26,($27)
-1: ldq $27,8($9)
- addq $9,8,$9
- bne $27,0b
-
- ldq $26,0($sp)
- ldq $9,8($sp)
- lda $sp,16($sp)
- ret
-
- .end __do_global_dtors_aux
diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S
deleted file mode 100644
index 576b868..0000000
--- a/sysdeps/alpha/elf/crtend.S
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@tamu.edu)
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-
-/*
- * Tails of the constructor/destructor lists.
- */
-
-/* The __*TOR_END__ symbols are not global because when this file is used
- in a shared library, we do not want the symbol to fall over to the
- application's lists. */
-
-.section .ctors,"aw"
-
- .align 3
-__CTOR_END__:
- .quad 0
-
-.section .dtors,"aw"
-
- .align 3
-__DTOR_END__:
- .quad 0
-
-
-/*
- * Fragment of the ELF _init routine that invokes our ctor startup
- */
-
-.section .init,"ax"
-
- /* Since the bits of the _init function are spread across many
- object files, each potentially with its own GP, we must
- assume we need to load ours. Further, our .init section
- can easily be more than 4MB away from our .text bits so we
- can't use bsr. */
-
- br $gp,1f
-1: ldgp $gp,0($gp)
- jsr $26,__do_global_ctors_aux
-
- /* Must match the alignment we got from crti.o else we get
- zero-filled holes in our _init function and thense SIGILL. */
- .align 3
-
-/*
- * Invoke our destructors in order.
- */
-
-.text
-
- .align 3
- .ent __do_global_ctors_aux
-
-__do_global_ctors_aux:
- .frame $sp,16,$26,0
- /* GP already loaded in .init. */
- lda $sp,-16($sp)
- stq $9,8($sp)
- stq $26,0($sp)
- .mask (1<<26)|(1<<9), -16
- .prologue 0
-
- lda $9,__CTOR_END__
- br 1f
-0: jsr $26,($27)
-1: ldq $27,-8($9)
- subq $9,8,$9
- not $27,$0
- bne $0,0b
-
- ldq $26,0($sp)
- ldq $9,8($sp)
- lda $sp,16($sp)
- ret
-
- .end __do_global_ctors_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f888890dee20fef939b7645395d373c01c3db9f
commit 9f888890dee20fef939b7645395d373c01c3db9f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 1 06:08:44 2001 +0000
Support for high-precision timers on Alpha.
diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
new file mode 100644
index 0000000..ccae06b
--- /dev/null
+++ b/sysdeps/alpha/hp-timing.h
@@ -0,0 +1,118 @@
+/* High precision, low overhead timing functions. Alpha version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@redhat.com>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _HP_TIMING_H
+#define _HP_TIMING_H 1
+
+#include <string.h>
+#include <sys/param.h>
+#include <stdio-common/_itoa.h>
+
+/* The macros defined here use the timestamp counter in IA-64. They
+ provide a very accurate way to measure the time with very little
+ overhead. The time values themself have no real meaning, only
+ differences are interesting.
+
+ The list of macros we need includes the following:
+
+ - HP_TIMING_AVAIL: test for availability.
+
+ - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
+ implemented using function calls but instead uses some inlined code
+ which might simply consist of a few assembler instructions. We have to
+ know this since we might want to use the macros here in places where we
+ cannot make function calls.
+
+ - hp_timing_t: This is the type for variables used to store the time
+ values.
+
+ - HP_TIMING_ZERO: clear `hp_timing_t' object.
+
+ - HP_TIMING_NOW: place timestamp for current time in variable given as
+ parameter.
+
+ - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
+ HP_TIMING_DIFF macro.
+
+ - HP_TIMING_DIFF: compute difference between two times and store it
+ in a third. Source and destination might overlap.
+
+ - HP_TIMING_ACCUM: add time difference to another variable. This might
+ be a bit more complicated to implement for some platforms as the
+ operation should be thread-safe and 64bit arithmetic on 32bit platforms
+ is not.
+
+ - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
+ there are no threads involved.
+
+ - HP_TIMING_PRINT: write decimal representation of the timing value into
+ the given string. This operation need not be inline even though
+ HP_TIMING_INLINE is specified.
+*/
+
+/* We always have the timestamp register, but it's got only a 4 second
+ range. Use it for ld.so profiling only. */
+#define HP_TIMING_AVAIL (0)
+#define HP_SMALL_TIMING_AVAIL (1)
+
+/* We indeed have inlined functions. */
+#define HP_TIMING_INLINE (1)
+
+/* We use 32 bit values for the times. */
+typedef unsigned int hp_timing_t;
+
+/* Set timestamp value to zero. */
+#define HP_TIMING_ZERO(VAR) (VAR) = (0)
+
+/* The "rpcc" instruction returns a 32-bit counting half and a 32-bit
+ "virtual cycle counter displacement". Subtracting the two gives us
+ a virtual cycle count. */
+#define HP_TIMING_NOW(VAR) \
+ do { \
+ unsigned long int x_; \
+ asm volatile ("rpcc %0" : "=r"(x_)); \
+ (VAR) = (int) (x_) - (int) (x_ >> 32); \
+ } while (0)
+
+/* ??? Two rpcc instructions can be scheduled simultaneously. */
+#define HP_TIMING_DIFF_INIT() do { } while (0)
+
+/* It's simple arithmetic for us. */
+#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
+
+/* ??? Don't bother, since we're only used for ld.so. */
+#define HP_TIMING_ACCUM(Sum, Diff) not implemented
+
+/* No threads, no extra work. */
+#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
+
+/* Print the time value. */
+#define HP_TIMING_PRINT(Buf, Len, Val) \
+ do { \
+ char __buf[20]; \
+ char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0); \
+ int __len = (Len); \
+ char *__dest = (Buf); \
+ while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \
+ *__dest++ = *__cp++; \
+ memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \
+ } while (0)
+
+#endif /* hp-timing.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6222fd02e797178bf371dfd696693f935eb96068
commit 6222fd02e797178bf371dfd696693f935eb96068
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 1 05:32:08 2001 +0000
(elf_machine_rela): Remove unused code.
Don't add old memory content for R_ALPHA_REFQUAD.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a97bdf4..2a414ca 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -522,24 +522,7 @@ elf_machine_rela (struct link_map *map,
else if (r_type == R_ALPHA_REFQUAD)
{
void *reloc_addr_1 = reloc_addr;
- Elf64_Addr reloc_addr_val;
- /* Load value without causing unaligned trap. */
- memcpy (&reloc_addr_val, reloc_addr_1, 8);
- sym_value += reloc_addr_val;
- if (map == &_dl_rtld_map)
- {
- /* Undo the relocation done here during bootstrapping.
- Now we will relocate anew, possibly using a binding
- found in the user program or a loaded library rather
- than the dynamic linker's built-in definitions used
- while loading those libraries. */
- const Elf64_Sym *const dlsymtab
- = (void *) D_PTR (map, l_info[DT_SYMTAB]);
- sym_value -= map->l_addr;
- sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
- sym_value -= reloc->r_addend;
- }
/* Store value without causing unaligned trap. */
memcpy (reloc_addr_1, &sym_value, 8);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=952ec50e9effdc09317b31491969dfce04d76661
commit 952ec50e9effdc09317b31491969dfce04d76661
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 30 23:09:10 2001 +0000
(elf_machine_rela): Don't handle
R_ALPHA_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only
check for rtld map if RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 64cca5c..a97bdf4 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -468,7 +468,7 @@ elf_machine_rela (struct link_map *map,
{
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
-#ifndef RTLD_BOOTSTRAP
+#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
@@ -480,12 +480,13 @@ elf_machine_rela (struct link_map *map,
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
+#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0))
{
-#ifndef RTLD_BOOTSTRAP
+# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
/* Already done in dynamic linker. */
if (map != &_dl_rtld_map)
-#endif
+# endif
{
/* XXX Make some timings. Maybe it's preverable to test for
unaligned access and only do it the complex way if necessary. */
@@ -500,11 +501,12 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_1, &reloc_addr_val, 8);
}
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
else if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
return;
-#endif
+# endif
else
+#endif
{
Elf64_Addr loadbase, sym_value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=703aebdd7be35bd96f2f3705aa93ec651c2f6f4e
commit 703aebdd7be35bd96f2f3705aa93ec651c2f6f4e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 30 20:22:48 2001 +0000
Adjust j0 ULPs.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 9c57a32..eac5e8b 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -451,9 +451,13 @@ ifloat: 2
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1"
double: 1
idouble: 1
+float: 1
+ifloat: 1
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1"
double: 1
idouble: 1
+float: 1
+ifloat: 1
Test "j0 (8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5fdbb191af1be2be4f3a40e02588ee584542c91
commit b5fdbb191af1be2be4f3a40e02588ee584542c91
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 30 20:04:34 2001 +0000
Adjust j0 ULPs.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index ce16391..9c57a32 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -448,6 +448,12 @@ ifloat: 1
Test "j0 (2.0) == 0.22389077914123566805":
float: 2
ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1"
+double: 1
+idouble: 1
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1"
+double: 1
+idouble: 1
Test "j0 (8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d61dc3cdfe94557b83a7eca1b81ebc241697b12
commit 2d61dc3cdfe94557b83a7eca1b81ebc241697b12
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Aug 29 21:12:09 2001 +0000
Updated.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index ea8789f..a7372ab 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -48,9 +48,6 @@ float: 1
ifloat: 1
# cacos
-Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i":
-ildouble: 1
-ldouble: 1
Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
double: 1
float: 1
@@ -87,16 +84,11 @@ ildouble: 1
ldouble: 1
# casin
-Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i":
-ildouble: 1
-ldouble: 1
Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
double: 3
float: 2
idouble: 3
ifloat: 2
-ildouble: 1
-ldouble: 1
Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 2
ifloat: 2
@@ -109,25 +101,25 @@ double: 6
float: 19
idouble: 6
ifloat: 19
-ildouble: 6
-ldouble: 6
+ildouble: 5
+ldouble: 5
Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 13
float: 1
idouble: 13
ifloat: 1
-ildouble: 7
-ldouble: 7
+ildouble: 6
+ldouble: 6
Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
double: 1
idouble: 1
-ildouble: 3
-ldouble: 3
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 2
ifloat: 2
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
# catan
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -135,27 +127,20 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 7
-ldouble: 7
Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
ildouble: 1
ldouble: 1
Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
ildouble: 1
-ldouble: 2
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
-ildouble: 2
-ldouble: 2
+ldouble: 1
# cbrt
Test "cbrt (-0.001) == -0.1":
@@ -227,11 +212,6 @@ Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012345168864293
float: 2
ifloat: 2
-# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
-ildouble: 1
-ldouble: 1
-
# clog10
Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
ildouble: 1
@@ -306,9 +286,9 @@ Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
float: 0.5
ifloat: 0.5
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
-double: 1.103
+double: 1.1031
float: 2.5333
-idouble: 1.103
+idouble: 1.1031
ifloat: 2.5333
ildouble: 1
ldouble: 1
@@ -489,12 +469,22 @@ float: 1
ifloat: 1
# j0
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "j0 (1.5) == 0.51182767173591812875":
float: 1
ifloat: 1
Test "j0 (10.0) == -0.24593576445134833520":
double: 1
idouble: 1
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
# j1
Test "j1 (-1.0) == -0.44005058574493351596":
@@ -958,8 +948,6 @@ double: 3
float: 2
idouble: 3
ifloat: 2
-ildouble: 1
-ldouble: 1
Function: Imaginary part of "casin":
float: 2
@@ -972,16 +960,16 @@ double: 6
float: 19
idouble: 6
ifloat: 19
-ildouble: 6
-ldouble: 6
+ildouble: 5
+ldouble: 5
Function: Imaginary part of "casinh":
double: 13
float: 2
idouble: 13
ifloat: 2
-ildouble: 7
-ldouble: 7
+ildouble: 6
+ldouble: 6
Function: Real part of "catan":
ildouble: 1
@@ -992,16 +980,10 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 7
-ldouble: 7
Function: Real part of "catanh":
-ildouble: 2
-ldouble: 2
-
-Function: Imaginary part of "catanh":
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: "cbrt":
double: 1
@@ -1045,10 +1027,6 @@ Function: Imaginary part of "cexp":
float: 2
ifloat: 2
-Function: Imaginary part of "clog":
-ildouble: 1
-ldouble: 1
-
Function: Real part of "clog10":
double: 1
float: 1
@@ -1086,9 +1064,9 @@ ildouble: 5
ldouble: 5
Function: Imaginary part of "cpow":
-double: 1.103
+double: 1.1031
float: 6
-idouble: 1.103
+idouble: 1.1031
ifloat: 6
ildouble: 2
ldouble: 2
@@ -1182,6 +1160,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "j1":
float: 2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=560c47613914822c4107d4a93ba48ed0e93829f6
commit 560c47613914822c4107d4a93ba48ed0e93829f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 29 18:48:49 2001 +0000
(__dl_runtime_resolve): Pass ELF_RTYPE_CLASS_PLT, instead of R_MIPS_REL32, to
_dl_lookup_versioned_symbol () and _dl_lookup_symbol ().
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index cb3fc1c..e066aad 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -301,14 +301,14 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
&sym, l->l_scope, version,\
- R_MIPS_REL32, 0); \
+ ELF_RTYPE_CLASS_PLT, 0); \
break; \
} \
/* Fall through. */ \
} \
case 0: \
value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
- l->l_scope, R_MIPS_REL32, 0); \
+ l->l_scope, ELF_RTYPE_CLASS_PLT, 0); \
} \
\
/* Currently value contains the base load address of the object \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c6029e5c0afae4758af285e8a6bcac43ea24fe7
commit 5c6029e5c0afae4758af285e8a6bcac43ea24fe7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 26 22:26:38 2001 +0000
(elf_machine_lookup_noplt_p, elf_machine_lookup_noexec_p): Remove.
(elf_machine_type_class): Define.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 37e8136..64cca5c 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -351,13 +351,13 @@ $fixup_stack:
#define RTLD_START_SPECIAL_INIT /* nothing */
#endif
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT)
-
-/* Nonzero iff TYPE should not be allowed to resolve to one of
- the main executable's symbols, as for a COPY reloc, which we don't use. */
-#define elf_machine_lookup_noexec_p(type) (0)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc, which we don't
+ use. */
+#define elf_machine_type_class(type) \
+ (((type) == R_ALPHA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 7dfed99..2a4ce9f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -323,13 +323,13 @@ _dl_start_user:
.previous\n\
");
-/* Nonzero iff TYPE should not be allowed to resolve to one of
- the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index ce8dfc6..e4778e3 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -228,13 +228,13 @@ _dl_start_user:
.size _dl_start_user, . - _dl_start_user
.previous");
-/* Nonzero iff TYPE describes a relocation that should
- skip the executable when looking up the symbol value. */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_CRIS_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 15e1c85..d13f15b 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -454,14 +454,14 @@ asm ( \
#endif
-/* Nonzero iff TYPE describes a relocation that should
- skip the executable when looking up the symbol value. */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \
- || (type) == R_PARISC_EPLT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_PARISC_IPLT || (type) == R_PARISC_EPLT) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_PARISC_COPY) * ELF_RTYPE_CLASS_COPY))
/* Used by ld.so for ... something ... */
#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index b0e2927..d9c8194 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -189,13 +189,13 @@ _dl_start_user:
.size _dl_start_user, . - _dl_start_user
.previous");
-/* Nonzero iff TYPE describes a relocation that should
- skip the executable when looking up the symbol value. */
-#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY)
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT)
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+ of the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_68K_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_68K_COPY) * ELF_RTYPE_CLASS_COPY))
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 878e27d..cb3fc1c 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -54,8 +54,7 @@
This makes no sense on MIPS but we have to define this to R_MIPS_REL32
to avoid the asserts in dl-lookup.c from blowing. */
#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
-#define elf_machine_lookup_noplt_p(type) (1)
-#define elf_machine_lookup_noexec_p(type) (0)
+#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT
/* Translate a processor specific dynamic tag to the index
in l_info array. */
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index eda94c2..34a8161 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -45,8 +45,7 @@
This makes no sense on MIPS but we have to define this to R_MIPS_REL32
to avoid the asserts in dl-lookup.c from blowing. */
#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
-#define elf_machine_lookup_noplt_p(type) (1)
-#define elf_machine_lookup_noexec_p(type) (0)
+#define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT
/* Translate a processor specific dynamic tag to the index
in l_info array. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa5c1c570d1f689d53c6d4c1b5f2dc6acd712978
commit fa5c1c570d1f689d53c6d4c1b5f2dc6acd712978
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Aug 24 18:27:55 2001 +0000
2001-08-24 Maciej W. Rozycki macro@ds2.pg.gda.pl
* sysdeps/unix/sysv/linux/mips/configure.in: Define AC_SUBST to
empty to prevent junk from being generated.
sysdeps/unix/sysv/linux/mips/configure: Regenerated.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index 38a9374..fb71310 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -56,4 +56,3 @@ if test $ac_verc_fail = yes; then
*** the FAQ and INSTALL documents." 1>&2
fi
-s%@AS@%$AS%g
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
index e5c301d..81515a5 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -2,6 +2,7 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
+define([AC_SUBST])dnl Prevent junk from being appended due to no AC_OUTPUT
AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
[2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*],
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b5c9edf2eee697919af6e77c221f3a28798ac4c
commit 4b5c9edf2eee697919af6e77c221f3a28798ac4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 24 14:57:45 2001 +0000
(elf_machine_rel_relative): New function.
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 3ecb3c2..eda94c2 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -1,5 +1,5 @@
-/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Machine-dependent ELF dynamic relocation inline functions. MIPS64 version.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -530,10 +530,11 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
ElfW(Addr) *const reloc_addr)
{
+ const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
ElfW(Addr) loadbase;
ElfW(Addr) undo __attribute__ ((unused));
- switch (ELFW(R_TYPE) (reloc->r_info))
+ switch (r_type)
{
case R_MIPS_REL32:
{
@@ -565,15 +566,24 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
*reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
}
break;
+#ifndef RTLD_BOOTSTRAP
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
+#endif
default:
- _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
+ _dl_reloc_bad_type (map, r_type, 0);
break;
}
}
static inline void
+elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
+ ElfW(Addr) *const reloc_addr)
+{
+ /* XXX Nothing to do. There is no relative relocation, right? */
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr,
const ElfW(Rel) *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=335e9a00db5d553e44e71dcc47686a1658259ef9
commit 335e9a00db5d553e44e71dcc47686a1658259ef9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 24 14:53:23 2001 +0000
(elf_machine_rel_relative): Use ElfW(Rel) in argument.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 340cd17..878e27d 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -536,8 +536,8 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
static inline void
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
+ ElfW(Addr) *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b934c935cba113b39e42586c4376aa5cdde2e256
commit b934c935cba113b39e42586c4376aa5cdde2e256
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 24 14:53:03 2001 +0000
(elf_machine_rela_relative): Rename from elf_machine_rel_relative. Fix argument types.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index e16f046..37e8136 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -548,8 +548,8 @@ elf_machine_rela (struct link_map *map,
}
static inline void
-elf_machine_rel_relative (Elf64_Addr l_addr, const Elf64_Rel *reloc,
- Elf64_Addr *const reloc_addr)
+elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
+ Elf64_Addr *const reloc_addr)
{
/* XXX Make some timings. Maybe it's preverable to test for
unaligned access and only do it the complex way if necessary. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=638c8659a785692618b0134622b53d76a15554e9
commit 638c8659a785692618b0134622b53d76a15554e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 24 14:51:50 2001 +0000
(elf_machine_rela_relative): Rename from elf_machine_rel_relative.
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index 0813f70..ce8dfc6 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -366,8 +366,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
{
*reloc_addr = l_addr + reloc->r_addend;
}
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index bc37986..15e1c85 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -629,8 +629,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e3a5a24..b0e2927 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -299,8 +299,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
- Elf32_Addr *const reloc_addr)
+elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
{
*reloc_addr = l_addr + reloc->r_addend;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85bdccdbd293eb72027ac5705c5f33cdbd243180
commit 85bdccdbd293eb72027ac5705c5f33cdbd243180
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 24 08:43:21 2001 +0000
Define elf_machine_rel_relative. Minor optimizations.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 1634e96..e16f046 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -480,7 +480,7 @@ elf_machine_rela (struct link_map *map,
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
- if (r_type == R_ALPHA_RELATIVE)
+ if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0))
{
#ifndef RTLD_BOOTSTRAP
/* Already done in dynamic linker. */
@@ -501,7 +501,7 @@ elf_machine_rela (struct link_map *map,
}
}
#ifndef RTLD_BOOTSTRAP
- else if (r_type == R_ALPHA_NONE)
+ else if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
return;
#endif
else
@@ -548,6 +548,23 @@ elf_machine_rela (struct link_map *map,
}
static inline void
+elf_machine_rel_relative (Elf64_Addr l_addr, const Elf64_Rel *reloc,
+ Elf64_Addr *const reloc_addr)
+{
+ /* XXX Make some timings. Maybe it's preverable to test for
+ unaligned access and only do it the complex way if necessary. */
+ void *reloc_addr_1 = reloc_addr;
+ Elf64_Addr reloc_addr_val;
+
+ /* Load value without causing unaligned trap. */
+ memcpy (&reloc_addr_val, reloc_addr_1, 8);
+ reloc_addr_val += l_addr;
+
+ /* Store value without causing unaligned trap. */
+ memcpy (reloc_addr_1, &reloc_addr_val, 8);
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 24fe366..7dfed99 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -412,21 +412,27 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr)
{
- if (ELF32_R_TYPE (reloc->r_info) == R_ARM_RELATIVE)
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+
+ if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
{
#ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
#endif
*reloc_addr += map->l_addr;
}
- else if (ELF32_R_TYPE (reloc->r_info) != R_ARM_NONE)
+#ifndef RTLD_BOOTSTRAP
+ else if (__builtin_expect (r_type == R_ARM_NONE, 0))
+ return;
+#endif
+ else
{
const Elf32_Sym *const refsym = sym;
- Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ Elf32_Addr value = RESOLVE (&sym, version, reloc->r_type);
if (sym)
value += sym->st_value;
- switch (ELF32_R_TYPE (reloc->r_info))
+ switch (r_type)
{
case R_ARM_COPY:
if (sym == NULL)
@@ -505,22 +511,30 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
break;
default:
- _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
+ _dl_reloc_bad_type (map, r_type, 0);
break;
}
}
}
static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ *reloc_addr += l_addr;
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rel *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
/* Check for unexpected PLT reloc type. */
- if (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT)
+ if (__builtin_expect (r_type == R_ARM_JUMP_SLOT, 1))
*reloc_addr += l_addr;
else
- _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
+ _dl_reloc_bad_type (map, r_type, 1);
}
#endif /* RESOLVE */
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index c6d2558..0813f70 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -284,40 +284,28 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr)
{
-#ifndef RTLD_BOOTSTRAP
- /* This is defined in rtld.c, but nowhere in the static libc.a; make the
- reference weak so static programs can still link. This declaration
- cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
- because rtld.c contains the common defn for _dl_rtld_map, which is
- incompatible with a weak decl in the same file. */
- weak_extern (_dl_rtld_map);
-#endif
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
- if (ELF32_R_TYPE (reloc->r_info) == R_CRIS_RELATIVE)
- {
-#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-#endif
- *reloc_addr = map->l_addr + reloc->r_addend;
- }
+ if (__builtin_expect (r_type == R_CRIS_RELATIVE, 0))
+ *reloc_addr = map->l_addr + reloc->r_addend;
else
{
#ifndef RTLD_BOOTSTRAP
const Elf32_Sym *const refsym = sym;
#endif
Elf32_Addr value;
- if (sym->st_shndx != SHN_UNDEF &&
- ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
+ if (sym->st_shndx != SHN_UNDEF
+ && ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
value = map->l_addr;
else
{
- value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
}
value += reloc->r_addend; /* Assume copy relocs have zero addend. */
- switch (ELF32_R_TYPE (reloc->r_info))
+ switch (r_type)
{
#ifndef RTLD_BOOTSTRAP
case R_CRIS_COPY:
@@ -370,7 +358,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
#if !defined RTLD_BOOTSTRAP || defined _NDEBUG
default:
- _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
+ _dl_reloc_bad_type (map, r_type, 0);
break;
#endif
}
@@ -378,15 +366,22 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ *reloc_addr = l_addr + reloc->r_addend;
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
- if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_CRIS_JUMP_SLOT)
- == R_CRIS_JUMP_SLOT)
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+ if (__builtin_expect (r_type == R_CRIS_JUMP_SLOT, 1))
*reloc_addr += l_addr;
else
- _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
+ _dl_reloc_bad_type (map, r_type, 1);
}
#endif /* RESOLVE */
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index e8e2ab2..bc37986 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -629,6 +629,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ /* XXX Nothing to do. There is no relative relocation, right? */
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index c4849b0..e3a5a24 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -232,16 +232,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr)
{
- if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE)
+ const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
+
+ if (__builtin_expect (r_type == R_68K_RELATIVE, 0))
*reloc_addr = map->l_addr + reloc->r_addend;
else
{
const Elf32_Sym *const refsym = sym;
- Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ Elf32_Addr value = RESOLVE (&sym, version, r_type);
if (sym)
value += sym->st_value;
- switch (ELF32_R_TYPE (reloc->r_info))
+ switch (r_type)
{
case R_68K_COPY:
if (sym == NULL)
@@ -290,13 +292,20 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
case R_68K_NONE: /* Alright, Wilbur. */
break;
default:
- _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
+ _dl_reloc_bad_type (map, r_type, 0);
break;
}
}
}
static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ *reloc_addr = l_addr + reloc->r_addend;
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 87d7cbb..340cd17 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -477,6 +477,8 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
ElfW(Addr) *const reloc_addr)
{
+ const unsigned long int r_type = ELFW(R_TYPE) (reloc->r_info);
+
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a;
make the reference weak so static programs can still link. This
@@ -487,7 +489,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
weak_extern (_dl_rtld_map);
#endif
- switch (ELFW(R_TYPE) (reloc->r_info))
+ switch (r_type)
{
case R_MIPS_REL32:
{
@@ -528,12 +530,19 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
default:
- _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
+ _dl_reloc_bad_type (map, r_type, 0);
break;
}
}
static inline void
+elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
+ Elf32_Addr *const reloc_addr)
+{
+ /* XXX Nothing to do. There is no relative relocation, right? */
+}
+
+static inline void
elf_machine_lazy_rel (struct link_map *map,
ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4435779790a1edb87554a26bbbb9c603bc775d73
commit 4435779790a1edb87554a26bbbb9c603bc775d73
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 16 05:32:49 2001 +0000
Fix type of __id_t, __useconds_t and __intptr_t.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index 4beff41..12c3be7 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -71,7 +71,7 @@ typedef int __pid_t; /* Type of process identifications. */
typedef long int __ssize_t; /* Type of a byte count, or error. */
typedef __u_long __rlim_t; /* Type of resource counts. */
typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */
-typedef __u_long __id_t; /* General type for ID. */
+typedef unsigned int __id_t; /* General type for ID. */
typedef struct
{
@@ -82,7 +82,7 @@ typedef struct
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
-typedef __u_long __useconds_t;
+typedef unsigned int __useconds_t;
typedef int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
@@ -128,7 +128,7 @@ typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
-typedef int __intptr_t;
+typedef signed long __intptr_t;
/* Duplicate info from sys/socket.h. */
typedef unsigned int __socklen_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85e36b09226c35613a758ebb57f3fed78dbc3f18
commit 85e36b09226c35613a758ebb57f3fed78dbc3f18
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 16 05:32:30 2001 +0000
Add rule to import kernel symbols.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 19ec885..3fcf4bb 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -2,6 +2,21 @@
# This is a hack until the import/export stuff is worked out.
+postctor += /lib/syscalls.exp
+ifeq ($(subdir),csu)
+
+sysdep_routines += aix-syscalls
+
+#
+# The foo.c is a workaround for the linker complaining about no input files.
+$(objpfx)aix-syscalls.o : /lib/syscalls.exp
+ echo "static int a;" > foo.c
+ $(CC) -c foo.c
+ ld -bM:SRE -bnoentry -bI:/lib/syscalls.exp -bE:/lib/syscalls.exp foo.o -o $@
+ rm foo.c foo.o
+
+
+endif
+
ifeq ($(subdir),misc)
sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \
dl-close dl-addr uitrunc
@@ -24,3 +39,4 @@ inhibit-glue = yes
ifeq ($(subdir),timezone)
CPPFLAGS-zic.c = -Dunix
endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4afac624ab0856b3b9e13c48343369935b4e20e4
commit 4afac624ab0856b3b9e13c48343369935b4e20e4
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Aug 15 13:09:16 2001 +0000
(atomic_add): Don't allow address register for operand 0.
diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h
index 4639b01..4649480 100644
--- a/sysdeps/m68k/m68020/atomicity.h
+++ b/sysdeps/m68k/m68020/atomicity.h
@@ -45,7 +45,7 @@ atomic_add (volatile uint32_t *mem, int val)
{
/* XXX Use cas here as well? */
__asm__ __volatile__ ("add%.l %0,%1"
- : : "ir" (val), "m" (*mem) : "memory");
+ : : "id" (val), "m" (*mem) : "memory");
}
static inline int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b402ca813ce9ac4b689b4b41ccc2e43bb5e6b1d
commit 3b402ca813ce9ac4b689b4b41ccc2e43bb5e6b1d
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Aug 13 08:42:44 2001 +0000
(MCOUNT): Don't use delay slot for jal since jal is a macro.
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index 8a56c76..4b6a939 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,8 +42,9 @@
"sw $1,0($29);" \
"sw $31,4($29);" \
"move $5,$31;" \
- "jal __mcount;" \
"move $4,$1;" \
+ "jal __mcount;" \
+ "nop;" \
"lw $4,8($29);" \
"lw $5,12($29);" \
"lw $6,16($29);" \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf9fe93f07ccafc4130ecd3a641b9d5f01afb208
commit cf9fe93f07ccafc4130ecd3a641b9d5f01afb208
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 11 20:31:07 2001 +0000
Use __getopt_clean_environment only if USE_NONOPTION_FLAGS is defined.
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index cc8da31..6856314 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For ARM.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,9 @@
#include <unistd.h>
extern void __libc_init (int, char **, char **);
+#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
+#endif
extern void __libc_global_ctors (void);
int __libc_multiple_libcs = 1;
@@ -35,8 +37,10 @@ init (int *data)
__environ = envp;
__libc_init (argc, argv, envp);
+#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
+#endif
}
#ifdef SHARED
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index b81fe3c..d0ab593 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,9 @@
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
+#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
+#endif
extern void __libc_global_ctors (void);
unsigned int __hurd_threadvar_max;
@@ -106,8 +108,10 @@ init1 (int argc, char *arg0, ...)
__libc_init (argc, argv, __environ);
+#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
+#endif
#ifdef SHARED
__libc_global_ctors ();
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17f56d2f9c5893afc919e9a7666962cdfc99354a
commit 17f56d2f9c5893afc919e9a7666962cdfc99354a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 11 08:54:29 2001 +0000
(elf_machine_runtime_setup): Only set _dl_profile_map for the right object.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index ba515eb..24fe366 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -103,8 +103,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
if (profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- /* Say that we really want profiling and the timers are started. */
- _dl_profile_map = l;
+
+ if (_dl_name_match_p (_dl_profile, l))
+ /* Say that we really want profiling and the timers are
+ started. */
+ _dl_profile_map = l;
}
else
/* This function will get called to fix up the GOT entry indicated by
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4f1359e63415357e41123ccddb34395622ce5c7
commit a4f1359e63415357e41123ccddb34395622ce5c7
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 31 07:46:06 2001 +0000
* sysdeps/unix/sysv/linux/sparc/bits/poll.h (NPOLLFILE): Removed.
* sysdeps/unix/sysv/linux/mips/bits/poll.h (NPOLLFILE): Removed.
* sysdeps/unix/sysv/linux/m68k/bits/poll.h (NPOLLFILE): Removed.
* sysdeps/unix/sysv/linux/bits/poll.h (NPOLLFILE): Removed.
* sysdeps/generic/bits/poll.h (NPOLLFILE): Removed.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
index 17adb4d..f7a7393 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -41,8 +41,3 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
-
-#ifdef __USE_MISC
-/* Canonical number of polling requests to read in at a time in poll. */
-# define NPOLLFILE 30
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
index 825d073..f62b9c3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -46,8 +46,3 @@
#define POLLERR 0x008 /* Error condition. */
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
-
-#ifdef __USE_MISC
-/* Canonical number of polling requests to read in at a time in poll. */
-# define NPOLLFILE 30
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e0904c1c1412ddbe1be72aaa3e5835ef0391848
commit 1e0904c1c1412ddbe1be72aaa3e5835ef0391848
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 06:08:50 2001 +0000
Add dl-support.c, dl-addr.c, and dl-error.c.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index 4d0cb14..2698761 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -1,3 +1,6 @@
+dl-support.c
+dl-error.c
+dl-addr.c
dl-sym.c
dl-open.c
dl-close.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b948198f186a5ea1485f5cd10c2a7981cc1ea68
commit 2b948198f186a5ea1485f5cd10c2a7981cc1ea68
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 06:07:40 2001 +0000
Add sys/procfs.h.
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 41d521b..35fad7f 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -6,3 +6,4 @@ setresgid.c
setfsuid.c
setfsgid.c
sys/reg.h
+sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0b3cda64b8378b2c78e4a86405ed8e0ecd5b4e9a
commit 0b3cda64b8378b2c78e4a86405ed8e0ecd5b4e9a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 05:53:57 2001 +0000
Not needed anymore.
diff --git a/sysdeps/mips/mipsel/Dist b/sysdeps/mips/mipsel/Dist
deleted file mode 100644
index 98a10ec..0000000
--- a/sysdeps/mips/mipsel/Dist
+++ /dev/null
@@ -1 +0,0 @@
-rtld-parms
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6df8f49fdea74aeb69d3765a4876fdb8af72ade
commit d6df8f49fdea74aeb69d3765a4876fdb8af72ade
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 28 05:53:37 2001 +0000
Remove non-existing files.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index 5ad586d..1fbf36a 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -1,6 +1,4 @@
setjmp_aux.c
-rtld-ldscript.in
-rtld-parms
regdef.h
sgidefs.h
fpregdef.h
diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist
index 4cde3d0..ad6ea03 100644
--- a/sysdeps/mips/mips64/Dist
+++ b/sysdeps/mips/mips64/Dist
@@ -1,2 +1 @@
setjmp_aux.c
-rtld-parms
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db08f905e80c83d4aafdf439225f56c9b2a19b70
commit db08f905e80c83d4aafdf439225f56c9b2a19b70
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jul 22 18:18:48 2001 +0000
Don't mark asm input operand as clobbered.
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 10a82aa..d02b1f9 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -40,7 +40,7 @@ __brk (void *addr)
"trap #0" /* Perform the system call. */
: "=d" (d0)
: "0" (SYS_ify (brk)), "g" (addr)
- : "%d0", "%d1");
+ : "%d1");
newbrk = (void *) d0;
}
__curbrk = newbrk;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48bfe44538446fbbdb517cf0ea1d2385849c7507
commit 48bfe44538446fbbdb517cf0ea1d2385849c7507
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jul 22 18:18:34 2001 +0000
(INLINE_SYSCALL): Don't mark asm input operand as clobbered.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 23fcc55..6d0817c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \
asm volatile ("trap #0" \
: "=d" (_d0) \
: "0" (_d0) ASM_ARGS_##nr \
- : "d0", "memory"); \
+ : "memory"); \
_sys_result = _d0; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1babb4b9d2ce6cf409783c74807f6294e18bcfa
commit c1babb4b9d2ce6cf409783c74807f6294e18bcfa
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jul 20 06:05:16 2001 +0000
Synch with kernel.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 04c5f40..f385372 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -45,9 +45,9 @@ typedef union sigval
typedef struct siginfo
{
int si_signo; /* Signal number. */
+ int si_code; /* Signal code. */
int si_errno; /* If non-zero, an errno value associated with
this signal, as defined in <errno.h>. */
- int si_code; /* Signal code. */
union
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44dce3919220dae3d1ec6f604d8b1fe2e39815d1
commit 44dce3919220dae3d1ec6f604d8b1fe2e39815d1
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Jul 17 17:12:10 2001 +0000
Fix last change.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 009f7f1..bbabbb1 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -36,6 +36,7 @@ __getpagesize ()
if (_dl_pagesize != 0)
return _dl_pagesize;
+#ifdef __NR_getpagesize
result = INLINE_SYSCALL (getpagesize, 0);
/* The only possible error is ENOSYS. */
if (result != -1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b04f70b77dc295bfdeff1fd33b3686cebd4a3b80
commit b04f70b77dc295bfdeff1fd33b3686cebd4a3b80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 16 22:30:06 2001 +0000
Not needed anymore.
diff --git a/sysdeps/mips/mips64/rtld-parms b/sysdeps/mips/mips64/rtld-parms
deleted file mode 100644
index 77dfc39..0000000
--- a/sysdeps/mips/mips64/rtld-parms
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef rtld-wordsize
-rtld-wordsize = 64
-endif
diff --git a/sysdeps/mips/mipsel/rtld-parms b/sysdeps/mips/mipsel/rtld-parms
deleted file mode 100644
index 07fac51..0000000
--- a/sysdeps/mips/mipsel/rtld-parms
+++ /dev/null
@@ -1,3 +0,0 @@
-ifndef rtld-oformat
-rtld-oformat = elf32-littlemips
-endif
diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in
deleted file mode 100644
index c9b5e71..0000000
--- a/sysdeps/mips/rtld-ldscript.in
+++ /dev/null
@@ -1,105 +0,0 @@
-OUTPUT_ARCH(@@rtld-arch@@)
-ENTRY(@@rtld-entry@@)
-SECTIONS
-{
- /* Read-only sections, merged into text segment: */
- . = @@rtld-base@@;
- .reginfo : { *(.reginfo) }
- .dynamic : { *(.dynamic) }
- .dynstr : { *(.dynstr) }
- .dynsym : { *(.dynsym) }
- .hash : { *(.hash) }
- .rel.text : { *(.rel.text) }
- .rela.text : { *(.rela.text) }
- .rel.data : { *(.rel.data) }
- .rela.data : { *(.rela.data) }
- .rel.rodata : { *(.rel.rodata) }
- .rela.rodata : { *(.rela.rodata) }
- .rel.got : { *(.rel.got) }
- .rela.got : { *(.rela.got) }
- .rel.ctors : { *(.rel.ctors) }
- .rela.ctors : { *(.rela.ctors) }
- .rel.dtors : { *(.rel.dtors) }
- .rela.dtors : { *(.rela.dtors) }
- .rel.init : { *(.rel.init) }
- .rela.init : { *(.rela.init) }
- .rel.fini : { *(.rel.fini) }
- .rela.fini : { *(.rela.fini) }
- .rel.bss : { *(.rel.bss) }
- .rela.bss : { *(.rela.bss) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
- .rodata : { *(.rodata) }
- .rodata1 : { *(.rodata1) }
- .init : { *(.init) } =0
- .text :
- {
- *(.text)
- *(.stub)
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- } =0
- .fini : { *(.fini) } =0
- /* Adjust the address for the data segment. We want to adjust up to
- the same address within the page on the next page up. It would
- be more correct to do this:
- . = 0x10000000;
- The current expression does not correctly handle the case of a
- text segment ending precisely at the end of a page; it causes the
- data segment to skip a page. The above expression does not have
- this problem, but it will currently (2/95) cause BFD to allocate
- a single segment, combining both text and data, for this case.
- This will prevent the text segment from being shared among
- multiple executions of the program; I think that is more
- important than losing a page of the virtual address space (note
- that no actual memory is lost; the page which is skipped can not
- be referenced). */
- . += 0x10000;
- .data :
- {
- *(.data)
- CONSTRUCTORS
- }
- .data1 : { *(.data1) }
- .ctors : { *(.ctors) }
- .dtors : { *(.dtors) }
- _gp = ALIGN(16) + 0x7ff0;
- .got :
- {
- *(.got.plt) *(.got)
- }
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- .sdata : { *(.sdata) }
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
- .sbss : { *(.sbss) *(.scommon) }
- .bss :
- {
- *(.dynbss)
- *(.bss)
- *(COMMON)
- }
- /* The normal linker scripts created by the binutils doesn't have the
- symbols end and _end which breaks ld.so's dl-minimal.c. */
- _end = . ;
- PROVIDE (end = .);
- /* These are needed for ELF backends which have not yet been
- converted to the new style linker. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- /* DWARF debug sections.
- Symbols in the .debug DWARF section are relative to the beginning of the
- section so we begin .debug at 0. It's not clear yet what needs to happen
- for the others. */
- .debug 0 : { *(.debug) }
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- .line 0 : { *(.line) }
- /* These must appear regardless of . */
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-}
diff --git a/sysdeps/mips/rtld-parms b/sysdeps/mips/rtld-parms
deleted file mode 100644
index 72f09e7..0000000
--- a/sysdeps/mips/rtld-parms
+++ /dev/null
@@ -1,15 +0,0 @@
-ifndef rtld-wordsize
-rtld-wordsize = 32
-endif
-ifndef rtld-oformat
-rtld-oformat = elf$(rtld-wordsize)-bigmips
-endif
-ifndef rtld-arch
-rtld-arch = mips
-endif
-ifndef rtld-entry
-rtld-entry = __start
-endif
-ifndef rtld-base
-rtld-base = 0x0fb60000 + SIZEOF_HEADERS
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=760ab2840baf479daef89311fa9e58425909afe3
commit 760ab2840baf479daef89311fa9e58425909afe3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 16 22:26:12 2001 +0000
(MAP_BASE_ADDR): Removed.
(elf_machine_got_rel): Defined only if RTLD_BOOTSTRAP is not defined.
(RESOLVE_GOTSYM): Rewrite to use RESOLVE.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 4e0b591..87d7cbb 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -61,23 +61,6 @@
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
-/*
- * MIPS libraries are usually linked to a non-zero base address. We
- * subtract the base address from the address where we map the object
- * to. This results in more efficient address space usage.
- *
- * FIXME: By the time when MAP_BASE_ADDR is called we don't have the
- * DYNAMIC section read. Until this is fixed make the assumption that
- * libraries have their base address at 0x5ffe0000. This needs to be
- * fixed before we can safely get rid of this MIPSism.
- */
-#if 0
-#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
- (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
-#else
-#define MAP_BASE_ADDR(l) 0x5ffe0000
-#endif
-
/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
with the run-time address of the r_debug structure */
#define ELF_MACHINE_DEBUG_SETUP(l,r) \
@@ -557,51 +540,30 @@ elf_machine_lazy_rel (struct link_map *map,
/* Do nothing. */
}
+#ifndef RTLD_BOOTSTRAP
/* Relocate GOT. */
static inline void
elf_machine_got_rel (struct link_map *map, int lazy)
{
ElfW(Addr) *got;
ElfW(Sym) *sym;
+ const ElfW(Half) *vernum;
int i, n, symidx;
- /* This function is loaded in dl-reloc as a nested function and can
- therefore access the variables scope and strtab from
- _dl_relocate_object. */
-#ifdef RTLD_BOOTSTRAP
-# define RESOLVE_GOTSYM(sym,sym_index) 0
-#else
-# define RESOLVE_GOTSYM(sym,sym_index) \
+
+#define RESOLVE_GOTSYM(sym,vernum,sym_index) \
({ \
const ElfW(Sym) *ref = sym; \
+ const struct r_found_version *version \
+ = vernum ? &map->l_versions [vernum [sym_index]] : NULL; \
ElfW(Addr) value; \
- \
- switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
- { \
- default: \
- { \
- const ElfW(Half) *vernum = \
- (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
- ElfW(Half) ndx = vernum[sym_index]; \
- const struct r_found_version *version = &l->l_versions[ndx]; \
- \
- if (version->hash != 0) \
- { \
- value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
- map, \
- &ref, scope, version, \
- R_MIPS_REL32, 0); \
- break; \
- } \
- /* Fall through. */ \
- } \
- case 0: \
- value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
- scope, R_MIPS_REL32, 0); \
- } \
- \
+ value = RESOLVE (&ref, version, R_MIPS_REL32); \
(ref)? value + ref->st_value: 0; \
})
-#endif /* RTLD_BOOTSTRAP */
+
+ if (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
+ vernum = (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
+ else
+ vernum = NULL;
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
@@ -639,10 +601,10 @@ elf_machine_got_rel (struct link_map *map, int lazy)
&& sym->st_value && lazy)
*got = sym->st_value + map->l_addr;
else
- *got = RESOLVE_GOTSYM (sym, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx);
}
else if (sym->st_shndx == SHN_COMMON)
- *got = RESOLVE_GOTSYM (sym, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx);
else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
&& *got != sym->st_value
&& lazy)
@@ -653,7 +615,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
*got += map->l_addr;
}
else
- *got = RESOLVE_GOTSYM (sym, symidx);
+ *got = RESOLVE_GOTSYM (sym, vernum, symidx);
++got;
++sym;
@@ -661,9 +623,8 @@ elf_machine_got_rel (struct link_map *map, int lazy)
}
#undef RESOLVE_GOTSYM
-
- return;
}
+#endif
/* Set up the loaded object described by L so its stub function
will jump to the on-demand fixup code __dl_runtime_resolve. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5f709a1fffe5b3e579a3a1228914d3b00d5368e
commit b5f709a1fffe5b3e579a3a1228914d3b00d5368e
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jul 15 15:30:50 2001 +0000
Special versions for Linux/m68k.
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/procfs.h b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h
new file mode 100644
index 0000000..27abf8e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sys/procfs.h
@@ -0,0 +1,126 @@
+/* Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_PROCFS_H
+#define _SYS_PROCFS_H 1
+
+/* This is somewhat modelled after the file of the same name on SVR4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. It doesn't have anything to do with the /proc file
+ system, even though Linux has one.
+
+ Anyway, the whole purpose of this file is for GDB and GDB only.
+ Don't read too much into it. Don't use it for anything other than
+ GDB unless you know what you are doing. */
+
+#include <features.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/user.h>
+
+__BEGIN_DECLS
+
+/* Type for a general-purpose register. */
+typedef unsigned long elf_greg_t;
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs_struct' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Register set for the floating-point registers. */
+typedef struct user_m68kfp_struct elf_fpregset_t;
+
+
+/* Signal info. */
+struct elf_siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_code; /* Extra code. */
+ int si_errno; /* Errno. */
+ };
+
+
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with Linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ GDB doesn't really use excluded. */
+
+struct elf_prstatus
+ {
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned long int pr_sigpend; /* Set of pending signals. */
+ unsigned long int pr_sighold; /* Set of held signals. */
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct timeval pr_utime; /* User time. */
+ struct timeval pr_stime; /* System time. */
+ struct timeval pr_cutime; /* Cumulative user time. */
+ struct timeval pr_cstime; /* Cumulative system time. */
+ elf_gregset_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+#define ELF_PRARGSZ (80) /* Number of chars for args. */
+
+struct elf_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long int pr_flag; /* Flags. */
+ unsigned short int pr_uid;
+ unsigned short int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+/* The rest of this file provides the types for emulation of the
+ Solaris <proc_service.h> interfaces that should be implemented by
+ users of libthread_db. */
+
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore have only one PID type. */
+typedef __pid_t lwpid_t;
+
+/* Process status and info. In the end we do provide typedefs for them. */
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif /* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
new file mode 100644
index 0000000..3c441dc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
@@ -0,0 +1,109 @@
+/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* System V/m68k ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* Type for general register. */
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 18
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R_D0 = 0,
+#define R_D0 R_D0
+ R_D1 = 1,
+#define R_D1 R_D1
+ R_D2 = 2,
+#define R_D2 R_D2
+ R_D3 = 3,
+#define R_D3 R_D3
+ R_D4 = 4,
+#define R_D4 R_D4
+ R_D5 = 5,
+#define R_D5 R_D5
+ R_D6 = 6,
+#define R_D6 R_D6
+ R_D7 = 7,
+#define R_D7 R_D7
+ R_A0 = 8,
+#define R_A0 R_A0
+ R_A1 = 9,
+#define R_A1 R_A1
+ R_A2 = 10,
+#define R_A2 R_A2
+ R_A3 = 11,
+#define R_A3 R_A3
+ R_A4 = 12,
+#define R_A4 R_A4
+ R_A5 = 13,
+#define R_A5 R_A5
+ R_A6 = 14,
+#define R_A6 R_A6
+ R_A7 = 15,
+#define R_A7 R_A7
+ R_SP = 15,
+#define R_SP R_SP
+ R_PC = 16,
+#define R_PC R_PC
+ R_PS = 17
+#define R_PS R_PS
+};
+
+/* Structure to describe FPU registers. */
+typedef struct fpregset
+{
+ int f_fpregs[8][3];
+ int f_pcr;
+ int f_psr;
+ int f_fpiaddr;
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+{
+ int version;
+ gregset_t gregs;
+ fpregset_t fpregs;
+} mcontext_t;
+
+#define MCONTEXT_VERSION 2
+
+/* Userlevel context. */
+typedef struct ucontext
+{
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[174];
+} ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f476000f876da8865b224211b8bb286593dc7e80
commit f476000f876da8865b224211b8bb286593dc7e80
Author: Andreas Schwab <schwab@suse.de>
Date: Sun Jul 15 15:25:11 2001 +0000
Check _dl_pagesize first. Default to 4096, not EXEC_PAGESIZE.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index cfe98fc..009f7f1 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -28,8 +28,13 @@
int
__getpagesize ()
{
+ extern size_t _dl_pagesize;
#ifdef __NR_getpagesize
int result;
+#endif
+
+ if (_dl_pagesize != 0)
+ return _dl_pagesize;
result = INLINE_SYSCALL (getpagesize, 0);
/* The only possible error is ENOSYS. */
@@ -37,7 +42,7 @@ __getpagesize ()
return result;
#endif
- return EXEC_PAGESIZE;
+ return 4096;
}
weak_alias (__getpagesize, getpagesize)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=655f4b14c86a98082cb358559ec4c188f8661b38
commit 655f4b14c86a98082cb358559ec4c188f8661b38
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:15:01 2001 +0000
Improve nsendmsg prototype.
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
index 952bb06..054d374 100644
--- a/sysdeps/unix/sysv/aix/sendmsg.c
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -18,7 +18,7 @@
#include <sys/socket.h>
-extern int nsendmsg (int s, void *uap_msg, int flags);
+extern int nsendmsg (int s, const void *uap_msg, int flags);
ssize_t
sendmsg (int fd, const struct msghdr *message, int flags)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f89b56b804ce6fee16bc1d436d0133e0908ee3e9
commit f89b56b804ce6fee16bc1d436d0133e0908ee3e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:14:06 2001 +0000
(sendmsg): Fix return type.
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
index 9ab19a9..952bb06 100644
--- a/sysdeps/unix/sysv/aix/sendmsg.c
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
extern int nsendmsg (int s, void *uap_msg, int flags);
-int
+ssize_t
sendmsg (int fd, const struct msghdr *message, int flags)
{
return nsendmsg (fd, message, flags);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c96d6988abb8bbbd11d39da8b028c78cc1b01b19
commit c96d6988abb8bbbd11d39da8b028c78cc1b01b19
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:11:53 2001 +0000
(recvmsg): Fix return type.
diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c
index 0b695b3..ea5af35 100644
--- a/sysdeps/unix/sysv/aix/recvmsg.c
+++ b/sysdeps/unix/sysv/aix/recvmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,9 +18,9 @@
#include <sys/socket.h>
-extern int nrecvmsg (int s, struct msghdr *uap_msg, int flags);
+extern ssize_t nrecvmsg (int s, struct msghdr *uap_msg, int flags);
-int
+ssize_t
recvmsg (int fd, struct msghdr *message, int flags)
{
return nrecvmsg (fd, message, flags);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f82b7444cb93d475933313661eda9261a084e26
commit 7f82b7444cb93d475933313661eda9261a084e26
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:09:12 2001 +0000
(__recv): Fix typo.
diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c
index 9e8e447..b8ae73e 100644
--- a/sysdeps/unix/sysv/aix/recv.c
+++ b/sysdeps/unix/sysv/aix/recv.c
@@ -22,7 +22,7 @@ extern ssize_t recv (int fd, void *buf, size_t n, int flags);
ssize_t
-__recv (int fd, void *buf, size_t n, int flags);
+__recv (int fd, void *buf, size_t n, int flags)
{
return recv (fd, buf, n, flags);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=097cf6fa038abf5acd38eaa4a47df12a41fbbd4f
commit 097cf6fa038abf5acd38eaa4a47df12a41fbbd4f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:05:51 2001 +0000
AIX recv implementation.
diff --git a/sysdeps/unix/sysv/aix/recv.c b/sysdeps/unix/sysv/aix/recv.c
new file mode 100644
index 0000000..9e8e447
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/recv.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sys/socket.h>
+
+extern ssize_t recv (int fd, void *buf, size_t n, int flags);
+
+
+ssize_t
+__recv (int fd, void *buf, size_t n, int flags);
+{
+ return recv (fd, buf, n, flags);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a207bef32fdf9807e79f3f9a3a39842dd43a6d23
commit a207bef32fdf9807e79f3f9a3a39842dd43a6d23
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 07:02:19 2001 +0000
Fix various types.
diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c
index 723a2c8..0826428 100644
--- a/sysdeps/unix/sysv/aix/recvfrom.c
+++ b/sysdeps/unix/sysv/aix/recvfrom.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,10 +18,10 @@
#include <sys/socket.h>
-extern int nrecvfrom (int s, void *uap_buf, int len, int flags,
- void *uap_from, int *uap_fromlenaddr);
+extern ssize_t nrecvfrom (int s, void *uap_buf, size_t len, int flags,
+ void *uap_from, socklen_t *uap_fromlenaddr);
-int
+ssize_t
recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
socklen_t *addr_len)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0312b508ac574e280d8f04514e8d4e70e9da5b46
commit 0312b508ac574e280d8f04514e8d4e70e9da5b46
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 06:55:42 2001 +0000
(__libc_dlclose): Fix typo.
diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c
index 0506d11..69c627c 100644
--- a/sysdeps/unix/sysv/aix/dl-libc.c
+++ b/sysdeps/unix/sysv/aix/dl-libc.c
@@ -36,6 +36,6 @@ __libc_dlsym (void *map, const char *name)
int
__libc_dlclose (void *map)
{
- _dl_close (__map);
+ _dl_close (map);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da48cd782fafade16e1894fe18915a2e8ad97ad2
commit da48cd782fafade16e1894fe18915a2e8ad97ad2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 06:47:53 2001 +0000
(__gettimeofday): Add declarations for asm functions.
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index c7a4a01..031a84e 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -21,11 +21,14 @@
#include <sys/time.h>
#ifndef HAVE_GNU_LD
-#define __daylight daylight
-#define __timezone timezone
-#define __tzname tzname
+# define __daylight daylight
+# define __timezone timezone
+# define __tzname tzname
#endif
+extern int rtc_upper (void);
+extern int rtc_lower (void);
+
/* Assembler Routines to access the timer registers */
asm("
.rtc_upper: mfspr 3,4 # copy RTCU to return register
@@ -51,14 +54,14 @@ __gettimeofday (tv, tz)
return -1;
}
- ts = rtc_upper(); /* seconds */
- tl = rtc_lower(); /* nanoseconds */
- tu = rtc_upper(); /* Check for a carry from */
- if (ts != tu) /* the lower reg to the upper */
- tl = rtc_lower(); /* Recover from the race condition */
+ ts = rtc_upper (); /* Seconds. */
+ tl = rtc_lower (); /* Nanoseconds. */
+ tu = rtc_upper (); /* Check for a carry from. */
+ if (ts != tu) /* The lower reg to the upper. */
+ tl = rtc_lower (); /* Recover from the race condition. */
- tv->tv_sec = (long int) (tu + (double)tl/1000000000);
- tv->tv_usec = (long int) ((double)tl/1000);
+ tv->tv_sec = (long int) (tu + (double) tl / 1000000000);
+ tv->tv_usec = (long int) ((double) tl / 1000);
if (tz != NULL)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae58a106a1fd583433f8505af38fbc0af554bf39
commit ae58a106a1fd583433f8505af38fbc0af554bf39
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 8 05:56:24 2001 +0000
Add deltas for tanh(-0.7).
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 70a0f08..ce16391 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -600,6 +600,11 @@ double: 0.5
idouble: 0.5
# tanh
+Test "tanh (-0.7) == -0.60436777711716349631":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "tanh (0.7) == 0.60436777711716349631":
double: 1
float: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af9dfe869fbdb9824521c3a17ae7b79999f7e3d9
commit af9dfe869fbdb9824521c3a17ae7b79999f7e3d9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 7 19:19:16 2001 +0000
Fix typo.
diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c
index 6c784f5..fd4d695 100644
--- a/sysdeps/unix/sysv/aix/start.c
+++ b/sysdeps/unix/sysv/aix/start.c
@@ -31,7 +31,7 @@ typedef unsigned char uchar; /* sb in libc/posix/types.h */
/* The first piece of initialized data. */
int __data_start = 0;
-+#ifndef HAVE_ELF
+#ifndef HAVE_ELF
/* Since gcc/crtstuff.c won't define it unless the ELF format is used
we will need to define it here. */
void *__dso_handle = NULL;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f01ec4673b3b979edfa00aca0ab5a2be35fa2637
commit f01ec4673b3b979edfa00aca0ab5a2be35fa2637
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Jul 7 10:13:33 2001 +0000
Put under LGPL v2.1.
diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s
index 426556e..e0dc2fd 100644
--- a/sysdeps/alpha/add_n.s
+++ b/sysdeps/alpha/add_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s
index 048238a..da26c69 100644
--- a/sysdeps/alpha/addmul_1.s
+++ b/sysdeps/alpha/addmul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s
index 1251a1f..1ff8e95 100644
--- a/sysdeps/alpha/alphaev5/add_n.s
+++ b/sysdeps/alpha/alphaev5/add_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s
index ced55b7..e41ce9a 100644
--- a/sysdeps/alpha/alphaev5/lshift.s
+++ b/sysdeps/alpha/alphaev5/lshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s
index 6e24fef..9948e50 100644
--- a/sysdeps/alpha/alphaev5/rshift.s
+++ b/sysdeps/alpha/alphaev5/rshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s
index 6743af5..3c706cf 100644
--- a/sysdeps/alpha/alphaev5/sub_n.s
+++ b/sysdeps/alpha/alphaev5/sub_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h
index a3c6697..f565f0f 100644
--- a/sysdeps/alpha/gmp-mparam.h
+++ b/sysdeps/alpha/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s
index 13bd24a..42fb430 100644
--- a/sysdeps/alpha/lshift.s
+++ b/sysdeps/alpha/lshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s
index a1f5a94..165c281 100644
--- a/sysdeps/alpha/mul_1.s
+++ b/sysdeps/alpha/mul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s
index 389054a..7c230f1 100644
--- a/sysdeps/alpha/rshift.s
+++ b/sysdeps/alpha/rshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s
index 3c90c11..e0a6d5c 100644
--- a/sysdeps/alpha/sub_n.s
+++ b/sysdeps/alpha/sub_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s
index 1ed0c6a..5343f67 100644
--- a/sysdeps/alpha/submul_1.s
+++ b/sysdeps/alpha/submul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index 75d1182..d4ca795 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h
index e57f39c..c880be3 100644
--- a/sysdeps/arm/gmp-mparam.h
+++ b/sysdeps/arm/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s
index 87b7cd7..aaabd72 100644
--- a/sysdeps/hppa/add_n.s
+++ b/sysdeps/hppa/add_n.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s
index 5b3e048..a1fb083 100644
--- a/sysdeps/hppa/hppa1.1/addmul_1.s
+++ b/sysdeps/hppa/hppa1.1/addmul_1.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s
index 7f53916..00c770f 100644
--- a/sysdeps/hppa/hppa1.1/mul_1.s
+++ b/sysdeps/hppa/hppa1.1/mul_1.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s
index f2c19c7..997bd6d 100644
--- a/sysdeps/hppa/hppa1.1/submul_1.s
+++ b/sysdeps/hppa/hppa1.1/submul_1.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
index c0a02d8..fdc63e5 100644
--- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
+++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s
index de6dd76..400fbcf 100644
--- a/sysdeps/hppa/lshift.s
+++ b/sysdeps/hppa/lshift.s
@@ -5,16 +5,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s
index bba60cf..acb772f 100644
--- a/sysdeps/hppa/rshift.s
+++ b/sysdeps/hppa/rshift.s
@@ -5,16 +5,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s
index b50bb11..34f1968 100644
--- a/sysdeps/hppa/sub_n.s
+++ b/sysdeps/hppa/sub_n.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s
index 0532057..cd2b58d 100644
--- a/sysdeps/hppa/udiv_qrnnd.s
+++ b/sysdeps/hppa/udiv_qrnnd.s
@@ -6,16 +6,16 @@
;! This file is part of the GNU MP Library.
;! The GNU MP Library is free software; you can redistribute it and/or modify
-;! it under the terms of the GNU Library General Public License as published by
-;! the Free Software Foundation; either version 2 of the License, or (at your
+;! it under the terms of the GNU Lesser General Public License as published by
+;! the Free Software Foundation; either version 2.1 of the License, or (at your
;! option) any later version.
;! The GNU MP Library is distributed in the hope that it will be useful, but
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
;! License for more details.
-;! You should have received a copy of the GNU Library General Public License
+;! You should have received a copy of the GNU Lesser General Public License
;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;! MA 02111-1307, USA.
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S
index c993c2a..a955849 100644
--- a/sysdeps/m68k/add_n.S
+++ b/sysdeps/m68k/add_n.S
@@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
index a1d6690..434b344 100644
--- a/sysdeps/m68k/lshift.S
+++ b/sysdeps/m68k/lshift.S
@@ -5,16 +5,16 @@ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S
index 7f88557..05d1d8a 100644
--- a/sysdeps/m68k/m68020/addmul_1.S
+++ b/sysdeps/m68k/m68020/addmul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S
index 367f77f..f3e450e 100644
--- a/sysdeps/m68k/m68020/mul_1.S
+++ b/sysdeps/m68k/m68020/mul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S
index 2710045..7522046 100644
--- a/sysdeps/m68k/m68020/submul_1.S
+++ b/sysdeps/m68k/m68020/submul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
index 3b7a24b..5e6abce 100644
--- a/sysdeps/m68k/rshift.S
+++ b/sysdeps/m68k/rshift.S
@@ -5,16 +5,16 @@ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S
index 92fb47a..5833dd2 100644
--- a/sysdeps/m68k/sub_n.S
+++ b/sysdeps/m68k/sub_n.S
@@ -6,16 +6,16 @@ Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s
index 1b09cce..a10730d 100644
--- a/sysdeps/m88k/add_n.s
+++ b/sysdeps/m88k/add_n.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/m88100/add_n.s b/sysdeps/m88k/m88100/add_n.s
index 7e4cccc..0741ec9 100644
--- a/sysdeps/m88k/m88100/add_n.s
+++ b/sysdeps/m88k/m88100/add_n.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/sysdeps/m88k/m88100/mul_1.s b/sysdeps/m88k/m88100/mul_1.s
index 35c238d..7724277 100644
--- a/sysdeps/m88k/m88100/mul_1.s
+++ b/sysdeps/m88k/m88100/mul_1.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/sysdeps/m88k/m88100/sub_n.s b/sysdeps/m88k/m88100/sub_n.s
index 3963cd5..a132c21 100644
--- a/sysdeps/m88k/m88100/sub_n.s
+++ b/sysdeps/m88k/m88100/sub_n.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S
index 39a44e5..3c90674 100644
--- a/sysdeps/m88k/m88110/add_n.S
+++ b/sysdeps/m88k/m88110/add_n.S
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s
index 2bd6f21..a9845ef 100644
--- a/sysdeps/m88k/m88110/addmul_1.s
+++ b/sysdeps/m88k/m88110/addmul_1.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s
index 1518900..103869d 100644
--- a/sysdeps/m88k/m88110/mul_1.s
+++ b/sysdeps/m88k/m88110/mul_1.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S
index 685f024..a937882 100644
--- a/sysdeps/m88k/m88110/sub_n.S
+++ b/sysdeps/m88k/m88110/sub_n.S
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s
index 26626bf..7aa6d64 100644
--- a/sysdeps/m88k/mul_1.s
+++ b/sysdeps/m88k/mul_1.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s
index 7dfffc9..7616dc4 100644
--- a/sysdeps/m88k/sub_n.s
+++ b/sysdeps/m88k/sub_n.s
@@ -6,16 +6,16 @@
; This file is part of the GNU MP Library.
; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
+; it under the terms of the GNU Lesser General Public License as published by
+; the Free Software Foundation; either version 2.1 of the License, or (at your
; option) any later version.
; The GNU MP Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
-; You should have received a copy of the GNU Library General Public License
+; You should have received a copy of the GNU Lesser General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
; MA 02111-1307, USA.
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index 8231665..da7b2d4 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
index 3bcc11c..32df1d7 100644
--- a/sysdeps/mips/addmul_1.S
+++ b/sysdeps/mips/addmul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
index a163559..b1a858d 100644
--- a/sysdeps/mips/lshift.S
+++ b/sysdeps/mips/lshift.S
@@ -5,16 +5,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s
index 996a449..7a25341 100644
--- a/sysdeps/mips/mips3/add_n.s
+++ b/sysdeps/mips/mips3/add_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s
index cd75c18..9a87c3f 100644
--- a/sysdeps/mips/mips3/addmul_1.s
+++ b/sysdeps/mips/mips3/addmul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h
index f3df7ff..0d36735 100644
--- a/sysdeps/mips/mips3/gmp-mparam.h
+++ b/sysdeps/mips/mips3/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s
index 324a602..2c39a1c 100644
--- a/sysdeps/mips/mips3/lshift.s
+++ b/sysdeps/mips/mips3/lshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s
index 281d057..d65e65c 100644
--- a/sysdeps/mips/mips3/mul_1.s
+++ b/sysdeps/mips/mips3/mul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s
index 9920e1a..fc4790a 100644
--- a/sysdeps/mips/mips3/rshift.s
+++ b/sysdeps/mips/mips3/rshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s
index 56c77d8..0ea9413 100644
--- a/sysdeps/mips/mips3/sub_n.s
+++ b/sysdeps/mips/mips3/sub_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s
index a9c9fa2..60153da 100644
--- a/sysdeps/mips/mips3/submul_1.s
+++ b/sysdeps/mips/mips3/submul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
+ # it under the terms of the GNU Lesser General Public License as published by
+ # the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
- # You should have received a copy of the GNU Library General Public License
+ # You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S
index 1d3f764..771d519 100644
--- a/sysdeps/mips/mips64/add_n.S
+++ b/sysdeps/mips/mips64/add_n.S
@@ -6,16 +6,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S
index 58eff8c..f6cf428 100644
--- a/sysdeps/mips/mips64/addmul_1.S
+++ b/sysdeps/mips/mips64/addmul_1.S
@@ -6,16 +6,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h
index 38872ec..3779d1d 100644
--- a/sysdeps/mips/mips64/gmp-mparam.h
+++ b/sysdeps/mips/mips64/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S
index 37e8489..d06ba0d 100644
--- a/sysdeps/mips/mips64/lshift.S
+++ b/sysdeps/mips/mips64/lshift.S
@@ -5,16 +5,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S
index 61d0658..bf32953 100644
--- a/sysdeps/mips/mips64/mul_1.S
+++ b/sysdeps/mips/mips64/mul_1.S
@@ -6,16 +6,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S
index b013eed..f39c1b3 100644
--- a/sysdeps/mips/mips64/rshift.S
+++ b/sysdeps/mips/mips64/rshift.S
@@ -5,16 +5,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S
index 16482f1..d566658 100644
--- a/sysdeps/mips/mips64/sub_n.S
+++ b/sysdeps/mips/mips64/sub_n.S
@@ -6,16 +6,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S
index 5cb39ac..510923f 100644
--- a/sysdeps/mips/mips64/submul_1.S
+++ b/sysdeps/mips/mips64/submul_1.S
@@ -6,16 +6,16 @@
* This file is part of the GNU MP Library.
*
* The GNU MP Library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The GNU MP Library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
- * You should have received a copy of the GNU Library General Public License
+ * You should have received a copy of the GNU Lesser General Public License
* along with the GNU MP Library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index 7ba4353..255623e 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
index 112982a..46df86b 100644
--- a/sysdeps/mips/rshift.S
+++ b/sysdeps/mips/rshift.S
@@ -5,16 +5,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S
index 75d80c1..633f3e3 100644
--- a/sysdeps/mips/sub_n.S
+++ b/sysdeps/mips/sub_n.S
@@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S
index 1aae1ed..7de9ca7 100644
--- a/sysdeps/mips/submul_1.S
+++ b/sysdeps/mips/submul_1.S
@@ -6,16 +6,16 @@ Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s
index 9e1c948..216874e 100644
--- a/sysdeps/rs6000/add_n.s
+++ b/sysdeps/rs6000/add_n.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s
index 2db6984..7cd743c 100644
--- a/sysdeps/rs6000/addmul_1.s
+++ b/sysdeps/rs6000/addmul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s
index 38169bf..8ccba74 100644
--- a/sysdeps/rs6000/lshift.s
+++ b/sysdeps/rs6000/lshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s
index a72bce6..c0feef4 100644
--- a/sysdeps/rs6000/mul_1.s
+++ b/sysdeps/rs6000/mul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s
index 30d408a..145218f 100644
--- a/sysdeps/rs6000/rshift.s
+++ b/sysdeps/rs6000/rshift.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s
index 30d4fee..d931870 100644
--- a/sysdeps/rs6000/sub_n.s
+++ b/sysdeps/rs6000/sub_n.s
@@ -5,16 +5,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s
index 8e5946f..41095ab 100644
--- a/sysdeps/rs6000/submul_1.s
+++ b/sysdeps/rs6000/submul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s
index d4764e2..265a8c7 100644
--- a/sysdeps/vax/add_n.s
+++ b/sysdeps/vax/add_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s
index 746d95b..c6d657d 100644
--- a/sysdeps/vax/addmul_1.s
+++ b/sysdeps/vax/addmul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h
index d909cd2..1ebfa19 100644
--- a/sysdeps/vax/gmp-mparam.h
+++ b/sysdeps/vax/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s
index e2ff5a1..295638b 100644
--- a/sysdeps/vax/mul_1.s
+++ b/sysdeps/vax/mul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s
index a891c44..14ba343 100644
--- a/sysdeps/vax/sub_n.s
+++ b/sysdeps/vax/sub_n.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s
index c473937..5ff8d01 100644
--- a/sysdeps/vax/submul_1.s
+++ b/sysdeps/vax/submul_1.s
@@ -6,16 +6,16 @@
# This file is part of the GNU MP Library.
# The GNU MP Library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at your
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at your
# option) any later version.
# The GNU MP Library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
-# You should have received a copy of the GNU Library General Public License
+# You should have received a copy of the GNU Lesser General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s
index a50fc3e..4d29026 100644
--- a/sysdeps/z8000/add_n.s
+++ b/sysdeps/z8000/add_n.s
@@ -5,16 +5,16 @@
! This file is part of the GNU MP Library.
! The GNU MP Library is free software; you can redistribute it and/or modify
-! it under the terms of the GNU Library General Public License as published by
-! the Free Software Foundation; either version 2 of the License, or (at your
+! it under the terms of the GNU Lesser General Public License as published by
+! the Free Software Foundation; either version 2.1 of the License, or (at your
! option) any later version.
! The GNU MP Library is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! License for more details.
-! You should have received a copy of the GNU Library General Public License
+! You should have received a copy of the GNU Lesser General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! MA 02111-1307, USA.
diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h
index e0a303e..4216df6 100644
--- a/sysdeps/z8000/gmp-mparam.h
+++ b/sysdeps/z8000/gmp-mparam.h
@@ -5,16 +5,16 @@ Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.
The GNU MP Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
-You should have received a copy of the GNU Library General Public License
+You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s
index f1126b5..e449dfa 100644
--- a/sysdeps/z8000/mul_1.s
+++ b/sysdeps/z8000/mul_1.s
@@ -6,16 +6,16 @@
! This file is part of the GNU MP Library.
! The GNU MP Library is free software; you can redistribute it and/or modify
-! it under the terms of the GNU Library General Public License as published by
-! the Free Software Foundation; either version 2 of the License, or (at your
+! it under the terms of the GNU Lesser General Public License as published by
+! the Free Software Foundation; either version 2.1 of the License, or (at your
! option) any later version.
! The GNU MP Library is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! License for more details.
-! You should have received a copy of the GNU Library General Public License
+! You should have received a copy of the GNU Lesser General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! MA 02111-1307, USA.
diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s
index 272c671..c078775 100644
--- a/sysdeps/z8000/sub_n.s
+++ b/sysdeps/z8000/sub_n.s
@@ -6,16 +6,16 @@
! This file is part of the GNU MP Library.
! The GNU MP Library is free software; you can redistribute it and/or modify
-! it under the terms of the GNU Library General Public License as published by
-! the Free Software Foundation; either version 2 of the License, or (at your
+! it under the terms of the GNU Lesser General Public License as published by
+! the Free Software Foundation; either version 2.1 of the License, or (at your
! option) any later version.
! The GNU MP Library is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
! License for more details.
-! You should have received a copy of the GNU Library General Public License
+! You should have received a copy of the GNU Lesser General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
! MA 02111-1307, USA.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b440a5c6e91b29986fe2a772e76cd5e5b686c8d
commit 6b440a5c6e91b29986fe2a772e76cd5e5b686c8d
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jul 6 07:14:28 2001 +0000
Removed, we can use the generic Linux version.
diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure
deleted file mode 100644
index 5b36e71..0000000
--- a/sysdeps/unix/sysv/linux/alpha/configure
+++ /dev/null
@@ -1,51 +0,0 @@
- # Local configure fragment for sysdeps/unix/sysv/linux/alpha.
-
-# Don't bother trying to generate any glue code to be compatible with the
-# existing system library, because we are the only system library.
-inhibit_glue=yes
-
-if test -n "$sysheaders"; then
- OLD_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $SYSINCLUDES"
-fi
-echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
-echo "configure:13: checking installed Linux kernel header files" >&5
-if eval "test \"`echo '$''{'libc_cv_linux21100'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 18 "configure"
-#include "confdefs.h"
-#include <linux/version.h>
-int main() {
-#if LINUX_VERSION_CODE < (2 *65536+ 1 *256+ 100) /* 2.1.100 */
-eat flaming death
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:27: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- libc_cv_linux21100='2.1.100 or later'
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- libc_cv_linux21100='TOO OLD!'
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$libc_cv_linux21100" 1>&6
-if test "$libc_cv_linux21100" != '2.1.100 or later'; then
- { echo "configure: error: GNU libc requires kernel header files from
-Linux 2.1.100 or later to be installed before configuring.
-The kernel header files are found usually in /usr/include/asm and
-/usr/include/linux; make sure these directories use files from
-Linux 2.1.100 or later. This check uses <linux/version.h>, so
-make sure that file was built correctly when installing the kernel header
-files. To use kernel headers not from /usr/include/linux, use the
-configure option --with-headers." 1>&2; exit 1; }
-fi
-if test -n "$sysheaders"; then
- CFLAGS=$OLD_CFLAGS
-fi
diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in
deleted file mode 100644
index 690defa..0000000
--- a/sysdeps/unix/sysv/linux/alpha/configure.in
+++ /dev/null
@@ -1,36 +0,0 @@
-sinclude(./aclocal.m4)dnl Autoconf lossage
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/alpha.
-
-# Don't bother trying to generate any glue code to be compatible with the
-# existing system library, because we are the only system library.
-inhibit_glue=yes
-
-define([LIBC_LINUX_VERSION],[2.1.100])dnl
-if test -n "$sysheaders"; then
- OLD_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $SYSINCLUDES"
-fi
-define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
-AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
-AC_TRY_COMPILE([#include <linux/version.h>],
-[#if LINUX_VERSION_CODE < ]dnl
-patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
-[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
-eat flaming death
-#endif],
- libc_cv_linuxVER='LIBC_LINUX_VERSION or later',
- libc_cv_linuxVER='TOO OLD!')])
-if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
- AC_MSG_ERROR([GNU libc requires kernel header files from
-Linux LIBC_LINUX_VERSION or later to be installed before configuring.
-The kernel header files are found usually in /usr/include/asm and
-/usr/include/linux; make sure these directories use files from
-Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
-make sure that file was built correctly when installing the kernel header
-files. To use kernel headers not from /usr/include/linux, use the
-configure option --with-headers.])
-fi
-if test -n "$sysheaders"; then
- CFLAGS=$OLD_CFLAGS
-fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3214b89b3288616539a8d64fd3b03ad4e24ea19e
commit 3214b89b3288616539a8d64fd3b03ad4e24ea19e
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jul 6 04:56:23 2001 +0000
Update to LGPL v2.1.
diff --git a/bare/Makefile b/bare/Makefile
index 0407c23..ddfa6ac 100644
--- a/bare/Makefile
+++ b/bare/Makefile
@@ -3,20 +3,21 @@
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
#
+
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
subdir := bare
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 63c7d4b..4965984 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -3,19 +3,19 @@
# Contributed by Brendan Kehoe (brendan@zen.org).
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),db2)
CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1
diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S
index 7b639f5..40d5031 100644
--- a/sysdeps/alpha/__longjmp.S
+++ b/sysdeps/alpha/__longjmp.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define __ASSEMBLY__
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index 615f439..c4c921b 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Assembly stub to invoke _mcount(). Compiler generated code calls
this stub after executing a function's prologue and without saving any
diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
index 5bf040a..64a0882 100644
--- a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
+++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
@@ -1,21 +1,20 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
index 410aff4..3500e83 100644
--- a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
+++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
@@ -1,21 +1,20 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S
index 0dfcbea..05e00dd 100644
--- a/sysdeps/alpha/alphaev6/memchr.S
+++ b/sysdeps/alpha/alphaev6/memchr.S
@@ -4,19 +4,19 @@
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S
index e3af259..5e59a04 100644
--- a/sysdeps/alpha/alphaev6/memcpy.S
+++ b/sysdeps/alpha/alphaev6/memcpy.S
@@ -3,19 +3,19 @@
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Much of the information about 21264 scheduling/coding comes from:
diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S
index 363b3a5..e700d3d 100644
--- a/sysdeps/alpha/alphaev6/memset.S
+++ b/sysdeps/alpha/alphaev6/memset.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S
index 39d731d..3c3e7d7 100644
--- a/sysdeps/alpha/alphaev6/stxcpy.S
+++ b/sysdeps/alpha/alphaev6/stxcpy.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy a null-terminated string from SRC to DST.
diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S
index 1402791..21e94ba 100644
--- a/sysdeps/alpha/alphaev6/stxncpy.S
+++ b/sysdeps/alpha/alphaev6/stxncpy.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST.
diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S
index a6e8877..6d87008 100644
--- a/sysdeps/alpha/alphaev67/ffs.S
+++ b/sysdeps/alpha/alphaev67/ffs.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds the first bit set in an integer. */
diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/sysdeps/alpha/alphaev67/ffsll.S
index b755649..72ef094 100644
--- a/sysdeps/alpha/alphaev67/ffsll.S
+++ b/sysdeps/alpha/alphaev67/ffsll.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds the first bit set in a long. */
diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S
index 6626ecc..0d60afe 100644
--- a/sysdeps/alpha/alphaev67/rawmemchr.S
+++ b/sysdeps/alpha/alphaev67/rawmemchr.S
@@ -1,21 +1,20 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return pointer to first occurrence of CH in STR. */
diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S
index 6dcb366..bb9da0c 100644
--- a/sysdeps/alpha/alphaev67/stpcpy.S
+++ b/sysdeps/alpha/alphaev67/stpcpy.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@redhat.com>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy SRC to DEST returning the address of the terminating 0 in DEST. */
diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S
index d648b4d..4b23731 100644
--- a/sysdeps/alpha/alphaev67/stpncpy.S
+++ b/sysdeps/alpha/alphaev67/stpncpy.S
@@ -1,22 +1,21 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@redhat.com)
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy no more then N bytes from SRC to DEST, returning the address of
the terminating '\0' in DEST. */
diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S
index 88e48ce..3bd4789 100644
--- a/sysdeps/alpha/alphaev67/strcat.S
+++ b/sysdeps/alpha/alphaev67/strcat.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Append a null-terminated string from SRC to DST. */
diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S
index 3ab2655..9c1e88b 100644
--- a/sysdeps/alpha/alphaev67/strchr.S
+++ b/sysdeps/alpha/alphaev67/strchr.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return the address of a given character within a null-terminated
string, or null if it is not found. */
diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S
index ac8740f..bbe7cfc 100644
--- a/sysdeps/alpha/alphaev67/strlen.S
+++ b/sysdeps/alpha/alphaev67/strlen.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds length of a 0-terminated string. */
diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S
index 4e16f83..ae3257c 100644
--- a/sysdeps/alpha/alphaev67/strncat.S
+++ b/sysdeps/alpha/alphaev67/strncat.S
@@ -1,23 +1,22 @@
/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Append no more than COUNT characters from the null-terminated string SRC
to the null-terminated string DST. Always null-terminate the new DST. */
diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S
index 68874c9..cb51d21 100644
--- a/sysdeps/alpha/alphaev67/strrchr.S
+++ b/sysdeps/alpha/alphaev67/strrchr.S
@@ -1,22 +1,21 @@
/* Copyright (C) 2000 Free Software Foundation, Inc.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return the address of the last occurrence of a given character
within a null-terminated string, or null if it is not found. */
diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h
index 6ed2ee6..9388f23 100644
--- a/sysdeps/alpha/atomicity.h
+++ b/sysdeps/alpha/atomicity.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _ATOMICITY_H
#define _ATOMICITY_H 1
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index 779cd25..f711c8c 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* __bb_init_func is invoked at the beginning of each function, before
any registers have been saved. It is therefore safe to use any
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index a15ab31..fcd57d6 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SETJMP_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index a2aa3a5..87e575b 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Fill a block of memory with zeros. Optimized for the Alpha architecture:
diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S
index 6a5c442..2bc3d56 100644
--- a/sysdeps/alpha/div.S
+++ b/sysdeps/alpha/div.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index 881b324..9e0d591 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* The current Alpha chips don't provide hardware for integer
division. The C compiler expects the functions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 5a17ca2..1634e96 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
index 25ddaaf..08f6c04 100644
--- a/sysdeps/alpha/elf/crtbegin.S
+++ b/sysdeps/alpha/elf/crtbegin.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S
index 198aba8..576b868 100644
--- a/sysdeps/alpha/elf/crtend.S
+++ b/sysdeps/alpha/elf/crtend.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 54eaab6..b0cf119 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 91cce41..c73d822 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds the first bit set in an integer. Optimized for the Alpha
architecture. */
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index fe6c253..a9e89b4 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 2750af8..5e962c8 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index b7d5c3c..3fb6ec2 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -4,19 +4,19 @@
Contributed by David Mosberger-Tang.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index 295a1c3..a74e353 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -1,22 +1,21 @@
/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined(_IEEE_FP_INEXACT)
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 7777416..b7176e0 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c
index 7359e14..98c33ca 100644
--- a/sysdeps/alpha/fpu/fedisblxcpt.c
+++ b/sysdeps/alpha/fpu/fedisblxcpt.c
@@ -4,19 +4,19 @@
Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c
index b36e846..80d657e 100644
--- a/sysdeps/alpha/fpu/feenablxcpt.c
+++ b/sysdeps/alpha/fpu/feenablxcpt.c
@@ -4,19 +4,19 @@
Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index c96674f..c1950fa 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c
index c0de38f..ccc79e4 100644
--- a/sysdeps/alpha/fpu/fegetexcept.c
+++ b/sysdeps/alpha/fpu/fegetexcept.c
@@ -4,19 +4,19 @@
Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c
index f64fee7..995aee8 100644
--- a/sysdeps/alpha/fpu/fegetround.c
+++ b/sysdeps/alpha/fpu/fegetround.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c
index d683a37..77d4cc1 100644
--- a/sysdeps/alpha/fpu/feholdexcpt.c
+++ b/sysdeps/alpha/fpu/feholdexcpt.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h
index 7c58be5..f1d187d 100644
--- a/sysdeps/alpha/fpu/fenv_libc.h
+++ b/sysdeps/alpha/fpu/fenv_libc.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_LIBC_H
#define _FENV_LIBC_H 1
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 45d25bb..63b7240 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c
index 42a8b62..c4dc196 100644
--- a/sysdeps/alpha/fpu/fesetround.c
+++ b/sysdeps/alpha/fpu/fesetround.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index 6904406..c798070 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index f85d7a2..c28e913 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
index a2cf936..f2214cb 100644
--- a/sysdeps/alpha/fpu/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -4,19 +4,19 @@
Contributed by Olaf Flebbe.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _ALPHA_FPU_CONTROL_H
#define _ALPHA_FPU_CONTROL_H
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 3e8ce76..7f18f39 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index 25f5138..d198731 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c
index 9c006de..a4b3081 100644
--- a/sysdeps/alpha/fpu/ftestexcept.c
+++ b/sysdeps/alpha/fpu/ftestexcept.c
@@ -4,19 +4,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv_libc.h>
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
index f30db00..a7a46bb 100644
--- a/sysdeps/alpha/fpu/s_ceil.c
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c
index 35c51a2..aba1697 100644
--- a/sysdeps/alpha/fpu/s_ceilf.c
+++ b/sysdeps/alpha/fpu/s_ceilf.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_copysign.c b/sysdeps/alpha/fpu/s_copysign.c
index 5c8d827..e86778e 100644
--- a/sysdeps/alpha/fpu/s_copysign.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c
index d2c5d88..f4b846b 100644
--- a/sysdeps/alpha/fpu/s_copysignf.c
+++ b/sysdeps/alpha/fpu/s_copysignf.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_fabs.c b/sysdeps/alpha/fpu/s_fabs.c
index fb446d8..f7a2f93 100644
--- a/sysdeps/alpha/fpu/s_fabs.c
+++ b/sysdeps/alpha/fpu/s_fabs.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_fabsf.c b/sysdeps/alpha/fpu/s_fabsf.c
index ec53907..35e16bf 100644
--- a/sysdeps/alpha/fpu/s_fabsf.c
+++ b/sysdeps/alpha/fpu/s_fabsf.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index b6d01f5..c6872f5 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index 624e7c8..fd1ddab 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c
index 7309b41..61cba04 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c
index 044f7e5..d5d019d 100644
--- a/sysdeps/alpha/fpu/s_rintf.c
+++ b/sysdeps/alpha/fpu/s_rintf.c
@@ -3,19 +3,19 @@
Contributed by Richard Henderson.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 193986e..eb4fbd2 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index d5d4467..f1ef754 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index c705d1e..81b48cd 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h
index 5014acd..5f5522c 100644
--- a/sysdeps/alpha/machine-gmon.h
+++ b/sysdeps/alpha/machine-gmon.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define _MCOUNT_DECL(from, self) \
void __mcount (u_long from, u_long self)
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index c4e1d5e..b50b69a 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger (davidm@cs.arizona.edu).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds characters in a memory area. Optimized for the Alpha:
diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S
index 6ee99c2..d621aee 100644
--- a/sysdeps/alpha/memset.S
+++ b/sysdeps/alpha/memset.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Fill a block of memory with a character. Optimized for the Alpha
architecture:
diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h
index 4b8f455..3d84160 100644
--- a/sysdeps/alpha/memusage.h
+++ b/sysdeps/alpha/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; })
diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h
index 9096081..957edaf 100644
--- a/sysdeps/alpha/nscd-types.h
+++ b/sysdeps/alpha/nscd-types.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdint.h>
diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S
index bbf54a9..521feaf 100644
--- a/sysdeps/alpha/rawmemchr.S
+++ b/sysdeps/alpha/rawmemchr.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return pointer to first occurrence of CH in STR. */
diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S
index be5b1d0..51a5e22 100644
--- a/sysdeps/alpha/s_copysign.S
+++ b/sysdeps/alpha/s_copysign.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
index 00698d6..dd3b584 100644
--- a/sysdeps/alpha/s_fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@azstarnet.com>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 299bd4d..b3bc38c 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define __ASSEMBLY__
diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h
index dfaafb0..0a281bd 100644
--- a/sysdeps/alpha/stackinfo.h
+++ b/sysdeps/alpha/stackinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
index 46b09d5..1ed7442 100644
--- a/sysdeps/alpha/stpcpy.S
+++ b/sysdeps/alpha/stpcpy.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy a null-terminated string from SRC to DST. Return a pointer
to the null-terminator in the source. */
diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S
index 90470cf..0a32356 100644
--- a/sysdeps/alpha/stpncpy.S
+++ b/sysdeps/alpha/stpncpy.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson (rth@tamu.edu)
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST. If SRC does not cover all of COUNT, the balance is
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
index 433ca9f..d385c83 100644
--- a/sysdeps/alpha/strcat.S
+++ b/sysdeps/alpha/strcat.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Append a null-terminated string from SRC to DST. */
diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S
index e35b44a..5643df4 100644
--- a/sysdeps/alpha/strchr.S
+++ b/sysdeps/alpha/strchr.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson (rth@tamu.edu)
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return the address of a given character within a null-terminated
string, or null if it is not found.
diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S
index 8633a6c..ee87b4f 100644
--- a/sysdeps/alpha/strcmp.S
+++ b/sysdeps/alpha/strcmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Bytewise compare two null-terminated strings. */
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
index 2fa6318..11dc8e1 100644
--- a/sysdeps/alpha/strcpy.S
+++ b/sysdeps/alpha/strcpy.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy a null-terminated string from SRC to DST. Return a pointer
to the null-terminator in the source. */
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 60be29c..66b1731 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Finds length of a 0-terminated string. Optimized for the Alpha
architecture:
diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S
index 2c39cc0..ddf686f 100644
--- a/sysdeps/alpha/strncat.S
+++ b/sysdeps/alpha/strncat.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Append no more than COUNT characters from the null-terminated string SRC
to the null-terminated string DST. Always null-terminate the new DST. */
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
index 12e44e4..f0dcfb9 100644
--- a/sysdeps/alpha/strncmp.S
+++ b/sysdeps/alpha/strncmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Bytewise compare two null-terminated strings of length no longer than N. */
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
index 97d7416..575c907 100644
--- a/sysdeps/alpha/strncpy.S
+++ b/sysdeps/alpha/strncpy.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST. If SRC does not cover all of COUNT, the balance is
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index 0faa8cc..e5e847f 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Return the address of the last occurrence of a given character
within a null-terminated string, or null if it is not found.
diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S
index dd5ea80..5ba2d43 100644
--- a/sysdeps/alpha/stxcpy.S
+++ b/sysdeps/alpha/stxcpy.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy a null-terminated string from SRC to DST.
diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S
index b1be778..9330f6d 100644
--- a/sysdeps/alpha/stxncpy.S
+++ b/sysdeps/alpha/stxncpy.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST.
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index bccec88..a1a7444 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -5,19 +5,19 @@
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <bstring.h>
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 742e0ba..7b30160 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h
index c1f3b03..1a437a6 100644
--- a/sysdeps/arm/atomicity.h
+++ b/sysdeps/arm/atomicity.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _ATOMICITY_H
#define _ATOMICITY_H 1
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 841b4b0..625cdc5 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -5,19 +5,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index 6d87379..e0a4657 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. ARM version. */
diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h
index 094f901..206f956 100644
--- a/sysdeps/arm/bits/string.h
+++ b/sysdeps/arm/bits/string.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _STRING_H
# error "Never use <bits/string.h> directly; include <string.h> instead."
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index 5cecc2a..649e89e 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
index bfa9552..d227ba6 100644
--- a/sysdeps/arm/bsd-setjmp.S
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 75c37c5..ba515eb 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef dl_machine_h
#define dl_machine_h
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 089591f..8d60b3d 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This is the canonical entry point, usually the first thing in the text
segment.
diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S
index 2972ff6..90efeec 100644
--- a/sysdeps/arm/fpu/__longjmp.S
+++ b/sysdeps/arm/fpu/__longjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h
index 3c9e286..7bd2423 100644
--- a/sysdeps/arm/fpu/bits/fenv.h
+++ b/sysdeps/arm/fpu/bits/fenv.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
index 426fec7..44d7f0d 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index a9fb9f3..dd85243 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. ARM version. */
diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c
index 319eed8..c6a53df 100644
--- a/sysdeps/arm/fpu/fclrexcpt.c
+++ b/sysdeps/arm/fpu/fclrexcpt.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c
index e41bd52..91f60a9 100644
--- a/sysdeps/arm/fpu/fedisblxcpt.c
+++ b/sysdeps/arm/fpu/fedisblxcpt.c
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 2001.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c
index 24c4363..e77e45a 100644
--- a/sysdeps/arm/fpu/feenablxcpt.c
+++ b/sysdeps/arm/fpu/feenablxcpt.c
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 2001.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
index 17ed990..0b40f18 100644
--- a/sysdeps/arm/fpu/fegetenv.c
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c
index eda7b6d..653c8d5 100644
--- a/sysdeps/arm/fpu/fegetexcept.c
+++ b/sysdeps/arm/fpu/fegetexcept.c
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 2001
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c
index 5f354bb..6bf65f5 100644
--- a/sysdeps/arm/fpu/fegetround.c
+++ b/sysdeps/arm/fpu/fegetround.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c
index 3422d54..203b068 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/fpu/feholdexcpt.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index 09d5f39..5bc1978 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c
index 04eb09c..bdb849f 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/fpu/fesetround.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h
index dfcfaab..65912e4 100644
--- a/sysdeps/arm/fpu/fpu_control.h
+++ b/sysdeps/arm/fpu/fpu_control.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
index 4e8a546..75cd1ba 100644
--- a/sysdeps/arm/fpu/fraiseexcpt.c
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c
index 485781e..4e1d2cb 100644
--- a/sysdeps/arm/fpu/fsetexcptflg.c
+++ b/sysdeps/arm/fpu/fsetexcptflg.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <math.h>
diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c
index 691d3e1..328bcb0 100644
--- a/sysdeps/arm/fpu/ftestexcept.c
+++ b/sysdeps/arm/fpu/ftestexcept.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
index b72900c..8432836 100644
--- a/sysdeps/arm/fpu/setjmp.S
+++ b/sysdeps/arm/fpu/setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
index 5d7ac0f..2a3f297 100644
--- a/sysdeps/arm/frame.h
+++ b/sysdeps/arm/frame.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This is the APCS stack backtrace structure. */
struct layout
diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h
index 73f7d6a..629b97f 100644
--- a/sysdeps/arm/ieee754.h
+++ b/sysdeps/arm/ieee754.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _IEEE754_H
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index 1e90c84..cc8da31 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index 3909b5e..039dfd9 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
so we must use an assembly stub. */
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index 567cc39..6ba8486 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -3,19 +3,19 @@
Contributed by Philip Blundell <philb@gnu.org>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h
index 86ab085..c558a06 100644
--- a/sysdeps/arm/memusage.h
+++ b/sysdeps/arm/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 97f76cd..2e8c694 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h
index b746e08..2410ba9 100644
--- a/sysdeps/arm/stackinfo.h
+++ b/sysdeps/arm/stackinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
index 0e360e2..7ebfe63 100644
--- a/sysdeps/arm/strlen.S
+++ b/sysdeps/arm/strlen.S
@@ -3,19 +3,19 @@
Code contributed by Matthew Wilcox <willy@odie.barnet.ac.uk>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h
index 999c01c..9c800bf 100644
--- a/sysdeps/arm/sys/ucontext.h
+++ b/sysdeps/arm/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* System V/ARM ABI compliant context switching support. */
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 6247f9c..8d5ab95 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/sysdep.h>
diff --git a/sysdeps/cris/Makefile b/sysdeps/cris/Makefile
index 3df21b9..1ecb78c 100644
--- a/sysdeps/cris/Makefile
+++ b/sysdeps/cris/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
# We don't support long doubles as a distinct type. We don't need to set
# this variable; it's here mostly for documentational purposes.
diff --git a/sysdeps/cris/__longjmp.S b/sysdeps/cris/__longjmp.S
index a6188d0..cce27ca 100644
--- a/sysdeps/cris/__longjmp.S
+++ b/sysdeps/cris/__longjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/cris/_mcount.S b/sysdeps/cris/_mcount.S
index d6e5f74..a939131 100644
--- a/sysdeps/cris/_mcount.S
+++ b/sysdeps/cris/_mcount.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* FIXME: This isn't implemented yet. This is just a machine-specific
stub. Perhaps a real implementation can make use of it. */
diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h
index 9b0b2a1..0d7825b 100644
--- a/sysdeps/cris/bits/setjmp.h
+++ b/sysdeps/cris/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf', CRIS version. */
diff --git a/sysdeps/cris/bits/string.h b/sysdeps/cris/bits/string.h
index 9e4e6d5..fa893d3 100644
--- a/sysdeps/cris/bits/string.h
+++ b/sysdeps/cris/bits/string.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _STRING_H
# error "Never use <bits/string.h> directly; include <string.h> instead."
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
index beec381..c6d2558 100644
--- a/sysdeps/cris/dl-machine.h
+++ b/sysdeps/cris/dl-machine.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef dl_machine_h
#define dl_machine_h
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index e740aaa..e7f1d67 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/cris/machine-gmon.h b/sysdeps/cris/machine-gmon.h
index 5455c82..2f36a34 100644
--- a/sysdeps/cris/machine-gmon.h
+++ b/sysdeps/cris/machine-gmon.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
void __mcount_internal (unsigned long frompc, unsigned long selfpc);
diff --git a/sysdeps/cris/memcopy.h b/sysdeps/cris/memcopy.h
index 7bcf634..134d361 100644
--- a/sysdeps/cris/memcopy.h
+++ b/sysdeps/cris/memcopy.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/cris/memusage.h b/sysdeps/cris/memusage.h
index 696c56e..58b57ff 100644
--- a/sysdeps/cris/memusage.h
+++ b/sysdeps/cris/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* No asm variables, just for reasons of solid healthy paranoia. */
#define GETSP() \
diff --git a/sysdeps/cris/setjmp.S b/sysdeps/cris/setjmp.S
index d773ac9..c5a512f 100644
--- a/sysdeps/cris/setjmp.S
+++ b/sysdeps/cris/setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/cris/sysdep.h b/sysdeps/cris/sysdep.h
index ada5de3..913d5ad 100644
--- a/sysdeps/cris/sysdep.h
+++ b/sysdeps/cris/sysdep.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/sysdep.h>
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index 744c89c..22be575 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -3,19 +3,19 @@
# Contributed by David Huggins-Daines (dhd@debian.org)
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
# We used to need this since the build process uses ld -r. Now we use
# ld -r --unique=.text* which does more or less the same thing, but better.
diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S
index 418a0b4..dee4d9f 100644
--- a/sysdeps/hppa/__longjmp.S
+++ b/sysdeps/hppa/__longjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _SETJMP_H
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index f72cdb5..7fb2af7 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. HPPA version. */
diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S
index 487e8c7..6aacd48 100644
--- a/sysdeps/hppa/bsd-_setjmp.S
+++ b/sysdeps/hppa/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S
index 2614b49..04ddba4 100644
--- a/sysdeps/hppa/bsd-setjmp.S
+++ b/sysdeps/hppa/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c
index 8a2c1c2..6cf8d37 100644
--- a/sysdeps/hppa/dl-fptr.c
+++ b/sysdeps/hppa/dl-fptr.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <string.h>
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 118c4d0..d15732b 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Like IA-64, PA-RISC needs more information from the symbol lookup
function than just the address. */
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index f0c1b13..e8e2ab2 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef dl_machine_h
#define dl_machine_h 1
diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
index 49c1216..1aec19a 100644
--- a/sysdeps/hppa/dl-symaddr.c
+++ b/sysdeps/hppa/dl-symaddr.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <ldsodefs.h>
#include <dl-machine.h>
diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c
index d2e07ea..d325d53 100644
--- a/sysdeps/hppa/elf/initfini.c
+++ b/sysdeps/hppa/elf/initfini.c
@@ -2,29 +2,20 @@
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Library General Public
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Library General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Library General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file is compiled into assembly code which is then munged by a sed
script into two files: crti.s and crtn.s.
diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h
index 7d25b99..c5f8c43 100644
--- a/sysdeps/hppa/fpu/bits/fenv.h
+++ b/sysdeps/hppa/fpu/bits/fenv.h
@@ -3,19 +3,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c
index e8049e6..8ad67b9 100644
--- a/sysdeps/hppa/fpu/fclrexcpt.c
+++ b/sysdeps/hppa/fpu/fclrexcpt.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c
index 95c362a..aac6bbf 100644
--- a/sysdeps/hppa/fpu/fedisblxcpt.c
+++ b/sysdeps/hppa/fpu/fedisblxcpt.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c
index ac46722..9ce3ca8 100644
--- a/sysdeps/hppa/fpu/feenablxcpt.c
+++ b/sysdeps/hppa/fpu/feenablxcpt.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c
index 0fe9773..1ed18da 100644
--- a/sysdeps/hppa/fpu/fegetenv.c
+++ b/sysdeps/hppa/fpu/fegetenv.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c
index 6bf3f64..efd1d7d 100644
--- a/sysdeps/hppa/fpu/fegetexcept.c
+++ b/sysdeps/hppa/fpu/fegetexcept.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c
index 6e07f86..aefedbc 100644
--- a/sysdeps/hppa/fpu/fegetround.c
+++ b/sysdeps/hppa/fpu/fegetround.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
index 1062178..2713336 100644
--- a/sysdeps/hppa/fpu/feholdexcpt.c
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <string.h>
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
index 4bfbefd..f0c6856 100644
--- a/sysdeps/hppa/fpu/fesetenv.c
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -6,19 +6,19 @@
Andreas Schwab <schwab@suse.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c
index 0d5858f..7634b1e 100644
--- a/sysdeps/hppa/fpu/fesetround.c
+++ b/sysdeps/hppa/fpu/fesetround.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index 7e2d715..c61b7b2 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c
index 800b1f4..27766ec 100644
--- a/sysdeps/hppa/fpu/fgetexcptflg.c
+++ b/sysdeps/hppa/fpu/fgetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c
index c0cce6e..5164bc4 100644
--- a/sysdeps/hppa/fpu/fraiseexcpt.c
+++ b/sysdeps/hppa/fpu/fraiseexcpt.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <float.h>
diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c
index 2e369ea..343ddad 100644
--- a/sysdeps/hppa/fpu/fsetexcptflg.c
+++ b/sysdeps/hppa/fpu/fsetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <math.h>
diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c
index 15d1491..d08d4d6 100644
--- a/sysdeps/hppa/fpu/ftestexcept.c
+++ b/sysdeps/hppa/fpu/ftestexcept.c
@@ -4,19 +4,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h
index e6764da..0a234f1 100644
--- a/sysdeps/hppa/frame.h
+++ b/sysdeps/hppa/frame.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* PA stacks grow upwards. */
#define INNER_THAN >
diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h
index 5a06b7b..d3dd10e 100644
--- a/sysdeps/hppa/memusage.h
+++ b/sysdeps/hppa/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; })
#define STACK_GROWS_UPWARD 1
diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S
index 0890975..f10a7a3 100644
--- a/sysdeps/hppa/setjmp.S
+++ b/sysdeps/hppa/setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ASM
diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h
index e446c42..318de71 100644
--- a/sysdeps/hppa/stackinfo.h
+++ b/sysdeps/hppa/stackinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h
index 2ac9840..1f47fad 100644
--- a/sysdeps/hppa/sysdep.h
+++ b/sysdeps/hppa/sysdep.h
@@ -4,19 +4,19 @@
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/sysdep.h>
#include <sys/syscall.h>
diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h
index d381acd..3bb9ba5 100644
--- a/sysdeps/i860/memcopy.h
+++ b/sysdeps/i860/memcopy.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
index dc09ba9..979696e 100644
--- a/sysdeps/i960/ffs.c
+++ b/sysdeps/i960/ffs.c
@@ -6,19 +6,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index a056360..c44b2d1 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index e6ec43c..89ff5ba 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
#include <stdlib.h>
diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h
index fbb0e2f..8e2a4ca 100644
--- a/sysdeps/m68k/asm-syntax.h
+++ b/sysdeps/m68k/asm-syntax.h
@@ -1,23 +1,22 @@
/* Definitions for 68k syntax variations.
Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
-
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef HAVE_ELF
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index efdc7af..ea6aa96 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index 9e15891..ad52534 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index aa376a0..2c2b3ee 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. m68k version. */
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index f155152..a0e32bd 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index 8074719..e146247 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e2a12cb..c4849b0 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef dl_machine_h
#define dl_machine_h
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index cf286f1..eda7355 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This is the canonical entry point, usually the first thing in the text
segment. The SVR4/m68k ABI says that when the entry point runs,
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index bed3f46..a296121 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -5,19 +5,19 @@
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define ffsl __something_else
#include <string.h>
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index 7d489b3..7c0bcb6 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 4eec5d8..90146f1 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index cb59773..dec89d8 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef __GNUC__
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 4226b73..c9f6c6a 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index 6a5af2a..551b14d 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 9695a86..bd229ae 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index b461ad8..0b6cee6 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index 7f56199..88edba1 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -3,19 +3,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c
index f35bb12..bcd7a3f 100644
--- a/sysdeps/m68k/fpu/fclrexcpt.c
+++ b/sysdeps/m68k/fpu/fclrexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c
index ad97e86..416e0ba 100644
--- a/sysdeps/m68k/fpu/fedisblxcpt.c
+++ b/sysdeps/m68k/fpu/fedisblxcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c
index 7be0705..f963acf 100644
--- a/sysdeps/m68k/fpu/feenablxcpt.c
+++ b/sysdeps/m68k/fpu/feenablxcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index 7a5a28b..6c94b07 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c
index 03b8735..b34b2c1 100644
--- a/sysdeps/m68k/fpu/fegetexcept.c
+++ b/sysdeps/m68k/fpu/fegetexcept.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c
index 1837a84..74fc56f 100644
--- a/sysdeps/m68k/fpu/fegetround.c
+++ b/sysdeps/m68k/fpu/fegetround.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index 44a7c7d..88fb1c5 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index 9149c72..d3cac1c 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c
index 8e06a15..956325d 100644
--- a/sysdeps/m68k/fpu/fesetround.c
+++ b/sysdeps/m68k/fpu/fesetround.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c
index 6ebc0c6..2a68313 100644
--- a/sysdeps/m68k/fpu/feupdateenv.c
+++ b/sysdeps/m68k/fpu/feupdateenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c
index a0d1ec5..764b900 100644
--- a/sysdeps/m68k/fpu/fgetexcptflg.c
+++ b/sysdeps/m68k/fpu/fgetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index 592cc5a..d410fde 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <float.h>
diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c
index 51892a7..51b086a 100644
--- a/sysdeps/m68k/fpu/fsetexcptflg.c
+++ b/sysdeps/m68k/fpu/fsetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c
index c092ce1..3157c90 100644
--- a/sysdeps/m68k/fpu/ftestexcept.c
+++ b/sysdeps/m68k/fpu/ftestexcept.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 85f744f..dd6c215 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 05cdcee..652ca0e 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index 09e5ac8..28f6a80 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h
index 7fa8144..bbcaf84 100644
--- a/sysdeps/m68k/fpu/mathimpl.h
+++ b/sysdeps/m68k/fpu/mathimpl.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains the definitions of the inline math functions that
are only used internally inside libm, not visible to the user. */
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index 29f2eca..8cca490 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c
index 6f1232f..d302d3d 100644
--- a/sysdeps/m68k/fpu/s_ccos.c
+++ b/sysdeps/m68k/fpu/s_ccos.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
index 437d42d..1698881 100644
--- a/sysdeps/m68k/fpu/s_ccosh.c
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index 899fdc4..4babf12 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c
index 11e217b..7c590e4 100644
--- a/sysdeps/m68k/fpu/s_csin.c
+++ b/sysdeps/m68k/fpu/s_csin.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
index 4dfbe12..dafb82a 100644
--- a/sysdeps/m68k/fpu/s_csinh.c
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c
index 74aa720..9a38900 100644
--- a/sysdeps/m68k/fpu/s_fpclassifyl.c
+++ b/sysdeps/m68k/fpu/s_fpclassifyl.c
@@ -5,19 +5,19 @@
Fixed for m68k by Andreas Schwab <schwab@suse.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 61e3298..0cdb577 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 15cff29..ee1e397 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "mathimpl.h"
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 03dc26d..e654e88 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
index b733d77..8f24429 100644
--- a/sysdeps/m68k/fpu/s_llrint.c
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c
index b9ba5a0..bd573b2 100644
--- a/sysdeps/m68k/fpu/s_llrintf.c
+++ b/sysdeps/m68k/fpu/s_llrintf.c
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c
index c874bfd..d749f35 100644
--- a/sysdeps/m68k/fpu/s_llrintl.c
+++ b/sysdeps/m68k/fpu/s_llrintl.c
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c
index 89e9dba..0a23f29 100644
--- a/sysdeps/m68k/fpu/s_lrint.c
+++ b/sysdeps/m68k/fpu/s_lrint.c
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index d19f2a7..2f5a83d 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "mathimpl.h"
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c
index 10be1ae..5b65f85 100644
--- a/sysdeps/m68k/fpu/s_remquo.c
+++ b/sysdeps/m68k/fpu/s_remquo.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index c151b2a..d76d94d 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define scalbln __no_scalbln_decl
#define scalblnf __no_scalblnf_decl
diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c
index 8d84ece..5df4a5a 100644
--- a/sysdeps/m68k/fpu/s_sincos.c
+++ b/sysdeps/m68k/fpu/s_sincos.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h
index 2f38aac..c5a0f71 100644
--- a/sysdeps/m68k/fpu/switch/68881-sw.h
+++ b/sysdeps/m68k/fpu/switch/68881-sw.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _68881_SWITCH_H
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
index 67218e7..c041071 100644
--- a/sysdeps/m68k/fpu/switch/Makefile
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),math)
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c
index 44e2b4d..e055817 100644
--- a/sysdeps/m68k/fpu/switch/switch.c
+++ b/sysdeps/m68k/fpu/switch/switch.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <signal.h>
#include <68881-sw.h>
diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h
index 28405b6..86358e6 100644
--- a/sysdeps/m68k/fpu_control.h
+++ b/sysdeps/m68k/fpu_control.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h
index d74b819..4639b01 100644
--- a/sysdeps/m68k/m68020/atomicity.h
+++ b/sysdeps/m68k/m68020/atomicity.h
@@ -1,23 +1,22 @@
/* Low-level functions for atomic operations. m680x0 version, x >= 2.
Copyright (C) 1997 Free Software Foundation, Inc.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _ATOMICITY_H
#define _ATOMICITY_H 1
diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m68020/bits/string.h
index 6462ef0..84be224 100644
--- a/sysdeps/m68k/m68020/bits/string.h
+++ b/sysdeps/m68k/m68020/bits/string.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _STRING_H
# error "Never use <bits/string.h> directly; include <string.h> instead."
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
index d69b806..bd4da6a 100644
--- a/sysdeps/m68k/memchr.S
+++ b/sysdeps/m68k/memchr.S
@@ -6,19 +6,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include "asm-syntax.h"
diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h
index b4d4614..cdc268a 100644
--- a/sysdeps/m68k/memcopy.h
+++ b/sysdeps/m68k/memcopy.h
@@ -4,19 +4,19 @@
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h
index 72138e2..bb22c0a 100644
--- a/sysdeps/m68k/memusage.h
+++ b/sysdeps/m68k/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S
index 74eb1ca..f52b74b 100644
--- a/sysdeps/m68k/rawmemchr.S
+++ b/sysdeps/m68k/rawmemchr.S
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include "asm-syntax.h"
diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c
index c94104d..40e0b79 100644
--- a/sysdeps/m68k/s_isinfl.c
+++ b/sysdeps/m68k/s_isinfl.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "ieee754.h"
diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c
index a285850..0a9ddf9 100644
--- a/sysdeps/m68k/s_isnanl.c
+++ b/sysdeps/m68k/s_isnanl.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
#include "ieee754.h"
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 1de9f68..0456862 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h
index a1b8e06..66e5a17 100644
--- a/sysdeps/m68k/stackinfo.h
+++ b/sysdeps/m68k/stackinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S
index 45d02d0..af91dc7 100644
--- a/sysdeps/m68k/strchr.S
+++ b/sysdeps/m68k/strchr.S
@@ -5,19 +5,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include "asm-syntax.h"
diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S
index 45e7616..3fee2b2 100644
--- a/sysdeps/m68k/strchrnul.S
+++ b/sysdeps/m68k/strchrnul.S
@@ -6,19 +6,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include "asm-syntax.h"
diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h
index 1acfee4..857ed6b 100644
--- a/sysdeps/m68k/sys/ucontext.h
+++ b/sysdeps/m68k/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* System V/m68k ABI compliant context switching support. */
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
index 1770a09..554b92d 100644
--- a/sysdeps/m68k/sysdep.h
+++ b/sysdeps/m68k/sysdep.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/sysdep.h>
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index 7aac897..fe78ebc 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -5,19 +5,19 @@
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <bstring.h>
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 1da8b25..80f8750 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h
index d12e734..b737525 100644
--- a/sysdeps/mach/alpha/machine-sp.h
+++ b/sysdeps/mach/alpha/machine-sp.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MACHINE_SP_H
#define _MACHINE_SP_H
diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S
index 615357d..8cb85bf 100644
--- a/sysdeps/mach/alpha/syscall.S
+++ b/sysdeps/mach/alpha/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <mach/machine/alpha_instruction.h>
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 5513075..9e7ace0 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define MOVE(x,y) mov x, y
diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h
index dc30a79..0c9527b 100644
--- a/sysdeps/mach/alpha/thread_state.h
+++ b/sysdeps/mach/alpha/thread_state.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <mach/machine/thread_status.h>
diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h
index 8b425d2..8c71d40 100644
--- a/sysdeps/mach/hppa/machine-lock.h
+++ b/sysdeps/mach/hppa/machine-lock.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
index a2c8163..158db61 100644
--- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c
index 072db33..3bceb64 100644
--- a/sysdeps/mach/hurd/alpha/exc2signal.c
+++ b/sysdeps/mach/hurd/alpha/exc2signal.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
index 07dff56..eb27649 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ts.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include <setjmp.h>
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index 102b023..e520b35 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index a1d0dfb..152f935 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include "thread_state.h"
diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
index f0b4ff7..0042359 100644
--- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
index b046b94..bbb5b96 100644
--- a/sysdeps/mach/hurd/hppa/trampoline.c
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include "thread_state.h"
diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h
index 910618e..deea841 100644
--- a/sysdeps/mach/hurd/mips/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c
index e4955e4..ce2d5db 100644
--- a/sysdeps/mach/hurd/mips/dl-machine.c
+++ b/sysdeps/mach/hurd/mips/dl-machine.c
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <link.h>
diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c
index 235b2e2..c505ae5 100644
--- a/sysdeps/mach/hurd/mips/exc2signal.c
+++ b/sysdeps/mach/hurd/mips/exc2signal.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c
index 619ef99..05f48a3 100644
--- a/sysdeps/mach/hurd/mips/init-fault.c
+++ b/sysdeps/mach/hurd/mips/init-fault.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include <mach/thread_status.h>
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 72c7a61..b81fe3c 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <stdio.h>
diff --git a/sysdeps/mach/hurd/mips/intr-msg.h b/sysdeps/mach/hurd/mips/intr-msg.h
index 7d155f6..16c7897 100644
--- a/sysdeps/mach/hurd/mips/intr-msg.h
+++ b/sysdeps/mach/hurd/mips/intr-msg.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef __mips64
diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c
index df04900..66ee7b6 100644
--- a/sysdeps/mach/hurd/mips/longjmp-ctx.c
+++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c
index ea62bb1..4c69e4e 100644
--- a/sysdeps/mach/hurd/mips/longjmp-ts.c
+++ b/sysdeps/mach/hurd/mips/longjmp-ts.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include <setjmp.h>
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 0e77573..a9f7673 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 284b95c..dd42dfc 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <hurd/signal.h>
#include <hurd/userlink.h>
diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c
index de2ec58..2a283e3 100644
--- a/sysdeps/mach/mips/cacheflush.c
+++ b/sysdeps/mach/mips/cacheflush.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <mach.h>
#include <mach/vm_attributes.h>
diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h
index 91d39e3..eccc720 100644
--- a/sysdeps/mach/mips/machine-lock.h
+++ b/sysdeps/mach/mips/machine-lock.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h
index e1217c3..144356a 100644
--- a/sysdeps/mach/mips/machine-sp.h
+++ b/sysdeps/mach/mips/machine-sp.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MACHINE_SP_H
#define _MACHINE_SP_H
diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S
index 9936772..f2fc29d 100644
--- a/sysdeps/mach/mips/syscall.S
+++ b/sysdeps/mach/mips/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h
index 45cbf69..8136f95 100644
--- a/sysdeps/mach/mips/sysdep.h
+++ b/sysdeps/mach/mips/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define LOSE asm volatile ("1: b 1b")
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index 7aa5598..a0800de 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE
#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 66810a5..750a71f 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
#include <stdlib.h>
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index d6e1767..1fe1b7a 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -1,22 +1,21 @@
/* Low-level functions for atomic operations. Mips version.
-
Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MIPS_ATOMICITY_H
#define _MIPS_ATOMICITY_H 1
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 006eeb6..2380caa 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DLFCN_H
# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
index 4e74036..24e0694 100644
--- a/sysdeps/mips/bits/fenv.h
+++ b/sysdeps/mips/bits/fenv.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_H
# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 908b6d5..8cb53ee 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,20 +1,21 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SETJMP_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 919c8a2..2a4e321 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 66a0daa..0aea011 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h
index bff02c8..dfd03ba 100644
--- a/sysdeps/mips/dl-dtprocnum.h
+++ b/sysdeps/mips/dl-dtprocnum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Number of extra dynamic section entries for this architecture. By
default there are none. */
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 6a7d66c..4e0b591 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -4,19 +4,19 @@
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* FIXME: Profiling of shared libraries is not implemented yet. */
#ifndef dl_machine_h
diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h
index 2dc783b..4054391 100644
--- a/sysdeps/mips/elf/ldsodefs.h
+++ b/sysdeps/mips/elf/ldsodefs.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* The MIPS ABI specifies that the dynamic section has to be read-only. */
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 19bf93a..e129930 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define __ASSEMBLY__ 1
#include <entry.h>
diff --git a/sysdeps/mips/fpregdef.h b/sysdeps/mips/fpregdef.h
index 25b93ca..6f76d11 100644
--- a/sysdeps/mips/fpregdef.h
+++ b/sysdeps/mips/fpregdef.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FPREGDEF_H
#define _FPREGDEF_H
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 9ed8486..9fb2d7e 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c
index 2d2ec8c..62e1a71 100644
--- a/sysdeps/mips/fpu/fedisblxcpt.c
+++ b/sysdeps/mips/fpu/fedisblxcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fenv_libc.h>
diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c
index 4e63c66..4c28581 100644
--- a/sysdeps/mips/fpu/feenablxcpt.c
+++ b/sysdeps/mips/fpu/feenablxcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fenv_libc.h>
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
index 5882305..1edb815 100644
--- a/sysdeps/mips/fpu/fegetenv.c
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c
index c065398..14b1241 100644
--- a/sysdeps/mips/fpu/fegetexcept.c
+++ b/sysdeps/mips/fpu/fegetexcept.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fenv_libc.h>
diff --git a/sysdeps/mips/fpu/fegetround.c b/sysdeps/mips/fpu/fegetround.c
index e2e51ae..efb1ba0 100644
--- a/sysdeps/mips/fpu/fegetround.c
+++ b/sysdeps/mips/fpu/fegetround.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/feholdexcpt.c b/sysdeps/mips/fpu/feholdexcpt.c
index ab92a71..bb37148 100644
--- a/sysdeps/mips/fpu/feholdexcpt.c
+++ b/sysdeps/mips/fpu/feholdexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h
index 4d8d3eb..dc30888 100644
--- a/sysdeps/mips/fpu/fenv_libc.h
+++ b/sysdeps/mips/fpu/fenv_libc.h
@@ -3,19 +3,19 @@
Contributed by Andreas Jaeger <aj@suse.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FENV_LIBC_H
#define _FENV_LIBC_H 1
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index ff84a41..6bd894a 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c
index ae6ae86..af73a72 100644
--- a/sysdeps/mips/fpu/fesetround.c
+++ b/sysdeps/mips/fpu/fesetround.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
index 86ba6f9..c883d07 100644
--- a/sysdeps/mips/fpu/feupdateenv.c
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 0f7fea3..d4bbfc3 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/fraiseexcpt.c b/sysdeps/mips/fpu/fraiseexcpt.c
index 25c09e3..582210a 100644
--- a/sysdeps/mips/fpu/fraiseexcpt.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c
index f348258..6a833f7 100644
--- a/sysdeps/mips/fpu/ftestexcept.c
+++ b/sysdeps/mips/fpu/ftestexcept.c
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fenv.h>
#include <fpu_control.h>
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index c5c83e0..da18dea 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -4,19 +4,19 @@
Contributed by Olaf Flebbe and Ralf Baechle.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c
index 309ff8b..b67a444 100644
--- a/sysdeps/mips/init-first.c
+++ b/sysdeps/mips/init-first.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index 8b35a91..8a56c76 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define _MCOUNT_DECL static void __mcount
diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h
index 8e421e4..dc1cc9c 100644
--- a/sysdeps/mips/memusage.h
+++ b/sysdeps/mips/memusage.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; })
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 3527be5..6523d49 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
#include <stdlib.h>
diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h
index 9f08f4e..e126427 100644
--- a/sysdeps/mips/mips64/bits/setjmp.h
+++ b/sysdeps/mips/mips64/bits/setjmp.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SETJMP_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index 7c70f5b..b92ac98 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S
index b370316..ee86787 100644
--- a/sysdeps/mips/mips64/bsd-setjmp.S
+++ b/sysdeps/mips/mips64/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 59bd581..3ecb3c2 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -4,19 +4,19 @@
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef dl_machine_h
#define dl_machine_h
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
index 127ab42..5e18897 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
index 19d06e9..6d1c939 100644
--- a/sysdeps/mips/mips64/setjmp_aux.c
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
diff --git a/sysdeps/mips/regdef.h b/sysdeps/mips/regdef.h
index 0fa50f0..bc7f13b 100644
--- a/sysdeps/mips/regdef.h
+++ b/sysdeps/mips/regdef.h
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _REGDEF_H
#define _REGDEF_H
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 804b27e..01ef313 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index e7b83c4..1cd2b21 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h
index 56567e8..16b7c8c 100644
--- a/sysdeps/mips/sgidefs.h
+++ b/sysdeps/mips/sgidefs.h
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SGIDEFS_H
#define _SGIDEFS_H 1
diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h
index 612d251..86e3d62 100644
--- a/sysdeps/mips/stackinfo.h
+++ b/sysdeps/mips/stackinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains a bit of information about the stack allocation
of the processor. */
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index b90a331..1e5ea9a 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_ASM_H
#define _SYS_ASM_H
diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h
index ef7309c..3781152 100644
--- a/sysdeps/mips/sys/fpregdef.h
+++ b/sysdeps/mips/sys/fpregdef.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_FPREGDEF_H
#define _SYS_FPREGDEF_H
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
index 9f7b318..c4df603 100644
--- a/sysdeps/mips/sys/regdef.h
+++ b/sysdeps/mips/sys/regdef.h
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_REGDEF_H
#define _SYS_REGDEF_H
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index 741fb28..90c992d 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* System V/mips ABI compliant context switching support. */
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index 2cf2302..802bbc8 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -5,19 +5,19 @@
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h
index 7f84f88..8bdb6e9 100644
--- a/sysdeps/rs6000/memcopy.h
+++ b/sysdeps/rs6000/memcopy.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 7d628b1..2700c17 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file defines the `errno' constants for standalone ARM machines.
These constants are essentially arbitrary. */
diff --git a/sysdeps/standalone/arm/sysdep.c b/sysdeps/standalone/arm/sysdep.c
index d256420..8c17234 100644
--- a/sysdeps/standalone/arm/sysdep.c
+++ b/sysdeps/standalone/arm/sysdep.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
index d4f7879..c7d3755 100644
--- a/sysdeps/standalone/bits/errno.h
+++ b/sysdeps/standalone/bits/errno.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file defines the `errno' constants. */
diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c
index 6ee9935..32e148e 100644
--- a/sysdeps/standalone/brk.c
+++ b/sysdeps/standalone/brk.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdlib.h>
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 114d726..b0fa5f0 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h
index d7cb9bc..6f58294 100644
--- a/sysdeps/standalone/dirstream.h
+++ b/sysdeps/standalone/dirstream.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DIRSTREAM_H
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
index 088c3bb..b7c15b5 100644
--- a/sysdeps/standalone/filedesc.h
+++ b/sysdeps/standalone/filedesc.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* This is the file descriptor used by the no OS implementation
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
index 3ed0964..5cb4f28 100644
--- a/sysdeps/standalone/i386/force_cpu386/Makefile
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -4,19 +4,19 @@
# On-Line Applications Research Corporation.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq (bare,$(subdir))
install-others += $(inst_libdir)/force_cpu386.ld
diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c
index 5f9e5e3..2b1d090 100644
--- a/sysdeps/standalone/i386/force_cpu386/_exit.c
+++ b/sysdeps/standalone/i386/force_cpu386/_exit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <stdlib.h>
diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c
index c16aa60..e94dc35 100644
--- a/sysdeps/standalone/i386/force_cpu386/brdinit.c
+++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "i386.h"
diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c
index d0fd35f..4c7271b 100644
--- a/sysdeps/standalone/i386/force_cpu386/console.c
+++ b/sysdeps/standalone/i386/force_cpu386/console.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "i386.h"
diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
index 4016c81..5d9ac5c 100644
--- a/sysdeps/standalone/i386/force_cpu386/strtsupp.S
+++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file assists the board independent startup code by
* loading the proper segment register values. The values
diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld
index 09252cc..d040cf9 100644
--- a/sysdeps/standalone/i386/force_cpu386/target.ld
+++ b/sysdeps/standalone/i386/force_cpu386/target.ld
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains directives for the GNU linker which are specific
to the FORCE CPU386 board. */
diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h
index d76f481..364e8ab 100644
--- a/sysdeps/standalone/i386/i386.h
+++ b/sysdeps/standalone/i386/i386.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* i386.h
*
diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S
index 41e0bfb..d003763 100644
--- a/sysdeps/standalone/i386/start.S
+++ b/sysdeps/standalone/i386/start.S
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* entry.s
*
diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h
index 253d5d9..0dcf5c3 100644
--- a/sysdeps/standalone/i960/i960ca.h
+++ b/sysdeps/standalone/i960/i960ca.h
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* i960ca.h
*
diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile
index aab52dc..40ead97 100644
--- a/sysdeps/standalone/i960/nindy960/Makefile
+++ b/sysdeps/standalone/i960/nindy960/Makefile
@@ -4,19 +4,19 @@
# On-Line Applications Research Corporation.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
# The nindy960 support has only been tested on the following boards:
diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c
index 8ca6e78..9cd3f85 100644
--- a/sysdeps/standalone/i960/nindy960/_exit.c
+++ b/sysdeps/standalone/i960/nindy960/_exit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <stdlib.h>
diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c
index 9cc9168..9985a99 100644
--- a/sysdeps/standalone/i960/nindy960/brdinit.c
+++ b/sysdeps/standalone/i960/nindy960/brdinit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "i960ca.h"
diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c
index cf52ec6..b062d92 100644
--- a/sysdeps/standalone/i960/nindy960/console.c
+++ b/sysdeps/standalone/i960/nindy960/console.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "i960ca.h"
diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S
index d86fb14..993a3f2 100644
--- a/sysdeps/standalone/i960/start.S
+++ b/sysdeps/standalone/i960/start.S
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* entry.s
*
diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h
index 8fce423..8eee007 100644
--- a/sysdeps/standalone/m68k/m68020/m68020.h
+++ b/sysdeps/standalone/m68k/m68020/m68020.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* m68020.h
*
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
index 11c0620..122c1b1 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/Makefile
+++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
@@ -4,19 +4,19 @@
# On-Line Applications Research Corporation.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq (bare,$(subdir))
install-lib += mvme136.ld
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
index ecd93db..e5e078c 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <stdlib.h>
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
index c477441..95b81c1 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "m68020.h"
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c
index cafb1ab..85dee98 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/console.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c
@@ -4,19 +4,19 @@
On-Line Applications Research Corporation.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <standalone.h>
#include "m68020.h"
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
index e25492a..9a352f0 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
+++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains directives for the GNU linker which are specific
to the Motorola MVME136/MVME135 boards. */
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
index fb6fd3e..855652b 100644
--- a/sysdeps/standalone/m68k/m68020/start.S
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* entry.s
*
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index 25e2610..2be04f4 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <fcntl.h>
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 43bc0d6..2daee87 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h
index 57687da..4a88199 100644
--- a/sysdeps/standalone/standalone.h
+++ b/sysdeps/standalone/standalone.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _STANDALONE_H
#define _STANDALONE_H
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index 9226bcc..a5fe44e 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <errno.h>
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 53fc454..5279b86 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <features.h>
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 5bedcf9..7da33c8 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index b3924a3..c68fec6 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index b70d157..a03fbe2 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
index 7723847..a8fea14 100644
--- a/sysdeps/unix/arm/start.c
+++ b/sysdeps/unix/arm/start.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 5795f5e..6487caa 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index 6f0efc0..d776b45 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/arm/sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index a474eb5..037d4d0 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index f173ce4..75aee67 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This code wants to be run through m4. */
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index 33af14e..4bb5939 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index d106fea..5b63191 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 2a4134a..93db95e 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S
index a85a898..eb1a8ec 100644
--- a/sysdeps/unix/bsd/m68k/syscall.S
+++ b/sysdeps/unix/bsd/m68k/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index f43240c..90f35c9 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define _ERRNO_H
#include <bits/errno.h>
diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S
index 0b502c4..9fb4fd9 100644
--- a/sysdeps/unix/bsd/m68k/wait.S
+++ b/sysdeps/unix/bsd/m68k/wait.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
index 6fad8cf..20f358f 100644
--- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S
index 394cd3a..51abaa6 100644
--- a/sysdeps/unix/bsd/osf/alpha/brk.S
+++ b/sysdeps/unix/bsd/osf/alpha/brk.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
index 1396761..90cf4bd 100644
--- a/sysdeps/unix/bsd/osf/alpha/fork.S
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S
index 92ba1be..741616b 100644
--- a/sysdeps/unix/bsd/osf/alpha/killpg.S
+++ b/sysdeps/unix/bsd/osf/alpha/killpg.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
index 05736a8..0916ff4 100644
--- a/sysdeps/unix/bsd/osf/alpha/pipe.S
+++ b/sysdeps/unix/bsd/osf/alpha/pipe.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S
index 914b6eb..92a273d 100644
--- a/sysdeps/unix/bsd/osf/alpha/recv.S
+++ b/sysdeps/unix/bsd/osf/alpha/recv.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S
index 8a56d82..7d61d46 100644
--- a/sysdeps/unix/bsd/osf/alpha/send.S
+++ b/sysdeps/unix/bsd/osf/alpha/send.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S
index cdb3788..5db55f4 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigblock.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S
index 59d048d..021e603 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
index 04bf694..93333aa 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S
index 1090cdc..45fcc58 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigvec.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
index 0321f56..ffe6651 100644
--- a/sysdeps/unix/bsd/osf/alpha/start.S
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index 929dfc4..84ac541 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* OSF/1 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S
index 2fc4094..3c2b04a 100644
--- a/sysdeps/unix/bsd/osf/alpha/vhangup.S
+++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/bits/mman.h b/sysdeps/unix/bsd/osf/bits/mman.h
index fd5d79d..d4672cc 100644
--- a/sysdeps/unix/bsd/osf/bits/mman.h
+++ b/sysdeps/unix/bsd/osf/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_MMAN_H
#define _BITS_MMAN_H 1
diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h
index 6bf0307..13f9144 100644
--- a/sysdeps/unix/bsd/osf/bits/sigaction.h
+++ b/sysdeps/unix/bsd/osf/bits/sigaction.h
@@ -4,19 +4,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S
index fe8f58d..55fa728 100644
--- a/sysdeps/unix/bsd/sequent/i386/getgroups.S
+++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <limits.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index 9647849..62373e1 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S
index 45c920c..9ff1898 100644
--- a/sysdeps/unix/bsd/sequent/i386/syscall.S
+++ b/sysdeps/unix/bsd/sequent/i386/syscall.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
index 90f2ed0..c3d9d91 100644
--- a/sysdeps/unix/bsd/sequent/i386/sysdep.h
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/i386/sysdep.h>
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index 28cf9e2..db124fa 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/bits/signum.h b/sysdeps/unix/bsd/sun/bits/signum.h
index a327401..c13e7cd 100644
--- a/sysdeps/unix/bsd/sun/bits/signum.h
+++ b/sysdeps/unix/bsd/sun/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
index f637efa..99a0506 100644
--- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 4c46017..07af96d 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index a3654bf..73ee796 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index f5133db..bb10848 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S
index 76bac4d..1d4d5be 100644
--- a/sysdeps/unix/bsd/sun/m68k/syscall.S
+++ b/sysdeps/unix/bsd/sun/m68k/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 8bd3861..e51ab0a 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index 5b15db6..fe0309e 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S
index 7a3f8db..a3ea8e3 100644
--- a/sysdeps/unix/bsd/sun/sigreturn.S
+++ b/sysdeps/unix/bsd/sun/sigreturn.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
index 29d2d87..7c4bca6 100644
--- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index fc3fc04..d07fd38 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 5c0dcf2..2b0be13 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
index b74c80e..e09fa33 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h
index ed80baf..fdef465 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_MMAN_H
#define _BITS_MMAN_H 1
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
index c0b40ba..2f0d2dc 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
index 15aaab7..97612c8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
index 5a03bab..08848f3 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
index 8400aaa..c513ae2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/mmap.c
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index 8d929bc..dca3468 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <errno.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
index 3e54c1e..6fcc606 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <termios.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
index 8c8fdf8..9e78aad 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcflush.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <termios.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
index 69a8fb2..ab74fdd 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
index 2953f45..db5ea8c 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <termios.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index da30f7b..d61e392 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <termios.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index ffffc7a..a128234 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -5,19 +5,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
index 1398b81..9dbd7ba 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/bsd/ultrix4/bits/mman.h b/sysdeps/unix/bsd/ultrix4/bits/mman.h
index 9acb6ce..918b535 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_MMAN_H
#define _BITS_MMAN_H 1
diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
index 7736504..aba6852 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
@@ -3,19 +3,19 @@
Contributed by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define _POSIX_JOB_CONTROL 1
#define _POSIX_SAVED_IDS 1
diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
index a9f36ab..47d46ff 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
index 19d795a..2b815c4 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
@@ -4,19 +4,19 @@
Also hacked by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
index cb66517..3674651 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
index 4ecce54..f6c8f1f 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* The sigvec system call on MIPS Ultrix takes an additional
parameter, which is the address that is actually called when the
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index dfb06c2..df86229 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index 84a2fde..9541eaf 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index 6bf8ca4..39e7730 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -3,19 +3,19 @@
Contributed by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* On Ultrix we can use the getsysinfo call to get the right return
value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S
index 5659872..b20ecfa 100644
--- a/sysdeps/unix/bsd/ultrix4/wait3.S
+++ b/sysdeps/unix/bsd/ultrix4/wait3.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S
index c959073..52377bc 100644
--- a/sysdeps/unix/bsd/vax/brk.S
+++ b/sysdeps/unix/bsd/vax/brk.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index 8a83e0c..691cf3c 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index 6809b6e..786aed2 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define _ERRNO_H
#include <bits/errno.h>
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index 19ab59b..563ad26 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index b2458cb..8098b0e 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
index 9effe92..19396f0 100644
--- a/sysdeps/unix/bsd/vax/wait.S
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
index 52b8694..e0ceec1 100644
--- a/sysdeps/unix/bsd/vax/wait3.S
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index e38f735..9674571 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index ffaf40b..3273216 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index 7066ac7..a2f4ec7 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
index ddb6c70..2cb3adb 100644
--- a/sysdeps/unix/mips/sigreturn.S
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index d4b9945..fa1bfa1 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index a5a3e55..c259696 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 9ea55bc..4f4f84a 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/aix/_exit.c b/sysdeps/unix/sysv/aix/_exit.c
index f4654c1..510f3ae 100644
--- a/sysdeps/unix/sysv/aix/_exit.c
+++ b/sysdeps/unix/sysv/aix/_exit.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c
index 364f02b..0e8f67e 100644
--- a/sysdeps/unix/sysv/aix/accept.c
+++ b/sysdeps/unix/sysv/aix/accept.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c
index fb94a54..97f8e68 100644
--- a/sysdeps/unix/sysv/aix/access.c
+++ b/sysdeps/unix/sysv/aix/access.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/bits/dirent.h b/sysdeps/unix/sysv/aix/bits/dirent.h
index 48fb1b2..48eeb32 100644
--- a/sysdeps/unix/sysv/aix/bits/dirent.h
+++ b/sysdeps/unix/sysv/aix/bits/dirent.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DIRENT_H
# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/dlfcn.h b/sysdeps/unix/sysv/aix/bits/dlfcn.h
index e67c9a8..e184175 100644
--- a/sysdeps/unix/sysv/aix/bits/dlfcn.h
+++ b/sysdeps/unix/sysv/aix/bits/dlfcn.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DLFCN_H
# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/endian.h b/sysdeps/unix/sysv/aix/bits/endian.h
index a86de7e..8e9b98e 100644
--- a/sysdeps/unix/sysv/aix/bits/endian.h
+++ b/sysdeps/unix/sysv/aix/bits/endian.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h
index d14e329..f2cdba8 100644
--- a/sysdeps/unix/sysv/aix/bits/errno.h
+++ b/sysdeps/unix/sysv/aix/bits/errno.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file defines the `errno' constants. */
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
index 048f53a..28a8fae 100644
--- a/sysdeps/unix/sysv/aix/bits/fcntl.h
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
index ecc4cac..109aa05 100644
--- a/sysdeps/unix/sysv/aix/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead
diff --git a/sysdeps/unix/sysv/aix/bits/ioctls.h b/sysdeps/unix/sysv/aix/bits/ioctls.h
index 39e093b..8023c14 100644
--- a/sysdeps/unix/sysv/aix/bits/ioctls.h
+++ b/sysdeps/unix/sysv/aix/bits/ioctls.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/poll.h b/sysdeps/unix/sysv/aix/bits/poll.h
index 431c8a6..b9f2f71 100644
--- a/sysdeps/unix/sysv/aix/bits/poll.h
+++ b/sysdeps/unix/sysv/aix/bits/poll.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_POLL_H
# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/resource.h b/sysdeps/unix/sysv/aix/bits/resource.h
index 823a5f0..cc851e8 100644
--- a/sysdeps/unix/sysv/aix/bits/resource.h
+++ b/sysdeps/unix/sysv/aix/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h
index 675ed62..82a58ae 100644
--- a/sysdeps/unix/sysv/aix/bits/setjmp.h
+++ b/sysdeps/unix/sysv/aix/bits/setjmp.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
diff --git a/sysdeps/unix/sysv/aix/bits/sigaction.h b/sysdeps/unix/sysv/aix/bits/sigaction.h
index 75c35e5..55414b8 100644
--- a/sysdeps/unix/sysv/aix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/aix/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/sigcontext.h b/sysdeps/unix/sysv/aix/bits/sigcontext.h
index 86b3c24..40bec1b 100644
--- a/sysdeps/unix/sysv/aix/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/aix/bits/sigcontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/signum.h b/sysdeps/unix/sysv/aix/bits/signum.h
index b439744..67eb949 100644
--- a/sysdeps/unix/sysv/aix/bits/signum.h
+++ b/sysdeps/unix/sysv/aix/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/aix/bits/sigset.h b/sysdeps/unix/sysv/aix/bits/sigset.h
index 4735796..0dc6b40 100644
--- a/sysdeps/unix/sysv/aix/bits/sigset.h
+++ b/sysdeps/unix/sysv/aix/bits/sigset.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGSET_H_types
# define _SIGSET_H_types 1
diff --git a/sysdeps/unix/sysv/aix/bits/sigstack.h b/sysdeps/unix/sysv/aix/bits/sigstack.h
index c229cc0..cefd33c 100644
--- a/sysdeps/unix/sysv/aix/bits/sigstack.h
+++ b/sysdeps/unix/sysv/aix/bits/sigstack.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
index f080c6a..45877fa 100644
--- a/sysdeps/unix/sysv/aix/bits/socket.h
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __BITS_SOCKET_H
#define __BITS_SOCKET_H
diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h
index 0b81879..adcb1d1 100644
--- a/sysdeps/unix/sysv/aix/bits/stat.h
+++ b/sysdeps/unix/sysv/aix/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/statfs.h b/sysdeps/unix/sysv/aix/bits/statfs.h
index 2877339..0a1c0a5 100644
--- a/sysdeps/unix/sysv/aix/bits/statfs.h
+++ b/sysdeps/unix/sysv/aix/bits/statfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STATFS_H
# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/termios.h b/sysdeps/unix/sysv/aix/bits/termios.h
index 96e65d1..b178d9c 100644
--- a/sysdeps/unix/sysv/aix/bits/termios.h
+++ b/sysdeps/unix/sysv/aix/bits/termios.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index df75454..4beff41 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
diff --git a/sysdeps/unix/sysv/aix/bits/uio.h b/sysdeps/unix/sysv/aix/bits/uio.h
index 5868ccc..6078153 100644
--- a/sysdeps/unix/sysv/aix/bits/uio.h
+++ b/sysdeps/unix/sysv/aix/bits/uio.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UIO_H
# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h
index 38cf31e..b78a2af 100644
--- a/sysdeps/unix/sysv/aix/bits/utmp.h
+++ b/sysdeps/unix/sysv/aix/bits/utmp.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UTMP_H
# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h
index f8bd665..438b5f3 100644
--- a/sysdeps/unix/sysv/aix/bits/utmpx.h
+++ b/sysdeps/unix/sysv/aix/bits/utmpx.h
@@ -1,20 +1,21 @@
/* Structures and defenitions for the user accounting database. AIX.
Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UTMPX_H
# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
diff --git a/sysdeps/unix/sysv/aix/bits/utsname.h b/sysdeps/unix/sysv/aix/bits/utsname.h
index e6958f0..d238f5e 100644
--- a/sysdeps/unix/sysv/aix/bits/utsname.h
+++ b/sysdeps/unix/sysv/aix/bits/utsname.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c
index f736e28..66707fe 100644
--- a/sysdeps/unix/sysv/aix/brk.c
+++ b/sysdeps/unix/sysv/aix/brk.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/chdir.c b/sysdeps/unix/sysv/aix/chdir.c
index 17d46f7..153084e 100644
--- a/sysdeps/unix/sysv/aix/chdir.c
+++ b/sysdeps/unix/sysv/aix/chdir.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/chmod.c b/sysdeps/unix/sysv/aix/chmod.c
index dbbe84e..628d09c 100644
--- a/sysdeps/unix/sysv/aix/chmod.c
+++ b/sysdeps/unix/sysv/aix/chmod.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c
index 902d410..568c26a 100644
--- a/sysdeps/unix/sysv/aix/chown.c
+++ b/sysdeps/unix/sysv/aix/chown.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c
index e32b4fd..f1b9a01 100644
--- a/sysdeps/unix/sysv/aix/close.c
+++ b/sysdeps/unix/sysv/aix/close.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/dl-addr.c b/sysdeps/unix/sysv/aix/dl-addr.c
index 928b76e..b8dbddf 100644
--- a/sysdeps/unix/sysv/aix/dl-addr.c
+++ b/sysdeps/unix/sysv/aix/dl-addr.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <dlfcn.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c
index 50986d5..edd4585 100644
--- a/sysdeps/unix/sysv/aix/dl-close.c
+++ b/sysdeps/unix/sysv/aix/dl-close.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdarg.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/aix/dl-error.c b/sysdeps/unix/sysv/aix/dl-error.c
index 069596e..9c6335b 100644
--- a/sysdeps/unix/sysv/aix/dl-error.c
+++ b/sysdeps/unix/sysv/aix/dl-error.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <elf/dl-error.c>
diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c
index a555559..0506d11 100644
--- a/sysdeps/unix/sysv/aix/dl-libc.c
+++ b/sysdeps/unix/sysv/aix/dl-libc.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <dlfcn.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c
index ba8e2bf..070471d 100644
--- a/sysdeps/unix/sysv/aix/dl-open.c
+++ b/sysdeps/unix/sysv/aix/dl-open.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <malloc.h>
#include <stdarg.h>
diff --git a/sysdeps/unix/sysv/aix/dl-support.c b/sysdeps/unix/sysv/aix/dl-support.c
index a641370..6172c85 100644
--- a/sysdeps/unix/sysv/aix/dl-support.c
+++ b/sysdeps/unix/sysv/aix/dl-support.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <elf/dl-support.c>
diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c
index 642c2e2..3f48b12 100644
--- a/sysdeps/unix/sysv/aix/dl-sym.c
+++ b/sysdeps/unix/sysv/aix/dl-sym.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdarg.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/aix/dlldr.h b/sysdeps/unix/sysv/aix/dlldr.h
index d729244..e0f3740 100644
--- a/sysdeps/unix/sysv/aix/dlldr.h
+++ b/sysdeps/unix/sysv/aix/dlldr.h
@@ -2,20 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c
index 55e2823..c666af5 100644
--- a/sysdeps/unix/sysv/aix/euidaccess.c
+++ b/sysdeps/unix/sysv/aix/euidaccess.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define ACC_SELF 0
diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c
index 968dc21..f8cc07d 100644
--- a/sysdeps/unix/sysv/aix/execve.c
+++ b/sysdeps/unix/sysv/aix/execve.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c
index 97d3171..9fe7e8b 100644
--- a/sysdeps/unix/sysv/aix/fchdir.c
+++ b/sysdeps/unix/sysv/aix/fchdir.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fchmod.c b/sysdeps/unix/sysv/aix/fchmod.c
index 49fc92d..d4f0ac9 100644
--- a/sysdeps/unix/sysv/aix/fchmod.c
+++ b/sysdeps/unix/sysv/aix/fchmod.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/fchown.c b/sysdeps/unix/sysv/aix/fchown.c
index de51384..64252c0 100644
--- a/sysdeps/unix/sysv/aix/fchown.c
+++ b/sysdeps/unix/sysv/aix/fchown.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
index 5a4bb8a..196bbf5 100644
--- a/sysdeps/unix/sysv/aix/fcntl.c
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fcntl.h>
#include <stdarg.h>
diff --git a/sysdeps/unix/sysv/aix/fdatasync.c b/sysdeps/unix/sysv/aix/fdatasync.c
index 177260d..851f2e5 100644
--- a/sysdeps/unix/sysv/aix/fdatasync.c
+++ b/sysdeps/unix/sysv/aix/fdatasync.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c
index 9c84fb0..f31f342 100644
--- a/sysdeps/unix/sysv/aix/fork.c
+++ b/sysdeps/unix/sysv/aix/fork.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fstatfs.c b/sysdeps/unix/sysv/aix/fstatfs.c
index 3b92b9e..3f531f2 100644
--- a/sysdeps/unix/sysv/aix/fstatfs.c
+++ b/sysdeps/unix/sysv/aix/fstatfs.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/statfs.h>
diff --git a/sysdeps/unix/sysv/aix/fsync.c b/sysdeps/unix/sysv/aix/fsync.c
index 6ad1dac..58734b6 100644
--- a/sysdeps/unix/sysv/aix/fsync.c
+++ b/sysdeps/unix/sysv/aix/fsync.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/ftruncate.c b/sysdeps/unix/sysv/aix/ftruncate.c
index 5ad14cb..758f2a4 100644
--- a/sysdeps/unix/sysv/aix/ftruncate.c
+++ b/sysdeps/unix/sysv/aix/ftruncate.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c
index f2c1578..5e7e4be 100644
--- a/sysdeps/unix/sysv/aix/ftruncate64.c
+++ b/sysdeps/unix/sysv/aix/ftruncate64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c
index 9f5a477..e1f546d 100644
--- a/sysdeps/unix/sysv/aix/fxstat.c
+++ b/sysdeps/unix/sysv/aix/fxstat.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c
index 5d2f22b..39f8cd9 100644
--- a/sysdeps/unix/sysv/aix/fxstat64.c
+++ b/sysdeps/unix/sysv/aix/fxstat64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/getdents.c b/sysdeps/unix/sysv/aix/getdents.c
index fd45199..ca896c3 100644
--- a/sysdeps/unix/sysv/aix/getdents.c
+++ b/sysdeps/unix/sysv/aix/getdents.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <dirent.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c
index d092fc5..c246925 100644
--- a/sysdeps/unix/sysv/aix/getegid.c
+++ b/sysdeps/unix/sysv/aix/getegid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c
index 86034b3..b072213 100644
--- a/sysdeps/unix/sysv/aix/geteuid.c
+++ b/sysdeps/unix/sysv/aix/geteuid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c
index 6f2df60..8b102b1 100644
--- a/sysdeps/unix/sysv/aix/getgid.c
+++ b/sysdeps/unix/sysv/aix/getgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/getgroups.c b/sysdeps/unix/sysv/aix/getgroups.c
index 37ace34..f7c813b 100644
--- a/sysdeps/unix/sysv/aix/getgroups.c
+++ b/sysdeps/unix/sysv/aix/getgroups.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c
index 9482058..a423840 100644
--- a/sysdeps/unix/sysv/aix/gethostname.c
+++ b/sysdeps/unix/sysv/aix/gethostname.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c
index 82a9941..bec9bac 100644
--- a/sysdeps/unix/sysv/aix/getpeername.c
+++ b/sysdeps/unix/sysv/aix/getpeername.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c
index 53f2e1a..297fccc 100644
--- a/sysdeps/unix/sysv/aix/getpgid.c
+++ b/sysdeps/unix/sysv/aix/getpgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/getrlimit.c b/sysdeps/unix/sysv/aix/getrlimit.c
index 2658f7e..0699cec 100644
--- a/sysdeps/unix/sysv/aix/getrlimit.c
+++ b/sysdeps/unix/sysv/aix/getrlimit.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/getrlimit64.c b/sysdeps/unix/sysv/aix/getrlimit64.c
index 8f46c5f..dd33ca9 100644
--- a/sysdeps/unix/sysv/aix/getrlimit64.c
+++ b/sysdeps/unix/sysv/aix/getrlimit64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/getrusage.c b/sysdeps/unix/sysv/aix/getrusage.c
index aa80ade..b578b75 100644
--- a/sysdeps/unix/sysv/aix/getrusage.c
+++ b/sysdeps/unix/sysv/aix/getrusage.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/getsid.c b/sysdeps/unix/sysv/aix/getsid.c
index 88b9daa..6994eb8 100644
--- a/sysdeps/unix/sysv/aix/getsid.c
+++ b/sysdeps/unix/sysv/aix/getsid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c
index c1a5614..822f9e9 100644
--- a/sysdeps/unix/sysv/aix/getsockname.c
+++ b/sysdeps/unix/sysv/aix/getsockname.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index e85bd05..c7a4a01 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <time.h>
diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c
index 8d5f070..e042666 100644
--- a/sysdeps/unix/sysv/aix/getuid.c
+++ b/sysdeps/unix/sysv/aix/getuid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/ioctl.c b/sysdeps/unix/sysv/aix/ioctl.c
index 6e1445d..f47b699 100644
--- a/sysdeps/unix/sysv/aix/ioctl.c
+++ b/sysdeps/unix/sysv/aix/ioctl.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdarg.h>
#include <sys/ioctl.h>
diff --git a/sysdeps/unix/sysv/aix/kernel_proto.h b/sysdeps/unix/sysv/aix/kernel_proto.h
index d3ddfa6..e9ad06d 100644
--- a/sysdeps/unix/sysv/aix/kernel_proto.h
+++ b/sysdeps/unix/sysv/aix/kernel_proto.h
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains prototypes for the "functions" exported by /unix
on AIX. */
diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c
index 861cff3..8538e29 100644
--- a/sysdeps/unix/sysv/aix/kill.c
+++ b/sysdeps/unix/sysv/aix/kill.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/lchown.c b/sysdeps/unix/sysv/aix/lchown.c
index 57a83b5..44e3b74 100644
--- a/sysdeps/unix/sysv/aix/lchown.c
+++ b/sysdeps/unix/sysv/aix/lchown.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/link.c b/sysdeps/unix/sysv/aix/link.c
index bb650cc..2cacbeb 100644
--- a/sysdeps/unix/sysv/aix/link.c
+++ b/sysdeps/unix/sysv/aix/link.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/lockf.c b/sysdeps/unix/sysv/aix/lockf.c
index 43ac1af..4a8c14f 100644
--- a/sysdeps/unix/sysv/aix/lockf.c
+++ b/sysdeps/unix/sysv/aix/lockf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/lockf64.c b/sysdeps/unix/sysv/aix/lockf64.c
index ad4840b..529c2b4 100644
--- a/sysdeps/unix/sysv/aix/lockf64.c
+++ b/sysdeps/unix/sysv/aix/lockf64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/lseek64.c b/sysdeps/unix/sysv/aix/lseek64.c
index 621cdae..5892663 100644
--- a/sysdeps/unix/sysv/aix/lseek64.c
+++ b/sysdeps/unix/sysv/aix/lseek64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c
index 58d8710..bd6f653 100644
--- a/sysdeps/unix/sysv/aix/lxstat.c
+++ b/sysdeps/unix/sysv/aix/lxstat.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c
index 4741da0..d6376bd 100644
--- a/sysdeps/unix/sysv/aix/lxstat64.c
+++ b/sysdeps/unix/sysv/aix/lxstat64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/mkdir.c b/sysdeps/unix/sysv/aix/mkdir.c
index f7c358a..4a4e5ce 100644
--- a/sysdeps/unix/sysv/aix/mkdir.c
+++ b/sysdeps/unix/sysv/aix/mkdir.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/mknod.c b/sysdeps/unix/sysv/aix/mknod.c
index d724595..8ed3d6b 100644
--- a/sysdeps/unix/sysv/aix/mknod.c
+++ b/sysdeps/unix/sysv/aix/mknod.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/mmap64.c b/sysdeps/unix/sysv/aix/mmap64.c
index 9f2a277..ae70ef4 100644
--- a/sysdeps/unix/sysv/aix/mmap64.c
+++ b/sysdeps/unix/sysv/aix/mmap64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/mman.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/aix/mprotect.c b/sysdeps/unix/sysv/aix/mprotect.c
index 30374bb..8bf95ab 100644
--- a/sysdeps/unix/sysv/aix/mprotect.c
+++ b/sysdeps/unix/sysv/aix/mprotect.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/mman.h>
diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c
index e39606f..3c6e508 100644
--- a/sysdeps/unix/sysv/aix/nanosleep.c
+++ b/sysdeps/unix/sysv/aix/nanosleep.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/time.h>
diff --git a/sysdeps/unix/sysv/aix/net/if.h b/sysdeps/unix/sysv/aix/net/if.h
index c950d35..20256d3 100644
--- a/sysdeps/unix/sysv/aix/net/if.h
+++ b/sysdeps/unix/sysv/aix/net/if.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _NET_IF_H
diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c
index 89cd955..4116c4e 100644
--- a/sysdeps/unix/sysv/aix/open.c
+++ b/sysdeps/unix/sysv/aix/open.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fcntl.h>
#include <stdarg.h>
diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c
index b3a7ec9..385e0be 100644
--- a/sysdeps/unix/sysv/aix/pipe.c
+++ b/sysdeps/unix/sysv/aix/pipe.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c
index bd19676..890dcd0 100644
--- a/sysdeps/unix/sysv/aix/poll.c
+++ b/sysdeps/unix/sysv/aix/poll.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/poll.h>
diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c
index ef04283..6955ef5 100644
--- a/sysdeps/unix/sysv/aix/powerpc/memset.c
+++ b/sysdeps/unix/sysv/aix/powerpc/memset.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Until the cache line issues are resolved use the generic implementation. */
diff --git a/sysdeps/unix/sysv/aix/powerpc/register-dump.h b/sysdeps/unix/sysv/aix/powerpc/register-dump.h
index 3f308e6..f0d8b99 100644
--- a/sysdeps/unix/sysv/aix/powerpc/register-dump.h
+++ b/sysdeps/unix/sysv/aix/powerpc/register-dump.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
diff --git a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c
index 18c42d5..1a8b590 100644
--- a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c
+++ b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/powerpc/fpu/s_lrint.c>
diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c
index 137fc34..8d8bfd7 100644
--- a/sysdeps/unix/sysv/aix/pread.c
+++ b/sysdeps/unix/sysv/aix/pread.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c
index 1a88a7c..0d4df22 100644
--- a/sysdeps/unix/sysv/aix/pread64.c
+++ b/sysdeps/unix/sysv/aix/pread64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/profil-counter.h b/sysdeps/unix/sysv/aix/profil-counter.h
index f58f1b6..2492a63 100644
--- a/sysdeps/unix/sysv/aix/profil-counter.h
+++ b/sysdeps/unix/sysv/aix/profil-counter.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* In many Unix systems signal handlers are called like this
and the interrupted PC is easily findable in the `struct sigcontext'. */
diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c
index 556f7c6..50b59a3 100644
--- a/sysdeps/unix/sysv/aix/read.c
+++ b/sysdeps/unix/sysv/aix/read.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c
index 67d54c9..8c12690 100644
--- a/sysdeps/unix/sysv/aix/readv.c
+++ b/sysdeps/unix/sysv/aix/readv.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/uio.h>
diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c
index 88f042a..723a2c8 100644
--- a/sysdeps/unix/sysv/aix/recvfrom.c
+++ b/sysdeps/unix/sysv/aix/recvfrom.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c
index baecd5a..0b695b3 100644
--- a/sysdeps/unix/sysv/aix/recvmsg.c
+++ b/sysdeps/unix/sysv/aix/recvmsg.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/revoke.c b/sysdeps/unix/sysv/aix/revoke.c
index 2a81080..8f6a484 100644
--- a/sysdeps/unix/sysv/aix/revoke.c
+++ b/sysdeps/unix/sysv/aix/revoke.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fcntl.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/rmdir.c b/sysdeps/unix/sysv/aix/rmdir.c
index 6b659ec..91c6006 100644
--- a/sysdeps/unix/sysv/aix/rmdir.c
+++ b/sysdeps/unix/sysv/aix/rmdir.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c
index 09ba0b1..af56c4b 100644
--- a/sysdeps/unix/sysv/aix/sbrk.c
+++ b/sysdeps/unix/sysv/aix/sbrk.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/sched_yield.c b/sysdeps/unix/sysv/aix/sched_yield.c
index 0820c9a..b5fbc07 100644
--- a/sysdeps/unix/sysv/aix/sched_yield.c
+++ b/sysdeps/unix/sysv/aix/sched_yield.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sched.h>
diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c
index 34df22f..e5c48dc 100644
--- a/sysdeps/unix/sysv/aix/select.c
+++ b/sysdeps/unix/sysv/aix/select.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/time.h>
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
index 6dbbf5e..9ab19a9 100644
--- a/sysdeps/unix/sysv/aix/sendmsg.c
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c
index eedc71a..75e96e3 100644
--- a/sysdeps/unix/sysv/aix/setegid.c
+++ b/sysdeps/unix/sysv/aix/setegid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c
index c2fb948..17738e7 100644
--- a/sysdeps/unix/sysv/aix/seteuid.c
+++ b/sysdeps/unix/sysv/aix/seteuid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c
index ba1b01e..5b80381 100644
--- a/sysdeps/unix/sysv/aix/setgid.c
+++ b/sysdeps/unix/sysv/aix/setgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c
index 444900b..e40a075 100644
--- a/sysdeps/unix/sysv/aix/setitimer.c
+++ b/sysdeps/unix/sysv/aix/setitimer.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <errno.h>
diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c
index cee1646..5150929 100644
--- a/sysdeps/unix/sysv/aix/setpgid.c
+++ b/sysdeps/unix/sysv/aix/setpgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c
index b747b6c..3581230 100644
--- a/sysdeps/unix/sysv/aix/setregid.c
+++ b/sysdeps/unix/sysv/aix/setregid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c
index eafc764..430d2fe 100644
--- a/sysdeps/unix/sysv/aix/setreuid.c
+++ b/sysdeps/unix/sysv/aix/setreuid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setrlimit.c b/sysdeps/unix/sysv/aix/setrlimit.c
index d7480e3..818819d 100644
--- a/sysdeps/unix/sysv/aix/setrlimit.c
+++ b/sysdeps/unix/sysv/aix/setrlimit.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/setrlimit64.c b/sysdeps/unix/sysv/aix/setrlimit64.c
index bfb1594..f305c6f 100644
--- a/sysdeps/unix/sysv/aix/setrlimit64.c
+++ b/sysdeps/unix/sysv/aix/setrlimit64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/setsid.c b/sysdeps/unix/sysv/aix/setsid.c
index 980649b..c017c12 100644
--- a/sysdeps/unix/sysv/aix/setsid.c
+++ b/sysdeps/unix/sysv/aix/setsid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c
index a86343a..1772fc7 100644
--- a/sysdeps/unix/sysv/aix/setuid.c
+++ b/sysdeps/unix/sysv/aix/setuid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c
index 65801f4..272c271 100644
--- a/sysdeps/unix/sysv/aix/sigaction.c
+++ b/sysdeps/unix/sysv/aix/sigaction.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/aix/sigpending.c b/sysdeps/unix/sysv/aix/sigpending.c
index a6add42..729b75a 100644
--- a/sysdeps/unix/sysv/aix/sigpending.c
+++ b/sysdeps/unix/sysv/aix/sigpending.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <signal.h>
diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
index 5a01212..762144e 100644
--- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
do { \
diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c
index 1237281..afca6b7 100644
--- a/sysdeps/unix/sysv/aix/sigsuspend.c
+++ b/sysdeps/unix/sysv/aix/sigsuspend.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <signal.h>
diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c
index 3ac5952..17a9702 100644
--- a/sysdeps/unix/sysv/aix/sleep.c
+++ b/sysdeps/unix/sysv/aix/sleep.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <time.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/socket.c b/sysdeps/unix/sysv/aix/socket.c
index 8e409cb..236b1b1 100644
--- a/sysdeps/unix/sysv/aix/socket.c
+++ b/sysdeps/unix/sysv/aix/socket.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/socketpair.c b/sysdeps/unix/sysv/aix/socketpair.c
index b4dda7f..8adeac9 100644
--- a/sysdeps/unix/sysv/aix/socketpair.c
+++ b/sysdeps/unix/sysv/aix/socketpair.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/socket.h>
diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c
index 06934fe..c7fa51b 100644
--- a/sysdeps/unix/sysv/aix/speed.c
+++ b/sysdeps/unix/sysv/aix/speed.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <errno.h>
diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c
index eee2196..6c784f5 100644
--- a/sysdeps/unix/sysv/aix/start.c
+++ b/sysdeps/unix/sysv/aix/start.c
@@ -2,20 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Old compatibility names for C types. */
diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c
index c0c966c..f44a1c6 100644
--- a/sysdeps/unix/sysv/aix/statfs.c
+++ b/sysdeps/unix/sysv/aix/statfs.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/statfs.h>
diff --git a/sysdeps/unix/sysv/aix/symlink.c b/sysdeps/unix/sysv/aix/symlink.c
index a70f103..cb24965 100644
--- a/sysdeps/unix/sysv/aix/symlink.c
+++ b/sysdeps/unix/sysv/aix/symlink.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h
index 1f52c39..7448f1a 100644
--- a/sysdeps/unix/sysv/aix/sys/param.h
+++ b/sysdeps/unix/sysv/aix/sys/param.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H 1
diff --git a/sysdeps/unix/sysv/aix/sys/ucontext.h b/sysdeps/unix/sysv/aix/sys/ucontext.h
index c2ebf0c..ddb3f01 100644
--- a/sysdeps/unix/sysv/aix/sys/ucontext.h
+++ b/sysdeps/unix/sysv/aix/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H 1
diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h
index 1a43f96..dcf37f2 100644
--- a/sysdeps/unix/sysv/aix/sysdep.h
+++ b/sysdeps/unix/sysv/aix/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/powerpc/sysdep.h>
diff --git a/sysdeps/unix/sysv/aix/tcgetattr.c b/sysdeps/unix/sysv/aix/tcgetattr.c
index b994f17..01ffd55 100644
--- a/sysdeps/unix/sysv/aix/tcgetattr.c
+++ b/sysdeps/unix/sysv/aix/tcgetattr.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c
index 516bcfb..b11676e 100644
--- a/sysdeps/unix/sysv/aix/tcsetattr.c
+++ b/sysdeps/unix/sysv/aix/tcsetattr.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/aix/times.c b/sysdeps/unix/sysv/aix/times.c
index c974049..8ebc40b 100644
--- a/sysdeps/unix/sysv/aix/times.c
+++ b/sysdeps/unix/sysv/aix/times.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/times.h>
diff --git a/sysdeps/unix/sysv/aix/truncate.c b/sysdeps/unix/sysv/aix/truncate.c
index 78f20fa..247aebb 100644
--- a/sysdeps/unix/sysv/aix/truncate.c
+++ b/sysdeps/unix/sysv/aix/truncate.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/truncate64.c b/sysdeps/unix/sysv/aix/truncate64.c
index 6582a45..3a219c0 100644
--- a/sysdeps/unix/sysv/aix/truncate64.c
+++ b/sysdeps/unix/sysv/aix/truncate64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/uitrunc.c b/sysdeps/unix/sysv/aix/uitrunc.c
index 34a109b..54cdc3a 100644
--- a/sysdeps/unix/sysv/aix/uitrunc.c
+++ b/sysdeps/unix/sysv/aix/uitrunc.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <math.h>
diff --git a/sysdeps/unix/sysv/aix/ulimit.c b/sysdeps/unix/sysv/aix/ulimit.c
index c72a527..44fef64 100644
--- a/sysdeps/unix/sysv/aix/ulimit.c
+++ b/sysdeps/unix/sysv/aix/ulimit.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stdarg.h>
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/aix/umask.c b/sysdeps/unix/sysv/aix/umask.c
index 6bbfdac..e8c45e4 100644
--- a/sysdeps/unix/sysv/aix/umask.c
+++ b/sysdeps/unix/sysv/aix/umask.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/unlink.c b/sysdeps/unix/sysv/aix/unlink.c
index e1bac23..6fe9b59 100644
--- a/sysdeps/unix/sysv/aix/unlink.c
+++ b/sysdeps/unix/sysv/aix/unlink.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c
index 19d5773..e34fd08 100644
--- a/sysdeps/unix/sysv/aix/usleep.c
+++ b/sysdeps/unix/sysv/aix/usleep.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <time.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/utimes.c b/sysdeps/unix/sysv/aix/utimes.c
index 907931a..9bef02a 100644
--- a/sysdeps/unix/sysv/aix/utimes.c
+++ b/sysdeps/unix/sysv/aix/utimes.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/time.h>
diff --git a/sysdeps/unix/sysv/aix/utmpx.h b/sysdeps/unix/sysv/aix/utmpx.h
index f7a7a3e..1647bfe 100644
--- a/sysdeps/unix/sysv/aix/utmpx.h
+++ b/sysdeps/unix/sysv/aix/utmpx.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UTMPX_H
#define _UTMPX_H 1
diff --git a/sysdeps/unix/sysv/aix/wait3.c b/sysdeps/unix/sysv/aix/wait3.c
index 0e37f80..b0f7faa 100644
--- a/sysdeps/unix/sysv/aix/wait3.c
+++ b/sysdeps/unix/sysv/aix/wait3.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/wait.h>
diff --git a/sysdeps/unix/sysv/aix/wait4.c b/sysdeps/unix/sysv/aix/wait4.c
index 1a5f58f..dd08f42 100644
--- a/sysdeps/unix/sysv/aix/wait4.c
+++ b/sysdeps/unix/sysv/aix/wait4.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c
index a1fcae0..36a012e 100644
--- a/sysdeps/unix/sysv/aix/waitid.c
+++ b/sysdeps/unix/sysv/aix/waitid.c
@@ -4,19 +4,19 @@
Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c
index 10befc3..4875612 100644
--- a/sysdeps/unix/sysv/aix/waitpid.c
+++ b/sysdeps/unix/sysv/aix/waitpid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index 82c2bf6..727ec82 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c
index a8f9cf5..0d5a333 100644
--- a/sysdeps/unix/sysv/aix/writev.c
+++ b/sysdeps/unix/sysv/aix/writev.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/uio.h>
diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c
index df01afa..bf901e2 100644
--- a/sysdeps/unix/sysv/aix/xstat.c
+++ b/sysdeps/unix/sysv/aix/xstat.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c
index eadf637..91f8317 100644
--- a/sysdeps/unix/sysv/aix/xstat64.c
+++ b/sysdeps/unix/sysv/aix/xstat64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <assert.h>
#include <sys/stat.h>
diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h
index 9414fc7..acae484 100644
--- a/sysdeps/unix/sysv/hpux/bits/errno.h
+++ b/sysdeps/unix/sysv/hpux/bits/errno.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file defines the `errno' constants. */
diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h
index 1875742..845b297 100644
--- a/sysdeps/unix/sysv/hpux/bits/stat.h
+++ b/sysdeps/unix/sysv/hpux/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h
index 88ae1a9..e231841 100644
--- a/sysdeps/unix/sysv/hpux/bits/types.h
+++ b/sysdeps/unix/sysv/hpux/bits/types.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
diff --git a/sysdeps/unix/sysv/hpux/sysdep.h b/sysdeps/unix/sysv/hpux/sysdep.h
index 88c2dcf..89a3377 100644
--- a/sysdeps/unix/sysv/hpux/sysdep.h
+++ b/sysdeps/unix/sysv/hpux/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* No underscores necessary. */
#define NO_UNDERSCORES
diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S
index 1ccd9d3..af51bc5 100644
--- a/sysdeps/unix/sysv/i386/signal.S
+++ b/sysdeps/unix/sysv/i386/signal.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S
index 8477bbd..edf4418 100644
--- a/sysdeps/unix/sysv/i386/sigreturn.S
+++ b/sysdeps/unix/sysv/i386/sigreturn.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile
index b24278a..d07981e 100644
--- a/sysdeps/unix/sysv/irix4/Makefile
+++ b/sysdeps/unix/sysv/irix4/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),signal)
sysdep_routines := $(sysdep_routines) sigtramp __handler
diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S
index 5d0e169..f02121a 100644
--- a/sysdeps/unix/sysv/irix4/__handler.S
+++ b/sysdeps/unix/sysv/irix4/__handler.S
@@ -4,19 +4,19 @@
Also hacked by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h
index 89fca07..ed33469 100644
--- a/sysdeps/unix/sysv/irix4/bits/confname.h
+++ b/sysdeps/unix/sysv/irix4/bits/confname.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UNISTD_H
# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h
index a926d04..dcba25f 100644
--- a/sysdeps/unix/sysv/irix4/bits/fcntl.h
+++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/irix4/bits/mman.h b/sysdeps/unix/sysv/irix4/bits/mman.h
index c378cce..1549ff0 100644
--- a/sysdeps/unix/sysv/irix4/bits/mman.h
+++ b/sysdeps/unix/sysv/irix4/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_MMAN_H
#define _BITS_MMAN_H 1
diff --git a/sysdeps/unix/sysv/irix4/bits/signum.h b/sysdeps/unix/sysv/irix4/bits/signum.h
index 13314cf..c96ab9d 100644
--- a/sysdeps/unix/sysv/irix4/bits/signum.h
+++ b/sysdeps/unix/sysv/irix4/bits/signum.h
@@ -1,20 +1,21 @@
/* Signal number definitions. Irix4 version.
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h
index 5228421..33f575d 100644
--- a/sysdeps/unix/sysv/irix4/bits/stat.h
+++ b/sysdeps/unix/sysv/irix4/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c
index 5d4d2c3..dbee0bb 100644
--- a/sysdeps/unix/sysv/irix4/fpathconf.c
+++ b/sysdeps/unix/sysv/irix4/fpathconf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index b68fe28..5208053 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/syssgi.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 5203b42..9fc2be9 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
index 95f4773..8d0c400 100644
--- a/sysdeps/unix/sysv/irix4/getrusage.c
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/resource.h>
#include <errno.h>
diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c
index 12518ab..7439c73 100644
--- a/sysdeps/unix/sysv/irix4/pathconf.c
+++ b/sysdeps/unix/sysv/irix4/pathconf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
index 69e6689..57f0ed5 100644
--- a/sysdeps/unix/sysv/irix4/setgroups.c
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/syssgi.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index 8e2c8ec..9254ed4 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S
index c56738c..296db1d 100644
--- a/sysdeps/unix/sysv/irix4/sigreturn.S
+++ b/sysdeps/unix/sysv/irix4/sigreturn.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c
index 5411595..d6cfd33 100644
--- a/sysdeps/unix/sysv/irix4/sigtramp.c
+++ b/sysdeps/unix/sysv/irix4/sigtramp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* The sigvec system call on MIPS Ultrix takes an additional
parameter, which is the address that is actually called when the
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index 0977642..719d017 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stdlib.h>
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index 2e409ee..3f350b5 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <sys/syssgi.h>
diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S
index f0464d3..0b6536f 100644
--- a/sysdeps/unix/sysv/irix4/uname.S
+++ b/sysdeps/unix/sysv/irix4/uname.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S
index 82fdee5..90cd594 100644
--- a/sysdeps/unix/sysv/irix4/wait.S
+++ b/sysdeps/unix/sysv/irix4/wait.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index 560cb27..d613ff0 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
index a371a55..6ed7478 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_DIRENT_H
#define _BITS_DIRENT_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 55f8e74..8aee77f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
index 7c1e0f7..c525046 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 004a683..77f3c93 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 31e39a8..77b595a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
index 9271ce6..ab251ea 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MSG_H
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h
index f5a33d9..e3664fd 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h
@@ -1,20 +1,20 @@
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Library General Public
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place -
- Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _NETDB_H
# error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index a97c96c..3f4e72c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
index 5236d57..f63360b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SEM_H
# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index acd479d..8559ce3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SHM_H
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 605c4f3..80feb2f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 6e16340..2cc92ba 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
&& !defined __need_sigevent_t
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 0d5452d..44c96a2 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
index bc993d1..7faaf98 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
index a5c7e95..2d57128 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __BITS_SOCKET_H
#define __BITS_SOCKET_H
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 60a6160..921283a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
index 747dc1b..d37d0ff 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STATVFS_H
# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 13e17b7..079073d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index e0e0104..dd4dfaf 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <time.h> instead.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index b357994..1b809e2 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 9ecd0d4..3cd1ae0 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe <brendan@zen.org>, 1993.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* __brk is a special syscall under Linux since it never returns an
error. Instead, the error condition is indicated by returning the old
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index a8bd7f1..f1f6214 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
index 235c02c..a7425d7 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 08a3e1c..03ceea1 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 8d96455..13762a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
index d86fc21..0e49a84 100644
--- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@suse.de>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* We need to define a special parser for /proc/cpuinfo. */
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index e56893b..22f3bb7 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 10b10e4..9a52ae8 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define glob64 __no_glob64_decl
#define globfree64 __no_globfree64_decl
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index ae559d9..650f7c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 779dc0b..53838fe 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 98f7163..6c4115d 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -3,19 +3,19 @@
Contributed by David Mosberger.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* I/O access is restricted to ISA port space (ports 0..65535).
Modern devices hopefully are sane enough not to put any performance
diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
index cc69795..b754a1f 100644
--- a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
+++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/ipc.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
index 6a99146..c38f1fa 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _KERNEL_TERMIOS_H
#define _KERNEL_TERMIOS_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index c568299..d543fe3 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/msg.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h
index 6c7d8dd..98df75f 100644
--- a/sysdeps/unix/sysv/linux/alpha/net/route.h
+++ b/sysdeps/unix/sysv/linux/alpha/net/route.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Based on the 4.4BSD and Linux version of this file. */
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index 728f1fe..68cda76 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file contains only wrappers around the real glob functions. It
became necessary since the glob_t structure changed. */
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index be5e938..45c1724 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index 6a2bcf3..5d2905a 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger (davidm@cs.arizona.edu).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* __pipe is a special syscall since it returns two values. */
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 5697584..e3d01af 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -3,19 +3,19 @@
Contributed by Richard Henderson <rth@cygnus.com>, 1998
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 1876e2f..40c0f9f 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index ea1a1e4..6f164b4 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stdarg.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index 5e74c35..5622d84 100644
--- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <fpu_control.h>
#include <asm/fpu.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index 0fc5fe7..2cc1263 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index 35c5602..03e9206 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index bd5b881..0a6cdf1 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/shm.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
index 4613bd5..eb6f4f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define SIGCONTEXT struct sigcontext
#define SIGCONTEXT_EXTRA_ARGS
diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
index 7fb58f1..4d22192 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
@@ -3,19 +3,19 @@
Contributed by David Mosberger (davidm@azstarnet.com).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 3036b2f..7aa851e 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* sigsuspend is a special syscall since it needs to dereference the
sigset. This will have to change when we have more than 64 signals. */
diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h
index a133586..0c7f4d5 100644
--- a/sysdeps/unix/sysv/linux/alpha/sizes.h
+++ b/sysdeps/unix/sysv/linux/alpha/sizes.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIZES_H
#define _SIZES_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
index 2ddf44a..1e00006 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_ACCT_H
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index d98430b..4334c63 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IO_H
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index a9ae104..bee51f9 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
index ca5d44f..43ec376 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SYSMACROS_H
#define _SYS_SYSMACROS_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
index 50c643a..438293c 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h
index fe6acb2..4cd29d2 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 7f8a33f..c354bb6 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -3,19 +3,19 @@
Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 1a3cf37..05a4c3a 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef __ASSEMBLER__
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c
index 6c64d31..5fe25ff 100644
--- a/sysdeps/unix/sysv/linux/alpha/ustat.c
+++ b/sysdeps/unix/sysv/linux/alpha/ustat.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/ustat.h>
#include <sys/sysmacros.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index 959ec85..e9c16db 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 08b3a09..b695047 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c
index d7ae6dd..1027204 100644
--- a/sysdeps/unix/sysv/linux/alpha/wordexp.c
+++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
index 25de60c..a659c1f 100644
--- a/sysdeps/unix/sysv/linux/alpha/xmknod.c
+++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index cb0269b..31fe7a5 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
index 636a93b..4530cdb 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
Fortunately 2.0 puts a magic number in the first word and this is not
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 776ee29..152858d 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index fbb58c8..715e0f0 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never include this file directly. Use <sys/mman.h> instead"
diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h
index db3848b..3da13be 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c
index 560e5a8..153d893 100644
--- a/sysdeps/unix/sysv/linux/arm/brk.c
+++ b/sysdeps/unix/sysv/linux/arm/brk.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 94aed12..c9a1ec2 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -3,19 +3,19 @@
Contributed by Pat Beirne <patb@corelcomputer.com>
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 564d7d1..8bc18bf 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 2001.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This information must be kept in sync with the _DL_HWCAP_COUNT and
_DL_PLATFORM_COUNT definitions in procinfo.h. */
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 9f4c83e..87d114c 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 2001.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DL_PROCINFO_H
#define _DL_PROCINFO_H 1
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
index 63bf8e9..ba5e699 100644
--- a/sysdeps/unix/sysv/linux/arm/errlist.c
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sizes.h>
#include <errlist.h>
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 3c51540..40ac8e6 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -4,19 +4,19 @@
David Mosberger.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* I/O port access on the ARM is something of a fiction. What we do is to
map an appropriate area of /dev/mem into user space so that a program
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index 31d57e4..af93c7b 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 57b1d8a..1f19bf0 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index a1a4fc9..5d8be9d 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <signal.h>
#include <bits/armsigctx.h>
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
index 25036df..2baccb2 100644
--- a/sysdeps/unix/sysv/linux/arm/register-dump.h
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -4,19 +4,19 @@
Contributed by Philip Blundell <pb@nexus.co.uk>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 53f24c4..f39665f 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index cc8f2f7..aebc3cf 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -3,19 +3,19 @@
Contributed by Philip Blundell <philb@gnu.org>, 1999.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <bits/armsigctx.h>
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
index 3d7464e..e053339 100644
--- a/sysdeps/unix/sysv/linux/arm/siglist.c
+++ b/sysdeps/unix/sysv/linux/arm/siglist.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
index 8d32e4c..98e33cb 100644
--- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S
+++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 92c7e90..a672413 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <socketcall.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h
index ffd3b46..faa7310 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/elf.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h
index 96d54cd..6863990 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/io.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/io.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IO_H
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
index ddce965..3b37363 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index c94c6c6..6d6c8e3 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* System V/ARM ABI compliant context switching support. */
diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h
index e47c42c..3fae43f 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/user.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/user.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index 3e3c853..48dcffa 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 79453f8..89ad194 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -4,19 +4,19 @@
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _LINUX_ARM_SYSDEP_H
#define _LINUX_ARM_SYSDEP_H 1
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
index 3d5bd95..b10117e 100644
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -3,19 +3,19 @@
Contributed by Philip Blundell <philb@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
index 87c6c19..7e841f8 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h
index f97e841..2813f09 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h
index f7bfe42..09c1b7e 100644
--- a/sysdeps/unix/sysv/linux/cris/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/cris/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/linux/cris/brk.c b/sysdeps/unix/sysv/linux/cris/brk.c
index 32a5145..ce49445 100644
--- a/sysdeps/unix/sysv/linux/cris/brk.c
+++ b/sysdeps/unix/sysv/linux/cris/brk.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/cris/clone.S b/sysdeps/unix/sysv/linux/cris/clone.S
index c501c86..b201643 100644
--- a/sysdeps/unix/sysv/linux/cris/clone.S
+++ b/sysdeps/unix/sysv/linux/cris/clone.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/cris/mmap.S b/sysdeps/unix/sysv/linux/cris/mmap.S
index 33030f4..3c74d59 100644
--- a/sysdeps/unix/sysv/linux/cris/mmap.S
+++ b/sysdeps/unix/sysv/linux/cris/mmap.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/cris/mmap64.S b/sysdeps/unix/sysv/linux/cris/mmap64.S
index acf6ca3..d711144 100644
--- a/sysdeps/unix/sysv/linux/cris/mmap64.S
+++ b/sysdeps/unix/sysv/linux/cris/mmap64.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/cris/profil-counter.h b/sysdeps/unix/sysv/linux/cris/profil-counter.h
index 8bbce54..37adc1f 100644
--- a/sysdeps/unix/sysv/linux/cris/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/cris/profil-counter.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <signal.h>
diff --git a/sysdeps/unix/sysv/linux/cris/register-dump.h b/sysdeps/unix/sysv/linux/cris/register-dump.h
index e8a52f7..309728b 100644
--- a/sysdeps/unix/sysv/linux/cris/register-dump.h
+++ b/sysdeps/unix/sysv/linux/cris/register-dump.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <sys/uio.h>
diff --git a/sysdeps/unix/sysv/linux/cris/socket.S b/sysdeps/unix/sysv/linux/cris/socket.S
index 06832ec..38b4ac5 100644
--- a/sysdeps/unix/sysv/linux/cris/socket.S
+++ b/sysdeps/unix/sysv/linux/cris/socket.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <socketcall.h>
diff --git a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
index fe4dc7b..2d3aee0 100644
--- a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H 1
diff --git a/sysdeps/unix/sysv/linux/cris/syscall.S b/sysdeps/unix/sysv/linux/cris/syscall.S
index eb5cdcc..03626b0 100644
--- a/sysdeps/unix/sysv/linux/cris/syscall.S
+++ b/sysdeps/unix/sysv/linux/cris/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S
index 4a108db..64fb850 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.S
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h
index d388665..4446b26 100644
--- a/sysdeps/unix/sysv/linux/cris/sysdep.h
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <asm/unistd.h>
#include <sysdeps/cris/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S
index bb4072f..39985a0 100644
--- a/sysdeps/unix/sysv/linux/cris/vfork.S
+++ b/sysdeps/unix/sysv/linux/cris/vfork.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
index db4eaf6..8b1fa44 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _ERRNO_H
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index 687ffc8..d8b110c 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
index bad78b6..6f4e05f 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h
index be4b53a..2e4958b 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
index bdded3d..33f2b23 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
index a475004..14346bf 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
index c12608c..b534b17 100644
--- a/sysdeps/unix/sysv/linux/hppa/brk.c
+++ b/sysdeps/unix/sysv/linux/hppa/brk.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index b902ff7..459eaff 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -4,19 +4,19 @@
Based on the Alpha version by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c
index 333d848..6f4bfdc 100644
--- a/sysdeps/unix/sysv/linux/hppa/mmap.c
+++ b/sysdeps/unix/sysv/linux/hppa/mmap.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
index b6c756f..2e6d109 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
index 44108f0..0f14b46 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Don't rely on this, the interface is currently messed up and may need to
be broken to be fixed. */
diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S
index 96b5b92..b333487 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscall.S
+++ b/sysdeps/unix/sysv/linux/hppa/syscall.S
@@ -2,18 +2,18 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* HPPA implements syscall() in 'C'; see sysdep.c. */
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index e185da5..b333b70 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <errno.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 20ec736..af255e1 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -5,19 +5,19 @@
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <asm/unistd.h>
#include <sysdeps/generic/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
index 3d4c18c..e7c5690 100644
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -3,19 +3,19 @@
Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Since we don't have an oldumount system call, do what the kernel
does down here. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 0afadf6..7de111a 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index bca1dae..34f14ee 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
index 7472a80..17adb4d 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_POLL_H
# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index f360e7f..213dbe2 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index bbbcf84..10a82aa 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index 1ea7e26..50e11c1 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 622f811..9ca789d 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* clone is even more special than fork as it mucks with stacks
and invokes a function in the right context after its all over. */
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
index 0e2ba10..cfe98fc 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpagesize.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -3,19 +3,19 @@
Contributed by Andreas Schwab <schwab@suse.de>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <sys/param.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 9457831..086212a 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
index 2fec9aa..68d961b 100644
--- a/sysdeps/unix/sysv/linux/m68k/mremap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mremap.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
index 6e66b62..ab9a155 100644
--- a/sysdeps/unix/sysv/linux/m68k/register-dump.h
+++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -4,19 +4,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <sys/uio.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
index b7e6f37..b7e08cf 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -3,19 +3,19 @@
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define SIGCONTEXT int _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 767665c..3592d2a 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <socketcall.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
index 0f3a133..418f832 100644
--- a/sysdeps/unix/sysv/linux/m68k/sys/reg.h
+++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_REG_H
#define _SYS_REG_H 1
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index f34c076..4f2c747 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 717122c..30beaf2 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 39b7bda..23fcc55 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -4,19 +4,19 @@
December 1995.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/m68k/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
index d5b321d..b77a7bd 100644
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -3,19 +3,19 @@
Contributed by Andreas Schwab <schwab@gnu.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c
index 870b12a..9fd48f7 100644
--- a/sysdeps/unix/sysv/linux/mips/_test_and_set.c
+++ b/sysdeps/unix/sysv/linux/mips/_test_and_set.c
@@ -3,19 +3,19 @@
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the real-function versions of all inline functions
defined in sys/tas.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index c45829a..29ba980 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _ERRNO_H
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 5657c32..6a09a09 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
index e40a0ad..a8dcf24 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IOCTL_H
# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 0cdd232..1f629ce 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index f6c5094..61886e2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_MMAN_H
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
index b0ef078..825d073 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_POLL_H
# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index ced5c5e..b8551a2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_RESOURCE_H
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h
index 5f7b0a9..6282de9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sem.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sem.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SEM_H
# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 02fabb7..ddae6b0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SHM_H
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 0225078..93a7598 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 6e6f70b..04c5f40 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
&& !defined __need_sigevent_t
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h
index 2cf5814..a9b6848 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
index a0f1ba6..d2c8552 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 9e38d28..482eefe 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __BITS_SOCKET_H
#define __BITS_SOCKET_H
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 9210cae..c0e6984 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
index 1099ae1..2f9bd54 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STATFS_H
# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index ca6b648..87d0eae 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _TERMIOS_H
# error "Never include <bits/termios.h> directly; use <termios.h> instead."
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index c3b93e3..141f0b2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
index ce85617..4be88a9 100644
--- a/sysdeps/unix/sysv/linux/mips/brk.c
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index dd7a1f5..1e02968 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index bc03e0c..047bcb5 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <errno.h>
diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c
index 799a733..9b521ac 100644
--- a/sysdeps/unix/sysv/linux/mips/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* We need to define a special parser for /proc/cpuinfo. */
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
index e876862..9b622f4 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _KERNEL_TERMIOS_H
#define _KERNEL_TERMIOS_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index 93f19f4..b1c1c0d 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 6482ce4..d36d689 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 8283896..40b2c8b 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index af07f60..a655d6e 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -3,19 +3,19 @@
Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index 53c59c8..f5fb344 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -4,19 +4,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
index 36265d1..fb32b50 100644
--- a/sysdeps/unix/sysv/linux/mips/sigaction.c
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 36d57dc..a51c6f0 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -3,19 +3,19 @@
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define SIGCONTEXT unsigned long _code, struct sigcontext *
diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
index 3bbd47c..a93e1fb 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_CACHECTL_H
#define _SYS_CACHECTL_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 414e60e..76dd2bb 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
index 8afb149..642a316 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_SYSMIPS_H
#define _SYS_SYSMIPS_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 757b8bc..0c81dc2 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -3,19 +3,19 @@
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_TAS_H
#define _SYS_TAS_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index b015898..f57b91e 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Don't rely on this, the interface is currently messed up and may need to
be broken to be fixed. */
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S
index c7bc193..d051c4f 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.S
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
index f01a195..be88479 100644
--- a/sysdeps/unix/sysv/linux/mips/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _LINUX_MIPS_SYSDEP_H
#define _LINUX_MIPS_SYSDEP_H 1
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index 09a2755..6f870b8 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <endian.h>
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
index 2afc3e7..8f5002c 100644
--- a/sysdeps/unix/sysv/linux/mips/ustat.c
+++ b/sysdeps/unix/sysv/linux/mips/ustat.c
@@ -3,19 +3,19 @@
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/ustat.h>
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
index 2fed00d..d2a02f5 100644
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index 583b1ec..b3b7634 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
index 96f14d1..4b04b7b 100644
--- a/sysdeps/unix/sysv/minix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
index d8ad98f..2064e67 100644
--- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
index 3c549dd..42e6ed0 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _UNISTD_H
# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
index eaa52be..f087388 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
index aaf0e63..ef27df2 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index 3367ec7..05f3333 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h
index 9c03f89..05bbb89 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h
+++ b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* From Scott Bartram. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 55db86b..9780bd4 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#include <bits/confname.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S
index c56dd4d..bc61089 100644
--- a/sysdeps/unix/sysv/sco3.2.4/uname.S
+++ b/sysdeps/unix/sysv/sco3.2.4/uname.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index ae1e9a1..53e08cf 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile
index ff3a6fb..c4d9da7 100644
--- a/sysdeps/unix/sysv/sco3.2/Makefile
+++ b/sysdeps/unix/sysv/sco3.2/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),misc)
diff --git a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h
index 365858c..b4141d0 100644
--- a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h
+++ b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _BITS_LOCAL_LIM_H
#define _BITS_LOCAL_LIM_H 1
diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile
index 7507fbf..6f7155c 100644
--- a/sysdeps/unix/sysv/sysv4/Makefile
+++ b/sysdeps/unix/sysv/sysv4/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License
-# as published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),posix)
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
index 9fc221b..4ee0e74 100644
--- a/sysdeps/unix/sysv/sysv4/__getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
index 3a03415..b497d7e 100644
--- a/sysdeps/unix/sysv/sysv4/__setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__setpgid.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
index 07d5554..faf07e5 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/bits/signum.h b/sysdeps/unix/sysv/sysv4/bits/signum.h
index f11c731..07f900a 100644
--- a/sysdeps/unix/sysv/sysv4/bits/signum.h
+++ b/sysdeps/unix/sysv/sysv4/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h
index c5d596d..bf0cae2 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGSET_H_types
#define _SIGSET_H_types 1
diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h
index dfe46b8..891ae68 100644
--- a/sysdeps/unix/sysv/sysv4/bits/utsname.h
+++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
index 841f8a3..40bc823 100644
--- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h
+++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
@@ -4,19 +4,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#if !defined _SYS_WAIT_H && !defined _STDLIB_H
# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c
index 5c9d874..47e040e 100644
--- a/sysdeps/unix/sysv/sysv4/ftruncate.c
+++ b/sysdeps/unix/sysv/sysv4/ftruncate.c
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sys/types.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
index 1a1440f..4a058b5 100644
--- a/sysdeps/unix/sysv/sysv4/gethostname.c
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index d2b27cb..0d4e4ca 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <unistd.h>
#include <sys/types.h>
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
index 8204f55..c1016a9 100644
--- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
index 35cd16a..6e2d1ab 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
+++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index 77ee6a0..daecdb6 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdeps/unix/sysv/i386/sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c
index 10fb5ff..f4e7b4e 100644
--- a/sysdeps/unix/sysv/sysv4/sethostname.c
+++ b/sysdeps/unix/sysv/sysv4/sethostname.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index d9d3e8f..27f4967 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index 638ab73..44cbaf0 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 4cd4150..de0f5af 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
index 316cd47..2bb9257 100644
--- a/sysdeps/unix/sysv/sysv4/siginfo.h
+++ b/sysdeps/unix/sysv/sysv4/siginfo.h
@@ -4,19 +4,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGINFO_H
#define _SIGINFO_H 1
diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
index 4daab22..7b082f7 100644
--- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
@@ -5,19 +5,19 @@
Contributed by Joe Keane <jgk@jgk.org>.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#define sigset_set_old_mask(set, mask) \
do { \
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
index cc6c999..fa0250e 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _DIRENT_H
# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
index 4065bfb..8d5d49e 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This file defines the `errno' constants. */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
index 33a040b..a265953 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
index 905e87f..753caac 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never include this file directly. Use <signal.h> instead"
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index 091f5ba..22c1c1f 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_STAT_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 7765fa4..a9ce216 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/*
* Never include this file directly; use <sys/types.h> instead.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
index 3f4d7d6..493926a 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
index 2cf2a57..8627245 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <alloca.h>
#include <dirent.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
index 4e1ce0e..2723d79 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
index 29d2d87..7c4bca6 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SIGNAL_H
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
index fd8a503..3c75e3f 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <stddef.h>
#include <libintl.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h
index 411d23e..39d2645 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_TRAP_H
#define _SYS_TRAP_H 1
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h
index 4a32f81..6e9f690 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_UCONTEXT_H
#define _SYS_UCONTEXT_H 1
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index de3735b..2ac767c 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <sysdep.h>
#define _ERRNO_H
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index a21672b..d9badf7 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Solaris 2 does not precede the asm names of C symbols with a `_'. */
#ifndef NO_UNDERSCORES
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h
index 3afb17a..bbd7b06 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H 1
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h
index 2c071a7..15c43a3 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _SYSCALL_H
#define _SYSCALL_H 1
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 98fdbb1..77ce2d8 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <limits.h>
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h
index 6af9cb8..b51a364 100644
--- a/sysdeps/unix/sysv/sysv4/sysconfig.h
+++ b/sysdeps/unix/sysv/sysv4/sysconfig.h
@@ -4,19 +4,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __SYSCONFIG_H
#define __SYSCONFIG_H
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index 4f43527..8b899a7 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -3,19 +3,19 @@
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <errno.h>
#include <sys/wait.h>
diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile
index b27d65d..909fc29 100644
--- a/sysdeps/vax/Makefile
+++ b/sysdeps/vax/Makefile
@@ -2,19 +2,19 @@
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
+# Lesser General Public License for more details.
-# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
ifeq ($(subdir),math)
ifndef math-twiddled
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
index e795c42..0ab593f 100644
--- a/sysdeps/vax/__longjmp.c
+++ b/sysdeps/vax/__longjmp.c
@@ -1,21 +1,23 @@
/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
+ This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h
index 74930be..63395b1 100644
--- a/sysdeps/vax/bits/huge_val.h
+++ b/sysdeps/vax/bits/huge_val.h
@@ -4,19 +4,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef _MATH_H
# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S
index ce324e4..58204d2 100644
--- a/sysdeps/vax/bsd-_setjmp.S
+++ b/sysdeps/vax/bsd-_setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S
index b6eadb7..792fcf7 100644
--- a/sysdeps/vax/bsd-setjmp.S
+++ b/sysdeps/vax/bsd-setjmp.S
@@ -3,19 +3,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h
index abf6662..79cbeb2 100644
--- a/sysdeps/vax/fl.h
+++ b/sysdeps/vax/fl.h
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#ifndef __need_HUGE_VAL
diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c
index 97fa3a0..9a459ff 100644
--- a/sysdeps/vax/memccpy.c
+++ b/sysdeps/vax/memccpy.c
@@ -2,19 +2,19 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <string.h>
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index 43a80c1..c57e914 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -4,19 +4,19 @@
Copyright (c) 1980 Regents of the University of California.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
#include <setjmp.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fbcd2261e9bd5deee3d8b31f4d00412e0a5650e
commit 6fbcd2261e9bd5deee3d8b31f4d00412e0a5650e
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jul 5 08:46:28 2001 +0000
Synch with Linux 2.4.5:
* sysdeps/unix/sysv/linux/sparc/bits/socket.h (PF_BLUETOOTH):
New.
(AF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h
(PF_BLUETOOTH): New.
(AF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/mips/bits/socket.h (AF_BLUETOOTH): New.
(PF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/ia64/bits/socket.h (AF_BLUETOOTH): New.
(PF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/alpha/bits/socket.h (PF_BLUETOOTH): New.
(AF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/bits/socket.h (PF_BLUETOOTH): New.
(AF_BLUETOOTH): New.
* sysdeps/unix/sysv/linux/net/if_arp.h (ARPHRD_IEEE80211): New.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h (N_HCI): New.
* sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h (N_HCI): New.
* sysdeps/unix/sysv/linux/bits/ioctl-types.h (N_HCI): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
index cf8e5a1..a5c7e95 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
@@ -88,6 +88,7 @@ enum __socket_type
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -119,6 +120,7 @@ enum __socket_type
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
index 573f9e7..e40a0ad 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -73,3 +73,4 @@ struct termio
#define N_SMSBLOCK 12 /* SMS block mode */
#define N_HDLC 13 /* synchronous HDLC */
#define N_SYNC_PPP 14 /* synchronous PPP */
+#define N_HCI 15 /* Bluetooth HCI UART */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index eaf8ccc..9e38d28 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -88,6 +88,7 @@ enum __socket_type
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_WANPIPE 25 /* Wanpipe API sockets. */
+#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -119,6 +120,7 @@ enum __socket_type
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
#define AF_WANPIPE PF_WANPIPE
+#define AF_BLUETOOTH PF_BLUETOOTH
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5bebe4c22d9e992acaf844580148a217d4ab7d8
commit a5bebe4c22d9e992acaf844580148a217d4ab7d8
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 3 16:50:33 2001 +0000
Remove check for crypt add-on.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure
index 9dc9768..b5675df 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/configure
+++ b/sysdeps/unix/sysv/sysv4/solaris2/configure
@@ -2,30 +2,3 @@
# Concensus on stdio is that it's broken.
test $stdio = default && stdio=libio
-
-# Crypt is your friend.
-case $add_ons in
- *crypt*)
- message=
- ;;
- *)
- message="\
-*** WARNING:
-*** Are you sure you do not want to use the \`crypt' add-on?"
- ;;
-esac
-
-if test "$message"; then
- if test $enable_sanity = yes; then
- echo "\
-*** You should not compile the GNU libc without the \`crypt' add-on.
-*** Not using them risks to be incompatible with the libraries of
-*** other systems. Consider getting the add-on and restart the
-*** configuration.
-*** If you reall mean to avoid this add-on run configure again, now
-*** using the extra parameter \`--disable-sanity-checks'."
- exit 1
- else
- echo "$message"
- fi
-fi
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in
index 1c02fbb..76f3109 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/configure.in
+++ b/sysdeps/unix/sysv/sysv4/solaris2/configure.in
@@ -4,30 +4,3 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Concensus on stdio is that it's broken.
test $stdio = default && stdio=libio
-
-# Crypt is your friend.
-case $add_ons in
- *crypt*)
- message=
- ;;
- *)
- message="\
-*** WARNING:
-*** Are you sure you do not want to use the \`crypt' add-on?"
- ;;
-esac
-
-if test "$message"; then
- if test $enable_sanity = yes; then
- echo "\
-*** You should not compile the GNU libc without the \`crypt' add-on.
-*** Not using them risks to be incompatible with the libraries of
-*** other systems. Consider getting the add-on and restart the
-*** configuration.
-*** If you reall mean to avoid this add-on run configure again, now
-*** using the extra parameter \`--disable-sanity-checks'."
- exit 1
- else
- echo "$message"
- fi
-fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3553aef88614693e9f6ce50ba9e22ed3baa9941a
commit 3553aef88614693e9f6ce50ba9e22ed3baa9941a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:08:58 2001 +0000
Register dump function implementation for AIX/PPC.
diff --git a/sysdeps/unix/sysv/aix/powerpc/register-dump.h b/sysdeps/unix/sysv/aix/powerpc/register-dump.h
new file mode 100644
index 0000000..3f308e6
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/powerpc/register-dump.h
@@ -0,0 +1,281 @@
+/* Dump registers.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/uio.h>
+#include <stdio-common/_itoa.h>
+#include <sys/ucontext.h>
+
+/* We will print the register dump in this format:
+
+Register dump:
+fp0-3: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp4-7: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp8-11: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp12-15: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp16-19: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp20-23: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp24-27: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+fp28-31: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
+
+r00-07 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+r08-15 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+r16-23 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+r24-31 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
+
+ trap 00000000 iar 00000000 msr 00000000 cr 00000000
+ lr 00000000 ctr 00000000 xer 00000000 mq 00000000
+ tid 00000000 fpscr 00000000
+
+*/
+
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+ char *cp = _itoa_word (value, buf + len, 16, 0);
+ while (cp > buf)
+ *--cp = '0';
+}
+
+
+static void
+register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[108][8];
+ struct iovec iov[38];
+ struct __mstsafe *reg_state;
+ int i;
+ int ii;
+ size_t nr = 0;
+
+#define ADD_STRING(str) \
+ iov[nr].iov_base = (char *) str; \
+ iov[nr].iov_len = strlen (str); \
+ ++nr
+#define ADD_MEM(str, len) \
+ iov[nr].iov_base = str; \
+ iov[nr].iov_len = len; \
+ ++nr
+
+ reg_state = (struct __mstsafe *)&ctx->sc_jmpbuf.__jmp_context;
+
+ hexvalue (reg_state->__excp_type, regs[0], 8);
+ hexvalue (reg_state->__iar, regs[1], 8);
+ hexvalue (reg_state->__msr, regs[2], 8);
+ hexvalue (reg_state->__cr, regs[3], 8);
+ hexvalue (reg_state->__lr, regs[4], 8);
+ hexvalue (reg_state->__ctr, regs[5], 8);
+ hexvalue (reg_state->__xer, regs[6], 8);
+ hexvalue (reg_state->__mq, regs[7], 8);
+ hexvalue (reg_state->__tid, regs[8], 8);
+ hexvalue (reg_state->__fpscr, regs[9], 8);
+
+ ii=10;
+ for (i = 0; i <= 96; i++,ii++)
+ hexvalue (reg_state->__gpr[i], regs[ii], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\nfp0-3: ");
+ ADD_MEM (regs[42], 8);
+ ADD_MEM (regs[43], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[44], 8);
+ ADD_MEM (regs[45], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[46], 8);
+ ADD_MEM (regs[47], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[48], 8);
+ ADD_MEM (regs[49], 8);
+ ADD_STRING ("\nfp4-7: ");
+ ADD_MEM (regs[50], 8);
+ ADD_MEM (regs[51], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[52], 8);
+ ADD_MEM (regs[53], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[54], 8);
+ ADD_MEM (regs[55], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[56], 8);
+ ADD_MEM (regs[57], 8);
+ ADD_STRING ("\nfp8-11: ");
+ ADD_MEM (regs[58], 8);
+ ADD_MEM (regs[59], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[60], 8);
+ ADD_MEM (regs[61], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[62], 8);
+ ADD_MEM (regs[63], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[64], 8);
+ ADD_MEM (regs[65], 8);
+ ADD_STRING ("\nfp12-15: ");
+ ADD_MEM (regs[66], 8);
+ ADD_MEM (regs[67], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[68], 8);
+ ADD_MEM (regs[69], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[70], 8);
+ ADD_MEM (regs[71], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[72], 8);
+ ADD_MEM (regs[73], 8);
+ ADD_STRING ("\nfp16-19: ");
+ ADD_MEM (regs[74], 8);
+ ADD_MEM (regs[75], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[76], 8);
+ ADD_MEM (regs[78], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[79], 8);
+ ADD_MEM (regs[80], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[81], 8);
+ ADD_MEM (regs[82], 8);
+ ADD_STRING ("\nfp20-23: ");
+ ADD_MEM (regs[83], 8);
+ ADD_MEM (regs[84], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[85], 8);
+ ADD_MEM (regs[86], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[87], 8);
+ ADD_MEM (regs[88], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[89], 8);
+ ADD_MEM (regs[90], 8);
+ ADD_STRING ("\nfp24-27: ");
+ ADD_MEM (regs[91], 8);
+ ADD_MEM (regs[92], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[93], 8);
+ ADD_MEM (regs[94], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[95], 8);
+ ADD_MEM (regs[96], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[97], 8);
+ ADD_MEM (regs[98], 8);
+ ADD_STRING ("\nfp28-31: ");
+ ADD_MEM (regs[99], 8);
+ ADD_MEM (regs[100], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[101], 8);
+ ADD_MEM (regs[102], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[103], 8);
+ ADD_MEM (regs[104], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[105], 8);
+ ADD_MEM (regs[106], 8);
+ ADD_STRING ("\n\nr00-07 ");
+ ADD_MEM (regs[10], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[11], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[12], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[13], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[14], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[15], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[16], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[17], 8);
+ ADD_STRING ("\nr08-15 ");
+ ADD_MEM (regs[18], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[19], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[20], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[21], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[22], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[23], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[24], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[25], 8);
+ ADD_STRING ("\nr16-23 ");
+ ADD_MEM (regs[26], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[27], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[28], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[29], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[30], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[31], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[32], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[33], 8);
+ ADD_STRING ("\nr24-31 ");
+ ADD_MEM (regs[34], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[35], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[36], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[37], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[38], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[39], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[40], 8);
+ ADD_STRING (" ");
+ ADD_MEM (regs[41], 8);
+ ADD_STRING ("\n\n trap ");
+ ADD_MEM (regs[0], 8);
+ ADD_STRING (" iar ");
+ ADD_MEM (regs[1], 8);
+ ADD_STRING (" msr ");
+ ADD_MEM (regs[2], 8);
+ ADD_STRING (" cr ");
+ ADD_MEM (regs[3], 8);
+ ADD_STRING ("\n lr ");
+ ADD_MEM (regs[4], 8);
+ ADD_STRING (" ctr ");
+ ADD_MEM (regs[5], 8);
+ ADD_STRING (" xer ");
+ ADD_MEM (regs[6], 8);
+ ADD_STRING (" mq ");
+ ADD_MEM (regs[7], 8);
+ ADD_STRING ("\n tid ");
+ ADD_MEM (regs[8], 8);
+ ADD_STRING (" fpscr ");
+ ADD_MEM (regs[9], 8);
+ ADD_STRING ("\n");
+
+ /* Write the stuff out. */
+ writev (fd, iov, nr);
+}
+
+#define REGISTER_DUMP register_dump (fd, ctx)
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa21e7c94ff32bff1d4e9373a13ca67bc6308002
commit aa21e7c94ff32bff1d4e9373a13ca67bc6308002
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:08:26 2001 +0000
usleep implementation for AIX.
diff --git a/sysdeps/unix/sysv/aix/usleep.c b/sysdeps/unix/sysv/aix/usleep.c
new file mode 100644
index 0000000..19d5773
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/usleep.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <time.h>
+#include <unistd.h>
+#include <errno.h>
+
+extern int __libc_nanosleep (const struct timespec *requested_time,
+ struct timespec *remaining);
+
+/* Sleep USECONDS microseconds, or until a previously set timer goes off. */
+int
+usleep (useconds)
+ useconds_t useconds;
+{
+ struct timespec ts ={tv_sec:0,tv_nsec:(long int)useconds * 1000};
+ __libc_nanosleep(&ts,&ts);
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc811924cdebd00f0ab1befc864e6d9ddecca96e
commit cc811924cdebd00f0ab1befc864e6d9ddecca96e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:08:13 2001 +0000
sleep implementation for AIX.
diff --git a/sysdeps/unix/sysv/aix/sleep.c b/sysdeps/unix/sysv/aix/sleep.c
new file mode 100644
index 0000000..3ac5952
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sleep.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <time.h>
+#include <unistd.h>
+#include <errno.h>
+
+extern int __libc_nanosleep (const struct timespec *requested_time,
+ struct timespec *remaining);
+
+unsigned int
+__sleep (seconds)
+ unsigned int seconds;
+{
+ struct timespec ts ={tv_sec:(long int)seconds,tv_nsec:0};
+ __libc_nanosleep(&ts,&ts);
+ return 0;
+}
+weak_alias (__sleep, sleep)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55f326305c8e8fe91c52d38857b5ffc025836cd4
commit 55f326305c8e8fe91c52d38857b5ffc025836cd4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:07:41 2001 +0000
setitimer implementation for AIX.
diff --git a/sysdeps/unix/sysv/aix/setitimer.c b/sysdeps/unix/sysv/aix/setitimer.c
new file mode 100644
index 0000000..444900b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setitimer.c
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <signal.h>
+
+extern int __libc_nanosleep (const struct timespec *requested_time,
+ struct timespec *remaining);
+int
+__setitimer (which, new, old)
+ enum __itimer_which which;
+ const struct itimerval *new;
+ struct itimerval *old;
+{
+ if (new == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ switch (which)
+ {
+ default:
+ __set_errno (EINVAL);
+ return -1;
+
+ case ITIMER_VIRTUAL:
+ case ITIMER_PROF:
+ __set_errno (ENOSYS);
+ return -1;
+
+ case ITIMER_REAL:
+ break;
+ }
+
+ switch (__fork())
+ {
+ case -1: exit(-1);
+ case 0:
+ {
+ struct timespec ts ={tv_sec:(long int)new->it_value.tv_sec,tv_nsec:0};
+ __libc_nanosleep(&ts,&ts);
+ __kill(getppid(), SIGALRM);
+ exit(0);
+ }
+ default:
+ }
+ return 0;
+}
+weak_alias (__setitimer, setitimer)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68dbc1fdab716d68083c928d9951abc03e20ad9e
commit 68dbc1fdab716d68083c928d9951abc03e20ad9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:07:10 2001 +0000
Various helper functions for dynamic loader code.
diff --git a/sysdeps/unix/sysv/aix/dl-support.c b/sysdeps/unix/sysv/aix/dl-support.c
new file mode 100644
index 0000000..a641370
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-support.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#include <elf/dl-support.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc0664c1297cbf87b2be9ff3b57b9beae2e43d98
commit dc0664c1297cbf87b2be9ff3b57b9beae2e43d98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:06:11 2001 +0000
_dl_error implementation for AIX.
diff --git a/sysdeps/unix/sysv/aix/dl-error.c b/sysdeps/unix/sysv/aix/dl-error.c
new file mode 100644
index 0000000..069596e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-error.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#include <elf/dl-error.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fb75a646966108e851c7cc6b1443588d09e6b8b
commit 6fb75a646966108e851c7cc6b1443588d09e6b8b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:05:44 2001 +0000
_dl_addr implementation for AIX.
diff --git a/sysdeps/unix/sysv/aix/dl-addr.c b/sysdeps/unix/sysv/aix/dl-addr.c
new file mode 100644
index 0000000..928b76e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-addr.c
@@ -0,0 +1,30 @@
+/*
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <ldsodefs.h>
+
+int
+internal_function
+_dl_addr (const void *address, Dl_info *info)
+{
+ return 0;
+}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9823d7f912e43f9ed064a3c72f997537e760aad
commit b9823d7f912e43f9ed064a3c72f997537e760aad
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:04:35 2001 +0000
Define __dso_handle if not ELF but shared.
diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c
index d854a55..eee2196 100644
--- a/sysdeps/unix/sysv/aix/start.c
+++ b/sysdeps/unix/sysv/aix/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 93, 1995-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 93, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,6 +32,12 @@ typedef unsigned char uchar; /* sb in libc/posix/types.h */
/* The first piece of initialized data. */
int __data_start = 0;
++#ifndef HAVE_ELF
+/* Since gcc/crtstuff.c won't define it unless the ELF format is used
+ we will need to define it here. */
+void *__dso_handle = NULL;
+#endif
+
extern int errno;
/* extern __pthread_init; */
@@ -108,12 +114,12 @@ asm("
#endif
crt0_info.p_argc = (int*)&argc;
-/* crt0_info.threads_init = (FPV) &__pthread_init; */
+/* crt0_info.threads_init = (FPV) &__pthread_init; */
/*
* Do run-time linking, if enabled and call the init()
* for all loaded modules.
- */
+ */
argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin);
errno=0;
@@ -131,9 +137,9 @@ asm("
* int modinit(argc,crt0_info,module_count,text,data)
*
* argc - current value of argc.
- * info - crt0 information passed
+ * info - crt0 information passed
* module_count - number of modules loaded.
- * text - Beginning of text address
+ * text - Beginning of text address
* data - Beginning of data address
*/
@@ -287,4 +293,3 @@ __RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count
(data_origin - data_sec_hdr->s_vaddr));
return(rtl);
}
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed556c3c9987244a8ff3d1236be6ba0e703d37a6
commit ed556c3c9987244a8ff3d1236be6ba0e703d37a6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:04:05 2001 +0000
Removed #if 0.
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
index 6b5bd48..e85bd05 100644
--- a/sysdeps/unix/sysv/aix/gettimeofday.c
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,10 +57,9 @@ __gettimeofday (tv, tz)
if (ts != tu) /* the lower reg to the upper */
tl = rtc_lower(); /* Recover from the race condition */
- tv->tv_sec = (long int) (tu + (double)tl/1000000000);
+ tv->tv_sec = (long int) (tu + (double)tl/1000000000);
tv->tv_usec = (long int) ((double)tl/1000);
-#if 0
if (tz != NULL)
{
const time_t timer = tv->tv_sec;
@@ -86,7 +85,6 @@ __gettimeofday (tv, tz)
if (tmp == NULL)
return -1;
}
-#endif
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58e6e5bfc6735a4bfc53bd3af32de51bf41e9eb9
commit 58e6e5bfc6735a4bfc53bd3af32de51bf41e9eb9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 20 07:03:22 2001 +0000
Added dl-support.c and dl-error.c.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index dc91f8f..19ec885 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -3,7 +3,10 @@
+postctor += /lib/syscalls.exp
ifeq ($(subdir),misc)
-sysdep_routines += dl-libc dl-open dl-sym dl-close uitrunc
+sysdep_routines += dl-error dl-support dl-libc dl-open dl-sym \
+ dl-close dl-addr uitrunc
+
+static-only-routines = gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
endif
ifeq ($(subdir),login)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69ab1cbb296811726bf82af3339a699d10650bc9
commit 69ab1cbb296811726bf82af3339a699d10650bc9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 19 00:42:10 2001 +0000
(elf_machine_rela): handle relocs at unaligned address.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 4616334..f0c1b13 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -530,7 +530,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (map == &_dl_rtld_map)
return;
#endif
- /* Otherwise, nothing more to do here. */
+ /* .eh_frame can have unaligned relocs. */
+ if (reloc_addr & 3)
+ {
+ char *rel_addr = (char *) reloc_addr;
+ rel_addr[0] = value >> 24;
+ rel_addr[1] = value >> 16;
+ rel_addr[2] = value >> 8;
+ rel_addr[3] = value;
+ return;
+ }
break;
case R_PARISC_PLABEL32:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f702391cdd140f19ae5aff7d5aeda9ef948a3624
commit f702391cdd140f19ae5aff7d5aeda9ef948a3624
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jun 15 13:59:28 2001 +0000
* sysdeps/m68k/fpu/bits/mathinline.h: Don't define log2 as inline.
* sysdeps/m68k/fpu/mathimpl.h: Define __ieee754_log2 as inline.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 82446d2..cb59773 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -134,7 +134,6 @@ __inline_mathop(__significand, getman)
#endif
#ifdef __USE_ISOC99
-__inline_mathop(__log2, log2)
__inline_mathop(__trunc, intrz)
#endif
@@ -157,7 +156,6 @@ __inline_mathop(significand, getman)
# endif
# ifdef __USE_ISOC99
-__inline_mathop(log2, log2)
__inline_mathop(trunc, intrz)
# endif
diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h
index a2785b2..7fa8144 100644
--- a/sysdeps/m68k/fpu/mathimpl.h
+++ b/sysdeps/m68k/fpu/mathimpl.h
@@ -29,6 +29,7 @@ __inline_mathop (__ieee754_exp, etox)
__inline_mathop (__ieee754_exp2, twotox)
__inline_mathop (__ieee754_exp10, tentox)
__inline_mathop (__ieee754_log10, log10)
+__inline_mathop (__ieee754_log2, log2)
__inline_mathop (__ieee754_log, logn)
__inline_mathop (__ieee754_sqrt, sqrt)
__inline_mathop (__ieee754_atanh, atanh)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2535264f9425942522bd4f714bcc8a65dc178c8f
commit 2535264f9425942522bd4f714bcc8a65dc178c8f
Author: Andreas Schwab <schwab@suse.de>
Date: Thu Jun 14 14:17:49 2001 +0000
Fix typo.
diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/fpu/e_log2f.c
index ed74933..6b49076 100644
--- a/sysdeps/m68k/fpu/e_log2f.c
+++ b/sysdeps/m68k/fpu/e_log2f.c
@@ -1,2 +1,2 @@
-#define FUNC __ieee754_log10f
+#define FUNC __ieee754_log2f
#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/fpu/e_log2l.c
index 795cfba..4c92a11 100644
--- a/sysdeps/m68k/fpu/e_log2l.c
+++ b/sysdeps/m68k/fpu/e_log2l.c
@@ -1,2 +1,2 @@
-#define FUNC __ieee754_log10l
+#define FUNC __ieee754_log2l
#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=99e859a48847cdec924cf5d4b201c8c496bba69c
commit 99e859a48847cdec924cf5d4b201c8c496bba69c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 14 00:21:01 2001 +0000
Define __MAX_BAUD.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index bfd64ee..13e17b7 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -150,6 +150,8 @@ struct termios
#define B3500000 00035
#define B4000000 00036
+#define __MAX_BAUD B4000000
+
#define CSIZE 00001400
#define CS5 00000000
#define CS6 00000400
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index f7abe47..ca6b648 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -214,6 +214,7 @@ struct termios
# define B3000000 0010015
# define B3500000 0010016
# define B4000000 0010017
+# define __MAX_BAUD B4000000
# define CIBAUD 002003600000 /* input baud rate (not used) */
# define CRTSCTS 020000000000 /* flow control */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=791746df786eed14b94c57d266e82b353ed0090b
commit 791746df786eed14b94c57d266e82b353ed0090b
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jun 11 07:44:41 2001 +0000
Use #function, not @function, for .type of _start.
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 4d841c8..089591f 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -43,7 +43,7 @@
.text
.globl _start
- .type _start,@function
+ .type _start,#function
_start:
/* Clear the frame pointer since this is the outermost frame. */
mov fp, #0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=163f71bf7802a4deabe5b066dcdf9f5bfda8bff5
commit 163f71bf7802a4deabe5b066dcdf9f5bfda8bff5
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 18:01:52 2001 +0000
Fix a typo introduced by last patch.
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index eef5c75..e740aaa 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -42,7 +42,7 @@
.text
.globl _start
- type _start,@function
+ .type _start,@function
_start:
/* Clear the frame pointer, to mark the outermost frame. */
moveq 0,r8
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=356aba5785c17e44148821a34156bacb521ad553
commit 356aba5785c17e44148821a34156bacb521ad553
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 6 12:54:56 2001 +0000
M68k log2l implementation.
diff --git a/sysdeps/m68k/fpu/e_log2l.c b/sysdeps/m68k/fpu/e_log2l.c
new file mode 100644
index 0000000..795cfba
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log2l.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log10l
+#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=34583d4c479adee7cc04f5eff2f3eb50953a2b27
commit 34583d4c479adee7cc04f5eff2f3eb50953a2b27
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 6 12:54:45 2001 +0000
M68k log2f implementation.
diff --git a/sysdeps/m68k/fpu/e_log2f.c b/sysdeps/m68k/fpu/e_log2f.c
new file mode 100644
index 0000000..ed74933
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log2f.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log10f
+#include <e_acosf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27b26c503a22e3fd1791ac14cfd885af32b07879
commit 27b26c503a22e3fd1791ac14cfd885af32b07879
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 6 12:54:31 2001 +0000
M68k log2 implementation.
diff --git a/sysdeps/m68k/fpu/e_log2.c b/sysdeps/m68k/fpu/e_log2.c
new file mode 100644
index 0000000..5528922
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log2.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log2
+#include <e_acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0182de12e0acc5e4a757400602d9918b0acbad05
commit 0182de12e0acc5e4a757400602d9918b0acbad05
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 6 12:54:01 2001 +0000
Renamed.
diff --git a/sysdeps/m68k/fpu/s_log2.c b/sysdeps/m68k/fpu/s_log2.c
deleted file mode 100644
index 26e26ba..0000000
--- a/sysdeps/m68k/fpu/s_log2.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC log2
-#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_log2f.c b/sysdeps/m68k/fpu/s_log2f.c
deleted file mode 100644
index 6849432..0000000
--- a/sysdeps/m68k/fpu/s_log2f.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC log2f
-#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_log2l.c b/sysdeps/m68k/fpu/s_log2l.c
deleted file mode 100644
index c4eb063..0000000
--- a/sysdeps/m68k/fpu/s_log2l.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC log2l
-#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d7fedc9986f9122e7f69fb53716ec11a917920e
commit 5d7fedc9986f9122e7f69fb53716ec11a917920e
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:57:49 2001 +0000
HPPA setjmp implementation.
diff --git a/sysdeps/hppa/bsd-_setjmp.S b/sysdeps/hppa/bsd-_setjmp.S
new file mode 100644
index 0000000..487e8c7
--- /dev/null
+++ b/sysdeps/hppa/bsd-_setjmp.S
@@ -0,0 +1,36 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. HPPA version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+ .text
+ .align 4
+ .globl _setjmp
+ .export _setjmp, code
+ .level 2.0
+ .proc
+ .callinfo
+ .import __sigsetjmp
+_setjmp:
+ b __sigsetjmp
+ ldi 0, %r25
+
+ .procend
diff --git a/sysdeps/hppa/bsd-setjmp.S b/sysdeps/hppa/bsd-setjmp.S
new file mode 100644
index 0000000..2614b49
--- /dev/null
+++ b/sysdeps/hppa/bsd-setjmp.S
@@ -0,0 +1,36 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. HPPA version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+ .text
+ .align 4
+ .globl setjmp
+ .export setjmp, code
+ .level 2.0
+ .proc
+ .callinfo
+ .import __sigsetjmp
+setjmp:
+ b __sigsetjmp
+ ldi 1, %r25
+
+ .procend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e48d4f660728b953712ef7084e940d35bfeca8e
commit 1e48d4f660728b953712ef7084e940d35bfeca8e
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:52:59 2001 +0000
Reformat asm statements to remove new gcc warning about multi-line strings.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 6f2020c..4616334 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -75,11 +75,11 @@ elf_machine_dynamic (void)
#if 0
/* Use this method if GOT address not yet set up. */
- asm ("\
- b,l 1f,%0
- depi 0,31,2,%0
-1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0
- ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0"
+ asm (
+" b,l 1f,%0\n"
+" depi 0,31,2,%0\n"
+"1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0\n"
+" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0\n"
: "=r" (dynamic) : : "r1");
#else
/* This works because we already have our GOT address available. */
@@ -95,13 +95,13 @@ elf_machine_load_address (void)
{
Elf32_Addr dynamic, dynamic_linkaddress;
- asm ("\
- b,l 1f,%0
- depi 0,31,2,%0
-1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0
- ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1
- addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0
- ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0"
+ asm (
+" b,l 1f,%0\n"
+" depi 0,31,2,%0\n"
+"1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0\n"
+" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1\n"
+" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0\n"
+" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0\n"
: "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1");
return dynamic - dynamic_linkaddress;
@@ -250,153 +250,154 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define RTLD_START \
/* Set up dp for any non-PIC lib constructors that may be called. */ \
-static struct link_map * set_dp (struct link_map *map) \
-{ \
- register Elf32_Addr dp asm ("%r27"); \
- dp = D_PTR (map, l_info[DT_PLTGOT]); \
- asm volatile ("" : : "r" (dp)); \
- return map; \
-} \
- \
-asm ("\
- .text
- .globl _start
- .type _start,@function
-_start:
- /* The kernel does not give us an initial stack frame. */
- ldo 64(%sp),%sp
- /* Save the relevant arguments (yes, those are the correct
- registers, the kernel is weird) in their stack slots. */
- stw %r25,-40(%sp) /* argc */
- stw %r24,-44(%sp) /* argv */
-
- /* We need the LTP, and we need it now. */
- /* $PIC_pcrel$0 points 8 bytes past the current instruction,
- just like a branch reloc. This sequence gets us the runtime
- address of _DYNAMIC. */
- bl 0f,%r19
- depi 0,31,2,%r19 /* clear priviledge bits */
-0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19
- ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26
-
- /* Also get the link time address from the first entry of the GOT. */
- addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19
- ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20
-
- sub %r26,%r20,%r20 /* Calculate load offset */
-
- /* Rummage through the dynamic entries, looking for DT_PLTGOT. */
- ldw,ma 8(%r26),%r19
-1: cmpib,=,n 3,%r19,2f /* tag == DT_PLTGOT? */
- cmpib,<>,n 0,%r19,1b
- ldw,ma 8(%r26),%r19
-
- /* Uh oh! We didn't find one. Abort. */
- iitlbp %r0,(%r0)
-
-2: ldw -4(%r26),%r19 /* Found it, load value. */
- add %r19,%r20,%r19 /* And add the load offset. */
-
- /* Our initial stack layout is rather different from everyone
- else's due to the unique PA-RISC ABI. As far as I know it
- looks like this:
-
- ----------------------------------- (this frame created above)
- | 32 bytes of magic |
- |---------------------------------|
- | 32 bytes argument/sp save area |
- |---------------------------------| ((current->mm->env_end) + 63 & ~63)
- | N bytes of slack |
- |---------------------------------|
- | envvar and arg strings |
- |---------------------------------|
- | ELF auxiliary info |
- | (up to 28 words) |
- |---------------------------------|
- | Environment variable pointers |
- | upwards to NULL |
- |---------------------------------|
- | Argument pointers |
- | upwards to NULL |
- |---------------------------------|
- | argc (1 word) |
- -----------------------------------
-
- So, obviously, we can't just pass %sp to _dl_start. That's
- okay, argv-4 will do just fine.
-
- The pleasant part of this is that if we need to skip
- arguments we can just decrement argc and move argv, because
- the stack pointer is utterly unrelated to the location of
- the environment and argument vectors. */
-
- /* This is always within range so we'll be okay. */
- bl _dl_start,%rp
- ldo -4(%r24),%r26
-
- .globl _dl_start_user
- .type _dl_start_user,@function
-_dl_start_user:
- /* Save the entry point in %r3. */
- copy %ret0,%r3
-
- /* Remember the lowest stack address. */
- addil LT'__libc_stack_end,%r19
- ldw RT'__libc_stack_end(%r1),%r20
- stw %sp,0(%r20)
-
- /* See if we were called as a command with the executable file
- name as an extra leading argument. */
- addil LT'_dl_skip_args,%r19
- ldw RT'_dl_skip_args(%r1),%r20
- ldw 0(%r20),%r20
-
- ldw -40(%sp),%r25 /* argc */
- comib,= 0,%r20,.Lnofix /* FIXME: will be mispredicted */
- ldw -44(%sp),%r24 /* argv (delay slot) */
-
- sub %r25,%r20,%r25
- stw %r25,-40(%sp)
- sh2add %r20,%r24,%r24
- stw %r24,-44(%sp)
-
-.Lnofix:
- addil LT'_dl_loaded,%r19
- ldw RT'_dl_loaded(%r1),%r26
- bl set_dp, %r2
- ldw 0(%r26),%r26
-
- /* Call _dl_init(_dl_loaded, argc, argv, envp). */
- copy %r28,%r26
-
- /* envp = argv + argc + 1 */
- sh2add %r25,%r24,%r23
- bl _dl_init,%r2
- ldo 4(%r23),%r23 /* delay slot */
-
- /* Reload argc, argv to the registers start.S expects them in (feh) */
- ldw -40(%sp),%r25
- ldw -44(%sp),%r24
-
- /* _dl_fini does have a PLT slot now. I don't know how to get
- to it though, so this hack will remain. */
- .section .data
-__dl_fini_plabel:
- .word _dl_fini
- .word 0xdeadbeef
- .previous
-
- /* %r3 contains a function pointer, we need to mask out the lower
- * bits and load the gp and jump address. */
- depi 0,31,2,%r3
- ldw 0(%r3),%r2
- addil LT'__dl_fini_plabel,%r19
- ldw RT'__dl_fini_plabel(%r1),%r23
- stw %r19,4(%r23)
- ldw 4(%r3),%r19 /* load the object's gp */
- bv %r0(%r2)
- depi 2,31,2,%r23 /* delay slot */
-");
+static struct link_map * \
+set_dp (struct link_map *map) \
+{ \
+ register Elf32_Addr dp asm ("%r27"); \
+ dp = D_PTR (map, l_info[DT_PLTGOT]); \
+ asm volatile ("" : : "r" (dp)); \
+ return map; \
+} \
+ \
+asm ( \
+" .text\n" \
+" .globl _start\n" \
+" .type _start,@function\n" \
+"_start:\n" \
+ /* The kernel does not give us an initial stack frame. */ \
+" ldo 64(%sp),%sp\n" \
+ /* Save the relevant arguments (yes, those are the correct \
+ registers, the kernel is weird) in their stack slots. */ \
+" stw %r25,-40(%sp)\n" /* argc */ \
+" stw %r24,-44(%sp)\n" /* argv */ \
+ \
+ /* We need the LTP, and we need it now. */ \
+ /* $PIC_pcrel$0 points 8 bytes past the current instruction, \
+ just like a branch reloc. This sequence gets us the runtime \
+ address of _DYNAMIC. */ \
+" bl 0f,%r19\n" \
+" depi 0,31,2,%r19\n" /* clear priviledge bits */ \
+"0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19\n" \
+" ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26\n" \
+ \
+ /* Also get the link time address from the first entry of the GOT. */ \
+" addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19\n" \
+" ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20\n" \
+ \
+" sub %r26,%r20,%r20\n" /* Calculate load offset */ \
+ \
+ /* Rummage through the dynamic entries, looking for DT_PLTGOT. */ \
+" ldw,ma 8(%r26),%r19\n" \
+"1: cmpib,=,n 3,%r19,2f\n" /* tag == DT_PLTGOT? */ \
+" cmpib,<>,n 0,%r19,1b\n" \
+" ldw,ma 8(%r26),%r19\n" \
+ \
+ /* Uh oh! We didn't find one. Abort. */ \
+" iitlbp %r0,(%r0)\n" \
+ \
+"2: ldw -4(%r26),%r19\n" /* Found it, load value. */ \
+" add %r19,%r20,%r19\n" /* And add the load offset. */ \
+ \
+ /* Our initial stack layout is rather different from everyone \
+ else's due to the unique PA-RISC ABI. As far as I know it \
+ looks like this: \
+ \
+ ----------------------------------- (this frame created above) \
+ | 32 bytes of magic | \
+ |---------------------------------| \
+ | 32 bytes argument/sp save area | \
+ |---------------------------------| ((current->mm->env_end) + 63 & ~63) \
+ | N bytes of slack | \
+ |---------------------------------| \
+ | envvar and arg strings | \
+ |---------------------------------| \
+ | ELF auxiliary info | \
+ | (up to 28 words) | \
+ |---------------------------------| \
+ | Environment variable pointers | \
+ | upwards to NULL | \
+ |---------------------------------| \
+ | Argument pointers | \
+ | upwards to NULL | \
+ |---------------------------------| \
+ | argc (1 word) | \
+ ----------------------------------- \
+ \
+ So, obviously, we can't just pass %sp to _dl_start. That's \
+ okay, argv-4 will do just fine. \
+ \
+ The pleasant part of this is that if we need to skip \
+ arguments we can just decrement argc and move argv, because \
+ the stack pointer is utterly unrelated to the location of \
+ the environment and argument vectors. */ \
+ \
+ /* This is always within range so we'll be okay. */ \
+" bl _dl_start,%rp\n" \
+" ldo -4(%r24),%r26\n" \
+ \
+" .globl _dl_start_user\n" \
+" .type _dl_start_user,@function\n" \
+"_dl_start_user:\n" \
+ /* Save the entry point in %r3. */ \
+" copy %ret0,%r3\n" \
+ \
+ /* Remember the lowest stack address. */ \
+" addil LT'__libc_stack_end,%r19\n" \
+" ldw RT'__libc_stack_end(%r1),%r20\n" \
+" stw %sp,0(%r20)\n" \
+ \
+ /* See if we were called as a command with the executable file \
+ name as an extra leading argument. */ \
+" addil LT'_dl_skip_args,%r19\n" \
+" ldw RT'_dl_skip_args(%r1),%r20\n" \
+" ldw 0(%r20),%r20\n" \
+ \
+" ldw -40(%sp),%r25\n" /* argc */ \
+" comib,= 0,%r20,.Lnofix\n" /* FIXME: will be mispredicted */ \
+" ldw -44(%sp),%r24\n" /* argv (delay slot) */ \
+ \
+" sub %r25,%r20,%r25\n" \
+" stw %r25,-40(%sp)\n" \
+" sh2add %r20,%r24,%r24\n" \
+" stw %r24,-44(%sp)\n" \
+ \
+".Lnofix:\n" \
+" addil LT'_dl_loaded,%r19\n" \
+" ldw RT'_dl_loaded(%r1),%r26\n" \
+" bl set_dp, %r2\n" \
+" ldw 0(%r26),%r26\n" \
+ \
+ /* Call _dl_init(_dl_loaded, argc, argv, envp). */ \
+" copy %r28,%r26\n" \
+ \
+ /* envp = argv + argc + 1 */ \
+" sh2add %r25,%r24,%r23\n" \
+" bl _dl_init,%r2\n" \
+" ldo 4(%r23),%r23\n" /* delay slot */ \
+ \
+ /* Reload argc, argv to the registers start.S expects them in (feh) */ \
+" ldw -40(%sp),%r25\n" \
+" ldw -44(%sp),%r24\n" \
+ \
+ /* _dl_fini does have a PLT slot now. I don't know how to get \
+ to it though, so this hack will remain. */ \
+" .section .data\n" \
+"__dl_fini_plabel:\n" \
+" .word _dl_fini\n" \
+" .word 0xdeadbeef\n" \
+" .previous\n" \
+ \
+ /* %r3 contains a function pointer, we need to mask out the lower \
+ * bits and load the gp and jump address. */ \
+" depi 0,31,2,%r3\n" \
+" ldw 0(%r3),%r2\n" \
+" addil LT'__dl_fini_plabel,%r19\n" \
+" ldw RT'__dl_fini_plabel(%r1),%r23\n" \
+" stw %r19,4(%r23)\n" \
+" ldw 4(%r3),%r19\n" /* load the object's gp */ \
+" bv %r0(%r2)\n" \
+" depi 2,31,2,%r23\n" /* delay slot */ \
+ );
/* This code gets called via the .plt stub, and is used in
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f325056f095c24a3ebf60707b2cc39859ea72019
commit f325056f095c24a3ebf60707b2cc39859ea72019
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:49:29 2001 +0000
Implement syscall.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
index 0559cc7..e185da5 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.c
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,3 +32,28 @@ __syscall_error (int err_no)
#undef errno
int errno = 0;
weak_alias (errno, _errno)
+
+
+/* HPPA implements syscall() in 'C'; the assembler version would
+ typically be in syscall.S. */
+
+int
+syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)
+{
+ long __sys_res;
+ {
+ register unsigned long __res asm("r28");
+ LOAD_ARGS_6(arg0, arg1, arg2, arg3, arg4, arg5)
+ asm volatile ("ble 0x100(%%sr2, %%r0)\n\t"
+ "copy %1, %%r20"
+ : "=r" (__res)
+ : "r" (sysnum) ASM_ARGS_6);
+ __sys_res = __res;
+ }
+ if ((unsigned long) __sys_res >= (unsigned long)-4095)
+ {
+ __set_errno(-__sys_res);
+ __sys_res = -1;
+ }
+ return __sys_res;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97b30982cefabcd50007467df1336fb40fa4200f
commit 97b30982cefabcd50007467df1336fb40fa4200f
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:49:17 2001 +0000
Remove dummy syscall.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S
index 413c572..96b5b92 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscall.S
+++ b/sysdeps/unix/sysv/linux/hppa/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,4 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <sysdep.h>
-
-/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
- more information about the value -4095 used below.*/
-
- .text
-ENTRY (syscall)
- b .
- nop
-
+/* HPPA implements syscall() in 'C'; see sysdep.c. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed48681558f81d55714f40efb096a917a571a02e
commit ed48681558f81d55714f40efb096a917a571a02e
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:44:24 2001 +0000
Call getrlimit, setrlimit directly instead of using wrappers.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 6d7cd6a..ed9f1a3 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -35,3 +35,5 @@ socketpair - socketpair i:iiif __socketpair socketpair
getresuid - getresuid i:ppp getresuid
getresgid - getresgid i:ppp getresgid
+setrlimit - setrlimit i:ip __setrlimit setrlimit
+getrlimit - getrlimit i:ip __getrlimit getrlimit
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b496bd686c3a6fe68397e86937dc0517c1c64823
commit b496bd686c3a6fe68397e86937dc0517c1c64823
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 6 11:35:25 2001 +0000
Removed.
diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit.c b/sysdeps/unix/sysv/linux/hppa/getrlimit.c
deleted file mode 100644
index fc06dbd..0000000
--- a/sysdeps/unix/sysv/linux/hppa/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/hppa/setrlimit.c b/sysdeps/unix/sysv/linux/hppa/setrlimit.c
deleted file mode 100644
index bfaef74..0000000
--- a/sysdeps/unix/sysv/linux/hppa/setrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13906e12b9b21467d4e6a9f7cfe698d7361e5f7f
commit 13906e12b9b21467d4e6a9f7cfe698d7361e5f7f
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jun 5 06:20:45 2001 +0000
Add .type for the entry point.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 90f59f0..54eaab6 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for Alpha/ELF.
- Copyright (C) 1993,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
+ Copyright (C) 1993,1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>
@@ -24,6 +24,7 @@
.align 3
.globl _start
.ent _start, 0
+ .type _start,@function
_start:
.frame fp, 0, zero
mov zero, fp
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index 13b9c78..4d841c8 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for ARM & ELF
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,12 +27,12 @@
At this entry point, most registers' values are unspecified, except:
a1 Contains a function pointer to be registered with `atexit'.
- This is how the dynamic linker arranges to have DT_FINI
+ This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
sp The stack contains the arguments and environment:
- 0(sp) argc
+ 0(sp) argc
4(sp) argv[0]
...
(4*argc)(sp) NULL
@@ -43,6 +43,7 @@
.text
.globl _start
+ .type _start,@function
_start:
/* Clear the frame pointer since this is the outermost frame. */
mov fp, #0
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
index f6336d2..eef5c75 100644
--- a/sysdeps/cris/elf/start.S
+++ b/sysdeps/cris/elf/start.S
@@ -42,6 +42,7 @@
.text
.globl _start
+ type _start,@function
_start:
/* Clear the frame pointer, to mark the outermost frame. */
moveq 0,r8
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
index 88bb790..a5c3e52 100644
--- a/sysdeps/hppa/elf/start.S
+++ b/sysdeps/hppa/elf/start.S
@@ -14,7 +14,7 @@
.globl _start
.export _start, ENTRY
-
+ .type _start,@function
_start:
.proc
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index eefe752..cf286f1 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF m68k ABI.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,7 @@
.text
.globl _start
+ .type _start,@function
_start:
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index a5ae480..19bf93a 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -67,6 +67,7 @@
.text
.globl ENTRY_POINT
+ .type ENTRY_POINT,@function
ENTRY_POINT:
#ifdef __PIC__
SET_GP
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60446d7a54b34c468e69fb61d04697c5a9790517
commit 60446d7a54b34c468e69fb61d04697c5a9790517
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jun 2 05:58:29 2001 +0000
2001-06-01 Roland McGrath <roland@frob.com>
* sysdeps/alpha/fpu/fclrexcpt.c: #include <shlib-compat.h>
and use compat_symbol/versioned_symbol instead of plain
symbol_version/default_symbol_version.
* sysdeps/alpha/fpu/fegetenv.c: Likewise.
* sysdeps/alpha/fpu/fesetenv.c: Likewise.
* sysdeps/alpha/fpu/feupdateenv.c: Likewise.
* sysdeps/alpha/fpu/fgetexcptflg.c: Likewise.
* sysdeps/alpha/fpu/fraiseexcpt.c: Likewise.
* sysdeps/alpha/fpu/fsetexcptflg.c: Likewise.
* sysdeps/arm/fpu/fclrexcpt.c: Likewise.
* sysdeps/arm/fpu/fegetenv.c: Likewise.
* sysdeps/arm/fpu/fesetenv.c: Likewise.
* sysdeps/arm/fpu/fraiseexcpt.c: Likewise.
* sysdeps/arm/fpu/fsetexcptflg.c: Likewise.
* sysdeps/i386/fpu/fclrexcpt.c: Likewise.
* sysdeps/i386/fpu/fegetenv.c: Likewise.
* sysdeps/i386/fpu/fesetenv.c: Likewise.
* sysdeps/i386/fpu/feupdateenv.c: Likewise.
* sysdeps/i386/fpu/fgetexcptflg.c: Likewise.
* sysdeps/i386/fpu/fraiseexcpt.c: Likewise.
* sysdeps/i386/fpu/fsetexcptflg.c: Likewise.
* sysdeps/m68k/fpu/fclrexcpt.c: Likewise.
* sysdeps/m68k/fpu/fegetenv.c: Likewise.
* sysdeps/m68k/fpu/fesetenv.c: Likewise.
* sysdeps/m68k/fpu/feupdateenv.c: Likewise.
* sysdeps/m68k/fpu/fgetexcptflg.c: Likewise.
* sysdeps/m68k/fpu/fraiseexcpt.c: Likewise.
* sysdeps/m68k/fpu/fsetexcptflg.c: Likewise.
* sysdeps/powerpc/fclrexcpt.c: Likewise.
* sysdeps/powerpc/fpu/fegetenv.c: Likewise.
* sysdeps/powerpc/fpu/fesetenv.c: Likewise.
* sysdeps/powerpc/fpu/feupdateenv.c: Likewise.
* sysdeps/powerpc/fpu/fgetexcptflg.c: Likewise.
* sysdeps/powerpc/fpu/fraiseexcpt.c: Likewise.
* sysdeps/powerpc/fpu/fsetexcptflg.c: Likewise.
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 71ff748..7777416 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -37,6 +37,11 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
-symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index d6b3f70..c96674f 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -37,6 +37,11 @@ __fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetenv, __old_fegetenv)
-symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 5bf3b5e..45d25bb 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -46,6 +46,11 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
-symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index b9f1c5b..6904406 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -39,6 +39,11 @@ __feupdateenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feupdateenv, __old_feupdateenv)
-symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
+compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index bae1556..f85d7a2 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -34,6 +34,11 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 1f72eba..3e8ce76 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -37,6 +37,11 @@ __feraiseexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feraiseexcept, __old_feraiseexcept)
-symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index 57531a4..25f5138 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -37,6 +37,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
-symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c
index 11fb0f8..319eed8 100644
--- a/sysdeps/arm/fpu/fclrexcpt.c
+++ b/sysdeps/arm/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,6 +40,11 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
-symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
index 53d2089..17ed990 100644
--- a/sysdeps/arm/fpu/fegetenv.c
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,11 @@ __fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetenv, __old_fegetenv)
-symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index fd2040d..09d5f39 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,6 +34,11 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
-symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
index 9163744..4e8a546 100644
--- a/sysdeps/arm/fpu/fraiseexcpt.c
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,11 @@ __feraiseexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feraiseexcept, __old_feraiseexcept)
-symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c
index 960ca2b..485781e 100644
--- a/sysdeps/arm/fpu/fsetexcptflg.c
+++ b/sysdeps/arm/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,6 +39,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
-symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c
index a2f144b..f35bb12 100644
--- a/sysdeps/m68k/fpu/fclrexcpt.c
+++ b/sysdeps/m68k/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -40,6 +40,11 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
-symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index 60226ff..7a5a28b 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -28,6 +28,11 @@ __fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetenv, __old_fegetenv)
-symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index e780fe8..9149c72 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -49,6 +49,11 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
-symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c
index 7115f8b..6ebc0c6 100644
--- a/sysdeps/m68k/fpu/feupdateenv.c
+++ b/sysdeps/m68k/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -40,6 +40,11 @@ __feupdateenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feupdateenv, __old_feupdateenv)
-symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
+compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c
index 8a56e20..a0d1ec5 100644
--- a/sysdeps/m68k/fpu/fgetexcptflg.c
+++ b/sysdeps/m68k/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -33,6 +33,11 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index 1c559c2..592cc5a 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -72,6 +72,11 @@ __feraiseexcept (int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feraiseexcept, __old_feraiseexcept)
-symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c
index 04ecf66..51892a7 100644
--- a/sysdeps/m68k/fpu/fsetexcptflg.c
+++ b/sysdeps/m68k/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -39,6 +39,11 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
-symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1);
+#endif
+
+versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a97df5aa5323dc8f266f9cba59950517ae57d54
commit 3a97df5aa5323dc8f266f9cba59950517ae57d54
Author: Andreas Jaeger <aj@suse.de>
Date: Sun May 27 08:41:04 2001 +0000
MIPS specific atomicity functions.
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
new file mode 100644
index 0000000..d6e1767
--- /dev/null
+++ b/sysdeps/mips/atomicity.h
@@ -0,0 +1,128 @@
+/* Low-level functions for atomic operations. Mips version.
+
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _MIPS_ATOMICITY_H
+#define _MIPS_ATOMICITY_H 1
+
+#include <sgidefs.h>
+#include <inttypes.h>
+
+#if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ int result, tmp;
+
+ __asm__ __volatile__
+ ("/* Inline exchange & add */\n\t"
+ "1:\n\t"
+ "ll %0,%3\n\t"
+ "addu %1,%4,%0\n\t"
+ "sc %1,%2\n\t"
+ "beqz %1,1b\n\t"
+ "/* End exchange & add */"
+ : "=&r"(result), "=&r"(tmp), "=m"(*mem)
+ : "m" (*mem), "r"(val)
+ : "memory");
+
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ int result;
+
+ __asm__ __volatile__
+ ("/* Inline atomic add */\n\t"
+ "1:\n\t"
+ "ll %0,%2\n\t"
+ "addu %0,%3,%0\n\t"
+ "sc %0,%1\n\t"
+ "beqz %0,1b\n\t"
+ "/* End atomic add */"
+ : "=&r"(result), "=m"(*mem)
+ : "m" (*mem), "r"(val)
+ : "memory");
+}
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ long int ret;
+
+ __asm__ __volatile__
+ ("/* Inline compare & swap */\n\t"
+ "1:\n\t"
+ "ll %0,%4\n\t"
+ ".set push\n"
+ ".set noreorder\n\t"
+ "bne %0,%2,2f\n\t"
+ "move %0,%3\n\t"
+ ".set pop\n\t"
+ "sc %0,%1\n\t"
+ "beqz %0,1b\n"
+ "2:\n\t"
+ "/* End compare & swap */"
+ : "=&r" (ret), "=m" (*p)
+ : "r" (oldval), "r" (newval), "m" (*p)
+ : "memory");
+
+ return ret;
+}
+
+#else /* (_MIPS_ISA >= _MIPS_ISA_MIPS2) */
+
+#warning MIPS I atomicity functions are not atomic
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ int result = *mem;
+ *mem += val;
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ *mem += val;
+}
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ if (*p != oldval)
+ return 0;
+
+ *p = newval;
+ return 1;
+}
+
+#endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
+
+#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b81e88a0558355d2496844e2268ace04f6f3bf97
commit b81e88a0558355d2496844e2268ace04f6f3bf97
Author: Andreas Jaeger <aj@suse.de>
Date: Sun May 27 08:40:14 2001 +0000
Linux/MIPS specific version.
diff --git a/sysdeps/unix/sysv/linux/mips/getsysstats.c b/sysdeps/unix/sysv/linux/mips/getsysstats.c
new file mode 100644
index 0000000..799a733
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getsysstats.c
@@ -0,0 +1,36 @@
+/* Determine various system internal values, Linux/MIPS version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* We need to define a special parser for /proc/cpuinfo. */
+#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ (RESULT) = 0; \
+ /* Read all lines and count the lines starting with the string \
+ "cpu model". We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really \
+ enough. */ \
+ while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ if (strncmp (BUFFER, "cpu model", 9) == 0) \
+ ++(RESULT); \
+ } \
+ while (0)
+
+#include <sysdeps/unix/sysv/linux/getsysstats.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3901129ce480c57c1216744b623b427997708477
commit 3901129ce480c57c1216744b623b427997708477
Author: Andreas Jaeger <aj@suse.de>
Date: Sun May 27 08:39:56 2001 +0000
Change sigsuspend to s_sigsuspend. Add s_mmap2.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index c36d071..25e31d1 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -8,7 +8,7 @@ cachectl - cachectl i:pii __cachectl cachectl
cacheflush - cacheflush i:pii _flush_cache cacheflush
sysmips - sysmips i:iiii __sysmips sysmips
-sigsuspend - sigsuspend i:p __sigsuspend sigsuspend
+s_sigsuspend sigsuspend sigsuspend i:p __syscall_sigsuspend
#
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
@@ -61,6 +61,7 @@ getresgid - getresgid i:ppp getresgid
getresuid - getresuid i:ppp getresuid
s_ipc msgget ipc i:iiiip __syscall_ipc
s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
+s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2
s_poll poll poll i:pii __syscall_poll
s_pread64 pread64 pread i:ibniii __syscall_pread
s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc0f915617383810727317713771e064ae97acc1
commit fc0f915617383810727317713771e064ae97acc1
Author: Andreas Jaeger <aj@suse.de>
Date: Sun May 27 08:34:45 2001 +0000
(ipc_perm): Put back __key.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 04a1231..0cdd232 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -42,6 +42,7 @@
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
{
+ __key_t __key; /* Key. */
unsigned int uid; /* Owner's user ID. */
unsigned int gid; /* Owner's group ID. */
unsigned int cuid; /* Creator's user ID. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5cd3bfc6386931ef99f4b512f64d17d4b3d2935
commit b5cd3bfc6386931ef99f4b512f64d17d4b3d2935
Author: Andreas Jaeger <aj@suse.de>
Date: Fri May 11 16:48:37 2001 +0000
* sysdeps/unix/sysv/linux/configure.in: Move binutils check to...
* sysdeps/unix/sysv/linux/mips/configure.in: ...here. New file.
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
new file mode 100644
index 0000000..38a9374
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -0,0 +1,59 @@
+ # Local configure fragment for sysdeps/unix/sysv/linux/mips.
+
+for ac_prog in $AS
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:9: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AS="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+ echo "$ac_t""$AS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AS" && break
+done
+
+if test -z "$AS"; then
+ ac_verc_fail=yes
+else
+ # Found it, now check the version.
+ echo $ac_n "checking version of $AS""... $ac_c" 1>&6
+echo "configure:43: checking version of $AS" >&5
+ ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$ac_t""$ac_prog_version" 1>&6
+fi
+if test $ac_verc_fail = yes; then
+ echo "configure: warning: *** Your binutils versions are too old.
+*** We strongly advise to update binutils. For details check
+*** the FAQ and INSTALL documents." 1>&2
+fi
+
+s%@AS@%$AS%g
diff --git a/sysdeps/unix/sysv/linux/mips/configure.in b/sysdeps/unix/sysv/linux/mips/configure.in
new file mode 100644
index 0000000..e5c301d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/configure.in
@@ -0,0 +1,10 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/mips.
+
+AC_CHECK_PROG_VER(AS, $AS, --version,
+ [GNU assembler.* \([0-9]*\.[0-9.]*\(-ia64-[0-9]*\)*\)],
+ [2.11.90.0.[5-9]* | 2.11.90.[1-9]* | 2.11.9[1-9]* | 2.11.[1-9]* | 2.1[2-9]*| 2.[2-9]*],
+AC_MSG_WARN([*** Your binutils versions are too old.
+*** We strongly advise to update binutils. For details check
+*** the FAQ and INSTALL documents.]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3eca48468911a4e37b298f9e2ce6a35835d9bf7c
commit 3eca48468911a4e37b298f9e2ce6a35835d9bf7c
Author: Andreas Jaeger <aj@suse.de>
Date: Fri May 11 13:09:04 2001 +0000
Removed unneeded binary output format directive.
diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in
index 7c9f65f..c9b5e71 100644
--- a/sysdeps/mips/rtld-ldscript.in
+++ b/sysdeps/mips/rtld-ldscript.in
@@ -1,4 +1,3 @@
-OUTPUT_FORMAT("@@rtld-oformat@@")
OUTPUT_ARCH(@@rtld-arch@@)
ENTRY(@@rtld-entry@@)
SECTIONS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=979dedac4fa78aff5447d859fa3319bb128afaa2
commit 979dedac4fa78aff5447d859fa3319bb128afaa2
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Apr 30 07:20:38 2001 +0000
Make structure definitions match the kernel definitions.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 8364dca..04a1231 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -8,23 +8,23 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_IPC_H
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
-#define IPC_EXCL 02000 /* Fail if key exists. */
+#define IPC_EXCL 02000 /* Fail if key exists. */
#define IPC_NOWAIT 04000 /* Return error on wait. */
/* Control commands for `msgctl', `semctl', and `shmctl'. */
@@ -35,42 +35,20 @@
# define IPC_INFO 3 /* See ipcs. */
#endif
-/* Special key values. */
-#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
+/* Special key values. */
+#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
/* Data structure used to pass permission information to IPC operations. */
struct ipc_perm
{
- __key_t __key; /* Key. */
- long int uid; /* Owner's user ID. */
- long int gid; /* Owner's group ID. */
- long int cuid; /* Creator's user ID. */
- long int cgid; /* Creator's group ID. */
- unsigned long int mode; /* Read/write permission. */
+ unsigned int uid; /* Owner's user ID. */
+ unsigned int gid; /* Owner's group ID. */
+ unsigned int cuid; /* Creator's user ID. */
+ unsigned int cgid; /* Creator's group ID. */
+ unsigned int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
- };
-
-
-__BEGIN_DECLS
-
-/* The actual system call: all functions are multiplexed by this. */
-extern int __ipc (int __call, int __first, int __second, int __third,
- void *__ptr) __THROW;
-
-__END_DECLS
-
-#ifdef __USE_GNU
-/* The codes for the functions to use the multiplexer `__ipc'. */
-# define IPCOP_semop 1
-# define IPCOP_semget 2
-# define IPCOP_semctl 3
-# define IPCOP_msgsnd 11
-# define IPCOP_msgrcv 12
-# define IPCOP_msgget 13
-# define IPCOP_msgctl 14
-# define IPCOP_shmat 21
-# define IPCOP_shmdt 22
-# define IPCOP_shmget 23
-# define IPCOP_shmctl 24
-#endif
+ unsigned short int __pad1;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sem.h b/sysdeps/unix/sysv/linux/mips/bits/sem.h
new file mode 100644
index 0000000..5f7b0a9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/sem.h
@@ -0,0 +1,85 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
+#endif
+
+#include <sys/types.h>
+
+/* Flags for `semop'. */
+#define SEM_UNDO 0x1000 /* undo the operation on exit */
+
+/* Commands for `semctl'. */
+#define GETPID 11 /* get sempid */
+#define GETVAL 12 /* get semval */
+#define GETALL 13 /* get all semval's */
+#define GETNCNT 14 /* get semncnt */
+#define GETZCNT 15 /* get semzcnt */
+#define SETVAL 16 /* set semval */
+#define SETALL 17 /* set all semval's */
+
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ unsigned long int sem_nsems; /* number of semaphores in set */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+/* The user should define a union like the following to use it for arguments
+ for `semctl'.
+
+ union semun
+ {
+ int val; <= value for SETVAL
+ struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET
+ unsigned short int *array; <= array for GETALL & SETALL
+ struct seminfo *__buf; <= buffer for IPC_INFO
+ };
+
+ Previous versions of this file used to define this union but this is
+ incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether
+ one must define the union or not. */
+#define _SEM_SEMUN_UNDEFINED 1
+
+#ifdef __USE_MISC
+
+/* ipcs ctl cmds */
+# define SEM_STAT 18
+# define SEM_INFO 19
+
+struct seminfo
+{
+ int semmap;
+ int semmni;
+ int semmns;
+ int semmnu;
+ int semmsl;
+ int semopm;
+ int semume;
+ int semusz;
+ int semvmx;
+ int semaem;
+};
+
+#endif /* __USE_MISC */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 31c65a9..02fabb7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -35,50 +35,55 @@
#define SHM_LOCK 11 /* lock segment (root only) */
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
- int shm_segsz; /* size of segment in bytes */
+ size_t shm_segsz; /* size of segment in bytes */
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
- long int shm_cpid; /* pid of creator */
- long int shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
- unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
};
#ifdef __USE_MISC
/* ipcs ctl commands */
-# define SHM_STAT 13
-# define SHM_INFO 14
+# define SHM_STAT 13
+# define SHM_INFO 14
/* shm_mode upper byte flags */
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
-struct shminfo
+struct shminfo
{
- int shmmax;
- int shmmin;
- int shmmni;
- int shmseg;
- int shmall;
+ unsigned long int shmmax;
+ unsigned long int shmmin;
+ unsigned long int shmmni;
+ unsigned long int shmseg;
+ unsigned long int shmall;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ unsigned long int __unused3;
+ unsigned long int __unused4;
};
struct shm_info
{
- int used_ids;
- ulong shm_tot; /* total allocated shm */
- ulong shm_rss; /* total resident shm */
- ulong shm_swp; /* total swapped shm */
- ulong swap_attempts;
- ulong swap_successes;
+ int used_ids;
+ unsigned long int shm_tot; /* total allocated shm */
+ unsigned long int shm_rss; /* total resident shm */
+ unsigned long int shm_swp; /* total swapped shm */
+ unsigned long int swap_attempts;
+ unsigned long int swap_successes;
};
#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30ecc70c4085dfbd076d5df32ee23969614f2103
commit 30ecc70c4085dfbd076d5df32ee23969614f2103
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Apr 29 12:30:59 2001 +0000
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FCNTL64):
Define for Arm, PowerPC and SH if kernel is 2.4.4 or newer.
* sysdeps/unix/sysv/linux/bits/socket.h (PF_WANPIPE): New, from
Linux 2.4.4.
(AF_WANPIPE): Likewise.
(MSG_MORE): New.
* sysdeps/unix/sysv/linux/alpha/bits/socket.h: Add same changes as
for Linux generic version.
* sysdeps/unix/sysv/linux/s390/s390-64/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/socket.h: Likewise.
* sysdeps/gnu/netinet/tcp.h (TCP_QUICKACK): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
index 8efdaca..cf8e5a1 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
@@ -87,6 +87,7 @@ enum __socket_type
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
+#define PF_WANPIPE 25 /* Wanpipe API sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -117,6 +118,7 @@ enum __socket_type
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
+#define AF_WANPIPE PF_WANPIPE
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
@@ -199,8 +201,10 @@ enum
#define MSG_RST MSG_RST
MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
#define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */
+ MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
#define MSG_NOSIGNAL MSG_NOSIGNAL
+ MSG_MORE = 0x8000 /* Sender will send more. */
+#define MSG_MORE MSG_MORE
};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 2d6ded9..eaf8ccc 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -87,6 +87,7 @@ enum __socket_type
#define PF_SNA 22 /* Linux SNA Project */
#define PF_IRDA 23 /* IRDA sockets. */
#define PF_PPPOX 24 /* PPPoX sockets. */
+#define PF_WANPIPE 25 /* Wanpipe API sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -117,6 +118,7 @@ enum __socket_type
#define AF_SNA PF_SNA
#define AF_IRDA PF_IRDA
#define AF_PPPOX PF_PPPOX
+#define AF_WANPIPE PF_WANPIPE
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
@@ -199,8 +201,10 @@ enum
#define MSG_RST MSG_RST
MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
#define MSG_ERRQUEUE MSG_ERRQUEUE
- MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */
+ MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
#define MSG_NOSIGNAL MSG_NOSIGNAL
+ MSG_MORE = 0x8000 /* Sender will send more. */
+#define MSG_MORE MSG_MORE
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee1bb98bde26f2dd16a0060b961d6c3ba3255532
commit ee1bb98bde26f2dd16a0060b961d6c3ba3255532
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 26 00:03:25 2001 +0000
Add -DMALLOC_ALIGNMENT=16 to compiler command line for malloc.c.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index e6fb771..744c89c 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -22,6 +22,10 @@
# CFLAGS-.os += -ffunction-sections
LDFLAGS-c_pic.os += -Wl,--unique=.text*
+ifeq ($(subdir),malloc)
+CFLAGS-malloc.c += -DMALLOC_ALIGNMENT=16
+endif
+
ifeq ($(subdir),elf)
dl-routines += dl-symaddr dl-fptr
rtld-routines += dl-symaddr dl-fptr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b390705b1c7f3d289cabc8739719f283c9fba586
commit b390705b1c7f3d289cabc8739719f283c9fba586
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 25 20:19:39 2001 +0000
<resource.h> definitions for Linux/HPPA.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/resource.h b/sysdeps/unix/sysv/linux/hppa/bits/resource.h
new file mode 100644
index 0000000..be4b53a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/resource.h
@@ -0,0 +1,209 @@
+/* Bit values & structures for resource limits. Linux/HPPA version.
+ Copyright (C) 1994-99, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 7,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit. */
+ RLIMIT_AS = 9,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIMIT_NLIMITS = 11,
+ RLIM_NLIMITS = RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
+#else
+# define RLIM_INFINITY 0xffffffffffffffffuLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=179c96ec73726bdbdc332ec202b05a58455b769e
commit 179c96ec73726bdbdc332ec202b05a58455b769e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 25 20:19:03 2001 +0000
mmap64 implementation for Linux/HPPA.
diff --git a/sysdeps/unix/sysv/linux/hppa/mmap64.c b/sysdeps/unix/sysv/linux/hppa/mmap64.c
new file mode 100644
index 0000000..cf7a5dc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/mmap64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/powerpc/mmap64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=353e429d9625d98426ae435f3982688053b9e591
commit 353e429d9625d98426ae435f3982688053b9e591
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 25 20:18:14 2001 +0000
getdents64 implementation for Linux/HPPA.
diff --git a/sysdeps/unix/sysv/linux/hppa/getdents64.c b/sysdeps/unix/sysv/linux/hppa/getdents64.c
new file mode 100644
index 0000000..0c75fb5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/getdents64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getdents64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2e1be7965c6996cefe27f9fccc3de9bb5e29e0c
commit f2e1be7965c6996cefe27f9fccc3de9bb5e29e0c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 25 20:17:26 2001 +0000
Information about stack layout for HPPA.
diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h
new file mode 100644
index 0000000..e446c42
--- /dev/null
+++ b/sysdeps/hppa/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On PA the stack grows up. */
+#define _STACK_GROWS_UP 1
+
+#endif /* stackinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aad4bb3a11398b8c9f579d1eb8a2aa9dbb8cfcea
commit aad4bb3a11398b8c9f579d1eb8a2aa9dbb8cfcea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 25 18:27:55 2001 +0000
Clear the exception flags, not the enable flags.
diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c
index 4c64027..e8049e6 100644
--- a/sysdeps/hppa/fpu/fclrexcpt.c
+++ b/sysdeps/hppa/fpu/fclrexcpt.c
@@ -29,7 +29,7 @@ feclearexcept (int excepts)
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
/* Clear all the relevant bits. */
- sw[0] &= ~(excepts & FE_ALL_EXCEPT);
+ sw[0] &= ~(excepts & FE_ALL_EXCEPT) << 27;
__asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
/* Success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c9ae5095a4d3c9001de05bee0e21a5d681f5c2e2
commit c9ae5095a4d3c9001de05bee0e21a5d681f5c2e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 24 19:38:55 2001 +0000
(RTLD_START): Set up dp with DT_PLTGOT value from application so that
constructors in non-PIC libs work.
(RTLD_START): _dl_init now returns a function pointer, hence load the jump
address and gp from the function pointer before jumping.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index a3437b5..6f2020c 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -248,7 +248,17 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
-#define RTLD_START asm ("\
+#define RTLD_START \
+/* Set up dp for any non-PIC lib constructors that may be called. */ \
+static struct link_map * set_dp (struct link_map *map) \
+{ \
+ register Elf32_Addr dp asm ("%r27"); \
+ dp = D_PTR (map, l_info[DT_PLTGOT]); \
+ asm volatile ("" : : "r" (dp)); \
+ return map; \
+} \
+ \
+asm ("\
.text
.globl _start
.type _start,@function
@@ -324,7 +334,6 @@ _start:
bl _dl_start,%rp
ldo -4(%r24),%r26
- /* FALLTHRU */
.globl _dl_start_user
.type _dl_start_user,@function
_dl_start_user:
@@ -352,10 +361,14 @@ _dl_start_user:
stw %r24,-44(%sp)
.Lnofix:
- /* Call _dl_init(_dl_loaded, argc, argv, envp). */
addil LT'_dl_loaded,%r19
ldw RT'_dl_loaded(%r1),%r26
+ bl set_dp, %r2
ldw 0(%r26),%r26
+
+ /* Call _dl_init(_dl_loaded, argc, argv, envp). */
+ copy %r28,%r26
+
/* envp = argv + argc + 1 */
sh2add %r25,%r24,%r23
bl _dl_init,%r2
@@ -373,11 +386,18 @@ __dl_fini_plabel:
.word 0xdeadbeef
.previous
+ /* %r3 contains a function pointer, we need to mask out the lower
+ * bits and load the gp and jump address. */
+ depi 0,31,2,%r3
+ ldw 0(%r3),%r2
addil LT'__dl_fini_plabel,%r19
ldw RT'__dl_fini_plabel(%r1),%r23
stw %r19,4(%r23)
- bv %r0(%r3)
- depi 2,31,2,%r23 /* delay slot */");
+ ldw 4(%r3),%r19 /* load the object's gp */
+ bv %r0(%r2)
+ depi 2,31,2,%r23 /* delay slot */
+");
+
/* This code gets called via the .plt stub, and is used in
dl-runtime.c to call the `fixup' function and then redirect to the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd69124f25f6ed81287bfd3ce18ee22a90971b69
commit dd69124f25f6ed81287bfd3ce18ee22a90971b69
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:32:20 2001 +0000
fegetexcept implementation for Arm.
diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c
new file mode 100644
index 0000000..eda7b6d
--- /dev/null
+++ b/sysdeps/arm/fpu/fegetexcept.c
@@ -0,0 +1,32 @@
+/* Get floating-point exceptions.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetexcept (void)
+{
+ unsigned long temp;
+
+ _FPU_GETCW (temp);
+
+ return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=285e7aeefddf469006e24e852f8c793c11041a32
commit 285e7aeefddf469006e24e852f8c793c11041a32
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:31:51 2001 +0000
feenableexcept implementation for Arm.
diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c
new file mode 100644
index 0000000..24c4363
--- /dev/null
+++ b/sysdeps/arm/fpu/feenablxcpt.c
@@ -0,0 +1,40 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+feenableexcept (int excepts)
+{
+ unsigned long int new_exc, old_exc;
+
+ _FPU_GETCW(new_exc);
+
+ old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc |= (excepts << FE_EXCEPT_SHIFT);
+
+ _FPU_SETCW(new_exc);
+
+ return old_exc;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=984dfe12663873b13bad49fc06141807dc826d1d
commit 984dfe12663873b13bad49fc06141807dc826d1d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:31:25 2001 +0000
fedisableexcept implementation for Arm.
diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..e41bd52
--- /dev/null
+++ b/sysdeps/arm/fpu/fedisblxcpt.c
@@ -0,0 +1,40 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fedisableexcept (int excepts)
+{
+ unsigned long int new_exc, old_exc;
+
+ _FPU_GETCW(new_exc);
+
+ old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc &= ~(excepts << FE_EXCEPT_SHIFT);
+
+ _FPU_SETCW(new_exc);
+
+ return old_exc;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90256e473e481263b811b474b39d9b505e11d8d2
commit 90256e473e481263b811b474b39d9b505e11d8d2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:10:28 2001 +0000
Include sys/procfs.h not sys/elf.h.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index b858cf8..c94c6c6 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -23,7 +23,7 @@
#include <features.h>
#include <signal.h>
-#include <sys/elf.h>
+#include <sys/procfs.h>
typedef int greg_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8551fba7fa2d3d2b8c5604fcf08b40feda0f6bc
commit e8551fba7fa2d3d2b8c5604fcf08b40feda0f6bc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:10:14 2001 +0000
(struct user_fpregs): Renamed from struct user_fp.
(struct user_regs): New.
(struct user): Use struct user_regs rather than struct pt_regs to
avoid dependency on asm/ptrace.h. Use struct user_fpregs in place
of struct user_fp and struct user_fp_struct.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h
index 253b0f5..e47c42c 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/user.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/user.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,14 +19,11 @@
#ifndef _SYS_USER_H
#define _SYS_USER_H 1
-#include <features.h>
+/* The whole purpose of this file is for GDB and GDB only. Don't read
+ too much into it. Don't use it for anything other than GDB unless
+ you know what you are doing. */
-/* <sys/ptrace.h> and <linux/ptrace.h> both define the PTRACE_* macros.
- This leads to compilation problems with programs which include both
- user.h and ptrace.h (eg: GDB). Do not include <linux/ptrace.h> here. */
-#include <asm/ptrace.h>
-
-struct user_fp
+struct user_fpregs
{
struct fp_reg
{
@@ -44,9 +41,14 @@ struct user_fp
unsigned int init_flag;
};
+struct user_regs
+{
+ unsigned long int uregs[18];
+};
+
struct user
{
- struct pt_regs regs; /* General registers */
+ struct user_regs regs; /* General registers */
int u_fpvalid; /* True if math co-processor being used. */
unsigned long int u_tsize; /* Text segment size (pages). */
@@ -58,13 +60,13 @@ struct user
long int signal; /* Signal that caused the core dump. */
int reserved; /* No longer used */
- struct pt_regs *u_ar0; /* help gdb to find the general registers. */
+ struct user_regs *u_ar0; /* help gdb to find the general registers. */
unsigned long magic; /* uniquely identify a core file */
char u_comm[32]; /* User command that was responsible */
int u_debugreg[8];
- struct user_fp u_fp; /* Floating point registers */
- struct user_fp_struct *u_fp0; /* help gdb to find the FP registers. */
+ struct user_fpregs u_fp; /* Floating point registers */
+ struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */
};
#endif /* sys/user.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ace45f1fd05130b43a1c7eac39e655ee7f7b7d3e
commit ace45f1fd05130b43a1c7eac39e655ee7f7b7d3e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:08:57 2001 +0000
Move contents to sys/procfs.h, and tell the user to include that file instead.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h
index 83658c3..ffd3b46 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/elf.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,12 +19,8 @@
#ifndef _SYS_ELF_H
#define _SYS_ELF_H 1
-#include <sys/user.h>
+#warning "This header is obsolete; use <sys/procfs.h> instead."
-typedef unsigned long int elf_greg_t;
-#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
-
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-typedef struct user_fp elf_fpregset_t;
+#include <sys/procfs.h>
#endif /* sys/elf.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2a38d017e619204e38b18fcc98c469bfeac723d
commit c2a38d017e619204e38b18fcc98c469bfeac723d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:07:25 2001 +0000
Remove old cruft surrounded with #if 0.
(elf_greg_t, ELF_NGREG, elf_gregset_t, elf_fpregset_t): Moved here
from sys/elf.h.
(prgregset_t, prfpregset_t): Define in terms of elf_gregset_t and
elf_fpregset_t respectively.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
index 5198033..ddce965 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,20 +19,36 @@
#ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H 1
-/* This is somehow modelled after the file of the same name on SysVr4
+/* This is somewhat modelled after the file of the same name on SVR4
systems. It provides a definition of the core file format for ELF
- used on Linux. */
+ used on Linux. It doesn't have anything to do with the /proc file
+ system, even though Linux has one.
+
+ Anyway, the whole purpose of this file is for GDB and GDB only.
+ Don't read too much into it. Don't use it for anything other than
+ GDB unless you know what you are doing. */
#include <features.h>
-#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/ucontext.h>
#include <sys/user.h>
-#include <sys/elf.h>
__BEGIN_DECLS
+/* Type for a general-purpose register. */
+typedef unsigned long elf_greg_t;
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG (sizeof (struct user_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Register set for the floating-point registers. */
+typedef struct user_fpregs elf_fpregset_t;
+
+/* Signal info. */
struct elf_siginfo
{
int si_signo; /* Signal number. */
@@ -40,23 +56,19 @@ struct elf_siginfo
int si_errno; /* Errno. */
};
-/* Definitions to generate core files. Fields present but not used are
- marked with "XXX". */
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with Linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ GDB doesn't really use excluded. */
+
struct elf_prstatus
{
-#if 0
- long int pr_flags; /* XXX Process flags. */
- short int pr_why; /* XXX Reason for process halt. */
- short int pr_what; /* XXX More detailed reason. */
-#endif
struct elf_siginfo pr_info; /* Info associated with signal. */
short int pr_cursig; /* Current signal. */
unsigned long int pr_sigpend; /* Set of pending signals. */
unsigned long int pr_sighold; /* Set of held signals. */
-#if 0
- struct sigaltstack pr_altstack; /* Alternate stack info. */
- struct sigaction pr_action; /* Signal action for current sig. */
-#endif
__pid_t pr_pid;
__pid_t pr_ppid;
__pid_t pr_pgrp;
@@ -65,15 +77,12 @@ struct elf_prstatus
struct timeval pr_stime; /* System time. */
struct timeval pr_cutime; /* Cumulative user time. */
struct timeval pr_cstime; /* Cumulative system time. */
-#if 0
- long int pr_instr; /* Current instruction. */
-#endif
elf_gregset_t pr_reg; /* GP registers. */
int pr_fpvalid; /* True if math copro being used. */
};
-#define ELF_PRARGSZ (80) /* Number of chars for args */
+#define ELF_PRARGSZ (80) /* Number of chars for args. */
struct elf_prpsinfo
{
@@ -90,18 +99,22 @@ struct elf_prpsinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
+/* The rest of this file provides the types for emulation of the
+ Solaris <proc_service.h> interfaces that should be implemented by
+ users of libthread_db. */
+
/* Addresses. */
typedef void *psaddr_t;
/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
/* We don't have any differences between processes and threads,
- therefore habe only ine PID type. */
+ therefore have only one PID type. */
typedef __pid_t lwpid_t;
-
+/* Process status and info. In the end we do provide typedefs for them. */
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ace52d01fcf04259d0b39e25eb629194b1668f3
commit 7ace52d01fcf04259d0b39e25eb629194b1668f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 14:02:39 2001 +0000
Also print the address that faulted.
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
index 4ccd9e2..25036df 100644
--- a/sysdeps/unix/sysv/linux/arm/register-dump.h
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pb@nexus.co.uk>, 1998.
@@ -32,6 +32,7 @@
CPSR: XXXXXXXX
Trap: XXXXXXXX Error: XXXXXXXX OldMask: XXXXXXXX
+ Addr: XXXXXXXX
*/
@@ -46,7 +47,7 @@ hexvalue (unsigned long int value, char *buf, size_t len)
static void
register_dump (int fd, union k_sigcontext *ctx)
{
- char regs[20][8];
+ char regs[21][8];
struct iovec iov[97];
size_t nr = 0;
@@ -105,6 +106,7 @@ register_dump (int fd, union k_sigcontext *ctx)
hexvalue (ctx->v21.trap_no, regs[17], 8);
hexvalue (ctx->v21.error_code, regs[18], 8);
hexvalue (ctx->v21.oldmask, regs[19], 8);
+ hexvalue (ctx->v21.fault_address, regs[20], 8);
}
/* Generate the output. */
@@ -148,6 +150,11 @@ register_dump (int fd, union k_sigcontext *ctx)
ADD_MEM (regs[18], 8);
ADD_STRING (" OldMask: ");
ADD_MEM (regs[19], 8);
+ if (ctx->v20.magic != SIGCONTEXT_2_0_MAGIC)
+ {
+ ADD_STRING ("\n Addr: ");
+ ADD_MEM (regs[20], 8);
+ }
ADD_STRING ("\n");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48d32c2da938b2ff920565be2200b9c0d22962d7
commit 48d32c2da938b2ff920565be2200b9c0d22962d7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 04:55:54 2001 +0000
Add atan2f deltas.
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index 78cedbc..d7711e5 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -13,6 +13,17 @@ float: 2
idouble: 1
ifloat: 2
+# atan2
+Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
+float: 3
+ifloat: 3
+Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
+float: 3
+ifloat: 3
+Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
+float: 4
+ifloat: 4
+
# atanh
Test "atanh (0.7) == 0.8673005276940531944":
double: 1
@@ -758,6 +769,10 @@ float: 2
idouble: 1
ifloat: 2
+Function: "atan2":
+float: 4
+ifloat: 4
+
Function: "atanh":
double: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15a25bb641e39e528fc209de38697e8ecaa006f0
commit 15a25bb641e39e528fc209de38697e8ecaa006f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:24:39 2001 +0000
Fix clone system call entry point stub.
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
index 510e0ff..b902ff7 100644
--- a/sysdeps/unix/sysv/linux/hppa/clone.S
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -33,18 +33,18 @@ ENTRY(__clone)
/* FIXME: I have no idea how profiling works on hppa. */
/* Sanity check arguments. */
- comib,<> 0,%arg0,.Lerror /* no NULL function pointers */
- ldi EINVAL,%ret0
- comib,<> 0,%arg1,.Lerror /* no NULL stack pointers */
+ comib,= 0,%arg0,.Lerror /* no NULL function pointers */
+ ldi -EINVAL,%ret0
+ comib,= 0,%arg1,.Lerror /* no NULL stack pointers */
nop
/* Save the fn ptr and arg on the new stack. */
- stwm %arg3,64(%arg1)
+ stwm %arg0,64(%arg1)
stw %arg3,-60(%arg1)
/* Do the system call */
copy %arg2,%arg0
- ble 0x100(%sr7,%r0)
+ ble 0x100(%sr2,%r0)
ldi __NR_clone,%r20
ldi -4096,%r1
@@ -60,12 +60,12 @@ ENTRY(__clone)
/* Something bad happened -- no child created */
.Lerror:
b __syscall_error
- nop
+ sub %r0,%ret0,%arg0
thread_start:
/* Load up the arguments. */
ldw -60(%sp),%arg0
- ldwm -64(%sp),%r22
+ ldw -64(%sp),%r22
/* Call the user's function */
bl $$dyncall,%r31
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe6fac68513d047b11c9f3dbd132b5b682b9df87
commit fe6fac68513d047b11c9f3dbd132b5b682b9df87
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:23:45 2001 +0000
Removed ptrace entry so the ptrace.c wrapper is used.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index f0d6431..6d7cd6a 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -32,8 +32,6 @@ shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
socketpair - socketpair i:iiif __socketpair socketpair
-ptrace - ptrace 4 __ptrace ptrace
-
getresuid - getresuid i:ppp getresuid
getresgid - getresgid i:ppp getresgid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c358f9f7878269fbd60fb524e5255ddf975d1a62
commit c358f9f7878269fbd60fb524e5255ddf975d1a62
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:22:20 2001 +0000
(_dl_start_address): Rename to _dl_function_address.
diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
index 038404a..49c1216 100644
--- a/sysdeps/hppa/dl-symaddr.c
+++ b/sysdeps/hppa/dl-symaddr.c
@@ -33,7 +33,7 @@ _dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
}
ElfW(Addr)
-_dl_start_address (const struct link_map *map, ElfW(Addr) start)
+_dl_function_address (const struct link_map *map, ElfW(Addr) start)
{
return __hppa_make_fptr (map, start, &__fptr_root, NULL);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c56436673f636ce14a298c43a2c0b84101c3fec
commit 9c56436673f636ce14a298c43a2c0b84101c3fec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:22:03 2001 +0000
(ELF_MACHINE_START_ADDRESS): Define.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index f8a8e7b..a3437b5 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -448,6 +448,10 @@ __dl_fini_plabel:
/* We only use RELA. */
#define ELF_MACHINE_NO_REL 1
+/* Return the address of the entry point. */
+#define ELF_MACHINE_START_ADDRESS(map, start) \
+ DL_FUNCTION_ADDRESS (map, start)
+
#endif /* !dl_machine_h */
/* These are only actually used where RESOLVE_MAP is defined, anyway. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e40ba2ccb8cc4d54b59c8928925b50def0b85ed6
commit e40ba2ccb8cc4d54b59c8928925b50def0b85ed6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:21:47 2001 +0000
Add _dl_function_address.
diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions
index 0c447d9..c5f35d4 100644
--- a/sysdeps/hppa/Versions
+++ b/sysdeps/hppa/Versions
@@ -2,5 +2,6 @@ ld {
GLIBC_2.2 {
# hppa specific functions in the dynamic linker, but used by libc.so.
_dl_symbol_address; _dl_unmap; _dl_lookup_address;
+ _dl_function_address;
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85ff0834bb7b1ff476fcf3bcfd66a6f06bcc79f8
commit 85ff0834bb7b1ff476fcf3bcfd66a6f06bcc79f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 22 03:21:34 2001 +0000
(_dl_function_address): Prototype.
(DL_FUNCTION_ADDRESS): Define.
(DL_DT_INIT_ADDRESS): Define.
(DL_DT_FINI_ADDRESS): Define.
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
index 4f5f899..118c4d0 100644
--- a/sysdeps/hppa/dl-lookupcfg.h
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -34,3 +34,16 @@ Elf32_Addr _dl_lookup_address (const void *address);
void _dl_unmap (struct link_map *map);
#define DL_UNMAP(map) _dl_unmap (map)
+
+extern Elf32_Addr _dl_function_address (const struct link_map *map,
+ Elf32_Addr start);
+
+#define DL_FUNCTION_ADDRESS(map, addr) _dl_function_address (map, addr)
+
+/* The test for "addr & 2" below is to accomodate old binaries which
+ violated the ELF ABI by pointing DT_INIT and DT_FINI at a function
+ pointer. */
+#define DL_DT_INIT_ADDRESS(map, addr) \
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
+#define DL_DT_FINI_ADDRESS(map, addr) \
+ ((Elf32_Addr)(addr) & 2 ? (addr) : DL_FUNCTION_ADDRESS (map, addr))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efaa6dd8a230457fa2bf238aaf3efe74298dcb28
commit efaa6dd8a230457fa2bf238aaf3efe74298dcb28
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Apr 20 13:02:01 2001 +0000
* sysdeps/m68k/fpu/libm-test-ulps: Update.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index cf12777..ea8789f 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -70,8 +70,8 @@ double: 1
float: 7
idouble: 1
ifloat: 7
-ildouble: 5
-ldouble: 5
+ildouble: 6
+ldouble: 6
Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
idouble: 1
@@ -150,6 +150,9 @@ ldouble: 1
Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
ildouble: 2
ldouble: 2
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
+ildouble: 1
+ldouble: 2
Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
ildouble: 2
ldouble: 2
@@ -941,8 +944,8 @@ double: 1
float: 7
idouble: 1
ifloat: 7
-ildouble: 5
-ldouble: 5
+ildouble: 6
+ldouble: 6
Function: Imaginary part of "cacosh":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21e7ad57abfc434e724f1f486e0d5f82b2bd4969
commit 21e7ad57abfc434e724f1f486e0d5f82b2bd4969
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 20 06:05:52 2001 +0000
(NGREG, NFPREG, gregset): Correct for new kernel definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
index c819ab1..44108f0 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,15 +33,16 @@
typedef unsigned long int greg_t;
/* Number of general registers. */
-#define NGREG 42
-#define NFPREG 33
+#define NGREG 80
+#define NFPREG 32
/* Container for all general registers. */
typedef struct gregset
{
greg_t g_regs[32];
- greg_t sr_regs[5];
- greg_t g_pad[5];
+ greg_t sr_regs[8];
+ greg_t cr_regs[24];
+ greg_t g_pad[16];
} gregset_t;
/* Container for all FPU registers. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e3bde59b4f5aa56e5a384c092fc06fbe31cf84b
commit 6e3bde59b4f5aa56e5a384c092fc06fbe31cf84b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 20 06:05:04 2001 +0000
(CALL_MCOUNT): Update comment.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 1430642..20ec736 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -89,13 +89,8 @@
1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT /* XXX */
-#else
+/* No, don't bother. gcc will put the call in for us. */
#define CALL_MCOUNT /* Do nothing. */
-#endif
/* syscall wrappers consist of
#include <sysdep.h>
@@ -231,7 +226,7 @@
register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \
LOAD_ARGS_5(r26,r25,r24,r23,r22)
-#define ASM_ARGS_0
+#define ASM_ARGS_0
#define ASM_ARGS_1 , "r" (__r26)
#define ASM_ARGS_2 , "r" (__r26), "r" (__r25)
#define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee6d867525ae476ad1f62c93e8179edc2c91ec60
commit ee6d867525ae476ad1f62c93e8179edc2c91ec60
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 20 06:03:07 2001 +0000
(LDFLAGS-c_pic.os): Define.
(CFLAGS-.os): Remove.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
index f6ad843..e6fb771 100644
--- a/sysdeps/hppa/Makefile
+++ b/sysdeps/hppa/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by David Huggins-Daines (dhd@debian.org)
@@ -17,8 +17,10 @@
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-# We need this for all shared objects since the build process uses ld -r
-CFLAGS-.os += -ffunction-sections
+# We used to need this since the build process uses ld -r. Now we use
+# ld -r --unique=.text* which does more or less the same thing, but better.
+# CFLAGS-.os += -ffunction-sections
+LDFLAGS-c_pic.os += -Wl,--unique=.text*
ifeq ($(subdir),elf)
dl-routines += dl-symaddr dl-fptr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70d533e66bc0349c8e22566ec52a8efdae7d862b
commit 70d533e66bc0349c8e22566ec52a8efdae7d862b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 20 05:58:49 2001 +0000
Change dlt reg save to r3 and generate unwind info by hand.
diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c
index c058ed0..d2e07ea 100644
--- a/sysdeps/hppa/elf/initfini.c
+++ b/sysdeps/hppa/elf/initfini.c
@@ -59,8 +59,6 @@ __asm__ ("
.align 4
.globl _init
.type _init,@function
- .proc
- .callinfo
_init:
stw %rp,-20(%sp)
stwm %r4,64(%sp)
@@ -68,25 +66,38 @@ _init:
bl __gmon_start__,%rp
copy %r19,%r4 /* delay slot */
copy %r4,%r19
- .align 4
- .procend
/*@_init_PROLOG_ENDS*/
/*@_init_EPILOG_BEGINS*/
- .section .init
- copy %r4,%r19
- ldw -84(%sp),%rp
- bv %r0(%rp)
- ldwm -64(%sp),%r4
.text
.align 4
.weak __gmon_start__
.type __gmon_start__,@function
+__gmon_start__:
.proc
.callinfo
-__gmon_start__:
+ .entry
bv,n %r0(%r2)
+ .exit
.procend
+
+/* Here is the tail end of _init. We put __gmon_start before this so
+ that the assembler creates the .PARISC.unwind section for us, ie.
+ with the right attributes. */
+ .section .init
+ ldw -84(%sp),%rp
+ copy %r4,%r19
+ bv %r0(%rp)
+_end_init:
+ ldwm -64(%sp),%r4
+
+/* Our very own unwind info, because the assembler can't handle
+ functions split into two or more pieces. */
+ .section .PARISC.unwind
+ .extern _init
+ .word _init, _end_init
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
+
/*@_init_EPILOG_ENDS*/
/*@_fini_PROLOG_BEGINS*/
@@ -94,23 +105,26 @@ __gmon_start__:
.align 4
.globl _fini
.type _fini,@function
- .proc
- .callinfo
_fini:
stw %rp,-20(%sp)
stwm %r4,64(%sp)
stw %r19,-32(%sp)
copy %r19,%r4
- .align 4
- .procend
/*@_fini_PROLOG_ENDS*/
/*@_fini_EPILOG_BEGINS*/
.section .fini
- copy %r4,%r19
ldw -84(%sp),%rp
+ copy %r4,%r19
bv %r0(%rp)
+_end_fini:
ldwm -64(%sp),%r4
+
+ .section .PARISC.unwind
+ .extern _fini
+ .word _fini, _end_fini
+ .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08
+
/*@_fini_EPILOG_ENDS*/
/*@TRAILER_BEGINS*/
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=964b686b757d0d0e40fb6e2fd29472f90fc7b534
commit 964b686b757d0d0e40fb6e2fd29472f90fc7b534
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 19 21:23:49 2001 +0000
(INLINE_SYSCALL): Change to return a signed result for compatibility with other
architectures, and correctness.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 10e360d..1430642 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -192,21 +192,21 @@
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) ({ \
- unsigned long __sys_res; \
+ long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
LOAD_ARGS_##nr(args) \
asm volatile( \
- "ble 0x100(%%sr2, %%r0)\n\t" \
+ "ble 0x100(%%sr2, %%r0)\n\t" \
" ldi %1, %%r20" \
: "=r" (__res) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
); \
__sys_res = __res; \
} \
- if (__sys_res >= (unsigned long)-4095) { \
+ if ((unsigned long)__sys_res >= (unsigned long)-4095) { \
__set_errno(-__sys_res); \
- __sys_res = (unsigned long)-1; \
+ __sys_res = -1; \
} \
__sys_res; \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f66c56d4e6122b127f4aa2c3c97657e396df39a
commit 6f66c56d4e6122b127f4aa2c3c97657e396df39a
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 19 09:35:01 2001 +0000
Fix typos in last patch.
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
index a401f6b..3d4c18c 100644
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -20,7 +20,7 @@
/* Since we don't have an oldumount system call, do what the kernel
does down here. */
-extern long int __umount2 (char *name, int flags);
+extern long int __umount2 (const char *name, int flags);
long int
__umount (const char *name)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=070b2d2a8e6f21020c17bb029fb061521b09b5f5
commit 070b2d2a8e6f21020c17bb029fb061521b09b5f5
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 19 09:33:50 2001 +0000
Fix typos in last patch.
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
index 29633f5..a401f6b 100644
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -20,7 +20,7 @@
/* Since we don't have an oldumount system call, do what the kernel
does down here. */
-extern log int __umount2 (char * name, int flags);
+extern long int __umount2 (char *name, int flags);
long int
__umount (const char *name)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6bd63ae2162f5faec2625a6b3909a816201b7e6
commit f6bd63ae2162f5faec2625a6b3909a816201b7e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 18 00:22:15 2001 +0000
Maximum error for atan2f is 4.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 6d664c8..70a0f08 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -770,8 +770,8 @@ idouble: 1
ifloat: 2
Function: "atan2":
-float: 3
-ifloat: 3
+float: 4
+ifloat: 4
Function: "atanh":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e6947e36466d6791d83b3e0be75bb47b524148e
commit 5e6947e36466d6791d83b3e0be75bb47b524148e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 18 00:19:18 2001 +0000
Adjust error values for atan2f.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 5169a3e..6d664c8 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -13,6 +13,17 @@ float: 2
idouble: 1
ifloat: 2
+# atan2
+Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
+float: 3
+ifloat: 3
+Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
+float: 3
+ifloat: 3
+Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
+float: 4
+ifloat: 4
+
# atanh
Test "atanh (0.7) == 0.8673005276940531944":
double: 1
@@ -758,6 +769,10 @@ float: 2
idouble: 1
ifloat: 2
+Function: "atan2":
+float: 3
+ifloat: 3
+
Function: "atanh":
double: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0b7e44c7557c6c20d5f70c40c3c7c7f3f770de8
commit b0b7e44c7557c6c20d5f70c40c3c7c7f3f770de8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 17 18:59:43 2001 +0000
Adjust for increased precision in result of several tests.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index c278128..5169a3e 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -39,87 +39,87 @@ float: 1
ifloat: 1
# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
ifloat: 3
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
double: 1
float: 1
idouble: 1
ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
double: 3
float: 2
idouble: 3
ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# casinh
-Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 5
float: 1
idouble: 5
ifloat: 1
-Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
double: 1
idouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
ifloat: 1
# catan
-Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
float: 3
ifloat: 3
-Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
float: 4
ifloat: 4
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
double: 1
idouble: 1
# catanh
-Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
double: 4
idouble: 4
-Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
float: 4
ifloat: 4
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
float: 1
ifloat: 1
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
double: 1
float: 6
idouble: 1
@@ -174,7 +174,7 @@ float: 1
ifloat: 1
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
double: 1
float: 3
idouble: 1
@@ -521,7 +521,7 @@ idouble: 1
ifloat: 2
# log
-Test "log (0.7) == -0.35667494393873237891":
+Test "log (0.7) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
@@ -538,7 +538,7 @@ float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891":
+Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
index 23a0f35..260ba58 100644
--- a/sysdeps/arm/libm-test-ulps
+++ b/sysdeps/arm/libm-test-ulps
@@ -39,87 +39,87 @@ float: 1
ifloat: 1
# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
ifloat: 3
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
double: 1
float: 1
idouble: 1
ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
double: 3
float: 2
idouble: 3
ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# casinh
-Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 5
float: 1
idouble: 5
ifloat: 1
-Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
double: 1
idouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
ifloat: 1
# catan
-Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
float: 3
ifloat: 3
-Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
float: 4
ifloat: 4
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
double: 1
idouble: 1
# catanh
-Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
double: 4
idouble: 4
-Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
float: 4
ifloat: 4
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
float: 1
ifloat: 1
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
double: 1
float: 6
idouble: 1
@@ -174,7 +174,7 @@ float: 1
ifloat: 1
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
double: 1
float: 3
idouble: 1
@@ -521,7 +521,7 @@ idouble: 1
ifloat: 2
# log
-Test "log (0.7) == -0.35667494393873237891":
+Test "log (0.7) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
@@ -538,7 +538,7 @@ float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891":
+Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index f891152..cf12777 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -6,7 +6,7 @@ ildouble: 1
ldouble: 1
# acosh
-Test "acosh (7) == 2.6339157938496334172":
+Test "acosh (7) == 2.633915793849633417250092694615937":
ildouble: 1
ldouble: 1
@@ -48,109 +48,109 @@ float: 1
ifloat: 1
# cacos
-Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199 + 1.9833870299165354323 i":
+Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199416055713254211 + 1.9833870299165354323470769028940395 i":
ildouble: 1
ldouble: 1
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
ildouble: 5
ldouble: 5
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
idouble: 1
ildouble: 2
ldouble: 2
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
double: 1
idouble: 1
ildouble: 1
ldouble: 1
-Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
ildouble: 1
ldouble: 1
# casin
-Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i":
+Test "Imaginary part of: casin (-2 - 3 i) == -0.57065278432109940071028387968566963 - 1.9833870299165354323470769028940395 i":
ildouble: 1
ldouble: 1
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
double: 3
float: 2
idouble: 3
ifloat: 2
ildouble: 1
ldouble: 1
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 2
ifloat: 2
ildouble: 1
ldouble: 1
# casinh
-Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 6
float: 19
idouble: 6
ifloat: 19
ildouble: 6
ldouble: 6
-Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 13
float: 1
idouble: 13
ifloat: 1
ildouble: 7
ldouble: 7
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
double: 1
idouble: 1
ildouble: 3
ldouble: 3
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 2
ifloat: 2
ildouble: 3
ldouble: 3
# catan
-Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 7
ldouble: 7
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
ildouble: 1
ldouble: 1
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
# catanh
-Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
ildouble: 2
ldouble: 2
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
ildouble: 2
ldouble: 2
@@ -225,7 +225,7 @@ float: 2
ifloat: 2
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
ildouble: 1
ldouble: 1
@@ -628,7 +628,7 @@ ildouble: 1
ldouble: 1
# log
-Test "log (0.7) == -0.35667494393873237891":
+Test "log (0.7) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
@@ -653,7 +653,7 @@ float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891":
+Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
@@ -715,7 +715,7 @@ float: 1
ifloat: 1
# tan
-Test "tan (0.7) == 0.84228838046307944813":
+Test "tan (0.7) == 0.84228838046307944812813500221293775":
ildouble: 1
ldouble: 1
Test "tan (pi/4) == 1":
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index a36dacf..78cedbc 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -39,87 +39,87 @@ float: 1
ifloat: 1
# cacos
-Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# cacosh
-Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 7
idouble: 1
ifloat: 7
-Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
double: 1
float: 3
idouble: 1
ifloat: 3
-Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
double: 1
float: 1
idouble: 1
ifloat: 1
# casin
-Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
double: 3
float: 2
idouble: 3
ifloat: 2
-Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
float: 1
ifloat: 1
# casinh
-Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 5
float: 1
idouble: 5
ifloat: 1
-Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
double: 3
float: 6
idouble: 3
ifloat: 6
-Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
double: 1
idouble: 1
-Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
float: 1
ifloat: 1
# catan
-Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
float: 3
ifloat: 3
-Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
float: 4
ifloat: 4
-Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
double: 1
idouble: 1
# catanh
-Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
double: 4
idouble: 4
-Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
float: 4
ifloat: 4
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
float: 1
ifloat: 1
-Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
double: 1
float: 6
idouble: 1
@@ -174,7 +174,7 @@ float: 1
ifloat: 1
# clog
-Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
double: 1
float: 3
idouble: 1
@@ -521,7 +521,7 @@ idouble: 1
ifloat: 2
# log
-Test "log (0.7) == -0.35667494393873237891":
+Test "log (0.7) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
@@ -538,7 +538,7 @@ float: 1
ifloat: 1
# log1p
-Test "log1p (-0.3) == -0.35667494393873237891":
+Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
double: 1
float: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c8f22b4fbec1b95e10439f51a11d49b625e6c33
commit 5c8f22b4fbec1b95e10439f51a11d49b625e6c33
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Apr 11 11:56:35 2001 +0000
[__ASSEMBLY__]: Define it.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index ad7976e..a5ae480 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define __ASSEMBLY__ 1
#include <entry.h>
#ifndef ENTRY_POINT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=910250c5756930c3ddd9922b9376f72e55ec860f
commit 910250c5756930c3ddd9922b9376f72e55ec860f
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Apr 11 08:33:14 2001 +0000
Adjusted.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index 99965f8..f891152 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -212,13 +212,9 @@ ldouble: 2
Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-ildouble: 5
-ldouble: 5
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-ildouble: 19
-ldouble: 19
Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 3
ifloat: 3
@@ -344,18 +340,9 @@ float: 1
ifloat: 1
# csqrt
-Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
-ildouble: 1
-ldouble: 1
-Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
-ildouble: 1
-ldouble: 1
Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
-ildouble: 1
-ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
@@ -398,9 +385,13 @@ ldouble: 1
Test "erfc (0.7) == 0.32219880616258152702":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "erfc (1.2) == 0.089686021770364619762":
float: 2
ifloat: 2
+ildouble: 3
+ldouble: 3
Test "erfc (2.0) == 0.0046777349810472658379":
double: 1
idouble: 1
@@ -409,6 +400,8 @@ double: 24
float: 11
idouble: 24
ifloat: 11
+ildouble: 12
+ldouble: 12
# exp10
Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
@@ -452,6 +445,17 @@ ifloat: 1
ildouble: 1
ldouble: 1
+# gamma
+Test "gamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+Test "gamma (0.5) == log(sqrt(pi))":
+ildouble: 1
+ldouble: 1
+Test "gamma (3) == M_LN2l":
+ildouble: 1
+ldouble: 1
+
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
@@ -486,8 +490,8 @@ Test "j0 (1.5) == 0.51182767173591812875":
float: 1
ifloat: 1
Test "j0 (10.0) == -0.24593576445134833520":
-float: 3
-ifloat: 3
+double: 1
+idouble: 1
# j1
Test "j1 (-1.0) == -0.44005058574493351596":
@@ -499,20 +503,25 @@ ifloat: 1
Test "j1 (1.5) == 0.55793650791009964199":
float: 1
ifloat: 1
-Test "j1 (2.0) == 0.57672480775687338720":
-float: 1
-ifloat: 1
Test "j1 (10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "j1 (2.0) == 0.57672480775687338720":
+float: 1
+ifloat: 1
+Test "j1 (8.0) == 0.23463634685391462438":
+ildouble: 1
+ldouble: 1
# jn
Test "jn (0, 1.5) == 0.51182767173591812875":
float: 1
ifloat: 1
Test "jn (0, 10.0) == -0.24593576445134833520":
-float: 3
-ifloat: 3
+double: 1
+idouble: 1
Test "jn (1, -1.0) == -0.44005058574493351596":
float: 1
ifloat: 1
@@ -522,59 +531,101 @@ ifloat: 1
Test "jn (1, 1.5) == 0.55793650791009964199":
float: 1
ifloat: 1
-Test "jn (1, 2.0) == 0.57672480775687338720":
-float: 1
-ifloat: 1
Test "jn (1, 10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
+Test "jn (1, 2.0) == 0.57672480775687338720":
+float: 1
+ifloat: 1
+Test "jn (1, 8.0) == 0.23463634685391462438":
+ildouble: 1
+ldouble: 1
Test "jn (10, -1.0) == 0.26306151236874532070e-9":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.1) == 0.26905328954342155795e-19":
double: 4
float: 6
idouble: 4
ifloat: 6
+ildouble: 1
+ldouble: 1
Test "jn (10, 0.7) == 0.75175911502153953928e-11":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "jn (10, 1.0) == 0.26306151236874532070e-9":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "jn (10, 10.0) == 0.20748610663335885770":
-float: 9
-ifloat: 9
+double: 1
+float: 11
+idouble: 1
+ifloat: 11
+ildouble: 2
+ldouble: 2
Test "jn (10, 2.0) == 0.25153862827167367096e-6":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "jn (3, -1.0) == -0.019563353982668405919":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.1) == 0.000020820315754756261429":
double: 1
idouble: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 0.7) == 0.0069296548267508408077":
double: 2
idouble: 2
Test "jn (3, 1.0) == 0.019563353982668405919":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (3, 10.0) == 0.058379379305186812343":
-float: 5
-ifloat: 5
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 1
+ldouble: 1
# lgamma
+Test "lgamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
+Test "lgamma (0.5) == log(sqrt(pi))":
+ildouble: 1
+ldouble: 1
Test "lgamma (0.7) == 0.26086724653166651439":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "lgamma (1.2) == -0.853740900033158497197e-1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "lgamma (3) == M_LN2l":
+ildouble: 1
+ldouble: 1
# log
Test "log (0.7) == -0.35667494393873237891":
@@ -677,14 +728,21 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tgamma (0.5) == sqrt (pi)":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "tgamma (0.7) == 1.29805533264755778568":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "tgamma (4) == 6":
+ildouble: 1
+ldouble: 1
# y0
Test "y0 (0.1) == -1.5342386513503668441":
@@ -695,15 +753,22 @@ ifloat: 2
Test "y0 (0.7) == -0.19066492933739506743":
double: 2
idouble: 2
+ildouble: 2
+ldouble: 2
+Test "y0 (1.5) == 0.38244892379775884396":
+ildouble: 1
+ldouble: 1
Test "y0 (10.0) == 0.055671167283599391424":
-float: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "y0 (2.0) == 0.51037567264974511960":
float: 1
ifloat: 1
Test "y0 (8.0) == 0.22352148938756622053":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# y1
Test "y1 (0.1) == -6.4589510947020269877":
@@ -711,6 +776,8 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "y1 (0.7) == -1.1032498719076333697":
double: 1
float: 1
@@ -723,11 +790,16 @@ Test "y1 (1.5) == -0.41230862697391129595":
float: 2
ifloat: 2
Test "y1 (10.0) == 0.24901542420695388392":
-float: 2
-ifloat: 2
+float: 1
+ifloat: 1
Test "y1 (2.0) == -0.10703243154093754689":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "y1 (8.0) == -0.15806046173124749426":
+ildouble: 2
+ldouble: 2
# yn
Test "yn (0, 0.1) == -1.5342386513503668441":
@@ -738,20 +810,29 @@ ifloat: 2
Test "yn (0, 0.7) == -0.19066492933739506743":
double: 2
idouble: 2
+ildouble: 2
+ldouble: 2
+Test "yn (0, 1.5) == 0.38244892379775884396":
+ildouble: 1
+ldouble: 1
Test "yn (0, 10.0) == 0.055671167283599391424":
-float: 1
-ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (0, 2.0) == 0.51037567264974511960":
float: 1
ifloat: 1
Test "yn (0, 8.0) == 0.22352148938756622053":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "yn (1, 0.1) == -6.4589510947020269877":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Test "yn (1, 0.7) == -1.1032498719076333697":
double: 1
float: 1
@@ -764,38 +845,50 @@ Test "yn (1, 1.5) == -0.41230862697391129595":
float: 1
ifloat: 1
Test "yn (1, 10.0) == 0.24901542420695388392":
-float: 2
-ifloat: 2
+float: 1
+ifloat: 1
Test "yn (1, 2.0) == -0.10703243154093754689":
float: 2
ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "yn (1, 8.0) == -0.15806046173124749426":
+ildouble: 2
+ldouble: 2
Test "yn (10, 0.1) == -0.11831335132045197885e19":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "yn (10, 0.7) == -0.42447194260703866924e10":
double: 6
idouble: 6
+ildouble: 7
+ldouble: 7
Test "yn (10, 10.0) == -0.35981415218340272205":
-float: 2
-ifloat: 2
-Test "yn (10, 2.0) == -129184.54220803928264":
double: 1
+float: 1
idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.54220803928264":
+ildouble: 1
+ldouble: 1
Test "yn (3, 0.1) == -5099.3323786129048894":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 2
+ldouble: 2
Test "yn (3, 0.7) == -15.819479052819633505":
double: 2
float: 1
idouble: 2
ifloat: 1
-Test "yn (3, 10.0) == -0.25136265718383732978":
-float: 1
-ifloat: 1
+ildouble: 2
+ldouble: 2
Test "yn (3, 2.0) == -1.1277837768404277861":
float: 1
ifloat: 1
@@ -942,14 +1035,12 @@ ldouble: 2
Function: Real part of "cexp":
float: 3
ifloat: 3
-ildouble: 5
-ldouble: 5
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "cexp":
float: 2
ifloat: 2
-ildouble: 19
-ldouble: 19
Function: Imaginary part of "clog":
ildouble: 1
@@ -1022,12 +1113,6 @@ ldouble: 2
Function: Real part of "csqrt":
float: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: Imaginary part of "csqrt":
-ildouble: 1
-ldouble: 1
Function: Real part of "ctan":
double: 1
@@ -1058,6 +1143,8 @@ double: 24
float: 11
idouble: 24
ifloat: 11
+ildouble: 12
+ldouble: 12
Function: "exp10":
double: 1
@@ -1077,6 +1164,10 @@ ifloat: 1
ildouble: 1
ldouble: 1
+Function: "gamma":
+ildouble: 1
+ldouble: 1
+
Function: "hypot":
float: 1
ifloat: 1
@@ -1084,24 +1175,32 @@ ildouble: 1
ldouble: 1
Function: "j0":
-float: 3
-ifloat: 3
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Function: "j1":
float: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "jn":
double: 4
-float: 9
+float: 11
idouble: 4
-ifloat: 9
+ifloat: 11
+ildouble: 2
+ldouble: 2
Function: "lgamma":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 1
+ldouble: 1
Function: "log":
double: 1
@@ -1166,23 +1265,31 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: "y0":
double: 2
float: 2
idouble: 2
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "y1":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "yn":
double: 6
float: 2
idouble: 6
ifloat: 2
+ildouble: 7
+ldouble: 7
# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a5b388e1f8b12177cd50708b5653b939136af18
commit 0a5b388e1f8b12177cd50708b5653b939136af18
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 11 07:34:36 2001 +0000
Stack information for Arm.
diff --git a/sysdeps/arm/stackinfo.h b/sysdeps/arm/stackinfo.h
new file mode 100644
index 0000000..b746e08
--- /dev/null
+++ b/sysdeps/arm/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On Arm the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7d0b32d5f9fcfd7106533becb85c9c3c3f38b83
commit a7d0b32d5f9fcfd7106533becb85c9c3c3f38b83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 22:32:04 2001 +0000
[!__ASSEMBLY__]: Declare __start.
diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/sysv/linux/mips/entry.h
index 3db6d93..04d05d2 100644
--- a/sysdeps/unix/sysv/linux/mips/entry.h
+++ b/sysdeps/unix/sysv/linux/mips/entry.h
@@ -1 +1,5 @@
+#ifndef __ASSEMBLY__
+extern void __start (void);
+#endif
+
#define ENTRY_POINT __start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bdc6e7d384c569bcf44462cc6f61c81e3257bf1
commit 1bdc6e7d384c569bcf44462cc6f61c81e3257bf1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 20:50:54 2001 +0000
Stack information for Alpha.
diff --git a/sysdeps/alpha/stackinfo.h b/sysdeps/alpha/stackinfo.h
new file mode 100644
index 0000000..dfaafb0
--- /dev/null
+++ b/sysdeps/alpha/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On Alpha the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d0b153553538b6fb2200dc33772e8f97d9e1367
commit 5d0b153553538b6fb2200dc33772e8f97d9e1367
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Apr 10 19:58:52 2001 +0000
* sysdeps/m68k/fpu/e_pow.c: Correct handling of some exceptional
values.
* sysdeps/m68k/fpu/e_scalb.c: Likewise.
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index 3dc3d81..b461ad8 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -41,23 +41,25 @@ s(__ieee754_pow) (float_type x, float_type y)
y_cond = __m81_test (y);
if (y_cond & __M81_COND_ZERO)
return 1.0;
+ if (y_cond & __M81_COND_NAN)
+ return x == 1.0 ? x : x + y;
x_cond = __m81_test (x);
- if ((x_cond | y_cond) & __M81_COND_NAN)
+ if (x_cond & __M81_COND_NAN)
return x + y;
if (y_cond & __M81_COND_INF)
{
ax = s(fabs) (x);
- if (ax == 1)
- return y - y;
- if (ax > 1)
+ if (ax == 1.0)
+ return ax;
+ if (ax > 1.0)
return y_cond & __M81_COND_NEG ? 0 : y;
else
return y_cond & __M81_COND_NEG ? -y : 0;
}
- if (s(fabs) (y) == 1)
+ if (s(fabs) (y) == 1.0)
return y_cond & __M81_COND_NEG ? 1 / x : x;
if (y == 2)
@@ -77,7 +79,7 @@ s(__ieee754_pow) (float_type x, float_type y)
}
ax = s(fabs) (x);
- if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1)
+ if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1.0)
{
z = ax;
if (y_cond & __M81_COND_NEG)
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index 22332ca..7f56199 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <math.h>
+#include "math_private.h"
#include "mathimpl.h"
#ifndef SUFF
@@ -47,14 +48,12 @@ s(__ieee754_scalb) (float_type x, float_type fn)
return x * fn;
else if (x_cond & __M81_COND_ZERO)
return x;
- else if (x_cond & __M81_COND_INF)
- return 0.0/0.0;
else
return x / -fn;
}
if (m81(__rint) (fn) != fn)
- return 0.0/0.0;
+ return (x - x) / (x - x);
__asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x));
return retval;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e555ed65154f4dc05d5b097d8e81817b2f7917ea
commit e555ed65154f4dc05d5b097d8e81817b2f7917ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:24:23 2001 +0000
CRIS-specific memory copying code.
diff --git a/sysdeps/cris/wordcopy.c b/sysdeps/cris/wordcopy.c
new file mode 100644
index 0000000..6525e9f
--- /dev/null
+++ b/sysdeps/cris/wordcopy.c
@@ -0,0 +1 @@
+/* Empty; not needed. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdac9b9648799b57f1d8ed40f18140822e9b0396
commit fdac9b9648799b57f1d8ed40f18140822e9b0396
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:23:59 2001 +0000
CRIS-specific low-level definitions.
diff --git a/sysdeps/cris/sysdep.h b/sysdeps/cris/sysdep.h
new file mode 100644
index 0000000..ada5de3
--- /dev/null
+++ b/sysdeps/cris/sysdep.h
@@ -0,0 +1,114 @@
+/* Assembler macros for CRIS.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/sysdep.h>
+
+#ifndef HAVE_ELF
+# error ELF is assumed. Generalize the code and retry.
+#endif
+
+#ifndef NO_UNDERSCORES
+# error User-label prefix (underscore) assumed absent. Generalize the code and retry.
+#endif
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembly-code. */
+
+/* It is *not* generally true that "ELF uses byte-counts for .align, most
+ others use log2 of count of bytes", like some neighboring configs say.
+ See "align" in gas/read.c which is not overridden by
+ gas/config/obj-elf.c. It takes a log2 argument. *Some* targets
+ override it to take a byte argument. People should read source instead
+ of relying on hearsay. */
+# define ALIGNARG(log2) log2
+
+# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
+# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+/* The non-PIC jump is preferred, since it does not stall, and does not
+ invoke generation of a PLT. These macros assume that $r0 is set up as
+ GOT register. */
+# ifdef __PIC__
+# define PLTJUMP(_x) \
+ add.d C_SYMBOL_NAME (_x):PLT,$pc
+
+# define PLTCALL(_x) \
+ move.d C_SYMBOL_NAME (_x):PLTG,$r9 @ \
+ add.d $r0,$r9 @ \
+ jsr $r9
+
+# define SETUP_PIC \
+ push $r0 @ \
+ move.d $pc,$r0 @ \
+ sub.d .:GOTOFF,$r0
+
+# define TEARDOWN_PIC pop $r0
+# else
+# define PLTJUMP(_x) jump C_SYMBOL_NAME (_x)
+# define PLTCALL(_x) jsr C_SYMBOL_NAME (_x)
+# define SETUP_PIC
+# define TEARDOWN_PIC
+# endif
+
+/* Define an entry point visible from C. */
+# define ENTRY(name) \
+ .text @ \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (name) @ \
+ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \
+ .align ALIGNARG (2) @ \
+ C_LABEL(name) @ \
+ CALL_MCOUNT
+
+# undef END
+# define END(name) \
+ ASM_SIZE_DIRECTIVE (C_SYMBOL_NAME (name))
+
+/* If compiled for profiling, call `mcount' at the start of each function.
+ FIXME: Note that profiling is not actually implemented. This is just
+ example code which might not even compile, though it is believed to be
+ correct. */
+# ifdef PROF
+# define CALL_MCOUNT \
+ push $srp @ \
+ push $r9 @ \
+ push $r10 @ \
+ push $r11 @ \
+ push $r12 @ \
+ push $r13 @ \
+ SETUP_PIC @ \
+ PLTCALL (mcount) @ \
+ TEARDOWN_PIC @ \
+ pop $r13 @ \
+ pop $r12 @ \
+ pop $r11 @ \
+ pop $r10 @ \
+ pop $r9 @ \
+ pop $srp
+# else
+# define CALL_MCOUNT /* Do nothing. */
+# endif
+
+/* Since C identifiers are not normally prefixed with an underscore
+ on this system, the asm identifier `syscall_error' intrudes on the
+ C name space. Make sure we use an innocuous name. */
+# define syscall_error __syscall_error
+# define mcount _mcount
+
+#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5cb610484fd5b1a2e78781aaf8de25f0648e552b
commit 5cb610484fd5b1a2e78781aaf8de25f0648e552b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:23:44 2001 +0000
setjmp implementation on CRIS.
diff --git a/sysdeps/cris/setjmp.S b/sysdeps/cris/setjmp.S
new file mode 100644
index 0000000..d773ac9
--- /dev/null
+++ b/sysdeps/cris/setjmp.S
@@ -0,0 +1,66 @@
+/* setjmp for CRIS.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+ .syntax no_register_prefix
+
+ENTRY (__sigsetjmp)
+.Local__sigsetjmp:
+ moveq 1,r9
+ movem sp,[r10+1*4]
+#ifdef __PIC__
+ move.d pc,r9
+ addq 0f-.,r9
+#else
+ move.d 0f,r9
+#endif
+ move.d r9,[r10]
+ move srp,[r10+16*4]
+ move ccr,[r10+17*4]
+ PLTJUMP (__sigjmp_save)
+0: /* This is where longjmp returns. (Don't use "ret" - it's a macro. */
+ Ret
+ move.d r9,r10
+END (__sigsetjmp)
+
+/* Binary compatibility entry points. Having these in separate files
+ is not meaningful and just adds library overhead. */
+
+ENTRY (__setjmp)
+ ba .Local__sigsetjmp
+ moveq 0,r11
+END (__setjmp)
+
+ENTRY (_setjmp)
+ ba .Local__sigsetjmp
+ moveq 0,r11
+END (_setjmp)
+
+ENTRY (setjmp)
+ ba .Local__sigsetjmp
+ moveq 1,r11
+END (setjmp)
+
+weak_extern (__setjmp)
+weak_extern (_setjmp)
+weak_extern (setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=050eb091f792dc41eabaab62f5adcc4fbbc80236
commit 050eb091f792dc41eabaab62f5adcc4fbbc80236
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:23:30 2001 +0000
Macros to help memusage program on CRIS.
diff --git a/sysdeps/cris/memusage.h b/sysdeps/cris/memusage.h
new file mode 100644
index 0000000..696c56e
--- /dev/null
+++ b/sysdeps/cris/memusage.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* No asm variables, just for reasons of solid healthy paranoia. */
+#define GETSP() \
+ ({ \
+ uintptr_t stack_ptr; \
+ __asm__ ("move.d $sp,%0" : "=rm" (stack_ptr)); \
+ stack_ptr; \
+ })
+
+#include <sysdeps/generic/memusage.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9ca92e3b227617f9717bc784c3dafc532f555e4
commit e9ca92e3b227617f9717bc784c3dafc532f555e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:23:12 2001 +0000
Definitions for efficient copying on CRIS.
diff --git a/sysdeps/cris/memcopy.h b/sysdeps/cris/memcopy.h
new file mode 100644
index 0000000..7bcf634
--- /dev/null
+++ b/sysdeps/cris/memcopy.h
@@ -0,0 +1,57 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/memcopy.h>
+
+/* We override the word-copying macros, partly because misalignment in one
+ pointer isn't cause for a special function, partly because we want to
+ get rid of wordcopy.c; these macros are only used in memmove.c (and
+ it's sibling bcopy) since we have arch-specific mempcpy, memcpy and
+ memset. */
+
+#undef OP_T_THRES
+#define OP_T_THRES OPSIZ
+
+#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \
+ do \
+ { \
+ unsigned long enddst_bp = dst_bp + nbytes - (nbytes % OPSIZ); \
+ nbytes_left = (nbytes % OPSIZ); \
+ while (dst_bp < (unsigned long) enddst_bp) \
+ { \
+ op_t x = *(op_t *) src_bp; \
+ src_bp += sizeof x; \
+ *(op_t *) dst_bp = x; \
+ dst_bp += sizeof x; \
+ } \
+ } while (0)
+
+#define WORD_COPY_BWD(dst_bp, src_bp, nbytes_left, nbytes) \
+ do \
+ { \
+ unsigned long enddst_bp = dst_bp - nbytes + (nbytes % OPSIZ); \
+ nbytes_left = (nbytes % OPSIZ); \
+ while (dst_bp > enddst_bp) \
+ { \
+ op_t x; \
+ src_bp -= sizeof x; \
+ x = *(op_t *) src_bp; \
+ dst_bp -= sizeof x; \
+ *(op_t *) dst_bp = x; \
+ } \
+ } while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c266efdcdac6b2417c58ab46dec48d3ebff9135
commit 9c266efdcdac6b2417c58ab46dec48d3ebff9135
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:22:52 2001 +0000
Profiling definitions for CRIS.
diff --git a/sysdeps/cris/machine-gmon.h b/sysdeps/cris/machine-gmon.h
new file mode 100644
index 0000000..5455c82
--- /dev/null
+++ b/sysdeps/cris/machine-gmon.h
@@ -0,0 +1,28 @@
+/* PowerPC-specific implementation of profiling support.
+ Copyright (C) 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+void __mcount_internal (unsigned long frompc, unsigned long selfpc);
+
+#define _MCOUNT_DECL(frompc, selfpc) \
+void __mcount_internal (unsigned long frompc, unsigned long selfpc)
+
+
+/* Define MCOUNT as empty since we have the implementation in another
+ file. FIXME: Just stubs, currently. */
+#define MCOUNT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cdda3fc7f04f830ba5bdec85786ec079970e2f92
commit cdda3fc7f04f830ba5bdec85786ec079970e2f92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:22:36 2001 +0000
Startup code for ELF binaries on CRIS.
diff --git a/sysdeps/cris/elf/start.S b/sysdeps/cris/elf/start.S
new file mode 100644
index 0000000..f6336d2
--- /dev/null
+++ b/sysdeps/cris/elf/start.S
@@ -0,0 +1,123 @@
+/* Startup code compliant to the ELF CRIS ABI (to-be-written).
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment. When the entry point runs, most registers' values are
+ unspecified, except for:
+
+ R10 Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ SP The stack contains the arguments and environment:
+ [SP] argc
+ [SP+4] argv[0]
+ ...
+ [SP+4*argc] NULL
+ [SP+4*(argc+1)] envp[0]
+ ...
+ NULL
+*/
+
+ .syntax no_register_prefix
+
+ .text
+ .globl _start
+_start:
+ /* Clear the frame pointer, to mark the outermost frame. */
+ moveq 0,r8
+
+ /* Move the shared library termination function to the right place
+ for __libc_main. */
+ move.d r10,r9
+
+ /* Extract the arguments as encoded on the stack and set up the
+ arguments for `main': argc, argv. envp will be determined
+ later in __libc_start_main. */
+
+ /* Get the argument count. */
+ move.d [sp],r11
+
+ /* Store the stack pointer as end of stack. We overwrite
+ the incoming argc. */
+ move.d sp,[sp]
+
+ /* The argument vector starts just after the argument count. */
+ move.d sp,r12
+ addq 4,r12
+
+ /* There are seven arguments to __libc_start_main:
+ r10: main - Address of it.
+ r11: argc
+ r12: argv
+ r13: init - Function to call.
+
+ [sp]: fini - Function to register with atexit.
+ [sp+4]: rtld_fini - Another function to register with atexit.
+ [sp+8]: stack_end - Top of stack (actually same as argv).
+
+ The last two are passed on stack. */
+
+ /* Store the fini function coming from the dynamic loader. */
+ push r9
+
+ /* Get the addresses of our own entry points to `.fini' and
+ `.init'. */
+
+#ifdef __PIC__
+ /* If for some reason this program is compiled as PIC, set up R0. */
+ move.d pc,r0
+ sub.d .:GOTOFF,r0
+
+ move.d _init:PLTG,r13
+ add.d r0,r13
+ move.d _fini:PLTG,r9
+ add.d r0,r9
+ move.d main:PLTG,r10
+ add.d r0,r10
+#else
+ move.d _init,r13
+ move.d _fini,r9
+ move.d main,r10
+#endif
+ push r9
+
+ /* Call the user's main function, and exit with its value. But
+ let the libc call main. */
+ PLTCALL (__libc_start_main)
+
+ /* Crash if somehow `exit' does return. We have at least 8192
+ invalid addresses to choose from. */
+ test.d [6502]
+
+ /* Stop the unstoppable. */
+0:
+ ba 0b
+ nop
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26414026ac08c905f305e43ae6a0a843c7d590ab
commit 26414026ac08c905f305e43ae6a0a843c7d590ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:22:01 2001 +0000
CRIS-specific part of ELF dynamic loader.
diff --git a/sysdeps/cris/dl-machine.h b/sysdeps/cris/dl-machine.h
new file mode 100644
index 0000000..beec381
--- /dev/null
+++ b/sysdeps/cris/dl-machine.h
@@ -0,0 +1,392 @@
+/* Machine-dependent ELF dynamic relocation inline functions. CRIS version.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "CRIS"
+
+#include <sys/param.h>
+
+#ifdef __PIC__
+# define CALL_FN(x) \
+ "move.d $pc,$r9\n\t" \
+ "add.d " #x " - .,$r9\n\t" \
+ "jsr $r9"
+#else
+# define CALL_FN(x) "jsr " #x
+#endif
+
+/* Return nonzero iff ELF header is compatible with the running host. */
+
+static inline int
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
+{
+ return ehdr->e_machine == EM_CRIS;
+}
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+ /* Don't just set this to an asm variable "r0" since that's not logical
+ (like, the variable is uninitialized and the register is fixed) and
+ may make GCC trip over itself doing register allocation. Yes, I'm
+ paranoid. Why do you ask? */
+ Elf32_Addr *got;
+
+ __asm__ ("move.d $r0,%0" : "=rm" (got));
+ return *got;
+}
+
+/* Return the run-time load address of the shared object. We do it like
+ m68k and i386, by taking an arbitrary local symbol, forcing a GOT entry
+ for it, and peeking into the GOT table, which is set to the link-time
+ file-relative symbol value (regardless of whether the target is REL or
+ RELA). We subtract this link-time file-relative value from the "local"
+ value we calculate from GOT position and GOT offset. FIXME: Perhaps
+ there's some other symbol we could use, that we don't *have* to force a
+ GOT entry for. */
+
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+ Elf32_Addr gotaddr_diff;
+ __asm__ ("sub.d [$r0+_dl_start:GOT16],$r0,%0\n\t"
+ "add.d _dl_start:GOTOFF,%0" : "=r" (gotaddr_diff));
+ return gotaddr_diff;
+}
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ Elf32_Addr *got;
+ extern void _dl_runtime_resolve (Elf32_Word);
+ extern void _dl_runtime_profile (Elf32_Word);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* The GOT entries for functions in the PLT have not yet been
+ filled in. Their initial contents will arrange when called
+ to push an offset into the .rela.plt section, push
+ _GLOBAL_OFFSET_TABLE_[1], and then jump to
+ _GLOBAL_OFFSET_TABLE_[2]. */
+ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
+
+ /* The got[2] entry contains the address of a function which gets
+ called to get the address of a so far unresolved function and
+ jump to it. The profiling extension of the dynamic linker allows
+ to intercept the calls to collect information. In this case we
+ don't store the address in the GOT so that all future calls also
+ end in this function. */
+ if (__builtin_expect (profile, 0))
+ {
+ got[2] = (Elf32_Addr) &_dl_runtime_profile;
+
+ if (_dl_name_match_p (_dl_profile, l))
+ {
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
+ }
+ else
+ /* This function will get called to fix up the GOT entry indicated by
+ the offset on the stack, and then jump to the resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+
+ return lazy;
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns.
+
+ We get here with the offset into the relocation table pushed on stack,
+ and the link map in MOF. */
+
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
+"; Trampoline for " #fixup_name "
+ .globl " #tramp_name "
+ .type " #tramp_name ", @function
+" #tramp_name ":
+ push $r13
+ push $r12
+ push $r11
+ push $r10
+ push $r9
+ push $srp
+ move.d [$sp+6*4],$r11
+ move $mof,$r10
+ " CALL_FN (fixup_name) "
+ move.d $r10,[$sp+6*4]
+ pop $srp
+ pop $r9
+ pop $r10
+ pop $r11
+ pop $r12
+ pop $r13
+ jump [$sp+]
+ .size " #tramp_name ", . - " #tramp_name "\n"
+#ifndef PROF
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup));
+#else
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
+ ".globl _dl_runtime_profile\n" \
+ ".set _dl_runtime_profile, _dl_runtime_resolve");
+#endif
+
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ move.d $sp,$r10
+ " CALL_FN (_dl_start) "
+ /* FALLTHRU */
+
+ .globl _dl_start_user
+ .type _dl_start_user,@function
+_dl_start_user:
+ ; Save the user entry point address in R1.
+ move.d $r10,$r1
+ ; Point R0 at the GOT.
+ move.d $pc,$r0
+ sub.d .:GOTOFF,$r0
+ ; Remember the highest stack address.
+ move.d [$r0+__libc_stack_end:GOT16],$r13
+ move.d $sp,[$r13]
+ ; See if we were run as a command with the executable file
+ ; name as an extra leading argument.
+ move.d [$r0+_dl_skip_args:GOT16],$r13
+ move.d [$r13],$r9
+ ; Get the original argument count
+ move.d [$sp],$r11
+ ; Subtract _dl_skip_args from it.
+ sub.d $r9,$r11
+ ; Adjust the stack pointer to skip _dl_skip_args words.
+ addi $r9.d,$sp
+ ; Put the new argc in place as expected by the user entry.
+ move.d $r11,[$sp]
+ ; Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
+ ; env: skip scaled argc and skip stored argc and NULL at end of argv[].
+ move.d $sp,$r13
+ addi $r11.d,$r13
+ addq 8,$r13
+ ; argv: skip stored argc.
+ move.d $sp,$r12
+ addq 4,$r12
+ ; main_map: at _dl_loaded.
+ move.d [$r0+_dl_loaded:GOT16],$r9
+ move.d [$r9],$r10
+ move.d _dl_init:PLTG,$r9
+ add.d $r0,$r9
+ jsr $r9
+ ; Pass our finalizer function to the user in R10.
+ move.d [$r0+_dl_fini:GOT16],$r10
+ ; Terminate the frame-pointer.
+ moveq 0,$r8
+ ; Cause SEGV if user entry returns.
+ move $r8,$srp
+ ; Jump to the user's entry point.
+ jump $r1
+ .size _dl_start_user, . - _dl_start_user
+ .previous");
+
+/* Nonzero iff TYPE describes a relocation that should
+ skip the executable when looking up the symbol value. */
+#define elf_machine_lookup_noexec_p(type) ((type) == R_CRIS_COPY)
+
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_lookup_noplt_p(type) ((type) == R_CRIS_JUMP_SLOT)
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_JMP_SLOT R_CRIS_JUMP_SLOT
+
+/* CRIS never uses Elf32_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+/* We define an initialization functions. This is called very early in
+ _dl_sysdep_start. */
+#define DL_PLATFORM_INIT dl_platform_init ()
+
+extern const char *_dl_platform;
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+ if (_dl_platform != NULL && *_dl_platform == '\0')
+ /* Avoid an empty string which would disturb us. */
+ _dl_platform = NULL;
+}
+
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ return *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr value)
+{
+ return value + reloc->r_addend;
+}
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ Elf32_Addr *const reloc_addr)
+{
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a; make the
+ reference weak so static programs can still link. This declaration
+ cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
+ because rtld.c contains the common defn for _dl_rtld_map, which is
+ incompatible with a weak decl in the same file. */
+ weak_extern (_dl_rtld_map);
+#endif
+
+ if (ELF32_R_TYPE (reloc->r_info) == R_CRIS_RELATIVE)
+ {
+#ifndef RTLD_BOOTSTRAP
+ if (map != &_dl_rtld_map) /* Already done in rtld itself. */
+#endif
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ }
+ else
+ {
+#ifndef RTLD_BOOTSTRAP
+ const Elf32_Sym *const refsym = sym;
+#endif
+ Elf32_Addr value;
+ if (sym->st_shndx != SHN_UNDEF &&
+ ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
+ value = map->l_addr;
+ else
+ {
+ value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ if (sym)
+ value += sym->st_value;
+ }
+ value += reloc->r_addend; /* Assume copy relocs have zero addend. */
+
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+#ifndef RTLD_BOOTSTRAP
+ case R_CRIS_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (sym->st_size > refsym->st_size
+ || (_dl_verbose && sym->st_size < refsym->st_size))
+ {
+ extern char **_dl_argv;
+ const char *strtab;
+
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_argv[0] ?: "<program name unknown>",
+ strtab + refsym->st_name);
+ }
+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
+ refsym->st_size));
+ break;
+
+ case R_CRIS_32:
+#endif
+ case R_CRIS_GLOB_DAT:
+ case R_CRIS_JUMP_SLOT:
+ *reloc_addr = value;
+ break;
+#ifndef RTLD_BOOTSTRAP
+ case R_CRIS_8:
+ *(char *) reloc_addr = value;
+ break;
+ case R_CRIS_16:
+ *(short *) reloc_addr = value;
+ break;
+ case R_CRIS_8_PCREL:
+ *(char *) reloc_addr
+ = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 1;
+ break;
+ case R_CRIS_16_PCREL:
+ *(short *) reloc_addr
+ = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 2;
+ break;
+ case R_CRIS_32_PCREL:
+ *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr - 4;
+ break;
+#endif
+ case R_CRIS_NONE:
+ break;
+#if !defined RTLD_BOOTSTRAP || defined _NDEBUG
+ default:
+ _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
+ break;
+#endif
+ }
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map,
+ Elf32_Addr l_addr, const Elf32_Rela *reloc)
+{
+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+ if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_CRIS_JUMP_SLOT)
+ == R_CRIS_JUMP_SLOT)
+ *reloc_addr += l_addr;
+ else
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
+}
+
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=233922db0fc8e4a94f0ac1f1a42e7ac1c4e3d80a
commit 233922db0fc8e4a94f0ac1f1a42e7ac1c4e3d80a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:21:27 2001 +0000
<string.h> optimizations for CRIS.
diff --git a/sysdeps/cris/bits/string.h b/sysdeps/cris/bits/string.h
new file mode 100644
index 0000000..9e4e6d5
--- /dev/null
+++ b/sysdeps/cris/bits/string.h
@@ -0,0 +1,26 @@
+/* Optimized, inlined string functions. CRIS version.
+ Copyright (C) 1997, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _STRING_H
+# error "Never use <bits/string.h> directly; include <string.h> instead."
+#endif
+
+/* Currently the only purpose of this file is to tell the generic inline
+ macros that unaligned memory access is possible. */
+#define _STRING_ARCH_unaligned 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f6b2125412077be1d7f897b512d0d2237c99c05
commit 0f6b2125412077be1d7f897b512d0d2237c99c05
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:21:13 2001 +0000
<stejmp.h> definitions for CRIS.
diff --git a/sysdeps/cris/bits/setjmp.h b/sysdeps/cris/bits/setjmp.h
new file mode 100644
index 0000000..9b0b2a1
--- /dev/null
+++ b/sysdeps/cris/bits/setjmp.h
@@ -0,0 +1,54 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Define the machine-dependent type `jmp_buf', CRIS version. */
+
+/* Note that saving and restoring CCR has no meaning in user mode, so we
+ don't actually do it; the slot is now reserved.
+
+ jmp_buf[0] - PC
+ jmp_buf[1] - SP (R14)
+ jmp_buf[2] - R13
+ jmp_buf[3] - R12
+ jmp_buf[4] - R11
+ jmp_buf[5] - R10
+ jmp_buf[6] - R9
+ jmp_buf[7] - R8
+ jmp_buf[8] - R7
+ jmp_buf[9] - R6
+ jmp_buf[10] - R5
+ jmp_buf[11] - R4
+ jmp_buf[12] - R3
+ jmp_buf[13] - R2
+ jmp_buf[14] - R1
+ jmp_buf[15] - R0
+ jmp_buf[16] - SRP
+ jmp_buf[17] - CCR */
+
+#ifndef _ASM
+typedef unsigned long int __jmp_buf[18];
+#endif
+
+#if defined (__USE_MISC) || defined (_ASM)
+#define JB_SP 1
+#endif
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((unsigned long int) (address) < (jmpbuf)[JB_SP])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=469020c10b466748519942f47370e1f7d482f5d7
commit 469020c10b466748519942f47370e1f7d482f5d7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:20:57 2001 +0000
<endian.h> definitions for CRIS.
diff --git a/sysdeps/cris/bits/endian.h b/sysdeps/cris/bits/endian.h
new file mode 100644
index 0000000..034307e
--- /dev/null
+++ b/sysdeps/cris/bits/endian.h
@@ -0,0 +1,7 @@
+/* CRIS is little-endian. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83f091042ecc9b6e50898a21a85c66d60a711a72
commit 83f091042ecc9b6e50898a21a85c66d60a711a72
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:20:23 2001 +0000
_mcount implementation for CRIS.
diff --git a/sysdeps/cris/_mcount.S b/sysdeps/cris/_mcount.S
new file mode 100644
index 0000000..d6e5f74
--- /dev/null
+++ b/sysdeps/cris/_mcount.S
@@ -0,0 +1,36 @@
+/* Machine-specific calling sequence for `mcount' profiling function for CRIS.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* FIXME: This isn't implemented yet. This is just a machine-specific
+ stub. Perhaps a real implementation can make use of it. */
+
+#include <sysdep.h>
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT
+
+ENTRY (_mcount)
+ SETUP_PIC
+ /* Sorry, isn't implemented yet.
+ Can't call abort; that will recurse. Force SEGV instead. */
+ test.d [99]
+1:
+ ba 1b
+ nop
+END (_mcount)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=848b98a109011eaad607dd705cf469da650d96d7
commit 848b98a109011eaad607dd705cf469da650d96d7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:20:03 2001 +0000
__longjmp implementation for CRIS.
diff --git a/sysdeps/cris/__longjmp.S b/sysdeps/cris/__longjmp.S
new file mode 100644
index 0000000..a6188d0
--- /dev/null
+++ b/sysdeps/cris/__longjmp.S
@@ -0,0 +1,38 @@
+/* longjmp for CRIS.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+ .syntax no_register_prefix
+
+/* Saving and restoring CCR is meaningless, so we don't do it. */
+ENTRY (__longjmp)
+ /* Note that r10 = jmp_buf, r11 = retval. */
+ move [r10+16*4],srp
+ test.d r11
+ beq 0f /* Already a 1 in place. */
+ nop
+ /* Offset for r9, the return value (see setjmp). */
+ move.d r11,[r10+6*4]
+0:
+ movem [r10],pc
+END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=291195e9a86765a225dfe1227488a2199ee27663
commit 291195e9a86765a225dfe1227488a2199ee27663
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:19:49 2001 +0000
Additional make rules for CRIS.
diff --git a/sysdeps/cris/Makefile b/sysdeps/cris/Makefile
new file mode 100644
index 0000000..3df21b9
--- /dev/null
+++ b/sysdeps/cris/Makefile
@@ -0,0 +1,44 @@
+# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# We don't support long doubles as a distinct type. We don't need to set
+# this variable; it's here mostly for documentational purposes.
+
+long-double-fcts = no
+
+# FIXME: Note that this is a machine-specific stub; profiling is not
+# implemented.
+ifeq ($(subdir),gmon)
+sysdep_routines += _mcount
+endif
+
+# FIXME: This test seems generally bogus. Wrong types in function calls
+# and assumes FE_TONEAREST is defined. Does it work somewhere?
+# Presumably it does, so let's settle for filtering it out target-wise
+# until it's agreed what should be done.
+ifeq ($(subdir),math)
+tests := $(filter-out test-fenv, $(tests))
+endif
+
+# PIC code must be assembled with special options, passed on by gcc when
+# given the -fpic option.
+ASFLAGS-.os = -fpic
+
+# Overflow occurs at 2**15/4 (8192) symbols. Glibc uses about 2000.
+# So use -fpic: smaller-size relocs; smaller, faster code.
+pic-ccflag = -fpic
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=675fffd21d1f38dd329d32aef99a4cd434b3cf49
commit 675fffd21d1f38dd329d32aef99a4cd434b3cf49
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:19:20 2001 +0000
Other implied directories to use.
diff --git a/sysdeps/cris/Implies b/sysdeps/cris/Implies
new file mode 100644
index 0000000..780c4e2
--- /dev/null
+++ b/sysdeps/cris/Implies
@@ -0,0 +1,3 @@
+wordsize-32
+ieee754/flt-32
+ieee754/dbl-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35fee9f0dd8799206f9c340562dd16e03fc11818
commit 35fee9f0dd8799206f9c340562dd16e03fc11818
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 10 00:18:50 2001 +0000
Extra files to distribute for CRIS.
diff --git a/sysdeps/cris/Dist b/sysdeps/cris/Dist
new file mode 100644
index 0000000..cf1ffb6
--- /dev/null
+++ b/sysdeps/cris/Dist
@@ -0,0 +1 @@
+_mcount.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe4dd66ed7ec515ab6c633c38d1f4a2e7b156340
commit fe4dd66ed7ec515ab6c633c38d1f4a2e7b156340
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 05:08:36 2001 +0000
setresuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setresuid.c b/sysdeps/unix/sysv/linux/cris/setresuid.c
new file mode 100644
index 0000000..3aeabe9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51610bc7b3a1fce88cc618d80fd3fc9c34842c8f
commit 51610bc7b3a1fce88cc618d80fd3fc9c34842c8f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 05:08:17 2001 +0000
setresgid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setresgid.c b/sysdeps/unix/sysv/linux/cris/setresgid.c
new file mode 100644
index 0000000..daca1a4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12d6ab7b1038a3b6db58b436b5d6de8b1bcf19ee
commit 12d6ab7b1038a3b6db58b436b5d6de8b1bcf19ee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:51:09 2001 +0000
__xstat implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/xstat.c b/sysdeps/unix/sysv/linux/cris/xstat.c
new file mode 100644
index 0000000..e9869f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/xstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/xstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b13de4a8b7e976124b6cff35f698ef5b9ad33456
commit b13de4a8b7e976124b6cff35f698ef5b9ad33456
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:50:57 2001 +0000
vfork implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/vfork.S b/sysdeps/unix/sysv/linux/cris/vfork.S
new file mode 100644
index 0000000..bb4072f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/vfork.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__vfork, vfork, 0)
+ Ret
+ nop
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2e42b7134c05d4354257d9eddbc928e26415b83
commit c2e42b7134c05d4354257d9eddbc928e26415b83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:50:44 2001 +0000
System specific code for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.S b/sysdeps/unix/sysv/linux/cris/sysdep.S
new file mode 100644
index 0000000..4a108db
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.S
@@ -0,0 +1,74 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* Make space for the errno variable. */
+
+ .globl C_SYMBOL_NAME(errno)
+ .type C_SYMBOL_NAME(errno),@object
+ .lcomm C_SYMBOL_NAME(errno),4
+
+weak_alias (errno, _errno)
+
+/* The syscall stubs jump here when they detect an error, bot for PIC and
+ non-PIC. */
+
+ .syntax no_register_prefix
+
+ENTRY (__syscall_error)
+ neg.d r10,r10
+
+#ifdef _LIBC_REENTRANT
+ push r10
+ push srp
+
+ /* Note that __syscall_error is only visible within this library,
+ and no-one passes it on as a pointer, so can assume that R0 (GOT
+ pointer) is correctly set up. */
+ PLTCALL (__errno_location)
+
+ pop srp
+ pop r11
+ move.d r11,[r10]
+
+#else /* not _LIBC_REENTRANT */
+# ifdef __PIC__
+ move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9
+ move.d r10,[r9]
+# else
+ move.d r10,[C_SYMBOL_NAME(errno)]
+# endif
+#endif /* _LIBC_REENTRANT */
+
+#ifdef __PIC__
+/* PIC callers are supposed to have R0 on stack, ready for us to restore.
+ Callers are only allowed from within this DSO, so the GOT in r0 is the
+ one we want to use.
+
+ (Don't use "ret" - it's a macro). */
+
+ moveq -1,r10
+ Ret
+ pop r0
+#else
+ Ret
+ moveq -1,r10
+#endif
+
+END (__syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a2c5e2b43a15c16f13e59d1073267537e19da971
commit a2c5e2b43a15c16f13e59d1073267537e19da971
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:50:27 2001 +0000
System specific definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/sysdep.h b/sysdeps/unix/sysv/linux/cris/sysdep.h
new file mode 100644
index 0000000..d388665
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/sysdep.h
@@ -0,0 +1,214 @@
+/* Assembler macros for CRIS.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <asm/unistd.h>
+#include <sysdeps/cris/sysdep.h>
+#include <sys/syscall.h>
+#include "config.h"
+
+#undef SYS_ify
+#define SYS_ify(syscall_name) (__NR_##syscall_name)
+
+
+#ifdef __ASSEMBLER__
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#define SYS_ify(syscall_name) __NR_##syscall_name
+
+/* ELF-like local names start with `.L'. */
+#undef L
+#define L(name) .L##name
+
+/* Linux uses a negative return value to indicate syscall errors,
+ unlike most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be
+ negative even if the call succeeded. E.g., the `lseek' system call
+ might return a large offset. Therefore we must not anymore test
+ for < 0, but test for a real error by making sure the value in %eax
+ is a real error number. Linus said he will make sure the no syscall
+ returns a value in -1 .. -4095 as a valid result so we can safely
+ test with -4095. */
+
+/* Syscall wrappers consist of
+ #include <sysdep.h>
+ PSEUDO (...)
+ ret
+ PSEUDO_END (...)
+
+ which expand to the following. */
+
+/* Linux takes system call arguments in registers:
+ syscall number R9
+ arg 1 R10
+ arg 2 R11
+ arg 3 R12
+ arg 4 R13
+ arg 5 MOF
+ arg 6 SRP
+
+ The compiler calls us by the C convention:
+ syscall number in the DO_CALL macro
+ arg 1 R10
+ arg 2 R11
+ arg 3 R12
+ arg 4 R13
+ arg 5 [SP]
+ arg 6 [SP + 4]
+ */
+
+/* Note that we use "bhs", since we want to match
+ (unsigned) -4096 .. 0xffffffff. Using "ble" would match
+ -4096 .. -2**31. */
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) @ \
+ DOARGS_##args @ \
+ movu.w SYS_ify (syscall_name),$r9 @ \
+ break 13 @ \
+ cmps.w -4096,$r10 @ \
+ bhs 0f @ \
+ nop @ \
+ UNDOARGS_return_##args
+
+/* Ouch! We have to remember not to use "ret" in assembly-code.
+ ("Luckily", mnemonics are case-insensitive.)
+ Note that we assume usage is exactly:
+ PSEUDO (...)
+ ret
+ PSEUDO_END (...)
+ so we can put all payload into PSEUDO (except for error handling). */
+
+#define ret
+
+#define PSEUDO_END(name) \
+0: @ \
+ SETUP_PIC @ \
+ PLTJUMP (syscall_error) @ \
+ END (name)
+
+#define DOARGS_0
+#define DOARGS_1
+#define DOARGS_2
+#define DOARGS_3
+#define DOARGS_4
+#define DOARGS_5 \
+ move [$sp],$mof
+
+/* To avoid allocating stack-space, we re-use the arg 5 (MOF) entry by
+ storing SRP into it. If called with too-few arguments, we will crash,
+ but that will happen in the general case too. */
+#define DOARGS_6 \
+ DOARGS_5 @ \
+ move $srp,[$sp] @ \
+ move [$sp+4],$srp
+
+#define UNDOARGS_return_0 \
+ Ret @ \
+ nop
+
+#define UNDOARGS_return_1 UNDOARGS_return_0
+#define UNDOARGS_return_2 UNDOARGS_return_0
+#define UNDOARGS_return_3 UNDOARGS_return_0
+#define UNDOARGS_return_4 UNDOARGS_return_0
+#define UNDOARGS_return_5 UNDOARGS_return_0
+
+/* We assume the following code will be "ret" and "PSEUDO_END". */
+#define UNDOARGS_return_return_6 \
+ jump [$sp]
+
+#else /* not __ASSEMBLER__ */
+
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ \
+ unsigned long __sys_res; \
+ register unsigned long __res asm ("r10"); \
+ LOAD_ARGS_c_##nr (args) \
+ register unsigned long __callno asm ("r9") \
+ = SYS_ify (name); \
+ asm volatile (LOAD_ARGS_asm_##nr (args) \
+ "break 13" \
+ : "=r" (__res) \
+ : ASM_ARGS_##nr (args) \
+ : ASM_CLOBBER_##nr); \
+ __sys_res = __res; \
+ \
+ if (__sys_res >= (unsigned long) -4096) \
+ { \
+ __set_errno (- __sys_res); \
+ __sys_res = (unsigned long) -1; \
+ } \
+ __sys_res; \
+ })
+
+#define LOAD_ARGS_c_0()
+#define LOAD_ARGS_asm_0()
+#define ASM_CLOBBER_0 "memory"
+#define ASM_ARGS_0() "r" (__callno)
+
+#define LOAD_ARGS_c_1(r10) \
+ LOAD_ARGS_c_0() \
+ register unsigned long __r10 __asm__ ("r10") = (unsigned long) (r10);
+#define LOAD_ARGS_asm_1(r10) LOAD_ARGS_asm_0 ()
+#define ASM_CLOBBER_1 ASM_CLOBBER_0
+#define ASM_ARGS_1(r10) ASM_ARGS_0 (), "0" (__r10)
+
+#define LOAD_ARGS_c_2(r10, r11) \
+ LOAD_ARGS_c_1(r10) \
+ register unsigned long __r11 __asm__ ("r11") = (unsigned long) (r11);
+#define LOAD_ARGS_asm_2(r10, r11) LOAD_ARGS_asm_1 (r10)
+#define ASM_CLOBBER_2 ASM_CLOBBER_1
+#define ASM_ARGS_2(r10, r11) ASM_ARGS_1 (r10), "r" (__r11)
+
+#define LOAD_ARGS_c_3(r10, r11, r12) \
+ LOAD_ARGS_c_2(r10, r11) \
+ register unsigned long __r12 __asm__ ("r12") = (unsigned long) (r12);
+#define LOAD_ARGS_asm_3(r10, r11, r12) LOAD_ARGS_asm_2 (r10, r11)
+#define ASM_CLOBBER_3 ASM_CLOBBER_2
+#define ASM_ARGS_3(r10, r11, r12) ASM_ARGS_2 (r10, r11), "r" (__r12)
+
+#define LOAD_ARGS_c_4(r10, r11, r12, r13) \
+ LOAD_ARGS_c_3(r10, r11, r12) \
+ register unsigned long __r13 __asm__ ("r13") = (unsigned long) (r13);
+#define LOAD_ARGS_asm_4(r10, r11, r12, r13) LOAD_ARGS_asm_3 (r10, r11, r12)
+#define ASM_CLOBBER_4 ASM_CLOBBER_3
+#define ASM_ARGS_4(r10, r11, r12, r13) ASM_ARGS_3 (r10, r11, r12), "r" (__r13)
+
+#define LOAD_ARGS_c_5(r10, r11, r12, r13, mof) \
+ LOAD_ARGS_c_4(r10, r11, r12, r13)
+#define LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \
+ LOAD_ARGS_asm_4 (r10, r11, r12, r13) "move %5,$mof\n\t"
+#define ASM_CLOBBER_5 ASM_CLOBBER_4
+#define ASM_ARGS_5(r10, r11, r12, r13, mof) \
+ ASM_ARGS_4 (r10, r11, r12, r13), "g" (mof)
+
+#define LOAD_ARGS_c_6(r10, r11, r12, r13, mof, srp) \
+ LOAD_ARGS_c_5(r10, r11, r12, r13, mof)
+#define LOAD_ARGS_asm_6(r10, r11, r12, r13, mof, srp) \
+ LOAD_ARGS_asm_5(r10, r11, r12, r13, mof) \
+ "move %6,$srp\n\t"
+#define ASM_CLOBBER_6 ASM_CLOBBER_5, "srp"
+#define ASM_ARGS_6(r10, r11, r12, r13, mof, srp) \
+ ASM_ARGS_5 (r10, r11, r12, r13, mof), "g" (srp)
+
+#endif /* not __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8e66742e2d999bf479600421dcb74deb0e06d22
commit c8e66742e2d999bf479600421dcb74deb0e06d22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:50:08 2001 +0000
syscall implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/syscall.S b/sysdeps/unix/sysv/linux/cris/syscall.S
new file mode 100644
index 0000000..eb5cdcc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/syscall.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .syntax no_register_prefix
+
+/* Make syscall (callno, ...) into a system call. */
+
+ENTRY (syscall)
+ move.d r10,r9
+ move.d r11,r10
+ move.d r12,r11
+ move.d r13,r12
+ move.d [sp],r13
+ move srp,[sp]
+ move [sp+4],mof
+ move [sp+8],srp
+ break 13
+ cmps.w -4096,r10
+ bhs 0f
+ move [sp],srp
+ Ret
+ nop
+PSEUDO_END (syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b660421d48ee0e1a2eafc8e9a52ef1e035f50b40
commit b660421d48ee0e1a2eafc8e9a52ef1e035f50b40
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:49:56 2001 +0000
ucontext definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/sys/ucontext.h b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
new file mode 100644
index 0000000..fe4dc7b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+#include <bits/sigcontext.h>
+
+
+/* Type for general register. */
+typedef long int greg_t;
+
+/* Number of general registers. */
+#define NGREG 20
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* A placeholder type for floating-point register. */
+typedef long int fpreg_t;
+
+/* A placeholder; CRIS does not have any fp regs. */
+typedef unsigned long fpregset_t;
+
+/* A machine context is exactly a sigcontext. */
+typedef struct sigcontext mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22ebc6a15fc569daaadc0eed42cd097120177ff8
commit 22ebc6a15fc569daaadc0eed42cd097120177ff8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:49:41 2001 +0000
socket implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/socket.S b/sysdeps/unix/sysv/linux/cris/socket.S
new file mode 100644
index 0000000..06832ec
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/socket.S
@@ -0,0 +1,96 @@
+/* Copyright (C) 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include <socketcall.h>
+
+#define P(a, b) P2(a, b)
+#define P2(a, b) a##b
+
+/* The socket-oriented system calls are handled unusally in Linux.
+ They are all gated through the single `socketcall' system call number.
+ `socketcall' takes two arguments: the first is the subcode, specifying
+ which socket function is being called; and the second is a pointer to
+ the arguments to the specific function.
+
+ The .S files for the other calls just #define socket and #include this.
+ They also #define a 'number-of-arguments' word in NARGS, which
+ defaults to 3. */
+
+#ifndef NARGS
+#ifdef socket
+#error NARGS not defined
+#endif
+#define NARGS 3
+#endif
+
+ .syntax no_register_prefix
+
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+ENTRY(__socket)
+ subq NARGS*4,sp
+
+#if NARGS >= 2
+ move.d sp,r9
+ move.d r10,[r9+]
+#else
+ move.d r10,[sp]
+#endif
+#if NARGS >= 2
+ move.d r11,[r9+]
+#endif
+#if NARGS >= 3
+ move.d r12,[r9+]
+#endif
+#if NARGS >= 4
+ move.d r13,[r9+]
+#endif
+#if NARGS >= 5
+ move.d [sp+NARGS*4],r13
+ move.d r13,[r9+]
+#endif
+#if NARGS >= 6
+ move.d [sp+NARGS*4+4],r13
+ move.d r13,[r9+]
+#endif
+#if NARGS >= 7
+ move.d [sp+NARGS*4+8],r13
+ move.d r13,[r9+]
+#endif
+#if NARGS >= 8
+ move.d [sp+NARGS*4+12],r13
+ move.d r13,[r9+]
+#endif
+#if NARGS >= 9
+#error Too many arguments!
+#endif
+ moveq P(SOCKOP_,socket),r10
+ move.d sp,r11
+ movu.w SYS_ify(socketcall),r9
+ break 13
+ cmps.w -4096,r10
+ bhs 0f
+ addq NARGS*4,sp
+ Ret
+ nop
+PSEUDO_END (__socket)
+
+weak_alias (__socket, socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25a87ddfb0b6090cc79b5ff3cbd4bdbb49a6cb97
commit 25a87ddfb0b6090cc79b5ff3cbd4bdbb49a6cb97
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:49:25 2001 +0000
shmctl implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/shmctl.c b/sysdeps/unix/sysv/linux/cris/shmctl.c
new file mode 100644
index 0000000..7eac638
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/shmctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/shmctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1157fe0248ac6c94a64b34fcfc151126b8a9283f
commit 1157fe0248ac6c94a64b34fcfc151126b8a9283f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:49:10 2001 +0000
setuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setuid.c b/sysdeps/unix/sysv/linux/cris/setuid.c
new file mode 100644
index 0000000..de39437
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6aa3792be5ebe1e7bd22b1f79b2a167d33fa504
commit a6aa3792be5ebe1e7bd22b1f79b2a167d33fa504
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:48:56 2001 +0000
setrlimit implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setrlimit.c b/sysdeps/unix/sysv/linux/cris/setrlimit.c
new file mode 100644
index 0000000..bfaef74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=382b7b89952db88ca94fd386aa1c9526d6a80074
commit 382b7b89952db88ca94fd386aa1c9526d6a80074
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:48:41 2001 +0000
setreuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setreuid.c b/sysdeps/unix/sysv/linux/cris/setreuid.c
new file mode 100644
index 0000000..8ad6122
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setreuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c8b7016a86446012aeeb77efd7f62e3a0ee8a50
commit 4c8b7016a86446012aeeb77efd7f62e3a0ee8a50
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:48:27 2001 +0000
setregid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setregid.c b/sysdeps/unix/sysv/linux/cris/setregid.c
new file mode 100644
index 0000000..99c57ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setregid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f79e192ba634b184d41ba7ce02ae76d578026146
commit f79e192ba634b184d41ba7ce02ae76d578026146
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:48:09 2001 +0000
setgroups implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setgroups.c b/sysdeps/unix/sysv/linux/cris/setgroups.c
new file mode 100644
index 0000000..0e70862
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/setgroups.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1cb46ec7a3cf832739168c86f2fb8d15f9a0af2
commit e1cb46ec7a3cf832739168c86f2fb8d15f9a0af2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:47:52 2001 +0000
setgid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setgid.c b/sysdeps/unix/sysv/linux/cris/setgid.c
new file mode 100644
index 0000000..377021d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75938458d77e7d246388f4d068057d46823163d8
commit 75938458d77e7d246388f4d068057d46823163d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:47:29 2001 +0000
setfsuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setfsuid.c b/sysdeps/unix/sysv/linux/cris/setfsuid.c
new file mode 100644
index 0000000..a9f22eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setfsuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70f5c90d37afde4814b0f0d26dc1c4a1b07697db
commit 70f5c90d37afde4814b0f0d26dc1c4a1b07697db
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:47:13 2001 +0000
setfsgid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setfsgid.c b/sysdeps/unix/sysv/linux/cris/setfsgid.c
new file mode 100644
index 0000000..0886712
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setfsgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abf44d012840ab5cce08c7d763b6146eabb5b07f
commit abf44d012840ab5cce08c7d763b6146eabb5b07f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:46:45 2001 +0000
seteuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/seteuid.c b/sysdeps/unix/sysv/linux/cris/seteuid.c
new file mode 100644
index 0000000..18e41d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/seteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/seteuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b074d424bd3f4e41230aa4e4e10624de40bf323a
commit b074d424bd3f4e41230aa4e4e10624de40bf323a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:46:28 2001 +0000
setegid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/setegid.c b/sysdeps/unix/sysv/linux/cris/setegid.c
new file mode 100644
index 0000000..2e3a54c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/setegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setegid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f63b7c8b197006e847f5dbfaf1eadaa01065ea36
commit f63b7c8b197006e847f5dbfaf1eadaa01065ea36
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:46:05 2001 +0000
semctl implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/semctl.c b/sysdeps/unix/sysv/linux/cris/semctl.c
new file mode 100644
index 0000000..e9b1a48
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/semctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/semctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0cfe451872bc8c5aa67c421d0f8bc8ece3a936ae
commit 0cfe451872bc8c5aa67c421d0f8bc8ece3a936ae
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:45:39 2001 +0000
Register dump code for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/register-dump.h b/sysdeps/unix/sysv/linux/cris/register-dump.h
new file mode 100644
index 0000000..e8a52f7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/register-dump.h
@@ -0,0 +1,117 @@
+/* Dump registers.
+ Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <sys/uio.h>
+#include <stdio-common/_itoa.h>
+
+/* We will print the register dump in this format:
+
+ R0: XXXXXXXX R1: XXXXXXXX R2: XXXXXXXX R3: XXXXXXXX
+ R4: XXXXXXXX R5: XXXXXXXX R6: XXXXXXXX R7: XXXXXXXX
+ R8: XXXXXXXX R9: XXXXXXXX R10: XXXXXXXX R11: XXXXXXXX
+ R12: XXXXXXXX R13: XXXXXXXX SP: XXXXXXXX PC: XXXXXXXX
+DCCR: XXXXXXXX SRP: XXXXXXXX */
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+ char *cp = _itoa_word (value, buf + len, 16, 0);
+ while (cp > buf)
+ *--cp = '0';
+}
+
+static void register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[18][8];
+ struct iovec iov[36], *next_iov = iov;
+ struct pt_regs *rx = &ctx->regs;
+
+#define ADD_STRING(str) \
+ next_iov->iov_base = (char *) (str); \
+ next_iov->iov_len = strlen (str); \
+ ++next_iov
+#define ADD_MEM(str, len) \
+ next_iov->iov_base = (str); \
+ next_iov->iov_len = (len); \
+ ++next_iov
+
+ /* Generate strings of register contents. */
+ hexvalue (rx->r0, regs[0], 8);
+ hexvalue (rx->r1, regs[1], 8);
+ hexvalue (rx->r2, regs[2], 8);
+ hexvalue (rx->r3, regs[3], 8);
+ hexvalue (rx->r4, regs[4], 8);
+ hexvalue (rx->r5, regs[5], 8);
+ hexvalue (rx->r6, regs[6], 8);
+ hexvalue (rx->r7, regs[7], 8);
+ hexvalue (rx->r8, regs[8], 8);
+ hexvalue (rx->r9, regs[9], 8);
+ hexvalue (rx->r10, regs[10], 8);
+ hexvalue (rx->r11, regs[11], 8);
+ hexvalue (rx->r12, regs[12], 8);
+ hexvalue (rx->r13, regs[13], 8);
+ hexvalue (ctx->usp, regs[14], 8);
+ hexvalue (rx->irp, regs[17], 8);
+ hexvalue (rx->dccr, regs[15], 8);
+ hexvalue (rx->srp, regs[16], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\n R0: ");
+ ADD_MEM (regs[0], 8);
+ ADD_STRING (" R1: ");
+ ADD_MEM (regs[1], 8);
+ ADD_STRING (" R2: ");
+ ADD_MEM (regs[2], 8);
+ ADD_STRING (" R3: ");
+ ADD_MEM (regs[3], 8);
+ ADD_STRING ("\n R4: ");
+ ADD_MEM (regs[4], 8);
+ ADD_STRING (" R5: ");
+ ADD_MEM (regs[5], 8);
+ ADD_STRING (" R6: ");
+ ADD_MEM (regs[6], 8);
+ ADD_STRING (" R7: ");
+ ADD_MEM (regs[7], 8);
+ ADD_STRING ("\n R8: ");
+ ADD_MEM (regs[8], 8);
+ ADD_STRING (" R9: ");
+ ADD_MEM (regs[9], 8);
+ ADD_STRING (" R10: ");
+ ADD_MEM (regs[10], 8);
+ ADD_STRING (" R11: ");
+ ADD_MEM (regs[11], 8);
+ ADD_STRING ("\n R12: ");
+ ADD_MEM (regs[12], 8);
+ ADD_STRING (" R13: ");
+ ADD_MEM (regs[13], 8);
+ ADD_STRING (" SP: ");
+ ADD_MEM (regs[14], 8);
+ ADD_STRING (" PC: ");
+ ADD_MEM (regs[17], 8);
+ ADD_STRING ("\nDCCR: ");
+ ADD_MEM (regs[15], 8);
+ ADD_STRING (" SRP: ");
+ ADD_MEM (regs[16], 4);
+
+ /* Write the stuff out. */
+ writev (fd, iov, next_iov - iov);
+}
+
+#define REGISTER_DUMP register_dump (fd, ctx)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efe7db140e5f055d63fb894750befc02ea0eceba
commit efe7db140e5f055d63fb894750befc02ea0eceba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:45:23 2001 +0000
Profile helper definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/profil-counter.h b/sysdeps/unix/sysv/linux/cris/profil-counter.h
new file mode 100644
index 0000000..8bbce54
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/profil-counter.h
@@ -0,0 +1,26 @@
+/* Low-level statistical profiling support function. Linux/CRIS version.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <signal.h>
+
+static void
+profil_counter (int signo, struct sigcontext *scp)
+{
+ profil_count ((void *) scp->regs.irp);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f41227c00aa842f5f93376455fe515bb13fb00b
commit 6f41227c00aa842f5f93376455fe515bb13fb00b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:45:00 2001 +0000
msgctl implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/msgctl.c b/sysdeps/unix/sysv/linux/cris/msgctl.c
new file mode 100644
index 0000000..9f9b843
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/msgctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/msgctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83fcbc9f9c570a419e3cc4f9de87e2666e76b70a
commit 83fcbc9f9c570a419e3cc4f9de87e2666e76b70a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:44:45 2001 +0000
mmap64 implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/mmap64.S b/sysdeps/unix/sysv/linux/cris/mmap64.S
new file mode 100644
index 0000000..acf6ca3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/mmap64.S
@@ -0,0 +1,91 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+#include "kernel-features.h"
+
+#include <asm/errno.h>
+
+/* Rather than dragging in yet another kernel file, <asm/page.h>, we
+ define it here. Provide for easy override. */
+#ifndef PAGE_SHIFT
+#define PAGE_SHIFT 13
+#endif
+
+/* This is: __ptr_t
+ __mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
+ off64_t offset); */
+
+/* This was done in C, but the resulting code didn't look anywhere near
+ nice, and mmap64 is important enough to have fast code. Rather than
+ fixing (the generic bits in) gcc, we make sure not to depend on it by
+ writing code that GCC cannot reasonably generate. */
+
+ .syntax no_register_prefix
+
+ENTRY (__mmap64)
+
+ move [sp],mof
+ move.d [sp+4],r9
+
+ /* Only accept an offset being a multiple of PAGE_SIZE, ditto address. */
+ btstq (PAGE_SHIFT - 1),r9
+ bne 1f
+ lsrq PAGE_SHIFT,r9
+
+ btstq (PAGE_SHIFT - 1),r10
+ bne 1f
+ move.d r9,[sp]
+
+ /* We have to store the adjusted part somewhere we can "or" from.
+ No registers available, so let's re-use the incoming low-part
+ parameter location. */
+ move.d [sp+8],r9
+
+ swapwbr r9
+ /* Check if the highest bits (now the lowest bits) are zero. They
+ must be, since we're actually calling a system function
+ specifying the size in *pages* in a single dword. Thus you can
+ mmap64 PAGE_SIZE * 4 Gbyte. */
+ btstq (PAGE_SHIFT - 1),r9
+ bne 1f
+ swapwbr r9
+
+ lslq (32 - PAGE_SHIFT),r9
+ or.d [sp],r9
+ move srp,[sp]
+ move r9,srp
+
+ movu.b SYS_ify (mmap2),r9
+ break 13
+
+ cmps.w -4096,r10
+ bhs 0f
+ move [sp],srp
+
+ Ret
+ nop
+
+/* Local error handler. */
+1:
+ movs.w -EINVAL,r10
+ /* Drop through into the ordinary error handler. */
+PSEUDO_END (__mmap64)
+
+weak_alias (__mmap64, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e9050b191fcf985d72c825ca0251e570c2745d6
commit 1e9050b191fcf985d72c825ca0251e570c2745d6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:43:42 2001 +0000
mmap implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/mmap.S b/sysdeps/unix/sysv/linux/cris/mmap.S
new file mode 100644
index 0000000..33030f4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/mmap.S
@@ -0,0 +1,68 @@
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+#include "kernel-features.h"
+
+#include <asm/errno.h>
+
+/* Rather than dragging in yet another kernel file, <asm/page.h>, we
+ define it here. Provide for easy override. */
+#ifndef PAGE_SHIFT
+#define PAGE_SHIFT 13
+#endif
+
+ .syntax no_register_prefix
+
+/* This is __ptr_t
+ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) */
+
+ ENTRY (__mmap)
+
+ /* Only accept a offset (and address) being a multiple of PAGE_SIZE,
+ since we only pass the page part in the system call. */
+ move.d [sp+4],r9
+ btstq (PAGE_SHIFT - 1),r9
+ bne 1f
+ btstq (PAGE_SHIFT - 1),r10
+
+ bne 1f
+ lsrq PAGE_SHIFT,r9
+
+ move [sp],mof
+ move srp,[sp]
+ move r9,srp
+
+ movu.b SYS_ify (mmap2),r9
+ break 13
+
+ cmps.w -4096,r10
+ bhs 0f
+ move [sp],srp
+
+ Ret
+ nop
+
+/* Local error handler. */
+1:
+ movs.w -EINVAL,r10
+ /* Drop through into the ordinary error handler. */
+PSEUDO_END (__mmap)
+
+weak_alias (__mmap, mmap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9783a2c16bef1c8f27e6a9d8a44e638418cbe7ca
commit 9783a2c16bef1c8f27e6a9d8a44e638418cbe7ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:43:24 2001 +0000
__lxstat implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/lxstat.c b/sysdeps/unix/sysv/linux/cris/lxstat.c
new file mode 100644
index 0000000..2371cd9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/lxstat.c
@@ -0,0 +1,2 @@
+#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ef01ce34a3d923c0f6a3cf515695fa3e110829d
commit 0ef01ce34a3d923c0f6a3cf515695fa3e110829d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:43:05 2001 +0000
lockf64 implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/lockf64.c b/sysdeps/unix/sysv/linux/cris/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e1229ee3d6b86e02b7c13506db2b0e9a8a1a041
commit 1e1229ee3d6b86e02b7c13506db2b0e9a8a1a041
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:42:48 2001 +0000
lchown implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/lchown.c b/sysdeps/unix/sysv/linux/cris/lchown.c
new file mode 100644
index 0000000..c89de99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/lchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4c00be41b28010c2f11668e406a889affb0fc36
commit d4c00be41b28010c2f11668e406a889affb0fc36
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:36:48 2001 +0000
getuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getuid.c b/sysdeps/unix/sysv/linux/cris/getuid.c
new file mode 100644
index 0000000..d682c79
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7119d5193948d8a9c5461a7f9f381b587d51ea0
commit b7119d5193948d8a9c5461a7f9f381b587d51ea0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:36:29 2001 +0000
getrlimit64 implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit64.c b/sysdeps/unix/sysv/linux/cris/getrlimit64.c
new file mode 100644
index 0000000..fef018f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4fa149869549b96f15ef7099ae0a2ed5dc40e99b
commit 4fa149869549b96f15ef7099ae0a2ed5dc40e99b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:36:16 2001 +0000
getrlimit implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getrlimit.c b/sysdeps/unix/sysv/linux/cris/getrlimit.c
new file mode 100644
index 0000000..fc06dbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca9495b62e0b3fa5d2a3c7ba8621db0517f62646
commit ca9495b62e0b3fa5d2a3c7ba8621db0517f62646
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:35:56 2001 +0000
getresuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getresuid.c b/sysdeps/unix/sysv/linux/cris/getresuid.c
new file mode 100644
index 0000000..0b14cef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7663b23c29d9638a7cb6b33cbc45526579b935cf
commit 7663b23c29d9638a7cb6b33cbc45526579b935cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:35:40 2001 +0000
getresgid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getresgid.c b/sysdeps/unix/sysv/linux/cris/getresgid.c
new file mode 100644
index 0000000..b703a41
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77e0283665150b44e913fe111279f19f44d40678
commit 77e0283665150b44e913fe111279f19f44d40678
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:35:21 2001 +0000
getgroups implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getgroups.c b/sysdeps/unix/sysv/linux/cris/getgroups.c
new file mode 100644
index 0000000..102ea24
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58e6c6c2537d58a152f3cd33f984518fca4cc0c5
commit 58e6c6c2537d58a152f3cd33f984518fca4cc0c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:35:05 2001 +0000
getgid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getgid.c b/sysdeps/unix/sysv/linux/cris/getgid.c
new file mode 100644
index 0000000..0a4d606
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac9292a1344eff6991c5b792650349c510094584
commit ac9292a1344eff6991c5b792650349c510094584
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:34:52 2001 +0000
geteuid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/geteuid.c b/sysdeps/unix/sysv/linux/cris/geteuid.c
new file mode 100644
index 0000000..ebcb555
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/geteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f96ae8fee8eec80c92ffa6c309e16e4c21435cd7
commit f96ae8fee8eec80c92ffa6c309e16e4c21435cd7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:34:34 2001 +0000
getegid implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/getegid.c b/sysdeps/unix/sysv/linux/cris/getegid.c
new file mode 100644
index 0000000..37b4b4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/getegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getegid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49b99835586012375c066280f02c2e576a1c10fe
commit 49b99835586012375c066280f02c2e576a1c10fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:34:09 2001 +0000
__fxstat implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/fxstat.c b/sysdeps/unix/sysv/linux/cris/fxstat.c
new file mode 100644
index 0000000..4f219f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/fxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d00b608d09b0c99942d3336e1fdd9a9e724bb4fb
commit d00b608d09b0c99942d3336e1fdd9a9e724bb4fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:33:52 2001 +0000
fcntl implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/fcntl.c b/sysdeps/unix/sysv/linux/cris/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc778674f387153910d411cc8a4a98afc23a8f4a
commit dc778674f387153910d411cc8a4a98afc23a8f4a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:33:08 2001 +0000
fchown implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/fchown.c b/sysdeps/unix/sysv/linux/cris/fchown.c
new file mode 100644
index 0000000..3a69ecc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/fchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f5e0abce9ce00848de580c799e9dcdb1102fa90
commit 0f5e0abce9ce00848de580c799e9dcdb1102fa90
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:32:55 2001 +0000
clone implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/clone.S b/sysdeps/unix/sysv/linux/cris/clone.S
new file mode 100644
index 0000000..c501c86
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/clone.S
@@ -0,0 +1,88 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+
+ .syntax no_register_prefix
+
+ .text
+ENTRY (__clone)
+ /* Sanity check arguments: No NULL function pointers. Allow a NULL
+ stack pointer though; it makes the kernel allocate stack. */
+ test.d r10
+ beq 1f
+ nop
+
+ /* We need to muck with a few registers. */
+ movem r1,[sp=sp-8]
+
+ /* Save the function pointer and argument. We can't save them
+ onto the new stack since it can be NULL. */
+ move.d r10,r0
+ move.d r13,r1
+
+ /* Move the other arguments into place for the system call. */
+ move.d r11,r10
+ move.d r12,r11
+
+ /* Do the system call. */
+ movu.w SYS_ify (clone),r9
+ break 13
+ test.d r10
+ beq .Lthread_start
+ nop
+
+ /* Jump to error handler if we get (unsigned) -4096 .. 0xffffffff. */
+ cmps.w -4096,r10
+ bhs 0f
+ movem [sp+],r1
+
+ /* In parent, successful return. (Avoid using "ret" - it's a macro.) */
+ Ret
+ nop
+
+.Lthread_start:
+ /* Terminate frame pointers here. */
+ moveq 0,r8
+
+ /* I've told you once. */
+ move.d r1,r10
+ jsr r0
+
+ SETUP_PIC
+ PLTCALL (_exit)
+
+ /* Die horribly. */
+ test.d [6809]
+
+ /* Stop the unstoppable. */
+9:
+ ba 9b
+ nop
+
+/* Local error handler. */
+1:
+ movs.w -EINVAL,r10
+ /* Drop through into the ordinary error handler. */
+PSEUDO_END (__clone)
+
+weak_alias (__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a509b902ed3e6074f37e1067c649ed27de1ab90
commit 2a509b902ed3e6074f37e1067c649ed27de1ab90
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:32:41 2001 +0000
chown implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/chown.c b/sysdeps/unix/sysv/linux/cris/chown.c
new file mode 100644
index 0000000..1961622
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/chown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/m68k/chown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=223bf226827099ff6d9e01dcbb548e829287fa32
commit 223bf226827099ff6d9e01dcbb548e829287fa32
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:32:28 2001 +0000
brk implementation for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/brk.c b/sysdeps/unix/sysv/linux/cris/brk.c
new file mode 100644
index 0000000..32a5145
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/brk.c
@@ -0,0 +1,44 @@
+/* brk system call for Linux/CRIS.
+ Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* This must be initialized data because commons can't have aliases. */
+void *__curbrk = 0;
+
+int
+__brk (void *addr)
+{
+ unsigned char *newbrk;
+
+ newbrk = (unsigned char *) INLINE_SYSCALL (brk, 1, addr);
+
+ __curbrk = newbrk;
+
+ if (newbrk < (unsigned char *) addr)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1eebead7a3bfeec63aae5fc6a26d4f877017164
commit e1eebead7a3bfeec63aae5fc6a26d4f877017164
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:32:15 2001 +0000
<sys/resource.h> definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/bits/resource.h b/sysdeps/unix/sysv/linux/cris/bits/resource.h
new file mode 100644
index 0000000..f7bfe42
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/bits/resource.h
@@ -0,0 +1,209 @@
+/* Bit values & structures for resource limits. Linux/CRIS version.
+ Copyright (C) 1994,1996,1997,1998,1999,2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 7,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit. */
+ RLIMIT_AS = 9,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIMIT_NLIMITS = 11,
+ RLIM_NLIMITS = RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
+#else
+# define RLIM_INFINITY 0xffffffffffffffffuLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=187454c6423985cb0ebf48bd760fbab6a52f34ac
commit 187454c6423985cb0ebf48bd760fbab6a52f34ac
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:31:50 2001 +0000
<sys/mman.h> definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/bits/mman.h b/sysdeps/unix/sysv/linux/cris/bits/mman.h
new file mode 100644
index 0000000..f97e841
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/bits/mman.h
@@ -0,0 +1,93 @@
+/* Definitions for POSIX memory map interface. Linux/CRIS version.
+ Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x2000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2d1cc6e893ef4f449924c7bb1f3201483eaf743
commit d2d1cc6e893ef4f449924c7bb1f3201483eaf743
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:31:35 2001 +0000
<fcntl.h> definitions for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/bits/fcntl.h b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
new file mode 100644
index 0000000..87c6c19
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
@@ -0,0 +1,179 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#ifdef __USE_GNU
+# define O_DIRECT 040000 /* Direct disk access. */
+# define O_DIRECTORY 0200000 /* Must be a directory. */
+# define O_NOFOLLOW 0400000 /* Do not follow links. */
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0100000
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 12 /* Get record locking info. */
+#define F_SETLK64 13 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
+
+#if defined __USE_BSD || defined __USE_XOPEN2K
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
+
+/* For old implementation of bsd flock(). */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation. */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e3938d45f04364f2f97dc3c149441a9149c12b8
commit 2e3938d45f04364f2f97dc3c149441a9149c12b8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:31:15 2001 +0000
libio config for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/_G_config.h b/sysdeps/unix/sysv/linux/cris/_G_config.h
new file mode 100644
index 0000000..42fef4d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/_G_config.h
@@ -0,0 +1,105 @@
+/* This file is needed by libio to define various configuration parameters.
+ These are always the same in the GNU C library. */
+
+/* We have to keep a separate copy for CRIS, because we don't use thunks,
+ and libstdc++-v2 (which we currently use) cares. The C++ ABI is
+ changed totally with GCC 3.0, where we should not need a separate file. */
+
+#ifndef _G_config_h
+#define _G_config_h 1
+
+/* Define types for libio in terms of the standard internal type names. */
+
+#include <bits/types.h>
+#define __need_size_t
+#define __need_wchar_t
+#define __need_wint_t
+#define __need_NULL
+#include <stddef.h>
+#ifndef _WINT_T
+/* Integral type unchanged by default argument promotions that can
+ hold any value corresponding to members of the extended character
+ set, as well as at least one value that does not correspond to any
+ member of the extended character set. */
+# define _WINT_T
+typedef unsigned int wint_t;
+#endif
+#define __need_mbstate_t
+#include <wchar.h>
+#define _G_size_t size_t
+typedef struct
+{
+ __off_t __pos;
+ __mbstate_t __state;
+} _G_fpos_t;
+typedef struct
+{
+ __off64_t __pos;
+ __mbstate_t __state;
+} _G_fpos64_t;
+#define _G_ssize_t __ssize_t
+#define _G_off_t __off_t
+#define _G_off64_t __off64_t
+#define _G_pid_t __pid_t
+#define _G_uid_t __uid_t
+#define _G_wchar_t wchar_t
+#define _G_wint_t wint_t
+#define _G_stat64 stat64
+#include <gconv.h>
+typedef union
+{
+ struct __gconv_info __cd;
+ struct
+ {
+ struct __gconv_info __cd;
+ struct __gconv_step_data __data;
+ } __combined;
+} _G_iconv_t;
+
+typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
+
+#define _G_HAVE_BOOL 1
+
+
+/* These library features are always available in the GNU C library. */
+#define _G_HAVE_ATEXIT 1
+#define _G_HAVE_SYS_CDEFS 1
+#define _G_HAVE_SYS_WAIT 1
+#define _G_NEED_STDARG_H 1
+#define _G_va_list __gnuc_va_list
+
+#define _G_HAVE_PRINTF_FP 1
+#define _G_HAVE_MMAP 1
+#define _G_HAVE_LONG_DOUBLE_IO 1
+#define _G_HAVE_IO_FILE_OPEN 1
+#define _G_HAVE_IO_GETLINE_INFO 1
+
+#define _G_IO_IO_FILE_VERSION 0x20001
+
+#define _G_OPEN64 __open64
+#define _G_LSEEK64 __lseek64
+#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
+
+/* This is defined by <bits/stat.h> if `st_blksize' exists. */
+#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
+
+#define _G_BUFSIZ 8192
+
+/* These are the vtbl details for ELF. */
+#define _G_NAMES_HAVE_UNDERSCORE 0
+#define _G_VTABLE_LABEL_HAS_LENGTH 1
+#undef _G_USING_THUNKS
+#define _G_VTABLE_LABEL_PREFIX "_vt."
+#define _G_VTABLE_LABEL_PREFIX_ID _vt.
+
+
+#if defined __cplusplus || defined __STDC__
+# define _G_ARGS(ARGLIST) ARGLIST
+#else
+# define _G_ARGS(ARGLIST) ()
+#endif
+
+#endif /* _G_config.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58dc8bd3f5c25ec32196c30a84611ad68289e253
commit 58dc8bd3f5c25ec32196c30a84611ad68289e253
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:31:00 2001 +0000
Additional rules for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/Makefile b/sysdeps/unix/sysv/linux/cris/Makefile
new file mode 100644
index 0000000..cebaa94
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/Makefile
@@ -0,0 +1,8 @@
+ifeq ($(subdir),misc)
+sysdep_routines += setfsgid setfsuid setresgid setresuid
+endif
+
+ifeq ($(subdir),signal)
+sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
+ rt_sigqueueinfo rt_sigaction rt_sigpending
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=693ba46706f3d77bcc53bafa5c7013af911f1370
commit 693ba46706f3d77bcc53bafa5c7013af911f1370
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 04:30:48 2001 +0000
Additional files to distribute for Linux/CRIS.
diff --git a/sysdeps/unix/sysv/linux/cris/Dist b/sysdeps/unix/sysv/linux/cris/Dist
new file mode 100644
index 0000000..1b8a7e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cris/Dist
@@ -0,0 +1,5 @@
+clone.S
+setresuid.c
+setresgid.c
+setfsuid.c
+setfsgid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fefb54b6d61afd2970ade60d05a321a740a0b84a
commit fefb54b6d61afd2970ade60d05a321a740a0b84a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 9 03:58:11 2001 +0000
(INLINE_SYSCALL): Fix typo; s/==/=/ for assignment.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 73d9a38..10e360d 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@@ -206,7 +206,7 @@
} \
if (__sys_res >= (unsigned long)-4095) { \
__set_errno(-__sys_res); \
- __sys_res == (unsigned long)-1; \
+ __sys_res = (unsigned long)-1; \
} \
__sys_res; \
})
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b8a08a9d6604a64393e3e14a8f8bed40173be4a
commit 6b8a08a9d6604a64393e3e14a8f8bed40173be4a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 7 23:36:25 2001 +0000
Add a few new files.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index 0482d24..4d0cb14 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -1,7 +1,10 @@
dl-sym.c
dl-open.c
dl-close.c
+dl-libc.c
+dlldr.h
kernel_proto.h
bits/utmpx.h
gnu/lib-names.h
uitrunc.c
+utmpx.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4adec71eab5d67e036233ff2ec8d5edcd13ea713
commit 4adec71eab5d67e036233ff2ec8d5edcd13ea713
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 6 22:37:39 2001 +0000
(GET_NPROCS_PARSER): added code to parse new 2.4 format.
(GET_NPROCS_CONF_PARSER): likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
index 27355b5..d86fc21 100644
--- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -29,7 +29,9 @@
If there is no "CPUs ..." line then we are on a UP system. */ \
(RESULT) = 1; \
while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
- if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
+ if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1) \
+ || (sscanf (BUFFER, "CPUs probed %*d active %d", \
+ &(RESULT)) == 1)) \
break; \
} \
while (0)
@@ -46,7 +48,8 @@
If there is no "CPUs ..." line then we are on a UP system. */ \
(RESULT) = 1; \
while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
- if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
+ if ((sscanf (buffer, "cpus detected : %d", &(RESULT)) == 1) \
+ || (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1)) \
break; \
} \
while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e9cba30619516af56d976512592bbd19e668f31
commit 5e9cba30619516af56d976512592bbd19e668f31
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 5 05:28:23 2001 +0000
Don't use the ELF version, define simple replacements here.
diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c
index 9a25fc8..a555559 100644
--- a/sysdeps/unix/sysv/aix/dl-libc.c
+++ b/sysdeps/unix/sysv/aix/dl-libc.c
@@ -1 +1,41 @@
-#include <elf/dl-libc.c>
+/* Handle loading and unloading shared objects for internal libc purposes.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <ldsodefs.h>
+
+void *
+__libc_dlopen (const char *name)
+{
+ return _dl_open (name, RTLD_LAZY, NULL);
+}
+
+void *
+__libc_dlsym (void *map, const char *name)
+{
+ return _dl_sym (map, name, NULL);
+}
+
+int
+__libc_dlclose (void *map)
+{
+ _dl_close (__map);
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2fc87911c77d04928a3b50e3b034be0be5dbca5a
commit 2fc87911c77d04928a3b50e3b034be0be5dbca5a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 5 04:19:17 2001 +0000
(_dl_open): Fix typo in last change.
diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c
index 0189ab4..ba8e2bf 100644
--- a/sysdeps/unix/sysv/aix/dl-open.c
+++ b/sysdeps/unix/sysv/aix/dl-open.c
@@ -85,7 +85,7 @@ _dl_open (const char *file, int mode, const void *caller)
{
bsize *= 2;
dl_info = realloc (dl_info, bsize);
- if (new_dl_info == NULL)
+ if (dl_info == NULL)
{
(void) __unload ((void *) handle);
errno = ENOMEM;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebe30a97c996be2b55d41129c575ed3c4c58c9a9
commit ebe30a97c996be2b55d41129c575ed3c4c58c9a9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:54:28 2001 +0000
Define __getpeername.
diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c
index d227e28..82a9941 100644
--- a/sysdeps/unix/sysv/aix/getpeername.c
+++ b/sysdeps/unix/sysv/aix/getpeername.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,4 @@ getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len)
{
return ngetpeername (fd, addr.__sockaddr__, len);
}
+weak_alias (getpeername,__getpeername)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21be1647f1940b4da82fa27d2e72141af6ab1ae7
commit 21be1647f1940b4da82fa27d2e72141af6ab1ae7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:52:37 2001 +0000
AIX PPC memset implementation.
diff --git a/sysdeps/unix/sysv/aix/powerpc/memset.c b/sysdeps/unix/sysv/aix/powerpc/memset.c
new file mode 100644
index 0000000..ef04283
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/powerpc/memset.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* Until the cache line issues are resolved use the generic implementation. */
+#include <sysdeps/generic/memset.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32cb7502fd95920c89d642e04d9f0b0bd2a66ee5
commit 32cb7502fd95920c89d642e04d9f0b0bd2a66ee5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:51:14 2001 +0000
AIX dl-sym.
diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c
index 7e10ba1..642c2e2 100644
--- a/sysdeps/unix/sysv/aix/dl-sym.c
+++ b/sysdeps/unix/sysv/aix/dl-sym.c
@@ -1,9 +1,58 @@
-/* XXX The implementation of dlopen should somehow use the __loadx system
- call but how? */
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
#include <dlfcn.h>
+#include <dlldr.h>
+
+extern int _dl_numso;
+extern DL_SODATA *_dl_sotable;
void *
-__libc_dlsym (void *handle, const char *name)
+_dl_sym (void *handle, const char *symbol, void *who)
{
- return (void *) 0;
+ void *rt_function;
+
+ if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ switch (_dl_sotable[(int) handle].type)
+ {
+ case DL_UNIX_SYSCALL:
+ rt_function = (void *) __loadx (DL_UNIX_SYSCALL, (void *) symbol);
+ break;
+
+ case DL_GETSYM:
+ rt_function = (void *) __loadx (DL_GETSYM, (void *) symbol,
+ _dl_sotable[(int) handle].index,
+ _dl_sotable[(int) handle].dataorg);
+ break;
+
+ default:
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return rt_function;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aceb4f8d277813b87f7d8b9aa368a0a7315ad023
commit aceb4f8d277813b87f7d8b9aa368a0a7315ad023
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:49:24 2001 +0000
libc_dl-xxx support.
diff --git a/sysdeps/unix/sysv/aix/dl-libc.c b/sysdeps/unix/sysv/aix/dl-libc.c
new file mode 100644
index 0000000..9a25fc8
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-libc.c
@@ -0,0 +1 @@
+#include <elf/dl-libc.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dfb0b211c146c65ceb67f3f6803f115809a69d19
commit dfb0b211c146c65ceb67f3f6803f115809a69d19
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:48:10 2001 +0000
AIX dl-open.
diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c
index 50fd712..0189ab4 100644
--- a/sysdeps/unix/sysv/aix/dl-open.c
+++ b/sysdeps/unix/sysv/aix/dl-open.c
@@ -1,9 +1,133 @@
-/* XXX The implementation of dlopen should somehow use the __loadx system
- call but how? */
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <malloc.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
#include <dlfcn.h>
+#include <dlldr.h>
+
+#define NUM_SHARED_OBJECTS 32
+
+int _dl_numso = NUM_SHARED_OBJECTS;
+DL_SODATA *_dl_sotable = NULL;
void *
-__libc_dlopen (const char *file)
+_dl_open (const char *file, int mode, const void *caller)
{
- return (void *) 0;
+ DL_SODATA *new_so;
+ void *handle;
+ int entry;
+ int bsize = _dl_numso * sizeof (DL_INFO);
+ DL_INFO *dl_info = malloc (bsize);
+
+ if (dl_info == NULL)
+ return NULL;
+
+ /* 1st time thru initial shared object data table. */
+ if (_dl_sotable == NULL)
+ {
+ _dl_sotable = (DL_SODATA *) calloc (_dl_numso, sizeof (DL_SODATA));
+ if (_dl_sotable == NULL)
+ return NULL;
+
+ __loadx (DL_POSTLOADQ, dl_info, bsize, NULL);
+ while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK)
+ || dl_info[0].dlinfo_arraylen == 0)
+ {
+ bsize *= 2;
+ dl_info = realloc (dl_info, bsize);
+ if (dl_info == NULL)
+ return NULL;
+
+ __loadx (DL_POSTLOADQ, dl_info, bsize, NULL);
+ }
+ }
+
+ /* Validate mode bits. */
+ if (!(mode & RTLD_NOW) && !(mode & RTLD_LAZY))
+ {
+ free (dl_info);
+ errno = EINVAL;
+ return NULL;
+ }
+
+ /* Load the module. */
+ handle = (void *) __loadx (DL_LOAD | DL_LOAD_RTL | DL_LOAD_LDX1,
+ dl_info, bsize, file, NULL);
+ if (handle == NULL)
+ {
+ free (dl_info);
+ errno = EINVAL;
+ return NULL;
+ }
+
+ /* Was dl_info buffer to small to get info. */
+ while (!(dl_info[0].dlinfo_xflags & DL_INFO_OK)
+ || dl_info[0].dlinfo_arraylen == 0)
+ {
+ bsize *= 2;
+ dl_info = realloc (dl_info, bsize);
+ if (new_dl_info == NULL)
+ {
+ (void) __unload ((void *) handle);
+ errno = ENOMEM;
+ return NULL;
+ }
+ __loadx (DL_POSTLOADQ | DL_LOAD_RTL, dl_info, bsize, handle);
+ }
+
+ /* Get an empty entry in the shared object table. */
+ for (entry = 0; entry < _dl_numso; ++entry)
+ if (_dl_sotable[entry].type == 0)
+ break;
+
+ /* See if the table needs to be increased. */
+ if (entry == _dl_numso)
+ {
+ new_so = (DL_SODATA *) realloc (_dl_sotable,
+ _dl_numso * 2 * sizeof (DL_SODATA));
+ if (new_so == NULL)
+ return NULL;
+
+ memset (new_so + _dl_numso, '\0', _dl_numso * sizeof (DL_SODATA));
+ _dl_numso *= 2;
+ _dl_sotable = new_so;
+ }
+
+ /* See if this is syscall (look for /unix in file). */
+ if (strcmp ("/unix", file) == 0)
+ {
+ _dl_sotable[entry].index = dl_info[1].dlinfo_index;
+ _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg;
+ _dl_sotable[entry].handle = handle;
+ _dl_sotable[entry].type = DL_UNIX_SYSCALL;
+ }
+ else
+ {
+ _dl_sotable[entry].index = dl_info[1].dlinfo_index;
+ _dl_sotable[entry].dataorg = dl_info[1].dlinfo_dataorg;
+ _dl_sotable[entry].handle = handle;
+ _dl_sotable[entry].type = DL_GETSYM;
+ }
+
+ free (dl_info);
+ return (void *) entry;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbee9a4145e708a1b5ccc65aadd5385e1b3509e6
commit bbee9a4145e708a1b5ccc65aadd5385e1b3509e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:36:43 2001 +0000
AIX dl-close.
diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c
index a9a492a..50986d5 100644
--- a/sysdeps/unix/sysv/aix/dl-close.c
+++ b/sysdeps/unix/sysv/aix/dl-close.c
@@ -1,9 +1,46 @@
-/* XXX The implementation of dlopen should somehow use the __loadx system
- call but how? */
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
#include <dlfcn.h>
+#include <dlldr.h>
-int
-__libc_dlclose (void *handle)
+extern int _dl_numso;
+extern DL_SODATA *_dl_sotable;
+
+void
+_dl_close (void *handle)
{
- return 0;
+ if ((int) handle < 0 || (int) handle >= _dl_numso || _dl_sotable == NULL)
+ {
+ errno = EINVAL;
+ return;
+ }
+
+ if (_dl_sotable[(int) handle].handle != 0)
+ __unload (_dl_sotable[(int) handle].handle);
+
+ _dl_sotable[(int) handle].index = 0;
+ _dl_sotable[(int) handle].dataorg = 0;
+ _dl_sotable[(int) handle].handle = 0;
+ _dl_sotable[(int) handle].type = 0;
}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=852702b5c160a6152f4a56941980aefa9977d3d1
commit 852702b5c160a6152f4a56941980aefa9977d3d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:34:38 2001 +0000
AIX __loadx defines.
diff --git a/sysdeps/unix/sysv/aix/dlldr.h b/sysdeps/unix/sysv/aix/dlldr.h
new file mode 100644
index 0000000..d729244
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dlldr.h
@@ -0,0 +1,112 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+
+/*
+
+ int __loadx(flag, module, arg1, arg2, arg3)
+
+ The __loadx() is a call to ld_loadutil() kernel function, which
+ does the real work. Note ld_loadutil() is not exported an cannot be
+ called directly from user space.
+
+ void *ld_loadutil() call is a utility function used for loader extensions
+ supporting run-time linking and dl*() functions.
+
+ void * - will return the modules entry point if it succeds of NULL
+ on failure.
+
+ int flag - the flag field performas a dual role: the top 8 bits specify
+ the work for __loadx() to perform, the bottom 8 bits are
+ used to pass flags to the work routines, all other bits are
+ reserved.
+
+*/
+
+#define DL_LOAD 0x1000000 /* __loadx(flag,buf, buf_len, filename, libr_path) */
+#define DL_POSTLOADQ 0x2000000 /* __loadx(flag,buf, buf_len, module_handle) */
+#define DL_EXECQ 0x3000000 /* __loadx(flag,buf, buf_len) */
+#define DL_EXITQ 0x4000000 /* __loadx(flag,buf, buf_len) */
+#define DL_PREUNLOADQ 0x5000000 /* __loadx(flag,buf, buf_len, module_handle) */
+#define DL_INIT 0x6000000 /* __loadx(flag,NULL) */
+#define DL_GETSYM 0x7000000 /* __loadx(flag,symbol, index, modules_data_origin) */
+#define DL_SETDEPEND 0x8000000 /* __loadx(flag,import_data_org, import_index, */
+ /* export_data_org, export_index) */
+#define DL_DELDEPEND 0x9000000 /* __loadx(flag,import_data_org, import_index, */
+ /* export_data_org, export_index) */
+#define DL_GLOBALSYM 0xA000000 /* __loadx(flag,symbol_name, ptr_to_rec_index, */
+ /* ptr_to_rec_data_org) */
+#define DL_UNIX_SYSCALL 0xB000000 /* __loadx(flag,syscall_symbol_name) */
+
+#define DL_FUNCTION_MASK 0xFF000000
+#define DL_SRCHDEPENDS 0x00100000
+#define DL_SRCHMODULE 0x00080000
+#define DL_SRCHLOADLIST 0x00040000
+#define DL_LOAD_LDX1 0x00040000
+#define DL_LOAD_RTL 0x00020000
+#define DL_HASHSTRING 0x00020000
+#define DL_INFO_OK 0x00010000
+#define DL_LOAD_DLINFO 0x00010000
+#define DL_UNLOADED 0x00020000
+
+typedef union _dl_info
+{
+ struct {
+ uint _xflags; /* flag bits in the array */
+ uint _size; /* size of this structure */
+ uint _arraylen; /* number of following elements */
+ } _dl_stat;
+ struct {
+ caddr_t _textorg; /* start of loaded program image */
+ caddr_t _dataorg; /* start of data instance */
+ uint _datasize; /* size of data instance */
+ ushort _index; /* index of this le in la_dynlist */
+ ushort _mflags; /* info about module from load() */
+ } _dl_array;
+} DL_INFO;
+
+#define dlinfo_xflags _dl_stat._xflags
+#define dlinfo_arraylen _dl_stat._arraylen
+#define dlinfo_size _dl_stat._size
+
+#define dlinfo_textorg _dl_array._textorg
+#define dlinfo_datasize _dl_array._datasize
+#define dlinfo_dataorg _dl_array._dataorg
+#define dlinfo_index _dl_array._index
+#define dlinfo_flags _dl_array._mflags
+
+#define DL_HAS_RTINIT 0x1 /* indicates the module __rtinit symbols */
+#define DL_IS_NEW 0x2 /* indicates that the module is newly loaded */
+
+struct _xArgs
+{
+ char *libpath;
+ DL_INFO *info;
+ uint infosize;
+};
+
+/* Shared Object DATA used for dl-open,dl-sym & dl-close support */
+typedef struct
+{
+ void *handle; /* handle for __loadx */
+ uint type; /* type of __loadx flag */
+ ushort index; /* dlinfo_index */
+ caddr_t dataorg; /* dlinfo_dataorg */
+} DL_SODATA;
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f55815d275ca237592b5766e24fd30fac770c38
commit 5f55815d275ca237592b5766e24fd30fac770c38
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:33:04 2001 +0000
AIX startup code.
diff --git a/sysdeps/unix/sysv/aix/start.c b/sysdeps/unix/sysv/aix/start.c
new file mode 100644
index 0000000..d854a55
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/start.c
@@ -0,0 +1,290 @@
+/* Copyright (C) 1991, 93, 1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+
+/* Old compatibility names for C types. */
+typedef unsigned char uchar; /* sb in libc/posix/types.h */
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <xcoff.h>
+#include <rtinit.h>
+#include <dlldr.h>
+#include <bits/libc-lock.h>
+
+/* The first piece of initialized data. */
+int __data_start = 0;
+
+extern int errno;
+
+/* extern __pthread_init; */
+
+typedef void (*FPV)(void);
+
+typedef struct crt0_info
+{
+ int *p_argc;
+ FPV threads_init;
+} INFO;
+
+
+INFO crt0_info;
+int argc;
+char **argv;
+char **__environ;
+int module_count;
+caddr_t text_origin;
+caddr_t data_origin;
+
+asm("
+ .toc
+LL..0: .tc argc[TC],argc
+LL..1: .tc argv[TC],argv
+LL..2: .tc __environ[TC],__environ
+LL..3: .tc module_count[TC],module_count
+LL..4: .tc text_origin[TC],text_origin
+LL..5: .tc data_origin[TC],data_origin
+");
+
+int main (int argc,char **argv,char **__environ);
+int modinit(int argc,INFO *crt0_info, int module_count,
+ caddr_t text_origin, caddr_t data_origin);
+
+void mod_init1(void *handler,__RTINIT *rti);
+
+__RTINIT *find_rtinit(caddr_t text_origin,caddr_t data_origin, int module_count);
+
+extern int *__loadx();
+
+void __start(void)
+{
+#ifdef __64BIT__
+asm("
+ ld 17,LL..0(2) # argc
+ std 14,0(17) # copy reg14 to argc
+ ld 17,LL..1(2) # argv
+ std 15,0(17) # copy reg15 to argv
+ ld 17,LL..2(2) # envp
+ std 16,0(17) # copy reg16 to envp
+ ld 17,LL..3(2) # module_count
+ std 30,0(17) # copy reg30 to module_count
+ ld 17,LL..4(2) # text_origin
+ std 29,0(17) # copy reg29 to text_origin
+ ld 17,LL..5(2) # data_origin
+ std 28,0(17) # copy reg28 to data_origin
+");
+#else
+asm("
+ lwz 17,LL..0(2) # argc
+ stw 3,0(17) # copy reg3 to argc
+ lwz 17,LL..1(2) # argv
+ stw 4,0(17) # copy reg4 to argv
+ lwz 17,LL..2(2) # envp
+ stw 5,0(17) # copy reg5 to envp
+ lwz 17,LL..3(2) # module_count
+ stw 30,0(17) # copy reg30 to module_count
+ lwz 17,LL..4(2) # text_origin
+ stw 29,0(17) # copy reg29 to text_origin
+ lwz 17,LL..5(2) # data_origin
+ stw 28,0(17) # copy reg28 to data_origin
+");
+#endif
+ crt0_info.p_argc = (int*)&argc;
+
+/* crt0_info.threads_init = (FPV) &__pthread_init; */
+
+ /*
+ * Do run-time linking, if enabled and call the init()
+ * for all loaded modules.
+ */
+ argc = modinit(argc,&crt0_info,module_count,text_origin,data_origin);
+
+ errno=0;
+ /*
+ * Call the user program.
+ */
+ exit (main (argc, argv, __environ));
+}
+
+/*
+ * The modinit() function performs run-time linking,
+ * if enabled, and calling the init() function for
+ * all loaded modules.
+ *
+ * int modinit(argc,crt0_info,module_count,text,data)
+ *
+ * argc - current value of argc.
+ * info - crt0 information passed
+ * module_count - number of modules loaded.
+ * text - Beginning of text address
+ * data - Beginning of data address
+ */
+
+#define DL_BUFFER_SIZE 1000
+
+int modinit(int argc,INFO *crt0_info, int module_count,
+ caddr_t text_origin, caddr_t data_origin)
+{
+ int *handler = 0;
+ __RTINIT *rtinit_info = 0;
+ int flag;
+ DL_INFO dl_buffer[DL_BUFFER_SIZE];
+ DL_INFO *dl_info = dl_buffer;
+ int i;
+ FPV p;
+ __libc_lock_define_initialized(static,modinit_lock);
+
+ /*
+ * try to find __rtinit symbols
+ */
+ rtinit_info = find_rtinit(text_origin,data_origin,module_count);
+
+ flag = DL_EXECQ;
+ if (rtinit_info && rtinit_info->rtl) flag |= DL_LOAD_RTL;
+
+ /*
+ * get a list of modules that have __rtinit
+ */
+ if (__loadx(flag, dl_info, sizeof(dl_buffer))) exit(0x90);
+
+ if (( dl_info[0].dlinfo_xflags & DL_INFO_OK))
+ {
+ rtinit_info = find_rtinit(dl_info[1].dlinfo_textorg,
+ dl_info[1].dlinfo_dataorg,
+ module_count);
+ if ((rtinit_info != NULL) & (rtinit_info->rtl != NULL))
+ {
+ if((*rtinit_info->rtl)(dl_info,0)) exit(0x90);
+ }
+ }
+
+ /*
+ * initialize threads in case any init
+ * functions need thread functions
+ */
+ if (crt0_info->threads_init)
+ (*crt0_info->threads_init)();
+
+ p = (FPV) __loadx(DL_GLOBALSYM | DL_SRCHLOADLIST,"pthread_init");
+ if (p)
+ (*p)();
+
+ __libc_lock_lock(modinit_lock);
+
+ /*
+ * initialization each module loaded that has __rtinit.
+ */
+ if (( dl_info[0].dlinfo_xflags & DL_INFO_OK))
+ {
+ for (i=1; i < dl_info[0].dlinfo_arraylen + 1; i++)
+ {
+ if (dl_info[i].dlinfo_flags & DL_HAS_RTINIT)
+ {
+ rtinit_info = find_rtinit(dl_info[i].dlinfo_textorg,
+ dl_info[i].dlinfo_dataorg,
+ module_count);
+ if (rtinit_info)
+ {
+ mod_init1(handler,rtinit_info);
+ }
+ }
+ }
+ }
+
+ __libc_lock_unlock(modinit_lock);
+ /*
+ * reload argc if needed.
+ */
+ return((int) (*crt0_info->p_argc));
+}
+
+/*
+ * The mod_init1 calls every initialization function
+ * for a given module.
+ *
+ * void mod_init1(handler, rti)
+ *
+ * void *handler - if NULL init funtions for modules loaded at exec time
+ * are being executed. Otherwise, the handler points to the
+ * module loaded.
+ *
+ * __RTINIT *rti - pointer to __rtinit data structure (with rti->init_offset
+ * not equal to zero)
+ */
+
+void mod_init1(void *handler,__RTINIT *rtl)
+{
+ __RTINIT_DESCRIPTOR *descriptor;
+
+ descriptor =(__RTINIT_DESCRIPTOR *) ((caddr_t)&rtl->rtl + rtl->init_offset);
+ while (descriptor->f)
+ {
+ if (!(descriptor->flags & _RT_CALLED))
+ {
+ descriptor->flags |= _RT_CALLED;
+ ( descriptor->f )(handler,rtl,descriptor); /* execute init/fini */
+ }
+ descriptor = (__RTINIT_DESCRIPTOR *) ((caddr_t)descriptor +
+ rtl->__rtinit_descriptor_size);
+ }
+}
+
+
+/*
+ * Find __rtinit symbol
+ *
+ * __RTINIT *find_rtinit(caddr_t text_origin)
+ *
+ * caddr_t text_origin - Beginning of text area
+ * caddr_t data_origin - Beginning of data area
+ * int module_count - Number of modules loaded
+ * __RTINIT *rti - pointer to __rtinit data structure
+ */
+
+__RTINIT *find_rtinit(caddr_t text_origin, caddr_t data_origin, int module_count)
+{
+ struct xcoffhdr *xcoff_hdr;
+ SCNHDR *sec_hdr;
+ SCNHDR *ldr_sec_hdr;
+ SCNHDR *data_sec_hdr;
+ LDSYM *ldsym_hdr;
+ __RTINIT *rtl;
+
+ xcoff_hdr = (struct xcoffhdr *) text_origin;
+ sec_hdr = (SCNHDR *) ((caddr_t)&xcoff_hdr->aouthdr +
+ xcoff_hdr->filehdr.f_opthdr);
+ ldr_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_snloader - 1));
+ ldsym_hdr = (LDSYM *) ((caddr_t)xcoff_hdr + ldr_sec_hdr->s_scnptr +
+ LDHDRSZ);
+
+ if ( module_count <= 0)
+ {
+ if ( !(ldr_sec_hdr->s_scnptr) ) return ((__RTINIT *) 0);
+
+ if ( memcmp(ldsym_hdr,RTINIT_NAME,sizeof(RTINIT_NAME)-1))
+ return ((__RTINIT *) 0);
+ }
+
+ data_sec_hdr = (SCNHDR *) (sec_hdr + (xcoff_hdr->aouthdr.o_sndata - 1));
+ rtl = (__RTINIT *) (ldsym_hdr->l_value +
+ (data_origin - data_sec_hdr->s_vaddr));
+ return(rtl);
+}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7fac016cfa47e47d9c2a861602d82b826edd807b
commit 7fac016cfa47e47d9c2a861602d82b826edd807b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:32:14 2001 +0000
AIX gettimeofday implementation.
diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c
new file mode 100644
index 0000000..6b5bd48
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/gettimeofday.c
@@ -0,0 +1,94 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <time.h>
+#include <sys/time.h>
+
+#ifndef HAVE_GNU_LD
+#define __daylight daylight
+#define __timezone timezone
+#define __tzname tzname
+#endif
+
+/* Assembler Routines to access the timer registers */
+asm("
+.rtc_upper: mfspr 3,4 # copy RTCU to return register
+ blr
+
+.rtc_lower: mfspr 3,5 # copy RTCL to return register
+ blr
+");
+
+/* Get the current time of day and timezone information,
+ putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled.
+ Returns 0 on success, -1 on errors. */
+int
+__gettimeofday (tv, tz)
+ struct timeval *tv;
+ struct timezone *tz;
+{
+ int ts, tl, tu;
+
+ if (tv == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ ts = rtc_upper(); /* seconds */
+ tl = rtc_lower(); /* nanoseconds */
+ tu = rtc_upper(); /* Check for a carry from */
+ if (ts != tu) /* the lower reg to the upper */
+ tl = rtc_lower(); /* Recover from the race condition */
+
+ tv->tv_sec = (long int) (tu + (double)tl/1000000000);
+ tv->tv_usec = (long int) ((double)tl/1000);
+
+#if 0
+ if (tz != NULL)
+ {
+ const time_t timer = tv->tv_sec;
+ struct tm tm;
+ const struct tm *tmp;
+
+ const long int save_timezone = __timezone;
+ const long int save_daylight = __daylight;
+ char *save_tzname[2];
+ save_tzname[0] = __tzname[0];
+ save_tzname[1] = __tzname[1];
+
+ tmp = localtime_r (&timer, &tm);
+
+ tz->tz_minuteswest = __timezone / 60;
+ tz->tz_dsttime = __daylight;
+
+ __timezone = save_timezone;
+ __daylight = save_daylight;
+ __tzname[0] = save_tzname[0];
+ __tzname[1] = save_tzname[1];
+
+ if (tmp == NULL)
+ return -1;
+ }
+#endif
+
+ return 0;
+}
+
+weak_alias (__gettimeofday, gettimeofday)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42f86baa0d01b14fdda123ff938d5ea71b5f9358
commit 42f86baa0d01b14fdda123ff938d5ea71b5f9358
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:28:41 2001 +0000
AIX utmpx.h definitions.
diff --git a/sysdeps/unix/sysv/aix/utmpx.h b/sysdeps/unix/sysv/aix/utmpx.h
new file mode 100644
index 0000000..f7a7a3e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/utmpx.h
@@ -0,0 +1,89 @@
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTMPX_H
+#define _UTMPX_H 1
+
+#include <features.h>
+#include <sys/time.h>
+
+/* Required according to Unix98. */
+#ifndef __pid_t_defined
+typedef __pid_t pid_t;
+# define __pid_t_defined
+#endif
+
+/* Get system dependent values and data structures. */
+#include <bits/utmpx.h>
+
+#ifdef __USE_GNU
+/* Compatibility names for the strings of the canonical file names. */
+# define UTMPX_FILE _PATH_UTMPX
+# define UTMPX_FILENAME _PATH_UTMPX
+# define WTMPX_FILE _PATH_WTMPX
+# define WTMPX_FILENAME _PATH_WTMPX
+#endif
+
+/* For the getutmp{,x} functions we need the `struct utmp'. */
+#ifdef __USE_GNU
+struct utmp;
+#endif
+
+
+__BEGIN_DECLS
+
+/* Open user accounting database. */
+extern void setutxent (void) __THROW;
+
+/* Close user accounting database. */
+extern void endutxent (void) __THROW;
+
+/* Get the next entry from the user accounting database. */
+extern struct utmpx *getutxent (void) __THROW;
+
+/* Get the user accounting database entry corresponding to ID. */
+extern struct utmpx *getutxid (__const struct utmpx *__id) __THROW;
+
+/* Get the user accounting database entry corresponding to LINE. */
+extern struct utmpx *getutxline (__const struct utmpx *__line) __THROW;
+
+/* Write the entry UTMPX into the user accounting database. */
+extern struct utmpx *pututxline (__const struct utmpx *__utmpx) __THROW;
+
+
+#ifdef __USE_GNU
+/* Change name of the utmpx file to be examined. */
+extern int utmpxname (__const char *__file) __THROW;
+
+/* Append entry UTMP to the wtmpx-like file WTMPX_FILE. */
+extern void updwtmpx (__const char *__wtmpx_file,
+ __const struct utmpx *__utmpx) __THROW;
+
+
+/* Copy the information in UTMPX to UTMP. */
+extern void getutmp (__const struct utmpx *__utmpx,
+ struct utmp *__utmp) __THROW;
+
+/* Copy the information in UTMP to UTMPX. */
+extern void getutmpx (__const struct utmp *__utmp,
+ struct utmpx *__utmpx) __THROW;
+#endif
+
+__END_DECLS
+
+#endif /* utmpx.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8bf86d074829faaaae8315f2d787670e581e565
commit c8bf86d074829faaaae8315f2d787670e581e565
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:26:49 2001 +0000
Added _HAVE_UT_TYPE/PID/ID/TV/HOST defines.
diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h
index 7a7bce2..f8bd665 100644
--- a/sysdeps/unix/sysv/aix/bits/utmpx.h
+++ b/sysdeps/unix/sysv/aix/bits/utmpx.h
@@ -65,3 +65,10 @@ struct utmpx
#ifdef __USE_GNU
# define ACCOUNTING 9 /* System accounting. */
#endif
+
+#define _HAVE_UT_TYPE 1
+#define _HAVE_UT_PID 1
+#define _HAVE_UT_ID 1
+#define _HAVE_UT_TV 1
+#define _HAVE_UT_HOST 1
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b159c0223e580c6f3f18499978c4b31b3b94186
commit 4b159c0223e580c6f3f18499978c4b31b3b94186
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:18:11 2001 +0000
Removed temp code and made stub.
diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c
index f7eb65e..2dfc025 100644
--- a/sysdeps/unix/sysv/aix/libc-start.c
+++ b/sysdeps/unix/sysv/aix/libc-start.c
@@ -1,20 +1 @@
-/* We don't need the usual code since we are using the AIX crt code. */
-
-/* This function is called in the AIX crt0. */
-void
-__mod_init (void)
-{
- /* XXX What has to be done? */
-}
-
-/* This variable is reference in the AIX crt0 code.
- XXX Since I don't know how it is used make it a pointer to a function. */
-void *__crt0v = __mod_init;
-
-
-/* XXX Another weird function from the C library. I have no idea what
- it does but it is needed by libgcc. */
-void
-_savef14 (void)
-{
-}
+/* stub libc-start.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1abb612d81d8563512285c268694f92c8e560283
commit 1abb612d81d8563512285c268694f92c8e560283
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 4 01:17:41 2001 +0000
Remove /usr/lib/crt0.o added dl-libc, dl-open,dl-sym, dl-close to misc.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 9aa48d1..dc91f8f 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -2,18 +2,16 @@
# This is a hack until the import/export stuff is worked out.
+postctor += /lib/syscalls.exp
-# XXX This is a hack until we have the possibility to generate out own crt0.
-static-start-installed-name = /usr/lib/crt0.o
-
ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close uitrunc
+sysdep_routines += dl-libc dl-open dl-sym dl-close uitrunc
endif
ifeq ($(subdir),login)
sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
pututxline utmpxname
-sysdep_headers += utmpx.h bits/utmpx.h
+#sysdep_headers += utmpx.h bits/utmpx.h
+#sysdep_headers += bits/utmp.h bits/utmpx.h
endif
# Don't compile the ctype glue code, since there is no old non-GNU C library.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0b3ec5b0289df05538aa3d938562ebf009e73be5
commit 0b3ec5b0289df05538aa3d938562ebf009e73be5
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Apr 2 12:32:51 2001 +0000
Add prototype for __umount2.
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
index 515467b..29633f5 100644
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
@@ -20,6 +20,8 @@
/* Since we don't have an oldumount system call, do what the kernel
does down here. */
+extern log int __umount2 (char * name, int flags);
+
long int
__umount (const char *name)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a46a95b7e4cd9c7f05c96306fa6762cd7be0f47c
commit a46a95b7e4cd9c7f05c96306fa6762cd7be0f47c
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 30 06:57:48 2001 +0000
Add alias for imaxdiv.
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index 08bf8eb..c705d1e 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -106,3 +106,4 @@ $divbyzero:
.end ldiv
weak_alias(ldiv, lldiv)
+weak_alias(ldiv, imaxdiv)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8d795b0770a737f3471bccf75063c510550d4cf
commit e8d795b0770a737f3471bccf75063c510550d4cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 27 02:43:47 2001 +0000
Add MAP_* and MADV_* defines to match other architectures.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 5b8c752..f6c5094 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -53,10 +53,12 @@
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */
+# define MAP_NORESERVE 0x0400 /* don't check for reservations */
+# define MAP_ANONYMOUS 0x0800 /* don't use a file */
+# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */
-# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
+# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
+# define MAP_LOCKED 0x8000 /* pages are locked */
#endif
/* Flags to `msync'. */
@@ -69,6 +71,15 @@
#define MCL_FUTURE 2 /* Lock all additions to address
space. */
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+#define MADV_NORMAL 0 /* default page-in behavior */
+#define MADV_RANDOM 1 /* page-in minimum required */
+#define MADV_SEQUENTIAL 2 /* read-ahead aggressively */
+#define MADV_WILLNEED 3 /* pre-fault pages */
+#define MADV_DONTNEED 4 /* discard these pages */
+#endif
+
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e46c35fd6bfb1bc357749c8c0ffbe19b4fa79216
commit e46c35fd6bfb1bc357749c8c0ffbe19b4fa79216
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 17 08:27:45 2001 +0000
Change type of second parameter back to size_t as per upcoming XPG6.
diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c
index 76c8c72..9482058 100644
--- a/sysdeps/unix/sysv/aix/gethostname.c
+++ b/sysdeps/unix/sysv/aix/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
int
__gethostname (name, len)
char *name;
- socklen_t len;
+ size_t len;
{
return gethostname (name, len);
}
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
index 3f967e1..1a1440f 100644
--- a/sysdeps/unix/sysv/sysv4/gethostname.c
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -27,7 +27,7 @@ extern int __sysinfo (int command, char *buf, long int count);
int
__gethostname (name, namelen)
char *name;
- socklen_t namelen;
+ size_t namelen;
{
return __sysinfo (SI_HOSTNAME, name, namelen);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d76aa2b87e9bbb6e02beffe5d8746de0cf023129
commit d76aa2b87e9bbb6e02beffe5d8746de0cf023129
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 16 23:52:16 2001 +0000
(CALL_SIGHANDLER): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
index 19c35a4..4613bd5 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -21,3 +21,5 @@
#define GET_PC(ctx) ((void *) (ctx).sc_pc)
#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15])
#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30])
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index 1aaca1e..cc8f2f7 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -31,3 +31,5 @@
ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
#define ADVANCE_STACK_FRAME(frm) \
((struct layout *)frm - 1)
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
index 86bf934..b7e6f37 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998.
@@ -22,3 +22,5 @@
#define GET_PC(ctx) ((void *) (ctx)->sc_pc)
#define GET_FRAME(ctx) ((void *) __builtin_frame_address (1))
#define GET_STACK(ctx) ((void *) (ctx)->sc_usp)
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 1b67ce3..36d57dc 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -23,3 +23,5 @@
#define GET_PC(ctx) ((void *) ctx->sc_pc)
#define GET_FRAME(ctx) ((void *) ctx->sc_regs[30])
#define GET_STACK(ctx) ((void *) ctx->sc_regs[29])
+#define CALL_SIGHANDLER(handler, signo, ctx) \
+ (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b33675cd5eee0ae26ed9d11173fd0bded655d542
commit b33675cd5eee0ae26ed9d11173fd0bded655d542
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 11 23:25:54 2001 +0000
Dummy replacement for code not needed here.
diff --git a/sysdeps/m68k/fpu/branred.c b/sysdeps/m68k/fpu/branred.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/branred.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/doasin.c b/sysdeps/m68k/fpu/doasin.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/doasin.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/dosincos.c b/sysdeps/m68k/fpu/dosincos.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/dosincos.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/halfulp.c b/sysdeps/m68k/fpu/halfulp.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/halfulp.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mpa.c b/sysdeps/m68k/fpu/mpa.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mpa.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mpatan.c b/sysdeps/m68k/fpu/mpatan.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mpatan.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mpatan2.c b/sysdeps/m68k/fpu/mpatan2.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mpatan2.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mpexp.c b/sysdeps/m68k/fpu/mpexp.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mpexp.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mplog.c b/sysdeps/m68k/fpu/mplog.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mplog.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mpsqrt.c b/sysdeps/m68k/fpu/mpsqrt.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mpsqrt.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/mptan.c b/sysdeps/m68k/fpu/mptan.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/mptan.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/sincos32.c b/sysdeps/m68k/fpu/sincos32.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/sincos32.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/slowexp.c b/sysdeps/m68k/fpu/slowexp.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/slowexp.c
@@ -0,0 +1 @@
+/* Not needed. */
diff --git a/sysdeps/m68k/fpu/slowpow.c b/sysdeps/m68k/fpu/slowpow.c
new file mode 100644
index 0000000..1cc8931
--- /dev/null
+++ b/sysdeps/m68k/fpu/slowpow.c
@@ -0,0 +1 @@
+/* Not needed. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f21c16fbf68501b335cc9971f0cc85c9fa039e1
commit 7f21c16fbf68501b335cc9971f0cc85c9fa039e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 10 16:16:44 2001 +0000
m68k-specific definitions for ldconfig.
diff --git a/sysdeps/unix/sysv/linux/m68k/ldconfig.h b/sysdeps/unix/sysv/linux/m68k/ldconfig.h
new file mode 100644
index 0000000..953f192
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/ldconfig.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/ldconfig.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10e506a635d9ec0ce80bf96a462494b5fbfc2c0d
commit 10e506a635d9ec0ce80bf96a462494b5fbfc2c0d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 10 06:37:12 2001 +0000
Add dl-procinfo.c and dl-procinfo.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 60513f7..83f8719 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,4 +1,6 @@
clone.S
+dl-procinfo.c
+dl-procinfo.h
ioperm.c
setresuid.c
setresgid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce56b0a81ad9b43313f69eefbed1eaf7ebad2042
commit ce56b0a81ad9b43313f69eefbed1eaf7ebad2042
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 10 06:36:31 2001 +0000
[subdir=elf] (sysdep-dl-routines, sysdep_routines, sysdep-rtld-routines): Add
dl-procinfo.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 6040b20..aeaaa39 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -12,3 +12,11 @@ endif
ifeq ($(subdir),resource)
sysdep_routines += oldgetrlimit64
endif
+
+ifeq ($(subdir),elf)
+# extra shared linker files to link into dl-allobjs.so and libc
+sysdep-dl-routines += dl-procinfo
+sysdep_routines += dl-procinfo
+# extra shared linker files to link only into dl-allobjs.so
+sysdep-rtld-routines += dl-procinfo
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=807c3437eb3d178fe6fb57d048ce69c79b6ad8c7
commit 807c3437eb3d178fe6fb57d048ce69c79b6ad8c7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 10 06:36:09 2001 +0000
Interface definitions for functions to handle processor specific features
on Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
new file mode 100644
index 0000000..9f4c83e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -0,0 +1,89 @@
+/* Linux/ARM version of processor capability information handling macros.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _DL_PROCINFO_H
+#define _DL_PROCINFO_H 1
+
+#include <ldsodefs.h>
+
+/* If anything should be added here check whether the size of each string
+ is still ok with the given array size. */
+extern const char _dl_arm_cap_flags[][10];
+#define _DL_HWCAP_COUNT 32
+
+/* The kernel provides platform data but it is not interesting. */
+#define _DL_HWCAP_PLATFORM 0
+
+
+static inline int
+__attribute__ ((unused))
+_dl_procinfo (int word)
+{
+ int i;
+
+ _dl_printf ("AT_HWCAP: ");
+
+ for (i = 0; i < _DL_HWCAP_COUNT; ++i)
+ if (word & (1 << i))
+ _dl_printf (" %s", _dl_arm_cap_flags[i]);
+
+ _dl_printf ("\n");
+
+ return 0;
+}
+
+static inline const char *
+__attribute__ ((unused))
+_dl_hwcap_string (int idx)
+{
+ return _dl_arm_cap_flags[idx];
+};
+
+enum
+{
+ HWCAP_ARM_SWP = 1 << 0,
+ HWCAP_ARM_HALF = 1 << 1,
+ HWCAP_ARM_THUMB = 1 << 2,
+ HWCAP_ARM_26BIT = 1 << 3,
+ HWCAP_ARM_FAST_MULT = 1 << 4,
+ HWCAP_ARM_FPA = 1 << 5,
+ HWCAP_ARM_VFP = 1 << 6,
+ HWCAP_ARM_EDSP = 1 << 7,
+
+ HWCAP_IMPORTANT = (HWCAP_ARM_HALF | HWCAP_ARM_FAST_MULT)
+};
+
+static inline int
+__attribute__ ((unused))
+_dl_string_hwcap (const char *str)
+{
+ int i;
+
+ for (i = 0; i < _DL_HWCAP_COUNT; i++)
+ {
+ if (strcmp (str, _dl_arm_cap_flags[i]) == 0)
+ return i;
+ }
+ return -1;
+};
+
+#define _dl_string_platform(str) (-1)
+
+#endif /* dl-procinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3a9f6bb3980b8be41d505fd9c4385b90d5732ff
commit e3a9f6bb3980b8be41d505fd9c4385b90d5732ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 10 06:35:45 2001 +0000
Handling processor specific features for Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
new file mode 100644
index 0000000..564d7d1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -0,0 +1,31 @@
+/* Data for Linux/ARM version of processor capability information.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 2001.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This information must be kept in sync with the _DL_HWCAP_COUNT and
+ _DL_PLATFORM_COUNT definitions in procinfo.h. */
+
+
+/* If anything should be added here check whether the size of each string
+ is still ok with the given array size. */
+const char _dl_arm_cap_flags[][10] =
+ {
+ "swp", "half", "thumb", "26bit", "fast-mult", "fpa", "vfp", "edsp",
+ };
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c4a64619959b5aa60d2ad16aebaa496881f161f
commit 5c4a64619959b5aa60d2ad16aebaa496881f161f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 5 18:28:40 2001 +0000
(__S_TYPEISMQ, __S_TYPEISSEM, __S_TYPEISSHM): Rewrite to enforce correct
use the macros. They still always return zero.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index dbb7938..60a6160 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,10 +101,11 @@ struct stat64
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
-/* POSIX.1b objects. */
-#define __S_TYPEISMQ(buf) (0)
-#define __S_TYPEISSEM(buf) (0)
-#define __S_TYPEISSHM(buf) (0)
+/* POSIX.1b objects. Note that these macros always evaluate to zero. But
+ they do it by enforcing the correct use of the macros. */
+#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index 1676f17..f360e7f 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -118,10 +118,11 @@ struct stat64
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
-/* POSIX.1b objects. */
-#define __S_TYPEISMQ(buf) (0)
-#define __S_TYPEISSEM(buf) (0)
-#define __S_TYPEISSHM(buf) (0)
+/* POSIX.1b objects. Note that these macros always evaluate to zero. But
+ they do it by enforcing the correct use of the macros. */
+#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 37c303b..9210cae 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -124,10 +124,11 @@ struct stat64
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
-/* POSIX.1b objects. */
-#define __S_TYPEISMQ(buf) (0)
-#define __S_TYPEISSEM(buf) (0)
-#define __S_TYPEISSHM(buf) (0)
+/* POSIX.1b objects. Note that these macros always evaluate to zero. But
+ they do it by enforcing the correct use of the macros. */
+#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
+#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
/* Protection bits. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1052cd9dacb8527b1e2c8b2f5aad56230480c3de
commit 1052cd9dacb8527b1e2c8b2f5aad56230480c3de
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 4 19:28:52 2001 +0000
Define SI_ASYNCNL.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 25360a1..6e16340 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -127,7 +127,9 @@ typedef struct siginfo
signals. */
enum
{
- SI_SIGIO = -5, /* Sent by queued SIGIO. */
+ SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */
+# define SI_ASYNCNL SI_ASYNCNL
+ SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_ASYNCIO, /* Sent by AIO completion. */
# define SI_ASYNCIO SI_ASYNCIO
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 03f5b3e..6e6f70b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -119,7 +119,9 @@ typedef struct siginfo
signals. */
enum
{
- SI_SIGIO = -5, /* Sent by queued SIGIO. */
+ SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */
+# define SI_ASYNCNL SI_ASYNCNL
+ SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_MESGQ, /* Sent by real time mesq state change. */
# define SI_MESGQ SI_MESGQ
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abb2a703aac48691fca21f0366f754a9e769cf4c
commit abb2a703aac48691fca21f0366f754a9e769cf4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 3 18:15:33 2001 +0000
Allow __need_sigevent_t being defined and provide only that definition.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index ca0a4fc..25360a1 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -17,15 +17,17 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if !defined _SIGNAL_H && !defined __need_siginfo_t
+#if !defined _SIGNAL_H && !defined __need_siginfo_t \
+ && !defined __need_sigevent_t
# error "Never include this file directly. Use <signal.h> instead"
#endif
#include <bits/wordsize.h>
-#if (!defined __have_siginfo_t \
- && (defined _SIGNAL_H || defined __need_siginfo_t))
-# define __have_siginfo_t 1
+#if (!defined __have_sigval_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t \
+ || defined __need_sigevent_t))
+# define __have_sigval_t 1
/* Type for data associated with a signal. */
typedef union sigval
@@ -33,6 +35,11 @@ typedef union sigval
int sival_int;
void *sival_ptr;
} sigval_t;
+#endif
+
+#if (!defined __have_siginfo_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t 1
# define __SI_MAX_SIZE 128
# if __WORDSIZE == 64
@@ -246,7 +253,8 @@ enum
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
-#if defined _SIGNAL_H && !defined __have_sigevent_t
+#if (defined _SIGNAL_H || defined __need_sigevent_t) \
+ && !defined __have_sigevent_t
# define __have_sigevent_t 1
/* Structure to transport application-defined values with signals. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 6bebeb2..03f5b3e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -17,13 +17,15 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if !defined _SIGNAL_H && !defined __need_siginfo_t
+#if !defined _SIGNAL_H && !defined __need_siginfo_t \
+ && !defined __need_sigevent_t
# error "Never include this file directly. Use <signal.h> instead"
#endif
-#if (!defined __have_siginfo_t \
- && (defined _SIGNAL_H || defined __need_siginfo_t))
-# define __have_siginfo_t 1
+#if (!defined __have_sigval_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t \
+ || defined __need_sigevent_t))
+# define __have_sigval_t 1
/* Type for data associated with a signal. */
typedef union sigval
@@ -31,6 +33,11 @@ typedef union sigval
int sival_int;
void *sival_ptr;
} sigval_t;
+#endif
+
+#if (!defined __have_siginfo_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t 1
# define __SI_MAX_SIZE 128
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
@@ -238,7 +245,8 @@ enum
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
-#if defined _SIGNAL_H && !defined __have_sigevent_t
+#if (defined _SIGNAL_H || defined __need_sigevent_t) \
+ && !defined __have_sigevent_t
# define __have_sigevent_t 1
/* Structure to transport application-defined values with signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb8023f9389a8311dff4917b0496a5a34aa1c3c3
commit cb8023f9389a8311dff4917b0496a5a34aa1c3c3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 28 15:23:48 2001 +0000
(elf_machine_rela): Don't handle relocations which are not in ld.so if
RTLD_BOOTSTRAP is defined.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 73c6cbd..5a17ca2 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -500,8 +500,10 @@ elf_machine_rela (struct link_map *map,
memcpy (reloc_addr_1, &reloc_addr_val, 8);
}
}
+#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_NONE)
return;
+#endif
else
{
Elf64_Addr loadbase, sym_value;
@@ -512,8 +514,9 @@ elf_machine_rela (struct link_map *map,
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
- else if (r_type == R_ALPHA_JMP_SLOT)
+ else if (r_type == R_ALPHA_JMP_SLOT)
elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
+#ifndef RTLD_BOOTSTRAP
else if (r_type == R_ALPHA_REFQUAD)
{
void *reloc_addr_1 = reloc_addr;
@@ -522,7 +525,6 @@ elf_machine_rela (struct link_map *map,
/* Load value without causing unaligned trap. */
memcpy (&reloc_addr_val, reloc_addr_1, 8);
sym_value += reloc_addr_val;
-#ifndef RTLD_BOOTSTRAP
if (map == &_dl_rtld_map)
{
/* Undo the relocation done here during bootstrapping.
@@ -536,10 +538,10 @@ elf_machine_rela (struct link_map *map,
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
sym_value -= reloc->r_addend;
}
-#endif
/* Store value without causing unaligned trap. */
memcpy (reloc_addr_1, &sym_value, 8);
}
+#endif
else
_dl_reloc_bad_type (map, r_type, 0);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=773b640096dc53e9052ee2385bb82687d6dd485f
commit 773b640096dc53e9052ee2385bb82687d6dd485f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 28 06:35:24 2001 +0000
Replace use of old output functions with the new ones.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 36ae4cf..75c37c5 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -436,10 +436,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const char *strtab;
strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
- _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
- ": Symbol `", strtab + refsym->st_name,
- "' has different size in shared object, "
- "consider re-linking\n", NULL);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_argv[0] ?: "<program name unknown>",
+ strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index 89ad542..f8a8e7b 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
- Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
Contributed by David Huggins-Daines <dhd@debian.org>
This file is part of the GNU C Library.
@@ -575,10 +575,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const char *strtab;
strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
- _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
- ": Symbol `", strtab + refsym->st_name,
- "' has different size in shared object, "
- "consider re-linking\n", NULL);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_argv[0] ?: "<program name unknown>",
+ strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value,
MIN (sym->st_size, refsym->st_size));
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 3381d6f..e2a12cb 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -255,10 +255,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const char *strtab;
strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
- _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
- ": Symbol `", strtab + refsym->st_name,
- "' has different size in shared object, "
- "consider re-linking\n", NULL);
+ _dl_error_printf ("\
+%s: Symbol `%s' has different size in shared object, consider re-linking\n",
+ _dl_argv[0] ?: "<program name unknown>",
+ strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
refsym->st_size));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f1644d26e6406bffb52f8c93fb8883773e861e9
commit 5f1644d26e6406bffb52f8c93fb8883773e861e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 23 20:24:40 2001 +0000
Define alias __libc_write.
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index c872e04..82c2bf6 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -32,3 +32,4 @@ __write (fd, ptr, n)
}
/* AIX has no weak aliases (yet) but let's hope for better times. */
weak_alias (__write, write)
+strong_alias (__write, __libc_write)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dcab999777898a50c3e567449d27f8e166e7b100
commit dcab999777898a50c3e567449d27f8e166e7b100
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 23 20:24:20 2001 +0000
Define __need_NULL before including <stddef.h>.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index cd57291..df75454 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -25,6 +25,7 @@
#include <features.h>
+#define __need_NULL
#define __need_size_t
#include <stddef.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cc9fd41c375e3bc6f5d347aa54140192dc6c6aa
commit 8cc9fd41c375e3bc6f5d347aa54140192dc6c6aa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 23 20:16:31 2001 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S
deleted file mode 100644
index 049627e..0000000
--- a/sysdeps/unix/sysv/aix/restf.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-
-ENTRY(_restf_all)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
-C_TEXT(_restf14): lfd fp14,-144(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
-C_TEXT(_restf15): lfd fp15,-136(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
-C_TEXT(_restf16): lfd fp16,-128(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
-C_TEXT(_restf17): lfd fp17,-120(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
-C_TEXT(_restf18): lfd fp18,-112(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
-C_TEXT(_restf19): lfd fp19,-104(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
-C_TEXT(_restf20): lfd fp20,-96(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
-C_TEXT(_restf21): lfd fp21,-88(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
-C_TEXT(_restf22): lfd fp22,-80(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
-C_TEXT(_restf23): lfd fp23,-72(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
-C_TEXT(_restf24): lfd fp24,-64(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
-C_TEXT(_restf25): lfd fp25,-56(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
-C_TEXT(_restf26): lfd fp26,-48(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
-C_TEXT(_restf27): lfd fp27,-40(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
-C_TEXT(_restf28): lfd fp28,-32(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
-C_TEXT(_restf29): lfd fp29,-24(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30)
-C_TEXT(_restf30): lfd fp30,-16(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31)
-C_TEXT(_restf31): lfd fp31,-8(r11)
- blr
diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S
deleted file mode 100644
index 4c10d6e..0000000
--- a/sysdeps/unix/sysv/aix/savef.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-
-ENTRY(_savef_all)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
-C_TEXT(_savef14): stfd fp14,-144(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
-C_TEXT(_savef15): stfd fp15,-136(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
-C_TEXT(_savef16): stfd fp16,-128(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
-C_TEXT(_savef17): stfd fp17,-120(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
-C_TEXT(_savef18): stfd fp18,-112(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
-C_TEXT(_savef19): stfd fp19,-104(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
-C_TEXT(_savef20): stfd fp20,-96(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
-C_TEXT(_savef21): stfd fp21,-88(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
-C_TEXT(_savef22): stfd fp22,-80(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
-C_TEXT(_savef23): stfd fp23,-72(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
-C_TEXT(_savef24): stfd fp24,-64(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
-C_TEXT(_savef25): stfd fp25,-56(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
-C_TEXT(_savef26): stfd fp26,-48(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
-C_TEXT(_savef27): stfd fp27,-40(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
-C_TEXT(_savef28): stfd fp28,-32(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
-C_TEXT(_savef29): stfd fp29,-24(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30)
-C_TEXT(_savef30): stfd fp30,-16(r11)
- ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31)
-C_TEXT(_savef31): stfd fp31,-8(r11)
- blr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76b92c87ab7dd6668e8a182448897cc3c0803616
commit 76b92c87ab7dd6668e8a182448897cc3c0803616
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 23 20:15:49 2001 +0000
Remove restf.S and savef.S.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index bce7330..0482d24 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -5,5 +5,3 @@ kernel_proto.h
bits/utmpx.h
gnu/lib-names.h
uitrunc.c
-savef.S
-restf.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70f970dfee211301b7e2efa03e9f7801215ba88a
commit 70f970dfee211301b7e2efa03e9f7801215ba88a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 23 20:15:23 2001 +0000
[$(subdir) == misc] (sysdep_routines): Remove restf.S and savef.S.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 6c9ce11..9aa48d1 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -6,7 +6,7 @@
static-start-installed-name = /usr/lib/crt0.o
ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close restf savef uitrunc
+sysdep_routines += dl-open dl-sym dl-close uitrunc
endif
ifeq ($(subdir),login)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e33c3af9cbf70192b8f185cfa84ba1e98deab50a
commit e33c3af9cbf70192b8f185cfa84ba1e98deab50a
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Feb 22 08:27:50 2001 +0000
* sysdeps/mips/bsd-_setjmp.S (_setjmp): Reorder instructions to
avoid problems on MIPS I.
* sysdeps/mips/bsd-setjmp.S (setjmp): Likewise.
* sysdeps/mips/dl-machine.h (RTLD_START): Remove duplicate ".set
noreorder".
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index bf7cb15..919c8a2 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -27,14 +27,16 @@
.option pic2
#endif
ENTRY (_setjmp)
- .set noreorder
#ifdef __PIC__
+ .set noreorder
.cpload t9
+ .set reorder
la t9, C_SYMBOL_NAME (__sigsetjmp)
+#endif
+ move a1,zero /* Pass a second argument of zero. */
+#ifdef __PIC__
jr t9
#else
j C_SYMBOL_NAME (__sigsetjmp)
#endif
- move a1,zero /* Pass a second argument of zero. */
- .set reorder
.end _setjmp
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index bab312b..66a0daa 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -30,11 +30,13 @@ ENTRY (setjmp)
.set noreorder
#ifdef __PIC__
.cpload t9
+ .set reorder
la t9, C_SYMBOL_NAME (__sigsetjmp)
+#endif
+ li a1, 1 /* Pass a second argument of one. */
+#ifdef __PIC__
jr t9
#else
j C_SYMBOL_NAME (__sigsetjmp)
#endif
- li a1, 1 /* Pass a second argument of one. */
- .set reorder
.end setjmp
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index cd8ee3c..6a7d66c 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -412,7 +412,6 @@ _dl_runtime_resolve:\n \
".text\n"\
_RTLD_PROLOGUE(ENTRY_POINT)\
".set noreorder\n\
- .set noreorder\n\
bltzal $0, 0f\n\
nop\n\
0: .cpload $31\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=191b842dfe7931a9c74348ffa6684846ff5884ea
commit 191b842dfe7931a9c74348ffa6684846ff5884ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 17 16:49:41 2001 +0000
m68k exp2l implementation.
diff --git a/sysdeps/m68k/fpu/e_exp2l.c b/sysdeps/m68k/fpu/e_exp2l.c
new file mode 100644
index 0000000..0ab2a42
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp2l.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp2l
+#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c79b4fded19f55fa35631fb02fa9b7e574949991
commit c79b4fded19f55fa35631fb02fa9b7e574949991
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 17 16:49:28 2001 +0000
m68k exp2f implementation.
diff --git a/sysdeps/m68k/fpu/e_exp2f.c b/sysdeps/m68k/fpu/e_exp2f.c
new file mode 100644
index 0000000..593842e
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp2f.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp2f
+#include <e_acosf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f1ba5c30fc2bca08828435d005c004352a807405
commit f1ba5c30fc2bca08828435d005c004352a807405
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 17 16:49:17 2001 +0000
m68k exp2 implementation.
diff --git a/sysdeps/m68k/fpu/e_exp2.c b/sysdeps/m68k/fpu/e_exp2.c
new file mode 100644
index 0000000..24fac4f
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp2.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp2
+#include <e_acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00ec1b7df91a5999aa132719fd058b7aed90d86f
commit 00ec1b7df91a5999aa132719fd058b7aed90d86f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 17 16:46:12 2001 +0000
Renamed to e_exp2.
diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c
deleted file mode 100644
index 24fac4f..0000000
--- a/sysdeps/m68k/fpu/s_exp2.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC __ieee754_exp2
-#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c
deleted file mode 100644
index 593842e..0000000
--- a/sysdeps/m68k/fpu/s_exp2f.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC __ieee754_exp2f
-#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c
deleted file mode 100644
index 0ab2a42..0000000
--- a/sysdeps/m68k/fpu/s_exp2l.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC __ieee754_exp2l
-#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84a29bc1f548197a4c8c8ec05a21e5fcd5e5e66c
commit 84a29bc1f548197a4c8c8ec05a21e5fcd5e5e66c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 16 18:12:10 2001 +0000
(ftruncate): Add __ftruncate64 alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index f695145..651398c 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -26,7 +26,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
-ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
+ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
truncate - truncate 2 truncate truncate64
# these are actually common with the x86:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca50de95e84f52bddca21db0708410d8087a9159
commit ca50de95e84f52bddca21db0708410d8087a9159
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Feb 16 13:40:22 2001 +0000
Correctly handle m68k long double format.
diff --git a/sysdeps/m68k/fpu/s_fpclassifyl.c b/sysdeps/m68k/fpu/s_fpclassifyl.c
new file mode 100644
index 0000000..74aa720
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_fpclassifyl.c
@@ -0,0 +1,43 @@
+/* Return classification value corresponding to argument. m68k version.
+ Copyright (C) 1997,2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+ Fixed for m68k by Andreas Schwab <schwab@suse.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+#include "math_private.h"
+
+
+int
+__fpclassifyl (long double x)
+{
+ u_int32_t ex, hx, lx;
+ int retval = FP_NORMAL;
+
+ GET_LDOUBLE_WORDS (ex, hx, lx, x);
+ ex &= 0x7fff;
+ if ((ex | hx | lx) == 0)
+ retval = FP_ZERO;
+ else if (ex == 0 && (hx & 0x80000000) == 0)
+ retval = FP_SUBNORMAL;
+ else if (ex == 0x7fff)
+ retval = ((hx & 0x7fffffff) | lx) != 0 ? FP_NAN : FP_INFINITE;
+
+ return retval;
+}
diff --git a/sysdeps/m68k/fpu/s_nextafterl.c b/sysdeps/m68k/fpu/s_nextafterl.c
new file mode 100644
index 0000000..70ab5a4
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_nextafterl.c
@@ -0,0 +1,109 @@
+/* s_nextafterl.c -- long double version of s_nextafter.c.
+ * Conversion to long double by Ulrich Drepper,
+ * Cygnus Support, drepper@cygnus.com.
+ * Fixed for m68k by Andreas Schwab <schwab@suse.de>.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#if defined(LIBM_SCCS) && !defined(lint)
+static char rcsid[] = "$NetBSD: $";
+#endif
+
+/* IEEE functions
+ * nextafterl(x,y)
+ * return the next machine floating-point number of x in the
+ * direction toward y.
+ * Special cases:
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#ifdef __STDC__
+ long double __nextafterl(long double x, long double y)
+#else
+ long double __nextafterl(x,y)
+ long double x,y;
+#endif
+{
+ int32_t ix,iy,esx,esy;
+ u_int32_t hx,hy,lx,ly;
+
+ GET_LDOUBLE_WORDS(esx,hx,lx,x);
+ GET_LDOUBLE_WORDS(esy,hy,ly,y);
+ ix = esx&0x7fff; /* |x| */
+ iy = esy&0x7fff; /* |y| */
+
+ if(((ix==0x7fff)&&((hx&0x7fffffff)|lx)!=0) || /* x is nan */
+ ((iy==0x7fff)&&((hy&0x7fffffff)|ly)!=0)) /* y is nan */
+ return x+y;
+ if(x==y) return y; /* x=y, return y */
+ if((ix|hx|lx)==0) { /* x == 0 */
+ SET_LDOUBLE_WORDS(x,esy&0x8000,0,1);/* return +-minsubnormal */
+ y = x*x;
+ if(y==x) return y; else return x; /* raise underflow flag */
+ }
+ if(esx>=0) { /* x > 0 */
+ if(esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))) {
+ /* x > y, x -= ulp */
+ if(lx==0) {
+ if (ix != 0 && hx == 0x80000000) hx = 0;
+ if (hx==0) esx -= 1;
+ hx -= 1;
+ }
+ lx -= 1;
+ } else { /* x < y, x += ulp */
+ lx += 1;
+ if(lx==0) {
+ hx += 1;
+ if (hx==0) {
+ hx = 0x80000000;
+ esx += 1;
+ }
+ }
+ }
+ } else { /* x < 0 */
+ if(esy>=0||esx>esy||((esx==esy) && (hx>hy||((hx==hy)&&(lx>ly))))){
+ /* x < y, x -= ulp */
+ if(lx==0) {
+ if (ix != 0 && hx == 0x80000000) hx = 0;
+ if (hx==0) esx -= 1;
+ hx -= 1;
+ }
+ lx -= 1;
+ } else { /* x > y, x += ulp */
+ lx += 1;
+ if(lx==0) {
+ hx += 1;
+ if (hx==0) {
+ hx = 0x80000000;
+ esx += 1;
+ }
+ }
+ }
+ }
+ esy = esx&0x7fff;
+ if(esy==0x7fff) return x+x; /* overflow */
+ if(esy==0 && (hx & 0x80000000) == 0) { /* underflow */
+ y = x*x;
+ if(y!=x) { /* raise underflow flag */
+ SET_LDOUBLE_WORDS(y,esx,hx,lx);
+ return y;
+ }
+ }
+ SET_LDOUBLE_WORDS(x,esx,hx,lx);
+ return x;
+}
+weak_alias (__nextafterl, nextafterl)
+strong_alias (__nextafterl, __nexttowardl)
+weak_alias (__nextafterl, nexttowardl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=305f83de532e095bf6f2caf57f6a3b30209974d0
commit 305f83de532e095bf6f2caf57f6a3b30209974d0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 13 22:09:09 2001 +0000
Define __ftruncate64 and make old name a weak alias.
diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c
index 56a5ed5..f2c1578 100644
--- a/sysdeps/unix/sysv/aix/ftruncate64.c
+++ b/sysdeps/unix/sysv/aix/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,8 @@
extern int kftruncate (int fd, long long int length);
int
-ftruncate64 (int fd, off64_t length)
+__ftruncate64 (int fd, off64_t length)
{
return kftruncate (fd, length);
}
+weak_alias (__ftruncate64, ftruncate64)
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index e45afba..bc03e0c 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ extern int __syscall_ftruncate64 (int fd, int dummy, int high_length,
/* Truncate the file FD refers to to LENGTH bytes. */
int
-ftruncate64 (int fd, off64_t length)
+__ftruncate64 (int fd, off64_t length)
{
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (! __have_no_truncate64)
@@ -72,6 +72,7 @@ ftruncate64 (int fd, off64_t length)
return __ftruncate (fd, (off_t) length);
#endif
}
+weak_alias (__ftruncate64, ftruncate64)
#else
/* Use the generic implementation. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a0148d1cfea32ebbe1fedc98d71ba38286f634e
commit 6a0148d1cfea32ebbe1fedc98d71ba38286f634e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 9 05:27:34 2001 +0000
Little optimization.
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index 9997961..0faa8cc 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -39,7 +39,7 @@ ENTRY(strrchr)
.prologue 0
#endif
- zapnot a1, 1, a1 # e0 : zero extend our test character
+ and a1, 0xff, a1 # e0 : zero extend our test character
mov zero, t6 # .. e1 : t6 is last match aligned addr
sll a1, 8, t5 # e0 : replicate our test character
mov zero, t7 # .. e1 : t7 is last match byte compare mask
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f5831bee52f6b66d0832c94ec1a22eb6f714e76
commit 5f5831bee52f6b66d0832c94ec1a22eb6f714e76
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 9 05:27:14 2001 +0000
Alpha ev67 optimized implementation for strrchr.
diff --git a/sysdeps/alpha/alphaev67/strrchr.S b/sysdeps/alpha/alphaev67/strrchr.S
new file mode 100644
index 0000000..68874c9
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/strrchr.S
@@ -0,0 +1,117 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Return the address of the last occurrence of a given character
+ within a null-terminated string, or null if it is not found. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(strrchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ and a1, 0xff, t2 # E : 00000000000000ch
+ insbl a1, 1, t4 # U : 000000000000ch00
+ insbl a1, 2, t5 # U : 0000000000ch0000
+ ldq_u t0, 0(a0) # L : load first quadword Latency=3
+
+ mov zero, t6 # E : t6 is last match aligned addr
+ or t2, t4, a1 # E : 000000000000chch
+ sll t5, 8, t3 # U : 00000000ch000000
+ mov zero, t8 # E : t8 is last match byte compare mask
+
+ andnot a0, 7, v0 # E : align source addr
+ or t5, t3, t3 # E : 00000000chch0000
+ sll a1, 32, t2 # U : 0000chch00000000
+ sll a1, 48, t4 # U : chch000000000000
+
+ or t4, a1, a1 # E : chch00000000chch
+ or t2, t3, t2 # E : 0000chchchch0000
+ or a1, t2, a1 # E : chchchchchchchch
+ lda t5, -1 # E : build garbage mask
+
+ cmpbge zero, t0, t1 # E : bits set iff byte == zero
+ mskqh t5, a0, t4 # E : Complete garbage mask
+ xor t0, a1, t2 # E : make bytes == c zero
+ cmpbge zero, t4, t4 # E : bits set iff byte is garbage
+
+ cmpbge zero, t2, t3 # E : bits set iff byte == c
+ andnot t1, t4, t1 # E : clear garbage from null test
+ andnot t3, t4, t3 # E : clear garbage from char test
+ bne t1, $eos # U : did we already hit the terminator?
+
+ /* Character search main loop */
+$loop:
+ ldq t0, 8(v0) # L : load next quadword
+ cmovne t3, v0, t6 # E : save previous comparisons match
+ nop # : Latency=2, extra map slot (keep nop with cmov)
+ nop
+
+ cmovne t3, t3, t8 # E : Latency=2, extra map slot
+ nop # : keep with cmovne
+ addq v0, 8, v0 # E :
+ xor t0, a1, t2 # E :
+
+ cmpbge zero, t0, t1 # E : bits set iff byte == zero
+ cmpbge zero, t2, t3 # E : bits set iff byte == c
+ beq t1, $loop # U : if we havnt seen a null, loop
+ nop
+
+ /* Mask out character matches after terminator */
+$eos:
+ negq t1, t4 # E : isolate first null byte match
+ and t1, t4, t4 # E :
+ subq t4, 1, t5 # E : build a mask of the bytes upto...
+ or t4, t5, t4 # E : ... and including the null
+
+ and t3, t4, t3 # E : mask out char matches after null
+ cmovne t3, t3, t8 # E : save it, if match found Latency=2, extra map slot
+ nop # : Keep with cmovne
+ nop
+
+ cmovne t3, v0, t6 # E :
+ nop # : Keep with cmovne
+ /* Locate the address of the last matched character */
+ ctlz t8, t2 # U0 : Latency=3 (0x40 for t8=0)
+ nop
+
+ cmoveq t8, 0x3f, t2 # E : Compensate for case when no match is seen
+ nop # E : hide the cmov latency (2) behind ctlz latency
+ lda t5, 0x3f($31) # E :
+ subq t5, t2, t5 # E : Normalize leading zero count
+
+ addq t6, t5, v0 # E : and add to quadword address
+ ret # L0 : Latency=3
+ nop
+ nop
+
+END(strrchr)
+
+weak_alias (strrchr, rindex)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d335db0ecc328e77648d0f3867e86e957297a868
commit d335db0ecc328e77648d0f3867e86e957297a868
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 7 19:18:58 2001 +0000
Add missing word alignment.
diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S
index 31ca19d..4e16f83 100644
--- a/sysdeps/alpha/alphaev67/strncat.S
+++ b/sysdeps/alpha/alphaev67/strncat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
@@ -66,7 +66,7 @@ $found: cttz t1, t2 # U0 :
/* Worry about the null termination. */
cttz t10, t2 # U0: byte offset of end-of-count.
- nop # E :
+ bic a0, 7, a0 # E : word align the last write address.
zapnot t0, t8, t1 # U : was last byte a null?
nop # E :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b72a1aa920f3a62e51bb553d4d569ab3800a2c85
commit b72a1aa920f3a62e51bb553d4d569ab3800a2c85
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 7 18:20:36 2001 +0000
Honour __NO_MATH_INLINES.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 065009c..b7d5c3c 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
@@ -58,6 +58,8 @@
!isunordered(__x, __y) && __x != __y; }))
#endif /* ISO C99 */
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
NAME (TYPE __x, TYPE __y) __THROW \
@@ -174,4 +176,6 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW
return __x < __y ? 0.0 : __x - __y;
}
-#endif
+#endif /* C99 */
+
+#endif /* __NO_MATH_INLINES */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8f7c6f761f47c68d757a211505827020c71c4f9
commit b8f7c6f761f47c68d757a211505827020c71c4f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 5 05:59:49 2001 +0000
(elf_machine_rel): Correct handling of PC24 relocs with negative value.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 9b40e6f..36ae4cf 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -478,17 +478,25 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
case R_ARM_PC24:
{
Elf32_Sword addend;
- Elf32_Addr newvalue;
+ Elf32_Addr newvalue, topbits;
addend = *reloc_addr & 0x00ffffff;
if (addend & 0x00800000) addend |= 0xff000000;
newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2);
- if (newvalue & 0xfc000003)
- newvalue = fix_bad_pc24(reloc_addr, value)
- - (Elf32_Addr)reloc_addr + (addend << 2);
-
- newvalue = newvalue >> 2;
+ topbits = newvalue & 0xfe000000;
+ if (topbits != 0xfe000000 && topbits != 0x00000000)
+ {
+ newvalue = fix_bad_pc24(reloc_addr, value)
+ - (Elf32_Addr)reloc_addr + (addend << 2);
+ topbits = newvalue & 0xfe000000;
+ if (topbits != 0xfe000000 && topbits != 0x00000000)
+ {
+ _dl_signal_error (0, map->l_name,
+ "R_ARM_PC24 relocation out of range");
+ }
+ }
+ newvalue >>= 2;
value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
*reloc_addr = value;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ed6488cdb8fbdfd0b00e237e234b778cdd1aa7d
commit 1ed6488cdb8fbdfd0b00e237e234b778cdd1aa7d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 3 17:05:56 2001 +0000
Remove comma at end of enum.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index f33d863..b858cf8 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -66,7 +66,7 @@ enum
#define R13 R13
R14 = 14,
#define R14 R14
- R15 = 15,
+ R15 = 15
#define R15 R15
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77e906bb3aa714c8580cf0c871d651f20c50891b
commit 77e906bb3aa714c8580cf0c871d651f20c50891b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 3 17:04:37 2001 +0000
File was using crlf.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
index 6e51efe..f33d863 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -1,94 +1,94 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* System V/ARM ABI compliant context switching support. */
-
-#ifndef _SYS_UCONTEXT_H
-#define _SYS_UCONTEXT_H 1
-
-#include <features.h>
-#include <signal.h>
-#include <sys/elf.h>
-
-typedef int greg_t;
-
-/* Number of general registers. */
-#define NGREG 16
-
-/* Container for all general registers. */
-typedef elf_gregset_t gregset_t;
-
-/* Number of each register is the `gregset_t' array. */
-enum
-{
- R0 = 0,
-#define R0 R0
- R1 = 1,
-#define R1 R1
- R2 = 2,
-#define R2 R2
- R3 = 3,
-#define R3 R3
- R4 = 4,
-#define R4 R4
- R5 = 5,
-#define R5 R5
- R6 = 6,
-#define R6 R6
- R7 = 7,
-#define R7 R7
- R8 = 8,
-#define R8 R8
- R9 = 9,
-#define R9 R9
- R10 = 10,
-#define R10 R10
- R11 = 11,
-#define R11 R11
- R12 = 12,
-#define R12 R12
- R13 = 13,
-#define R13 R13
- R14 = 14,
-#define R14 R14
- R15 = 15,
-#define R15 R15
-};
-
-/* Structure to describe FPU registers. */
-typedef elf_fpregset_t fpregset_t;
-
-/* Context to describe whole processor state. */
-typedef struct
- {
- gregset_t gregs;
- fpregset_t fpregs;
- } mcontext_t;
-
-/* Userlevel context. */
-typedef struct ucontext
- {
- unsigned long int uc_flags;
- struct ucontext *uc_link;
- __sigset_t uc_sigmask;
- stack_t uc_stack;
- mcontext_t uc_mcontext;
- long int uc_filler[5];
- } ucontext_t;
-
-#endif /* sys/ucontext.h */
+/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* System V/ARM ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+#include <sys/elf.h>
+
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 16
+
+/* Container for all general registers. */
+typedef elf_gregset_t gregset_t;
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R0 = 0,
+#define R0 R0
+ R1 = 1,
+#define R1 R1
+ R2 = 2,
+#define R2 R2
+ R3 = 3,
+#define R3 R3
+ R4 = 4,
+#define R4 R4
+ R5 = 5,
+#define R5 R5
+ R6 = 6,
+#define R6 R6
+ R7 = 7,
+#define R7 R7
+ R8 = 8,
+#define R8 R8
+ R9 = 9,
+#define R9 R9
+ R10 = 10,
+#define R10 R10
+ R11 = 11,
+#define R11 R11
+ R12 = 12,
+#define R12 R12
+ R13 = 13,
+#define R13 R13
+ R14 = 14,
+#define R14 R14
+ R15 = 15,
+#define R15 R15
+};
+
+/* Structure to describe FPU registers. */
+typedef elf_fpregset_t fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[5];
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8fcfc26e437cafdc86ec452ec1ee54006418b6f
commit e8fcfc26e437cafdc86ec452ec1ee54006418b6f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 31 06:34:29 2001 +0000
Include <float.h>.
diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c
index 7feeb99..c0cce6e 100644
--- a/sysdeps/hppa/fpu/fraiseexcpt.c
+++ b/sysdeps/hppa/fpu/fraiseexcpt.c
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include <fenv.h>
+#include <float.h>
#include <math.h>
int
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index dcdd6c9..1c559c2 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include <fenv.h>
+#include <float.h>
#include <math.h>
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b3d3c61d40368ca4a8c637b357bf040cdd46f0c
commit 4b3d3c61d40368ca4a8c637b357bf040cdd46f0c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 28 05:37:10 2001 +0000
Don't define CLK_TCK for XPG6.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index 93c01c0..e0e0104 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@
XSI-conformant systems. */
# define CLOCKS_PER_SEC 1000000l
-# ifndef __STRICT_ANSI__
+# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
# include <bits/types.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8032f91d4c4a9cc8767c289bdbab7e9a3510ce46
commit 8032f91d4c4a9cc8767c289bdbab7e9a3510ce46
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 22:41:42 2001 +0000
Liunx/Alpha version of statvfs definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
new file mode 100644
index 0000000..747dc1b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/statvfs.h
@@ -0,0 +1,96 @@
+/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STATVFS_H
+# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
+#endif
+
+#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */
+
+struct statvfs
+ {
+ unsigned long int f_bsize;
+ unsigned long int f_frsize;
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_bavail;
+ __fsfilcnt_t f_files;
+ __fsfilcnt_t f_ffree;
+ __fsfilcnt_t f_favail;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+ __fsfilcnt64_t f_favail;
+#endif
+ unsigned long int f_fsid;
+ unsigned long int f_flag;
+ unsigned long int f_namemax;
+ int __f_spare[6];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct statvfs64
+ {
+ unsigned long int f_bsize;
+ unsigned long int f_frsize;
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_bavail;
+ __fsfilcnt64_t f_files;
+ __fsfilcnt64_t f_ffree;
+ __fsfilcnt64_t f_favail;
+ unsigned long int f_fsid;
+ unsigned long int f_flag;
+ unsigned long int f_namemax;
+ int __f_spare[6];
+ };
+#endif
+
+/* Definitions for the flag in `f_flag'. These definitions should be
+ kept in sync which the definitions in <sys/mount.h>. */
+enum
+{
+ ST_RDONLY = 1, /* Mount read-only. */
+#define ST_RDONLY ST_RDONLY
+ ST_NOSUID = 2, /* Ignore suid and sgid bits. */
+#define ST_NOSUID ST_NOSUID
+#ifdef __USE_GNU
+ ST_NODEV = 4, /* Disallow access to device special files. */
+# define ST_NODEV ST_NODEV
+ ST_NOEXEC = 8, /* Disallow program execution. */
+# define ST_NOEXEC ST_NOEXEC
+ ST_SYNCHRONOUS = 16, /* Writes are synced at once. */
+# define ST_SYNCHRONOUS ST_SYNCHRONOUS
+ ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
+# define ST_MANDLOCK ST_MANDLOCK
+ ST_WRITE = 128, /* Write on file/directory/symlink. */
+# define ST_WRITE ST_WRITE
+ ST_APPEND = 256, /* Append-only file. */
+# define ST_APPEND ST_APPEND
+ ST_IMMUTABLE = 512, /* Immutable file. */
+# define ST_IMMUTABLE ST_IMMUTABLE
+ ST_NOATIME = 1024, /* Do not update access times. */
+# define ST_NOATIME ST_NOATIME
+ ST_NODIRATIME /* Do not update directory access times. */
+# define ST_NODIRATIME ST_NODIRATIME
+#endif /* Use GNU. */
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0688457b472129a9ad6835109515736224d3dba1
commit 0688457b472129a9ad6835109515736224d3dba1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 21:25:38 2001 +0000
(struct sockaddr_storage): Define ss_family and __ss_family.
(struct msghdr): Change type of msg_iovlen to int and type of
msg_controllen to socklen_t.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index ae68328..2d6ded9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -157,7 +157,7 @@ struct sockaddr
struct sockaddr_storage
{
- __SOCKADDR_COMMON (__ss_); /* Address family, etc. */
+ __SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
@@ -212,10 +212,10 @@ struct msghdr
socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
- size_t msg_iovlen; /* Number of elements in the vector. */
+ int msg_iovlen; /* Number of elements in the vector. */
void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
- size_t msg_controllen; /* Ancillary data buffer length. */
+ socklen_t msg_controllen; /* Ancillary data buffer length. */
int msg_flags; /* Flags on received message. */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72f561b477e19bccf9fb04dcdcb5d387305421b3
commit 72f561b477e19bccf9fb04dcdcb5d387305421b3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 21:23:45 2001 +0000
Linux/Alpha specific socket.h definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/socket.h b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
new file mode 100644
index 0000000..8efdaca
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/socket.h
@@ -0,0 +1,308 @@
+/* System-specific socket constants and types. Linux/Alpha version.
+ Copyright (C) 1991,1992,1994-1999,2000,2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef __BITS_SOCKET_H
+#define __BITS_SOCKET_H
+
+#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define __need_size_t
+#define __need_NULL
+#include <stddef.h>
+
+#include <limits.h>
+#include <sys/types.h>
+
+/* Type for length arguments in socket calls. */
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_PACKET = 10 /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+};
+
+/* Protocol families. */
+#define PF_UNSPEC 0 /* Unspecified. */
+#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
+#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
+#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
+#define PF_INET 2 /* IP protocol family. */
+#define PF_AX25 3 /* Amateur Radio AX.25. */
+#define PF_IPX 4 /* Novell Internet Protocol. */
+#define PF_APPLETALK 5 /* Appletalk DDP. */
+#define PF_NETROM 6 /* Amateur radio NetROM. */
+#define PF_BRIDGE 7 /* Multiprotocol bridge. */
+#define PF_ATMPVC 8 /* ATM PVCs. */
+#define PF_X25 9 /* Reserved for X.25 project. */
+#define PF_INET6 10 /* IP version 6. */
+#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
+#define PF_DECnet 12 /* Reserved for DECnet project. */
+#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
+#define PF_SECURITY 14 /* Security callback pseudo AF. */
+#define PF_KEY 15 /* PF_KEY key management API. */
+#define PF_NETLINK 16
+#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
+#define PF_PACKET 17 /* Packet family. */
+#define PF_ASH 18 /* Ash. */
+#define PF_ECONET 19 /* Acorn Econet. */
+#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_SNA 22 /* Linux SNA Project */
+#define PF_IRDA 23 /* IRDA sockets. */
+#define PF_PPPOX 24 /* PPPoX sockets. */
+#define PF_MAX 32 /* For now.. */
+
+/* Address families. */
+#define AF_UNSPEC PF_UNSPEC
+#define AF_LOCAL PF_LOCAL
+#define AF_UNIX PF_UNIX
+#define AF_FILE PF_FILE
+#define AF_INET PF_INET
+#define AF_AX25 PF_AX25
+#define AF_IPX PF_IPX
+#define AF_APPLETALK PF_APPLETALK
+#define AF_NETROM PF_NETROM
+#define AF_BRIDGE PF_BRIDGE
+#define AF_ATMPVC PF_ATMPVC
+#define AF_X25 PF_X25
+#define AF_INET6 PF_INET6
+#define AF_ROSE PF_ROSE
+#define AF_DECnet PF_DECnet
+#define AF_NETBEUI PF_NETBEUI
+#define AF_SECURITY PF_SECURITY
+#define AF_KEY PF_KEY
+#define AF_NETLINK PF_NETLINK
+#define AF_ROUTE PF_ROUTE
+#define AF_PACKET PF_PACKET
+#define AF_ASH PF_ASH
+#define AF_ECONET PF_ECONET
+#define AF_ATMSVC PF_ATMSVC
+#define AF_SNA PF_SNA
+#define AF_IRDA PF_IRDA
+#define AF_PPPOX PF_PPPOX
+#define AF_MAX PF_MAX
+
+/* Socket level values. Others are defined in the appropriate headers.
+
+ XXX These definitions also should go into the appropriate headers as
+ far as they are available. */
+#define SOL_RAW 255
+#define SOL_DECNET 261
+#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264 /* ATM layer (cell level). */
+#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
+#define SOL_IRDA 266
+
+/* Maximum queue length specifiable by listen. */
+#define SOMAXCONN 128
+
+/* Get the definition of the macro to define the common sockaddr members. */
+#include <bits/sockaddr.h>
+
+/* Structure describing a generic socket address. */
+struct sockaddr
+ {
+ __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
+ char sa_data[14]; /* Address data. */
+ };
+
+
+/* Structure large enough to hold any socket address (with the historical
+ exception of AF_UNIX). We reserve 128 bytes. */
+#if ULONG_MAX > 0xffffffff
+# define __ss_aligntype __uint64_t
+#else
+# define __ss_aligntype __uint32_t
+#endif
+#define _SS_SIZE 128
+#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+
+struct sockaddr_storage
+ {
+ __SOCKADDR_COMMON (ss_); /* Address family, etc. */
+ __ss_aligntype __ss_align; /* Force desired alignment. */
+ char __ss_padding[_SS_PADSIZE];
+ };
+
+
+/* Bits in the FLAGS argument to `send', `recv', et al. */
+enum
+ {
+ MSG_OOB = 0x01, /* Process out-of-band data. */
+#define MSG_OOB MSG_OOB
+ MSG_PEEK = 0x02, /* Peek at incoming messages. */
+#define MSG_PEEK MSG_PEEK
+ MSG_DONTROUTE = 0x04, /* Don't use local routing. */
+#define MSG_DONTROUTE MSG_DONTROUTE
+#ifdef __USE_GNU
+ /* DECnet uses a different name. */
+ MSG_TRYHARD = MSG_DONTROUTE,
+# define MSG_TRYHARD MSG_DONTROUTE
+#endif
+ MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
+#define MSG_CTRUNC MSG_CTRUNC
+ MSG_PROXY = 0x10, /* Supply or ask second address. */
+#define MSG_PROXY MSG_PROXY
+ MSG_TRUNC = 0x20,
+#define MSG_TRUNC MSG_TRUNC
+ MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
+#define MSG_DONTWAIT MSG_DONTWAIT
+ MSG_EOR = 0x80, /* End of record. */
+#define MSG_EOR MSG_EOR
+ MSG_WAITALL = 0x100, /* Wait for a full request. */
+#define MSG_WAITALL MSG_WAITALL
+ MSG_FIN = 0x200,
+#define MSG_FIN MSG_FIN
+ MSG_SYN = 0x400,
+#define MSG_SYN MSG_SYN
+ MSG_CONFIRM = 0x800, /* Confirm path validity. */
+#define MSG_CONFIRM MSG_CONFIRM
+ MSG_RST = 0x1000,
+#define MSG_RST MSG_RST
+ MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
+#define MSG_ERRQUEUE MSG_ERRQUEUE
+ MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */
+#define MSG_NOSIGNAL MSG_NOSIGNAL
+ };
+
+
+/* Structure describing messages sent by
+ `sendmsg' and received by `recvmsg'. */
+struct msghdr
+ {
+ void *msg_name; /* Address to send to/receive from. */
+ socklen_t msg_namelen; /* Length of address data. */
+
+ struct iovec *msg_iov; /* Vector of data to send/receive into. */
+ size_t msg_iovlen; /* Number of elements in the vector. */
+
+ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ size_t msg_controllen; /* Ancillary data buffer length. */
+
+ int msg_flags; /* Flags on received message. */
+ };
+
+/* Structure used for storage of ancillary data object information. */
+struct cmsghdr
+ {
+ size_t cmsg_len; /* Length of data in cmsg_data plus length
+ of cmsghdr structure. */
+ int cmsg_level; /* Originating protocol. */
+ int cmsg_type; /* Protocol specific type. */
+ __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
+ /* XXX Perhaps this should be removed. */
+ };
+
+/* Ancillary data object manipulation macros. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
+#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+#define CMSG_FIRSTHDR(mhdr) \
+ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+ & (size_t) ~(sizeof (size_t) - 1))
+#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
+_EXTERN_INLINE struct cmsghdr *
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+{
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+ return 0;
+
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+ if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
+ || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+ > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+ /* No more entries. */
+ return 0;
+ return __cmsg;
+}
+#endif /* Use `extern inline'. */
+
+/* Socket level message types. This must match the definitions in
+ <linux/socket.h>. */
+enum
+ {
+ SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
+#define SCM_RIGHTS SCM_RIGHTS
+#ifdef __USE_BSD
+ SCM_CREDENTIALS = 0x02, /* Credentials passing. */
+# define SCM_CREDENTIALS SCM_CREDENTIALS
+#endif
+ __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
+ };
+
+/* User visible structure for SCM_CREDENTIALS message */
+
+struct ucred
+{
+ pid_t pid; /* PID of sending process. */
+ uid_t uid; /* UID of sending process. */
+ gid_t gid; /* GID of sending process. */
+};
+
+/* Get socket manipulation related informations from kernel headers. */
+#include <asm/socket.h>
+
+
+/* Structure used to manipulate the SO_LINGER option. */
+struct linger
+ {
+ int l_onoff; /* Nonzero to linger on close. */
+ int l_linger; /* Time to linger. */
+ };
+
+#endif /* bits/socket.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2018ae11c904e25b5b5ebe452d857b5761dfc55
commit f2018ae11c904e25b5b5ebe452d857b5761dfc55
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 21:23:07 2001 +0000
(struct sockaddr_storage): Define ss_family and __ss_family.
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
index febfc72..f080c6a 100644
--- a/sysdeps/unix/sysv/aix/bits/socket.h
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. AIX version.
- Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -152,7 +152,7 @@ struct sockaddr
struct sockaddr_storage
{
- __SOCKADDR_COMMON (__ss_); /* Address family, etc. */
+ __SOCKADDR_COMMON (ss_); /* Address family, etc. */
__ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0361ba30466a05705c920924bed382f89dc366a5
commit 0361ba30466a05705c920924bed382f89dc366a5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 19:27:16 2001 +0000
Don't define __fd_mask, __NFDBITS, __FDELT, __FDMASK, and __fd_set here.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index a89393d..cd57291 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -93,31 +93,9 @@ typedef int __clockid_t;
/* Timer ID returned by `timer_create'. */
typedef int __timer_t;
-/* One element in the file descriptor mask array. */
-typedef unsigned long int __fd_mask;
-
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (8 * sizeof (__fd_mask))
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
-
-/* fd_set for select and pselect. */
-typedef struct
- {
- /* XPG4.2 requires this member name. Otherwise avoid the name
- from the global namespace. */
-#ifdef __USE_XOPEN
- __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
-#else
- __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
-#endif
- } __fd_set;
-
typedef long int __key_t;
diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h
index e95892e..88ae1a9 100644
--- a/sysdeps/unix/sysv/hpux/bits/types.h
+++ b/sysdeps/unix/sysv/hpux/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-1998,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,31 +85,9 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef __u_long __clock_t;
-/* One element in the file descriptor mask array. */
-typedef long int __fd_mask;
-
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 2048
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (8 * sizeof (__fd_mask))
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
-
-/* fd_set for select and pselect. */
-typedef struct
- {
- /* XPG4.2 requires this member name. Otherwise avoid the name
- from the global namespace. */
-#ifdef __USE_XOPEN
- __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
-#else
- __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
-#endif
- } __fd_set;
-
typedef long int __key_t;
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 13c3898..b357994 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -92,35 +92,9 @@ typedef int __timer_t;
/* Used in `struct shmid_ds'. */
typedef int __ipc_pid_t;
-/* One element in the file descriptor mask array. */
-typedef unsigned long int __fd_mask;
-
-/* Due to incaution, we may have gotten these from a kernel header file. */
-#undef __FD_SETSIZE
-#undef __NFDBITS
-#undef __FDMASK
-
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (8 * sizeof (__fd_mask))
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
-
-/* fd_set for select and pselect. */
-typedef struct
- {
- /* XPG4.2 requires this member name. Otherwise avoid the name
- from the user namespace. */
-#ifdef __USE_XOPEN
- __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
-#else
- __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
-#endif
- } __fd_set;
/* Used in XTI. */
typedef long int __t_scalar_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 927d609..c3b93e3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -93,31 +93,9 @@ typedef int __clockid_t;
/* Timer ID returned by `timer_create'. */
typedef int __timer_t;
-/* One element in the file descriptor mask array. */
-typedef unsigned long int __fd_mask;
-
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (8 * sizeof (__fd_mask))
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
-
-/* fd_set for select and pselect. */
-typedef struct
- {
- /* XPG4.2 requires this member name. Otherwise avoid the name
- from the user namespace. */
-#ifdef __USE_XOPEN
- __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
-#else
- __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
-#endif
- } __fd_set;
-
typedef int __key_t;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 65ad002..7765fa4 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -89,26 +89,6 @@ typedef int __key_t; /* Type of an IPC key */
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (sizeof (unsigned long int) * 8)
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS))
-
-typedef struct
- {
- /* XPG4.2 requires this member name. Otherwise avoid the name
- from the user namespace. */
-#ifdef __USE_XOPEN
- unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
-#else
- unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
-# define __FDS_BITS(set) ((set)->__fds_bits)
-#endif
- } __fd_set;
-
-typedef unsigned long int __fd_mask;
-
/* Type to represent block size. */
typedef long int __blksize_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ae7e5b69595e122548882d790684e1be903cefb
commit 1ae7e5b69595e122548882d790684e1be903cefb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 06:29:16 2001 +0000
Define sigev_notify_attr with real type.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
index 9426c13..ca0a4fc 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -1,5 +1,5 @@
-/* siginfo_t, sigevent and constants. Linux/SPARC version.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* siginfo_t, sigevent and constants. Linux/Alpha version.
+ Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -257,6 +257,9 @@ enum
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif
+/* Forward declaration of the `pthread_attr_t' type. */
+struct __pthread_attr_s;
+
typedef struct sigevent
{
sigval_t sigev_value;
@@ -270,7 +273,7 @@ typedef struct sigevent
struct
{
void (*_function) (sigval_t); /* Function to start. */
- void *_attribute; /* Really pthread_attr_t. */
+ struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 9d348ac..6bebeb2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
-/* siginfo_t, sigevent and constants. Linux version.
- Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* siginfo_t, sigevent and constants. Linux/MIPS version.
+ Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -245,6 +245,9 @@ enum
# define __SIGEV_MAX_SIZE 64
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+/* Forward declaration of the `pthread_attr_t' type. */
+struct __pthread_attr_s;
+
/* XXX This one might need to change!!! */
typedef struct sigevent
{
@@ -258,8 +261,8 @@ typedef struct sigevent
struct
{
- void (*_function) (sigval_t); /* Function to start. */
- void *_attribute; /* Really pthread_attr_t. */
+ void (*_function) (sigval_t); /* Function to start. */
+ struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb25fffef1fb2654f037b8250cb539f3d8f0b969
commit cb25fffef1fb2654f037b8250cb539f3d8f0b969
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 04:59:52 2001 +0000
Define NPOLLFILE only if __USE_MISC.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
index 2d4e6f6..7472a80 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,5 +42,7 @@
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+#ifdef __USE_MISC
/* Canonical number of polling requests to read in at a time in poll. */
-#define NPOLLFILE 30
+# define NPOLLFILE 30
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
index 9b7826a..b0ef078 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,5 +47,7 @@
#define POLLHUP 0x010 /* Hung up. */
#define POLLNVAL 0x020 /* Invalid polling request. */
+#ifdef __USE_MISC
/* Canonical number of polling requests to read in at a time in poll. */
-#define NPOLLFILE 30
+# define NPOLLFILE 30
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76d981d3a6d8e6e73e02e61abc4553743846cad4
commit 76d981d3a6d8e6e73e02e61abc4553743846cad4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 27 04:58:11 2001 +0000
Use nfds_t type in function definition.
diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c
index ae041a8..bd19676 100644
--- a/sysdeps/unix/sysv/aix/poll.c
+++ b/sysdeps/unix/sysv/aix/poll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
int
__poll (fds, nfds, timeout)
struct pollfd *fds;
- unsigned long int nfds;
+ nfds_t nfds;
int timeout;
{
return poll (fds, nfds, timeout);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=274a3ffc63c4ffb98b12bdf25b286cb485dd6fcb
commit 274a3ffc63c4ffb98b12bdf25b286cb485dd6fcb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 26 02:16:41 2001 +0000
[libc] (GLIBC_2.2.2): Add wordexp.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 0e6e519..d89ef6a 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -54,4 +54,8 @@ libc {
GLIBC_2.1.4 {
pciconfig_iobase;
}
+ GLIBC_2.2.2 {
+ # w*
+ wordexp;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b0edb5a1e058bd4ffe41f12cc4e60516f8c270b
commit 2b0edb5a1e058bd4ffe41f12cc4e60516f8c270b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 26 02:16:03 2001 +0000
Correct definition of wordexp_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/wordexp.c b/sysdeps/unix/sysv/linux/alpha/wordexp.c
new file mode 100644
index 0000000..d7ae6dd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/wordexp.c
@@ -0,0 +1,59 @@
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <shlib-compat.h>
+
+/* For Linux/Alpha we have to make the wordexp symbols versioned. */
+#define wordexp(words, pwordexp, flags) \
+ __new_wordexp (words, pwordexp, flags)
+
+#include <sysdeps/generic/wordexp.c>
+
+versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
+
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
+/* The old, incorrect wordexp_t definition. */
+typedef struct
+ {
+ int we_wordc; /* Count of words matched. */
+ char **we_wordv; /* List of expanded words. */
+ int we_offs; /* Slots to reserve in `we_wordv'. */
+ } old_wordexp_t;
+
+
+int
+__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
+{
+ wordexp_t we;
+ int result;
+
+ we.we_wordc = pwordexp->we_wordc;
+ we.we_wordv = pwordexp->we_wordv;
+ we.we_offs = pwordexp->we_offs;
+
+ result = __new_wordexp (words, &we, flags);
+
+ pwordexp->we_wordc = we.we_wordc;
+ pwordexp->we_wordv = we.we_wordv;
+ pwordexp->we_offs = we.we_offs;
+
+ return result;
+}
+compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=582f2b191d98af28ed3dfaa2cfb5058179a67b92
commit 582f2b191d98af28ed3dfaa2cfb5058179a67b92
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jan 17 15:54:57 2001 +0000
(__bswap_32): Add cast to avoid invalid asm.
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index e828fc6..efdc7af 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -34,16 +34,16 @@
#if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_32(x) \
- __extension__ \
- ({ unsigned int __bswap_32_v; \
- if (__builtin_constant_p (x)) \
- __bswap_32_v = __bswap_constant_32 (x); \
- else \
- __asm__ __volatile__ ("ror%.w %#8, %0;" \
- "swap %0;" \
- "ror%.w %#8, %0" \
- : "=d" (__bswap_32_v) \
- : "0" (x)); \
+ __extension__ \
+ ({ unsigned int __bswap_32_v; \
+ if (__builtin_constant_p (x)) \
+ __bswap_32_v = __bswap_constant_32 (x); \
+ else \
+ __asm__ __volatile__ ("ror%.w %#8, %0;" \
+ "swap %0;" \
+ "ror%.w %#8, %0" \
+ : "=d" (__bswap_32_v) \
+ : "0" ((unsigned int) (x))); \
__bswap_32_v; })
#else
# define __bswap_32(x) __bswap_constant_32 (x)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea3e9a37c0aa68d1b92eaf327761458f0044b93a
commit ea3e9a37c0aa68d1b92eaf327761458f0044b93a
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jan 16 06:38:37 2001 +0000
Fix typo in last patch.
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index e1ee528..1b67ce3 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
-#define SIGCONTEXT unsigned long _code, struct sigcontext
+#define SIGCONTEXT unsigned long _code, struct sigcontext *
#define SIGCONTEXT_EXTRA_ARGS _code,
#define GET_PC(ctx) ((void *) ctx->sc_pc)
#define GET_FRAME(ctx) ((void *) ctx->sc_regs[30])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4b331c7120daec890791308714276679b6f135f
commit b4b331c7120daec890791308714276679b6f135f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 15 20:29:25 2001 +0000
Remove select syscall handling. The generic Linux version should work.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index ae0f33a..c36d071 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -8,8 +8,6 @@ cachectl - cachectl i:pii __cachectl cachectl
cacheflush - cacheflush i:pii _flush_cache cacheflush
sysmips - sysmips i:iiii __sysmips sysmips
-# override select.S in parent directory:
-select - select i:iPPPP __select select
sigsuspend - sigsuspend i:p __sigsuspend sigsuspend
#
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=722a930901a6bc5fd223aad4fed9e7c17ecb4634
commit 722a930901a6bc5fd223aad4fed9e7c17ecb4634
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jan 15 07:02:28 2001 +0000
* sysdeps/unix/sysv/linux/mips/register-dump.h (REGISTER_DUMP):
Change type of CTX to (struct sigcontext *).
* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Likewise.
(GET_FRAME): Likewise.
(GET_STACK): Likewise.
(SIGCONTEXT): Likewise. Add 2nd arg _code.
(SIGCONTEXT_EXTRA_ARGS): Add 2nd arg _code.
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index e204223..53c59c8 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -105,4 +105,4 @@ register_dump (int fd, struct sigcontext *ctx)
}
-#define REGISTER_DUMP register_dump (fd, &ctx)
+#define REGISTER_DUMP register_dump (fd, ctx)
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 9b3e7ea..e1ee528 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
@@ -18,8 +18,8 @@
Boston, MA 02111-1307, USA. */
-#define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
-#define GET_PC(ctx) ((void *) ctx.sc_pc)
-#define GET_FRAME(ctx) ((void *) ctx.sc_regs[30])
-#define GET_STACK(ctx) ((void *) ctx.sc_regs[29])
+#define SIGCONTEXT unsigned long _code, struct sigcontext
+#define SIGCONTEXT_EXTRA_ARGS _code,
+#define GET_PC(ctx) ((void *) ctx->sc_pc)
+#define GET_FRAME(ctx) ((void *) ctx->sc_regs[30])
+#define GET_STACK(ctx) ((void *) ctx->sc_regs[29])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=601ce732020d522494d6895e61739240dd6092d8
commit 601ce732020d522494d6895e61739240dd6092d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 7 07:32:00 2001 +0000
Add uitrunc.c, savef.S, and restf.S.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
index 9db1d74..bce7330 100644
--- a/sysdeps/unix/sysv/aix/Dist
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -4,3 +4,6 @@ dl-close.c
kernel_proto.h
bits/utmpx.h
gnu/lib-names.h
+uitrunc.c
+savef.S
+restf.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03b5cbd57dc79782980745a6dd869086139aabb7
commit 03b5cbd57dc79782980745a6dd869086139aabb7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 7 07:31:02 2001 +0000
Add alphaev6/stxncpy.S and alphaev6/stxcpy.S.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 034f0b0..7cf4911 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -7,3 +7,5 @@ _mcount.S
stxcpy.S
stxncpy.S
fpu/fenv_libc.h
+alphaev6/stxncpy.S
+alphaev6/stxcpy.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cce723df0109388649db45928dea0f5c6128d9fa
commit cce723df0109388649db45928dea0f5c6128d9fa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 7 07:03:36 2001 +0000
Remove sys/acct.h.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index a983244..dd43ebc 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -5,7 +5,6 @@ ipc_priv.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
-sys/acct.h
sys/cachectl.h
sys/procfs.h
sys/sysmips.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c7f9c93959671fe4c7884991238b8f7fcb08a22
commit 1c7f9c93959671fe4c7884991238b8f7fcb08a22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 27 23:31:49 2000 +0000
Don't go through unrolled loop if we would go through it only once.
diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S
index 35f17e7..e3af259 100644
--- a/sysdeps/alpha/alphaev6/memcpy.S
+++ b/sysdeps/alpha/alphaev6/memcpy.S
@@ -16,7 +16,7 @@
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
+
/*
* Much of the information about 21264 scheduling/coding comes from:
* Compiler Writer's Guide for the Alpha 21264
@@ -86,9 +86,9 @@ $single_head_quad:
$do_unroll:
addq $16, 64, $7 # E : Initial (+1 trip) wh64 address
- cmple $18, 63, $1 # E : Can we go through the unrolled loop?
+ cmple $18, 127, $1 # E : Can we go through the unrolled loop?
bne $1, $tail_quads # U : Nope
- nop # E :
+ nop # E :
$unroll_body:
wh64 ($7) # L1 : memory subsystem hint: 64 bytes at
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22fea1a1b600c68a96aa5f0edc4329b239900a65
commit 22fea1a1b600c68a96aa5f0edc4329b239900a65
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 27 23:29:08 2000 +0000
Interpret numeric parameter correctly.
diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S
index 4d199d9..31ca19d 100644
--- a/sysdeps/alpha/alphaev67/strncat.S
+++ b/sysdeps/alpha/alphaev67/strncat.S
@@ -38,57 +38,45 @@ ENTRY(strncat)
#endif
.prologue 1
- mov $16, $0 # set up return value
- beq $18, $zerocount # U :
+ mov a0, v0 # set up return value
+ beq a2, $zerocount # U :
/* Find the end of the string. */
- ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned)
- lda $2, -1($31) # E :
+ ldq_u t0, 0(a0) # L : load first quadword (a0 may be misaligned)
+ lda t1, -1 # E :
- insqh $2, $0, $2 # U :
- andnot $16, 7, $16 # E :
+ insqh t1, v0, t1 # U :
+ andnot a0, 7, a0 # E :
nop # E :
- or $2, $1, $1 # E :
+ or t1, t0, t0 # E :
nop # E :
nop # E :
- cmpbge $31, $1, $2 # E : bits set iff byte == 0
- bne $2, $found # U :
+ cmpbge zero, t0, t1 # E : bits set iff byte == 0
+ bne t1, $found # U :
-$loop: ldq $1, 8($16) # L :
- addq $16, 8, $16 # E :
- cmpbge $31, $1, $2 # E :
- beq $2, $loop # U :
+$loop: ldq t0, 8(a0) # L :
+ addq a0, 8, a0 # E :
+ cmpbge zero, t0, t1 # E :
+ beq t1, $loop # U :
-$found: cttz $2, $3 # U0 :
- addq $16, $3, $16 # E :
- jsr $23, __stxncpy # L0 :/* Now do the append. */
+$found: cttz t1, t2 # U0 :
+ addq a0, t2, a0 # E :
+ jsr t9, __stxncpy # L0 : Now do the append.
/* Worry about the null termination. */
- zapnot $1, $27, $2 # U : was last byte a null?
- cmplt $27, $24, $5 # E : did we fill the buffer completely?
- bne $2, 0f # U :
- ret # L0 :
-
-0: or $5, $18, $2 # E :
- nop
- bne $2, 2f # U :
- and $24, 0x80, $3 # E : no zero next byte
-
+ cttz t10, t2 # U0: byte offset of end-of-count.
nop # E :
- bne $3, 1f # U :
- /* Here there are bytes left in the current word. Clear one. */
- addq $24, $24, $24 # E : end-of-count bit <<= 1
+ zapnot t0, t8, t1 # U : was last byte a null?
nop # E :
-2: zap $1, $24, $1 # U :
+ bne t1, 0f # U :
+ nop # E :
nop # E :
- stq_u $1, 0($16) # L :
ret # L0 :
-1: /* Here we must clear the first byte of the next DST word */
- stb $31, 8($16) # L :
- nop # E :
+0: addq t2, a0, a0 # E : address of end-of-count
+ stb zero, 1(a0) # L :
nop # E :
ret # L0 :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f77b82e81bb22ff2d20bcb08c5bb1bf82ee86f8b
commit f77b82e81bb22ff2d20bcb08c5bb1bf82ee86f8b
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Dec 27 17:17:14 2000 +0000
Include internals.h to get prototypes.
diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c
index a56881a..010ad33 100644
--- a/sysdeps/arm/linuxthreads/pspinlock.c
+++ b/sysdeps/arm/linuxthreads/pspinlock.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <pthread.h>
+#include "internals.h"
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=726d3efe36f7a7b6bba6a60232396be20171476d
commit 726d3efe36f7a7b6bba6a60232396be20171476d
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Dec 18 05:55:14 2000 +0000
* sysdeps/s390/pt-machine.h (testandset): Use long int as return
value.
* sysdeps/arm/pt-machine.h (testandset): Likewise.
* sysdeps/hppa/pt-machine.h (testandset): Likewise.
* sysdeps/m68k/pt-machine.h (testandset): Likewise.
* sysdeps/sh/pt-machine.h (testandset): Likewise.
* sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
* sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index d4dc4c4..1079de4 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent pthreads configuration and inline functions.
ARM version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -29,7 +29,7 @@
time; let's hope nobody tries to use one. */
/* Spinlock implementation; required. */
-PT_EI int
+PT_EI long int
testandset (int *spinlock)
{
register unsigned int ret;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74b113601f687be0774b7f273d6287b1c5aa0206
commit 74b113601f687be0774b7f273d6287b1c5aa0206
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 16 18:15:32 2000 +0000
(struct stat): Align with AIX version.
(struct stat64): Likewise.
diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h
index 2d5585d..0b81879 100644
--- a/sysdeps/unix/sysv/aix/bits/stat.h
+++ b/sysdeps/unix/sysv/aix/bits/stat.h
@@ -23,11 +23,7 @@
struct stat
{
__dev_t st_dev; /* Device. */
-#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
- __ino64_t st_ino; /* File serial number. */
-#endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
unsigned short int st_flag; /* Flag word. */
@@ -46,11 +42,7 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int __unused3;
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
- __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
int st_vfstype; /* Type of the filesystem. */
unsigned int st_vfs; /* Vfs number. */
unsigned int st_type; /* Vnode type. */
@@ -69,7 +61,7 @@ struct stat
struct stat64
{
__dev_t st_dev; /* Device. */
- __ino64_t st_ino; /* File serial number. */
+ __ino_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
unsigned short int st_flag; /* Flag word. */
@@ -84,7 +76,7 @@ struct stat64
__time_t st_ctime; /* Time of last status change. */
unsigned long int __unused3;
__blksize_t st_blksize; /* Optimal block size for I/O. */
- __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
int st_vfstype; /* Type of the filesystem. */
unsigned int st_vfs; /* Vfs number. */
unsigned int st_type; /* Vnode type. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f1ae27dd2fa3d1845c35b59c5929ef87c48b3dc0
commit f1ae27dd2fa3d1845c35b59c5929ef87c48b3dc0
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Dec 11 19:27:03 2000 +0000
Declare kernel_sigset_t and use it.
Patch by Hiroyuki Machida <machida@sm.sony.co.jp>.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
index 3742d54..861866d 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -21,11 +21,20 @@ struct old_kernel_sigaction {
#endif
};
+
+#define _KERNEL_NSIG 128
+#define _KERNEL_NSIG_BPW 32
+#define _KERNEL_NSIG_WORDS (_KERNEL_NSIG / _KERNEL_NSIG_BPW)
+
+typedef struct {
+ unsigned long sig[_KERNEL_NSIG_WORDS];
+} kernel_sigset_t;
+
/* This is the sigaction structure from the Linux 2.1.68 kernel. */
struct kernel_sigaction {
unsigned int sa_flags;
__sighandler_t k_sa_handler;
- sigset_t sa_mask;
+ kernel_sigset_t sa_mask;
void (*sa_restorer)(void);
int s_resv[1]; /* reserved */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3289a30e7f3e4f5e9cc768905b775c80a6ff1d24
commit 3289a30e7f3e4f5e9cc768905b775c80a6ff1d24
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 11 04:36:35 2000 +0000
Alpha ev6 sqrtf function.
diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
new file mode 100644
index 0000000..410aff4
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(__ieee754_sqrtf)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ .align 4
+#ifdef _IEEE_FP_INEXACT
+ sqrts/sui $f16, $f0
+#else
+ sqrts/su $f16, $f0
+#endif
+ ret
+ nop
+ nop
+
+END(__ieee754_sqrtf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=678cf91b266822f24fb8450d4f1b9f9baa497cb1
commit 678cf91b266822f24fb8450d4f1b9f9baa497cb1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 11 04:36:20 2000 +0000
Alpha ev6 sqrt functions.
diff --git a/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
new file mode 100644
index 0000000..5bf040a
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/fpu/e_sqrt.S
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(__ieee754_sqrt)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ .align 4
+#ifdef _IEEE_FP_INEXACT
+ sqrtt/sui $f16, $f0
+#else
+ sqrtt/su $f16, $f0
+#endif
+ ret
+ nop
+ nop
+
+END(__ieee754_sqrt)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=033dff7d46574a2b75c8b50d289f6858c9853551
commit 033dff7d46574a2b75c8b50d289f6858c9853551
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 11 04:35:34 2000 +0000
Additional directory searched for alphaev67.
diff --git a/sysdeps/alpha/alphaev67/fpu/Implies b/sysdeps/alpha/alphaev67/fpu/Implies
new file mode 100644
index 0000000..9e3f12d
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/fpu/Implies
@@ -0,0 +1 @@
+alpha/alphaev6/fpu
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02bfc2835e896c850a958bd06387e33706f437c5
commit 02bfc2835e896c850a958bd06387e33706f437c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 10 22:34:40 2000 +0000
Fix a typo.
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 2358861..193986e 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -33,7 +33,7 @@ ENTRY(htonl)
inslh a0, 7, t0 # t0 = 0000000000AABBCC
inswl a0, 3, t1 # t1 = 000000CCDD000000
or t1, t0, t1 # t1 = 000000CCDDAABBCC
- sll t1, 16, t2 # t2 = 0000000000CCDDAA
+ srl t1, 16, t2 # t2 = 0000000000CCDDAA
zapnot t1, 0x0A, t0 # t0 = 00000000DD00BB00
zapnot t2, 0x05, t3 # t3 = 0000000000CC00AA
addl t0, t3, v0 # v0 = ssssssssDDCCBBAA
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e102bd25d37a05b381c3f997e1fbf291c2621790
commit e102bd25d37a05b381c3f997e1fbf291c2621790
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 10 22:27:31 2000 +0000
Exchange t8 with t10.
diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S
index 0df2043..39d731d 100644
--- a/sysdeps/alpha/alphaev6/stxcpy.S
+++ b/sysdeps/alpha/alphaev6/stxcpy.S
@@ -68,9 +68,9 @@ stxcpy_aligned:
ornot t1, t2, t2 # E : (stall)
mskql t0, a1, t0 # U : assemble the first output word
- cmpbge zero, t2, t8 # E : bits set iff null found
+ cmpbge zero, t2, t10 # E : bits set iff null found
or t0, t3, t1 # E : (stall)
- bne t8, $a_eos # U : (stall)
+ bne t10, $a_eos # U : (stall)
/* On entry to this basic block:
t0 == the first destination word for masking back in
@@ -85,29 +85,29 @@ $a_loop:
ldq_u t1, 0(a1) # L : Latency=3
addq a1, 8, a1 # E :
- cmpbge zero, t1, t8 # E : (3 cycle stall)
- beq t8, $a_loop # U : (stall for t8)
+ cmpbge zero, t1, t10 # E : (3 cycle stall)
+ beq t10, $a_loop # U : (stall for t10)
/* Take care of the final (partial) word store.
On entry to this basic block we have:
t1 == the source word containing the null
- t8 == the cmpbge mask that found it. */
+ t10 == the cmpbge mask that found it. */
$a_eos:
- negq t8, t6 # E : find low bit set
- and t8, t6, t10 # E : (stall)
+ negq t10, t6 # E : find low bit set
+ and t10, t6, t8 # E : (stall)
/* For the sake of the cache, don't read a destination word
if we're not going to need it. */
- and t10, 0x80, t6 # E : (stall)
+ and t8, 0x80, t6 # E : (stall)
bne t6, 1f # U : (stall)
/* We're doing a partial word store and so need to combine
our source and original destination words. */
ldq_u t0, 0(a0) # L : Latency=3
- subq t10, 1, t6 # E :
+ subq t8, 1, t6 # E :
zapnot t1, t6, t1 # U : clear src bytes >= null (stall)
- or t10, t6, t8 # E : (stall)
+ or t8, t6, t10 # E : (stall)
- zap t0, t8, t0 # E : clear dst bytes <= null
+ zap t0, t10, t0 # E : clear dst bytes <= null
or t0, t1, t1 # E : (stall)
nop
nop
@@ -170,14 +170,14 @@ $u_head:
or t0, t1, t1 # E : (stall on t1)
or t1, t6, t6 # E :
- cmpbge zero, t6, t8 # E : (stall)
+ cmpbge zero, t6, t10 # E : (stall)
lda t6, -1 # E : for masking just below
- bne t8, $u_final # U : (stall)
+ bne t10, $u_final # U : (stall)
mskql t6, a1, t6 # U : mask out the bits we have
or t6, t2, t2 # E : already extracted before (stall)
- cmpbge zero, t2, t8 # E : testing eos (stall)
- bne t8, $u_late_head_exit # U : (stall)
+ cmpbge zero, t2, t10 # E : testing eos (stall)
+ bne t10, $u_late_head_exit # U : (stall)
/* Finally, we've got all the stupid leading edge cases taken care
of and we can set up to enter the main loop. */
@@ -188,9 +188,9 @@ $u_head:
ldq_u t2, 8(a1) # U : read next high-order source word
addq a1, 8, a1 # E :
- cmpbge zero, t2, t8 # E : (stall for t2)
+ cmpbge zero, t2, t10 # E : (stall for t2)
nop # E :
- bne t8, $u_eos # U : (stall)
+ bne t10, $u_eos # U : (stall)
/* Unaligned copy main loop. In order to avoid reading too much,
the loop is structured to detect zeros in aligned source words.
@@ -217,8 +217,8 @@ $u_loop:
stq_u t1, -8(a0) # L : save the current word (stall)
mov t3, t0 # E :
- cmpbge zero, t2, t8 # E : test new word for eos
- beq t8, $u_loop # U : (stall)
+ cmpbge zero, t2, t10 # E : test new word for eos
+ beq t10, $u_loop # U : (stall)
nop
nop
@@ -233,31 +233,31 @@ $u_loop:
$u_eos:
extqh t2, a1, t1 # U :
or t0, t1, t1 # E : first (partial) source word complete (stall)
- cmpbge zero, t1, t8 # E : is the null in this first bit? (stall)
- bne t8, $u_final # U : (stall)
+ cmpbge zero, t1, t10 # E : is the null in this first bit? (stall)
+ bne t10, $u_final # U : (stall)
$u_late_head_exit:
stq_u t1, 0(a0) # L : the null was in the high-order bits
addq a0, 8, a0 # E :
extql t2, a1, t1 # U :
- cmpbge zero, t1, t8 # E : (stall)
+ cmpbge zero, t1, t10 # E : (stall)
/* Take care of a final (probably partial) result word.
On entry to this basic block:
t1 == assembled source word
- t8 == cmpbge mask that found the null. */
+ t10 == cmpbge mask that found the null. */
$u_final:
- negq t8, t6 # E : isolate low bit set
- and t6, t8, t10 # E : (stall)
- and t10, 0x80, t6 # E : avoid dest word load if we can (stall)
+ negq t10, t6 # E : isolate low bit set
+ and t6, t10, t8 # E : (stall)
+ and t8, 0x80, t6 # E : avoid dest word load if we can (stall)
bne t6, 1f # U : (stall)
ldq_u t0, 0(a0) # E :
- subq t10, 1, t6 # E :
- or t6, t10, t8 # E : (stall)
+ subq t8, 1, t6 # E :
+ or t6, t8, t10 # E : (stall)
zapnot t1, t6, t1 # U : kill source bytes >= null (stall)
- zap t0, t8, t0 # U : kill dest bytes <= null (2 cycle data stall)
+ zap t0, t10, t0 # U : kill dest bytes <= null (2 cycle data stall)
or t0, t1, t1 # E : (stall)
nop
nop
@@ -291,14 +291,14 @@ $unaligned:
subq a1, t4, a1 # E : sub dest misalignment from src addr
/* If source misalignment is larger than dest misalignment, we need
extra startup checks to avoid SEGV. */
- cmplt t4, t5, t10 # E :
- beq t10, $u_head # U :
+ cmplt t4, t5, t8 # E :
+ beq t8, $u_head # U :
lda t2, -1 # E : mask out leading garbage in source
mskqh t2, t5, t2 # U :
ornot t1, t2, t3 # E : (stall)
- cmpbge zero, t3, t8 # E : is there a zero? (stall)
- beq t8, $u_head # U : (stall)
+ cmpbge zero, t3, t10 # E : is there a zero? (stall)
+ beq t10, $u_head # U : (stall)
/* At this point we've found a zero in the first partial word of
the source. We need to isolate the valid source data and mask
@@ -306,14 +306,14 @@ $unaligned:
that we'll need at least one byte of that original dest word.) */
ldq_u t0, 0(a0) # L :
- negq t8, t6 # E : build bitmask of bytes <= zero
- and t6, t8, t10 # E : (stall)
+ negq t10, t6 # E : build bitmask of bytes <= zero
+ and t6, t10, t8 # E : (stall)
and a1, 7, t5 # E :
- subq t10, 1, t6 # E :
- or t6, t10, t8 # E : (stall)
- srl t10, t5, t10 # U : adjust final null return value
- zapnot t2, t8, t2 # U : prepare source word; mirror changes (stall)
+ subq t8, 1, t6 # E :
+ or t6, t8, t10 # E : (stall)
+ srl t8, t5, t8 # U : adjust final null return value
+ zapnot t2, t10, t2 # U : prepare source word; mirror changes (stall)
and t1, t2, t1 # E : to source validity mask
extql t2, a1, t2 # U :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0fe91e7724c208992b6fbed86920c2584cc3f65
commit f0fe91e7724c208992b6fbed86920c2584cc3f65
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Dec 9 18:32:00 2000 +0000
New file, copy from generic linux version with small changes due to
different sigset_t.
diff --git a/sysdeps/unix/sysv/linux/mips/sigaction.c b/sysdeps/unix/sysv/linux/mips/sigaction.c
new file mode 100644
index 0000000..36265d1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sigaction.c
@@ -0,0 +1,139 @@
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+/* The difference here is that the sigaction structure used in the
+ kernel is not the same as we use in the libc. Therefore we must
+ translate it here. */
+#include <kernel_sigaction.h>
+
+#if __ASSUME_REALTIME_SIGNALS == 0
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. This is the definition. */
+int __libc_missing_rt_sigs;
+
+extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
+ struct old_kernel_sigaction *__unbounded);
+#endif
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
+ struct kernel_sigaction *__unbounded, size_t);
+
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+ If OACT is not NULL, put the old action for SIG in *OACT. */
+int
+__libc_sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
+{
+#if __ASSUME_REALTIME_SIGNALS == 0
+ struct old_kernel_sigaction k_sigact, k_osigact;
+#endif
+ int result;
+
+#if defined __NR_rt_sigaction || __ASSUME_REALTIME_SIGNALS > 0
+ /* First try the RT signals. */
+# if __ASSUME_REALTIME_SIGNALS == 0
+ if (!__libc_missing_rt_sigs)
+# endif
+ {
+ struct kernel_sigaction kact, koact;
+ /* Save the current error value for later. We need not do this
+ if we are guaranteed to have realtime signals. */
+# if __ASSUME_REALTIME_SIGNALS == 0
+ int saved_errno = errno;
+# endif
+
+ if (act)
+ {
+ kact.k_sa_handler = act->sa_handler;
+ memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kernel_sigset_t));
+ kact.sa_flags = act->sa_flags;
+# ifdef HAVE_SA_RESTORER
+ kact.sa_restorer = act->sa_restorer;
+# endif
+ }
+
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ result = INLINE_SYSCALL (rt_sigaction, 4, sig,
+ act ? __ptrvalue (&kact) : NULL,
+ oact ? __ptrvalue (&koact) : NULL,
+ sizeof (kernel_sigset_t));
+
+# if __ASSUME_REALTIME_SIGNALS == 0
+ if (result >= 0 || errno != ENOSYS)
+# endif
+ {
+ if (oact && result >= 0)
+ {
+ oact->sa_handler = koact.k_sa_handler;
+ memcpy (&oact->sa_mask, &koact.sa_mask,
+ sizeof (kernel_sigset_t));
+ oact->sa_flags = koact.sa_flags;
+# ifdef HAVE_SA_RESTORER
+ oact->sa_restorer = koact.sa_restorer;
+# endif
+ }
+ return result;
+ }
+
+# if __ASSUME_REALTIME_SIGNALS == 0
+ __set_errno (saved_errno);
+ __libc_missing_rt_sigs = 1;
+# endif
+ }
+#endif
+
+#if __ASSUME_REALTIME_SIGNALS == 0
+ if (act)
+ {
+ k_sigact.k_sa_handler = act->sa_handler;
+ k_sigact.sa_mask = act->sa_mask.__val[0];
+ k_sigact.sa_flags = act->sa_flags;
+# ifdef HAVE_SA_RESTORER
+ k_sigact.sa_restorer = act->sa_restorer;
+# endif
+ }
+ result = INLINE_SYSCALL (sigaction, 3, sig,
+ act ? __ptrvalue (&k_sigact) : NULL,
+ oact ? __ptrvalue (&k_osigact) : NULL);
+ if (oact && result >= 0)
+ {
+ oact->sa_handler = k_osigact.k_sa_handler;
+ oact->sa_mask.__val[0] = k_osigact.sa_mask;
+ oact->sa_flags = k_osigact.sa_flags;
+# ifdef HAVE_SA_RESTORER
+ oact->sa_restorer = k_osigact.sa_restorer;
+# endif
+ }
+ return result;
+#endif
+}
+
+weak_alias (__libc_sigaction, __sigaction)
+weak_alias (__libc_sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f8a9b39de8330055a20cfc11c48d264ed1ae0a4
commit 1f8a9b39de8330055a20cfc11c48d264ed1ae0a4
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Dec 9 18:31:01 2000 +0000
Removed, we can use the generic version.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h
deleted file mode 100644
index a17153c..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/acct.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_ACCT_H
-
-#define _SYS_ACCT_H 1
-#include <features.h>
-
-#define __need_time_t
-#include <time.h>
-
-
-__BEGIN_DECLS
-
-#define ACCT_COMM 16
-
-struct acct
- {
- char ac_comm[ACCT_COMM]; /* Accounting command name. */
- time_t ac_utime; /* Accounting user time. */
- time_t ac_stime; /* Accounting system time. */
- time_t ac_etime; /* Accounting elapsed time. */
- time_t ac_btime; /* Beginning time. */
- long int ac_uid; /* Accounting user ID. */
- long int ac_gid; /* Accounting group ID. */
- unsigned long int ac_tty; /* Controlling tty. */
- /* Please note that the value of the `ac_tty' field, a device number,
- is encoded differently in the kernel and for the libc dev_t type. */
- char ac_flag; /* Accounting flag. */
- long int ac_minflt; /* Accounting minor pagefaults. */
- long int ac_majflt; /* Accounting major pagefaults. */
- long int ac_exitcode; /* Accounting process exitcode. */
- };
-
-enum
- {
- AFORK = 0001, /* Has executed fork, but no exec. */
- ASU = 0002, /* Used super-user privileges. */
- ACORE = 0004, /* Dumped core. */
- AXSIG = 0010 /* Killed by a signal. */
- };
-
-#define AHZ 100
-
-
-/* Switch process accounting on and off. */
-extern int acct (__const char *__filename) __THROW;
-
-__END_DECLS
-
-#endif /* sys/acct.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4eae4d050d5bdfe806f0dae0e56c63d6f7caaf37
commit 4eae4d050d5bdfe806f0dae0e56c63d6f7caaf37
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:20:22 2000 +0000
Alpha ev67 strncat implementation.
diff --git a/sysdeps/alpha/alphaev67/strncat.S b/sysdeps/alpha/alphaev67/strncat.S
new file mode 100644
index 0000000..4d199d9
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/strncat.S
@@ -0,0 +1,101 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
+ EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Append no more than COUNT characters from the null-terminated string SRC
+ to the null-terminated string DST. Always null-terminate the new DST. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .text
+
+ENTRY(strncat)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ mov $16, $0 # set up return value
+ beq $18, $zerocount # U :
+ /* Find the end of the string. */
+ ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned)
+ lda $2, -1($31) # E :
+
+ insqh $2, $0, $2 # U :
+ andnot $16, 7, $16 # E :
+ nop # E :
+ or $2, $1, $1 # E :
+
+ nop # E :
+ nop # E :
+ cmpbge $31, $1, $2 # E : bits set iff byte == 0
+ bne $2, $found # U :
+
+$loop: ldq $1, 8($16) # L :
+ addq $16, 8, $16 # E :
+ cmpbge $31, $1, $2 # E :
+ beq $2, $loop # U :
+
+$found: cttz $2, $3 # U0 :
+ addq $16, $3, $16 # E :
+ jsr $23, __stxncpy # L0 :/* Now do the append. */
+
+ /* Worry about the null termination. */
+
+ zapnot $1, $27, $2 # U : was last byte a null?
+ cmplt $27, $24, $5 # E : did we fill the buffer completely?
+ bne $2, 0f # U :
+ ret # L0 :
+
+0: or $5, $18, $2 # E :
+ nop
+ bne $2, 2f # U :
+ and $24, 0x80, $3 # E : no zero next byte
+
+ nop # E :
+ bne $3, 1f # U :
+ /* Here there are bytes left in the current word. Clear one. */
+ addq $24, $24, $24 # E : end-of-count bit <<= 1
+ nop # E :
+
+2: zap $1, $24, $1 # U :
+ nop # E :
+ stq_u $1, 0($16) # L :
+ ret # L0 :
+
+1: /* Here we must clear the first byte of the next DST word */
+ stb $31, 8($16) # L :
+ nop # E :
+ nop # E :
+ ret # L0 :
+
+$zerocount:
+ nop # E :
+ nop # E :
+ nop # E :
+ ret # L0 :
+
+ END(strncat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19db7d8141db6d6ae429fb635fe201a9a3166644
commit 19db7d8141db6d6ae429fb635fe201a9a3166644
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:20:12 2000 +0000
Alpha ev67 strlen implementation.
diff --git a/sysdeps/alpha/alphaev67/strlen.S b/sysdeps/alpha/alphaev67/strlen.S
new file mode 100644
index 0000000..ac8740f
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/strlen.S
@@ -0,0 +1,61 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+ EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Finds length of a 0-terminated string. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(strlen)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ ldq_u $1, 0($16) # L : load first quadword ($16 may be misaligned)
+ lda $2, -1($31) # E :
+ insqh $2, $16, $2 # U :
+ andnot $16, 7, $0 # E :
+
+ or $2, $1, $1 # E :
+ cmpbge $31, $1, $2 # E : $2 <- bitmask: bit i == 1 <==> i-th byte == 0
+ nop # E :
+ bne $2, $found # U :
+
+$loop: ldq $1, 8($0) # L :
+ addq $0, 8, $0 # E : addr += 8
+ cmpbge $31, $1, $2 # E :
+ beq $2, $loop # U :
+
+$found:
+ cttz $2, $3 # U0 :
+ addq $0, $3, $0 # E :
+ subq $0, $16, $0 # E :
+ ret $31, ($26) # L0 :
+
+ END(strlen)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63b2d532aa71f5ce10c0026eb3766577c5ddc2cf
commit 63b2d532aa71f5ce10c0026eb3766577c5ddc2cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:20:02 2000 +0000
Alpha ev67 strchr implementation.
diff --git a/sysdeps/alpha/alphaev67/strchr.S b/sysdeps/alpha/alphaev67/strchr.S
new file mode 100644
index 0000000..3ab2655
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/strchr.S
@@ -0,0 +1,101 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
+ EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Return the address of a given character within a null-terminated
+ string, or null if it is not found. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(strchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ ldq_u t0, 0(a0) # L : load first quadword Latency=3
+ and a1, 0xff, t3 # E : 00000000000000ch
+ insbl a1, 1, t5 # U : 000000000000ch00
+ insbl a1, 7, a2 # U : ch00000000000000
+
+ insbl t3, 6, a3 # U : 00ch000000000000
+ or t5, t3, a1 # E : 000000000000chch
+ andnot a0, 7, v0 # E : align our loop pointer
+ lda t4, -1 # E : build garbage mask
+
+ mskqh t4, a0, t4 # U : only want relevant part of first quad
+ or a2, a3, a2 # E : chch000000000000
+ inswl a1, 2, t5 # E : 00000000chch0000
+ inswl a1, 4, a3 # E : 0000chch00000000
+
+ or a1, a2, a1 # E : chch00000000chch
+ or a3, t5, t5 # E : 0000chchchch0000
+ cmpbge zero, t0, t2 # E : bits set iff byte == zero
+ cmpbge zero, t4, t4 # E : bits set iff byte is garbage
+
+ /* This quad is _very_ serialized. Lots of stalling happens */
+ or t5, a1, a1 # E : chchchchchchchch
+ xor t0, a1, t1 # E : make bytes == c zero
+ cmpbge zero, t1, t3 # E : bits set iff byte == c
+ or t2, t3, t0 # E : bits set iff char match or zero match
+
+ andnot t0, t4, t0 # E : clear garbage bits
+ cttz t0, a2 # U0 : speculative (in case we get a match)
+ nop # E :
+ bne t0, $found # U :
+
+ /*
+ * Yuk. This loop is going to stall like crazy waiting for the
+ * data to be loaded. Not much can be done about it unless it's
+ * unrolled multiple times, which is generally unsafe.
+ */
+$loop:
+ ldq t0, 8(v0) # L : Latency=3
+ addq v0, 8, v0 # E :
+ xor t0, a1, t1 # E :
+ cmpbge zero, t0, t2 # E : bits set iff byte == 0
+
+ cmpbge zero, t1, t3 # E : bits set iff byte == c
+ or t2, t3, t0 # E :
+ cttz t3, a2 # U0 : speculative (in case we get a match)
+ beq t0, $loop # U :
+
+$found:
+ negq t0, t1 # E : clear all but least set bit
+ and t0, t1, t0 # E :
+ and t0, t3, t1 # E : bit set iff byte was the char
+ addq v0, a2, v0 # E : Add in the bit number from above
+
+ cmoveq t1, $31, v0 # E : Two mapping slots, latency = 2
+ nop
+ nop
+ ret # L0 :
+
+ END(strchr)
+
+weak_alias (strchr, index)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45327bf72db9f92a37db054d23674c463acc942b
commit 45327bf72db9f92a37db054d23674c463acc942b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:54 2000 +0000
Alpha ev67 strcat implementation.
diff --git a/sysdeps/alpha/alphaev67/strcat.S b/sysdeps/alpha/alphaev67/strcat.S
new file mode 100644
index 0000000..88e48ce
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/strcat.S
@@ -0,0 +1,62 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
+ EV67 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Append a null-terminated string from SRC to DST. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .text
+
+ENTRY(strcat)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ mov $16, $0 # E : set up return value
+ /* Find the end of the string. */
+ ldq_u $1, 0($16) # L : load first quadword (a0 may be misaligned)
+ lda $2, -1 # E :
+ insqh $2, $16, $2 # U :
+
+ andnot $16, 7, $16 # E :
+ or $2, $1, $1 # E :
+ cmpbge $31, $1, $2 # E : bits set iff byte == 0
+ bne $2, $found # U :
+
+$loop: ldq $1, 8($16) # L :
+ addq $16, 8, $16 # E :
+ cmpbge $31, $1, $2 # E :
+ beq $2, $loop # U :
+
+$found: cttz $2, $3 # U0 :
+ addq $16, $3, $16 # E :
+ /* Now do the append. */
+ mov $26, $23 # E :
+ jmp $31, __stxcpy # L0 :
+
+ END(strcat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bf55e62a3729f3862bfdada1c9b6cee5933c8cc
commit 9bf55e62a3729f3862bfdada1c9b6cee5933c8cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:44 2000 +0000
Alpha ev67 stpncpy implementation.
diff --git a/sysdeps/alpha/alphaev67/stpncpy.S b/sysdeps/alpha/alphaev67/stpncpy.S
new file mode 100644
index 0000000..d648b4d
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/stpncpy.S
@@ -0,0 +1,116 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@redhat.com)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Copy no more then N bytes from SRC to DEST, returning the address of
+ the terminating '\0' in DEST. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noat
+ .set noreorder
+ .text
+
+ENTRY(__stpncpy)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
+ .prologue 1
+
+ mov a0, v0
+ beq a2, $zerocount
+
+ .align 4
+ nop
+ nop
+ jsr t9, __stxncpy # do the work of the copy
+
+ cttz t8, t4
+ zapnot t0, t8, t5
+ andnot a0, 7, a0
+ bne a2, $multiword # do we have full words left?
+
+ subq t8, 1, t2
+ subq t10, 1, t3
+ cmpult zero, t5, t5
+ addq a0, t4, v0
+
+ or t2, t8, t2
+ or t3, t10, t3
+ addq v0, t5, v0
+ andnot t3, t2, t3
+
+ zap t0, t3, t0
+ nop
+ stq t0, 0(a0)
+ ret
+
+$multiword:
+ subq t8, 1, t7 # clear the final bits in the prev word
+ cmpult zero, t5, t5
+ or t7, t8, t7
+ zapnot t0, t7, t0
+
+ subq a2, 1, a2
+ stq t0, 0(a0)
+ addq a0, 8, a1
+ beq a2, 1f # loop over full words remaining
+
+ nop
+ nop
+ nop
+ blbc a2, 0f
+
+ stq zero, 0(a1)
+ subq a2, 1, a2
+ addq a1, 8, a1
+ beq a2, 1f
+
+0: stq zero, 0(a1)
+ subq a2, 2, a2
+ nop
+ nop
+
+ stq zero, 8(a1)
+ addq a1, 16, a1
+ nop
+ bne a2, 0b
+
+1: ldq t0, 0(a1) # clear the leading bits in the final word
+ subq t10, 1, t7
+ addq a0, t4, v0
+ nop
+
+ or t7, t10, t7
+ addq v0, t5, v0
+ zap t0, t7, t0
+ stq t0, 0(a1)
+
+$zerocount:
+ nop
+ nop
+ nop
+ ret
+
+ END(__stpncpy)
+
+weak_alias (__stpncpy, stpncpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b2cc2fa966d942c6fb9677acbbfc4da1be21549
commit 6b2cc2fa966d942c6fb9677acbbfc4da1be21549
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:31 2000 +0000
Alpha ev67 stpcpyrawmemchr implementation.
diff --git a/sysdeps/alpha/alphaev67/stpcpy.S b/sysdeps/alpha/alphaev67/stpcpy.S
new file mode 100644
index 0000000..6dcb366
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/stpcpy.S
@@ -0,0 +1,52 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@redhat.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Copy SRC to DEST returning the address of the terminating 0 in DEST. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+ .text
+
+ENTRY(__stpcpy)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
+ .prologue 1
+
+ .align 4
+ mov a0, v0
+ nop
+ jsr t9, __stxcpy
+
+ # t8 = bitmask (with one bit set) indicating the last byte written
+ # a0 = unaligned address of the last *word* written
+
+ cttz t8, t8
+ andnot a0, 7, a0
+ addq a0, t8, v0
+ ret
+
+ END(__stpcpy)
+
+weak_alias (__stpcpy, stpcpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f345d77fb7c4cd00511b4848137654903fdfb8f5
commit f345d77fb7c4cd00511b4848137654903fdfb8f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:22 2000 +0000
Alpha ev67 rawmemchr implementation.
diff --git a/sysdeps/alpha/alphaev67/rawmemchr.S b/sysdeps/alpha/alphaev67/rawmemchr.S
new file mode 100644
index 0000000..6626ecc
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/rawmemchr.S
@@ -0,0 +1,93 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Return pointer to first occurrence of CH in STR. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(__rawmemchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ ldq_u t0, 0(a0) # L : load first quadword Latency=3
+ and a1, 0xff, t3 # E : 00000000000000ch
+ insbl a1, 1, t5 # U : 000000000000ch00
+ insbl a1, 7, a2 # U : ch00000000000000
+
+ insbl t3, 6, a3 # U : 00ch000000000000
+ or t5, t3, a1 # E : 000000000000chch
+ andnot a0, 7, v0 # E : align our loop pointer
+ lda t4, -1 # E : build garbage mask
+
+ mskqh t4, a0, t4 # U : only want relevant part of first quad
+ or a2, a3, a2 # E : chch000000000000
+ inswl a1, 2, t5 # E : 00000000chch0000
+ inswl a1, 4, a3 # E : 0000chch00000000
+
+ or a1, a2, a1 # E : chch00000000chch
+ or a3, t5, t5 # E : 0000chchchch0000
+ cmpbge zero, t4, t4 # E : bits set iff byte is garbage
+ nop # E :
+
+ /* This quad is _very_ serialized. Lots of stalling happens */
+ or t5, a1, a1 # E : chchchchchchchch
+ xor t0, a1, t1 # E : make bytes == c zero
+ cmpbge zero, t1, t0 # E : bits set iff byte == c
+ andnot t0, t4, t0 # E : clear garbage bits
+
+ cttz t0, a2 # U0 : speculative (in case we get a match)
+ nop # E :
+ nop # E :
+ bne t0, $found # U :
+
+ /*
+ * Yuk. This loop is going to stall like crazy waiting for the
+ * data to be loaded. Not much can be done about it unless it's
+ * unrolled multiple times, which is generally unsafe.
+ */
+$loop:
+ ldq t0, 8(v0) # L : Latency=3
+ addq v0, 8, v0 # E :
+ xor t0, a1, t1 # E :
+ cmpbge zero, t1, t0 # E : bits set iff byte == c
+
+ cttz t0, a2 # U0 : speculative (in case we get a match)
+ nop # E :
+ nop # E :
+ beq t0, $loop # U :
+
+$found:
+ negq t0, t1 # E : clear all but least set bit
+ and t0, t1, t0 # E :
+ addq v0, a2, v0 # E : Add in the bit number from above
+ ret # L0 :
+
+ END(__rawmemchr)
+
+weak_alias (__rawmemchr, rawmemchr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a3b0b275e4bc7c184271cd28c9c99ac8ce08fd7
commit 7a3b0b275e4bc7c184271cd28c9c99ac8ce08fd7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:13 2000 +0000
Alpha ev67 ffsll implementation.
diff --git a/sysdeps/alpha/alphaev67/ffsll.S b/sysdeps/alpha/alphaev67/ffsll.S
new file mode 100644
index 0000000..b755649
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/ffsll.S
@@ -0,0 +1,45 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Finds the first bit set in a long. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(ffsl)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ cttz $16, $0
+ addq $0, 1, $0
+ cmoveq $16, 0, $0
+ ret
+
+END(ffsl)
+
+weak_extern (ffsl)
+weak_alias (ffsl, ffsll)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bccd062874921a878f886822774ff3f430291019
commit bccd062874921a878f886822774ff3f430291019
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:19:03 2000 +0000
Alpha ev67 ffs implementation.
diff --git a/sysdeps/alpha/alphaev67/ffs.S b/sysdeps/alpha/alphaev67/ffs.S
new file mode 100644
index 0000000..a6e8877
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/ffs.S
@@ -0,0 +1,50 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Finds the first bit set in an integer. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+
+ENTRY(__ffs)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ zap $16, 0xF0, $16
+ cttz $16, $0
+ addq $0, 1, $0
+ cmoveq $16, 0, $0
+
+ nop
+ nop
+ nop
+ ret
+
+END(__ffs)
+
+weak_alias (__ffs, ffs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e6bafa8267f55d8ac19d3a01e67b1ae35251d2a
commit 6e6bafa8267f55d8ac19d3a01e67b1ae35251d2a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:50 2000 +0000
Alpha ev6 stxncpy implementation.
diff --git a/sysdeps/alpha/alphaev6/stxncpy.S b/sysdeps/alpha/alphaev6/stxncpy.S
new file mode 100644
index 0000000..1402791
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/stxncpy.S
@@ -0,0 +1,405 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+ EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Copy no more than COUNT bytes of the null-terminated string from
+ SRC to DST.
+
+ This is an internal routine used by strncpy, stpncpy, and strncat.
+ As such, it uses special linkage conventions to make implementation
+ of these public functions more efficient.
+
+ On input:
+ t9 = return address
+ a0 = DST
+ a1 = SRC
+ a2 = COUNT
+
+ Furthermore, COUNT may not be zero.
+
+ On output:
+ t0 = last word written
+ t8 = bitmask (with one bit set) indicating the last byte written
+ t10 = bitmask (with one bit set) indicating the byte position of
+ the end of the range specified by COUNT
+ a0 = unaligned address of the last *word* written
+ a2 = the number of full words left in COUNT
+
+ Furthermore, v0, a3-a5, t11, and t12 are untouched.
+*/
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noat
+ .set noreorder
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the
+ aligned copy in its own procedure descriptor */
+
+
+ .ent stxncpy_aligned
+ .align 4
+stxncpy_aligned:
+ .frame sp, 0, t9, 0
+ .prologue 0
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == the first source word. */
+
+ /* Create the 1st output word and detect 0's in the 1st input word. */
+ lda t2, -1 # E : build a mask against false zero
+ mskqh t2, a1, t2 # U : detection in the src word (stall)
+ mskqh t1, a1, t3 # U :
+ ornot t1, t2, t2 # E : (stall)
+
+ mskql t0, a1, t0 # U : assemble the first output word
+ cmpbge zero, t2, t7 # E : bits set iff null found
+ or t0, t3, t0 # E : (stall)
+ beq a2, $a_eoc # U :
+
+ bne t7, $a_eos # U :
+ nop
+ nop
+ nop
+
+ /* On entry to this basic block:
+ t0 == a source word not containing a null. */
+
+ /*
+ * nops here to:
+ * separate store quads from load quads
+ * limit of 1 bcond/quad to permit training
+ */
+$a_loop:
+ stq_u t0, 0(a0) # L :
+ addq a0, 8, a0 # E :
+ subq a2, 1, a2 # E :
+ nop
+
+ ldq_u t0, 0(a1) # L :
+ addq a1, 8, a1 # E :
+ cmpbge zero, t0, t7 # E :
+ beq a2, $a_eoc # U :
+
+ beq t7, $a_loop # U :
+ nop
+ nop
+ nop
+
+ /* Take care of the final (partial) word store. At this point
+ the end-of-count bit is set in t7 iff it applies.
+
+ On entry to this basic block we have:
+ t0 == the source word containing the null
+ t7 == the cmpbge mask that found it. */
+
+$a_eos:
+ negq t7, t8 # E : find low bit set
+ and t7, t8, t8 # E : (stall)
+ /* For the sake of the cache, don't read a destination word
+ if we're not going to need it. */
+ and t8, 0x80, t6 # E : (stall)
+ bne t6, 1f # U : (stall)
+
+ /* We're doing a partial word store and so need to combine
+ our source and original destination words. */
+ ldq_u t1, 0(a0) # L :
+ subq t8, 1, t6 # E :
+ or t8, t6, t7 # E : (stall)
+ zapnot t0, t7, t0 # U : clear src bytes > null (stall)
+
+ zap t1, t7, t1 # .. e1 : clear dst bytes <= null
+ or t0, t1, t0 # e1 : (stall)
+ nop
+ nop
+
+1: stq_u t0, 0(a0) # L :
+ ret (t9) # L0 : Latency=3
+ nop
+ nop
+
+ /* Add the end-of-count bit to the eos detection bitmask. */
+$a_eoc:
+ or t10, t7, t7 # E :
+ br $a_eos # L0 : Latency=3
+ nop
+ nop
+
+ .end stxncpy_aligned
+
+ .align 4
+ .ent __stxncpy
+ .globl __stxncpy
+__stxncpy:
+ .frame sp, 0, t9, 0
+ .prologue 0
+
+ /* Are source and destination co-aligned? */
+ xor a0, a1, t1 # E :
+ and a0, 7, t0 # E : find dest misalignment
+ and t1, 7, t1 # E : (stall)
+ addq a2, t0, a2 # E : bias count by dest misalignment (stall)
+
+ subq a2, 1, a2 # E :
+ and a2, 7, t2 # E : (stall)
+ srl a2, 3, a2 # U : a2 = loop counter = (count - 1)/8 (stall)
+ addq zero, 1, t10 # E :
+
+ sll t10, t2, t10 # U : t10 = bitmask of last count byte
+ bne t1, $unaligned # U :
+ /* We are co-aligned; take care of a partial first word. */
+ ldq_u t1, 0(a1) # L : load first src word
+ addq a1, 8, a1 # E :
+
+ beq t0, stxncpy_aligned # U : avoid loading dest word if not needed
+ ldq_u t0, 0(a0) # L :
+ nop
+ nop
+
+ br stxncpy_aligned # .. e1 :
+ nop
+ nop
+ nop
+
+
+
+/* The source and destination are not co-aligned. Align the destination
+ and cope. We have to be very careful about not reading too much and
+ causing a SEGV. */
+
+ .align 4
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full source word. We can still find a zero at the end of it
+ that prevents us from outputting the whole thing.
+
+ On entry to this basic block:
+ t0 == the first dest word, unmasked
+ t1 == the shifted low bits of the first source word
+ t6 == bytemask that is -1 in dest word bytes */
+
+ ldq_u t2, 8(a1) # L : Latency=3 load second src word
+ addq a1, 8, a1 # E :
+ mskql t0, a0, t0 # U : mask trailing garbage in dst
+ extqh t2, a1, t4 # U : (3 cycle stall on t2)
+
+ or t1, t4, t1 # E : first aligned src word complete (stall)
+ mskqh t1, a0, t1 # U : mask leading garbage in src (stall)
+ or t0, t1, t0 # E : first output word complete (stall)
+ or t0, t6, t6 # E : mask original data for zero test (stall)
+
+ cmpbge zero, t6, t7 # E :
+ beq a2, $u_eocfin # U :
+ nop
+ nop
+
+ bne t7, $u_final # U :
+ lda t6, -1 # E : mask out the bits we have
+ mskql t6, a1, t6 # U : already seen (stall)
+ stq_u t0, 0(a0) # L : store first output word
+
+ or t6, t2, t2 # E :
+ cmpbge zero, t2, t7 # E : find nulls in second partial (stall)
+ addq a0, 8, a0 # E :
+ subq a2, 1, a2 # E :
+
+ bne t7, $u_late_head_exit # U :
+ /* Finally, we've got all the stupid leading edge cases taken care
+ of and we can set up to enter the main loop. */
+ extql t2, a1, t1 # U : position hi-bits of lo word
+ ldq_u t2, 8(a1) # L : read next high-order source word
+ addq a1, 8, a1 # E :
+
+ cmpbge zero, t2, t7 # E : (stall)
+ beq a2, $u_eoc # U :
+ nop
+ nop
+
+ bne t7, $u_eos # e1 :
+ nop
+ nop
+ nop
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned source words.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word
+
+ We further know that t2 does not contain a null terminator. */
+
+ .align 4
+$u_loop:
+ extqh t2, a1, t0 # U : extract high bits for current word
+ addq a1, 8, a1 # E :
+ extql t2, a1, t3 # U : extract low bits for next time
+ addq a0, 8, a0 # E :
+
+ or t0, t1, t0 # E : current dst word now complete
+ ldq_u t2, 0(a1) # U : Latency=3 load high word for next time
+ stq_u t0, -8(a0) # U : save the current word (stall)
+ mov t3, t1 # E :
+
+ subq a2, 1, a2 # E :
+ cmpbge zero, t2, t7 # E : test new word for eos (2 cycle stall for data)
+ beq a2, $u_eoc # U : (stall)
+ nop
+
+ beq t7, $u_loop # U :
+ nop
+ nop
+ nop
+
+ /* We've found a zero somewhere in the source word we just read.
+ If it resides in the lower half, we have one (probably partial)
+ word to write out, and if it resides in the upper half, we
+ have one full and one partial word left to write out.
+
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word. */
+$u_eos:
+ extqh t2, a1, t0 # U :
+ or t0, t1, t0 # E : first (partial) source word complete (stall)
+ cmpbge zero, t0, t7 # E : is the null in this first bit? (stall)
+ bne t7, $u_final # U : (stall)
+
+ stq_u t0, 0(a0) # L : the null was in the high-order bits
+ addq a0, 8, a0 # E :
+ subq a2, 1, a2 # E :
+ nop
+
+$u_late_head_exit:
+ extql t2, a1, t0 # U :
+ cmpbge zero, t0, t7 # E :
+ or t7, t10, t6 # E : (stall)
+ cmoveq a2, t6, t7 # E : Latency=2, extra map slot (stall)
+
+ /* Take care of a final (probably partial) result word.
+ On entry to this basic block:
+ t0 == assembled source word
+ t7 == cmpbge mask that found the null. */
+$u_final:
+ negq t7, t6 # E : isolate low bit set
+ and t6, t7, t8 # E : (stall)
+ and t8, 0x80, t6 # E : avoid dest word load if we can (stall)
+ bne t6, 1f # U : (stall)
+
+ ldq_u t1, 0(a0) # L :
+ subq t8, 1, t6 # E :
+ or t6, t8, t7 # E : (stall)
+ zapnot t0, t7, t0 # U : kill source bytes > null
+
+ zap t1, t7, t1 # U : kill dest bytes <= null
+ or t0, t1, t0 # E : (stall)
+ nop
+ nop
+
+1: stq_u t0, 0(a0) # L :
+ ret (t9) # L0 : Latency=3
+
+$u_eoc: # end-of-count
+ extqh t2, a1, t0 # U :
+ or t0, t1, t0 # E : (stall)
+ cmpbge zero, t0, t7 # E : (stall)
+ nop
+
+$u_eocfin: # end-of-count, final word
+ or t10, t7, t7 # E :
+ br $u_final # L0 : Latency=3
+ nop
+ nop
+
+ /* Unaligned copy entry point. */
+ .align 4
+$unaligned:
+
+ ldq_u t1, 0(a1) # L : load first source word
+ and a0, 7, t4 # E : find dest misalignment
+ and a1, 7, t5 # E : find src misalignment
+ /* Conditionally load the first destination word and a bytemask
+ with 0xff indicating that the destination byte is sacrosanct. */
+ mov zero, t0 # E :
+
+ mov zero, t6 # E :
+ beq t4, 1f # U :
+ ldq_u t0, 0(a0) # L :
+ lda t6, -1 # E :
+
+ mskql t6, a0, t6 # U :
+ nop
+ nop
+ nop
+1:
+ subq a1, t4, a1 # E : sub dest misalignment from src addr
+
+ /* If source misalignment is larger than dest misalignment, we need
+ extra startup checks to avoid SEGV. */
+
+ cmplt t4, t5, t8 # E :
+ extql t1, a1, t1 # U : shift src into place
+ lda t2, -1 # E : for creating masks later
+ beq t8, $u_head # U : (stall)
+
+ mskqh t2, t5, t2 # U : begin src byte validity mask
+ cmpbge zero, t1, t7 # E : is there a zero?
+ extql t2, a1, t2 # U :
+ or t7, t10, t5 # E : test for end-of-count too
+
+ cmpbge zero, t2, t3 # E :
+ cmoveq a2, t5, t7 # E : Latency=2, extra map slot
+ nop # E : keep with cmoveq
+ andnot t7, t3, t7 # E : (stall)
+
+ beq t7, $u_head # U :
+ /* At this point we've found a zero in the first partial word of
+ the source. We need to isolate the valid source data and mask
+ it into the original destination data. (Incidentally, we know
+ that we'll need at least one byte of that original dest word.) */
+ ldq_u t0, 0(a0) # L :
+ negq t7, t6 # E : build bitmask of bytes <= zero
+ mskqh t1, t4, t1 # U :
+
+ and t6, t7, t8 # E :
+ subq t8, 1, t6 # E : (stall)
+ or t6, t8, t7 # E : (stall)
+ zapnot t2, t7, t2 # U : prepare source word; mirror changes (stall)
+
+ zapnot t1, t7, t1 # U : to source validity mask
+ andnot t0, t2, t0 # E : zero place for source to reside
+ or t0, t1, t0 # E : and put it there (stall both t0, t1)
+ stq_u t0, 0(a0) # L : (stall)
+
+ ret (t9) # L0 : Latency=3
+ nop
+ nop
+ nop
+
+ .end __stxncpy
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d692c1e71c76dde5ed3d68f614cd9839b93f36ba
commit d692c1e71c76dde5ed3d68f614cd9839b93f36ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:40 2000 +0000
Alpha ev6 stxcpy implementation.
diff --git a/sysdeps/alpha/alphaev6/stxcpy.S b/sysdeps/alpha/alphaev6/stxcpy.S
new file mode 100644
index 0000000..0df2043
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/stxcpy.S
@@ -0,0 +1,329 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+ EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Copy a null-terminated string from SRC to DST.
+
+ This is an internal routine used by strcpy, stpcpy, and strcat.
+ As such, it uses special linkage conventions to make implementation
+ of these public functions more efficient.
+
+ On input:
+ t9 = return address
+ a0 = DST
+ a1 = SRC
+
+ On output:
+ t8 = bitmask (with one bit set) indicating the last byte written
+ a0 = unaligned address of the last *word* written
+
+ Furthermore, v0, a3-a5, t11, and t12 are untouched.
+*/
+
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noat
+ .set noreorder
+ .text
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the
+ aligned copy in its own procedure descriptor */
+
+
+ .ent stxcpy_aligned
+ .align 4
+stxcpy_aligned:
+ .frame sp, 0, t9
+ .prologue 0
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == the first source word. */
+
+ /* Create the 1st output word and detect 0's in the 1st input word. */
+ lda t2, -1 # E : build a mask against false zero
+ mskqh t2, a1, t2 # U : detection in the src word (stall)
+ mskqh t1, a1, t3 # U :
+ ornot t1, t2, t2 # E : (stall)
+
+ mskql t0, a1, t0 # U : assemble the first output word
+ cmpbge zero, t2, t8 # E : bits set iff null found
+ or t0, t3, t1 # E : (stall)
+ bne t8, $a_eos # U : (stall)
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == a source word not containing a null. */
+ /* Nops here to separate store quads from load quads */
+
+$a_loop:
+ stq_u t1, 0(a0) # L :
+ addq a0, 8, a0 # E :
+ nop
+ nop
+
+ ldq_u t1, 0(a1) # L : Latency=3
+ addq a1, 8, a1 # E :
+ cmpbge zero, t1, t8 # E : (3 cycle stall)
+ beq t8, $a_loop # U : (stall for t8)
+
+ /* Take care of the final (partial) word store.
+ On entry to this basic block we have:
+ t1 == the source word containing the null
+ t8 == the cmpbge mask that found it. */
+$a_eos:
+ negq t8, t6 # E : find low bit set
+ and t8, t6, t10 # E : (stall)
+ /* For the sake of the cache, don't read a destination word
+ if we're not going to need it. */
+ and t10, 0x80, t6 # E : (stall)
+ bne t6, 1f # U : (stall)
+
+ /* We're doing a partial word store and so need to combine
+ our source and original destination words. */
+ ldq_u t0, 0(a0) # L : Latency=3
+ subq t10, 1, t6 # E :
+ zapnot t1, t6, t1 # U : clear src bytes >= null (stall)
+ or t10, t6, t8 # E : (stall)
+
+ zap t0, t8, t0 # E : clear dst bytes <= null
+ or t0, t1, t1 # E : (stall)
+ nop
+ nop
+
+1: stq_u t1, 0(a0) # L :
+ ret (t9) # L0 : Latency=3
+ nop
+ nop
+
+ .end stxcpy_aligned
+
+ .align 4
+ .ent __stxcpy
+ .globl __stxcpy
+__stxcpy:
+ .frame sp, 0, t9
+ .prologue 0
+
+ /* Are source and destination co-aligned? */
+ xor a0, a1, t0 # E :
+ unop # E :
+ and t0, 7, t0 # E : (stall)
+ bne t0, $unaligned # U : (stall)
+
+ /* We are co-aligned; take care of a partial first word. */
+ ldq_u t1, 0(a1) # L : load first src word
+ and a0, 7, t0 # E : take care not to load a word ...
+ addq a1, 8, a1 # E :
+ beq t0, stxcpy_aligned # U : ... if we wont need it (stall)
+
+ ldq_u t0, 0(a0) # L :
+ br stxcpy_aligned # L0 : Latency=3
+ nop
+ nop
+
+
+/* The source and destination are not co-aligned. Align the destination
+ and cope. We have to be very careful about not reading too much and
+ causing a SEGV. */
+
+ .align 4
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full source word. We can still find a zero at the end of it
+ that prevents us from outputting the whole thing.
+
+ On entry to this basic block:
+ t0 == the first dest word, for masking back in, if needed else 0
+ t1 == the low bits of the first source word
+ t6 == bytemask that is -1 in dest word bytes */
+
+ ldq_u t2, 8(a1) # L :
+ addq a1, 8, a1 # E :
+ extql t1, a1, t1 # U : (stall on a1)
+ extqh t2, a1, t4 # U : (stall on a1)
+
+ mskql t0, a0, t0 # U :
+ or t1, t4, t1 # E :
+ mskqh t1, a0, t1 # U : (stall on t1)
+ or t0, t1, t1 # E : (stall on t1)
+
+ or t1, t6, t6 # E :
+ cmpbge zero, t6, t8 # E : (stall)
+ lda t6, -1 # E : for masking just below
+ bne t8, $u_final # U : (stall)
+
+ mskql t6, a1, t6 # U : mask out the bits we have
+ or t6, t2, t2 # E : already extracted before (stall)
+ cmpbge zero, t2, t8 # E : testing eos (stall)
+ bne t8, $u_late_head_exit # U : (stall)
+
+ /* Finally, we've got all the stupid leading edge cases taken care
+ of and we can set up to enter the main loop. */
+
+ stq_u t1, 0(a0) # L : store first output word
+ addq a0, 8, a0 # E :
+ extql t2, a1, t0 # U : position ho-bits of lo word
+ ldq_u t2, 8(a1) # U : read next high-order source word
+
+ addq a1, 8, a1 # E :
+ cmpbge zero, t2, t8 # E : (stall for t2)
+ nop # E :
+ bne t8, $u_eos # U : (stall)
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned source words.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t0 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word
+
+ We further know that t2 does not contain a null terminator. */
+
+ .align 3
+$u_loop:
+ extqh t2, a1, t1 # U : extract high bits for current word
+ addq a1, 8, a1 # E : (stall)
+ extql t2, a1, t3 # U : extract low bits for next time (stall)
+ addq a0, 8, a0 # E :
+
+ or t0, t1, t1 # E : current dst word now complete
+ ldq_u t2, 0(a1) # L : Latency=3 load high word for next time
+ stq_u t1, -8(a0) # L : save the current word (stall)
+ mov t3, t0 # E :
+
+ cmpbge zero, t2, t8 # E : test new word for eos
+ beq t8, $u_loop # U : (stall)
+ nop
+ nop
+
+ /* We've found a zero somewhere in the source word we just read.
+ If it resides in the lower half, we have one (probably partial)
+ word to write out, and if it resides in the upper half, we
+ have one full and one partial word left to write out.
+
+ On entry to this basic block:
+ t0 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word. */
+$u_eos:
+ extqh t2, a1, t1 # U :
+ or t0, t1, t1 # E : first (partial) source word complete (stall)
+ cmpbge zero, t1, t8 # E : is the null in this first bit? (stall)
+ bne t8, $u_final # U : (stall)
+
+$u_late_head_exit:
+ stq_u t1, 0(a0) # L : the null was in the high-order bits
+ addq a0, 8, a0 # E :
+ extql t2, a1, t1 # U :
+ cmpbge zero, t1, t8 # E : (stall)
+
+ /* Take care of a final (probably partial) result word.
+ On entry to this basic block:
+ t1 == assembled source word
+ t8 == cmpbge mask that found the null. */
+$u_final:
+ negq t8, t6 # E : isolate low bit set
+ and t6, t8, t10 # E : (stall)
+ and t10, 0x80, t6 # E : avoid dest word load if we can (stall)
+ bne t6, 1f # U : (stall)
+
+ ldq_u t0, 0(a0) # E :
+ subq t10, 1, t6 # E :
+ or t6, t10, t8 # E : (stall)
+ zapnot t1, t6, t1 # U : kill source bytes >= null (stall)
+
+ zap t0, t8, t0 # U : kill dest bytes <= null (2 cycle data stall)
+ or t0, t1, t1 # E : (stall)
+ nop
+ nop
+
+1: stq_u t1, 0(a0) # L :
+ ret (t9) # L0 : Latency=3
+ nop
+ nop
+
+ /* Unaligned copy entry point. */
+ .align 4
+$unaligned:
+
+ ldq_u t1, 0(a1) # L : load first source word
+ and a0, 7, t4 # E : find dest misalignment
+ and a1, 7, t5 # E : find src misalignment
+ /* Conditionally load the first destination word and a bytemask
+ with 0xff indicating that the destination byte is sacrosanct. */
+ mov zero, t0 # E :
+
+ mov zero, t6 # E :
+ beq t4, 1f # U :
+ ldq_u t0, 0(a0) # L :
+ lda t6, -1 # E :
+
+ mskql t6, a0, t6 # U :
+ nop
+ nop
+ nop
+1:
+ subq a1, t4, a1 # E : sub dest misalignment from src addr
+ /* If source misalignment is larger than dest misalignment, we need
+ extra startup checks to avoid SEGV. */
+ cmplt t4, t5, t10 # E :
+ beq t10, $u_head # U :
+ lda t2, -1 # E : mask out leading garbage in source
+
+ mskqh t2, t5, t2 # U :
+ ornot t1, t2, t3 # E : (stall)
+ cmpbge zero, t3, t8 # E : is there a zero? (stall)
+ beq t8, $u_head # U : (stall)
+
+ /* At this point we've found a zero in the first partial word of
+ the source. We need to isolate the valid source data and mask
+ it into the original destination data. (Incidentally, we know
+ that we'll need at least one byte of that original dest word.) */
+
+ ldq_u t0, 0(a0) # L :
+ negq t8, t6 # E : build bitmask of bytes <= zero
+ and t6, t8, t10 # E : (stall)
+ and a1, 7, t5 # E :
+
+ subq t10, 1, t6 # E :
+ or t6, t10, t8 # E : (stall)
+ srl t10, t5, t10 # U : adjust final null return value
+ zapnot t2, t8, t2 # U : prepare source word; mirror changes (stall)
+
+ and t1, t2, t1 # E : to source validity mask
+ extql t2, a1, t2 # U :
+ extql t1, a1, t1 # U : (stall)
+ andnot t0, t2, t0 # .. e1 : zero place for source to reside (stall)
+
+ or t0, t1, t1 # e1 : and put it there
+ stq_u t1, 0(a0) # .. e0 : (stall)
+ ret (t9) # e1 :
+ nop
+
+ .end __stxcpy
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c688d010018a35457c2e9c705f4c2cf46158803
commit 7c688d010018a35457c2e9c705f4c2cf46158803
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:30 2000 +0000
Alpha ev6 memset implementation.
diff --git a/sysdeps/alpha/alphaev6/memset.S b/sysdeps/alpha/alphaev6/memset.S
new file mode 100644
index 0000000..363b3a5
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/memset.S
@@ -0,0 +1,224 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+ EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noat
+ .set noreorder
+
+ENTRY(memset)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ /*
+ * Serious stalling happens. The only way to mitigate this is to
+ * undertake a major re-write to interleave the constant materialization
+ * with other parts of the fall-through code. This is important, even
+ * though it makes maintenance tougher.
+ * Do this later.
+ */
+ and $17, 255, $1 # E : 00000000000000ch
+ insbl $17, 1, $2 # U : 000000000000ch00
+ mov $16, $0 # E : return value
+ ble $18, $end # U : zero length requested?
+
+ addq $18, $16, $6 # E : max address to write to
+ or $1, $2, $17 # E : 000000000000chch
+ insbl $1, 2, $3 # U : 0000000000ch0000
+ insbl $1, 3, $4 # U : 00000000ch000000
+
+ or $3, $4, $3 # E : 00000000chch0000
+ inswl $17, 4, $5 # U : 0000chch00000000
+ xor $16, $6, $1 # E : will complete write be within one quadword?
+ inswl $17, 6, $2 # U : chch000000000000
+
+ or $17, $3, $17 # E : 00000000chchchch
+ or $2, $5, $2 # E : chchchch00000000
+ bic $1, 7, $1 # E : fit within a single quadword?
+ and $16, 7, $3 # E : Target addr misalignment
+
+ or $17, $2, $17 # E : chchchchchchchch
+ beq $1, $within_quad # U :
+ nop # E :
+ beq $3, $aligned # U : target is 0mod8
+
+ /*
+ * Target address is misaligned, and won't fit within a quadword.
+ */
+ ldq_u $4, 0($16) # L : Fetch first partial
+ mov $16, $5 # E : Save the address
+ insql $17, $16, $2 # U : Insert new bytes
+ subq $3, 8, $3 # E : Invert (for addressing uses)
+
+ addq $18, $3, $18 # E : $18 is new count ($3 is negative)
+ mskql $4, $16, $4 # U : clear relevant parts of the quad
+ subq $16, $3, $16 # E : $16 is new aligned destination
+ or $2, $4, $1 # E : Final bytes
+
+ nop
+ stq_u $1,0($5) # L : Store result
+ nop
+ nop
+
+ .align 4
+$aligned:
+ /*
+ * We are now guaranteed to be quad aligned, with at least
+ * one partial quad to write.
+ */
+
+ sra $18, 3, $3 # U : Number of remaining quads to write
+ and $18, 7, $18 # E : Number of trailing bytes to write
+ mov $16, $5 # E : Save dest address
+ beq $3, $no_quad # U : tail stuff only
+
+ /*
+ * It's worth the effort to unroll this and use wh64 if possible.
+ * At this point, entry values are:
+ * $16 Current destination address
+ * $5 A copy of $16
+ * $6 The max quadword address to write to
+ * $18 Number trailer bytes
+ * $3 Number quads to write
+ */
+
+ and $16, 0x3f, $2 # E : Forward work (only useful for unrolled loop)
+ subq $3, 16, $4 # E : Only try to unroll if > 128 bytes
+ subq $2, 0x40, $1 # E : bias counter (aligning stuff 0mod64)
+ blt $4, $loop # U :
+
+ /*
+ * We know we've got at least 16 quads, minimum of one trip
+ * through unrolled loop. Do a quad at a time to get us 0mod64
+ * aligned.
+ */
+
+ nop # E :
+ nop # E :
+ nop # E :
+ beq $1, $bigalign # U :
+
+$alignmod64:
+ stq $17, 0($5) # L :
+ subq $3, 1, $3 # E : For consistency later
+ addq $1, 8, $1 # E : Increment towards zero for alignment
+ addq $5, 8, $4 # E : Initial wh64 address (filler instruction)
+
+ nop
+ nop
+ addq $5, 8, $5 # E : Inc address
+ blt $1, $alignmod64 # U :
+
+$bigalign:
+ /*
+ * $3 - number quads left to go
+ * $5 - target address (aligned 0mod64)
+ * $17 - mask of stuff to store
+ * Scratch registers available: $7, $2, $4, $1
+ * We know that we'll be taking a minimum of one trip through.
+ * CWG Section 3.7.6: do not expect a sustained store rate of > 1/cycle
+ * Assumes the wh64 needs to be for 2 trips through the loop in the future.
+ * The wh64 is issued on for the starting destination address for trip +2
+ * through the loop, and if there are less than two trips left, the target
+ * address will be for the current trip.
+ */
+
+$do_wh64:
+ wh64 ($4) # L1 : memory subsystem write hint
+ subq $3, 24, $2 # E : For determining future wh64 addresses
+ stq $17, 0($5) # L :
+ nop # E :
+
+ addq $5, 128, $4 # E : speculative target of next wh64
+ stq $17, 8($5) # L :
+ stq $17, 16($5) # L :
+ addq $5, 64, $7 # E : Fallback address for wh64 (== next trip addr)
+
+ stq $17, 24($5) # L :
+ stq $17, 32($5) # L :
+ cmovlt $2, $7, $4 # E : Latency 2, extra mapping cycle
+ nop
+
+ stq $17, 40($5) # L :
+ stq $17, 48($5) # L :
+ subq $3, 16, $2 # E : Repeat the loop at least once more?
+ nop
+
+ stq $17, 56($5) # L :
+ addq $5, 64, $5 # E :
+ subq $3, 8, $3 # E :
+ bge $2, $do_wh64 # U :
+
+ nop
+ nop
+ nop
+ beq $3, $no_quad # U : Might have finished already
+
+ .align 4
+ /*
+ * Simple loop for trailing quadwords, or for small amounts
+ * of data (where we can't use an unrolled loop and wh64)
+ */
+$loop:
+ stq $17, 0($5) # L :
+ subq $3, 1, $3 # E : Decrement number quads left
+ addq $5, 8, $5 # E : Inc address
+ bne $3, $loop # U : more?
+
+$no_quad:
+ /*
+ * Write 0..7 trailing bytes.
+ */
+ nop # E :
+ beq $18, $end # U : All done?
+ ldq $7, 0($5) # L :
+ mskqh $7, $6, $2 # U : Mask final quad
+
+ insqh $17, $6, $4 # U : New bits
+ or $2, $4, $1 # E : Put it all together
+ stq $1, 0($5) # L : And back to memory
+ ret $31,($26),1 # L0 :
+
+$within_quad:
+ ldq_u $1, 0($16) # L :
+ insql $17, $16, $2 # U : New bits
+ mskql $1, $16, $4 # U : Clear old
+ or $2, $4, $2 # E : New result
+
+ mskql $2, $6, $4 # U :
+ mskqh $1, $6, $2 # U :
+ or $2, $4, $1 # E :
+ stq_u $1, 0($16) # L :
+
+$end:
+ nop
+ nop
+ nop
+ ret $31,($26),1 # L0 :
+
+ END(memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba26d0334e2e7286410e74d77fa189d4e2cf31fe
commit ba26d0334e2e7286410e74d77fa189d4e2cf31fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:22 2000 +0000
Alpha ev6 memcpy implementation.
diff --git a/sysdeps/alpha/alphaev6/memcpy.S b/sysdeps/alpha/alphaev6/memcpy.S
new file mode 100644
index 0000000..35f17e7
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/memcpy.S
@@ -0,0 +1,254 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Much of the information about 21264 scheduling/coding comes from:
+ * Compiler Writer's Guide for the Alpha 21264
+ * abbreviated as 'CWG' in other comments here
+ * ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
+ * Scheduling notation:
+ * E - either cluster
+ * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
+ * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
+ *
+ * Temp usage notes:
+ * $0 - destination address
+ * $1,$2, - scratch
+ */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(memcpy)
+
+ mov $16, $0 # E : copy dest to return
+ ble $18, $nomoredata # U : done with the copy?
+ xor $16, $17, $1 # E : are source and dest alignments the same?
+ and $1, 7, $1 # E : are they the same mod 8?
+
+ bne $1, $misaligned # U : Nope - gotta do this the slow way
+ /* source and dest are same mod 8 address */
+ and $16, 7, $1 # E : Are both 0mod8?
+ beq $1, $both_0mod8 # U : Yes
+ nop # E :
+
+ /*
+ * source and dest are same misalignment. move a byte at a time
+ * until a 0mod8 alignment for both is reached.
+ * At least one byte more to move
+ */
+
+$head_align:
+ ldbu $1, 0($17) # L : grab a byte
+ subq $18, 1, $18 # E : count--
+ addq $17, 1, $17 # E : src++
+ stb $1, 0($16) # L :
+ addq $16, 1, $16 # E : dest++
+ and $16, 7, $1 # E : Are we at 0mod8 yet?
+ ble $18, $nomoredata # U : done with the copy?
+ bne $1, $head_align # U :
+
+$both_0mod8:
+ cmple $18, 127, $1 # E : Can we unroll the loop?
+ bne $1, $no_unroll # U :
+ and $16, 63, $1 # E : get mod64 alignment
+ beq $1, $do_unroll # U : no single quads to fiddle
+
+$single_head_quad:
+ ldq $1, 0($17) # L : get 8 bytes
+ subq $18, 8, $18 # E : count -= 8
+ addq $17, 8, $17 # E : src += 8
+ nop # E :
+
+ stq $1, 0($16) # L : store
+ addq $16, 8, $16 # E : dest += 8
+ and $16, 63, $1 # E : get mod64 alignment
+ bne $1, $single_head_quad # U : still not fully aligned
+
+$do_unroll:
+ addq $16, 64, $7 # E : Initial (+1 trip) wh64 address
+ cmple $18, 63, $1 # E : Can we go through the unrolled loop?
+ bne $1, $tail_quads # U : Nope
+ nop # E :
+
+$unroll_body:
+ wh64 ($7) # L1 : memory subsystem hint: 64 bytes at
+ # ($7) are about to be over-written
+ ldq $6, 0($17) # L0 : bytes 0..7
+ nop # E :
+ nop # E :
+
+ ldq $4, 8($17) # L : bytes 8..15
+ ldq $5, 16($17) # L : bytes 16..23
+ addq $7, 64, $7 # E : Update next wh64 address
+ nop # E :
+
+ ldq $3, 24($17) # L : bytes 24..31
+ addq $16, 64, $1 # E : fallback value for wh64
+ nop # E :
+ nop # E :
+
+ addq $17, 32, $17 # E : src += 32 bytes
+ stq $6, 0($16) # L : bytes 0..7
+ nop # E :
+ nop # E :
+
+ stq $4, 8($16) # L : bytes 8..15
+ stq $5, 16($16) # L : bytes 16..23
+ subq $18, 192, $2 # E : At least two more trips to go?
+ nop # E :
+
+ stq $3, 24($16) # L : bytes 24..31
+ addq $16, 32, $16 # E : dest += 32 bytes
+ nop # E :
+ nop # E :
+
+ ldq $6, 0($17) # L : bytes 0..7
+ ldq $4, 8($17) # L : bytes 8..15
+ cmovlt $2, $1, $7 # E : Latency 2, extra map slot - Use
+ # fallback wh64 address if < 2 more trips
+ nop # E :
+
+ ldq $5, 16($17) # L : bytes 16..23
+ ldq $3, 24($17) # L : bytes 24..31
+ addq $16, 32, $16 # E : dest += 32
+ subq $18, 64, $18 # E : count -= 64
+
+ addq $17, 32, $17 # E : src += 32
+ stq $6, -32($16) # L : bytes 0..7
+ stq $4, -24($16) # L : bytes 8..15
+ cmple $18, 63, $1 # E : At least one more trip?
+
+ stq $5, -16($16) # L : bytes 16..23
+ stq $3, -8($16) # L : bytes 24..31
+ nop # E :
+ beq $1, $unroll_body
+
+$tail_quads:
+$no_unroll:
+ .align 4
+ subq $18, 8, $18 # E : At least a quad left?
+ blt $18, $less_than_8 # U : Nope
+ nop # E :
+ nop # E :
+
+$move_a_quad:
+ ldq $1, 0($17) # L : fetch 8
+ subq $18, 8, $18 # E : count -= 8
+ addq $17, 8, $17 # E : src += 8
+ nop # E :
+
+ stq $1, 0($16) # L : store 8
+ addq $16, 8, $16 # E : dest += 8
+ bge $18, $move_a_quad # U :
+ nop # E :
+
+$less_than_8:
+ .align 4
+ addq $18, 8, $18 # E : add back for trailing bytes
+ ble $18, $nomoredata # U : All-done
+ nop # E :
+ nop # E :
+
+ /* Trailing bytes */
+$tail_bytes:
+ subq $18, 1, $18 # E : count--
+ ldbu $1, 0($17) # L : fetch a byte
+ addq $17, 1, $17 # E : src++
+ nop # E :
+
+ stb $1, 0($16) # L : store a byte
+ addq $16, 1, $16 # E : dest++
+ bgt $18, $tail_bytes # U : more to be done?
+ nop # E :
+
+ /* branching to exit takes 3 extra cycles, so replicate exit here */
+ ret $31, ($26), 1 # L0 :
+ nop # E :
+ nop # E :
+ nop # E :
+
+$misaligned:
+ mov $0, $4 # E : dest temp
+ and $0, 7, $1 # E : dest alignment mod8
+ beq $1, $dest_0mod8 # U : life doesnt totally suck
+ nop
+
+$aligndest:
+ ble $18, $nomoredata # U :
+ ldbu $1, 0($17) # L : fetch a byte
+ subq $18, 1, $18 # E : count--
+ addq $17, 1, $17 # E : src++
+
+ stb $1, 0($4) # L : store it
+ addq $4, 1, $4 # E : dest++
+ and $4, 7, $1 # E : dest 0mod8 yet?
+ bne $1, $aligndest # U : go until we are aligned.
+
+ /* Source has unknown alignment, but dest is known to be 0mod8 */
+$dest_0mod8:
+ subq $18, 8, $18 # E : At least a quad left?
+ blt $18, $misalign_tail # U : Nope
+ ldq_u $3, 0($17) # L : seed (rotating load) of 8 bytes
+ nop # E :
+
+$mis_quad:
+ ldq_u $16, 8($17) # L : Fetch next 8
+ extql $3, $17, $3 # U : masking
+ extqh $16, $17, $1 # U : masking
+ bis $3, $1, $1 # E : merged bytes to store
+
+ subq $18, 8, $18 # E : count -= 8
+ addq $17, 8, $17 # E : src += 8
+ stq $1, 0($4) # L : store 8 (aligned)
+ mov $16, $3 # E : "rotate" source data
+
+ addq $4, 8, $4 # E : dest += 8
+ bge $18, $mis_quad # U : More quads to move
+ nop
+ nop
+
+$misalign_tail:
+ addq $18, 8, $18 # E : account for tail stuff
+ ble $18, $nomoredata # U :
+ nop
+ nop
+
+$misalign_byte:
+ ldbu $1, 0($17) # L : fetch 1
+ subq $18, 1, $18 # E : count--
+ addq $17, 1, $17 # E : src++
+ nop # E :
+
+ stb $1, 0($4) # L : store
+ addq $4, 1, $4 # E : dest++
+ bgt $18, $misalign_byte # U : more to go?
+ nop
+
+
+$nomoredata:
+ ret $31, ($26), 1 # L0 :
+ nop # E :
+ nop # E :
+ nop # E :
+
+END(memcpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ec379e7289ec53c6892cffe8dd7880d1208f7f4
commit 6ec379e7289ec53c6892cffe8dd7880d1208f7f4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:13 2000 +0000
Alpha ev6 memchr implementation.
diff --git a/sysdeps/alpha/alphaev6/memchr.S b/sysdeps/alpha/alphaev6/memchr.S
new file mode 100644
index 0000000..0dfcbea
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/memchr.S
@@ -0,0 +1,192 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+ EV6 optimized by Rick Gorton <rick.gorton@alpha-processor.com>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .arch ev6
+ .set noreorder
+ .set noat
+
+ENTRY(__memchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ # Hack -- if someone passes in (size_t)-1, hoping to just
+ # search til the end of the address space, we will overflow
+ # below when we find the address of the last byte. Given
+ # that we will never have a 56-bit address space, cropping
+ # the length is the easiest way to avoid trouble.
+ zap $18, 0x80, $5 # U : Bound length
+ beq $18, $not_found # U :
+ ldq_u $1, 0($16) # L : load first quadword Latency=3
+ and $17, 0xff, $17 # E : L L U U : 00000000000000ch
+
+ insbl $17, 1, $2 # U : 000000000000ch00
+ cmpult $18, 9, $4 # E : small (< 1 quad) string?
+ or $2, $17, $17 # E : 000000000000chch
+ lda $3, -1($31) # E : U L L U
+
+ sll $17, 16, $2 # U : 00000000chch0000
+ addq $16, $5, $5 # E : Max search address
+ or $2, $17, $17 # E : 00000000chchchch
+ sll $17, 32, $2 # U : U L L U : chchchch00000000
+
+ or $2, $17, $17 # E : chchchchchchchch
+ extql $1, $16, $7 # U : $7 is upper bits
+ beq $4, $first_quad # U :
+ ldq_u $6, -1($5) # L : L U U L : eight or less bytes to search Latency=3
+
+ extqh $6, $16, $6 # U : 2 cycle stall for $6
+ mov $16, $0 # E :
+ nop # E :
+ or $7, $6, $1 # E : L U L U $1 = quadword starting at $16
+
+ # Deal with the case where at most 8 bytes remain to be searched
+ # in $1. E.g.:
+ # $18 = 6
+ # $1 = ????c6c5c4c3c2c1
+$last_quad:
+ negq $18, $6 # E :
+ xor $17, $1, $1 # E :
+ srl $3, $6, $6 # U : $6 = mask of $18 bits set
+ cmpbge $31, $1, $2 # E : L U L U
+
+ nop
+ nop
+ and $2, $6, $2 # E :
+ beq $2, $not_found # U : U L U L
+
+$found_it:
+#if defined(__alpha_fix__) && defined(__alpha_cix__)
+ /*
+ * Since we are guaranteed to have set one of the bits, we don't
+ * have to worry about coming back with a 0x40 out of cttz...
+ */
+ cttz $2, $3 # U0 :
+ addq $0, $3, $0 # E : All done
+ nop # E :
+ ret # L0 : L U L U
+#else
+ /*
+ * Slow and clunky. It can probably be improved.
+ * An exercise left for others.
+ */
+ negq $2, $3 # E :
+ and $2, $3, $2 # E :
+ and $2, 0x0f, $1 # E :
+ addq $0, 4, $3 # E :
+
+ cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
+ nop # E : keep with cmov
+ and $2, 0x33, $1 # E :
+ addq $0, 2, $3 # E : U L U L : 2 cycle stall on $0
+
+ cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
+ nop # E : keep with cmov
+ and $2, 0x55, $1 # E :
+ addq $0, 1, $3 # E : U L U L : 2 cycle stall on $0
+
+ cmoveq $1, $3, $0 # E : Latency 2, extra map cycle
+ nop
+ nop
+ ret # L0 : L U L U
+#endif
+
+ # Deal with the case where $18 > 8 bytes remain to be
+ # searched. $16 may not be aligned.
+ .align 4
+$first_quad:
+ andnot $16, 0x7, $0 # E :
+ insqh $3, $16, $2 # U : $2 = 0000ffffffffffff ($16<0:2> ff)
+ xor $1, $17, $1 # E :
+ or $1, $2, $1 # E : U L U L $1 = ====ffffffffffff
+
+ cmpbge $31, $1, $2 # E :
+ bne $2, $found_it # U :
+ # At least one byte left to process.
+ ldq $1, 8($0) # L :
+ subq $5, 1, $18 # E : U L U L
+
+ addq $0, 8, $0 # E :
+ # Make $18 point to last quad to be accessed (the
+ # last quad may or may not be partial).
+ andnot $18, 0x7, $18 # E :
+ cmpult $0, $18, $2 # E :
+ beq $2, $final # U : U L U L
+
+ # At least two quads remain to be accessed.
+
+ subq $18, $0, $4 # E : $4 <- nr quads to be processed
+ and $4, 8, $4 # E : odd number of quads?
+ bne $4, $odd_quad_count # U :
+ # At least three quads remain to be accessed
+ mov $1, $4 # E : L U L U : move prefetched value to correct reg
+
+ .align 4
+$unrolled_loop:
+ ldq $1, 8($0) # L : prefetch $1
+ xor $17, $4, $2 # E :
+ cmpbge $31, $2, $2 # E :
+ bne $2, $found_it # U : U L U L
+
+ addq $0, 8, $0 # E :
+ nop # E :
+ nop # E :
+ nop # E :
+
+$odd_quad_count:
+ xor $17, $1, $2 # E :
+ ldq $4, 8($0) # L : prefetch $4
+ cmpbge $31, $2, $2 # E :
+ addq $0, 8, $6 # E :
+
+ bne $2, $found_it # U :
+ cmpult $6, $18, $6 # E :
+ addq $0, 8, $0 # E :
+ nop # E :
+
+ bne $6, $unrolled_loop # U :
+ mov $4, $1 # E : move prefetched value into $1
+ nop # E :
+ nop # E :
+
+$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do
+ nop # E :
+ nop # E :
+ bne $18, $last_quad # U :
+
+$not_found:
+ mov $31, $0 # E :
+ nop # E :
+ nop # E :
+ ret # L0 :
+
+ END(__memchr)
+
+weak_alias (__memchr, memchr)
+#if !__BOUNDED_POINTERS__
+weak_alias (__memchr, __ubp_memchr)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1225f9a32cd000a7d52d6924c41c466d772c0e2
commit a1225f9a32cd000a7d52d6924c41c466d772c0e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:18:04 2000 +0000
Alpha ev6 addmul_1 implementation.
diff --git a/sysdeps/alpha/alphaev6/addmul_1.s b/sysdeps/alpha/alphaev6/addmul_1.s
new file mode 100644
index 0000000..a061fb9
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/addmul_1.s
@@ -0,0 +1,479 @@
+ # Alpha ev6 mpn_addmul_1 -- Multiply a limb vector with a limb and add
+ # the result to a second limb vector.
+ #
+ # Copyright (C) 2000 Free Software Foundation, Inc.
+ #
+ # This file is part of the GNU MP Library.
+ #
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Lesser General Public License as published
+ # by the Free Software Foundation; either version 2.1 of the License, or (at
+ # your option) any later version.
+ #
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ # License for more details.
+ #
+ # You should have received a copy of the GNU Lesser General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # size $18
+ # s2_limb $19
+ #
+ # This code runs at 42 cycles/limb on EV4, 18 cycles/limb on EV5, and
+ # exactly 3.625 cycles/limb on EV6...
+ #
+ # This code was written in close cooperation with ev6 pipeline expert
+ # Steve Root (root@toober.hlo.dec.com). Any errors are tege's fault, though.
+ #
+ # Register usages for unrolled loop:
+ # 0-3 mul's
+ # 4-7 acc's
+ # 8-15 mul results
+ # 20,21 carry's
+ # 22,23 save for stores
+ #
+ # Sustains 8 mul-adds in 29 cycles in the unrolled inner loop.
+ #
+ # The stores can issue a cycle late so we have paired no-op's to 'catch'
+ # them, so that further disturbance to the schedule is damped.
+ #
+ # We couldn't pair the loads, because the entangled schedule of the
+ # carry's has to happen on one side {0} of the machine. Note, the total
+ # use of U0, and the total use of L0 (after attending to the stores).
+ # which is part of the reason why....
+ #
+ # This is a great schedule for the d_cache, a poor schedule for the
+ # b_cache. The lockup on U0 means that any stall can't be recovered
+ # from. Consider a ldq in L1. say that load gets stalled because it
+ # collides with a fill from the b_Cache. On the next cycle, this load
+ # gets priority. If first looks at L0, and goes there. The instruction
+ # we intended for L0 gets to look at L1, which is NOT where we want
+ # it. It either stalls 1, because it can't go in L0, or goes there, and
+ # causes a further instruction to stall.
+ #
+ # So for b_cache, we're likely going to want to put one or more cycles
+ # back into the code! And, of course, put in prefetches. For the
+ # accumulator, lds, intent to modify. For the multiplier, you might
+ # want ldq, evict next, if you're not wanting to use it again soon. Use
+ # 256 ahead of present pointer value. At a place where we have an mt
+ # followed by a bookkeeping, put the bookkeeping in upper, and the
+ # prefetch into lower.
+ #
+ # Note, the usage of physical registers per cycle is smoothed off, as
+ # much as possible.
+ #
+ # Note, the ldq's and stq's are at the end of the quadpacks. note, we'd
+ # like not to have a ldq or stq to preceded a conditional branch in a
+ # quadpack. The conditional branch moves the retire pointer one cycle
+ # later.
+ #
+ # Optimization notes:
+ # Callee-saves regs: $9 $10 $11 $12 $13 $14 $15 $26 ?$27?
+ # Reserved regs: $29 $30 $31
+ # Free caller-saves regs in unrolled code: $24 $25 $28
+ # We should swap some of the callee-saves regs for some of the free
+ # caller-saves regs, saving some overhead cycles.
+ # Most importantly, we should write fast code for the 0-7 case.
+ # The code we use there are for the 21164, and runs at 7 cycles/limb
+ # on the 21264. Should not be hard, if we write specialized code for
+ # 1-7 limbs (the one for 0 limbs should be straightforward). We then just
+ # need a jump table indexed by the low 3 bits of the count argument.
+
+ .set noreorder
+ .set noat
+ .text
+
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1
+__mpn_addmul_1:
+ .frame $30,0,$26,0
+ .prologue 0
+
+ cmpult $18, 8, $1
+ beq $1, $Large
+
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $18, 1, $18 # size--
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ umulh $2, $19, $0 # $0 = prod_high
+ beq $18, $Lend0b # jump if size was == 1
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $18, 1, $18 # size--
+ addq $5, $3, $3
+ cmpult $3, $5, $4
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ beq $18, $Lend0a # jump if size was == 2
+
+ .align 3
+$Loop0: mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ subq $18, 1, $18 # size--
+ umulh $2, $19, $4 # $4 = cy_limb
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $5, $0, $0 # combine carries
+ bne $18, $Loop0
+$Lend0a:
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ umulh $2, $19, $4 # $4 = cy_limb
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $5, $0, $0 # combine carries
+ addq $4, $0, $0 # cy_limb = prod_high + cy
+ ret $31, ($26), 1
+$Lend0b:
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $0, $5, $0
+ ret $31, ($26), 1
+
+$Large:
+ lda $30, -240($30)
+ stq $9, 8($30)
+ stq $10, 16($30)
+ stq $11, 24($30)
+ stq $12, 32($30)
+ stq $13, 40($30)
+ stq $14, 48($30)
+ stq $15, 56($30)
+
+ and $18, 7, $20 # count for the first loop, 0-7
+ srl $18, 3, $18 # count for unrolled loop
+ bis $31, $31, $0
+ beq $20, $Lunroll
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $20, 1, $20 # size--
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ umulh $2, $19, $0 # $0 = prod_high
+ beq $20, $Lend1b # jump if size was == 1
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ subq $20, 1, $20 # size--
+ addq $5, $3, $3
+ cmpult $3, $5, $4
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ beq $20, $Lend1a # jump if size was == 2
+
+ .align 3
+$Loop1: mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ subq $20, 1, $20 # size--
+ umulh $2, $19, $4 # $4 = cy_limb
+ ldq $2, 0($17) # $2 = s1_limb
+ addq $17, 8, $17 # s1_ptr++
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $5, $0, $0 # combine carries
+ bne $20, $Loop1
+
+$Lend1a:
+ mulq $2, $19, $3 # $3 = prod_low
+ ldq $5, 0($16) # $5 = *res_ptr
+ addq $4, $0, $0 # cy_limb = cy_limb + 'cy'
+ umulh $2, $19, $4 # $4 = cy_limb
+ addq $3, $0, $3 # $3 = cy_limb + prod_low
+ cmpult $3, $0, $0 # $0 = carry from (cy_limb + prod_low)
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $5, $0, $0 # combine carries
+ addq $4, $0, $0 # cy_limb = prod_high + cy
+ br $31, $Lunroll
+$Lend1b:
+ addq $5, $3, $3
+ cmpult $3, $5, $5
+ stq $3, 0($16)
+ addq $16, 8, $16 # res_ptr++
+ addq $0, $5, $0
+
+$Lunroll:
+ lda $17, -16($17) # L1 bookkeeping
+ lda $16, -16($16) # L1 bookkeeping
+ bis $0, $31, $12
+
+ # ____ UNROLLED LOOP SOFTWARE PIPELINE STARTUP ____
+
+ ldq $2, 16($17) # L1
+ ldq $3, 24($17) # L1
+ lda $18, -1($18) # L1 bookkeeping
+ ldq $6, 16($16) # L1
+ ldq $7, 24($16) # L1
+ ldq $0, 32($17) # L1
+ mulq $19, $2, $13 # U1
+ ldq $1, 40($17) # L1
+ umulh $19, $2, $14 # U1
+ mulq $19, $3, $15 # U1
+ lda $17, 64($17) # L1 bookkeeping
+ ldq $4, 32($16) # L1
+ ldq $5, 40($16) # L1
+ umulh $19, $3, $8 # U1
+ ldq $2, -16($17) # L1
+ mulq $19, $0, $9 # U1
+ ldq $3, -8($17) # L1
+ umulh $19, $0, $10 # U1
+ addq $6, $13, $6 # L0 lo + acc
+ mulq $19, $1, $11 # U1
+ cmpult $6, $13, $20 # L0 lo add => carry
+ lda $16, 64($16) # L1 bookkeeping
+ addq $6, $12, $22 # U0 hi add => answer
+ cmpult $22, $12, $21 # L0 hi add => carry
+ addq $14, $20, $14 # U0 hi mul + carry
+ ldq $6, -16($16) # L1
+ addq $7, $15, $23 # L0 lo + acc
+ addq $14, $21, $14 # U0 hi mul + carry
+ ldq $7, -8($16) # L1
+ umulh $19, $1, $12 # U1
+ cmpult $23, $15, $20 # L0 lo add => carry
+ addq $23, $14, $23 # U0 hi add => answer
+ ldq $0, 0($17) # L1
+ mulq $19, $2, $13 # U1
+ cmpult $23, $14, $21 # L0 hi add => carry
+ addq $8, $20, $8 # U0 hi mul + carry
+ ldq $1, 8($17) # L1
+ umulh $19, $2, $14 # U1
+ addq $4, $9, $4 # L0 lo + acc
+ stq $22, -48($16) # L0
+ stq $23, -40($16) # L1
+ mulq $19, $3, $15 # U1
+ addq $8, $21, $8 # U0 hi mul + carry
+ cmpult $4, $9, $20 # L0 lo add => carry
+ addq $4, $8, $22 # U0 hi add => answer
+ ble $18, $Lend # U1 bookkeeping
+
+ # ____ MAIN UNROLLED LOOP ____
+ .align 4
+$Loop:
+ bis $31, $31, $31 # U1 mt
+ cmpult $22, $8, $21 # L0 hi add => carry
+ addq $10, $20, $10 # U0 hi mul + carry
+ ldq $4, 0($16) # L1
+
+ bis $31, $31, $31 # U1 mt
+ addq $5, $11, $23 # L0 lo + acc
+ addq $10, $21, $10 # L0 hi mul + carry
+ ldq $5, 8($16) # L1
+
+ umulh $19, $3, $8 # U1
+ cmpult $23, $11, $20 # L0 lo add => carry
+ addq $23, $10, $23 # U0 hi add => answer
+ ldq $2, 16($17) # L1
+
+ mulq $19, $0, $9 # U1
+ cmpult $23, $10, $21 # L0 hi add => carry
+ addq $12, $20, $12 # U0 hi mul + carry
+ ldq $3, 24($17) # L1
+
+ umulh $19, $0, $10 # U1
+ addq $6, $13, $6 # L0 lo + acc
+ stq $22, -32($16) # L0
+ stq $23, -24($16) # L1
+
+ bis $31, $31, $31 # L0 st slosh
+ mulq $19, $1, $11 # U1
+ bis $31, $31, $31 # L1 st slosh
+ addq $12, $21, $12 # U0 hi mul + carry
+
+ cmpult $6, $13, $20 # L0 lo add => carry
+ bis $31, $31, $31 # U1 mt
+ lda $18, -1($18) # L1 bookkeeping
+ addq $6, $12, $22 # U0 hi add => answer
+
+ bis $31, $31, $31 # U1 mt
+ cmpult $22, $12, $21 # L0 hi add => carry
+ addq $14, $20, $14 # U0 hi mul + carry
+ ldq $6, 16($16) # L1
+
+ bis $31, $31, $31 # U1 mt
+ addq $7, $15, $23 # L0 lo + acc
+ addq $14, $21, $14 # U0 hi mul + carry
+ ldq $7, 24($16) # L1
+
+ umulh $19, $1, $12 # U1
+ cmpult $23, $15, $20 # L0 lo add => carry
+ addq $23, $14, $23 # U0 hi add => answer
+ ldq $0, 32($17) # L1
+
+ mulq $19, $2, $13 # U1
+ cmpult $23, $14, $21 # L0 hi add => carry
+ addq $8, $20, $8 # U0 hi mul + carry
+ ldq $1, 40($17) # L1
+
+ umulh $19, $2, $14 # U1
+ addq $4, $9, $4 # U0 lo + acc
+ stq $22, -16($16) # L0
+ stq $23, -8($16) # L1
+
+ bis $31, $31, $31 # L0 st slosh
+ mulq $19, $3, $15 # U1
+ bis $31, $31, $31 # L1 st slosh
+ addq $8, $21, $8 # L0 hi mul + carry
+
+ cmpult $4, $9, $20 # L0 lo add => carry
+ bis $31, $31, $31 # U1 mt
+ lda $17, 64($17) # L1 bookkeeping
+ addq $4, $8, $22 # U0 hi add => answer
+
+ bis $31, $31, $31 # U1 mt
+ cmpult $22, $8, $21 # L0 hi add => carry
+ addq $10, $20, $10 # U0 hi mul + carry
+ ldq $4, 32($16) # L1
+
+ bis $31, $31, $31 # U1 mt
+ addq $5, $11, $23 # L0 lo + acc
+ addq $10, $21, $10 # L0 hi mul + carry
+ ldq $5, 40($16) # L1
+
+ umulh $19, $3, $8 # U1
+ cmpult $23, $11, $20 # L0 lo add => carry
+ addq $23, $10, $23 # U0 hi add => answer
+ ldq $2, -16($17) # L1
+
+ mulq $19, $0, $9 # U1
+ cmpult $23, $10, $21 # L0 hi add => carry
+ addq $12, $20, $12 # U0 hi mul + carry
+ ldq $3, -8($17) # L1
+
+ umulh $19, $0, $10 # U1
+ addq $6, $13, $6 # L0 lo + acc
+ stq $22, 0($16) # L0
+ stq $23, 8($16) # L1
+
+ bis $31, $31, $31 # L0 st slosh
+ mulq $19, $1, $11 # U1
+ bis $31, $31, $31 # L1 st slosh
+ addq $12, $21, $12 # U0 hi mul + carry
+
+ cmpult $6, $13, $20 # L0 lo add => carry
+ bis $31, $31, $31 # U1 mt
+ lda $16, 64($16) # L1 bookkeeping
+ addq $6, $12, $22 # U0 hi add => answer
+
+ bis $31, $31, $31 # U1 mt
+ cmpult $22, $12, $21 # L0 hi add => carry
+ addq $14, $20, $14 # U0 hi mul + carry
+ ldq $6, -16($16) # L1
+
+ bis $31, $31, $31 # U1 mt
+ addq $7, $15, $23 # L0 lo + acc
+ addq $14, $21, $14 # U0 hi mul + carry
+ ldq $7, -8($16) # L1
+
+ umulh $19, $1, $12 # U1
+ cmpult $23, $15, $20 # L0 lo add => carry
+ addq $23, $14, $23 # U0 hi add => answer
+ ldq $0, 0($17) # L1
+
+ mulq $19, $2, $13 # U1
+ cmpult $23, $14, $21 # L0 hi add => carry
+ addq $8, $20, $8 # U0 hi mul + carry
+ ldq $1, 8($17) # L1
+
+ umulh $19, $2, $14 # U1
+ addq $4, $9, $4 # L0 lo + acc
+ stq $22, -48($16) # L0
+ stq $23, -40($16) # L1
+
+ bis $31, $31, $31 # L0 st slosh
+ mulq $19, $3, $15 # U1
+ bis $31, $31, $31 # L1 st slosh
+ addq $8, $21, $8 # U0 hi mul + carry
+
+ cmpult $4, $9, $20 # L0 lo add => carry
+ addq $4, $8, $22 # U0 hi add => answer
+ bis $31, $31, $31 # L1 mt
+ bgt $18, $Loop # U1 bookkeeping
+
+# ____ UNROLLED LOOP SOFTWARE PIPELINE FINISH ____
+$Lend:
+ cmpult $22, $8, $21 # L0 hi add => carry
+ addq $10, $20, $10 # U0 hi mul + carry
+ ldq $4, 0($16) # L1
+ addq $5, $11, $23 # L0 lo + acc
+ addq $10, $21, $10 # L0 hi mul + carry
+ ldq $5, 8($16) # L1
+ umulh $19, $3, $8 # U1
+ cmpult $23, $11, $20 # L0 lo add => carry
+ addq $23, $10, $23 # U0 hi add => answer
+ mulq $19, $0, $9 # U1
+ cmpult $23, $10, $21 # L0 hi add => carry
+ addq $12, $20, $12 # U0 hi mul + carry
+ umulh $19, $0, $10 # U1
+ addq $6, $13, $6 # L0 lo + acc
+ stq $22, -32($16) # L0
+ stq $23, -24($16) # L1
+ mulq $19, $1, $11 # U1
+ addq $12, $21, $12 # U0 hi mul + carry
+ cmpult $6, $13, $20 # L0 lo add => carry
+ addq $6, $12, $22 # U0 hi add => answer
+ cmpult $22, $12, $21 # L0 hi add => carry
+ addq $14, $20, $14 # U0 hi mul + carry
+ addq $7, $15, $23 # L0 lo + acc
+ addq $14, $21, $14 # U0 hi mul + carry
+ umulh $19, $1, $12 # U1
+ cmpult $23, $15, $20 # L0 lo add => carry
+ addq $23, $14, $23 # U0 hi add => answer
+ cmpult $23, $14, $21 # L0 hi add => carry
+ addq $8, $20, $8 # U0 hi mul + carry
+ addq $4, $9, $4 # U0 lo + acc
+ stq $22, -16($16) # L0
+ stq $23, -8($16) # L1
+ bis $31, $31, $31 # L0 st slosh
+ addq $8, $21, $8 # L0 hi mul + carry
+ cmpult $4, $9, $20 # L0 lo add => carry
+ addq $4, $8, $22 # U0 hi add => answer
+ cmpult $22, $8, $21 # L0 hi add => carry
+ addq $10, $20, $10 # U0 hi mul + carry
+ addq $5, $11, $23 # L0 lo + acc
+ addq $10, $21, $10 # L0 hi mul + carry
+ cmpult $23, $11, $20 # L0 lo add => carry
+ addq $23, $10, $23 # U0 hi add => answer
+ cmpult $23, $10, $21 # L0 hi add => carry
+ addq $12, $20, $12 # U0 hi mul + carry
+ stq $22, 0($16) # L0
+ stq $23, 8($16) # L1
+ addq $12, $21, $0 # U0 hi mul + carry
+
+ ldq $9, 8($30)
+ ldq $10, 16($30)
+ ldq $11, 24($30)
+ ldq $12, 32($30)
+ ldq $13, 40($30)
+ ldq $14, 48($30)
+ ldq $15, 56($30)
+ lda $30, 240($30)
+ ret $31, ($26), 1
+
+ .end __mpn_addmul_1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5ab79e974f71566a6e22abcc5de3693a997c4dc5
commit 5ab79e974f71566a6e22abcc5de3693a997c4dc5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:17:16 2000 +0000
Implied directories for alpha/alphaev67.
diff --git a/sysdeps/alpha/alphaev67/Implies b/sysdeps/alpha/alphaev67/Implies
new file mode 100644
index 0000000..49d19c4
--- /dev/null
+++ b/sysdeps/alpha/alphaev67/Implies
@@ -0,0 +1 @@
+alpha/alphaev6
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e8e600ed7c7c27f5aa6181d82850692592fac10
commit 8e8e600ed7c7c27f5aa6181d82850692592fac10
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:17:08 2000 +0000
Implied directories for alpha/alphaev6.
diff --git a/sysdeps/alpha/alphaev6/Implies b/sysdeps/alpha/alphaev6/Implies
new file mode 100644
index 0000000..0e7fc17
--- /dev/null
+++ b/sysdeps/alpha/alphaev6/Implies
@@ -0,0 +1 @@
+alpha/alphaev5
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebc9cec7b73153e782100ea03fb884426245a04a
commit ebc9cec7b73153e782100ea03fb884426245a04a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:16:52 2000 +0000
Fix typo.
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index f4c234d..615f439 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -27,7 +27,7 @@
compiler treats those calls as if they were instructions. In
particular, it doesn't save any of the temporary registers (caller
saved registers). It is therefore necessary to preserve all
- caller-saved registers as well
+ caller-saved registers as well.
Upon entering _mcount, register $at holds the return address and ra
holds the return address of the function's caller (selfpc and frompc,
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
index 91bf928..97d7416 100644
--- a/sysdeps/alpha/strncpy.S
+++ b/sysdeps/alpha/strncpy.S
@@ -53,7 +53,6 @@ ENTRY(strncpy)
ret # .. e1 :
$multiword:
-
subq t8, 1, t7 # e0 : clear the final bits in the prev
or t7, t8, t7 # e1 : word
zapnot t0, t7, t0 # e0 :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de55c82792509d1df67e0e8a4c18d4fff741d7ab
commit de55c82792509d1df67e0e8a4c18d4fff741d7ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:16:42 2000 +0000
Tail call to __stxcpy.
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
index ddc15d9..433ca9f 100644
--- a/sysdeps/alpha/strcat.S
+++ b/sysdeps/alpha/strcat.S
@@ -65,7 +65,7 @@ $found: negq t1, t2 # clear all but least set bit
/* Now do the append. */
- jsr t9, __stxcpy
- ret
+ mov ra, t9
+ jmp $31, __stxcpy
END(strcat)
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
index 24c827b..2fa6318 100644
--- a/sysdeps/alpha/strcpy.S
+++ b/sysdeps/alpha/strcpy.S
@@ -35,7 +35,7 @@ ENTRY(strcpy)
.prologue 1
mov a0, v0 # set up return value
- jsr t9, __stxcpy # do the copy
- ret
+ mov ra, t9
+ jmp $31, __stxcpy # do the copy
END(strcpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa6dc9e01ee994296afbf60ea4401ef7dd464940
commit fa6dc9e01ee994296afbf60ea4401ef7dd464940
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:16:25 2000 +0000
Alpha rawmemchr implementation.
diff --git a/sysdeps/alpha/rawmemchr.S b/sysdeps/alpha/rawmemchr.S
new file mode 100644
index 0000000..bbf54a9
--- /dev/null
+++ b/sysdeps/alpha/rawmemchr.S
@@ -0,0 +1,89 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Return pointer to first occurrence of CH in STR. */
+
+#include <sysdep.h>
+
+ .set noreorder
+ .set noat
+
+ENTRY(__rawmemchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ zapnot a1, 1, a1 # e0 : zero extend the search character
+ ldq_u t0, 0(a0) # .. e1 : load first quadword
+ sll a1, 8, t5 # e0 : replicate the search character
+ andnot a0, 7, v0 # .. e1 : align our loop pointer
+
+ or t5, a1, a1 # e0 :
+ lda t4, -1 # .. e1 : build garbage mask
+ sll a1, 16, t5 # e0 :
+ unop # :
+
+ mskqh t4, a0, t4 # e0 :
+ or t5, a1, a1 # .. e1 :
+ sll a1, 32, t5 # e0 :
+ cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage
+
+ or t5, a1, a1 # e0 :
+ xor t0, a1, t1 # .. e1 : make bytes == c zero
+ cmpbge zero, t1, t3 # e0 : bits set iff byte == c
+ unop # :
+
+ andnot t3, t4, t0 # e0 : clear garbage bits
+ fnop # .. fa :
+ unop # :
+ bne t0, $found # .. e1 (zdb)
+
+ .align 4
+$loop:
+ ldq t0, 8(v0) # e0 :
+ addq v0, 8, v0 # .. e1 :
+ nop # e0 :
+ xor t0, a1, t1 # .. e1 (ev5 data stall)
+
+ cmpbge zero, t1, t0 # e0 : bits set iff byte == c
+ beq t0, $loop # .. e1 (zdb)
+
+$found:
+ negq t0, t1 # e0 : clear all but least set bit
+ and t0, t1, t0 # e1 (stall)
+ and t0, 0xf0, t2 # e0 : binary search for that set bit
+ and t0, 0xcc, t3 # .. e1 :
+
+ and t0, 0xaa, t4 # e0 :
+ cmovne t2, 4, t2 # .. e1 :
+ cmovne t3, 2, t3 # e0 :
+ cmovne t4, 1, t4 # .. e1 :
+
+ addq t2, t3, t2 # e0 :
+ addq v0, t4, v0 # .. e1 :
+ addq v0, t2, v0 # e0 :
+ ret # .. e1 :
+
+ END(__rawmemchr)
+
+weak_alias (__rawmemchr, rawmemchr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ba8e511ff2c0e7a087c304c9ece62b006c62d9e
commit 4ba8e511ff2c0e7a087c304c9ece62b006c62d9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 8 17:16:05 2000 +0000
Use a shorter sequence.
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index a4e39ce..2358861 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,15 +30,13 @@ ENTRY(htonl)
.prologue 0
#endif
- extlh a0, 5, t1 # t1 = dd000000
- zap a0, 0xfd, t2 # t2 = 0000cc00
- sll t2, 5, t2 # t2 = 00198000
- s8addl t2, t1, t1 # t1 = ddcc0000
- zap a0, 0xfb, t2 # t2 = 00bb0000
- srl t2, 8, t2 # t2 = 0000bb00
- extbl a0, 3, v0 # v0 = 000000aa
- or t1, v0, v0 # v0 = ddcc00aa
- or t2, v0, v0 # v0 = ddccbbaa
+ inslh a0, 7, t0 # t0 = 0000000000AABBCC
+ inswl a0, 3, t1 # t1 = 000000CCDD000000
+ or t1, t0, t1 # t1 = 000000CCDDAABBCC
+ sll t1, 16, t2 # t2 = 0000000000CCDDAA
+ zapnot t1, 0x0A, t0 # t0 = 00000000DD00BB00
+ zapnot t2, 0x05, t3 # t3 = 0000000000CC00AA
+ addl t0, t3, v0 # v0 = ssssssssDDCCBBAA
ret
END(htonl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f26c98f0d41604663ac5868d67f22251bbef380b
commit f26c98f0d41604663ac5868d67f22251bbef380b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 7 00:32:26 2000 +0000
[$(subdir)==misc] (sysdep_routines): Add uitrunc.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index cb8683b..6c9ce11 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -6,7 +6,7 @@
static-start-installed-name = /usr/lib/crt0.o
ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close restf savef
+sysdep_routines += dl-open dl-sym dl-close restf savef uitrunc
endif
ifeq ($(subdir),login)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8028612ca7f7b5f61ccd5b71ffa9d7fe26ff2ed
commit a8028612ca7f7b5f61ccd5b71ffa9d7fe26ff2ed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 7 00:31:48 2000 +0000
__uitrunc implementation.
diff --git a/sysdeps/unix/sysv/aix/uitrunc.c b/sysdeps/unix/sysv/aix/uitrunc.c
new file mode 100644
index 0000000..34a109b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/uitrunc.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+/* The uitrunc function returns the nearest unsigned integer
+ to the x parameter in the direction of 0. This actions is
+ equivalent to truncation off the fraction bits of the x
+ parameter and then converting x to an unsigned integer. */
+unsigned int
+__uitrunc (double x)
+{
+ double xrf;
+ unsigned int xr;
+ xr = (unsigned int) x;
+ xrf = (double) xr;
+ if (x >= 0.0)
+ if (x - xrf >= 0.5 && x - xrf < 1.0 && x + 1 > 0)
+ return x + 1;
+ else
+ return x;
+ else
+ if (xrf - x >= 0.5 && xrf - x < 1.0 && x - 1 < 0)
+ return x - 1;
+ else
+ return x;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d284ba97fbe3482a2b0231478f31e1dae6a1a949
commit d284ba97fbe3482a2b0231478f31e1dae6a1a949
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 6 04:05:25 2000 +0000
(__data_start): Define.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index b5e5df1..90f59f0 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for Alpha/ELF.
- Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>
@@ -59,3 +59,11 @@ _start:
/* For ECOFF backwards compatibility. */
weak_alias(_start, __start)
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66c776d7184831deed683b1e87b2eea9446a43b9
commit 66c776d7184831deed683b1e87b2eea9446a43b9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 6 03:14:16 2000 +0000
Floating point register restore functions.
diff --git a/sysdeps/unix/sysv/aix/restf.S b/sysdeps/unix/sysv/aix/restf.S
new file mode 100644
index 0000000..049627e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/restf.S
@@ -0,0 +1,58 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ENTRY(_restf_all)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
+C_TEXT(_restf14): lfd fp14,-144(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
+C_TEXT(_restf15): lfd fp15,-136(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
+C_TEXT(_restf16): lfd fp16,-128(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
+C_TEXT(_restf17): lfd fp17,-120(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
+C_TEXT(_restf18): lfd fp18,-112(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
+C_TEXT(_restf19): lfd fp19,-104(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
+C_TEXT(_restf20): lfd fp20,-96(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
+C_TEXT(_restf21): lfd fp21,-88(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
+C_TEXT(_restf22): lfd fp22,-80(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
+C_TEXT(_restf23): lfd fp23,-72(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
+C_TEXT(_restf24): lfd fp24,-64(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
+C_TEXT(_restf25): lfd fp25,-56(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
+C_TEXT(_restf26): lfd fp26,-48(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
+C_TEXT(_restf27): lfd fp27,-40(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
+C_TEXT(_restf28): lfd fp28,-32(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
+C_TEXT(_restf29): lfd fp29,-24(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf30)
+C_TEXT(_restf30): lfd fp30,-16(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_restf31)
+C_TEXT(_restf31): lfd fp31,-8(r11)
+ blr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e198e3e80edda1ac746d34284c577298c10c4824
commit e198e3e80edda1ac746d34284c577298c10c4824
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 6 03:13:59 2000 +0000
Floating point register saving functions.
diff --git a/sysdeps/unix/sysv/aix/savef.S b/sysdeps/unix/sysv/aix/savef.S
new file mode 100644
index 0000000..4c10d6e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/savef.S
@@ -0,0 +1,58 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ENTRY(_savef_all)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
+C_TEXT(_savef14): stfd fp14,-144(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
+C_TEXT(_savef15): stfd fp15,-136(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
+C_TEXT(_savef16): stfd fp16,-128(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
+C_TEXT(_savef17): stfd fp17,-120(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
+C_TEXT(_savef18): stfd fp18,-112(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
+C_TEXT(_savef19): stfd fp19,-104(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
+C_TEXT(_savef20): stfd fp20,-96(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
+C_TEXT(_savef21): stfd fp21,-88(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
+C_TEXT(_savef22): stfd fp22,-80(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
+C_TEXT(_savef23): stfd fp23,-72(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
+C_TEXT(_savef24): stfd fp24,-64(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
+C_TEXT(_savef25): stfd fp25,-56(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
+C_TEXT(_savef26): stfd fp26,-48(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
+C_TEXT(_savef27): stfd fp27,-40(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
+C_TEXT(_savef28): stfd fp28,-32(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
+C_TEXT(_savef29): stfd fp29,-24(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef30)
+C_TEXT(_savef30): stfd fp30,-16(r11)
+ ASM_GLOBAL_DIRECTIVE C_TEXT(_savef31)
+C_TEXT(_savef31): stfd fp31,-8(r11)
+ blr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dcd9300681f7704b664b5d361ec35cf86ae58d3d
commit dcd9300681f7704b664b5d361ec35cf86ae58d3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 6 03:12:51 2000 +0000
[$(subdir)==misc] (sysdep_routines): Add restf and savef.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index b49b562..cb8683b 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -6,7 +6,7 @@
static-start-installed-name = /usr/lib/crt0.o
ifeq ($(subdir),misc)
-sysdep_routines += dl-open dl-sym dl-close
+sysdep_routines += dl-open dl-sym dl-close restf savef
endif
ifeq ($(subdir),login)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae8186b5e30447264701604b22092260d6d72e2d
commit ae8186b5e30447264701604b22092260d6d72e2d
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Dec 5 17:59:58 2000 +0000
(_test_and_set): Don't set mips2.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 8409535..757b8bc 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -42,8 +42,7 @@ _test_and_set (int *p, int v) __THROW
int r, t;
__asm__ __volatile__
- (".set\tmips2\n"
- "1:\n\t"
+ ("1:\n\t"
"ll %0,%3\n\t"
".set push\n\t"
".set noreorder\n\t"
@@ -52,8 +51,7 @@ _test_and_set (int *p, int v) __THROW
".set pop\n\t"
"sc %1,%2\n\t"
"beqz %1,1b\n"
- "2:\n\t"
- ".set\tmips0"
+ "2:\n"
: "=&r" (r), "=&r" (t), "=m" (*p)
: "m" (*p), "r" (v)
: "memory");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94f1fa3185248ee05a26c42243a8ff2b93bae0f4
commit 94f1fa3185248ee05a26c42243a8ff2b93bae0f4
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Dec 5 17:41:00 2000 +0000
Use SYS_ify.
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 2ba1dea..a5a3e55 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -40,7 +40,7 @@
ENTRY(name) \
.set noreorder; \
.cpload t9; \
- li v0, SYS_##syscall_name; \
+ li v0, SYS_ify(syscall_name); \
syscall; \
.set reorder; \
bne a3, zero, 99b; \
@@ -52,7 +52,7 @@ syse1:
99: j __syscall_error; \
ENTRY(name) \
.set noreorder; \
- li v0, SYS_##syscall_name; \
+ li v0, SYS_ify(syscall_name); \
syscall; \
.set reorder; \
bne a3, zero, 99b; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87af90e7c33e38c1958ee0a49a26ab8af8c0fc08
commit 87af90e7c33e38c1958ee0a49a26ab8af8c0fc08
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Dec 5 17:40:39 2000 +0000
Linux/MIPS specific version.
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.h b/sysdeps/unix/sysv/linux/mips/sysdep.h
new file mode 100644
index 0000000..f01a195
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _LINUX_MIPS_SYSDEP_H
+#define _LINUX_MIPS_SYSDEP_H 1
+
+/* There is some commonality. */
+#include <sysdeps/unix/mips/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
+#endif
+
+#endif /* linux/mips/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6943ccb42b48c067355ec1c582b7e1f9d166acee
commit 6943ccb42b48c067355ec1c582b7e1f9d166acee
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Dec 5 17:39:49 2000 +0000
Removed.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
deleted file mode 100644
index fbfe128..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ /dev/null
@@ -1,1226 +0,0 @@
-/* Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYSCALL_H
-#define _SYSCALL_H 1
-
-/* This file should list the numbers of the system the system knows.
- But instead of duplicating this we use the information available
- from the kernel sources. */
-#include <asm/unistd.h>
-
-/* The Linux kernel header file defines macros `__NR_<name>', but some
- programs expect the traditional form `SYS_<name>'. So in building libc
- we scan the kernel's list and produce <bits/syscall.h> with macros for
- all the `SYS_' names. On MIPS the program which generates <bits/syscalls.h>
- on the other ports fails, so do this manually. */
-
-
-/*
- * SVR4 syscalls are in the range from 1 to 999
- */
-#define SYS_SVR4 0
-#define SYS_SVR4_syscall (SYS_SVR4 + 0)
-#define SYS_SVR4_exit (SYS_SVR4 + 1)
-#define SYS_SVR4_fork (SYS_SVR4 + 2)
-#define SYS_SVR4_read (SYS_SVR4 + 3)
-#define SYS_SVR4_write (SYS_SVR4 + 4)
-#define SYS_SVR4_open (SYS_SVR4 + 5)
-#define SYS_SVR4_close (SYS_SVR4 + 6)
-#define SYS_SVR4_wait (SYS_SVR4 + 7)
-#define SYS_SVR4_creat (SYS_SVR4 + 8)
-#define SYS_SVR4_link (SYS_SVR4 + 9)
-#define SYS_SVR4_unlink (SYS_SVR4 + 10)
-#define SYS_SVR4_exec (SYS_SVR4 + 11)
-#define SYS_SVR4_chdir (SYS_SVR4 + 12)
-#define SYS_SVR4_gtime (SYS_SVR4 + 13)
-#define SYS_SVR4_mknod (SYS_SVR4 + 14)
-#define SYS_SVR4_chmod (SYS_SVR4 + 15)
-#define SYS_SVR4_chown (SYS_SVR4 + 16)
-#define SYS_SVR4_sbreak (SYS_SVR4 + 17)
-#define SYS_SVR4_stat (SYS_SVR4 + 18)
-#define SYS_SVR4_lseek (SYS_SVR4 + 19)
-#define SYS_SVR4_getpid (SYS_SVR4 + 20)
-#define SYS_SVR4_mount (SYS_SVR4 + 21)
-#define SYS_SVR4_umount (SYS_SVR4 + 22)
-#define SYS_SVR4_setuid (SYS_SVR4 + 23)
-#define SYS_SVR4_getuid (SYS_SVR4 + 24)
-#define SYS_SVR4_stime (SYS_SVR4 + 25)
-#define SYS_SVR4_ptrace (SYS_SVR4 + 26)
-#define SYS_SVR4_alarm (SYS_SVR4 + 27)
-#define SYS_SVR4_fstat (SYS_SVR4 + 28)
-#define SYS_SVR4_pause (SYS_SVR4 + 29)
-#define SYS_SVR4_utime (SYS_SVR4 + 30)
-#define SYS_SVR4_stty (SYS_SVR4 + 31)
-#define SYS_SVR4_gtty (SYS_SVR4 + 32)
-#define SYS_SVR4_access (SYS_SVR4 + 33)
-#define SYS_SVR4_nice (SYS_SVR4 + 34)
-#define SYS_SVR4_statfs (SYS_SVR4 + 35)
-#define SYS_SVR4_sync (SYS_SVR4 + 36)
-#define SYS_SVR4_kill (SYS_SVR4 + 37)
-#define SYS_SVR4_fstatfs (SYS_SVR4 + 38)
-#define SYS_SVR4_setpgrp (SYS_SVR4 + 39)
-#define SYS_SVR4_cxenix (SYS_SVR4 + 40)
-#define SYS_SVR4_dup (SYS_SVR4 + 41)
-#define SYS_SVR4_pipe (SYS_SVR4 + 42)
-#define SYS_SVR4_times (SYS_SVR4 + 43)
-#define SYS_SVR4_profil (SYS_SVR4 + 44)
-#define SYS_SVR4_plock (SYS_SVR4 + 45)
-#define SYS_SVR4_setgid (SYS_SVR4 + 46)
-#define SYS_SVR4_getgid (SYS_SVR4 + 47)
-#define SYS_SVR4_sig (SYS_SVR4 + 48)
-#define SYS_SVR4_msgsys (SYS_SVR4 + 49)
-#define SYS_SVR4_sysmips (SYS_SVR4 + 50)
-#define SYS_SVR4_sysacct (SYS_SVR4 + 51)
-#define SYS_SVR4_shmsys (SYS_SVR4 + 52)
-#define SYS_SVR4_semsys (SYS_SVR4 + 53)
-#define SYS_SVR4_ioctl (SYS_SVR4 + 54)
-#define SYS_SVR4_uadmin (SYS_SVR4 + 55)
-#define SYS_SVR4_exch (SYS_SVR4 + 56)
-#define SYS_SVR4_utssys (SYS_SVR4 + 57)
-#define SYS_SVR4_fsync (SYS_SVR4 + 58)
-#define SYS_SVR4_exece (SYS_SVR4 + 59)
-#define SYS_SVR4_umask (SYS_SVR4 + 60)
-#define SYS_SVR4_chroot (SYS_SVR4 + 61)
-#define SYS_SVR4_fcntl (SYS_SVR4 + 62)
-#define SYS_SVR4_ulimit (SYS_SVR4 + 63)
-#define SYS_SVR4_reserved1 (SYS_SVR4 + 64)
-#define SYS_SVR4_reserved2 (SYS_SVR4 + 65)
-#define SYS_SVR4_reserved3 (SYS_SVR4 + 66)
-#define SYS_SVR4_reserved4 (SYS_SVR4 + 67)
-#define SYS_SVR4_reserved5 (SYS_SVR4 + 68)
-#define SYS_SVR4_reserved6 (SYS_SVR4 + 69)
-#define SYS_SVR4_advfs (SYS_SVR4 + 70)
-#define SYS_SVR4_unadvfs (SYS_SVR4 + 71)
-#define SYS_SVR4_unused1 (SYS_SVR4 + 72)
-#define SYS_SVR4_unused2 (SYS_SVR4 + 73)
-#define SYS_SVR4_rfstart (SYS_SVR4 + 74)
-#define SYS_SVR4_unused3 (SYS_SVR4 + 75)
-#define SYS_SVR4_rdebug (SYS_SVR4 + 76)
-#define SYS_SVR4_rfstop (SYS_SVR4 + 77)
-#define SYS_SVR4_rfsys (SYS_SVR4 + 78)
-#define SYS_SVR4_rmdir (SYS_SVR4 + 79)
-#define SYS_SVR4_mkdir (SYS_SVR4 + 80)
-#define SYS_SVR4_getdents (SYS_SVR4 + 81)
-#define SYS_SVR4_libattach (SYS_SVR4 + 82)
-#define SYS_SVR4_libdetach (SYS_SVR4 + 83)
-#define SYS_SVR4_sysfs (SYS_SVR4 + 84)
-#define SYS_SVR4_getmsg (SYS_SVR4 + 85)
-#define SYS_SVR4_putmsg (SYS_SVR4 + 86)
-#define SYS_SVR4_poll (SYS_SVR4 + 87)
-#define SYS_SVR4_lstat (SYS_SVR4 + 88)
-#define SYS_SVR4_symlink (SYS_SVR4 + 89)
-#define SYS_SVR4_readlink (SYS_SVR4 + 90)
-#define SYS_SVR4_setgroups (SYS_SVR4 + 91)
-#define SYS_SVR4_getgroups (SYS_SVR4 + 92)
-#define SYS_SVR4_fchmod (SYS_SVR4 + 93)
-#define SYS_SVR4_fchown (SYS_SVR4 + 94)
-#define SYS_SVR4_sigprocmask (SYS_SVR4 + 95)
-#define SYS_SVR4_sigsuspend (SYS_SVR4 + 96)
-#define SYS_SVR4_sigaltstack (SYS_SVR4 + 97)
-#define SYS_SVR4_sigaction (SYS_SVR4 + 98)
-#define SYS_SVR4_sigpending (SYS_SVR4 + 99)
-#define SYS_SVR4_setcontext (SYS_SVR4 + 100)
-#define SYS_SVR4_evsys (SYS_SVR4 + 101)
-#define SYS_SVR4_evtrapret (SYS_SVR4 + 102)
-#define SYS_SVR4_statvfs (SYS_SVR4 + 103)
-#define SYS_SVR4_fstatvfs (SYS_SVR4 + 104)
-#define SYS_SVR4_reserved7 (SYS_SVR4 + 105)
-#define SYS_SVR4_nfssys (SYS_SVR4 + 106)
-#define SYS_SVR4_waitid (SYS_SVR4 + 107)
-#define SYS_SVR4_sigsendset (SYS_SVR4 + 108)
-#define SYS_SVR4_hrtsys (SYS_SVR4 + 109)
-#define SYS_SVR4_acancel (SYS_SVR4 + 110)
-#define SYS_SVR4_async (SYS_SVR4 + 111)
-#define SYS_SVR4_priocntlset (SYS_SVR4 + 112)
-#define SYS_SVR4_pathconf (SYS_SVR4 + 113)
-#define SYS_SVR4_mincore (SYS_SVR4 + 114)
-#define SYS_SVR4_mmap (SYS_SVR4 + 115)
-#define SYS_SVR4_mprotect (SYS_SVR4 + 116)
-#define SYS_SVR4_munmap (SYS_SVR4 + 117)
-#define SYS_SVR4_fpathconf (SYS_SVR4 + 118)
-#define SYS_SVR4_vfork (SYS_SVR4 + 119)
-#define SYS_SVR4_fchdir (SYS_SVR4 + 120)
-#define SYS_SVR4_readv (SYS_SVR4 + 121)
-#define SYS_SVR4_writev (SYS_SVR4 + 122)
-#define SYS_SVR4_xstat (SYS_SVR4 + 123)
-#define SYS_SVR4_lxstat (SYS_SVR4 + 124)
-#define SYS_SVR4_fxstat (SYS_SVR4 + 125)
-#define SYS_SVR4_xmknod (SYS_SVR4 + 126)
-#define SYS_SVR4_clocal (SYS_SVR4 + 127)
-#define SYS_SVR4_setrlimit (SYS_SVR4 + 128)
-#define SYS_SVR4_getrlimit (SYS_SVR4 + 129)
-#define SYS_SVR4_lchown (SYS_SVR4 + 130)
-#define SYS_SVR4_memcntl (SYS_SVR4 + 131)
-#define SYS_SVR4_getpmsg (SYS_SVR4 + 132)
-#define SYS_SVR4_putpmsg (SYS_SVR4 + 133)
-#define SYS_SVR4_rename (SYS_SVR4 + 134)
-#define SYS_SVR4_nuname (SYS_SVR4 + 135)
-#define SYS_SVR4_setegid (SYS_SVR4 + 136)
-#define SYS_SVR4_sysconf (SYS_SVR4 + 137)
-#define SYS_SVR4_adjtime (SYS_SVR4 + 138)
-#define SYS_SVR4_sysinfo (SYS_SVR4 + 139)
-#define SYS_SVR4_reserved8 (SYS_SVR4 + 140)
-#define SYS_SVR4_seteuid (SYS_SVR4 + 141)
-#define SYS_SVR4_PYRAMID_statis (SYS_SVR4 + 142)
-#define SYS_SVR4_PYRAMID_tuning (SYS_SVR4 + 143)
-#define SYS_SVR4_PYRAMID_forcerr (SYS_SVR4 + 144)
-#define SYS_SVR4_PYRAMID_mpcntl (SYS_SVR4 + 145)
-#define SYS_SVR4_reserved9 (SYS_SVR4 + 146)
-#define SYS_SVR4_reserved10 (SYS_SVR4 + 147)
-#define SYS_SVR4_reserved11 (SYS_SVR4 + 148)
-#define SYS_SVR4_reserved12 (SYS_SVR4 + 149)
-#define SYS_SVR4_reserved13 (SYS_SVR4 + 150)
-#define SYS_SVR4_reserved14 (SYS_SVR4 + 151)
-#define SYS_SVR4_reserved15 (SYS_SVR4 + 152)
-#define SYS_SVR4_reserved16 (SYS_SVR4 + 153)
-#define SYS_SVR4_reserved17 (SYS_SVR4 + 154)
-#define SYS_SVR4_reserved18 (SYS_SVR4 + 155)
-#define SYS_SVR4_reserved19 (SYS_SVR4 + 156)
-#define SYS_SVR4_reserved20 (SYS_SVR4 + 157)
-#define SYS_SVR4_reserved21 (SYS_SVR4 + 158)
-#define SYS_SVR4_reserved22 (SYS_SVR4 + 159)
-#define SYS_SVR4_reserved23 (SYS_SVR4 + 160)
-#define SYS_SVR4_reserved24 (SYS_SVR4 + 161)
-#define SYS_SVR4_reserved25 (SYS_SVR4 + 162)
-#define SYS_SVR4_reserved26 (SYS_SVR4 + 163)
-#define SYS_SVR4_reserved27 (SYS_SVR4 + 164)
-#define SYS_SVR4_reserved28 (SYS_SVR4 + 165)
-#define SYS_SVR4_reserved29 (SYS_SVR4 + 166)
-#define SYS_SVR4_reserved30 (SYS_SVR4 + 167)
-#define SYS_SVR4_reserved31 (SYS_SVR4 + 168)
-#define SYS_SVR4_reserved32 (SYS_SVR4 + 169)
-#define SYS_SVR4_reserved33 (SYS_SVR4 + 170)
-#define SYS_SVR4_reserved34 (SYS_SVR4 + 171)
-#define SYS_SVR4_reserved35 (SYS_SVR4 + 172)
-#define SYS_SVR4_reserved36 (SYS_SVR4 + 173)
-#define SYS_SVR4_reserved37 (SYS_SVR4 + 174)
-#define SYS_SVR4_reserved38 (SYS_SVR4 + 175)
-#define SYS_SVR4_reserved39 (SYS_SVR4 + 176)
-#define SYS_SVR4_reserved40 (SYS_SVR4 + 177)
-#define SYS_SVR4_reserved41 (SYS_SVR4 + 178)
-#define SYS_SVR4_reserved42 (SYS_SVR4 + 179)
-#define SYS_SVR4_reserved43 (SYS_SVR4 + 180)
-#define SYS_SVR4_reserved44 (SYS_SVR4 + 181)
-#define SYS_SVR4_reserved45 (SYS_SVR4 + 182)
-#define SYS_SVR4_reserved46 (SYS_SVR4 + 183)
-#define SYS_SVR4_reserved47 (SYS_SVR4 + 184)
-#define SYS_SVR4_reserved48 (SYS_SVR4 + 185)
-#define SYS_SVR4_reserved49 (SYS_SVR4 + 186)
-#define SYS_SVR4_reserved50 (SYS_SVR4 + 187)
-#define SYS_SVR4_reserved51 (SYS_SVR4 + 188)
-#define SYS_SVR4_reserved52 (SYS_SVR4 + 189)
-#define SYS_SVR4_reserved53 (SYS_SVR4 + 190)
-#define SYS_SVR4_reserved54 (SYS_SVR4 + 191)
-#define SYS_SVR4_reserved55 (SYS_SVR4 + 192)
-#define SYS_SVR4_reserved56 (SYS_SVR4 + 193)
-#define SYS_SVR4_reserved57 (SYS_SVR4 + 194)
-#define SYS_SVR4_reserved58 (SYS_SVR4 + 195)
-#define SYS_SVR4_reserved59 (SYS_SVR4 + 196)
-#define SYS_SVR4_reserved60 (SYS_SVR4 + 197)
-#define SYS_SVR4_reserved61 (SYS_SVR4 + 198)
-#define SYS_SVR4_reserved62 (SYS_SVR4 + 199)
-#define SYS_SVR4_reserved63 (SYS_SVR4 + 200)
-#define SYS_SVR4_aread (SYS_SVR4 + 201)
-#define SYS_SVR4_awrite (SYS_SVR4 + 202)
-#define SYS_SVR4_listio (SYS_SVR4 + 203)
-#define SYS_SVR4_mips_acancel (SYS_SVR4 + 204)
-#define SYS_SVR4_astatus (SYS_SVR4 + 205)
-#define SYS_SVR4_await (SYS_SVR4 + 206)
-#define SYS_SVR4_areadv (SYS_SVR4 + 207)
-#define SYS_SVR4_awritev (SYS_SVR4 + 208)
-#define SYS_SVR4_MIPS_reserved1 (SYS_SVR4 + 209)
-#define SYS_SVR4_MIPS_reserved2 (SYS_SVR4 + 210)
-#define SYS_SVR4_MIPS_reserved3 (SYS_SVR4 + 211)
-#define SYS_SVR4_MIPS_reserved4 (SYS_SVR4 + 212)
-#define SYS_SVR4_MIPS_reserved5 (SYS_SVR4 + 213)
-#define SYS_SVR4_MIPS_reserved6 (SYS_SVR4 + 214)
-#define SYS_SVR4_MIPS_reserved7 (SYS_SVR4 + 215)
-#define SYS_SVR4_MIPS_reserved8 (SYS_SVR4 + 216)
-#define SYS_SVR4_MIPS_reserved9 (SYS_SVR4 + 217)
-#define SYS_SVR4_MIPS_reserved10 (SYS_SVR4 + 218)
-#define SYS_SVR4_MIPS_reserved11 (SYS_SVR4 + 219)
-#define SYS_SVR4_MIPS_reserved12 (SYS_SVR4 + 220)
-#define SYS_SVR4_CDC_reserved1 (SYS_SVR4 + 221)
-#define SYS_SVR4_CDC_reserved2 (SYS_SVR4 + 222)
-#define SYS_SVR4_CDC_reserved3 (SYS_SVR4 + 223)
-#define SYS_SVR4_CDC_reserved4 (SYS_SVR4 + 224)
-#define SYS_SVR4_CDC_reserved5 (SYS_SVR4 + 225)
-#define SYS_SVR4_CDC_reserved6 (SYS_SVR4 + 226)
-#define SYS_SVR4_CDC_reserved7 (SYS_SVR4 + 227)
-#define SYS_SVR4_CDC_reserved8 (SYS_SVR4 + 228)
-#define SYS_SVR4_CDC_reserved9 (SYS_SVR4 + 229)
-#define SYS_SVR4_CDC_reserved10 (SYS_SVR4 + 230)
-#define SYS_SVR4_CDC_reserved11 (SYS_SVR4 + 231)
-#define SYS_SVR4_CDC_reserved12 (SYS_SVR4 + 232)
-#define SYS_SVR4_CDC_reserved13 (SYS_SVR4 + 233)
-#define SYS_SVR4_CDC_reserved14 (SYS_SVR4 + 234)
-#define SYS_SVR4_CDC_reserved15 (SYS_SVR4 + 235)
-#define SYS_SVR4_CDC_reserved16 (SYS_SVR4 + 236)
-#define SYS_SVR4_CDC_reserved17 (SYS_SVR4 + 237)
-#define SYS_SVR4_CDC_reserved18 (SYS_SVR4 + 238)
-#define SYS_SVR4_CDC_reserved19 (SYS_SVR4 + 239)
-#define SYS_SVR4_CDC_reserved20 (SYS_SVR4 + 240)
-
-/*
- * SYS V syscalls are in the range from 1000 to 1999
- */
-#define SYS_SYSV 1000
-#define SYS_SYSV_syscall (SYS_SYSV + 0)
-#define SYS_SYSV_exit (SYS_SYSV + 1)
-#define SYS_SYSV_fork (SYS_SYSV + 2)
-#define SYS_SYSV_read (SYS_SYSV + 3)
-#define SYS_SYSV_write (SYS_SYSV + 4)
-#define SYS_SYSV_open (SYS_SYSV + 5)
-#define SYS_SYSV_close (SYS_SYSV + 6)
-#define SYS_SYSV_wait (SYS_SYSV + 7)
-#define SYS_SYSV_creat (SYS_SYSV + 8)
-#define SYS_SYSV_link (SYS_SYSV + 9)
-#define SYS_SYSV_unlink (SYS_SYSV + 10)
-#define SYS_SYSV_execv (SYS_SYSV + 11)
-#define SYS_SYSV_chdir (SYS_SYSV + 12)
-#define SYS_SYSV_time (SYS_SYSV + 13)
-#define SYS_SYSV_mknod (SYS_SYSV + 14)
-#define SYS_SYSV_chmod (SYS_SYSV + 15)
-#define SYS_SYSV_chown (SYS_SYSV + 16)
-#define SYS_SYSV_brk (SYS_SYSV + 17)
-#define SYS_SYSV_stat (SYS_SYSV + 18)
-#define SYS_SYSV_lseek (SYS_SYSV + 19)
-#define SYS_SYSV_getpid (SYS_SYSV + 20)
-#define SYS_SYSV_mount (SYS_SYSV + 21)
-#define SYS_SYSV_umount (SYS_SYSV + 22)
-#define SYS_SYSV_setuid (SYS_SYSV + 23)
-#define SYS_SYSV_getuid (SYS_SYSV + 24)
-#define SYS_SYSV_stime (SYS_SYSV + 25)
-#define SYS_SYSV_ptrace (SYS_SYSV + 26)
-#define SYS_SYSV_alarm (SYS_SYSV + 27)
-#define SYS_SYSV_fstat (SYS_SYSV + 28)
-#define SYS_SYSV_pause (SYS_SYSV + 29)
-#define SYS_SYSV_utime (SYS_SYSV + 30)
-#define SYS_SYSV_stty (SYS_SYSV + 31)
-#define SYS_SYSV_gtty (SYS_SYSV + 32)
-#define SYS_SYSV_access (SYS_SYSV + 33)
-#define SYS_SYSV_nice (SYS_SYSV + 34)
-#define SYS_SYSV_statfs (SYS_SYSV + 35)
-#define SYS_SYSV_sync (SYS_SYSV + 36)
-#define SYS_SYSV_kill (SYS_SYSV + 37)
-#define SYS_SYSV_fstatfs (SYS_SYSV + 38)
-#define SYS_SYSV_setpgrp (SYS_SYSV + 39)
-#define SYS_SYSV_syssgi (SYS_SYSV + 40)
-#define SYS_SYSV_dup (SYS_SYSV + 41)
-#define SYS_SYSV_pipe (SYS_SYSV + 42)
-#define SYS_SYSV_times (SYS_SYSV + 43)
-#define SYS_SYSV_profil (SYS_SYSV + 44)
-#define SYS_SYSV_plock (SYS_SYSV + 45)
-#define SYS_SYSV_setgid (SYS_SYSV + 46)
-#define SYS_SYSV_getgid (SYS_SYSV + 47)
-#define SYS_SYSV_sig (SYS_SYSV + 48)
-#define SYS_SYSV_msgsys (SYS_SYSV + 49)
-#define SYS_SYSV_sysmips (SYS_SYSV + 50)
-#define SYS_SYSV_acct (SYS_SYSV + 51)
-#define SYS_SYSV_shmsys (SYS_SYSV + 52)
-#define SYS_SYSV_semsys (SYS_SYSV + 53)
-#define SYS_SYSV_ioctl (SYS_SYSV + 54)
-#define SYS_SYSV_uadmin (SYS_SYSV + 55)
-#define SYS_SYSV_sysmp (SYS_SYSV + 56)
-#define SYS_SYSV_utssys (SYS_SYSV + 57)
-#define SYS_SYSV_USG_reserved1 (SYS_SYSV + 58)
-#define SYS_SYSV_execve (SYS_SYSV + 59)
-#define SYS_SYSV_umask (SYS_SYSV + 60)
-#define SYS_SYSV_chroot (SYS_SYSV + 61)
-#define SYS_SYSV_fcntl (SYS_SYSV + 62)
-#define SYS_SYSV_ulimit (SYS_SYSV + 63)
-#define SYS_SYSV_SAFARI4_reserved1 (SYS_SYSV + 64)
-#define SYS_SYSV_SAFARI4_reserved2 (SYS_SYSV + 65)
-#define SYS_SYSV_SAFARI4_reserved3 (SYS_SYSV + 66)
-#define SYS_SYSV_SAFARI4_reserved4 (SYS_SYSV + 67)
-#define SYS_SYSV_SAFARI4_reserved5 (SYS_SYSV + 68)
-#define SYS_SYSV_SAFARI4_reserved6 (SYS_SYSV + 69)
-#define SYS_SYSV_advfs (SYS_SYSV + 70)
-#define SYS_SYSV_unadvfs (SYS_SYSV + 71)
-#define SYS_SYSV_rmount (SYS_SYSV + 72)
-#define SYS_SYSV_rumount (SYS_SYSV + 73)
-#define SYS_SYSV_rfstart (SYS_SYSV + 74)
-#define SYS_SYSV_getrlimit64 (SYS_SYSV + 75)
-#define SYS_SYSV_setrlimit64 (SYS_SYSV + 76)
-#define SYS_SYSV_nanosleep (SYS_SYSV + 77)
-#define SYS_SYSV_lseek64 (SYS_SYSV + 78)
-#define SYS_SYSV_rmdir (SYS_SYSV + 79)
-#define SYS_SYSV_mkdir (SYS_SYSV + 80)
-#define SYS_SYSV_getdents (SYS_SYSV + 81)
-#define SYS_SYSV_sginap (SYS_SYSV + 82)
-#define SYS_SYSV_sgikopt (SYS_SYSV + 83)
-#define SYS_SYSV_sysfs (SYS_SYSV + 84)
-#define SYS_SYSV_getmsg (SYS_SYSV + 85)
-#define SYS_SYSV_putmsg (SYS_SYSV + 86)
-#define SYS_SYSV_poll (SYS_SYSV + 87)
-#define SYS_SYSV_sigreturn (SYS_SYSV + 88)
-#define SYS_SYSV_accept (SYS_SYSV + 89)
-#define SYS_SYSV_bind (SYS_SYSV + 90)
-#define SYS_SYSV_connect (SYS_SYSV + 91)
-#define SYS_SYSV_gethostid (SYS_SYSV + 92)
-#define SYS_SYSV_getpeername (SYS_SYSV + 93)
-#define SYS_SYSV_getsockname (SYS_SYSV + 94)
-#define SYS_SYSV_getsockopt (SYS_SYSV + 95)
-#define SYS_SYSV_listen (SYS_SYSV + 96)
-#define SYS_SYSV_recv (SYS_SYSV + 97)
-#define SYS_SYSV_recvfrom (SYS_SYSV + 98)
-#define SYS_SYSV_recvmsg (SYS_SYSV + 99)
-#define SYS_SYSV_select (SYS_SYSV + 100)
-#define SYS_SYSV_send (SYS_SYSV + 101)
-#define SYS_SYSV_sendmsg (SYS_SYSV + 102)
-#define SYS_SYSV_sendto (SYS_SYSV + 103)
-#define SYS_SYSV_sethostid (SYS_SYSV + 104)
-#define SYS_SYSV_setsockopt (SYS_SYSV + 105)
-#define SYS_SYSV_shutdown (SYS_SYSV + 106)
-#define SYS_SYSV_socket (SYS_SYSV + 107)
-#define SYS_SYSV_gethostname (SYS_SYSV + 108)
-#define SYS_SYSV_sethostname (SYS_SYSV + 109)
-#define SYS_SYSV_getdomainname (SYS_SYSV + 110)
-#define SYS_SYSV_setdomainname (SYS_SYSV + 111)
-#define SYS_SYSV_truncate (SYS_SYSV + 112)
-#define SYS_SYSV_ftruncate (SYS_SYSV + 113)
-#define SYS_SYSV_rename (SYS_SYSV + 114)
-#define SYS_SYSV_symlink (SYS_SYSV + 115)
-#define SYS_SYSV_readlink (SYS_SYSV + 116)
-#define SYS_SYSV_lstat (SYS_SYSV + 117)
-#define SYS_SYSV_nfsmount (SYS_SYSV + 118)
-#define SYS_SYSV_nfssvc (SYS_SYSV + 119)
-#define SYS_SYSV_getfh (SYS_SYSV + 120)
-#define SYS_SYSV_async_daemon (SYS_SYSV + 121)
-#define SYS_SYSV_exportfs (SYS_SYSV + 122)
-#define SYS_SYSV_setregid (SYS_SYSV + 123)
-#define SYS_SYSV_setreuid (SYS_SYSV + 124)
-#define SYS_SYSV_getitimer (SYS_SYSV + 125)
-#define SYS_SYSV_setitimer (SYS_SYSV + 126)
-#define SYS_SYSV_adjtime (SYS_SYSV + 127)
-#define SYS_SYSV_BSD_getime (SYS_SYSV + 128)
-#define SYS_SYSV_sproc (SYS_SYSV + 129)
-#define SYS_SYSV_prctl (SYS_SYSV + 130)
-#define SYS_SYSV_procblk (SYS_SYSV + 131)
-#define SYS_SYSV_sprocsp (SYS_SYSV + 132)
-#define SYS_SYSV_sgigsc (SYS_SYSV + 133)
-#define SYS_SYSV_mmap (SYS_SYSV + 134)
-#define SYS_SYSV_munmap (SYS_SYSV + 135)
-#define SYS_SYSV_mprotect (SYS_SYSV + 136)
-#define SYS_SYSV_msync (SYS_SYSV + 137)
-#define SYS_SYSV_madvise (SYS_SYSV + 138)
-#define SYS_SYSV_pagelock (SYS_SYSV + 139)
-#define SYS_SYSV_getpagesize (SYS_SYSV + 140)
-#define SYS_SYSV_quotactl (SYS_SYSV + 141)
-#define SYS_SYSV_libdetach (SYS_SYSV + 142)
-#define SYS_SYSV_BSDgetpgrp (SYS_SYSV + 143)
-#define SYS_SYSV_BSDsetpgrp (SYS_SYSV + 144)
-#define SYS_SYSV_vhangup (SYS_SYSV + 145)
-#define SYS_SYSV_fsync (SYS_SYSV + 146)
-#define SYS_SYSV_fchdir (SYS_SYSV + 147)
-#define SYS_SYSV_getrlimit (SYS_SYSV + 148)
-#define SYS_SYSV_setrlimit (SYS_SYSV + 149)
-#define SYS_SYSV_cacheflush (SYS_SYSV + 150)
-#define SYS_SYSV_cachectl (SYS_SYSV + 151)
-#define SYS_SYSV_fchown (SYS_SYSV + 152)
-#define SYS_SYSV_fchmod (SYS_SYSV + 153)
-#define SYS_SYSV_wait3 (SYS_SYSV + 154)
-#define SYS_SYSV_socketpair (SYS_SYSV + 155)
-#define SYS_SYSV_sysinfo (SYS_SYSV + 156)
-#define SYS_SYSV_nuname (SYS_SYSV + 157)
-#define SYS_SYSV_xstat (SYS_SYSV + 158)
-#define SYS_SYSV_lxstat (SYS_SYSV + 159)
-#define SYS_SYSV_fxstat (SYS_SYSV + 160)
-#define SYS_SYSV_xmknod (SYS_SYSV + 161)
-#define SYS_SYSV_ksigaction (SYS_SYSV + 162)
-#define SYS_SYSV_sigpending (SYS_SYSV + 163)
-#define SYS_SYSV_sigprocmask (SYS_SYSV + 164)
-#define SYS_SYSV_sigsuspend (SYS_SYSV + 165)
-#define SYS_SYSV_sigpoll (SYS_SYSV + 166)
-#define SYS_SYSV_swapctl (SYS_SYSV + 167)
-#define SYS_SYSV_getcontext (SYS_SYSV + 168)
-#define SYS_SYSV_setcontext (SYS_SYSV + 169)
-#define SYS_SYSV_waitsys (SYS_SYSV + 170)
-#define SYS_SYSV_sigstack (SYS_SYSV + 171)
-#define SYS_SYSV_sigaltstack (SYS_SYSV + 172)
-#define SYS_SYSV_sigsendset (SYS_SYSV + 173)
-#define SYS_SYSV_statvfs (SYS_SYSV + 174)
-#define SYS_SYSV_fstatvfs (SYS_SYSV + 175)
-#define SYS_SYSV_getpmsg (SYS_SYSV + 176)
-#define SYS_SYSV_putpmsg (SYS_SYSV + 177)
-#define SYS_SYSV_lchown (SYS_SYSV + 178)
-#define SYS_SYSV_priocntl (SYS_SYSV + 179)
-#define SYS_SYSV_ksigqueue (SYS_SYSV + 180)
-#define SYS_SYSV_readv (SYS_SYSV + 181)
-#define SYS_SYSV_writev (SYS_SYSV + 182)
-#define SYS_SYSV_truncate64 (SYS_SYSV + 183)
-#define SYS_SYSV_ftruncate64 (SYS_SYSV + 184)
-#define SYS_SYSV_mmap64 (SYS_SYSV + 185)
-#define SYS_SYSV_dmi (SYS_SYSV + 186)
-#define SYS_SYSV_pread (SYS_SYSV + 187)
-#define SYS_SYSV_pwrite (SYS_SYSV + 188)
-
-/*
- * BSD 4.3 syscalls are in the range from 2000 to 2999
- */
-#define SYS_BSD43 2000
-#define SYS_BSD43_syscall (SYS_BSD43 + 0)
-#define SYS_BSD43_exit (SYS_BSD43 + 1)
-#define SYS_BSD43_fork (SYS_BSD43 + 2)
-#define SYS_BSD43_read (SYS_BSD43 + 3)
-#define SYS_BSD43_write (SYS_BSD43 + 4)
-#define SYS_BSD43_open (SYS_BSD43 + 5)
-#define SYS_BSD43_close (SYS_BSD43 + 6)
-#define SYS_BSD43_wait (SYS_BSD43 + 7)
-#define SYS_BSD43_creat (SYS_BSD43 + 8)
-#define SYS_BSD43_link (SYS_BSD43 + 9)
-#define SYS_BSD43_unlink (SYS_BSD43 + 10)
-#define SYS_BSD43_exec (SYS_BSD43 + 11)
-#define SYS_BSD43_chdir (SYS_BSD43 + 12)
-#define SYS_BSD43_time (SYS_BSD43 + 13)
-#define SYS_BSD43_mknod (SYS_BSD43 + 14)
-#define SYS_BSD43_chmod (SYS_BSD43 + 15)
-#define SYS_BSD43_chown (SYS_BSD43 + 16)
-#define SYS_BSD43_sbreak (SYS_BSD43 + 17)
-#define SYS_BSD43_oldstat (SYS_BSD43 + 18)
-#define SYS_BSD43_lseek (SYS_BSD43 + 19)
-#define SYS_BSD43_getpid (SYS_BSD43 + 20)
-#define SYS_BSD43_oldmount (SYS_BSD43 + 21)
-#define SYS_BSD43_umount (SYS_BSD43 + 22)
-#define SYS_BSD43_setuid (SYS_BSD43 + 23)
-#define SYS_BSD43_getuid (SYS_BSD43 + 24)
-#define SYS_BSD43_stime (SYS_BSD43 + 25)
-#define SYS_BSD43_ptrace (SYS_BSD43 + 26)
-#define SYS_BSD43_alarm (SYS_BSD43 + 27)
-#define SYS_BSD43_oldfstat (SYS_BSD43 + 28)
-#define SYS_BSD43_pause (SYS_BSD43 + 29)
-#define SYS_BSD43_utime (SYS_BSD43 + 30)
-#define SYS_BSD43_stty (SYS_BSD43 + 31)
-#define SYS_BSD43_gtty (SYS_BSD43 + 32)
-#define SYS_BSD43_access (SYS_BSD43 + 33)
-#define SYS_BSD43_nice (SYS_BSD43 + 34)
-#define SYS_BSD43_ftime (SYS_BSD43 + 35)
-#define SYS_BSD43_sync (SYS_BSD43 + 36)
-#define SYS_BSD43_kill (SYS_BSD43 + 37)
-#define SYS_BSD43_stat (SYS_BSD43 + 38)
-#define SYS_BSD43_oldsetpgrp (SYS_BSD43 + 39)
-#define SYS_BSD43_lstat (SYS_BSD43 + 40)
-#define SYS_BSD43_dup (SYS_BSD43 + 41)
-#define SYS_BSD43_pipe (SYS_BSD43 + 42)
-#define SYS_BSD43_times (SYS_BSD43 + 43)
-#define SYS_BSD43_profil (SYS_BSD43 + 44)
-#define SYS_BSD43_msgsys (SYS_BSD43 + 45)
-#define SYS_BSD43_setgid (SYS_BSD43 + 46)
-#define SYS_BSD43_getgid (SYS_BSD43 + 47)
-#define SYS_BSD43_ssig (SYS_BSD43 + 48)
-#define SYS_BSD43_reserved1 (SYS_BSD43 + 49)
-#define SYS_BSD43_reserved2 (SYS_BSD43 + 50)
-#define SYS_BSD43_sysacct (SYS_BSD43 + 51)
-#define SYS_BSD43_phys (SYS_BSD43 + 52)
-#define SYS_BSD43_lock (SYS_BSD43 + 53)
-#define SYS_BSD43_ioctl (SYS_BSD43 + 54)
-#define SYS_BSD43_reboot (SYS_BSD43 + 55)
-#define SYS_BSD43_mpxchan (SYS_BSD43 + 56)
-#define SYS_BSD43_symlink (SYS_BSD43 + 57)
-#define SYS_BSD43_readlink (SYS_BSD43 + 58)
-#define SYS_BSD43_execve (SYS_BSD43 + 59)
-#define SYS_BSD43_umask (SYS_BSD43 + 60)
-#define SYS_BSD43_chroot (SYS_BSD43 + 61)
-#define SYS_BSD43_fstat (SYS_BSD43 + 62)
-#define SYS_BSD43_reserved3 (SYS_BSD43 + 63)
-#define SYS_BSD43_getpagesize (SYS_BSD43 + 64)
-#define SYS_BSD43_mremap (SYS_BSD43 + 65)
-#define SYS_BSD43_vfork (SYS_BSD43 + 66)
-#define SYS_BSD43_vread (SYS_BSD43 + 67)
-#define SYS_BSD43_vwrite (SYS_BSD43 + 68)
-#define SYS_BSD43_sbrk (SYS_BSD43 + 69)
-#define SYS_BSD43_sstk (SYS_BSD43 + 70)
-#define SYS_BSD43_mmap (SYS_BSD43 + 71)
-#define SYS_BSD43_vadvise (SYS_BSD43 + 72)
-#define SYS_BSD43_munmap (SYS_BSD43 + 73)
-#define SYS_BSD43_mprotect (SYS_BSD43 + 74)
-#define SYS_BSD43_madvise (SYS_BSD43 + 75)
-#define SYS_BSD43_vhangup (SYS_BSD43 + 76)
-#define SYS_BSD43_vlimit (SYS_BSD43 + 77)
-#define SYS_BSD43_mincore (SYS_BSD43 + 78)
-#define SYS_BSD43_getgroups (SYS_BSD43 + 79)
-#define SYS_BSD43_setgroups (SYS_BSD43 + 80)
-#define SYS_BSD43_getpgrp (SYS_BSD43 + 81)
-#define SYS_BSD43_setpgrp (SYS_BSD43 + 82)
-#define SYS_BSD43_setitimer (SYS_BSD43 + 83)
-#define SYS_BSD43_wait3 (SYS_BSD43 + 84)
-#define SYS_BSD43_swapon (SYS_BSD43 + 85)
-#define SYS_BSD43_getitimer (SYS_BSD43 + 86)
-#define SYS_BSD43_gethostname (SYS_BSD43 + 87)
-#define SYS_BSD43_sethostname (SYS_BSD43 + 88)
-#define SYS_BSD43_getdtablesize (SYS_BSD43 + 89)
-#define SYS_BSD43_dup2 (SYS_BSD43 + 90)
-#define SYS_BSD43_getdopt (SYS_BSD43 + 91)
-#define SYS_BSD43_fcntl (SYS_BSD43 + 92)
-#define SYS_BSD43_select (SYS_BSD43 + 93)
-#define SYS_BSD43_setdopt (SYS_BSD43 + 94)
-#define SYS_BSD43_fsync (SYS_BSD43 + 95)
-#define SYS_BSD43_setpriority (SYS_BSD43 + 96)
-#define SYS_BSD43_socket (SYS_BSD43 + 97)
-#define SYS_BSD43_connect (SYS_BSD43 + 98)
-#define SYS_BSD43_oldaccept (SYS_BSD43 + 99)
-#define SYS_BSD43_getpriority (SYS_BSD43 + 100)
-#define SYS_BSD43_send (SYS_BSD43 + 101)
-#define SYS_BSD43_recv (SYS_BSD43 + 102)
-#define SYS_BSD43_sigreturn (SYS_BSD43 + 103)
-#define SYS_BSD43_bind (SYS_BSD43 + 104)
-#define SYS_BSD43_setsockopt (SYS_BSD43 + 105)
-#define SYS_BSD43_listen (SYS_BSD43 + 106)
-#define SYS_BSD43_vtimes (SYS_BSD43 + 107)
-#define SYS_BSD43_sigvec (SYS_BSD43 + 108)
-#define SYS_BSD43_sigblock (SYS_BSD43 + 109)
-#define SYS_BSD43_sigsetmask (SYS_BSD43 + 110)
-#define SYS_BSD43_sigpause (SYS_BSD43 + 111)
-#define SYS_BSD43_sigstack (SYS_BSD43 + 112)
-#define SYS_BSD43_oldrecvmsg (SYS_BSD43 + 113)
-#define SYS_BSD43_oldsendmsg (SYS_BSD43 + 114)
-#define SYS_BSD43_vtrace (SYS_BSD43 + 115)
-#define SYS_BSD43_gettimeofday (SYS_BSD43 + 116)
-#define SYS_BSD43_getrusage (SYS_BSD43 + 117)
-#define SYS_BSD43_getsockopt (SYS_BSD43 + 118)
-#define SYS_BSD43_reserved4 (SYS_BSD43 + 119)
-#define SYS_BSD43_readv (SYS_BSD43 + 120)
-#define SYS_BSD43_writev (SYS_BSD43 + 121)
-#define SYS_BSD43_settimeofday (SYS_BSD43 + 122)
-#define SYS_BSD43_fchown (SYS_BSD43 + 123)
-#define SYS_BSD43_fchmod (SYS_BSD43 + 124)
-#define SYS_BSD43_oldrecvfrom (SYS_BSD43 + 125)
-#define SYS_BSD43_setreuid (SYS_BSD43 + 126)
-#define SYS_BSD43_setregid (SYS_BSD43 + 127)
-#define SYS_BSD43_rename (SYS_BSD43 + 128)
-#define SYS_BSD43_truncate (SYS_BSD43 + 129)
-#define SYS_BSD43_ftruncate (SYS_BSD43 + 130)
-#define SYS_BSD43_flock (SYS_BSD43 + 131)
-#define SYS_BSD43_semsys (SYS_BSD43 + 132)
-#define SYS_BSD43_sendto (SYS_BSD43 + 133)
-#define SYS_BSD43_shutdown (SYS_BSD43 + 134)
-#define SYS_BSD43_socketpair (SYS_BSD43 + 135)
-#define SYS_BSD43_mkdir (SYS_BSD43 + 136)
-#define SYS_BSD43_rmdir (SYS_BSD43 + 137)
-#define SYS_BSD43_utimes (SYS_BSD43 + 138)
-#define SYS_BSD43_sigcleanup (SYS_BSD43 + 139)
-#define SYS_BSD43_adjtime (SYS_BSD43 + 140)
-#define SYS_BSD43_oldgetpeername (SYS_BSD43 + 141)
-#define SYS_BSD43_gethostid (SYS_BSD43 + 142)
-#define SYS_BSD43_sethostid (SYS_BSD43 + 143)
-#define SYS_BSD43_getrlimit (SYS_BSD43 + 144)
-#define SYS_BSD43_setrlimit (SYS_BSD43 + 145)
-#define SYS_BSD43_killpg (SYS_BSD43 + 146)
-#define SYS_BSD43_shmsys (SYS_BSD43 + 147)
-#define SYS_BSD43_quota (SYS_BSD43 + 148)
-#define SYS_BSD43_qquota (SYS_BSD43 + 149)
-#define SYS_BSD43_oldgetsockname (SYS_BSD43 + 150)
-#define SYS_BSD43_sysmips (SYS_BSD43 + 151)
-#define SYS_BSD43_cacheflush (SYS_BSD43 + 152)
-#define SYS_BSD43_cachectl (SYS_BSD43 + 153)
-#define SYS_BSD43_debug (SYS_BSD43 + 154)
-#define SYS_BSD43_reserved5 (SYS_BSD43 + 155)
-#define SYS_BSD43_reserved6 (SYS_BSD43 + 156)
-#define SYS_BSD43_nfs_mount (SYS_BSD43 + 157)
-#define SYS_BSD43_nfs_svc (SYS_BSD43 + 158)
-#define SYS_BSD43_getdirentries (SYS_BSD43 + 159)
-#define SYS_BSD43_statfs (SYS_BSD43 + 160)
-#define SYS_BSD43_fstatfs (SYS_BSD43 + 161)
-#define SYS_BSD43_unmount (SYS_BSD43 + 162)
-#define SYS_BSD43_async_daemon (SYS_BSD43 + 163)
-#define SYS_BSD43_nfs_getfh (SYS_BSD43 + 164)
-#define SYS_BSD43_getdomainname (SYS_BSD43 + 165)
-#define SYS_BSD43_setdomainname (SYS_BSD43 + 166)
-#define SYS_BSD43_pcfs_mount (SYS_BSD43 + 167)
-#define SYS_BSD43_quotactl (SYS_BSD43 + 168)
-#define SYS_BSD43_oldexportfs (SYS_BSD43 + 169)
-#define SYS_BSD43_smount (SYS_BSD43 + 170)
-#define SYS_BSD43_mipshwconf (SYS_BSD43 + 171)
-#define SYS_BSD43_exportfs (SYS_BSD43 + 172)
-#define SYS_BSD43_nfsfh_open (SYS_BSD43 + 173)
-#define SYS_BSD43_libattach (SYS_BSD43 + 174)
-#define SYS_BSD43_libdetach (SYS_BSD43 + 175)
-#define SYS_BSD43_accept (SYS_BSD43 + 176)
-#define SYS_BSD43_reserved7 (SYS_BSD43 + 177)
-#define SYS_BSD43_reserved8 (SYS_BSD43 + 178)
-#define SYS_BSD43_recvmsg (SYS_BSD43 + 179)
-#define SYS_BSD43_recvfrom (SYS_BSD43 + 180)
-#define SYS_BSD43_sendmsg (SYS_BSD43 + 181)
-#define SYS_BSD43_getpeername (SYS_BSD43 + 182)
-#define SYS_BSD43_getsockname (SYS_BSD43 + 183)
-#define SYS_BSD43_aread (SYS_BSD43 + 184)
-#define SYS_BSD43_awrite (SYS_BSD43 + 185)
-#define SYS_BSD43_listio (SYS_BSD43 + 186)
-#define SYS_BSD43_acancel (SYS_BSD43 + 187)
-#define SYS_BSD43_astatus (SYS_BSD43 + 188)
-#define SYS_BSD43_await (SYS_BSD43 + 189)
-#define SYS_BSD43_areadv (SYS_BSD43 + 190)
-#define SYS_BSD43_awritev (SYS_BSD43 + 191)
-
-/*
- * POSIX syscalls are in the range from 3000 to 3999
- */
-#define SYS_POSIX 3000
-#define SYS_POSIX_syscall (SYS_POSIX + 0)
-#define SYS_POSIX_exit (SYS_POSIX + 1)
-#define SYS_POSIX_fork (SYS_POSIX + 2)
-#define SYS_POSIX_read (SYS_POSIX + 3)
-#define SYS_POSIX_write (SYS_POSIX + 4)
-#define SYS_POSIX_open (SYS_POSIX + 5)
-#define SYS_POSIX_close (SYS_POSIX + 6)
-#define SYS_POSIX_wait (SYS_POSIX + 7)
-#define SYS_POSIX_creat (SYS_POSIX + 8)
-#define SYS_POSIX_link (SYS_POSIX + 9)
-#define SYS_POSIX_unlink (SYS_POSIX + 10)
-#define SYS_POSIX_exec (SYS_POSIX + 11)
-#define SYS_POSIX_chdir (SYS_POSIX + 12)
-#define SYS_POSIX_gtime (SYS_POSIX + 13)
-#define SYS_POSIX_mknod (SYS_POSIX + 14)
-#define SYS_POSIX_chmod (SYS_POSIX + 15)
-#define SYS_POSIX_chown (SYS_POSIX + 16)
-#define SYS_POSIX_sbreak (SYS_POSIX + 17)
-#define SYS_POSIX_stat (SYS_POSIX + 18)
-#define SYS_POSIX_lseek (SYS_POSIX + 19)
-#define SYS_POSIX_getpid (SYS_POSIX + 20)
-#define SYS_POSIX_mount (SYS_POSIX + 21)
-#define SYS_POSIX_umount (SYS_POSIX + 22)
-#define SYS_POSIX_setuid (SYS_POSIX + 23)
-#define SYS_POSIX_getuid (SYS_POSIX + 24)
-#define SYS_POSIX_stime (SYS_POSIX + 25)
-#define SYS_POSIX_ptrace (SYS_POSIX + 26)
-#define SYS_POSIX_alarm (SYS_POSIX + 27)
-#define SYS_POSIX_fstat (SYS_POSIX + 28)
-#define SYS_POSIX_pause (SYS_POSIX + 29)
-#define SYS_POSIX_utime (SYS_POSIX + 30)
-#define SYS_POSIX_stty (SYS_POSIX + 31)
-#define SYS_POSIX_gtty (SYS_POSIX + 32)
-#define SYS_POSIX_access (SYS_POSIX + 33)
-#define SYS_POSIX_nice (SYS_POSIX + 34)
-#define SYS_POSIX_statfs (SYS_POSIX + 35)
-#define SYS_POSIX_sync (SYS_POSIX + 36)
-#define SYS_POSIX_kill (SYS_POSIX + 37)
-#define SYS_POSIX_fstatfs (SYS_POSIX + 38)
-#define SYS_POSIX_getpgrp (SYS_POSIX + 39)
-#define SYS_POSIX_syssgi (SYS_POSIX + 40)
-#define SYS_POSIX_dup (SYS_POSIX + 41)
-#define SYS_POSIX_pipe (SYS_POSIX + 42)
-#define SYS_POSIX_times (SYS_POSIX + 43)
-#define SYS_POSIX_profil (SYS_POSIX + 44)
-#define SYS_POSIX_lock (SYS_POSIX + 45)
-#define SYS_POSIX_setgid (SYS_POSIX + 46)
-#define SYS_POSIX_getgid (SYS_POSIX + 47)
-#define SYS_POSIX_sig (SYS_POSIX + 48)
-#define SYS_POSIX_msgsys (SYS_POSIX + 49)
-#define SYS_POSIX_sysmips (SYS_POSIX + 50)
-#define SYS_POSIX_sysacct (SYS_POSIX + 51)
-#define SYS_POSIX_shmsys (SYS_POSIX + 52)
-#define SYS_POSIX_semsys (SYS_POSIX + 53)
-#define SYS_POSIX_ioctl (SYS_POSIX + 54)
-#define SYS_POSIX_uadmin (SYS_POSIX + 55)
-#define SYS_POSIX_exch (SYS_POSIX + 56)
-#define SYS_POSIX_utssys (SYS_POSIX + 57)
-#define SYS_POSIX_USG_reserved1 (SYS_POSIX + 58)
-#define SYS_POSIX_exece (SYS_POSIX + 59)
-#define SYS_POSIX_umask (SYS_POSIX + 60)
-#define SYS_POSIX_chroot (SYS_POSIX + 61)
-#define SYS_POSIX_fcntl (SYS_POSIX + 62)
-#define SYS_POSIX_ulimit (SYS_POSIX + 63)
-#define SYS_POSIX_SAFARI4_reserved1 (SYS_POSIX + 64)
-#define SYS_POSIX_SAFARI4_reserved2 (SYS_POSIX + 65)
-#define SYS_POSIX_SAFARI4_reserved3 (SYS_POSIX + 66)
-#define SYS_POSIX_SAFARI4_reserved4 (SYS_POSIX + 67)
-#define SYS_POSIX_SAFARI4_reserved5 (SYS_POSIX + 68)
-#define SYS_POSIX_SAFARI4_reserved6 (SYS_POSIX + 69)
-#define SYS_POSIX_advfs (SYS_POSIX + 70)
-#define SYS_POSIX_unadvfs (SYS_POSIX + 71)
-#define SYS_POSIX_rmount (SYS_POSIX + 72)
-#define SYS_POSIX_rumount (SYS_POSIX + 73)
-#define SYS_POSIX_rfstart (SYS_POSIX + 74)
-#define SYS_POSIX_reserved1 (SYS_POSIX + 75)
-#define SYS_POSIX_rdebug (SYS_POSIX + 76)
-#define SYS_POSIX_rfstop (SYS_POSIX + 77)
-#define SYS_POSIX_rfsys (SYS_POSIX + 78)
-#define SYS_POSIX_rmdir (SYS_POSIX + 79)
-#define SYS_POSIX_mkdir (SYS_POSIX + 80)
-#define SYS_POSIX_getdents (SYS_POSIX + 81)
-#define SYS_POSIX_sginap (SYS_POSIX + 82)
-#define SYS_POSIX_sgikopt (SYS_POSIX + 83)
-#define SYS_POSIX_sysfs (SYS_POSIX + 84)
-#define SYS_POSIX_getmsg (SYS_POSIX + 85)
-#define SYS_POSIX_putmsg (SYS_POSIX + 86)
-#define SYS_POSIX_poll (SYS_POSIX + 87)
-#define SYS_POSIX_sigreturn (SYS_POSIX + 88)
-#define SYS_POSIX_accept (SYS_POSIX + 89)
-#define SYS_POSIX_bind (SYS_POSIX + 90)
-#define SYS_POSIX_connect (SYS_POSIX + 91)
-#define SYS_POSIX_gethostid (SYS_POSIX + 92)
-#define SYS_POSIX_getpeername (SYS_POSIX + 93)
-#define SYS_POSIX_getsockname (SYS_POSIX + 94)
-#define SYS_POSIX_getsockopt (SYS_POSIX + 95)
-#define SYS_POSIX_listen (SYS_POSIX + 96)
-#define SYS_POSIX_recv (SYS_POSIX + 97)
-#define SYS_POSIX_recvfrom (SYS_POSIX + 98)
-#define SYS_POSIX_recvmsg (SYS_POSIX + 99)
-#define SYS_POSIX_select (SYS_POSIX + 100)
-#define SYS_POSIX_send (SYS_POSIX + 101)
-#define SYS_POSIX_sendmsg (SYS_POSIX + 102)
-#define SYS_POSIX_sendto (SYS_POSIX + 103)
-#define SYS_POSIX_sethostid (SYS_POSIX + 104)
-#define SYS_POSIX_setsockopt (SYS_POSIX + 105)
-#define SYS_POSIX_shutdown (SYS_POSIX + 106)
-#define SYS_POSIX_socket (SYS_POSIX + 107)
-#define SYS_POSIX_gethostname (SYS_POSIX + 108)
-#define SYS_POSIX_sethostname (SYS_POSIX + 109)
-#define SYS_POSIX_getdomainname (SYS_POSIX + 110)
-#define SYS_POSIX_setdomainname (SYS_POSIX + 111)
-#define SYS_POSIX_truncate (SYS_POSIX + 112)
-#define SYS_POSIX_ftruncate (SYS_POSIX + 113)
-#define SYS_POSIX_rename (SYS_POSIX + 114)
-#define SYS_POSIX_symlink (SYS_POSIX + 115)
-#define SYS_POSIX_readlink (SYS_POSIX + 116)
-#define SYS_POSIX_lstat (SYS_POSIX + 117)
-#define SYS_POSIX_nfs_mount (SYS_POSIX + 118)
-#define SYS_POSIX_nfs_svc (SYS_POSIX + 119)
-#define SYS_POSIX_nfs_getfh (SYS_POSIX + 120)
-#define SYS_POSIX_async_daemon (SYS_POSIX + 121)
-#define SYS_POSIX_exportfs (SYS_POSIX + 122)
-#define SYS_POSIX_SGI_setregid (SYS_POSIX + 123)
-#define SYS_POSIX_SGI_setreuid (SYS_POSIX + 124)
-#define SYS_POSIX_getitimer (SYS_POSIX + 125)
-#define SYS_POSIX_setitimer (SYS_POSIX + 126)
-#define SYS_POSIX_adjtime (SYS_POSIX + 127)
-#define SYS_POSIX_SGI_bsdgettime (SYS_POSIX + 128)
-#define SYS_POSIX_SGI_sproc (SYS_POSIX + 129)
-#define SYS_POSIX_SGI_prctl (SYS_POSIX + 130)
-#define SYS_POSIX_SGI_blkproc (SYS_POSIX + 131)
-#define SYS_POSIX_SGI_reserved1 (SYS_POSIX + 132)
-#define SYS_POSIX_SGI_sgigsc (SYS_POSIX + 133)
-#define SYS_POSIX_SGI_mmap (SYS_POSIX + 134)
-#define SYS_POSIX_SGI_munmap (SYS_POSIX + 135)
-#define SYS_POSIX_SGI_mprotect (SYS_POSIX + 136)
-#define SYS_POSIX_SGI_msync (SYS_POSIX + 137)
-#define SYS_POSIX_SGI_madvise (SYS_POSIX + 138)
-#define SYS_POSIX_SGI_mpin (SYS_POSIX + 139)
-#define SYS_POSIX_SGI_getpagesize (SYS_POSIX + 140)
-#define SYS_POSIX_SGI_libattach (SYS_POSIX + 141)
-#define SYS_POSIX_SGI_libdetach (SYS_POSIX + 142)
-#define SYS_POSIX_SGI_getpgrp (SYS_POSIX + 143)
-#define SYS_POSIX_SGI_setpgrp (SYS_POSIX + 144)
-#define SYS_POSIX_SGI_reserved2 (SYS_POSIX + 145)
-#define SYS_POSIX_SGI_reserved3 (SYS_POSIX + 146)
-#define SYS_POSIX_SGI_reserved4 (SYS_POSIX + 147)
-#define SYS_POSIX_SGI_reserved5 (SYS_POSIX + 148)
-#define SYS_POSIX_SGI_reserved6 (SYS_POSIX + 149)
-#define SYS_POSIX_cacheflush (SYS_POSIX + 150)
-#define SYS_POSIX_cachectl (SYS_POSIX + 151)
-#define SYS_POSIX_fchown (SYS_POSIX + 152)
-#define SYS_POSIX_fchmod (SYS_POSIX + 153)
-#define SYS_POSIX_wait3 (SYS_POSIX + 154)
-#define SYS_POSIX_mmap (SYS_POSIX + 155)
-#define SYS_POSIX_munmap (SYS_POSIX + 156)
-#define SYS_POSIX_madvise (SYS_POSIX + 157)
-#define SYS_POSIX_BSD_getpagesize (SYS_POSIX + 158)
-#define SYS_POSIX_setreuid (SYS_POSIX + 159)
-#define SYS_POSIX_setregid (SYS_POSIX + 160)
-#define SYS_POSIX_setpgid (SYS_POSIX + 161)
-#define SYS_POSIX_getgroups (SYS_POSIX + 162)
-#define SYS_POSIX_setgroups (SYS_POSIX + 163)
-#define SYS_POSIX_gettimeofday (SYS_POSIX + 164)
-#define SYS_POSIX_getrusage (SYS_POSIX + 165)
-#define SYS_POSIX_getrlimit (SYS_POSIX + 166)
-#define SYS_POSIX_setrlimit (SYS_POSIX + 167)
-#define SYS_POSIX_waitpid (SYS_POSIX + 168)
-#define SYS_POSIX_dup2 (SYS_POSIX + 169)
-#define SYS_POSIX_reserved2 (SYS_POSIX + 170)
-#define SYS_POSIX_reserved3 (SYS_POSIX + 171)
-#define SYS_POSIX_reserved4 (SYS_POSIX + 172)
-#define SYS_POSIX_reserved5 (SYS_POSIX + 173)
-#define SYS_POSIX_reserved6 (SYS_POSIX + 174)
-#define SYS_POSIX_reserved7 (SYS_POSIX + 175)
-#define SYS_POSIX_reserved8 (SYS_POSIX + 176)
-#define SYS_POSIX_reserved9 (SYS_POSIX + 177)
-#define SYS_POSIX_reserved10 (SYS_POSIX + 178)
-#define SYS_POSIX_reserved11 (SYS_POSIX + 179)
-#define SYS_POSIX_reserved12 (SYS_POSIX + 180)
-#define SYS_POSIX_reserved13 (SYS_POSIX + 181)
-#define SYS_POSIX_reserved14 (SYS_POSIX + 182)
-#define SYS_POSIX_reserved15 (SYS_POSIX + 183)
-#define SYS_POSIX_reserved16 (SYS_POSIX + 184)
-#define SYS_POSIX_reserved17 (SYS_POSIX + 185)
-#define SYS_POSIX_reserved18 (SYS_POSIX + 186)
-#define SYS_POSIX_reserved19 (SYS_POSIX + 187)
-#define SYS_POSIX_reserved20 (SYS_POSIX + 188)
-#define SYS_POSIX_reserved21 (SYS_POSIX + 189)
-#define SYS_POSIX_reserved22 (SYS_POSIX + 190)
-#define SYS_POSIX_reserved23 (SYS_POSIX + 191)
-#define SYS_POSIX_reserved24 (SYS_POSIX + 192)
-#define SYS_POSIX_reserved25 (SYS_POSIX + 193)
-#define SYS_POSIX_reserved26 (SYS_POSIX + 194)
-#define SYS_POSIX_reserved27 (SYS_POSIX + 195)
-#define SYS_POSIX_reserved28 (SYS_POSIX + 196)
-#define SYS_POSIX_reserved29 (SYS_POSIX + 197)
-#define SYS_POSIX_reserved30 (SYS_POSIX + 198)
-#define SYS_POSIX_reserved31 (SYS_POSIX + 199)
-#define SYS_POSIX_reserved32 (SYS_POSIX + 200)
-#define SYS_POSIX_reserved33 (SYS_POSIX + 201)
-#define SYS_POSIX_reserved34 (SYS_POSIX + 202)
-#define SYS_POSIX_reserved35 (SYS_POSIX + 203)
-#define SYS_POSIX_reserved36 (SYS_POSIX + 204)
-#define SYS_POSIX_reserved37 (SYS_POSIX + 205)
-#define SYS_POSIX_reserved38 (SYS_POSIX + 206)
-#define SYS_POSIX_reserved39 (SYS_POSIX + 207)
-#define SYS_POSIX_reserved40 (SYS_POSIX + 208)
-#define SYS_POSIX_reserved41 (SYS_POSIX + 209)
-#define SYS_POSIX_reserved42 (SYS_POSIX + 210)
-#define SYS_POSIX_reserved43 (SYS_POSIX + 211)
-#define SYS_POSIX_reserved44 (SYS_POSIX + 212)
-#define SYS_POSIX_reserved45 (SYS_POSIX + 213)
-#define SYS_POSIX_reserved46 (SYS_POSIX + 214)
-#define SYS_POSIX_reserved47 (SYS_POSIX + 215)
-#define SYS_POSIX_reserved48 (SYS_POSIX + 216)
-#define SYS_POSIX_reserved49 (SYS_POSIX + 217)
-#define SYS_POSIX_reserved50 (SYS_POSIX + 218)
-#define SYS_POSIX_reserved51 (SYS_POSIX + 219)
-#define SYS_POSIX_reserved52 (SYS_POSIX + 220)
-#define SYS_POSIX_reserved53 (SYS_POSIX + 221)
-#define SYS_POSIX_reserved54 (SYS_POSIX + 222)
-#define SYS_POSIX_reserved55 (SYS_POSIX + 223)
-#define SYS_POSIX_reserved56 (SYS_POSIX + 224)
-#define SYS_POSIX_reserved57 (SYS_POSIX + 225)
-#define SYS_POSIX_reserved58 (SYS_POSIX + 226)
-#define SYS_POSIX_reserved59 (SYS_POSIX + 227)
-#define SYS_POSIX_reserved60 (SYS_POSIX + 228)
-#define SYS_POSIX_reserved61 (SYS_POSIX + 229)
-#define SYS_POSIX_reserved62 (SYS_POSIX + 230)
-#define SYS_POSIX_reserved63 (SYS_POSIX + 231)
-#define SYS_POSIX_reserved64 (SYS_POSIX + 232)
-#define SYS_POSIX_reserved65 (SYS_POSIX + 233)
-#define SYS_POSIX_reserved66 (SYS_POSIX + 234)
-#define SYS_POSIX_reserved67 (SYS_POSIX + 235)
-#define SYS_POSIX_reserved68 (SYS_POSIX + 236)
-#define SYS_POSIX_reserved69 (SYS_POSIX + 237)
-#define SYS_POSIX_reserved70 (SYS_POSIX + 238)
-#define SYS_POSIX_reserved71 (SYS_POSIX + 239)
-#define SYS_POSIX_reserved72 (SYS_POSIX + 240)
-#define SYS_POSIX_reserved73 (SYS_POSIX + 241)
-#define SYS_POSIX_reserved74 (SYS_POSIX + 242)
-#define SYS_POSIX_reserved75 (SYS_POSIX + 243)
-#define SYS_POSIX_reserved76 (SYS_POSIX + 244)
-#define SYS_POSIX_reserved77 (SYS_POSIX + 245)
-#define SYS_POSIX_reserved78 (SYS_POSIX + 246)
-#define SYS_POSIX_reserved79 (SYS_POSIX + 247)
-#define SYS_POSIX_reserved80 (SYS_POSIX + 248)
-#define SYS_POSIX_reserved81 (SYS_POSIX + 249)
-#define SYS_POSIX_reserved82 (SYS_POSIX + 250)
-#define SYS_POSIX_reserved83 (SYS_POSIX + 251)
-#define SYS_POSIX_reserved84 (SYS_POSIX + 252)
-#define SYS_POSIX_reserved85 (SYS_POSIX + 253)
-#define SYS_POSIX_reserved86 (SYS_POSIX + 254)
-#define SYS_POSIX_reserved87 (SYS_POSIX + 255)
-#define SYS_POSIX_reserved88 (SYS_POSIX + 256)
-#define SYS_POSIX_reserved89 (SYS_POSIX + 257)
-#define SYS_POSIX_reserved90 (SYS_POSIX + 258)
-#define SYS_POSIX_reserved91 (SYS_POSIX + 259)
-#define SYS_POSIX_netboot (SYS_POSIX + 260)
-#define SYS_POSIX_netunboot (SYS_POSIX + 261)
-#define SYS_POSIX_rdump (SYS_POSIX + 262)
-#define SYS_POSIX_setsid (SYS_POSIX + 263)
-#define SYS_POSIX_getmaxsig (SYS_POSIX + 264)
-#define SYS_POSIX_sigpending (SYS_POSIX + 265)
-#define SYS_POSIX_sigprocmask (SYS_POSIX + 266)
-#define SYS_POSIX_sigsuspend (SYS_POSIX + 267)
-#define SYS_POSIX_sigaction (SYS_POSIX + 268)
-#define SYS_POSIX_MIPS_reserved1 (SYS_POSIX + 269)
-#define SYS_POSIX_MIPS_reserved2 (SYS_POSIX + 270)
-#define SYS_POSIX_MIPS_reserved3 (SYS_POSIX + 271)
-#define SYS_POSIX_MIPS_reserved4 (SYS_POSIX + 272)
-#define SYS_POSIX_MIPS_reserved5 (SYS_POSIX + 273)
-#define SYS_POSIX_MIPS_reserved6 (SYS_POSIX + 274)
-#define SYS_POSIX_MIPS_reserved7 (SYS_POSIX + 275)
-#define SYS_POSIX_MIPS_reserved8 (SYS_POSIX + 276)
-#define SYS_POSIX_MIPS_reserved9 (SYS_POSIX + 277)
-#define SYS_POSIX_MIPS_reserved10 (SYS_POSIX + 278)
-#define SYS_POSIX_MIPS_reserved11 (SYS_POSIX + 279)
-#define SYS_POSIX_TANDEM_reserved1 (SYS_POSIX + 280)
-#define SYS_POSIX_TANDEM_reserved2 (SYS_POSIX + 281)
-#define SYS_POSIX_TANDEM_reserved3 (SYS_POSIX + 282)
-#define SYS_POSIX_TANDEM_reserved4 (SYS_POSIX + 283)
-#define SYS_POSIX_TANDEM_reserved5 (SYS_POSIX + 284)
-#define SYS_POSIX_TANDEM_reserved6 (SYS_POSIX + 285)
-#define SYS_POSIX_TANDEM_reserved7 (SYS_POSIX + 286)
-#define SYS_POSIX_TANDEM_reserved8 (SYS_POSIX + 287)
-#define SYS_POSIX_TANDEM_reserved9 (SYS_POSIX + 288)
-#define SYS_POSIX_TANDEM_reserved10 (SYS_POSIX + 289)
-#define SYS_POSIX_TANDEM_reserved11 (SYS_POSIX + 290)
-#define SYS_POSIX_TANDEM_reserved12 (SYS_POSIX + 291)
-#define SYS_POSIX_TANDEM_reserved13 (SYS_POSIX + 292)
-#define SYS_POSIX_TANDEM_reserved14 (SYS_POSIX + 293)
-#define SYS_POSIX_TANDEM_reserved15 (SYS_POSIX + 294)
-#define SYS_POSIX_TANDEM_reserved16 (SYS_POSIX + 295)
-#define SYS_POSIX_TANDEM_reserved17 (SYS_POSIX + 296)
-#define SYS_POSIX_TANDEM_reserved18 (SYS_POSIX + 297)
-#define SYS_POSIX_TANDEM_reserved19 (SYS_POSIX + 298)
-#define SYS_POSIX_TANDEM_reserved20 (SYS_POSIX + 299)
-#define SYS_POSIX_SGI_reserved7 (SYS_POSIX + 300)
-#define SYS_POSIX_SGI_reserved8 (SYS_POSIX + 301)
-#define SYS_POSIX_SGI_reserved9 (SYS_POSIX + 302)
-#define SYS_POSIX_SGI_reserved10 (SYS_POSIX + 303)
-#define SYS_POSIX_SGI_reserved11 (SYS_POSIX + 304)
-#define SYS_POSIX_SGI_reserved12 (SYS_POSIX + 305)
-#define SYS_POSIX_SGI_reserved13 (SYS_POSIX + 306)
-#define SYS_POSIX_SGI_reserved14 (SYS_POSIX + 307)
-#define SYS_POSIX_SGI_reserved15 (SYS_POSIX + 308)
-#define SYS_POSIX_SGI_reserved16 (SYS_POSIX + 309)
-#define SYS_POSIX_SGI_reserved17 (SYS_POSIX + 310)
-#define SYS_POSIX_SGI_reserved18 (SYS_POSIX + 311)
-#define SYS_POSIX_SGI_reserved19 (SYS_POSIX + 312)
-#define SYS_POSIX_SGI_reserved20 (SYS_POSIX + 313)
-#define SYS_POSIX_SGI_reserved21 (SYS_POSIX + 314)
-#define SYS_POSIX_SGI_reserved22 (SYS_POSIX + 315)
-#define SYS_POSIX_SGI_reserved23 (SYS_POSIX + 316)
-#define SYS_POSIX_SGI_reserved24 (SYS_POSIX + 317)
-#define SYS_POSIX_SGI_reserved25 (SYS_POSIX + 318)
-#define SYS_POSIX_SGI_reserved26 (SYS_POSIX + 319)
-
-/*
- * Linux syscalls are in the range from 4000 to 4999
- * Hopefully these syscall numbers are unused ... If not everyone using
- * statically linked binaries is pretty <censored - the government>. You've
- * been warned.
- */
-#define SYS_Linux 4000
-#define SYS_syscall (SYS_Linux + 0)
-#define SYS_exit (SYS_Linux + 1)
-#define SYS_fork (SYS_Linux + 2)
-#define SYS_read (SYS_Linux + 3)
-#define SYS_write (SYS_Linux + 4)
-#define SYS_open (SYS_Linux + 5)
-#define SYS_close (SYS_Linux + 6)
-#define SYS_waitpid (SYS_Linux + 7)
-#define SYS_creat (SYS_Linux + 8)
-#define SYS_link (SYS_Linux + 9)
-#define SYS_unlink (SYS_Linux + 10)
-#define SYS_execve (SYS_Linux + 11)
-#define SYS_chdir (SYS_Linux + 12)
-#define SYS_time (SYS_Linux + 13)
-#define SYS_mknod (SYS_Linux + 14)
-#define SYS_chmod (SYS_Linux + 15)
-#define SYS_lchown (SYS_Linux + 16)
-#define SYS_break (SYS_Linux + 17)
-#define SYS_oldstat (SYS_Linux + 18)
-#define SYS_lseek (SYS_Linux + 19)
-#define SYS_getpid (SYS_Linux + 20)
-#define SYS_mount (SYS_Linux + 21)
-#define SYS_umount (SYS_Linux + 22)
-#define SYS_setuid (SYS_Linux + 23)
-#define SYS_getuid (SYS_Linux + 24)
-#define SYS_stime (SYS_Linux + 25)
-#define SYS_ptrace (SYS_Linux + 26)
-#define SYS_alarm (SYS_Linux + 27)
-#define SYS_oldfstat (SYS_Linux + 28)
-#define SYS_pause (SYS_Linux + 29)
-#define SYS_utime (SYS_Linux + 30)
-#define SYS_stty (SYS_Linux + 31)
-#define SYS_gtty (SYS_Linux + 32)
-#define SYS_access (SYS_Linux + 33)
-#define SYS_nice (SYS_Linux + 34)
-#define SYS_ftime (SYS_Linux + 35)
-#define SYS_sync (SYS_Linux + 36)
-#define SYS_kill (SYS_Linux + 37)
-#define SYS_rename (SYS_Linux + 38)
-#define SYS_mkdir (SYS_Linux + 39)
-#define SYS_rmdir (SYS_Linux + 40)
-#define SYS_dup (SYS_Linux + 41)
-#define SYS_pipe (SYS_Linux + 42)
-#define SYS_times (SYS_Linux + 43)
-#define SYS_prof (SYS_Linux + 44)
-#define SYS_brk (SYS_Linux + 45)
-#define SYS_setgid (SYS_Linux + 46)
-#define SYS_getgid (SYS_Linux + 47)
-#define SYS_signal (SYS_Linux + 48)
-#define SYS_geteuid (SYS_Linux + 49)
-#define SYS_getegid (SYS_Linux + 50)
-#define SYS_acct (SYS_Linux + 51)
-#define SYS_umount2 (SYS_Linux + 52)
-#define SYS_lock (SYS_Linux + 53)
-#define SYS_ioctl (SYS_Linux + 54)
-#define SYS_fcntl (SYS_Linux + 55)
-#define SYS_mpx (SYS_Linux + 56)
-#define SYS_setpgid (SYS_Linux + 57)
-#define SYS_ulimit (SYS_Linux + 58)
-#define SYS_oldolduname (SYS_Linux + 59)
-#define SYS_umask (SYS_Linux + 60)
-#define SYS_chroot (SYS_Linux + 61)
-#define SYS_ustat (SYS_Linux + 62)
-#define SYS_dup2 (SYS_Linux + 63)
-#define SYS_getppid (SYS_Linux + 64)
-#define SYS_getpgrp (SYS_Linux + 65)
-#define SYS_setsid (SYS_Linux + 66)
-#define SYS_sigaction (SYS_Linux + 67)
-#define SYS_sgetmask (SYS_Linux + 68)
-#define SYS_ssetmask (SYS_Linux + 69)
-#define SYS_setreuid (SYS_Linux + 70)
-#define SYS_setregid (SYS_Linux + 71)
-#define SYS_sigsuspend (SYS_Linux + 72)
-#define SYS_sigpending (SYS_Linux + 73)
-#define SYS_sethostname (SYS_Linux + 74)
-#define SYS_setrlimit (SYS_Linux + 75)
-#define SYS_getrlimit (SYS_Linux + 76)
-#define SYS_getrusage (SYS_Linux + 77)
-#define SYS_gettimeofday (SYS_Linux + 78)
-#define SYS_settimeofday (SYS_Linux + 79)
-#define SYS_getgroups (SYS_Linux + 80)
-#define SYS_setgroups (SYS_Linux + 81)
-#define SYS_reserved82 (SYS_Linux + 82)
-#define SYS_symlink (SYS_Linux + 83)
-#define SYS_oldlstat (SYS_Linux + 84)
-#define SYS_readlink (SYS_Linux + 85)
-#define SYS_uselib (SYS_Linux + 86)
-#define SYS_swapon (SYS_Linux + 87)
-#define SYS_reboot (SYS_Linux + 88)
-#define SYS_readdir (SYS_Linux + 89)
-#define SYS_mmap (SYS_Linux + 90)
-#define SYS_munmap (SYS_Linux + 91)
-#define SYS_truncate (SYS_Linux + 92)
-#define SYS_ftruncate (SYS_Linux + 93)
-#define SYS_fchmod (SYS_Linux + 94)
-#define SYS_fchown (SYS_Linux + 95)
-#define SYS_getpriority (SYS_Linux + 96)
-#define SYS_setpriority (SYS_Linux + 97)
-#define SYS_profil (SYS_Linux + 98)
-#define SYS_statfs (SYS_Linux + 99)
-#define SYS_fstatfs (SYS_Linux + 100)
-#define SYS_ioperm (SYS_Linux + 101)
-#define SYS_socketcall (SYS_Linux + 102)
-#define SYS_syslog (SYS_Linux + 103)
-#define SYS_setitimer (SYS_Linux + 104)
-#define SYS_getitimer (SYS_Linux + 105)
-#define SYS_stat (SYS_Linux + 106)
-#define SYS_lstat (SYS_Linux + 107)
-#define SYS_fstat (SYS_Linux + 108)
-#define SYS_olduname (SYS_Linux + 109)
-#define SYS_iopl (SYS_Linux + 110)
-#define SYS_vhangup (SYS_Linux + 111)
-#define SYS_idle (SYS_Linux + 112)
-#define SYS_vm86 (SYS_Linux + 113)
-#define SYS_wait4 (SYS_Linux + 114)
-#define SYS_swapoff (SYS_Linux + 115)
-#define SYS_sysinfo (SYS_Linux + 116)
-#define SYS_ipc (SYS_Linux + 117)
-#define SYS_fsync (SYS_Linux + 118)
-#define SYS_sigreturn (SYS_Linux + 119)
-#define SYS_clone (SYS_Linux + 120)
-#define SYS_setdomainname (SYS_Linux + 121)
-#define SYS_uname (SYS_Linux + 122)
-#define SYS_modify_ldt (SYS_Linux + 123)
-#define SYS_adjtimex (SYS_Linux + 124)
-#define SYS_mprotect (SYS_Linux + 125)
-#define SYS_sigprocmask (SYS_Linux + 126)
-#define SYS_create_module (SYS_Linux + 127)
-#define SYS_init_module (SYS_Linux + 128)
-#define SYS_delete_module (SYS_Linux + 129)
-#define SYS_get_kernel_syms (SYS_Linux + 130)
-#define SYS_quotactl (SYS_Linux + 131)
-#define SYS_getpgid (SYS_Linux + 132)
-#define SYS_fchdir (SYS_Linux + 133)
-#define SYS_bdflush (SYS_Linux + 134)
-#define SYS_sysfs (SYS_Linux + 135)
-#define SYS_personality (SYS_Linux + 136)
-#define SYS_afs_syscall (SYS_Linux + 137) /* Syscall for Andrew File System */
-#define SYS_setfsuid (SYS_Linux + 138)
-#define SYS_setfsgid (SYS_Linux + 139)
-#define SYS__llseek (SYS_Linux + 140)
-#define SYS_getdents (SYS_Linux + 141)
-#define SYS__newselect (SYS_Linux + 142)
-#define SYS_syscall_flock (SYS_Linux + 143)
-#define SYS_msync (SYS_Linux + 144)
-#define SYS_readv (SYS_Linux + 145)
-#define SYS_writev (SYS_Linux + 146)
-#define SYS_cacheflush (SYS_Linux + 147)
-#define SYS_cachectl (SYS_Linux + 148)
-#define SYS_sysmips (SYS_Linux + 149)
-#define SYS_setup (SYS_Linux + 150) /* used only by init, to get system going */
-#define SYS_getsid (SYS_Linux + 151)
-#define SYS_fdatasync (SYS_Linux + 152)
-#define SYS__sysctl (SYS_Linux + 153)
-#define SYS_mlock (SYS_Linux + 154)
-#define SYS_munlock (SYS_Linux + 155)
-#define SYS_mlockall (SYS_Linux + 156)
-#define SYS_munlockall (SYS_Linux + 157)
-#define SYS_sched_setparam (SYS_Linux + 158)
-#define SYS_sched_getparam (SYS_Linux + 159)
-#define SYS_sched_setscheduler (SYS_Linux + 160)
-#define SYS_sched_getscheduler (SYS_Linux + 161)
-#define SYS_sched_yield (SYS_Linux + 162)
-#define SYS_sched_get_priority_max (SYS_Linux + 163)
-#define SYS_sched_get_priority_min (SYS_Linux + 164)
-#define SYS_sched_rr_get_interval (SYS_Linux + 165)
-#define SYS_nanosleep (SYS_Linux + 166)
-#define SYS_mremap (SYS_Linux + 167)
-#define SYS_accept (SYS_Linux + 168)
-#define SYS_bind (SYS_Linux + 169)
-#define SYS_connect (SYS_Linux + 170)
-#define SYS_getpeername (SYS_Linux + 171)
-#define SYS_getsockname (SYS_Linux + 172)
-#define SYS_getsockopt (SYS_Linux + 173)
-#define SYS_listen (SYS_Linux + 174)
-#define SYS_recv (SYS_Linux + 175)
-#define SYS_recvfrom (SYS_Linux + 176)
-#define SYS_recvmsg (SYS_Linux + 177)
-#define SYS_send (SYS_Linux + 178)
-#define SYS_sendmsg (SYS_Linux + 179)
-#define SYS_sendto (SYS_Linux + 180)
-#define SYS_setsockopt (SYS_Linux + 181)
-#define SYS_shutdown (SYS_Linux + 182)
-#define SYS_socket (SYS_Linux + 183)
-#define SYS_socketpair (SYS_Linux + 184)
-#define SYS_setresuid (SYS_Linux + 185)
-#define SYS_getresuid (SYS_Linux + 186)
-#define SYS_query_module (SYS_Linux + 187)
-#define SYS_poll (SYS_Linux + 188)
-#define SYS_nfsservctl (SYS_Linux + 189)
-#define SYS_setresgid (SYS_Linux + 190)
-#define SYS_getresgid (SYS_Linux + 191)
-#define SYS_prctl (SYS_Linux + 192)
-#define SYS_rt_sigreturn (SYS_Linux + 193)
-#define SYS_rt_sigaction (SYS_Linux + 194)
-#define SYS_rt_sigprocmask (SYS_Linux + 195)
-#define SYS_rt_sigpending (SYS_Linux + 196)
-#define SYS_rt_sigtimedwait (SYS_Linux + 197)
-#define SYS_rt_sigqueueinfo (SYS_Linux + 198)
-#define SYS_rt_sigsuspend (SYS_Linux + 199)
-#define SYS_pread (SYS_Linux + 200)
-#define SYS_pwrite (SYS_Linux + 201)
-#define SYS_chown (SYS_Linux + 202)
-#define SYS_getcwd (SYS_Linux + 203)
-#define SYS_capget (SYS_Linux + 204)
-#define SYS_capset (SYS_Linux + 205)
-#define SYS_sigaltstack (SYS_Linux + 206)
-#define SYS_sendfile (SYS_Linux + 207)
-#define SYS_putpmsg (SYS_Linux + 208)
-#define SYS_getpmsg (SYS_Linux + 209)
-#define SYS_mmap2 (SYS_Linux + 210)
-#define SYS_truncate64 (SYS_Linux + 211)
-#define SYS_ftruncate64 (SYS_Linux + 212)
-#define SYS_stat64 (SYS_Linux + 213)
-#define SYS_lstat64 (SYS_Linux + 214)
-#define SYS_fstat64 (SYS_Linux + 215)
-#define SYS_pivot_root (SYS_Linux + 216)
-#define SYS_mincore (SYS_Linux + 217)
-#define SYS_madvise (SYS_Linux + 218)
-#define SYS_getdents64 (SYS_Linux + 219)
-#define SYS_fcntl64 (SYS_Linux + 220)
-
-
-#endif /* sys/syscall.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f4be017d81b23583836dad286ce70b98d73578f
commit 3f4be017d81b23583836dad286ce70b98d73578f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 16:18:48 2000 +0000
Define MAXHOSTNAMELEN.
diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h
index 66f2127..1f52c39 100644
--- a/sysdeps/unix/sysv/aix/sys/param.h
+++ b/sysdeps/unix/sysv/aix/sys/param.h
@@ -1,3 +1,24 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H 1
+
/* This file should contain various parameter macros appropriate for the
machine and operating system. There is no standard set of macros; this
file is just for compatibility with programs written for Unix that
@@ -19,3 +40,9 @@
/* Macros for min/max. */
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
+
+
+/* Maximum length of hostname. */
+#define MAXHOSTNAMELEN 256
+
+#endif /* sys/param.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbeb0a2e8e5b8801ff29c0d177fb4b350b39c0c6
commit bbeb0a2e8e5b8801ff29c0d177fb4b350b39c0c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 04:17:58 2000 +0000
AIX/PPC implementation of lrintf.
diff --git a/sysdeps/unix/sysv/aix/powerpc/s_lrint.c b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c
new file mode 100644
index 0000000..18c42d5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/powerpc/s_lrint.c
@@ -0,0 +1,29 @@
+/* Round floating-point to integer. AIX/PowerPC version.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/powerpc/fpu/s_lrint.c>
+
+/* This code will also work for a 'float' argument. */
+asm ("\
+ .globl .__lrintf
+ .globl .lrintf
+ .weak .lrintf
+ .set .__lrintf,.__lrint
+ .set .lrintf,.__lrint
+");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=07aef1acd4a276ef839a506a3727634716a82172
commit 07aef1acd4a276ef839a506a3727634716a82172
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 04:13:34 2000 +0000
Cleanup. Add comments.
diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h
index 0484409..38cf31e 100644
--- a/sysdeps/unix/sysv/aix/bits/utmp.h
+++ b/sysdeps/unix/sysv/aix/bits/utmp.h
@@ -1,5 +1,5 @@
/* The `struct utmp' type, describing entries in the utmp file. AIX.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,12 +21,9 @@
# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
#endif
-
-#include <time.h>
-
-#define _PATH_UTMP "/etc/utmp"
-#define _PATH_WTMP "/var/adm/wtmp"
-#define _PATH_LASTLOG "/var/adm/lastlog"
+#include <paths.h>
+#include <sys/time.h>
+#include <sys/types.h>
#define UT_LINESIZE 12
@@ -52,22 +49,25 @@ struct utmp
};
+/* Values for the `ut_type' field of a `struct utmp'. */
+#define EMPTY 0 /* No valid user accounting information. */
+
+#define RUN_LVL 1 /* The system's runlevel. */
+#define BOOT_TIME 2 /* Time of system boot. */
+#define OLD_TIME 3 /* Time when system clock changed. */
+#define NEW_TIME 4 /* Time after system clock changed. */
+
+#define INIT_PROCESS 5 /* Process spawned by the init process. */
+#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */
+#define USER_PROCESS 7 /* Normal process. */
+#define DEAD_PROCESS 8 /* Terminated process. */
+
+#define ACCOUNTING 9
+
+
/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and
UT_ID fields. */
#define _HAVE_UT_TYPE 1
#define _HAVE_UT_PID 1
#define _HAVE_UT_ID 1
#define _HAVE_UT_HOST 1
-
-
-/* Values for the `ut_type' field of a `struct utmp'. */
-#define EMPTY 0
-#define RUN_LVL 1
-#define BOOT_TIME 2
-#define OLD_TIME 3
-#define NEW_TIME 4
-#define INIT_PROCESS 5
-#define LOGIN_PROCESS 6
-#define USER_PROCESS 7
-#define DEAD_PROCESS 8
-#define ACCOUNTING 9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d84fcdf42a8e350d58d04a615372c52689f9ee57
commit d84fcdf42a8e350d58d04a615372c52689f9ee57
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 04:05:25 2000 +0000
Define __clockid_t and __timer_t.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index 830dcea..a89393d 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -87,6 +87,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef int __clock_t;
+/* Clock ID used in clock and timer functions. */
+typedef int __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+typedef int __timer_t;
+
/* One element in the file descriptor mask array. */
typedef unsigned long int __fd_mask;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b75905aee7f0ed09640f3e43618da7b28e8959f5
commit b75905aee7f0ed09640f3e43618da7b28e8959f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 04:03:03 2000 +0000
Nothing.
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
index 6a43fb1..c872e04 100644
--- a/sysdeps/unix/sysv/aix/write.c
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4810d08f247473b6fc49312651441abb8d2b4b5
commit d4810d08f247473b6fc49312651441abb8d2b4b5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 04:00:48 2000 +0000
(JUMPTARGET): Use C_TEXT.
diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h
index 182e324..1a43f96 100644
--- a/sysdeps/unix/sysv/aix/sysdep.h
+++ b/sysdeps/unix/sysv/aix/sysdep.h
@@ -85,4 +85,4 @@ C_TEXT (name):
/* Jumping to another function. We are jumping to the TOC entry. */
-#define JUMPTARGET(name) name
+#define JUMPTARGET(name) C_TEXT (name)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e7c7c2186b3485963d1f832280f59d0aedc0248
commit 6e7c7c2186b3485963d1f832280f59d0aedc0248
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:58:15 2000 +0000
Define pread64 alias.
diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c
index 428fc63..1a88a7c 100644
--- a/sysdeps/unix/sysv/aix/pread64.c
+++ b/sysdeps/unix/sysv/aix/pread64.c
@@ -25,3 +25,4 @@ __pread64 (int fd, void *buf, size_t len, off64_t off)
{
return kpread (fd, buf, len, off);
}
+weak_alias (__pread64, pread64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42696fe77fb1ac9b110d145a025b0bf34b5f9657
commit 42696fe77fb1ac9b110d145a025b0bf34b5f9657
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:57:44 2000 +0000
Define pread alias.
diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c
index 35fd7ca..137fc34 100644
--- a/sysdeps/unix/sysv/aix/pread.c
+++ b/sysdeps/unix/sysv/aix/pread.c
@@ -25,3 +25,4 @@ __pread (int fd, void *buf, size_t len, off_t off)
{
return kpread (fd, buf, len, off);
}
+weak_alias (__pread, pread)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba2df8a93410c4da3a241980985b689d62eaad0b
commit ba2df8a93410c4da3a241980985b689d62eaad0b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:57:00 2000 +0000
Define __libc_open alias.
diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c
index 7bab537..89cd955 100644
--- a/sysdeps/unix/sysv/aix/open.c
+++ b/sysdeps/unix/sysv/aix/open.c
@@ -35,3 +35,4 @@ __open (const char *file, int oflag, ...)
return open (file, oflag, mode);
}
+strong_alias (__open, __libc_open)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4aa3b70bc4dbc7e23a4d6025af5b61e1d6095c9
commit c4aa3b70bc4dbc7e23a4d6025af5b61e1d6095c9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:55:49 2000 +0000
Define __libc_lseek alias.
diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c
index 99a6fb5..387ebd0 100644
--- a/sysdeps/unix/sysv/aix/lseek.c
+++ b/sysdeps/unix/sysv/aix/lseek.c
@@ -6,3 +6,4 @@ __lseek (int fd, off_t offset, int whence)
{
return lseek (fd, offset, whence);
}
+strong_alias (__lseek, __libc_lseek)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74c9e7dc5aa97f7df031ab387571f0a9bda0469c
commit 74c9e7dc5aa97f7df031ab387571f0a9bda0469c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:48:38 2000 +0000
Define __fchdir.
diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c
index 6036fbb..97d3171 100644
--- a/sysdeps/unix/sysv/aix/fchdir.c
+++ b/sysdeps/unix/sysv/aix/fchdir.c
@@ -1 +1,26 @@
-/* This is a system call. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__fchdir (fd)
+ int fd;
+{
+ return fchdir (fd);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa2f92db993b94d1bd632e0dee5abbd1f1388c56
commit aa2f92db993b94d1bd632e0dee5abbd1f1388c56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 5 03:46:39 2000 +0000
[$(subdir)==login] (sysdep_routines): Add setutxent, getutxent,
endutxent, getutxid, getutxline, pututxline, and utmpxname.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index 3de7e02..b49b562 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -9,6 +9,13 @@ ifeq ($(subdir),misc)
sysdep_routines += dl-open dl-sym dl-close
endif
+ifeq ($(subdir),login)
+sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
+ pututxline utmpxname
+
+sysdep_headers += utmpx.h bits/utmpx.h
+endif
+
# Don't compile the ctype glue code, since there is no old non-GNU C library.
inhibit-glue = yes
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9a0b83c8faab558e38fa317961f931c1c1d3cca
commit e9a0b83c8faab558e38fa317961f931c1c1d3cca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 4 08:37:22 2000 +0000
Remove FLT_EVAL_METHOD and DECIMAL_DIG definitions.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 3b80e82..2750af8 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -58,9 +58,6 @@ typedef double double_t;
typedef double float_t;
typedef double double_t;
-/* Strange compiler, we don't know how it works. */
-# define FLT_EVAL_METHOD -1
-
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
@@ -70,9 +67,6 @@ typedef double double_t;
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN (2147483647)
-/* Number of decimal digits for the `double' type. */
-# define DECIMAL_DIG 15
-
#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
index 374ad67..426fec7 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -29,9 +29,6 @@ typedef float float_t; /* `float' expressions are evaluated as
typedef double double_t; /* `double' expressions are evaluated as
`double'. */
-/* Signal that types stay as they were declared. */
-# define FLT_EVAL_METHOD 0
-
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
@@ -40,9 +37,6 @@ typedef double double_t; /* `double' expressions are evaluated as
# define FP_ILOGB0 (-2147483647)
# define FP_ILOGBNAN (2147483647)
-/* Number of decimal digits for the `double' type. */
-# define DECIMAL_DIG 15
-
#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index c3365a7..4eec5d8 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -31,9 +31,6 @@ typedef long double float_t; /* `float' expressions are evaluated as
typedef long double double_t; /* `double' expressions are evaluated as
`long double'. */
-/* Signal that both types are `long double'. */
-# define FLT_EVAL_METHOD 2
-
/* Define `INFINITY' as value of type `float'. */
# define INFINITY HUGE_VALF
@@ -41,7 +38,4 @@ typedef long double double_t; /* `double' expressions are evaluated as
# define FP_ILOGB0 (-2147483647 - 1)
# define FP_ILOGBNAN (2147483647)
-/* Number of decimal digits for the `long double' type. */
-# define DECIMAL_DIG 18
-
#endif /* ISO C99 */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=832725ccb4e850412a993ec181526600aefce7d2
commit 832725ccb4e850412a993ec181526600aefce7d2
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Nov 29 09:24:50 2000 +0000
Remove unused variable.
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
index 129c2be..c12608c 100644
--- a/sysdeps/unix/sysv/linux/hppa/brk.c
+++ b/sysdeps/unix/sysv/linux/hppa/brk.c
@@ -1,5 +1,5 @@
/* brk system call for Linux/HPPA.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
{
- void *newbrk, *scratch;
+ void *newbrk;
__curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ae8d03731d0ba960082c4f5a92aa0204e1eb319
commit 9ae8d03731d0ba960082c4f5a92aa0204e1eb319
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Nov 28 09:17:38 2000 +0000
Synch with generic Linux version.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index ce6fa88..ae68328 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -214,7 +214,7 @@ struct msghdr
struct iovec *msg_iov; /* Vector of data to send/receive into. */
size_t msg_iovlen; /* Number of elements in the vector. */
- void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
size_t msg_controllen; /* Ancillary data buffer length. */
int msg_flags; /* Flags on received message. */
@@ -227,7 +227,7 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
- unsigned char __cmsg_data __flexarr; /* Ancillary data. */
+ __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
/* XXX Perhaps this should be removed. */
};
@@ -242,7 +242,7 @@ struct cmsghdr
((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
- & ~(sizeof (size_t) - 1))
+ & (size_t) ~(sizeof (size_t) - 1))
#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e6f5adcfb61585744c2fd4e1cca44b4034400ca
commit 6e6f5adcfb61585744c2fd4e1cca44b4034400ca
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Nov 28 08:05:11 2000 +0000
(struct cmsghdr): Use __flexarr.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index ac7ff07..ce6fa88 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -227,10 +227,8 @@ struct cmsghdr
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
- unsigned char __cmsg_data[0]; /* Ancillary data. */
+ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
/* XXX Perhaps this should be removed. */
-#endif
};
/* Ancillary data object manipulation macros. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9a575e676714657eae291655c6a72eb557e2c6b
commit a9a575e676714657eae291655c6a72eb557e2c6b
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 27 14:40:15 2000 +0000
(__longjmp): Restore SP and FP last and
in a single asm as they may be used to access other stored
registers.
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index a1920ca..66810a5 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -45,16 +45,10 @@ __longjmp (env, val_arg)
asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4]));
asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5]));
- /* Restore the stack pointer. */
- asm volatile ("lw $29, %0" : : "m" (env[0].__sp));
-
/* Get and reconstruct the floating point csr. */
asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
asm volatile ("ctc1 $2, $31");
- /* Get the FP. */
- asm volatile ("lw $30, %0" : : "m" (env[0].__fp));
-
/* Get the GP. */
asm volatile ("lw $gp, %0" : : "m" (env[0].__gp));
@@ -71,7 +65,13 @@ __longjmp (env, val_arg)
/* Get the PC. */
asm volatile ("lw $25, %0" : : "m" (env[0].__pc));
- /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
+ /* Restore the stack pointer and the FP. They have to be restored
+ last and in a single asm as gcc, depending on options used, may
+ use either of them to access env. */
+ asm volatile ("lw $29, %0\n\t"
+ "lw $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp));
+
+/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
asm volatile ("li $2, 1");
else
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 28fef47..3527be5 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -47,16 +47,10 @@ __longjmp (env, val_arg)
asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6]));
asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7]));
- /* Restore the stack pointer. */
- asm volatile ("ld $29, %0" : : "m" (env[0].__sp));
-
/* Get and reconstruct the floating point csr. */
asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
asm volatile ("ctc1 $2, $31");
- /* Get the FP. */
- asm volatile ("ld $30, %0" : : "m" (env[0].__fp));
-
/* Get the GP. */
asm volatile ("ld $gp, %0" : : "m" (env[0].__gp));
@@ -73,7 +67,14 @@ __longjmp (env, val_arg)
/* Get the PC. */
asm volatile ("ld $31, %0" : : "m" (env[0].__pc));
- /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
+
+ /* Restore the stack pointer and the FP. They have to be restored
+ last and in a single asm as gcc, depending on options used, may
+ use either of them to access env. */
+ asm volatile ("ld $29, %0\n\t"
+ "ld $30, %1\n\t" : : "m" (env[0].__sp), "m" (env[0].__fp));
+
+/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
asm volatile ("dli $2, 1");
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0abafb2042845d033b51faeebc31a5a556eb0f25
commit 0abafb2042845d033b51faeebc31a5a556eb0f25
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Nov 21 20:55:38 2000 +0000
* sysdeps/alpha/setjmp.S: Remove __setjmp entry point.
* sysdeps/arm/setjmp.S: Likewise.
* sysdeps/arm/fpu/setjmp.S: Likewise.
* sysdeps/i386/setjmp.S: Likewise.
* sysdeps/i386/elf/setjmp.S: Likewise.
* sysdeps/s390/setjmp.S: Likewise.
* sysdeps/s390/elf/setjmp.S: Likewise.
* sysdeps/sh/sh3/setjmp.S: Likewise.
* sysdeps/sh/sh4/setjmp.S: Likewise.
* sysdeps/sparc/sparc32/setjmp.S: Likewise.
* sysdeps/unix/sysv/linux/ia64/setjmp.S: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/setjmp.c: Removed.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 894bb9e..299bd4d 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -72,11 +72,11 @@ END(__sigsetjmp)
/* Put these traditional entry points in the same file so that we can
elide much of the nonsense in trying to jmp to the real function. */
-ENTRY(__setjmp)
+ENTRY(_setjmp)
ldgp gp, 0(pv)
mov 0, a1
br $sigsetjmp_local
-END(__setjmp)
+END(_setjmp)
ENTRY(setjmp)
ldgp gp, 0(pv)
@@ -84,5 +84,5 @@ ENTRY(setjmp)
br $sigsetjmp_local
END(setjmp)
-weak_alias(__setjmp, _setjmp)
+weak_extern(_setjmp)
weak_extern(setjmp)
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
index 6ee53c5..b72900c 100644
--- a/sysdeps/arm/fpu/setjmp.S
+++ b/sysdeps/arm/fpu/setjmp.S
@@ -22,9 +22,6 @@
#define _ASM
#include <bits/setjmp.h>
- /* Binary compatibility entry point. */
-ENTRY (__setjmp)
- mov r1, #0
ENTRY (__sigsetjmp)
/* Save registers */
sfmea f4, 4, [r0]!
@@ -35,4 +32,4 @@ ENTRY (__sigsetjmp)
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-END (__setjmp)
+END (__sigsetjmp)
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 237cc0a..97f76cd 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -22,13 +22,10 @@
#define _ASM
#include <bits/setjmp.h>
- /* Binary compatibility entry point. */
-ENTRY (__setjmp)
- mov r1, #0
ENTRY (__sigsetjmp)
/* Save registers */
stmia r0, {v1-v6, sl, fp, sp, lr}
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-END (__setjmp)
+END (__sigsetjmp)
diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c
deleted file mode 100644
index 477e896..0000000
--- a/sysdeps/unix/sysv/linux/m68k/setjmp.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (C) 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <setjmp.h>
-
-/* Save the current program position in ENV and return 0. */
-int
-__sigsetjmp (jmp_buf env, int savemask)
-{
- /* Save data registers D1 through D7. */
- asm volatile ("movem%.l %/d1-%/d7, %0"
- : : "m" (env[0].__jmpbuf[0].__dregs[0]));
-
- /* Save return address in place of register A0. */
- env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
-
- /* Save address registers A1 through A5. */
- asm volatile ("movem%.l %/a1-%/a5, %0"
- : : "m" (env[0].__jmpbuf[0].__aregs[1]));
-
- /* Save caller's FP, not our own. */
- env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
-
- /* Save caller's SP, not our own. */
- env[0].__jmpbuf[0].__sp = (void *) &env;
-
-#if defined (__HAVE_68881__) || defined (__HAVE_FPU__)
- /* Save floating-point (68881) registers FP0 through FP7. */
- asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
- : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
-#endif
-
- /* Save the signal mask if requested. */
- return __sigjmp_save (env, savemask);
-}
-
-/* Binary compatibility entry point. */
-int
-__setjmp (jmp_buf env)
-{
- /* Save data registers D1 through D7. */
- asm volatile ("movem%.l %/d1-%/d7, %0"
- : : "m" (env[0].__jmpbuf[0].__dregs[0]));
-
- /* Save return address in place of register A0. */
- env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
-
- /* Save address registers A1 through A5. */
- asm volatile ("movem%.l %/a1-%/a5, %0"
- : : "m" (env[0].__jmpbuf[0].__aregs[1]));
-
- /* Save caller's FP, not our own. */
- env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
-
- /* Save caller's SP, not our own. */
- env[0].__jmpbuf[0].__sp = (void *) &env;
-
-#if defined (__HAVE_68881__) || defined (__HAVE_FPU__)
- /* Save floating-point (68881) registers FP0 through FP7. */
- asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
- : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
-#endif
-
- /* The signal mask has already been dealt with. */
- return 0;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec5d5a4d92e5f1bece6dc066248f9102951ae9af
commit ec5d5a4d92e5f1bece6dc066248f9102951ae9af
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 20 07:55:22 2000 +0000
(O_NOFOLLOW): Use same value defined in /usr/include/asm-mips/fcntl.h.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 14593da..5657c32 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -45,7 +45,7 @@
#endif
#ifdef __USE_GNU
-# define O_NOFOLLOW 0x4000 /* Do not follow links. */
+# define O_NOFOLLOW 0x20000 /* Do not follow links. */
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bddc20b59aa5756a4bdcf33d557ee915e0252c3e
commit bddc20b59aa5756a4bdcf33d557ee915e0252c3e
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 20 07:55:06 2000 +0000
(kernel_stat): Expand time_t to 'long int' not, 'unsigned int'. Use 'long int' for
__unused? members.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
index c6419ba..41137b4 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -12,12 +12,12 @@ struct kernel_stat
long int __pad2[2];
long int st_size;
long int __pad3;
- unsigned int st_atime;
- unsigned int __unused1;
- unsigned int st_mtime;
- unsigned int __unused2;
- unsigned int st_ctime;
- unsigned int __unused3;
+ long int st_atime;
+ long int __unused1;
+ long int st_mtime;
+ long int __unused2;
+ long int st_ctime;
+ long int __unused3;
long int st_blksize;
long int st_blocks;
char st_fstype[16]; /* Filesystem type name, unsupported */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=081c74d4ccf166fa54127935c792eab253fb5362
commit 081c74d4ccf166fa54127935c792eab253fb5362
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 20 07:54:19 2000 +0000
Fix comments
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index cee3913..dd7a1f5 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -82,15 +82,13 @@ error:
/* Load up the arguments to the function. Put this block of code in
its own function so that we can terminate the stack trace with our
- debug info.
-
- At this point we have s0=arg, s1=fn. */
+ debug info. */
ENTRY(__thread_start)
/* cp is already loaded. */
.cprestore 16
/* The stackframe has been created on entry of clone(). */
- /* Resort the arg for user's function. */
+ /* Restore the arg for user's function. */
lw t9,0(sp) /* Function pointer. */
lw a0,4(sp) /* Argument pointer. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f95e592cb8d9742fe54e650c514951361d379a5
commit 3f95e592cb8d9742fe54e650c514951361d379a5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 16 02:07:02 2000 +0000
(RTLD_START): Update _dl_argv.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index d9aeb18..73c6cbd 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -314,10 +314,14 @@ $fixup_stack:
involves copying everything down, since the stack pointer must
always be 16-byte aligned. */
ldq $2, 0($sp)
+ ldq $5, _dl_argv
+ subq $31, $1, $6
subq $2, $1, $2
+ s8addq $6, $5, $5
mov $sp, $4
s8addq $1, $sp, $3
stq $2, 0($sp)
+ stq $5, _dl_argv
/* Copy down argv. */
0: ldq $5, 8($3)
addq $4, 8, $4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90d62a5cb250e1d51180944375aefbf1cc7c7f71
commit 90d62a5cb250e1d51180944375aefbf1cc7c7f71
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 13 16:53:57 2000 +0000
Update.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index a36dacf..c278128 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -7,7 +7,7 @@ ifloat: 2
Test "asin (0.5) == pi/6":
float: 2
ifloat: 2
-Test "asin (0.7) == 0.7753974966107530637":
+Test "asin (0.7) == 0.77539749661075306374035335271498708":
double: 1
float: 2
idouble: 1
@@ -164,12 +164,12 @@ idouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 1
ifloat: 1
@@ -238,7 +238,7 @@ float: 1
ifloat: 1
# cos
-Test "cos (0.7) == 0.7648421872844884262":
+Test "cos (0.7) == 0.76484218728448842625585999019186495":
double: 1
float: 1
idouble: 1
@@ -363,7 +363,7 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-Test "exp10 (0.7) == 5.0118723362727228500":
+Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
float: 1
ifloat: 1
Test "exp10 (3) == 1000":
@@ -552,7 +552,7 @@ idouble: 1
ifloat: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
double: 1
float: 1
idouble: 1
@@ -562,7 +562,7 @@ double: 1
float: 0.5
idouble: 1
ifloat: 0.5
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
@@ -572,7 +572,7 @@ double: 0.2758
float: 0.3667
idouble: 0.2758
ifloat: 0.3667
-Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
float: 1
ifloat: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f10098010d55bbeb1dc0bf6a4fc3b9e16cd9bd4
commit 7f10098010d55bbeb1dc0bf6a4fc3b9e16cd9bd4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 10 05:06:34 2000 +0000
Correct last patch.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 3837b1a..0e6e519 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -37,7 +37,7 @@ libc {
getrusage;
# time type change
- gettimeofday;
+ gettimeofday; getitimer;
# i*
ieee_get_fp_control; ieee_set_fp_control;
@@ -51,9 +51,6 @@ libc {
# w*
wait4;
}
- GLIBC_2.1.1 {
- getitimer;
- }
GLIBC_2.1.4 {
pciconfig_iobase;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a632433d283762306e995c9f69fc9936c30ce1b1
commit a632433d283762306e995c9f69fc9936c30ce1b1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 10 05:00:14 2000 +0000
(GLIBC_2.1.1): Add getitimer.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index ac21c9f..3837b1a 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -51,6 +51,9 @@ libc {
# w*
wait4;
}
+ GLIBC_2.1.1 {
+ getitimer;
+ }
GLIBC_2.1.4 {
pciconfig_iobase;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9285ecc8a1af8ce6916696bff58bd2bfd616b8ad
commit 9285ecc8a1af8ce6916696bff58bd2bfd616b8ad
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Nov 2 09:32:30 2000 +0000
(elf_machine_rel): Add the symbol's
value plus the run-time displacement to the relocation for non-GOT
symbols. Set the relocation to the GOT entry for GOT symbols.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 7c27de0..cd8ee3c 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -158,7 +158,7 @@ do { \
i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; \
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
\
- /* Add the run-time display to all local got entries. */ \
+ /* Add the run-time displacement to all local got entries. */ \
while (i < n) \
got[i++] += map->l_addr; \
\
@@ -508,10 +508,40 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
switch (ELFW(R_TYPE) (reloc->r_info))
{
case R_MIPS_REL32:
+ {
+ int symidx = ELFW(R_SYM) (reloc->r_info);
+
+ if (symidx)
+ {
+ const ElfW(Word) gotsym
+ = (const ElfW(Word)) map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+
+ if (symidx < gotsym)
+ {
+#ifndef RTLD_BOOTSTRAP
+ if (map != &_dl_rtld_map)
+#endif
+ *reloc_addr += sym->st_value + map->l_addr;
+ }
+ else
+ {
+#ifndef RTLD_BOOTSTRAP
+ const ElfW(Addr) *got
+ = (const ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
+ const ElfW(Word) local_gotno
+ = (const ElfW(Word))
+ map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
+
+ *reloc_addr += got[symidx + local_gotno - gotsym];
+#endif
+ }
+ }
+ else
#ifndef RTLD_BOOTSTRAP
- if (map != &_dl_rtld_map)
+ if (map != &_dl_rtld_map)
#endif
- *reloc_addr += map->l_addr;
+ *reloc_addr += map->l_addr;
+ }
break;
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
@@ -584,7 +614,8 @@ elf_machine_got_rel (struct link_map *map, int lazy)
generated by gnu ld. Skip these reserved entries from relocation. */
i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1;
- /* Add the run-time display to all local got entries if needed. */
+ /* Add the run-time displacement to all local got entries if
+ needed. */
if (__builtin_expect (map->l_addr != 0, 0))
{
while (i < n)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e569ff55acc5e81e203d1397eb9a146fe26563e6
commit e569ff55acc5e81e203d1397eb9a146fe26563e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 1 20:59:56 2000 +0000
(CLK_TCK): Cast sysconf result to __clock_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index b9d9f3f..93c01c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -36,8 +36,9 @@
# ifndef __STRICT_ANSI__
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
+# include <bits/types.h>
extern long int __sysconf (int);
-# define CLK_TCK (__sysconf (2)) /* 2 is _SC_CLK_TCK */
+# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */
# endif
# ifdef __USE_POSIX199309
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=374305ef4267cbb4265036774fc96bab3fb364e5
commit 374305ef4267cbb4265036774fc96bab3fb364e5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 1 08:07:45 2000 +0000
Use __sysconf to for CLK_TCK.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index a0eddbe..b9d9f3f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -36,7 +36,8 @@
# ifndef __STRICT_ANSI__
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 1024
+extern long int __sysconf (int);
+# define CLK_TCK (__sysconf (2)) /* 2 is _SC_CLK_TCK */
# endif
# ifdef __USE_POSIX199309
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abde23bdcff8263785b3eac42e25f89e61a8cf27
commit abde23bdcff8263785b3eac42e25f89e61a8cf27
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 1 08:06:06 2000 +0000
Linux/Alpha version of function to get CLK_TCK value.
diff --git a/sysdeps/unix/sysv/linux/alpha/getclktck.c b/sysdeps/unix/sysv/linux/alpha/getclktck.c
new file mode 100644
index 0000000..6636bbe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getclktck.c
@@ -0,0 +1,2 @@
+#define SYSTEM_CLK_TCK 1024
+#include <sysdeps/unix/sysv/linux/getclktck.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a873180d70596717818009259419b895bcc32f9e
commit a873180d70596717818009259419b895bcc32f9e
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Oct 27 16:22:44 2000 +0000
Add some more ulps.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index 8351aaf..99965f8 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -499,6 +499,9 @@ ifloat: 1
Test "j1 (1.5) == 0.55793650791009964199":
float: 1
ifloat: 1
+Test "j1 (2.0) == 0.57672480775687338720":
+float: 1
+ifloat: 1
Test "j1 (10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
@@ -519,6 +522,9 @@ ifloat: 1
Test "jn (1, 1.5) == 0.55793650791009964199":
float: 1
ifloat: 1
+Test "jn (1, 2.0) == 0.57672480775687338720":
+float: 1
+ifloat: 1
Test "jn (1, 10.0) == 0.043472746168861436670":
float: 2
ifloat: 2
@@ -772,8 +778,8 @@ Test "yn (10, 0.7) == -0.42447194260703866924e10":
double: 6
idouble: 6
Test "yn (10, 10.0) == -0.35981415218340272205":
-float: 1
-ifloat: 1
+float: 2
+ifloat: 2
Test "yn (10, 2.0) == -129184.54220803928264":
double: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4b950346fafe9ad6568473b98fdffde2d708dec
commit e4b950346fafe9ad6568473b98fdffde2d708dec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 27 06:48:36 2000 +0000
Not needed.
diff --git a/sysdeps/unix/bsd/osf/=dirstream.h b/sysdeps/unix/bsd/osf/=dirstream.h
deleted file mode 100644
index c37610e..0000000
--- a/sysdeps/unix/bsd/osf/=dirstream.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#ifndef _DIRSTREAM_H
-
-#define _DIRSTREAM_H 1
-
-#define __need_size_t
-#include <stddef.h>
-
-/* Directory stream type. */
-
-typedef struct
- {
- int __fd; /* File descriptor. */
-
- size_t __offset; /* Current offset into the block. */
- size_t __size; /* Total valid data in the block. */
- char *__data; /* Directory block. */
-
- int __allocation; /* Space allocated for the block. */
-
- int __data_len; /* Size of __data. */
- long __dd_seek; /* OSF/1 magic cookie returned by getdents. */
- void *dd_lock; /* Used by OSF/1 for inter-thread locking. */
-
- } DIR;
-
-#endif /* dirstream.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2746c3a1679288243558b97de8a57802e0ebc83
commit b2746c3a1679288243558b97de8a57802e0ebc83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 27 06:40:17 2000 +0000
Additional files to distribute in sysdeps/unix/sysv/linux/hppa.
diff --git a/sysdeps/unix/sysv/linux/hppa/Dist b/sysdeps/unix/sysv/linux/hppa/Dist
new file mode 100644
index 0000000..2954d3c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/Dist
@@ -0,0 +1,5 @@
+umount.c
+kernel_stat.h
+kernel_sigaction.h
+clone.S
+sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7319991c9bffd80a4ed655f4c91c13acfb7a757
commit f7319991c9bffd80a4ed655f4c91c13acfb7a757
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 27 06:38:28 2000 +0000
Additional files to distribute in sysdeps/hppa.
diff --git a/sysdeps/hppa/Dist b/sysdeps/hppa/Dist
new file mode 100644
index 0000000..9fc1de2
--- /dev/null
+++ b/sysdeps/hppa/Dist
@@ -0,0 +1,2 @@
+dl-symaddr.c
+dl-fptr.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff86bfcd6bede63f5399a9707b78acd303b80f60
commit ff86bfcd6bede63f5399a9707b78acd303b80f60
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 26 17:23:46 2000 +0000
Update after libm-test.inc change.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 515d071..a36dacf 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -19,22 +19,22 @@ double: 1
idouble: 1
# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -161,7 +161,7 @@ double: 1
idouble: 1
# cexp
-Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
@@ -291,18 +291,18 @@ float: 1
ifloat: 1
# csqrt
-Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
float: 1
ifloat: 1
@@ -400,31 +400,31 @@ idouble: 2
ifloat: 1
# hypot
-Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
index 439c487..23a0f35 100644
--- a/sysdeps/arm/libm-test-ulps
+++ b/sysdeps/arm/libm-test-ulps
@@ -19,22 +19,22 @@ double: 1
idouble: 1
# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -161,7 +161,7 @@ double: 1
idouble: 1
# cexp
-Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
@@ -291,18 +291,18 @@ float: 1
ifloat: 1
# csqrt
-Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
float: 1
ifloat: 1
@@ -400,31 +400,31 @@ idouble: 2
ifloat: 1
# hypot
-Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index ddbf307..8351aaf 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -28,22 +28,22 @@ double: 1
idouble: 1
# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
ildouble: 1
ldouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -209,12 +209,12 @@ ildouble: 2
ldouble: 2
# cexp
-Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
ildouble: 5
ldouble: 5
-Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
ildouble: 19
@@ -344,16 +344,16 @@ float: 1
ifloat: 1
# csqrt
-Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
ildouble: 1
ldouble: 1
-Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
ildouble: 1
ldouble: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
float: 1
ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
ildouble: 1
ldouble: 1
@@ -453,31 +453,31 @@ ildouble: 1
ldouble: 1
# hypot
-Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
ildouble: 1
ldouble: 1
-Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
index 515d071..a36dacf 100644
--- a/sysdeps/mips/fpu/libm-test-ulps
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -19,22 +19,22 @@ double: 1
idouble: 1
# cabs
-Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
@@ -161,7 +161,7 @@ double: 1
idouble: 1
# cexp
-Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
float: 1
ifloat: 1
Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
@@ -291,18 +291,18 @@ float: 1
ifloat: 1
# csqrt
-Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
-Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
float: 1
ifloat: 1
@@ -400,31 +400,31 @@ idouble: 2
ifloat: 1
# hypot
-Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
double: 1
idouble: 1
-Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
-Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
float: 1
ifloat: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbbf3667bfb2f61a7d911c7e4736695413eb18b6
commit fbbf3667bfb2f61a7d911c7e4736695413eb18b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 25 16:56:34 2000 +0000
Updated.
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
index 4737025..439c487 100644
--- a/sysdeps/arm/libm-test-ulps
+++ b/sysdeps/arm/libm-test-ulps
@@ -7,7 +7,7 @@ ifloat: 2
Test "asin (0.5) == pi/6":
float: 2
ifloat: 2
-Test "asin (0.7) == 0.7753974966107530637":
+Test "asin (0.7) == 0.77539749661075306374035335271498708":
double: 1
float: 2
idouble: 1
@@ -164,12 +164,12 @@ idouble: 1
Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
float: 1
ifloat: 1
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
double: 1
float: 1
idouble: 1
ifloat: 1
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 1
ifloat: 1
@@ -238,7 +238,7 @@ float: 1
ifloat: 1
# cos
-Test "cos (0.7) == 0.7648421872844884262":
+Test "cos (0.7) == 0.76484218728448842625585999019186495":
double: 1
float: 1
idouble: 1
@@ -363,7 +363,7 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-Test "exp10 (0.7) == 5.0118723362727228500":
+Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
float: 1
ifloat: 1
Test "exp10 (3) == 1000":
@@ -552,7 +552,7 @@ idouble: 1
ifloat: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
double: 1
float: 1
idouble: 1
@@ -562,7 +562,7 @@ double: 1
float: 0.5
idouble: 1
ifloat: 0.5
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
double: 1
float: 1
idouble: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=67d3dc3d796de3e0ba23cf522bed99677df2b760
commit 67d3dc3d796de3e0ba23cf522bed99677df2b760
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Oct 24 07:01:37 2000 +0000
Partly revert patch from 2000-10-18.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 8051dc6..7c27de0 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -138,10 +138,6 @@ elf_machine_load_address (void)
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
-/* GNU Binutils upto 2.10 produce a wrong relocations. Bit 30 of
- got[1] marks good objects. */
-#define ELF_MIPS_GNU_GOT1_OK 0x00000001
-
/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope
fiddles with global data. */
#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
@@ -153,10 +149,6 @@ do { \
\
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \
\
- if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) \
- got[1] = (ElfW(Addr)) ELF_MIPS_GNU_GOT1_MASK \
- | (got[1] & ELF_MIPS_GNU_GOT1_OK); \
- \
if (__builtin_expect (map->l_addr == 0, 1)) \
goto done; \
\
@@ -219,8 +211,8 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
{
- struct link_map *l = (struct link_map *)
- (g1 & ~(ELF_MIPS_GNU_GOT1_MASK|ELF_MIPS_GNU_GOT1_OK));
+ struct link_map *l =
+ (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
ElfW(Addr) base, limit;
const ElfW(Phdr) *p = l->l_phdr;
ElfW(Half) this, nent = l->l_phnum;
@@ -670,8 +662,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
of got[1] of a gnu object is set to identify gnu objects.
Where we can store l for non gnu objects? XXX */
if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK
- | (got[1] & ELF_MIPS_GNU_GOT1_OK));
+ got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
else
_dl_mips_gnu_objects = 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee44fc4b607b8a2198d927ba3a0bcbdada822e19
commit ee44fc4b607b8a2198d927ba3a0bcbdada822e19
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Oct 23 19:14:22 2000 +0000
Updated.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index ba14c9a..ddbf307 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -219,10 +219,6 @@ float: 1
ifloat: 1
ildouble: 19
ldouble: 19
-Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
-ifloat: 3
-Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
-ifloat: 2
Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 3
ifloat: 3
@@ -648,8 +644,6 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
-ifloat: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
double: 0.2758
float: 0.3667
@@ -829,12 +823,148 @@ ifloat: 1
ildouble: 1
ldouble: 1
+Function: Real part of "cacos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "cacos":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cacosh":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "casin":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "casin":
+float: 2
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "casinh":
+double: 6
+float: 19
+idouble: 6
+ifloat: 19
+ildouble: 6
+ldouble: 6
+
+Function: Imaginary part of "casinh":
+double: 13
+float: 2
+idouble: 13
+ifloat: 2
+ildouble: 7
+ldouble: 7
+
+Function: Real part of "catan":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 7
+ldouble: 7
+
+Function: Real part of "catanh":
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "catanh":
+ildouble: 2
+ldouble: 2
+
Function: "cbrt":
double: 1
idouble: 1
ildouble: 948
ldouble: 948
+Function: Real part of "ccos":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "cexp":
+float: 3
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cexp":
+float: 2
+ifloat: 2
+ildouble: 19
+ldouble: 19
+
+Function: Imaginary part of "clog":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
Function: "cos":
double: 2
float: 1
@@ -849,11 +979,73 @@ ldouble: 2
Function: Real part of "cpow":
double: 1
+float: 1
idouble: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
Function: Imaginary part of "cpow":
double: 1.103
+float: 6
idouble: 1.103
+ifloat: 6
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "csin":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csin":
+float: 1
+ifloat: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 439
+ldouble: 439
+
+Function: Imaginary part of "ctan":
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "ctanh":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "ctanh":
+double: 1
+idouble: 1
+ildouble: 25
+ldouble: 25
Function: "erfc":
double: 24
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eed537401d39fdf82d4fde6eac7277933ccd318f
commit eed537401d39fdf82d4fde6eac7277933ccd318f
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 23 06:26:50 2000 +0000
Add fcntl64.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 67f3cd2..ae0f33a 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -51,6 +51,7 @@ rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
s_execve execve execve i:spp __syscall_execve
s_fcntl fcntl fcntl i:iiF __syscall_fcntl
+s_fcntl64 fcntl64 fcntl64 i:iiF __syscall_fcntl64
s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f1dba30859338176d3440a7d68fac14d392c9f49
commit f1dba30859338176d3440a7d68fac14d392c9f49
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 20 17:04:28 2000 +0000
(elf_machine_matches_host): Parameter is now pointer to ELF header.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 69845b4..d9aeb18 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -29,11 +29,11 @@
#include <string.h>
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
-elf_machine_matches_host (Elf64_Word e_machine)
+elf_machine_matches_host (const Elf64_Ehdr *ehdr)
{
- return e_machine == EM_ALPHA;
+ return ehdr->e_machine == EM_ALPHA;
}
/* Return the link-time address of _DYNAMIC. The multiple-got-capable
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index cbef92f..9b40e6f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -43,17 +43,11 @@
: "a1"); \
}
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
-elf_machine_matches_host (Elf32_Half e_machine)
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
- switch (e_machine)
- {
- case EM_ARM:
- return 1;
- default:
- return 0;
- }
+ return ehdr->e_machine == EM_ARM;
}
@@ -491,7 +485,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2);
if (newvalue & 0xfc000003)
- newvalue = fix_bad_pc24(reloc_addr, value)
+ newvalue = fix_bad_pc24(reloc_addr, value)
- (Elf32_Addr)reloc_addr + (addend << 2);
newvalue = newvalue >> 2;
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
index e6782b3..89ad542 100644
--- a/sysdeps/hppa/dl-machine.h
+++ b/sysdeps/hppa/dl-machine.h
@@ -59,11 +59,11 @@ extern int __fptr_count;
extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr,
struct hppa_fptr **, struct hppa_fptr *);
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
-elf_machine_matches_host (Elf32_Half e_machine)
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
- return e_machine == EM_PARISC;
+ return ehdr->e_machine == EM_PARISC;
}
@@ -252,7 +252,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.text
.globl _start
.type _start,@function
-_start:
+_start:
/* The kernel does not give us an initial stack frame. */
ldo 64(%sp),%sp
/* Save the relevant arguments (yes, those are the correct
@@ -357,7 +357,7 @@ _dl_start_user:
ldw RT'_dl_loaded(%r1),%r26
ldw 0(%r26),%r26
/* envp = argv + argc + 1 */
- sh2add %r25,%r24,%r23
+ sh2add %r25,%r24,%r23
bl _dl_init,%r2
ldo 4(%r23),%r23 /* delay slot */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 06c9db6..3381d6f 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -24,17 +24,11 @@
#include <sys/param.h>
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
-elf_machine_matches_host (Elf32_Half e_machine)
+elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
- switch (e_machine)
- {
- case EM_68K:
- return 1;
- default:
- return 0;
- }
+ return ehdr->e_machine == EM_68K;
}
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c0ece38..8051dc6 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -86,11 +86,11 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
(ElfW(Addr)) (r); \
} while (0)
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
-elf_machine_matches_host (ElfW(Half) e_machine)
+elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
- switch (e_machine)
+ switch (ehdr->e_machine)
{
case EM_MIPS:
case EM_MIPS_RS3_LE:
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 195a1d3..59bd581 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -77,11 +77,11 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
(ElfW(Addr)) (r); \
} while (0)
-/* Return nonzero iff E_MACHINE is compatible with the running host. */
+/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
-elf_machine_matches_host (ElfW(Half) e_machine)
+elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
- switch (e_machine)
+ switch (ehdr->e_machine)
{
case EM_MIPS:
case EM_MIPS_RS3_LE:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a02fd962edbf30c6da5a13bd6a0cd4a7e70fc93
commit 8a02fd962edbf30c6da5a13bd6a0cd4a7e70fc93
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Oct 20 07:02:12 2000 +0000
Include <asm/unistd.h>.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
index 78248a1..fbfe128 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -19,6 +19,18 @@
#ifndef _SYSCALL_H
#define _SYSCALL_H 1
+/* This file should list the numbers of the system the system knows.
+ But instead of duplicating this we use the information available
+ from the kernel sources. */
+#include <asm/unistd.h>
+
+/* The Linux kernel header file defines macros `__NR_<name>', but some
+ programs expect the traditional form `SYS_<name>'. So in building libc
+ we scan the kernel's list and produce <bits/syscall.h> with macros for
+ all the `SYS_' names. On MIPS the program which generates <bits/syscalls.h>
+ on the other ports fails, so do this manually. */
+
+
/*
* SVR4 syscalls are in the range from 1 to 999
*/
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0168cc0992a79245c17d892a622fec527b1fb03
commit d0168cc0992a79245c17d892a622fec527b1fb03
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 20 06:14:58 2000 +0000
(__new_semctl): Pass union semun as 4th argument to semctl syscall, not
address of it.
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 48bc2d4..ea1a1e4 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -73,7 +73,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
#else
switch (cmd) {
case SEM_STAT:
@@ -82,7 +82,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
break;
default:
return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ CHECK_SEMCTL (&arg, semid, cmd)->array);
}
{
@@ -93,7 +93,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new semctl. */
result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
- CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
if (result != -1 || errno != EINVAL)
return result;
@@ -113,7 +113,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
}
}
result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd,
- CHECK_SEMCTL (&arg, semid, cmd));
+ CHECK_SEMCTL (&arg, semid, cmd)->array);
if (result != -1 && cmd != IPC_SET)
{
memset(buf, 0, sizeof(*buf));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9c1416a4a5b9b3da5f90eabae5d7cecfd3b6986
commit d9c1416a4a5b9b3da5f90eabae5d7cecfd3b6986
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Oct 18 10:21:16 2000 +0000
2000-10-18 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_OK): New.
(ELF_MACHINE_BEFORE_RTLD_RELOC): Handle newer linkers.
(elf_machine_runtime_link_map): Likewise.
(elf_machine_runtime_setup): Likewise.
Handle dynamic linker's local got entries.
Patches by Ralf Baechle <ralf@gnu.org>.
2000-10-09 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* sysdeps/mips/dl-machine.h (_dl_runtime_resolve): Define $sp as
the frame pointer. Allocate stack space for $a0 for
__dl_runtime_resolve(). Do not save $sp in $s0 as it's
callee-saved anyway.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 2a19126..c0ece38 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -136,7 +136,11 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+
+/* GNU Binutils upto 2.10 produce a wrong relocations. Bit 30 of
+ got[1] marks good objects. */
+#define ELF_MIPS_GNU_GOT1_OK 0x00000001
/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope
fiddles with global data. */
@@ -149,6 +153,9 @@ do { \
\
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \
\
+ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0) \
+ got[1] = (ElfW(Addr)) ELF_MIPS_GNU_GOT1_MASK \
+ | (got[1] & ELF_MIPS_GNU_GOT1_OK); \
\
if (__builtin_expect (map->l_addr == 0, 1)) \
goto done; \
@@ -212,8 +219,8 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
{
- struct link_map *l =
- (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ struct link_map *l = (struct link_map *)
+ (g1 & ~(ELF_MIPS_GNU_GOT1_MASK|ELF_MIPS_GNU_GOT1_OK));
ElfW(Addr) base, limit;
const ElfW(Phdr) *p = l->l_phdr;
ElfW(Half) this, nent = l->l_phnum;
@@ -352,11 +359,12 @@ asm ("\n \
.type _dl_runtime_resolve,@function\n \
.ent _dl_runtime_resolve\n \
_dl_runtime_resolve:\n \
+ .frame $29, 40, $31\n \
.set noreorder\n \
- # Save GP.\n \
+ # Save GP.\n \
move $3, $28\n \
# Modify t9 ($25) so as to point .cpload instruction.\n \
- addu $25,8\n \
+ addu $25, 8\n \
# Compute GP.\n \
.cpload $25\n \
.set reorder\n \
@@ -366,24 +374,20 @@ _dl_runtime_resolve:\n \
subu $29, 40\n \
.cprestore 32\n \
sw $15, 36($29)\n \
- sw $4, 12($29)\n \
- sw $5, 16($29)\n \
- sw $6, 20($29)\n \
- sw $7, 24($29)\n \
- sw $16, 28($29)\n \
- move $16, $29\n \
+ sw $4, 16($29)\n \
+ sw $5, 20($29)\n \
+ sw $6, 24($29)\n \
+ sw $7, 28($29)\n \
move $4, $24\n \
move $5, $15\n \
move $6, $3\n \
move $7, $2\n \
jal __dl_runtime_resolve\n \
- move $29, $16\n \
lw $31, 36($29)\n \
- lw $4, 12($29)\n \
- lw $5, 16($29)\n \
- lw $6, 20($29)\n \
- lw $7, 24($29)\n \
- lw $16, 28($29)\n \
+ lw $4, 16($29)\n \
+ lw $5, 20($29)\n \
+ lw $6, 24($29)\n \
+ lw $7, 28($29)\n \
addu $29, 40\n \
move $25, $2\n \
jr $25\n \
@@ -580,15 +584,20 @@ elf_machine_got_rel (struct link_map *map, int lazy)
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
- /* got[0] is reserved. got[1] is also reserved for the dynamic object
- generated by gnu ld. Skip these reserved entries from relocation. */
- i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1;
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
- /* Add the run-time display to all local got entries if needed. */
- if (__builtin_expect (map->l_addr != 0, 0))
+ /* The dynamic linker's local got entries have already been relocated. */
+ if (map != &_dl_rtld_map)
{
- while (i < n)
- got[i++] += map->l_addr;
+ /* got[0] is reserved. got[1] is also reserved for the dynamic object
+ generated by gnu ld. Skip these reserved entries from relocation. */
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1;
+
+ /* Add the run-time display to all local got entries if needed. */
+ if (__builtin_expect (map->l_addr != 0, 0))
+ {
+ while (i < n)
+ got[i++] += map->l_addr;
+ }
}
/* Handle global got entries. */
@@ -661,7 +670,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
of got[1] of a gnu object is set to identify gnu objects.
Where we can store l for non gnu objects? XXX */
if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK
+ | (got[1] & ELF_MIPS_GNU_GOT1_OK));
else
_dl_mips_gnu_objects = 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09ac296dc4a7aa2b79ab3747a3603a16377f6763
commit 09ac296dc4a7aa2b79ab3747a3603a16377f6763
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 17 13:24:28 2000 +0000
Update for changes in libm-test.inc.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
index e3d42ab..ba14c9a 100644
--- a/sysdeps/m68k/fpu/libm-test-ulps
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -1,9 +1,9 @@
# Begin of automatic generation
# acos
-Test "acos (0.7) == 0.7953988301841435554":
-ildouble: 1150
-ldouble: 1150
+Test "acos (0.7) == 0.79539883018414355549096833892476432":
+ildouble: 1
+ldouble: 1
# acosh
Test "acosh (7) == 2.6339157938496334172":
@@ -11,36 +11,21 @@ ildouble: 1
ldouble: 1
# asin
-Test "asin (0.7) == 0.7753974966107530637":
+Test "asin (0.7) == 0.77539749661075306374035335271498708":
double: 1
idouble: 1
-ildouble: 1147
-ldouble: 1147
+ildouble: 1
+ldouble: 1
# asinh
Test "asinh (0.7) == 0.652666566082355786":
-ildouble: 656
-ldouble: 656
-
-# atan
-Test "atan (0.7) == 0.6107259643892086165":
-ildouble: 549
-ldouble: 549
-
-# atan2
-Test "atan2 (0.4, 0.0003) == 1.5700463269355215718":
-ildouble: 1
-ldouble: 1
-Test "atan2 (0.7, 1) == 0.6107259643892086165":
-ildouble: 549
-ldouble: 549
+ildouble: 14
+ldouble: 14
# atanh
Test "atanh (0.7) == 0.8673005276940531944":
double: 1
idouble: 1
-ildouble: 1606
-ldouble: 1606
# cabs
Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
@@ -56,8 +41,8 @@ Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
float: 1
ifloat: 1
Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
-ildouble: 560
-ldouble: 560
+ildouble: 1
+ldouble: 1
Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
float: 1
ifloat: 1
@@ -71,13 +56,13 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 151
-ldouble: 151
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
float: 2
ifloat: 2
-ildouble: 329
-ldouble: 329
+ildouble: 1
+ldouble: 1
# cacosh
Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
@@ -95,11 +80,11 @@ ldouble: 2
Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
double: 1
idouble: 1
-ildouble: 328
-ldouble: 328
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
-ildouble: 151
-ldouble: 151
+ildouble: 1
+ldouble: 1
# casin
Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i":
@@ -110,13 +95,13 @@ double: 3
float: 2
idouble: 3
ifloat: 2
-ildouble: 603
-ldouble: 603
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
float: 2
ifloat: 2
-ildouble: 329
-ldouble: 329
+ildouble: 1
+ldouble: 1
# casinh
Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
@@ -136,13 +121,13 @@ ldouble: 7
Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
double: 1
idouble: 1
-ildouble: 891
-ldouble: 891
+ildouble: 3
+ldouble: 3
Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
float: 2
ifloat: 2
-ildouble: 11
-ldouble: 11
+ildouble: 3
+ldouble: 3
# catan
Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
@@ -153,29 +138,26 @@ ifloat: 1
ildouble: 7
ldouble: 7
Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
-ildouble: 250
-ldouble: 250
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
float: 1
ifloat: 1
-ildouble: 474
-ldouble: 474
+ildouble: 1
+ldouble: 1
# catanh
Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
ildouble: 2
ldouble: 2
-Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
-ildouble: 66
-ldouble: 66
Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
-ildouble: 447
-ldouble: 447
+ildouble: 2
+ldouble: 2
# cbrt
Test "cbrt (-0.001) == -0.1":
-ildouble: 717
-ldouble: 717
+ildouble: 102
+ldouble: 102
Test "cbrt (-27.0) == -3.0":
ildouble: 948
ldouble: 948
@@ -185,8 +167,8 @@ idouble: 1
ildouble: 345
ldouble: 345
Test "cbrt (0.970299) == 0.99":
-ildouble: 306
-ldouble: 306
+ildouble: 142
+ldouble: 142
Test "cbrt (8) == 2":
ildouble: 191
ldouble: 191
@@ -200,14 +182,11 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
-Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
-ildouble: 5
-ldouble: 5
Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
double: 1
idouble: 1
-ildouble: 1901
-ldouble: 1901
+ildouble: 1
+ldouble: 1
# ccosh
Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
@@ -223,11 +202,11 @@ double: 1
float: 3
idouble: 1
ifloat: 3
-ildouble: 1467
-ldouble: 1467
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
-ildouble: 1182
-ldouble: 1182
+ildouble: 2
+ldouble: 2
# cexp
Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
@@ -241,15 +220,17 @@ ifloat: 1
ildouble: 19
ldouble: 19
Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
-float: 3
ifloat: 3
-ildouble: 940
-ldouble: 940
Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+ifloat: 2
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
+float: 3
+ifloat: 3
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.72969890915032360123451688642930727 + 1.8768962328348102821139467908203072 i":
float: 2
ifloat: 2
-ildouble: 1067
-ldouble: 1067
# clog
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
@@ -271,20 +252,18 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1402
-ldouble: 1402
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
float: 1
ifloat: 1
-ildouble: 187
-ldouble: 187
+ildouble: 3
+ldouble: 3
# cos
-Test "cos (0.7) == 0.7648421872844884262":
+Test "cos (0.7) == 0.76484218728448842625585999019186495":
double: 1
idouble: 1
-ildouble: 529
-ldouble: 529
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
float: 0.5
@@ -309,8 +288,8 @@ ldouble: 0.25
# cosh
Test "cosh (0.7) == 1.255169005630943018":
-ildouble: 309
-ldouble: 309
+ildouble: 2
+ldouble: 2
# cpow
Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
@@ -346,14 +325,9 @@ ifloat: 1
Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
float: 1
ifloat: 1
-Test "Real part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
-ildouble: 966
-ldouble: 966
Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
float: 1
ifloat: 1
-ildouble: 168
-ldouble: 168
# csinh
Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
@@ -367,13 +341,11 @@ ldouble: 2
Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
float: 1
ifloat: 1
-ildouble: 413
-ldouble: 413
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
float: 1
ifloat: 1
-ildouble: 477
-ldouble: 477
# csqrt
Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
@@ -385,11 +357,9 @@ ldouble: 1
Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
float: 1
ifloat: 1
-ildouble: 237
-ldouble: 237
Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
-ildouble: 128
-ldouble: 128
+ildouble: 1
+ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
@@ -403,11 +373,11 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 689
-ldouble: 689
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
-ildouble: 367
-ldouble: 367
+ildouble: 2
+ldouble: 2
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
@@ -422,13 +392,11 @@ idouble: 0.5
Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
float: 1
ifloat: 1
-ildouble: 285
-ldouble: 285
Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
double: 1
idouble: 1
-ildouble: 3074
-ldouble: 3074
+ildouble: 1
+ldouble: 1
# erfc
Test "erfc (0.7) == 0.32219880616258152702":
@@ -446,30 +414,14 @@ float: 11
idouble: 24
ifloat: 11
-# exp
-Test "exp (0.7) == 2.0137527074704765216":
-ildouble: 412
-ldouble: 412
-
# exp10
-Test "exp10 (-1) == 0.1":
-ildouble: 819
-ldouble: 819
-Test "exp10 (0.7) == 5.0118723362727228500":
+Test "exp10 (0.7) == 5.0118723362727228500155418688494574":
double: 1
idouble: 1
-ildouble: 1182
-ldouble: 1182
-
-# exp2
-Test "exp2 (0.7) == 1.6245047927124710452":
-ildouble: 461
-ldouble: 461
+ildouble: 1
+ldouble: 1
# expm1
-Test "expm1 (0.7) == 1.0137527074704765216":
-ildouble: 825
-ldouble: 825
Test "expm1 (1) == M_El - 1.0":
ildouble: 1
ldouble: 1
@@ -480,74 +432,58 @@ double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 4096
-ldouble: 4096
+ildouble: 1
+ldouble: 1
Test "fmod (-6.5, 2.3) == -1.9":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 4096
-ldouble: 4096
+ildouble: 1
+ldouble: 1
Test "fmod (6.5, -2.3) == 1.9":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 4096
-ldouble: 4096
+ildouble: 1
+ldouble: 1
Test "fmod (6.5, 2.3) == 1.9":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 4096
-ldouble: 4096
+ildouble: 1
+ldouble: 1
# hypot
Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (0.7, -12.4) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (0.7, 1.2) == 1.3892443989449804508":
-ildouble: 560
-ldouble: 560
+ildouble: 1
+ldouble: 1
Test "hypot (0.7, 12.4) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (12.4, -0.7) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
Test "hypot (12.4, 0.7) == 12.41974234837422060118":
float: 1
ifloat: 1
-ildouble: 406
-ldouble: 406
# j0
Test "j0 (1.5) == 0.51182767173591812875":
@@ -644,8 +580,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2342
-ldouble: 2342
+ildouble: 2
+ldouble: 2
Test "log (2) == M_LN2l":
ildouble: 1
ldouble: 1
@@ -657,8 +593,8 @@ ifloat: 0.5
Test "log10 (0.7) == -0.15490195998574316929":
double: 1
idouble: 1
-ildouble: 2033
-ldouble: 2033
+ildouble: 1
+ldouble: 1
Test "log10 (e) == log10(e)":
float: 1
ifloat: 1
@@ -669,8 +605,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 584
-ldouble: 584
+ildouble: 2
+ldouble: 2
# log2
Test "log2 (0.7) == -0.51457317282975824043":
@@ -678,28 +614,26 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1689
-ldouble: 1689
+ildouble: 1
+ldouble: 1
# pow
Test "pow (0.7, 1.2) == 0.65180494056638638188":
-ildouble: 725
-ldouble: 725
+ildouble: 1
+ldouble: 1
# sin
-Test "sin (0.7) == 0.64421768723769105367":
-ildouble: 627
-ldouble: 627
+Test "sin (0.7) == 0.64421768723769105367261435139872014":
+ildouble: 1
+ldouble: 1
# sincos
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367 in sin_res":
-ildouble: 627
-ldouble: 627
-Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367261435139872014 in sin_res":
+ildouble: 1
+ldouble: 1
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842625585999019186495 in cos_res":
double: 1
idouble: 1
-ildouble: 528
-ldouble: 528
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
float: 0.5
@@ -707,13 +641,15 @@ idouble: 1
ifloat: 0.5
ildouble: 1
ldouble: 1
-Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
double: 1
float: 1
idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+ifloat: 1
Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
double: 0.2758
float: 0.3667
@@ -726,30 +662,15 @@ ldouble: 0.25
Test "sinh (0.7) == 0.75858370183953350346":
float: 1
ifloat: 1
-ildouble: 1028
-ldouble: 1028
-
-# sqrt
-Test "sqrt (0.7) == 0.83666002653407554798":
-ildouble: 489
-ldouble: 489
-Test "sqrt (15239.9025) == 123.45":
-ildouble: 325
-ldouble: 325
# tan
Test "tan (0.7) == 0.84228838046307944813":
-ildouble: 1401
-ldouble: 1401
+ildouble: 1
+ldouble: 1
Test "tan (pi/4) == 1":
double: 0.5
idouble: 0.5
-# tanh
-Test "tanh (0.7) == 0.60436777711716349631":
-ildouble: 519
-ldouble: 519
-
# tgamma
Test "tgamma (-0.5) == -2 sqrt (pi)":
double: 1
@@ -881,8 +802,8 @@ ifloat: 1
# Maximal error of functions:
Function: "acos":
-ildouble: 1150
-ldouble: 1150
+ildouble: 1
+ldouble: 1
Function: "acosh":
ildouble: 1
@@ -891,110 +812,22 @@ ldouble: 1
Function: "asin":
double: 1
idouble: 1
-ildouble: 1147
-ldouble: 1147
+ildouble: 1
+ldouble: 1
Function: "asinh":
-ildouble: 656
-ldouble: 656
-
-Function: "atan":
-ildouble: 549
-ldouble: 549
-
-Function: "atan2":
-ildouble: 549
-ldouble: 549
+ildouble: 14
+ldouble: 14
Function: "atanh":
double: 1
idouble: 1
-ildouble: 1606
-ldouble: 1606
Function: "cabs":
float: 1
ifloat: 1
-ildouble: 560
-ldouble: 560
-
-Function: Real part of "cacos":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 151
-ldouble: 151
-
-Function: Imaginary part of "cacos":
-float: 2
-ifloat: 2
-ildouble: 329
-ldouble: 329
-
-Function: Real part of "cacosh":
-double: 1
-float: 7
-idouble: 1
-ifloat: 7
-ildouble: 328
-ldouble: 328
-
-Function: Imaginary part of "cacosh":
-double: 1
-idouble: 1
-ildouble: 151
-ldouble: 151
-
-Function: Real part of "casin":
-double: 3
-float: 2
-idouble: 3
-ifloat: 2
-ildouble: 603
-ldouble: 603
-
-Function: Imaginary part of "casin":
-float: 2
-ifloat: 2
-ildouble: 329
-ldouble: 329
-
-Function: Real part of "casinh":
-double: 6
-float: 19
-idouble: 6
-ifloat: 19
-ildouble: 891
-ldouble: 891
-
-Function: Imaginary part of "casinh":
-double: 13
-float: 2
-idouble: 13
-ifloat: 2
-ildouble: 11
-ldouble: 11
-
-Function: Real part of "catan":
-ildouble: 250
-ldouble: 250
-
-Function: Imaginary part of "catan":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 474
-ldouble: 474
-
-Function: Real part of "catanh":
-ildouble: 66
-ldouble: 66
-
-Function: Imaginary part of "catanh":
-ildouble: 447
-ldouble: 447
+ildouble: 1
+ldouble: 1
Function: "cbrt":
double: 1
@@ -1002,151 +835,25 @@ idouble: 1
ildouble: 948
ldouble: 948
-Function: Real part of "ccos":
-float: 1
-ifloat: 1
-ildouble: 5
-ldouble: 5
-
-Function: Imaginary part of "ccos":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1901
-ldouble: 1901
-
-Function: Real part of "ccosh":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
-ildouble: 1467
-ldouble: 1467
-
-Function: Imaginary part of "ccosh":
-float: 1
-ifloat: 1
-ildouble: 1182
-ldouble: 1182
-
-Function: Real part of "cexp":
-float: 3
-ifloat: 3
-ildouble: 940
-ldouble: 940
-
-Function: Imaginary part of "cexp":
-float: 2
-ifloat: 2
-ildouble: 1067
-ldouble: 1067
-
-Function: Imaginary part of "clog":
-ildouble: 1
-ldouble: 1
-
-Function: Real part of "clog10":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1402
-ldouble: 1402
-
-Function: Imaginary part of "clog10":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 187
-ldouble: 187
-
Function: "cos":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 529
-ldouble: 529
+ildouble: 1
+ldouble: 1
Function: "cosh":
-ildouble: 309
-ldouble: 309
+ildouble: 2
+ldouble: 2
Function: Real part of "cpow":
double: 1
-float: 1
idouble: 1
-ifloat: 1
-ildouble: 5
-ldouble: 5
Function: Imaginary part of "cpow":
double: 1.103
-float: 6
idouble: 1.103
-ifloat: 6
-ildouble: 2
-ldouble: 2
-
-Function: Real part of "csin":
-float: 1
-ifloat: 1
-ildouble: 966
-ldouble: 966
-
-Function: Imaginary part of "csin":
-float: 1
-ifloat: 1
-ildouble: 168
-ldouble: 168
-
-Function: Real part of "csinh":
-float: 1
-ifloat: 1
-ildouble: 413
-ldouble: 413
-
-Function: Imaginary part of "csinh":
-float: 1
-ifloat: 1
-ildouble: 477
-ldouble: 477
-
-Function: Real part of "csqrt":
-float: 1
-ifloat: 1
-ildouble: 237
-ldouble: 237
-
-Function: Imaginary part of "csqrt":
-ildouble: 128
-ldouble: 128
-
-Function: Real part of "ctan":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 689
-ldouble: 689
-
-Function: Imaginary part of "ctan":
-ildouble: 367
-ldouble: 367
-
-Function: Real part of "ctanh":
-float: 1
-ifloat: 1
-ildouble: 285
-ldouble: 285
-
-Function: Imaginary part of "ctanh":
-double: 1
-idouble: 1
-ildouble: 3074
-ldouble: 3074
Function: "erfc":
double: 24
@@ -1154,37 +861,29 @@ float: 11
idouble: 24
ifloat: 11
-Function: "exp":
-ildouble: 412
-ldouble: 412
-
Function: "exp10":
double: 1
idouble: 1
-ildouble: 1182
-ldouble: 1182
-
-Function: "exp2":
-ildouble: 461
-ldouble: 461
+ildouble: 1
+ldouble: 1
Function: "expm1":
-ildouble: 825
-ldouble: 825
+ildouble: 1
+ldouble: 1
Function: "fmod":
double: 2
float: 1
idouble: 2
ifloat: 1
-ildouble: 4096
-ldouble: 4096
+ildouble: 1
+ldouble: 1
Function: "hypot":
float: 1
ifloat: 1
-ildouble: 560
-ldouble: 560
+ildouble: 1
+ldouble: 1
Function: "j0":
float: 3
@@ -1211,68 +910,58 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2342
-ldouble: 2342
+ildouble: 2
+ldouble: 2
Function: "log10":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2033
-ldouble: 2033
+ildouble: 1
+ldouble: 1
Function: "log1p":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 584
-ldouble: 584
+ildouble: 2
+ldouble: 2
Function: "log2":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1689
-ldouble: 1689
+ildouble: 1
+ldouble: 1
Function: "pow":
-ildouble: 725
-ldouble: 725
+ildouble: 1
+ldouble: 1
Function: "sin":
-ildouble: 627
-ldouble: 627
+ildouble: 1
+ldouble: 1
Function: "sincos":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 627
-ldouble: 627
+ildouble: 1
+ldouble: 1
Function: "sinh":
float: 1
ifloat: 1
-ildouble: 1028
-ldouble: 1028
-
-Function: "sqrt":
-ildouble: 489
-ldouble: 489
Function: "tan":
double: 0.5
idouble: 0.5
-ildouble: 1401
-ldouble: 1401
-
-Function: "tanh":
-ildouble: 519
-ldouble: 519
+ildouble: 1
+ldouble: 1
Function: "tgamma":
double: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef892797eea8d39504ebf304ba31a1882b7a31ec
commit ef892797eea8d39504ebf304ba31a1882b7a31ec
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Oct 16 09:21:25 2000 +0000
Fix last change (misapplied).
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 29267af..06c9db6 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -182,7 +182,7 @@ _dl_start_user:
pea 8(%sp, %d1*4)
pea 8(%sp)
move.l %d1, -(%sp)
- move.l ([_dl_loaded@GOT.w(%a5)]), -(%sp)
+ move.l ([_dl_loaded@GOT.w, %a5]), -(%sp)
jbsr _dl_init@PLTPC
addq.l #8, %sp
addq.l #8, %sp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d4515fc575748519e3ea8f55c06fdc1b392a536
commit 2d4515fc575748519e3ea8f55c06fdc1b392a536
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 18:37:53 2000 +0000
Cleanup.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
index cec71b2..bdded3d 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
@@ -1,4 +1,4 @@
-/* Definitions for Linux/hppa sigaction.
+/* Definitions for Linux/HPPA sigaction.
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
index 45ed06a..a475004 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
@@ -1,4 +1,4 @@
-/* Signal number definitions. Linux version.
+/* Signal number definitions. Linux/HPPA version.
Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
index 9ed6c4f..129c2be 100644
--- a/sysdeps/unix/sysv/linux/hppa/brk.c
+++ b/sysdeps/unix/sysv/linux/hppa/brk.c
@@ -1,4 +1,4 @@
-/* brk system call for Linux/i386.
+/* brk system call for Linux/HPPA.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
index 60022f9..c819ab1 100644
--- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -37,16 +37,18 @@ typedef unsigned long int greg_t;
#define NFPREG 33
/* Container for all general registers. */
-typedef struct gregset {
- greg_t g_regs[32];
- greg_t sr_regs[5];
- greg_t g_pad[5];
-} gregset_t;
+typedef struct gregset
+ {
+ greg_t g_regs[32];
+ greg_t sr_regs[5];
+ greg_t g_pad[5];
+ } gregset_t;
/* Container for all FPU registers. */
-typedef struct fpregset {
- double fp_dregs[32];
-} fpregset_t;
+typedef struct fpregset
+ {
+ double fp_dregs[32];
+ } fpregset_t;
/* Context to describe whole processor state. */
typedef struct
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
index 39cb251..515467b 100644
--- a/sysdeps/unix/sysv/linux/hppa/umount.c
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -1,9 +1,29 @@
-/* since we don't have an oldumount system call, do what the kernel
- does down here */
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
-long __umount(char *name)
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Since we don't have an oldumount system call, do what the kernel
+ does down here. */
+
+long int
+__umount (const char *name)
{
- return __umount2(name, 0);
+ return __umount2 (name, 0);
}
-weak_alias(__umount, umount);
+weak_alias (__umount, umount);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37374d91acb5e6b76b5d0f4b6519098d61e5af81
commit 37374d91acb5e6b76b5d0f4b6519098d61e5af81
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:58:58 2000 +0000
Linux/HPPA errno definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
new file mode 100644
index 0000000..db4eaf6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -0,0 +1,57 @@
+/* Error constants. Linux/HPPA specific version.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _ERRNO_H
+
+# undef EDOM
+# undef EILSEQ
+# undef ERANGE
+# include <linux/errno.h>
+
+/* Linux also has no ECANCELED error code. Since it is not used here
+ we define it to an invalid value. */
+# define ECANCELED 125
+
+# ifndef __ASSEMBLER__
+/* We now need a declaration of the `errno' variable. */
+extern int errno;
+
+/* Function to get address of global `errno' variable. */
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+
+# if defined _LIBC
+/* We wouldn't need a special macro anymore but it is history. */
+# define __set_errno(val) (*__errno_location ()) = (val)
+# endif /* _LIBC */
+
+# if !defined _LIBC || defined _LIBC_REENTRANT
+/* When using threads, errno is a per-thread value. */
+# define errno (*__errno_location ())
+# endif
+# endif /* !__ASSEMBLER__ */
+#endif /* _ERRNO_H */
+
+#if !defined _ERRNO_H && defined __need_Emath
+/* This is ugly but the kernel header is not clean enough. We must
+ define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
+ defined. */
+# define EDOM 33 /* Math argument out of domain of function. */
+# define EILSEQ 84 /* Illegal byte sequence. */
+# define ERANGE 34 /* Math result not representable. */
+#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb0f005337cb31a747875bbca3006810d09ef25f
commit fb0f005337cb31a747875bbca3006810d09ef25f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:37:33 2000 +0000
Linux/HPPA specific fenv definitions.
diff --git a/sysdeps/hppa/fpu/bits/fenv.h b/sysdeps/hppa/fpu/bits/fenv.h
new file mode 100644
index 0000000..7d25b99
--- /dev/null
+++ b/sysdeps/hppa/fpu/bits/fenv.h
@@ -0,0 +1,78 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing the exception. We use the values of the
+ appropriate enable bits in the FPU status word (which,
+ coincidentally, are the same as the flag bits, but shifted right by
+ 27 bits). */
+enum
+{
+ FE_INVALID = 1<<4, /* V */
+#define FE_INVALID FE_INVALID
+ FE_DIVBYZERO = 1<<3, /* Z */
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_OVERFLOW = 1<<2, /* O */
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 1<<1, /* U */
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 1<<0, /* I */
+#define FE_INEXACT FE_INEXACT
+};
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The PA-RISC FPU supports all of the four defined rounding modes.
+ We use the values of the RM field in the floating point status
+ register for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0 << 9,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDZERO = 1 << 9,
+#define FE_TOWARDZERO FE_TOWARDZERO
+ FE_UPWARD = 2 << 9,
+#define FE_UPWARD FE_UPWARD
+ FE_DOWNWARD = 3 << 9,
+#define FE_DOWNWARD FE_DOWNWARD
+ };
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. This structure
+ corresponds to the layout of the status and exception words in the
+ register file. */
+typedef struct
+{
+ unsigned int __status_word;
+ unsigned int __exception[7];
+} fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2db1ce26dac360a878ce00879916ef52d3ab3e91
commit 2db1ce26dac360a878ce00879916ef52d3ab3e91
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:36:28 2000 +0000
Linux/HPPA specific fetestexcept implementation.
diff --git a/sysdeps/hppa/fpu/ftestexcept.c b/sysdeps/hppa/fpu/ftestexcept.c
new file mode 100644
index 0000000..15d1491
--- /dev/null
+++ b/sysdeps/hppa/fpu/ftestexcept.c
@@ -0,0 +1,32 @@
+/* Test exception in current environment.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ return (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32b9e00b121486d7eb6de334df6a4828cf7a751e
commit 32b9e00b121486d7eb6de334df6a4828cf7a751e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:36:16 2000 +0000
Linux/HPPA specific fesetexceptflag implementation.
diff --git a/sysdeps/hppa/fpu/fsetexcptflg.c b/sysdeps/hppa/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..2e369ea
--- /dev/null
+++ b/sysdeps/hppa/fpu/fsetexcptflg.c
@@ -0,0 +1,41 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+int
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ /* Install the new exception flags bits. */
+ sw[0] &= ~(excepts & (FE_ALL_EXCEPT >> 27));
+ sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27;
+
+ /* Store the new status word. */
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+
+ /* Success. */
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84e1099f7894d1ece7f5b843f87c962743b3ecd0
commit 84e1099f7894d1ece7f5b843f87c962743b3ecd0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:36:03 2000 +0000
Linux/HPPA specific feraiseexcept implementation.
diff --git a/sysdeps/hppa/fpu/fraiseexcpt.c b/sysdeps/hppa/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..7feeb99
--- /dev/null
+++ b/sysdeps/hppa/fpu/fraiseexcpt.c
@@ -0,0 +1,89 @@
+/* Raise given exceptions.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+int
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXCEPTS. But we must raise only one
+ signal at a time. It is important that if the overflow/underflow
+ exception and the divide by zero exception are given at the same
+ time, the overflow/underflow exception follows the divide by zero
+ exception. */
+
+ /* We do these bits in assembly to be certain GCC doesn't optimize
+ away something important, and so we can force delayed traps to
+ occur. */
+
+ /* FIXME: These all need verification! */
+
+ /* First: invalid exception. */
+ if (excepts & FE_INVALID)
+ {
+ /* One example of a invalid operation is 0 * Infinity. */
+ double d = HUGE_VAL;
+ __asm__ __volatile__ ("fmpy,dbl %1,%%fr0,%0\n\t"
+ /* FIXME: is this a proper trap barrier? */
+ "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ }
+
+ /* Next: division by zero. */
+ if (excepts & FE_DIVBYZERO)
+ {
+ double d = 1.0;
+ __asm__ __volatile__ ("fdiv,dbl %1,%%fr0,%0\n\t"
+ "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ }
+
+ /* Next: overflow. */
+ /* FIXME: Compare with IA-64 - do we have the same problem? */
+ if (excepts & FE_OVERFLOW)
+ {
+ double d = DBL_MAX;
+
+ __asm__ __volatile__ ("fmpy,dbl %1,%1,%0\n\t"
+ "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d));
+ }
+
+ /* Next: underflow. */
+ if (excepts & FE_UNDERFLOW)
+ {
+ double d = DBL_MIN;
+ double e = 69.69;
+
+ __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t"
+ "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e));
+ }
+
+ /* Last: inexact. */
+ if (excepts & FE_INEXACT)
+ {
+ double d = 1.0;
+ double e = M_PI;
+
+ __asm__ __volatile__ ("fdiv,dbl %1,%2,%0\n\t"
+ "fcpy,dbl %%fr0,%%fr0" : "=f" (d) : "0" (d), "f" (e));
+ }
+
+ /* Success. */
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bb9060790776dcd278578ac0958ef6300f8d8f9
commit 9bb9060790776dcd278578ac0958ef6300f8d8f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:35:48 2000 +0000
Linux/HPPA specific fegetexceptflag implementation.
diff --git a/sysdeps/hppa/fpu/fgetexcptflg.c b/sysdeps/hppa/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..800b1f4
--- /dev/null
+++ b/sysdeps/hppa/fpu/fgetexcptflg.c
@@ -0,0 +1,36 @@
+/* Store current representation for exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ *flagp = (sw[0] >> 27) & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
+}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=318eb46070f17c67b8827befe75e6b63affbcc56
commit 318eb46070f17c67b8827befe75e6b63affbcc56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:35:14 2000 +0000
Linux/HPPA specific feupdateenv implementation.
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
new file mode 100644
index 0000000..7e2d715
--- /dev/null
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -0,0 +1,40 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feupdateenv (const fenv_t *envp)
+{
+ unsigned int sw[2];
+
+ /* Get the current exception status. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ sw[0] &= (FE_ALL_EXCEPT << 27);
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the saved exception. */
+ feraiseexcept (sw[0] >> 27);
+
+ /* Success. */
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c34028d3e197956caa1c786b45eff871ed9792e
commit 8c34028d3e197956caa1c786b45eff871ed9792e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:35:05 2000 +0000
Linux/HPPA specific fesetround implementation.
diff --git a/sysdeps/hppa/fpu/fesetround.c b/sysdeps/hppa/fpu/fesetround.c
new file mode 100644
index 0000000..0d5858f
--- /dev/null
+++ b/sysdeps/hppa/fpu/fesetround.c
@@ -0,0 +1,39 @@
+/* Set current rounding direction.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ unsigned int sw[2];
+
+ if (round & ~FE_DOWNWARD)
+ /* ROUND is not a valid rounding mode. */
+ return 1;
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+ sw[0] &= ~FE_UPWARD;
+ sw[0] |= round;
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d53eb01efe186e3b0859028dc4afaef6791e60e
commit 1d53eb01efe186e3b0859028dc4afaef6791e60e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:57 2000 +0000
Linux/HPPA specific fesetenv implementation.
diff --git a/sysdeps/hppa/fpu/fesetenv.c b/sysdeps/hppa/fpu/fesetenv.c
new file mode 100644
index 0000000..4bfbefd
--- /dev/null
+++ b/sysdeps/hppa/fpu/fesetenv.c
@@ -0,0 +1,70 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+ Based on the m68k version by
+ Andreas Schwab <schwab@suse.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetenv (const fenv_t *envp)
+{
+ fenv_t temp;
+
+ /* Install the environment specified by ENVP. But there are a few
+ values which we do not want to come from the saved environment.
+ Therefore, we get the current environment and replace the values
+ we want to use from the environment specified by the parameter. */
+ {
+ fenv_t * _regs = &temp;
+ __asm__ (
+ "fstd %%fr0,0(%2)\n"
+ "fstd,ma %%fr1,8(%2)\n"
+ "fstd,ma %%fr2,8(%2)\n"
+ "fstd %%fr3,0(%2)\n"
+ : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
+ }
+
+ temp.__status_word &= ~(FE_ALL_EXCEPT
+ | (FE_ALL_EXCEPT << 27)
+ | FE_DOWNWARD);
+ if (envp == FE_DFL_ENV)
+ ;
+ else if (envp == FE_NOMASK_ENV)
+ temp.__status_word |= FE_ALL_EXCEPT;
+ else
+ temp.__status_word |= (envp->__status_word
+ & (FE_ALL_EXCEPT
+ | FE_DOWNWARD
+ | (FE_ALL_EXCEPT << 27)));
+
+ /* Load the new environment. */
+ {
+ fenv_t * _regs = &temp + 1;
+ __asm__ (
+ "fldd,mb -8(%2),%%fr3\n"
+ "fldd,mb -8(%2),%%fr2\n"
+ "fldd,mb -8(%2),%%fr1\n"
+ "fldd -8(%2),%%fr0\n"
+ : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
+ }
+
+ /* Success. */
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f8d3bd8e7c7ca6999cecec0d203f089b6457bde
commit 1f8d3bd8e7c7ca6999cecec0d203f089b6457bde
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:49 2000 +0000
Linux/HPPA specific feholdexcept implementation.
diff --git a/sysdeps/hppa/fpu/feholdexcpt.c b/sysdeps/hppa/fpu/feholdexcpt.c
new file mode 100644
index 0000000..1062178
--- /dev/null
+++ b/sysdeps/hppa/fpu/feholdexcpt.c
@@ -0,0 +1,60 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <string.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ fenv_t clear;
+
+ /* Store the environment. */
+ {
+ fenv_t * _regs = envp;
+ __asm__ (
+ "fstd %%fr0,0(%2)\n"
+ "fstd,ma %%fr1,8(%2)\n"
+ "fstd,ma %%fr2,8(%2)\n"
+ "fstd %%fr3,0(%2)\n"
+ : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
+ memcpy (&clear, envp, sizeof (clear));
+ }
+
+ /* Now clear all exceptions. */
+ clear.__status_word &= ~(FE_ALL_EXCEPT << 27);
+ memset (clear.__exception, 0, sizeof (clear.__exception));
+
+ /* And set all exceptions to non-stop. */
+ clear.__status_word &= ~FE_ALL_EXCEPT;
+
+ /* Load the new environment. */
+ {
+ fenv_t * _regs = &clear + 1;
+ __asm__ (
+ "fldd,mb -8(%2),%%fr3\n"
+ "fldd,mb -8(%2),%%fr2\n"
+ "fldd,mb -8(%2),%%fr1\n"
+ "fldd -8(%2),%%fr0\n"
+ : "=m" (*_regs), "=r" (_regs) : "1" (_regs));
+ }
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ea85d5c2f36b5d57641329a9fa2c1c7ef38a21a
commit 0ea85d5c2f36b5d57641329a9fa2c1c7ef38a21a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:41 2000 +0000
Linux/HPPA specific fegetround implementation.
diff --git a/sysdeps/hppa/fpu/fegetround.c b/sysdeps/hppa/fpu/fegetround.c
new file mode 100644
index 0000000..6e07f86
--- /dev/null
+++ b/sysdeps/hppa/fpu/fegetround.c
@@ -0,0 +1,32 @@
+/* Return current rounding direction.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ return sw[0] & FE_DOWNWARD;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b2b6656a92c83066b1177e81abe24d72d7657ed
commit 1b2b6656a92c83066b1177e81abe24d72d7657ed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:32 2000 +0000
Linux/HPPA specific fegetexcept implementation.
diff --git a/sysdeps/hppa/fpu/fegetexcept.c b/sysdeps/hppa/fpu/fegetexcept.c
new file mode 100644
index 0000000..6bf3f64
--- /dev/null
+++ b/sysdeps/hppa/fpu/fegetexcept.c
@@ -0,0 +1,32 @@
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetexcept (void)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ return sw[0] & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=839151ff976bbdfe47ce478d3b10b185d6f49b4f
commit 839151ff976bbdfe47ce478d3b10b185d6f49b4f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:22 2000 +0000
Linux/HPPA specific fegetenv implementation.
diff --git a/sysdeps/hppa/fpu/feenablxcpt.c b/sysdeps/hppa/fpu/feenablxcpt.c
new file mode 100644
index 0000000..ac46722
--- /dev/null
+++ b/sysdeps/hppa/fpu/feenablxcpt.c
@@ -0,0 +1,37 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feenableexcept (int excepts)
+{
+ unsigned int sw[2], old_exc;
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ old_exc = sw[0] & FE_ALL_EXCEPT;
+
+ sw[0] |= (excepts & FE_ALL_EXCEPT);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+
+ return old_exc;
+}
diff --git a/sysdeps/hppa/fpu/fegetenv.c b/sysdeps/hppa/fpu/fegetenv.c
new file mode 100644
index 0000000..0fe9773
--- /dev/null
+++ b/sysdeps/hppa/fpu/fegetenv.c
@@ -0,0 +1,33 @@
+/* Store current floating-point environment.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetenv (fenv_t *envp)
+{
+ __asm__ (
+ "fstd %%fr0,0(%2)\n"
+ "fstd,ma %%fr1,8(%2)\n"
+ "fstd,ma %%fr2,8(%2)\n"
+ "fstd %%fr3,0(%2)\n"
+ : "=m" (*envp), "=r" (envp) : "1" (envp));
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ebd5d830b34b01469ebe73ba8b73c8ebd58c74f
commit 8ebd5d830b34b01469ebe73ba8b73c8ebd58c74f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:34:04 2000 +0000
Linux/HPPA specific fedisableexcept implementation.
diff --git a/sysdeps/hppa/fpu/fedisblxcpt.c b/sysdeps/hppa/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..95c362a
--- /dev/null
+++ b/sysdeps/hppa/fpu/fedisblxcpt.c
@@ -0,0 +1,37 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fedisableexcept (int excepts)
+{
+ unsigned int sw[2], old_exc;
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ old_exc = sw[0] & FE_ALL_EXCEPT;
+
+ sw[0] &= ~(excepts & FE_ALL_EXCEPT);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+
+ return old_exc;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7cbd4517248678358562e1edcde2d16ee760409
commit e7cbd4517248678358562e1edcde2d16ee760409
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:33:51 2000 +0000
Linux/HPPA specific feclearexcept implementation.
diff --git a/sysdeps/hppa/fpu/fclrexcpt.c b/sysdeps/hppa/fpu/fclrexcpt.c
new file mode 100644
index 0000000..4c64027
--- /dev/null
+++ b/sysdeps/hppa/fpu/fclrexcpt.c
@@ -0,0 +1,37 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feclearexcept (int excepts)
+{
+ unsigned int sw[2];
+
+ /* Get the current status word. */
+ __asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
+
+ /* Clear all the relevant bits. */
+ sw[0] &= ~(excepts & FE_ALL_EXCEPT);
+ __asm__ ("fldd 0(%0),%%fr0" : : "r" (sw));
+
+ /* Success. */
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f07ba01b99a8e2bb817e4e68888156280ac7436
commit 1f07ba01b99a8e2bb817e4e68888156280ac7436
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:33:33 2000 +0000
Linux/HPPA specific ld.so startup code.
diff --git a/sysdeps/hppa/elf/start.S b/sysdeps/hppa/elf/start.S
new file mode 100644
index 0000000..88bb790
--- /dev/null
+++ b/sysdeps/hppa/elf/start.S
@@ -0,0 +1,58 @@
+
+ .text
+
+ .align 4
+
+ .import main, code
+ .import $global$, data
+ .import __libc_start_main, code
+ .import _fini, code
+ .import _init, code
+
+
+
+
+ .globl _start
+ .export _start, ENTRY
+
+_start:
+
+ .proc
+ .callinfo
+
+ /* load main */
+ ldil LP%main, %r26
+ ldo RP%main(%r26), %r26
+
+ /* argc and argv should be in 25 and 24 */
+
+ /* Expand the stack to store the 5th through 7th args */
+ ldo 64(%sp), %sp
+
+ /* void (*rtld_fini) (void) (actually the 6th arg) */
+ stw %r23, -56(%sp)
+
+ /* void (*init) (void) */
+ ldil LP%_init, %r23
+ ldo RP%_init(%r23), %r23
+
+ /* void (*fini) (void) */
+ ldil LP%_fini, %r22
+ ldo RP%_fini(%r22), %r22
+ stw %r22, -52(%sp)
+
+ /* void *stack_end */
+ stw %sp, -60(%sp)
+
+ /* load global */
+ ldil L%$global$, %dp
+ ldo R%$global$(%dp), %dp
+
+ bl __libc_start_main,%r2
+ nop
+ /* die horribly if it returned (it shouldn't) */
+ iitlbp %r0,(%r0)
+ nop
+
+ .procend
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa4ee8e2274b32c446deda7e6c0701a1bae8d4ff
commit aa4ee8e2274b32c446deda7e6c0701a1bae8d4ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:33:24 2000 +0000
Linux/HPPA specific startup code.
diff --git a/sysdeps/hppa/elf/initfini.c b/sysdeps/hppa/elf/initfini.c
new file mode 100644
index 0000000..c058ed0
--- /dev/null
+++ b/sysdeps/hppa/elf/initfini.c
@@ -0,0 +1,117 @@
+/* Special .init and .fini section support for HPPA
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Library General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The Library General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ The GNU C Library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file is compiled into assembly code which is then munged by a sed
+ script into two files: crti.s and crtn.s.
+
+ * crti.s puts a function prologue at the beginning of the
+ .init and .fini sections and defines global symbols for
+ those addresses, so they can be called as functions.
+
+ * crtn.s puts the corresponding function epilogues
+ in the .init and .fini sections. */
+
+/* If we use the standard C version, the linkage table pointer won't
+ be properly preserved due to the splitting up of function prologues
+ and epilogues. Therefore we write these in assembly to make sure
+ they do the right thing.
+
+ Note that we cannot have a weak undefined __gmon_start__, because
+ that would require this to be PIC, and the linker is currently not
+ able to generate a proper procedure descriptor for _init. Sad but
+ true. Anyway, HPPA is one of those horrible architectures where
+ making the comparison and indirect call is quite expensive (see the
+ comment in sysdeps/generic/initfini.c). */
+
+__asm__ ("
+
+#include \"defs.h\"
+
+/*@HEADER_ENDS*/
+
+/*@_init_PROLOG_BEGINS*/
+ .section .init
+ .align 4
+ .globl _init
+ .type _init,@function
+ .proc
+ .callinfo
+_init:
+ stw %rp,-20(%sp)
+ stwm %r4,64(%sp)
+ stw %r19,-32(%sp)
+ bl __gmon_start__,%rp
+ copy %r19,%r4 /* delay slot */
+ copy %r4,%r19
+ .align 4
+ .procend
+/*@_init_PROLOG_ENDS*/
+
+/*@_init_EPILOG_BEGINS*/
+ .section .init
+ copy %r4,%r19
+ ldw -84(%sp),%rp
+ bv %r0(%rp)
+ ldwm -64(%sp),%r4
+ .text
+ .align 4
+ .weak __gmon_start__
+ .type __gmon_start__,@function
+ .proc
+ .callinfo
+__gmon_start__:
+ bv,n %r0(%r2)
+ .procend
+/*@_init_EPILOG_ENDS*/
+
+/*@_fini_PROLOG_BEGINS*/
+ .section .fini
+ .align 4
+ .globl _fini
+ .type _fini,@function
+ .proc
+ .callinfo
+_fini:
+ stw %rp,-20(%sp)
+ stwm %r4,64(%sp)
+ stw %r19,-32(%sp)
+ copy %r19,%r4
+ .align 4
+ .procend
+/*@_fini_PROLOG_ENDS*/
+
+/*@_fini_EPILOG_BEGINS*/
+ .section .fini
+ copy %r4,%r19
+ ldw -84(%sp),%rp
+ bv %r0(%rp)
+ ldwm -64(%sp),%r4
+/*@_fini_EPILOG_ENDS*/
+
+/*@TRAILER_BEGINS*/
+");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff3e49693014750a3c4b68f50151089132891e98
commit ff3e49693014750a3c4b68f50151089132891e98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:30:29 2000 +0000
Linux/HPPA specific ucontext definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
new file mode 100644
index 0000000..60022f9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Don't rely on this, the interface is currently messed up and may need to
+ be broken to be fixed. */
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* We need the signal context definitions even if they are not used
+ included in <signal.h>. */
+#include <bits/sigcontext.h>
+
+
+/* Type for general register. */
+typedef unsigned long int greg_t;
+
+/* Number of general registers. */
+#define NGREG 42
+#define NFPREG 33
+
+/* Container for all general registers. */
+typedef struct gregset {
+ greg_t g_regs[32];
+ greg_t sr_regs[5];
+ greg_t g_pad[5];
+} gregset_t;
+
+/* Container for all FPU registers. */
+typedef struct fpregset {
+ double fp_dregs[32];
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06a5b96db38785d2a54002feb2283f2a72dfcb88
commit 06a5b96db38785d2a54002feb2283f2a72dfcb88
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:30:16 2000 +0000
Linux/HPPA specific debugging data structures.
diff --git a/sysdeps/unix/sysv/linux/hppa/sys/procfs.h b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
new file mode 100644
index 0000000..b6c756f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/sys/procfs.h
@@ -0,0 +1,113 @@
+/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PROCFS_H
+#define _SYS_PROCFS_H 1
+
+/* This is somewhat modelled after the file of the same name on SVR4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. It doesn't have anything to do with the /proc file
+ system, even though Linux has one.
+
+ Anyway, the whole purpose of this file is for GDB and GDB only.
+ Don't read too much into it. Don't use it for anything other than
+ GDB unless you know what you are doing. */
+
+#include <features.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <sys/user.h>
+#include <asm/elf.h>
+
+__BEGIN_DECLS
+
+struct elf_siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_code; /* Extra code. */
+ int si_errno; /* Errno. */
+ };
+
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with Linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ GDB doesn't really use excluded. */
+
+struct elf_prstatus
+ {
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned long int pr_sigpend; /* Set of pending signals. */
+ unsigned long int pr_sighold; /* Set of held signals. */
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct timeval pr_utime; /* User time. */
+ struct timeval pr_stime; /* System time. */
+ struct timeval pr_cutime; /* Cumulative user time. */
+ struct timeval pr_cstime; /* Cumulative system time. */
+ elf_gregset_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+#define ELF_PRARGSZ (80) /* Number of chars for args. */
+
+struct elf_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long int pr_flag; /* Flags. */
+ unsigned int pr_uid;
+ unsigned int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+/* The rest of this file provides the types for emulation of the
+ Solaris <proc_service.h> interfaces that should be implemented by
+ users of libthread_db. */
+
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef elf_gregset_t prgregset_t;
+typedef elf_fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore have only one PID type. */
+typedef __pid_t lwpid_t;
+
+/* Process status and info. In the end we do provide typedefs for them. */
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif /* sys/procfs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58a36ea30395b857bbf9cb5a1da8ad46ab080f70
commit 58a36ea30395b857bbf9cb5a1da8ad46ab080f70
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:29:47 2000 +0000
Linux/HPPA specific signal number definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/signum.h b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
new file mode 100644
index 0000000..45ed06a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/signum.h
@@ -0,0 +1,82 @@
+/* Signal number definitions. Linux version.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#endif
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGABRT 6 /* Abort (ANSI). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* BUS error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad system call. */
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGVTALRM 20 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 21 /* Profiling alarm clock (4.2 BSD). */
+#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
+#define SIGIO 22 /* I/O now possible (4.2 BSD). */
+#define SIGWINCH 23 /* Window size change (4.3 BSD, Sun). */
+#define SIGSTOP 24 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 25 /* Keyboard stop (POSIX). */
+#define SIGCONT 26 /* Continue (POSIX). */
+#define SIGTTIN 27 /* Background read from tty (POSIX). */
+#define SIGTTOU 28 /* Background write to tty (POSIX). */
+#define SIGURG 29 /* Urgent condition on socket (4.2 BSD). */
+#define SIGLOST 30 /* Operating System Has Lost (HP/UX). */
+#define SIGUNUSED 31
+#define SIGXCPU 33 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 34 /* File size limit exceeded (4.2 BSD). */
+#define SIGSTKFLT 36 /* Stack fault. */
+
+#define _NSIG 64 /* Biggest signal number + 1
+ (including real-time signals). */
+
+#define SIGRTMIN (__libc_current_sigrtmin ())
+#define SIGRTMAX (__libc_current_sigrtmax ())
+
+/* These are the hard limits of the kernel. These values should not be
+ used directly at user level. */
+#define __SIGRTMIN 37
+#define __SIGRTMAX (_NSIG - 1)
+
+#endif /* <signal.h> included. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7f6c890c33f3a251b733a4cd74e2c90bc3fef98
commit e7f6c890c33f3a251b733a4cd74e2c90bc3fef98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:29:35 2000 +0000
Linux/HPPA specific sigaction definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
new file mode 100644
index 0000000..cec71b2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
@@ -0,0 +1,75 @@
+/* Definitions for Linux/hppa sigaction.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
+
+ /* Special flags. */
+ unsigned long int sa_flags;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+ };
+
+/* Bits in `sa_flags'. */
+
+#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x00000080 /* Don't create zombie on child death. */
+#define SA_SIGINFO 0x00000010 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_UNIX98 || defined __USE_MISC
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */
+# define SA_NODEFER 0x00000020 /* Don't automatically block the signal
+ when its handler is being executed. */
+# define SA_RESTART 0x00000040 /* Restart syscall on signal return. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x20000000 /* Historic no-op. */
+
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 0 /* for blocking signals */
+#define SIG_UNBLOCK 1 /* for unblocking signals */
+#define SIG_SETMASK 2 /* for setting the signal mask */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aed80203670e5ad274423ef3da67030384ef4f70
commit aed80203670e5ad274423ef3da67030384ef4f70
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:29:27 2000 +0000
Linux/HPPA specific mman definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
new file mode 100644
index 0000000..78c0171
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h
@@ -0,0 +1,61 @@
+/* Definitions for POSIX memory map interface. Insert rest of disclaimer here */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* these are basically taken from the kernel definitions */
+
+#define PROT_READ 0x1 /* page can be read */
+#define PROT_WRITE 0x2 /* page can be written */
+#define PROT_EXEC 0x4 /* page can be executed */
+#define PROT_NONE 0x0 /* page can not be accessed */
+
+#define MAP_SHARED 0x01 /* Share changes */
+#define MAP_PRIVATE 0x02 /* Changes are private */
+#define MAP_TYPE 0x03 /* Mask for type of mapping */
+#define MAP_FIXED 0x04 /* Interpret addr exactly */
+#define MAP_ANONYMOUS 0x10 /* don't use a file */
+
+#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
+#define MAP_LOCKED 0x2000 /* pages are locked */
+#define MAP_NORESERVE 0x4000 /* don't check for reservations */
+#define MAP_GROWSDOWN 0x8000 /* stack-like segment */
+
+#define MS_SYNC 1 /* synchronous memory sync */
+#define MS_ASYNC 2 /* sync memory asynchronously */
+#define MS_INVALIDATE 4 /* invalidate the caches */
+
+#define MCL_CURRENT 1 /* lock all current mappings */
+#define MCL_FUTURE 2 /* lock all future mappings */
+
+#define MADV_NORMAL 0 /* no further special treatment */
+#define MADV_RANDOM 1 /* expect random page references */
+#define MADV_SEQUENTIAL 2 /* expect sequential page references */
+#define MADV_WILLNEED 3 /* will need these pages */
+#define MADV_DONTNEED 4 /* dont need these pages */
+#define MADV_SPACEAVAIL 5 /* insure that resources are reserved */
+#define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */
+#define MADV_VPS_INHERIT 7 /* Inherit parents page size */
+
+/* The range 12-64 is reserved for page size specification. */
+#define MADV_4K_PAGES 12 /* Use 4K pages */
+#define MADV_16K_PAGES 14 /* Use 16K pages */
+#define MADV_64K_PAGES 16 /* Use 64K pages */
+#define MADV_256K_PAGES 18 /* Use 256K pages */
+#define MADV_1M_PAGES 20 /* Use 1 Megabyte pages */
+#define MADV_4M_PAGES 22 /* Use 4 Megabyte pages */
+#define MADV_16M_PAGES 24 /* Use 16 Megabyte pages */
+#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
+
+/* compatibility flags */
+#define MAP_ANON MAP_ANONYMOUS
+#define MAP_FILE 0
+#define MAP_VARIABLE 0
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b8483160d610b9b7e5729734da6cb114c00967d
commit 5b8483160d610b9b7e5729734da6cb114c00967d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:29:17 2000 +0000
Linux/HPPA specific ioctl definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
new file mode 100644
index 0000000..bad78b6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/ioctls.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
+
+/* Use the definitions from the kernel header files. */
+#include <asm/ioctls.h>
+
+/* Oh well, this is necessary since the kernel data structure is
+ different from the user-level version. */
+#undef TCGETS
+#undef TCSETS
+#undef TCSETSW
+#undef TCSETSF
+#define TCGETS _IOR ('T', 16, char[36])
+#define TCSETS _IOW ('T', 17, char[36])
+#define TCSETSW _IOW ('T', 18, char[36])
+#define TCSETSF _IOW ('T', 19, char[36])
+
+#include <linux/sockios.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7c460d411f0cd3ec14c001c1eab605d33894ed7
commit f7c460d411f0cd3ec14c001c1eab605d33894ed7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:29:10 2000 +0000
Linux/HPPA specific fcntl definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
new file mode 100644
index 0000000..687ffc8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -0,0 +1,148 @@
+/* O_*, F_*, FD_* bit values for Linux/HPPA.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#include <sys/types.h>
+
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_RDONLY 00000000
+#define O_WRONLY 00000001
+#define O_RDWR 00000002
+#define O_ACCMODE 00000003
+#define O_APPEND 00000010
+#define O_BLKSEEK 00000100 /* HPUX only */
+#define O_CREAT 00000400 /* not fcntl */
+#define O_TRUNC 00001000 /* not fcntl */
+#define O_EXCL 00002000 /* not fcntl */
+#define O_ASYNC 00020000
+#define O_SYNC 00100000
+#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
+#define O_NDELAY O_NONBLOCK
+#define O_NOCTTY 00400000 /* not fcntl */
+
+
+#ifdef __USE_GNU
+# define O_DIRECT 00040000 /* direct disk access hint - currently ignored */
+# define O_DIRECTORY 00010000 /* must be a directory */
+# define O_NOFOLLOW 00000200 /* don't follow links */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 00004000
+#endif
+
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC 01000000 /* HPUX only */
+# define O_RSYNC 02000000 /* HPUX only */
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 5 /* Get record locking info. */
+#define F_SETLK 6 /* Set record locking info (non-blocking). */
+#define F_SETLKW 7 /* Set record locking info (blocking). */
+
+#define F_GETLK64 8 /* Get record locking info. */
+#define F_SETLK64 9 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 10 /* Set record locking info (blocking). */
+
+#if defined __USE_BSD || defined __USE_XOPEN2K
+# define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
+# define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 13 /* Set number of signal to be sent. */
+# define F_GETSIG 14 /* Get number of signal to be sent. */
+#endif
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* operations for bsd flock(), also used by the kernel implementation */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a22a888980dcaf66b61e8e89905ddda7bfe6bf17
commit a22a888980dcaf66b61e8e89905ddda7bfe6bf17
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:55 2000 +0000
Linux/HPPA specific umount definition.
diff --git a/sysdeps/unix/sysv/linux/hppa/umount.c b/sysdeps/unix/sysv/linux/hppa/umount.c
new file mode 100644
index 0000000..39cb251
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/umount.c
@@ -0,0 +1,9 @@
+/* since we don't have an oldumount system call, do what the kernel
+ does down here */
+
+long __umount(char *name)
+{
+ return __umount2(name, 0);
+}
+
+weak_alias(__umount, umount);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a30ba90d2e9bec44a3a6f6e083f28b3104926f5a
commit a30ba90d2e9bec44a3a6f6e083f28b3104926f5a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:47 2000 +0000
Linux/HPPA specific low-level definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h b/sysdeps/unix/sysv/linux/hppa/sysdep.h
new file mode 100644
index 0000000..73d9a38
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -0,0 +1,242 @@
+/* Assembler macros for PA-RISC.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
+ Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <asm/unistd.h>
+#include <sysdeps/generic/sysdep.h>
+#include <sys/syscall.h>
+#include "config.h"
+
+#ifndef ASM_LINE_SEP
+#define ASM_LINE_SEP ;
+#endif
+
+#undef SYS_ify
+#define SYS_ify(syscall_name) (__NR_##syscall_name)
+
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembler. */
+
+#define ALIGNARG(log2) log2
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#define SYS_ify(syscall_name) __NR_##syscall_name
+
+/* ELF-like local names start with `.L'. */
+#undef L
+#define L(name) .L##name
+
+/* Linux uses a negative return value to indicate syscall errors,
+ unlike most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be
+ negative even if the call succeeded. E.g., the `lseek' system call
+ might return a large offset. Therefore we must not anymore test
+ for < 0, but test for a real error by making sure the value in %eax
+ is a real error number. Linus said he will make sure the no syscall
+ returns a value in -1 .. -4095 as a valid result so we can safely
+ test with -4095. */
+
+/* We don't want the label for the error handle to be global when we define
+ it here. */
+#ifdef PIC
+# define SYSCALL_ERROR_LABEL 0f
+#else
+# define SYSCALL_ERROR_LABEL syscall_error
+#endif
+
+/* Define an entry point visible from C.
+
+ There is currently a bug in gdb which prevents us from specifying
+ incomplete stabs information. Fake some entries here which specify
+ the current source file. */
+#define ENTRY(name) \
+ .text ASM_LINE_SEP \
+ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \
+ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ C_LABEL(name) \
+ CALL_MCOUNT
+
+#define ret \
+ bv 0(2) ASM_LINE_SEP \
+ nop
+
+#undef END
+#define END(name) \
+1: .size C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
+
+/* If compiled for profiling, call `mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT /* XXX */
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+/* syscall wrappers consist of
+ #include <sysdep.h>
+ PSEUDO(...)
+ ret
+ PSEUDO_END(...)
+
+ which means
+ ENTRY(name)
+ DO_CALL(...)
+ nop
+ bv 0(2)
+ nop
+*/
+
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ DO_CALL(args, syscall_name) ASM_LINE_SEP \
+ nop
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) \
+ END (name)
+
+#define JUMPTARGET(name) name
+#define SYSCALL_PIC_SETUP /* Nothing. */
+
+/* Linux takes system call arguments in registers:
+ syscall number gr20
+ arg 1 gr26
+ arg 2 gr25
+ arg 3 gr24
+ arg 4 gr23
+ arg 5 gr22
+ arg 6 gr21
+
+ The compiler calls us by the C convention:
+ syscall number in the DO_CALL macro
+ arg 1 gr26
+ arg 2 gr25
+ arg 3 gr24
+ arg 4 gr23
+ arg 5 -52(gr30)
+ arg 6 -56(gr30)
+
+ gr22 and gr21 are caller-saves, so we can just load the arguments
+ there and generally be happy. */
+
+/* the cmpb...no_error code below inside DO_CALL
+ * is intended to mimic the if (__sys_res...)
+ * code inside INLINE_SYSCALL
+ */
+
+#undef DO_CALL
+#define DO_CALL(args, syscall_name) \
+ DOARGS_##args \
+ ble 0x100(%sr2,%r0) ASM_LINE_SEP \
+ ldi SYS_ify (syscall_name), %r20 ASM_LINE_SEP \
+ ldi -0x1000,%r1 ASM_LINE_SEP \
+ cmpb,>>=,n %r1,%ret0,0f ASM_LINE_SEP \
+ stw %rp, -20(%sr0,%r30) ASM_LINE_SEP \
+ stw %ret0, -24(%sr0,%r30) ASM_LINE_SEP \
+ .import __errno_location,code ASM_LINE_SEP \
+ bl __errno_location,%rp ASM_LINE_SEP \
+ ldo 64(%r30), %r30 ASM_LINE_SEP \
+ ldo -64(%r30), %r30 ASM_LINE_SEP \
+ ldw -24(%r30), %r26 ASM_LINE_SEP \
+ sub %r0, %r26, %r26 ASM_LINE_SEP \
+ stw %r26, 0(%sr0,%ret0) ASM_LINE_SEP \
+ ldo -1(%r0), %ret0 ASM_LINE_SEP \
+ ldw -20(%r30), %rp ASM_LINE_SEP \
+0: ASM_LINE_SEP \
+ UNDOARGS_##args
+
+#define DOARGS_0 /* nothing */
+#define DOARGS_1 /* nothing */
+#define DOARGS_2 /* nothing */
+#define DOARGS_3 /* nothing */
+#define DOARGS_4 /* nothing */
+#define DOARGS_5 ldw -52(%r30), %r22 ASM_LINE_SEP
+#define DOARGS_6 ldw -52(%r30), %r22 ASM_LINE_SEP \
+ ldw -56(%r30), %r21 ASM_LINE_SEP
+
+
+#define UNDOARGS_0 /* nothing */
+#define UNDOARGS_1 /* nothing */
+#define UNDOARGS_2 /* nothing */
+#define UNDOARGS_3 /* nothing */
+#define UNDOARGS_4 /* nothing */
+#define UNDOARGS_5 /* nothing */
+#define UNDOARGS_6 /* nothing */
+
+#else
+
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) ({ \
+ unsigned long __sys_res; \
+ { \
+ register unsigned long __res asm("r28"); \
+ LOAD_ARGS_##nr(args) \
+ asm volatile( \
+ "ble 0x100(%%sr2, %%r0)\n\t" \
+ " ldi %1, %%r20" \
+ : "=r" (__res) \
+ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ ); \
+ __sys_res = __res; \
+ } \
+ if (__sys_res >= (unsigned long)-4095) { \
+ __set_errno(-__sys_res); \
+ __sys_res == (unsigned long)-1; \
+ } \
+ __sys_res; \
+})
+
+#define LOAD_ARGS_0()
+#define LOAD_ARGS_1(r26) \
+ register unsigned long __r26 __asm__("r26") = (unsigned long)r26; \
+ LOAD_ARGS_0()
+#define LOAD_ARGS_2(r26,r25) \
+ register unsigned long __r25 __asm__("r25") = (unsigned long)r25; \
+ LOAD_ARGS_1(r26)
+#define LOAD_ARGS_3(r26,r25,r24) \
+ register unsigned long __r24 __asm__("r24") = (unsigned long)r24; \
+ LOAD_ARGS_2(r26,r25)
+#define LOAD_ARGS_4(r26,r25,r24,r23) \
+ register unsigned long __r23 __asm__("r23") = (unsigned long)r23; \
+ LOAD_ARGS_3(r26,r25,r24)
+#define LOAD_ARGS_5(r26,r25,r24,r23,r22) \
+ register unsigned long __r22 __asm__("r22") = (unsigned long)r22; \
+ LOAD_ARGS_4(r26,r25,r24,r23)
+#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21) \
+ register unsigned long __r21 __asm__("r21") = (unsigned long)r21; \
+ LOAD_ARGS_5(r26,r25,r24,r23,r22)
+
+#define ASM_ARGS_0
+#define ASM_ARGS_1 , "r" (__r26)
+#define ASM_ARGS_2 , "r" (__r26), "r" (__r25)
+#define ASM_ARGS_3 , "r" (__r26), "r" (__r25), "r" (__r24)
+#define ASM_ARGS_4 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23)
+#define ASM_ARGS_5 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22)
+#define ASM_ARGS_6 , "r" (__r26), "r" (__r25), "r" (__r24), "r" (__r23), "r" (__r22), "r" (__r21)
+
+#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a61e86b079f662333e5a6512ff0ecdf72a999826
commit a61e86b079f662333e5a6512ff0ecdf72a999826
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:38 2000 +0000
Linux/HPPA specific low-level object definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.c b/sysdeps/unix/sysv/linux/hppa/sysdep.c
new file mode 100644
index 0000000..0559cc7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include <errno.h>
+
+/* This routine is jumped to by all the syscall handlers, to stash
+ an error number into errno. */
+int
+__syscall_error (int err_no)
+{
+ __set_errno (err_no);
+ return -1;
+}
+
+/* We also have to have a 'real' definition of errno. */
+#undef errno
+int errno = 0;
+weak_alias (errno, _errno)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19cf2cc288eefa1bf935b7b69f324ac15b5e67d3
commit 19cf2cc288eefa1bf935b7b69f324ac15b5e67d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:22 2000 +0000
Linux/HPPA specific syscall list.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
new file mode 100644
index 0000000..f0d6431
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -0,0 +1,39 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+# semaphore and shm system calls
+msgctl - msgctl i:iip __msgctl msgctl
+msgget - msgget i:ii __msgget msgget
+msgrcv - msgrcv i:ibnii __msgrcv msgrcv
+msgsnd - msgsnd i:ibni __msgsnd msgsnd
+shmat - shmat i:ipi __shmat shmat
+shmctl - shmctl i:iip __shmctl shmctl
+shmdt - shmdt i:s __shmdt shmdt
+shmget - shmget i:iii __shmget shmget
+semop - semop i:ipi __semop semop
+semget - semget i:iii __semget semget
+semctl - semctl i:iiii __semctl semctl
+
+# proper socket implementations:
+accept - accept i:iBN __libc_accept __accept accept
+bind - bind i:ipi __bind bind
+connect - connect i:ipi __libc_connect __connect connect
+getpeername - getpeername i:ipp __getpeername getpeername
+getsockname - getsockname i:ipp __getsockname getsockname
+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
+listen - listen i:ii __listen listen
+recv - recv i:ibni __libc_recv __recv recv
+recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg i:ipi __libc_recvmsg recvmsg
+send - send i:ibni __libc_send __send send
+sendmsg - sendmsg i:ipi __libc_sendmsg sendmsg
+sendto - sendto i:ibnibn __libc_sendto __sendto sendto
+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
+shutdown - shutdown i:ii __shutdown shutdown
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiif __socketpair socketpair
+
+ptrace - ptrace 4 __ptrace ptrace
+
+getresuid - getresuid i:ppp getresuid
+getresgid - getresgid i:ppp getresgid
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6357ebdf00f03552ff09e697284891be297d0cb1
commit 6357ebdf00f03552ff09e697284891be297d0cb1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:15 2000 +0000
Linux/HPPA specific syscall implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.S b/sysdeps/unix/sysv/linux/hppa/syscall.S
new file mode 100644
index 0000000..413c572
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/syscall.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
+ more information about the value -4095 used below.*/
+
+ .text
+ENTRY (syscall)
+ b .
+ nop
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e61a792a4dee20664e395e0db19708b9d093629
commit 7e61a792a4dee20664e395e0db19708b9d093629
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:28:06 2000 +0000
Linux/HPPA specific socket implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/socket.S b/sysdeps/unix/sysv/linux/hppa/socket.S
new file mode 100644
index 0000000..dfbb721
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/socket.S
@@ -0,0 +1,10 @@
+#include <sysdep.h>
+
+ .globl __socket
+PSEUDO(__socket, socket, 3)
+
+PSEUDO_END(__socket)
+
+#ifndef NO_WEAK_ALIAS
+weak_alias (__socket, socket)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93309db87cd0e1cd7f421cff72bb054a13b806b2
commit 93309db87cd0e1cd7f421cff72bb054a13b806b2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:27:57 2000 +0000
Linux/HPPA specific setrlimit implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/setrlimit.c b/sysdeps/unix/sysv/linux/hppa/setrlimit.c
new file mode 100644
index 0000000..bfaef74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/setrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b60369154c01d14b883aa92c70b2d9e0bf15aad1
commit b60369154c01d14b883aa92c70b2d9e0bf15aad1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:27:46 2000 +0000
Linux/HPPA specific entry point for profiling.
diff --git a/sysdeps/unix/sysv/linux/hppa/profil-counter.h b/sysdeps/unix/sysv/linux/hppa/profil-counter.h
new file mode 100644
index 0000000..8a6a0bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/profil-counter.h
@@ -0,0 +1,2 @@
+/* We can use the ix86 version. */
+#include <sysdeps/unix/sysv/linux/i386/profil-counter.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4dccb0b6a1cf0b07b90830530bf88e589a7d065
commit e4dccb0b6a1cf0b07b90830530bf88e589a7d065
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:27:14 2000 +0000
Linux/HPPA specific mmap implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/mmap.c b/sysdeps/unix/sysv/linux/hppa/mmap.c
new file mode 100644
index 0000000..333d848
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/mmap.c
@@ -0,0 +1,50 @@
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <errno.h>
+
+/* Map addresses starting near ADDR and extending for LEN bytes. From
+ OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
+ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
+ set in FLAGS, the mapping will be at ADDR exactly (which must be
+ page-aligned); otherwise the system chooses a convenient nearby address.
+ The return value is the actual mapping address chosen or MAP_FAILED
+ for errors (in which case `errno' is set). A successful `mmap' call
+ deallocates any previous mapping for the affected region. */
+
+#include <sysdep.h>
+
+__ptr_t
+__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+{
+
+ __ptr_t ret;
+
+ ret = INLINE_SYSCALL(mmap, 6, addr, len, prot, flags, fd, offset);
+
+ /* check if it's really a negative number */
+ if(((unsigned long)ret & 0xfffff000) == 0xfffff000)
+ return MAP_FAILED;
+
+ return ret;
+
+}
+
+strong_alias (__mmap, mmap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f67381e6d5ad0b4f3bc0715a56183c4fb11c17fc
commit f67381e6d5ad0b4f3bc0715a56183c4fb11c17fc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:58 2000 +0000
Linux/HPPA kernel specific stat definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_stat.h b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
new file mode 100644
index 0000000..a1fa377
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/kernel_stat.h
@@ -0,0 +1,32 @@
+/* definition of "struct stat" from the kernel */
+struct kernel_stat {
+ unsigned long st_dev; /* dev_t is 32 bits on parisc */
+ unsigned long st_ino; /* 32 bits */
+ unsigned short st_mode; /* 16 bits */
+ unsigned short st_nlink; /* 16 bits */
+ unsigned short st_reserved1; /* old st_uid */
+ unsigned short st_reserved2; /* old st_gid */
+ unsigned long st_rdev;
+ unsigned long st_size;
+ unsigned long st_atime;
+ unsigned long st_spare1;
+ unsigned long st_mtime;
+ unsigned long st_spare2;
+ unsigned long st_ctime;
+ unsigned long st_spare3;
+ long st_blksize;
+ long st_blocks;
+ unsigned long __unused1; /* ACL stuff */
+ unsigned long __unused2; /* network */
+ unsigned long __unused3; /* network */
+ unsigned long __unused4; /* cnodes */
+ unsigned short __unused5; /* netsite */
+ short st_fstype;
+ unsigned long st_realdev;
+ unsigned short st_basemode;
+ unsigned short st_spareshort;
+ unsigned long st_uid;
+ unsigned long st_gid;
+ unsigned long st_spare4[3];
+};
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a13cef1c25fba6dad61223cdc799dbb3065d744
commit 3a13cef1c25fba6dad61223cdc799dbb3065d744
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:50 2000 +0000
Linux/HPPA kernel specific sigaction definitions.
diff --git a/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
new file mode 100644
index 0000000..af048cb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/kernel_sigaction.h
@@ -0,0 +1,18 @@
+/* We have a separate header file here because we do not support
+ SA_RESTORER on hppa. */
+
+/* This is the sigaction struction from the Linux 2.1.20 kernel. */
+/* Blah. This is bogus. We don't ever use it. */
+struct old_kernel_sigaction {
+ __sighandler_t k_sa_handler;
+ unsigned long sa_mask;
+ unsigned long sa_flags;
+};
+
+/* This is the sigaction structure from the Linux 2.1.68 kernel. */
+
+struct kernel_sigaction {
+ __sighandler_t k_sa_handler;
+ unsigned long sa_flags;
+ sigset_t sa_mask;
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18a940ad384c2c9fb22a9e2feb840f50cc40f54c
commit 18a940ad384c2c9fb22a9e2feb840f50cc40f54c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:34 2000 +0000
Linux/HPPA specific getrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit64.c b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c
new file mode 100644
index 0000000..fef018f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/getrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0fb7e01e5ff987a859a19b7ef1791b9796fca77
commit f0fb7e01e5ff987a859a19b7ef1791b9796fca77
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:27 2000 +0000
Linux/HPPA specific getrlimit implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/getrlimit.c b/sysdeps/unix/sysv/linux/hppa/getrlimit.c
new file mode 100644
index 0000000..fc06dbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/getrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b35e240743eed04486e401463ef4abce5b93e5f9
commit b35e240743eed04486e401463ef4abce5b93e5f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:18 2000 +0000
Linux/HPPA specific clone implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S
new file mode 100644
index 0000000..510e0ff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/clone.S
@@ -0,0 +1,82 @@
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Huggins-Daines <dhd@debian.org>, 2000.
+ Based on the Alpha version by Richard Henderson <rth@tamu.edu>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <asm/unistd.h>
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
+
+ .text
+ENTRY(__clone)
+ /* FIXME: I have no idea how profiling works on hppa. */
+
+ /* Sanity check arguments. */
+ comib,<> 0,%arg0,.Lerror /* no NULL function pointers */
+ ldi EINVAL,%ret0
+ comib,<> 0,%arg1,.Lerror /* no NULL stack pointers */
+ nop
+
+ /* Save the fn ptr and arg on the new stack. */
+ stwm %arg3,64(%arg1)
+ stw %arg3,-60(%arg1)
+
+ /* Do the system call */
+ copy %arg2,%arg0
+ ble 0x100(%sr7,%r0)
+ ldi __NR_clone,%r20
+
+ ldi -4096,%r1
+ comclr,>>= %r1,%ret0,%r0 /* Note: unsigned compare. */
+ b,n .Lerror
+
+ comib,=,n 0,%ret0,thread_start
+
+ /* Successful return from the parent */
+ bv %r0(%rp)
+ nop
+
+ /* Something bad happened -- no child created */
+.Lerror:
+ b __syscall_error
+ nop
+
+thread_start:
+ /* Load up the arguments. */
+ ldw -60(%sp),%arg0
+ ldwm -64(%sp),%r22
+
+ /* Call the user's function */
+ bl $$dyncall,%r31
+ copy %r31,%rp
+
+ bl _exit,%rp
+ copy %ret0,%arg0
+
+ /* Die horribly. */
+ iitlbp %r0,(%r0)
+
+PSEUDO_END(__clone)
+
+weak_alias(__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d9665cddcc379d0dd2deadbf82375baed08f0f3
commit 2d9665cddcc379d0dd2deadbf82375baed08f0f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:10 2000 +0000
Linux/HPPA specific brk implementation.
diff --git a/sysdeps/unix/sysv/linux/hppa/brk.c b/sysdeps/unix/sysv/linux/hppa/brk.c
new file mode 100644
index 0000000..9ed6c4f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/brk.c
@@ -0,0 +1,47 @@
+/* brk system call for Linux/i386.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* This must be initialized data because commons can't have aliases. */
+void *__curbrk = 0;
+
+/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
+ to work around different old braindamage in the old Linux ELF dynamic
+ linker. */
+weak_alias (__curbrk, ___brk_addr)
+
+int
+__brk (void *addr)
+{
+ void *newbrk, *scratch;
+
+ __curbrk = newbrk = INLINE_SYSCALL(brk, 1, addr);
+
+ if (newbrk < addr)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d9ee983177f45c0a7e316b9c1170b54e3ed114f
commit 6d9ee983177f45c0a7e316b9c1170b54e3ed114f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:26:01 2000 +0000
Linux/HPPA specific Versions.
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
new file mode 100644
index 0000000..475fbe1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.2 {
+ # New rlimit interface
+ getrlimit; setrlimit; getrlimit64; setrlimit64;
+ }
+}
\ No newline at end of file
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8829d504f61bf736244a1c455b14dbf8961cdec
commit b8829d504f61bf736244a1c455b14dbf8961cdec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:25:52 2000 +0000
Linux/HPPA specific Makefile.
diff --git a/sysdeps/unix/sysv/linux/hppa/Makefile b/sysdeps/unix/sysv/linux/hppa/Makefile
new file mode 100644
index 0000000..1c93ec5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/Makefile
@@ -0,0 +1,2 @@
+# linux/hppa does not use -lmilli anymore
+gnulib := -lgcc
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06fbf18c58ac2a4cb908928fe377e884cb599900
commit 06fbf18c58ac2a4cb908928fe377e884cb599900
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:25:29 2000 +0000
Additional directories for HPPA1.1 machines.
diff --git a/sysdeps/hppa/hppa1.1/Implies b/sysdeps/hppa/hppa1.1/Implies
new file mode 100644
index 0000000..5f935a2
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/Implies
@@ -0,0 +1,4 @@
+wordsize-32
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-128
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6d53d276edfa59a71808f64439a7d85510ebfc9
commit c6d53d276edfa59a71808f64439a7d85510ebfc9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:25:11 2000 +0000
HP/PA specific setjmp header definitions.
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
new file mode 100644
index 0000000..f72cdb5
--- /dev/null
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -0,0 +1,41 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Define the machine-dependent type `jmp_buf'. HPPA version. */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
+ We use an array of 'double' instead, to make writing the assembler
+ easier, and to ensure proper alignment. Naturally, user code should
+ not depend on either representation. */
+
+#if defined __USE_MISC || defined _ASM
+#define JB_SP (76/4)
+#endif
+
+#ifndef _ASM
+typedef double __jmp_buf[21];
+#endif
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4f4ba75e9541cdacc024a13f9528011f13bb07e
commit a4f4ba75e9541cdacc024a13f9528011f13bb07e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:24:53 2000 +0000
HP/PA specific memusage definitions.
diff --git a/sysdeps/hppa/memusage.h b/sysdeps/hppa/memusage.h
new file mode 100644
index 0000000..5a06b7b
--- /dev/null
+++ b/sysdeps/hppa/memusage.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("%r30"); stack_ptr; })
+#define STACK_GROWS_UPWARD 1
+
+#include <sysdeps/generic/memusage.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0edd90f64519cdfe568cd3121469f3937cff9444
commit 0edd90f64519cdfe568cd3121469f3937cff9444
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:24:40 2000 +0000
HP/PA specific setjmp implementation.
diff --git a/sysdeps/hppa/setjmp.S b/sysdeps/hppa/setjmp.S
new file mode 100644
index 0000000..0890975
--- /dev/null
+++ b/sysdeps/hppa/setjmp.S
@@ -0,0 +1,69 @@
+/* setjmp for HPPA.
+ Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
+
+
+ .text
+ .align 4
+ .import __sigjmp_save, code
+ .globl __sigsetjmp
+ .export __sigsetjmp, code
+ .proc
+ .callinfo
+__sigsetjmp:
+ stw %r3, 0(%r26)
+ stw %r4, 8(%r26)
+ stw %r5, 12(%r26)
+ stw %r6, 16(%r26)
+ stw %r7, 20(%r26)
+ stw %r8, 24(%r26)
+ stw %r9, 28(%r26)
+ stw %r10, 32(%r26)
+ stw %r11, 36(%r26)
+ stw %r12, 40(%r26)
+ stw %r13, 44(%r26)
+ stw %r14, 48(%r26)
+ stw %r15, 52(%r26)
+ stw %r16, 56(%r26)
+ stw %r17, 60(%r26)
+ stw %r18, 64(%r26)
+ stw %r19, 68(%r26)
+ stw %r27, 72(%r26)
+ stw %r30, 76(%r26)
+
+ stw %rp, 80(%r26)
+
+ ldo 88(%r26),%r19
+ fstds,ma %fr12, 8(%r19) /* 88 */
+ fstds,ma %fr13, 8(%r19) /* 96 */
+ fstds,ma %fr14, 8(%r19) /* 104 */
+ fstds,ma %fr15, 8(%r19) /* 112 */
+ fstds,ma %fr16, 8(%r19) /* 120 */
+ fstds,ma %fr17, 8(%r19) /* 128 */
+ fstds,ma %fr18, 8(%r19) /* 136 */
+ fstds,ma %fr19, 8(%r19) /* 144 */
+ fstds,ma %fr20, 8(%r19) /* 152 */
+ fstds %fr21, 0(%r19) /* 160 */
+ b __sigjmp_save
+ nop
+ .procend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ca92d75ff2e082d746051583398453d08d6e28a
commit 1ca92d75ff2e082d746051583398453d08d6e28a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:24:14 2000 +0000
Add support for ASM_LINE_SEP.
diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h
index 735882d..2ac9840 100644
--- a/sysdeps/hppa/sysdep.h
+++ b/sysdeps/hppa/sysdep.h
@@ -20,6 +20,11 @@
#include <sysdeps/generic/sysdep.h>
#include <sys/syscall.h>
+#include "config.h"
+
+#ifndef ASM_LINE_SEP
+#define ASM_LINE_SEP ;
+#endif
#ifdef __ASSEMBLER__
@@ -34,13 +39,12 @@
incomplete stabs information. Fake some entries here which specify
the current source file. */
#define ENTRY(name) \
- .SPACE $TEXT$; \
- .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \
- .align ALIGNARG(4); \
- .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \
- .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR; \
+ .SPACE $TEXT$ ASM_LINE_SEP \
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \
+ .align ALIGNARG(4) ASM_LINE_SEP \
+ .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY ASM_LINE_SEP \
+ .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR ASM_LINE_SEP\
C_LABEL(name) \
-
CALL_MCOUNT
#undef END
@@ -53,7 +57,7 @@
/* The mcount code relies on a normal frame pointer being on the stack
to locate our caller, so push one just for its benefit. */
#define CALL_MCOUNT \
- XXX
+ XXX ASM_LINE_SEP
#else
#define CALL_MCOUNT /* Do nothing. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=acc97172a1324c1d407b91b3ad3ee8977551e743
commit acc97172a1324c1d407b91b3ad3ee8977551e743
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:22:34 2000 +0000
Don't use %r19 (linkage table pointer).
diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s
index 0fdcb3c..5b3e048 100644
--- a/sysdeps/hppa/hppa1.1/addmul_1.s
+++ b/sysdeps/hppa/hppa1.1/addmul_1.s
@@ -1,71 +1,72 @@
-; HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and
-; add the result to a second limb vector.
+;! HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and
+;! add the result to a second limb vector.
-; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr r26
-; s1_ptr r25
-; size r24
-; s2_limb r23
+;! INPUT PARAMETERS
+;! res_ptr r26
+;! s1_ptr r25
+;! size r24
+;! s2_limb r23
-; This runs at 11 cycles/limb on a PA7000. With the used instructions, it
-; can not become faster due to data cache contention after a store. On the
-; PA7100 it runs at 10 cycles/limb, and that can not be improved either,
-; since only the xmpyu does not need the integer pipeline, so the only
-; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
-; on the PA7100.
+;! This runs at 11 cycles/limb on a PA7000. With the used instructions, it
+;! can not become faster due to data cache contention after a store. On the
+;! PA7100 it runs at 10 cycles/limb, and that can not be improved either,
+;! since only the xmpyu does not need the integer pipeline, so the only
+;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
+;! on the PA7100.
-; There are some ideas described in mul_1.s that applies to this code too.
+;! There are some ideas described in mul_1.s that applies to this code too.
- .code
+ .text
.export __mpn_addmul_1
-__mpn_addmul_1
+__mpn_addmul_1:
.proc
.callinfo frame=64,no_calls
.entry
ldo 64(%r30),%r30
fldws,ma 4(%r25),%fr5
- stw %r23,-16(%r30) ; move s2_limb ...
+ stw %r23,-16(%r30) ;! move s2_limb ...
addib,= -1,%r24,L$just_one_limb
- fldws -16(%r30),%fr4 ; ... into fr4
- add %r0,%r0,%r0 ; clear carry
+ fldws -16(%r30),%fr4 ;! ... into fr4
+ add %r0,%r0,%r0 ;! clear carry
xmpyu %fr4,%fr5,%fr6
fldws,ma 4(%r25),%fr7
fstds %fr6,-16(%r30)
xmpyu %fr4,%fr7,%fr8
- ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -12(%r30),%r20 ;! least significant limb in product
ldw -16(%r30),%r28
fstds %fr8,-16(%r30)
addib,= -1,%r24,L$end
ldw -12(%r30),%r1
-; Main loop
-L$loop ldws 0(%r26),%r29
+;! Main loop
+L$loop:
+ ldws 0(%r26),%r29
fldws,ma 4(%r25),%fr5
- add %r29,%r19,%r19
- stws,ma %r19,4(%r26)
- addc %r28,%r1,%r19
+ add %r29,%r20,%r20
+ stws,ma %r20,4(%r26)
+ addc %r28,%r1,%r20
xmpyu %fr4,%fr5,%fr6
ldw -16(%r30),%r28
fstds %fr6,-16(%r30)
@@ -73,27 +74,28 @@ L$loop ldws 0(%r26),%r29
addib,<> -1,%r24,L$loop
ldw -12(%r30),%r1
-L$end ldw 0(%r26),%r29
- add %r29,%r19,%r19
- stws,ma %r19,4(%r26)
- addc %r28,%r1,%r19
+L$end:
+ ldw 0(%r26),%r29
+ add %r29,%r20,%r20
+ stws,ma %r20,4(%r26)
+ addc %r28,%r1,%r20
ldw -16(%r30),%r28
ldws 0(%r26),%r29
addc %r0,%r28,%r28
- add %r29,%r19,%r19
- stws,ma %r19,4(%r26)
+ add %r29,%r20,%r20
+ stws,ma %r20,4(%r26)
addc %r0,%r28,%r28
bv 0(%r2)
- ldo -64(%r30),%r30
+ ldo -64(%r30),%r30
-L$just_one_limb
+L$just_one_limb:
xmpyu %fr4,%fr5,%fr6
ldw 0(%r26),%r29
fstds %fr6,-16(%r30)
ldw -12(%r30),%r1
ldw -16(%r30),%r28
- add %r29,%r1,%r19
- stw %r19,0(%r26)
+ add %r29,%r1,%r20
+ stw %r20,0(%r26)
addc %r0,%r28,%r28
bv 0(%r2)
ldo -64(%r30),%r30
diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s
index cdd0c1d..7f53916 100644
--- a/sysdeps/hppa/hppa1.1/mul_1.s
+++ b/sysdeps/hppa/hppa1.1/mul_1.s
@@ -1,92 +1,94 @@
-; HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store
-; the result in a second limb vector.
+;! HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store
+;! the result in a second limb vector.
-; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr r26
-; s1_ptr r25
-; size r24
-; s2_limb r23
+;! INPUT PARAMETERS
+;! res_ptr r26
+;! s1_ptr r25
+;! size r24
+;! s2_limb r23
-; This runs at 9 cycles/limb on a PA7000. With the used instructions, it can
-; not become faster due to data cache contention after a store. On the
-; PA7100 it runs at 7 cycles/limb, and that can not be improved either, since
-; only the xmpyu does not need the integer pipeline, so the only dual-issue
-; we will get are addc+xmpyu. Unrolling would not help either CPU.
+;! This runs at 9 cycles/limb on a PA7000. With the used instructions, it can
+;! not become faster due to data cache contention after a store. On the
+;! PA7100 it runs at 7 cycles/limb, and that can not be improved either, since
+;! only the xmpyu does not need the integer pipeline, so the only dual-issue
+;! we will get are addc+xmpyu. Unrolling would not help either CPU.
-; We could use fldds to read two limbs at a time from the S1 array, and that
-; could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and
-; PA7100, respectively. We don't do that since it does not seem worth the
-; (alignment) troubles...
+;! We could use fldds to read two limbs at a time from the S1 array, and that
+;! could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and
+;! PA7100, respectively. We don't do that since it does not seem worth the
+;! (alignment) troubles...
-; At least the PA7100 is rumored to be able to deal with cache-misses
-; without stalling instruction issue. If this is true, and the cache is
-; actually also lockup-free, we should use a deeper software pipeline, and
-; load from S1 very early! (The loads and stores to -12(sp) will surely be
-; in the cache.)
+;! At least the PA7100 is rumored to be able to deal with cache-misses
+;! without stalling instruction issue. If this is true, and the cache is
+;! actually also lockup-free, we should use a deeper software pipeline, and
+;! load from S1 very early; (The loads and stores to -12(sp) will surely be
+;! in the cache.)
- .code
+ .text
.export __mpn_mul_1
-__mpn_mul_1
+__mpn_mul_1:
.proc
.callinfo frame=64,no_calls
.entry
ldo 64(%r30),%r30
fldws,ma 4(%r25),%fr5
- stw %r23,-16(%r30) ; move s2_limb ...
+ stw %r23,-16(%r30) ;! move s2_limb ...
addib,= -1,%r24,L$just_one_limb
- fldws -16(%r30),%fr4 ; ... into fr4
- add %r0,%r0,%r0 ; clear carry
+ fldws -16(%r30),%fr4 ;! ... into fr4
+ add %r0,%r0,%r0 ;! clear carry
xmpyu %fr4,%fr5,%fr6
fldws,ma 4(%r25),%fr7
fstds %fr6,-16(%r30)
xmpyu %fr4,%fr7,%fr8
- ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -12(%r30),%r20 ;! least significant limb in product
ldw -16(%r30),%r28
fstds %fr8,-16(%r30)
addib,= -1,%r24,L$end
ldw -12(%r30),%r1
-; Main loop
-L$loop fldws,ma 4(%r25),%fr5
- stws,ma %r19,4(%r26)
- addc %r28,%r1,%r19
+;! Main loop
+L$loop:
+ fldws,ma 4(%r25),%fr5
+ stws,ma %r20,4(%r26)
+ addc %r28,%r1,%r20
xmpyu %fr4,%fr5,%fr6
ldw -16(%r30),%r28
fstds %fr6,-16(%r30)
addib,<> -1,%r24,L$loop
ldw -12(%r30),%r1
-L$end stws,ma %r19,4(%r26)
- addc %r28,%r1,%r19
+L$end:
+ stws,ma %r20,4(%r26)
+ addc %r28,%r1,%r20
ldw -16(%r30),%r28
- stws,ma %r19,4(%r26)
+ stws,ma %r20,4(%r26)
addc %r0,%r28,%r28
bv 0(%r2)
ldo -64(%r30),%r30
-L$just_one_limb
+L$just_one_limb:
xmpyu %fr4,%fr5,%fr6
fstds %fr6,-16(%r30)
ldw -16(%r30),%r28
diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s
index a4a3854..f2c19c7 100644
--- a/sysdeps/hppa/hppa1.1/submul_1.s
+++ b/sysdeps/hppa/hppa1.1/submul_1.s
@@ -1,77 +1,78 @@
-; HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and
-; subtract the result from a second limb vector.
+;! HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and
+;! subtract the result from a second limb vector.
-; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr r26
-; s1_ptr r25
-; size r24
-; s2_limb r23
+;! INPUT PARAMETERS
+;! res_ptr r26
+;! s1_ptr r25
+;! size r24
+;! s2_limb r23
-; This runs at 12 cycles/limb on a PA7000. With the used instructions, it
-; can not become faster due to data cache contention after a store. On the
-; PA7100 it runs at 11 cycles/limb, and that can not be improved either,
-; since only the xmpyu does not need the integer pipeline, so the only
-; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
-; on the PA7100.
+;! This runs at 12 cycles/limb on a PA7000. With the used instructions, it
+;! can not become faster due to data cache contention after a store. On the
+;! PA7100 it runs at 11 cycles/limb, and that can not be improved either,
+;! since only the xmpyu does not need the integer pipeline, so the only
+;! dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
+;! on the PA7100.
-; There are some ideas described in mul_1.s that applies to this code too.
+;! There are some ideas described in mul_1.s that applies to this code too.
-; It seems possible to make this run as fast as __mpn_addmul_1, if we use
-; sub,>>= %r29,%r19,%r22
-; addi 1,%r28,%r28
-; but that requires reworking the hairy software pipeline...
+;! It seems possible to make this run as fast as __mpn_addmul_1, if we use
+;! sub,>>= %r29,%r20,%r22
+;! addi 1,%r28,%r28
+;! but that requires reworking the hairy software pipeline...
- .code
+ .text
.export __mpn_submul_1
-__mpn_submul_1
+__mpn_submul_1:
.proc
.callinfo frame=64,no_calls
.entry
ldo 64(%r30),%r30
fldws,ma 4(%r25),%fr5
- stw %r23,-16(%r30) ; move s2_limb ...
+ stw %r23,-16(%r30) ;! move s2_limb ...
addib,= -1,%r24,L$just_one_limb
- fldws -16(%r30),%fr4 ; ... into fr4
- add %r0,%r0,%r0 ; clear carry
+ fldws -16(%r30),%fr4 ;! ... into fr4
+ add %r0,%r0,%r0 ;! clear carry
xmpyu %fr4,%fr5,%fr6
fldws,ma 4(%r25),%fr7
fstds %fr6,-16(%r30)
xmpyu %fr4,%fr7,%fr8
- ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -12(%r30),%r20 ;! least significant limb in product
ldw -16(%r30),%r28
fstds %fr8,-16(%r30)
addib,= -1,%r24,L$end
ldw -12(%r30),%r1
-; Main loop
-L$loop ldws 0(%r26),%r29
+;! Main loop
+L$loop:
+ ldws 0(%r26),%r29
fldws,ma 4(%r25),%fr5
- sub %r29,%r19,%r22
- add %r22,%r19,%r0
+ sub %r29,%r20,%r22
+ add %r22,%r20,%r0
stws,ma %r22,4(%r26)
- addc %r28,%r1,%r19
+ addc %r28,%r1,%r20
xmpyu %fr4,%fr5,%fr6
ldw -16(%r30),%r28
fstds %fr6,-16(%r30)
@@ -79,22 +80,23 @@ L$loop ldws 0(%r26),%r29
addib,<> -1,%r24,L$loop
ldw -12(%r30),%r1
-L$end ldw 0(%r26),%r29
- sub %r29,%r19,%r22
- add %r22,%r19,%r0
+L$end:
+ ldw 0(%r26),%r29
+ sub %r29,%r20,%r22
+ add %r22,%r20,%r0
stws,ma %r22,4(%r26)
- addc %r28,%r1,%r19
+ addc %r28,%r1,%r20
ldw -16(%r30),%r28
ldws 0(%r26),%r29
addc %r0,%r28,%r28
- sub %r29,%r19,%r22
- add %r22,%r19,%r0
+ sub %r29,%r20,%r22
+ add %r22,%r20,%r0
stws,ma %r22,4(%r26)
addc %r0,%r28,%r28
bv 0(%r2)
ldo -64(%r30),%r30
-L$just_one_limb
+L$just_one_limb:
xmpyu %fr4,%fr5,%fr6
ldw 0(%r26),%r29
fstds %fr6,-16(%r30)
diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
index bf7dc70..c0a02d8 100644
--- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
+++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
@@ -1,53 +1,55 @@
-; HP-PA __udiv_qrnnd division support, used from longlong.h.
-; This version runs fast on PA 7000 and later.
+;! HP-PA __udiv_qrnnd division support, used from longlong.h.
+;! This version runs fast on PA 7000 and later.
-; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; rem_ptr gr26
-; n1 gr25
-; n0 gr24
-; d gr23
+;! INPUT PARAMETERS
+;! rem_ptr gr26
+;! n1 gr25
+;! n0 gr24
+;! d gr23
- .code
-L$0000 .word 0x43f00000
+ .text
+L$0000:
+ .word 0x43f00000
.word 0x0
.export __udiv_qrnnd
-__udiv_qrnnd
+__udiv_qrnnd:
.proc
.callinfo frame=64,no_calls
.entry
ldo 64(%r30),%r30
- stws %r25,-16(0,%r30) ; n_hi
- stws %r24,-12(0,%r30) ; n_lo
- ldil L'L$0000,%r19
- ldo R'L$0000(%r19),%r19
+ stws %r25,-16(0,%r30) ;! n_hi
+ stws %r24,-12(0,%r30) ;! n_lo
+ b,l L$0,%r1
+ ldo L$0000-L$0(%r1),%r1
+L$0:
fldds -16(0,%r30),%fr5
stws %r23,-12(0,%r30)
comib,<= 0,%r25,L$1
fcnvxf,dbl,dbl %fr5,%fr5
- fldds 0(0,%r19),%fr4
+ fldds 0(0,%r1),%fr4
fadd,dbl %fr4,%fr5,%fr5
-L$1
+L$1:
fcpy,sgl %fr0,%fr6L
fldws -12(0,%r30),%fr6R
fcnvxf,dbl,dbl %fr6,%fr4
@@ -62,13 +64,14 @@ L$1
ldws -12(0,%r30),%r21
ldws -16(0,%r30),%r20
sub %r24,%r21,%r22
- subb %r25,%r20,%r19
- comib,= 0,%r19,L$2
+ subb %r25,%r20,%r1
+ comib,= 0,%r1,L$2
ldo -64(%r30),%r30
add %r22,%r23,%r22
ldo -1(%r28),%r28
-L$2 bv 0(%r2)
+L$2:
+ bv 0(%r2)
stws %r22,0(0,%r26)
.exit
diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s
index abac6ec..de6dd76 100644
--- a/sysdeps/hppa/lshift.s
+++ b/sysdeps/hppa/lshift.s
@@ -1,34 +1,34 @@
-; HP-PA __mpn_lshift --
+;! HP-PA __mpn_lshift --
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr gr26
-; s_ptr gr25
-; size gr24
-; cnt gr23
+;! INPUT PARAMETERS
+;! res_ptr gr26
+;! s_ptr gr25
+;! size gr24
+;! cnt gr23
- .code
+ .text
.export __mpn_lshift
-__mpn_lshift
+__mpn_lshift:
.proc
.callinfo frame=64,no_calls
.entry
@@ -39,12 +39,12 @@ __mpn_lshift
subi 32,%r23,%r1
mtsar %r1
addib,= -1,%r24,L$0004
- vshd %r0,%r22,%r28 ; compute carry out limb
+ vshd %r0,%r22,%r28 ;! compute carry out limb
ldws,mb -4(0,%r25),%r29
addib,= -1,%r24,L$0002
vshd %r22,%r29,%r20
-L$loop ldws,mb -4(0,%r25),%r22
+L$loop: ldws,mb -4(0,%r25),%r22
stws,mb %r20,-4(0,%r26)
addib,= -1,%r24,L$0003
vshd %r29,%r22,%r20
@@ -53,12 +53,12 @@ L$loop ldws,mb -4(0,%r25),%r22
addib,<> -1,%r24,L$loop
vshd %r22,%r29,%r20
-L$0002 stws,mb %r20,-4(0,%r26)
+L$0002: stws,mb %r20,-4(0,%r26)
vshd %r29,%r0,%r20
bv 0(%r2)
stw %r20,-4(0,%r26)
-L$0003 stws,mb %r20,-4(0,%r26)
-L$0004 vshd %r22,%r0,%r20
+L$0003: stws,mb %r20,-4(0,%r26)
+L$0004: vshd %r22,%r0,%r20
bv 0(%r2)
stw %r20,-4(0,%r26)
diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s
index c1480e5..bba60cf 100644
--- a/sysdeps/hppa/rshift.s
+++ b/sysdeps/hppa/rshift.s
@@ -1,34 +1,34 @@
-; HP-PA __mpn_rshift --
+;! HP-PA __mpn_rshift --
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr gr26
-; s_ptr gr25
-; size gr24
-; cnt gr23
+;! INPUT PARAMETERS
+;! res_ptr gr26
+;! s_ptr gr25
+;! size gr24
+;! cnt gr23
- .code
+ .text
.export __mpn_rshift
-__mpn_rshift
+__mpn_rshift:
.proc
.callinfo frame=64,no_calls
.entry
@@ -36,12 +36,12 @@ __mpn_rshift
ldws,ma 4(0,%r25),%r22
mtsar %r23
addib,= -1,%r24,L$0004
- vshd %r22,%r0,%r28 ; compute carry out limb
+ vshd %r22,%r0,%r28 ;! compute carry out limb
ldws,ma 4(0,%r25),%r29
addib,= -1,%r24,L$0002
vshd %r29,%r22,%r20
-L$loop ldws,ma 4(0,%r25),%r22
+L$loop: ldws,ma 4(0,%r25),%r22
stws,ma %r20,4(0,%r26)
addib,= -1,%r24,L$0003
vshd %r22,%r29,%r20
@@ -50,12 +50,12 @@ L$loop ldws,ma 4(0,%r25),%r22
addib,<> -1,%r24,L$loop
vshd %r29,%r22,%r20
-L$0002 stws,ma %r20,4(0,%r26)
+L$0002: stws,ma %r20,4(0,%r26)
vshd %r0,%r29,%r20
bv 0(%r2)
stw %r20,0(0,%r26)
-L$0003 stws,ma %r20,4(0,%r26)
-L$0004 vshd %r0,%r22,%r20
+L$0003: stws,ma %r20,4(0,%r26)
+L$0004: vshd %r0,%r22,%r20
bv 0(%r2)
stw %r20,0(0,%r26)
diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s
index 04fa3e1..b50bb11 100644
--- a/sysdeps/hppa/sub_n.s
+++ b/sysdeps/hppa/sub_n.s
@@ -1,56 +1,56 @@
-; HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
-; store difference in a third limb vector.
+;! HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+;! store difference in a third limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr gr26
-; s1_ptr gr25
-; s2_ptr gr24
-; size gr23
+;! INPUT PARAMETERS
+;! res_ptr gr26
+;! s1_ptr gr25
+;! s2_ptr gr24
+;! size gr23
-; One might want to unroll this as for other processors, but it turns
-; out that the data cache contention after a store makes such
-; unrolling useless. We can't come under 5 cycles/limb anyway.
+;! One might want to unroll this as for other processors, but it turns
+;! out that the data cache contention after a store makes such
+;! unrolling useless. We can't come under 5 cycles/limb anyway.
- .code
+ .text
.export __mpn_sub_n
-__mpn_sub_n
+__mpn_sub_n:
.proc
.callinfo frame=0,no_calls
.entry
- ldws,ma 4(0,%r25),%r20
- ldws,ma 4(0,%r24),%r19
+ ldws,ma 4(0,%r25),%r21
+ ldws,ma 4(0,%r24),%r20
- addib,= -1,%r23,L$end ; check for (SIZE == 1)
- sub %r20,%r19,%r28 ; subtract first limbs ignoring cy
+ addib,= -1,%r23,L$end ;! check for (SIZE == 1)
+ sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy
-L$loop ldws,ma 4(0,%r25),%r20
- ldws,ma 4(0,%r24),%r19
+L$loop: ldws,ma 4(0,%r25),%r21
+ ldws,ma 4(0,%r24),%r20
stws,ma %r28,4(0,%r26)
addib,<> -1,%r23,L$loop
- subb %r20,%r19,%r28
+ subb %r21,%r20,%r28
-L$end stws %r28,0(0,%r26)
+L$end: stws %r28,0(0,%r26)
addc %r0,%r0,%r28
bv 0(%r2)
subi 1,%r28,%r28
diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s
index 9b45eb4..0532057 100644
--- a/sysdeps/hppa/udiv_qrnnd.s
+++ b/sysdeps/hppa/udiv_qrnnd.s
@@ -1,45 +1,45 @@
-; HP-PA __udiv_qrnnd division support, used from longlong.h.
-; This version runs fast on pre-PA7000 CPUs.
+;! HP-PA __udiv_qrnnd division support, used from longlong.h.
+;! This version runs fast on pre-PA7000 CPUs.
-; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; rem_ptr gr26
-; n1 gr25
-; n0 gr24
-; d gr23
+;! INPUT PARAMETERS
+;! rem_ptr gr26
+;! n1 gr25
+;! n0 gr24
+;! d gr23
-; The code size is a bit excessive. We could merge the last two ds;addc
-; sequences by simply moving the "bb,< Odd" instruction down. The only
-; trouble is the FFFFFFFF code that would need some hacking.
+;! The code size is a bit excessive. We could merge the last two ds;addc
+;! sequences by simply moving the "bb,< Odd" instruction down. The only
+;! trouble is the FFFFFFFF code that would need some hacking.
- .code
+ .text
.export __udiv_qrnnd
-__udiv_qrnnd
+__udiv_qrnnd:
.proc
.callinfo frame=0,no_calls
.entry
comb,< %r23,0,L$largedivisor
- sub %r0,%r23,%r1 ; clear cy as side-effect
+ sub %r0,%r23,%r1 ;! clear cy as side-effect
ds %r0,%r1,%r0
addc %r24,%r24,%r24
ds %r25,%r23,%r25
@@ -111,12 +111,12 @@ __udiv_qrnnd
bv 0(%r2)
addc %r28,%r28,%r28
-L$largedivisor
- extru %r24,31,1,%r19 ; r19 = n0 & 1
+L$largedivisor:
+ extru %r24,31,1,%r20 ;! r20 = n0 & 1
bb,< %r23,31,L$odd
- extru %r23,30,31,%r22 ; r22 = d >> 1
- shd %r25,%r24,1,%r24 ; r24 = new n0
- extru %r25,30,31,%r25 ; r25 = new n1
+ extru %r23,30,31,%r22 ;! r22 = d >> 1
+ shd %r25,%r24,1,%r24 ;! r24 = new n0
+ extru %r25,30,31,%r25 ;! r25 = new n1
sub %r0,%r22,%r21
ds %r0,%r21,%r0
addc %r24,%r24,%r24
@@ -185,14 +185,14 @@ L$largedivisor
ds %r25,%r22,%r25
comclr,>= %r25,%r0,%r0
addl %r25,%r22,%r25
- sh1addl %r25,%r19,%r25
+ sh1addl %r25,%r20,%r25
stws %r25,0(0,%r26)
bv 0(%r2)
addc %r24,%r24,%r28
-L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1)
- shd %r25,%r24,1,%r24 ; r24 = new n0
- extru %r25,30,31,%r25 ; r25 = new n1
+L$odd: addib,sv,n 1,%r22,L$FF.. ;! r22 = (d / 2 + 1)
+ shd %r25,%r24,1,%r24 ;! r24 = new n0
+ extru %r25,30,31,%r25 ;! r25 = new n1
sub %r0,%r22,%r21
ds %r0,%r21,%r0
addc %r24,%r24,%r24
@@ -262,8 +262,8 @@ L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1)
addc %r24,%r24,%r28
comclr,>= %r25,%r0,%r0
addl %r25,%r22,%r25
- sh1addl %r25,%r19,%r25
-; We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25
+ sh1addl %r25,%r20,%r25
+;! We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25
add,nuv %r28,%r25,%r25
addl %r25,%r1,%r25
addc %r0,%r28,%r28
@@ -273,9 +273,9 @@ L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1)
bv 0(%r2)
addc %r0,%r28,%r28
-; This is just a special case of the code above.
-; We come here when d == 0xFFFFFFFF
-L$FF.. add,uv %r25,%r24,%r24
+;! This is just a special case of the code above.
+;! We come here when d == 0xFFFFFFFF
+L$FF..: add,uv %r25,%r24,%r24
sub,<< %r24,%r23,%r0
ldo 1(%r24),%r24
stws %r24,0(0,%r26)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=257c3b5223b77543fc21a3366171cb5cb51f9b5b
commit 257c3b5223b77543fc21a3366171cb5cb51f9b5b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:21:39 2000 +0000
HP/PA specific call frame definition.
diff --git a/sysdeps/hppa/frame.h b/sysdeps/hppa/frame.h
new file mode 100644
index 0000000..e6764da
--- /dev/null
+++ b/sysdeps/hppa/frame.h
@@ -0,0 +1,28 @@
+/* Definition of stack frame structure. HPPA version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* PA stacks grow upwards. */
+#define INNER_THAN >
+
+/* FIXME: will verify this later */
+struct layout
+{
+ void *next;
+ void *return_address;
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00186dff491ebd73ff517d0395fc9774dc267177
commit 00186dff491ebd73ff517d0395fc9774dc267177
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:21:04 2000 +0000
HP/PA specific handling of symbol references.
diff --git a/sysdeps/hppa/dl-symaddr.c b/sysdeps/hppa/dl-symaddr.c
new file mode 100644
index 0000000..038404a
--- /dev/null
+++ b/sysdeps/hppa/dl-symaddr.c
@@ -0,0 +1,39 @@
+/* Get the symbol address. HPPA version.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <ldsodefs.h>
+#include <dl-machine.h>
+
+void *
+_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref)
+{
+ Elf32_Addr value = (map ? map->l_addr : 0) + ref->st_value;
+
+ /* On hppa, we have to return the pointer to function descriptor. */
+ if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC)
+ return (void *) __hppa_make_fptr (map, value, &__fptr_root, NULL);
+ else
+ return (void *) value;
+}
+
+ElfW(Addr)
+_dl_start_address (const struct link_map *map, ElfW(Addr) start)
+{
+ return __hppa_make_fptr (map, start, &__fptr_root, NULL);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3eb9e70628f283b3987db708d244d01f81106131
commit 3eb9e70628f283b3987db708d244d01f81106131
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:20:01 2000 +0000
HP/PA specific dynamic linker internals.
diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h
new file mode 100644
index 0000000..e6782b3
--- /dev/null
+++ b/sysdeps/hppa/dl-machine.h
@@ -0,0 +1,605 @@
+/* Machine-dependent ELF dynamic relocation inline functions. PA-RISC version.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+ Contributed by David Huggins-Daines <dhd@debian.org>
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h 1
+
+#define ELF_MACHINE_NAME "hppa"
+
+#include <sys/param.h>
+#include <string.h>
+#include <link.h>
+#include <assert.h>
+
+/* These must match the definition of the stub in bfd/elf32-hppa.c. */
+#define SIZEOF_PLT_STUB (4*4)
+#define GOT_FROM_PLT_STUB (4*4)
+
+/* A PLABEL is a function descriptor. Properly they consist of just
+ FUNC and GP. But we want to traverse a binary tree too. See
+ dl-fptr.c for the code (it may be made common between HPPA and
+ IA-64 in the future).
+
+ We call these 'fptr' to make it easier to steal code from IA-64. */
+
+/* ld.so currently has 12 PLABEL32 relocs. We'll keep this constant
+ large for now in case we require more, as the rest of these will be
+ used by the dynamic program itself (libc.so has quite a few
+ PLABEL32 relocs in it). */
+#define HPPA_BOOT_FPTR_SIZE 256
+
+struct hppa_fptr
+{
+ Elf32_Addr func;
+ Elf32_Addr gp;
+ struct hppa_fptr *next;
+};
+
+extern struct hppa_fptr __boot_ldso_fptr[];
+extern struct hppa_fptr *__fptr_root;
+extern int __fptr_count;
+
+extern Elf32_Addr __hppa_make_fptr (const struct link_map *, Elf32_Addr,
+ struct hppa_fptr **, struct hppa_fptr *);
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int
+elf_machine_matches_host (Elf32_Half e_machine)
+{
+ return e_machine == EM_PARISC;
+}
+
+
+/* Return the link-time address of _DYNAMIC. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
+{
+ Elf32_Addr dynamic;
+
+#if 0
+ /* Use this method if GOT address not yet set up. */
+ asm ("\
+ b,l 1f,%0
+ depi 0,31,2,%0
+1: addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 8),%0
+ ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 12)(%%r1),%0"
+ : "=r" (dynamic) : : "r1");
+#else
+ /* This works because we already have our GOT address available. */
+ dynamic = (Elf32_Addr) &_DYNAMIC;
+#endif
+
+ return dynamic;
+}
+
+/* Return the run-time load address of the shared object. */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+ Elf32_Addr dynamic, dynamic_linkaddress;
+
+ asm ("\
+ b,l 1f,%0
+ depi 0,31,2,%0
+1: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%0
+ ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%%r1),%1
+ addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%0
+ ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%%r1),%0"
+ : "=r" (dynamic_linkaddress), "=r" (dynamic) : : "r1");
+
+ return dynamic - dynamic_linkaddress;
+}
+
+/* Fixup a PLT entry to bounce directly to the function at VALUE. */
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ /* l is the link_map for the caller, t is the link_map for the object
+ * being called */
+ reloc_addr[1] = D_PTR (t, l_info[DT_PLTGOT]);
+ reloc_addr[0] = value;
+ /* Return the PLT slot rather than the function value so that the
+ trampoline can load the new LTP. */
+ return (Elf32_Addr) reloc_addr;
+}
+
+/* Return the final value of a plt relocation. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr value)
+{
+ /* We are rela only */
+ return value + reloc->r_addend;
+}
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ extern void _dl_runtime_resolve (void);
+ extern void _dl_runtime_profile (void);
+ Elf32_Addr jmprel = D_PTR(l, l_info[DT_JMPREL]);
+
+ if (lazy && jmprel)
+ {
+ Elf32_Addr *got = NULL;
+ Elf32_Addr l_addr;
+ Elf32_Addr end_jmprel;
+ Elf32_Addr iplt;
+
+ /* Relocate all the PLT slots. */
+ l_addr = l->l_addr;
+ end_jmprel = jmprel + l->l_info[DT_PLTRELSZ]->d_un.d_val;
+ for (iplt = jmprel; iplt < end_jmprel; iplt += sizeof (Elf32_Rela))
+ {
+ const Elf32_Rela *reloc;
+ Elf32_Word r_type;
+ Elf32_Word r_sym;
+ struct hppa_fptr *fptr;
+
+ reloc = (const Elf32_Rela *) iplt;
+ r_type = ELF32_R_TYPE (reloc->r_info);
+ r_sym = ELF32_R_SYM (reloc->r_info);
+
+ if (__builtin_expect (r_type == R_PARISC_IPLT, 1))
+ {
+ fptr = (struct hppa_fptr *) (reloc->r_offset + l_addr);
+ if (r_sym != 0)
+ {
+ /* Relocate the pointer to the stub. */
+ fptr->func += l_addr;
+ /* Instead of the LTP value, we put the reloc offset
+ here. The trampoline code will load the proper
+ LTP and pass the reloc offset to the fixup
+ function. */
+ fptr->gp = iplt - jmprel;
+ if (!got)
+ {
+ static union {
+ unsigned char c[8];
+ Elf32_Addr i[2];
+ } sig = {{0x00,0xc0,0xff,0xee, 0xde,0xad,0xbe,0xef}};
+
+ /* Find our .got section. It's right after the
+ stub. */
+ got = (Elf32_Addr *) (fptr->func + GOT_FROM_PLT_STUB);
+
+ /* Sanity check to see if the address we are
+ going to check below is within a reasonable
+ approximation of the bounds of the PLT (or,
+ at least, is at an address that won't fault
+ on read). Then check for the magic signature
+ above. */
+ if (fptr->func < (Elf32_Addr) fptr + sizeof(*fptr))
+ return 0;
+ if (fptr->func >
+ ((Elf32_Addr) fptr
+ + SIZEOF_PLT_STUB
+ + ((l->l_info[DT_PLTRELSZ]->d_un.d_val / sizeof (Elf32_Rela))
+ * 8)))
+ return 0;
+ if (got[-2] != sig.i[0] || got[-1] != sig.i[1])
+ return 0; /* No lazy linking for you! */
+ }
+ }
+ else
+ {
+ /* Relocate this *ABS* entry. */
+ fptr->func = reloc->r_addend + l_addr;
+ fptr->gp = D_PTR (l, l_info[DT_PLTGOT]);
+ }
+ }
+ else if (__builtin_expect (r_type != R_PARISC_NONE, 0))
+ _dl_reloc_bad_type (l, r_type, 1);
+ }
+
+ if (got)
+ {
+ register Elf32_Addr ltp __asm__ ("%r19");
+ /* Identify this shared object. */
+ got[1] = (Elf32_Addr) l;
+
+ /* This function will be called to perform the relocation. */
+ if (__builtin_expect (!profile, 1))
+ got[-2] =
+ (Elf32_Addr) ((struct hppa_fptr *)
+ ((unsigned long) &_dl_runtime_resolve & ~3))->func;
+ else
+ {
+ if (_dl_name_match_p (_dl_profile, l))
+ {
+ /* This is the object we are looking for. Say that
+ we really want profiling and the timers are
+ started. */
+ _dl_profile_map = l;
+ }
+ got[-2] =
+ (Elf32_Addr) ((struct hppa_fptr *)
+ ((unsigned long) &_dl_runtime_profile & ~3))->func;
+ }
+ got[-1] = ltp;
+ }
+ }
+ return lazy;
+}
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ /* The kernel does not give us an initial stack frame. */
+ ldo 64(%sp),%sp
+ /* Save the relevant arguments (yes, those are the correct
+ registers, the kernel is weird) in their stack slots. */
+ stw %r25,-40(%sp) /* argc */
+ stw %r24,-44(%sp) /* argv */
+
+ /* We need the LTP, and we need it now. */
+ /* $PIC_pcrel$0 points 8 bytes past the current instruction,
+ just like a branch reloc. This sequence gets us the runtime
+ address of _DYNAMIC. */
+ bl 0f,%r19
+ depi 0,31,2,%r19 /* clear priviledge bits */
+0: addil L'_DYNAMIC - ($PIC_pcrel$0 - 8),%r19
+ ldo R'_DYNAMIC - ($PIC_pcrel$0 - 12)(%r1),%r26
+
+ /* Also get the link time address from the first entry of the GOT. */
+ addil L'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 16),%r19
+ ldw R'_GLOBAL_OFFSET_TABLE_ - ($PIC_pcrel$0 - 20)(%r1),%r20
+
+ sub %r26,%r20,%r20 /* Calculate load offset */
+
+ /* Rummage through the dynamic entries, looking for DT_PLTGOT. */
+ ldw,ma 8(%r26),%r19
+1: cmpib,=,n 3,%r19,2f /* tag == DT_PLTGOT? */
+ cmpib,<>,n 0,%r19,1b
+ ldw,ma 8(%r26),%r19
+
+ /* Uh oh! We didn't find one. Abort. */
+ iitlbp %r0,(%r0)
+
+2: ldw -4(%r26),%r19 /* Found it, load value. */
+ add %r19,%r20,%r19 /* And add the load offset. */
+
+ /* Our initial stack layout is rather different from everyone
+ else's due to the unique PA-RISC ABI. As far as I know it
+ looks like this:
+
+ ----------------------------------- (this frame created above)
+ | 32 bytes of magic |
+ |---------------------------------|
+ | 32 bytes argument/sp save area |
+ |---------------------------------| ((current->mm->env_end) + 63 & ~63)
+ | N bytes of slack |
+ |---------------------------------|
+ | envvar and arg strings |
+ |---------------------------------|
+ | ELF auxiliary info |
+ | (up to 28 words) |
+ |---------------------------------|
+ | Environment variable pointers |
+ | upwards to NULL |
+ |---------------------------------|
+ | Argument pointers |
+ | upwards to NULL |
+ |---------------------------------|
+ | argc (1 word) |
+ -----------------------------------
+
+ So, obviously, we can't just pass %sp to _dl_start. That's
+ okay, argv-4 will do just fine.
+
+ The pleasant part of this is that if we need to skip
+ arguments we can just decrement argc and move argv, because
+ the stack pointer is utterly unrelated to the location of
+ the environment and argument vectors. */
+
+ /* This is always within range so we'll be okay. */
+ bl _dl_start,%rp
+ ldo -4(%r24),%r26
+
+ /* FALLTHRU */
+ .globl _dl_start_user
+ .type _dl_start_user,@function
+_dl_start_user:
+ /* Save the entry point in %r3. */
+ copy %ret0,%r3
+
+ /* Remember the lowest stack address. */
+ addil LT'__libc_stack_end,%r19
+ ldw RT'__libc_stack_end(%r1),%r20
+ stw %sp,0(%r20)
+
+ /* See if we were called as a command with the executable file
+ name as an extra leading argument. */
+ addil LT'_dl_skip_args,%r19
+ ldw RT'_dl_skip_args(%r1),%r20
+ ldw 0(%r20),%r20
+
+ ldw -40(%sp),%r25 /* argc */
+ comib,= 0,%r20,.Lnofix /* FIXME: will be mispredicted */
+ ldw -44(%sp),%r24 /* argv (delay slot) */
+
+ sub %r25,%r20,%r25
+ stw %r25,-40(%sp)
+ sh2add %r20,%r24,%r24
+ stw %r24,-44(%sp)
+
+.Lnofix:
+ /* Call _dl_init(_dl_loaded, argc, argv, envp). */
+ addil LT'_dl_loaded,%r19
+ ldw RT'_dl_loaded(%r1),%r26
+ ldw 0(%r26),%r26
+ /* envp = argv + argc + 1 */
+ sh2add %r25,%r24,%r23
+ bl _dl_init,%r2
+ ldo 4(%r23),%r23 /* delay slot */
+
+ /* Reload argc, argv to the registers start.S expects them in (feh) */
+ ldw -40(%sp),%r25
+ ldw -44(%sp),%r24
+
+ /* _dl_fini does have a PLT slot now. I don't know how to get
+ to it though, so this hack will remain. */
+ .section .data
+__dl_fini_plabel:
+ .word _dl_fini
+ .word 0xdeadbeef
+ .previous
+
+ addil LT'__dl_fini_plabel,%r19
+ ldw RT'__dl_fini_plabel(%r1),%r23
+ stw %r19,4(%r23)
+ bv %r0(%r3)
+ depi 2,31,2,%r23 /* delay slot */");
+
+/* This code gets called via the .plt stub, and is used in
+ dl-runtime.c to call the `fixup' function and then redirect to the
+ address it returns.
+ Enter with r19 = reloc offset, r20 = got-8, r21 = fixup ltp. */
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
+ extern void tramp_name (void); \
+ asm ( "\
+ /* Trampoline for " #tramp_name " */
+ .globl " #tramp_name "
+ .type " #tramp_name ",@function
+" #tramp_name ":
+ /* Save return pointer */
+ stw %r2,-20(%sp)
+ /* Save argument registers in the call stack frame. */
+ stw %r26,-36(%sp)
+ stw %r25,-40(%sp)
+ stw %r24,-44(%sp)
+ stw %r23,-48(%sp)
+ /* Build a call frame. */
+ stwm %sp,64(%sp)
+
+ /* Set up args to fixup func. */
+ ldw 8+4(%r20),%r26 /* got[1] == struct link_map * */
+ copy %r19,%r25 /* reloc offset */
+
+ /* Call the real address resolver. */
+ bl " #fixup_name ",%r2
+ copy %r21,%r19 /* delay slot, set fixup func ltp */
+
+ ldwm -64(%sp),%sp
+ /* Arguments. */
+ ldw -36(%sp),%r26
+ ldw -40(%sp),%r25
+ ldw -44(%sp),%r24
+ ldw -48(%sp),%r23
+ /* Return pointer. */
+ ldw -20(%sp),%r2
+ /* Call the real function. */
+ ldw 0(%r28),%r22
+ bv %r0(%r22)
+ ldw 4(%r28),%r19
+");
+
+#ifndef PROF
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup);
+#else
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
+ strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
+#endif
+
+
+/* Nonzero iff TYPE describes a relocation that should
+ skip the executable when looking up the symbol value. */
+#define elf_machine_lookup_noexec_p(type) ((type) == R_PARISC_COPY)
+
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_lookup_noplt_p(type) ((type) == R_PARISC_IPLT \
+ || (type) == R_PARISC_EPLT)
+
+/* Used by ld.so for ... something ... */
+#define ELF_MACHINE_JMP_SLOT R_PARISC_IPLT
+
+/* We only use RELA. */
+#define ELF_MACHINE_NO_REL 1
+
+#endif /* !dl_machine_h */
+
+/* These are only actually used where RESOLVE_MAP is defined, anyway. */
+#ifdef RESOLVE_MAP
+
+static inline void
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ Elf32_Addr *const reloc_addr)
+{
+ const Elf32_Sym *const refsym = sym;
+ unsigned long const r_type = ELF32_R_TYPE (reloc->r_info);
+ struct link_map *sym_map;
+ Elf32_Addr value;
+
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a; make the
+ reference weak so static programs can still link. This declaration
+ cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
+ because rtld.c contains the common defn for _dl_rtld_map, which is
+ incompatible with a weak decl in the same file. */
+ weak_extern (_dl_rtld_map);
+#endif
+
+ /* RESOLVE_MAP will return a null value for undefined syms, and
+ non-null for all other syms. In particular, relocs with no
+ symbol (symbol index of zero), also called *ABS* relocs, will be
+ resolved to MAP. (The first entry in a symbol table is all
+ zeros, and an all zero Elf32_Sym has a binding of STB_LOCAL.)
+ See RESOLVE_MAP definition in elf/dl-reloc.c */
+#ifdef RTLD_BOOTSTRAP
+ /* RESOLVE_MAP in rtld.c doesn't have the local sym test. */
+ sym_map = (ELF32_ST_BIND (sym->st_info) != STB_LOCAL
+ ? RESOLVE_MAP (&sym, version, r_type) : map);
+#else
+ sym_map = RESOLVE_MAP (&sym, version, r_type);
+#endif
+ if (sym_map)
+ {
+ value = sym ? sym_map->l_addr + sym->st_value : 0;
+ value += reloc->r_addend;
+ }
+ else
+ value = 0;
+
+ switch (r_type)
+ {
+ case R_PARISC_DIR32:
+#ifndef RTLD_BOOTSTRAP
+ /* All hell breaks loose if we try to relocate these twice,
+ because any initialized variables in ld.so that refer to
+ other ones will have their values reset. In particular,
+ __fptr_next will be reset, sometimes causing endless loops in
+ __hppa_make_fptr(). So don't do that. */
+ if (map == &_dl_rtld_map)
+ return;
+#endif
+ /* Otherwise, nothing more to do here. */
+ break;
+
+ case R_PARISC_PLABEL32:
+ /* Easy rule: If there is a symbol and it is global, then we
+ need to make a dynamic function descriptor. Otherwise we
+ have the address of a PLT slot for a local symbol which we
+ know to be unique. */
+ if (sym == NULL
+ || sym_map == NULL
+ || ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
+ break;
+
+ /* Okay, we need to make ourselves a PLABEL then. See the IA64
+ code for an explanation of how this works. */
+#ifndef RTLD_BOOTSTRAP
+ value = __hppa_make_fptr (sym_map, value, &__fptr_root, NULL);
+#else
+ {
+ struct hppa_fptr *p_boot_ldso_fptr;
+ struct hppa_fptr **p_fptr_root;
+ int *p_fptr_count;
+ unsigned long dot;
+
+ /* Go from the top of __boot_ldso_fptr. As on IA64, we
+ probably haven't relocated the necessary values by this
+ point so we have to find them ourselves. */
+
+ asm ("bl 0f,%0
+ depi 0,31,2,%0
+0: addil L'__boot_ldso_fptr - ($PIC_pcrel$0 - 8),%0
+ ldo R'__boot_ldso_fptr - ($PIC_pcrel$0 - 12)(%%r1),%1
+ addil L'__fptr_root - ($PIC_pcrel$0 - 16),%0
+ ldo R'__fptr_root - ($PIC_pcrel$0 - 20)(%%r1),%2
+ addil L'__fptr_count - ($PIC_pcrel$0 - 24),%0
+ ldo R'__fptr_count - ($PIC_pcrel$0 - 28)(%%r1),%3"
+ :
+ "=r" (dot),
+ "=r" (p_boot_ldso_fptr),
+ "=r" (p_fptr_root),
+ "=r" (p_fptr_count));
+
+ value = __hppa_make_fptr (sym_map, value, p_fptr_root,
+ &p_boot_ldso_fptr[--*p_fptr_count]);
+ }
+#endif
+ break;
+
+ case R_PARISC_IPLT:
+ if (__builtin_expect (sym_map != NULL, 1))
+ elf_machine_fixup_plt (NULL, sym_map, reloc, reloc_addr, value);
+ else
+ {
+ /* If we get here, it's a (weak) undefined sym. */
+ elf_machine_fixup_plt (NULL, map, reloc, reloc_addr, value);
+ }
+ return;
+
+ case R_PARISC_COPY:
+ if (__builtin_expect (sym == NULL, 0))
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (__builtin_expect (sym->st_size > refsym->st_size, 0)
+ || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+ && __builtin_expect (_dl_verbose, 0)))
+ {
+ const char *strtab;
+
+ strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
+ _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
+ ": Symbol `", strtab + refsym->st_name,
+ "' has different size in shared object, "
+ "consider re-linking\n", NULL);
+ }
+ memcpy (reloc_addr, (void *) value,
+ MIN (sym->st_size, refsym->st_size));
+ return;
+
+ case R_PARISC_NONE: /* Alright, Wilbur. */
+ return;
+
+ default:
+ _dl_reloc_bad_type (map, r_type, 0);
+ }
+
+ *reloc_addr = value;
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map,
+ Elf32_Addr l_addr, const Elf32_Rela *reloc)
+{
+ /* We don't have anything to do here. elf_machine_runtime_setup has
+ done all the relocs already. */
+}
+
+#endif /* RESOLVE_MAP */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f8cfde3afb6fdcbd42befe6bc18a0bc8f433f87
commit 6f8cfde3afb6fdcbd42befe6bc18a0bc8f433f87
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:19:45 2000 +0000
HP/PA specific lookup configuration.
diff --git a/sysdeps/hppa/dl-lookupcfg.h b/sysdeps/hppa/dl-lookupcfg.h
new file mode 100644
index 0000000..4f5f899
--- /dev/null
+++ b/sysdeps/hppa/dl-lookupcfg.h
@@ -0,0 +1,36 @@
+/* Configuration of lookup functions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Like IA-64, PA-RISC needs more information from the symbol lookup
+ function than just the address. */
+#define DL_LOOKUP_RETURNS_MAP
+#define ELF_FUNCTION_PTR_IS_SPECIAL
+#define DL_UNMAP_IS_SPECIAL
+
+void *_dl_symbol_address (const struct link_map *map, const ElfW(Sym) *ref);
+
+#define DL_SYMBOL_ADDRESS(map, ref) _dl_symbol_address(map, ref)
+
+Elf32_Addr _dl_lookup_address (const void *address);
+
+#define DL_LOOKUP_ADDRESS(addr) _dl_lookup_address (addr)
+
+void _dl_unmap (struct link_map *map);
+
+#define DL_UNMAP(map) _dl_unmap (map)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=256c860a4c05dc290bf9b230ef9f13530429c587
commit 256c860a4c05dc290bf9b230ef9f13530429c587
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:18:05 2000 +0000
HP/PA specific function pointer handling for ld.so.
diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c
new file mode 100644
index 0000000..8a2c1c2
--- /dev/null
+++ b/sysdeps/hppa/dl-fptr.c
@@ -0,0 +1,212 @@
+/* Make dynamic PLABELs for function pointers. HPPA version.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+#include <string.h>
+#include <sys/param.h>
+#include <sys/mman.h>
+#include <link.h>
+#include <errno.h>
+#include <ldsodefs.h>
+#include <elf/dynamic-link.h>
+#include <dl-machine.h>
+#ifdef _LIBC_REENTRANT
+# include <pt-machine.h>
+
+/* Remember, we use 0 to mean that a lock is taken on PA-RISC. */
+static int __hppa_fptr_lock = 1;
+#endif
+
+/* Because ld.so is now versioned, these functions can be in their own
+ file; no relocations need to be done to call them. Of course, if
+ ld.so is not versioned... */
+#if 0
+#ifndef DO_VERSIONING
+# error "This will not work with versioning turned off, sorry."
+#endif
+#endif
+
+#ifdef MAP_ANON
+/* The fd is not examined when using MAP_ANON. */
+#define ANONFD -1
+#else
+extern int _dl_zerofd;
+#define ANONFD _dl_zerofd
+#endif
+
+struct hppa_fptr __boot_ldso_fptr[HPPA_BOOT_FPTR_SIZE];
+struct hppa_fptr *__fptr_root = NULL;
+struct hppa_fptr *__fptr_next = __boot_ldso_fptr;
+static struct hppa_fptr *__fptr_free = NULL;
+int __fptr_count = HPPA_BOOT_FPTR_SIZE;
+
+Elf32_Addr
+__hppa_make_fptr (const struct link_map *sym_map, Elf32_Addr value,
+ struct hppa_fptr **root, struct hppa_fptr *mem)
+{
+ struct hppa_fptr **loc;
+ struct hppa_fptr *f;
+
+#ifdef _LIBC_REENTRANT
+ /* Make sure we are alone. We don't need a lock during bootstrap. */
+ if (mem == NULL)
+ while (testandset (&__hppa_fptr_lock));
+#endif
+
+ /* Search the sorted linked list for an existing entry for this
+ symbol. */
+ loc = root;
+ f = *loc;
+ while (f != NULL && f->func <= value)
+ {
+ if (f->func == value)
+ goto found;
+ loc = &f->next;
+ f = *loc;
+ }
+
+ /* Not found. Create a new one. */
+ if (mem != NULL)
+ f = mem;
+ else if (__fptr_free != NULL)
+ {
+ f = __fptr_free;
+ __fptr_free = f->next;
+ }
+ else
+ {
+ if (__fptr_count == 0)
+ {
+#ifndef MAP_ANON
+# define MAP_ANON 0
+ if (_dl_zerofd == -1)
+ {
+ _dl_zerofd = _dl_sysdep_open_zero_fill ();
+ if (_dl_zerofd == -1)
+ {
+ __close (fd);
+ _dl_signal_error (errno, NULL,
+ "cannot open zero fill device");
+ }
+ }
+#endif
+
+ __fptr_next = __mmap (0, _dl_pagesize, PROT_READ | PROT_WRITE,
+ MAP_ANON | MAP_PRIVATE, ANONFD, 0);
+ if (__fptr_next == MAP_FAILED)
+ _dl_signal_error(errno, NULL, "cannot map page for fptr");
+ __fptr_count = _dl_pagesize / sizeof (struct hppa_fptr);
+ }
+ f = __fptr_next++;
+ __fptr_count--;
+ }
+
+ f->func = value;
+ /* GOT has already been relocated in elf_get_dynamic_info - don't
+ try to relocate it again. */
+ f->gp = sym_map->l_info[DT_PLTGOT]->d_un.d_ptr;
+ f->next = *loc;
+ *loc = f;
+
+found:
+#ifdef _LIBC_REENTRANT
+ /* Release the lock. Again, remember, zero means the lock is taken! */
+ if (mem == NULL)
+ __hppa_fptr_lock = 1;
+#endif
+
+ /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */
+ return (Elf32_Addr) f | 2;
+}
+
+void
+_dl_unmap (struct link_map *map)
+{
+ struct hppa_fptr **floc;
+ struct hppa_fptr *f;
+ struct hppa_fptr **lloc;
+ struct hppa_fptr *l;
+
+ __munmap ((void *) map->l_map_start, map->l_map_end - map->l_map_start);
+
+#ifdef _LIBC_REENTRANT
+ /* Make sure we are alone. */
+ while (testandset (&__hppa_fptr_lock));
+#endif
+
+ /* Search the sorted linked list for the first entry for this object. */
+ floc = &__fptr_root;
+ f = *floc;
+ while (f != NULL && f->func < map->l_map_start)
+ {
+ floc = &f->next;
+ f = *floc;
+ }
+
+ /* We found one. */
+ if (f != NULL && f->func < map->l_map_end)
+ {
+ /* Get the last entry. */
+ lloc = floc;
+ l = f;
+ while (l && l->func < map->l_map_end)
+ {
+ lloc = &l->next;
+ l = *lloc;
+ }
+
+ /* Updated FPTR. */
+ *floc = l;
+
+ /* Prepend them to the free list. */
+ *lloc = __fptr_free;
+ __fptr_free = f;
+ }
+
+#ifdef _LIBC_REENTRANT
+ /* Release the lock. */
+ __hppa_fptr_lock = 1;
+#endif
+}
+
+Elf32_Addr
+_dl_lookup_address (const void *address)
+{
+ Elf32_Addr addr = (Elf32_Addr) address;
+ struct hppa_fptr *f;
+
+#ifdef _LIBC_REENTRANT
+ /* Make sure we are alone. */
+ while (testandset (&__hppa_fptr_lock));
+#endif
+
+ for (f = __fptr_root; f != NULL; f = f->next)
+ if (f == address)
+ {
+ addr = f->func;
+ break;
+ }
+
+#ifdef _LIBC_REENTRANT
+ /* Release the lock. */
+ __hppa_fptr_lock = 1;
+#endif
+
+ return addr;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=472803265cdda7cd84e0fa08dbc18587529a50fd
commit 472803265cdda7cd84e0fa08dbc18587529a50fd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:17:46 2000 +0000
HP/PA specific MP add_n implementation.
diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s
index b4a1428..87b7cd7 100644
--- a/sysdeps/hppa/add_n.s
+++ b/sysdeps/hppa/add_n.s
@@ -1,56 +1,56 @@
-; HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store
-; sum in a third limb vector.
+;! HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+;! sum in a third limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+;! Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-; This file is part of the GNU MP Library.
+;! This file is part of the GNU MP Library.
-; The GNU MP Library is free software; you can redistribute it and/or modify
-; it under the terms of the GNU Library General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or (at your
-; option) any later version.
+;! The GNU MP Library is free software; you can redistribute it and/or modify
+;! it under the terms of the GNU Library General Public License as published by
+;! the Free Software Foundation; either version 2 of the License, or (at your
+;! option) any later version.
-; The GNU MP Library is distributed in the hope that it will be useful, but
-; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-; License for more details.
+;! The GNU MP Library is distributed in the hope that it will be useful, but
+;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+;! License for more details.
-; You should have received a copy of the GNU Library General Public License
-; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-; MA 02111-1307, USA.
+;! You should have received a copy of the GNU Library General Public License
+;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+;! MA 02111-1307, USA.
-; INPUT PARAMETERS
-; res_ptr gr26
-; s1_ptr gr25
-; s2_ptr gr24
-; size gr23
+;! INPUT PARAMETERS
+;! res_ptr gr26
+;! s1_ptr gr25
+;! s2_ptr gr24
+;! size gr23
-; One might want to unroll this as for other processors, but it turns
-; out that the data cache contention after a store makes such
-; unrolling useless. We can't come under 5 cycles/limb anyway.
+;! One might want to unroll this as for other processors, but it turns
+;! out that the data cache contention after a store makes such
+;! unrolling useless. We can't come under 5 cycles/limb anyway.
- .code
+ .text
.export __mpn_add_n
-__mpn_add_n
+__mpn_add_n:
.proc
.callinfo frame=0,no_calls
.entry
- ldws,ma 4(0,%r25),%r20
- ldws,ma 4(0,%r24),%r19
+ ldws,ma 4(0,%r25),%r21
+ ldws,ma 4(0,%r24),%r20
- addib,= -1,%r23,L$end ; check for (SIZE == 1)
- add %r20,%r19,%r28 ; add first limbs ignoring cy
+ addib,= -1,%r23,L$end ;! check for (SIZE == 1)
+ add %r21,%r20,%r28 ;! add first limbs ignoring cy
-L$loop ldws,ma 4(0,%r25),%r20
- ldws,ma 4(0,%r24),%r19
+L$loop: ldws,ma 4(0,%r25),%r21
+ ldws,ma 4(0,%r24),%r20
stws,ma %r28,4(0,%r26)
addib,<> -1,%r23,L$loop
- addc %r20,%r19,%r28
+ addc %r21,%r20,%r28
-L$end stws %r28,0(0,%r26)
+L$end: stws %r28,0(0,%r26)
bv 0(%r2)
addc %r0,%r0,%r28
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12ffa85366ee2160966646eab8648c46dc0632b6
commit 12ffa85366ee2160966646eab8648c46dc0632b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:17:31 2000 +0000
HP/PA specific __longjmp implementation.
diff --git a/sysdeps/hppa/__longjmp.S b/sysdeps/hppa/__longjmp.S
new file mode 100644
index 0000000..418a0b4
--- /dev/null
+++ b/sysdeps/hppa/__longjmp.S
@@ -0,0 +1,72 @@
+/* longjmp for PA-RISC.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+/* __longjmp(jmpbuf, val) */
+
+ .text
+ .align 4
+ .globl __longjmp
+ .export __longjmp, code
+ .proc
+ .callinfo
+__longjmp:
+ /* set return value */
+ copy %r25, %r28
+
+ ldw 0(%r26), %r3
+ ldw 8(%r26), %r4
+ ldw 12(%r26), %r5
+ ldw 16(%r26), %r6
+ ldw 20(%r26), %r7
+ ldw 24(%r26), %r8
+ ldw 28(%r26), %r9
+ ldw 32(%r26), %r10
+ ldw 36(%r26), %r11
+ ldw 40(%r26), %r12
+ ldw 44(%r26), %r13
+ ldw 48(%r26), %r14
+ ldw 52(%r26), %r15
+ ldw 56(%r26), %r16
+ ldw 60(%r26), %r17
+ ldw 64(%r26), %r18
+ ldw 68(%r26), %r19
+ ldw 72(%r26), %r27
+ ldw 76(%r26), %r30
+
+ ldw 80(%r26), %rp
+
+ ldo 88(%r26),%r20
+ fldds,ma 8(%r20), %fr12
+ fldds,ma 8(%r20), %fr13
+ fldds,ma 8(%r20), %fr14
+ fldds,ma 8(%r20), %fr15
+ fldds,ma 8(%r20), %fr16
+ fldds,ma 8(%r20), %fr17
+ fldds,ma 8(%r20), %fr18
+ fldds,ma 8(%r20), %fr19
+ fldds,ma 8(%r20), %fr20
+ fldds 0(%r20), %fr21
+
+ bv,n %r0(%r2)
+ .procend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d049e72a0acdd736e645082250548f6de2fb269
commit 6d049e72a0acdd736e645082250548f6de2fb269
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:17:19 2000 +0000
HP/PA specific Version definitions.
diff --git a/sysdeps/hppa/Versions b/sysdeps/hppa/Versions
new file mode 100644
index 0000000..0c447d9
--- /dev/null
+++ b/sysdeps/hppa/Versions
@@ -0,0 +1,6 @@
+ld {
+ GLIBC_2.2 {
+ # hppa specific functions in the dynamic linker, but used by libc.so.
+ _dl_symbol_address; _dl_unmap; _dl_lookup_address;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b1705c09822a88e66dd64cfd446df9adc6c9303
commit 5b1705c09822a88e66dd64cfd446df9adc6c9303
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 15 03:16:57 2000 +0000
HP/PA specific Makefile.
diff --git a/sysdeps/hppa/Makefile b/sysdeps/hppa/Makefile
new file mode 100644
index 0000000..f6ad843
--- /dev/null
+++ b/sysdeps/hppa/Makefile
@@ -0,0 +1,26 @@
+# Copyright (C) 2000 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+# Contributed by David Huggins-Daines (dhd@debian.org)
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# We need this for all shared objects since the build process uses ld -r
+CFLAGS-.os += -ffunction-sections
+
+ifeq ($(subdir),elf)
+dl-routines += dl-symaddr dl-fptr
+rtld-routines += dl-symaddr dl-fptr
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adf9969ce1940edd58c90990d42f3f6893d5cdff
commit adf9969ce1940edd58c90990d42f3f6893d5cdff
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Oct 14 17:50:13 2000 +0000
2000-10-13 Michael Fedrowitz <michael@fedrowitz.de>
* sysdeps/unix/sysv/linux/m68k/alphasort64.c: New file.
* sysdeps/unix/sysv/linux/m68k/fcntl.c: New file.
* sysdeps/unix/sysv/linux/m68k/getdents64.c: New file.
* sysdeps/unix/sysv/linux/m68k/getrlimit.c: New file.
* sysdeps/unix/sysv/linux/m68k/getrlimit64.c: New file.
* sysdeps/unix/sysv/linux/m68k/glob64.c: New file.
* sysdeps/unix/sysv/linux/m68k/lockf64.c: New file.
* sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c: New file.
* sysdeps/unix/sysv/linux/m68k/readdir64.c: New file.
* sysdeps/unix/sysv/linux/m68k/readdir64_r.c: New file.
* sysdeps/unix/sysv/linux/m68k/scandir64.c: New file.
* sysdeps/unix/sysv/linux/m68k/setrlimit.c: New file.
* sysdeps/unix/sysv/linux/m68k/versionsort64.c: New file.
* sysdeps/unix/sysv/linux/m68k/Dist: Add oldgetrlimit64.c.
* sysdeps/unix/sysv/linux/m68k/Makefile: Add oldgetrlimit64.
* sysdeps/unix/sysv/linux/m68k/Versions: Export __xstat64,
__fxstat64, __lxstat64, alphasort64, glob64, getrlimit, setrlimit,
getrlimit64, readdir64, readdir64_r, scandir64, versionsort64 at
GLIBC_2.2.
* sysdeps/unix/sysv/linux/m68k/syscalls.list: Add oldgetrlimit,
oldsetrlimit for GLIBC_2.0.
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index c28074f..41d521b 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,5 +1,6 @@
clone.S
mremap.S
+oldgetrlimit64.c
setresuid.c
setresgid.c
setfsuid.c
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 7e46d51..55eeeab 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -11,3 +11,7 @@ ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
endif
+
+ifeq ($(subdir),resource)
+sysdep_routines += oldgetrlimit64
+endif
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index b70d1d1..6c650e2 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -8,4 +8,26 @@ libc {
# c*
cacheflush;
}
+ GLIBC_2.2 {
+ # functions used in other libraries
+ __xstat64; __fxstat64; __lxstat64;
+
+ # a*
+ alphasort64;
+
+ # g*
+ glob64;
+
+ # New rlimit interface
+ getrlimit; setrlimit; getrlimit64;
+
+ # r*
+ readdir64; readdir64_r;
+
+ # s*
+ scandir64;
+
+ # v*
+ versionsort64;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/m68k/alphasort64.c b/sysdeps/unix/sysv/linux/m68k/alphasort64.c
new file mode 100644
index 0000000..0b5ae47
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/alphasort64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/alphasort64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/fcntl.c b/sysdeps/unix/sysv/linux/m68k/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getdents64.c b/sysdeps/unix/sysv/linux/m68k/getdents64.c
new file mode 100644
index 0000000..0c75fb5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getdents64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getdents64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/sysdeps/unix/sysv/linux/m68k/getrlimit.c
new file mode 100644
index 0000000..fc06dbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getrlimit64.c b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c
new file mode 100644
index 0000000..fef018f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/glob64.c b/sysdeps/unix/sysv/linux/m68k/glob64.c
new file mode 100644
index 0000000..82a9a29
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/glob64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/lockf64.c b/sysdeps/unix/sysv/linux/m68k/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c
new file mode 100644
index 0000000..4c27e95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/oldgetrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64.c b/sysdeps/unix/sysv/linux/m68k/readdir64.c
new file mode 100644
index 0000000..2ea26dd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/readdir64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/readdir64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/readdir64_r.c b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c
new file mode 100644
index 0000000..9f54f89
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/readdir64_r.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/readdir64_r.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/scandir64.c b/sysdeps/unix/sysv/linux/m68k/scandir64.c
new file mode 100644
index 0000000..506fd88
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/scandir64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/scandir64.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setrlimit.c b/sysdeps/unix/sysv/linux/m68k/setrlimit.c
new file mode 100644
index 0000000..bfaef74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 5367ef0..98d3066 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,3 +1,5 @@
# File name Caller Syscall name Args Strong name Weak names
cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush
+oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
+oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/m68k/versionsort64.c b/sysdeps/unix/sysv/linux/m68k/versionsort64.c
new file mode 100644
index 0000000..144b691
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/versionsort64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/versionsort64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b57d767cf46a8895cb01bd63f07be0b926fe1493
commit b57d767cf46a8895cb01bd63f07be0b926fe1493
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Oct 14 12:43:00 2000 +0000
2000-10-13 Michael Fedrowitz <michael@fedrowitz.de>
* sysdeps/m68k/dl-machine.h (_dl_start_user): Pass correct
arguments to _dl_init.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e4cdf2d..29267af 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -180,9 +180,9 @@ _dl_start_user:
move.l %d1, -(%sp)
# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
pea 8(%sp, %d1*4)
- pea 4(%sp)
+ pea 8(%sp)
move.l %d1, -(%sp)
- move.l _dl_loaded@GOT.w(%a5), -(%sp)
+ move.l ([_dl_loaded@GOT.w(%a5)]), -(%sp)
jbsr _dl_init@PLTPC
addq.l #8, %sp
addq.l #8, %sp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79e6a4e059050ac1d3f5f033588bf659adebd136
commit 79e6a4e059050ac1d3f5f033588bf659adebd136
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 3 15:11:28 2000 +0000
Make struct stat64 backward compatible.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
index cc93e49..1676f17 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -36,11 +36,10 @@
struct stat
{
__dev_t st_dev; /* Device. */
-#ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
+#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
#else
- unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
#endif
__mode_t st_mode; /* File mode. */
@@ -48,11 +47,10 @@ struct stat
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __USE_FILE_OFFSET64
unsigned short int __pad2;
+#ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
#else
- unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
#endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
@@ -80,7 +78,7 @@ struct stat
struct stat64
{
__dev_t st_dev; /* Device. */
- unsigned int __pad1;
+ unsigned short int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
@@ -88,7 +86,7 @@ struct stat64
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
- unsigned int __pad2;
+ unsigned short int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e2d6906870eb5ae1c04b62421ec3d3edd934f8c8
commit e2d6906870eb5ae1c04b62421ec3d3edd934f8c8
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Oct 3 11:55:32 2000 +0000
Fix padding in struct stat for LARGEFILE64_SOURCE.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/stat.h b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
new file mode 100644
index 0000000..cc93e49
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/stat.h
@@ -0,0 +1,135 @@
+/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER_LINUX_OLD 1
+#define _STAT_VER_KERNEL 1
+#define _STAT_VER_SVR4 2
+#define _STAT_VER_LINUX 3
+#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
+
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+#ifndef __USE_FILE_OFFSET64
+ unsigned short int __pad1;
+ __ino_t st_ino; /* File serial number. */
+#else
+ unsigned int __pad1;
+ __ino_t __st_ino; /* 32bit file serial number. */
+#endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+#ifndef __USE_FILE_OFFSET64
+ unsigned short int __pad2;
+ __off_t st_size; /* Size of file, in bytes. */
+#else
+ unsigned int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+#endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#endif
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+#ifndef __USE_FILE_OFFSET64
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned int __pad1;
+
+ __ino_t __st_ino; /* 32bit file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ __ino64_t st_ino; /* File serial number. */
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=979b9fea6f11f29c683d029865367bccaac35bfa
commit 979b9fea6f11f29c683d029865367bccaac35bfa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 2 22:04:18 2000 +0000
Add missing .mips0 at the end of inline assembler code.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index bc7f52a..8409535 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -52,7 +52,8 @@ _test_and_set (int *p, int v) __THROW
".set pop\n\t"
"sc %1,%2\n\t"
"beqz %1,1b\n"
- "2:"
+ "2:\n\t"
+ ".set\tmips0"
: "=&r" (r), "=&r" (t), "=m" (*p)
: "m" (*p), "r" (v)
: "memory");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0cd8b6f6d2c0626be90ca96fe88a31c6a107e31
commit f0cd8b6f6d2c0626be90ca96fe88a31c6a107e31
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 2 08:49:05 2000 +0000
Add RLIMIT_LOCKS.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
index c89f5a0..a97c96c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. Alpha/Linux version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,7 +76,11 @@ enum __rlimit_resource
RLIMIT_MEMLOCK = 9,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIM_NLIMITS = 10
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIM_NLIMITS = 11
#define RLIMIT_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIM_NLIMITS
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=671b38f832dfd033df06a98491b23249c680c644
commit 671b38f832dfd033df06a98491b23249c680c644
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Oct 2 08:47:39 2000 +0000
Synch with Linux 2.4.0-test9-pre8.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 2b879dc..55f8e74 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -85,6 +85,12 @@
# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -106,6 +112,24 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
/* We don't need to support __USE_FILE_OFFSET64. */
struct flock
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d89e0413b2053e4cf302601e002597915dac8901
commit d89e0413b2053e4cf302601e002597915dac8901
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 1 22:36:00 2000 +0000
(RTLD_START): Fix computation of envp argument passed to _dl_init.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 6d95705..2a19126 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -468,7 +468,9 @@ _dl_start_user:\n\
lw $4, _dl_loaded\n\
lw $5, 0($29)\n\
la $6, 4($29)\n\
- la $7, 8($29)\n\
+ sll $7, $5, 2\n\
+ addu $7, $7, $6\n\
+ addu $7, $7, 4\n\
subu $29, 16\n\
# Call the function to run the initializers.\n\
jal _dl_init
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bcafa19eb35f98d653ff662a9b7cd5ecdfbb69f4
commit bcafa19eb35f98d653ff662a9b7cd5ecdfbb69f4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 29 22:02:28 2000 +0000
Type definitions for nscd on Alpha.
diff --git a/sysdeps/alpha/nscd-types.h b/sysdeps/alpha/nscd-types.h
new file mode 100644
index 0000000..9096081
--- /dev/null
+++ b/sysdeps/alpha/nscd-types.h
@@ -0,0 +1,22 @@
+/* Types for the NSCD implementation. Alpha version.
+ Copyright (c) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdint.h>
+
+typedef int64_t nscd_ssize_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e9880e0b5db7cd3ce6433e57a4f5ea19e60f97d
commit 5e9880e0b5db7cd3ce6433e57a4f5ea19e60f97d
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 29 20:24:30 2000 +0000
Protect DN_* by __USE_GNU.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index 5211998..776ee29 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -9,13 +9,13 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
@@ -42,9 +42,9 @@
#define O_ASYNC 020000
#ifdef __USE_GNU
-# define O_DIRECTORY 040000 /* Must be a directory. */
-# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_DIRECT 0200000 /* Direct disk access. */
+# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_DIRECT 0200000 /* Direct disk access. */
#endif
#ifdef __USE_LARGEFILE64
@@ -53,10 +53,10 @@
/* For now Linux has synchronisity options for data and read operations.
We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
+ this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC O_SYNC /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
/* Values for the second argument to `fcntl'. */
@@ -69,15 +69,15 @@
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_GETLK F_GETLK64 /* Get record locking info. */
# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
#define F_GETLK64 12 /* Get record locking info. */
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
@@ -90,9 +90,9 @@
#endif
#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
/* For F_[GET|SET]FL. */
@@ -100,8 +100,8 @@
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
@@ -118,23 +118,25 @@
#ifdef __USE_GNU
# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
#endif
+#ifdef __USE_GNU
/* Types of directory notifications that may be requested with F_NOTIFY. */
-#define DN_ACCESS 0x00000001 /* File accessed. */
-#define DN_MODIFY 0x00000002 /* File modified. */
-#define DN_CREATE 0x00000004 /* File created. */
-#define DN_DELETE 0x00000008 /* File removed. */
-#define DN_RENAME 0x00000010 /* File renamed. */
-#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
struct flock
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
@@ -149,7 +151,7 @@ struct flock
#ifdef __USE_LARGEFILE64
struct flock64
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
@@ -171,7 +173,7 @@ struct flock64
#ifdef __USE_XOPEN2K
# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index c0786f3..0afadf6 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -9,13 +9,13 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
@@ -42,17 +42,17 @@
#define O_ASYNC 020000
#ifdef __USE_GNU
-# define O_DIRECTORY 040000 /* Must be a directory. */
-# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_DIRECT 0200000 /* Direct disk access. */
+# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_DIRECT 0200000 /* Direct disk access. */
#endif
/* For now Linux has synchronisity options for data and read operations.
We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
+ this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC O_SYNC /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
#ifdef __USE_LARGEFILE64
@@ -68,15 +68,15 @@
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 5 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_GETLK F_GETLK64 /* Get record locking info. */
# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
#define F_GETLK64 12 /* Get record locking info. */
#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
@@ -89,9 +89,9 @@
#endif
#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
/* For F_[GET|SET]FL. */
@@ -99,15 +99,15 @@
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
/* For old implementation of bsd flock(). */
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
+/* Operations for bsd flock(), also used by the kernel implementation. */
# define LOCK_SH 1 /* shared lock */
# define LOCK_EX 2 /* exclusive lock */
# define LOCK_NB 4 /* or'd with one of the above to prevent
@@ -117,23 +117,25 @@
#ifdef __USE_GNU
# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
#endif
+#ifdef __USE_GNU
/* Types of directory notifications that may be requested with F_NOTIFY. */
-#define DN_ACCESS 0x00000001 /* File accessed. */
-#define DN_MODIFY 0x00000002 /* File modified. */
-#define DN_CREATE 0x00000004 /* File created. */
-#define DN_DELETE 0x00000008 /* File removed. */
-#define DN_RENAME 0x00000010 /* File renamed. */
-#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
struct flock
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
@@ -148,7 +150,7 @@ struct flock
#ifdef __USE_LARGEFILE64
struct flock64
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
@@ -170,7 +172,7 @@ struct flock64
#ifdef __USE_XOPEN2K
# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index a7892cd..14593da 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -9,13 +9,13 @@
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
@@ -33,7 +33,7 @@
#define O_APPEND 0x0008
#define O_SYNC 0x0010
#define O_NONBLOCK 0x0080
-#define O_CREAT 0x0100 /* not fcntl */
+#define O_CREAT 0x0100 /* not fcntl */
#define O_TRUNC 0x0200 /* not fcntl */
#define O_EXCL 0x0400 /* not fcntl */
#define O_NOCTTY 0x0800 /* not fcntl */
@@ -45,19 +45,19 @@
#endif
#ifdef __USE_GNU
-# define O_NOFOLLOW 0x4000 /* Do not follow links. */
+# define O_NOFOLLOW 0x4000 /* Do not follow links. */
# define O_DIRECT 0x8000 /* Direct disk access hint. */
-# define O_DIRECTORY 0x10000 /* Must be a directory. */
+# define O_DIRECTORY 0x10000 /* Must be a directory. */
#endif
#define O_NDELAY O_NONBLOCK
/* For now Linux has no synchronisity options for data and read
- operations. We define the symbols here but let them do the same as
+ operations. We define the symbols here but let them do the same as
O_SYNC since this is a superset. */
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC O_SYNC /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
#endif
/* Values for the second argument to `fcntl'. */
@@ -69,16 +69,16 @@
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 14 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_GETLK F_GETLK64 /* Get record locking info. */
# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
#define F_GETLK64 33 /* Get record locking info. */
#define F_SETLK64 34 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 35 /* Set record locking info (blocking). */
+#define F_SETLKW64 35 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
@@ -91,9 +91,9 @@
#endif
#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
#endif
/* for F_[GET|SET]FL */
@@ -101,8 +101,8 @@
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
@@ -119,23 +119,25 @@
#ifdef __USE_GNU
# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
#endif
+#ifdef __USE_GNU
/* Types of directory notifications that may be requested with F_NOTIFY. */
-#define DN_ACCESS 0x00000001 /* File accessed. */
-#define DN_MODIFY 0x00000002 /* File modified. */
-#define DN_CREATE 0x00000004 /* File created. */
-#define DN_DELETE 0x00000008 /* File removed. */
-#define DN_RENAME 0x00000010 /* File renamed. */
-#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
typedef struct flock
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
@@ -154,7 +156,7 @@ typedef struct flock
#ifdef __USE_LARGEFILE64
struct flock64
{
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
@@ -177,7 +179,7 @@ struct flock64
#ifdef __USE_XOPEN2K
# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d867f21971ee98fdceb53ecfacd3afc31c61f912
commit d867f21971ee98fdceb53ecfacd3afc31c61f912
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 29 19:07:03 2000 +0000
Synch with Linux 2.4.0-test9-pre7.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index deaa183..5211998 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -89,6 +89,12 @@
# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* For F_[GET|SET]FL. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -110,6 +116,22 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+#define DN_ACCESS 0x00000001 /* File accessed. */
+#define DN_MODIFY 0x00000002 /* File modified. */
+#define DN_CREATE 0x00000004 /* File created. */
+#define DN_DELETE 0x00000008 /* File removed. */
+#define DN_RENAME 0x00000010 /* File renamed. */
+#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 99c068a..c0786f3 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -88,6 +88,12 @@
# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* For F_[GET|SET]FL. */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -109,6 +115,22 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+#define DN_ACCESS 0x00000001 /* File accessed. */
+#define DN_MODIFY 0x00000002 /* File modified. */
+#define DN_CREATE 0x00000004 /* File created. */
+#define DN_DELETE 0x00000008 /* File removed. */
+#define DN_RENAME 0x00000010 /* File renamed. */
+#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 853599f..a7892cd 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -90,6 +90,12 @@
# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notfications on a directory. */
+#endif
+
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
@@ -111,6 +117,22 @@
# define LOCK_UN 8 /* remove lock */
#endif
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+#define DN_ACCESS 0x00000001 /* File accessed. */
+#define DN_MODIFY 0x00000002 /* File modified. */
+#define DN_CREATE 0x00000004 /* File created. */
+#define DN_DELETE 0x00000008 /* File removed. */
+#define DN_RENAME 0x00000010 /* File renamed. */
+#define DN_ATTRIB 0x00000020 /* File changed attibutes. */
+#define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+
typedef struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8da28deb78419944dce38dd9c2bc8ff8058b1ca0
commit 8da28deb78419944dce38dd9c2bc8ff8058b1ca0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 29 06:50:53 2000 +0000
(elf_machine_rela): Handle unaligned relocation also for R_ALPHA_RELATIVE.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 33c32fa..69845b4 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -482,7 +482,19 @@ elf_machine_rela (struct link_map *map,
/* Already done in dynamic linker. */
if (map != &_dl_rtld_map)
#endif
- *reloc_addr += map->l_addr;
+ {
+ /* XXX Make some timings. Maybe it's preverable to test for
+ unaligned access and only do it the complex way if necessary. */
+ void *reloc_addr_1 = reloc_addr;
+ Elf64_Addr reloc_addr_val;
+
+ /* Load value without causing unaligned trap. */
+ memcpy (&reloc_addr_val, reloc_addr_1, 8);
+ reloc_addr_val += map->l_addr;
+
+ /* Store value without causing unaligned trap. */
+ memcpy (reloc_addr_1, &reloc_addr_val, 8);
+ }
}
else if (r_type == R_ALPHA_NONE)
return;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73b240facaffa86a7fcfa69f7f21a67ae043cde5
commit 73b240facaffa86a7fcfa69f7f21a67ae043cde5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 29 01:30:19 2000 +0000
Add RLIMIT_LOCKS.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h
index 710f111..db3848b 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h
@@ -1,5 +1,5 @@
-/* Bit values & structures for resource limits. Linux version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Bit values & structures for resource limits. Linux/Arm version.
+ Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,7 +76,11 @@ enum __rlimit_resource
RLIMIT_MEMLOCK = 8,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIMIT_NLIMITS = 10,
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIMIT_NLIMITS = 11,
RLIM_NLIMITS = RLIMIT_NLIMITS
#define RLIMIT_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIM_NLIMITS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index 613b6bc..ced5c5e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -1,5 +1,5 @@
-/* Bit values & structures for resource limits. MIPS/Linux version.
- Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Bit values & structures for resource limits. Linux/MIPS version.
+ Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -76,7 +76,11 @@ enum __rlimit_resource
RLIMIT_MEMLOCK = 9,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIM_NLIMITS = 10
+ /* Maximum number of file locks. */
+ RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS RLIMIT_LOCKS
+
+ RLIM_NLIMITS = 11
#define RLIMIT_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIM_NLIMITS
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7a43cc94a913e61c64e09f88652ad3e9c8a9319
commit f7a43cc94a913e61c64e09f88652ad3e9c8a9319
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Sep 26 17:34:57 2000 +0000
Ulps for m68k.
diff --git a/sysdeps/m68k/fpu/libm-test-ulps b/sysdeps/m68k/fpu/libm-test-ulps
new file mode 100644
index 0000000..e3d42ab
--- /dev/null
+++ b/sysdeps/m68k/fpu/libm-test-ulps
@@ -0,0 +1,1301 @@
+# Begin of automatic generation
+
+# acos
+Test "acos (0.7) == 0.7953988301841435554":
+ildouble: 1150
+ldouble: 1150
+
+# acosh
+Test "acosh (7) == 2.6339157938496334172":
+ildouble: 1
+ldouble: 1
+
+# asin
+Test "asin (0.7) == 0.7753974966107530637":
+double: 1
+idouble: 1
+ildouble: 1147
+ldouble: 1147
+
+# asinh
+Test "asinh (0.7) == 0.652666566082355786":
+ildouble: 656
+ldouble: 656
+
+# atan
+Test "atan (0.7) == 0.6107259643892086165":
+ildouble: 549
+ldouble: 549
+
+# atan2
+Test "atan2 (0.4, 0.0003) == 1.5700463269355215718":
+ildouble: 1
+ldouble: 1
+Test "atan2 (0.7, 1) == 0.6107259643892086165":
+ildouble: 549
+ldouble: 549
+
+# atanh
+Test "atanh (0.7) == 0.8673005276940531944":
+double: 1
+idouble: 1
+ildouble: 1606
+ldouble: 1606
+
+# cabs
+Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+ildouble: 560
+ldouble: 560
+Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Imaginary part of: cacos (-2 - 3 i) == 2.1414491111159960199 + 1.9833870299165354323 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 151
+ldouble: 151
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+float: 2
+ifloat: 2
+ildouble: 329
+ldouble: 329
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+double: 1
+idouble: 1
+ildouble: 328
+ldouble: 328
+Test "Imaginary part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+ildouble: 151
+ldouble: 151
+
+# casin
+Test "Imaginary part of: casin (-2 - 3 i) == -0.5706527843210994007 - 1.9833870299165354323 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 603
+ldouble: 603
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+float: 2
+ifloat: 2
+ildouble: 329
+ldouble: 329
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 6
+float: 19
+idouble: 6
+ifloat: 19
+ildouble: 6
+ldouble: 6
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 13
+float: 1
+idouble: 13
+ifloat: 1
+ildouble: 7
+ldouble: 7
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+double: 1
+idouble: 1
+ildouble: 891
+ldouble: 891
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+float: 2
+ifloat: 2
+ildouble: 11
+ldouble: 11
+
+# catan
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 7
+ldouble: 7
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+ildouble: 250
+ldouble: 250
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+float: 1
+ifloat: 1
+ildouble: 474
+ldouble: 474
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+ildouble: 66
+ldouble: 66
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+ildouble: 447
+ldouble: 447
+
+# cbrt
+Test "cbrt (-0.001) == -0.1":
+ildouble: 717
+ldouble: 717
+Test "cbrt (-27.0) == -3.0":
+ildouble: 948
+ldouble: 948
+Test "cbrt (0.7) == 0.8879040017426007084":
+double: 1
+idouble: 1
+ildouble: 345
+ldouble: 345
+Test "cbrt (0.970299) == 0.99":
+ildouble: 306
+ldouble: 306
+Test "cbrt (8) == 2":
+ildouble: 191
+ldouble: 191
+
+# ccos
+Test "Real part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+ildouble: 1901
+ldouble: 1901
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 1467
+ldouble: 1467
+Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+ildouble: 1182
+ldouble: 1182
+
+# cexp
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+float: 1
+ifloat: 1
+ildouble: 19
+ldouble: 19
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+float: 3
+ifloat: 3
+ildouble: 940
+ldouble: 940
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+float: 2
+ifloat: 2
+ildouble: 1067
+ldouble: 1067
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+ildouble: 1
+ldouble: 1
+
+# clog10
+Test "Real part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1402
+ldouble: 1402
+Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+float: 1
+ifloat: 1
+ildouble: 187
+ldouble: 187
+
+# cos
+Test "cos (0.7) == 0.7648421872844884262":
+double: 1
+idouble: 1
+ildouble: 529
+ldouble: 529
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+ildouble: 1
+ldouble: 1
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "cos (pi/2) == 0":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+ildouble: 0.25
+ldouble: 0.25
+
+# cosh
+Test "cosh (0.7) == 1.255169005630943018":
+ildouble: 309
+ldouble: 309
+
+# cpow
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 5
+ldouble: 5
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 6
+ifloat: 6
+ildouble: 2
+ldouble: 2
+Test "Real part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+float: 0.5
+ifloat: 0.5
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 1.103
+float: 2.5333
+idouble: 1.103
+ifloat: 2.5333
+ildouble: 1
+ldouble: 1
+
+# csin
+Test "Real part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csin (-2 - 3 i) == -9.1544991469114295734 + 4.1689069599665643507 i":
+float: 1
+ifloat: 1
+Test "Real part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+ildouble: 966
+ldouble: 966
+Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+float: 1
+ifloat: 1
+ildouble: 168
+ldouble: 168
+
+# csinh
+Test "Real part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+ildouble: 413
+ldouble: 413
+Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+ildouble: 477
+ldouble: 477
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+float: 1
+ifloat: 1
+ildouble: 237
+ldouble: 237
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+ildouble: 128
+ldouble: 128
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+ildouble: 439
+ldouble: 439
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 689
+ldouble: 689
+Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+ildouble: 367
+ldouble: 367
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+ildouble: 25
+ldouble: 25
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+double: 0.5
+idouble: 0.5
+Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+float: 1
+ifloat: 1
+ildouble: 285
+ldouble: 285
+Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 1
+idouble: 1
+ildouble: 3074
+ldouble: 3074
+
+# erfc
+Test "erfc (0.7) == 0.32219880616258152702":
+double: 1
+idouble: 1
+Test "erfc (1.2) == 0.089686021770364619762":
+float: 2
+ifloat: 2
+Test "erfc (2.0) == 0.0046777349810472658379":
+double: 1
+idouble: 1
+Test "erfc (4.1) == 0.67000276540848983727e-8":
+double: 24
+float: 11
+idouble: 24
+ifloat: 11
+
+# exp
+Test "exp (0.7) == 2.0137527074704765216":
+ildouble: 412
+ldouble: 412
+
+# exp10
+Test "exp10 (-1) == 0.1":
+ildouble: 819
+ldouble: 819
+Test "exp10 (0.7) == 5.0118723362727228500":
+double: 1
+idouble: 1
+ildouble: 1182
+ldouble: 1182
+
+# exp2
+Test "exp2 (0.7) == 1.6245047927124710452":
+ildouble: 461
+ldouble: 461
+
+# expm1
+Test "expm1 (0.7) == 1.0137527074704765216":
+ildouble: 825
+ldouble: 825
+Test "expm1 (1) == M_El - 1.0":
+ildouble: 1
+ldouble: 1
+
+# fmod
+Test "fmod (-6.5, -2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4096
+ldouble: 4096
+Test "fmod (-6.5, 2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4096
+ldouble: 4096
+Test "fmod (6.5, -2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4096
+ldouble: 4096
+Test "fmod (6.5, 2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4096
+ldouble: 4096
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+ildouble: 560
+ldouble: 560
+Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+ildouble: 406
+ldouble: 406
+
+# j0
+Test "j0 (1.5) == 0.51182767173591812875":
+float: 1
+ifloat: 1
+Test "j0 (10.0) == -0.24593576445134833520":
+float: 3
+ifloat: 3
+
+# j1
+Test "j1 (-1.0) == -0.44005058574493351596":
+float: 1
+ifloat: 1
+Test "j1 (1.0) == 0.44005058574493351596":
+float: 1
+ifloat: 1
+Test "j1 (1.5) == 0.55793650791009964199":
+float: 1
+ifloat: 1
+Test "j1 (10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+
+# jn
+Test "jn (0, 1.5) == 0.51182767173591812875":
+float: 1
+ifloat: 1
+Test "jn (0, 10.0) == -0.24593576445134833520":
+float: 3
+ifloat: 3
+Test "jn (1, -1.0) == -0.44005058574493351596":
+float: 1
+ifloat: 1
+Test "jn (1, 1.0) == 0.44005058574493351596":
+float: 1
+ifloat: 1
+Test "jn (1, 1.5) == 0.55793650791009964199":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "jn (10, -1.0) == 0.26306151236874532070e-9":
+float: 2
+ifloat: 2
+Test "jn (10, 0.1) == 0.26905328954342155795e-19":
+double: 4
+float: 6
+idouble: 4
+ifloat: 6
+Test "jn (10, 0.7) == 0.75175911502153953928e-11":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+Test "jn (10, 1.0) == 0.26306151236874532070e-9":
+float: 2
+ifloat: 2
+Test "jn (10, 10.0) == 0.20748610663335885770":
+float: 9
+ifloat: 9
+Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+float: 2
+ifloat: 2
+Test "jn (3, -1.0) == -0.019563353982668405919":
+float: 1
+ifloat: 1
+Test "jn (3, 0.1) == 0.000020820315754756261429":
+double: 1
+idouble: 1
+Test "jn (3, 0.7) == 0.0069296548267508408077":
+double: 2
+idouble: 2
+Test "jn (3, 1.0) == 0.019563353982668405919":
+float: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.058379379305186812343":
+float: 5
+ifloat: 5
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+float: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log
+Test "log (0.7) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2342
+ldouble: 2342
+Test "log (2) == M_LN2l":
+ildouble: 1
+ldouble: 1
+Test "log (e) == 1":
+float: 0.5
+ifloat: 0.5
+
+# log10
+Test "log10 (0.7) == -0.15490195998574316929":
+double: 1
+idouble: 1
+ildouble: 2033
+ldouble: 2033
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.3) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 584
+ldouble: 584
+
+# log2
+Test "log2 (0.7) == -0.51457317282975824043":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1689
+ldouble: 1689
+
+# pow
+Test "pow (0.7, 1.2) == 0.65180494056638638188":
+ildouble: 725
+ldouble: 725
+
+# sin
+Test "sin (0.7) == 0.64421768723769105367":
+ildouble: 627
+ldouble: 627
+
+# sincos
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.64421768723769105367 in sin_res":
+ildouble: 627
+ldouble: 627
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+double: 1
+idouble: 1
+ildouble: 528
+ldouble: 528
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+ildouble: 1
+ldouble: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+ildouble: 0.25
+ldouble: 0.25
+
+# sinh
+Test "sinh (0.7) == 0.75858370183953350346":
+float: 1
+ifloat: 1
+ildouble: 1028
+ldouble: 1028
+
+# sqrt
+Test "sqrt (0.7) == 0.83666002653407554798":
+ildouble: 489
+ldouble: 489
+Test "sqrt (15239.9025) == 123.45":
+ildouble: 325
+ldouble: 325
+
+# tan
+Test "tan (0.7) == 0.84228838046307944813":
+ildouble: 1401
+ldouble: 1401
+Test "tan (pi/4) == 1":
+double: 0.5
+idouble: 0.5
+
+# tanh
+Test "tanh (0.7) == 0.60436777711716349631":
+ildouble: 519
+ldouble: 519
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (0.1) == -1.5342386513503668441":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "y0 (0.7) == -0.19066492933739506743":
+double: 2
+idouble: 2
+Test "y0 (10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "y0 (2.0) == 0.51037567264974511960":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.22352148938756622053":
+float: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.1) == -6.4589510947020269877":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "y1 (0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (1.0) == -0.78121282130028871655":
+double: 1
+idouble: 1
+Test "y1 (1.5) == -0.41230862697391129595":
+float: 2
+ifloat: 2
+Test "y1 (10.0) == 0.24901542420695388392":
+float: 2
+ifloat: 2
+Test "y1 (2.0) == -0.10703243154093754689":
+float: 2
+ifloat: 2
+
+# yn
+Test "yn (0, 0.1) == -1.5342386513503668441":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (0, 0.7) == -0.19066492933739506743":
+double: 2
+idouble: 2
+Test "yn (0, 10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "yn (0, 2.0) == 0.51037567264974511960":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.22352148938756622053":
+float: 1
+ifloat: 1
+Test "yn (1, 0.1) == -6.4589510947020269877":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (1, 0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 1.0) == -0.78121282130028871655":
+double: 1
+idouble: 1
+Test "yn (1, 1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.24901542420695388392":
+float: 2
+ifloat: 2
+Test "yn (1, 2.0) == -0.10703243154093754689":
+float: 2
+ifloat: 2
+Test "yn (10, 0.1) == -0.11831335132045197885e19":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "yn (10, 0.7) == -0.42447194260703866924e10":
+double: 6
+idouble: 6
+Test "yn (10, 10.0) == -0.35981415218340272205":
+float: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.54220803928264":
+double: 1
+idouble: 1
+Test "yn (3, 0.1) == -5099.3323786129048894":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (3, 0.7) == -15.819479052819633505":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (3, 10.0) == -0.25136265718383732978":
+float: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.1277837768404277861":
+float: 1
+ifloat: 1
+
+# Maximal error of functions:
+Function: "acos":
+ildouble: 1150
+ldouble: 1150
+
+Function: "acosh":
+ildouble: 1
+ldouble: 1
+
+Function: "asin":
+double: 1
+idouble: 1
+ildouble: 1147
+ldouble: 1147
+
+Function: "asinh":
+ildouble: 656
+ldouble: 656
+
+Function: "atan":
+ildouble: 549
+ldouble: 549
+
+Function: "atan2":
+ildouble: 549
+ldouble: 549
+
+Function: "atanh":
+double: 1
+idouble: 1
+ildouble: 1606
+ldouble: 1606
+
+Function: "cabs":
+float: 1
+ifloat: 1
+ildouble: 560
+ldouble: 560
+
+Function: Real part of "cacos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 151
+ldouble: 151
+
+Function: Imaginary part of "cacos":
+float: 2
+ifloat: 2
+ildouble: 329
+ldouble: 329
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+ildouble: 328
+ldouble: 328
+
+Function: Imaginary part of "cacosh":
+double: 1
+idouble: 1
+ildouble: 151
+ldouble: 151
+
+Function: Real part of "casin":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 603
+ldouble: 603
+
+Function: Imaginary part of "casin":
+float: 2
+ifloat: 2
+ildouble: 329
+ldouble: 329
+
+Function: Real part of "casinh":
+double: 6
+float: 19
+idouble: 6
+ifloat: 19
+ildouble: 891
+ldouble: 891
+
+Function: Imaginary part of "casinh":
+double: 13
+float: 2
+idouble: 13
+ifloat: 2
+ildouble: 11
+ldouble: 11
+
+Function: Real part of "catan":
+ildouble: 250
+ldouble: 250
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 474
+ldouble: 474
+
+Function: Real part of "catanh":
+ildouble: 66
+ldouble: 66
+
+Function: Imaginary part of "catanh":
+ildouble: 447
+ldouble: 447
+
+Function: "cbrt":
+double: 1
+idouble: 1
+ildouble: 948
+ldouble: 948
+
+Function: Real part of "ccos":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1901
+ldouble: 1901
+
+Function: Real part of "ccosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 1467
+ldouble: 1467
+
+Function: Imaginary part of "ccosh":
+float: 1
+ifloat: 1
+ildouble: 1182
+ldouble: 1182
+
+Function: Real part of "cexp":
+float: 3
+ifloat: 3
+ildouble: 940
+ldouble: 940
+
+Function: Imaginary part of "cexp":
+float: 2
+ifloat: 2
+ildouble: 1067
+ldouble: 1067
+
+Function: Imaginary part of "clog":
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1402
+ldouble: 1402
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 187
+ldouble: 187
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 529
+ldouble: 529
+
+Function: "cosh":
+ildouble: 309
+ldouble: 309
+
+Function: Real part of "cpow":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cpow":
+double: 1.103
+float: 6
+idouble: 1.103
+ifloat: 6
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "csin":
+float: 1
+ifloat: 1
+ildouble: 966
+ldouble: 966
+
+Function: Imaginary part of "csin":
+float: 1
+ifloat: 1
+ildouble: 168
+ldouble: 168
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 413
+ldouble: 413
+
+Function: Imaginary part of "csinh":
+float: 1
+ifloat: 1
+ildouble: 477
+ldouble: 477
+
+Function: Real part of "csqrt":
+float: 1
+ifloat: 1
+ildouble: 237
+ldouble: 237
+
+Function: Imaginary part of "csqrt":
+ildouble: 128
+ldouble: 128
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 689
+ldouble: 689
+
+Function: Imaginary part of "ctan":
+ildouble: 367
+ldouble: 367
+
+Function: Real part of "ctanh":
+float: 1
+ifloat: 1
+ildouble: 285
+ldouble: 285
+
+Function: Imaginary part of "ctanh":
+double: 1
+idouble: 1
+ildouble: 3074
+ldouble: 3074
+
+Function: "erfc":
+double: 24
+float: 11
+idouble: 24
+ifloat: 11
+
+Function: "exp":
+ildouble: 412
+ldouble: 412
+
+Function: "exp10":
+double: 1
+idouble: 1
+ildouble: 1182
+ldouble: 1182
+
+Function: "exp2":
+ildouble: 461
+ldouble: 461
+
+Function: "expm1":
+ildouble: 825
+ldouble: 825
+
+Function: "fmod":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4096
+ldouble: 4096
+
+Function: "hypot":
+float: 1
+ifloat: 1
+ildouble: 560
+ldouble: 560
+
+Function: "j0":
+float: 3
+ifloat: 3
+
+Function: "j1":
+float: 2
+ifloat: 2
+
+Function: "jn":
+double: 4
+float: 9
+idouble: 4
+ifloat: 9
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2342
+ldouble: 2342
+
+Function: "log10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2033
+ldouble: 2033
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 584
+ldouble: 584
+
+Function: "log2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1689
+ldouble: 1689
+
+Function: "pow":
+ildouble: 725
+ldouble: 725
+
+Function: "sin":
+ildouble: 627
+ldouble: 627
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 627
+ldouble: 627
+
+Function: "sinh":
+float: 1
+ifloat: 1
+ildouble: 1028
+ldouble: 1028
+
+Function: "sqrt":
+ildouble: 489
+ldouble: 489
+
+Function: "tan":
+double: 0.5
+idouble: 0.5
+ildouble: 1401
+ldouble: 1401
+
+Function: "tanh":
+ildouble: 519
+ldouble: 519
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "y1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "yn":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2fb0972b5448ada7128009ea484b5b35e3bc090
commit d2fb0972b5448ada7128009ea484b5b35e3bc090
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 22 07:35:56 2000 +0000
Alpha specific ulps.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
new file mode 100644
index 0000000..515d071
--- /dev/null
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -0,0 +1,1079 @@
+# Begin of automatic generation
+
+# asin
+Test "asin (-0.5) == -pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.5) == pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.7) == 0.7753974966107530637":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# atanh
+Test "atanh (0.7) == 0.8673005276940531944":
+double: 1
+idouble: 1
+
+# cabs
+Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# casin
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+float: 1
+ifloat: 1
+
+# catan
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+float: 3
+ifloat: 3
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+float: 4
+ifloat: 4
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+double: 1
+idouble: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+double: 4
+idouble: 4
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+float: 4
+ifloat: 4
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.970299) == 0.99":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+idouble: 1
+
+# cexp
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+float: 1
+ifloat: 1
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+float: 1
+ifloat: 1
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+float: 1
+ifloat: 1
+
+# cos
+Test "cos (0.7) == 0.7648421872844884262":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "cos (pi/2) == 0":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+
+# cpow
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+# csin
+Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+float: 1
+ifloat: 1
+
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+float: 1
+ifloat: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# erfc
+Test "erfc (0.7) == 0.32219880616258152702":
+double: 1
+idouble: 1
+Test "erfc (1.2) == 0.089686021770364619762":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "erfc (2.0) == 0.0046777349810472658379":
+double: 1
+idouble: 1
+Test "erfc (4.1) == 0.67000276540848983727e-8":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.7) == 5.0118723362727228500":
+float: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# expm1
+Test "expm1 (1) == M_El - 1.0":
+float: 1
+ifloat: 1
+
+# fmod
+Test "fmod (-6.5, -2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (-6.5, 2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, -2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, 2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "j0 (8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+
+# j1
+Test "j1 (10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "j1 (2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+
+# jn
+Test "jn (0, 10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "jn (0, 2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "jn (0, 8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "jn (1, 2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+Test "jn (10, 0.1) == 0.26905328954342155795e-19":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+Test "jn (10, 0.7) == 0.75175911502153953928e-11":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (10, 10.0) == 0.20748610663335885770":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.1) == 0.000020820315754756261429":
+double: 1
+idouble: 1
+Test "jn (3, 0.7) == 0.0069296548267508408077":
+float: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.058379379305186812343":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (3, 2.0) == 0.12894324947440205110":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log
+Test "log (0.7) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log10
+Test "log10 (0.7) == -0.15490195998574316929":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.3) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log2
+Test "log2 (0.7) == -0.51457317282975824043":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# sincos
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
+float: 1
+ifloat: 1
+
+# sinh
+Test "sinh (0.7) == 0.75858370183953350346":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tan
+Test "tan (pi/4) == 1":
+double: 0.5
+idouble: 0.5
+
+# tanh
+Test "tanh (0.7) == 0.60436777711716349631":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "y1 (0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "y1 (10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# yn
+Test "yn (0, 0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "yn (1, 0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (10, 0.1) == -0.11831335132045197885e19":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "yn (10, 0.7) == -0.42447194260703866924e10":
+double: 3
+idouble: 3
+Test "yn (10, 1.0) == -0.12161801427868918929e9":
+double: 1
+idouble: 1
+Test "yn (10, 10.0) == -0.35981415218340272205":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.54220803928264":
+double: 2
+idouble: 2
+Test "yn (3, 0.1) == -5099.3323786129048894":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 0.7) == -15.819479052819633505":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (3, 10.0) == -0.25136265718383732978":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.1277837768404277861":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "asin":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atanh":
+double: 1
+idouble: 1
+
+Function: "cabs":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cacos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cacos":
+float: 1
+ifloat: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "casin":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: Imaginary part of "casin":
+float: 1
+ifloat: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+
+Function: Real part of "catan":
+float: 4
+ifloat: 4
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+Function: "cbrt":
+double: 1
+idouble: 1
+
+Function: Real part of "ccos":
+double: 1
+idouble: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+
+Function: Imaginary part of "cpow":
+double: 1.1031
+float: 2
+idouble: 1.1031
+ifloat: 2
+
+Function: Imaginary part of "csin":
+float: 1
+ifloat: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "csqrt":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "erfc":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+Function: "expm1":
+float: 1
+ifloat: 1
+
+Function: "fmod":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "hypot":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan":
+double: 0.5
+idouble: 0.5
+
+Function: "tanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8f2a6fa36ef418ce6fc10883911d4209a84dab2
commit f8f2a6fa36ef418ce6fc10883911d4209a84dab2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 19 00:18:10 2000 +0000
Add fpu/fenv_libc.h.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index 7c7e545..5ad586d 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -4,6 +4,7 @@ rtld-parms
regdef.h
sgidefs.h
fpregdef.h
+fpu/fenv_libc.h
sys/fpregdef.h
sys/regdef.h
sys/asm.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=921bb2c3002fea36e16cc2c96e67411fb48c6c8d
commit 921bb2c3002fea36e16cc2c96e67411fb48c6c8d
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Sep 18 16:40:35 2000 +0000
* sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Reformat. Declare
as function.
(_RTLD_EPILOGUE): Reformat. Declare size of entry function.
(ELF_MACHINE_BEFORE_RTLD_RELOC): Relocate the dynamic linker itself so
it will even work when not loaded to the standard address.
(RTLD_START): Reformat. Call _dl_start in a way that is safe even
before the dynamic linker itself is relocated.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 0d2bf9d..6d95705 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -37,13 +37,17 @@
#define OFFSET_GP_GOT 0x7ff0
#ifndef _RTLD_PROLOGUE
-# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \
- "\n\t.ent " __STRING(entry) \
- "\n\t" __STRING(entry) ":\n\t"
+# define _RTLD_PROLOGUE(entry) \
+ ".globl\t" __STRING(entry) "\n\t" \
+ ".ent\t" __STRING(entry) "\n\t" \
+ ".type\t" __STRING(entry) ", @function\n" \
+ __STRING(entry) ":\n\t"
#endif
#ifndef _RTLD_EPILOGUE
-# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n"
+# define _RTLD_EPILOGUE(entry) \
+ ".end\t" __STRING(entry) "\n\t" \
+ ".size\t" __STRING(entry) ", . - " __STRING(entry) "\n\t"
#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
@@ -134,6 +138,60 @@ elf_machine_load_address (void)
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+/* We can't rely on elf_machine_got_rel because _dl_object_relocation_scope
+ fiddles with global data. */
+#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
+do { \
+ struct link_map *map = &bootstrap_map; \
+ ElfW(Sym) *sym; \
+ ElfW(Addr) *got; \
+ int i, n; \
+ \
+ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]); \
+ \
+ \
+ if (__builtin_expect (map->l_addr == 0, 1)) \
+ goto done; \
+ \
+ /* got[0] is reserved. got[1] is also reserved for the dynamic object \
+ generated by gnu ld. Skip these reserved entries from \
+ relocation. */ \
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; \
+ n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
+ \
+ /* Add the run-time display to all local got entries. */ \
+ while (i < n) \
+ got[i++] += map->l_addr; \
+ \
+ /* Handle global got entries. */ \
+ got += n; \
+ sym = (ElfW(Sym) *) D_PTR(map, l_info[DT_SYMTAB]) \
+ + map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
+ i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val \
+ - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val); \
+ \
+ while (i--) \
+ { \
+ if (sym->st_shndx == SHN_UNDEF || sym->st_shndx == SHN_COMMON) \
+ *got = map->l_addr + sym->st_value; \
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC \
+ && *got != sym->st_value) \
+ *got += map->l_addr; \
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION) \
+ { \
+ if (sym->st_other == 0) \
+ *got += map->l_addr; \
+ } \
+ else \
+ *got = map->l_addr + sym->st_value; \
+ \
+ got++; \
+ sym++; \
+ } \
+done: \
+} while(0)
+
+
/* Get link map for callers object containing STUB_PC. */
static inline struct link_map *
elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
@@ -354,10 +412,10 @@ _dl_runtime_resolve:\n \
2) That under Linux the entry is named __start
and not just plain _start. */
-#define RTLD_START asm ("\
- .text\n"\
-_RTLD_PROLOGUE(ENTRY_POINT)\
-" .globl _dl_start_user\n\
+#define RTLD_START asm (\
+ ".text\n"\
+ _RTLD_PROLOGUE(ENTRY_POINT)\
+ ".set noreorder\n\
.set noreorder\n\
bltzal $0, 0f\n\
nop\n\
@@ -371,10 +429,19 @@ _RTLD_PROLOGUE(ENTRY_POINT)\
sw $4, -0x7ff0($28)\n\
move $4, $29\n\
subu $29, 16\n\
- jal _dl_start\n\
+ \n\
+ la $8, coff\n\
+ bltzal $8, coff\n\
+coff: subu $8, $31, $8\n\
+ \n\
+ la $25, _dl_start\n\
+ addu $25, $8\n\
+ jalr $25\n\
+ \n\
addiu $29, 16\n\
# Get the value of label '_dl_start_user' in t9 ($25).\n\
la $25, _dl_start_user\n\
+ .globl _dl_start_user\n\
_dl_start_user:\n\
.set noreorder\n\
.cpload $25\n\
@@ -410,9 +477,9 @@ _dl_start_user:\n\
la $2, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
- jr $25\n"\
-_RTLD_EPILOGUE(ENTRY_POINT)\
- "\n.previous"\
+ jr $25\n\t"\
+ _RTLD_EPILOGUE(ENTRY_POINT)\
+ ".previous"\
);
/* The MIPS never uses Elfxx_Rela relocations. */
@@ -513,7 +580,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
- i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1;
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
/* Add the run-time display to all local got entries if needed. */
if (__builtin_expect (map->l_addr != 0, 0))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56eb5d143239d9e1b586081d878c1910174a33b4
commit 56eb5d143239d9e1b586081d878c1910174a33b4
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Sep 18 16:39:45 2000 +0000
Add ipc_priv.h.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index d8943b6..a983244 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -1,6 +1,7 @@
_test_and_set.c
clone.S
entry.h
+ipc_priv.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9128d5fd877503ec7fef5069f03d5c02f02bc656
commit 9128d5fd877503ec7fef5069f03d5c02f02bc656
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Sep 18 16:39:27 2000 +0000
MIPS specific file. MIPS always had 32 bit uids.
diff --git a/sysdeps/unix/sysv/linux/mips/ipc_priv.h b/sysdeps/unix/sysv/linux/mips/ipc_priv.h
new file mode 100644
index 0000000..9b85386
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ipc_priv.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/alpha/ipc_priv.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e69ea461c50d0cd38c812dd3fef898fc49a40f5d
commit e69ea461c50d0cd38c812dd3fef898fc49a40f5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 18 00:28:16 2000 +0000
(INLINE_SYSCALL): Fix last patch.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index e10c788..39b7bda 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \
asm volatile ("trap #0" \
: "=d" (_d0) \
: "0" (_d0) ASM_ARGS_##nr \
- : "d0" : "memory"); \
+ : "d0", "memory"); \
_sys_result = _d0; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62f2f67818894354cbe6ff6dfaa0cc6b7868abee
commit 62f2f67818894354cbe6ff6dfaa0cc6b7868abee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 17 19:54:50 2000 +0000
(INLINE_SYSCALL): Fix last patch.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 1fae6c1..79453f8 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -131,7 +131,7 @@
asm volatile ("swi %1 @ syscall " #name \
: "=r" (_a1) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
- : "a1" : "memory"); \
+ : "a1", "memory"); \
_sys_result = _a1; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efc4903b91333d74ebf1fadbd9e881874267891d
commit efc4903b91333d74ebf1fadbd9e881874267891d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 16 22:59:10 2000 +0000
Reorder ieee754 implies so that ldbl-* comes first.
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
index b64e753..5c778d4 100644
--- a/sysdeps/m68k/Implies
+++ b/sysdeps/m68k/Implies
@@ -1,5 +1,5 @@
wordsize-32
# 68k uses IEEE 754 floating point.
-ieee754/flt-32
-ieee754/dbl-64
ieee754/ldbl-96
+ieee754/dbl-64
+ieee754/flt-32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ebc36ad77d3370e2fa2b69c0be4440f690797f8
commit 8ebc36ad77d3370e2fa2b69c0be4440f690797f8
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 15 18:15:57 2000 +0000
(FE_NOMASK_ENV): Define.
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
index 72dd281..4e74036 100644
--- a/sysdeps/mips/bits/fenv.h
+++ b/sysdeps/mips/bits/fenv.h
@@ -70,3 +70,8 @@ fenv_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((__const fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5898ca31ae0dabd2513eb5f3a66789a2f2a4ce2b
commit 5898ca31ae0dabd2513eb5f3a66789a2f2a4ce2b
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 15 18:15:31 2000 +0000
(__fesetenv): Handle FE_NOMASK_ENV.
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index ab90e4d..ff84a41 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -32,6 +32,8 @@ __fesetenv (const fenv_t *envp)
if (envp == FE_DFL_ENV)
_FPU_SETCW (_FPU_DEFAULT);
+ else if (envp == FE_NOMASK_ENV)
+ _FPU_SETCW (_FPU_IEEE);
else
_FPU_SETCW (envp->__fp_control_register);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c09c05d8279659b06ac6ef26641b01be071f289c
commit c09c05d8279659b06ac6ef26641b01be071f289c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 15 17:48:53 2000 +0000
(INLINE_SYSCALL): Add memory clobber.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 1413a48..1fae6c1 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -131,7 +131,7 @@
asm volatile ("swi %1 @ syscall " #name \
: "=r" (_a1) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
- : "a1"); \
+ : "a1" : "memory"); \
_sys_result = _a1; \
} \
if (_sys_result >= (unsigned int) -4095) \
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index d445471..e10c788 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
December 1995.
@@ -171,7 +171,7 @@ SYSCALL_ERROR_LABEL: \
asm volatile ("trap #0" \
: "=d" (_d0) \
: "0" (_d0) ASM_ARGS_##nr \
- : "d0"); \
+ : "d0" : "memory"); \
_sys_result = _d0; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e228438b9e93edc807e78c283db0ed1bc56da25
commit 6e228438b9e93edc807e78c283db0ed1bc56da25
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 15 17:48:15 2000 +0000
(inline_syscall_clobbers): Add memory clobber.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 80cb3e2..5bedcf9 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -131,7 +131,7 @@ __LABEL(name) \
#define inline_syscall_clobbers \
"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
- "$22", "$23", "$24", "$25", "$27", "$28"
+ "$22", "$23", "$24", "$25", "$27", "$28", "memory"
/* It is moderately important optimization-wise to limit the lifetime
of the hard-register variables as much as possible. Thus we copy
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9bfc800ccc07e0c007f172de6bee53e19f78de8
commit d9bfc800ccc07e0c007f172de6bee53e19f78de8
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 15 12:57:40 2000 +0000
Use fenv_libc.h
diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c
index 1ca229f..2d2ec8c 100644
--- a/sysdeps/mips/fpu/fedisblxcpt.c
+++ b/sysdeps/mips/fpu/fedisblxcpt.c
@@ -19,11 +19,9 @@
Boston, MA 02111-1307, USA. */
#include <fenv.h>
+#include <fenv_libc.h>
#include <fpu_control.h>
-#define ENABLE_MASK 0xF80U
-#define ENABLE_SHIFT 5
-
int
fedisableexcept (int excepts)
{
diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c
index e6175dd..4e63c66 100644
--- a/sysdeps/mips/fpu/feenablxcpt.c
+++ b/sysdeps/mips/fpu/feenablxcpt.c
@@ -19,11 +19,9 @@
Boston, MA 02111-1307, USA. */
#include <fenv.h>
+#include <fenv_libc.h>
#include <fpu_control.h>
-#define ENABLE_MASK 0xF80U
-#define ENABLE_SHIFT 5
-
int
feenableexcept (int excepts)
{
diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c
index 23da9f3..c065398 100644
--- a/sysdeps/mips/fpu/fegetexcept.c
+++ b/sysdeps/mips/fpu/fegetexcept.c
@@ -19,12 +19,9 @@
Boston, MA 02111-1307, USA. */
#include <fenv.h>
+#include <fenv_libc.h>
#include <fpu_control.h>
-#define ENABLE_MASK 0xF80U
-#define ENABLE_SHIFT 5
-
-
int
fegetexcept (void)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73675ea1ecd283a172d6a26869ae26a1ed9bdd95
commit 73675ea1ecd283a172d6a26869ae26a1ed9bdd95
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 15 12:57:14 2000 +0000
New file, common definitions for feenableexcept/fedisableexcept/fegetexcept.
diff --git a/sysdeps/mips/fpu/fenv_libc.h b/sysdeps/mips/fpu/fenv_libc.h
new file mode 100644
index 0000000..4d8d3eb
--- /dev/null
+++ b/sysdeps/mips/fpu/fenv_libc.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_LIBC_H
+#define _FENV_LIBC_H 1
+
+/* Mask for enabling exceptions. */
+#define ENABLE_MASK 0xF80U
+
+/* Shift for FE_* flags. */
+#define ENABLE_SHIFT 5
+
+#endif /* _FENV_LIBC_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09ab85fedc0941186f03fea7be10956828ac2902
commit 09ab85fedc0941186f03fea7be10956828ac2902
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 15 12:24:49 2000 +0000
MIPS specific version s of feenableexcept, fedisableexcept, fegetexcept.
diff --git a/sysdeps/mips/fpu/fedisblxcpt.c b/sysdeps/mips/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..1ca229f
--- /dev/null
+++ b/sysdeps/mips/fpu/fedisblxcpt.c
@@ -0,0 +1,44 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#define ENABLE_MASK 0xF80U
+#define ENABLE_SHIFT 5
+
+int
+fedisableexcept (int excepts)
+{
+ unsigned int new_exc, old_exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (new_exc);
+
+ old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc &= ~(excepts << ENABLE_SHIFT);
+ new_exc &= ~_FPU_RESERVED;
+ _FPU_SETCW (new_exc);
+
+ return old_exc;
+}
diff --git a/sysdeps/mips/fpu/feenablxcpt.c b/sysdeps/mips/fpu/feenablxcpt.c
new file mode 100644
index 0000000..e6175dd
--- /dev/null
+++ b/sysdeps/mips/fpu/feenablxcpt.c
@@ -0,0 +1,44 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#define ENABLE_MASK 0xF80U
+#define ENABLE_SHIFT 5
+
+int
+feenableexcept (int excepts)
+{
+ unsigned int new_exc, old_exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (new_exc);
+
+ old_exc = (new_exc & ENABLE_MASK) >> ENABLE_SHIFT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc |= excepts << ENABLE_SHIFT;
+ new_exc &= ~_FPU_RESERVED;
+ _FPU_SETCW (new_exc);
+
+ return old_exc;
+}
diff --git a/sysdeps/mips/fpu/fegetexcept.c b/sysdeps/mips/fpu/fegetexcept.c
new file mode 100644
index 0000000..23da9f3
--- /dev/null
+++ b/sysdeps/mips/fpu/fegetexcept.c
@@ -0,0 +1,37 @@
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+#define ENABLE_MASK 0xF80U
+#define ENABLE_SHIFT 5
+
+
+int
+fegetexcept (void)
+{
+ unsigned int exc;
+
+ /* Get the current control word. */
+ _FPU_GETCW (exc);
+
+ return (exc & ENABLE_MASK) >> ENABLE_SHIFT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37b1259bd55f1e156578367406e1ba3220fcba2f
commit 37b1259bd55f1e156578367406e1ba3220fcba2f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 14 01:40:14 2000 +0000
(__cmsg_nxthdr): Fix test for no more entries.
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
index eb5b766..febfc72 100644
--- a/sysdeps/unix/sysv/aix/bits/socket.h
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -243,7 +243,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+ > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return 0;
return __cmsg;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index d8626c2..ac7ff07 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -267,7 +267,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ __mhdr->msg_controllen)
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
- >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+ > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return 0;
return __cmsg;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b5887d3e4e7e09d11e77a0b2f7a08e4ef686952
commit 2b5887d3e4e7e09d11e77a0b2f7a08e4ef686952
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 13 21:46:56 2000 +0000
(CLOCKS_PER_SEC): Make a long int constant since this is what clock_t is.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index ed9382b..a0eddbe 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -31,7 +31,7 @@
/* CAE XSH, Issue 4, Version 2: <time.h>
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000
+# define CLOCKS_PER_SEC 1000000l
# ifndef __STRICT_ANSI__
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2747c0eab5e85418498def16aa91f36bd9855808
commit 2747c0eab5e85418498def16aa91f36bd9855808
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Sep 8 08:12:57 2000 +0000
* sysdeps/unix/sysv/linux/arm/lockf64.c: New file.
* sysdeps/unix/sysv/linux/arm/fcntl.c: New file.
* sysdeps/unix/sysv/linux/arm/bits/fcntl.h
(F_GETLK64,F_SETLK64,F_SETLKW64): Use values from 2.4.0-test8.
(F_GETLK,F_SETLK,F_SETLKW): Handle __USE_FILE_OFFSET64 correctly.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index de1dd4a..deaa183 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -65,14 +65,19 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#define F_GETLK 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW 7 /* Set record locking info (blocking). */
-
-/* XXX missing */
-#define F_GETLK64 5 /* Get record locking info. */
-#define F_SETLK64 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 7 /* Set record locking info (blocking). */
+
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 12 /* Get record locking info. */
+#define F_SETLK64 13 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
diff --git a/sysdeps/unix/sysv/linux/arm/fcntl.c b/sysdeps/unix/sysv/linux/arm/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/sysdeps/unix/sysv/linux/arm/lockf64.c b/sysdeps/unix/sysv/linux/arm/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fafed084cd81d76ddc4fadea848c94f7b965eca7
commit fafed084cd81d76ddc4fadea848c94f7b965eca7
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 15:44:36 2000 +0000
Fix last checkin.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index c182f6c..67f3cd2 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -50,7 +50,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
s_execve execve execve i:spp __syscall_execve
-s_fcntl - fcntl i:iiF __syscall_fcntl
+s_fcntl fcntl fcntl i:iiF __syscall_fcntl
s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d767c6f449f20903c19d1931b1e15dd6f3419a4f
commit d767c6f449f20903c19d1931b1e15dd6f3419a4f
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 15:44:15 2000 +0000
Linux/MIPS specific lockf64 version.
diff --git a/sysdeps/unix/sysv/linux/mips/lockf64.c b/sysdeps/unix/sysv/linux/mips/lockf64.c
new file mode 100644
index 0000000..a88f5a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e817c4e870ecbb3e50d469b4b8e2020373fb91c
commit 5e817c4e870ecbb3e50d469b4b8e2020373fb91c
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 14:53:05 2000 +0000
* sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Fix calls to
dl_lookup.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index d1ac5cc..0d2bf9d 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -262,14 +262,14 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
&sym, l->l_scope, version,\
- R_MIPS_REL32); \
+ R_MIPS_REL32, 0); \
break; \
} \
/* Fall through. */ \
} \
case 0: \
value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
- l->l_scope, R_MIPS_REL32); \
+ l->l_scope, R_MIPS_REL32, 0); \
} \
\
/* Currently value contains the base load address of the object \
@@ -495,14 +495,14 @@ elf_machine_got_rel (struct link_map *map, int lazy)
value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
map, \
&ref, scope, version, \
- R_MIPS_REL32); \
+ R_MIPS_REL32, 0); \
break; \
} \
/* Fall through. */ \
} \
case 0: \
value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
- scope, R_MIPS_REL32); \
+ scope, R_MIPS_REL32, 0); \
} \
\
(ref)? value + ref->st_value: 0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8915f93dda631a48e8938224fe38717b673b1a2
commit f8915f93dda631a48e8938224fe38717b673b1a2
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 14:51:43 2000 +0000
Add __syscall_fcntl.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 1dfd983..c182f6c 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -50,6 +50,7 @@ rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
s_execve execve execve i:spp __syscall_execve
+s_fcntl - fcntl i:iiF __syscall_fcntl
s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5274d0e37c3d56018d30fa31c100217dc5791eab
commit 5274d0e37c3d56018d30fa31c100217dc5791eab
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 11:56:20 2000 +0000
fcntl/fcntl64 for Linux/MIPS.
diff --git a/sysdeps/unix/sysv/linux/mips/fcntl.c b/sysdeps/unix/sysv/linux/mips/fcntl.c
new file mode 100644
index 0000000..ea951bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a20032ae23a2bbce9f9a60faf642ce146dcd0787
commit a20032ae23a2bbce9f9a60faf642ce146dcd0787
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 08:17:25 2000 +0000
Add getdents64.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 71a1aa2..1dfd983 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -54,6 +54,7 @@ s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
s_getdents getdents getdents i:ipi __syscall_getdents
+s_getdents64 getdents getdents64 i:ipi __syscall_getdents64
s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg
s_getpriority getpriority getpriority i:ii __syscall_getpriority
getresgid - getresgid i:ppp getresgid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b42bd0f5909c7d04ae60a9eebee5a0c27307811d
commit b42bd0f5909c7d04ae60a9eebee5a0c27307811d
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Sep 7 08:17:04 2000 +0000
(SYS_getdents64): New.
(SYS_fcntl64): New.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
index ccbacd7..78248a1 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -19,11 +19,6 @@
#ifndef _SYSCALL_H
#define _SYSCALL_H 1
-/* This file should list the numbers of the system the system knows.
- But instead of duplicating this we use the information available
- from the kernel sources. */
-#include <asm/unistd.h>
-
/*
* SVR4 syscalls are in the range from 1 to 999
*/
@@ -1212,6 +1207,8 @@
#define SYS_pivot_root (SYS_Linux + 216)
#define SYS_mincore (SYS_Linux + 217)
#define SYS_madvise (SYS_Linux + 218)
+#define SYS_getdents64 (SYS_Linux + 219)
+#define SYS_fcntl64 (SYS_Linux + 220)
#endif /* sys/syscall.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=610bd8dec7f52d6cf20ff89f8f27955c31bc02f6
commit 610bd8dec7f52d6cf20ff89f8f27955c31bc02f6
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Sep 6 10:52:05 2000 +0000
New file with soft-fp specific files.
diff --git a/sysdeps/alpha/soft-fp/Dist b/sysdeps/alpha/soft-fp/Dist
new file mode 100644
index 0000000..7e9914f
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/Dist
@@ -0,0 +1 @@
+sfp-machine.h
diff --git a/sysdeps/mips/mips64/soft-fp/Dist b/sysdeps/mips/mips64/soft-fp/Dist
new file mode 100644
index 0000000..7e9914f
--- /dev/null
+++ b/sysdeps/mips/mips64/soft-fp/Dist
@@ -0,0 +1 @@
+sfp-machine.h
diff --git a/sysdeps/mips/soft-fp/Dist b/sysdeps/mips/soft-fp/Dist
new file mode 100644
index 0000000..7e9914f
--- /dev/null
+++ b/sysdeps/mips/soft-fp/Dist
@@ -0,0 +1 @@
+sfp-machine.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e54ab950c879c7dec4f3d2f95b49cc77b5784ce
commit 7e54ab950c879c7dec4f3d2f95b49cc77b5784ce
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Sep 6 08:21:55 2000 +0000
[$(subdir) = misc]: Use sysdep_headers instead of headers for make dist.
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 54b3520..849785a 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -1,5 +1,6 @@
ifeq ($(subdir),misc)
-headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h sys/asm.h sgidefs.h
+sysdep_headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h \
+ sys/asm.h sgidefs.h
endif
ifeq ($(subdir),setjmp)
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 65365e1..1f9fc2d 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -7,5 +7,5 @@ endif
ifeq ($(subdir),misc)
sysdep_routines += cachectl cacheflush sysmips _test_and_set
-headers += sys/cachectl.h sys/sysmips.h sys/tas.h
+sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e739de1170607e948d663a300e9329e0881d2dd7
commit e739de1170607e948d663a300e9329e0881d2dd7
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 5 19:33:23 2000 +0000
Follow changes for <bits/stat.h>
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
index 356235a..583b1ec 100644
--- a/sysdeps/unix/sysv/linux/mips/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
/* Convert to current kernel version of `struct stat'. */
buf->st_dev = kbuf->st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
buf->st_ino = kbuf->st_ino;
buf->st_mode = kbuf->st_mode;
buf->st_nlink = kbuf->st_nlink;
@@ -50,15 +50,15 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
buf->st_size = kbuf->st_size;
buf->st_blksize = kbuf->st_blksize;
buf->st_blocks = kbuf->st_blocks;
-
+
buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
-
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+
+ buf->st_pad5[0] = 0; buf->st_pad5[1] = 0;
+ buf->st_pad5[2] = 0; buf->st_pad5[3] = 0;
+ buf->st_pad5[4] = 0; buf->st_pad5[5] = 0;
+ buf->st_pad5[6] = 0; buf->st_pad5[7] = 0;
}
break;
@@ -83,14 +83,14 @@ xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
struct stat64 *buf = ubuf;
buf->st_dev = kbuf->st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
buf->st_ino = kbuf->st_ino;
buf->st_mode = kbuf->st_mode;
buf->st_nlink = kbuf->st_nlink;
buf->st_uid = kbuf->st_uid;
buf->st_gid = kbuf->st_gid;
buf->st_rdev = kbuf->st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0; buf->st_pad2[2] = 0;
buf->st_pad3 = 0;
buf->st_size = kbuf->st_size;
buf->st_blksize = kbuf->st_blksize;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90d3df7387bc22fd080cb8bf73056e9578a2a2d2
commit 90d3df7387bc22fd080cb8bf73056e9578a2a2d2
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 5 19:33:13 2000 +0000
Use st_pad5.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 40f42f1..37c303b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -74,7 +74,7 @@ struct stat
long int st_pad4;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
#endif
- long int st_pad4[14];
+ long int st_pad5[14];
};
#ifdef __USE_LARGEFILE64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ef46d7cc8b867c6c6c2cc5b4f8f0f469a0fdcbc
commit 6ef46d7cc8b867c6c6c2cc5b4f8f0f469a0fdcbc
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Sep 5 15:17:27 2000 +0000
New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
new file mode 100644
index 0000000..99c068a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -0,0 +1,155 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#ifdef __USE_GNU
+# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_DIRECT 0200000 /* Direct disk access. */
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0400000
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 12 /* Get record locking info. */
+#define F_SETLK64 13 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 14 /* Set record locking info (blocking). */
+
+#if defined __USE_BSD || defined __USE_XOPEN2K
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
+
+/* For old implementation of bsd flock(). */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation. */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8025e8342763bb7937bc982e88e47e62fc8dd47f
commit 8025e8342763bb7937bc982e88e47e62fc8dd47f
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 5 08:41:37 2000 +0000
Moved from soft-fp/sysdeps/mips/sfp-machine.h.
diff --git a/sysdeps/mips/soft-fp/sfp-machine.h b/sysdeps/mips/soft-fp/sfp-machine.h
new file mode 100644
index 0000000..3b2a40f
--- /dev/null
+++ b/sysdeps/mips/soft-fp/sfp-machine.h
@@ -0,0 +1,47 @@
+#define _FP_W_TYPE_SIZE 32
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(S,R,X,Y)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
+
+#define _FP_KEEPNANFRACP 1
+/* From my experiments it seems X is chosen unless one of the
+ NaNs is sNaN, in which case the result is NANSIGN/NANFRAC. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ if ((_FP_FRAC_HIGH_RAW_##fs(X) | \
+ _FP_FRAC_HIGH_RAW_##fs(Y)) & _FP_QNANBIT_##fs) \
+ { \
+ R##_s = _FP_NANSIGN_##fs; \
+ _FP_FRAC_SET_##wc(R,_FP_NANFRAC_##fs); \
+ } \
+ else \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ } \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
+
+#define FP_EX_INVALID (1 << 4)
+#define FP_EX_DIVZERO (1 << 3)
+#define FP_EX_OVERFLOW (1 << 2)
+#define FP_EX_UNDERFLOW (1 << 1)
+#define FP_EX_INEXACT (1 << 0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97d95c734da006e8ab49878b1e1fdbd69c01dd3c
commit 97d95c734da006e8ab49878b1e1fdbd69c01dd3c
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 5 08:40:54 2000 +0000
Moved from soft-fp/sysdeps/alpha/sfp-machine.h.
diff --git a/sysdeps/alpha/soft-fp/sfp-machine.h b/sysdeps/alpha/soft-fp/sfp-machine.h
new file mode 100644
index 0000000..73b934d
--- /dev/null
+++ b/sysdeps/alpha/soft-fp/sfp-machine.h
@@ -0,0 +1,35 @@
+#define _FP_W_TYPE_SIZE 64
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _alpha_mul_64_128(rhi, rlo, x, y) \
+ __asm__("umulh %2,%3,%0; mulq %2,%3,%1" \
+ : "=&r"(rhi), "=r"(rlo) : "r"(x), "r"(y))
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,_alpha_mul_64_128)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_2_wide(_FP_WFRACBITS_Q,R,X,Y,_alpha_mul_64_128)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S _FP_QNANBIT_S
+#define _FP_NANFRAC_D _FP_QNANBIT_D
+#define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
+/* FIXME: This is just a wild guess */
+#define _FP_NANSIGN_S 1
+#define _FP_NANSIGN_D 1
+#define _FP_NANSIGN_Q 1
+
+#define _FP_KEEPNANFRACP 1
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ R##_s = Y##_s; \
+ _FP_FRAC_COPY_##wc(R,Y); \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1db6393c86325da3f43b502d321ffa52e0fc2a9e
commit 1db6393c86325da3f43b502d321ffa52e0fc2a9e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Sep 5 08:37:09 2000 +0000
Moved from soft-fp/sysdeps/mips/mips64/sfp-machine.h
diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
new file mode 100644
index 0000000..730deae
--- /dev/null
+++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h
@@ -0,0 +1,47 @@
+#define _FP_W_TYPE_SIZE 64
+#define _FP_W_TYPE unsigned long
+#define _FP_WS_TYPE signed long
+#define _FP_I_TYPE long
+
+#define _FP_MUL_MEAT_S(R,X,Y) \
+ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y)
+#define _FP_MUL_MEAT_D(R,X,Y) \
+ _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
+#define _FP_MUL_MEAT_Q(R,X,Y) \
+ _FP_MUL_MEAT_2_wide_3mul(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
+
+#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_imm(S,R,X,Y,_FP_DIV_HELP_imm)
+#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_1_udiv_norm(D,R,X,Y)
+#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_2_udiv(Q,R,X,Y)
+
+#define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
+#define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1)
+#define _FP_NANFRAC_Q ((_FP_QNANBIT_Q << 1) - 1), -1
+#define _FP_NANSIGN_S 0
+#define _FP_NANSIGN_D 0
+#define _FP_NANSIGN_Q 0
+
+#define _FP_KEEPNANFRACP 1
+/* From my experiments it seems X is chosen unless one of the
+ NaNs is sNaN, in which case the result is NANSIGN/NANFRAC. */
+#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
+ do { \
+ if ((_FP_FRAC_HIGH_RAW_##fs(X) | \
+ _FP_FRAC_HIGH_RAW_##fs(Y)) & _FP_QNANBIT_##fs) \
+ { \
+ R##_s = _FP_NANSIGN_##fs; \
+ _FP_FRAC_SET_##wc(R,_FP_NANFRAC_##fs); \
+ } \
+ else \
+ { \
+ R##_s = X##_s; \
+ _FP_FRAC_COPY_##wc(R,X); \
+ } \
+ R##_c = FP_CLS_NAN; \
+ } while (0)
+
+#define FP_EX_INVALID (1 << 4)
+#define FP_EX_DIVZERO (1 << 3)
+#define FP_EX_OVERFLOW (1 << 2)
+#define FP_EX_UNDERFLOW (1 << 1)
+#define FP_EX_INEXACT (1 << 0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f727031ab28729e177e0019081ba97a69575db34
commit f727031ab28729e177e0019081ba97a69575db34
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Sep 2 15:03:41 2000 +0000
Fixes for fcntl64.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 189601c..853599f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -66,14 +66,19 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#define F_GETLK 14 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW 7 /* Set record locking info (blocking). */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 14 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+#endif
-/* XXX missing */
-#define F_GETLK64 14 /* Get record locking info. */
-#define F_SETLK64 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 7 /* Set record locking info (blocking). */
+#define F_GETLK64 33 /* Get record locking info. */
+#define F_SETLK64 34 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 35 /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
@@ -113,14 +118,16 @@ typedef struct flock
#ifndef __USE_FILE_OFFSET64
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
+ long int l_sysid; /* XXX */
#else
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
#endif
- long int l_sysid; /* XXX */
__pid_t l_pid; /* Process holding the lock. */
+#ifndef __USE_FILE_OFFSET64
long int pad[4]; /* XXX */
- } flock_t;
+#endif
+} flock_t;
#ifdef __USE_LARGEFILE64
struct flock64
@@ -129,9 +136,7 @@ struct flock64
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off64_t l_start; /* Offset where the lock begins. */
__off64_t l_len; /* Size of the locked area; zero means until EOF. */
- long int l_sysid; /* XXX */
__pid_t l_pid; /* Process holding the lock. */
- long int pad[4]; /* XXX */
};
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03a34c9bc21203699e0f6499247c9c791e3cebcb
commit 03a34c9bc21203699e0f6499247c9c791e3cebcb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 1 06:57:40 2000 +0000
(FP_ILOGB0): Use values which don't produce warnings.
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 7b09882..c3365a7 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -38,7 +38,7 @@ typedef long double double_t; /* `double' expressions are evaluated as
# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 (-2147483648)
+# define FP_ILOGB0 (-2147483647 - 1)
# define FP_ILOGBNAN (2147483647)
/* Number of decimal digits for the `long double' type. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d31dde9292544dcbed4a9fbde00125ee13b0c8c8
commit d31dde9292544dcbed4a9fbde00125ee13b0c8c8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 1 06:32:15 2000 +0000
Make FP_ILOGB0 and FP_ILOGBNAN int values.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 30f93dd..3b80e82 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -67,8 +67,8 @@ typedef double double_t;
# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 0x80000001
-# define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN (2147483647)
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
index cb0c348..374ad67 100644
--- a/sysdeps/arm/fpu/bits/mathdef.h
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -37,8 +37,8 @@ typedef double double_t; /* `double' expressions are evaluated as
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 0x80000001
-# define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN (2147483647)
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index c80dad3..7b09882 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,8 +38,8 @@ typedef long double double_t; /* `double' expressions are evaluated as
# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
-# define FP_ILOGB0 0x80000000
-# define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 (-2147483648)
+# define FP_ILOGBNAN (2147483647)
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=858db9cbc8e3286694a6874c282b759ddbe90a1f
commit 858db9cbc8e3286694a6874c282b759ddbe90a1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 1 04:41:12 2000 +0000
Change type of FE_*_ENV macros to const fenv_t*.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index b6d9b98..fe6c253 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -107,15 +107,15 @@ typedef unsigned long int fenv_t;
/* If the default argument is used we use this value. Note that due to
architecture-specified page mappings, no user-space pointer will ever
have its two high bits set. Co-opt one. */
-#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL)
+#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL)
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
+# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL)
/* Floating-point environment with (processor-dependent) non-IEEE floating
point. In this case, mapping denormals to zero. */
-# define FE_NONIEEE_ENV ((fenv_t *) 0x8800000000003000UL)
+# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL)
#endif
/* The system calls to talk to the kernel's FP code. */
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index 3138fef..7d489b3 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,9 +71,9 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
+# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
index efa90b6..72dd281 100644
--- a/sysdeps/mips/bits/fenv.h
+++ b/sysdeps/mips/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -69,4 +69,4 @@ typedef struct
fenv_t;
/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
+#define FE_DFL_ENV ((__const fenv_t *) -1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce5c1dab0dff8d85589639a27ff740fe85113103
commit ce5c1dab0dff8d85589639a27ff740fe85113103
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 27 01:01:17 2000 +0000
[$(subdir)==resource] (sysdep_routines): Add oldgetrlimit64.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 939c74c..6040b20 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -8,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
+
+ifeq ($(subdir),resource)
+sysdep_routines += oldgetrlimit64
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cdf9c9a59044dcb8b654ea7b932b9b106c8eed13
commit cdf9c9a59044dcb8b654ea7b932b9b106c8eed13
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 24 07:39:29 2000 +0000
Add fpu/fenv_libc.h.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 46cf351..034f0b0 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -6,3 +6,4 @@ remq.S
_mcount.S
stxcpy.S
stxncpy.S
+fpu/fenv_libc.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a58f487d7eda292dfb25dae8a11418f6d777fbed
commit a58f487d7eda292dfb25dae8a11418f6d777fbed
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Aug 23 06:54:33 2000 +0000
Use __setrlimit as strong name.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index df680ce..f695145 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -25,7 +25,7 @@ pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwr
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 setrlimit setrlimit64
+setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec8cf3da88dd97ba28cc11414bb92cc31ebfe7d9
commit ec8cf3da88dd97ba28cc11414bb92cc31ebfe7d9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 22 09:08:48 2000 +0000
(sysctl): Remove.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index d845761..df680ce 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -52,7 +52,6 @@ setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
-sysctl - _sysctl 6 __sysctl sysctl
getresuid - getresuid 3 getresuid
getresgid - getresgid 3 getresgid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=142652edb260b9ca68a0a108c2ba9c5dfce56303
commit 142652edb260b9ca68a0a108c2ba9c5dfce56303
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:38:21 2000 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c
deleted file mode 100644
index 0df2c8f..0000000
--- a/sysdeps/unix/sysv/linux/alpha/getdents64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c
deleted file mode 100644
index 300ebb2..0000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#define readdir64 __no_readdir64_decl
-#define __readdir64 __no___readdir64_decl
-#include <sysdeps/unix/readdir.c>
-#undef __readdir64
-strong_alias (__readdir, __readdir64)
-#undef readdir64
-weak_alias (__readdir, readdir64)
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64.c b/sysdeps/unix/sysv/linux/alpha/readdir64.c
deleted file mode 100644
index 9796431..0000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
deleted file mode 100644
index b8fe9a3..0000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
+++ /dev/null
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir_r.c b/sysdeps/unix/sysv/linux/alpha/readdir_r.c
deleted file mode 100644
index adb92db..0000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir_r.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define readdir64_r __no_readdir64_r_decl
-#include <sysdeps/unix/readdir_r.c>
-#undef readdir64_r
-weak_alias (__readdir_r, readdir64_r)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51977e0692ebbe16288c9414bc2149c0b4c25ec1
commit 51977e0692ebbe16288c9414bc2149c0b4c25ec1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:37:40 2000 +0000
Only use for non-LFS getdents.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c
index f127cd8..dfecfef 100644
--- a/sysdeps/unix/sysv/linux/alpha/getdents.c
+++ b/sysdeps/unix/sysv/linux/alpha/getdents.c
@@ -1,5 +1,3 @@
-#define DIRENT_TYPE struct dirent64
-#define __getdents64 __no___getdents64_decl
+#define DIRENT_SET_DP_INO(dp, value) \
+ do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0)
#include <sysdeps/unix/sysv/linux/getdents.c>
-#undef __getdents64
-weak_alias(__getdents, __getdents64);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e89ae2f4c2e598a1f1f800a99a48e9656b74440
commit 9e89ae2f4c2e598a1f1f800a99a48e9656b74440
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:14:56 2000 +0000
Linux/Arm version of glob64.
diff --git a/sysdeps/unix/sysv/linux/arm/glob64.c b/sysdeps/unix/sysv/linux/arm/glob64.c
new file mode 100644
index 0000000..82a9a29
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/glob64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/glob64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c5926692836694126029fe68ec91d24eb85b53e
commit 3c5926692836694126029fe68ec91d24eb85b53e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:14:18 2000 +0000
Add glob64@@GLIBC_2.2.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 5498086..aeda9fa 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -17,6 +17,9 @@ libc {
# a*
alphasort64;
+ # g*
+ glob64;
+
# New rlimit interface
getrlimit; setrlimit; getrlimit64;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1829753231592488f783252e4646d0111f306f92
commit 1829753231592488f783252e4646d0111f306f92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:07:53 2000 +0000
(FE_DENORMAL): New.
(FE_MAP_DMZ, FE_MAP_UMZ, FE_NONIEEE_ENV): New.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index 82b85de..b6d9b98 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -36,6 +36,11 @@
enum
{
+#ifdef __USE_GNU
+ FE_DENORMAL = 1UL << 22,
+#define FE_DENORMAL FE_DENORMAL
+#endif
+
FE_INEXACT = 1UL << 21,
#define FE_INEXACT FE_INEXACT
@@ -51,12 +56,10 @@ enum
FE_INVALID = 1UL << 17,
#define FE_INVALID FE_INVALID
- FE_ALL_EXCEPT =
- (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+ FE_ALL_EXCEPT = 0x3f << 17
#define FE_ALL_EXCEPT FE_ALL_EXCEPT
};
-
/* Alpha chips support all four defined rouding modes.
Note that code must be compiled to use dynamic rounding (/d) instructions
@@ -81,6 +84,19 @@ enum
#define FE_UPWARD FE_UPWARD
};
+#ifdef __USE_GNU
+/* On later hardware, and later kernels for earlier hardware, we can forcibly
+ underflow denormal inputs and outputs. This can speed up certain programs
+ significantly, usually without affecting accuracy. */
+enum
+ {
+ FE_MAP_DMZ = 1UL << 12, /* Map denorm inputs to zero */
+#define FE_MAP_DMZ FE_MAP_DMZ
+
+ FE_MAP_UMZ = 1UL << 13, /* Map underflowed outputs to zero */
+#define FE_MAP_UMZ FE_MAP_UMZ
+ };
+#endif
/* Type representing exception flags. */
typedef unsigned long int fexcept_t;
@@ -96,6 +112,10 @@ typedef unsigned long int fenv_t;
#ifdef __USE_GNU
/* Floating-point environment where none of the exceptions are masked. */
# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
+
+/* Floating-point environment with (processor-dependent) non-IEEE floating
+ point. In this case, mapping denormals to zero. */
+# define FE_NONIEEE_ENV ((fenv_t *) 0x8800000000003000UL)
#endif
/* The system calls to talk to the kernel's FP code. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c9bca5114f951f7168b0f401c60bdf56eb1a8906
commit c9bca5114f951f7168b0f401c60bdf56eb1a8906
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:07:37 2000 +0000
Use <fenv_libc.h>.
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 006f506..71ff748 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__feclearexcept (int excepts)
@@ -29,7 +29,7 @@ __feclearexcept (int excepts)
swcr = __ieee_get_fp_control ();
/* Clear the relevant bits. */
- swcr &= ~((unsigned long int) excepts & FE_ALL_EXCEPT);
+ swcr &= ~((unsigned long int) excepts & SWCR_STATUS_MASK);
/* Put the new state in effect. */
__ieee_set_fp_control (swcr);
diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c
index ab0630c..7359e14 100644
--- a/sysdeps/alpha/fpu/fedisblxcpt.c
+++ b/sysdeps/alpha/fpu/fedisblxcpt.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
fedisableexcept (int excepts)
@@ -27,8 +27,8 @@ fedisableexcept (int excepts)
new_exc = __ieee_get_fp_control ();
- old_exc = (new_exc << 16) & FE_ALL_EXCEPT;
- new_exc &= ~((excepts & FE_ALL_EXCEPT) >> 16);
+ old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT;
+ new_exc &= ~((excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK);
__ieee_set_fp_control (new_exc);
diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c
index d2b0f2e..b36e846 100644
--- a/sysdeps/alpha/fpu/feenablxcpt.c
+++ b/sysdeps/alpha/fpu/feenablxcpt.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
feenableexcept (int excepts)
@@ -27,8 +27,8 @@ feenableexcept (int excepts)
new_exc = __ieee_get_fp_control ();
- old_exc = (new_exc << 16) & FE_ALL_EXCEPT;
- new_exc |= (excepts & FE_ALL_EXCEPT) >> 16;
+ old_exc = (new_exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT;
+ new_exc |= (excepts >> SWCR_ENABLE_SHIFT) & SWCR_ENABLE_MASK;
__ieee_set_fp_control (new_exc);
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index 51ce1c2..d6b3f70 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__fegetenv (fenv_t *envp)
@@ -31,10 +31,8 @@ __fegetenv (fenv_t *envp)
swcr = __ieee_get_fp_control ();
__asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr));
- /* Merge the two bits of information. The magic number at the end is
- the exception enable mask. */
-
- *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e));
+ /* Merge the two bits of information. */
+ *envp = ((fpcr & FPCR_ROUND_MASK) | (swcr & SWCR_ALL_MASK));
/* Success. */
return 0;
diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c
index e4d5e78..c0de38f 100644
--- a/sysdeps/alpha/fpu/fegetexcept.c
+++ b/sysdeps/alpha/fpu/fegetexcept.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
fegetexcept (void)
@@ -27,5 +27,5 @@ fegetexcept (void)
exc = __ieee_get_fp_control ();
- return (exc << 16) & FE_ALL_EXCEPT;
+ return (exc & SWCR_ENABLE_MASK) << SWCR_ENABLE_SHIFT;
}
diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c
index 623e2ce..f64fee7 100644
--- a/sysdeps/alpha/fpu/fegetround.c
+++ b/sysdeps/alpha/fpu/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
fegetround (void)
@@ -27,5 +27,5 @@ fegetround (void)
__asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
- return (fpcr >> 58) & 3;
+ return (fpcr >> FPCR_ROUND_SHIFT) & 3;
}
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c
index a179366..d683a37 100644
--- a/sysdeps/alpha/fpu/feholdexcpt.c
+++ b/sysdeps/alpha/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
feholdexcept (fenv_t *envp)
@@ -27,7 +27,7 @@ feholdexcept (fenv_t *envp)
fegetenv(envp);
/* Clear all exception status bits and exception enable bits. */
- __ieee_set_fp_control(0);
+ __ieee_set_fp_control(*envp & SWCR_MAP_MASK);
return 0;
}
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 58bc13a..5bf3b5e 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__fesetenv (const fenv_t *envp)
@@ -37,11 +37,11 @@ __fesetenv (const fenv_t *envp)
/* Reset the rounding mode with the hardware fpcr. Note that the following
system call is an implied trap barrier for our modification. */
__asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr));
- fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58));
+ fpcr = (fpcr & ~FPCR_ROUND_MASK) | (env & FPCR_ROUND_MASK);
__asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr));
/* Reset the exception status and mask with the kernel's FP code. */
- __ieee_set_fp_control (env & (FE_ALL_EXCEPT | 0x3e));
+ __ieee_set_fp_control (env & SWCR_ALL_MASK);
/* Success. */
return 0;
diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c
index f0aaaa2..42a8b62 100644
--- a/sysdeps/alpha/fpu/fesetround.c
+++ b/sysdeps/alpha/fpu/fesetround.c
@@ -1,5 +1,5 @@
/* Set current rounding direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
fesetround (int round)
@@ -32,7 +32,8 @@ fesetround (int round)
__asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
/* Set the relevant bits. */
- fpcr = (fpcr & ~(3UL << 58)) | ((unsigned long)round << 58);
+ fpcr = ((fpcr & ~FPCR_ROUND_MASK)
+ | ((unsigned long)round << FPCR_ROUND_SHIFT));
/* Put the new state in effect. */
__asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr));
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index 61226c6..b9f1c5b 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__feupdateenv (const fenv_t *envp)
@@ -34,7 +34,7 @@ __feupdateenv (const fenv_t *envp)
/* Raise the saved exception. Incidently for us the implementation
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
- feraiseexcept ((int) tmp & FE_ALL_EXCEPT);
+ feraiseexcept (tmp & SWCR_STATUS_MASK);
/* Success. */
return 0;
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index bd47535..bae1556 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__fegetexceptflag (fexcept_t *flagp, int excepts)
@@ -29,7 +29,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
tmp = __ieee_get_fp_control();
/* Return that portion that corresponds to the requested exceptions. */
- *flagp = tmp & excepts & FE_ALL_EXCEPT;
+ *flagp = tmp & excepts & SWCR_STATUS_MASK;
/* Success. */
return 0;
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index b0eab00..1f72eba 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -18,8 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
-#include <math.h>
+#include <fenv_libc.h>
int
__feraiseexcept (int excepts)
@@ -30,7 +29,7 @@ __feraiseexcept (int excepts)
tmp = __ieee_get_fp_control ();
/* Set all the bits that were called for. */
- tmp |= (excepts & FE_ALL_EXCEPT);
+ tmp |= (excepts & SWCR_STATUS_MASK);
/* And store it back. */
__ieee_set_fp_control (tmp);
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index eb74def..57531a4 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
__fesetexceptflag (const fexcept_t *flagp, int excepts)
@@ -29,7 +29,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
tmp = __ieee_get_fp_control ();
/* Set all the bits that were called for. */
- tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT);
+ tmp = (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK);
/* And store it back. */
__ieee_set_fp_control (tmp);
diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c
index 9ee9dc9..9c006de 100644
--- a/sysdeps/alpha/fpu/ftestexcept.c
+++ b/sysdeps/alpha/fpu/ftestexcept.c
@@ -1,5 +1,5 @@
/* Test exception in current environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <fenv.h>
+#include <fenv_libc.h>
int
fetestexcept (int excepts)
@@ -28,5 +28,5 @@ fetestexcept (int excepts)
/* Get current exceptions. */
tmp = __ieee_get_fp_control();
- return tmp & excepts & FE_ALL_EXCEPT;
+ return tmp & excepts & SWCR_STATUS_MASK;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b84abdd3e3944de5284964a32ab835c80c2f642
commit 4b84abdd3e3944de5284964a32ab835c80c2f642
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 19 16:06:09 2000 +0000
fenv definitions for Linux/Alpha.
diff --git a/sysdeps/alpha/fpu/fenv_libc.h b/sysdeps/alpha/fpu/fenv_libc.h
new file mode 100644
index 0000000..7c58be5
--- /dev/null
+++ b/sysdeps/alpha/fpu/fenv_libc.h
@@ -0,0 +1,36 @@
+/* Internal libc stuff for floating point environment routines.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_LIBC_H
+#define _FENV_LIBC_H 1
+
+#include <fenv.h>
+
+#define FPCR_ROUND_MASK (3UL << 58)
+#define FPCR_ROUND_SHIFT 58
+
+#define SWCR_MAP_MASK (3UL << 12)
+#define SWCR_ENABLE_SHIFT 16
+#define SWCR_ENABLE_MASK (FE_ALL_EXCEPT >> SWCR_ENABLE_SHIFT)
+#define SWCR_STATUS_MASK (FE_ALL_EXCEPT)
+#define SWCR_ALL_MASK (SWCR_ENABLE_MASK \
+ | SWCR_MAP_MASK \
+ | SWCR_STATUS_MASK)
+
+#endif /* fenv_libc.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=546afa8c7be7200de3be9afce1ec4edd77e897c3
commit 546afa8c7be7200de3be9afce1ec4edd77e897c3
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Aug 18 06:11:11 2000 +0000
Add pads to show alignment for structs stat and stat64.
Patch by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 7c6f4aa..40f42f1 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -48,12 +48,13 @@ struct stat
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
- long int st_pad2[2];
#ifndef __USE_FILE_OFFSET64
+ long int st_pad2[2];
__off_t st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
long int st_pad3;
#else
+ long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
#endif
/*
@@ -87,7 +88,7 @@ struct stat64
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
- long int st_pad2[2];
+ long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
/*
* Actually this should be timestruc_t st_atime, st_mtime and
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc9ced979202f032e43a55183eef6b88ebd9f9ff
commit cc9ced979202f032e43a55183eef6b88ebd9f9ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 18 00:09:47 2000 +0000
Remove special d_ino handling.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c
index 175be9d..f127cd8 100644
--- a/sysdeps/unix/sysv/linux/alpha/getdents.c
+++ b/sysdeps/unix/sysv/linux/alpha/getdents.c
@@ -1,6 +1,4 @@
#define DIRENT_TYPE struct dirent64
-#define DIRENT_SET_DP_INO(dp, value) \
- do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0)
#define __getdents64 __no___getdents64_decl
#include <sysdeps/unix/sysv/linux/getdents.c>
#undef __getdents64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17193a21d638d8a5fe6306f01ae693144e61d6bf
commit 17193a21d638d8a5fe6306f01ae693144e61d6bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 17 18:46:15 2000 +0000
Alpha fedisableexcept implementaton.
diff --git a/sysdeps/alpha/fpu/fedisblxcpt.c b/sysdeps/alpha/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..ab0630c
--- /dev/null
+++ b/sysdeps/alpha/fpu/fedisblxcpt.c
@@ -0,0 +1,36 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fedisableexcept (int excepts)
+{
+ unsigned long int new_exc, old_exc;
+
+ new_exc = __ieee_get_fp_control ();
+
+ old_exc = (new_exc << 16) & FE_ALL_EXCEPT;
+ new_exc &= ~((excepts & FE_ALL_EXCEPT) >> 16);
+
+ __ieee_set_fp_control (new_exc);
+
+ return old_exc;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd290faab1b1ca66f22e42c67792170e6d6db69c
commit cd290faab1b1ca66f22e42c67792170e6d6db69c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 17 18:45:58 2000 +0000
Alpha feenableexcept implementation.
diff --git a/sysdeps/alpha/fpu/feenablxcpt.c b/sysdeps/alpha/fpu/feenablxcpt.c
new file mode 100644
index 0000000..d2b0f2e
--- /dev/null
+++ b/sysdeps/alpha/fpu/feenablxcpt.c
@@ -0,0 +1,36 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feenableexcept (int excepts)
+{
+ unsigned long int new_exc, old_exc;
+
+ new_exc = __ieee_get_fp_control ();
+
+ old_exc = (new_exc << 16) & FE_ALL_EXCEPT;
+ new_exc |= (excepts & FE_ALL_EXCEPT) >> 16;
+
+ __ieee_set_fp_control (new_exc);
+
+ return old_exc;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35781b9dd67f709fa78d4c4c1d8ab57bffaef1ab
commit 35781b9dd67f709fa78d4c4c1d8ab57bffaef1ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 17 18:45:35 2000 +0000
Apha fegetexcept implementation.
diff --git a/sysdeps/alpha/fpu/fegetexcept.c b/sysdeps/alpha/fpu/fegetexcept.c
new file mode 100644
index 0000000..e4d5e78
--- /dev/null
+++ b/sysdeps/alpha/fpu/fegetexcept.c
@@ -0,0 +1,31 @@
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetexcept (void)
+{
+ unsigned long int exc;
+
+ exc = __ieee_get_fp_control ();
+
+ return (exc << 16) & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f10fa39cc760911e425c000833f700c59308cebd
commit f10fa39cc760911e425c000833f700c59308cebd
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Aug 16 15:08:45 2000 +0000
* sysdeps/m68k/fpu/fegetexcept.c: New file.
* sysdeps/m68k/fpu/fedisblxcpt.c: New file.
* sysdeps/m68k/fpu/feenablxcpt.c: New file.
diff --git a/sysdeps/m68k/fpu/fedisblxcpt.c b/sysdeps/m68k/fpu/fedisblxcpt.c
new file mode 100644
index 0000000..ad97e86
--- /dev/null
+++ b/sysdeps/m68k/fpu/fedisblxcpt.c
@@ -0,0 +1,39 @@
+/* Disable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fedisableexcept (int excepts)
+{
+ unsigned int old_exc, new_exc;
+
+ /* Get the current control register contents. */
+ __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc));
+
+ old_exc = (new_exc >> 6) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc &= ~(excepts << 6);
+ __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc));
+
+ return old_exc;
+}
diff --git a/sysdeps/m68k/fpu/feenablxcpt.c b/sysdeps/m68k/fpu/feenablxcpt.c
new file mode 100644
index 0000000..7be0705
--- /dev/null
+++ b/sysdeps/m68k/fpu/feenablxcpt.c
@@ -0,0 +1,39 @@
+/* Enable floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feenableexcept (int excepts)
+{
+ unsigned int new_exc, old_exc;
+
+ /* Get the current control register contents. */
+ __asm__ ("fmove%.l %!,%0" : "=dm" (new_exc));
+
+ old_exc = (new_exc >> 6) & FE_ALL_EXCEPT;
+
+ excepts &= FE_ALL_EXCEPT;
+
+ new_exc |= excepts << 6;
+ __asm__ ("fmove%.l %0,%!" : : "dm" (new_exc));
+
+ return old_exc;
+}
diff --git a/sysdeps/m68k/fpu/fegetexcept.c b/sysdeps/m68k/fpu/fegetexcept.c
new file mode 100644
index 0000000..03b8735
--- /dev/null
+++ b/sysdeps/m68k/fpu/fegetexcept.c
@@ -0,0 +1,32 @@
+/* Get enabled floating-point exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetexcept (void)
+{
+ unsigned int exc;
+
+ /* Get the current control register contents. */
+ __asm__ ("fmove%.l %!,%0" : "=dm" (exc));
+
+ return (exc >> 6) & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb76534ecc045319d48b1589e07352303b08fac2
commit eb76534ecc045319d48b1589e07352303b08fac2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 14 17:39:48 2000 +0000
(__xstat64, __fxstat64, __lxstat64): Export at GLIBC_2.2.
(alphasort64, readdir64, readdir64_r, scandir64, versionsort64): Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 4ac5b58..5498086 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -11,7 +11,22 @@ libc {
outb; outw; outl;
}
GLIBC_2.2 {
+ # functions used in other libraries
+ __xstat64; __fxstat64; __lxstat64;
+
+ # a*
+ alphasort64;
+
# New rlimit interface
getrlimit; setrlimit; getrlimit64;
+
+ # r*
+ readdir64; readdir64_r;
+
+ # s*
+ scandir64;
+
+ # v*
+ versionsort64;
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8f7d68ab0464b6893ca8fe30f9981f4cb38db24b
commit 8f7d68ab0464b6893ca8fe30f9981f4cb38db24b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 14 17:39:31 2000 +0000
(DIRENT_TYPE): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c
index 6deb87e..175be9d 100644
--- a/sysdeps/unix/sysv/linux/alpha/getdents.c
+++ b/sysdeps/unix/sysv/linux/alpha/getdents.c
@@ -1,3 +1,4 @@
+#define DIRENT_TYPE struct dirent64
#define DIRENT_SET_DP_INO(dp, value) \
do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0)
#define __getdents64 __no___getdents64_decl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b5a4299b4138f06063856307b04fd34d78419fe
commit 5b5a4299b4138f06063856307b04fd34d78419fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 14 05:23:10 2000 +0000
Define __clockid_t and __timer_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 445ca94..13c3898 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -83,6 +83,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
typedef int __key_t; /* Type of a SYSV IPC key. */
+/* Clock ID used in clock and timer functions. */
+typedef int __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+typedef int __timer_t;
+
/* Used in `struct shmid_ds'. */
typedef int __ipc_pid_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 818b947..927d609 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -87,6 +87,12 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
+/* Clock ID used in clock and timer functions. */
+typedef int __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+typedef int __timer_t;
+
/* One element in the file descriptor mask array. */
typedef unsigned long int __fd_mask;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a632183fba433b452e3ab72b1d35809d3251f49
commit 8a632183fba433b452e3ab72b1d35809d3251f49
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 14 05:22:20 2000 +0000
__clockid_t and __timer_t are now defined in bits/types.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index bbf93f6..ed9382b 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,12 +39,6 @@
# define CLK_TCK 1024
# endif
-/* Clock ID used in clock and timer functions. */
-typedef int __clockid_t;
-
-/* Timer ID returned by `timer_create'. */
-typedef int __timer_t;
-
# ifdef __USE_POSIX199309
/* Identifier for system-wide realtime clock. */
# define CLOCK_REALTIME 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ff6d9a06773b7115c0d3c24e771c2544301585b
commit 9ff6d9a06773b7115c0d3c24e771c2544301585b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 14 04:50:13 2000 +0000
Define thread types also for POSIX95.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 722db9e..445ca94 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -128,7 +128,7 @@ typedef unsigned int __socklen_t;
/* Now add the thread types. */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
# include <bits/pthreadtypes.h>
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 379f2bc..818b947 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -154,7 +154,7 @@ typedef unsigned int __socklen_t;
/* Now add the thread types. */
-#ifdef __USE_UNIX98
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
# include <bits/pthreadtypes.h>
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ce1bc0d3dda9cadead5e544f78c84af649c1c3f
commit 1ce1bc0d3dda9cadead5e544f78c84af649c1c3f
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Aug 12 09:59:40 2000 +0000
(F_GETLK64, F_SETLK64, F_SETLKW64): Define with F_GETLK etc.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7184d08..2b879dc 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -71,11 +71,9 @@
#define F_GETLK 7 /* Get record locking info. */
#define F_SETLK 8 /* Set record locking info (non-blocking). */
#define F_SETLKW 9 /* Set record locking info (blocking). */
-
-/* XXX missing */
-#define F_GETLK64 7 /* Get record locking info. */
-#define F_SETLK64 8 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 9 /* Set record locking info (blocking). */
+#define F_GETLK64 F_GETLK /* Get record locking info. */
+#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */
+#define F_SETLKW64 F_SETLKW /* Set record locking info (blocking). */
#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56cb41faed44797cf9b1822bd7cbeb9011d955dc
commit 56cb41faed44797cf9b1822bd7cbeb9011d955dc
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Aug 12 09:29:03 2000 +0000
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Add .set
mips2 for assembler.
* sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
assembler.
(__compare_and_swap): Likewise.
* sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index b24aabb..bc7f52a 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -42,7 +42,8 @@ _test_and_set (int *p, int v) __THROW
int r, t;
__asm__ __volatile__
- ("1:\n\t"
+ (".set\tmips2\n"
+ "1:\n\t"
"ll %0,%3\n\t"
".set push\n\t"
".set noreorder\n\t"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=206065a1179f21b5bbe4246397580555283d0a83
commit 206065a1179f21b5bbe4246397580555283d0a83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:21:01 2000 +0000
Linux/Arm implementation of versionsort64.
diff --git a/sysdeps/unix/sysv/linux/arm/versionsort64.c b/sysdeps/unix/sysv/linux/arm/versionsort64.c
new file mode 100644
index 0000000..144b691
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/versionsort64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/versionsort64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e626298f0208aae1be47e9f2b4bf6ff999f7975
commit 7e626298f0208aae1be47e9f2b4bf6ff999f7975
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:20:53 2000 +0000
Linux/Arm implementation of scandir64.
diff --git a/sysdeps/unix/sysv/linux/arm/scandir64.c b/sysdeps/unix/sysv/linux/arm/scandir64.c
new file mode 100644
index 0000000..506fd88
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/scandir64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/scandir64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe8e1d5f915bd192254024b12f1224ba99548996
commit fe8e1d5f915bd192254024b12f1224ba99548996
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:20:43 2000 +0000
Linux/Arm implementation of readdir64_r.
diff --git a/sysdeps/unix/sysv/linux/arm/readdir64_r.c b/sysdeps/unix/sysv/linux/arm/readdir64_r.c
new file mode 100644
index 0000000..9f54f89
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/readdir64_r.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/readdir64_r.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4e95ada8a488f05a0301a67c3b5ed0c23dd746c
commit f4e95ada8a488f05a0301a67c3b5ed0c23dd746c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:20:37 2000 +0000
Linux/Arm implementation of readdir64.
diff --git a/sysdeps/unix/sysv/linux/arm/readdir64.c b/sysdeps/unix/sysv/linux/arm/readdir64.c
new file mode 100644
index 0000000..2ea26dd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/readdir64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/readdir64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5d4fa3fe46fa97be8b9814ab13d73f84437fc74
commit f5d4fa3fe46fa97be8b9814ab13d73f84437fc74
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:20:30 2000 +0000
Linux/Arm implementation of getdents64.
diff --git a/sysdeps/unix/sysv/linux/arm/getdents64.c b/sysdeps/unix/sysv/linux/arm/getdents64.c
new file mode 100644
index 0000000..0c75fb5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getdents64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getdents64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adb0bd509b2df3d207b592fc61dfc946323e73bf
commit adb0bd509b2df3d207b592fc61dfc946323e73bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 08:20:21 2000 +0000
Linux/Arm implementation of alphasort64.
diff --git a/sysdeps/unix/sysv/linux/arm/alphasort64.c b/sysdeps/unix/sysv/linux/arm/alphasort64.c
new file mode 100644
index 0000000..0b5ae47
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/alphasort64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/alphasort64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c27fb615e4930653708a637991137e8d44674c6
commit 7c27fb615e4930653708a637991137e8d44674c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 05:07:57 2000 +0000
(__ino64_t): Change to __u_quad_t.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 6bb07e7..379f2bc 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -137,7 +137,7 @@ typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
/* Type of file serial numbers. */
-typedef __u_long __ino64_t;
+typedef __u_quad_t __ino64_t;
/* Type of file sizes and offsets. */
typedef __loff_t __off64_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3579fe4e8af2ec3b21832f185204053f222010c6
commit 3579fe4e8af2ec3b21832f185204053f222010c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 04:48:40 2000 +0000
(__xstat_conv): Remove unused prototype.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
index 2633b42..75540c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
@@ -38,6 +38,4 @@ struct glibc2_stat
unsigned int st_gen;
};
-extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
-
#define XSTAT_IS_XSTAT64 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a510d2b69ce56ddfece86be1081874cc57740056
commit a510d2b69ce56ddfece86be1081874cc57740056
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 04:48:27 2000 +0000
Linux/Alpha getdents64 implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c
new file mode 100644
index 0000000..0df2c8f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getdents64.c
@@ -0,0 +1 @@
+/* getdents64 is in getdents.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2db50fd18c1026993505327a428560e3a231060
commit b2db50fd18c1026993505327a428560e3a231060
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 12 04:48:19 2000 +0000
Linux/Alpha egtdents implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c
new file mode 100644
index 0000000..6deb87e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getdents.c
@@ -0,0 +1,6 @@
+#define DIRENT_SET_DP_INO(dp, value) \
+ do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0)
+#define __getdents64 __no___getdents64_decl
+#include <sysdeps/unix/sysv/linux/getdents.c>
+#undef __getdents64
+weak_alias(__getdents, __getdents64);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2489c7f179b7a36d1cf07357be1f7549c4c2a691
commit 2489c7f179b7a36d1cf07357be1f7549c4c2a691
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Aug 10 12:39:48 2000 +0000
Synch struct stat64 and stat with current MIPS kernel.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index a01e857..7c6f4aa 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -51,11 +51,11 @@ struct stat
long int st_pad2[2];
#ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long int st_pad3;
#else
__off64_t st_size; /* Size of file, in bytes. */
#endif
- /* SVR4 added this extra long to allow for expansion of off_t. */
- long int st_pad3;
/*
* Actually this should be timestruc_t st_atime, st_mtime and
* st_ctime but we don't have it under Linux.
@@ -70,13 +70,10 @@ struct stat
#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
#else
+ long int st_pad4;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
#endif
- char st_fstype[16]; /* Filesystem type name */
- long int st_pad4[8];
- /* Linux specific fields */
- unsigned int st_flags;
- unsigned int st_gen;
+ long int st_pad4[14];
};
#ifdef __USE_LARGEFILE64
@@ -92,8 +89,6 @@ struct stat64
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[2];
__off64_t st_size; /* Size of file, in bytes. */
- /* SVR4 added this extra long to allow for expansion of off_t. */
- long int st_pad3;
/*
* Actually this should be timestruc_t st_atime, st_mtime and
* st_ctime but we don't have it under Linux.
@@ -105,12 +100,9 @@ struct stat64
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
__blksize_t st_blksize; /* Optimal block size for I/O. */
+ long int st_pad3;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
- char st_fstype[16]; /* Filesystem type name */
- long int st_pad4[8];
- /* Linux specific fields */
- unsigned int st_flags;
- unsigned int st_gen;
+ long int st_pad4[14];
};
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=031a1712e49e5923aca0d080f679b3943194b0eb
commit 031a1712e49e5923aca0d080f679b3943194b0eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 10 04:21:28 2000 +0000
Include kernel-features.h.
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index e97c148..1ea7e26 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -24,6 +24,7 @@
#include <bp-checks.h>
#include <linux/posix_types.h>
+#include "kernel-features.h"
extern int __syscall_chown (const char *__unbounded __file,
__kernel_uid_t __owner, __kernel_gid_t __group);
@@ -42,7 +43,7 @@ extern int __libc_missing_32bit_uids;
int
__chown (const char *file, uid_t owner, gid_t group)
{
-#if __ASSUME_32BITUIDS
+#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
#else
# ifdef __NR_chown32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4e2464608ec9de44e55efadca3bf840d1a095ec
commit d4e2464608ec9de44e55efadca3bf840d1a095ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 2 22:41:58 2000 +0000
Add _test_and_set.c.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index 4675db6..d8943b6 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -1,3 +1,4 @@
+_test_and_set.c
clone.S
entry.h
kernel_sigaction.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8efcd38cde845b9324e419bed353ecfcc104a7f3
commit 8efcd38cde845b9324e419bed353ecfcc104a7f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 2 15:27:16 2000 +0000
Undo last change.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index f1b237d..939c74c 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
-
-ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit oldsetrlimit
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=305f4d2cd147d24c67edaabda857754b0a86e1a6
commit 305f4d2cd147d24c67edaabda857754b0a86e1a6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 1 19:11:07 2000 +0000
[subdir=resource] (sysdep_routines): Add oldgetrlimit, oldsetrlimit.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 939c74c..f1b237d 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -8,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
+
+ifeq ($(subdir),resource)
+sysdep_routines += oldgetrlimit oldsetrlimit
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55fc2728f57697dff645a14e7bcd5aff2713bc6a
commit 55fc2728f57697dff645a14e7bcd5aff2713bc6a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 1 19:10:53 2000 +0000
Add oldgetrlimit, oldsetrlimit for GLIBC_2.0.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 60303d3..61ac699 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -12,3 +12,5 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 7 syscall
+oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0
+oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=156a8cfcd42a907d368a331898b6b1431c42ebe4
commit 156a8cfcd42a907d368a331898b6b1431c42ebe4
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jul 31 08:19:13 2000 +0000
* sysdeps/unix/sysv/linux/mips/bits/sigstack.h: New file. On MIPS
the order of struct sigaltstack members is different.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigstack.h b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
new file mode 100644
index 0000000..a0f1ba6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigstack.h
@@ -0,0 +1,55 @@
+/* sigstack, sigaltstack definitions.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete). */
+struct sigstack
+ {
+ void *ss_sp; /* Signal stack pointer. */
+ int ss_onstack; /* Nonzero if executing on this stack. */
+ };
+
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 2048
+
+/* System default stack size. */
+#define SIGSTKSZ 8192
+
+
+/* Alternate, preferred interface. */
+typedef struct sigaltstack
+ {
+ void *ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ } stack_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69a935560b360253435c11a7f1dd75869b5c8076
commit 69a935560b360253435c11a7f1dd75869b5c8076
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 30 16:07:40 2000 +0000
fcntl.h definitions for Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
new file mode 100644
index 0000000..de1dd4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -0,0 +1,151 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 0100 /* not fcntl */
+#define O_EXCL 0200 /* not fcntl */
+#define O_NOCTTY 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_APPEND 02000
+#define O_NONBLOCK 04000
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 010000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#ifdef __USE_GNU
+# define O_DIRECTORY 040000 /* Must be a directory. */
+# define O_NOFOLLOW 0100000 /* Do not follow links. */
+# define O_DIRECT 0200000 /* Direct disk access. */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0400000
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 5 /* Get record locking info. */
+#define F_SETLK 6 /* Set record locking info (non-blocking). */
+#define F_SETLKW 7 /* Set record locking info (blocking). */
+
+/* XXX missing */
+#define F_GETLK64 5 /* Get record locking info. */
+#define F_SETLK64 6 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 7 /* Set record locking info (blocking). */
+
+#if defined __USE_BSD || defined __USE_XOPEN2K
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a27fd4306aa290fa0d61b14e0191709bb0cd31ef
commit a27fd4306aa290fa0d61b14e0191709bb0cd31ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 29 19:32:27 2000 +0000
(fix_bad_pc24): New function.
(elf_machine_rel): Use it for out-of-range PC24 relocs.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 4408758..cbef92f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -376,6 +376,37 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
extern char **_dl_argv;
+/* Deal with an out-of-range PC24 reloc. */
+static Elf32_Addr
+fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
+{
+ static void *fix_page;
+ static unsigned int fix_offset;
+ static size_t pagesize;
+ Elf32_Word *fix_address;
+
+ if (! fix_page)
+ {
+ if (! pagesize)
+ pagesize = getpagesize ();
+ fix_page = mmap (NULL, pagesize, PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (! fix_page)
+ assert (! "could not map page for fixup");
+ fix_offset = 0;
+ }
+
+ fix_address = (Elf32_Word *)(fix_page + fix_offset);
+ fix_address[0] = 0xe51ff004; /* ldr pc, [pc, #-4] */
+ fix_address[1] = value;
+
+ fix_offset += 8;
+ if (fix_offset >= pagesize)
+ fix_page = NULL;
+
+ return (Elf32_Addr)fix_address;
+}
+
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
@@ -452,18 +483,19 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
case R_ARM_PC24:
{
- signed int addend;
+ Elf32_Sword addend;
+ Elf32_Addr newvalue;
addend = *reloc_addr & 0x00ffffff;
if (addend & 0x00800000) addend |= 0xff000000;
- value = value - (unsigned int)reloc_addr + (addend << 2);
- if (value & 0xfc000003)
- _dl_signal_error (0, map->l_name,
- "R_ARM_PC24 relocation out of range");
+ newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2);
+ if (newvalue & 0xfc000003)
+ newvalue = fix_bad_pc24(reloc_addr, value)
+ - (Elf32_Addr)reloc_addr + (addend << 2);
- value = value >> 2;
- value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff);
+ newvalue = newvalue >> 2;
+ value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
*reloc_addr = value;
}
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63ac74aa9483fa76197f5e369bdfb3ac7677cd05
commit 63ac74aa9483fa76197f5e369bdfb3ac7677cd05
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 29 18:03:21 2000 +0000
(PSEUDO_RET): New macro.
(ret): Redefine to PSEUDO_RET.
(PSEUDO): Remove jump to syscall_error.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index c337af2..1413a48 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -52,8 +52,13 @@
.type syscall_error,%function; \
ENTRY (name); \
DO_CALL (args, syscall_name); \
- cmn r0, $4096; \
- bhs PLTJMP(C_SYMBOL_NAME(__syscall_error));
+ cmn r0, $4096;
+
+#define PSEUDO_RET \
+ RETINSTR(movcc, pc, lr); \
+ b PLTJMP(__syscall_error)
+#undef ret
+#define ret PSEUDO_RET
#undef PSEUDO_END
#define PSEUDO_END(name) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6bd4dbf3ad4eeaea903d3e271150b73f3af4a8a
commit e6bd4dbf3ad4eeaea903d3e271150b73f3af4a8a
Author: Greg McGary <greg@mcgary.org>
Date: Sat Jul 29 08:09:56 2000 +0000
* sysdeps/arm/frame.h (struct layout): Make pointers __unbounded.
* sysdeps/generic/frame.h: Likewise.
* sysdeps/generic/backtrace.c (ADVANCE_STACK_FRAME): Wrap bounds
around return value.
(__backtrace): Qualify frame-pointer chain and return address
pointers as __unbounded. Wrap bounds around variable `current'.
* sysdeps/generic/segfault.c (ADVANCE_STACK_FRAME): Wrap bounds
around return value.
(catch_segfault): Qualify frame-pointer chain and return address
pointers as __unbounded. Wrap bounds around variable `current'.
* sysdeps/i386/backtrace.c (struct layout): Make pointers __unbounded.
(ADVANCE_STACK_FRAME): Wrap bounds around return value.
* sysdeps/powerpc/backtrace.c (struct layout): Make pointers __unbounded.
(__backtrace): Qualify frame-pointer chain and return address
pointers as __unbounded. Wrap bounds around variable `current'.
diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
index 16f329c..5d7ac0f 100644
--- a/sysdeps/arm/frame.h
+++ b/sysdeps/arm/frame.h
@@ -20,7 +20,7 @@
/* This is the APCS stack backtrace structure. */
struct layout
{
- struct layout *next;
- void *sp;
- void *return_address;
+ struct layout *__unbounded next;
+ void *__unbounded sp;
+ void *__unbounded return_address;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da671ea07a5fc4510abc569276c665f26a2c1b97
commit da671ea07a5fc4510abc569276c665f26a2c1b97
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jul 28 13:37:26 2000 +0000
* sysdeps/unix/sysv/linux/mips/Dist: Add sys/tas.h.
* sysdeps/unix/sysv/linux/mips/Makefile (sysdep_routines): Add
_test_and_set.
(headers): Add sys/tas.h.
* sysdeps/unix/sysv/linux/mips/Versions: Export _test_and_set for
GLIBC_2.2 from libc.
* sysdeps/unix/sysv/linux/mips/_test_and_set.c: New file.
* sysdeps/unix/sysv/linux/mips/sys/tas.h: New file for
_test_and_set.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index 576aef8..4675db6 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -1,10 +1,11 @@
clone.S
+entry.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
-entry.h
-xstatconv.c
sys/acct.h
sys/cachectl.h
sys/procfs.h
sys/sysmips.h
+sys/tas.h
+xstatconv.c
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 41451ca..65365e1 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -5,7 +5,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
endif
ifeq ($(subdir),misc)
-sysdep_routines += cachectl cacheflush sysmips
+sysdep_routines += cachectl cacheflush sysmips _test_and_set
-headers += sys/cachectl.h sys/sysmips.h
+headers += sys/cachectl.h sys/sysmips.h sys/tas.h
endif
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index b5cb918..d65bf18 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -14,4 +14,8 @@ libc {
# s*
sysmips;
}
+ GLIBC_2.2 {
+ # _*
+ _test_and_set;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/mips/_test_and_set.c b/sysdeps/unix/sysv/linux/mips/_test_and_set.c
new file mode 100644
index 0000000..870b12a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/_test_and_set.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Define the real-function versions of all inline functions
+ defined in sys/tas.h */
+
+#include <features.h>
+
+#define _EXTERN_INLINE
+#ifndef __USE_EXTERN_INLINES
+# define __USE_EXTERN_INLINES 1
+#endif
+
+#include "sys/tas.h"
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
new file mode 100644
index 0000000..b24aabb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_TAS_H
+#define _SYS_TAS_H 1
+
+#include <features.h>
+#include <sgidefs.h>
+#include <sys/sysmips.h>
+
+__BEGIN_DECLS
+
+extern int _test_and_set (int *p, int v) __THROW;
+
+#ifdef __USE_EXTERN_INLINES
+
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
+
+# if (_MIPS_ISA >= _MIPS_ISA_MIPS2)
+
+_EXTERN_INLINE int
+_test_and_set (int *p, int v) __THROW
+{
+ int r, t;
+
+ __asm__ __volatile__
+ ("1:\n\t"
+ "ll %0,%3\n\t"
+ ".set push\n\t"
+ ".set noreorder\n\t"
+ "beq %0,%4,2f\n\t"
+ " move %1,%4\n\t"
+ ".set pop\n\t"
+ "sc %1,%2\n\t"
+ "beqz %1,1b\n"
+ "2:"
+ : "=&r" (r), "=&r" (t), "=m" (*p)
+ : "m" (*p), "r" (v)
+ : "memory");
+
+ return r;
+}
+
+# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
+
+_EXTERN_INLINE int
+_test_and_set (int *p, int v) __THROW
+{
+ return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0);
+}
+
+# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */
+
+#endif /* __USE_EXTERN_INLINES */
+
+__END_DECLS
+
+#endif /* sys/tas.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=797c09d821d7e54e1faa5f1fe88e86e4ff18e19e
commit 797c09d821d7e54e1faa5f1fe88e86e4ff18e19e
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jul 27 15:12:23 2000 +0000
Rename MSG_URG TO MSG_CONFIRM following kernel 2.4.0 (MSG_URG was never
used).
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 299215a..d8626c2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -193,8 +193,8 @@ enum
#define MSG_FIN MSG_FIN
MSG_SYN = 0x400,
#define MSG_SYN MSG_SYN
- MSG_URG = 0x800,
-#define MSG_URG MSG_URG
+ MSG_CONFIRM = 0x800, /* Confirm path validity. */
+#define MSG_CONFIRM MSG_CONFIRM
MSG_RST = 0x1000,
#define MSG_RST MSG_RST
MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e43162758b695b846ebaa61700f543cee8790f4
commit 1e43162758b695b846ebaa61700f543cee8790f4
Author: Greg McGary <greg@mcgary.org>
Date: Thu Jul 27 06:13:09 2000 +0000
* sysdeps/gnu/bits/msq.h: Qualify kernel's
data structure pointers as __unbounded.
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise.
* sysdeps/generic/bp-semctl.h: New file.
* sysdeps/unix/sysv/linux/msgctl.c: Qualify kernel's data structure
pointers as __unbounded. Check bounds of syscall args.
* sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
* sysdeps/unix/sysv/linux/msgsnd.c: Likewise.
* sysdeps/unix/sysv/linux/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/semop.c: Likewise.
* sysdeps/unix/sysv/linux/shmat.c: Likewise.
* sysdeps/unix/sysv/linux/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/shmdt.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/i386/shmctl.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/msgctl.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/semctl.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/shmctl.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 709b5c0..c568299 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -24,19 +24,20 @@
#include <sysdep.h>
#include <string.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include "kernel-features.h"
struct __old_msqid_ds
{
struct __old_ipc_perm msg_perm; /* structure describing operation permission */
- struct msg *__msg_first; /* pointer to first message on queue */
- struct msg *__msg_last; /* pointer to last message on queue */
+ struct msg *__unbounded __msg_first; /* pointer to first message on queue */
+ struct msg *__unbounded __msg_last; /* pointer to last message on queue */
__time_t msg_stime; /* time of last msgsnd command */
__time_t msg_rtime; /* time of last msgrcv command */
__time_t msg_ctime; /* time of last change */
- struct wait_queue *__wwait; /* ??? */
- struct wait_queue *__rwait; /* ??? */
+ struct wait_queue *__unbounded __wwait; /* ??? */
+ struct wait_queue *__unbounded __rwait; /* ??? */
unsigned short int __msg_cbytes; /* current number of bytes on queue */
unsigned short int msg_qnum; /* number of messages currently on queue */
unsigned short int msg_qbytes; /* max number of bytes allowed on queue */
@@ -57,7 +58,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
of time. However, msg_qnum and msg_qbytes changed size at
the same time the size of uid changed elsewhere. */
#if __ASSUME_32BITUIDS > 0
- return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf));
#else
switch (cmd) {
case MSG_STAT:
@@ -65,7 +66,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
case IPC_SET:
break;
default:
- return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf);
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd, CHECK_1 (buf));
}
{
@@ -74,7 +75,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new msgctl. */
- result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
+ result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf));
if (result != -1 || errno != EINVAL)
return result;
@@ -93,7 +94,7 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
return -1;
}
}
- result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, &old);
+ result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, __ptrvalue (&old));
if (result != -1 && cmd != IPC_SET)
{
memset(buf, 0, sizeof(*buf));
@@ -120,4 +121,3 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
#include <shlib-compat.h>
versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2);
-
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 4be4fb2..48bc2d4 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -49,6 +49,9 @@ union semun
struct seminfo *__buf; /* buffer for IPC_INFO */
};
+#include <bp-checks.h>
+#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
+
extern int __syscall_semctl (int, int, int, void *);
/* Return identifier for array of NSEMS semaphores associated with
@@ -69,7 +72,8 @@ __new_semctl (int semid, int semnum, int cmd, ...)
va_end (ap);
#if __ASSUME_32BITUIDS > 0
- return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg);
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
#else
switch (cmd) {
case SEM_STAT:
@@ -77,7 +81,8 @@ __new_semctl (int semid, int semnum, int cmd, ...)
case IPC_SET:
break;
default:
- return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg);
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd,
+ CHECK_SEMCTL (&arg, semid, cmd));
}
{
@@ -87,7 +92,8 @@ __new_semctl (int semid, int semnum, int cmd, ...)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new semctl. */
- result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg);
+ result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64));
if (result != -1 || errno != EINVAL)
return result;
@@ -106,7 +112,8 @@ __new_semctl (int semid, int semnum, int cmd, ...)
return -1;
}
}
- result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg);
+ result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd,
+ CHECK_SEMCTL (&arg, semid, cmd));
if (result != -1 && cmd != IPC_SET)
{
memset(buf, 0, sizeof(*buf));
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index 70c420d..bd5b881 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <sys/syscall.h>
#include <bits/wordsize.h>
+#include <bp-checks.h>
#include "kernel-features.h"
@@ -39,8 +40,8 @@ struct __old_shmid_ds
__ipc_pid_t shm_lpid; /* pid of last shmop */
unsigned short int shm_nattch; /* number of current attaches */
unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__attaches; /* descriptors for attaches */
+ unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */
};
struct __old_shminfo
@@ -61,7 +62,7 @@ int
__new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
{
#if __ASSUME_32BITUIDS > 0
- return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf);
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf));
#else
switch (cmd) {
case SHM_STAT:
@@ -70,7 +71,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
case IPC_INFO:
break;
default:
- return INLINE_SYSCALL (shmctl, 3, shmid, cmd, buf);
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd, CHECK_1 (buf));
}
{
@@ -79,7 +80,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new shmctl. */
- result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf);
+ result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf));
if (result != -1 || errno != EINVAL)
return result;
@@ -96,7 +97,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
return -1;
}
}
- result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, &old);
+ result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, __ptrvalue (&old));
if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT))
{
memset(buf, 0, sizeof(*buf));
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 20e75e0..31c65a9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,8 +48,8 @@ struct shmid_ds
long int shm_lpid; /* pid of last shmop */
unsigned short int shm_nattch; /* number of current attaches */
unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__attaches; /* descriptors for attaches */
+ unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */
};
#ifdef __USE_MISC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca67152c2a58c20470ed73721f4df1a6235e89dc
commit ca67152c2a58c20470ed73721f4df1a6235e89dc
Author: Greg McGary <greg@mcgary.org>
Date: Wed Jul 26 18:21:15 2000 +0000
* sysdeps/generic/bp-checks.h (__memchr): Remove incorrect decl.
(__ubp_memchr): Add correct decl.
(_CHECK_STRING): Use __ubp_memchr.
* sysdeps/alpha/memchr.S [!__BOUNDED_POINTERS__] (__ubp_memchr):
New alias for unbounded-pointer __memchr.
* sysdeps/i386/memchr.S: Likewise.
* sysdeps/ia64/memchr.S: Likewise.
* sysdeps/m68k/memchr.S: Likewise.
* sysdeps/sparc/sparc32/memchr.S: Likewise.
* sysdeps/sparc/sparc64/memchr.S: Likewise.
* sysdeps/vax/memchr.s: Likewise.
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 5947a0b..c4e1d5e 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -67,7 +67,7 @@ ENTRY(__memchr)
unop # :
sll a1, 32, t1 #-e0 : t1 = chchchch00000000
or t1, a1, a1 # e1 : a1 = chchchchchchchch
- extql t0, a0, t6 # e0 :
+ extql t0, a0, t6 # e0 :
beq t3, $first_quad # .. e1 :
ldq_u t5, -1(t4) #-e1 : eight or less bytes to search
@@ -170,3 +170,6 @@ $not_found:
END(__memchr)
weak_alias (__memchr, memchr)
+#if !__BOUNDED_POINTERS__
+weak_alias (__memchr, __ubp_memchr)
+#endif
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
index 968c129..d69b806 100644
--- a/sysdeps/m68k/memchr.S
+++ b/sysdeps/m68k/memchr.S
@@ -226,3 +226,6 @@ L(L9:)
END(__memchr)
weak_alias (__memchr, memchr)
+#if !__BOUNDED_POINTERS__
+weak_alias (__memchr, __ubp_memchr)
+#endif
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
index 22a8c2d..5c54ba8 100644
--- a/sysdeps/vax/memchr.s
+++ b/sysdeps/vax/memchr.s
@@ -69,4 +69,6 @@ ENTRY(__memchr, 0)
brb 0b # and loop
weak_alias (__memchr, memchr)
-
\ No newline at end of file
+#if !__BOUNDED_POINTERS__
+weak_alias (__memchr, __ubp_memchr)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c52761c183c4d9912a27751869a0e326ae3de49e
commit c52761c183c4d9912a27751869a0e326ae3de49e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 25 10:32:02 2000 +0000
* sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Stringify using
__STRING(entry) and not #entry.
(_RTLD_EPILOGUE): Likewise.
* sysdeps/mips/mips64/dl-machine.h: Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index e1b9163..d1ac5cc 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -37,13 +37,13 @@
#define OFFSET_GP_GOT 0x7ff0
#ifndef _RTLD_PROLOGUE
-# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
- "\n\t.ent " #entry \
- "\n\t" #entry ":\n\t"
+# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \
+ "\n\t.ent " __STRING(entry) \
+ "\n\t" __STRING(entry) ":\n\t"
#endif
#ifndef _RTLD_EPILOGUE
-# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
+# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n"
#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 024476b..195a1d3 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -32,13 +32,13 @@
#endif
#ifndef _RTLD_PROLOGUE
-# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
- "\n\t.ent " #entry \
- "\n\t" #entry ":\n\t"
+# define _RTLD_PROLOGUE(entry) "\n\t.globl " __STRING(entry) \
+ "\n\t.ent " __STRING(entry) \
+ "\n\t" __STRING(entry) ":\n\t"
#endif
#ifndef _RTLD_EPILOGUE
-# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
+# define _RTLD_EPILOGUE(entry) "\t.end " __STRING(entry) "\n"
#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b297c341de8a2baf1f9cbbd85bc00fcd402148b2
commit b297c341de8a2baf1f9cbbd85bc00fcd402148b2
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jul 24 13:33:15 2000 +0000
Remove mmap64 alias.
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index c7015ae..9457831 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -41,4 +41,3 @@ ENTRY (__mmap)
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
-weak_alias (__mmap, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8bc20d3faa862b89cb04b77b2de3d4aec65ca92
commit f8bc20d3faa862b89cb04b77b2de3d4aec65ca92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 20 22:52:53 2000 +0000
Define RTLD_NOLOAD and RTLD_NODELETE.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 0da3a67..006eeb6 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -22,20 +22,24 @@
#endif
/* The MODE argument to `dlopen' contains one of the following: */
-#define RTLD_LAZY 0x001 /* Lazy function call binding. */
-#define RTLD_NOW 0x002 /* Immediate function call binding. */
-#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_LAZY 0x0001 /* Lazy function call binding. */
+#define RTLD_NOW 0x0002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_NOLOAD 0x00008 /* Do not load the object. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made
visible as if the object were linked directly into the program. */
-#define RTLD_GLOBAL 0x004
+#define RTLD_GLOBAL 0x0004
/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
The implementation does this by default and so we can define the
value to zero. */
#define RTLD_LOCAL 0
+/* Do not delete object when closed. */
+#define RTLD_NODELETE 0x01000
+
#ifdef __USE_GNU
/* To support profiling of shared objects it is a good idea to call
the function found using `dlsym' using the following macro since
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ce0ef7a866f767adefa3c1b62874f18f0406d21
commit 4ce0ef7a866f767adefa3c1b62874f18f0406d21
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 18 14:14:51 2000 +0000
(elf_machine_rela): Pass 0 instead of NULL to elf_machine_fixup_plt
t argument to silence GCC.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a7f13e0..33c32fa 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -497,7 +497,7 @@ elf_machine_rela (struct link_map *map,
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
else if (r_type == R_ALPHA_JMP_SLOT)
- elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, 0, reloc, reloc_addr, sym_value);
else if (r_type == R_ALPHA_REFQUAD)
{
void *reloc_addr_1 = reloc_addr;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f37f52a54658b7b2e85687b9604e3ef255a40bb8
commit f37f52a54658b7b2e85687b9604e3ef255a40bb8
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jul 18 08:40:57 2000 +0000
Fix copy & error in weak_alias.
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 58899f3..5947a0b 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -169,4 +169,4 @@ $not_found:
END(__memchr)
-weak_alias (__stpcpy, stpcpy)
+weak_alias (__memchr, memchr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23e6128c4e01c989025f64d56809ce3c51226c82
commit 23e6128c4e01c989025f64d56809ce3c51226c82
Author: Greg McGary <greg@mcgary.org>
Date: Mon Jul 17 22:36:16 2000 +0000
* sysdeps/generic/bp-checks.h: Use unbounded __memchr
rather than non-existent __ubp_memchr.
(CHECK_STRINGopt, CHECK_FCNTL, BOUNDED_N, BOUNDED_1): New macros.
(_CHECK_STRING, _CHECK_N): New macros.
(CHECK_STRING, CHECK_N, CHECK_Nopt): Rewrite in terms of _CHECK_*.
(CHECK_IOCTL): Move inside `#if !__ASSEMBLER__'.
* sysdeps/alpha/memchr.S: Change strong name to "__memchr".
Add weak alias "memchr".
* sysdeps/generic/memchr.c: Likewise.
* sysdeps/i386/memchr.S: Likewise.
* sysdeps/ia64/memchr.S: Likewise.
* sysdeps/m68k/memchr.S: Likewise.
* sysdeps/sparc/sparc32/memchr.S: Likewise.
* sysdeps/sparc/sparc64/memchr.S: Likewise.
* sysdeps/vax/memchr.s: Likewise.
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 0ea4aa1..58899f3 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
@@ -37,7 +37,7 @@ For correctness consider that:
.set noreorder
.set noat
-ENTRY(memchr)
+ENTRY(__memchr)
#ifdef PROF
ldgp gp, 0(pv)
lda AT, _mcount
@@ -167,4 +167,6 @@ $not_found:
mov zero, v0 #-e0 :
ret # .. e1 :
- END(memchr)
+ END(__memchr)
+
+weak_alias (__stpcpy, stpcpy)
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
index a1599f8..968c129 100644
--- a/sysdeps/m68k/memchr.S
+++ b/sysdeps/m68k/memchr.S
@@ -1,7 +1,7 @@
/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the
first N bytes of STR.
For Motorola 68000.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@gnu.org>.
@@ -24,7 +24,7 @@
#include "asm-syntax.h"
TEXT
-ENTRY(memchr)
+ENTRY(__memchr)
/* Save the callee-saved registers we use. */
moveml R(d2)-R(d4),MEM_PREDEC(sp)
@@ -223,6 +223,6 @@ L(L9:)
movel R(a0),R(d0)
moveml MEM_POSTINC(sp),R(d2)-R(d4)
rts
-END(strchr)
+END(__memchr)
-weak_alias (strchr, index)
+weak_alias (__memchr, memchr)
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
index 18120b0..22a8c2d 100644
--- a/sysdeps/vax/memchr.s
+++ b/sysdeps/vax/memchr.s
@@ -45,7 +45,7 @@
#include "DEFS.h"
-ENTRY(memchr, 0)
+ENTRY(__memchr, 0)
movq 4(ap),r1 # r1 = cp; r2 = c
movl 12(ap),r0 # r0 = n
movzwl $65535,r4 # handy constant
@@ -67,3 +67,6 @@ ENTRY(memchr, 0)
decw r0 # from 0 to 65535
subl2 r0,r4 # adjust n
brb 0b # and loop
+
+weak_alias (__memchr, memchr)
+
\ No newline at end of file
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84b5ff5c97132de45106fcb0f14d83497db8c228
commit 84b5ff5c97132de45106fcb0f14d83497db8c228
Author: Greg McGary <greg@mcgary.org>
Date: Mon Jul 17 22:28:59 2000 +0000
* sysdeps/unix/make-syscalls.sh: Handle new arg signature
keyletters F, I, S, W. Remove unused keyletter V. Surround
signature argnames with angle-brackets for use as word delimiters,
and to induce syntax errors for any args not handled. Split
multi-echo echoes and comment each stage.
* sysdeps/unix/common/syscalls.list: Refine & correct signatures.
* sysdeps/unix/inet/syscalls.list: Likewise.
* sysdeps/unix/mman/syscalls.list: Likewise.
* sysdeps/unix/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise.
* sysdeps/unix/sysv/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 117e7dd..71a1aa2 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -9,14 +9,14 @@ cacheflush - cacheflush i:pii _flush_cache cacheflush
sysmips - sysmips i:iiii __sysmips sysmips
# override select.S in parent directory:
-select - select i:ipppp __select select
+select - select i:iPPPP __select select
sigsuspend - sigsuspend i:p __sigsuspend sigsuspend
#
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept i:ipp __libc_accept __accept accept
+accept - accept i:iBN __libc_accept __accept accept
bind - bind i:ipi __bind bind
connect - connect i:ipi __libc_connect __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
@@ -24,7 +24,7 @@ getsockname - getsockname i:ipp __getsockname getsockname
getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
recv - recv i:ibni __libc_recv __recv recv
-recvfrom - recvfrom i:ibnibN __libc_recvfrom __recvfrom recvfrom
+recvfrom - recvfrom i:ibniBN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
send - send i:ibni __libc_send __send send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8af640138799df47b32c737d60d17aa0ecf8985b
commit 8af640138799df47b32c737d60d17aa0ecf8985b
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jul 13 11:46:49 2000 +0000
Add libgcc frame handling functions.
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 519295f..b5cb918 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -1,5 +1,10 @@
libc {
GLIBC_2.0 {
+ # Exception handling support functions from libgcc
+ __register_frame; __register_frame_table; __deregister_frame;
+ __register_frame_info; __deregister_frame_info; __frame_state_for;
+ __register_frame_info_table;
+
# Needed by gcc:
_flush_cache;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc5d8c397bcfb79eeda19ba74dd9f14fa61c129e
commit cc5d8c397bcfb79eeda19ba74dd9f14fa61c129e
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jul 10 16:23:37 2000 +0000
* sysdeps/unix/sysv/linux/i386/sigaction.c: Make alias weak since
it's overridden by libpthreads.
* sysdeps/unix/sysv/linux/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 5be2fff..53f24c4 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -149,5 +149,5 @@ __libc_sigaction (sig, act, oact)
return result;
}
-strong_alias (__libc_sigaction, __sigaction)
+weak_alias (__libc_sigaction, __sigaction)
weak_alias (__libc_sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74cb5b6093708f2368253cedf65b555c165ed558
commit 74cb5b6093708f2368253cedf65b555c165ed558
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jul 10 13:51:45 2000 +0000
2000-07-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Verify
that gpreg really points to the GOT section of the calling object.
Scan all PT_LOAD segments of objects for stub_pc, instead of only
checking a start address of first one.
Fix typos.
* sysdeps/mips/mips64/dl-machine.h (elf_machine_runtime_link_map):
Likewise.
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Fix a typo.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index f08afa9..e1b9163 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -141,9 +141,9 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
extern int _dl_mips_gnu_objects;
/* got[1] is reserved to keep its link map address for the shared
- object generated by gnu linker. If all are such object, we can
- find link map from current GPREG simply. If not so, get link map
- for callers object containing STUB_PC. */
+ object generated by the gnu linker. If all are such objects, we
+ can find the link map from current GPREG simply. If not so, get
+ the link map for caller's object containing STUB_PC. */
if (_dl_mips_gnu_objects)
{
@@ -153,45 +153,51 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
g1 = ((ElfW(Word) *) got)[1];
if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
- return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ {
+ struct link_map *l =
+ (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ ElfW(Addr) base, limit;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ /* For the common case of a stub being called from the containing
+ object, STUB_PC will point to somewhere within the object that
+ is described by the link map fetched via got[1]. Otherwise we
+ have to scan all maps. */
+ for (this = 0; this < nent; this++)
+ {
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
+ }
+ }
}
{
struct link_map *l = _dl_loaded;
- struct link_map *ret = 0;
- ElfW(Addr) candidate = 0;
while (l)
{
- ElfW(Addr) base = 0;
+ ElfW(Addr) base, limit;
const ElfW(Phdr) *p = l->l_phdr;
ElfW(Half) this, nent = l->l_phnum;
- /* Get the base. */
- for (this = 0; this < nent; this++)
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- break;
- }
- if (! base)
- {
- l = l->l_next;
- continue;
- }
-
- /* Find closest link base addr. */
- if ((base < stub_pc) && (candidate < base))
+ for (this = 0; this < nent; ++this)
{
- candidate = base;
- ret = l;
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
}
l = l->l_next;
}
- if (candidate && ret && (candidate < stub_pc))
- return ret;
- else if (!candidate)
- return _dl_loaded;
}
_dl_signal_error (0, NULL, "cannot find runtime link map");
@@ -208,7 +214,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
Other architectures call fixup from dl-runtime.c in
_dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
have to use our own version because of the way the got section is
- treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */
+ treated on MIPS (we've also got ELF_MACHINE_PLT defined). */
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index c2f2f6e..024476b 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -252,9 +252,9 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
extern int _dl_mips_gnu_objects;
/* got[1] is reserved to keep its link map address for the shared
- object generated by gnu linker. If all are such object, we can
- find link map from current GPREG simply. If not so, get link map
- for callers object containing STUB_PC. */
+ object generated by the gnu linker. If all are such objects, we
+ can find the link map from current GPREG simply. If not so, get
+ the link map for caller's object containing STUB_PC. */
if (_dl_mips_gnu_objects)
{
@@ -264,45 +264,52 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
g1 = ((ElfW(Word) *) got)[1];
if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
- return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ {
+ struct link_map *l =
+ (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ ElfW(Addr) base, limit;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ /* For the common case of a stub being called from the containing
+ object, STUB_PC will point to somewhere within the object that
+ is described by the link map fetched via got[1]. Otherwise we
+ have to scan all maps. */
+ for (this = 0; this < nent; this++)
+ {
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
+ this++;
+ }
+ }
}
{
struct link_map *l = _dl_loaded;
- struct link_map *ret = 0;
- ElfW(Addr) candidate = 0;
while (l)
{
- ElfW(Addr) base = 0;
+ ElfW(Addr) base, limit;
const ElfW(Phdr) *p = l->l_phdr;
ElfW(Half) this, nent = l->l_phnum;
- /* Get the base. */
for (this = 0; this < nent; this++)
- if (p[this].p_type == PT_LOAD)
- {
- base = p[this].p_vaddr + l->l_addr;
- break;
- }
- if (! base)
- {
- l = l->l_next;
- continue;
- }
-
- /* Find closest link base addr. */
- if ((base < stub_pc) && (candidate < base))
{
- candidate = base;
- ret = l;
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ limit = base + p[this].p_memsz;
+ if (stub_pc >= base && stub_pc < limit)
+ return l;
+ }
}
l = l->l_next;
}
- if (candidate && ret && (candidate < stub_pc))
- return ret;
- else if (!candidate)
- return _dl_loaded;
}
_dl_signal_error (0, NULL, "cannot find runtime link map");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3d6c5810b0a1bbbc225e5b83ecfb90d8afa9a7d
commit e3d6c5810b0a1bbbc225e5b83ecfb90d8afa9a7d
Author: Greg McGary <greg@mcgary.org>
Date: Fri Jul 7 02:19:05 2000 +0000
* sysdeps/generic/bp-checks.h (CHECK_SIGSET, CHECK_SIGSETopt):
New macros.
* sysdeps/generic/strcpy.c: Add bounds checks.
* sysdeps/unix/fxstat.c: Likewise.
* sysdeps/unix/xstat.c: Likewise.
* sysdeps/unix/common/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/aio_sigqueue.c: Likewise.
* sysdeps/unix/sysv/linux/execve.c: Likewise.
* sysdeps/unix/sysv/linux/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/getcwd.c: Likewise.
* sysdeps/unix/sysv/linux/getdents.c: Likewise.
* sysdeps/unix/sysv/linux/llseek.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/poll.c: Likewise.
* sysdeps/unix/sysv/linux/pread.c: Likewise.
* sysdeps/unix/sysv/linux/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/ptrace.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/readv.c: Likewise.
* sysdeps/unix/sysv/linux/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sigqueue.c: Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
* sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.
* sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.
* sysdeps/unix/sysv/linux/sysctl.c: Likewise.
* sysdeps/unix/sysv/linux/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/ustat.c: Likewise.
* sysdeps/unix/sysv/linux/writev.c: Likewise.
* sysdeps/unix/sysv/linux/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/xstat64.c: Likewise.
* sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/i386/brk.c: Likewise.
* sysdeps/unix/sysv/linux/i386/chown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lchown.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/sigsuspend.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/chown.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/ustat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigsuspend.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index ae8b7f8..5be2fff 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -28,10 +28,10 @@
translate it here. */
#include <kernel_sigaction.h>
-extern int __syscall_sigaction (int, const struct old_kernel_sigaction *,
- struct old_kernel_sigaction *);
-extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
- struct kernel_sigaction *, size_t);
+extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded,
+ struct old_kernel_sigaction *__unbounded);
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded,
+ struct kernel_sigaction *__unbounded, size_t);
/* The variable is shared between all wrappers around signal handling
functions which have RT equivalents. */
@@ -95,8 +95,9 @@ __libc_sigaction (sig, act, oact)
/* XXX The size argument hopefully will have to be changed to the
real size of the user-level sigset_t. */
- result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : NULL,
- oact ? &koact : NULL, _NSIG / 8);
+ result = INLINE_SYSCALL (rt_sigaction, 4, sig,
+ act ? __ptrvalue (&kact) : NULL,
+ oact ? __ptrvalue (&koact) : NULL, _NSIG / 8);
if (result >= 0 || errno != ENOSYS)
{
@@ -133,8 +134,9 @@ __libc_sigaction (sig, act, oact)
}
#endif
}
- result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : NULL,
- oact ? &k_osigact : NULL);
+ result = INLINE_SYSCALL (sigaction, 3, sig,
+ act ? __ptrvalue (&k_sigact) : NULL,
+ oact ? __ptrvalue (&k_osigact) : NULL);
if (oact && result >= 0)
{
oact->sa_handler = k_osigact.k_sa_handler;
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index 79701ee..e97c148 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -21,14 +21,15 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include <linux/posix_types.h>
-extern int __syscall_chown (const char *__file,
+extern int __syscall_chown (const char *__unbounded __file,
__kernel_uid_t __owner, __kernel_gid_t __group);
#ifdef __NR_chown32
-extern int __syscall_chown32 (const char *__file,
+extern int __syscall_chown32 (const char *__unbounded __file,
__kernel_uid32_t owner, __kernel_gid32_t group);
# if __ASSUME_32BITUIDS == 0
@@ -42,7 +43,7 @@ int
__chown (const char *file, uid_t owner, gid_t group)
{
#if __ASSUME_32BITUIDS
- return INLINE_SYSCALL (chown32, 3, file, owner, group);
+ return INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
#else
# ifdef __NR_chown32
if (__libc_missing_32bit_uids <= 0)
@@ -50,7 +51,7 @@ __chown (const char *file, uid_t owner, gid_t group)
int result;
int saved_errno = errno;
- result = INLINE_SYSCALL (chown32, 3, file, owner, group);
+ result = INLINE_SYSCALL (chown32, 3, CHECK_STRING (file), owner, group);
if (result == 0 || errno != ENOSYS)
return result;
@@ -66,7 +67,7 @@ __chown (const char *file, uid_t owner, gid_t group)
return -1;
}
- return INLINE_SYSCALL (chown, 3, file, owner, group);
+ return INLINE_SYSCALL (chown, 3, CHECK_STRING (file), owner, group);
#endif
}
weak_alias (__chown, chown)
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index dd1e5d8..93f19f4 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -23,6 +23,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include <kernel-features.h>
@@ -32,8 +33,8 @@
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
# endif
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
+extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
@@ -47,7 +48,7 @@ __libc_pread (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (0, offset));
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 06a992e..6482ce4 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -23,6 +23,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include <kernel-features.h>
@@ -33,8 +34,8 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
off64_t offset) internal_function;
# endif
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
+extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
@@ -48,7 +49,7 @@ __libc_pread64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+ result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
# if __ASSUME_PREAD_SYSCALL == 0
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index b45bb84..8283896 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -23,12 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include <kernel-features.h>
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
int dummy, off_t offset_hi, off_t offset_lo);
# if __ASSUME_PWRITE_SYSCALL == 0
@@ -46,7 +47,7 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (0, offset));
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 0481064..af07f60 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -23,12 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include <kernel-features.h>
#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count,
int dummy, off_t offset_hi, off_t offset_lo);
# if __ASSUME_PWRITE_SYSCALL == 0
@@ -46,7 +47,7 @@ __libc_pwrite64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
+ result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR ((off_t) (offset >> 32),
(off_t) (offset & 0xffffffff)));
# if __ASSUME_PWRITE_SYSCALL == 0
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index 7a44619..09a2755 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -23,6 +23,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
#include "kernel-features.h"
@@ -33,7 +34,7 @@ int __have_no_truncate64;
#endif
/* The order of hight, low depends on endianness. */
-extern int __syscall_truncate64 (const char *path, int dummy,
+extern int __syscall_truncate64 (const char *__unbounded path, int dummy,
int high_length, int low_length);
@@ -50,7 +51,7 @@ truncate64 (const char *path, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
- int result = INLINE_SYSCALL (truncate64, 3, path, 0,
+ int result = INLINE_SYSCALL (truncate64, 3, CHECK_STRING (path), 0,
__LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
index 63eb68c..2afc3e7 100644
--- a/sysdeps/unix/sysv/linux/mips/ustat.c
+++ b/sysdeps/unix/sysv/linux/mips/ustat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,8 +23,9 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
-extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf);
+extern int __syscall_ustat (unsigned long dev, struct ustat *__unbounded ubuf);
int
ustat (dev_t dev, struct ustat *ubuf)
@@ -34,5 +35,5 @@ ustat (dev_t dev, struct ustat *ubuf)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
- return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
+ return INLINE_SYSCALL (ustat, 2, k_dev, CHECK_1 (ubuf));
}
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
index ba1b468..2fed00d 100644
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -1,5 +1,5 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 95, 96, 97, 98, 00 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,8 +24,9 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <bp-checks.h>
-extern int __syscall_mknod (const char *, unsigned long, unsigned int);
+extern int __syscall_mknod (const char *__unbounded, unsigned long, unsigned int);
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
@@ -44,7 +45,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
- return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
+ return INLINE_SYSCALL (mknod, 3, CHECK_STRING (path), mode, k_dev);
}
weak_alias (__xmknod, _xmknod)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71005584b8e929b8b28bf847171a7209c9d42243
commit 71005584b8e929b8b28bf847171a7209c9d42243
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 7 00:47:05 2000 +0000
Add __libc_sigaction.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 2e70b32..ae8b7f8 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,7 +55,7 @@ extern void __default_rt_sa_restorer(void);
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-__sigaction (sig, act, oact)
+__libc_sigaction (sig, act, oact)
int sig;
const struct sigaction *act;
struct sigaction *oact;
@@ -147,4 +147,5 @@ __sigaction (sig, act, oact)
return result;
}
-weak_alias (__sigaction, sigaction)
+strong_alias (__libc_sigaction, __sigaction)
+weak_alias (__libc_sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f5d6cb60dce78885a09547b0974ffde7defe78c
commit 6f5d6cb60dce78885a09547b0974ffde7defe78c
Author: Greg McGary <greg@mcgary.org>
Date: Thu Jul 6 23:42:33 2000 +0000
* string/endian.h (__LONG_LONG_PAIR): New macro.
* sysdeps/unix/sysv/linux/ftruncate64.c: Use it.
* sysdeps/unix/sysv/linux/pread.c: Likewise.
* sysdeps/unix/sysv/linux/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/truncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index 768946e..e45afba 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -50,13 +50,8 @@ ftruncate64 (int fd, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- /* Use a fill argument to pass low, high in an aligned pair of
- arguments (here 2/3). */
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, low, high);
-#elif __BYTE_ORDER == __BIG_ENDIAN
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, high, low);
-#endif
+ int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0,
+ __LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index d926a06..dd1e5d8 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
+#include <endian.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -46,11 +47,8 @@ __libc_pread (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
-# endif
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+ __LONG_LONG_PAIR (0, offset));
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index d17dbeb..06a992e 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
+#include <endian.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -47,14 +48,9 @@ __libc_pread64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
-# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
- (off_t) (offset & 0xffffffff),
- (off_t) (offset >> 32));
-# endif
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index a83df31..b45bb84 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
+#include <endian.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -45,11 +46,8 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset);
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0);
-# endif
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
+ __LONG_LONG_PAIR (0, offset));
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 295a175..0481064 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -19,6 +19,7 @@
#include <errno.h>
#include <unistd.h>
+#include <endian.h>
#include <sysdep.h>
#include <sys/syscall.h>
@@ -45,15 +46,9 @@ __libc_pwrite64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
-# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
- (off_t) (offset & 0xffffffff),
- (off_t) (offset >> 32));
-# endif
-
+ __LONG_LONG_PAIR ((off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff)));
# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index bcdb9dd..7a44619 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -50,14 +50,8 @@ truncate64 (const char *path, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- /* Use a fill argument to pass low, high in an aligned pair of
- arguments (here 2/3). */
- int result = INLINE_SYSCALL (truncate64, 3, path, 0, low, high);
-#elif __BYTE_ORDER == __BIG_ENDIAN
- int result = INLINE_SYSCALL (truncate64, 3, path, 0, high, low);
-#endif
-
+ int result = INLINE_SYSCALL (truncate64, 3, path, 0,
+ __LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=573d31d4d36b2cdcb7676dfe5274c2312241349c
commit 573d31d4d36b2cdcb7676dfe5274c2312241349c
Author: Greg McGary <greg@mcgary.org>
Date: Thu Jul 6 00:48:39 2000 +0000
* sysdeps/generic/bp-checks.h: New file.
* sysdeps/generic/bp-thunks.h: Replace generic thunk definitions
with list of #include files.
* sysdeps/unix/make-syscalls.sh: Handle new arg signature
keyletters a, b, B, f, n, N, P, v, V. Fixup some indentation.
Don't generate BP thunk if `V' appears in signature.
Generate thunks with complete bounds checks.
* sysdeps/unix/syscalls.list: Refine signatures using new keyletters.
* sysdeps/unix/inet/syscalls.list: Likewise.
* sysdeps/unix/mman/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 575d4c4..117e7dd 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -21,18 +21,18 @@ bind - bind i:ipi __bind bind
connect - connect i:ipi __libc_connect __connect connect
getpeername - getpeername i:ipp __getpeername getpeername
getsockname - getsockname i:ipp __getsockname getsockname
-getsockopt - getsockopt i:iiipp __getsockopt getsockopt
+getsockopt - getsockopt i:iiiBN __getsockopt getsockopt
listen - listen i:ii __listen listen
-recv - recv i:ipii __libc_recv __recv recv
-recvfrom - recvfrom i:ipiipp __libc_recvfrom __recvfrom recvfrom
+recv - recv i:ibni __libc_recv __recv recv
+recvfrom - recvfrom i:ibnibN __libc_recvfrom __recvfrom recvfrom
recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
-send - send i:ipii __libc_send __send send
+send - send i:ibni __libc_send __send send
sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
-sendto - sendto i:ipiipi __libc_sendto __sendto sendto
-setsockopt - setsockopt i:iiipi __setsockopt setsockopt
+sendto - sendto i:ibnibn __libc_sendto __sendto sendto
+setsockopt - setsockopt i:iiibn __setsockopt setsockopt
shutdown - shutdown i:ii __shutdown shutdown
socket - socket i:iii __socket socket
-socketpair - socketpair i:iiip __socketpair socketpair
+socketpair - socketpair i:iiif __socketpair socketpair
#
# These are defined locally because the caller is also defined in this dir.
@@ -61,10 +61,10 @@ getresuid - getresuid i:ppp getresuid
s_ipc msgget ipc i:iiiip __syscall_ipc
s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
s_poll poll poll i:pii __syscall_poll
-s_pread64 pread64 pread i:ipiiii __syscall_pread
+s_pread64 pread64 pread i:ibniii __syscall_pread
s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
s_ptrace ptrace ptrace i:iipp __syscall_ptrace
-s_pwrite64 pwrite64 pwrite i:ipiiii __syscall_pwrite
+s_pwrite64 pwrite64 pwrite i:ibniii __syscall_pwrite
s_reboot reboot reboot i:iii __syscall_reboot
s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit
s_sigpending sigpending sigpending i:p __syscall_sigpending
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6964aca34a98c4b78128b5c973840de973e87848
commit 6964aca34a98c4b78128b5c973840de973e87848
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jul 5 15:37:11 2000 +0000
Fix type of fpu_control_t.
(_FPU_GETCW): Remove extra colon.
Patch by Ralf Baechle <ralf@uni-koblenz.de>.
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index 789a614..c5c83e0 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Mips version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe and Ralf Baechle.
@@ -86,10 +86,10 @@
#define _FPU_IEEE 0x00000F80
/* Type of the control word. */
-typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw) : )
+#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw))
#define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw))
/* Default control word set at startup. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22fb102e6bc2734a077d722461fde3e9a733a150
commit 22fb102e6bc2734a077d722461fde3e9a733a150
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 1 05:08:03 2000 +0000
(elf_machine_rela) [r_type == R_ALPHA_REFQUAD]: Use memcpy to load and
store value from relocation address to prevent unaligned trap.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index e20493b..a7f13e0 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -500,7 +500,12 @@ elf_machine_rela (struct link_map *map,
elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value);
else if (r_type == R_ALPHA_REFQUAD)
{
- sym_value += *reloc_addr;
+ void *reloc_addr_1 = reloc_addr;
+ Elf64_Addr reloc_addr_val;
+
+ /* Load value without causing unaligned trap. */
+ memcpy (&reloc_addr_val, reloc_addr_1, 8);
+ sym_value += reloc_addr_val;
#ifndef RTLD_BOOTSTRAP
if (map == &_dl_rtld_map)
{
@@ -516,7 +521,8 @@ elf_machine_rela (struct link_map *map,
sym_value -= reloc->r_addend;
}
#endif
- *reloc_addr = sym_value;
+ /* Store value without causing unaligned trap. */
+ memcpy (reloc_addr_1, &sym_value, 8);
}
else
_dl_reloc_bad_type (map, r_type, 0);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7228f3cac1460418ea004a960201a2925c8060b9
commit 7228f3cac1460418ea004a960201a2925c8060b9
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jun 23 11:09:25 2000 +0000
Replace arg-count with signatures.
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 9ae4f73..5367ef0 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,3 +1,3 @@
-# File name Caller Syscall name # args Strong name Weak names
+# File name Caller Syscall name Args Strong name Weak names
-cacheflush EXTRA cacheflush 4 __cacheflush cacheflush
+cacheflush EXTRA cacheflush i:iiii __cacheflush cacheflush
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4586ea96c4a1a8926ab667fff77eec98f296f7b
commit e4586ea96c4a1a8926ab667fff77eec98f296f7b
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jun 23 07:55:36 2000 +0000
* sysdeps/unix/sysv/linux/mips/sys/syscall.h (SYS_pivot_root,
SYS_mincore, SYS_madvise): Added.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
index 27dc08a..ccbacd7 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -84,7 +84,7 @@
#define SYS_SVR4_semsys (SYS_SVR4 + 53)
#define SYS_SVR4_ioctl (SYS_SVR4 + 54)
#define SYS_SVR4_uadmin (SYS_SVR4 + 55)
-#define SYS_SVR4_exch (SYS_SVR4 + 56)
+#define SYS_SVR4_exch (SYS_SVR4 + 56)
#define SYS_SVR4_utssys (SYS_SVR4 + 57)
#define SYS_SVR4_fsync (SYS_SVR4 + 58)
#define SYS_SVR4_exece (SYS_SVR4 + 59)
@@ -1209,6 +1209,9 @@
#define SYS_stat64 (SYS_Linux + 213)
#define SYS_lstat64 (SYS_Linux + 214)
#define SYS_fstat64 (SYS_Linux + 215)
+#define SYS_pivot_root (SYS_Linux + 216)
+#define SYS_mincore (SYS_Linux + 217)
+#define SYS_madvise (SYS_Linux + 218)
#endif /* sys/syscall.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0371ae0a3047fb43a296f7dba31b6a14b128696
commit d0371ae0a3047fb43a296f7dba31b6a14b128696
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jun 23 06:26:24 2000 +0000
Fix signature of execve.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 398bded..575d4c4 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -49,7 +49,7 @@ rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask
rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
-s_execve execve execve i:sss __syscall_execve
+s_execve execve execve i:spp __syscall_execve
s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
s_getcwd getcwd getcwd i:pi __syscall_getcwd
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b63d27b615b8b176d3e173cb5eef98718acf5f03
commit b63d27b615b8b176d3e173cb5eef98718acf5f03
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jun 22 21:12:27 2000 +0000
Replace arg-count with signatures.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 7ed897c..398bded 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -1,81 +1,81 @@
-# File name Caller Syscall name # args Strong name Weak names
+# File name Caller Syscall name Args Strong name Weak names
#
# Calls for compatibility with existing MIPS OS implementations and
# compilers.
#
-cachectl - cachectl 3 __cachectl cachectl
-cacheflush - cacheflush 3 _flush_cache cacheflush
-sysmips - sysmips 4 __sysmips sysmips
+cachectl - cachectl i:pii __cachectl cachectl
+cacheflush - cacheflush i:pii _flush_cache cacheflush
+sysmips - sysmips i:iiii __sysmips sysmips
# override select.S in parent directory:
-select - select 5 __select select
-sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
+select - select i:ipppp __select select
+sigsuspend - sigsuspend i:p __sigsuspend sigsuspend
#
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept 3 __libc_accept __accept accept
-bind - bind 3 __bind bind
-connect - connect 3 __libc_connect __connect connect
-getpeername - getpeername 3 __getpeername getpeername
-getsockname - getsockname 3 __getsockname getsockname
-getsockopt - getsockopt 5 __getsockopt getsockopt
-listen - listen 2 __listen listen
-recv - recv 4 __libc_recv __recv recv
-recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
-send - send 4 __libc_send __send send
-sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
-sendto - sendto 6 __libc_sendto __sendto sendto
-setsockopt - setsockopt 5 __setsockopt setsockopt
-shutdown - shutdown 2 __shutdown shutdown
-socket - socket 3 __socket socket
-socketpair - socketpair 4 __socketpair socketpair
+accept - accept i:ipp __libc_accept __accept accept
+bind - bind i:ipi __bind bind
+connect - connect i:ipi __libc_connect __connect connect
+getpeername - getpeername i:ipp __getpeername getpeername
+getsockname - getsockname i:ipp __getsockname getsockname
+getsockopt - getsockopt i:iiipp __getsockopt getsockopt
+listen - listen i:ii __listen listen
+recv - recv i:ipii __libc_recv __recv recv
+recvfrom - recvfrom i:ipiipp __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg i:ipi __libc_recvmsg __recvmsg recvmsg
+send - send i:ipii __libc_send __send send
+sendmsg - sendmsg i:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto i:ipiipi __libc_sendto __sendto sendto
+setsockopt - setsockopt i:iiipi __setsockopt setsockopt
+shutdown - shutdown i:ii __shutdown shutdown
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiip __socketpair socketpair
#
# These are defined locally because the caller is also defined in this dir.
#
-s_llseek llseek _llseek 5 __syscall__llseek
-s_sigaction sigaction sigaction 3 __syscall_sigaction
-s_ustat ustat ustat 2 __syscall_ustat
-sys_mknod xmknod mknod 3 __syscall_mknod
+s_llseek llseek _llseek i:iiipi __syscall__llseek
+s_sigaction sigaction sigaction i:ipp __syscall_sigaction
+s_ustat ustat ustat i:ip __syscall_ustat
+sys_mknod xmknod mknod i:sii __syscall_mknod
# System calls with wrappers.
-rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
-rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_execve execve execve 3 __syscall_execve
-s_fstat64 fxstat64 fstat64 2 __syscall_fstat64
-s_ftruncate64 ftruncate64 ftruncate64 3 __syscall_ftruncate64
-s_getcwd getcwd getcwd 2 __syscall_getcwd
-s_getdents getdents getdents 3 __syscall_getdents
-s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg
-s_getpriority getpriority getpriority 2 __syscall_getpriority
-getresgid - getresgid 3 getresgid
-getresuid - getresuid 3 getresuid
-s_ipc msgget ipc 5 __syscall_ipc
-s_lstat64 lxstat64 lstat64 2 __syscall_lstat64
-s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 6 __syscall_pread
-s_putpmsg putpmsg putpmsg 5 __syscall_putpmsg
-s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite
-s_reboot reboot reboot 3 __syscall_reboot
-s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit
-s_sigpending sigpending sigpending 1 __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_stat64 xstat64 stat64 2 __syscall_stat64
-s_truncate64 truncate64 truncate64 3 __syscall_truncate64
+rt_sigaction - rt_sigaction i:ippi __syscall_rt_sigaction
+rt_sigpending - rt_sigpending i:pi __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask i:ippi __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo i:iip __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend i:pi __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait i:pppi __syscall_rt_sigtimedwait
+s_execve execve execve i:sss __syscall_execve
+s_fstat64 fxstat64 fstat64 i:ip __syscall_fstat64
+s_ftruncate64 ftruncate64 ftruncate64 i:iiii __syscall_ftruncate64
+s_getcwd getcwd getcwd i:pi __syscall_getcwd
+s_getdents getdents getdents i:ipi __syscall_getdents
+s_getpmsg getpmsg getpmsg i:ipppp __syscall_getpmsg
+s_getpriority getpriority getpriority i:ii __syscall_getpriority
+getresgid - getresgid i:ppp getresgid
+getresuid - getresuid i:ppp getresuid
+s_ipc msgget ipc i:iiiip __syscall_ipc
+s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
+s_poll poll poll i:pii __syscall_poll
+s_pread64 pread64 pread i:ipiiii __syscall_pread
+s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
+s_ptrace ptrace ptrace i:iipp __syscall_ptrace
+s_pwrite64 pwrite64 pwrite i:ipiiii __syscall_pwrite
+s_reboot reboot reboot i:iii __syscall_reboot
+s_setrlimit setrlimit setrlimit i:ip __syscall_setrlimit
+s_sigpending sigpending sigpending i:p __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask i:ipp __syscall_sigprocmask
+s_stat64 xstat64 stat64 i:sp __syscall_stat64
+s_truncate64 truncate64 truncate64 i:siii __syscall_truncate64
# Todo: we can pass 6 args in registers, no need for the wrapper
-sys_sysctl sysctl _sysctl 1 __syscall__sysctl
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_readv readv readv 3 __syscall_readv
-sys_stat xstat stat 2 __syscall_stat
-sys_writev writev writev 3 __syscall_writev
+sys_sysctl sysctl _sysctl i:p __syscall__sysctl
+sys_fstat fxstat fstat i:ip __syscall_fstat
+sys_lstat lxstat lstat i:sp __syscall_lstat
+sys_readv readv readv i:ipi __syscall_readv
+sys_stat xstat stat i:sp __syscall_stat
+sys_writev writev writev i:ipi __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=afda99352ce0a6720033a5c4decc94c1dfb9143b
commit afda99352ce0a6720033a5c4decc94c1dfb9143b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 22 17:58:17 2000 +0000
Define __S_TYPEISMQ, __S_TYPEISSEM, and __S_TYPEISSHM.
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
index b73c23a..6fad8cf 100644
--- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,6 +64,11 @@ struct stat
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h
index 252662e..2d5585d 100644
--- a/sysdeps/unix/sysv/aix/bits/stat.h
+++ b/sysdeps/unix/sysv/aix/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -109,11 +109,14 @@ struct stat64
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h
index 4ef5e72..1875742 100644
--- a/sysdeps/unix/sysv/hpux/bits/stat.h
+++ b/sysdeps/unix/sysv/hpux/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -113,6 +113,11 @@ struct stat64
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h
index 633f261..5228421 100644
--- a/sysdeps/unix/sysv/irix4/bits/stat.h
+++ b/sysdeps/unix/sysv/irix4/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,6 +50,11 @@ struct stat
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index e1dad32..dbb7938 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,11 +98,14 @@ struct stat64
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 1379ea7..a01e857 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -128,11 +128,14 @@ struct stat64
#define __S_IFBLK 0060000 /* Block device. */
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
index 4c6b729..8204f55 100644
--- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,6 +78,11 @@ struct stat
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index 34cc328..091f5ba 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -104,6 +104,11 @@ struct stat64
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
+/* POSIX.1b objects. */
+#define __S_TYPEISMQ(buf) (0)
+#define __S_TYPEISSEM(buf) (0)
+#define __S_TYPEISSHM(buf) (0)
+
/* Protection bits. */
#define __S_ISUID 04000 /* Set user ID on execution. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52783ef8b62808bf8e9f2797aea597182ee24c97
commit 52783ef8b62808bf8e9f2797aea597182ee24c97
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jun 22 13:50:01 2000 +0000
Fix one more typoe for sysctl.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 125f23b..7ed897c 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -73,7 +73,7 @@ s_stat64 xstat64 stat64 2 __syscall_stat64
s_truncate64 truncate64 truncate64 3 __syscall_truncate64
# Todo: we can pass 6 args in registers, no need for the wrapper
-sys_sysctl sysctl _sysctl 1 __syscall_sysctl
+sys_sysctl sysctl _sysctl 1 __syscall__sysctl
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
sys_readv readv readv 3 __syscall_readv
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41c427da070c8683d11ea52e119d085fcdb5afcc
commit 41c427da070c8683d11ea52e119d085fcdb5afcc
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Jun 22 13:38:05 2000 +0000
Fix sysctl entry.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index d8c5afa..125f23b 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -73,7 +73,7 @@ s_stat64 xstat64 stat64 2 __syscall_stat64
s_truncate64 truncate64 truncate64 3 __syscall_truncate64
# Todo: we can pass 6 args in registers, no need for the wrapper
-sysctl sysctl _sysctl 1 __syscall_sysctl
+sys_sysctl sysctl _sysctl 1 __syscall_sysctl
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
sys_readv readv readv 3 __syscall_readv
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a725b6114a77a1f36cd7ae2ddd129aebd5bddd0
commit 0a725b6114a77a1f36cd7ae2ddd129aebd5bddd0
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jun 20 14:16:21 2000 +0000
Deltas for math test suite on MIPS
diff --git a/sysdeps/mips/fpu/libm-test-ulps b/sysdeps/mips/fpu/libm-test-ulps
new file mode 100644
index 0000000..515d071
--- /dev/null
+++ b/sysdeps/mips/fpu/libm-test-ulps
@@ -0,0 +1,1079 @@
+# Begin of automatic generation
+
+# asin
+Test "asin (-0.5) == -pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.5) == pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.7) == 0.7753974966107530637":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# atanh
+Test "atanh (0.7) == 0.8673005276940531944":
+double: 1
+idouble: 1
+
+# cabs
+Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# casin
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+float: 1
+ifloat: 1
+
+# catan
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+float: 3
+ifloat: 3
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+float: 4
+ifloat: 4
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+double: 1
+idouble: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+double: 4
+idouble: 4
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+float: 4
+ifloat: 4
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.970299) == 0.99":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+idouble: 1
+
+# cexp
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+float: 1
+ifloat: 1
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+float: 1
+ifloat: 1
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+float: 1
+ifloat: 1
+
+# cos
+Test "cos (0.7) == 0.7648421872844884262":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "cos (pi/2) == 0":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+
+# cpow
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+# csin
+Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+float: 1
+ifloat: 1
+
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+float: 1
+ifloat: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# erfc
+Test "erfc (0.7) == 0.32219880616258152702":
+double: 1
+idouble: 1
+Test "erfc (1.2) == 0.089686021770364619762":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "erfc (2.0) == 0.0046777349810472658379":
+double: 1
+idouble: 1
+Test "erfc (4.1) == 0.67000276540848983727e-8":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.7) == 5.0118723362727228500":
+float: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# expm1
+Test "expm1 (1) == M_El - 1.0":
+float: 1
+ifloat: 1
+
+# fmod
+Test "fmod (-6.5, -2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (-6.5, 2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, -2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, 2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "j0 (8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+
+# j1
+Test "j1 (10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "j1 (2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+
+# jn
+Test "jn (0, 10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "jn (0, 2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "jn (0, 8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "jn (1, 2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+Test "jn (10, 0.1) == 0.26905328954342155795e-19":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+Test "jn (10, 0.7) == 0.75175911502153953928e-11":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (10, 10.0) == 0.20748610663335885770":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.1) == 0.000020820315754756261429":
+double: 1
+idouble: 1
+Test "jn (3, 0.7) == 0.0069296548267508408077":
+float: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.058379379305186812343":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (3, 2.0) == 0.12894324947440205110":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log
+Test "log (0.7) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log10
+Test "log10 (0.7) == -0.15490195998574316929":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.3) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log2
+Test "log2 (0.7) == -0.51457317282975824043":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# sincos
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
+float: 1
+ifloat: 1
+
+# sinh
+Test "sinh (0.7) == 0.75858370183953350346":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tan
+Test "tan (pi/4) == 1":
+double: 0.5
+idouble: 0.5
+
+# tanh
+Test "tanh (0.7) == 0.60436777711716349631":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "y1 (0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "y1 (10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# yn
+Test "yn (0, 0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "yn (1, 0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (10, 0.1) == -0.11831335132045197885e19":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "yn (10, 0.7) == -0.42447194260703866924e10":
+double: 3
+idouble: 3
+Test "yn (10, 1.0) == -0.12161801427868918929e9":
+double: 1
+idouble: 1
+Test "yn (10, 10.0) == -0.35981415218340272205":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.54220803928264":
+double: 2
+idouble: 2
+Test "yn (3, 0.1) == -5099.3323786129048894":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 0.7) == -15.819479052819633505":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (3, 10.0) == -0.25136265718383732978":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.1277837768404277861":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "asin":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atanh":
+double: 1
+idouble: 1
+
+Function: "cabs":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cacos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cacos":
+float: 1
+ifloat: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "casin":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: Imaginary part of "casin":
+float: 1
+ifloat: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+
+Function: Real part of "catan":
+float: 4
+ifloat: 4
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+Function: "cbrt":
+double: 1
+idouble: 1
+
+Function: Real part of "ccos":
+double: 1
+idouble: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+
+Function: Imaginary part of "cpow":
+double: 1.1031
+float: 2
+idouble: 1.1031
+ifloat: 2
+
+Function: Imaginary part of "csin":
+float: 1
+ifloat: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "csqrt":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "erfc":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+Function: "expm1":
+float: 1
+ifloat: 1
+
+Function: "fmod":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "hypot":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan":
+double: 0.5
+idouble: 0.5
+
+Function: "tanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9560fca3ddbd41b4dd8d048af58903f861055ad
commit d9560fca3ddbd41b4dd8d048af58903f861055ad
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jun 20 13:05:21 2000 +0000
* sysdeps/mips/fpu/fesetenv.c (__fesetenv): Flush fpu pipeline
first.
* sysdeps/mips/fpu/feholdexcpt.c: New file.
* sysdeps/mips/fpu/fraiseexcpt.c: New file.
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/feholdexcpt.c
similarity index 61%
copy from sysdeps/mips/fpu/fesetenv.c
copy to sysdeps/mips/fpu/feholdexcpt.c
index 7ae688a..ab92a71 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/feholdexcpt.c
@@ -1,7 +1,7 @@
-/* Install given floating-point environment.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@suse.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,21 +20,19 @@
#include <fenv.h>
#include <fpu_control.h>
-#include <shlib-compat.h>
int
-__fesetenv (const fenv_t *envp)
+feholdexcept (fenv_t *envp)
{
- if (envp == FE_DFL_ENV)
- _FPU_SETCW (_FPU_DEFAULT);
- else
- _FPU_SETCW (envp->__fp_control_register);
+ fpu_control_t cw;
+
+ /* Save the current state. */
+ _FPU_GETCW (cw);
+ envp->__fp_control_register = cw;
+
+ /* Clear all exception enable bits and flags. */
+ cw &= ~(_FPU_MASK_V|_FPU_MASK_Z|_FPU_MASK_O|_FPU_MASK_U|_FPU_MASK_I|FE_ALL_EXCEPT);
+ _FPU_SETCW (cw);
- /* Success. */
return 0;
}
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fesetenv, __old_fesetenv)
-compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
-#endif
-versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index 7ae688a..ab90e4d 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -25,6 +25,11 @@
int
__fesetenv (const fenv_t *envp)
{
+ fpu_control_t cw;
+
+ /* Read first current state to flush fpu pipeline. */
+ _FPU_GETCW (cw);
+
if (envp == FE_DFL_ENV)
_FPU_SETCW (_FPU_DEFAULT);
else
@@ -33,6 +38,7 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fraiseexcpt.c
similarity index 64%
copy from sysdeps/mips/fpu/fesetenv.c
copy to sysdeps/mips/fpu/fraiseexcpt.c
index 7ae688a..25c09e3 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fraiseexcpt.c
@@ -1,7 +1,7 @@
-/* Install given floating-point environment.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Raise given exceptions.
+ Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@suse.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -23,18 +23,24 @@
#include <shlib-compat.h>
int
-__fesetenv (const fenv_t *envp)
+__feraiseexcept (int excepts)
{
- if (envp == FE_DFL_ENV)
- _FPU_SETCW (_FPU_DEFAULT);
- else
- _FPU_SETCW (envp->__fp_control_register);
+ fpu_control_t cw;
+
+ /* Get current state. */
+ _FPU_GETCW (cw);
+
+ /* Set exceptions bits. */
+ cw |= (excepts & FE_ALL_EXCEPT);
+
+ /* Set new state. */
+ _FPU_SETCW (cw);
- /* Success. */
return 0;
}
+
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__fesetenv, __old_fesetenv)
-compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
#endif
-versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c92d72a8fef237d5383b4866c31cab45d28547f7
commit c92d72a8fef237d5383b4866c31cab45d28547f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 20 06:33:57 2000 +0000
Include <sysdeps/generic/memusage.h>.
diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h
index 462b5ce..4b8f455 100644
--- a/sysdeps/alpha/memusage.h
+++ b/sysdeps/alpha/memusage.h
@@ -18,4 +18,4 @@
#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; })
-#include <sysdeps/generic/memprof.h>
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h
index 4e5081c..86ab085 100644
--- a/sysdeps/arm/memusage.h
+++ b/sysdeps/arm/memusage.h
@@ -18,4 +18,4 @@
#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
-#include <sysdeps/generic/memprof.h>
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h
index 5fd1cf4..72138e2 100644
--- a/sysdeps/m68k/memusage.h
+++ b/sysdeps/m68k/memusage.h
@@ -19,4 +19,4 @@
#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
-#include <sysdeps/generic/memprof.h>
+#include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h
index 93f2917..8e421e4 100644
--- a/sysdeps/mips/memusage.h
+++ b/sysdeps/mips/memusage.h
@@ -18,4 +18,4 @@
#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; })
-#include <sysdeps/generic/memprof.h>
+#include <sysdeps/generic/memusage.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=949eb60694c7e044852603705b56af6d83884a10
commit 949eb60694c7e044852603705b56af6d83884a10
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 20 06:29:45 2000 +0000
Macro to allow memory usage tracking.
diff --git a/sysdeps/alpha/memusage.h b/sysdeps/alpha/memusage.h
new file mode 100644
index 0000000..462b5ce
--- /dev/null
+++ b/sysdeps/alpha/memusage.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/arm/memusage.h b/sysdeps/arm/memusage.h
new file mode 100644
index 0000000..4e5081c
--- /dev/null
+++ b/sysdeps/arm/memusage.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/m68k/memusage.h b/sysdeps/m68k/memusage.h
new file mode 100644
index 0000000..5fd1cf4
--- /dev/null
+++ b/sysdeps/m68k/memusage.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/mips/memusage.h b/sysdeps/mips/memusage.h
new file mode 100644
index 0000000..93f2917
--- /dev/null
+++ b/sysdeps/mips/memusage.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f56045a39c8cef606000cfc98c70ae4b94035f7
commit 3f56045a39c8cef606000cfc98c70ae4b94035f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 20 06:29:15 2000 +0000
Renamed to memusage.h.
diff --git a/sysdeps/alpha/memprof.h b/sysdeps/alpha/memprof.h
deleted file mode 100644
index 462b5ce..0000000
--- a/sysdeps/alpha/memprof.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; })
-
-#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/arm/memprof.h b/sysdeps/arm/memprof.h
deleted file mode 100644
index 4e5081c..0000000
--- a/sysdeps/arm/memprof.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
-
-#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/m68k/memprof.h b/sysdeps/m68k/memprof.h
deleted file mode 100644
index 5fd1cf4..0000000
--- a/sysdeps/m68k/memprof.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-
-#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
-
-#include <sysdeps/generic/memprof.h>
diff --git a/sysdeps/mips/memprof.h b/sysdeps/mips/memprof.h
deleted file mode 100644
index 93f2917..0000000
--- a/sysdeps/mips/memprof.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; })
-
-#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=feaff189768381cd8703665cd22411f6ba90bf2b
commit feaff189768381cd8703665cd22411f6ba90bf2b
Author: Andreas Jaeger <aj@suse.de>
Date: Sun Jun 18 17:20:01 2000 +0000
* sysdeps/mips/dl-machine.h: Always use $25 as jump register.
Patch by Ralf Baechle <ralf@uni-koblenz.de>.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 322add2..f08afa9 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -403,7 +403,8 @@ _dl_start_user:\n\
# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
la $2, _dl_fini\n\
# Jump to the user entry point.\n\
- jr $17\n"\
+ move $25, $17\n\
+ jr $25\n"\
_RTLD_EPILOGUE(ENTRY_POINT)\
"\n.previous"\
);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d1cec93d5578d41e851de82eba97a48740281f1
commit 0d1cec93d5578d41e851de82eba97a48740281f1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 18 05:21:59 2000 +0000
Define LINUX_LINK_MAX.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
index b822daa..235c02c 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,10 @@
#include <linux_fsinfo.h>
+
+/* The Linux kernel header mentioned this as a kind of generic value. */
+#define LINUX_LINK_MAX 127
+
static long int default_fpathconf (int fd, int name);
/* Get file-specific information about descriptor FD. */
@@ -60,7 +64,7 @@ __fpathconf (fd, name)
/* Determine the filesystem type. */
if (__fstatfs (fd, &fsbuf) < 0)
/* not possible, return the default value. */
- return LINK_MAX;
+ return LINUX_LINK_MAX;
switch (fsbuf.f_type)
{
@@ -90,7 +94,7 @@ __fpathconf (fd, name)
return UFS_LINK_MAX;
default:
- return LINK_MAX;
+ return LINUX_LINK_MAX;
}
}
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index df5d72a..be5e938 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -57,7 +57,7 @@ __pathconf (const char *path, int name)
/* Determine the filesystem type. */
if (__statfs (path, &fsbuf) < 0)
/* not possible, return the default value. */
- return LINK_MAX;
+ return LINUX_LINK_MAX;
switch (fsbuf.f_type)
{
@@ -87,7 +87,7 @@ __pathconf (const char *path, int name)
return UFS_LINK_MAX;
default:
- return LINK_MAX;
+ return LINUX_LINK_MAX;
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=821954bf6cb8216551aa2e249f61d0e6ad26151a
commit 821954bf6cb8216551aa2e249f61d0e6ad26151a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 18 05:19:19 2000 +0000
Define LINK_MAX.
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index 24d6880..df5d72a 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,10 @@
#include <linux_fsinfo.h>
+
+/* The Linux kernel header mentioned this as a kind of generic value. */
+#define LINUX_LINK_MAX 127
+
static long int default_pathconf (const char *path, int name);
/* Get file-specific information about PATH. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91f51e028bf1185317705bb4e3968c504ac61af4
commit 91f51e028bf1185317705bb4e3968c504ac61af4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 15 06:59:07 2000 +0000
Add libgcc frame handling functions here.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 7eee0f7..ac21c9f 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -4,6 +4,11 @@ libc {
_inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse;
_hae_shift;
+ # Exception handling support functions from libgcc
+ __register_frame; __register_frame_table; __deregister_frame;
+ __register_frame_info; __deregister_frame_info; __frame_state_for;
+ __register_frame_info_table;
+
# b*
bus_base; bus_base_sparse;
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 7e71a86..4ac5b58 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -1,4 +1,10 @@
libc {
+ GLIBC_2.0 {
+ # Exception handling support functions from libgcc
+ __register_frame; __register_frame_table; __deregister_frame;
+ __register_frame_info; __deregister_frame_info; __frame_state_for;
+ __register_frame_info_table;
+ }
GLIBC_2.1 {
ioperm; iopl;
inb; inw; inl;
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index d996b24..b70d1d1 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -1,5 +1,10 @@
libc {
GLIBC_2.0 {
+ # Exception handling support functions from libgcc
+ __register_frame; __register_frame_table; __deregister_frame;
+ __register_frame_info; __deregister_frame_info; __frame_state_for;
+ __register_frame_info_table;
+
# c*
cacheflush;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49e1806ccb8e5dc0bdf9a1dedbd3f3f42a7cfe67
commit 49e1806ccb8e5dc0bdf9a1dedbd3f3f42a7cfe67
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Jun 14 13:13:58 2000 +0000
* sysdeps/mips/dl-machine.h: Pass finalizer correctly to user
entry point.
Reported by Jim Pick <jim@jimpick.com>.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index a67efac..322add2 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -400,15 +400,10 @@ _dl_start_user:\n\
# Call the function to run the initializers.\n\
jal _dl_init
addiu $29, 16\n\
- # Pass our finalizer function to the user in ra.\n\
- la $31, _dl_fini\n\
+ # Pass our finalizer function to the user in $2 as per ELF ABI.\n\
+ la $2, _dl_fini\n\
# Jump to the user entry point.\n\
- move $25, $17\n\
- lw $4, 0($29)\n\
- lw $5, 4($29)\n\
- lw $6, 8($29)\n\
- lw $7, 12($29)\n\
- jr $25\n"\
+ jr $17\n"\
_RTLD_EPILOGUE(ENTRY_POINT)\
"\n.previous"\
);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a759aecd6b274b8832ee49cbe4c62165116f567d
commit a759aecd6b274b8832ee49cbe4c62165116f567d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 14 00:44:54 2000 +0000
Additional files to distribute for AIX.
diff --git a/sysdeps/unix/sysv/aix/Dist b/sysdeps/unix/sysv/aix/Dist
new file mode 100644
index 0000000..9db1d74
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/Dist
@@ -0,0 +1,6 @@
+dl-sym.c
+dl-open.c
+dl-close.c
+kernel_proto.h
+bits/utmpx.h
+gnu/lib-names.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91931049ec36214b26fa80a4e71325f50ab27d96
commit 91931049ec36214b26fa80a4e71325f50ab27d96
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 14 00:32:09 2000 +0000
Add oldgetrlimit64.c.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 49bdaf3..60513f7 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -10,3 +10,4 @@ sys/elf.h
sys/io.h
sys/procfs.h
sys/user.h
+oldgetrlimit64.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66268e64b98e7d2a51ba76bb226e444f39eee972
commit 66268e64b98e7d2a51ba76bb226e444f39eee972
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jun 13 14:33:22 2000 +0000
* sysdeps/mips/elf/start.S (ENTRY_POINT): Remove mips64 defines.
Patch by Ralf Baechle <ralf@gnu.org>.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index f2df8a5..ad7976e 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -72,9 +72,6 @@ ENTRY_POINT:
#endif
move $31, $0
-#if (__mips64)
-# define la dla
-#endif
la $4, main /* main */
lw $5, 0($29) /* argc */
addu $6, $29, 4 /* argv */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=959c224a4a030269347bec6af21e2455cd92a727
commit 959c224a4a030269347bec6af21e2455cd92a727
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 8 04:48:05 2000 +0000
DT_THISPROCNUM definition for MIPS.
diff --git a/sysdeps/mips/dl-dtprocnum.h b/sysdeps/mips/dl-dtprocnum.h
new file mode 100644
index 0000000..bff02c8
--- /dev/null
+++ b/sysdeps/mips/dl-dtprocnum.h
@@ -0,0 +1,22 @@
+/* Configuration of lookup functions. MIPS version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Number of extra dynamic section entries for this architecture. By
+ default there are none. */
+#define DT_THISPROCNUM DT_MIPS_NUM
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3d5b656c5a04d4f539c1c03e58ef86b94849d1e
commit d3d5b656c5a04d4f539c1c03e58ef86b94849d1e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 7 16:53:09 2000 +0000
(__fdimf): Only declare if __USE_ISOC99.
(fdimf, __fdim, fdim): Likewise.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index c0911ec..065009c 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -152,6 +152,8 @@ __MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); }
__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); }
+#ifdef __USE_ISOC99
+
__MATH_INLINE float __fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0.0f : __x - __y;
@@ -171,3 +173,5 @@ __MATH_INLINE double fdim (double __x, double __y) __THROW
{
return __x < __y ? 0.0 : __x - __y;
}
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa39016a273e4dc5f0202d430ee4b5b50a8cc077
commit fa39016a273e4dc5f0202d430ee4b5b50a8cc077
Author: Greg McGary <greg@mcgary.org>
Date: Wed Jun 7 00:30:05 2000 +0000
* sysdeps/mips/elf/start.S: Trim redundant code.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 064fe7e..f2df8a5 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -73,16 +73,8 @@ ENTRY_POINT:
move $31, $0
#if (__mips64)
- dla $4, main /* main */
- lw $5, 0($29) /* argc */
- addu $6, $29, 4 /* argv */
- /* Allocate space on the stack for seven arguments and make sure
- the stack is aligned to double words (8 bytes). */
- and $29, 0xfffffff8
- subu $29, 32
- dla $7, _init /* init */
- dla $8, _fini
-#else
+# define la dla
+#endif
la $4, main /* main */
lw $5, 0($29) /* argc */
addu $6, $29, 4 /* argv */
@@ -92,7 +84,6 @@ ENTRY_POINT:
subu $29, 32
la $7, _init /* init */
la $8, _fini
-#endif
sw $8, 16($29) /* fini */
sw $2, 20($29) /* rtld_fini */
sw $29, 24($29) /* stack_end */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb29107be81b4fe8c2126a00833e55bb07d024cd
commit eb29107be81b4fe8c2126a00833e55bb07d024cd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 4 16:10:51 2000 +0000
Add __THROW to all inlines to match prototypes in mathcalls.h.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 87765d2..c0911ec 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
@@ -60,7 +60,7 @@
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
-NAME (TYPE __x, TYPE __y) \
+NAME (TYPE __x, TYPE __y) __THROW \
{ \
TYPE __z; \
__asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \
@@ -76,14 +76,14 @@ __inline_copysign(copysign, double)
#if __GNUC_PREREQ (2, 8)
-__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); }
-__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); }
-__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); }
-__MATH_INLINE double fabs (double __x) { return __builtin_fabs (__x); }
+__MATH_INLINE float __fabsf (float __x) __THROW { return __builtin_fabsf (__x); }
+__MATH_INLINE float fabsf (float __x) __THROW { return __builtin_fabsf (__x); }
+__MATH_INLINE double __fabs (double __x) __THROW { return __builtin_fabs (__x); }
+__MATH_INLINE double fabs (double __x) __THROW { return __builtin_fabs (__x); }
#else
#define __inline_fabs(NAME, TYPE) \
__MATH_INLINE TYPE \
-NAME (TYPE __x) \
+NAME (TYPE __x) __THROW \
{ \
TYPE __z; \
__asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \
@@ -104,7 +104,7 @@ __inline_fabs(fabs, double)
must be integral, as this avoids unpleasant integer overflows. */
__MATH_INLINE float
-__floorf (float __x)
+__floorf (float __x) __THROW
{
/* Check not zero since floor(-0) == -0. */
if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
@@ -130,7 +130,7 @@ __floorf (float __x)
}
__MATH_INLINE double
-__floor (double __x)
+__floor (double __x) __THROW
{
if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
{
@@ -148,26 +148,26 @@ __floor (double __x)
return __x;
}
-__MATH_INLINE float floorf (float __x) { return __floorf(__x); }
-__MATH_INLINE double floor (double __x) { return __floor(__x); }
+__MATH_INLINE float floorf (float __x) __THROW { return __floorf(__x); }
+__MATH_INLINE double floor (double __x) __THROW { return __floor(__x); }
-__MATH_INLINE float __fdimf (float __x, float __y)
+__MATH_INLINE float __fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0.0f : __x - __y;
}
-__MATH_INLINE float fdimf (float __x, float __y)
+__MATH_INLINE float fdimf (float __x, float __y) __THROW
{
return __x < __y ? 0.0f : __x - __y;
}
-__MATH_INLINE double __fdim (double __x, double __y)
+__MATH_INLINE double __fdim (double __x, double __y) __THROW
{
return __x < __y ? 0.0 : __x - __y;
}
-__MATH_INLINE double fdim (double __x, double __y)
+__MATH_INLINE double fdim (double __x, double __y) __THROW
{
return __x < __y ? 0.0 : __x - __y;
}
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 9dad4c6..82446d2 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -109,7 +109,7 @@
#endif
#define __inline_mathop1(float_type,func, op) \
- __m81_defun (float_type, func, (float_type __mathop_x)) \
+ __m81_defun (float_type, func, (float_type __mathop_x)) __THROW \
{ \
float_type __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
@@ -169,7 +169,7 @@ __inline_mathop(trunc, intrz)
#define __inline_functions(float_type, s) \
__m81_inline float_type \
-__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
+__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) __THROW \
{ \
float_type __mantissa, __exponent; \
int __iexponent; \
@@ -190,7 +190,7 @@ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
return __mantissa; \
} \
\
-__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
+__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) __THROW \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -206,7 +206,7 @@ __m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
return __result; \
} \
\
-__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
+__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) __THROW \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -232,7 +232,7 @@ __inline_functions(long double,l)
#ifdef __USE_MISC
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
+__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) __THROW \
{ \
/* There is no branch-condition for infinity, \
so we must extract and examine the condition codes manually. */ \
@@ -242,7 +242,7 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
} \
\
-__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
+__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) __THROW \
{ \
/* There is no branch-condition for infinity, so we must extract and \
examine the condition codes manually. */ \
@@ -253,7 +253,7 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
} \
\
__m81_defun (float_type, __CONCAT(__scalbn,s), \
- (float_type __x, int __n)) \
+ (float_type __x, int __n)) __THROW \
{ \
float_type __result; \
__asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
@@ -270,7 +270,7 @@ __inline_functions(long double,l)
#if defined __USE_MISC || defined __USE_XOPEN
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) __THROW \
{ \
char __result; \
__asm("ftst%.x %1\n" \
@@ -290,7 +290,7 @@ __inline_functions(long double,l)
#ifdef __USE_ISOC99
# define __inline_functions(float_type, s) \
-__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
+__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) __THROW \
{ \
/* There is no branch-condition for the sign bit, so we must extract \
and examine the condition codes manually. */ \
@@ -301,12 +301,12 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
} \
\
__m81_defun (float_type, __CONCAT(__scalbln,s), \
- (float_type __x, long int __n)) \
+ (float_type __x, long int __n)) __THROW \
{ \
return __CONCAT(__scalbn,s) (__x, __n); \
} \
\
-__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
+__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) __THROW \
{ \
float_type __result; \
unsigned long int __ctrl_reg; \
@@ -320,7 +320,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
return __result; \
} \
\
-__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \
+__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) __THROW \
{ \
long int __result; \
__asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \
@@ -329,7 +329,7 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \
\
__m81_inline float_type \
__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
- float_type __z) \
+ float_type __z) __THROW \
{ \
return (__x * __y) + __z; \
}
@@ -346,7 +346,7 @@ __inline_functions (long double,l)
# define __inline_functions(float_type, s) \
__m81_inline void \
__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
- float_type *__cosx) \
+ float_type *__cosx) __THROW \
{ \
__asm ("fsincos%.x %2,%1:%0" \
: "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
@@ -367,13 +367,13 @@ __inline_functions (long double,l)
NAME, to make token pasting work correctly with -traditional. */
# define __inline_forward_c(rettype, name, args1, args2) \
extern __inline rettype __attribute__((__const__)) \
-name args1 \
+name args1 __THROW \
{ \
return __CONCAT(__,name) args2; \
}
# define __inline_forward(rettype, name, args1, args2) \
-extern __inline rettype name args1 \
+extern __inline rettype name args1 __THROW \
{ \
return __CONCAT(__,name) args2; \
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3b737cb0d63c4b4f0e3fc22219d771c3e6f08da
commit c3b737cb0d63c4b4f0e3fc22219d771c3e6f08da
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Jun 2 13:10:38 2000 +0000
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Fix typo.
Reported by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index 84c6d02..b015898 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -37,15 +37,15 @@ typedef unsigned long int greg_t;
#define NFPREG 33
/* Container for all general registers. */
-typedef greg_t gregset_t[NGREG];
-/* gregset_t must be an array. The array correspondends to:
+/* gregset_t must be an array. The below declared array corresponds to:
typedef struct gregset {
greg_t g_regs[32];
greg_t g_hi;
greg_t g_lo;
greg_t g_pad[3];
-} gregset_t;
-*/
+} gregset_t; */
+typedef greg_t gregset_t[NGREG];
+
/* Container for all FPU registers. */
typedef struct fpregset {
union {
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba747ea1614fa4309648c42477acf5629a2263d3
commit ba747ea1614fa4309648c42477acf5629a2263d3
Author: Andreas Jaeger <aj@suse.de>
Date: Wed May 31 12:03:35 2000 +0000
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Use array for
gregset_t.
* sysdeps/unix/sysv/linux/mips/Versions: Export _flush_cache.
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
index 11614a4..519295f 100644
--- a/sysdeps/unix/sysv/linux/mips/Versions
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -1,5 +1,8 @@
libc {
GLIBC_2.0 {
+ # Needed by gcc:
+ _flush_cache;
+
# c*
cachectl; cacheflush;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index e9a4fbc..84c6d02 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -37,13 +37,15 @@ typedef unsigned long int greg_t;
#define NFPREG 33
/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+/* gregset_t must be an array. The array correspondends to:
typedef struct gregset {
greg_t g_regs[32];
greg_t g_hi;
greg_t g_lo;
greg_t g_pad[3];
} gregset_t;
-
+*/
/* Container for all FPU registers. */
typedef struct fpregset {
union {
@@ -57,6 +59,7 @@ typedef struct fpregset {
unsigned int fp_pad;
} fpregset_t;
+
/* Context to describe whole processor state. */
typedef struct
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d5a02529ded7342f05a01d360e03e3ab7613f99
commit 6d5a02529ded7342f05a01d360e03e3ab7613f99
Author: Andreas Jaeger <aj@suse.de>
Date: Wed May 31 12:00:45 2000 +0000
* sysdeps/unix/sysv/linux/mips/ftruncate64.c: Fix prototype of
syscall.
* sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index 66c6548..768946e 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -33,7 +33,8 @@ extern int __have_no_truncate64;
#endif
/* The order of hight, low depends on endianness. */
-extern int __syscall_ftruncate64 (int fd, int high_length, int low_length);
+extern int __syscall_ftruncate64 (int fd, int dummy, int high_length,
+ int low_length);
/* Truncate the file FD refers to to LENGTH bytes. */
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
index 08d9667..bcdb9dd 100644
--- a/sysdeps/unix/sysv/linux/mips/truncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -33,7 +33,8 @@ int __have_no_truncate64;
#endif
/* The order of hight, low depends on endianness. */
-extern int __syscall_truncate64 (const char *path, int high_length, int low_length);
+extern int __syscall_truncate64 (const char *path, int dummy,
+ int high_length, int low_length);
/* Truncate the file FD refers to to LENGTH bytes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f41d856feb4376a224ad06226239ef06b03af352
commit f41d856feb4376a224ad06226239ef06b03af352
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 30 23:44:42 2000 +0000
(__old_glob): Loose __P.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index d85c50e..728f1fe 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -44,7 +44,7 @@ typedef struct
int
__old_glob (const char *pattern, int flags,
- int (*errfunc) __P ((const char *, int)),
+ int (*errfunc) (const char *, int),
old_glob_t *pglob)
{
glob_t correct;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=245061db80961b1b9bf0a8cf059d63399e2983ca
commit 245061db80961b1b9bf0a8cf059d63399e2983ca
Author: Andreas Jaeger <aj@suse.de>
Date: Tue May 30 12:50:17 2000 +0000
* sysdeps/unix/sysv/linux/mips/truncate64.c: New file.
* sysdeps/unix/sysv/linux/mips/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/mips/pread64.c: Readded file.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Readded file.
* sysdeps/unix/sysv/linux/mips/pread.c: Readded file.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Readded file.
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
new file mode 100644
index 0000000..66c6548
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -0,0 +1,83 @@
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <endian.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_ftruncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+extern int __have_no_truncate64;
+#endif
+
+/* The order of hight, low depends on endianness. */
+extern int __syscall_ftruncate64 (int fd, int high_length, int low_length);
+
+
+/* Truncate the file FD refers to to LENGTH bytes. */
+int
+ftruncate64 (int fd, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (! __have_no_truncate64)
+#endif
+ {
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ int saved_errno = errno;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Use a fill argument to pass low, high in an aligned pair of
+ arguments (here 2/3). */
+ int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, low, high);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, high, low);
+#endif
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (result != -1 || errno != ENOSYS)
+#endif
+ return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ __set_errno (saved_errno);
+ __have_no_truncate64 = 1;
+#endif
+ }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if ((off_t) length != length)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ return __ftruncate (fd, (off_t) length);
+#endif
+}
+
+#else
+/* Use the generic implementation. */
+# include <sysdeps/generic/ftruncate64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
new file mode 100644
index 0000000..d926a06
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <kernel-features.h>
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+
+# if __ASSUME_PREAD_SYSCALL == 0
+static ssize_t __emulate_pread (int fd, void *buf, size_t count,
+ off_t offset) internal_function;
+# endif
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
+
+
+ssize_t
+__libc_pread (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+# if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
+# elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
+# endif
+# if __ASSUME_PREAD_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread (fd, buf, count, offset);
+# endif
+ return result;
+}
+
+strong_alias (__libc_pread, __pread)
+weak_alias (__libc_pread, pread)
+
+# define __libc_pread(fd, buf, count, offset) \
+ static internal_function __emulate_pread (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
new file mode 100644
index 0000000..d17dbeb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <kernel-features.h>
+
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+
+# if __ASSUME_PREAD_SYSCALL == 0
+static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
+ off64_t offset) internal_function;
+# endif
+
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
+
+
+ssize_t
+__libc_pread64 (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+# if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
+# elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+# endif
+# if __ASSUME_PREAD_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread64 (fd, buf, count, offset);
+# endif
+ return result;
+}
+
+weak_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, pread64)
+
+# define __libc_pread64(fd, buf, count, offset) \
+ static internal_function __emulate_pread64 (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
new file mode 100644
index 0000000..a83df31
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <kernel-features.h>
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
+
+# if __ASSUME_PWRITE_SYSCALL == 0
+static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
+ off_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pwrite (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+# if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset);
+# elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0);
+# endif
+# if __ASSUME_PWRITE_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite (fd, buf, count, offset);
+# endif
+
+ return result;
+}
+
+strong_alias (__libc_pwrite, __pwrite)
+weak_alias (__libc_pwrite, pwrite)
+
+# define __libc_pwrite(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
new file mode 100644
index 0000000..295a175
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <kernel-features.h>
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
+
+extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
+
+# if __ASSUME_PWRITE_SYSCALL == 0
+static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
+ off64_t offset) internal_function;
+# endif
+
+ssize_t
+__libc_pwrite64 (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+# if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
+# elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+# endif
+
+# if __ASSUME_PWRITE_SYSCALL == 0
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
+
+ return result;
+}
+
+weak_alias (__libc_pwrite64, __pwrite64)
+weak_alias (__libc_pwrite64, pwrite64)
+
+# define __libc_pwrite64(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite64 (fd, buf, count, offset)
+#endif
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/truncate64.c b/sysdeps/unix/sysv/linux/mips/truncate64.c
new file mode 100644
index 0000000..08d9667
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/truncate64.c
@@ -0,0 +1,84 @@
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/types.h>
+#include <endian.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_truncate64
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+int __have_no_truncate64;
+#endif
+
+/* The order of hight, low depends on endianness. */
+extern int __syscall_truncate64 (const char *path, int high_length, int low_length);
+
+
+/* Truncate the file FD refers to to LENGTH bytes. */
+int
+truncate64 (const char *path, off64_t length)
+{
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (! __have_no_truncate64)
+#endif
+ {
+ unsigned int low = length & 0xffffffff;
+ unsigned int high = length >> 32;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ int saved_errno = errno;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Use a fill argument to pass low, high in an aligned pair of
+ arguments (here 2/3). */
+ int result = INLINE_SYSCALL (truncate64, 3, path, 0, low, high);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ int result = INLINE_SYSCALL (truncate64, 3, path, 0, high, low);
+#endif
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (result != -1 || errno != ENOSYS)
+#endif
+ return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ __set_errno (saved_errno);
+ __have_no_truncate64 = 1;
+#endif
+ }
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if ((off_t) length != length)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ return truncate (path, (off_t) length);
+#endif
+}
+
+#else
+/* Use the generic implementation. */
+# include <sysdeps/generic/truncate64.c>
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a07cbd18941f3437723f9ec88a6a392a78aee649
commit a07cbd18941f3437723f9ec88a6a392a78aee649
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 29 00:59:18 2000 +0000
(compare_and_swap): Return result.
diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h
index 01bd64e..c1f3b03 100644
--- a/sysdeps/arm/atomicity.h
+++ b/sysdeps/arm/atomicity.h
@@ -81,6 +81,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
: "=&r" (result), "=&r" (tmp)
: "r" (p), "r" (newval), "r" (oldval)
: "cc", "memory");
+ return result;
}
#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dae4f11aacf22e69b8cf71b2d2b59758c090fa5d
commit dae4f11aacf22e69b8cf71b2d2b59758c090fa5d
Author: Andreas Jaeger <aj@suse.de>
Date: Sat May 27 16:49:57 2000 +0000
* sysdeps/unix/sysv/linux/arm/pread.c: Removed, we can use the
normal version now.
* sysdeps/unix/sysv/linux/arm/pwrite.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c
deleted file mode 100644
index 06bc601..0000000
--- a/sysdeps/unix/sysv/linux/arm/pread.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/pread.c>
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c
deleted file mode 100644
index b9b5e35..0000000
--- a/sysdeps/unix/sysv/linux/arm/pwrite.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/pwrite.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00842512db6b975176bcca6964bfa3a4b97050e6
commit 00842512db6b975176bcca6964bfa3a4b97050e6
Author: Andreas Jaeger <aj@suse.de>
Date: Sat May 27 16:49:02 2000 +0000
* sysdeps/unix/sysv/linux/mips/pread.c: Removed, we can use the
normal version now.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
deleted file mode 100644
index d926a06..0000000
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <kernel-features.h>
-
-#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-
-# if __ASSUME_PREAD_SYSCALL == 0
-static ssize_t __emulate_pread (int fd, void *buf, size_t count,
- off_t offset) internal_function;
-# endif
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
-
-
-
-ssize_t
-__libc_pread (fd, buf, count, offset)
- int fd;
- void *buf;
- size_t count;
- off_t offset;
-{
- ssize_t result;
-
- /* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
-# endif
-# if __ASSUME_PREAD_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pread (fd, buf, count, offset);
-# endif
- return result;
-}
-
-strong_alias (__libc_pread, __pread)
-weak_alias (__libc_pread, pread)
-
-# define __libc_pread(fd, buf, count, offset) \
- static internal_function __emulate_pread (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PREAD_SYSCALL == 0
-# include <sysdeps/posix/pread.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
deleted file mode 100644
index a83df31..0000000
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <kernel-features.h>
-
-#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-
-extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
-
-# if __ASSUME_PWRITE_SYSCALL == 0
-static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
- off_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pwrite (fd, buf, count, offset)
- int fd;
- const void *buf;
- size_t count;
- off_t offset;
-{
- ssize_t result;
-
- /* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset);
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0);
-# endif
-# if __ASSUME_PWRITE_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pwrite (fd, buf, count, offset);
-# endif
-
- return result;
-}
-
-strong_alias (__libc_pwrite, __pwrite)
-weak_alias (__libc_pwrite, pwrite)
-
-# define __libc_pwrite(fd, buf, count, offset) \
- static internal_function __emulate_pwrite (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PWRITE_SYSCALL == 0
-# include <sysdeps/posix/pwrite.c>
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd60509b8f56b407463f3e80512a64e0d09ce80d
commit cd60509b8f56b407463f3e80512a64e0d09ce80d
Author: Andreas Jaeger <aj@suse.de>
Date: Fri May 26 15:45:57 2000 +0000
* sysdeps/unix/sysv/linux/i386/pread64.c: Removed, we can use the
normal version now.
* sysdeps/unix/sysv/linux/arm/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/arm/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c
deleted file mode 100644
index c567fc5..0000000
--- a/sysdeps/unix/sysv/linux/arm/pread64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/pread64.c>
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c
deleted file mode 100644
index 4993830..0000000
--- a/sysdeps/unix/sysv/linux/arm/pwrite64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/pwrite64.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
deleted file mode 100644
index d17dbeb..0000000
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <kernel-features.h>
-
-#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-
-# if __ASSUME_PREAD_SYSCALL == 0
-static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
- off64_t offset) internal_function;
-# endif
-
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
-
-
-
-ssize_t
-__libc_pread64 (fd, buf, count, offset)
- int fd;
- void *buf;
- size_t count;
- off64_t offset;
-{
- ssize_t result;
-
- /* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
- (off_t) (offset & 0xffffffff),
- (off_t) (offset >> 32));
-# endif
-# if __ASSUME_PREAD_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pread64 (fd, buf, count, offset);
-# endif
- return result;
-}
-
-weak_alias (__libc_pread64, __pread64)
-weak_alias (__libc_pread64, pread64)
-
-# define __libc_pread64(fd, buf, count, offset) \
- static internal_function __emulate_pread64 (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PREAD_SYSCALL == 0
-# include <sysdeps/posix/pread64.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
deleted file mode 100644
index 295a175..0000000
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include <kernel-features.h>
-
-#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-
-extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
- int dummy, off_t offset_hi, off_t offset_lo);
-
-# if __ASSUME_PWRITE_SYSCALL == 0
-static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
- off64_t offset) internal_function;
-# endif
-
-ssize_t
-__libc_pwrite64 (fd, buf, count, offset)
- int fd;
- const void *buf;
- size_t count;
- off64_t offset;
-{
- ssize_t result;
-
- /* First try the syscall. */
-# if defined(__MIPSEB__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32),
- (off_t) (offset & 0xffffffff));
-# elif defined(__MIPSEL__)
- result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
- (off_t) (offset & 0xffffffff),
- (off_t) (offset >> 32));
-# endif
-
-# if __ASSUME_PWRITE_SYSCALL == 0
- if (result == -1 && errno == ENOSYS)
- /* No system call available. Use the emulation. */
- result = __emulate_pwrite64 (fd, buf, count, offset);
-# endif
-
- return result;
-}
-
-weak_alias (__libc_pwrite64, __pwrite64)
-weak_alias (__libc_pwrite64, pwrite64)
-
-# define __libc_pwrite64(fd, buf, count, offset) \
- static internal_function __emulate_pwrite64 (fd, buf, count, offset)
-#endif
-
-#if __ASSUME_PWRITE_SYSCALL == 0
-# include <sysdeps/posix/pwrite64.c>
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=438c13509424f0530157284474cecbe153e2f03b
commit 438c13509424f0530157284474cecbe153e2f03b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 25 05:28:08 2000 +0000
Linux/Arm spinlock implementation.
diff --git a/sysdeps/arm/linuxthreads/pspinlock.c b/sysdeps/arm/linuxthreads/pspinlock.c
new file mode 100644
index 0000000..a56881a
--- /dev/null
+++ b/sysdeps/arm/linuxthreads/pspinlock.c
@@ -0,0 +1,81 @@
+/* POSIX spinlock implementation. Arm version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <pthread.h>
+
+
+int
+__pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ unsigned int val;
+
+ do
+ asm volatile ("swp %0, %1, [%2]"
+ : "=r" (val)
+ : "0" (1), "r" (lock)
+ : "memory");
+ while (val != 0);
+
+ return 0;
+}
+weak_alias (__pthread_spin_lock, pthread_spin_lock)
+
+
+int
+__pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+ unsigned int val;
+
+ asm volatile ("swp %0, %1, [%2]"
+ : "=r" (val)
+ : "0" (1), "r" (lock)
+ : "memory");
+
+ return val ? EBUSY : 0;
+}
+weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
+
+
+int
+__pthread_spin_unlock (pthread_spinlock_t *lock)
+{
+ return *lock = 0;
+}
+weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
+
+
+int
+__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
+{
+ /* We can ignore the `pshared' parameter. Since we are busy-waiting
+ all processes which can access the memory location `lock' points
+ to can use the spinlock. */
+ return *lock = 0;
+}
+weak_alias (__pthread_spin_init, pthread_spin_init)
+
+
+int
+__pthread_spin_destroy (pthread_spinlock_t *lock)
+{
+ /* Nothing to do. */
+ return 0;
+}
+weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4decd16ab5ff514ed18d0abb7aefb86fa693b66d
commit 4decd16ab5ff514ed18d0abb7aefb86fa693b66d
Author: Andreas Jaeger <aj@suse.de>
Date: Wed May 24 16:16:17 2000 +0000
* sysdeps/mips/elf/start.S (ENTRY_POINT): Align stack for double
words.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 7fee4e7..064fe7e 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -27,7 +27,7 @@
segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
point runs, most registers' values are unspecified, except for:
- v1 ($2) Contains a function pointer to be registered with `atexit'.
+ v0 ($2) Contains a function pointer to be registered with `atexit'.
This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
@@ -76,7 +76,9 @@ ENTRY_POINT:
dla $4, main /* main */
lw $5, 0($29) /* argc */
addu $6, $29, 4 /* argv */
- /* Allocate space on the stack for seven arguments but align to 32. */
+ /* Allocate space on the stack for seven arguments and make sure
+ the stack is aligned to double words (8 bytes). */
+ and $29, 0xfffffff8
subu $29, 32
dla $7, _init /* init */
dla $8, _fini
@@ -84,7 +86,9 @@ ENTRY_POINT:
la $4, main /* main */
lw $5, 0($29) /* argc */
addu $6, $29, 4 /* argv */
- /* Allocate space on the stack for seven arguments but align to 32. */
+ /* Allocate space on the stack for seven arguments and make sure
+ the stack is aligned to double words (8 bytes). */
+ and $29, 0xfffffff8
subu $29, 32
la $7, _init /* init */
la $8, _fini
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf0d650794e9ba75842f8a1feb8ff31b13b586f5
commit cf0d650794e9ba75842f8a1feb8ff31b13b586f5
Author: Andreas Jaeger <aj@suse.de>
Date: Tue May 23 09:07:17 2000 +0000
Remove K&R support.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
index 6dda5f4..2ddf44a 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/acct.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -59,7 +59,7 @@ enum
/* Switch process accounting on and off. */
-extern int acct __P ((__const char *__filename));
+extern int acct (__const char *__filename) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d41b66ce6a6995707478119ed286ee6ba94581eb
commit d41b66ce6a6995707478119ed286ee6ba94581eb
Author: Andreas Jaeger <aj@suse.de>
Date: Tue May 23 08:42:59 2000 +0000
Remove K&R support, use ANSI C prototypes.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index 8e7b6ec..82b85de 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -99,5 +99,5 @@ typedef unsigned long int fenv_t;
#endif
/* The system calls to talk to the kernel's FP code. */
-extern unsigned long int __ieee_get_fp_control __P ((void));
-extern void __ieee_set_fp_control __P ((unsigned long int __value));
+extern unsigned long int __ieee_get_fp_control (void) __THROW;
+extern void __ieee_set_fp_control (unsigned long int __value) __THROW;
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h
index 89bf65c..2f38aac 100644
--- a/sysdeps/m68k/fpu/switch/68881-sw.h
+++ b/sysdeps/m68k/fpu/switch/68881-sw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,9 @@
struct switch_caller
{
unsigned short int insn; /* The `jsr' or `jmp' instruction. */
- __ptr_t target; /* The target of the instruction. */
- __ptr_t soft; /* The address of the soft function. */
- __ptr_t fpu; /* The address of the 68881 function. */
+ void *target; /* The target of the instruction. */
+ void *soft; /* The address of the soft function. */
+ void *fpu; /* The address of the 68881 function. */
};
/* These are opcodes (values for `insn', above) for `jmp' and `jsr'
@@ -47,12 +47,12 @@ struct switch_caller
/* Function to determine whether or not a 68881 is available,
and modify its caller (which must be a `struct switch_caller', above,
in data space) to use the appropriate version. */
-extern void __68881_switch __P ((int __dummy));
+extern void __68881_switch (int __dummy) __THROW;
/* Define FUNCTION as a `struct switch_caller' which will call
`__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not.
-#define switching_function(FUNCTION) \
+#define switching_function(FUNCTION) \
struct switch_caller FUNCTION = \
{ \
JSR, (__ptr_t) __68881_switch, \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4a8c0f3325efcc34bb26fa28cebb8f1901d818b
commit e4a8c0f3325efcc34bb26fa28cebb8f1901d818b
Author: Andreas Jaeger <aj@suse.de>
Date: Mon May 22 09:25:13 2000 +0000
2000-05-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/arm/bits/huge_val.h: Prereq gcc 2.96+, not 2.95.
* sysdeps/i386/bits/huge_val.h: Likewise.
* sysdeps/ieee754/bits/huge_val.h: Likewise.
* sysdeps/m68k/bits/huge_val.h: Likewise.
* sysdeps/sparc/sparc32/bits/huge_val.h: Likewise.
* sysdeps/sparc/sparc64/bits/huge_val.h: Likewise.
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 44db4bd..841b4b0 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -29,7 +29,7 @@
#ifdef __GNUC__
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
# define HUGE_VAL (__extension__ 0x1.0p2047)
@@ -67,7 +67,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# ifdef __GNUC__
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
# define HUGE_VALF (__extension__ 0x1.0p255f)
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index d191042..9e15891 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -30,7 +30,7 @@
#ifdef __GNUC__
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
# define HUGE_VAL (__extension__ 0x1.0p2047)
@@ -56,7 +56,7 @@ static union { unsigned char __c[8]; double __d; } __huge_val =
#ifdef __USE_ISOC99
-# if __GNUC_PREREQ(2,95)
+# if __GNUC_PREREQ(2,96)
# define HUGE_VALF (__extension__ 0x1.0p255f)
# define HUGE_VALL (__extension__ 0x1.0p32767L)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d1aa2e61b56bf76f7a8444305e3c0d8a004e554
commit 5d1aa2e61b56bf76f7a8444305e3c0d8a004e554
Author: Andreas Jaeger <aj@suse.de>
Date: Wed May 17 17:18:49 2000 +0000
2000-05-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/arm/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Add
__extension__ to hexadecimal floating constant notation.
* sysdeps/i386/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL):
Likewise.
* sysdeps/ieee754/bits/huge_val.h (HUGE_VAL, HUGE_VALF): Likewise.
* sysdeps/m68k/bits/huge_val.h (HUGE_VAL, HUGE_VALF, HUGE_VALL):
Likewise.
* sysdeps/sparc/sparc64/bits/huge_val.h (HUGE_VAL, HUGE_VALF,
HUGE_VALL): Likewise.
* sysdeps/sparc/sparc32/bits/huge_val.h (HUGE_VAL, HUGE_VALF,
HUGE_VALL): Likewise.
(HUGE_VALL): Set to HUGE_VAL on sparc32.
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 398476c..44db4bd 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -1,7 +1,7 @@
/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
ARM version.
- Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+ Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@
# if __GNUC_PREREQ(2,95)
-# define HUGE_VAL (0x1.0p2047)
+# define HUGE_VAL (__extension__ 0x1.0p2047)
# else
@@ -69,7 +69,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# if __GNUC_PREREQ(2,95)
-# define HUGE_VALF (0x1.0p255f)
+# define HUGE_VALF (__extension__ 0x1.0p255f)
# else
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index 339f374..d191042 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -1,6 +1,6 @@
/* `HUGE_VAL' constants for m68k (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
# if __GNUC_PREREQ(2,95)
-# define HUGE_VAL (0x1.0p2047)
+# define HUGE_VAL (__extension__ 0x1.0p2047)
# else
@@ -58,8 +58,8 @@ static union { unsigned char __c[8]; double __d; } __huge_val =
# if __GNUC_PREREQ(2,95)
-# define HUGE_VALF (0x1.0p255f)
-# define HUGE_VALL (0x1.0p32767L)
+# define HUGE_VALF (__extension__ 0x1.0p255f)
+# define HUGE_VALL (__extension__ 0x1.0p32767L)
# else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a1e20c64a237b9041a53ea166a837d92ebc19cf
commit 3a1e20c64a237b9041a53ea166a837d92ebc19cf
Author: Andreas Jaeger <aj@suse.de>
Date: Sat May 13 18:18:03 2000 +0000
2000-05-13 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/bits/socket.h (PF_PPPOX): New, from
Linux 2.3.99pre7.
(AF_PPPOX): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h (PF_PPPOX): Likewise.
(AF_PPPOX): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 1462331..299215a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -85,7 +85,8 @@ enum __socket_type
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
#define PF_SNA 22 /* Linux SNA Project */
-#define PF_IRDA 23 /* IRDA sockets. */
+#define PF_IRDA 23 /* IRDA sockets. */
+#define PF_PPPOX 24 /* PPPoX sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -114,7 +115,8 @@ enum __socket_type
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
#define AF_SNA PF_SNA
-#define AF_IRDA PF_IRDA
+#define AF_IRDA PF_IRDA
+#define AF_PPPOX PF_PPPOX
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21dd216cd4ee9400ac9c286ff5758bc595dd41b7
commit 21dd216cd4ee9400ac9c286ff5758bc595dd41b7
Author: Andreas Jaeger <aj@suse.de>
Date: Mon May 8 15:40:26 2000 +0000
2000-05-08 Jakub Jelinek <jakub@redhat.com>
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Fix arguments in
call to elf_machine_fixup_plt.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 814e355..e20493b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -252,7 +252,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.end " #tramp_name)
#ifndef PROF
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */);
#else
@@ -497,7 +497,7 @@ elf_machine_rela (struct link_map *map,
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
else if (r_type == R_ALPHA_JMP_SLOT)
- elf_machine_fixup_plt (map, reloc, reloc_addr, sym_value);
+ elf_machine_fixup_plt (map, NULL, reloc, reloc_addr, sym_value);
else if (r_type == R_ALPHA_REFQUAD)
{
sym_value += *reloc_addr;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb0607a2aaa43dd9a8e081eec48be923323cef25
commit bb0607a2aaa43dd9a8e081eec48be923323cef25
Author: Andreas Schwab <schwab@suse.de>
Date: Mon May 8 15:01:07 2000 +0000
New file. Use getpagesize syscall if available.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpagesize.c b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
new file mode 100644
index 0000000..0e2ba10
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getpagesize.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+#include <sys/param.h>
+#include <errno.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+/* Return the system page size. */
+int
+__getpagesize ()
+{
+#ifdef __NR_getpagesize
+ int result;
+
+ result = INLINE_SYSCALL (getpagesize, 0);
+ /* The only possible error is ENOSYS. */
+ if (result != -1)
+ return result;
+#endif
+
+ return EXEC_PAGESIZE;
+}
+
+weak_alias (__getpagesize, getpagesize)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=102e7428d38ad6941aeaab86d213b7c4b8d84834
commit 102e7428d38ad6941aeaab86d213b7c4b8d84834
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 5 19:54:08 2000 +0000
Moved to sysdeps/unix/sysv/linux/powerpc/aix.
diff --git a/sysdeps/unix/sysv/aix/linux/direntconv.c b/sysdeps/unix/sysv/aix/linux/direntconv.c
deleted file mode 100644
index 620a0a0..0000000
--- a/sysdeps/unix/sysv/aix/linux/direntconv.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <dirent.h>
-#include <string.h>
-#include "linux-dirent.h"
-
-#ifndef DT_UNKNOWN
-# define DT_UNKNOWN 0
-#endif
-
-
-void
-__dirent_aix_to_linux (const struct dirent *aixdir,
- struct linuxdirent *linuxdir)
-{
- linuxdir->d_ino = aixdir->d_ino;
- linuxdir->d_off = aixdir->d_off;
- linuxdir->d_reclen = aixdir->d_reclen;
- linuxdir->d_type = DT_UNKNOWN;
- strncpy (linuxdir->d_name, aixdir->d_name, 256);
-}
-
-
-void
-__dirent64_aix_to_linux (const struct dirent64 *aixdir,
- struct linuxdirent64 *linuxdir)
-{
- linuxdir->d_ino = aixdir->d_ino;
- linuxdir->d_off = aixdir->d_off;
- linuxdir->d_reclen = aixdir->d_reclen;
- linuxdir->d_type = DT_UNKNOWN;
- strncpy (linuxdir->d_name, aixdir->d_name, 256);
-}
diff --git a/sysdeps/unix/sysv/aix/linux/errnoconv.c b/sysdeps/unix/sysv/aix/linux/errnoconv.c
deleted file mode 100644
index 95bd5a3..0000000
--- a/sysdeps/unix/sysv/aix/linux/errnoconv.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Convert the error number the AIX kernel returns to what the Linux
- application expects. */
-#include <errno.h>
-#include "linux-errno.h"
-
-
-static int mapping[] =
-{
- [EPERM] = LINUX_EPERM,
- [ENOENT] = LINUX_ENOENT,
- [ESRCH] = LINUX_ESRCH,
- [EINTR] = LINUX_EINTR,
- [EIO] = LINUX_EIO,
- [ENXIO] = LINUX_ENXIO,
- [E2BIG] = LINUX_E2BIG,
- [ENOEXEC] = LINUX_ENOEXEC,
- [EBADF] = LINUX_EBADF,
- [ECHILD] = LINUX_ECHILD,
- [EAGAIN] = LINUX_EAGAIN,
- [ENOMEM] = LINUX_ENOMEM,
- [EACCES] = LINUX_EACCES,
- [EFAULT] = LINUX_EFAULT,
- [ENOTBLK] = LINUX_ENOTBLK,
- [EBUSY] = LINUX_EBUSY,
- [EEXIST] = LINUX_EEXIST,
- [EXDEV] = LINUX_EXDEV,
- [ENODEV] = LINUX_ENODEV,
- [ENOTDIR] = LINUX_ENOTDIR,
- [EISDIR] = LINUX_EISDIR,
- [EINVAL] = LINUX_EINVAL,
- [ENFILE] = LINUX_ENFILE,
- [EMFILE] = LINUX_EMFILE,
- [ENOTTY] = LINUX_ENOTTY,
- [ETXTBSY] = LINUX_ETXTBSY,
- [EFBIG] = LINUX_EFBIG,
- [ENOSPC] = LINUX_ENOSPC,
- [EIDRM] = LINUX_EIDRM,
- [ECHRNG] = LINUX_ECHRNG,
- [EL2NSYNC] = LINUX_EL2NSYNC,
- [EL3HLT] = LINUX_EL3HLT,
- [EL3RST] = LINUX_EL3RST,
- [ELNRNG] = LINUX_ELNRNG,
- [EUNATCH] = LINUX_EUNATCH,
- [ENOCSI] = LINUX_ENOCSI,
- [EL2HLT] = LINUX_EL2HLT,
- [EDEADLK] = LINUX_EDEADLK,
- [ENOTREADY] = LINUX_ENOTREADY,
- // EWPROTECT: no Linux equivalent
- // EFORMAT: no Linux equivalent
- [ENOLCK] = LINUX_ENOLCK,
- // ENOCONNECT: No Linux equivalent
- [ESTALE] = LINUX_ESTALE,
- // EDIST: no Linux equivalent
- [54] = LINUX_EAGAIN, // EWOULDBLOCK
- [EINPROGRESS] = LINUX_EINPROGRESS,
- [EALREADY] = LINUX_EALREADY,
- [ENOTSOCK] = LINUX_ENOTSOCK,
- [EDESTADDRREQ] = LINUX_EDESTADDRREQ,
- [EMSGSIZE] = LINUX_EMSGSIZE,
- [EPROTOTYPE] = LINUX_EPROTOTYPE,
- [ENOPROTOOPT] = LINUX_ENOPROTOOPT,
- [EPROTONOSUPPORT] = LINUX_EPROTONOSUPPORT,
- [ESOCKTNOSUPPORT] = LINUX_ESOCKTNOSUPPORT,
- [EOPNOTSUPP] = LINUX_EOPNOTSUPP,
- [EPFNOSUPPORT] = LINUX_EPFNOSUPPORT,
- [EAFNOSUPPORT] = LINUX_EAFNOSUPPORT,
- [EADDRINUSE] = LINUX_EADDRINUSE,
- [EADDRNOTAVAIL] = LINUX_EADDRNOTAVAIL,
- [ENETDOWN] = LINUX_ENETDOWN,
- [ENETUNREACH] = LINUX_ENETUNREACH,
- [ENETRESET] = LINUX_ENETRESET,
- [ECONNABORTED] = LINUX_ECONNABORTED,
- [ECONNRESET] = LINUX_ECONNRESET,
- [ENOBUFS] = LINUX_ENOBUFS,
- [EISCONN] = LINUX_EISCONN,
- [ENOTCONN] = LINUX_ENOTCONN,
- [ESHUTDOWN] = LINUX_ESHUTDOWN,
- [ETIMEDOUT] = LINUX_ETIMEDOUT,
- [ECONNREFUSED] = LINUX_ECONNREFUSED,
- [EHOSTDOWN] = LINUX_EHOSTDOWN,
- [EHOSTUNREACH] = LINUX_EHOSTUNREACH,
- [ERESTART] = LINUX_ERESTART,
- [EPROCLIM] = LINUX_EPROCLIM,
- [EUSERS] = LINUX_EUSERS,
- [ELOOP] = LINUX_ELOOP,
- [ENAMETOOLONG] = LINUX_ENAMETOOLONG,
- [87] = LINUX_ENOTEMPTY, // ENOTEMPTY
- [EDQUOT] = LINUX_EDQUOT,
- [ECORRUPT] = LINUX_ECORRUPT,
- [EREMOTE] = LINUX_EREMOTE,
- [ENOSYS] = LINUX_ENOSYS,
- [EMEDIA] = LINUX_EMEDIA,
- [ESOFT] = LINUX_ESOFT,
- [ENOATTR] = LINUX_ENOATTR,
- [ESAD] = LINUX_ESAD,
- // ENOTRUST: no Linux equivalent
- [ETOOMANYREFS] = LINUX_ETOOMANYREFS,
- [EILSEQ] = LINUX_EILSEQ,
- [ECANCELED] = LINUX_ECANCELED,
- [ENOSR] = LINUX_ENOSR,
- [ETIME] = LINUX_ETIME,
- [EBADMSG] = LINUX_EBADMSG,
- [EPROTO] = LINUX_EPROTO,
- [ENODATA] = LINUX_ENODATA,
- [ENOSTR] = LINUX_ENOSTR,
- [ENOTSUP] = LINUX_ENOTSUP,
- [EMULTIHOP] = LINUX_EMULTIHOP,
- [ENOLINK] = LINUX_ENOLINK,
- [EOVERFLOW] = LINUX_EOVERFLOW
-};
-
-
-int
-__errno_aix_to_linux (int err)
-{
- int conv;
-
- if (err >= 0 && err < (sizeof (mapping) / sizeof (mapping[0]))
- && ((conv = mapping[err]) != 0 || err == 0))
- return conv;
-
- /* The error value is not known. Create a special value which can
- be easily recognized as an invalid result. */
- return 512 + err;
-}
diff --git a/sysdeps/unix/sysv/aix/linux/linux-dirent.h b/sysdeps/unix/sysv/aix/linux/linux-dirent.h
deleted file mode 100644
index 935ffda..0000000
--- a/sysdeps/unix/sysv/aix/linux/linux-dirent.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "linuxtypes.h"
-
-struct linuxdirent
- {
- __linux_ino_t d_ino;
- __linux_off_t d_off;
- unsigned short int d_reclen;
- unsigned char d_type;
- char d_name[256]; /* We must not include limits.h! */
- };
-
-struct linuxdirent64
- {
- __linux_ino64_t d_ino;
- __linux_off64_t d_off;
- unsigned short int d_reclen;
- unsigned char d_type;
- char d_name[256]; /* We must not include limits.h! */
- };
diff --git a/sysdeps/unix/sysv/aix/linux/linux-errno.h b/sysdeps/unix/sysv/aix/linux/linux-errno.h
deleted file mode 100644
index b7cf0a5..0000000
--- a/sysdeps/unix/sysv/aix/linux/linux-errno.h
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef _LINUX_ERRNO_H
-#define _LINUX_ERRNO_H
-
-#define LINUX_EPERM 1
-#define LINUX_ENOENT 2
-#define LINUX_ESRCH 3
-#define LINUX_EINTR 4
-#define LINUX_EIO 5
-#define LINUX_ENXIO 6
-#define LINUX_E2BIG 7
-#define LINUX_ENOEXEC 8
-#define LINUX_EBADF 9
-#define LINUX_ECHILD 10
-#define LINUX_EAGAIN 11
-#define LINUX_ENOMEM 12
-#define LINUX_EACCES 13
-#define LINUX_EFAULT 14
-#define LINUX_ENOTBLK 15
-#define LINUX_EBUSY 16
-#define LINUX_EEXIST 17
-#define LINUX_EXDEV 18
-#define LINUX_ENODEV 19
-#define LINUX_ENOTDIR 20
-#define LINUX_EISDIR 21
-#define LINUX_EINVAL 22
-#define LINUX_ENFILE 23
-#define LINUX_EMFILE 24
-#define LINUX_ENOTTY 25
-#define LINUX_ETXTBSY 26
-#define LINUX_EFBIG 27
-#define LINUX_ENOSPC 28
-#define LINUX_ESPIPE 29
-#define LINUX_EROFS 30
-#define LINUX_EMLINK 31
-#define LINUX_EPIPE 32
-#define LINUX_EDOM 33
-#define LINUX_ERANGE 34
-#define LINUX_EDEADLK 35
-#define LINUX_ENAMETOOLONG 36
-#define LINUX_ENOLCK 37
-#define LINUX_ENOSYS 38
-#define LINUX_ENOTEMPTY 39
-#define LINUX_ELOOP 40
-#define LINUX_ENOMSG 42
-#define LINUX_EIDRM 43
-#define LINUX_ECHRNG 44
-#define LINUX_EL2NSYNC 45
-#define LINUX_EL3HLT 46
-#define LINUX_EL3RST 47
-#define LINUX_ELNRNG 48
-#define LINUX_EUNATCH 49
-#define LINUX_ENOCSI 50
-#define LINUX_EL2HLT 51
-#define LINUX_EBADE 52
-#define LINUX_EBADR 53
-#define LINUX_EXFULL 54
-#define LINUX_ENOANO 55
-#define LINUX_EBADRQC 56
-#define LINUX_EBADSLT 57
-#define LINUX_EDEADLOCK 58
-#define LINUX_EBFONT 59
-#define LINUX_ENOSTR 60
-#define LINUX_ENODATA 61
-#define LINUX_ETIME 62
-#define LINUX_ENOSR 63
-#define LINUX_ENONET 64
-#define LINUX_ENOPKG 65
-#define LINUX_EREMOTE 66
-#define LINUX_ENOLINK 67
-#define LINUX_EADV 68
-#define LINUX_ESRMNT 69
-#define LINUX_ECOMM 70
-#define LINUX_EPROTO 71
-#define LINUX_EMULTIHOP 72
-#define LINUX_EDOTDOT 73
-#define LINUX_EBADMSG 74
-#define LINUX_EOVERFLOW 75
-#define LINUX_ENOTUNIQ 76
-#define LINUX_EBADFD 77
-#define LINUX_EREMCHG 78
-#define LINUX_ELIBACC 79
-#define LINUX_ELIBBAD 80
-#define LINUX_ELIBSCN 81
-#define LINUX_ELIBMAX 82
-#define LINUX_ELIBEXEC 83
-#define LINUX_EILSEQ 84
-#define LINUX_ERESTART 85
-#define LINUX_ESTRPIPE 86
-#define LINUX_EUSERS 87
-#define LINUX_ENOTSOCK 88
-#define LINUX_EDESTADDRREQ 89
-#define LINUX_EMSGSIZE 90
-#define LINUX_EPROTOTYPE 91
-#define LINUX_ENOPROTOOPT 92
-#define LINUX_EPROTONOSUPPORT 93
-#define LINUX_ESOCKTNOSUPPORT 94
-#define LINUX_EOPNOTSUPP 95
-#define LINUX_EPFNOSUPPORT 96
-#define LINUX_EAFNOSUPPORT 97
-#define LINUX_EADDRINUSE 98
-#define LINUX_EADDRNOTAVAIL 99
-#define LINUX_ENETDOWN 100
-#define LINUX_ENETUNREACH 101
-#define LINUX_ENETRESET 102
-#define LINUX_ECONNABORTED 103
-#define LINUX_ECONNRESET 104
-#define LINUX_ENOBUFS 105
-#define LINUX_EISCONN 106
-#define LINUX_ENOTCONN 107
-#define LINUX_ESHUTDOWN 108
-#define LINUX_ETOOMANYREFS 109
-#define LINUX_ETIMEDOUT 110
-#define LINUX_ECONNREFUSED 111
-#define LINUX_EHOSTDOWN 112
-#define LINUX_EHOSTUNREACH 113
-#define LINUX_EALREADY 114
-#define LINUX_EINPROGRESS 115
-#define LINUX_ESTALE 116
-#define LINUX_EUCLEAN 117
-#define LINUX_ENOTNAM 118
-#define LINUX_ENAVAIL 119
-#define LINUX_EISNAM 120
-#define LINUX_EREMOTEIO 121
-#define LINUX_EDQUOT 122
-
-#define LINUX_ENOMEDIUM 123
-#define LINUX_EMEDIUMTYPE 124
-
-/* Should never be seen by user programs */
-#define LINUX_ERESTARTSYS 512
-#define LINUX_ERESTARTNOINTR 513
-#define LINUX_ERESTARTNOHAND 514
-#define LINUX_ENOIOCTLCMD 515
-
-#endif
diff --git a/sysdeps/unix/sysv/aix/linux/linux-stat.h b/sysdeps/unix/sysv/aix/linux/linux-stat.h
deleted file mode 100644
index 01a2d4d..0000000
--- a/sysdeps/unix/sysv/aix/linux/linux-stat.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_STAT_H
-# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
-#endif
-
-/* Versions of the `struct stat' data structure. */
-#define _STAT_VER_LINUX_OLD 1
-#define _STAT_VER_KERNEL 1
-#define _STAT_VER_SVR4 2
-#define _STAT_VER_LINUX 3
-#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
-
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 1
-#define _MKNOD_VER_SVR4 2
-#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
-
-
-struct stat
- {
- __dev_t st_dev; /* Device. */
- unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
- __ino_t st_ino; /* File serial number. */
-#else
- __ino64_t st_ino; /* File serial number. */
-#endif
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- __dev_t st_rdev; /* Device number, if device. */
- unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
- __off_t st_size; /* Size of file, in bytes. */
-#else
- __off64_t st_size; /* Size of file, in bytes. */
-#endif
- __blksize_t st_blksize; /* Optimal block size for I/O. */
-
-#ifndef __USE_FILE_OFFSET64
- __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
- __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
- __time_t st_atime; /* Time of last access. */
- unsigned long int __unused1;
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2;
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3;
- unsigned long int __unused4;
- unsigned long int __unused5;
- };
-
-#ifdef __USE_LARGEFILE64
-struct stat64
- {
- __dev_t st_dev; /* Device. */
- unsigned short int __pad1;
-
- __ino64_t st_ino; /* File serial number. */
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- __dev_t st_rdev; /* Device number, if device. */
- unsigned short int __pad2;
- __off64_t st_size; /* Size of file, in bytes. */
- __blksize_t st_blksize; /* Optimal block size for I/O. */
-
- __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
- __time_t st_atime; /* Time of last access. */
- unsigned long int __unused1;
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int __unused2;
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int __unused3;
- unsigned long int __unused4;
- unsigned long int __unused5;
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATBUF_ST_BLKSIZE
-#define _STATBUF_ST_RDEV
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-
-/* Thi macro (with a different name) is normally in <sys/sysmacros.h>. */
-#define linux_makedev(major, minor) (((major) << 8 | (minor)))
diff --git a/sysdeps/unix/sysv/aix/linux/statconv.c b/sysdeps/unix/sysv/aix/linux/statconv.c
deleted file mode 100644
index 5333e23..0000000
--- a/sysdeps/unix/sysv/aix/linux/statconv.c
+++ /dev/null
@@ -1,35 +0,0 @@
-void
-__stat_aix_to_linux (const struct stat *aixstat, struct stat *linuxstat)
-{
- linuxstat->st_dev = linux_makedev (major (aixstat->st_dev),
- minor (aixstat->st_dev));
- linuxstat->st_ino = aixstat->st_ino;
- /* The following assumes that the mode values are the same on AIX
- and Linux which is true in the moment. */
- linuxstat->st_mode = aixstat->st_mode;
- linuxstat->st_nlink = aixstat->st_nlink;
- /* There is no st_flag field in Linux. */
- linuxstat->st_uid = aixstat->st_uid;
- linuxstat->st_gid = aixstat->st_gid;
- linuxstat->st_rdev = linux_makedev (major (aixstat->st_rdev),
- minor (aixstat->st_rdev));
- linuxstat->st_size = aixstat->st_size;
- linuxstat->st_atime = aixstat->st_atime;
- linuxstat->st_mtime = aixstat->st_mtime;
- linuxstat->st_ctime = aixstat->st_ctime;
- linuxstat->st_blksize = aixstat->st_blksize;
- linuxstat->st_blocks = aixstat->st_blocks;
- /* There is no st_vfstype in Linux. */
- /* There is no st_vfs in Linux. */
- /* There is no st_type in Linux. */
- /* There is no st_gen in Linux. */
-
- /* File in the padding values with repeatable values. */
- linuxstat->__pad1 = 0;
- linuxstat->__pad2 = 0;
- linuxstat->__unused1 = 0;
- linuxstat->__unused2 = 0;
- linuxstat->__unused3 = 0;
- linuxstat->__unused4 = 0;
- linuxstat->__unused5 = 0;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=408c9db5d39e0398b04986fb3e40e7fa00cb1d19
commit 408c9db5d39e0398b04986fb3e40e7fa00cb1d19
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 5 07:12:09 2000 +0000
(elf_machine_fixup_plt): Change return valuie to lookup_t and return the value.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7e28d54..814e355 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -68,7 +68,7 @@ elf_machine_load_address (void)
are usually many many terabytes away. */
Elf64_Addr dot;
- long zero_disp;
+ long int zero_disp;
asm("br %0, 1f\n\t"
".weak __load_address_undefined\n\t"
@@ -119,7 +119,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* If the first instruction of the plt entry is not
"br $28, plt0", we cannot do lazy relocation. */
- lazy = (*(unsigned *)(plt + 32) == 0xc39ffff7);
+ lazy = (*(unsigned int *)(plt + 32) == 0xc39ffff7);
}
return lazy;
@@ -363,13 +363,14 @@ $fixup_stack:
/* Fix up the instructions of a PLT entry to invoke the function
rather than the dynamic linker. */
-static inline void
-elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
- Elf64_Addr *got_addr, Elf64_Addr value)
+static inline Elf64_Addr
+elf_machine_fixup_plt (struct link_map *l, lookup_t t,
+ const Elf64_Rela *reloc,
+ Elf64_Addr *got_addr, Elf64_Addr value)
{
const Elf64_Rela *rela_plt;
Elf64_Word *plte;
- long edisp;
+ long int edisp;
/* Store the value we are going to load. */
*got_addr = value;
@@ -381,7 +382,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
- edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4;
+ edisp = (long int) (value - (Elf64_Addr)&plte[3]) / 4;
if (edisp >= -0x100000 && edisp < 0x100000)
{
@@ -391,7 +392,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
int hi, lo;
hi = value - (Elf64_Addr)&plte[0];
- lo = (short)hi;
+ lo = (short int) hi;
hi = (hi - lo) >> 16;
/* Emit "lda $27,lo($27)" */
@@ -436,6 +437,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
This will be taken care of in _dl_runtime_resolve. If instead we are
doing this as part of non-lazy startup relocation, that bit of code
hasn't made it into Icache yet, so there's nothing to clean up. */
+
+ return value;
}
/* Return the final value of a plt relocation. */
@@ -459,7 +462,7 @@ elf_machine_rela (struct link_map *map,
const struct r_found_version *version,
Elf64_Addr *const reloc_addr)
{
- unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
+ unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
@@ -525,7 +528,7 @@ elf_machine_lazy_rel (struct link_map *map,
Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset);
- unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
+ unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
if (r_type == R_ALPHA_JMP_SLOT)
{
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 19276ab..4408758 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -354,11 +354,12 @@ dl_platform_init (void)
_dl_platform = NULL;
}
-static inline void
-elf_machine_fixup_plt (struct link_map *map, const Elf32_Rel *reloc,
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rel *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
- *reloc_addr = value;
+ return *reloc_addr = value;
}
/* Return the final value of a plt relocation. */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index bf7dede..e4cdf2d 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -209,11 +209,12 @@ _dl_start_user:
/* The m68k never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-static inline void
-elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
+static inline Elf32_Addr
+elf_machine_fixup_plt (struct link_map *map, lookup_t t,
+ const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
- *reloc_addr = value;
+ return *reloc_addr = value;
}
/* Return the final value of a plt relocation. On the m68k the JMP_SLOT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e72c26d75110c7a33ecc9dbd0daaf99ff4cfade6
commit e72c26d75110c7a33ecc9dbd0daaf99ff4cfade6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 1 23:43:43 2000 +0000
Linux dirent structure definition.
diff --git a/sysdeps/unix/sysv/aix/linux/linux-dirent.h b/sysdeps/unix/sysv/aix/linux/linux-dirent.h
new file mode 100644
index 0000000..935ffda
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/linux-dirent.h
@@ -0,0 +1,19 @@
+#include "linuxtypes.h"
+
+struct linuxdirent
+ {
+ __linux_ino_t d_ino;
+ __linux_off_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+
+struct linuxdirent64
+ {
+ __linux_ino64_t d_ino;
+ __linux_off64_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ca971409e4ec8d195e38d3681b1bd7255437f23
commit 4ca971409e4ec8d195e38d3681b1bd7255437f23
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 1 23:43:22 2000 +0000
Functions to convert AIX dirent structure to Linux form.
diff --git a/sysdeps/unix/sysv/aix/linux/direntconv.c b/sysdeps/unix/sysv/aix/linux/direntconv.c
new file mode 100644
index 0000000..620a0a0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/direntconv.c
@@ -0,0 +1,31 @@
+#include <dirent.h>
+#include <string.h>
+#include "linux-dirent.h"
+
+#ifndef DT_UNKNOWN
+# define DT_UNKNOWN 0
+#endif
+
+
+void
+__dirent_aix_to_linux (const struct dirent *aixdir,
+ struct linuxdirent *linuxdir)
+{
+ linuxdir->d_ino = aixdir->d_ino;
+ linuxdir->d_off = aixdir->d_off;
+ linuxdir->d_reclen = aixdir->d_reclen;
+ linuxdir->d_type = DT_UNKNOWN;
+ strncpy (linuxdir->d_name, aixdir->d_name, 256);
+}
+
+
+void
+__dirent64_aix_to_linux (const struct dirent64 *aixdir,
+ struct linuxdirent64 *linuxdir)
+{
+ linuxdir->d_ino = aixdir->d_ino;
+ linuxdir->d_off = aixdir->d_off;
+ linuxdir->d_reclen = aixdir->d_reclen;
+ linuxdir->d_type = DT_UNKNOWN;
+ strncpy (linuxdir->d_name, aixdir->d_name, 256);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37dca96f1c226c7d31ad85a7efe968289b4eda14
commit 37dca96f1c226c7d31ad85a7efe968289b4eda14
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 30 07:12:32 2000 +0000
(F_SETOWN, F_GETOWN): Make available if __USE_XOPEN2K.
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
index 039a604..048f53a 100644
--- a/sysdeps/unix/sysv/aix/bits/fcntl.h
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -74,7 +74,7 @@
# define F_SETLKW64 13 /* Set record locking info (blocking). */
#endif
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7081119..7184d08 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -77,7 +77,7 @@
#define F_SETLK64 8 /* Set record locking info (non-blocking). */
#define F_SETLKW64 9 /* Set record locking info (blocking). */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 1803576..189601c 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -75,7 +75,7 @@
#define F_SETLK64 6 /* Set record locking info (non-blocking). */
#define F_SETLKW64 7 /* Set record locking info (blocking). */
-#ifdef __USE_BSD
+#if defined __USE_BSD || defined __USE_XOPEN2K
# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db7f627b6e81bb9d996630dfef2c93af3e39a86a
commit db7f627b6e81bb9d996630dfef2c93af3e39a86a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 28 05:11:59 2000 +0000
Not needed anymore.
diff --git a/sysdeps/unix/bsd/osf/.cvsignore b/sysdeps/unix/bsd/osf/.cvsignore
deleted file mode 100644
index c9147fd..0000000
--- a/sysdeps/unix/bsd/osf/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-=*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9a57ab61505a4daf0087fd0ffe7abd23b7b9464
commit b9a57ab61505a4daf0087fd0ffe7abd23b7b9464
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 28 03:25:46 2000 +0000
(_dl_start_user): Fix the _dl_skip_args handling.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index b16e1c8..7e28d54 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -291,7 +291,7 @@ _dl_start_user:
/* See if we were run as a command with the executable file
name as an extra leading argument. */
ldl $1, _dl_skip_args
- beq $1, $fixup_stack
+ bne $1, $fixup_stack
$fixup_stack_ret:
/* The special initializer gets called with the stack just
as the application's entry point will see it; it can
@@ -316,7 +316,7 @@ $fixup_stack:
ldq $2, 0($sp)
subq $2, $1, $2
mov $sp, $4
- s8addq $2, $sp, $3
+ s8addq $1, $sp, $3
stq $2, 0($sp)
/* Copy down argv. */
0: ldq $5, 8($3)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9790568c2bfbe0531dd456fb195f6b3964e04e22
commit 9790568c2bfbe0531dd456fb195f6b3964e04e22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:55:19 2000 +0000
(init_iosys): Allow compilation if __NR_pciconfig_iobase is not defined.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 310930b..98f7163 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -537,6 +537,7 @@ init_iosys (void)
/* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */
+#ifdef __NR_pciconfig_iobase
addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0);
if (addr != -1)
{
@@ -578,6 +579,7 @@ init_iosys (void)
return 0;
}
+#endif
/* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64fe7d3c70c3b3af978f382d64cd43ad65a0ff83
commit 64fe7d3c70c3b3af978f382d64cd43ad65a0ff83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:55:02 2000 +0000
(__fstatfs64): Add alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 617b6f5..d845761 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -22,7 +22,7 @@ mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
+fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a5f55b13585960a2e79ac537c1ad302785c5bda
commit 0a5f55b13585960a2e79ac537c1ad302785c5bda
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:54:50 2000 +0000
Surround uses of $f28 with .set noat/at to shut up warnings.
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 0c7fb1a..8d96455 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -99,7 +99,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage)
ldt $f25, 96(a1) # ru_msgrcv
ldt $f26, 104(a1) # ru_nsignals
ldt $f27, 112(a1) # ru_nvcsw
+ .set noat
ldt $f28, 120(a1) # ru_nivcsw
+ .set at
stq t0, 0(a1)
stq t1, 8(a1)
stq t2, 16(a1)
@@ -117,7 +119,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage)
stt $f25, 112(a1)
stt $f26, 120(a1)
stt $f27, 128(a1)
+ .set noat
stt $f28, 136(a1)
+ .set at
addq sp, 16, sp
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa04216d3bf47182ad7461c3bd42192b99861c47
commit fa04216d3bf47182ad7461c3bd42192b99861c47
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:54:35 2000 +0000
(__syscall_shmctl): Declare.
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index ebda160..70c420d 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -52,6 +52,8 @@ struct __old_shminfo
int shmall;
};
+extern int __syscall_shmctl (int, int, void *);
+
/* Provide operations to control over shared memory segments. */
int __new_shmctl (int, int, struct shmid_ds *);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6e679a8ac6ad33e7d850e7f4c9000d90b21bb66
commit b6e679a8ac6ad33e7d850e7f4c9000d90b21bb66
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:54:21 2000 +0000
(__syscall_semctl): Declare.
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index a453474..4be4fb2 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -49,6 +49,7 @@ union semun
struct seminfo *__buf; /* buffer for IPC_INFO */
};
+extern int __syscall_semctl (int, int, int, void *);
/* Return identifier for array of NSEMS semaphores associated with
KEY. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bce847003be00024466c1bf391eaebeb8f167912
commit bce847003be00024466c1bf391eaebeb8f167912
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 22 06:54:09 2000 +0000
(__syscall_msgctl): Declare.
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 693b4d4..709b5c0 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -44,6 +44,8 @@ struct __old_msqid_ds
__ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
};
+extern int __syscall_msgctl (int, int, void *);
+
/* Allows to control internal state and destruction of message queue
objects. */
int __new_msgctl (int, int, struct msqid_ds *);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ef0fc04950110163458b0c18fcf32efb7534e07
commit 8ef0fc04950110163458b0c18fcf32efb7534e07
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 21 22:03:39 2000 +0000
2000-04-21 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/mips/sysdep.S: Use __PIC__ instead of PIC.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index f3974bf..d4b9945 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,93,94,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,94,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -24,7 +24,7 @@
#ifdef _LIBC_REENTRANT
ENTRY(__syscall_error)
-#ifdef PIC
+#ifdef __PIC__
.set noreorder
.set noat
move $1, $31
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5494bc3a50cf2384b965760bd44639cfa4391142
commit 5494bc3a50cf2384b965760bd44639cfa4391142
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 21 16:37:58 2000 +0000
2000-04-21 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/elf/start.S: Use __PIC__ instead of PIC.
* sysdeps/mips/mips64/add_n.S: Likewise.
* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
* sysdeps/mips/mips64/lshift.S: Likewise.
* sysdeps/mips/mips64/mul_1.S: Likewise.
* sysdeps/mips/mips64/rshift.S: Likewise.
* sysdeps/mips/mips64/setjmp.S: Likewise.
* sysdeps/mips/mips64/sub_n.S: Likewise.
* sysdeps/mips/mips64/submul_1.S: Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Remove strtab
and update comment. The strtab from _dl_relocate_object can be
used.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index de5df08..a67efac 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -218,7 +218,7 @@ int _dl_mips_gnu_objects = 1; \
/* This is called from assembly stubs below which the compiler can't see. */ \
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
+ __attribute__ ((unused)); \
\
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word) sym_index, \
@@ -274,7 +274,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* We already found the symbol. The module (and therefore its load \
address) is also known. */ \
value = l->l_addr + sym->st_value; \
- \
+ \
/* Apply the relocation with that value. */ \
*(got + local_gotno + sym_index - gotsym) = value; \
\
@@ -297,7 +297,7 @@ _dl_runtime_resolve:\n \
.cpload $25\n \
.set reorder\n \
# Save slot call pc.\n \
- move $2, $31\n \
+ move $2, $31\n \
# Save arguments and sp value in stack.\n \
subu $29, 40\n \
.cprestore 32\n \
@@ -468,11 +468,9 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n, symidx;
-#ifndef RTLD_BOOTSTRAP
- const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-#endif
/* This function is loaded in dl-reloc as a nested function and can
- therefore access the variable scope from _dl_relocate_object. */
+ therefore access the variables scope and strtab from
+ _dl_relocate_object. */
#ifdef RTLD_BOOTSTRAP
# define RESOLVE_GOTSYM(sym,sym_index) 0
#else
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index b432953..7fee4e7 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -51,7 +51,7 @@
char **argv, void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void), void *stack_end)
*/
-#ifdef PIC
+#ifdef __PIC__
/* A macro to (re)initialize gp. We can get the run time address of 0f in
ra ($31) by blezal instruction. In this early phase, we can't save gp
in stack and .cprestore doesn't work properly. So we set gp by using
@@ -67,7 +67,7 @@
.text
.globl ENTRY_POINT
ENTRY_POINT:
-#ifdef PIC
+#ifdef __PIC__
SET_GP
#endif
move $31, $0
@@ -93,7 +93,6 @@ ENTRY_POINT:
sw $2, 20($29) /* rtld_fini */
sw $29, 24($29) /* stack_end */
jal __libc_start_main
-
hlt: b hlt /* Crash if somehow it does return. */
/* Define a symbol for the first piece of initialized data. */
diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S
index ad93d9d..1d3f764 100644
--- a/sysdeps/mips/mips64/add_n.S
+++ b/sysdeps/mips/mips64/add_n.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
* store sum in a third limb vector.
*
- * Copyright (C) 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -30,7 +30,7 @@
* s2_ptr $6
* size $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -39,7 +39,7 @@
.ent __mpn_add_n
__mpn_add_n:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index cd6ec3e..7c70f5b 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +23,11 @@
#include <sysdep.h>
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (_setjmp)
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
dla t9, C_SYMBOL_NAME (__sigsetjmp)
diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S
index ef403ec..37e8489 100644
--- a/sysdeps/mips/mips64/lshift.S
+++ b/sysdeps/mips/mips64/lshift.S
@@ -1,6 +1,6 @@
/* MIPS3 __mpn_lshift --
*
- * Copyright (C) 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -29,7 +29,7 @@
* cnt $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -38,7 +38,7 @@
.ent __mpn_lshift
__mpn_lshift:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S
index ef0cf36..61d0658 100644
--- a/sysdeps/mips/mips64/mul_1.S
+++ b/sysdeps/mips/mips64/mul_1.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
* store the product in a second limb vector.
*
- * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -30,7 +30,7 @@
* s2_limb $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -39,7 +39,7 @@
.ent __mpn_mul_1
__mpn_mul_1:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S
index bc26f3f..b013eed 100644
--- a/sysdeps/mips/mips64/rshift.S
+++ b/sysdeps/mips/mips64/rshift.S
@@ -1,6 +1,6 @@
/* MIPS3 __mpn_rshift --
*
- * Copyright (C) 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -29,7 +29,7 @@
* cnt $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -38,7 +38,7 @@
.ent __mpn_rshift
__mpn_rshift:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
index 7421429..127ab42 100644
--- a/sysdeps/mips/mips64/setjmp.S
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,11 @@
/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__sigsetjmp)
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
move a2, sp
diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S
index bfcba95..16482f1 100644
--- a/sysdeps/mips/mips64/sub_n.S
+++ b/sysdeps/mips/mips64/sub_n.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
* store difference in a third limb vector.
*
- * Copyright (C) 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -30,7 +30,7 @@
* size $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -39,7 +39,7 @@
.ent __mpn_sub_n
__mpn_sub_n:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S
index 66e634e..5cb39ac 100644
--- a/sysdeps/mips/mips64/submul_1.S
+++ b/sysdeps/mips/mips64/submul_1.S
@@ -1,7 +1,7 @@
/* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
* subtract the product from a second limb vector.
*
- * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ * Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@@ -30,7 +30,7 @@
* s2_limb $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
.text
@@ -39,7 +39,7 @@
.ent __mpn_submul_1
__mpn_submul_1:
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5714e995715628372bf20ce16b0332d2b981ceee
commit 5714e995715628372bf20ce16b0332d2b981ceee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 19:43:07 2000 +0000
Fix type of len argument.
diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c
index b213c6f..76c8c72 100644
--- a/sysdeps/unix/sysv/aix/gethostname.c
+++ b/sysdeps/unix/sysv/aix/gethostname.c
@@ -21,7 +21,7 @@
int
__gethostname (name, len)
char *name;
- size_t len;
+ socklen_t len;
{
return gethostname (name, len);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b146f384322aad3acc2ac6d7e76e0b2be54a501e
commit b146f384322aad3acc2ac6d7e76e0b2be54a501e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 19:41:18 2000 +0000
Define ACC_INVOKER.
diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c
index d46a524..fb94a54 100644
--- a/sysdeps/unix/sysv/aix/access.c
+++ b/sysdeps/unix/sysv/aix/access.c
@@ -18,6 +18,8 @@
#include <unistd.h>
+#define ACC_INVOKER 0x01
+
extern int accessx (const char *name, int type, int who);
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e110de66839a68553910723aed61574f312c80e8
commit e110de66839a68553910723aed61574f312c80e8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 19:38:24 2000 +0000
Define ID_EFFECTIVE.
diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c
index 7e88c89..d092fc5 100644
--- a/sysdeps/unix/sysv/aix/getegid.c
+++ b/sysdeps/unix/sysv/aix/getegid.c
@@ -18,6 +18,9 @@
#include <unistd.h>
+#define ID_EFFECTIVE 0x01
+
+
gid_t
__getegid (void)
{
diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c
index 3c695b2..86034b3 100644
--- a/sysdeps/unix/sysv/aix/geteuid.c
+++ b/sysdeps/unix/sysv/aix/geteuid.c
@@ -18,6 +18,9 @@
#include <unistd.h>
+#define ID_EFFECTIVE 0x01
+
+
uid_t
__geteuid (void)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5166e402b8570a481bcf7c10e32632579af04b5e
commit 5166e402b8570a481bcf7c10e32632579af04b5e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Apr 18 18:31:00 2000 +0000
2000-04-18 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_rel): Fix relocation.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index a15b78d..de5df08 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -428,40 +428,23 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version,
ElfW(Addr) *const reloc_addr)
{
- ElfW(Addr) loadbase;
- ElfW(Addr) undo __attribute__ ((unused));
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link. This
+ declaration cannot be done when compiling rtld.c (i.e. #ifdef
+ RTLD_BOOTSTRAP) because rtld.c contains the common defn for
+ _dl_rtld_map, which is incompatible with a weak decl in the same
+ file. */
+ weak_extern (_dl_rtld_map);
+#endif
switch (ELFW(R_TYPE) (reloc->r_info))
{
case R_MIPS_REL32:
- {
- ElfW(Addr) undo = 0;
-
- if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
- && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
- || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
- {
- *reloc_addr += map->l_addr;
- break;
- }
#ifndef RTLD_BOOTSTRAP
- /* This is defined in rtld.c, but nowhere in the static libc.a;
- make the reference weak so static programs can still link. This
- declaration cannot be done when compiling rtld.c (i.e. #ifdef
- RTLD_BOOTSTRAP) because rtld.c contains the common defn for
- _dl_rtld_map, which is incompatible with a weak decl in the same
- file. */
- weak_extern (_dl_rtld_map);
- if (map == &_dl_rtld_map)
- /* Undo the relocation done here during bootstrapping. Now we will
- relocate it anew, possibly using a binding found in the user
- program or a loaded library rather than the dynamic linker's
- built-in definitions used while loading those libraries. */
- undo = map->l_addr + sym->st_value;
+ if (map != &_dl_rtld_map)
#endif
- loadbase = RESOLVE (&sym, version, R_MIPS_REL32);
- *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
- }
+ *reloc_addr += map->l_addr;
break;
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=46737e2def50c93e243f3fc2582c083acda0c4f0
commit 46737e2def50c93e243f3fc2582c083acda0c4f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:56:51 2000 +0000
Don't try to include <sys/id.h>.
diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c
index 30a6a99..7e88c89 100644
--- a/sysdeps/unix/sysv/aix/getegid.c
+++ b/sysdeps/unix/sysv/aix/getegid.c
@@ -17,9 +17,6 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
-#include <sys/id.h>
-
gid_t
__getegid (void)
diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c
index 4856868..3c695b2 100644
--- a/sysdeps/unix/sysv/aix/geteuid.c
+++ b/sysdeps/unix/sysv/aix/geteuid.c
@@ -17,9 +17,6 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
-#include <sys/id.h>
-
uid_t
__geteuid (void)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a24525ca5375efcc3f75105e1b6428815244f7ff
commit a24525ca5375efcc3f75105e1b6428815244f7ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:54:56 2000 +0000
Fix typo.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index c94b9d4..3de7e02 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -12,7 +12,7 @@ endif
# Don't compile the ctype glue code, since there is no old non-GNU C library.
inhibit-glue = yes
-# XXX Don"t know yet why this is needed in the moment.
+# XXX Don't know yet why this is needed in the moment.
ifeq ($(subdir),timezone)
CPPFLAGS-zic.c = -Dunix
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7bc29f16fe98297bf39d551ac35407626d22e1d
commit f7bc29f16fe98297bf39d551ac35407626d22e1d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:42:20 2000 +0000
Define STX_NORMAL and STX_64.
diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c
index 07a62fd..eadf637 100644
--- a/sysdeps/unix/sysv/aix/xstat64.c
+++ b/sysdeps/unix/sysv/aix/xstat64.c
@@ -19,10 +19,9 @@
#include <assert.h>
#include <sys/stat.h>
-/* these are #define'd in <sys/stat.h>, why #define them here?
#define STX_NORMAL 0x00
#define STX_64 0x08
- */
+
extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19250f4f64565ca8d466a768449960981622afd2
commit 19250f4f64565ca8d466a768449960981622afd2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:41:57 2000 +0000
Define STX_NORMAL.
diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c
index e053ce7..df01afa 100644
--- a/sysdeps/unix/sysv/aix/xstat.c
+++ b/sysdeps/unix/sysv/aix/xstat.c
@@ -19,9 +19,8 @@
#include <assert.h>
#include <sys/stat.h>
-/* this is #define'd in <sys/stat.h> why #define it here?
#define STX_NORMAL 0x00
- */
+
extern int statx (const char *pathname, struct stat *st, int len, int cmd);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f571f1f690def73406fd6b28dc09a79e7205194
commit 6f571f1f690def73406fd6b28dc09a79e7205194
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:41:27 2000 +0000
AIX utimes implementation.
diff --git a/sysdeps/unix/sysv/aix/utimes.c b/sysdeps/unix/sysv/aix/utimes.c
new file mode 100644
index 0000000..907931a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/utimes.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/time.h>
+
+int
+__utimes (file, tvp)
+ const char *file;
+ const struct timeval tvp[2];
+{
+ return utimes (file, tvp);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51ce9626814fea274f45c81bff6383cc74d5e10f
commit 51ce9626814fea274f45c81bff6383cc74d5e10f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:40:45 2000 +0000
AIX ustat implementation.
diff --git a/sysdeps/unix/sysv/aix/ustat.c b/sysdeps/unix/sysv/aix/ustat.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/ustat.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c6dd57c146299b0af9e8b04b1bd35127a29575a
commit 3c6dd57c146299b0af9e8b04b1bd35127a29575a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:40:14 2000 +0000
AIX unlink implementation.
diff --git a/sysdeps/unix/sysv/aix/unlink.c b/sysdeps/unix/sysv/aix/unlink.c
new file mode 100644
index 0000000..e1bac23
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/unlink.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__unlink (name)
+ const char *name;
+{
+ return unlink (name);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49bfeb5b7b28c94c17786b5ab564fc41b26053e4
commit 49bfeb5b7b28c94c17786b5ab564fc41b26053e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:39:34 2000 +0000
AIX umask implementation.
diff --git a/sysdeps/unix/sysv/aix/umask.c b/sysdeps/unix/sysv/aix/umask.c
new file mode 100644
index 0000000..6bbfdac
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/umask.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/stat.h>
+
+mode_t
+__umask (mask)
+ mode_t mask;
+{
+ return umask (mask);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42ae56646a33902a0e470b5fe65c7d9884679e45
commit 42ae56646a33902a0e470b5fe65c7d9884679e45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:38:42 2000 +0000
AIX ulimit implementation.
diff --git a/sysdeps/unix/sysv/aix/ulimit.c b/sysdeps/unix/sysv/aix/ulimit.c
new file mode 100644
index 0000000..c72a527
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/ulimit.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <sys/resource.h>
+
+long int
+__ulimit (int cmd, ...)
+{
+ va_list va;
+ long int arg;
+ long int res;
+
+ va_start (va, cmd);
+ arg = va_arg (va, long int);
+
+ res = ulimit (cmd, arg);
+
+ va_end (va);
+
+ return res;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=361684a9a289dda675a9d2af9b949971a854baf8
commit 361684a9a289dda675a9d2af9b949971a854baf8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:36:12 2000 +0000
AIX times implementation.
diff --git a/sysdeps/unix/sysv/aix/times.c b/sysdeps/unix/sysv/aix/times.c
new file mode 100644
index 0000000..c974049
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/times.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/times.h>
+
+/* Store the CPU time used by this process and all its
+ dead children (and their dead children) in BUFFER.
+ Return the elapsed real time, or (clock_t) -1 for errors.
+ All times are in CLK_TCKths of a second. */
+clock_t
+__times (buffer)
+ struct tms *buffer;
+{
+ return times (buffer);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79be7d26af01d4ffc99e8d1d4b55f747b60806e9
commit 79be7d26af01d4ffc99e8d1d4b55f747b60806e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:33:41 2000 +0000
AIX tcsetattr implementation.
diff --git a/sysdeps/unix/sysv/aix/tcsetattr.c b/sysdeps/unix/sysv/aix/tcsetattr.c
new file mode 100644
index 0000000..516bcfb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/tcsetattr.c
@@ -0,0 +1,197 @@
+/* Copyright (C) 1992, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+#include <sysv_termio.h>
+
+
+const speed_t __unix_speeds[] =
+ {
+ 0,
+ 50,
+ 75,
+ 110,
+ 134,
+ 150,
+ 200,
+ 300,
+ 600,
+ 1200,
+ 1800,
+ 2400,
+ 4800,
+ 9600,
+ 19200,
+ 38400,
+ };
+
+
+/* Set the state of FD to *TERMIOS_P. */
+int
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
+{
+ struct __sysv_termio buf;
+ int ioctl_function;
+
+ if (termios_p == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ switch (optional_actions)
+ {
+ case TCSANOW:
+ ioctl_function = _TCSETA;
+ break;
+ case TCSADRAIN:
+ ioctl_function = _TCSETAW;
+ break;
+ case TCSAFLUSH:
+ ioctl_function = _TCSETAF;
+ break;
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ if ((termios_p->c_cflag & 0x000f0000) >> 16 != (termios_p->c_cflag & 0xf))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ buf.c_iflag = 0;
+ if (termios_p->c_iflag & IGNBRK)
+ buf.c_iflag |= _SYSV_IGNBRK;
+ if (termios_p->c_iflag & BRKINT)
+ buf.c_iflag |= _SYSV_BRKINT;
+ if (termios_p->c_iflag & IGNPAR)
+ buf.c_iflag |= _SYSV_IGNPAR;
+ if (termios_p->c_iflag & PARMRK)
+ buf.c_iflag |= _SYSV_PARMRK;
+ if (termios_p->c_iflag & INPCK)
+ buf.c_iflag |= _SYSV_INPCK;
+ if (termios_p->c_iflag & ISTRIP)
+ buf.c_iflag |= _SYSV_ISTRIP;
+ if (termios_p->c_iflag & INLCR)
+ buf.c_iflag |= _SYSV_INLCR;
+ if (termios_p->c_iflag & IGNCR)
+ buf.c_iflag |= _SYSV_IGNCR;
+ if (termios_p->c_iflag & ICRNL)
+ buf.c_iflag |= _SYSV_ICRNL;
+ if (termios_p->c_iflag & IXON)
+ buf.c_iflag |= _SYSV_IXON;
+ if (termios_p->c_iflag & IXOFF)
+ buf.c_iflag |= _SYSV_IXOFF;
+ if (termios_p->c_iflag & IXANY)
+ buf.c_iflag |= _SYSV_IXANY;
+ if (termios_p->c_iflag & IMAXBEL)
+ buf.c_iflag |= _SYSV_IMAXBEL;
+
+ buf.c_oflag = 0;
+ if (termios_p->c_oflag & OPOST)
+ buf.c_oflag |= _SYSV_OPOST;
+ if (termios_p->c_oflag & ONLCR)
+ buf.c_oflag |= _SYSV_ONLCR;
+
+ /* So far, buf.c_cflag contains the speed in CBAUD. */
+ if (termios_p->c_cflag & CSTOPB)
+ buf.c_cflag |= _SYSV_CSTOPB;
+ if (termios_p->c_cflag & CREAD)
+ buf.c_cflag |= _SYSV_CREAD;
+ if (termios_p->c_cflag & PARENB)
+ buf.c_cflag |= _SYSV_PARENB;
+ if (termios_p->c_cflag & PARODD)
+ buf.c_cflag |= _SYSV_PARODD;
+ if (termios_p->c_cflag & HUPCL)
+ buf.c_cflag |= _SYSV_HUPCL;
+ if (termios_p->c_cflag & CLOCAL)
+ buf.c_cflag |= _SYSV_CLOCAL;
+ switch (termios_p->c_cflag & CSIZE)
+ {
+ case CS5:
+ buf.c_cflag |= _SYSV_CS5;
+ break;
+ case CS6:
+ buf.c_cflag |= _SYSV_CS6;
+ break;
+ case CS7:
+ buf.c_cflag |= _SYSV_CS7;
+ break;
+ case CS8:
+ buf.c_cflag |= _SYSV_CS8;
+ break;
+ }
+
+ buf.c_lflag = 0;
+ if (termios_p->c_lflag & ISIG)
+ buf.c_lflag |= _SYSV_ISIG;
+ if (termios_p->c_lflag & ICANON)
+ buf.c_lflag |= _SYSV_ICANON;
+ if (termios_p->c_lflag & ECHO)
+ buf.c_lflag |= _SYSV_ECHO;
+ if (termios_p->c_lflag & ECHOE)
+ buf.c_lflag |= _SYSV_ECHOE;
+ if (termios_p->c_lflag & ECHOK)
+ buf.c_lflag |= _SYSV_ECHOK;
+ if (termios_p->c_lflag & ECHONL)
+ buf.c_lflag |= _SYSV_ECHONL;
+ if (termios_p->c_lflag & NOFLSH)
+ buf.c_lflag |= _SYSV_NOFLSH;
+ if (termios_p->c_lflag & TOSTOP)
+ buf.c_lflag |= _SYSV_TOSTOP;
+ if (termios_p->c_lflag & ECHOCTL)
+ buf.c_lflag |= _SYSV_ECHOCTL;
+ if (termios_p->c_lflag & ECHOPRT)
+ buf.c_lflag |= _SYSV_ECHOPRT;
+ if (termios_p->c_lflag & ECHOKE)
+ buf.c_lflag |= _SYSV_ECHOKE;
+ if (termios_p->c_lflag & FLUSHO)
+ buf.c_lflag |= _SYSV_FLUSHO;
+ if (termios_p->c_lflag & PENDIN)
+ buf.c_lflag |= _SYSV_PENDIN;
+ if (termios_p->c_lflag & IEXTEN)
+ buf.c_lflag |= _SYSV_IEXTEN;
+
+ buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR];
+ buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT];
+ buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE];
+ buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL];
+ if (buf.c_lflag & _SYSV_ICANON)
+ {
+ buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF];
+ buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL];
+ }
+ else
+ {
+ buf.c_cc[_SYSV_VMIN] = termios_p->c_cc[VMIN];
+ buf.c_cc[_SYSV_VTIME] = termios_p->c_cc[VTIME];
+ }
+ buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2];
+
+ if (__ioctl (fd, ioctl_function, &buf) < 0)
+ return -1;
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc84839066d313567b1c0a8b5a4d6807fbb789ea
commit bc84839066d313567b1c0a8b5a4d6807fbb789ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:32:06 2000 +0000
AIX tcgetattr implementation.
diff --git a/sysdeps/unix/sysv/aix/tcgetattr.c b/sysdeps/unix/sysv/aix/tcgetattr.c
new file mode 100644
index 0000000..b994f17
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/tcgetattr.c
@@ -0,0 +1,152 @@
+/* Copyright (C) 1992, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sysv_termio.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+/* Put the state of FD into *TERMIOS_P. */
+int
+__tcgetattr (fd, termios_p)
+ int fd;
+ struct termios *termios_p;
+{
+ struct __sysv_termio buf;
+
+ if (termios_p == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ if (__ioctl (fd, _TCGETA, &buf) < 0)
+ return -1;
+
+ termios_p->c_cflag &= ~0x000f0000;
+ termios_p->c_cflag |= (termios_p->c_cflag & 0xf) << 16;
+
+ termios_p->c_iflag = 0;
+ if (buf.c_iflag & _SYSV_IGNBRK)
+ termios_p->c_iflag |= IGNBRK;
+ if (buf.c_iflag & _SYSV_BRKINT)
+ termios_p->c_iflag |= BRKINT;
+ if (buf.c_iflag & _SYSV_IGNPAR)
+ termios_p->c_iflag |= IGNPAR;
+ if (buf.c_iflag & _SYSV_PARMRK)
+ termios_p->c_iflag |= PARMRK;
+ if (buf.c_iflag & _SYSV_INPCK)
+ termios_p->c_iflag |= INPCK;
+ if (buf.c_iflag & _SYSV_ISTRIP)
+ termios_p->c_iflag |= ISTRIP;
+ if (buf.c_iflag & _SYSV_INLCR)
+ termios_p->c_iflag |= INLCR;
+ if (buf.c_iflag & _SYSV_IGNCR)
+ termios_p->c_iflag |= IGNCR;
+ if (buf.c_iflag & _SYSV_ICRNL)
+ termios_p->c_iflag |= ICRNL;
+ if (buf.c_iflag & _SYSV_IXON)
+ termios_p->c_iflag |= IXON;
+ if (buf.c_iflag & _SYSV_IXOFF)
+ termios_p->c_iflag |= IXOFF;
+ if (buf.c_iflag & _SYSV_IXANY)
+ termios_p->c_iflag |= IXANY;
+ if (buf.c_iflag & _SYSV_IMAXBEL)
+ termios_p->c_iflag |= IMAXBEL;
+
+ termios_p->c_oflag = 0;
+ if (buf.c_oflag & OPOST)
+ termios_p->c_oflag |= OPOST;
+ if (buf.c_oflag & ONLCR)
+ termios_p->c_oflag |= ONLCR;
+ termios_p->c_cflag = 0;
+ switch (buf.c_cflag & _SYSV_CSIZE)
+ {
+ case _SYSV_CS5:
+ termios_p->c_cflag |= CS5;
+ break;
+ case _SYSV_CS6:
+ termios_p->c_cflag |= CS6;
+ break;
+ case _SYSV_CS7:
+ termios_p->c_cflag |= CS7;
+ break;
+ case _SYSV_CS8:
+ termios_p->c_cflag |= CS8;
+ break;
+ }
+ if (buf.c_cflag & _SYSV_CSTOPB)
+ termios_p->c_cflag |= CSTOPB;
+ if (buf.c_cflag & _SYSV_CREAD)
+ termios_p->c_cflag |= CREAD;
+ if (buf.c_cflag & _SYSV_PARENB)
+ termios_p->c_cflag |= PARENB;
+ if (buf.c_cflag & _SYSV_PARODD)
+ termios_p->c_cflag |= PARODD;
+ if (buf.c_cflag & _SYSV_HUPCL)
+ termios_p->c_cflag |= HUPCL;
+ if (buf.c_cflag & _SYSV_CLOCAL)
+ termios_p->c_cflag |= CLOCAL;
+ termios_p->c_lflag = 0;
+ if (buf.c_lflag & _SYSV_ISIG)
+ termios_p->c_lflag |= ISIG;
+ if (buf.c_lflag & _SYSV_ICANON)
+ termios_p->c_lflag |= ICANON;
+ if (buf.c_lflag & _SYSV_ECHO)
+ termios_p->c_lflag |= ECHO;
+ if (buf.c_lflag & _SYSV_ECHOE)
+ termios_p->c_lflag |= ECHOE;
+ if (buf.c_lflag & _SYSV_ECHOK)
+ termios_p->c_lflag |= ECHOK;
+ if (buf.c_lflag & _SYSV_ECHONL)
+ termios_p->c_lflag |= ECHONL;
+ if (buf.c_lflag & _SYSV_NOFLSH)
+ termios_p->c_lflag |= NOFLSH;
+ if (buf.c_lflag & _SYSV_TOSTOP)
+ termios_p->c_lflag |= TOSTOP;
+ if (buf.c_lflag & _SYSV_ECHOKE)
+ termios_p->c_lflag |= ECHOKE;
+ if (buf.c_lflag & _SYSV_ECHOPRT)
+ termios_p->c_lflag |= ECHOPRT;
+ if (buf.c_lflag & _SYSV_ECHOCTL)
+ termios_p->c_lflag |= ECHOCTL;
+ if (buf.c_lflag & _SYSV_FLUSHO)
+ termios_p->c_lflag |= FLUSHO;
+ if (buf.c_lflag & _SYSV_PENDIN)
+ termios_p->c_lflag |= PENDIN;
+ if (buf.c_lflag & _SYSV_IEXTEN)
+ termios_p->c_lflag |= IEXTEN;
+
+ termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF];
+ termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL];
+ termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2];
+ termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE];
+ termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL];
+ termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR];
+ termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT];
+ termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */
+ termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */
+ termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */
+ termios_p->c_cc[VMIN] = buf.c_cc[_SYSV_VMIN];
+ termios_p->c_cc[VTIME] = buf.c_cc[_SYSV_VTIME];
+
+ return 0;
+}
+
+weak_alias (__tcgetattr, tcgetattr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b6e50c981f46b5fcf17b9072dc751856e3bd162
commit 2b6e50c981f46b5fcf17b9072dc751856e3bd162
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:26:12 2000 +0000
Define NGROUPS.
diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h
index e128d8d..66f2127 100644
--- a/sysdeps/unix/sysv/aix/sys/param.h
+++ b/sysdeps/unix/sysv/aix/sys/param.h
@@ -13,6 +13,9 @@
/* The pagesize is 4096. */
#define EXEC_PAGESIZE 4096
+/* maximum number of supplemental groups. */
+#define NGROUPS 32
+
/* Macros for min/max. */
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1fcf9f333989d58cf8a3d485f294af8bab3c884e
commit 1fcf9f333989d58cf8a3d485f294af8bab3c884e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:25:35 2000 +0000
AIX sync implementation.
diff --git a/sysdeps/unix/sysv/aix/sync.c b/sysdeps/unix/sysv/aix/sync.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sync.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be97d53c5e3cb67e0e39636593c29c460034be07
commit be97d53c5e3cb67e0e39636593c29c460034be07
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:24:57 2000 +0000
AIX symlink implementation.
diff --git a/sysdeps/unix/sysv/aix/symlink.c b/sysdeps/unix/sysv/aix/symlink.c
new file mode 100644
index 0000000..a70f103
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/symlink.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__symlink (from, to)
+ const char *from;
+ const char *to;
+{
+ return symlink (from, to);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3768742b5ca80433a80862ab05c72a3086074dd2
commit 3768742b5ca80433a80862ab05c72a3086074dd2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:23:08 2000 +0000
AIX cf[sg]et[io]speed implementations.
diff --git a/sysdeps/unix/sysv/aix/speed.c b/sysdeps/unix/sysv/aix/speed.c
new file mode 100644
index 0000000..06934fe
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/speed.c
@@ -0,0 +1,72 @@
+/* `struct termios' speed frobnication functions. AIX version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <errno.h>
+#include <termios.h>
+
+/* Return the output baud rate stored in *TERMIOS_P. */
+speed_t
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
+{
+ return termios_p->c_cflag & 0x0000000f;
+}
+
+/* Return the input baud rate stored in *TERMIOS_P. */
+speed_t
+cfgetispeed (termios_p)
+ const struct termios *termios_p;
+{
+ return (termios_p->c_cflag & 0x000f0000) >> 16;
+}
+
+/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
+int
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
+{
+ if (termios_p == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ termios_p->c_cflag &= ~0x0000000f;
+ termios_p->c_cflag |= speed & 0x0000000f;
+ return 0;
+}
+
+/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
+int
+cfsetispeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
+{
+ if (termios_p == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ termios_p->c_cflag &= ~0x000f0000;
+ termios_p->c_cflag |= (speed << 16) & ~0x000f0000;
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5dfa9a879133f5de3cb99544c2281d4709fea5d2
commit 5dfa9a879133f5de3cb99544c2281d4709fea5d2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:21:56 2000 +0000
AIX socketpair implementation.
diff --git a/sysdeps/unix/sysv/aix/socketpair.c b/sysdeps/unix/sysv/aix/socketpair.c
new file mode 100644
index 0000000..b4dda7f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/socketpair.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+int
+__socketpair (int domain, int type, int protocol, int fds[2])
+{
+ return socketpair (domain, type, protocol, fds);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d46f52217d88b30fff2d1a16a012034edca0844
commit 6d46f52217d88b30fff2d1a16a012034edca0844
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:20:43 2000 +0000
AIX socket implementation.
diff --git a/sysdeps/unix/sysv/aix/socket.c b/sysdeps/unix/sysv/aix/socket.c
new file mode 100644
index 0000000..8e409cb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/socket.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+int
+__socket (int domain, int type, int protocol)
+{
+ return socket (domain, type, protocol);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7960128f5db5ce3406c7241fe3a0d0d6fe0da6d1
commit 7960128f5db5ce3406c7241fe3a0d0d6fe0da6d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:20:01 2000 +0000
AIX sgistack implementation.
diff --git a/sysdeps/unix/sysv/aix/sigstack.c b/sysdeps/unix/sysv/aix/sigstack.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigstack.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8089d978a522c91decde39fd2186ef4e3714985b
commit 8089d978a522c91decde39fd2186ef4e3714985b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:19:16 2000 +0000
AIX sigaltstack implementation.
diff --git a/sysdeps/unix/sysv/aix/sigaltstack.c b/sysdeps/unix/sysv/aix/sigaltstack.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigaltstack.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3cac39029925aafd30a2fcfa8c4ca28dbc91097b
commit 3cac39029925aafd30a2fcfa8c4ca28dbc91097b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:18:37 2000 +0000
AIX shmget implementation.
diff --git a/sysdeps/unix/sysv/aix/shmget.c b/sysdeps/unix/sysv/aix/shmget.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/shmget.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58aea19680409cb9a8a245cb4aac4d8090e505f8
commit 58aea19680409cb9a8a245cb4aac4d8090e505f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:18:00 2000 +0000
AIX shmdt implementation.
diff --git a/sysdeps/unix/sysv/aix/shmdt.c b/sysdeps/unix/sysv/aix/shmdt.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/shmdt.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d117b990086e28993146fbe6ac933b2e0a93986f
commit d117b990086e28993146fbe6ac933b2e0a93986f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:17:12 2000 +0000
AIX shmctl implementation.
diff --git a/sysdeps/unix/sysv/aix/shmctl.c b/sysdeps/unix/sysv/aix/shmctl.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/shmctl.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c0364334c3d605271a7519d8a8bc9ed4b7102b7
commit 8c0364334c3d605271a7519d8a8bc9ed4b7102b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 17:16:24 2000 +0000
AIX shmat implementation.
diff --git a/sysdeps/unix/sysv/aix/shmat.c b/sysdeps/unix/sysv/aix/shmat.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/shmat.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7ed538a9dde8b6edb5a54646d912d86f8afae42
commit b7ed538a9dde8b6edb5a54646d912d86f8afae42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:17:51 2000 +0000
Define ID_REAL.
diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c
index bf976ec..ba1b01e 100644
--- a/sysdeps/unix/sysv/aix/setgid.c
+++ b/sysdeps/unix/sysv/aix/setgid.c
@@ -18,9 +18,8 @@
#include <unistd.h>
+#define ID_REAL 0x02
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
-#include <sys/id.h>
extern int setgidx (int mask, gid_t gid);
diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c
index 679db05..a86343a 100644
--- a/sysdeps/unix/sysv/aix/setuid.c
+++ b/sysdeps/unix/sysv/aix/setuid.c
@@ -18,8 +18,8 @@
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
-#include <sys/id.h>
+#define ID_REAL 0x02
+
extern int setuidx (int mask, uid_t uid);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74cb21ae8f6bed6d64eb56b4557ce9849423b42b
commit 74cb21ae8f6bed6d64eb56b4557ce9849423b42b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:17:20 2000 +0000
AIX setsockopt implementation.
diff --git a/sysdeps/unix/sysv/aix/setsockopt.c b/sysdeps/unix/sysv/aix/setsockopt.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setsockopt.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d70663df0646574d7cdaa345f45f9d34796b905
commit 4d70663df0646574d7cdaa345f45f9d34796b905
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:16:41 2000 +0000
AIX setsid implementation.
diff --git a/sysdeps/unix/sysv/aix/setsid.c b/sysdeps/unix/sysv/aix/setsid.c
new file mode 100644
index 0000000..980649b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setsid.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__setsid ()
+{
+ return setsid ();
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c4f60902aba56503bc5b7470efdbc1356a965ea
commit 2c4f60902aba56503bc5b7470efdbc1356a965ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:15:59 2000 +0000
AIX setrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/aix/setrlimit64.c b/sysdeps/unix/sysv/aix/setrlimit64.c
new file mode 100644
index 0000000..bfb1594
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setrlimit64.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/resource.h>
+
+int
+__setrlimit64 (enum __rlimit_resource resource, const struct rlimit64 *rlimits)
+{
+ return setrlimit64 (resource, rlimits);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6376e31c11c4166b66ada78e341581aacbae9d31
commit 6376e31c11c4166b66ada78e341581aacbae9d31
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:15:14 2000 +0000
AIX setrlimit implementation.
diff --git a/sysdeps/unix/sysv/aix/setrlimit.c b/sysdeps/unix/sysv/aix/setrlimit.c
new file mode 100644
index 0000000..d7480e3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setrlimit.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/resource.h>
+
+int
+__setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
+{
+ return setrlimit (resource, rlimits);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb67907d471e2511bedfc40ac3f5358a4b1886fb
commit bb67907d471e2511bedfc40ac3f5358a4b1886fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:13:05 2000 +0000
Define ID_EFFECTIVE and ID_REAL.
diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c
index 02961b4..b747b6c 100644
--- a/sysdeps/unix/sysv/aix/setregid.c
+++ b/sysdeps/unix/sysv/aix/setregid.c
@@ -18,9 +18,8 @@
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? */
-/* If so #define ID_EFFECTIVE and ID_REAL */
-#include <sys/id.h>
+#define ID_EFFECTIVE 0x01
+#define ID_REAL 0x02
extern int setgidx (int mask, gid_t gid);
diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c
index ecf12a1..eafc764 100644
--- a/sysdeps/unix/sysv/aix/setreuid.c
+++ b/sysdeps/unix/sysv/aix/setreuid.c
@@ -18,9 +18,9 @@
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? */
-/* If so #define ID_EFFECTIVE and ID_REAL */
-#include <sys/id.h>
+#define ID_EFFECTIVE 0x01
+#define ID_REAL 0x02
+
extern int setuidx (int mask, uid_t uid);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cf10be3d40f0a4f77f806325c383e7fc2fef1b0
commit 9cf10be3d40f0a4f77f806325c383e7fc2fef1b0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:11:54 2000 +0000
AIX setpriority implementation.
diff --git a/sysdeps/unix/sysv/aix/setpriority.c b/sysdeps/unix/sysv/aix/setpriority.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setpriority.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9142cbef041ca2ba0bf4d0fdcf514dc67a35fc64
commit 9142cbef041ca2ba0bf4d0fdcf514dc67a35fc64
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:10:47 2000 +0000
AIX setpgrp implementation.
diff --git a/sysdeps/unix/sysv/aix/setpgrp.c b/sysdeps/unix/sysv/aix/setpgrp.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setpgrp.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7446ac75bda9fac8588fa034ab4bc2b9ce0974b
commit f7446ac75bda9fac8588fa034ab4bc2b9ce0974b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:09:37 2000 +0000
AIX setpgid implementation.
diff --git a/sysdeps/unix/sysv/aix/setpgid.c b/sysdeps/unix/sysv/aix/setpgid.c
new file mode 100644
index 0000000..cee1646
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setpgid.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__setpgid (pid, pgid)
+ int pid;
+ int pgid;
+{
+ return setpgid (pid, pgid);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08d89c57c2ea391a466fc53046bee5050092821f
commit 08d89c57c2ea391a466fc53046bee5050092821f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:08:31 2000 +0000
AIX setgroups implementation.
diff --git a/sysdeps/unix/sysv/aix/setgroups.c b/sysdeps/unix/sysv/aix/setgroups.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setgroups.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d83250b898c86652cd1a3981922234136d9e03a
commit 7d83250b898c86652cd1a3981922234136d9e03a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:07:13 2000 +0000
Define ID_EFFECTIVE.
diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c
index 9f660ff..eedc71a 100644
--- a/sysdeps/unix/sysv/aix/setegid.c
+++ b/sysdeps/unix/sysv/aix/setegid.c
@@ -18,8 +18,7 @@
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
-#include <sys/id.h>
+#define ID_EFFECTIVE 0x01
extern int setgidx (int mask, gid_t gid);
diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c
index de9280b..c2fb948 100644
--- a/sysdeps/unix/sysv/aix/seteuid.c
+++ b/sysdeps/unix/sysv/aix/seteuid.c
@@ -18,9 +18,8 @@
#include <unistd.h>
+#define ID_EFFECTIVE 0x01
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
-#include <sys/id.h>
extern int setuidx (int mask, uid_t uid);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3669ba5cb8aa7db4f2d9c185ed23c96cd35d9c50
commit 3669ba5cb8aa7db4f2d9c185ed23c96cd35d9c50
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:06:12 2000 +0000
AIX sendto implementation.
diff --git a/sysdeps/unix/sysv/aix/sendto.c b/sysdeps/unix/sysv/aix/sendto.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sendto.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=580c1a55bb3c949fb7d067fc5bf7fac993a25985
commit 580c1a55bb3c949fb7d067fc5bf7fac993a25985
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:05:38 2000 +0000
AIX semop implementation.
diff --git a/sysdeps/unix/sysv/aix/semop.c b/sysdeps/unix/sysv/aix/semop.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/semop.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd39f671cadf62fd662d2be449236995ed018960
commit cd39f671cadf62fd662d2be449236995ed018960
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:05:03 2000 +0000
AIX semget implementation.
diff --git a/sysdeps/unix/sysv/aix/semget.c b/sysdeps/unix/sysv/aix/semget.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/semget.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb8b9f103c1a250a29da97bcc6cc416959a47ac8
commit fb8b9f103c1a250a29da97bcc6cc416959a47ac8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:04:22 2000 +0000
AIX semctl implementation.
diff --git a/sysdeps/unix/sysv/aix/semctl.c b/sysdeps/unix/sysv/aix/semctl.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/semctl.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bfefa44d6c117898264d82459ad2474a060cc698
commit bfefa44d6c117898264d82459ad2474a060cc698
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:01:23 2000 +0000
AIX select implementation.
diff --git a/sysdeps/unix/sysv/aix/select.c b/sysdeps/unix/sysv/aix/select.c
new file mode 100644
index 0000000..34df22f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/select.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/time.h>
+
+int
+__select (nfds, readfds, writefds, exceptfds, timeout)
+ int nfds;
+ fd_set *readfds;
+ fd_set *writefds;
+ fd_set *exceptfds;
+ struct timeval *timeout;
+{
+ return select (nfds, readfds, writefds, exceptfds, timeout);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d8593d823a2dae74ec8b5c3e906ec55c6f48c7a
commit 6d8593d823a2dae74ec8b5c3e906ec55c6f48c7a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 16:00:33 2000 +0000
Update parameter type.
diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c
index 9e4b560..09ba0b1 100644
--- a/sysdeps/unix/sysv/aix/sbrk.c
+++ b/sysdeps/unix/sysv/aix/sbrk.c
@@ -1,8 +1,25 @@
-/* This is a system call. We only have to provide the wrapper. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
void *
-__sbrk (ptrdiff_t delta)
+__sbrk (intptr_t delta)
{
return sbrk (delta);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5745df2a3a9c301d7ed3709df6a5e30c23941497
commit 5745df2a3a9c301d7ed3709df6a5e30c23941497
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:59:17 2000 +0000
AIX rmdir implementation.
diff --git a/sysdeps/unix/sysv/aix/rmdir.c b/sysdeps/unix/sysv/aix/rmdir.c
new file mode 100644
index 0000000..6b659ec
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/rmdir.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__rmdir (const char *name)
+{
+ return rmdir (name);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05ab8acba19bbf32a6114b42309e8a751bac143e
commit 05ab8acba19bbf32a6114b42309e8a751bac143e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:58:27 2000 +0000
AIX rename implementation.
diff --git a/sysdeps/unix/sysv/aix/rename.c b/sysdeps/unix/sysv/aix/rename.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/rename.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4a5589d58a955d023b0360d72524403cd41461d
commit b4a5589d58a955d023b0360d72524403cd41461d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:57:46 2000 +0000
AIX poll implementation.
diff --git a/sysdeps/unix/sysv/aix/poll.c b/sysdeps/unix/sysv/aix/poll.c
new file mode 100644
index 0000000..ae041a8
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/poll.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/poll.h>
+
+int
+__poll (fds, nfds, timeout)
+ struct pollfd *fds;
+ unsigned long int nfds;
+ int timeout;
+{
+ return poll (fds, nfds, timeout);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b875e7027a5c204c1156ada22553b234b6049de2
commit b875e7027a5c204c1156ada22553b234b6049de2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:57:30 2000 +0000
AIX pipe implementation.
diff --git a/sysdeps/unix/sysv/aix/pipe.c b/sysdeps/unix/sysv/aix/pipe.c
new file mode 100644
index 0000000..b3a7ec9
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/pipe.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__pipe (pipedes)
+ int pipedes[2];
+{
+ return pipe (pipedes);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=506a1fac7e306ced04ef937b651bd89384a5b4a7
commit 506a1fac7e306ced04ef937b651bd89384a5b4a7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:57:14 2000 +0000
Argh, must be a C file.
diff --git a/sysdeps/unix/sysv/aix/pipe.S b/sysdeps/unix/sysv/aix/pipe.S
deleted file mode 100644
index b3a7ec9..0000000
--- a/sysdeps/unix/sysv/aix/pipe.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <unistd.h>
-
-int
-__pipe (pipedes)
- int pipedes[2];
-{
- return pipe (pipedes);
-}
diff --git a/sysdeps/unix/sysv/aix/poll.S b/sysdeps/unix/sysv/aix/poll.S
deleted file mode 100644
index ae041a8..0000000
--- a/sysdeps/unix/sysv/aix/poll.S
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sys/poll.h>
-
-int
-__poll (fds, nfds, timeout)
- struct pollfd *fds;
- unsigned long int nfds;
- int timeout;
-{
- return poll (fds, nfds, timeout);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c83c51cec3545929b274884b8e72cf2bf7bfc9b4
commit c83c51cec3545929b274884b8e72cf2bf7bfc9b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:56:16 2000 +0000
AIX poll implementation.
diff --git a/sysdeps/unix/sysv/aix/poll.S b/sysdeps/unix/sysv/aix/poll.S
new file mode 100644
index 0000000..ae041a8
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/poll.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/poll.h>
+
+int
+__poll (fds, nfds, timeout)
+ struct pollfd *fds;
+ unsigned long int nfds;
+ int timeout;
+{
+ return poll (fds, nfds, timeout);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dbde296891f89b5264dcaaaf61d77db4b87c0a29
commit dbde296891f89b5264dcaaaf61d77db4b87c0a29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:55:27 2000 +0000
AIX pipe implementation.
diff --git a/sysdeps/unix/sysv/aix/pipe.S b/sysdeps/unix/sysv/aix/pipe.S
new file mode 100644
index 0000000..b3a7ec9
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/pipe.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__pipe (pipedes)
+ int pipedes[2];
+{
+ return pipe (pipedes);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b1d7b62c1917e3c8a4cf7491ec0b3a24f6690ca
commit 5b1d7b62c1917e3c8a4cf7491ec0b3a24f6690ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:52:10 2000 +0000
AIX if.h header.
diff --git a/sysdeps/unix/sysv/aix/net/if.h b/sysdeps/unix/sysv/aix/net/if.h
new file mode 100644
index 0000000..c950d35
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/net/if.h
@@ -0,0 +1,196 @@
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _NET_IF_H
+
+#define _NET_IF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+/* Standard interface flags. */
+enum
+ {
+ IFF_UP = 0x1, /* Interface is up. */
+#define IFF_UP IFF_UP
+ IFF_BROADCAST = 0x2, /* Broadcast address valid. */
+#define IFF_BROADCAST IFF_BROADCAST
+ IFF_DEBUG = 0x4, /* Turn on debugging. */
+#define IFF_DEBUG IFF_DEBUG
+ IFF_LOOPBACK = 0x8, /* Is a loopback net. */
+#define IFF_LOOPBACK IFF_LOOPBACK
+ IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */
+#define IFF_POINTOPOINT IFF_POINTOPOINT
+ IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */
+#define IFF_NOTRAILERS IFF_NOTRAILERS
+ IFF_RUNNING = 0x40, /* Resources allocated. */
+#define IFF_RUNNING IFF_RUNNING
+ IFF_NOARP = 0x80, /* No address resolution protocol. */
+#define IFF_NOARP IFF_NOARP
+ IFF_PROMISC = 0x100, /* Receive all packets. */
+#define IFF_PROMISC IFF_PROMISC
+
+ /* Not supported */
+ IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */
+#define IFF_ALLMULTI IFF_ALLMULTI
+
+ IFF_OACTIVE = 0x400, /* Transmission in progress. */
+#define IFF_OACTIVE IFF_OACTIVE
+ IFF_SIMPLEX = 0x800, /* Cannot hear own transmissions. */
+#define IFF_SIMPLEX IFF_SIMPLEX
+ IFF_DO_HW_LOOPBACK = 0x10000, /* Force loopback through hardware. */
+#define IFF_DO_HW_LOOPBACK IFF_DO_HW_LOOPBACK
+ IFF_ALLCAST = 0x20000, /* Global broadcast. */
+#define IFF_ALLCAST IFF_ALLCAST
+ IFF_BRIDGE = 0x40000, /* Receive all bridge packets. */
+#define IFF_BRIDGE IFF_BRIDGE
+ IFF_NOECHO = IFF_SIMPLEX, /* Reeives echo packets. */
+#define IFF_NOECHO IFF_NOECHO
+ };
+
+/* The ifaddr structure contains information about one address of an
+ interface. They are maintained by the different address families,
+ are allocated and attached when an address is set, and are linked
+ together so all addresses for an interface can be located. */
+
+struct ifaddr
+ {
+ struct sockaddr ifa_addr; /* Address of interface. */
+ union
+ {
+ struct sockaddr ifu_broadaddr;
+ struct sockaddr ifu_dstaddr;
+ } ifa_ifu;
+ struct sockaddr *ifa_netmask; /* Used to determine subnet. */
+ struct iface *ifa_ifp; /* Back-pointer to interface. */
+ struct ifaddr *ifa_next; /* Next address for interface. */
+ void (*ifa_rtrequest) (void);
+ struct rtentry *ifa_rt;
+ unsigned short int ifa_flags;
+ short int ifa_refcnt;
+ };
+
+#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */
+#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of link */
+
+/* Interface request structure used for socket ioctl's. All interface
+ ioctl's must have parameter definitions which begin with ifr_name.
+ The remainder may be interface specific. */
+
+struct ifreq
+ {
+#define IFHWADDRLEN 6
+#define IFNAMSIZ 16
+ union
+ {
+ char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "en0". */
+ } ifr_ifrn;
+
+ union
+ {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ struct sockaddr ifru_netmask;
+ struct sockaddr ifru_hwaddr;
+ short int ifru_flags;
+ int ifru_ivalue;
+ unsigned int ifru_mtu;
+ char ifru_slave[IFNAMSIZ]; /* Just fits the size */
+ __caddr_t ifru_data;
+ unsigned short int ifru_site6;
+ } ifr_ifru;
+ };
+
+/* Old AIX 3.1 version. */
+struct oifreq
+{
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union
+ {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ int ifru_flags;
+ int ifru_metric;
+ caddr_t ifru_data;
+ unsigned int ifru_mtu;
+ } ifr_ifru;
+ unsigned char reserved[8];
+};
+
+
+#define ifr_name ifr_ifrn.ifrn_name /* interface name */
+#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
+#define ifr_addr ifr_ifru.ifru_addr /* address */
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
+#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
+#define ifr_flags ifr_ifru.ifru_flags /* flags */
+#define ifr_metric ifr_ifru.ifru_ivalue /* metric */
+#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
+#define ifr_slave ifr_ifru.ifru_slave /* slave device */
+#define ifr_data ifr_ifru.ifru_data /* for use by interface */
+#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */
+#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */
+#define ifr_baudrate ifr_ifru.ifru_ivalue /* link bandwidth */
+#define ifr_qlen ifr_ifru.ifru_ivalue /* queue length */
+#define ifr_site6 ifr_ifru.ifru_site6 /* IPv6 site index */
+
+
+/* Structure used in SIOCGIFCONF request. Used to retrieve interface
+ configuration for machine (useful for programs which must know all
+ networks accessible). */
+
+struct ifconf
+ {
+ int ifc_len; /* Size of buffer. */
+ union
+ {
+ __caddr_t ifcu_buf;
+ struct ifreq *ifcu_req;
+ } ifc_ifcu;
+ };
+#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address. */
+#define ifc_req ifc_ifcu.ifcu_req /* Array of structures. */
+
+__BEGIN_DECLS
+
+/* Convert an interface name to an index, and vice versa. */
+
+extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
+extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
+
+/* Return a list of all interfaces and their indices. */
+
+struct if_nameindex
+ {
+ unsigned int if_index; /* 1, 2, ... */
+ char *if_name; /* null terminated name: "eth0", ... */
+ };
+
+extern struct if_nameindex *if_nameindex (void) __THROW;
+
+/* Free the data returned from if_nameindex. */
+
+extern void if_freenameindex (struct if_nameindex *__ptr) __THROW;
+
+__END_DECLS
+
+#endif /* net/if.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6507e4d339f0c300a7e8e3ebace9bde8a0a78ab
commit f6507e4d339f0c300a7e8e3ebace9bde8a0a78ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:50:46 2000 +0000
(struct timestruc_t): Define it here.
diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c
index 1277319..e39606f 100644
--- a/sysdeps/unix/sysv/aix/nanosleep.c
+++ b/sysdeps/unix/sysv/aix/nanosleep.c
@@ -20,14 +20,12 @@
#include <sys/time.h>
#include <sys/types.h>
-/* this is declared in <sys/time.h> not <time.h > */
-#if 0
struct timestruc_t
{
time_t tv_sec; /* seconds. */
suseconds_t tv_nsec; /* and nanoseconds. */
};
-#endif
+
extern int _nsleep (struct timestruc_t *rqtp, struct timestruc_t *rmtp);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ba15d4a7876ccb16f5696f2bb972c5d8564a60e
commit 7ba15d4a7876ccb16f5696f2bb972c5d8564a60e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:49:54 2000 +0000
AIX msync implementation.
diff --git a/sysdeps/unix/sysv/aix/msync.c b/sysdeps/unix/sysv/aix/msync.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/msync.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bef118cd0b1385da1b69a364fc7b4bca127623ab
commit bef118cd0b1385da1b69a364fc7b4bca127623ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 15:49:10 2000 +0000
AIX msgsnd implementation.
diff --git a/sysdeps/unix/sysv/aix/msgsnd.c b/sysdeps/unix/sysv/aix/msgsnd.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/msgsnd.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37a0c9123391a2404b52f86bfd619e08618e9ad8
commit 37a0c9123391a2404b52f86bfd619e08618e9ad8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 18 00:42:45 2000 +0000
AIX msgrcv implementation.
diff --git a/sysdeps/unix/sysv/aix/msgrcv.c b/sysdeps/unix/sysv/aix/msgrcv.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/msgrcv.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4d132bfdf9576760204a240920583f98483e803
commit a4d132bfdf9576760204a240920583f98483e803
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Apr 17 23:56:16 2000 +0000
(elf_machine_relplt): Removed, it's not needed.
(_dl_runtime_resolve): Fix \n for a comment, safe gp and not pc.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 19cdd24..a15b78d 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -198,9 +198,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
return NULL;
}
-/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */
-#define elf_machine_relplt elf_machine_rel
-
/* Define mips specific runtime resolver. The function __dl_runtime_resolve
is called from assembler function _dl_runtime_resolve which converts
special argument registers t7 ($15) and t8 ($24):
@@ -292,9 +289,8 @@ asm ("\n \
.ent _dl_runtime_resolve\n \
_dl_runtime_resolve:\n \
.set noreorder\n \
- # Save slot call pc.\n \
- # XXX: Is this ok? \
- move $3, $31\n \
+ # Save GP.\n \
+ move $3, $28\n \
# Modify t9 ($25) so as to point .cpload instruction.\n \
addu $25,8\n \
# Compute GP.\n \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09f057fe96bfc53a5cf267e94d98e132abe5ba90
commit 09f057fe96bfc53a5cf267e94d98e132abe5ba90
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:11:32 2000 +0000
AIX msgget implementation.
diff --git a/sysdeps/unix/sysv/aix/msgget.c b/sysdeps/unix/sysv/aix/msgget.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/msgget.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c5e1eba35e4645c2240e911d0fa88bbab364478
commit 5c5e1eba35e4645c2240e911d0fa88bbab364478
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:10:58 2000 +0000
AIX msgctl implementation.
diff --git a/sysdeps/unix/sysv/aix/msgctl.c b/sysdeps/unix/sysv/aix/msgctl.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/msgctl.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d51e90124fa82c1a7dd0a389e42c113e23735fa2
commit d51e90124fa82c1a7dd0a389e42c113e23735fa2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:10:17 2000 +0000
AIX mprotect implementation.
diff --git a/sysdeps/unix/sysv/aix/mprotect.c b/sysdeps/unix/sysv/aix/mprotect.c
new file mode 100644
index 0000000..30374bb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/mprotect.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/mman.h>
+
+int
+__mprotect (void *addr, size_t len, int prot)
+{
+ return mprotect (addr, len, prot);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0b050986bc1d182be94aaf4e744293a7319a838
commit b0b050986bc1d182be94aaf4e744293a7319a838
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:09:34 2000 +0000
AIX implementation of mknod.
diff --git a/sysdeps/unix/sysv/aix/mknod.c b/sysdeps/unix/sysv/aix/mknod.c
new file mode 100644
index 0000000..d724595
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/mknod.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/stat.h>
+
+int
+__mknod (path, mode, device)
+ const char *path;
+ mode_t mode;
+ dev_t device;
+{
+ return mknod (path, mode, device);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb1360eb6ed05bfe74881b16859fa551ae5f591f
commit fb1360eb6ed05bfe74881b16859fa551ae5f591f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:07:54 2000 +0000
AIX mkdir implementation.
diff --git a/sysdeps/unix/sysv/aix/mkdir.c b/sysdeps/unix/sysv/aix/mkdir.c
new file mode 100644
index 0000000..f7c358a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/mkdir.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/stat.h>
+
+int
+__mkdir (const char *name, mode_t mode)
+{
+ return mkdir (name, mode);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae2e40d04d6bc304debc6ff2572646465a9010fe
commit ae2e40d04d6bc304debc6ff2572646465a9010fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:06:41 2000 +0000
AIX madvise implementation.
diff --git a/sysdeps/unix/sysv/aix/madvise.c b/sysdeps/unix/sysv/aix/madvise.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/madvise.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f8f1d154905dec6cbaa92b7245f35e3c6bde8eb
commit 2f8f1d154905dec6cbaa92b7245f35e3c6bde8eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:05:45 2000 +0000
Uncomment STX_LINK and STX_64 definition.
diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c
index 426b594..4741da0 100644
--- a/sysdeps/unix/sysv/aix/lxstat64.c
+++ b/sysdeps/unix/sysv/aix/lxstat64.c
@@ -19,10 +19,8 @@
#include <assert.h>
#include <sys/stat.h>
-/* these are #define'd in <sys/stat.h> why #define them again?
#define STX_LINK 0x01
#define STX_64 0x08
- */
extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ef28d0f3a3cfbe9001ed8c6308d12e420f26d25
commit 9ef28d0f3a3cfbe9001ed8c6308d12e420f26d25
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:05:21 2000 +0000
Uncomment STX_LINK definition.
diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c
index 2edaf72..58d8710 100644
--- a/sysdeps/unix/sysv/aix/lxstat.c
+++ b/sysdeps/unix/sysv/aix/lxstat.c
@@ -19,9 +19,7 @@
#include <assert.h>
#include <sys/stat.h>
-/* this is #define'd in <sys/stat.h> - why #define it again?
#define STX_LINK 0x01
- */
extern int statx (const char *pathname, struct stat *st, int len, int cmd);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5a39871bca6ed1fa0ab9283895d7511094895ae
commit d5a39871bca6ed1fa0ab9283895d7511094895ae
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:04:36 2000 +0000
AIX link implementation.
diff --git a/sysdeps/unix/sysv/aix/link.c b/sysdeps/unix/sysv/aix/link.c
new file mode 100644
index 0000000..bb650cc
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/link.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__link (from, to)
+ const char *from;
+ const char *to;
+{
+ return link (from, to);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cce7a16e8e34a13c9ecc9d9f7ae126cfeb9c61e6
commit cce7a16e8e34a13c9ecc9d9f7ae126cfeb9c61e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 23:03:44 2000 +0000
Add copyright.
diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c
index 64bc8cd..f736e28 100644
--- a/sysdeps/unix/sysv/aix/brk.c
+++ b/sysdeps/unix/sysv/aix/brk.c
@@ -1,4 +1,21 @@
-/* This is a system call. We only have to provide the wrapper. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
int
diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c
index 4d500c5..e32b4fd 100644
--- a/sysdeps/unix/sysv/aix/close.c
+++ b/sysdeps/unix/sysv/aix/close.c
@@ -1,4 +1,21 @@
-/* This is a system call. We only have to provide the wrapper. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
int
diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c
index 598755c..55e2823 100644
--- a/sysdeps/unix/sysv/aix/euidaccess.c
+++ b/sysdeps/unix/sysv/aix/euidaccess.c
@@ -1,3 +1,23 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define ACC_SELF 0
+
int
euidaccess (const char *name, int type)
{
diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c
index ea1b67d..968dc21 100644
--- a/sysdeps/unix/sysv/aix/execve.c
+++ b/sysdeps/unix/sysv/aix/execve.c
@@ -1,4 +1,21 @@
-/* This is a system call. We only have to provide the wrapper. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
int
diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c
index dfe366c..861cff3 100644
--- a/sysdeps/unix/sysv/aix/kill.c
+++ b/sysdeps/unix/sysv/aix/kill.c
@@ -1,4 +1,21 @@
-/* This is a system call. We only have to provide the wrapper. */
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f16cfe420d96344cb145d12c2fc783694102086
commit 9f16cfe420d96344cb145d12c2fc783694102086
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:49:17 2000 +0000
Define ID_REAL.
diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c
index ca08865..6f2df60 100644
--- a/sysdeps/unix/sysv/aix/getgid.c
+++ b/sysdeps/unix/sysv/aix/getgid.c
@@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
-#include <sys/id.h>
+
+#define ID_REAL 2
extern gid_t getgidx (int which);
diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c
index 4bc1c8a..8d5f070 100644
--- a/sysdeps/unix/sysv/aix/getuid.c
+++ b/sysdeps/unix/sysv/aix/getuid.c
@@ -17,8 +17,8 @@
Boston, MA 02111-1307, USA. */
#include <unistd.h>
-/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
-#include <sys/id.h>
+
+#define ID_REAL 2
extern uid_t getuidx (int which);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2757d9621c85bdcdac5f9f670c300df9637648c
commit c2757d9621c85bdcdac5f9f670c300df9637648c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:48:28 2000 +0000
AIX getrusage implementation.
diff --git a/sysdeps/unix/sysv/aix/getrusage.c b/sysdeps/unix/sysv/aix/getrusage.c
new file mode 100644
index 0000000..aa80ade
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getrusage.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/resource.h>
+
+int
+__getrusage (who, usage)
+ enum __rusage_who who;
+ struct rusage *usage;
+{
+ return getrusage (who, usage);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94fd03c6465efa5bf666f1a754b826ba17320a0b
commit 94fd03c6465efa5bf666f1a754b826ba17320a0b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:47:33 2000 +0000
AIX getrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/aix/getrlimit64.c b/sysdeps/unix/sysv/aix/getrlimit64.c
new file mode 100644
index 0000000..8f46c5f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getrlimit64.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/resource.h>
+
+int
+__getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
+{
+ return getrlimit64 (resource, rlimits);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fc3097f7da808aad8fa1225c58dea77a79a0444
commit 5fc3097f7da808aad8fa1225c58dea77a79a0444
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:45:39 2000 +0000
AIX getrlimit implementation.
diff --git a/sysdeps/unix/sysv/aix/getrlimit.c b/sysdeps/unix/sysv/aix/getrlimit.c
new file mode 100644
index 0000000..2658f7e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getrlimit.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/resource.h>
+
+int
+__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
+{
+ return getrlimit (resource, rlimits);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7dd245c59d78d57f83566fb51b4426f32e98164
commit e7dd245c59d78d57f83566fb51b4426f32e98164
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:43:49 2000 +0000
AIX getpriority implementation.
diff --git a/sysdeps/unix/sysv/aix/getpriority.c b/sysdeps/unix/sysv/aix/getpriority.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getpriority.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56e4a6964ec31a2c945509e048e1f1c91738f4c2
commit 56e4a6964ec31a2c945509e048e1f1c91738f4c2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:43:14 2000 +0000
AIX gethostname implementation.
diff --git a/sysdeps/unix/sysv/aix/gethostname.c b/sysdeps/unix/sysv/aix/gethostname.c
new file mode 100644
index 0000000..b213c6f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/gethostname.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__gethostname (name, len)
+ char *name;
+ size_t len;
+{
+ return gethostname (name, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf76bf245d616a86c11c30294d84e84e4b033014
commit cf76bf245d616a86c11c30294d84e84e4b033014
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:41:47 2000 +0000
AIX getgroups implementation.
diff --git a/sysdeps/unix/sysv/aix/getgroups.c b/sysdeps/unix/sysv/aix/getgroups.c
new file mode 100644
index 0000000..37ace34
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getgroups.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__getgroups (int size, gid_t list[])
+{
+ return getgroups (size, list);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b21b9d8cc479c1b1560b502307292695b8f3502d
commit b21b9d8cc479c1b1560b502307292695b8f3502d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:37:55 2000 +0000
AIX fchmod implementation.
diff --git a/sysdeps/unix/sysv/aix/fchmod.c b/sysdeps/unix/sysv/aix/fchmod.c
new file mode 100644
index 0000000..49fc92d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fchmod.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/stat.h>
+
+int
+__fchmod (int fd, mode_t mode)
+{
+ return fchmod (fd, mode);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=598e6ade517d888d50d3429d03c494b61f65f6d1
commit 598e6ade517d888d50d3429d03c494b61f65f6d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:37:08 2000 +0000
AIX fchdir implementation.
diff --git a/sysdeps/unix/sysv/aix/fchdir.c b/sysdeps/unix/sysv/aix/fchdir.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fchdir.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d4f87b48e3a97d61eca7ab383d90792f081e84a
commit 4d4f87b48e3a97d61eca7ab383d90792f081e84a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:15:47 2000 +0000
AIX __libc_dlsym implementation.
diff --git a/sysdeps/unix/sysv/aix/dl-sym.c b/sysdeps/unix/sysv/aix/dl-sym.c
new file mode 100644
index 0000000..7e10ba1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-sym.c
@@ -0,0 +1,9 @@
+/* XXX The implementation of dlopen should somehow use the __loadx system
+ call but how? */
+#include <dlfcn.h>
+
+void *
+__libc_dlsym (void *handle, const char *name)
+{
+ return (void *) 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4f994c66b752d8d43777b4dbd860fae1e1f9700
commit b4f994c66b752d8d43777b4dbd860fae1e1f9700
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:14:50 2000 +0000
AIX _dl_open implementation.
diff --git a/sysdeps/unix/sysv/aix/dl-open.c b/sysdeps/unix/sysv/aix/dl-open.c
new file mode 100644
index 0000000..50fd712
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-open.c
@@ -0,0 +1,9 @@
+/* XXX The implementation of dlopen should somehow use the __loadx system
+ call but how? */
+#include <dlfcn.h>
+
+void *
+__libc_dlopen (const char *file)
+{
+ return (void *) 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0778cbcde47c9626b94c04c41a0aaa57459ea0d4
commit 0778cbcde47c9626b94c04c41a0aaa57459ea0d4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:13:12 2000 +0000
AIX _dl_close implementation.
diff --git a/sysdeps/unix/sysv/aix/dl-close.c b/sysdeps/unix/sysv/aix/dl-close.c
new file mode 100644
index 0000000..a9a492a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/dl-close.c
@@ -0,0 +1,9 @@
+/* XXX The implementation of dlopen should somehow use the __loadx system
+ call but how? */
+#include <dlfcn.h>
+
+int
+__libc_dlclose (void *handle)
+{
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25f435284af63e8106dde282f5f231dfa09c838c
commit 25f435284af63e8106dde282f5f231dfa09c838c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:12:24 2000 +0000
AIX creat implementation.
diff --git a/sysdeps/unix/sysv/aix/creat.c b/sysdeps/unix/sysv/aix/creat.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/creat.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93db91a4626fd0cfc9fe93eeb471f4686ac14aa6
commit 93db91a4626fd0cfc9fe93eeb471f4686ac14aa6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:07:21 2000 +0000
AIX chroot implementation.
diff --git a/sysdeps/unix/sysv/aix/chroot.c b/sysdeps/unix/sysv/aix/chroot.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/chroot.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5ad81ec7ca21f94d10c674517c4304b8b11abcc9
commit 5ad81ec7ca21f94d10c674517c4304b8b11abcc9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:06:36 2000 +0000
AIX chmod implementation.
diff --git a/sysdeps/unix/sysv/aix/chmod.c b/sysdeps/unix/sysv/aix/chmod.c
new file mode 100644
index 0000000..dbbe84e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/chmod.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/stat.h>
+
+int
+__chmod (const char *path, mode_t mode)
+{
+ return chmod (path, mode);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=516bca2bdac665ed11085d24d87ec2b65f4270f8
commit 516bca2bdac665ed11085d24d87ec2b65f4270f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:05:34 2000 +0000
AIX chdir implementation.
diff --git a/sysdeps/unix/sysv/aix/chdir.c b/sysdeps/unix/sysv/aix/chdir.c
new file mode 100644
index 0000000..17d46f7
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/chdir.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__chdir (const char *path)
+{
+ return chdir (path);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfc29f057658a9ec9c6732aa15116c084502803a
commit cfc29f057658a9ec9c6732aa15116c084502803a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:03:40 2000 +0000
termios definitions for AIX.
diff --git a/sysdeps/unix/sysv/aix/bits/termios.h b/sysdeps/unix/sysv/aix/bits/termios.h
new file mode 100644
index 0000000..96e65d1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/termios.h
@@ -0,0 +1,189 @@
+/* termios type and macro definitions. AIX version.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 16
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[NCCS]; /* control characters */
+ };
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VEOL 5
+#define VSTART 7
+#define VSTOP 8
+#define VSUSP 9
+#define VMIN 4
+#define VTIME 5
+#define VEOL2 6
+#define VDSUSP 10
+#define VREPRINT 11
+#define VDISCARD 12
+#define VWERSE 13
+#define VWERASE VWERSE
+#define VLNEXT 14
+#define VSTRT VSTART
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#define IUCLC 0004000
+#define IXANY 0010000
+#define IMAXBEL 0200000
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define OLCUC 0000002
+#define ONLCR 0000004
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+#if defined __USE_MISC || defined __USE_XOPEN
+# define CRDLY 0001400
+# define CR0 0000000
+# define CR1 0000400
+# define CR2 0001000
+# define CR3 0001400
+# define TABDLY 0006000
+# define TAB0 0000000
+# define TAB1 0002000
+# define TAB2 0004000
+# define TAB3 0006000
+# define BSDLY 0010000
+# define BS0 0000000
+# define BS1 0010000
+# define FFDLY 0020000
+# define FF0 0000000
+# define FF1 0020000
+# define NLDLY 0040000
+# define NL0 0000000
+# define NL1 0040000
+#endif
+
+#define VTDLY 0100000
+#define VT0 0000000
+#define VT1 0100000
+
+/* c_cflag bit meaning */
+#ifdef __USE_MISC
+# define CBAUD 0000017
+#endif
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#ifdef __USE_MISC
+# define EXTA B19200
+# define EXTB B38400
+#endif
+#define CSIZE 0000060
+#define CS5 0000000
+#define CS6 0000020
+#define CS7 0000040
+#define CS8 0000060
+#define CSTOPB 0000100
+#define CREAD 0000200
+#define PARENB 0000400
+#define PARODD 0001000
+#define HUPCL 0002000
+#define CLOCAL 0004000
+#ifdef __USE_MISC
+# define CIBAUD 000003600000 /* input baud rate (not used) */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001
+#define ICANON 0000002
+#if defined __USE_MISC || defined __USE_XOPEN
+# define XCASE 0000004
+#endif
+#define ECHO 0000010
+#define ECHOE 0000020
+#define ECHOK 0000040
+#define ECHONL 0000100
+#define NOFLSH 0000200
+#define TOSTOP 0200000
+#ifdef __USE_MISC
+# define ECHOCTL 0400000
+# define ECHOPRT 01000000
+# define ECHOKE 02000000
+# define FLUSHO 004000000
+# define PENDIN 04000000000
+#endif
+#define IEXTEN 010000000
+
+/* tcflow() and TCXONC use these */
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+/* tcflush() and TCFLSH use these */
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+/* tcsetattr uses these */
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f22183dbd6ad00ab5c96562f163f0b251e5e17a6
commit f22183dbd6ad00ab5c96562f163f0b251e5e17a6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 22:02:26 2000 +0000
poll definitions for AIX.
diff --git a/sysdeps/unix/sysv/aix/bits/poll.h b/sysdeps/unix/sysv/aix/bits/poll.h
new file mode 100644
index 0000000..431c8a6
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/poll.h
@@ -0,0 +1,43 @@
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x0001 /* There is data to read. */
+#define POLLPRI 0x0002 /* There is urgent data to read. */
+#define POLLOUT 0x0004 /* Writing now will not block. */
+
+#ifdef __USE_XOPEN
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x0010 /* Normal data may be read. */
+# define POLLRDBAND 0x0020 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x0040 /* Priority data may be written. */
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x4000 /* Error condition. */
+#define POLLHUP 0x2000 /* Hung up. */
+#define POLLNVAL 0x8000 /* Invalid polling request. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b54e59028f791e828d0309c42e6bbb3f4f5a9105
commit b54e59028f791e828d0309c42e6bbb3f4f5a9105
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:28:18 2000 +0000
AIX ioctl definitions.
diff --git a/sysdeps/unix/sysv/aix/bits/ioctl-types.h b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
new file mode 100644
index 0000000..ecc4cac
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/ioctl-types.h
@@ -0,0 +1,92 @@
+/* Structure types for pre-termios terminal ioctls. AIX version.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead
+"
+#endif
+
+/* Constants for use with `ioctl'. */
+#define TIOC ('T' << 8)
+#define TCGETS (TIOC | 1)
+#define TCSETS (TIOC | 2)
+#define TCSETSW (TIOC | 3)
+#define TCSETSF (TIOC | 4)
+#define TCGETA (TIOC | 5)
+#define TCSETA (TIOC | 6)
+#define TCSETAW (TIOC | 7)
+#define TCSETAF (TIOC | 8)
+#define TCSBRK (TIOC | 9)
+#define TCSBREAK (TIOC | 10)
+#define TCXONC (TIOC | 11)
+#define TCFLSH (TIOC | 12)
+#define TCGLEN (TIOC | 13)
+#define TCSLEN (TIOC | 14)
+#define TCSAK (TIOC | 15)
+#define TCQSAK (TIOC | 16)
+#define TCTRUST (TIOC | 17)
+#define TCQTRUST (TIOC | 18)
+#define TCSMAP (TIOC | 19)
+#define TCGMAP (TIOC | 20)
+#define TCKEP (TIOC | 21)
+#define TCGSAK (TIOC | 22)
+#define TCLOOP (TIOC | 23)
+#define TCVPD (TIOC | 24)
+#define TCREG (TIOC | 25)
+#define TCGSTATUS (TIOC | 26)
+#define TCSCONTROL (TIOC | 27)
+#define TCSCSMAP (TIOC | 28)
+#define TCGCSMAP (TIOC | 29)
+#define TCMGR TCSAK
+#define TCQMGR TCQSAK
+#define TIONREAD FIONREAD
+
+
+
+struct winsize
+{
+ unsigned short int ws_row;
+ unsigned short int ws_col;
+ unsigned short int ws_xpixel;
+ unsigned short int ws_ypixel;
+};
+
+#define NCC 8
+struct termio
+{
+ unsigned short int c_iflag; /* input mode flags */
+ unsigned short int c_oflag; /* output mode flags */
+ unsigned short int c_cflag; /* control mode flags */
+ unsigned short int c_lflag; /* local mode flags */
+ char c_line; /* line discipline */
+ unsigned char c_cc[NCC]; /* control characters */
+};
+
+/* modem lines */
+#define TIOCM_LE 0x001
+#define TIOCM_DTR 0x002
+#define TIOCM_RTS 0x004
+#define TIOCM_ST 0x008
+#define TIOCM_SR 0x010
+#define TIOCM_CTS 0x020
+#define TIOCM_CAR 0x040
+#define TIOCM_RNG 0x080
+#define TIOCM_DSR 0x100
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RI TIOCM_RNG
diff --git a/sysdeps/unix/sysv/aix/bits/ioctls.h b/sysdeps/unix/sysv/aix/bits/ioctls.h
new file mode 100644
index 0000000..39e093b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/ioctls.h
@@ -0,0 +1,248 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
+
+
+#define IOCPARM_MASK 0x7f /* parameters must be < 128 bytes */
+#define IOC_VOID 0x20000000 /* no parameters */
+#define IOC_OUT 0x40000000 /* copy out parameters */
+#define IOC_IN (0x40000000<<1) /* copy in parameters */
+#define IOC_INOUT (IOC_IN|IOC_OUT)
+#define _IO(x,y) (IOC_VOID|(x<<8)|y)
+#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
+
+#define TIOCGETD _IOR('t', 0, int) /* get line discipline */
+#define TIOCSETD _IOW('t', 1, int) /* set line discipline */
+#define TIOCHPCL _IO('t', 2) /* hang up on last close */
+#define TIOCMODG _IOR('t', 3, int) /* get modem control state */
+#define TIOCMODS _IOW('t', 4, int) /* set modem control state */
+#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
+#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */
+#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty */
+#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */
+#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */
+#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */
+#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */
+#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */
+#define TANDEM 0x00000001 /* send stopc on out q full */
+#define CBREAK 0x00000002 /* half-cooked mode */
+#define LCASE 0x00000004 /* simulate lower case */
+#define CRMOD 0x00000010 /* map \r to \r\n on output */
+#define RAW 0x00000020 /* no i/o processing */
+#define ODDP 0x00000040 /* get/send odd parity */
+#define EVENP 0x00000080 /* get/send even parity */
+#define ANYP 0x000000c0 /* get any parity/send none */
+#define CRDELAY 0x00000300 /* \r delay */
+#define TBDELAY 0x00000c00 /* horizontal tab delay */
+#define XTABS 0x00000c00 /* expand tabs on output */
+#define BSDELAY 0x00001000 /* \b delay */
+#define VTDELAY 0x00002000 /* vertical tab delay */
+#define NLDELAY 0x0000c000 /* \n delay */
+#define NL2 0x00008000 /* vt05 */
+#define NL3 0x0000c000
+#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY)
+#define PRTERA 0x00020000 /* \ ... / erase */
+#define CRTERA 0x00040000 /* " \b " to wipe out char */
+#define TILDE 0x00080000 /* hazeltine tilde kludge */
+#define LITOUT 0x00200000 /* literal output */
+#define CRTBS 0x00400000 /* do backspacing for crt */
+#define MDMBUF 0x00800000 /* dtr pacing */
+#define NOHANG 0x01000000 /* no SIGHUP on carrier drop */
+#define L001000 0x02000000
+#define CRTKIL 0x04000000 /* kill line with " \b " */
+#define PASS8 0x08000000
+#define CTLECH 0x10000000 /* echo control chars as ^X */
+#define DECCTQ 0x40000000 /* only ^Q starts after ^S */
+#define NOFLUSH 0x80000000 /* no output flush on signal */
+
+
+/* SYS V REL. 4 PTY IOCTLs */
+#define UNLKPT _IO('t',70) /* unlock slave pty */
+#define ISPTM _IO('t',71) /* ret. maj+min of pty master */
+#define ISPTS _IO('t',73) /* return maj+min of slave */
+#define GRTPT _IO('t',74) /* grantpt slave pty*/
+#define RLOGIND _IO('t',75) /* for rlogind protocol in ptydd */
+#define TELNETDP _IO('t',76) /* for telnetd protocol in ptydd */
+
+#define TIOCCONS _IOW('t', 98, int) /* become virtual console */
+#define TIOCGSID _IOR('t', 72, int) /* get the tty session id */
+
+ /* locals, from 127 down */
+#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
+#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */
+#define TIOCLSET _IOW('t', 125, int) /* set entire mode word */
+#define TIOCLGET _IOR('t', 124, int) /* get local modes */
+#define LCRTBS (CRTBS>>16)
+#define LPRTERA (PRTERA>>16)
+#define LCRTERA (CRTERA>>16)
+#define LTILDE (TILDE>>16)
+#define LMDMBUF (MDMBUF>>16)
+#define LLITOUT (LITOUT>>16)
+#define LTOSTOP (TOSTOP>>16)
+#define LFLUSHO (FLUSHO>>16)
+#define LNOHANG (NOHANG>>16)
+#define LCRTKIL (CRTKIL>>16)
+#define LPASS8 (PASS8>>16)
+#define LCTLECH (CTLECH>>16)
+#define LPENDIN (PENDIN>>16)
+#define LDECCTQ (DECCTQ>>16)
+#define LNOFLSH (NOFLUSH>>16)
+#define TIOCSBRK _IO('t', 123) /* set break bit */
+#define TIOCCBRK _IO('t', 122) /* clear break bit */
+#define TIOCSDTR _IO('t', 121) /* set data terminal ready */
+#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */
+#define TIOCGPGRP _IOR('t', 119, int) /* get process group */
+#define TIOCSPGRP _IOW('t', 118, int) /* set process gorup */
+#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars */
+#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars */
+#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
+#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */
+#define TIOCNOTTY _IO('t', 113) /* void tty association */
+#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */
+#define TIOCPKT_DATA 0x00 /* data packet */
+#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
+#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
+#define TIOCPKT_STOP 0x04 /* stop output */
+#define TIOCPKT_START 0x08 /* start output */
+#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
+#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
+#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
+#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
+#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */
+#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */
+#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */
+#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */
+#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */
+#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
+#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
+#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */
+/* SLIP (Serial Line IP) ioctl's */
+#define SLIOCGUNIT _IOR('t', 101, int) /* get slip unit number */
+#define SLIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
+#define SLIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
+#define SLIOCSATTACH _IOWR('t', 91, int) /* Attach slip i.f. to tty */
+#define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */
+
+#define OTTYDISC 0 /* old, v7 std tty driver */
+#define NETLDISC 1 /* line discip for berk net */
+#define NTTYDISC 2 /* new tty discipline */
+#define TABLDISC 3 /* tablet discipline */
+#define SLIPDISC 4 /* serial IP discipline */
+
+#define FIOCLEX _IO('f', 1) /* set close on exec */
+#define FIONCLEX _IO('f', 2) /* clear close on exec */
+/* another local */
+
+#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */
+#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */
+#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */
+
+#define FIOSETOWN _IOW('f', 124, int) /* set owner */
+#define FIOGETOWN _IOR('f', 123, int) /* get owner */
+#define FIOASYNCQX _IOW('f', 122, int) /* set/clear async queueing */
+
+/* socket i/o controls */
+#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
+#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
+#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
+#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
+#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
+#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
+#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
+
+#define SIOCADDRT (int)_IOW('r', 10, struct ortentry) /* add route */
+#define SIOCDELRT (int)_IOW('r', 11, struct ortentry) /* delete route */
+
+#define SIOCSIFADDR (int)_IOW('i', 12, struct oifreq) /* set ifnet address */
+#define OSIOCGIFADDR (int)_IOWR('i',13, struct oifreq) /* get ifnet address */
+#define SIOCGIFADDR (int)_IOWR('i',33, struct oifreq) /* get ifnet address */
+#define SIOCSIFDSTADDR (int)_IOW('i', 14, struct oifreq) /* set p-p address */
+#define OSIOCGIFDSTADDR (int)_IOWR('i',15, struct oifreq) /* get p-p address */
+#define SIOCGIFDSTADDR (int)_IOWR('i',34, struct oifreq) /* get p-p address */
+#define SIOCSIFFLAGS (int)_IOW('i', 16, struct oifreq) /* set ifnet flags */
+#define SIOCGIFFLAGS (int)_IOWR('i',17, struct oifreq) /* get ifnet flags */
+#define OSIOCGIFBRDADDR (int)_IOWR('i',18, struct oifreq) /* get broadcast addr */
+#define SIOCGIFBRDADDR (int)_IOWR('i',35, struct oifreq) /* get broadcast addr */
+#define SIOCSIFBRDADDR (int)_IOW('i',19, struct oifreq) /* set broadcast addr */
+#define OSIOCGIFCONF (int)_IOWR('i',20, struct ifconf) /* get ifnet list */
+#define CSIOCGIFCONF (int)_IOWR('i',36, struct ifconf) /* get ifnet list */
+#define SIOCGIFCONF (int)_IOWR('i',69, struct ifconf) /* get ifnet list */
+#define OSIOCGIFNETMASK (int)_IOWR('i',21, struct oifreq) /* get net addr mask */
+#define SIOCGIFNETMASK (int)_IOWR('i',37, struct oifreq) /* get net addr mask */
+#define SIOCSIFNETMASK (int)_IOW('i',22, struct oifreq) /* set net addr mask */
+#define SIOCGIFMETRIC (int)_IOWR('i',23, struct oifreq) /* get IF metric */
+#define SIOCSIFMETRIC (int)_IOW('i',24, struct oifreq) /* set IF metric */
+#define SIOCDIFADDR (int)_IOW('i',25, struct oifreq) /* delete IF addr */
+#define SIOCAIFADDR (int)_IOW('i',26, struct ifaliasreq) /* add/chg IF alias */
+#define SIOCSIFSUBCHAN (int)_IOW('i',27, struct oifreq) /* set subchannel adr.*/
+#define SIOCSIFNETDUMP (int)_IOW('i',28, struct oifreq) /* set netdump fastwrt*/
+
+#define SIOCSARP (int)_IOW('i', 30, struct arpreq) /* set arp entry */
+#define OSIOCGARP (int)_IOWR('i',31, struct arpreq) /* get arp entry */
+#define SIOCGARP (int)_IOWR('i',38, struct arpreq) /* get arp entry */
+#define SIOCDARP (int)_IOW('i', 32, struct arpreq) /* delete arp entry */
+
+#define SIOCSIFOPTIONS (int)_IOW('i', 41, struct oifreq) /* set ifnet options */
+#define SIOCGIFOPTIONS (int)_IOWR('i',42, struct oifreq) /* get ifnet options */
+#define SIOCADDMULTI (int)_IOW('i', 49, struct ifreq) /* add multicast addr */
+#define SIOCDELMULTI (int)_IOW('i', 50, struct ifreq) /* del multicast addr */
+#define SIOCGETVIFCNT (int)_IOWR('u', 51, struct sioc_vif_req)/* vif pkt cnt */
+#define SIOCGETSGCNT (int)_IOWR('u', 52, struct sioc_sg_req) /* s,g pkt cnt */
+
+#define SIOCADDNETID (int)_IOW('i',87, struct oifreq) /* set netids */
+#define SIOCSIFMTU (int)_IOW('i',88, struct oifreq) /* set mtu */
+#define SIOCGIFMTU (int)_IOWR('i',86, struct oifreq) /* get mtu */
+
+#define SIOCSNETOPT (int)_IOW('i', 90, struct optreq) /* set network option */
+#define SIOCGNETOPT (int)_IOWR('i', 91, struct optreq) /* get network option */
+#define SIOCDNETOPT (int)_IOWR('i', 92, struct optreq) /* set default */
+
+#define SIOCSX25XLATE (int)_IOW('i', 99, struct oifreq) /* set xlate tab */
+#define SIOCGX25XLATE (int)_IOWR('i',100, struct oifreq) /* get xlate tab */
+#define SIOCDX25XLATE (int)_IOW('i', 101, struct oifreq) /* delete xlate tab */
+
+#define SIOCIFDETACH (int)_IOW('i', 102, struct ifreq) /* detach an ifnet */
+#define SIOCIFATTACH (int)_IOW('i', 103, struct ifreq) /* attach an ifnet */
+
+#define SIOCGNMTUS (int)_IO('i',110) /* get NMTUs */
+#define SIOCGETMTUS (int)_IO('i',111) /* get common_mtus */
+#define SIOCADDMTU (int)_IOW('i',112, int) /* add mtu */
+#define SIOCDELMTU (int)_IOW('i',113, int) /* delete mtu */
+
+#define SIOCGIFGIDLIST (int)_IO('i', 104) /* get gidlist */
+#define SIOCSIFGIDLIST (int)_IO('i', 105) /* set gidlist */
+
+#define SIOCGSIZIFCONF (int)_IOR('i', 106, int) /* get size for SIOCGIFCONF */
+
+#define SIOCIF_ATM_UBR (int)_IOW('i',120,struct ifreq) /* set ubr rate */
+#define SIOCIF_ATM_SNMPARP (int)_IOW('i',121,struct ifreq) /* atm snmp arp */
+#define SIOCIF_ATM_IDLE (int)_IOW('i',122,struct ifreq) /* set idle time */
+#define SIOCIF_ATM_DUMPARP (int)_IOW('i',123,struct ifreq) /* atm dump arp */
+#define SIOCIF_ATM_SVC (int)_IOW('i',124,struct ifreq) /* atmif init */
+#define SIOCIF_ATM_DARP (int)_IOW('i',125,struct ifreq) /* del atmarp */
+#define SIOCIF_ATM_GARP (int)_IOW('i',126,struct ifreq) /* get atmarp */
+#define SIOCIF_ATM_SARP (int)_IOW('i',127,struct ifreq) /* set atmarp */
+
+#define SIOCGISNO (int)_IOWR('i',107, struct oifreq) /* get IF network options */
+#define SIOCSISNO (int)_IOW('i', 108, struct oifreq) /* set IF network options */
+#define SIOCGIFBAUDRATE (int)_IOWR('i', 109, struct oifreq) /* get ifnet's if_baudrate */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f203842160356e977958270e1c21fbb7cba2150
commit 4f203842160356e977958270e1c21fbb7cba2150
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Apr 17 21:22:59 2000 +0000
2000-04-17 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Optimize a bit
as suggested by Ulrich Drepper.
(__dl_runtime_resolve): Remove unused variable, initialize sym
directly.
(RTLD_START): Document OFFSET_GP_GOT.
(OFFSET_GP_GOT): New magic value.
(elf_mips_got_from_gpreg): Use OFFSET_GP_GOT.
(elf_machine_got_rel): Only declare strtab if needed.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 965cef9..19cdd24 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -18,6 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/* FIXME: Profiling of shared libraries is not implemented yet. */
#ifndef dl_machine_h
#define dl_machine_h
@@ -31,6 +32,10 @@
#error ENTRY_POINT needs to be defined for MIPS.
#endif
+/* The offset of gp from GOT might be system-dependent. It's set by
+ ld. The same value is also */
+#define OFFSET_GP_GOT 0x7ff0
+
#ifndef _RTLD_PROLOGUE
# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
"\n\t.ent " #entry \
@@ -95,7 +100,7 @@ static inline ElfW(Addr) *
elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
{
/* FIXME: the offset of gp from GOT may be system-dependent. */
- return (ElfW(Addr) *) (gpreg - 0x7ff0);
+ return (ElfW(Addr) *) (gpreg - OFFSET_GP_GOT);
}
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
@@ -207,7 +212,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
_dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
have to use our own version because of the way the got section is
treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */
-
+
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
generated by the gnu linker. */ \
@@ -235,12 +240,9 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
= (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
- const ElfW(Sym) *sym; \
- ElfW(Addr) funcaddr; \
+ const ElfW(Sym) *sym = &symtab[sym_index]; \
ElfW(Addr) value; \
\
- /* Look up the symbol's run-time value. */ \
- sym = &symtab[sym_index]; \
/* FIXME: The symbol versioning stuff is not tested yet. */ \
if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \
{ \
@@ -279,7 +281,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* Apply the relocation with that value. */ \
*(got + local_gotno + sym_index - gotsym) = value; \
\
- return value; \
+ return value; \
} \
\
asm ("\n \
@@ -291,6 +293,7 @@ asm ("\n \
_dl_runtime_resolve:\n \
.set noreorder\n \
# Save slot call pc.\n \
+ # XXX: Is this ok? \
move $3, $31\n \
# Modify t9 ($25) so as to point .cpload instruction.\n \
addu $25,8\n \
@@ -362,6 +365,7 @@ _RTLD_PROLOGUE(ENTRY_POINT)\
# the address of the dynamic structure. Though MIPS ABI\n\
# doesn't say nothing about this, I emulate this here.\n\
la $4, _DYNAMIC\n\
+ # Subtract OFFSET_GP_GOT\n\
sw $4, -0x7ff0($28)\n\
move $4, $29\n\
subu $29, 16\n\
@@ -485,7 +489,9 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n, symidx;
+#ifndef RTLD_BOOTSTRAP
const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+#endif
/* This function is loaded in dl-reloc as a nested function and can
therefore access the variable scope from _dl_relocate_object. */
#ifdef RTLD_BOOTSTRAP
@@ -531,12 +537,12 @@ elf_machine_got_rel (struct link_map *map, int lazy)
i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
/* Add the run-time display to all local got entries if needed. */
- if (map->l_addr != 0)
+ if (__builtin_expect (map->l_addr != 0, 0))
{
while (i < n)
got[i++] += map->l_addr;
}
-
+
/* Handle global got entries. */
got += n;
/* Keep track of the symbol index. */
@@ -544,19 +550,16 @@ elf_machine_got_rel (struct link_map *map, int lazy)
sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
-
+
+ /* This loop doesn't handle Quickstart. */
while (i--)
{
if (sym->st_shndx == SHN_UNDEF)
{
- if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
- {
- if (sym->st_value && lazy)
- *got = sym->st_value + map->l_addr;
- else
- *got = RESOLVE_GOTSYM (sym, symidx);
- }
- else /* if (*got == 0 || *got == QS) */
+ if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
+ && sym->st_value && lazy)
+ *got = sym->st_value + map->l_addr;
+ else
*got = RESOLVE_GOTSYM (sym, symidx);
}
else if (sym->st_shndx == SHN_COMMON)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cdb2874e3996efb84618c0e6a08afce643176c36
commit cdb2874e3996efb84618c0e6a08afce643176c36
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:18:22 2000 +0000
Add EAFNOSUPPORT.
diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h
index 37800c3..d14e329 100644
--- a/sysdeps/unix/sysv/aix/bits/errno.h
+++ b/sysdeps/unix/sysv/aix/bits/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,6 +98,8 @@
# define ESOCKTNOSUPPORT 63 /* Socket type not supported. */
# define EOPNOTSUPP 64 /* Operation not supported on socket. */
# define EPFNOSUPPORT 65 /* Protocol family not supported. */
+# define EAFNOSUPPORT 66 /* Address family not supported by protocol
+ family. */
# define EADDRINUSE 67 /* Address already in use. */
# define EADDRNOTAVAIL 68 /* Can't assign requested address. */
# define ENETDOWN 69 /* Network is down. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5a6c2a9a250b7bc8ec79d21332be8e15a0d04fe
commit b5a6c2a9a250b7bc8ec79d21332be8e15a0d04fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:16:47 2000 +0000
AIX bind implementation.
diff --git a/sysdeps/unix/sysv/aix/bind.c b/sysdeps/unix/sysv/aix/bind.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bind.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53e2d5dd3ab673471dc7c7730422bda6794472da
commit 53e2d5dd3ab673471dc7c7730422bda6794472da
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:15:54 2000 +0000
Add copyright.
diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c
index e25ee8f..d46a524 100644
--- a/sysdeps/unix/sysv/aix/access.c
+++ b/sysdeps/unix/sysv/aix/access.c
@@ -1,3 +1,21 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <unistd.h>
extern int accessx (const char *name, int type, int who);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=504b256dabca44fba8cffd84f9cac8da3a32fad6
commit 504b256dabca44fba8cffd84f9cac8da3a32fad6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:15:12 2000 +0000
Versions file for AIX.
diff --git a/sysdeps/unix/sysv/aix/Versions b/sysdeps/unix/sysv/aix/Versions
new file mode 100644
index 0000000..4c32bbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.2 {
+ # u*
+ umount;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b56e51b2ea1bca02cac2ac06d002100d6fdbca8
commit 2b56e51b2ea1bca02cac2ac06d002100d6fdbca8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:11:22 2000 +0000
Add some temporary definitions.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
index e69de29..c94b9d4 100644
--- a/sysdeps/unix/sysv/aix/Makefile
+++ b/sysdeps/unix/sysv/aix/Makefile
@@ -0,0 +1,18 @@
+# XXX For now always link against the syscalls export file.
+# This is a hack until the import/export stuff is worked out.
++postctor += /lib/syscalls.exp
+
+# XXX This is a hack until we have the possibility to generate out own crt0.
+static-start-installed-name = /usr/lib/crt0.o
+
+ifeq ($(subdir),misc)
+sysdep_routines += dl-open dl-sym dl-close
+endif
+
+# Don't compile the ctype glue code, since there is no old non-GNU C library.
+inhibit-glue = yes
+
+# XXX Don"t know yet why this is needed in the moment.
+ifeq ($(subdir),timezone)
+CPPFLAGS-zic.c = -Dunix
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f00c0d4ff06bcc81ea06d85342915775ba35196
commit 3f00c0d4ff06bcc81ea06d85342915775ba35196
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 17 21:07:29 2000 +0000
Implies file for AIX.
diff --git a/sysdeps/unix/sysv/aix/Implies b/sysdeps/unix/sysv/aix/Implies
new file mode 100644
index 0000000..279438d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/Implies
@@ -0,0 +1,8 @@
+# AIX shares most of the syscalls which are also common to BSD and SVR4.
+unix/common
+
+# AIX has all functions of the mmap family which are described in POSIX.4.
+unix/mman
+
+# AIX has network support in the kernel.
+unix/inet
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2cf8794ab9c4cf7a0aee7e7f558fca92038c9bb3
commit 2cf8794ab9c4cf7a0aee7e7f558fca92038c9bb3
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Apr 17 20:59:00 2000 +0000
2000-04-17 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/add_n.S: Add newline at EOF.
* sysdeps/mips/rshift.S: Likewise.
* sysdeps/mips/mul_1.S: Likewise.
* sysdeps/mips/lshift.S: Likewise.
* sysdeps/mips/addmul_1.S: Likewise.
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index aa94c1d..8231665 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -119,4 +119,4 @@ ENTRY (__mpn_add_n)
sw $11,0($4)
j $31
or $2,$2,$8
- .end __mpn_add_n
\ No newline at end of file
+ .end __mpn_add_n
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
index 131e3e8..3bcc11c 100644
--- a/sysdeps/mips/addmul_1.S
+++ b/sysdeps/mips/addmul_1.S
@@ -96,4 +96,4 @@ $LC0: lw $10,0($4)
sw $3,0($4)
j $31
addu $2,$9,$2 /* add high product limb and carry from addition */
- END (__mpn_addmul_1)
\ No newline at end of file
+ END (__mpn_addmul_1)
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
index eac9401..a163559 100644
--- a/sysdeps/mips/lshift.S
+++ b/sysdeps/mips/lshift.S
@@ -95,4 +95,4 @@ ENTRY (__mpn_lshift)
.Lend: sll $8,$10,$7
j $31
sw $8,-4($4)
- END (__mpn_lshift)
\ No newline at end of file
+ END (__mpn_lshift)
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index 4838ad0..7ba4353 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -84,4 +84,4 @@ $LC0: mflo $10
sw $10,0($4)
j $31
addu $2,$9,$2 /* add high product limb and carry from addition */
- END (__mpn_mul_1)
\ No newline at end of file
+ END (__mpn_mul_1)
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
index 7f10617..112982a 100644
--- a/sysdeps/mips/rshift.S
+++ b/sysdeps/mips/rshift.S
@@ -92,4 +92,4 @@ ENTRY (__mpn_rshift)
.Lend: srl $8,$10,$7
j $31
sw $8,0($4)
- END (__mpn_rshift)
\ No newline at end of file
+ END (__mpn_rshift)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a88ca4687a93538368a57d983691b883511f7e8
commit 4a88ca4687a93538368a57d983691b883511f7e8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 15 16:57:53 2000 +0000
Fix typo in compat_symbol call for old adjtime.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index 63cc66d..560cb27 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -68,7 +68,7 @@ extern int ADJTIMEX (struct TIMEX *);
#include <sysdeps/unix/sysv/linux/adjtime.c>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
-compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2.0);
+compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2_0);
#endif
#undef TIMEVAL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0824b0c78db196f78b8a7319e45d8617543069c
commit f0824b0c78db196f78b8a7319e45d8617543069c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 15 16:53:23 2000 +0000
(RTLD_START):Rewrite for new init function interface.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index ad79ef6..b16e1c8 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -289,37 +289,64 @@ _dl_start_user:
/* Store the highest stack address. */
stq $30, __libc_stack_end
/* See if we were run as a command with the executable file
- name as an extra leading argument. If so, adjust the stack
- pointer to skip _dl_skip_args words. */
+ name as an extra leading argument. */
ldl $1, _dl_skip_args
- beq $1, 0f
- ldq $2, 0($sp)
- subq $2, $1, $2
- s8addq $1, $sp, $sp
- stq $2, 0($sp)
- /* Load _dl_main_searchlist into s1 to pass to _dl_init_next. */
-0: ldq $10, _dl_main_searchlist
- /* Call _dl_init_next to return the address of an initializer
- function to run. */
-1: mov $10, $16
- jsr $26, _dl_init_next
- ldgp $gp, 0($26)
- beq $0, 2f
- mov $0, $27
- jsr $26, ($0)
- ldgp $gp, 0($26)
- br 1b
-2: /* Clear the startup flag. */
- stl $31, _dl_starting_up
+ beq $1, $fixup_stack
+$fixup_stack_ret:
+ /* The special initializer gets called with the stack just
+ as the application's entry point will see it; it can
+ switch stacks if it moves these contents over. */
+" RTLD_START_SPECIAL_INIT "
+ /* Call _dl_init(_dl_loaded, argc, argv, envp) to run initializers. */
+ ldq $16, _dl_loaded
+ ldq $17, 0($sp)
+ lda $18, 8($sp)
+ s8addq $17, 8, $19
+ addq $19, $18, $19
+ jsr $26, _dl_init
/* Pass our finalizer function to the user in $0. */
lda $0, _dl_fini
/* Jump to the user's entry point. */
mov $9, $27
jmp ($9)
+$fixup_stack:
+ /* Adjust the stack pointer to skip _dl_skip_args words. This
+ involves copying everything down, since the stack pointer must
+ always be 16-byte aligned. */
+ ldq $2, 0($sp)
+ subq $2, $1, $2
+ mov $sp, $4
+ s8addq $2, $sp, $3
+ stq $2, 0($sp)
+ /* Copy down argv. */
+0: ldq $5, 8($3)
+ addq $4, 8, $4
+ addq $3, 8, $3
+ stq $5, 0($4)
+ bne $5, 0b
+ /* Copy down envp. */
+1: ldq $5, 8($3)
+ addq $4, 8, $4
+ addq $3, 8, $3
+ stq $5, 0($4)
+ bne $5, 1b
+ /* Copy down auxiliary table. */
+2: ldq $5, 8($3)
+ ldq $6, 16($3)
+ addq $4, 16, $4
+ addq $3, 16, $3
+ stq $5, -8($4)
+ stq $6, 0($4)
+ bne $5, 2b
+ br $fixup_stack_ret
.end _dl_start_user
.set noat
.previous");
+#ifndef RTLD_START_SPECIAL_INIT
+#define RTLD_START_SPECIAL_INIT /* nothing */
+#endif
+
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT)
@@ -350,7 +377,7 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]);
- plte = (void *) (D_PTR (l, [DT_PLTGOT]) + 32);
+ plte = (void *) (D_PTR (l, l_info[DT_PLTGOT]) + 32);
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=245bff940851e6683e659be69f83a486502ffffa
commit 245bff940851e6683e659be69f83a486502ffffa
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Apr 15 04:33:57 2000 +0000
2000-04-14 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize
symidx correctly.
(elf_machine_got_rel): Cast sym correctly.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 5c628ce..965cef9 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -541,7 +541,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
got += n;
/* Keep track of the symbol index. */
symidx = map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
- sym = (void *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
+ sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5e0b658d87f03049679401da8c990f1437446bc
commit b5e0b658d87f03049679401da8c990f1437446bc
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Apr 15 03:54:15 2000 +0000
sysdeps/mips/add_n.S
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
index dc1dc1b..131e3e8 100644
--- a/sysdeps/mips/addmul_1.S
+++ b/sysdeps/mips/addmul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
add the product to a second limb vector.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
size $6
s2_limb $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_addmul_1)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -96,3 +96,4 @@ $LC0: lw $10,0($4)
sw $3,0($4)
j $31
addu $2,$9,$2 /* add high product limb and carry from addition */
+ END (__mpn_addmul_1)
\ No newline at end of file
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
index e766303..eac9401 100644
--- a/sysdeps/mips/lshift.S
+++ b/sysdeps/mips/lshift.S
@@ -1,6 +1,6 @@
/* MIPS2 __mpn_lshift --
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -27,12 +27,12 @@ MA 02111-1307, USA. */
size $6
cnt $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_lshift)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -95,3 +95,4 @@ ENTRY (__mpn_lshift)
.Lend: sll $8,$10,$7
j $31
sw $8,-4($4)
+ END (__mpn_lshift)
\ No newline at end of file
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index aeaf083..4838ad0 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
store the product in a second limb vector.
-Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+Copyright (C) 1995, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
size $6
s2_limb $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_mul_1)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -84,3 +84,4 @@ $LC0: mflo $10
sw $10,0($4)
j $31
addu $2,$9,$2 /* add high product limb and carry from addition */
+ END (__mpn_mul_1)
\ No newline at end of file
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
index 37bde2f..7f10617 100644
--- a/sysdeps/mips/rshift.S
+++ b/sysdeps/mips/rshift.S
@@ -1,6 +1,6 @@
/* MIPS2 __mpn_rshift --
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -27,12 +27,12 @@ MA 02111-1307, USA. */
size $6
cnt $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_rshift)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -92,3 +92,4 @@ ENTRY (__mpn_rshift)
.Lend: srl $8,$10,$7
j $31
sw $8,0($4)
+ END (__mpn_rshift)
\ No newline at end of file
diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S
index 09fbf7e..75d80c1 100644
--- a/sysdeps/mips/sub_n.S
+++ b/sysdeps/mips/sub_n.S
@@ -1,7 +1,7 @@
/* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
s2_ptr $6
size $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_sub_n)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -119,3 +119,4 @@ ENTRY (__mpn_sub_n)
sw $11,0($4)
j $31
or $2,$2,$8
+ END (__mpn_sub_n)
diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S
index eae8ebb..1aae1ed 100644
--- a/sysdeps/mips/submul_1.S
+++ b/sysdeps/mips/submul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
subtract the product from a second limb vector.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
size $6
s2_limb $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_submul_1)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -96,3 +96,4 @@ $LC0: lw $10,0($4)
sw $3,0($4)
j $31
addu $2,$9,$2 /* add high product limb and carry from addition */
+ END (__mpn_submul_1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=127035bb553645e669381a988996bb90b5c31cd8
commit 127035bb553645e669381a988996bb90b5c31cd8
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Apr 15 03:45:10 2000 +0000
2000-04-14 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize
symidx correctly.
* sysdeps/mips/add_n.S: Use __PIC__, add .end directive.
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
index df32eec..aa94c1d 100644
--- a/sysdeps/mips/add_n.S
+++ b/sysdeps/mips/add_n.S
@@ -1,7 +1,7 @@
/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
store sum in a third limb vector.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -28,12 +28,12 @@ MA 02111-1307, USA. */
s2_ptr $6
size $7
*/
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__mpn_add_n)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
#endif
.set nomacro
@@ -119,3 +119,4 @@ ENTRY (__mpn_add_n)
sw $11,0($4)
j $31
or $2,$2,$8
+ .end __mpn_add_n
\ No newline at end of file
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 0d971e2..5c628ce 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -126,6 +126,8 @@ elf_machine_load_address (void)
return addr;
}
+/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
+#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
/* Get link map for callers object containing STUB_PC. */
static inline struct link_map *
@@ -476,9 +478,6 @@ elf_machine_lazy_rel (struct link_map *map,
/* Do nothing. */
}
-/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
-
/* Relocate GOT. */
static inline void
elf_machine_got_rel (struct link_map *map, int lazy)
@@ -492,37 +491,36 @@ elf_machine_got_rel (struct link_map *map, int lazy)
#ifdef RTLD_BOOTSTRAP
# define RESOLVE_GOTSYM(sym,sym_index) 0
#else
- /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
-# define RESOLVE_GOTSYM(sym,sym_index) \
- ({ \
- const ElfW(Sym) *ref = sym; \
- ElfW(Addr) value; \
- \
- switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
- { \
- default: \
- { \
- const ElfW(Half) *vernum = \
- (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
- ElfW(Half) ndx = vernum[sym_index]; \
- const struct r_found_version *version = &l->l_versions[ndx]; \
- \
- if (version->hash != 0) \
- { \
- value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \
- map, \
- &ref, scope, version, \
- R_MIPS_REL32); \
- break; \
- } \
- /* Fall through. */ \
- } \
- case 0: \
- value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
- scope, R_MIPS_REL32); \
- } \
- \
- (ref)? value + ref->st_value: 0; \
+# define RESOLVE_GOTSYM(sym,sym_index) \
+ ({ \
+ const ElfW(Sym) *ref = sym; \
+ ElfW(Addr) value; \
+ \
+ switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
+ { \
+ default: \
+ { \
+ const ElfW(Half) *vernum = \
+ (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
+ ElfW(Half) ndx = vernum[sym_index]; \
+ const struct r_found_version *version = &l->l_versions[ndx]; \
+ \
+ if (version->hash != 0) \
+ { \
+ value = _dl_lookup_versioned_symbol(strtab + sym->st_name,\
+ map, \
+ &ref, scope, version, \
+ R_MIPS_REL32); \
+ break; \
+ } \
+ /* Fall through. */ \
+ } \
+ case 0: \
+ value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
+ scope, R_MIPS_REL32); \
+ } \
+ \
+ (ref)? value + ref->st_value: 0; \
})
#endif /* RTLD_BOOTSTRAP */
@@ -541,12 +539,11 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);
- sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ /* Keep track of the symbol index. */
+ symidx = map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ sym = (void *) D_PTR (map, l_info[DT_SYMTAB]) + symidx;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
- /* Keep track of the symbol index. */
- symidx = n;
while (i--)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cacb29129249607a36f75803b1aa28bfa778651
commit 8cacb29129249607a36f75803b1aa28bfa778651
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 14 17:53:07 2000 +0000
Add newline at EOF.
diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/sysdeps/unix/sysv/linux/mips/pipe.S
index 604da74..1708888 100644
--- a/sysdeps/unix/sysv/linux/mips/pipe.S
+++ b/sysdeps/unix/sysv/linux/mips/pipe.S
@@ -1 +1 @@
-#include <sysdeps/unix/mips/pipe.S>
\ No newline at end of file
+#include <sysdeps/unix/mips/pipe.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=500d200d0927e7ebb3c206f16e4f10761f060267
commit 500d200d0927e7ebb3c206f16e4f10761f060267
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 14 17:36:37 2000 +0000
2000-04-14 Andreas Jaeger <aj@suse.de>
* weaks.c: Fix typo.
2000-04-14 Andreas Jaeger <aj@suse.de>
* sysdeps/generic/madvise.c: Fix typos.
* sysdeps/unix/sysv/linux/mips/clone.S (error): Use __PIC__.
* sysdeps/mips/bits/setjmp.h: Remove K&R compatibility.
* sysdeps/mips/setjmp_aux.c (__sigsetjmp_aux): Silence gcc
warnings.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index ff3d75f..908b6d5 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992,93,95,97,2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -23,19 +23,19 @@
typedef struct
{
/* Program counter. */
- __ptr_t __pc;
+ void * __pc;
/* Stack pointer. */
- __ptr_t __sp;
+ void * __sp;
/* Callee-saved registers s0 through s7. */
int __regs[8];
/* The frame pointer. */
- __ptr_t __fp;
+ void * __fp;
/* The global pointer. */
- __ptr_t __gp;
+ void * __gp;
/* Floating point status register. */
int __fpc_csr;
@@ -53,4 +53,4 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((__ptr_t) (address) < (jmpbuf)[0].__sp)
+ ((void *) (address) < (jmpbuf)[0].__sp)
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index d06732e..e7b83c4 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -39,10 +39,10 @@ __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
/* .. and the stack pointer; */
- env[0].__jmpbuf[0].__sp = sp;
+ env[0].__jmpbuf[0].__sp = (void *) sp;
/* .. and the FP; it'll be in s8. */
- env[0].__jmpbuf[0].__fp = fp;
+ env[0].__jmpbuf[0].__fp = (void *) fp;
/* .. and the GP; */
asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 0398ba3..cee3913 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -72,7 +72,7 @@ NESTED(__clone,4*SZREG,sp)
/* Something bad happened -- no child created */
error:
addiu sp,32
-#ifdef PIC
+#ifdef __PIC__
la t9,__syscall_error
jr t9
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a54fe716da2a9dfd1d581b21279c14ea7287196c
commit a54fe716da2a9dfd1d581b21279c14ea7287196c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 14 07:48:34 2000 +0000
Define POSIX_FADV_NORMAL, POSIX_FADV_RANDOM, POSIX_FADV_SEQUENTIAL,
POSIX_FADV_WILLNEED, POSIX_FADV_DONTNEED, and POSIX_FADV_NOREUSE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 312cd08..7081119 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -133,9 +133,19 @@ struct flock64
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
-# define FAPPEND O_APPEND
+# define FAPPEND O_APPEND
# define FFSYNC O_FSYNC
# define FASYNC O_ASYNC
# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
+# define FNDELAY O_NDELAY
#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 749becd..1803576 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -145,3 +145,13 @@ struct flock64
# define FNONBLOCK O_NONBLOCK
# define FNDELAY O_NDELAY
#endif /* Use BSD. */
+
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd327b8820b47ad2a90343e836cf5ea346a4e520
commit fd327b8820b47ad2a90343e836cf5ea346a4e520
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 14 05:57:49 2000 +0000
Add POSIX_MADV_* constants.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index a7ada10..31e39a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/Alpha version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -91,6 +91,15 @@
# define MADV_DONTNEED 6 /* Don't need these pages. */
#endif
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 6 /* Don't need these pages. */
+#endif
+
/* Not used by Linux, but here to make sure we don't clash with
OSF/1 defines. */
#if 0 && defined(__USE_BSD)
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index 37a1959..fbb58c8 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/ARM version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -82,3 +82,12 @@
# define MADV_WILLNEED 3 /* Will need these pages. */
# define MADV_DONTNEED 4 /* Don't need these pages. */
#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12c4efc1d077a571369447867b348f136ab66eb2
commit 12c4efc1d077a571369447867b348f136ab66eb2
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 14 00:35:39 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h
(elf_machine_got_rel): Handle symbol versioning.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 960b6b7..0d971e2 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -485,18 +485,46 @@ elf_machine_got_rel (struct link_map *map, int lazy)
{
ElfW(Addr) *got;
ElfW(Sym) *sym;
- int i, n;
+ int i, n, symidx;
const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
+ /* This function is loaded in dl-reloc as a nested function and can
+ therefore access the variable scope from _dl_relocate_object. */
+#ifdef RTLD_BOOTSTRAP
+# define RESOLVE_GOTSYM(sym,sym_index) 0
+#else
/* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
-#define RESOLVE_GOTSYM(sym) \
- ({ \
- const ElfW(Sym) *ref = sym; \
- ElfW(Addr) sym_loadaddr; \
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, map, \
- &ref, map->l_scope, \
- R_MIPS_REL32); \
- (ref)? sym_loadaddr + ref->st_value: 0; \
+# define RESOLVE_GOTSYM(sym,sym_index) \
+ ({ \
+ const ElfW(Sym) *ref = sym; \
+ ElfW(Addr) value; \
+ \
+ switch (map->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
+ { \
+ default: \
+ { \
+ const ElfW(Half) *vernum = \
+ (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]); \
+ ElfW(Half) ndx = vernum[sym_index]; \
+ const struct r_found_version *version = &l->l_versions[ndx]; \
+ \
+ if (version->hash != 0) \
+ { \
+ value = _dl_lookup_versioned_symbol(strtab + sym->st_name, \
+ map, \
+ &ref, scope, version, \
+ R_MIPS_REL32); \
+ break; \
+ } \
+ /* Fall through. */ \
+ } \
+ case 0: \
+ value = _dl_lookup_symbol (strtab + sym->st_name, map, &ref, \
+ scope, R_MIPS_REL32); \
+ } \
+ \
+ (ref)? value + ref->st_value: 0; \
})
+#endif /* RTLD_BOOTSTRAP */
got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
@@ -510,8 +538,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
while (i < n)
got[i++] += map->l_addr;
}
- else
- i = n;
/* Handle global got entries. */
got += n;
@@ -519,7 +545,9 @@ elf_machine_got_rel (struct link_map *map, int lazy)
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
-
+ /* Keep track of the symbol index. */
+ symidx = n;
+
while (i--)
{
if (sym->st_shndx == SHN_UNDEF)
@@ -529,13 +557,13 @@ elf_machine_got_rel (struct link_map *map, int lazy)
if (sym->st_value && lazy)
*got = sym->st_value + map->l_addr;
else
- *got = RESOLVE_GOTSYM (sym);
+ *got = RESOLVE_GOTSYM (sym, symidx);
}
else /* if (*got == 0 || *got == QS) */
- *got = RESOLVE_GOTSYM (sym);
+ *got = RESOLVE_GOTSYM (sym, symidx);
}
else if (sym->st_shndx == SHN_COMMON)
- *got = RESOLVE_GOTSYM (sym);
+ *got = RESOLVE_GOTSYM (sym, symidx);
else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
&& *got != sym->st_value
&& lazy)
@@ -546,10 +574,11 @@ elf_machine_got_rel (struct link_map *map, int lazy)
*got += map->l_addr;
}
else
- *got = RESOLVE_GOTSYM (sym);
+ *got = RESOLVE_GOTSYM (sym, symidx);
- got++;
- sym++;
+ ++got;
+ ++sym;
+ ++symidx;
}
#undef RESOLVE_GOTSYM
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=043351e023f7ef40e955e450ffdbe8dcbaecbd6c
commit 043351e023f7ef40e955e450ffdbe8dcbaecbd6c
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 14 00:15:38 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h
(elf_machine_got_rel): Only add runtime display if needed.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index fecd3e1..960b6b7 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -504,10 +504,15 @@ elf_machine_got_rel (struct link_map *map, int lazy)
generated by gnu ld. Skip these reserved entries from relocation. */
i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
- /* Add the run-time display to all local got entries. */
- while (i < n)
- got[i++] += map->l_addr;
-
+ /* Add the run-time display to all local got entries if needed. */
+ if (map->l_addr != 0)
+ {
+ while (i < n)
+ got[i++] += map->l_addr;
+ }
+ else
+ i = n;
+
/* Handle global got entries. */
got += n;
sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15d5e7dc142bf8ee78d04d2adbfd04bfa737d985
commit 15d5e7dc142bf8ee78d04d2adbfd04bfa737d985
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 23:55:20 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Handle symbol
versioning.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 3d83491..fecd3e1 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -233,22 +233,51 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
= (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
- const ElfW(Sym) *definer; \
- ElfW(Addr) loadbase; \
+ const ElfW(Sym) *sym; \
ElfW(Addr) funcaddr; \
+ ElfW(Addr) value; \
\
/* Look up the symbol's run-time value. */ \
- definer = &symtab[sym_index]; \
+ sym = &symtab[sym_index]; \
+ /* FIXME: The symbol versioning stuff is not tested yet. */ \
+ if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0) \
+ { \
+ switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL) \
+ { \
+ default: \
+ { \
+ const ElfW(Half) *vernum = \
+ (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]); \
+ ElfW(Half) ndx = vernum[sym_index]; \
+ const struct r_found_version *version = &l->l_versions[ndx]; \
\
- /* FIXME: Handle symbol versioning correctly. */ \
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \
- l->l_scope, R_MIPS_REL32); \
+ if (version->hash != 0) \
+ { \
+ value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
+ &sym, l->l_scope, version,\
+ R_MIPS_REL32); \
+ break; \
+ } \
+ /* Fall through. */ \
+ } \
+ case 0: \
+ value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
+ l->l_scope, R_MIPS_REL32); \
+ } \
\
+ /* Currently value contains the base load address of the object \
+ that defines sym. Now add in the symbol offset. */ \
+ value = (sym ? value + sym->st_value : 0); \
+ } \
+ else \
+ /* We already found the symbol. The module (and therefore its load \
+ address) is also known. */ \
+ value = l->l_addr + sym->st_value; \
+ \
/* Apply the relocation with that value. */ \
- funcaddr = loadbase + definer->st_value; \
- *(got + local_gotno + sym_index - gotsym) = funcaddr; \
+ *(got + local_gotno + sym_index - gotsym) = value; \
\
- return funcaddr; \
+ return value; \
} \
\
asm ("\n \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=040c028af28a4eaeba263762fff1da4c969a62c8
commit 040c028af28a4eaeba263762fff1da4c969a62c8
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 20:31:43 2000 +0000
Now I've applied Ralf's patch correctly and it works.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 7924d4d..0398ba3 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -91,8 +91,8 @@ ENTRY(__thread_start)
.cprestore 16
/* The stackframe has been created on entry of clone(). */
/* Resort the arg for user's function. */
- lw a0,0(sp) /* Function pointer. */
- lw t9,4(sp) /* Argument pointer. */
+ lw t9,0(sp) /* Function pointer. */
+ lw a0,4(sp) /* Argument pointer. */
/* Call the user's function. */
jalr t9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c3fb6b3a4408ae5d511167f12a6f1e94684e51d
commit 1c3fb6b3a4408ae5d511167f12a6f1e94684e51d
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 20:19:15 2000 +0000
Fix typos in last checkin.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 1bb5c29..7924d4d 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -86,12 +86,13 @@ error:
At this point we have s0=arg, s1=fn. */
-NESTED(__thread_start,FRAMESZ,sp)
+ENTRY(__thread_start)
/* cp is already loaded. */
+ .cprestore 16
/* The stackframe has been created on entry of clone(). */
/* Resort the arg for user's function. */
- move a0,0(sp) /* Function pointer. */
- move t9,4(sp) /* Argument pointer. */
+ lw a0,0(sp) /* Function pointer. */
+ lw t9,4(sp) /* Argument pointer. */
/* Call the user's function. */
jalr t9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d152663e8ac30b8283d8d3add312ee83a3c003c6
commit d152663e8ac30b8283d8d3add312ee83a3c003c6
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 20:13:29 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/clone.S: Fix functions.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 30499bc..1bb5c29 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -26,25 +26,18 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(), void *child_stack, int flags, void *arg) */
-
-#define FRAMESZ 8*SZREG
-#if _MIPS_SIM == _MIPS_SIM_ABI32
-#define MAX_REG_ARGS 4
-#else
-#define MAX_REG_ARGS 6
-#endif
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
.text
-NESTED(__clone,FRAMESZ,sp)
+NESTED(__clone,4*SZREG,sp)
#ifdef __PIC__
.set noreorder
.cpload $25
.set reorder
- PTR_SUBIU sp,FRAMESZ
- .cprestore SZREG*4
+ subu sp,32
+ .cprestore 16
#else
- PTR_SUBIU sp,FRAMESZ
+ subu sp,32
#endif
#ifdef PROF
.set noat
@@ -53,17 +46,15 @@ NESTED(__clone,FRAMESZ,sp)
.set at
#endif
- REG_S s0,FRAMESZ-SZREG*2(sp)
- REG_S s1,FRAMESZ-SZREG*3(sp)
+
/* Sanity check arguments. */
li v0,EINVAL
- beqz a0,error /* no NULL function pointers */
- beqz a1,error /* no NULL stack pointers */
+ beqz a0,error /* No NULL function pointers. */
+ beqz a1,error /* No NULL stack pointers. */
- /* Allocate space on the new stack and copy args over */
- /* Save the arg for user's function */
- move s0,a3 /* Save arg __thread_start. */
- move s1,a0 /* Save func. pointer. */
+ subu a1,32 /* Reserve argument save space. */
+ sw a0,0(a1) /* Save function pointer. */
+ sw a3,4(a1) /* Save argument pointer. */
/* Do the system call */
@@ -75,16 +66,12 @@ NESTED(__clone,FRAMESZ,sp)
beqz v0,__thread_start
/* Successful return from the parent */
- REG_L s0,FRAMESZ-SZREG*2(sp)
- REG_L s1,FRAMESZ-SZREG*3(sp)
- PTR_ADDIU sp,FRAMESZ
+ addiu sp,32
ret
/* Something bad happened -- no child created */
error:
- REG_L s0,FRAMESZ-SZREG*2(sp)
- REG_L s1,FRAMESZ-SZREG*3(sp)
- PTR_ADDIU sp,FRAMESZ
+ addiu sp,32
#ifdef PIC
la t9,__syscall_error
jr t9
@@ -100,10 +87,11 @@ error:
At this point we have s0=arg, s1=fn. */
NESTED(__thread_start,FRAMESZ,sp)
+ /* cp is already loaded. */
/* The stackframe has been created on entry of clone(). */
/* Resort the arg for user's function. */
- move a0,s0
- move t9,s1
+ move a0,0(sp) /* Function pointer. */
+ move t9,4(sp) /* Argument pointer. */
/* Call the user's function. */
jalr t9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=985286e05bb538f0f0b5c7422c3534c8c867d728
commit 985286e05bb538f0f0b5c7422c3534c8c867d728
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 19:53:13 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/pipe.S: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/pipe.S b/sysdeps/unix/sysv/linux/mips/pipe.S
new file mode 100644
index 0000000..604da74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pipe.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/mips/pipe.S>
\ No newline at end of file
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b917f4e43d492af25920cc663685d3dc1d36928
commit 5b917f4e43d492af25920cc663685d3dc1d36928
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Apr 13 19:46:02 2000 +0000
2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/mips/pipe.S: Reorder instructions since .reorder is
default.
* sysdeps/mips/__longjmp.c (__longjmp): Use $25 to fix problems
with some applications.
Patches by Ralf Baechle <ralf@uni-koblenz.de>.
* sysdeps/mips/bsd-setjmp.S: Use __PIC__.
* sysdeps/mips/bsd-_setjmp.S: Likewise.
* sysdeps/mips/setjmp.S: Likewise.
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index e9ef5cf..a1920ca 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -69,7 +69,7 @@ __longjmp (env, val_arg)
asm volatile ("lw $23, %0" : : "m" (env[0].__regs[7]));
/* Get the PC. */
- asm volatile ("lw $31, %0" : : "m" (env[0].__pc));
+ asm volatile ("lw $25, %0" : : "m" (env[0].__pc));
/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
@@ -77,7 +77,7 @@ __longjmp (env, val_arg)
else
asm volatile ("move $2, %0" : : "r" (val));
- asm volatile ("j $31");
+ asm volatile ("jr $25");
/* Avoid `volatile function does return' warnings. */
for (;;);
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 6d841fc..bf7cb15 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,12 @@
#include <sysdep.h>
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (_setjmp)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
la t9, C_SYMBOL_NAME (__sigsetjmp)
jr t9
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 000aee4..bab312b 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,12 @@
#include <sysdep.h>
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (setjmp)
.set noreorder
-#ifdef PIC
+#ifdef __PIC__
.cpload t9
la t9, C_SYMBOL_NAME (__sigsetjmp)
jr t9
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 607b5f2..804b27e 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,11 @@
/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
-#ifdef PIC
+#ifdef __PIC__
.option pic2
#endif
ENTRY (__sigsetjmp)
-#ifdef PIC
+#ifdef __PIC__
.set noreorder
.cpload t9
.set reorder
@@ -36,7 +36,7 @@ ENTRY (__sigsetjmp)
#else
move a3, $fp
#endif
-#ifdef PIC
+#ifdef __PIC__
la t9, __sigsetjmp_aux
jr t9
#else
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index dac6174..7066ac7 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -25,9 +25,8 @@ SYSCALL__ (pipe, 1)
sw v1, 4(a0)
/* Go out with a clean status. */
- j ra
move v0, zero
- nop
+ j ra
.end __pipe
weak_alias (__pipe, pipe)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc6909909301c463a10dbb58d95abbca62b99e53
commit bc6909909301c463a10dbb58d95abbca62b99e53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 12 23:39:44 2000 +0000
Arm specific error specification for math library.
diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps
new file mode 100644
index 0000000..4737025
--- /dev/null
+++ b/sysdeps/arm/libm-test-ulps
@@ -0,0 +1,1079 @@
+# Begin of automatic generation
+
+# asin
+Test "asin (-0.5) == -pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.5) == pi/6":
+float: 2
+ifloat: 2
+Test "asin (0.7) == 0.7753974966107530637":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# atanh
+Test "atanh (0.7) == 0.8673005276940531944":
+double: 1
+idouble: 1
+
+# cabs
+Test "cabs (-0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-0.7 - 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 + 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (-12.4 - 0.7 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "cabs (0.7 + 12.4 i) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# cacos
+Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551089 - 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# cacosh
+Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323 + 2.1414491111159960199 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459 + 1.1351827477151551089 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# casin
+Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103 + 1.0927647857577371459 i":
+float: 1
+ifloat: 1
+
+# casinh
+Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917 - 0.9646585044076027920 i":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+Test "Real part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.9786545955936738768 + 0.9113541895315601156 i":
+float: 1
+ifloat: 1
+
+# catan
+Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+float: 3
+ifloat: 3
+Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225 - 0.2290726829685387662 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+float: 4
+ifloat: 4
+Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877 + 0.5770573776534306764 i":
+double: 1
+idouble: 1
+
+# catanh
+Test "Real part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+double: 4
+idouble: 4
+Test "Imaginary part of: catanh (-2 - 3 i) == -0.1469466662255297520 - 1.3389725222944935611 i":
+float: 4
+ifloat: 4
+Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959 + 0.9702403077950989849 i":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+# cbrt
+Test "cbrt (-27.0) == -3.0":
+double: 1
+idouble: 1
+Test "cbrt (0.970299) == 0.99":
+double: 1
+idouble: 1
+
+# ccos
+Test "Imaginary part of: ccos (-2 - 3 i) == -4.1896256909688072301 - 9.1092278937553365979 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
+double: 1
+idouble: 1
+
+# ccosh
+Test "Real part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (-2 - 3 i) == -3.7245455049153225654 + 0.5118225699873846088 i":
+float: 1
+ifloat: 1
+Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
+double: 1
+idouble: 1
+
+# cexp
+Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.1339809149295426134 - 0.0190985162611351964 i":
+float: 1
+ifloat: 1
+Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
+float: 1
+ifloat: 1
+
+# clog
+Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680 - 2.1587989303424641704 i":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+# clog10
+Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-2 - 3 i) == 0.5569716761534183846 - 0.9375544629863747085 i":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+float: 1
+ifloat: 1
+
+# cos
+Test "cos (0.7) == 0.7648421872844884262":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "cos (M_PI_6l * 2.0) == 0.5":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "cos (M_PI_6l * 4.0) == -0.5":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "cos (pi/2) == 0":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+
+# cpow
+Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
+float: 2
+ifloat: 2
+Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
+double: 1.1031
+float: 1.5
+idouble: 1.1031
+ifloat: 1.5
+
+# csin
+Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
+float: 1
+ifloat: 1
+
+# csinh
+Test "Imaginary part of: csinh (-2 - 3 i) == 3.5905645899857799520 - 0.5309210862485198052 i":
+double: 1
+idouble: 1
+Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
+float: 1
+ifloat: 1
+
+# csqrt
+Test "Real part of: csqrt (-2 + 3 i) == 0.8959774761298381247 + 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (-2 - 3 i) == 0.8959774761298381247 - 1.6741492280355400404 i":
+float: 1
+ifloat: 1
+Test "Real part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.0220676100300264507 + 0.5870453129635652115 i":
+float: 1
+ifloat: 1
+
+# ctan
+Test "Real part of: ctan (-2 - 3 i) == 0.0037640256415042482 - 1.0032386273536098014 i":
+double: 1
+idouble: 1
+Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# ctanh
+Test "Real part of: ctanh (-2 - 3 i) == -0.9653858790221331242 + 0.0098843750383224937 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
+float: 1
+ifloat: 1
+Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# erfc
+Test "erfc (0.7) == 0.32219880616258152702":
+double: 1
+idouble: 1
+Test "erfc (1.2) == 0.089686021770364619762":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "erfc (2.0) == 0.0046777349810472658379":
+double: 1
+idouble: 1
+Test "erfc (4.1) == 0.67000276540848983727e-8":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+# exp10
+Test "exp10 (-1) == 0.1":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "exp10 (0.7) == 5.0118723362727228500":
+float: 1
+ifloat: 1
+Test "exp10 (3) == 1000":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+# expm1
+Test "expm1 (1) == M_El - 1.0":
+float: 1
+ifloat: 1
+
+# fmod
+Test "fmod (-6.5, -2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (-6.5, 2.3) == -1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, -2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "fmod (6.5, 2.3) == 1.9":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+# hypot
+Test "hypot (-0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (-12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, -12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (0.7, 1.2) == 1.3892443989449804508":
+double: 1
+idouble: 1
+Test "hypot (0.7, 12.4) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, -0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+Test "hypot (12.4, 0.7) == 12.41974234837422060118":
+float: 1
+ifloat: 1
+
+# j0
+Test "j0 (10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "j0 (2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "j0 (8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+
+# j1
+Test "j1 (10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "j1 (2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "j1 (8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+
+# jn
+Test "jn (0, 10.0) == -0.24593576445134833520":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "jn (0, 2.0) == 0.22389077914123566805":
+float: 2
+ifloat: 2
+Test "jn (0, 8.0) == 0.17165080713755390609":
+float: 1
+ifloat: 1
+Test "jn (1, 10.0) == 0.043472746168861436670":
+float: 2
+ifloat: 2
+Test "jn (1, 2.0) == 0.57672480775687338720":
+double: 1
+idouble: 1
+Test "jn (1, 8.0) == 0.23463634685391462438":
+double: 1
+idouble: 1
+Test "jn (10, 0.1) == 0.26905328954342155795e-19":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+Test "jn (10, 0.7) == 0.75175911502153953928e-11":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (10, 10.0) == 0.20748610663335885770":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (10, 2.0) == 0.25153862827167367096e-6":
+float: 4
+ifloat: 4
+Test "jn (3, 0.1) == 0.000020820315754756261429":
+double: 1
+idouble: 1
+Test "jn (3, 0.7) == 0.0069296548267508408077":
+float: 1
+ifloat: 1
+Test "jn (3, 10.0) == 0.058379379305186812343":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (3, 2.0) == 0.12894324947440205110":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# lgamma
+Test "lgamma (0.7) == 0.26086724653166651439":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "lgamma (1.2) == -0.853740900033158497197e-1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# log
+Test "log (0.7) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log10
+Test "log10 (0.7) == -0.15490195998574316929":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "log10 (e) == log10(e)":
+float: 1
+ifloat: 1
+
+# log1p
+Test "log1p (-0.3) == -0.35667494393873237891":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# log2
+Test "log2 (0.7) == -0.51457317282975824043":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# sincos
+Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
+double: 1
+float: 0.5
+idouble: 1
+ifloat: 0.5
+Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
+double: 0.2758
+float: 0.3667
+idouble: 0.2758
+ifloat: 0.3667
+Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
+float: 1
+ifloat: 1
+
+# sinh
+Test "sinh (0.7) == 0.75858370183953350346":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tan
+Test "tan (pi/4) == 1":
+double: 0.5
+idouble: 0.5
+
+# tanh
+Test "tanh (0.7) == 0.60436777711716349631":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# tgamma
+Test "tgamma (-0.5) == -2 sqrt (pi)":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "tgamma (0.5) == sqrt (pi)":
+float: 1
+ifloat: 1
+Test "tgamma (0.7) == 1.29805533264755778568":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y0
+Test "y0 (0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "y0 (10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "y0 (8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+# y1
+Test "y1 (0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "y1 (0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "y1 (10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "y1 (2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "y1 (8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+# yn
+Test "yn (0, 0.7) == -0.19066492933739506743":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.0) == 0.088256964215676957983":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 1.5) == 0.38244892379775884396":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+Test "yn (0, 10.0) == 0.055671167283599391424":
+float: 1
+ifloat: 1
+Test "yn (0, 8.0) == 0.22352148938756622053":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 0.1) == -6.4589510947020269877":
+double: 1
+idouble: 1
+Test "yn (1, 0.7) == -1.1032498719076333697":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 1.5) == -0.41230862697391129595":
+float: 1
+ifloat: 1
+Test "yn (1, 10.0) == 0.24901542420695388392":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (1, 2.0) == -0.10703243154093754689":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (1, 8.0) == -0.15806046173124749426":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "yn (10, 0.1) == -0.11831335132045197885e19":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+Test "yn (10, 0.7) == -0.42447194260703866924e10":
+double: 3
+idouble: 3
+Test "yn (10, 1.0) == -0.12161801427868918929e9":
+double: 1
+idouble: 1
+Test "yn (10, 10.0) == -0.35981415218340272205":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (10, 2.0) == -129184.54220803928264":
+double: 2
+idouble: 2
+Test "yn (3, 0.1) == -5099.3323786129048894":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 0.7) == -15.819479052819633505":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "yn (3, 10.0) == -0.25136265718383732978":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "yn (3, 2.0) == -1.1277837768404277861":
+double: 1
+idouble: 1
+
+# Maximal error of functions:
+Function: "asin":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "atanh":
+double: 1
+idouble: 1
+
+Function: "cabs":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cacos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cacos":
+float: 1
+ifloat: 1
+
+Function: Real part of "cacosh":
+double: 1
+float: 7
+idouble: 1
+ifloat: 7
+
+Function: Imaginary part of "cacosh":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "casin":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: Imaginary part of "casin":
+float: 1
+ifloat: 1
+
+Function: Real part of "casinh":
+double: 5
+float: 1
+idouble: 5
+ifloat: 1
+
+Function: Imaginary part of "casinh":
+double: 3
+float: 6
+idouble: 3
+ifloat: 6
+
+Function: Real part of "catan":
+float: 4
+ifloat: 4
+
+Function: Imaginary part of "catan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "catanh":
+double: 4
+float: 1
+idouble: 4
+ifloat: 1
+
+Function: Imaginary part of "catanh":
+double: 1
+float: 6
+idouble: 1
+ifloat: 6
+
+Function: "cbrt":
+double: 1
+idouble: 1
+
+Function: Real part of "ccos":
+double: 1
+idouble: 1
+
+Function: Imaginary part of "ccos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ccosh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "cexp":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "cexp":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "clog":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+
+Function: Real part of "clog10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "clog10":
+double: 1
+float: 5
+idouble: 1
+ifloat: 5
+
+Function: "cos":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: Real part of "cpow":
+double: 1
+float: 4
+idouble: 1
+ifloat: 4
+
+Function: Imaginary part of "cpow":
+double: 1.1031
+float: 2
+idouble: 1.1031
+ifloat: 2
+
+Function: Imaginary part of "csin":
+float: 1
+ifloat: 1
+
+Function: Real part of "csinh":
+float: 1
+ifloat: 1
+
+Function: Imaginary part of "csinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "csqrt":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "csqrt":
+float: 1
+ifloat: 1
+
+Function: Real part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Imaginary part of "ctan":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: Real part of "ctanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: Imaginary part of "ctanh":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "erfc":
+double: 24
+float: 12
+idouble: 24
+ifloat: 12
+
+Function: "exp10":
+double: 6
+float: 2
+idouble: 6
+ifloat: 2
+
+Function: "expm1":
+float: 1
+ifloat: 1
+
+Function: "fmod":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "hypot":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "j0":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+
+Function: "j1":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "jn":
+double: 6
+float: 4
+idouble: 6
+ifloat: 4
+
+Function: "lgamma":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
+Function: "log":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log10":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log1p":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "log2":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sincos":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "sinh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tan":
+double: 0.5
+idouble: 0.5
+
+Function: "tanh":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "tgamma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
+Function: "y0":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+
+Function: "y1":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+Function: "yn":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+
+# end of automatic generation
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7fdeecfb092c65d3f6dc4aeb510ca3acd4e8df53
commit 7fdeecfb092c65d3f6dc4aeb510ca3acd4e8df53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 12 20:58:59 2000 +0000
Definition for memprof functionality on Arm.
diff --git a/sysdeps/arm/memprof.h b/sysdeps/arm/memprof.h
new file mode 100644
index 0000000..4e5081c
--- /dev/null
+++ b/sysdeps/arm/memprof.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("sp"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21d129104c678b1a03f6f4c3855dca69e4001d9b
commit 21d129104c678b1a03f6f4c3855dca69e4001d9b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 12 20:12:05 2000 +0000
(RTLD_START): Rewrite for new init function interface.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index d95cb67..19276ab 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -279,36 +279,32 @@ _dl_start_user:
str sp, [r1]
@ See if we were run as a command with the executable file
@ name as an extra leading argument.
- ldr r1, .L_SKIP_ARGS
- ldr r1, [sl, r1]
+ ldr r4, .L_SKIP_ARGS
+ ldr r4, [sl, r4]
@ get the original arg count
- ldr r0, [sp]
+ ldr r1, [sp]
@ subtract _dl_skip_args from it
- sub r0, r0, r1
+ sub r1, r1, r4
@ adjust the stack pointer to skip them
- add sp, sp, r1, lsl #2
+ add sp, sp, r4, lsl #2
+ @ get the argv address
+ add r2, sp, #4
@ store the new argc in the new stack location
- str r0, [sp]
+ str r1, [sp]
+ @ compute envp
+ add r3, r2, r1, lsl #2
+ add r3, r3, #4
- @ now we enter a _dl_init_next loop
- ldr r4, .L_MAIN_SEARCHLIST
- ldr r4, [sl, r4]
- ldr r4, [r4]
- @ call _dl_init_next to get the address of an initalizer
-0: mov r0, r4
- bl _dl_init_next(PLT)
- cmp r0, #0
- beq 1f
- @ call the shared-object initializer
- @ during this call, the stack may get moved around
- mov lr, pc
- mov pc, r0
- @ go back and look for another initializer
- b 0b
-1: @ clear the startup flag
+ @ now we call _dl_init
+ ldr r0, .L_LOADED
+ ldr r0, [sl, r0]
+ ldr r0, [r0]
+ @ call _dl_init
+ bl _dl_init(PLT)
+ @ clear the startup flag
ldr r2, .L_STARTUP_FLAG
ldr r1, [sl, r2]
- @ we know r0==0 at this point
+ mov r0, #0
str r0, [r1]
@ load the finalizer function
ldr r0, .L_FINI_PROC
@@ -325,8 +321,8 @@ _dl_start_user:
.word _dl_fini(GOT)
.L_STACK_END:
.word __libc_stack_end(GOT)
-.L_MAIN_SEARCHLIST:
- .word _dl_main_searchlist(GOT)
+.L_LOADED:
+ .word _dl_loaded(GOT)
.previous\n\
");
@@ -464,7 +460,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
if (value & 0xfc000003)
_dl_signal_error (0, map->l_name,
"R_ARM_PC24 relocation out of range");
-
+
value = value >> 2;
value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff);
*reloc_addr = value;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5719e666f7c432f3b3bb424ca5ca474198250d15
commit 5719e666f7c432f3b3bb424ca5ca474198250d15
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Apr 12 17:59:20 2000 +0000
2000-04-11 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h: Update some comments.
(ELF_MACHINE_ALIGN_MASK): Removed, it's not needed.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index ce5f0f9..3d83491 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -52,11 +52,6 @@
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
-#if 0
-/* We may need 64k alignment. */
-#define ELF_MACHINE_ALIGN_MASK 0xffff
-#endif
-
/*
* MIPS libraries are usually linked to a non-zero base address. We
* subtract the base address from the address where we map the object
@@ -204,8 +199,13 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
special argument registers t7 ($15) and t8 ($24):
t7 address to return to the caller of the function
t8 index for this function symbol in .dynsym
- to usual c arguments. */
+ to usual c arguments.
+ Other architectures call fixup from dl-runtime.c in
+ _dl_runtime_resolve. MIPS instead calls __dl_runtime_resolve. We
+ have to use our own version because of the way the got section is
+ treaded on MIPS (we've also got ELF_MACHINE_PLT defined). */
+
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
generated by the gnu linker. */ \
@@ -240,6 +240,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* Look up the symbol's run-time value. */ \
definer = &symtab[sym_index]; \
\
+ /* FIXME: Handle symbol versioning correctly. */ \
loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \
l->l_scope, R_MIPS_REL32); \
\
@@ -457,7 +458,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Sym) *sym;
int i, n;
const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-
+ /* FIXME: The macro RESOLVE_GOTSYM is not handling versioning. */
#define RESOLVE_GOTSYM(sym) \
({ \
const ElfW(Sym) *ref = sym; \
@@ -523,7 +524,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
}
/* Set up the loaded object described by L so its stub function
- will jump to the on-demand fixup code in dl-runtime.c. */
+ will jump to the on-demand fixup code __dl_runtime_resolve. */
static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86e991277c606838885cb389846877484e86b9b5
commit 86e991277c606838885cb389846877484e86b9b5
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Apr 7 20:07:21 2000 +0000
2000-04-07 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h: Updated for
newer kernels.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
index 3a803a6..3742d54 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -4,10 +4,7 @@
#define HAVE_SA_RESTORER
-/* Linux/MIPS still uses the old sigaction structure in the kernel. */
-#define old_kernel_sigaction kernel_sigaction
-
-struct kernel_sigaction {
+struct old_kernel_sigaction {
unsigned int sa_flags;
__sighandler_t k_sa_handler;
unsigned long sa_mask;
@@ -23,3 +20,12 @@ struct kernel_sigaction {
int pad1[1]; /* reserved */
#endif
};
+
+/* This is the sigaction structure from the Linux 2.1.68 kernel. */
+struct kernel_sigaction {
+ unsigned int sa_flags;
+ __sighandler_t k_sa_handler;
+ sigset_t sa_mask;
+ void (*sa_restorer)(void);
+ int s_resv[1]; /* reserved */
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=604220ddc61ac8778779226a7f506b13475e4ce7
commit 604220ddc61ac8778779226a7f506b13475e4ce7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 6 20:09:41 2000 +0000
init-first.h has been removed, remove it here also.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index c8868aa..d80c5c2 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -3,7 +3,6 @@ alpha/regdef.h
clone.S
ieee_get_fp_control.S
ieee_set_fp_control.S
-init-first.h
ioperm.c
ipc_priv.h
kernel_sigaction.h
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 73fd68e..49bdaf3 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,5 +1,4 @@
clone.S
-init-first.h
ioperm.c
setresuid.c
setresgid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e3f69ad02b8274d56d769f61ad24b0f6f290f28
commit 7e3f69ad02b8274d56d769f61ad24b0f6f290f28
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 6 04:56:46 2000 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h
deleted file mode 100644
index a3f5d8f..0000000
--- a/sysdeps/unix/sysv/linux/alpha/init-first.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* The job of this fragment it to find argc and friends for INIT.
- This is done in one of two ways: either in the stack context
- of program start, or having dlopen pass them in. */
-
-#define SYSDEP_CALL_INIT(NAME, INIT) asm("\
- .weak _dl_starting_up
- .globl " #NAME "
- .ent " #NAME "
-" #NAME ":
- ldgp $29, 0($27)
- .prologue 1
- .set at
- /* Are we a dynamic libc being loaded into a static program? */
- lda $0, _dl_starting_up
- beq $0, 1f
- ldl $0, 0($0)
- cmpeq $31, $0, $0
-1: stl $0, __libc_multiple_libcs
- /* If so, argc et al are in a0-a2 already. Otherwise, load them. */
- bne $0, 2f
- ldl $16, 0($30)
- lda $17, 8($30)
- s8addq $16, $17, $18
- addq $18, 8, $18
-2: br $31, " ASM_ALPHA_NG_SYMBOL_PREFIX #INIT "..ng
- .set noat
- .end " #NAME);
diff --git a/sysdeps/unix/sysv/linux/arm/init-first.h b/sysdeps/unix/sysv/linux/arm/init-first.h
deleted file mode 100644
index d68c368..0000000
--- a/sysdeps/unix/sysv/linux/arm/init-first.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Prepare arguments for library initialization function.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The job of this fragment it to find argc and friends for INIT.
- This is done in one of two ways: either in the stack context
- of program start, or having dlopen pass them in.
-
- */
-
-#define SYSDEP_CALL_INIT(NAME, INIT) \
-void NAME (void* arg, ...) \
-{ \
- int argc; \
- char** argv; \
- char** envp; \
- /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. \
- If the address would be taken inside the expression the optimizer \
- would try to be too smart and throws it away. Grrr. */ \
- int *dummy_addr = &_dl_starting_up; \
- \
- __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \
- \
- if (!__libc_multiple_libcs) \
- { \
- /* The ... in the arg list above forces the gnu ARM compiler to \
- push r0, r1, r2, r3 onto the stack. This way we can get the address */ \
- argc = *(int*) (&arg+4); \
- argv = (char **) &arg + 5; \
- envp = &argv[argc+1]; \
- } \
- else /* the three were passed as arguments */ \
- { \
- argc = (int)arg; \
- argv = (char**)*(&arg + 1); \
- envp = (char**)*(&arg + 2); \
- } \
- \
- INIT (argc, argv, envp); \
-}
diff --git a/sysdeps/unix/sysv/linux/mips/init-first.h b/sysdeps/unix/sysv/linux/mips/init-first.h
deleted file mode 100644
index d8c2f38..0000000
--- a/sysdeps/unix/sysv/linux/mips/init-first.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Prepare arguments for library initialization function.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The job of this fragment it to find argc and friends for INIT.
- This is done in one of two ways: either in the stack context
- of program start, or having dlopen pass them in. */
-
-#define SYSDEP_CALL_INIT(NAME, INIT) \
- asm(".weak _dl_starting_up\n\t" \
- ".globl " #NAME "\n\t" \
- ".ent " #NAME "\n" \
- #NAME ":\n\t" \
- ".set noreorder\n\t" \
- ".cpload $25\n\t" \
- ".set reorder\n\t" \
- /* Are we a dynamic libc being loaded into a static program? */ \
- "la $8, _dl_starting_up\n\t" \
- "beqz $8, 1f\n\t" \
- "lw $8, 0($8)\n\t" \
- "seq $8, $8, 0\n" \
- "1:\t" \
- "sw $8, __libc_multiple_libcs\n\t" \
- /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \
- "bnez $8, 2f\n\t" \
- "lw $4, 16($29)\n\t" \
- "addiu $5, $29, 20\n\t" \
- "sll $6, $4, 2\n\t" \
- "addiu $6, $6, 4\n\t" \
- "addu $6, $5, $6\n" \
- "2:\t" \
- "la $25, " #INIT "\n\t" \
- "jr $25\n\t" \
- ".end " #NAME "\n\t" \
- "3:\t" \
- ".size " #NAME ", 3b-" #NAME);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a169be8dd3ad7f1aed0d5e8e9eb622bfb4065ead
commit a169be8dd3ad7f1aed0d5e8e9eb622bfb4065ead
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Apr 5 11:01:20 2000 +0000
* sysdeps/m68k/dl-machine.h (RTLD_START): Readd _dl_start_user
entry point, used on Hurd.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 3ff82af..bf7dede 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -156,6 +156,11 @@ _start:
move.l %sp, -(%sp)
jbsr _dl_start
addq.l #4, %sp
+ /* FALLTHRU */
+
+ .globl _dl_start_user
+ .type _dl_start_user,@function
+_dl_start_user:
| Save the user entry point address in %a4.
move.l %d0, %a4
| Point %a5 at the GOT.
@@ -187,7 +192,7 @@ _start:
move.l %sp, %fp
| Jump to the user's entry point.
jmp (%a4)
- .size _start, . - _start
+ .size _dl_start_user, . - _dl_start_user
.previous");
/* Nonzero iff TYPE describes a relocation that should
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a502960ee1bf26c446f33c3e1539979a588dffcc
commit a502960ee1bf26c446f33c3e1539979a588dffcc
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Apr 4 12:08:40 2000 +0000
* sysdeps/m68k/dl-machine.h (RTLD_START): Rewrite for new init
function interface. Remove unused _dl_start_user entry point.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 7a5dd35..3ff82af 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -156,10 +156,6 @@ _start:
move.l %sp, -(%sp)
jbsr _dl_start
addq.l #4, %sp
-
- .globl _dl_start_user
- .type _dl_start_user,@function
-_dl_start_user:
| Save the user entry point address in %a4.
move.l %d0, %a4
| Point %a5 at the GOT.
@@ -169,7 +165,6 @@ _dl_start_user:
| See if we were run as a command with the executable file
| name as an extra leading argument.
move.l ([_dl_skip_args@GOT.w, %a5]), %d0
- jeq 0f
| Pop the original argument count
move.l (%sp)+, %d1
| Subtract _dl_skip_args from it.
@@ -178,51 +173,21 @@ _dl_start_user:
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
-0: | Push the searchlist of the main object as argument in
- | the _dl_init_next call below.
- move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2
- | First dun the pre-initializers.
-0: move.l %d2, -(%sp)
- | Call _dl_preinit_next to return the address of an pre-initializer
- | function to run.
- bsr.l _dl_preinit_next@PLTPC
- add.l #4, %sp | Pop argument.
- | Check for zero return, when out of pre-initializers.
- tst.l %d0
- jeq 0f
- | Call the shared object pre-initializer function.
- move.l %d0, %a0
- jsr (%a0)
- | Loop to call _dl_preinit_next for the next pre-initializer.
- jra 0b
-0: move.l %d2, -(%sp)
- | Call _dl_init_next to return the address of an initializer
- | function to run.
- bsr.l _dl_init_next@PLTPC
- add.l #4, %sp | Pop argument.
- | Check for zero return, when out of initializers.
- tst.l %d0
- jeq 1f
- | Call the shared object initializer function.
- | NOTE: We depend only on the registers (%d2, %a4 and %a5)
- | and the return address pushed by this call;
- | the initializer is called with the stack just
- | as it appears on entry, and it is free to move
- | the stack around, as long as it winds up jumping to
- | the return address on the top of the stack.
- move.l %d0, %a0
- jsr (%a0)
- | Loop to call _dl_init_next for the next initializer.
- jra 0b
-1: | Clear the startup flag.
- clr.l ([_dl_starting_up@GOT.w, %a5])
+ # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
+ pea 8(%sp, %d1*4)
+ pea 4(%sp)
+ move.l %d1, -(%sp)
+ move.l _dl_loaded@GOT.w(%a5), -(%sp)
+ jbsr _dl_init@PLTPC
+ addq.l #8, %sp
+ addq.l #8, %sp
| Pass our finalizer function to the user in %a1.
move.l _dl_fini@GOT.w(%a5), %a1
| Initialize %fp with the stack pointer.
move.l %sp, %fp
| Jump to the user's entry point.
jmp (%a4)
- .size _dl_start_user, . - _dl_start_user
+ .size _start, . - _start
.previous");
/* Nonzero iff TYPE describes a relocation that should
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=782bca9790ebd685d87d11490b90a513aacb791f
commit 782bca9790ebd685d87d11490b90a513aacb791f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 4 06:03:28 2000 +0000
Use shlib-compat macros.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 0ce8d53..10b10e4 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <glob.h>
+#include <shlib-compat.h>
/* For Linux/Alpha we have to make the glob symbols versioned. */
#define glob(pattern, flags, errfunc, pglob) \
@@ -40,8 +41,8 @@ extern void __new_globfree (glob_t *__pglob);
#undef glob64
#undef globfree64
-default_symbol_version(__new_glob, glob, GLIBC_2.1);
-default_symbol_version(__new_globfree, globfree, GLIBC_2.1);
+versioned_symbol (libc, __new_glob, glob, GLIBC_2_1);
+versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1);
weak_alias (__new_glob, glob64)
weak_alias (__new_globfree, globfree64)
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
index c72ecd8..63bf8e9 100644
--- a/sysdeps/unix/sysv/linux/arm/errlist.c
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -39,11 +39,11 @@ const int __old_sys_nerr = OLD_ERRLIST_SIZE;
strong_alias (__old_sys_nerr, _old_sys_nerr);
weak_alias (__old_sys_nerr, _old_sys_nerr)
-symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0);
-symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0);
+compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0);
+compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0);
weak_alias (__old_sys_errlist, _old_sys_errlist);
-symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0);
-symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0);
+compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0);
+compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0);
#endif
strong_alias (__new_sys_nerr, _new_sys_nerr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9814bea9f327340f12b7159b9464b7dd4b8f59a8
commit 9814bea9f327340f12b7159b9464b7dd4b8f59a8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 4 06:02:00 2000 +0000
Use __PIC__ instead of PIC.
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index 17334cf..7aa5598 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -1,5 +1,5 @@
/* Mach thread state definitions for machine-independent code. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE
#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT
-#ifdef PIC
+#ifdef __PIC__
#define MACHINE_THREAD_STATE_SET_PC(ts, pc) \
((ts)->PC = (ts)->r25 = (unsigned long int) (pc))
#endif
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 256b0a7..2ba1dea 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -32,7 +32,7 @@
/* Note that while it's better structurally, going back to call __syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
-#ifdef PIC
+#ifdef __PIC__
#define PSEUDO(name, syscall_name, args) \
.align 2; \
99: la t9,__syscall_error; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5ef1c4a3c21e28a457e6fe0c70d85adf1d992256
commit 5ef1c4a3c21e28a457e6fe0c70d85adf1d992256
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 4 06:01:18 2000 +0000
Use SHARED instead of PIC.
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index 825b063..72c7a61 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -109,7 +109,7 @@ init1 (int argc, char *arg0, ...)
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
-#ifdef PIC
+#ifdef SHARED
__libc_global_ctors ();
#endif
@@ -175,7 +175,7 @@ __init (int *data)
(void) &__init;
}
-#ifdef PIC
+#ifdef SHARED
/* This function is called to initialize the shared C library.
It is called just before the user _start code from mips/elf/start.S,
with the stack set up as that code gets it. */
@@ -274,7 +274,7 @@ void __libc_init_first (int argc, ...)
}
#endif
-#ifndef PIC
+#ifndef SHARED
/* An assembler code wrapping c function __init. */
#ifdef __mips64
asm ("\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=776dbc655186db1622dce7bb0b0b0f273a20ab62
commit 776dbc655186db1622dce7bb0b0b0f273a20ab62
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 3 18:06:38 2000 +0000
Atomic operations for Arm.
diff --git a/sysdeps/arm/atomicity.h b/sysdeps/arm/atomicity.h
new file mode 100644
index 0000000..01bd64e
--- /dev/null
+++ b/sysdeps/arm/atomicity.h
@@ -0,0 +1,86 @@
+/* Low-level functions for atomic operations. ARM version.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H 1
+
+#include <inttypes.h>
+
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ int tmp1;
+ int tmp2;
+ int result;
+ __asm__ ("\n"
+ "0:\tldr\t%0,[%3]\n\t"
+ "add\t%1,%0,%4\n\t"
+ "swp\t%2,%1,[%3]\n\t"
+ "cmp\t%0,%2\n\t"
+ "swpne\t%1,%2,[%3]\n\t"
+ "bne\t0b"
+ : "=&r" (result), "=&r" (tmp1), "=&r" (tmp2)
+ : "r" (mem), "r"(val)
+ : "cc", "memory");
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ int tmp1;
+ int tmp2;
+ int tmp3;
+ __asm__ ("\n"
+ "0:\tldr\t%0,[%3]\n\t"
+ "add\t%1,%0,%4\n\t"
+ "swp\t%2,%1,[%3]\n\t"
+ "cmp\t%0,%2\n\t"
+ "swpne\t%1,%2,[%3]\n\t"
+ "bne\t0b"
+ : "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3)
+ : "r" (mem), "r"(val)
+ : "cc", "memory");
+}
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ int result, tmp;
+ __asm__ ("\n"
+ "0:\tldr\t%1,[%2]\n\t"
+ "mov\t%0,#0\n\t"
+ "cmp\t%1,%4\n\t"
+ "bne\t1f\n\t"
+ "swp\t%0,%3,[%2]\n\t"
+ "cmp\t%1,%0\n\t"
+ "swpne\t%1,%0,[%2]\n\t"
+ "bne\t0b\n\t"
+ "mov\t%0,#1\n"
+ "1:"
+ : "=&r" (result), "=&r" (tmp)
+ : "r" (p), "r" (newval), "r" (oldval)
+ : "cc", "memory");
+}
+
+#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b05b3eb67f3b2fbe431f5c340b0c78a2b9084fa2
commit b05b3eb67f3b2fbe431f5c340b0c78a2b9084fa2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 2 08:05:11 2000 +0000
Define __socklen_t.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
index c41b34c..830dcea 100644
--- a/sysdeps/unix/sysv/aix/bits/types.h
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -145,4 +145,7 @@ typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef int __intptr_t;
+/* Duplicate info from sys/socket.h. */
+typedef unsigned int __socklen_t;
+
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h
index 86595e8..e95892e 100644
--- a/sysdeps/unix/sysv/hpux/bits/types.h
+++ b/sysdeps/unix/sysv/hpux/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994-1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -103,7 +103,7 @@ typedef struct
from the global namespace. */
#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
-# define __FDS_BITS(set) ((set)->fds_bits)
+# define __FDS_BITS(set) ((set)->fds_bits)
#else
__fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
# define __FDS_BITS(set) ((set)->__fds_bits)
@@ -144,4 +144,7 @@ typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef int __intptr_t;
+/* Duplicate info from sys/socket.h. */
+typedef unsigned int __socklen_t;
+
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 8a79621..722db9e 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -123,6 +123,9 @@ typedef unsigned long int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef long int __intptr_t;
+/* Duplicate info from sys/socket.h. */
+typedef unsigned int __socklen_t;
+
/* Now add the thread types. */
#ifdef __USE_UNIX98
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 48a9bf0..6bb07e7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -149,6 +149,9 @@ typedef unsigned long int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef int __intptr_t;
+/* Duplicate info from sys/socket.h. */
+typedef unsigned int __socklen_t;
+
/* Now add the thread types. */
#ifdef __USE_UNIX98
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 1e7b50e..65ad002 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -134,4 +134,7 @@ typedef unsigned int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef long int __intptr_t;
+/* Duplicate info from sys/socket.h. */
+typedef unsigned int __socklen_t;
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23a7de4bb4d15afaab7edf400fc56f7573a23720
commit 23a7de4bb4d15afaab7edf400fc56f7573a23720
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 2 08:01:25 2000 +0000
Use __socklen_t to define socklen_t. Allow definition elsewhere.
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
index e897354..eb5b766 100644
--- a/sysdeps/unix/sysv/aix/bits/socket.h
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -32,7 +32,10 @@
#include <sys/types.h>
/* Type for length arguments in socket calls. */
-typedef unsigned int socklen_t;
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
/* Types of sockets. */
enum __socket_type
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 747b119..1462331 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -32,7 +32,10 @@
#include <sys/types.h>
/* Type for length arguments in socket calls. */
-typedef unsigned int socklen_t;
+#ifndef __socklen_t_defined
+typedef __socklen_t socklen_t;
+# define __socklen_t_defined
+#endif
/* Types of sockets. */
enum __socket_type
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9de792e3c0cb05a1d7cf17dc5f2dc19e10847fc3
commit 9de792e3c0cb05a1d7cf17dc5f2dc19e10847fc3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Apr 2 07:59:31 2000 +0000
(__gethostname): Change type of second parameter to socklen_t.
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
index 558d16e..3f967e1 100644
--- a/sysdeps/unix/sysv/sysv4/gethostname.c
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -22,12 +22,12 @@
#include <sys/types.h>
#include <sys/systeminfo.h>
-extern int __sysinfo __P ((int command, char *buf, long count));
+extern int __sysinfo (int command, char *buf, long int count);
int
__gethostname (name, namelen)
char *name;
- size_t namelen;
+ socklen_t namelen;
{
return __sysinfo (SI_HOSTNAME, name, namelen);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06554205501f8080767855dbc32810089172db70
commit 06554205501f8080767855dbc32810089172db70
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 1 22:29:26 2000 +0000
Linux/Alpha specific definitions for <netdb.h>.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/netdb.h b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h
new file mode 100644
index 0000000..f5a33d9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/netdb.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it
+ and/or modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 59 Temple Place -
+ Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _NETDB_H
+# error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
+#endif
+
+
+/* Description of data base entry for a single network. NOTE: here a
+ poor assumption is made. The network number is expected to fit
+ into an unsigned long int variable. */
+struct netent
+{
+ char *n_name; /* Official name of network. */
+ char **n_aliases; /* Alias list. */
+ int n_addrtype; /* Net address type. */
+ /* XXX We should probably use uint32_t for the field and ensure
+ compatiblity by adding appropriate padding. */
+ unsigned long int n_net; /* Network number. */
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a344e73cc6c0b6cb75645f41438418c0fe6c955
commit 3a344e73cc6c0b6cb75645f41438418c0fe6c955
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 31 12:35:12 2000 +0000
2000-03-31 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (RTLD_START): Rewritten to match new
init function interface.
* sysdeps/mips/mips64/dl-machine.h (RTLD_START): Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 188e9ae..ce5f0f9 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -342,8 +342,10 @@ _dl_start_user:\n\
.cpload $25\n\
.set reorder\n\
move $16, $28\n\
- # Save the user entry point address in saved register.\n\
+ # Save the user entry point address in a saved register.\n\
move $17, $2\n\
+ # Store the highest stack address\n\
+ sw $29, __libc_stack_end\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
lw $2, _dl_skip_args\n\
@@ -353,48 +355,19 @@ _dl_start_user:\n\
# Subtract _dl_skip_args from it.\n\
subu $4, $2\n\
# Adjust the stack pointer to skip _dl_skip_args words.\n\
- sll $2,2\n\
+ sll $2, 2\n\
addu $29, $2\n\
# Save back the modified argument count.\n\
sw $4, 0($29)\n\
-1: subu $29, 16\n\
-2: # Push the searchlist of the main object as argument in\n\
- # the _dl_preinit_next and _dl_init_next calls below.\n\
- lw $4, _dl_main_searchlist\n\
- # First run the pre-initializers.\n\
- # Call _dl_preinit_next to return the address of an initializer\n\
- # function to run.\n\
- jal _dl_preinit_next
- move $28, $16\n\
- # Check for zero return, when out of initializers.\n\
- beq $2, $0, 4f\n\
- # Call the pre-initializer.\n\
- move $25, $2\n\
- jalr $25\n\
- move $28, $16\n
- # Loop to call _dl_preinit_next for the next initializer.\n\
- b 2b\n
-4: lw $4, _dl_main_searchlist\n\
- # Call _dl_init_next to return the address of an initializer\n\
- # function to run.\n\
- jal _dl_init_next\n\
- move $28, $16\n\
- # Check for zero return, when out of initializers.\n\
- beq $2, $0, 2f\n\
- # Call the shared object initializer function.\n\
- move $25, $2\n\
- # XXX This looks broken ###.\n\
- lw $4, 0($29)\n\
- lw $5, 4($29)\n\
- lw $6, 8($29)\n\
- lw $7, 12($29)\n\
- jalr $25\n\
- move $28, $16\n\
- # Loop to call _dl_init_next for the next initializer.\n\
- b 4b\n\
-2: addiu $29, 16\n\
- # Clear the startup flag. Assumes 32 bit ints.\n\
- sw $0, _dl_starting_up\n\
+1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
+ lw $4, _dl_loaded\n\
+ lw $5, 0($29)\n\
+ la $6, 4($29)\n\
+ la $7, 8($29)\n\
+ subu $29, 16\n\
+ # Call the function to run the initializers.\n\
+ jal _dl_init
+ addiu $29, 16\n\
# Pass our finalizer function to the user in ra.\n\
la $31, _dl_fini\n\
# Jump to the user entry point.\n\
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 01f9a95..c2f2f6e 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -445,8 +445,10 @@ _RTLD_PROLOGUE (ENTRY_POINT)\
# doesn't say nothing about this, I emulate this here.\n\
dla $4, _DYNAMIC\n\
sd $4, -0x7ff0($28)\n\
+ dsubu $29, 16\n\
move $4, $29\n\
jal _dl_start\n\
+ daddiu $29, 16\n\
# Get the value of label '_dl_start_user' in t9 ($25).\n\
dla $25, _dl_start_user\n\
_dl_start_user:\n\
@@ -456,6 +458,8 @@ _dl_start_user:\n\
move $16, $28\n\
# Save the user entry point address in saved register.\n\
move $17, $2\n\
+ # Store the highest stack address\n\
+ sd $29, __libc_stack_end\n\
# See if we were run as a command with the executable file\n\
# name as an extra leading argument.\n\
ld $2, _dl_skip_args\n\
@@ -469,27 +473,29 @@ _dl_start_user:\n\
daddu $29, $2\n\
# Save back the modified argument count.\n\
sd $4, 0($29)\n\
- # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
-1: dla $2, _dl_default_scope\n\
- ld $4, 2*8($2)\n\
- # Call _dl_init_next to return the address of an initializer\n\
- # function to run.\n\
- jal _dl_init_next\n\
- move $28, $16\n\
- # Check for zero return, when out of initializers.\n\
- beq $2, $0, 2f\n\
- # Call the shared object initializer function.\n\
- move $25, $2\n\
- ld $4, 0($29)\n\
- ld $5, 1*8($29)\n\
- ld $6, 2*8($29)\n\
- ld $7, 3*8($29)\n\
- jalr $25\n\
- move $28, $16\n\
- # Loop to call _dl_init_next for the next initializer.\n\
- b 1b\n\
+1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
+ ld $4, _dl_loaded\n\
+ ld $5, 0($29)\n\
+ dla $6, 4($29)\n\
+ dla $7, 8($29)\n\
+ dsubu $29, 16\n\
+ # Call the function to run the initializers.\n\
+ jal _dl_init
+ daddiu $29, 16\n\
+ # Pass our finalizer function to the user in ra.\n\
+ dla $31, _dl_fini\n\
+ # Jump to the user entry point.\n\
+1: # Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
+ lw $4, _dl_loaded\n\
+ lw $5, 0($29)\n\
+ la $6, 4($29)\n\
+ la $7, 8($29)\n\
+ subu $29, 16\n\
+ # Call the function to run the initializers.\n\
+ jal _dl_init
+ addiu $29, 16\n\
# Pass our finalizer function to the user in ra.\n\
-2: dla $31, _dl_fini\n\
+ dla $31, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
ld $4, 0($29)\n\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1212cdb2f012c408ac03f7c35392dd49ac77144
commit b1212cdb2f012c408ac03f7c35392dd49ac77144
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 31 11:11:10 2000 +0000
2000-03-31 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/fpu/fgetexcptflg.c: Fix last patch to use #if.
* sysdeps/mips/fpu/fegetenv.c: Likewise.
* sysdeps/mips/fpu/feupdateenv.c: Likewise.
* sysdeps/mips/fpu/fclrexcpt.c: Likewise.
* sysdeps/mips/fpu/fesetenv.c: Likewise.
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 62bb8b1..9ed8486 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -42,7 +42,7 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
-#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
#endif
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
index d3ba0db..5882305 100644
--- a/sysdeps/mips/fpu/fegetenv.c
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -30,7 +30,7 @@ __fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
-#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetenv, __old_fegetenv)
compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
#endif
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index f409ac5..7ae688a 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -33,7 +33,7 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
-#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
#endif
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
index 4394059..86ba6f9 100644
--- a/sysdeps/mips/fpu/feupdateenv.c
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -42,7 +42,7 @@ __feupdateenv (const fenv_t *envp)
/* Success. */
return 0;
}
-#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feupdateenv, __old_feupdateenv)
compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
#endif
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 17696db..0f7fea3 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -35,7 +35,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
-#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73a35fc451eb39c20dbdd2004e38219308ec75e4
commit 73a35fc451eb39c20dbdd2004e38219308ec75e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 31 05:44:27 2000 +0000
Use SHARED instead of PIC.
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index 87f9f0a..1e90c84 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -39,7 +39,7 @@ init (int *data)
__getopt_clean_environment (envp);
}
-#ifdef PIC
+#ifdef SHARED
/* This function is called to initialize the shared C library.
It is called just before the user _start code from i386/elf/start.S,
with the stack set up as that code gets it. */
@@ -63,7 +63,7 @@ _init (int argc, ...)
void
__libc_init_first (int argc __attribute__ ((unused)), ...)
{
-#ifndef PIC
+#ifndef SHARED
init (&argc);
#endif
}
diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c
index 3fc4b7b..309ff8b 100644
--- a/sysdeps/mips/init-first.c
+++ b/sysdeps/mips/init-first.c
@@ -34,7 +34,7 @@ init (int *data)
__libc_init (argc, argv, envp);
}
-#ifdef PIC
+#ifdef SHARED
/* This function is called to initialize the shared C library.
It is called just before the user _start code from mips/elf/start.S,
with the stack set up as that code gets it. */
@@ -58,7 +58,7 @@ _init (int argc, ...)
void
__libc_init_first (int argc __attribute__ ((unused)), ...)
{
-#ifndef PIC
+#ifndef SHARED
init (&argc);
#endif
}
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index a01b174..8b35a91 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
/* Call __mcount with our the return PC for our caller,
and the return PC our caller will return to. */
-#ifdef PIC
+#ifdef __PIC__
#define CPLOAD ".cpload $25;"
#else
#define CPLOAD
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0772663d31d215458d3a85f3954e5b297ed84e40
commit 0772663d31d215458d3a85f3954e5b297ed84e40
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 31 05:39:18 2000 +0000
Use shlib-compat macros.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index b695ece..63cc66d 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <shlib-compat.h>
+
struct timeval32
{
int tv_sec, tv_usec;
@@ -54,7 +56,7 @@ struct timex32 {
#define TIMEX timex32
#define ADJTIME __adjtime_tv32
#define ADJTIMEX(x) __adjtimex_tv32 (x)
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
#define LINKAGE
#else
#define LINKAGE static
@@ -65,8 +67,8 @@ extern int ADJTIMEX (struct TIMEX *);
#include <sysdeps/unix/sysv/linux/adjtime.c>
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0);
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+compat_symbol (libc, __adjtime_tv32, adjtime, GLIBC_2.0);
#endif
#undef TIMEVAL
@@ -117,11 +119,7 @@ __adjtime (itv, otv)
return ret;
}
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-default_symbol_version (__adjtime, adjtime, GLIBC_2.1);
-#else
-weak_alias (__adjtime, adjtime);
-#endif
+versioned_symbol (libc, __adjtime, adjtime, GLIBC_2_1);
extern int __syscall_adjtimex_tv64 (struct timex *tx);
@@ -191,11 +189,6 @@ __adjtimex_tv64 (struct timex *tx)
return ret;
}
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
-default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1);
-default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1);
-#else
-weak_alias (__adjtimex_tv64, __adjtimex);
-weak_alias (__adjtimex_tv64, adjtimex);
-#endif
+versioned_symbol (libc, __adjtimex_tv64, __adjtimex, GLIBC_2_1);
+versioned_symbol (libc, __adjtimex_tv64p, adjtimex, GLIBC_2_1);
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 93a9bf2..693b4d4 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -116,8 +116,6 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
#endif
}
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_msgctl, msgctl, GLIBC_2.2);
-#else
-weak_alias (__new_msgctl, msgctl);
-#endif
+#include <shlib-compat.h>
+versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2);
+
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index f405fbf..d85c50e 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,8 +19,9 @@
became necessary since the glob_t structure changed. */
#include <sys/types.h>
#include <glob.h>
+#include <shlib-compat.h>
-#if defined PIC && DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
/* This is the old structure. The difference is that the gl_pathc and
gl_offs elements have type `int'. */
@@ -33,11 +34,11 @@ typedef struct
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
are used instead of the normal file access functions. */
- void (*gl_closedir) __P ((void *));
- struct dirent *(*gl_readdir) __P ((void *));
- __ptr_t (*gl_opendir) __P ((__const char *));
- int (*gl_lstat) __P ((__const char *, struct stat *));
- int (*gl_stat) __P ((__const char *, struct stat *));
+ void (*gl_closedir) (void *);
+ struct dirent *(*gl_readdir) (void *);
+ __ptr_t (*gl_opendir) (__const char *);
+ int (*gl_lstat) (__const char *, struct stat *);
+ int (*gl_stat) (__const char *, struct stat *);
} old_glob_t;
@@ -75,7 +76,7 @@ __old_glob (const char *pattern, int flags,
return result;
}
-symbol_version(__old_glob, glob, GLIBC_2.0);
+compat_symbol (libc, __old_glob, glob, GLIBC_2_0);
/* Free storage allocated in PGLOB by a previous `glob' call. */
@@ -90,6 +91,6 @@ __old_globfree (old_glob_t *pglob)
globfree (&correct);
}
-symbol_version(__old_globfree, globfree, GLIBC_2.0);
+compat_symbol (libc, __old_globfree, globfree, GLIBC_2_0);
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
index 6281e44..a453474 100644
--- a/sysdeps/unix/sysv/linux/alpha/semctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -125,8 +125,5 @@ __new_semctl (int semid, int semnum, int cmd, ...)
#endif
}
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_semctl, semctl, GLIBC_2.2);
-#else
-weak_alias (__new_semctl, semctl);
-#endif
+#include <shlib-compat.h>
+versioned_symbol (libc, __new_semctl, semctl, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
index 162afee..ebda160 100644
--- a/sysdeps/unix/sysv/linux/alpha/shmctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -130,8 +130,5 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
#endif
}
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_shmctl, shmctl, GLIBC_2.2);
-#else
-weak_alias (__new_shmctl, shmctl);
-#endif
+#include <shlib-compat.h>
+versioned_symbol (libc, __new_shmctl, shmctl, GLIBC_2_2);
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
index e249522..c72ecd8 100644
--- a/sysdeps/unix/sysv/linux/arm/errlist.c
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,18 +18,18 @@
#include <sizes.h>
#include <errlist.h>
+#include <shlib-compat.h>
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-
-# define SYS_ERRLIST __new_sys_errlist
-# define SYS_NERR __new_sys_nerr
+#define SYS_ERRLIST __new_sys_errlist
+#define SYS_NERR __new_sys_nerr
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".data; .globl __old_sys_errlist; __old_sys_errlist:");
#endif
#include <sysdeps/gnu/errlist.c>
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".type __old_sys_errlist,%object;.size __old_sys_errlist,"
OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
@@ -44,12 +44,11 @@ symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0);
weak_alias (__old_sys_errlist, _old_sys_errlist);
symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0);
symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0);
-
-weak_alias (__new_sys_nerr, _new_sys_nerr)
-default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1);
-default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1);
-weak_alias (__new_sys_errlist, _new_sys_errlist)
-default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1);
-default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1);
-
#endif
+
+strong_alias (__new_sys_nerr, _new_sys_nerr)
+versioned_symbol (libc, __new_sys_nerr, _sys_nerr, GLIBC_2_1);
+versioned_symbol (libc, _new_sys_nerr, sys_nerr, GLIBC_2_1);
+strong_alias (__new_sys_errlist, _new_sys_errlist)
+versioned_symbol (libc, __new_sys_errlist, _sys_errlist, GLIBC_2_1);
+versioned_symbol (libc, _new_sys_errlist, sys_errlist, GLIBC_2_1);
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
index 5d3a9af..3d7464e 100644
--- a/sysdeps/unix/sysv/linux/arm/siglist.c
+++ b/sysdeps/unix/sysv/linux/arm/siglist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,41 +20,34 @@
#include <signal.h>
#include <sizes.h>
#include <libintl.h>
+#include <shlib-compat.h>
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
-# define SYS_SIGLIST __new_sys_siglist
-# define SYS_SIGABBREV __new_sys_sigabbrev
-#else
-# define SYS_SIGLIST _sys_siglist
-# define SYS_SIGABBREV _sys_sigabbrev
-#endif
-
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".data; .globl __old_sys_siglist; __old_sys_siglist:");
#endif
-const char *const SYS_SIGLIST[NSIG] =
+const char *const __new_sys_siglist[NSIG] =
{
#define init_sig(sig, abbrev, desc) [sig] desc,
#include "siglist.h"
#undef init_sig
};
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".type __old_sys_siglist,%object;.size __old_sys_siglist,"
OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:");
#endif
-const char *const SYS_SIGABBREV[NSIG] =
+const char *const __new_sys_sigabbrev[NSIG] =
{
#define init_sig(sig, abbrev, desc) [sig] abbrev,
#include "siglist.h"
#undef init_sig
};
-#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev,"
OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
@@ -62,15 +55,12 @@ extern const char *const *__old_sys_siglist;
extern const char *const *__old_sys_sigabbrev;
strong_alias (__old_sys_siglist, _old_sys_siglist)
-symbol_version (__old_sys_siglist, _sys_siglist, GLIBC_2.0);
-symbol_version (_old_sys_siglist, sys_siglist, GLIBC_2.0);
-symbol_version (__old_sys_sigabbrev, sys_sigabbrev, GLIBC_2.0);
+compat_symbol (libc, __old_sys_siglist, _sys_siglist, GLIBC_2_0);
+compat_symbol (libc, _old_sys_siglist, sys_siglist, GLIBC_2_0);
+compat_symbol (libc, __old_sys_sigabbrev, sys_sigabbrev, GLIBC_2_0);
+#endif
strong_alias (__new_sys_siglist, _new_sys_siglist)
-default_symbol_version (__new_sys_siglist, _sys_siglist, GLIBC_2.1);
-default_symbol_version (_new_sys_siglist, sys_siglist, GLIBC_2.1);
-default_symbol_version (__new_sys_sigabbrev, sys_sigabbrev, GLIBC_2.1);
-#else
-weak_alias (_sys_siglist, sys_siglist)
-weak_alias (_sys_sigabbrev, sys_sigabbrev)
-#endif
+versioned_symbol (libc, __new_sys_siglist, _sys_siglist, GLIBC_2_1);
+versioned_symbol (libc, _new_sys_siglist, sys_siglist, GLIBC_2_1);
+versioned_symbol (libc, __new_sys_sigabbrev, sys_sigabbrev, GLIBC_2_1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7189e3b80753a9b159029c19f9848bdcde7efbbf
commit 7189e3b80753a9b159029c19f9848bdcde7efbbf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 31 05:16:19 2000 +0000
Use D_PTR to access relocated entries in l_info.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index d0b5c48..ad79ef6 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -97,7 +97,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The GOT entries for the functions in the PLT have not been
filled in yet. Their initial contents are directed to the
PLT which arranges for the dynamic linker to be called. */
- plt = l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ plt = D_PTR (l, l_info[DT_PLTGOT]);
/* This function will be called to perform the relocation. */
if (!profile)
@@ -349,8 +349,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
- rela_plt = (void *) l->l_info[DT_JMPREL]->d_un.d_ptr;
- plte = (void *) (l->l_info[DT_PLTGOT]->d_un.d_ptr + 32);
+ rela_plt = (void *) D_PTR (l, l_info[DT_JMPREL]);
+ plte = (void *) (D_PTR (l, [DT_PLTGOT]) + 32);
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
@@ -480,7 +480,7 @@ elf_machine_rela (struct link_map *map,
than the dynamic linker's built-in definitions used
while loading those libraries. */
const Elf64_Sym *const dlsymtab
- = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
+ = (void *) D_PTR (map, l_info[DT_SYMTAB]);
sym_value -= map->l_addr;
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
sym_value -= reloc->r_addend;
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 78341fc..d95cb67 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -97,7 +97,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
in. Their initial contents will arrange when called to push an
index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3],
and then jump to _GLOBAL_OFFSET_TABLE[2]. */
- got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* The got[2] entry contains the address of a function which gets
@@ -413,7 +413,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
{
const char *strtab;
- strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
_dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
": Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e3ebca5..7a5dd35 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -78,7 +78,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
to push an offset into the .rela.plt section, push
_GLOBAL_OFFSET_TABLE_[1], and then jump to
_GLOBAL_OFFSET_TABLE_[2]. */
- got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* The got[2] entry contains the address of a function which gets
@@ -289,7 +289,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
extern char **_dl_argv;
const char *strtab;
- strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
+ strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
_dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
": Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17e74c26b7996d83fea6d4a4b92aa89449cea11a
commit 17e74c26b7996d83fea6d4a4b92aa89449cea11a
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Mar 29 11:18:48 2000 +0000
2000-03-29 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/fpu/fclrexcpt.c: Use shlib-compat macros.
* sysdeps/mips/fpu/fegetenv.c: Likewise.
* sysdeps/mips/fpu/fesetenv.c: Likewise.
* sysdeps/mips/fpu/feupdateenv.c: Likewise.
* sysdeps/mips/fpu/fgetexcptflg.c: Likewise.
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 93915d6..62bb8b1 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -1,7 +1,7 @@
/* Clear given exceptions in current floating-point environment.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <shlib-compat.h>
int
__feclearexcept (int excepts)
@@ -41,6 +42,8 @@ __feclearexcept (int excepts)
/* Success. */
return 0;
}
+#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feclearexcept, __old_feclearexcept)
-symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
+compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
index de263ca..d3ba0db 100644
--- a/sysdeps/mips/fpu/fegetenv.c
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -1,7 +1,7 @@
/* Store current floating-point environment.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <shlib-compat.h>
int
__fegetenv (fenv_t *envp)
@@ -29,6 +30,8 @@ __fegetenv (fenv_t *envp)
/* Success. */
return 0;
}
+#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetenv, __old_fegetenv)
-symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index 37e9027..f409ac5 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -1,7 +1,7 @@
/* Install given floating-point environment.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <shlib-compat.h>
int
__fesetenv (const fenv_t *envp)
@@ -32,6 +33,8 @@ __fesetenv (const fenv_t *envp)
/* Success. */
return 0;
}
+#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fesetenv, __old_fesetenv)
-symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
+compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
index 8c24881..4394059 100644
--- a/sysdeps/mips/fpu/feupdateenv.c
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -1,7 +1,7 @@
/* Install given floating-point environment and raise exceptions.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <shlib-compat.h>
int
__feupdateenv (const fenv_t *envp)
@@ -41,6 +42,8 @@ __feupdateenv (const fenv_t *envp)
/* Success. */
return 0;
}
+#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__feupdateenv, __old_feupdateenv)
-symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
+compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2);
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 64a2e11..17696db 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -1,7 +1,7 @@
/* Store current representation for exceptions.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -20,6 +20,7 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <shlib-compat.h>
int
__fegetexceptflag (fexcept_t *flagp, int excepts)
@@ -34,6 +35,8 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
/* Success. */
return 0;
}
+#ifdef SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
+#endif
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6955b182f170f934d78a8cdf4146662f84c48a38
commit 6955b182f170f934d78a8cdf4146662f84c48a38
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 26 20:30:58 2000 +0000
Clarify use of __ASSUME_32BITUIDS.
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 2d07b1f..93a9bf2 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -51,6 +51,9 @@ int __new_msgctl (int, int, struct msqid_ds *);
int
__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
{
+ /* This is a misnomer -- Alpha had 32-bit uids at the beginning
+ of time. However, msg_qnum and msg_qbytes changed size at
+ the same time the size of uid changed elsewhere. */
#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9290bfa084fb81cee8f7c64df9d9f52521d81ca
commit e9290bfa084fb81cee8f7c64df9d9f52521d81ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 26 20:29:55 2000 +0000
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Use a C comment, not an assembly comment.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 78a6f50..d0b5c48 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -254,7 +254,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop);
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */);
#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d4d1e01f94aa3692c65471e59a6378c47746776
commit 0d4d1e01f94aa3692c65471e59a6378c47746776
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 26 18:41:48 2000 +0000
Processor context definitions for Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
new file mode 100644
index 0000000..6e51efe
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
@@ -0,0 +1,94 @@
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* System V/ARM ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+#include <sys/elf.h>
+
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 16
+
+/* Container for all general registers. */
+typedef elf_gregset_t gregset_t;
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R0 = 0,
+#define R0 R0
+ R1 = 1,
+#define R1 R1
+ R2 = 2,
+#define R2 R2
+ R3 = 3,
+#define R3 R3
+ R4 = 4,
+#define R4 R4
+ R5 = 5,
+#define R5 R5
+ R6 = 6,
+#define R6 R6
+ R7 = 7,
+#define R7 R7
+ R8 = 8,
+#define R8 R8
+ R9 = 9,
+#define R9 R9
+ R10 = 10,
+#define R10 R10
+ R11 = 11,
+#define R11 R11
+ R12 = 12,
+#define R12 R12
+ R13 = 13,
+#define R13 R13
+ R14 = 14,
+#define R14 R14
+ R15 = 15,
+#define R15 R15
+};
+
+/* Structure to describe FPU registers. */
+typedef elf_fpregset_t fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[5];
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fa399b6c11863e78fd9febf12e61afb19789b84
commit 5fa399b6c11863e78fd9febf12e61afb19789b84
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 26 18:40:17 2000 +0000
Define _FPU_MASK_IM, _FPU_MASK_ZM, _FPU_MASK_OM, _FPU_MASK_UM,
_FPU_MASK_PM, _FPU_MASK_DM, _FPU_DEFAULT, and _FPU_IEEE. Change
_FPU_RESERVED.
diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h
index b5338c5..dfcfaab 100644
--- a/sysdeps/arm/fpu/fpu_control.h
+++ b/sysdeps/arm/fpu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,12 @@
/* We have a slight terminology confusion here. On the ARM, the register
* we're interested in is actually the FPU status word - the FPU control
* word is something different (which is implementation-defined and only
- * accessible from supervisor mode.)
+ * accessible from supervisor mode.)
*
* The FPSR looks like this:
*
* 31-24 23-16 15-8 7-0
- * | system ID | trap enable | system control | exception flags |
+ * | system ID | trap enable | system control | exception flags |
*
* We ignore the system ID bits; for interest's sake they are:
*
@@ -40,7 +40,7 @@
* The trap enable and exception flags are both structured like this:
*
* 7 - 5 4 3 2 1 0
- * | reserved | INX | UFL | OFL | DVZ | IVO |
+ * | reserved | INX | UFL | OFL | DVZ | IVO |
*
* where a `1' bit in the enable byte means that the trap can occur, and
* a `1' bit in the flags byte means the exception has occurred.
@@ -57,7 +57,7 @@
*
* 7-5 4 3 2 1 0
* | reserved | AC | EP | SO | NE | ND |
- *
+ *
* where the bits mean
*
* ND - no denormalised numbers (force them all to zero)
@@ -67,11 +67,27 @@
* AC - use alternate definition for C flag on compare operations
*/
-#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */
+/* masking of interrupts */
+#define _FPU_MASK_IM 0x00010000 /* invalid operation */
+#define _FPU_MASK_ZM 0x00020000 /* divide by zero */
+#define _FPU_MASK_OM 0x00040000 /* overflow */
+#define _FPU_MASK_UM 0x00080000 /* underflow */
+#define _FPU_MASK_PM 0x00100000 /* inexact */
+#define _FPU_MASK_DM 0x00000000 /* denormalized operation */
+
+/* The system id bytes cannot be changed.
+ Only the bottom 5 bits in the trap enable byte can be changed.
+ Only the bottom 5 bits in the system control byte can be changed.
+ Only the bottom 5 bits in the exception flags are used.
+ The exception flags are set by the fpu, but can be zeroed by the user. */
+#define _FPU_RESERVED 0xffe0e0e0 /* These bits are reserved. */
-/* The fdlibm code requires no interrupts for exceptions. Don't
- change the rounding mode, it would break long double I/O! */
-#define _FPU_DEFAULT 0x00001000 /* Default value. */
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+ no interrupts for exceptions, rounding to nearest. Changing the
+ rounding mode will break long double I/O. Turn on the AC bit,
+ the compiler generates code that assumes it is on. */
+#define _FPU_DEFAULT 0x00001000 /* Default value. */
+#define _FPU_IEEE 0x001f1000 /* Default + exceptions enabled. */
/* Type of the control word. */
typedef unsigned int fpu_control_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5a37cdb1be13330747dc453e2e401a5082ac74d
commit f5a37cdb1be13330747dc453e2e401a5082ac74d
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 24 15:27:37 2000 +0000
2000-03-24 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Use D_PTR to
access relocated entries in l_info.
(elf_machine_got_rel): Likewise.
(elf_machine_runtime_setup): Likewise.
* sysdeps/mips/mips64/dl-machine.h (elf_machine_got_rel): Likewise.
(elf_machine_runtime_setup): Likewise.
(__dl_runtime_resolve): Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index d0b20ae..188e9ae 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -224,11 +224,11 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const void *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \
+ = (const void *) D_PTR (l, l_info[DT_SYMTAB]); \
const char *strtab \
- = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
+ = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
+ = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
@@ -483,7 +483,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
+ const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
#define RESOLVE_GOTSYM(sym) \
({ \
@@ -495,7 +495,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -507,7 +507,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
+ sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
@@ -566,7 +566,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index fe4667a..01f9a95 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -137,7 +137,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
+ const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
#define RESOLVE_GOTSYM(sym) \
({ \
@@ -149,7 +149,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (ElfW(Addr) *) D_PTR (map, l_info[DT_PLTGOT]);
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -161,7 +161,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (ElfW(Sym) *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
+ sym = (ElfW(Sym) *) D_PTR (map, l_info[DT_SYMTAB]);
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
@@ -224,7 +224,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ got = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
@@ -337,10 +337,10 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \
- const char *strtab = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
+ = (const ElfW(Sym) *) D_PTR (l, l_info[DT_SYMTAB]); \
+ const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]); \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
+ = (const ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]); \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2535a9deff765c705239a1c3e85fa449e535680b
commit 2535a9deff765c705239a1c3e85fa449e535680b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 23 20:30:03 2000 +0000
MIPS specific additions to the internal definitions for the dynamic loader.
diff --git a/sysdeps/mips/elf/ldsodefs.h b/sysdeps/mips/elf/ldsodefs.h
new file mode 100644
index 0000000..2dc783b
--- /dev/null
+++ b/sysdeps/mips/elf/ldsodefs.h
@@ -0,0 +1,25 @@
+/* Run-time dynamic linker data structures for loaded ELF shared objects.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* The MIPS ABI specifies that the dynamic section has to be read-only. */
+
+#define DL_RO_DYN_SECTION 1
+
+#include <sysdeps/generic/ldsodefs.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9748d41f6a905dbe42b583931a6fb6af61170913
commit 9748d41f6a905dbe42b583931a6fb6af61170913
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:29:17 2000 +0000
AIX specific ucontext.h.
diff --git a/sysdeps/unix/sysv/aix/sys/ucontext.h b/sysdeps/unix/sysv/aix/sys/ucontext.h
new file mode 100644
index 0000000..c2ebf0c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sys/ucontext.h
@@ -0,0 +1,113 @@
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <bits/types.h>
+#include <bits/sigset.h>
+
+
+/* Alternate, preferred interface. */
+typedef struct sigaltstack
+ {
+ void *ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ int __pad[4];
+ } stack_t;
+
+
+/* Forward declaration of AIX type. */
+typedef struct label_t label_t;
+
+
+
+typedef unsigned int kvmhandle_t;
+typedef struct
+ {
+ unsigned long int __alloc;
+ kvmhandle_t __srval[16];
+ } adspace_t;
+
+
+
+#define _NGPRS 32
+#define _NFPRS 32
+
+struct __mstsafe
+{
+ struct __mstsave *__prev; /* Previous save area. */
+ label_t *__kjmpbuf; /* Pointer to saved context. */
+ char *__stackfix; /* Stack fix pointer. */
+ char __intpri; /* Interrupt priority. */
+ char __backt; /* Back-track flag. */
+ char __rsvd[2]; /* Reserved. */
+ __pid_t __curid; /* Copy of curid. */
+
+ int __excp_type; /* Exception type for debugger. */
+ unsigned long int __iar; /* Instruction address register. */
+ unsigned long int __msr; /* Machine state register. */
+ unsigned long int __cr; /* Condition register. */
+ unsigned long int __lr; /* Link register. */
+ unsigned long int __ctr; /* Count register. */
+ unsigned long int __xer; /* Fixed point exception. */
+ unsigned long int __mq; /* Multiply/quotient register. */
+ unsigned long int __tid; /* TID register. */
+ unsigned long int __fpscr; /* Floating point status reg. */
+ char __fpeu; /* Floating point ever used. */
+ char __fpinfo; /* Floating point status flags. */
+ char __pad[2]; /* Pad to dword boundary. */
+ /* 1 implies state is in mstext */
+ unsigned long int __except[5]; /* exception structure. */
+ char __pad1[4]; /* Old bus field. */
+ unsigned long int __o_iar; /* Old iar (for longjmp excpt). */
+ unsigned long int __o_toc; /* Old toc (for longjmp excpt). */
+ unsigned long int __o_arg1; /* Old arg1 (for longjmp excpt). */
+ unsigned long int __excbranch; /* If not NULL, address to branch
+ to on exception. Used by
+ assembler routines for low
+ cost exception handling. */
+ unsigned long int __fpscrx; /* Software extension to fpscr. */
+ unsigned long int __o_vaddr; /* Saved vaddr for vmexception. */
+ unsigned long int __cachealign[7]; /* Reserved. */
+ adspace_t __as; /* Segment registers. */
+ unsigned long int __gpr[_NGPRS]; /* General purpose registers. */
+ double __fpr[_NFPRS]; /* Floating point registers. */
+ };
+
+typedef struct mcontext_t
+ {
+ struct __mstsafe __jmp_context;
+ } mcontext_t;
+
+
+typedef struct ucontext_t
+ {
+ int __sc_onstack; /* Sigstack state to restore. */
+ __sigset_t uc_sigmask; /* The set of signals that are blocked when
+ this context is active. */
+ int __sc_uerror; /* u_error to restore. */
+ mcontext_t uc_mcontext; /* Machine-specific image of saved context. */
+ struct ucontext_t *uc_link; /* context resumed after this one returns */
+ stack_t uc_stack; /* stack used by context */
+ int __pad[4];
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e776840cf1c6b56740ce2af61834c4e1814fa606
commit e776840cf1c6b56740ce2af61834c4e1814fa606
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:29:10 2000 +0000
AIX specific param.h.
diff --git a/sysdeps/unix/sysv/aix/sys/param.h b/sysdeps/unix/sysv/aix/sys/param.h
new file mode 100644
index 0000000..e128d8d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sys/param.h
@@ -0,0 +1,18 @@
+/* This file should contain various parameter macros appropriate for the
+ machine and operating system. There is no standard set of macros; this
+ file is just for compatibility with programs written for Unix that
+ expect it to define things. On Unix systems that do not have their own
+ sysdep version of this file, it is generated at build time by examining
+ the installed headers on the system. */
+
+#include <limits.h>
+
+#define MAXSYMLINKS 1
+#define MAXPATHLEN 256
+
+/* The pagesize is 4096. */
+#define EXEC_PAGESIZE 4096
+
+/* Macros for min/max. */
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=244c5f9374a665fa5a7d3a2ce49c80269df3cb65
commit 244c5f9374a665fa5a7d3a2ce49c80269df3cb65
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:28:44 2000 +0000
Code to convert AIX stat structure to Linux form..
diff --git a/sysdeps/unix/sysv/aix/linux/statconv.c b/sysdeps/unix/sysv/aix/linux/statconv.c
new file mode 100644
index 0000000..5333e23
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/statconv.c
@@ -0,0 +1,35 @@
+void
+__stat_aix_to_linux (const struct stat *aixstat, struct stat *linuxstat)
+{
+ linuxstat->st_dev = linux_makedev (major (aixstat->st_dev),
+ minor (aixstat->st_dev));
+ linuxstat->st_ino = aixstat->st_ino;
+ /* The following assumes that the mode values are the same on AIX
+ and Linux which is true in the moment. */
+ linuxstat->st_mode = aixstat->st_mode;
+ linuxstat->st_nlink = aixstat->st_nlink;
+ /* There is no st_flag field in Linux. */
+ linuxstat->st_uid = aixstat->st_uid;
+ linuxstat->st_gid = aixstat->st_gid;
+ linuxstat->st_rdev = linux_makedev (major (aixstat->st_rdev),
+ minor (aixstat->st_rdev));
+ linuxstat->st_size = aixstat->st_size;
+ linuxstat->st_atime = aixstat->st_atime;
+ linuxstat->st_mtime = aixstat->st_mtime;
+ linuxstat->st_ctime = aixstat->st_ctime;
+ linuxstat->st_blksize = aixstat->st_blksize;
+ linuxstat->st_blocks = aixstat->st_blocks;
+ /* There is no st_vfstype in Linux. */
+ /* There is no st_vfs in Linux. */
+ /* There is no st_type in Linux. */
+ /* There is no st_gen in Linux. */
+
+ /* File in the padding values with repeatable values. */
+ linuxstat->__pad1 = 0;
+ linuxstat->__pad2 = 0;
+ linuxstat->__unused1 = 0;
+ linuxstat->__unused2 = 0;
+ linuxstat->__unused3 = 0;
+ linuxstat->__unused4 = 0;
+ linuxstat->__unused5 = 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d01d7c6a7c785c10707b1cbb5dca0de1737627b6
commit d01d7c6a7c785c10707b1cbb5dca0de1737627b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:28:24 2000 +0000
Definition of Linux stat structure.
diff --git a/sysdeps/unix/sysv/aix/linux/linux-stat.h b/sysdeps/unix/sysv/aix/linux/linux-stat.h
new file mode 100644
index 0000000..01a2d4d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/linux-stat.h
@@ -0,0 +1,131 @@
+/* Copyright (C) 1992, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER_LINUX_OLD 1
+#define _STAT_VER_KERNEL 1
+#define _STAT_VER_SVR4 2
+#define _STAT_VER_LINUX 3
+#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
+
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+#ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino; /* File serial number. */
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+#ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+#else
+ __off64_t st_size; /* Size of file, in bytes. */
+#endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#endif
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+
+/* Thi macro (with a different name) is normally in <sys/sysmacros.h>. */
+#define linux_makedev(major, minor) (((major) << 8 | (minor)))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea773c5b66e2f49d7e3607f7bacba8bd4f65c8f6
commit ea773c5b66e2f49d7e3607f7bacba8bd4f65c8f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:28:12 2000 +0000
Definition of Linux error codes.
diff --git a/sysdeps/unix/sysv/aix/linux/linux-errno.h b/sysdeps/unix/sysv/aix/linux/linux-errno.h
new file mode 100644
index 0000000..b7cf0a5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/linux-errno.h
@@ -0,0 +1,135 @@
+#ifndef _LINUX_ERRNO_H
+#define _LINUX_ERRNO_H
+
+#define LINUX_EPERM 1
+#define LINUX_ENOENT 2
+#define LINUX_ESRCH 3
+#define LINUX_EINTR 4
+#define LINUX_EIO 5
+#define LINUX_ENXIO 6
+#define LINUX_E2BIG 7
+#define LINUX_ENOEXEC 8
+#define LINUX_EBADF 9
+#define LINUX_ECHILD 10
+#define LINUX_EAGAIN 11
+#define LINUX_ENOMEM 12
+#define LINUX_EACCES 13
+#define LINUX_EFAULT 14
+#define LINUX_ENOTBLK 15
+#define LINUX_EBUSY 16
+#define LINUX_EEXIST 17
+#define LINUX_EXDEV 18
+#define LINUX_ENODEV 19
+#define LINUX_ENOTDIR 20
+#define LINUX_EISDIR 21
+#define LINUX_EINVAL 22
+#define LINUX_ENFILE 23
+#define LINUX_EMFILE 24
+#define LINUX_ENOTTY 25
+#define LINUX_ETXTBSY 26
+#define LINUX_EFBIG 27
+#define LINUX_ENOSPC 28
+#define LINUX_ESPIPE 29
+#define LINUX_EROFS 30
+#define LINUX_EMLINK 31
+#define LINUX_EPIPE 32
+#define LINUX_EDOM 33
+#define LINUX_ERANGE 34
+#define LINUX_EDEADLK 35
+#define LINUX_ENAMETOOLONG 36
+#define LINUX_ENOLCK 37
+#define LINUX_ENOSYS 38
+#define LINUX_ENOTEMPTY 39
+#define LINUX_ELOOP 40
+#define LINUX_ENOMSG 42
+#define LINUX_EIDRM 43
+#define LINUX_ECHRNG 44
+#define LINUX_EL2NSYNC 45
+#define LINUX_EL3HLT 46
+#define LINUX_EL3RST 47
+#define LINUX_ELNRNG 48
+#define LINUX_EUNATCH 49
+#define LINUX_ENOCSI 50
+#define LINUX_EL2HLT 51
+#define LINUX_EBADE 52
+#define LINUX_EBADR 53
+#define LINUX_EXFULL 54
+#define LINUX_ENOANO 55
+#define LINUX_EBADRQC 56
+#define LINUX_EBADSLT 57
+#define LINUX_EDEADLOCK 58
+#define LINUX_EBFONT 59
+#define LINUX_ENOSTR 60
+#define LINUX_ENODATA 61
+#define LINUX_ETIME 62
+#define LINUX_ENOSR 63
+#define LINUX_ENONET 64
+#define LINUX_ENOPKG 65
+#define LINUX_EREMOTE 66
+#define LINUX_ENOLINK 67
+#define LINUX_EADV 68
+#define LINUX_ESRMNT 69
+#define LINUX_ECOMM 70
+#define LINUX_EPROTO 71
+#define LINUX_EMULTIHOP 72
+#define LINUX_EDOTDOT 73
+#define LINUX_EBADMSG 74
+#define LINUX_EOVERFLOW 75
+#define LINUX_ENOTUNIQ 76
+#define LINUX_EBADFD 77
+#define LINUX_EREMCHG 78
+#define LINUX_ELIBACC 79
+#define LINUX_ELIBBAD 80
+#define LINUX_ELIBSCN 81
+#define LINUX_ELIBMAX 82
+#define LINUX_ELIBEXEC 83
+#define LINUX_EILSEQ 84
+#define LINUX_ERESTART 85
+#define LINUX_ESTRPIPE 86
+#define LINUX_EUSERS 87
+#define LINUX_ENOTSOCK 88
+#define LINUX_EDESTADDRREQ 89
+#define LINUX_EMSGSIZE 90
+#define LINUX_EPROTOTYPE 91
+#define LINUX_ENOPROTOOPT 92
+#define LINUX_EPROTONOSUPPORT 93
+#define LINUX_ESOCKTNOSUPPORT 94
+#define LINUX_EOPNOTSUPP 95
+#define LINUX_EPFNOSUPPORT 96
+#define LINUX_EAFNOSUPPORT 97
+#define LINUX_EADDRINUSE 98
+#define LINUX_EADDRNOTAVAIL 99
+#define LINUX_ENETDOWN 100
+#define LINUX_ENETUNREACH 101
+#define LINUX_ENETRESET 102
+#define LINUX_ECONNABORTED 103
+#define LINUX_ECONNRESET 104
+#define LINUX_ENOBUFS 105
+#define LINUX_EISCONN 106
+#define LINUX_ENOTCONN 107
+#define LINUX_ESHUTDOWN 108
+#define LINUX_ETOOMANYREFS 109
+#define LINUX_ETIMEDOUT 110
+#define LINUX_ECONNREFUSED 111
+#define LINUX_EHOSTDOWN 112
+#define LINUX_EHOSTUNREACH 113
+#define LINUX_EALREADY 114
+#define LINUX_EINPROGRESS 115
+#define LINUX_ESTALE 116
+#define LINUX_EUCLEAN 117
+#define LINUX_ENOTNAM 118
+#define LINUX_ENAVAIL 119
+#define LINUX_EISNAM 120
+#define LINUX_EREMOTEIO 121
+#define LINUX_EDQUOT 122
+
+#define LINUX_ENOMEDIUM 123
+#define LINUX_EMEDIUMTYPE 124
+
+/* Should never be seen by user programs */
+#define LINUX_ERESTARTSYS 512
+#define LINUX_ERESTARTNOINTR 513
+#define LINUX_ERESTARTNOHAND 514
+#define LINUX_ENOIOCTLCMD 515
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d5037b5bb0e44db52bbc819c06d592af60026f0
commit 0d5037b5bb0e44db52bbc819c06d592af60026f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:27:57 2000 +0000
Code to convert error codes from AIX to Linux.
diff --git a/sysdeps/unix/sysv/aix/linux/errnoconv.c b/sysdeps/unix/sysv/aix/linux/errnoconv.c
new file mode 100644
index 0000000..95bd5a3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/errnoconv.c
@@ -0,0 +1,125 @@
+/* Convert the error number the AIX kernel returns to what the Linux
+ application expects. */
+#include <errno.h>
+#include "linux-errno.h"
+
+
+static int mapping[] =
+{
+ [EPERM] = LINUX_EPERM,
+ [ENOENT] = LINUX_ENOENT,
+ [ESRCH] = LINUX_ESRCH,
+ [EINTR] = LINUX_EINTR,
+ [EIO] = LINUX_EIO,
+ [ENXIO] = LINUX_ENXIO,
+ [E2BIG] = LINUX_E2BIG,
+ [ENOEXEC] = LINUX_ENOEXEC,
+ [EBADF] = LINUX_EBADF,
+ [ECHILD] = LINUX_ECHILD,
+ [EAGAIN] = LINUX_EAGAIN,
+ [ENOMEM] = LINUX_ENOMEM,
+ [EACCES] = LINUX_EACCES,
+ [EFAULT] = LINUX_EFAULT,
+ [ENOTBLK] = LINUX_ENOTBLK,
+ [EBUSY] = LINUX_EBUSY,
+ [EEXIST] = LINUX_EEXIST,
+ [EXDEV] = LINUX_EXDEV,
+ [ENODEV] = LINUX_ENODEV,
+ [ENOTDIR] = LINUX_ENOTDIR,
+ [EISDIR] = LINUX_EISDIR,
+ [EINVAL] = LINUX_EINVAL,
+ [ENFILE] = LINUX_ENFILE,
+ [EMFILE] = LINUX_EMFILE,
+ [ENOTTY] = LINUX_ENOTTY,
+ [ETXTBSY] = LINUX_ETXTBSY,
+ [EFBIG] = LINUX_EFBIG,
+ [ENOSPC] = LINUX_ENOSPC,
+ [EIDRM] = LINUX_EIDRM,
+ [ECHRNG] = LINUX_ECHRNG,
+ [EL2NSYNC] = LINUX_EL2NSYNC,
+ [EL3HLT] = LINUX_EL3HLT,
+ [EL3RST] = LINUX_EL3RST,
+ [ELNRNG] = LINUX_ELNRNG,
+ [EUNATCH] = LINUX_EUNATCH,
+ [ENOCSI] = LINUX_ENOCSI,
+ [EL2HLT] = LINUX_EL2HLT,
+ [EDEADLK] = LINUX_EDEADLK,
+ [ENOTREADY] = LINUX_ENOTREADY,
+ // EWPROTECT: no Linux equivalent
+ // EFORMAT: no Linux equivalent
+ [ENOLCK] = LINUX_ENOLCK,
+ // ENOCONNECT: No Linux equivalent
+ [ESTALE] = LINUX_ESTALE,
+ // EDIST: no Linux equivalent
+ [54] = LINUX_EAGAIN, // EWOULDBLOCK
+ [EINPROGRESS] = LINUX_EINPROGRESS,
+ [EALREADY] = LINUX_EALREADY,
+ [ENOTSOCK] = LINUX_ENOTSOCK,
+ [EDESTADDRREQ] = LINUX_EDESTADDRREQ,
+ [EMSGSIZE] = LINUX_EMSGSIZE,
+ [EPROTOTYPE] = LINUX_EPROTOTYPE,
+ [ENOPROTOOPT] = LINUX_ENOPROTOOPT,
+ [EPROTONOSUPPORT] = LINUX_EPROTONOSUPPORT,
+ [ESOCKTNOSUPPORT] = LINUX_ESOCKTNOSUPPORT,
+ [EOPNOTSUPP] = LINUX_EOPNOTSUPP,
+ [EPFNOSUPPORT] = LINUX_EPFNOSUPPORT,
+ [EAFNOSUPPORT] = LINUX_EAFNOSUPPORT,
+ [EADDRINUSE] = LINUX_EADDRINUSE,
+ [EADDRNOTAVAIL] = LINUX_EADDRNOTAVAIL,
+ [ENETDOWN] = LINUX_ENETDOWN,
+ [ENETUNREACH] = LINUX_ENETUNREACH,
+ [ENETRESET] = LINUX_ENETRESET,
+ [ECONNABORTED] = LINUX_ECONNABORTED,
+ [ECONNRESET] = LINUX_ECONNRESET,
+ [ENOBUFS] = LINUX_ENOBUFS,
+ [EISCONN] = LINUX_EISCONN,
+ [ENOTCONN] = LINUX_ENOTCONN,
+ [ESHUTDOWN] = LINUX_ESHUTDOWN,
+ [ETIMEDOUT] = LINUX_ETIMEDOUT,
+ [ECONNREFUSED] = LINUX_ECONNREFUSED,
+ [EHOSTDOWN] = LINUX_EHOSTDOWN,
+ [EHOSTUNREACH] = LINUX_EHOSTUNREACH,
+ [ERESTART] = LINUX_ERESTART,
+ [EPROCLIM] = LINUX_EPROCLIM,
+ [EUSERS] = LINUX_EUSERS,
+ [ELOOP] = LINUX_ELOOP,
+ [ENAMETOOLONG] = LINUX_ENAMETOOLONG,
+ [87] = LINUX_ENOTEMPTY, // ENOTEMPTY
+ [EDQUOT] = LINUX_EDQUOT,
+ [ECORRUPT] = LINUX_ECORRUPT,
+ [EREMOTE] = LINUX_EREMOTE,
+ [ENOSYS] = LINUX_ENOSYS,
+ [EMEDIA] = LINUX_EMEDIA,
+ [ESOFT] = LINUX_ESOFT,
+ [ENOATTR] = LINUX_ENOATTR,
+ [ESAD] = LINUX_ESAD,
+ // ENOTRUST: no Linux equivalent
+ [ETOOMANYREFS] = LINUX_ETOOMANYREFS,
+ [EILSEQ] = LINUX_EILSEQ,
+ [ECANCELED] = LINUX_ECANCELED,
+ [ENOSR] = LINUX_ENOSR,
+ [ETIME] = LINUX_ETIME,
+ [EBADMSG] = LINUX_EBADMSG,
+ [EPROTO] = LINUX_EPROTO,
+ [ENODATA] = LINUX_ENODATA,
+ [ENOSTR] = LINUX_ENOSTR,
+ [ENOTSUP] = LINUX_ENOTSUP,
+ [EMULTIHOP] = LINUX_EMULTIHOP,
+ [ENOLINK] = LINUX_ENOLINK,
+ [EOVERFLOW] = LINUX_EOVERFLOW
+};
+
+
+int
+__errno_aix_to_linux (int err)
+{
+ int conv;
+
+ if (err >= 0 && err < (sizeof (mapping) / sizeof (mapping[0]))
+ && ((conv = mapping[err]) != 0 || err == 0))
+ return conv;
+
+ /* The error value is not known. Create a special value which can
+ be easily recognized as an invalid result. */
+ return 512 + err;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f57e29a591daea5cc3fae43a1aaa87c6ca20df46
commit f57e29a591daea5cc3fae43a1aaa87c6ca20df46
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:27:18 2000 +0000
AIX definitions of library names.
diff --git a/sysdeps/unix/sysv/aix/gnu/lib-names.h b/sysdeps/unix/sysv/aix/gnu/lib-names.h
new file mode 100644
index 0000000..d41f822
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/gnu/lib-names.h
@@ -0,0 +1,31 @@
+#ifndef __GNU_LIB_NAMES_H
+#define __GNU_LIB_NAMES_H 1
+
+#define LIBBROKENLOCALE_SO "libBrokenLocale.a"
+#define LIBCRYPT_SO "libcrypt.a"
+#define LIBC_SO "libc.a"
+#define LIBDB1_SO "libdb1.a"
+#define LIBDB_SO "libdb.a"
+#define LIBDL_SO "libdl.a"
+#define LIBM_SO "libm.a"
+#define LIBNOVERSION_SO "libNoVersion.a"
+#define LIBNSL_SO "libnsl.a"
+#define LIBNSS1_COMPAT_SO "libnss1_compat.a"
+#define LIBNSS1_DB_SO "libnss1_db.a"
+#define LIBNSS1_DNS_SO "libnss1_dns.a"
+#define LIBNSS1_FILES_SO "libnss1_files.a"
+#define LIBNSS1_NIS_SO "libnss1_nis.a"
+#define LIBNSS_COMPAT_SO "libnss_compat.a"
+#define LIBNSS_DB_SO "libnss_db.a"
+#define LIBNSS_DNS_SO "libnss_dns.a"
+#define LIBNSS_FILES_SO "libnss_files.a"
+#define LIBNSS_HESIOD_SO "libnss_hesiod.a"
+#define LIBNSS_LDAP_SO "libnss_ldap.a"
+#define LIBNSS_NISPLUS_SO "libnss_nisplus.a"
+#define LIBNSS_NIS_SO "libnss_nis.a"
+#define LIBPTHREAD_SO "libpthread.a"
+#define LIBRESOLV_SO "libresolv.a"
+#define LIBRT_SO "librt.a"
+#define LIBUTIL_SO "libutil.a"
+
+#endif /* gnu/lib-names.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=908f98f274806d8279fbb0dae0226ae2cc55310b
commit 908f98f274806d8279fbb0dae0226ae2cc55310b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:52 2000 +0000
AIX definitions for utsname.h.
diff --git a/sysdeps/unix/sysv/aix/bits/utsname.h b/sysdeps/unix/sysv/aix/bits/utsname.h
new file mode 100644
index 0000000..e6958f0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/utsname.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
+#define _UTSNAME_LENGTH 32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9846a8a47ecfe5eededc68d8d3e0ba33cd0daefe
commit 9846a8a47ecfe5eededc68d8d3e0ba33cd0daefe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:45 2000 +0000
AIX definitions for utmpx.h.
diff --git a/sysdeps/unix/sysv/aix/bits/utmpx.h b/sysdeps/unix/sysv/aix/bits/utmpx.h
new file mode 100644
index 0000000..7a7bce2
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/utmpx.h
@@ -0,0 +1,67 @@
+/* Structures and defenitions for the user accounting database. AIX.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTMPX_H
+# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
+#endif
+
+#include <bits/types.h>
+#include <sys/time.h>
+
+
+#ifdef __USE_GNU
+# include <paths.h>
+# define _PATH_UTMPX _PATH_UTMP
+# define _PATH_WTMPX _PATH_WTMP
+#endif
+
+
+#define __UT_LINESIZE 12
+#define __UT_NAMESIZE 8
+#define __UT_HOSTSIZE 16
+
+
+/* The structure describing an entry in the user accounting database. */
+struct utmpx
+{
+ char ut_user[__UT_NAMESIZE]; /* Username. */
+ char ut_id[14]; /* Inittab ID. */
+ char ut_line[__UT_LINESIZE]; /* Devicename. */
+ short int ut_type; /* Type of login. */
+ __pid_t ut_pid; /* Process ID of login process. */
+ struct timeval ut_tv; /* Time entry was made. */
+ char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */
+};
+
+
+/* Values for the `ut_type' field of a `struct utmpx'. */
+#define EMPTY 0 /* No valid user accounting information. */
+
+#define RUN_LVL 1 /* The system's runlevel. */
+#define BOOT_TIME 2 /* Time of system boot. */
+#define NEW_TIME 3 /* Time after system clock changed. */
+#define OLD_TIME 4 /* Time when system clock changed. */
+
+#define INIT_PROCESS 5 /* Process spawned by the init process. */
+#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */
+#define USER_PROCESS 7 /* Normal process. */
+#define DEAD_PROCESS 8 /* Terminated process. */
+
+#ifdef __USE_GNU
+# define ACCOUNTING 9 /* System accounting. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f97043b7917b5dc71333c61749f4e33ce74cf33e
commit f97043b7917b5dc71333c61749f4e33ce74cf33e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:41 2000 +0000
AIX definitions for utmp.h.
diff --git a/sysdeps/unix/sysv/aix/bits/utmp.h b/sysdeps/unix/sysv/aix/bits/utmp.h
new file mode 100644
index 0000000..0484409
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/utmp.h
@@ -0,0 +1,73 @@
+/* The `struct utmp' type, describing entries in the utmp file. AIX.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTMP_H
+# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
+#endif
+
+
+#include <time.h>
+
+#define _PATH_UTMP "/etc/utmp"
+#define _PATH_WTMP "/var/adm/wtmp"
+#define _PATH_LASTLOG "/var/adm/lastlog"
+
+
+#define UT_LINESIZE 12
+#define UT_NAMESIZE 8
+#define UT_HOSTSIZE 16
+
+
+struct utmp
+ {
+#define ut_name ut_user
+ char ut_user[UT_NAMESIZE];
+ char ut_id[14];
+ char ut_line[UT_LINESIZE];
+ short int ut_type;
+ short int ut_pid;
+ struct exit_status
+ {
+ short int e_termination;
+ short int e_exit;
+ } ut_exit;
+ __time_t ut_time;
+ char ut_host[UT_HOSTSIZE];
+ };
+
+
+/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, and
+ UT_ID fields. */
+#define _HAVE_UT_TYPE 1
+#define _HAVE_UT_PID 1
+#define _HAVE_UT_ID 1
+#define _HAVE_UT_HOST 1
+
+
+/* Values for the `ut_type' field of a `struct utmp'. */
+#define EMPTY 0
+#define RUN_LVL 1
+#define BOOT_TIME 2
+#define OLD_TIME 3
+#define NEW_TIME 4
+#define INIT_PROCESS 5
+#define LOGIN_PROCESS 6
+#define USER_PROCESS 7
+#define DEAD_PROCESS 8
+#define ACCOUNTING 9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=069d6bb93752fa810edfb3963363a3e1327ba874
commit 069d6bb93752fa810edfb3963363a3e1327ba874
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:35 2000 +0000
AIX definitions for uio.h.
diff --git a/sysdeps/unix/sysv/aix/bits/uio.h b/sysdeps/unix/sysv/aix/bits/uio.h
new file mode 100644
index 0000000..5868ccc
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/uio.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UIO_H
+# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+
+/* Size of object which can be written atomically.
+
+ This macro has different values in different kernel versions. The
+ latest versions of ther kernel use 1024 and this is good choice. Since
+ the C library implementation of readv/writev is able to emulate the
+ functionality even if the currently running kernel does not support
+ this large value the readv/writev call will not fail because of this. */
+#define UIO_MAXIOV 16
+
+
+/* Structure for scatter/gather I/O. */
+struct iovec
+ {
+ void *iov_base; /* Pointer to data. */
+ size_t iov_len; /* Length of data. */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0773f9189169e8abbf6ee1fe1b4ea47371599561
commit 0773f9189169e8abbf6ee1fe1b4ea47371599561
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:28 2000 +0000
AIX definitions for types.h.
diff --git a/sysdeps/unix/sysv/aix/bits/types.h b/sysdeps/unix/sysv/aix/bits/types.h
new file mode 100644
index 0000000..c41b34c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/types.h
@@ -0,0 +1,148 @@
+/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+#ifdef __GNUC__
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
+#else
+typedef struct
+ {
+ long int __val[2];
+ } __quad_t;
+typedef struct
+ {
+ __u_long __val[2];
+ } __u_quad_t;
+#endif
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#ifdef __GNUC__
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+typedef __quad_t *__qaddr_t;
+
+typedef __u_long __dev_t; /* Type of device numbers. */
+typedef __u_int __uid_t; /* Type of user identifications. */
+typedef __u_int __gid_t; /* Type of group identifications. */
+typedef __u_long __ino_t; /* Type of file serial numbers. */
+typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
+typedef short int __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef int __pid_t; /* Type of process identifications. */
+typedef long int __ssize_t; /* Type of a byte count, or error. */
+typedef __u_long __rlim_t; /* Type of resource counts. */
+typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */
+typedef __u_long __id_t; /* General type for ID. */
+
+typedef struct
+ {
+ unsigned long int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
+
+/* Everythin' else. */
+typedef long int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef __u_long __useconds_t;
+typedef int __suseconds_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+
+typedef int __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef unsigned long int __fd_mask;
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. Otherwise avoid the name
+ from the global namespace. */
+#ifdef __USE_XOPEN
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
+#else
+ __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
+#endif
+ } __fd_set;
+
+
+typedef long int __key_t;
+
+/* Type to represent block size. */
+typedef int __blksize_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef int __blkcnt_t;
+typedef __quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef __u_long __fsblkcnt_t;
+typedef __u_quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef __u_long __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
+/* Type of file serial numbers. */
+typedef __u_quad_t __ino64_t;
+
+/* Type of file sizes and offsets. */
+typedef __loff_t __off64_t;
+
+/* Used in XTI. */
+typedef int __t_scalar_t;
+typedef unsigned int __t_uscalar_t;
+
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+typedef int __intptr_t;
+
+#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15d3faa27613b29b8152d8461d102dbb7d8b1a73
commit 15d3faa27613b29b8152d8461d102dbb7d8b1a73
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:22 2000 +0000
AIX definitions for statfs.h.
diff --git a/sysdeps/unix/sysv/aix/bits/statfs.h b/sysdeps/unix/sysv/aix/bits/statfs.h
new file mode 100644
index 0000000..2877339
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/statfs.h
@@ -0,0 +1,77 @@
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
+
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
+
+struct statfs
+ {
+ int f_version;
+ int f_type;
+ int f_bsize;
+ /* The following five elements have type `int' since AIX's fsfilcnt_t
+ and fsblkcnt_t types do not fit. */
+ int f_blocks;
+ int f_bfree;
+ int f_bavail;
+ int f_files;
+ int f_ffree;
+ __fsid_t f_fsid;
+ int f_vfstype;
+ int f_fsize;
+ int f_vfsnumber;
+ int f_vfsoff;
+ int f_vfslen;
+ int f_vfsvers;
+ char f_fname[32];
+ char f_fpack[32];
+ int f_name_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+/* XXX There seems to be no 64-bit versio of this structure. */
+struct statfs64
+ {
+ int f_version;
+ int f_type;
+ int f_bsize;
+ /* The following five elements have type `int' since AIX's fsfilcnt_t
+ and fsblkcnt_t types do not fit. */
+ int f_blocks;
+ int f_bfree;
+ int f_bavail;
+ int f_files;
+ int f_ffree;
+ __fsid_t f_fsid;
+ int f_vfstype;
+ int f_fsize;
+ int f_vfsnumber;
+ int f_vfsoff;
+ int f_vfslen;
+ int f_vfsvers;
+ char f_fname[32];
+ char f_fpack[32];
+ int f_name_max;
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATFS_F_NAME_MAX
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c7386670c33157e1a51688c940458487e538632
commit 9c7386670c33157e1a51688c940458487e538632
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:18 2000 +0000
AIX definitions for stat.h.
diff --git a/sysdeps/unix/sysv/aix/bits/stat.h b/sysdeps/unix/sysv/aix/bits/stat.h
new file mode 100644
index 0000000..252662e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/stat.h
@@ -0,0 +1,124 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+#ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino; /* File serial number. */
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ unsigned short int st_flag; /* Flag word. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+#ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+#else
+ int st_ssize; /* Size of file, in bytes. */
+#endif
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#endif
+ int st_vfstype; /* Type of the filesystem. */
+ unsigned int st_vfs; /* Vfs number. */
+ unsigned int st_type; /* Vnode type. */
+ unsigned int st_gen; /* Inode generation number. */
+
+#define _STATBUF_RESERVED_SPACE 9
+ unsigned int st_reserved[_STATBUF_RESERVED_SPACE];
+
+#ifdef __USE_FILE_OFFSET64
+ unsigned int st_padto_ll;
+ __off64_t st_size; /* 64 bit file size in bytes. */
+#endif
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ unsigned short int st_flag; /* Flag word. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ int st_ssize; /* Size of file, in bytes. */
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ int st_vfstype; /* Type of the filesystem. */
+ unsigned int st_vfs; /* Vfs number. */
+ unsigned int st_type; /* Vnode type. */
+ unsigned int st_gen; /* Inode generation number. */
+ unsigned int st_reserved[_STATBUF_RESERVED_SPACE];
+ unsigned int st_padto_ll;
+ __off64_t st_size; /* 64 bit file size in bytes. */
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d451c6fa41d56823b80a429ebe573d9ff9d6c3f7
commit d451c6fa41d56823b80a429ebe573d9ff9d6c3f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:12 2000 +0000
AIX definitions for socket.h.
diff --git a/sysdeps/unix/sysv/aix/bits/socket.h b/sysdeps/unix/sysv/aix/bits/socket.h
new file mode 100644
index 0000000..e897354
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/socket.h
@@ -0,0 +1,291 @@
+/* System-specific socket constants and types. AIX version.
+ Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef __BITS_SOCKET_H
+#define __BITS_SOCKET_H
+
+#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define __need_size_t
+#define __need_NULL
+#include <stddef.h>
+
+#include <limits.h>
+#include <sys/types.h>
+
+/* Type for length arguments in socket calls. */
+typedef unsigned int socklen_t;
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_CONN_DGRAM = 6 /* Conneciton datagram. */
+#define SOCK_CONN_DGRAM SOCK_CONN_DGRAM
+};
+
+/* Protocol families. */
+#define PF_UNSPEC 0 /* Unspecified. */
+#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
+#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
+#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
+#define PF_INET 2 /* IP protocol family. */
+#define PF_IMPLINK 3 /* ARPAnet IMP addresses. */
+#define PF_PUP 4 /* PUP protocols (e.g., BSP). */
+#define PF_CHAOS 5 /* MIT CHAOS protocols. */
+#define PF_NS 6 /* XEROX NS protocols. */
+#define PF_ISO 7 /* ISO protocols. */
+#define PF_OSI PF_ISO
+#define PF_ECMA 8 /* European Computer Manufacturers. */
+#define PF_DATAKIT 9 /* Datakit protocols. */
+#define PF_CCITT 10 /* CCITT protocols, X.25 etc. */
+#define PF_SNA 11 /* IBM SNA. */
+#define PF_DECnet 12 /* DECnet. */
+#define PF_DLI 13 /* DEC Direct data link interface. */
+#define PF_LAT 14 /* LAT. */
+#define PF_HYLINK 15 /* NSC Hyperchannel. */
+#define PF_APPLETALK 16 /* Apple Talk. */
+#define PF_NETLINK 17 /* Internet Routing Protocol. */
+#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
+#define PF_LINK 18 /* Link layer interface. */
+#define PF_XTP 19 /* eXpress Transfer Protocol (no AF). */
+#define PF_INTF 20 /* Debugging use only. */
+#define PF_RIF 21 /* Raw interface. */
+#define PF_NETWARE 22
+#define PF_NDD 23
+#define PF_INET6 24 /* IPv6. */
+#define PF_MAX 30 /* For now.. */
+
+/* Address families. */
+#define AF_UNSPEC PF_UNSPEC
+#define AF_LOCAL PF_LOCAL
+#define AF_UNIX PF_UNIX
+#define AF_FILE PF_FILE
+#define AF_INET PF_INET
+#define AF_IMPLINK PF_IMPLINK
+#define AF_PUP PF_PUP
+#define AF_CHAOS PF_CHAOS
+#define AF_NS PF_NS
+#define AF_ISO PF_ISO
+#define AF_OSI PF_OSI
+#define AF_ECMA PF_ECMA
+#define AF_DATAKIT PF_DATAKIT
+#define AF_CCITT PF_CCITT
+#define AF_SNA PF_SNA
+#define AF_DECnet PF_DECnet
+#define AF_DLI PF_DLI
+#define AF_LAT PF_LAT
+#define AF_HYLINK PF_HYLINK
+#define AF_APPLETALK PF_APPLETALK
+#define AF_NETLINK PF_NETLINK
+#define AF_ROUTE PF_ROUTE
+#define AF_LINK PF_LINK
+#define AF_INTF PF_INTF
+#define AF_RIF PF_RIF
+#define AF_NETWARE PF_NETWARE
+#define AF_NDD PF_NDD
+#define AF_INET6 PF_INET6
+#define AF_MAX PF_MAX
+
+/* Socket level values. Others are defined in the appropriate headers.
+
+ XXX These definitions also should go into the appropriate headers as
+ far as they are available. */
+#define SOL_SOCKET 0xffff
+
+/* Maximum queue length specifiable by listen. */
+#define SOMAXCONN 1024
+
+/* Get the definition of the macro to define the common sockaddr members. */
+#include <bits/sockaddr.h>
+
+/* Structure describing a generic socket address. */
+struct sockaddr
+ {
+ __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
+ char sa_data[14]; /* Address data. */
+ };
+
+
+/* Structure large enough to hold any socket address (with the historical
+ exception of AF_UNIX). We reserve 128 bytes. */
+#if ULONG_MAX > 0xffffffff
+# define __ss_aligntype __uint64_t
+#else
+# define __ss_aligntype __uint32_t
+#endif
+#define _SS_SIZE 128
+#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+
+struct sockaddr_storage
+ {
+ __SOCKADDR_COMMON (__ss_); /* Address family, etc. */
+ __ss_aligntype __ss_align; /* Force desired alignment. */
+ char __ss_padding[_SS_PADSIZE];
+ };
+
+
+/* Bits in the FLAGS argument to `send', `recv', et al. */
+enum
+ {
+ MSG_OOB = 0x01, /* Process out-of-band data. */
+#define MSG_OOB MSG_OOB
+ MSG_PEEK = 0x02, /* Peek at incoming messages. */
+#define MSG_PEEK MSG_PEEK
+ MSG_DONTROUTE = 0x04, /* Don't use local routing. */
+#define MSG_DONTROUTE MSG_DONTROUTE
+ MSG_EOR = 0x08, /* End of record. */
+#define MSG_EOR MSG_EOR
+ MSG_TRUNC = 0x10,
+#define MSG_TRUNC MSG_TRUNC
+ MSG_CTRUNC = 0x20, /* Control data lost before delivery. */
+#define MSG_CTRUNC MSG_CTRUNC
+ MSG_WAITALL = 0x40, /* Wait for a full request. */
+#define MSG_WAITALL MSG_WAITALL
+ MSG_MPEG2 = 0x80, /* Message contain MPEG2 data. */
+#define MSG_MPEG2 MSG_MPEG2
+ };
+
+
+/* Structure describing messages sent by
+ `sendmsg' and received by `recvmsg'. */
+struct msghdr
+ {
+ void *msg_name; /* Address to send to/receive from. */
+ socklen_t msg_namelen; /* Length of address data. */
+
+ struct iovec *msg_iov; /* Vector of data to send/receive into. */
+ int msg_iovlen; /* Number of elements in the vector. */
+
+ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ socklen_t msg_controllen; /* Ancillary data buffer length. */
+
+ int msg_flags; /* Flags on received message. */
+ };
+
+/* Structure used for storage of ancillary data object information. */
+struct cmsghdr
+ {
+ socklen_t cmsg_len; /* Length of data in cmsg_data plus length
+ of cmsghdr structure. */
+ int cmsg_level; /* Originating protocol. */
+ int cmsg_type; /* Protocol specific type. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+ unsigned char __cmsg_data[0]; /* Ancillary data. */
+ /* XXX Perhaps this should be removed. */
+#endif
+ };
+
+/* Ancillary data object manipulation macros. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
+#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+#define CMSG_FIRSTHDR(mhdr) \
+ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+ & ~(sizeof (size_t) - 1))
+#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
+_EXTERN_INLINE struct cmsghdr *
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+{
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+ return 0;
+
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+ if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
+ || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+ >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+ /* No more entries. */
+ return 0;
+ return __cmsg;
+}
+#endif /* Use `extern inline'. */
+
+/* Socket level message types. This must match the definitions in
+ <linux/socket.h>. */
+enum
+ {
+ SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
+#define SCM_RIGHTS SCM_RIGHTS
+ };
+
+/* Options flags per socket. */
+#define SO_DEBUG 0x0001 /* Turn on debugging info recording. */
+#define SO_ACCEPTCONN 0x0002 /* Socket has had listen(). */
+#define SO_REUSEADDR 0x0004 /* Allow local address reuse. */
+#define SO_KEEPALIVE 0x0008 /* Keep connections alive. */
+#define SO_DONTROUTE 0x0010 /* Just use interface addresses. */
+#define SO_BROADCAST 0x0020 /* Permit sending of broadcast msgs. */
+#define SO_USELOOPBACK 0x0040 /* Bypass hardware when possible. */
+#define SO_LINGER 0x0080 /* Linger on close if data present. */
+#define SO_OOBINLINE 0x0100 /* Leave received OOB data in line. */
+#define SO_REUSEPORT 0x0200 /* Allow local address & port reuse. */
+#define SO_USE_IFBUFS 0x0400 /* Interface will supply buffers. */
+#define SO_CKSUMRECV 0x0800 /* Defer checksum until receive. */
+#define SO_NOREUSEADDR 0x1000 /* Prevent local address reuse. */
+#define SO_SNDBUF 0x1001 /* Send buffer size. */
+#define SO_RCVBUF 0x1002 /* Receive buffer size. */
+#define SO_SNDLOWAT 0x1003 /* Send low-water mark. */
+#define SO_RCVLOWAT 0x1004 /* Receive low-water mark. */
+#define SO_SNDTIMEO 0x1005 /* Send timeout. */
+#define SO_RCVTIMEO 0x1006 /* Receive timeout. */
+#define SO_ERROR 0x1007 /* Get error status and clear. */
+#define SO_TYPE 0x1008 /* Get socket type. */
+#define SO_KERNACCEPT 0x2000 /* Derive a in-kernel only socket. */
+#define SO_AUDIT 0x8000 /* Turn on socket auditing. */
+
+
+/* Structure used to manipulate the SO_LINGER option. */
+struct linger
+ {
+ int l_onoff; /* Nonzero to linger on close. */
+ int l_linger; /* Time to linger. */
+ };
+
+#endif /* bits/socket.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8b4a9e0773a24280d69a2a75209b48c2dd376e7
commit f8b4a9e0773a24280d69a2a75209b48c2dd376e7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:26:06 2000 +0000
AIX definitions for sigstack.h.
diff --git a/sysdeps/unix/sysv/aix/bits/sigstack.h b/sysdeps/unix/sysv/aix/bits/sigstack.h
new file mode 100644
index 0000000..c229cc0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/sigstack.h
@@ -0,0 +1,46 @@
+/* sigstack, sigaltstack definitions.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete). */
+struct sigstack
+ {
+ void *ss_sp; /* Signal stack pointer. */
+ int ss_onstack; /* Nonzero if executing on this stack. */
+ };
+
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 1024
+
+/* System default stack size. */
+#define SIGSTKSZ 4096
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=657870667bc4a0fd5c3ff33af5229490b5c01a1f
commit 657870667bc4a0fd5c3ff33af5229490b5c01a1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:59 2000 +0000
AIX definitions for sigset.h.
diff --git a/sysdeps/unix/sysv/aix/bits/sigset.h b/sysdeps/unix/sysv/aix/bits/sigset.h
new file mode 100644
index 0000000..4735796
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/sigset.h
@@ -0,0 +1,125 @@
+/* __sig_atomic_t, __sigset_t, and related definitions. AIX version.
+ Copyright (C) 1991,1992,1994,1996,1997,2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGSET_H_types
+# define _SIGSET_H_types 1
+
+typedef int __sig_atomic_t;
+
+/* A `sigset_t' has a bit for each signal. */
+
+typedef struct
+ {
+ unsigned int __losigs;
+ unsigned int __hisigs;
+ } __sigset_t;
+
+#endif
+
+
+/* We only want to define these functions if <signal.h> was actually
+ included; otherwise we were included just to define the types. Since we
+ are namespace-clean, it wouldn't hurt to define extra macros. But
+ trouble can be caused by functions being defined (e.g., any global
+ register vars declared later will cause compilation errors). */
+
+#if !defined _SIGSET_H_fns && defined _SIGNAL_H
+# define _SIGSET_H_fns 1
+
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
+
+/* Return a mask that includes the bit for SIG only. */
+# define __sigmask(sig) \
+ (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned int))))
+
+# if defined __GNUC__ && __GNUC__ >= 2
+# define __sigemptyset(set) \
+ (__extension__ ({ sigset_t *__set = (set); \
+ __set->__losigs = __set->__hisigs = 0; \
+ 0; }))
+# define __sigfillset(set) \
+ (__extension__ ({ sigset_t *__set = (set); \
+ __set->__losigs = __set->__hisigs = ~0u; \
+ 0; }))
+
+# ifdef __USE_GNU
+/* The POSIX does not specify for handling the whole signal set in one
+ command. This is often wanted and so we define three more functions
+ here. */
+# define __sigisemptyset(set) \
+ (__extension__ ({ const sigset_t *__set = (set); \
+ (__set->__losigs | __set->__hisigs) == 0; }))
+# define __sigandset(dest, left, right) \
+ (__extension__ ({ sigset_t *__dest = (dest); \
+ const sigset_t *__left = (left); \
+ const sigset_t *__right = (right); \
+ __dest->__losigs = __left->__losigs & __right->__losigs; \
+ __dest->__hisigs = __left->__hisigs & __right->__hisigs; \
+ 0; }))
+# define __sigorset(dest, left, right) \
+ (__extension__ ({ sigset_t *__dest = (dest); \
+ const sigset_t *__left = (left); \
+ const sigset_t *__right = (right); \
+ __dest->__losigs = __left->__losigs | __right->__losigs; \
+ __dest->__hisigs = __left->__hisigs | __right->__hisigs; \
+ 0; }))
+# endif
+# endif
+
+/* These functions needn't check for a bogus signal number -- error
+ checking is done in the non __ versions. */
+
+extern int __sigismember (__const __sigset_t *, int);
+extern int __sigaddset (__sigset_t *, int);
+extern int __sigdelset (__sigset_t *, int);
+
+# ifdef __USE_EXTERN_INLINES
+_EXTERN_INLINE int
+__sigismember (__const __sigset_t *__set, int __sig)
+{
+ unsigned int __mask = __sigmask (__sig);
+
+ return ((__sig < 33 ? __set->__losigs : __set->__hisigs) & __mask ) ? 1 : 0;
+}
+
+_EXTERN_INLINE int
+__sigaddset (__sigset_t *__set, int __sig)
+{
+ unsigned int __mask = __sigmask (__sig);
+
+ (__sig < 33 ? __set->__losigs : __set->__hisigs) |= __mask;
+
+ return 0;
+}
+
+_EXTERN_INLINE int
+__sigdelset (__sigset_t *__set, int __sig)
+{
+ unsigned int __mask = __sigmask (__sig);
+
+ (__sig < 33 ? __set->__losigs : __set->__hisigs) &= ~__mask;
+
+ return 0;
+}
+# endif
+
+
+#endif /* ! _SIGSET_H_fns. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37b4419e8209837b94d8900fea5ef35a2df078c6
commit 37b4419e8209837b94d8900fea5ef35a2df078c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:53 2000 +0000
AIX definitions for signum.h.
diff --git a/sysdeps/unix/sysv/aix/bits/signum.h b/sysdeps/unix/sysv/aix/bits/signum.h
new file mode 100644
index 0000000..b439744
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/signum.h
@@ -0,0 +1,96 @@
+/* Signal number definitions. AIX version.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+# define SIG_CATCHE ((__sighandler_t) 3)
+#endif
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGABRT 6 /* Abort (ANSI). */
+#define SIGIOT SIGABRT /* Abort (terminal) process. */
+#define SIGEMT 7 /* EMT instruction. */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* BUS error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad system call. */
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */
+#define SIGIOINT SIGURG /* Printer to backend error signal. */
+#define SIGSTOP 17 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 18 /* Keyboard stop (POSIX). */
+#define SIGCONT 19 /* Continue (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGCHLD 20 /* Child status has changed (POSIX). */
+#define SIGTTIN 21 /* Background read from tty (POSIX). */
+#define SIGTTOU 22 /* Background write to tty (POSIX). */
+#define SIGIO 23 /* I/O now possible (4.2 BSD). */
+#define SIGAIO SIGIO /* Base LAN I/O. */
+#define SIGPTY SIGIO /* PTY I/O. */
+#define SIGPOLL SIGIO /* ANother I/O event. */
+#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
+#define SIGMSG 27 /* Input data is in the ring buffer. */
+#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
+#define SIGPWR 29 /* Power failure restart (System V). */
+#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */
+#define SIGPROF 32 /* Profiling alarm clock (4.2 BSD). */
+#define SIGDANGER 33 /* System crash imminent. */
+#define SIGVTALRM 34 /* Virtual alarm clock (4.2 BSD). */
+#define SIGMIGRATE 35 /* Migrate process. */
+#define SIGPRE 36 /* Programming exception. */
+#define SIGVIRT 37 /* AIX virtual time alarm. */
+#define SIGARLM1 38 /* Reserved, don't use. */
+#define SIGWAITING 39 /* Reserved, don't use. */
+#define SIGCPUFAIL 59 /* Predictive de-configuration of processors.*/
+#define SIGKAP 60 /* Keep alive poll from native keyboard. */
+#define SIGGRANT SIGKAP /* Monitor mode granted. */
+#define SIGRETRACT 61 /* Monitor mode should be relinguished. */
+#define SIGSOUND 62 /* Sound control has completed. */
+#define SIGSAK 63 /* Secure attentation key. */
+
+#define _NSIG 64 /* Biggest signal number + 1
+ (including real-time signals). */
+
+#define SIGRTMIN (__libc_current_sigrtmin ())
+#define SIGRTMAX (__libc_current_sigrtmax ())
+
+/* These are the hard limits of the kernel. These values should not be
+ used directly at user level. */
+#define __SIGRTMIN 888
+#define __SIGRTMAX 999
+
+#endif /* <signal.h> included. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69f7887417670a7017253995e451712c142559a1
commit 69f7887417670a7017253995e451712c142559a1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:47 2000 +0000
AIX definitions for sigcontext.h.
diff --git a/sysdeps/unix/sysv/aix/bits/sigcontext.h b/sysdeps/unix/sysv/aix/bits/sigcontext.h
new file mode 100644
index 0000000..86b3c24
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/sigcontext.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#include <sys/ucontext.h>
+
+
+struct sigcontext
+{
+ int sc_onstack; /* Sigstack state to restore. */
+ sigset_t sc_mask; /* Signal mask to restore. */
+ int sc_uerror; /* u_error to restore. */
+ struct mcontext_t sc_jmpbuf; /* Process context to restore. */
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1c2877714221a0cdd6df22dbe55b0ec13e3f40e
commit b1c2877714221a0cdd6df22dbe55b0ec13e3f40e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:38 2000 +0000
AIX definitions for sigaction.h.
diff --git a/sysdeps/unix/sysv/aix/bits/sigaction.h b/sysdeps/unix/sysv/aix/bits/sigaction.h
new file mode 100644
index 0000000..75c35e5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/sigaction.h
@@ -0,0 +1,72 @@
+/* The proper definitions for AIX's sigaction.
+ Copyright (C) 1993-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 4 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x400 /* Don't create on death of child. */
+#define SA_SIGINFO 0x100 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_UNIX98 || defined __USE_MISC
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000008 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x00000200 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
+#endif
+#ifdef __USE_MISC
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 0 /* Block signals. */
+#define SIG_UNBLOCK 1 /* Unblock signals. */
+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b4c331660b7e1ec846b9ebb5af4137e5b97c38d
commit 6b4c331660b7e1ec846b9ebb5af4137e5b97c38d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:30 2000 +0000
AIX definitions for setjmp.h.
diff --git a/sysdeps/unix/sysv/aix/bits/setjmp.h b/sysdeps/unix/sysv/aix/bits/setjmp.h
new file mode 100644
index 0000000..675ed62
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/setjmp.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
+ We use an array of 'long int' instead, to make writing the
+ assembler easier. Naturally, user code should not depend on
+ either representation. */
+
+#if defined __USE_MISC || defined _ASM
+# define JB_GPR1 0 /* Also known as the stack pointer */
+# define JB_GPR2 1
+# define JB_LR 2 /* The address we will return to */
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
+# define JB_CR 21 /* Condition code registers. */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
+#endif
+
+#ifndef _ASM
+typedef long int __jmp_buf[64];
+#endif
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa312c40817027a66a5592ab1f6f73ad7a1eda98
commit fa312c40817027a66a5592ab1f6f73ad7a1eda98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:18 2000 +0000
AIX definitions for resource.h.
diff --git a/sysdeps/unix/sysv/aix/bits/resource.h b/sysdeps/unix/sysv/aix/bits/resource.h
new file mode 100644
index 0000000..823a5f0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/resource.h
@@ -0,0 +1,191 @@
+/* Bit values & structures for resource limits. AIX version.
+ Copyright (C) 1994, 1996-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Address space limit (?) */
+ RLIMIT_AS = 6,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 7,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ RLIM_NLIMITS = 10
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+#else
+# define RLIM_INFINITY 0x7fffffffffffffffLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
+#endif
+
+#define RLIM_SAVED_MAX (RLIM_INFINITY - 1)
+#define RLIM_SAVED_CUR (RLIM_INFINITY - 2)
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=379357d9908bb30714fc05cab2e204dbd9b961d4
commit 379357d9908bb30714fc05cab2e204dbd9b961d4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:11 2000 +0000
AIX definitions for fcntl.h.
diff --git a/sysdeps/unix/sysv/aix/bits/fcntl.h b/sysdeps/unix/sysv/aix/bits/fcntl.h
new file mode 100644
index 0000000..039a604
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/fcntl.h
@@ -0,0 +1,137 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+/* open/fcntl. */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_NONBLOCK 04
+#define O_NDELAY O_NONBLOCK
+#define O_APPEND 010
+#define O_SYNC 020
+#define O_FSYNC O_SYNC
+#define O_CREAT 0400 /* not fcntl */
+#define O_TRUNC 01000 /* not fcntl */
+#define O_EXCL 02000 /* not fcntl */
+#define O_NOCTTY 04000 /* not fcntl */
+#define O_ASYNC 0400000
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0400000000
+#endif
+
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC 020000000 /* Synchronize data. */
+# define O_RSYNC 010000000 /* Synchronize read operations. */
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+#else
+# define F_GETLK 11 /* Get record locking info. */
+# define F_SETLK 12 /* Set record locking info (non-blocking). */
+# define F_SETLKW 13 /* Set record locking info (blocking). */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define F_GETLK64 11 /* Get record locking info. */
+# define F_SETLK64 12 /* Set record locking info (non-blocking). */
+# define F_SETLKW64 13 /* Set record locking info (blocking). */
+#endif
+
+#ifdef __USE_BSD
+# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+/* For F_[GET|SET]FL. */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
+
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+# define LOCK_UN 8 /* remove lock */
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ unsigned int l_sysid;
+ __pid_t l_pid; /* Process holding the lock. */
+ int l_vfs;
+#ifdef __USE_FILE_OFFSET64
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ unsigned int l_sysid;
+ __pid_t l_pid; /* Process holding the lock. */
+ int l_vfs;
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=324c77e383a952675832857557c7b811657f1fca
commit 324c77e383a952675832857557c7b811657f1fca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:25:02 2000 +0000
AIX definitions for errno.h.
diff --git a/sysdeps/unix/sysv/aix/bits/errno.h b/sysdeps/unix/sysv/aix/bits/errno.h
new file mode 100644
index 0000000..37800c3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/errno.h
@@ -0,0 +1,155 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+#endif
+
+#ifdef _ERRNO_H
+# undef EDOM
+# undef EILSEQ
+# undef ERANGE
+
+# define EPERM 1 /* Operation not permitted. */
+# define ENOENT 2 /* No such file or directory. */
+# define ESRCH 3 /* No such process. */
+# define EINTR 4 /* interrupted system call. */
+# define EIO 5 /* I/O error. */
+# define ENXIO 6 /* No such device or address. */
+# define E2BIG 7 /* Arg list too long. */
+# define ENOEXEC 8 /* Exec format error. */
+# define EBADF 9 /* Bad file descriptor. */
+# define ECHILD 10 /* No child processes. */
+# define EAGAIN 11 /* Resource temporarily unavailable. */
+# define ENOMEM 12 /* Not enough space. */
+# define EACCES 13 /* Permission denied. */
+# define EFAULT 14 /* Bad address. */
+# define ENOTBLK 15 /* Block device required. */
+# define EBUSY 16 /* Resource busy. */
+# define EEXIST 17 /* File exists. */
+# define EXDEV 18 /* Improper link. */
+# define ENODEV 19 /* No such device. */
+# define ENOTDIR 20 /* Not a directory. */
+# define EISDIR 21 /* Is a directory. */
+# define EINVAL 22 /* Invalid argument. */
+# define ENFILE 23 /* Too many open files in system. */
+# define EMFILE 24 /* Too many open files. */
+# define ENOTTY 25 /* Inappropriate I/O control operation. */
+# define ETXTBSY 26 /* Text file busy. */
+# define EFBIG 27 /* File too large. */
+# define ENOSPC 28 /* No space left on device. */
+# define ESPIPE 29 /* Invalid seek. */
+# define EROFS 30 /* Read only file system. */
+# define EMLINK 31 /* Too many links. */
+# define EPIPE 32 /* Broken pipe. */
+# define EDOM 33 /* Domain error within math function. */
+# define ERANGE 34 /* Result too large. */
+# define ENOMSG 35 /* No message of desired type. */
+# define EIDRM 36 /* Identifier removed. */
+# define ECHRNG 37 /* Channel number out of range. */
+# define EL2NSYNC 38 /* Level 2 not synchronized. */
+# define EL3HLT 39 /* Level 3 halted. */
+# define EL3RST 40 /* Level 3 reset. */
+# define ELNRNG 41 /* Link number out of range. */
+# define EUNATCH 42 /* Protocol driver not attached. */
+# define ENOCSI 43 /* No CSI structure available. */
+# define EL2HLT 44 /* Level 2 halted. */
+# define EDEADLK 45 /* Resource deadlock avoided. */
+# define ENOTREADY 46 /* Device not ready. */
+# define EWRPROTECT 47 /* Write-protected media. */
+# define EFORMAT 48 /* Unformatted media. */
+# define ENOLCK 49 /* No locks available. */
+# define ENOCONNECT 50 /* No connection. */
+# define ESTALE 52 /* No filesystem. */
+# define EDIST 53 /* Old, currently unused AIX errno. */
+# if __USE_XOPEN_EXTENDED
+# define EWOULDBLOCK EAGAIN /* Operation would block. */
+# else /* __USE_XOPEN_EXTENDED */
+# define EWOULDBLOCK 54
+# endif /* __USE_XOPEN_EXTENDED */
+# define EINPROGRESS 55 /* Operation now in progress. */
+# define EALREADY 56 /* Operation already in progress. */
+# define ENOTSOCK 57 /* Socket operation on non-socket. */
+# define EDESTADDRREQ 58 /* Destination address required. */
+# define EDESTADDREQ EDESTADDRREQ /* Destination address required. */
+# define EMSGSIZE 59 /* Message too long. */
+# define EPROTOTYPE 60 /* Protocol wrong type for socket. */
+# define ENOPROTOOPT 61 /* Protocol not available. */
+# define EPROTONOSUPPORT 62 /* Protocol not supported. */
+# define ESOCKTNOSUPPORT 63 /* Socket type not supported. */
+# define EOPNOTSUPP 64 /* Operation not supported on socket. */
+# define EPFNOSUPPORT 65 /* Protocol family not supported. */
+# define EADDRINUSE 67 /* Address already in use. */
+# define EADDRNOTAVAIL 68 /* Can't assign requested address. */
+# define ENETDOWN 69 /* Network is down. */
+# define ENETUNREACH 70 /* Network is unreachable. */
+# define ENETRESET 71 /* Network dropped connection on reset. */
+# define ECONNABORTED 72 /* Software caused connection abort. */
+# define ECONNRESET 73 /* Connection reset by peer. */
+# define ENOBUFS 74 /* No buffer space available. */
+# define EISCONN 75 /* Socket is already connected. */
+# define ENOTCONN 76 /* Socket is not connected. */
+# define ESHUTDOWN 77 /* Can't send after socket shutdown. */
+# define ETIMEDOUT 78 /* Connection timed out. */
+# define ECONNREFUSED 79 /* Connection refused. */
+# define EHOSTDOWN 80 /* Host is down. */
+# define EHOSTUNREACH 81 /* No route to host. */
+# define ERESTART 82 /* Restart the system call. */
+# define EPROCLIM 83 /* Too many processes. */
+# define EUSERS 84 /* Too many users. */
+# define ELOOP 85 /* Too many levels of symbolic links. */
+# define ENAMETOOLONG 86 /* File name too long. */
+# define ENOTEMPTY EEXIST /* Directory not empty. */
+# define EDQUOT 88 /* Disc quota exceeded. */
+# define ECORRUPT 89 /* Invalid file system control data. */
+# define EREMOTE 93 /* Item is not local to host. */
+# define ENOSYS 109 /* Function not implemented POSIX. */
+# define EMEDIA 110 /* Media surface error. */
+# define ESOFT 111 /* I/O completed, but needs relocation. */
+# define ENOATTR 112 /* No attribute found. */
+# define ESAD 113 /* Security authentication denied. */
+# define ENOTRUST 114 /* Not a trusted program. */
+# define ETOOMANYREFS 115 /* Too many references: can't splice. */
+# define EILSEQ 116 /* Invalid wide character. */
+# define ECANCELED 117 /* Asynchronous i/o cancelled. */
+# define ENOSR 118 /* Temp out of streams resources. */
+# define ETIME 119 /* I_STR ioctl timed out. */
+# define EBADMSG 120 /* Wrong message type at stream head. */
+# define EPROTO 121 /* STREAMS protocol error. */
+# define ENODATA 122 /* No message ready at stream head. */
+# define ENOSTR 123 /* Fd is not a stream. */
+# define ECLONEME ERESTART /* This is the way we clone a stream. */
+# define ENOTSUP 124 /* POSIX threads unsupported value. */
+# define EMULTIHOP 125 /* Multihop is not allowed. */
+# define ENOLINK 126 /* The link has been severed. */
+# define EOVERFLOW 127 /* Value too large to be stored in data type.*/
+
+# ifdef _LIBC
+# define __set_errno(val) errno = (val)
+# endif
+#endif
+
+#if !defined _ERRNO_H && defined __need_Emath
+# define EDOM 33 /* Math argument out of domain of function. */
+# define EILSEQ 116 /* Illegal byte sequence. */
+# define ERANGE 34 /* Math result not representable. */
+#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=930b47a5db5f928c1564384276f65663ade9bb5d
commit 930b47a5db5f928c1564384276f65663ade9bb5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:24:55 2000 +0000
AIX definitions for endian.h.
diff --git a/sysdeps/unix/sysv/aix/bits/endian.h b/sysdeps/unix/sysv/aix/bits/endian.h
new file mode 100644
index 0000000..a86de7e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/endian.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bea5d51e0f0015cdbd3bdaaec7a1ea326e4206eb
commit bea5d51e0f0015cdbd3bdaaec7a1ea326e4206eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:24:49 2000 +0000
AIX definitions for dlfcn.h.
diff --git a/sysdeps/unix/sysv/aix/bits/dlfcn.h b/sysdeps/unix/sysv/aix/bits/dlfcn.h
new file mode 100644
index 0000000..e67c9a8
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/dlfcn.h
@@ -0,0 +1,47 @@
+/* AIX dependent definitions for run-time dynamic loading.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
+
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY 0x004 /* Lazy function call binding. */
+#define RTLD_NOW 0x002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x6 /* Mask of binding time value. */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+ the symbols of the loaded object and its dependencies are made
+ visible as if the object were linked directly into the program. */
+#define RTLD_GLOBAL 0x10000
+
+/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
+ The implementation does this by default and so we can define the
+ value to zero. */
+#define RTLD_LOCAL 0x800000
+
+#ifdef __USE_GNU
+/* These are extensions of the AIX kernel. */
+# define RTLD_NOAUTODEFER 0x020000
+# define RTLD_MEMBER 0x040000
+# define RTLD_UNIX_LATEST 0x100000
+#endif
+
+/* No support to profile shared libraries available. */
+# define DL_CALL_FCT(fctp, args) fctp args
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac70e97249c11f3fcd9b399dff32d67dedfb38ec
commit ac70e97249c11f3fcd9b399dff32d67dedfb38ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:24:44 2000 +0000
AIX definitions for dirent.h.
diff --git a/sysdeps/unix/sysv/aix/bits/dirent.h b/sysdeps/unix/sysv/aix/bits/dirent.h
new file mode 100644
index 0000000..48fb1b2
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/bits/dirent.h
@@ -0,0 +1,55 @@
+/* Directory entry structure `struct dirent'. Old System V version.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
+struct dirent
+ {
+#ifndef __USE_FILE_OFFSET64
+ __off_t d_off;
+ __ino_t d_ino;
+#else
+ __off64_t d_off;
+ __ino64_t d_ino;
+#endif
+ unsigned short int d_reclen;
+ unsigned short int d_namlen;
+ char d_name[256];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct dirent64
+ {
+ __off64_t d_off;
+ __ino64_t d_ino;
+ unsigned short int d_reclen;
+ unsigned short int d_namlen;
+ char d_name[256];
+ };
+#endif
+
+#define d_fileno d_ino /* Backwards compatibility. */
+#define d_offset d_off
+
+#define _DIRENT_HAVE_D_NAMLEN
+#define _DIRENT_HAVE_D_RECLEN
+#define _DIRENT_HAVE_D_OFF
+#undef _DIRENT_HAVE_D_TYPE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c936702f16b54e9a109533d72c21e263065aa7a
commit 7c936702f16b54e9a109533d72c21e263065aa7a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:34 2000 +0000
AIX implementation of __xstat64.
diff --git a/sysdeps/unix/sysv/aix/xstat64.c b/sysdeps/unix/sysv/aix/xstat64.c
new file mode 100644
index 0000000..07a62fd
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/xstat64.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+/* these are #define'd in <sys/stat.h>, why #define them here?
+#define STX_NORMAL 0x00
+#define STX_64 0x08
+ */
+
+extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
+
+int
+__xstat64 (int ver, const char *pathname, struct stat64 *st)
+{
+ assert (ver == 0);
+ return statx (pathname, st, sizeof (*st), STX_NORMAL | STX_64);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91f6208ff1fd00f3e3341c8d2a9256b56d842a87
commit 91f6208ff1fd00f3e3341c8d2a9256b56d842a87
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:30 2000 +0000
AIX implementation of __xstat.
diff --git a/sysdeps/unix/sysv/aix/xstat.c b/sysdeps/unix/sysv/aix/xstat.c
new file mode 100644
index 0000000..e053ce7
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/xstat.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+/* this is #define'd in <sys/stat.h> why #define it here?
+#define STX_NORMAL 0x00
+ */
+
+extern int statx (const char *pathname, struct stat *st, int len, int cmd);
+
+int
+__xstat (int ver, const char *pathname, struct stat *st)
+{
+ assert (ver == 0);
+ return statx (pathname, st, sizeof (*st), STX_NORMAL);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4fd7284f50eaff1dd3489454f75a169bd363a58
commit b4fd7284f50eaff1dd3489454f75a169bd363a58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:20 2000 +0000
AIX implementation of writev.
diff --git a/sysdeps/unix/sysv/aix/writev.c b/sysdeps/unix/sysv/aix/writev.c
new file mode 100644
index 0000000..a8f9cf5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/writev.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/uio.h>
+
+extern ssize_t kwritev (int fd, const struct iovec *iovp, size_t iovcnt,
+ long int ext);
+
+/* Read data from file descriptor FD, and put the result in the
+ buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
+ The buffers are filled in the order specified.
+ Operates just like `read' (see <unistd.h>) except that data are
+ put in VECTOR instead of a contiguous buffer. */
+ssize_t
+__writev (fd, vector, count)
+ int fd;
+ const struct iovec *vector;
+ int count;
+{
+ return kwritev (fd, vector, count, 0);
+}
+strong_alias (__writev, writev)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa630daa0085cef1f33c834cb0f1a57558d289ce
commit aa630daa0085cef1f33c834cb0f1a57558d289ce
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:16 2000 +0000
AIX implementation of write.
diff --git a/sysdeps/unix/sysv/aix/write.c b/sysdeps/unix/sysv/aix/write.c
new file mode 100644
index 0000000..6a43fb1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/write.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+#include "kernel_proto.h"
+
+
+ssize_t
+__write (fd, ptr, n)
+ int fd;
+ const void *ptr;
+ size_t n;
+{
+ return kwrite (fd, ptr, n);
+}
+/* AIX has no weak aliases (yet) but let's hope for better times. */
+weak_alias (__write, write)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4e2aeb15d14c1b5979fb026cb66a7b4d64f2ab8
commit b4e2aeb15d14c1b5979fb026cb66a7b4d64f2ab8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:10 2000 +0000
AIX implementation of waitpid.
diff --git a/sysdeps/unix/sysv/aix/waitpid.c b/sysdeps/unix/sysv/aix/waitpid.c
new file mode 100644
index 0000000..10befc3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/waitpid.c
@@ -0,0 +1,52 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+
+extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options,
+ struct rusage *ru_loc, siginfo_t *infop);
+
+
+/* Wait for a child matching PID to die.
+ If PID is greater than 0, match any process whose process ID is PID.
+ If PID is (pid_t) -1, match any process.
+ If PID is (pid_t) 0, match any process with the
+ same process group as the current process.
+ If PID is less than -1, match any process whose
+ process group is the absolute value of PID.
+ If the WNOHANG bit is set in OPTIONS, and that child
+ is not already dead, return (pid_t) 0. If successful,
+ return PID and store the dead child's status in STAT_LOC.
+ Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
+ return status for stopped children; otherwise don't. */
+pid_t
+__libc_waitpid (pid_t pid, int *stat_loc, int options)
+{
+ if ((options & ~(WNOHANG|WUNTRACED)) != 0)
+ {
+ __set_errno (EINVAL);
+ return (pid_t) -1;
+ }
+
+ return kwaitpid (stat_loc, pid, options, NULL, NULL);
+}
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d0f99ef86517ddba0e011412edd78bbf89148f5
commit 3d0f99ef86517ddba0e011412edd78bbf89148f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:06 2000 +0000
AIX implementation of waitid.
diff --git a/sysdeps/unix/sysv/aix/waitid.c b/sysdeps/unix/sysv/aix/waitid.c
new file mode 100644
index 0000000..a1fcae0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/waitid.c
@@ -0,0 +1,82 @@
+/* Pseudo implementation of waitid.
+ Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Zack Weinberg <zack@rabi.phys.columbia.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <signal.h>
+#define __need_NULL
+#include <stddef.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+
+#include <assert.h>
+
+extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options,
+ struct rusage *ru_loc, siginfo_t *infop);
+
+int
+waitid (idtype, id, infop, options)
+ idtype_t idtype;
+ id_t id;
+ siginfo_t *infop;
+ int options;
+{
+ pid_t pid, child;
+ int status;
+
+ switch (idtype)
+ {
+ case P_PID:
+ if(id <= 0)
+ goto invalid;
+ pid = (pid_t) id;
+ break;
+ case P_PGID:
+ if (id < 0 || id == 1)
+ goto invalid;
+ pid = (pid_t) -id;
+ break;
+ case P_ALL:
+ pid = -1;
+ break;
+ default:
+ invalid:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* Technically we're supposed to return EFAULT if infop is bogus,
+ but that would involve mucking with signals, which is
+ too much hassle. User will have to deal with SIGSEGV/SIGBUS.
+ We just check for a null pointer. */
+
+ if (infop == NULL)
+ {
+ __set_errno (EFAULT);
+ return -1;
+ }
+
+ child = kwaitpid (&status, pid, options, NULL, infop);
+
+ if (child == -1)
+ /* `waitpid' set `errno' for us. */
+ return -1;
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7dbc4841f49a93b2d01ce51d7a8ca79f043994e1
commit 7dbc4841f49a93b2d01ce51d7a8ca79f043994e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:23:00 2000 +0000
AIX implementation of wait4.
diff --git a/sysdeps/unix/sysv/aix/wait4.c b/sysdeps/unix/sysv/aix/wait4.c
new file mode 100644
index 0000000..1a5f58f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/wait4.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991, 1992, 1995-1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options,
+ struct rusage *ru_loc, siginfo_t *infop);
+
+pid_t
+__wait4 (__pid_t pid, __WAIT_STATUS stat_loc, int options,
+ struct rusage *usage)
+{
+ return kwaitpid (stat_loc.__iptr, pid, options, usage, NULL);
+}
+strong_alias (__wait4, wait4)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f023ae74fe5127523bc19415f64673a2391bcb65
commit f023ae74fe5127523bc19415f64673a2391bcb65
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:56 2000 +0000
AIX implementation of wait3.
diff --git a/sysdeps/unix/sysv/aix/wait3.c b/sysdeps/unix/sysv/aix/wait3.c
new file mode 100644
index 0000000..0e37f80
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/wait3.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1992, 93, 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <stddef.h>
+
+extern pid_t kwaitpid (int *stat_loc, pid_t pid, int options,
+ struct rusage *ru_loc, siginfo_t *infop);
+
+/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
+ return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
+ store information about the child's resource usage (as a `struct rusage')
+ there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
+ children; otherwise don't. */
+pid_t
+__wait3 (__WAIT_STATUS stat_loc, int options, struct rusage *usage)
+{
+ if (usage != NULL)
+ {
+ __set_errno (ENOSYS);
+ return (pid_t) -1;
+ }
+ return kwaitpid (stat_loc.__iptr, WAIT_ANY, options, usage, NULL);
+}
+strong_alias (__wait3, wait3)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69729d86164f9251bd7698cef452be1e5efbedf8
commit 69729d86164f9251bd7698cef452be1e5efbedf8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:48 2000 +0000
AIX implementation of uname.
diff --git a/sysdeps/unix/sysv/aix/uname.c b/sysdeps/unix/sysv/aix/uname.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/uname.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=194ed9ac29a4ded30b9301ec1ad79d636b042b7f
commit 194ed9ac29a4ded30b9301ec1ad79d636b042b7f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:40 2000 +0000
AIX implementation of truncate64.
diff --git a/sysdeps/unix/sysv/aix/truncate64.c b/sysdeps/unix/sysv/aix/truncate64.c
new file mode 100644
index 0000000..6582a45
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/truncate64.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int ktruncate (const char *name, long long int length);
+
+int
+__truncate64 (const char *name, off64_t length)
+{
+ return ktruncate (name, length);
+}
+strong_alias (__truncate64, truncate64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e22f9474ac6942dbd20f4e450209a9ed24deb202
commit e22f9474ac6942dbd20f4e450209a9ed24deb202
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:36 2000 +0000
AIX implementation of truncate.
diff --git a/sysdeps/unix/sysv/aix/truncate.c b/sysdeps/unix/sysv/aix/truncate.c
new file mode 100644
index 0000000..78f20fa
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/truncate.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int ktruncate (const char *name, long long int length);
+
+int
+__truncate (const char *name, off_t length)
+{
+ return ktruncate (name, length);
+}
+strong_alias (__truncate, truncate)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56ce0eedb95a8fcfb1d4b6ee326c3e4c27548a3b
commit 56ce0eedb95a8fcfb1d4b6ee326c3e4c27548a3b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:27 2000 +0000
AIX sysdep specific low-level interfact definitions..
diff --git a/sysdeps/unix/sysv/aix/sysdep.h b/sysdeps/unix/sysv/aix/sysdep.h
new file mode 100644
index 0000000..182e324
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sysdep.h
@@ -0,0 +1,88 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/unix/powerpc/sysdep.h>
+
+
+/* This seems to always be the case on PPC. */
+#define ALIGNARG(log2) log2
+
+/* How to define local lables. */
+#define L(name) L..##name
+
+/* Label in text section. */
+#define C_TEXT(name) .##name
+
+/* Function descriptor. */
+#define FUNCDESC(real, code) \
+ .toc; \
+ .csect real##[DS], 3; \
+ .globl real; \
+real: \
+ .long code, TOC[tc0], 0;
+
+/* Code to generate function entry code. */
+#define ENTRY(name) \
+ FUNCDESC (name, C_TEXT (name)) \
+ .csect .text[PR], 2; \
+ .globl C_TEXT (name); \
+C_TEXT (name):
+
+/* XXX For now we don't define any code. */
+#define CALL_MCOUNT
+
+#define EALIGN_W_0 /* No words to insert. */
+#define EALIGN_W_1 nop
+#define EALIGN_W_2 nop;nop
+#define EALIGN_W_3 nop;nop;nop
+#define EALIGN_W_4 EALIGN_W_3;nop
+#define EALIGN_W_5 EALIGN_W_4;nop
+#define EALIGN_W_6 EALIGN_W_5;nop
+#define EALIGN_W_7 EALIGN_W_6;nop
+
+/* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes
+ past a 2^align boundary. */
+#ifdef PROF
+#define EALIGN(name, alignt, words) \
+ FUNCDESC (name, C_TEXT (name)) \
+ .csect .text[PR], 2; \
+ .align ALIGNARG(2); \
+ .globl C_TEXT (name); \
+C_TEXT (name): \
+ CALL_MCOUNT \
+ b L(align_0); \
+ .align ALIGNARG(alignt); \
+ EALIGN_W_##words; \
+L(align_0):
+#else /* PROF */
+#define EALIGN(name, alignt, words) \
+ FUNCDESC (name, C_TEXT (name)) \
+ .csect .text[PR], 2; \
+ .align ALIGNARG(alignt); \
+ EALIGN_W_##words; \
+ .globl C_TEXT (name); \
+C_TEXT (name):
+#endif
+
+/* No special end code for now. We will eventually add to usual prolog
+ with function length etc. */
+#define END(name)
+
+
+/* Jumping to another function. We are jumping to the TOC entry. */
+#define JUMPTARGET(name) name
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88a0392bb6833d66a8ba33e5d24954e2a1aea2e2
commit 88a0392bb6833d66a8ba33e5d24954e2a1aea2e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:10 2000 +0000
AIX implementation of syscall.
diff --git a/sysdeps/unix/sysv/aix/syscall.c b/sysdeps/unix/sysv/aix/syscall.c
new file mode 100644
index 0000000..6f204ff
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/syscall.c
@@ -0,0 +1,2 @@
+/* XXX We will have to see whether it is possible to implement this
+ function at all. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b2af91502682fea339b95ed7844305443ef2139
commit 8b2af91502682fea339b95ed7844305443ef2139
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:22:02 2000 +0000
AIX implementation of statfs.
diff --git a/sysdeps/unix/sysv/aix/statfs.c b/sysdeps/unix/sysv/aix/statfs.c
new file mode 100644
index 0000000..c0c966c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/statfs.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/statfs.h>
+
+extern int statfs (const char *file, struct statfs *buf);
+
+int
+__statfs (const char *file, struct statfs *buf)
+{
+ return statfs (file, buf);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72f301a3fcdea4a7a2c5201cf746feb37ed1e7da
commit 72f301a3fcdea4a7a2c5201cf746feb37ed1e7da
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:21:53 2000 +0000
AIX implementation of sigsuspend.
diff --git a/sysdeps/unix/sysv/aix/sigsuspend.c b/sysdeps/unix/sysv/aix/sigsuspend.c
new file mode 100644
index 0000000..1237281
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigsuspend.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <signal.h>
+
+extern int _sigsuspend (const sigset_t *sigmask);
+
+
+/* Change the set of blocked signals to SET,
+ wait until a signal arrives, and restore the set of blocked signals. */
+int
+__sigsuspend (set)
+ const sigset_t *set;
+{
+ return _sigsuspend (set);
+}
+weak_alias (__sigsuspend, sigsuspend)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=67324c62d11a7c4005d5bc4d67dcd0a57504ce5d
commit 67324c62d11a7c4005d5bc4d67dcd0a57504ce5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:21:46 2000 +0000
AIX code to convert sigest.
diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
new file mode 100644
index 0000000..5a01212
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
@@ -0,0 +1,28 @@
+/* Convert between lowlevel sigmask and libc representation of sigset_t.
+ AIX version.
+ Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define sigset_set_old_mask(set, mask) \
+ do { \
+ (set)->__losigs = (unsigned int) mask; \
+ (set)->__hisigs = 0; \
+ } while (0)
+
+#define sigset_get_old_mask(set, mask) \
+ ((mask) = (unsigned int) (set)->__losigs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=70109e7ac5c3fb0de8281ef4619ec0ea820e8118
commit 70109e7ac5c3fb0de8281ef4619ec0ea820e8118
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:21:16 2000 +0000
AIX implementation of sigprocmask.
diff --git a/sysdeps/unix/sysv/aix/sigprocmask.c b/sysdeps/unix/sysv/aix/sigprocmask.c
new file mode 100644
index 0000000..1046903
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigprocmask.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <signal.h>
+
+int
+__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ return sigprocmask (how, set, oset);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9264940da4ff3ea80ddb8a9828c89ac738e6f7d9
commit 9264940da4ff3ea80ddb8a9828c89ac738e6f7d9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:21:07 2000 +0000
AIX implementation of sigpending.
diff --git a/sysdeps/unix/sysv/aix/sigpending.c b/sysdeps/unix/sysv/aix/sigpending.c
new file mode 100644
index 0000000..a6add42
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigpending.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <signal.h>
+
+extern int _sigpending (sigset_t *set);
+
+
+/* Store in SET all signals that are blocked and pending. */
+int
+sigpending (set)
+ sigset_t *set;
+{
+ return _sigpending (set);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b10fdaa38d4fcf3be81268fbb15b15b14de659e
commit 8b10fdaa38d4fcf3be81268fbb15b15b14de659e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:58 2000 +0000
AIX implementation of sigaction.
diff --git a/sysdeps/unix/sysv/aix/sigaction.c b/sysdeps/unix/sysv/aix/sigaction.c
new file mode 100644
index 0000000..65801f4
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sigaction.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <signal.h>
+
+extern int _sigaction (int sig, const struct sigaction *act,
+ struct sigaction *oact);
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+ If OACT is not NULL, put the old action for SIG in *OACT. */
+int
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
+{
+ return _sigaction (sig, act, oact);
+}
+strong_alias (__sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0dacffd2afc24544fd9708944d8582f5cffa3b7
commit b0dacffd2afc24544fd9708944d8582f5cffa3b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:50 2000 +0000
AIX implementation of setuid.
diff --git a/sysdeps/unix/sysv/aix/setuid.c b/sysdeps/unix/sysv/aix/setuid.c
new file mode 100644
index 0000000..679db05
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setuid.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
+#include <sys/id.h>
+
+extern int setuidx (int mask, uid_t uid);
+
+int
+__setuid (uid_t uid)
+{
+ return setuidx (ID_REAL, uid);
+}
+strong_alias (__setuid, setuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5db961844f38251188c98f5e8d74377b7646a6c3
commit 5db961844f38251188c98f5e8d74377b7646a6c3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:45 2000 +0000
AIX implementation of setreuid.
diff --git a/sysdeps/unix/sysv/aix/setreuid.c b/sysdeps/unix/sysv/aix/setreuid.c
new file mode 100644
index 0000000..ecf12a1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setreuid.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+/* is there a reason *NOT* to include <sys/id.h>? */
+/* If so #define ID_EFFECTIVE and ID_REAL */
+#include <sys/id.h>
+
+extern int setuidx (int mask, uid_t uid);
+
+int
+__setreuid (uid_t ruid, uid_t euid)
+{
+ int res;
+
+ if (ruid == euid)
+ return setuidx (ID_EFFECTIVE | ID_REAL, euid);
+
+ res = setuidx (ID_REAL, ruid);
+ if (res == 0)
+ res = setuidx (ID_EFFECTIVE, euid);
+
+ return res;
+}
+strong_alias (__setreuid, setreuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=627465efd0770755e9e0cda08497af6a92d4c817
commit 627465efd0770755e9e0cda08497af6a92d4c817
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:40 2000 +0000
AIX implementation of setregid.
diff --git a/sysdeps/unix/sysv/aix/setregid.c b/sysdeps/unix/sysv/aix/setregid.c
new file mode 100644
index 0000000..02961b4
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setregid.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+/* is there a reason *NOT* to include <sys/id.h>? */
+/* If so #define ID_EFFECTIVE and ID_REAL */
+#include <sys/id.h>
+
+
+extern int setgidx (int mask, gid_t gid);
+
+int
+__setregid (gid_t rgid, gid_t egid)
+{
+ int res;
+
+ if (rgid == egid)
+ return setgidx (ID_EFFECTIVE | ID_REAL, egid);
+
+ res = setgidx (ID_REAL, rgid);
+ if (res == 0)
+ res = setgidx (ID_EFFECTIVE, egid);
+
+ return res;
+}
+strong_alias (__setregid, setregid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c11bc02c6d31cb5523103bcacbe97ebdbbb2f955
commit c11bc02c6d31cb5523103bcacbe97ebdbbb2f955
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:31 2000 +0000
AIX implementation of setgid.
diff --git a/sysdeps/unix/sysv/aix/setgid.c b/sysdeps/unix/sysv/aix/setgid.c
new file mode 100644
index 0000000..bf976ec
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setgid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
+#include <sys/id.h>
+
+extern int setgidx (int mask, gid_t gid);
+
+int
+__setgid (gid_t gid)
+{
+ return setgidx (ID_REAL, gid);
+}
+strong_alias (__setgid, setgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c59cabddb1436380fab69ece80d886f6fa7f7af7
commit c59cabddb1436380fab69ece80d886f6fa7f7af7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:26 2000 +0000
AIX implementation of seteuid.
diff --git a/sysdeps/unix/sysv/aix/seteuid.c b/sysdeps/unix/sysv/aix/seteuid.c
new file mode 100644
index 0000000..de9280b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/seteuid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
+#include <sys/id.h>
+
+extern int setuidx (int mask, uid_t uid);
+
+int
+__seteuid (uid_t uid)
+{
+ return setuidx (ID_EFFECTIVE, uid);
+}
+strong_alias (__seteuid, seteuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca97c065e748bfc866a9ef90a9e5bebb0fb2f6f6
commit ca97c065e748bfc866a9ef90a9e5bebb0fb2f6f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:21 2000 +0000
AIX implementation of setegid.
diff --git a/sysdeps/unix/sysv/aix/setegid.c b/sysdeps/unix/sysv/aix/setegid.c
new file mode 100644
index 0000000..9f660ff
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/setegid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
+#include <sys/id.h>
+
+
+extern int setgidx (int mask, gid_t gid);
+
+int
+__setegid (gid_t gid)
+{
+ return setgidx (ID_EFFECTIVE, gid);
+}
+strong_alias (__setegid, setegid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebd7ebff2c415b186096f364719c6e99908bfff0
commit ebd7ebff2c415b186096f364719c6e99908bfff0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:14 2000 +0000
AIX implementation of sendmsg.
diff --git a/sysdeps/unix/sysv/aix/sendmsg.c b/sysdeps/unix/sysv/aix/sendmsg.c
new file mode 100644
index 0000000..6dbbf5e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sendmsg.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+extern int nsendmsg (int s, void *uap_msg, int flags);
+
+int
+sendmsg (int fd, const struct msghdr *message, int flags)
+{
+ return nsendmsg (fd, message, flags);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea8194fbd918b6638da5941ea927c9d2ee15f684
commit ea8194fbd918b6638da5941ea927c9d2ee15f684
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:20:03 2000 +0000
AIX implementation of sched_yield.
diff --git a/sysdeps/unix/sysv/aix/sched_yield.c b/sysdeps/unix/sysv/aix/sched_yield.c
new file mode 100644
index 0000000..0820c9a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sched_yield.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sched.h>
+
+extern void yield (void);
+
+
+/* Yield the processor. */
+int
+__sched_yield (void)
+{
+ yield ();
+ return 0;
+}
+strong_alias (__sched_yield, sched_yield)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bada1fee5754dbc715d48d59882585bdf783163b
commit bada1fee5754dbc715d48d59882585bdf783163b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:50 2000 +0000
AIX implementation of sbrk.
diff --git a/sysdeps/unix/sysv/aix/sbrk.c b/sysdeps/unix/sysv/aix/sbrk.c
new file mode 100644
index 0000000..9e4b560
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/sbrk.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+void *
+__sbrk (ptrdiff_t delta)
+{
+ return sbrk (delta);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00f4e2e47890af1b8b8a46ab630f527824441b5c
commit 00f4e2e47890af1b8b8a46ab630f527824441b5c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:43 2000 +0000
AIX implementation of revoke.
diff --git a/sysdeps/unix/sysv/aix/revoke.c b/sysdeps/unix/sysv/aix/revoke.c
new file mode 100644
index 0000000..2a81080
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/revoke.c
@@ -0,0 +1,41 @@
+/* Revoke the access of all descriptors currently open on a file. AIX version.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+extern int frevoke (int fdes);
+
+int
+revoke (file)
+ const char *file;
+{
+ int fd;
+ int res;
+
+ fd = open (file, O_RDONLY);
+ if (fd < 0)
+ return -1;
+
+ res = frevoke (fd);
+ (void) close (fd);
+
+ return res;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83ad13fa285804f66762e1563d2881fe2a60d2c5
commit 83ad13fa285804f66762e1563d2881fe2a60d2c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:34 2000 +0000
AIX implementation of recvmsg.
diff --git a/sysdeps/unix/sysv/aix/recvmsg.c b/sysdeps/unix/sysv/aix/recvmsg.c
new file mode 100644
index 0000000..baecd5a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/recvmsg.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+extern int nrecvmsg (int s, struct msghdr *uap_msg, int flags);
+
+int
+recvmsg (int fd, struct msghdr *message, int flags)
+{
+ return nrecvmsg (fd, message, flags);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1fca6a4d4b487272f483a5639c64fb2cd98395c7
commit 1fca6a4d4b487272f483a5639c64fb2cd98395c7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:29 2000 +0000
AIX implementation of recvfrom.
diff --git a/sysdeps/unix/sysv/aix/recvfrom.c b/sysdeps/unix/sysv/aix/recvfrom.c
new file mode 100644
index 0000000..88f042a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/recvfrom.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+extern int nrecvfrom (int s, void *uap_buf, int len, int flags,
+ void *uap_from, int *uap_fromlenaddr);
+
+int
+recvfrom (int fd, void *buf, size_t n, int flags, __SOCKADDR_ARG addr,
+ socklen_t *addr_len)
+{
+ return nrecvfrom (fd, buf, n, flags, addr.__sockaddr__, addr_len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92f025ebe338a7fd5bec3dcc3f47652a4abaa23b
commit 92f025ebe338a7fd5bec3dcc3f47652a4abaa23b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:20 2000 +0000
AIX implementation of readv.
diff --git a/sysdeps/unix/sysv/aix/readv.c b/sysdeps/unix/sysv/aix/readv.c
new file mode 100644
index 0000000..67d54c9
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/readv.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991, 1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/uio.h>
+
+extern ssize_t kreadv (int fd, const struct iovec *iovp, size_t iovcnt,
+ long int ext);
+
+/* Read data from file descriptor FD, and put the result in the
+ buffers described by VECTOR, which is a vector of COUNT `struct iovec's.
+ The buffers are filled in the order specified.
+ Operates just like `read' (see <unistd.h>) except that data are
+ put in VECTOR instead of a contiguous buffer. */
+ssize_t
+__readv (fd, vector, count)
+ int fd;
+ const struct iovec *vector;
+ int count;
+{
+ return kreadv (fd, vector, count, 0);
+}
+strong_alias (__readv, readv)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f31359c0edf267030ee89841c10d298f8725a73b
commit f31359c0edf267030ee89841c10d298f8725a73b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:13 2000 +0000
AIX implementation of readlink.
diff --git a/sysdeps/unix/sysv/aix/readlink.c b/sysdeps/unix/sysv/aix/readlink.c
new file mode 100644
index 0000000..2770358
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/readlink.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+int
+__readlink (const char *path, char *buf, size_t len)
+{
+ return readlink (path, buf, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8198cb76b2fb2675d7024bb00ea0cb8e1501136b
commit 8198cb76b2fb2675d7024bb00ea0cb8e1501136b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:19:08 2000 +0000
AIX implementation of read.
diff --git a/sysdeps/unix/sysv/aix/read.c b/sysdeps/unix/sysv/aix/read.c
new file mode 100644
index 0000000..556f7c6
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/read.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kread (int fd, void *buf, size_t len);
+
+ssize_t
+__libc_read (int fd, void *buf, size_t len)
+{
+ return kread (fd, buf, len);
+}
+strong_alias (__libc_read, __read)
+strong_alias (__libc_read, read)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ac5a17cf9cf109dc3ca4180985053016862cb9a
commit 4ac5a17cf9cf109dc3ca4180985053016862cb9a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:58 2000 +0000
AIX definitions for profiling.
diff --git a/sysdeps/unix/sysv/aix/profil-counter.h b/sysdeps/unix/sysv/aix/profil-counter.h
new file mode 100644
index 0000000..f58f1b6
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/profil-counter.h
@@ -0,0 +1,27 @@
+/* Machine-dependent SIGPROF signal handler. AIX version.
+ Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* In many Unix systems signal handlers are called like this
+ and the interrupted PC is easily findable in the `struct sigcontext'. */
+
+static void
+profil_counter (int signr, int code, struct sigcontext *scp)
+{
+ profil_count ((void *) scp->sc_jmpbuf.__jmp_context.__gpr[0]);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a1dfe2293a6d6fc821b4447f0907d8dda481176
commit 9a1dfe2293a6d6fc821b4447f0907d8dda481176
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:39 2000 +0000
AIX implementation of pread64.
diff --git a/sysdeps/unix/sysv/aix/pread64.c b/sysdeps/unix/sysv/aix/pread64.c
new file mode 100644
index 0000000..428fc63
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/pread64.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kpread (int fd, void *buf, size_t len, long long int off);
+
+ssize_t
+__pread64 (int fd, void *buf, size_t len, off64_t off)
+{
+ return kpread (fd, buf, len, off);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d10f02264a597ced38d4c751094d94bfc3223d38
commit d10f02264a597ced38d4c751094d94bfc3223d38
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:34 2000 +0000
AIX implementation of pread.
diff --git a/sysdeps/unix/sysv/aix/pread.c b/sysdeps/unix/sysv/aix/pread.c
new file mode 100644
index 0000000..35fd7ca
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/pread.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kpread (int fd, void *buf, size_t len, long long int off);
+
+ssize_t
+__pread (int fd, void *buf, size_t len, off_t off)
+{
+ return kpread (fd, buf, len, off);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56f5c4388fad5a1e082e4ed1a461119d5dcdc74c
commit 56f5c4388fad5a1e082e4ed1a461119d5dcdc74c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:28 2000 +0000
AIX implementation of open.
diff --git a/sysdeps/unix/sysv/aix/open.c b/sysdeps/unix/sysv/aix/open.c
new file mode 100644
index 0000000..7bab537
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/open.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fcntl.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+int
+__open (const char *file, int oflag, ...)
+{
+ int mode = 0;
+
+ if (oflag & O_CREAT)
+ {
+ va_list arg;
+ va_start (arg, oflag);
+ mode = va_arg (arg, int);
+ va_end (arg);
+ }
+
+ return open (file, oflag, mode);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=63fe00f0c674f7c373cfca6afaac644e3ce0eb9a
commit 63fe00f0c674f7c373cfca6afaac644e3ce0eb9a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:22 2000 +0000
AIX implementation of nanosleep.
diff --git a/sysdeps/unix/sysv/aix/nanosleep.c b/sysdeps/unix/sysv/aix/nanosleep.c
new file mode 100644
index 0000000..1277319
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/nanosleep.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+/* this is declared in <sys/time.h> not <time.h > */
+#if 0
+struct timestruc_t
+{
+ time_t tv_sec; /* seconds. */
+ suseconds_t tv_nsec; /* and nanoseconds. */
+};
+#endif
+
+extern int _nsleep (struct timestruc_t *rqtp, struct timestruc_t *rmtp);
+
+int
+__libc_nanosleep (const struct timespec *req, struct timespec *rem)
+{
+ assert (sizeof (struct timestruc_t) == sizeof (*req));
+ return _nsleep ((struct timestruc_t *) req, (struct timestruc_t *) rem);
+}
+strong_alias (__libc_nanosleep, __nanosleep)
+strong_alias (__libc_nanosleep, nanosleep)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f38ffbfeccb1c67491515e3620a88ace48977e41
commit f38ffbfeccb1c67491515e3620a88ace48977e41
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:13 2000 +0000
AIX implementation of munmap.
diff --git a/sysdeps/unix/sysv/aix/munmap.c b/sysdeps/unix/sysv/aix/munmap.c
new file mode 100644
index 0000000..7f583be
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/munmap.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <sys/mman.h>
+
+int
+__munmap (void *addr, size_t len)
+{
+ return munmap (addr, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39595bc012dc23bc2e076e70cfcbf2e564d9a85b
commit 39595bc012dc23bc2e076e70cfcbf2e564d9a85b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:05 2000 +0000
AIX implementation of mmap64.
diff --git a/sysdeps/unix/sysv/aix/mmap64.c b/sysdeps/unix/sysv/aix/mmap64.c
new file mode 100644
index 0000000..9f2a277
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/mmap64.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/mman.h>
+#include <sys/types.h>
+
+extern int kmmap (void *addr, size_t len, int prot, int flags, int fd,
+ long long int offset);
+
+void *
+__mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
+{
+ return kmmap (addr, len, prot, flags, fd, offset);
+}
+strong_alias (__mmap64, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=518d7e658de731cfdb91a9806e793dd3351f92f0
commit 518d7e658de731cfdb91a9806e793dd3351f92f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:18:01 2000 +0000
AIX implementation of mmap.
diff --git a/sysdeps/unix/sysv/aix/mmap.c b/sysdeps/unix/sysv/aix/mmap.c
new file mode 100644
index 0000000..cd967d3
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/mmap.c
@@ -0,0 +1,9 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <sys/mman.h>
+#include <sys/types.h>
+
+void *
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
+{
+ return mmap (addr, len, prot, flags, fd, offset);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03932925c13784a617f3675e0b182d6fa3f409e8
commit 03932925c13784a617f3675e0b182d6fa3f409e8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:53 2000 +0000
AIX implementation of __lxstat64.
diff --git a/sysdeps/unix/sysv/aix/lxstat64.c b/sysdeps/unix/sysv/aix/lxstat64.c
new file mode 100644
index 0000000..426b594
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lxstat64.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+/* these are #define'd in <sys/stat.h> why #define them again?
+#define STX_LINK 0x01
+#define STX_64 0x08
+ */
+
+extern int statx (const char *pathname, struct stat64 *st, int len, int cmd);
+
+int
+__lxstat64 (int ver, const char *pathname, struct stat64 *st)
+{
+ assert (ver == 0);
+ return statx (pathname, st, sizeof (*st), STX_LINK | STX_64);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4588e96db96b9c4198fd26ff9699f4fc78d76352
commit 4588e96db96b9c4198fd26ff9699f4fc78d76352
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:47 2000 +0000
AIX implementation of __lxstat.
diff --git a/sysdeps/unix/sysv/aix/lxstat.c b/sysdeps/unix/sysv/aix/lxstat.c
new file mode 100644
index 0000000..2edaf72
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lxstat.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+/* this is #define'd in <sys/stat.h> - why #define it again?
+#define STX_LINK 0x01
+ */
+
+extern int statx (const char *pathname, struct stat *st, int len, int cmd);
+
+int
+__lxstat (int ver, const char *pathname, struct stat *st)
+{
+ assert (ver == 0);
+ return statx (pathname, st, sizeof (*st), STX_LINK);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d931954b27ac53a5c4aefd1f2d9b5c226f58f2ab
commit d931954b27ac53a5c4aefd1f2d9b5c226f58f2ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:38 2000 +0000
AIX implementation of lseek64.
diff --git a/sysdeps/unix/sysv/aix/lseek64.c b/sysdeps/unix/sysv/aix/lseek64.c
new file mode 100644
index 0000000..621cdae
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lseek64.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int klseek (int fd, long long int offset, int sbase,
+ long long int *new_offp);
+
+off64_t
+__libc_lseek64 (int fd, off64_t offset, int whence)
+{
+ long long int res;
+
+ if (klseek (fd, offset, whence, &res) < 0)
+ res = -1ll;
+
+ return res;
+}
+strong_alias (__libc_lseek64, __lseek64)
+strong_alias (__libc_lseek64, lseek64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e41d64d42a0613a1776a88dd772e2c972f2f12be
commit e41d64d42a0613a1776a88dd772e2c972f2f12be
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:33 2000 +0000
AIX implementation of lseek.
diff --git a/sysdeps/unix/sysv/aix/lseek.c b/sysdeps/unix/sysv/aix/lseek.c
new file mode 100644
index 0000000..99a6fb5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lseek.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+off_t
+__lseek (int fd, off_t offset, int whence)
+{
+ return lseek (fd, offset, whence);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2260eae7d1de0da09c47633696d90c630e4ca1e7
commit 2260eae7d1de0da09c47633696d90c630e4ca1e7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:26 2000 +0000
AIX implementation of lockf64.
diff --git a/sysdeps/unix/sysv/aix/lockf64.c b/sysdeps/unix/sysv/aix/lockf64.c
new file mode 100644
index 0000000..ad4840b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lockf64.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int klockf (int fd, int function, long long int size);
+
+int
+lockf64 (int fd, int cmd, off64_t len)
+{
+ return klockf (fd, cmd, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15373f8bd25491983010da0c1340f8c2031a4994
commit 15373f8bd25491983010da0c1340f8c2031a4994
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:22 2000 +0000
AIX implementation of lockf.
diff --git a/sysdeps/unix/sysv/aix/lockf.c b/sysdeps/unix/sysv/aix/lockf.c
new file mode 100644
index 0000000..43ac1af
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lockf.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int klockf (int fd, int function, long long int size);
+
+int
+lockf (int fd, int cmd, off_t len)
+{
+ return klockf (fd, cmd, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47415cb2612e7d02c20b6821a9fb206b43898635
commit 47415cb2612e7d02c20b6821a9fb206b43898635
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:17:14 2000 +0000
AIX specific libc startup code..
diff --git a/sysdeps/unix/sysv/aix/libc-start.c b/sysdeps/unix/sysv/aix/libc-start.c
new file mode 100644
index 0000000..f7eb65e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/libc-start.c
@@ -0,0 +1,20 @@
+/* We don't need the usual code since we are using the AIX crt code. */
+
+/* This function is called in the AIX crt0. */
+void
+__mod_init (void)
+{
+ /* XXX What has to be done? */
+}
+
+/* This variable is reference in the AIX crt0 code.
+ XXX Since I don't know how it is used make it a pointer to a function. */
+void *__crt0v = __mod_init;
+
+
+/* XXX Another weird function from the C library. I have no idea what
+ it does but it is needed by libgcc. */
+void
+_savef14 (void)
+{
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d338985e4679487e1a89e22aed4bb1c8eb36da0
commit 9d338985e4679487e1a89e22aed4bb1c8eb36da0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:55 2000 +0000
AIX implementation of lchown.
diff --git a/sysdeps/unix/sysv/aix/lchown.c b/sysdeps/unix/sysv/aix/lchown.c
new file mode 100644
index 0000000..57a83b5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/lchown.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__lchown (const char *file, uid_t owner, gid_t group)
+{
+ return lchown (file, owner, group);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ae9382d40bde8ffe104b107b7c526e743d20de8
commit 4ae9382d40bde8ffe104b107b7c526e743d20de8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:47 2000 +0000
AIX implementation of kill.
diff --git a/sysdeps/unix/sysv/aix/kill.c b/sysdeps/unix/sysv/aix/kill.c
new file mode 100644
index 0000000..dfe366c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/kill.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+int
+__kill (pid_t pid, int sig)
+{
+ return kill (pid, sig);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=551e64e98e74f68b762f34c1dc5d65afbf110058
commit 551e64e98e74f68b762f34c1dc5d65afbf110058
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:41 2000 +0000
AIX specific kernel prototypes.
diff --git a/sysdeps/unix/sysv/aix/kernel_proto.h b/sysdeps/unix/sysv/aix/kernel_proto.h
new file mode 100644
index 0000000..d3ddfa6
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/kernel_proto.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains prototypes for the "functions" exported by /unix
+ on AIX. */
+#include <sys/types.h>
+
+
+extern ssize_t kwrite (int, const void *, size_t);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=698fb09ef599b4eefc9093eb90b241883db52e90
commit 698fb09ef599b4eefc9093eb90b241883db52e90
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:23 2000 +0000
AIX implementation of getuid.
diff --git a/sysdeps/unix/sysv/aix/getuid.c b/sysdeps/unix/sysv/aix/getuid.c
new file mode 100644
index 0000000..4bc1c8a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getuid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
+#include <sys/id.h>
+
+extern uid_t getuidx (int which);
+
+uid_t
+__getuid (void)
+{
+ return getuidx (ID_REAL);
+}
+strong_alias (__getuid, getuid)
diff --git a/sysdeps/unix/sysv/aix/ioctl.c b/sysdeps/unix/sysv/aix/ioctl.c
new file mode 100644
index 0000000..6e1445d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/ioctl.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdarg.h>
+#include <sys/ioctl.h>
+
+extern int kioctl (int fdes, int cmd, unsigned long int arg,
+ unsigned long int ext);
+
+int
+__ioctl (int fdes, unsigned long int cmd, ...)
+{
+ va_list va;
+ int res;
+ unsigned long int arg;
+ unsigned long int ext;
+
+ va_start (va, cmd);
+ arg = va_arg (va, unsigned long int);
+ ext = va_arg (va, unsigned long int);
+
+ res = kioctl (fdes, cmd, arg, ext);
+
+ va_end (va);
+
+ return res;
+}
+strong_alias (__ioctl, ioctl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e8d527d7534c114485d82094178d306f0b280f5
commit 4e8d527d7534c114485d82094178d306f0b280f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:09 2000 +0000
AIX implementation of getsockname.
diff --git a/sysdeps/unix/sysv/aix/getsockname.c b/sysdeps/unix/sysv/aix/getsockname.c
new file mode 100644
index 0000000..c1a5614
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getsockname.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+extern int ngetsockname (int s, void *uap_asa, int *uap_alen);
+
+int
+getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len)
+{
+ return ngetsockname (fd, addr.__sockaddr__, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbcea352bd5f6e20e28a39510b808f20f758558d
commit bbcea352bd5f6e20e28a39510b808f20f758558d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:16:01 2000 +0000
AIX implementation of getsid.
diff --git a/sysdeps/unix/sysv/aix/getsid.c b/sysdeps/unix/sysv/aix/getsid.c
new file mode 100644
index 0000000..88b9daa
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getsid.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kgetsid (pid_t pid);
+
+int
+getsid (pid_t pid)
+{
+ return kgetsid (pid);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d22193dc9dac5c2574f9c7e55b2477228988f0aa
commit d22193dc9dac5c2574f9c7e55b2477228988f0aa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:55 2000 +0000
AIX implementation of getppid.
diff --git a/sysdeps/unix/sysv/aix/getppid.c b/sysdeps/unix/sysv/aix/getppid.c
new file mode 100644
index 0000000..6036fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getppid.c
@@ -0,0 +1 @@
+/* This is a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7e7790bfb7b80b4b7362ccbdc9ed044caf6d0a1
commit c7e7790bfb7b80b4b7362ccbdc9ed044caf6d0a1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:50 2000 +0000
AIX implementation of getpid.
diff --git a/sysdeps/unix/sysv/aix/getpid.c b/sysdeps/unix/sysv/aix/getpid.c
new file mode 100644
index 0000000..67ef7ea
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getpid.c
@@ -0,0 +1,6 @@
+/* This is a system call. We only have to provide the wrapper. */
+int
+__getpid (void)
+{
+ return getpid ();
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c5ac4b8469389b1fe0e39f9f7217f3d88880aba
commit 7c5ac4b8469389b1fe0e39f9f7217f3d88880aba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:44 2000 +0000
AIX implementation of getpgrp.
diff --git a/sysdeps/unix/sysv/aix/getpgrp.c b/sysdeps/unix/sysv/aix/getpgrp.c
new file mode 100644
index 0000000..ce37738
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getpgrp.c
@@ -0,0 +1 @@
+/* This function is available as a system call. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebea3f565b3ecab953b0a5fbe411acf05bc38fb9
commit ebea3f565b3ecab953b0a5fbe411acf05bc38fb9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:37 2000 +0000
AIX implementation of getpgid.
diff --git a/sysdeps/unix/sysv/aix/getpgid.c b/sysdeps/unix/sysv/aix/getpgid.c
new file mode 100644
index 0000000..53f2e1a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getpgid.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kgetpgidx (pid_t pid);
+
+int
+__getgpid (pid_t pid)
+{
+ return kgetpgidx (pid);
+}
+strong_alias (__getpgid, getpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a00d14b76c755908722d134af05bd23aa7296b9f
commit a00d14b76c755908722d134af05bd23aa7296b9f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:30 2000 +0000
AIX implementation of getpeername.
diff --git a/sysdeps/unix/sysv/aix/getpeername.c b/sysdeps/unix/sysv/aix/getpeername.c
new file mode 100644
index 0000000..d227e28
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getpeername.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/socket.h>
+
+extern int ngetpeername (int s, void *uap_asa, int *uap_alen);
+
+int
+getpeername (int fd, __SOCKADDR_ARG addr, socklen_t *len)
+{
+ return ngetpeername (fd, addr.__sockaddr__, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f29772215fe5e1a8f4178ccc93526f78fea6adb9
commit f29772215fe5e1a8f4178ccc93526f78fea6adb9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:22 2000 +0000
AIX implementation of getgid.
diff --git a/sysdeps/unix/sysv/aix/getgid.c b/sysdeps/unix/sysv/aix/getgid.c
new file mode 100644
index 0000000..ca08865
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getgid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_REAL */
+#include <sys/id.h>
+
+extern gid_t getgidx (int which);
+
+gid_t
+__getgid (void)
+{
+ return getgidx (ID_REAL);
+}
+strong_alias (__getgid, getgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9676468e88ff022d8440043e0cbb9dbb93d725bf
commit 9676468e88ff022d8440043e0cbb9dbb93d725bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:16 2000 +0000
AIX implementation of geteuid.
diff --git a/sysdeps/unix/sysv/aix/geteuid.c b/sysdeps/unix/sysv/aix/geteuid.c
new file mode 100644
index 0000000..4856868
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/geteuid.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
+#include <sys/id.h>
+
+
+uid_t
+__geteuid (void)
+{
+ return getuidx (ID_EFFECTIVE);
+}
+strong_alias (__geteuid, geteuid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60b73b68d4dfad739f3d6f57e55a12ca0552f67f
commit 60b73b68d4dfad739f3d6f57e55a12ca0552f67f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:10 2000 +0000
AIX implementation of getegid.
diff --git a/sysdeps/unix/sysv/aix/getegid.c b/sysdeps/unix/sysv/aix/getegid.c
new file mode 100644
index 0000000..30a6a99
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getegid.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+/* is there a reason *NOT* to include <sys/id.h>? If so #define ID_EFFECTIVE */
+#include <sys/id.h>
+
+
+gid_t
+__getegid (void)
+{
+ return getgidx (ID_EFFECTIVE);
+}
+strong_alias (__getegid, getegid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3fc51027666dbb463ca78bce388a66e64bdf484
commit f3fc51027666dbb463ca78bce388a66e64bdf484
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:15:02 2000 +0000
AIX implementation of getdents.
diff --git a/sysdeps/unix/sysv/aix/getdents.c b/sysdeps/unix/sysv/aix/getdents.c
new file mode 100644
index 0000000..fd45199
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/getdents.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <dirent.h>
+#include <sys/types.h>
+
+extern int getdirent (int fd, char *buf, size_t count);
+
+ssize_t
+__getdents (int fd, char *buf, size_t count)
+{
+ return getdirent (fd, buf, count);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=46f4ffc34c3adeac2ca58e6d9cfe839e7344ef5f
commit 46f4ffc34c3adeac2ca58e6d9cfe839e7344ef5f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:51 2000 +0000
AIX implementation of __fxstat64.
diff --git a/sysdeps/unix/sysv/aix/fxstat64.c b/sysdeps/unix/sysv/aix/fxstat64.c
new file mode 100644
index 0000000..5d2f22b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fxstat64.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+#define STX_NORMAL 0x00
+#define STX_64 0x08
+
+extern int fstatx (int fd, struct stat64 *st, int len, int cmd);
+
+int
+__fxstat64 (int ver, int fd, struct stat64 *st)
+{
+ assert (ver == 0);
+ return fstatx (fd, st, sizeof (*st), STX_NORMAL | STX_64);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6a83472a8e0dd04cc5439d358ca2f27abd624ed
commit c6a83472a8e0dd04cc5439d358ca2f27abd624ed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:47 2000 +0000
AIX implementation of __fxstat.
diff --git a/sysdeps/unix/sysv/aix/fxstat.c b/sysdeps/unix/sysv/aix/fxstat.c
new file mode 100644
index 0000000..9f5a477
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fxstat.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/stat.h>
+
+#define STX_NORMAL 0x00
+
+extern int fstatx (int fd, struct stat *st, int len, int cmd);
+
+int
+__fxstat (int ver, int fd, struct stat *st)
+{
+ assert (ver == 0);
+ return fstatx (fd, st, sizeof (*st), STX_NORMAL);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71b3147ef13abadf996871c1ca1542469c37dd46
commit 71b3147ef13abadf996871c1ca1542469c37dd46
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:37 2000 +0000
AIX implementation of ftruncate64.
diff --git a/sysdeps/unix/sysv/aix/ftruncate64.c b/sysdeps/unix/sysv/aix/ftruncate64.c
new file mode 100644
index 0000000..56a5ed5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/ftruncate64.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kftruncate (int fd, long long int length);
+
+int
+ftruncate64 (int fd, off64_t length)
+{
+ return kftruncate (fd, length);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e745b101a7623f701ee13b091325f977adddf20e
commit e745b101a7623f701ee13b091325f977adddf20e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:30 2000 +0000
AIX implementation of ftruncate.
diff --git a/sysdeps/unix/sysv/aix/ftruncate.c b/sysdeps/unix/sysv/aix/ftruncate.c
new file mode 100644
index 0000000..5ad14cb
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/ftruncate.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern int kftruncate (int fd, long long int length);
+
+int
+__ftruncate (int fd, off_t length)
+{
+ return kftruncate (fd, length);
+}
+strong_alias (__ftruncate, ftruncate)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=026b4afc06b7690914ff780922996164fd477087
commit 026b4afc06b7690914ff780922996164fd477087
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:21 2000 +0000
AIX implementation of fsync.
diff --git a/sysdeps/unix/sysv/aix/fsync.c b/sysdeps/unix/sysv/aix/fsync.c
new file mode 100644
index 0000000..6ad1dac
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fsync.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+#define _FSYNC 0x00000010
+#define FFILESYNC _FSYNC
+
+extern int kfsync_range (int fd, int how, long long int off,
+ long long int len);
+
+int
+fsync (int fd)
+{
+ return kfsync_range (fd, FFILESYNC, 0, 0);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1be48beb0ae93de38883246b5d1e913a39eaae03
commit 1be48beb0ae93de38883246b5d1e913a39eaae03
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:14 2000 +0000
AIX implementation of fstatfs.
diff --git a/sysdeps/unix/sysv/aix/fstatfs.c b/sysdeps/unix/sysv/aix/fstatfs.c
new file mode 100644
index 0000000..3b92b9e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fstatfs.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/statfs.h>
+
+extern int fstatfs (int fd, struct statfs *buf);
+
+int
+__fstatfs (int fd, struct statfs *buf)
+{
+ return fstatfs (fd, buf);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe93696234605b3014e3851c04e53a2ccfa162c2
commit fe93696234605b3014e3851c04e53a2ccfa162c2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:14:07 2000 +0000
AIX implementation of fork.
diff --git a/sysdeps/unix/sysv/aix/fork.c b/sysdeps/unix/sysv/aix/fork.c
new file mode 100644
index 0000000..9c84fb0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fork.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+
+pid_t
+__fork (void)
+{
+ return kfork ();
+}
+strong_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ddef432c154460394aa9b17dc8408ad1c34f1cf5
commit ddef432c154460394aa9b17dc8408ad1c34f1cf5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:13:56 2000 +0000
AIX implementation of fcntl.
diff --git a/sysdeps/unix/sysv/aix/fcntl.c b/sysdeps/unix/sysv/aix/fcntl.c
new file mode 100644
index 0000000..5a4bb8a
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fcntl.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fcntl.h>
+#include <stdarg.h>
+
+extern int kfcntl (int fdes, int cmd, unsigned long int arg);
+
+int
+__fcntl (int fdes, int cmd, ...)
+{
+ va_list va;
+ int res;
+ unsigned long int arg;
+
+ va_start (va, cmd);
+ arg = va_arg (va, unsigned long int);
+
+ res = kfcntl (fdes, cmd, arg);
+
+ va_end (va);
+
+ return res;
+}
+strong_alias (__fcntl, fcntl)
diff --git a/sysdeps/unix/sysv/aix/fdatasync.c b/sysdeps/unix/sysv/aix/fdatasync.c
new file mode 100644
index 0000000..177260d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fdatasync.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+#define _FDATASYNC 0x00400000
+#define FDATASYNC _FDATASYNC
+
+extern int kfsync_range (int fd, int how, long long int off,
+ long long int len);
+
+int
+fdatasync (int fd)
+{
+ return kfsync_range (fd, FDATASYNC, 0, 0);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d4d9380f359687c999d0e055f49ba90e00aa6cf
commit 2d4d9380f359687c999d0e055f49ba90e00aa6cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:13:45 2000 +0000
AIX implementation of fchown.
diff --git a/sysdeps/unix/sysv/aix/fchown.c b/sysdeps/unix/sysv/aix/fchown.c
new file mode 100644
index 0000000..de51384
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/fchown.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__fchown (int fds, uid_t owner, gid_t group)
+{
+ return fchown (fds, owner, group);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e72d8a4fd411cf49510cb014b00a558def49f505
commit e72d8a4fd411cf49510cb014b00a558def49f505
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:13:37 2000 +0000
AIX implementation of execve.
diff --git a/sysdeps/unix/sysv/aix/execve.c b/sysdeps/unix/sysv/aix/execve.c
new file mode 100644
index 0000000..ea1b67d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/execve.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+int
+__execve (const char *path, char *const argv[], char *const envp[])
+{
+ return execve (path, argv, envp);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4b2b1bb099144c1fadfc3c0d42a2179757ac1b8
commit b4b2b1bb099144c1fadfc3c0d42a2179757ac1b8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:13:29 2000 +0000
AIX implementation of euidaccess.
diff --git a/sysdeps/unix/sysv/aix/euidaccess.c b/sysdeps/unix/sysv/aix/euidaccess.c
new file mode 100644
index 0000000..598755c
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/euidaccess.c
@@ -0,0 +1,5 @@
+int
+euidaccess (const char *name, int type)
+{
+ return accessx (name, type, ACC_SELF);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6011d72b4666ac6a10f25be7c6fccb0109d996ec
commit 6011d72b4666ac6a10f25be7c6fccb0109d996ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:13:16 2000 +0000
AIX specific environment definition.
diff --git a/sysdeps/unix/sysv/aix/environ.c b/sysdeps/unix/sysv/aix/environ.c
new file mode 100644
index 0000000..01e7ba8
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/environ.c
@@ -0,0 +1 @@
+/* We don't need to define environ, the kernel does it. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3aa78fe2d4a527aa82d12c50413175f0edbb8bac
commit 3aa78fe2d4a527aa82d12c50413175f0edbb8bac
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:57 2000 +0000
AIX implementation of connect.
diff --git a/sysdeps/unix/sysv/aix/connect.c b/sysdeps/unix/sysv/aix/connect.c
new file mode 100644
index 0000000..7fb636d
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/connect.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <sys/socket.h>
+
+int
+__connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t len)
+{
+ return connect (fd, addr, len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd08ea71367e3c690e5c573d4199dc1c1e711803
commit fd08ea71367e3c690e5c573d4199dc1c1e711803
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:49 2000 +0000
Rebuild.
diff --git a/sysdeps/unix/sysv/aix/configure b/sysdeps/unix/sysv/aix/configure
new file mode 100644
index 0000000..7fc920e
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/configure
@@ -0,0 +1,8 @@
+ # Local configure fragment for sysdeps/unix/sysv/linux.
+
+# On Linux, the default is to use libio instead of stdio.
+test $stdio = default && stdio=libio
+
+# Don't bother trying to generate any glue code to be compatible with the
+# existing system library, because we are the only system library.
+inhibit_glue=yes
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=601c41de3291a4813fa4db71fe2bdd3ffab5249f
commit 601c41de3291a4813fa4db71fe2bdd3ffab5249f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:41 2000 +0000
AIX specific configure.in.
diff --git a/sysdeps/unix/sysv/aix/configure.in b/sysdeps/unix/sysv/aix/configure.in
new file mode 100644
index 0000000..e3fd4ef
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/configure.in
@@ -0,0 +1,10 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux.
+
+# On Linux, the default is to use libio instead of stdio.
+test $stdio = default && stdio=libio
+
+# Don't bother trying to generate any glue code to be compatible with the
+# existing system library, because we are the only system library.
+inhibit_glue=yes
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36e2d40c303de2f46b3ba5dbf4f68e48f0dbc72f
commit 36e2d40c303de2f46b3ba5dbf4f68e48f0dbc72f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:25 2000 +0000
AIX implementation of close.
diff --git a/sysdeps/unix/sysv/aix/close.c b/sysdeps/unix/sysv/aix/close.c
new file mode 100644
index 0000000..4d500c5
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/close.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+int
+__close (int fd)
+{
+ return close (fd);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5460770e60f5645c3aaf3583216c63fb5e6af5e2
commit 5460770e60f5645c3aaf3583216c63fb5e6af5e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:16 2000 +0000
AIX implementation of chown.
diff --git a/sysdeps/unix/sysv/aix/chown.c b/sysdeps/unix/sysv/aix/chown.c
new file mode 100644
index 0000000..902d410
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/chown.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+int
+__chown (const char *file, uid_t owner, gid_t group)
+{
+ return chown (file, owner, group);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9fd2b3823ec0b1353be674280a4e5b19854b2f9
commit d9fd2b3823ec0b1353be674280a4e5b19854b2f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:10 2000 +0000
AIX implementation of brk.
diff --git a/sysdeps/unix/sysv/aix/brk.c b/sysdeps/unix/sysv/aix/brk.c
new file mode 100644
index 0000000..64bc8cd
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/brk.c
@@ -0,0 +1,8 @@
+/* This is a system call. We only have to provide the wrapper. */
+#include <unistd.h>
+
+int
+__brk (void *addr)
+{
+ return brk (addr);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23ef7b61549d7aa931ac3160a790255657915118
commit 23ef7b61549d7aa931ac3160a790255657915118
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:12:05 2000 +0000
AIX implementation of access.
diff --git a/sysdeps/unix/sysv/aix/access.c b/sysdeps/unix/sysv/aix/access.c
new file mode 100644
index 0000000..e25ee8f
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/access.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+
+extern int accessx (const char *name, int type, int who);
+
+int
+__access (const char *name, int type)
+{
+ return accessx (name, type, ACC_INVOKER);
+}
+strong_alias (__access, access)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a26c24f4539380d63f8ee70ec6b59f4432a056a0
commit a26c24f4539380d63f8ee70ec6b59f4432a056a0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:11:58 2000 +0000
AIX implementation of accept.
diff --git a/sysdeps/unix/sysv/aix/accept.c b/sysdeps/unix/sysv/aix/accept.c
new file mode 100644
index 0000000..364f02b
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/accept.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <assert.h>
+#include <sys/socket.h>
+
+extern int naccept (int s, void *uap_name, int *uap_anamelen);
+
+int
+accept (int fd, __SOCKADDR_ARG addr, socklen_t *addr_len)
+{
+ assert (sizeof (socklen_t) == sizeof (int));
+ return naccept (fd, addr.__sockaddr__, addr_len);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5570c4b60c51e0061918e27d250bcd6996474b4d
commit 5570c4b60c51e0061918e27d250bcd6996474b4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:11:42 2000 +0000
AIX implementation of _exit.
diff --git a/sysdeps/unix/sysv/aix/_exit.c b/sysdeps/unix/sysv/aix/_exit.c
new file mode 100644
index 0000000..f4654c1
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/_exit.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stdlib.h>
+
+
+/* We define only thr alias introduced in ISO C99 because _exit itself
+ is a system call. */
+void
+_Exit (status)
+ int status;
+{
+ _exit (status);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5659dfb7936abeac75d52c0eaf5fc39b4f503378
commit 5659dfb7936abeac75d52c0eaf5fc39b4f503378
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 21 01:11:25 2000 +0000
AIX specific Makefile.
diff --git a/sysdeps/unix/sysv/aix/Makefile b/sysdeps/unix/sysv/aix/Makefile
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc9b3b98b929ac816c1a3808c1115e2724f30788
commit cc9b3b98b929ac816c1a3808c1115e2724f30788
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 20 22:51:18 2000 +0000
(MADV_*): Add flags from latest Linux kernel.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
index fcc0643..37a1959 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -73,3 +73,12 @@
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e47b466c7a5f2f77f1e16d71b3cf8da086e57dc
commit 7e47b466c7a5f2f77f1e16d71b3cf8da086e57dc
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 20 22:08:26 2000 +0000
* sysdeps/unix/sysv/linux/alpha/Versions: Put pciconfig_iobase
in GLIBC_2.1.4.
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index d1b0e48..7eee0f7 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -46,7 +46,7 @@ libc {
# w*
wait4;
}
- GLIBC_2.1.3 {
+ GLIBC_2.1.4 {
pciconfig_iobase;
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9dc874df52f8e7d251e4684cefe95320c31074fd
commit 9dc874df52f8e7d251e4684cefe95320c31074fd
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 20 20:32:11 2000 +0000
* sysdeps/alpha/fpu/fraiseexcpt.c: Use get/set_fp_control instead
of arithmetic instructions.
* sysdeps/alpha/fpu/s_ceil.c: Use round to -inf instead of playing
with the fpcr. Protect from INV exception.
* sysdeps/alpha/fpu/s_ceilf.c: Likewise.
* sysdeps/alpha/fpu/s_floor.c: Protect from INV exception.
* sysdeps/alpha/fpu/s_floorf.c: Likewise.
* sysdeps/alpha/fpu/s_copysign.c: New.
* sysdeps/alpha/fpu/s_copysignf.c: New.
* sysdeps/alpha/fpu/s_fabs.c: New.
* sysdeps/alpha/fpu/s_fabsf.c: New.
* sysdeps/alpha/fpu/s_rint.c: New.
* sysdeps/alpha/fpu/s_rintf.c: New.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index a3e60d0..b0eab00 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -24,43 +24,16 @@
int
__feraiseexcept (int excepts)
{
- double tmp;
- double dummy;
+ unsigned long int tmp;
- /* Raise exceptions represented by EXPECTS. But we must raise only
- one signal at a time. It is important the if the overflow/underflow
- exception and the inexact exception are given at the same time,
- the overflow/underflow exception precedes the inexact exception. */
+ /* Get the current exception state. */
+ tmp = __ieee_get_fp_control ();
- /* We do these bits in assembly to be certain GCC doesn't optimize
- away something important. */
+ /* Set all the bits that were called for. */
+ tmp |= (excepts & FE_ALL_EXCEPT);
- /* First: invalid exception. */
- if (FE_INVALID & excepts)
- /* One example of a invalid operation is 0 * Infinity. */
- __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
- : "=&f" (tmp) : "f" (HUGE_VAL));
-
- /* Next: division by zero. */
- if (FE_DIVBYZERO & excepts)
- __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
- : "=&f" (tmp), "=f" (dummy));
-
- /* Next: overflow. */
- if (FE_OVERFLOW & excepts)
- __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
- : "=&f" (tmp) : "f" (DBL_MAX));
-
- /* Next: underflow. */
- if (FE_UNDERFLOW & excepts)
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f" (tmp) : "f" (DBL_MIN),
- "f" ((double) (1UL << 60)));
-
- /* Last: inexact. */
- if (FE_INEXACT & excepts)
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f" (tmp) : "f" (1.0), "f" (M_PI));
+ /* And store it back. */
+ __ieee_set_fp_control (tmp);
/* Success. */
return 0;
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
index 23491db..f30db00 100644
--- a/sysdeps/alpha/fpu/s_ceil.c
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -19,34 +19,30 @@
#include <math.h>
+/* Use the -inf rounding mode conversion instructions to implement
+ ceil, via something akin to -floor(-x). This is much faster than
+ playing with the fpcr to achieve +inf rounding mode. */
+
double
__ceil (double x)
{
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
{
- double tmp1;
- unsigned long fpcr0, fpcr1;
- unsigned long pinf = 3UL << 58;
-
- /* Set round to +inf. */
- __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0));
- __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf));
+ double tmp1, new_x;
- /* Calculate! */
+ new_x = -x;
+ __asm (
#ifdef _IEEE_FP_INEXACT
- __asm("cvttq/svid %2,%1\n\tcvtqt/suid %1,%0"
- : "=f"(x), "=&f"(tmp1)
- : "f"(x));
+ "cvttq/svim %2,%1\n\t"
#else
- __asm("cvttq/svd %2,%1\n\tcvtqt/d %1,%0"
- : "=f"(x), "=&f"(tmp1)
- : "f"(x));
+ "cvttq/svm %2,%1\n\t"
#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(new_x), "=&f"(tmp1)
+ : "f"(new_x));
- /* Reset rounding mode, while retaining new exception bits. */
- __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1));
- fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf);
- __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0));
+ /* Fix up the negation we did above, as well as handling -0 properly. */
+ x = copysign(new_x, x);
}
return x;
}
diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c
index 3defaeb..35c51a2 100644
--- a/sysdeps/alpha/fpu/s_ceilf.c
+++ b/sysdeps/alpha/fpu/s_ceilf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -19,39 +19,35 @@
#include <math.h>
+/* Use the -inf rounding mode conversion instructions to implement
+ ceil, via something akin to -floor(-x). This is much faster than
+ playing with the fpcr to achieve +inf rounding mode. */
+
float
__ceilf (float x)
{
- if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
{
- float tmp1, tmp2;
- unsigned long fpcr0, fpcr1;
- unsigned long pinf = 3UL << 58;
-
- /* Set round to +inf. */
- __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0));
- __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf));
+ /* Note that Alpha S_Floating is stored in registers in a
+ restricted T_Floating format, so we don't even need to
+ convert back to S_Floating in the end. The initial
+ conversion to T_Floating is needed to handle denormals. */
- /* Calculate!
- Note that Alpha S_Floating is stored in registers in a
- restricted T_Floating format, so we don't even need to
- convert back to S_Floating in the end. The initial
- conversion to T_Floating is needed to handle denormals. */
+ float tmp1, tmp2, new_x;
+ new_x = -x;
+ __asm ("cvtst/s %3,%2\n\t"
#ifdef _IEEE_FP_INEXACT
- __asm("cvtst/s %3,%2\n\tcvttq/svid %2,%1\n\tcvtqt/suid %1,%0"
- : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
- : "f"(x));
+ "cvttq/svim %2,%1\n\t"
#else
- __asm("cvtst/s %3,%2\n\tcvttq/svd %2,%1\n\tcvtqt/d %1,%0"
- : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
- : "f"(x));
+ "cvttq/svm %2,%1\n\t"
#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
+ : "f"(new_x));
- /* Reset rounding mode, while retaining new exception bits. */
- __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1));
- fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf);
- __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0));
+ /* Fix up the negation we did above, as well as handling -0 properly. */
+ x = copysignf(new_x, x);
}
return x;
}
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_copysign.c
similarity index 56%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_copysign.c
index 146e19b..5c8d827 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_copysign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -19,33 +19,15 @@
#include <math.h>
-
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
double
-__floor (double x)
+__copysign (double x, double y)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
- {
- double __tmp1;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
-#else
- "cvttq/svm %2,%1\n\t"
-#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1)
- : "f"(x));
- }
+ __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
return x;
}
-weak_alias (__floor, floor)
+weak_alias (__copysign, copysign)
#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
+strong_alias (__copysign, __copysignl)
+weak_alias (__copysign, copysignl)
#endif
diff --git a/sysdeps/alpha/fpu/s_copysignf.c b/sysdeps/alpha/fpu/s_copysignf.c
new file mode 100644
index 0000000..d2c5d88
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_copysignf.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+float
+__copysignf (float x, float y)
+{
+ __asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
+ return x;
+}
+
+weak_alias (__copysignf, copysignf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_fabs.c
similarity index 57%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_fabs.c
index 146e19b..fb446d8 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_fabs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -19,33 +19,19 @@
#include <math.h>
-
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
double
-__floor (double x)
+__fabs (double x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
- {
- double __tmp1;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+#if __GNUC_PREREQ (2, 8)
+ return __builtin_fabs (x);
#else
- "cvttq/svm %2,%1\n\t"
-#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1)
- : "f"(x));
- }
+ __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
return x;
+#endif
}
-weak_alias (__floor, floor)
+weak_alias (__fabs, fabs)
#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
+strong_alias (__fabs, __fabsl)
+weak_alias (__fabs, fabsl)
#endif
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_fabsf.c
similarity index 55%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_fabsf.c
index 146e19b..ec53907 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_fabsf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -19,33 +19,15 @@
#include <math.h>
-
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
-double
-__floor (double x)
+float
+__fabsf (float x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
- {
- double __tmp1;
- __asm (
-#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+#if __GNUC_PREREQ (2, 8)
+ return __builtin_fabsf (x);
#else
- "cvttq/svm %2,%1\n\t"
-#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1)
- : "f"(x));
- }
+ __asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
return x;
+#endif
}
-weak_alias (__floor, floor)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
-#endif
+weak_alias (__fabsf, fabsf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index 146e19b..b6d01f5 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -27,10 +27,10 @@
double
__floor (double x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
{
- double __tmp1;
+ double tmp1, new_x;
+
__asm (
#ifdef _IEEE_FP_INEXACT
"cvttq/svim %2,%1\n\t"
@@ -38,8 +38,12 @@ __floor (double x)
"cvttq/svm %2,%1\n\t"
#endif
"cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1)
+ : "=f"(new_x), "=&f"(tmp1)
: "f"(x));
+
+ /* floor(-0) == -0, and in general we'll always have the same
+ sign as our input. */
+ x = copysign(new_x, x);
}
return x;
}
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index 9e69364..624e7c8 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -27,15 +27,14 @@
float
__floorf (float x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
{
/* Note that Alpha S_Floating is stored in registers in a
restricted T_Floating format, so we don't even need to
convert back to S_Floating in the end. The initial
conversion to T_Floating is needed to handle denormals. */
- float tmp1, tmp2;
+ float tmp1, tmp2, new_x;
__asm ("cvtst/s %3,%2\n\t"
#ifdef _IEEE_FP_INEXACT
@@ -44,8 +43,12 @@ __floorf (float x)
"cvttq/svm %2,%1\n\t"
#endif
"cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
+ : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
: "f"(x));
+
+ /* floor(-0) == -0, and in general we'll always have the same
+ sign as our input. */
+ x = copysignf(new_x, x);
}
return x;
}
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_rint.c
similarity index 61%
copy from sysdeps/alpha/fpu/s_floor.c
copy to sysdeps/alpha/fpu/s_rint.c
index 146e19b..7309b41 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -20,32 +20,31 @@
#include <math.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
double
-__floor (double x)
+__rint (double x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ if (isless (fabs (x), 9007199254740992.0)) /* 1 << DBL_MANT_DIG */
{
- double __tmp1;
+ double tmp1, new_x;
__asm (
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "cvttq/svid %2,%1\n\t"
#else
- "cvttq/svm %2,%1\n\t"
+ "cvttq/svd %2,%1\n\t"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1)
+ "cvtqt/d %1,%0\n\t"
+ : "=f"(new_x), "=&f"(tmp1)
: "f"(x));
+
+ /* rint(-0.1) == -0, and in general we'll always have the same
+ sign as our input. */
+ x = copysign(new_x, x);
}
return x;
}
-weak_alias (__floor, floor)
+weak_alias (__rint, rint)
#ifdef NO_LONG_DOUBLE
-strong_alias (__floor, __floorl)
-weak_alias (__floor, floorl)
+strong_alias (__rint, __rintl)
+weak_alias (__rint, rintl)
#endif
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_rintf.c
similarity index 68%
copy from sysdeps/alpha/fpu/s_floorf.c
copy to sysdeps/alpha/fpu/s_rintf.c
index 9e69364..044f7e5 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_rintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -20,34 +20,33 @@
#include <math.h>
-/* Use the -inf rounding mode conversion instructions to implement
- floor. We note when the exponent is large enough that the value
- must be integral, as this avoids unpleasant integer overflows. */
-
float
-__floorf (float x)
+__rintf (float x)
{
- /* Check not zero since floor(-0) == -0. */
- if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
{
/* Note that Alpha S_Floating is stored in registers in a
restricted T_Floating format, so we don't even need to
convert back to S_Floating in the end. The initial
conversion to T_Floating is needed to handle denormals. */
- float tmp1, tmp2;
+ float tmp1, tmp2, new_x;
__asm ("cvtst/s %3,%2\n\t"
#ifdef _IEEE_FP_INEXACT
- "cvttq/svim %2,%1\n\t"
+ "cvttq/svid %2,%1\n\t"
#else
- "cvttq/svm %2,%1\n\t"
+ "cvttq/svd %2,%1\n\t"
#endif
- "cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
+ "cvtqt/d %1,%0\n\t"
+ : "=f"(new_x), "=&f"(tmp1), "=&f"(tmp2)
: "f"(x));
+
+ /* rint(-0.1) == -0, and in general we'll always have the same
+ sign as our input. */
+ x = copysignf(new_x, x);
}
return x;
}
-weak_alias (__floorf, floorf)
+weak_alias (__rintf, rintf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd112ac0a347fe08ba42273a365b5471d3dfca88
commit cd112ac0a347fe08ba42273a365b5471d3dfca88
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 20 20:24:41 2000 +0000
* sysdeps/unix/sysv/linux/alpha/bits/mman.h: Add MADV constants.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 1411c85..a7ada10 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -81,3 +81,19 @@
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 6 /* Don't need these pages. */
+#endif
+
+/* Not used by Linux, but here to make sure we don't clash with
+ OSF/1 defines. */
+#if 0 && defined(__USE_BSD)
+# define MADV_DONTNEED_COMPAT 4 /* Old version? */
+# define MADV_SPACEAVAIL 5 /* Ensure resources are available. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=194b9b3b26d70c79d4c40d90e07f4d59efbc5b20
commit 194b9b3b26d70c79d4c40d90e07f4d59efbc5b20
Author: Richard Henderson <rth@redhat.com>
Date: Mon Mar 20 20:23:05 2000 +0000
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines):
Kill sethae.
* sysdeps/unix/sysv/linux/alpha/Versions: Add pciconfig_iobase.
* sysdeps/unix/sysv/linux/alpha/ioperm.c (all address constants):
Use physical addresses not KSEG addresses.
(io_system): Add PYXIS.
(io): Remove hae.reg, sys, hae_shift.
(stb_mb, stw_mb, stl_mb, __sethae): New.
(inline_outb, inline_outw, inline_outl): Don't set hae.
(inline_inb, inline_inw, inline_inl): Likewise.
(dense_sethae): New null function.
(struct cpuinfo_data): New.
(process_cpuinfo): Use local and stack variables, not static.
Move readlink check here from init_iosys.
(init_iosys): Use __pciconfig_iobase first. Know SX and LX as PYXIS.
(_iopl): Simplify.
(_hae_shift): Calculate it here.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove sethae,
add pciconfig_iobase.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 0f08d13..62536ae 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -6,7 +6,7 @@ ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
- sethae ioperm osf_sigprocmask llseek adjtimex
+ ioperm osf_sigprocmask llseek adjtimex
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index ad49040..d1b0e48 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -46,4 +46,7 @@ libc {
# w*
wait4;
}
+ GLIBC_2.1.3 {
+ pciconfig_iobase;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 65bab81..310930b 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -21,11 +21,11 @@
Modern devices hopefully are sane enough not to put any performance
critical registers in i/o space.
- On the first call to ioperm() or _sethae(), the entire (E)ISA port
- space is mapped into the virtual address space at address io.base.
- mprotect() calls are then used to enable/disable access to ports. Per
- page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a
- Low Cost Alpha based system using 8KB pages).
+ On the first call to ioperm, the entire (E)ISA port space is mapped
+ into the virtual address space at address io.base. mprotect calls
+ are then used to enable/disable access to ports. Per page, there
+ are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a Low Cost Alpha
+ based system using 8KB pages).
Keep in mind that this code should be able to run in a 32bit address
space. It is therefore unreasonable to expect mmap'ing the entire
@@ -42,57 +42,62 @@
#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/io.h>
-#include <asm/page.h>
-#include <asm/system.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
#define PATH_ALPHA_SYSTYPE "/etc/alpha_systype"
#define PATH_CPUINFO "/proc/cpuinfo"
#define MAX_PORT 0x10000
+#define vip volatile int *
#define vuip volatile unsigned int *
+#define vusp volatile unsigned short *
+#define vucp volatile unsigned char *
-#define JENSEN_IO_BASE (0xfffffc0300000000UL)
-#define JENSEN_SPARSE_MEM (0xfffffc0200000000UL)
+#define JENSEN_IO_BASE (0x300000000UL)
+#define JENSEN_SPARSE_MEM (0x200000000UL)
/* With respect to the I/O architecture, APECS and LCA are identical,
so the following defines apply to LCA as well. */
-#define APECS_IO_BASE (0xfffffc01c0000000UL)
-#define APECS_SPARSE_MEM (0xfffffc0200000000UL)
-#define APECS_DENSE_MEM (0xfffffc0300000000UL)
+#define APECS_IO_BASE (0x1c0000000UL)
+#define APECS_SPARSE_MEM (0x200000000UL)
+#define APECS_DENSE_MEM (0x300000000UL)
-/* The same holds for CIA and PYXIS. */
-#define CIA_IO_BASE (0xfffffc8580000000UL)
-#define CIA_SPARSE_MEM (0xfffffc8000000000UL)
-#define CIA_DENSE_MEM (0xfffffc8600000000UL)
+/* The same holds for CIA and PYXIS, except for PYXIS we prefer BWX. */
+#define CIA_IO_BASE (0x8580000000UL)
+#define CIA_SPARSE_MEM (0x8000000000UL)
+#define CIA_DENSE_MEM (0x8600000000UL)
-/* SABLE is EV4, GAMMA is EV5 */
-#define T2_IO_BASE (0xfffffc03a0000000UL)
-#define T2_SPARSE_MEM (0xfffffc0200000000UL)
-#define T2_DENSE_MEM (0xfffffc03c0000000UL)
+#define PYXIS_IO_BASE (0x8900000000UL)
+#define PYXIS_DENSE_MEM (0x8800000000UL)
-#define GAMMA_IO_BASE (0xfffffc83a0000000UL)
-#define GAMMA_SPARSE_MEM (0xfffffc8200000000UL)
-#define GAMMA_DENSE_MEM (0xfffffc83c0000000UL)
+/* SABLE is EV4, GAMMA is EV5 */
+#define T2_IO_BASE (0x3a0000000UL)
+#define T2_SPARSE_MEM (0x200000000UL)
+#define T2_DENSE_MEM (0x3c0000000UL)
-/* these are for the RAWHIDE family */
-#define MCPCIA_IO_BASE (0xfffffcf980000000UL)
-#define MCPCIA_SPARSE_MEM (0xfffffcf800000000UL)
-#define MCPCIA_DENSE_MEM (0xfffffcf900000000UL)
+#define GAMMA_IO_BASE (0x83a0000000UL)
+#define GAMMA_SPARSE_MEM (0x8200000000UL)
+#define GAMMA_DENSE_MEM (0x83c0000000UL)
-/* Tsunami has no SPARSE space */
/* NOTE: these are hardwired to PCI bus 0 addresses!!! */
-/* Also, these are PHYSICAL, as/so there's no KSEG translation */
-#define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL)
-#define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL)
+#define MCPCIA_IO_BASE (0xf980000000UL)
+#define MCPCIA_SPARSE_MEM (0xf800000000UL)
+#define MCPCIA_DENSE_MEM (0xf900000000UL)
+
+/* Tsunami and Irongate use the same offsets, at least for hose 0. */
+#define TSUNAMI_IO_BASE (0x801fc000000UL)
+#define TSUNAMI_DENSE_MEM (0x80000000000UL)
-/* Polaris has SPARSE space, but we prefer to use only DENSE */
-/* because of some idiosyncracies in actually using SPARSE */
-#define POLARIS_IO_BASE (0xfffffcf9fc000000UL)
-#define POLARIS_DENSE_MEM (0xfffffcf900000000UL)
+/* Polaris has SPARSE space, but we prefer to use only DENSE
+ because of some idiosyncracies in actually using SPARSE. */
+#define POLARIS_IO_BASE (0xf9fc000000UL)
+#define POLARIS_DENSE_MEM (0xf900000000UL)
typedef enum {
- IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2,
+ IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_PYXIS, IOSYS_T2,
IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_POLARIS,
IOSYS_CPUDEP, IOSYS_PCIDEP
} iosys_t;
@@ -102,22 +107,22 @@ typedef enum {
} ioswizzle_t;
static struct io_system {
- int hae_shift;
unsigned long int bus_memory_base;
unsigned long int sparse_bus_mem_base;
unsigned long int bus_io_base;
} io_system[] = { /* NOTE! must match iosys_t enumeration */
-/* UNKNOWN */ {0, 0, 0, 0},
-/* JENSEN */ {7, 0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE},
-/* APECS */ {5, APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE},
-/* CIA */ {5, CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE},
-/* T2 */ {5, T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE},
-/* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE},
-/* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE},
-/* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE},
-/* POLARIS */ {0, POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE},
-/* CPUDEP */ {0, 0, 0, 0}, /* for platforms dependent on CPU type */
-/* PCIDEP */ {0, 0, 0, 0}, /* for platforms dependent on core logic */
+/* UNKNOWN */ {0, 0, 0},
+/* JENSEN */ {0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE},
+/* APECS */ {APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE},
+/* CIA */ {CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE},
+/* PYXIS */ {PYXIS_DENSE_MEM, 0, PYXIS_IO_BASE},
+/* T2 */ {T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE},
+/* TSUNAMI */ {TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE},
+/* MCPCIA */ {MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE},
+/* GAMMA */ {GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE},
+/* POLARIS */ {POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE},
+/* CPUDEP */ {0, 0, 0}, /* for platforms dependent on CPU type */
+/* PCIDEP */ {0, 0, 0}, /* for platforms dependent on core logic */
};
static struct platform {
@@ -126,23 +131,23 @@ static struct platform {
} platform[] = {
{"Alcor", IOSYS_CIA},
{"Avanti", IOSYS_APECS},
- {"XL", IOSYS_APECS},
{"Cabriolet", IOSYS_APECS},
{"EB164", IOSYS_PCIDEP},
{"EB64+", IOSYS_APECS},
{"EB66", IOSYS_APECS},
{"EB66P", IOSYS_APECS},
{"Jensen", IOSYS_JENSEN},
+ {"Miata", IOSYS_PYXIS},
{"Mikasa", IOSYS_CPUDEP},
- {"Noritake", IOSYS_CPUDEP},
- {"Noname", IOSYS_APECS},
- {"Sable", IOSYS_CPUDEP},
- {"Miata", IOSYS_CIA},
- {"Tsunami", IOSYS_TSUNAMI},
{"Nautilus", IOSYS_TSUNAMI},
+ {"Noname", IOSYS_APECS},
+ {"Noritake", IOSYS_CPUDEP},
{"Rawhide", IOSYS_MCPCIA},
- {"Ruffian", IOSYS_CIA},
+ {"Ruffian", IOSYS_PYXIS},
+ {"Sable", IOSYS_CPUDEP},
{"Takara", IOSYS_CIA},
+ {"Tsunami", IOSYS_TSUNAMI},
+ {"XL", IOSYS_APECS},
};
struct ioswtch {
@@ -156,31 +161,58 @@ struct ioswtch {
};
static struct {
- struct hae {
- unsigned long int cache;
- unsigned long int * reg;
- } hae;
+ unsigned long int hae_cache;
unsigned long int base;
struct ioswtch * swp;
unsigned long int bus_memory_base;
unsigned long int sparse_bus_memory_base;
unsigned long int io_base;
- iosys_t sys;
ioswizzle_t swiz;
- int hae_shift;
} io;
-extern void __sethae (unsigned long int); /* we can't use asm/io.h */
+static inline void
+stb_mb(unsigned char val, unsigned long addr)
+{
+ __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
+}
+
+static inline void
+stw_mb(unsigned short val, unsigned long addr)
+{
+ __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
+}
+
+static inline void
+stl_mb(unsigned int val, unsigned long addr)
+{
+ __asm__("stl %1,%0; mb" : "=m"(*(vip)addr) : "r"(val));
+}
+
+/* No need to examine error -- sethae never fails. */
+static inline void
+__sethae(unsigned long value)
+{
+ register unsigned long r16 __asm__("$16") = value;
+ register unsigned long r0 __asm__("$0") = __NR_sethae;
+ __asm__ __volatile__ ("callsys"
+ : "=r"(r0)
+ : "0"(r0), "r" (r16)
+ : inline_syscall_clobbers, "$19");
+}
+
+extern long __pciconfig_iobase(enum __pciconfig_iobase_which __which,
+ unsigned long int __bus,
+ unsigned long int __dfn);
static inline unsigned long int
port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size)
{
if (ioswiz == IOSWIZZLE_SPARSE)
- return (port << 5) + ((size - 1) << 3) + io.base;
+ return io.base + (port << 5) + ((size - 1) << 3);
else if (ioswiz == IOSWIZZLE_DENSE)
return port + io.base;
else
- return (port << 7) + ((size - 1) << 5) + io.base;
+ return io.base + (port << 7) + ((size - 1) << 5);
}
static inline void
@@ -192,20 +224,20 @@ inline_sethae (unsigned long int addr, ioswizzle_t ioswiz)
/* no need to set hae if msb is 0: */
msb = addr & 0xf8000000;
- if (msb && msb != io.hae.cache)
+ if (msb && msb != io.hae_cache)
{
+ io.hae_cache = msb;
__sethae (msb);
- io.hae.cache = msb;
}
}
- else
+ else if (ioswiz == IOSWIZZLE_JENSEN)
{
- /* hae on the Jensen is bits 31:25 shifted right */
+ /* HAE on the Jensen is bits 31:25 shifted right. */
addr >>= 25;
- if (addr != io.hae.cache)
+ if (addr != io.hae_cache)
{
+ io.hae_cache = addr;
__sethae (addr);
- io.hae.cache = addr;
}
}
}
@@ -216,23 +248,19 @@ inline_outb (unsigned char b, unsigned long int port, ioswizzle_t ioswiz)
unsigned int w;
unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1);
- inline_sethae (0, ioswiz);
asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
- *(vuip)addr = w;
- mb ();
+ stl_mb(w, addr);
}
static inline void
inline_outw (unsigned short int b, unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned int w;
+ unsigned long w;
unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2);
- inline_sethae (0, ioswiz);
asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
- *(vuip)addr = w;
- mb ();
+ stl_mb(w, addr);
}
@@ -241,19 +269,17 @@ inline_outl (unsigned int b, unsigned long int port, ioswizzle_t ioswiz)
{
unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4);
- inline_sethae (0, ioswiz);
- *(vuip)addr = b;
- mb ();
+ stl_mb(b, addr);
}
static inline unsigned int
inline_inb (unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 1);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1);
+ int result;
- inline_sethae (0, ioswiz);
- result = *(vuip) addr;
+ result = *(vip) addr;
result >>= (port & 3) * 8;
return 0xffUL & result;
}
@@ -262,10 +288,10 @@ inline_inb (unsigned long int port, ioswizzle_t ioswiz)
static inline unsigned int
inline_inw (unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 2);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2);
+ int result;
- inline_sethae (0, ioswiz);
- result = *(vuip) addr;
+ result = *(vip) addr;
result >>= (port & 3) * 8;
return 0xffffUL & result;
}
@@ -276,7 +302,6 @@ inline_inl (unsigned long int port, ioswizzle_t ioswiz)
{
unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4);
- inline_sethae (0, ioswiz);
return *(vuip) addr;
}
@@ -303,45 +328,41 @@ static inline void
inline_bwx_outb (unsigned char b, unsigned long int port)
{
unsigned long int addr = dense_port_to_cpu_addr (port);
-
- __asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b));
- mb ();
+ stb_mb (b, addr);
}
static inline void
inline_bwx_outw (unsigned short int b, unsigned long int port)
{
unsigned long int addr = dense_port_to_cpu_addr (port);
-
- __asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b));
- mb ();
+ stw_mb (b, addr);
}
static inline void
inline_bwx_outl (unsigned int b, unsigned long int port)
{
unsigned long int addr = dense_port_to_cpu_addr (port);
-
- *(vuip)addr = b;
- mb ();
+ stl_mb (b, addr);
}
static inline unsigned int
inline_bwx_inb (unsigned long int port)
{
- unsigned long int r, addr = dense_port_to_cpu_addr (port);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
+ unsigned char r;
- __asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr));
- return 0xffUL & r;
+ __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
+ return r;
}
static inline unsigned int
inline_bwx_inw (unsigned long int port)
{
- unsigned long int r, addr = dense_port_to_cpu_addr (port);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
+ unsigned short r;
- __asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr));
- return 0xffffUL & r;
+ __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
+ return r;
}
static inline unsigned int
@@ -411,6 +432,7 @@ DCL_IN(sparse, inb, SPARSE)
DCL_IN(sparse, inw, SPARSE)
DCL_IN(sparse, inl, SPARSE)
+DCL_SETHAE(dense, DENSE)
DCL_OUT_BWX(dense, outb, char)
DCL_OUT_BWX(dense, outw, short int)
DCL_OUT_BWX(dense, outl, int)
@@ -431,7 +453,7 @@ static struct ioswtch ioswtch[] = {
sparse_inb, sparse_inw, sparse_inl
},
{
- NULL,
+ dense_sethae,
dense_outb, dense_outw, dense_outl,
dense_inb, dense_inw, dense_inl
}
@@ -439,171 +461,216 @@ static struct ioswtch ioswtch[] = {
#undef DEBUG_IOPERM
-/* routine to process the /proc/cpuinfo information into the fields */
-/* that are required for correctly determining the platform parameters */
+/* Routine to process the /proc/cpuinfo information into the fields
+ that are required for correctly determining the platform parameters. */
-char systype[256]; /* system type field */
-char sysvari[256]; /* system variation field */
-char cpumodel[256]; /* cpu model field */
-int got_type, got_vari, got_model;
+struct cpuinfo_data
+{
+ char systype[256]; /* system type field */
+ char sysvari[256]; /* system variation field */
+ char cpumodel[256]; /* cpu model field */
+};
-static int
-process_cpuinfo(void)
+static inline int
+process_cpuinfo(struct cpuinfo_data *data)
{
+ int got_type, got_vari, got_model;
char dummy[256];
FILE * fp;
+ int n;
+
+ data->systype[0] = 0;
+ data->sysvari[0] = 0;
+ data->cpumodel[0] = 0;
+
+ /* If there's an /etc/alpha_systype link, we're intending to override
+ whatever's in /proc/cpuinfo. */
+ n = __readlink (PATH_ALPHA_SYSTYPE, data->systype, 256 - 1);
+ if (n > 0)
+ {
+ data->systype[n] = '\0';
+ return 1;
+ }
fp = fopen (PATH_CPUINFO, "r");
if (!fp)
return 0;
got_type = got_vari = got_model = 0;
- systype[0] = sysvari[0] = cpumodel[0] = 0;
while (1)
{
- if (fgets (dummy, 256, fp) == NULL) break;
- /* fprintf(stderr, "read: %s", dummy); */
+ if (fgets (dummy, 256, fp) == NULL)
+ break;
if (!got_type &&
- sscanf (dummy, "system type : %256[^\n]\n", systype) == 1)
+ sscanf (dummy, "system type : %256[^\n]\n", data->systype) == 1)
got_type = 1;
if (!got_vari &&
- sscanf (dummy, "system variation : %256[^\n]\n", sysvari) == 1)
+ sscanf (dummy, "system variation : %256[^\n]\n", data->sysvari) == 1)
got_vari = 1;
if (!got_model &&
- sscanf (dummy, "cpu model : %256[^\n]\n", cpumodel) == 1)
+ sscanf (dummy, "cpu model : %256[^\n]\n", data->cpumodel) == 1)
got_model = 1;
}
fclose (fp);
#ifdef DEBUG_IOPERM
- fprintf(stderr, "system type: %s\n", systype);
- fprintf(stderr, "system vari: %s\n", sysvari);
- fprintf(stderr, "cpu model: %s\n", cpumodel);
+ fprintf(stderr, "system type: `%s'\n", data->systype);
+ fprintf(stderr, "system vari: `%s'\n", data->sysvari);
+ fprintf(stderr, "cpu model: `%s'\n", data->cpumodel);
#endif
- return got_type+got_vari+got_model;
+ return got_type + got_vari + got_model;
}
+
+
/*
- * Initialize I/O system. To determine what I/O system we're dealing
- * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE,
- * if that fails, we lookup the "system type" field in /proc/cpuinfo.
- * If that fails as well, we give up.
- *
- * If the value received from PATH_ALPHA_SYSTYPE begins with a number,
- * assume this is a previously unsupported system and the values encode,
- * in order, "<io_base>,<hae_shift>,<dense_base>,<sparse_base>".
+ * Initialize I/O system.
*/
static int
init_iosys (void)
{
- int i, n;
+ long addr;
+ int i, olderrno = errno;
+ struct cpuinfo_data data;
- n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1);
- if (n > 0)
+ /* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */
+
+ addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0);
+ if (addr != -1)
{
- systype[n] = '\0';
- if (isdigit (systype[0]))
+ ioswizzle_t io_swiz;
+
+ if (addr == 0)
+ {
+ /* Only Jensen doesn't have dense mem space. */
+ io.sparse_bus_memory_base
+ = io_system[IOSYS_JENSEN].sparse_bus_mem_base;
+ io.io_base = io_system[IOSYS_JENSEN].bus_io_base;
+ io_swiz = IOSWIZZLE_JENSEN;
+ }
+ else
{
- if (sscanf (systype, "%li,%i,%li,%li", &io.io_base, &io.hae_shift,
- &io.bus_memory_base, &io.sparse_bus_memory_base) == 4)
+ io.bus_memory_base = addr;
+
+ addr = __pciconfig_iobase (IOBASE_DENSE_IO, 0, 0);
+ if (addr != 0)
+ {
+ /* The X server uses _bus_base_sparse == 0 to know that
+ BWX access are supported to dense mem space. This is
+ true of every system that supports dense io space, so
+ never fill in io.sparse_bus_memory_base in this case. */
+ io_swiz = IOSWIZZLE_DENSE;
+ io.io_base = addr;
+ }
+ else
{
- io.sys = IOSYS_UNKNOWN;
- io.swiz = IOSWIZZLE_SPARSE;
- io.swp = &ioswtch[IOSWIZZLE_SPARSE];
- return 0;
+ io.sparse_bus_memory_base
+ = __pciconfig_iobase (IOBASE_SPARSE_MEM, 0, 0);
+ io.io_base = __pciconfig_iobase (IOBASE_SPARSE_IO, 0, 0);
+ io_swiz = IOSWIZZLE_SPARSE;
}
- /* else we're likely going to fail with the system match below */
}
+
+ io.swiz = io_swiz;
+ io.swp = &ioswtch[io_swiz];
+
+ return 0;
}
- else
- {
- n = process_cpuinfo();
- if (!n)
- {
- /* this can happen if the format of /proc/cpuinfo changes... */
- fprintf (stderr,
- "ioperm.init_iosys(): Unable to determine system type.\n"
- "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
- __set_errno (ENODEV);
- return -1;
- }
+ /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */
+
+ if (process_cpuinfo(&data) == 0)
+ {
+ /* This can happen if the format of /proc/cpuinfo changes. */
+ fprintf (stderr,
+ "ioperm.init_iosys: Unable to determine system type.\n"
+ "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
+ __set_errno (ENODEV);
+ return -1;
}
- /* translate systype name into i/o system: */
+ /* Translate systype name into i/o system. */
for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i)
{
- if (strcmp (platform[i].name, systype) == 0)
+ if (strcmp (platform[i].name, data.systype) == 0)
{
- io.sys = platform[i].io_sys;
- /* some platforms can have either EV4 or EV5 CPUs */
- if (io.sys == IOSYS_CPUDEP) /* SABLE or MIKASA or NORITAKE so far */
+ iosys_t io_sys = platform[i].io_sys;
+
+ /* Some platforms can have either EV4 or EV5 CPUs. */
+ if (io_sys == IOSYS_CPUDEP)
{
+ /* SABLE or MIKASA or NORITAKE so far. */
if (strcmp (platform[i].name, "Sable") == 0)
{
- if (strncmp (cpumodel, "EV4", 3) == 0)
- io.sys = IOSYS_T2;
- else if (strncmp (cpumodel, "EV5", 3) == 0)
- io.sys = IOSYS_GAMMA;
+ if (strncmp (data.cpumodel, "EV4", 3) == 0)
+ io_sys = IOSYS_T2;
+ else if (strncmp (data.cpumodel, "EV5", 3) == 0)
+ io_sys = IOSYS_GAMMA;
}
else
- { /* this covers MIKASA/NORITAKE */
- if (strncmp (cpumodel, "EV4", 3) == 0)
- io.sys = IOSYS_APECS;
- else if (strncmp (cpumodel, "EV5", 3) == 0)
- io.sys = IOSYS_CIA;
+ {
+ /* This covers MIKASA/NORITAKE. */
+ if (strncmp (data.cpumodel, "EV4", 3) == 0)
+ io_sys = IOSYS_APECS;
+ else if (strncmp (data.cpumodel, "EV5", 3) == 0)
+ io_sys = IOSYS_CIA;
}
- if (io.sys == IOSYS_CPUDEP)
+ if (io_sys == IOSYS_CPUDEP)
{
/* This can happen if the format of /proc/cpuinfo changes.*/
- fprintf (stderr, "ioperm.init_iosys(): Unable to determine"
+ fprintf (stderr, "ioperm.init_iosys: Unable to determine"
" CPU model.\n");
__set_errno (ENODEV);
return -1;
}
}
- /* some platforms can have different core logic chipsets */
- if (io.sys == IOSYS_PCIDEP) /* EB164 so far */
+ /* Some platforms can have different core logic chipsets */
+ if (io_sys == IOSYS_PCIDEP)
{
- if (strcmp (systype, "EB164") == 0)
+ /* EB164 so far */
+ if (strcmp (data.systype, "EB164") == 0)
{
- if (strncmp (sysvari, "RX164", 5) == 0)
- io.sys = IOSYS_POLARIS;
+ if (strncmp (data.sysvari, "RX164", 5) == 0)
+ io_sys = IOSYS_POLARIS;
+ else if (strncmp (data.sysvari, "LX164", 5) == 0
+ || strncmp (data.sysvari, "SX164", 5) == 0)
+ io_sys = IOSYS_PYXIS;
else
- io.sys = IOSYS_CIA;
+ io_sys = IOSYS_CIA;
}
- if (io.sys == IOSYS_PCIDEP)
+ if (io_sys == IOSYS_PCIDEP)
{
/* This can happen if the format of /proc/cpuinfo changes.*/
- fprintf (stderr, "ioperm.init_iosys(): Unable to determine"
+ fprintf (stderr, "ioperm.init_iosys: Unable to determine"
" core logic chipset.\n");
__set_errno (ENODEV);
return -1;
}
}
- io.hae_shift = io_system[io.sys].hae_shift;
- io.bus_memory_base = io_system[io.sys].bus_memory_base;
- io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base;
- io.io_base = io_system[io.sys].bus_io_base;
+ io.bus_memory_base = io_system[io_sys].bus_memory_base;
+ io.sparse_bus_memory_base = io_system[io_sys].sparse_bus_mem_base;
+ io.io_base = io_system[io_sys].bus_io_base;
- if (io.sys == IOSYS_JENSEN)
+ if (io_sys == IOSYS_JENSEN)
io.swiz = IOSWIZZLE_JENSEN;
- else if (io.sys == IOSYS_TSUNAMI || io.sys == IOSYS_POLARIS)
+ else if (io_sys == IOSYS_TSUNAMI
+ || io_sys == IOSYS_POLARIS
+ || io_sys == IOSYS_PYXIS)
io.swiz = IOSWIZZLE_DENSE;
else
io.swiz = IOSWIZZLE_SPARSE;
io.swp = &ioswtch[io.swiz];
+
+ __set_errno (olderrno);
return 0;
}
}
- /* systype is not a know platform name... */
- __set_errno (EINVAL);
-#ifdef DEBUG_IOPERM
- fprintf(stderr, "init_iosys: platform not recognized\n");
-#endif
+ __set_errno (ENODEV);
+ fprintf(stderr, "ioperm.init_iosys: Platform not recognized.\n"
+ "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
return -1;
}
@@ -611,17 +678,18 @@ init_iosys (void)
int
_ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
- unsigned long int addr, len;
- int prot, err;
+ unsigned long int addr, len, pagesize = __getpagesize();
+ int prot;
- if (!io.swp && init_iosys() < 0) {
+ if (!io.swp && init_iosys() < 0)
+ {
#ifdef DEBUG_IOPERM
- fprintf(stderr, "ioperm: init_iosys() failed\n");
+ fprintf(stderr, "ioperm: init_iosys() failed (%m)\n");
#endif
- return -1;
- }
+ return -1;
+ }
- /* this test isn't as silly as it may look like; consider overflows! */
+ /* This test isn't as silly as it may look like; consider overflows! */
if (from >= MAX_PORT || from + num > MAX_PORT)
{
__set_errno (EINVAL);
@@ -632,7 +700,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
}
#ifdef DEBUG_IOPERM
- fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base);
+ fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base);
#endif
if (turn_on)
@@ -641,25 +709,28 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
int fd;
- io.hae.reg = 0; /* not used in user-level */
- io.hae.cache = 0;
+ io.hae_cache = 0;
if (io.swiz != IOSWIZZLE_DENSE)
- __sethae (io.hae.cache); /* synchronize with hw */
+ {
+ /* Synchronize with hw. */
+ __sethae (0);
+ }
- fd = open ("/dev/mem", O_RDWR);
- if (fd < 0) {
+ fd = __open ("/dev/mem", O_RDWR);
+ if (fd < 0)
+ {
#ifdef DEBUG_IOPERM
- fprintf(stderr, "ioperm: /dev/mem open failed\n");
+ fprintf(stderr, "ioperm: /dev/mem open failed (%m)\n");
#endif
- return -1;
- }
+ return -1;
+ }
addr = port_to_cpu_addr (0, io.swiz, 1);
len = port_to_cpu_addr (MAX_PORT, io.swiz, 1) - addr;
io.base =
(unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
fd, io.io_base);
- close (fd);
+ __close (fd);
#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n",
len, io.base);
@@ -678,29 +749,27 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
prot = PROT_NONE;
}
addr = port_to_cpu_addr (from, io.swiz, 1);
- addr &= PAGE_MASK;
+ addr &= ~(pagesize - 1);
len = port_to_cpu_addr (from + num, io.swiz, 1) - addr;
- err = mprotect ((void *) addr, len, prot);
-#ifdef DEBUG_IOPERM
- fprintf(stderr, "ioperm: mprotect returned %d\n", err);
-#endif
- return err;
+ return __mprotect ((void *) addr, len, prot);
}
int
-_iopl (unsigned int level)
-{
- if (level > 3)
- {
- __set_errno (EINVAL);
- return -1;
- }
- if (level)
- {
- return _ioperm (0, MAX_PORT, 1);
- }
- return 0;
+_iopl (int level)
+{
+ switch (level)
+ {
+ case 0:
+ return 0;
+
+ case 1: case 2: case 3:
+ return _ioperm (0, MAX_PORT, 1);
+
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
}
@@ -786,7 +855,11 @@ _hae_shift(void)
{
if (!io.swp && init_iosys () < 0)
return -1;
- return io.hae_shift;
+ if (io.swiz == IOSWIZZLE_JENSEN)
+ return 7;
+ if (io.swiz == IOSWIZZLE_SPARSE)
+ return 5;
+ return 0;
}
weak_alias (_sethae, sethae);
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index d1f5ac3..d98430b 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -51,6 +51,24 @@ extern unsigned long bus_base_sparse (void) __THROW __attribute__ ((const));
extern int _hae_shift (void) __THROW __attribute__ ((const));
extern int hae_shift (void) __THROW __attribute__ ((const));
+/* Previous three are deprecated in favour of the following, which
+ knows about multiple PCI "hoses". Provide the PCI bus and dfn
+ numbers just as to pciconfig_read/write. */
+
+enum __pciconfig_iobase_which
+{
+ IOBASE_HOSE = 0, /* Return hose index. */
+ IOBASE_SPARSE_MEM = 1, /* Return physical memory addresses. */
+ IOBASE_DENSE_MEM = 2,
+ IOBASE_SPARSE_IO = 3,
+ IOBASE_DENSE_IO = 4
+};
+
+extern long pciconfig_iobase(enum __pciconfig_iobase_which __which,
+ unsigned long int __bus,
+ unsigned long int __dfn)
+ __THROW __attribute__ ((const));
+
/* Access PCI space protected from machine checks. */
extern int pciconfig_read (unsigned long int __bus,
unsigned long int __dfn,
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 241ed02..617b6f5 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -1,8 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
-# used to implement inb()/outb() etc.
-sethae - sethae 1 __sethae
-
oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0
msgget - msgget 2 __msgget msgget
msgrcv - msgrcv 5 __msgrcv msgrcv
@@ -63,6 +60,7 @@ getresgid - getresgid 3 getresgid
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
+pciconfig_iobase EXTRA pciconfig_iobase 3 __pciconfig_iobase pciconfig_iobase
# Wrapper for adjtimex.
adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=59e14c2112c9b7a6bbdab7042d23223fa30e2ec1
commit 59e14c2112c9b7a6bbdab7042d23223fa30e2ec1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 16 07:07:13 2000 +0000
Make __pwrite64 weak alias.
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 2086f76..295a175 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -63,7 +63,7 @@ __libc_pwrite64 (fd, buf, count, offset)
return result;
}
-strong_alias (__libc_pwrite64, __pwrite64)
+weak_alias (__libc_pwrite64, __pwrite64)
weak_alias (__libc_pwrite64, pwrite64)
# define __libc_pwrite64(fd, buf, count, offset) \
@@ -73,4 +73,3 @@ weak_alias (__libc_pwrite64, pwrite64)
#if __ASSUME_PWRITE_SYSCALL == 0
# include <sysdeps/posix/pwrite64.c>
#endif
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9399c12de52b29c259a15f59c2621c48efbe8ecd
commit 9399c12de52b29c259a15f59c2621c48efbe8ecd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 16 07:06:45 2000 +0000
Make __pread64 weak alias.
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index 85fe77c..d17dbeb 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -63,7 +63,7 @@ __libc_pread64 (fd, buf, count, offset)
return result;
}
-strong_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, __pread64)
weak_alias (__libc_pread64, pread64)
# define __libc_pread64(fd, buf, count, offset) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=052065ad7b493a0401582a698e4d0c8a6951b7e3
commit 052065ad7b493a0401582a698e4d0c8a6951b7e3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 15 07:22:08 2000 +0000
(platform): Add entry for Nautilus.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 7b38fcc..65bab81 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996-1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger.
@@ -139,6 +139,7 @@ static struct platform {
{"Sable", IOSYS_CPUDEP},
{"Miata", IOSYS_CIA},
{"Tsunami", IOSYS_TSUNAMI},
+ {"Nautilus", IOSYS_TSUNAMI},
{"Rawhide", IOSYS_MCPCIA},
{"Ruffian", IOSYS_CIA},
{"Takara", IOSYS_CIA},
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e6c2875e8dafd33badd62eb93d40e57705f636f
commit 2e6c2875e8dafd33badd62eb93d40e57705f636f
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Mar 10 08:40:34 2000 +0000
2000-03-09 Martin Buchholz <martin@xemacs.org>
* sysdeps/unix/sysv/linux/alpha/syscall.S:
* manual/message.texi (Using gettextized software):
* manual/message.texi (Message Translation): Doc Fixes.
* manual/filesys.texi (File Size):
* manual/charset.texi (glibc iconv Implementation):
* locale/programs/ld-collate.c (collate_output):
* iconv/gconv_db.c (find_derivation):
* manual/install.texi:
* manual/search.texi (Hash Search Function):
* manual/stdio.texi (Output Conversion Syntax):
* FAQ.in:
* config.h.in:
* sysdeps/generic/dl-sysdep.c:
Doc Fixes. `allows to' is not correct English.
* elf/rtld.c: Doc fixes.
* manual/creature.texi (Feature Test Macros): Doc fixes.
* manual/memory.texi (Hooks for Malloc): Doc Fixes.
* manual/filesys.texi (Working Directory): Check for ERANGE to
avoid infloop.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index d25dd6b..7f8a33f 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -21,10 +21,10 @@
/*
* This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system
- * calls return an error indication in a3. This allows to return
- * arbitrary 64bit values in v0 (because negative values are not
- * mistaken as error numbers). However, C allows to return only one
- * value so the interface below folds the error indication passed in
+ * calls return an error indication in a3. This allows arbitrary 64bit
+ * values to be returned in v0 (because negative values are not
+ * mistaken as error numbers). However, C allows only one value to
+ * be returned, so the interface below folds the error indication passed in
* a3 back into v0: it sets v0 to -errno if an error occurs. Thus,
* no negative 64bit numbers can be returned. To avoid this problem,
* use assembly stubs wherever possible/convenient.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a76429b6563f4eb73c4a43865b4879719244717
commit 1a76429b6563f4eb73c4a43865b4879719244717
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 28 21:15:52 2000 +0000
Define _STATFS_F_NAMELEN.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
index 36d9996..1099ae1 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -67,3 +67,6 @@ struct statfs64
long int f_spare[6];
};
#endif
+
+/* Tell code we have these members. */
+#define _STATFS_F_NAMELEN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6e840f034d9a74d4dff3af5e567405248557257
commit e6e840f034d9a74d4dff3af5e567405248557257
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 28 20:50:34 2000 +0000
Define DL_CALL_FCT here.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 2939d9e..0da3a67 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,3 +35,21 @@
The implementation does this by default and so we can define the
value to zero. */
#define RTLD_LOCAL 0
+
+#ifdef __USE_GNU
+/* To support profiling of shared objects it is a good idea to call
+ the function found using `dlsym' using the following macro since
+ these calls do not use the PLT. But this would mean the dynamic
+ loader has no chance to find out when the function is called. The
+ macro applies the necessary magic so that profiling is possible.
+ Rewrite
+ foo = (*fctp) (arg1, arg2);
+ into
+ foo = DL_CALL_FCT (fctp, (arg1, arg2));
+*/
+# define DL_CALL_FCT(fctp, args) \
+ (_dl_mcount_wrapper_check (fctp), (*(fctp)) args)
+
+/* This function calls the profiling functions. */
+extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c11d9bcf5a9cd5bb38650ca7a44edd98db88c5c
commit 2c11d9bcf5a9cd5bb38650ca7a44edd98db88c5c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 28 05:02:28 2000 +0000
Define shmatt_t type and use it in struct shmid_ds definition.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 683a9b6..acd479d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -36,6 +36,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -44,9 +47,9 @@ struct shmid_ds
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
- pid_t shm_cpid; /* pid of creator */
- pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused1;
unsigned long int __unused2;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37b22a8dd3975eb3ab47a93bf5237bf802e7bf55
commit 37b22a8dd3975eb3ab47a93bf5237bf802e7bf55
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 28 04:59:24 2000 +0000
Fix type of second parameter.
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 290573a..5203b42 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@ extern int __sysmp __P ((int, ...));
int
getpriority (which, who)
enum __priority_which which;
- int who;
+ id_t who;
{
switch (which)
{
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index 5d6313a..8e2c8ec 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
int
setpriority (which, who, prio)
enum __priority_which which;
- int who;
+ id_t who;
int prio;
{
switch (which)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b90be065426c33b15807040ff4e31a654fb13659
commit b90be065426c33b15807040ff4e31a654fb13659
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Feb 26 08:13:07 2000 +0000
Apply forgotten patch to change default version to 2.2.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 1cf9e58..a3e60d0 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -67,4 +67,4 @@ __feraiseexcept (int excepts)
}
strong_alias (__feraiseexcept, __old_feraiseexcept)
symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41841677b4a1ce37863bb00ab40327dcdc07ae20
commit 41841677b4a1ce37863bb00ab40327dcdc07ae20
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 26 01:09:38 2000 +0000
Change default version to GLIBC_2.2.
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 2e76995..006f506 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -39,4 +39,4 @@ __feclearexcept (int excepts)
}
strong_alias (__feclearexcept, __old_feclearexcept)
symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index 63dc7ff..51ce1c2 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -41,4 +41,4 @@ __fegetenv (fenv_t *envp)
}
strong_alias (__fegetenv, __old_fegetenv)
symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 9a38778..58bc13a 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -48,4 +48,4 @@ __fesetenv (const fenv_t *envp)
}
strong_alias (__fesetenv, __old_fesetenv)
symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index bd6a979..61226c6 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -41,4 +41,4 @@ __feupdateenv (const fenv_t *envp)
}
strong_alias (__feupdateenv, __old_feupdateenv)
symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index 2811d02..bd47535 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -36,4 +36,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
}
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index eeb987e..eb74def 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -39,4 +39,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
}
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c
index 0bcdfdf..11fb0f8 100644
--- a/sysdeps/arm/fpu/fclrexcpt.c
+++ b/sysdeps/arm/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,4 +42,4 @@ __feclearexcept (int excepts)
}
strong_alias (__feclearexcept, __old_feclearexcept)
symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
index 7fde5f2..53d2089 100644
--- a/sysdeps/arm/fpu/fegetenv.c
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,4 +32,4 @@ __fegetenv (fenv_t *envp)
}
strong_alias (__fegetenv, __old_fegetenv)
symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index 13cda82..fd2040d 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,4 +36,4 @@ __fesetenv (const fenv_t *envp)
}
strong_alias (__fesetenv, __old_fesetenv)
symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
index 77d928a..9163744 100644
--- a/sysdeps/arm/fpu/fraiseexcpt.c
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,4 +35,4 @@ __feraiseexcept (int excepts)
}
strong_alias (__feraiseexcept, __old_feraiseexcept)
symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c
index ef157a2..960ca2b 100644
--- a/sysdeps/arm/fpu/fsetexcptflg.c
+++ b/sysdeps/arm/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,4 +41,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
}
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c
index 5b2c425..a2f144b 100644
--- a/sysdeps/m68k/fpu/fclrexcpt.c
+++ b/sysdeps/m68k/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -42,4 +42,4 @@ __feclearexcept (int excepts)
}
strong_alias (__feclearexcept, __old_feclearexcept)
symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index 8936b38..60226ff 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -30,4 +30,4 @@ __fegetenv (fenv_t *envp)
}
strong_alias (__fegetenv, __old_fegetenv)
symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index 11bffb4..e780fe8 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -51,4 +51,4 @@ __fesetenv (const fenv_t *envp)
}
strong_alias (__fesetenv, __old_fesetenv)
symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c
index 48d42d9..7115f8b 100644
--- a/sysdeps/m68k/fpu/feupdateenv.c
+++ b/sysdeps/m68k/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -42,4 +42,4 @@ __feupdateenv (const fenv_t *envp)
}
strong_alias (__feupdateenv, __old_feupdateenv)
symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c
index 5d3a435..8a56e20 100644
--- a/sysdeps/m68k/fpu/fgetexcptflg.c
+++ b/sysdeps/m68k/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -35,4 +35,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
}
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index c283d4b..dcdd6c9 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -73,4 +73,4 @@ __feraiseexcept (int excepts)
}
strong_alias (__feraiseexcept, __old_feraiseexcept)
symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
-default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2);
diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c
index 890042a..04ecf66 100644
--- a/sysdeps/m68k/fpu/fsetexcptflg.c
+++ b/sysdeps/m68k/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -41,4 +41,4 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
}
strong_alias (__fesetexceptflag, __old_fesetexceptflag)
symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
-default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2);
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
index 990dfe6..93915d6 100644
--- a/sysdeps/mips/fpu/fclrexcpt.c
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -43,4 +43,4 @@ __feclearexcept (int excepts)
}
strong_alias (__feclearexcept, __old_feclearexcept)
symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2);
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
index 72b7ee5..de263ca 100644
--- a/sysdeps/mips/fpu/fegetenv.c
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -31,4 +31,4 @@ __fegetenv (fenv_t *envp)
}
strong_alias (__fegetenv, __old_fegetenv)
symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2);
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
index 43a571e..37e9027 100644
--- a/sysdeps/mips/fpu/fesetenv.c
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -34,4 +34,4 @@ __fesetenv (const fenv_t *envp)
}
strong_alias (__fesetenv, __old_fesetenv)
symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2);
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
index f0748ce..8c24881 100644
--- a/sysdeps/mips/fpu/feupdateenv.c
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -43,4 +43,4 @@ __feupdateenv (const fenv_t *envp)
}
strong_alias (__feupdateenv, __old_feupdateenv)
symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2);
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
index 8c586b5..64a2e11 100644
--- a/sysdeps/mips/fpu/fgetexcptflg.c
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -36,4 +36,4 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
}
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a25e078c309f626d8c3c2b30d1d7eb61b6dc7ac
commit 9a25e078c309f626d8c3c2b30d1d7eb61b6dc7ac
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 26 00:58:51 2000 +0000
(__feraiseexcept): Correct declaration to return value.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index bcbc06b..1cf9e58 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -21,7 +21,7 @@
#include <fenv.h>
#include <math.h>
-void
+int
__feraiseexcept (int excepts)
{
double tmp;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e516adf181b500bcd96a42a3b4401c470bc135e
commit 5e516adf181b500bcd96a42a3b4401c470bc135e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 25 17:05:23 2000 +0000
(struct msqid_ds): Use __pid_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
index 3ca076e..9271ce6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
@@ -44,8 +44,8 @@ struct msqid_ds
unsigned long int __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
- pid_t msg_lspid; /* pid of last msgsnd() */
- pid_t msg_lrpid; /* pid of last msgrcv() */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
unsigned long int __unused1;
unsigned long int __unused2;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf95db7e002abc7d27c9ce7e0e5221af53fdd39f
commit cf95db7e002abc7d27c9ce7e0e5221af53fdd39f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 25 08:56:31 2000 +0000
(IPC_INFO): Only define if __USE_GNU.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 7ad2c7c..004a683 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -31,7 +31,9 @@
#define IPC_RMID 0 /* Remove identifier. */
#define IPC_SET 1 /* Set `ipc_perm' options. */
#define IPC_STAT 2 /* Get `ipc_perm' options. */
-#define IPC_INFO 3 /* See ipcs. */
+#ifdef __USE_GNU
+# define IPC_INFO 3 /* See ipcs. */
+#endif
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 3c2e527..8364dca 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -31,7 +31,9 @@
#define IPC_RMID 0 /* Remove identifier. */
#define IPC_SET 1 /* Set `ipc_perm' options. */
#define IPC_STAT 2 /* Get `ipc_perm' options. */
-#define IPC_INFO 3 /* See ipcs. */
+#ifdef __USE_GNU
+# define IPC_INFO 3 /* See ipcs. */
+#endif
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
@@ -58,15 +60,17 @@ extern int __ipc (int __call, int __first, int __second, int __third,
__END_DECLS
+#ifdef __USE_GNU
/* The codes for the functions to use the multiplexer `__ipc'. */
-#define IPCOP_semop 1
-#define IPCOP_semget 2
-#define IPCOP_semctl 3
-#define IPCOP_msgsnd 11
-#define IPCOP_msgrcv 12
-#define IPCOP_msgget 13
-#define IPCOP_msgctl 14
-#define IPCOP_shmat 21
-#define IPCOP_shmdt 22
-#define IPCOP_shmget 23
-#define IPCOP_shmctl 24
+# define IPCOP_semop 1
+# define IPCOP_semget 2
+# define IPCOP_semctl 3
+# define IPCOP_msgsnd 11
+# define IPCOP_msgrcv 12
+# define IPCOP_msgget 13
+# define IPCOP_msgctl 14
+# define IPCOP_shmat 21
+# define IPCOP_shmdt 22
+# define IPCOP_shmget 23
+# define IPCOP_shmctl 24
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40d43549381087377ce2e19d9b162272bc07abdd
commit 40d43549381087377ce2e19d9b162272bc07abdd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 25 08:54:48 2000 +0000
Include bits/types.h, not sys/types.h.
(MSG_EXCEPT): Only define if __USE_GNU.
Define msgqnum_t and msglen_t and use them in struct msqid_ds definition.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
index 3e784d9..3ca076e 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
@@ -20,11 +20,17 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
-#define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+#ifdef __USE_GNU
+# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+#endif
+
+/* Types used in the structure definition. */
+typedef unsigned long int msgqnum_t;
+typedef unsigned long int msglen_t;
/* Structure of record for one message inside the kernel.
@@ -36,8 +42,8 @@ struct msqid_ds
__time_t msg_rtime; /* time of last msgrcv command */
__time_t msg_ctime; /* time of last change */
unsigned long int __msg_cbytes; /* current number of bytes on queue */
- unsigned long int msg_qnum; /* number of messages currently on queue */
- unsigned long int msg_qbytes; /* max number of bytes allowed on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
pid_t msg_lspid; /* pid of last msgsnd() */
pid_t msg_lrpid; /* pid of last msgrcv() */
unsigned long int __unused1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d70eeb43cfc91c89b179f5a4a27a16a46cded1f
commit 6d70eeb43cfc91c89b179f5a4a27a16a46cded1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 24 07:57:37 2000 +0000
Allow including from stdlib.h.
diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
index e99dc00..841f8a3 100644
--- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h
+++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_WAIT_H
+#if !defined _SYS_WAIT_H && !defined _STDLIB_H
# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=028bec36ffa0222c3dec94cb393a427fc049bb98
commit 028bec36ffa0222c3dec94cb393a427fc049bb98
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 23 05:59:55 2000 +0000
Linux/Alpha specific siginfo definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
new file mode 100644
index 0000000..9426c13
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
@@ -0,0 +1,293 @@
+/* siginfo_t, sigevent and constants. Linux/SPARC version.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+#if (!defined __have_siginfo_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t 1
+
+/* Type for data associated with a signal. */
+typedef union sigval
+ {
+ int sival_int;
+ void *sival_ptr;
+ } sigval_t;
+
+# define __SI_MAX_SIZE 128
+# if __WORDSIZE == 64
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_errno; /* If non-zero, an errno value associated with
+ this signal, as defined in <errno.h>. */
+ int si_code; /* Signal code. */
+
+ union
+ {
+ int _pad[__SI_PAD_SIZE];
+
+ /* kill(). */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ } _kill;
+
+ /* POSIX.1b timers. */
+ struct
+ {
+ unsigned int _timer1;
+ unsigned int _timer2;
+ } _timer;
+
+ /* POSIX.1b signals. */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ sigval_t si_sigval; /* Signal value. */
+ } _rt;
+
+ /* SIGCHLD. */
+ struct
+ {
+ __pid_t si_pid; /* Which child. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ int si_status; /* Exit value or signal. */
+ __clock_t si_utime;
+ __clock_t si_stime;
+ } _sigchld;
+
+ /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
+ struct
+ {
+ void *si_addr; /* Faulting insn/memory ref. */
+ } _sigfault;
+
+ /* SIGPOLL. */
+ struct
+ {
+ int si_band; /* Band event for SIGPOLL. */
+ int si_fd;
+ } _sigpoll;
+ } _sifields;
+ } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names. */
+# define si_pid _sifields._kill.si_pid
+# define si_uid _sifields._kill.si_uid
+# define si_timer1 _sifields._timer._timer1
+# define si_timer2 _sifields._timer._timer2
+# define si_status _sifields._sigchld.si_status
+# define si_utime _sifields._sigchld.si_utime
+# define si_stime _sifields._sigchld.si_stime
+# define si_value _sifields._rt.si_sigval
+# define si_int _sifields._rt.si_sigval.sival_int
+# define si_ptr _sifields._rt.si_sigval.sival_ptr
+# define si_addr _sifields._sigfault.si_addr
+# define si_band _sifields._sigpoll.si_band
+# define si_fd _sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'. Positive values are reserved for kernel-generated
+ signals. */
+enum
+{
+ SI_SIGIO = -5, /* Sent by queued SIGIO. */
+# define SI_SIGIO SI_SIGIO
+ SI_ASYNCIO, /* Sent by AIO completion. */
+# define SI_ASYNCIO SI_ASYNCIO
+ SI_MESGQ, /* Sent by real time mesq state change. */
+# define SI_MESGQ SI_MESGQ
+ SI_TIMER, /* Sent by timer expiration. */
+# define SI_TIMER SI_TIMER
+ SI_QUEUE, /* Sent by sigqueue. */
+# define SI_QUEUE SI_QUEUE
+ SI_USER, /* Sent by kill, sigsend, raise. */
+# define SI_USER SI_USER
+ SI_KERNEL = 0x80 /* Send by kernel. */
+#define SI_KERNEL SI_KERNEL
+};
+
+
+/* `si_code' values for SIGILL signal. */
+enum
+{
+ ILL_ILLOPC = 1, /* Illegal opcode. */
+# define ILL_ILLOPC ILL_ILLOPC
+ ILL_ILLOPN, /* Illegal operand. */
+# define ILL_ILLOPN ILL_ILLOPN
+ ILL_ILLADR, /* Illegal addressing mode. */
+# define ILL_ILLADR ILL_ILLADR
+ ILL_ILLTRP, /* Illegal trap. */
+# define ILL_ILLTRP ILL_ILLTRP
+ ILL_PRVOPC, /* Privileged opcode. */
+# define ILL_PRVOPC ILL_PRVOPC
+ ILL_PRVREG, /* Privileged register. */
+# define ILL_PRVREG ILL_PRVREG
+ ILL_COPROC, /* Coprocessor error. */
+# define ILL_COPROC ILL_COPROC
+ ILL_BADSTK /* Internal stack error. */
+# define ILL_BADSTK ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal. */
+enum
+{
+ FPE_INTDIV = 1, /* Integer divide by zero. */
+# define FPE_INTDIV FPE_INTDIV
+ FPE_INTOVF, /* Integer overflow. */
+# define FPE_INTOVF FPE_INTOVF
+ FPE_FLTDIV, /* Floating point divide by zero. */
+# define FPE_FLTDIV FPE_FLTDIV
+ FPE_FLTOVF, /* Floating point overflow. */
+# define FPE_FLTOVF FPE_FLTOVF
+ FPE_FLTUND, /* Floating point underflow. */
+# define FPE_FLTUND FPE_FLTUND
+ FPE_FLTRES, /* Floating point inexact result. */
+# define FPE_FLTRES FPE_FLTRES
+ FPE_FLTINV, /* Floating point invalid operation. */
+# define FPE_FLTINV FPE_FLTINV
+ FPE_FLTSUB /* Subscript out of range. */
+# define FPE_FLTSUB FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal. */
+enum
+{
+ SEGV_MAPERR = 1, /* Address not mapped to object. */
+# define SEGV_MAPERR SEGV_MAPERR
+ SEGV_ACCERR /* Invalid permissions for mapped object. */
+# define SEGV_ACCERR SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal. */
+enum
+{
+ BUS_ADRALN = 1, /* Invalid address alignment. */
+# define BUS_ADRALN BUS_ADRALN
+ BUS_ADRERR, /* Non-existant physical address. */
+# define BUS_ADRERR BUS_ADRERR
+ BUS_OBJERR /* Object specific hardware error. */
+# define BUS_OBJERR BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal. */
+enum
+{
+ TRAP_BRKPT = 1, /* Process breakpoint. */
+# define TRAP_BRKPT TRAP_BRKPT
+ TRAP_TRACE /* Process trace trap. */
+# define TRAP_TRACE TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal. */
+enum
+{
+ CLD_EXITED = 1, /* Child has exited. */
+# define CLD_EXITED CLD_EXITED
+ CLD_KILLED, /* Child was killed. */
+# define CLD_KILLED CLD_KILLED
+ CLD_DUMPED, /* Child terminated abnormally. */
+# define CLD_DUMPED CLD_DUMPED
+ CLD_TRAPPED, /* Traced child has trapped. */
+# define CLD_TRAPPED CLD_TRAPPED
+ CLD_STOPPED, /* Child has stopped. */
+# define CLD_STOPPED CLD_STOPPED
+ CLD_CONTINUED /* Stopped child has continued. */
+# define CLD_CONTINUED CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal. */
+enum
+{
+ POLL_IN = 1, /* Data input available. */
+# define POLL_IN POLL_IN
+ POLL_OUT, /* Output buffers available. */
+# define POLL_OUT POLL_OUT
+ POLL_MSG, /* Input message available. */
+# define POLL_MSG POLL_MSG
+ POLL_ERR, /* I/O error. */
+# define POLL_ERR POLL_ERR
+ POLL_PRI, /* High priority input available. */
+# define POLL_PRI POLL_PRI
+ POLL_HUP /* Device disconnected. */
+# define POLL_HUP POLL_HUP
+};
+
+# undef __need_siginfo_t
+#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
+
+
+#if defined _SIGNAL_H && !defined __have_sigevent_t
+# define __have_sigevent_t 1
+
+/* Structure to transport application-defined values with signals. */
+# define __SIGEV_MAX_SIZE 64
+# if __WORDSIZE == 64
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
+
+typedef struct sigevent
+ {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+
+ union
+ {
+ int _pad[__SIGEV_PAD_SIZE];
+
+ struct
+ {
+ void (*_function) (sigval_t); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
+ } _sigev_thread;
+ } _sigev_un;
+ } sigevent_t;
+
+/* POSIX names to access some of the members. */
+# define sigev_notify_function _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values. */
+enum
+{
+ SIGEV_SIGNAL = 0, /* Notify via signal. */
+# define SIGEV_SIGNAL SIGEV_SIGNAL
+ SIGEV_NONE, /* Other notification: meaningless. */
+# define SIGEV_NONE SIGEV_NONE
+ SIGEV_THREAD /* Deliver via thread creation. */
+# define SIGEV_THREAD SIGEV_THREAD
+};
+
+#endif /* have _SIGNAL_H. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=158331933d2d227af88da2f3fd16542391eb488f
commit 158331933d2d227af88da2f3fd16542391eb488f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 23 05:59:11 2000 +0000
Define SA_NOCLDWAIT.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index be04235..605c4f3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/Alpha sigaction.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,6 +49,7 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x00000020 /* Don't create zombie on child death. */
#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 04179d2..0225078 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -58,6 +58,7 @@ struct sigaction
/* Please note that some Linux kernels versions use different values for these
flags which is a bug in those kernel versions. */
#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x00010000 /* Don't create zombie on child death. */
#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ffceb847f1ccd716448658dd079a2f49f69df79
commit 2ffceb847f1ccd716448658dd079a2f49f69df79
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 22 05:32:19 2000 +0000
Update comment.
diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
index dfca373..a2cf936 100644
--- a/sysdeps/alpha/fpu/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Alpha-maped-to-Intel version.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe.
@@ -94,7 +94,7 @@
#define _FPU_DEFAULT 0x137f
-/* IEEE: same as above, but exceptions */
+/* IEEE: same as above. */
#define _FPU_IEEE 0x137f
/* Type of the control word. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=574b0730357c3a20d73582de8112cab0b3f3e151
commit 574b0730357c3a20d73582de8112cab0b3f3e151
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 20 17:58:12 2000 +0000
Fix off by one error.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 904c564..57b1d8a 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -39,7 +39,7 @@ ENTRY (__mmap64)
swi SYS_ify (mmap2)
cmn r0, $4096
LOADREGS(ccfd, sp!, {r4, r5, pc})
- cmn r0, $(ENOSYS - 1)
+ cmn r0, $ENOSYS
ldmnefd sp!, {r4, r5, lr}
bne PLTJMP(syscall_error)
/* The current kernel does not support mmap2. Fall back to plain
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58d7604e5df2cbd76ca41918d8f568c839a4f33d
commit 58d7604e5df2cbd76ca41918d8f568c839a4f33d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 14 18:11:04 2000 +0000
opl, _ioperm): Add Rebel-NetWinder to platform table so _ioperm platform
lookup via /proc/cpuinfo works on later version NetWinders.
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index f4c9322..3c51540 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -71,6 +71,7 @@ static struct platform {
{"Chalice-CATS", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
{"DEC-EBSA285", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
{"Corel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
+ {"Rebel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
};
#define IO_ADDR(port) (io.base + ((port) << io.shift))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bab23124f035734d66ca1841dba8df2f7cd17348
commit bab23124f035734d66ca1841dba8df2f7cd17348
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Feb 12 11:27:47 2000 +0000
2000-02-12 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__start): Rewritten for 2.2 startup
conventions.
(elf_machine_rel): Use R_MIPS_REL32 for RESOLVE.
(elf_machine_runtime_setup,elf_machine_got_rel): Move at end of
file and make dependend on RESOLVE.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix arguments to _dl_lookup_symbol.
(RESOLVE_GOTSYM): Fix arguments to _dl_lookup_symbol.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index f7a1a6d..d0b20ae 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -59,8 +59,13 @@
/*
* MIPS libraries are usually linked to a non-zero base address. We
- * subtrace the base address from the address where we map the object
+ * subtract the base address from the address where we map the object
* to. This results in more efficient address space usage.
+ *
+ * FIXME: By the time when MAP_BASE_ADDR is called we don't have the
+ * DYNAMIC section read. Until this is fixed make the assumption that
+ * libraries have their base address at 0x5ffe0000. This needs to be
+ * fixed before we can safely get rid of this MIPSism.
*/
#if 0
#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
@@ -126,125 +131,8 @@ elf_machine_load_address (void)
return addr;
}
-/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
-
-/* Relocate GOT. */
-static inline void
-elf_machine_got_rel (struct link_map *map, int lazy)
-{
- ElfW(Addr) *got;
- ElfW(Sym) *sym;
- int i, n;
- const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
-
-#define RESOLVE_GOTSYM(sym) \
- ({ \
- const ElfW(Sym) *ref = sym; \
- ElfW(Addr) sym_loadaddr; \
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
- map->l_scope, \
- map->l_name, R_MIPS_REL32);\
- (ref)? sym_loadaddr + ref->st_value: 0; \
- })
-
- got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
-
- /* got[0] is reserved. got[1] is also reserved for the dynamic object
- generated by gnu ld. Skip these reserved entries from relocation. */
- i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
- n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
- /* Add the run-time display to all local got entries. */
- while (i < n)
- got[i++] += map->l_addr;
- /* Handle global got entries. */
- got += n;
- sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
- sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
- i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
-
- while (i--)
- {
- if (sym->st_shndx == SHN_UNDEF)
- {
- if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
- {
- if (sym->st_value && lazy)
- *got = sym->st_value + map->l_addr;
- else
- *got = RESOLVE_GOTSYM (sym);
- }
- else /* if (*got == 0 || *got == QS) */
- *got = RESOLVE_GOTSYM (sym);
- }
- else if (sym->st_shndx == SHN_COMMON)
- *got = RESOLVE_GOTSYM (sym);
- else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
- && *got != sym->st_value
- && lazy)
- *got += map->l_addr;
- else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
- {
- if (sym->st_other == 0)
- *got += map->l_addr;
- }
- else
- *got = RESOLVE_GOTSYM (sym);
-
- got++;
- sym++;
- }
-
-#undef RESOLVE_GOTSYM
-
- return;
-}
-
-/* Set up the loaded object described by L so its stub function
- will jump to the on-demand fixup code in dl-runtime.c. */
-
-static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
-{
- ElfW(Addr) *got;
- extern void _dl_runtime_resolve (ElfW(Word));
- extern int _dl_mips_gnu_objects;
-
-#ifdef RTLD_BOOTSTRAP
- {
- return lazy;
- }
-#endif
- if (lazy)
- {
- /* The GOT entries for functions have not yet been filled in.
- Their initial contents will arrange when called to put an
- offset into the .dynsym section in t8, the return address
- in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
-
- /* This function will get called to fix up the GOT entry indicated by
- the register t8, and then jump to the resolved address. */
- got[0] = (ElfW(Addr)) &_dl_runtime_resolve;
-
- /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB
- of got[1] of a gnu object is set to identify gnu objects.
- Where we can store l for non gnu objects? XXX */
- if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
- got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
- else
- _dl_mips_gnu_objects = 0;
- }
-
- /* Relocate global offset table. */
- elf_machine_got_rel (l, lazy);
-
- return lazy;
-}
-
-/* Get link_map for this object. */
+/* Get link map for callers object containing STUB_PC. */
static inline struct link_map *
elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
{
@@ -352,9 +240,8 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* Look up the symbol's run-time value. */ \
definer = &symtab[sym_index]; \
\
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
- l->l_scope, l->l_name, \
- R_MIPS_REL32); \
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, l, &definer, \
+ l->l_scope, R_MIPS_REL32); \
\
/* Apply the relocation with that value. */ \
funcaddr = loadbase + definer->st_value; \
@@ -470,19 +357,33 @@ _dl_start_user:\n\
addu $29, $2\n\
# Save back the modified argument count.\n\
sw $4, 0($29)\n\
- # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
-1: la $2, _dl_default_scope\n\
- lw $4, 8($2)\n\
+1: subu $29, 16\n\
+2: # Push the searchlist of the main object as argument in\n\
+ # the _dl_preinit_next and _dl_init_next calls below.\n\
+ lw $4, _dl_main_searchlist\n\
+ # First run the pre-initializers.\n\
+ # Call _dl_preinit_next to return the address of an initializer\n\
+ # function to run.\n\
+ jal _dl_preinit_next
+ move $28, $16\n\
+ # Check for zero return, when out of initializers.\n\
+ beq $2, $0, 4f\n\
+ # Call the pre-initializer.\n\
+ move $25, $2\n\
+ jalr $25\n\
+ move $28, $16\n
+ # Loop to call _dl_preinit_next for the next initializer.\n\
+ b 2b\n
+4: lw $4, _dl_main_searchlist\n\
# Call _dl_init_next to return the address of an initializer\n\
# function to run.\n\
- subu $29, 16\n\
jal _dl_init_next\n\
- addiu $29, 16\n\
move $28, $16\n\
# Check for zero return, when out of initializers.\n\
beq $2, $0, 2f\n\
# Call the shared object initializer function.\n\
move $25, $2\n\
+ # XXX This looks broken ###.\n\
lw $4, 0($29)\n\
lw $5, 4($29)\n\
lw $6, 8($29)\n\
@@ -490,8 +391,9 @@ _dl_start_user:\n\
jalr $25\n\
move $28, $16\n\
# Loop to call _dl_init_next for the next initializer.\n\
- b 1b\n\
-2: # Clear the startup flag. Assumes 32 bit ints.\n\
+ b 4b\n\
+2: addiu $29, 16\n\
+ # Clear the startup flag. Assumes 32 bit ints.\n\
sw $0, _dl_starting_up\n\
# Pass our finalizer function to the user in ra.\n\
la $31, _dl_fini\n\
@@ -552,7 +454,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
built-in definitions used while loading those libraries. */
undo = map->l_addr + sym->st_value;
#endif
- loadbase = RESOLVE (&sym, version, 0);
+ loadbase = RESOLVE (&sym, version, R_MIPS_REL32);
*reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
}
break;
@@ -571,4 +473,119 @@ elf_machine_lazy_rel (struct link_map *map,
/* Do nothing. */
}
+/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
+#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+
+/* Relocate GOT. */
+static inline void
+elf_machine_got_rel (struct link_map *map, int lazy)
+{
+ ElfW(Addr) *got;
+ ElfW(Sym) *sym;
+ int i, n;
+ const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
+
+#define RESOLVE_GOTSYM(sym) \
+ ({ \
+ const ElfW(Sym) *ref = sym; \
+ ElfW(Addr) sym_loadaddr; \
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, map, \
+ &ref, map->l_scope, \
+ R_MIPS_REL32); \
+ (ref)? sym_loadaddr + ref->st_value: 0; \
+ })
+
+ got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
+
+ /* got[0] is reserved. got[1] is also reserved for the dynamic object
+ generated by gnu ld. Skip these reserved entries from relocation. */
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
+ n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
+ /* Add the run-time display to all local got entries. */
+ while (i < n)
+ got[i++] += map->l_addr;
+
+ /* Handle global got entries. */
+ got += n;
+ sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
+ sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
+ - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
+
+ while (i--)
+ {
+ if (sym->st_shndx == SHN_UNDEF)
+ {
+ if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
+ {
+ if (sym->st_value && lazy)
+ *got = sym->st_value + map->l_addr;
+ else
+ *got = RESOLVE_GOTSYM (sym);
+ }
+ else /* if (*got == 0 || *got == QS) */
+ *got = RESOLVE_GOTSYM (sym);
+ }
+ else if (sym->st_shndx == SHN_COMMON)
+ *got = RESOLVE_GOTSYM (sym);
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
+ && *got != sym->st_value
+ && lazy)
+ *got += map->l_addr;
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
+ {
+ if (sym->st_other == 0)
+ *got += map->l_addr;
+ }
+ else
+ *got = RESOLVE_GOTSYM (sym);
+
+ got++;
+ sym++;
+ }
+
+#undef RESOLVE_GOTSYM
+
+ return;
+}
+
+/* Set up the loaded object described by L so its stub function
+ will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+# ifndef RTLD_BOOTSTRAP
+ ElfW(Addr) *got;
+ extern void _dl_runtime_resolve (ElfW(Word));
+ extern int _dl_mips_gnu_objects;
+
+ if (lazy)
+ {
+ /* The GOT entries for functions have not yet been filled in.
+ Their initial contents will arrange when called to put an
+ offset into the .dynsym section in t8, the return address
+ in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
+ got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
+
+ /* This function will get called to fix up the GOT entry indicated by
+ the register t8, and then jump to the resolved address. */
+ got[0] = (ElfW(Addr)) &_dl_runtime_resolve;
+
+ /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB
+ of got[1] of a gnu object is set to identify gnu objects.
+ Where we can store l for non gnu objects? XXX */
+ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ else
+ _dl_mips_gnu_objects = 0;
+ }
+
+ /* Relocate global offset table. */
+ elf_machine_got_rel (l, lazy);
+
+# endif
+ return lazy;
+}
+
#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1b4ab28aebe864cc5f5de04f22950755c413481
commit e1b4ab28aebe864cc5f5de04f22950755c413481
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 21:01:03 2000 +0000
Add oldmsgctl, oldsemctl.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 3265e0f..0f08d13 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -13,6 +13,9 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
osf_getrusage osf_wait4 old_adjtimex
+# Support old ipc control
+sysdep_routines += oldmsgctl oldsemctl oldshmctl
+
CFLAGS-ioperm.c = -Wa,-mev6
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23f140126681dc4ce428f763dc89429e85fea01b
commit 23f140126681dc4ce428f763dc89429e85fea01b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 21:00:47 2000 +0000
(msgctl, semctl, shmctl): Make them EXTRA as __old_* and as GLIBC_2.0 symbols.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 8a86c7c..241ed02 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -3,17 +3,17 @@
# used to implement inb()/outb() etc.
sethae - sethae 1 __sethae
-msgctl - msgctl 3 __msgctl msgctl
+oldmsgctl EXTRA msgctl 3 __old_msgctl msgctl@GLIBC_2.0
msgget - msgget 2 __msgget msgget
msgrcv - msgrcv 5 __msgrcv msgrcv
msgsnd - msgsnd 4 __msgsnd msgsnd
shmat - osf_shmat 3 __shmat shmat
-shmctl - shmctl 3 __shmctl shmctl
+oldshmctl EXTRA shmctl 3 __old_shmctl shmctl@GLIBC_2.0
shmdt - shmdt 1 __shmdt shmdt
shmget - shmget 3 __shmget shmget
semop - semop 3 __semop semop
semget - semget 3 __semget semget
-semctl - semctl 4 __semctl semctl
+oldsemctl EXTRA semctl 4 __old_semctl semctl@GLIBC_2.0
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
sigstack - sigstack 2 sigstack
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8d5da2998f939799aef32f8070b651234e2b955
commit f8d5da2998f939799aef32f8070b651234e2b955
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 21:00:22 2000 +0000
Linux/Alpha specific shmctl implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/shmctl.c b/sysdeps/unix/sysv/linux/alpha/shmctl.c
new file mode 100644
index 0000000..162afee
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/shmctl.c
@@ -0,0 +1,137 @@
+/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/shm.h>
+#include <ipc_priv.h>
+
+#include <sysdep.h>
+#include <string.h>
+#include <sys/syscall.h>
+#include <bits/wordsize.h>
+
+#include "kernel-features.h"
+
+struct __old_shmid_ds
+{
+ struct __old_ipc_perm shm_perm; /* operation permission struct */
+ int shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ __ipc_pid_t shm_cpid; /* pid of creator */
+ __ipc_pid_t shm_lpid; /* pid of last shmop */
+ unsigned short int shm_nattch; /* number of current attaches */
+ unsigned short int __shm_npages; /* size of segment (pages) */
+ unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__attaches; /* descriptors for attaches */
+};
+
+struct __old_shminfo
+{
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+};
+
+/* Provide operations to control over shared memory segments. */
+int __new_shmctl (int, int, struct shmid_ds *);
+
+int
+__new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
+{
+#if __ASSUME_32BITUIDS > 0
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf);
+#else
+ switch (cmd) {
+ case SHM_STAT:
+ case IPC_STAT:
+ case IPC_SET:
+ case IPC_INFO:
+ break;
+ default:
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd, buf);
+ }
+
+ {
+ int save_errno = errno, result;
+ struct __old_shmid_ds old;
+
+ /* Unfortunately there is no way how to find out for sure whether
+ we should use old or new shmctl. */
+ result = INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, buf);
+ if (result != -1 || errno != EINVAL)
+ return result;
+
+ __set_errno(save_errno);
+ if (cmd == IPC_SET)
+ {
+ old.shm_perm.uid = buf->shm_perm.uid;
+ old.shm_perm.gid = buf->shm_perm.gid;
+ old.shm_perm.mode = buf->shm_perm.mode;
+ if (old.shm_perm.uid != buf->shm_perm.uid ||
+ old.shm_perm.gid != buf->shm_perm.gid)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ }
+ result = INLINE_SYSCALL (shmctl, 3, shmid, cmd, &old);
+ if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT))
+ {
+ memset(buf, 0, sizeof(*buf));
+ buf->shm_perm.__key = old.shm_perm.__key;
+ buf->shm_perm.uid = old.shm_perm.uid;
+ buf->shm_perm.gid = old.shm_perm.gid;
+ buf->shm_perm.cuid = old.shm_perm.cuid;
+ buf->shm_perm.cgid = old.shm_perm.cgid;
+ buf->shm_perm.mode = old.shm_perm.mode;
+ buf->shm_perm.__seq = old.shm_perm.__seq;
+ buf->shm_atime = old.shm_atime;
+ buf->shm_dtime = old.shm_dtime;
+ buf->shm_ctime = old.shm_ctime;
+ buf->shm_segsz = old.shm_segsz;
+ buf->shm_nattch = old.shm_nattch;
+ buf->shm_cpid = old.shm_cpid;
+ buf->shm_lpid = old.shm_lpid;
+ }
+ else if (result != -1 && cmd == IPC_INFO)
+ {
+ struct __old_shminfo *oldi = (struct __old_shminfo *)&old;
+ struct shminfo *i = (struct shminfo *)buf;
+
+ memset(i, 0, sizeof(*i));
+ i->shmmax = oldi->shmmax;
+ i->shmmin = oldi->shmmin;
+ i->shmmni = oldi->shmmni;
+ i->shmseg = oldi->shmseg;
+ i->shmall = oldi->shmall;
+ }
+ return result;
+ }
+#endif
+}
+
+#if defined PIC && DO_VERSIONING
+default_symbol_version (__new_shmctl, shmctl, GLIBC_2.2);
+#else
+weak_alias (__new_shmctl, shmctl);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b6c96e67b0aee54e255605a4126f029d0ec1c8b
commit 3b6c96e67b0aee54e255605a4126f029d0ec1c8b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 21:00:16 2000 +0000
Linux/Alpha specific semctl implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/semctl.c b/sysdeps/unix/sysv/linux/alpha/semctl.c
new file mode 100644
index 0000000..6281e44
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/semctl.c
@@ -0,0 +1,132 @@
+/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stdarg.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+
+#include <sysdep.h>
+#include <string.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+struct __old_semid_ds
+{
+ struct __old_ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ struct sem *__sembase; /* ptr to first semaphore in array */
+ struct sem_queue *__sem_pending; /* pending operations */
+ struct sem_queue *__sem_pending_last; /* last pending operation */
+ struct sem_undo *__undo; /* ondo requests on this array */
+ unsigned short int sem_nsems; /* number of semaphores in set */
+};
+
+/* Define a `union semun' suitable for Linux here. */
+union semun
+{
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
+ unsigned short int *array; /* array for GETALL & SETALL */
+ struct seminfo *__buf; /* buffer for IPC_INFO */
+};
+
+
+/* Return identifier for array of NSEMS semaphores associated with
+ KEY. */
+int __new_semctl (int semid, int semnum, int cmd, ...);
+
+int
+__new_semctl (int semid, int semnum, int cmd, ...)
+{
+ union semun arg;
+ va_list ap;
+
+ va_start (ap, cmd);
+
+ /* Get the argument. */
+ arg = va_arg (ap, union semun);
+
+ va_end (ap);
+
+#if __ASSUME_32BITUIDS > 0
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg);
+#else
+ switch (cmd) {
+ case SEM_STAT:
+ case IPC_STAT:
+ case IPC_SET:
+ break;
+ default:
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg);
+ }
+
+ {
+ int save_errno = errno, result;
+ struct __old_semid_ds old;
+ struct semid_ds *buf;
+
+ /* Unfortunately there is no way how to find out for sure whether
+ we should use old or new semctl. */
+ result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64, &arg);
+ if (result != -1 || errno != EINVAL)
+ return result;
+
+ __set_errno(save_errno);
+ buf = arg.buf;
+ arg.buf = (struct semid_ds *)&old;
+ if (cmd == IPC_SET)
+ {
+ old.sem_perm.uid = buf->sem_perm.uid;
+ old.sem_perm.gid = buf->sem_perm.gid;
+ old.sem_perm.mode = buf->sem_perm.mode;
+ if (old.sem_perm.uid != buf->sem_perm.uid ||
+ old.sem_perm.gid != buf->sem_perm.gid)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ }
+ result = INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, &arg);
+ if (result != -1 && cmd != IPC_SET)
+ {
+ memset(buf, 0, sizeof(*buf));
+ buf->sem_perm.__key = old.sem_perm.__key;
+ buf->sem_perm.uid = old.sem_perm.uid;
+ buf->sem_perm.gid = old.sem_perm.gid;
+ buf->sem_perm.cuid = old.sem_perm.cuid;
+ buf->sem_perm.cgid = old.sem_perm.cgid;
+ buf->sem_perm.mode = old.sem_perm.mode;
+ buf->sem_perm.__seq = old.sem_perm.__seq;
+ buf->sem_otime = old.sem_otime;
+ buf->sem_ctime = old.sem_ctime;
+ buf->sem_nsems = old.sem_nsems;
+ }
+ return result;
+ }
+#endif
+}
+
+#if defined PIC && DO_VERSIONING
+default_symbol_version (__new_semctl, semctl, GLIBC_2.2);
+#else
+weak_alias (__new_semctl, semctl);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e683793e4eef0aed916ad1113c1c60d233f73a4
commit 9e683793e4eef0aed916ad1113c1c60d233f73a4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 21:00:09 2000 +0000
Linux/Alpha specific msgctl implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
new file mode 100644
index 0000000..2d07b1f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -0,0 +1,120 @@
+/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/msg.h>
+#include <ipc_priv.h>
+
+#include <sysdep.h>
+#include <string.h>
+#include <sys/syscall.h>
+
+#include "kernel-features.h"
+
+struct __old_msqid_ds
+{
+ struct __old_ipc_perm msg_perm; /* structure describing operation permission */
+ struct msg *__msg_first; /* pointer to first message on queue */
+ struct msg *__msg_last; /* pointer to last message on queue */
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgrcv command */
+ __time_t msg_ctime; /* time of last change */
+ struct wait_queue *__wwait; /* ??? */
+ struct wait_queue *__rwait; /* ??? */
+ unsigned short int __msg_cbytes; /* current number of bytes on queue */
+ unsigned short int msg_qnum; /* number of messages currently on queue */
+ unsigned short int msg_qbytes; /* max number of bytes allowed on queue */
+ __ipc_pid_t msg_lspid; /* pid of last msgsnd() */
+ __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
+};
+
+/* Allows to control internal state and destruction of message queue
+ objects. */
+int __new_msgctl (int, int, struct msqid_ds *);
+
+int
+__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
+{
+#if __ASSUME_32BITUIDS > 0
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
+#else
+ switch (cmd) {
+ case MSG_STAT:
+ case IPC_STAT:
+ case IPC_SET:
+ break;
+ default:
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd, buf);
+ }
+
+ {
+ int save_errno = errno, result;
+ struct __old_msqid_ds old;
+
+ /* Unfortunately there is no way how to find out for sure whether
+ we should use old or new msgctl. */
+ result = INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
+ if (result != -1 || errno != EINVAL)
+ return result;
+
+ __set_errno(save_errno);
+ if (cmd == IPC_SET)
+ {
+ old.msg_perm.uid = buf->msg_perm.uid;
+ old.msg_perm.gid = buf->msg_perm.gid;
+ old.msg_perm.mode = buf->msg_perm.mode;
+ old.msg_qbytes = buf->msg_qbytes;
+ if (old.msg_perm.uid != buf->msg_perm.uid ||
+ old.msg_perm.gid != buf->msg_perm.gid ||
+ old.msg_qbytes != buf->msg_qbytes)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ }
+ result = INLINE_SYSCALL (msgctl, 3, msqid, cmd, &old);
+ if (result != -1 && cmd != IPC_SET)
+ {
+ memset(buf, 0, sizeof(*buf));
+ buf->msg_perm.__key = old.msg_perm.__key;
+ buf->msg_perm.uid = old.msg_perm.uid;
+ buf->msg_perm.gid = old.msg_perm.gid;
+ buf->msg_perm.cuid = old.msg_perm.cuid;
+ buf->msg_perm.cgid = old.msg_perm.cgid;
+ buf->msg_perm.mode = old.msg_perm.mode;
+ buf->msg_perm.__seq = old.msg_perm.__seq;
+ buf->msg_stime = old.msg_stime;
+ buf->msg_rtime = old.msg_rtime;
+ buf->msg_ctime = old.msg_ctime;
+ buf->__msg_cbytes = old.__msg_cbytes;
+ buf->msg_qnum = old.msg_qnum;
+ buf->msg_qbytes = old.msg_qbytes;
+ buf->msg_lspid = old.msg_lspid;
+ buf->msg_lrpid = old.msg_lrpid;
+ }
+ return result;
+ }
+#endif
+}
+
+#if defined PIC && DO_VERSIONING
+default_symbol_version (__new_msgctl, msgctl, GLIBC_2.2);
+#else
+weak_alias (__new_msgctl, msgctl);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6753cccf4b6ac2913c707817d2356e7212c31d43
commit 6753cccf4b6ac2913c707817d2356e7212c31d43
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:47:48 2000 +0000
MIPS specific definitions of macros to get stack pointer and high
precision timer.
diff --git a/sysdeps/mips/memprof.h b/sysdeps/mips/memprof.h
new file mode 100644
index 0000000..93f2917
--- /dev/null
+++ b/sysdeps/mips/memprof.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2fab833fbb220599afc10f2ba04f8c4f195b475
commit c2fab833fbb220599afc10f2ba04f8c4f195b475
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:47:42 2000 +0000
m68k specific definitions of macros to get stack pointer and high
precision timer.
diff --git a/sysdeps/m68k/memprof.h b/sysdeps/m68k/memprof.h
new file mode 100644
index 0000000..5fd1cf4
--- /dev/null
+++ b/sysdeps/m68k/memprof.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cab8e3a3ec25f71d369553667d907ed6da8cc5c4
commit cab8e3a3ec25f71d369553667d907ed6da8cc5c4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:47:25 2000 +0000
Alpha specific definitions of macros to get stack pointer and high
precision timer.
diff --git a/sysdeps/alpha/memprof.h b/sysdeps/alpha/memprof.h
new file mode 100644
index 0000000..462b5ce
--- /dev/null
+++ b/sysdeps/alpha/memprof.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define GETSP() ({ register uintptr_t stack_ptr asm ("$30"); stack_ptr; })
+
+#include <sysdeps/generic/memprof.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b9d6d804540939dc317513580054eccf8f519cf
commit 8b9d6d804540939dc317513580054eccf8f519cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:44:00 2000 +0000
(getresuid): Make syscall directly, no stubs needed.
(getresgid): Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 6bb4451..d8c5afa 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -56,8 +56,8 @@ s_getcwd getcwd getcwd 2 __syscall_getcwd
s_getdents getdents getdents 3 __syscall_getdents
s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg
s_getpriority getpriority getpriority 2 __syscall_getpriority
-s_getresgid getresgid getresgid 3 __syscall_getresgid
-s_getresuid getresuid getresuid 3 __syscall_getresuid
+getresgid - getresgid 3 getresgid
+getresuid - getresuid 3 getresuid
s_ipc msgget ipc 5 __syscall_ipc
s_lstat64 lxstat64 lstat64 2 __syscall_lstat64
s_poll poll poll 3 __syscall_poll
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb30b58ad5eeaa8b4cda2e780ad9489a62864605
commit fb30b58ad5eeaa8b4cda2e780ad9489a62864605
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:43:46 2000 +0000
Linux/m68k shmctl implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/shmctl.c b/sysdeps/unix/sysv/linux/m68k/shmctl.c
new file mode 100644
index 0000000..7eac638
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/shmctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/shmctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a020fa2f4de2daa10c6454c4acd59544a95c38e4
commit a020fa2f4de2daa10c6454c4acd59544a95c38e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:43:42 2000 +0000
Linux/m68k semctl implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/semctl.c b/sysdeps/unix/sysv/linux/m68k/semctl.c
new file mode 100644
index 0000000..e9b1a48
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/semctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/semctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac707c19aaf6ff6d0cd3899932903ff4f39e103e
commit ac707c19aaf6ff6d0cd3899932903ff4f39e103e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:43:37 2000 +0000
Linux/m68k smgctl implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/msgctl.c b/sysdeps/unix/sysv/linux/m68k/msgctl.c
new file mode 100644
index 0000000..9f9b843
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/msgctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/msgctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef034ccbd579401e759410aa2f1b53f78d873c2d
commit ef034ccbd579401e759410aa2f1b53f78d873c2d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:43:32 2000 +0000
Linux/m68k getresuid implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/getresuid.c b/sysdeps/unix/sysv/linux/m68k/getresuid.c
new file mode 100644
index 0000000..0b14cef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d60da510e26925fd089228a6c7f311b36b2e0161
commit d60da510e26925fd089228a6c7f311b36b2e0161
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:43:28 2000 +0000
Linux/m68k getresgid implementation.
diff --git a/sysdeps/unix/sysv/linux/m68k/getresgid.c b/sysdeps/unix/sysv/linux/m68k/getresgid.c
new file mode 100644
index 0000000..b703a41
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=886523a9baa1bbe3169359270c7c4d8bfd2aa546
commit 886523a9baa1bbe3169359270c7c4d8bfd2aa546
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:42:16 2000 +0000
Document new tristate __libc_missing_32bit_uids.
Use 32bit uid syscall if __libc_missing_32bit_uids is -1 or 0.
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index 4e7625c..79701ee 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -45,7 +45,7 @@ __chown (const char *file, uid_t owner, gid_t group)
return INLINE_SYSCALL (chown32, 3, file, owner, group);
#else
# ifdef __NR_chown32
- if (!__libc_missing_32bit_uids)
+ if (__libc_missing_32bit_uids <= 0)
{
int result;
int saved_errno = errno;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78a718de6ff75e3445010743960604db86775e43
commit 78a718de6ff75e3445010743960604db86775e43
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:41:04 2000 +0000
Linux/i386 specific shmctl implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c
new file mode 100644
index 0000000..7eac638
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/shmctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/shmctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c391b09956cdfe509804d0c01b07f4aeb84caaa
commit 6c391b09956cdfe509804d0c01b07f4aeb84caaa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:40:59 2000 +0000
Linux/i386 specific semctl implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c
new file mode 100644
index 0000000..e9b1a48
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/semctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/semctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9410cd8d7ce2664544953b3b8a1368fbb881cf74
commit 9410cd8d7ce2664544953b3b8a1368fbb881cf74
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:40:53 2000 +0000
Linux/i386 specific msgctl implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c
new file mode 100644
index 0000000..9f9b843
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/msgctl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/msgctl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5ef54b6fd7d9736dbe1d3711420e9420eb5e9336
commit 5ef54b6fd7d9736dbe1d3711420e9420eb5e9336
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:40:38 2000 +0000
Linux/i386 specific getresuid implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/getresuid.c b/sysdeps/unix/sysv/linux/arm/getresuid.c
new file mode 100644
index 0000000..0b14cef
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe60fdbe10db0bccb3b8a42df67616ddef29cd1c
commit fe60fdbe10db0bccb3b8a42df67616ddef29cd1c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 19:40:32 2000 +0000
Linux/i386 specific getresgid implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/getresgid.c b/sysdeps/unix/sysv/linux/arm/getresgid.c
new file mode 100644
index 0000000..b703a41
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getresgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9dca440b10c5709a417b4995d2ab5ca52aa2cb3d
commit 9dca440b10c5709a417b4995d2ab5ca52aa2cb3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Feb 11 18:49:01 2000 +0000
(_FPU_DEFAULT): Set the AC bit.
diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h
index 27b8dda..b5338c5 100644
--- a/sysdeps/arm/fpu/fpu_control.h
+++ b/sysdeps/arm/fpu/fpu_control.h
@@ -71,7 +71,7 @@
/* The fdlibm code requires no interrupts for exceptions. Don't
change the rounding mode, it would break long double I/O! */
-#define _FPU_DEFAULT 0x00000000 /* Default value. */
+#define _FPU_DEFAULT 0x00001000 /* Default value. */
/* Type of the control word. */
typedef unsigned int fpu_control_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a233bb29c877f7268159f0e068ea4a7ae761ae25
commit a233bb29c877f7268159f0e068ea4a7ae761ae25
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Feb 10 11:09:31 2000 +0000
2000-02-10 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/clone.S: Rewritten.
Based on a patch by Hiroyuki Machida <machida@sm.sony.co.jp>.
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 4d6408d..30499bc 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>, 1996.
@@ -26,9 +26,9 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
+/* int clone(int (*fn)(), void *child_stack, int flags, void *arg) */
-#define FRAMESZ 4*SZREG
+#define FRAMESZ 8*SZREG
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define MAX_REG_ARGS 4
#else
@@ -36,14 +36,16 @@
#endif
.text
-NESTED(__clone,4*SZREG,sp)
-#ifdef PIC
+NESTED(__clone,FRAMESZ,sp)
+#ifdef __PIC__
.set noreorder
.cpload $25
.set reorder
- .cprestore 16
-#endif
PTR_SUBIU sp,FRAMESZ
+ .cprestore SZREG*4
+#else
+ PTR_SUBIU sp,FRAMESZ
+#endif
#ifdef PROF
.set noat
move $1,ra
@@ -51,25 +53,20 @@ NESTED(__clone,4*SZREG,sp)
.set at
#endif
+ REG_S s0,FRAMESZ-SZREG*2(sp)
+ REG_S s1,FRAMESZ-SZREG*3(sp)
/* Sanity check arguments. */
li v0,EINVAL
beqz a0,error /* no NULL function pointers */
beqz a1,error /* no NULL stack pointers */
- bltz a3,error /* no negative argument counts */
/* Allocate space on the new stack and copy args over */
- move t0,a3 # save nargs for __thread_start
- PTR_SLL t1,a3,PTR_SCALESHIFT
- PTR_ADDU t1,a3,sp
-1: REG_L t2,-SZREG(t1)
- PTR_SUBIU t1,SZREG
- REG_S t2,-SZREG(a1)
- PTR_SUBIU a3,1
- PTR_SUBIU a1,SZREG
- bnez a3,1b
+ /* Save the arg for user's function */
+ move s0,a3 /* Save arg __thread_start. */
+ move s1,a0 /* Save func. pointer. */
+
/* Do the system call */
- move t9,a0 # get fn ptr out of the way
move a0,a2
li v0,__NR_clone
syscall
@@ -78,11 +75,15 @@ NESTED(__clone,4*SZREG,sp)
beqz v0,__thread_start
/* Successful return from the parent */
+ REG_L s0,FRAMESZ-SZREG*2(sp)
+ REG_L s1,FRAMESZ-SZREG*3(sp)
PTR_ADDIU sp,FRAMESZ
ret
/* Something bad happened -- no child created */
error:
+ REG_L s0,FRAMESZ-SZREG*2(sp)
+ REG_L s1,FRAMESZ-SZREG*3(sp)
PTR_ADDIU sp,FRAMESZ
#ifdef PIC
la t9,__syscall_error
@@ -96,30 +97,25 @@ error:
its own function so that we can terminate the stack trace with our
debug info.
- At this point we have t0=nargs, t9=fn, sp=&arg[0]. */
+ At this point we have s0=arg, s1=fn. */
-NESTED(__thread_start,32,sp)
- /* Stackframe has been created on entry of clone() */
- /* Calculate address of jump into argument loading code */
- li t1,MAX_REG_ARGS
- slt t0,t1,t2 /* max MAX_REG_ARGS args in registers */
- MOVN (t2,t1,t0)
- la v0,arg0
- PTR_SLL t1,t0,PTR_SCALESHIFT
- PTR_SUBU v0,t1
- jr v0
+NESTED(__thread_start,FRAMESZ,sp)
+ /* The stackframe has been created on entry of clone(). */
+ /* Resort the arg for user's function. */
+ move a0,s0
+ move t9,s1
- /* Load the integer register arguments */
- REG_L a0,SZREG(sp)
-arg0:
-
- /* Call the user's function */
+ /* Call the user's function. */
jalr t9
- /* Call _exit rather than doing it inline for breakpoint purposes */
+ /* Call _exit rather than doing it inline for breakpoint purposes. */
move a0,v0
+#ifdef __PIC__
+ la t9,_exit
+ jalr t9
+#else
jal _exit
-
+#endif
END(__thread_start)
weak_alias(__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7393d1c58e0094a0443903658ead2ac90a98243
commit b7393d1c58e0094a0443903658ead2ac90a98243
Author: Andreas Jaeger <aj@suse.de>
Date: Wed Feb 9 14:58:57 2000 +0000
2000-02-09 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/sys/syscall.h: Add new syscalls.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Add missing syscalls.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
index 36214e4..27dc08a 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1203,5 +1203,12 @@
#define SYS_sendfile (SYS_Linux + 207)
#define SYS_putpmsg (SYS_Linux + 208)
#define SYS_getpmsg (SYS_Linux + 209)
+#define SYS_mmap2 (SYS_Linux + 210)
+#define SYS_truncate64 (SYS_Linux + 211)
+#define SYS_ftruncate64 (SYS_Linux + 212)
+#define SYS_stat64 (SYS_Linux + 213)
+#define SYS_lstat64 (SYS_Linux + 214)
+#define SYS_fstat64 (SYS_Linux + 215)
+
#endif /* sys/syscall.h */
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index a4cae30..6bb4451 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -50,20 +50,28 @@ rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
s_execve execve execve 3 __syscall_execve
+s_fstat64 fxstat64 fstat64 2 __syscall_fstat64
+s_ftruncate64 ftruncate64 ftruncate64 3 __syscall_ftruncate64
s_getcwd getcwd getcwd 2 __syscall_getcwd
s_getdents getdents getdents 3 __syscall_getdents
+s_getpmsg getpmsg getpmsg 5 __syscall_getpmsg
s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_ipc msgget ipc 5 __syscall_ipc
+s_lstat64 lxstat64 lstat64 2 __syscall_lstat64
s_poll poll poll 3 __syscall_poll
s_pread64 pread64 pread 6 __syscall_pread
+s_putpmsg putpmsg putpmsg 5 __syscall_putpmsg
s_ptrace ptrace ptrace 4 __syscall_ptrace
s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit
s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_stat64 xstat64 stat64 2 __syscall_stat64
+s_truncate64 truncate64 truncate64 3 __syscall_truncate64
+
# Todo: we can pass 6 args in registers, no need for the wrapper
sysctl sysctl _sysctl 1 __syscall_sysctl
sys_fstat fxstat fstat 2 __syscall_fstat
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb8168397d78fd345c0eddcd5b3b3569d0085bd3
commit fb8168397d78fd345c0eddcd5b3b3569d0085bd3
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 8 17:27:15 2000 +0000
2000-02-08 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h (GET_PC): Fix typo.
* sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump):
Make it compile.
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index 61a4688..e204223 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -44,8 +44,7 @@ static void
register_dump (int fd, struct sigcontext *ctx)
{
char regs[32][8];
- char fpregs[32][8];
- struct iovec iov[97]; XXX
+ struct iovec iov[38];
size_t nr = 0;
int i;
@@ -60,11 +59,11 @@ register_dump (int fd, struct sigcontext *ctx)
/* Generate strings of register contents. */
for (i = 0; i < 31; i++)
- hexvalue (ctx->sc_regs, regs[i], 8);
+ hexvalue (ctx->sc_regs[i], regs[i], 8);
hexvalue (ctx->sc_pc, regs[32], 8);
hexvalue (ctx->sc_cause, regs[33], 8);
hexvalue (ctx->sc_status, regs[34], 8);
- hexvalue (ctx->badvaddr, regs[35], 8);
+ hexvalue (ctx->sc_badvaddr, regs[35], 8);
hexvalue (ctx->sc_mdhi, regs[36], 8);
hexvalue (ctx->sc_mdlo, regs[37], 8);
@@ -94,7 +93,6 @@ register_dump (int fd, struct sigcontext *ctx)
ADD_STRING (" ");
}
ADD_STRING ("\n pc cause status badvaddr lo hi\n ");
- ADD_MEM (regs[], 8);
for (i = 32; i < 38; i++)
{
ADD_MEM (regs[i], 8);
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
index 2d9f280..9b3e7ea 100644
--- a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -20,6 +20,6 @@
#define SIGCONTEXT struct sigcontext
#define SIGCONTEXT_EXTRA_ARGS
-#define GET_PC(ctx) ((void *) ctx.pc)
+#define GET_PC(ctx) ((void *) ctx.sc_pc)
#define GET_FRAME(ctx) ((void *) ctx.sc_regs[30])
#define GET_STACK(ctx) ((void *) ctx.sc_regs[29])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff75a64c4a2227347d6ba51756c6cd10fd84ddde
commit ff75a64c4a2227347d6ba51756c6cd10fd84ddde
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 8 16:36:09 2000 +0000
2000-02-08 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/register-dump.h (register_dump):
Fix usage of macro ADD_STRING.
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
index c48980d..61a4688 100644
--- a/sysdeps/unix/sysv/linux/mips/register-dump.h
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -73,34 +73,34 @@ register_dump (int fd, struct sigcontext *ctx)
for (i = 0; i < 8; i++)
{
ADD_MEM (regs[i], 8);
- ADD_STRING (" ", 1);
+ ADD_STRING (" ");
}
ADD_STRING ("\n R8 ");
for (i = 8; i < 16; i++)
{
ADD_MEM (regs[i], 8);
- ADD_STRING (" ", 1);
+ ADD_STRING (" ");
}
ADD_STRING ("\n R16 ");
for (i = 16; i < 24; i++)
{
ADD_MEM (regs[i], 8);
- ADD_STRING (" ", 1);
+ ADD_STRING (" ");
}
ADD_STRING ("\n R24 ");
for (i = 24; i < 32; i++)
{
ADD_MEM (regs[i], 8);
- ADD_STRING (" ", 1);
+ ADD_STRING (" ");
}
ADD_STRING ("\n pc cause status badvaddr lo hi\n ");
ADD_MEM (regs[], 8);
for (i = 32; i < 38; i++)
{
ADD_MEM (regs[i], 8);
- ADD_STRING (" ", 1);
+ ADD_STRING (" ");
}
- ADD_STRING ("\n", 1);
+ ADD_STRING ("\n");
/* Write the stuff out. */
writev (fd, iov, nr);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3be99749f4d8d371d1bc5a0a11547d2a4b14bf2
commit b3be99749f4d8d371d1bc5a0a11547d2a4b14bf2
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 8 13:41:37 2000 +0000
2000-02-08 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Remove members
c_ispeed and c_ospeed which are not implemented.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index e43c03b..f7abe47 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -68,8 +68,6 @@ struct termios
tcflag_t c_lflag; /* local mode flags */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
};
/* c_cc characters */
@@ -93,7 +91,7 @@ struct termios
* VDSUSP is not supported
*/
#if defined __USE_BSD
-#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+# define VDSUSP 11 /* Delayed suspend character [ISIG]. */
#endif
#endif
#ifdef __USE_BSD
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25fdf1f5c1d1ddc4c97254254b8d2b6823553886
commit 25fdf1f5c1d1ddc4c97254254b8d2b6823553886
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 8 09:46:01 2000 +0000
2000-02-08 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Define __libc_* variant
for cancelation wrapper; use __ASSUME_PWRITE_SYSCALL macro.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
index c3bdcf9..d926a06 100644
--- a/sysdeps/unix/sysv/linux/mips/pread.c
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,17 +23,21 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include <kernel-features.h>
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread (int fd, void *buf, size_t count,
off_t offset) internal_function;
+# endif
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
ssize_t
-__pread (fd, buf, count, offset)
+__libc_pread (fd, buf, count, offset)
int fd;
void *buf;
size_t count;
@@ -42,21 +46,26 @@ __pread (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-#if defined(__MIPSEB__)
+# if defined(__MIPSEB__)
result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
-#elif defined(__MIPSEL__)
+# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
-#endif
+# endif
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread (fd, buf, count, offset);
-
+# endif
return result;
}
-weak_alias (__pread, pread)
+strong_alias (__libc_pread, __pread)
+weak_alias (__libc_pread, pread)
-#define __pread(fd, buf, count, offset) \
+# define __libc_pread(fd, buf, count, offset) \
static internal_function __emulate_pread (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread.c>
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
index dfcfa01..85fe77c 100644
--- a/sysdeps/unix/sysv/linux/mips/pread64.c
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,17 +23,22 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pread
+#include <kernel-features.h>
-extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
- off_t offset_hi, off_t offset_lo);
+#if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
+# if __ASSUME_PREAD_SYSCALL == 0
static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
off64_t offset) internal_function;
+# endif
+
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
ssize_t
-__pread64 (fd, buf, count, offset)
+__libc_pread64 (fd, buf, count, offset)
int fd;
void *buf;
size_t count;
@@ -42,24 +47,29 @@ __pread64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-#if defined(__MIPSEB__)
+# if defined(__MIPSEB__)
result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32),
(off_t) (offset & 0xffffffff));
-#elif defined(__MIPSEL__)
+# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
(off_t) (offset & 0xffffffff),
(off_t) (offset >> 32));
-#endif
+# endif
+# if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pread64 (fd, buf, count, offset);
-
+# endif
return result;
}
-weak_alias (__pread64, pread64)
+strong_alias (__libc_pread64, __pread64)
+weak_alias (__libc_pread64, pread64)
-#define __pread64(fd, buf, count, offset) \
+# define __libc_pread64(fd, buf, count, offset) \
static internal_function __emulate_pread64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pread64.c>
+
+#if __ASSUME_PREAD_SYSCALL == 0
+# include <sysdeps/posix/pread64.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index 274c142..a83df31 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,17 +23,20 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include <kernel-features.h>
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
int dummy, off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
off_t offset) internal_function;
-
+# endif
ssize_t
-__pwrite (fd, buf, count, offset)
+__libc_pwrite (fd, buf, count, offset)
int fd;
const void *buf;
size_t count;
@@ -42,21 +45,27 @@ __pwrite (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-#if defined(__MIPSEB__)
+# if defined(__MIPSEB__)
result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset);
-#elif defined(__MIPSEL__)
+# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0);
-#endif
+# endif
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);
+# endif
return result;
}
-weak_alias (__pwrite, pwrite)
+strong_alias (__libc_pwrite, __pwrite)
+weak_alias (__libc_pwrite, pwrite)
-#define __pwrite(fd, buf, count, offset) \
+# define __libc_pwrite(fd, buf, count, offset) \
static internal_function __emulate_pwrite (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite.c>
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index f73b10e..2086f76 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
@@ -23,17 +23,20 @@
#include <sysdep.h>
#include <sys/syscall.h>
-#ifdef __NR_pwrite
+#include <kernel-features.h>
+
+#if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
int dummy, off_t offset_hi, off_t offset_lo);
+# if __ASSUME_PWRITE_SYSCALL == 0
static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
off64_t offset) internal_function;
-
+# endif
ssize_t
-__pwrite64 (fd, buf, count, offset)
+__libc_pwrite64 (fd, buf, count, offset)
int fd;
const void *buf;
size_t count;
@@ -42,24 +45,32 @@ __pwrite64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
-#if defined(__MIPSEB__)
+# if defined(__MIPSEB__)
result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32),
(off_t) (offset & 0xffffffff));
-#elif defined(__MIPSEL__)
+# elif defined(__MIPSEL__)
result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
(off_t) (offset & 0xffffffff),
(off_t) (offset >> 32));
-#endif
+# endif
+
+# if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite64 (fd, buf, count, offset);
+# endif
return result;
}
-weak_alias (__pwrite64, pwrite64)
+strong_alias (__libc_pwrite64, __pwrite64)
+weak_alias (__libc_pwrite64, pwrite64)
-#define __pwrite64(fd, buf, count, offset) \
+# define __libc_pwrite64(fd, buf, count, offset) \
static internal_function __emulate_pwrite64 (fd, buf, count, offset)
#endif
-#include <sysdeps/posix/pwrite64.c>
+
+#if __ASSUME_PWRITE_SYSCALL == 0
+# include <sysdeps/posix/pwrite64.c>
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22e908b01a91acc84a10b3032decbb60c6dccb0f
commit 22e908b01a91acc84a10b3032decbb60c6dccb0f
Author: Andreas Jaeger <aj@suse.de>
Date: Sat Feb 5 07:45:59 2000 +0000
2000-02-05 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (MS_SYNC): 0 will not
work - set to 4 in accordance with changes made in the Linux/MIPS
kernel. Using MS_SYNC on older kernels with MS_SYNC == 0 doesn't
actually work.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 63c8b74..5b8c752 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -61,8 +61,8 @@
/* Flags to `msync'. */
#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 0 /* Synchronous memory sync. */
#define MS_INVALIDATE 2 /* Invalidate the caches. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
/* Flags for `mlockall'. */
#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cd50e5eb82bf8f3b762b153b970ba7f0c91b5e2
commit 4cd50e5eb82bf8f3b762b153b970ba7f0c91b5e2
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 4 16:40:32 2000 +0000
Fix typo in comment.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 0efbab2..63c8b74 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map interface. Linux/PowerPC version.
+/* Definitions for POSIX memory map interface. Linux/MIPS version.
Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19918d3ddd03c90b126765f502ee692cf511ba6d
commit 19918d3ddd03c90b126765f502ee692cf511ba6d
Author: Andreas Jaeger <aj@suse.de>
Date: Fri Feb 4 16:38:20 2000 +0000
2000-02-04 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/bits/mman.h: Use correct values for
the defines.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index be460ab..0efbab2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/PowerPC version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,27 +46,27 @@
#define MAP_FIXED 0x10 /* Interpret addr exactly. */
#ifdef __USE_MISC
# define MAP_FILE 0x00
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
# define MAP_ANON MAP_ANONYMOUS
# define MAP_RENAME MAP_ANONYMOUS
#endif
/* These are Linux-specific. */
#ifdef __USE_MISC
-# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
-# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
-# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
+# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */
+# define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
#endif
/* Flags to `msync'. */
#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_SYNC 0 /* Synchronous memory sync. */
#define MS_INVALIDATE 2 /* Invalidate the caches. */
/* Flags for `mlockall'. */
-#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 0x4000 /* Lock all additions to address
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
space. */
/* Flags for `mremap'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae8736b79852eaf7dc00d592a906faff5954954d
commit ae8736b79852eaf7dc00d592a906faff5954954d
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Feb 3 15:03:50 2000 +0000
2000-02-03 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/abort-instr.h: New file.
diff --git a/sysdeps/mips/abort-instr.h b/sysdeps/mips/abort-instr.h
new file mode 100644
index 0000000..d7d8d50
--- /dev/null
+++ b/sysdeps/mips/abort-instr.h
@@ -0,0 +1,2 @@
+/* An instruction which should crash any program is a breakpoint. */
+#define ABORT_INSTRUCTION asm ("break 255")
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ede084048d0fdc71dc458a11860086b3bc432afa
commit ede084048d0fdc71dc458a11860086b3bc432afa
Author: Andreas Jaeger <aj@suse.de>
Date: Thu Feb 3 14:10:24 2000 +0000
2000-02-03 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: New file.
* sysdeps/unix/sysv/linux/mips/register-dump.h: New file.
* sysdeps/mips/stackinfo.h: New file.
diff --git a/sysdeps/mips/stackinfo.h b/sysdeps/mips/stackinfo.h
new file mode 100644
index 0000000..612d251
--- /dev/null
+++ b/sysdeps/mips/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On MIPS the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
diff --git a/sysdeps/unix/sysv/linux/mips/register-dump.h b/sysdeps/unix/sysv/linux/mips/register-dump.h
new file mode 100644
index 0000000..c48980d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/register-dump.h
@@ -0,0 +1,110 @@
+/* Dump registers.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/uio.h>
+#include <stdio-common/_itoa.h>
+
+/* We will print the register dump in this format:
+
+ R0 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ R8 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ R16 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ R24 XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ pc cause status badvaddr lo hi
+ XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
+ The FPU registers will not be printed.
+*/
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+ char *cp = _itoa_word (value, buf + len, 16, 0);
+ while (cp > buf)
+ *--cp = '0';
+}
+
+static void
+register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[32][8];
+ char fpregs[32][8];
+ struct iovec iov[97]; XXX
+ size_t nr = 0;
+ int i;
+
+#define ADD_STRING(str) \
+ iov[nr].iov_base = (char *) str; \
+ iov[nr].iov_len = strlen (str); \
+ ++nr
+#define ADD_MEM(str, len) \
+ iov[nr].iov_base = str; \
+ iov[nr].iov_len = len; \
+ ++nr
+
+ /* Generate strings of register contents. */
+ for (i = 0; i < 31; i++)
+ hexvalue (ctx->sc_regs, regs[i], 8);
+ hexvalue (ctx->sc_pc, regs[32], 8);
+ hexvalue (ctx->sc_cause, regs[33], 8);
+ hexvalue (ctx->sc_status, regs[34], 8);
+ hexvalue (ctx->badvaddr, regs[35], 8);
+ hexvalue (ctx->sc_mdhi, regs[36], 8);
+ hexvalue (ctx->sc_mdlo, regs[37], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\n R0 ");
+ for (i = 0; i < 8; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ", 1);
+ }
+ ADD_STRING ("\n R8 ");
+ for (i = 8; i < 16; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ", 1);
+ }
+ ADD_STRING ("\n R16 ");
+ for (i = 16; i < 24; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ", 1);
+ }
+ ADD_STRING ("\n R24 ");
+ for (i = 24; i < 32; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ", 1);
+ }
+ ADD_STRING ("\n pc cause status badvaddr lo hi\n ");
+ ADD_MEM (regs[], 8);
+ for (i = 32; i < 38; i++)
+ {
+ ADD_MEM (regs[i], 8);
+ ADD_STRING (" ", 1);
+ }
+ ADD_STRING ("\n", 1);
+
+ /* Write the stuff out. */
+ writev (fd, iov, nr);
+}
+
+
+#define REGISTER_DUMP register_dump (fd, &ctx)
diff --git a/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
new file mode 100644
index 0000000..2d9f280
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h
@@ -0,0 +1,25 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@suse.de>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#define SIGCONTEXT struct sigcontext
+#define SIGCONTEXT_EXTRA_ARGS
+#define GET_PC(ctx) ((void *) ctx.pc)
+#define GET_FRAME(ctx) ((void *) ctx.sc_regs[30])
+#define GET_STACK(ctx) ((void *) ctx.sc_regs[29])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d86bec0d491146f387ac6ab629032ed7be84a50c
commit d86bec0d491146f387ac6ab629032ed7be84a50c
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 1 16:50:51 2000 +0000
2000-02-01 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/syscalls.list: Remove duplicates.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 5ddba9b..a4cae30 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -35,15 +35,12 @@ socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
#
-# There are defined locally because the caller is also defined in this dir.
+# These are defined locally because the caller is also defined in this dir.
#
s_llseek llseek _llseek 5 __syscall__llseek
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_stat xstat stat 2 __syscall_stat
# System calls with wrappers.
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
@@ -71,7 +68,6 @@ s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
sysctl sysctl _sysctl 1 __syscall_sysctl
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
-sys_mknod xmknod mknod 3 __syscall_mknod
sys_readv readv readv 3 __syscall_readv
sys_stat xstat stat 2 __syscall_stat
sys_writev writev writev 3 __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbfe4cc5897e0b150f1b2a243a0e35993714e97b
commit bbfe4cc5897e0b150f1b2a243a0e35993714e97b
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 1 13:39:59 2000 +0000
2000-02-01 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/lxstat.c: Removed, we can use the
generic function.
* sysdeps/unix/sysv/linux/mips/fxstat.c: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c
deleted file mode 100644
index 4a3c486..0000000
--- a/sysdeps/unix/sysv/linux/mips/fxstat.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <kernel_stat.h>
-
-extern int __syscall_fstat (int, struct kernel_stat *);
-
-/* Get information about the file descriptor FD in BUF. */
-int
-__fxstat (int vers, int fd, struct stat *buf)
-{
- struct kernel_stat kbuf;
- int result;
-
- switch (vers)
- {
- case _STAT_VER_LINUX_OLD:
- /* Nothing to do. The struct is in the form the kernel expects
- it to be. */
- result = __syscall_fstat (fd, (struct kernel_stat *) buf);
- break;
-
- case _STAT_VER_LINUX:
- /* Do the system call. */
- result = __syscall_fstat (fd, &kbuf);
-
- /* Convert to current kernel version of `struct stat'. */
- buf->st_dev = kbuf.st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
- buf->st_ino = kbuf.st_ino;
- buf->st_mode = kbuf.st_mode;
- buf->st_nlink = kbuf.st_nlink;
- buf->st_uid = kbuf.st_uid;
- buf->st_gid = kbuf.st_gid;
- buf->st_rdev = kbuf.st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
- buf->st_pad3 = 0;
- buf->st_size = kbuf.st_size;
- buf->st_blksize = kbuf.st_blksize;
- buf->st_blocks = kbuf.st_blocks;
-
- buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
-
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
- break;
-
- default:
- __set_errno (EINVAL);
- result = -1;
- break;
- }
-
- return result;
-}
-weak_alias (__fxstat, _fxstat)
diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c
deleted file mode 100644
index 7907b2f..0000000
--- a/sysdeps/unix/sysv/linux/mips/lxstat.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <kernel_stat.h>
-
-extern int __syscall_lstat (const char *, struct kernel_stat *);
-
-/* Get information about the file NAME in BUF. */
-int
-__lxstat (int vers, const char *name, struct stat *buf)
-{
- struct kernel_stat kbuf;
- int result;
-
- switch (vers)
- {
- case _STAT_VER_LINUX_OLD:
- /* Nothing to do. The struct is in the form the kernel expects
- it to be. */
- result = __syscall_lstat (name, (struct kernel_stat *) buf);
- break;
-
- case _STAT_VER_LINUX:
- /* Do the system call. */
- result = __syscall_lstat (name, &kbuf);
-
- /* Convert to current kernel version of `struct stat'. */
- buf->st_dev = kbuf.st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
- buf->st_ino = kbuf.st_ino;
- buf->st_mode = kbuf.st_mode;
- buf->st_nlink = kbuf.st_nlink;
- buf->st_uid = kbuf.st_uid;
- buf->st_gid = kbuf.st_gid;
- buf->st_rdev = kbuf.st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
- buf->st_pad3 = 0;
- buf->st_size = kbuf.st_size;
- buf->st_blksize = kbuf.st_blksize;
- buf->st_blocks = kbuf.st_blocks;
-
- buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
-
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
- break;
-
- default:
- __set_errno (EINVAL);
- result = -1;
- break;
- }
-
- return result;
-}
-weak_alias (__lxstat, _lxstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7289f2bbfba0fa01ad5dde270b693ed6f7051d07
commit 7289f2bbfba0fa01ad5dde270b693ed6f7051d07
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 1 11:54:37 2000 +0000
2000-02-01 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/init-first.h: New file, from Ralf
Baechle <ralf@gnu.org>.
* sysdeps/unix/sysv/linux/mips/brk.c: New file.
diff --git a/sysdeps/unix/sysv/linux/mips/brk.c b/sysdeps/unix/sysv/linux/mips/brk.c
new file mode 100644
index 0000000..ce85617
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/brk.c
@@ -0,0 +1,56 @@
+/* brk system call for Linux/MIPS.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+void *__curbrk = 0;
+
+/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
+ to work around different old braindamage in the old Linux/x86 ELF
+ dynamic linker. Sigh. */
+weak_alias (__curbrk, ___brk_addr)
+
+int
+__brk (void *addr)
+{
+ void *newbrk;
+
+ {
+ register long int res __asm__ ("$2");
+
+ asm ("move\t$4,%2\n\t"
+ "syscall" /* Perform the system call. */
+ : "=r" (res)
+ : "0" (SYS_ify (brk)), "r" (addr)
+ : "$4", "$7");
+ newbrk = (void *) res;
+ }
+ __curbrk = newbrk;
+
+ if (newbrk < addr)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/mips/init-first.h b/sysdeps/unix/sysv/linux/mips/init-first.h
new file mode 100644
index 0000000..d8c2f38
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/init-first.h
@@ -0,0 +1,51 @@
+/* Prepare arguments for library initialization function.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The job of this fragment it to find argc and friends for INIT.
+ This is done in one of two ways: either in the stack context
+ of program start, or having dlopen pass them in. */
+
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+ asm(".weak _dl_starting_up\n\t" \
+ ".globl " #NAME "\n\t" \
+ ".ent " #NAME "\n" \
+ #NAME ":\n\t" \
+ ".set noreorder\n\t" \
+ ".cpload $25\n\t" \
+ ".set reorder\n\t" \
+ /* Are we a dynamic libc being loaded into a static program? */ \
+ "la $8, _dl_starting_up\n\t" \
+ "beqz $8, 1f\n\t" \
+ "lw $8, 0($8)\n\t" \
+ "seq $8, $8, 0\n" \
+ "1:\t" \
+ "sw $8, __libc_multiple_libcs\n\t" \
+ /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \
+ "bnez $8, 2f\n\t" \
+ "lw $4, 16($29)\n\t" \
+ "addiu $5, $29, 20\n\t" \
+ "sll $6, $4, 2\n\t" \
+ "addiu $6, $6, 4\n\t" \
+ "addu $6, $5, $6\n" \
+ "2:\t" \
+ "la $25, " #INIT "\n\t" \
+ "jr $25\n\t" \
+ ".end " #NAME "\n\t" \
+ "3:\t" \
+ ".size " #NAME ", 3b-" #NAME);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e67a8419c745fe9285cddcf9cc2de17d825a657e
commit e67a8419c745fe9285cddcf9cc2de17d825a657e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 1 11:20:19 2000 +0000
2000-02-01 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Add missing ints.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
index dd534ea..e9a4fbc 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,7 @@
/* Type for general register. */
-typedef unsigned long greg_t;
+typedef unsigned long int greg_t;
/* Number of general registers. */
#define NGREG 37
@@ -67,7 +67,7 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
- unsigned long uc_flags;
+ unsigned long int uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc16ca32545dc9fa488c37c3ae602be1a239814f
commit fc16ca32545dc9fa488c37c3ae602be1a239814f
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Feb 1 08:28:15 2000 +0000
2000-02-01 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/elf/start.S: Rewritten for __libc_start_main.
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index ce9ad9c..b432953 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,6 +45,12 @@
stack frame.
*/
+
+/* We need to call:
+ __libc_start_main (int (*main) (int, char **, char **), int argc,
+ char **argv, void (*init) (void), void (*fini) (void),
+ void (*rtld_fini) (void), void *stack_end)
+*/
#ifdef PIC
/* A macro to (re)initialize gp. We can get the run time address of 0f in
ra ($31) by blezal instruction. In this early phase, we can't save gp
@@ -66,84 +72,28 @@ ENTRY_POINT:
#endif
move $31, $0
- /* $2 contains the address of the shared library termination
- function, which we will register with `atexit' to be called by
- `exit'. I suspect that on some systems, and when statically
- linked, this will not be set by anything to any function
- pointer; hopefully it will be zero so we don't try to call
- random pointers. */
- beq $2, $0, nofini
- move $4, $2
- jal atexit
-#ifdef PIC
- SET_GP
-#endif
-nofini:
-
- /* Do essential libc initialization. In statically linked
- programs under the GNU Hurd, this is what sets up the
- arguments on the stack for the code below. Since the argument
- registers (a0 - a3) saved to the first 4 stack entries by
- the prologue of __libc_init_first, we preload them to
- prevent clobbering the stack tops. In Hurd case, stack pointer
- ($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */
-#if 0
- jal mach_host_self
-#endif
- li $4, 0x80000000
- bne $29, $4, 1f
- subu $29, 16
- sw $0, 0($29)
- sw $0, 4($29)
- sw $0, 8($29)
- sw $0, 12($29)
-1:
- lw $4, 0($29)
- lw $5, 4($29)
- lw $6, 8($29)
- lw $7, 12($29)
- jal __libc_init_first
-#ifdef PIC
- SET_GP
-#endif
- lw $4, 0($29)
- lw $5, 4($29)
- lw $6, 8($29)
- lw $7, 12($29)
-
- /* Call `_init', which is the entry point to our own `.init'
- section; and register with `atexit' to have `exit' call
- `_fini', which is the entry point to our own `.fini' section. */
- jal _init
-#ifdef PIC
- SET_GP
-#endif
#if (__mips64)
- dla $4, _fini
-#else /* __mips64 */
- la $4, _fini
-#endif /* __mips64 */
-
- jal atexit
-#ifdef PIC
- SET_GP
+ dla $4, main /* main */
+ lw $5, 0($29) /* argc */
+ addu $6, $29, 4 /* argv */
+ /* Allocate space on the stack for seven arguments but align to 32. */
+ subu $29, 32
+ dla $7, _init /* init */
+ dla $8, _fini
+#else
+ la $4, main /* main */
+ lw $5, 0($29) /* argc */
+ addu $6, $29, 4 /* argv */
+ /* Allocate space on the stack for seven arguments but align to 32. */
+ subu $29, 32
+ la $7, _init /* init */
+ la $8, _fini
#endif
+ sw $8, 16($29) /* fini */
+ sw $2, 20($29) /* rtld_fini */
+ sw $29, 24($29) /* stack_end */
+ jal __libc_start_main
- /* Extract the arguments and environment as encoded on the stack
- and set up the arguments for `main': argc, argv, envp. */
- lw $4, 0($29) /* argc */
- addu $5, $29, 4 /* argv */
- sll $6, $4, 2
- addu $6, $6, 4
- addu $6, $5, $6 /* envp = &argv[argc + 1] */
-
- /* Call the user's main function, and exit with its value. */
- jal main
-#ifdef PIC
- SET_GP
-#endif
- move $4, $2
- jal exit /* This should never return. */
hlt: b hlt /* Crash if somehow it does return. */
/* Define a symbol for the first piece of initialized data. */
@@ -153,8 +103,3 @@ __data_start:
.long 0
.weak data_start
data_start = __data_start
-
- .comm errno, 4, 4
-#ifdef __ELF__
- .type errno, @object
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16e4bf6fece0a835d3a5c07c088c7070c8174363
commit 16e4bf6fece0a835d3a5c07c088c7070c8174363
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 31 07:56:49 2000 +0000
Correct return value according to the standard.
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c
index 493d6a1..a179366 100644
--- a/sysdeps/alpha/fpu/feholdexcpt.c
+++ b/sysdeps/alpha/fpu/feholdexcpt.c
@@ -29,5 +29,5 @@ feholdexcept (fenv_t *envp)
/* Clear all exception status bits and exception enable bits. */
__ieee_set_fp_control(0);
- return 1;
+ return 0;
}
diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c
index f49586c..f0aaaa2 100644
--- a/sysdeps/alpha/fpu/fesetround.c
+++ b/sysdeps/alpha/fpu/fesetround.c
@@ -26,7 +26,7 @@ fesetround (int round)
unsigned long fpcr;
if (round & ~3)
- return 0;
+ return 1;
/* Get the current state. */
__asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
@@ -37,5 +37,5 @@ fesetround (int round)
/* Put the new state in effect. */
__asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr));
- return 1;
+ return 0;
}
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c
index 3faabd9..3422d54 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/fpu/feholdexcpt.c
@@ -33,5 +33,5 @@ feholdexcept (fenv_t *envp)
temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
_FPU_SETCW(temp);
- return 1;
+ return 0;
}
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c
index 7591b39..04eb09c 100644
--- a/sysdeps/arm/fpu/fesetround.c
+++ b/sysdeps/arm/fpu/fesetround.c
@@ -23,5 +23,5 @@ int
fesetround (int round)
{
/* We only support FE_TONEAREST, so there is no need for any work. */
- return (round == FE_TONEAREST)?1:0;
+ return (round == FE_TONEAREST)?0:1;
}
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index 1ccf84b..44a7c7d 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -35,5 +35,5 @@ feholdexcept (fenv_t *envp)
fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6);
__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
- return 1;
+ return 0;
}
diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c
index 8d5466c..8e06a15 100644
--- a/sysdeps/m68k/fpu/fesetround.c
+++ b/sysdeps/m68k/fpu/fesetround.c
@@ -27,12 +27,12 @@ fesetround (int round)
if (round & ~FE_UPWARD)
/* ROUND is no valid rounding mode. */
- return 0;
+ return 1;
__asm__ ("fmove%.l %!,%0" : "=dm" (fpcr));
fpcr &= ~FE_UPWARD;
fpcr |= round;
__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
- return 1;
+ return 0;
}
diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c
index 6b623d6..ae6ae86 100644
--- a/sysdeps/mips/fpu/fesetround.c
+++ b/sysdeps/mips/fpu/fesetround.c
@@ -28,7 +28,7 @@ fesetround (int round)
if ((round & ~0x3) != 0)
/* ROUND is no valid rounding mode. */
- return 0;
+ return 1;
/* Get current state. */
_FPU_GETCW (cw);
@@ -39,5 +39,5 @@ fesetround (int round)
/* Set new state. */
_FPU_SETCW (cw);
- return 1;
+ return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=acb1cd8ea1cfc675b307352f7ad5ff61ea345b26
commit acb1cd8ea1cfc675b307352f7ad5ff61ea345b26
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 29 12:02:41 2000 +0000
Export the new *rlimit interface with symbol version GLIBC_2.2.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 531817f..7e71a86 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -4,7 +4,7 @@ libc {
inb; inw; inl;
outb; outw; outl;
}
- GLIBC_2.1.3 {
+ GLIBC_2.2 {
# New rlimit interface
getrlimit; setrlimit; getrlimit64;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1fee13c891bc41db5f2e2c49634070a37217d2ab
commit 1fee13c891bc41db5f2e2c49634070a37217d2ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 29 12:02:32 2000 +0000
Backout changes for versioning setrlimit and getrlimit.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 53da8bb..60303d3 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -12,5 +12,3 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 7 syscall
-oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0
-oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c388491ab68354e62a7defc64c8c4bd861c2b008
commit c388491ab68354e62a7defc64c8c4bd861c2b008
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 29 12:02:14 2000 +0000
Backout rlimit changes for resource directory.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 6040b20..939c74c 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
-
-ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b2282bc344e37f238e803b5f3b8acdd1f1a7fbf
commit 9b2282bc344e37f238e803b5f3b8acdd1f1a7fbf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:34:15 2000 +0000
Add ipc_priv.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 2ed1571..c8868aa 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -5,6 +5,7 @@ ieee_get_fp_control.S
ieee_set_fp_control.S
init-first.h
ioperm.c
+ipc_priv.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47504af3f682519419689923af26479a1de13e69
commit 47504af3f682519419689923af26479a1de13e69
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:31:25 2000 +0000
Remove private decls.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
index a8d4cc6..3e784d9 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
@@ -44,25 +44,6 @@ struct msqid_ds
unsigned long int __unused2;
};
-#ifdef __LIBC_IPC_INTERNAL
-struct __old_msqid_ds
-{
- struct __old_ipc_perm msg_perm; /* structure describing operation permission */
- struct msg *__msg_first; /* pointer to first message on queue */
- struct msg *__msg_last; /* pointer to last message on queue */
- __time_t msg_stime; /* time of last msgsnd command */
- __time_t msg_rtime; /* time of last msgrcv command */
- __time_t msg_ctime; /* time of last change */
- struct wait_queue *__wwait; /* ??? */
- struct wait_queue *__rwait; /* ??? */
- unsigned short int __msg_cbytes; /* current number of bytes on queue */
- unsigned short int msg_qnum; /* number of messages currently on queue */
- unsigned short int msg_qbytes; /* max number of bytes allowed on queue */
- __ipc_pid_t msg_lspid; /* pid of last msgsnd() */
- __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
-};
-#endif
-
#ifdef __USE_MISC
# define msg_cbytes __msg_cbytes
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
index 19a3aa5..5236d57 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sem.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
@@ -46,20 +46,6 @@ struct semid_ds
unsigned long int __unused2;
};
-#ifdef __LIBC_IPC_INTERNAL
-struct __old_semid_ds
-{
- struct __old_ipc_perm sem_perm; /* operation permission struct */
- __time_t sem_otime; /* last semop() time */
- __time_t sem_ctime; /* last time changed by semctl() */
- struct sem *__sembase; /* ptr to first semaphore in array */
- struct sem_queue *__sem_pending; /* pending operations */
- struct sem_queue *__sem_pending_last; /* last pending operation */
- struct sem_undo *__undo; /* ondo requests on this array */
- unsigned short int sem_nsems; /* number of semaphores in set */
-};
-#endif
-
/* The user should define a union like the following to use it for arguments
for `semctl'.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 4e29764..683a9b6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -51,23 +51,6 @@ struct shmid_ds
unsigned long int __unused2;
};
-#ifdef __LIBC_IPC_INTERNAL
-struct __old_shmid_ds
- {
- struct __old_ipc_perm shm_perm; /* operation permission struct */
- int shm_segsz; /* size of segment in bytes */
- __time_t shm_atime; /* time of last shmat() */
- __time_t shm_dtime; /* time of last shmdt() */
- __time_t shm_ctime; /* time of last change by shmctl() */
- __ipc_pid_t shm_cpid; /* pid of creator */
- __ipc_pid_t shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
- unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__attaches; /* descriptors for attaches */
- };
-#endif
-
#ifdef __USE_MISC
/* ipcs ctl commands */
@@ -91,15 +74,6 @@ struct shminfo
unsigned long int __unused4;
};
-struct __old_shminfo
- {
- int shmmax;
- int shmmin;
- int shmmni;
- int shmseg;
- int shmall;
- };
-
struct shm_info
{
int used_ids;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2cb94409784535008f06007bd2b3c0c76b7242dc
commit 2cb94409784535008f06007bd2b3c0c76b7242dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:30:41 2000 +0000
Linux/Alpha private IPC definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/ipc_priv.h b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
new file mode 100644
index 0000000..cc69795
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ipc_priv.h
@@ -0,0 +1,54 @@
+/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/ipc.h>
+
+#define __IPC_64 0x100
+
+struct __old_ipc_perm
+{
+ __key_t __key; /* Key. */
+ unsigned int uid; /* Owner's user ID. */
+ unsigned int gid; /* Owner's group ID. */
+ unsigned int cuid; /* Creator's user ID. */
+ unsigned int cgid; /* Creator's group ID. */
+ unsigned int mode; /* Read/write permission. */
+ unsigned short int __seq; /* Sequence number. */
+};
+
+
+__BEGIN_DECLS
+
+/* The actual system call: all functions are multiplexed by this. */
+extern int __syscall_ipc (int __call, int __first, int __second,
+ int __third, void *__ptr);
+
+__END_DECLS
+
+/* The codes for the functions to use the multiplexer `__syscall_ipc'. */
+#define IPCOP_semop 1
+#define IPCOP_semget 2
+#define IPCOP_semctl 3
+#define IPCOP_msgsnd 11
+#define IPCOP_msgrcv 12
+#define IPCOP_msgget 13
+#define IPCOP_msgctl 14
+#define IPCOP_shmat 21
+#define IPCOP_shmdt 22
+#define IPCOP_shmget 23
+#define IPCOP_shmctl 24
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0b0bd9a5683a6a9fa89a30006734fd98acede32
commit d0b0bd9a5683a6a9fa89a30006734fd98acede32
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:27:13 2000 +0000
Move private decls into ../*_priv.h file.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 0196fe4..7ad2c7c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -51,39 +51,3 @@ struct ipc_perm
unsigned long int __unused1;
unsigned long int __unused2;
};
-
-#ifdef __LIBC_IPC_INTERNAL
-
-struct __old_ipc_perm
- {
- __key_t __key; /* Key. */
- unsigned int uid; /* Owner's user ID. */
- unsigned int gid; /* Owner's group ID. */
- unsigned int cuid; /* Creator's user ID. */
- unsigned int cgid; /* Creator's group ID. */
- unsigned int mode; /* Read/write permission. */
- unsigned short int __seq; /* Sequence number. */
- };
-
-__BEGIN_DECLS
-
-/* The actual system call: all functions are multiplexed by this. */
-extern int __ipc (int __call, int __first, int __second, int __third,
- void *__ptr);
-
-__END_DECLS
-
-/* The codes for the functions to use the multiplexer `__ipc'. */
-#define IPCOP_semop 1
-#define IPCOP_semget 2
-#define IPCOP_semctl 3
-#define IPCOP_msgsnd 11
-#define IPCOP_msgrcv 12
-#define IPCOP_msgget 13
-#define IPCOP_msgctl 14
-#define IPCOP_shmat 21
-#define IPCOP_shmdt 22
-#define IPCOP_shmget 23
-#define IPCOP_shmctl 24
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adcd6eb68b0d95533bea52544aeadf37e0cf5119
commit adcd6eb68b0d95533bea52544aeadf37e0cf5119
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:07:25 2000 +0000
Remove setrlimit64@GLIBC_2.1.3.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 39f209f..531817f 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -6,6 +6,6 @@ libc {
}
GLIBC_2.1.3 {
# New rlimit interface
- getrlimit; setrlimit; getrlimit64; setrlimit64;
+ getrlimit; setrlimit; getrlimit64;
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6bb1e664313c7864b22e16e9cc3b75bdcd381968
commit 6bb1e664313c7864b22e16e9cc3b75bdcd381968
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:06:59 2000 +0000
Remove oldsetrlimit64.c.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index b82a6ef..6040b20 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -10,5 +10,5 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
endif
ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64 oldsetrlimit64
+sysdep_routines += oldgetrlimit64
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4f75eec45c45e16dea9fd0e591a6ab0e92aebb7
commit b4f75eec45c45e16dea9fd0e591a6ab0e92aebb7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:06:14 2000 +0000
Linux/Arm specific resource handling definitions.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/resource.h b/sysdeps/unix/sysv/linux/arm/bits/resource.h
new file mode 100644
index 0000000..710f111
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/bits/resource.h
@@ -0,0 +1,205 @@
+/* Bit values & structures for resource limits. Linux version.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 7,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit. */
+ RLIMIT_AS = 9,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 6,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 8,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ RLIMIT_NLIMITS = 10,
+ RLIM_NLIMITS = RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((unsigned long int)(~0UL))
+#else
+# define RLIM_INFINITY 0xffffffffffffffffuLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffuLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9eaa6929206799a4ff8d364d0287866628320baf
commit 9eaa6929206799a4ff8d364d0287866628320baf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 12:05:37 2000 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c
deleted file mode 100644
index 93bdc37..0000000
--- a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit64.c b/sysdeps/unix/sysv/linux/arm/setrlimit64.c
deleted file mode 100644
index ed64b87..0000000
--- a/sysdeps/unix/sysv/linux/arm/setrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/setrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41aa6d836bafbdd4d6f8e12486f80bfee790f1b6
commit 41aa6d836bafbdd4d6f8e12486f80bfee790f1b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 24 01:44:35 2000 +0000
Correct check for ENOSYS.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 604bb76..904c564 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -19,6 +19,7 @@
#include <sysdep.h>
#define EINVAL 22
+#define ENOSYS 38
/* The mmap2 system call takes six arguments, all in registers. */
.text
@@ -38,7 +39,7 @@ ENTRY (__mmap64)
swi SYS_ify (mmap2)
cmn r0, $4096
LOADREGS(ccfd, sp!, {r4, r5, pc})
- teq r0, $-ENOSYS
+ cmn r0, $(ENOSYS - 1)
ldmnefd sp!, {r4, r5, lr}
bne PLTJMP(syscall_error)
/* The current kernel does not support mmap2. Fall back to plain
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ea605ff3491ea95864a7bb5220ffca46a8598e6
commit 7ea605ff3491ea95864a7bb5220ffca46a8598e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 23 08:53:21 2000 +0000
Add prototypes for port access functions.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index 0095714..d1f5ac3 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -64,6 +64,14 @@ extern int pciconfig_write (unsigned long int __bus,
unsigned long int __len,
unsigned char *__buf) __THROW;
+/* Userspace declarations. */
+extern unsigned int inb (unsigned long __port) __THROW;
+extern unsigned int inw (unsigned long __port) __THROW;
+extern unsigned int inl (unsigned long __port) __THROW;
+extern void outb (unsigned char __b, unsigned long __port) __THROW;
+extern void outw (unsigned short __w, unsigned long __port) __THROW;
+extern void outl (unsigned int __l, unsigned long __port) __THROW;
+
__END_DECLS
#endif /* _SYS_IO_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=358f8be2ed1785dea497a8a8e83d1cfc3333ad22
commit 358f8be2ed1785dea497a8a8e83d1cfc3333ad22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 23 08:52:50 2000 +0000
Add sys/io.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index b62a871..3265e0f 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -3,7 +3,7 @@ sysdep_routines += oldglob
endif
ifeq ($(subdir),misc)
-sysdep_headers += alpha/ptrace.h alpha/regdef.h
+sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
sethae ioperm osf_sigprocmask llseek adjtimex
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 79eff05..b82a6ef 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,6 +1,6 @@
ifeq ($(subdir),misc)
sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm
-sysdep_headers += sys/elf.h
+sysdep_headers += sys/elf.h sys/io.h
endif
ifeq ($(subdir),signal)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13990a22c1a9723d7c4add7b8cf9d7f70535b06c
commit 13990a22c1a9723d7c4add7b8cf9d7f70535b06c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:52:47 2000 +0000
iLinux/m68k implementation of xstat.
diff --git a/sysdeps/unix/sysv/linux/m68k/xstat.c b/sysdeps/unix/sysv/linux/m68k/xstat.c
new file mode 100644
index 0000000..e9869f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/xstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/xstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c2308629214e6b90545d457c06bade822d027d3
commit 8c2308629214e6b90545d457c06bade822d027d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:52:32 2000 +0000
Linux/m68k implementation of lxstat.
diff --git a/sysdeps/unix/sysv/linux/m68k/lxstat.c b/sysdeps/unix/sysv/linux/m68k/lxstat.c
new file mode 100644
index 0000000..2371cd9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/lxstat.c
@@ -0,0 +1,2 @@
+#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74a892eea9ef329293a5b707cb670cae33b30a51
commit 74a892eea9ef329293a5b707cb670cae33b30a51
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:52:16 2000 +0000
Linux/m68k implementation of fxstat.
diff --git a/sysdeps/unix/sysv/linux/m68k/fxstat.c b/sysdeps/unix/sysv/linux/m68k/fxstat.c
new file mode 100644
index 0000000..4f219f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6274fd0fe85fca2efb4127b896d75924ddee93cf
commit 6274fd0fe85fca2efb4127b896d75924ddee93cf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:51:57 2000 +0000
Linux/Arm implementation of xstat.
diff --git a/sysdeps/unix/sysv/linux/arm/xstat.c b/sysdeps/unix/sysv/linux/arm/xstat.c
new file mode 100644
index 0000000..e9869f5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/xstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/xstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8b3a62dba5b4799ee1e75b19c4506dbbcfaff22
commit f8b3a62dba5b4799ee1e75b19c4506dbbcfaff22
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:51:45 2000 +0000
Linux/Arm implementation of lxstat.
diff --git a/sysdeps/unix/sysv/linux/arm/lxstat.c b/sysdeps/unix/sysv/linux/arm/lxstat.c
new file mode 100644
index 0000000..2371cd9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/lxstat.c
@@ -0,0 +1,2 @@
+#include <sysdeps/unix/sysv/linux/i386/lxstat.c>
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7d91a2716c29b8378b3a1b1427e7cdacc4fbddd
commit f7d91a2716c29b8378b3a1b1427e7cdacc4fbddd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 19 03:51:30 2000 +0000
Linux/Arm implementation of fxstat.
diff --git a/sysdeps/unix/sysv/linux/arm/fxstat.c b/sysdeps/unix/sysv/linux/arm/fxstat.c
new file mode 100644
index 0000000..4f219f0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/fxstat.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fxstat.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=293c7e46e33936521c293c73900f6e0d1ed43bcc
commit 293c7e46e33936521c293c73900f6e0d1ed43bcc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 18 04:30:34 2000 +0000
(__syscall_chown): Use proper prototype.
Don't include non-existant header.
(__chown): Return EINVAL if owner or group are out of the range -1U .. 65534.
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
index c27da95..4e7625c 100644
--- a/sysdeps/unix/sysv/linux/m68k/chown.c
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,21 +24,28 @@
#include <linux/posix_types.h>
-#include <sysdeps/unix/sysv/linux/32bit_uid_compat.h>
-
extern int __syscall_chown (const char *__file,
- uid_t __owner, gid_t __group);
+ __kernel_uid_t __owner, __kernel_gid_t __group);
#ifdef __NR_chown32
extern int __syscall_chown32 (const char *__file,
__kernel_uid32_t owner, __kernel_gid32_t group);
+
+# if __ASSUME_32BITUIDS == 0
+/* This variable is shared with all files that need to check for 32bit
+ uids. */
+extern int __libc_missing_32bit_uids;
+# endif
#endif /* __NR_chown32 */
int
__chown (const char *file, uid_t owner, gid_t group)
{
-#ifdef __NR_chown32
- if (__libc_missing_32bit_uids != NO_HIGHUIDS)
+#if __ASSUME_32BITUIDS
+ return INLINE_SYSCALL (chown32, 3, file, owner, group);
+#else
+# ifdef __NR_chown32
+ if (!__libc_missing_32bit_uids)
{
int result;
int saved_errno = errno;
@@ -48,10 +55,18 @@ __chown (const char *file, uid_t owner, gid_t group)
return result;
__set_errno (saved_errno);
- __libc_missing_32bit_uids = NO_HIGHUIDS;
+ __libc_missing_32bit_uids = 1;
+ }
+# endif /* __NR_chown32 */
+
+ if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+ {
+ __set_errno (EINVAL);
+ return -1;
}
-#endif /* __NR_chown32 */
return INLINE_SYSCALL (chown, 3, file, owner, group);
+#endif
}
weak_alias (__chown, chown)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7b22345a14e914076e461c5114525d7b8f3b344
commit a7b22345a14e914076e461c5114525d7b8f3b344
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 18 04:27:20 2000 +0000
Linux/Alpha SysV shm definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
new file mode 100644
index 0000000..4e29764
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -0,0 +1,113 @@
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
+
+#include <sys/types.h>
+
+/* Permission flag for shmget. */
+#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
+#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+
+/* Flags for `shmat'. */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+
+/* Commands for `shmctl'. */
+#define SHM_LOCK 11 /* lock segment (root only) */
+#define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+
+/* Data structure describing a set of semaphores. */
+struct shmid_ds
+ {
+ struct ipc_perm shm_perm; /* operation permission struct */
+ size_t shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ pid_t shm_cpid; /* pid of creator */
+ pid_t shm_lpid; /* pid of last shmop */
+ unsigned long int shm_nattch; /* number of current attaches */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ };
+
+#ifdef __LIBC_IPC_INTERNAL
+struct __old_shmid_ds
+ {
+ struct __old_ipc_perm shm_perm; /* operation permission struct */
+ int shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ __ipc_pid_t shm_cpid; /* pid of creator */
+ __ipc_pid_t shm_lpid; /* pid of last shmop */
+ unsigned short int shm_nattch; /* number of current attaches */
+ unsigned short int __shm_npages; /* size of segment (pages) */
+ unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__attaches; /* descriptors for attaches */
+ };
+#endif
+
+#ifdef __USE_MISC
+
+/* ipcs ctl commands */
+# define SHM_STAT 13
+# define SHM_INFO 14
+
+/* shm_mode upper byte flags */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
+
+struct shminfo
+ {
+ unsigned long int shmmax;
+ unsigned long int shmmin;
+ unsigned long int shmmni;
+ unsigned long int shmseg;
+ unsigned long int shmall;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ };
+
+struct __old_shminfo
+ {
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+ };
+
+struct shm_info
+ {
+ int used_ids;
+ unsigned long int shm_tot; /* total allocated shm */
+ unsigned long int shm_rss; /* total resident shm */
+ unsigned long int shm_swp; /* total swapped shm */
+ unsigned long int swap_attempts;
+ unsigned long int swap_successes;
+ };
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db706c12f591d6ded0ec1d5b5776515a2a63000a
commit db706c12f591d6ded0ec1d5b5776515a2a63000a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 18 04:27:12 2000 +0000
Linux/Alpha SysV sem definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sem.h b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
new file mode 100644
index 0000000..19a3aa5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sem.h
@@ -0,0 +1,99 @@
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
+#endif
+
+#include <sys/types.h>
+
+/* Flags for `semop'. */
+#define SEM_UNDO 0x1000 /* undo the operation on exit */
+
+/* Commands for `semctl'. */
+#define GETPID 11 /* get sempid */
+#define GETVAL 12 /* get semval */
+#define GETALL 13 /* get all semval's */
+#define GETNCNT 14 /* get semncnt */
+#define GETZCNT 15 /* get semzcnt */
+#define SETVAL 16 /* set semval */
+#define SETALL 17 /* set all semval's */
+
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ unsigned long int sem_nsems; /* number of semaphores in set */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+#ifdef __LIBC_IPC_INTERNAL
+struct __old_semid_ds
+{
+ struct __old_ipc_perm sem_perm; /* operation permission struct */
+ __time_t sem_otime; /* last semop() time */
+ __time_t sem_ctime; /* last time changed by semctl() */
+ struct sem *__sembase; /* ptr to first semaphore in array */
+ struct sem_queue *__sem_pending; /* pending operations */
+ struct sem_queue *__sem_pending_last; /* last pending operation */
+ struct sem_undo *__undo; /* ondo requests on this array */
+ unsigned short int sem_nsems; /* number of semaphores in set */
+};
+#endif
+
+/* The user should define a union like the following to use it for arguments
+ for `semctl'.
+
+ union semun
+ {
+ int val; <= value for SETVAL
+ struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET
+ unsigned short int *array; <= array for GETALL & SETALL
+ struct seminfo *__buf; <= buffer for IPC_INFO
+ };
+
+ Previous versions of this file used to define this union but this is
+ incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether
+ one must define the union or not. */
+#define _SEM_SEMUN_UNDEFINED 1
+
+#ifdef __USE_MISC
+
+/* ipcs ctl cmds */
+# define SEM_STAT 18
+# define SEM_INFO 19
+
+struct seminfo
+{
+ int semmap;
+ int semmni;
+ int semmns;
+ int semmnu;
+ int semmsl;
+ int semopm;
+ int semume;
+ int semusz;
+ int semvmx;
+ int semaem;
+};
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05bd55b91020658a71920762ca0063245f8c3fdf
commit 05bd55b91020658a71920762ca0063245f8c3fdf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 18 04:27:05 2000 +0000
Linux/Alpha SysV msq definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/msq.h b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
new file mode 100644
index 0000000..a8d4cc6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/msq.h
@@ -0,0 +1,87 @@
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <sys/types.h>
+
+/* Define options for message queue functions. */
+#define MSG_NOERROR 010000 /* no error if message is too big */
+#define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgrcv command */
+ __time_t msg_ctime; /* time of last change */
+ unsigned long int __msg_cbytes; /* current number of bytes on queue */
+ unsigned long int msg_qnum; /* number of messages currently on queue */
+ unsigned long int msg_qbytes; /* max number of bytes allowed on queue */
+ pid_t msg_lspid; /* pid of last msgsnd() */
+ pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __unused1;
+ unsigned long int __unused2;
+};
+
+#ifdef __LIBC_IPC_INTERNAL
+struct __old_msqid_ds
+{
+ struct __old_ipc_perm msg_perm; /* structure describing operation permission */
+ struct msg *__msg_first; /* pointer to first message on queue */
+ struct msg *__msg_last; /* pointer to last message on queue */
+ __time_t msg_stime; /* time of last msgsnd command */
+ __time_t msg_rtime; /* time of last msgrcv command */
+ __time_t msg_ctime; /* time of last change */
+ struct wait_queue *__wwait; /* ??? */
+ struct wait_queue *__rwait; /* ??? */
+ unsigned short int __msg_cbytes; /* current number of bytes on queue */
+ unsigned short int msg_qnum; /* number of messages currently on queue */
+ unsigned short int msg_qbytes; /* max number of bytes allowed on queue */
+ __ipc_pid_t msg_lspid; /* pid of last msgsnd() */
+ __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */
+};
+#endif
+
+#ifdef __USE_MISC
+
+# define msg_cbytes __msg_cbytes
+
+/* ipcs ctl commands */
+# define MSG_STAT 11
+# define MSG_INFO 12
+
+/* buffer for msgctl calls IPC_INFO, MSG_INFO */
+struct msginfo
+ {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short int msgseg;
+ };
+
+#endif /* __USE_MISC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab944a2185910ef71ba9c2a0356616e732946fa7
commit ab944a2185910ef71ba9c2a0356616e732946fa7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 18 04:26:49 2000 +0000
Update for new ipc.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 804e1ee..0196fe4 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,15 +47,29 @@ struct ipc_perm
unsigned int cgid; /* Creator's group ID. */
unsigned int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
+ unsigned short int __pad1;
+ unsigned long int __unused1;
+ unsigned long int __unused2;
};
+#ifdef __LIBC_IPC_INTERNAL
+struct __old_ipc_perm
+ {
+ __key_t __key; /* Key. */
+ unsigned int uid; /* Owner's user ID. */
+ unsigned int gid; /* Owner's group ID. */
+ unsigned int cuid; /* Creator's user ID. */
+ unsigned int cgid; /* Creator's group ID. */
+ unsigned int mode; /* Read/write permission. */
+ unsigned short int __seq; /* Sequence number. */
+ };
__BEGIN_DECLS
/* The actual system call: all functions are multiplexed by this. */
-extern int __ipc __P ((int __call, int __first, int __second, int __third,
- void *__ptr));
+extern int __ipc (int __call, int __first, int __second, int __third,
+ void *__ptr);
__END_DECLS
@@ -71,3 +85,5 @@ __END_DECLS
#define IPCOP_shmdt 22
#define IPCOP_shmget 23
#define IPCOP_shmctl 24
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1219d5bc53112de6bc5712a7b02f8de40040aca3
commit 1219d5bc53112de6bc5712a7b02f8de40040aca3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:20:35 2000 +0000
Linux/i386 implementation of lchown.
diff --git a/sysdeps/unix/sysv/linux/m68k/lchown.c b/sysdeps/unix/sysv/linux/m68k/lchown.c
new file mode 100644
index 0000000..c89de99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/lchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b1aa399d1f2104e2570571ca382dab7c11b3727
commit 4b1aa399d1f2104e2570571ca382dab7c11b3727
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:20:27 2000 +0000
Linux/i386 implementation of getgid.
diff --git a/sysdeps/unix/sysv/linux/m68k/getgid.c b/sysdeps/unix/sysv/linux/m68k/getgid.c
new file mode 100644
index 0000000..0a4d606
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=881cf30824f051b1539492c5a472afd76beea0f7
commit 881cf30824f051b1539492c5a472afd76beea0f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:20:20 2000 +0000
Linux/i386 implementation of getuid.
diff --git a/sysdeps/unix/sysv/linux/m68k/getuid.c b/sysdeps/unix/sysv/linux/m68k/getuid.c
new file mode 100644
index 0000000..d682c79
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1e3521362cb51077043eed3d27b02c63a3cb838
commit b1e3521362cb51077043eed3d27b02c63a3cb838
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:20:10 2000 +0000
Linux/i386 implementation of geteuid.
diff --git a/sysdeps/unix/sysv/linux/m68k/geteuid.c b/sysdeps/unix/sysv/linux/m68k/geteuid.c
new file mode 100644
index 0000000..ebcb555
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/geteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26bb8c8c1b7de6f4bf895d5fff6bcd867ffaca1e
commit 26bb8c8c1b7de6f4bf895d5fff6bcd867ffaca1e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:20:03 2000 +0000
Linux/i386 implementation of getegid.
diff --git a/sysdeps/unix/sysv/linux/m68k/getegid.c b/sysdeps/unix/sysv/linux/m68k/getegid.c
new file mode 100644
index 0000000..37b4b4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getegid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76862c6dd7bb42e502afcc70b7f8edef3504e3ff
commit 76862c6dd7bb42e502afcc70b7f8edef3504e3ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:19:51 2000 +0000
Linux/i386 implementation of fchown.
diff --git a/sysdeps/unix/sysv/linux/m68k/fchown.c b/sysdeps/unix/sysv/linux/m68k/fchown.c
new file mode 100644
index 0000000..3a69ecc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ab12c1eebfc802b607990883e1247a1c2f6f6f0
commit 6ab12c1eebfc802b607990883e1247a1c2f6f6f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:19:42 2000 +0000
Linux/i386 implementation of chown.
diff --git a/sysdeps/unix/sysv/linux/m68k/chown.c b/sysdeps/unix/sysv/linux/m68k/chown.c
new file mode 100644
index 0000000..c27da95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/chown.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <linux/posix_types.h>
+
+#include <sysdeps/unix/sysv/linux/32bit_uid_compat.h>
+
+extern int __syscall_chown (const char *__file,
+ uid_t __owner, gid_t __group);
+
+#ifdef __NR_chown32
+extern int __syscall_chown32 (const char *__file,
+ __kernel_uid32_t owner, __kernel_gid32_t group);
+#endif /* __NR_chown32 */
+
+int
+__chown (const char *file, uid_t owner, gid_t group)
+{
+#ifdef __NR_chown32
+ if (__libc_missing_32bit_uids != NO_HIGHUIDS)
+ {
+ int result;
+ int saved_errno = errno;
+
+ result = INLINE_SYSCALL (chown32, 3, file, owner, group);
+ if (result == 0 || errno != ENOSYS)
+ return result;
+
+ __set_errno (saved_errno);
+ __libc_missing_32bit_uids = NO_HIGHUIDS;
+ }
+#endif /* __NR_chown32 */
+
+ return INLINE_SYSCALL (chown, 3, file, owner, group);
+}
+weak_alias (__chown, chown)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab25616f31e12ebe826a3473500ef8529d2a1736
commit ab25616f31e12ebe826a3473500ef8529d2a1736
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:18:30 2000 +0000
Linux/Arm implementation of lchown.
diff --git a/sysdeps/unix/sysv/linux/arm/lchown.c b/sysdeps/unix/sysv/linux/arm/lchown.c
new file mode 100644
index 0000000..c89de99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/lchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95c95a5696e7773ada82f80de8711639a8e7276e
commit 95c95a5696e7773ada82f80de8711639a8e7276e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:18:15 2000 +0000
Linux/Arm implementation of getuid.
diff --git a/sysdeps/unix/sysv/linux/arm/getuid.c b/sysdeps/unix/sysv/linux/arm/getuid.c
new file mode 100644
index 0000000..d682c79
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20b74d454698ed7fcd18d18eeeec4eef44e27657
commit 20b74d454698ed7fcd18d18eeeec4eef44e27657
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:18:08 2000 +0000
Linux/Arm implementation of getgid.
diff --git a/sysdeps/unix/sysv/linux/arm/getgid.c b/sysdeps/unix/sysv/linux/arm/getgid.c
new file mode 100644
index 0000000..0a4d606
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00f523c53465b34c0b9b765ddc35b737b3f1fbc8
commit 00f523c53465b34c0b9b765ddc35b737b3f1fbc8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:18:01 2000 +0000
Linux/Arm implementation of getegid.
diff --git a/sysdeps/unix/sysv/linux/arm/getegid.c b/sysdeps/unix/sysv/linux/arm/getegid.c
new file mode 100644
index 0000000..37b4b4a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getegid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20eb495ca66266328c15a0d26a191a2aa99c3057
commit 20eb495ca66266328c15a0d26a191a2aa99c3057
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:17:53 2000 +0000
Linux/Arm implementation of geteuid.
diff --git a/sysdeps/unix/sysv/linux/arm/geteuid.c b/sysdeps/unix/sysv/linux/arm/geteuid.c
new file mode 100644
index 0000000..ebcb555
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/geteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/geteuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5daabcd7a5e34fe635dcce7a8994e19fa289239c
commit 5daabcd7a5e34fe635dcce7a8994e19fa289239c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:17:42 2000 +0000
Linux/Arm implementation of fchown.
diff --git a/sysdeps/unix/sysv/linux/arm/fchown.c b/sysdeps/unix/sysv/linux/arm/fchown.c
new file mode 100644
index 0000000..3a69ecc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/fchown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fchown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df4969c4212eaecabcd5053a6a93c5f40a7484dc
commit df4969c4212eaecabcd5053a6a93c5f40a7484dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 17 05:17:33 2000 +0000
Linux/Arm implementation of chown.
diff --git a/sysdeps/unix/sysv/linux/arm/chown.c b/sysdeps/unix/sysv/linux/arm/chown.c
new file mode 100644
index 0000000..1961622
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/chown.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/m68k/chown.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41955e53253253fa3c3c21b5d86fe8017b5be9dc
commit 41955e53253253fa3c3c21b5d86fe8017b5be9dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:24:30 2000 +0000
Linux/Arm specific compatibility getrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c
new file mode 100644
index 0000000..4c27e95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/oldgetrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/oldgetrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b0b5c11789b357756836854edbd1f3bdbf7c66b
commit 9b0b5c11789b357756836854edbd1f3bdbf7c66b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:24:10 2000 +0000
Linux/Arm specific setrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c
new file mode 100644
index 0000000..93bdc37
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/oldsetrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/oldsetrlimit64.c>
diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit64.c b/sysdeps/unix/sysv/linux/arm/setrlimit64.c
new file mode 100644
index 0000000..ed64b87
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7857dde8f38ad54f624138973435fbed820c7aca
commit 7857dde8f38ad54f624138973435fbed820c7aca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:23:51 2000 +0000
Linux/Arm specific getrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit64.c b/sysdeps/unix/sysv/linux/arm/getrlimit64.c
new file mode 100644
index 0000000..fef018f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getrlimit64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee122dfb5cfd2fcab67ee1e68f64e24092aba8b0
commit ee122dfb5cfd2fcab67ee1e68f64e24092aba8b0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:23:41 2000 +0000
Linux/Arm specific getrlimit implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/getrlimit.c b/sysdeps/unix/sysv/linux/arm/getrlimit.c
new file mode 100644
index 0000000..fc06dbd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b97b0e6d544851cc96473e1702352edb8ec4616f
commit b97b0e6d544851cc96473e1702352edb8ec4616f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:23:30 2000 +0000
Linux/Arm specific setrlimit implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/setrlimit.c b/sysdeps/unix/sysv/linux/arm/setrlimit.c
new file mode 100644
index 0000000..bfaef74
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setrlimit.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setrlimit.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7b89e455b5c1177adf443ab37a895a16612a9d9
commit b7b89e455b5c1177adf443ab37a895a16612a9d9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:22:08 2000 +0000
Add getrlimit, setrlimit, getrlimit64, setrlimit64 for GLIBC_2.1.3.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 3a412cc..39f209f 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -4,4 +4,8 @@ libc {
inb; inw; inl;
outb; outw; outl;
}
+ GLIBC_2.1.3 {
+ # New rlimit interface
+ getrlimit; setrlimit; getrlimit64; setrlimit64;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13e885e2d20716e76f1a9c81108a0cf8141c970f
commit 13e885e2d20716e76f1a9c81108a0cf8141c970f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:21:53 2000 +0000
Add oldgetrlimit, oldsetrlimit.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 60303d3..53da8bb 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -12,3 +12,5 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 7 syscall
+oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0
+oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4d6b8eb3953483dfe899295661e41d6d13f833a
commit a4d6b8eb3953483dfe899295661e41d6d13f833a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 12 10:21:37 2000 +0000
[subdir=resource] (sysdep_routines): Add oldgetrlimit64, oldsetrlimit64.
[subdir=misc] (sysdep_headers): Add sys/elf.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 99a560c..79eff05 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,5 +1,6 @@
ifeq ($(subdir),misc)
sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm
+sysdep_headers += sys/elf.h
endif
ifeq ($(subdir),signal)
@@ -7,3 +8,7 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
+
+ifeq ($(subdir),resource)
+sysdep_routines += oldgetrlimit64 oldsetrlimit64
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6959849dcf5c8fab650e95b917b4bf9eb35a0761
commit 6959849dcf5c8fab650e95b917b4bf9eb35a0761
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jan 11 18:08:15 2000 +0000
2000-01-11 Andreas Schwab <schwab@suse.de>
* sysdeps/mips/__longjmp.c (__longjmp): Change call to abort into
infinite loop to avoid pulling in stdio in the dynamic linker.
* sysdeps/mips/mips64/__longjmp.c (__longjmp): Likewise.
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index 551daa4..28fef47 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -81,5 +81,6 @@ __longjmp (env, val_arg)
asm volatile ("j $31");
- abort ();
+ /* Avoid `volatile function does return' warnings. */
+ for (;;);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f81825597154caf652683efff52ae2bc3eb71b20
commit f81825597154caf652683efff52ae2bc3eb71b20
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Jan 11 17:12:43 2000 +0000
2000-01-11 Andreas Schwab <schwab@suse.de>
* sysdeps/mips/__longjmp.c (__longjmp): Change call to abort into
infinite loop to avoid pulling in stdio in the dynamic linker.
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 9b4c1e1..e9ef5cf 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -79,5 +79,6 @@ __longjmp (env, val_arg)
asm volatile ("j $31");
- abort ();
+ /* Avoid `volatile function does return' warnings. */
+ for (;;);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be57c15a96c8c563f9cc8353bce14eec78a8128d
commit be57c15a96c8c563f9cc8353bce14eec78a8128d
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jan 10 17:34:40 2000 +0000
2000-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_matches_host): Follow
change from 1999-10-07 to elf/elf.h and rename EM_MIPS_RS4_BE to
EM_MIPS_RS3_LE.
* sysdeps/mips/mips64/dl-machine.h: Likewise.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 7761100..f7a1a6d 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -84,7 +84,7 @@ elf_machine_matches_host (ElfW(Half) e_machine)
switch (e_machine)
{
case EM_MIPS:
- case EM_MIPS_RS4_BE:
+ case EM_MIPS_RS3_LE:
return 1;
default:
return 0;
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 3dc97eb..fe4667a 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -84,7 +84,7 @@ elf_machine_matches_host (ElfW(Half) e_machine)
switch (e_machine)
{
case EM_MIPS:
- case EM_MIPS_RS4_BE:
+ case EM_MIPS_RS3_LE:
return 1;
default:
return 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94e6a9a2e0e8d92852a7ef383b81b79eac544366
commit 94e6a9a2e0e8d92852a7ef383b81b79eac544366
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jan 10 14:27:50 2000 +0000
2000-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Remove greg_t,
gregset_t, fpregset_t, and NGREG definitions.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 7e17bc0..414e60e 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,10 +40,6 @@ struct elf_siginfo
int si_errno; /* Errno. */
};
-typedef elf_greg_t greg_t;
-typedef elf_gregset_t gregset_t;
-typedef elf_fpregset_t fpregset_t;
-#define NGREG ELF_NGREG
/* Definitions to generate Intel SVR4-like core files. These mostly
have the same names as the SVR4 types with "elf_" tacked on the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e61a4b7b9dc71869c315c19e8aed80c2ec731b9
commit 7e61a4b7b9dc71869c315c19e8aed80c2ec731b9
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jan 10 12:33:45 2000 +0000
2000-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/Implies: Add wordsize-32.
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 8c18cb3..9f60963 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,3 +1,4 @@
+wordsize-32
# MIPS uses IEEE 754 floating point.
ieee754/flt-32
ieee754/dbl-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93b2a8e75197568ac47fc92c2f104c255cbf2415
commit 93b2a8e75197568ac47fc92c2f104c255cbf2415
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Jan 10 11:44:24 2000 +0000
2000-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h: Add missing
int's.
* sysdeps/unix/sysv/linux/mips/sys/acct.h: Remove K&R support, add
missing int's.
* sysdeps/unix/sysv/linux/mips/bits/errno.h: Remove K&R support.
* sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index 7782c0b..c45829a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. MIPS/Linux specific version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
extern int errno;
/* Function to get address of global `errno' variable. */
-extern int *__errno_location __P ((void)) __attribute__ ((__const__));
+extern int *__errno_location (void) __THROW __attribute__ ((__const__));
# if defined _LIBC
/* We wouldn't need a special macro anymore but it is history. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
index 7959570..573f9e7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,19 +26,19 @@
struct winsize
{
- unsigned short ws_row;
- unsigned short ws_col;
- unsigned short ws_xpixel;
- unsigned short ws_ypixel;
+ unsigned short int ws_row;
+ unsigned short int ws_col;
+ unsigned short int ws_xpixel;
+ unsigned short int ws_ypixel;
};
#define NCC 8
struct termio
{
- unsigned short c_iflag; /* input mode flags */
- unsigned short c_oflag; /* output mode flags */
- unsigned short c_cflag; /* control mode flags */
- unsigned short c_lflag; /* local mode flags */
+ unsigned short int c_iflag; /* input mode flags */
+ unsigned short int c_oflag; /* output mode flags */
+ unsigned short int c_cflag; /* control mode flags */
+ unsigned short int c_lflag; /* local mode flags */
char c_line; /* line discipline */
/* Yes, this is really NCCS. */
unsigned char c_cc[32 /* NCCS */]; /* control characters */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 5c36d99..3c2e527 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,8 +53,8 @@ struct ipc_perm
__BEGIN_DECLS
/* The actual system call: all functions are multiplexed by this. */
-extern int __ipc __P ((int __call, int __first, int __second, int __third,
- void *__ptr));
+extern int __ipc (int __call, int __first, int __second, int __third,
+ void *__ptr) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 963b425..04179d2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/MIPS's sigaction.
- Copyright (C) 1993, 94, 95, 97, 98, 99 Free Software Foundation, Inc.
+ Copyright (C) 1993,94,95,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,7 +34,7 @@ struct sigaction
/* Used if SA_SIGINFO is not set. */
__sighandler_t sa_handler;
/* Used if SA_SIGINFO is set. */
- void (*sa_sigaction) __PMT ((int, siginfo_t *, void *));
+ void (*sa_sigaction) (int, siginfo_t *, void *);
}
__sigaction_handler;
# define sa_handler __sigaction_handler.sa_handler
@@ -47,7 +47,7 @@ struct sigaction
/* The ABI says here are two unused ints following. */
/* Restore handler. */
- void (*sa_restorer) __PMT ((void));
+ void (*sa_restorer) (void);
#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2
int sa_resv[1];
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index d141869..9d348ac 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Linux version.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -258,8 +258,8 @@ typedef struct sigevent
struct
{
- void (*_function) __PMT ((sigval_t)); /* Function to start. */
- void *_attribute; /* Really pthread_attr_t. */
+ void (*_function) (sigval_t); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 74f54e8..747b119 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -203,13 +203,13 @@ enum
`sendmsg' and received by `recvmsg'. */
struct msghdr
{
- __ptr_t msg_name; /* Address to send to/receive from. */
+ void *msg_name; /* Address to send to/receive from. */
socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
size_t msg_iovlen; /* Number of elements in the vector. */
- __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
size_t msg_controllen; /* Ancillary data buffer length. */
int msg_flags; /* Flags on received message. */
@@ -244,8 +244,8 @@ struct cmsghdr
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
- struct cmsghdr *__cmsg));
+extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
# define _EXTERN_INLINE extern __inline
diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h
index ee596db..a17153c 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/acct.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/acct.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,8 +36,8 @@ struct acct
time_t ac_stime; /* Accounting system time. */
time_t ac_etime; /* Accounting elapsed time. */
time_t ac_btime; /* Beginning time. */
- long ac_uid; /* Accounting user ID. */
- long ac_gid; /* Accounting group ID. */
+ long int ac_uid; /* Accounting user ID. */
+ long int ac_gid; /* Accounting group ID. */
unsigned long int ac_tty; /* Controlling tty. */
/* Please note that the value of the `ac_tty' field, a device number,
is encoded differently in the kernel and for the libc dev_t type. */
@@ -59,7 +59,7 @@ enum
/* Switch process accounting on and off. */
-extern int acct __P ((__const char *__filename));
+extern int acct (__const char *__filename) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
index 740c24d..3bbd47c 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,13 +29,13 @@
__BEGIN_DECLS
#ifdef __USE_MISC
-extern int cachectl __P ((void *addr, __const int nbytes, __const int op));
+extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
#endif
-extern int __cachectl __P ((void *addr, __const int nbytes, __const int op));
+extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
#ifdef __USE_MISC
-extern int cacheflush __P ((void *addr, __const int nbytes, __const int op));
+extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
#endif
-extern int _flush_cache __P ((char *addr, __const int nbytes, __const int op));
+extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
index cbb7eba..8afb149 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,8 +28,8 @@
__BEGIN_DECLS
-extern int sysmips __P ((__const int cmd, __const int arg1,
- __const int arg2, __const int arg3));
+extern int sysmips (__const int cmd, __const int arg1,
+ __const int arg2, __const int arg3) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13270773aced41152dae31fa481b877817c9b452
commit 13270773aced41152dae31fa481b877817c9b452
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 10 01:43:13 2000 +0000
(UNDOARGS_5): Fix error in last change.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index cd83389..c337af2 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 95-99, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -109,7 +109,7 @@
#define UNDOARGS_2 /* nothing */
#define UNDOARGS_3 /* nothing */
#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 ldr r4, [sp, $4]!;
+#define UNDOARGS_5 ldr r4, [sp], $4;
#define UNDOARGS_6 ldmfd sp!, {r4, r5};
#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b1eef96d27c9b204feb6af835259962bc53c934
commit 9b1eef96d27c9b204feb6af835259962bc53c934
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 10 01:42:43 2000 +0000
(CLEAR_CACHE): System calls clobber R0.
(dl_platform_init): Allow _dl_platform to be NULL.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index ef5584f..78341fc 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -37,7 +37,10 @@
register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \
register unsigned long _end __asm ("a2") = (unsigned long)(END); \
register unsigned long _flg __asm ("a3") = 0; \
- __asm __volatile ("swi 0x9f0002"); \
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
+ : /* no outputs */ \
+ : /* no inputs */ \
+ : "a1"); \
}
/* Return nonzero iff E_MACHINE is compatible with the running host. */
@@ -350,10 +353,9 @@ extern const char *_dl_platform;
static inline void __attribute__ ((unused))
dl_platform_init (void)
{
- if (_dl_platform == NULL)
- /* We default to ARM
- This is where processors could be distinguished arm2, arm6, sa110, etc */
- _dl_platform = "ARM";
+ if (_dl_platform != NULL && *_dl_platform == '\0')
+ /* Avoid an empty string which would disturb us. */
+ _dl_platform = NULL;
}
static inline void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a7c1b605a8bbdfdcd698333154b25975963b2b5
commit 9a7c1b605a8bbdfdcd698333154b25975963b2b5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 6 04:34:45 2000 +0000
Distribute sys/elf.h and sys/procfs.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 28e8642..73fd68e 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -7,5 +7,7 @@ setfsuid.c
setfsgid.c
sigrestorer.S
bits/armsigctx.h
+sys/elf.h
sys/io.h
+sys/procfs.h
sys/user.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84232695106b134d39ca3a24ced6541bd2046f28
commit 84232695106b134d39ca3a24ced6541bd2046f28
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 6 00:07:38 2000 +0000
Add `fault_address'.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
index 3435a96..636a93b 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
@@ -1,5 +1,5 @@
/* Definition of `struct sigcontext' for Linux/ARM
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,12 @@
Fortunately 2.0 puts a magic number in the first word and this is not
a legal value for `trap_no', so we can tell them apart. */
+/* Early 2.2 and 2.3 kernels do not have the `fault_address' member in
+ the sigcontext structure. Unfortunately there is no reliable way
+ to test for its presence and this word will contain garbage for too-old
+ kernels. Versions 2.2.14 and 2.3.35 (plus later versions) are known to
+ include this element. */
+
#ifndef __ARMSIGCTX_H
#define __ARMSIGCTX_H 1
@@ -50,6 +56,7 @@ union k_sigcontext
unsigned long int arm_lr;
unsigned long int arm_pc;
unsigned long int arm_cpsr;
+ unsigned long fault_address;
} v21;
struct
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c545e4b420889924b6942465be70821b64b3813
commit 2c545e4b420889924b6942465be70821b64b3813
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 6 00:04:04 2000 +0000
(ADVANCE_STACK_FRAME): New macro.
(GET_FRAME): Apply above to returned value.
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index 7f6ecbd..1aaca1e 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -24,7 +24,10 @@
#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
-#define GET_FRAME(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+#define GET_FRAME(ctx) \
+ ADVANCE_STACK_FRAME((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_fp : ctx.v21.arm_fp))
#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
+#define ADVANCE_STACK_FRAME(frm) \
+ ((struct layout *)frm - 1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a60ba9f602b91aa3eea871a3f31403c96634c8a8
commit a60ba9f602b91aa3eea871a3f31403c96634c8a8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 6 00:02:54 2000 +0000
Arm specific stack layout description.
diff --git a/sysdeps/arm/frame.h b/sysdeps/arm/frame.h
new file mode 100644
index 0000000..16f329c
--- /dev/null
+++ b/sysdeps/arm/frame.h
@@ -0,0 +1,26 @@
+/* Definition of stack frame structure. ARM/APCS version.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This is the APCS stack backtrace structure. */
+struct layout
+{
+ struct layout *next;
+ void *sp;
+ void *return_address;
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aba7548814035d328cfbd9b59d3981b6620dbe6f
commit aba7548814035d328cfbd9b59d3981b6620dbe6f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 4 23:54:35 2000 +0000
Use sysctl by preference to obtain port mapping information. Avoid use of
mprotect.
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 260226d..f4c9322 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -27,6 +27,12 @@
registers tend to be memory mapped these days so this should be no big
problem. */
+/* Once upon a time this file used mprotect to enable and disable
+ access to particular areas of I/O space. Unfortunately the
+ mprotect syscall also has the side effect of enabling caching for
+ the area affected (this is a kernel limitation). So we now just
+ enable all the ports all of the time. */
+
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -39,6 +45,7 @@
#include <sys/mman.h>
#include <asm/page.h>
+#include <sys/sysctl.h>
#define PATH_ARM_SYSTYPE "/etc/arm_systype"
#define PATH_CPUINFO "/proc/cpuinfo"
@@ -69,16 +76,22 @@ static struct platform {
#define IO_ADDR(port) (io.base + ((port) << io.shift))
/*
- * Initialize I/O system. To determine what I/O system we're dealing
- * with, we first try to read the value of symlink PATH_ARM_SYSTYPE,
- * if that fails, we lookup the "system type" field in /proc/cpuinfo.
- * If that fails as well, we give up. Other possible options might be
- * to look at the ELF auxiliary vector or to add a special system call
- * but there is probably no point.
+ * Initialize I/O system. There are several ways to get the information
+ * we need. Each is tried in turn until one succeeds.
+ *
+ * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
+ * but not all kernels support it.
+ *
+ * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
+ * - If it matches one of the entries in the table above, use the
+ * corresponding values.
+ * - If it begins with a number, assume this is a previously
+ * unsupported system and the values encode, in order,
+ * "<io_base>,<port_shift>".
*
- * If the value received from PATH_ARM_SYSTYPE begins with a number,
- * assume this is a previously unsupported system and the values encode,
- * in order, "<io_base>,<port_shift>".
+ * 3. Lookup the "system type" field in /proc/cpuinfo. Again, if it
+ * matches an entry in the platform[] table, use the corresponding
+ * values.
*/
static int
@@ -86,6 +99,16 @@ init_iosys (void)
{
char systype[256];
int i, n;
+ static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
+ static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
+ size_t len = sizeof(io.base);
+
+ if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+ && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
+ {
+ io.initdone = 1;
+ return 0;
+ }
n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
if (n > 0)
@@ -106,7 +129,7 @@ init_iosys (void)
FILE * fp;
fp = fopen (PATH_CPUINFO, "r");
- if (!fp)
+ if (! fp)
return -1;
while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype))
!= EOF)
@@ -149,10 +172,7 @@ init_iosys (void)
int
_ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
- unsigned long int addr, len;
- int prot;
-
- if (!io.initdone && init_iosys () < 0)
+ if (! io.initdone && init_iosys () < 0)
return -1;
/* this test isn't as silly as it may look like; consider overflows! */
@@ -173,25 +193,16 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
return -1;
io.base =
- (unsigned long int) __mmap (0, MAX_PORT << io.shift, PROT_NONE,
+ (unsigned long int) __mmap (0, MAX_PORT << io.shift,
+ PROT_READ | PROT_WRITE,
MAP_SHARED, fd, io.io_base);
close (fd);
if ((long) io.base == -1)
return -1;
}
- prot = PROT_READ | PROT_WRITE;
}
- else
- {
- if (!io.base)
- return 0; /* never was turned on... */
- /* turnoff access to relevant pages: */
- prot = PROT_NONE;
- }
- addr = (io.base + (from << io.shift)) & PAGE_MASK;
- len = num << io.shift;
- return mprotect ((void *) addr, len, prot);
+ return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51fa0bed7611384d56f512311e1e0d1776ee159d
commit 51fa0bed7611384d56f512311e1e0d1776ee159d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 3 23:21:18 2000 +0000
Linux/Arm mmap64 implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
new file mode 100644
index 0000000..604bb76
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/mmap64.S
@@ -0,0 +1,66 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+#define EINVAL 22
+
+ /* The mmap2 system call takes six arguments, all in registers. */
+ .text
+ENTRY (__mmap64)
+#ifdef __NR_mmap2
+ stmfd sp!, {r4, r5, lr}
+ ldr r5, [sp, $16]
+ ldr r4, [sp, $12]
+ movs ip, r5, lsl $20 @ check that offset is page-aligned
+ bne .Linval
+ ldr ip, [sp, $20]
+ mov r5, r5, lsr $12
+ orr r5, r5, ip, lsl $20 @ compose page offset
+ movs ip, ip, lsr $12
+ bne .Linval @ check for overflow
+ mov ip, r0
+ swi SYS_ify (mmap2)
+ cmn r0, $4096
+ LOADREGS(ccfd, sp!, {r4, r5, pc})
+ teq r0, $-ENOSYS
+ ldmnefd sp!, {r4, r5, lr}
+ bne PLTJMP(syscall_error)
+ /* The current kernel does not support mmap2. Fall back to plain
+ mmap if the offset is small enough. */
+ ldr r5, [sp, $20]
+ mov r0, ip @ first arg was clobbered
+ teq r5, $0
+ ldmeqfd sp!, {r4, r5, lr}
+ beq PLTJMP(__mmap)
+.Linval:
+ mov r0, $-EINVAL
+ ldmfd sp!, {r4, r5, lr}
+ b PLTJMP(syscall_error)
+#else
+ /* The kernel headers do not support mmap2. Fall back to plain
+ mmap if the offset is small enough. */
+ ldr ip, [sp, $8]
+ teq ip, $0
+ beq PLTJMP(__mmap)
+ mov r0, $-EINVAL
+ b PLTJMP(syscall_error)
+#endif
+PSEUDO_END (__mmap64)
+
+weak_alias (__mmap64, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51e2a98075328233f0b513749bd4ac9feed9d262
commit 51e2a98075328233f0b513749bd4ac9feed9d262
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 3 23:20:42 2000 +0000
Remove mmap64 alias.
Optimise error handling a little.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index fcff57c..31d57e4 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,12 +23,12 @@
ENTRY (__mmap)
/* Because we can only get five args through the syscall interface, and
- mmap() takes six, we need to build a parameter block and pass its
+ mmap() takes six, we need to build a parameter block and pass its
address instead. The 386 port does a similar trick. */
/* This code previously moved sp into ip and stored the args using
- stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
- to be restored after the syscall completed. It saved an
+ stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+ to be restored after the syscall completed. It saved an
instruction and meant no stack cleanup work was required.
This will not work in the case of a mmap call being interrupted
@@ -47,10 +47,9 @@ ENTRY (__mmap)
add sp, sp, #16
cmn r0, $4096
- bhs PLTJMP(syscall_error);
- ret
+ RETINSTR(movcc, pc, lr)
+ b PLTJMP(syscall_error);
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
-weak_alias (__mmap, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7aacf7acd57ca48404697e6e23c9107f7cd7fe04
commit 7aacf7acd57ca48404697e6e23c9107f7cd7fe04
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 3 16:58:49 2000 +0000
(_HAVE_STRING_ARCH_mempcpy): Define.
diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h
index 4ca2e30..094f901 100644
--- a/sysdeps/arm/bits/string.h
+++ b/sysdeps/arm/bits/string.h
@@ -1,5 +1,5 @@
/* Optimized, inlined string functions. ARM version.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,10 @@
#endif
/* We must defeat the generic optimized versions of these functions in
- <bits/string2.h> since they don't work on the ARM. */
+ <bits/string2.h> since they don't work on the ARM. This is because
+ the games they play with the __STRING2_COPY_ARR# structures fail
+ when structs are always 32-bit aligned.
+ XXX Should provide suitably optimal replacements. */
#define _HAVE_STRING_ARCH_strcpy 1
#define _HAVE_STRING_ARCH_stpcpy 1
+#define _HAVE_STRING_ARCH_mempcpy 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f549254adeb5b63dcaeb008a6f5d0bc5faacf4f6
commit f549254adeb5b63dcaeb008a6f5d0bc5faacf4f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 3 03:50:21 2000 +0000
Definitions for math on Arm.
diff --git a/sysdeps/arm/fpu/bits/mathdef.h b/sysdeps/arm/fpu/bits/mathdef.h
new file mode 100644
index 0000000..cb0c348
--- /dev/null
+++ b/sysdeps/arm/fpu/bits/mathdef.h
@@ -0,0 +1,54 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
+/* GCC does not promote `float' values to `double'. */
+typedef float float_t; /* `float' expressions are evaluated as
+ `float'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+/* Signal that types stay as they were declared. */
+# define FLT_EVAL_METHOD 0
+
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
+
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 0x80000001
+# define FP_ILOGBNAN 0x7fffffff
+
+/* Number of decimal digits for the `double' type. */
+# define DECIMAL_DIG 15
+
+#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. This disables the
+ declaration of all the `long double' function variants. */
+/* XXX The FPA does support this but the patterns in GCC are currently
+ turned off. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ddd4d0151d4f64229cb384ba7a4eed79042e000e
commit ddd4d0151d4f64229cb384ba7a4eed79042e000e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 29 17:50:45 1999 +0000
Remove K&R compatibility, add missing ints.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h
index 9f9eebc..96d54cd 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/io.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/io.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,22 +26,22 @@ __BEGIN_DECLS
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
permission off for that range. This call requires root privileges. */
-extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
- int __turn_on));
+extern int ioperm (unsigned long int __from, unsigned long int __num,
+ int __turn_on) __THROW;
/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
permission to access any I/O port is granted. This call requires
root privileges. */
-extern int iopl __P ((int __level));
+extern int iopl (int __level) __THROW;
/* The functions that actually perform reads and writes. */
-extern unsigned char inb (unsigned long port);
-extern unsigned short inw (unsigned long port);
-extern unsigned long inl (unsigned long port);
+extern unsigned char inb (unsigned long int port) __THROW;
+extern unsigned short int inw (unsigned long int port) __THROW;
+extern unsigned long int inl (unsigned long int port) __THROW;
-extern void outb (unsigned char value, unsigned long port);
-extern void outw (unsigned short value, unsigned long port);
-extern void outl (unsigned long value, unsigned long port);
+extern void outb (unsigned char value, unsigned long int port) __THROW;
+extern void outw (unsigned short value, unsigned long int port) __THROW;
+extern void outl (unsigned long value, unsigned long int port) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27cd2cbea62bf56d085b622ba9dc5192af1a33b8
commit 27cd2cbea62bf56d085b622ba9dc5192af1a33b8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 29 17:50:32 1999 +0000
Don't include <asm/io.h>; remove K&R compatibility; add missing ints.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index 208e793..0095714 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,6 @@
__BEGIN_DECLS
-/* Get constants from kernel header files. */
-#include <asm/io.h>
-
/* If TURN_ON is TRUE, request for permission to do direct i/o on the
port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
permission off for that range. This call requires root privileges.
@@ -33,39 +30,39 @@ __BEGIN_DECLS
Portability note: not all Linux platforms support this call. Most
platforms based on the PC I/O architecture probably will, however.
E.g., Linux/Alpha for Alpha PCs supports this. */
-extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
- int __turn_on));
+extern int ioperm (unsigned long int __from, unsigned long int __num,
+ int __turn_on) __THROW;
/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
access any I/O port is granted. This call requires root
privileges. */
-extern int iopl __P ((int __level));
+extern int iopl (int __level) __THROW;
/* Return the physical address of the DENSE I/O memory or NULL if none
is available (e.g. on a jensen). */
-extern unsigned long _bus_base __P ((void)) __attribute__ ((const));
-extern unsigned long bus_base __P ((void)) __attribute__ ((const));
+extern unsigned long int _bus_base (void) __THROW __attribute__ ((const));
+extern unsigned long int bus_base (void) __THROW __attribute__ ((const));
/* Return the physical address of the SPARSE I/O memory. */
-extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const));
-extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const));
+extern unsigned long _bus_base_sparse (void) __THROW __attribute__ ((const));
+extern unsigned long bus_base_sparse (void) __THROW __attribute__ ((const));
/* Return the HAE shift used by the SPARSE I/O memory. */
-extern int _hae_shift __P ((void)) __attribute__ ((const));
-extern int hae_shift __P ((void)) __attribute__ ((const));
+extern int _hae_shift (void) __THROW __attribute__ ((const));
+extern int hae_shift (void) __THROW __attribute__ ((const));
/* Access PCI space protected from machine checks. */
-extern int pciconfig_read __P ((unsigned long int __bus,
- unsigned long int __dfn,
- unsigned long int __off,
- unsigned long int __len,
- unsigned char *__buf));
-
-extern int pciconfig_write __P ((unsigned long int __bus,
- unsigned long int __dfn,
- unsigned long int __off,
- unsigned long int __len,
- unsigned char *__buf));
+extern int pciconfig_read (unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf) __THROW;
+
+extern int pciconfig_write (unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf) __THROW;
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33ea3bcec3467989cc254b91aa52fbddab38871e
commit 33ea3bcec3467989cc254b91aa52fbddab38871e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 28 22:13:37 1999 +0000
Remove oldgetrlimit and oldsetrlimit definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 03030b6..8a86c7c 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -29,8 +29,6 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
-oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 getrlimit64@GLIBC_2.1
-oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 setrlimit64@GLIBC_2.1
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1be564e03ef9628ab0ef55d766ffea81a9d781be
commit 1be564e03ef9628ab0ef55d766ffea81a9d781be
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 27 06:11:17 1999 +0000
Remove inclusion of <asm/resource.h>.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
index feb9cc7..613b6bc 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -21,7 +21,6 @@
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
#endif
-#include <asm/resource.h>
#include <bits/types.h>
/* Transmute defines to enumerations. The macro re-definitions are
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62749187ae455591bafd92a1f7e0deb46d210a2c
commit 62749187ae455591bafd92a1f7e0deb46d210a2c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 27 06:06:32 1999 +0000
Add support for syscalls with more than five arguments.
(DOARGS_5, UNDOARGS_5): Don't corrupt the calling stack frame.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 7812e99..cd83389 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -69,6 +69,8 @@
arg 3 r2
arg 4 r3
arg 5 r4 (this is different from the APCS convention)
+ arg 6 r5
+ arg 7 r6
The compiler is going to form a call by coming here, through PSEUDO, with
arguments
@@ -78,9 +80,12 @@
arg 3 r2
arg 4 r3
arg 5 [sp]
+ arg 6 [sp+4]
+ arg 7 [sp+8]
- We need to shuffle values between R4 and the stack so that the caller's
- R4 is not corrupted, and the kernel sees the right argument there.
+ We need to shuffle values between R4..R6 and the stack so that the
+ caller's v1..v3 and stack frame are not corrupted, and the kernel
+ sees the right arguments.
*/
@@ -95,14 +100,18 @@
#define DOARGS_2 /* nothing */
#define DOARGS_3 /* nothing */
#define DOARGS_4 /* nothing */
-#define DOARGS_5 ldr ip, [sp]; str r4, [sp]; mov r4, ip;
+#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4];
+#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5};
+#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6};
#define UNDOARGS_0 /* nothing */
#define UNDOARGS_1 /* nothing */
#define UNDOARGS_2 /* nothing */
#define UNDOARGS_3 /* nothing */
#define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 ldr r4, [sp];
+#define UNDOARGS_5 ldr r4, [sp, $4]!;
+#define UNDOARGS_6 ldmfd sp!, {r4, r5};
+#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
#else /* not __ASSEMBLER__ */
@@ -149,6 +158,14 @@
register int _v1 asm ("v1") = (int) (a5); \
LOAD_ARGS_4 (a1, a2, a3, a4)
#define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1)
+#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
+ register int _v2 asm ("v2") = (int) (a6); \
+ LOAD_ARGS_5 (a1, a2, a3, a4, a5)
+#define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2)
+#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \
+ register int _v3 asm ("v3") = (int) (a7); \
+ LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)
+#define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0985e3b7171992a69253f956673de72bffe0ab9b
commit 0985e3b7171992a69253f956673de72bffe0ab9b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 27 06:06:11 1999 +0000
Remove vm86. Set argument count for `syscall' to 7.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 08839db..60303d3 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -11,5 +11,4 @@ s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
-syscall - syscall 5 syscall
-vm86 - vm86 1 __vm86 vm86
+syscall - syscall 7 syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=feaa2cd82b6e7d8c2811ac2529c0e3f6cb4e1ffb
commit feaa2cd82b6e7d8c2811ac2529c0e3f6cb4e1ffb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 24 05:47:47 1999 +0000
Add __libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite and
__libc_pwrite64.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 49f2b11..03030b6 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -22,9 +22,9 @@ vfork - vfork 0 __vfork vfork
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64
-pread - pread 4 __pread pread __pread64 pread64
-pwrite - pwrite 4 __pwrite pwrite __pwrite64 pwrite64
+llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
+pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2dfdce515ff6a01bc88f623caf19989ba918dde8
commit 2dfdce515ff6a01bc88f623caf19989ba918dde8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 17:50:04 1999 +0000
(CLEAR_CACHE): Fix a2 value.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index de2d0ba..ef5584f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -35,7 +35,7 @@
#define CLEAR_CACHE(BEG,END) \
{ \
register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \
- register unsigned long _end __asm ("a2") = (unsigned long)((END) - (BEG));\
+ register unsigned long _end __asm ("a2") = (unsigned long)(END); \
register unsigned long _flg __asm ("a3") = 0; \
__asm __volatile ("swi 0x9f0002"); \
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=936d4afc98f9f1017085a7001b43f60ae795fef2
commit 936d4afc98f9f1017085a7001b43f60ae795fef2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 16:01:52 1999 +0000
Add missing #.
diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c
index 329cb80..3a1fa08 100644
--- a/sysdeps/unix/sysv/linux/m68k/getmsg.c
+++ b/sysdeps/unix/sysv/linux/m68k/getmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/getmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/getmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c
index 5b1b755..bb65f81 100644
--- a/sysdeps/unix/sysv/linux/m68k/getpmsg.c
+++ b/sysdeps/unix/sysv/linux/m68k/getpmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c
index c744bf2..ebc1680 100644
--- a/sysdeps/unix/sysv/linux/m68k/putmsg.c
+++ b/sysdeps/unix/sysv/linux/m68k/putmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/putmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/putmsg.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c
index 8744136..fbfa598 100644
--- a/sysdeps/unix/sysv/linux/m68k/putpmsg.c
+++ b/sysdeps/unix/sysv/linux/m68k/putpmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/sysdeps/unix/sysv/linux/mips/getmsg.c
index 329cb80..3a1fa08 100644
--- a/sysdeps/unix/sysv/linux/mips/getmsg.c
+++ b/sysdeps/unix/sysv/linux/mips/getmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/getmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/getmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c
index 5b1b755..bb65f81 100644
--- a/sysdeps/unix/sysv/linux/mips/getpmsg.c
+++ b/sysdeps/unix/sysv/linux/mips/getpmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/sysdeps/unix/sysv/linux/mips/putmsg.c
index c744bf2..ebc1680 100644
--- a/sysdeps/unix/sysv/linux/mips/putmsg.c
+++ b/sysdeps/unix/sysv/linux/mips/putmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/putmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/putmsg.c>
diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c
index 8744136..fbfa598 100644
--- a/sysdeps/unix/sysv/linux/mips/putpmsg.c
+++ b/sysdeps/unix/sysv/linux/mips/putpmsg.c
@@ -1 +1 @@
-include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
+#include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ffe8fc1f1a07edba14fd0a37cfd71227edfe174d
commit ffe8fc1f1a07edba14fd0a37cfd71227edfe174d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 08:00:02 1999 +0000
Linux/MIPS specific implementation of putpmsg.
diff --git a/sysdeps/unix/sysv/linux/mips/putpmsg.c b/sysdeps/unix/sysv/linux/mips/putpmsg.c
new file mode 100644
index 0000000..8744136
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/putpmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f57d4a939485258450c2538e9d3c793ebea84abd
commit f57d4a939485258450c2538e9d3c793ebea84abd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:55 1999 +0000
Linux/MIPS specific implementation of putmsg.
diff --git a/sysdeps/unix/sysv/linux/mips/putmsg.c b/sysdeps/unix/sysv/linux/mips/putmsg.c
new file mode 100644
index 0000000..c744bf2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/putmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/putmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=764681b7a4bad811fa850b6b600cca79aa394f49
commit 764681b7a4bad811fa850b6b600cca79aa394f49
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:47 1999 +0000
Linux/MIPS specific implementation of getpmsg.
diff --git a/sysdeps/unix/sysv/linux/mips/getpmsg.c b/sysdeps/unix/sysv/linux/mips/getpmsg.c
new file mode 100644
index 0000000..5b1b755
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getpmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a4102025713bbacf357bbbf126ac19dd7e43193
commit 8a4102025713bbacf357bbbf126ac19dd7e43193
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:30 1999 +0000
Linux/MIPS specific implementation of getmsg.
diff --git a/sysdeps/unix/sysv/linux/mips/getmsg.c b/sysdeps/unix/sysv/linux/mips/getmsg.c
new file mode 100644
index 0000000..329cb80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/getmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/getmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a851d4d062cc2369e018d4b429b191b17780606c
commit a851d4d062cc2369e018d4b429b191b17780606c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:20 1999 +0000
Linux/m68k specific implementation of putpmsg.
diff --git a/sysdeps/unix/sysv/linux/m68k/putpmsg.c b/sysdeps/unix/sysv/linux/m68k/putpmsg.c
new file mode 100644
index 0000000..8744136
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/putpmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/putpmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20113dce1513a489299238c16ba37bdceebe8d2f
commit 20113dce1513a489299238c16ba37bdceebe8d2f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:12 1999 +0000
Linux/m68k specific implementation of putmsg.
diff --git a/sysdeps/unix/sysv/linux/m68k/putmsg.c b/sysdeps/unix/sysv/linux/m68k/putmsg.c
new file mode 100644
index 0000000..c744bf2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/putmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/putmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ea9edf1970812b064146de2138b2548ba0271b4
commit 4ea9edf1970812b064146de2138b2548ba0271b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:59:04 1999 +0000
Linux/m68k specific implementation of getpmsg.
diff --git a/sysdeps/unix/sysv/linux/m68k/getpmsg.c b/sysdeps/unix/sysv/linux/m68k/getpmsg.c
new file mode 100644
index 0000000..5b1b755
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getpmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/getpmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b6a54e39c1f3a52a8296db034a7c2d3ee430b6f
commit 7b6a54e39c1f3a52a8296db034a7c2d3ee430b6f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 21 07:58:57 1999 +0000
Linux/m68k specific implementation of getmsg.
diff --git a/sysdeps/unix/sysv/linux/m68k/getmsg.c b/sysdeps/unix/sysv/linux/m68k/getmsg.c
new file mode 100644
index 0000000..329cb80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getmsg.c
@@ -0,0 +1 @@
+include <sysdeps/unix/sysv/linux/i386/getmsg.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2b066ffc29f72ec3e1cfc8f6ee24459fff4dd1d
commit b2b066ffc29f72ec3e1cfc8f6ee24459fff4dd1d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 19 00:02:12 1999 +0000
Linux/MIPS specific definitions for resource.h.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/resource.h b/sysdeps/unix/sysv/linux/mips/bits/resource.h
new file mode 100644
index 0000000..feb9cc7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/resource.h
@@ -0,0 +1,205 @@
+/* Bit values & structures for resource limits. MIPS/Linux version.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <asm/resource.h>
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 7,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 5,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit (?) */
+ RLIMIT_AS = 6,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ RLIM_NLIMITS = 10
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+#else
+# define RLIM_INFINITY 0x7fffffffffffffffLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b555e31b89dd6efdd29daae0cfc19367e854bdfc
commit b555e31b89dd6efdd29daae0cfc19367e854bdfc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 19 00:02:03 1999 +0000
Linux/Alpha specific definitions for resource.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/resource.h b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
new file mode 100644
index 0000000..c89f5a0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/resource.h
@@ -0,0 +1,204 @@
+/* Bit values & structures for resource limits. Alpha/Linux version.
+ Copyright (C) 1994, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS = 5,
+#define RLIMIT_RSS RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 6,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ /* Address space limit (?) */
+ RLIMIT_AS = 7,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+
+ RLIM_NLIMITS = 10
+#define RLIMIT_NLIMITS RLIMIT_NLIMITS
+#define RLIM_NLIMITS RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+#else
+# define RLIM_INFINITY 0x7fffffffffffffffLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1,
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+ /* Both. */
+ RUSAGE_BOTH = -2
+#define RUSAGE_BOTH RUSAGE_BOTH
+};
+
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d1306dd216960a60dfb951c1385bf05b7a20512
commit 9d1306dd216960a60dfb951c1385bf05b7a20512
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 18 23:40:50 1999 +0000
(CLEAR_CACHE): New macro to force a cache flush.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 2e6faf5..de2d0ba 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -32,6 +32,14 @@
&& VALID_ELF_OSABI (hdr[EI_OSABI]) \
&& VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
+#define CLEAR_CACHE(BEG,END) \
+{ \
+ register unsigned long _beg __asm ("a1") = (unsigned long)(BEG); \
+ register unsigned long _end __asm ("a2") = (unsigned long)((END) - (BEG));\
+ register unsigned long _flg __asm ("a3") = 0; \
+ __asm __volatile ("swi 0x9f0002"); \
+}
+
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int __attribute__ ((unused))
elf_machine_matches_host (Elf32_Half e_machine)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=baa41915ea44a3de3ac8e0f1daa316a38da98be7
commit baa41915ea44a3de3ac8e0f1daa316a38da98be7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 18 19:39:28 1999 +0000
Not neeeded.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c
deleted file mode 100644
index 9feab0e..0000000
--- a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
diff --git a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c
deleted file mode 100644
index 8edcff0..0000000
--- a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d1adc87341959961558bf25129547466f28f417
commit 6d1adc87341959961558bf25129547466f28f417
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 18 19:36:39 1999 +0000
Protect definitions for math.h against double inclusion.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index f5d5de8..30f93dd 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -23,7 +23,9 @@
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
-#if defined __USE_ISOC99 && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
# ifdef __GNUC__
# if __STDC__ == 1
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 2f650ec..c80dad3 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -20,7 +20,9 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC99 && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
/* The m68k FPUs evaluate all values in the 96 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1af493c6b3bcaaaa4c24a5a3b6e5592c33fc69d
commit d1af493c6b3bcaaaa4c24a5a3b6e5592c33fc69d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 8 07:35:32 1999 +0000
(elf_machine_rel): Fixup R_ARM_PC24 relocs if possible.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 25e2f06..2e6faf5 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -443,6 +443,23 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
*reloc_addr += value;
break;
}
+ case R_ARM_PC24:
+ {
+ signed int addend;
+
+ addend = *reloc_addr & 0x00ffffff;
+ if (addend & 0x00800000) addend |= 0xff000000;
+
+ value = value - (unsigned int)reloc_addr + (addend << 2);
+ if (value & 0xfc000003)
+ _dl_signal_error (0, map->l_name,
+ "R_ARM_PC24 relocation out of range");
+
+ value = value >> 2;
+ value = (*reloc_addr & 0xff000000) | (value & 0x00ffffff);
+ *reloc_addr = value;
+ }
+ break;
default:
_dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e22a3eb7947347b9d7aacd14c72edd7983677781
commit e22a3eb7947347b9d7aacd14c72edd7983677781
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 4 07:40:43 1999 +0000
(__t_scalar_t, __t_uscalar_t): Make long types.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index d55fee3..8a79621 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -117,8 +117,8 @@ typedef struct
} __fd_set;
/* Used in XTI. */
-typedef int __t_scalar_t;
-typedef unsigned int __t_uscalar_t;
+typedef long int __t_scalar_t;
+typedef unsigned long int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef long int __intptr_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index a52bb80..48a9bf0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -143,8 +143,8 @@ typedef __u_long __ino64_t;
typedef __loff_t __off64_t;
/* Used in XTI. */
-typedef int __t_scalar_t;
-typedef unsigned int __t_uscalar_t;
+typedef long int __t_scalar_t;
+typedef unsigned long int __t_uscalar_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
typedef int __intptr_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43f0382c7263573658c772e9c26048c944f08981
commit 43f0382c7263573658c772e9c26048c944f08981
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 2 08:19:07 1999 +0000
Fix signedness of __rlim_t and __rlim64_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index d98ed8a..d55fee3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -57,8 +57,8 @@ typedef __int64_t __off64_t; /* "" (LFS) */
typedef __int64_t __loff_t; /* Type of file sizes and offsets. */
typedef __int32_t __pid_t; /* Type of process identifications. */
typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
-typedef __int64_t __rlim_t; /* Type of resource counts. */
-typedef __int64_t __rlim64_t; /* "" (LFS) */
+typedef __uint64_t __rlim_t; /* Type of resource counts. */
+typedef __uint64_t __rlim64_t; /* "" (LFS) */
typedef __uint32_t __blksize_t; /* Type to represnet block size. */
typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 37c3f21..a52bb80 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -68,8 +68,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */
typedef int __ssize_t; /* Type of a byte count, or error. */
-typedef long int __rlim_t; /* Type of resource counts. */
-typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */
+typedef __u_long __rlim_t; /* Type of resource counts. */
+typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */
typedef __u_int __id_t; /* General type for ID. */
typedef struct
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0318789f260d29a8641bb64bb9a26145702e809
commit c0318789f260d29a8641bb64bb9a26145702e809
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 2 08:18:33 1999 +0000
Add oldsetrlimit and oldgetrlimit.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index ba20cd0..49f2b11 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -29,6 +29,8 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
+oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 getrlimit64@GLIBC_2.1
+oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 setrlimit64@GLIBC_2.1
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecb0bc529997f5be510b65908a5ad5ad7e364d9e
commit ecb0bc529997f5be510b65908a5ad5ad7e364d9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 2 08:18:16 1999 +0000
Backwared compatible Linux/Alpha setrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c
new file mode 100644
index 0000000..8edcff0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/oldsetrlimit64.c
@@ -0,0 +1 @@
+/* setrlimit64 is the same as setrlimit. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fce334577e78cb053eb06e08ffa2736be013dd80
commit fce334577e78cb053eb06e08ffa2736be013dd80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 2 08:18:09 1999 +0000
Backwared compatible Linux/Alpha getrlimit64 implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c
new file mode 100644
index 0000000..9feab0e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/oldgetrlimit64.c
@@ -0,0 +1 @@
+/* getrlimit64 is the same as getrlimit. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2463e15d19e3387f7cb9844f517bff3f419add9
commit d2463e15d19e3387f7cb9844f517bff3f419add9
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Nov 29 17:50:55 1999 +0000
* sysdeps/m68k/bits/byteswap.h (__bswap_32): Rename local variable
__v to __bswap_32_v.
(__bswap_64): Rename local variables __v and __r to __bswap_64_v
and __bswap_64_r to avoid clash with __bswap_32 macro.
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index 41bbe59..e828fc6 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -34,17 +34,17 @@
#if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_32(x) \
- __extension__ \
- ({ unsigned int __v; \
- if (__builtin_constant_p (x)) \
- __v = __bswap_constant_32 (x); \
- else \
- __asm__ __volatile__ ("ror%.w %#8, %0;" \
- "swap %0;" \
- "ror%.w %#8, %0" \
- : "=d" (__v) \
- : "0" (x)); \
- __v; })
+ __extension__ \
+ ({ unsigned int __bswap_32_v; \
+ if (__builtin_constant_p (x)) \
+ __bswap_32_v = __bswap_constant_32 (x); \
+ else \
+ __asm__ __volatile__ ("ror%.w %#8, %0;" \
+ "swap %0;" \
+ "ror%.w %#8, %0" \
+ : "=d" (__bswap_32_v) \
+ : "0" (x)); \
+ __bswap_32_v; })
#else
# define __bswap_32(x) __bswap_constant_32 (x)
#endif
@@ -52,11 +52,11 @@
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
# define __bswap_64(x) \
- __extension__ \
- ({ union { unsigned long long int __ll; \
- unsigned long int __l[2]; } __v, __r; \
- __v.__ll = (x); \
- __r.__l[0] = __bswap_32 (__v.__l[1]); \
- __r.__l[1] = __bswap_32 (__v.__l[0]); \
- __r.__ll; })
+ __extension__ \
+ ({ union { unsigned long long int __ll; \
+ unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \
+ __bswap_64_v.__ll = (x); \
+ __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \
+ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \
+ __bswap_64_r.__ll; })
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4b123a3a8a350d31d2a371283bf986f5b9ec83a
commit f4b123a3a8a350d31d2a371283bf986f5b9ec83a
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Nov 23 16:10:26 1999 +0000
(elf_machine_dynamic): New function.
(elf_machine_got): Removed, not needed anymore.
(ELF_MACHINE_RELOC_NOPLT): Removed.
(ELF_MACHINE_JMP_SLOT): Added.
(_RTLD_PROLOGUE): We use gcc, no need to check for __STDC__.
(_RTLD_EPILOGUE): Likewise.
(RESOLVE_GOTSYM): Use R_MIPS_REL32.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index f200fcd..3dc97eb 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -32,25 +32,19 @@
#endif
#ifndef _RTLD_PROLOGUE
-#ifdef __STDC__
-#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
+# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
"\n\t.ent " #entry \
"\n\t" #entry ":\n\t"
-#else
-#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t"
-#endif
#endif
#ifndef _RTLD_EPILOGUE
-#ifdef __STDC__
-#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
-#else
-#define _RTLD_EPILOGUE(entry) "\t.end entry\n"
-#endif
+# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
#endif
-/* I have no idea what I am doing. */
-#define ELF_MACHINE_RELOC_NOPLT -1
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
+ This makes no sense on MIPS but we have to define this to R_MIPS_REL32
+ to avoid the asserts in dl-lookup.c from blowing. */
+#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
#define elf_machine_lookup_noplt_p(type) (1)
#define elf_machine_lookup_noexec_p(type) (0)
@@ -104,15 +98,15 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline ElfW(Addr) *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
{
- ElfW(Addr) gp;
+ register ElfW(Addr) gp __asm__ ("$28");
- __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp));
- return elf_mips_got_from_gpreg (gp);
+ return *elf_mips_got_from_gpreg (gp);
}
@@ -151,7 +145,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) sym_loadaddr; \
sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
map->l_scope, \
- map->l_name, ELF_MACHINE_RELOC_NOPLT);\
+ map->l_name, R_MIPS_REL32);\
(ref)? sym_loadaddr + ref->st_value: 0; \
})
@@ -360,7 +354,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
\
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
l->l_scope, l->l_name, \
- ELF_MACHINE_RELOC_NOPLT); \
+ R_MIPS_REL32); \
\
/* Apply the relocation with that value. */ \
funcaddr = loadbase + definer->st_value; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=119fab9878aaf5a657b7295d73b838156ff6a27e
commit 119fab9878aaf5a657b7295d73b838156ff6a27e
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Nov 23 15:57:26 1999 +0000
Fix typo in applying last patch.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index d8b892b..7761100 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -105,7 +105,7 @@ static inline ElfW(Addr)
elf_machine_dynamic (void)
{
register ElfW(Addr) gp __asm__ ("$28");
- return elf_mips_got_from_gpreg (gp);
+ return *elf_mips_got_from_gpreg (gp);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58f68573b9c703d3ad9a29e5582e5d891d942c37
commit 58f68573b9c703d3ad9a29e5582e5d891d942c37
Author: Andreas Jaeger <aj@suse.de>
Date: Tue Nov 23 15:49:22 1999 +0000
* sysdeps/mips/dl-machine.h (elf_machine_dynamic): New function.
(elf_machine_got): Removed, not needed anymore.
(ELF_MACHINE_RELOC_NOPLT): Removed.
(ELF_MACHINE_JMP_SLOT): Added.
(_RTLD_PROLOGUE): We use gcc, no need to check for __STDC__.
(_RTLD_EPILOGUE): Likewise.
(RESOLVE_GOTSYM): Use R_MIPS_REL32.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
Based on patches from Maciej W. Rozycki <macro@ds2.pg.gda.pl> and
Ralf Baechle <baechle@uni-koblenz.de>.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 5811b78..d8b892b 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -32,25 +32,19 @@
#endif
#ifndef _RTLD_PROLOGUE
-#ifdef __STDC__
-#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
- "\n\t.ent " #entry \
- "\n\t" #entry ":\n\t"
-#else
-#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t"
-#endif
+# define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
+ "\n\t.ent " #entry \
+ "\n\t" #entry ":\n\t"
#endif
#ifndef _RTLD_EPILOGUE
-#ifdef __STDC__
-#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
-#else
-#define _RTLD_EPILOGUE(entry) "\t.end entry\n"
-#endif
+# define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
#endif
-/* I have no idea what I am doing. */
-#define ELF_MACHINE_RELOC_NOPLT -1
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries.
+ This makes no sense on MIPS but we have to define this to R_MIPS_REL32
+ to avoid the asserts in dl-lookup.c from blowing. */
+#define ELF_MACHINE_JMP_SLOT R_MIPS_REL32
#define elf_machine_lookup_noplt_p(type) (1)
#define elf_machine_lookup_noexec_p(type) (0)
@@ -104,14 +98,13 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline ElfW(Addr) *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
{
- ElfW(Addr) gp;
-
- __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp));
+ register ElfW(Addr) gp __asm__ ("$28");
return elf_mips_got_from_gpreg (gp);
}
@@ -151,7 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) sym_loadaddr; \
sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
map->l_scope, \
- map->l_name, ELF_MACHINE_RELOC_NOPLT);\
+ map->l_name, R_MIPS_REL32);\
(ref)? sym_loadaddr + ref->st_value: 0; \
})
@@ -361,7 +354,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
\
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
l->l_scope, l->l_name, \
- ELF_MACHINE_RELOC_NOPLT); \
+ R_MIPS_REL32); \
\
/* Apply the relocation with that value. */ \
funcaddr = loadbase + definer->st_value; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccae44c2e643a8d4a553af30853b41b3e44bcb71
commit ccae44c2e643a8d4a553af30853b41b3e44bcb71
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 22 16:35:07 1999 +0000
Include <sys/types.h> to get key_t.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index fb989cc..5c36d99 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -20,7 +20,7 @@
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
-#include <bits/types.h>
+#include <sys/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b5f51e74971b7f93aef02ded83515e73821b36d
commit 1b5f51e74971b7f93aef02ded83515e73821b36d
Author: Andreas Jaeger <aj@suse.de>
Date: Mon Nov 22 16:34:19 1999 +0000
Add __syscall_setrlimit.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 0939cda..5ddba9b 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -64,6 +64,7 @@ s_pread64 pread64 pread 6 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
+s_setrlimit setrlimit setrlimit 3 __syscall_setrlimit
s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
# Todo: we can pass 6 args in registers, no need for the wrapper
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=264ce3b03b710f6c4cf58c8a365d2a9e7f45adfd
commit 264ce3b03b710f6c4cf58c8a365d2a9e7f45adfd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 18 00:11:49 1999 +0000
Remove greg_t, gregset_t, fpregset_t, and NGREG definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index 87f8e4c..a9ae104 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -40,11 +40,6 @@ struct elf_siginfo
int si_errno; /* Errno. */
};
-typedef elf_greg_t greg_t;
-typedef elf_gregset_t gregset_t;
-typedef elf_fpregset_t fpregset_t;
-#define NGREG ELF_NGREG
-
/* Definitions to generate Intel SVR4-like core files. These mostly
have the same names as the SVR4 types with "elf_" tacked on the
front to prevent clashes with linux definitions, and the typedef
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2fe71afa2e364a3df6a92d8bbb6ed0036e78c13
commit f2fe71afa2e364a3df6a92d8bbb6ed0036e78c13
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 15 08:00:07 1999 +0000
Remove duplicate definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index f47adee..87f8e4c 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -111,17 +111,6 @@ typedef fpregset_t prfpregset_t;
therefore habe only ine PID type. */
typedef __pid_t lwpid_t;
-/* Addresses. */
-typedef void *psaddr_t;
-
-/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
- therefore habe only ine PID type. */
-typedef __pid_t lwpid_t;
-
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
index a228179..5198033 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -101,17 +101,6 @@ typedef fpregset_t prfpregset_t;
therefore habe only ine PID type. */
typedef __pid_t lwpid_t;
-/* Addresses. */
-typedef void *psaddr_t;
-
-/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
- therefore habe only ine PID type. */
-typedef __pid_t lwpid_t;
-
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 9c6bac9..7e17bc0 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -100,17 +100,6 @@ struct elf_prpsinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
-/* Addresses. */
-typedef void *psaddr_t;
-
-/* Register sets. Linux has different names. */
-typedef gregset_t prgregset_t;
-typedef fpregset_t prfpregset_t;
-
-/* We don't have any differences between processes and threads,
- therefore habe only ine PID type. */
-typedef __pid_t lwpid_t;
-
/* Addresses. */
typedef void *psaddr_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e70a8a3757353f39f02947e7d607316fa44fd82
commit 1e70a8a3757353f39f02947e7d607316fa44fd82
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 12 21:27:08 1999 +0000
Follow changes from i386 version.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index 428563b..f47adee 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -17,17 +17,17 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_PROCFS_H
-
#define _SYS_PROCFS_H 1
-#include <features.h>
/* This is somehow modelled after the file of the same name on SysVr4
systems. It provides a definition of the core file format for ELF
used on Linux. */
+#include <features.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/ucontext.h>
#include <sys/user.h>
#include <asm/elf.h>
@@ -100,6 +100,16 @@ struct elf_prpsinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
/* Addresses. */
typedef void *psaddr_t;
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
index 497c8e9..a228179 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -17,17 +17,17 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_PROCFS_H
-
#define _SYS_PROCFS_H 1
-#include <features.h>
/* This is somehow modelled after the file of the same name on SysVr4
systems. It provides a definition of the core file format for ELF
used on Linux. */
+#include <features.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/ucontext.h>
#include <sys/user.h>
#include <sys/elf.h>
@@ -90,6 +90,16 @@ struct elf_prpsinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
/* Addresses. */
typedef void *psaddr_t;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index 5a94de0..9c6bac9 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -17,17 +17,17 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_PROCFS_H
-
#define _SYS_PROCFS_H 1
-#include <features.h>
/* This is somehow modelled after the file of the same name on SysVr4
systems. It provides a definition of the core file format for ELF
used on Linux. */
+#include <features.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/ucontext.h>
#include <sys/user.h>
#include <asm/elf.h>
@@ -100,6 +100,17 @@ struct elf_prpsinfo
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
+
/* Addresses. */
typedef void *psaddr_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=67b11b531ed8d6625200115b6e8c1934303deda4
commit 67b11b531ed8d6625200115b6e8c1934303deda4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 2 06:54:45 1999 +0000
Add more pr* types used by the debugger.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index 7d40596..428563b 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -101,6 +101,18 @@ struct elf_prpsinfo
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
+
+
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
index e2f3731..497c8e9 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -91,6 +91,18 @@ struct elf_prpsinfo
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
+
+
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index c97836f..5a94de0 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,6 +101,18 @@ struct elf_prpsinfo
};
+/* Addresses. */
+typedef void *psaddr_t;
+
+/* Register sets. Linux has different names. */
+typedef gregset_t prgregset_t;
+typedef fpregset_t prfpregset_t;
+
+/* We don't have any differences between processes and threads,
+ therefore habe only ine PID type. */
+typedef __pid_t lwpid_t;
+
+
typedef struct elf_prstatus prstatus_t;
typedef struct elf_prpsinfo prpsinfo_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17f1ad449977e0b86ea01da527080df31f0e663c
commit 17f1ad449977e0b86ea01da527080df31f0e663c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 02:35:05 1999 +0000
(SI_KERNEL): Added.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
index 81a6ec1..d141869 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -122,8 +122,10 @@ enum
# define SI_ASYNCIO SI_ASYNCIO
SI_QUEUE, /* Sent by sigqueue. */
# define SI_QUEUE SI_QUEUE
- SI_USER /* Sent by kill, sigsend, raise. */
+ SI_USER, /* Sent by kill, sigsend, raise. */
# define SI_USER SI_USER
+ SI_KERNEL = 0x80 /* Send by kernel. */
+#define SI_KERNEL SI_KERNEL
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d971640e9847e3f34d242b81022e361d4dad43da
commit d971640e9847e3f34d242b81022e361d4dad43da
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:16:46 1999 +0000
fetestexcept implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/ftestexcept.c b/sysdeps/mips/fpu/ftestexcept.c
new file mode 100644
index 0000000..f348258
--- /dev/null
+++ b/sysdeps/mips/fpu/ftestexcept.c
@@ -0,0 +1,33 @@
+/* Test exception in current environment.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fetestexcept (int excepts)
+{
+ int cw;
+
+ /* Get current control word. */
+ _FPU_GETCW (cw);
+
+ return cw & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2425ccdbb5d0d2e1abaae3f7e6d79f39a1fca4c
commit f2425ccdbb5d0d2e1abaae3f7e6d79f39a1fca4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:16:36 1999 +0000
fegetexcept implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fgetexcptflg.c b/sysdeps/mips/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..8c586b5
--- /dev/null
+++ b/sysdeps/mips/fpu/fgetexcptflg.c
@@ -0,0 +1,39 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (temp);
+
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
+}
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf025bb2981527ca3d2c6cc5f4741724f7249130
commit cf025bb2981527ca3d2c6cc5f4741724f7249130
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:16:24 1999 +0000
feupdateenv implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/feupdateenv.c b/sysdeps/mips/fpu/feupdateenv.c
new file mode 100644
index 0000000..f0748ce
--- /dev/null
+++ b/sysdeps/mips/fpu/feupdateenv.c
@@ -0,0 +1,46 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+ int temp;
+
+ /* Save current exceptions. */
+ _FPU_GETCW (temp);
+ temp &= FE_ALL_EXCEPT;
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the safed exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept (temp);
+
+ /* Success. */
+ return 0;
+}
+strong_alias (__feupdateenv, __old_feupdateenv)
+symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=deb5c024aa25827dc11738ca05497a9126fd2a78
commit deb5c024aa25827dc11738ca05497a9126fd2a78
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:16:05 1999 +0000
fesetround implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fesetround.c b/sysdeps/mips/fpu/fesetround.c
new file mode 100644
index 0000000..6b623d6
--- /dev/null
+++ b/sysdeps/mips/fpu/fesetround.c
@@ -0,0 +1,43 @@
+/* Set current rounding direction.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fesetround (int round)
+{
+ unsigned short int cw;
+
+ if ((round & ~0x3) != 0)
+ /* ROUND is no valid rounding mode. */
+ return 0;
+
+ /* Get current state. */
+ _FPU_GETCW (cw);
+
+ /* Set rounding bits. */
+ cw &= ~0x3;
+ cw |= round;
+ /* Set new state. */
+ _FPU_SETCW (cw);
+
+ return 1;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ce49bd30badbf1c357b6d7a52f0121917ddedfb
commit 9ce49bd30badbf1c357b6d7a52f0121917ddedfb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:15:55 1999 +0000
fesetenv implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fesetenv.c b/sysdeps/mips/fpu/fesetenv.c
new file mode 100644
index 0000000..43a571e
--- /dev/null
+++ b/sysdeps/mips/fpu/fesetenv.c
@@ -0,0 +1,37 @@
+/* Install given floating-point environment.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+__fesetenv (const fenv_t *envp)
+{
+ if (envp == FE_DFL_ENV)
+ _FPU_SETCW (_FPU_DEFAULT);
+ else
+ _FPU_SETCW (envp->__fp_control_register);
+
+ /* Success. */
+ return 0;
+}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e576db000f806912f6881b25d13e90f2db83fbe1
commit e576db000f806912f6881b25d13e90f2db83fbe1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:15:45 1999 +0000
fegetround implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fegetround.c b/sysdeps/mips/fpu/fegetround.c
new file mode 100644
index 0000000..e2e51ae
--- /dev/null
+++ b/sysdeps/mips/fpu/fegetround.c
@@ -0,0 +1,33 @@
+/* Return current rounding direction.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetround (void)
+{
+ int cw;
+
+ /* Get control word. */
+ _FPU_GETCW (cw);
+
+ return cw & 0x3;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd5c04b4d6947ef2a2a822f6135e8d02a89ba484
commit dd5c04b4d6947ef2a2a822f6135e8d02a89ba484
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:15:28 1999 +0000
fegetenv implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fegetenv.c b/sysdeps/mips/fpu/fegetenv.c
new file mode 100644
index 0000000..72b7ee5
--- /dev/null
+++ b/sysdeps/mips/fpu/fegetenv.c
@@ -0,0 +1,34 @@
+/* Store current floating-point environment.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+__fegetenv (fenv_t *envp)
+{
+ _FPU_GETCW (*envp);
+
+ /* Success. */
+ return 0;
+}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a986c1a7d1afc104d1f4243e83f86a208698a56
commit 4a986c1a7d1afc104d1f4243e83f86a208698a56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:15:18 1999 +0000
feclearexcept implementation for PowerPC.
diff --git a/sysdeps/mips/fpu/fclrexcpt.c b/sysdeps/mips/fpu/fclrexcpt.c
new file mode 100644
index 0000000..990dfe6
--- /dev/null
+++ b/sysdeps/mips/fpu/fclrexcpt.c
@@ -0,0 +1,46 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+__feclearexcept (int excepts)
+{
+ int cw;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Read the complete control word. */
+ _FPU_GETCW (cw);
+
+ /* Clear exception bits. */
+ cw &= ~excepts;
+
+ /* Put the new data in effect. */
+ _FPU_SETCW (cw);
+
+ /* Success. */
+ return 0;
+}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08784f9d79054909fb049c64c3cf28ffd693deca
commit 08784f9d79054909fb049c64c3cf28ffd693deca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 1 00:11:13 1999 +0000
Moved into fpu subdir.
diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c
deleted file mode 100644
index 990dfe6..0000000
--- a/sysdeps/mips/fclrexcpt.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-__feclearexcept (int excepts)
-{
- int cw;
-
- /* Mask out unsupported bits/exceptions. */
- excepts &= FE_ALL_EXCEPT;
-
- /* Read the complete control word. */
- _FPU_GETCW (cw);
-
- /* Clear exception bits. */
- cw &= ~excepts;
-
- /* Put the new data in effect. */
- _FPU_SETCW (cw);
-
- /* Success. */
- return 0;
-}
-strong_alias (__feclearexcept, __old_feclearexcept)
-symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
-default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c
deleted file mode 100644
index 72b7ee5..0000000
--- a/sysdeps/mips/fegetenv.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Store current floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-__fegetenv (fenv_t *envp)
-{
- _FPU_GETCW (*envp);
-
- /* Success. */
- return 0;
-}
-strong_alias (__fegetenv, __old_fegetenv)
-symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
-default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fegetround.c b/sysdeps/mips/fegetround.c
deleted file mode 100644
index e2e51ae..0000000
--- a/sysdeps/mips/fegetround.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Return current rounding direction.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-fegetround (void)
-{
- int cw;
-
- /* Get control word. */
- _FPU_GETCW (cw);
-
- return cw & 0x3;
-}
diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c
deleted file mode 100644
index 43a571e..0000000
--- a/sysdeps/mips/fesetenv.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Install given floating-point environment.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-__fesetenv (const fenv_t *envp)
-{
- if (envp == FE_DFL_ENV)
- _FPU_SETCW (_FPU_DEFAULT);
- else
- _FPU_SETCW (envp->__fp_control_register);
-
- /* Success. */
- return 0;
-}
-strong_alias (__fesetenv, __old_fesetenv)
-symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
-default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fesetround.c b/sysdeps/mips/fesetround.c
deleted file mode 100644
index 6b623d6..0000000
--- a/sysdeps/mips/fesetround.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Set current rounding direction.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-fesetround (int round)
-{
- unsigned short int cw;
-
- if ((round & ~0x3) != 0)
- /* ROUND is no valid rounding mode. */
- return 0;
-
- /* Get current state. */
- _FPU_GETCW (cw);
-
- /* Set rounding bits. */
- cw &= ~0x3;
- cw |= round;
- /* Set new state. */
- _FPU_SETCW (cw);
-
- return 1;
-}
diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c
deleted file mode 100644
index f0748ce..0000000
--- a/sysdeps/mips/feupdateenv.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-__feupdateenv (const fenv_t *envp)
-{
- int temp;
-
- /* Save current exceptions. */
- _FPU_GETCW (temp);
- temp &= FE_ALL_EXCEPT;
-
- /* Install new environment. */
- fesetenv (envp);
-
- /* Raise the safed exception. Incidently for us the implementation
- defined format of the values in objects of type fexcept_t is the
- same as the ones specified using the FE_* constants. */
- feraiseexcept (temp);
-
- /* Success. */
- return 0;
-}
-strong_alias (__feupdateenv, __old_feupdateenv)
-symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
-default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c
deleted file mode 100644
index 8c586b5..0000000
--- a/sysdeps/mips/fgetexcptflg.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Store current representation for exceptions.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-__fegetexceptflag (fexcept_t *flagp, int excepts)
-{
- fexcept_t temp;
-
- /* Get the current exceptions. */
- _FPU_GETCW (temp);
-
- *flagp = temp & excepts & FE_ALL_EXCEPT;
-
- /* Success. */
- return 0;
-}
-strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
-default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/mips/ftestexcept.c b/sysdeps/mips/ftestexcept.c
deleted file mode 100644
index f348258..0000000
--- a/sysdeps/mips/ftestexcept.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Test exception in current environment.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <fpu_control.h>
-
-int
-fetestexcept (int excepts)
-{
- int cw;
-
- /* Get current control word. */
- _FPU_GETCW (cw);
-
- return cw & excepts & FE_ALL_EXCEPT;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=146bade74f9459c30ea834f978d6fce3eb873b2a
commit 146bade74f9459c30ea834f978d6fce3eb873b2a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 31 23:13:47 1999 +0000
Return value and add alias.
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 7aa79af..2e76995 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,17 +20,23 @@
#include <fenv.h>
-void
-feclearexcept (int excepts)
+int
+__feclearexcept (int excepts)
{
- unsigned long swcr;
+ unsigned long int swcr;
/* Get the current state. */
- swcr = __ieee_get_fp_control();
+ swcr = __ieee_get_fp_control ();
/* Clear the relevant bits. */
- swcr &= ~((unsigned long)excepts & FE_ALL_EXCEPT);
+ swcr &= ~((unsigned long int) excepts & FE_ALL_EXCEPT);
/* Put the new state in effect. */
- __ieee_set_fp_control(swcr);
+ __ieee_set_fp_control (swcr);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index c8b705d..63dc7ff 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -20,18 +20,25 @@
#include <fenv.h>
-void
-fegetenv (fenv_t *envp)
+int
+__fegetenv (fenv_t *envp)
{
- unsigned long fpcr, swcr;
+ unsigned long int fpcr;
+ unsigned long int swcr;
/* Get status from software and hardware. Note that we don't need an
excb because the callsys is an implied trap barrier. */
- swcr = __ieee_get_fp_control();
- __asm__ __volatile__("mf_fpcr %0" : "=f"(fpcr));
+ swcr = __ieee_get_fp_control ();
+ __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr));
/* Merge the two bits of information. The magic number at the end is
the exception enable mask. */
*envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 3692967..9a38778 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -20,26 +20,32 @@
#include <fenv.h>
-void
-fesetenv (const fenv_t *envp)
+int
+__fesetenv (const fenv_t *envp)
{
- unsigned long fpcr;
+ unsigned long int fpcr;
fenv_t env;
/* Magic encoding of default values: high bit set (never possible for a
user-space address) is not indirect. And we don't even have to get
rid of it since we mask things around just below. */
- if ((long)envp >= 0)
+ if ((long int) envp >= 0)
env = *envp;
else
- env = (unsigned long)envp;
+ env = (unsigned long int) envp;
/* Reset the rounding mode with the hardware fpcr. Note that the following
system call is an implied trap barrier for our modification. */
- __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+ __asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr));
fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58));
- __asm__ __volatile__("mt_fpcr %0" : : "f"(fpcr));
+ __asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr));
/* Reset the exception status and mask with the kernel's FP code. */
- __ieee_set_fp_control(env & (FE_ALL_EXCEPT | 0x3e));
+ __ieee_set_fp_control (env & (FE_ALL_EXCEPT | 0x3e));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index 816575a..bd6a979 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,19 +20,25 @@
#include <fenv.h>
-void
-feupdateenv (const fenv_t *envp)
+int
+__feupdateenv (const fenv_t *envp)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current exception state. */
- tmp = __ieee_get_fp_control();
+ tmp = __ieee_get_fp_control ();
/* Install new environment. */
- fesetenv(envp);
+ fesetenv (envp);
/* Raise the saved exception. Incidently for us the implementation
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
- feraiseexcept((int)tmp & FE_ALL_EXCEPT);
+ feraiseexcept ((int) tmp & FE_ALL_EXCEPT);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feupdateenv, __old_feupdateenv)
+symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index 28d9e12..2811d02 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,14 +20,20 @@
#include <fenv.h>
-void
-fegetexceptflag (fexcept_t *flagp, int excepts)
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current state. */
tmp = __ieee_get_fp_control();
/* Return that portion that corresponds to the requested exceptions. */
*flagp = tmp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 9b61ddb..bcbc06b 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -22,9 +22,10 @@
#include <math.h>
void
-feraiseexcept (int excepts)
+__feraiseexcept (int excepts)
{
- double tmp, dummy;
+ double tmp;
+ double dummy;
/* Raise exceptions represented by EXPECTS. But we must raise only
one signal at a time. It is important the if the overflow/underflow
@@ -36,38 +37,34 @@ feraiseexcept (int excepts)
/* First: invalid exception. */
if (FE_INVALID & excepts)
- {
- /* One example of a invalid operation is 0 * Infinity. */
- __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
- : "=&f"(tmp) : "f"(HUGE_VAL));
- }
+ /* One example of a invalid operation is 0 * Infinity. */
+ __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
+ : "=&f" (tmp) : "f" (HUGE_VAL));
/* Next: division by zero. */
if (FE_DIVBYZERO & excepts)
- {
- __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
- : "=&f"(tmp), "=f"(dummy));
- }
+ __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
+ : "=&f" (tmp), "=f" (dummy));
/* Next: overflow. */
if (FE_OVERFLOW & excepts)
- {
- __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
- : "=&f"(tmp) : "f"(DBL_MAX));
- }
+ __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
+ : "=&f" (tmp) : "f" (DBL_MAX));
/* Next: underflow. */
if (FE_UNDERFLOW & excepts)
- {
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f"(tmp) : "f"(DBL_MIN),
- "f"((double) (1UL << 60)));
- }
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=&f" (tmp) : "f" (DBL_MIN),
+ "f" ((double) (1UL << 60)));
/* Last: inexact. */
if (FE_INEXACT & excepts)
- {
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f"(tmp) : "f"(1.0), "f"(M_PI));
- }
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=&f" (tmp) : "f" (1.0), "f" (M_PI));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index 5764a6e..eeb987e 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,17 +20,23 @@
#include <fenv.h>
-void
-fesetexceptflag (const fexcept_t *flagp, int excepts)
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current exception state. */
- tmp = __ieee_get_fp_control();
+ tmp = __ieee_get_fp_control ();
/* Set all the bits that were called for. */
tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT);
/* And store it back. */
- __ieee_set_fp_control(tmp);
+ __ieee_set_fp_control (tmp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c
index 34ad36d..0bcdfdf 100644
--- a/sysdeps/arm/fpu/fclrexcpt.c
+++ b/sysdeps/arm/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,8 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-feclearexcept (int excepts)
+int
+__feclearexcept (int excepts)
{
unsigned long int temp;
@@ -29,11 +29,17 @@ feclearexcept (int excepts)
excepts &= FE_ALL_EXCEPT;
/* Get the current floating point status. */
- _FPU_GETCW(temp);
+ _FPU_GETCW (temp);
/* Clear the relevant bits. */
temp &= excepts ^ FE_ALL_EXCEPT;
/* Put the new data in effect. */
- _FPU_SETCW(temp);
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
index 99dc1f0..7fde5f2 100644
--- a/sysdeps/arm/fpu/fegetenv.c
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -20,10 +20,16 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-fegetenv (fenv_t *envp)
+int
+__fegetenv (fenv_t *envp)
{
unsigned long int temp;
- _FPU_GETCW(temp);
+ _FPU_GETCW (temp);
envp->__cw = temp;
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index 7f3a434..13cda82 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -20,14 +20,20 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-fesetenv (const fenv_t *envp)
+int
+__fesetenv (const fenv_t *envp)
{
if (envp == FE_DFL_ENV)
- _FPU_SETCW(_FPU_DEFAULT);
+ _FPU_SETCW (_FPU_DEFAULT);
else
{
- unsigned long temp = envp->__cw;
- _FPU_SETCW(temp);
+ unsigned long int temp = envp->__cw;
+ _FPU_SETCW (temp);
}
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
index 0fbfb16..77d928a 100644
--- a/sysdeps/arm/fpu/fraiseexcpt.c
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,12 +21,18 @@
#include <fpu_control.h>
#include <math.h>
-void
-feraiseexcept (int excepts)
+int
+__feraiseexcept (int excepts)
{
/* Raise exceptions represented by EXPECTS. */
fexcept_t temp;
- _FPU_GETCW(temp);
+ _FPU_GETCW (temp);
temp |= (excepts & FE_ALL_EXCEPT);
- _FPU_SETCW(temp);
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c
index f5c06a6..ef157a2 100644
--- a/sysdeps/arm/fpu/fsetexcptflg.c
+++ b/sysdeps/arm/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,18 +21,24 @@
#include <math.h>
#include <fpu_control.h>
-void
-fesetexceptflag (const fexcept_t *flagp, int excepts)
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
fexcept_t temp;
/* Get the current environment. */
- _FPU_GETCW(temp);
+ _FPU_GETCW (temp);
/* Set the desired exception mask. */
temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
/* Save state back to the FPU. */
- _FPU_SETCW(temp);
+ _FPU_SETCW (temp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c
index b914bac..5b2c425 100644
--- a/sysdeps/m68k/fpu/fclrexcpt.c
+++ b/sysdeps/m68k/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -20,8 +20,8 @@
#include <fenv.h>
-void
-feclearexcept (int excepts)
+int
+__feclearexcept (int excepts)
{
fexcept_t fpsr;
@@ -36,4 +36,10 @@ feclearexcept (int excepts)
/* Put the new data in effect. */
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index b437b7e..8936b38 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -20,8 +20,14 @@
#include <fenv.h>
-void
-fegetenv (fenv_t *envp)
+int
+__fegetenv (fenv_t *envp)
{
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index b8ad428..11bffb4 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -20,8 +20,8 @@
#include <fenv.h>
-void
-fesetenv (const fenv_t *envp)
+int
+__fesetenv (const fenv_t *envp)
{
fenv_t temp;
@@ -45,4 +45,10 @@ fesetenv (const fenv_t *envp)
}
__asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c
index f5922b4..48d42d9 100644
--- a/sysdeps/m68k/fpu/feupdateenv.c
+++ b/sysdeps/m68k/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -20,8 +20,8 @@
#include <fenv.h>
-void
-feupdateenv (const fenv_t *envp)
+int
+__feupdateenv (const fenv_t *envp)
{
fexcept_t fpsr;
@@ -36,4 +36,10 @@ feupdateenv (const fenv_t *envp)
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
feraiseexcept ((int) fpsr);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feupdateenv, __old_feupdateenv)
+symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c
index 4086e1a..5d3a435 100644
--- a/sysdeps/m68k/fpu/fgetexcptflg.c
+++ b/sysdeps/m68k/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -20,8 +20,8 @@
#include <fenv.h>
-void
-fegetexceptflag (fexcept_t *flagp, int excepts)
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
{
fexcept_t fpsr;
@@ -29,4 +29,10 @@ fegetexceptflag (fexcept_t *flagp, int excepts)
__asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
*flagp = fpsr & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index bc49c9c..c283d4b 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -21,8 +21,8 @@
#include <fenv.h>
#include <math.h>
-void
-feraiseexcept (int excepts)
+int
+__feraiseexcept (int excepts)
{
/* Raise exceptions represented by EXCEPTS. But we must raise only one
signal at a time. It is important that if the overflow/underflow
@@ -67,4 +67,10 @@ feraiseexcept (int excepts)
long double d = 1.0;
__asm__ __volatile__ ("fdiv%.s %#0r3,%0; fnop" : "=f" (d) : "0" (d));
}
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c
index aa92ffd..890042a 100644
--- a/sysdeps/m68k/fpu/fsetexcptflg.c
+++ b/sysdeps/m68k/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -21,8 +21,8 @@
#include <fenv.h>
#include <math.h>
-void
-fesetexceptflag (const fexcept_t *flagp, int excepts)
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
fexcept_t fpsr;
@@ -35,4 +35,10 @@ fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Store the new status register. */
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c
index de96dd0..990dfe6 100644
--- a/sysdeps/mips/fclrexcpt.c
+++ b/sysdeps/mips/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -21,8 +21,8 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-feclearexcept (int excepts)
+int
+__feclearexcept (int excepts)
{
int cw;
@@ -34,7 +34,13 @@ feclearexcept (int excepts)
/* Clear exception bits. */
cw &= ~excepts;
-
+
/* Put the new data in effect. */
_FPU_SETCW (cw);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c
index 13a2c8f..72b7ee5 100644
--- a/sysdeps/mips/fegetenv.c
+++ b/sysdeps/mips/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -21,8 +21,14 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-fegetenv (fenv_t *envp)
+int
+__fegetenv (fenv_t *envp)
{
_FPU_GETCW (*envp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c
index 116fbae..43a571e 100644
--- a/sysdeps/mips/fesetenv.c
+++ b/sysdeps/mips/fesetenv.c
@@ -21,11 +21,17 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-fesetenv (const fenv_t *envp)
+int
+__fesetenv (const fenv_t *envp)
{
if (envp == FE_DFL_ENV)
_FPU_SETCW (_FPU_DEFAULT);
else
_FPU_SETCW (envp->__fp_control_register);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c
index e826084..f0748ce 100644
--- a/sysdeps/mips/feupdateenv.c
+++ b/sysdeps/mips/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -21,8 +21,8 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-feupdateenv (const fenv_t *envp)
+int
+__feupdateenv (const fenv_t *envp)
{
int temp;
@@ -37,4 +37,10 @@ feupdateenv (const fenv_t *envp)
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
feraiseexcept (temp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feupdateenv, __old_feupdateenv)
+symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c
index f3d52bc..8c586b5 100644
--- a/sysdeps/mips/fgetexcptflg.c
+++ b/sysdeps/mips/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -21,8 +21,8 @@
#include <fenv.h>
#include <fpu_control.h>
-void
-fegetexceptflag (fexcept_t *flagp, int excepts)
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
{
fexcept_t temp;
@@ -30,4 +30,10 @@ fegetexceptflag (fexcept_t *flagp, int excepts)
_FPU_GETCW (temp);
*flagp = temp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c555ab57e2168ea287cefabd825d61b49b51598
commit 6c555ab57e2168ea287cefabd825d61b49b51598
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 31 17:31:25 1999 +0000
Replace __USE_ISOC9X by __USE_ISOC99 and also recognize _ISOC99_SOURCE.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 5ee9644..f5d5de8 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
# ifdef __GNUC__
# if __STDC__ == 1
@@ -71,7 +71,7 @@ typedef double double_t;
/* Number of decimal digits for the `double' type. */
# define DECIMAL_DIG 15
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 9207d52..87765d2 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang.
@@ -28,7 +28,7 @@
# define __MATH_INLINE extern __inline
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# define isunordered(x, y) \
(__extension__ \
({ double __r; \
@@ -56,7 +56,7 @@
(__extension__ \
({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
!isunordered(__x, __y) && __x != __y; }))
-#endif /* ISOC9X */
+#endif /* ISO C99 */
#define __inline_copysign(NAME, TYPE) \
__MATH_INLINE TYPE \
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 1b236c4..398476c 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -61,9 +61,9 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# ifdef __GNUC__
@@ -101,4 +101,4 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
same as `double'. */
# define HUGE_VALL HUGE_VAL
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index 14c0855..339f374 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -52,9 +52,9 @@ static union { unsigned char __c[8]; double __d; } __huge_val =
#endif /* GCC. */
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# if __GNUC_PREREQ(2,95)
@@ -89,4 +89,4 @@ static union { unsigned char __c[12]; long double __ld; } __huge_vall =
# endif /* GCC 2.95. */
-#endif /* __USE_ISOC9X. */
+#endif /* __USE_ISOC99. */
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 250f0f3..2f650ec 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#if defined __USE_ISOC9X && defined _MATH_H
+#if defined __USE_ISOC99 && defined _MATH_H
/* The m68k FPUs evaluate all values in the 96 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
@@ -42,4 +42,4 @@ typedef long double double_t; /* `double' expressions are evaluated as
/* Number of decimal digits for the `long double' type. */
# define DECIMAL_DIG 18
-#endif /* ISO C 9X */
+#endif /* ISO C99 */
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index c753fae..9dad4c6 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -19,9 +19,9 @@
#ifdef __GNUC__
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
-/* ISO C 9X defines some macros to perform unordered comparisons. The
+/* ISO C99 defines some macros to perform unordered comparisons. The
m68k FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
@@ -98,7 +98,7 @@
suffixed with f and l for the float and long double version, resp). OP
is the name of the fpu operation (without leading f). */
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
@@ -123,7 +123,7 @@ __inline_mathop(__tan, tan)
__inline_mathop(__tanh, tanh)
__inline_mathop(__fabs, abs)
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
__inline_mathop(__log1p, lognp1)
@@ -133,7 +133,7 @@ __inline_mathop(__log1p, lognp1)
__inline_mathop(__significand, getman)
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
__inline_mathop(__log2, log2)
__inline_mathop(__trunc, intrz)
#endif
@@ -146,7 +146,7 @@ __inline_mathop(sin, sin)
__inline_mathop(tan, tan)
__inline_mathop(tanh, tanh)
-# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
@@ -156,7 +156,7 @@ __inline_mathop(log1p, lognp1)
__inline_mathop(significand, getman)
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_mathop(log2, log2)
__inline_mathop(trunc, intrz)
# endif
@@ -223,7 +223,7 @@ __m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
}
__inline_functions(double,)
-#if defined __USE_MISC || defined __USE_ISOC9X
+#if defined __USE_MISC || defined __USE_ISOC99
__inline_functions(float,f)
__inline_functions(long double,l)
#endif
@@ -287,7 +287,7 @@ __inline_functions(long double,l)
#endif
-#ifdef __USE_ISOC9X
+#ifdef __USE_ISOC99
# define __inline_functions(float_type, s) \
__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
@@ -383,18 +383,18 @@ __inline_forward(double,frexp, (double __value, int *__expptr),
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
# ifdef __USE_MISC
-# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+# ifndef __USE_ISOC99 /* Conflict with macro of same name. */
__inline_forward_c(int,isinf, (double __value), (__value))
# endif
__inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
# endif
# if defined __USE_MISC || defined __USE_XOPEN
-# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+# ifndef __USE_ISOC99 /* Conflict with macro of same name. */
__inline_forward_c(int,isnan, (double __value), (__value))
# endif
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
__inline_forward_c(double,nearbyint, (double __value), (__value))
__inline_forward_c(long int,lrint, (double __value), (__value))
@@ -406,7 +406,7 @@ __inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
(__x, __sinx, __cosx))
# endif
-# if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC99
__inline_forward(float,frexpf, (float __value, int *__expptr),
(__value, __expptr))
@@ -418,7 +418,7 @@ __inline_forward_c(int,finitef, (float __value), (__value))
__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(float,nearbyintf, (float __value), (__value))
__inline_forward_c(long int,lrintf, (float __value), (__value))
@@ -440,7 +440,7 @@ __inline_forward_c(int,finitel, (long double __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
# endif
-# ifdef __USE_ISOC9X
+# ifdef __USE_ISOC99
__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
@@ -455,7 +455,7 @@ __inline_forward(void,sincosl,
(__x, __sinx, __cosx))
# endif
-#endif /* Use misc or ISO C9X */
+#endif /* Use misc or ISO C99 */
#undef __inline_forward
#undef __inline_forward_c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0927b9fc12e16ebfda90adc59571c1b213222592
commit 0927b9fc12e16ebfda90adc59571c1b213222592
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 29 20:23:01 1999 +0000
Added missing N_* constants.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
index 4f5c2b0..7959570 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,3 +64,12 @@ struct termio
#define N_PPP 3
#define N_STRIP 4
#define N_AX25 5
+#define N_X25 6 /* X.25 async */
+#define N_6PACK 7
+#define N_MASC 8 /* Mobitex module */
+#define N_R3964 9 /* Simatic R3964 module */
+#define N_PROFIBUS_FDL 10 /* Profibus */
+#define N_IRDA 11 /* Linux IR */
+#define N_SMSBLOCK 12 /* SMS block mode */
+#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14 /* synchronous PPP */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f2d32942cddfb8f1fce834506645114b1423eac
commit 0f2d32942cddfb8f1fce834506645114b1423eac
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 19 03:07:09 1999 +0000
Correct namespace selection.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 7a586be..be04235 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -49,19 +49,21 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
-#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with three
- arguments instead of one. */
-#ifdef __USE_MISC
+#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
-# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-# define SA_NOMASK 0x00000008 /* Don't automatically block the signal
+# define SA_NODEFER 0x00000008 /* Don't automatically block the signal
when its handler is being executed. */
-# define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESETHAND 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
/* Some aliases for the SA_ constants. */
-# define SA_NODEFER SA_NOMASK
-# define SA_RESETHAND SA_ONESHOT
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
# define SA_STACK SA_ONSTACK
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e4e03d63bf03ef838a65c6a36ff8450ccda4568
commit 1e4e03d63bf03ef838a65c6a36ff8450ccda4568
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 19 03:06:55 1999 +0000
Implied directories for MIPS3.
diff --git a/sysdeps/mips/mips3/Implies b/sysdeps/mips/mips3/Implies
new file mode 100644
index 0000000..39a34c5
--- /dev/null
+++ b/sysdeps/mips/mips3/Implies
@@ -0,0 +1 @@
+wordsize-32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33f88b1aad39de2fe003c645c0a7af1e30664d2f
commit 33f88b1aad39de2fe003c645c0a7af1e30664d2f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 19 03:06:37 1999 +0000
Remove wordsize-32 reference.
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 9f60963..8c18cb3 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,4 +1,3 @@
-wordsize-32
# MIPS uses IEEE 754 floating point.
ieee754/flt-32
ieee754/dbl-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e64e12d90de2f0158e45dde1707ce42fddd9e5e
commit 6e64e12d90de2f0158e45dde1707ce42fddd9e5e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 12 15:50:11 1999 +0000
Add definition of gregset_t and fpregset_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
index 08eeb6e..50c643a 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
@@ -24,6 +24,26 @@
#include <bits/sigcontext.h>
+
+/* Type for general register. */
+typedef long int greg_t;
+
+/* Number of general registers. */
+#define NGREG 33
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Type for floating-point register. */
+typedef long int fpreg_t;
+
+/* Number of general registers. */
+#define NFPREG 32
+
+/* Container for all general registers. */
+typedef fpreg_t fpregset_t[NFPREG];
+
+
/* A machine context is exactly a sigcontext. */
typedef struct sigcontext mcontext_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12b8ab07b980809e254857b1163871655caa88ef
commit 12b8ab07b980809e254857b1163871655caa88ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 12 15:19:54 1999 +0000
Update to match generic Linux version.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 2f8b3ba..7a586be 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/Alpha sigaction.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,20 @@
struct sigaction
{
/* Signal handler. */
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
__sighandler_t sa_handler;
+#endif
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=362932c82f64a9fc1947d8be2b9f1a0d30310a52
commit 362932c82f64a9fc1947d8be2b9f1a0d30310a52
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 11 19:22:39 1999 +0000
Declare SA_SIGINFO.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index ae1249a..2f8b3ba 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -36,6 +36,8 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#define SA_SIGINFO 0x00000040 /* Invoke signal-catching function with three
+ arguments instead of one. */
#ifdef __USE_MISC
# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18e7dfd6268636a227597c6dc96a368b81386dc6
commit 18e7dfd6268636a227597c6dc96a368b81386dc6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 10 20:34:26 1999 +0000
HPUX specific definitions.
diff --git a/sysdeps/unix/sysv/hpux/sysdep.h b/sysdeps/unix/sysv/hpux/sysdep.h
new file mode 100644
index 0000000..88c2dcf
--- /dev/null
+++ b/sysdeps/unix/sysv/hpux/sysdep.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* No underscores necessary. */
+#define NO_UNDERSCORES
+
+#include <sysdeps/hppa/sysdep.h>
+
+/* HPUX uses the usual syscall naming. */
+#define SYS_ify(name) SYS_##name
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fcda5fcc59093c4e7014a8e6a4da3e5db43c38f5
commit fcda5fcc59093c4e7014a8e6a4da3e5db43c38f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 10 20:31:45 1999 +0000
HPPA definitions.
diff --git a/sysdeps/hppa/sysdep.h b/sysdeps/hppa/sysdep.h
new file mode 100644
index 0000000..735882d
--- /dev/null
+++ b/sysdeps/hppa/sysdep.h
@@ -0,0 +1,77 @@
+/* Assembler macros for HP/PA.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembler. */
+
+#define ALIGNARG(log2) log2
+
+
+/* Define an entry point visible from C.
+
+ There is currently a bug in gdb which prevents us from specifying
+ incomplete stabs information. Fake some entries here which specify
+ the current source file. */
+#define ENTRY(name) \
+ .SPACE $TEXT$; \
+ .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \
+ .align ALIGNARG(4); \
+ .NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY; \
+ .EXPORT C_SYMBOL_NAME(name),ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR; \
+ C_LABEL(name) \
+
+ CALL_MCOUNT
+
+#undef END
+#define END(name) \
+ .PROCEND
+
+
+/* If compiled for profiling, call `mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT \
+ XXX
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args)
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) \
+ END (name)
+
+#define JUMPTARGET(name) name
+#define SYSCALL_PIC_SETUP /* Nothing. */
+
+/* Local label name for asm code. */
+#ifndef L
+#define L(name) name
+#endif
+
+#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c628e0383d2beb71bf73423f7ac9775dc576978c
commit c628e0383d2beb71bf73423f7ac9775dc576978c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 1 16:03:15 1999 +0000
Disable debug messages.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 5b2edd0..7b38fcc 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -436,6 +436,8 @@ static struct ioswtch ioswtch[] = {
}
};
+#undef DEBUG_IOPERM
+
/* routine to process the /proc/cpuinfo information into the fields */
/* that are required for correctly determining the platform parameters */
@@ -474,7 +476,7 @@ process_cpuinfo(void)
fclose (fp);
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "system type: %s\n", systype);
fprintf(stderr, "system vari: %s\n", sysvari);
fprintf(stderr, "cpu model: %s\n", cpumodel);
@@ -598,7 +600,7 @@ init_iosys (void)
/* systype is not a know platform name... */
__set_errno (EINVAL);
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "init_iosys: platform not recognized\n");
#endif
return -1;
@@ -612,7 +614,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
int prot, err;
if (!io.swp && init_iosys() < 0) {
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: init_iosys() failed\n");
#endif
return -1;
@@ -622,13 +624,13 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
if (from >= MAX_PORT || from + num > MAX_PORT)
{
__set_errno (EINVAL);
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: from/num out of range\n");
#endif
return -1;
}
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base);
#endif
@@ -645,7 +647,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
fd = open ("/dev/mem", O_RDWR);
if (fd < 0) {
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: /dev/mem open failed\n");
#endif
return -1;
@@ -657,7 +659,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
(unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
fd, io.io_base);
close (fd);
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n",
len, io.base);
#endif
@@ -678,7 +680,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
addr &= PAGE_MASK;
len = port_to_cpu_addr (from + num, io.swiz, 1) - addr;
err = mprotect ((void *) addr, len, prot);
-#if 1
+#ifdef DEBUG_IOPERM
fprintf(stderr, "ioperm: mprotect returned %d\n", err);
#endif
return err;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7733584f0954970ebd0866c6dc3b4891f0044664
commit 7733584f0954970ebd0866c6dc3b4891f0044664
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 14 01:40:51 1999 +0000
Linux/Arm definitions for process image access.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/procfs.h b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
new file mode 100644
index 0000000..e2f3731
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sys/procfs.h
@@ -0,0 +1,99 @@
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PROCFS_H
+
+#define _SYS_PROCFS_H 1
+#include <features.h>
+
+/* This is somehow modelled after the file of the same name on SysVr4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. */
+
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/user.h>
+#include <sys/elf.h>
+
+__BEGIN_DECLS
+
+struct elf_siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_code; /* Extra code. */
+ int si_errno; /* Errno. */
+ };
+
+/* Definitions to generate core files. Fields present but not used are
+ marked with "XXX". */
+struct elf_prstatus
+ {
+#if 0
+ long int pr_flags; /* XXX Process flags. */
+ short int pr_why; /* XXX Reason for process halt. */
+ short int pr_what; /* XXX More detailed reason. */
+#endif
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned long int pr_sigpend; /* Set of pending signals. */
+ unsigned long int pr_sighold; /* Set of held signals. */
+#if 0
+ struct sigaltstack pr_altstack; /* Alternate stack info. */
+ struct sigaction pr_action; /* Signal action for current sig. */
+#endif
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct timeval pr_utime; /* User time. */
+ struct timeval pr_stime; /* System time. */
+ struct timeval pr_cutime; /* Cumulative user time. */
+ struct timeval pr_cstime; /* Cumulative system time. */
+#if 0
+ long int pr_instr; /* Current instruction. */
+#endif
+ elf_gregset_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+#define ELF_PRARGSZ (80) /* Number of chars for args */
+
+struct elf_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long int pr_flag; /* Flags. */
+ unsigned short int pr_uid;
+ unsigned short int pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif /* sys/procfs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f70ab57d2e45ef000d859b69d6b3fdc2cae696a4
commit f70ab57d2e45ef000d859b69d6b3fdc2cae696a4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 14 01:40:33 1999 +0000
Linux/Arm definitions for register access.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/elf.h b/sysdeps/unix/sysv/linux/arm/sys/elf.h
new file mode 100644
index 0000000..83658c3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sys/elf.h
@@ -0,0 +1,30 @@
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_ELF_H
+#define _SYS_ELF_H 1
+
+#include <sys/user.h>
+
+typedef unsigned long int elf_greg_t;
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+typedef struct user_fp elf_fpregset_t;
+
+#endif /* sys/elf.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=557847754d5567636f8203059b81ea1f67647ab9
commit 557847754d5567636f8203059b81ea1f67647ab9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 14 01:38:51 1999 +0000
Added members 'unsigned char ftype[8]', and 'unsigned int init_flag'
to struct user_fp. Tnese were added in version 2.2.12 of the ARM
Linux kernel.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h
index f06d3e4..253b0f5 100644
--- a/sysdeps/unix/sysv/linux/arm/sys/user.h
+++ b/sysdeps/unix/sysv/linux/arm/sys/user.h
@@ -40,6 +40,8 @@ struct user_fp
} fpregs[8];
unsigned int fpsr:32;
unsigned int fpcr:32;
+ unsigned char ftype[8];
+ unsigned int init_flag;
};
struct user
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad2b56f270ec6d0da495ca7d2dc09e7923a50058
commit ad2b56f270ec6d0da495ca7d2dc09e7923a50058
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 7 01:40:31 1999 +0000
Add sys/user.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 21e1340..2ed1571 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -15,4 +15,5 @@ sizes.h
sys/acct.h
sys/io.h
sys/procfs.h
+sys/user.h
xstatconv.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f908ea6c8542999a75ae8db38dbbeb52ef1e7b21
commit f908ea6c8542999a75ae8db38dbbeb52ef1e7b21
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 3 07:08:11 1999 +0000
Linux/Alpha specific definitions to access information passed up from the
kernel.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/user.h b/sysdeps/unix/sysv/linux/alpha/sys/user.h
new file mode 100644
index 0000000..fe6acb2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h
@@ -0,0 +1,50 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* The whole purpose of this file is for gdb/strace and gdb/strace
+ only. Don't read too much into it. Don't use it for anything other
+ than gdb/strace unless you know what you are doing. */
+
+#include <asm/page.h>
+#include <asm/reg.h>
+
+struct user
+{
+ unsigned long int regs[EF_SIZE / 8 + 32]; /* integer and fp regs */
+ size_t u_tsize; /* text size (pages) */
+ size_t u_dsize; /* data size (pages) */
+ size_t u_ssize; /* stack size (pages) */
+ unsigned long int start_code; /* text starting address */
+ unsigned long int start_data; /* data starting address */
+ unsigned long int start_stack; /* stack starting address */
+ long int signal; /* signal causing core dump */
+ struct regs *u_ar0; /* help gdb find registers */
+ unsigned long int magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+};
+
+#define NBPG PAGE_SIZE
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_DATA_START_ADDR (u.start_data)
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif /* sys/user.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=876914479ac53fd426d2557c4861494b2fda79e7
commit 876914479ac53fd426d2557c4861494b2fda79e7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 3 07:05:16 1999 +0000
Include <sys/user.h> instead of <asm/user.h>.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index 7bd6e69..7d40596 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <asm/user.h>
+#include <sys/user.h>
#include <asm/elf.h>
__BEGIN_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2788ea804da2162bc7e9c7ee81e9332fbc1a249c
commit 2788ea804da2162bc7e9c7ee81e9332fbc1a249c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 1 16:34:56 1999 +0000
Enclose header in an #ifdef statement to prevent it from being included
twice.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
index ba78c03..3435a96 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
@@ -1,5 +1,5 @@
/* Definition of `struct sigcontext' for Linux/ARM
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,9 @@
Fortunately 2.0 puts a magic number in the first word and this is not
a legal value for `trap_no', so we can tell them apart. */
+#ifndef __ARMSIGCTX_H
+#define __ARMSIGCTX_H 1
+
#include <asm/ptrace.h>
union k_sigcontext
@@ -59,3 +62,5 @@ union k_sigcontext
};
#define SIGCONTEXT_2_0_MAGIC 0x4B534154
+
+#endif /* bits/armsigctx.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f3e8e714677587a8f2c13c593d9b39910eda961
commit 7f3e8e714677587a8f2c13c593d9b39910eda961
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 1 16:34:37 1999 +0000
#include <bits/armsigctx.h>.
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index 51788e0..7f6ecbd 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -17,6 +17,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <bits/armsigctx.h>
+
#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1d675f8aefc349e43101d2a518f4d09eadf9f04
commit c1d675f8aefc349e43101d2a518f4d09eadf9f04
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 30 21:51:20 1999 +0000
[db2]: Set CFLAGS of mutex.c to make spinlocks known.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 250a317..63c7d4b 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Brendan Kehoe (brendan@zen.org).
@@ -17,6 +17,10 @@
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
+ifeq ($(subdir),db2)
+CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1
+endif
+
ifeq ($(subdir),gmon)
sysdep_routines += _mcount
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7a486ef9923f710dac7df97c70d9841b8c649c3
commit e7a486ef9923f710dac7df97c70d9841b8c649c3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 28 22:14:27 1999 +0000
Fix sa_flags, partially reverting a patch from 1998-12-29. We just can't
change the flags, kernels with different flags lead to incompatibilities.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 8d08027..963b425 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -55,18 +55,20 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00020000 /* Don't send SIGCHLD when children stop. */
+/* Please note that some Linux kernels versions use different values for these
+ flags which is a bug in those kernel versions. */
+#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
-# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
-# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
-# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */
-# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when
+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
its handler is being executed. */
#endif
#ifdef __USE_MISC
-# define SA_INTERRUPT 0x01000000 /* Historical no-op. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
/* Some aliases for the SA_ constants. */
# define SA_NOMASK SA_NODEFER
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=957a4a990a7a965e22a23a02f968758fb2b35e58
commit 957a4a990a7a965e22a23a02f968758fb2b35e58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 28 00:25:40 1999 +0000
Update from 2.3.15 kernel.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 5dbdee4..74f54e8 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -82,6 +82,7 @@ enum __socket_type
#define PF_ECONET 19 /* Acorn Econet. */
#define PF_ATMSVC 20 /* ATM SVCs. */
#define PF_SNA 22 /* Linux SNA Project */
+#define PF_IRDA 23 /* IRDA sockets. */
#define PF_MAX 32 /* For now.. */
/* Address families. */
@@ -102,7 +103,7 @@ enum __socket_type
#define AF_DECnet PF_DECnet
#define AF_NETBEUI PF_NETBEUI
#define AF_SECURITY PF_SECURITY
-#define pseudo_AF_KEY PF_KEY
+#define AF_KEY PF_KEY
#define AF_NETLINK PF_NETLINK
#define AF_ROUTE PF_ROUTE
#define AF_PACKET PF_PACKET
@@ -110,6 +111,7 @@ enum __socket_type
#define AF_ECONET PF_ECONET
#define AF_ATMSVC PF_ATMSVC
#define AF_SNA PF_SNA
+#define AF_IRDA PF_IRDA
#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
@@ -119,6 +121,10 @@ enum __socket_type
#define SOL_RAW 255
#define SOL_DECNET 261
#define SOL_X25 262
+#define SOL_PACKET 263
+#define SOL_ATM 264 /* ATM layer (cell level). */
+#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
+#define SOL_IRDA 266
/* Maximum queue length specifiable by listen. */
#define SOMAXCONN 128
@@ -137,17 +143,17 @@ struct sockaddr
/* Structure large enough to hold any socket address (with the historical
exception of AF_UNIX). We reserve 128 bytes. */
#if ULONG_MAX > 0xffffffff
-# define __ss_align __uint64_t
+# define __ss_aligntype __uint64_t
#else
-# define __ss_align __uint32_t
+# define __ss_aligntype __uint32_t
#endif
#define _SS_SIZE 128
-#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof(__ss_align)))
+#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
struct sockaddr_storage
{
__SOCKADDR_COMMON (__ss_); /* Address family, etc. */
- __ss_align __ss_align; /* Force desired alignment. */
+ __ss_aligntype __ss_align; /* Force desired alignment. */
char __ss_padding[_SS_PADSIZE];
};
@@ -161,10 +167,35 @@ enum
#define MSG_PEEK MSG_PEEK
MSG_DONTROUTE = 0x04, /* Don't use local routing. */
#define MSG_DONTROUTE MSG_DONTROUTE
+#ifdef __USE_GNU
+ /* DECnet uses a different name. */
+ MSG_TRYHARD = MSG_DONTROUTE,
+# define MSG_TRYHARD MSG_DONTROUTE
+#endif
MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
#define MSG_CTRUNC MSG_CTRUNC
- MSG_PROXY = 0x10 /* Supply or ask second address. */
+ MSG_PROXY = 0x10, /* Supply or ask second address. */
#define MSG_PROXY MSG_PROXY
+ MSG_TRUNC = 0x20,
+#define MSG_TRUNC MSG_TRUNC
+ MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
+#define MSG_DONTWAIT MSG_DONTWAIT
+ MSG_EOR = 0x80, /* End of record. */
+#define MSG_EOR MSG_EOR
+ MSG_WAITALL = 0x100, /* Wait for a full request. */
+#define MSG_WAITALL MSG_WAITALL
+ MSG_FIN = 0x200,
+#define MSG_FIN MSG_FIN
+ MSG_SYN = 0x400,
+#define MSG_SYN MSG_SYN
+ MSG_URG = 0x800,
+#define MSG_URG MSG_URG
+ MSG_RST = 0x1000,
+#define MSG_RST MSG_RST
+ MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
+#define MSG_ERRQUEUE MSG_ERRQUEUE
+ MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */
+#define MSG_NOSIGNAL MSG_NOSIGNAL
};
@@ -224,7 +255,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
- return NULL;
+ return 0;
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ CMSG_ALIGN (__cmsg->cmsg_len));
@@ -233,7 +264,7 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
|| ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
>= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
- return NULL;
+ return 0;
return __cmsg;
}
#endif /* Use `extern inline'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe3f1d14b5aafdae316dc0dc60c65826445c0120
commit fe3f1d14b5aafdae316dc0dc60c65826445c0120
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 20:28:43 1999 +0000
HPUX type definitions.
diff --git a/sysdeps/unix/sysv/hpux/bits/types.h b/sysdeps/unix/sysv/hpux/bits/types.h
new file mode 100644
index 0000000..86595e8
--- /dev/null
+++ b/sysdeps/unix/sysv/hpux/bits/types.h
@@ -0,0 +1,147 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+#ifdef __GNUC__
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
+#else
+typedef struct
+ {
+ long int __val[2];
+ } __quad_t;
+typedef struct
+ {
+ __u_long __val[2];
+ } __u_quad_t;
+#endif
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#ifdef __GNUC__
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
+#endif
+typedef __quad_t *__qaddr_t;
+
+typedef long int __dev_t; /* Type of device numbers. */
+typedef long int __uid_t; /* Type of user identifications. */
+typedef long int __gid_t; /* Type of group identifications. */
+typedef __u_long __ino_t; /* Type of file serial numbers. */
+typedef __u_short __mode_t; /* Type of file attribute bitmasks. */
+typedef short __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef long int __pid_t; /* Type of process identifications. */
+typedef long int __ssize_t; /* Type of a byte count, or error. */
+typedef __u_long __rlim_t; /* Type of resource counts. */
+typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */
+typedef long int __id_t; /* General type for ID. */
+
+typedef struct
+ {
+ long int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
+
+/* Everythin' else. */
+typedef long int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+
+typedef __u_long __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef long int __fd_mask;
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 2048
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. Otherwise avoid the name
+ from the global namespace. */
+#ifdef __USE_XOPEN
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
+#else
+ __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
+#endif
+ } __fd_set;
+
+
+typedef long int __key_t;
+
+/* Used in `struct shmid_ds'. */
+typedef unsigned short int __ipc_pid_t;
+
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef __u_long __blkcnt_t;
+typedef __u_quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef long int __fsblkcnt_t;
+typedef __quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef __u_long __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
+/* Type of file serial numbers. */
+typedef __u_long __ino64_t;
+
+/* Type of file sizes and offsets. */
+typedef __loff_t __off64_t;
+
+/* Used in XTI. */
+typedef int __t_scalar_t;
+typedef unsigned int __t_uscalar_t;
+
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+typedef int __intptr_t;
+
+#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a0688161bd579a3a62415db5a3e26e59628e7dd1
commit a0688161bd579a3a62415db5a3e26e59628e7dd1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 20:28:22 1999 +0000
HPUX stat buffer definition.
diff --git a/sysdeps/unix/sysv/hpux/bits/stat.h b/sysdeps/unix/sysv/hpux/bits/stat.h
new file mode 100644
index 0000000..4ef5e72
--- /dev/null
+++ b/sysdeps/unix/sysv/hpux/bits/stat.h
@@ -0,0 +1,123 @@
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER_SVR4 1
+#define _STAT_VER _STAT_VER_SVR4 /* The one defined below. */
+
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_SVR4 1
+#define _MKNOD_VER _MKNOD_VER_SVR4 /* The bits defined below. */
+
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+#ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino; /* File serial number. */
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+#ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+#else
+ __off64_t st_size; /* Size of file, in bytes. */
+#endif
+ unsigned long int st_blksize; /* Optimal block size for I/O. */
+
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#endif
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ unsigned long int st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int __unused1;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int __unused2;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int __unused3;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08316d230bc844b265930380d7b89ee1264bc3b4
commit 08316d230bc844b265930380d7b89ee1264bc3b4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 20:27:19 1999 +0000
HPUX setjmp buffer definition.
diff --git a/sysdeps/unix/sysv/hpux/bits/setjmp.h b/sysdeps/unix/sysv/hpux/bits/setjmp.h
new file mode 100644
index 0000000..216d7bd
--- /dev/null
+++ b/sysdeps/unix/sysv/hpux/bits/setjmp.h
@@ -0,0 +1,16 @@
+/* Define the machine-dependent type `jmp_buf'. Stub version. */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+/* XXX This should go into different files!!! */
+
+#ifdef __hp9000s300
+typedef int __jmp_buf[100];
+#endif /* __hp9000s300 */
+
+#ifdef __hp9000s800
+typedef double __jmp_buf[25];
+#endif /* __hp9000s800 */
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7dab346125c2a6060a895636418dc26dc60c4c8b
commit 7dab346125c2a6060a895636418dc26dc60c4c8b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 20:26:03 1999 +0000
HPUX error number definitions.
diff --git a/sysdeps/unix/sysv/hpux/bits/errno.h b/sysdeps/unix/sysv/hpux/bits/errno.h
new file mode 100644
index 0000000..9414fc7
--- /dev/null
+++ b/sysdeps/unix/sysv/hpux/bits/errno.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+#endif
+
+#ifdef _ERRNO_H
+#define EBADF 9
+#define ENOMEM 12
+#define EINVAL 22
+#define ERANGE 34
+#define ENOMSG 35
+#define ENOSYS 251
+#endif
+
+#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02043cd067997b6cbb14b5106c02a3adfd2e45cb
commit 02043cd067997b6cbb14b5106c02a3adfd2e45cb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 20:18:37 1999 +0000
Define endianess for HPPA.
diff --git a/sysdeps/hppa/bits/endian.h b/sysdeps/hppa/bits/endian.h
new file mode 100644
index 0000000..585db0c
--- /dev/null
+++ b/sysdeps/hppa/bits/endian.h
@@ -0,0 +1,7 @@
+/* hppa1.1 big-endian. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c1f89e9112d99f19119709e7289cce2f3e0d815
commit 8c1f89e9112d99f19119709e7289cce2f3e0d815
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 18:48:38 1999 +0000
Solaris dirent definition.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
new file mode 100644
index 0000000..cc6c999
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/dirent.h
@@ -0,0 +1,50 @@
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _DIRENT_H
+# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
+#endif
+
+struct dirent
+ {
+#ifndef __USE_FILE_OFFSET64
+ __ino_t d_ino;
+ __off_t d_off;
+#else
+ __ino64_t d_ino;
+ __off64_t d_off;
+#endif
+ unsigned short int d_reclen;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct dirent64
+ {
+ __ino64_t d_ino;
+ __off64_t d_off;
+ unsigned short int d_reclen;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+#endif
+
+#define d_fileno d_ino /* Backwards compatibility. */
+
+#undef _DIRENT_HAVE_D_NAMLEN
+#define _DIRENT_HAVE_D_RECLEN
+#define _DIRENT_HAVE_D_OFF
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42d9b8260ec95b761bf2c23b76a6a2b12a5f1f66
commit 42d9b8260ec95b761bf2c23b76a6a2b12a5f1f66
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 18:42:20 1999 +0000
getdents implementation for Solaris.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/getdents.c b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
new file mode 100644
index 0000000..2cf2a57
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/getdents.c
@@ -0,0 +1,114 @@
+/* Copyright (C) 1993,95,96,97,98 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <alloca.h>
+#include <dirent.h>
+#include <stddef.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/types.h>
+
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+
+
+extern int __getdents __P ((int fd, char *buf, size_t nbytes));
+
+/* For Solaris we need a special version of this file since the
+ definition of `struct dirent' is not the same for the kernel and
+ the libc. There is one additional field which might be introduced
+ in the kernel structure in the future.
+
+ He is the system definition of `struct dirent' as of 2.6: */
+
+struct kernel_dirent
+ {
+ ino_t d_ino;
+ off_t d_off;
+ unsigned short int d_reclen;
+ char d_name[256];
+ };
+
+#ifdef GETDENTS64
+#define __getdirentries __getdirentries64
+#define dirent dirent64
+#endif
+
+/* The problem here is that we cannot simply read the next NBYTES
+ bytes. We need to take the additional field into account. We use
+ some heuristic. Assuming the directory contains names with 14
+ characters on average we can compute an estimate number of entries
+ which fit in the buffer. Taking this number allows us to specify a
+ correct number of bytes to read. If we should be wrong, we can reset
+ the file descriptor. */
+ssize_t
+__getdirentries (int fd, char *buf, size_t nbytes, off_t *basep)
+{
+ off_t base = __lseek (fd, (off_t) 0, SEEK_CUR);
+ off_t last_offset = base;
+ size_t red_nbytes;
+ struct kernel_dirent *skdp, *kdp;
+ struct dirent *dp;
+ int retval;
+ const size_t size_diff = (offsetof (struct dirent, d_name)
+ - offsetof (struct kernel_dirent, d_name));
+
+ red_nbytes = nbytes - ((nbytes / (offsetof (struct dirent, d_name) + 14))
+ * size_diff);
+
+ dp = (struct dirent *) buf;
+ skdp = kdp = __alloca (red_nbytes);
+
+ retval = __getdents (fd, (char *) kdp, red_nbytes);
+
+ while ((char *) kdp < (char *) skdp + retval)
+ {
+ const size_t alignment = __alignof__ (struct dirent);
+ /* Since kdp->d_reclen is already aligned for the kernel structure
+ this may compute a value that is bigger than necessary. */
+ size_t new_reclen = ((kdp->d_reclen + size_diff + alignment - 1)
+ & ~(alignment - 1));
+ if ((char *) dp + new_reclen > buf + nbytes)
+ {
+ /* Our heuristic failed. We read too many entries. Reset
+ the stream. */
+ __lseek (fd, last_offset, SEEK_SET);
+ break;
+ }
+
+ last_offset = kdp->d_off;
+ dp->d_ino = kdp->d_ino;
+ dp->d_off = kdp->d_off;
+ dp->d_reclen = new_reclen;
+ dp->d_type = DT_UNKNOWN;
+ memcpy (dp->d_name, kdp->d_name,
+ kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
+
+ dp = (struct dirent *) ((char *) dp + new_reclen);
+ kdp = (struct kernel_dirent *) (((char *) kdp) + kdp->d_reclen);
+ }
+
+ if (basep)
+ *basep = base;
+
+ return (char *) dp - buf;
+}
+
+#ifndef GETDENTS64
+weak_alias (__getdirentries, getdirentries)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f77348a3802b173694b202b18033049697ad187
commit 3f77348a3802b173694b202b18033049697ad187
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 17:41:51 1999 +0000
Add missing underscore in _llseek entry.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 780a899..0939cda 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -37,7 +37,7 @@ socketpair - socketpair 4 __socketpair socketpair
#
# There are defined locally because the caller is also defined in this dir.
#
-s_llseek llseek _llseek 5 __syscall_llseek
+s_llseek llseek _llseek 5 __syscall__llseek
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90445b8a224dc963a852b1bc92cca22982a3c3fe
commit 90445b8a224dc963a852b1bc92cca22982a3c3fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 17:40:49 1999 +0000
Fix typo in execve entry.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index b6450a9..780a899 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -52,7 +52,7 @@ rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_execve execve execv 3 __syscall_execve
+s_execve execve execve 3 __syscall_execve
s_getcwd getcwd getcwd 2 __syscall_getcwd
s_getdents getdents getdents 3 __syscall_getdents
s_getpriority getpriority getpriority 2 __syscall_getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a839cb12e054e26506b721bf18aca731bbdbe24
commit 1a839cb12e054e26506b721bf18aca731bbdbe24
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 25 17:39:15 1999 +0000
Fix comment.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index b6237e9..7782c0b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -48,8 +48,8 @@ extern int *__errno_location __P ((void)) __attribute__ ((__const__));
#if !defined _ERRNO_H && defined __need_Emath
/* This is ugly but the kernel header is not clean enough. We must
- define only the values EDOM and ERANGE in case __need_Emath is
- defined. The value is the same for all Linux ports. */
+ define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
+ defined. */
# define EDOM 33 /* Math argument out of domain of function. */
# define EILSEQ 88 /* Illegal byte sequence. */
# define ERANGE 34 /* Math result not representable. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cc31184c87ae045b44210cac657981060e4cc49
commit 9cc31184c87ae045b44210cac657981060e4cc49
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 24 22:13:10 1999 +0000
Fix EILSEQ value changed in last patch.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
index 9412b23..b6237e9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/errno.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -51,6 +51,6 @@ extern int *__errno_location __P ((void)) __attribute__ ((__const__));
define only the values EDOM and ERANGE in case __need_Emath is
defined. The value is the same for all Linux ports. */
# define EDOM 33 /* Math argument out of domain of function. */
-# define EILSEQ 84 /* Illegal byte sequence. */
+# define EILSEQ 88 /* Illegal byte sequence. */
# define ERANGE 34 /* Math result not representable. */
#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61098fa137261cd5b157a3916404b6dd214c3e87
commit 61098fa137261cd5b157a3916404b6dd214c3e87
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 24 20:59:51 1999 +0000
Use __syscall_error.
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 4514d07..256b0a7 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -29,13 +29,13 @@
.ent name,0; \
name##:
-/* Note that while it's better structurally, going back to call syscall_error
+/* Note that while it's better structurally, going back to call __syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
-#ifdef __PIC__
+#ifdef PIC
#define PSEUDO(name, syscall_name, args) \
.align 2; \
- 99: la t9,syscall_error; \
+ 99: la t9,__syscall_error; \
jr t9; \
ENTRY(name) \
.set noreorder; \
@@ -49,7 +49,7 @@ syse1:
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
.align 2; \
- 99: j syscall_error; \
+ 99: j __syscall_error; \
ENTRY(name) \
.set noreorder; \
li v0, SYS_##syscall_name; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c79dd0e87d0c2ff7845dfcb57cf8895583618219
commit c79dd0e87d0c2ff7845dfcb57cf8895583618219
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 24 20:59:41 1999 +0000
Rewrite, don't declare errno here.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index fa88886..f3974bf 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1992,93,94,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,21 +21,59 @@
#define _ERRNO_H
#include <bits/errno.h>
- .bss
- .globl errno
-#ifdef __ELF__
- .type errno, @object
+#ifdef _LIBC_REENTRANT
+
+ENTRY(__syscall_error)
+#ifdef PIC
+ .set noreorder
+ .set noat
+ move $1, $31
+ bltzal $0, 0f
+ nop
+0: .cpload $31
+ move $31, $1
+ .set at
+ .set reorder
+#endif
+ subu sp, 32
+#ifdef __PIC__
+ .cprestore 16
+#endif
+ sw v0, 20(sp)
+ sw ra, 24(sp)
+
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ bne v0, EWOULDBLOCK_sys, skip
+ nop
+ li v0, EAGAIN
+skip:
#endif
- .size errno, 4
-errno:
- .space 4
+ /* Store it in the "real" variable ... */
+ sw v0, errno
-weak_alias (errno, _errno)
+ /* Find our per-thread errno address */
+ jal __errno_location
+
+ /* Store the error value. */
+ lw t0, 20(sp)
+ sw t0, 0(v0)
+
+ /* And just kick back a -1. */
+ lw ra, 24(sp)
+ addiu sp, 32
+ li v0, -1
+ j ra
+ END(__syscall_error)
+
+#else /* _LIBC_REENTRANT */
- .set noreorder
ENTRY(__syscall_error)
-#ifdef PIC
+#ifdef __PIC__
+ .set noreorder
.set noat
move $1, $31
bltzal $0, 0f
@@ -43,13 +81,13 @@ ENTRY(__syscall_error)
0: .cpload $31
move $31, $1
.set at
+ .set reorder
#endif
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
bne v0, EWOULDBLOCK_sys, skip
- nop
li v0, EAGAIN
skip:
#endif
@@ -57,10 +95,7 @@ skip:
sw v0, errno
/* And just kick back a -1. */
- j ra
li v0, -1
+ j ra
END(__syscall_error)
-
-/* We provide this alias for compatilility with other Unices
- like IRIX 5 */
-weak_alias (__syscall_error, syscall_error)
+#endif /* _LIBC_REENTRANT */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=143751489c604337d5f82fbf47fad4bbd3186a92
commit 143751489c604337d5f82fbf47fad4bbd3186a92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 24 20:35:50 1999 +0000
Use hexadecimal floating-point constants for gcc >= 2.95.
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
index 0e07bd5..1b236c4 100644
--- a/sysdeps/arm/bits/huge_val.h
+++ b/sysdeps/arm/bits/huge_val.h
@@ -1,7 +1,7 @@
/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
ARM version.
- Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,11 +29,19 @@
#ifdef __GNUC__
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+# define HUGE_VAL (0x1.0p2047)
+
+# else
+
+# define HUGE_VAL \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
{ __l: 0x000000007ff00000ULL }).__d)
+# endif
+
#else /* not GCC */
# include <endian.h>
@@ -59,11 +67,19 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
# ifdef __GNUC__
-# define HUGE_VALF \
+# if __GNUC_PREREQ(2,95)
+
+# define HUGE_VALF (0x1.0p255f)
+
+# else
+
+# define HUGE_VALF \
(__extension__ \
((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
{ __l: 0x7f800000UL }).__d)
+# endif
+
# else /* not GCC */
typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
index 822b829..14c0855 100644
--- a/sysdeps/m68k/bits/huge_val.h
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -1,6 +1,6 @@
/* `HUGE_VAL' constants for m68k (where it is infinity).
Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,11 +30,19 @@
#ifdef __GNUC__
-# define HUGE_VAL \
+# if __GNUC_PREREQ(2,95)
+
+# define HUGE_VAL (0x1.0p2047)
+
+# else
+
+# define HUGE_VAL \
(__extension__ \
((union { unsigned long long __l; double __d; }) \
{ __l: 0x7ff0000000000000ULL }).__d)
+# endif
+
#else /* not GCC */
static union { unsigned char __c[8]; double __d; } __huge_val =
@@ -48,28 +56,37 @@ static union { unsigned char __c[8]; double __d; } __huge_val =
#ifdef __USE_ISOC9X
-# ifdef __GNUC__
+# if __GNUC_PREREQ(2,95)
-# define HUGE_VALF \
+# define HUGE_VALF (0x1.0p255f)
+# define HUGE_VALL (0x1.0p32767L)
+
+# else
+
+# ifdef __GNUC__
+
+# define HUGE_VALF \
(__extension__ \
((union { unsigned long __l; float __f; }) \
{ __l: 0x7f800000UL }).__f)
-# define HUGE_VALL \
+# define HUGE_VALL \
(__extension__ \
((union { unsigned long __l[3]; long double __ld; }) \
{ __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
-# else /* not GCC */
+# else /* not GCC */
static union { unsigned char __c[4]; float __f; } __huge_valf =
{ { 0x7f, 0x80, 0, 0 } };
-# define HUGE_VALF (__huge_valf.__f)
+# define HUGE_VALF (__huge_valf.__f)
static union { unsigned char __c[12]; long double __ld; } __huge_vall =
{ { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
-# define HUGE_VALL (__huge_vall.__ld)
+# define HUGE_VALL (__huge_vall.__ld)
+
+# endif /* GCC. */
-# endif /* GCC. */
+# endif /* GCC 2.95. */
#endif /* __USE_ISOC9X. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e5a3fd89ac28defdd39c082b2d885da2ed9c5dd
commit 7e5a3fd89ac28defdd39c082b2d885da2ed9c5dd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 23 17:53:43 1999 +0000
Linux/MIPS specific error codes.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/errno.h b/sysdeps/unix/sysv/linux/mips/bits/errno.h
new file mode 100644
index 0000000..9412b23
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/errno.h
@@ -0,0 +1,56 @@
+/* Error constants. MIPS/Linux specific version.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _ERRNO_H
+
+# undef EDOM
+# undef EILSEQ
+# undef ERANGE
+# include <linux/errno.h>
+
+/* Linux has no ENOTSUP error code. */
+# define ENOTSUP EOPNOTSUPP
+
+# ifndef __ASSEMBLER__
+/* We now need a declaration of the `errno' variable. */
+extern int errno;
+
+/* Function to get address of global `errno' variable. */
+extern int *__errno_location __P ((void)) __attribute__ ((__const__));
+
+# if defined _LIBC
+/* We wouldn't need a special macro anymore but it is history. */
+# define __set_errno(val) (*__errno_location ()) = (val)
+# endif /* _LIBC */
+
+# if !defined _LIBC || defined _LIBC_REENTRANT
+/* When using threads, errno is a per-thread value. */
+# define errno (*__errno_location ())
+# endif
+# endif /* !__ASSEMBLER__ */
+#endif /* _ERRNO_H */
+
+#if !defined _ERRNO_H && defined __need_Emath
+/* This is ugly but the kernel header is not clean enough. We must
+ define only the values EDOM and ERANGE in case __need_Emath is
+ defined. The value is the same for all Linux ports. */
+# define EDOM 33 /* Math argument out of domain of function. */
+# define EILSEQ 84 /* Illegal byte sequence. */
+# define ERANGE 34 /* Math result not representable. */
+#endif /* !_ERRNO_H && __need_Emath */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=446548bb2820fca348f70a3d6a4bed5356b756da
commit 446548bb2820fca348f70a3d6a4bed5356b756da
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 23 17:43:28 1999 +0000
Define SIGCONTEXT_EXTRA_ARGS.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
index 3125e9b..19c35a4 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#define SIGCONTEXT struct sigcontext
+#define SIGCONTEXT_EXTRA_ARGS
#define GET_PC(ctx) ((void *) (ctx).sc_pc)
#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15])
#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30])
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index d92c9fa..51788e0 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
+#define SIGCONTEXT_EXTRA_ARGS _a2, _a3, _a4,
#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
index bdef810..86bf934 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998.
@@ -17,7 +17,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define SIGCONTEXT int code, struct sigcontext *
+#define SIGCONTEXT int _code, struct sigcontext *
+#define SIGCONTEXT_EXTRA_ARGS _code,
#define GET_PC(ctx) ((void *) (ctx)->sc_pc)
#define GET_FRAME(ctx) ((void *) __builtin_frame_address (1))
#define GET_STACK(ctx) ((void *) (ctx)->sc_usp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3013083aa3d07ea29a97393e62722d21ed45bcc0
commit 3013083aa3d07ea29a97393e62722d21ed45bcc0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 23 04:06:18 1999 +0000
Add execve syscall.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 434be84..b6450a9 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -52,6 +52,7 @@ rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_execve execve execv 3 __syscall_execve
s_getcwd getcwd getcwd 2 __syscall_getcwd
s_getdents getdents getdents 3 __syscall_getdents
s_getpriority getpriority getpriority 2 __syscall_getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10b20b58ab5112a6507ebe45e93b9e22f8bef755
commit 10b20b58ab5112a6507ebe45e93b9e22f8bef755
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 22 16:05:13 1999 +0000
Remove SGI specific calls, add RTLD_LOCAL.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 8477b53..2939d9e 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -31,12 +31,7 @@
visible as if the object were linked directly into the program. */
#define RTLD_GLOBAL 0x004
-__BEGIN_DECLS
-
-/* Some SGI specific calls that aren't implemented yet. */
-extern void *sgidladd __P ((__const char *, int));
-extern void *sgidlopen_version __P ((__const char *, int, __const char *,
- int));
-extern char *sgigetdsoversion __P ((__const char *));
-
-__END_DECLS
+/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
+ The implementation does this by default and so we can define the
+ value to zero. */
+#define RTLD_LOCAL 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9661dd713dfecabc704a8766f9558a3d57f49e32
commit 9661dd713dfecabc704a8766f9558a3d57f49e32
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 22 16:04:24 1999 +0000
(SA_RESETHAND): Add it.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 855fe28..8d08027 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/MIPS's sigaction.
- Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,6 +60,7 @@ struct sigaction
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */
# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when
its handler is being executed. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0cabeaa3fdf785b7a1b7e0f255e9bb248df3b909
commit 0cabeaa3fdf785b7a1b7e0f255e9bb248df3b909
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 19 19:57:25 1999 +0000
Information how to access signal context on Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
new file mode 100644
index 0000000..3125e9b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define SIGCONTEXT struct sigcontext
+#define GET_PC(ctx) ((void *) (ctx).sc_pc)
+#define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15])
+#define GET_STACK(ctx) ((void *) (ctx).sc_regs[30])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f739f8a81ecb36242ea5f796a7e154a9cc3974b6
commit f739f8a81ecb36242ea5f796a7e154a9cc3974b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 07:47:37 1999 +0000
Define __blksize_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 4bc4319..d98ed8a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -59,8 +59,9 @@ typedef __int32_t __pid_t; /* Type of process identifications. */
typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
typedef __int64_t __rlim_t; /* Type of resource counts. */
typedef __int64_t __rlim64_t; /* "" (LFS) */
-typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
-typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
+typedef __uint32_t __blksize_t; /* Type to represnet block size. */
+typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
+typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */
typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */
typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index d7176c3..37c3f21 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -119,6 +119,9 @@ typedef int __key_t;
typedef long int __ipc_pid_t;
+/* Type to represent block size. */
+typedef long int __blksize_t;
+
/* Types from the Large File Support interface. */
/* Type to count number os disk blocks. */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 79713e7..1e7b50e 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -110,6 +110,9 @@ typedef struct
typedef unsigned long int __fd_mask;
+/* Type to represent block size. */
+typedef long int __blksize_t;
+
/* Types from the Large File Support interface. */
/* Type to count number os disk blocks. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=699679342689b25677368750fb6435e1c083b8fe
commit 699679342689b25677368750fb6435e1c083b8fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 07:46:54 1999 +0000
(struct stat): Use __blksize_t for st_blksize member.
(struct stat64): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index cb4ab78..e1dad32 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,7 +53,7 @@ struct stat
__blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */
int __pad2;
#endif
- unsigned int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
unsigned int st_flags;
unsigned int st_gen;
int __pad3;
@@ -76,7 +76,7 @@ struct stat64
__time_t st_mtime; /* Time of last modification. */
__time_t st_ctime; /* Time of last status change. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
- unsigned int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
unsigned int st_flags;
unsigned int st_gen;
int __pad3;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index f0afd5e..1379ea7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -66,7 +66,7 @@ struct stat
long int __reserved1;
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
- long int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
#ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
#else
@@ -104,7 +104,7 @@ struct stat64
long int __reserved1;
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
- long int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
char st_fstype[16]; /* Filesystem type name */
long int st_pad4[8];
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index ef93b7b..34cc328 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctime_usec;
- long int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
@@ -81,7 +81,7 @@ struct stat64
__time_t st_ctime; /* Time of last status change */
unsigned long int st_ctime_usec;
- long int st_blksize;
+ __blksize_t st_blksize;
__blkcnt64_t st_blocks;
char st_fstype[_ST_FSTYPSZ];
long int st_filler3[8];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=daacfe6797f32c40396cd9a996aba528d49959be
commit daacfe6797f32c40396cd9a996aba528d49959be
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 07:46:26 1999 +0000
(struct stat): Use __blksize_t for st_blksize member.
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
index 7084b4e..b73c23a 100644
--- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,7 +42,7 @@ struct stat
int st_ctime; /* Time of last status change. */
int st_ctime_usec;
- unsigned int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
index 104ad2f..4c6b729 100644
--- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +51,7 @@ struct stat
long int st_ctime; /* Time of last status change. */
unsigned long int st_ctime_usec;
- long int st_blksize; /* Optimal block size for I/O. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77c5dc9ed7419fc531f7d2627e0265340e00f340
commit 77c5dc9ed7419fc531f7d2627e0265340e00f340
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 07:43:39 1999 +0000
Include bits/types.h instead of sys/types.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 7b644e8..804e1ee 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 04bd3f0..fb989cc 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Mode bits for `msgget', `semget', and `shmget'. */
#define IPC_CREAT 01000 /* Create key if key does not exist. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0dd0e77c4c4be0cdb096d5ac9ae422ef2aea2ebe
commit 0dd0e77c4c4be0cdb096d5ac9ae422ef2aea2ebe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 03:39:59 1999 +0000
Make __useconds_t unsigned.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 096d920..4bc4319 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -76,7 +76,7 @@ typedef struct
typedef int __daddr_t; /* Type of a disk address. */
typedef char *__caddr_t; /* Type of a core address. */
typedef long int __time_t;
-typedef int __useconds_t;
+typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index e1c436f..d7176c3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -81,8 +81,8 @@ typedef struct
typedef int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
+typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
-typedef int __useconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index ec1142c..79713e7 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -79,7 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
-typedef int __useconds_t;
+typedef unsigned int __useconds_t;
typedef int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef int __key_t; /* Type of an IPC key */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=283cadf410fb23a1f35a7275375c886f85210e30
commit 283cadf410fb23a1f35a7275375c886f85210e30
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 18 01:18:14 1999 +0000
Define type __useconds_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 91b49a2..096d920 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -76,6 +76,7 @@ typedef struct
typedef int __daddr_t; /* Type of a disk address. */
typedef char *__caddr_t; /* Type of a core address. */
typedef long int __time_t;
+typedef int __useconds_t;
typedef long int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 4b63cf8..e1c436f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -82,6 +82,7 @@ typedef int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __suseconds_t;
+typedef int __useconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index b2eace3..ec1142c 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -79,6 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
+typedef int __useconds_t;
typedef int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef int __key_t; /* Type of an IPC key */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26de9a821bf629f0a8d137a2f0240ad0a1fcd3cb
commit 26de9a821bf629f0a8d137a2f0240ad0a1fcd3cb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 10 05:10:14 1999 +0000
Define ARM specific versions of VALID_ELF_HEADER, VALID_ELF_OSABI,
VALID_ELF_ABIVERSION.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index d112e3f..25e2f06 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -24,6 +24,14 @@
#include <sys/param.h>
+#define VALID_ELF_ABIVERSION(ver) (ver == 0)
+#define VALID_ELF_OSABI(osabi) \
+ (osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
+#define VALID_ELF_HEADER(hdr,exp,size) \
+ memcmp (hdr,exp,size-2) == 0 \
+ && VALID_ELF_OSABI (hdr[EI_OSABI]) \
+ && VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
+
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int __attribute__ ((unused))
elf_machine_matches_host (Elf32_Half e_machine)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a06c0af60ab2c89801a957e9c70e5b01f5423cc
commit 6a06c0af60ab2c89801a957e9c70e5b01f5423cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 6 17:23:00 1999 +0000
(O_DSYNC, O_RSYNC): New definitions.
(O_LARGEFILE): Define only if __USE_LARGEFILE64.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 5ed6d76..749becd 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -40,8 +40,11 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 0x1000
-#ifdef __USE_GNU
+#ifdef __USE_LARGEFILE64
# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+#endif
+
+#ifdef __USE_GNU
# define O_NOFOLLOW 0x4000 /* Do not follow links. */
# define O_DIRECT 0x8000 /* Direct disk access hint. */
# define O_DIRECTORY 0x10000 /* Must be a directory. */
@@ -49,6 +52,14 @@
#define O_NDELAY O_NONBLOCK
+/* For now Linux has no synchronisity options for data and read
+ operations. We define the symbols here but let them do the same as
+ O_SYNC since this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c93c0c6259666fe2ec2f5049b9d27defb89c1151
commit c93c0c6259666fe2ec2f5049b9d27defb89c1151
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 6 17:22:24 1999 +0000
(O_LARGEFILE): Define only if __USE_LARGEFILE64.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 1ed9944..312cd08 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -49,8 +49,10 @@
# define O_NOFOLLOW 0200000 /* Do not follow links. */
#endif
+#ifdef __USE_LARGEFILE64
/* Not necessary, files are always with 64bit off_t. */
-#define O_LARGEFILE 0
+# define O_LARGEFILE 0
+#endif
/* For now Linux has synchronisity options for data and read operations.
We define the symbols here but let them do the same as O_SYNC since
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d8af493840b404cc85e5b6dd558e1a57bb1508a
commit 1d8af493840b404cc85e5b6dd558e1a57bb1508a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 5 16:56:44 1999 +0000
(O_RSYNC, O_DSYNC): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 9f90ddf..1ed9944 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,6 +52,14 @@
/* Not necessary, files are always with 64bit off_t. */
#define O_LARGEFILE 0
+/* For now Linux has synchronisity options for data and read operations.
+ We define the symbols here but let them do the same as O_SYNC since
+ this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC O_SYNC /* Synchronize data. */
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#endif
+
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bad8d32c2825d17f99e49502dbcdd9b09d162b56
commit bad8d32c2825d17f99e49502dbcdd9b09d162b56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 4 16:00:23 1999 +0000
(GET_NPROCS_PARSER): Initialize result to one.
diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
index 8588903..27355b5 100644
--- a/sysdeps/unix/sysv/linux/alpha/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -20,35 +20,35 @@
/* We need to define a special parser for /proc/cpuinfo. */
-#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
- do \
- { \
- (RESULT) = 0; \
- /* Find the line that contains the information about the number of \
- active cpus. We don't have to fear extremely long lines since \
- the kernel will not generate them. 8192 bytes are really \
- enough. */ \
- while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
- if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
- break; \
- } \
+#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ /* Find the line that contains the information about the number of \
+ active cpus. We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really enough. \
+ If there is no "CPUs ..." line then we are on a UP system. */ \
+ (RESULT) = 1; \
+ while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
+ break; \
+ } \
while (0)
/* On the Alpha we can distinguish between the number of configured and
active cpus. */
-#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \
- do \
- { \
- (RESULT) = 0; \
- /* Find the line that contains the information about the number of \
- probed cpus. We don't have to fear extremely long lines since \
- the kernel will not generate them. 8192 bytes are really \
- enough. */ \
- while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
- if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
- break; \
- } \
+#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ /* Find the line that contains the information about the number of \
+ probed cpus. We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really enough. \
+ If there is no "CPUs ..." line then we are on a UP system. */ \
+ (RESULT) = 1; \
+ while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
+ if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
+ break; \
+ } \
while (0)
#include <sysdeps/unix/sysv/linux/getsysstats.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ed67a6c1dcc09aa5ced649867c5ede36673c0fb
commit 0ed67a6c1dcc09aa5ced649867c5ede36673c0fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 2 19:44:27 1999 +0000
Use new path for e_sqrt.c.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index 7b4e596..295a1c3 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -162,4 +162,4 @@ static double __full_ieee754_sqrt(double) __attribute__((unused));
#endif /* _IEEE_FP_INEXACT */
-#include <sysdeps/libm-ieee754/e_sqrt.c>
+#include <sysdeps/ieee754/dbl-64/e_sqrt.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d54eed1a9a8a723f264a1e1f2ce8f603662c8d23
commit d54eed1a9a8a723f264a1e1f2ce8f603662c8d23
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 31 06:09:30 1999 +0000
Linux/Alpha specific functions to read system information.
diff --git a/sysdeps/unix/sysv/linux/alpha/getsysstats.c b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
new file mode 100644
index 0000000..8588903
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getsysstats.c
@@ -0,0 +1,54 @@
+/* Determine various system internal values, Linux/Alpha version.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@suse.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* We need to define a special parser for /proc/cpuinfo. */
+#define GET_NPROCS_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ (RESULT) = 0; \
+ /* Find the line that contains the information about the number of \
+ active cpus. We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really \
+ enough. */ \
+ while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL) \
+ if (sscanf (BUFFER, "CPUs probed %*d active %d", &(RESULT)) == 1) \
+ break; \
+ } \
+ while (0)
+
+
+/* On the Alpha we can distinguish between the number of configured and
+ active cpus. */
+#define GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT) \
+ do \
+ { \
+ (RESULT) = 0; \
+ /* Find the line that contains the information about the number of \
+ probed cpus. We don't have to fear extremely long lines since \
+ the kernel will not generate them. 8192 bytes are really \
+ enough. */ \
+ while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL) \
+ if (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1) \
+ break; \
+ } \
+ while (0)
+
+#include <sysdeps/unix/sysv/linux/getsysstats.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cfc6b71c4d9f6d0ecadf40a068f7f89c9a203e9
commit 8cfc6b71c4d9f6d0ecadf40a068f7f89c9a203e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 27 05:47:28 1999 +0000
ELF type definitions for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h b/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h
new file mode 100644
index 0000000..e5aa4a0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/elfclass.h
@@ -0,0 +1,14 @@
+/* This file specifies the native word size of the machine, which indicates
+ the ELF file class used for executables and shared objects on this
+ machine. */
+
+#ifndef _LINK_H
+# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#define __ELF_NATIVE_CLASS __WORDSIZE
+
+/* Linux/Alpha is exceptional as it has .hash section with 64 bit entries. */
+typedef uint64_t Elf_Symndx;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d06391697775680459399a964858ecb2d328c158
commit d06391697775680459399a964858ecb2d328c158
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 27 05:06:25 1999 +0000
Correct types.
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index 3195e6c..d2b27cb 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,13 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
-extern int __pgrpsys __P ((int type, ...));
+extern pid_t __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
-int
+pid_t
__getpgid (pid)
pid_t pid;
{
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 4639632..d9d3e8f 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,14 +19,14 @@
#include <errno.h>
#include <unistd.h>
-extern int __pgrpsys __P ((int type, ...));
+extern int __pgrpsys __P ((pid_t type, ...));
/* Set the process group ID of the process matching PID to PGID.
If PID is zero, the current process's process group ID is set.
If PGID is zero, the process ID of the process is used. */
int
__setpgid (pid, pgid)
- int pid, pgid; /* XXX why not pid_t ? */
+ pid_t pid, pgid;
{
return __pgrpsys (5, pid, pgid);
}
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index 37998bf..638ab73 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,12 +19,12 @@
#include <errno.h>
#include <unistd.h>
-extern int __pgrpsys __P ((int type, ...));
+extern pid_t __pgrpsys __P ((int type, ...));
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
are set to the process ID of the calling process, which is returned. */
-int
+pid_t
__setsid ()
{
return __pgrpsys (3);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=078a1bd7067aab4683a72d773e89616764ce3db3
commit 078a1bd7067aab4683a72d773e89616764ce3db3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 27 00:18:20 1999 +0000
Define __clockid_t, __timer_t, CLOCK_REALTIME, and TIMER_ABSTIME.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index aeb03b6..bbf93f6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -39,6 +39,20 @@
# define CLK_TCK 1024
# endif
+/* Clock ID used in clock and timer functions. */
+typedef int __clockid_t;
+
+/* Timer ID returned by `timer_create'. */
+typedef int __timer_t;
+
+# ifdef __USE_POSIX199309
+/* Identifier for system-wide realtime clock. */
+# define CLOCK_REALTIME 0
+
+/* Flag to indicate time is absolute. */
+# define TIMER_ABSTIME 1
+# endif
+
# endif /* bits/time.h */
#endif /* !__need_timeval */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=773d8a5255671263a01af11e25b2d35db32d3f4d
commit 773d8a5255671263a01af11e25b2d35db32d3f4d
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jul 26 08:27:39 1999 +0000
* sysdeps/m68k/dl-machine.h (RTLD_START): Call pre-init funtions.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index f9f9bf7..e3ebca5 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -181,6 +181,20 @@ _dl_start_user:
0: | Push the searchlist of the main object as argument in
| the _dl_init_next call below.
move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2
+ | First dun the pre-initializers.
+0: move.l %d2, -(%sp)
+ | Call _dl_preinit_next to return the address of an pre-initializer
+ | function to run.
+ bsr.l _dl_preinit_next@PLTPC
+ add.l #4, %sp | Pop argument.
+ | Check for zero return, when out of pre-initializers.
+ tst.l %d0
+ jeq 0f
+ | Call the shared object pre-initializer function.
+ move.l %d0, %a0
+ jsr (%a0)
+ | Loop to call _dl_preinit_next for the next pre-initializer.
+ jra 0b
0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=893f3d106f7ef4d98c0fb279aa05c55d3a310a21
commit 893f3d106f7ef4d98c0fb279aa05c55d3a310a21
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 21 16:57:52 1999 +0000
1999-07-21 Roland McGrath <roland@baalperazim.frob.com>
* elf/dl-reloc.c (_dl_reloc_bad_type): New function.
* elf/ldsodefs.h: Declare it.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Use it
instead of assert.
(elf_machine_lazy_rel): Likewise. Take new arg MAP.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_rel): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/mips/mips64/dl-machine.h (elf_machine_rel): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/generic/dl-machine.h (elf_machine_rel): Likewise.
* sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise.
(elf_machine_lazy_rel): Likewise.
* sysdeps/powerpc/dl-machine.h (elf_machine_lazy_rel): Likewise.
* sysdeps/powerpc/dl-machine.c (__process_machine_rela): Use
_dl_reloc_bad_type instead of _dl_signal_error.
* elf/do-rel.h (elf_dynamic_do_rel): Pass MAP to elf_machine_lazy_rel.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 21059f5..78a6f50 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -26,7 +26,6 @@
#define ELF_MACHINE_NAME "alpha"
-#include <assert.h>
#include <string.h>
@@ -490,12 +489,13 @@ elf_machine_rela (struct link_map *map,
*reloc_addr = sym_value;
}
else
- assert (! "unexpected dynamic reloc type");
+ _dl_reloc_bad_type (map, r_type, 0);
}
}
static inline void
-elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc)
+elf_machine_lazy_rel (struct link_map *map,
+ Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset);
unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
@@ -509,7 +509,7 @@ elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc)
else if (r_type == R_ALPHA_NONE)
return;
else
- assert (! "unexpected PLT reloc type");
+ _dl_reloc_bad_type (map, r_type, 1);
}
#endif /* RESOLVE */
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 754a6ca..d112e3f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -24,8 +24,6 @@
#include <sys/param.h>
-#include <assert.h>
-
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int __attribute__ ((unused))
elf_machine_matches_host (Elf32_Half e_machine)
@@ -438,19 +436,22 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
}
default:
- assert (! "unexpected dynamic reloc type");
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
break;
}
}
}
static inline void
-elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
+elf_machine_lazy_rel (struct link_map *map,
+ Elf32_Addr l_addr, const Elf32_Rel *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
/* Check for unexpected PLT reloc type. */
- assert (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT);
- *reloc_addr += l_addr;
+ if (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT)
+ *reloc_addr += l_addr;
+ else
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
}
#endif /* RESOLVE */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index afa68ef..f9f9bf7 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -24,8 +24,6 @@
#include <sys/param.h>
-#include <assert.h>
-
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int
elf_machine_matches_host (Elf32_Half e_machine)
@@ -313,18 +311,21 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
case R_68K_NONE: /* Alright, Wilbur. */
break;
default:
- assert (! "unexpected dynamic reloc type");
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 0);
break;
}
}
}
static inline void
-elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
+elf_machine_lazy_rel (struct link_map *map,
+ Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
- assert (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT);
- *reloc_addr += l_addr;
+ if (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT)
+ *reloc_addr += l_addr;
+ else
+ _dl_reloc_bad_type (map, ELF32_R_TYPE (reloc->r_info), 1);
}
#endif /* RESOLVE */
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 6896e53..5811b78 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -25,7 +25,6 @@
#define ELF_MACHINE_NO_PLT
-#include <assert.h>
#include <entry.h>
#ifndef ENTRY_POINT
@@ -567,13 +566,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
default:
- assert (! "unexpected dynamic reloc type");
+ _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
break;
}
}
static inline void
-elf_machine_lazy_rel (ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
+elf_machine_lazy_rel (struct link_map *map,
+ ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
/* Do nothing. */
}
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index e2b62b8..f200fcd 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -25,7 +25,6 @@
#define ELF_MACHINE_NO_PLT
-#include <assert.h>
#include <entry.h>
#ifndef ENTRY_POINT
@@ -562,13 +561,14 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
default:
- assert (! "unexpected dynamic reloc type");
+ _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 0);
break;
}
}
static inline void
-elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+elf_machine_lazy_rel (struct link_map *map, ElfW(Addr) l_addr,
+ const ElfW(Rel) *reloc)
{
/* Do nothing. */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22b137b9fd64a3ee1591c7d97dad455cd14c4947
commit 22b137b9fd64a3ee1591c7d97dad455cd14c4947
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 18 00:25:28 1999 +0000
Undo last change.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 7f97893..3a412cc 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -4,8 +4,4 @@ libc {
inb; inw; inl;
outb; outw; outl;
}
- GLIBC_2.1.2 {
- _inb; _inw; _inl;
- _outb; _outw; _outl;
- }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a16d32a64fb75625da9bab90b2bc338a6f678c1
commit 9a16d32a64fb75625da9bab90b2bc338a6f678c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 17 23:18:23 1999 +0000
(timeval): Use __suseconds_t type for tv_usec element.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index f44b5dc..aeb03b6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,7 +42,7 @@
# endif /* bits/time.h */
#endif /* !__need_timeval */
-#ifdef __need_timeval
+#ifdef __need_timeval
# undef __need_timeval
# ifndef _STRUCT_TIMEVAL
# define _STRUCT_TIMEVAL 1
@@ -53,7 +53,7 @@
struct timeval
{
__time_t tv_sec; /* Seconds. */
- __time_t tv_usec; /* Microseconds. */
+ __suseconds_t tv_usec; /* Microseconds. */
};
# endif /* struct timeval */
#endif /* need timeval */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b4ac6f26f2c2a97c1516104ec0329fc37d7569a8
commit b4ac6f26f2c2a97c1516104ec0329fc37d7569a8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 17 23:16:23 1999 +0000
Define __suseconds_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 0af9fb3..91b49a2 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -76,6 +76,7 @@ typedef struct
typedef int __daddr_t; /* Type of a disk address. */
typedef char *__caddr_t; /* Type of a core address. */
typedef long int __time_t;
+typedef long int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
typedef int __key_t; /* Type of a SYSV IPC key. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 51d9fcd..4b63cf8 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -81,6 +81,7 @@ typedef struct
typedef int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
+typedef long int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 8c4a13a..b2eace3 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -79,6 +79,7 @@ typedef unsigned int __id_t; /* General type for IDs. */
typedef long int __daddr_t; /* The type of a disk address. */
typedef char *__caddr_t;
typedef long int __time_t;
+typedef int __suseconds_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef int __key_t; /* Type of an IPC key */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9104c3e71b123117deeae0ad088ab655b8d7cf7
commit b9104c3e71b123117deeae0ad088ab655b8d7cf7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 15 11:51:36 1999 +0000
(_inb, _inw, _inl, _outb, _outw, _outl): Added to GLIBC_2.1.2.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 3a412cc..7f97893 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -4,4 +4,8 @@ libc {
inb; inw; inl;
outb; outw; outl;
}
+ GLIBC_2.1.2 {
+ _inb; _inw; _inl;
+ _outb; _outw; _outl;
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98a0c25a631e565b55ec4c1acff1abcda4fb72c1
commit 98a0c25a631e565b55ec4c1acff1abcda4fb72c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 14 00:29:21 1999 +0000
Add flt-32 and dbl-64.
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 5aeb9ae..9f60963 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,3 +1,4 @@
wordsize-32
# MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies
index 06b9091..25106df 100644
--- a/sysdeps/mips/mips64/Implies
+++ b/sysdeps/mips/mips64/Implies
@@ -1,3 +1,4 @@
wordsize-64
# MIPS uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ad8eb9f5e7f80bba64fcfe10cd537100634d109
commit 6ad8eb9f5e7f80bba64fcfe10cd537100634d109
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 14 00:28:43 1999 +0000
Adjusted for modified strtold extendability.
diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c
index dd7fbce..f756488 100644
--- a/sysdeps/m68k/strtold.c
+++ b/sysdeps/m68k/strtold.c
@@ -1,2 +1,2 @@
#define DENORM_EXP (MIN_EXP - 1)
-#include <sysdeps/generic/strtold.c>
+#include <sysdeps/ieee754/ldbl-96/strtold.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ca78edaed2504f43cefd140357c20bb968c9211
commit 3ca78edaed2504f43cefd140357c20bb968c9211
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 14 00:28:28 1999 +0000
Adjusted for modified printf_fphex extendability.
diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c
index 0e68b16..d021a09 100644
--- a/sysdeps/m68k/printf_fphex.c
+++ b/sysdeps/m68k/printf_fphex.c
@@ -1,2 +1,2 @@
#define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS
-#include <sysdeps/generic/printf_fphex.c>
+#include <sysdeps/ieee754/ldbl-96/printf_fphex.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb302d68955d86493cf188933e80169d8224eaa6
commit eb302d68955d86493cf188933e80169d8224eaa6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 14 00:27:51 1999 +0000
Add flt-32, dbl-64, and ldbl-96.
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
index 09dd873..b64e753 100644
--- a/sysdeps/m68k/Implies
+++ b/sysdeps/m68k/Implies
@@ -1,3 +1,5 @@
wordsize-32
# 68k uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
+ieee754/ldbl-96
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e19b39916e7098a1f528aea63340314916d06084
commit e19b39916e7098a1f528aea63340314916d06084
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 13 23:43:10 1999 +0000
Add ieee754/flt-32 and ieee754/dbl-64.
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
index 37fee79..2c6af5b 100644
--- a/sysdeps/alpha/Implies
+++ b/sysdeps/alpha/Implies
@@ -1,3 +1,4 @@
wordsize-64
-# Alpha uses IEEE 754 floating point.
-ieee754
+# Alpha uses IEEE 754 single and double precision floating point.
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/arm/Implies b/sysdeps/arm/Implies
index d6acf04..780c4e2 100644
--- a/sysdeps/arm/Implies
+++ b/sysdeps/arm/Implies
@@ -1,2 +1,3 @@
wordsize-32
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies
index f8c4079..1d56974 100644
--- a/sysdeps/i960/Implies
+++ b/sysdeps/i960/Implies
@@ -1,2 +1,3 @@
# i960 family uses IEEE 754 floating point.
-ieee754
+ieee754/flt-32
+ieee754/dbl-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05246799a60cd0172f46e443f42b2054a9f9cded
commit 05246799a60cd0172f46e443f42b2054a9f9cded
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 6 16:06:12 1999 +0000
Update for some more motherboards.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index bd642e3..5b2edd0 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger.
@@ -86,11 +86,21 @@
#define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL)
#define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL)
+/* Polaris has SPARSE space, but we prefer to use only DENSE */
+/* because of some idiosyncracies in actually using SPARSE */
+#define POLARIS_IO_BASE (0xfffffcf9fc000000UL)
+#define POLARIS_DENSE_MEM (0xfffffcf900000000UL)
+
typedef enum {
IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2,
- IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_CPUDEP
+ IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_POLARIS,
+ IOSYS_CPUDEP, IOSYS_PCIDEP
} iosys_t;
+typedef enum {
+ IOSWIZZLE_JENSEN, IOSWIZZLE_SPARSE, IOSWIZZLE_DENSE
+} ioswizzle_t;
+
static struct io_system {
int hae_shift;
unsigned long int bus_memory_base;
@@ -105,7 +115,9 @@ static struct io_system {
/* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE},
/* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE},
/* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE},
-/* CPUDEP */ {0, 0, 0, 0},
+/* POLARIS */ {0, POLARIS_DENSE_MEM, 0, POLARIS_IO_BASE},
+/* CPUDEP */ {0, 0, 0, 0}, /* for platforms dependent on CPU type */
+/* PCIDEP */ {0, 0, 0, 0}, /* for platforms dependent on core logic */
};
static struct platform {
@@ -116,7 +128,7 @@ static struct platform {
{"Avanti", IOSYS_APECS},
{"XL", IOSYS_APECS},
{"Cabriolet", IOSYS_APECS},
- {"EB164", IOSYS_CIA},
+ {"EB164", IOSYS_PCIDEP},
{"EB64+", IOSYS_APECS},
{"EB66", IOSYS_APECS},
{"EB66P", IOSYS_APECS},
@@ -153,38 +165,27 @@ static struct {
unsigned long int sparse_bus_memory_base;
unsigned long int io_base;
iosys_t sys;
+ ioswizzle_t swiz;
int hae_shift;
} io;
extern void __sethae (unsigned long int); /* we can't use asm/io.h */
-
static inline unsigned long int
-port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size)
+port_to_cpu_addr (unsigned long int port, ioswizzle_t ioswiz, int size)
{
- if (iosys == IOSYS_JENSEN)
- return (port << 7) + ((size - 1) << 5) + io.base;
- else if (iosys == IOSYS_TSUNAMI)
+ if (ioswiz == IOSWIZZLE_SPARSE)
+ return (port << 5) + ((size - 1) << 3) + io.base;
+ else if (ioswiz == IOSWIZZLE_DENSE)
return port + io.base;
else
- return (port << 5) + ((size - 1) << 3) + io.base;
+ return (port << 7) + ((size - 1) << 5) + io.base;
}
-
static inline void
-inline_sethae (unsigned long int addr, iosys_t iosys)
+inline_sethae (unsigned long int addr, ioswizzle_t ioswiz)
{
- if (iosys == IOSYS_JENSEN)
- {
- /* hae on the Jensen is bits 31:25 shifted right */
- addr >>= 25;
- if (addr != io.hae.cache)
- {
- __sethae (addr);
- io.hae.cache = addr;
- }
- }
- else
+ if (ioswiz == IOSWIZZLE_SPARSE)
{
unsigned long int msb;
@@ -196,16 +197,25 @@ inline_sethae (unsigned long int addr, iosys_t iosys)
io.hae.cache = msb;
}
}
+ else
+ {
+ /* hae on the Jensen is bits 31:25 shifted right */
+ addr >>= 25;
+ if (addr != io.hae.cache)
+ {
+ __sethae (addr);
+ io.hae.cache = addr;
+ }
+ }
}
-
static inline void
-inline_outb (unsigned char b, unsigned long int port, iosys_t iosys)
+inline_outb (unsigned char b, unsigned long int port, ioswizzle_t ioswiz)
{
unsigned int w;
- unsigned long int addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 1);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
*(vuip)addr = w;
mb ();
@@ -213,12 +223,12 @@ inline_outb (unsigned char b, unsigned long int port, iosys_t iosys)
static inline void
-inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
+inline_outw (unsigned short int b, unsigned long int port, ioswizzle_t ioswiz)
{
unsigned int w;
- unsigned long int addr = port_to_cpu_addr (port, iosys, 2);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 2);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
*(vuip)addr = w;
mb ();
@@ -226,22 +236,22 @@ inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
static inline void
-inline_outl (unsigned int b, unsigned long int port, iosys_t iosys)
+inline_outl (unsigned int b, unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
*(vuip)addr = b;
mb ();
}
static inline unsigned int
-inline_inb (unsigned long int port, iosys_t iosys)
+inline_inb (unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int result, addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 1);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
result = *(vuip) addr;
result >>= (port & 3) * 8;
return 0xffUL & result;
@@ -249,11 +259,11 @@ inline_inb (unsigned long int port, iosys_t iosys)
static inline unsigned int
-inline_inw (unsigned long int port, iosys_t iosys)
+inline_inw (unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int result, addr = port_to_cpu_addr (port, iosys, 2);
+ unsigned long int result, addr = port_to_cpu_addr (port, ioswiz, 2);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
result = *(vuip) addr;
result >>= (port & 3) * 8;
return 0xffffUL & result;
@@ -261,11 +271,11 @@ inline_inw (unsigned long int port, iosys_t iosys)
static inline unsigned int
-inline_inl (unsigned long int port, iosys_t iosys)
+inline_inl (unsigned long int port, ioswizzle_t ioswiz)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = port_to_cpu_addr (port, ioswiz, 4);
- inline_sethae (0, iosys);
+ inline_sethae (0, ioswiz);
return *(vuip) addr;
}
@@ -274,115 +284,115 @@ inline_inl (unsigned long int port, iosys_t iosys)
* and whose core logic supports I/O space accesses utilizing them.
*
* These routines could be used by MIATA, for example, because it has
- * and EV56 plus PYXIS, but it currently uses SPARSE anyway.
+ * and EV56 plus PYXIS, but it currently uses SPARSE anyway. This is
+ * also true of RX164 which used POLARIS, but we will choose to use
+ * these routines in that case instead of SPARSE.
*
* These routines are necessary for TSUNAMI/TYPHOON based platforms,
* which will have (at least) EV6.
*/
+static inline unsigned long int
+dense_port_to_cpu_addr (unsigned long int port)
+{
+ return port + io.base;
+}
+
static inline void
-inline_bwx_outb (unsigned char b, unsigned long int port, iosys_t iosys)
+inline_bwx_outb (unsigned char b, unsigned long int port)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
__asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b));
mb ();
}
-
static inline void
-inline_bwx_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
+inline_bwx_outw (unsigned short int b, unsigned long int port)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
__asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b));
mb ();
}
-
static inline void
-inline_bwx_outl (unsigned int b, unsigned long int port, iosys_t iosys)
+inline_bwx_outl (unsigned int b, unsigned long int port)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
*(vuip)addr = b;
mb ();
}
-
static inline unsigned int
-inline_bwx_inb (unsigned long int port, iosys_t iosys)
+inline_bwx_inb (unsigned long int port)
{
- unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int r, addr = dense_port_to_cpu_addr (port);
__asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr));
return 0xffUL & r;
}
-
static inline unsigned int
-inline_bwx_inw (unsigned long int port, iosys_t iosys)
+inline_bwx_inw (unsigned long int port)
{
- unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int r, addr = dense_port_to_cpu_addr (port);
__asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr));
return 0xffffUL & r;
}
-
static inline unsigned int
-inline_bwx_inl (unsigned long int port, iosys_t iosys)
+inline_bwx_inl (unsigned long int port)
{
- unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = dense_port_to_cpu_addr (port);
return *(vuip) addr;
}
+/* macros to define routines with appropriate names and functions */
-#define DCL_SETHAE(name, iosys) \
-static void \
-name##_sethae (unsigned long int addr) \
-{ \
- inline_sethae (addr, IOSYS_##iosys); \
+/* these do either SPARSE or JENSEN swizzle */
+
+#define DCL_SETHAE(name, ioswiz) \
+static void \
+name##_sethae (unsigned long int addr) \
+{ \
+ inline_sethae (addr, IOSWIZZLE_##ioswiz); \
}
-#define DCL_OUT(name, func, type, iosys) \
+#define DCL_OUT(name, func, type, ioswiz) \
static void \
name##_##func (unsigned type b, unsigned long int addr) \
{ \
- inline_##func (b, addr, IOSYS_##iosys); \
+ inline_##func (b, addr, IOSWIZZLE_##ioswiz); \
}
-
-#define DCL_IN(name, func, iosys) \
+#define DCL_IN(name, func, ioswiz) \
static unsigned int \
name##_##func (unsigned long int addr) \
{ \
- return inline_##func (addr, IOSYS_##iosys); \
+ return inline_##func (addr, IOSWIZZLE_##ioswiz); \
}
-#define DCL_SETHAE_IGNORE(name, iosys) \
-static void \
-name##_sethae (unsigned long int addr) \
-{ \
-/* do nothing */ \
-}
+/* these do DENSE, so no swizzle is needed */
-#define DCL_OUT_BWX(name, func, type, iosys) \
+#define DCL_OUT_BWX(name, func, type) \
static void \
name##_##func (unsigned type b, unsigned long int addr) \
{ \
- inline_bwx_##func (b, addr, IOSYS_##iosys); \
+ inline_bwx_##func (b, addr); \
}
-
-#define DCL_IN_BWX(name, func, iosys) \
+#define DCL_IN_BWX(name, func) \
static unsigned int \
name##_##func (unsigned long int addr) \
{ \
- return inline_bwx_##func (addr, IOSYS_##iosys); \
+ return inline_bwx_##func (addr); \
}
+/* now declare/define the necessary routines */
DCL_SETHAE(jensen, JENSEN)
DCL_OUT(jensen, outb, char, JENSEN)
@@ -392,25 +402,22 @@ DCL_IN(jensen, inb, JENSEN)
DCL_IN(jensen, inw, JENSEN)
DCL_IN(jensen, inl, JENSEN)
-/* The APECS functions are also used for CIA since they are
- identical. */
-
-DCL_SETHAE(apecs, APECS)
-DCL_OUT(apecs, outb, char, APECS)
-DCL_OUT(apecs, outw, short int, APECS)
-DCL_OUT(apecs, outl, int, APECS)
-DCL_IN(apecs, inb, APECS)
-DCL_IN(apecs, inw, APECS)
-DCL_IN(apecs, inl, APECS)
-
-DCL_SETHAE_IGNORE(tsunami, TSUNAMI)
-DCL_OUT_BWX(tsunami, outb, char, TSUNAMI)
-DCL_OUT_BWX(tsunami, outw, short int, TSUNAMI)
-DCL_OUT_BWX(tsunami, outl, int, TSUNAMI)
-DCL_IN_BWX(tsunami, inb, TSUNAMI)
-DCL_IN_BWX(tsunami, inw, TSUNAMI)
-DCL_IN_BWX(tsunami, inl, TSUNAMI)
-
+DCL_SETHAE(sparse, SPARSE)
+DCL_OUT(sparse, outb, char, SPARSE)
+DCL_OUT(sparse, outw, short int, SPARSE)
+DCL_OUT(sparse, outl, int, SPARSE)
+DCL_IN(sparse, inb, SPARSE)
+DCL_IN(sparse, inw, SPARSE)
+DCL_IN(sparse, inl, SPARSE)
+
+DCL_OUT_BWX(dense, outb, char)
+DCL_OUT_BWX(dense, outw, short int)
+DCL_OUT_BWX(dense, outl, int)
+DCL_IN_BWX(dense, inb)
+DCL_IN_BWX(dense, inw)
+DCL_IN_BWX(dense, inl)
+
+/* define the "swizzle" switch */
static struct ioswtch ioswtch[] = {
{
jensen_sethae,
@@ -418,18 +425,63 @@ static struct ioswtch ioswtch[] = {
jensen_inb, jensen_inw, jensen_inl
},
{
- apecs_sethae,
- apecs_outb, apecs_outw, apecs_outl,
- apecs_inb, apecs_inw, apecs_inl
+ sparse_sethae,
+ sparse_outb, sparse_outw, sparse_outl,
+ sparse_inb, sparse_inw, sparse_inl
},
{
- tsunami_sethae,
- tsunami_outb, tsunami_outw, tsunami_outl,
- tsunami_inb, tsunami_inw, tsunami_inl
+ NULL,
+ dense_outb, dense_outw, dense_outl,
+ dense_inb, dense_inw, dense_inl
}
};
+/* routine to process the /proc/cpuinfo information into the fields */
+/* that are required for correctly determining the platform parameters */
+
+char systype[256]; /* system type field */
+char sysvari[256]; /* system variation field */
+char cpumodel[256]; /* cpu model field */
+int got_type, got_vari, got_model;
+
+static int
+process_cpuinfo(void)
+{
+ char dummy[256];
+ FILE * fp;
+ fp = fopen (PATH_CPUINFO, "r");
+ if (!fp)
+ return 0;
+
+ got_type = got_vari = got_model = 0;
+ systype[0] = sysvari[0] = cpumodel[0] = 0;
+
+ while (1)
+ {
+ if (fgets (dummy, 256, fp) == NULL) break;
+ /* fprintf(stderr, "read: %s", dummy); */
+ if (!got_type &&
+ sscanf (dummy, "system type : %256[^\n]\n", systype) == 1)
+ got_type = 1;
+ if (!got_vari &&
+ sscanf (dummy, "system variation : %256[^\n]\n", sysvari) == 1)
+ got_vari = 1;
+ if (!got_model &&
+ sscanf (dummy, "cpu model : %256[^\n]\n", cpumodel) == 1)
+ got_model = 1;
+ }
+
+ fclose (fp);
+
+#if 1
+ fprintf(stderr, "system type: %s\n", systype);
+ fprintf(stderr, "system vari: %s\n", sysvari);
+ fprintf(stderr, "cpu model: %s\n", cpumodel);
+#endif
+
+ return got_type+got_vari+got_model;
+}
/*
* Initialize I/O system. To determine what I/O system we're dealing
* with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE,
@@ -443,7 +495,6 @@ static struct ioswtch ioswtch[] = {
static int
init_iosys (void)
{
- char systype[256];
int i, n;
n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1);
@@ -456,7 +507,8 @@ init_iosys (void)
&io.bus_memory_base, &io.sparse_bus_memory_base) == 4)
{
io.sys = IOSYS_UNKNOWN;
- io.swp = &ioswtch[1];
+ io.swiz = IOSWIZZLE_SPARSE;
+ io.swp = &ioswtch[IOSWIZZLE_SPARSE];
return 0;
}
/* else we're likely going to fail with the system match below */
@@ -464,22 +516,9 @@ init_iosys (void)
}
else
{
- FILE * fp;
+ n = process_cpuinfo();
- fp = fopen (PATH_CPUINFO, "r");
- if (!fp)
- return -1;
- while ((n = fscanf (fp, "system type : %256[^\n]\n", systype))
- != EOF)
- {
- if (n == 1)
- break;
- else
- fgets (systype, 256, fp);
- }
- fclose (fp);
-
- if (n == EOF)
+ if (!n)
{
/* this can happen if the format of /proc/cpuinfo changes... */
fprintf (stderr,
@@ -497,35 +536,23 @@ init_iosys (void)
{
io.sys = platform[i].io_sys;
/* some platforms can have either EV4 or EV5 CPUs */
- if (io.sys == IOSYS_CPUDEP)
+ if (io.sys == IOSYS_CPUDEP) /* SABLE or MIKASA or NORITAKE so far */
{
- FILE * fp;
- char cputype[256];
- fp = fopen (PATH_CPUINFO, "r");
- if (fp == NULL)
- return -1;
- while ((n = fscanf (fp, "cpu model : %256[^\n]\n", cputype))
- != EOF
- && n != 1)
- fgets (cputype, 256, fp);
-
- fclose (fp);
-
if (strcmp (platform[i].name, "Sable") == 0)
{
- if (strncmp (cputype, "EV4", 3) == 0)
+ if (strncmp (cpumodel, "EV4", 3) == 0)
io.sys = IOSYS_T2;
- else if (strncmp (cputype, "EV5", 3) == 0)
+ else if (strncmp (cpumodel, "EV5", 3) == 0)
io.sys = IOSYS_GAMMA;
}
else
- {
- if (strncmp (cputype, "EV4", 3) == 0)
+ { /* this covers MIKASA/NORITAKE */
+ if (strncmp (cpumodel, "EV4", 3) == 0)
io.sys = IOSYS_APECS;
- else if (strncmp (cputype, "EV5", 3) == 0)
+ else if (strncmp (cpumodel, "EV5", 3) == 0)
io.sys = IOSYS_CIA;
}
- if (n == EOF || io.sys == IOSYS_CPUDEP)
+ if (io.sys == IOSYS_CPUDEP)
{
/* This can happen if the format of /proc/cpuinfo changes.*/
fprintf (stderr, "ioperm.init_iosys(): Unable to determine"
@@ -534,23 +561,46 @@ init_iosys (void)
return -1;
}
}
+ /* some platforms can have different core logic chipsets */
+ if (io.sys == IOSYS_PCIDEP) /* EB164 so far */
+ {
+ if (strcmp (systype, "EB164") == 0)
+ {
+ if (strncmp (sysvari, "RX164", 5) == 0)
+ io.sys = IOSYS_POLARIS;
+ else
+ io.sys = IOSYS_CIA;
+ }
+ if (io.sys == IOSYS_PCIDEP)
+ {
+ /* This can happen if the format of /proc/cpuinfo changes.*/
+ fprintf (stderr, "ioperm.init_iosys(): Unable to determine"
+ " core logic chipset.\n");
+ __set_errno (ENODEV);
+ return -1;
+ }
+ }
io.hae_shift = io_system[io.sys].hae_shift;
io.bus_memory_base = io_system[io.sys].bus_memory_base;
io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base;
io.io_base = io_system[io.sys].bus_io_base;
if (io.sys == IOSYS_JENSEN)
- io.swp = &ioswtch[0];
- else if (io.sys == IOSYS_TSUNAMI)
- io.swp = &ioswtch[2];
+ io.swiz = IOSWIZZLE_JENSEN;
+ else if (io.sys == IOSYS_TSUNAMI || io.sys == IOSYS_POLARIS)
+ io.swiz = IOSWIZZLE_DENSE;
else
- io.swp = &ioswtch[1];
+ io.swiz = IOSWIZZLE_SPARSE;
+ io.swp = &ioswtch[io.swiz];
return 0;
}
}
/* systype is not a know platform name... */
__set_errno (EINVAL);
+#if 1
+ fprintf(stderr, "init_iosys: platform not recognized\n");
+#endif
return -1;
}
@@ -559,18 +609,29 @@ int
_ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
unsigned long int addr, len;
- int prot;
+ int prot, err;
- if (!io.swp && init_iosys () < 0)
+ if (!io.swp && init_iosys() < 0) {
+#if 1
+ fprintf(stderr, "ioperm: init_iosys() failed\n");
+#endif
return -1;
+ }
/* this test isn't as silly as it may look like; consider overflows! */
if (from >= MAX_PORT || from + num > MAX_PORT)
{
__set_errno (EINVAL);
+#if 1
+ fprintf(stderr, "ioperm: from/num out of range\n");
+#endif
return -1;
}
+#if 1
+ fprintf(stderr, "ioperm: turn_on %d io.base %ld\n", turn_on, io.base);
+#endif
+
if (turn_on)
{
if (!io.base)
@@ -579,19 +640,27 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
io.hae.reg = 0; /* not used in user-level */
io.hae.cache = 0;
- if (io.sys != IOSYS_TSUNAMI)
+ if (io.swiz != IOSWIZZLE_DENSE)
__sethae (io.hae.cache); /* synchronize with hw */
fd = open ("/dev/mem", O_RDWR);
- if (fd < 0)
+ if (fd < 0) {
+#if 1
+ fprintf(stderr, "ioperm: /dev/mem open failed\n");
+#endif
return -1;
+ }
- addr = port_to_cpu_addr (0, io.sys, 1);
- len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
+ addr = port_to_cpu_addr (0, io.swiz, 1);
+ len = port_to_cpu_addr (MAX_PORT, io.swiz, 1) - addr;
io.base =
(unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
fd, io.io_base);
close (fd);
+#if 1
+ fprintf(stderr, "ioperm: mmap of len 0x%lx returned 0x%lx\n",
+ len, io.base);
+#endif
if ((long) io.base == -1)
return -1;
}
@@ -605,10 +674,14 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
/* turnoff access to relevant pages: */
prot = PROT_NONE;
}
- addr = port_to_cpu_addr (from, io.sys, 1);
+ addr = port_to_cpu_addr (from, io.swiz, 1);
addr &= PAGE_MASK;
- len = port_to_cpu_addr (from + num, io.sys, 1) - addr;
- return mprotect ((void *) addr, len, prot);
+ len = port_to_cpu_addr (from + num, io.swiz, 1) - addr;
+ err = mprotect ((void *) addr, len, prot);
+#if 1
+ fprintf(stderr, "ioperm: mprotect returned %d\n", err);
+#endif
+ return err;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d38f39d0054f5528a589ef0b97fff978571b38f4
commit d38f39d0054f5528a589ef0b97fff978571b38f4
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Jun 26 18:11:01 1999 +0000
New file.
diff --git a/sysdeps/m68k/fpu/Dist b/sysdeps/m68k/fpu/Dist
new file mode 100644
index 0000000..e649e8d
--- /dev/null
+++ b/sysdeps/m68k/fpu/Dist
@@ -0,0 +1 @@
+mathimpl.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5da9d1244a543df757854911b09e48129e0b9ede
commit 5da9d1244a543df757854911b09e48129e0b9ede
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Jun 26 16:43:55 1999 +0000
* sysdeps/m68k/fpu/bits/mathinline.h: Move all libm internal
definitions...
* sysdeps/m68k/fpu/mathimpl.h: ... here. New file.
* sysdeps/m68k/fpu/e_acos.c: Include "mathimpl.h".
* sysdeps/m68k/fpu/e_atan2.c: Likewise.
* sysdeps/m68k/fpu/e_fmod.c: Likewise.
* sysdeps/m68k/fpu/e_pow.c: Likewise.
* sysdeps/m68k/fpu/e_scalb.c: Likewise.
* sysdeps/m68k/fpu/s_ccos.c: Likewise.
* sysdeps/m68k/fpu/s_ccosh.c: Likewise.
* sysdeps/m68k/fpu/s_cexp.c: Likewise.
* sysdeps/m68k/fpu/s_csin.c: Likewise.
* sysdeps/m68k/fpu/s_csinh.c: Likewise.
* sysdeps/m68k/fpu/s_ilogb.c: Likewise.
* sysdeps/m68k/fpu/s_llrint.c: Likewise.
* sysdeps/m68k/fpu/s_llrintf.c: Likewise.
* sysdeps/m68k/fpu/s_llrintl.c: Likewise.
* sysdeps/m68k/fpu/s_modf.c: Likewise.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index b1e2a75..c753fae 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -116,22 +116,6 @@
return __result; \
}
-#ifdef __LIBC_INTERNAL_MATH_INLINES
-/* ieee style elementary functions */
-/* These are internal to the implementation of libm. */
-__inline_mathop(__ieee754_acos, acos)
-__inline_mathop(__ieee754_asin, asin)
-__inline_mathop(__ieee754_cosh, cosh)
-__inline_mathop(__ieee754_sinh, sinh)
-__inline_mathop(__ieee754_exp, etox)
-__inline_mathop(__ieee754_exp2, twotox)
-__inline_mathop(__ieee754_exp10, tentox)
-__inline_mathop(__ieee754_log10, log10)
-__inline_mathop(__ieee754_log, logn)
-__inline_mathop(__ieee754_sqrt, sqrt)
-__inline_mathop(__ieee754_atanh, atanh)
-#endif
-
__inline_mathop(__atan, atan)
__inline_mathop(__cos, cos)
__inline_mathop(__sin, sin)
@@ -180,52 +164,9 @@ __inline_mathop(trunc, intrz)
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
/* This macro contains the definition for the rest of the inline
- functions, using __FLOAT_TYPE as the domain type and __S as the suffix
+ functions, using FLOAT_TYPE as the domain type and S as the suffix
for the function names. */
-#ifdef __LIBC_INTERNAL_MATH_INLINES
-/* Internally used functions. */
-# define __internal_inline_functions(float_type, s) \
-__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
- return __result; \
-}
-
-__internal_inline_functions (double,)
-__internal_inline_functions (float,f)
-__internal_inline_functions (long double,l)
-# undef __internal_inline_functions
-
-/* Get the m68881 condition codes, to quickly check multiple conditions. */
-static __inline__ unsigned long
-__m81_test (long double __val)
-{
- unsigned long __fpsr;
- __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
- return __fpsr;
-}
-
-/* Bit values returned by __m81_test. */
-# define __M81_COND_NAN (1 << 24)
-# define __M81_COND_INF (2 << 24)
-# define __M81_COND_ZERO (4 << 24)
-# define __M81_COND_NEG (8 << 24)
-
-#endif /* __LIBC_INTENRAL_MATH_INLINES */
-
-/* The rest of the functions are available to the user. */
-
#define __inline_functions(float_type, s) \
__m81_inline float_type \
__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 80803ff..4226b73 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
#ifndef FUNC
#define FUNC __ieee754_acos
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index 7b275b4..6a5af2a 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 9e59a43..9695a86 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
#ifndef FUNC
#define FUNC __ieee754_fmod
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index ee95a39..3dc3d81 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index ef1724b..22332ca 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/mathimpl.h b/sysdeps/m68k/fpu/mathimpl.h
new file mode 100644
index 0000000..a2785b2
--- /dev/null
+++ b/sysdeps/m68k/fpu/mathimpl.h
@@ -0,0 +1,93 @@
+/* Definitions of libc internal inline math functions implemented
+ by the m68881/2.
+ Copyright (C) 1991,92,93,94,96,97,98,99 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains the definitions of the inline math functions that
+ are only used internally inside libm, not visible to the user. */
+
+__inline_mathop (__ieee754_acos, acos)
+__inline_mathop (__ieee754_asin, asin)
+__inline_mathop (__ieee754_cosh, cosh)
+__inline_mathop (__ieee754_sinh, sinh)
+__inline_mathop (__ieee754_exp, etox)
+__inline_mathop (__ieee754_exp2, twotox)
+__inline_mathop (__ieee754_exp10, tentox)
+__inline_mathop (__ieee754_log10, log10)
+__inline_mathop (__ieee754_log, logn)
+__inline_mathop (__ieee754_sqrt, sqrt)
+__inline_mathop (__ieee754_atanh, atanh)
+
+__m81_defun (double, __ieee754_remainder, (double __x, double __y))
+{
+ double __result;
+ __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __ieee754_remainderf, (float __x, float __y))
+{
+ float __result;
+ __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (long double,
+ __ieee754_remainderl, (long double __x, long double __y))
+{
+ long double __result;
+ __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (double, __ieee754_fmod, (double __x, double __y))
+{
+ double __result;
+ __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __ieee754_fmodf, (float __x, float __y))
+{
+ float __result;
+ __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (long double,
+ __ieee754_fmodl, (long double __x, long double __y))
+{
+ long double __result;
+ __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+/* Get the m68881 condition codes, to quickly check multiple conditions. */
+static __inline__ unsigned long
+__m81_test (long double __val)
+{
+ unsigned long __fpsr;
+ __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
+ return __fpsr;
+}
+
+/* Bit values returned by __m81_test. */
+#define __M81_COND_NAN (1 << 24)
+#define __M81_COND_INF (2 << 24)
+#define __M81_COND_ZERO (4 << 24)
+#define __M81_COND_NEG (8 << 24)
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c
index fbd5ef5..6f1232f 100644
--- a/sysdeps/m68k/fpu/s_ccos.c
+++ b/sysdeps/m68k/fpu/s_ccos.c
@@ -1,5 +1,5 @@
/* Complex cosine function. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
index af75143..437d42d 100644
--- a/sysdeps/m68k/fpu/s_ccosh.c
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -1,5 +1,5 @@
/* Complex cosine hyperbole function. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index fcf87ed..899fdc4 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -1,5 +1,5 @@
/* Complex exponential function. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c
index 72214c4..11e217b 100644
--- a/sysdeps/m68k/fpu/s_csin.c
+++ b/sysdeps/m68k/fpu/s_csin.c
@@ -1,5 +1,5 @@
/* Complex sine function. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
index e829f4d..4dfbe12 100644
--- a/sysdeps/m68k/fpu/s_csinh.c
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -1,5 +1,5 @@
/* Complex sine hyperbole function. m68k fpu version
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index ef90946..15cff29 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
index 423939a..b733d77 100644
--- a/sysdeps/m68k/fpu/s_llrint.c
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -21,6 +21,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
long long int
__llrint (double x)
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c
index 0cd12c9..b9ba5a0 100644
--- a/sysdeps/m68k/fpu/s_llrintf.c
+++ b/sysdeps/m68k/fpu/s_llrintf.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -21,6 +21,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
long long int
__llrintf (float x)
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c
index 6f63e0b..c874bfd 100644
--- a/sysdeps/m68k/fpu/s_llrintl.c
+++ b/sysdeps/m68k/fpu/s_llrintl.c
@@ -1,6 +1,6 @@
/* Round argument to nearest integral value according to current rounding
direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -21,6 +21,7 @@
#include <math.h>
#include "math_private.h"
+#include "mathimpl.h"
long long int
__llrintl (long double x)
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 52ee64c..d19f2a7 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <math.h>
+#include "mathimpl.h"
#ifndef SUFF
#define SUFF
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad5ec55ca3fccbd4147d6a40ac3a2117c6490b2d
commit ad5ec55ca3fccbd4147d6a40ac3a2117c6490b2d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 21 13:00:14 1999 +0000
Correct counting of subsections.
diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h
index 34a538f..6ed2ee6 100644
--- a/sysdeps/alpha/atomicity.h
+++ b/sysdeps/alpha/atomicity.h
@@ -36,10 +36,10 @@ exchange_and_add (volatile uint32_t *mem, int val)
"addl %0,%4,%1\n\t"
"stl_c %1,%2\n\t"
"beq %1,2f\n"
- ".subsection 2\n"
+ ".subsection 1\n"
"2:\t"
"br 1b\n"
- ".subsection 1\n\t"
+ ".previous\n\t"
"mb\n\t"
"/* End exchange & add */"
: "=&r"(result), "=&r"(tmp), "=m"(*mem)
@@ -61,10 +61,10 @@ atomic_add (volatile uint32_t *mem, int val)
"addl %0,%3,%0\n\t"
"stl_c %0,%1\n\t"
"beq %0,2f\n\t"
- ".subsection 2\n"
+ ".subsection 1\n"
"2:\t"
"br 1b\n"
- ".subsection 1\n\t"
+ ".previous\n\t"
"mb\n\t"
"/* End exchange & add */"
: "=&r"(result), "=m"(*mem)
@@ -86,10 +86,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
"mov %3,%0\n\t"
"stq_c %0,%1\n\t"
"beq %0,2f\n\t"
- ".subsection 2\n"
+ ".subsection 1\n"
"2:\t"
"br 1b\n"
- ".subsection 1\n\t"
+ ".previous\n\t"
"3:\t"
"mb\n\t"
"/* End compare & swap */"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e261a74e1620973f340f4d7d769a5030c2db9445
commit e261a74e1620973f340f4d7d769a5030c2db9445
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 19 09:57:23 1999 +0000
Use __GNUC_PREREQ.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 681ea70..9207d52 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -75,7 +75,7 @@ __inline_copysign(copysign, double)
#undef __MATH_INLINE_copysign
-#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
+#if __GNUC_PREREQ (2, 8)
__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); }
__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); }
__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); }
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d1f7dc129fa500c4fb49e68e2acc44576afb52f
commit 4d1f7dc129fa500c4fb49e68e2acc44576afb52f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 19 09:47:58 1999 +0000
Include libintl.h.
diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c
index 18261e1..e4955e4 100644
--- a/sysdeps/mach/hurd/mips/dl-machine.c
+++ b/sysdeps/mach/hurd/mips/dl-machine.c
@@ -31,6 +31,7 @@
#include <stdarg.h>
#include <ctype.h>
#include <sys/stat.h>
+#include <libintl.h>
void weak_function
abort (void)
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
index 9a53960..5d3a9af 100644
--- a/sysdeps/unix/sysv/linux/arm/siglist.c
+++ b/sysdeps/unix/sysv/linux/arm/siglist.c
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <signal.h>
#include <sizes.h>
+#include <libintl.h>
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
# define SYS_SIGLIST __new_sys_siglist
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
index 5d642e4..fd8a503 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
@@ -17,6 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <stddef.h>
+#include <libintl.h>
/* This is a list of all known `errno' codes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56de49240cff9308effc28e08e39d5f26c442c9e
commit 56de49240cff9308effc28e08e39d5f26c442c9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 16 14:30:16 1999 +0000
sysmacros.h file for Linux/Alpha.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
new file mode 100644
index 0000000..ca5d44f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/sysmacros.h
@@ -0,0 +1,29 @@
+/* Definitions of macros to access `dev_t' values.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SYSMACROS_H
+#define _SYS_SYSMACROS_H 1
+
+/* For compatibility we provide alternative names. */
+#define major(dev) ((int)(((dev) >> 8) & 0xff))
+#define minor(dev) ((int)((dev) & 0xff))
+#define makedev(major, minor) ((((unsigned int) (major)) << 8) \
+ | ((unsigned int) (minor)))
+
+#endif /* sys/sysmacros.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a437ddb588e5591664a323adeea28316d151378
commit 0a437ddb588e5591664a323adeea28316d151378
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 15 11:51:17 1999 +0000
Add __sysctl.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 829f35e..ba20cd0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -55,7 +55,7 @@ setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
-sysctl - _sysctl 6 sysctl
+sysctl - _sysctl 6 __sysctl sysctl
getresuid - getresuid 3 getresuid
getresgid - getresgid 3 getresgid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55dec6d8651110241486f4ef490bbbbb9c40f7f3
commit 55dec6d8651110241486f4ef490bbbbb9c40f7f3
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jun 14 00:59:40 1999 +0000
New files, optimized for m68k.
diff --git a/sysdeps/m68k/memchr.S b/sysdeps/m68k/memchr.S
new file mode 100644
index 0000000..a1599f8
--- /dev/null
+++ b/sysdeps/m68k/memchr.S
@@ -0,0 +1,228 @@
+/* memchr (str, ch, n) -- Return pointer to first occurrence of CH in the
+ first N bytes of STR.
+ For Motorola 68000.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+ TEXT
+ENTRY(memchr)
+ /* Save the callee-saved registers we use. */
+ moveml R(d2)-R(d4),MEM_PREDEC(sp)
+
+ /* Get string pointer, character and length. */
+ movel MEM_DISP(sp,16),R(a0)
+ moveb MEM_DISP(sp,23),R(d0)
+ movel MEM_DISP(sp,24),R(d4)
+
+ /* Check if at least four bytes left to search. */
+ moveql #4,R(d1)
+ cmpl R(d1),R(d4)
+ bcs L(L6)
+
+ /* Distribute the character to all bytes of a longword. */
+ movel R(d0),R(d1)
+ lsll #8,R(d1)
+ moveb R(d0),R(d1)
+ movel R(d1),R(d0)
+ swap R(d0)
+ movew R(d1),R(d0)
+
+ /* First search for the character one byte at a time until the
+ pointer is aligned to a longword boundary. */
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+ subql #1,R(d4)
+ beq L(L7)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+ subql #1,R(d4)
+ beq L(L7)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+ subql #1,R(d4)
+ beq L(L7)
+
+L(L1:)
+ /* Load the magic bits. Unlike the generic implementation we can
+ use the carry bit as the fourth hole. */
+ movel #0xfefefeff,R(d3)
+
+ /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
+ change any of the hole bits of LONGWORD.
+
+ 1) Is this safe? Will it catch all the zero bytes?
+ Suppose there is a byte with all zeros. Any carry bits
+ propagating from its left will fall into the hole at its
+ least significant bit and stop. Since there will be no
+ carry from its most significant bit, the LSB of the
+ byte to the left will be unchanged, and the zero will be
+ detected.
+
+ 2) Is this worthwhile? Will it ignore everything except
+ zero bytes? Suppose every byte of LONGWORD has a bit set
+ somewhere. There will be a carry into bit 8. If bit 8
+ is set, this will carry into bit 16. If bit 8 is clear,
+ one of bits 9-15 must be set, so there will be a carry
+ into bit 16. Similarly, there will be a carry into bit
+ 24. If one of bits 24-31 is set, there will be a carry
+ into bit 32 (=carry flag), so all of the hole bits will
+ be changed.
+
+ 3) But wait! Aren't we looking for C, not zero?
+ Good point. So what we do is XOR LONGWORD with a longword,
+ each of whose bytes is C. This turns each byte that is C
+ into a zero. */
+
+ /* Still at least 4 bytes to search? */
+ subql #4,R(d4)
+ bcs L(L6)
+
+L(L2:)
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Still at least 4 bytes to search? */
+ subql #4,R(d4)
+ bcs L(L6)
+
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Still at least 4 bytes to search? */
+ subql #4,R(d4)
+ bcc L(L2)
+
+L(L6:)
+ /* Search one byte at a time in the remaining less than 4 bytes. */
+ andw #3,R(d4)
+ beq L(L7)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ subqw #1,R(d4)
+ beq L(L7)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ subqw #1,R(d4)
+ beq L(L7)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+
+L(L7:)
+ /* Return NULL. */
+ clrl R(d0)
+ movel R(d0),R(a0)
+ moveml MEM_POSTINC(sp),R(d2)-R(d4)
+ rts
+
+L(L8:)
+ /* We have a hit. Check to see which byte it was. First
+ compensate for the autoincrement in the loop. */
+ subql #4,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ /* Otherwise the fourth byte must equal C. */
+L(L9:)
+ movel R(a0),R(d0)
+ moveml MEM_POSTINC(sp),R(d2)-R(d4)
+ rts
+END(strchr)
+
+weak_alias (strchr, index)
diff --git a/sysdeps/m68k/rawmemchr.S b/sysdeps/m68k/rawmemchr.S
new file mode 100644
index 0000000..74eb1ca
--- /dev/null
+++ b/sysdeps/m68k/rawmemchr.S
@@ -0,0 +1,179 @@
+/* rawmemchr (str, ch) -- Return pointer to first occurrence of CH in STR.
+ For Motorola 68000.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+ TEXT
+ENTRY(__rawmemchr)
+ /* Save the callee-saved registers we use. */
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(d3),MEM_PREDEC(sp)
+
+ /* Get string pointer and character. */
+ movel MEM_DISP(sp,12),R(a0)
+ moveb MEM_DISP(sp,19),R(d0)
+
+ /* Distribute the character to all bytes of a longword. */
+ movel R(d0),R(d1)
+ lsll #8,R(d1)
+ moveb R(d0),R(d1)
+ movel R(d1),R(d0)
+ swap R(d0)
+ movew R(d1),R(d0)
+
+ /* First search for the character one byte at a time until the
+ pointer is aligned to a longword boundary. */
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+L(L1:)
+ /* Load the magic bits. Unlike the generic implementation we can
+ use the carry bit as the fourth hole. */
+ movel #0xfefefeff,R(d3)
+
+ /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
+ change any of the hole bits of LONGWORD.
+
+ 1) Is this safe? Will it catch all the zero bytes?
+ Suppose there is a byte with all zeros. Any carry bits
+ propagating from its left will fall into the hole at its
+ least significant bit and stop. Since there will be no
+ carry from its most significant bit, the LSB of the
+ byte to the left will be unchanged, and the zero will be
+ detected.
+
+ 2) Is this worthwhile? Will it ignore everything except
+ zero bytes? Suppose every byte of LONGWORD has a bit set
+ somewhere. There will be a carry into bit 8. If bit 8
+ is set, this will carry into bit 16. If bit 8 is clear,
+ one of bits 9-15 must be set, so there will be a carry
+ into bit 16. Similarly, there will be a carry into bit
+ 24. If one of bits 24-31 is set, there will be a carry
+ into bit 32 (=carry flag), so all of the hole bits will
+ be changed.
+
+ 3) But wait! Aren't we looking for C, not zero?
+ Good point. So what we do is XOR LONGWORD with a longword,
+ each of whose bytes is C. This turns each byte that is C
+ into a zero. */
+
+L(L2:)
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ beq L(L2)
+
+L(L8:)
+ /* We have a hit. Check to see which byte it was. First
+ compensate for the autoincrement in the loop. */
+ subql #4,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ cmpb MEM(a0),R(d0)
+ beq L(L9)
+ addql #1,R(a0)
+
+ /* Otherwise the fourth byte must equal C. */
+L(L9:)
+ movel R(a0),R(d0)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+ rts
+END(__rawmemchr)
+
+weak_alias (__rawmemchr, rawmemchr)
diff --git a/sysdeps/m68k/strchr.S b/sysdeps/m68k/strchr.S
new file mode 100644
index 0000000..45d02d0
--- /dev/null
+++ b/sysdeps/m68k/strchr.S
@@ -0,0 +1,257 @@
+/* strchr (str, ch) -- Return pointer to first occurrence of CH in STR.
+ For Motorola 68000.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+ TEXT
+ENTRY(strchr)
+ /* Save the callee-saved registers we use. */
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(d3),MEM_PREDEC(sp)
+
+ /* Get string pointer and character. */
+ movel MEM_DISP(sp,12),R(a0)
+ moveb MEM_DISP(sp,19),R(d0)
+
+ /* Distribute the character to all bytes of a longword. */
+ movel R(d0),R(d1)
+ lsll #8,R(d1)
+ moveb R(d0),R(d1)
+ movel R(d1),R(d0)
+ swap R(d0)
+ movew R(d1),R(d0)
+
+ /* First search for the character one byte at a time until the
+ pointer is aligned to a longword boundary. */
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+L(L1:)
+ /* Load the magic bits. Unlike the generic implementation we can
+ use the carry bit as the fourth hole. */
+ movel #0xfefefeff,R(d3)
+
+ /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
+ change any of the hole bits of LONGWORD.
+
+ 1) Is this safe? Will it catch all the zero bytes?
+ Suppose there is a byte with all zeros. Any carry bits
+ propagating from its left will fall into the hole at its
+ least significant bit and stop. Since there will be no
+ carry from its most significant bit, the LSB of the
+ byte to the left will be unchanged, and the zero will be
+ detected.
+
+ 2) Is this worthwhile? Will it ignore everything except
+ zero bytes? Suppose every byte of LONGWORD has a bit set
+ somewhere. There will be a carry into bit 8. If bit 8
+ is set, this will carry into bit 16. If bit 8 is clear,
+ one of bits 9-15 must be set, so there will be a carry
+ into bit 16. Similarly, there will be a carry into bit
+ 24. If one of bits 24-31 is set, there will be a carry
+ into bit 32 (=carry flag), so all of the hole bits will
+ be changed.
+
+ 3) But wait! Aren't we looking for C, not zero?
+ Good point. So what we do is XOR LONGWORD with a longword,
+ each of whose bytes is C. This turns each byte that is C
+ into a zero. */
+
+L(L2:)
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Next look for a NUL byte.
+ Restore original longword without reload. */
+ eorl R(d0),R(d1)
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not NUL. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit, and return NULL. */
+ bcc L(L3)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word was NUL
+ and we return NULL. Otherwise continue with the next longword. */
+ bne L(L3)
+
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Next look for a NUL byte.
+ Restore original longword without reload. */
+ eorl R(d0),R(d1)
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not NUL. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit, and return NULL. */
+ bcc L(L3)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word was NUL
+ and we return NULL. Otherwise continue with the next longword. */
+ beq L(L2)
+
+L(L3:)
+ /* Return NULL. */
+ clrl R(d0)
+ movel R(d0),R(a0)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+ rts
+
+L(L8:)
+ /* We have a hit. Check to see which byte it was. First
+ compensate for the autoincrement in the loop. */
+ subql #4,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L3)
+ addql #1,R(a0)
+
+ /* Otherwise the fourth byte must equal C. */
+L(L9:)
+ movel R(a0),R(d0)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+ rts
+END(strchr)
+
+weak_alias (strchr, index)
diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S
new file mode 100644
index 0000000..45e7616
--- /dev/null
+++ b/sysdeps/m68k/strchrnul.S
@@ -0,0 +1,250 @@
+/* strchrnul (str, ch) -- Return pointer to first occurrence of CH in STR
+ or the final NUL byte.
+ For Motorola 68000.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include "asm-syntax.h"
+
+ TEXT
+ENTRY(__strchrnul)
+ /* Save the callee-saved registers we use. */
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(d3),MEM_PREDEC(sp)
+
+ /* Get string pointer and character. */
+ movel MEM_DISP(sp,12),R(a0)
+ moveb MEM_DISP(sp,19),R(d0)
+
+ /* Distribute the character to all bytes of a longword. */
+ movel R(d0),R(d1)
+ lsll #8,R(d1)
+ moveb R(d0),R(d1)
+ movel R(d1),R(d0)
+ swap R(d0)
+ movew R(d1),R(d0)
+
+ /* First search for the character one byte at a time until the
+ pointer is aligned to a longword boundary. */
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+ movel R(a0),R(d1)
+ andw #3,R(d1)
+ beq L(L1)
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+L(L1:)
+ /* Load the magic bits. Unlike the generic implementation we can
+ use the carry bit as the fourth hole. */
+ movel #0xfefefeff,R(d3)
+
+ /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
+ change any of the hole bits of LONGWORD.
+
+ 1) Is this safe? Will it catch all the zero bytes?
+ Suppose there is a byte with all zeros. Any carry bits
+ propagating from its left will fall into the hole at its
+ least significant bit and stop. Since there will be no
+ carry from its most significant bit, the LSB of the
+ byte to the left will be unchanged, and the zero will be
+ detected.
+
+ 2) Is this worthwhile? Will it ignore everything except
+ zero bytes? Suppose every byte of LONGWORD has a bit set
+ somewhere. There will be a carry into bit 8. If bit 8
+ is set, this will carry into bit 16. If bit 8 is clear,
+ one of bits 9-15 must be set, so there will be a carry
+ into bit 16. Similarly, there will be a carry into bit
+ 24. If one of bits 24-31 is set, there will be a carry
+ into bit 32 (=carry flag), so all of the hole bits will
+ be changed.
+
+ 3) But wait! Aren't we looking for C, not zero?
+ Good point. So what we do is XOR LONGWORD with a longword,
+ each of whose bytes is C. This turns each byte that is C
+ into a zero. */
+
+L(L2:)
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Next look for a NUL byte.
+ Restore original longword without reload. */
+ eorl R(d0),R(d1)
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not NUL. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits. */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word was
+ NUL. Otherwise continue with the next longword. */
+ bne L(L8)
+
+ /* Get the longword in question. */
+ movel MEM_POSTINC(a0),R(d1)
+ /* XOR with the byte we search for. */
+ eorl R(d0),R(d1)
+
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not C. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word equals
+ C. */
+ bne L(L8)
+
+ /* Next look for a NUL byte.
+ Restore original longword without reload. */
+ eorl R(d0),R(d1)
+ /* Add the magic value. We get carry bits reported for each byte
+ which is not NUL. */
+ movel R(d3),R(d2)
+ addl R(d1),R(d2)
+
+ /* Check the fourth carry bit before it is clobbered by the next
+ XOR. If it is not set we have a hit. */
+ bcc L(L8)
+
+ /* We are only interested in carry bits that change due to the
+ previous add, so remove original bits */
+ eorl R(d1),R(d2)
+
+ /* Now test for the other three overflow bits.
+ Set all non-carry bits. */
+ orl R(d3),R(d2)
+ /* Add 1 to get zero if all carry bits were set. */
+ addql #1,R(d2)
+
+ /* If we don't get zero then at least one byte of the word was
+ NUL. Otherwise continue with the next longword. */
+ beq L(L2)
+
+L(L8:)
+ /* We have a hit. Check to see which byte it was. First
+ compensate for the autoincrement in the loop. */
+ subql #4,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+ moveb MEM(a0),R(d1)
+ cmpb R(d0),R(d1)
+ beq L(L9)
+ tstb R(d1)
+ beq L(L9)
+ addql #1,R(a0)
+
+ /* Otherwise the fourth byte must equal C or be NUL. */
+L(L9:)
+ movel R(a0),R(d0)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
+ rts
+END(__strchrnul)
+
+weak_alias (__strchrnul, strchrnul)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bfd3bd48147d1998d6ed09b10ddbf49854ef2ce6
commit bfd3bd48147d1998d6ed09b10ddbf49854ef2ce6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 9 13:03:40 1999 +0000
Remove advertising clause of copyright.
diff --git a/sysdeps/vax/bcopy.s b/sysdeps/vax/bcopy.s
index 43bb93d..186ad36 100644
--- a/sysdeps/vax/bcopy.s
+++ b/sysdeps/vax/bcopy.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s
index dff59ba..be61a97 100644
--- a/sysdeps/vax/bzero.s
+++ b/sysdeps/vax/bzero.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s
index 9f7ebc9..6272cfd 100644
--- a/sysdeps/vax/ffs.s
+++ b/sysdeps/vax/ffs.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
index b81c2bc..18120b0 100644
--- a/sysdeps/vax/memchr.s
+++ b/sysdeps/vax/memchr.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s
index f7e47de..e32fe24 100644
--- a/sysdeps/vax/memcmp.s
+++ b/sysdeps/vax/memcmp.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/memmove.s b/sysdeps/vax/memmove.s
index 8f897fa..7385441 100644
--- a/sysdeps/vax/memmove.s
+++ b/sysdeps/vax/memmove.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s
index 12b1f74..dda1486 100644
--- a/sysdeps/vax/memset.s
+++ b/sysdeps/vax/memset.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strcat.s b/sysdeps/vax/strcat.s
index 7cf8884..bfe64e6 100644
--- a/sysdeps/vax/strcat.s
+++ b/sysdeps/vax/strcat.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s
index 70025cc..d56cb4b 100644
--- a/sysdeps/vax/strchr.s
+++ b/sysdeps/vax/strchr.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strcmp.s b/sysdeps/vax/strcmp.s
index c9c5b47..479e14f 100644
--- a/sysdeps/vax/strcmp.s
+++ b/sysdeps/vax/strcmp.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strcpy.s b/sysdeps/vax/strcpy.s
index 56dbe57..1eb00ba 100644
--- a/sysdeps/vax/strcpy.s
+++ b/sysdeps/vax/strcpy.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strcspn.s b/sysdeps/vax/strcspn.s
index f7b0a99..155b783 100644
--- a/sysdeps/vax/strcspn.s
+++ b/sysdeps/vax/strcspn.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strlen.s b/sysdeps/vax/strlen.s
index 2b7e0a7..9479fbb 100644
--- a/sysdeps/vax/strlen.s
+++ b/sysdeps/vax/strlen.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strncat.s b/sysdeps/vax/strncat.s
index bcf29c1..2387d1b 100644
--- a/sysdeps/vax/strncat.s
+++ b/sysdeps/vax/strncat.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s
index 0758bd8..8d8f5d4 100644
--- a/sysdeps/vax/strncmp.s
+++ b/sysdeps/vax/strncmp.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strncpy.s b/sysdeps/vax/strncpy.s
index 03a09b7..ade70e9 100644
--- a/sysdeps/vax/strncpy.s
+++ b/sysdeps/vax/strncpy.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strpbrk.s b/sysdeps/vax/strpbrk.s
index 0d1b25e..4a0e541 100644
--- a/sysdeps/vax/strpbrk.s
+++ b/sysdeps/vax/strpbrk.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s
index 8731344..b0e482c 100644
--- a/sysdeps/vax/strrchr.s
+++ b/sysdeps/vax/strrchr.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strsep.s b/sysdeps/vax/strsep.s
index 9751acc..dcf2a7c 100644
--- a/sysdeps/vax/strsep.s
+++ b/sysdeps/vax/strsep.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strspn.s b/sysdeps/vax/strspn.s
index fc86af7..ca94482 100644
--- a/sysdeps/vax/strspn.s
+++ b/sysdeps/vax/strspn.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/strstr.s b/sysdeps/vax/strstr.s
index 2e53375..0283a57 100644
--- a/sysdeps/vax/strstr.s
+++ b/sysdeps/vax/strstr.s
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98226e08b5d4eb4edb3ac8b73bd4a766e955a747
commit 98226e08b5d4eb4edb3ac8b73bd4a766e955a747
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 8 21:15:39 1999 +0000
Remove advertising clause of copyright.
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h
index d4ee4ac..d18433c 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h
@@ -15,10 +15,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h
index 01f1f0c..50f8b7e 100644
--- a/sysdeps/vax/DEFS.h
+++ b/sysdeps/vax/DEFS.h
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e79468a241ef13b90888870eec02ab2ca39e0b56
commit e79468a241ef13b90888870eec02ab2ca39e0b56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 6 09:20:55 1999 +0000
(elf_machine_load_address): Fix problems with GOT addressing.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index aff8df2..754a6ca 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -52,22 +52,14 @@ elf_machine_dynamic (void)
/* Return the run-time load address of the shared object. */
-// patb
static inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void)
{
- Elf32_Addr addr;
- asm (" ldr ip,.L1
- ldr r3,.L3
- add r3, r3, sl
- ldr ip,[sl, ip]
- sub ip, r3, ip
- b .L2
- .L1: .word _dl_start(GOT)
- .L3: .word _dl_start(GOTOFF)
- .L2: mov %0, ip"
- : "=r" (addr) : : "ip", "r3");
- return addr;
+ extern void __dl_start asm ("_dl_start");
+ Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
+ Elf32_Addr pcrel_addr;
+ asm ("adr %0, _dl_start" : "=r" (pcrel_addr));
+ return pcrel_addr - got_addr;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d31690f15632bdd667cdd65f868aa8440b4b4c54
commit d31690f15632bdd667cdd65f868aa8440b4b4c54
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun May 23 10:11:27 1999 +0000
Pretty print.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index 2ccf149..8e7b6ec 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -83,10 +83,10 @@ enum
/* Type representing exception flags. */
-typedef unsigned long fexcept_t;
+typedef unsigned long int fexcept_t;
/* Type representing floating-point environment. */
-typedef unsigned long fenv_t;
+typedef unsigned long int fenv_t;
/* If the default argument is used we use this value. Note that due to
architecture-specified page mappings, no user-space pointer will ever
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b28057ced40fb9f1ecddcbe1af5917043ff53b58
commit b28057ced40fb9f1ecddcbe1af5917043ff53b58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun May 23 09:46:25 1999 +0000
Adapted for header file change.
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
index 5b31c5e..99dc1f0 100644
--- a/sysdeps/arm/fpu/fegetenv.c
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,5 @@ fegetenv (fenv_t *envp)
{
unsigned long int temp;
_FPU_GETCW(temp);
- envp->cw = temp;
+ envp->__cw = temp;
}
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c
index 5679ccc..3faabd9 100644
--- a/sysdeps/arm/fpu/feholdexcpt.c
+++ b/sysdeps/arm/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ feholdexcept (fenv_t *envp)
/* Store the environment. */
_FPU_GETCW(temp);
- envp->cw = temp;
+ envp->__cw = temp;
/* Now set all exceptions to non-stop. */
temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
index b2d3ec5..7f3a434 100644
--- a/sysdeps/arm/fpu/fesetenv.c
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ fesetenv (const fenv_t *envp)
_FPU_SETCW(_FPU_DEFAULT);
else
{
- unsigned long temp = envp->cw;
+ unsigned long temp = envp->__cw;
_FPU_SETCW(temp);
}
}
diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c
index 58df063..116fbae 100644
--- a/sysdeps/mips/fesetenv.c
+++ b/sysdeps/mips/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
@@ -27,5 +27,5 @@ fesetenv (const fenv_t *envp)
if (envp == FE_DFL_ENV)
_FPU_SETCW (_FPU_DEFAULT);
else
- _FPU_SETCW (envp->fp_control_register);
+ _FPU_SETCW (envp->__fp_control_register);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3cbb9807c3b99c762c1661c2ec2345d0b574089
commit d3cbb9807c3b99c762c1661c2ec2345d0b574089
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun May 23 09:44:56 1999 +0000
(fenv_t): Prepend __ to member names to protect from user's macro namespace.
diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h
index ca06196..3c9e286 100644
--- a/sysdeps/arm/fpu/bits/fenv.h
+++ b/sysdeps/arm/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#endif
/* Define bits representing exceptions in the FPU status word. */
-enum
+enum
{
FE_INVALID = 1,
#define FE_INVALID FE_INVALID
@@ -34,7 +34,7 @@ enum
};
/* Amount to shift by to convert an exception to a mask bit. */
-#define FE_EXCEPT_SHIFT 16
+#define FE_EXCEPT_SHIFT 16
/* All supported exceptions. */
#define FE_ALL_EXCEPT \
@@ -45,12 +45,12 @@ enum
#define FE_TONEAREST 0
/* Type representing exception flags. */
-typedef unsigned long fexcept_t;
+typedef unsigned long int fexcept_t;
/* Type representing floating-point environment. */
typedef struct
{
- unsigned long cw;
+ unsigned long int __cw;
}
fenv_t;
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
index 0637bf7..efa90b6 100644
--- a/sysdeps/mips/bits/fenv.h
+++ b/sysdeps/mips/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,7 +64,7 @@ typedef unsigned short int fexcept_t;
to the layout of the block written by the `fstenv'. */
typedef struct
{
- unsigned int fp_control_register;
+ unsigned int __fp_control_register;
}
fenv_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=303e53829a227523f0d3c6db4e99f7e5fa7d6628
commit 303e53829a227523f0d3c6db4e99f7e5fa7d6628
Author: Andreas Schwab <schwab@suse.de>
Date: Sat May 22 17:14:30 1999 +0000
* sysdeps/m68k/fpu/bits/fenv.h (fenv_t): Prepend __ to member
names to protect from user's macro namespace.
* sysdeps/m68k/fpu/feholdexcpt.c, sysdeps/m68k/fpu/fesetenv.c:
Adapted.
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index e1a278d..3138fef 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,9 +64,9 @@ typedef unsigned int fexcept_t;
corresponds to the layout of the block written by `fmovem'. */
typedef struct
{
- unsigned int control_register;
- unsigned int status_register;
- unsigned int instruction_address;
+ unsigned int __control_register;
+ unsigned int __status_register;
+ unsigned int __instruction_address;
}
fenv_t;
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index e36617d..1ccf84b 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -29,10 +29,10 @@ feholdexcept (fenv_t *envp)
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
/* Now clear all exceptions. */
- fpsr = envp->status_register & ~FE_ALL_EXCEPT;
+ fpsr = envp->__status_register & ~FE_ALL_EXCEPT;
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
/* And set all exceptions to non-stop. */
- fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 6);
+ fpcr = envp->__control_register & ~(FE_ALL_EXCEPT << 6);
__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
return 1;
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index 6dd131b..b8ad428 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
@@ -31,17 +31,17 @@ fesetenv (const fenv_t *envp)
we want to use from the environment specified by the parameter. */
__asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp));
- temp.status_register &= ~FE_ALL_EXCEPT;
- temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
+ temp.__status_register &= ~FE_ALL_EXCEPT;
+ temp.__control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
if (envp == FE_DFL_ENV)
;
else if (envp == FE_NOMASK_ENV)
- temp.control_register |= FE_ALL_EXCEPT << 6;
+ temp.__control_register |= FE_ALL_EXCEPT << 6;
else
{
- temp.control_register |= (envp->control_register
- & ((FE_ALL_EXCEPT << 6) | FE_UPWARD));
- temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
+ temp.__control_register |= (envp->__control_register
+ & ((FE_ALL_EXCEPT << 6) | FE_UPWARD));
+ temp.__status_register |= envp->__status_register & FE_ALL_EXCEPT;
}
__asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09ea25239c6918f4b2847ca5d0ab7c4ee53c0b9f
commit 09ea25239c6918f4b2847ca5d0ab7c4ee53c0b9f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 18 08:55:49 1999 +0000
Zap high byte of length. Reschedule.
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 7456735..0ea4aa1 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -17,8 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* Finds characters in a memory area. Optimized for the Alpha
-architecture:
+/* Finds characters in a memory area. Optimized for the Alpha:
- memory accessed as aligned quadwords only
- uses cmpbge to compare 8 bytes in parallel
@@ -48,119 +47,124 @@ ENTRY(memchr)
.prologue 0
#endif
- beq a2, $not_found
- ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
- addq a0, a2, t4
- and a1, 0xff, a1 # a1 = 00000000000000ch
- sll a1, 8, t1 # t1 = 000000000000ch00
- cmpult a2, 9, t3
- or t1, a1, a1 # a1 = 000000000000chch
- sll a1, 16, t1 # t1 = 00000000chch0000
- lda t2, -1(zero)
- or t1, a1, a1 # a1 = 00000000chchchch
- sll a1, 32, t1 # t1 = chchchch00000000
- extql t0, a0, t6
- or t1, a1, a1 # a1 = chchchchchchchch
-
- beq t3, $first_quad
-
- ldq_u t5, -1(t4)
- extqh t5, a0, t5
- mov a0, v0
- or t6, t5, t0 # t0 = quadword starting at a0
-
- #
+ # Hack -- if someone passes in (size_t)-1, hoping to just
+ # search til the end of the address space, we will overflow
+ # below when we find the address of the last byte. Given
+ # that we will never have a 56-bit address space, cropping
+ # the length is the easiest way to avoid trouble.
+ zap a2, 0x80, t4 #-e0 :
+
+ beq a2, $not_found # .. e1 :
+ ldq_u t0, 0(a0) # e1 : load first quadword
+ insbl a1, 1, t1 # .. e0 : t1 = 000000000000ch00
+ and a1, 0xff, a1 #-e0 : a1 = 00000000000000ch
+ cmpult a2, 9, t3 # .. e1 :
+ or t1, a1, a1 # e0 : a1 = 000000000000chch
+ lda t2, -1(zero) # .. e1 :
+ sll a1, 16, t1 #-e0 : t1 = 00000000chch0000
+ addq a0, t4, t4 # .. e1 :
+ or t1, a1, a1 # e1 : a1 = 00000000chchchch
+ unop # :
+ sll a1, 32, t1 #-e0 : t1 = chchchch00000000
+ or t1, a1, a1 # e1 : a1 = chchchchchchchch
+ extql t0, a0, t6 # e0 :
+ beq t3, $first_quad # .. e1 :
+
+ ldq_u t5, -1(t4) #-e1 : eight or less bytes to search
+ extqh t5, a0, t5 # .. e0 :
+ mov a0, v0 # e0 :
+ or t6, t5, t0 # .. e1 : t0 = quadword starting at a0
+
# Deal with the case where at most 8 bytes remain to be searched
# in t0. E.g.:
# a2 = 6
# t0 = ????c6c5c4c3c2c1
$last_quad:
- negq a2, t5
- srl t2, t5, t5 # t5 = mask of a2 bits set
- xor a1, t0, t0
- cmpbge zero, t0, t1
- and t1, t5, t1
- beq t1, $not_found
+ negq a2, t5 #-e0 :
+ xor a1, t0, t0 # .. e1 :
+ srl t2, t5, t5 # e0 : t5 = mask of a2 bits set
+ cmpbge zero, t0, t1 # .. e1 :
+ and t1, t5, t1 #-e0 :
+ beq t1, $not_found # .. e1 :
$found_it:
- # now, determine which byte matched:
- negq t1, t2
- and t1, t2, t1
-
- and t1, 0x0f, t0
- addq v0, 4, t2
- cmoveq t0, t2, v0
+ # Now, determine which byte matched:
+ negq t1, t2 # e0 :
+ and t1, t2, t1 # e1 :
- and t1, 0x33, t0
- addq v0, 2, t2
- cmoveq t0, t2, v0
+ and t1, 0x0f, t0 #-e0 :
+ addq v0, 4, t2 # .. e1 :
+ cmoveq t0, t2, v0 # e0 :
- and t1, 0x55, t0
- addq v0, 1, t2
- cmoveq t0, t2, v0
+ addq v0, 2, t2 # .. e1 :
+ and t1, 0x33, t0 #-e0 :
+ cmoveq t0, t2, v0 # .. e1 :
-$done: ret
+ and t1, 0x55, t0 # e0 :
+ addq v0, 1, t2 # .. e1 :
+ cmoveq t0, t2, v0 #-e0 :
+$done: ret # .. e1 :
- #
# Deal with the case where a2 > 8 bytes remain to be
# searched. a0 may not be aligned.
- #
+ .align 4
$first_quad:
- andnot a0, 0x7, v0
- insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes)
- xor t0, a1, t0
- or t0, t1, t0 # t0 = ====ffffffffffff
- cmpbge zero, t0, t1
- bne t1, $found_it
+ andnot a0, 0x7, v0 #-e1 :
+ insqh t2, a0, t1 # .. e0 : t1 = 0000ffffffffffff (a0<0:2> ff)
+ xor t0, a1, t0 # e0 :
+ or t0, t1, t0 # e1 : t0 = ====ffffffffffff
+ cmpbge zero, t0, t1 #-e0 :
+ bne t1, $found_it # .. e1 :
+
+ # At least one byte left to process.
+
+ ldq t0, 8(v0) # e0 :
+ subq t4, 1, a2 # .. e1 :
+ addq v0, 8, v0 #-e0 :
- /* at least one byte left to process */
+ # Make a2 point to last quad to be accessed (the
+ # last quad may or may not be partial).
- ldq t0, 8(v0)
- addq v0, 8, v0
- /*
- * Make a2 point to last quad to be accessed (the
- * last quad may or may not be partial).
- */
- subq t4, 1, a2
- andnot a2, 0x7, a2
- cmpult v0, a2, t1
- beq t1, $final
+ andnot a2, 0x7, a2 # .. e1 :
+ cmpult v0, a2, t1 # e0 :
+ beq t1, $final # .. e1 :
- /* at least two quads remain to be accessed */
+ # At least two quads remain to be accessed.
- subq a2, v0, t3 # t3 <- number of quads to be processed in loop
- and t3, 8, t3 # odd number of quads?
- bne t3, $odd_quad_count
+ subq a2, v0, t3 #-e0 : t3 <- nr quads to be processed
+ and t3, 8, t3 # e1 : odd number of quads?
+ bne t3, $odd_quad_count # e1 :
- /* at least three quads remain to be accessed */
+ # At least three quads remain to be accessed
- mov t0, t3 # move prefetched value into correct register
+ mov t0, t3 # e0 : move prefetched value to correct reg
- .align 3
+ .align 4
$unrolled_loop:
- ldq t0, 8(v0) # prefetch t0
- xor a1, t3, t1
- cmpbge zero, t1, t1
- bne t1, $found_it
+ ldq t0, 8(v0) #-e0 : prefetch t0
+ xor a1, t3, t1 # .. e1 :
+ cmpbge zero, t1, t1 # e0 :
+ bne t1, $found_it # .. e1 :
- addq v0, 8, v0
+ addq v0, 8, v0 #-e0 :
$odd_quad_count:
- xor a1, t0, t1
- ldq t3, 8(v0) # prefetch t3
- cmpbge zero, t1, t1
- bne t1, $found_it
+ xor a1, t0, t1 # .. e1 :
+ ldq t3, 8(v0) # e0 : prefetch t3
+ cmpbge zero, t1, t1 # .. e1 :
+ addq v0, 8, t5 #-e0 :
+ bne t1, $found_it # .. e1 :
- addq v0, 8, v0
- cmpult v0, a2, t5
- bne t5, $unrolled_loop
+ cmpult t5, a2, t5 # e0 :
+ addq v0, 8, v0 # .. e1 :
+ bne t5, $unrolled_loop #-e1 :
- mov t3, t0 # move prefetched value into t0
-$final: subq t4, v0, a2 # a2 <- number of bytes left to do
- bne a2, $last_quad
+ mov t3, t0 # e0 : move prefetched value into t0
+$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do
+ bne a2, $last_quad # e1 :
$not_found:
- mov zero, v0
- ret
+ mov zero, v0 #-e0 :
+ ret # .. e1 :
END(memchr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c2d926dc86653ad0a216246efbdf8ca597dc80a
commit 1c2d926dc86653ad0a216246efbdf8ca597dc80a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 11 12:07:07 1999 +0000
(struct sockaddr_storage): New structure; storage suitable for any
socket address.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index cd85df7..5dbdee4 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux/MIPS version.
- Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
#define __need_NULL
#include <stddef.h>
+#include <limits.h>
#include <sys/types.h>
/* Type for length arguments in socket calls. */
@@ -133,6 +134,24 @@ struct sockaddr
};
+/* Structure large enough to hold any socket address (with the historical
+ exception of AF_UNIX). We reserve 128 bytes. */
+#if ULONG_MAX > 0xffffffff
+# define __ss_align __uint64_t
+#else
+# define __ss_align __uint32_t
+#endif
+#define _SS_SIZE 128
+#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof(__ss_align)))
+
+struct sockaddr_storage
+ {
+ __SOCKADDR_COMMON (__ss_); /* Address family, etc. */
+ __ss_align __ss_align; /* Force desired alignment. */
+ char __ss_padding[_SS_PADSIZE];
+ };
+
+
/* Bits in the FLAGS argument to `send', `recv', et al. */
enum
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6a1f966a05f09778764e7f88bdf1eae565f842d
commit b6a1f966a05f09778764e7f88bdf1eae565f842d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 3 12:40:23 1999 +0000
Add sigrestorer.S.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 0bf79a4..28e8642 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -5,6 +5,7 @@ setresuid.c
setresgid.c
setfsuid.c
setfsgid.c
+sigrestorer.S
bits/armsigctx.h
sys/io.h
sys/user.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=761fb24284ca1a148987d235f01daec323837fc2
commit 761fb24284ca1a148987d235f01daec323837fc2
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Apr 30 17:27:14 1999 +0000
New file.
diff --git a/sysdeps/m68k/stackinfo.h b/sysdeps/m68k/stackinfo.h
new file mode 100644
index 0000000..a1b8e06
--- /dev/null
+++ b/sysdeps/m68k/stackinfo.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains a bit of information about the stack allocation
+ of the processor. */
+
+#ifndef _STACKINFO_H
+#define _STACKINFO_H 1
+
+/* On m68k the stack grows down. */
+#define _STACK_GROWS_DOWN 1
+
+#endif /* stackinfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d33ecfde382d27a4ec660632c01a76c7c9451603
commit d33ecfde382d27a4ec660632c01a76c7c9451603
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 16 17:06:33 1999 +0000
Correct signed/unsigned-ness of blkcnt and fsblkcnt.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 0bc6cf6..0af9fb3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -59,11 +59,11 @@ typedef __int32_t __pid_t; /* Type of process identifications. */
typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
typedef __int64_t __rlim_t; /* Type of resource counts. */
typedef __int64_t __rlim64_t; /* "" (LFS) */
-typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */
-typedef __int64_t __blkcnt64_t; /* "" (LFS) */
-typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */
-typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */
-typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
+typedef __uint32_t __blkcnt_t; /* Type to count nr disk blocks. */
+typedef __uint64_t __blkcnt64_t; /* "" (LFS) */
+typedef __int32_t __fsblkcnt_t; /* Type to count file system blocks. */
+typedef __int64_t __fsblkcnt64_t; /* "" (LFS) */
+typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
typedef __uint32_t __id_t; /* General type for IDs. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 36a1e0e..51d9fcd 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -120,12 +120,12 @@ typedef long int __ipc_pid_t;
/* Types from the Large File Support interface. */
/* Type to count number os disk blocks. */
-typedef __u_long __blkcnt_t;
-typedef __u_quad_t __blkcnt64_t;
+typedef long int __blkcnt_t;
+typedef __quad_t __blkcnt64_t;
/* Type to count file system blocks. */
-typedef long int __fsblkcnt_t;
-typedef __quad_t __fsblkcnt64_t;
+typedef __u_long __fsblkcnt_t;
+typedef __u_quad_t __fsblkcnt64_t;
/* Type to count file system inodes. */
typedef __u_long __fsfilcnt_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7483ee1131eb7ae090d48d53545627e5bf382b3d
commit 7483ee1131eb7ae090d48d53545627e5bf382b3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 16 14:19:10 1999 +0000
Removed since cmpxchg/no-cmpxchg doesn't exist anymore.
diff --git a/sysdeps/arm/linuxthreads/Implies b/sysdeps/arm/linuxthreads/Implies
deleted file mode 100644
index 7edcd7e..0000000
--- a/sysdeps/arm/linuxthreads/Implies
+++ /dev/null
@@ -1 +0,0 @@
-pthread/no-cmpxchg
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f406da841fc8831a1354f59beb36acb9ac2fdcb
commit 5f406da841fc8831a1354f59beb36acb9ac2fdcb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 15 14:45:16 1999 +0000
Fix typo in preventing compilation of file.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 102d665..2e70b32 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -49,7 +49,7 @@ extern void __default_rt_sa_restorer(void);
: __default_sa_restorer
#else
#define choose_restorer(flags) \
- &&__default_sa_restorer
+ __default_sa_restorer
#endif
/* If ACT is not NULL, change the action for SIG to *ACT.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45c6c04d8db529cb9b5d534e747318aac5f9334f
commit 45c6c04d8db529cb9b5d534e747318aac5f9334f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 14 13:42:16 1999 +0000
mmap calls could not be restarted after being interrupted by
a signal. The parameters on the stack were corrupted by the
signal handler.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index f9a773f..fcff57c 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -26,10 +26,26 @@ ENTRY (__mmap)
mmap() takes six, we need to build a parameter block and pass its
address instead. The 386 port does a similar trick. */
- mov ip, sp
- stmdb ip!, {a1-a4}
- mov a1, ip
+ /* This code previously moved sp into ip and stored the args using
+ stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+ to be restored after the syscall completed. It saved an
+ instruction and meant no stack cleanup work was required.
+
+ This will not work in the case of a mmap call being interrupted
+ by a signal. If the signal handler uses any stack the arguments
+ to mmap will be trashed. The results of a restart of mmap are
+ then unpredictable. */
+
+ /* store args on the stack */
+ stmdb sp!, {a1-a4}
+
+ /* do the syscall */
+ mov a1, sp
swi SYS_ify (mmap)
+
+ /* pop args off the stack. */
+ add sp, sp, #16
+
cmn r0, $4096
bhs PLTJMP(syscall_error);
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95084e8a4768dbbf78790d5425f1f2d058bc66f1
commit 95084e8a4768dbbf78790d5425f1f2d058bc66f1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 14 13:42:04 1999 +0000
Socket calls could not be restarted after being interrupted by
a signal. The parameters on the stack were corrupted by the
signal handler.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index b51d887..92c7e90 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -35,12 +35,19 @@
#define __socket P(__,socket)
#endif
-#define PUSHARGS_1 stmfd ip!, {a1}
-#define PUSHARGS_2 stmfd ip!, {a1, a2}
-#define PUSHARGS_3 stmfd ip!, {a1, a2, a3}
-#define PUSHARGS_4 stmfd ip!, {a1, a2, a3, a4}
-#define PUSHARGS_5 stmfd ip!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
-#define PUSHARGS_6 stmfd ip!, {a1, a2, a3, a4}
+#define PUSHARGS_1 stmfd sp!, {a1}
+#define PUSHARGS_2 stmfd sp!, {a1, a2}
+#define PUSHARGS_3 stmfd sp!, {a1, a2, a3}
+#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}
+#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
+#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}
+
+#define POPARGS_1 add sp, sp, #4
+#define POPARGS_2 add sp, sp, #8
+#define POPARGS_3 add sp, sp, #12
+#define POPARGS_4 add sp, sp, #16
+#define POPARGS_5 add sp, sp, #16
+#define POPARGS_6 add sp, sp, #16
#ifndef NARGS
#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
@@ -48,15 +55,27 @@
.globl __socket
ENTRY (__socket)
+ /* This code previously moved sp into ip and stored the args using
+ stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had
+ to be restored after the syscall completed. It saved an
+ instruction and meant no stack cleanup work was required.
+
+ This will not work in the case of a socket call being interrupted
+ by a signal. If the signal handler uses any stack the arguments
+ to socket will be trashed. The results of a restart of any
+ socket call are then unpredictable. */
+
/* Push args onto the stack. */
- mov ip, sp
P(PUSHARGS_,NARGS)
/* Do the system call trap. */
mov a1, $P(SOCKOP_,socket)
- mov a2, ip
+ mov a2, sp
swi SYS_ify(socketcall)
+ /* Pop args off the stack */
+ P(POPARGS_,NARGS)
+
/* r0 is < 0 if there was an error. */
cmn r0, $124
bhs PLTJMP(syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b40f7d3d4c2691737e17df6729eda6e46a59a1f
commit 3b40f7d3d4c2691737e17df6729eda6e46a59a1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:04:34 1999 +0000
Support big endian operation.
diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h
index 7fe486e..5e54cc7 100644
--- a/sysdeps/arm/bits/endian.h
+++ b/sysdeps/arm/bits/endian.h
@@ -4,5 +4,9 @@
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
+#ifdef __ARMEB__
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
#define __FLOAT_WORD_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9b40c2a26d37e4d8d506d009b217d6746cf1f4c
commit a9b40c2a26d37e4d8d506d009b217d6746cf1f4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:04:12 1999 +0000
(INLINE_SYSCALL): Include the syscall name in assembler output for ease
of debugging.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index d7e2822..7812e99 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -114,7 +114,7 @@
{ \
register int _a1 asm ("a1"); \
LOAD_ARGS_##nr (args) \
- asm volatile ("swi %1" \
+ asm volatile ("swi %1 @ syscall " #name \
: "=r" (_a1) \
: "i" (SYS_ify(name)) ASM_ARGS_##nr \
: "a1"); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74804c97db7530bb456be46cdcc56067481c49f0
commit 74804c97db7530bb456be46cdcc56067481c49f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:03:50 1999 +0000
Linux/ARM vfork implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
new file mode 100644
index 0000000..3d5bd95
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -0,0 +1,50 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* Clone the calling process, but without copying the whole address space.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+
+#ifdef __NR_vfork
+ swi __NR_vfork
+ cmn a1, #4096
+ RETINSTR(movcc, pc, lr)
+
+ /* Check if vfork syscall is known at all. */
+ ldr a2, =-ENOSYS
+ teq a1, a2
+ bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#endif
+
+ /* If we don't have vfork, fork is close enough. */
+ swi __NR_fork
+ cmn a1, #4096
+ RETINSTR(movcc, pc, lr)
+ b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f091ace9da87cec5f22d606918e7a0f03ff2f1d
commit 2f091ace9da87cec5f22d606918e7a0f03ff2f1d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:03:27 1999 +0000
Signal termination function.
diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
new file mode 100644
index 0000000..8d32e4c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
@@ -0,0 +1,33 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* If no SA_RESTORER function was specified by the application we use
+ one of these. This avoids the need for the kernel to synthesise a return
+ instruction on the stack, which would involve expensive cache flushes. */
+
+ENTRY(__default_sa_restorer)
+ swi SYS_ify(sigreturn)
+
+#ifdef __NR_rt_sigreturn
+
+ENTRY(__default_rt_sa_restorer)
+ swi SYS_ify(rt_sigreturn)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2761e5acd7cfd152c37ad0ee30b5499e79429520
commit 2761e5acd7cfd152c37ad0ee30b5499e79429520
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:02:56 1999 +0000
Don't rely on undefined compiler behaviour.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
index 76399a2..102d665 100644
--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -39,11 +39,14 @@ int __libc_missing_rt_sigs;
#define SA_RESTORER 0x04000000
+extern void __default_sa_restorer(void);
+extern void __default_rt_sa_restorer(void);
+
/* When RT signals are in use we need to use a different return stub. */
#ifdef __NR_rt_sigreturn
#define choose_restorer(flags) \
- (flags & SA_SIGINFO) ? &&__default_rt_sa_restorer \
- : &&__default_sa_restorer
+ (flags & SA_SIGINFO) ? __default_rt_sa_restorer \
+ : __default_sa_restorer
#else
#define choose_restorer(flags) \
&&__default_sa_restorer
@@ -142,20 +145,6 @@ __sigaction (sig, act, oact)
#endif
}
return result;
-
- /* If no SA_RESTORER function was specified by the application we use
- this one. This avoids the need for the kernel to synthesise a return
- instruction on the stack, which would involve expensive cache flushes. */
- __default_sa_restorer:
- asm volatile ("swi %0" : : "i" (__NR_sigreturn));
-
-#ifdef __NR_rt_sigreturn
- __default_rt_sa_restorer:
- asm volatile ("swi %0" : : "i" (__NR_rt_sigreturn));
-#endif
-
- /* NOTREACHED */
- return -1;
}
weak_alias (__sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65e8edc76bc0fb61dfaf6f3bfa8b81b77f9a7053
commit 65e8edc76bc0fb61dfaf6f3bfa8b81b77f9a7053
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:02:39 1999 +0000
(_outw, _outb, _outl): Don't bother range checking the port number.
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
index 551fc97..260226d 100644
--- a/sysdeps/unix/sysv/linux/arm/ioperm.c
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Phil Blundell, based on the Alpha version by
David Mosberger.
@@ -214,9 +214,6 @@ _iopl (unsigned int level)
void
_outb (unsigned char b, unsigned long int port)
{
- if (port >= MAX_PORT)
- return;
-
*((volatile unsigned char *)(IO_ADDR (port))) = b;
}
@@ -224,9 +221,6 @@ _outb (unsigned char b, unsigned long int port)
void
_outw (unsigned short b, unsigned long int port)
{
- if (port >= MAX_PORT)
- return;
-
*((volatile unsigned short *)(IO_ADDR (port))) = b;
}
@@ -234,9 +228,6 @@ _outw (unsigned short b, unsigned long int port)
void
_outl (unsigned int b, unsigned long int port)
{
- if (port >= MAX_PORT)
- return;
-
*((volatile unsigned long *)(IO_ADDR (port))) = b;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85fb60ef9e5d5f931d3cec1d3b11e2f416be7d97
commit 85fb60ef9e5d5f931d3cec1d3b11e2f416be7d97
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:02:23 1999 +0000
[$(subdir) = signal]
(sysdep_routines): Add sigrestorer.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index d76698b..99a560c 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -4,5 +4,6 @@ endif
ifeq ($(subdir),signal)
sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending
+ rt_sigqueueinfo rt_sigaction rt_sigpending \
+ sigrestorer
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c3174b2ec92bf18f678895118c2348a2be7f029
commit 3c3174b2ec92bf18f678895118c2348a2be7f029
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 12 09:01:49 1999 +0000
Delete inline implementations of strcpy and stpcpy.
diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h
index 8dce456..4ca2e30 100644
--- a/sysdeps/arm/bits/string.h
+++ b/sysdeps/arm/bits/string.h
@@ -1,5 +1,5 @@
/* Optimized, inlined string functions. ARM version.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,126 +25,3 @@
<bits/string2.h> since they don't work on the ARM. */
#define _HAVE_STRING_ARCH_strcpy 1
#define _HAVE_STRING_ARCH_stpcpy 1
-
-/* We only provide optimizations if GNU CC is used and this is a little
- endian system (the code below does not work on big endian machines).
- With current versions of GCC these optimi\ations produce quite a large
- amount of code so we only enable them if the user specifically asked
- for it. */
-#if !defined __NO_STRING_INLINES && defined __GNUC__ && __GNUC__ >= 2 \
- && !defined __ARMEB__ && defined __USE_STRING_INLINES
-
-/* Copy SRC to DEST. */
-#define strcpy(dest, src) \
- (__extension__ (__builtin_constant_p (src) \
- ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \
- ? __strcpy_small (dest, src, strlen (src) + 1) \
- : (char *) memcpy (dest, src, strlen (src) + 1)) \
- : strcpy (dest, src)))
-
-#define __strcpy_small(dest, src, srclen) \
- (__extension__ ({ char *__dest = (char *) (dest); \
- const char *__src = (const char *) (src); \
- size_t __srclen = (srclen); \
- switch (__srclen) \
- { \
- case 5: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 1: \
- *__dest++ = '\0'; \
- break; \
- case 6: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 2: \
- *((unsigned short int *) __dest) = \
- __src[0]; \
- __dest += 2; \
- break; \
- case 7: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 3: \
- *((unsigned short int *) __dest) = \
- *((const unsigned short int *) (__src)); \
- __dest[2] = '\0'; \
- __dest += 3; \
- break; \
- case 8: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 4: \
- *((unsigned long int *) __dest) = \
- *((const unsigned short int *) (__src)) | \
- (__src[2] << 16); \
- __dest += 4; \
- break; \
- } \
- (__dest - __srclen) ; }))
-
-/* Copy SRC to DEST, returning pointer to final NUL byte. */
-#define __stpcpy(dest, src) \
- (__extension__ (__builtin_constant_p (src) \
- ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \
- ? __stpcpy_small (dest, src, strlen (src) + 1) \
- : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\
- : __stpcpy (dest, src)))
-
-#define __stpcpy_small(dest, src, srclen) \
- (__extension__ ({ char *__dest = (char *) (dest); \
- const char *__src = (const char *) (src); \
- switch (srclen) \
- { \
- case 5: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 1: \
- *__dest++ = '\0'; \
- break; \
- case 6: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 2: \
- *((unsigned short int *) __dest) = \
- __src[0]; \
- __dest += 2; \
- break; \
- case 7: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 3: \
- *((unsigned short int *) __dest) = \
- *((const unsigned short int *) (__src)); \
- __dest[2] = '\0'; \
- __dest += 3; \
- break; \
- case 8: \
- *((unsigned long int *) __dest) = \
- *((const unsigned long int *) (__src)); \
- __dest += 4; \
- __src += 4; \
- case 4: \
- *((unsigned long int *) __dest) = \
- *((const unsigned short int *) (__src)) | \
- (__src[2] << 16); \
- __dest += 4; \
- break; \
- } \
- __dest; }))
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ac24faac88b624b04321f29bbedb97545a47b2f
commit 2ac24faac88b624b04321f29bbedb97545a47b2f
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Mar 19 01:54:41 1999 +0000
1999-03-18 Philip Blundell <philb@gnu.org>
* sysdeps/unix/sysv/linux/arm/getgroups.c: New file. Use the i386
implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/getgroups.c b/sysdeps/unix/sysv/linux/arm/getgroups.c
new file mode 100644
index 0000000..102ea24
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/getgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2838157b3d25bfa792eed48f9f915b36bdb4f019
commit 2838157b3d25bfa792eed48f9f915b36bdb4f019
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 10 16:07:49 1999 +0000
m68k specific function to print floating point numbers in hexadecimal
format.
diff --git a/sysdeps/m68k/printf_fphex.c b/sysdeps/m68k/printf_fphex.c
new file mode 100644
index 0000000..0e68b16
--- /dev/null
+++ b/sysdeps/m68k/printf_fphex.c
@@ -0,0 +1,2 @@
+#define LONG_DOUBLE_DENORM_BIAS IEEE854_LONG_DOUBLE_BIAS
+#include <sysdeps/generic/printf_fphex.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1227256003b57c34f59a705ca134f9a2f8fa660
commit d1227256003b57c34f59a705ca134f9a2f8fa660
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 8 21:39:15 1999 +0000
m68k specific strtold wrapper.
diff --git a/sysdeps/m68k/strtold.c b/sysdeps/m68k/strtold.c
new file mode 100644
index 0000000..dd7fbce
--- /dev/null
+++ b/sysdeps/m68k/strtold.c
@@ -0,0 +1,2 @@
+#define DENORM_EXP (MIN_EXP - 1)
+#include <sysdeps/generic/strtold.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a96af7b96e2cc213d000164746189eef058d474f
commit a96af7b96e2cc213d000164746189eef058d474f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 2 08:06:57 1999 +0000
(elf_machine_runtime_setup): DT_PLTGOT entry is already relocated.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index e443711..aff8df2 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -88,7 +88,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
in. Their initial contents will arrange when called to push an
index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3],
and then jump to _GLOBAL_OFFSET_TABLE[2]. */
- got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* The got[2] entry contains the address of a function which gets
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df019d9428ba9c0c2e234d5269c7869982a3b4bf
commit df019d9428ba9c0c2e234d5269c7869982a3b4bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 1 07:20:35 1999 +0000
(ucontext): Rename field uc_links to
uc_link which is the right name according to Unix98.
diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h
index 70af80f..999c01c 100644
--- a/sysdeps/arm/sys/ucontext.h
+++ b/sysdeps/arm/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ typedef struct
typedef struct ucontext
{
unsigned long int uc_flags;
- struct ucontext *uc_links;
+ struct ucontext *uc_link;
__sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h
index 4776e7d..1acfee4 100644
--- a/sysdeps/m68k/sys/ucontext.h
+++ b/sysdeps/m68k/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,7 +98,7 @@ typedef struct
typedef struct ucontext
{
unsigned long int uc_flags;
- struct ucontext *uc_links;
+ struct ucontext *uc_link;
__sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index f177cad..741fb28 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -134,7 +134,7 @@ typedef struct
typedef struct ucontext
{
unsigned long int uc_flags;
- struct ucontext *uc_links;
+ struct ucontext *uc_link;
__sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
index 349dd1e..08eeb6e 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ typedef struct sigcontext mcontext_t;
typedef struct ucontext
{
unsigned long int uc_flags;
- struct ucontext *uc_links;
+ struct ucontext *uc_link;
unsigned long __uc_osf_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=963048adc594a58b83ff451ae319dad1f75c5c6c
commit 963048adc594a58b83ff451ae319dad1f75c5c6c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 18:25:14 1999 +0000
(elf_machine_runtime_setup): DT_PLTGOT entry is already relocated.
(__dl_runtime_resolve): Likewise.
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 1045da1..e2b62b8 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -23,7 +23,7 @@
#define ELF_MACHINE_NAME "MIPS"
-#define ELF_MACHINE_NO_PLT
+#define ELF_MACHINE_NO_PLT
#include <assert.h>
#include <entry.h>
@@ -144,8 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- const char *strtab
- = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
#define RESOLVE_GOTSYM(sym) \
({ \
@@ -157,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) ((void *) map->l_addr
- + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -170,8 +168,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (ElfW(Sym) *) ((void *) map->l_addr
- + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym = (ElfW(Sym) *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
@@ -234,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) ((void *) l->l_addr
- + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
@@ -348,11 +344,10 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
- const char *strtab \
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ = (const ElfW(Sym) *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \
+ const char *strtab = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e675032fec82b43337fde2840fdf1df0bb30b68a
commit e675032fec82b43337fde2840fdf1df0bb30b68a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 18:22:38 1999 +0000
(elf_machine_runtime_setup): DT_PLTGOT entry is already relocated.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 6e11380..21059f5 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -98,7 +98,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The GOT entries for the functions in the PLT have not been
filled in yet. Their initial contents are directed to the
PLT which arranges for the dynamic linker to be called. */
- plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
+ plt = l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will be called to perform the relocation. */
if (!profile)
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8ce24a7..afa68ef 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -80,7 +80,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
to push an offset into the .rela.plt section, push
_GLOBAL_OFFSET_TABLE_[1], and then jump to
_GLOBAL_OFFSET_TABLE_[2]. */
- got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
/* The got[2] entry contains the address of a function which gets
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 749ea00..6896e53 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -156,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) ((void *) map->l_addr
- + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -232,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) ((void *) l->l_addr
- + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
@@ -350,7 +348,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
const char *strtab \
= (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3aa76df33462705bbc45ce0f8bacc5630c30ed18
commit 3aa76df33462705bbc45ce0f8bacc5630c30ed18
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 15:00:01 1999 +0000
(elf_machine_got_rel): Likewise.
(elf_machine_got_rel): Likewise for DT_SYMTAB and DT_STRTAB.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 77b8c4e..749ea00 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -144,8 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- const char *strtab
- = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
#define RESOLVE_GOTSYM(sym) \
({ \
@@ -170,8 +169,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (ElfW(Sym) *) ((void *) map->l_addr
- + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
@@ -348,9 +346,9 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
+ = (const void *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \
const char *strtab \
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
const ElfW(Addr) *got \
= (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
const ElfW(Word) local_gotno \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a2790a3c68e2f17ad5a92d41465abe8829569888
commit a2790a3c68e2f17ad5a92d41465abe8829569888
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 14:58:50 1999 +0000
(elf_machine_rela): DT_STRTAB is already relocated.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index f2fe553..8ce24a7 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -277,8 +277,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
extern char **_dl_argv;
const char *strtab;
- strtab = ((void *) map->l_addr
- + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
_dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
": Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44bff568045ce9d3d8471ee5f27803e93a2149a8
commit 44bff568045ce9d3d8471ee5f27803e93a2149a8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 14:57:43 1999 +0000
(elf_machine_rel): DT_STRTAB is already relocated.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index b8a1e19..e443711 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -405,8 +405,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
{
const char *strtab;
- strtab = ((const char *) map->l_addr
- + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
_dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
": Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
@@ -417,9 +416,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
-#ifdef RTLD_BOOTSTRAP
+#ifdef RTLD_BOOTSTRAP
/* Fix weak undefined references. */
- if (sym != NULL && sym->st_value == 0)
+ if (sym != NULL && sym->st_value == 0)
*reloc_addr = 0;
else
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e3649f6e281d7a3b8c69e3484bb06a2d60a23e6
commit 3e3649f6e281d7a3b8c69e3484bb06a2d60a23e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 20 14:56:45 1999 +0000
(elf_machine_fixup_plt): DT_JMPREL and DT_PLTGOT entries are already
relocated.
(elf_machine_rela): Likewise for DT_SYMTAB.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index d351e9d..6e11380 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -350,8 +350,8 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
- rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr);
- plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32);
+ rela_plt = (void *) l->l_info[DT_JMPREL]->d_un.d_ptr;
+ plte = (void *) (l->l_info[DT_PLTGOT]->d_un.d_ptr + 32);
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
@@ -481,7 +481,7 @@ elf_machine_rela (struct link_map *map,
than the dynamic linker's built-in definitions used
while loading those libraries. */
const Elf64_Sym *const dlsymtab
- = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ = (void *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
sym_value -= map->l_addr;
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
sym_value -= reloc->r_addend;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d32500284b17fa9b559dcc9f40663e8025560ce
commit 1d32500284b17fa9b559dcc9f40663e8025560ce
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 16 15:13:16 1999 +0000
Fix typo.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index c105537..8477b53 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -1,5 +1,5 @@
-/* System dependand definitions for run-time dynamic loading.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* System dependent definitions for run-time dynamic loading.
+ Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42bda2c45336f8a110ba83ee7d250889dbfb1159
commit 42bda2c45336f8a110ba83ee7d250889dbfb1159
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 16 12:13:56 1999 +0000
(_sys_errlist): Fix typo.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
index 37f003b..5d642e4 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
@@ -177,7 +177,7 @@ const char *const _sys_errlist[] =
N_("No route to host"),
N_("Operation already in progress"),
N_("Operation now in progress"),
- N_("Stale NFS file handle)"
+ N_("Stale NFS file handle")
};
weak_alias (_sys_errlist, sys_errlist)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93835354421b51653f63a70e5c743a66f7d97d97
commit 93835354421b51653f63a70e5c743a66f7d97d97
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 16 09:35:56 1999 +0000
Fix typo.
Remove __setfpucw.
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index 471c68e..789a614 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Mips version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe and Ralf Baechle.
@@ -52,7 +52,7 @@
* Rounding Control:
* 00 - rounding to nearest (RN)
* 01 - rounding toward zero (RZ)
- * 01 - rounding (up) toward plus infinity (RP)
+ * 10 - rounding (up) toward plus infinity (RP)
* 11 - rounding (down)toward minus infinity (RM)
*/
@@ -95,12 +95,4 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-__BEGIN_DECLS
-
-/* Called at startup. It can be used to manipulate the fpu control
- register. */
-extern void __setfpucw __P ((fpu_control_t));
-
-__END_DECLS
-
#endif /* fpu_control.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02c1ba5bdf81445777452bd7e099fd2aa55e035a
commit 02c1ba5bdf81445777452bd7e099fd2aa55e035a
Author: Andreas Schwab <schwab@suse.de>
Date: Sat Feb 13 16:51:29 1999 +0000
* sysdeps/m68k/fpu/s_modf.c: Optimized by using __m81_test instead
of separare explicit comparisons.
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 6c2449a..52ee64c 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -33,15 +33,18 @@ float_type
s(__modf) (float_type x, float_type *iptr)
{
float_type x_int, result;
+ unsigned long x_cond;
+
__asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x));
*iptr = x_int;
- if (m81(__isinf) (x))
+ x_cond = __m81_test (x);
+ if (x_cond & __M81_COND_INF)
{
result = 0;
- if (x < 0)
+ if (x_cond & __M81_COND_NEG)
result = -result;
}
- else if (x == 0)
+ else if (x_cond & __M81_COND_ZERO)
result = x;
else
result = x - x_int;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdf595bb492fe768cf269ae9e3067ba229306284
commit fdf595bb492fe768cf269ae9e3067ba229306284
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 11 12:00:52 1999 +0000
Undo last patch.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 9828066..36a1e0e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -132,7 +132,7 @@ typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
/* Type of file serial numbers. */
-typedef __u_quad_t __ino64_t;
+typedef __u_long __ino64_t;
/* Type of file sizes and offsets. */
typedef __loff_t __off64_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a1ccf774403a23ee581c13329734b9c8ed8076f
commit 7a1ccf774403a23ee581c13329734b9c8ed8076f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 10 11:33:31 1999 +0000
Change __ino64_t to 64 bits.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 36a1e0e..9828066 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -132,7 +132,7 @@ typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsfilcnt64_t;
/* Type of file serial numbers. */
-typedef __u_long __ino64_t;
+typedef __u_quad_t __ino64_t;
/* Type of file sizes and offsets. */
typedef __loff_t __off64_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=864e156e88410edbfcc53813cf5d372a74e78ce0
commit 864e156e88410edbfcc53813cf5d372a74e78ce0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 8 10:11:50 1999 +0000
Add missing RT signal definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 44c3374..0d5452d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,4 +71,12 @@
#define _NSIG 64 /* Biggest signal number + 1. */
+#define SIGRTMIN (__libc_current_sigrtmin ())
+#define SIGRTMAX (__libc_current_sigrtmax ())
+
+/* These are the hard limits of the kernel. These values should not be
+ used directly at user level. */
+#define __SIGRTMIN 32
+#define __SIGRTMAX (_NSIG - 1)
+
#endif /* <signal.h> included. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4fb65d7fc7cd5732f3b88a758a28c15c9d329e81
commit 4fb65d7fc7cd5732f3b88a758a28c15c9d329e81
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 8 10:02:37 1999 +0000
(TRAMPOLINE_TEMPLATE): Save and restore all call-clobbered fp regs.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index b63661f..d351e9d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -134,31 +134,55 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
.globl " #tramp_name "
.ent " #tramp_name "
" #tramp_name ":
- lda $sp, -168($sp)
- .frame $sp, 168, $26
+ lda $sp, -44*8($sp)
+ .frame $sp, 44*8, $26
/* Preserve all integer registers that C normally doesn't. */
- stq $26, 0($sp)
- stq $0, 8($sp)
- stq $1, 16($sp)
- stq $2, 24($sp)
- stq $3, 32($sp)
- stq $4, 40($sp)
- stq $5, 48($sp)
- stq $6, 56($sp)
- stq $7, 64($sp)
- stq $8, 72($sp)
- stq $16, 80($sp)
- stq $17, 88($sp)
- stq $18, 96($sp)
- stq $19, 104($sp)
- stq $20, 112($sp)
- stq $21, 120($sp)
- stq $22, 128($sp)
- stq $23, 136($sp)
- stq $24, 144($sp)
- stq $25, 152($sp)
- stq $29, 160($sp)
- .mask 0x27ff01ff, -168
+ stq $26, 0*8($sp)
+ stq $0, 1*8($sp)
+ stq $1, 2*8($sp)
+ stq $2, 3*8($sp)
+ stq $3, 4*8($sp)
+ stq $4, 5*8($sp)
+ stq $5, 6*8($sp)
+ stq $6, 7*8($sp)
+ stq $7, 8*8($sp)
+ stq $8, 9*8($sp)
+ stq $16, 10*8($sp)
+ stq $17, 11*8($sp)
+ stq $18, 12*8($sp)
+ stq $19, 13*8($sp)
+ stq $20, 14*8($sp)
+ stq $21, 15*8($sp)
+ stq $22, 16*8($sp)
+ stq $23, 17*8($sp)
+ stq $24, 18*8($sp)
+ stq $25, 19*8($sp)
+ stq $29, 20*8($sp)
+ stt $f0, 21*8($sp)
+ stt $f1, 22*8($sp)
+ stt $f10, 23*8($sp)
+ stt $f11, 24*8($sp)
+ stt $f12, 25*8($sp)
+ stt $f13, 26*8($sp)
+ stt $f14, 27*8($sp)
+ stt $f15, 28*8($sp)
+ stt $f16, 29*8($sp)
+ stt $f17, 30*8($sp)
+ stt $f18, 31*8($sp)
+ stt $f19, 32*8($sp)
+ stt $f20, 33*8($sp)
+ stt $f21, 34*8($sp)
+ stt $f22, 35*8($sp)
+ stt $f23, 36*8($sp)
+ stt $f24, 37*8($sp)
+ stt $f25, 38*8($sp)
+ stt $f26, 39*8($sp)
+ stt $f27, 40*8($sp)
+ stt $f28, 41*8($sp)
+ stt $f29, 42*8($sp)
+ stt $f30, 43*8($sp)
+ .mask 0x27ff01ff, -44*8
+ .fmask 0xfffffc03, -(44-21)*8
/* Set up our $gp */
br $gp, .+4
ldgp $gp, 0($gp)
@@ -177,31 +201,54 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* Move the destination address into position. */
mov $0, $27
/* Restore program registers. */
- ldq $26, 0($sp)
- ldq $0, 8($sp)
- ldq $1, 16($sp)
- ldq $2, 24($sp)
- ldq $3, 32($sp)
- ldq $4, 40($sp)
- ldq $5, 48($sp)
- ldq $6, 56($sp)
- ldq $7, 64($sp)
- ldq $8, 72($sp)
- ldq $16, 80($sp)
- ldq $17, 88($sp)
- ldq $18, 96($sp)
- ldq $19, 104($sp)
- ldq $20, 112($sp)
- ldq $21, 120($sp)
- ldq $22, 128($sp)
- ldq $23, 136($sp)
- ldq $24, 144($sp)
- ldq $25, 152($sp)
- ldq $29, 160($sp)
+ ldq $26, 0*8($sp)
+ ldq $0, 1*8($sp)
+ ldq $1, 2*8($sp)
+ ldq $2, 3*8($sp)
+ ldq $3, 4*8($sp)
+ ldq $4, 5*8($sp)
+ ldq $5, 6*8($sp)
+ ldq $6, 7*8($sp)
+ ldq $7, 8*8($sp)
+ ldq $8, 9*8($sp)
+ ldq $16, 10*8($sp)
+ ldq $17, 11*8($sp)
+ ldq $18, 12*8($sp)
+ ldq $19, 13*8($sp)
+ ldq $20, 14*8($sp)
+ ldq $21, 15*8($sp)
+ ldq $22, 16*8($sp)
+ ldq $23, 17*8($sp)
+ ldq $24, 18*8($sp)
+ ldq $25, 19*8($sp)
+ ldq $29, 20*8($sp)
+ ldt $f0, 21*8($sp)
+ ldt $f1, 22*8($sp)
+ ldt $f10, 23*8($sp)
+ ldt $f11, 24*8($sp)
+ ldt $f12, 25*8($sp)
+ ldt $f13, 26*8($sp)
+ ldt $f14, 27*8($sp)
+ ldt $f15, 28*8($sp)
+ ldt $f16, 29*8($sp)
+ ldt $f17, 30*8($sp)
+ ldt $f18, 31*8($sp)
+ ldt $f19, 32*8($sp)
+ ldt $f20, 33*8($sp)
+ ldt $f21, 34*8($sp)
+ ldt $f22, 35*8($sp)
+ ldt $f23, 36*8($sp)
+ ldt $f24, 37*8($sp)
+ ldt $f25, 38*8($sp)
+ ldt $f26, 39*8($sp)
+ ldt $f27, 40*8($sp)
+ ldt $f28, 41*8($sp)
+ ldt $f29, 42*8($sp)
+ ldt $f30, 43*8($sp)
/* Flush the Icache after having modified the .plt code. */
" #IMB "
/* Clean up and turn control to the destination */
- lda $sp, 168($sp)
+ lda $sp, 44*8($sp)
jmp $31, ($27)
.end " #tramp_name)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2bad373511150e3cedbbfa9c2319dd3087945118
commit 2bad373511150e3cedbbfa9c2319dd3087945118
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 7 12:44:06 1999 +0000
Add alias _Exit.
diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c
index 455dc0e..5f9e5e3 100644
--- a/sysdeps/standalone/i386/force_cpu386/_exit.c
+++ b/sysdeps/standalone/i386/force_cpu386/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -36,6 +36,7 @@ _exit (status)
/* status is ignored */
Bsp_cleanup();
}
+weak_alias (_exit, _Exit)
#ifdef HAVE_GNU_LD
diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c
index e56dcc0..8ca6e78 100644
--- a/sysdeps/standalone/i960/nindy960/_exit.c
+++ b/sysdeps/standalone/i960/nindy960/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -43,6 +43,7 @@ _exit (status)
* application if the user types "go".
*/
}
+weak_alias (_exit, _Exit)
#ifdef HAVE_GNU_LD
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
index d45e52d..ecd93db 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -47,3 +47,4 @@ _exit (status)
M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */
asm volatile( "trap #13" ); /* insures SUPV mode */
}
+weak_alias (_exit, _Exit)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3289ba5e8861eb6c7485bcdc1d72b0500a35746
commit a3289ba5e8861eb6c7485bcdc1d72b0500a35746
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 16:57:43 1999 +0000
Atomic operation functions for Alpha.
diff --git a/sysdeps/alpha/atomicity.h b/sysdeps/alpha/atomicity.h
new file mode 100644
index 0000000..34a538f
--- /dev/null
+++ b/sysdeps/alpha/atomicity.h
@@ -0,0 +1,102 @@
+/* Low-level functions for atomic operations. Alpha version.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H 1
+
+#include <inttypes.h>
+
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ register int result, tmp;
+
+ __asm__ __volatile__ (
+ "/* Inline exchange & add */\n"
+ "1:\t"
+ "ldl_l %0,%3\n\t"
+ "addl %0,%4,%1\n\t"
+ "stl_c %1,%2\n\t"
+ "beq %1,2f\n"
+ ".subsection 2\n"
+ "2:\t"
+ "br 1b\n"
+ ".subsection 1\n\t"
+ "mb\n\t"
+ "/* End exchange & add */"
+ : "=&r"(result), "=&r"(tmp), "=m"(*mem)
+ : "m" (*mem), "r"(val));
+
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ register int result;
+
+ __asm__ __volatile__ (
+ "/* Inline exchange & add */\n"
+ "1:\t"
+ "ldl_l %0,%2\n\t"
+ "addl %0,%3,%0\n\t"
+ "stl_c %0,%1\n\t"
+ "beq %0,2f\n\t"
+ ".subsection 2\n"
+ "2:\t"
+ "br 1b\n"
+ ".subsection 1\n\t"
+ "mb\n\t"
+ "/* End exchange & add */"
+ : "=&r"(result), "=m"(*mem)
+ : "m" (*mem), "r"(val));
+}
+
+static inline long
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ long int ret;
+
+ __asm__ __volatile__ (
+ "/* Inline compare & swap */\n"
+ "1:\t"
+ "ldq_l %0,%4\n\t"
+ "cmpeq %0,%2,%0\n\t"
+ "beq %0,3f\n\t"
+ "mov %3,%0\n\t"
+ "stq_c %0,%1\n\t"
+ "beq %0,2f\n\t"
+ ".subsection 2\n"
+ "2:\t"
+ "br 1b\n"
+ ".subsection 1\n\t"
+ "3:\t"
+ "mb\n\t"
+ "/* End compare & swap */"
+ : "=&r"(ret), "=m"(*p)
+ : "r"(oldval), "r"(newval), "m"(*p));
+
+ return ret;
+}
+
+#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8380d4887d3332ea9579615aa0726e6e17ed24ca
commit 8380d4887d3332ea9579615aa0726e6e17ed24ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 16:56:01 1999 +0000
(__floorf): Copy commentary from bits/mathinclude.h. Kill unused defines.
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index 7502b67..9e69364 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -17,14 +17,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef __USE_EXTERN_INLINES
-#define __USE_EXTERN_INLINES
-#endif
-#define __floorf __i_floorf
-
#include <math.h>
-#undef __floorf
+
+/* Use the -inf rounding mode conversion instructions to implement
+ floor. We note when the exponent is large enough that the value
+ must be integral, as this avoids unpleasant integer overflows. */
float
__floorf (float x)
@@ -37,7 +35,7 @@ __floorf (float x)
convert back to S_Floating in the end. The initial
conversion to T_Floating is needed to handle denormals. */
- float __tmp1, __tmp2;
+ float tmp1, tmp2;
__asm ("cvtst/s %3,%2\n\t"
#ifdef _IEEE_FP_INEXACT
@@ -46,7 +44,7 @@ __floorf (float x)
"cvttq/svm %2,%1\n\t"
#endif
"cvtqt/m %1,%0\n\t"
- : "=f"(x), "=&f"(__tmp1), "=&f"(__tmp2)
+ : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
: "f"(x));
}
return x;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92a38c359c748628f33f1352675610755724dbc7
commit 92a38c359c748628f33f1352675610755724dbc7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 16:55:14 1999 +0000
(__floor): Copy commentary from bits/mathinclude.h. Kill unused defines.
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index c7e1466..146e19b 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -17,18 +17,17 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef __USE_EXTERN_INLINES
-#define __USE_EXTERN_INLINES
-#endif
-#define __floor __i_floor
-
#include <math.h>
-#undef __floor
+
+/* Use the -inf rounding mode conversion instructions to implement
+ floor. We note when the exponent is large enough that the value
+ must be integral, as this avoids unpleasant integer overflows. */
double
__floor (double x)
{
+ /* Check not zero since floor(-0) == -0. */
if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
{
double __tmp1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f8aa49875333b3ce3f790a407b0597601f233a1a
commit f8aa49875333b3ce3f790a407b0597601f233a1a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 10:57:47 1999 +0000
(__floor): Don't depend on inlining, duplicate the code.
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
index 7b64792..c7e1466 100644
--- a/sysdeps/alpha/fpu/s_floor.c
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -29,7 +29,20 @@
double
__floor (double x)
{
- return __i_floor(x);
+ if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ {
+ double __tmp1;
+ __asm (
+#ifdef _IEEE_FP_INEXACT
+ "cvttq/svim %2,%1\n\t"
+#else
+ "cvttq/svm %2,%1\n\t"
+#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(x), "=&f"(__tmp1)
+ : "f"(x));
+ }
+ return x;
}
weak_alias (__floor, floor)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=068bbaf6e03542833233fb8789481e0ac05c8768
commit 068bbaf6e03542833233fb8789481e0ac05c8768
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 10:57:31 1999 +0000
(__floorf): Don't depend on inlining, duplicate the code.
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
index d25643d..7502b67 100644
--- a/sysdeps/alpha/fpu/s_floorf.c
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -29,7 +29,27 @@
float
__floorf (float x)
{
- return __i_floorf(x);
+ /* Check not zero since floor(-0) == -0. */
+ if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ {
+ /* Note that Alpha S_Floating is stored in registers in a
+ restricted T_Floating format, so we don't even need to
+ convert back to S_Floating in the end. The initial
+ conversion to T_Floating is needed to handle denormals. */
+
+ float __tmp1, __tmp2;
+
+ __asm ("cvtst/s %3,%2\n\t"
+#ifdef _IEEE_FP_INEXACT
+ "cvttq/svim %2,%1\n\t"
+#else
+ "cvttq/svm %2,%1\n\t"
+#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(x), "=&f"(__tmp1), "=&f"(__tmp2)
+ : "f"(x));
+ }
+ return x;
}
weak_alias (__floorf, floorf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a87b0e3624267638026c10120cb80d72006585ab
commit a87b0e3624267638026c10120cb80d72006585ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 09:06:03 1999 +0000
m68k specific export and versioning list.
diff --git a/sysdeps/m68k/Versions b/sysdeps/m68k/Versions
new file mode 100644
index 0000000..2b020f8
--- /dev/null
+++ b/sysdeps/m68k/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.0 {
+ # Functions from libgcc.
+ __divdi3; __moddi3; __udivdi3; __umoddi3;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac3b5c24b4af9e8eba00f6531380e849d7392460
commit ac3b5c24b4af9e8eba00f6531380e849d7392460
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 29 08:03:49 1999 +0000
We need to use a syscall.
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
deleted file mode 100644
index 4c2f1a2..0000000
--- a/sysdeps/unix/sysv/linux/arm/vfork.S
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Philip Blundell <philb@gnu.org>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#define _SIGNAL_H
-#include <bits/signum.h>
-
-#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */
-#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to
- wake it up on mm_release. */
-
-/* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the new process exits or is
- replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
- and the process ID of the new process to the old process. */
-
-ENTRY (__vfork)
- mov a1, $SIGCLD
- orr a1, a1, $(CLONE_VM | CLONE_VFORK)
- mov a2, $0
- swi SYS_ify(clone)
- cmn a1, $4096
- bhs PLTJMP(C_SYMBOL_NAME(__syscall_error))
- RETINSTR(mov, pc, lr)
-
-PSEUDO_END (__vfork)
-
-weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9953714a279e36ce73c68463b2c414e2f9d60bfc
commit 9953714a279e36ce73c68463b2c414e2f9d60bfc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 28 17:34:45 1999 +0000
configure script for Solaris.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure b/sysdeps/unix/sysv/sysv4/solaris2/configure
new file mode 100644
index 0000000..9dc9768
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/configure
@@ -0,0 +1,31 @@
+ # Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2
+
+# Concensus on stdio is that it's broken.
+test $stdio = default && stdio=libio
+
+# Crypt is your friend.
+case $add_ons in
+ *crypt*)
+ message=
+ ;;
+ *)
+ message="\
+*** WARNING:
+*** Are you sure you do not want to use the \`crypt' add-on?"
+ ;;
+esac
+
+if test "$message"; then
+ if test $enable_sanity = yes; then
+ echo "\
+*** You should not compile the GNU libc without the \`crypt' add-on.
+*** Not using them risks to be incompatible with the libraries of
+*** other systems. Consider getting the add-on and restart the
+*** configuration.
+*** If you reall mean to avoid this add-on run configure again, now
+*** using the extra parameter \`--disable-sanity-checks'."
+ exit 1
+ else
+ echo "$message"
+ fi
+fi
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/configure.in b/sysdeps/unix/sysv/sysv4/solaris2/configure.in
new file mode 100644
index 0000000..1c02fbb
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/configure.in
@@ -0,0 +1,33 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/sysv4/solaris2
+
+# Concensus on stdio is that it's broken.
+test $stdio = default && stdio=libio
+
+# Crypt is your friend.
+case $add_ons in
+ *crypt*)
+ message=
+ ;;
+ *)
+ message="\
+*** WARNING:
+*** Are you sure you do not want to use the \`crypt' add-on?"
+ ;;
+esac
+
+if test "$message"; then
+ if test $enable_sanity = yes; then
+ echo "\
+*** You should not compile the GNU libc without the \`crypt' add-on.
+*** Not using them risks to be incompatible with the libraries of
+*** other systems. Consider getting the add-on and restart the
+*** configuration.
+*** If you reall mean to avoid this add-on run configure again, now
+*** using the extra parameter \`--disable-sanity-checks'."
+ exit 1
+ else
+ echo "$message"
+ fi
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0583626692f7f0d76c0aa57e069db1c420dd6fcf
commit 0583626692f7f0d76c0aa57e069db1c420dd6fcf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 28 17:34:23 1999 +0000
Error messages for Solaris/SPARC.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
new file mode 100644
index 0000000..37f003b
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c
@@ -0,0 +1,184 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+
+
+/* This is a list of all known `errno' codes. */
+
+
+const int _sys_nerr = 152;
+
+const char *const _sys_errlist[] =
+{
+ N_("Error 0"),
+ N_("Not owner"),
+ N_("No such file or directory"),
+ N_("No such process"),
+ N_("Interrupted system call"),
+ N_("I/O error"),
+ N_("No such device or address"),
+ N_("Arg list too long"),
+ N_("Exec format error"),
+ N_("Bad file number"),
+ N_("No child processes"),
+ N_("Resource temporarily unavailable"),
+ N_("Not enough space"),
+ N_("Permission denied"),
+ N_("Bad address"),
+ N_("Block device required"),
+ N_("Device busy"),
+ N_("File exists"),
+ N_("Cross-device link"),
+ N_("No such device"),
+ N_("Not a directory"),
+ N_("Is a directory"),
+ N_("Invalid argument"),
+ N_("File table overflow"),
+ N_("Too many open files"),
+ N_("Inappropriate ioctl for device"),
+ N_("Text file busy"),
+ N_("File too large"),
+ N_("No space left on device"),
+ N_("Illegal seek"),
+ N_("Read-only file system"),
+ N_("Too many links"),
+ N_("Broken pipe"),
+ N_("Argument out of domain"),
+ N_("Result too large"),
+ N_("No message of desired type"),
+ N_("Identifier removed"),
+ N_("Channel number out of range"),
+ N_("Level 2 not synchronized"),
+ N_("Level 3 halted"),
+ N_("Level 3 reset"),
+ N_("Link number out of range"),
+ N_("Protocol driver not attached"),
+ N_("No CSI structure available"),
+ N_("Level 2 halted"),
+ N_("Deadlock situation detected/avoided"),
+ N_("No record locks available"),
+ N_("Operation canceled"),
+ N_("Operation not supported"),
+ N_("Disc quota exceeded"),
+ N_("Bad exchange descriptor"),
+ N_("Bad request descriptor"),
+ N_("Message tables full"),
+ N_("Anode table overflow"),
+ N_("Bad request code"),
+ N_("Invalid slot"),
+ N_("File locking deadlock"),
+ N_("Bad font file format"),
+ N_("Error 58"),
+ N_("Error 59"),
+ N_("Not a stream device"),
+ N_("No data available"),
+ N_("Timer expired"),
+ N_("Out of stream resources"),
+ N_("Machine is not on the network"),
+ N_("Package not installed"),
+ N_("Object is remote"),
+ N_("Link has been severed"),
+ N_("Advertise error"),
+ N_("Srmount error"),
+ N_("Communication error on send"),
+ N_("Protocol error"),
+ N_("Error 72"),
+ N_("Error 73"),
+ N_("Multihop attempted"),
+ N_("Error 75"),
+ N_("Error 76"),
+ N_("Not a data message"),
+ N_("File name too long"),
+ N_("Value too large for defined data type"),
+ N_("Name not unique on network"),
+ N_("File descriptor in bad state"),
+ N_("Remote address changed"),
+ N_("Can not access a needed shared library"),
+ N_("Accessing a corrupted shared library"),
+ N_(".lib section in a.out corrupted"),
+ N_("Attempting to link in more shared libraries than system limit"),
+ N_("Can not exec a shared library directly"),
+ N_("Illegal byte sequence"),
+ N_("Operation not applicable"),
+ N_("Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"),
+ N_("Error 91"),
+ N_("Error 92"),
+ N_("Directory not empty"),
+ N_("Too many users"),
+ N_("Socket operation on non-socket"),
+ N_("Destination address required"),
+ N_("Message too long"),
+ N_("Protocol wrong type for socket"),
+ N_("Option not supported by protocol"),
+ N_("Error 100"),
+ N_("Error 101"),
+ N_("Error 102"),
+ N_("Error 103"),
+ N_("Error 104"),
+ N_("Error 105"),
+ N_("Error 106"),
+ N_("Error 107"),
+ N_("Error 108"),
+ N_("Error 109"),
+ N_("Error 110"),
+ N_("Error 111"),
+ N_("Error 112"),
+ N_("Error 113"),
+ N_("Error 114"),
+ N_("Error 115"),
+ N_("Error 116"),
+ N_("Error 117"),
+ N_("Error 118"),
+ N_("Error 119"),
+ N_("Protocol not supported"),
+ N_("Socket type not supported"),
+ N_("Operation not supported on transport endpoint"),
+ N_("Protocol family not supported"),
+ N_("Address family not supported by protocol family"),
+ N_("Address already in use"),
+ N_("Cannot assign requested address"),
+ N_("Network is down"),
+ N_("Network is unreachable"),
+ N_("Network dropped connection because of reset"),
+ N_("Software caused connection abort"),
+ N_("Connection reset by peer"),
+ N_("No buffer space available"),
+ N_("Transport endpoint is already connected"),
+ N_("Transport endpoint is not connected"),
+ N_("Structure needs cleaning"),
+ N_("Error 136"),
+ N_("Not a name file"),
+ N_("Not available"),
+ N_("Is a name file"),
+ N_("Remote I/O error"),
+ N_("Reserved for future use"),
+ N_("Error 142"),
+ N_("Cannot send after socket shutdown"),
+ N_("Too many references: cannot splice"),
+ N_("Connection timed out"),
+ N_("Connection refused"),
+ N_("Host is down"),
+ N_("No route to host"),
+ N_("Operation already in progress"),
+ N_("Operation now in progress"),
+ N_("Stale NFS file handle)"
+};
+
+weak_alias (_sys_errlist, sys_errlist)
+weak_alias (_sys_nerr, sys_nerr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6e4428cea134a8aa1d2612fdd44d48dd7a938f7
commit f6e4428cea134a8aa1d2612fdd44d48dd7a938f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 25 09:27:19 1999 +0000
Correct error check again.
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 46359e8..94aed12 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -41,13 +41,13 @@ ENTRY(__clone)
str r0, [r1]
@ do the system call
- @ get flags
+ @ get flags
mov r0, r2
@ new sp is already in r1
swi SYS_ify(clone)
- cmn a1, $4096
- bhs PLTJMP(C_SYMBOL_NAME(__syscall_error))
- RETINSTR(movne,pc,lr)
+ movs a1, a1
+ blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ RETINSTR(movne, pc, lr)
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61f5bb0159131de60f5eabcba9ec045d4acd9443
commit 61f5bb0159131de60f5eabcba9ec045d4acd9443
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 22 09:19:57 1999 +0000
Undo last change. Not needed.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index f4b271d..0bf79a4 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,4 +1,3 @@
-vfork.S
clone.S
init-first.h
ioperm.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33092c325a93991e6c9a80893ba18f40798d22ff
commit 33092c325a93991e6c9a80893ba18f40798d22ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 21 09:46:35 1999 +0000
Add vfork.S.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 0bf79a4..f4b271d 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,3 +1,4 @@
+vfork.S
clone.S
init-first.h
ioperm.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f833eba90a4ff7e73410143f8f687dca393550e
commit 7f833eba90a4ff7e73410143f8f687dca393550e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 21 09:46:25 1999 +0000
Optimise a little, support 26-bit machines correctly and fix check for
returned errors.
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 728d62f..46359e8 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Pat Beirne <patb@corelcomputer.com>
@@ -45,20 +45,17 @@ ENTRY(__clone)
mov r0, r2
@ new sp is already in r1
swi SYS_ify(clone)
- cmp r0, #0
- blt PLTJMP(syscall_error)
- beq thread_start
- @ else, thread was launched...
- mov pc, lr
+ cmn a1, $4096
+ bhs PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ RETINSTR(movne,pc,lr)
-thread_start:
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
mov lr, pc
ldr pc, [sp]
@ and we are done, passing the return value through r0
- bl PLTJMP(_exit)
+ b PLTJMP(_exit)
PSEUDO_END (__clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=462d695aea95ad3908aabb4013294c8441fe99f1
commit 462d695aea95ad3908aabb4013294c8441fe99f1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 21 09:46:15 1999 +0000
Linux/Arm sigaction implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c b/sysdeps/unix/sysv/linux/arm/sigaction.c
new file mode 100644
index 0000000..76399a2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
@@ -0,0 +1,161 @@
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <signal.h>
+#include <string.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+/* The difference here is that the sigaction structure used in the
+ kernel is not the same as we use in the libc. Therefore we must
+ translate it here. */
+#include <kernel_sigaction.h>
+
+extern int __syscall_sigaction (int, const struct old_kernel_sigaction *,
+ struct old_kernel_sigaction *);
+extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *,
+ struct kernel_sigaction *, size_t);
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+int __libc_missing_rt_sigs;
+
+#define SA_RESTORER 0x04000000
+
+/* When RT signals are in use we need to use a different return stub. */
+#ifdef __NR_rt_sigreturn
+#define choose_restorer(flags) \
+ (flags & SA_SIGINFO) ? &&__default_rt_sa_restorer \
+ : &&__default_sa_restorer
+#else
+#define choose_restorer(flags) \
+ &&__default_sa_restorer
+#endif
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+ If OACT is not NULL, put the old action for SIG in *OACT. */
+int
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
+{
+ struct old_kernel_sigaction k_sigact, k_osigact;
+ int result;
+
+#ifdef __NR_rt_sigaction
+ /* First try the RT signals. */
+ if (!__libc_missing_rt_sigs)
+ {
+ struct kernel_sigaction kact, koact;
+ int saved_errno = errno;
+
+ if (act)
+ {
+ kact.k_sa_handler = act->sa_handler;
+ memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
+ kact.sa_flags = act->sa_flags;
+# ifdef HAVE_SA_RESTORER
+ /* If the user specified SA_ONSTACK this means she is trying to
+ use the old-style stack switching. Unfortunately this
+ requires the sa_restorer field so we cannot install our own
+ handler. (In fact the user is likely to be out of luck anyway
+ since the kernel currently only supports stack switching via
+ the X/Open sigaltstack interface, but we allow for the
+ possibility that this might change in the future.) */
+ if (kact.sa_flags & (SA_RESTORER | SA_ONSTACK))
+ kact.sa_restorer = act->sa_restorer;
+ else
+ {
+ kact.sa_restorer = choose_restorer (kact.sa_flags);
+ kact.sa_flags |= SA_RESTORER;
+ }
+# endif
+ }
+
+ /* XXX The size argument hopefully will have to be changed to the
+ real size of the user-level sigset_t. */
+ result = INLINE_SYSCALL (rt_sigaction, 4, sig, act ? &kact : NULL,
+ oact ? &koact : NULL, _NSIG / 8);
+
+ if (result >= 0 || errno != ENOSYS)
+ {
+ if (oact && result >= 0)
+ {
+ oact->sa_handler = koact.k_sa_handler;
+ memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
+ oact->sa_flags = koact.sa_flags;
+# ifdef HAVE_SA_RESTORER
+ oact->sa_restorer = koact.sa_restorer;
+# endif
+ }
+ return result;
+ }
+
+ __set_errno (saved_errno);
+ __libc_missing_rt_sigs = 1;
+ }
+#endif
+
+ if (act)
+ {
+ k_sigact.k_sa_handler = act->sa_handler;
+ k_sigact.sa_mask = act->sa_mask.__val[0];
+ k_sigact.sa_flags = act->sa_flags;
+#ifdef HAVE_SA_RESTORER
+ /* See the comments above for why we test SA_ONSTACK. */
+ if (k_sigact.sa_flags & (SA_RESTORER | SA_ONSTACK))
+ k_sigact.sa_restorer = act->sa_restorer;
+ else
+ {
+ k_sigact.sa_restorer = choose_restorer (k_sigact.sa_flags);
+ k_sigact.sa_flags |= SA_RESTORER;
+ }
+#endif
+ }
+ result = INLINE_SYSCALL (sigaction, 3, sig, act ? &k_sigact : NULL,
+ oact ? &k_osigact : NULL);
+ if (oact && result >= 0)
+ {
+ oact->sa_handler = k_osigact.k_sa_handler;
+ oact->sa_mask.__val[0] = k_osigact.sa_mask;
+ oact->sa_flags = k_osigact.sa_flags;
+#ifdef HAVE_SA_RESTORER
+ oact->sa_restorer = k_osigact.sa_restorer;
+#endif
+ }
+ return result;
+
+ /* If no SA_RESTORER function was specified by the application we use
+ this one. This avoids the need for the kernel to synthesise a return
+ instruction on the stack, which would involve expensive cache flushes. */
+ __default_sa_restorer:
+ asm volatile ("swi %0" : : "i" (__NR_sigreturn));
+
+#ifdef __NR_rt_sigreturn
+ __default_rt_sa_restorer:
+ asm volatile ("swi %0" : : "i" (__NR_rt_sigreturn));
+#endif
+
+ /* NOTREACHED */
+ return -1;
+}
+
+weak_alias (__sigaction, sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5149854edff9d449a052b9615922b6d820328682
commit 5149854edff9d449a052b9615922b6d820328682
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 21 09:46:07 1999 +0000
Linux/Arm vfork implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/vfork.S b/sysdeps/unix/sysv/linux/arm/vfork.S
new file mode 100644
index 0000000..4c2f1a2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/vfork.S
@@ -0,0 +1,46 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#define _SIGNAL_H
+#include <bits/signum.h>
+
+#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */
+#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to
+ wake it up on mm_release. */
+
+/* Clone the calling process, but without copying the whole address space.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+ mov a1, $SIGCLD
+ orr a1, a1, $(CLONE_VM | CLONE_VFORK)
+ mov a2, $0
+ swi SYS_ify(clone)
+ cmn a1, $4096
+ bhs PLTJMP(C_SYMBOL_NAME(__syscall_error))
+ RETINSTR(mov, pc, lr)
+
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f67e2479b460fa08da1506b2e50a36f096ff12f3
commit f67e2479b460fa08da1506b2e50a36f096ff12f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 20 09:23:32 1999 +0000
Add __atan2 for libm and GLIBC_2.0.
diff --git a/sysdeps/alpha/Versions b/sysdeps/alpha/Versions
index c7c1f04..76b67a6 100644
--- a/sysdeps/alpha/Versions
+++ b/sysdeps/alpha/Versions
@@ -5,3 +5,9 @@ libc {
__remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
}
}
+libm {
+ GLIBC_2.0 {
+ # used in inline functions.
+ __atan2;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f90bac9291a0d6fe48264d253a218354fdbe2ad1
commit f90bac9291a0d6fe48264d253a218354fdbe2ad1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 19 12:24:34 1999 +0000
Add baud rates > 460800.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index 0d57c48..bfd64ee 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. Linux version.
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -138,6 +138,17 @@ struct termios
#define B115200 00021
#define B230400 00022
#define B460800 00023
+#define B500000 00024
+#define B576000 00025
+#define B921600 00026
+#define B1000000 00027
+#define B1152000 00030
+#define B1500000 00031
+#define B2000000 00032
+#define B2500000 00033
+#define B3000000 00034
+#define B3500000 00035
+#define B4000000 00036
#define CSIZE 00001400
#define CS5 00000000
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index de21ee1..e43c03b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. Linux/MIPS version.
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -200,11 +200,22 @@ struct termios
#define HUPCL 0002000 /* Hang up on last close. */
#define CLOCAL 0004000 /* Ignore modem status lines. */
#ifdef __USE_BSD
-# define CBAUDEX 0010000
-# define B57600 0010001
-# define B115200 0010002
-# define B230400 0010003
-# define B460800 0010004
+# define CBAUDEX 0010000
+# define B57600 0010001
+# define B115200 0010002
+# define B230400 0010003
+# define B460800 0010004
+# define B500000 0010005
+# define B576000 0010006
+# define B921600 0010007
+# define B1000000 0010010
+# define B1152000 0010011
+# define B1500000 0010012
+# define B2000000 0010013
+# define B2500000 0010014
+# define B3000000 0010015
+# define B3500000 0010016
+# define B4000000 0010017
# define CIBAUD 002003600000 /* input baud rate (not used) */
# define CRTSCTS 020000000000 /* flow control */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68798276c9dbcb1e3c6fe924e1ecf277c81f72c6
commit 68798276c9dbcb1e3c6fe924e1ecf277c81f72c6
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jan 18 01:45:33 1999 +0000
* sysdeps/unix/sysv/linux/m68k/vfork.S: Test return value after
fork syscall.
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
index e5761f9..d5b321d 100644
--- a/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -57,6 +57,7 @@ ENTRY (__vfork)
movel #SYS_ify (fork), %d0
trap #0
+ tstl %d0
jmi SYSCALL_ERROR_LABEL
rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c56758e2a2c3fa0d66db27ea40b778240ac206e
commit 6c56758e2a2c3fa0d66db27ea40b778240ac206e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 13:30:32 1999 +0000
Linux/MIPS specific siginfo definition.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
new file mode 100644
index 0000000..81a6ec1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
@@ -0,0 +1,282 @@
+/* siginfo_t, sigevent and constants. Linux version.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if !defined _SIGNAL_H && !defined __need_siginfo_t
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+#if (!defined __have_siginfo_t \
+ && (defined _SIGNAL_H || defined __need_siginfo_t))
+# define __have_siginfo_t 1
+
+/* Type for data associated with a signal. */
+typedef union sigval
+ {
+ int sival_int;
+ void *sival_ptr;
+ } sigval_t;
+
+# define __SI_MAX_SIZE 128
+# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
+
+typedef struct siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_errno; /* If non-zero, an errno value associated with
+ this signal, as defined in <errno.h>. */
+ int si_code; /* Signal code. */
+
+ union
+ {
+ int _pad[__SI_PAD_SIZE];
+
+ /* kill(). */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ } _kill;
+
+ /* SIGCHLD. */
+ struct
+ {
+ __pid_t si_pid; /* Which child. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ int si_status; /* Exit value or signal. */
+ __clock_t si_utime;
+ __clock_t si_stime;
+ } _sigchld;
+
+ /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
+ struct
+ {
+ void *si_addr; /* Faulting insn/memory ref. */
+ } _sigfault;
+
+ /* SIGPOLL. */
+ struct
+ {
+ int si_band; /* Band event for SIGPOLL. */
+ int si_fd;
+ } _sigpoll;
+
+ /* POSIX.1b timers. */
+ struct
+ {
+ unsigned int _timer1;
+ unsigned int _timer2;
+ } _timer;
+
+ /* POSIX.1b signals. */
+ struct
+ {
+ __pid_t si_pid; /* Sending process ID. */
+ __uid_t si_uid; /* Real user ID of sending process. */
+ sigval_t si_sigval; /* Signal value. */
+ } _rt;
+ } _sifields;
+ } siginfo_t;
+
+
+/* X/Open requires some more fields with fixed names. */
+# define si_pid _sifields._kill.si_pid
+# define si_uid _sifields._kill.si_uid
+# define si_status _sifields._sigchld.si_status
+# define si_utime _sifields._sigchld.si_utime
+# define si_stime _sifields._sigchld.si_stime
+# define si_value _sifields._rt.si_sigval
+# define si_int _sifields._rt.si_sigval.sival_int
+# define si_ptr _sifields._rt.si_sigval.sival_ptr
+# define si_addr _sifields._sigfault.si_addr
+# define si_band _sifields._sigpoll.si_band
+# define si_fd _sifields._sigpoll.si_fd
+
+
+/* Values for `si_code'. Positive values are reserved for kernel-generated
+ signals. */
+enum
+{
+ SI_SIGIO = -5, /* Sent by queued SIGIO. */
+# define SI_SIGIO SI_SIGIO
+ SI_MESGQ, /* Sent by real time mesq state change. */
+# define SI_MESGQ SI_MESGQ
+ SI_TIMER, /* Sent by real time mesq state change. */
+# define SI_TIMER SI_TIMER
+ SI_ASYNCIO, /* Sent by AIO completion. */
+# define SI_ASYNCIO SI_ASYNCIO
+ SI_QUEUE, /* Sent by sigqueue. */
+# define SI_QUEUE SI_QUEUE
+ SI_USER /* Sent by kill, sigsend, raise. */
+# define SI_USER SI_USER
+};
+
+
+/* `si_code' values for SIGILL signal. */
+enum
+{
+ ILL_ILLOPC = 1, /* Illegal opcode. */
+# define ILL_ILLOPC ILL_ILLOPC
+ ILL_ILLOPN, /* Illegal operand. */
+# define ILL_ILLOPN ILL_ILLOPN
+ ILL_ILLADR, /* Illegal addressing mode. */
+# define ILL_ILLADR ILL_ILLADR
+ ILL_ILLTRP, /* Illegal trap. */
+# define ILL_ILLTRP ILL_ILLTRP
+ ILL_PRVOPC, /* Privileged opcode. */
+# define ILL_PRVOPC ILL_PRVOPC
+ ILL_PRVREG, /* Privileged register. */
+# define ILL_PRVREG ILL_PRVREG
+ ILL_COPROC, /* Coprocessor error. */
+# define ILL_COPROC ILL_COPROC
+ ILL_BADSTK /* Internal stack error. */
+# define ILL_BADSTK ILL_BADSTK
+};
+
+/* `si_code' values for SIGFPE signal. */
+enum
+{
+ FPE_INTDIV = 1, /* Integer divide by zero. */
+# define FPE_INTDIV FPE_INTDIV
+ FPE_INTOVF, /* Integer overflow. */
+# define FPE_INTOVF FPE_INTOVF
+ FPE_FLTDIV, /* Floating point divide by zero. */
+# define FPE_FLTDIV FPE_FLTDIV
+ FPE_FLTOVF, /* Floating point overflow. */
+# define FPE_FLTOVF FPE_FLTOVF
+ FPE_FLTUND, /* Floating point underflow. */
+# define FPE_FLTUND FPE_FLTUND
+ FPE_FLTRES, /* Floating point inexact result. */
+# define FPE_FLTRES FPE_FLTRES
+ FPE_FLTINV, /* Floating point invalid operation. */
+# define FPE_FLTINV FPE_FLTINV
+ FPE_FLTSUB /* Subscript out of range. */
+# define FPE_FLTSUB FPE_FLTSUB
+};
+
+/* `si_code' values for SIGSEGV signal. */
+enum
+{
+ SEGV_MAPERR = 1, /* Address not mapped to object. */
+# define SEGV_MAPERR SEGV_MAPERR
+ SEGV_ACCERR /* Invalid permissions for mapped object. */
+# define SEGV_ACCERR SEGV_ACCERR
+};
+
+/* `si_code' values for SIGBUS signal. */
+enum
+{
+ BUS_ADRALN = 1, /* Invalid address alignment. */
+# define BUS_ADRALN BUS_ADRALN
+ BUS_ADRERR, /* Non-existant physical address. */
+# define BUS_ADRERR BUS_ADRERR
+ BUS_OBJERR /* Object specific hardware error. */
+# define BUS_OBJERR BUS_OBJERR
+};
+
+/* `si_code' values for SIGTRAP signal. */
+enum
+{
+ TRAP_BRKPT = 1, /* Process breakpoint. */
+# define TRAP_BRKPT TRAP_BRKPT
+ TRAP_TRACE /* Process trace trap. */
+# define TRAP_TRACE TRAP_TRACE
+};
+
+/* `si_code' values for SIGCHLD signal. */
+enum
+{
+ CLD_EXITED = 1, /* Child has exited. */
+# define CLD_EXITED CLD_EXITED
+ CLD_KILLED, /* Child was killed. */
+# define CLD_KILLED CLD_KILLED
+ CLD_DUMPED, /* Child terminated abnormally. */
+# define CLD_DUMPED CLD_DUMPED
+ CLD_TRAPPED, /* Traced child has trapped. */
+# define CLD_TRAPPED CLD_TRAPPED
+ CLD_STOPPED, /* Child has stopped. */
+# define CLD_STOPPED CLD_STOPPED
+ CLD_CONTINUED /* Stopped child has continued. */
+# define CLD_CONTINUED CLD_CONTINUED
+};
+
+/* `si_code' values for SIGPOLL signal. */
+enum
+{
+ POLL_IN = 1, /* Data input available. */
+# define POLL_IN POLL_IN
+ POLL_OUT, /* Output buffers available. */
+# define POLL_OUT POLL_OUT
+ POLL_MSG, /* Input message available. */
+# define POLL_MSG POLL_MSG
+ POLL_ERR, /* I/O error. */
+# define POLL_ERR POLL_ERR
+ POLL_PRI, /* High priority input available. */
+# define POLL_PRI POLL_PRI
+ POLL_HUP /* Device disconnected. */
+# define POLL_HUP POLL_HUP
+};
+
+# undef __need_siginfo_t
+#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
+
+
+#if defined _SIGNAL_H && !defined __have_sigevent_t
+# define __have_sigevent_t 1
+
+/* Structure to transport application-defined values with signals. */
+# define __SIGEV_MAX_SIZE 64
+# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+
+/* XXX This one might need to change!!! */
+typedef struct sigevent
+ {
+ sigval_t sigev_value;
+ int sigev_signo;
+ int sigev_notify;
+
+ union
+ {
+ int _pad[__SIGEV_PAD_SIZE];
+
+ struct
+ {
+ void (*_function) __PMT ((sigval_t)); /* Function to start. */
+ void *_attribute; /* Really pthread_attr_t. */
+ } _sigev_thread;
+ } _sigev_un;
+ } sigevent_t;
+
+/* POSIX names to access some of the members. */
+# define sigev_notify_function _sigev_un._sigev_thread._function
+# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
+
+/* `sigev_notify' values. */
+enum
+{
+ SIGEV_SIGNAL = 0, /* Notify via signal. */
+# define SIGEV_SIGNAL SIGEV_SIGNAL
+ SIGEV_NONE, /* Other notification: meaningless. */
+# define SIGEV_NONE SIGEV_NONE
+ SIGEV_CALLBACK, /* Deliver via thread creation. */
+# define SIGEV_CALLBACK SIGEV_CALLBACK
+ SIGEV_THREAD /* Deliver via thread creation. */
+# define SIGEV_THREAD SIGEV_THREAD
+};
+
+#endif /* have _SIGNAL_H. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6ab589ffef413ac82e2aa2b56ca3df365243c8d
commit d6ab589ffef413ac82e2aa2b56ca3df365243c8d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 13:26:49 1999 +0000
Add sys/regdef.h back.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index e053523..7c7e545 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -5,4 +5,5 @@ regdef.h
sgidefs.h
fpregdef.h
sys/fpregdef.h
+sys/regdef.h
sys/asm.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e53006703b9ffc90fcef649866480f4865dacceb
commit e53006703b9ffc90fcef649866480f4865dacceb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 13:26:19 1999 +0000
Register definitions for MIPS.
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
new file mode 100644
index 0000000..9f7b318
--- /dev/null
+++ b/sysdeps/mips/sys/regdef.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_REGDEF_H
+#define _SYS_REGDEF_H
+
+/*
+ * Symbolic register names for 32 bit ABI
+ */
+#define zero $0 /* wired zero */
+#define AT $1 /* assembler temp - uppercase because of ".set at" */
+#define v0 $2 /* return value */
+#define v1 $3
+#define a0 $4 /* argument registers */
+#define a1 $5
+#define a2 $6
+#define a3 $7
+#define t0 $8 /* caller saved */
+#define t1 $9
+#define t2 $10
+#define t3 $11
+#define t4 $12
+#define t5 $13
+#define t6 $14
+#define t7 $15
+#define s0 $16 /* callee saved */
+#define s1 $17
+#define s2 $18
+#define s3 $19
+#define s4 $20
+#define s5 $21
+#define s6 $22
+#define s7 $23
+#define t8 $24 /* caller saved */
+#define t9 $25
+#define jp $25 /* PIC jump register */
+#define k0 $26 /* kernel scratch */
+#define k1 $27
+#define gp $28 /* global pointer */
+#define sp $29 /* stack pointer */
+#define fp $30 /* frame pointer */
+#define s8 $30 /* same like fp! */
+#define ra $31 /* return address */
+
+#endif /* _SYS_REGDEF_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=453b49e1f4d7e227f50efeb16f4ee0c68579c7fe
commit 453b49e1f4d7e227f50efeb16f4ee0c68579c7fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 12:57:55 1999 +0000
Add sys/user.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 479a4ab..0bf79a4 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -7,3 +7,4 @@ setfsuid.c
setfsgid.c
bits/armsigctx.h
sys/io.h
+sys/user.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=465cf3e6e259b16923829e146e0fb8cfa9481be3
commit 465cf3e6e259b16923829e146e0fb8cfa9481be3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 12:35:18 1999 +0000
Remove sys/regdef.h.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index 7ccfb1b..e053523 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -4,6 +4,5 @@ rtld-parms
regdef.h
sgidefs.h
fpregdef.h
-sys/regdef.h
sys/fpregdef.h
sys/asm.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9346d2ecb16a8cea9c2cb64834af418ba992c5c8
commit 9346d2ecb16a8cea9c2cb64834af418ba992c5c8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 14 00:15:14 1999 +0000
Add vfork.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9f002b2..829f35e 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -17,6 +17,7 @@ semctl - semctl 4 __semctl semctl
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
sigstack - sigstack 2 sigstack
+vfork - vfork 0 __vfork vfork
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd641f748fa621f1619af6208c58f3b54c494d97
commit cd641f748fa621f1619af6208c58f3b54c494d97
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jan 13 01:43:33 1999 +0000
* sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/vfork.S b/sysdeps/unix/sysv/linux/m68k/vfork.S
new file mode 100644
index 0000000..e5761f9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -0,0 +1,65 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* Clone the calling process, but without copying the whole address space.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+
+#ifdef __NR_vfork
+
+ /* Pop the return PC value into A0. */
+ movel %sp@+, %a0
+
+ /* Stuff the syscall number in D0 and trap into the kernel. */
+ movel #SYS_ify (vfork), %d0
+ trap #0
+ tstl %d0
+ jmi .Lerror /* Branch forward if it failed. */
+
+ /* Jump to the return PC. */
+ jmp %a0@
+
+.Lerror:
+ /* Push back the return PC. */
+ movel %a0,%sp@-
+
+ /* Check if vfork syscall is known at all. */
+ movel #-ENOSYS,%d1
+ cmpl %d0,%d1
+ jne SYSCALL_ERROR_LABEL
+
+#endif
+
+ /* If we don't have vfork, fork is close enough. */
+
+ movel #SYS_ify (fork), %d0
+ trap #0
+ jmi SYSCALL_ERROR_LABEL
+ rts
+
+PSEUDO_END (__vfork)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6446af10a8b602b7b8f6e411c85e1a01db933dc
commit a6446af10a8b602b7b8f6e411c85e1a01db933dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 7 09:53:56 1999 +0000
Fix bug in last change.
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
index 089be69..d92c9fa 100644
--- a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define SIGCONTEXT int signal, int _a2, int _a3, int _a4, union k_sigcontext
+#define SIGCONTEXT int _a2, int _a3, int _a4, union k_sigcontext
#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a3db76a83ba012ee7e901e1f8521769503d0c27
commit 2a3db76a83ba012ee7e901e1f8521769503d0c27
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 7 09:53:42 1999 +0000
Correct type for __fsfilcnt_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index d71599c..0bc6cf6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,94,95,96,97,98,99 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,7 +63,7 @@ typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */
typedef __int64_t __blkcnt64_t; /* "" (LFS) */
typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */
typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */
-typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */
+typedef __uint32_t __fsfilcnt_t; /* Type to count file system inodes. */
typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
typedef __uint32_t __id_t; /* General type for IDs. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44338a354e3cd8e04731c86ca50cd9a229be396c
commit 44338a354e3cd8e04731c86ca50cd9a229be396c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 5 09:03:21 1999 +0000
Linux/ARM specific definitions for signal handlers and ptrace.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/user.h b/sysdeps/unix/sysv/linux/arm/sys/user.h
new file mode 100644
index 0000000..f06d3e4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sys/user.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+#include <features.h>
+
+/* <sys/ptrace.h> and <linux/ptrace.h> both define the PTRACE_* macros.
+ This leads to compilation problems with programs which include both
+ user.h and ptrace.h (eg: GDB). Do not include <linux/ptrace.h> here. */
+#include <asm/ptrace.h>
+
+struct user_fp
+{
+ struct fp_reg
+ {
+ unsigned int sign1:1;
+ unsigned int unused:15;
+ unsigned int sign2:1;
+ unsigned int exponent:14;
+ unsigned int j:1;
+ unsigned int mantissa1:31;
+ unsigned int mantissa0:32;
+ } fpregs[8];
+ unsigned int fpsr:32;
+ unsigned int fpcr:32;
+};
+
+struct user
+{
+ struct pt_regs regs; /* General registers */
+ int u_fpvalid; /* True if math co-processor being used. */
+
+ unsigned long int u_tsize; /* Text segment size (pages). */
+ unsigned long int u_dsize; /* Data segment size (pages). */
+ unsigned long int u_ssize; /* Stack segment size (pages). */
+
+ unsigned long start_code; /* Starting virtual address of text. */
+ unsigned long start_stack; /* Starting virtual address of stack. */
+
+ long int signal; /* Signal that caused the core dump. */
+ int reserved; /* No longer used */
+ struct pt_regs *u_ar0; /* help gdb to find the general registers. */
+
+ unsigned long magic; /* uniquely identify a core file */
+ char u_comm[32]; /* User command that was responsible */
+ int u_debugreg[8];
+ struct user_fp u_fp; /* Floating point registers */
+ struct user_fp_struct *u_fp0; /* help gdb to find the FP registers. */
+};
+
+#endif /* sys/user.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5093ff056ee1c735bb4378012923e55d62447b64
commit 5093ff056ee1c735bb4378012923e55d62447b64
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 17:21:38 1999 +0000
Linux/ARM specific sigcontext definitions.
diff --git a/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
new file mode 100644
index 0000000..089be69
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define SIGCONTEXT int signal, int _a2, int _a3, int _a4, union k_sigcontext
+
+#define GET_PC(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_pc : ctx.v21.arm_pc))
+#define GET_FRAME(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_fp : ctx.v21.arm_fp))
+#define GET_STACK(ctx) ((void *)((ctx.v20.magic == SIGCONTEXT_2_0_MAGIC) ? \
+ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba498420cb6a8e816483f88fb114d3dad59f08ff
commit ba498420cb6a8e816483f88fb114d3dad59f08ff
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 17:21:15 1999 +0000
Correct widths of register values.
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
index 015780c..4ccd9e2 100644
--- a/sysdeps/unix/sysv/linux/arm/register-dump.h
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -1,5 +1,5 @@
/* Dump registers.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pb@nexus.co.uk>, 1998.
@@ -72,12 +72,12 @@ register_dump (int fd, union k_sigcontext *ctx)
hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8);
hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8);
hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8);
- hexvalue (ctx->v20.reg.ARM_r10, regs[10], 4);
- hexvalue (ctx->v20.reg.ARM_fp, regs[11], 4);
- hexvalue (ctx->v20.reg.ARM_ip, regs[12], 4);
- hexvalue (ctx->v20.reg.ARM_sp, regs[13], 4);
- hexvalue (ctx->v20.reg.ARM_lr, regs[14], 4);
- hexvalue (ctx->v20.reg.ARM_pc, regs[15], 4);
+ hexvalue (ctx->v20.reg.ARM_r10, regs[10], 8);
+ hexvalue (ctx->v20.reg.ARM_fp, regs[11], 8);
+ hexvalue (ctx->v20.reg.ARM_ip, regs[12], 8);
+ hexvalue (ctx->v20.reg.ARM_sp, regs[13], 8);
+ hexvalue (ctx->v20.reg.ARM_lr, regs[14], 8);
+ hexvalue (ctx->v20.reg.ARM_pc, regs[15], 8);
hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8);
hexvalue (ctx->v20.trap_no, regs[17], 8);
hexvalue (ctx->v20.error_code, regs[18], 8);
@@ -95,12 +95,12 @@ register_dump (int fd, union k_sigcontext *ctx)
hexvalue (ctx->v21.arm_r7, regs[7], 8);
hexvalue (ctx->v21.arm_r8, regs[8], 8);
hexvalue (ctx->v21.arm_r9, regs[9], 8);
- hexvalue (ctx->v21.arm_r10, regs[10], 4);
- hexvalue (ctx->v21.arm_fp, regs[11], 4);
- hexvalue (ctx->v21.arm_ip, regs[12], 4);
- hexvalue (ctx->v21.arm_sp, regs[13], 4);
- hexvalue (ctx->v21.arm_lr, regs[14], 4);
- hexvalue (ctx->v21.arm_pc, regs[15], 4);
+ hexvalue (ctx->v21.arm_r10, regs[10], 8);
+ hexvalue (ctx->v21.arm_fp, regs[11], 8);
+ hexvalue (ctx->v21.arm_ip, regs[12], 8);
+ hexvalue (ctx->v21.arm_sp, regs[13], 8);
+ hexvalue (ctx->v21.arm_lr, regs[14], 8);
+ hexvalue (ctx->v21.arm_pc, regs[15], 8);
hexvalue (ctx->v21.arm_cpsr, regs[16], 8);
hexvalue (ctx->v21.trap_no, regs[17], 8);
hexvalue (ctx->v21.error_code, regs[18], 8);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=942aea54d81af3608bcf0e17fb7418d1703907e6
commit 942aea54d81af3608bcf0e17fb7418d1703907e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 09:31:47 1999 +0000
Linux/ARM implementation of pwrite.
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite.c b/sysdeps/unix/sysv/linux/arm/pwrite.c
new file mode 100644
index 0000000..b9b5e35
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pwrite.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/pwrite.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db0fc322328fd1512460bd27bb299799597ec114
commit db0fc322328fd1512460bd27bb299799597ec114
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 09:31:41 1999 +0000
Linux/ARM implementation of pwrite64.
diff --git a/sysdeps/unix/sysv/linux/arm/pwrite64.c b/sysdeps/unix/sysv/linux/arm/pwrite64.c
new file mode 100644
index 0000000..4993830
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pwrite64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/pwrite64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7335f19735d3a4ce6d6d1bff9505da22180b7f7
commit d7335f19735d3a4ce6d6d1bff9505da22180b7f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 09:31:32 1999 +0000
Linux/ARM implementation of pread64.
diff --git a/sysdeps/unix/sysv/linux/arm/pread64.c b/sysdeps/unix/sysv/linux/arm/pread64.c
new file mode 100644
index 0000000..c567fc5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pread64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/pread64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26466099db2c1260f2cc54facf9e6f4279c8e61f
commit 26466099db2c1260f2cc54facf9e6f4279c8e61f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 4 09:31:27 1999 +0000
Linux/ARM implementation of pread.
diff --git a/sysdeps/unix/sysv/linux/arm/pread.c b/sysdeps/unix/sysv/linux/arm/pread.c
new file mode 100644
index 0000000..06bc601
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/pread.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/pread.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d1d5abfa2720b3638b271be89ac813c5ce05e55
commit 6d1d5abfa2720b3638b271be89ac813c5ce05e55
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jan 4 01:36:55 1999 +0000
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Reorder expression
to avoid accessing global data in the usual case.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 067c2fb..f2fe553 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -272,7 +272,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
found. */
break;
if (sym->st_size > refsym->st_size
- || (_dl_verbose && sym->st_size < refsym->st_size))
+ || (sym->st_size < refsym->st_size && _dl_verbose))
{
extern char **_dl_argv;
const char *strtab;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61758030ed22232553cd26393e88b8607979929b
commit 61758030ed22232553cd26393e88b8607979929b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:16:52 1998 +0000
Sync with current Linux 2.1.132 kernel sources.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 435f8e0..855fe28 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -28,8 +28,20 @@ struct sigaction
unsigned int sa_flags;
/* Signal handler. */
+#ifdef __USE_POSIX199309
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) __PMT ((int, siginfo_t *, void *));
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
__sighandler_t sa_handler;
-
+#endif
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
@@ -43,14 +55,17 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
-#ifdef __USE_MISC
+#define SA_NOCLDSTOP 0x00020000 /* Don't send SIGCHLD when children stop. */
+#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */
-# define SA_INTERRUPT 0x00000000 /* Historical no-op. */
# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when
its handler is being executed. */
-# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x01000000 /* Historical no-op. */
/* Some aliases for the SA_ constants. */
# define SA_NOMASK SA_NODEFER
@@ -63,5 +78,7 @@ struct sigaction
#define SIG_BLOCK 1 /* Block signals. */
#define SIG_UNBLOCK 2 /* Unblock signals. */
#define SIG_SETMASK 3 /* Set the set of blocked signals. */
-#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+#ifdef __USE_MISC
+# define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
set only the low 32 bit of the sigset. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87d6672e7ef4e7e695abe75d815ddb0d796ded84
commit 87d6672e7ef4e7e695abe75d815ddb0d796ded84
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:16:43 1998 +0000
Linux/MIPS specific misc low-level definitions.
diff --git a/sysdeps/unix/sysv/linux/mips/sysdep.S b/sysdeps/unix/sysv/linux/mips/sysdep.S
new file mode 100644
index 0000000..c7bc193
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sysdep.S
@@ -0,0 +1,36 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* Because the Linux version is in fact MIPS/ELF and the start.? file
+ for this system (sysdeps/mips/elf/start.S) is also used by The Hurd
+ and therefore this files must not contain the definition of the
+ `errno' variable (I don't know why, ask Roland), we have to define
+ it somewhere else.
+
+ ...and this place is here. */
+ .bss
+ .globl errno
+ .type errno,@object
+ .size errno,4
+errno: .word 4
+ .text
+weak_alias(errno, _errno)
+
+#include <sysdeps/unix/mips/sysdep.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66f73ab566ba49d81d5d70372fbf4e959e80ae45
commit 66f73ab566ba49d81d5d70372fbf4e959e80ae45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:16:11 1998 +0000
Add ipc, change pread/pwrite and llseek calls.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index dd29d15..434be84 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -37,7 +37,7 @@ socketpair - socketpair 4 __socketpair socketpair
#
# There are defined locally because the caller is also defined in this dir.
#
-s_llseek llseek _llseek 5 __sys_llseek
+s_llseek llseek _llseek 5 __syscall_llseek
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
@@ -57,10 +57,11 @@ s_getdents getdents getdents 3 __syscall_getdents
s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_ipc msgget ipc 5 __syscall_ipc
s_poll poll poll 3 __syscall_poll
-s_pread pread pread 6 __syscall_pread
+s_pread64 pread64 pread 6 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite pwrite pwrite 6 __syscall_pwrite
+s_pwrite64 pwrite64 pwrite 6 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=025cc5bfda4fa45bac7ae2674810e8f2d5e2e254
commit 025cc5bfda4fa45bac7ae2674810e8f2d5e2e254
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:15:46 1998 +0000
Moved into MIPS specific directory.
diff --git a/sysdeps/unix/sysv/linux/mips/fpregdef.h b/sysdeps/unix/sysv/linux/mips/fpregdef.h
deleted file mode 100644
index a963d5f..0000000
--- a/sysdeps/unix/sysv/linux/mips/fpregdef.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sys/fpregdef.h>
diff --git a/sysdeps/unix/sysv/linux/mips/regdef.h b/sysdeps/unix/sysv/linux/mips/regdef.h
deleted file mode 100644
index b613c8b..0000000
--- a/sysdeps/unix/sysv/linux/mips/regdef.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sys/regdef.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sgidefs.h b/sysdeps/unix/sysv/linux/mips/sgidefs.h
deleted file mode 100644
index a36ece0..0000000
--- a/sysdeps/unix/sysv/linux/mips/sgidefs.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SGIDEFS_H
-#define _SGIDEFS_H 1
-
-/*
- * The real definitions come from the Linux kernel sources
- */
-#include <asm/sgidefs.h>
-
-#endif /* sgidefs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/asm.h b/sysdeps/unix/sysv/linux/mips/sys/asm.h
deleted file mode 100644
index 346a9c4..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/asm.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_ASM_H
-#define _SYS_ASM_H
-
-/*
- * The real definitions come from the Linux kernel sources
- */
-#include <asm/asm.h>
-
-#endif /* sys/asm.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h
deleted file mode 100644
index 48d8f75..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_FPREGDEF_H
-#define _SYS_FPREGDEF_H
-
-/*
- * The real definitions come from the Linux kernel sources
- */
-#include <asm/fpregdef.h>
-
-#endif /* sys/fpregdef.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/regdef.h b/sysdeps/unix/sysv/linux/mips/sys/regdef.h
deleted file mode 100644
index 700fd66..0000000
--- a/sysdeps/unix/sysv/linux/mips/sys/regdef.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _REGDEF_H
-#define _REGDEF_H 1
-
-/*
- * The real definitions come from the Linux kernel sources
- */
-#include <asm/regdef.h>
-#include <asm/fpregdef.h>
-
-#endif /* regdef.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02656f74b2dba27a3eed33c216d1fbcb3bf1df04
commit 02656f74b2dba27a3eed33c216d1fbcb3bf1df04
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:15:20 1998 +0000
Remove deleted files.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index 5f0429b..576aef8 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -3,14 +3,8 @@ kernel_sigaction.h
kernel_stat.h
kernel_termios.h
entry.h
-regdef.h
-fpregdef.h
-sgidefs.h
xstatconv.c
sys/acct.h
-sys/asm.h
sys/cachectl.h
-sys/fpregdef.h
sys/procfs.h
-sys/regdef.h
sys/sysmips.h
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 5d3e280..41451ca 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -7,6 +7,5 @@ endif
ifeq ($(subdir),misc)
sysdep_routines += cachectl cacheflush sysmips
-headers += regdef.h fpregdef.h sys/asm.h sys/cachectl.h sys/fpregdef.h \
- sys/regdef.h sys/sysmips.h
+headers += sys/cachectl.h sys/sysmips.h
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=283cf8bf854a20ba784f57bd6913d92d3269a047
commit 283cf8bf854a20ba784f57bd6913d92d3269a047
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:14:25 1998 +0000
MIP floating point definition header.
diff --git a/sysdeps/mips/sys/fpregdef.h b/sysdeps/mips/sys/fpregdef.h
new file mode 100644
index 0000000..ef7309c
--- /dev/null
+++ b/sysdeps/mips/sys/fpregdef.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_FPREGDEF_H
+#define _SYS_FPREGDEF_H
+
+/*
+ * These definitions only cover the R3000-ish 16/32 register model.
+ * But we're trying to be R3000 friendly anyway ...
+ */
+#define fv0 $f0 /* return value */
+#define fv0f $f1
+#define fv1 $f2
+#define fv1f $f3
+#define fa0 $f12 /* argument registers */
+#define fa0f $f13
+#define fa1 $f14
+#define fa1f $f15
+#define ft0 $f4 /* caller saved */
+#define ft0f $f5
+#define ft1 $f6
+#define ft1f $f7
+#define ft2 $f8
+#define ft2f $f9
+#define ft3 $f10
+#define ft3f $f11
+#define ft4 $f16
+#define ft4f $f17
+#define ft5 $f18
+#define ft5f $f19
+#define fs0 $f20 /* callee saved */
+#define fs0f $f21
+#define fs1 $f22
+#define fs1f $f23
+#define fs2 $f24
+#define fs2f $f25
+#define fs3 $f26
+#define fs3f $f27
+#define fs4 $f28
+#define fs4f $f29
+#define fs5 $f30
+#define fs5f $f31
+
+#define fcr31 $31 /* FPU status register */
+
+#endif /* sys/fpregdef.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74de4bb5bcdee4ed00682cbd8d3ae8bbc7dbe14f
commit 74de4bb5bcdee4ed00682cbd8d3ae8bbc7dbe14f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:13:59 1998 +0000
MIPS assembler helper definitions.
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
new file mode 100644
index 0000000..b90a331
--- /dev/null
+++ b/sysdeps/mips/sys/asm.h
@@ -0,0 +1,377 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_ASM_H
+#define _SYS_ASM_H
+
+#include <sgidefs.h>
+
+#ifndef CAT
+#ifdef __STDC__
+#define __CAT(str1,str2) str1##str2
+#else
+#define __CAT(str1,str2) str1/**/str2
+#endif
+#define CAT(str1,str2) __CAT(str1,str2)
+#endif
+
+/*
+ * Macros to handle different pointer/register sizes for 32/64-bit code
+ *
+ * 64 bit address space isn't used yet, so we may use the R3000 32 bit
+ * defines for now.
+ */
+#define PTR .word
+#define PTRSIZE 4
+#define PTRLOG 2
+
+/*
+ * PIC specific declarations
+ */
+#ifdef __PIC__
+#define CPRESTORE(register) \
+ .cprestore register
+#define CPADD(register) \
+ .cpadd register
+#define CPLOAD(register) \
+ .cpload register
+#else
+#define CPRESTORE(register)
+#define CPADD(register)
+#define CPLOAD(register)
+#endif
+
+/*
+ * LEAF - declare leaf routine
+ */
+#define LEAF(symbol) \
+ .globl symbol; \
+ .align 2; \
+ .type symbol,@function; \
+ .ent symbol,0; \
+symbol: .frame sp,0,ra
+
+/*
+ * NESTED - declare nested routine entry point
+ */
+#define NESTED(symbol, framesize, rpc) \
+ .globl symbol; \
+ .align 2; \
+ .type symbol,@function; \
+ .ent symbol,0; \
+symbol: .frame sp, framesize, rpc
+
+/*
+ * END - mark end of function
+ */
+#define END(function) \
+ .end function; \
+ .size function,.-function
+
+/*
+ * EXPORT - export definition of symbol
+ */
+#define EXPORT(symbol) \
+ .globl symbol; \
+symbol:
+
+/*
+ * ABS - export absolute symbol
+ */
+#define ABS(symbol,value) \
+ .globl symbol; \
+symbol = value
+
+#define PANIC(msg) \
+ .set push; \
+ .set reorder; \
+ la a0,8f; \
+ jal panic; \
+9: b 9b; \
+ .set pop; \
+ TEXT(msg)
+
+/*
+ * Print formated string
+ */
+#define PRINT(string) \
+ .set push; \
+ .set reorder; \
+ la a0,8f; \
+ jal printk; \
+ .set pop; \
+ TEXT(string)
+
+#define TEXT(msg) \
+ .data; \
+8: .asciiz msg; \
+ .previous;
+
+/*
+ * Build text tables
+ */
+#define TTABLE(string) \
+ .text; \
+ .word 1f; \
+ .previous; \
+ .data; \
+1: .asciz string; \
+ .previous
+
+/*
+ * MIPS IV pref instruction.
+ * Use with .set noreorder only!
+ *
+ * MIPS IV implementations are free to treat this as a nop. The R5000
+ * is one of them. So we should have an option not to use this instruction.
+ */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#define PREF(hint,addr) \
+ pref hint,addr
+#define PREFX(hint,addr) \
+ prefx hint,addr
+#else
+#define PREF
+#define PREFX
+#endif
+
+/*
+ * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs.
+ */
+#if _MIPS_ISA == _MIPS_ISA_MIPS1
+#define MOVN(rd,rs,rt) \
+ .set push; \
+ .set reorder; \
+ beqz rt,9f; \
+ move rd,rs; \
+ .set pop; \
+9:
+#define MOVZ(rd,rs,rt) \
+ .set push; \
+ .set reorder; \
+ bnez rt,9f; \
+ move rd,rt; \
+ .set pop; \
+9:
+#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3)
+#define MOVN(rd,rs,rt) \
+ .set push; \
+ .set noreorder; \
+ bnezl rt,9f; \
+ move rd,rs; \
+ .set pop; \
+9:
+#define MOVZ(rd,rs,rt) \
+ .set push; \
+ .set noreorder; \
+ beqzl rt,9f; \
+ movz rd,rs; \
+ .set pop; \
+9:
+#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#define MOVN(rd,rs,rt) \
+ movn rd,rs,rt
+#define MOVZ(rd,rs,rt) \
+ movz rd,rs,rt
+#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */
+
+/*
+ * Stack alignment
+ */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#define ALSZ 7
+#define ALMASK ~7
+#endif
+#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#define ALSZ 15
+#define ALMASK ~15
+#endif
+
+/*
+ * Size of a register
+ */
+#ifdef __mips64
+#define SZREG 8
+#else
+#define SZREG 4
+#endif
+
+/*
+ * Use the following macros in assemblercode to load/store registers,
+ * pointers etc.
+ */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#define REG_S sw
+#define REG_L lw
+#define PTR_SUBU subu
+#define PTR_ADDU addu
+#endif
+#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#define REG_S sd
+#define REG_L ld
+/* We still live in a 32 bit address space ... */
+#define PTR_SUBU subu
+#define PTR_ADDU addu
+#endif
+
+/*
+ * How to add/sub/load/store/shift C int variables.
+ */
+#if (_MIPS_SZINT == 32)
+#define INT_ADD add
+#define INT_ADDI addi
+#define INT_ADDU addu
+#define INT_ADDIU addiu
+#define INT_SUB add
+#define INT_SUBI subi
+#define INT_SUBU subu
+#define INT_SUBIU subu
+#define INT_L lw
+#define INT_S sw
+#define LONG_SLL sll
+#define LONG_SLLV sllv
+#define LONG_SRL srl
+#define LONG_SRLV srlv
+#define LONG_SRA sra
+#define LONG_SRAV srav
+#endif
+
+#if (_MIPS_SZINT == 64)
+#define INT_ADD dadd
+#define INT_ADDI daddi
+#define INT_ADDU daddu
+#define INT_ADDIU daddiu
+#define INT_SUB dadd
+#define INT_SUBI dsubi
+#define INT_SUBU dsubu
+#define INT_SUBIU dsubu
+#define INT_L ld
+#define INT_S sd
+#define LONG_SLL dsll
+#define LONG_SLLV dsllv
+#define LONG_SRL dsrl
+#define LONG_SRLV dsrlv
+#define LONG_SRA dsra
+#define LONG_SRAV dsrav
+#endif
+
+/*
+ * How to add/sub/load/store/shift C long variables.
+ */
+#if (_MIPS_SZLONG == 32)
+#define LONG_ADD add
+#define LONG_ADDI addi
+#define LONG_ADDU addu
+#define LONG_ADDIU addiu
+#define LONG_SUB add
+#define LONG_SUBI subi
+#define LONG_SUBU subu
+#define LONG_SUBIU subu
+#define LONG_L lw
+#define LONG_S sw
+#define LONG_SLL sll
+#define LONG_SLLV sllv
+#define LONG_SRL srl
+#define LONG_SRLV srlv
+#define LONG_SRA sra
+#define LONG_SRAV srav
+#endif
+
+#if (_MIPS_SZLONG == 64)
+#define LONG_ADD dadd
+#define LONG_ADDI daddi
+#define LONG_ADDU daddu
+#define LONG_ADDIU daddiu
+#define LONG_SUB dadd
+#define LONG_SUBI dsubi
+#define LONG_SUBU dsubu
+#define LONG_SUBIU dsubu
+#define LONG_L ld
+#define LONG_S sd
+#define LONG_SLL dsll
+#define LONG_SLLV dsllv
+#define LONG_SRL dsrl
+#define LONG_SRLV dsrlv
+#define LONG_SRA dsra
+#define LONG_SRAV dsrav
+#endif
+
+/*
+ * How to add/sub/load/store/shift pointers.
+ */
+#if (_MIPS_SZLONG == 32)
+#define PTR_ADD add
+#define PTR_ADDI addi
+#define PTR_ADDU addu
+#define PTR_ADDIU addiu
+#define PTR_SUB add
+#define PTR_SUBI subi
+#define PTR_SUBU subu
+#define PTR_SUBIU subu
+#define PTR_L lw
+#define PTR_S sw
+#define PTR_SLL sll
+#define PTR_SLLV sllv
+#define PTR_SRL srl
+#define PTR_SRLV srlv
+#define PTR_SRA sra
+#define PTR_SRAV srav
+
+#define PTR_SCALESHIFT 2
+#endif
+
+#if (_MIPS_SZLONG == 64)
+#define PTR_ADD dadd
+#define PTR_ADDI daddi
+#define PTR_ADDU daddu
+#define PTR_ADDIU daddiu
+#define PTR_SUB dadd
+#define PTR_SUBI dsubi
+#define PTR_SUBU dsubu
+#define PTR_SUBIU dsubu
+#define PTR_L ld
+#define PTR_S sd
+#define PTR_SLL dsll
+#define PTR_SLLV dsllv
+#define PTR_SRL dsrl
+#define PTR_SRLV dsrlv
+#define PTR_SRA dsra
+#define PTR_SRAV dsrav
+
+#define PTR_SCALESHIFT 3
+#endif
+
+/*
+ * Some cp0 registers were extended to 64bit for MIPS III.
+ */
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#define MFC0 mfc0
+#define MTC0 mtc0
+#endif
+#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS5)
+#define MFC0 dmfc0
+#define MTC0 dmtc0
+#endif
+
+#endif /* sys/asm.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=579075e899b36c20d914f1eb38c4654dc478f5bf
commit 579075e899b36c20d914f1eb38c4654dc478f5bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:13:42 1998 +0000
SGI's MIPS definitions.
diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h
new file mode 100644
index 0000000..56567e8
--- /dev/null
+++ b/sysdeps/mips/sgidefs.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SGIDEFS_H
+#define _SGIDEFS_H 1
+
+/*
+ * Definitions for the ISA level
+ */
+#define _MIPS_ISA_MIPS1 1
+#define _MIPS_ISA_MIPS2 2
+#define _MIPS_ISA_MIPS3 3
+#define _MIPS_ISA_MIPS4 4
+#define _MIPS_ISA_MIPS5 5
+
+/*
+ * Subprogram calling convention
+ *
+ * At the moment only _MIPS_SIM_ABI32 is in use. This will change rsn.
+ * Until GCC 2.8.0 is released don't rely on this definitions because the
+ * 64bit code is essentially using the 32bit interface model just with
+ * 64bit registers.
+ */
+#define _MIPS_SIM_ABI32 1
+#define _MIPS_SIM_NABI32 2
+#define _MIPS_SIM_ABI64 3
+
+#endif /* sgidefs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2fdff253e83f64300c05db96a0465e176548183
commit f2fdff253e83f64300c05db96a0465e176548183
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:13:29 1998 +0000
MIPS register definitions.
diff --git a/sysdeps/mips/regdef.h b/sysdeps/mips/regdef.h
new file mode 100644
index 0000000..0fa50f0
--- /dev/null
+++ b/sysdeps/mips/regdef.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _REGDEF_H
+#define _REGDEF_H
+
+#include <sys/regdef.h>
+#include <sys/fpregdef.h>
+
+#endif /* _REGDEF_H */
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1599a5f3d2b1fe766d6d2fa69fcac5f4efb2db34
commit 1599a5f3d2b1fe766d6d2fa69fcac5f4efb2db34
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:13:10 1998 +0000
MIPS floating point control information.
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index e271ae1..471c68e 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Mips version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe and Ralf Baechle.
@@ -80,7 +80,7 @@
/* The fdlibm code requires strict IEEE double precision arithmetic,
and no interrupts for exceptions, rounding to nearest. */
-#define _FPU_DEFAULT 0x00000600
+#define _FPU_DEFAULT 0x00000000
/* IEEE: same as above, but exceptions */
#define _FPU_IEEE 0x00000F80
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18aa0178afabf7b06379ad2416e4348800d6c4e3
commit 18aa0178afabf7b06379ad2416e4348800d6c4e3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:12:57 1998 +0000
MIPS floating point register definitions.
diff --git a/sysdeps/mips/fpregdef.h b/sysdeps/mips/fpregdef.h
new file mode 100644
index 0000000..25b93ca
--- /dev/null
+++ b/sysdeps/mips/fpregdef.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FPREGDEF_H
+#define _FPREGDEF_H
+
+#include <sys/fpregdef.h>
+
+#endif /* _FPREGDEF_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df8c87f808e265180cd49ff8d190633d8ef09b42
commit df8c87f808e265180cd49ff8d190633d8ef09b42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:12:40 1998 +0000
Add new headers.
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 5585c61..54b3520 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -1,3 +1,7 @@
+ifeq ($(subdir),misc)
+headers += regdef.h fpregdef.h sys/regdef.h sys/fpregdef.h sys/asm.h sgidefs.h
+endif
+
ifeq ($(subdir),setjmp)
sysdep_routines += setjmp_aux
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb78494f44ba50f35d7192c68ac6e4ad9ff55af5
commit eb78494f44ba50f35d7192c68ac6e4ad9ff55af5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 31 18:12:32 1998 +0000
Add new files.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index 9b6fd71..7ccfb1b 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -1,3 +1,9 @@
setjmp_aux.c
rtld-ldscript.in
rtld-parms
+regdef.h
+sgidefs.h
+fpregdef.h
+sys/regdef.h
+sys/fpregdef.h
+sys/asm.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4479f563344b0856ba6e4e08a98fd926eda8008a
commit 4479f563344b0856ba6e4e08a98fd926eda8008a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 27 17:28:24 1998 +0000
Add ioperm.c and sys/io.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 18aa31f..479a4ab 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,7 +1,9 @@
clone.S
init-first.h
+ioperm.c
setresuid.c
setresgid.c
setfsuid.c
setfsgid.c
bits/armsigctx.h
+sys/io.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97775ba3cefea9a437bc6b3a98cbd06537ff90c5
commit 97775ba3cefea9a437bc6b3a98cbd06537ff90c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 24 16:17:59 1998 +0000
(sysdep_routines): Add ioperm.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index cebaa94..d76698b 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,5 +1,5 @@
ifeq ($(subdir),misc)
-sysdep_routines += setfsgid setfsuid setresgid setresuid
+sysdep_routines += setfsgid setfsuid setresgid setresuid ioperm
endif
ifeq ($(subdir),signal)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2eb5e136a75f27e5f59bce577f4ae07b9e3ebdb
commit d2eb5e136a75f27e5f59bce577f4ae07b9e3ebdb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 22 17:27:58 1998 +0000
Add appropriate entries for the above.
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
new file mode 100644
index 0000000..3a412cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -0,0 +1,7 @@
+libc {
+ GLIBC_2.1 {
+ ioperm; iopl;
+ inb; inw; inl;
+ outb; outw; outl;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78c3f7b379909215ae5180609b4a494493f65084
commit 78c3f7b379909215ae5180609b4a494493f65084
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 22 17:27:23 1998 +0000
Header for implementation of inb, outb etc for ARM systems.
diff --git a/sysdeps/unix/sysv/linux/arm/sys/io.h b/sysdeps/unix/sysv/linux/arm/sys/io.h
new file mode 100644
index 0000000..9f9eebc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sys/io.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IO_H
+
+#define _SYS_IO_H 1
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* If TURN_ON is TRUE, request for permission to do direct i/o on the
+ port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
+ permission off for that range. This call requires root privileges. */
+extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
+ int __turn_on));
+
+/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
+ permission to access any I/O port is granted. This call requires
+ root privileges. */
+extern int iopl __P ((int __level));
+
+/* The functions that actually perform reads and writes. */
+extern unsigned char inb (unsigned long port);
+extern unsigned short inw (unsigned long port);
+extern unsigned long inl (unsigned long port);
+
+extern void outb (unsigned char value, unsigned long port);
+extern void outw (unsigned short value, unsigned long port);
+extern void outl (unsigned long value, unsigned long port);
+
+__END_DECLS
+
+#endif /* _SYS_IO_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d72808b73faa87378f84c26186f3de8bb198a81
commit 3d72808b73faa87378f84c26186f3de8bb198a81
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 22 17:26:00 1998 +0000
Implementation of inb, outb etc for ARM systems.
diff --git a/sysdeps/unix/sysv/linux/arm/ioperm.c b/sysdeps/unix/sysv/linux/arm/ioperm.c
new file mode 100644
index 0000000..551fc97
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/ioperm.c
@@ -0,0 +1,271 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Phil Blundell, based on the Alpha version by
+ David Mosberger.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* I/O port access on the ARM is something of a fiction. What we do is to
+ map an appropriate area of /dev/mem into user space so that a program
+ can blast away at the hardware in such a way as to generate I/O cycles
+ on the bus. To insulate user code from dependencies on particular
+ hardware we don't allow calls to inb() and friends to be inlined, but
+ force them to come through code in here every time. Performance-critical
+ registers tend to be memory mapped these days so this should be no big
+ problem. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/mman.h>
+
+#include <asm/page.h>
+
+#define PATH_ARM_SYSTYPE "/etc/arm_systype"
+#define PATH_CPUINFO "/proc/cpuinfo"
+
+#define MAX_PORT 0x10000
+
+static struct {
+ unsigned long int base;
+ unsigned long int io_base;
+ unsigned int shift;
+ unsigned int initdone; /* since all the above could be 0 */
+} io;
+
+#define IO_BASE_FOOTBRIDGE 0x7c000000
+#define IO_SHIFT_FOOTBRIDGE 0
+
+static struct platform {
+ const char *name;
+ unsigned long int io_base;
+ unsigned int shift;
+} platform[] = {
+ /* All currently supported platforms are in fact the same. :-) */
+ {"Chalice-CATS", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
+ {"DEC-EBSA285", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
+ {"Corel-NetWinder", IO_BASE_FOOTBRIDGE, IO_SHIFT_FOOTBRIDGE},
+};
+
+#define IO_ADDR(port) (io.base + ((port) << io.shift))
+
+/*
+ * Initialize I/O system. To determine what I/O system we're dealing
+ * with, we first try to read the value of symlink PATH_ARM_SYSTYPE,
+ * if that fails, we lookup the "system type" field in /proc/cpuinfo.
+ * If that fails as well, we give up. Other possible options might be
+ * to look at the ELF auxiliary vector or to add a special system call
+ * but there is probably no point.
+ *
+ * If the value received from PATH_ARM_SYSTYPE begins with a number,
+ * assume this is a previously unsupported system and the values encode,
+ * in order, "<io_base>,<port_shift>".
+ */
+
+static int
+init_iosys (void)
+{
+ char systype[256];
+ int i, n;
+
+ n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
+ if (n > 0)
+ {
+ systype[n] = '\0';
+ if (isdigit (systype[0]))
+ {
+ if (sscanf (systype, "%li,%i", &io.io_base, &io.shift) == 2)
+ {
+ io.initdone = 1;
+ return 0;
+ }
+ /* else we're likely going to fail with the system match below */
+ }
+ }
+ else
+ {
+ FILE * fp;
+
+ fp = fopen (PATH_CPUINFO, "r");
+ if (!fp)
+ return -1;
+ while ((n = fscanf (fp, "Hardware\t: %256[^\n]\n", systype))
+ != EOF)
+ {
+ if (n == 1)
+ break;
+ else
+ fgets (systype, 256, fp);
+ }
+ fclose (fp);
+
+ if (n == EOF)
+ {
+ /* this can happen if the format of /proc/cpuinfo changes... */
+ fprintf (stderr,
+ "ioperm: Unable to determine system type.\n"
+ "\t(May need " PATH_ARM_SYSTYPE " symlink?)\n");
+ __set_errno (ENODEV);
+ return -1;
+ }
+ }
+
+ /* translate systype name into i/o system: */
+ for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i)
+ {
+ if (strcmp (platform[i].name, systype) == 0)
+ {
+ io.shift = platform[i].shift;
+ io.io_base = platform[i].io_base;
+ io.initdone = 1;
+ return 0;
+ }
+ }
+
+ /* systype is not a known platform name... */
+ __set_errno (EINVAL);
+ return -1;
+}
+
+int
+_ioperm (unsigned long int from, unsigned long int num, int turn_on)
+{
+ unsigned long int addr, len;
+ int prot;
+
+ if (!io.initdone && init_iosys () < 0)
+ return -1;
+
+ /* this test isn't as silly as it may look like; consider overflows! */
+ if (from >= MAX_PORT || from + num > MAX_PORT)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ if (turn_on)
+ {
+ if (! io.base)
+ {
+ int fd;
+
+ fd = open ("/dev/mem", O_RDWR);
+ if (fd < 0)
+ return -1;
+
+ io.base =
+ (unsigned long int) __mmap (0, MAX_PORT << io.shift, PROT_NONE,
+ MAP_SHARED, fd, io.io_base);
+ close (fd);
+ if ((long) io.base == -1)
+ return -1;
+ }
+ prot = PROT_READ | PROT_WRITE;
+ }
+ else
+ {
+ if (!io.base)
+ return 0; /* never was turned on... */
+
+ /* turnoff access to relevant pages: */
+ prot = PROT_NONE;
+ }
+ addr = (io.base + (from << io.shift)) & PAGE_MASK;
+ len = num << io.shift;
+ return mprotect ((void *) addr, len, prot);
+}
+
+
+int
+_iopl (unsigned int level)
+{
+ if (level > 3)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+ if (level)
+ {
+ return _ioperm (0, MAX_PORT, 1);
+ }
+ return 0;
+}
+
+
+void
+_outb (unsigned char b, unsigned long int port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ *((volatile unsigned char *)(IO_ADDR (port))) = b;
+}
+
+
+void
+_outw (unsigned short b, unsigned long int port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ *((volatile unsigned short *)(IO_ADDR (port))) = b;
+}
+
+
+void
+_outl (unsigned int b, unsigned long int port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ *((volatile unsigned long *)(IO_ADDR (port))) = b;
+}
+
+
+unsigned int
+_inb (unsigned long int port)
+{
+ return *((volatile unsigned char *)(IO_ADDR (port)));
+}
+
+
+unsigned int
+_inw (unsigned long int port)
+{
+ return *((volatile unsigned short *)(IO_ADDR (port)));
+}
+
+
+unsigned int
+_inl (unsigned long int port)
+{
+ return *((volatile unsigned long *)(IO_ADDR (port)));
+}
+
+weak_alias (_ioperm, ioperm);
+weak_alias (_iopl, iopl);
+weak_alias (_inb, inb);
+weak_alias (_inw, inw);
+weak_alias (_inl, inl);
+weak_alias (_outb, outb);
+weak_alias (_outw, outw);
+weak_alias (_outl, outl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc37023323926d9c68fcf8381553475e6a56b3b3
commit fc37023323926d9c68fcf8381553475e6a56b3b3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 22 17:25:27 1998 +0000
Remove wrappers for now-inlined calls.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 6f332ce..08839db 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -13,33 +13,3 @@ s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 5 syscall
vm86 - vm86 1 __vm86 vm86
-
-# System calls with wrappers.
-rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
-rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_getcwd getcwd getcwd 2 __syscall_getcwd
-s_getdents getdents getdents 3 __syscall_getdents
-s_getpriority getpriority getpriority 2 __syscall_getpriority
-s_getresgid getresgid getresgid 3 __syscall_getresgid
-s_getresuid getresuid getresuid 3 __syscall_getresuid
-s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread
-s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
-s_reboot reboot reboot 3 __syscall_reboot
-s_sigaction sigaction sigaction 3 __syscall_sigaction
-s_sigpending sigpending sigpending 1 __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
-s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ustat ustat ustat 2 __syscall_ustat
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_mknod xmknod mknod 3 __syscall_mknod
-sys_readv readv readv 3 __syscall_readv
-sys_stat xstat stat 2 __syscall_stat
-sys_writev writev writev 3 __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba023f01b9ec4662c643ac4b81c47c8cda6da896
commit ba023f01b9ec4662c643ac4b81c47c8cda6da896
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 22 17:25:07 1998 +0000
(INLINE_SYSCALL): Add implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 5972aba..d7e2822 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -104,6 +104,52 @@
#define UNDOARGS_4 /* nothing */
#define UNDOARGS_5 ldr r4, [sp];
+#else /* not __ASSEMBLER__ */
+
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ unsigned int _sys_result; \
+ { \
+ register int _a1 asm ("a1"); \
+ LOAD_ARGS_##nr (args) \
+ asm volatile ("swi %1" \
+ : "=r" (_a1) \
+ : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "a1"); \
+ _sys_result = _a1; \
+ } \
+ if (_sys_result >= (unsigned int) -4095) \
+ { \
+ __set_errno (-_sys_result); \
+ _sys_result = (unsigned int) -1; \
+ } \
+ (int) _sys_result; })
+
+#define LOAD_ARGS_0()
+#define ASM_ARGS_0
+#define LOAD_ARGS_1(a1) \
+ _a1 = (int) (a1); \
+ LOAD_ARGS_0 ()
+#define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1)
+#define LOAD_ARGS_2(a1, a2) \
+ register int _a2 asm ("a2") = (int) (a2); \
+ LOAD_ARGS_1 (a1)
+#define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2)
+#define LOAD_ARGS_3(a1, a2, a3) \
+ register int _a3 asm ("a3") = (int) (a3); \
+ LOAD_ARGS_2 (a1, a2)
+#define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3)
+#define LOAD_ARGS_4(a1, a2, a3, a4) \
+ register int _a4 asm ("a4") = (int) (a4); \
+ LOAD_ARGS_3 (a1, a2, a3)
+#define ASM_ARGS_4 ASM_ARGS_3, "r" (_a4)
+#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
+ register int _v1 asm ("v1") = (int) (a5); \
+ LOAD_ARGS_4 (a1, a2, a3, a4)
+#define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1)
+
#endif /* __ASSEMBLER__ */
#endif /* linux/arm/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc46f1f605bfa002d59720f293aed0a7867974d1
commit bc46f1f605bfa002d59720f293aed0a7867974d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 18 16:01:28 1998 +0000
Include features.h and stddef.h.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index aeba05b..8c4a13a 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -23,6 +23,10 @@
#ifndef _BITS_TYPES_H
#define _BITS_TYPES_H 1
+#include <features.h>
+
+#define __need_size_t
+#include <stddef.h>
/* Convenience types. */
typedef unsigned char __u_char;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17cb2406ceb47cf05f31d28381634389945e523c
commit 17cb2406ceb47cf05f31d28381634389945e523c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 18 16:00:09 1998 +0000
(struct sigaltstack): Move ss_size field at the end.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
index 6c6ccae..905e87f 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
@@ -50,6 +50,6 @@ enum
typedef struct sigaltstack
{
__ptr_t ss_sp;
- size_t ss_size;
int ss_flags;
+ size_t ss_size;
} stack_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f210901a5a2af98bbdc334af12f0003816bede77
commit f210901a5a2af98bbdc334af12f0003816bede77
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 13 12:12:49 1998 +0000
Avoid -Wparentheses warning.
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index 7e373be..5764a6e 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -29,7 +29,7 @@ fesetexceptflag (const fexcept_t *flagp, int excepts)
tmp = __ieee_get_fp_control();
/* Set all the bits that were called for. */
- tmp = tmp & ~FE_ALL_EXCEPT | *flagp & excepts & FE_ALL_EXCEPT;
+ tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT);
/* And store it back. */
__ieee_set_fp_control(tmp);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04fd64c32eca51e859a4d72b160ee65205c5087c
commit 04fd64c32eca51e859a4d72b160ee65205c5087c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 11 15:27:22 1998 +0000
(elf_machine_rel): Fixl_addr parameter type.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 5f6e127..77b8c4e 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -23,7 +23,7 @@
#define ELF_MACHINE_NAME "MIPS"
-#define ELF_MACHINE_NO_PLT
+#define ELF_MACHINE_NO_PLT
#include <assert.h>
#include <entry.h>
@@ -577,7 +577,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
static inline void
-elf_machine_lazy_rel (Elf32_addr l_addr, const ElfW(Rel) *reloc)
+elf_machine_lazy_rel (ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
/* Do nothing. */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4c180f706893bccbfe057d51e4bd98e8f02c131
commit e4c180f706893bccbfe057d51e4bd98e8f02c131
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 10 09:59:12 1998 +0000
Use sys/user.h not asm/user.h.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
index d740954..c97836f 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -28,7 +28,7 @@
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <asm/user.h>
+#include <sys/user.h>
#include <asm/elf.h>
__BEGIN_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b428ebeef703a895b8696f8b2b2b21d30fac82fc
commit b428ebeef703a895b8696f8b2b2b21d30fac82fc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 7 12:07:42 1998 +0000
Save a4 through both paths.
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 704e71d..1876e2f 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -50,6 +50,11 @@ LEAF(SELECT, 64)
.prologue 1
ldl t0, __libc_missing_axp_tv64
+
+ /* Save timeout early, since we'll need to recover this after
+ the system call. */
+ stq a4, 48(sp)
+
bne t0, $do32
/* Save arguments in case we do need to fall back. */
@@ -57,7 +62,6 @@ LEAF(SELECT, 64)
stq a1, 16(sp)
stq a2, 24(sp)
stq a3, 32(sp)
- stq a4, 48(sp)
ldi v0, SYS_ify(select)
callsys
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0e2368bfef699e921efcc03fd0faed7d49becd1
commit c0e2368bfef699e921efcc03fd0faed7d49becd1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 4 20:57:00 1998 +0000
(dl_start_user): Incorrect address for _dl_main_searchlist passed to
_dl_init_next.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 53aa806..b8a1e19 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -284,6 +284,7 @@ _dl_start_user:
@ now we enter a _dl_init_next loop
ldr r4, .L_MAIN_SEARCHLIST
ldr r4, [sl, r4]
+ ldr r4, [r4]
@ call _dl_init_next to get the address of an initalizer
0: mov r0, r4
bl _dl_init_next(PLT)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7078dcb53d088eff05ef72cdc6e7060bb7f2ad35
commit 7078dcb53d088eff05ef72cdc6e7060bb7f2ad35
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 1 20:50:20 1998 +0000
Add xstatconv.c.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index f3ae821..5f0429b 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -6,6 +6,7 @@ entry.h
regdef.h
fpregdef.h
sgidefs.h
+xstatconv.c
sys/acct.h
sys/asm.h
sys/cachectl.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56a10f1cae6726edd6a92272e5fd124600e07974
commit 56a10f1cae6726edd6a92272e5fd124600e07974
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Dec 1 11:25:00 1998 +0000
Use correct type for parameter.
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index 9133c81..5e74c35 100644
--- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,5 +1,5 @@
/* Set FP exception mask and rounding mode.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ wrfpcr (unsigned long fpcr)
void
-__setfpucw (unsigned short fpu_control)
+__setfpucw (fpu_control_t fpu_control)
{
unsigned long fpcr = 0, fpcw = 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f4d2f79bf1b9d4b56e914a03066b77c89467f6f
commit 7f4d2f79bf1b9d4b56e914a03066b77c89467f6f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 30 14:21:20 1998 +0000
Remove ipc_kludge.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index ec116f6..7b644e8 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,13 +50,6 @@ struct ipc_perm
};
-/* Kludge to work around Linux' restriction of only up to five
- arguments to a system call. */
-struct ipc_kludge
- {
- void *msgp;
- long int msgtyp;
- };
__BEGIN_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b1d9381923db975441728ea838fa8f2e4ef5990
commit 1b1d9381923db975441728ea838fa8f2e4ef5990
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:05:36 1998 +0000
Linux/MIPS ucontext definition.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/ucontext.h b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
new file mode 100644
index 0000000..dd534ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
@@ -0,0 +1,77 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Don't rely on this, the interface is currently messed up and may need to
+ be broken to be fixed. */
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* We need the signal context definitions even if they are not used
+ included in <signal.h>. */
+#include <bits/sigcontext.h>
+
+
+/* Type for general register. */
+typedef unsigned long greg_t;
+
+/* Number of general registers. */
+#define NGREG 37
+#define NFPREG 33
+
+/* Container for all general registers. */
+typedef struct gregset {
+ greg_t g_regs[32];
+ greg_t g_hi;
+ greg_t g_lo;
+ greg_t g_pad[3];
+} gregset_t;
+
+/* Container for all FPU registers. */
+typedef struct fpregset {
+ union {
+ double fp_dregs[32];
+ struct {
+ float _fp_fregs;
+ unsigned int _fp_pad;
+ } fp_fregs[32];
+ } fp_r;
+ unsigned int fp_csr;
+ unsigned int fp_pad;
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=34535a90fa2071ebf1d487ff4003a0b264f2ae64
commit 34535a90fa2071ebf1d487ff4003a0b264f2ae64
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:05:22 1998 +0000
Add missing SYS_* constants, correct values according to Linux
2.1.130.
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
index 82f8427..36214e4 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/syscall.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1009,7 +1009,7 @@
#define SYS_time (SYS_Linux + 13)
#define SYS_mknod (SYS_Linux + 14)
#define SYS_chmod (SYS_Linux + 15)
-#define SYS_chown (SYS_Linux + 16)
+#define SYS_lchown (SYS_Linux + 16)
#define SYS_break (SYS_Linux + 17)
#define SYS_oldstat (SYS_Linux + 18)
#define SYS_lseek (SYS_Linux + 19)
@@ -1045,7 +1045,7 @@
#define SYS_geteuid (SYS_Linux + 49)
#define SYS_getegid (SYS_Linux + 50)
#define SYS_acct (SYS_Linux + 51)
-#define SYS_phys (SYS_Linux + 52)
+#define SYS_umount2 (SYS_Linux + 52)
#define SYS_lock (SYS_Linux + 53)
#define SYS_ioctl (SYS_Linux + 54)
#define SYS_fcntl (SYS_Linux + 55)
@@ -1183,5 +1183,25 @@
#define SYS_query_module (SYS_Linux + 187)
#define SYS_poll (SYS_Linux + 188)
#define SYS_nfsservctl (SYS_Linux + 189)
+#define SYS_setresgid (SYS_Linux + 190)
+#define SYS_getresgid (SYS_Linux + 191)
+#define SYS_prctl (SYS_Linux + 192)
+#define SYS_rt_sigreturn (SYS_Linux + 193)
+#define SYS_rt_sigaction (SYS_Linux + 194)
+#define SYS_rt_sigprocmask (SYS_Linux + 195)
+#define SYS_rt_sigpending (SYS_Linux + 196)
+#define SYS_rt_sigtimedwait (SYS_Linux + 197)
+#define SYS_rt_sigqueueinfo (SYS_Linux + 198)
+#define SYS_rt_sigsuspend (SYS_Linux + 199)
+#define SYS_pread (SYS_Linux + 200)
+#define SYS_pwrite (SYS_Linux + 201)
+#define SYS_chown (SYS_Linux + 202)
+#define SYS_getcwd (SYS_Linux + 203)
+#define SYS_capget (SYS_Linux + 204)
+#define SYS_capset (SYS_Linux + 205)
+#define SYS_sigaltstack (SYS_Linux + 206)
+#define SYS_sendfile (SYS_Linux + 207)
+#define SYS_putpmsg (SYS_Linux + 208)
+#define SYS_getpmsg (SYS_Linux + 209)
#endif /* sys/syscall.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=14a3f7b7d63a8fff43328b3f6b616e5c39175f00
commit 14a3f7b7d63a8fff43328b3f6b616e5c39175f00
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:04:59 1998 +0000
Removed.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h
deleted file mode 100644
index 15c7cb3..0000000
--- a/sysdeps/unix/sysv/linux/mips/bits/time.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* System-dependent timing definitions. Linux/MIPS version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/*
- * Never include this file directly; use <time.h> instead.
- */
-
-#ifndef __need_timeval
-# ifndef _BITS_TIME_H
-# define _BITS_TIME_H 1
-
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
- The macro `CLOCKS_PER_SEC' is the number per second of the value
- returned by the `clock' function. */
-/* CAE XSH, Issue 4, Version 2: <time.h>
- The value of CLOCKS_PER_SEC is required to be 1 million on all
- XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000
-
-# ifndef __STRICT_ANSI__
-/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
- presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 100 /* XXX not correct for all systems. */
-# endif
-
-# endif /* bits/time.h */
-#endif
-
-#ifdef __need_timeval
-# undef __need_timeval
-# ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-/* A time value that is accurate to the nearest
- microsecond but also has a range of years. */
-struct timeval
- {
- long int tv_sec; /* Seconds. */
- long int tv_usec; /* Microseconds. */
- };
-# endif /* struct timeval */
-#endif /* need timeval */
diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c
deleted file mode 100644
index 9f7eb58..0000000
--- a/sysdeps/unix/sysv/linux/mips/xstat.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* xstat using old-style Unix stat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <kernel_stat.h>
-
-extern int __syscall_stat (const char *, struct kernel_stat *);
-
-/* Get information about the file NAME in BUF. */
-int
-__xstat (int vers, const char *name, struct stat *buf)
-{
- struct kernel_stat kbuf;
- int result;
-
- switch (vers)
- {
- case _STAT_VER_LINUX_OLD:
- /* Nothing to do. The struct is in the form the kernel expects
- it to be. */
- result = __syscall_stat (name, (struct kernel_stat *) buf);
- break;
-
- case _STAT_VER_LINUX:
- /* Do the system call. */
- result = __syscall_stat (name, &kbuf);
-
- /* Convert to current kernel version of `struct stat'. */
- buf->st_dev = kbuf.st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
- buf->st_ino = kbuf.st_ino;
- buf->st_mode = kbuf.st_mode;
- buf->st_nlink = kbuf.st_nlink;
- buf->st_uid = kbuf.st_uid;
- buf->st_gid = kbuf.st_gid;
- buf->st_rdev = kbuf.st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
- buf->st_pad3 = 0;
- buf->st_size = kbuf.st_size;
- buf->st_blksize = kbuf.st_blksize;
- buf->st_blocks = kbuf.st_blocks;
-
- buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
-
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
- break;
-
- default:
- __set_errno (EINVAL);
- result = -1;
- break;
- }
-
- return result;
-}
-weak_alias (__xstat, _xstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c0829162b3f6ebec2d4e228b8749c2e72fbf4e7
commit 8c0829162b3f6ebec2d4e228b8749c2e72fbf4e7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:04:33 1998 +0000
(_STAT_VER_KERNEL): Added.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index 3bcf1a9..f0afd5e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -22,15 +22,17 @@
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_LINUX_OLD 1
+#define _STAT_VER_KERNEL 1
#define _STAT_VER_SVR4 2
#define _STAT_VER_LINUX 3
-#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 1
#define _MKNOD_VER_SVR4 2
#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
+
/* Structure describing file characteristics. */
struct stat
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff87e21b31d673e5966a863937c963c74df4443f
commit ff87e21b31d673e5966a863937c963c74df4443f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:04:24 1998 +0000
Update file.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 528b8be..cd85df7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,4 +1,4 @@
-/* System-specific socket constants and types. Linux version.
+/* System-specific socket constants and types. Linux/MIPS version.
Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,7 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if !defined _SYS_STAT_H && !defined _NETINET_IN_H
+#ifndef __BITS_SOCKET_H
+#define __BITS_SOCKET_H
+
+#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
#endif
@@ -25,65 +28,93 @@
#define __need_NULL
#include <stddef.h>
+#include <sys/types.h>
+
/* Type for length arguments in socket calls. */
typedef unsigned int socklen_t;
-/* Supported address families. */
-#define PF_UNSPEC 0
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_PACKET = 10 /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+};
+
+/* Protocol families. */
+#define PF_UNSPEC 0 /* Unspecified. */
#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
-#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */
+#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
#define PF_INET 2 /* IP protocol family. */
#define PF_AX25 3 /* Amateur Radio AX.25. */
#define PF_IPX 4 /* Novell Internet Protocol. */
-#define PF_APPLETALK 5 /* Don't use this. */
+#define PF_APPLETALK 5 /* Appletalk DDP. */
#define PF_NETROM 6 /* Amateur radio NetROM. */
#define PF_BRIDGE 7 /* Multiprotocol bridge. */
-#define PF_AAL5 8 /* Reserved for Werner's ATM. */
+#define PF_ATMPVC 8 /* ATM PVCs. */
#define PF_X25 9 /* Reserved for X.25 project. */
#define PF_INET6 10 /* IP version 6. */
-#define PF_ROSE 11 /* Amateur Radio X.25 PLP */
-#define PF_DECnet 12 /* Reserved for DECnet project */
-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/
-#define PF_SECURITY 14 /* Security callback pseudo AF */
-#define PF_KEY 15 /* PF_KEY key management API */
+#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
+#define PF_DECnet 12 /* Reserved for DECnet project. */
+#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
+#define PF_SECURITY 14 /* Security callback pseudo AF. */
+#define PF_KEY 15 /* PF_KEY key management API. */
#define PF_NETLINK 16
-#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD */
-#define PF_PACKET 17 /* Packet family */
-#define PF_ASH 18 /* Ash */
-#define PF_MAX 32 /* For now.. */
-
-/* Protocol families, same as address families. */
-#define AF_UNSPEC PF_UNSPEC
-#define AF_UNIX PF_UNIX
-#define AF_LOCAL PF_LOCAL
-#define AF_FILE PF_FILE
-
-#define AF_AX25 PF_AX25
-#define AF_IPX PF_IPX
-#define AF_APPLETALK PF_APPLETALK
+#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
+#define PF_PACKET 17 /* Packet family. */
+#define PF_ASH 18 /* Ash. */
+#define PF_ECONET 19 /* Acorn Econet. */
+#define PF_ATMSVC 20 /* ATM SVCs. */
+#define PF_SNA 22 /* Linux SNA Project */
+#define PF_MAX 32 /* For now.. */
+
+/* Address families. */
+#define AF_UNSPEC PF_UNSPEC
+#define AF_LOCAL PF_LOCAL
+#define AF_UNIX PF_UNIX
+#define AF_FILE PF_FILE
+#define AF_INET PF_INET
+#define AF_AX25 PF_AX25
+#define AF_IPX PF_IPX
+#define AF_APPLETALK PF_APPLETALK
#define AF_NETROM PF_NETROM
-#define AF_BRIDGE PF_BRIDGE
-#define AF_AAL5 PF_AAL5
-#define AF_X25 PF_X25
-#define AF_INET6 PF_INET6
-#define AF_ROSE PF_ROSE
-#define AF_DECNET PF_DECNET
-#define AF_NETBEUI PF_NETBEUI
+#define AF_BRIDGE PF_BRIDGE
+#define AF_ATMPVC PF_ATMPVC
+#define AF_X25 PF_X25
+#define AF_INET6 PF_INET6
+#define AF_ROSE PF_ROSE
+#define AF_DECnet PF_DECnet
+#define AF_NETBEUI PF_NETBEUI
#define AF_SECURITY PF_SECURITY
#define pseudo_AF_KEY PF_KEY
#define AF_NETLINK PF_NETLINK
#define AF_ROUTE PF_ROUTE
#define AF_PACKET PF_PACKET
#define AF_ASH PF_ASH
-#define AF_MAX PF_MAX
+#define AF_ECONET PF_ECONET
+#define AF_ATMSVC PF_ATMSVC
+#define AF_SNA PF_SNA
+#define AF_MAX PF_MAX
/* Socket level values. Others are defined in the appropriate headers.
XXX These definitions also should go into the appropriate headers as
far as they are available. */
-#define SOL_IPV6 41
-#define SOL_ICMPV6 58
#define SOL_RAW 255
#define SOL_DECNET 261
#define SOL_X25 262
@@ -106,10 +137,15 @@ struct sockaddr
enum
{
MSG_OOB = 0x01, /* Process out-of-band data. */
+#define MSG_OOB MSG_OOB
MSG_PEEK = 0x02, /* Peek at incoming messages. */
+#define MSG_PEEK MSG_PEEK
MSG_DONTROUTE = 0x04, /* Don't use local routing. */
+#define MSG_DONTROUTE MSG_DONTROUTE
MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
+#define MSG_CTRUNC MSG_CTRUNC
MSG_PROXY = 0x10 /* Supply or ask second address. */
+#define MSG_PROXY MSG_PROXY
};
@@ -121,10 +157,10 @@ struct msghdr
socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
- int msg_iovlen; /* Number of elements in the vector. */
+ size_t msg_iovlen; /* Number of elements in the vector. */
__ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */
- socklen_t msg_controllen; /* Ancillary data buffer length. */
+ size_t msg_controllen; /* Ancillary data buffer length. */
int msg_flags; /* Flags on received message. */
};
@@ -132,12 +168,13 @@ struct msghdr
/* Structure used for storage of ancillary data object information. */
struct cmsghdr
{
- socklen_t cmsg_len; /* Length of data in cmsg_data plus length
+ size_t cmsg_len; /* Length of data in cmsg_data plus length
of cmsghdr structure. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
unsigned char __cmsg_data[0]; /* Ancillary data. */
+ /* XXX Perhaps this should be removed. */
#endif
};
@@ -157,14 +194,14 @@ struct cmsghdr
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
-
-#ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
-#endif
extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
struct cmsghdr *__cmsg));
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
{
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
@@ -180,7 +217,29 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
return NULL;
return __cmsg;
}
+#endif /* Use `extern inline'. */
+/* Socket level message types. This must match the definitions in
+ <linux/socket.h>. */
+enum
+ {
+ SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
+#define SCM_RIGHTS SCM_RIGHTS
+#ifdef __USE_BSD
+ SCM_CREDENTIALS = 0x02, /* Credentials passing. */
+# define SCM_CREDENTIALS SCM_CREDENTIALS
+#endif
+ __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */
+ };
+
+/* User visible structure for SCM_CREDENTIALS message */
+
+struct ucred
+{
+ pid_t pid; /* PID of sending process. */
+ uid_t uid; /* UID of sending process. */
+ gid_t gid; /* GID of sending process. */
+};
/* Get socket manipulation related informations from kernel headers. */
#include <asm/socket.h>
@@ -192,3 +251,5 @@ struct linger
int l_onoff; /* Nonzero to linger on close. */
int l_linger; /* Time to linger. */
};
+
+#endif /* bits/socket.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62fe3ebee6086fcce827c24fbc32d5ada49dcb31
commit 62fe3ebee6086fcce827c24fbc32d5ada49dcb31
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:04:12 1998 +0000
Remove inclusion of <asm/signal.h> and add needed symbols from
<asm/signal.h>;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h
index c30abe3..2cf5814 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h
@@ -19,16 +19,61 @@
#ifdef _SIGNAL_H
-/* Take these architecture specific stuff from the kernel header files. */
-#define __need_fake_sigfuns
-#define __need_signums
-#include <asm/signal.h>
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
#ifdef __USE_UNIX98
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
#endif
-#endif /* <signal.h> included. */
-#define __need__nsig
-#include <asm/signal.h>
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGEMT 7
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* BUS error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
+#define SIGIO 22 /* I/O now possible (4.2 BSD). */
+#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
+#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 24 /* Keyboard stop (POSIX). */
+#define SIGCONT 25 /* Continue (POSIX). */
+#define SIGTTIN 26 /* Background read from tty (POSIX). */
+#define SIGTTOU 27 /* Background write to tty (POSIX). */
+#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
+
+
+#define _NSIG 128 /* Biggest signal number + 1
+ (including real-time signals). */
+
+#define SIGRTMIN (__libc_current_sigrtmin ())
+#define SIGRTMAX (__libc_current_sigrtmax ())
+
+/* These are the hard limits of the kernel. These values should not be
+ used directly at user level. */
+#define __SIGRTMIN 32
+#define __SIGRTMAX (_NSIG - 1)
+
+#endif /* <signal.h> included. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=889c9b63214471c17314a60d9306b078d75199ed
commit 889c9b63214471c17314a60d9306b078d75199ed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:03:41 1998 +0000
Remove ipc_kludge.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index 2841e6a..04bd3f0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,6 @@
#define IPC_STAT 2 /* Get `ipc_perm' options. */
#define IPC_INFO 3 /* See ipcs. */
-
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
@@ -51,14 +50,6 @@ struct ipc_perm
};
-/* Kludge to work around Linux' restriction of only up to five
- arguments to a system call. */
-struct ipc_kludge
- {
- void *msgp;
- long int msgtyp;
- };
-
__BEGIN_DECLS
/* The actual system call: all functions are multiplexed by this. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b7919d7f25958391b621bb24bca78bd99c0ee78
commit 5b7919d7f25958391b621bb24bca78bd99c0ee78
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:03:24 1998 +0000
Linux/MIPS specific versions.
diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c
new file mode 100644
index 0000000..c3bdcf9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pread.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pread
+
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
+static ssize_t __emulate_pread (int fd, void *buf, size_t count,
+ off_t offset) internal_function;
+
+
+ssize_t
+__pread (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+#if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, 0, offset);
+#elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, offset, 0);
+#endif
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pread, pread)
+
+#define __pread(fd, buf, count, offset) \
+ static internal_function __emulate_pread (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pread.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c
new file mode 100644
index 0000000..dfcfa01
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pread64.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pread
+
+extern ssize_t __syscall_pread (int fd, void *buf, size_t count, int dummy,
+ off_t offset_hi, off_t offset_lo);
+
+static ssize_t __emulate_pread64 (int fd, void *buf, size_t count,
+ off64_t offset) internal_function;
+
+
+ssize_t
+__pread64 (fd, buf, count, offset)
+ int fd;
+ void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+#if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
+#elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pread, 6, fd, buf, count, 0,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+#endif
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pread64 (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pread64, pread64)
+
+#define __pread64(fd, buf, count, offset) \
+ static internal_function __emulate_pread64 (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pread64.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
new file mode 100644
index 0000000..274c142
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.c
@@ -0,0 +1,62 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pwrite
+
+extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
+
+static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
+ off_t offset) internal_function;
+
+
+ssize_t
+__pwrite (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+#if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, 0, offset);
+#elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, offset, 0);
+#endif
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pwrite, pwrite)
+
+#define __pwrite(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pwrite.c>
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
new file mode 100644
index 0000000..f73b10e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.org>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#ifdef __NR_pwrite
+
+extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
+ int dummy, off_t offset_hi, off_t offset_lo);
+
+static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
+ off64_t offset) internal_function;
+
+
+ssize_t
+__pwrite64 (fd, buf, count, offset)
+ int fd;
+ const void *buf;
+ size_t count;
+ off64_t offset;
+{
+ ssize_t result;
+
+ /* First try the syscall. */
+#if defined(__MIPSEB__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0, (off_t) (offset >> 32),
+ (off_t) (offset & 0xffffffff));
+#elif defined(__MIPSEL__)
+ result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, 0,
+ (off_t) (offset & 0xffffffff),
+ (off_t) (offset >> 32));
+#endif
+ if (result == -1 && errno == ENOSYS)
+ /* No system call available. Use the emulation. */
+ result = __emulate_pwrite64 (fd, buf, count, offset);
+
+ return result;
+}
+
+weak_alias (__pwrite64, pwrite64)
+
+#define __pwrite64(fd, buf, count, offset) \
+ static internal_function __emulate_pwrite64 (fd, buf, count, offset)
+#endif
+#include <sysdeps/posix/pwrite64.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abbde1b09842dd536135619a1c9db86bb76efe07
commit abbde1b09842dd536135619a1c9db86bb76efe07
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:03:02 1998 +0000
Conversion function for stat structure.
diff --git a/sysdeps/unix/sysv/linux/mips/xstatconv.c b/sysdeps/unix/sysv/linux/mips/xstatconv.c
new file mode 100644
index 0000000..356235a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/xstatconv.c
@@ -0,0 +1,120 @@
+/* Convert between the kernel's `struct stat' format, and libc's.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <string.h>
+
+
+static inline int
+xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+{
+ switch (vers)
+ {
+ case _STAT_VER_KERNEL:
+ /* Nothing to do. The struct is in the form the kernel expects.
+ We should have short-circuted before we got here, but for
+ completeness... */
+ *(struct kernel_stat *) ubuf = *kbuf;
+ break;
+
+ case _STAT_VER_LINUX:
+ {
+ struct stat *buf = ubuf;
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf->st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf->st_ino;
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf->st_size;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+
+ buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ }
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
+
+static inline int
+xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+{
+#ifdef XSTAT_IS_XSTAT64
+ return xstat_conv (vers, kbuf, ubuf);
+#else
+ switch (vers)
+ {
+ case _STAT_VER_LINUX:
+ {
+ struct stat64 *buf = ubuf;
+
+ buf->st_dev = kbuf->st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf->st_ino;
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf->st_size;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+
+ buf->st_atime = kbuf->st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf->st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf->st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ }
+ break;
+
+ /* If struct stat64 is different from struct stat then
+ _STAT_VER_KERNEL does not make sense. */
+ case _STAT_VER_KERNEL:
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+#endif
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d4018c40f42f676bc9c731094c66b49c92e9218
commit 5d4018c40f42f676bc9c731094c66b49c92e9218
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:01:30 1998 +0000
Use INLINE_SYSCALL instead of calling __syscall_*.
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
index 447ab29..63eb68c 100644
--- a/sysdeps/unix/sysv/linux/mips/ustat.c
+++ b/sysdeps/unix/sysv/linux/mips/ustat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -17,9 +17,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <errno.h>
#include <sys/ustat.h>
#include <sys/sysmacros.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf);
@@ -31,5 +34,5 @@ ustat (dev_t dev, struct ustat *ubuf)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
- return __syscall_ustat (k_dev, ubuf);
+ return INLINE_SYSCALL (ustat, 2, k_dev, ubuf);
}
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
index c7ff64f..ba1b468 100644
--- a/sysdeps/unix/sysv/linux/mips/xmknod.c
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -1,5 +1,5 @@
/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,9 @@
#include <sys/stat.h>
#include <sys/sysmacros.h>
+#include <sysdep.h>
+#include <sys/syscall.h>
+
extern int __syscall_mknod (const char *, unsigned long, unsigned int);
/* Create a device file named PATH, with permission and special bits MODE
@@ -41,7 +44,7 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
/* We must convert the value to dev_t type used by the kernel. */
k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
- return __syscall_mknod (path, mode, k_dev);
+ return INLINE_SYSCALL (mknod, 3, path, mode, k_dev);
}
weak_alias (__xmknod, _xmknod)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16306093d1e18f618a76236e5866a50c59428f3a
commit 16306093d1e18f618a76236e5866a50c59428f3a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:01:13 1998 +0000
Update entries.
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index dd38647..dd29d15 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -34,13 +34,16 @@ shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
-getresuid - getresuid 3 getresuid
-getresgid - getresgid 3 getresgid
-
#
# There are defined locally because the caller is also defined in this dir.
#
-s_llseek llseek _llseek 5 __syscall__llseek
+s_llseek llseek _llseek 5 __sys_llseek
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_ustat ustat ustat 2 __syscall_ustat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_stat xstat stat 2 __syscall_stat
# System calls with wrappers.
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
@@ -55,16 +58,14 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread
+s_pread pread pread 6 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
+s_pwrite pwrite pwrite 6 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
-s_sigaction sigaction sigaction 3 __syscall_sigaction
s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
-s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ustat ustat ustat 2 __syscall_ustat
+# Todo: we can pass 6 args in registers, no need for the wrapper
+sysctl sysctl _sysctl 1 __syscall_sysctl
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
sys_mknod xmknod mknod 3 __syscall_mknod
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a8611169ba3dd80d0d83e06b2469c896ae953b0
commit 9a8611169ba3dd80d0d83e06b2469c896ae953b0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:00:55 1998 +0000
Add copyright message, change name of include protection, remove
inclusion of <bits/termios.h>.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
index 35be1bb..e876862 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
@@ -1,9 +1,24 @@
-#ifndef _SYS_KERNEL_TERMIOS_H
-#define _SYS_KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-/* We need the definition of tcflag_t, cc_t, and speed_t. */
-#include <bits/termios.h>
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _KERNEL_TERMIOS_H
+#define _KERNEL_TERMIOS_H 1
+/* The following corresponds to the values from the Linux 2.1.24 kernel. */
#define __KERNEL_NCCS 23
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35a72cb3b3b6717e454b0887508f54ba5d5c0ea0
commit 35a72cb3b3b6717e454b0887508f54ba5d5c0ea0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:00:37 1998 +0000
(old_kernel_sigaction): Define.
(struct kernel_sigaction): Rename sa_handler to k_sa_handler.
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
index bb7fe6b..3a803a6 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -4,9 +4,12 @@
#define HAVE_SA_RESTORER
+/* Linux/MIPS still uses the old sigaction structure in the kernel. */
+#define old_kernel_sigaction kernel_sigaction
+
struct kernel_sigaction {
unsigned int sa_flags;
- __sighandler_t sa_handler;
+ __sighandler_t k_sa_handler;
unsigned long sa_mask;
unsigned int __pad0[3]; /* reserved, keep size constant */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=598f68bf688e93e0c63bce4b5cbe76b4b4ebcb63
commit 598f68bf688e93e0c63bce4b5cbe76b4b4ebcb63
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 21:00:06 1998 +0000
Define _errno as weak_alias, rewrite errno declaration.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 4275d66..fa88886 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,10 +21,16 @@
#define _ERRNO_H
#include <bits/errno.h>
- .comm errno, 4
+ .bss
+ .globl errno
#ifdef __ELF__
- .type errno, @object
+ .type errno, @object
#endif
+ .size errno, 4
+errno:
+ .space 4
+
+weak_alias (errno, _errno)
.set noreorder
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea0499d2b812a866b08b4c594200e839fc1ce6e2
commit ea0499d2b812a866b08b4c594200e839fc1ce6e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 20:59:45 1998 +0000
ISO C 9x FPU exception handling function.
diff --git a/sysdeps/mips/bits/fenv.h b/sysdeps/mips/bits/fenv.h
new file mode 100644
index 0000000..0637bf7
--- /dev/null
+++ b/sysdeps/mips/bits/fenv.h
@@ -0,0 +1,72 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions
+ of the appropriate bits in the FPU control word. */
+enum
+ {
+ FE_INEXACT = 0x04,
+#define FE_INEXACT FE_INEXACT
+ FE_UNDERFLOW = 0x08,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_OVERFLOW = 0x10,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_DIVBYZERO = 0x20,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_INVALID = 0x40,
+#define FE_INVALID FE_INVALID
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The MIPS FPU supports all of the four defined rounding modes. We
+ use again the bit positions in the FPU control word as the values
+ for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0x0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDZERO = 0x1,
+#define FE_TOWARDZERO FE_TOWARDZERO
+ FE_UPWARD = 0x2,
+#define FE_UPWARD FE_UPWARD
+ FE_DOWNWARD = 0x3
+#define FE_DOWNWARD FE_DOWNWARD
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned short int fexcept_t;
+
+
+/* Type representing floating-point environment. This function corresponds
+ to the layout of the block written by the `fstenv'. */
+typedef struct
+ {
+ unsigned int fp_control_register;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
diff --git a/sysdeps/mips/fclrexcpt.c b/sysdeps/mips/fclrexcpt.c
new file mode 100644
index 0000000..de96dd0
--- /dev/null
+++ b/sysdeps/mips/fclrexcpt.c
@@ -0,0 +1,40 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+feclearexcept (int excepts)
+{
+ int cw;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Read the complete control word. */
+ _FPU_GETCW (cw);
+
+ /* Clear exception bits. */
+ cw &= ~excepts;
+
+ /* Put the new data in effect. */
+ _FPU_SETCW (cw);
+}
diff --git a/sysdeps/mips/fegetenv.c b/sysdeps/mips/fegetenv.c
new file mode 100644
index 0000000..13a2c8f
--- /dev/null
+++ b/sysdeps/mips/fegetenv.c
@@ -0,0 +1,28 @@
+/* Store current floating-point environment.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ _FPU_GETCW (*envp);
+}
diff --git a/sysdeps/mips/fegetround.c b/sysdeps/mips/fegetround.c
new file mode 100644
index 0000000..e2e51ae
--- /dev/null
+++ b/sysdeps/mips/fegetround.c
@@ -0,0 +1,33 @@
+/* Return current rounding direction.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetround (void)
+{
+ int cw;
+
+ /* Get control word. */
+ _FPU_GETCW (cw);
+
+ return cw & 0x3;
+}
diff --git a/sysdeps/mips/fesetenv.c b/sysdeps/mips/fesetenv.c
new file mode 100644
index 0000000..58df063
--- /dev/null
+++ b/sysdeps/mips/fesetenv.c
@@ -0,0 +1,31 @@
+/* Install given floating-point environment.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+ if (envp == FE_DFL_ENV)
+ _FPU_SETCW (_FPU_DEFAULT);
+ else
+ _FPU_SETCW (envp->fp_control_register);
+}
diff --git a/sysdeps/mips/fesetround.c b/sysdeps/mips/fesetround.c
new file mode 100644
index 0000000..6b623d6
--- /dev/null
+++ b/sysdeps/mips/fesetround.c
@@ -0,0 +1,43 @@
+/* Set current rounding direction.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fesetround (int round)
+{
+ unsigned short int cw;
+
+ if ((round & ~0x3) != 0)
+ /* ROUND is no valid rounding mode. */
+ return 0;
+
+ /* Get current state. */
+ _FPU_GETCW (cw);
+
+ /* Set rounding bits. */
+ cw &= ~0x3;
+ cw |= round;
+ /* Set new state. */
+ _FPU_SETCW (cw);
+
+ return 1;
+}
diff --git a/sysdeps/mips/feupdateenv.c b/sysdeps/mips/feupdateenv.c
new file mode 100644
index 0000000..e826084
--- /dev/null
+++ b/sysdeps/mips/feupdateenv.c
@@ -0,0 +1,40 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+feupdateenv (const fenv_t *envp)
+{
+ int temp;
+
+ /* Save current exceptions. */
+ _FPU_GETCW (temp);
+ temp &= FE_ALL_EXCEPT;
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the safed exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept (temp);
+}
diff --git a/sysdeps/mips/fgetexcptflg.c b/sysdeps/mips/fgetexcptflg.c
new file mode 100644
index 0000000..f3d52bc
--- /dev/null
+++ b/sysdeps/mips/fgetexcptflg.c
@@ -0,0 +1,33 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current exceptions. */
+ _FPU_GETCW (temp);
+
+ *flagp = temp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/mips/ftestexcept.c b/sysdeps/mips/ftestexcept.c
new file mode 100644
index 0000000..f348258
--- /dev/null
+++ b/sysdeps/mips/ftestexcept.c
@@ -0,0 +1,33 @@
+/* Test exception in current environment.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fetestexcept (int excepts)
+{
+ int cw;
+
+ /* Get current control word. */
+ _FPU_GETCW (cw);
+
+ return cw & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94f347c012cd9075add9cf0c6d51115802d9e381
commit 94f347c012cd9075add9cf0c6d51115802d9e381
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 28 20:59:14 1998 +0000
(sysdep_routines): Use += instead of a :=.
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
index 7364141..5585c61 100644
--- a/sysdeps/mips/Makefile
+++ b/sysdeps/mips/Makefile
@@ -1,3 +1,3 @@
ifeq ($(subdir),setjmp)
-sysdep_routines := $(sysdep_routines) setjmp_aux
+sysdep_routines += setjmp_aux
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccdf0819b4320c1829b5de821534826dde42b2cc
commit ccdf0819b4320c1829b5de821534826dde42b2cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 27 11:34:17 1998 +0000
(__FLOAT_WORD_ORDER): Define to big endian.
diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h
index ad3b539..7fe486e 100644
--- a/sysdeps/arm/bits/endian.h
+++ b/sysdeps/arm/bits/endian.h
@@ -1,7 +1,8 @@
-/* ARM is little-endian. */
+/* ARM is (usually) little-endian but with a big-endian FPU. */
#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h> instead."
#endif
#define __BYTE_ORDER __LITTLE_ENDIAN
+#define __FLOAT_WORD_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7782e5ed6ebe2ee122b6f3c31d63917768a77ad
commit e7782e5ed6ebe2ee122b6f3c31d63917768a77ad
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 27 10:01:37 1998 +0000
Fix handling of weak undefined symbols during bootstrapping.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 66ab4c6..53aa806 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -416,7 +416,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
- *reloc_addr = value;
+#ifdef RTLD_BOOTSTRAP
+ /* Fix weak undefined references. */
+ if (sym != NULL && sym->st_value == 0)
+ *reloc_addr = 0;
+ else
+#endif
+ *reloc_addr = value;
break;
case R_ARM_ABS32:
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60f3ce2755b7ab3b43959cfd3fa0f221b9c57508
commit 60f3ce2755b7ab3b43959cfd3fa0f221b9c57508
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 27 09:04:02 1998 +0000
Add closing comment to avoid warning.
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
index 184aae6..aeaf083 100644
--- a/sysdeps/mips/mul_1.S
+++ b/sysdeps/mips/mul_1.S
@@ -1,7 +1,7 @@
/* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
store the product in a second limb vector.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -74,7 +74,7 @@ $LC1: mflo $10
multu $8,$7
sw $10,0($4)
addiu $4,$4,4
- addu $2,$9,$2 /* add high product limb and carry from addition
+ addu $2,$9,$2 /* add high product limb and carry from addition */
/* cool down phase 0 */
$LC0: mflo $10
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f764c1f26f806f21e39601d66b8ffe40ffe6d7e
commit 3f764c1f26f806f21e39601d66b8ffe40ffe6d7e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 26 12:01:59 1998 +0000
System V ucontext definition for MIPS.
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
new file mode 100644
index 0000000..f177cad
--- /dev/null
+++ b/sysdeps/mips/sys/ucontext.h
@@ -0,0 +1,144 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* System V/mips ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* Type for general register. */
+typedef unsigned int greg_t;
+
+/* Number of general registers. */
+#define NGREG 36
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ CTX_R0 = 0,
+#define CTX_R0 CTX_R0
+ CTX_AT = 1,
+#define CTX_AT CTX_AT
+ CTX_V0 = 2,
+#define CTX_V0 CTX_V0
+ CTX_V1 = 3,
+#define CTX_V1 CTX_V1
+ CTX_A0 = 4,
+#define CTX_A0 CTX_A0
+ CTX_A1 = 5,
+#define CTX_A1 CTX_A1
+ CTX_A2 = 6,
+#define CTX_A2 CTX_A2
+ CTX_A3 = 7,
+#define CTX_A3 CTX_A3
+ CTX_T0 = 8,
+#define CTX_T0 CTX_T0
+ CTX_T1 = 9,
+#define CTX_T1 CTX_T1
+ CTX_T2 = 10,
+#define CTX_T2 CTX_T2
+ CTX_T3 = 11,
+#define CTX_T3 CTX_T3
+ CTX_T4 = 12,
+#define CTX_T4 CTX_T4
+ CTX_T5 = 13,
+#define CTX_T5 CTX_T5
+ CTX_T6 = 14,
+#define CTX_T6 CTX_T6
+ CTX_T7 = 15,
+#define CTX_T7 CTX_T7
+ CTX_S0 = 16,
+#define CTX_S0 CTX_S0
+ CTX_S1 = 17,
+#define CTX_S1 CTX_S1
+ CTX_S2 = 18,
+#define CTX_S2 CTX_S2
+ CTX_S3 = 19,
+#define CTX_S3 CTX_S3
+ CTX_S4 = 20,
+#define CTX_S4 CTX_S4
+ CTX_S5 = 21,
+#define CTX_S5 CTX_S5
+ CTX_S6 = 22,
+#define CTX_S6 CTX_S6
+ CTX_S7 = 23,
+#define CTX_S7 CTX_S7
+ CTX_T8 = 24,
+#define CTX_T8 CTX_T8
+ CTX_T9 = 25,
+#define CTX_T9 CTX_T9
+ CTX_K0 = 26,
+#define CTX_K0 CTX_K0
+ CTX_K1 = 27,
+#define CTX_K1 CTX_K1
+ CTX_GP = 28,
+#define CTX_GP CTX_GP
+ CTX_SP = 29,
+#define CTX_SP CTX_SP
+ CTX_S8 = 30,
+#define CTX_S8 CTX_S8
+ CTX_RA = 31,
+#define CTX_RA CTX_RA
+ CTX_MDLO = 32,
+#define CTX_MDLO CTX_MDLO
+ CTX_MDHI = 33,
+#define CTX_MDHI CTX_MDHI
+ CTX_CAUSE = 34,
+#define CTX_CAUSE CTX_CAUSE
+ CTX_EPC = 35,
+#define CTX_EPC CTX_EPC
+};
+
+/* Structure to describe FPU registers. */
+typedef struct fpregset
+{
+ union
+ {
+ double fp_dregs[16];
+ float fp_fregs[32];
+ unsigned int fp_regs[32];
+ } fp_r;
+ unsigned int fp_csr;
+ unsigned int fp_pad;
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+{
+ gregset_t gpregs;
+ fpregset_t fpregs;
+} mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+{
+ unsigned long int uc_flags;
+ struct ucontext *uc_links;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[48];
+} ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f72bf96a90c056afada9674ba1f152c4e0d64b7
commit 3f72bf96a90c056afada9674ba1f152c4e0d64b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 26 12:01:21 1998 +0000
(ELF_MACHINE_NO_PLT): New defined macro.
(elf_machine_got_rel): Remove scope variable. Use scope from the map.
Don't modify _dl_global_scope_end in the end.
(__dl_runtime_resolv): Also use scope from the map.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index bbd22d8..5f6e127 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -23,6 +23,8 @@
#define ELF_MACHINE_NAME "MIPS"
+#define ELF_MACHINE_NO_PLT
+
#include <assert.h>
#include <entry.h>
@@ -142,7 +144,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- struct link_map **scope;
const char *strtab
= ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
@@ -150,7 +151,8 @@ elf_machine_got_rel (struct link_map *map, int lazy)
({ \
const ElfW(Sym) *ref = sym; \
ElfW(Addr) sym_loadaddr; \
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
+ map->l_scope, \
map->l_name, ELF_MACHINE_RELOC_NOPLT);\
(ref)? sym_loadaddr + ref->st_value: 0; \
})
@@ -166,9 +168,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
while (i < n)
got[i++] += map->l_addr;
- /* Set scope. */
- scope = _dl_object_relocation_scope (map);
-
/* Handle global got entries. */
got += n;
sym = (ElfW(Sym) *) ((void *) map->l_addr
@@ -210,7 +209,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
}
#undef RESOLVE_GOTSYM
- *_dl_global_scope_end = NULL;
return;
}
@@ -362,16 +360,13 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
const ElfW(Sym) *definer; \
ElfW(Addr) loadbase; \
ElfW(Addr) funcaddr; \
- struct link_map **scope; \
\
/* Look up the symbol's run-time value. */ \
- scope = _dl_object_relocation_scope (l); \
definer = &symtab[sym_index]; \
\
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
- scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
- \
- *_dl_global_scope_end = NULL; \
+ l->l_scope, l->l_name, \
+ ELF_MACHINE_RELOC_NOPLT); \
\
/* Apply the relocation with that value. */ \
funcaddr = loadbase + definer->st_value; \
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 76981a6..1045da1 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -23,6 +23,8 @@
#define ELF_MACHINE_NAME "MIPS"
+#define ELF_MACHINE_NO_PLT
+
#include <assert.h>
#include <entry.h>
@@ -142,7 +144,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- struct link_map **scope;
const char *strtab
= ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
@@ -150,7 +151,8 @@ elf_machine_got_rel (struct link_map *map, int lazy)
({ \
const ElfW(Sym) *ref = sym; \
ElfW(Addr) sym_loadaddr; \
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, \
+ map->l_scope, \
map->l_name, ELF_MACHINE_RELOC_NOPLT);\
(ref)? sym_loadaddr + ref->st_value: 0; \
})
@@ -166,9 +168,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
while (i < n)
got[i++] += map->l_addr;
- /* Set scope. */
- scope = _dl_object_relocation_scope (map);
-
/* Handle global got entries. */
got += n;
sym = (ElfW(Sym) *) ((void *) map->l_addr
@@ -210,7 +209,6 @@ elf_machine_got_rel (struct link_map *map, int lazy)
}
#undef RESOLVE_GOTSYM
- *_dl_global_scope_end = NULL;
return;
}
@@ -362,16 +360,13 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
const ElfW(Sym) *definer; \
ElfW(Addr) loadbase; \
ElfW(Addr) funcaddr; \
- struct link_map **scope; \
\
/* Look up the symbol's run-time value. */ \
- scope = _dl_object_relocation_scope (l); \
definer = &symtab[sym_index]; \
\
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
- scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
- \
- *_dl_global_scope_end = NULL; \
+ l->l_scope, l->l_name, \
+ ELF_MACHINE_RELOC_NOPLT); \
\
/* Apply the relocation with that value. */ \
funcaddr = loadbase + definer->st_value; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1173aab2d28d0d8ada3f773002ea6aa35f3125e2
commit 1173aab2d28d0d8ada3f773002ea6aa35f3125e2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 26 12:00:10 1998 +0000
Remove __setfpucw declaration, it's an internal symbol.
diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
index bcf73e8..dfca373 100644
--- a/sysdeps/alpha/fpu/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -1,5 +1,5 @@
/* FPU control word bits. Alpha-maped-to-Intel version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Olaf Flebbe.
@@ -103,11 +103,4 @@ typedef unsigned int fpu_control_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-__BEGIN_DECLS
-
-/* called by start.o. It can be used to manipulate fpu control word. */
-extern void __setfpucw __P ((unsigned short));
-
-__END_DECLS
-
#endif /* _ALPHA_FPU_CONTROL */
diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h
index 8a2d338..27b8dda 100644
--- a/sysdeps/arm/fpu/fpu_control.h
+++ b/sysdeps/arm/fpu/fpu_control.h
@@ -83,11 +83,4 @@ typedef unsigned int fpu_control_t;
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-__BEGIN_DECLS
-
-/* Called at startup. It can be used to manipulate fpu control register. */
-extern void __setfpucw __P ((fpu_control_t));
-
-__END_DECLS
-
#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h
index 12ea133..28405b6 100644
--- a/sysdeps/m68k/fpu_control.h
+++ b/sysdeps/m68k/fpu_control.h
@@ -1,5 +1,5 @@
/* 68k FPU control word definitions.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,11 +98,4 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
-__BEGIN_DECLS
-
-/* Called at startup. It can be used to manipulate fpu control register. */
-extern void __setfpucw __P ((fpu_control_t));
-
-__END_DECLS
-
#endif /* _M68K_FPU_CONTROL_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc8f3c9b4e9b106ab55863f1035e1e515fcf7f10
commit bc8f3c9b4e9b106ab55863f1035e1e515fcf7f10
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Nov 16 12:01:02 1998 +0000
Add mmap64 alias.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
index 905303e..f9a773f 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -37,3 +37,4 @@ ENTRY (__mmap)
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 9457831..c7015ae 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -41,3 +41,4 @@ ENTRY (__mmap)
PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
+weak_alias (__mmap, mmap64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec2a735fdb786dc479539fcc3a18ae7b46453545
commit ec2a735fdb786dc479539fcc3a18ae7b46453545
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Nov 16 02:41:56 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Undo
last change.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 08047eb..d445471 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -170,7 +170,8 @@ SYSCALL_ERROR_LABEL: \
register int _d0 asm ("%d0") = __NR_##name; \
asm volatile ("trap #0" \
: "=d" (_d0) \
- : "0" (_d0) ASM_ARGS_##nr); \
+ : "0" (_d0) ASM_ARGS_##nr \
+ : "d0"); \
_sys_result = _d0; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f05b28e62f918c6716dc433d4c24972ebc318f13
commit f05b28e62f918c6716dc433d4c24972ebc318f13
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 13 14:47:31 1998 +0000
(__JMP_BUF_SP): Correct value.
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
index 895356f..a9fb9f3 100644
--- a/sysdeps/arm/fpu/bits/setjmp.h
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -28,7 +28,7 @@
typedef int __jmp_buf[22];
#endif
-#define __JMP_BUF_SP 8
+#define __JMP_BUF_SP 20
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11a39ef8a487b4c8c3f465c3b9c3aa500ea1e670
commit 11a39ef8a487b4c8c3f465c3b9c3aa500ea1e670
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Nov 13 03:01:32 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.h (INLINE_SYSCALL): Remove
d0 from clobber list.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index d445471..08047eb 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -170,8 +170,7 @@ SYSCALL_ERROR_LABEL: \
register int _d0 asm ("%d0") = __NR_##name; \
asm volatile ("trap #0" \
: "=d" (_d0) \
- : "0" (_d0) ASM_ARGS_##nr \
- : "d0"); \
+ : "0" (_d0) ASM_ARGS_##nr); \
_sys_result = _d0; \
} \
if (_sys_result >= (unsigned int) -4095) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88e7faf1e1bb059d7bd633242545108e2fe9fa2f
commit 88e7faf1e1bb059d7bd633242545108e2fe9fa2f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 12 11:21:36 1998 +0000
Cleanup comment.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 0a21a59..5ed6d76 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -90,7 +90,7 @@
/* Operations for bsd flock(), also used by the kernel implementation */
# define LOCK_SH 1 /* shared lock */
# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
+# define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
# define LOCK_UN 8 /* remove lock */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=200172bd3ff8de02b2bed138036d0c0c0b5c06bd
commit 200172bd3ff8de02b2bed138036d0c0c0b5c06bd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 10 19:10:36 1998 +0000
Define ISO C 9X stuff only if included from math.h and __USE_ISOC9X is
defined.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 2ff626d..5ee9644 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,56 +16,65 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _MATH_H
+#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
-#ifdef __GNUC__
-# if __STDC__ == 1
+#if defined __USE_ISOC9X && defined _MATH_H
+# ifdef __GNUC__
+# if __STDC__ == 1
/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
typedef float float_t;
typedef double double_t;
/* Signal that types stay as they were declared. */
-# define FLT_EVAL_METHOD 0
+# define FLT_EVAL_METHOD 0
/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
+# define INFINITY HUGE_VALF
-# else
+# else
/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
typedef double float_t;
typedef double double_t;
/* Signal that both types are `double'. */
-# define FLT_EVAL_METHOD 1
+# define FLT_EVAL_METHOD 1
/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
+# define INFINITY HUGE_VALF
-# endif
-#else
+# endif
+# else
/* Wild guess at types for float_t and double_t. */
typedef double float_t;
typedef double double_t;
/* Strange compiler, we don't know how it works. */
-# define FLT_EVAL_METHOD -1
+# define FLT_EVAL_METHOD -1
/* Define `INFINITY' as value of type `float'. */
-# define INFINITY HUGE_VALF
+# define INFINITY HUGE_VALF
-#endif
+# endif
/* The values returned by `ilogb' for 0 and NaN respectively. */
-#define FP_ILOGB0 0x80000001
-#define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 0x80000001
+# define FP_ILOGBNAN 0x7fffffff
/* Number of decimal digits for the `double' type. */
-#define DECIMAL_DIG 15
+# define DECIMAL_DIG 15
+
+#endif /* ISO C 9X */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. The disables the
+ declaration of all the `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 5bad57b..250f0f3 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -16,11 +16,11 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _MATH_H
+#if !defined _MATH_H && !defined _COMPLEX_H
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-#ifdef __USE_ISOC9X
+#if defined __USE_ISOC9X && defined _MATH_H
/* The m68k FPUs evaluate all values in the 96 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79df5fdb24d5c9c6ad43e93afcec57d77871adb5
commit 79df5fdb24d5c9c6ad43e93afcec57d77871adb5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 5 18:05:39 1998 +0000
Define only if __USE_ISOC9X.
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index e3d33a5..5bad57b 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
-
+#ifdef __USE_ISOC9X
/* The m68k FPUs evaluate all values in the 96 bit floating-point format
which is also available for the user as `long double'. Therefore we
define: */
@@ -30,14 +30,16 @@ typedef long double double_t; /* `double' expressions are evaluated as
`long double'. */
/* Signal that both types are `long double'. */
-#define FLT_EVAL_METHOD 2
+# define FLT_EVAL_METHOD 2
/* Define `INFINITY' as value of type `float'. */
-#define INFINITY HUGE_VALF
+# define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
-#define FP_ILOGB0 0x80000000
-#define FP_ILOGBNAN 0x7fffffff
+# define FP_ILOGB0 0x80000000
+# define FP_ILOGBNAN 0x7fffffff
/* Number of decimal digits for the `long double' type. */
-#define DECIMAL_DIG 18
+# define DECIMAL_DIG 18
+
+#endif /* ISO C 9X */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1dc5a942c96e0b48959d086d3423f5245bef4fef
commit 1dc5a942c96e0b48959d086d3423f5245bef4fef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 31 23:38:23 1998 +0000
Kill __syscall* bits.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index b48f538..9f002b2 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -79,30 +79,3 @@ old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLI
# and one for timeval64 entry points
adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
-
-# System calls with wrappers.
-rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
-rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_getcwd getcwd getcwd 2 __syscall_getcwd
-s_getdents getdents getdents 3 __syscall_getdents
-s_getpriority getpriority getpriority 2 __syscall_getpriority
-s_getresgid getresgid getresgid 3 __syscall_getresgid
-s_getresuid getresuid getresuid 3 __syscall_getresuid
-s_poll poll poll 3 __syscall_poll
-s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_reboot reboot reboot 3 __syscall_reboot
-s_sigaction sigaction sigaction 3 __syscall_sigaction
-s_sigpending sigpending sigpending 1 __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
-s_sysctl sysctl _sysctl 1 __syscall__sysctl
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_mknod xmknod mknod 3 __syscall_mknod
-sys_readv readv readv 3 __syscall_readv
-sys_stat xstat stat 2 __syscall_stat
-sys_writev writev writev 3 __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26ecf6a8865ecda48091ad852b32515caa3ef11c
commit 26ecf6a8865ecda48091ad852b32515caa3ef11c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 31 23:38:09 1998 +0000
(INLINE_SYSCALL): New.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 29d973f..1a3cf37 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -55,3 +55,15 @@
#define __NR_osf_shmat 209
#define __NR_osf_getsysinfo 256
#define __NR_osf_setsysinfo 257
+
+/*
+ * In order to get the hidden arguments for rt_sigaction set up
+ * properly, we need to call the assembly version. Detect this in the
+ * INLINE_SYSCALL macro, and fail to expand inline in that case.
+ */
+
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ (__NR_##name == __NR_rt_sigaction \
+ ? __syscall_##name(args) \
+ : INLINE_SYSCALL1(name, nr, args))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=13d54c34ab675e0f0fec92532ce4661c9f96efd4
commit 13d54c34ab675e0f0fec92532ce4661c9f96efd4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 31 23:37:54 1998 +0000
(INLINE_SYSCALL*): New.
(inline_syscall*): New.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index f43c7f8..80cb3e2 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -109,4 +109,167 @@ __LABEL(name) \
#define MOVE(x,y) mov x,y
-#endif
+#else /* !ASSEMBLER */
+
+/* Define a macro which expands inline into the wrapper code for a
+ system call. */
+
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) INLINE_SYSCALL1(name, nr, args)
+
+#define INLINE_SYSCALL1(name, nr, args...) \
+({ \
+ long _sc_ret, _sc_err; \
+ inline_syscall##nr(name, args); \
+ if (_sc_err) \
+ { \
+ __set_errno (_sc_ret); \
+ _sc_ret = -1L; \
+ } \
+ _sc_ret; \
+})
+
+#define inline_syscall_clobbers \
+ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \
+ "$22", "$23", "$24", "$25", "$27", "$28"
+
+/* It is moderately important optimization-wise to limit the lifetime
+ of the hard-register variables as much as possible. Thus we copy
+ in/out as close to the asm as possible. */
+
+#define inline_syscall0(name) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ __asm__("callsys # %0 %1 <= %2" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall1(name,arg1) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ __asm__("callsys # %0 %1 <= %2 %3" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall2(name,arg1,arg2) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall3(name,arg1,arg2,arg3) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19), "r"(_sc_20) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
+{ \
+ register long _sc_0 __asm__("$0"); \
+ register long _sc_16 __asm__("$16"); \
+ register long _sc_17 __asm__("$17"); \
+ register long _sc_18 __asm__("$18"); \
+ register long _sc_19 __asm__("$19"); \
+ register long _sc_20 __asm__("$20"); \
+ register long _sc_21 __asm__("$21"); \
+ \
+ _sc_0 = __NR_##name; \
+ _sc_16 = (long) (arg1); \
+ _sc_17 = (long) (arg2); \
+ _sc_18 = (long) (arg3); \
+ _sc_19 = (long) (arg4); \
+ _sc_20 = (long) (arg5); \
+ _sc_21 = (long) (arg6); \
+ __asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0), "r"(_sc_16), "r"(_sc_17), \
+ "r"(_sc_18), "1"(_sc_19), "r"(_sc_20), \
+ "r"(_sc_21) \
+ : inline_syscall_clobbers); \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
+}
+
+#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9dda87abb5d14575622ac712712e9edf290aab56
commit 9dda87abb5d14575622ac712712e9edf290aab56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 28 14:41:28 1998 +0000
(__FDS_BITS): New macro to access fds_bits member.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 6a1e846..d71599c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -106,8 +106,10 @@ typedef struct
from the user namespace. */
#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
#else
__fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
#endif
} __fd_set;
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 6629366..36a1e0e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -103,8 +103,10 @@ typedef struct
from the user namespace. */
#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
#else
__fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
#endif
} __fd_set;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index aa73ebc..aeba05b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -94,8 +94,10 @@ typedef struct
from the user namespace. */
#ifdef __USE_XOPEN
unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
+# define __FDS_BITS(set) ((set)->fds_bits)
#else
unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
+# define __FDS_BITS(set) ((set)->__fds_bits)
#endif
} __fd_set;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad427949d159fd79bc4b422851c173113ab96b72
commit ad427949d159fd79bc4b422851c173113ab96b72
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 26 15:43:18 1998 +0000
Include bits/pthreadtypes.h only not for POSIX 199506.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index aee9d04..6a1e846 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -120,7 +120,7 @@ typedef long int __intptr_t;
/* Now add the thread types. */
-#if defined __USE_POSIX199506 || defined __USE_UNIX98
+#ifdef __USE_UNIX98
# include <bits/pthreadtypes.h>
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index e32dadf..6629366 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -144,7 +144,7 @@ typedef int __intptr_t;
/* Now add the thread types. */
-#if defined __USE_POSIX199506 || defined __USE_UNIX98
+#ifdef __USE_UNIX98
# include <bits/pthreadtypes.h>
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04cfab506548c350172ff8d8bb7c5652e267907b
commit 04cfab506548c350172ff8d8bb7c5652e267907b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 26 11:09:12 1998 +0000
Rename __syscall_pwrite64 to __syscall_pwrite.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 4ccf41d..b48f538 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -93,9 +93,7 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread64
s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
s_reboot reboot reboot 3 __syscall_reboot
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_sigpending sigpending sigpending 1 __syscall_sigpending
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 7f3630c..dd38647 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -40,7 +40,7 @@ getresgid - getresgid 3 getresgid
#
# There are defined locally because the caller is also defined in this dir.
#
-s_llseek llseek _llseek 5 __sys_llseek
+s_llseek llseek _llseek 5 __syscall__llseek
# System calls with wrappers.
rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
@@ -55,9 +55,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread64
+s_pread64 pread64 pread 5 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_sigpending sigpending sigpending 1 __syscall_sigpending
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d87c3bc05d7ffb819a42f592662139c82ff1074d
commit d87c3bc05d7ffb819a42f592662139c82ff1074d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 26 11:08:18 1998 +0000
Rename __syscall_pwrite64 to __syscall_pwrite.
Rename __sys_llseek to __syscall__llseek.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index b89badf..6f332ce 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -1,7 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names
s_getgroups getgroups getgroups 2 __syscall_getgroups
-s_llseek llseek _llseek 5 __sys_llseek
+s_llseek llseek _llseek 5 __syscall__llseek
s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
@@ -27,9 +27,9 @@ s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread64
+s_pread64 pread64 pread 5 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite
s_reboot reboot reboot 3 __syscall_reboot
s_sigaction sigaction sigaction 3 __syscall_sigaction
s_sigpending sigpending sigpending 1 __syscall_sigpending
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dca170801437cac4a857e1f855b7446c5fe8c7e1
commit dca170801437cac4a857e1f855b7446c5fe8c7e1
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Oct 26 01:47:41 1998 +0000
* sysdeps/unix/sysv/linux/m68k/Makefile [subdir=signal]: Remove
rt_sigsuspend, rt_sigprocmask, rt_sigtimedwait, rt_sigqueueinfo,
rt_sigaction and rt_sigpending.
* sysdeps/unix/sysv/linux/m68k/syscalls.list: Remove all entries
for __syscall_* functions.
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Implement INLINE_SYSCALL.
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 8741550..7e46d51 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -11,8 +11,3 @@ ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
endif
-
-ifeq ($(subdir),signal)
-sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
- rt_sigqueueinfo rt_sigaction rt_sigpending
-endif
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index d10a6e8..9ae4f73 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,45 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
cacheflush EXTRA cacheflush 4 __cacheflush cacheflush
-
-s_getgroups getgroups getgroups 2 __syscall_getgroups
-s_llseek llseek _llseek 5 __sys_llseek
-s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
-s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
-s_setgid setgid setgid 1 __syscall_setgid
-s_setgroups setgroups setgroups 2 __syscall_setgroups
-s_setregid setregid setregid 2 __syscall_setregid
-s_setresgid setresgid setresgid 3 __syscall_setresgid
-s_setresuid setresuid setresuid 3 __syscall_setresuid
-s_setreuid setreuid setreuid 2 __syscall_setreuid
-s_setuid setuid setuid 1 __syscall_setuid
-
-# System calls with wrappers.
-rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
-rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
-rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
-rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
-rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
-rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
-s_getcwd getcwd getcwd 2 __syscall_getcwd
-s_getdents getdents getdents 3 __syscall_getdents
-s_getpriority getpriority getpriority 2 __syscall_getpriority
-s_getresgid getresgid getresgid 3 __syscall_getresgid
-s_getresuid getresuid getresuid 3 __syscall_getresuid
-s_poll poll poll 3 __syscall_poll
-s_pread64 pread64 pread 5 __syscall_pread64
-s_ptrace ptrace ptrace 4 __syscall_ptrace
-s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
-s_reboot reboot reboot 3 __syscall_reboot
-s_sigaction sigaction sigaction 3 __syscall_sigaction
-s_sigpending sigpending sigpending 1 __syscall_sigpending
-s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
-s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
-s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ustat ustat ustat 2 __syscall_ustat
-sys_fstat fxstat fstat 2 __syscall_fstat
-sys_lstat lxstat lstat 2 __syscall_lstat
-sys_mknod xmknod mknod 3 __syscall_mknod
-sys_readv readv readv 3 __syscall_readv
-sys_stat xstat stat 2 __syscall_stat
-sys_writev writev writev 3 __syscall_writev
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 4094172..d445471 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -158,4 +158,50 @@ SYSCALL_ERROR_LABEL: \
#define MOVE(x,y) movel x , y
#endif
-#endif /* __ASSEMBLER__ */
+#else /* not __ASSEMBLER__ */
+
+/* Define a macro which expands into the inline wrapper code for a system
+ call. */
+#undef INLINE_SYSCALL
+#define INLINE_SYSCALL(name, nr, args...) \
+ ({ unsigned int _sys_result; \
+ { \
+ LOAD_ARGS_##nr (args) \
+ register int _d0 asm ("%d0") = __NR_##name; \
+ asm volatile ("trap #0" \
+ : "=d" (_d0) \
+ : "0" (_d0) ASM_ARGS_##nr \
+ : "d0"); \
+ _sys_result = _d0; \
+ } \
+ if (_sys_result >= (unsigned int) -4095) \
+ { \
+ __set_errno (-_sys_result); \
+ _sys_result = (unsigned int) -1; \
+ } \
+ (int) _sys_result; })
+
+#define LOAD_ARGS_0()
+#define ASM_ARGS_0
+#define LOAD_ARGS_1(a1) \
+ register int _d1 asm ("d1") = (int) (a1); \
+ LOAD_ARGS_0 ()
+#define ASM_ARGS_1 ASM_ARGS_0, "d" (_d1)
+#define LOAD_ARGS_2(a1, a2) \
+ register int _d2 asm ("d2") = (int) (a2); \
+ LOAD_ARGS_1 (a1)
+#define ASM_ARGS_2 ASM_ARGS_1, "d" (_d2)
+#define LOAD_ARGS_3(a1, a2, a3) \
+ register int _d3 asm ("d3") = (int) (a3); \
+ LOAD_ARGS_2 (a1, a2)
+#define ASM_ARGS_3 ASM_ARGS_2, "d" (_d3)
+#define LOAD_ARGS_4(a1, a2, a3, a4) \
+ register int _d4 asm ("d4") = (int) (a4); \
+ LOAD_ARGS_3 (a1, a2, a3)
+#define ASM_ARGS_4 ASM_ARGS_3, "d" (_d4)
+#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
+ register int _d5 asm ("d5") = (int) (a5); \
+ LOAD_ARGS_4 (a1, a2, a3, a4)
+#define ASM_ARGS_5 ASM_ARGS_4, "d" (_d5)
+
+#endif /* not __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b227d2e7ebf9d73b26b94e342444ac9c023695ca
commit b227d2e7ebf9d73b26b94e342444ac9c023695ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 25 09:10:44 1998 +0000
(__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise
use __fds_bits.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index d4f2217..aee9d04 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -102,8 +102,13 @@ typedef unsigned long int __fd_mask;
/* fd_set for select and pselect. */
typedef struct
{
- /* XPG4.2 requires this member name. */
+ /* XPG4.2 requires this member name. Otherwise avoid the name
+ from the user namespace. */
+#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+#else
+ __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+#endif
} __fd_set;
/* Used in XTI. */
@@ -115,6 +120,8 @@ typedef long int __intptr_t;
/* Now add the thread types. */
-#include <bits/pthreadtypes.h>
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+# include <bits/pthreadtypes.h>
+#endif
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index c716d57..e32dadf 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask;
/* fd_set for select and pselect. */
typedef struct
{
- /* XPG4.2 requires this member name. */
+ /* XPG4.2 requires this member name. Otherwise avoid the name
+ from the user namespace. */
+#ifdef __USE_XOPEN
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+#else
+ __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
+#endif
} __fd_set;
@@ -139,6 +144,8 @@ typedef int __intptr_t;
/* Now add the thread types. */
-#include <bits/pthreadtypes.h>
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+# include <bits/pthreadtypes.h>
+#endif
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index e25dec9..aa73ebc 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -90,8 +90,13 @@ typedef int __key_t; /* Type of an IPC key */
typedef struct
{
- /* XPG4.2 requires this member name. */
+ /* XPG4.2 requires this member name. Otherwise avoid the name
+ from the user namespace. */
+#ifdef __USE_XOPEN
unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
+#else
+ unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
+#endif
} __fd_set;
typedef unsigned long int __fd_mask;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0b78da0365f4b4a627a7bdf40f967fb5660de9be
commit 0b78da0365f4b4a627a7bdf40f967fb5660de9be
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 25 09:09:44 1998 +0000
(timeval): Protect with __need_timeval.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index acb2b41..f44b5dc 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -42,10 +42,11 @@
# endif /* bits/time.h */
#endif /* !__need_timeval */
-
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-# include <bits/types.h>
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
@@ -54,4 +55,5 @@ struct timeval
__time_t tv_sec; /* Seconds. */
__time_t tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h
index 91dc65c..15c7cb3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/time.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/time.h
@@ -42,8 +42,10 @@
# endif /* bits/time.h */
#endif
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
@@ -51,4 +53,5 @@ struct timeval
long int tv_sec; /* Seconds. */
long int tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1a011e7312f01441782877076631d8f07bac9c6
commit e1a011e7312f01441782877076631d8f07bac9c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 25 09:09:29 1998 +0000
(LOCK_SH, LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 70ebbeb..9f90ddf 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -89,12 +89,14 @@
#define F_EXLCK 16 /* or 3 */
#define F_SHLCK 32 /* or 4 */
-/* operations for bsd flock(), also used by the kernel implementation */
-#define LOCK_SH 1 /* shared lock */
-#define LOCK_EX 2 /* exclusive lock */
-#define LOCK_NB 4 /* or'd with one of the above to prevent
+/* Operations for bsd flock(), also used by the kernel implementation */
+#ifdef __USE_BSD
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent
blocking */
-#define LOCK_UN 8 /* remove lock */
+# define LOCK_UN 8 /* remove lock */
+#endif
/* We don't need to support __USE_FILE_OFFSET64. */
struct flock
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 0273470..0a21a59 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -86,12 +86,14 @@
#define F_EXLCK 4 /* or 3 */
#define F_SHLCK 8 /* or 4 */
-/* operations for bsd flock(), also used by the kernel implementation */
-#define LOCK_SH 1 /* shared lock */
-#define LOCK_EX 2 /* exclusive lock */
-#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
+#ifdef __USE_BSD
+/* Operations for bsd flock(), also used by the kernel implementation */
+# define LOCK_SH 1 /* shared lock */
+# define LOCK_EX 2 /* exclusive lock */
+# define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
blocking */
-#define LOCK_UN 8 /* remove lock */
+# define LOCK_UN 8 /* remove lock */
+#endif
typedef struct flock
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91c2d735431d38358a6cb6f7fea9682aa6d320ec
commit 91c2d735431d38358a6cb6f7fea9682aa6d320ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 24 11:01:21 1998 +0000
Remove duplicate definition of O_LARGEFILE.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index a01dcae..0273470 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -49,9 +49,6 @@
#define O_NDELAY O_NONBLOCK
-/* XXX missing */
-#define O_LARGEFILE 0
-
/* Values for the second argument to `fcntl'. */
#define F_DUPFD 0 /* Duplicate file descriptor. */
#define F_GETFD 1 /* Get file descriptor flags. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec86258b004ed05399ec3b271c0fa314370afbfd
commit ec86258b004ed05399ec3b271c0fa314370afbfd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 24 10:59:25 1998 +0000
(__pathconf): Use path as first argument to statfs.
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index 15910be..24d6880 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -51,7 +51,7 @@ __pathconf (const char *path, int name)
struct statfs fsbuf;
/* Determine the filesystem type. */
- if (__statfs (fd, &fsbuf) < 0)
+ if (__statfs (path, &fsbuf) < 0)
/* not possible, return the default value. */
return LINK_MAX;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47754990f43562e7076631fc27b040e12c85e5d1
commit 47754990f43562e7076631fc27b040e12c85e5d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 23:24:00 1998 +0000
(O_NOFOLLOW): New macro.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index e67ad19..70ebbeb 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -46,6 +46,7 @@
#ifdef __USE_GNU
# define O_DIRECT 040000 /* Direct disk access. */
# define O_DIRECTORY 0100000 /* Must be a directory. */
+# define O_NOFOLLOW 0200000 /* Do not follow links. */
#endif
/* Not necessary, files are always with 64bit off_t. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abcecb5bd2eff64c3ba7094014633ae8e188190b
commit abcecb5bd2eff64c3ba7094014633ae8e188190b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 23:22:54 1998 +0000
(O_LARGEFILE, O_NOFOLLOW, O_DIRECT): New macros.
(O_DIRECTORY): Correct definition according to official 2.1.126.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 63e754d..a01dcae 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -41,7 +41,10 @@
#define O_ASYNC 0x1000
#ifdef __USE_GNU
-# define O_DIRECTORY 0x2000 /* Must be a directory. */
+# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+# define O_NOFOLLOW 0x4000 /* Do not follow links. */
+# define O_DIRECT 0x8000 /* Direct disk access hint. */
+# define O_DIRECTORY 0x10000 /* Must be a directory. */
#endif
#define O_NDELAY O_NONBLOCK
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a2567f79254ef11b9642835a4543388980e1bc76
commit a2567f79254ef11b9642835a4543388980e1bc76
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 14:04:39 1998 +0000
Add setresuid.c, setresgid.c, setfsuid.c, and setfsgid.c.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 16bbb3e..18aa31f 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,3 +1,7 @@
clone.S
init-first.h
+setresuid.c
+setresgid.c
+setfsuid.c
+setfsgid.c
bits/armsigctx.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 6059865..c28074f 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,3 +1,7 @@
clone.S
mremap.S
+setresuid.c
+setresgid.c
+setfsuid.c
+setfsgid.c
sys/reg.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8f1bea43317b14c313d861d62c86f8682d1f8a2
commit d8f1bea43317b14c313d861d62c86f8682d1f8a2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 14:00:35 1998 +0000
Remove duplicate ustat definition.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 5d89ccb..4ccf41d 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -102,7 +102,6 @@ s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ustat ustat ustat 2 __syscall_ustat
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
sys_mknod xmknod mknod 3 __syscall_mknod
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1cecc97eb772d72e662036dc16d1c5dafa8f1e6b
commit 1cecc97eb772d72e662036dc16d1c5dafa8f1e6b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 13:42:01 1998 +0000
Include <asm/ptrace.h> to define struct pt_regs.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
index 395e194..ba78c03 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
@@ -21,6 +21,8 @@
Fortunately 2.0 puts a magic number in the first word and this is not
a legal value for `trap_no', so we can tell them apart. */
+#include <asm/ptrace.h>
+
union k_sigcontext
{
struct
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ffd8e8442ed1095bf383db1a0adec19fd46256f
commit 8ffd8e8442ed1095bf383db1a0adec19fd46256f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 13:41:52 1998 +0000
Remove spurious call to C_SYMBOL_NAME macro.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index 872ed4b..3e3c853 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -24,7 +24,7 @@
.type C_SYMBOL_NAME(errno),%object
.size C_SYMBOL_NAME(errno),4
C_SYMBOL_NAME(errno): .zero 4
-weak_alias (C_SYMBOL_NAME(errno), C_SYMBOL_NAME(_errno))
+weak_alias (errno, _errno)
.text
/* The syscall stubs jump here when they detect an error.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c962c928d252fdd11b513ab30dfef5f3410e38d
commit 9c962c928d252fdd11b513ab30dfef5f3410e38d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 13:41:45 1998 +0000
Don't bother including <asm/ptrace.h> here.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index 55a11bd..a1a4fc9 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -18,7 +18,6 @@
Boston, MA 02111-1307, USA. */
#include <signal.h>
-#include <asm/ptrace.h>
#include <bits/armsigctx.h>
void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e79e1949120834bb7726b664d5f7899838753b9
commit 3e79e1949120834bb7726b664d5f7899838753b9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 23 13:41:33 1998 +0000
Handle _PC_LINK_MAX here.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
index d8c428d..b822daa 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -22,9 +22,7 @@
#include <limits.h>
#include <sys/statfs.h>
-#define EXT2_SUPER_MAGIC 0xef53
-#define UFS_MAGIC 0x00011954
-#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+#include <linux_fsinfo.h>
static long int default_fpathconf (int fd, int name);
@@ -55,6 +53,46 @@ __fpathconf (fd, name)
/* This filesystem supported files >2GB. */
return 64;
}
+ if (name == _PC_LINK_MAX)
+ {
+ struct statfs fsbuf;
+
+ /* Determine the filesystem type. */
+ if (__fstatfs (fd, &fsbuf) < 0)
+ /* not possible, return the default value. */
+ return LINK_MAX;
+
+ switch (fsbuf.f_type)
+ {
+ case EXT2_SUPER_MAGIC:
+ return EXT2_LINK_MAX;
+
+ case MINIX_SUPER_MAGIC:
+ case MINIX_SUPER_MAGIC2:
+ return MINIX_LINK_MAX;
+
+ case MINIX2_SUPER_MAGIC:
+ case MINIX2_SUPER_MAGIC2:
+ return MINIX2_LINK_MAX;
+
+ case XENIX_SUPER_MAGIC:
+ return XENIX_LINK_MAX;
+
+ case SYSV4_SUPER_MAGIC:
+ case SYSV2_SUPER_MAGIC:
+ return SYSV_LINK_MAX;
+
+ case COH_SUPER_MAGIC:
+ return COH_LINK_MAX;
+
+ case UFS_MAGIC:
+ case UFS_CIGAM:
+ return UFS_LINK_MAX;
+
+ default:
+ return LINK_MAX;
+ }
+ }
/* Fallback to the generic version. */
return default_fpathconf (fd, name);
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
index 91ca094..15910be 100644
--- a/sysdeps/unix/sysv/linux/alpha/pathconf.c
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -23,9 +23,7 @@
#include <fcntl.h>
#include <sys/statfs.h>
-#define EXT2_SUPER_MAGIC 0xef53
-#define UFS_MAGIC 0x00011954
-#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+#include <linux_fsinfo.h>
static long int default_pathconf (const char *path, int name);
@@ -48,6 +46,46 @@ __pathconf (const char *path, int name)
/* This filesystem supported files >2GB. */
return 64;
}
+ if (name == _PC_LINK_MAX)
+ {
+ struct statfs fsbuf;
+
+ /* Determine the filesystem type. */
+ if (__statfs (fd, &fsbuf) < 0)
+ /* not possible, return the default value. */
+ return LINK_MAX;
+
+ switch (fsbuf.f_type)
+ {
+ case EXT2_SUPER_MAGIC:
+ return EXT2_LINK_MAX;
+
+ case MINIX_SUPER_MAGIC:
+ case MINIX_SUPER_MAGIC2:
+ return MINIX_LINK_MAX;
+
+ case MINIX2_SUPER_MAGIC:
+ case MINIX2_SUPER_MAGIC2:
+ return MINIX2_LINK_MAX;
+
+ case XENIX_SUPER_MAGIC:
+ return XENIX_LINK_MAX;
+
+ case SYSV4_SUPER_MAGIC:
+ case SYSV2_SUPER_MAGIC:
+ return SYSV_LINK_MAX;
+
+ case COH_SUPER_MAGIC:
+ return COH_LINK_MAX;
+
+ case UFS_MAGIC:
+ case UFS_CIGAM:
+ return UFS_LINK_MAX;
+
+ default:
+ return LINK_MAX;
+ }
+ }
/* Fallback to the generic version. */
return default_pathconf (path, name);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=96b2e43371301cfda1cca81153a78dd768c7f058
commit 96b2e43371301cfda1cca81153a78dd768c7f058
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 22 14:41:10 1998 +0000
Use __PMT instead of __P for sa_restorer.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 7f72406..435f8e0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/MIPS's sigaction.
- Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ struct sigaction
/* The ABI says here are two unused ints following. */
/* Restore handler. */
- void (*sa_restorer) __P ((void));
+ void (*sa_restorer) __PMT ((void));
#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2
int sa_resv[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4d999254991bc3bc924e9fc8dd7ecb43b6caec5
commit c4d999254991bc3bc924e9fc8dd7ecb43b6caec5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 22 11:17:42 1998 +0000
Wrap assembler macros in #ifdef __ASSEMBLER__.
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index b823b5a..6f0efc0 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,5 +22,9 @@
/* Some definitions to allow the assembler in sysdeps/unix/ to build
without needing ARM-specific versions of all the files. */
+#ifdef __ASSEMBLER__
+
#define ret RETINSTR(mov, pc, r14)
#define MOVE(a,b) mov b,a
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e9b4624add6b1629d13896239b7441d0f75a95b
commit 5e9b4624add6b1629d13896239b7441d0f75a95b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:40:22 1998 +0000
[subdir=signal] (sysdep_routines): Add various rt_* functions.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index e03c31e..b62a871 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -15,3 +15,8 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
CFLAGS-ioperm.c = -Wa,-mev6
endif
+
+ifeq ($(subdir),signal)
+sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
+ rt_sigqueueinfo rt_sigaction rt_sigpending
+endif
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index e65a5c1..cebaa94 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -1,3 +1,8 @@
ifeq ($(subdir),misc)
sysdep_routines += setfsgid setfsuid setresgid setresuid
endif
+
+ifeq ($(subdir),signal)
+sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
+ rt_sigqueueinfo rt_sigaction rt_sigpending
+endif
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 7e46d51..8741550 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -11,3 +11,8 @@ ifeq ($(subdir),elf)
sysdep-others += lddlibc4
install-bin += lddlibc4
endif
+
+ifeq ($(subdir),signal)
+sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
+ rt_sigqueueinfo rt_sigaction rt_sigpending
+endif
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index e6240ea..5d3e280 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -1,4 +1,6 @@
ifeq ($(subdir),signal)
+sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
+ rt_sigqueueinfo rt_sigaction rt_sigpending
#sysdep_routines += sigsuspend
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d40317e33ca89fb96568abf5804af88d795ebd1
commit 1d40317e33ca89fb96568abf5804af88d795ebd1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:28:22 1998 +0000
Add various __syscall_* definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9f002b2..5d89ccb 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -79,3 +79,33 @@ old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLI
# and one for timeval64 entry points
adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index e3fe1d7..b89badf 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -6,8 +6,40 @@ s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setregid setregid setregid 2 __syscall_setregid
s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 5 syscall
vm86 - vm86 1 __vm86 vm86
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 93dec8c..d10a6e8 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -8,6 +8,38 @@ s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setregid setregid setregid 2 __syscall_setregid
s_setresgid setresgid setresgid 3 __syscall_setresgid
s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
+s_ustat ustat ustat 2 __syscall_ustat
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
+sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index b939200..7f3630c 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -41,9 +41,33 @@ getresgid - getresgid 3 getresgid
# There are defined locally because the caller is also defined in this dir.
#
s_llseek llseek _llseek 5 __sys_llseek
+
+# System calls with wrappers.
+rt_sigaction - rt_sigaction 4 __syscall_rt_sigaction
+rt_sigpending - rt_sigpending 2 __syscall_rt_sigpending
+rt_sigprocmask - rt_sigprocmask 4 __syscall_rt_sigprocmask
+rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
+rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
+rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
+s_getcwd getcwd getcwd 2 __syscall_getcwd
+s_getdents getdents getdents 3 __syscall_getdents
+s_getpriority getpriority getpriority 2 __syscall_getpriority
+s_getresgid getresgid getresgid 3 __syscall_getresgid
+s_getresuid getresuid getresuid 3 __syscall_getresuid
+s_poll poll poll 3 __syscall_poll
+s_pread64 pread64 pread 5 __syscall_pread64
+s_ptrace ptrace ptrace 4 __syscall_ptrace
+s_pwrite64 pwrite64 pwrite 5 __syscall_pwrite64
+s_reboot reboot reboot 3 __syscall_reboot
s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_sigpending sigpending sigpending 1 __syscall_sigpending
+s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
+s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_sysctl sysctl _sysctl 1 __syscall__sysctl
s_ustat ustat ustat 2 __syscall_ustat
-sys_mknod xmknod mknod 3 __syscall_mknod
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_readv readv readv 3 __syscall_readv
sys_stat xstat stat 2 __syscall_stat
+sys_writev writev writev 3 __syscall_writev
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90f70b8356aa5bad73c0b13ced1c6d9d5570b2e6
commit 90f70b8356aa5bad73c0b13ced1c6d9d5570b2e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:27:42 1998 +0000
Linux/m68k specific setreuid definition.
diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/sysdeps/unix/sysv/linux/m68k/setreuid.c
new file mode 100644
index 0000000..8ad6122
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setreuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7523f256a83d17d5faf798a1eb046eb1e1a5dc69
commit 7523f256a83d17d5faf798a1eb046eb1e1a5dc69
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:27:37 1998 +0000
Linux/m68k specific setregid definition.
diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/sysdeps/unix/sysv/linux/m68k/setregid.c
new file mode 100644
index 0000000..99c57ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setregid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7471881d52c4ac19b9d74b90873a9c07d19b5a44
commit 7471881d52c4ac19b9d74b90873a9c07d19b5a44
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:14:34 1998 +0000
Linux/ARM implementation of setreuid.
diff --git a/sysdeps/unix/sysv/linux/arm/setreuid.c b/sysdeps/unix/sysv/linux/arm/setreuid.c
new file mode 100644
index 0000000..8ad6122
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setreuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setreuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4189240309f88690f7234267c02b4da1628ed93
commit a4189240309f88690f7234267c02b4da1628ed93
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 21 15:14:29 1998 +0000
Linux/ARM implementation of setregid.
diff --git a/sysdeps/unix/sysv/linux/arm/setregid.c b/sysdeps/unix/sysv/linux/arm/setregid.c
new file mode 100644
index 0000000..99c57ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setregid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setregid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97c1529523bb5cdba82b44a1b2d51d87701876b6
commit 97c1529523bb5cdba82b44a1b2d51d87701876b6
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Oct 21 01:50:21 1998 +0000
* sysdeps/unix/sysv/linux/m68k/setfsuid.c: Add real contents.
* sysdeps/unix/sysv/linux/m68k/syscalls.list: Add s_setfs[ug]id.
diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c
index b478595..a9f22eb 100644
--- a/sysdeps/unix/sysv/linux/m68k/setfsuid.c
+++ b/sysdeps/unix/sysv/linux/m68k/setfsuid.c
@@ -1 +1 @@
-s
+#include <sysdeps/unix/sysv/linux/i386/setfsuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 971c4ee..93dec8c 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -4,6 +4,8 @@ cacheflush EXTRA cacheflush 4 __cacheflush cacheflush
s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
+s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
+s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
s_setresgid setresgid setresgid 3 __syscall_setresgid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e8ad5182b21b654c96f9cf267d370beced8874a
commit 0e8ad5182b21b654c96f9cf267d370beced8874a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 19 14:40:52 1998 +0000
Added setfsgid and setfsuid.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 3adc087..e3fe1d7 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -2,10 +2,12 @@
s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
+s_setfsgid setfsgid setfsgid 1 __syscall_setfsgid
+s_setfsuid setfsuid setfsuid 1 __syscall_setfsuid
s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
-s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setresgid setresgid setresgid 3 __syscall_setresgid
+s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setuid setuid setuid 1 __syscall_setuid
-vm86 - vm86 1 __vm86 vm86
syscall - syscall 5 syscall
+vm86 - vm86 1 __vm86 vm86
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b0a897428a4fab49153db19b4effda19bc25079
commit 2b0a897428a4fab49153db19b4effda19bc25079
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 18 13:05:43 1998 +0000
Wrapper arpund system call with check of parameter value range.
diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/sysdeps/unix/sysv/linux/m68k/setegid.c
new file mode 100644
index 0000000..2e3a54c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setegid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/sysdeps/unix/sysv/linux/m68k/seteuid.c
new file mode 100644
index 0000000..18e41d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/seteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/seteuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setfsgid.c b/sysdeps/unix/sysv/linux/m68k/setfsgid.c
new file mode 100644
index 0000000..0886712
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setfsgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setfsuid.c b/sysdeps/unix/sysv/linux/m68k/setfsuid.c
new file mode 100644
index 0000000..b478595
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setfsuid.c
@@ -0,0 +1 @@
+s
diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/sysdeps/unix/sysv/linux/m68k/setgid.c
new file mode 100644
index 0000000..377021d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/sysdeps/unix/sysv/linux/m68k/setresgid.c
new file mode 100644
index 0000000..daca1a4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/sysdeps/unix/sysv/linux/m68k/setresuid.c
new file mode 100644
index 0000000..3aeabe9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/sysdeps/unix/sysv/linux/m68k/setuid.c
new file mode 100644
index 0000000..de39437
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c220db51b0f2e94198da18d5b76ee520b59bc652
commit c220db51b0f2e94198da18d5b76ee520b59bc652
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:29:19 1998 +0000
Add O_DIRECTORY.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 7cd32a3..e67ad19 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -45,6 +45,7 @@
#ifdef __USE_GNU
# define O_DIRECT 040000 /* Direct disk access. */
+# define O_DIRECTORY 0100000 /* Must be a directory. */
#endif
/* Not necessary, files are always with 64bit off_t. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 0a0d9c9..63e754d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -38,7 +38,11 @@
#define O_EXCL 0x0400 /* not fcntl */
#define O_NOCTTY 0x0800 /* not fcntl */
#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
+#define O_ASYNC 0x1000
+
+#ifdef __USE_GNU
+# define O_DIRECTORY 0x2000 /* Must be a directory. */
+#endif
#define O_NDELAY O_NONBLOCK
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d69f35a8073dd987a12c92ebff0efa7d38ff5464
commit d69f35a8073dd987a12c92ebff0efa7d38ff5464
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:28:36 1998 +0000
Add s_setgid, s_setresuid, s_setresgid, and s_setuid.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index a3ecdd7..3adc087 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -2,6 +2,10 @@
s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
+s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setresgid setresgid setresgid 3 __syscall_setresgid
+s_setuid setuid setuid 1 __syscall_setuid
vm86 - vm86 1 __vm86 vm86
syscall - syscall 5 syscall
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 473c2ec..971c4ee 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -4,4 +4,8 @@ cacheflush EXTRA cacheflush 4 __cacheflush cacheflush
s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
+s_setgid setgid setgid 1 __syscall_setgid
s_setgroups setgroups setgroups 2 __syscall_setgroups
+s_setresgid setresgid setresgid 3 __syscall_setresgid
+s_setresuid setresuid setresuid 3 __syscall_setresuid
+s_setuid setuid setuid 1 __syscall_setuid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f858fcedc84c1bf718069d4468a555acbf288093
commit f858fcedc84c1bf718069d4468a555acbf288093
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:28:05 1998 +0000
[subdir=misc] (sysdep_routines): Add setfsgid, setfsuid, setresgid,
and setresuid.
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 71cee22..7e46d51 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -3,7 +3,7 @@
m68k-syntax-flag = -DMOTOROLA_SYNTAX
ifeq ($(subdir),misc)
-sysdep_routines += mremap
+sysdep_routines += mremap setfsgid setfsuid setresgid setresuid
sysdep_headers += sys/reg.h
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b88a94ba8202c47913c17af211f9f1d721afd3b2
commit b88a94ba8202c47913c17af211f9f1d721afd3b2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:54 1998 +0000
Wrapper around setuid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setuid.c b/sysdeps/unix/sysv/linux/arm/setuid.c
new file mode 100644
index 0000000..de39437
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=176f971960d5f1d35c21a77da0a08f60798e2f6e
commit 176f971960d5f1d35c21a77da0a08f60798e2f6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:49 1998 +0000
Wrapper around setresuid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setresuid.c b/sysdeps/unix/sysv/linux/arm/setresuid.c
new file mode 100644
index 0000000..3aeabe9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setresuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5978cf827311bdc89c8a388470d15430d924613a
commit 5978cf827311bdc89c8a388470d15430d924613a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:45 1998 +0000
Wrapper around setresgid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setresgid.c b/sysdeps/unix/sysv/linux/arm/setresgid.c
new file mode 100644
index 0000000..daca1a4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setresgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setresgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=111397630d86619663af641006a503c5a363f4af
commit 111397630d86619663af641006a503c5a363f4af
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:38 1998 +0000
Wrapper around setgroups syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setgroups.c b/sysdeps/unix/sysv/linux/arm/setgroups.c
new file mode 100644
index 0000000..0e70862
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/setgroups.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b86b54f476fd19cd35a2c5c405d9ac78f44f8cba
commit b86b54f476fd19cd35a2c5c405d9ac78f44f8cba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:31 1998 +0000
Wrapper around setgid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setgid.c b/sysdeps/unix/sysv/linux/arm/setgid.c
new file mode 100644
index 0000000..377021d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0047c441ae568f67ae66289b8d96d923d5de6b1f
commit 0047c441ae568f67ae66289b8d96d923d5de6b1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:24 1998 +0000
Wrapper around setfsuid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setfsuid.c b/sysdeps/unix/sysv/linux/arm/setfsuid.c
new file mode 100644
index 0000000..a9f22eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setfsuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1491b35b3f944df7cfbb8fa9274c647ca21497d
commit b1491b35b3f944df7cfbb8fa9274c647ca21497d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:18 1998 +0000
Wrapper around setfsgid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setfsgid.c b/sysdeps/unix/sysv/linux/arm/setfsgid.c
new file mode 100644
index 0000000..0886712
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setfsgid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setfsgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed2acf85b133408629037f507137d4b36683c893
commit ed2acf85b133408629037f507137d4b36683c893
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:08 1998 +0000
Wrapper around setugid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/seteuid.c b/sysdeps/unix/sysv/linux/arm/seteuid.c
new file mode 100644
index 0000000..18e41d0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/seteuid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/seteuid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32f8b0679c49a3fb9d7489f681d9f058885dbef0
commit 32f8b0679c49a3fb9d7489f681d9f058885dbef0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:21:03 1998 +0000
Wrapper around setegid syscall to check for value range.
diff --git a/sysdeps/unix/sysv/linux/arm/setegid.c b/sysdeps/unix/sysv/linux/arm/setegid.c
new file mode 100644
index 0000000..2e3a54c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/setegid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/setegid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a12df66acfea09aa977a5994f9edc50acdb67db
commit 4a12df66acfea09aa977a5994f9edc50acdb67db
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 16 16:18:30 1998 +0000
Linux/Arm specific makefile.
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
new file mode 100644
index 0000000..e65a5c1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),misc)
+sysdep_routines += setfsgid setfsuid setresgid setresuid
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a9821445a86881fd34da168568e8657ef1e9934
commit 6a9821445a86881fd34da168568e8657ef1e9934
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 15 10:45:34 1998 +0000
Add bits/armsigctx.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 3217436..16bbb3e 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,2 +1,3 @@
clone.S
init-first.h
+bits/armsigctx.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=edb87b12b3127a9bd1e60fed1f25cd73df618f9d
commit edb87b12b3127a9bd1e60fed1f25cd73df618f9d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 15 09:21:29 1998 +0000
Remove __kernel_termios again. Use char[44] to define size of the struct.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
index 7096b5a..7c1e0f7 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -20,35 +20,18 @@
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
#endif
-/* Get the necessary definitions. */
-#include <termios.h>
-
/* Use the definitions from the kernel header files. */
#include <asm/ioctls.h>
-/* We need the kernel definition of the `termios' struct. */
-#define __KERNEL_NCCS 19
-struct __kernel_termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
- cc_t c_line; /* line discipline */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
- };
-
/* Oh well, this is necessary since the kernel data structure is
different from the user-level version. */
#undef TCGETS
#undef TCSETS
#undef TCSETSW
#undef TCSETSF
-#define TCGETS _IOR ('t', 19, struct __kernel_termios)
-#define TCSETS _IOW ('t', 20, struct __kernel_termios)
-#define TCSETSW _IOW ('t', 21, struct __kernel_termios)
-#define TCSETSF _IOW ('t', 22, struct __kernel_termios)
+#define TCGETS _IOR ('t', 19, char[44])
+#define TCSETS _IOW ('t', 20, char[44])
+#define TCSETSW _IOW ('t', 21, char[44])
+#define TCSETSF _IOW ('t', 22, char[44])
#include <linux/sockios.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a7077ca4f24a420d0b29b3f5d3d2d6272fe20dab
commit a7077ca4f24a420d0b29b3f5d3d2d6272fe20dab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 15 07:50:31 1998 +0000
Include termios.h to have all types defined.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
index a30035c..7096b5a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -20,6 +20,9 @@
# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
#endif
+/* Get the necessary definitions. */
+#include <termios.h>
+
/* Use the definitions from the kernel header files. */
#include <asm/ioctls.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa03e7a0ebc77c0bf5a306aee626cb8cd4046179
commit fa03e7a0ebc77c0bf5a306aee626cb8cd4046179
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 14 12:59:04 1998 +0000
Define __kernel_termios here instead of including kernel_termios.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
index dcbf9f4..a30035c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -22,7 +22,20 @@
/* Use the definitions from the kernel header files. */
#include <asm/ioctls.h>
-#include <kernel_termios.h>
+
+/* We need the kernel definition of the `termios' struct. */
+#define __KERNEL_NCCS 19
+struct __kernel_termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_line; /* line discipline */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
/* Oh well, this is necessary since the kernel data structure is
different from the user-level version. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3afb0fffac2cb4bc298db8aff82560c09fff717
commit f3afb0fffac2cb4bc298db8aff82560c09fff717
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 13 16:25:31 1998 +0000
(inline_outb): Fix output parameter format string.
(inline_outw): Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 83c4ec2..bd642e3 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -206,7 +206,7 @@ inline_outb (unsigned char b, unsigned long int port, iosys_t iosys)
unsigned long int addr = port_to_cpu_addr (port, iosys, 1);
inline_sethae (0, iosys);
- asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
+ asm ("insbl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
*(vuip)addr = w;
mb ();
}
@@ -219,7 +219,7 @@ inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
unsigned long int addr = port_to_cpu_addr (port, iosys, 2);
inline_sethae (0, iosys);
- asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
+ asm ("inswl %2,%1,%0" : "=r" (w) : "ri" (port & 0x3), "r" (b));
*(vuip)addr = w;
mb ();
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9230582571ad6795f6e220afa4d89f44981c2814
commit 9230582571ad6795f6e220afa4d89f44981c2814
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 12 12:56:56 1998 +0000
(CFLAGS-ioperm.c): New variable to prevent warnings from use of modern CPU
instructions.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index fbbc56e..e03c31e 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -12,4 +12,6 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
osf_getrusage osf_wait4 old_adjtimex
+
+CFLAGS-ioperm.c = -Wa,-mev6
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86ffa1b43a5f7b4ff5a639090e2d320b3ca4990d
commit 86ffa1b43a5f7b4ff5a639090e2d320b3ca4990d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 12 11:15:04 1998 +0000
(PSEUDO): Add missing semicolon so that profiling works.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 381ce26..5972aba 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -49,8 +49,8 @@
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
- .type syscall_error,%function ; \
- ENTRY (name) \
+ .type syscall_error,%function; \
+ ENTRY (name); \
DO_CALL (args, syscall_name); \
cmn r0, $4096; \
bhs PLTJMP(C_SYMBOL_NAME(__syscall_error));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33b59efe6cff67ef7a495d43161b3e9703909692
commit 33b59efe6cff67ef7a495d43161b3e9703909692
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 9 11:22:07 1998 +0000
Define PT_EI as extern inline is not yet defined. Use PT_EI in extern
inline definitions.
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
index 0b9bc01..d4dc4c4 100644
--- a/sysdeps/arm/linuxthreads/pt-machine.h
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -1,6 +1,6 @@
/* Machine-dependent pthreads configuration and inline functions.
ARM version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>.
@@ -19,13 +19,17 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef PT_EI
+# define PT_EI extern inline
+#endif
+
/* This will not work on ARM1 or ARM2 because SWP is lacking on those
machines. Unfortunately we have no way to detect this at compile
time; let's hope nobody tries to use one. */
/* Spinlock implementation; required. */
-extern inline int
+PT_EI int
testandset (int *spinlock)
{
register unsigned int ret;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d856c1629105486911ea72da0e765a1914265158
commit d856c1629105486911ea72da0e765a1914265158
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 9 10:50:29 1998 +0000
Definition of sigcontext for 2.0 and 2.1 kernels.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
new file mode 100644
index 0000000..395e194
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/bits/armsigctx.h
@@ -0,0 +1,59 @@
+/* Definition of `struct sigcontext' for Linux/ARM
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
+ Fortunately 2.0 puts a magic number in the first word and this is not
+ a legal value for `trap_no', so we can tell them apart. */
+
+union k_sigcontext
+ {
+ struct
+ {
+ unsigned long int trap_no;
+ unsigned long int error_code;
+ unsigned long int oldmask;
+ unsigned long int arm_r0;
+ unsigned long int arm_r1;
+ unsigned long int arm_r2;
+ unsigned long int arm_r3;
+ unsigned long int arm_r4;
+ unsigned long int arm_r5;
+ unsigned long int arm_r6;
+ unsigned long int arm_r7;
+ unsigned long int arm_r8;
+ unsigned long int arm_r9;
+ unsigned long int arm_r10;
+ unsigned long int arm_fp;
+ unsigned long int arm_ip;
+ unsigned long int arm_sp;
+ unsigned long int arm_lr;
+ unsigned long int arm_pc;
+ unsigned long int arm_cpsr;
+ } v21;
+ struct
+ {
+ unsigned long int magic;
+ struct pt_regs reg;
+ unsigned long int trap_no;
+ unsigned long int error_code;
+ unsigned long int oldmask;
+ } v20;
+};
+
+#define SIGCONTEXT_2_0_MAGIC 0x4B534154
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e205b76dd77eb84676441629ca63d14d6d706536
commit e205b76dd77eb84676441629ca63d14d6d706536
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 9 10:50:14 1998 +0000
Add support for version 2.0 kernels.
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
index 1b948ab..015780c 100644
--- a/sysdeps/unix/sysv/linux/arm/register-dump.h
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -20,6 +20,7 @@
#include <sys/uio.h>
#include <stdio-common/_itoa.h>
+#include <bits/armsigctx.h>
/* We will print the register dump in this format:
@@ -43,7 +44,7 @@ hexvalue (unsigned long int value, char *buf, size_t len)
}
static void
-register_dump (int fd, struct sigcontext *ctx)
+register_dump (int fd, union k_sigcontext *ctx)
{
char regs[20][8];
struct iovec iov[97];
@@ -59,26 +60,52 @@ register_dump (int fd, struct sigcontext *ctx)
++nr
/* Generate strings of register contents. */
- hexvalue (ctx->arm_r0, regs[0], 8);
- hexvalue (ctx->arm_r1, regs[1], 8);
- hexvalue (ctx->arm_r2, regs[2], 8);
- hexvalue (ctx->arm_r3, regs[3], 8);
- hexvalue (ctx->arm_r4, regs[4], 8);
- hexvalue (ctx->arm_r5, regs[5], 8);
- hexvalue (ctx->arm_r6, regs[6], 8);
- hexvalue (ctx->arm_r7, regs[7], 8);
- hexvalue (ctx->arm_r8, regs[8], 8);
- hexvalue (ctx->arm_r9, regs[9], 8);
- hexvalue (ctx->arm_r10, regs[10], 4);
- hexvalue (ctx->arm_fp, regs[11], 4);
- hexvalue (ctx->arm_ip, regs[12], 4);
- hexvalue (ctx->arm_sp, regs[13], 4);
- hexvalue (ctx->arm_lr, regs[14], 4);
- hexvalue (ctx->arm_pc, regs[15], 4);
- hexvalue (ctx->arm_cpsr, regs[16], 8);
- hexvalue (ctx->trap_no, regs[17], 8);
- hexvalue (ctx->error_code, regs[18], 8);
- hexvalue (ctx->old_mask, regs[19], 8);
+ if (ctx->v20.magic == SIGCONTEXT_2_0_MAGIC)
+ {
+ hexvalue (ctx->v20.reg.ARM_r0, regs[0], 8);
+ hexvalue (ctx->v20.reg.ARM_r1, regs[1], 8);
+ hexvalue (ctx->v20.reg.ARM_r2, regs[2], 8);
+ hexvalue (ctx->v20.reg.ARM_r3, regs[3], 8);
+ hexvalue (ctx->v20.reg.ARM_r4, regs[4], 8);
+ hexvalue (ctx->v20.reg.ARM_r5, regs[5], 8);
+ hexvalue (ctx->v20.reg.ARM_r6, regs[6], 8);
+ hexvalue (ctx->v20.reg.ARM_r7, regs[7], 8);
+ hexvalue (ctx->v20.reg.ARM_r8, regs[8], 8);
+ hexvalue (ctx->v20.reg.ARM_r9, regs[9], 8);
+ hexvalue (ctx->v20.reg.ARM_r10, regs[10], 4);
+ hexvalue (ctx->v20.reg.ARM_fp, regs[11], 4);
+ hexvalue (ctx->v20.reg.ARM_ip, regs[12], 4);
+ hexvalue (ctx->v20.reg.ARM_sp, regs[13], 4);
+ hexvalue (ctx->v20.reg.ARM_lr, regs[14], 4);
+ hexvalue (ctx->v20.reg.ARM_pc, regs[15], 4);
+ hexvalue (ctx->v20.reg.ARM_cpsr, regs[16], 8);
+ hexvalue (ctx->v20.trap_no, regs[17], 8);
+ hexvalue (ctx->v20.error_code, regs[18], 8);
+ hexvalue (ctx->v20.oldmask, regs[19], 8);
+ }
+ else
+ {
+ hexvalue (ctx->v21.arm_r0, regs[0], 8);
+ hexvalue (ctx->v21.arm_r1, regs[1], 8);
+ hexvalue (ctx->v21.arm_r2, regs[2], 8);
+ hexvalue (ctx->v21.arm_r3, regs[3], 8);
+ hexvalue (ctx->v21.arm_r4, regs[4], 8);
+ hexvalue (ctx->v21.arm_r5, regs[5], 8);
+ hexvalue (ctx->v21.arm_r6, regs[6], 8);
+ hexvalue (ctx->v21.arm_r7, regs[7], 8);
+ hexvalue (ctx->v21.arm_r8, regs[8], 8);
+ hexvalue (ctx->v21.arm_r9, regs[9], 8);
+ hexvalue (ctx->v21.arm_r10, regs[10], 4);
+ hexvalue (ctx->v21.arm_fp, regs[11], 4);
+ hexvalue (ctx->v21.arm_ip, regs[12], 4);
+ hexvalue (ctx->v21.arm_sp, regs[13], 4);
+ hexvalue (ctx->v21.arm_lr, regs[14], 4);
+ hexvalue (ctx->v21.arm_pc, regs[15], 4);
+ hexvalue (ctx->v21.arm_cpsr, regs[16], 8);
+ hexvalue (ctx->v21.trap_no, regs[17], 8);
+ hexvalue (ctx->v21.error_code, regs[18], 8);
+ hexvalue (ctx->v21.oldmask, regs[19], 8);
+ }
/* Generate the output. */
ADD_STRING ("Register dump:\n\n R0: ");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7817d752ae5f57c0e737a5994714e12d22a462d6
commit 7817d752ae5f57c0e737a5994714e12d22a462d6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 9 10:50:07 1998 +0000
Move definition of sigcontext union to bits/armsigctx.h.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index 0d5024f..55a11bd 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -19,51 +19,13 @@
#include <signal.h>
#include <asm/ptrace.h>
-
-union k_sigcontext
- {
- struct
- {
- unsigned long int trap_no;
- unsigned long int error_code;
- unsigned long int oldmask;
- unsigned long int arm_r0;
- unsigned long int arm_r1;
- unsigned long int arm_r2;
- unsigned long int arm_r3;
- unsigned long int arm_r4;
- unsigned long int arm_r5;
- unsigned long int arm_r6;
- unsigned long int arm_r7;
- unsigned long int arm_r8;
- unsigned long int arm_r9;
- unsigned long int arm_r10;
- unsigned long int arm_fp;
- unsigned long int arm_ip;
- unsigned long int arm_sp;
- unsigned long int arm_lr;
- unsigned long int arm_pc;
- unsigned long int arm_cpsr;
- } v21;
- struct
- {
- unsigned long int magic;
- struct pt_regs reg;
- unsigned long int trap_no;
- unsigned long int error_code;
- unsigned long int oldmask;
- } v20;
-};
+#include <bits/armsigctx.h>
void
profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc)
{
- /* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
- Fortunately 2.0 puts a magic number in the first word and this is not
- a legal value for `trap_no', so we can tell them apart. */
-
void *pc;
- if (sc.v20.magic == 0x4B534154)
+ if (sc.v20.magic == SIGCONTEXT_2_0_MAGIC)
pc = (void *) sc.v20.reg.ARM_pc;
else
pc = (void *) sc.v21.arm_pc;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8d236a8b7e0d16513e32a6419f282dab58debc2
commit a8d236a8b7e0d16513e32a6419f282dab58debc2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 8 13:09:39 1998 +0000
(platform): Add missing Ruffian entry.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 26d976e..83c4ec2 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -66,14 +66,72 @@
#define CIA_SPARSE_MEM (0xfffffc8000000000UL)
#define CIA_DENSE_MEM (0xfffffc8600000000UL)
+/* SABLE is EV4, GAMMA is EV5 */
#define T2_IO_BASE (0xfffffc03a0000000UL)
#define T2_SPARSE_MEM (0xfffffc0200000000UL)
#define T2_DENSE_MEM (0xfffffc03c0000000UL)
+#define GAMMA_IO_BASE (0xfffffc83a0000000UL)
+#define GAMMA_SPARSE_MEM (0xfffffc8200000000UL)
+#define GAMMA_DENSE_MEM (0xfffffc83c0000000UL)
+
+/* these are for the RAWHIDE family */
+#define MCPCIA_IO_BASE (0xfffffcf980000000UL)
+#define MCPCIA_SPARSE_MEM (0xfffffcf800000000UL)
+#define MCPCIA_DENSE_MEM (0xfffffcf900000000UL)
+
+/* Tsunami has no SPARSE space */
+/* NOTE: these are hardwired to PCI bus 0 addresses!!! */
+/* Also, these are PHYSICAL, as/so there's no KSEG translation */
+#define TSUNAMI_IO_BASE (0x00000801fc000000UL + 0xfffffc0000000000UL)
+#define TSUNAMI_DENSE_MEM (0x0000080000000000UL + 0xfffffc0000000000UL)
+
typedef enum {
- IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2
+ IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2,
+ IOSYS_TSUNAMI, IOSYS_MCPCIA, IOSYS_GAMMA, IOSYS_CPUDEP
} iosys_t;
+static struct io_system {
+ int hae_shift;
+ unsigned long int bus_memory_base;
+ unsigned long int sparse_bus_mem_base;
+ unsigned long int bus_io_base;
+} io_system[] = { /* NOTE! must match iosys_t enumeration */
+/* UNKNOWN */ {0, 0, 0, 0},
+/* JENSEN */ {7, 0, JENSEN_SPARSE_MEM, JENSEN_IO_BASE},
+/* APECS */ {5, APECS_DENSE_MEM, APECS_SPARSE_MEM, APECS_IO_BASE},
+/* CIA */ {5, CIA_DENSE_MEM, CIA_SPARSE_MEM, CIA_IO_BASE},
+/* T2 */ {5, T2_DENSE_MEM, T2_SPARSE_MEM, T2_IO_BASE},
+/* TSUNAMI */ {0, TSUNAMI_DENSE_MEM, 0, TSUNAMI_IO_BASE},
+/* MCPCIA */ {5, MCPCIA_DENSE_MEM, MCPCIA_SPARSE_MEM, MCPCIA_IO_BASE},
+/* GAMMA */ {5, GAMMA_DENSE_MEM, GAMMA_SPARSE_MEM, GAMMA_IO_BASE},
+/* CPUDEP */ {0, 0, 0, 0},
+};
+
+static struct platform {
+ const char *name;
+ iosys_t io_sys;
+} platform[] = {
+ {"Alcor", IOSYS_CIA},
+ {"Avanti", IOSYS_APECS},
+ {"XL", IOSYS_APECS},
+ {"Cabriolet", IOSYS_APECS},
+ {"EB164", IOSYS_CIA},
+ {"EB64+", IOSYS_APECS},
+ {"EB66", IOSYS_APECS},
+ {"EB66P", IOSYS_APECS},
+ {"Jensen", IOSYS_JENSEN},
+ {"Mikasa", IOSYS_CPUDEP},
+ {"Noritake", IOSYS_CPUDEP},
+ {"Noname", IOSYS_APECS},
+ {"Sable", IOSYS_CPUDEP},
+ {"Miata", IOSYS_CIA},
+ {"Tsunami", IOSYS_TSUNAMI},
+ {"Rawhide", IOSYS_MCPCIA},
+ {"Ruffian", IOSYS_CIA},
+ {"Takara", IOSYS_CIA},
+};
+
struct ioswtch {
void (*sethae)(unsigned long int addr);
void (*outb)(unsigned char b, unsigned long int port);
@@ -84,30 +142,6 @@ struct ioswtch {
unsigned int (*inl)(unsigned long int port);
};
-static struct platform {
- const char *name;
- int io_sys;
- iosys_t hae_shift;
- unsigned long int bus_memory_base;
- unsigned long int sparse_bus_memory_base;
-} platform[] = {
- {"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
- {"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Cabriolet", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB164", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
- {"EB64+", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB66", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB66P", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Jensen", IOSYS_JENSEN, 7, 0, JENSEN_SPARSE_MEM},
- {"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM},
- {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
- {"Ruffian", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
-};
-
-
static struct {
struct hae {
unsigned long int cache;
@@ -130,6 +164,8 @@ port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size)
{
if (iosys == IOSYS_JENSEN)
return (port << 7) + ((size - 1) << 5) + io.base;
+ else if (iosys == IOSYS_TSUNAMI)
+ return port + io.base;
else
return (port << 5) + ((size - 1) << 3) + io.base;
}
@@ -194,9 +230,6 @@ inline_outl (unsigned int b, unsigned long int port, iosys_t iosys)
{
unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
- if (port >= MAX_PORT)
- return;
-
inline_sethae (0, iosys);
*(vuip)addr = b;
mb ();
@@ -236,8 +269,77 @@ inline_inl (unsigned long int port, iosys_t iosys)
return *(vuip) addr;
}
+/*
+ * Now define the inline functions for CPUs supporting byte/word insns,
+ * and whose core logic supports I/O space accesses utilizing them.
+ *
+ * These routines could be used by MIATA, for example, because it has
+ * and EV56 plus PYXIS, but it currently uses SPARSE anyway.
+ *
+ * These routines are necessary for TSUNAMI/TYPHOON based platforms,
+ * which will have (at least) EV6.
+ */
+
+static inline void
+inline_bwx_outb (unsigned char b, unsigned long int port, iosys_t iosys)
+{
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+
+ __asm__ __volatile__ ("stb %1,%0" : : "m"(*(unsigned char *)addr), "r"(b));
+ mb ();
+}
+
+
+static inline void
+inline_bwx_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
+{
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+
+ __asm__ __volatile__ ("stw %1,%0" : : "m"(*(unsigned short *)addr), "r"(b));
+ mb ();
+}
+
+
+static inline void
+inline_bwx_outl (unsigned int b, unsigned long int port, iosys_t iosys)
+{
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
-#define DCL_SETHAE(name, iosys) \
+ *(vuip)addr = b;
+ mb ();
+}
+
+
+static inline unsigned int
+inline_bwx_inb (unsigned long int port, iosys_t iosys)
+{
+ unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1);
+
+ __asm__ __volatile__ ("ldbu %0,%1" : "=r"(r) : "m"(*(unsigned char *)addr));
+ return 0xffUL & r;
+}
+
+
+static inline unsigned int
+inline_bwx_inw (unsigned long int port, iosys_t iosys)
+{
+ unsigned long int r, addr = port_to_cpu_addr (port, iosys, 1);
+
+ __asm__ __volatile__ ("ldwu %0,%1" : "=r"(r) : "m"(*(unsigned short *)addr));
+ return 0xffffUL & r;
+}
+
+
+static inline unsigned int
+inline_bwx_inl (unsigned long int port, iosys_t iosys)
+{
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
+
+ return *(vuip) addr;
+}
+
+
+#define DCL_SETHAE(name, iosys) \
static void \
name##_sethae (unsigned long int addr) \
{ \
@@ -259,6 +361,28 @@ name##_##func (unsigned long int addr) \
return inline_##func (addr, IOSYS_##iosys); \
}
+#define DCL_SETHAE_IGNORE(name, iosys) \
+static void \
+name##_sethae (unsigned long int addr) \
+{ \
+/* do nothing */ \
+}
+
+#define DCL_OUT_BWX(name, func, type, iosys) \
+static void \
+name##_##func (unsigned type b, unsigned long int addr) \
+{ \
+ inline_bwx_##func (b, addr, IOSYS_##iosys); \
+}
+
+
+#define DCL_IN_BWX(name, func, iosys) \
+static unsigned int \
+name##_##func (unsigned long int addr) \
+{ \
+ return inline_bwx_##func (addr, IOSYS_##iosys); \
+}
+
DCL_SETHAE(jensen, JENSEN)
DCL_OUT(jensen, outb, char, JENSEN)
@@ -279,7 +403,15 @@ DCL_IN(apecs, inb, APECS)
DCL_IN(apecs, inw, APECS)
DCL_IN(apecs, inl, APECS)
-struct ioswtch ioswtch[] = {
+DCL_SETHAE_IGNORE(tsunami, TSUNAMI)
+DCL_OUT_BWX(tsunami, outb, char, TSUNAMI)
+DCL_OUT_BWX(tsunami, outw, short int, TSUNAMI)
+DCL_OUT_BWX(tsunami, outl, int, TSUNAMI)
+DCL_IN_BWX(tsunami, inb, TSUNAMI)
+DCL_IN_BWX(tsunami, inw, TSUNAMI)
+DCL_IN_BWX(tsunami, inl, TSUNAMI)
+
+static struct ioswtch ioswtch[] = {
{
jensen_sethae,
jensen_outb, jensen_outw, jensen_outl,
@@ -289,6 +421,11 @@ struct ioswtch ioswtch[] = {
apecs_sethae,
apecs_outb, apecs_outw, apecs_outl,
apecs_inb, apecs_inw, apecs_inl
+ },
+ {
+ tsunami_sethae,
+ tsunami_outb, tsunami_outw, tsunami_outl,
+ tsunami_inb, tsunami_inw, tsunami_inl
}
};
@@ -358,12 +495,54 @@ init_iosys (void)
{
if (strcmp (platform[i].name, systype) == 0)
{
- io.hae_shift = platform[i].hae_shift;
- io.bus_memory_base = platform[i].bus_memory_base;
- io.sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
io.sys = platform[i].io_sys;
+ /* some platforms can have either EV4 or EV5 CPUs */
+ if (io.sys == IOSYS_CPUDEP)
+ {
+ FILE * fp;
+ char cputype[256];
+ fp = fopen (PATH_CPUINFO, "r");
+ if (fp == NULL)
+ return -1;
+ while ((n = fscanf (fp, "cpu model : %256[^\n]\n", cputype))
+ != EOF
+ && n != 1)
+ fgets (cputype, 256, fp);
+
+ fclose (fp);
+
+ if (strcmp (platform[i].name, "Sable") == 0)
+ {
+ if (strncmp (cputype, "EV4", 3) == 0)
+ io.sys = IOSYS_T2;
+ else if (strncmp (cputype, "EV5", 3) == 0)
+ io.sys = IOSYS_GAMMA;
+ }
+ else
+ {
+ if (strncmp (cputype, "EV4", 3) == 0)
+ io.sys = IOSYS_APECS;
+ else if (strncmp (cputype, "EV5", 3) == 0)
+ io.sys = IOSYS_CIA;
+ }
+ if (n == EOF || io.sys == IOSYS_CPUDEP)
+ {
+ /* This can happen if the format of /proc/cpuinfo changes.*/
+ fprintf (stderr, "ioperm.init_iosys(): Unable to determine"
+ " CPU model.\n");
+ __set_errno (ENODEV);
+ return -1;
+ }
+ }
+ io.hae_shift = io_system[io.sys].hae_shift;
+ io.bus_memory_base = io_system[io.sys].bus_memory_base;
+ io.sparse_bus_memory_base = io_system[io.sys].sparse_bus_mem_base;
+ io.io_base = io_system[io.sys].bus_io_base;
+
if (io.sys == IOSYS_JENSEN)
io.swp = &ioswtch[0];
+ else if (io.sys == IOSYS_TSUNAMI)
+ io.swp = &ioswtch[2];
else
io.swp = &ioswtch[1];
return 0;
@@ -396,32 +575,22 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
if (!io.base)
{
- unsigned long int base;
int fd;
io.hae.reg = 0; /* not used in user-level */
io.hae.cache = 0;
- __sethae (io.hae.cache); /* synchronize with hw */
+ if (io.sys != IOSYS_TSUNAMI)
+ __sethae (io.hae.cache); /* synchronize with hw */
fd = open ("/dev/mem", O_RDWR);
if (fd < 0)
- return fd;
+ return -1;
- switch (io.sys)
- {
- case IOSYS_UNKNOWN: base = io.io_base; break;
- case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
- case IOSYS_APECS: base = APECS_IO_BASE; break;
- case IOSYS_CIA: base = CIA_IO_BASE; break;
- default:
- __set_errno (ENODEV);
- return -1;
- }
- addr = port_to_cpu_addr (0, io.sys, 1);
+ addr = port_to_cpu_addr (0, io.sys, 1);
len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
io.base =
(unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
- fd, base);
+ fd, io.io_base);
close (fd);
if ((long) io.base == -1)
return -1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=641d7074001bd7c4dd0f90f32a8c06390c942e00
commit 641d7074001bd7c4dd0f90f32a8c06390c942e00
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Oct 7 02:02:53 1998 +0000
* sysdeps/m68k/dl-machine.h (RTLD_START): Fix clearing startup
flag.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 88fcd1f..067c2fb 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -203,7 +203,7 @@ _dl_start_user:
| Loop to call _dl_init_next for the next initializer.
jra 0b
1: | Clear the startup flag.
- clr.l _dl_starting_up@GOT.w(%a5)
+ clr.l ([_dl_starting_up@GOT.w, %a5])
| Pass our finalizer function to the user in %a1.
move.l _dl_fini@GOT.w(%a5), %a1
| Initialize %fp with the stack pointer.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=604791b664bc91309a40f69d3b47c8c0face1a86
commit 604791b664bc91309a40f69d3b47c8c0face1a86
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 5 13:39:33 1998 +0000
ARM specific hugeval definition.
diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h
new file mode 100644
index 0000000..0e07bd5
--- /dev/null
+++ b/sysdeps/arm/bits/huge_val.h
@@ -0,0 +1,88 @@
+/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ ARM version.
+ Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+#include <features.h>
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+
+#ifdef __GNUC__
+
+# define HUGE_VAL \
+ (__extension__ \
+ ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \
+ { __l: 0x000000007ff00000ULL }).__d)
+
+#else /* not GCC */
+
+# include <endian.h>
+
+typedef union { unsigned char __c[8]; double __d; } __huge_val_t;
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }
+# endif
+
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+# define HUGE_VAL (__huge_val.__d)
+
+#endif /* GCC. */
+
+
+/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+
+#ifdef __USE_ISOC9X
+
+# ifdef __GNUC__
+
+# define HUGE_VALF \
+ (__extension__ \
+ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \
+ { __l: 0x7f800000UL }).__d)
+
+# else /* not GCC */
+
+typedef union { unsigned char __c[4]; float __f; } __huge_valf_t;
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
+# endif
+# if __BYTE_ORDER == __LITTLE_ENDIAN
+# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
+# endif
+
+static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
+# define HUGE_VALF (__huge_valf.__f)
+
+# endif /* GCC. */
+
+
+/* Generally there is no separate `long double' format and it is the
+ same as `double'. */
+# define HUGE_VALL HUGE_VAL
+
+#endif /* __USE_ISOC9X. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f036f1a9bc28b0b873054034355c390a63644a09
commit f036f1a9bc28b0b873054034355c390a63644a09
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 5 13:39:21 1998 +0000
Fix typo in last change.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index b0f364f..66ab4c6 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -315,7 +315,7 @@ _dl_start_user:
.word _dl_fini(GOT)
.L_STACK_END:
.word __libc_stack_end(GOT)
-.L_MAIN_SEARCHLIST
+.L_MAIN_SEARCHLIST:
.word _dl_main_searchlist(GOT)
.previous\n\
");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa858214167518b935d3a42996ff34aba8a0ed37
commit fa858214167518b935d3a42996ff34aba8a0ed37
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 1 14:30:44 1998 +0000
Cope with fussy assembler.
diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S
index 25ba6b3..2972ff6 100644
--- a/sysdeps/arm/fpu/__longjmp.S
+++ b/sysdeps/arm/fpu/__longjmp.S
@@ -30,7 +30,7 @@ ENTRY (__longjmp)
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
- lfmia f4, 4, [ip] ! /* load the floating point regs */
+ lfmfd f4, 4, [ip] ! /* load the floating point regs */
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5432e2896eb8433055e9d594f19c8e35ffcda96
commit e5432e2896eb8433055e9d594f19c8e35ffcda96
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 1 14:30:25 1998 +0000
Register content dump function.
diff --git a/sysdeps/unix/sysv/linux/arm/register-dump.h b/sysdeps/unix/sysv/linux/arm/register-dump.h
new file mode 100644
index 0000000..1b948ab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/register-dump.h
@@ -0,0 +1,132 @@
+/* Dump registers.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <pb@nexus.co.uk>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/uio.h>
+#include <stdio-common/_itoa.h>
+
+/* We will print the register dump in this format:
+
+ R0: XXXXXXXX R1: XXXXXXXX R2: XXXXXXXX R3: XXXXXXXX
+ R4: XXXXXXXX R5: XXXXXXXX R6: XXXXXXXX R7: XXXXXXXX
+ R8: XXXXXXXX R9: XXXXXXXX SL: XXXXXXXX FP: XXXXXXXX
+ IP: XXXXXXXX SP: XXXXXXXX LR: XXXXXXXX PC: XXXXXXXX
+
+ CPSR: XXXXXXXX
+
+ Trap: XXXXXXXX Error: XXXXXXXX OldMask: XXXXXXXX
+
+ */
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+ char *cp = _itoa_word (value, buf + len, 16, 0);
+ while (cp > buf)
+ *--cp = '0';
+}
+
+static void
+register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[20][8];
+ struct iovec iov[97];
+ size_t nr = 0;
+
+#define ADD_STRING(str) \
+ iov[nr].iov_base = (char *) str; \
+ iov[nr].iov_len = strlen (str); \
+ ++nr
+#define ADD_MEM(str, len) \
+ iov[nr].iov_base = str; \
+ iov[nr].iov_len = len; \
+ ++nr
+
+ /* Generate strings of register contents. */
+ hexvalue (ctx->arm_r0, regs[0], 8);
+ hexvalue (ctx->arm_r1, regs[1], 8);
+ hexvalue (ctx->arm_r2, regs[2], 8);
+ hexvalue (ctx->arm_r3, regs[3], 8);
+ hexvalue (ctx->arm_r4, regs[4], 8);
+ hexvalue (ctx->arm_r5, regs[5], 8);
+ hexvalue (ctx->arm_r6, regs[6], 8);
+ hexvalue (ctx->arm_r7, regs[7], 8);
+ hexvalue (ctx->arm_r8, regs[8], 8);
+ hexvalue (ctx->arm_r9, regs[9], 8);
+ hexvalue (ctx->arm_r10, regs[10], 4);
+ hexvalue (ctx->arm_fp, regs[11], 4);
+ hexvalue (ctx->arm_ip, regs[12], 4);
+ hexvalue (ctx->arm_sp, regs[13], 4);
+ hexvalue (ctx->arm_lr, regs[14], 4);
+ hexvalue (ctx->arm_pc, regs[15], 4);
+ hexvalue (ctx->arm_cpsr, regs[16], 8);
+ hexvalue (ctx->trap_no, regs[17], 8);
+ hexvalue (ctx->error_code, regs[18], 8);
+ hexvalue (ctx->old_mask, regs[19], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\n R0: ");
+ ADD_MEM (regs[0], 8);
+ ADD_STRING (" R1: ");
+ ADD_MEM (regs[1], 8);
+ ADD_STRING (" R2: ");
+ ADD_MEM (regs[2], 8);
+ ADD_STRING (" R3: ");
+ ADD_MEM (regs[3], 8);
+ ADD_STRING ("\n R4: ");
+ ADD_MEM (regs[4], 8);
+ ADD_STRING (" R5: ");
+ ADD_MEM (regs[5], 8);
+ ADD_STRING (" R6: ");
+ ADD_MEM (regs[6], 8);
+ ADD_STRING (" R7: ");
+ ADD_MEM (regs[7], 8);
+ ADD_STRING ("\n R8: ");
+ ADD_MEM (regs[8], 8);
+ ADD_STRING (" R9: ");
+ ADD_MEM (regs[9], 8);
+ ADD_STRING (" SL: ");
+ ADD_MEM (regs[10], 8);
+ ADD_STRING (" FP: ");
+ ADD_MEM (regs[11], 8);
+ ADD_STRING ("\n IP: ");
+ ADD_MEM (regs[12], 8);
+ ADD_STRING (" SP: ");
+ ADD_MEM (regs[13], 8);
+ ADD_STRING (" LR: ");
+ ADD_MEM (regs[14], 8);
+ ADD_STRING (" PC: ");
+ ADD_MEM (regs[15], 8);
+ ADD_STRING ("\n\n CPSR: ");
+ ADD_MEM (regs[16], 8);
+ ADD_STRING ("\n\n Trap: ");
+ ADD_MEM (regs[17], 8);
+ ADD_STRING (" Error: ");
+ ADD_MEM (regs[18], 8);
+ ADD_STRING (" OldMask: ");
+ ADD_MEM (regs[19], 8);
+
+ ADD_STRING ("\n");
+
+ /* Write the stuff out. */
+ writev (fd, iov, nr);
+}
+
+
+#define REGISTER_DUMP register_dump (fd, &ctx)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=911c0aba69a04c84ef9969d5895d9568dfd58f54
commit 911c0aba69a04c84ef9969d5895d9568dfd58f54
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 1 14:29:47 1998 +0000
Correct args to mcount().
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index 96b4c13..3909b5e 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -41,25 +41,27 @@ static void mcount_internal (u_long frompc, u_long selfpc)
blind calls to _mount(), ignoring the fact that _mcount may
clobber registers; therefore, _mcount may NOT clobber registers */
/* if (this_fp!=0) {
- r0 = this_lr
- r1 = this_fp
- r1 = [r1-4] which is caller's fp
+ r0 = this_fp
+ r1 = this_lr
+ r1 = [r1-4] which is caller's lr
if (r1!=0)
r1 = caller's lr
call mcount_internal(this_lr, caller's_lr)
}
-*/
+*/
+
#define MCOUNT \
void _mcount (void) \
{ \
__asm__("stmdb sp!, {r0, r1, r2, r3};" \
"movs fp, fp;" \
- "moveq r0, #0;" \
- "ldrne r0, [fp, $-4];" \
- "ldrne r1, [fp, $-12];" \
- "movnes r1, r1;" \
- "ldrne r1, [r1, $-4];" \
- "movs r1, r1;" \
+ "moveq r1, #0;" \
+ "ldrne r1, [fp, $-4];" \
+ "ldrne r0, [fp, $-12];" \
+ "movnes r0, r0;" \
+ "ldrne r0, [r0, $-4];" \
+ "movs r0, r0;" \
"blne mcount_internal;" \
"ldmia sp!, {r0, r1, r2, r3}"); \
}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f72aee6de5802bd45d0bfa90e19b6569cf3ab51
commit 0f72aee6de5802bd45d0bfa90e19b6569cf3ab51
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 1 10:57:23 1998 +0000
Protect use of long long by __extension__.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 2bb8a2a..c716d57 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -34,8 +34,8 @@ typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;
#ifdef __GNUC__
-typedef unsigned long long int __u_quad_t;
-typedef long long int __quad_t;
+__extension__ typedef unsigned long long int __u_quad_t;
+__extension__ typedef long long int __quad_t;
#else
typedef struct
{
@@ -53,8 +53,8 @@ typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#ifdef __GNUC__
-typedef signed long long int __int64_t;
-typedef unsigned long long int __uint64_t;
+__extension__ typedef signed long long int __int64_t;
+__extension__ typedef unsigned long long int __uint64_t;
#endif
typedef __quad_t *__qaddr_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4fbbde293478419189b09dd026b9c3d3260d5620
commit 4fbbde293478419189b09dd026b9c3d3260d5620
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 29 22:41:48 1998 +0000
List Ruffian in platforms[].
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index cf263f7..26d976e 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -104,6 +104,7 @@ static struct platform {
{"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM},
{"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
+ {"Ruffian", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=225146fe16633f3492b8f602ce5bfd15ef49f6d3
commit 225146fe16633f3492b8f602ce5bfd15ef49f6d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 28 11:49:19 1998 +0000
Sync with generic Linux version.
(__cmsg_nxthdr): Use CMSG_ALIGN (fixes a bug) and correct test for availability
of another entry.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 75ed54f..528b8be 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -149,8 +149,13 @@ struct cmsghdr
#endif
#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
#define CMSG_FIRSTHDR(mhdr) \
- ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
+ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+ & ~(sizeof (size_t) - 1))
+#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
#ifndef _EXTERN_INLINE
@@ -161,18 +166,19 @@ extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
_EXTERN_INLINE struct cmsghdr *
__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
{
- unsigned char *__p;
-
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
/* The kernel header does this so there may be a reason. */
return NULL;
- __p = (((unsigned char *) __cmsg)
- + ((__cmsg->cmsg_len + sizeof (long int) - 1) & ~sizeof (long int)));
- if (__p >= (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+ if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ + __mhdr->msg_controllen)
+ || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+ >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
/* No more entries. */
return NULL;
- return (struct cmsghdr *) __p;
+ return __cmsg;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d05b46514bb8d1246e782b1a8f81eff9fd8bb055
commit d05b46514bb8d1246e782b1a8f81eff9fd8bb055
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:40:59 1998 +0000
OSF system dependent bits of sys/mman.h.
diff --git a/sysdeps/unix/bsd/osf/bits/mman.h b/sysdeps/unix/bsd/osf/bits/mman.h
new file mode 100644
index 0000000..fd5d79d
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/bits/mman.h
@@ -0,0 +1,71 @@
+/* Flags for BSD-style memory management. OSF/1 version.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_MMAN_H
+#define _BITS_MMAN_H 1
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+
+/* Flags contain mapping type, sharing type and options. */
+
+/* Mapping type (must choose one and only one of these). */
+#ifdef __USE_BSD
+# define MAP_FILE 0x00 /* Mapped from a file or device. */
+# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
+# define MAP_ANONYMOUS MAP_ANON
+# define MAP_TYPE 0xf0 /* Mask for type field. */
+#endif
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+
+/* Other flags. */
+#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
+#ifdef __USE_BSD
+# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
+# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
+# define MAP_INHERIT 0x0400 /* Region is retained after exec. */
+# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
+#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Asynchronous cache flush. */
+#define MS_SYNC 3 /* Synchronous cache flush. */
+#define MS_INVALIDATE 4 /* Invalidate cached pages. */
+
+#endif /* bits/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f65fc5cb2d45cc289811a94a31ca34b7c3666032
commit f65fc5cb2d45cc289811a94a31ca34b7c3666032
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:37:13 1998 +0000
Don't mention bits/mman.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index d208604..21e1340 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,6 +1,5 @@
alpha/ptrace.h
alpha/regdef.h
-bits/mman.h
clone.S
ieee_get_fp_control.S
ieee_set_fp_control.S
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 6e1be78..3217436 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,3 +1,2 @@
-bits/mman.h
clone.S
init-first.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 103e273..6059865 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,4 +1,3 @@
-bits/mman.h
clone.S
mremap.S
sys/reg.h
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index 0f106cf..f3ae821 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -1,4 +1,3 @@
-bits/mman.h
clone.S
kernel_sigaction.h
kernel_stat.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed00ca14c4c30aa0651fa684e3a6b6219ef00fe4
commit ed00ca14c4c30aa0651fa684e3a6b6219ef00fe4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:36:12 1998 +0000
Irix4 system dependent bits of sys/mman.h.
diff --git a/sysdeps/unix/sysv/irix4/bits/mman.h b/sysdeps/unix/sysv/irix4/bits/mman.h
new file mode 100644
index 0000000..c378cce
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/bits/mman.h
@@ -0,0 +1,64 @@
+/* Definitions for BSD-style memory management. Irix 4 version.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_MMAN_H
+#define _BITS_MMAN_H 1
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x04 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x01 /* Pages can be executed. */
+#ifdef __USE_MISC
+# define PROT_EXECUTE PROT_EXEC
+#endif
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+#ifdef __USE_MISC
+# define MAP_RENAME 0x20 /* Rename private pages to file. */
+# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */
+# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */
+#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
+#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+
+#endif /* bits/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1bc2343a30e519ff7dfa22d438bc9d57a5da7fd
commit c1bc2343a30e519ff7dfa22d438bc9d57a5da7fd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:35:56 1998 +0000
Ultrix4 system dependent bits of sys/mman.h.
diff --git a/sysdeps/unix/bsd/ultrix4/bits/mman.h b/sysdeps/unix/bsd/ultrix4/bits/mman.h
new file mode 100644
index 0000000..9acb6ce
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/bits/mman.h
@@ -0,0 +1,51 @@
+/* Definitions for BSD-style memory management. Ultrix 4 version.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_MMAN_H
+#define _BITS_MMAN_H 1
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+#endif /* bits/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68ba15f9a34ad7039c9627f1feeaea418ae54710
commit 68ba15f9a34ad7039c9627f1feeaea418ae54710
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:35:43 1998 +0000
SunOS4 system dependent bits of sys/mman.h.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/mman.h b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h
new file mode 100644
index 0000000..ed80baf
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/mman.h
@@ -0,0 +1,68 @@
+/* Definitions for BSD-style memory management. SunOS 4 version.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_MMAN_H
+#define _BITS_MMAN_H 1
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+/* The following three flags are not actually implemented in SunOS 4.1. */
+#ifdef __USE_BSD
+# define MAP_RENAME 0x20 /* Rename private pages to file. */
+# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
+# define MAP_INHERIT 0x80 /* Region is retained after exec. */
+#endif
+
+/* This is an internal flag that is always set in `mmap' system calls. In
+ older versions of SunOS 4 `mmap' did not return the actual mapping
+ address, but always returned zero. This flag says to return the
+ address; the `mmap' C library function always sets it. */
+#define _MAP_NEW 0x80000000
+
+/* Advice to `madvise'. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
+#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+
+#endif /* bits/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a84961b89e25b9030490428472c015a94b7d742
commit 9a84961b89e25b9030490428472c015a94b7d742
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:34:46 1998 +0000
Don't use #include_next.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 6c1035a..5513075 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -38,4 +38,4 @@
#define STACK_GROWTH_DOWN
-#include_next <sysdep.h>
+#include <sysdeps/mach/sysdep.h>
diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h
index ea9f944..dc30a79 100644
--- a/sysdeps/mach/alpha/thread_state.h
+++ b/sysdeps/mach/alpha/thread_state.h
@@ -36,4 +36,4 @@ struct machine_thread_all_state
struct alpha_float_state fpu;
};
-#include_next <thread_state.h>
+#include <sysdeps/mach/thread_state.h>
diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h
index 7bacb02..45cbf69 100644
--- a/sysdeps/mach/mips/sysdep.h
+++ b/sysdeps/mach/mips/sysdep.h
@@ -80,4 +80,4 @@ _start:\n\
#define ret j ra; nop
#endif
-#include_next <sysdep.h>
+#include <sysdeps/mach/sysdep.h>
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index a72848d..17334cf 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -39,4 +39,4 @@ struct machine_thread_all_state
struct mips_float_state fpu;
};
-#include_next <thread_state.h>
+#include <sysdeps/mach/thread_state.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c06df6978004eb694057a56f4f3b0af10358d527
commit c06df6978004eb694057a56f4f3b0af10358d527
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Sep 23 16:33:27 1998 +0000
Not needed anymore.
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
deleted file mode 100644
index 6ada4e6..0000000
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Definitions for BSD-style memory management. OSF/1 version.
- Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_MMAN_H
-
-#define _SYS_MMAN_H 1
-#include <features.h>
-
-#include <bits/types.h>
-#define __need_size_t
-#include <stddef.h>
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x01 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x04 /* Pages can be executed. */
-
-
-/* Flags contain mapping type, sharing type and options. */
-
-/* Mapping type (must choose one and only one of these). */
-#ifdef __USE_BSD
-# define MAP_FILE 0x00 /* Mapped from a file or device. */
-# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
-# define MAP_ANONYMOUS MAP_ANON
-# define MAP_TYPE 0xf0 /* Mask for type field. */
-#endif
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-
-/* Other flags. */
-#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
-#ifdef __USE_BSD
-# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
-# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
-# define MAP_INHERIT 0x0400 /* Region is retained after exec. */
-# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Asynchronous cache flush. */
-#define MS_SYNC 3 /* Synchronous cache flush. */
-#define MS_INVALIDATE 4 /* Invalidate cached pages. */
-
-/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__ptr_t) -1)
-
-
-__BEGIN_DECLS
-/* Map addresses starting near ADDR and extending for LEN bytes. from
- OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
- is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
- set in FLAGS, the mapping will be at ADDR exactly (which must be
- page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or MAP_FAILED
- for errors (in which case `errno' is set). A successful `mmap' call
- deallocates any previous mapping for the affected region. */
-
-extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
-
-/* Deallocate any mapping for the region starting at ADDR and extending LEN
- bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int munmap __P ((__ptr_t __addr, size_t __len));
-
-/* Change the memory protection of the region starting at ADDR and
- extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
- (and sets errno). */
-extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
-
-/* Synchronize the region starting at ADDR and extending LEN bytes with the
- file it maps. Filesystem operations on a file being mapped are
- unpredictable before this is done. */
-extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
-
-#ifdef __USE_BSD
-/* Advise the system about particular usage patterns the program follows
- for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
-#endif
-
-__END_DECLS
-
-
-#endif /* sys/mman.h */
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
deleted file mode 100644
index 15608e5..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Definitions for BSD-style memory management. SunOS 4 version.
- Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_MMAN_H
-
-#define _SYS_MMAN_H 1
-#include <features.h>
-
-#include <bits/types.h>
-#define __need_size_t
-#include <stddef.h>
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x01 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x04 /* Pages can be executed. */
-
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#ifdef __USE_BSD
-# define MAP_TYPE 0x0f /* Mask for sharing type. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
-/* The following three flags are not actually implemented in SunOS 4.1. */
-#ifdef __USE_BSD
-# define MAP_RENAME 0x20 /* Rename private pages to file. */
-# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
-# define MAP_INHERIT 0x80 /* Region is retained after exec. */
-#endif
-
-/* This is an internal flag that is always set in `mmap' system calls. In
- older versions of SunOS 4 `mmap' did not return the actual mapping
- address, but always returned zero. This flag says to return the
- address; the `mmap' C library function always sets it. */
-#define _MAP_NEW 0x80000000
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
-#define MS_INVALIDATE 0x2 /* Invalidate caches. */
-
-/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__ptr_t) -1)
-
-
-__BEGIN_DECLS
-/* Map addresses starting near ADDR and extending for LEN bytes. from
- OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
- is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
- set in FLAGS, the mapping will be at ADDR exactly (which must be
- page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or MAP_FAILED
- for errors (in which case `errno' is set). A successful `mmap' call
- deallocates any previous mapping for the affected region. */
-
-extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
-
-/* Deallocate any mapping for the region starting at ADDR and extending LEN
- bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int munmap __P ((__ptr_t __addr, size_t __len));
-
-/* Change the memory protection of the region starting at ADDR and
- extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
- (and sets errno). */
-extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
-
-/* Synchronize the region starting at ADDR and extending LEN bytes with the
- file it maps. Filesystem operations on a file being mapped are
- unpredictable before this is done. */
-extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
-
-#ifdef __USE_BSD
-/* Advise the system about particular usage patterns the program follows
- for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
-#endif
-
-__END_DECLS
-
-
-#endif /* sys/mman.h */
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
deleted file mode 100644
index 1425094..0000000
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Definitions for BSD-style memory management. Ultrix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_MMAN_H
-
-#define _SYS_MMAN_H 1
-#include <features.h>
-
-#include <bits/types.h>
-#define __need_size_t
-#include <stddef.h>
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x01 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x04 /* Pages can be executed. */
-
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#ifdef __USE_BSD
-# define MAP_TYPE 0x0f /* Mask for sharing type. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
-
-/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__ptr_t) -1)
-
-
-__BEGIN_DECLS
-/* Map addresses starting near ADDR and extending for LEN bytes. from
- OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
- is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
- set in FLAGS, the mapping will be at ADDR exactly (which must be
- page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or MAP_FAILED
- for errors (in which case `errno' is set). A successful `mmap' call
- deallocates any previous mapping for the affected region. */
-
-extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
-
-/* Deallocate any mapping for the region starting at ADDR and extending LEN
- bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int munmap __P ((__ptr_t __addr, size_t __len));
-
-/* Change the memory protection of the region starting at ADDR and
- extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
- (and sets errno). */
-extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
-
-/* Ultrix 4 does not implement `msync' or `madvise'. */
-
-/* Synchronize the region starting at ADDR and extending LEN bytes with the
- file it maps. Filesystem operations on a file being mapped are
- unpredictable before this is done. */
-extern int msync __P ((__ptr_t __addr, size_t __len));
-
-#ifdef __USE_BSD
-/* Advise the system about particular usage patterns the program follows
- for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
-#endif
-
-__END_DECLS
-
-
-#endif /* sys/mman.h */
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
deleted file mode 100644
index 9147aa7..0000000
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Definitions for BSD-style memory management. Irix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_MMAN_H
-
-#define _SYS_MMAN_H 1
-#include <features.h>
-
-#include <bits/types.h>
-
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x04 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x01 /* Pages can be executed. */
-#ifdef __USE_MISC
-# define PROT_EXECUTE PROT_EXEC
-#endif
-
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#ifdef __USE_BSD
-# define MAP_TYPE 0x0f /* Mask for sharing type. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
-#ifdef __USE_MISC
-# define MAP_RENAME 0x20 /* Rename private pages to file. */
-# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */
-# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
-
-/* Flags to `msync'. */
-#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
-#define MS_INVALIDATE 0x2 /* Invalidate caches. */
-
-/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__ptr_t) -1)
-
-
-__BEGIN_DECLS
-/* Map addresses starting near ADDR and extending for LEN bytes. from
- OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
- is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
- set in FLAGS, the mapping will be at ADDR exactly (which must be
- page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or MAP_FAILED
- for errors (in which case `errno' is set). A successful `mmap' call
- deallocates any previous mapping for the affected region. */
-
-extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
-
-/* Deallocate any mapping for the region starting at ADDR and extending LEN
- bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int munmap __P ((__ptr_t __addr, size_t __len));
-
-/* Change the memory protection of the region starting at ADDR and
- extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
- (and sets errno). */
-extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
-
-/* Synchronize the region starting at ADDR and extending LEN bytes with the
- file it maps. Filesystem operations on a file being mapped are
- unpredictable before this is done. */
-extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
-
-#ifdef __USE_BSD
-/* Advise the system about particular usage patterns the program follows
- for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
-#endif
-
-__END_DECLS
-
-
-#endif /* sys/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b720449067c7138b1ecf2386c5da3318bd916206
commit b720449067c7138b1ecf2386c5da3318bd916206
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 22 12:44:47 1998 +0000
(SA_ONSTACK): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 274531f..ae1249a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -37,7 +37,7 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
# define SA_NOMASK 0x00000008 /* Don't automatically block the signal
@@ -47,6 +47,7 @@ struct sigaction
/* Some aliases for the SA_ constants. */
# define SA_NODEFER SA_NOMASK
# define SA_RESETHAND SA_ONESHOT
+# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 71ca884..7f72406 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -45,16 +45,17 @@ struct sigaction
/* Bits in `sa_flags'. */
#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
-# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000004 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x00000000 /* Historical no-op. */
+# define SA_NODEFER 0x00000010 /* Don't automatically block the signal when
its handler is being executed. */
-# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESETHAND 0x00000002 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
# define SA_NOMASK SA_NODEFER
# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
#endif
/* Values for the HOW argument to `sigprocmask'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3e2d5611fe96852030d9934f5376985864d4e42
commit b3e2d5611fe96852030d9934f5376985864d4e42
Author: Andreas Schwab <schwab@suse.de>
Date: Tue Sep 22 01:42:11 1998 +0000
* sysdeps/m68k/dl-machine.h (elf_machine_lazy_rel): Slightly
optimized.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index a4affcc..88fcd1f 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -324,15 +324,8 @@ static inline void
elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
- switch (ELF32_R_TYPE (reloc->r_info))
- {
- case R_68K_JMP_SLOT:
- *reloc_addr += l_addr;
- break;
- default:
- assert (! "unexpected PLT reloc type");
- break;
- }
+ assert (ELF32_R_TYPE (reloc->r_info) == R_68K_JMP_SLOT);
+ *reloc_addr += l_addr;
}
#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=344b4b4e2352446f1a14b9d91e4f2018ae19a78d
commit 344b4b4e2352446f1a14b9d91e4f2018ae19a78d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 18 09:10:23 1998 +0000
(elf_machine_lazy_rel): Optimise a bit.
(RTLD_START): Keep in step with recent ld.so changes.
(elf_machine_runtime_setup): Correct behaviour when profiling.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 49e9d08..b0f364f 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -99,8 +99,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
end in this function. */
if (profile)
{
- //got[2] = (Elf32_Addr) &_dl_runtime_profile;
- got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ got[2] = (Elf32_Addr) &_dl_runtime_profile;
/* Say that we really want profiling and the timers are started. */
_dl_profile_map = l;
}
@@ -283,9 +282,8 @@ _dl_start_user:
str r0, [sp]
@ now we enter a _dl_init_next loop
- ldr r2, .L_DEF_SCOPE
- ldr r2, [sl, r2]
- ldr r4, [r2, #8]
+ ldr r4, .L_MAIN_SEARCHLIST
+ ldr r4, [sl, r4]
@ call _dl_init_next to get the address of an initalizer
0: mov r0, r4
bl _dl_init_next(PLT)
@@ -311,14 +309,14 @@ _dl_start_user:
.word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\
.L_SKIP_ARGS: \n\
.word _dl_skip_args(GOTOFF) \n\
-.L_DEF_SCOPE: \n\
- .word _dl_default_scope(GOT) \n\
.L_STARTUP_FLAG:
.word _dl_starting_up(GOT)
.L_FINI_PROC:
.word _dl_fini(GOT)
.L_STACK_END:
.word __libc_stack_end(GOT)
+.L_MAIN_SEARCHLIST
+ .word _dl_main_searchlist(GOT)
.previous\n\
");
@@ -452,15 +450,9 @@ static inline void
elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
- switch (ELF32_R_TYPE (reloc->r_info))
- {
- case R_ARM_JUMP_SLOT:
- *reloc_addr += l_addr;
- break;
- default:
- assert (! "unexpected PLT reloc type");
- break;
- }
+ /* Check for unexpected PLT reloc type. */
+ assert (ELF32_R_TYPE (reloc->r_info) == R_ARM_JUMP_SLOT);
+ *reloc_addr += l_addr;
}
#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3a306c88fec3134df6ca16c1b056f815c6ad784
commit f3a306c88fec3134df6ca16c1b056f815c6ad784
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 17 19:36:37 1998 +0000
Fix typo.
diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h
index bf2c0a8..dfe46b8 100644
--- a/sysdeps/unix/sysv/sysv4/bits/utsname.h
+++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _UTSNAME_H
+#ifndef _SYS_UTSNAME_H
# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b86c06fec527464b6c1d137cd0669eef4a773a4
commit 8b86c06fec527464b6c1d137cd0669eef4a773a4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 14 16:38:32 1998 +0000
Add init-first.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index d987285..6e1be78 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1,2 +1,3 @@
bits/mman.h
clone.S
+init-first.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04853189a26343e18cde99ec21b633a4520dbfb8
commit 04853189a26343e18cde99ec21b633a4520dbfb8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 14 16:26:45 1998 +0000
Extra files for Solaris/SPARC.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
new file mode 100644
index 0000000..7832507
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
@@ -0,0 +1 @@
+sys/trap.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efe4f49dc1197cce5f346fe8f7c7f2c5fc2bca11
commit efe4f49dc1197cce5f346fe8f7c7f2c5fc2bca11
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 14 15:01:45 1998 +0000
Moved one dir up.
diff --git a/sysdeps/arm/fpu/Dist b/sysdeps/arm/fpu/Dist
deleted file mode 100644
index d78de40..0000000
--- a/sysdeps/arm/fpu/Dist
+++ /dev/null
@@ -1 +0,0 @@
-ieee754.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa64d5442165a2c7efaae51ded2346571d6612ae
commit aa64d5442165a2c7efaae51ded2346571d6612ae
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Sep 14 15:01:30 1998 +0000
Extra objects for ARM.
diff --git a/sysdeps/arm/Dist b/sysdeps/arm/Dist
new file mode 100644
index 0000000..d78de40
--- /dev/null
+++ b/sysdeps/arm/Dist
@@ -0,0 +1 @@
+ieee754.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91df7dba195b237e2a10605af8a791aabb1648d1
commit 91df7dba195b237e2a10605af8a791aabb1648d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:19:49 1998 +0000
Solaris 2 system calls.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h
new file mode 100644
index 0000000..2c071a7
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/syscall.h
@@ -0,0 +1,245 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYSCALL_H
+#define _SYSCALL_H 1
+
+/* Solaris 2 syscall numbers */
+
+#define SYS_syscall 0
+#define SYS_exit 1
+#define SYS_fork 2
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_wait 7
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_exec 11
+#define SYS_chdir 12
+#define SYS_time 13
+#define SYS_mknod 14
+#define SYS_chmod 15
+#define SYS_chown 16
+#define SYS_brk 17
+#define SYS_stat 18
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_mount 21
+#define SYS_umount 22
+#define SYS_setuid 23
+#define SYS_getuid 24
+#define SYS_stime 25
+#define SYS_ptrace 26
+#define SYS_alarm 27
+#define SYS_fstat 28
+#define SYS_pause 29
+#define SYS_utime 30
+#define SYS_stty 31
+#define SYS_gtty 32
+#define SYS_access 33
+#define SYS_nice 34
+#define SYS_statfs 35
+#define SYS_sync 36
+#define SYS_kill 37
+#define SYS_fstatfs 38
+#define SYS_pgrpsys 39
+#define SYS_xenix 40
+#define SYS_dup 41
+#define SYS_pipe 42
+#define SYS_times 43
+#define SYS_profil 44
+#define SYS_plock 45
+#define SYS_setgid 46
+#define SYS_getgid 47
+#define SYS_signal 48
+#define SYS_msgsys 49
+#define SYS_syssun 50
+#define SYS_sysi86 50
+#define SYS_sysppc 50
+#define SYS_acct 51
+#define SYS_shmsys 52
+#define SYS_semsys 53
+#define SYS_ioctl 54
+#define SYS_uadmin 55
+#define SYS_utssys 57
+#define SYS_fdsync 58
+#define SYS_execve 59
+#define SYS_umask 60
+#define SYS_chroot 61
+#define SYS_fcntl 62
+#define SYS_ulimit 63
+#define SYS_rmdir 79
+#define SYS_mkdir 80
+#define SYS_getdents 81
+#define SYS_sysfs 84
+#define SYS_getmsg 85
+#define SYS_putmsg 86
+#define SYS_poll 87
+#define SYS_lstat 88
+#define SYS_symlink 89
+#define SYS_readlink 90
+#define SYS_setgroups 91
+#define SYS_getgroups 92
+#define SYS_fchmod 93
+#define SYS_fchown 94
+#define SYS_sigprocmask 95
+#define SYS_sigsuspend 96
+#define SYS_sigaltstack 97
+#define SYS_sigaction 98
+#define SYS_sigpending 99
+#define SYS_context 100
+#define SYS_evsys 101
+#define SYS_evtrapret 102
+#define SYS_statvfs 103
+#define SYS_fstatvfs 104
+#define SYS_nfssys 106
+#define SYS_waitsys 107
+#define SYS_sigsendsys 108
+#define SYS_hrtsys 109
+#define SYS_acancel 110
+#define SYS_async 111
+#define SYS_priocntlsys 112
+#define SYS_pathconf 113
+#define SYS_mincore 114
+#define SYS_mmap 115
+#define SYS_mprotect 116
+#define SYS_munmap 117
+#define SYS_fpathconf 118
+#define SYS_vfork 119
+#define SYS_fchdir 120
+#define SYS_readv 121
+#define SYS_writev 122
+#define SYS_xstat 123
+#define SYS_lxstat 124
+#define SYS_fxstat 125
+#define SYS_xmknod 126
+#define SYS_clocal 127
+#define SYS_setrlimit 128
+#define SYS_getrlimit 129
+#define SYS_lchown 130
+#define SYS_memcntl 131
+#define SYS_getpmsg 132
+#define SYS_putpmsg 133
+#define SYS_rename 134
+#define SYS_uname 135
+#define SYS_setegid 136
+#define SYS_sysconfig 137
+#define SYS_adjtime 138
+#define SYS_systeminfo 139
+#define SYS_seteuid 141
+#define SYS_vtrace 142
+#define SYS_fork1 143
+#define SYS_sigtimedwait 144
+#define SYS_lwp_info 145
+#define SYS_yield 146
+#define SYS_lwp_sema_wait 147
+#define SYS_lwp_sema_post 148
+#define SYS_lwp_sema_trywait 149
+#define SYS_modctl 152
+#define SYS_fchroot 153
+#define SYS_utimes 154
+#define SYS_vhangup 155
+#define SYS_gettimeofday 156
+#define SYS_getitimer 157
+#define SYS_setitimer 158
+#define SYS_lwp_create 159
+#define SYS_lwp_exit 160
+#define SYS_lwp_suspend 161
+#define SYS_lwp_continue 162
+#define SYS_lwp_kill 163
+#define SYS_lwp_self 164
+#define SYS_lwp_setprivate 165
+#define SYS_lwp_getprivate 166
+#define SYS_lwp_wait 167
+#define SYS_lwp_mutex_unlock 168
+#define SYS_lwp_mutex_lock 169
+#define SYS_lwp_cond_wait 170
+#define SYS_lwp_cond_signal 171
+#define SYS_lwp_cond_broadcast 172
+#define SYS_pread 173
+#define SYS_pwrite 174
+#define SYS_llseek 175
+#define SYS_inst_sync 176
+#define SYS_kaio 178
+#define SYS_tsolsys 184
+#define SYS_acl 185
+#define SYS_auditsys 186
+#define SYS_processor_bind 187
+#define SYS_processor_info 188
+#define SYS_p_online 189
+#define SYS_sigqueue 190
+#define SYS_clock_gettime 191
+#define SYS_clock_settime 192
+#define SYS_clock_getres 193
+#define SYS_timer_create 194
+#define SYS_timer_delete 195
+#define SYS_timer_settime 196
+#define SYS_timer_gettime 197
+#define SYS_timer_getoverrun 198
+#define SYS_nanosleep 199
+#define SYS_facl 200
+#define SYS_door 201
+#define SYS_setreuid 202
+#define SYS_setregid 203
+#define SYS_install_utrap 204
+#define SYS_signotify 205
+#define SYS_schedctl 206
+#define SYS_pset 207
+#define SYS_resolvepath 209
+#define SYS_signotifywait 210
+#define SYS_lwp_sigredirect 211
+#define SYS_lwp_alarm 212
+#define SYS_getdents64 213
+#define SYS_mmap64 214
+#define SYS_stat64 215
+#define SYS_lstat64 216
+#define SYS_fstat64 217
+#define SYS_statvfs64 218
+#define SYS_fstatvfs64 219
+#define SYS_setrlimit64 220
+#define SYS_getrlimit64 221
+#define SYS_pread64 222
+#define SYS_pwrite64 223
+#define SYS_creat64 224
+#define SYS_open64 225
+#define SYS_rpcsys 226
+#define SYS_so_socket 230
+#define SYS_so_socketpair 231
+#define SYS_bind 232
+#define SYS_listen 233
+#define SYS_accept 234
+#define SYS_connect 235
+#define SYS_shutdown 236
+#define SYS_recv 237
+#define SYS_recvfrom 238
+#define SYS_recvmsg 239
+#define SYS_send 240
+#define SYS_sendmsg 241
+#define SYS_sendto 242
+#define SYS_getpeername 243
+#define SYS_getsockname 244
+#define SYS_getsockopt 245
+#define SYS_setsockopt 246
+#define SYS_sockconfig 247
+#define SYS_ntp_gettime 248
+#define SYS_ntp_adjtime 249
+
+#endif /* sys/syscall.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c39892183f856cb2a293c6a3e4d202bb8967551
commit 5c39892183f856cb2a293c6a3e4d202bb8967551
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:19:33 1998 +0000
Solaris 2 vrsion of param.h.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h
new file mode 100644
index 0000000..3afb17a
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sys/param.h
@@ -0,0 +1,59 @@
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H 1
+
+#include <limits.h>
+
+/* BSD names for some <limits.h> values. */
+
+#define NBBY CHAR_BIT
+#ifndef NGROUPS
+# define NGROUPS NGROUPS_MAX
+#endif
+#define MAXSYMLINKS 5
+#define CANBSIZ MAX_CANON
+#define NCARGS ARG_MAX
+#define MAXPATHLEN PATH_MAX
+#define NOFILE OPEN_MAX
+
+
+#include <sys/types.h>
+
+/* Bit map related macros. */
+#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
+#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
+#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
+#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
+
+/* Macros for counting and rounding. */
+#ifndef howmany
+# define howmany(x, y) (((x)+((y)-1))/(y))
+#endif
+#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
+#define powerof2(x) ((((x)-1)&(x))==0)
+
+/* Macros for min/max. */
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
+/* Unit of `st_blocks'. */
+#define DEV_BSIZE 512
+
+#endif /* sys/param.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=badbd76bb8508bd0b65543691782f7a6fcf76476
commit badbd76bb8508bd0b65543691782f7a6fcf76476
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:19:16 1998 +0000
Solaris 2 ucontext definitions.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h
new file mode 100644
index 0000000..4a32f81
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/ucontext.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+#include <sys/types.h>
+
+typedef struct
+{
+ long int mc_filler[78];
+} mcontext_t;
+
+struct ucontext
+{
+ unsigned long int uc_flags;
+ struct ucontext *uc_link;
+ sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[23];
+};
+typedef struct ucontext ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a256afab2c7a505d80fdfa2ca316b3e5afe077e4
commit a256afab2c7a505d80fdfa2ca316b3e5afe077e4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:19:01 1998 +0000
Solaris 2 trap definitions.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h
new file mode 100644
index 0000000..411d23e
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys/trap.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_TRAP_H
+#define _SYS_TRAP_H 1
+
+/* Solaris2 software traps. */
+
+#define ST_OSYSCALL 0x00
+#define ST_BREAKPOINT 0x01
+#define ST_DIV0 0x02
+#define ST_FLUSH_WINDOWS 0x03
+#define ST_CLEAN_WINDOWS 0x04
+#define ST_RANGE_CHECK 0x05
+#define ST_FIX_ALIGN 0x06
+#define ST_INT_OVERFLOW 0x07
+#define ST_SYSCALL 0x08
+
+/* Traps 0x10 through 0x1f are allotted to the user. */
+
+#endif /* sys/trap.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69e46a642c02686a6e4891b7e4114aab38800fdc
commit 69e46a642c02686a6e4891b7e4114aab38800fdc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:18:39 1998 +0000
Solaris 2 definitions for sigstack/sigaltstack.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
new file mode 100644
index 0000000..6c6ccae
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/sigstack.h
@@ -0,0 +1,55 @@
+/* sigstack, sigaltstack definitions.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete). */
+struct sigstack
+ {
+ __ptr_t ss_sp; /* Signal stack pointer. */
+ int ss_onstack; /* Nonzero if executing on this stack. */
+ };
+
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 2048
+
+/* System default stack size. */
+#define SIGSTKSZ 8192
+
+
+/* Alternate, preferred interface. */
+typedef struct sigaltstack
+ {
+ __ptr_t ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ } stack_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=190df176a74c67fdedba752c5e484c190b576596
commit 190df176a74c67fdedba752c5e484c190b576596
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 11 18:18:17 1998 +0000
Wrapper around Linux version of this file. The code can be shared.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
index 026e611..f246640 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
@@ -1,2 +1,2 @@
/* We can reuse the Linux implementation. */
-#include <sysdeps/unix/sysv/linux/sigwaitinfo.h>
+#include <sysdeps/unix/sysv/linux/sigwaitinfo.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=831f9aedc478acaa2446a1eef35eaba25ffcf876
commit 831f9aedc478acaa2446a1eef35eaba25ffcf876
Author: Richard Henderson <rth@redhat.com>
Date: Fri Sep 11 13:48:14 1998 +0000
* sysdeps/alpha/dl-machine.h (_dl_start_user): Pass pointer to
_dl_main_searchlist not _dl_default_scope to _dl_init_next.
* sysdeps/sparc/sparc32/dl-machine.h (_dl_start_user): Likewise.
* sysdeps/sparc/sparc64/dl-machine.h (_dl_start_user): Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 648fb78..b63661f 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -251,8 +251,8 @@ _dl_start_user:
subq $2, $1, $2
s8addq $1, $sp, $sp
stq $2, 0($sp)
- /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
-0: ldq $10, _dl_default_scope+16
+ /* Load _dl_main_searchlist into s1 to pass to _dl_init_next. */
+0: ldq $10, _dl_main_searchlist
/* Call _dl_init_next to return the address of an initializer
function to run. */
1: mov $10, $16
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=739902c55d0731df1a6da9b3e6ff0cabaa694461
commit 739902c55d0731df1a6da9b3e6ff0cabaa694461
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Sep 9 01:36:38 1998 +0000
* sysdeps/m68k/dl-machine.h(RTLD_START): Push _dl_main_searchlist
instead of _dl_default_scope[2] as argument to _dl_init_next.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index b8911dc..a4affcc 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -180,8 +180,9 @@ _dl_start_user:
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
-0: | Push _dl_default_scope[2] as argument in _dl_init_next call below.
- move.l ([_dl_default_scope@GOT.w, %a5], 8), %d2
+0: | Push the searchlist of the main object as argument in
+ | the _dl_init_next call below.
+ move.l ([_dl_main_searchlist@GOT.w, %a5]), %d2
0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a2ffe12b49e82c9d6f8158aaa34a30cdb3129011
commit a2ffe12b49e82c9d6f8158aaa34a30cdb3129011
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Sep 9 01:35:38 1998 +0000
* sysdeps/m68k/fpu/bits/mathinline.h (isinf): Avoid conflict with
C9x macro.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index e5eb591..b1e2a75 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -442,7 +442,9 @@ __inline_forward(double,frexp, (double __value, int *__expptr),
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
# ifdef __USE_MISC
+# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
__inline_forward_c(int,isinf, (double __value), (__value))
+# endif
__inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
# endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55bdcfe5d94794892fc1aa8f1504861e50c1ecdc
commit 55bdcfe5d94794892fc1aa8f1504861e50c1ecdc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 31 16:04:06 1998 +0000
(ENOMSG): Remove duplicate.
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
index d4030b7..d4f7879 100644
--- a/sysdeps/standalone/bits/errno.h
+++ b/sysdeps/standalone/bits/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,6 @@
# define ENOMSG 11
# define ENAMETOOLONG 12
# define ELOOP 13
-# define ENOMSG 14
# define E2BIG 15
# define EINTR 16
# define ENOEXEC 18
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d897cf4178521eabea370429d5dafc8f9edb523
commit 8d897cf4178521eabea370429d5dafc8f9edb523
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 28 22:54:33 1998 +0000
(elf_machine_lazy_rel): Change first parameter.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 7ee2e20..bbd22d8 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -582,7 +582,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
}
static inline void
-elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+elf_machine_lazy_rel (Elf32_addr l_addr, const ElfW(Rel) *reloc)
{
/* Do nothing. */
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68d11b268ef545ce6a14ba574836609b36fd783a
commit 68d11b268ef545ce6a14ba574836609b36fd783a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 28 22:54:12 1998 +0000
(elf_machine_lazy_rel): Change first parameter and use this value.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 8f639a9..648fb78 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -448,16 +448,16 @@ elf_machine_rela (struct link_map *map,
}
static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
+elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc)
{
- Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+ Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset);
unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
if (r_type == R_ALPHA_JMP_SLOT)
{
/* Perform a RELATIVE reloc on the .got entry that transfers
to the .plt. */
- *reloc_addr += map->l_addr;
+ *reloc_addr += l_addr;
}
else if (r_type == R_ALPHA_NONE)
return;
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index c40f9d7..49e9d08 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -166,7 +166,7 @@ _dl_runtime_resolve:
mov pc, ip
.size _dl_runtime_resolve, .-_dl_runtime_resolve
-
+
.globl _dl_runtime_profile
.type _dl_runtime_profile, #function
.align 2
@@ -449,13 +449,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
{
- Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_ARM_JUMP_SLOT:
- *reloc_addr += map->l_addr;
+ *reloc_addr += l_addr;
break;
default:
assert (! "unexpected PLT reloc type");
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 3e57480..b8911dc 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -320,13 +320,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
{
- Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_JMP_SLOT:
- *reloc_addr += map->l_addr;
+ *reloc_addr += l_addr;
break;
default:
assert (! "unexpected PLT reloc type");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f35b9f2a88e237e2849417163d2bc72215409de6
commit f35b9f2a88e237e2849417163d2bc72215409de6
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Aug 28 01:42:42 1998 +0000
* sysdeps/unix/sysv/linux/m68k/register-dump.h: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h
new file mode 100644
index 0000000..6e66b62
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h
@@ -0,0 +1,214 @@
+/* Dump registers.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <sys/uio.h>
+#include <stdio-common/_itoa.h>
+
+/* We will print the register dump in this format:
+
+ D0: XXXXXXXX D1: XXXXXXXX D2: XXXXXXXX D3: XXXXXXXX
+ D4: XXXXXXXX D5: XXXXXXXX D6: XXXXXXXX D7: XXXXXXXX
+ A0: XXXXXXXX A1: XXXXXXXX A2: XXXXXXXX A3: XXXXXXXX
+ A4: XXXXXXXX A5: XXXXXXXX A6: XXXXXXXX A7: XXXXXXXX
+ PC: XXXXXXXX SR: XXXX
+
+ OldMask: XXXXXXXX Vector: XXXX
+
+ FP0: XXXXXXXXXXXXXXXXXXXXXXXX FP1: XXXXXXXXXXXXXXXXXXXXXXXX
+ FP2: XXXXXXXXXXXXXXXXXXXXXXXX FP3: XXXXXXXXXXXXXXXXXXXXXXXX
+ FP4: XXXXXXXXXXXXXXXXXXXXXXXX FP5: XXXXXXXXXXXXXXXXXXXXXXXX
+ FP6: XXXXXXXXXXXXXXXXXXXXXXXX FP7: XXXXXXXXXXXXXXXXXXXXXXXX
+ FPCR: XXXXXXXX FPSR: XXXXXXXX FPIAR: XXXXXXXX
+
+*/
+
+/* Linux saves only the call-clobbered registers in the sigcontext. We
+ need to use a trampoline that saves the rest so that the C code can
+ access them. We use the sc_fpstate field, since the handler is not
+ supposed to return anyway, thus it doesn't matter that it's clobbered. */
+
+/* static */ void catch_segfault (int, int, struct sigcontext *);
+
+/* Dummy function so that we can use asm with arguments. */
+static void __attribute__ ((unused))
+__dummy__ (void)
+{
+ asm ("
+catch_segfault:
+ move.l 12(%%sp),%%a0
+ lea %c0(%%a0),%%a0
+ /* Clear the first 4 bytes to make it a null fp state, just
+ in case the handler does return. */
+ clr.l (%%a0)+
+ movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)
+ fmovem.x %%fp2-%%fp7,11*4(%%a0)
+ jra real_catch_segfault"
+ : : "n" (offsetof (struct sigcontext, sc_fpstate)));
+}
+#define catch_segfault(a,b) \
+ __attribute__ ((unused)) real_catch_segfault(a,b)
+
+static void
+hexvalue (unsigned long int value, char *buf, size_t len)
+{
+ char *cp = _itoa_word (value, buf + len, 16, 0);
+ while (cp > buf)
+ *--cp = '0';
+}
+
+static void
+register_dump (int fd, struct sigcontext *ctx)
+{
+ char regs[20][8];
+ char fpregs[11][24];
+ struct iovec iov[63], *next_iov = iov;
+ unsigned long *p = (unsigned long *) ctx->sc_fpstate + 1;
+
+#define ADD_STRING(str) \
+ next_iov->iov_base = (char *) (str); \
+ next_iov->iov_len = strlen (str); \
+ ++next_iov
+#define ADD_MEM(str, len) \
+ next_iov->iov_base = (str); \
+ next_iov->iov_len = (len); \
+ ++next_iov
+
+ /* Generate strings of register contents. */
+ hexvalue (ctx->sc_d0, regs[0], 8);
+ hexvalue (ctx->sc_d1, regs[1], 8);
+ hexvalue (*p++, regs[2], 8);
+ hexvalue (*p++, regs[3], 8);
+ hexvalue (*p++, regs[4], 8);
+ hexvalue (*p++, regs[5], 8);
+ hexvalue (*p++, regs[6], 8);
+ hexvalue (*p++, regs[7], 8);
+ hexvalue (ctx->sc_a0, regs[8], 8);
+ hexvalue (ctx->sc_a1, regs[9], 8);
+ hexvalue (*p++, regs[10], 8);
+ hexvalue (*p++, regs[11], 8);
+ hexvalue (*p++, regs[12], 8);
+ hexvalue (*p++, regs[13], 8);
+ hexvalue (*p++, regs[14], 8);
+ hexvalue (ctx->sc_usp, regs[15], 8);
+ hexvalue (ctx->sc_pc, regs[16], 8);
+ hexvalue (ctx->sc_sr, regs[17], 4);
+ hexvalue (ctx->sc_mask, regs[18], 8);
+ hexvalue (ctx->sc_formatvec & 0xfff, regs[19], 4);
+ hexvalue (ctx->sc_fpregs[0], fpregs[0], 8);
+ hexvalue (ctx->sc_fpregs[1], fpregs[0] + 8, 8);
+ hexvalue (ctx->sc_fpregs[2], fpregs[0] + 16, 8);
+ hexvalue (ctx->sc_fpregs[3], fpregs[1], 8);
+ hexvalue (ctx->sc_fpregs[4], fpregs[1] + 8, 8);
+ hexvalue (ctx->sc_fpregs[5], fpregs[1] + 16, 8);
+ hexvalue (*p++, fpregs[2], 8);
+ hexvalue (*p++, fpregs[2] + 8, 8);
+ hexvalue (*p++, fpregs[2] + 16, 8);
+ hexvalue (*p++, fpregs[3], 8);
+ hexvalue (*p++, fpregs[3] + 8, 8);
+ hexvalue (*p++, fpregs[3] + 16, 8);
+ hexvalue (*p++, fpregs[4], 8);
+ hexvalue (*p++, fpregs[4] + 8, 8);
+ hexvalue (*p++, fpregs[4] + 16, 8);
+ hexvalue (*p++, fpregs[5], 8);
+ hexvalue (*p++, fpregs[5] + 8, 8);
+ hexvalue (*p++, fpregs[5] + 16, 8);
+ hexvalue (*p++, fpregs[6], 8);
+ hexvalue (*p++, fpregs[6] + 8, 8);
+ hexvalue (*p++, fpregs[6] + 16, 8);
+ hexvalue (*p++, fpregs[7], 8);
+ hexvalue (*p++, fpregs[7] + 8, 8);
+ hexvalue (*p++, fpregs[7] + 16, 8);
+ hexvalue (ctx->sc_fpcntl[0], fpregs[8], 8);
+ hexvalue (ctx->sc_fpcntl[1], fpregs[9], 8);
+ hexvalue (ctx->sc_fpcntl[2], fpregs[10], 8);
+
+ /* Generate the output. */
+ ADD_STRING ("Register dump:\n\n D0: ");
+ ADD_MEM (regs[0], 8);
+ ADD_STRING (" D1: ");
+ ADD_MEM (regs[1], 8);
+ ADD_STRING (" D2: ");
+ ADD_MEM (regs[2], 8);
+ ADD_STRING (" D3: ");
+ ADD_MEM (regs[3], 8);
+ ADD_STRING ("\n D4: ");
+ ADD_MEM (regs[4], 8);
+ ADD_STRING (" D5: ");
+ ADD_MEM (regs[5], 8);
+ ADD_STRING (" D6: ");
+ ADD_MEM (regs[6], 8);
+ ADD_STRING (" D7: ");
+ ADD_MEM (regs[7], 8);
+ ADD_STRING ("\n A0: ");
+ ADD_MEM (regs[8], 8);
+ ADD_STRING (" A1: ");
+ ADD_MEM (regs[9], 8);
+ ADD_STRING (" A2: ");
+ ADD_MEM (regs[10], 8);
+ ADD_STRING (" A3: ");
+ ADD_MEM (regs[11], 8);
+ ADD_STRING ("\n A4: ");
+ ADD_MEM (regs[12], 8);
+ ADD_STRING (" A5: ");
+ ADD_MEM (regs[13], 8);
+ ADD_STRING (" A6: ");
+ ADD_MEM (regs[14], 8);
+ ADD_STRING (" A7: ");
+ ADD_MEM (regs[15], 8);
+ ADD_STRING ("\n PC: ");
+ ADD_MEM (regs[16], 8);
+ ADD_STRING (" SR: ");
+ ADD_MEM (regs[17], 4);
+
+ ADD_STRING ("\n\n OldMask: ");
+ ADD_MEM (regs[18], 8);
+ ADD_STRING (" Vector: ");
+ ADD_MEM (regs[19], 4);
+
+ ADD_STRING ("\n\n FP0: ");
+ ADD_MEM (fpregs[0], 24);
+ ADD_STRING (" FP1: ");
+ ADD_MEM (fpregs[1], 24);
+ ADD_STRING ("\n FP2: ");
+ ADD_MEM (fpregs[2], 24);
+ ADD_STRING (" FP3: ");
+ ADD_MEM (fpregs[3], 24);
+ ADD_STRING ("\n FP4: ");
+ ADD_MEM (fpregs[4], 24);
+ ADD_STRING (" FP5: ");
+ ADD_MEM (fpregs[5], 24);
+ ADD_STRING ("\n FP6: ");
+ ADD_MEM (fpregs[6], 24);
+ ADD_STRING (" FP7: ");
+ ADD_MEM (fpregs[7], 24);
+ ADD_STRING ("\n FPCR: ");
+ ADD_MEM (fpregs[8], 8);
+ ADD_STRING (" FPSR: ");
+ ADD_MEM (fpregs[9], 8);
+ ADD_STRING (" FPIAR: ");
+ ADD_MEM (fpregs[10], 8);
+ ADD_STRING ("\n");
+
+ /* Write the stuff out. */
+ writev (fd, iov, next_iov - iov);
+}
+
+#define REGISTER_DUMP register_dump (fd, ctx)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1af688f19cfe38e90eab09ba481e537a2c9a0703
commit 1af688f19cfe38e90eab09ba481e537a2c9a0703
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 26 00:06:05 1998 +0000
Define O_DIRECT.
Correct comment for O_LARGEFILE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 0dc0c47..7cd32a3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -43,7 +43,11 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
-/* XXX missing */
+#ifdef __USE_GNU
+# define O_DIRECT 040000 /* Direct disk access. */
+#endif
+
+/* Not necessary, files are always with 64bit off_t. */
#define O_LARGEFILE 0
/* Values for the second argument to `fcntl'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7eae898a7c28564882f3747e09c7e1cf15108d4
commit d7eae898a7c28564882f3747e09c7e1cf15108d4
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Aug 24 01:42:29 1998 +0000
* sysdeps/unix/sysv/linux/m68k/Makefile (sysdep_headers): Add
sys/reg.h.
* sysdeps/unix/sysv/linux/m68k/sys/reg.h: New file.
* sysdeps/unix/sysv/linux/m68k/Dist: Distribute it.
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 25aa20b..103e273 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,3 +1,4 @@
bits/mman.h
clone.S
mremap.S
+sys/reg.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 3cedf63..71cee22 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -4,6 +4,7 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX
ifeq ($(subdir),misc)
sysdep_routines += mremap
+sysdep_headers += sys/reg.h
endif
ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/m68k/sys/reg.h b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
new file mode 100644
index 0000000..0f3a133
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sys/reg.h
@@ -0,0 +1,89 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_REG_H
+#define _SYS_REG_H 1
+
+/* Index into an array of 4 byte integers returned from ptrace for
+ location of the users' stored general purpose registers. */
+
+enum
+{
+ PT_D1 = 0,
+#define PT_D1 PT_D1
+ PT_D2 = 1,
+#define PT_D2 PT_D2
+ PT_D3 = 2,
+#define PT_D3 PT_D3
+ PT_D4 = 3,
+#define PT_D4 PT_D4
+ PT_D5 = 4,
+#define PT_D5 PT_D5
+ PT_D6 = 5,
+#define PT_D6 PT_D6
+ PT_D7 = 6,
+#define PT_D7 PT_D7
+ PT_A0 = 7,
+#define PT_A0 PT_A0
+ PT_A1 = 8,
+#define PT_A1 PT_A1
+ PT_A2 = 9,
+#define PT_A2 PT_A2
+ PT_A3 = 10,
+#define PT_A3 PT_A3
+ PT_A4 = 11,
+#define PT_A4 PT_A4
+ PT_A5 = 12,
+#define PT_A5 PT_A5
+ PT_A6 = 13,
+#define PT_A6 PT_A6
+ PT_D0 = 14,
+#define PT_D0 PT_D0
+ PT_USP = 15,
+#define PT_USP PT_USP
+ PT_ORIG_D0 = 16,
+#define PT_ORIG_D0 PT_ORIG_D0
+ PT_SR = 17,
+#define PT_SR PT_SR
+ PT_PC = 18,
+#define PT_PC PT_PC
+ PT_FP0 = 21,
+#define PT_FP0 PT_FP0
+ PT_FP1 = 24,
+#define PT_FP1 PT_FP1
+ PT_FP2 = 27,
+#define PT_FP2 PT_FP2
+ PT_FP3 = 30,
+#define PT_FP3 PT_FP3
+ PT_FP4 = 33,
+#define PT_FP4 PT_FP4
+ PT_FP5 = 36,
+#define PT_FP5 PT_FP5
+ PT_FP6 = 39,
+#define PT_FP6 PT_FP6
+ PT_FP7 = 42,
+#define PT_FP7 PT_FP7
+ PT_FPCR = 45,
+#define PT_FPCR PT_FPCR
+ PT_FPSR = 46,
+#define PT_FPSR PT_FPSR
+ PT_FPIAR = 47
+#define PT_FPIAR PT_FPIAR
+};
+
+#endif /* _SYS_REG_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7bb0de1781c1729ca07bc826348c825b7daaba2
commit d7bb0de1781c1729ca07bc826348c825b7daaba2
Author: Richard Henderson <rth@redhat.com>
Date: Sun Aug 23 04:09:49 1998 +0000
* sysdeps/alpha/fpu/bits/mathinline.h (__floorf, __floor):
Early out for -0. Optimize for !_IEEE_FP_INEXACT.
* sysdeps/alpha/fpu/s_floor.c: New.
* sysdeps/alpha/fpu/s_floorf.c: New.
* sysdeps/alpha/fpu/s_ceil.c: New.
* sysdeps/alpha/fpu/s_ceilf.c: New.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 492d9f1..681ea70 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -75,7 +75,7 @@ __inline_copysign(copysign, double)
#undef __MATH_INLINE_copysign
-#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); }
__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); }
__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); }
@@ -106,7 +106,8 @@ __inline_fabs(fabs, double)
__MATH_INLINE float
__floorf (float __x)
{
- if (fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ /* Check not zero since floor(-0) == -0. */
+ if (__x != 0 && fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
{
/* Note that Alpha S_Floating is stored in registers in a
restricted T_Floating format, so we don't even need to
@@ -116,10 +117,13 @@ __floorf (float __x)
float __tmp1, __tmp2;
__asm ("cvtst/s %3,%2\n\t"
+#ifdef _IEEE_FP_INEXACT
"cvttq/svim %2,%1\n\t"
- "cvtqt/suim %1,%0\n\t"
- "trapb"
- : "=&f"(__x), "=&f"(__tmp1), "=&f"(__tmp2)
+#else
+ "cvttq/svm %2,%1\n\t"
+#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(__x), "=&f"(__tmp1), "=&f"(__tmp2)
: "f"(__x));
}
return __x;
@@ -128,13 +132,17 @@ __floorf (float __x)
__MATH_INLINE double
__floor (double __x)
{
- if (fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ if (__x != 0 && fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
{
double __tmp1;
- __asm ("cvttq/svim %2,%1\n\t"
- "cvtqt/suim %1,%0\n\t"
- "trapb"
- : "=&f"(__x), "=&f"(__tmp1)
+ __asm (
+#ifdef _IEEE_FP_INEXACT
+ "cvttq/svim %2,%1\n\t"
+#else
+ "cvttq/svm %2,%1\n\t"
+#endif
+ "cvtqt/m %1,%0\n\t"
+ : "=f"(__x), "=&f"(__tmp1)
: "f"(__x));
}
return __x;
diff --git a/sysdeps/alpha/fpu/s_ceil.c b/sysdeps/alpha/fpu/s_ceil.c
new file mode 100644
index 0000000..23491db
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ceil.c
@@ -0,0 +1,58 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+double
+__ceil (double x)
+{
+ if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ {
+ double tmp1;
+ unsigned long fpcr0, fpcr1;
+ unsigned long pinf = 3UL << 58;
+
+ /* Set round to +inf. */
+ __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0));
+ __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf));
+
+ /* Calculate! */
+#ifdef _IEEE_FP_INEXACT
+ __asm("cvttq/svid %2,%1\n\tcvtqt/suid %1,%0"
+ : "=f"(x), "=&f"(tmp1)
+ : "f"(x));
+#else
+ __asm("cvttq/svd %2,%1\n\tcvtqt/d %1,%0"
+ : "=f"(x), "=&f"(tmp1)
+ : "f"(x));
+#endif
+
+ /* Reset rounding mode, while retaining new exception bits. */
+ __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1));
+ fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf);
+ __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0));
+ }
+ return x;
+}
+
+weak_alias (__ceil, ceil)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__ceil, __ceill)
+weak_alias (__ceil, ceill)
+#endif
diff --git a/sysdeps/alpha/fpu/s_ceilf.c b/sysdeps/alpha/fpu/s_ceilf.c
new file mode 100644
index 0000000..3defaeb
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_ceilf.c
@@ -0,0 +1,59 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <math.h>
+
+float
+__ceilf (float x)
+{
+ if (x != 0 && fabsf (x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ {
+ float tmp1, tmp2;
+ unsigned long fpcr0, fpcr1;
+ unsigned long pinf = 3UL << 58;
+
+ /* Set round to +inf. */
+ __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr0));
+ __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0 | pinf));
+
+ /* Calculate!
+ Note that Alpha S_Floating is stored in registers in a
+ restricted T_Floating format, so we don't even need to
+ convert back to S_Floating in the end. The initial
+ conversion to T_Floating is needed to handle denormals. */
+
+#ifdef _IEEE_FP_INEXACT
+ __asm("cvtst/s %3,%2\n\tcvttq/svid %2,%1\n\tcvtqt/suid %1,%0"
+ : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
+ : "f"(x));
+#else
+ __asm("cvtst/s %3,%2\n\tcvttq/svd %2,%1\n\tcvtqt/d %1,%0"
+ : "=f"(x), "=&f"(tmp1), "=&f"(tmp2)
+ : "f"(x));
+#endif
+
+ /* Reset rounding mode, while retaining new exception bits. */
+ __asm __volatile("excb; mf_fpcr %0" : "=f"(fpcr1));
+ fpcr0 = (fpcr0 & pinf) | (fpcr1 & ~pinf);
+ __asm __volatile("mt_fpcr %0; excb" : : "f"(fpcr0));
+ }
+ return x;
+}
+
+weak_alias (__ceilf, ceilf)
diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c
new file mode 100644
index 0000000..7b64792
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_floor.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef __USE_EXTERN_INLINES
+#define __USE_EXTERN_INLINES
+#endif
+#define __floor __i_floor
+
+#include <math.h>
+
+#undef __floor
+
+double
+__floor (double x)
+{
+ return __i_floor(x);
+}
+
+weak_alias (__floor, floor)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__floor, __floorl)
+weak_alias (__floor, floorl)
+#endif
diff --git a/sysdeps/alpha/fpu/s_floorf.c b/sysdeps/alpha/fpu/s_floorf.c
new file mode 100644
index 0000000..d25643d
--- /dev/null
+++ b/sysdeps/alpha/fpu/s_floorf.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef __USE_EXTERN_INLINES
+#define __USE_EXTERN_INLINES
+#endif
+#define __floorf __i_floorf
+
+#include <math.h>
+
+#undef __floorf
+
+float
+__floorf (float x)
+{
+ return __i_floorf(x);
+}
+
+weak_alias (__floorf, floorf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b1370b85767bc5ff8c71865bcadbf68fda3487a
commit 9b1370b85767bc5ff8c71865bcadbf68fda3487a
Author: Richard Henderson <rth@redhat.com>
Date: Sun Aug 23 04:09:25 1998 +0000
* sysdeps/alpha/fpu/e_sqrt.c: Use the asm version when the input is
a finite non-denormal, deferring to the full IEEE version otherwise.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index 58de39f..7b4e596 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -18,16 +18,15 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * We have three versions, depending on how exact we need the results.
- */
-
-#if defined(_IEEE_FP) && defined(_IEEE_FP_INEXACT)
-/* Most demanding: go to the original source. */
-#include <libm-ieee754/e_sqrt.c>
+#if !defined(_IEEE_FP_INEXACT)
-#else
+/*
+ * This version is much faster than generic sqrt implementation, but
+ * it doesn't handle the inexact flag. It doesn't handle exceptional
+ * values either, but will defer to the full ieee754_sqrt routine which
+ * can.
+ */
/* Careful with rearranging this without consulting the assembly below. */
const static struct sqrt_data_struct {
@@ -54,112 +53,6 @@ const static struct sqrt_data_struct {
0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd }
};
-#ifdef _IEEE_FP
-/*
- * This version is much faster than the standard one included above,
- * but it doesn't maintain the inexact flag.
- */
-
-#define lobits(x) (((unsigned int *)&x)[0])
-#define hibits(x) (((unsigned int *)&x)[1])
-
-static inline double initial_guess(double x, unsigned int k,
- const struct sqrt_data_struct * const ptr)
-{
- double ret = 0.0;
-
- k = 0x5fe80000 - (k >> 1);
- k = k - ptr->T2[63&(k>>14)];
- hibits(ret) = k;
- return ret;
-}
-
-/* up = nextafter(1,+Inf), dn = nextafter(1,-Inf) */
-
-#define __half (ptr->half)
-#define __one_and_a_half (ptr->one_and_a_half)
-#define __two_to_minus_30 (ptr->two_to_minus_30)
-#define __one (ptr->one)
-#define __up (ptr->up)
-#define __dn (ptr->dn)
-#define __Nan (ptr->nan)
-
-#define Double(x) (*(double *)&x)
-
-/* Multiply with chopping rounding.. */
-#define choppedmul(a,b,c) \
- __asm__("multc %1,%2,%0":"=&f" (c):"f" (a), "f" (b))
-
-double
-__ieee754_sqrt(double x)
-{
- const struct sqrt_data_struct * const ptr = &sqrt_data;
- unsigned long k, bits;
- double y, z, zp, zn;
- double dn, up, low, high;
- double half, one_and_a_half, one, two_to_minus_30;
-
- *(double *)&bits = x;
- k = bits;
-
- /* Negative or NaN or Inf */
- if ((k >> 52) >= 0x7ff)
- goto special;
- y = initial_guess(x, k >> 32, ptr);
- half = Double(__half);
- one_and_a_half = Double(__one_and_a_half);
- y = y*(one_and_a_half - half*x*y*y);
- dn = Double(__dn);
- two_to_minus_30 = Double(__two_to_minus_30);
- y = y*((one_and_a_half - two_to_minus_30) - half*x*y*y);
- up = Double(__up);
- z = x*y;
- one = Double(__one);
- z = z + half*z*(one-z*y);
-
- choppedmul(z,dn,zp);
- choppedmul(z,up,zn);
-
- choppedmul(z,zp,low);
- low = low - x;
- choppedmul(z,zn,high);
- high = high - x;
-
- /* I can't get gcc to use fcmov's.. */
- __asm__("fcmovge %2,%3,%0"
- :"=f" (z)
- :"0" (z), "f" (low), "f" (zp));
- __asm__("fcmovlt %2,%3,%0"
- :"=f" (z)
- :"0" (z), "f" (high), "f" (zn));
- return z; /* Argh! gcc jumps to end here */
-
-special:
- /* throw away sign bit */
- k <<= 1;
- /* -0 */
- if (!k)
- return x;
- /* special? */
- if ((k >> 53) == 0x7ff) {
- /* NaN? */
- if (k << 11)
- return x;
- /* sqrt(+Inf) = +Inf */
- if (x > 0)
- return x;
- }
-
- x = Double(__Nan);
- return x;
-}
-
-#else
-/*
- * This version is much faster than generic sqrt implementation, but
- * it doesn't handle exceptional values or the inexact flag.
- */
-
asm ("\
/* Define offsets into the structure defined in C above. */
$DN = 0*8
@@ -174,7 +67,7 @@ asm ("\
$Y = 8
.text
- .align 3
+ .align 5
.globl __ieee754_sqrt
.ent __ieee754_sqrt
__ieee754_sqrt:
@@ -187,72 +80,86 @@ __ieee754_sqrt:
#endif
" .prologue 1
- stt $f16, $K($sp)
- lda $4, sqrt_data # load base address into t3
- fblt $f16, $negative
-
- /* Compute initial guess. */
+ .align 4
+ stt $f16, $K($sp) # e0 :
+ mult $f31, $f31, $f31 # .. fm :
+ lda $4, sqrt_data # e0 :
+ fblt $f16, $fixup # .. fa :
- .align 3
-
- ldah $2, 0x5fe8 # e0 :
- ldq $3, $K($sp) # .. e1 :
- ldt $f12, $HALF($4) # e0 :
+ ldah $2, 0x5fe8 # e0 :
+ ldq $3, $K($sp) # .. e1 :
+ ldt $f12, $HALF($4) # e0 :
ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 :
- srl $3, 33, $1 # e0 :
- mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5
- subl $2, $1, $2 # e0 :
- addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
- srl $2, 12, $1 # e0 :
- and $1, 0xfc, $1 # .. e1 :
- addq $1, $4, $1 # e0 :
- ldl $1, $T2($1) # .. e1 :
- addt $f12, $f17, $f15 # fa : $f15 = 1.5
- subl $2, $1, $2 # .. e1 :
- sll $2, 32, $2 # e0 :
- ldt $f14, $DN($4) # .. e1 :
- stq $2, $Y($sp) # e0 :
- nop # .. e1 : avoid pipe flash
- nop # e0 :
- ldt $f13, $Y($sp) # .. e1 :
- mult/su $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
- mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y
- subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y)
- mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y)
- mult/su $f11, $f13, $f1 # fm : $f11 = x * 0.5 * yp
- mult $f1, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
- subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp
- mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1
- subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5)
- ldt $f15, $UP($4) # .. e1 :
- mult/su $f16, $f13, $f10 # fm : z = $f10 = x * ypp
- mult $f10, $f13, $f11 # fm : $f11 = z*ypp
+ sll $3, 52, $5 # e0 :
+ lda $6, 0x7fd # .. e1 :
+ fnop # .. fa :
+ fnop # .. fm :
+
+ subq $5, 1, $5 # e1 :
+ srl $3, 33, $1 # .. e0 :
+ cmpule $5, $6, $5 # e0 :
+ beq $5, $fixup # .. e1 :
+
+ mult $f16, $f12, $f11 # fm : $f11 = x * 0.5
+ subl $2, $1, $2 # .. e0 :
+ addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
+ srl $2, 12, $1 # e0 :
+
+ and $1, 0xfc, $1 # e0 :
+ addq $1, $4, $1 # e1 :
+ ldl $1, $T2($1) # e0 :
+ addt $f12, $f17, $f15 # .. fa : $f15 = 1.5
+
+ subl $2, $1, $2 # e0 :
+ ldt $f14, $DN($4) # .. e1 :
+ sll $2, 32, $2 # e0 :
+ stq $2, $Y($sp) # e0 :
+
+ ldt $f13, $Y($sp) # e0 :
+ mult/su $f11, $f13, $f10 # fm 2: $f10 = (x * 0.5) * y
+ mult $f10, $f13, $f10 # fm 4: $f10 = ((x * 0.5) * y) * y
+ subt $f15, $f10, $f1 # fa 4: $f1 = (1.5 - 0.5*x*y*y)
+
+ mult $f13, $f1, $f13 # fm 4: yp = y*(1.5 - 0.5*x*y*y)
+ mult/su $f11, $f13, $f1 # fm 4: $f11 = x * 0.5 * yp
+ mult $f1, $f13, $f11 # fm 4: $f11 = (x * 0.5 * yp) * yp
+ subt $f18, $f11, $f1 # fa 4: $f1= (1.5-2^-30) - 0.5*x*yp*yp
+
+ mult $f13, $f1, $f13 # fm 4: ypp = $f13 = yp*$f1
+ subt $f15, $f12, $f1 # .. fa : $f1 = (1.5 - 0.5)
+ ldt $f15, $UP($4) # .. e0 :
+ mult/su $f16, $f13, $f10 # fm 4: z = $f10 = x * ypp
+
+ mult $f10, $f13, $f11 # fm 4: $f11 = z*ypp
mult $f10, $f12, $f12 # fm : $f12 = z*0.5
- subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp
- mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp)
- addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp)
+ subt $f1, $f11, $f1 # fa 4: $f1 = 1 - z*ypp
+ mult $f12, $f1, $f12 # fm 4: $f12 = z*0.5*(1 - z*ypp)
- mult/c $f0, $f14, $f12 # fm : zmi = zp * DN
+ addt $f10, $f12, $f0 # fa 4: zp=res= z + z*0.5*(1 - z*ypp)
+ mult/c $f0, $f14, $f12 # fm 4: zmi = zp * DN
mult/c $f0, $f15, $f11 # fm : zpl = zp * UP
mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
- mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
- subt/su $f1, $f16, $f13 # fa : y1 = zp*zmi - x
- subt/su $f15, $f16, $f14 # fa : y2 = zp*zpl - x
-
- fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res
- fcmovlt $f14, $f11, $f0 # res = (y2 < 0) ? zpl : res
+ mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
+ subt/su $f1, $f16, $f13 # .. fa : y1 = zp*zmi - x
+ subt/su $f15, $f16, $f14 # fa 4: y2 = zp*zpl - x
+ fcmovge $f13, $f12, $f0 # fa 3: res = (y1 >= 0) ? zmi : res
- addq $sp, 16, $sp # e0 :
+ fcmovlt $f14, $f11, $f0 # fa 4: res = (y2 < 0) ? zpl : res
+ addq $sp, 16, $sp # .. e0 :
ret # .. e1 :
-$negative:
- ldt $f0, $NAN($4)
+ .align 4
+$fixup:
addq $sp, 16, $sp
- ret
+ br "ASM_ALPHA_NG_SYMBOL_PREFIX"__full_ieee754_sqrt..ng
.end __ieee754_sqrt");
-#endif /* _IEEE_FP */
-#endif /* _IEEE_FP && _IEEE_FP_INEXACT */
+static double __full_ieee754_sqrt(double) __attribute__((unused));
+#define __ieee754_sqrt __full_ieee754_sqrt
+
+#endif /* _IEEE_FP_INEXACT */
+
+#include <sysdeps/libm-ieee754/e_sqrt.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0c425dbc5835b23a77225b02abf892ab0321ee9
commit d0c425dbc5835b23a77225b02abf892ab0321ee9
Author: Richard Henderson <rth@redhat.com>
Date: Sun Aug 23 04:08:55 1998 +0000
* sysdeps/unix/sysv/linux/alpha/brk.S: Use jmp macro for relaxation.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 6f99493..9ecd0d4 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -73,9 +73,8 @@ $ok: stq a0, __curbrk
/* What a horrible way to die. */
$err0: ldi v0, ENOMEM
-$err1: lda pv, __syscall_error
- addq sp, 8, sp
- jmp zero, (pv), __syscall_error
+$err1: addq sp, 8, sp
+ jmp zero, __syscall_error
END(__brk)
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 9ba849f..08a3e1c 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -96,9 +96,8 @@ $do32: ldi v0, SYS_ify(osf_getitimer)
.align 3
$error:
- lda pv, __syscall_error
addq sp, 16, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(GETITIMER)
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index 83cfc9e..0c7fb1a 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -124,9 +124,8 @@ $do32: ldi v0, SYS_ify(osf_getrusage)
.align 3
$error:
- lda pv, __syscall_error
addq sp, 16, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(GETRUSAGE)
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index 6f7082f..e56893b 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -93,9 +93,8 @@ $do32: ldi v0, SYS_ify(osf_gettimeofday)
.align 3
$error:
- lda pv, __syscall_error
addq sp, 16, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(GETTIMEOFDAY)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index e118ff1..ae559d9 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -52,9 +52,8 @@ $error:
br gp, 1f
1: ldgp gp, 0(gp)
#endif
- lda pv, __syscall_error
lda sp, 16(sp)
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(__ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index b38d67e..779dc0b 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -51,9 +51,8 @@ $error:
br gp, 1f
1: ldgp gp, 0(gp)
#endif
- lda pv, __syscall_error
lda sp, 16(sp)
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(__ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index c854f7f..704e71d 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -107,9 +107,8 @@ $do32:
.align 3
$error:
- lda pv, __syscall_error
addq sp, 64, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(SELECT)
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index e57acc2..0fc5fe7 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -112,9 +112,8 @@ $do32:
.align 3
$error:
- lda pv, __syscall_error
addq sp, 48, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(SETITIMER)
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index ae129ec..35c5602 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -93,9 +93,8 @@ $do32:
.align 3
$error:
- lda pv, __syscall_error
addq sp, 16, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(SETTIMEOFDAY)
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index a1d2b15..959ec85 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -98,9 +98,8 @@ $do32:
.align 3
$error:
- lda pv, __syscall_error
addq sp, 16, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(UTIMES)
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 334836f..08b3a09 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -131,9 +131,8 @@ $do32: ldi v0, SYS_ify(osf_wait4)
.align 3
$error:
- lda pv, __syscall_error
addq sp, 32, sp
- jmp zero, (pv), __syscall_error
+ jmp zero, __syscall_error
END(WAIT4)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4bb0cd806b955b588f65eeb8f41aff6ce68f6455
commit 4bb0cd806b955b588f65eeb8f41aff6ce68f6455
Author: Richard Henderson <rth@redhat.com>
Date: Sun Aug 23 04:08:17 1998 +0000
* sysdeps/alpha/elf/crtbegin.S: Fix .prologue; no pv used.
* sysdeps/alpha/elf/crtend.S: Likewise.
* sysdeps/alpha/elf/start.S: Likewise.
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
index e6147c2..25ddaaf 100644
--- a/sysdeps/alpha/elf/crtbegin.S
+++ b/sysdeps/alpha/elf/crtbegin.S
@@ -74,7 +74,7 @@ __do_global_dtors_aux:
stq $9,8($sp)
stq $26,0($sp)
.mask (1<<26)|(1<<9), -16
- .prologue 1
+ .prologue 0
lda $9,__DTOR_LIST__
br 1f
diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S
index 7f51d81..198aba8 100644
--- a/sysdeps/alpha/elf/crtend.S
+++ b/sysdeps/alpha/elf/crtend.S
@@ -74,7 +74,7 @@ __do_global_ctors_aux:
stq $9,8($sp)
stq $26,0($sp)
.mask (1<<26)|(1<<9), -16
- .prologue 1
+ .prologue 0
lda $9,__CTOR_END__
br 1f
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index ecb8174..b5e5df1 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -30,7 +30,7 @@ _start:
br gp, 1f
1: ldgp gp, 0(gp)
subq sp, 16, sp
- .prologue 1
+ .prologue 0
/* Load address of the user's main function. */
lda a0, main
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06f351fa6145c20445e7be4ed376ae72bc49b756
commit 06f351fa6145c20445e7be4ed376ae72bc49b756
Author: Richard Henderson <rth@redhat.com>
Date: Sun Aug 23 04:07:48 1998 +0000
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix .prologue;
non-standard pv usage.
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 3959e5d..5697584 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -37,7 +37,8 @@ ENTRY(__syscall_rt_sigaction)
jsr AT, (AT), _mcount
.set at
#endif
- .prologue 1
+ /* Indicate non-standard use of our PV. */
+ .prologue 2
beq a1, 0f
ldl t0, 8(a1) # sa_flags
@@ -79,6 +80,7 @@ rt_sigreturn:
#else
ENTRY(__syscall_rt_sigaction)
ldgp $29,0($27)
+ .prologue 1
ldi $0,ENOSYS
jmp __syscall_error
END(__syscall_rt_sigaction)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64082f3e9c0b5d5c8ce802902edba462b102bfa0
commit 64082f3e9c0b5d5c8ce802902edba462b102bfa0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 22 07:54:18 1998 +0000
ARM specific optimized string functions.
diff --git a/sysdeps/arm/bits/string.h b/sysdeps/arm/bits/string.h
new file mode 100644
index 0000000..8dce456
--- /dev/null
+++ b/sysdeps/arm/bits/string.h
@@ -0,0 +1,150 @@
+/* Optimized, inlined string functions. ARM version.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _STRING_H
+# error "Never use <bits/string.h> directly; include <string.h> instead."
+#endif
+
+/* We must defeat the generic optimized versions of these functions in
+ <bits/string2.h> since they don't work on the ARM. */
+#define _HAVE_STRING_ARCH_strcpy 1
+#define _HAVE_STRING_ARCH_stpcpy 1
+
+/* We only provide optimizations if GNU CC is used and this is a little
+ endian system (the code below does not work on big endian machines).
+ With current versions of GCC these optimi\ations produce quite a large
+ amount of code so we only enable them if the user specifically asked
+ for it. */
+#if !defined __NO_STRING_INLINES && defined __GNUC__ && __GNUC__ >= 2 \
+ && !defined __ARMEB__ && defined __USE_STRING_INLINES
+
+/* Copy SRC to DEST. */
+#define strcpy(dest, src) \
+ (__extension__ (__builtin_constant_p (src) \
+ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \
+ ? __strcpy_small (dest, src, strlen (src) + 1) \
+ : (char *) memcpy (dest, src, strlen (src) + 1)) \
+ : strcpy (dest, src)))
+
+#define __strcpy_small(dest, src, srclen) \
+ (__extension__ ({ char *__dest = (char *) (dest); \
+ const char *__src = (const char *) (src); \
+ size_t __srclen = (srclen); \
+ switch (__srclen) \
+ { \
+ case 5: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 1: \
+ *__dest++ = '\0'; \
+ break; \
+ case 6: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 2: \
+ *((unsigned short int *) __dest) = \
+ __src[0]; \
+ __dest += 2; \
+ break; \
+ case 7: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 3: \
+ *((unsigned short int *) __dest) = \
+ *((const unsigned short int *) (__src)); \
+ __dest[2] = '\0'; \
+ __dest += 3; \
+ break; \
+ case 8: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 4: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned short int *) (__src)) | \
+ (__src[2] << 16); \
+ __dest += 4; \
+ break; \
+ } \
+ (__dest - __srclen) ; }))
+
+/* Copy SRC to DEST, returning pointer to final NUL byte. */
+#define __stpcpy(dest, src) \
+ (__extension__ (__builtin_constant_p (src) \
+ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \
+ ? __stpcpy_small (dest, src, strlen (src) + 1) \
+ : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\
+ : __stpcpy (dest, src)))
+
+#define __stpcpy_small(dest, src, srclen) \
+ (__extension__ ({ char *__dest = (char *) (dest); \
+ const char *__src = (const char *) (src); \
+ switch (srclen) \
+ { \
+ case 5: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 1: \
+ *__dest++ = '\0'; \
+ break; \
+ case 6: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 2: \
+ *((unsigned short int *) __dest) = \
+ __src[0]; \
+ __dest += 2; \
+ break; \
+ case 7: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 3: \
+ *((unsigned short int *) __dest) = \
+ *((const unsigned short int *) (__src)); \
+ __dest[2] = '\0'; \
+ __dest += 3; \
+ break; \
+ case 8: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned long int *) (__src)); \
+ __dest += 4; \
+ __src += 4; \
+ case 4: \
+ *((unsigned long int *) __dest) = \
+ *((const unsigned short int *) (__src)) | \
+ (__src[2] << 16); \
+ __dest += 4; \
+ break; \
+ } \
+ __dest; }))
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33a6c3dded34702cb77025bb1fa34a2d4f91ed44
commit 33a6c3dded34702cb77025bb1fa34a2d4f91ed44
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 21 22:29:47 1998 +0000
Generated from configure.in.
diff --git a/sysdeps/unix/sysv/linux/alpha/configure b/sysdeps/unix/sysv/linux/alpha/configure
new file mode 100644
index 0000000..5b36e71
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/configure
@@ -0,0 +1,51 @@
+ # Local configure fragment for sysdeps/unix/sysv/linux/alpha.
+
+# Don't bother trying to generate any glue code to be compatible with the
+# existing system library, because we are the only system library.
+inhibit_glue=yes
+
+if test -n "$sysheaders"; then
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $SYSINCLUDES"
+fi
+echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
+echo "configure:13: checking installed Linux kernel header files" >&5
+if eval "test \"`echo '$''{'libc_cv_linux21100'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 18 "configure"
+#include "confdefs.h"
+#include <linux/version.h>
+int main() {
+#if LINUX_VERSION_CODE < (2 *65536+ 1 *256+ 100) /* 2.1.100 */
+eat flaming death
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:27: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ libc_cv_linux21100='2.1.100 or later'
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ libc_cv_linux21100='TOO OLD!'
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_linux21100" 1>&6
+if test "$libc_cv_linux21100" != '2.1.100 or later'; then
+ { echo "configure: error: GNU libc requires kernel header files from
+Linux 2.1.100 or later to be installed before configuring.
+The kernel header files are found usually in /usr/include/asm and
+/usr/include/linux; make sure these directories use files from
+Linux 2.1.100 or later. This check uses <linux/version.h>, so
+make sure that file was built correctly when installing the kernel header
+files. To use kernel headers not from /usr/include/linux, use the
+configure option --with-headers." 1>&2; exit 1; }
+fi
+if test -n "$sysheaders"; then
+ CFLAGS=$OLD_CFLAGS
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=619385e2325885d6603b204f82af0ffbac397ed6
commit 619385e2325885d6603b204f82af0ffbac397ed6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 21 22:29:33 1998 +0000
New file, contains test for recent Linux 2.1.100+ headers.
diff --git a/sysdeps/unix/sysv/linux/alpha/configure.in b/sysdeps/unix/sysv/linux/alpha/configure.in
new file mode 100644
index 0000000..690defa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/configure.in
@@ -0,0 +1,36 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/alpha.
+
+# Don't bother trying to generate any glue code to be compatible with the
+# existing system library, because we are the only system library.
+inhibit_glue=yes
+
+define([LIBC_LINUX_VERSION],[2.1.100])dnl
+if test -n "$sysheaders"; then
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $SYSINCLUDES"
+fi
+define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
+AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
+AC_TRY_COMPILE([#include <linux/version.h>],
+[#if LINUX_VERSION_CODE < ]dnl
+patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
+[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
+eat flaming death
+#endif],
+ libc_cv_linuxVER='LIBC_LINUX_VERSION or later',
+ libc_cv_linuxVER='TOO OLD!')])
+if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
+ AC_MSG_ERROR([GNU libc requires kernel header files from
+Linux LIBC_LINUX_VERSION or later to be installed before configuring.
+The kernel header files are found usually in /usr/include/asm and
+/usr/include/linux; make sure these directories use files from
+Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
+make sure that file was built correctly when installing the kernel header
+files. To use kernel headers not from /usr/include/linux, use the
+configure option --with-headers.])
+fi
+if test -n "$sysheaders"; then
+ CFLAGS=$OLD_CFLAGS
+fi
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=072901a1098e2de00d852a85d8c53025a3fb9073
commit 072901a1098e2de00d852a85d8c53025a3fb9073
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:39:48 1998 +0000
Remove O_READ and O_WRITE.
Add F_SETSIG and F_GETSIG.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 09d6fb6..0a0d9c9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,11 +24,6 @@
#include <sys/types.h>
-/* In GNU, read and write are bits (unlike BSD). */
-#ifdef __USE_GNU
-# define O_READ O_RDONLY /* Open for reading. */
-# define O_WRITE O_WRONLY /* Open for writing. */
-#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0x0003
@@ -66,8 +61,13 @@
#define F_SETLKW64 7 /* Set record locking info (blocking). */
#ifdef __USE_BSD
-# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
-# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
+# define F_SETOWN 24 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 23 /* Set owner of socket (receiver of SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
#endif
/* for F_[GET|SET]FL */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb759cab5a7248e65306a89eb2702b4b045974b5
commit cb759cab5a7248e65306a89eb2702b4b045974b5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:37:44 1998 +0000
Initialization stuff for Linux/ARM.
diff --git a/sysdeps/unix/sysv/linux/arm/init-first.h b/sysdeps/unix/sysv/linux/arm/init-first.h
new file mode 100644
index 0000000..d68c368
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/init-first.h
@@ -0,0 +1,55 @@
+/* Prepare arguments for library initialization function.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* The job of this fragment it to find argc and friends for INIT.
+ This is done in one of two ways: either in the stack context
+ of program start, or having dlopen pass them in.
+
+ */
+
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+void NAME (void* arg, ...) \
+{ \
+ int argc; \
+ char** argv; \
+ char** envp; \
+ /* The next variable is only here to work around a bug in gcc <= 2.7.2.2. \
+ If the address would be taken inside the expression the optimizer \
+ would try to be too smart and throws it away. Grrr. */ \
+ int *dummy_addr = &_dl_starting_up; \
+ \
+ __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \
+ \
+ if (!__libc_multiple_libcs) \
+ { \
+ /* The ... in the arg list above forces the gnu ARM compiler to \
+ push r0, r1, r2, r3 onto the stack. This way we can get the address */ \
+ argc = *(int*) (&arg+4); \
+ argv = (char **) &arg + 5; \
+ envp = &argv[argc+1]; \
+ } \
+ else /* the three were passed as arguments */ \
+ { \
+ argc = (int)arg; \
+ argv = (char**)*(&arg + 1); \
+ envp = (char**)*(&arg + 2); \
+ } \
+ \
+ INIT (argc, argv, envp); \
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e77c56e8f5461ebeac5052dffeddd30ead548f9f
commit e77c56e8f5461ebeac5052dffeddd30ead548f9f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:37:26 1998 +0000
ARM specific errlist definition.
diff --git a/sysdeps/unix/sysv/linux/arm/errlist.c b/sysdeps/unix/sysv/linux/arm/errlist.c
new file mode 100644
index 0000000..e249522
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/errlist.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sizes.h>
+#include <errlist.h>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+
+# define SYS_ERRLIST __new_sys_errlist
+# define SYS_NERR __new_sys_nerr
+
+asm (".data; .globl __old_sys_errlist; __old_sys_errlist:");
+#endif
+
+#include <sysdeps/gnu/errlist.c>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+asm (".type __old_sys_errlist,%object;.size __old_sys_errlist,"
+ OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);
+
+extern const char *const *__old_sys_errlist;
+
+const int __old_sys_nerr = OLD_ERRLIST_SIZE;
+
+strong_alias (__old_sys_nerr, _old_sys_nerr);
+weak_alias (__old_sys_nerr, _old_sys_nerr)
+symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0);
+symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0);
+weak_alias (__old_sys_errlist, _old_sys_errlist);
+symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0);
+symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0);
+
+weak_alias (__new_sys_nerr, _new_sys_nerr)
+default_symbol_version (__new_sys_nerr, _sys_nerr, GLIBC_2.1);
+default_symbol_version (_new_sys_nerr, sys_nerr, GLIBC_2.1);
+weak_alias (__new_sys_errlist, _new_sys_errlist)
+default_symbol_version (__new_sys_errlist, _sys_errlist, GLIBC_2.1);
+default_symbol_version (_new_sys_errlist, sys_errlist, GLIBC_2.1);
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=29f4d62f4723582988ab75435a6def659a41d25c
commit 29f4d62f4723582988ab75435a6def659a41d25c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:36:51 1998 +0000
Remove O_READ and O_WRITE.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index 1484064..0dc0c47 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,11 +25,6 @@
#include <sys/types.h>
-/* In GNU, read and write are bits (unlike BSD). */
-#ifdef __USE_GNU
-# define O_READ O_RDONLY /* Open for reading. */
-# define O_WRITE O_WRONLY /* Open for writing. */
-#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
@@ -71,6 +66,11 @@
# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
#endif
+#ifdef __USE_GNU
+# define F_SETSIG 10 /* Set number of signal to be sent. */
+# define F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c94b4338b581a10fb3556eb8977817d2e238bf1b
commit c94b4338b581a10fb3556eb8977817d2e238bf1b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:35:44 1998 +0000
Moved one directory up.
diff --git a/sysdeps/arm/fpu/ieee754.h b/sysdeps/arm/fpu/ieee754.h
deleted file mode 100644
index 73f7d6a..0000000
--- a/sysdeps/arm/fpu/ieee754.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _IEEE754_H
-
-#define _IEEE754_H 1
-#include <features.h>
-
-#include <endian.h>
-
-__BEGIN_DECLS
-
-union ieee754_float
- {
- float f;
-
- /* This is the IEEE 754 single-precision format. */
- struct
- {
- unsigned int mantissa:23;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa:22;
- unsigned int quiet_nan:1;
- unsigned int exponent:8;
- unsigned int negative:1;
- } ieee_nan;
- };
-
-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
-
-
-union ieee754_double
- {
- double d;
-
- /* This is the IEEE 754 double-precision format. */
- struct
- {
- unsigned int mantissa0:20;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee;
-
- /* This format makes it easier to see if a NaN is a signalling NaN. */
- struct
- {
- unsigned int mantissa0:19;
- unsigned int quiet_nan:1;
- unsigned int exponent:11;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- } ieee_nan;
- };
-
-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
-
-
-/* The following two structures are correct for `new' floating point systems but
- wrong for the old FPPC. The only solution seems to be to avoid their use on
- old hardware. */
-
-union ieee854_long_double
- {
- long double d;
-
- /* This is the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:32;
- } ieee;
-
- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
- struct
- {
- unsigned int exponent:15;
- unsigned int empty:16;
- unsigned int negative:1;
- unsigned int mantissa1:32;
- unsigned int mantissa0:30;
- unsigned int quiet_nan:1;
- unsigned int one:1;
- } ieee_nan;
- };
-
-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
-
-__END_DECLS
-
-#endif /* ieee754.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a35276bee25f95125258f60be89670d2b0ca6833
commit a35276bee25f95125258f60be89670d2b0ca6833
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:35:29 1998 +0000
(CALL_MCOUNT): Add missing semicolons.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 13d34c7..6247f9c 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -74,8 +74,8 @@
/* If compiled for profiling, call `mcount' at the start of each function. */
#ifdef PROF
#define CALL_MCOUNT \
- str lr,[sp, #-4]! \
- bl PLTJMP(mcount) \
+ str lr,[sp, #-4]! ; \
+ bl PLTJMP(mcount) ; \
ldr lr, [sp], #4
#else
#define CALL_MCOUNT /* Do nothing. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b292f4b3acc1c11950e6e3ec5c850935c63bd47e
commit b292f4b3acc1c11950e6e3ec5c850935c63bd47e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:35:22 1998 +0000
IEEE754 definitions for ARM.
diff --git a/sysdeps/arm/ieee754.h b/sysdeps/arm/ieee754.h
new file mode 100644
index 0000000..73f7d6a
--- /dev/null
+++ b/sysdeps/arm/ieee754.h
@@ -0,0 +1,115 @@
+/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _IEEE754_H
+
+#define _IEEE754_H 1
+#include <features.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ } ieee_nan;
+ };
+
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+
+/* The following two structures are correct for `new' floating point systems but
+ wrong for the old FPPC. The only solution seems to be to avoid their use on
+ old hardware. */
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 double-extended-precision format. */
+ struct
+ {
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:32;
+ } ieee;
+
+ /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+ struct
+ {
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+__END_DECLS
+
+#endif /* ieee754.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=333014b835d5478156274045c400954c03afe3f2
commit 333014b835d5478156274045c400954c03afe3f2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:34:16 1998 +0000
Set __libc_stack_end.
Fix problems with profiling code.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 912f786..c40f9d7 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -99,7 +99,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
end in this function. */
if (profile)
{
- got[2] = (Elf32_Addr) &_dl_runtime_profile;
+ //got[2] = (Elf32_Addr) &_dl_runtime_profile;
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
/* Say that we really want profiling and the timers are started. */
_dl_profile_map = l;
}
@@ -144,7 +145,6 @@ _dl_runtime_resolve:
stmdb sp!,{r0-r3,sl,fp}
@ prepare to call fixup()
-
@ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
sub r1, ip, lr
sub r1, r1, #4
@@ -153,6 +153,7 @@ _dl_runtime_resolve:
@ get pointer to linker struct
ldr r0, [lr, #-4]
+ @ call fixup routine
" CALL_ROUTINE(fixup) "
@ save the return
@@ -165,21 +166,15 @@ _dl_runtime_resolve:
mov pc, ip
.size _dl_runtime_resolve, .-_dl_runtime_resolve
-
+
.globl _dl_runtime_profile
.type _dl_runtime_profile, #function
.align 2
_dl_runtime_profile:
- @ we get caled with
- @ stack[0] contains the return address from this call
- @ ip contains &GOT[n+3] (pointer to function)
- @ lr points to &GOT[2]
-
- @ save almost everything; return add is already on the stack
- stmdb sp!,{r0-r3,fp}
+ @ save almost everything; lr is already on the stack
+ stmdb sp!,{r0-r3,sl,fp}
@ prepare to call fixup()
-
@ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
sub r1, ip, lr
sub r1, r1, #4
@@ -188,18 +183,19 @@ _dl_runtime_profile:
@ get pointer to linker struct
ldr r0, [lr, #-4]
+ @ call profiling fixup routine
" CALL_ROUTINE(profile_fixup) "
@ save the return
mov ip, r0
@ restore the stack
- ldmia sp!,{r0-r3,fp,lr}
+ ldmia sp!,{r0-r3,sl,fp,lr}
@ jump to the newly found address
mov pc, ip
- .size _dl_runtime_profile, .-_dl_runtime_profile
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
.previous
");
#else // PROF
@@ -212,15 +208,33 @@ _dl_runtime_profile:
.align 2
_dl_runtime_resolve:
_dl_runtime_profile:
- stmdb sp!,{r0-r3,fp}
- ldr r1,[sp,#0x34]
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ save almost everything; return add is already on the stack
+ stmdb sp!,{r0-r3,sl,fp}
+
+ @ prepare to call fixup()
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
sub r1, ip, lr
sub r1, r1, #4
add r1, r1, r1
+
+ @ get pointer to linker struct
ldr r0, [lr, #-4]
+
+ @ call profiling fixup routine
" CALL_ROUTINE(fixup) "
+
+ @ save the return
mov ip, r0
- ldmia sp!,{r0-r3,fp,lr}
+
+ @ restore the stack
+ ldmia sp!,{r0-r3,sl,fp,lr}
+
+ @ jump to the newly found address
mov pc, ip
.size _dl_runtime_profile, .-_dl_runtime_profile
@@ -251,6 +265,10 @@ _dl_start_user:
ldr sl, .L_GET_GOT
add sl, pc, sl
.L_GOT_GOT:
+ @ Store the highest stack address
+ ldr r1, .L_STACK_END
+ ldr r1, [sl, r1]
+ str sp, [r1]
@ See if we were run as a command with the executable file
@ name as an extra leading argument.
ldr r1, .L_SKIP_ARGS
@@ -299,6 +317,8 @@ _dl_start_user:
.word _dl_starting_up(GOT)
.L_FINI_PROC:
.word _dl_fini(GOT)
+.L_STACK_END:
+ .word __libc_stack_end(GOT)
.previous\n\
");
@@ -421,14 +441,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
*reloc_addr += value;
break;
}
- case R_ARM_PC24:
- {
- long int disp = (value - (Elf32_Addr) reloc_addr) / 4;
- if ((disp >= (1<<24)) || (disp <= -(1<<24)))
- assert (! "address out of range for PC24 reloc");
- *reloc_addr += disp;
- }
- break;
default:
assert (! "unexpected dynamic reloc type");
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60438273e5fc1aaf86c9e254465325892a5916cd
commit 60438273e5fc1aaf86c9e254465325892a5916cd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:33:57 1998 +0000
Use PLT for procedure call.
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index 6ae6da6..5cecc2a 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -25,5 +25,5 @@
ENTRY (_setjmp)
mov r1, #0
- b C_SYMBOL_NAME(__sigsetjmp)
+ b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
END (_setjmp)
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
index 52622e2..bfa9552 100644
--- a/sysdeps/arm/bsd-setjmp.S
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -25,5 +25,5 @@
ENTRY (setjmp)
mov r1, #1
- b C_SYMBOL_NAME(__sigsetjmp)
+ b PLTJMP(C_SYMBOL_NAME(__sigsetjmp))
END (setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f176c9ee034cef475e857a005d2c142073960d0d
commit f176c9ee034cef475e857a005d2c142073960d0d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:33:32 1998 +0000
Put return value in correct register. Don't set the condition flags
unnecessarily.
Restore floating point registers correctly.
diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S
index 8afa177..25ba6b3 100644
--- a/sysdeps/arm/fpu/__longjmp.S
+++ b/sysdeps/arm/fpu/__longjmp.S
@@ -25,12 +25,12 @@
/* __longjmp(jmpbuf, val) */
ENTRY (__longjmp)
- movs r2, r0
+ mov ip, r0 /* save jmp_buf pointer */
+
movs r0, r1 /* get the return value in place */
- moveq r1, #1 /* can't let setjmp() return zero! */
+ moveq r0, #1 /* can't let setjmp() return zero! */
- add r2, r2, #48
- lfmfd f4, 4, [r2]
+ lfmia f4, 4, [ip] ! /* load the floating point regs */
- LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+ LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=397e58bca857fb98b204a1336e4566292ecc2667
commit 397e58bca857fb98b204a1336e4566292ecc2667
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 20 17:33:18 1998 +0000
Put return value in correct register. Don't set the condition flags
unnecessarily.
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 239b0cf..742e0ba 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -25,9 +25,9 @@
/* __longjmp(jmpbuf, val) */
ENTRY (__longjmp)
- movs r2, r0
+ mov ip, r0
movs r0, r1 /* get the return value in place */
- moveq r1, #1 /* can't let setjmp() return zero! */
+ moveq r0, #1 /* can't let setjmp() return zero! */
- LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+ LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=89f1caf5eec2b6ae37b529b980358bedaa869a9d
commit 89f1caf5eec2b6ae37b529b980358bedaa869a9d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 18 23:21:05 1998 +0000
Define extern inline functions only if __USE_EXTERN_INLINES is defined.
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h
index 1461c93..c5d596d 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h
@@ -48,9 +48,10 @@ typedef struct
#define __SSELT(s) ((s) / __NSSBITS)
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
-#endif
+#ifdef __USE_EXTERN_INLINES
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
_EXTERN_INLINE int
__sigemptyset (__sigset_t *__set)
@@ -92,5 +93,6 @@ __sigismember (__const __sigset_t *__set, int __sig)
return 1;
return 0;
}
+#endif /* use extern inlines. */
#endif /* ! _SIGSET_H_fns */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55e0df36d56ef802b989f5fd14df64436f0fd760
commit 55e0df36d56ef802b989f5fd14df64436f0fd760
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 15 02:39:03 1998 +0000
Correct value of R0 before calling sigjmp_save.
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
index 790e756..6ee53c5 100644
--- a/sysdeps/arm/fpu/setjmp.S
+++ b/sysdeps/arm/fpu/setjmp.S
@@ -30,6 +30,9 @@ ENTRY (__sigsetjmp)
sfmea f4, 4, [r0]!
stmia r0, {v1-v6, sl, fp, sp, lr}
+ /* Restore pointer to jmp_buf */
+ sub r0, r0, #48
+
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
END (__setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ea19c152e105649560d449c5b2585d7004b074f
commit 2ea19c152e105649560d449c5b2585d7004b074f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 15 02:38:53 1998 +0000
Not needed anymore.
diff --git a/sysdeps/arm/elf/setjmp.S b/sysdeps/arm/elf/setjmp.S
deleted file mode 100644
index 51572ca..0000000
--- a/sysdeps/arm/elf/setjmp.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* setjmp for arm, ELF version.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
- /* We include the BSD entry points here as well but we make
- them weak. */
-ENTRY (setjmp)
- .weak C_SYMBOL_NAME (setjmp)
- @ call comes here with
- @ lr = return pc
- @ r0 = &jump_buf
-
- @ add a second argument into the fray
- mov r1, #1
- @ call the common code
- b __sigsetjmp(PLT)
-END (setjmp)
-
- /* Binary compatibility entry point. */
-ENTRY (_setjmp)
- .weak C_SYMBOL_NAME (_setjmp)
-ENTRY (__setjmp)
- @ call comes here with
- @ lr = return pc
- @ r0 = &jump_buf
-
- @ add a second argument into the fray
- mov r1, #1
- @ fall through to the common code....
-
-ENTRY (__sigsetjmp)
- @ save the registers into the jmp_buf....
- stmia r0, {r1-r6, sl, fp, sp, lr}
-
- /* Make a tail call to __sigjmp_save; it takes the same args. */
-#ifdef PIC
- /* We cannot use the PLT, because it requires that sl==r10 be set, but
- we can't save and restore our caller's value. Instead, we do an
- indirect jump through the GOT, using for the temporary register
- ip, which is call-clobbered. */
- ldr ip, 1f
- add ip, ip, pc
-2: @ get the address of __sigjmp_save
- ldr r1, 3f
- ldr ip, [ip, r1]
- @ restore r1
- ldr r1, [r0]
- @ jump to *__sigjmp_save
- mov pc, ip
-1: .word _GLOBAL_OFFSET_TABLE_ - 2b - 4
-3: .word __sigjmp_save(GOT)
-
-#else
- b __sigjmp_save
-#endif
-END (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e7410c350e6e7f093639b90cd6bddb0956d5c1b
commit 8e7410c350e6e7f093639b90cd6bddb0956d5c1b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 12 17:06:17 1998 +0000
(recvmsg, sendmsg): Update aliases for cancelation.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index ef14984..9f002b2 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-__recvmsg - recvmsg 3 __syscall_recvmsg
+recvmsg - recvmsg 3 __libc_recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
send - send 4 __libc_send __send send
-__sendmsg - sendmsg 3 __syscall_sendmsg
+sendmsg - sendmsg 3 __libc_sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=708e91e6e268251edd8f2caba839b4ff6cc278c8
commit 708e91e6e268251edd8f2caba839b4ff6cc278c8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 12 17:06:03 1998 +0000
Undef glob*64 before playing with symbol versions.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 311a923..0ce8d53 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -37,6 +37,8 @@ extern void __new_globfree (glob_t *__pglob);
#undef glob
#undef globfree
+#undef glob64
+#undef globfree64
default_symbol_version(__new_glob, glob, GLIBC_2.1);
default_symbol_version(__new_globfree, globfree, GLIBC_2.1);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9fd2790b9ac35e3fb4dd5de07b57cb017b04c9e
commit b9fd2790b9ac35e3fb4dd5de07b57cb017b04c9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 10 15:54:05 1998 +0000
Empty file. We already have a glob64 implementation.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob64.c b/sysdeps/unix/sysv/linux/alpha/glob64.c
new file mode 100644
index 0000000..33918ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/glob64.c
@@ -0,0 +1 @@
+/* glob64 is in glob.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ef5e9065c1565a3212a12fb6d66153f877d3fad
commit 8ef5e9065c1565a3212a12fb6d66153f877d3fad
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 10 15:53:42 1998 +0000
Add glob64 as a weak alias for __new_glob. Likewise for globfree64.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 5baa0ae..311a923 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -15,6 +15,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define glob64 __no_glob64_decl
+#define globfree64 __no_globfree64_decl
+
#include <sys/types.h>
#include <glob.h>
@@ -37,3 +40,6 @@ extern void __new_globfree (glob_t *__pglob);
default_symbol_version(__new_glob, glob, GLIBC_2.1);
default_symbol_version(__new_globfree, globfree, GLIBC_2.1);
+
+weak_alias (__new_glob, glob64)
+weak_alias (__new_globfree, globfree64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc42798dc36b009dd694c991ed3999a4e91977c9
commit fc42798dc36b009dd694c991ed3999a4e91977c9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 9 17:29:46 1998 +0000
Move __ prototypes into include/* header.
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index cf0bf45..6ada4e6 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. OSF/1 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -90,20 +90,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 420aed9..15608e5 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,20 +87,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index b884ba5..1425094 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -71,20 +71,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Ultrix 4 does not implement `msync' or `madvise'. */
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index ff1918e..9147aa7 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Irix 4 version.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -81,20 +81,16 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__ptr_t __addr, size_t __len));
extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=600e633ff62190178d016979c0447ab865c6bdfb
commit 600e633ff62190178d016979c0447ab865c6bdfb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 8 19:56:26 1998 +0000
(_hurd_setup_sighandler): Use SS_DISABLE instead of SA_DISABLE. Use
SS_ONSTACK instead of SA_ONSTACK where appropriate.
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index b650478..a1d0dfb 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. Alpha version.
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,10 +86,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
return NULL;
if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
- !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
{
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
- ss->sigaltstack.ss_flags |= SA_ONSTACK;
+ ss->sigaltstack.ss_flags |= SS_ONSTACK;
/* XXX need to set up base of new stack for
per-thread variables, cthreads. */
}
@@ -114,7 +114,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
{
/* Set up the sigcontext from the current state of the thread. */
- scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0;
/* struct sigcontext is laid out so that starting at sc_regs
mimics a struct alpha_thread_state. */
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
index ceb1623..b046b94 100644
--- a/sysdeps/mach/hurd/hppa/trampoline.c
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. HPPA version.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -75,10 +75,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
return NULL;
if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
- !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
{
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
- ss->sigaltstack.ss_flags |= SA_ONSTACK;
+ ss->sigaltstack.ss_flags |= SS_ONSTACK;
/* XXX need to set up base of new stack for
per-thread variables, cthreads. */
}
@@ -104,7 +104,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* Set up the sigcontext from the current state of the thread. */
- scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0;
/* struct sigcontext is laid out so that starting at sc_regs mimics a
struct parisc_thread_state. */
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index fbb7df5..284b95c 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -77,10 +77,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
state->basic.r16 = state->basic.r29;
if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
- !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
{
sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
- ss->sigaltstack.ss_flags |= SA_ONSTACK;
+ ss->sigaltstack.ss_flags |= SS_ONSTACK;
/* XXX need to set up base of new stack for
per-thread variables, cthreads. */
}
@@ -129,7 +129,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* Set up the sigcontext from the current state of the thread. */
- scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0;
/* struct sigcontext is laid out so that starting at sc_gpr
mimics a struct mips_thread_state. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e66186b39d642076df666844eeb12cc1f680a045
commit e66186b39d642076df666844eeb12cc1f680a045
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 8 19:55:32 1998 +0000
(__sigreturn): Use SS_ONSTACK instead of SA_ONSTACK.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index ff6e4ed..102b023 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -1,5 +1,5 @@
/* Return from signal handler in GNU C library for Hurd. Alpha version.
- Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -65,7 +65,7 @@ __sigreturn (struct sigcontext *scp)
if (scp->sc_onstack)
{
- ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
+ ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */
/* XXX cannot unlock until off sigstack */
abort ();
}
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index fe38fac..0e77573 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,7 +64,7 @@ __sigreturn (struct sigcontext *scp)
if (scp->sc_onstack)
{
- ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
+ ss->sigaltstack.ss_flags &= ~SS_ONSTACK; /* XXX threadvars */
/* XXX cannot unlock until off sigstack */
abort ();
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=197b1bfd0381b0567fc6a3562dadda57dc89fe80
commit 197b1bfd0381b0567fc6a3562dadda57dc89fe80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 30 12:45:33 1998 +0000
Don't define CLK_TCK for strictly ISO C compliant programs.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index 7f26efd..acb2b41 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,11 @@
XSI-conformant systems. */
# define CLOCKS_PER_SEC 1000000
+# ifndef __STRICT_ANSI__
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 1024
+# define CLK_TCK 1024
+# endif
# endif /* bits/time.h */
#endif /* !__need_timeval */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h
index a7b268d..91dc65c 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/time.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux/MIPS version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,9 +33,11 @@
XSI-conformant systems. */
# define CLOCKS_PER_SEC 1000000
+# ifndef __STRICT_ANSI__
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 100 /* XXX not correct for all systems. */
+# define CLK_TCK 100 /* XXX not correct for all systems. */
+# endif
# endif /* bits/time.h */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2e7413870a5c21b396edc142a81eb23ea04db16
commit f2e7413870a5c21b396edc142a81eb23ea04db16
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 30 12:44:22 1998 +0000
Add ffsl entry point.
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index d30bd9d..bed3f46 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -1,7 +1,7 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For mc68020, mc68030, mc68040.
This file is part of the GNU C Library.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define ffsl __something_else
#include <string.h>
#undef ffs
@@ -36,6 +37,8 @@ __ffs (x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
+#undef ffsl
+weak_alias (__ffs, ffsl)
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15602adec09aaac9d38143914e10d4f88388abda
commit 15602adec09aaac9d38143914e10d4f88388abda
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 30 12:38:22 1998 +0000
Dummy file to satisfy Makefiles.
diff --git a/sysdeps/alpha/ffsll.S b/sysdeps/alpha/ffsll.S
new file mode 100644
index 0000000..b2f46d8
--- /dev/null
+++ b/sysdeps/alpha/ffsll.S
@@ -0,0 +1 @@
+/* This function is defined in ffs.S. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0c9758ca4fcbde7d8047c16786c4fbce4abd495
commit e0c9758ca4fcbde7d8047c16786c4fbce4abd495
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 30 12:38:08 1998 +0000
Schedule for EV5. Add ffsl and ffsll entry points.
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 6eb3afd..91cce41 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -25,49 +25,66 @@
.set noreorder
.set noat
+
ENTRY(__ffs)
#ifdef PROF
ldgp gp, 0(pv)
lda AT, _mcount
jsr AT, (AT), _mcount
.prologue 1
+ zap $16, 0xF0, $16
+ br $ffsl..ng
#else
.prologue 0
+ zap $16, 0xF0, $16
+ # FALLTHRU
#endif
+END(__ffs)
- ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing
- addl a0, zero, a0 # the last insn and reduces the stall
- negq a0, t0 # due to the srl instruction
- and a0, t0, t0
- clr v0
- beq a0, $done
-
- # now do binary search for first non-zero bit
-
- zapnot t0, 0x03, t2
- addq v0, 16, t3
- cmoveq t2, t3, v0
-
- zapnot t0, 0x05, t2
- addq v0, 8, t3
- cmoveq t2, t3, v0
-
- srl t0, v0, t0
- addq v0, 1, v0
-
- and t0, 0x0f, t2
- addq v0, 4, t3
- cmoveq t2, t3, v0
-
- and t0, 0x33, t2
- addq v0, 2, t3
- cmoveq t2, t3, v0
-
- and t0, 0x55, t2
- addq v0, 1, t3
- cmoveq t2, t3, v0
-
-$done: ret
+ .align 4
+ENTRY(ffsl)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+$ffsl..ng:
+#else
+ .prologue 0
+#endif
+ not $16, $1 # e0 :
+ ldi $2, -1 # .. e1 :
+ cmpbge $1, $2, $3 # e0 : bit N == 1 for byte N == 0
+ clr $0 # .. e1 :
+ addq $3, 1, $4 # e0 :
+ bic $4, $3, $3 # e1 : bit N == 1 for first byte N != 0
+ and $3, 0xF0, $4 # e0 :
+ and $3, 0xCC, $5 # .. e1 :
+ and $3, 0xAA, $6 # e0 :
+ cmovne $4, 4, $0 # .. e1 :
+ cmovne $5, 2, $5 # e0 :
+ cmovne $6, 1, $6 # .. e1 :
+ addl $0, $5, $0 # e0 :
+ addl $0, $6, $0 # e1 : $0 == N
+ extbl $16, $0, $1 # e0 : $1 == byte N
+ ldi $2, 1 # .. e1 :
+ negq $1, $3 # e0 :
+ and $3, $1, $3 # e1 : bit N == least bit set of byte N
+ and $3, 0xF0, $4 # e0 :
+ and $3, 0xCC, $5 # .. e1 :
+ and $3, 0xAA, $6 # e0 :
+ cmovne $4, 5, $2 # .. e1 :
+ cmovne $5, 2, $5 # e0 :
+ cmovne $6, 1, $6 # .. e1 :
+ s8addl $0, $2, $0 # e0 : mult byte ofs by 8 and sum
+ addl $5, $6, $5 # .. e1 :
+ addl $0, $5, $0 # e0 :
+ nop # .. e1 :
+ cmoveq $16, 0, $0 # e0 : trap input == 0 case.
+ ret # .. e1 : 18
+
+END(ffsl)
- END(__ffs)
weak_alias (__ffs, ffs)
+weak_extern (ffsl)
+weak_alias (ffsl, ffsll)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=230ba858b40d68216b85b71f3519d0074eeba396
commit 230ba858b40d68216b85b71f3519d0074eeba396
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 29 15:14:10 1998 +0000
Arm with FPU specific files to distribute.
diff --git a/sysdeps/arm/fpu/Dist b/sysdeps/arm/fpu/Dist
new file mode 100644
index 0000000..d78de40
--- /dev/null
+++ b/sysdeps/arm/fpu/Dist
@@ -0,0 +1 @@
+ieee754.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e6a624f76e081c4bce106135d157aa11312a7a3
commit 9e6a624f76e081c4bce106135d157aa11312a7a3
Author: Richard Henderson <rth@redhat.com>
Date: Tue Jul 28 23:41:26 1998 +0000
* sysdeps/alpha/fpu/e_sqrt.c [!_IEEE_FP]: Correctly handle
inputs near DBL_MIN.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
index 76fa015..58de39f 100644
--- a/sysdeps/alpha/fpu/e_sqrt.c
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -212,19 +212,21 @@ __ieee754_sqrt:
sll $2, 32, $2 # e0 :
ldt $f14, $DN($4) # .. e1 :
stq $2, $Y($sp) # e0 :
- ldt $f13, $Y($sp) # e1 :
+ nop # .. e1 : avoid pipe flash
+ nop # e0 :
+ ldt $f13, $Y($sp) # .. e1 :
- mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
+ mult/su $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y
subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y)
mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y)
- mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp
- mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
+ mult/su $f11, $f13, $f1 # fm : $f11 = x * 0.5 * yp
+ mult $f1, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp
mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1
subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5)
ldt $f15, $UP($4) # .. e1 :
- mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp
+ mult/su $f16, $f13, $f10 # fm : z = $f10 = x * ypp
mult $f10, $f13, $f11 # fm : $f11 = z*ypp
mult $f10, $f12, $f12 # fm : $f12 = z*0.5
subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp
@@ -236,11 +238,11 @@ __ieee754_sqrt:
mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
- subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x
- subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x
+ subt/su $f1, $f16, $f13 # fa : y1 = zp*zmi - x
+ subt/su $f15, $f16, $f14 # fa : y2 = zp*zpl - x
fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res
- fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res
+ fcmovlt $f14, $f11, $f0 # res = (y2 < 0) ? zpl : res
addq $sp, 16, $sp # e0 :
ret # .. e1 :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60839328e827635bb5638d76e38cdb0666c81742
commit 60839328e827635bb5638d76e38cdb0666c81742
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:54:43 1998 +0000
siglist for Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/siglist.c b/sysdeps/unix/sysv/linux/arm/siglist.c
new file mode 100644
index 0000000..9a53960
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/siglist.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <stddef.h>
+#include <signal.h>
+#include <sizes.h>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+# define SYS_SIGLIST __new_sys_siglist
+# define SYS_SIGABBREV __new_sys_sigabbrev
+#else
+# define SYS_SIGLIST _sys_siglist
+# define SYS_SIGABBREV _sys_sigabbrev
+#endif
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+asm (".data; .globl __old_sys_siglist; __old_sys_siglist:");
+#endif
+
+const char *const SYS_SIGLIST[NSIG] =
+{
+#define init_sig(sig, abbrev, desc) [sig] desc,
+#include "siglist.h"
+#undef init_sig
+};
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+asm (".type __old_sys_siglist,%object;.size __old_sys_siglist,"
+ OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
+
+asm (".data; .globl __old_sys_sigabbrev; __old_sys_sigabbrev:");
+#endif
+
+const char *const SYS_SIGABBREV[NSIG] =
+{
+#define init_sig(sig, abbrev, desc) [sig] abbrev,
+#include "siglist.h"
+#undef init_sig
+};
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+asm (".type __old_sys_sigabbrev,%object;.size __old_sys_sigabbrev,"
+ OLD_SIGLIST_SIZE_STR "*" PTR_SIZE_STR);
+
+extern const char *const *__old_sys_siglist;
+extern const char *const *__old_sys_sigabbrev;
+
+strong_alias (__old_sys_siglist, _old_sys_siglist)
+symbol_version (__old_sys_siglist, _sys_siglist, GLIBC_2.0);
+symbol_version (_old_sys_siglist, sys_siglist, GLIBC_2.0);
+symbol_version (__old_sys_sigabbrev, sys_sigabbrev, GLIBC_2.0);
+
+strong_alias (__new_sys_siglist, _new_sys_siglist)
+default_symbol_version (__new_sys_siglist, _sys_siglist, GLIBC_2.1);
+default_symbol_version (_new_sys_siglist, sys_siglist, GLIBC_2.1);
+default_symbol_version (__new_sys_sigabbrev, sys_sigabbrev, GLIBC_2.1);
+#else
+weak_alias (_sys_siglist, sys_siglist)
+weak_alias (_sys_sigabbrev, sys_sigabbrev)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3ec78f5a3d69b3a5ba3d4e3a3b9b1e50312cabf
commit e3ec78f5a3d69b3a5ba3d4e3a3b9b1e50312cabf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:54:21 1998 +0000
Replace stub with real implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index 8125ebf..728d62f 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -1,5 +1,6 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Pat Beirne <patb@corelcomputer.com>
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -27,7 +28,38 @@
.text
ENTRY(__clone)
- /* Somebody needs to write this. */
+ @ sanity check args
+ cmp r0, #0
+ cmpne r1, #0
+ moveq r0, #-EINVAL
+ beq PLTJMP(syscall_error)
+
+ @ insert the args onto the new stack
+ sub r1, r1, #8
+ str r3, [r1, #4]
+ @ save the function pointer as the 0th element
+ str r0, [r1]
+
+ @ do the system call
+ @ get flags
+ mov r0, r2
+ @ new sp is already in r1
+ swi SYS_ify(clone)
+ cmp r0, #0
+ blt PLTJMP(syscall_error)
+ beq thread_start
+ @ else, thread was launched...
+ mov pc, lr
+
+thread_start:
+ @ pick the function arg and call address off the stack and execute
+ ldr r0, [sp, #4]
+ mov lr, pc
+ ldr pc, [sp]
+
+ @ and we are done, passing the return value through r0
+ bl PLTJMP(_exit)
+
PSEUDO_END (__clone)
weak_alias (__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f69a3b40ff134a8e5d7a522f7e9d58a04d6a2fd8
commit f69a3b40ff134a8e5d7a522f7e9d58a04d6a2fd8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:54:08 1998 +0000
brk implementation for Linux/Arm.
diff --git a/sysdeps/unix/sysv/linux/arm/brk.c b/sysdeps/unix/sysv/linux/arm/brk.c
new file mode 100644
index 0000000..560e5a8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/brk.c
@@ -0,0 +1,49 @@
+/* brk system call for Linux/ARM.
+ Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* This must be initialized data because commons can't have aliases. */
+void *__curbrk = 0;
+
+int
+__brk (void *addr)
+{
+ void *newbrk;
+
+ asm ("mov a1, %1\n" /* save the argment in r0 */
+ "swi %2\n" /* do the system call */
+ "mov %0, a1;" /* keep the return value */
+ : "=r"(newbrk)
+ : "r"(addr), "i" (SYS_ify (brk))
+ : "a1");
+
+ __curbrk = newbrk;
+
+ if (newbrk < addr)
+ {
+ __set_errno (ENOMEM);
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2f601732bd5d394bbb1f1805fef381c38a73f134
commit 2f601732bd5d394bbb1f1805fef381c38a73f134
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:52:34 1998 +0000
Definitions for FPU control.
diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h
new file mode 100644
index 0000000..8a2d338
--- /dev/null
+++ b/sysdeps/arm/fpu/fpu_control.h
@@ -0,0 +1,93 @@
+/* FPU control word definitions. ARM version.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* We have a slight terminology confusion here. On the ARM, the register
+ * we're interested in is actually the FPU status word - the FPU control
+ * word is something different (which is implementation-defined and only
+ * accessible from supervisor mode.)
+ *
+ * The FPSR looks like this:
+ *
+ * 31-24 23-16 15-8 7-0
+ * | system ID | trap enable | system control | exception flags |
+ *
+ * We ignore the system ID bits; for interest's sake they are:
+ *
+ * 0000 "old" FPE
+ * 1000 FPPC hardware
+ * 0001 FPE 400
+ * 1001 FPA hardware
+ *
+ * The trap enable and exception flags are both structured like this:
+ *
+ * 7 - 5 4 3 2 1 0
+ * | reserved | INX | UFL | OFL | DVZ | IVO |
+ *
+ * where a `1' bit in the enable byte means that the trap can occur, and
+ * a `1' bit in the flags byte means the exception has occurred.
+ *
+ * The exceptions are:
+ *
+ * IVO - invalid operation
+ * DVZ - divide by zero
+ * OFL - overflow
+ * UFL - underflow
+ * INX - inexact (do not use; implementations differ)
+ *
+ * The system control byte looks like this:
+ *
+ * 7-5 4 3 2 1 0
+ * | reserved | AC | EP | SO | NE | ND |
+ *
+ * where the bits mean
+ *
+ * ND - no denormalised numbers (force them all to zero)
+ * NE - enable NaN exceptions
+ * SO - synchronous operation
+ * EP - use expanded packed-decimal format
+ * AC - use alternate definition for C flag on compare operations
+ */
+
+#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */
+
+/* The fdlibm code requires no interrupts for exceptions. Don't
+ change the rounding mode, it would break long double I/O! */
+#define _FPU_DEFAULT 0x00000000 /* Default value. */
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw))
+#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+__BEGIN_DECLS
+
+/* Called at startup. It can be used to manipulate fpu control register. */
+extern void __setfpucw __P ((fpu_control_t));
+
+__END_DECLS
+
+#endif /* _FPU_CONTROL_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22a7aa47a3f5c735a7c88e3fcf9c681b681ac10f
commit 22a7aa47a3f5c735a7c88e3fcf9c681b681ac10f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:52:15 1998 +0000
(CALL_MCOUNT): Replace stub with real implementation.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 4fc90ae..13d34c7 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -73,10 +73,10 @@
/* If compiled for profiling, call `mcount' at the start of each function. */
#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
-#error Profiling not supported.
+#define CALL_MCOUNT \
+ str lr,[sp, #-4]! \
+ bl PLTJMP(mcount) \
+ ldr lr, [sp], #4
#else
#define CALL_MCOUNT /* Do nothing. */
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d39ca8849e77c1215279214acfdaf48f003f8f6
commit 7d39ca8849e77c1215279214acfdaf48f003f8f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:52:05 1998 +0000
Improved profiling for ARM.
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
index 27643df..96b4c13 100644
--- a/sysdeps/arm/machine-gmon.h
+++ b/sysdeps/arm/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-dependent definitions for profiling support. ARM version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,19 +37,29 @@ static void mcount_internal (u_long frompc, u_long selfpc);
#define _MCOUNT_DECL(frompc, selfpc) \
static void mcount_internal (u_long frompc, u_long selfpc)
-#define MCOUNT \
-void _mcount (void) \
-{ \
- register unsigned long int frompc, selfpc; \
- __asm__("movs fp, fp; " \
- "moveq %0, $0; " \
- "ldrne %0, [fp, $-4]; " \
- "ldrne %1, [fp, $-12]; " \
- "movnes %1, %1; " \
- "ldrne %1, [%1, $-4]; " \
- : "=g" (selfpc), "=g" (frompc) \
- : : "cc" \
- ); \
- if (selfpc) \
- mcount_internal(frompc, selfpc); \
+/* This macro/func MUST save r0, r1 because the compiler inserts
+ blind calls to _mount(), ignoring the fact that _mcount may
+ clobber registers; therefore, _mcount may NOT clobber registers */
+/* if (this_fp!=0) {
+ r0 = this_lr
+ r1 = this_fp
+ r1 = [r1-4] which is caller's fp
+ if (r1!=0)
+ r1 = caller's lr
+ call mcount_internal(this_lr, caller's_lr)
+ }
+*/
+#define MCOUNT \
+void _mcount (void) \
+{ \
+ __asm__("stmdb sp!, {r0, r1, r2, r3};" \
+ "movs fp, fp;" \
+ "moveq r0, #0;" \
+ "ldrne r0, [fp, $-4];" \
+ "ldrne r1, [fp, $-12];" \
+ "movnes r1, r1;" \
+ "ldrne r1, [r1, $-4];" \
+ "movs r1, r1;" \
+ "blne mcount_internal;" \
+ "ldmia sp!, {r0, r1, r2, r3}"); \
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=67950c312ef1db84e050a17d4ffbc3fbf4c34e16
commit 67950c312ef1db84e050a17d4ffbc3fbf4c34e16
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:51:54 1998 +0000
Move to fpu/ subdir.
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
deleted file mode 100644
index 8a2d338..0000000
--- a/sysdeps/arm/fpu_control.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* FPU control word definitions. ARM version.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FPU_CONTROL_H
-#define _FPU_CONTROL_H
-
-/* We have a slight terminology confusion here. On the ARM, the register
- * we're interested in is actually the FPU status word - the FPU control
- * word is something different (which is implementation-defined and only
- * accessible from supervisor mode.)
- *
- * The FPSR looks like this:
- *
- * 31-24 23-16 15-8 7-0
- * | system ID | trap enable | system control | exception flags |
- *
- * We ignore the system ID bits; for interest's sake they are:
- *
- * 0000 "old" FPE
- * 1000 FPPC hardware
- * 0001 FPE 400
- * 1001 FPA hardware
- *
- * The trap enable and exception flags are both structured like this:
- *
- * 7 - 5 4 3 2 1 0
- * | reserved | INX | UFL | OFL | DVZ | IVO |
- *
- * where a `1' bit in the enable byte means that the trap can occur, and
- * a `1' bit in the flags byte means the exception has occurred.
- *
- * The exceptions are:
- *
- * IVO - invalid operation
- * DVZ - divide by zero
- * OFL - overflow
- * UFL - underflow
- * INX - inexact (do not use; implementations differ)
- *
- * The system control byte looks like this:
- *
- * 7-5 4 3 2 1 0
- * | reserved | AC | EP | SO | NE | ND |
- *
- * where the bits mean
- *
- * ND - no denormalised numbers (force them all to zero)
- * NE - enable NaN exceptions
- * SO - synchronous operation
- * EP - use expanded packed-decimal format
- * AC - use alternate definition for C flag on compare operations
- */
-
-#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */
-
-/* The fdlibm code requires no interrupts for exceptions. Don't
- change the rounding mode, it would break long double I/O! */
-#define _FPU_DEFAULT 0x00000000 /* Default value. */
-
-/* Type of the control word. */
-typedef unsigned int fpu_control_t;
-
-/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw))
-#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw))
-
-/* Default control word set at startup. */
-extern fpu_control_t __fpu_control;
-
-__BEGIN_DECLS
-
-/* Called at startup. It can be used to manipulate fpu control register. */
-extern void __setfpucw __P ((fpu_control_t));
-
-__END_DECLS
-
-#endif /* _FPU_CONTROL_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd2791ba88b17fcd65075efc664e9c05fa4c1d29
commit fd2791ba88b17fcd65075efc664e9c05fa4c1d29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 27 17:51:42 1998 +0000
(elf_machine_rel): Delete redundant debugging code. Correct handling
of PC24 relocs.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 7612285..912f786 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -398,35 +398,6 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
-
-#if 0
-#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15];
-{
-char b[10];
-int j;
-_HEX(map->l_addr);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-_HEX(sym->st_size);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-_HEX(&sym->st_value);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-_HEX(sym->st_value);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-_HEX(sym);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-_HEX(reloc_addr);
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-b[0]=' '; b[1]='\n';
-__asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; "
- : : "r"(b) : "r0", "r1", "r2" );
-}
-#endif
*reloc_addr = value;
break;
case R_ARM_ABS32:
@@ -451,7 +422,12 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; "
break;
}
case R_ARM_PC24:
- *reloc_addr += (value - (Elf32_Addr) reloc_addr);
+ {
+ long int disp = (value - (Elf32_Addr) reloc_addr) / 4;
+ if ((disp >= (1<<24)) || (disp <= -(1<<24)))
+ assert (! "address out of range for PC24 reloc");
+ *reloc_addr += disp;
+ }
break;
default:
assert (! "unexpected dynamic reloc type");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=54cdfc81d536033ed705a7fe1f8f4eb9db9fac35
commit 54cdfc81d536033ed705a7fe1f8f4eb9db9fac35
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 22 16:53:40 1998 +0000
Also define __getrusage.
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index fbbe6f7..83cfc9e 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -35,7 +35,7 @@
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
#define GETRUSAGE __getrusage_tv64
#else
-#define GETRUSAGE getrusage
+#define GETRUSAGE __getrusage
#endif
LEAF(GETRUSAGE, 16)
@@ -131,5 +131,9 @@ $error:
END(GETRUSAGE)
#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+strong_alias(__getrusage_tv64, ____getrusage_tv64)
+default_symbol_version (____getrusage_tv64, __getrusage, GLIBC_2.1)
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
+#else
+weak_alias(__getrusage, getrusage)
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4aae520265470f046ac4078cb136dd06463d5583
commit 4aae520265470f046ac4078cb136dd06463d5583
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jul 22 01:37:56 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Fix typo.
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
index 6b6f711..bdef810 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -1,6 +1,6 @@
/* Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1965e0a488bae0cfb394c0374d17353ca4443117
commit 1965e0a488bae0cfb394c0374d17353ca4443117
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:25:27 1998 +0000
syscall function implementation for Solaris/SPARC32.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S
new file mode 100644
index 0000000..b9f2996
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sparc32/syscall.S
@@ -0,0 +1,2 @@
+/* Bets are that the Linux code works... */
+#include <sysdeps/unix/sysv/linux/sparc/sparc32/syscall.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4d437a84f7f09d25e1423614f43937cdd9b39740
commit 4d437a84f7f09d25e1423614f43937cdd9b39740
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:23:28 1998 +0000
Add sigaltstack, sigpending, sigqueue, and sigtimedwait.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
index 5206363..092d869 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
+++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
@@ -1,3 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names
sigaction - sigaction 3 __sigaction sigaction
+sigaltstack - sigaltstack 2 sigaltstack
+sigpending - sigpending 2 __syscall_sigpending
+sigqueue - sigqueue 3 __sigqueue sigqueue
+sigtimedwait - sigtimedwait 3 __sigtimedwait sigtime
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e67612f82e167fe890e120d9faaa0288ef16869f
commit e67612f82e167fe890e120d9faaa0288ef16869f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:22:44 1998 +0000
sigwaitinfo implemtation for Solaris.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
new file mode 100644
index 0000000..026e611
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sigwaitinfo.c
@@ -0,0 +1,2 @@
+/* We can reuse the Linux implementation. */
+#include <sysdeps/unix/sysv/linux/sigwaitinfo.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea30d3fea7bd6f999f2d3a5f355209584ac62bbb
commit ea30d3fea7bd6f999f2d3a5f355209584ac62bbb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:22:38 1998 +0000
sigstack implemtation for Solaris.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c b/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c
new file mode 100644
index 0000000..5aa73c8
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sigstack.c
@@ -0,0 +1,3 @@
+/* We can reuse the Linux implementation with some tricks. */
+#define __NR_sigaltstack 1
+#include <sysdeps/unix/sysv/linux/sigstack.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a7807b9e64cbc88052beba4114c9dca9a9cc631
commit 9a7807b9e64cbc88052beba4114c9dca9a9cc631
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:22:34 1998 +0000
sigpending implemtation for Solaris.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
new file mode 100644
index 0000000..4e1ce0e
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sigpending.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <signal.h>
+
+extern int __syscall_sigpending (int subcode, sigset_t *set);
+
+
+/* Store in SET all signals that are blocked and pending. */
+int
+sigpending (sigset_t *set)
+{
+ if (set == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return __syscall_sigpending (1, set);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56984f464836c76eb6e71b327f3dc5341e8d604d
commit 56984f464836c76eb6e71b327f3dc5341e8d604d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 20 17:18:32 1998 +0000
Fix typo.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index e6a686e..7612285 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -313,7 +313,7 @@ _dl_start_user:
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
-/* The i386 never uses Elf32_Rela relocations. */
+/* The ARM never uses Elf32_Rela relocations. */
#define ELF_MACHINE_NO_RELA 1
/* We define an initialization functions. This is called very early in
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=67aeaca9ac4e232fda3b6089094315d28724130c
commit 67aeaca9ac4e232fda3b6089094315d28724130c
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jul 20 05:01:08 1998 +0000
Support NO_WEAK_ALIAS.
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index f25a55b..767665c 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -32,7 +32,11 @@
The .S files for the other calls just #define socket and #include this. */
#ifndef __socket
+#ifndef NO_WEAK_ALIAS
#define __socket P(__,socket)
+#else
+#define __socket socket
+#endif
#endif
.globl __socket
@@ -62,4 +66,6 @@ ENTRY (__socket)
rts
PSEUDO_END (__socket)
+#ifndef NO_WEAK_ALIAS
weak_alias (__socket, socket)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5044b71144fedebeba179c2e330aa9d2470ea30c
commit 5044b71144fedebeba179c2e330aa9d2470ea30c
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jul 20 04:59:31 1998 +0000
New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
new file mode 100644
index 0000000..6b6f711
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define SIGCONTEXT int code, struct sigcontext *
+#define GET_PC(ctx) ((void *) (ctx)->sc_pc)
+#define GET_FRAME(ctx) ((void *) __builtin_frame_address (1))
+#define GET_STACK(ctx) ((void *) (ctx)->sc_usp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08bd971f1511a33867b7ff24c57fa16ea4d3589c
commit 08bd971f1511a33867b7ff24c57fa16ea4d3589c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 17 12:35:52 1998 +0000
Define SIG_HOLD.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
index 4e55764..33a040b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Solaris 2 version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,9 @@
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#endif
/* Signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7a8ebca130caccbe8e85fbf3e64fe947a22438f
commit c7a8ebca130caccbe8e85fbf3e64fe947a22438f
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jul 17 04:26:22 1998 +0000
This belongs to the 2.0 branch.
diff --git a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h
deleted file mode 100644
index 1e8b870..0000000
--- a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/dl-envvars.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30437816c1e1f7353598471cb5dd16d9dfbc7ebc
commit 30437816c1e1f7353598471cb5dd16d9dfbc7ebc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 15 09:20:20 1998 +0000
Define LOC.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 1530ff6..a21672b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -51,4 +51,6 @@
#define r1 %o1
#define MOVE(x,y) mov x, y
+#define LOC(name) .##L##name
+
#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b814210938cf77056463972f67b4b055d44526d3
commit b814210938cf77056463972f67b4b055d44526d3
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Jul 13 01:30:40 1998 +0000
* sysdeps/unix/sysv/linux/m68k/dl-envvars.h: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/dl-envvars.h b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h
new file mode 100644
index 0000000..1e8b870
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/dl-envvars.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/dl-envvars.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb3ebfdb47bc88c9b2a6a6e043140dabc24086f6
commit bb3ebfdb47bc88c9b2a6a6e043140dabc24086f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 8 22:52:22 1998 +0000
Define __intptr_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 276236d..d4f2217 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -110,6 +110,9 @@ typedef struct
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+typedef long int __intptr_t;
+
/* Now add the thread types. */
#include <bits/pthreadtypes.h>
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 313e96b..2bb8a2a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -134,6 +134,9 @@ typedef __loff_t __off64_t;
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+typedef int __intptr_t;
+
/* Now add the thread types. */
#include <bits/pthreadtypes.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
index 44e343a..e25dec9 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -115,4 +115,7 @@ typedef __u_quad_t __fsfilcnt64_t;
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
+/* Duplicates info from stdint.h but this is used in unistd.h. */
+typedef long int __intptr_t;
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=668a0ed59b670db8fb4125717acd10007ae340f8
commit 668a0ed59b670db8fb4125717acd10007ae340f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 8 22:45:07 1998 +0000
Handle Linux/Alpha specific cases.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpathconf.c b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
new file mode 100644
index 0000000..d8c428d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fpathconf.c
@@ -0,0 +1,64 @@
+/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <limits.h>
+#include <sys/statfs.h>
+
+#define EXT2_SUPER_MAGIC 0xef53
+#define UFS_MAGIC 0x00011954
+#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+
+static long int default_fpathconf (int fd, int name);
+
+/* Get file-specific information about descriptor FD. */
+long int
+__fpathconf (fd, name)
+ int fd;
+ int name;
+{
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+
+ if (name == _PC_FILESIZEBITS)
+ {
+ /* Test whether this is on a ext2 filesystem which supports large
+ files. */
+ struct statfs fs;
+
+ if (__fstatfs (fd, &fs) < 0
+ || (fs.f_type != EXT2_SUPER_MAGIC
+ && fs.f_type != UFS_MAGIC
+ && fs.f_type != UFS_CIGAM))
+ return 32;
+
+ /* This filesystem supported files >2GB. */
+ return 64;
+ }
+
+ /* Fallback to the generic version. */
+ return default_fpathconf (fd, name);
+}
+
+#define __fpathconf static default_fpathconf
+#include <sysdeps/posix/fpathconf.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/pathconf.c b/sysdeps/unix/sysv/linux/alpha/pathconf.c
new file mode 100644
index 0000000..91ca094
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/pathconf.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <limits.h>
+#include <fcntl.h>
+#include <sys/statfs.h>
+
+#define EXT2_SUPER_MAGIC 0xef53
+#define UFS_MAGIC 0x00011954
+#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+
+static long int default_pathconf (const char *path, int name);
+
+/* Get file-specific information about PATH. */
+long int
+__pathconf (const char *path, int name)
+{
+ if (name == _PC_FILESIZEBITS)
+ {
+ /* Test whether this is on a ext2 or UFS filesystem which
+ support large files. */
+ struct statfs fs;
+
+ if (__statfs (path, &fs) < 0
+ || (fs.f_type != EXT2_SUPER_MAGIC
+ && fs.f_type != UFS_MAGIC
+ && fs.f_type != UFS_CIGAM))
+ return 32;
+
+ /* This filesystem supported files >2GB. */
+ return 64;
+ }
+
+ /* Fallback to the generic version. */
+ return default_pathconf (path, name);
+}
+
+#define __pathconf static default_pathconf
+#include <sysdeps/posix/pathconf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b99d03e6a9aa82dab306c98c09c8b3fb15a1cdf
commit 1b99d03e6a9aa82dab306c98c09c8b3fb15a1cdf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 5 15:22:20 1998 +0000
Define __syscall_recvmsg and __syscall_sendmsg.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index c7a80f9..ef14984 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-__recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+__recvmsg - recvmsg 3 __syscall_recvmsg
ptrace - ptrace 4 __ptrace ptrace
send - send 4 __libc_send __send send
-__sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+__sendmsg - sendmsg 3 __syscall_sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22bf6f34489b35e750857e72b035f1dddec0632e
commit 22bf6f34489b35e750857e72b035f1dddec0632e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 5 14:45:16 1998 +0000
File name for sendmsg and recvmsg syscalls is __ protected.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index ff73a6d..c7a80f9 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -45,10 +45,10 @@ getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __libc_recv __recv recv
recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+__recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
send - send 4 __libc_send __send send
-sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+__sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0b4f6bb0b448400addd061527e3fa763579a955
commit d0b4f6bb0b448400addd061527e3fa763579a955
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 5 08:23:19 1998 +0000
Add `syscall'.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 392a257..a3ecdd7 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -4,3 +4,4 @@ s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
s_setgroups setgroups setgroups 2 __syscall_setgroups
vm86 - vm86 1 __vm86 vm86
+syscall - syscall 5 syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51d02d34a552e4fb405e339ff902624e87341dbd
commit 51d02d34a552e4fb405e339ff902624e87341dbd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 5 08:22:32 1998 +0000
Not needed anymore.
diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S
deleted file mode 100644
index bc2bc7d..0000000
--- a/sysdeps/unix/sysv/linux/arm/syscall.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-
-/* Please consult the file sysdeps/unix/sysv/linux/arm/sysdep.h for
- more information about the value -4095 used below.*/
-
- .text
-ENTRY (syscall)
-
- /* Normally encoding the system call number in the instruction is
- good. But we pay the price here. */
-
- sub sp, sp, $0xc @ get 3 words on the stack
- orr r0, r0, $0xef000000 @ make up a SWI instruction
- orr r0, r0, $SWI_BASE
- str r0, [sp]
- ldr r0, _reti
- str r0, [sp, $4]
- adr r0, _ret
- str r0, [sp, $8]
- mov r0, r1
- mov r1, r2
- mov r2, r3
- mov pc, sp
-_ret: add sp, sp, $0xc
- RETINSTR(mov, pc, r14)
-
-_reti: .word 0xe51ff004 @ ldr pc, [pc, $4]
-
-PSEUDO_END (syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5fc184edcc9d4d1c36066356e9b1695bc668ea0f
commit 5fc184edcc9d4d1c36066356e9b1695bc668ea0f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 4 14:37:17 1998 +0000
List only one file per line.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 0807ce1..46cf351 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1,5 +1,8 @@
divrem.h
-divl.S divq.S reml.S remq.S
+divl.S
+divq.S
+reml.S
+remq.S
_mcount.S
stxcpy.S
stxncpy.S
diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist
index 1e00e4c..9288bdd 100644
--- a/sysdeps/m68k/fpu/switch/Dist
+++ b/sysdeps/m68k/fpu/switch/Dist
@@ -1 +1,2 @@
-68881-sw.h switch.c
+68881-sw.h
+switch.c
diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist
index cf0a898..09026af 100644
--- a/sysdeps/unix/sysv/irix4/Dist
+++ b/sysdeps/unix/sysv/irix4/Dist
@@ -1 +1,2 @@
-__handler.S sigtramp.c
+__handler.S
+sigtramp.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=468c277aafa5a814c47073e7d521a52f09496727
commit 468c277aafa5a814c47073e7d521a52f09496727
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Jul 3 05:37:32 1998 +0000
* sysdeps/unix/sysv/linux/m68k/Versions: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
new file mode 100644
index 0000000..d996b24
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.0 {
+ # c*
+ cacheflush;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b1f0c36e3d9a8a9e260d7a11ecda3eb4c1d9c61
commit 1b1f0c36e3d9a8a9e260d7a11ecda3eb4c1d9c61
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 2 22:33:35 1998 +0000
Version definitions.
diff --git a/sysdeps/alpha/Versions b/sysdeps/alpha/Versions
new file mode 100644
index 0000000..c7c1f04
--- /dev/null
+++ b/sysdeps/alpha/Versions
@@ -0,0 +1,7 @@
+libc {
+ GLIBC_2.0 {
+ # functions with special/multiple interfaces
+ __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
+ __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
+ }
+}
diff --git a/sysdeps/alpha/fpu/Versions b/sysdeps/alpha/fpu/Versions
new file mode 100644
index 0000000..fa3d810
--- /dev/null
+++ b/sysdeps/alpha/fpu/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_2.0 {
+ # functions used in other libraries
+ __ieee_get_fp_control; __ieee_set_fp_control;
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
new file mode 100644
index 0000000..ad49040
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -0,0 +1,49 @@
+libc {
+ GLIBC_2.0 {
+ # Unfortunately in wider use.
+ _inb; _inw; _inl; _outb; _outw; _outl; _bus_base; _bus_base_sparse;
+ _hae_shift;
+
+ # b*
+ bus_base; bus_base_sparse;
+
+ # h*
+ hae_shift;
+
+ # i*
+ inb; inl; inw; ioperm; iopl;
+
+ # o*
+ outb; outl; outw;
+
+ # p*
+ pciconfig_read; pciconfig_write; sethae;
+ }
+ GLIBC_2.1 {
+ # Linux/Alpha 64-bit timeval functions.
+ __select; select;
+ adjtime; adjtimex; __adjtimex;
+ __gettimeofday;
+
+ # glob interface change
+ glob; globfree;
+
+ # limit type change
+ getrusage;
+
+ # time type change
+ gettimeofday;
+
+ # i*
+ ieee_get_fp_control; ieee_set_fp_control;
+
+ # s*
+ setitimer; settimeofday;
+
+ # u*
+ utimes;
+
+ # w*
+ wait4;
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/mips/Versions b/sysdeps/unix/sysv/linux/mips/Versions
new file mode 100644
index 0000000..11614a4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/Versions
@@ -0,0 +1,9 @@
+libc {
+ GLIBC_2.0 {
+ # c*
+ cachectl; cacheflush;
+
+ # s*
+ sysmips;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c01c1dcf2a424ba5dd592f4f5faf913e14038eb
commit 4c01c1dcf2a424ba5dd592f4f5faf913e14038eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jul 1 09:33:01 1998 +0000
Make _errno a weak alias, not a strong alias.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index f6cb3e4..872ed4b 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -24,11 +24,7 @@
.type C_SYMBOL_NAME(errno),%object
.size C_SYMBOL_NAME(errno),4
C_SYMBOL_NAME(errno): .zero 4
- .globl C_SYMBOL_NAME(_errno)
- .type C_SYMBOL_NAME(_errno),%object
-/* This name is expected by hj's libc.so.5 startup code. It seems to be needed
- by pthreads as well. */
-C_SYMBOL_NAME(_errno) = C_SYMBOL_NAME(errno)
+weak_alias (C_SYMBOL_NAME(errno), C_SYMBOL_NAME(_errno))
.text
/* The syscall stubs jump here when they detect an error.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd202ea4b7eac4b8f8fc151876e05802a9897304
commit fd202ea4b7eac4b8f8fc151876e05802a9897304
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jul 1 01:42:09 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Make _errno a weak alias,
not a strong alias.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 6008b23..717122c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -30,9 +30,7 @@
.type errno,@object
errno: .space 4
.size errno,4
- .globl _errno
- .type _errno,@object
-_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
+weak_alias (errno, _errno)
.text
/* The following code is only used in the shared library when we
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea8df133ccbba695c3ec06e6228099fb36e6ad35
commit ea8df133ccbba695c3ec06e6228099fb36e6ad35
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 30 12:08:40 1998 +0000
Include pthreadtypes.h.
Define size_t.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 1d72de0..313e96b 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -25,6 +25,9 @@
#include <features.h>
+#define __need_size_t
+#include <stddef.h>
+
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short __u_short;
@@ -131,4 +134,8 @@ typedef __loff_t __off64_t;
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
+
+/* Now add the thread types. */
+#include <bits/pthreadtypes.h>
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e28d2fb791af0a1c9cfd145e768c4f433062690
commit 2e28d2fb791af0a1c9cfd145e768c4f433062690
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 30 12:07:42 1998 +0000
Define size_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 699f14c..276236d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -25,6 +25,9 @@
#include <features.h>
+#define __need_size_t
+#include <stddef.h>
+
/* Convenience types. */
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6cc7c3b3c00d869c85c41e9f50f8ae1736488789
commit 6cc7c3b3c00d869c85c41e9f50f8ae1736488789
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 30 12:02:24 1998 +0000
Include pthreadtypes.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 70b7d72..699f14c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -107,4 +107,8 @@ typedef struct
typedef int __t_scalar_t;
typedef unsigned int __t_uscalar_t;
+
+/* Now add the thread types. */
+#include <bits/pthreadtypes.h>
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=030d182c9349514aca3db9da9e151d04b0050e4d
commit 030d182c9349514aca3db9da9e151d04b0050e4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 29 12:43:07 1998 +0000
Don't define __libc_pid.
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index 7e6bcf7..87f9f0a 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -25,8 +25,6 @@ extern void __libc_global_ctors (void);
int __libc_multiple_libcs = 1;
-pid_t __libc_pid;
-
static void
init (int *data)
{
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index a411a1b..825b063 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,9 +39,6 @@ int __libc_multiple_libcs = 1;
int __libc_argc;
char **__libc_argv;
-/* We often need the PID. Cache this value. */
-pid_t __libc_pid;
-
void *(*_cthread_init_routine) (void); /* Returns new SP to use. */
void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=035d42d2a0dc0c04000323721e9a474e776382ca
commit 035d42d2a0dc0c04000323721e9a474e776382ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 27 09:51:32 1998 +0000
(feraiseexcept): Mark tmp as early-clobber.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index c2a96e3..9b61ddb 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -39,28 +39,28 @@ feraiseexcept (int excepts)
{
/* One example of a invalid operation is 0 * Infinity. */
__asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
- : "=f"(tmp) : "f"(HUGE_VAL));
+ : "=&f"(tmp) : "f"(HUGE_VAL));
}
/* Next: division by zero. */
if (FE_DIVBYZERO & excepts)
{
__asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
- : "=f"(tmp), "=f"(dummy));
+ : "=&f"(tmp), "=f"(dummy));
}
/* Next: overflow. */
if (FE_OVERFLOW & excepts)
{
__asm__ __volatile__("mult/sui %1,%1,%0; trapb"
- : "=f"(tmp) : "f"(DBL_MAX));
+ : "=&f"(tmp) : "f"(DBL_MAX));
}
/* Next: underflow. */
if (FE_UNDERFLOW & excepts)
{
__asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=f"(tmp) : "f"(DBL_MIN),
+ : "=&f"(tmp) : "f"(DBL_MIN),
"f"((double) (1UL << 60)));
}
@@ -68,6 +68,6 @@ feraiseexcept (int excepts)
if (FE_INEXACT & excepts)
{
__asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=f"(tmp) : "f"(1.0), "f"(M_PI));
+ : "=&f"(tmp) : "f"(1.0), "f"(M_PI));
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94cd6191cd790c4405bb1db18130534b7e44bcb3
commit 94cd6191cd790c4405bb1db18130534b7e44bcb3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 27 09:51:18 1998 +0000
Pass sp as arg 7. Kill __data_start.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 1330d1f..ecb8174 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -29,13 +29,14 @@ _start:
mov zero, fp
br gp, 1f
1: ldgp gp, 0(gp)
+ subq sp, 16, sp
.prologue 1
/* Load address of the user's main function. */
lda a0, main
- ldl a1, 0(sp) /* get argc */
- lda a2, 8(sp) /* get argv */
+ ldl a1, 16(sp) /* get argc */
+ lda a2, 24(sp) /* get argv */
/* Load address of our own entry points to .fini and .init. */
lda a3, _init
@@ -44,10 +45,12 @@ _start:
/* Store address of the shared library termination function. */
mov v0, a5
+ /* Provide the highest stack address to the user code. */
+ stq sp, 0(sp)
+
/* Call the user's main function, and exit with its value.
- But let the libc call main. */
+ But let the libc call main. */
jsr ra, __libc_start_main
- ldgp gp, 0(ra)
/* Die very horribly if exit returns. Call_pal hlt is callable from
kernel mode only; this will result in an illegal instruction trap. */
@@ -56,16 +59,3 @@ _start:
/* For ECOFF backwards compatibility. */
weak_alias(_start, __start)
-
-/* Define a symbol for the first piece of initialized data. */
- .data
- .globl __data_start
-__data_start:
- .long 0
-
-#ifdef __ELF__
- .size __data_start, 4
- .type __data_start, @object
-#endif
-
-weak_alias(__data_start, data_start)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca246d7eef9f78bf226abf3545a411054a659bef
commit ca246d7eef9f78bf226abf3545a411054a659bef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 27 09:50:59 1998 +0000
(elf_machine_runtime_setup): Only set _dl_profile_map if _dl_name_match_p.
(RTLD_START): Fix .prologue. Set __libc_stack_end.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 455fd7b..8f639a9 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -106,8 +106,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
else
{
*(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
- /* Say that we really want profiling and the timers are started. */
- _dl_profile_map = l;
+
+ if (_dl_name_match_p (_dl_profile, l))
+ {
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
}
/* Identify this shared object */
@@ -131,7 +136,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
" #tramp_name ":
lda $sp, -168($sp)
.frame $sp, 168, $26
- /* Preserve all registers that C normally doesn't. */
+ /* Preserve all integer registers that C normally doesn't. */
stq $26, 0($sp)
stq $0, 8($sp)
stq $1, 16($sp)
@@ -157,7 +162,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* Set up our $gp */
br $gp, .+4
ldgp $gp, 0($gp)
- .prologue 1
+ .prologue 0
/* Set up the arguments for fixup: */
/* $16 = link_map out of plt0 */
/* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
@@ -216,11 +221,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#define RTLD_START asm ("\
.text
+ .set at
.globl _start
.ent _start
_start:
br $gp, 0f
0: ldgp $gp, 0($gp)
+ .prologue 0
/* Pass pointer to argument block to _dl_start. */
mov $sp, $16
bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng
@@ -229,8 +236,12 @@ _start:
.globl _dl_start_user
.ent _dl_start_user
_dl_start_user:
+ .frame $30,0,$31,0
+ .prologue 0
/* Save the user entry point address in s0. */
mov $0, $9
+ /* Store the highest stack address. */
+ stq $30, __libc_stack_end
/* See if we were run as a command with the executable file
name as an extra leading argument. If so, adjust the stack
pointer to skip _dl_skip_args words. */
@@ -253,15 +264,14 @@ _dl_start_user:
ldgp $gp, 0($26)
br 1b
2: /* Clear the startup flag. */
- .set at
stl $31, _dl_starting_up
- .set noat
/* Pass our finalizer function to the user in $0. */
lda $0, _dl_fini
/* Jump to the user's entry point. */
mov $9, $27
jmp ($9)
.end _dl_start_user
+ .set noat
.previous");
/* Nonzero iff TYPE describes relocation of a PLT entry, so
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b136e08ec044e1b1fe18504ba6ee277cf20d5120
commit b136e08ec044e1b1fe18504ba6ee277cf20d5120
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 27 09:50:41 1998 +0000
(elf): Kill -mno-fp-regs.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 6cf4a17..250a317 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -31,12 +31,7 @@ endif
ifeq ($(subdir),elf)
# The ld.so startup code cannot use literals until it self-relocates.
- ifeq ($(elf),yes)
- CFLAGS-rtld.c = -mbuild-constants
- endif
-# The rest of ld.so shouldn't use FP regs for block moves so
-# that the lazy link trampoline doesn't have to save them.
-sysdep-CFLAGS += -mno-fp-regs
+CFLAGS-rtld.c = -mbuild-constants
endif
divrem := divl divq reml remq
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11c1d87fd25e30da3e7c9829c41c2e7a555c17d5
commit 11c1d87fd25e30da3e7c9829c41c2e7a555c17d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 18 21:49:26 1998 +0000
Add sigstack here.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 0b38038..ff73a6d 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -16,6 +16,7 @@ semget - semget 3 __semget semget
semctl - semctl 4 __semctl semctl
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
+sigstack - sigstack 2 sigstack
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1037e1f40a0e63aeddedf267326b76088f82be45
commit 1037e1f40a0e63aeddedf267326b76088f82be45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 17 17:59:03 1998 +0000
Include sys/types.h before glob.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 02cb0a8..5baa0ae 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -15,6 +15,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <sys/types.h>
#include <glob.h>
/* For Linux/Alpha we have to make the glob symbols versioned. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3a2cb21bea2b79e31a0dbbc735746f7b5f02156
commit a3a2cb21bea2b79e31a0dbbc735746f7b5f02156
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 17 10:17:53 1998 +0000
Include glob.h before defining prototypes.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 69da879..02cb0a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -15,6 +15,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <glob.h>
+
/* For Linux/Alpha we have to make the glob symbols versioned. */
#define glob(pattern, flags, errfunc, pglob) \
__new_glob (pattern, flags, errfunc, pglob)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb71df5f5f0aa99b085af18f1e52d438e2a32b89
commit bb71df5f5f0aa99b085af18f1e52d438e2a32b89
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 15 11:03:50 1998 +0000
Add prototypes for the __new_* functions.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 59c42ae..69da879 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -21,6 +21,12 @@
#define globfree(pglob) \
__new_globfree (pglob)
+/* We need prototypes for these new names. */
+extern int __new_glob (const char *__pattern, int __flags,
+ int (*__errfunc) (const char *, int),
+ glob_t *__pglob);
+extern void __new_globfree (glob_t *__pglob);
+
#include <sysdeps/generic/glob.c>
#undef glob
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d3d725cc6bc9598290bdae0d311c29d9a509265
commit 7d3d725cc6bc9598290bdae0d311c29d9a509265
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 10 10:58:58 1998 +0000
Definitions for sigstack functions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
new file mode 100644
index 0000000..bc993d1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigstack.h
@@ -0,0 +1,55 @@
+/* sigstack, sigaltstack definitions.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete). */
+struct sigstack
+ {
+ __ptr_t ss_sp; /* Signal stack pointer. */
+ int ss_onstack; /* Nonzero if executing on this stack. */
+ };
+
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 4096
+
+/* System default stack size. */
+#define SIGSTKSZ 16384
+
+
+/* Alternate, preferred interface. */
+typedef struct sigaltstack
+ {
+ __ptr_t ss_sp;
+ int ss_flags;
+ size_t ss_size;
+ } stack_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c21b35ecda81666f8486bf8863bf47b4fc1bc14b
commit c21b35ecda81666f8486bf8863bf47b4fc1bc14b
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jun 10 05:27:41 1998 +0000
* sysdeps/m68k/fpu/bits/mathinline.h: Define __ieee754_exp10 as
inline.
* sysdeps/m68k/fpu/e_exp10.c: New file.
* sysdeps/m68k/fpu/e_exp10f.c: New file.
* sysdeps/m68k/fpu/e_exp10l.c: New file.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 7ddf6ae..e5eb591 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -125,6 +125,7 @@ __inline_mathop(__ieee754_cosh, cosh)
__inline_mathop(__ieee754_sinh, sinh)
__inline_mathop(__ieee754_exp, etox)
__inline_mathop(__ieee754_exp2, twotox)
+__inline_mathop(__ieee754_exp10, tentox)
__inline_mathop(__ieee754_log10, log10)
__inline_mathop(__ieee754_log, logn)
__inline_mathop(__ieee754_sqrt, sqrt)
diff --git a/sysdeps/m68k/fpu/e_exp10.c b/sysdeps/m68k/fpu/e_exp10.c
new file mode 100644
index 0000000..a1dd224
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp10.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp10
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_exp10f.c b/sysdeps/m68k/fpu/e_exp10f.c
new file mode 100644
index 0000000..1b78bc3
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp10f.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp10f
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_exp10l.c b/sysdeps/m68k/fpu/e_exp10l.c
new file mode 100644
index 0000000..5e90199
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp10l.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp10l
+#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2cd493384a521ec39f953be4de1d3db511792857
commit 2cd493384a521ec39f953be4de1d3db511792857
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jun 10 01:37:21 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_LABEL): New
definition.
(PSEUDO, SYSCALL_ERROR_HANDLER): Use it instead of syscall_error.
* sysdeps/unix/sysv/linux/m68k/clone.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/mmap.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/socket.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/syscall.S: Likewise.
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index d553ab7..622f811 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
The GNU C Library is free software; you can redistribute it and/or
@@ -32,10 +32,10 @@ ENTRY (__clone)
movel #-EINVAL, %d0
movel 4(%sp), %a0 /* no NULL function pointers */
tstl %a0
- jeq syscall_error
+ jeq SYSCALL_ERROR_LABEL
movel 8(%sp), %a1 /* no NULL stack pointers */
tstl %a1
- jeq syscall_error
+ jeq SYSCALL_ERROR_LABEL
/* Allocate space and copy the argument onto the new stack. */
movel 16(%sp), -(%a1)
@@ -48,7 +48,7 @@ ENTRY (__clone)
exg %d2, %a1 /* restore %d2 */
tstl %d0
- jmi syscall_error
+ jmi SYSCALL_ERROR_LABEL
jeq thread_start
rts
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 9563204..9457831 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ ENTRY (__mmap)
/* Kludge: negative numbers are among the legal return values.
If %d0 is between -4096 and 0 then there was an error. */
cmp.l #-4096, %d0
- jhi syscall_error
+ jhi SYSCALL_ERROR_LABEL
/* Successful; return the syscall's value. Copy it to %a0 because
mmap is declared to return a pointer. */
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 81e5a21..f25a55b 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +56,7 @@ ENTRY (__socket)
/* %d0 is < 0 if there was an error. */
tst.l %d0
- jmi syscall_error
+ jmi SYSCALL_ERROR_LABEL
/* Successful; return the syscall's value. */
rts
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index f392b75..f34c076 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,6 @@ ENTRY (syscall)
trap &0 /* Do the system call. */
UNDOARGS_5 /* Unfrob arguments. */
cmp.l &-4095, %d0 /* Check %d0 for error. */
- jcc syscall_error /* Jump to error handler if negative. */
+ jcc SYSCALL_ERROR_LABEL /* Jump to error handler if negative. */
rts /* Return to caller. */
PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 8fdd26f..4094172 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -43,13 +43,22 @@
for a real error by making sure the value in %d0 is a real error
number. Linus said he will make sure the no syscall returns a value
in -1 .. -4095 as a valid result so we can savely test with -4095. */
+
+/* We don't want the label for the error handler to be visible in the symbol
+ table when we define it here. */
+#ifdef PIC
+#define SYSCALL_ERROR_LABEL .Lsyscall_error
+#else
+#define SYSCALL_ERROR_LABEL __syscall_error
+#endif
+
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name) \
DO_CALL (syscall_name, args); \
cmp.l &-4095, %d0; \
- jcc syscall_error
+ jcc SYSCALL_ERROR_LABEL
#undef PSEUDO_END
#define PSEUDO_END(name) \
@@ -60,7 +69,7 @@
/* Store (- %d0) into errno through the GOT. */
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
-syscall_error: \
+SYSCALL_ERROR_LABEL: \
neg.l %d0; \
move.l %d0, -(%sp); \
jbsr __errno_location@PLTPC; \
@@ -70,9 +79,9 @@ syscall_error: \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
rts;
-#else
+#else /* !_LIBC_REENTRANT */
#define SYSCALL_ERROR_HANDLER \
-syscall_error: \
+SYSCALL_ERROR_LABEL: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
move.l %d0, (%a0); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08016d928b9ee7e595c3b99c5c899ddce1dc0261
commit 08016d928b9ee7e595c3b99c5c899ddce1dc0261
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Jun 10 01:35:06 1998 +0000
* sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Set
_dl_profile_map only if the name matches.
(_dl_start_user): Remember stack address.
* sysdeps/m68k/elf/start.S: Pass new argument to
__libc_start_user.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index fb32ce2..3e57480 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -92,8 +92,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
if (profile)
{
got[2] = (Elf32_Addr) &_dl_runtime_profile;
- /* Say that we really want profiling and the timers are started. */
- _dl_profile_map = l;
+
+ if (_dl_name_match_p (_dl_profile, l))
+ {
+ /* This is the object we are looking for. Say that we really
+ want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
}
else
/* This function will get called to fix up the GOT entry indicated by
@@ -161,6 +166,8 @@ _dl_start_user:
move.l %d0, %a4
| Point %a5 at the GOT.
lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
+ | Remember the highest stack address.
+ move.l %sp, ([__libc_stack_end@GOT.w, %a5])
| See if we were run as a command with the executable file
| name as an extra leading argument.
move.l ([_dl_skip_args@GOT.w, %a5]), %d0
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index c1a5c2e..eefe752 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -50,6 +50,10 @@ _start:
move.l %sp, %a0 /* The argument vector starts just at the
current stack top. */
+ /* Provide the highest stack address to the user code (for stacks
+ which grow downward). */
+ pea (%sp)
+
pea (%a1) /* Push address of the shared library
termination function. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7021745518b3d26170ba9718f8de8252a6b6b84f
commit 7021745518b3d26170ba9718f8de8252a6b6b84f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jun 9 15:13:18 1998 +0000
Update for new draft ARM ELF ABI.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 66b69d0..e6a686e 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -308,10 +308,10 @@ _dl_start_user:
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
-#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JMP_SLOT)
+#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JUMP_SLOT)
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
-#define ELF_MACHINE_JMP_SLOT R_ARM_JMP_SLOT
+#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
/* The i386 never uses Elf32_Rela relocations. */
#define ELF_MACHINE_NO_RELA 1
@@ -397,7 +397,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
refsym->st_size));
break;
case R_ARM_GLOB_DAT:
- case R_ARM_JMP_SLOT:
+ case R_ARM_JUMP_SLOT:
#if 0
#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15];
@@ -429,7 +429,7 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; "
#endif
*reloc_addr = value;
break;
- case R_ARM_32:
+ case R_ARM_ABS32:
{
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static
@@ -450,7 +450,7 @@ __asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; "
*reloc_addr += value;
break;
}
- case R_ARM_PC26:
+ case R_ARM_PC24:
*reloc_addr += (value - (Elf32_Addr) reloc_addr);
break;
default:
@@ -466,7 +466,7 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
switch (ELF32_R_TYPE (reloc->r_info))
{
- case R_ARM_JMP_SLOT:
+ case R_ARM_JUMP_SLOT:
*reloc_addr += map->l_addr;
break;
default:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ff8d4938e3618e72fa3a477a9a249114d6cac59
commit 6ff8d4938e3618e72fa3a477a9a249114d6cac59
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 7 14:06:19 1998 +0000
SysVr4 specific macros to convert from and to sigmask.
diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
new file mode 100644
index 0000000..4daab22
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
@@ -0,0 +1,33 @@
+/* Convert between lowlevel sigmask and libc representation of sigset_t.
+ SysVr4 version.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Joe Keane <jgk@jgk.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define sigset_set_old_mask(set, mask) \
+ do { \
+ unsigned long int *__ptr; \
+ __ptr = &(set)->__sigbits[0]; \
+ __ptr[0] = (mask); \
+ __ptr[1] = 0ul; \
+ __ptr[2] = 0ul; \
+ __ptr[3] = 0ul; \
+ } while (0)
+
+#define sigset_get_old_mask(set, mask) \
+ ((mask) = (unsigned int) (set)->__sigbits[0])
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=54f119d17122398faccf7c9b19e48bcbc433edc7
commit 54f119d17122398faccf7c9b19e48bcbc433edc7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 14:25:31 1998 +0000
GMP support for ARMs.
diff --git a/sysdeps/arm/gmp-mparam.h b/sysdeps/arm/gmp-mparam.h
new file mode 100644
index 0000000..e57f39c
--- /dev/null
+++ b/sysdeps/arm/gmp-mparam.h
@@ -0,0 +1,30 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#define BITS_PER_MP_LIMB 32
+#define BYTES_PER_MP_LIMB 4
+#define BITS_PER_LONGINT 32
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
+
+#define IEEE_DOUBLE_BIG_ENDIAN 0
+#define IEEE_DOUBLE_MIXED_ENDIAN 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43ce7f2e75ba31af1167a6d1faf58588d9bb25ea
commit 43ce7f2e75ba31af1167a6d1faf58588d9bb25ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 14:24:49 1998 +0000
IEEE 754 float support for strange ARMs.
diff --git a/sysdeps/arm/fpu/ieee754.h b/sysdeps/arm/fpu/ieee754.h
new file mode 100644
index 0000000..73f7d6a
--- /dev/null
+++ b/sysdeps/arm/fpu/ieee754.h
@@ -0,0 +1,115 @@
+/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _IEEE754_H
+
+#define _IEEE754_H 1
+#include <features.h>
+
+#include <endian.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ } ieee_nan;
+ };
+
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+
+/* The following two structures are correct for `new' floating point systems but
+ wrong for the old FPPC. The only solution seems to be to avoid their use on
+ old hardware. */
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 double-extended-precision format. */
+ struct
+ {
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:32;
+ } ieee;
+
+ /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+ struct
+ {
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+__END_DECLS
+
+#endif /* ieee754.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d3912ddbc0004ef6172e1de2d1c2a0ed04e5a20
commit 5d3912ddbc0004ef6172e1de2d1c2a0ed04e5a20
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 14:23:55 1998 +0000
Not needed anymore.
diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h
deleted file mode 100644
index 3e4cdd3..0000000
--- a/sysdeps/arm/bits/fenv.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FENV_H
-# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
-#endif
-
-
-/* Define bits representing the exception. We use the bit positions
- of the appropriate bits in the FPU control word. */
-enum
- {
- FE_INVALID = 0x01,
-#define FE_INVALID FE_INVALID
- __FE_DENORM = 0x02,
- FE_DIVBYZERO = 0x04,
-#define FE_DIVBYZERO FE_DIVBYZERO
- FE_OVERFLOW = 0x08,
-#define FE_OVERFLOW FE_OVERFLOW
- FE_UNDERFLOW = 0x10,
-#define FE_UNDERFLOW FE_UNDERFLOW
- FE_INEXACT = 0x20
-#define FE_INEXACT FE_INEXACT
- };
-
-#define FE_ALL_EXCEPT \
- (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-
-/* The ARM FPU supports all of the four defined rounding modes. We
- use again the bit positions in the FPU control word as the values
- for the appropriate macros. */
-enum
- {
- FE_TONEAREST = 0,
-#define FE_TONEAREST FE_TONEAREST
- FE_DOWNWARD = 0x400,
-#define FE_DOWNWARD FE_DOWNWARD
- FE_UPWARD = 0x800,
-#define FE_UPWARD FE_UPWARD
- FE_TOWARDSZERO = 0xc00
-#define FE_TOWARDSZERO FE_TOWARDSZERO
- };
-
-
-/* Type representing exception flags. */
-typedef unsigned short int fexcept_t;
-
-
-/* Type representing floating-point environment. This function corresponds
- to the layout of the block written by the `fstenv'. */
-typedef struct
- {
- unsigned short int control_word;
- unsigned short int __unused1;
- unsigned short int status_word;
- unsigned short int __unused2;
- unsigned short int tags;
- unsigned short int __unused3;
- unsigned int eip;
- unsigned short int cs_selector;
- unsigned int opcode:11;
- unsigned int __unused4:5;
- unsigned int data_offset;
- unsigned short int data_selector;
- unsigned short int __unused5;
- }
-fenv_t;
-
-/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
-
-#ifdef __USE_GNU
-/* Floating-point environment where none of the exception is masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87386bad90da1952b3858d35d3daa24ba90d2bea
commit 87386bad90da1952b3858d35d3daa24ba90d2bea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 14:23:26 1998 +0000
(FE_EXCEPTION_SHIFT): Rename to FE_EXCEPT_SHIFT.
diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h
index 17b9702..ca06196 100644
--- a/sysdeps/arm/fpu/bits/fenv.h
+++ b/sysdeps/arm/fpu/bits/fenv.h
@@ -34,7 +34,7 @@ enum
};
/* Amount to shift by to convert an exception to a mask bit. */
-#define FE_EXCEPTION_SHIFT 16
+#define FE_EXCEPT_SHIFT 16
/* All supported exceptions. */
#define FE_ALL_EXCEPT \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f43b7998943291465d222ec4e64ba1983282375
commit 6f43b7998943291465d222ec4e64ba1983282375
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 13:39:22 1998 +0000
(__jmp_buf): Remove floating-point support.
(_JMPBUF_UNWINDS): Added.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index ea25a9b..6d87379 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -23,10 +23,14 @@
#endif
#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
-# if __ARM_USES_FP
-typedef int __jmp_buf[22];
-# else
+/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
+ saved. */
typedef int __jmp_buf[10];
-# endif
#endif
+
+#define __JMP_BUF_SP 8
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6298404e7d58edd152b78e50c325c48076c94d53
commit 6298404e7d58edd152b78e50c325c48076c94d53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 13:38:56 1998 +0000
jmpbuf definition for ARM with FPU.
diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h
new file mode 100644
index 0000000..895356f
--- /dev/null
+++ b/sysdeps/arm/fpu/bits/setjmp.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Define the machine-dependent type `jmp_buf'. ARM version. */
+
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+#ifndef _ASM
+/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
+ saved. */
+typedef int __jmp_buf[22];
+#endif
+
+#define __JMP_BUF_SP 8
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58e6626f7e4c3516ea36300764dfc6b2ef48d8bc
commit 58e6626f7e4c3516ea36300764dfc6b2ef48d8bc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 13:38:03 1998 +0000
ARM implementation of feholdexcept.
diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c
new file mode 100644
index 0000000..5679ccc
--- /dev/null
+++ b/sysdeps/arm/fpu/feholdexcpt.c
@@ -0,0 +1,37 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ unsigned long int temp;
+
+ /* Store the environment. */
+ _FPU_GETCW(temp);
+ envp->cw = temp;
+
+ /* Now set all exceptions to non-stop. */
+ temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
+ _FPU_SETCW(temp);
+
+ return 1;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c61de13d2c39df8cfd82e832fbaf2dda8c317e64
commit c61de13d2c39df8cfd82e832fbaf2dda8c317e64
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 1 13:37:18 1998 +0000
Use C_SYMBOL_NAME when referring to errno and _errno.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index 482535b..f6cb3e4 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -20,13 +20,15 @@
/* We define errno here, to be consistent with Linux/i386. */
.bss
- .globl errno
- .type errno,%object
- .size errno,4
-errno: .zero 4
- .globl _errno
- .type _errno,%object
-_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
+ .globl C_SYMBOL_NAME(errno)
+ .type C_SYMBOL_NAME(errno),%object
+ .size C_SYMBOL_NAME(errno),4
+C_SYMBOL_NAME(errno): .zero 4
+ .globl C_SYMBOL_NAME(_errno)
+ .type C_SYMBOL_NAME(_errno),%object
+/* This name is expected by hj's libc.so.5 startup code. It seems to be needed
+ by pthreads as well. */
+C_SYMBOL_NAME(_errno) = C_SYMBOL_NAME(errno)
.text
/* The syscall stubs jump here when they detect an error.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0ebc3b2efdd8ed600598fa589a151c7b74bfd03
commit e0ebc3b2efdd8ed600598fa589a151c7b74bfd03
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 29 10:20:59 1998 +0000
Use __ASSEMBLER__ test macro not ASSEMBLER.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index eeef7aa..4fc90ae 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -19,7 +19,7 @@
#include <sysdeps/generic/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* Syntactic details of assembler. */
@@ -89,4 +89,4 @@
#define mcount _mcount
#endif
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
index 58789f7..1770a09 100644
--- a/sysdeps/m68k/sysdep.h
+++ b/sysdeps/m68k/sysdep.h
@@ -19,7 +19,7 @@
#include <sysdeps/generic/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* Syntactic details of assembler. */
@@ -96,4 +96,4 @@
#define JUMPTARGET(name) name
#endif
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h
index a4e6dff..7bacb02 100644
--- a/sysdeps/mach/mips/sysdep.h
+++ b/sysdeps/mach/mips/sysdep.h
@@ -57,7 +57,7 @@ _start:\n\
#include <syscall.h>
-#if defined (ASSEMBLER)
+#if defined (__ASSEMBLER__)
#define ALIGN 2
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index e27909a..f43c7f8 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -19,7 +19,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#ifdef __linux__
# include <alpha/regdef.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index b0a8daa..f173ce4 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -20,7 +20,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#define POUND #
@@ -53,4 +53,4 @@
#define r1 d1
#define MOVE(x,y) movel x , y
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index e9ad4d5..929dfc4 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -22,7 +22,7 @@
#include <sysdeps/unix/alpha/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#include <machine/pal.h> /* get PAL_callsys */
#include <regdef.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
index c54193f..90f2ed0 100644
--- a/sysdeps/unix/bsd/sequent/i386/sysdep.h
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -19,7 +19,7 @@
#include <sysdeps/unix/i386/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* Get the symbols for system call interrupts. */
#include <machine/trap.h>
@@ -79,4 +79,4 @@
#undef scratch
#define scratch %edx /* Call-clobbered register for random use. */
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index e459856..28cf9e2 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -18,7 +18,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#define POUND #
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 1c501bc..8bd3861 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -18,7 +18,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#define POUND #
@@ -59,4 +59,4 @@
#define r1 d1
#define MOVE(x,y) movel x , y
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index a2cf007..19ab59b 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -18,7 +18,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#ifdef __STDC__
#define ENTRY(name) \
@@ -52,4 +52,4 @@
#define MOVE(x,y) movl x , y
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index cbafbdc..4514d07 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -19,7 +19,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#include <regdef.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 6c88f76..29d973f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
#include <asm/pal.h>
#include <alpha/regdef.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 14dd17c..381ce26 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -33,7 +33,7 @@
#define SYS_ify(syscall_name) (__NR_##syscall_name)
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* Linux uses a negative return value to indicate syscall errors,
unlike most Unices, which use the condition codes' carry flag.
@@ -104,6 +104,6 @@
#define UNDOARGS_4 /* nothing */
#define UNDOARGS_5 ldr r4, [sp];
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
#endif /* linux/arm/sysdep.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 4d9249d..8fdd26f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -32,7 +32,7 @@
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* Linux uses a negative return value to indicate syscall errors, unlike
most Unices, which use the condition codes' carry flag.
@@ -149,4 +149,4 @@ syscall_error: \
#define MOVE(x,y) movel x , y
#endif
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 7cc10fd..1530ff6 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -24,7 +24,7 @@
#include <sysdeps/unix/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef __ASSEMBLER__
/* As of gcc-2.6.0, it complains about pound signs in front of things
that aren't arguments to the macro. So we use this to pull it off
@@ -51,4 +51,4 @@
#define r1 %o1
#define MOVE(x,y) mov x, y
-#endif /* ASSEMBLER */
+#endif /* __ASSEMBLER__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=38843cb976d94a4351632bc7d89557fa3004da45
commit 38843cb976d94a4351632bc7d89557fa3004da45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 25 11:27:09 1998 +0000
Correctly renamed.
diff --git a/sysdeps/arm/fpu/fsetexcptflag.c b/sysdeps/arm/fpu/fsetexcptflag.c
deleted file mode 100644
index f5c06a6..0000000
--- a/sysdeps/arm/fpu/fsetexcptflag.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fenv.h>
-#include <math.h>
-#include <fpu_control.h>
-
-void
-fesetexceptflag (const fexcept_t *flagp, int excepts)
-{
- fexcept_t temp;
-
- /* Get the current environment. */
- _FPU_GETCW(temp);
-
- /* Set the desired exception mask. */
- temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
- temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
-
- /* Save state back to the FPU. */
- _FPU_SETCW(temp);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cad0799e9278e2c1a8141a0696b278e5ed3084a7
commit cad0799e9278e2c1a8141a0696b278e5ed3084a7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun May 24 18:41:41 1998 +0000
Set exception bits in Arm FPU.
diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..f5c06a6
--- /dev/null
+++ b/sysdeps/arm/fpu/fsetexcptflg.c
@@ -0,0 +1,38 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+#include <fpu_control.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current environment. */
+ _FPU_GETCW(temp);
+
+ /* Set the desired exception mask. */
+ temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
+ temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
+
+ /* Save state back to the FPU. */
+ _FPU_SETCW(temp);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a5ade59c9e89b85cba4502578850847adb58e0e
commit 3a5ade59c9e89b85cba4502578850847adb58e0e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 21 15:39:52 1998 +0000
Definitions for FPU handling header.
diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h
new file mode 100644
index 0000000..17b9702
--- /dev/null
+++ b/sysdeps/arm/fpu/bits/fenv.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+/* Define bits representing exceptions in the FPU status word. */
+enum
+ {
+ FE_INVALID = 1,
+#define FE_INVALID FE_INVALID
+ FE_DIVBYZERO = 2,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_OVERFLOW = 4,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 8,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ };
+
+/* Amount to shift by to convert an exception to a mask bit. */
+#define FE_EXCEPTION_SHIFT 16
+
+/* All supported exceptions. */
+#define FE_ALL_EXCEPT \
+ (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW)
+
+/* The ARM FPU basically only supports round-to-nearest. Other rounding
+ modes exist, but you have to encode them in the actual instruction. */
+#define FE_TONEAREST 0
+
+/* Type representing exception flags. */
+typedef unsigned long fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef struct
+ {
+ unsigned long cw;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1l)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c34d3ba41f6f5c6370673917fed56dbf2a16e12b
commit c34d3ba41f6f5c6370673917fed56dbf2a16e12b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 21 15:39:28 1998 +0000
FP CW and SW handling for Arm.
diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c
new file mode 100644
index 0000000..34ad36d
--- /dev/null
+++ b/sysdeps/arm/fpu/fclrexcpt.c
@@ -0,0 +1,39 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+feclearexcept (int excepts)
+{
+ unsigned long int temp;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Get the current floating point status. */
+ _FPU_GETCW(temp);
+
+ /* Clear the relevant bits. */
+ temp &= excepts ^ FE_ALL_EXCEPT;
+
+ /* Put the new data in effect. */
+ _FPU_SETCW(temp);
+}
diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c
new file mode 100644
index 0000000..5b31c5e
--- /dev/null
+++ b/sysdeps/arm/fpu/fegetenv.c
@@ -0,0 +1,29 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ unsigned long int temp;
+ _FPU_GETCW(temp);
+ envp->cw = temp;
+}
diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c
new file mode 100644
index 0000000..5f354bb
--- /dev/null
+++ b/sysdeps/arm/fpu/fegetround.c
@@ -0,0 +1,26 @@
+/* Return current rounding direction.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ return FE_TONEAREST; /* Easy. :-) */
+}
diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c
new file mode 100644
index 0000000..b2d3ec5
--- /dev/null
+++ b/sysdeps/arm/fpu/fesetenv.c
@@ -0,0 +1,33 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+ if (envp == FE_DFL_ENV)
+ _FPU_SETCW(_FPU_DEFAULT);
+ else
+ {
+ unsigned long temp = envp->cw;
+ _FPU_SETCW(temp);
+ }
+}
diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c
new file mode 100644
index 0000000..7591b39
--- /dev/null
+++ b/sysdeps/arm/fpu/fesetround.c
@@ -0,0 +1,27 @@
+/* Set current rounding direction.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ /* We only support FE_TONEAREST, so there is no need for any work. */
+ return (round == FE_TONEAREST)?1:0;
+}
diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..0fbfb16
--- /dev/null
+++ b/sysdeps/arm/fpu/fraiseexcpt.c
@@ -0,0 +1,32 @@
+/* Raise given exceptions.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include <math.h>
+
+void
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXPECTS. */
+ fexcept_t temp;
+ _FPU_GETCW(temp);
+ temp |= (excepts & FE_ALL_EXCEPT);
+ _FPU_SETCW(temp);
+}
diff --git a/sysdeps/arm/fpu/fsetexcptflag.c b/sysdeps/arm/fpu/fsetexcptflag.c
new file mode 100644
index 0000000..f5c06a6
--- /dev/null
+++ b/sysdeps/arm/fpu/fsetexcptflag.c
@@ -0,0 +1,38 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+#include <fpu_control.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fexcept_t temp;
+
+ /* Get the current environment. */
+ _FPU_GETCW(temp);
+
+ /* Set the desired exception mask. */
+ temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT);
+ temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT;
+
+ /* Save state back to the FPU. */
+ _FPU_SETCW(temp);
+}
diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c
new file mode 100644
index 0000000..691d3e1
--- /dev/null
+++ b/sysdeps/arm/fpu/ftestexcept.c
@@ -0,0 +1,32 @@
+/* Test exception in current environment.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <fpu_control.h>
+
+int
+fetestexcept (int excepts)
+{
+ fexcept_t temp;
+
+ /* Get current exceptions. */
+ _FPU_GETCW(temp);
+
+ return temp & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e45c3aadd519be936a26f2b4248691a15bdd2c8
commit 2e45c3aadd519be936a26f2b4248691a15bdd2c8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 21 15:33:23 1998 +0000
Replace stub file with real implementation.
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
index 054085d..8a2d338 100644
--- a/sysdeps/arm/fpu_control.h
+++ b/sysdeps/arm/fpu_control.h
@@ -1,5 +1,5 @@
-/* FPU control word definitions. Stub version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* FPU control word definitions. ARM version.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,54 @@
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
-#define _FPU_RESERVED 0xffffffff /* These bits are reserved. */
+/* We have a slight terminology confusion here. On the ARM, the register
+ * we're interested in is actually the FPU status word - the FPU control
+ * word is something different (which is implementation-defined and only
+ * accessible from supervisor mode.)
+ *
+ * The FPSR looks like this:
+ *
+ * 31-24 23-16 15-8 7-0
+ * | system ID | trap enable | system control | exception flags |
+ *
+ * We ignore the system ID bits; for interest's sake they are:
+ *
+ * 0000 "old" FPE
+ * 1000 FPPC hardware
+ * 0001 FPE 400
+ * 1001 FPA hardware
+ *
+ * The trap enable and exception flags are both structured like this:
+ *
+ * 7 - 5 4 3 2 1 0
+ * | reserved | INX | UFL | OFL | DVZ | IVO |
+ *
+ * where a `1' bit in the enable byte means that the trap can occur, and
+ * a `1' bit in the flags byte means the exception has occurred.
+ *
+ * The exceptions are:
+ *
+ * IVO - invalid operation
+ * DVZ - divide by zero
+ * OFL - overflow
+ * UFL - underflow
+ * INX - inexact (do not use; implementations differ)
+ *
+ * The system control byte looks like this:
+ *
+ * 7-5 4 3 2 1 0
+ * | reserved | AC | EP | SO | NE | ND |
+ *
+ * where the bits mean
+ *
+ * ND - no denormalised numbers (force them all to zero)
+ * NE - enable NaN exceptions
+ * SO - synchronous operation
+ * EP - use expanded packed-decimal format
+ * AC - use alternate definition for C flag on compare operations
+ */
+
+#define _FPU_RESERVED 0xfff0e0f0 /* These bits are reserved. */
/* The fdlibm code requires no interrupts for exceptions. Don't
change the rounding mode, it would break long double I/O! */
@@ -29,11 +76,9 @@
/* Type of the control word. */
typedef unsigned int fpu_control_t;
-/* Macros for accessing the hardware control word.
- * On the ARM, we can't do this from user mode (it would trap).
- */
-#define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw))
-#define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw))
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw))
+#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bde3fab6eeacba63c106df56e8f4b7ad5c8a4239
commit bde3fab6eeacba63c106df56e8f4b7ad5c8a4239
Author: Richard Henderson <rth@redhat.com>
Date: Thu May 21 01:18:56 1998 +0000
* sysdeps/unix/sysv/linux/alpha/glob.c: Include sysdeps/generic/glob.c
directly instead of include_next. Add missing semicolons.
* sysdeps/unix/sysv/linux/alpha/oldglob.c: Include sys/types.h.
Add missing semicolons.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
index 7bd5161..59c42ae 100644
--- a/sysdeps/unix/sysv/linux/alpha/glob.c
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -17,14 +17,14 @@
/* For Linux/Alpha we have to make the glob symbols versioned. */
#define glob(pattern, flags, errfunc, pglob) \
- __new_glob (pattern, flags, errfunc, pglob) \
+ __new_glob (pattern, flags, errfunc, pglob)
#define globfree(pglob) \
__new_globfree (pglob)
-#include_next <glob.c>
+#include <sysdeps/generic/glob.c>
#undef glob
#undef globfree
-default_symbol_version(__new_glob, glob, GLIBC_2.1)
-default_symbol_version(__new_globfree, globfree, GLIBC_2.1)
+default_symbol_version(__new_glob, glob, GLIBC_2.1);
+default_symbol_version(__new_globfree, globfree, GLIBC_2.1);
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
index 97284ab..f405fbf 100644
--- a/sysdeps/unix/sysv/linux/alpha/oldglob.c
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -17,6 +17,7 @@
/* This file contains only wrappers around the real glob functions. It
became necessary since the glob_t structure changed. */
+#include <sys/types.h>
#include <glob.h>
#if defined PIC && DO_VERSIONING
@@ -74,7 +75,7 @@ __old_glob (const char *pattern, int flags,
return result;
}
-symbol_version(__old_glob, glob, GLIBC_2.0)
+symbol_version(__old_glob, glob, GLIBC_2.0);
/* Free storage allocated in PGLOB by a previous `glob' call. */
@@ -89,6 +90,6 @@ __old_globfree (old_glob_t *pglob)
globfree (&correct);
}
-symbol_version(__old_globfree, globfree, GLIBC_2.0)
+symbol_version(__old_globfree, globfree, GLIBC_2.0);
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06c1390edef0e63664fdd13437a817a9b09dc324
commit 06c1390edef0e63664fdd13437a817a9b09dc324
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 20 14:34:42 1998 +0000
Missed double occurences of "the the" in one line - fixed it.
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index 18519ab..33af14e 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the the new process exits or is
+ The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index e26466b..5b15db6 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the the new process exits or is
+ The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index b132a67..b2458cb 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The calling process is suspended until the the new process exits or is
+ The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7500ff18c7a2653429ea6428c5373e2b458a81ba
commit 7500ff18c7a2653429ea6428c5373e2b458a81ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 19 16:12:40 1998 +0000
Correct handling of arguments.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 1ebec9c..b51d887 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -35,10 +35,26 @@
#define __socket P(__,socket)
#endif
+#define PUSHARGS_1 stmfd ip!, {a1}
+#define PUSHARGS_2 stmfd ip!, {a1, a2}
+#define PUSHARGS_3 stmfd ip!, {a1, a2, a3}
+#define PUSHARGS_4 stmfd ip!, {a1, a2, a3, a4}
+#define PUSHARGS_5 stmfd ip!, {a1, a2, a3, a4} /* Caller has already pushed arg 5 */
+#define PUSHARGS_6 stmfd ip!, {a1, a2, a3, a4}
+
+#ifndef NARGS
+#define NARGS 3 /* If we were called with no wrapper, this is really socket() */
+#endif
+
.globl __socket
ENTRY (__socket)
+ /* Push args onto the stack. */
+ mov ip, sp
+ P(PUSHARGS_,NARGS)
/* Do the system call trap. */
+ mov a1, $P(SOCKOP_,socket)
+ mov a2, ip
swi SYS_ify(socketcall)
/* r0 is < 0 if there was an error. */
@@ -46,7 +62,7 @@ ENTRY (__socket)
bhs PLTJMP(syscall_error)
/* Successful; return the syscall's value. */
- RETINSTR(mov,pc,r14)
+ ret
PSEUDO_END (__socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd5c62b1b390cc46b26f2f9a375a535adf9cd451
commit dd5c62b1b390cc46b26f2f9a375a535adf9cd451
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 19 16:12:29 1998 +0000
Fix the "the the" problems.
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index dc11373..18519ab 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The the calling process is suspended until the the new process exits or is
+ The calling process is suspended until the the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index 4de48b7..e26466b 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The the calling process is suspended until the the new process exits or is
+ The calling process is suspended until the the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index ba670ac..b132a67 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -23,7 +23,7 @@
#endif
/* Clone the calling process, but without copying the whole address space.
- The the calling process is suspended until the the new process exits or is
+ The calling process is suspended until the the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e916666169ef44c637f6f3c2de59c1c146777b12
commit e916666169ef44c637f6f3c2de59c1c146777b12
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 19 16:12:07 1998 +0000
(syscall_error): Use C_SYMBOL_NAME for a.out compatibility.
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index c1da525..5795f5e 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -43,7 +43,7 @@ syscall_error:
#ifdef _LIBC_REENTRANT
stmdb sp!, {r0, lr}
/* put another copy of r0 at a specific errno location */
- bl __errno_location
+ bl C_SYMBOL_NAME(__errno_location)
ldmia sp!, {r1, lr}
str r1, [r0]
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c56aa6338e8dfd4abb545b42c8fcff98b8e6163
commit 0c56aa6338e8dfd4abb545b42c8fcff98b8e6163
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 19 16:11:52 1998 +0000
(ALIGNARG): ELF .align directive uses a log, not a byte-count.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 28dd402..eeef7aa 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -25,8 +25,7 @@
#ifdef HAVE_ELF
-/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
-#define ALIGNARG(log2) 1<<log2
+#define ALIGNARG(log2) log2
/* For ELF we need the `.type' directive to make shared libs work right. */
#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,%##typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69069c4a577fe37cfae5aec38eee85ed55c5f5d3
commit 69069c4a577fe37cfae5aec38eee85ed55c5f5d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 19 16:11:41 1998 +0000
Support both big and little endian processors.
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
index 9acef4f..0e360e2 100644
--- a/sysdeps/arm/strlen.S
+++ b/sysdeps/arm/strlen.S
@@ -31,11 +31,19 @@ ENTRY(strlen)
rsb r0, r3, $0 @ get - that number into counter.
beq Laligned @ skip into main check routine if no
@ more
+#ifdef __ARMEB__
orr r2, r2, $0xff000000 @ set this byte to non-zero
subs r3, r3, $1 @ any more to do?
orrgt r2, r2, $0x00ff0000 @ if so, set this byte
subs r3, r3, $1 @ more?
orrgt r2, r2, $0x0000ff00 @ then set.
+#else
+ orr r2, r2, $0x000000ff @ set this byte to non-zero
+ subs r3, r3, $1 @ any more to do?
+ orrgt r2, r2, $0x0000ff00 @ if so, set this byte
+ subs r3, r3, $1 @ more?
+ orrgt r2, r2, $0x00ff0000 @ then set.
+#endif
Laligned: @ here, we have a word in r2. Does it
tst r2, $0x000000ff @ contain any zeroes?
tstne r2, $0x0000ff00 @
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=59f4b0c86c0d1bc6074f8475213e44ddadb18427
commit 59f4b0c86c0d1bc6074f8475213e44ddadb18427
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 12 12:20:54 1998 +0000
Wrapper around current code to convert from and back to old glob_t format.
diff --git a/sysdeps/unix/sysv/linux/alpha/oldglob.c b/sysdeps/unix/sysv/linux/alpha/oldglob.c
new file mode 100644
index 0000000..97284ab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/oldglob.c
@@ -0,0 +1,94 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file contains only wrappers around the real glob functions. It
+ became necessary since the glob_t structure changed. */
+#include <glob.h>
+
+#if defined PIC && DO_VERSIONING
+
+/* This is the old structure. The difference is that the gl_pathc and
+ gl_offs elements have type `int'. */
+typedef struct
+ {
+ int gl_pathc; /* Count of paths matched by the pattern. */
+ char **gl_pathv; /* List of matched pathnames. */
+ int gl_offs; /* Slots to reserve in `gl_pathv'. */
+ int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
+
+ /* If the GLOB_ALTDIRFUNC flag is set, the following functions
+ are used instead of the normal file access functions. */
+ void (*gl_closedir) __P ((void *));
+ struct dirent *(*gl_readdir) __P ((void *));
+ __ptr_t (*gl_opendir) __P ((__const char *));
+ int (*gl_lstat) __P ((__const char *, struct stat *));
+ int (*gl_stat) __P ((__const char *, struct stat *));
+ } old_glob_t;
+
+
+int
+__old_glob (const char *pattern, int flags,
+ int (*errfunc) __P ((const char *, int)),
+ old_glob_t *pglob)
+{
+ glob_t correct;
+ int result;
+
+ /* Construct an object of correct type. */
+ correct.gl_pathc = pglob->gl_pathc;
+ correct.gl_pathv = pglob->gl_pathv;
+ correct.gl_offs = pglob->gl_offs;
+ correct.gl_flags = pglob->gl_flags;
+ correct.gl_closedir = pglob->gl_closedir;
+ correct.gl_readdir = pglob->gl_readdir;
+ correct.gl_opendir = pglob->gl_opendir;
+ correct.gl_lstat = pglob->gl_lstat;
+ correct.gl_stat = pglob->gl_stat;
+
+ result = glob (pattern, flags, errfunc, &correct);
+
+ /* And convert it back. */
+ pglob->gl_pathc = correct.gl_pathc;
+ pglob->gl_pathv = correct.gl_pathv;
+ pglob->gl_offs = correct.gl_offs;
+ pglob->gl_flags = correct.gl_flags;
+ pglob->gl_closedir = correct.gl_closedir;
+ pglob->gl_readdir = correct.gl_readdir;
+ pglob->gl_opendir = correct.gl_opendir;
+ pglob->gl_lstat = correct.gl_lstat;
+ pglob->gl_stat = correct.gl_stat;
+
+ return result;
+}
+symbol_version(__old_glob, glob, GLIBC_2.0)
+
+
+/* Free storage allocated in PGLOB by a previous `glob' call. */
+void
+__old_globfree (old_glob_t *pglob)
+{
+ glob_t correct;
+
+ /* We only need these two symbols. */
+ correct.gl_pathc = pglob->gl_pathc;
+ correct.gl_pathv = pglob->gl_pathv;
+
+ globfree (&correct);
+}
+symbol_version(__old_globfree, globfree, GLIBC_2.0)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cab5b83e4d0919792c976d7dbfd447f278fd355e
commit cab5b83e4d0919792c976d7dbfd447f278fd355e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 12 12:20:27 1998 +0000
Wrapper around generic code to add version information.
diff --git a/sysdeps/unix/sysv/linux/alpha/glob.c b/sysdeps/unix/sysv/linux/alpha/glob.c
new file mode 100644
index 0000000..7bd5161
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/glob.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* For Linux/Alpha we have to make the glob symbols versioned. */
+#define glob(pattern, flags, errfunc, pglob) \
+ __new_glob (pattern, flags, errfunc, pglob) \
+#define globfree(pglob) \
+ __new_globfree (pglob)
+
+#include_next <glob.c>
+
+#undef glob
+#undef globfree
+
+default_symbol_version(__new_glob, glob, GLIBC_2.1)
+default_symbol_version(__new_globfree, globfree, GLIBC_2.1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5df1e78b29d237958b04193b7af2cba136cc443a
commit 5df1e78b29d237958b04193b7af2cba136cc443a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 12 12:20:06 1998 +0000
Compile oldglob in posix subdir.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 15ba1c7..fbbc56e 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,3 +1,7 @@
+ifeq ($(subdir),posix)
+sysdep_routines += oldglob
+endif
+
ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7214b180b39dfdd05edba7079e9362b10dc73158
commit 7214b180b39dfdd05edba7079e9362b10dc73158
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue May 12 12:19:53 1998 +0000
Add oldglob.c.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 6ced71e..d208604 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -10,6 +10,7 @@ kernel_sigaction.h
kernel_stat.h
kernel_termios.h
net/route.h
+oldglob.c
rt_sigaction.S
sizes.h
sys/acct.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50a430afa2446a2be7b12eb1a7712d3fc348726e
commit 50a430afa2446a2be7b12eb1a7712d3fc348726e
Author: Richard Henderson <rth@redhat.com>
Date: Mon May 11 11:05:13 1998 +0000
Don't mark pread and pwrite as EXTRA.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index ed81a2c..0b38038 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,8 +21,8 @@ getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64
-pread EXTRA pread 4 __pread pread __pread64 pread64
-pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
+pread - pread 4 __pread pread __pread64 pread64
+pwrite - pwrite 4 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=423363a17236e6e227f5ad485e8e8f9e13f1ae41
commit 423363a17236e6e227f5ad485e8e8f9e13f1ae41
Author: Richard Henderson <rth@redhat.com>
Date: Mon May 11 11:04:27 1998 +0000
(sysdep_routines): Remove statfs and fstatfs.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index f830303..15ba1c7 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -2,8 +2,7 @@ ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
- sethae ioperm osf_sigprocmask fstatfs statfs llseek \
- adjtimex
+ sethae ioperm osf_sigprocmask llseek adjtimex
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7829f6c432d20ef60528e62d13551a5b382c73ba
commit 7829f6c432d20ef60528e62d13551a5b382c73ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri May 8 15:02:44 1998 +0000
[subdir=elf]: Define sysdep-others, not others.
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index eb0921d..3cedf63 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -7,6 +7,6 @@ sysdep_routines += mremap
endif
ifeq ($(subdir),elf)
-others += lddlibc4
+sysdep-others += lddlibc4
install-bin += lddlibc4
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f123e3c339c6c561d1ca4b23e8418e0b448aed3
commit 0f123e3c339c6c561d1ca4b23e8418e0b448aed3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 6 10:22:08 1998 +0000
Solaris specific error numbers.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
new file mode 100644
index 0000000..4065bfb
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/errno.h
@@ -0,0 +1,170 @@
+/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+# define EDOM 33 /* Math argument out of domain of function. */
+# define EILSEQ 88 /* Illegal byte sequence. */
+# define ERANGE 34 /* Math result not representable. */
+#endif
+
+#ifdef _ERRNO_H
+/* All error codes the system knows about. */
+
+# define EPERM 1 /* Not super-user. */
+# define ENOENT 2 /* No such file or directory. */
+# define ESRCH 3 /* No such process. */
+# define EINTR 4 /* Interrupted system call. */
+# define EIO 5 /* I/O error. */
+# define ENXIO 6 /* No such device or address. */
+# define E2BIG 7 /* Arg list too long. */
+# define ENOEXEC 8 /* Exec format error. */
+# define EBADF 9 /* Bad file number. */
+# define ECHILD 10 /* No children. */
+# define EAGAIN 11 /* Resource temporarily unavailable. */
+# define EWOULDBLOCK EAGAIN
+# define ENOMEM 12 /* Not enough core. */
+# define EACCES 13 /* Permission denied. */
+# define EFAULT 14 /* Bad address. */
+# define ENOTBLK 15 /* Block device required. */
+# define EBUSY 16 /* Mount device busy. */
+# define EEXIST 17 /* File exists. */
+# define EXDEV 18 /* Cross-device link. */
+# define ENODEV 19 /* No such device. */
+# define ENOTDIR 20 /* Not a directory. */
+# define EISDIR 21 /* Is a directory. */
+# define EINVAL 22 /* Invalid argument. */
+# define ENFILE 23 /* File table overflow. */
+# define EMFILE 24 /* Too many open files. */
+# define ENOTTY 25 /* Inappropriate ioctl for device. */
+# define ETXTBSY 26 /* Text file busy. */
+# define EFBIG 27 /* File too large. */
+# define ENOSPC 28 /* No space left on device. */
+# define ESPIPE 29 /* Illegal seek. */
+# define EROFS 30 /* Read only file system. */
+# define EMLINK 31 /* Too many links. */
+# define EPIPE 32 /* Broken pipe. */
+# define ENOMSG 35 /* No message of desired type. */
+# define EIDRM 36 /* Identifier removed. */
+# define ECHRNG 37 /* Channel number out of range. */
+# define EL2NSYNC 38 /* Level 2 not synchronized. */
+# define EL3HLT 39 /* Level 3 halted. */
+# define EL3RST 40 /* Level 3 reset. */
+# define ELNRNG 41 /* Link number out of range. */
+# define EUNATCH 42 /* Protocol driver not attached. */
+# define ENOCSI 43 /* No CSI structure available. */
+# define EL2HLT 44 /* Level 2 halted. */
+# define EDEADLK 45 /* Deadlock condition. */
+# define ENOLCK 46 /* No record locks available. */
+# define ECANCELED 47 /* Operation canceled. */
+# define ENOTSUP 48 /* Operation not supported. */
+
+/* Filesystem Quotas. */
+# define EDQUOT 49 /* Disc quota exceeded. */
+
+/* Convergent Error Returns. */
+# define EBADE 50 /* Invalid exchange. */
+# define EBADR 51 /* Invalid request descriptor. */
+# define EXFULL 52 /* Exchange full. */
+# define ENOANO 53 /* No anode. */
+# define EBADRQC 54 /* Invalid request code. */
+# define EBADSLT 55 /* Invalid slot. */
+# define EDEADLOCK 56 /* File locking deadlock error. */
+
+# define EBFONT 57 /* Bad font file fmt. */
+
+/* STREAM problems. */
+# define ENOSTR 60 /* Device not a stream. */
+# define ENODATA 61 /* No data (for no delay io). */
+# define ETIME 62 /* Timer expired. */
+# define ENOSR 63 /* Out of streams resources. */
+
+# define ENONET 64 /* Machine is not on the network. */
+# define ENOPKG 65 /* Package not installed. */
+# define EREMOTE 66 /* The object is remote. */
+# define ENOLINK 67 /* The link has been severed. */
+# define EADV 68 /* Advertise error. */
+# define ESRMNT 69 /* Srmount error. */
+
+# define ECOMM 70 /* Communication error on send. */
+# define EPROTO 71 /* Protocol error. */
+# define EMULTIHOP 74 /* Multihop attempted. */
+# define EBADMSG 77 /* Trying to read unreadable message. */
+# define ENAMETOOLONG 78 /* Path name is too long. */
+# define EOVERFLOW 79 /* Value too large to be stored in data type.*/
+# define ENOTUNIQ 80 /* Given log. name not unique. */
+# define EBADFD 81 /* F.d. invalid for this operation. */
+# define EREMCHG 82 /* Remote address changed. */
+
+/* Shared library problems. */
+# define ELIBACC 83 /* Can't access a needed shared lib. */
+# define ELIBBAD 84 /* Accessing a corrupted shared lib. */
+# define ELIBSCN 85 /* .lib section in a.out corrupted. */
+# define ELIBMAX 86 /* Attempting to link in too many libs. */
+# define ELIBEXEC 87 /* Attempting to exec a shared library. */
+# define ENOSYS 89 /* Unsupported file system operation. */
+# define ELOOP 90 /* Symbolic link loop. */
+# define ERESTART 91 /* Restartable system call. */
+# define ESTRPIPE 92 /* If pipe/FIFO, don't sleep in stream head. */
+# define ENOTEMPTY 93 /* Directory not empty. */
+# define EUSERS 94 /* Too many users (for UFS). */
+
+/* BSD Networking Software: argument errors. */
+# define ENOTSOCK 95 /* Socket operation on non-socket. */
+# define EDESTADDRREQ 96 /* Destination address required. */
+# define EMSGSIZE 97 /* Message too long. */
+# define EPROTOTYPE 98 /* Protocol wrong type for socket. */
+# define ENOPROTOOPT 99 /* Protocol not available. */
+# define EPROTONOSUPPORT 120 /* Protocol not supported. */
+# define ESOCKTNOSUPPORT 121 /* Socket type not supported. */
+# define EOPNOTSUPP 122 /* Operation not supported on socket. */
+# define EPFNOSUPPORT 123 /* Protocol family not supported. */
+# define EAFNOSUPPORT 124 /* Address family not supported by
+ protocol family. */
+# define EADDRINUSE 125 /* Address already in use. */
+# define EADDRNOTAVAIL 126 /* Can't assign requested address. */
+/* BSD Networking Software: operational errors. */
+# define ENETDOWN 127 /* Network is down. */
+# define ENETUNREACH 128 /* Network is unreachable. */
+# define ENETRESET 129 /* Network dropped connection because
+ of reset. */
+# define ECONNABORTED 130 /* Software caused connection abort. */
+# define ECONNRESET 131 /* Connection reset by peer. */
+# define ENOBUFS 132 /* No buffer space available. */
+# define EISCONN 133 /* Socket is already connected. */
+# define ENOTCONN 134 /* Socket is not connected. */
+/* XENIX has 135 - 142. */
+# define ESHUTDOWN 143 /* Can't send after socket shutdown. */
+# define ETOOMANYREFS 144 /* Too many references: can't splice. */
+# define ETIMEDOUT 145 /* Connection timed out. */
+# define ECONNREFUSED 146 /* Connection refused. */
+# define EHOSTDOWN 147 /* Host is down. */
+# define EHOSTUNREACH 148 /* No route to host. */
+# define EALREADY 149 /* operation already in progress. */
+# define EINPROGRESS 150 /* operation now in progress. */
+
+/* SUN Network File System. */
+# define ESTALE 151 /* Stale NFS file handle. */
+
+#endif
+
+#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42362b90d61d4cf8a1193c87d54fa1b077af5b56
commit 42362b90d61d4cf8a1193c87d54fa1b077af5b56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 6 09:51:36 1998 +0000
Solaris2 specific type definitions.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
new file mode 100644
index 0000000..44e343a
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
@@ -0,0 +1,118 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+#ifdef __GNUC__
+typedef unsigned long long int __u_quad_t;
+typedef long long int __quad_t;
+#else
+typedef struct
+{
+ long __val[2];
+} __quad_t;
+typedef struct
+{
+ __u_long __val[2];
+} __u_quad_t;
+#endif
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#ifdef __GNUC__
+typedef signed long long int __int64_t;
+typedef unsigned long long int __uint64_t;
+#endif
+typedef __quad_t *__qaddr_t;
+typedef unsigned long int __dev_t; /* Type of device numbers. */
+typedef long int __uid_t; /* Type of user identifications. */
+typedef long int __gid_t; /* Type of group identifications. */
+typedef unsigned long int __ino_t; /* Type of file serial numbers. */
+typedef unsigned long int __mode_t; /* Type of file attribute bitmasks. */
+typedef unsigned long int __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef long int __pid_t; /* Type of process identifications. */
+typedef int __ssize_t; /* Type of a byte count, or error. */
+typedef __u_quad_t __fsid_t; /* Type of file system IDs. */
+typedef long int __clock_t; /* Type of CPU usage counts. */
+typedef long int __rlim_t; /* Type for resource measurement. */
+typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */
+typedef __quad_t __ino64_t; /* Type for file serial numbers. */
+typedef __loff_t __off64_t; /* Type of file izes and offsets. */
+typedef unsigned int __id_t; /* General type for IDs. */
+
+/* Everythin' else. */
+typedef long int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+typedef int __key_t; /* Type of an IPC key */
+
+/* fd_set for select. */
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (sizeof (unsigned long int) * 8)
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS))
+
+typedef struct
+ {
+ /* XPG4.2 requires this member name. */
+ unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
+ } __fd_set;
+
+typedef unsigned long int __fd_mask;
+
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef long int __blkcnt_t;
+typedef __quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef unsigned int __fsblkcnt_t;
+typedef __u_quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef unsigned long int __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
+/* Used in XTI. */
+typedef int __t_scalar_t;
+typedef unsigned int __t_uscalar_t;
+
+#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6d2806b8ff4363342c33aabd781f6d21adc97b9
commit a6d2806b8ff4363342c33aabd781f6d21adc97b9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 6 09:50:30 1998 +0000
Add LFS support and use correct types overall.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index c6048a9..ef93b7b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,19 +22,21 @@
#include <bits/types.h>
+/* Length of array allocated for file system type name. */
+#define _ST_FSTYPSZ 16
+
+
/* Structure describing file characteristics. */
struct stat
{
- unsigned long int st_dev;
+ __dev_t st_dev;
long int st_filler1[3];
__ino_t st_ino; /* File serial number. */
- unsigned long int st_mode; /* File mode. */
- /* This is unsigned long instead of __nlink_t, since SVR4 has
- a long nlink_t, not a short one. */
- unsigned long int st_nlink; /* Link count. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
- unsigned long int st_rdev; /* Device number, if device. */
+ __dev_t st_rdev; /* Device number, if device. */
long int st_filler2[2];
__off_t st_size; /* Size of file, in bytes. */
@@ -48,14 +50,45 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctime_usec;
- __blkcnt_t st_blksize; /* Optimal block size for I/O. */
+ long int st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- long int st_blocks; /* Number of 512-byte blocks allocated. */
- char st_fstype[16];
+ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[_ST_FSTYPSZ];
long int st_filler4[8];
};
+#ifdef __USE_LARGEFILE64
+/* struct stat64 has the shape as stat */
+struct stat64
+ {
+ __dev_t st_dev; /* Device */
+ long int st_filler1[2];
+ __ino64_t st_ino; /* File serial number */
+ __mode_t st_mode; /* File mode */
+ __nlink_t st_nlink; /* Link count */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device */
+ long int st_filler2;
+
+ __off64_t st_size; /* Size of file, in bytes. */
+
+ __time_t st_atime; /* Time of last access */
+ unsigned long int st_atime_usec;
+ __time_t st_mtime; /* Time of last modification */
+ unsigned long int st_mtime_usec;
+ __time_t st_ctime; /* Time of last status change */
+ unsigned long int st_ctime_usec;
+
+ long int st_blksize;
+ __blkcnt64_t st_blocks;
+ char st_fstype[_ST_FSTYPSZ];
+ long int st_filler3[8];
+};
+#endif
+
+
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=096031e14c93b10a3419e26200a8ad2a38ffa59c
commit 096031e14c93b10a3419e26200a8ad2a38ffa59c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 30 16:57:25 1998 +0000
(PSEUDO): On error, call __syscall_error rather than syscall_error
directly.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 8a5111f..14dd17c 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -53,7 +53,7 @@
ENTRY (name) \
DO_CALL (args, syscall_name); \
cmn r0, $4096; \
- bhs PLTJMP(syscall_error);
+ bhs PLTJMP(C_SYMBOL_NAME(__syscall_error));
#undef PSEUDO_END
#define PSEUDO_END(name) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a62da3689a794d4154b16d3d7742fd1515723bb5
commit a62da3689a794d4154b16d3d7742fd1515723bb5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 30 16:57:14 1998 +0000
mmap syscall interface for Linux/ARM.
diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mmap.S
new file mode 100644
index 0000000..905303e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
@@ -0,0 +1,39 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+ .text
+
+ENTRY (__mmap)
+
+ /* Because we can only get five args through the syscall interface, and
+ mmap() takes six, we need to build a parameter block and pass its
+ address instead. The 386 port does a similar trick. */
+
+ mov ip, sp
+ stmdb ip!, {a1-a4}
+ mov a1, ip
+ swi SYS_ify (mmap)
+ cmn r0, $4096
+ bhs PLTJMP(syscall_error);
+ ret
+
+PSEUDO_END (__mmap)
+
+weak_alias (__mmap, mmap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87161c8c887d83474187ec13a40a0658b6a15e14
commit 87161c8c887d83474187ec13a40a0658b6a15e14
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 30 16:56:45 1998 +0000
Startup file for ARM.
diff --git a/sysdeps/unix/arm/start.c b/sysdeps/unix/arm/start.c
new file mode 100644
index 0000000..7723847
--- /dev/null
+++ b/sysdeps/unix/arm/start.c
@@ -0,0 +1,85 @@
+/* Special startup code for ARM a.out binaries.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+/* The first piece of initialized data. */
+int __data_start = 0;
+#ifdef HAVE_WEAK_SYMBOLS
+weak_alias (__data_start, data_start)
+#endif
+
+#ifndef errno
+volatile int __errno;
+strong_alias (__errno, errno)
+#endif
+
+extern void __libc_init __P ((int argc, char **argv, char **envp));
+extern int main __P ((int argc, char **argv, char **envp));
+
+/* N.B.: It is important that this be the first function.
+ This file is the first thing in the text section. */
+
+/* If this was in C it might create its own stack frame and
+ screw up the arguments. */
+#ifdef NO_UNDERSCORES
+asm (".text; .globl _start; _start: B start1");
+#else
+asm (".text; .globl __start; __start: B _start1");
+
+/* Make an alias called `start' (no leading underscore, so it can't
+ conflict with C symbols) for `_start'. This is the name vendor crt0.o's
+ tend to use, and thus the name most linkers expect. */
+asm (".set start, __start");
+#endif
+
+/* Fool gcc into thinking that more args are passed. This makes it look
+ on the stack (correctly) for the real arguments. It causes somewhat
+ strange register usage in start1(), but we aren't too bothered about
+ that at the moment. */
+#define DUMMIES a1, a2, a3, a4
+
+#ifdef DUMMIES
+#define ARG_DUMMIES DUMMIES,
+#define DECL_DUMMIES int DUMMIES;
+#else
+#define ARG_DUMMIES
+#define DECL_DUMMIES
+#endif
+
+/* ARGSUSED */
+static void
+start1 (ARG_DUMMIES argc, argv, envp)
+ DECL_DUMMIES
+ int argc;
+ char **argv;
+ char **envp;
+{
+ /* Store a pointer to the environment. */
+ __environ = envp;
+
+ /* Do C library initializations. */
+ __libc_init (argc, argv, __environ);
+
+ /* Call the user program. */
+ exit (main (argc, argv, __environ));
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3642cfd2b4ba88a906d2694d07cd1eca53d53dc4
commit 3642cfd2b4ba88a906d2694d07cd1eca53d53dc4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 30 16:56:27 1998 +0000
Fix off by one error.
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
index a986d68..567cc39 100644
--- a/sysdeps/arm/memset.S
+++ b/sysdeps/arm/memset.S
@@ -63,6 +63,5 @@ ENTRY(memset)
strb a2, [a4], $1
strb a2, [a4], $1
strb a2, [a4], $1
- strb a2, [a4], $1
RETINSTR(mov,pc,lr)
END(memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b13ae75e55221ae59ebd225eb594d4b8fbdd8fb4
commit b13ae75e55221ae59ebd225eb594d4b8fbdd8fb4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 29 16:05:50 1998 +0000
Add SIGCLD definition.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 05ffbae..44c3374 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -52,6 +52,7 @@
#define SIGTSTP 18
#define SIGCONT 19
#define SIGCHLD 20
+#define SIGCLD SIGCHLD
#define SIGTTIN 21
#define SIGTTOU 22
#define SIGIO 23
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68f722de86b5e20bb9f12c93d1d812be193f9564
commit 68f722de86b5e20bb9f12c93d1d812be193f9564
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 24 15:29:55 1998 +0000
(ftruncate): Make __ftruncate the strong symbol, and add weak alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 71cfbaa..ed81a2c 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -27,7 +27,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
-ftruncate - ftruncate 2 ftruncate ftruncate64
+ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
# these are actually common with the x86:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6ce92cdf1b1640532c64bc432641c13cd29d5b8
commit d6ce92cdf1b1640532c64bc432641c13cd29d5b8
Author: Richard Henderson <rth@redhat.com>
Date: Fri Apr 24 14:43:00 1998 +0000
Don't check against SP.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index af0b5ae..a15ab31 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -78,6 +78,5 @@ typedef long int __jmp_buf[17];
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ({ register void *_sp __asm__("$30"); void *_addr = (_address); \
- _sp <= _addr && _addr < (void *)((_jmpbuf)[JB_SP]); })
+ ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4af6e4ade676d122e1cad3a8e68400907d615a91
commit 4af6e4ade676d122e1cad3a8e68400907d615a91
Author: Richard Henderson <rth@redhat.com>
Date: Thu Apr 23 22:46:39 1998 +0000
(_JMPBUF_UNWINDS): Added.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index de37019..af0b5ae 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -74,4 +74,10 @@
#ifndef __ASSEMBLY__
typedef long int __jmp_buf[17];
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
+ ({ register void *_sp __asm__("$30"); void *_addr = (_address); \
+ _sp <= _addr && _addr < (void *)((_jmpbuf)[JB_SP]); })
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91e4b2f65e3441d57503d2f80f510074a93860b7
commit 91e4b2f65e3441d57503d2f80f510074a93860b7
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Apr 22 02:07:41 1998 +0000
* sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Added.
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index a302b72..aa376a0 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -39,3 +39,8 @@ typedef struct
#endif
} __jmp_buf[1];
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((void *) (address) < (void *) (jmpbuf)->__sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ec52ed6cfa481e373d3faf7497518b90a0dbbd2
commit 4ec52ed6cfa481e373d3faf7497518b90a0dbbd2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 20 18:34:25 1998 +0000
Add copyright text.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index 5cf9cd7..ea25a9b 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -1,3 +1,21 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
/* Define the machine-dependent type `jmp_buf'. ARM version. */
#ifndef _SETJMP_H
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 2991232..a302b72 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,3 +1,21 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
/* Define the machine-dependent type `jmp_buf'. m68k version. */
#ifndef _SETJMP_H
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42d5b2810fde09dec18db1e42d2042ee3db53162
commit 42d5b2810fde09dec18db1e42d2042ee3db53162
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 17 08:52:51 1998 +0000
Optimized ARM version of strlen.
diff --git a/sysdeps/arm/strlen.S b/sysdeps/arm/strlen.S
new file mode 100644
index 0000000..9acef4f
--- /dev/null
+++ b/sysdeps/arm/strlen.S
@@ -0,0 +1,55 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Code contributed by Matthew Wilcox <willy@odie.barnet.ac.uk>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* size_t strlen(const char *S)
+ * entry: r0 -> string
+ * exit: r0 = len
+ */
+
+ENTRY(strlen)
+ bic r1, r0, $3 @ addr of word containing first byte
+ ldr r2, [r1], $4 @ get the first word
+ ands r3, r0, $3 @ how many bytes are duff?
+ rsb r0, r3, $0 @ get - that number into counter.
+ beq Laligned @ skip into main check routine if no
+ @ more
+ orr r2, r2, $0xff000000 @ set this byte to non-zero
+ subs r3, r3, $1 @ any more to do?
+ orrgt r2, r2, $0x00ff0000 @ if so, set this byte
+ subs r3, r3, $1 @ more?
+ orrgt r2, r2, $0x0000ff00 @ then set.
+Laligned: @ here, we have a word in r2. Does it
+ tst r2, $0x000000ff @ contain any zeroes?
+ tstne r2, $0x0000ff00 @
+ tstne r2, $0x00ff0000 @
+ tstne r2, $0xff000000 @
+ addne r0, r0, $4 @ if not, the string is 4 bytes longer
+ ldrne r2, [r1], $4 @ and we continue to the next word
+ bne Laligned @
+Llastword: @ drop through to here once we find a
+ tst r2, $0x000000ff @ word that has a zero byte in it
+ addne r0, r0, $1 @
+ tstne r2, $0x0000ff00 @ and add up to 3 bytes on to it
+ addne r0, r0, $1 @
+ tstne r2, $0x00ff0000 @ (if first three all non-zero, 4th
+ addne r0, r0, $1 @ must be zero)
+ RETINSTR(mov,pc,lr)
+END(strlen)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69b51432792e80457fef3d79b26a26532e55d41b
commit 69b51432792e80457fef3d79b26a26532e55d41b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 9 10:12:51 1998 +0000
Use +force in dependency list of installation targets.
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
index a51ed7f..3ed0964 100644
--- a/sysdeps/standalone/i386/force_cpu386/Makefile
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -20,6 +20,7 @@
ifeq (bare,$(subdir))
install-others += $(inst_libdir)/force_cpu386.ld
-$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld
+$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld \
+ $(+force)
$(do-install)
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c79c90357e233a6201a40a4e0699f0d87e0236aa
commit c79c90357e233a6201a40a4e0699f0d87e0236aa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 8 07:10:11 1998 +0000
Add __lseek64 alias for __llseek.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index b380996..71cfbaa 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -20,7 +20,7 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek 3 __llseek llseek lseek64
+llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64
pread EXTRA pread 4 __pread pread __pread64 pread64
pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec39d34aed92c66efdc2b250c6b31d75819fc13a
commit ec39d34aed92c66efdc2b250c6b31d75819fc13a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 7 09:12:51 1998 +0000
Allow inclusion from netinet.in.h.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index f481a47..75ed54f 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _NETINET_IN_H
# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=859d74afa9542fd0c53e5dc0ef9befe62c9ac964
commit 859d74afa9542fd0c53e5dc0ef9befe62c9ac964
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Apr 7 09:11:50 1998 +0000
2.0 kernel support.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index d84e70e..0d5024f 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/ARM version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,9 +18,54 @@
Boston, MA 02111-1307, USA. */
#include <signal.h>
+#include <asm/ptrace.h>
+
+union k_sigcontext
+ {
+ struct
+ {
+ unsigned long int trap_no;
+ unsigned long int error_code;
+ unsigned long int oldmask;
+ unsigned long int arm_r0;
+ unsigned long int arm_r1;
+ unsigned long int arm_r2;
+ unsigned long int arm_r3;
+ unsigned long int arm_r4;
+ unsigned long int arm_r5;
+ unsigned long int arm_r6;
+ unsigned long int arm_r7;
+ unsigned long int arm_r8;
+ unsigned long int arm_r9;
+ unsigned long int arm_r10;
+ unsigned long int arm_fp;
+ unsigned long int arm_ip;
+ unsigned long int arm_sp;
+ unsigned long int arm_lr;
+ unsigned long int arm_pc;
+ unsigned long int arm_cpsr;
+ } v21;
+ struct
+ {
+ unsigned long int magic;
+ struct pt_regs reg;
+ unsigned long int trap_no;
+ unsigned long int error_code;
+ unsigned long int oldmask;
+ } v20;
+};
void
-profil_counter (int signo, struct sigcontext sc)
+profil_counter (int signo, int _a2, int _a3, int _a4, union k_sigcontext sc)
{
- profil_count ((void *) sc.reg.ARM_pc);
+ /* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
+ Fortunately 2.0 puts a magic number in the first word and this is not
+ a legal value for `trap_no', so we can tell them apart. */
+
+ void *pc;
+ if (sc.v20.magic == 0x4B534154)
+ pc = (void *) sc.v20.reg.ARM_pc;
+ else
+ pc = (void *) sc.v21.arm_pc;
+ profil_count (pc);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80509c667fae7277be76d3cf448c1290283f4358
commit 80509c667fae7277be76d3cf448c1290283f4358
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 3 12:06:51 1998 +0000
(__syscall_error): Same for PIC and non-PIC now. Correctly negate
error number.
(errno): Use `%' not `@' in .type directives.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
index a71181c..482535b 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.S
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,31 +21,23 @@
/* We define errno here, to be consistent with Linux/i386. */
.bss
.globl errno
- .type errno,@object
+ .type errno,%object
.size errno,4
errno: .zero 4
.globl _errno
- .type _errno,@object
+ .type _errno,%object
_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
.text
-/* The following code is only used in the shared library when we
- compile the reentrant version. Otherwise each system call defines
- each own version. */
-
-#ifndef PIC
-
/* The syscall stubs jump here when they detect an error.
- The code for Linux is almost identical to the canonical Unix/i386
- code, except that the error number in %eax is negated. */
+ The code for Linux is almost identical to the canonical Unix
+ code, except that the error number in R0 is negated. */
#undef CALL_MCOUNT
-#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers R0. */
ENTRY (__syscall_error)
- mvn r0, r0
+ rsb r0, r0, $0
#define __syscall_error __syscall_error_1
#include <sysdeps/unix/arm/sysdep.S>
-
-#endif /* !PIC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=24e022cf828deb3058fd4ddc87791830f6988b29
commit 24e022cf828deb3058fd4ddc87791830f6988b29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 3 08:23:11 1998 +0000
(PSEUDO): Fix typo introduced in last change.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index dd1b6f4..8a5111f 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -49,7 +49,7 @@
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
- .type syscall_error,%function \
+ .type syscall_error,%function ; \
ENTRY (name) \
DO_CALL (args, syscall_name); \
cmn r0, $4096; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2284fbe2ac25901e27ce4eadf3b8d06cd76f8e83
commit 2284fbe2ac25901e27ce4eadf3b8d06cd76f8e83
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 1 09:14:55 1998 +0000
Correct test for error and use PLTJMP() rather than explicit (PLT).
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 0ff6dd0..1ebec9c 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -43,7 +43,7 @@ ENTRY (__socket)
/* r0 is < 0 if there was an error. */
cmn r0, $124
- bge syscall_error(PLT)
+ bhs PLTJMP(syscall_error)
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff550b1f27910041f737bb6306345d55bf612f9a
commit ff550b1f27910041f737bb6306345d55bf612f9a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 1 09:11:44 1998 +0000
(SYSCALL_ERROR_HANDLER): Always define, not only #ifndef PIC.
(DO_CALL): Pass fifth argument correctly in R4.
(PSEUDO): Correct test for error, call syscall_error through PLT if PIC.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 3b7ffe0..dd1b6f4 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -45,28 +45,64 @@
is a real error number. Linus said he will make sure the no syscall
returns a value in -1 .. -4095 as a valid result so we can savely
test with -4095. */
+
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
+ .type syscall_error,%function \
ENTRY (name) \
DO_CALL (args, syscall_name); \
cmn r0, $4096; \
- bgt syscall_error;
+ bhs PLTJMP(syscall_error);
#undef PSEUDO_END
#define PSEUDO_END(name) \
SYSCALL_ERROR_HANDLER \
END (name)
-#ifndef PIC
#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
-#else
-#error Aiee
-#endif /* PIC */
+
+/* Linux takes system call args in registers:
+ syscall number in the SWI instruction
+ arg 1 r0
+ arg 2 r1
+ arg 3 r2
+ arg 4 r3
+ arg 5 r4 (this is different from the APCS convention)
+
+ The compiler is going to form a call by coming here, through PSEUDO, with
+ arguments
+ syscall number in the DO_CALL macro
+ arg 1 r0
+ arg 2 r1
+ arg 3 r2
+ arg 4 r3
+ arg 5 [sp]
+
+ We need to shuffle values between R4 and the stack so that the caller's
+ R4 is not corrupted, and the kernel sees the right argument there.
+
+*/
#undef DO_CALL
-#define DO_CALL(args, syscall_name) \
- swi SYS_ify (syscall_name);
+#define DO_CALL(args, syscall_name) \
+ DOARGS_##args \
+ swi SYS_ify (syscall_name); \
+ UNDOARGS_##args
+
+#define DOARGS_0 /* nothing */
+#define DOARGS_1 /* nothing */
+#define DOARGS_2 /* nothing */
+#define DOARGS_3 /* nothing */
+#define DOARGS_4 /* nothing */
+#define DOARGS_5 ldr ip, [sp]; str r4, [sp]; mov r4, ip;
+
+#define UNDOARGS_0 /* nothing */
+#define UNDOARGS_1 /* nothing */
+#define UNDOARGS_2 /* nothing */
+#define UNDOARGS_3 /* nothing */
+#define UNDOARGS_4 /* nothing */
+#define UNDOARGS_5 ldr r4, [sp];
#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7304fce4e1456c9de9f31ad4f8d46a7749a2568
commit e7304fce4e1456c9de9f31ad4f8d46a7749a2568
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 1 09:09:05 1998 +0000
(_start): Leave most of the initialisation for __libc_start_main().
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
index e0964a1..13b9c78 100644
--- a/sysdeps/arm/elf/start.S
+++ b/sysdeps/arm/elf/start.S
@@ -24,19 +24,19 @@
This includes _init and _libc_init
- At this entry point, most registers' values are unspecified, except for:
+ At this entry point, most registers' values are unspecified, except:
- r0 Contains a function pointer to be registered with `atexit'.
+ a1 Contains a function pointer to be registered with `atexit'.
This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
sp The stack contains the arguments and environment:
- 0(%esp) argc
- 4(%esp) argv[0]
+ 0(sp) argc
+ 4(sp) argv[0]
...
- (4*argc)(%esp) NULL
- (4*(argc+1))(%esp) envp[0]
+ (4*argc)(sp) NULL
+ (4*(argc+1))(sp) envp[0]
...
NULL
*/
@@ -44,62 +44,29 @@
.text
.globl _start
_start:
- /* Clear the frame pointer. The Intel ABI suggests this be done,
- to mark the outermost frame obviously. This seems like a
- sensible thing to do */
+ /* Clear the frame pointer since this is the outermost frame. */
mov fp, #0
- /* r0 contains the address of the shared library termination
- function, which we will register with `atexit' to be called by
- `exit'. I suspect that on some systems, and when statically
- linked, this will not be set by anything to any function
- pointer; hopefully it will be zero so we don't try to call
- random pointers. */
- cmp r0,#0
- blne atexit(PLT)
-
- /* Do essential libc initialization. In statically linked
- programs under the GNU Hurd, this is what sets up the
- arguments on the stack for the code below. For dyn-link
- programs, this has been run already, in the .init code. */
-#ifndef PIC
- bl __libc_init_first
-
- /* Extract the arguments and environment as encoded on the stack
- and set up the arguments for `main': argc, argv, envp. */
- ldr r0,[sp]
- add r1,sp,#4
- add r2,r1,r0,lsl #2
- add r2,r2,#4
- /* save a copy of envp while we have it */
- ldr r3,L_environ
- str r2,[r3]
-
- /* Call `_init', which is the entry point to our own `.init'
- section; and register with `atexit' to have `exit' call
- `_fini', which is the entry point to our own `.fini' section. */
- bl _init
- ldr r0,L_fini
- bl atexit
- b L_pfini
-
-L_fini: .word _fini
-L_environ: .word _environ
-L_pfini:
-#endif
- /* rebuild the arg list for main() */
- ldr r0,[sp]
- add r1,sp,#4
- add r2,r1,r0,lsl #2
- add r2,r2,#4
-
- /* Call the user's main function, and exit with its value. */
- bl main
- bl exit
+ /* Pop argc off the stack and save a pointer to argv */
+ ldmfd sp!, {a2}
+ mov a3, sp
+
+ /* Push the last arguments to main() onto the stack */
+ stmfd sp!, {a1}
+ ldr a1, =_fini
+ stmfd sp!, {a1}
+
+ /* Set up the other arguments for main() that go in registers */
+ ldr a1, =main
+ ldr a4, =_init
+
+ /* __libc_start_main (main, argc, argv, init, fini, rtld_fini) */
+
+ /* Let the libc call main and exit with its return code. */
+ bl __libc_start_main
/* should never get here....*/
bl abort
-
/* Define a symbol for the first piece of initialized data. */
.data
.globl __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4dc6c456e4cc37c0d7b761677495ce3865983f8
commit c4dc6c456e4cc37c0d7b761677495ce3865983f8
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Apr 1 00:53:13 1998 +0000
* sysdeps/unix/sysv/linux/m68k/dl-librecon.h: New file.
* sysdeps/unix/sysv/linux/m68k/Makefile [$(subdir)=elf]: Build and
install lddlibc4.
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index 12e95f1..eb0921d 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -5,3 +5,8 @@ m68k-syntax-flag = -DMOTOROLA_SYNTAX
ifeq ($(subdir),misc)
sysdep_routines += mremap
endif
+
+ifeq ($(subdir),elf)
+others += lddlibc4
+install-bin += lddlibc4
+endif
diff --git a/sysdeps/unix/sysv/linux/m68k/dl-librecon.h b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h
new file mode 100644
index 0000000..dbb4e75
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/dl-librecon.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/dl-librecon.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f709e93784a0314a77b7a71fa44a5368fb54d88d
commit f709e93784a0314a77b7a71fa44a5368fb54d88d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 31 23:18:03 1998 +0000
(_start): Let __libc_start_main do most of the init stuff.
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index a67a39a..1330d1f 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for Alpha/ELF.
- Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>
@@ -31,56 +31,24 @@ _start:
1: ldgp gp, 0(gp)
.prologue 1
- /* Save v0. When starting a binary via the dynamic linker, s0
- contains the address of the shared library termination function,
- which we will register below with atexit() to be called by exit().
- If we are statically linked, this will be NULL. */
- mov v0, s0
+ /* Load address of the user's main function. */
+ lda a0, main
- /* Do essential libc initialization (sp points to argc, argv, and envp) */
- jsr ra, __libc_init_first
- ldgp gp, 0(ra)
-
- /* Now that we have the proper stack frame, register library termination
- function, if there is any: */
-
- beq s0, 1f
- mov s0, a0
- jsr ra, atexit
- ldgp gp, 0(ra)
-1:
-
- /* Extract the arguments and environment as encoded on the stack. */
- ldl a0, 0(sp) /* get argc */
- lda a1, 8(sp) /* get argv */
- s8addq a0, a1, a2 /* get envp */
- addq a2, 8, a2
- stq a2, _environ
+ ldl a1, 0(sp) /* get argc */
+ lda a2, 8(sp) /* get argv */
- mov a0, s0 /* tuck them away */
- mov a1, s1
- mov a2, s2
+ /* Load address of our own entry points to .fini and .init. */
+ lda a3, _init
+ lda a4, _fini
- /* Call _init, the entry point to our own .init section. */
- jsr ra, _init
- ldgp gp, 0(ra)
+ /* Store address of the shared library termination function. */
+ mov v0, a5
- /* Register our .fini section with atexit. */
- lda a0, _fini
- jsr ra, atexit
+ /* Call the user's main function, and exit with its value.
+ But let the libc call main. */
+ jsr ra, __libc_start_main
ldgp gp, 0(ra)
- /* Call the user's main and exit with its return value. */
- mov s0, a0
- mov s1, a1
- mov s2, a2
-
- jsr ra, main
- ldgp gp, 0(ra)
-
- mov v0, a0
- jsr ra, exit
-
/* Die very horribly if exit returns. Call_pal hlt is callable from
kernel mode only; this will result in an illegal instruction trap. */
call_pal 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=161756fe4fc94e5af68bda5162abc4b32a65cf58
commit 161756fe4fc94e5af68bda5162abc4b32a65cf58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 31 23:12:58 1998 +0000
Wrapper for adjtimex syscall.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index ea3c945..b380996 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -62,6 +62,9 @@ getresgid - getresgid 3 getresgid
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
+# Wrapper for adjtimex.
+adjtimex - syscall_adjtimex 1 __syscall_adjtimex syscall_adjtimex
+
# support old timeval32 entry points
osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3117030c12108bf26d769ad004d9e63563109d42
commit 3117030c12108bf26d769ad004d9e63563109d42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 31 23:11:52 1998 +0000
(sysdep_routines): Add adjtimex.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 7821e46..f830303 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -2,7 +2,8 @@ ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
- sethae ioperm osf_sigprocmask fstatfs statfs llseek
+ sethae ioperm osf_sigprocmask fstatfs statfs llseek \
+ adjtimex
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4f60035d51c8cf5277de450c1c593c74823db8c
commit c4f60035d51c8cf5277de450c1c593c74823db8c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 29 17:01:51 1998 +0000
(socket): Added.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 8b593a0..ea3c945 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -51,6 +51,7 @@ sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
+socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
sysctl - _sysctl 6 sysctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=59ff3eca16c423a7fd1ecd8851ec6bc7c01817b2
commit 59ff3eca16c423a7fd1ecd8851ec6bc7c01817b2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 29 17:01:42 1998 +0000
(__readdir64): New strong alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c
index 96a6a76..300ebb2 100644
--- a/sysdeps/unix/sysv/linux/alpha/readdir.c
+++ b/sysdeps/unix/sysv/linux/alpha/readdir.c
@@ -1,4 +1,7 @@
#define readdir64 __no_readdir64_decl
+#define __readdir64 __no___readdir64_decl
#include <sysdeps/unix/readdir.c>
+#undef __readdir64
+strong_alias (__readdir, __readdir64)
#undef readdir64
weak_alias (__readdir, readdir64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c0a65f62fc0dff5ac5c559e1a1c90f0e3c094d5
commit 4c0a65f62fc0dff5ac5c559e1a1c90f0e3c094d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 25 15:53:22 1998 +0000
Add sizes.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index c8149ca..6ced71e 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -11,6 +11,7 @@ kernel_stat.h
kernel_termios.h
net/route.h
rt_sigaction.S
+sizes.h
sys/acct.h
sys/io.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72f42bf5d3f34ffeff39b51d35329199e3a9ca43
commit 72f42bf5d3f34ffeff39b51d35329199e3a9ca43
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Mar 23 02:18:31 1998 +0000
* sysdeps/m68k/m68020/wordcopy.S: New file.
diff --git a/sysdeps/m68k/m68020/wordcopy.S b/sysdeps/m68k/m68020/wordcopy.S
new file mode 100644
index 0000000..4fb1a45
--- /dev/null
+++ b/sysdeps/m68k/m68020/wordcopy.S
@@ -0,0 +1 @@
+/* Empty, not needed. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28756a4b21b6f38e633169c1197662a95d9184f7
commit 28756a4b21b6f38e633169c1197662a95d9184f7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:41:31 1998 +0000
longjmp for ARM with FPU.
diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S
new file mode 100644
index 0000000..8afa177
--- /dev/null
+++ b/sysdeps/arm/fpu/__longjmp.S
@@ -0,0 +1,36 @@
+/* longjmp for ARM.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+/* __longjmp(jmpbuf, val) */
+
+ENTRY (__longjmp)
+ movs r2, r0
+ movs r0, r1 /* get the return value in place */
+ moveq r1, #1 /* can't let setjmp() return zero! */
+
+ add r2, r2, #48
+ lfmfd f4, 4, [r2]
+
+ LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df27fae1e84892d89e543d962dd28e95a7c83bc5
commit df27fae1e84892d89e543d962dd28e95a7c83bc5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:41:15 1998 +0000
ELF startup code for Arm.
diff --git a/sysdeps/arm/elf/start.S b/sysdeps/arm/elf/start.S
new file mode 100644
index 0000000..e0964a1
--- /dev/null
+++ b/sysdeps/arm/elf/start.S
@@ -0,0 +1,109 @@
+/* Startup code for ARM & ELF
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment.
+
+ Note that the code in the .init section has already been run.
+ This includes _init and _libc_init
+
+
+ At this entry point, most registers' values are unspecified, except for:
+
+ r0 Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ sp The stack contains the arguments and environment:
+ 0(%esp) argc
+ 4(%esp) argv[0]
+ ...
+ (4*argc)(%esp) NULL
+ (4*(argc+1))(%esp) envp[0]
+ ...
+ NULL
+*/
+
+ .text
+ .globl _start
+_start:
+ /* Clear the frame pointer. The Intel ABI suggests this be done,
+ to mark the outermost frame obviously. This seems like a
+ sensible thing to do */
+ mov fp, #0
+
+ /* r0 contains the address of the shared library termination
+ function, which we will register with `atexit' to be called by
+ `exit'. I suspect that on some systems, and when statically
+ linked, this will not be set by anything to any function
+ pointer; hopefully it will be zero so we don't try to call
+ random pointers. */
+ cmp r0,#0
+ blne atexit(PLT)
+
+ /* Do essential libc initialization. In statically linked
+ programs under the GNU Hurd, this is what sets up the
+ arguments on the stack for the code below. For dyn-link
+ programs, this has been run already, in the .init code. */
+#ifndef PIC
+ bl __libc_init_first
+
+ /* Extract the arguments and environment as encoded on the stack
+ and set up the arguments for `main': argc, argv, envp. */
+ ldr r0,[sp]
+ add r1,sp,#4
+ add r2,r1,r0,lsl #2
+ add r2,r2,#4
+ /* save a copy of envp while we have it */
+ ldr r3,L_environ
+ str r2,[r3]
+
+ /* Call `_init', which is the entry point to our own `.init'
+ section; and register with `atexit' to have `exit' call
+ `_fini', which is the entry point to our own `.fini' section. */
+ bl _init
+ ldr r0,L_fini
+ bl atexit
+ b L_pfini
+
+L_fini: .word _fini
+L_environ: .word _environ
+L_pfini:
+#endif
+ /* rebuild the arg list for main() */
+ ldr r0,[sp]
+ add r1,sp,#4
+ add r2,r1,r0,lsl #2
+ add r2,r2,#4
+
+ /* Call the user's main function, and exit with its value. */
+ bl main
+ bl exit
+ /* should never get here....*/
+ bl abort
+
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4acc1d4299ec59e5d8736ede60120574875f7102
commit 4acc1d4299ec59e5d8736ede60120574875f7102
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:41:05 1998 +0000
setjmp for Arm.
diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S
new file mode 100644
index 0000000..790e756
--- /dev/null
+++ b/sysdeps/arm/fpu/setjmp.S
@@ -0,0 +1,35 @@
+/* setjmp for ARM.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _SETJMP_H
+#define _ASM
+#include <bits/setjmp.h>
+
+ /* Binary compatibility entry point. */
+ENTRY (__setjmp)
+ mov r1, #0
+ENTRY (__sigsetjmp)
+ /* Save registers */
+ sfmea f4, 4, [r0]!
+ stmia r0, {v1-v6, sl, fp, sp, lr}
+
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
+END (__setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f7638eb9dd870889e99ae61f40147b0d496cfee
commit 6f7638eb9dd870889e99ae61f40147b0d496cfee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:40:58 1998 +0000
ELF setjmp for Arm.
diff --git a/sysdeps/arm/elf/setjmp.S b/sysdeps/arm/elf/setjmp.S
new file mode 100644
index 0000000..51572ca
--- /dev/null
+++ b/sysdeps/arm/elf/setjmp.S
@@ -0,0 +1,76 @@
+/* setjmp for arm, ELF version.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
+
+ /* We include the BSD entry points here as well but we make
+ them weak. */
+ENTRY (setjmp)
+ .weak C_SYMBOL_NAME (setjmp)
+ @ call comes here with
+ @ lr = return pc
+ @ r0 = &jump_buf
+
+ @ add a second argument into the fray
+ mov r1, #1
+ @ call the common code
+ b __sigsetjmp(PLT)
+END (setjmp)
+
+ /* Binary compatibility entry point. */
+ENTRY (_setjmp)
+ .weak C_SYMBOL_NAME (_setjmp)
+ENTRY (__setjmp)
+ @ call comes here with
+ @ lr = return pc
+ @ r0 = &jump_buf
+
+ @ add a second argument into the fray
+ mov r1, #1
+ @ fall through to the common code....
+
+ENTRY (__sigsetjmp)
+ @ save the registers into the jmp_buf....
+ stmia r0, {r1-r6, sl, fp, sp, lr}
+
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+#ifdef PIC
+ /* We cannot use the PLT, because it requires that sl==r10 be set, but
+ we can't save and restore our caller's value. Instead, we do an
+ indirect jump through the GOT, using for the temporary register
+ ip, which is call-clobbered. */
+ ldr ip, 1f
+ add ip, ip, pc
+2: @ get the address of __sigjmp_save
+ ldr r1, 3f
+ ldr ip, [ip, r1]
+ @ restore r1
+ ldr r1, [r0]
+ @ jump to *__sigjmp_save
+ mov pc, ip
+1: .word _GLOBAL_OFFSET_TABLE_ - 2b - 4
+3: .word __sigjmp_save(GOT)
+
+#else
+ b __sigjmp_save
+#endif
+END (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f2a261a38106184a3466d6a13d7d29cc80f7f68
commit 0f2a261a38106184a3466d6a13d7d29cc80f7f68
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:34:49 1998 +0000
(ENTRY): Correct error jump.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index af08277..3b7ffe0 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
@@ -41,7 +41,7 @@
Since version 2.1 the return value of a system call might be
negative even if the call succeeded. E.g., the `lseek' system call
might return a large offset. Therefore we must not anymore test
- for < 0, but test for a real error by making sure the value in %eax
+ for < 0, but test for a real error by making sure the value in R0
is a real error number. Linus said he will make sure the no syscall
returns a value in -1 .. -4095 as a valid result so we can savely
test with -4095. */
@@ -51,7 +51,7 @@
ENTRY (name) \
DO_CALL (args, syscall_name); \
cmn r0, $4096; \
- bge syscall_error;
+ bgt syscall_error;
#undef PSEUDO_END
#define PSEUDO_END(name) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff259c29e8a446b17bf8f6307a49fc841f7aceeb
commit ff259c29e8a446b17bf8f6307a49fc841f7aceeb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:33:53 1998 +0000
Check correctly for error return; call syscall_error through PLT.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 1940061..0ff6dd0 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,9 +41,9 @@ ENTRY (__socket)
/* Do the system call trap. */
swi SYS_ify(socketcall)
- /* %eax is < 0 if there was an error. */
+ /* r0 is < 0 if there was an error. */
cmn r0, $124
- bge syscall_error
+ bge syscall_error(PLT)
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3500923da8d9612478c11a648cb3852ddfdb9e45
commit 3500923da8d9612478c11a648cb3852ddfdb9e45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:31:30 1998 +0000
(syscall_error): Support PIC and re-entrant code.
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index d59500e..c1da525 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,8 +23,6 @@
.globl C_SYMBOL_NAME(errno)
.globl syscall_error
-_errno_loc: .long C_SYMBOL_NAME(errno)
-
#undef syscall_error
#ifdef NO_UNDERSCORES
__syscall_error:
@@ -38,12 +36,44 @@ syscall_error:
cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
+
#ifndef PIC
ldr r1, _errno_loc
str r0, [r1]
+#ifdef _LIBC_REENTRANT
+ stmdb sp!, {r0, lr}
+ /* put another copy of r0 at a specific errno location */
+ bl __errno_location
+ ldmia sp!, {r1, lr}
+ str r1, [r0]
+#endif
+#else
+ stmdb sp!,{r10, lr}
+ @ we have to establish our PIC register
+ ldr r10, 1f
+ add r10, pc, r10
+0: ldr r1, 2f
+ ldr r1, [r10, r1]
+ @ store a copy in _errno_loc
+ str r0, [r1]
+#ifdef _LIBC_REENTRANT
+ @ and another copy in thread copy of _errno_loc
+ mov r10, r0
+ bl __errno_location(PLT)
+ str r10, [r0]
+#endif
+ ldmia sp!, {r10, lr}
+ b 4f
+1: .word _GLOBAL_OFFSET_TABLE_ - 0b - 4
+2: .word C_SYMBOL_NAME(errno)(GOT)
+4:
#endif
mvn r0, $0
RETINSTR(mov, pc, r14)
+#ifndef PIC
+_errno_loc: .long C_SYMBOL_NAME(errno)
+#endif
+
#undef __syscall_error
END (__syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7733906da7af00a9b55639c8781e6f7a0e89f059
commit 7733906da7af00a9b55639c8781e6f7a0e89f059
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:31:22 1998 +0000
Support PIC.
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index 0150bcd..b3924a3 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,11 +33,24 @@ C_LABEL(__curbrk)
.text
SYSCALL__ (brk, 1)
+#ifdef PIC
+ ldr r1, 1f
+ add r1, r1, pc
+2: ldr r2, _cb_addr
+ add r1, r1, r2
+#else
ldr r1, _cb_addr
+#endif
str r0, [r1]
mov r0, $0
RETINSTR(mov, pc, r14)
-_cb_addr: .long C_SYMBOL_NAME(__curbrk)
-
+#ifdef PIC
+1: .long _GLOBAL_OFFSET_TABLE_ - 2b - 4
+_cb_addr:
+ .long C_SYMBOL_NAME(__curbrk)(GOTOFF)
+#else
+_cb_addr:
+ .long C_SYMBOL_NAME(__curbrk)
+#endif
weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed6b842088c82567062d10f3b93ae3fb291dd787
commit ed6b842088c82567062d10f3b93ae3fb291dd787
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:29:48 1998 +0000
Floating point exception definitions.
diff --git a/sysdeps/arm/bits/fenv.h b/sysdeps/arm/bits/fenv.h
new file mode 100644
index 0000000..3e4cdd3
--- /dev/null
+++ b/sysdeps/arm/bits/fenv.h
@@ -0,0 +1,90 @@
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions
+ of the appropriate bits in the FPU control word. */
+enum
+ {
+ FE_INVALID = 0x01,
+#define FE_INVALID FE_INVALID
+ __FE_DENORM = 0x02,
+ FE_DIVBYZERO = 0x04,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_OVERFLOW = 0x08,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_UNDERFLOW = 0x10,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_INEXACT = 0x20
+#define FE_INEXACT FE_INEXACT
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The ARM FPU supports all of the four defined rounding modes. We
+ use again the bit positions in the FPU control word as the values
+ for the appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_DOWNWARD = 0x400,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 0x800,
+#define FE_UPWARD FE_UPWARD
+ FE_TOWARDSZERO = 0xc00
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned short int fexcept_t;
+
+
+/* Type representing floating-point environment. This function corresponds
+ to the layout of the block written by the `fstenv'. */
+typedef struct
+ {
+ unsigned short int control_word;
+ unsigned short int __unused1;
+ unsigned short int status_word;
+ unsigned short int __unused2;
+ unsigned short int tags;
+ unsigned short int __unused3;
+ unsigned int eip;
+ unsigned short int cs_selector;
+ unsigned int opcode:11;
+ unsigned int __unused4:5;
+ unsigned int data_offset;
+ unsigned short int data_selector;
+ unsigned short int __unused5;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exception is masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe0955cdc4dbc6ff51876fb9dc438c5a79d62c42
commit fe0955cdc4dbc6ff51876fb9dc438c5a79d62c42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:29:30 1998 +0000
Change format of .type directive. Correct comment about floating
point to reflect current reality.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index 8d1e297..28dd402 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for ARM.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,19 +28,23 @@
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
+#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,%##typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
/* In ELF C symbols are asm symbols. */
#undef NO_UNDERSCORES
#define NO_UNDERSCORES
+#define PLTJMP(_x) _x##(PLT)
+
#else
#define ALIGNARG(log2) log2
#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
+#define PLTJMP(_x) _x
+
#endif
/* APCS-32 doesn't preserve the condition codes across function call. */
@@ -56,13 +60,10 @@
instr##s regs
#endif
-/* Don't do floating point */
-#define __ARM_USES_FP 1
-
/* Define an entry point visible from C. */
#define ENTRY(name) \
ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(4); \
C_LABEL(name) \
CALL_MCOUNT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e4ed6f1f873607aa1ccfed22f82465db9226747
commit 2e4ed6f1f873607aa1ccfed22f82465db9226747
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:29:20 1998 +0000
Call __sigjmp_save through PLT
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 08cd0d2..237cc0a 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,11 +27,8 @@ ENTRY (__setjmp)
mov r1, #0
ENTRY (__sigsetjmp)
/* Save registers */
-#if __ARM_USES_FP
- sfmea f4, 4, [r0]!
-#endif
stmia r0, {v1-v6, sl, fp, sp, lr}
/* Make a tail call to __sigjmp_save; it takes the same args. */
- B __sigjmp_save
-END (__sigsetjmp)
+ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
+END (__setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d024bf59e6521498207b8afa2d78bb0a937840bb
commit d024bf59e6521498207b8afa2d78bb0a937840bb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:29:09 1998 +0000
Optimized memset version.
diff --git a/sysdeps/arm/memset.S b/sysdeps/arm/memset.S
new file mode 100644
index 0000000..a986d68
--- /dev/null
+++ b/sysdeps/arm/memset.S
@@ -0,0 +1,68 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* void *memset (dstpp, c, len) */
+
+ENTRY(memset)
+ mov a4, a1
+ cmp a3, $8 @ at least 8 bytes to do?
+ blt 2f
+ orr a2, a2, a2, lsl $8
+ orr a2, a2, a2, lsl $16
+1:
+ tst a4, $3 @ aligned yet?
+ strneb a2, [a4], $1
+ subne a3, a3, $1
+ bne 1b
+ mov ip, a2
+1:
+ cmp a3, $8 @ 8 bytes still to do?
+ blt 2f
+ stmia a4!, {a2, ip}
+ sub a3, a3, $8
+ cmp a3, $8 @ 8 bytes still to do?
+ blt 2f
+ stmia a4!, {a2, ip}
+ sub a3, a3, $8
+ cmp a3, $8 @ 8 bytes still to do?
+ blt 2f
+ stmia a4!, {a2, ip}
+ sub a3, a3, $8
+ cmp a3, $8 @ 8 bytes still to do?
+ stmgeia a4!, {a2, ip}
+ subge a3, a3, $8
+ bge 1b
+2:
+ movs a3, a3 @ anything left?
+ RETINSTR(moveq,pc,lr) @ nope
+ rsb a3, a3, $7
+ add pc, pc, a3, lsl $2
+ mov r0, r0
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ strb a2, [a4], $1
+ RETINSTR(mov,pc,lr)
+END(memset)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c2c129dd4a7e3892ddb3742bc87581db50f22a1
commit 2c2c129dd4a7e3892ddb3742bc87581db50f22a1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:29:01 1998 +0000
Startup code for Arm.
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
new file mode 100644
index 0000000..7e6bcf7
--- /dev/null
+++ b/sysdeps/arm/init-first.c
@@ -0,0 +1,71 @@
+/* Initialization code run first thing by the ELF startup code. For ARM.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern void __libc_init (int, char **, char **);
+extern void __getopt_clean_environment (char **);
+extern void __libc_global_ctors (void);
+
+int __libc_multiple_libcs = 1;
+
+pid_t __libc_pid;
+
+static void
+init (int *data)
+{
+ int argc = *data;
+ char **argv = (void *) (data + 1);
+ char **envp = &argv[argc + 1];
+
+ __environ = envp;
+ __libc_init (argc, argv, envp);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment (envp);
+}
+
+#ifdef PIC
+/* This function is called to initialize the shared C library.
+ It is called just before the user _start code from i386/elf/start.S,
+ with the stack set up as that code gets it. */
+
+/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
+ pointer in the dynamic section based solely on that. It is convention
+ for this function to be in the `.init' section, but the symbol name is
+ the only thing that really matters!! */
+/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
+
+void
+_init (int argc, ...)
+{
+ init (&argc);
+
+ __libc_global_ctors ();
+}
+#endif
+
+
+void
+__libc_init_first (int argc __attribute__ ((unused)), ...)
+{
+#ifndef PIC
+ init (&argc);
+#endif
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=046378657ff4f76837c6bb9bd4fbbfc848f7bdbe
commit 046378657ff4f76837c6bb9bd4fbbfc848f7bdbe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:28:36 1998 +0000
Arm/ELF definitions.
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
new file mode 100644
index 0000000..66b69d0
--- /dev/null
+++ b/sysdeps/arm/dl-machine.h
@@ -0,0 +1,478 @@
+/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "ARM"
+
+#include <sys/param.h>
+
+#include <assert.h>
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int __attribute__ ((unused))
+elf_machine_matches_host (Elf32_Half e_machine)
+{
+ switch (e_machine)
+ {
+ case EM_ARM:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr __attribute__ ((unused))
+elf_machine_dynamic (void)
+{
+ register Elf32_Addr *got asm ("r10");
+ return *got;
+}
+
+
+/* Return the run-time load address of the shared object. */
+// patb
+static inline Elf32_Addr __attribute__ ((unused))
+elf_machine_load_address (void)
+{
+ Elf32_Addr addr;
+ asm (" ldr ip,.L1
+ ldr r3,.L3
+ add r3, r3, sl
+ ldr ip,[sl, ip]
+ sub ip, r3, ip
+ b .L2
+ .L1: .word _dl_start(GOT)
+ .L3: .word _dl_start(GOTOFF)
+ .L2: mov %0, ip"
+ : "=r" (addr) : : "ip", "r3");
+ return addr;
+}
+
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int __attribute__ ((unused))
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
+{
+ Elf32_Addr *got;
+ extern void _dl_runtime_resolve (Elf32_Word);
+ extern void _dl_runtime_profile (Elf32_Word);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* patb: this is different than i386 */
+ /* The GOT entries for functions in the PLT have not yet been filled
+ in. Their initial contents will arrange when called to push an
+ index into the .got section, load ip with &_GLOBAL_OFFSET_TABLE_[3],
+ and then jump to _GLOBAL_OFFSET_TABLE[2]. */
+ got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
+
+ /* The got[2] entry contains the address of a function which gets
+ called to get the address of a so far unresolved function and
+ jump to it. The profiling extension of the dynamic linker allows
+ to intercept the calls to collect information. In this case we
+ don't store the address in the GOT so that all future calls also
+ end in this function. */
+ if (profile)
+ {
+ got[2] = (Elf32_Addr) &_dl_runtime_profile;
+ /* Say that we really want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
+ else
+ /* This function will get called to fix up the GOT entry indicated by
+ the offset on the stack, and then jump to the resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+ return lazy;
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
+ // macro for handling PIC situation....
+#ifdef PIC
+#define CALL_ROUTINE(x) " ldr sl,0f
+ add sl, pc, sl
+1: ldr r2, 2f
+ mov lr, pc
+ add pc, sl, r2
+ b 3f
+0: .word _GLOBAL_OFFSET_TABLE_ - 1b - 4
+2: .word " #x "(GOTOFF)
+3: "
+#else
+#define CALL_ROUTINE(x) " bl " #x
+#endif
+
+#ifndef PROF
+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+ .text
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, #function
+ .align 2
+_dl_runtime_resolve:
+ @ we get called with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ save almost everything; lr is already on the stack
+ stmdb sp!,{r0-r3,sl,fp}
+
+ @ prepare to call fixup()
+
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ " CALL_ROUTINE(fixup) "
+
+ @ save the return
+ mov ip, r0
+
+ @ restore the stack
+ ldmia sp!,{r0-r3,sl,fp,lr}
+
+ @ jump to the newly found address
+ mov pc, ip
+
+ .size _dl_runtime_resolve, .-_dl_runtime_resolve
+
+ .globl _dl_runtime_profile
+ .type _dl_runtime_profile, #function
+ .align 2
+_dl_runtime_profile:
+ @ we get caled with
+ @ stack[0] contains the return address from this call
+ @ ip contains &GOT[n+3] (pointer to function)
+ @ lr points to &GOT[2]
+
+ @ save almost everything; return add is already on the stack
+ stmdb sp!,{r0-r3,fp}
+
+ @ prepare to call fixup()
+
+ @ change &GOT[n+3] into 8*n NOTE: reloc are 8 bytes each
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+
+ @ get pointer to linker struct
+ ldr r0, [lr, #-4]
+
+ " CALL_ROUTINE(profile_fixup) "
+
+ @ save the return
+ mov ip, r0
+
+ @ restore the stack
+ ldmia sp!,{r0-r3,fp,lr}
+
+ @ jump to the newly found address
+ mov pc, ip
+
+ .size _dl_runtime_profile, .-_dl_runtime_profile
+ .previous
+");
+#else // PROF
+# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+ .text
+ .globl _dl_runtime_resolve
+ .globl _dl_runtime_profile
+ .type _dl_runtime_resolve, #function
+ .type _dl_runtime_profile, #function
+ .align 2
+_dl_runtime_resolve:
+_dl_runtime_profile:
+ stmdb sp!,{r0-r3,fp}
+ ldr r1,[sp,#0x34]
+ sub r1, ip, lr
+ sub r1, r1, #4
+ add r1, r1, r1
+ ldr r0, [lr, #-4]
+ " CALL_ROUTINE(fixup) "
+ mov ip, r0
+ ldmia sp!,{r0-r3,fp,lr}
+ mov pc, ip
+
+ .size _dl_runtime_profile, .-_dl_runtime_profile
+ .previous
+");
+#endif //PROF
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+.text
+.globl _start
+.globl _dl_start_user
+_start:
+ @ at start time, all the args are on the stack
+ mov r0, sp
+ bl _dl_start
+ @ returns user entry point in r0
+_dl_start_user:
+ mov r6, r0
+ @ we are PIC code, so get global offset table
+ ldr sl, .L_GET_GOT
+ add sl, pc, sl
+.L_GOT_GOT:
+ @ See if we were run as a command with the executable file
+ @ name as an extra leading argument.
+ ldr r1, .L_SKIP_ARGS
+ ldr r1, [sl, r1]
+ @ get the original arg count
+ ldr r0, [sp]
+ @ subtract _dl_skip_args from it
+ sub r0, r0, r1
+ @ adjust the stack pointer to skip them
+ add sp, sp, r1, lsl #2
+ @ store the new argc in the new stack location
+ str r0, [sp]
+
+ @ now we enter a _dl_init_next loop
+ ldr r2, .L_DEF_SCOPE
+ ldr r2, [sl, r2]
+ ldr r4, [r2, #8]
+ @ call _dl_init_next to get the address of an initalizer
+0: mov r0, r4
+ bl _dl_init_next(PLT)
+ cmp r0, #0
+ beq 1f
+ @ call the shared-object initializer
+ @ during this call, the stack may get moved around
+ mov lr, pc
+ mov pc, r0
+ @ go back and look for another initializer
+ b 0b
+1: @ clear the startup flag
+ ldr r2, .L_STARTUP_FLAG
+ ldr r1, [sl, r2]
+ @ we know r0==0 at this point
+ str r0, [r1]
+ @ load the finalizer function
+ ldr r0, .L_FINI_PROC
+ ldr r0, [sl, r0]
+ @ jump to the user_s entry point
+ mov pc, r6
+.L_GET_GOT:
+ .word _GLOBAL_OFFSET_TABLE_ - .L_GOT_GOT - 4 \n\
+.L_SKIP_ARGS: \n\
+ .word _dl_skip_args(GOTOFF) \n\
+.L_DEF_SCOPE: \n\
+ .word _dl_default_scope(GOT) \n\
+.L_STARTUP_FLAG:
+ .word _dl_starting_up(GOT)
+.L_FINI_PROC:
+ .word _dl_fini(GOT)
+.previous\n\
+");
+
+/* Nonzero iff TYPE should not be allowed to resolve to one of
+ the main executable's symbols, as for a COPY reloc. */
+#define elf_machine_lookup_noexec_p(type) ((type) == R_ARM_COPY)
+
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_lookup_noplt_p(type) ((type) == R_ARM_JMP_SLOT)
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_JMP_SLOT R_ARM_JMP_SLOT
+
+/* The i386 never uses Elf32_Rela relocations. */
+#define ELF_MACHINE_NO_RELA 1
+
+/* We define an initialization functions. This is called very early in
+ _dl_sysdep_start. */
+#define DL_PLATFORM_INIT dl_platform_init ()
+
+extern const char *_dl_platform;
+
+static inline void __attribute__ ((unused))
+dl_platform_init (void)
+{
+ if (_dl_platform == NULL)
+ /* We default to ARM
+ This is where processors could be distinguished arm2, arm6, sa110, etc */
+ _dl_platform = "ARM";
+}
+
+static inline void
+elf_machine_fixup_plt (struct link_map *map, const Elf32_Rel *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
+ Elf32_Addr value)
+{
+ return value;
+}
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
+extern char **_dl_argv;
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ Elf32_Addr *const reloc_addr)
+{
+ if (ELF32_R_TYPE (reloc->r_info) == R_ARM_RELATIVE)
+ {
+#ifndef RTLD_BOOTSTRAP
+ if (map != &_dl_rtld_map) /* Already done in rtld itself. */
+#endif
+ *reloc_addr += map->l_addr;
+ }
+ else if (ELF32_R_TYPE (reloc->r_info) != R_ARM_NONE)
+ {
+ const Elf32_Sym *const refsym = sym;
+ Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ if (sym)
+ value += sym->st_value;
+
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_ARM_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
+ if (sym->st_size > refsym->st_size
+ || (_dl_verbose && sym->st_size < refsym->st_size))
+ {
+ const char *strtab;
+
+ strtab = ((const char *) map->l_addr
+ + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
+ ": Symbol `", strtab + refsym->st_name,
+ "' has different size in shared object, "
+ "consider re-linking\n", NULL);
+ }
+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
+ refsym->st_size));
+ break;
+ case R_ARM_GLOB_DAT:
+ case R_ARM_JMP_SLOT:
+
+#if 0
+#define _HEX(i) for (j=28; j>=0; j-=4) b[7-j/4]="0123456789abcdef"[((int)i>>j)&15];
+{
+char b[10];
+int j;
+_HEX(map->l_addr);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+_HEX(sym->st_size);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+_HEX(&sym->st_value);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+_HEX(sym->st_value);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+_HEX(sym);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+_HEX(reloc_addr);
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #9; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+b[0]=' '; b[1]='\n';
+__asm__ (" mov r0, #2; mov r1, %0; mov r2, #2; swi 0x00900004; "
+ : : "r"(b) : "r0", "r1", "r2" );
+}
+#endif
+ *reloc_addr = value;
+ break;
+ case R_ARM_32:
+ {
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static
+ libc.a; make the reference weak so static programs can
+ still link. This declaration cannot be done when
+ compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP) because
+ rtld.c contains the common defn for _dl_rtld_map, which
+ is incompatible with a weak decl in the same file. */
+ weak_extern (_dl_rtld_map);
+ if (map == &_dl_rtld_map)
+ /* Undo the relocation done here during bootstrapping.
+ Now we will relocate it anew, possibly using a
+ binding found in the user program or a loaded library
+ rather than the dynamic linker's built-in definitions
+ used while loading those libraries. */
+ value -= map->l_addr + refsym->st_value;
+#endif
+ *reloc_addr += value;
+ break;
+ }
+ case R_ARM_PC26:
+ *reloc_addr += (value - (Elf32_Addr) reloc_addr);
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
+{
+ Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_ARM_JMP_SLOT:
+ *reloc_addr += map->l_addr;
+ break;
+ default:
+ assert (! "unexpected PLT reloc type");
+ break;
+ }
+}
+
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0bee7da30dcbb23b2fa3b2bfec4a199a38dc7dc9
commit 0bee7da30dcbb23b2fa3b2bfec4a199a38dc7dc9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:27:59 1998 +0000
Call __sigsetjmp by correct name.
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
index 5643c50..6ae6da6 100644
--- a/sysdeps/arm/bsd-_setjmp.S
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,5 @@
ENTRY (_setjmp)
mov r1, #0
- b __sigsetjmp
+ b C_SYMBOL_NAME(__sigsetjmp)
END (_setjmp)
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
index ac7dd96..52622e2 100644
--- a/sysdeps/arm/bsd-setjmp.S
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +25,5 @@
ENTRY (setjmp)
mov r1, #1
- b __sigsetjmp
+ b C_SYMBOL_NAME(__sigsetjmp)
END (setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=120b2b39d6bd4393a225fb7d040395600d83832d
commit 120b2b39d6bd4393a225fb7d040395600d83832d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 18 14:27:40 1998 +0000
Remove floating point code.
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index a2042f5..239b0cf 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,10 +29,5 @@ ENTRY (__longjmp)
movs r0, r1 /* get the return value in place */
moveq r1, #1 /* can't let setjmp() return zero! */
-#if __ARM_USES_FP
- add r2, r2, #48
- lfmfd f4, 4, [r2]
-#endif
-
LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f558ff150edf587ca8bc7a511a3c77c6db55a95
commit 4f558ff150edf587ca8bc7a511a3c77c6db55a95
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Mar 13 01:27:51 1998 +0000
* sysdeps/m68k/fpu/bits/mathinline.h (isgreater, isgreaterequal,
isless, islessequal, islessgreater, isunordered): Return zero or
one.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 569e5a0..7ddf6ae 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -1,5 +1,5 @@
/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 93, 94, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,42 +30,42 @@
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
# define isgreaterequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsoge %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
# define isless(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsolt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
# define islessequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsole %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
# define islessgreater(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogl %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
# define isunordered(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsun %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
+ __result != 0; })
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be07ac90bc338bf6b4fe10e8efd7f6833b0d9abf
commit be07ac90bc338bf6b4fe10e8efd7f6833b0d9abf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 12 09:18:49 1998 +0000
Correct typo.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index fb15ea9..8b593a0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -55,7 +55,7 @@ socketpair - socketpair 4 __socketpair socketpair
sysctl - _sysctl 6 sysctl
getresuid - getresuid 3 getresuid
-getresgid - getresgid 3 getresuid
+getresgid - getresgid 3 getresgid
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index c00ee6b..b939200 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -35,7 +35,7 @@ socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
getresuid - getresuid 3 getresuid
-getresgid - getresgid 3 getresuid
+getresgid - getresgid 3 getresgid
#
# There are defined locally because the caller is also defined in this dir.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=caa27d8e149e40b6bbbe59b76e1aca54ecf2c358
commit caa27d8e149e40b6bbbe59b76e1aca54ecf2c358
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 11 12:42:24 1998 +0000
LinuxThreads library.
diff --git a/sysdeps/arm/linuxthreads/Implies b/sysdeps/arm/linuxthreads/Implies
new file mode 100644
index 0000000..7edcd7e
--- /dev/null
+++ b/sysdeps/arm/linuxthreads/Implies
@@ -0,0 +1 @@
+pthread/no-cmpxchg
diff --git a/sysdeps/arm/linuxthreads/pt-machine.h b/sysdeps/arm/linuxthreads/pt-machine.h
new file mode 100644
index 0000000..0b9bc01
--- /dev/null
+++ b/sysdeps/arm/linuxthreads/pt-machine.h
@@ -0,0 +1,44 @@
+/* Machine-dependent pthreads configuration and inline functions.
+ ARM version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* This will not work on ARM1 or ARM2 because SWP is lacking on those
+ machines. Unfortunately we have no way to detect this at compile
+ time; let's hope nobody tries to use one. */
+
+/* Spinlock implementation; required. */
+extern inline int
+testandset (int *spinlock)
+{
+ register unsigned int ret;
+
+ __asm__ __volatile__("swp %0, %1, [%2]"
+ : "=r"(ret)
+ : "0"(1), "r"(spinlock));
+
+ return ret;
+}
+
+
+/* Get some notion of the current stack. Need not be exactly the top
+ of the stack, just something somewhere in the current frame. */
+#define CURRENT_STACK_FRAME stack_pointer
+register char * stack_pointer __asm__ ("sp");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69235f764bfa662a35640fcd7e0bcc307d58214d
commit 69235f764bfa662a35640fcd7e0bcc307d58214d
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Mar 11 01:32:12 1998 +0000
* sysdeps/m68k/elf/start.S: Let __libc_start_main do most of the
init stuff.
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index 6c7cd4b..c1a5c2e 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF m68k ABI.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,43 +43,31 @@ _start:
the outermost frame obviously. */
sub.l %fp, %fp
- /* %a1 contains the address of the shared library termination
- function, which we will register with `atexit' to be called by
- `exit'. */
- tstl %a1
- jbeq 1f
- move.l %a1, -(%sp)
- jbsr atexit
- addql #4, %sp
-1:
+ /* Extract the arguments as encoded on the stack and set up the
+ arguments for `main': argc, argv. envp will be determined
+ later in __libc_start_main. */
+ move.l (%sp)+, %d0 /* Pop the argument count. */
+ move.l %sp, %a0 /* The argument vector starts just at the
+ current stack top. */
- /* Do essential libc initialization. In statically linked
- programs under the GNU Hurd, this is what sets up the
- arguments on the stack for the code below. */
- jbsr __libc_init_first
+ pea (%a1) /* Push address of the shared library
+ termination function. */
- /* Extract the arguments and environment as encoded on the stack
- and set up the arguments for `main': argc, argv, envp. */
- move.l (%sp)+, %d0 /* Pop the argument count. */
- lea (4,%sp,%d0*4), %a0 /* envp = &argv[argc + 1] */
- move.l %a0, _environ /* Store it in the global variable. */
- pea (%a0) /* Push third argument: envp. */
- pea 4(%sp) /* Push second argument: argv. */
+ /* Push the address of our own entry points to `.fini' and
+ `.init'. */
+ pea _fini
+ pea _init
+
+ pea (%a0) /* Push second argument: argv. */
move.l %d0, -(%sp) /* Push first argument: argc. */
- /* Call `_init', which is the entry point to our own `.init'
- section; and register with `atexit' to have `exit' call
- `_fini', which is the entry point to our own `.fini' section. */
- jbsr _init
- move.l #_fini, -(%sp)
- jbsr atexit
- addq.l #4, %sp
+ pea main
+
+ /* Call the user's main function, and exit with its value. But
+ let the libc call main. */
+ jbsr __libc_start_main
- /* Call the user's main function, and exit with its value. */
- jbsr main
- move.l %d0, (%sp)
-1: jbsr exit /* This should never return. */
- jbra 1b /* Try again if somehow it does return. */
+ illegal /* Crash if somehow `exit' does return. */
/* Define a symbol for the first piece of initialized data. */
.data
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d4c61a66746f6f697baa8b6b92280301e502266
commit 2d4c61a66746f6f697baa8b6b92280301e502266
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 10 22:42:23 1998 +0000
Add various SOL_* constants.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 8379f88..f481a47 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -78,8 +78,15 @@ typedef unsigned int socklen_t;
#define AF_ASH PF_ASH
#define AF_MAX PF_MAX
-/* Raw IP packet level. */
+/* Socket level values. Others are defined in the appropriate headers.
+
+ XXX These definitions also should go into the appropriate headers as
+ far as they are available. */
+#define SOL_IPV6 41
+#define SOL_ICMPV6 58
#define SOL_RAW 255
+#define SOL_DECNET 261
+#define SOL_X25 262
/* Maximum queue length specifiable by listen. */
#define SOMAXCONN 128
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ad3a6fb0f35e1e741bc038d5750e1c7d3f67bb2
commit 1ad3a6fb0f35e1e741bc038d5750e1c7d3f67bb2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 10 22:33:58 1998 +0000
Adds lots of missing AF_* and PF_* constants.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index f56f626..8379f88 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. Linux version.
- Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,21 +30,27 @@ typedef unsigned int socklen_t;
/* Supported address families. */
#define PF_UNSPEC 0
-#define PF_UNIX 1 /* Unix domain sockets */
-#define PF_LOCAL 1 /* POSIX name for AF_UNIX */
-#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */
-#define PF_INET 2 /* Internet IP Protocol */
-#define PF_AX25 3 /* Amateur Radio AX.25 */
-#define PF_IPX 4 /* Novell IPX */
-#define PF_APPLETALK 5 /* Appletalk DDP */
-#define PF_NETROM 6 /* Amateur Radio NET/ROM */
-#define PF_BRIDGE 7 /* Multiprotocol bridge */
-#define PF_AAL5 8 /* Reserved for Werner's ATM */
-#define PF_X25 9 /* Reserved for X.25 project */
-#define PF_INET6 10 /* IP version 6 */
-#define PF_ROSE 11 /* Amateur Radio X.25 PLP */
-#define PF_DECNET 12 /* Reserved for DECnet project */
-#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/
+#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
+#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
+#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */
+#define PF_INET 2 /* IP protocol family. */
+#define PF_AX25 3 /* Amateur Radio AX.25. */
+#define PF_IPX 4 /* Novell Internet Protocol. */
+#define PF_APPLETALK 5 /* Don't use this. */
+#define PF_NETROM 6 /* Amateur radio NetROM. */
+#define PF_BRIDGE 7 /* Multiprotocol bridge. */
+#define PF_AAL5 8 /* Reserved for Werner's ATM. */
+#define PF_X25 9 /* Reserved for X.25 project. */
+#define PF_INET6 10 /* IP version 6. */
+#define PF_ROSE 11 /* Amateur Radio X.25 PLP */
+#define PF_DECnet 12 /* Reserved for DECnet project */
+#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/
+#define PF_SECURITY 14 /* Security callback pseudo AF */
+#define PF_KEY 15 /* PF_KEY key management API */
+#define PF_NETLINK 16
+#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD */
+#define PF_PACKET 17 /* Packet family */
+#define PF_ASH 18 /* Ash */
#define PF_MAX 32 /* For now.. */
/* Protocol families, same as address families. */
@@ -52,7 +58,7 @@ typedef unsigned int socklen_t;
#define AF_UNIX PF_UNIX
#define AF_LOCAL PF_LOCAL
#define AF_FILE PF_FILE
-#define AF_INET PF_INET
+
#define AF_AX25 PF_AX25
#define AF_IPX PF_IPX
#define AF_APPLETALK PF_APPLETALK
@@ -64,7 +70,12 @@ typedef unsigned int socklen_t;
#define AF_ROSE PF_ROSE
#define AF_DECNET PF_DECNET
#define AF_NETBEUI PF_NETBEUI
-
+#define AF_SECURITY PF_SECURITY
+#define pseudo_AF_KEY PF_KEY
+#define AF_NETLINK PF_NETLINK
+#define AF_ROUTE PF_ROUTE
+#define AF_PACKET PF_PACKET
+#define AF_ASH PF_ASH
#define AF_MAX PF_MAX
/* Raw IP packet level. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8b84ae26ce60049b742642aa15535f87d5d8ec3
commit b8b84ae26ce60049b742642aa15535f87d5d8ec3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 9 09:09:46 1998 +0000
Rename function to __ffs and make ffs a weak alias.
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 23dff6e..6eb3afd 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -25,7 +25,7 @@
.set noreorder
.set noat
-ENTRY(ffs)
+ENTRY(__ffs)
#ifdef PROF
ldgp gp, 0(pv)
lda AT, _mcount
@@ -69,4 +69,5 @@ ENTRY(ffs)
$done: ret
- END(ffs)
+ END(__ffs)
+weak_alias (__ffs, ffs)
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index fe656e1..bccec88 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -26,7 +26,7 @@
#ifdef __GNUC__
int
-ffs (x)
+__ffs (x)
int x;
{
int cnt;
@@ -35,6 +35,7 @@ ffs (x)
return 32 - cnt;
}
+weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
index 7846c4b..dc09ba9 100644
--- a/sysdeps/i960/ffs.c
+++ b/sysdeps/i960/ffs.c
@@ -27,7 +27,7 @@
#if defined (__GNUC__) && defined (__i960__)
int
-ffs (x)
+__ffs (x)
int x;
{
int cnt;
@@ -36,6 +36,7 @@ ffs (x)
return cnt;
}
+weak_alias (__ffs, ffs)
#else
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index 26044b1..d30bd9d 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -26,7 +26,7 @@
#if defined (__GNUC__) && defined (__mc68020__)
int
-ffs (x)
+__ffs (x)
int x;
{
int cnt;
@@ -35,6 +35,7 @@ ffs (x)
return 32 - cnt;
}
+weak_alias (__ffs, ffs)
#else
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index 3658f08..7aac897 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -26,7 +26,7 @@
#ifdef __GNUC__
int
-ffs (x)
+__ffs (x)
int x;
{
int cnt;
@@ -37,6 +37,7 @@ ffs (x)
asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x));
return cnt + 1;
}
+weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index f078c91..2cf2302 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -26,7 +26,7 @@
#ifdef __GNUC__
int
-ffs (x)
+__ffs (x)
int x;
{
int cnt;
@@ -34,6 +34,7 @@ ffs (x)
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
+weak_alias (__ffs, ffs)
#else
#include <sysdeps/generic/ffs.c>
diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s
index 49faffb..9f7ebc9 100644
--- a/sysdeps/vax/ffs.s
+++ b/sysdeps/vax/ffs.s
@@ -39,10 +39,11 @@
#include "DEFS.h"
-ENTRY(ffs, 0)
+ENTRY(__ffs, 0)
ffs $0,$32,4(ap),r0
bneq 1f
mnegl $1,r0
1:
incl r0
ret
+weak_alias (__ffs, ffs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c03144cf789d890a516493f2981ab14193ce5eb
commit 1c03144cf789d890a516493f2981ab14193ce5eb
Author: Andreas Schwab <schwab@suse.de>
Date: Mon Mar 9 03:20:41 1998 +0000
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER):
Readd lost negate.
* sysdeps/m68k/sysdep.h: Remove the stabs stuff again.
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
index 5998f42..58789f7 100644
--- a/sysdeps/m68k/sysdep.h
+++ b/sysdeps/m68k/sysdep.h
@@ -50,33 +50,14 @@
incomplete stabs information. Fake some entries here which specify
the current source file. */
#define ENTRY(name) \
- STABS_CURRENT_FILE1(""); \
- STABS_CURRENT_FILE(name); \
.globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \
.align ALIGNARG(2); \
- STABS_FUN(name); \
C_LABEL(name) \
CALL_MCOUNT
#undef END
-#define END(name) \
- ASM_SIZE_DIRECTIVE(name); \
- STABS_FUN_END(name)
-
-/* Remove the following two lines once the gdb bug is fixed. */
-#define STABS_CURRENT_FILE(name) \
- STABS_CURRENT_FILE1 (#name)
-#define STABS_CURRENT_FILE1(name) \
- 1: .stabs name,100,0,0,1b
-/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
- the same way gcc does it. */
-#define STABS_FUN(name) STABS_FUN1(name, name##:F(0,1))
-#define STABS_FUN1(name, namestr) \
- .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
- .stabs #namestr,36,0,0,name
-#define STABS_FUN_END(name) \
- 1: .stabs "",36,0,0,1b-name
+#define END(name) ASM_SIZE_DIRECTIVE(name)
/* If compiled for profiling, call `_mcount' at the start of each function. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 03360b8..4d9249d 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -61,6 +61,7 @@
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
syscall_error: \
+ neg.l %d0; \
move.l %d0, -(%sp); \
jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48a686308ed85f7dc4c1742fcd5e8d2e5cf6ac3c
commit 48a686308ed85f7dc4c1742fcd5e8d2e5cf6ac3c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Mar 6 11:38:58 1998 +0000
(SYSCALL_ERROR_HANDLER): Don't store into global errno if we already
store through __errno_location.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index d79c48a..53fc454 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -48,9 +48,6 @@ __syscall_error:
.mask 0x4000001, -16
.prologue 1
- /* Store into the "real" variable. */
- stl v0, errno
-
/* Find our per-thread errno address */
jsr ra, __errno_location
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56d7f029316d535c4118a606fce8394fd7fa8a97
commit 56d7f029316d535c4118a606fce8394fd7fa8a97
Author: Andreas Schwab <schwab@suse.de>
Date: Fri Mar 6 01:48:50 1998 +0000
* sysdeps/m68k/add_n.S: Use ENTRY and END macros.
* sysdeps/m68k/lshift.S: Likewise.
* sysdeps/m68k/rshift.S: Likewise.
* sysdeps/m68k/sub_n.S: Likewise.
* sysdeps/m68k/m68020/addmul_1.S: Likewise.
* sysdeps/m68k/m68020/mul_1.S: Likewise.
* sysdeps/m68k/m68020/submul_1.S: Likewise.
* sysdeps/unix/sysv/linux/m68k/sysdep.S: Use ENTRY macro.
[_LIBC_REENTRANT]: Don't store into global errno.
* sysdeps/m68k/sysdep.h: New file.
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Use it. Use the macros
ENTRY, CALL_MCOUNT, JUMPTARGET and syscall_error from there.
(DO_CALL): Change to expect syscall name as argument.
(PSEUDO): Pass syscall_name to DO_CALL.
(SYSCALL_ERROR_HANDLER) [_LIBC_REENTRANT]: Don't store into global
errno.
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S
index 7ca5b95..c993c2a 100644
--- a/sysdeps/m68k/add_n.S
+++ b/sysdeps/m68k/add_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,11 +32,7 @@ MA 02111-1307, USA. */
#include "asm-syntax.h"
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_add_n)
-
-C_SYMBOL_NAME(__mpn_add_n:)
-PROLOG(__mpn_add_n)
+ENTRY(__mpn_add_n)
/* Save used registers on the stack. */
movel R(d2),MEM_PREDEC(sp)
movel R(a2),MEM_PREDEC(sp)
@@ -77,4 +73,4 @@ L(L2:)
movel MEM_POSTINC(sp),R(d2)
rts
-EPILOG(__mpn_add_n)
+END(__mpn_add_n)
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
index dc2da20..a1d6690 100644
--- a/sysdeps/m68k/lshift.S
+++ b/sysdeps/m68k/lshift.S
@@ -1,6 +1,6 @@
/* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer.
-Copyright (C) 1996 Free Software Foundation, Inc.
+Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -36,11 +36,7 @@ MA 02111-1307, USA. */
#define cnt d4
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_lshift)
-
-C_SYMBOL_NAME(__mpn_lshift:)
-PROLOG(__mpn_lshift)
+ENTRY(__mpn_lshift)
/* Save used registers on the stack. */
moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
@@ -148,4 +144,4 @@ L(LLend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
rts
-EPILOG(__mpn_lshift)
+END(__mpn_lshift)
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S
index 4b99c21..7f88557 100644
--- a/sysdeps/m68k/m68020/addmul_1.S
+++ b/sysdeps/m68k/m68020/addmul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,11 +32,7 @@ MA 02111-1307, USA. */
#include "asm-syntax.h"
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_addmul_1)
-
-C_SYMBOL_NAME(__mpn_addmul_1:)
-PROLOG(__mpn_addmul_1)
+ENTRY(__mpn_addmul_1)
#define res_ptr a0
#define s1_ptr a1
@@ -81,4 +77,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
moveml MEM_POSTINC(sp),R(d2)-R(d5)
rts
-EPILOG(__mpn_addmul_1)
+END(__mpn_addmul_1)
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S
index ef7d937..367f77f 100644
--- a/sysdeps/m68k/m68020/mul_1.S
+++ b/sysdeps/m68k/m68020/mul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,11 +32,7 @@ MA 02111-1307, USA. */
#include "asm-syntax.h"
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_mul_1)
-
-C_SYMBOL_NAME(__mpn_mul_1:)
-PROLOG(__mpn_mul_1)
+ENTRY(__mpn_mul_1)
#define res_ptr a0
#define s1_ptr a1
@@ -88,4 +84,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
movel MEM_POSTINC(sp),R(d2)
#endif
rts
-EPILOG(__mpn_mul_1)
+END(__mpn_mul_1)
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S
index 9770c6c..2710045 100644
--- a/sysdeps/m68k/m68020/submul_1.S
+++ b/sysdeps/m68k/m68020/submul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
the result from a second limb vector.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,11 +32,7 @@ MA 02111-1307, USA. */
#include "asm-syntax.h"
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_submul_1)
-
-C_SYMBOL_NAME(__mpn_submul_1:)
-PROLOG(__mpn_submul_1)
+ENTRY(__mpn_submul_1)
#define res_ptr a0
#define s1_ptr a1
@@ -81,4 +77,4 @@ L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
moveml MEM_POSTINC(sp),R(d2)-R(d5)
rts
-EPILOG(__mpn_submul_1)
+END(__mpn_submul_1)
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
index f529390..3b7a24b 100644
--- a/sysdeps/m68k/rshift.S
+++ b/sysdeps/m68k/rshift.S
@@ -1,6 +1,6 @@
/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer.
-Copyright (C) 1996 Free Software Foundation, Inc.
+Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -36,11 +36,7 @@ MA 02111-1307, USA. */
#define cnt d4
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_rshift)
-
-C_SYMBOL_NAME(__mpn_rshift:)
-PROLOG(__mpn_rshift)
+ENTRY(__mpn_rshift)
/* Save used registers on the stack. */
moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
@@ -147,4 +143,4 @@ L(LLend:)
/* Restore used registers from stack frame. */
moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
rts
-EPILOG(__mpn_rshift)
+END(__mpn_rshift)
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S
index f94b0c7..92fb47a 100644
--- a/sysdeps/m68k/sub_n.S
+++ b/sysdeps/m68k/sub_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996, 1998 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -32,11 +32,7 @@ MA 02111-1307, USA. */
#include "asm-syntax.h"
TEXT
- ALIGN
- GLOBL C_SYMBOL_NAME(__mpn_sub_n)
-
-C_SYMBOL_NAME(__mpn_sub_n:)
-PROLOG(__mpn_sub_n)
+ENTRY(__mpn_sub_n)
/* Save used registers on the stack. */
movel R(d2),MEM_PREDEC(sp)
movel R(a2),MEM_PREDEC(sp)
@@ -77,4 +73,4 @@ L(L2:)
movel MEM_POSTINC(sp),R(d2)
rts
-EPILOG(__mpn_sub_n)
+END(__mpn_sub_n)
diff --git a/sysdeps/m68k/sysdep.h b/sysdeps/m68k/sysdep.h
new file mode 100644
index 0000000..5998f42
--- /dev/null
+++ b/sysdeps/m68k/sysdep.h
@@ -0,0 +1,118 @@
+/* Assembler macros for m68k.
+ Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/sysdep.h>
+
+#ifdef ASSEMBLER
+
+/* Syntactic details of assembler. */
+
+#ifdef HAVE_ELF
+
+/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
+#define ALIGNARG(log2) 1<<log2
+/* For ELF we need the `.type' directive to make shared libs work right. */
+#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+/* In ELF C symbols are asm symbols. */
+#undef NO_UNDERSCORES
+#define NO_UNDERSCORES
+
+#else
+
+#define ALIGNARG(log2) log2
+#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
+#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
+
+#endif
+
+
+/* Define an entry point visible from C.
+
+ There is currently a bug in gdb which prevents us from specifying
+ incomplete stabs information. Fake some entries here which specify
+ the current source file. */
+#define ENTRY(name) \
+ STABS_CURRENT_FILE1(""); \
+ STABS_CURRENT_FILE(name); \
+ .globl C_SYMBOL_NAME(name); \
+ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \
+ .align ALIGNARG(2); \
+ STABS_FUN(name); \
+ C_LABEL(name) \
+ CALL_MCOUNT
+
+#undef END
+#define END(name) \
+ ASM_SIZE_DIRECTIVE(name); \
+ STABS_FUN_END(name)
+
+/* Remove the following two lines once the gdb bug is fixed. */
+#define STABS_CURRENT_FILE(name) \
+ STABS_CURRENT_FILE1 (#name)
+#define STABS_CURRENT_FILE1(name) \
+ 1: .stabs name,100,0,0,1b
+/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
+ the same way gcc does it. */
+#define STABS_FUN(name) STABS_FUN1(name, name##:F(0,1))
+#define STABS_FUN1(name, namestr) \
+ .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
+ .stabs #namestr,36,0,0,name
+#define STABS_FUN_END(name) \
+ 1: .stabs "",36,0,0,1b-name
+
+
+/* If compiled for profiling, call `_mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT \
+ move.l %fp, -(%sp); move.l %sp, %fp; \
+ jbsr JUMPTARGET (mcount); \
+ move.l (%sp)+, %fp;
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+#ifdef NO_UNDERSCORES
+/* Since C identifiers are not normally prefixed with an underscore
+ on this system, the asm identifier `syscall_error' intrudes on the
+ C name space. Make sure we use an innocuous name. */
+#define syscall_error __syscall_error
+#define mcount _mcount
+#endif
+
+#define PSEUDO(name, syscall_name, args) \
+ .globl syscall_error; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ jcc JUMPTARGET(syscall_error)
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) \
+ END (name)
+
+#ifdef PIC
+#define JUMPTARGET(name) name##@PLTPC
+#else
+#define JUMPTARGET(name) name
+#endif
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 5533be2..6008b23 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -43,13 +43,15 @@ _errno = errno /* This name is expected by hj's libc.so.5 startup code. */
/* The syscall stubs jump here when they detect an error. */
- .globl __syscall_error
- .type __syscall_error, @function
- .align 4
-__syscall_error:
+#undef CALL_MCOUNT
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %d0. */
+
+ .text
+ENTRY (__syscall_error)
neg.l %d0
+#ifndef _LIBC_REENTRANT
move.l %d0, errno
-#ifdef _LIBC_REENTRANT
+#else
move.l %d0, -(%sp)
jbsr __errno_location
move.l (%sp)+, (%a0)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 5263c71..03360b8 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
December 1995.
@@ -19,6 +19,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/m68k/sysdep.h>
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
@@ -33,40 +34,6 @@
#ifdef ASSEMBLER
-/* Define an entry point visible from C. */
-#define ENTRY(name) \
- .globl name; \
- .type name, @function; \
- .align 4; \
- C_LABEL(name) \
- CALL_MCOUNT
-
-#undef END
-#define END(name) .size name, . - name
-
-/* If compiled for profiling, call `_mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- move.l %fp, -(%sp); move.l %sp, %fp; \
- jbsr JUMPTARGET (_mcount); \
- move.l (%sp)+, %fp;
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
-#ifdef PIC
-#define JUMPTARGET(name) name##@PLTPC
-#else
-#define JUMPTARGET(name) name
-#endif
-
-/* Since C identifiers are not normally prefixed with an underscore
- on this system, the asm identifier `syscall_error' intrudes on the
- C name space. Make sure we use an innocuous name. */
-#define syscall_error __syscall_error
-
/* Linux uses a negative return value to indicate syscall errors, unlike
most Unices, which use the condition codes' carry flag.
@@ -76,10 +43,11 @@
for a real error by making sure the value in %d0 is a real error
number. Linus said he will make sure the no syscall returns a value
in -1 .. -4095 as a valid result so we can savely test with -4095. */
+#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name) \
- DO_CALL (&SYS_ify (syscall_name), args); \
+ DO_CALL (syscall_name, args); \
cmp.l &-4095, %d0; \
jcc syscall_error
@@ -93,9 +61,6 @@
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
syscall_error: \
- move.l (errno@GOTPC, %pc), %a0; \
- neg.l %d0; \
- move.l %d0, (%a0); \
move.l %d0, -(%sp); \
jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
@@ -145,8 +110,8 @@ syscall_error: \
speed is more important, we don't use movem. Since %a0 and %a1 are
scratch registers, we can use them for saving as well. */
-#define DO_CALL(syscall, args) \
- move.l syscall, %d0; \
+#define DO_CALL(syscall_name, args) \
+ move.l &SYS_ify(syscall_name), %d0; \
DOARGS_##args \
trap &0; \
UNDOARGS_##args
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e0c166557efb349ca50339ed85c5c6110877f40
commit 1e0c166557efb349ca50339ed85c5c6110877f40
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Mar 4 02:36:01 1998 +0000
* sysdeps/m68k/dl-machine.h: (elf_machine_load_address): Use word
offsets into the GOT.
(RTLD_START): Likewise.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 1d2045d..fb32ce2 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -57,7 +57,7 @@ elf_machine_load_address (void)
{
Elf32_Addr addr;
asm ("lea _dl_start(%%pc), %0\n\t"
- "sub.l _dl_start@GOTPC(%%pc), %0"
+ "sub.l _dl_start@GOT.w(%%a5), %0"
: "=a" (addr));
return addr;
}
@@ -163,7 +163,7 @@ _dl_start_user:
lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
| See if we were run as a command with the executable file
| name as an extra leading argument.
- move.l ([_dl_skip_args@GOT, %a5]), %d0
+ move.l ([_dl_skip_args@GOT.w, %a5]), %d0
jeq 0f
| Pop the original argument count
move.l (%sp)+, %d1
@@ -174,7 +174,7 @@ _dl_start_user:
| Push back the modified argument count.
move.l %d1, -(%sp)
0: | Push _dl_default_scope[2] as argument in _dl_init_next call below.
- move.l ([_dl_default_scope@GOT, %a5], 8), %d2
+ move.l ([_dl_default_scope@GOT.w, %a5], 8), %d2
0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
@@ -195,9 +195,9 @@ _dl_start_user:
| Loop to call _dl_init_next for the next initializer.
jra 0b
1: | Clear the startup flag.
- clr.l _dl_starting_up@GOT(%a5)
+ clr.l _dl_starting_up@GOT.w(%a5)
| Pass our finalizer function to the user in %a1.
- move.l _dl_fini@GOT(%a5), %a1
+ move.l _dl_fini@GOT.w(%a5), %a1
| Initialize %fp with the stack pointer.
move.l %sp, %fp
| Jump to the user's entry point.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee0671d1a10db3df71840ee275486c8ceaa2c3ef
commit ee0671d1a10db3df71840ee275486c8ceaa2c3ef
Author: Richard Henderson <rth@redhat.com>
Date: Sun Mar 1 10:53:22 1998 +0000
1998-03-01 18:52 H.J. Lu (hjl@gnu.org)
* sysdeps/unix/sysv/linux/alpha/syscalls.list (osf_settimeofday,
osf_getitimer, osf_setitimer, osf_utimes, osf_getrusage,
osf_wait4): Removed __xxxx symbol for GLIBC_2.0.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 96fbc0c..fb15ea9 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -64,12 +64,12 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
# support old timeval32 entry points
osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
-osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0
-osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0
-osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0
-osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0
-osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0
-osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0
+osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
+osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
+osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
+osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
+osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
+osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
# and one for timeval64 entry points
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ba8164eb6006be1684c519311adfd9c90aa9fa9
commit 9ba8164eb6006be1684c519311adfd9c90aa9fa9
Author: Richard Henderson <rth@redhat.com>
Date: Sun Mar 1 00:56:41 1998 +0000
* shlib-versions: Match alpha*.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add adjtimex.
* sysdeps/unix/sysv/linux/alpha/adjtimex.S: Remove.
* sysdeps/alpha/fpu/bits/mathinline.h (isunordered et al): New.
Implement copysign* with and without __ prefix.
Likewise for fabs; use builtin for gcc 2.8.
(floor*): New.
(fdim*): New.
* elf/elf.h (EF_SPARC*, EF_ALPHA*, SHT_ALPHA*, SHF_ALPHA*): New.
(R_SPARC*): Match current v9 ABI.
* sysdeps/wordsize-64/stdint.h (intptr_t): Is a long.
* sunrpc/clnt_udp.c (clntudp_call): Use socklen_t.
* sunrpc/pmap_rmt.c (clnt_broadcast): Likewise.
* sunrpc/svc_tcp.c (svctcp_create, rendezvous_request): Likewise.
* sysdeps/generic/getresgid.c: Use prototype form because of warning.
* sysdeps/unix/sysv/linux/getdents.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/adjtime.c: Likewise.
* sysdeps/unix/grantpt.c (argv): Fix consts.
* sysdeps/unix/sysv/linux/getpt.c: Include <string.h>
* sysdeps/unix/sysv/linux/sigaction.c: Likewise.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 2270312..492d9f1 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -18,29 +18,148 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef __GNUC__
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#ifdef __cplusplus
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE extern __inline
+#endif
+
+#ifdef __USE_ISOC9X
+# define isunordered(x, y) \
+ (__extension__ \
+ ({ double __r; \
+ __asm ("cmptun/su %1,%2,%0\n\ttrapb" \
+ : "=&f" (__r) : "f" (x), "f"(y)); \
+ __r != 0; }))
+
+# define isgreater(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ !isunordered(__x, __y) && __x > __y; }))
+# define isgreaterequal(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ !isunordered(__x, __y) && __x >= __y; }))
+# define isless(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ !isunordered(__x, __y) && __x < __y; }))
+# define islessequal(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ !isunordered(__x, __y) && __x <= __y; }))
+# define islessgreater(x, y) \
+ (__extension__ \
+ ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
+ !isunordered(__x, __y) && __x != __y; }))
+#endif /* ISOC9X */
+
+#define __inline_copysign(NAME, TYPE) \
+__MATH_INLINE TYPE \
+NAME (TYPE __x, TYPE __y) \
+{ \
+ TYPE __z; \
+ __asm ("cpys %1, %2, %0" : "=f" (__z) : "f" (__y), "f" (__x)); \
+ return __z; \
+}
+
+__inline_copysign(__copysignf, float)
+__inline_copysign(copysignf, float)
+__inline_copysign(__copysign, double)
+__inline_copysign(copysign, double)
+
+#undef __MATH_INLINE_copysign
+
+
+#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+__MATH_INLINE float __fabsf (float __x) { return __builtin_fabsf (__x); }
+__MATH_INLINE float fabsf (float __x) { return __builtin_fabsf (__x); }
+__MATH_INLINE double __fabs (double __x) { return __builtin_fabs (__x); }
+__MATH_INLINE double fabs (double __x) { return __builtin_fabs (__x); }
+#else
+#define __inline_fabs(NAME, TYPE) \
+__MATH_INLINE TYPE \
+NAME (TYPE __x) \
+{ \
+ TYPE __z; \
+ __asm ("cpys $f31, %1, %0" : "=f" (__z) : "f" (__x)); \
+ return __z; \
+}
+
+__inline_fabs(__fabsf, float)
+__inline_fabs(fabsf, float)
+__inline_fabs(__fabs, double)
+__inline_fabs(fabs, double)
+
+#undef __inline_fabs
+#endif
+
-extern __inline double
-__copysign (double __x, double __y)
+/* Use the -inf rounding mode conversion instructions to implement
+ floor. We note when the exponent is large enough that the value
+ must be integral, as this avoids unpleasant integer overflows. */
+
+__MATH_INLINE float
+__floorf (float __x)
{
- __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
+ if (fabsf (__x) < 16777216.0f) /* 1 << FLT_MANT_DIG */
+ {
+ /* Note that Alpha S_Floating is stored in registers in a
+ restricted T_Floating format, so we don't even need to
+ convert back to S_Floating in the end. The initial
+ conversion to T_Floating is needed to handle denormals. */
+
+ float __tmp1, __tmp2;
+
+ __asm ("cvtst/s %3,%2\n\t"
+ "cvttq/svim %2,%1\n\t"
+ "cvtqt/suim %1,%0\n\t"
+ "trapb"
+ : "=&f"(__x), "=&f"(__tmp1), "=&f"(__tmp2)
+ : "f"(__x));
+ }
return __x;
}
-extern __inline double
-fabs (double __x)
+__MATH_INLINE double
+__floor (double __x)
{
- __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
+ if (fabs (__x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */
+ {
+ double __tmp1;
+ __asm ("cvttq/svim %2,%1\n\t"
+ "cvtqt/suim %1,%0\n\t"
+ "trapb"
+ : "=&f"(__x), "=&f"(__tmp1)
+ : "f"(__x));
+ }
return __x;
}
-extern __inline double
-atan (double __x)
+__MATH_INLINE float floorf (float __x) { return __floorf(__x); }
+__MATH_INLINE double floor (double __x) { return __floor(__x); }
+
+
+__MATH_INLINE float __fdimf (float __x, float __y)
{
- extern double __atan2 (double, double);
- return __atan2 (__x, 1.0);
+ return __x < __y ? 0.0f : __x - __y;
}
-#endif
-#endif
+__MATH_INLINE float fdimf (float __x, float __y)
+{
+ return __x < __y ? 0.0f : __x - __y;
+}
+
+__MATH_INLINE double __fdim (double __x, double __y)
+{
+ return __x < __y ? 0.0 : __x - __y;
+}
+
+__MATH_INLINE double fdim (double __x, double __y)
+{
+ return __x < __y ? 0.0 : __x - __y;
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
index f7df5fc..b695ece 100644
--- a/sysdeps/unix/sysv/linux/alpha/adjtime.c
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -126,8 +126,7 @@ weak_alias (__adjtime, adjtime);
extern int __syscall_adjtimex_tv64 (struct timex *tx);
int
-__adjtimex_tv64 (tx)
- struct timex *tx;
+__adjtimex_tv64 (struct timex *tx)
{
int ret;
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
deleted file mode 100644
index 367b735..0000000
--- a/sysdeps/unix/sysv/linux/alpha/adjtimex.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-
-/* The problem here is that initially we made struct timeval compatible with
- OSF/1, using int32. But we defined time_t with uint64, and later found
- that POSIX requires tv_sec to be time_t.
-
- So now we have to do compatibility stuff. */
-
-.text
-
-LEAF(__syscall_adjtimex_tv64, 0)
- ldgp gp, 0(pv)
-#ifdef PROF
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
-#endif
- .prologue 1
-
-#ifdef __NR_adjtimex
- ldi v0, SYS_ify(adjtimex)
- callsys
- bne a3, $err64
-
- /* Everything ok. */
- ret
-
- /* If we didn't get ENOSYS, it is a real error. */
- .align 3
-$err64:
-#else
- /* ENOSYS. */
- ldi v0, ENOSYS
-#endif
- lda pv, __syscall_error
- jmp zero, (pv), __syscall_error
-
-END(__syscall_adjtimex_tv64)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 26d4f15..96fbc0c 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -71,3 +71,6 @@ osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0
osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0
osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0
old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
+
+# and one for timeval64 entry points
+adjtimex adjtime adjtimex 1 __syscall_adjtimex_tv64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0b71999ee8b462100acae6317bbe76eb7da4ec1
commit f0b71999ee8b462100acae6317bbe76eb7da4ec1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:16:51 1998 +0000
(_NSIG): Changed to 64.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index 6b1399e..05ffbae 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -68,6 +68,6 @@
#define SIGPWR SIGINFO
#define SIGIOT SIGABRT
-#define _NSIG 32 /* Biggest signal number + 1. */
+#define _NSIG 64 /* Biggest signal number + 1. */
#endif /* <signal.h> included. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=edc43054d48e2e6cd580a620955cb3b76f588a4d
commit edc43054d48e2e6cd580a620955cb3b76f588a4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:16:26 1998 +0000
Make versioned symbols only for shared library.
Fix ENOSYS branch.
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
index 03ae6ea..9ba849f 100644
--- a/sysdeps/unix/sysv/linux/alpha/getitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getitimer_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETITIMER __getitimer_tv64
+#else
+#define GETITIMER getitimer
+#endif
+
+LEAF(GETITIMER, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getitimer_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -94,6 +100,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getitimer_tv64)
+END(GETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
index d875c83..fbbe6f7 100644
--- a/sysdeps/unix/sysv/linux/alpha/getrusage.S
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -32,7 +32,13 @@
.text
-LEAF(__getrusage_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETRUSAGE __getrusage_tv64
+#else
+#define GETRUSAGE getrusage
+#endif
+
+LEAF(GETRUSAGE, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__getrusage_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -122,6 +128,8 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__getrusage_tv64)
+END(GETRUSAGE)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
index bceeefc..6f7082f 100644
--- a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__gettimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define GETTIMEOFDAY __gettimeofday_tv64
+#else
+#define GETTIMEOFDAY __gettimeofday
+#endif
+
+LEAF(GETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__gettimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__gettimeofday_tv64)
+END(GETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p)
default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1)
+#else
+weak_alias (__gettimeofday, gettimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
index 73076b9..c854f7f 100644
--- a/sysdeps/unix/sysv/linux/alpha/select.S
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -32,7 +32,13 @@
.text
-LEAF(__select_tv64, 64)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SELECT __select_tv64
+#else
+#define SELECT __select
+#endif
+
+LEAF(SELECT, 64)
ldgp gp, 0(pv)
subq sp, 64, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__select_tv64, 64)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -105,8 +111,9 @@ $error:
addq sp, 64, sp
jmp zero, (pv), __syscall_error
-END(__select_tv64)
+END(SELECT)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__select_tv64, __select, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -114,3 +121,6 @@ default_symbol_version (__select_tv64, __select, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__select_tv64, __select_tv64p)
default_symbol_version (__select_tv64p, select, GLIBC_2.1)
+#else
+weak_alias (__select, select)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
index a2085cc..e57acc2 100644
--- a/sysdeps/unix/sysv/linux/alpha/setitimer.S
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -32,7 +32,13 @@
.text
-LEAF(__setitimer_tv64, 48)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETITIMER __setitimer_tv64
+#else
+#define SETITIMER __setitimer
+#endif
+
+LEAF(SETITIMER, 48)
ldgp gp, 0(pv)
subq sp, 48, sp
#ifdef PROF
@@ -63,7 +69,7 @@ LEAF(__setitimer_tv64, 48)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -110,8 +116,9 @@ $error:
addq sp, 48, sp
jmp zero, (pv), __syscall_error
-END(__setitimer_tv64)
+END(SETITIMER)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -119,3 +126,6 @@ default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__setitimer_tv64, __setitimer_tv64p)
default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1)
+#else
+weak_alias (__setitimer, setitimer)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
index b730df7..ae129ec 100644
--- a/sysdeps/unix/sysv/linux/alpha/settimeofday.S
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -32,7 +32,13 @@
.text
-LEAF(__settimeofday_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define SETTIMEOFDAY __settimeofday_tv64
+#else
+#define SETTIMEOFDAY __settimeofday
+#endif
+
+LEAF(SETTIMEOFDAY, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -61,7 +67,7 @@ LEAF(__settimeofday_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -91,8 +97,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__settimeofday_tv64)
+END(SETTIMEOFDAY)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -100,3 +107,6 @@ default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__settimeofday_tv64, __settimeofday_tv64p)
default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1)
+#else
+weak_alias (__settimeofday, settimeofday)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 59c0cb8..26d4f15 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -64,9 +64,10 @@ pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
# support old timeval32 entry points
osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
-osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
-osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
-osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
-osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
-osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
-osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
+osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 __settimeofday@GLIBC_2.0 settimeofday@GLIBC_2.0
+osf_getitimer - osf_getitimer 2 __getitimer_tv32 __getitimer@GLIBC_2.0 getitimer@GLIBC_2.0
+osf_setitimer - osf_setitimer 3 __setitimer_tv32 __setitimer@GLIBC_2.0 setitimer@GLIBC_2.0
+osf_utimes - osf_utimes 2 __utimes_tv32 __utimes@GLIBC_2.0 utimes@GLIBC_2.0
+osf_getrusage - osf_getrusage 2 __getrusage_tv32 __getrusage@GLIBC_2.0 getrusage@GLIBC_2.0
+osf_wait4 - osf_wait4 2 __wait4_tv32 __wait4@GLIBC_2.0 wait4@GLIBC_2.0
+old_adjtimex - old_adjtimex 1 __adjtimex_tv32 __adjtimex@GLIBC_2.0 adjtimex@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
index 2b4c71e..a1d2b15 100644
--- a/sysdeps/unix/sysv/linux/alpha/utimes.S
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -32,7 +32,13 @@
.text
-LEAF(__utimes_tv64, 16)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define UTIMES __utimes_tv64
+#else
+#define UTIMES __utimes
+#endif
+
+LEAF(UTIMES, 16)
ldgp gp, 0(pv)
subq sp, 16, sp
#ifdef PROF
@@ -62,7 +68,7 @@ LEAF(__utimes_tv64, 16)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -96,8 +102,9 @@ $error:
addq sp, 16, sp
jmp zero, (pv), __syscall_error
-END(__utimes_tv64)
+END(UTIMES)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -105,3 +112,6 @@ default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__utimes_tv64, __utimes_tv64p)
default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1)
+#else
+weak_alias (__utimes, utimes)
+#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
index 5ab8607..334836f 100644
--- a/sysdeps/unix/sysv/linux/alpha/wait4.S
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -32,7 +32,13 @@
.text
-LEAF(__wait4_tv64, 32)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define WAIT4 __wait4_tv64
+#else
+#define WAIT4 __wait4
+#endif
+
+LEAF(WAIT4, 32)
ldgp gp, 0(pv)
subq sp, 32, sp
#ifdef PROF
@@ -64,7 +70,7 @@ LEAF(__wait4_tv64, 32)
/* If we didn't get ENOSYS, it is a real error. */
.align 3
$err64: cmpeq v0, ENOSYS, t0
- bne t0, $error
+ beq t0, $error
stl t0, __libc_missing_axp_tv64
/* Recover the saved arguments. */
@@ -79,7 +85,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
bne a3, $error
/* Copy back to proper format. */
- ldq a3, 8(sp)
+ ldq a3, 24(sp)
beq a3, 2f
ldl t0, 0(a3) # ru_utime.tv_sec
ldl t1, 4(a3) # ru_utime.tv_usec
@@ -98,6 +104,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
ldt $f25, 96(a3) # ru_msgrcv
ldt $f26, 104(a3) # ru_nsignals
ldt $f27, 112(a3) # ru_nvcsw
+ .set noat
ldt $f28, 120(a3) # ru_nivcsw
stq t0, 0(a3)
stq t1, 8(a3)
@@ -117,6 +124,7 @@ $do32: ldi v0, SYS_ify(osf_wait4)
stt $f26, 120(a3)
stt $f27, 128(a3)
stt $f28, 136(a3)
+ .set at
2: addq sp, 32, sp
ret
@@ -127,8 +135,9 @@ $error:
addq sp, 32, sp
jmp zero, (pv), __syscall_error
-END(__wait4_tv64)
+END(WAIT4)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
/* It seems to me to be a misfeature of the assembler that we can only
@@ -136,3 +145,6 @@ default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
The 'p' is for 'public'. *Shrug* */
strong_alias (__wait4_tv64, __wait4_tv64p)
default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1)
+#else
+weak_alias (__wait4, wait4)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23713ff9db2d28ab4e3ee071d5afdcaa2e2b0498
commit 23713ff9db2d28ab4e3ee071d5afdcaa2e2b0498
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:15:43 1998 +0000
Code to handle compatibility of syscall for adjtimex interface.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtimex.S b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
new file mode 100644
index 0000000..367b735
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtimex.S
@@ -0,0 +1,59 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+.text
+
+LEAF(__syscall_adjtimex_tv64, 0)
+ ldgp gp, 0(pv)
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+#ifdef __NR_adjtimex
+ ldi v0, SYS_ify(adjtimex)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64:
+#else
+ /* ENOSYS. */
+ ldi v0, ENOSYS
+#endif
+ lda pv, __syscall_error
+ jmp zero, (pv), __syscall_error
+
+END(__syscall_adjtimex_tv64)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d958c1216762f2e6eaeb77d18a301da61bf2b378
commit d958c1216762f2e6eaeb77d18a301da61bf2b378
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:15:38 1998 +0000
Code to handle compatibility of syscall for adjtime interface.
diff --git a/sysdeps/unix/sysv/linux/alpha/adjtime.c b/sysdeps/unix/sysv/linux/alpha/adjtime.c
new file mode 100644
index 0000000..f7df5fc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/adjtime.c
@@ -0,0 +1,202 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+struct timeval32
+{
+ int tv_sec, tv_usec;
+};
+
+struct timex32 {
+ unsigned int modes; /* mode selector */
+ long offset; /* time offset (usec) */
+ long freq; /* frequency offset (scaled ppm) */
+ long maxerror; /* maximum error (usec) */
+ long esterror; /* estimated error (usec) */
+ int status; /* clock command/status */
+ long constant; /* pll time constant */
+ long precision; /* clock precision (usec) (read only) */
+ long tolerance; /* clock frequency tolerance (ppm)
+ * (read only)
+ */
+ struct timeval32 time; /* (read only) */
+ long tick; /* (modified) usecs between clock ticks */
+
+ long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ long stabil; /* pps stability (scaled ppm) (ro) */
+ long jitcnt; /* jitter limit exceeded (ro) */
+ long calcnt; /* calibration intervals (ro) */
+ long errcnt; /* calibration errors (ro) */
+ long stbcnt; /* stability limit exceeded (ro) */
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+};
+
+#define TIMEVAL timeval32
+#define TIMEX timex32
+#define ADJTIME __adjtime_tv32
+#define ADJTIMEX(x) __adjtimex_tv32 (x)
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+#define LINKAGE
+#else
+#define LINKAGE static
+#endif
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+symbol_version (__adjtime_tv32, adjtime, GLIBC_2.0);
+#endif
+
+#undef TIMEVAL
+#define TIMEVAL timeval
+#undef TIMEX
+#define TIMEX timex
+#undef ADJTIME
+#define ADJTIME __adjtime_tv64
+#undef ADJTIMEX
+#define ADJTIMEX(x) __syscall_adjtimex_tv64 (x)
+#undef LINKAGE
+#define LINKAGE static
+
+LINKAGE int ADJTIME (const struct TIMEVAL *itv, struct TIMEVAL *otv);
+extern int ADJTIMEX (struct TIMEX *);
+
+#include <sysdeps/unix/sysv/linux/adjtime.c>
+static int missing_adjtimex = 0;
+
+int
+__adjtime (itv, otv)
+ const struct timeval *itv;
+ struct timeval *otv;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __adjtime_tv64 (itv, otv);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timeval32 itv32, otv32;
+
+ itv32.tv_sec = itv->tv_sec;
+ itv32.tv_usec = itv->tv_usec;
+ ret = __adjtime_tv32 (&itv32, &otv32);
+ if (ret == 0)
+ {
+ otv->tv_sec = otv32.tv_sec;
+ otv->tv_usec = otv32.tv_usec;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+default_symbol_version (__adjtime, adjtime, GLIBC_2.1);
+#else
+weak_alias (__adjtime, adjtime);
+#endif
+
+extern int __syscall_adjtimex_tv64 (struct timex *tx);
+
+int
+__adjtimex_tv64 (tx)
+ struct timex *tx;
+{
+ int ret;
+
+ if (!missing_adjtimex)
+ {
+ ret = __syscall_adjtimex_tv64 (tx);
+ if (ret && errno == ENOSYS)
+ missing_adjtimex = 1;
+ }
+
+ if (missing_adjtimex)
+ {
+ struct timex32 tx32;
+
+ tx32.modes = tx->modes;
+ tx32.offset = tx->offset;
+ tx32.freq = tx->freq;
+ tx32.maxerror = tx->maxerror;
+ tx32.esterror = tx->esterror;
+ tx32.status = tx->status;
+ tx32.constant = tx->constant;
+ tx32.precision = tx->precision;
+ tx32.tolerance = tx->tolerance;
+ tx32.time.tv_sec = tx->time.tv_sec;
+ tx32.time.tv_sec = tx->time.tv_usec;
+ tx32.tick = tx->tick;
+ tx32.ppsfreq = tx->ppsfreq;
+ tx32.jitter = tx->jitter;
+ tx32.shift = tx->shift;
+ tx32.stabil = tx->stabil;
+ tx32.jitcnt = tx->jitcnt;
+ tx32.calcnt = tx->calcnt;
+ tx32.errcnt = tx->errcnt;
+ tx32.stbcnt = tx->stbcnt;
+
+ ret = __adjtimex_tv32 (&tx32);
+ if (ret == 0)
+ {
+ tx->modes = tx32.modes;
+ tx->offset = tx32.offset;
+ tx->freq = tx32.freq;
+ tx->maxerror = tx32.maxerror;
+ tx->esterror = tx32.esterror;
+ tx->status = tx32.status;
+ tx->constant = tx32.constant;
+ tx->precision = tx32.precision;
+ tx->tolerance = tx32.tolerance;
+ tx->time.tv_sec = tx32.time.tv_sec;
+ tx->time.tv_usec = tx32.time.tv_sec;
+ tx->tick = tx32.tick;
+ tx->ppsfreq = tx32.ppsfreq;
+ tx->jitter = tx32.jitter;
+ tx->shift = tx32.shift;
+ tx->stabil = tx32.stabil;
+ tx->jitcnt = tx32.jitcnt;
+ tx->calcnt = tx32.calcnt;
+ tx->errcnt = tx32.errcnt;
+ tx->stbcnt = tx32.stbcnt;
+ }
+ }
+
+ return ret;
+}
+
+#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING
+strong_alias (__adjtimex_tv64, __adjtimex_tv64p);
+default_symbol_version (__adjtimex_tv64, __adjtimex, GLIBC_2.1);
+default_symbol_version (__adjtimex_tv64p, adjtimex, GLIBC_2.1);
+#else
+weak_alias (__adjtimex_tv64, __adjtimex);
+weak_alias (__adjtimex_tv64, adjtimex);
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f04509d000af79cc32614e385e1196915e03269
commit 0f04509d000af79cc32614e385e1196915e03269
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:14:58 1998 +0000
(sysdep_routines): Added adjtimex and old_adjtimex.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 48f5562..7821e46 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -7,6 +7,5 @@ sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
# Support old timeval32 entry points
sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
osf_getitimer osf_setitimer osf_utimes \
- osf_getrusage osf_wait4
-
+ osf_getrusage osf_wait4 old_adjtimex
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3616c197cdb5b2a8a5ebf716c9691cb67373aaa3
commit 3616c197cdb5b2a8a5ebf716c9691cb67373aaa3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:14:15 1998 +0000
Add _errno definition.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index fc5cc04..d79c48a 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -29,6 +29,8 @@ errno: .space 4
#endif
.globl __errno
__errno = errno
+ .globl _errno
+_errno = errno
.text
.align 2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=265bcb263dfbb9258ed09ed3f4541822e170270b
commit 265bcb263dfbb9258ed09ed3f4541822e170270b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 17:13:29 1998 +0000
Added ".set noat"/".set at".
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
index e5992ad..00698d6 100644
--- a/sysdeps/alpha/s_fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>
@@ -21,9 +21,11 @@
ENTRY(__fabs)
#ifdef PROF
+ .set noat
ldgp gp, 0(pv)
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f635bc2865c9d5b90896bb8345d14cc8426a25c2
commit f635bc2865c9d5b90896bb8345d14cc8426a25c2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 16:29:41 1998 +0000
(feraiseexcept): Use a dummy for FE_DIVBYZERO. Kludge for
FE_UNDERFLOW.
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 6a53e55..c2a96e3 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -24,7 +24,7 @@
void
feraiseexcept (int excepts)
{
- double tmp;
+ double tmp, dummy;
/* Raise exceptions represented by EXPECTS. But we must raise only
one signal at a time. It is important the if the overflow/underflow
@@ -45,8 +45,8 @@ feraiseexcept (int excepts)
/* Next: division by zero. */
if (FE_DIVBYZERO & excepts)
{
- __asm__ __volatile__("cmpteq $f31,$f31,%0; divt/sui %0,$f31,%0; trapb"
- : "=f"(tmp));
+ __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
+ : "=f"(tmp), "=f"(dummy));
}
/* Next: overflow. */
@@ -60,7 +60,8 @@ feraiseexcept (int excepts)
if (FE_UNDERFLOW & excepts)
{
__asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=f"(tmp) : "f"(DBL_MIN), "f"(16.0));
+ : "=f"(tmp) : "f"(DBL_MIN),
+ "f"((double) (1UL << 60)));
}
/* Last: inexact. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d424955575ad2bd2a70c2b85fbee6c4103b802d1
commit d424955575ad2bd2a70c2b85fbee6c4103b802d1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 26 08:38:37 1998 +0000
(FE_TOWARDZERO): Correct typo.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index 4482f0a..2ccf149 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -68,8 +68,8 @@ enum
enum
{
- FE_TOWARDSZERO = 0,
-#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_TOWARDZERO = 0,
+#define FE_TOWARDZERO FE_TOWARDZERO
FE_DOWNWARD = 1,
#define FE_DOWNWARD FE_DOWNWARD
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index b1608b9..e1a278d 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,8 +47,8 @@ enum
{
FE_TONEAREST = 0,
#define FE_TONEAREST FE_TONEAREST
- FE_TOWARDSZERO = 1 << 4,
-#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_TOWARDZERO = 1 << 4,
+#define FE_TOWARDZERO FE_TOWARDZERO
FE_DOWNWARD = 2 << 4,
#define FE_DOWNWARD FE_DOWNWARD
FE_UPWARD = 3 << 4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c70eb4af396e990dcb5a7ca47f234fb521a1f58
commit 0c70eb4af396e990dcb5a7ca47f234fb521a1f58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 24 15:22:07 1998 +0000
(struct kernel_sigaction): Define.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
index f8c42e0..4c35d96 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -5,3 +5,11 @@ struct old_kernel_sigaction {
unsigned long sa_mask;
unsigned int sa_flags;
};
+
+/* This is the sigaction structure from the Linux 2.1.68 kernel. */
+
+struct kernel_sigaction {
+ __sighandler_t k_sa_handler;
+ unsigned int sa_flags;
+ sigset_t sa_mask;
+};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef5e0ac67bd4753bbc0bb2b1e93f8f1fdd27f237
commit ef5e0ac67bd4753bbc0bb2b1e93f8f1fdd27f237
Author: Andreas Schwab <schwab@suse.de>
Date: Wed Feb 18 01:32:32 1998 +0000
Stub file
diff --git a/sysdeps/m68k/fpu/t_exp.c b/sysdeps/m68k/fpu/t_exp.c
new file mode 100644
index 0000000..fd37963
--- /dev/null
+++ b/sysdeps/m68k/fpu/t_exp.c
@@ -0,0 +1 @@
+/* Empty. Not needed. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09e8bdd3cddb18bbe36dcf7031cac4e931a1c91c
commit 09e8bdd3cddb18bbe36dcf7031cac4e931a1c91c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 17 15:26:57 1998 +0000
(rt_sigreturn): Make compatible with older kernels.
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 1d98de9..3959e5d 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@cygnus.com>, 1998
@@ -16,17 +16,17 @@
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
+
#include <sysdep.h>
-
+
/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily
the kernel would have to issue one after setting up the signal return
stack, but the Linux rt_sigaction syscall is prepared to accept a pointer
- to the sigreturn syscall, instead of inlining it on the stack.
-
+ to the sigreturn syscall, instead of inlining it on the stack.
+
This just about halves signal delivery time. */
-
-
+
+#ifdef __NR_rt_sigaction
.text
ENTRY(__syscall_rt_sigaction)
.frame sp,0,ra,0
@@ -38,7 +38,7 @@ ENTRY(__syscall_rt_sigaction)
.set at
#endif
.prologue 1
-
+
beq a1, 0f
ldl t0, 8(a1) # sa_flags
lda a4, sigreturn-__syscall_rt_sigaction(pv)
@@ -46,10 +46,10 @@ ENTRY(__syscall_rt_sigaction)
and t0, 0x00000040, t0 # SA_SIGINFO
cmovne t0, t1, a4
0: ldi v0,__NR_rt_sigaction
- callsys
+ callsys
bne a3,1f
ret
-
+
1:
#ifndef PROF
br gp,2f
@@ -76,3 +76,10 @@ rt_sigreturn:
ldi v0,__NR_rt_sigreturn
callsys
.end rt_sigreturn
+#else
+ENTRY(__syscall_rt_sigaction)
+ ldgp $29,0($27)
+ ldi $0,ENOSYS
+ jmp __syscall_error
+END(__syscall_rt_sigaction)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7d1f4baddee50c8629458a84a0d0a28865708f8
commit d7d1f4baddee50c8629458a84a0d0a28865708f8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 16 18:13:11 1998 +0000
(_ioperm): Map all ports starting from 0 not only from `from'.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 76a744d..cf263f7 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger.
@@ -416,8 +416,7 @@ _ioperm (unsigned long int from, unsigned long int num, int turn_on)
__set_errno (ENODEV);
return -1;
}
- addr = port_to_cpu_addr (from, io.sys, 1);
- addr &= PAGE_MASK;
+ addr = port_to_cpu_addr (0, io.sys, 1);
len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
io.base =
(unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4fba2352f8afa2eccb6c4f81b55e30dff5fde0c0
commit 4fba2352f8afa2eccb6c4f81b55e30dff5fde0c0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Feb 12 18:22:18 1998 +0000
Pointer sizes.
diff --git a/sysdeps/unix/sysv/linux/alpha/sizes.h b/sysdeps/unix/sysv/linux/alpha/sizes.h
new file mode 100644
index 0000000..a133586
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sizes.h
@@ -0,0 +1,24 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIZES_H
+#define _SIZES_H 1
+
+#define PTR_SIZE_STR "8"
+
+#endif /* sizes.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1f251a3ae8c6fbaccf6a7723df2e28fc6418072
commit e1f251a3ae8c6fbaccf6a7723df2e28fc6418072
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 10 20:05:38 1998 +0000
Add getres[ug]id.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 3166531..59c0cb8 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -54,6 +54,9 @@ shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
sysctl - _sysctl 6 sysctl
+getresuid - getresuid 3 getresuid
+getresgid - getresgid 3 getresuid
+
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index d026910..c00ee6b 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -34,6 +34,9 @@ shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
socketpair - socketpair 4 __socketpair socketpair
+getresuid - getresuid 3 getresuid
+getresgid - getresgid 3 getresuid
+
#
# There are defined locally because the caller is also defined in this dir.
#
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0e16dbb5b52c88ba5cd208721969a4d7459080d
commit e0e16dbb5b52c88ba5cd208721969a4d7459080d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 10 20:01:29 1998 +0000
(EOVERFLOW): Added.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 373d701..7d628b1 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,6 +57,7 @@
# define ENOSPC 29
# define EEXIST 30
# define EBUSY 31
+# define EOVERFLOW 32
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ab963e5ef45e26360d25cace9dbb65e5b115870
commit 9ab963e5ef45e26360d25cace9dbb65e5b115870
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 10 20:01:12 1998 +0000
Define __need_FOPEN_MAX, not _STDIO_H, before including
<bits/stdio_lim.h>.
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
index d6a12a6..088c3bb 100644
--- a/sysdeps/standalone/filedesc.h
+++ b/sysdeps/standalone/filedesc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
This file is part of the GNU C Library.
@@ -26,7 +26,7 @@
#ifndef __FILEDESC_h
#define __FILEDESC_h
-#define _STDIO_H
+#define __need_FOPEN_MAX
#include <bits/stdio_lim.h>
#ifndef __DECLARE_FILE_DESCRIPTORS__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=028502bf1eec304f7cfab1dc0a208ab227745afc
commit 028502bf1eec304f7cfab1dc0a208ab227745afc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 10 19:59:41 1998 +0000
SysV compliant context switch interface.
diff --git a/sysdeps/arm/sys/ucontext.h b/sysdeps/arm/sys/ucontext.h
new file mode 100644
index 0000000..70af80f
--- /dev/null
+++ b/sysdeps/arm/sys/ucontext.h
@@ -0,0 +1,95 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* System V/ARM ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 16
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R0 = 0,
+#define R0 R0
+ R1 = 1,
+#define R1 R1
+ R2 = 2,
+#define R2 R2
+ R3 = 3,
+#define R3 R3
+ R4 = 4,
+#define R4 R4
+ R5 = 5,
+#define R5 R5
+ R6 = 6,
+#define R6 R6
+ R7 = 7,
+#define R7 R7
+ R8 = 8,
+#define R8 R8
+ R9 = 9,
+#define R9 R9
+ R10 = 10,
+#define R10 R10
+ R11 = 11,
+#define R11 R11
+ R12 = 12,
+#define R12 R12
+ R13 = 13,
+#define R13 R13
+ R14 = 14,
+#define R14 R14
+ R15 = 15,
+#define R15 R15
+};
+
+/* Structure to describe FPU registers. */
+typedef struct fpregset
+ {
+ } fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+ {
+ gregset_t gregs;
+ fpregset_t fpregs;
+ } mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_links;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[5];
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73bc81179e34f48978f8cb4a0b3501a47394a14d
commit 73bc81179e34f48978f8cb4a0b3501a47394a14d
Author: Richard Henderson <rth@redhat.com>
Date: Wed Feb 4 10:17:52 1998 +0000
* sysdeps/unix/sysv/linux/alpha/clone.S: Elide terminal ldgp for PROF.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Fix typos.
* sysdeps/unix/sysv/linux/alpha/bits/time.h (struct timeval):
Follow POSIX and make tv_sec a time_t.
* sysdeps/unix/sysv/linux/alpha/getitimer.S: New file to handle
new tv64 syscall as well as fall back to tv32.
* sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Add tv32 entries.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index fa2c078..48f5562 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -3,4 +3,10 @@ sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
sethae ioperm osf_sigprocmask fstatfs statfs llseek
+
+# Support old timeval32 entry points
+sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
+ osf_getitimer osf_setitimer osf_utimes \
+ osf_getrusage osf_wait4
+
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index d32f4d3..7f26efd 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -43,11 +43,13 @@
#ifndef _STRUCT_TIMEVAL
# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
+
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
struct timeval
{
- int tv_sec; /* Seconds. */
- int tv_usec; /* Microseconds. */
+ __time_t tv_sec; /* Seconds. */
+ __time_t tv_usec; /* Microseconds. */
};
#endif /* struct timeval */
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 930e379..a8bd7f1 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -62,8 +62,10 @@ ENTRY(__clone)
/* Something bad happened -- no child created */
$error:
+#ifndef PROF
br gp,1f
1: ldgp gp,0(gp)
+#endif
jmp zero,__syscall_error
END(__clone)
diff --git a/sysdeps/unix/sysv/linux/alpha/getitimer.S b/sysdeps/unix/sysv/linux/alpha/getitimer.S
new file mode 100644
index 0000000..03ae6ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getitimer.S
@@ -0,0 +1,99 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__getitimer_tv64, 16)
+ ldgp gp, 0(pv)
+ subq sp, 16, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(getitimer)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 16, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32: ldi v0, SYS_ify(osf_getitimer)
+ callsys
+ bne a3, $error
+
+ /* Copy back to proper format. */
+ ldq a1, 8(sp)
+ ldl t0, 0(a1)
+ ldl t1, 4(a1)
+ ldl t2, 8(a1)
+ ldl t3, 12(a1)
+ stq t0, 0(a1)
+ stq t1, 8(a1)
+ stq t2, 16(a1)
+ stq t3, 24(a1)
+
+ addq sp, 16, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 16, sp
+ jmp zero, (pv), __syscall_error
+
+END(__getitimer_tv64)
+
+default_symbol_version (__getitimer_tv64, getitimer, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/getrusage.S b/sysdeps/unix/sysv/linux/alpha/getrusage.S
new file mode 100644
index 0000000..d875c83
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getrusage.S
@@ -0,0 +1,127 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__getrusage_tv64, 16)
+ ldgp gp, 0(pv)
+ subq sp, 16, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(getrusage)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 16, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32: ldi v0, SYS_ify(osf_getrusage)
+ callsys
+ bne a3, $error
+
+ /* Copy back to proper format. */
+ ldq a1, 8(sp)
+ ldl t0, 0(a1) # ru_utime.tv_sec
+ ldl t1, 4(a1) # ru_utime.tv_usec
+ ldl t2, 8(a1) # ru_stime.tv_sec
+ ldl t3, 12(a1) # ru_stime.tv_usec
+ ldt $f15, 16(a1) # ru_maxrss
+ ldt $f16, 24(a1) # ru_ixrss
+ ldt $f17, 32(a1) # ru_idrss
+ ldt $f18, 40(a1) # ru_isrss
+ ldt $f19, 48(a1) # ru_minflt
+ ldt $f20, 56(a1) # ru_majflt
+ ldt $f21, 64(a1) # ru_nswap
+ ldt $f22, 72(a1) # ru_inblock
+ ldt $f23, 80(a1) # ru_oublock
+ ldt $f24, 88(a1) # ru_msgsend
+ ldt $f25, 96(a1) # ru_msgrcv
+ ldt $f26, 104(a1) # ru_nsignals
+ ldt $f27, 112(a1) # ru_nvcsw
+ ldt $f28, 120(a1) # ru_nivcsw
+ stq t0, 0(a1)
+ stq t1, 8(a1)
+ stq t2, 16(a1)
+ stq t3, 24(a1)
+ stt $f15, 32(a1)
+ stt $f16, 40(a1)
+ stt $f17, 48(a1)
+ stt $f18, 56(a1)
+ stt $f19, 64(a1)
+ stt $f20, 72(a1)
+ stt $f21, 80(a1)
+ stt $f22, 88(a1)
+ stt $f23, 96(a1)
+ stt $f24, 104(a1)
+ stt $f25, 112(a1)
+ stt $f26, 120(a1)
+ stt $f27, 128(a1)
+ stt $f28, 136(a1)
+
+ addq sp, 16, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 16, sp
+ jmp zero, (pv), __syscall_error
+
+END(__getrusage_tv64)
+
+default_symbol_version (__getrusage_tv64, getrusage, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/gettimeofday.S b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
new file mode 100644
index 0000000..bceeefc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/gettimeofday.S
@@ -0,0 +1,102 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__gettimeofday_tv64, 16)
+ ldgp gp, 0(pv)
+ subq sp, 16, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(gettimeofday)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 16, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32: ldi v0, SYS_ify(osf_gettimeofday)
+ callsys
+ bne a3, $error
+
+ /* Copy back to proper format. */
+ ldq a0, 0(sp)
+ beq a0, 2f
+ ldl t0, 0(a0)
+ ldl t1, 4(a0)
+ stq t0, 0(a0)
+ stq t1, 0(a0)
+
+2: addq sp, 16, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 16, sp
+ jmp zero, (pv), __syscall_error
+
+END(__gettimeofday_tv64)
+
+default_symbol_version (__gettimeofday_tv64, __gettimeofday, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__gettimeofday_tv64, __gettimeofday_tv64p)
+default_symbol_version (__gettimeofday_tv64p, gettimeofday, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index bcb2be0..1d98de9 100644
--- a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -40,18 +40,21 @@ ENTRY(__syscall_rt_sigaction)
.prologue 1
beq a1, 0f
- ldl t0, 8(a1)
+ ldl t0, 8(a1) # sa_flags
lda a4, sigreturn-__syscall_rt_sigaction(pv)
lda t1, rt_sigreturn-__syscall_rt_sigaction(pv)
and t0, 0x00000040, t0 # SA_SIGINFO
cmovne t0, t1, a4
-0: ldi v0,__NR_sigaction
+0: ldi v0,__NR_rt_sigaction
callsys
bne a3,1f
ret
-1: br gp,2f
+1:
+#ifndef PROF
+ br gp,2f
2: ldgp gp,0(gp)
+#endif
jmp __syscall_error
END(__syscall_rt_sigaction)
diff --git a/sysdeps/unix/sysv/linux/alpha/select.S b/sysdeps/unix/sysv/linux/alpha/select.S
new file mode 100644
index 0000000..73076b9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/select.S
@@ -0,0 +1,116 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__select_tv64, 64)
+ ldgp gp, 0(pv)
+ subq sp, 64, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+ bne t0, $do32
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 8(sp)
+ stq a1, 16(sp)
+ stq a2, 24(sp)
+ stq a3, 32(sp)
+ stq a4, 48(sp)
+
+ ldi v0, SYS_ify(select)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 64, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a4, 48(sp)
+ ldq a3, 32(sp)
+ ldq a2, 24(sp)
+ ldq a1, 16(sp)
+ ldq a0, 8(sp)
+
+ .align 3
+$do32:
+ /* If the timeout argument is present bounce to the smaller fmt. */
+ beq a4, 1f
+ ldq t0, 0(a4)
+ ldq t1, 8(a4)
+ stl t0, 0(sp)
+ stl t1, 4(sp)
+ mov sp, a4
+
+1: ldi v0, SYS_ify(osf_select)
+ callsys
+ bne a3, $error
+
+ /* ... and bounce the remaining timeout back. */
+ ldq a4, 48(sp)
+ beq a4, 2f
+ ldl t0, 0(sp)
+ ldl t1, 4(sp)
+ stq t0, 0(a4)
+ stq t1, 8(a4)
+
+2: addq sp, 64, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 64, sp
+ jmp zero, (pv), __syscall_error
+
+END(__select_tv64)
+
+default_symbol_version (__select_tv64, __select, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__select_tv64, __select_tv64p)
+default_symbol_version (__select_tv64p, select, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/setitimer.S b/sysdeps/unix/sysv/linux/alpha/setitimer.S
new file mode 100644
index 0000000..a2085cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setitimer.S
@@ -0,0 +1,121 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__setitimer_tv64, 48)
+ ldgp gp, 0(pv)
+ subq sp, 48, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+ stq a2, 16(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(setitimer)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 48, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a2, 16(sp)
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32:
+ /* Conditionally bounce new value down. */
+ beq a1, 1f
+ ldq t0, 0(a1)
+ ldq t1, 8(a1)
+ ldq t2, 16(a1)
+ ldq t3, 24(a1)
+ stl t0, 32(sp)
+ stl t1, 36(sp)
+ stl t2, 40(sp)
+ stl t3, 44(sp)
+ addq sp, 32, a1
+
+1: ldi v0, SYS_ify(osf_setitimer)
+ callsys
+ bne a3, $error
+
+ /* Conditionaly bounce old value up. */
+ ldq a2, 16(sp)
+ bne a2, 2f
+ ldl t0, 0(a2)
+ ldl t1, 4(a2)
+ ldl t2, 8(a2)
+ ldl t3, 12(a2)
+ stq t0, 0(a2)
+ stq t1, 8(a2)
+ stq t2, 48(a2)
+ stq t3, 24(a2)
+
+2: addq sp, 48, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 48, sp
+ jmp zero, (pv), __syscall_error
+
+END(__setitimer_tv64)
+
+default_symbol_version (__setitimer_tv64, __setitimer, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__setitimer_tv64, __setitimer_tv64p)
+default_symbol_version (__setitimer_tv64p, setitimer, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/settimeofday.S b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
new file mode 100644
index 0000000..b730df7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/settimeofday.S
@@ -0,0 +1,102 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__settimeofday_tv64, 16)
+ ldgp gp, 0(pv)
+ subq sp, 16, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+ bne t0, $do32
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+
+ ldi v0, SYS_ify(settimeofday)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 16, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32:
+ /* Conditionally bounce the timeval down. */
+ beq a0, 1f
+ ldq t0, 0(a0)
+ ldq t1, 8(a0)
+ stl t0, 0(sp)
+ stl t1, 4(sp)
+ mov sp, a0
+
+1: ldi v0, SYS_ify(osf_settimeofday)
+ callsys
+ bne a3, $error
+
+ addq sp, 16, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 16, sp
+ jmp zero, (pv), __syscall_error
+
+END(__settimeofday_tv64)
+
+default_symbol_version (__settimeofday_tv64, __settimeofday, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__settimeofday_tv64, __settimeofday_tv64p)
+default_symbol_version (__settimeofday_tv64p, settimeofday, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 17c55f0..3166531 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -34,8 +34,7 @@ truncate - truncate 2 truncate truncate64
sys_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
-# override select.S in parent directory:
-select - select 5 __select select
+# proper socket implementations:
accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect 3 __libc_connect __connect connect
@@ -58,3 +57,13 @@ sysctl - _sysctl 6 sysctl
# access pci space protected from machine checks:
pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
+
+# support old timeval32 entry points
+osf_select - osf_select 5 __select_tv32 __select@GLIBC_2.0 select@GLIBC_2.0
+osf_gettimeofday - osf_gettimeofday 2 __gettimeofday_tv32 __gettimeofday@GLIBC_2.0 gettimeofday@GLIBC_2.0
+osf_settimeofday - osf_settimeofday 2 __settimeofday_tv32 settimeofday@GLIBC_2.0
+osf_getitimer - osf_getitimer 2 __getitimer_tv32 getitimer@GLIBC_2.0
+osf_setitimer - osf_setitimer 3 __setitimer_tv32 setitimer@GLIBC_2.0
+osf_utimes - osf_utimes 2 __utimes_tv32 utimes@GLIBC_2.0
+osf_getrusage - osf_getrusage 2 __getrusage_tv32 getrusage@GLIBC_2.0
+osf_wait4 - osf_wait4 2 __wait4_tv32 wait4@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/alpha/utimes.S b/sysdeps/unix/sysv/linux/alpha/utimes.S
new file mode 100644
index 0000000..2b4c71e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/utimes.S
@@ -0,0 +1,107 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__utimes_tv64, 16)
+ ldgp gp, 0(pv)
+ subq sp, 16, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(utimes)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 16, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32:
+ /* Conditionally bounce values down. */
+ beq a1, 1f
+ ldq t0, 0(a1)
+ ldq t1, 8(a1)
+ ldq t2, 16(a1)
+ ldq t3, 24(a1)
+ stl t0, 0(sp)
+ stl t1, 4(sp)
+ stl t2, 8(sp)
+ stl t3, 12(sp)
+ mov sp, a1
+
+1: ldi v0, SYS_ify(osf_utimes)
+ callsys
+ bne a3, $error
+
+ addq sp, 16, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 16, sp
+ jmp zero, (pv), __syscall_error
+
+END(__utimes_tv64)
+
+default_symbol_version (__utimes_tv64, __utimes, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__utimes_tv64, __utimes_tv64p)
+default_symbol_version (__utimes_tv64p, utimes, GLIBC_2.1)
diff --git a/sysdeps/unix/sysv/linux/alpha/wait4.S b/sysdeps/unix/sysv/linux/alpha/wait4.S
new file mode 100644
index 0000000..5ab8607
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/wait4.S
@@ -0,0 +1,138 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* The problem here is that initially we made struct timeval compatible with
+ OSF/1, using int32. But we defined time_t with uint64, and later found
+ that POSIX requires tv_sec to be time_t.
+
+ So now we have to do compatibility stuff. */
+
+/* The variable is shared between all wrappers around signal handling
+ functions which have RT equivalents. */
+.comm __libc_missing_axp_tv64, 4
+
+.text
+
+LEAF(__wait4_tv64, 32)
+ ldgp gp, 0(pv)
+ subq sp, 32, sp
+#ifdef PROF
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ ldl t0, __libc_missing_axp_tv64
+
+ /* Save arguments in case we do need to fall back. */
+ stq a0, 0(sp)
+ stq a1, 8(sp)
+ stq a2, 16(sp)
+ stq a3, 24(sp)
+
+ bne t0, $do32
+
+ ldi v0, SYS_ify(wait4)
+ callsys
+ bne a3, $err64
+
+ /* Everything ok. */
+ addq sp, 32, sp
+ ret
+
+ /* If we didn't get ENOSYS, it is a real error. */
+ .align 3
+$err64: cmpeq v0, ENOSYS, t0
+ bne t0, $error
+ stl t0, __libc_missing_axp_tv64
+
+ /* Recover the saved arguments. */
+ ldq a3, 24(sp)
+ ldq a2, 16(sp)
+ ldq a1, 8(sp)
+ ldq a0, 0(sp)
+
+ .align 3
+$do32: ldi v0, SYS_ify(osf_wait4)
+ callsys
+ bne a3, $error
+
+ /* Copy back to proper format. */
+ ldq a3, 8(sp)
+ beq a3, 2f
+ ldl t0, 0(a3) # ru_utime.tv_sec
+ ldl t1, 4(a3) # ru_utime.tv_usec
+ ldl t2, 8(a3) # ru_stime.tv_sec
+ ldl t3, 12(a3) # ru_stime.tv_usec
+ ldt $f15, 16(a3) # ru_maxrss
+ ldt $f16, 24(a3) # ru_ixrss
+ ldt $f17, 32(a3) # ru_idrss
+ ldt $f18, 40(a3) # ru_isrss
+ ldt $f19, 48(a3) # ru_minflt
+ ldt $f20, 56(a3) # ru_majflt
+ ldt $f21, 64(a3) # ru_nswap
+ ldt $f22, 72(a3) # ru_inblock
+ ldt $f23, 80(a3) # ru_oublock
+ ldt $f24, 88(a3) # ru_msgsend
+ ldt $f25, 96(a3) # ru_msgrcv
+ ldt $f26, 104(a3) # ru_nsignals
+ ldt $f27, 112(a3) # ru_nvcsw
+ ldt $f28, 120(a3) # ru_nivcsw
+ stq t0, 0(a3)
+ stq t1, 8(a3)
+ stq t2, 16(a3)
+ stq t3, 24(a3)
+ stt $f15, 32(a3)
+ stt $f16, 40(a3)
+ stt $f17, 48(a3)
+ stt $f18, 56(a3)
+ stt $f19, 64(a3)
+ stt $f20, 72(a3)
+ stt $f21, 80(a3)
+ stt $f22, 88(a3)
+ stt $f23, 96(a3)
+ stt $f24, 104(a3)
+ stt $f25, 112(a3)
+ stt $f26, 120(a3)
+ stt $f27, 128(a3)
+ stt $f28, 136(a3)
+
+2: addq sp, 32, sp
+ ret
+
+ .align 3
+$error:
+ lda pv, __syscall_error
+ addq sp, 32, sp
+ jmp zero, (pv), __syscall_error
+
+END(__wait4_tv64)
+
+default_symbol_version (__wait4_tv64, __wait4, GLIBC_2.1)
+
+/* It seems to me to be a misfeature of the assembler that we can only
+ have one version-alias per symbol. So create an alias ourselves.
+ The 'p' is for 'public'. *Shrug* */
+strong_alias (__wait4_tv64, __wait4_tv64p)
+default_symbol_version (__wait4_tv64p, wait4, GLIBC_2.1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6534c4544ba7dc2acdc898daf23f8e40d63e8e5c
commit 6534c4544ba7dc2acdc898daf23f8e40d63e8e5c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 1 13:13:23 1998 +0000
Add rt_sigaction.S.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 5b5dca4..c8149ca 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -10,6 +10,7 @@ kernel_sigaction.h
kernel_stat.h
kernel_termios.h
net/route.h
+rt_sigaction.S
sys/acct.h
sys/io.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e85e76352cc1bd311b1051fe5eaf8d000ab0a45d
commit e85e76352cc1bd311b1051fe5eaf8d000ab0a45d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 12:26:36 1998 +0000
Fix typo.
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index f65f0e0..d5d4467 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +35,6 @@ ENTRY(htons)
bis v0, t1, v0 # v0 = bbaa
ret
- END(__htons)
+ END(htons)
weak_alias(htons, ntohs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=401a9d9e66320a1e2ee8a24a3cd7788f3659816a
commit 401a9d9e66320a1e2ee8a24a3cd7788f3659816a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 12:24:41 1998 +0000
Fix a typo.
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index 1e07923..a2aa3a5 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -116,5 +116,5 @@ $oneq:
$done: ret
- END(bzero)
+ END(__bzero)
weak_alias (__bzero, bzero)
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 4308192..a4e39ce 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,6 +41,6 @@ ENTRY(htonl)
or t2, v0, v0 # v0 = ddccbbaa
ret
- END(__htonl)
+ END(htonl)
weak_alias(htonl, ntohl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de0268b44e3fd3c772e8249409be99b9bb13dd1b
commit de0268b44e3fd3c772e8249409be99b9bb13dd1b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 11:39:44 1998 +0000
Correct typo (ccept->accept).
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 1c9c095..d026910 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -16,7 +16,7 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-ccept - accept 3 __libc_accept __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c44a108279a950191fe171f5026e82bce432ea12
commit c44a108279a950191fe171f5026e82bce432ea12
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 11:39:21 1998 +0000
Not to be used.
diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
deleted file mode 100644
index 34c0a91..0000000
--- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-
-.text
-ENTRY (__sigreturn)
- addq.l #4, %sp /* Pop the return PC. */
- DO_CALL (#SYS_ify (sigreturn), 0)
- /* Do the system call; it never returns. */
- /* NOTREACHED */
-END (__sigreturn)
-
-weak_alias (__sigreturn, sigreturn)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=caec183cea067d87c031a02b35f01cc5df4b3f3e
commit caec183cea067d87c031a02b35f01cc5df4b3f3e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 11:38:04 1998 +0000
Add bits/mman.h.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
index 738b9cc..d987285 100644
--- a/sysdeps/unix/sysv/linux/arm/Dist
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -1 +1,2 @@
+bits/mman.h
clone.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbb1b7f55cb833462a745b93cdd54892f83262ab
commit cbb1b7f55cb833462a745b93cdd54892f83262ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 30 11:37:34 1998 +0000
Add net/route.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 715fda7..5b5dca4 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -9,6 +9,7 @@ ioperm.c
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
+net/route.h
sys/acct.h
sys/io.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=651f8ea8fc0638956e444795eb6d8612e1910aed
commit 651f8ea8fc0638956e444795eb6d8612e1910aed
Author: Richard Henderson <rth@redhat.com>
Date: Mon Jan 26 22:52:51 1998 +0000
* sysdeps/unix/sysv/linux/alpha/bits/mman.h: Dyke out the
unimplemented OSF/1 definitions so that they are not accidentally seen.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 081a004..1411c85 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/Alpha version.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,9 +50,9 @@
# define MAP_ANON MAP_ANONYMOUS
#endif
-/* Not used by Linux, but here to make sure we don't clash with OSF/1
- defines. */
-#ifdef __USE_BSD
+/* Not used by Linux, but here to make sure we don't clash with
+ OSF/1 defines. */
+#if 0 && defined(__USE_BSD)
# define MAP_HASSEMAPHORE 0x0200
# define MAP_INHERIT 0x0400
# define MAP_UNALIGNED 0x0800
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18a702a8a33814281e7eac841b58df84244a0d51
commit 18a702a8a33814281e7eac841b58df84244a0d51
Author: Richard Henderson <rth@redhat.com>
Date: Mon Jan 26 22:04:53 1998 +0000
* sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Move declaration
of the trampoline function into the macro.
* sysdeps/unix/sysv/linux/alpha/clone.S: Fix ldgp for PROF.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Revert last change;
kernel 2.1.82 has this fixed.
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: New file.
* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: New file.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index e42ed3d..455fd7b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -123,7 +123,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* This code is used in dl-runtime.c to call the `fixup' function
and then redirect to the address it returns. */
-#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) asm ( "\
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) \
+ extern void tramp_name (void); \
+ asm ( "\
.globl " #tramp_name "
.ent " #tramp_name "
" #tramp_name ":
@@ -205,8 +207,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- extern void _dl_runtime_resolve (void); \
- extern void _dl_runtime_profile (void); \
strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 3f097fe..930e379 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -28,14 +28,16 @@
.text
ENTRY(__clone)
- .frame sp,0,ra,0
#ifdef PROF
+ ldgp gp,0(pv)
.set noat
lda AT, _mcount
jsr AT, (AT), _mcount
.set at
-#endif
.prologue 1
+#else
+ .prologue 0
+#endif
/* Sanity check arguments. */
ldiq v0,EINVAL
diff --git a/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
new file mode 100644
index 0000000..bcb2be0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -0,0 +1,75 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@cygnus.com>, 1998
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* On Alpha we desparately want to avoid having to issue an imb. Ordinarily
+ the kernel would have to issue one after setting up the signal return
+ stack, but the Linux rt_sigaction syscall is prepared to accept a pointer
+ to the sigreturn syscall, instead of inlining it on the stack.
+
+ This just about halves signal delivery time. */
+
+
+ .text
+ENTRY(__syscall_rt_sigaction)
+ .frame sp,0,ra,0
+#ifdef PROF
+ ldgp gp,0(pv)
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+#endif
+ .prologue 1
+
+ beq a1, 0f
+ ldl t0, 8(a1)
+ lda a4, sigreturn-__syscall_rt_sigaction(pv)
+ lda t1, rt_sigreturn-__syscall_rt_sigaction(pv)
+ and t0, 0x00000040, t0 # SA_SIGINFO
+ cmovne t0, t1, a4
+0: ldi v0,__NR_sigaction
+ callsys
+ bne a3,1f
+ ret
+
+1: br gp,2f
+2: ldgp gp,0(gp)
+ jmp __syscall_error
+
+END(__syscall_rt_sigaction)
+
+ .align 5
+ .ent sigreturn
+sigreturn:
+ .prologue 0
+ mov sp,a0
+ ldi v0,__NR_sigreturn
+ callsys
+ .end sigreturn
+
+ .align 4
+ .ent rt_sigreturn
+rt_sigreturn:
+ .prologue 0
+ mov sp,a0
+ ldi v0,__NR_rt_sigreturn
+ callsys
+ .end rt_sigreturn
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
new file mode 100644
index 0000000..349dd1e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
@@ -0,0 +1,41 @@
+/* Copyright (C) 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+#include <bits/sigcontext.h>
+
+/* A machine context is exactly a sigcontext. */
+typedef struct sigcontext mcontext_t;
+
+/* Userlevel context. */
+typedef struct ucontext
+ {
+ unsigned long int uc_flags;
+ struct ucontext *uc_links;
+ unsigned long __uc_osf_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ __sigset_t uc_sigmask;
+ } ucontext_t;
+
+#endif /* sys/ucontext.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9b67618..17c55f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -16,7 +16,6 @@ semget - semget 3 __semget semget
semctl - semctl 4 __semctl semctl
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
-s_sigaction sigaction osf_sigaction 3 __syscall_sigaction
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b56dfe148b3aa5e2c5a4dc2ff448cc21e642be3
commit 3b56dfe148b3aa5e2c5a4dc2ff448cc21e642be3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 25 19:12:46 1998 +0000
Add change to support sigaction on kernels > 2.1.7x.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 17c55f0..9b67618 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -16,6 +16,7 @@ semget - semget 3 __semget semget
semctl - semctl 4 __semctl semctl
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
+s_sigaction sigaction osf_sigaction 3 __syscall_sigaction
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=649d6c334b725b588e1cbb2bfa9c333a6f882115
commit 649d6c334b725b588e1cbb2bfa9c333a6f882115
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 25 17:00:01 1998 +0000
Define _STATBUF_ST_RDEV.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 319ff96..cb4ab78 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -84,7 +84,9 @@ struct stat64
};
#endif
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
/* Encoding of the file mode. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index cd586d4..3bcf1a9 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -112,7 +112,9 @@ struct stat64
};
#endif
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
/* Encoding of the file mode. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cdf0977855fcef0a094d473c5f66080197efcf61
commit cdf0977855fcef0a094d473c5f66080197efcf61
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 25 16:55:24 1998 +0000
Define SIG_HOLD.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index ac5c34c..6b1399e 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux/Alpha version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,10 @@
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#endif
+
/*
* Linux/AXP has different signal numbers that Linux/i386: I'm trying
* to make it OSF/1 binary compatible, at least for normal binaries.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h
index 5254a2b..c30abe3 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number definitions. Linux version.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,10 @@
#define __need_signums
#include <asm/signal.h>
+#ifdef __USE_UNIX98
+# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
+#endif
+
#endif /* <signal.h> included. */
#define __need__nsig
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92ce4393c99760b7365615361019013eb42715c9
commit 92ce4393c99760b7365615361019013eb42715c9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 25 16:49:50 1998 +0000
Add definition of __t_scalar_t and __t_uscalar_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 9033fdb..70b7d72 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -103,4 +103,8 @@ typedef struct
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
+/* Used in XTI. */
+typedef int __t_scalar_t;
+typedef unsigned int __t_uscalar_t;
+
#endif /* bits/types.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
index 56075d1..1d72de0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -127,4 +127,8 @@ typedef __u_long __ino64_t;
/* Type of file sizes and offsets. */
typedef __loff_t __off64_t;
+/* Used in XTI. */
+typedef int __t_scalar_t;
+typedef unsigned int __t_uscalar_t;
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ba537d289465d5ff57eaf2106ef61605359ddb6
commit 9ba537d289465d5ff57eaf2106ef61605359ddb6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 25 03:51:19 1998 +0000
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Remove the 3rd arg and add
declaration for _dl_runtime_resolve and _dl_runtime_profile.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index cd4f86a..e42ed3d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -205,7 +205,9 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- strong_alias (_dl_runtime_resolve, _dl_runtime_profile, #nop);
+ extern void _dl_runtime_resolve (void); \
+ extern void _dl_runtime_profile (void); \
+ strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
#endif
/* Initial entry point code for the dynamic linker.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=909a2333c71dfe76e5f2a60c085ae2cb545a4312
commit 909a2333c71dfe76e5f2a60c085ae2cb545a4312
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 21 17:03:32 1998 +0000
Define the cancelable socket functions as __libc_xxx with __xxx as
weak alias.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9406892..17c55f0 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,20 +36,20 @@ sys_mknod xmknod mknod 3 __syscall_mknod
# override select.S in parent directory:
select - select 5 __select select
-accept - accept 3 __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 6dd9cd8..1c9c095 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -16,19 +16,19 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept 3 __accept accept
+ccept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41fe80e1bc518e530e860721120a80acd8d67f4b
commit 41fe80e1bc518e530e860721120a80acd8d67f4b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 21 17:03:20 1998 +0000
Allow __socket to be redefined.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 4d877e5..1940061 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Do the system call trap. */
swi SYS_ify(socketcall)
@@ -44,6 +48,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 51aaa4b..81e5a21 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Save registers. */
move.l %d2, %a0
@@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
rts
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5faf38aeabb90364bc83b2b8ccd96c20157ef058
commit 5faf38aeabb90364bc83b2b8ccd96c20157ef058
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 21 17:00:32 1998 +0000
Add definition of FP_ILOGB0 and FP_ILOGNAN.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 1c25940..2ff626d 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -63,5 +63,9 @@ typedef double double_t;
#endif
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+#define FP_ILOGB0 0x80000001
+#define FP_ILOGBNAN 0x7fffffff
+
/* Number of decimal digits for the `double' type. */
#define DECIMAL_DIG 15
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18199b1e506888fb47b4b59e2a70755020e9e83e
commit 18199b1e506888fb47b4b59e2a70755020e9e83e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 28 15:24:24 1997 +0000
Add __mmap64 and mmap64 aliases to mmap.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index af96471..9406892 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -19,13 +19,13 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
-mmap - mmap 6 __mmap mmap
+mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek 3 __llseek llseek lseek64
pread EXTRA pread 4 __pread pread __pread64 pread64
pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
-getrlimit - getrlimit 2 getrlimit getrlimit64
+getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
ftruncate - ftruncate 2 ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a114d161c2a00b84d4d50e22c116dacf48f9e33
commit 7a114d161c2a00b84d4d50e22c116dacf48f9e33
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 28 15:23:32 1997 +0000
Empty file since mmap == mmap64.
diff --git a/sysdeps/unix/sysv/linux/alpha/mmap64.c b/sysdeps/unix/sysv/linux/alpha/mmap64.c
new file mode 100644
index 0000000..0dbd384
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/mmap64.c
@@ -0,0 +1 @@
+/* mmap64 is the same as mmap. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91c6e1837b001af4dd9466b7cf05d8b99eac2360
commit 91c6e1837b001af4dd9466b7cf05d8b99eac2360
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 28 15:22:52 1997 +0000
Replace sa_handler with k_sa_handler.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
index 6f8bc9b..f8c42e0 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -1,7 +1,7 @@
/* This is the sigaction struction from the Linux 2.1.20 kernel. */
struct old_kernel_sigaction {
- __sighandler_t sa_handler;
+ __sighandler_t k_sa_handler;
unsigned long sa_mask;
unsigned int sa_flags;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa6e5ab44cb558293b6aea58e93f36b5d0b6cad2
commit fa6e5ab44cb558293b6aea58e93f36b5d0b6cad2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 25 12:14:08 1997 +0000
Linux/Alpha specific route.h
diff --git a/sysdeps/unix/sysv/linux/alpha/net/route.h b/sysdeps/unix/sysv/linux/alpha/net/route.h
new file mode 100644
index 0000000..6c7d8dd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/net/route.h
@@ -0,0 +1,140 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Based on the 4.4BSD and Linux version of this file. */
+
+#ifndef _NET_ROUTE_H
+#define _NET_ROUTE_H 1
+
+#include <features.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+
+/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
+struct rtentry
+ {
+ unsigned long int rt_pad1;
+ struct sockaddr rt_dst; /* Target address. */
+ struct sockaddr rt_gateway; /* Gateway addr (RTF_GATEWAY). */
+ struct sockaddr rt_genmask; /* Target network mask (IP). */
+ unsigned short int rt_flags;
+ short int rt_pad2;
+ unsigned long int rt_pad3;
+ unsigned char rt_tos;
+ unsigned char rt_class;
+ short int rt_pad4[3];
+ short int rt_metric; /* +1 for binary compatibility! */
+ char *rt_dev; /* Forcing the device at add. */
+ unsigned long int rt_mtu; /* Per route MTU/Window. */
+ unsigned long int rt_window; /* Window clamping. */
+ unsigned short int rt_irtt; /* Initial RTT. */
+ };
+/* Compatibility hack. */
+#define rt_mss rt_mtu
+
+
+struct in6_rtmsg
+ {
+ struct in6_addr rtmsg_dst;
+ struct in6_addr rtmsg_src;
+ struct in6_addr rtmsg_gateway;
+ u_int32_t rtmsg_type;
+ u_int16_t rtmsg_dst_len;
+ u_int16_t rtmsg_src_len;
+ u_int32_t rtmsg_metric;
+ unsigned long int rtmsg_info;
+ u_int32_t rtmsg_flags;
+ int rtmsg_ifindex;
+ };
+
+
+#define RTF_UP 0x0001 /* Route usable. */
+#define RTF_GATEWAY 0x0002 /* Destination is a gateway. */
+
+#define RTF_HOST 0x0004 /* Host entry (net otherwise). */
+#define RTF_REINSTATE 0x0008 /* Reinstate route after timeout. */
+#define RTF_DYNAMIC 0x0010 /* Created dyn. (by redirect). */
+#define RTF_MODIFIED 0x0020 /* Modified dyn. (by redirect). */
+#define RTF_MTU 0x0040 /* Specific MTU for this route. */
+#define RTF_MSS RTF_MTU /* Compatibility. */
+#define RTF_WINDOW 0x0080 /* Per route window clamping. */
+#define RTF_IRTT 0x0100 /* Initial round trip time. */
+#define RTF_REJECT 0x0200 /* Reject route. */
+#define RTF_STATIC 0x0400 /* Manually injected route. */
+#define RTF_XRESOLVE 0x0800 /* External resolver. */
+#define RTF_NOFORWARD 0x1000 /* Forwarding inhibited. */
+#define RTF_THROW 0x2000 /* Go to next class. */
+#define RTF_NOPMTUDISC 0x4000 /* Do not send packets with DF. */
+
+/* for IPv6 */
+#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
+#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */
+#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */
+
+#define RTF_LINKRT 0x00100000 /* link specific - device match */
+#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
+
+#define RTF_CACHE 0x01000000 /* cache entry */
+#define RTF_FLOW 0x02000000 /* flow significant route */
+#define RTF_POLICY 0x04000000 /* policy route */
+
+#define RTCF_VALVE 0x00200000
+#define RTCF_MASQ 0x00400000
+#define RTCF_NAT 0x00800000
+#define RTCF_DOREDIRECT 0x01000000
+#define RTCF_LOG 0x02000000
+#define RTCF_DIRECTSRC 0x04000000
+
+#define RTF_LOCAL 0x80000000
+#define RTF_INTERFACE 0x40000000
+#define RTF_MULTICAST 0x20000000
+#define RTF_BROADCAST 0x10000000
+#define RTF_NAT 0x08000000
+
+#define RTF_ADDRCLASSMASK 0xF8000000
+#define RT_ADDRCLASS(flags) ((__u_int32_t) flags >> 23)
+
+#define RT_TOS(tos) ((tos) & IPTOS_TOS_MASK)
+
+#define RT_LOCALADDR(flags) ((flags & RTF_ADDRCLASSMASK) \
+ == (RTF_LOCAL|RTF_INTERFACE))
+
+#define RT_CLASS_UNSPEC 0
+#define RT_CLASS_DEFAULT 253
+
+#define RT_CLASS_MAIN 254
+#define RT_CLASS_LOCAL 255
+#define RT_CLASS_MAX 255
+
+
+#define RTMSG_ACK NLMSG_ACK
+#define RTMSG_OVERRUN NLMSG_OVERRUN
+
+#define RTMSG_NEWDEVICE 0x11
+#define RTMSG_DELDEVICE 0x12
+#define RTMSG_NEWROUTE 0x21
+#define RTMSG_DELROUTE 0x22
+#define RTMSG_NEWRULE 0x31
+#define RTMSG_DELRULE 0x32
+#define RTMSG_CONTROL 0x40
+
+#define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */
+
+#endif /* net/route.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5eb1fd786472bd91e50c2afa02fc5a2d16a7ed8b
commit 5eb1fd786472bd91e50c2afa02fc5a2d16a7ed8b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 20:42:51 1997 +0000
Types for Linux MIPS.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h
new file mode 100644
index 0000000..56075d1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/types.h
@@ -0,0 +1,130 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+#ifdef __GNUC__
+typedef unsigned long long int __u_quad_t;
+typedef long long int __quad_t;
+#else
+typedef struct
+ {
+ long int __val[2];
+ } __quad_t;
+typedef struct
+ {
+ __u_long __val[2];
+ } __u_quad_t;
+#endif
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+#ifdef __GNUC__
+typedef signed long long int __int64_t;
+typedef unsigned long long int __uint64_t;
+#endif
+typedef __quad_t *__qaddr_t;
+
+typedef __u_quad_t __dev_t; /* Type of device numbers. */
+typedef __u_int __uid_t; /* Type of user identifications. */
+typedef __u_int __gid_t; /* Type of group identifications. */
+typedef __u_long __ino_t; /* Type of file serial numbers. */
+typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
+typedef __u_int __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef int __pid_t; /* Type of process identifications. */
+typedef int __ssize_t; /* Type of a byte count, or error. */
+typedef long int __rlim_t; /* Type of resource counts. */
+typedef __quad_t __rlim64_t; /* Type of resource counts (LFS). */
+typedef __u_int __id_t; /* General type for ID. */
+
+typedef struct
+ {
+ int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
+
+/* Everythin' else. */
+typedef int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+
+typedef long int __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef unsigned long int __fd_mask;
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. */
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+ } __fd_set;
+
+
+typedef int __key_t;
+
+/* Used in `struct shmid_ds'. */
+typedef long int __ipc_pid_t;
+
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef __u_long __blkcnt_t;
+typedef __u_quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef long int __fsblkcnt_t;
+typedef __quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef __u_long __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
+/* Type of file serial numbers. */
+typedef __u_long __ino64_t;
+
+/* Type of file sizes and offsets. */
+typedef __loff_t __off64_t;
+
+#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ceb64ad89a9214af548e90bf5f521c10a9cd52ba
commit ceb64ad89a9214af548e90bf5f521c10a9cd52ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 20:21:44 1997 +0000
Define __ipc_pid_t.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 9acdf0c..9033fdb 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -77,6 +77,9 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
typedef int __key_t; /* Type of a SYSV IPC key. */
+/* Used in `struct shmid_ds'. */
+typedef int __ipc_pid_t;
+
/* One element in the file descriptor mask array. */
typedef unsigned long int __fd_mask;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=14bb1c1b08b03f07254bfc19bed967595b157157
commit 14bb1c1b08b03f07254bfc19bed967595b157157
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 20:20:47 1997 +0000
LFS support.
diff --git a/sysdeps/unix/sysv/linux/alpha/fstatfs64.c b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
new file mode 100644
index 0000000..2be4e59
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fstatfs64.c
@@ -0,0 +1 @@
+/* fstatfs64 is the same as fstatfs. */
diff --git a/sysdeps/unix/sysv/linux/alpha/ftruncate64.c b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c
new file mode 100644
index 0000000..673a8b5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ftruncate64.c
@@ -0,0 +1 @@
+/* ftruncate64 is the same as ftruncate. */
diff --git a/sysdeps/unix/sysv/linux/alpha/getrlimit64.c b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c
new file mode 100644
index 0000000..9feab0e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/getrlimit64.c
@@ -0,0 +1 @@
+/* getrlimit64 is the same as getrlimit. */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c
new file mode 100644
index 0000000..96a6a76
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/readdir.c
@@ -0,0 +1,4 @@
+#define readdir64 __no_readdir64_decl
+#include <sysdeps/unix/readdir.c>
+#undef readdir64
+weak_alias (__readdir, readdir64)
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64.c b/sysdeps/unix/sysv/linux/alpha/readdir64.c
new file mode 100644
index 0000000..9796431
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/readdir64.c
@@ -0,0 +1 @@
+/* readdir64 is in readdir.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
new file mode 100644
index 0000000..b8fe9a3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
@@ -0,0 +1 @@
+/* readdir64_r is in readdir_r.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir_r.c b/sysdeps/unix/sysv/linux/alpha/readdir_r.c
new file mode 100644
index 0000000..adb92db
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/readdir_r.c
@@ -0,0 +1,4 @@
+#define readdir64_r __no_readdir64_r_decl
+#include <sysdeps/unix/readdir_r.c>
+#undef readdir64_r
+weak_alias (__readdir_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/alpha/setrlimit64.c b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c
new file mode 100644
index 0000000..8edcff0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setrlimit64.c
@@ -0,0 +1 @@
+/* setrlimit64 is the same as setrlimit. */
diff --git a/sysdeps/unix/sysv/linux/alpha/statfs64.c b/sysdeps/unix/sysv/linux/alpha/statfs64.c
new file mode 100644
index 0000000..06bc688
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/statfs64.c
@@ -0,0 +1 @@
+/* statfs64 is the same as statfs. */
diff --git a/sysdeps/unix/sysv/linux/alpha/truncate64.c b/sysdeps/unix/sysv/linux/alpha/truncate64.c
new file mode 100644
index 0000000..8999768
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/truncate64.c
@@ -0,0 +1 @@
+/* truncate64 is the same as truncate. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77d5a2df47367de3731dc97c0d71346f6e76b03a
commit 77d5a2df47367de3731dc97c0d71346f6e76b03a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 20:20:09 1997 +0000
Add xxx64 alias for fstatfs, statfs, getrlimit, setrlimit, ftruncate
and truncate.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index d3bc033..af96471 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -23,10 +23,14 @@ mmap - mmap 6 __mmap mmap
llseek EXTRA lseek 3 __llseek llseek lseek64
pread EXTRA pread 4 __pread pread __pread64 pread64
pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
+fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
+statfs - statfs 2 __statfs statfs statfs64
+getrlimit - getrlimit 2 getrlimit getrlimit64
+setrlimit - setrlimit 2 setrlimit setrlimit64
+ftruncate - ftruncate 2 ftruncate ftruncate64
+truncate - truncate 2 truncate truncate64
# these are actually common with the x86:
-fstatfs - fstatfs 2 __fstatfs fstatfs
-statfs - statfs 2 __statfs statfs
sys_ustat ustat ustat 2 __syscall_ustat
sys_mknod xmknod mknod 3 __syscall_mknod
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2988b6bbfbb1348729310c344b9f4221ad5587fd
commit 2988b6bbfbb1348729310c344b9f4221ad5587fd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 20:19:45 1997 +0000
Really make egcs support.
diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h
index ffbcaf1..a3f5d8f 100644
--- a/sysdeps/unix/sysv/linux/alpha/init-first.h
+++ b/sysdeps/unix/sysv/linux/alpha/init-first.h
@@ -2,28 +2,26 @@
This is done in one of two ways: either in the stack context
of program start, or having dlopen pass them in. */
-#define SYSDEP_CALL_INIT(NAME, INIT) \
- asm(".weak _dl_starting_up\n\t" \
- ".globl " #NAME "\n\t" \
- ".ent " #NAME "\n" \
- #NAME ":\n\t" \
- "ldgp $29, 0($27)\n\t" \
- ".prologue 1\n\t" \
- ".set at\n\t" \
- /* Are we a dynamic libc being loaded into a static program? */ \
- "lda $0, _dl_starting_up\n\t" \
- "beq $0, 1f\n\t" \
- "ldl $0, 0($0)\n" \
- "cmpeq $31, $0, $0\n" \
- "1:\t" \
- "stl $0, __libc_multiple_libcs\n\t" \
- /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \
- "bne $0, 2f\n\t" \
- "ldl $16, 0($30)\n\t" \
- "lda $17, 8($30)\n\t" \
- "s8addq $16, $17, $18\n\t" \
- "addq $18, 8, $18\n" \
- "2:\t" \
- "br $31, " #INIT "..ng\n\t" \
- ".set noat\n\t" \
- ".end " #NAME);
+#define SYSDEP_CALL_INIT(NAME, INIT) asm("\
+ .weak _dl_starting_up
+ .globl " #NAME "
+ .ent " #NAME "
+" #NAME ":
+ ldgp $29, 0($27)
+ .prologue 1
+ .set at
+ /* Are we a dynamic libc being loaded into a static program? */
+ lda $0, _dl_starting_up
+ beq $0, 1f
+ ldl $0, 0($0)
+ cmpeq $31, $0, $0
+1: stl $0, __libc_multiple_libcs
+ /* If so, argc et al are in a0-a2 already. Otherwise, load them. */
+ bne $0, 2f
+ ldl $16, 0($30)
+ lda $17, 8($30)
+ s8addq $16, $17, $18
+ addq $18, 8, $18
+2: br $31, " ASM_ALPHA_NG_SYMBOL_PREFIX #INIT "..ng
+ .set noat
+ .end " #NAME);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48a0be27051f551452346713af12671883358221
commit 48a0be27051f551452346713af12671883358221
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 18:58:39 1997 +0000
(RLIM_INFINITY) [__USE_FILE_OFFSET64]: Make long long constant.
(RLIM64_INFINITY): Likewise.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
index 6978c87..c0b40ba 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
@@ -65,11 +65,11 @@ enum __rlimit_resource
#ifndef __USE_FILE_OFFSET64
# define RLIM_INFINITY 0x7fffffff
#else
-# define RLIM_INFINITY 0x7fffffffffffffffL
+# define RLIM_INFINITY 0x7fffffffffffffffLL
#endif
#ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0x7fffffffffffffffL
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60688571b0d4b8c68049360f4feb0b784828fbaa
commit 60688571b0d4b8c68049360f4feb0b784828fbaa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 18:56:55 1997 +0000
(EBUSY): Added.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 391f925..373d701 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -56,6 +56,7 @@
# define EIO 28
# define ENOSPC 29
# define EEXIST 30
+# define EBUSY 31
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7eaf35c740a4938ef2492a8fc65579a1df3f73cc
commit 7eaf35c740a4938ef2492a8fc65579a1df3f73cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 22 18:53:56 1997 +0000
Don't define exp2 inline.
Define scalbln{,f,l} under __USE_ISOC9X, not __USE_MISC.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 034b6f8..569e5a0 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -173,7 +173,6 @@ __inline_mathop(significand, getman)
# ifdef __USE_ISOC9X
__inline_mathop(log2, log2)
-__inline_mathop(exp2, twotox)
__inline_mathop(trunc, intrz)
# endif
@@ -445,7 +444,6 @@ __inline_forward_c(double,ceil, (double __x), (__x))
__inline_forward_c(int,isinf, (double __value), (__value))
__inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
-__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
# endif
# if defined __USE_MISC || defined __USE_XOPEN
# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
@@ -453,6 +451,7 @@ __inline_forward_c(int,isnan, (double __value), (__value))
# endif
# endif
# ifdef __USE_ISOC9X
+__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
__inline_forward_c(double,nearbyint, (double __value), (__value))
__inline_forward_c(long int,lrint, (double __value), (__value))
__inline_forward_c(double,fma, (double __x, double __y, double __z),
@@ -473,10 +472,10 @@ __inline_forward_c(float,ceilf, (float __x), (__x))
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
-__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
# endif
# ifdef __USE_ISOC9X
+__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(float,nearbyintf, (float __value), (__value))
__inline_forward_c(long int,lrintf, (float __value), (__value))
__inline_forward_c(float,fmaf, (float __x, float __y, float __z),
@@ -495,11 +494,11 @@ __inline_forward_c(long double,ceill, (long double __x), (__x))
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
-__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
- (__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
# endif
# ifdef __USE_ISOC9X
+__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
+ (__x, __n))
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
__inline_forward_c(long int,lrintl, (long double __value), (__value))
__inline_forward_c(long double,fmal,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8dd9b4bddd191eee61088906202aff8d67196954
commit 8dd9b4bddd191eee61088906202aff8d67196954
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:19:40 1997 +0000
Define __id_t.
Correct definition of __FDMASK.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index b9e6dd7..9acdf0c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -62,6 +62,7 @@ typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */
typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */
typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */
typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
+typedef __uint32_t __id_t; /* General type for IDs. */
typedef struct
{
@@ -90,7 +91,7 @@ typedef unsigned long int __fd_mask;
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
#define __NFDBITS (8 * sizeof (__fd_mask))
#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) (1 << ((d) % __NFDBITS))
+#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
/* fd_set for select and pselect. */
typedef struct
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94b8f616432fd1f9658f7801e1a5ec653784d2fa
commit 94b8f616432fd1f9658f7801e1a5ec653784d2fa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:19:05 1997 +0000
Define as old_kernel_sigaction.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
index 900bff4..6f8bc9b 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -1,6 +1,6 @@
/* This is the sigaction struction from the Linux 2.1.20 kernel. */
-struct kernel_sigaction {
+struct old_kernel_sigaction {
__sighandler_t sa_handler;
unsigned long sa_mask;
unsigned int sa_flags;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c96aeaa4e39ebd25ed174c79d6b0bd874ff87b35
commit c96aeaa4e39ebd25ed174c79d6b0bd874ff87b35
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:10:59 1997 +0000
(EAGAIN): Added.
(EIO): Likewise.
(ENOSPC): Likewise.
(EEXIST): Likewise.
(__errno_location): Likewise.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 97dbbd9..391f925 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -52,6 +52,13 @@
# define EISDIR 24
# define EOPNOTSUPP 25 /* Operation not supported. */
# define ENOTTY 26
+# define EAGAIN 27
+# define EIO 28
+# define ENOSPC 29
+# define EEXIST 30
#endif
#define __set_errno(val) errno = (val)
+
+/* Function to get address of global `errno' variable. */
+extern int *__errno_location __P ((void)) __attribute__ ((__const__));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3632b95d0ac243b2a4351958a69c7d1762a85ff5
commit 3632b95d0ac243b2a4351958a69c7d1762a85ff5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:09:47 1997 +0000
Protect declarations of inline functions by feature tests to avoid
warning about missing prototype declarations.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 827a8d6..034b6f8 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -138,13 +138,20 @@ __inline_mathop(__tan, tan)
__inline_mathop(__tanh, tanh)
__inline_mathop(__fabs, abs)
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
__inline_mathop(__log1p, lognp1)
+#endif
+
+#ifdef __USE_MISC
__inline_mathop(__significand, getman)
+#endif
+#ifdef __USE_ISOC9X
__inline_mathop(__log2, log2)
__inline_mathop(__trunc, intrz)
+#endif
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
@@ -272,8 +279,18 @@ __m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
__asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
: "dmi" (__ctrl_reg)); \
return __result; \
-} \
- \
+}
+
+__inline_functions(double,)
+#if defined __USE_MISC || defined __USE_ISOC9X
+__inline_functions(float,f)
+__inline_functions(long double,l)
+#endif
+#undef __inline_functions
+
+#ifdef __USE_MISC
+
+# define __inline_functions(float_type, s) \
__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, \
@@ -284,14 +301,6 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
} \
\
-__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
-{ \
- char __result; \
- __asm("ftst%.x %1\n" \
- "fsun %0" : "=dm" (__result) : "f" (__value)); \
- return __result; \
-} \
- \
__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, so we must extract and \
@@ -302,6 +311,44 @@ __m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
return (__fpsr & (3 << 24)) == 0; \
} \
\
+__m81_defun (float_type, __CONCAT(__scalbn,s), \
+ (float_type __x, int __n)) \
+{ \
+ float_type __result; \
+ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
+ return __result; \
+}
+
+__inline_functions(double,)
+__inline_functions(float,f)
+__inline_functions(long double,l)
+# undef __inline_functions
+
+#endif /* Use misc. */
+
+#if defined __USE_MISC || defined __USE_XOPEN
+
+# define __inline_functions(float_type, s) \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
+{ \
+ char __result; \
+ __asm("ftst%.x %1\n" \
+ "fsun %0" : "=dm" (__result) : "f" (__value)); \
+ return __result; \
+}
+
+__inline_functions(double,)
+# ifdef __USE_MISC
+__inline_functions(float,f)
+__inline_functions(long double,l)
+# endif
+# undef __inline_functions
+
+#endif
+
+#ifdef __USE_ISOC9X
+
+# define __inline_functions(float_type, s) \
__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
{ \
/* There is no branch-condition for the sign bit, so we must extract \
@@ -312,14 +359,6 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
return (__fpsr >> 27) & 1; \
} \
\
-__m81_defun (float_type, __CONCAT(__scalbn,s), \
- (float_type __x, int __n)) \
-{ \
- float_type __result; \
- __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
- return __result; \
-} \
- \
__m81_defun (float_type, __CONCAT(__scalbln,s), \
(float_type __x, long int __n)) \
{ \
@@ -347,14 +386,6 @@ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \
return __result; \
} \
\
-__m81_inline void \
-__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
- float_type *__cosx) \
-{ \
- __asm ("fsincos%.x %2,%1:%0" \
- : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
-} \
- \
__m81_inline float_type \
__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
float_type __z) \
@@ -362,11 +393,30 @@ __m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
return (__x * __y) + __z; \
}
-/* This defines the three variants of the inline functions. */
__inline_functions (double,)
__inline_functions (float,f)
__inline_functions (long double,l)
-#undef __inline_functions
+# undef __inline_functions
+
+#endif /* Use ISO C9x */
+
+#ifdef __USE_GNU
+
+# define __inline_functions(float_type, s) \
+__m81_inline void \
+__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
+ float_type *__cosx) \
+{ \
+ __asm ("fsincos%.x %2,%1:%0" \
+ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
+}
+
+__inline_functions (double,)
+__inline_functions (float,f)
+__inline_functions (long double,l)
+# undef __inline_functions
+
+#endif
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac442bf7a988d87ea989c7b332627073dac01053
commit ac442bf7a988d87ea989c7b332627073dac01053
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:09:29 1997 +0000
(fenv_t): Add member to hold fpiar value, to match spirit of the
standard.
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index a11e072..b1608b9 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -64,8 +64,9 @@ typedef unsigned int fexcept_t;
corresponds to the layout of the block written by `fmovem'. */
typedef struct
{
- fexcept_t control_register;
- fexcept_t status_register;
+ unsigned int control_register;
+ unsigned int status_register;
+ unsigned int instruction_address;
}
fenv_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=053ed29047d2ac3b58865cc4181f76ceacd2468d
commit 053ed29047d2ac3b58865cc4181f76ceacd2468d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 22:09:13 1997 +0000
Save/restore fpiar.
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
index 59f743a..b437b7e 100644
--- a/sysdeps/m68k/fpu/fegetenv.c
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -23,5 +23,5 @@
void
fegetenv (fenv_t *envp)
{
- __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp));
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
}
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index d8e2d8a..e36617d 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -26,7 +26,7 @@ feholdexcept (fenv_t *envp)
fexcept_t fpcr, fpsr;
/* Store the environment. */
- __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp));
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*envp));
/* Now clear all exceptions. */
fpsr = envp->status_register & ~FE_ALL_EXCEPT;
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index 8b4d6b0..6dd131b 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -29,7 +29,7 @@ fesetenv (const fenv_t *envp)
values which we do not want to come from the saved environment.
Therefore, we get the current environment and replace the values
we want to use from the environment specified by the parameter. */
- __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp));
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr/%/fpiar,%0" : "=m" (*&temp));
temp.status_register &= ~FE_ALL_EXCEPT;
temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
@@ -44,5 +44,5 @@ fesetenv (const fenv_t *envp)
temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
}
- __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr" : : "m" (temp));
+ __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr/%/fpiar" : : "m" (*&temp));
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49f3765caf61c732accdd87c4ab11e2cece3ff95
commit 49f3765caf61c732accdd87c4ab11e2cece3ff95
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 14 21:53:11 1997 +0000
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Add missing parameters.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index bc93087..cd4f86a 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -204,8 +204,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop);
#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
- TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
- strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
+ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
+ strong_alias (_dl_runtime_resolve, _dl_runtime_profile, #nop);
#endif
/* Initial entry point code for the dynamic linker.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a5bb722c3fce80432207ca9f41be692e38a337a
commit 1a5bb722c3fce80432207ca9f41be692e38a337a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 8 03:01:53 1997 +0000
Syscalls for Linux/ARM.
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
new file mode 100644
index 0000000..392a257
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -0,0 +1,6 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+s_getgroups getgroups getgroups 2 __syscall_getgroups
+s_llseek llseek _llseek 5 __sys_llseek
+s_setgroups setgroups setgroups 2 __syscall_setgroups
+vm86 - vm86 1 __vm86 vm86
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17bba157e3f2bdadef9762cc951801269cec72a2
commit 17bba157e3f2bdadef9762cc951801269cec72a2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 8 02:55:11 1997 +0000
(ENOTTY): Added.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index f5020dc..97dbbd9 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -51,6 +51,7 @@
# define ESTALE 23
# define EISDIR 24
# define EOPNOTSUPP 25 /* Operation not supported. */
+# define ENOTTY 26
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53b18c667bcce9f81790af2ec0454a6ac6536549
commit 53b18c667bcce9f81790af2ec0454a6ac6536549
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 8 02:55:00 1997 +0000
(_STDIO_H): Define before including <bits/stdio_lim.h>
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 2e33b3c..114d726 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <unistd.h>
+#define _STDIO_H
#include <bits/stdio_lim.h>
#include "filedesc.h"
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
index a35d1cf..d6a12a6 100644
--- a/sysdeps/standalone/filedesc.h
+++ b/sysdeps/standalone/filedesc.h
@@ -26,6 +26,7 @@
#ifndef __FILEDESC_h
#define __FILEDESC_h
+#define _STDIO_H
#include <bits/stdio_lim.h>
#ifndef __DECLARE_FILE_DESCRIPTORS__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e67c045f29d685845757f990fe0628b11548b6f
commit 2e67c045f29d685845757f990fe0628b11548b6f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 8 02:50:09 1997 +0000
(_dl_runtime_resolve): Care for prefix.
(_start): Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3f65ae9..bc93087 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -166,7 +166,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
mov $26, $18
addq $17, $17, $17
/* Do the fixup */
- bsr $26, " #fixup_name "..ng
+ bsr $26, " ASM_ALPHA_NG_SYMBOL_PREFIX #fixup_name "..ng
/* Move the destination address into position. */
mov $0, $27
/* Restore program registers. */
@@ -221,7 +221,7 @@ _start:
0: ldgp $gp, 0($gp)
/* Pass pointer to argument block to _dl_start. */
mov $sp, $16
- bsr $26, _dl_start..ng
+ bsr $26, "ASM_ALPHA_NG_SYMBOL_PREFIX"_dl_start..ng
.end _start
/* FALLTHRU */
.globl _dl_start_user
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f873ad64beaf42149f18f573a0e1a0ba94d98983
commit f873ad64beaf42149f18f573a0e1a0ba94d98983
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Dec 4 00:02:58 1997 +0000
Linux/ARM implementation.
diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h
new file mode 100644
index 0000000..fcc0643
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h
@@ -0,0 +1,75 @@
+/* Definitions for POSIX memory map interface. Linux/ARM version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never include this file directly. Use <sys/mman.h> instead"
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x2000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc1eaef3e8eae583bf161663bce5fc80db4226ba
commit fc1eaef3e8eae583bf161663bce5fc80db4226ba
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 3 23:31:37 1997 +0000
Don't define ___LIBC_INTERNAL_MATH_INLINES here.
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 9c2d91f..80803ff 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index d23d4f9..7b275b4 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 505650a..9e59a43 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index c36b643..ee95a39 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index 93b44ff..ef1724b 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -17,7 +17,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 5b263ec..85f744f 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 41de73f..05cdcee 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index 7f87e09..09e5ac8 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index e6b676b..29f2eca 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c
index 095aa98..fbd5ef5 100644
--- a/sysdeps/m68k/fpu/s_ccos.c
+++ b/sysdeps/m68k/fpu/s_ccos.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
index 3d560b3..af75143 100644
--- a/sysdeps/m68k/fpu/s_ccosh.c
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index da28ebb..fcf87ed 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c
index ae456d3..72214c4 100644
--- a/sysdeps/m68k/fpu/s_csin.c
+++ b/sysdeps/m68k/fpu/s_csin.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
index c95f9dc..e829f4d 100644
--- a/sysdeps/m68k/fpu/s_csinh.c
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 4280fcc..61e3298 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index aebcaa1..ef90946 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index d8cafdb..03dc26d 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
index 37b6f63..423939a 100644
--- a/sysdeps/m68k/fpu/s_llrint.c
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -19,7 +19,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c
index 4d06ae2..0cd12c9 100644
--- a/sysdeps/m68k/fpu/s_llrintf.c
+++ b/sysdeps/m68k/fpu/s_llrintf.c
@@ -19,7 +19,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c
index 14a815f..6f63e0b 100644
--- a/sysdeps/m68k/fpu/s_llrintl.c
+++ b/sysdeps/m68k/fpu/s_llrintl.c
@@ -19,7 +19,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c
index 7747057..89e9dba 100644
--- a/sysdeps/m68k/fpu/s_lrint.c
+++ b/sysdeps/m68k/fpu/s_lrint.c
@@ -19,7 +19,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef suffix
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index b9867df..6c2449a 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c
index 7607fee..10be1ae 100644
--- a/sysdeps/m68k/fpu/s_remquo.c
+++ b/sysdeps/m68k/fpu/s_remquo.c
@@ -18,7 +18,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 12b737a..c151b2a 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#define scalbln __no_scalbln_decl
#define scalblnf __no_scalblnf_decl
#define scalblnl __no_scalblnl_decl
diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c
index dda42e2..8d84ece 100644
--- a/sysdeps/m68k/fpu/s_sincos.c
+++ b/sysdeps/m68k/fpu/s_sincos.c
@@ -16,7 +16,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ff61542a8d637d7f488d561fadcf6776caad2c1
commit 4ff61542a8d637d7f488d561fadcf6776caad2c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 3 23:20:36 1997 +0000
Define _SETJMP_H before including <bits/setjmp.h>.
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index b027103..a2042f5 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
@@ -32,6 +33,6 @@ ENTRY (__longjmp)
add r2, r2, #48
lfmfd f4, 4, [r2]
#endif
-
+
LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 8f99e4f..08cd0d2 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
@@ -28,7 +29,7 @@ ENTRY (__sigsetjmp)
/* Save registers */
#if __ARM_USES_FP
sfmea f4, 4, [r0]!
-#endif
+#endif
stmia r0, {v1-v6, sl, fp, sp, lr}
/* Make a tail call to __sigjmp_save; it takes the same args. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e89694bc01b720846d291cd129ed5857109fd4d
commit 7e89694bc01b720846d291cd129ed5857109fd4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 1 17:12:23 1997 +0000
Define syscall as __llseek and make llseek and lseek64 weak aliases.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9e4cd39..d3bc033 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -20,7 +20,7 @@ osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap
-llseek EXTRA lseek 3 llseek
+llseek EXTRA lseek 3 __llseek llseek lseek64
pread EXTRA pread 4 __pread pread __pread64 pread64
pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2d68a74d0846a56ca1406996926b02446902d6a
commit d2d68a74d0846a56ca1406996926b02446902d6a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 1 17:12:09 1997 +0000
Include <termios.h> not <bits/termios.h>.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
index 093ac25..6a99146 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
@@ -22,7 +22,7 @@
/* The following corresponds to the values from the Linux 2.1.20 kernel. */
/* We need the definition of tcflag_t, cc_t, and speed_t. */
-#include <bits/termios.h>
+#include <termios.h>
#define __KERNEL_NCCS 19
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5cd798ccbb17680545c512ede397498c8987df2
commit d5cd798ccbb17680545c512ede397498c8987df2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 1 17:09:25 1997 +0000
Define _ASM and _SETJMP_H to get definitions.
diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S
index 3473117..7b639f5 100644
--- a/sysdeps/alpha/__longjmp.S
+++ b/sysdeps/alpha/__longjmp.S
@@ -19,6 +19,8 @@
#define __ASSEMBLY__
#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
#include <bits/setjmp.h>
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index ae3ceb5..894bb9e 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -19,6 +19,8 @@
#define __ASSEMBLY__
#include <sysdep.h>
+#define _ASM
+#define _SETJMP_H
#include <bits/setjmp.h>
.ent __sigsetjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=905714080fcea01e677a0723cbae0b4e23cf1262
commit 905714080fcea01e677a0723cbae0b4e23cf1262
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 26 04:14:44 1997 +0000
Issue error message if the header is used directly.
diff --git a/sysdeps/alpha/bits/endian.h b/sysdeps/alpha/bits/endian.h
index e873d21..8a16e14 100644
--- a/sysdeps/alpha/bits/endian.h
+++ b/sysdeps/alpha/bits/endian.h
@@ -1,3 +1,7 @@
/* Alpha is little-endian. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index 9aa3046..de37019 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
We use an array of 'long int' instead, to make writing the
assembler easier. Naturally, user code should not depend on
@@ -48,24 +52,24 @@
* registers.
*/
-#if defined(__USE_MISC) || defined(__ASSEMBLY__)
-#define JB_S0 0
-#define JB_S1 1
-#define JB_S2 2
-#define JB_S3 3
-#define JB_S4 4
-#define JB_S5 5
-#define JB_PC 6
-#define JB_FP 7
-#define JB_SP 8
-#define JB_F2 9
-#define JB_F3 10
-#define JB_F4 11
-#define JB_F5 12
-#define JB_F6 13
-#define JB_F7 14
-#define JB_F8 15
-#define JB_F9 16
+#if defined __USE_MISC || defined __ASSEMBLY__
+# define JB_S0 0
+# define JB_S1 1
+# define JB_S2 2
+# define JB_S3 3
+# define JB_S4 4
+# define JB_S5 5
+# define JB_PC 6
+# define JB_FP 7
+# define JB_SP 8
+# define JB_F2 9
+# define JB_F3 10
+# define JB_F4 11
+# define JB_F5 12
+# define JB_F6 13
+# define JB_F7 14
+# define JB_F8 15
+# define JB_F9 16
#endif
#ifndef __ASSEMBLY__
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
index 7cb0e3e..4482f0a 100644
--- a/sysdeps/alpha/fpu/bits/fenv.h
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>, 1997
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
@@ -51,20 +50,20 @@ enum
FE_INVALID = 1UL << 17,
#define FE_INVALID FE_INVALID
-
+
FE_ALL_EXCEPT =
(FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-#define FE_ALL_EXCEPT FE_ALL_EXCEPT
+#define FE_ALL_EXCEPT FE_ALL_EXCEPT
};
-/* Alpha chips support all four defined rouding modes.
+/* Alpha chips support all four defined rouding modes.
Note that code must be compiled to use dynamic rounding (/d) instructions
to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc
- this is -fprm d. The default for both is static rounding to nearest.
+ this is -fprm d. The default for both is static rounding to nearest.
- These are shifted down 58 bits from the hardware fpcr because the
+ These are shifted down 58 bits from the hardware fpcr because the
functions are declared to take integers. */
enum
@@ -100,5 +99,5 @@ typedef unsigned long fenv_t;
#endif
/* The system calls to talk to the kernel's FP code. */
-extern unsigned long __ieee_get_fp_control(void);
-extern void __ieee_set_fp_control(unsigned long);
+extern unsigned long int __ieee_get_fp_control __P ((void));
+extern void __ieee_set_fp_control __P ((unsigned long int __value));
diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h
index 32f8489..ad3b539 100644
--- a/sysdeps/arm/bits/endian.h
+++ b/sysdeps/arm/bits/endian.h
@@ -1,3 +1,7 @@
/* ARM is little-endian. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
index 93b0f5f..5cf9cd7 100644
--- a/sysdeps/arm/bits/setjmp.h
+++ b/sysdeps/arm/bits/setjmp.h
@@ -1,10 +1,14 @@
/* Define the machine-dependent type `jmp_buf'. ARM version. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
#ifndef _ASM
/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
-#if __ARM_USES_FP
+# if __ARM_USES_FP
typedef int __jmp_buf[22];
-#else
+# else
typedef int __jmp_buf[10];
-#endif
+# endif
#endif
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
index 54ec0d1..41bbe59 100644
--- a/sysdeps/m68k/bits/byteswap.h
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -17,8 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _BITS_BYTESWAP_H
-#define _BITS_BYTESWAP_H 1
+#if !defined _BYTESWAP_H && !defined _NETINET_IN_H
+# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
+#endif
/* Swap bytes in 16 bit value. We don't provide an assembler version
because GCC is smart enough to generate optimal assembler output, and
@@ -32,7 +33,7 @@
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
#if defined __GNUC__ && __GNUC__ >= 2
-#define __bswap_32(x) \
+# define __bswap_32(x) \
__extension__ \
({ unsigned int __v; \
if (__builtin_constant_p (x)) \
@@ -45,12 +46,12 @@
: "0" (x)); \
__v; })
#else
-#define __bswap_32(x) __bswap_constant_32 (x)
+# define __bswap_32(x) __bswap_constant_32 (x)
#endif
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
-#define __bswap_64(x) \
+# define __bswap_64(x) \
__extension__ \
({ union { unsigned long long int __ll; \
unsigned long int __l[2]; } __v, __r; \
@@ -59,5 +60,3 @@
__r.__l[1] = __bswap_32 (__v.__l[0]); \
__r.__ll; })
#endif
-
-#endif /* bits/byteswap.h */
diff --git a/sysdeps/m68k/bits/endian.h b/sysdeps/m68k/bits/endian.h
index 6f98529..bf4ecb6 100644
--- a/sysdeps/m68k/bits/endian.h
+++ b/sysdeps/m68k/bits/endian.h
@@ -1,3 +1,7 @@
/* m68k is big-endian. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 96240f0..2991232 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,5 +1,9 @@
/* Define the machine-dependent type `jmp_buf'. m68k version. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
typedef struct
{
/* There are eight 4-byte data registers, but D0 is not saved. */
@@ -7,10 +11,10 @@ typedef struct
/* There are six 4-byte address registers, plus the FP and SP. */
int *__aregs[6];
- int * __fp;
- int * __sp;
+ int *__fp;
+ int *__sp;
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+#if defined __HAVE_68881__ || defined __HAVE_FPU__
/* There are eight floating point registers which
are saved in IEEE 96-bit extended format. */
char __fpregs[8 * (96 / 8)];
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
index ce071b9..a11e072 100644
--- a/sysdeps/m68k/fpu/bits/fenv.h
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _FENV_H
-#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
#endif
diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
index 3b17a4a..a2c8163 100644
--- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
index f450125..f0b4ff7 100644
--- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h
index 64a57ab..910618e 100644
--- a/sysdeps/mach/hurd/mips/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h
@@ -16,6 +16,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index 636da56..c105537 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -17,8 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _BITS_DLFCN_H
-#define _BITS_DLFCN_H 1
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x001 /* Lazy function call binding. */
@@ -33,10 +34,9 @@
__BEGIN_DECLS
/* Some SGI specific calls that aren't implemented yet. */
-extern void *sgidladd __P ((const char *, int));
-extern void *sgidlopen_version __P ((const char *, int, const char *, int));
-extern char *sgigetdsoversion __P ((const char *));
+extern void *sgidladd __P ((__const char *, int));
+extern void *sgidlopen_version __P ((__const char *, int, __const char *,
+ int));
+extern char *sgigetdsoversion __P ((__const char *));
__END_DECLS
-
-#endif /* bits/dlfcn.h */
diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h
index ba555cd..40321a2 100644
--- a/sysdeps/mips/bits/endian.h
+++ b/sysdeps/mips/bits/endian.h
@@ -1,4 +1,8 @@
/* The MIPS architecture has selectable endianness.
This file is for a machine using big-endian mode. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 7e570c6..ff3d75f 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,6 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,6 +16,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
typedef struct
{
/* Program counter. */
diff --git a/sysdeps/mips/dec/bits/endian.h b/sysdeps/mips/dec/bits/endian.h
index 157bc44..0bdb378 100644
--- a/sysdeps/mips/dec/bits/endian.h
+++ b/sysdeps/mips/dec/bits/endian.h
@@ -1,4 +1,8 @@
/* The MIPS architecture has selectable endianness.
The DECstation uses little-endian mode. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h
index b108540..9f08f4e 100644
--- a/sysdeps/mips/mips64/bits/setjmp.h
+++ b/sysdeps/mips/mips64/bits/setjmp.h
@@ -1,7 +1,6 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
typedef struct
{
/* Program counter. */
diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h
index 5da5965..2241190 100644
--- a/sysdeps/mips/mipsel/bits/endian.h
+++ b/sysdeps/mips/mipsel/bits/endian.h
@@ -1,4 +1,8 @@
/* The MIPS architecture has selectable endianness.
This file is for a machine using little-endian mode. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h
index e4b0119..f6cdde2 100644
--- a/sysdeps/mips/p40/bits/endian.h
+++ b/sysdeps/mips/p40/bits/endian.h
@@ -1,4 +1,8 @@
/* The MIPS has selectable endianness.
The Japanese homebrew P40 architecture uses big-endian mode. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
index ab0fa48..7084b4e 100644
--- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
#include <bits/types.h>
@@ -76,5 +72,3 @@ struct stat
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h
index 56e28a0..6bf0307 100644
--- a/sysdeps/unix/bsd/osf/bits/sigaction.h
+++ b/sysdeps/unix/bsd/osf/bits/sigaction.h
@@ -18,6 +18,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
index 61481cc..f637efa 100644
--- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
struct sigcontext
{
int sc_onstack;
diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
index e1cdd41..29d2d87 100644
--- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
struct sigcontext
{
int sc_onstack;
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
index f51262d..6978c87 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
subset of these kinds of resource limit. In systems where `getrlimit'
and `setrlimit' are not system calls, these are the values used by the C
@@ -110,7 +114,8 @@ enum __rusage_who
#define RUSAGE_CHILDREN RUSAGE_CHILDREN
};
-#include <sys/time.h> /* For `struct timeval'. */
+#define __need_timeval
+#include <bits/time.h> /* For `struct timeval'. */
/* Structure which says how much of each resource has been used. */
struct rusage
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
index dc0a007..15aaab7 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. SunOS 4 version.
- Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
+
/* Type of terminal control flag masks. */
typedef unsigned long int tcflag_t;
@@ -41,51 +45,51 @@ struct termios
#define IGNCR 0x0080 /* Ignore CR. */
#define ICRNL 0x0100 /* Map CR to NL on input. */
#ifdef __USE_BSD
-#define IUCLC 0x0200 /* Map upper case to lower case on input. */
+# define IUCLC 0x0200 /* Map upper case to lower case on input. */
#endif
#define IXON 0x0400 /* Enable start/stop output control. */
#define IXOFF 0x1000 /* Enable start/stop input control. */
#ifdef __USE_BSD
-#define IXANY 0x0800 /* Any character will restart after stop. */
-#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */
+# define IXANY 0x0800 /* Any character will restart after stop. */
+# define IMAXBEL 0x2000 /* Ring bell when input queue is full. */
#endif
/* Output modes. */
tcflag_t c_oflag;
#define OPOST 0x0001 /* Perform output processing. */
#ifdef __USE_BSD
-#define OLCUC 0x00000002 /* Map lower case to upper case on output. */
-#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */
-#define OCRNL 0x00000008
-#define ONOCR 0x00000010
-#define ONLRET 0x00000020
-#define OFILL 0x00000040
-#define OFDEL 0x00000080
-#define NLDLY 0x00000100
-#define NL0 0
-#define NL1 0x00000100
-#define CRDLY 0x00000600
-#define CR0 0
-#define CR1 0x00000200
-#define CR2 0x00000400
-#define CR3 0x00000600
-#define TABDLY 0x00001800
-#define TAB0 0
-#define TAB1 0x00000800
-#define TAB2 0x00001000
-#define XTABS 0x00001800
-#define TAB3 XTABS
-#define BSDLY 0x00002000
-#define BS0 0
-#define BS1 0x00002000
-#define VTDLY 0x00004000
-#define VT0 0
-#define VT1 0x00004000
-#define FFDLY 0x00008000
-#define FF0 0
-#define FF1 0x00008000
-#define PAGEOUT 0x00010000
-#define WRAP 0x00020000
+# define OLCUC 0x00000002 /* Map lower case to upper case on output. */
+# define ONLCR 0x00000004 /* Map NL to CR-NL on output. */
+# define OCRNL 0x00000008
+# define ONOCR 0x00000010
+# define ONLRET 0x00000020
+# define OFILL 0x00000040
+# define OFDEL 0x00000080
+# define NLDLY 0x00000100
+# define NL0 0
+# define NL1 0x00000100
+# define CRDLY 0x00000600
+# define CR0 0
+# define CR1 0x00000200
+# define CR2 0x00000400
+# define CR3 0x00000600
+# define TABDLY 0x00001800
+# define TAB0 0
+# define TAB1 0x00000800
+# define TAB2 0x00001000
+# define XTABS 0x00001800
+# define TAB3 XTABS
+# define BSDLY 0x00002000
+# define BS0 0
+# define BS1 0x00002000
+# define VTDLY 0x00004000
+# define VT0 0
+# define VT1 0x00004000
+# define FFDLY 0x00008000
+# define FF0 0
+# define FF1 0x00008000
+# define PAGEOUT 0x00010000
+# define WRAP 0x00020000
#endif
/* Control modes. */
@@ -102,11 +106,11 @@ struct termios
#define HUPCL 0x00000400 /* Hang up on last close. */
#define CLOCAL 0x00000800 /* Ignore modem status lines. */
#ifdef __USE_BSD
-#define LOBLK 0x00001000
-#define CRTSCTS 0x80000000
-#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */
-#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */
-#define IBSHIFT 16 /* Bits to shift for input speed. */
+# define LOBLK 0x00001000
+# define CRTSCTS 0x80000000
+# define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */
+# define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */
+# define IBSHIFT 16 /* Bits to shift for input speed. */
#endif
/* Input and output baud rates. These are encoded in c_cflag. */
@@ -127,29 +131,29 @@ struct termios
#define B19200 14
#define B38400 15
#ifdef __USE_BSD
-#define EXTA 14
-#define EXTB 15
+# define EXTA 14
+# define EXTB 15
#endif
/* Local modes. */
tcflag_t c_lflag;
#ifdef __USE_BSD
-#define ECHOKE 0x00000800 /* Visual erase for KILL. */
+# define ECHOKE 0x00000800 /* Visual erase for KILL. */
#endif
#define ECHOE 0x00000010 /* Visual erase for ERASE. */
#define ECHOK 0x00000020 /* Echo NL after KILL. */
#define ECHO 0x00000008 /* Enable echo. */
#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */
#ifdef __USE_BSD
-#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */
-#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */
+# define ECHOPRT 0x00000400 /* Hardcopy visual erase. */
+# define ECHOCTL 0x00000200 /* Echo control characters as ^X. */
#endif
#define ISIG 0x00000001 /* Enable signals. */
#define ICANON 0x00000002 /* Do erase and kill processing. */
#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */
#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */
#ifdef __USE_BSD
-#define PENDIN 0x00004000 /* Retype pending input (state). */
+# define PENDIN 0x00004000 /* Retype pending input (state). */
#endif
#define NOFLSH 0x00000080 /* Disable flush after interrupt. */
@@ -159,28 +163,28 @@ struct termios
#define VEOF 4 /* End-of-file character [ICANON]. */
#define VEOL 5 /* End-of-line character [ICANON]. */
#ifdef __USE_BSD
-#define VEOL2 6 /* Second EOL character [ICANON]. */
-#define VSWTCH 7 /* ??? */
+# define VEOL2 6 /* Second EOL character [ICANON]. */
+# define VSWTCH 7 /* ??? */
#endif
#define VERASE 2 /* Erase character [ICANON]. */
#ifdef __USE_BSD
-#define VWERASE 14 /* Word-erase character [ICANON]. */
+# define VWERASE 14 /* Word-erase character [ICANON]. */
#endif
#define VKILL 3 /* Kill-line character [ICANON]. */
#ifdef __USE_BSD
-#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+# define VREPRINT 12 /* Reprint-line character [ICANON]. */
#endif
#define VINTR 0 /* Interrupt character [ISIG]. */
#define VQUIT 1 /* Quit character [ISIG]. */
#define VSUSP 10 /* Suspend character [ISIG]. */
#ifdef __USE_BSD
-#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+# define VDSUSP 11 /* Delayed suspend character [ISIG]. */
#endif
#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
#ifdef __USE_BSD
-#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
-#define VDISCARD 13 /* Discard character [IEXTEN]. */
+# define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+# define VDISCARD 13 /* Discard character [IEXTEN]. */
#endif
#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */
#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
index e9111b6..5a03bab 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
@@ -1,2 +1,24 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
#define _UTSNAME_LENGTH 9
#define _UTSNAME_NODENAME_LENGTH 65
diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
index ad4389a..a9f36ab 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/utsname.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
@@ -1 +1,23 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
#define _UTSNAME_LENGTH 32
diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
index 72b29e5..cb66517 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,6 +16,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
/* Note that ANY change to this instantly implies a change to __handler.S. */
struct sigcontext
diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h
index c185f22..89fca07 100644
--- a/sysdeps/unix/sysv/irix4/bits/confname.h
+++ b/sysdeps/unix/sysv/irix4/bits/confname.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
enum
{
diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h
index 0dab45c..633f261 100644
--- a/sysdeps/unix/sysv/irix4/bits/stat.h
+++ b/sysdeps/unix/sysv/irix4/bits/stat.h
@@ -16,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
struct stat
{
@@ -61,5 +58,3 @@ struct stat
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
index 8a14f99..dcbf9f4 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -16,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTLS_H
-#define _BITS_IOCTLS_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
+#endif
/* Use the definitions from the kernel header files. */
#include <asm/ioctls.h>
@@ -39,5 +36,3 @@
#define TCSETSF _IOW ('t', 22, struct __kernel_termios)
#include <linux/sockios.h>
-
-#endif /* bits/ioctls.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
index 57830da..ec116f6 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,10 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_IPC_BUF_H
-
-#define _SYS_IPC_BUF_H 1
-#include <features.h>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
#include <sys/types.h>
@@ -35,9 +33,6 @@
#define IPC_STAT 2 /* Get `ipc_perm' options. */
#define IPC_INFO 3 /* See ipcs. */
-
-__BEGIN_DECLS
-
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
@@ -63,10 +58,14 @@ struct ipc_kludge
long int msgtyp;
};
+__BEGIN_DECLS
+
/* The actual system call: all functions are multiplexed by this. */
extern int __ipc __P ((int __call, int __first, int __second, int __third,
void *__ptr));
+__END_DECLS
+
/* The codes for the functions to use the multiplexer `__ipc'. */
#define IPCOP_semop 1
#define IPCOP_semget 2
@@ -79,7 +78,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third,
#define IPCOP_shmdt 22
#define IPCOP_shmget 23
#define IPCOP_shmctl 24
-
-__END_DECLS
-
-#endif /* _SYS_IPC_BUF_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
index 1bef0cb..081a004 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface. Linux/Alpha version.
+/* Definitions for POSIX memory map interface. Linux/Alpha version.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
-# error "Never include this file directly. Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* The following definitions basically come from the kernel headers.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index f28b6f2..274531f 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index de8752e..319ff96 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -16,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_KERNEL 0
@@ -112,5 +109,3 @@ struct stat64
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
index d0932c1..0d57c48 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -17,8 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _TERMBITS_H
-#define _TERMBITS_H 1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
typedef unsigned char cc_t;
typedef unsigned int speed_t;
@@ -189,5 +190,3 @@ struct termios
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* _TERMBITS_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
index 7475b68..d32f4d3 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/time.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -21,23 +21,9 @@
* Never include this file directly; use <time.h> instead.
*/
-#ifdef __need_timeval
-# undef __need_timeval
-# ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-/* A time value that is accurate to the nearest
- microsecond but also has a range of years. */
-struct timeval
- {
- int tv_sec; /* Seconds. */
- int tv_usec; /* Microseconds. */
- };
-# endif /* struct timeval */
-#endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H 1
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+# define _BITS_TIME_H 1
/* ISO/IEC 9899:1990 7.12.1: <time.h>
The macro `CLOCKS_PER_SEC' is the number per second of the value
@@ -45,10 +31,23 @@ struct timeval
/* CAE XSH, Issue 4, Version 2: <time.h>
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000
+# define CLOCKS_PER_SEC 1000000
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 1024
+# define CLK_TCK 1024
-#endif /* bits/time.h */
+# endif /* bits/time.h */
+#endif /* !__need_timeval */
+
+
+#ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ int tv_sec; /* Seconds. */
+ int tv_usec; /* Microseconds. */
+ };
+#endif /* struct timeval */
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index d6c29d2..bca1dae 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface. Linux/m68k version.
+/* Definitions for POSIX memory map interface. Linux/m68k version.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
-# error "Never include this file directly. Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* The following definitions basically come from the kernel headers.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
index 8fea439..2d4e6f6 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -16,6 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
/* Event types that can be polled for. These bits may be set in `events'
to indicate the interesting event types; they will appear in `revents'
diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/sysdeps/unix/sysv/linux/mips/bits/endian.h
index 9f60758..0a3d2fa 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/endian.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/endian.h
@@ -3,10 +3,14 @@
want to be able to share the installed headerfiles between both,
so we define __BYTE_ORDER based on GCC's predefines. */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#ifdef __MIPSEB__
-#define __BYTE_ORDER __BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
#else
-#ifdef __MIPSEL__
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#endif
+# ifdef __MIPSEL__
+# define __BYTE_ORDER __LITTLE_ENDIAN
+# endif
#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
index 486022e..4f5c2b0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -17,12 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/ioctl.h> instead.
- */
-
-#ifndef _BITS_IOCTL_TYPES_H
-#define _BITS_IOCTL_TYPES_H 1
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
/* Get definition of constants for use with `ioctl'. */
#include <asm/ioctls.h>
@@ -67,5 +64,3 @@ struct termio
#define N_PPP 3
#define N_STRIP 4
#define N_AX25 5
-
-#endif /* bits/ioctl-types.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
index c5a3cd0..2841e6a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/ipc.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,10 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_IPC_BUF_H
-
-#define _SYS_IPC_BUF_H 1
-#include <features.h>
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
+#endif
#include <sys/types.h>
@@ -36,8 +34,6 @@
#define IPC_INFO 3 /* See ipcs. */
-__BEGIN_DECLS
-
/* Special key values. */
#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
@@ -46,11 +42,11 @@ __BEGIN_DECLS
struct ipc_perm
{
__key_t __key; /* Key. */
- long uid; /* Owner's user ID. */
- long gid; /* Owner's group ID. */
- long cuid; /* Creator's user ID. */
- long cgid; /* Creator's group ID. */
- unsigned long mode; /* Read/write permission. */
+ long int uid; /* Owner's user ID. */
+ long int gid; /* Owner's group ID. */
+ long int cuid; /* Creator's user ID. */
+ long int cgid; /* Creator's group ID. */
+ unsigned long int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
};
@@ -63,10 +59,14 @@ struct ipc_kludge
long int msgtyp;
};
+__BEGIN_DECLS
+
/* The actual system call: all functions are multiplexed by this. */
extern int __ipc __P ((int __call, int __first, int __second, int __third,
void *__ptr));
+__END_DECLS
+
/* The codes for the functions to use the multiplexer `__ipc'. */
#define IPCOP_semop 1
#define IPCOP_semget 2
@@ -79,7 +79,3 @@ extern int __ipc __P ((int __call, int __first, int __second, int __third,
#define IPCOP_shmdt 22
#define IPCOP_shmget 23
#define IPCOP_shmctl 24
-
-__END_DECLS
-
-#endif /* bits/ipc_buf.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index 15a343f..be460ab 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,4 +1,4 @@
-/* Definitions for POSIX memory map inerface. Linux/PowerPC version.
+/* Definitions for POSIX memory map interface. Linux/PowerPC version.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
-# error "Never include this file directly. Use <sys/mman.h> instead"
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
/* The following definitions basically come from the kernel headers.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
index c1c9a6b..9b7826a 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/poll.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -16,6 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
/* Event types that can be polled for. These bits may be set in `events'
to indicate the interesting event types; they will appear in `revents'
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
index 9d4b20b..20e75e0 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,10 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_SHM_BUF_H
-
-#define _SYS_SHM_BUF_H 1
-#include <features.h>
+#ifndef _SYS_SHM_H
+# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
+#endif
#include <sys/types.h>
@@ -38,55 +36,49 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
-__BEGIN_DECLS
-
/* Data structure describing a set of semaphores. */
struct shmid_ds
-{
- struct ipc_perm shm_perm; /* operation permission struct */
- int shm_segsz; /* size of segment in bytes */
- __time_t shm_atime; /* time of last shmat() */
- __time_t shm_dtime; /* time of last shmdt() */
- __time_t shm_ctime; /* time of last change by shmctl() */
- long shm_cpid; /* pid of creator */
- long shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
- unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__attaches; /* descriptors for attaches */
-};
+ {
+ struct ipc_perm shm_perm; /* operation permission struct */
+ int shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ long int shm_cpid; /* pid of creator */
+ long int shm_lpid; /* pid of last shmop */
+ unsigned short int shm_nattch; /* number of current attaches */
+ unsigned short int __shm_npages; /* size of segment (pages) */
+ unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__attaches; /* descriptors for attaches */
+ };
#ifdef __USE_MISC
/* ipcs ctl commands */
-#define SHM_STAT 13
-#define SHM_INFO 14
+# define SHM_STAT 13
+# define SHM_INFO 14
/* shm_mode upper byte flags */
-#define SHM_DEST 01000 /* segment will be destroyed on last detach */
-#define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
struct shminfo
-{
- int shmmax;
- int shmmin;
- int shmmni;
- int shmseg;
- int shmall;
-};
+ {
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+ };
struct shm_info
-{
- int used_ids;
- ulong shm_tot; /* total allocated shm */
- ulong shm_rss; /* total resident shm */
- ulong shm_swp; /* total swapped shm */
- ulong swap_attempts;
- ulong swap_successes;
-};
+ {
+ int used_ids;
+ ulong shm_tot; /* total allocated shm */
+ ulong shm_rss; /* total resident shm */
+ ulong shm_swp; /* total swapped shm */
+ ulong swap_attempts;
+ ulong swap_successes;
+ };
#endif /* __USE_MISC */
-
-__END_DECLS
-
-#endif /* bits/shm_buf.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index d6f70f2..71ca884 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
@@ -33,7 +37,7 @@ struct sigaction
/* Restore handler. */
void (*sa_restorer) __P ((void));
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+#if _MIPS_ISA == _MIPS_ISA_MIPS1 || _MIPS_ISA == _MIPS_ISA_MIPS2
int sa_resv[1];
#endif
};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 02f1d22..f56f626 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -17,19 +17,14 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifndef _SYS_SOCKET_H
-#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#ifndef _SYS_STAT_H
+# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
#endif
-
-#include <features.h>
-
#define __need_size_t
#define __need_NULL
#include <stddef.h>
-__BEGIN_DECLS
-
/* Type for length arguments in socket calls. */
typedef unsigned int socklen_t;
@@ -173,5 +168,3 @@ struct linger
int l_onoff; /* Nonzero to linger on close. */
int l_linger; /* Time to linger. */
};
-
-__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index f27a75e..cd586d4 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -16,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
/* Versions of the `struct stat' data structure. */
#define _STAT_VER_LINUX_OLD 1
@@ -140,5 +137,3 @@ struct stat64
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
index 2727b27..36d9996 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -16,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/statfs.h> instead.
- */
-
-#ifndef _BITS_STATFS_H
-#define _BITS_STATFS_H
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
@@ -70,5 +67,3 @@ struct statfs64
long int f_spare[6];
};
#endif
-
-#endif /* bits/statfs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
index c8a2469..de21ee1 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/termios.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -17,20 +17,16 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <termios.h> instead.
- */
-
-
-#ifndef _BITS_TERMIOS_H
-#define _BITS_TERMIOS_H 1
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios.h> directly; use <termios.h> instead."
+#endif
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
-#if defined __USE_BSD
+#ifdef __USE_BSD
struct sgttyb
{
@@ -83,10 +79,10 @@ struct termios
#define VKILL 3 /* Kill-line character [ICANON]. */
#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
-#if defined (__USE_BSD)
-#define VEOL2 6 /* Second EOL character [ICANON]. */
+#ifdef __USE_BSD
+# define VEOL2 6 /* Second EOL character [ICANON]. */
/* The next two are guesses ... */
-#define VSWTC 7 /* ??? */
+# define VSWTC 7 /* ??? */
#endif
#define VSWTCH VSWTC
#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
@@ -96,17 +92,17 @@ struct termios
/*
* VDSUSP is not supported
*/
-#if defined (__USE_BSD)
+#if defined __USE_BSD
#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
#endif
#endif
-#if defined (__USE_BSD)
-#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#ifdef __USE_BSD
+# define VREPRINT 12 /* Reprint-line character [ICANON]. */
#endif
-#if defined (__USE_BSD)
-#define VDISCARD 13 /* Discard character [IEXTEN]. */
-#define VWERASE 14 /* Word-erase character [ICANON]. */
-#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#ifdef __USE_BSD
+# define VDISCARD 13 /* Discard character [IEXTEN]. */
+# define VWERASE 14 /* Word-erase character [ICANON]. */
+# define VLNEXT 15 /* Literal-next character [IEXTEN]. */
#endif
#define VEOF 16 /* End-of-file character [ICANON]. */
#define VEOL 17 /* End-of-line character [ICANON]. */
@@ -121,51 +117,51 @@ struct termios
#define INLCR 0000100 /* Map NL to CR on input. */
#define IGNCR 0000200 /* Ignore CR. */
#define ICRNL 0000400 /* Map CR to NL on input. */
-#if defined (__USE_BSD)
-#define IUCLC 0001000 /* Map upper case to lower case on input. */
+#ifdef __USE_BSD
+# define IUCLC 0001000 /* Map upper case to lower case on input. */
#endif
#define IXON 0002000 /* Enable start/stop output control. */
-#if defined (__USE_BSD)
-#define IXANY 0004000 /* Any character will restart after stop. */
+#ifdef __USE_BSD
+# define IXANY 0004000 /* Any character will restart after stop. */
#endif
#define IXOFF 0010000 /* Enable start/stop input control. */
-#if defined (__USE_BSD)
-#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
+#ifdef __USE_BSD
+# define IMAXBEL 0020000 /* Ring bell when input queue is full. */
#endif
/* c_oflag bits */
#define OPOST 0000001 /* Perform output processing. */
-#if defined (__USE_BSD)
-#define OLCUC 0000002 /* Map lower case to upper case on output. */
-#define ONLCR 0000004 /* Map NL to CR-NL on output. */
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-#define OFILL 0000100
-#define OFDEL 0000200
-#define NLDLY 0000400
-#define NL0 0000000
-#define NL1 0000400
-#define CRDLY 0003000
-#define CR0 0000000
-#define CR1 0001000
-#define CR2 0002000
-#define CR3 0003000
-#define TABDLY 0014000
-#define TAB0 0000000
-#define TAB1 0004000
-#define TAB2 0010000
-#define TAB3 0014000
-#define XTABS 0014000
-#define BSDLY 0020000
-#define BS0 0000000
-#define BS1 0020000
-#define VTDLY 0040000
-#define VT0 0000000
-#define VT1 0040000
-#define FFDLY 0100000
-#define FF0 0000000
-#define FF1 0100000
+#ifdef __USE_BSD
+# define OLCUC 0000002 /* Map lower case to upper case on output. */
+# define ONLCR 0000004 /* Map NL to CR-NL on output. */
+# define OCRNL 0000010
+# define ONOCR 0000020
+# define ONLRET 0000040
+# define OFILL 0000100
+# define OFDEL 0000200
+# define NLDLY 0000400
+# define NL0 0000000
+# define NL1 0000400
+# define CRDLY 0003000
+# define CR0 0000000
+# define CR1 0001000
+# define CR2 0002000
+# define CR3 0003000
+# define TABDLY 0014000
+# define TAB0 0000000
+# define TAB1 0004000
+# define TAB2 0010000
+# define TAB3 0014000
+# define XTABS 0014000
+# define BSDLY 0020000
+# define BS0 0000000
+# define BS1 0020000
+# define VTDLY 0040000
+# define VT0 0000000
+# define VT1 0040000
+# define FFDLY 0100000
+# define FF0 0000000
+# define FF1 0100000
/*
#define PAGEOUT ???
#define WRAP ???
@@ -203,14 +199,14 @@ struct termios
#define PARODD 0001000 /* Odd parity instead of even. */
#define HUPCL 0002000 /* Hang up on last close. */
#define CLOCAL 0004000 /* Ignore modem status lines. */
-#if defined (__USE_BSD)
-#define CBAUDEX 0010000
-#define B57600 0010001
-#define B115200 0010002
-#define B230400 0010003
-#define B460800 0010004
-#define CIBAUD 002003600000 /* input baud rate (not used) */
-#define CRTSCTS 020000000000 /* flow control */
+#ifdef __USE_BSD
+# define CBAUDEX 0010000
+# define B57600 0010001
+# define B115200 0010002
+# define B230400 0010003
+# define B460800 0010004
+# define CIBAUD 002003600000 /* input baud rate (not used) */
+# define CRTSCTS 020000000000 /* flow control */
#endif
/* c_lflag bits */
@@ -223,14 +219,14 @@ struct termios
#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
#define NOFLSH 0000200 /* Disable flush after interrupt. */
#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
-#if defined (__USE_BSD)
-#define ECHOCTL 0001000 /* Echo control characters as ^X. */
-#define ECHOPRT 0002000 /* Hardcopy visual erase. */
-#define ECHOKE 0004000 /* Visual erase for KILL. */
+#ifdef __USE_BSD
+# define ECHOCTL 0001000 /* Echo control characters as ^X. */
+# define ECHOPRT 0002000 /* Hardcopy visual erase. */
+# define ECHOKE 0004000 /* Visual erase for KILL. */
#endif
#define FLUSHO 0020000
-#if defined (__USE_BSD)
-#define PENDIN 0040000 /* Retype pending input (state). */
+#ifdef __USE_BSD
+# define PENDIN 0040000 /* Retype pending input (state). */
#endif
#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
#define ITOSTOP TOSTOP
@@ -256,5 +252,3 @@ struct termios
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* bits/termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h
index 5fcef0f..a7b268d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/time.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/time.h
@@ -21,23 +21,9 @@
* Never include this file directly; use <time.h> instead.
*/
-#ifdef __need_timeval
-# undef __need_timeval
-# ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-/* A time value that is accurate to the nearest
- microsecond but also has a range of years. */
-struct timeval
- {
- long tv_sec; /* Seconds. */
- long tv_usec; /* Microseconds. */
- };
-# endif /* struct timeval */
-#endif /* need timeval */
-
-
-#ifndef _BITS_TIME_H
-#define _BITS_TIME_H 1
+#ifndef __need_timeval
+# ifndef _BITS_TIME_H
+# define _BITS_TIME_H 1
/* ISO/IEC 9899:1990 7.12.1: <time.h>
The macro `CLOCKS_PER_SEC' is the number per second of the value
@@ -45,10 +31,22 @@ struct timeval
/* CAE XSH, Issue 4, Version 2: <time.h>
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000
+# define CLOCKS_PER_SEC 1000000
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 100 /* XXX not correct for all systems. */
+# define CLK_TCK 100 /* XXX not correct for all systems. */
-#endif /* bits/time.h */
+# endif /* bits/time.h */
+#endif
+
+#ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ long int tv_sec; /* Seconds. */
+ long int tv_usec; /* Microseconds. */
+ };
+#endif /* struct timeval */
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
index 732befc..96f14d1 100644
--- a/sysdeps/unix/sysv/minix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -16,6 +16,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
index 3af9377..3c549dd 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _UNISTD_H
+# error "Never use <bits/confname.h> directly; include <unistd.h> instead."
+#endif
+
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
#define _PC_LINK_MAX 0
#define _PC_MAX_CANON 1
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
index f66877d..eaa52be 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
index ce3ab5e..07d5554 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -17,6 +17,10 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h
index 9dcc618..bf2c0a8 100644
--- a/sysdeps/unix/sysv/sysv4/bits/utsname.h
+++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h
@@ -1 +1,23 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _UTSNAME_H
+# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
+#endif
+
#define _UTSNAME_LENGTH 257
diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
index 29ff566..e99dc00 100644
--- a/sysdeps/unix/sysv/sysv4/bits/waitflags.h
+++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
@@ -19,7 +19,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _SYS_WAIT_H
-#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
#endif
@@ -28,7 +28,7 @@
#define WUNTRACED 4 /* Report status of stopped children. */
#ifdef __USE_SVID
-#define WEXITED 1 /* Look for children that have exited. */
-#define WTRAPPED 2 /* Look for processes that stopped
+# define WEXITED 1 /* Look for children that have exited. */
+# define WTRAPPED 2 /* Look for processes that stopped
while tracing. */
#endif
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
index f3f4473..104ad2f 100644
--- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
#include <bits/types.h>
@@ -34,37 +30,37 @@
/* Structure describing file characteristics. */
struct stat
{
- unsigned long st_dev; /* Device. */
- long st_filler1[3];
- unsigned long st_ino; /* File serial number. */
- unsigned long st_mode; /* File mode. */
- unsigned long st_nlink; /* Link count. */
- long st_uid; /* User ID of the file's owner. */
- long st_gid; /* Group ID of the file's group.*/
- unsigned long st_rdev; /* Device number, if device. */
- long st_filler2[2];
-
- long st_size; /* Size of file, in bytes. */
+ unsigned long itn st_dev; /* Device. */
+ long int st_filler1[3];
+ unsigned long int st_ino; /* File serial number. */
+ unsigned long int st_mode; /* File mode. */
+ unsigned long int st_nlink; /* Link count. */
+ long int st_uid; /* User ID of the file's owner. */
+ long int st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long int st_filler2[2];
+
+ long int st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
- long st_filler3;
+ long int st_filler3;
- long st_atime; /* Time of last access. */
- unsigned long st_atime_usec;
- long st_mtime; /* Time of last modification. */
- unsigned long st_mtime_usec;
- long st_ctime; /* Time of last status change. */
- unsigned long st_ctime_usec;
+ long int st_atime; /* Time of last access. */
+ unsigned long int st_atime_usec;
+ long int st_mtime; /* Time of last modification. */
+ unsigned long int st_mtime_usec;
+ long int st_ctime; /* Time of last status change. */
+ unsigned long int st_ctime_usec;
- long st_blksize; /* Optimal block size for I/O. */
+ long int st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
char st_fstype[16]; /* The type of this filesystem. */
int st_aclcnt;
- unsigned long st_level;
- unsigned long st_flags;
- unsigned long st_cmwlevel;
- long st_filler4[4];
+ unsigned long int st_level;
+ unsigned long int st_flags;
+ unsigned long int st_cmwlevel;
+ long int st_filler4[4];
};
/* Encoding of the file mode. */
@@ -90,5 +86,3 @@ struct stat
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index 82ab37f..c6048a9 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -1,6 +1,5 @@
/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,12 +16,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/*
- * Never include this file directly; use <sys/stat.h> instead.
- */
-
-#ifndef _BITS_STAT_H
-#define _BITS_STAT_H 1
+#ifndef _SYS_STAT_H
+# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
+#endif
#include <bits/types.h>
@@ -30,7 +26,7 @@
struct stat
{
unsigned long int st_dev;
- long st_filler1[3];
+ long int st_filler1[3];
__ino_t st_ino; /* File serial number. */
unsigned long int st_mode; /* File mode. */
/* This is unsigned long instead of __nlink_t, since SVR4 has
@@ -39,11 +35,11 @@ struct stat
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
- long st_filler2[2];
+ long int st_filler2[2];
__off_t st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
- long st_filler3;
+ long int st_filler3;
__time_t st_atime; /* Time of last access. */
unsigned long int st_atime_usec;
@@ -55,9 +51,9 @@ struct stat
__blkcnt_t st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- long st_blocks; /* Number of 512-byte blocks allocated. */
+ long int st_blocks; /* Number of 512-byte blocks allocated. */
char st_fstype[16];
- long st_filler4[8];
+ long int st_filler4[8];
};
/* Encoding of the file mode. */
@@ -83,5 +79,3 @@ struct stat
#define __S_IREAD 0400 /* Read by owner. */
#define __S_IWRITE 0200 /* Write by owner. */
#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
index 7402704..29d2d87 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
@@ -1 +1,34 @@
-#include <sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h>
+/* Structure describing state saved while handling a signal. Sparc version.
+ Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGNAL_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+struct sigcontext
+ {
+ int sc_onstack;
+ __sigset_t sc_mask;
+
+#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
+ int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
+ int sc_wbcnt; /* Number of outstanding windows. */
+ __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
+ int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
+ };
diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h
index f323049..74930be 100644
--- a/sysdeps/vax/bits/huge_val.h
+++ b/sysdeps/vax/bits/huge_val.h
@@ -1,6 +1,6 @@
/* `HUGE_VAL' constant for Vaxen.
Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _MATH_H
-#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
#endif
diff --git a/sysdeps/vax/bits/setjmp.h b/sysdeps/vax/bits/setjmp.h
index 7adecd9..10ca170 100644
--- a/sysdeps/vax/bits/setjmp.h
+++ b/sysdeps/vax/bits/setjmp.h
@@ -1,5 +1,9 @@
/* Define the machine-dependent type `jmp_buf'. Vax version. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
typedef struct
{
PTR __fp;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e00fbfc6aaa694a5a5aad59801779b161b556cf3
commit e00fbfc6aaa694a5a5aad59801779b161b556cf3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 22 18:47:44 1997 +0000
Define optimizations if __LIBC_INTERNAL_MATH_INLINES is defined.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index c3ed76c..827a8d6 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -70,22 +70,22 @@
#if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \
- || defined __LIBC_M81_MATH_INLINES
+ || defined __LIBC_INTERNAL_MATH_INLINES
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
__ names, and with `static inline' instead of `extern inline' so the
bodies will always be used, never an external function call. */
-#define __m81_u(x) __CONCAT(__,x)
-#define __m81_inline static __inline
+# define __m81_u(x) __CONCAT(__,x)
+# define __m81_inline static __inline
#else
-#define __m81_u(x) x
-#ifdef __cplusplus
-#define __m81_inline __inline
-#else
-#define __m81_inline extern __inline
-#endif
-#define __M81_MATH_INLINES 1
+# define __m81_u(x) x
+# ifdef __cplusplus
+# define __m81_inline __inline
+# else
+# define __m81_inline extern __inline
+# endif
+# define __M81_MATH_INLINES 1
#endif
/* Define a const math function. */
@@ -99,12 +99,12 @@
is the name of the fpu operation (without leading f). */
#if defined __USE_MISC || defined __USE_ISOC9X
-#define __inline_mathop(func, op) \
+# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
__inline_mathop1(long double, __CONCAT(func,l), op)
#else
-#define __inline_mathop(func, op) \
+# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op)
#endif
@@ -116,7 +116,7 @@
return __result; \
}
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
/* ieee style elementary functions */
/* These are internal to the implementation of libm. */
__inline_mathop(__ieee754_acos, acos)
@@ -154,21 +154,21 @@ __inline_mathop(sin, sin)
__inline_mathop(tan, tan)
__inline_mathop(tanh, tanh)
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
-#endif
+# endif
-#ifdef __USE_MISC
+# ifdef __USE_MISC
__inline_mathop(significand, getman)
-#endif
+# endif
-#ifdef __USE_ISOC9X
+# ifdef __USE_ISOC9X
__inline_mathop(log2, log2)
__inline_mathop(exp2, twotox)
__inline_mathop(trunc, intrz)
-#endif
+# endif
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
@@ -176,9 +176,9 @@ __inline_mathop(trunc, intrz)
functions, using __FLOAT_TYPE as the domain type and __S as the suffix
for the function names. */
-#ifdef __LIBC_M81_MATH_INLINES
+#ifdef __LIBC_INTERNAL_MATH_INLINES
/* Internally used functions. */
-#define __internal_inline_functions(float_type, s) \
+# define __internal_inline_functions(float_type, s) \
__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \
(float_type __x, float_type __y)) \
{ \
@@ -198,7 +198,7 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
__internal_inline_functions (double,)
__internal_inline_functions (float,f)
__internal_inline_functions (long double,l)
-#undef __internal_inline_functions
+# undef __internal_inline_functions
/* Get the m68881 condition codes, to quickly check multiple conditions. */
static __inline__ unsigned long
@@ -210,12 +210,12 @@ __m81_test (long double __val)
}
/* Bit values returned by __m81_test. */
-#define __M81_COND_NAN (1 << 24)
-#define __M81_COND_INF (2 << 24)
-#define __M81_COND_ZERO (4 << 24)
-#define __M81_COND_NEG (8 << 24)
+# define __M81_COND_NAN (1 << 24)
+# define __M81_COND_INF (2 << 24)
+# define __M81_COND_ZERO (4 << 24)
+# define __M81_COND_NEG (8 << 24)
-#endif /* __LIBC_M81_MATH_INLINES */
+#endif /* __LIBC_INTENRAL_MATH_INLINES */
/* The rest of the functions are available to the user. */
@@ -374,14 +374,14 @@ __inline_functions (long double,l)
/* Note that there must be no whitespace before the argument passed for
NAME, to make token pasting work correctly with -traditional. */
-#define __inline_forward_c(rettype, name, args1, args2) \
+# define __inline_forward_c(rettype, name, args1, args2) \
extern __inline rettype __attribute__((__const__)) \
name args1 \
{ \
return __CONCAT(__,name) args2; \
}
-#define __inline_forward(rettype, name, args1, args2) \
+# define __inline_forward(rettype, name, args1, args2) \
extern __inline rettype name args1 \
{ \
return __CONCAT(__,name) args2; \
@@ -391,76 +391,76 @@ __inline_forward(double,frexp, (double __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
-#ifdef __USE_MISC
+# ifdef __USE_MISC
__inline_forward_c(int,isinf, (double __value), (__value))
__inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
-#endif
-#if defined __USE_MISC || defined __USE_XOPEN
-#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+# endif
+# if defined __USE_MISC || defined __USE_XOPEN
+# ifndef __USE_ISOC9X /* Conflict with macro of same name. */
__inline_forward_c(int,isnan, (double __value), (__value))
-#endif
-#endif
-#ifdef __USE_ISOC9X
+# endif
+# endif
+# ifdef __USE_ISOC9X
__inline_forward_c(double,nearbyint, (double __value), (__value))
__inline_forward_c(long int,lrint, (double __value), (__value))
__inline_forward_c(double,fma, (double __x, double __y, double __z),
(__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
(__x, __sinx, __cosx))
-#endif
+# endif
-#if defined __USE_MISC || defined __USE_ISOC9X
+# if defined __USE_MISC || defined __USE_ISOC9X
__inline_forward(float,frexpf, (float __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(float,floorf, (float __x), (__x))
__inline_forward_c(float,ceilf, (float __x), (__x))
-#ifdef __USE_MISC
+# ifdef __USE_MISC
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
+# endif
+# ifdef __USE_ISOC9X
__inline_forward_c(float,nearbyintf, (float __value), (__value))
__inline_forward_c(long int,lrintf, (float __value), (__value))
__inline_forward_c(float,fmaf, (float __x, float __y, float __z),
(__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
(__x, __sinx, __cosx))
-#endif
+# endif
__inline_forward(long double,frexpl, (long double __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(long double,floorl, (long double __x), (__x))
__inline_forward_c(long double,ceill, (long double __x), (__x))
-#ifdef __USE_MISC
+# ifdef __USE_MISC
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
+# endif
+# ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
__inline_forward_c(long int,lrintl, (long double __value), (__value))
__inline_forward_c(long double,fmal,
(long double __x, long double __y, long double __z),
(__x, __y, __z))
-#endif
-#ifdef __USE_GNU
+# endif
+# ifdef __USE_GNU
__inline_forward(void,sincosl,
(long double __x, long double *__sinx, long double *__cosx),
(__x, __sinx, __cosx))
-#endif
+# endif
#endif /* Use misc or ISO C9X */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e729bad58bfbda44b17745763789ca01c663206d
commit e729bad58bfbda44b17745763789ca01c663206d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 22 18:45:43 1997 +0000
Define __LIBC_INTERNAL_MATH_INLINES instead of
__LIBC_M81_MATH_INLINES.
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 7ea9fb0..9c2d91f 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index 59bc990..d23d4f9 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 1daa453..505650a 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index b3d151f..c36b643 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index a5923ab..93b44ff 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 516d459..5b263ec 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 348bc8f..41de73f 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index c38327e..7f87e09 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index f3d6960..e6b676b 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c
index 53f8286..095aa98 100644
--- a/sysdeps/m68k/fpu/s_ccos.c
+++ b/sysdeps/m68k/fpu/s_ccos.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
index 85e73b8..3d560b3 100644
--- a/sysdeps/m68k/fpu/s_ccosh.c
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index 86cc894..da28ebb 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c
index 8eecd96..ae456d3 100644
--- a/sysdeps/m68k/fpu/s_csin.c
+++ b/sysdeps/m68k/fpu/s_csin.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
index 643a221..c95f9dc 100644
--- a/sysdeps/m68k/fpu/s_csinh.c
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <complex.h>
#include <math.h>
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 84a9a0b..4280fcc 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 2d8f7d5..aebcaa1 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index fa0d1d5..d8cafdb 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
index 9dfee64..37b6f63 100644
--- a/sysdeps/m68k/fpu/s_llrint.c
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -19,7 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c
index 3c8528c..4d06ae2 100644
--- a/sysdeps/m68k/fpu/s_llrintf.c
+++ b/sysdeps/m68k/fpu/s_llrintf.c
@@ -19,7 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c
index 55190b9..14a815f 100644
--- a/sysdeps/m68k/fpu/s_llrintl.c
+++ b/sysdeps/m68k/fpu/s_llrintl.c
@@ -19,7 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c
index 511d288..7747057 100644
--- a/sysdeps/m68k/fpu/s_lrint.c
+++ b/sysdeps/m68k/fpu/s_lrint.c
@@ -19,7 +19,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef suffix
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index ad0334f..b9867df 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c
index 0332ecc..7607fee 100644
--- a/sysdeps/m68k/fpu/s_remquo.c
+++ b/sysdeps/m68k/fpu/s_remquo.c
@@ -18,7 +18,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef SUFF
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 1b219ec..12b737a 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#define scalbln __no_scalbln_decl
#define scalblnf __no_scalblnf_decl
#define scalblnl __no_scalblnl_decl
diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c
index ada21d0..dda42e2 100644
--- a/sysdeps/m68k/fpu/s_sincos.c
+++ b/sysdeps/m68k/fpu/s_sincos.c
@@ -16,7 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define __LIBC_M81_MATH_INLINES
+#define __LIBC_INTERNAL_MATH_INLINES
#include <math.h>
#ifndef FUNC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c48d19d0d5cdd38636e701fdd74e72edbc8b5c7b
commit c48d19d0d5cdd38636e701fdd74e72edbc8b5c7b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 18 02:39:35 1997 +0000
Use __APCS_32__ to decide whether or not to preserve condition codes
on function call.
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index b7964a3..8d1e297 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -43,13 +43,13 @@
#endif
-/* ARM 6 needs slightly different handling */
-#ifdef __arm6__
+/* APCS-32 doesn't preserve the condition codes across function call. */
+#ifdef __APCS_32__
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist
#define RETINSTR(instr, regs...)\
instr regs
-#else /* arm 3 */
+#else /* APCS-26 */
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist^
#define RETINSTR(instr, regs...)\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5343fec83a8c293417544ff58a26ef8d1db7c4d
commit a5343fec83a8c293417544ff58a26ef8d1db7c4d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 18 02:39:11 1997 +0000
Remove setjmp_aux.c.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 581022f..0807ce1 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1,4 +1,3 @@
-setjmp_aux.c
divrem.h
divl.S divq.S reml.S remq.S
_mcount.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2099b0d6de5c85822297761fd353a17871121c5
commit d2099b0d6de5c85822297761fd353a17871121c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 13 00:19:24 1997 +0000
(SYS_ify): Don't add SWI_BASE in twice.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 0aa085d..af08277 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -29,8 +29,8 @@
of the kernel. But these symbols do not follow the SYS_* syntax
so we have to redefine the `SYS_ify' macro here. */
#undef SYS_ify
-#define SWI_BASE (9 << 20)
-#define SYS_ify(syscall_name) (SWI_BASE + __NR_##syscall_name)
+#define SWI_BASE (0x900000)
+#define SYS_ify(syscall_name) (__NR_##syscall_name)
#ifdef ASSEMBLER
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4b0b9530e75ae13e9fc4ace7d0e9f70fdb0b7cc
commit c4b0b9530e75ae13e9fc4ace7d0e9f70fdb0b7cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 13 00:19:12 1997 +0000
(profil_counter): Use correct name to access PC.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index 802cbd5..d84e70e 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -22,5 +22,5 @@
void
profil_counter (int signo, struct sigcontext sc)
{
- profil_count ((void *) sc.eip);
+ profil_count ((void *) sc.reg.ARM_pc);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0fe3c9c4df28d934193af09773e1ff0729159976
commit 0fe3c9c4df28d934193af09773e1ff0729159976
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 13 00:18:09 1997 +0000
Include <bits/errno.h> not <errnos.h>.
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
index 5d3ad55..d59500e 100644
--- a/sysdeps/unix/arm/sysdep.S
+++ b/sysdeps/unix/arm/sysdep.S
@@ -18,13 +18,13 @@
#include <sysdep.h>
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
.globl C_SYMBOL_NAME(errno)
.globl syscall_error
_errno_loc: .long C_SYMBOL_NAME(errno)
-
+
#undef syscall_error
#ifdef NO_UNDERSCORES
__syscall_error:
@@ -39,7 +39,7 @@ syscall_error:
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
#ifndef PIC
- ldr r1, _errno_loc
+ ldr r1, _errno_loc
str r0, [r1]
#endif
mvn r0, $0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ecd6b510faac53c5b8f181c14f278e99f5e04b5
commit 2ecd6b510faac53c5b8f181c14f278e99f5e04b5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 13 00:15:53 1997 +0000
Define INFINITY as of type float.
Define DECIMAL_DIG.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
index 0bc9c94..1c25940 100644
--- a/sysdeps/alpha/fpu/bits/mathdef.h
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -17,38 +17,38 @@
Boston, MA 02111-1307, USA. */
#ifndef _MATH_H
-#error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
/* FIXME! This file describes properties of the compiler, not the machine;
it should not be part of libc! */
#ifdef __GNUC__
-#if __STDC__ == 1
+# if __STDC__ == 1
/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
typedef float float_t;
typedef double double_t;
/* Signal that types stay as they were declared. */
-#define FLT_EVAL_METHOD 0
+# define FLT_EVAL_METHOD 0
-/* Define `INFINITY' as value of type `float_t'. */
-#define INFINITY HUGE_VALF
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
-#else
+# else
/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
typedef double float_t;
typedef double double_t;
/* Signal that both types are `double'. */
-#define FLT_EVAL_METHOD 1
+# define FLT_EVAL_METHOD 1
-/* Define `INFINITY' as value of type `float_t'. */
-#define INFINITY HUGE_VAL
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
-#endif
+# endif
#else
/* Wild guess at types for float_t and double_t. */
@@ -56,9 +56,12 @@ typedef double float_t;
typedef double double_t;
/* Strange compiler, we don't know how it works. */
-#define FLT_EVAL_METHOD -1
+# define FLT_EVAL_METHOD -1
-/* Define `INFINITY' as value of type `float_t'. */
-#define INFINITY HUGE_VAL
+/* Define `INFINITY' as value of type `float'. */
+# define INFINITY HUGE_VALF
#endif
+
+/* Number of decimal digits for the `double' type. */
+#define DECIMAL_DIG 15
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index c2b4eff..e3d33a5 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -32,9 +32,12 @@ typedef long double double_t; /* `double' expressions are evaluated as
/* Signal that both types are `long double'. */
#define FLT_EVAL_METHOD 2
-/* Define `INFINITY' as value of type `float_t'. */
-#define INFINITY HUGE_VALL
+/* Define `INFINITY' as value of type `float'. */
+#define INFINITY HUGE_VALF
/* The values returned by `ilogb' for 0 and NaN respectively. */
#define FP_ILOGB0 0x80000000
#define FP_ILOGBNAN 0x7fffffff
+
+/* Number of decimal digits for the `long double' type. */
+#define DECIMAL_DIG 18
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=04f48607a08ee502ed7593f3d6d2daa88b97d9fb
commit 04f48607a08ee502ed7593f3d6d2daa88b97d9fb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 13 00:15:34 1997 +0000
Define NAN as of type float.
diff --git a/sysdeps/m68k/bits/nan.h b/sysdeps/m68k/bits/nan.h
deleted file mode 100644
index b4efddf..0000000
--- a/sysdeps/m68k/bits/nan.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* `NAN' constants for m68k.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _NAN_H
-
-#define _NAN_H 1
-
-/* IEEE Not A Number. */
-
-#ifdef __GNUC__
-
-#define NAN \
- (__extension__ \
- ((union { unsigned long long __l; double __d; }) \
- { __l: 0x7fffffffffffffffULL }).__d)
-
-#define NANF \
- (__extension__ \
- ((union { unsigned long __l; float __f; }) \
- { __l: 0x7fffffffUL }).__f)
-
-#define NANL \
- (__extension__ \
- ((union { unsigned long __l[3]; long double __ld; }) \
- { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld)
-
-#else
-
-static union { unsigned char __c[8]; double __d; } __nan =
- { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
-#define NAN (__nan.__d)
-
-static union { unsigned char __c[4]; float __f; } __nanf =
- { { 0x7f, 0xff, 0xff, 0xff } };
-#define NANF (__nanf.__f)
-
-static union { unsigned char __c[12]; long double __ld; } __nanl =
- { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
-#define NANL (__nanl.__ld)
-
-#endif /* GCC. */
-
-#endif /* nan.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2645f7aaad48d904f2efb503aeaabf0afa50fa01
commit 2645f7aaad48d904f2efb503aeaabf0afa50fa01
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 11 23:54:33 1997 +0000
Use struct assignment instead of memcpy to let the compiler use
whatever it regards as optimal.
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index d1005e7..cb0269b 100644
--- a/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -29,7 +29,7 @@ xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
/* Nothing to do. The struct is in the form the kernel expects.
We should have short-circuted before we got here, but for
completeness... */
- memcpy ((struct kernel_stat *) ubuf, kbuf, sizeof (*kbuf));
+ *(struct kernel_stat *) ubuf = *kbuf;
break;
case _STAT_VER_GLIBC2:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa94f8a58a4903eb566d1f9ad9a5fbae6e017a9f
commit fa94f8a58a4903eb566d1f9ad9a5fbae6e017a9f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 11 23:52:34 1997 +0000
EILSEQ is an ISO C error number.
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
index 30eec43..d4030b7 100644
--- a/sysdeps/standalone/bits/errno.h
+++ b/sysdeps/standalone/bits/errno.h
@@ -23,6 +23,7 @@
#define __Emath_defined 1
# define EDOM 1
+# define EILSEQ 17
# define ERANGE 2
#endif
@@ -41,7 +42,6 @@
# define ENOMSG 14
# define E2BIG 15
# define EINTR 16
-# define EILSEQ 17
# define ENOEXEC 18
# define ENOENT 19
# define EPROTOTYPE 20
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2d2125ecd3e1758e6fea9e50efc5f2009ed599f
commit d2d2125ecd3e1758e6fea9e50efc5f2009ed599f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 11 23:48:16 1997 +0000
m68k specific llrint implementation.
diff --git a/sysdeps/m68k/fpu/s_llrintf.c b/sysdeps/m68k/fpu/s_llrintf.c
new file mode 100644
index 0000000..3c8528c
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_llrintf.c
@@ -0,0 +1,66 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+long long int
+__llrintf (float x)
+{
+ int32_t e;
+ u_int32_t i, s;
+ long long int result;
+
+ x = __m81_u(__rintf) (x);
+
+ GET_FLOAT_WORD (i, x);
+
+ e = ((i >> 23) & 0xff) - 0x7f;
+ if (e < 0)
+ return 0;
+ s = i;
+ i &= 0x7fffff;
+ i |= 0x800000;
+
+ if (e < 63)
+ {
+ if (e > 55)
+ result = (long long int) (i << (e - 55)) << 32;
+ else if (e > 31)
+ result = (((long long int) (i >> (55 - e)) << 32) | (i << (e - 23)));
+ else if (e > 23)
+ result = i << (e - 23);
+ else
+ result = i >> (23 - e);
+ if (s & 0x80000000)
+ result = -result;
+ }
+ else
+ /* The number is too large or not finite. The standard leaves it
+ undefined what to return when the number is too large to fit in a
+ `long long int'. */
+ result = -1LL;
+
+ return result;
+}
+
+weak_alias (__llrintf, llrintf)
diff --git a/sysdeps/m68k/fpu/s_llrintl.c b/sysdeps/m68k/fpu/s_llrintl.c
new file mode 100644
index 0000000..55190b9
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_llrintl.c
@@ -0,0 +1,65 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+long long int
+__llrintl (long double x)
+{
+ int32_t e, s;
+ u_int32_t h, l;
+ long long int result;
+
+ x = __m81_u(__rintl) (x);
+
+ GET_LDOUBLE_WORDS (e, h, l, x);
+
+ s = e;
+ e = (e & 0x7fff) - 0x3fff;
+ if (e < 0)
+ return 0;
+
+ if (e < 63)
+ {
+ if (e > 31)
+ {
+ l >>= 63 - e;
+ l |= h << (e - 31);
+ h >>= 63 - e;
+ result = ((long long int) h << 32) | l;
+ }
+ else
+ result = h >> (31 - e);
+ if (s & 0x8000)
+ result = -result;
+ }
+ else
+ /* The number is too large or not finite. The standard leaves it
+ undefined what to return when the number is too large to fit in a
+ `long long int'. */
+ result = -1LL;
+
+ return result;
+}
+
+weak_alias (__llrintl, llrintl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d391bc58dded32eaa2609a8a5b060cc84b07fa6c
commit d391bc58dded32eaa2609a8a5b060cc84b07fa6c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 11 23:47:20 1997 +0000
Make compilable and fix overflow condition.
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
index f5d0d51..9dfee64 100644
--- a/sysdeps/m68k/fpu/s_llrint.c
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -24,36 +24,50 @@
#include "math_private.h"
long long int
-__llrint (long double x)
+__llrint (double x)
{
- int32_t se, sx;
- u_int32_t h, l;
+ int32_t e;
+ u_int32_t h, l, s;
long long int result;
- x = __m81_u(__rintl) (x);
+ x = __m81_u(__rint) (x);
/* We could use __fixxfdi from libgcc, but here we can take advantage of
the known floating point format. */
- GET_LDOUBLE_WORDS (se, h, l, x);
+ EXTRACT_WORDS (h, l, x);
- sx = se & (1 << 15);
- se = (se ^ sx) - 0x3fff;
+ e = ((h >> 20) & 0x7ff) - 0x3ff;
+ if (e < 0)
+ return 0;
+ s = h;
+ h &= 0xfffff;
+ h |= 0x100000;
- if (se < 64)
+ if (e < 63)
{
- if (se > 31)
- result = (((long long int) (h >> (63 - se)) << 32)
- | (l >> (63 - se)) | (h << (se - 31)));
+ if (e > 52)
+ {
+ h <<= e - 52;
+ h |= l >> (84 - e);
+ l <<= e - 52;
+ result = ((long long int) h << 32) | l;
+ }
+ else if (e > 20)
+ {
+ l >>= 52 - e;
+ l |= h << (e - 20);
+ h >>= 52 - e;
+ result = ((long long int) h << 32) | l;
+ }
else
- result = h >> (31 - se);
- if (sx)
+ result = h >> (20 - e);
+ if (s & 0x80000000)
result = -result;
}
else
- /* Too large. The number is either +-inf or NaN or it is too
- large to be effected by rounding. The standard leaves it
- undefined what to return when the number is too large to fit in
- a `long long int'. */
+ /* The number is too large or not finite. The standard leaves it
+ undefined what to return when the number is too large to fit in a
+ `long long int'. */
result = -1LL;
return result;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27157fb6a099cd0c36d660b06efeabc35540c511
commit 27157fb6a099cd0c36d660b06efeabc35540c511
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Nov 4 02:16:52 1997 +0000
Definition of all needed error numbers.
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
new file mode 100644
index 0000000..30eec43
--- /dev/null
+++ b/sysdeps/standalone/bits/errno.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+# define EDOM 1
+# define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+# define ENOSYS 3
+# define EINVAL 4
+# define ESPIPE 5
+# define EBADF 6
+# define ENOMEM 7
+# define EACCES 8
+# define ENFILE 9
+# define EMFILE 10
+# define ENOMSG 11
+# define ENAMETOOLONG 12
+# define ELOOP 13
+# define ENOMSG 14
+# define E2BIG 15
+# define EINTR 16
+# define EILSEQ 17
+# define ENOEXEC 18
+# define ENOENT 19
+# define EPROTOTYPE 20
+# define ESRCH 21
+# define EPERM 22
+# define EEXIST 23
+# define ENOTDIR 24
+# define ESTALE 25
+# define ENOTTY 26
+# define EISDIR 27
+# define EOPNOTSUPP 28
+# define EAGAIN 29
+# define EIO 30
+# define ENOSPC 31
+# define EBUSY 32
+#endif
+
+#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=575e2908df8849434d26c130bffb0188930924f4
commit 575e2908df8849434d26c130bffb0188930924f4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 23:13:26 1997 +0000
Add newline
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index ebbf300..715fda7 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -12,4 +12,4 @@ kernel_termios.h
sys/acct.h
sys/io.h
sys/procfs.h
-xstatconv.c
\ No newline at end of file
+xstatconv.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c43790ef6e5dc02cc0c7f85beebedf0803bafc5
commit 6c43790ef6e5dc02cc0c7f85beebedf0803bafc5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:52:56 1997 +0000
Add __ino64_t, and __off64_t. Reorganize.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index cf2668a..b9e6dd7 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -42,18 +42,26 @@ typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef __quad_t *__qaddr_t;
-typedef __u_long __dev_t; /* Type of device numbers. */
-typedef __u_int __uid_t; /* Type of user identifications. */
-typedef __u_int __gid_t; /* Type of group identifications. */
-typedef __u_int __ino_t; /* Type of file serial numbers. */
-typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
-typedef __u_int __nlink_t; /* Type of file link counts. */
-typedef long int __off_t; /* Type of file sizes and offsets. */
-typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
-typedef int __pid_t; /* Type of process identifications. */
-typedef long int __ssize_t; /* Type of a byte count, or error. */
-typedef long int __rlim_t; /* Type of resource counts. */
-typedef long int __rlim64_t; /* Type of resource counts (LFS). */
+typedef __uint64_t __dev_t; /* Type of device numbers. */
+typedef __uint32_t __uid_t; /* Type of user identifications. */
+typedef __uint32_t __gid_t; /* Type of group identifications. */
+typedef __uint32_t __ino_t; /* Type of file serial numbers. */
+typedef __uint64_t __ino64_t; /* "" (LFS) */
+typedef __uint32_t __mode_t; /* Type of file attribute bitmasks. */
+typedef __uint32_t __nlink_t; /* Type of file link counts. */
+typedef __int64_t __off_t; /* Type of file sizes and offsets. */
+typedef __int64_t __off64_t; /* "" (LFS) */
+typedef __int64_t __loff_t; /* Type of file sizes and offsets. */
+typedef __int32_t __pid_t; /* Type of process identifications. */
+typedef __int64_t __ssize_t; /* Type of a byte count, or error. */
+typedef __int64_t __rlim_t; /* Type of resource counts. */
+typedef __int64_t __rlim64_t; /* "" (LFS) */
+typedef __int32_t __blkcnt_t; /* Type to count nr disk blocks. */
+typedef __int64_t __blkcnt64_t; /* "" (LFS) */
+typedef __uint32_t __fsblkcnt_t; /* Type to count file system blocks. */
+typedef __uint64_t __fsblkcnt64_t; /* "" (LFS) */
+typedef __uint64_t __fsfilcnt_t; /* Type to count file system inodes. */
+typedef __uint64_t __fsfilcnt64_t; /* "" (LFS) */
typedef struct
{
@@ -61,12 +69,12 @@ typedef struct
} __fsid_t; /* Type of file system IDs. */
/* Everythin' else. */
-typedef int __daddr_t; /* The type of a disk address. */
-typedef char *__caddr_t;
+typedef int __daddr_t; /* Type of a disk address. */
+typedef char *__caddr_t; /* Type of a core address. */
typedef long int __time_t;
typedef long int __swblk_t; /* Type of a swap block maybe? */
-
typedef long int __clock_t;
+typedef int __key_t; /* Type of a SYSV IPC key. */
/* One element in the file descriptor mask array. */
typedef unsigned long int __fd_mask;
@@ -91,22 +99,4 @@ typedef struct
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
-
-typedef int __key_t;
-
-
-/* Types from the Large File Support interface. */
-
-/* Type to count number os disk blocks. */
-typedef int __blkcnt_t;
-typedef __quad_t __blkcnt64_t;
-
-/* Type to count file system blocks. */
-typedef unsigned int __fsblkcnt_t;
-typedef __u_quad_t __fsblkcnt64_t;
-
-/* Type to count file system inodes. */
-typedef unsigned long int __fsfilcnt_t;
-typedef __u_quad_t __fsfilcnt64_t;
-
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=def4a5f0c33f33e53d2b80b3b5cedc7b6aee47b1
commit def4a5f0c33f33e53d2b80b3b5cedc7b6aee47b1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:52:42 1997 +0000
Define _STAT_VER_KERNEL.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index cc2a2ea..de8752e 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -24,9 +24,10 @@
#define _BITS_STAT_H 1
/* Versions of the `struct stat' data structure. */
-#define _STAT_VER_LINUX_OLD 0
-#define _STAT_VER_LINUX 1
-#define _STAT_VER _STAT_VER_LINUX
+#define _STAT_VER_KERNEL 0
+#define _STAT_VER_GLIBC2 1
+#define _STAT_VER_GLIBC2_1 2
+#define _STAT_VER _STAT_VER_GLIBC2_1
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
@@ -34,7 +35,12 @@
struct stat
{
__dev_t st_dev; /* Device. */
+#ifdef __USE_FILE_OFFSET64
+ __ino64_t st_ino; /* File serial number. */
+#else
__ino_t st_ino; /* File serial number. */
+ int __pad1;
+#endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
@@ -44,13 +50,45 @@ struct stat
__time_t st_atime; /* Time of last access. */
__time_t st_mtime; /* Time of last modification. */
__time_t st_ctime; /* Time of last status change. */
+#ifdef __USE_FILE_OFFSET64
+ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
+#else
+ __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */
+ int __pad2;
+#endif
unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- __blkcnt_t st_blocks; /* Nr. of 512-byte blocks allocated. */
unsigned int st_flags;
unsigned int st_gen;
+ int __pad3;
+ long __unused[4];
};
+#ifdef __USE_LARGEFILE64
+/* Note stat64 is the same shape as stat. */
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ __off_t st_size; /* Size of file, in bytes. */
+ __time_t st_atime; /* Time of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ int __pad3;
+ long __unused[4];
+ };
+#endif
+
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
/* Encoding of the file mode. */
#define __S_IFMT 0170000 /* These bits determine file type. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c573a9c69cfecfd79ba3063a516fb275d541372e
commit c573a9c69cfecfd79ba3063a516fb275d541372e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:52:34 1997 +0000
(struct dirent): For consistency, force d_ino to use ino_t and
supply padding.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
index 4d717e4..a371a55 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
@@ -19,10 +19,14 @@
#ifndef _BITS_DIRENT_H
#define _BITS_DIRENT_H 1
-/* We don't have to make a difference for __USE_FILE_OFFSET64. */
struct dirent
{
- long int d_ino;
+#ifdef __USE_FILE_OFFSET64
+ __ino64_t d_ino;
+#else
+ __ino_t d_ino;
+ int __pad;
+#endif
__off_t d_off;
unsigned short int d_reclen;
unsigned char d_type;
@@ -30,6 +34,7 @@ struct dirent
};
#ifdef __USE_LARGEFILE64
+/* Note dirent64 is the same as dirent. */
struct dirent64
{
__ino64_t d_ino;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee6f798644f396968b30bb9edc065a5543442f80
commit ee6f798644f396968b30bb9edc065a5543442f80
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:52:16 1997 +0000
Add struct glibc2_stat for backward compatibility. Define
XSTAT_IS_XSTAT64.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
index 7109677..2633b42 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
@@ -1,4 +1,4 @@
-/* Definition of `struct stat' used in the kernel.. */
+/* Definition of `struct stat' used in the kernel. */
struct kernel_stat
{
unsigned int st_dev;
@@ -17,3 +17,27 @@ struct kernel_stat
unsigned int st_flags;
unsigned int st_gen;
};
+
+/* Definition of `struct stat' used by glibc 2.0. */
+struct glibc2_stat
+ {
+ __dev_t st_dev;
+ __ino_t st_ino;
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ __off_t st_size;
+ __time_t st_atime;
+ __time_t st_mtime;
+ __time_t st_ctime;
+ unsigned int st_blksize;
+ int st_blocks;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
+
+#define XSTAT_IS_XSTAT64 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52765681588c7c19fcba32cec21317f1149e69dc
commit 52765681588c7c19fcba32cec21317f1149e69dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:51:57 1997 +0000
Empty file.
diff --git a/sysdeps/unix/sysv/linux/alpha/fxstat64.c b/sysdeps/unix/sysv/linux/alpha/fxstat64.c
new file mode 100644
index 0000000..9eff9eb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fxstat64.c
@@ -0,0 +1 @@
+/* fxstat64 is in fxstat.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/lxstat64.c b/sysdeps/unix/sysv/linux/alpha/lxstat64.c
new file mode 100644
index 0000000..bb5dbd0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/lxstat64.c
@@ -0,0 +1 @@
+/* lxstat64 is in lxstat.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/xstat64.c b/sysdeps/unix/sysv/linux/alpha/xstat64.c
new file mode 100644
index 0000000..e7acd3b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/xstat64.c
@@ -0,0 +1 @@
+/* xstat64 is in xstat.c */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d230eb77ca59cb494f3d782fa3402eeb1385a09
commit 0d230eb77ca59cb494f3d782fa3402eeb1385a09
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:51:31 1997 +0000
Add xstatconv.c.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index ae71c2f..ebbf300 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -12,3 +12,4 @@ kernel_termios.h
sys/acct.h
sys/io.h
sys/procfs.h
+xstatconv.c
\ No newline at end of file
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05da9c9f2e95209453c7a483244c8a78c577add2
commit 05da9c9f2e95209453c7a483244c8a78c577add2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 31 22:51:10 1997 +0000
Convert between kernel_stat and the userland version indicated.
diff --git a/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
new file mode 100644
index 0000000..d1005e7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -0,0 +1,90 @@
+/* Convert between the kernel's `struct stat' format, and libc's.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <string.h>
+
+
+static inline int
+xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
+{
+ switch (vers)
+ {
+ case _STAT_VER_KERNEL:
+ /* Nothing to do. The struct is in the form the kernel expects.
+ We should have short-circuted before we got here, but for
+ completeness... */
+ memcpy ((struct kernel_stat *) ubuf, kbuf, sizeof (*kbuf));
+ break;
+
+ case _STAT_VER_GLIBC2:
+ {
+ struct glibc2_stat *buf = ubuf;
+
+ buf->st_dev = kbuf->st_dev;
+ buf->st_ino = kbuf->st_ino;
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+ buf->st_size = kbuf->st_size;
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_blocks = kbuf->st_blocks;
+ buf->st_flags = kbuf->st_flags;
+ buf->st_gen = kbuf->st_gen;
+ }
+ break;
+
+ case _STAT_VER_GLIBC2_1:
+ {
+ struct stat64 *buf = ubuf;
+
+ buf->st_dev = kbuf->st_dev;
+ buf->st_ino = kbuf->st_ino;
+ buf->st_mode = kbuf->st_mode;
+ buf->st_nlink = kbuf->st_nlink;
+ buf->st_uid = kbuf->st_uid;
+ buf->st_gid = kbuf->st_gid;
+ buf->st_rdev = kbuf->st_rdev;
+ buf->st_size = kbuf->st_size;
+ buf->st_atime = kbuf->st_atime;
+ buf->st_mtime = kbuf->st_mtime;
+ buf->st_ctime = kbuf->st_ctime;
+ buf->st_blocks = kbuf->st_blocks;
+ buf->st_blksize = kbuf->st_blksize;
+ buf->st_flags = kbuf->st_flags;
+ buf->st_gen = kbuf->st_gen;
+ buf->__pad3 = 0;
+ buf->__unused[0] = 0;
+ buf->__unused[1] = 0;
+ buf->__unused[2] = 0;
+ buf->__unused[3] = 0;
+ }
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=475a3ad9f293cb8fb86b6d07fff61d4a502bd933
commit 475a3ad9f293cb8fb86b6d07fff61d4a502bd933
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 29 20:32:26 1997 +0000
Include stub version from generic subdir.
diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c
index a8951fa..aeb2940 100644
--- a/sysdeps/unix/bsd/sun/sethostid.c
+++ b/sysdeps/unix/bsd/sun/sethostid.c
@@ -1 +1 @@
-#include <sysdeps/stub/sethostid.c>
+#include <sysdeps/generic/sethostid.c>
diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c
index d7a3659..4d90e6f 100644
--- a/sysdeps/unix/sysv/irix4/reboot.c
+++ b/sysdeps/unix/sysv/irix4/reboot.c
@@ -1 +1 @@
-#include <sysdeps/stub/reboot.c>
+#include <sysdeps/generic/reboot.c>
diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c
index 86a638f..54885a8 100644
--- a/sysdeps/unix/sysv/irix4/swapon.c
+++ b/sysdeps/unix/sysv/irix4/swapon.c
@@ -1 +1 @@
-#include <sysdeps/stub/swapon.c>
+#include <sysdeps/generic/swapon.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1bee79921d4788a622d128624d7cff005e3cb72
commit a1bee79921d4788a622d128624d7cff005e3cb72
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 20:06:34 1997 +0000
Add pread and pwrite with weak aliases for *64 functions.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 7140706..9e4cd39 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,6 +21,8 @@ getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap
llseek EXTRA lseek 3 llseek
+pread EXTRA pread 4 __pread pread __pread64 pread64
+pwrite EXTRA pwrite 4 __pwrite pwrite __pwrite64 pwrite64
# these are actually common with the x86:
fstatfs - fstatfs 2 __fstatfs fstatfs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cf9670ffba6e9c078f7452418fab296533de1bf
commit 9cf9670ffba6e9c078f7452418fab296533de1bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 20:06:09 1997 +0000
New empty file.
diff --git a/sysdeps/unix/sysv/linux/alpha/pread64.c b/sysdeps/unix/sysv/linux/alpha/pread64.c
new file mode 100644
index 0000000..b7f298d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/pread64.c
@@ -0,0 +1 @@
+/* Empty since the pread syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/alpha/pwrite64.c b/sysdeps/unix/sysv/linux/alpha/pwrite64.c
new file mode 100644
index 0000000..b7f298d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/pwrite64.c
@@ -0,0 +1 @@
+/* Empty since the pread syscall is equivalent. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6874bbcb7ce6da79ff6dbe3930d486a2e776e864
commit 6874bbcb7ce6da79ff6dbe3930d486a2e776e864
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 19:59:49 1997 +0000
User level process context for m68k.
diff --git a/sysdeps/m68k/sys/ucontext.h b/sysdeps/m68k/sys/ucontext.h
new file mode 100644
index 0000000..4776e7d
--- /dev/null
+++ b/sysdeps/m68k/sys/ucontext.h
@@ -0,0 +1,108 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* System V/m68k ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+#include <signal.h>
+
+/* Type for general register. */
+typedef int greg_t;
+
+/* Number of general registers. */
+#define NGREG 18
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[NGREG];
+
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R_D0 = 0,
+#define R_D0 R_D0
+ R_D1 = 1,
+#define R_D1 R_D1
+ R_D2 = 2,
+#define R_D2 R_D2
+ R_D3 = 3,
+#define R_D3 R_D3
+ R_D4 = 4,
+#define R_D4 R_D4
+ R_D5 = 5,
+#define R_D5 R_D5
+ R_D6 = 6,
+#define R_D6 R_D6
+ R_D7 = 7,
+#define R_D7 R_D7
+ R_A0 = 8,
+#define R_A0 R_A0
+ R_A1 = 9,
+#define R_A1 R_A1
+ R_A2 = 10,
+#define R_A2 R_A2
+ R_A3 = 11,
+#define R_A3 R_A3
+ R_A4 = 12,
+#define R_A4 R_A4
+ R_A5 = 13,
+#define R_A5 R_A5
+ R_A6 = 14,
+#define R_A6 R_A6
+ R_A7 = 15,
+#define R_A7 R_A7
+ R_SP = 15,
+#define R_SP R_SP
+ R_PC = 16,
+#define R_PC R_PC
+ R_PS = 17
+#define R_PS R_PS
+};
+
+/* Structure to describe FPU registers. */
+typedef struct fpregset
+{
+ int f_pcr;
+ int f_psr;
+ int f_fpiaddr;
+ int f_fpregs[8][3];
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+{
+ int version;
+ gregset_t gregs;
+} mcontext_t;
+
+#define MCONTEXT_VERSION 1
+
+/* Userlevel context. */
+typedef struct ucontext
+{
+ unsigned long int uc_flags;
+ struct ucontext *uc_links;
+ __sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ long int uc_filler[201];
+} ucontext_t;
+
+#endif /* sys/ucontext.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6d0dce1cc0ef19d06c263a6211f4dfecba5adfa
commit b6d0dce1cc0ef19d06c263a6211f4dfecba5adfa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 19:59:32 1997 +0000
Add fma and scalbln. Update lrint and scalbn.
(__m81_inline) [__cplusplus]: Define to __inline.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 1e68ea0..c3ed76c 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -76,12 +76,16 @@
/* This is used when defining the functions themselves. Define them with
__ names, and with `static inline' instead of `extern inline' so the
bodies will always be used, never an external function call. */
-# define __m81_u(x) __CONCAT(__,x)
-# define __m81_inline static __inline
+#define __m81_u(x) __CONCAT(__,x)
+#define __m81_inline static __inline
#else
-# define __m81_u(x) x
-# define __m81_inline extern __inline
-# define __M81_MATH_INLINES 1
+#define __m81_u(x) x
+#ifdef __cplusplus
+#define __m81_inline __inline
+#else
+#define __m81_inline extern __inline
+#endif
+#define __M81_MATH_INLINES 1
#endif
/* Define a const math function. */
@@ -95,12 +99,12 @@
is the name of the fpu operation (without leading f). */
#if defined __USE_MISC || defined __USE_ISOC9X
-# define __inline_mathop(func, op) \
+#define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
__inline_mathop1(long double, __CONCAT(func,l), op)
#else
-# define __inline_mathop(func, op) \
+#define __inline_mathop(func, op) \
__inline_mathop1(double, func, op)
#endif
@@ -309,13 +313,19 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
} \
\
__m81_defun (float_type, __CONCAT(__scalbn,s), \
- (float_type __x, long int __n)) \
+ (float_type __x, int __n)) \
{ \
float_type __result; \
__asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
return __result; \
} \
\
+__m81_defun (float_type, __CONCAT(__scalbln,s), \
+ (float_type __x, long int __n)) \
+{ \
+ return __CONCAT(__scalbn,s) (__x, __n); \
+} \
+ \
__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
{ \
float_type __result; \
@@ -330,12 +340,26 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
return __result; \
} \
\
+__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \
+{ \
+ long int __result; \
+ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \
+ return __result; \
+} \
+ \
__m81_inline void \
__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
float_type *__cosx) \
{ \
__asm ("fsincos%.x %2,%1:%0" \
: "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
+} \
+ \
+__m81_inline float_type \
+__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \
+ float_type __z) \
+{ \
+ return (__x * __y) + __z; \
}
/* This defines the three variants of the inline functions. */
@@ -344,17 +368,12 @@ __inline_functions (float,f)
__inline_functions (long double,l)
#undef __inline_functions
-__m81_defun (long int, __lrint, (long double __x))
-{
- long int __result;
- __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
- return __result;
-}
-
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
/* Define inline versions of the user visible functions. */
+/* Note that there must be no whitespace before the argument passed for
+ NAME, to make token pasting work correctly with -traditional. */
#define __inline_forward_c(rettype, name, args1, args2) \
extern __inline rettype __attribute__((__const__)) \
name args1 \
@@ -375,7 +394,8 @@ __inline_forward_c(double,ceil, (double __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinf, (double __value), (__value))
__inline_forward_c(int,finite, (double __value), (__value))
-__inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n))
+__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
+__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n))
#endif
#if defined __USE_MISC || defined __USE_XOPEN
#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
@@ -384,6 +404,9 @@ __inline_forward_c(int,isnan, (double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(double,nearbyint, (double __value), (__value))
+__inline_forward_c(long int,lrint, (double __value), (__value))
+__inline_forward_c(double,fma, (double __x, double __y, double __z),
+ (__x, __y, __z))
#endif
#ifdef __USE_GNU
__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
@@ -399,11 +422,15 @@ __inline_forward_c(float,ceilf, (float __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
-__inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n))
+__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
+__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(float,nearbyintf, (float __value), (__value))
+__inline_forward_c(long int,lrintf, (float __value), (__value))
+__inline_forward_c(float,fmaf, (float __x, float __y, float __z),
+ (__x, __y, __z))
#endif
#ifdef __USE_GNU
__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
@@ -417,13 +444,17 @@ __inline_forward_c(long double,ceill, (long double __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
-__inline_forward_c(long double,scalbnl, (long double __x, long int __n),
+__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n))
+__inline_forward_c(long double,scalblnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
-__inline_forward_c(long int,lrint, (long double __value), (__value))
+__inline_forward_c(long int,lrintl, (long double __value), (__value))
+__inline_forward_c(long double,fmal,
+ (long double __x, long double __y, long double __z),
+ (__x, __y, __z))
#endif
#ifdef __USE_GNU
__inline_forward(void,sincosl,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c43ee646ddbe8bb953f782927147163cc033a2b9
commit c43ee646ddbe8bb953f782927147163cc033a2b9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 19:59:09 1997 +0000
Add scalbln alias.
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index d3ba27f..1b219ec 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -17,10 +17,22 @@
Boston, MA 02111-1307, USA. */
#define __LIBC_M81_MATH_INLINES
+#define scalbln __no_scalbln_decl
+#define scalblnf __no_scalblnf_decl
+#define scalblnl __no_scalblnl_decl
+#define __scalbln __no__scalbln_decl
+#define __scalblnf __no__scalblnf_decl
+#define __scalblnl __no__scalblnl_decl
#include <math.h>
-
-#ifndef FUNC
-#define FUNC scalbn
+#undef scalbln
+#undef scalblnf
+#undef scalblnl
+#undef __scalbln
+#undef __scalblnf
+#undef __scalblnl
+
+#ifndef suffix
+#define suffix /*empty*/
#endif
#ifndef float_type
#define float_type double
@@ -29,12 +41,15 @@
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-__CONCATX(__,FUNC) (x, exp)
+__CONCATX(__scalbn,suffix) (x, exp)
float_type x;
- long int exp;
+ int exp;
{
- return __m81_u(__CONCATX(__,FUNC))(x, exp);
+ return __m81_u(__CONCATX(__scalbn,suffix))(x, exp);
}
#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define strong_aliasx(a,b) strong_alias(a,b)
+weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbn,suffix))
+strong_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(__scalbln,suffix))
+weak_aliasx (__CONCATX(__scalbn,suffix), __CONCATX(scalbln,suffix))
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c
index 3345971..5479718 100644
--- a/sysdeps/m68k/fpu/s_scalbnf.c
+++ b/sysdeps/m68k/fpu/s_scalbnf.c
@@ -1,5 +1,3 @@
-#ifndef FUNC
-#define FUNC scalbnf
-#endif
+#define suffix f
#define float_type float
#include <s_scalbn.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c
index c6ad950..874bafb 100644
--- a/sysdeps/m68k/fpu/s_scalbnl.c
+++ b/sysdeps/m68k/fpu/s_scalbnl.c
@@ -1,5 +1,3 @@
-#ifndef FUNC
-#define FUNC scalbnl
-#endif
+#define suffix l
#define float_type long double
#include <s_scalbn.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95d16178a8ab47658183cc5eb3c88dcf0f938b18
commit 95d16178a8ab47658183cc5eb3c88dcf0f938b18
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 19:58:56 1997 +0000
New (empty) file.
diff --git a/sysdeps/m68k/fpu/s_scalbln.c b/sysdeps/m68k/fpu/s_scalbln.c
new file mode 100644
index 0000000..1009713
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalbln.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbn. So we define an
+ alias. */
diff --git a/sysdeps/m68k/fpu/s_scalblnf.c b/sysdeps/m68k/fpu/s_scalblnf.c
new file mode 100644
index 0000000..5e558c3
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalblnf.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbnf. So we define an
+ alias. */
diff --git a/sysdeps/m68k/fpu/s_scalblnl.c b/sysdeps/m68k/fpu/s_scalblnl.c
new file mode 100644
index 0000000..cda2ec1
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalblnl.c
@@ -0,0 +1,2 @@
+/* Nothing to do. This function is the same as scalbnl. So we define an
+ alias. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6672b01b5a631046d3e6577d363ed2ba3c116be
commit f6672b01b5a631046d3e6577d363ed2ba3c116be
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 26 19:58:40 1997 +0000
Add standard skeleton stuff.
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c
index a704411..511d288 100644
--- a/sysdeps/m68k/fpu/s_lrint.c
+++ b/sysdeps/m68k/fpu/s_lrint.c
@@ -22,10 +22,20 @@
#define __LIBC_M81_MATH_INLINES
#include <math.h>
+#ifndef suffix
+#define suffix /*empty*/
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+
long int
-__lrint (long double x)
+CONCATX(__lrint,suffix) (float_type x)
{
- return __m81_u(__lrint) (x);
+ return __m81_u(CONCATX(__lrint,suffix)) (x);
}
-weak_alias (__lrint, lrint)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (CONCATX(__lrint,suffix), CONCATX(lrint,suffix))
diff --git a/sysdeps/m68k/fpu/s_lrintf.c b/sysdeps/m68k/fpu/s_lrintf.c
new file mode 100644
index 0000000..44924cb
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_lrintf.c
@@ -0,0 +1,3 @@
+#define suffix f
+#define float_type float
+#include <s_lrint.c>
diff --git a/sysdeps/m68k/fpu/s_lrintl.c b/sysdeps/m68k/fpu/s_lrintl.c
new file mode 100644
index 0000000..cd0bd23
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_lrintl.c
@@ -0,0 +1,3 @@
+#define suffix l
+#define float_type long double
+#include <s_lrint.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b5e4b7fe2e3179d0fb7bf442cc687d4ae7db365
commit 7b5e4b7fe2e3179d0fb7bf442cc687d4ae7db365
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 15 05:31:59 1997 +0000
Use __ptr_t instead of __caddr_t.
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index 816f271..cf0bf45 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -77,7 +77,7 @@
#define MS_INVALIDATE 4 /* Invalidate cached pages. */
/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__caddr_t) -1)
+#define MAP_FAILED ((__ptr_t) -1)
__BEGIN_DECLS
@@ -90,31 +90,31 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
-extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
+extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
+extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__caddr_t __addr, size_t __len));
-extern int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__ptr_t __addr, size_t __len));
+extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-extern int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
#endif
__END_DECLS
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
index 7c373c4..8400aaa 100644
--- a/sysdeps/unix/bsd/sun/sunos4/mmap.c
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -25,16 +25,16 @@
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (caddr_t) -1
+ The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern caddr_t __mmap_syscall (caddr_t addr, size_t len,
+extern __ptr_t __mmap_syscall (__ptr_t addr, size_t len,
int prot, int flags, int fd, off_t offset);
-caddr_t
-__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+__ptr_t
+__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset);
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index d2a8998..420aed9 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -74,7 +74,7 @@
#define MS_INVALIDATE 0x2 /* Invalidate caches. */
/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__caddr_t) -1)
+#define MAP_FAILED ((__ptr_t) -1)
__BEGIN_DECLS
@@ -87,31 +87,31 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
-extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
+extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
+extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__caddr_t __addr, size_t __len));
-extern int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__ptr_t __addr, size_t __len));
+extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-extern int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
#endif
__END_DECLS
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index 4262fce..b884ba5 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -58,7 +58,7 @@
#endif
/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__caddr_t) -1)
+#define MAP_FAILED ((__ptr_t) -1)
__BEGIN_DECLS
@@ -71,33 +71,33 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
-extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset));
+extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
+extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__caddr_t __addr, size_t __len));
-extern int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__ptr_t __addr, size_t __len));
+extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Ultrix 4 does not implement `msync' or `madvise'. */
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-extern int msync __P ((caddr_t __addr, size_t __len));
+extern int msync __P ((__ptr_t __addr, size_t __len));
#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
#endif
__END_DECLS
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index c3a9238..ff1918e 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -68,7 +68,7 @@
#define MS_INVALIDATE 0x2 /* Invalidate caches. */
/* Return value of `mmap' in case of an error. */
-#define MAP_FAILED ((__caddr_t) -1)
+#define MAP_FAILED ((__ptr_t) -1)
__BEGIN_DECLS
@@ -81,31 +81,31 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
-extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
- int __flags, int __fd, __off_t __offset));
+extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
+extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-extern int __munmap __P ((__caddr_t __addr, size_t __len));
-extern int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__ptr_t __addr, size_t __len));
+extern int munmap __P ((__ptr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-extern int msync __P ((caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((__ptr_t __addr, size_t __len, int __flags));
#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice));
#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a893b0866808320e97f75e0e3def584f894d01ae
commit a893b0866808320e97f75e0e3def584f894d01ae
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 12 03:42:19 1997 +0000
m68k specific optimizations for string functions.
diff --git a/sysdeps/m68k/m68020/bits/string.h b/sysdeps/m68k/m68020/bits/string.h
new file mode 100644
index 0000000..6462ef0
--- /dev/null
+++ b/sysdeps/m68k/m68020/bits/string.h
@@ -0,0 +1,26 @@
+/* Optimized, inlined string functions. m680x0 version, x >= 2.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _STRING_H
+# error "Never use <bits/string.h> directly; include <string.h> instead."
+#endif
+
+/* Currently the only purpose of this file is to tell the generic inline
+ macros that unaligned memory access is possible. */
+#define _STRING_ARCH_unaligned 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=989166429cd61139380236fcc053e18b6fd64f4f
commit 989166429cd61139380236fcc053e18b6fd64f4f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 12 03:41:56 1997 +0000
(elf_machine_rela): Fix last change.
The R_68K_GLOB_DAT and R_68K_JMP_SLOT relocations really ignore
the addend, Richard.
(elf_machine_fixup_plt): Don't add the addend.
(elf_machine_plt_value): New function.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index cc0fb56..1d2045d 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -223,7 +223,16 @@ static inline void
elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
Elf32_Addr *reloc_addr, Elf32_Addr value)
{
- *reloc_addr = value + reloc->r_addend;
+ *reloc_addr = value;
+}
+
+/* Return the final value of a plt relocation. On the m68k the JMP_SLOT
+ relocation ignores the addend. */
+static inline Elf32_Addr
+elf_machine_plt_value (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr value)
+{
+ return value;
}
#endif /* !dl_machine_h */
@@ -272,7 +281,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
- *reloc_addr = value + reloc->r_addend;
+ *reloc_addr = value;
break;
case R_68K_8:
*(char *) reloc_addr = value + reloc->r_addend;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a325c2c023972dcfbda4fa62891d81e5637b422d
commit a325c2c023972dcfbda4fa62891d81e5637b422d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 12 03:40:26 1997 +0000
__setjmp is the same as _setjmp. Make the former a strong symbol and
the later a weak alias.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 48fe33b..ae3ceb5 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -70,11 +70,11 @@ END(__sigsetjmp)
/* Put these traditional entry points in the same file so that we can
elide much of the nonsense in trying to jmp to the real function. */
-ENTRY(_setjmp)
+ENTRY(__setjmp)
ldgp gp, 0(pv)
mov 0, a1
br $sigsetjmp_local
-END(_setjmp)
+END(__setjmp)
ENTRY(setjmp)
ldgp gp, 0(pv)
@@ -82,5 +82,5 @@ ENTRY(setjmp)
br $sigsetjmp_local
END(setjmp)
-weak_extern(_setjmp)
+weak_alias(__setjmp, _setjmp)
weak_extern(setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0fc15eae49ed1339cc9195e7fc13e04c7962fcf5
commit 0fc15eae49ed1339cc9195e7fc13e04c7962fcf5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 12 03:40:09 1997 +0000
(elf_machine_plt_value): New function.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index d3eb242..3f65ae9 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -353,6 +353,14 @@ elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
hasn't made it into Icache yet, so there's nothing to clean up. */
}
+/* Return the final value of a plt relocation. */
+static inline Elf64_Addr
+elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
+ Elf64_Addr value)
+{
+ return value + reloc->r_addend;
+}
+
#endif /* !dl_machine_h */
#ifdef RESOLVE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3abeec50c62f34a60793d3780c08aa162480e6d5
commit 3abeec50c62f34a60793d3780c08aa162480e6d5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:24:05 1997 +0000
Add stat LFS extensions.
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
index 752d4ee..ab0fa48 100644
--- a/sysdeps/unix/bsd/osf/alpha/bits/stat.h
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -49,7 +49,7 @@ struct stat
unsigned int st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- int st_blocks; /* Number of 512-byte blocks allocated. */
+ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
unsigned int st_flags;
unsigned int st_gen;
};
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
index 768b819..cc2a2ea 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -46,7 +46,7 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned int st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- int st_blocks; /* Nr. of 512-byte blocks allocated. */
+ __blkcnt_t st_blocks; /* Nr. of 512-byte blocks allocated. */
unsigned int st_flags;
unsigned int st_gen;
};
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
index a797b34..f27a75e 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -39,14 +39,22 @@ struct stat
{
unsigned long int st_dev;
long int st_pad1[3];
+#ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[2];
+#ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
+#else
+ __off64_t st_size; /* Size of file, in bytes. */
+#endif
/* SVR4 added this extra long to allow for expansion of off_t. */
long int st_pad3;
/*
@@ -60,8 +68,11 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
long int __reserved2;
long int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- long int st_blocks; /* Number of 512-byte blocks allocated. */
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
+#endif
char st_fstype[16]; /* Filesystem type name */
long int st_pad4[8];
/* Linux specific fields */
@@ -69,6 +80,42 @@ struct stat
unsigned int st_gen;
};
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ unsigned long int st_dev;
+ long int st_pad1[3];
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long int st_pad2[2];
+ __off64_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long int st_pad3;
+ /*
+ * Actually this should be timestruc_t st_atime, st_mtime and
+ * st_ctime but we don't have it under Linux.
+ */
+ __time_t st_atime; /* Time of last access. */
+ long int __reserved0;
+ __time_t st_mtime; /* Time of last modification. */
+ long int __reserved1;
+ __time_t st_ctime; /* Time of last status change. */
+ long int __reserved2;
+ long int st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16]; /* Filesystem type name */
+ long int st_pad4[8];
+ /* Linux specific fields */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+#endif
+
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
/* Encoding of the file mode. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
index 9b6fed0..f3f4473 100644
--- a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -58,7 +58,7 @@ struct stat
long st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- long st_blocks; /* Number of 512-byte blocks allocated. */
+ __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
char st_fstype[16]; /* The type of this filesystem. */
int st_aclcnt;
unsigned long st_level;
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
index ea5f1f4..82ab37f 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -52,7 +52,7 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctime_usec;
- long st_blksize; /* Optimal block size for I/O. */
+ __blkcnt_t st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
long st_blocks; /* Number of 512-byte blocks allocated. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eebf2c4a79b341de4f67eb3b1428a3f2dadf8143
commit eebf2c4a79b341de4f67eb3b1428a3f2dadf8143
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:20:13 1997 +0000
Use __fsblkcnt_t for some of the fields.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
index 3b23061..2727b27 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/statfs.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -23,22 +23,52 @@
#ifndef _BITS_STATFS_H
#define _BITS_STATFS_H
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
+
struct statfs
{
long int f_type;
#define f_fstyp f_type
long int f_bsize;
long int f_frsize; /* Fragment size - unsupported */
- long int f_blocks;
- long int f_bfree;
- long int f_files;
- long int f_ffree;
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_files;
+ __fsblkcnt_t f_ffree;
+ __fsblkcnt_t f_bavail;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
+#endif
+
+ /* Linux specials */
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_spare[6];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct statfs64
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
/* Linux specials */
- long int f_bavail;
__fsid_t f_fsid;
long int f_namelen;
long int f_spare[6];
};
+#endif
#endif /* bits/statfs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b64c790011a6714e982fd66f0d1fab2c596b5ac5
commit b64c790011a6714e982fd66f0d1fab2c596b5ac5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:19:29 1997 +0000
Add flock LFS extensions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index b70502f..1484064 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _FCNTL_H
-#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
@@ -27,8 +27,8 @@
/* In GNU, read and write are bits (unlike BSD). */
#ifdef __USE_GNU
-#define O_READ O_RDONLY /* Open for reading. */
-#define O_WRITE O_WRONLY /* Open for writing. */
+# define O_READ O_RDONLY /* Open for reading. */
+# define O_WRITE O_WRONLY /* Open for writing. */
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -48,25 +48,36 @@
#define O_FSYNC O_SYNC
#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
-#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get f_flags */
-#define F_SETFD 2 /* set f_flags */
-#define F_GETFL 3 /* more flags (cloexec) */
-#define F_SETFL 4
-#define F_GETLK 7
-#define F_SETLK 8
-#define F_SETLKW 9
-
-#define F_SETOWN 5 /* for sockets. */
-#define F_GETOWN 6 /* for sockets. */
+/* XXX missing */
+#define O_LARGEFILE 0
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+
+/* XXX missing */
+#define F_GETLK64 7 /* Get record locking info. */
+#define F_SETLK64 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 9 /* Set record locking info (blocking). */
+
+#ifdef __USE_BSD
+# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
+#endif
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-/* for posix fcntl() and lockf() */
-#define F_RDLCK 1
-#define F_WRLCK 2
-#define F_UNLCK 8
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf() */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 8 /* Remove lock. */
/* for old implementation of bsd flock () */
#define F_EXLCK 16 /* or 3 */
@@ -79,22 +90,34 @@
blocking */
#define LOCK_UN 8 /* remove lock */
+/* We don't need to support __USE_FILE_OFFSET64. */
struct flock
{
- short int l_type;
- short int l_whence;
- __off_t l_start;
- __off_t l_len;
- __pid_t l_pid;
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
};
+#endif
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FFSYNC O_FSYNC
-#define FASYNC O_ASYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
#endif /* Use BSD. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 2586140..09d6fb6 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _FCNTL_H
-#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
#include <sys/types.h>
@@ -26,8 +26,8 @@
/* In GNU, read and write are bits (unlike BSD). */
#ifdef __USE_GNU
-#define O_READ O_RDONLY /* Open for reading. */
-#define O_WRITE O_WRONLY /* Open for writing. */
+# define O_READ O_RDONLY /* Open for reading. */
+# define O_WRITE O_WRONLY /* Open for writing. */
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
@@ -47,25 +47,36 @@
#define O_NDELAY O_NONBLOCK
-#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get f_flags */
-#define F_SETFD 2 /* set f_flags */
-#define F_GETFL 3 /* more flags (cloexec) */
-#define F_SETFL 4
-#define F_GETLK 14
-#define F_SETLK 6
-#define F_SETLKW 7
-
-#define F_SETOWN 24 /* for sockets. */
-#define F_GETOWN 23 /* for sockets. */
+/* XXX missing */
+#define O_LARGEFILE 0
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 14 /* Get record locking info. */
+#define F_SETLK 6 /* Set record locking info (non-blocking). */
+#define F_SETLKW 7 /* Set record locking info (blocking). */
+
+/* XXX missing */
+#define F_GETLK64 14 /* Get record locking info. */
+#define F_SETLK64 6 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 7 /* Set record locking info (blocking). */
+
+#ifdef __USE_BSD
+# define F_SETOWN 5 /* Get owner of socket (receiver of SIGIO). */
+# define F_GETOWN 6 /* Set owner of socket (receiver of SIGIO). */
+#endif
/* for F_[GET|SET]FL */
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-/* for posix fcntl() and lockf() */
-#define F_RDLCK 0
-#define F_WRLCK 1
-#define F_UNLCK 2
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+#define F_RDLCK 0 /* Read lock. */
+#define F_WRLCK 1 /* Write lock. */
+#define F_UNLCK 2 /* Remove lock. */
/* for old implementation of bsd flock () */
#define F_EXLCK 4 /* or 3 */
@@ -78,23 +89,42 @@
blocking */
#define LOCK_UN 8 /* remove lock */
-typedef struct flock {
- short l_type;
- short l_whence;
- __off_t l_start;
- __off_t l_len;
- long l_sysid; /* XXX */
- __pid_t l_pid;
- long pad[4]; /* XXX */
-} flock_t;
+typedef struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ long int l_sysid; /* XXX */
+ __pid_t l_pid; /* Process holding the lock. */
+ long int pad[4]; /* XXX */
+ } flock_t;
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ long int l_sysid; /* XXX */
+ __pid_t l_pid; /* Process holding the lock. */
+ long int pad[4]; /* XXX */
+ };
+#endif
/* Define some more compatibility macros to be backward compatible with
BSD systems which did not managed to hide these kernel macros. */
#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FFSYNC O_FSYNC
-#define FASYNC O_ASYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
#endif /* Use BSD. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f059549514acfde89f636849b808de2451aaf745
commit f059549514acfde89f636849b808de2451aaf745
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:15:04 1997 +0000
Define LFS types.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
index 9a4666a..cf2668a 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -27,9 +27,9 @@
/* Convenience types. */
typedef unsigned char __u_char;
-typedef unsigned short __u_short;
+typedef unsigned short int __u_short;
typedef unsigned int __u_int;
-typedef unsigned long __u_long;
+typedef unsigned long int __u_long;
typedef unsigned long int __u_quad_t;
typedef long int __quad_t;
typedef signed char __int8_t;
@@ -52,6 +52,8 @@ typedef long int __off_t; /* Type of file sizes and offsets. */
typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
typedef int __pid_t; /* Type of process identifications. */
typedef long int __ssize_t; /* Type of a byte count, or error. */
+typedef long int __rlim_t; /* Type of resource counts. */
+typedef long int __rlim64_t; /* Type of resource counts (LFS). */
typedef struct
{
@@ -92,4 +94,19 @@ typedef struct
typedef int __key_t;
+
+/* Types from the Large File Support interface. */
+
+/* Type to count number os disk blocks. */
+typedef int __blkcnt_t;
+typedef __quad_t __blkcnt64_t;
+
+/* Type to count file system blocks. */
+typedef unsigned int __fsblkcnt_t;
+typedef __u_quad_t __fsblkcnt64_t;
+
+/* Type to count file system inodes. */
+typedef unsigned long int __fsfilcnt_t;
+typedef __u_quad_t __fsfilcnt64_t;
+
#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cfe3af132cdabab97733722c3a5323b6f231d5b6
commit cfe3af132cdabab97733722c3a5323b6f231d5b6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:12:31 1997 +0000
Linux/Alpha specific dirent definitions.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
new file mode 100644
index 0000000..4d717e4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
@@ -0,0 +1,50 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_DIRENT_H
+#define _BITS_DIRENT_H 1
+
+/* We don't have to make a difference for __USE_FILE_OFFSET64. */
+struct dirent
+ {
+ long int d_ino;
+ __off_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct dirent64
+ {
+ __ino64_t d_ino;
+ __off64_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+#endif
+
+#define d_fileno d_ino /* Backwards compatibility. */
+
+#undef _DIRENT_HAVE_D_NAMLEN
+#define _DIRENT_HAVE_D_RECLEN
+#define _DIRENT_HAVE_D_OFF
+#define _DIRENT_HAVE_D_TYPE
+
+#endif /* bits/dirent.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a6db5ab69f840e3d990ebec98023762585eb898
commit 5a6db5ab69f840e3d990ebec98023762585eb898
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 6 02:03:17 1997 +0000
Add LFS definitions.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
index ff55773..f51262d 100644
--- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
@@ -22,6 +22,8 @@
and `setrlimit' are not system calls, these are the values used by the C
library to emulate them. */
+#include <bits/types.h>
+
/* Kinds of resource limit. */
enum __rlimit_resource
{
@@ -52,19 +54,47 @@ enum __rlimit_resource
#define RLIMIT_NOFILE RLIMIT_NOFILE
#define RLIMIT_OFILE RLIMIT_OFILE
- RLIM_NLIMITS,
-
- RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */
-#define RLIM_INFINITY RLIM_INFINITY
+ RLIM_NLIMITS
};
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY 0x7fffffff
+#else
+# define RLIM_INFINITY 0x7fffffffffffffffL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffL
+#endif
+
+
+/* Type to represent quantities in resource limits. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+
struct rlimit
{
/* The current (soft) limit. */
- int rlim_cur;
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
/* The hard limit. */
- int rlim_max;
+ rlim64_t rlim_max;
};
+#endif
/* Whose usage statistics do you want? */
enum __rusage_who
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0b9a80c6e21d931be7176b4bee3fb20eaf91900
commit d0b9a80c6e21d931be7176b4bee3fb20eaf91900
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 30 16:58:36 1997 +0000
Rename exp2{,l,f} to __ieee754_exp2{,l,f}.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 2ab570f..1e68ea0 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -120,6 +120,7 @@ __inline_mathop(__ieee754_asin, asin)
__inline_mathop(__ieee754_cosh, cosh)
__inline_mathop(__ieee754_sinh, sinh)
__inline_mathop(__ieee754_exp, etox)
+__inline_mathop(__ieee754_exp2, twotox)
__inline_mathop(__ieee754_log10, log10)
__inline_mathop(__ieee754_log, logn)
__inline_mathop(__ieee754_sqrt, sqrt)
@@ -139,7 +140,6 @@ __inline_mathop(__log1p, lognp1)
__inline_mathop(__significand, getman)
__inline_mathop(__log2, log2)
-__inline_mathop(__exp2, twotox)
__inline_mathop(__trunc, intrz)
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c
index 3895280..24fac4f 100644
--- a/sysdeps/m68k/fpu/s_exp2.c
+++ b/sysdeps/m68k/fpu/s_exp2.c
@@ -1,2 +1,2 @@
-#define FUNC exp2
-#include <s_atan.c>
+#define FUNC __ieee754_exp2
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c
index 20ac916..593842e 100644
--- a/sysdeps/m68k/fpu/s_exp2f.c
+++ b/sysdeps/m68k/fpu/s_exp2f.c
@@ -1,2 +1,2 @@
-#define FUNC exp2f
-#include <s_atanf.c>
+#define FUNC __ieee754_exp2f
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c
index 19121b9..0ab2a42 100644
--- a/sysdeps/m68k/fpu/s_exp2l.c
+++ b/sysdeps/m68k/fpu/s_exp2l.c
@@ -1,2 +1,2 @@
-#define FUNC exp2l
-#include <s_atanl.c>
+#define FUNC __ieee754_exp2l
+#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff91cf3056981090bfc1a999e10267d11bca1c0f
commit ff91cf3056981090bfc1a999e10267d11bca1c0f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 27 00:20:13 1997 +0000
(elf_machine_relplt): Killed.
(ELF_MACHINE_JMP_SLOT): Renamed.
(elf_machine_fixup_plt): New function.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 44eefb2..cc0fb56 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -135,8 +135,6 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
".set _dl_runtime_profile, _dl_runtime_resolve");
#endif
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
-/* The PLT uses Elf32_Rela relocs. */
-#define elf_machine_relplt elf_machine_rela
/* Mask identifying addresses reserved for the user program,
@@ -216,11 +214,18 @@ _dl_start_user:
#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT)
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
-#define ELF_MACHINE_RELOC_NOPLT R_68K_JMP_SLOT
+#define ELF_MACHINE_JMP_SLOT R_68K_JMP_SLOT
/* The m68k never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
+static inline void
+elf_machine_fixup_plt (struct link_map *map, const Elf32_Rela *reloc,
+ Elf32_Addr *reloc_addr, Elf32_Addr value)
+{
+ *reloc_addr = value + reloc->r_addend;
+}
+
#endif /* !dl_machine_h */
#ifdef RESOLVE
@@ -267,7 +272,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
break;
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
- *reloc_addr = value;
+ *reloc_addr = value + reloc->r_addend;
break;
case R_68K_8:
*(char *) reloc_addr = value + reloc->r_addend;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8e5f5a44cf1d096a7f0142db6514571b86e0808
commit a8e5f5a44cf1d096a7f0142db6514571b86e0808
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 27 00:19:38 1997 +0000
(ELF_MACHINE_RELOC_NOPLT): Renamed.
(elf_alpha_fix_plt): Renamed elf_machine_fixup_plt.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index e0ba67b..d3eb242 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -91,6 +91,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf64_Addr plt;
extern void _dl_runtime_resolve (void);
+ extern void _dl_runtime_profile (void);
if (l->l_info[DT_JMPREL] && lazy)
{
@@ -100,7 +101,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will be called to perform the relocation. */
- *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
+ if (!profile)
+ *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
+ else
+ {
+ *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_profile;
+ /* Say that we really want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
/* Identify this shared object */
*(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
@@ -115,11 +123,10 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* This code is used in dl-runtime.c to call the `fixup' function
and then redirect to the address it returns. */
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \
-"/* Trampoline for _dl_runtime_resolver */
- .globl _dl_runtime_resolve
- .ent _dl_runtime_resolve
-_dl_runtime_resolve:
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name, IMB) asm ( "\
+ .globl " #tramp_name "
+ .ent " #tramp_name "
+" #tramp_name ":
lda $sp, -168($sp)
.frame $sp, 168, $26
/* Preserve all registers that C normally doesn't. */
@@ -146,18 +153,20 @@ _dl_runtime_resolve:
stq $29, 160($sp)
.mask 0x27ff01ff, -168
/* Set up our $gp */
- br $gp, 0f
-0: ldgp $gp, 0($gp)
+ br $gp, .+4
+ ldgp $gp, 0($gp)
.prologue 1
- /* Set up the arguments for _dl_runtime_resolve. */
+ /* Set up the arguments for fixup: */
/* $16 = link_map out of plt0 */
/* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
+ /* $18 = return address */
subq $28, $27, $17
ldq $16, 8($27)
subq $17, 20, $17
+ mov $26, $18
addq $17, $17, $17
/* Do the fixup */
- bsr $26, fixup..ng
+ bsr $26, " #fixup_name "..ng
/* Move the destination address into position. */
mov $0, $27
/* Restore program registers. */
@@ -183,14 +192,21 @@ _dl_runtime_resolve:
ldq $25, 152($sp)
ldq $29, 160($sp)
/* Flush the Icache after having modified the .plt code. */
- imb
+ " #IMB "
/* Clean up and turn control to the destination */
lda $sp, 168($sp)
jmp $31, ($27)
- .end _dl_runtime_resolve");
+ .end " #tramp_name)
-/* The PLT uses Elf64_Rela relocs. */
-#define elf_machine_relplt elf_machine_rela
+#ifndef PROF
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop);
+#else
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup); \
+ strong_alias (_dl_runtime_resolve, _dl_runtime_profile);
+#endif
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
@@ -255,37 +271,31 @@ _dl_start_user:
#define elf_machine_lookup_noexec_p(type) (0)
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
-#define ELF_MACHINE_RELOC_NOPLT R_ALPHA_JMP_SLOT
+#define ELF_MACHINE_JMP_SLOT R_ALPHA_JMP_SLOT
/* The alpha never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-#endif /* !dl_machine_h */
-
-#ifdef RESOLVE
-
/* Fix up the instructions of a PLT entry to invoke the function
rather than the dynamic linker. */
static inline void
-elf_alpha_fix_plt(struct link_map *l,
- const Elf64_Rela *reloc,
- Elf64_Addr got_addr,
- Elf64_Addr value)
+elf_machine_fixup_plt(struct link_map *l, const Elf64_Rela *reloc,
+ Elf64_Addr *got_addr, Elf64_Addr value)
{
const Elf64_Rela *rela_plt;
Elf64_Word *plte;
long edisp;
+ /* Store the value we are going to load. */
+ *got_addr = value;
+
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
-
rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr);
-
plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32);
plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
-
edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4;
if (edisp >= -0x100000 && edisp < 0x100000)
@@ -299,7 +309,7 @@ elf_alpha_fix_plt(struct link_map *l,
lo = (short)hi;
hi = (hi - lo) >> 16;
- /* Emit "lda $27,L($27)" */
+ /* Emit "lda $27,lo($27)" */
plte[1] = 0x237b0000 | (lo & 0xffff);
/* Emit "br $31,function" */
@@ -309,7 +319,7 @@ elf_alpha_fix_plt(struct link_map *l,
committed to memory before the first is overwritten. */
__asm__ __volatile__("wmb" : : : "memory");
- /* Emit "ldah $27,H($27)" */
+ /* Emit "ldah $27,hi($27)" */
plte[0] = 0x277b0000 | (hi & 0xffff);
}
else
@@ -319,11 +329,11 @@ elf_alpha_fix_plt(struct link_map *l,
into the cache. */
int hi, lo;
- hi = got_addr - (Elf64_Addr)&plte[0];
+ hi = (Elf64_Addr)got_addr - (Elf64_Addr)&plte[0];
lo = (short)hi;
hi = (hi - lo) >> 16;
- /* Emit "ldq $27,L($27)" */
+ /* Emit "ldq $27,lo($27)" */
plte[1] = 0xa77b0000 | (lo & 0xffff);
/* Emit "jmp $31,($27)" */
@@ -333,7 +343,7 @@ elf_alpha_fix_plt(struct link_map *l,
committed to memory before the first is overwritten. */
__asm__ __volatile__("wmb" : : : "memory");
- /* Emit "ldah $27,H($27)" */
+ /* Emit "ldah $27,hi($27)" */
plte[0] = 0x277b0000 | (hi & 0xffff);
}
@@ -343,6 +353,10 @@ elf_alpha_fix_plt(struct link_map *l,
hasn't made it into Icache yet, so there's nothing to clean up. */
}
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
static inline void
@@ -382,14 +396,12 @@ elf_machine_rela (struct link_map *map,
loadbase = RESOLVE (&sym, version, r_type);
sym_value = sym ? loadbase + sym->st_value : 0;
+ sym_value += reloc->r_addend;
if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
else if (r_type == R_ALPHA_JMP_SLOT)
- {
- *reloc_addr = sym_value;
- elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value);
- }
+ elf_machine_fixup_plt (map, reloc, reloc_addr, sym_value);
else if (r_type == R_ALPHA_REFQUAD)
{
sym_value += *reloc_addr;
@@ -405,10 +417,9 @@ elf_machine_rela (struct link_map *map,
= (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
sym_value -= map->l_addr;
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
+ sym_value -= reloc->r_addend;
}
- else
#endif
- sym_value += reloc->r_addend;
*reloc_addr = sym_value;
}
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=127f2c3b834a016becb8532a4edc44810c1cc8ef
commit 127f2c3b834a016becb8532a4edc44810c1cc8ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Sep 21 01:23:55 1997 +0000
Call __getopt_clean_environment with additional argument.
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index b057aeb..a411a1b 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -27,7 +27,7 @@
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
-extern void __getopt_clean_environment (void);
+extern void __getopt_clean_environment (char **);
extern void __libc_global_ctors (void);
unsigned int __hurd_threadvar_max;
@@ -110,7 +110,7 @@ init1 (int argc, char *arg0, ...)
__libc_init (argc, argv, __environ);
/* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment ();
+ __getopt_clean_environment (envp);
#ifdef PIC
__libc_global_ctors ();
@@ -169,14 +169,14 @@ __init (int *data)
be the return address for `init1'; we will jump there with NEWSP
as the stack pointer. */
return newsp;
- }
+ }
/* The argument data is just above the stack frame we will unwind by
returning. */
return (void *) data;
(void) &__init;
-}
+}
#ifdef PIC
/* This function is called to initialize the shared C library.
@@ -399,7 +399,7 @@ ___libc_init_first (int return_addr, int argc, ...)
#endif
RUN_HOOK (_hurd_preinit_hook, ());
-
+
_hurd_startup ((void **) &argc, &doinit);
(void) &___libc_init_first;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=384cd03a585b37d76bf52bee27e2f1e3926795e1
commit 384cd03a585b37d76bf52bee27e2f1e3926795e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 16 00:41:55 1997 +0000
Define bzero as weak alias of __bzero.
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index b70ade6..1e07923 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -78,7 +78,7 @@ $tail: bne t4, 1f # is there a tail to do?
.end bzero_loop
-ENTRY(bzero)
+ENTRY(__bzero)
#ifdef PROF
ldgp gp, 0(pv)
lda AT, _mcount
@@ -117,3 +117,4 @@ $oneq:
$done: ret
END(bzero)
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s
index 5f90763..dff59ba 100644
--- a/sysdeps/vax/bzero.s
+++ b/sysdeps/vax/bzero.s
@@ -39,7 +39,7 @@
#include "DEFS.h"
-ENTRY(bzero, 0)
+ENTRY(__bzero, 0)
movl 4(ap),r3
jbr 2f
1:
@@ -51,3 +51,4 @@ ENTRY(bzero, 0)
jgtr 1b
movc5 $0,(r3),$0,8(ap),(r3)
ret
+weak_alias (__bzero, bzero)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90864a576a12672ccb9b35c7a09ccad40c109b37
commit 90864a576a12672ccb9b35c7a09ccad40c109b37
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 16 00:40:22 1997 +0000
Low-level atomicity functions for m68k.
diff --git a/sysdeps/m68k/m68020/atomicity.h b/sysdeps/m68k/m68020/atomicity.h
new file mode 100644
index 0000000..d74b819
--- /dev/null
+++ b/sysdeps/m68k/m68020/atomicity.h
@@ -0,0 +1,65 @@
+/* Low-level functions for atomic operations. m680x0 version, x >= 2.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _ATOMICITY_H
+#define _ATOMICITY_H 1
+
+#include <inttypes.h>
+
+
+static inline int
+__attribute__ ((unused))
+exchange_and_add (volatile uint32_t *mem, int val)
+{
+ register int result = *mem;
+ register int temp;
+ __asm__ __volatile__ ("1: move%.l %0,%1;"
+ " add%.l %2,%1;"
+ " cas%.l %0,%1,%3;"
+ " jbne 1b"
+ : "=d" (result), "=&d" (temp)
+ : "d" (val), "m" (*mem), "0" (result) : "memory");
+ return result;
+}
+
+static inline void
+__attribute__ ((unused))
+atomic_add (volatile uint32_t *mem, int val)
+{
+ /* XXX Use cas here as well? */
+ __asm__ __volatile__ ("add%.l %0,%1"
+ : : "ir" (val), "m" (*mem) : "memory");
+}
+
+static inline int
+__attribute__ ((unused))
+compare_and_swap (volatile long int *p, long int oldval, long int newval)
+{
+ char ret;
+ long int readval;
+
+ __asm__ __volatile__ ("cas%.l %2,%3,%1; seq %0"
+ : "=dm" (ret), "=m" (*p), "=d" (readval)
+ : "d" (newval), "m" (*p), "2" (oldval));
+ return ret;
+}
+
+#endif /* atomicity.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06fa7473dc5ea57dc0d5e0987e8ba859fb40fdcb
commit 06fa7473dc5ea57dc0d5e0987e8ba859fb40fdcb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:15:02 1997 +0000
Rewrite in terms of an array.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index d461205..9aa3046 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -17,30 +17,57 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-typedef struct
- {
- /* Integer registers:
- $0 is the return value;
- $1-$8, $22-$25, $28 are call-used;
- $9-$14 we save here;
- $15 is the FP and we save it here;
- $16-$21 are input arguments (call-used);
- $26 is the return PC and we save it here;
- $27 is the procedure value (i.e., the address of __setjmp);
- $29 is the global pointer, which the caller will reconstruct
- from the return address restored in $26;
- $30 is the stack pointer and we save it here;
- $31 is always zero. */
- long int __9, __10, __11, __12, __13, __14;
- long int *__pc, *__fp, *__sp;
+/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
+ We use an array of 'long int' instead, to make writing the
+ assembler easier. Naturally, user code should not depend on
+ either representation. */
-#if 1 /* XXX need predefine for TARGET_FPREGS */
- /* Floating-point registers:
- $f0 is the floating return value;
- $f1, $f10-$f15, $f22-$f30 are call-used;
- $f2-$f9 we save here;
- $f16-$21 are input args (call-used);
- $f31 is always zero. */
- double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9;
-#endif /* Have FP regs. */
- } __jmp_buf[1];
+/*
+ * Integer registers:
+ * $0 is the return value (va);
+ * $1-$8, $22-$25, $28 are call-used (t0-t7, t8-t11, at);
+ * $9-$14 we save here (s0-s5);
+ * $15 is the FP and we save it here (fp or s6);
+ * $16-$21 are input arguments (call-used) (a0-a5);
+ * $26 is the return PC and we save it here (ra);
+ * $27 is the procedure value (i.e., the address of __setjmp) (pv or t12);
+ * $29 is the global pointer, which the caller will reconstruct
+ * from the return address restored in $26 (gp);
+ * $30 is the stack pointer and we save it here (sp);
+ * $31 is always zero (zero).
+ *
+ * Floating-point registers:
+ * $f0 is the floating return value;
+ * $f1, $f10-$f15, $f22-$f30 are call-used;
+ * $f2-$f9 we save here;
+ * $f16-$21 are input args (call-used);
+ * $f31 is always zero.
+ *
+ * Note that even on Alpha hardware that does not have an FPU (there
+ * isn't such a thing currently) it is required to implement the FP
+ * registers.
+ */
+
+#if defined(__USE_MISC) || defined(__ASSEMBLY__)
+#define JB_S0 0
+#define JB_S1 1
+#define JB_S2 2
+#define JB_S3 3
+#define JB_S4 4
+#define JB_S5 5
+#define JB_PC 6
+#define JB_FP 7
+#define JB_SP 8
+#define JB_F2 9
+#define JB_F3 10
+#define JB_F4 11
+#define JB_F5 12
+#define JB_F6 13
+#define JB_F7 14
+#define JB_F8 15
+#define JB_F9 16
+#endif
+
+#ifndef __ASSEMBLY__
+typedef long int __jmp_buf[17];
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aaf05db5791af5054be6fb66e72051d52c9d872e
commit aaf05db5791af5054be6fb66e72051d52c9d872e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:14:53 1997 +0000
Not needed anymore.
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
deleted file mode 100644
index fa26975..0000000
--- a/sysdeps/alpha/setjmp_aux.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Global register decls must come before any function defn. */
-
-register long int
- r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
- r13 asm ("$13"), r14 asm ("$14");
-
-register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26");
-
-#if 1 /* XXX */
-register double
- f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"),
- f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
-#endif
-
-
-#include <setjmp.h>
-
-
-/* Save the current program position in ENV and return 0. */
-int
-__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp)
-{
- /* Save the integer registers. */
- env[0].__jmpbuf[0].__9 = r9;
- env[0].__jmpbuf[0].__10 = r10;
- env[0].__jmpbuf[0].__11 = r11;
- env[0].__jmpbuf[0].__12 = r12;
- env[0].__jmpbuf[0].__13 = r13;
- env[0].__jmpbuf[0].__14 = r14;
-
-#if 1 /* XXX */
- /* Save the floating point registers. */
- env[0].__jmpbuf[0].__f2 = f2;
- env[0].__jmpbuf[0].__f3 = f3;
- env[0].__jmpbuf[0].__f4 = f4;
- env[0].__jmpbuf[0].__f5 = f5;
- env[0].__jmpbuf[0].__f6 = f6;
- env[0].__jmpbuf[0].__f7 = f7;
- env[0].__jmpbuf[0].__f8 = f8;
- env[0].__jmpbuf[0].__f9 = f9;
-#endif
-
- /* Save the return address of our caller, where longjmp will jump to. */
- env[0].__jmpbuf[0].__pc = retpc;
-
- /* Save the FP and SP of our caller. The __sigsetjmp entry point
- simply puts these in the argument registers for us to fetch. */
- env[0].__jmpbuf[0].__fp = fp;
- env[0].__jmpbuf[0].__sp = sp;
-
- /* Save the signal mask if requested. */
- __sigjmp_save (env, savemask);
-
- retpc = env[0].__jmpbuf[0].__pc; /* restore ra, ugly... */
-
- /* Return to the original caller of __sigsetjmp. */
- return 0;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=38a2fc1c5161d90dfe6f418e3715ba4059128edf
commit 38a2fc1c5161d90dfe6f418e3715ba4059128edf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:14:40 1997 +0000
Do the work; don't call __setjmp_aux. Move _setjmp and setjmp from
bsd-*.S.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 4b2e147..48fe33b 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,21 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define __ASSEMBLY__
+
#include <sysdep.h>
+#include <bits/setjmp.h>
+
+ .ent __sigsetjmp
+ .global __sigsetjmp
+__sigsetjmp:
+ ldgp gp, 0(pv)
-/* The function __sigsetjmp_aux saves all the registers, but it can't
- reliably access the stack or frame pointers, so we pass them in as
- extra arguments. */
-ENTRY (__sigsetjmp)
- ldgp $29, 0($27)
+$sigsetjmp_local:
+ subq sp, 16, sp
+ .frame sp, 16, ra, 0
+ stq ra, 0(sp)
+ .mask 0x04000000, -16
#ifdef PROF
.set noat
lda AT, _mcount
@@ -31,8 +39,48 @@ ENTRY (__sigsetjmp)
#endif
.prologue 1
- bis $30, $30, $18 /* Pass SP as 3rd arg. */
- bis $15, $15, $19 /* Pass FP as 4th arg. */
- jmp $31, __sigsetjmp_aux /* Call __sigsetjmp_aux. */
+ stq s0, JB_S0*8(a0)
+ stq s1, JB_S1*8(a0)
+ stq s2, JB_S2*8(a0)
+ stq s3, JB_S3*8(a0)
+ stq s4, JB_S4*8(a0)
+ stq s5, JB_S5*8(a0)
+ stq ra, JB_PC*8(a0)
+ addq sp, 16, t0
+ stq fp, JB_FP*8(a0)
+ stq t0, JB_SP*8(a0)
+ stt $f2, JB_F2*8(a0)
+ stt $f3, JB_F3*8(a0)
+ stt $f4, JB_F4*8(a0)
+ stt $f5, JB_F5*8(a0)
+ stt $f6, JB_F6*8(a0)
+ stt $f7, JB_F7*8(a0)
+ stt $f8, JB_F8*8(a0)
+ stt $f9, JB_F9*8(a0)
+
+ /* Call to C to (potentially) save our signal mask. */
+ jsr ra, __sigjmp_save
+
+ ldq ra, 0(sp)
+ addq sp, 16, sp
+ ret
+
+END(__sigsetjmp)
+
+/* Put these traditional entry points in the same file so that we can
+ elide much of the nonsense in trying to jmp to the real function. */
+
+ENTRY(_setjmp)
+ ldgp gp, 0(pv)
+ mov 0, a1
+ br $sigsetjmp_local
+END(_setjmp)
+
+ENTRY(setjmp)
+ ldgp gp, 0(pv)
+ mov 1, a1
+ br $sigsetjmp_local
+END(setjmp)
- END(__sigsetjmp)
+weak_extern(_setjmp)
+weak_extern(setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33ec2a1c5eb7399406a929593c5c8ec07df0a1a0
commit 33ec2a1c5eb7399406a929593c5c8ec07df0a1a0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:14:24 1997 +0000
Stub out.
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index 07fb0c7..4e6a2da 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -1,39 +1 @@
-/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- in setjmp doesn't clobber the state restored by longjmp. */
-
-#include <sysdep.h>
-
-ENTRY(_setjmp)
- ldgp $29,0($27)
-#ifdef PROF
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
-#endif
- .prologue 1
- bis $31, $31, $17 /* Pass a second argument of zero. */
- jmp $31, __sigsetjmp /* Call __sigsetjmp. */
- END(_setjmp)
-
-strong_alias_asm(_setjmp, __setjmp)
+/* _setjmp is in setjmp.S */
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index cf5bf18..1da848d 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -1,37 +1 @@
-/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
- We cannot do it in C because it must be a tail-call, so frame-unwinding
- in setjmp doesn't clobber the state restored by longjmp. */
-
-#include <sysdep.h>
-
-ENTRY(setjmp)
- ldgp $29, 0($27)
-#ifdef PROF
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
-#endif
- .prologue 1
- bis $31, 1, $17 /* Pass a second argument of one. */
- jmp $31, __sigsetjmp /* Call __sigsetjmp. */
- END(setjmp)
+/* setjmp is in setjmp.S */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e79246283688d42e5c45b1920374a63f1d4d839
commit 7e79246283688d42e5c45b1920374a63f1d4d839
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:14:07 1997 +0000
We have an assembler versin now.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
deleted file mode 100644
index 98eba7c..0000000
--- a/sysdeps/alpha/__longjmp.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Global register vars must come before any function defn. */
-
-register long int
- r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
- r13 asm ("$13"), r14 asm ("$14");
-
-register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26");
-
-#if 1 /* XXX */
-register double
- f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"),
- f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
-#endif
-
-#include <setjmp.h>
-
-
-/* Jump to the position specified by ENV, causing the
- setjmp call there to return VAL, or 1 if VAL is 0. */
-void
-__longjmp (__jmp_buf env, int val)
-{
- register long int retval asm ("$0");
-
- /* Restore the integer registers. */
- r9 = env[0].__9;
- r10 = env[0].__10;
- r11 = env[0].__11;
- r12 = env[0].__12;
- r13 = env[0].__13;
- r14 = env[0].__14;
-
-#if 1 /* XXX */
- /* Restore the floating point registers. */
- f2 = env[0].__f2;
- f3 = env[0].__f3;
- f4 = env[0].__f4;
- f5 = env[0].__f5;
- f6 = env[0].__f6;
- f7 = env[0].__f7;
- f8 = env[0].__f8;
- f9 = env[0].__f9;
-#endif
-
- /* Set the return PC to that of setjmp's caller. */
- retpc = env[0].__pc;
-
- /* Restore the FP and SP of setjmp's caller. */
- fp = env[0].__fp;
- sp = env[0].__sp;
-
- /* Return VAL (or 1 if VAL is zero) to setjmp's caller.
-
- We use an asm here rather than a normal C return statement
- just in case the compiler wanted to do some stack frobnication
- in the function epilogue. Since we have already restored
- precisely the FP and SP the desired environment needs,
- we must avoid the compiler doing anything with the stack. */
-
-
- asm volatile
- ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */
- "ret $31, (%2), 1" /* return $0 */
- : "=r" (retval)
- /* The "0" constraint should force VAL into $0. */
- : "0" (val), "r" (retpc));
-
- while (1)
- {
- /* The loop is just to avoid `volatile function does return' warnings.
- The instruction will only be executed once. */
- asm volatile ("");
- }
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b14ec3ad7271c667ea658ed6d0d68199f93a878
commit 3b14ec3ad7271c667ea658ed6d0d68199f93a878
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:13:56 1997 +0000
longjmp implementation using array.
diff --git a/sysdeps/alpha/__longjmp.S b/sysdeps/alpha/__longjmp.S
new file mode 100644
index 0000000..3473117
--- /dev/null
+++ b/sysdeps/alpha/__longjmp.S
@@ -0,0 +1,59 @@
+/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __ASSEMBLY__
+
+#include <sysdep.h>
+#include <bits/setjmp.h>
+
+
+ENTRY(__longjmp)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ .set noat
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .set at
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ mov a1, v0
+ ldq s0, JB_S0*8(a0)
+ ldq s1, JB_S1*8(a0)
+ ldq s2, JB_S2*8(a0)
+ ldq s3, JB_S3*8(a0)
+ ldq s4, JB_S4*8(a0)
+ ldq s5, JB_S5*8(a0)
+ ldq ra, JB_PC*8(a0)
+ ldq fp, JB_FP*8(a0)
+ ldq t0, JB_SP*8(a0)
+ ldt $f2, JB_F2*8(a0)
+ ldt $f3, JB_F3*8(a0)
+ ldt $f4, JB_F4*8(a0)
+ ldt $f5, JB_F5*8(a0)
+ ldt $f6, JB_F6*8(a0)
+ ldt $f7, JB_F7*8(a0)
+ ldt $f8, JB_F8*8(a0)
+ ldt $f9, JB_F9*8(a0)
+ cmoveq v0, 1, v0
+ mov t0, sp
+ ret
+
+END(__longjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f9be5843e31f2c07f8f8e12bdbe5a62023adf6d
commit 1f9be5843e31f2c07f8f8e12bdbe5a62023adf6d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 11 03:13:30 1997 +0000
Kill setjmp_aux.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 5fe8e4e..6cf4a17 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -21,10 +21,6 @@ ifeq ($(subdir),gmon)
sysdep_routines += _mcount
endif
-ifeq ($(subdir),setjmp)
-sysdep_routines += setjmp_aux
-endif
-
ifeq ($(subdir),gnulib)
sysdep_routines += $(divrem)
endif
@@ -45,6 +41,6 @@ endif
divrem := divl divq reml remq
-# For now, build everything with full IEEE math support.
+# For now, build everything with full IEEE math support.
# TODO: build separate libm and libm-ieee.
sysdep-CFLAGS += -mieee
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c48cc591fae2fd166309f32bc3d0b55df7c413a4
commit c48cc591fae2fd166309f32bc3d0b55df7c413a4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 5 02:21:22 1997 +0000
add missing file
diff --git a/sysdeps/vax/strcmp.s b/sysdeps/vax/strcmp.s
new file mode 100644
index 0000000..c9c5b47
--- /dev/null
+++ b/sysdeps/vax/strcmp.s
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strcmp.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Compare string s1 lexicographically to string s2.
+ * Return:
+ * 0 s1 == s2
+ * > 0 s1 > s2
+ * < 0 s2 < s2
+ *
+ * strcmp(s1, s2)
+ * char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strcmp, 0)
+ movl 4(ap),r1 # r1 = s1
+ movl 8(ap),r3 # r3 = s2
+ subb3 (r3),(r1),r0 # quick check for first char different
+ beql 1f # have to keep checking
+ cvtbl r0,r0
+ ret
+1:
+ clrl r5 # calculate min bytes to next page boundary
+ subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1
+ subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2
+ cmpb r0,r5 # r5 = min(r0, r5);
+ bgtru 2f
+ movb r0,r5
+2:
+ incl r5 # r5 = min bytes to next page boundary
+ cmpc3 r5,(r1),(r3) # compare strings
+ bneq 3f
+ subl2 r5,r1 # check if found null yet
+ locc $0,r5,(r1)
+ beql 1b # not yet done, continue checking
+ subl2 r0,r3
+ mnegb (r3),r0 # r0 = '\0' - *s2
+ cvtbl r0,r0
+ ret
+3:
+ subl2 r0,r5 # check for null in matching string
+ subl2 r5,r1
+ locc $0,r5,(r1)
+ bneq 4f
+ subb3 (r3),(r1),r0 # r0 = *s1 - *s2
+ cvtbl r0,r0
+ ret
+4:
+ clrl r0 # both the same to null
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ea420deaef3710c200208ed24a9fdedf8210a77d
commit ea420deaef3710c200208ed24a9fdedf8210a77d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 5 01:40:47 1997 +0000
(elf_machine_load_address): Use _dl_start instead of a local label, to
avoid getting an unreadable label name.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 75434cd..44eefb2 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -56,8 +56,8 @@ static inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
- asm ("1: lea 1b(%%pc), %0\n"
- " sub.l 1b@GOTPC(%%pc), %0"
+ asm ("lea _dl_start(%%pc), %0\n\t"
+ "sub.l _dl_start@GOTPC(%%pc), %0"
: "=a" (addr));
return addr;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a698457a19725f2a265ef648fecedcbd938c7ab5
commit a698457a19725f2a265ef648fecedcbd938c7ab5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 5 01:40:38 1997 +0000
(pic-ccflag): Override it for more efficient code (together with a
change in gcc).
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 0f811bc..a056360 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,8 @@ endif
asm-CPPFLAGS += $(m68k-syntax-flag)
+pic-ccflag = -fpic
+
# Make sure setjmp.c is compiled with a frame pointer
CFLAGS-setjmp.c := -fno-omit-frame-pointer
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d930b435a999517e594afd65faa5f1d534dc6c4f
commit d930b435a999517e594afd65faa5f1d534dc6c4f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 5 01:38:54 1997 +0000
High-quality sqrt implementation for Alpha.
diff --git a/sysdeps/alpha/fpu/e_sqrt.c b/sysdeps/alpha/fpu/e_sqrt.c
new file mode 100644
index 0000000..76fa015
--- /dev/null
+++ b/sysdeps/alpha/fpu/e_sqrt.c
@@ -0,0 +1,256 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * We have three versions, depending on how exact we need the results.
+ */
+
+#if defined(_IEEE_FP) && defined(_IEEE_FP_INEXACT)
+
+/* Most demanding: go to the original source. */
+#include <libm-ieee754/e_sqrt.c>
+
+#else
+
+/* Careful with rearranging this without consulting the assembly below. */
+const static struct sqrt_data_struct {
+ unsigned long dn, up, half, almost_three_half;
+ unsigned long one_and_a_half, two_to_minus_30, one, nan;
+ const int T2[64];
+} sqrt_data = {
+ 0x3fefffffffffffff, /* __dn = nextafter(1,-Inf) */
+ 0x3ff0000000000001, /* __up = nextafter(1,+Inf) */
+ 0x3fe0000000000000, /* half */
+ 0x3ff7ffffffc00000, /* almost_three_half = 1.5-2^-30 */
+ 0x3ff8000000000000, /* one_and_a_half */
+ 0x3e10000000000000, /* two_to_minus_30 */
+ 0x3ff0000000000000, /* one */
+ 0xffffffffffffffff, /* nan */
+
+ { 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866,
+ 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,
+ 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,
+ 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,
+ 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,
+ 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,
+ 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,
+ 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd }
+};
+
+#ifdef _IEEE_FP
+/*
+ * This version is much faster than the standard one included above,
+ * but it doesn't maintain the inexact flag.
+ */
+
+#define lobits(x) (((unsigned int *)&x)[0])
+#define hibits(x) (((unsigned int *)&x)[1])
+
+static inline double initial_guess(double x, unsigned int k,
+ const struct sqrt_data_struct * const ptr)
+{
+ double ret = 0.0;
+
+ k = 0x5fe80000 - (k >> 1);
+ k = k - ptr->T2[63&(k>>14)];
+ hibits(ret) = k;
+ return ret;
+}
+
+/* up = nextafter(1,+Inf), dn = nextafter(1,-Inf) */
+
+#define __half (ptr->half)
+#define __one_and_a_half (ptr->one_and_a_half)
+#define __two_to_minus_30 (ptr->two_to_minus_30)
+#define __one (ptr->one)
+#define __up (ptr->up)
+#define __dn (ptr->dn)
+#define __Nan (ptr->nan)
+
+#define Double(x) (*(double *)&x)
+
+/* Multiply with chopping rounding.. */
+#define choppedmul(a,b,c) \
+ __asm__("multc %1,%2,%0":"=&f" (c):"f" (a), "f" (b))
+
+double
+__ieee754_sqrt(double x)
+{
+ const struct sqrt_data_struct * const ptr = &sqrt_data;
+ unsigned long k, bits;
+ double y, z, zp, zn;
+ double dn, up, low, high;
+ double half, one_and_a_half, one, two_to_minus_30;
+
+ *(double *)&bits = x;
+ k = bits;
+
+ /* Negative or NaN or Inf */
+ if ((k >> 52) >= 0x7ff)
+ goto special;
+ y = initial_guess(x, k >> 32, ptr);
+ half = Double(__half);
+ one_and_a_half = Double(__one_and_a_half);
+ y = y*(one_and_a_half - half*x*y*y);
+ dn = Double(__dn);
+ two_to_minus_30 = Double(__two_to_minus_30);
+ y = y*((one_and_a_half - two_to_minus_30) - half*x*y*y);
+ up = Double(__up);
+ z = x*y;
+ one = Double(__one);
+ z = z + half*z*(one-z*y);
+
+ choppedmul(z,dn,zp);
+ choppedmul(z,up,zn);
+
+ choppedmul(z,zp,low);
+ low = low - x;
+ choppedmul(z,zn,high);
+ high = high - x;
+
+ /* I can't get gcc to use fcmov's.. */
+ __asm__("fcmovge %2,%3,%0"
+ :"=f" (z)
+ :"0" (z), "f" (low), "f" (zp));
+ __asm__("fcmovlt %2,%3,%0"
+ :"=f" (z)
+ :"0" (z), "f" (high), "f" (zn));
+ return z; /* Argh! gcc jumps to end here */
+
+special:
+ /* throw away sign bit */
+ k <<= 1;
+ /* -0 */
+ if (!k)
+ return x;
+ /* special? */
+ if ((k >> 53) == 0x7ff) {
+ /* NaN? */
+ if (k << 11)
+ return x;
+ /* sqrt(+Inf) = +Inf */
+ if (x > 0)
+ return x;
+ }
+
+ x = Double(__Nan);
+ return x;
+}
+
+#else
+/*
+ * This version is much faster than generic sqrt implementation, but
+ * it doesn't handle exceptional values or the inexact flag.
+ */
+
+asm ("\
+ /* Define offsets into the structure defined in C above. */
+ $DN = 0*8
+ $UP = 1*8
+ $HALF = 2*8
+ $ALMOST_THREE_HALF = 3*8
+ $NAN = 7*8
+ $T2 = 8*8
+
+ /* Stack variables. */
+ $K = 0
+ $Y = 8
+
+ .text
+ .align 3
+ .globl __ieee754_sqrt
+ .ent __ieee754_sqrt
+__ieee754_sqrt:
+ ldgp $29, 0($27)
+ subq $sp, 16, $sp
+ .frame $sp, 16, $26, 0\n"
+#ifdef PROF
+" lda $28, _mcount
+ jsr $28, ($28), _mcount\n"
+#endif
+" .prologue 1
+
+ stt $f16, $K($sp)
+ lda $4, sqrt_data # load base address into t3
+ fblt $f16, $negative
+
+ /* Compute initial guess. */
+
+ .align 3
+
+ ldah $2, 0x5fe8 # e0 :
+ ldq $3, $K($sp) # .. e1 :
+ ldt $f12, $HALF($4) # e0 :
+ ldt $f18, $ALMOST_THREE_HALF($4) # .. e1 :
+ srl $3, 33, $1 # e0 :
+ mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5
+ subl $2, $1, $2 # e0 :
+ addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
+ srl $2, 12, $1 # e0 :
+ and $1, 0xfc, $1 # .. e1 :
+ addq $1, $4, $1 # e0 :
+ ldl $1, $T2($1) # .. e1 :
+ addt $f12, $f17, $f15 # fa : $f15 = 1.5
+ subl $2, $1, $2 # .. e1 :
+ sll $2, 32, $2 # e0 :
+ ldt $f14, $DN($4) # .. e1 :
+ stq $2, $Y($sp) # e0 :
+ ldt $f13, $Y($sp) # e1 :
+
+ mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
+ mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y
+ subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y)
+ mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y)
+ mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp
+ mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
+ subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp
+ mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1
+ subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5)
+ ldt $f15, $UP($4) # .. e1 :
+ mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp
+ mult $f10, $f13, $f11 # fm : $f11 = z*ypp
+ mult $f10, $f12, $f12 # fm : $f12 = z*0.5
+ subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp
+ mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp)
+ addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp)
+
+ mult/c $f0, $f14, $f12 # fm : zmi = zp * DN
+ mult/c $f0, $f15, $f11 # fm : zpl = zp * UP
+ mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
+ mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
+
+ subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x
+ subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x
+
+ fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res
+ fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res
+
+ addq $sp, 16, $sp # e0 :
+ ret # .. e1 :
+
+$negative:
+ ldt $f0, $NAN($4)
+ addq $sp, 16, $sp
+ ret
+
+ .end __ieee754_sqrt");
+
+#endif /* _IEEE_FP */
+#endif /* _IEEE_FP && _IEEE_FP_INEXACT */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87967acd393b6ce2ed729f42256bc498270fe67a
commit 87967acd393b6ce2ed729f42256bc498270fe67a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 5 01:38:37 1997 +0000
Removed.
diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S
deleted file mode 100644
index 32b0688..0000000
--- a/sysdeps/alpha/w_sqrt.S
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger <davidm@cs.arizona.edu>, 1996.
- Based on public-domain C source by Linus Torvalds.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This version is much faster than generic sqrt implementation, but
- it doesn't handle exceptional values or the inexact flag. Don't use
- this if _IEEE_FP or _IEEE_FP_INEXACT is in effect. */
-
-#ifndef _IEEE_FP
-
-#define _ERRNO_H
-#include <bits/errno.h>
-#include <sysdep.h>
-
- .set noreorder
-
-#ifdef __ELF__
- .section .rodata
-#else
- .rdata
-#endif
- .align 5 # align to cache line
-
- /* Do all memory accesses relative to sqrtdata. */
-sqrtdata:
-
-#define DN 0x00
-#define UP 0x08
-#define HALF 0x10
-#define ALMOST_THREE_HALF 0x18
-#define T2 0x20
-
- .quad 0x3fefffffffffffff /* DN = next(1.0) */
- .quad 0x3ff0000000000001 /* UP = prev(1.0) */
- .quad 0x3fe0000000000000 /* HALF = 0.5 */
- .quad 0x3ff7ffffffc00000 /* ALMOST_THREE_HALF = 1.5-2^-30 */
-
-/* table T2: */
-.long 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866
-.long 0xf14a, 0x1091b, 0x11fcd, 0x13552, 0x14999, 0x15c98, 0x16e34, 0x17e5f
-.long 0x18d03, 0x19a01, 0x1a545, 0x1ae8a, 0x1b5c4, 0x1bb01, 0x1bfde, 0x1c28d
-.long 0x1c2de, 0x1c0db, 0x1ba73, 0x1b11c, 0x1a4b5, 0x1953d, 0x18266, 0x16be0
-.long 0x1683e, 0x179d8, 0x18a4d, 0x19992, 0x1a789, 0x1b445, 0x1bf61, 0x1c989
-.long 0x1d16d, 0x1d77b, 0x1dddf, 0x1e2ad, 0x1e5bf, 0x1e6e8, 0x1e654, 0x1e3cd
-.long 0x1df2a, 0x1d635, 0x1cb16, 0x1be2c, 0x1ae4e, 0x19bde, 0x1868e, 0x16e2e
-.long 0x1527f, 0x1334a, 0x11051, 0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd
-
-/*
- * Stack variables:
- */
-#define K 16(sp)
-#define Y 24(sp)
-#define FSIZE 32
-
- .text
-
-LEAF(__sqrt, FSIZE)
- lda sp, -FSIZE(sp)
- ldgp gp, .-__sqrt(pv)
- stq ra, 0(sp)
-#ifdef PROF
- lda AT, _mcount
- jsr AT, (AT), _mcount
-#endif
- .prologue 1
-
- stt $f16, K
- lda t3, sqrtdata # load base address into t3
-
- fblt $f16, $negative
-
- /* Compute initial guess. */
-
- .align 3
-
- ldah t1, 0x5fe8 # e0 :
- ldq t2, K # .. e1 :
- ldt $f12, HALF(t3) # e0 :
- ldt $f18, ALMOST_THREE_HALF(t3) # .. e1 :
- srl t2, 33, t0 # e0 :
- mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5
- subl t1, t0, t1 # e0 :
- addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
- srl t1, 12, t0 # e0 :
- and t0, 0xfc, t0 # .. e1 :
- addq t0, t3, t0 # e0 :
- ldl t0, T2(t0) # .. e1 :
- addt $f12, $f17, $f15 # fa : $f15 = 1.5
- subl t1, t0, t1 # .. e1 :
- sll t1, 32, t1 # e0 :
- ldt $f14, DN(t3) # .. e1 :
- stq t1, Y # e0 :
- ldt $f13, Y # e1 :
- addq sp, FSIZE, sp # e0 :
-
- mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
- mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y
- subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y)
- mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y)
- mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp
- mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
- subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp
- mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1
- subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5)
- ldt $f15, UP(t3) # .. e1 :
- mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp
- mult $f10, $f13, $f11 # fm : $f11 = z*ypp
- mult $f10, $f12, $f12 # fm : $f12 = z*0.5
- subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp
- mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp)
- addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp)
-
- mult/c $f0, $f14, $f12 # fm : zmi = zp * DN
- mult/c $f0, $f15, $f11 # fm : zpl = zp * UP
- mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
- mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
-
- subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x
- subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x
-
- fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res
- fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res
-
- ret
-
-$negative:
- lda t1, -1
- stq t1, K
- lda t1, EDOM
- stl t1, errno
-#ifdef _LIBC_REENTRANT
- jsr ra, __errno_location
- lda t1, -1
- ldq ra, 0(sp)
- stl t1, 0(v0)
-#endif
- ldt $f0, K # res = (double) 0xffffffffffffffff
- addq sp, FSIZE, sp
- ret
-
- END(__sqrt)
-
-weak_alias(__sqrt, sqrt)
-
-#endif /* !_IEEE_FP */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=892732283bcb7dc49d3491a5635cce7dcd3f9056
commit 892732283bcb7dc49d3491a5635cce7dcd3f9056
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 29 20:39:52 1997 +0000
Add sgidefs.h.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index 6be6876..0f106cf 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -6,6 +6,7 @@ kernel_termios.h
entry.h
regdef.h
fpregdef.h
+sgidefs.h
sys/acct.h
sys/asm.h
sys/cachectl.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=606bb553c3c6a557347a5f2fbff0117777beff69
commit 606bb553c3c6a557347a5f2fbff0117777beff69
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 29 20:37:37 1997 +0000
Extra files to distribute for mach/hurd/mips.
diff --git a/sysdeps/mach/hurd/mips/Dist b/sysdeps/mach/hurd/mips/Dist
new file mode 100644
index 0000000..b6f3ffa
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/Dist
@@ -0,0 +1,3 @@
+longjmp-ctx.c
+init-fault.c
+dl-machine.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b10c19e06892662dcc9ed1c764398059df61cbe
commit 8b10c19e06892662dcc9ed1c764398059df61cbe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 29 00:52:03 1997 +0000
POLL* bits for Linux.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/poll.h b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
new file mode 100644
index 0000000..8fea439
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/poll.h
@@ -0,0 +1,43 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#ifdef __USE_XOPEN
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */
+
+/* Canonical number of polling requests to read in at a time in poll. */
+#define NPOLLFILE 30
diff --git a/sysdeps/unix/sysv/linux/mips/bits/poll.h b/sysdeps/unix/sysv/linux/mips/bits/poll.h
new file mode 100644
index 0000000..c1c9a6b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/poll.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#ifdef __USE_XOPEN
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+#ifdef __USE_GNU
+/* This is an extension for Linux. */
+# define POLLMSG 0x400
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */
+
+/* Canonical number of polling requests to read in at a time in poll. */
+#define NPOLLFILE 30
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0b82fb753cbb4efbf66588808fbd95061204aaa
commit e0b82fb753cbb4efbf66588808fbd95061204aaa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 27 20:03:43 1997 +0000
[$(subdirs)=db2] (CPPFLAGS): Add macros to provide spinlock
information for db2.
diff --git a/sysdeps/m68k/m68020/Makefile b/sysdeps/m68k/m68020/Makefile
new file mode 100644
index 0000000..b176354
--- /dev/null
+++ b/sysdeps/m68k/m68020/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),db2)
+CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_MC68020_GCC=1
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0d5b73e055f817d78f2093c1cf302df486881fe
commit c0d5b73e055f817d78f2093c1cf302df486881fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Aug 27 19:58:41 1997 +0000
(RTLD_START): Switch back to previous section to avoid confusing the
compiler.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 746cdd2..e0ba67b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -243,7 +243,8 @@ _dl_start_user:
/* Jump to the user's entry point. */
mov $9, $27
jmp ($9)
- .end _dl_start_user");
+ .end _dl_start_user
+.previous");
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 01fc339..75434cd 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -56,21 +56,12 @@ static inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
- asm (".Lhere: lea .Lhere(%%pc), %0\n"
- " sub.l %#.Lhere, %0"
+ asm ("1: lea 1b(%%pc), %0\n"
+ " sub.l 1b@GOTPC(%%pc), %0"
: "=a" (addr));
return addr;
}
-/* The `subl' insn above will contain an R_68K_RELATIVE relocation
- entry intended to insert the run-time address of the label `.Lhere'.
- This will be the first relocation in the text of the dynamic
- linker; we skip it to avoid trying to modify read-only text in this
- early stage. */
-#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
- ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \
- (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela))
-
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
@@ -157,13 +148,16 @@ asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
its return value is the user program's entry point. */
#define RTLD_START asm ("\
-.text
-.globl _start
-.globl _dl_start_user
+ .text
+ .globl _start
+ .type _start,@function
_start:
move.l %sp, -(%sp)
jbsr _dl_start
addq.l #4, %sp
+
+ .globl _dl_start_user
+ .type _dl_start_user,@function
_dl_start_user:
| Save the user entry point address in %a4.
move.l %d0, %a4
@@ -209,7 +203,9 @@ _dl_start_user:
| Initialize %fp with the stack pointer.
move.l %sp, %fp
| Jump to the user's entry point.
- jmp (%a4)");
+ jmp (%a4)
+ .size _dl_start_user, . - _dl_start_user
+ .previous");
/* Nonzero iff TYPE describes a relocation that should
skip the executable when looking up the symbol value. */
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 6973f76..7ee2e20 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \
move $25, $2\n \
jr $25\n \
.end _dl_runtime_resolve\n \
+ .previous\n \
");
/* Mask identifying addresses reserved for the user program,
@@ -519,6 +520,7 @@ _dl_start_user:\n\
lw $7, 12($29)\n\
jr $25\n"\
_RTLD_EPILOGUE(ENTRY_POINT)\
+ "\n.previous"\
);
/* The MIPS never uses Elfxx_Rela relocations. */
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index e501a25..76981a6 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -423,6 +423,7 @@ _dl_runtime_resolve:\n \
move $25, $2\n \
jr $25\n \
.end _dl_runtime_resolve\n \
+ .previous\n \
");
/* Mask identifying addresses reserved for the user program,
@@ -514,6 +515,7 @@ _dl_start_user:\n\
ld $7, 3*8($29)\n\
jr $25\n"\
_RTLD_EPILOGUE(ENTRY_POINT) \
+ "\n.previous"\
);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02af0aee5e5f172514da621665e3bb9777f5d6f5
commit 02af0aee5e5f172514da621665e3bb9777f5d6f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 24 10:52:09 1997 +0000
Clean up asm statements a bit.
diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h
index 20d7f01..d76f481 100644
--- a/sysdeps/standalone/i386/i386.h
+++ b/sysdeps/standalone/i386/i386.h
@@ -311,11 +311,11 @@ static inline void set_segment(
/* Now, reload all segment registers so the limit takes effect. */
- asm volatile( "movw %%ds,%0 ; movw %0,%%ds
- movw %%es,%0 ; movw %0,%%es
- movw %%fs,%0 ; movw %0,%%fs
- movw %%gs,%0 ; movw %0,%%gs
- movw %%ss,%0 ; movw %0,%%ss"
+ asm volatile( "movw %%ds,%0 ; movw %0,%%ds\n"
+ "movw %%es,%0 ; movw %0,%%es\n"
+ "movw %%fs,%0 ; movw %0,%%fs\n"
+ "movw %%gs,%0 ; movw %0,%%gs\n"
+ "movw %%ss,%0 ; movw %0,%%ss"
: "=r" (tmp_segment)
: "0" (tmp_segment)
);
diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h
index ba8db2b..253d5d9 100644
--- a/sysdeps/standalone/i960/i960ca.h
+++ b/sysdeps/standalone/i960/i960ca.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -157,10 +157,10 @@ struct i80960ca_ctltbl {
#define clear_intr( xint ) \
{ register unsigned32 _xint=(xint); \
- asm volatile( "loop_til_cleared:
- clrbit %0,sf0,sf0 ; \
- bbs %0,sf0,loop_til_cleared" \
- : "=d" (_xint) : "0" (_xint) ); \
+ asm volatile( "loop_til_cleared:" \
+ " clrbit %0,sf0,sf0 ;" \
+ " bbs %0,sf0,loop_til_cleared" \
+ : "=d" (_xint) : "0" (_xint) ); \
}
#define reload_ctl_group( group ) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17cf8c5c98e71d1f6397db27b7e5da8834a90536
commit 17cf8c5c98e71d1f6397db27b7e5da8834a90536
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 14 01:53:36 1997 +0000
Correct comment for SA_RESTART.
diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h
index df400d4..56e28a0 100644
--- a/sysdeps/unix/bsd/osf/bits/sigaction.h
+++ b/sysdeps/unix/bsd/osf/bits/sigaction.h
@@ -1,5 +1,5 @@
/* Structure and constant definitions for sigaction et al. OSF/1 version.
- Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
@@ -33,9 +33,9 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_BSD
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
-#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESTART 0x2 /* Restart syscall on signal return. */
+# define SA_DISABLE 0x4 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index e2e97bd..f28b6f2 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -31,21 +31,21 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+# define SA_NOMASK 0x00000008 /* Don't automatically block the signal
+ when its handler is being executed. */
+# define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NODEFER SA_NOMASK
-#define SA_RESETHAND SA_ONESHOT
+# define SA_NODEFER SA_NOMASK
+# define SA_RESETHAND SA_ONESHOT
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
index 66c58cc..d6f70f2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -39,24 +39,24 @@ struct sigaction
};
/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
#ifdef __USE_MISC
-#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
/* Some aliases for the SA_ constants. */
-#define SA_NOMASK SA_NODEFER
-#define SA_ONESHOT SA_RESETHAND
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
#endif
/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_NOP 0 /* 0 is unused to catch errors */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
-#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+#define SIG_NOP 0 /* 0 is unused to catch errors */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
set only the low 32 bit of the sigset. */
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
index 5bf5985..732befc 100644
--- a/sysdeps/unix/sysv/minix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -31,14 +31,14 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
-#define SA_NODEFER 0x4 /* Don't block signal while catching it. */
-#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x10 /* Extended signal handling. */
-#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
-#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
-#define SA_DISABLE 0x100 /* Disable alternate signal stack. */
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
+# define SA_NODEFER 0x4 /* Don't block signal while catching it. */
+# define SA_RESTART 0x8 /* Restart syscall on signal return. */
+# define SA_SIGINFO 0x10 /* Extended signal handling. */
+# define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
+# define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
+# define SA_DISABLE 0x100 /* Disable alternate signal stack. */
#endif
#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
index 3a2ffb2..ce3ab5e 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -35,13 +35,13 @@ struct sigaction
/* Bits in `sa_flags'. */
#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
-#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
-#define SA_NODEFER 0x10 /* Don't automatically block the signal when
+# define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+# define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESTART 0x4 /* Restart syscall on signal return. */
+# define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
+# define SA_NODEFER 0x10 /* Don't automatically block the signal when
its handler is being executed. */
-#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
+# define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
#endif
#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=135eda531279fd9d75b516fb3b13399076e7dfa4
commit 135eda531279fd9d75b516fb3b13399076e7dfa4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 14 01:49:40 1997 +0000
Linux/M68k specific mman.h definitions.
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
new file mode 100644
index 0000000..d6c29d2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -0,0 +1,75 @@
+/* Definitions for POSIX memory map inerface. Linux/m68k version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never include this file directly. Use <sys/mman.h> instead"
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x2000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=52b963b08f8157e425ef05798f1047659710b3bc
commit 52b963b08f8157e425ef05798f1047659710b3bc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 18:30:12 1997 +0000
Linux/MIPS specific mman.h definitions.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
new file mode 100644
index 0000000..15a343f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -0,0 +1,75 @@
+/* Definitions for POSIX memory map inerface. Linux/PowerPC version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never include this file directly. Use <sys/mman.h> instead"
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0x00
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+# define MAP_RENAME MAP_ANONYMOUS
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x0800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */
+# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 0x4000 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1dcd33f6362de88723d22f2a1360e9b09b25580
commit c1dcd33f6362de88723d22f2a1360e9b09b25580
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 18:29:45 1997 +0000
Add some files.
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
index ad6ea03..9b6fd71 100644
--- a/sysdeps/mips/Dist
+++ b/sysdeps/mips/Dist
@@ -1 +1,3 @@
setjmp_aux.c
+rtld-ldscript.in
+rtld-parms
diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist
index ad6ea03..4cde3d0 100644
--- a/sysdeps/mips/mips64/Dist
+++ b/sysdeps/mips/mips64/Dist
@@ -1 +1,2 @@
setjmp_aux.c
+rtld-parms
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 1b1f771..ae71c2f 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,11 +1,14 @@
-alpha/ptrace.h alpha/regdef.h
-ieee_get_fp_control.S ieee_set_fp_control.S
-ioperm.c
-init-first.h
+alpha/ptrace.h
+alpha/regdef.h
+bits/mman.h
clone.S
+ieee_get_fp_control.S
+ieee_set_fp_control.S
+init-first.h
+ioperm.c
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
-sys/io.h
sys/acct.h
+sys/io.h
sys/procfs.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index e7d5949..25aa20b 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,2 +1,3 @@
+bits/mman.h
clone.S
mremap.S
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
index a205c94..6be6876 100644
--- a/sysdeps/unix/sysv/linux/mips/Dist
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -1,3 +1,15 @@
+bits/mman.h
clone.S
kernel_sigaction.h
kernel_stat.h
+kernel_termios.h
+entry.h
+regdef.h
+fpregdef.h
+sys/acct.h
+sys/asm.h
+sys/cachectl.h
+sys/fpregdef.h
+sys/procfs.h
+sys/regdef.h
+sys/sysmips.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=177c2e9a312d853d4a1e8bbb884d517aea075cf7
commit 177c2e9a312d853d4a1e8bbb884d517aea075cf7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 17:58:48 1997 +0000
New file. Prevent using kernel header.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
new file mode 100644
index 0000000..1bef0cb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h
@@ -0,0 +1,83 @@
+/* Definitions for POSIX memory map inerface. Linux/Alpha version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_MMAN_H
+# error "Never include this file directly. Use <sys/mman.h> instead"
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x100 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# define MAP_ANONYMOUS 0x10 /* Don't use a file. */
+# define MAP_ANON MAP_ANONYMOUS
+#endif
+
+/* Not used by Linux, but here to make sure we don't clash with OSF/1
+ defines. */
+#ifdef __USE_BSD
+# define MAP_HASSEMAPHORE 0x0200
+# define MAP_INHERIT 0x0400
+# define MAP_UNALIGNED 0x0800
+#endif
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x1000 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x4000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x8000 /* Lock the mapping. */
+# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 2 /* Synchronous memory sync. */
+#define MS_INVALIDATE 4 /* Invalidate the caches. */
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 8192 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 16384 /* Lock all additions to address
+ space. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c69e79f1da075354a964f546522be6f9b40cd986
commit c69e79f1da075354a964f546522be6f9b40cd986
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 17:56:16 1997 +0000
Test feature macros before defining non-POSIX things. Add MAP_FAILED.
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index 7284619..816f271 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. OSF/1 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,46 +32,53 @@
without PROT_READ. The only guarantees are that no writing will be
allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x01 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x04 /* Pages can be executed. */
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
/* Flags contain mapping type, sharing type and options. */
/* Mapping type (must choose one and only one of these). */
-#define MAP_FILE 0x00 /* Mapped from a file or device. */
-#define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
-#define MAP_ANONYMOUS MAP_ANON
-#define MAP_TYPE 0xf0 /* Mask for type field. */
+#ifdef __USE_BSD
+# define MAP_FILE 0x00 /* Mapped from a file or device. */
+# define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
+# define MAP_ANONYMOUS MAP_ANON
+# define MAP_TYPE 0xf0 /* Mask for type field. */
+#endif
/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
/* Other flags. */
-#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
-#define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
-#define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
-#define MAP_INHERIT 0x0400 /* Region is retained after exec. */
-#define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
+#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
+#ifdef __USE_BSD
+# define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
+# define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
+# define MAP_INHERIT 0x0400 /* Region is retained after exec. */
+# define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
+#endif
/* Advice to `madvise'. */
-#define MADV_NORMAL 0 /* No further special treatment. */
-#define MADV_RANDOM 1 /* Expect random page references. */
-#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-#define MADV_WILLNEED 3 /* Will need these pages. */
-#define MADV_DONTNEED 4 /* Don't need these pages. */
-#define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
+#endif
/* Flags to `msync'. */
#define MS_ASYNC 1 /* Asynchronous cache flush. */
#define MS_SYNC 3 /* Synchronous cache flush. */
#define MS_INVALIDATE 4 /* Invalidate cached pages. */
+/* Return value of `mmap' in case of an error. */
+#define MAP_FAILED ((__caddr_t) -1)
-#include <sys/cdefs.h>
__BEGIN_DECLS
/* Map addresses starting near ADDR and extending for LEN bytes. from
@@ -79,34 +86,36 @@ __BEGIN_DECLS
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (caddr_t) -1
+ The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, off_t __offset));
-__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, off_t __offset));
+extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
+extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-int __munmap __P ((__caddr_t __addr, size_t __len));
-int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__caddr_t __addr, size_t __len));
+extern int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+#endif
__END_DECLS
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 65771a2..d2a8998 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,14 +41,18 @@
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#define MAP_TYPE 0x0f /* Mask for sharing type. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
/* Other flags. */
#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
/* The following three flags are not actually implemented in SunOS 4.1. */
-#define MAP_RENAME 0x20 /* Rename private pages to file. */
-#define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
-#define MAP_INHERIT 0x80 /* Region is retained after exec. */
+#ifdef __USE_BSD
+# define MAP_RENAME 0x20 /* Rename private pages to file. */
+# define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
+# define MAP_INHERIT 0x80 /* Region is retained after exec. */
+#endif
/* This is an internal flag that is always set in `mmap' system calls. In
older versions of SunOS 4 `mmap' did not return the actual mapping
@@ -57,18 +61,21 @@
#define _MAP_NEW 0x80000000
/* Advice to `madvise'. */
-#define MADV_NORMAL 0 /* No further special treatment. */
-#define MADV_RANDOM 1 /* Expect random page references. */
-#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-#define MADV_WILLNEED 3 /* Will need these pages. */
-#define MADV_DONTNEED 4 /* Don't need these pages. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
/* Flags to `msync'. */
#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+/* Return value of `mmap' in case of an error. */
+#define MAP_FAILED ((__caddr_t) -1)
-#include <sys/cdefs.h>
__BEGIN_DECLS
/* Map addresses starting near ADDR and extending for LEN bytes. from
@@ -76,34 +83,36 @@ __BEGIN_DECLS
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (caddr_t) -1
+ The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, __off_t __offset));
-__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, __off_t __offset));
+extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
+extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-int __munmap __P ((__caddr_t __addr, size_t __len));
-int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__caddr_t __addr, size_t __len));
+extern int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+#endif
__END_DECLS
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index 989bf21..4262fce 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,20 +41,25 @@
/* Sharing types (must choose one and only one of these). */
#define MAP_SHARED 0x01 /* Share changes. */
#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#define MAP_TYPE 0x0f /* Mask for sharing type. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
/* Other flags. */
#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
/* Advice to `madvise'. */
-#define MADV_NORMAL 0 /* No further special treatment. */
-#define MADV_RANDOM 1 /* Expect random page references. */
-#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-#define MADV_WILLNEED 3 /* Will need these pages. */
-#define MADV_DONTNEED 4 /* Don't need these pages. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+/* Return value of `mmap' in case of an error. */
+#define MAP_FAILED ((__caddr_t) -1)
-#include <sys/cdefs.h>
__BEGIN_DECLS
/* Map addresses starting near ADDR and extending for LEN bytes. from
@@ -62,36 +67,38 @@ __BEGIN_DECLS
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (caddr_t) -1
+ The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, off_t __offset));
-__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, off_t __offset));
+extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
+extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-int __munmap __P ((__caddr_t __addr, size_t __len));
-int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__caddr_t __addr, size_t __len));
+extern int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Ultrix 4 does not implement `msync' or `madvise'. */
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-int msync __P ((caddr_t __addr, size_t __len));
+extern int msync __P ((caddr_t __addr, size_t __len));
+#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+#endif
__END_DECLS
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index f42a9f6..c3a9238 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Irix 4 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,8 +23,6 @@
#include <features.h>
#include <bits/types.h>
-#define __need_size_t
-#include <stddef.h>
/* Protections are chosen from these bits, OR'd together. The
@@ -32,37 +30,46 @@
without PROT_READ. The only guarantees are that no writing will be
allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x04 /* Pages can be read. */
-#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x01 /* Pages can be executed. */
-#define PROT_EXECUTE PROT_EXEC
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x04 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x01 /* Pages can be executed. */
+#ifdef __USE_MISC
+# define PROT_EXECUTE PROT_EXEC
+#endif
/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
-#define MAP_TYPE 0x0f /* Mask for sharing type. */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#ifdef __USE_BSD
+# define MAP_TYPE 0x0f /* Mask for sharing type. */
+#endif
/* Other flags. */
-#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
-#define MAP_RENAME 0x20 /* Rename private pages to file. */
-#define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */
-#define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+#ifdef __USE_MISC
+# define MAP_RENAME 0x20 /* Rename private pages to file. */
+# define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */
+# define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */
+#endif
/* Advice to `madvise'. */
-#define MADV_NORMAL 0 /* No further special treatment. */
-#define MADV_RANDOM 1 /* Expect random page references. */
-#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-#define MADV_WILLNEED 3 /* Will need these pages. */
-#define MADV_DONTNEED 4 /* Don't need these pages. */
+#ifdef __USE_BSD
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
/* Flags to `msync'. */
-#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
-#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
+#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+/* Return value of `mmap' in case of an error. */
+#define MAP_FAILED ((__caddr_t) -1)
-#include <sys/cdefs.h>
__BEGIN_DECLS
/* Map addresses starting near ADDR and extending for LEN bytes. from
@@ -70,34 +77,36 @@ __BEGIN_DECLS
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (caddr_t) -1
+ The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, __off_t __offset));
-__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, __off_t __offset));
+extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
+extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot,
+ int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
-int __munmap __P ((__caddr_t __addr, size_t __len));
-int munmap __P ((__caddr_t __addr, size_t __len));
+extern int __munmap __P ((__caddr_t __addr, size_t __len));
+extern int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
-int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
-int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-int msync __P ((caddr_t __addr, size_t __len, int __flags));
+extern int msync __P ((caddr_t __addr, size_t __len, int __flags));
+#ifdef __USE_BSD
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
-int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+#endif
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b50d0b3659feb7b7994928910d1ffcc19531ed29
commit b50d0b3659feb7b7994928910d1ffcc19531ed29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 17:51:30 1997 +0000
Add EISDIR, EOPNOTSUPP; tidy up formatting.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 362b43d..f5020dc 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -38,17 +38,19 @@
# define EMFILE 10
# define ENAMETOOLONG 11 /* File name too long */
# define ELOOP 12 /* Too many symbolic links encountered */
-# define ENOMSG 13 /* No message of desired type */
+# define ENOMSG 13 /* No message of desired type */
# define E2BIG 14 /* Arg list too long */
# define EINTR 15
# define EILSEQ 16
-# define ENOEXEC 17
+# define ENOEXEC 17
# define ENOENT 18
# define EPROTOTYPE 19
# define ESRCH 20
# define EPERM 21
-# define ENOTDIR 22
-# define ESTALE 23
+# define ENOTDIR 22
+# define ESTALE 23
+# define EISDIR 24
+# define EOPNOTSUPP 25 /* Operation not supported. */
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5cd503e5c1b85958a59d94ca284468bdf14d98f5
commit 5cd503e5c1b85958a59d94ca284468bdf14d98f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 17:39:01 1997 +0000
Additional files to istribute for mips/mipsel.
diff --git a/sysdeps/mips/mipsel/Dist b/sysdeps/mips/mipsel/Dist
new file mode 100644
index 0000000..98a10ec
--- /dev/null
+++ b/sysdeps/mips/mipsel/Dist
@@ -0,0 +1 @@
+rtld-parms
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80bf28e227b80e9839d4dcec0d52342eb7b281fe
commit 80bf28e227b80e9839d4dcec0d52342eb7b281fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 10 17:34:46 1997 +0000
Add empty file to prevent the version from libm-ieee754 be compiled
since the later is not needed.
diff --git a/sysdeps/m68k/fpu/e_rem_pio2.c b/sysdeps/m68k/fpu/e_rem_pio2.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_rem_pio2.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
diff --git a/sysdeps/m68k/fpu/e_rem_pio2f.c b/sysdeps/m68k/fpu/e_rem_pio2f.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_rem_pio2f.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
diff --git a/sysdeps/m68k/fpu/e_rem_pio2l.c b/sysdeps/m68k/fpu/e_rem_pio2l.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_rem_pio2l.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
diff --git a/sysdeps/m68k/fpu/k_rem_pio2.c b/sysdeps/m68k/fpu/k_rem_pio2.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_rem_pio2.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
diff --git a/sysdeps/m68k/fpu/k_rem_pio2f.c b/sysdeps/m68k/fpu/k_rem_pio2f.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_rem_pio2f.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
diff --git a/sysdeps/m68k/fpu/k_rem_pio2l.c b/sysdeps/m68k/fpu/k_rem_pio2l.c
new file mode 100644
index 0000000..1347b04
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_rem_pio2l.c
@@ -0,0 +1,3 @@
+/* Empty. This file is only meant to avoid compiling the file with the
+ same name in the libm-ieee754 directory. The code is not used since
+ there is an assembler version for all users of this file. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95cb9068ca1f3376b897969daf6eb65179353f2b
commit 95cb9068ca1f3376b897969daf6eb65179353f2b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 4 14:29:00 1997 +0000
Define socklen_t.
(struct msghdr): Correct types to use socklen_t.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index 15f420f..02f1d22 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -28,9 +28,11 @@
#define __need_NULL
#include <stddef.h>
-
__BEGIN_DECLS
+/* Type for length arguments in socket calls. */
+typedef unsigned int socklen_t;
+
/* Supported address families. */
#define PF_UNSPEC 0
#define PF_UNIX 1 /* Unix domain sockets */
@@ -103,25 +105,22 @@ enum
struct msghdr
{
__ptr_t msg_name; /* Address to send to/receive from. */
- int msg_namelen; /* Length of address data. */
- /* XXX Should be type `size_t' according to POSIX.1g. */
+ socklen_t msg_namelen; /* Length of address data. */
struct iovec *msg_iov; /* Vector of data to send/receive into. */
int msg_iovlen; /* Number of elements in the vector. */
- /* XXX Should be type `size_t' according to POSIX.1g. */
__ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */
- int msg_controllen; /* Ancillary data buffer length. */
- /* XXX Should be type `size_t' according to POSIX.1g. */
+ socklen_t msg_controllen; /* Ancillary data buffer length. */
+
int msg_flags; /* Flags on received message. */
};
/* Structure used for storage of ancillary data object information. */
struct cmsghdr
{
- int cmsg_len; /* Length of data in cmsg_data plus length
+ socklen_t cmsg_len; /* Length of data in cmsg_data plus length
of cmsghdr structure. */
- /* XXX Should be type `size_t' according to POSIX.1g. */
int cmsg_level; /* Originating protocol. */
int cmsg_type; /* Protocol specific type. */
#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1da12893a2966dfc9ee4981c5a98c8b3afe70c1
commit e1da12893a2966dfc9ee4981c5a98c8b3afe70c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 4 14:26:01 1997 +0000
Replace call to abort by infinite loop, to avoid dragging stdio into
the dynamic linker.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index c3e400c..e6ec43c 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -50,6 +50,6 @@ __longjmp (__jmp_buf env, int val)
because this code always jumps out anyway. */
);
- /* This call avoids `volatile function does return' warnings. */
- abort ();
+ /* Avoid `volatile function does return' warnings. */
+ for (;;);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e8e1d85e0e261b2115cc54e70eed22cb7f731d4
commit 6e8e1d85e0e261b2115cc54e70eed22cb7f731d4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 2 20:56:48 1997 +0000
Add support for shared library profiling.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 7c62aa2..01fc339 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -80,6 +80,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf32_Addr *got;
extern void _dl_runtime_resolve (Elf32_Word);
+ extern void _dl_runtime_profile (Elf32_Word);
if (l->l_info[DT_JMPREL] && lazy)
{
@@ -90,10 +91,23 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
_GLOBAL_OFFSET_TABLE_[2]. */
got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
got[1] = (Elf32_Addr) l; /* Identify this shared object. */
- /* This function will get called to fix up the GOT entry
- indicated by the offset on the stack, and then jump to the
- resolved address. */
- got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+
+ /* The got[2] entry contains the address of a function which gets
+ called to get the address of a so far unresolved function and
+ jump to it. The profiling extension of the dynamic linker allows
+ to intercept the calls to collect information. In this case we
+ don't store the address in the GOT so that all future calls also
+ end in this function. */
+ if (profile)
+ {
+ got[2] = (Elf32_Addr) &_dl_runtime_profile;
+ /* Say that we really want profiling and the timers are started. */
+ _dl_profile_map = l;
+ }
+ else
+ /* This function will get called to fix up the GOT entry indicated by
+ the offset on the stack, and then jump to the resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
}
return lazy;
@@ -101,16 +115,16 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* This code is used in dl-runtime.c to call the `fixup' function
and then redirect to the address it returns. */
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
-| Trampoline for _dl_runtime_resolver
- .globl _dl_runtime_resolve
- .type _dl_runtime_resolve, @function
-_dl_runtime_resolve:
+#define TRAMPOLINE_TEMPLATE(tramp_name, fixup_name) \
+"| Trampoline for " #fixup_name "
+ .globl " #tramp_name "
+ .type " #tramp_name ", @function
+" #tramp_name ":
| Save %a0 (struct return address) and %a1.
move.l %a0, -(%sp)
move.l %a1, -(%sp)
| Call the real address resolver.
- jbsr fixup
+ jbsr " #fixup_name "
| Restore register %a0 and %a1.
move.l (%sp)+, %a1
move.l (%sp)+, %a0
@@ -118,8 +132,17 @@ _dl_runtime_resolve:
addq.l #8, %sp
| Call real function.
jmp (%d0)
- .size _dl_runtime_resolve, . - _dl_runtime_resolve
-");
+ .size " #tramp_name ", . - " #tramp_name "\n"
+#ifndef PROF
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup));
+#else
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+asm (TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup) \
+ ".globl _dl_runtime_profile\n" \
+ ".set _dl_runtime_profile, _dl_runtime_resolve");
+#endif
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
/* The PLT uses Elf32_Rela relocs. */
#define elf_machine_relplt elf_machine_rela
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d928c6a5c3df9388caeeedfd0f90a7effb6f9f3
commit 1d928c6a5c3df9388caeeedfd0f90a7effb6f9f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 28 22:32:21 1997 +0000
(elf_machine_runtime_setup): Add new parameter to enable profiling.
(elf_machine_rela): Add new parameter to specify place to store
result in.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index fce7cff..6973f76 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -219,7 +219,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
will jump to the on-demand fixup code in dl-runtime.c. */
static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy)
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
ElfW(Addr) *got;
extern void _dl_runtime_resolve (ElfW(Word));
@@ -533,9 +533,9 @@ _RTLD_EPILOGUE(ENTRY_POINT)\
static inline void
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version)
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ ElfW(Addr) *const reloc_addr)
{
- ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
ElfW(Addr) loadbase;
ElfW(Addr) undo __attribute__ ((unused));
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index a20835a..e501a25 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -219,7 +219,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
will jump to the on-demand fixup code in dl-runtime.c. */
static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy)
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
ElfW(Addr) *got;
extern void _dl_runtime_resolve (ElfW(Word));
@@ -529,9 +529,9 @@ _RTLD_EPILOGUE(ENTRY_POINT) \
static inline void
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const struct r_found_version *version)
+ const ElfW(Sym) *sym, const struct r_found_version *version,
+ ElfW(Addr) *const reloc_addr)
{
- ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
ElfW(Addr) loadbase;
ElfW(Addr) undo __attribute__ ((unused));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c093785fe99db496cec7028a9de85604663d7266
commit c093785fe99db496cec7028a9de85604663d7266
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 28 22:32:03 1997 +0000
M68k optimized functions for swapping byte order.
diff --git a/sysdeps/m68k/bits/byteswap.h b/sysdeps/m68k/bits/byteswap.h
new file mode 100644
index 0000000..54ec0d1
--- /dev/null
+++ b/sysdeps/m68k/bits/byteswap.h
@@ -0,0 +1,63 @@
+/* Macros to swap the order of bytes in integer values. m68k version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_BYTESWAP_H
+#define _BITS_BYTESWAP_H 1
+
+/* Swap bytes in 16 bit value. We don't provide an assembler version
+ because GCC is smart enough to generate optimal assembler output, and
+ this allows for better cse. */
+#define __bswap_16(x) \
+ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+
+/* Swap bytes in 32 bit value. */
+#define __bswap_constant_32(x) \
+ ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+
+#if defined __GNUC__ && __GNUC__ >= 2
+#define __bswap_32(x) \
+ __extension__ \
+ ({ unsigned int __v; \
+ if (__builtin_constant_p (x)) \
+ __v = __bswap_constant_32 (x); \
+ else \
+ __asm__ __volatile__ ("ror%.w %#8, %0;" \
+ "swap %0;" \
+ "ror%.w %#8, %0" \
+ : "=d" (__v) \
+ : "0" (x)); \
+ __v; })
+#else
+#define __bswap_32(x) __bswap_constant_32 (x)
+#endif
+
+#if defined __GNUC__ && __GNUC__ >= 2
+/* Swap bytes in 64 bit value. */
+#define __bswap_64(x) \
+ __extension__ \
+ ({ union { unsigned long long int __ll; \
+ unsigned long int __l[2]; } __v, __r; \
+ __v.__ll = (x); \
+ __r.__l[0] = __bswap_32 (__v.__l[1]); \
+ __r.__l[1] = __bswap_32 (__v.__l[0]); \
+ __r.__ll; })
+#endif
+
+#endif /* bits/byteswap.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=482bd6c6e4ab0d1a4b611b8bd939c9e441d8e71f
commit 482bd6c6e4ab0d1a4b611b8bd939c9e441d8e71f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 28 22:31:42 1997 +0000
(elf_machine_runtime_setup): Add new parameter to enable profiling.
(elf_machine_rela): Add new parameter to specify place to store result in.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index c0a17c7..7c62aa2 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -76,7 +76,7 @@ elf_machine_load_address (void)
entries will jump to the on-demand fixup code in dl-runtime.c. */
static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy)
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf32_Addr *got;
extern void _dl_runtime_resolve (Elf32_Word);
@@ -211,10 +211,9 @@ _dl_start_user:
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
- const Elf32_Sym *sym, const struct r_found_version *version)
+ const Elf32_Sym *sym, const struct r_found_version *version,
+ Elf32_Addr *const reloc_addr)
{
- Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
-
if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE)
*reloc_addr = map->l_addr + reloc->r_addend;
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2ed7206696078b71c82ed318ef28d585d89d3259
commit 2ed7206696078b71c82ed318ef28d585d89d3259
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 28 22:06:27 1997 +0000
(elf_machine_runtime_setup): Add new parameter to enable profiling.
(elf_machine_rela): Add new parameter to
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 49d6830..746cdd2 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -87,7 +87,7 @@ elf_machine_load_address (void)
entries will jump to the on-demand fixup code in dl-runtime.c. */
static inline int
-elf_machine_runtime_setup (struct link_map *l, int lazy)
+elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf64_Addr plt;
extern void _dl_runtime_resolve (void);
@@ -348,9 +348,9 @@ static inline void
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
- const struct r_found_version *version)
+ const struct r_found_version *version,
+ Elf64_Addr *const reloc_addr)
{
- Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
#ifndef RTLD_BOOTSTRAP
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2cf49ef8cd042dacb8cc760c15356db42e3bdbb3
commit 2cf49ef8cd042dacb8cc760c15356db42e3bdbb3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:33:13 1997 +0000
Check PIC instead of __PIC__.
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index ac8335f..4275d66 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -29,7 +29,7 @@
.set noreorder
ENTRY(__syscall_error)
-#ifdef __PIC__
+#ifdef PIC
.set noat
move $1, $31
bltzal $0, 0f
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
index 357f70e..4d6408d 100644
--- a/sysdeps/unix/sysv/linux/mips/clone.S
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -37,7 +37,7 @@
.text
NESTED(__clone,4*SZREG,sp)
-#ifdef __PIC__
+#ifdef PIC
.set noreorder
.cpload $25
.set reorder
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ce95ed21a8465410412ec7cf0973dbf1fc8f5e5
commit 4ce95ed21a8465410412ec7cf0973dbf1fc8f5e5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:31:58 1997 +0000
Add ESTALE.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 49a4998..362b43d 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -19,35 +19,36 @@
/* This file defines the `errno' constants for standalone ARM machines.
These constants are essentially arbitrary. */
-#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
-#undef __need_Emath
-#define __Emath_defined 1
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+# undef __need_Emath
+# define __Emath_defined 1
-#define EDOM 1
-#define ERANGE 2
+# define EDOM 1
+# define ERANGE 2
#endif
#ifdef _ERRNO_H
-#define ENOSYS 3
-#define EINVAL 4
-#define ESPIPE 5
-#define EBADF 6
-#define ENOMEM 7
-#define EACCES 8
-#define ENFILE 9
-#define EMFILE 10
-#define ENAMETOOLONG 11 /* File name too long */
-#define ELOOP 12 /* Too many symbolic links encountered */
-#define ENOMSG 13 /* No message of desired type */
-#define E2BIG 14 /* Arg list too long */
-#define EINTR 15
-#define EILSEQ 16
-#define ENOEXEC 17
-#define ENOENT 18
-#define EPROTOTYPE 19
-#define ESRCH 20
-#define EPERM 21
-#define ENOTDIR 22
+# define ENOSYS 3
+# define EINVAL 4
+# define ESPIPE 5
+# define EBADF 6
+# define ENOMEM 7
+# define EACCES 8
+# define ENFILE 9
+# define EMFILE 10
+# define ENAMETOOLONG 11 /* File name too long */
+# define ELOOP 12 /* Too many symbolic links encountered */
+# define ENOMSG 13 /* No message of desired type */
+# define E2BIG 14 /* Arg list too long */
+# define EINTR 15
+# define EILSEQ 16
+# define ENOEXEC 17
+# define ENOENT 18
+# define EPROTOTYPE 19
+# define ESRCH 20
+# define EPERM 21
+# define ENOTDIR 22
+# define ESTALE 23
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7928d2e8f8fc7b38fd7960afd37f97e21c91ff9
commit c7928d2e8f8fc7b38fd7960afd37f97e21c91ff9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:31:50 1997 +0000
basic definitions for ARM standalone.
diff --git a/sysdeps/standalone/arm/sysdep.c b/sysdeps/standalone/arm/sysdep.c
new file mode 100644
index 0000000..d256420
--- /dev/null
+++ b/sysdeps/standalone/arm/sysdep.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* errno has to be defined somewhere, and it might as well be here. */
+int errno = 0;
+
+/* The same goes for these magic signal functions. This is a standalone
+ environment so we do nothing. */
+void _sig_dfl(int sig)
+{
+}
+
+void _sig_ign(int sig)
+{
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dca3aa22294f7419418b6baa01ae7cefd79cfbe3
commit dca3aa22294f7419418b6baa01ae7cefd79cfbe3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:31:10 1997 +0000
Remove extra stuff.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 7456ae0..fce7cff 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -96,16 +96,6 @@ elf_machine_matches_host (ElfW(Half) e_machine)
}
}
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
-+ first element of the GOT. This must be inlined in a function which
-+ uses global data. */
-+static inline ElfW(Addr)
-+elf_machine_dynamic (void)
-+{
-+ register ElfW(Addr) gp asm ("$28");
-+ return * (ElfW(Addr) *) (gp - 0x7ff0);
-+}
-+
static inline ElfW(Addr) *
elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
{
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 3277b10..a20835a 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -96,16 +96,6 @@ elf_machine_matches_host (ElfW(Half) e_machine)
}
}
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
-+ first element of the GOT. This must be inlined in a function which
-+ uses global data. */
-+static inline ElfW(Addr)
-+elf_machine_dynamic (void)
-+{
-+ register ElfW(Addr) gp asm ("$28");
-+ return * (ElfW(Addr) *) (gp - 0x7ff0);
-+}
-+
static inline ElfW(Addr) *
elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdbb0d4a45f82eb920d120205f9d9680d3185a97
commit fdbb0d4a45f82eb920d120205f9d9680d3185a97
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:30:58 1997 +0000
Remove __PIC__ comment.
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 819a701..6d841fc 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -23,7 +23,6 @@
#include <sysdep.h>
-/* XXX Must this be __PIC__ ? --drepper */
#ifdef PIC
.option pic2
#endif
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index f220404..000aee4 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -23,7 +23,6 @@
#include <sysdep.h>
-/* XXX Must this be __PIC__ ? --drepper */
#ifdef PIC
.option pic2
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40731e73fda6400072a55fc51bdd310905e8878a
commit 40731e73fda6400072a55fc51bdd310905e8878a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 26 02:25:44 1997 +0000
Assembler version of gmon handling.
diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h
new file mode 100644
index 0000000..27643df
--- /dev/null
+++ b/sysdeps/arm/machine-gmon.h
@@ -0,0 +1,55 @@
+/* Machine-dependent definitions for profiling support. ARM version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0,
+ so we must use an assembly stub. */
+
+#include <sysdep.h>
+#ifndef NO_UNDERSCORES
+/* The asm symbols for C functions are `_function'.
+ The canonical name for the counter function is `mcount', no _. */
+void _mcount (void) asm ("mcount");
+#else
+/* The canonical name for the function is `_mcount' in both C and asm,
+ but some old asm code might assume it's `mcount'. */
+void _mcount (void);
+weak_alias (_mcount, mcount)
+#endif
+
+static void mcount_internal (u_long frompc, u_long selfpc);
+
+#define _MCOUNT_DECL(frompc, selfpc) \
+static void mcount_internal (u_long frompc, u_long selfpc)
+
+#define MCOUNT \
+void _mcount (void) \
+{ \
+ register unsigned long int frompc, selfpc; \
+ __asm__("movs fp, fp; " \
+ "moveq %0, $0; " \
+ "ldrne %0, [fp, $-4]; " \
+ "ldrne %1, [fp, $-12]; " \
+ "movnes %1, %1; " \
+ "ldrne %1, [%1, $-4]; " \
+ : "=g" (selfpc), "=g" (frompc) \
+ : : "cc" \
+ ); \
+ if (selfpc) \
+ mcount_internal(frompc, selfpc); \
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=409871bc7595edd49df4072a15f47f89b68706e9
commit 409871bc7595edd49df4072a15f47f89b68706e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 24 01:35:45 1997 +0000
Don't define __ protected names.
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index c6e09f1..4308192 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
#include <sysdep.h>
-ENTRY(__htonl)
+ENTRY(htonl)
#ifdef PROF
ldgp gp, 0(pv)
.set noat
@@ -43,6 +43,4 @@ ENTRY(__htonl)
END(__htonl)
-strong_alias_asm(__htonl, __ntohl)
-weak_alias(__htonl, htonl)
-weak_alias(__htonl, ntohl)
+weak_alias(htonl, ntohl)
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index 8d3aefe..f65f0e0 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@
#include <sysdep.h>
-ENTRY(__htons)
+ENTRY(htons)
#ifdef PROF
ldgp gp, 0(pv)
.set noat
@@ -37,6 +37,4 @@ ENTRY(__htons)
END(__htons)
-strong_alias_asm(__htons, __ntohs)
-weak_alias(__htons, htons)
-weak_alias(__htons, ntohs)
+weak_alias(htons, ntohs)
diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s
index 93e13ea..ba39986 100644
--- a/sysdeps/vax/htonl.s
+++ b/sysdeps/vax/htonl.s
@@ -23,11 +23,9 @@
#include "DEFS.h"
-ENTRY(__htonl, 0)
+ENTRY(htonl, 0)
rotl $-8,4(ap),r0
insv r0,$16,$8,r0
movb 7(ap),r0
ret
-strong_alias (__htonl, __ntohl)
-weak_alias (__htonl, htonl)
-weak_alias (__ntohl, ntohl)
+weak_alias (htonl, ntohl)
diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s
index 16964c2..1e781a1 100644
--- a/sysdeps/vax/htons.s
+++ b/sysdeps/vax/htons.s
@@ -28,6 +28,4 @@ ENTRY(htons, 0)
movb 5(ap),r0
movzwl r0,r0
ret
-strong_alias (__htons, __ntohs)
-weak_alias (__htons, htons)
-weak_alias (__ntohs, ntohs)
+weak_alias (htons, ntohs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75dc7e89eb86594198deca639a96ea82181d0177
commit 75dc7e89eb86594198deca639a96ea82181d0177
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jul 24 01:32:45 1997 +0000
Don't handle FE_INEXACT specially, the standard doesn't require it.
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index d509604..bc49c9c 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -48,43 +48,17 @@ feraiseexcept (int excepts)
/* Next: overflow. */
if (excepts & FE_OVERFLOW)
{
- /* We cannot raise the overflow exception without also setting the
- inexact flag. Restore it after the operation, unless it should
- be set anyway. */
long double d = LDBL_MAX;
- fexcept_t fpsr;
- __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
- __asm__ __volatile__ ("fmul%.x %0,%0" : "=f" (d) : "0" (d));
- if (!((excepts | fpsr) & FE_INEXACT))
- {
- __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
- fpsr &= ~FE_INEXACT;
- __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
- }
- else
- __asm__ ("fnop");
+ __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d));
}
/* Next: underflow. */
if (excepts & FE_UNDERFLOW)
{
- /* We cannot raise the underflow exception without also setting the
- inexact flag. Restore it after the operation, unless it should
- be set anyway. */
long double d = -LDBL_MAX;
- fexcept_t fpsr;
- __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
- __asm__ __volatile__ ("fetox%.x %0" : "=f" (d) : "0" (d));
- if (!((excepts | fpsr) & FE_INEXACT))
- {
- __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
- fpsr &= ~FE_INEXACT;
- __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
- }
- else
- __asm__ ("fnop");
+ __asm__ __volatile__ ("fetox%.x %0; fnop" : "=f" (d) : "0" (d));
}
/* Last: inexact. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=284d16781d2d9566e83200e26f87a1e128de7ae3
commit 284d16781d2d9566e83200e26f87a1e128de7ae3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:09:47 1997 +0000
We use aliases now.
diff --git a/sysdeps/alpha/ntohl.s b/sysdeps/alpha/ntohl.s
deleted file mode 100644
index 6a99a01..0000000
--- a/sysdeps/alpha/ntohl.s
+++ /dev/null
@@ -1,2 +0,0 @@
-/* This is a dummy to avoid including the generic version. htonl and
-ntohl are identical and htonl.S defines appropriate aliases. */
diff --git a/sysdeps/alpha/ntohs.s b/sysdeps/alpha/ntohs.s
deleted file mode 100644
index 69992a8..0000000
--- a/sysdeps/alpha/ntohs.s
+++ /dev/null
@@ -1,2 +0,0 @@
-/* This is a dummy to avoid including the generic version. htons and
-ntohs are identical and htons.S defines appropriate aliases. */
diff --git a/sysdeps/vax/ntohl.s b/sysdeps/vax/ntohl.s
deleted file mode 100644
index 0fcaa2f..0000000
--- a/sysdeps/vax/ntohl.s
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)ntohl.s 5.5 (Berkeley) 6/27/88"
-#endif /* LIBC_SCCS and not lint */
-
-/* hostorder = ntohl(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohl, 0)
- rotl $-8,4(ap),r0
- insv r0,$16,$8,r0
- movb 7(ap),r0
- ret
diff --git a/sysdeps/vax/ntohs.s b/sysdeps/vax/ntohs.s
deleted file mode 100644
index 626a37b..0000000
--- a/sysdeps/vax/ntohs.s
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)ntohs.s 5.5 (Berkeley) 6/27/88"
-#endif /* LIBC_SCCS and not lint */
-
-/* hostorder = ntohs(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohs, 0)
- rotl $8,4(ap),r0
- movb 5(ap),r0
- movzwl r0,r0
- ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e392c0f030e5584c11bd7d0357ef9caaf238a391
commit e392c0f030e5584c11bd7d0357ef9caaf238a391
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:09:30 1997 +0000
Add aliases for ntohs.
diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s
index c500e84..16964c2 100644
--- a/sysdeps/vax/htons.s
+++ b/sysdeps/vax/htons.s
@@ -28,3 +28,6 @@ ENTRY(htons, 0)
movb 5(ap),r0
movzwl r0,r0
ret
+strong_alias (__htons, __ntohs)
+weak_alias (__htons, htons)
+weak_alias (__ntohs, ntohs)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36968baa4091d1e1b78cc2439e0732b8c0ede065
commit 36968baa4091d1e1b78cc2439e0732b8c0ede065
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:09:25 1997 +0000
Add aliases for ntohl.
diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s
index af5b96c..93e13ea 100644
--- a/sysdeps/vax/htonl.s
+++ b/sysdeps/vax/htonl.s
@@ -23,8 +23,11 @@
#include "DEFS.h"
-ENTRY(htonl, 0)
+ENTRY(__htonl, 0)
rotl $-8,4(ap),r0
insv r0,$16,$8,r0
movb 7(ap),r0
ret
+strong_alias (__htonl, __ntohl)
+weak_alias (__htonl, htonl)
+weak_alias (__ntohl, ntohl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=426445603474f59d272e3b21541ec629ecb233af
commit 426445603474f59d272e3b21541ec629ecb233af
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:08:44 1997 +0000
General MIPS header.
diff --git a/sysdeps/unix/sysv/linux/mips/sgidefs.h b/sysdeps/unix/sysv/linux/mips/sgidefs.h
new file mode 100644
index 0000000..a36ece0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sgidefs.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SGIDEFS_H
+#define _SGIDEFS_H 1
+
+/*
+ * The real definitions come from the Linux kernel sources
+ */
+#include <asm/sgidefs.h>
+
+#endif /* sgidefs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3d81156f7915d5dfc907fa3e559db94b19c2964
commit a3d81156f7915d5dfc907fa3e559db94b19c2964
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:07:51 1997 +0000
Renamed to sgidefs.h.
diff --git a/sysdeps/unix/sysv/linux/mips/sgidef.h b/sysdeps/unix/sysv/linux/mips/sgidef.h
deleted file mode 100644
index a36ece0..0000000
--- a/sysdeps/unix/sysv/linux/mips/sgidef.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SGIDEFS_H
-#define _SGIDEFS_H 1
-
-/*
- * The real definitions come from the Linux kernel sources
- */
-#include <asm/sgidefs.h>
-
-#endif /* sgidefs.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7679a4757cff6c0569643a1793fb1672e4fe0f0b
commit 7679a4757cff6c0569643a1793fb1672e4fe0f0b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:07:43 1997 +0000
Renamed to lxstat.c.
diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.h b/sysdeps/unix/sysv/linux/mips/lxstat.h
deleted file mode 100644
index 7907b2f..0000000
--- a/sysdeps/unix/sysv/linux/mips/lxstat.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <kernel_stat.h>
-
-extern int __syscall_lstat (const char *, struct kernel_stat *);
-
-/* Get information about the file NAME in BUF. */
-int
-__lxstat (int vers, const char *name, struct stat *buf)
-{
- struct kernel_stat kbuf;
- int result;
-
- switch (vers)
- {
- case _STAT_VER_LINUX_OLD:
- /* Nothing to do. The struct is in the form the kernel expects
- it to be. */
- result = __syscall_lstat (name, (struct kernel_stat *) buf);
- break;
-
- case _STAT_VER_LINUX:
- /* Do the system call. */
- result = __syscall_lstat (name, &kbuf);
-
- /* Convert to current kernel version of `struct stat'. */
- buf->st_dev = kbuf.st_dev;
- buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
- buf->st_ino = kbuf.st_ino;
- buf->st_mode = kbuf.st_mode;
- buf->st_nlink = kbuf.st_nlink;
- buf->st_uid = kbuf.st_uid;
- buf->st_gid = kbuf.st_gid;
- buf->st_rdev = kbuf.st_rdev;
- buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
- buf->st_pad3 = 0;
- buf->st_size = kbuf.st_size;
- buf->st_blksize = kbuf.st_blksize;
- buf->st_blocks = kbuf.st_blocks;
-
- buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
- buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
- buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
-
- buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
- buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
- buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
- buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
- break;
-
- default:
- __set_errno (EINVAL);
- result = -1;
- break;
- }
-
- return result;
-}
-weak_alias (__lxstat, _lxstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d899ae6f779f75b3d270cfa7349746eab518c17
commit 7d899ae6f779f75b3d270cfa7349746eab518c17
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:07:34 1997 +0000
Linux/MIPS specific lxstat implementation.
diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c
new file mode 100644
index 0000000..7907b2f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/lxstat.c
@@ -0,0 +1,80 @@
+/* lxstat using old-style Unix lstat system call.
+ Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <kernel_stat.h>
+
+extern int __syscall_lstat (const char *, struct kernel_stat *);
+
+/* Get information about the file NAME in BUF. */
+int
+__lxstat (int vers, const char *name, struct stat *buf)
+{
+ struct kernel_stat kbuf;
+ int result;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX_OLD:
+ /* Nothing to do. The struct is in the form the kernel expects
+ it to be. */
+ result = __syscall_lstat (name, (struct kernel_stat *) buf);
+ break;
+
+ case _STAT_VER_LINUX:
+ /* Do the system call. */
+ result = __syscall_lstat (name, &kbuf);
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf.st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf.st_ino;
+ buf->st_mode = kbuf.st_mode;
+ buf->st_nlink = kbuf.st_nlink;
+ buf->st_uid = kbuf.st_uid;
+ buf->st_gid = kbuf.st_gid;
+ buf->st_rdev = kbuf.st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf.st_size;
+ buf->st_blksize = kbuf.st_blksize;
+ buf->st_blocks = kbuf.st_blocks;
+
+ buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ result = -1;
+ break;
+ }
+
+ return result;
+}
+weak_alias (__lxstat, _lxstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75b69faebc02acaefc3a7b2eaafe1213e44ad807
commit 75b69faebc02acaefc3a7b2eaafe1213e44ad807
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:05:40 1997 +0000
MIPS64 dependent RTLD.
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
new file mode 100644
index 0000000..3277b10
--- /dev/null
+++ b/sysdeps/mips/mips64/dl-machine.h
@@ -0,0 +1,594 @@
+/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef dl_machine_h
+#define dl_machine_h
+
+#define ELF_MACHINE_NAME "MIPS"
+
+#include <assert.h>
+#include <entry.h>
+
+#ifndef ENTRY_POINT
+#error ENTRY_POINT needs to be defined for MIPS.
+#endif
+
+#ifndef _RTLD_PROLOGUE
+#ifdef __STDC__
+#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
+ "\n\t.ent " #entry \
+ "\n\t" #entry ":\n\t"
+#else
+#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t"
+#endif
+#endif
+
+#ifndef _RTLD_EPILOGUE
+#ifdef __STDC__
+#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
+#else
+#define _RTLD_EPILOGUE(entry) "\t.end entry\n"
+#endif
+#endif
+
+/* I have no idea what I am doing. */
+#define ELF_MACHINE_RELOC_NOPLT -1
+#define elf_machine_lookup_noplt_p(type) (1)
+#define elf_machine_lookup_noexec_p(type) (0)
+
+/* Translate a processor specific dynamic tag to the index
+ in l_info array. */
+#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
+
+#if 0
+/* We may need 64k alignment. */
+#define ELF_MACHINE_ALIGN_MASK 0xffff
+#endif
+
+/*
+ * MIPS libraries are usually linked to a non-zero base address. We
+ * subtrace the base address from the address where we map the object
+ * to. This results in more efficient address space usage.
+ */
+#if 0
+#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
+ (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
+#else
+#define MAP_BASE_ADDR(l) 0x5ffe0000
+#endif
+
+/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
+ with the run-time address of the r_debug structure */
+#define ELF_MACHINE_DEBUG_SETUP(l,r) \
+do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
+ *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
+ (ElfW(Addr)) (r); \
+ } while (0)
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int __attribute__ ((unused))
+elf_machine_matches_host (ElfW(Half) e_machine)
+{
+ switch (e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
++ first element of the GOT. This must be inlined in a function which
++ uses global data. */
++static inline ElfW(Addr)
++elf_machine_dynamic (void)
++{
++ register ElfW(Addr) gp asm ("$28");
++ return * (ElfW(Addr) *) (gp - 0x7ff0);
++}
++
+static inline ElfW(Addr) *
+elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
+{
+ /* FIXME: the offset of gp from GOT may be system-dependent. */
+ return (ElfW(Addr) *) (gpreg - 0x7ff0);
+}
+
+/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
+ Must be inlined in a function which uses global data. */
+static inline ElfW(Addr) *
+elf_machine_got (void)
+{
+ ElfW(Addr) gp;
+
+ __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp));
+ return elf_mips_got_from_gpreg (gp);
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline ElfW(Addr)
+elf_machine_load_address (void)
+{
+ ElfW(Addr) addr;
+ asm (" .set noreorder\n"
+ " dla %0, here\n"
+ " bltzal $0, here\n"
+ " nop\n"
+ "here: dsubu %0, $31, %0\n"
+ " .set reorder\n"
+ : "=r" (addr)
+ : /* No inputs */
+ : "$31");
+ return addr;
+}
+
+/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
+#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+
+/* Relocate GOT. */
+static inline void
+elf_machine_got_rel (struct link_map *map, int lazy)
+{
+ ElfW(Addr) *got;
+ ElfW(Sym) *sym;
+ int i, n;
+ struct link_map **scope;
+ const char *strtab
+ = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+
+#define RESOLVE_GOTSYM(sym) \
+ ({ \
+ const ElfW(Sym) *ref = sym; \
+ ElfW(Addr) sym_loadaddr; \
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \
+ map->l_name, ELF_MACHINE_RELOC_NOPLT);\
+ (ref)? sym_loadaddr + ref->st_value: 0; \
+ })
+
+ got = (ElfW(Addr) *) ((void *) map->l_addr
+ + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ /* got[0] is reserved. got[1] is also reserved for the dynamic object
+ generated by gnu ld. Skip these reserved entries from relocation. */
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
+ n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
+ /* Add the run-time display to all local got entries. */
+ while (i < n)
+ got[i++] += map->l_addr;
+
+ /* Set scope. */
+ scope = _dl_object_relocation_scope (map);
+
+ /* Handle global got entries. */
+ got += n;
+ sym = (ElfW(Sym) *) ((void *) map->l_addr
+ + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
+ - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
+
+ while (i--)
+ {
+ if (sym->st_shndx == SHN_UNDEF)
+ {
+ if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
+ {
+ if (sym->st_value && lazy)
+ *got = sym->st_value + map->l_addr;
+ else
+ *got = RESOLVE_GOTSYM (sym);
+ }
+ else /* if (*got == 0 || *got == QS) */
+ *got = RESOLVE_GOTSYM (sym);
+ }
+ else if (sym->st_shndx == SHN_COMMON)
+ *got = RESOLVE_GOTSYM (sym);
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
+ && *got != sym->st_value
+ && lazy)
+ *got += map->l_addr;
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
+ {
+ if (sym->st_other == 0)
+ *got += map->l_addr;
+ }
+ else
+ *got = RESOLVE_GOTSYM (sym);
+
+ got++;
+ sym++;
+ }
+
+#undef RESOLVE_GOTSYM
+ *_dl_global_scope_end = NULL;
+
+ return;
+}
+
+/* Set up the loaded object described by L so its stub function
+ will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline int
+elf_machine_runtime_setup (struct link_map *l, int lazy)
+{
+ ElfW(Addr) *got;
+ extern void _dl_runtime_resolve (ElfW(Word));
+ extern int _dl_mips_gnu_objects;
+
+#ifdef RTLD_BOOTSTRAP
+ {
+ return lazy;
+ }
+#endif
+ if (lazy)
+ {
+ /* The GOT entries for functions have not yet been filled in.
+ Their initial contents will arrange when called to put an
+ offset into the .dynsym section in t8, the return address
+ in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
+ got = (ElfW(Addr) *) ((void *) l->l_addr
+ + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ /* This function will get called to fix up the GOT entry indicated by
+ the register t8, and then jump to the resolved address. */
+ got[0] = (ElfW(Addr)) &_dl_runtime_resolve;
+
+ /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB
+ of got[1] of a gnu object is set to identify gnu objects.
+ Where we can store l for non gnu objects? XXX */
+ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ else
+ _dl_mips_gnu_objects = 0;
+ }
+
+ /* Relocate global offset table. */
+ elf_machine_got_rel (l, lazy);
+
+ return lazy;
+}
+
+/* Get link_map for this object. */
+static inline struct link_map *
+elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
+{
+ extern int _dl_mips_gnu_objects;
+
+ /* got[1] is reserved to keep its link map address for the shared
+ object generated by gnu linker. If all are such object, we can
+ find link map from current GPREG simply. If not so, get link map
+ for callers object containing STUB_PC. */
+
+ if (_dl_mips_gnu_objects)
+ {
+ ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
+ ElfW(Word) g1;
+
+ g1 = ((ElfW(Word) *) got)[1];
+
+ if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ }
+
+ {
+ struct link_map *l = _dl_loaded;
+ struct link_map *ret = 0;
+ ElfW(Addr) candidate = 0;
+
+ while (l)
+ {
+ ElfW(Addr) base = 0;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ /* Get the base. */
+ for (this = 0; this < nent; this++)
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ break;
+ }
+ if (! base)
+ {
+ l = l->l_next;
+ continue;
+ }
+
+ /* Find closest link base addr. */
+ if ((base < stub_pc) && (candidate < base))
+ {
+ candidate = base;
+ ret = l;
+ }
+ l = l->l_next;
+ }
+ if (candidate && ret && (candidate < stub_pc))
+ return ret;
+ else if (!candidate)
+ return _dl_loaded;
+ }
+
+ _dl_signal_error (0, NULL, "cannot find runtime link map");
+ return NULL;
+}
+
+/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */
+#define elf_machine_relplt elf_machine_rel
+
+/* Define mips specific runtime resolver. The function __dl_runtime_resolve
+ is called from assembler function _dl_runtime_resolve which converts
+ special argument registers t7 ($15) and t8 ($24):
+ t7 address to return to the caller of the function
+ t8 index for this function symbol in .dynsym
+ to usual c arguments. */
+
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
+ generated by the gnu linker. */ \
+int _dl_mips_gnu_objects = 1; \
+ \
+/* This is called from assembly stubs below which the compiler can't see. */ \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
+ __attribute__ ((unused)); \
+ \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word) sym_index, \
+ ElfW(Word) return_address, \
+ ElfW(Addr) old_gpreg, \
+ ElfW(Addr) stub_pc) \
+{ \
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
+ const ElfW(Sym) *const symtab \
+ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
+ const char *strtab \
+ = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ const ElfW(Addr) *got \
+ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ const ElfW(Word) local_gotno \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
+ const ElfW(Word) gotsym \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
+ const ElfW(Sym) *definer; \
+ ElfW(Addr) loadbase; \
+ ElfW(Addr) funcaddr; \
+ struct link_map **scope; \
+ \
+ /* Look up the symbol's run-time value. */ \
+ scope = _dl_object_relocation_scope (l); \
+ definer = &symtab[sym_index]; \
+ \
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
+ scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
+ \
+ *_dl_global_scope_end = NULL; \
+ \
+ /* Apply the relocation with that value. */ \
+ funcaddr = loadbase + definer->st_value; \
+ *(got + local_gotno + sym_index - gotsym) = funcaddr; \
+ \
+ return funcaddr; \
+} \
+ \
+asm ("\n \
+ .text\n \
+ .align 3\n \
+ .globl _dl_runtime_resolve\n \
+ .type _dl_runtime_resolve,@function\n \
+ .ent _dl_runtime_resolve\n \
+_dl_runtime_resolve:\n \
+ .set noreorder\n \
+ # Save old GP to $3.\n \
+ move $3,$28\n \
+ # Modify t9 ($25) so as to point .cpload instruction.\n \
+ daddu $25,2*8\n \
+ # Compute GP.\n \
+ .cpload $25\n \
+ .set reorder\n \
+ # Save slot call pc.\n \
+ move $2, $31\n \
+ # Save arguments and sp value in stack.\n \
+ dsubu $29, 10*8\n \
+ .cprestore 8*8\n \
+ sd $15, 9*8($29)\n \
+ sd $4, 3*8($29)\n \
+ sd $5, 4*8($29)\n \
+ sd $6, 5*8($29)\n \
+ sd $7, 6*8($29)\n \
+ sd $16, 7*8($29)\n \
+ move $16, $29\n \
+ move $4, $24\n \
+ move $5, $15\n \
+ move $6, $3\n \
+ move $7, $2\n \
+ jal __dl_runtime_resolve\n \
+ move $29, $16\n \
+ ld $31, 9*8($29)\n \
+ ld $4, 3*8($29)\n \
+ ld $5, 4*8($29)\n \
+ ld $6, 5*8($29)\n \
+ ld $7, 6*8($29)\n \
+ ld $16, 7*8($29)\n \
+ daddu $29, 10*8\n \
+ move $25, $2\n \
+ jr $25\n \
+ .end _dl_runtime_resolve\n \
+");
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
+
+
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point.
+ Note how we have to be careful about two things:
+
+ 1) That we allocate a minimal stack of 24 bytes for
+ every function call, the MIPS ABI states that even
+ if all arguments are passed in registers the procedure
+ called can use the 16 byte area pointed to by $sp
+ when it is called to store away the arguments passed
+ to it.
+
+ 2) That under Linux the entry is named __start
+ and not just plain _start. */
+
+#define RTLD_START asm ("\
+ .text\n\
+ .align 3\n"\
+_RTLD_PROLOGUE (ENTRY_POINT)\
+" .globl _dl_start_user\n\
+ .set noreorder\n\
+ bltzal $0, 0f\n\
+ nop\n\
+0: .cpload $31\n\
+ .set reorder\n\
+ # i386 ABI book says that the first entry of GOT holds\n\
+ # the address of the dynamic structure. Though MIPS ABI\n\
+ # doesn't say nothing about this, I emulate this here.\n\
+ dla $4, _DYNAMIC\n\
+ sd $4, -0x7ff0($28)\n\
+ move $4, $29\n\
+ jal _dl_start\n\
+ # Get the value of label '_dl_start_user' in t9 ($25).\n\
+ dla $25, _dl_start_user\n\
+_dl_start_user:\n\
+ .set noreorder\n\
+ .cpload $25\n\
+ .set reorder\n\
+ move $16, $28\n\
+ # Save the user entry point address in saved register.\n\
+ move $17, $2\n\
+ # See if we were run as a command with the executable file\n\
+ # name as an extra leading argument.\n\
+ ld $2, _dl_skip_args\n\
+ beq $2, $0, 1f\n\
+ # Load the original argument count.\n\
+ ld $4, 0($29)\n\
+ # Subtract _dl_skip_args from it.\n\
+ dsubu $4, $2\n\
+ # Adjust the stack pointer to skip _dl_skip_args words.\n\
+ dsll $2,2\n\
+ daddu $29, $2\n\
+ # Save back the modified argument count.\n\
+ sd $4, 0($29)\n\
+ # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
+1: dla $2, _dl_default_scope\n\
+ ld $4, 2*8($2)\n\
+ # Call _dl_init_next to return the address of an initializer\n\
+ # function to run.\n\
+ jal _dl_init_next\n\
+ move $28, $16\n\
+ # Check for zero return, when out of initializers.\n\
+ beq $2, $0, 2f\n\
+ # Call the shared object initializer function.\n\
+ move $25, $2\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8($29)\n\
+ ld $7, 3*8($29)\n\
+ jalr $25\n\
+ move $28, $16\n\
+ # Loop to call _dl_init_next for the next initializer.\n\
+ b 1b\n\
+ # Pass our finalizer function to the user in ra.\n\
+2: dla $31, _dl_fini\n\
+ # Jump to the user entry point.\n\
+ move $25, $17\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8$29)\n\
+ ld $7, 3*8($29)\n\
+ jr $25\n"\
+_RTLD_EPILOGUE(ENTRY_POINT) \
+);
+
+
+/* The MIPS never uses Elfxx_Rela relocations. */
+#define ELF_MACHINE_NO_RELA 1
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
+ const ElfW(Sym) *sym, const struct r_found_version *version)
+{
+ ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ ElfW(Addr) loadbase;
+ ElfW(Addr) undo __attribute__ ((unused));
+
+ switch (ELFW(R_TYPE) (reloc->r_info))
+ {
+ case R_MIPS_REL32:
+ {
+ ElfW(Addr) undo = 0;
+
+ if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
+ && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
+ || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
+ {
+ *reloc_addr += map->l_addr;
+ break;
+ }
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link. This
+ declaration cannot be done when compiling rtld.c (i.e. #ifdef
+ RTLD_BOOTSTRAP) because rtld.c contains the common defn for
+ _dl_rtld_map, which is incompatible with a weak decl in the same
+ file. */
+ weak_extern (_dl_rtld_map);
+ if (map == &_dl_rtld_map)
+ /* Undo the relocation done here during bootstrapping. Now we will
+ relocate it anew, possibly using a binding found in the user
+ program or a loaded library rather than the dynamic linker's
+ built-in definitions used while loading those libraries. */
+ undo = map->l_addr + sym->st_value;
+#endif
+ loadbase = RESOLVE (&sym, version, 0);
+ *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
+ }
+ break;
+ case R_MIPS_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+{
+ /* Do nothing. */
+}
+
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abd048b1c0a41b8cc63c969958eeda11e4912af8
commit abd048b1c0a41b8cc63c969958eeda11e4912af8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:04:07 1997 +0000
Special parameters for rtld generation.
diff --git a/sysdeps/mips/rtld-parms b/sysdeps/mips/rtld-parms
new file mode 100644
index 0000000..72f09e7
--- /dev/null
+++ b/sysdeps/mips/rtld-parms
@@ -0,0 +1,15 @@
+ifndef rtld-wordsize
+rtld-wordsize = 32
+endif
+ifndef rtld-oformat
+rtld-oformat = elf$(rtld-wordsize)-bigmips
+endif
+ifndef rtld-arch
+rtld-arch = mips
+endif
+ifndef rtld-entry
+rtld-entry = __start
+endif
+ifndef rtld-base
+rtld-base = 0x0fb60000 + SIZEOF_HEADERS
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09d24ad4771c7c00beceaad12084df2b1c09253f
commit 09d24ad4771c7c00beceaad12084df2b1c09253f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jul 22 00:03:10 1997 +0000
(elf_machine_rela): Mention program name in warning message.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e50f773..c0a17c7 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -234,11 +234,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (sym->st_size > refsym->st_size
|| (_dl_verbose && sym->st_size < refsym->st_size))
{
+ extern char **_dl_argv;
const char *strtab;
strtab = ((void *) map->l_addr
+ map->l_info[DT_STRTAB]->d_un.d_ptr);
- _dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
+ _dl_sysdep_error (_dl_argv[0] ?: "<program name unknown>",
+ ": Symbol `", strtab + refsym->st_name,
"' has different size in shared object, "
"consider re-linking\n", NULL);
}
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index cc7198b..7456ae0 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -125,32 +125,11 @@ elf_machine_got (void)
}
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
-static inline ElfW(Addr)
-elf_machine_dynamic (void)
-{
- register ElfW(Addr) gp asm ("$28");
- return * (ElfW(Addr) *) (gp - 0x7ff0);
-}
-
/* Return the run-time load address of the shared object. */
static inline ElfW(Addr)
elf_machine_load_address (void)
{
ElfW(Addr) addr;
-#ifdef __mips64
- asm (" .set noreorder\n"
- " dla %0, here\n"
- " bltzal $0, here\n"
- " nop\n"
- "here: dsubu %0, $31, %0\n"
- " .set reorder\n"
- : "=r" (addr)
- : /* No inputs */
- : "$31");
-#else
asm (" .set noreorder\n"
" la %0, here\n"
" bltzal $0, here\n"
@@ -160,7 +139,6 @@ elf_machine_load_address (void)
: "=r" (addr)
: /* No inputs */
: "$31");
-#endif
return addr;
}
@@ -364,100 +342,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
t8 index for this function symbol in .dynsym
to usual c arguments. */
-#ifdef __mips64
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
- generated by the gnu linker. */ \
-int _dl_mips_gnu_objects = 1; \
- \
-/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
- \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word) sym_index, \
- ElfW(Word) return_address, \
- ElfW(Addr) old_gpreg, \
- ElfW(Addr) stub_pc) \
-{ \
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
- const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
- const char *strtab \
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
- const ElfW(Addr) *got \
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
- const ElfW(Word) local_gotno \
- = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
- const ElfW(Word) gotsym \
- = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
- const ElfW(Sym) *definer; \
- ElfW(Addr) loadbase; \
- ElfW(Addr) funcaddr; \
- struct link_map **scope; \
- \
- /* Look up the symbol's run-time value. */ \
- scope = _dl_object_relocation_scope (l); \
- definer = &symtab[sym_index]; \
- \
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
- scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
- \
- *_dl_global_scope_end = NULL; \
- \
- /* Apply the relocation with that value. */ \
- funcaddr = loadbase + definer->st_value; \
- *(got + local_gotno + sym_index - gotsym) = funcaddr; \
- \
- return funcaddr; \
-} \
- \
-asm ("\n \
- .text\n \
- .align 3\n \
- .globl _dl_runtime_resolve\n \
- .type _dl_runtime_resolve,@function\n \
- .ent _dl_runtime_resolve\n \
-_dl_runtime_resolve:\n \
- .set noreorder\n \
- # Save old GP to $3.\n \
- move $3,$28\n \
- # Modify t9 ($25) so as to point .cpload instruction.\n \
- daddu $25,2*8\n \
- # Compute GP.\n \
- .cpload $25\n \
- .set reorder\n \
- # Save slot call pc.\n \
- move $2, $31\n \
- # Save arguments and sp value in stack.\n \
- dsubu $29, 10*8\n \
- .cprestore 8*8\n \
- sd $15, 9*8($29)\n \
- sd $4, 3*8($29)\n \
- sd $5, 4*8($29)\n \
- sd $6, 5*8($29)\n \
- sd $7, 6*8($29)\n \
- sd $16, 7*8($29)\n \
- move $16, $29\n \
- move $4, $24\n \
- move $5, $15\n \
- move $6, $3\n \
- move $7, $2\n \
- jal __dl_runtime_resolve\n \
- move $29, $16\n \
- ld $31, 9*8($29)\n \
- ld $4, 3*8($29)\n \
- ld $5, 4*8($29)\n \
- ld $6, 5*8($29)\n \
- ld $7, 6*8($29)\n \
- ld $16, 7*8($29)\n \
- daddu $29, 10*8\n \
- move $25, $2\n \
- jr $25\n \
- .end _dl_runtime_resolve\n \
-");
-#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
generated by the gnu linker. */ \
@@ -550,7 +434,6 @@ _dl_runtime_resolve:\n \
jr $25\n \
.end _dl_runtime_resolve\n \
");
-#endif
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
@@ -573,78 +456,6 @@ _dl_runtime_resolve:\n \
2) That under Linux the entry is named __start
and not just plain _start. */
-#ifdef __mips64
-#define RTLD_START asm ("\
- .text\n\
- .align 3\n"\
-_RTLD_PROLOGUE (ENTRY_POINT)\
-" .globl _dl_start_user\n\
- .set noreorder\n\
- bltzal $0, 0f\n\
- nop\n\
-0: .cpload $31\n\
- .set reorder\n\
- # i386 ABI book says that the first entry of GOT holds\n\
- # the address of the dynamic structure. Though MIPS ABI\n\
- # doesn't say nothing about this, I emulate this here.\n\
- dla $4, _DYNAMIC\n\
- sd $4, -0x7ff0($28)\n\
- move $4, $29\n\
- jal _dl_start\n\
- # Get the value of label '_dl_start_user' in t9 ($25).\n\
- dla $25, _dl_start_user\n\
-_dl_start_user:\n\
- .set noreorder\n\
- .cpload $25\n\
- .set reorder\n\
- move $16, $28\n\
- # Save the user entry point address in saved register.\n\
- move $17, $2\n\
- # See if we were run as a command with the executable file\n\
- # name as an extra leading argument.\n\
- ld $2, _dl_skip_args\n\
- beq $2, $0, 1f\n\
- # Load the original argument count.\n\
- ld $4, 0($29)\n\
- # Subtract _dl_skip_args from it.\n\
- dsubu $4, $2\n\
- # Adjust the stack pointer to skip _dl_skip_args words.\n\
- dsll $2,2\n\
- daddu $29, $2\n\
- # Save back the modified argument count.\n\
- sd $4, 0($29)\n\
- # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
-1: dla $2, _dl_default_scope\n\
- ld $4, 2*8($2)\n\
- # Call _dl_init_next to return the address of an initializer\n\
- # function to run.\n\
- jal _dl_init_next\n\
- move $28, $16\n\
- # Check for zero return, when out of initializers.\n\
- beq $2, $0, 2f\n\
- # Call the shared object initializer function.\n\
- move $25, $2\n\
- ld $4, 0($29)\n\
- ld $5, 1*8($29)\n\
- ld $6, 2*8($29)\n\
- ld $7, 3*8($29)\n\
- jalr $25\n\
- move $28, $16\n\
- # Loop to call _dl_init_next for the next initializer.\n\
- b 1b\n\
- # Pass our finalizer function to the user in ra.\n\
-2: dla $31, _dl_fini\n\
- # Jump to the user entry point.\n\
- move $25, $17\n\
- ld $4, 0($29)\n\
- ld $5, 1*8($29)\n\
- ld $6, 2*8$29)\n\
- ld $7, 3*8($29)\n\
- jr $25\n"\
-_RTLD_EPILOGUE(ENTRY_POINT) \
-);
-
-#else
#define RTLD_START asm ("\
.text\n"\
_RTLD_PROLOGUE(ENTRY_POINT)\
@@ -718,8 +529,7 @@ _dl_start_user:\n\
lw $7, 12($29)\n\
jr $25\n"\
_RTLD_EPILOGUE(ENTRY_POINT)\
-");
-#endif
+);
/* The MIPS never uses Elfxx_Rela relocations. */
#define ELF_MACHINE_NO_RELA 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db45cbee79b1d013acb283d343543354192da7d3
commit db45cbee79b1d013acb283d343543354192da7d3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 14 21:46:28 1997 +0000
Removed since the generic version is sufficent.
diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h
deleted file mode 100644
index f5a5034..0000000
--- a/sysdeps/standalone/bits/stdio_lim.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
- Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
- On-Line Applications Research Corporation.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define L_tmpnam 1
-#define TMPMAX 0
-#define L_ctermid 1
-#define L_cuserid 1
-#define FOPEN_MAX 16
-#define FILENAME_MAX 14
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecbc158398f651207076dbae9e9d358d4ed3a4a0
commit ecbc158398f651207076dbae9e9d358d4ed3a4a0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 14 21:45:31 1997 +0000
Imply ieee754.
diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies
index a8cae95..06b9091 100644
--- a/sysdeps/mips/mips64/Implies
+++ b/sysdeps/mips/mips64/Implies
@@ -1 +1,3 @@
wordsize-64
+# MIPS uses IEEE 754 floating point.
+ieee754
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=216f1b7f7c687722eb1f0a81cbdc527722037719
commit 216f1b7f7c687722eb1f0a81cbdc527722037719
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 14 21:44:57 1997 +0000
Define ISO C9x comparison function always.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 79245c0..2ab570f 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -19,18 +19,69 @@
#ifdef __GNUC__
-#include <sys/cdefs.h>
+#ifdef __USE_ISOC9X
+
+/* ISO C 9X defines some macros to perform unordered comparisons. The
+ m68k FPU supports this with special opcodes and we should use them.
+ These must not be inline functions since we have to be able to handle
+ all floating-point types. */
+# define isgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsogt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+# define isgreaterequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsoge %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+# define isless(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsolt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+# define islessequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsole %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+# define islessgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsogl %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+# define isunordered(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsun %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+#endif
+
+
+#if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \
+ || defined __LIBC_M81_MATH_INLINES
#ifdef __LIBC_M81_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
__ names, and with `static inline' instead of `extern inline' so the
bodies will always be used, never an external function call. */
-#define __m81_u(x) __CONCAT(__,x)
-#define __m81_inline static __inline
+# define __m81_u(x) __CONCAT(__,x)
+# define __m81_inline static __inline
#else
-#define __m81_u(x) x
-#define __m81_inline extern __inline
-#define __M81_MATH_INLINES 1
+# define __m81_u(x) x
+# define __m81_inline extern __inline
+# define __M81_MATH_INLINES 1
#endif
/* Define a const math function. */
@@ -385,55 +436,7 @@ __inline_forward(void,sincosl,
#undef __inline_forward
#undef __inline_forward_c
-#ifdef __USE_ISOC9X
-
-/* ISO C 9X defines some macros to perform unordered comparisons. The
- m68k FPU supports this with special opcodes and we should use them.
- These must not be inline functions since we have to be able to handle
- all floating-point types. */
-# define isgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-# define isgreaterequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsoge %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-# define isless(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsolt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-# define islessequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsole %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-# define islessgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogl %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-# define isunordered(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsun %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-#endif
-
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+#endif
#endif /* GCC. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eca7f2724208f2cb0f03411f52af8ce85e1b4109
commit eca7f2724208f2cb0f03411f52af8ce85e1b4109
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jul 14 21:41:49 1997 +0000
Only define functions if __OPTIMIZE__.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
index 0f76027..2270312 100644
--- a/sysdeps/alpha/fpu/bits/mathinline.h
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -18,7 +18,8 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
+#ifdef __GNUC__
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
extern __inline double
__copysign (double __x, double __y)
@@ -42,3 +43,4 @@ atan (double __x)
}
#endif
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eec226c3baffaf0d628374a8de6385116e4da261
commit eec226c3baffaf0d628374a8de6385116e4da261
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:32:57 1997 +0000
New for Linux/MIPS port.
diff --git a/sysdeps/unix/sysv/linux/mips/Dist b/sysdeps/unix/sysv/linux/mips/Dist
new file mode 100644
index 0000000..a205c94
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/Dist
@@ -0,0 +1,3 @@
+clone.S
+kernel_sigaction.h
+kernel_stat.h
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
new file mode 100644
index 0000000..e6240ea
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -0,0 +1,10 @@
+ifeq ($(subdir),signal)
+#sysdep_routines += sigsuspend
+endif
+
+ifeq ($(subdir),misc)
+sysdep_routines += cachectl cacheflush sysmips
+
+headers += regdef.h fpregdef.h sys/asm.h sys/cachectl.h sys/fpregdef.h \
+ sys/regdef.h sys/sysmips.h
+endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/endian.h b/sysdeps/unix/sysv/linux/mips/bits/endian.h
new file mode 100644
index 0000000..9f60758
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/endian.h
@@ -0,0 +1,12 @@
+/* The MIPS architecture has selectable endianness.
+ Linux/MIPS exists in two both little and big endian flavours and we
+ want to be able to share the installed headerfiles between both,
+ so we define __BYTE_ORDER based on GCC's predefines. */
+
+#ifdef __MIPSEB__
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
+#ifdef __MIPSEL__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+#endif
diff --git a/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
new file mode 100644
index 0000000..2586140
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -0,0 +1,100 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#include <sys/types.h>
+
+
+/* In GNU, read and write are bits (unlike BSD). */
+#ifdef __USE_GNU
+#define O_READ O_RDONLY /* Open for reading. */
+#define O_WRITE O_WRONLY /* Open for writing. */
+#endif
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0x0003
+#define O_RDONLY 0x0000
+#define O_WRONLY 0x0001
+#define O_RDWR 0x0002
+#define O_APPEND 0x0008
+#define O_SYNC 0x0010
+#define O_NONBLOCK 0x0080
+#define O_CREAT 0x0100 /* not fcntl */
+#define O_TRUNC 0x0200 /* not fcntl */
+#define O_EXCL 0x0400 /* not fcntl */
+#define O_NOCTTY 0x0800 /* not fcntl */
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000
+
+#define O_NDELAY O_NONBLOCK
+
+#define F_DUPFD 0 /* dup */
+#define F_GETFD 1 /* get f_flags */
+#define F_SETFD 2 /* set f_flags */
+#define F_GETFL 3 /* more flags (cloexec) */
+#define F_SETFL 4
+#define F_GETLK 14
+#define F_SETLK 6
+#define F_SETLKW 7
+
+#define F_SETOWN 24 /* for sockets. */
+#define F_GETOWN 23 /* for sockets. */
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* for posix fcntl() and lockf() */
+#define F_RDLCK 0
+#define F_WRLCK 1
+#define F_UNLCK 2
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK 4 /* or 3 */
+#define F_SHLCK 8 /* or 4 */
+
+/* operations for bsd flock(), also used by the kernel implementation */
+#define LOCK_SH 1 /* shared lock */
+#define LOCK_EX 2 /* exclusive lock */
+#define LOCK_NB 4 /* or'd with one of the above to prevent XXXXXXXXXXXXXXXXXX
+ blocking */
+#define LOCK_UN 8 /* remove lock */
+
+typedef struct flock {
+ short l_type;
+ short l_whence;
+ __off_t l_start;
+ __off_t l_len;
+ long l_sysid; /* XXX */
+ __pid_t l_pid;
+ long pad[4]; /* XXX */
+} flock_t;
+
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FASYNC O_ASYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
new file mode 100644
index 0000000..486022e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h
@@ -0,0 +1,71 @@
+/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/ioctl.h> instead.
+ */
+
+#ifndef _BITS_IOCTL_TYPES_H
+#define _BITS_IOCTL_TYPES_H 1
+
+/* Get definition of constants for use with `ioctl'. */
+#include <asm/ioctls.h>
+
+struct winsize
+ {
+ unsigned short ws_row;
+ unsigned short ws_col;
+ unsigned short ws_xpixel;
+ unsigned short ws_ypixel;
+ };
+
+#define NCC 8
+struct termio
+ {
+ unsigned short c_iflag; /* input mode flags */
+ unsigned short c_oflag; /* output mode flags */
+ unsigned short c_cflag; /* control mode flags */
+ unsigned short c_lflag; /* local mode flags */
+ char c_line; /* line discipline */
+ /* Yes, this is really NCCS. */
+ unsigned char c_cc[32 /* NCCS */]; /* control characters */
+ };
+
+/* modem lines */
+#define TIOCM_LE 0x001 /* line enable */
+#define TIOCM_DTR 0x002 /* data terminal ready */
+#define TIOCM_RTS 0x004 /* request to send */
+#define TIOCM_ST 0x010 /* secondary transmit */
+#define TIOCM_SR 0x020 /* secondary receive */
+#define TIOCM_CTS 0x040 /* clear to send */
+#define TIOCM_CAR 0x100 /* carrier detect */
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RNG 0x200 /* ring */
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_DSR 0x400 /* data set ready */
+
+/* line disciplines */
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+
+#endif /* bits/ioctl-types.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/ipc.h b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
new file mode 100644
index 0000000..c5a3cd0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/ipc.h
@@ -0,0 +1,85 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IPC_BUF_H
+
+#define _SYS_IPC_BUF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'. */
+#define IPC_CREAT 01000 /* Create key if key does not exist. */
+#define IPC_EXCL 02000 /* Fail if key exists. */
+#define IPC_NOWAIT 04000 /* Return error on wait. */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'. */
+#define IPC_RMID 0 /* Remove identifier. */
+#define IPC_SET 1 /* Set `ipc_perm' options. */
+#define IPC_STAT 2 /* Get `ipc_perm' options. */
+#define IPC_INFO 3 /* See ipcs. */
+
+
+__BEGIN_DECLS
+
+/* Special key values. */
+#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
+
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+ {
+ __key_t __key; /* Key. */
+ long uid; /* Owner's user ID. */
+ long gid; /* Owner's group ID. */
+ long cuid; /* Creator's user ID. */
+ long cgid; /* Creator's group ID. */
+ unsigned long mode; /* Read/write permission. */
+ unsigned short int __seq; /* Sequence number. */
+ };
+
+
+/* Kludge to work around Linux' restriction of only up to five
+ arguments to a system call. */
+struct ipc_kludge
+ {
+ void *msgp;
+ long int msgtyp;
+ };
+
+/* The actual system call: all functions are multiplexed by this. */
+extern int __ipc __P ((int __call, int __first, int __second, int __third,
+ void *__ptr));
+
+/* The codes for the functions to use the multiplexer `__ipc'. */
+#define IPCOP_semop 1
+#define IPCOP_semget 2
+#define IPCOP_semctl 3
+#define IPCOP_msgsnd 11
+#define IPCOP_msgrcv 12
+#define IPCOP_msgget 13
+#define IPCOP_msgctl 14
+#define IPCOP_shmat 21
+#define IPCOP_shmdt 22
+#define IPCOP_shmget 23
+#define IPCOP_shmctl 24
+
+__END_DECLS
+
+#endif /* bits/ipc_buf.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/shm.h b/sysdeps/unix/sysv/linux/mips/bits/shm.h
new file mode 100644
index 0000000..9d4b20b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/shm.h
@@ -0,0 +1,92 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SHM_BUF_H
+
+#define _SYS_SHM_BUF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+
+/* Permission flag for shmget. */
+#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
+#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
+
+/* Flags for `shmat'. */
+#define SHM_RDONLY 010000 /* attach read-only else read-write */
+#define SHM_RND 020000 /* round attach address to SHMLBA */
+#define SHM_REMAP 040000 /* take-over region on attach */
+
+/* Commands for `shmctl'. */
+#define SHM_LOCK 11 /* lock segment (root only) */
+#define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+
+__BEGIN_DECLS
+
+/* Data structure describing a set of semaphores. */
+struct shmid_ds
+{
+ struct ipc_perm shm_perm; /* operation permission struct */
+ int shm_segsz; /* size of segment in bytes */
+ __time_t shm_atime; /* time of last shmat() */
+ __time_t shm_dtime; /* time of last shmdt() */
+ __time_t shm_ctime; /* time of last change by shmctl() */
+ long shm_cpid; /* pid of creator */
+ long shm_lpid; /* pid of last shmop */
+ unsigned short int shm_nattch; /* number of current attaches */
+ unsigned short int __shm_npages; /* size of segment (pages) */
+ unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__attaches; /* descriptors for attaches */
+};
+
+#ifdef __USE_MISC
+
+/* ipcs ctl commands */
+#define SHM_STAT 13
+#define SHM_INFO 14
+
+/* shm_mode upper byte flags */
+#define SHM_DEST 01000 /* segment will be destroyed on last detach */
+#define SHM_LOCKED 02000 /* segment will not be swapped */
+
+struct shminfo
+{
+ int shmmax;
+ int shmmin;
+ int shmmni;
+ int shmseg;
+ int shmall;
+};
+
+struct shm_info
+{
+ int used_ids;
+ ulong shm_tot; /* total allocated shm */
+ ulong shm_rss; /* total resident shm */
+ ulong shm_swp; /* total swapped shm */
+ ulong swap_attempts;
+ ulong swap_successes;
+};
+
+#endif /* __USE_MISC */
+
+__END_DECLS
+
+#endif /* bits/shm_buf.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/sigaction.h b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
new file mode 100644
index 0000000..66c58cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/sigaction.h
@@ -0,0 +1,62 @@
+/* The proper definitions for Linux/MIPS's sigaction.
+ Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Special flags. */
+ unsigned int sa_flags;
+
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* The ABI says here are two unused ints following. */
+ /* Restore handler. */
+ void (*sa_restorer) __P ((void));
+
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+ int sa_resv[1];
+#endif
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */
+#ifdef __USE_MISC
+#define SA_STACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#define SA_RESTART 0x10000000 /* Don't restart syscall on signal return. */
+#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+#define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+
+/* Some aliases for the SA_ constants. */
+#define SA_NOMASK SA_NODEFER
+#define SA_ONESHOT SA_RESETHAND
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_NOP 0 /* 0 is unused to catch errors */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+ set only the low 32 bit of the sigset. */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/signum.h b/sysdeps/unix/sysv/linux/mips/bits/signum.h
new file mode 100644
index 0000000..5254a2b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/signum.h
@@ -0,0 +1,30 @@
+/* Signal number definitions. Linux version.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Take these architecture specific stuff from the kernel header files. */
+#define __need_fake_sigfuns
+#define __need_signums
+#include <asm/signal.h>
+
+#endif /* <signal.h> included. */
+
+#define __need__nsig
+#include <asm/signal.h>
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
new file mode 100644
index 0000000..15f420f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -0,0 +1,178 @@
+/* System-specific socket constants and types. Linux version.
+ Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SOCKET_H
+#error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+#endif
+
+
+#include <features.h>
+
+#define __need_size_t
+#define __need_NULL
+#include <stddef.h>
+
+
+__BEGIN_DECLS
+
+/* Supported address families. */
+#define PF_UNSPEC 0
+#define PF_UNIX 1 /* Unix domain sockets */
+#define PF_LOCAL 1 /* POSIX name for AF_UNIX */
+#define PF_FILE PF_LOCAL /* POSIX name for PF_LOCAL. */
+#define PF_INET 2 /* Internet IP Protocol */
+#define PF_AX25 3 /* Amateur Radio AX.25 */
+#define PF_IPX 4 /* Novell IPX */
+#define PF_APPLETALK 5 /* Appletalk DDP */
+#define PF_NETROM 6 /* Amateur Radio NET/ROM */
+#define PF_BRIDGE 7 /* Multiprotocol bridge */
+#define PF_AAL5 8 /* Reserved for Werner's ATM */
+#define PF_X25 9 /* Reserved for X.25 project */
+#define PF_INET6 10 /* IP version 6 */
+#define PF_ROSE 11 /* Amateur Radio X.25 PLP */
+#define PF_DECNET 12 /* Reserved for DECnet project */
+#define PF_NETBEUI 13 /* Reserved for 802.2LLC project*/
+#define PF_MAX 32 /* For now.. */
+
+/* Protocol families, same as address families. */
+#define AF_UNSPEC PF_UNSPEC
+#define AF_UNIX PF_UNIX
+#define AF_LOCAL PF_LOCAL
+#define AF_FILE PF_FILE
+#define AF_INET PF_INET
+#define AF_AX25 PF_AX25
+#define AF_IPX PF_IPX
+#define AF_APPLETALK PF_APPLETALK
+#define AF_NETROM PF_NETROM
+#define AF_BRIDGE PF_BRIDGE
+#define AF_AAL5 PF_AAL5
+#define AF_X25 PF_X25
+#define AF_INET6 PF_INET6
+#define AF_ROSE PF_ROSE
+#define AF_DECNET PF_DECNET
+#define AF_NETBEUI PF_NETBEUI
+
+#define AF_MAX PF_MAX
+
+/* Raw IP packet level. */
+#define SOL_RAW 255
+
+/* Maximum queue length specifiable by listen. */
+#define SOMAXCONN 128
+
+/* Get the definition of the macro to define the common sockaddr members. */
+#include <bits/sockaddr.h>
+
+/* Structure describing a generic socket address. */
+struct sockaddr
+ {
+ __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
+ char sa_data[14]; /* Address data. */
+ };
+
+
+/* Bits in the FLAGS argument to `send', `recv', et al. */
+enum
+ {
+ MSG_OOB = 0x01, /* Process out-of-band data. */
+ MSG_PEEK = 0x02, /* Peek at incoming messages. */
+ MSG_DONTROUTE = 0x04, /* Don't use local routing. */
+ MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
+ MSG_PROXY = 0x10 /* Supply or ask second address. */
+ };
+
+
+/* Structure describing messages sent by
+ `sendmsg' and received by `recvmsg'. */
+struct msghdr
+ {
+ __ptr_t msg_name; /* Address to send to/receive from. */
+ int msg_namelen; /* Length of address data. */
+ /* XXX Should be type `size_t' according to POSIX.1g. */
+
+ struct iovec *msg_iov; /* Vector of data to send/receive into. */
+ int msg_iovlen; /* Number of elements in the vector. */
+ /* XXX Should be type `size_t' according to POSIX.1g. */
+
+ __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */
+ int msg_controllen; /* Ancillary data buffer length. */
+ /* XXX Should be type `size_t' according to POSIX.1g. */
+ int msg_flags; /* Flags on received message. */
+ };
+
+/* Structure used for storage of ancillary data object information. */
+struct cmsghdr
+ {
+ int cmsg_len; /* Length of data in cmsg_data plus length
+ of cmsghdr structure. */
+ /* XXX Should be type `size_t' according to POSIX.1g. */
+ int cmsg_level; /* Originating protocol. */
+ int cmsg_type; /* Protocol specific type. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+ unsigned char __cmsg_data[0]; /* Ancillary data. */
+#endif
+ };
+
+/* Ancillary data object manipulation macros. */
+#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
+# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+#else
+# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+#endif
+#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+#define CMSG_FIRSTHDR(mhdr) \
+ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
+ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+
+
+#ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+#endif
+extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg));
+_EXTERN_INLINE struct cmsghdr *
+__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
+{
+ unsigned char *__p;
+
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+ return NULL;
+
+ __p = (((unsigned char *) __cmsg)
+ + ((__cmsg->cmsg_len + sizeof (long int) - 1) & ~sizeof (long int)));
+ if (__p >= (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)
+ /* No more entries. */
+ return NULL;
+ return (struct cmsghdr *) __p;
+}
+
+
+/* Get socket manipulation related informations from kernel headers. */
+#include <asm/socket.h>
+
+
+/* Structure used to manipulate the SO_LINGER option. */
+struct linger
+ {
+ int l_onoff; /* Nonzero to linger on close. */
+ int l_linger; /* Time to linger. */
+ };
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/mips/bits/stat.h b/sysdeps/unix/sysv/linux/mips/bits/stat.h
new file mode 100644
index 0000000..a797b34
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/stat.h
@@ -0,0 +1,97 @@
+/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER_LINUX_OLD 1
+#define _STAT_VER_SVR4 2
+#define _STAT_VER_LINUX 3
+#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
+
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_LINUX 1
+#define _MKNOD_VER_SVR4 2
+#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ unsigned long int st_dev;
+ long int st_pad1[3];
+ __ino_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long int st_pad2[2];
+ __off_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long int st_pad3;
+ /*
+ * Actually this should be timestruc_t st_atime, st_mtime and
+ * st_ctime but we don't have it under Linux.
+ */
+ __time_t st_atime; /* Time of last access. */
+ long int __reserved0;
+ __time_t st_mtime; /* Time of last modification. */
+ long int __reserved1;
+ __time_t st_ctime; /* Time of last status change. */
+ long int __reserved2;
+ long int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+ long int st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16]; /* Filesystem type name */
+ long int st_pad4[8];
+ /* Linux specific fields */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/statfs.h b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
new file mode 100644
index 0000000..3b23061
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/statfs.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/statfs.h> instead.
+ */
+
+#ifndef _BITS_STATFS_H
+#define _BITS_STATFS_H
+
+struct statfs
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+ long int f_blocks;
+ long int f_bfree;
+ long int f_files;
+ long int f_ffree;
+
+ /* Linux specials */
+ long int f_bavail;
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_spare[6];
+ };
+
+#endif /* bits/statfs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h
new file mode 100644
index 0000000..c8a2469
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h
@@ -0,0 +1,260 @@
+/* termios type and macro definitions. Linux/MIPS version.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <termios.h> instead.
+ */
+
+
+#ifndef _BITS_TERMIOS_H
+#define _BITS_TERMIOS_H 1
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+
+#if defined __USE_BSD
+
+struct sgttyb
+ {
+ char sg_ispeed;
+ char sg_ospeed;
+ char sg_erase;
+ char sg_kill;
+ int sg_flags; /* SGI special - int, not short */
+ };
+
+struct tchars
+ {
+ char t_intrc;
+ char t_quitc;
+ char t_startc;
+ char t_stopc;
+ char t_eofc;
+ char t_brkc;
+ };
+
+struct ltchars
+ {
+ char t_suspc; /* stop process signal */
+ char t_dsuspc; /* delayed stop process signal */
+ char t_rprntc; /* reprint line */
+ char t_flushc; /* flush output (toggles) */
+ char t_werasc; /* word erase */
+ char t_lnextc; /* literal next character */
+ };
+
+#endif /* defined(__BSD) */
+
+#define NCCS 32
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
+
+/* c_cc characters */
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VERASE 2 /* Erase character [ICANON]. */
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
+#if defined (__USE_BSD)
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+/* The next two are guesses ... */
+#define VSWTC 7 /* ??? */
+#endif
+#define VSWTCH VSWTC
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+#if 0
+/*
+ * VDSUSP is not supported
+ */
+#if defined (__USE_BSD)
+#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+#endif
+#endif
+#if defined (__USE_BSD)
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#endif
+#if defined (__USE_BSD)
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#endif
+#define VEOF 16 /* End-of-file character [ICANON]. */
+#define VEOL 17 /* End-of-line character [ICANON]. */
+
+/* c_iflag bits */
+#define IGNBRK 0000001 /* Ignore break condition. */
+#define BRKINT 0000002 /* Signal interrupt on break. */
+#define IGNPAR 0000004 /* Ignore characters with parity errors. */
+#define PARMRK 0000010 /* Mark parity and framing errors. */
+#define INPCK 0000020 /* Enable input parity check. */
+#define ISTRIP 0000040 /* Strip 8th bit off characters. */
+#define INLCR 0000100 /* Map NL to CR on input. */
+#define IGNCR 0000200 /* Ignore CR. */
+#define ICRNL 0000400 /* Map CR to NL on input. */
+#if defined (__USE_BSD)
+#define IUCLC 0001000 /* Map upper case to lower case on input. */
+#endif
+#define IXON 0002000 /* Enable start/stop output control. */
+#if defined (__USE_BSD)
+#define IXANY 0004000 /* Any character will restart after stop. */
+#endif
+#define IXOFF 0010000 /* Enable start/stop input control. */
+#if defined (__USE_BSD)
+#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001 /* Perform output processing. */
+#if defined (__USE_BSD)
+#define OLCUC 0000002 /* Map lower case to upper case on output. */
+#define ONLCR 0000004 /* Map NL to CR-NL on output. */
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+#define OFILL 0000100
+#define OFDEL 0000200
+#define NLDLY 0000400
+#define NL0 0000000
+#define NL1 0000400
+#define CRDLY 0003000
+#define CR0 0000000
+#define CR1 0001000
+#define CR2 0002000
+#define CR3 0003000
+#define TABDLY 0014000
+#define TAB0 0000000
+#define TAB1 0004000
+#define TAB2 0010000
+#define TAB3 0014000
+#define XTABS 0014000
+#define BSDLY 0020000
+#define BS0 0000000
+#define BS1 0020000
+#define VTDLY 0040000
+#define VT0 0000000
+#define VT1 0040000
+#define FFDLY 0100000
+#define FF0 0000000
+#define FF1 0100000
+/*
+#define PAGEOUT ???
+#define WRAP ???
+ */
+#endif
+
+/* c_cflag bit meaning */
+#define CBAUD 0010017
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CSIZE 0000060 /* Number of bits per byte (mask). */
+#define CS5 0000000 /* 5 bits per byte. */
+#define CS6 0000020 /* 6 bits per byte. */
+#define CS7 0000040 /* 7 bits per byte. */
+#define CS8 0000060 /* 8 bits per byte. */
+#define CSTOPB 0000100 /* Two stop bits instead of one. */
+#define CREAD 0000200 /* Enable receiver. */
+#define PARENB 0000400 /* Parity enable. */
+#define PARODD 0001000 /* Odd parity instead of even. */
+#define HUPCL 0002000 /* Hang up on last close. */
+#define CLOCAL 0004000 /* Ignore modem status lines. */
+#if defined (__USE_BSD)
+#define CBAUDEX 0010000
+#define B57600 0010001
+#define B115200 0010002
+#define B230400 0010003
+#define B460800 0010004
+#define CIBAUD 002003600000 /* input baud rate (not used) */
+#define CRTSCTS 020000000000 /* flow control */
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001 /* Enable signals. */
+#define ICANON 0000002 /* Do erase and kill processing. */
+#define XCASE 0000004
+#define ECHO 0000010 /* Enable echo. */
+#define ECHOE 0000020 /* Visual erase for ERASE. */
+#define ECHOK 0000040 /* Echo NL after KILL. */
+#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
+#define NOFLSH 0000200 /* Disable flush after interrupt. */
+#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
+#if defined (__USE_BSD)
+#define ECHOCTL 0001000 /* Echo control characters as ^X. */
+#define ECHOPRT 0002000 /* Hardcopy visual erase. */
+#define ECHOKE 0004000 /* Visual erase for KILL. */
+#endif
+#define FLUSHO 0020000
+#if defined (__USE_BSD)
+#define PENDIN 0040000 /* Retype pending input (state). */
+#endif
+#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
+#define ITOSTOP TOSTOP
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
+
+/* tcflow() and TCXONC use these */
+#define TCOOFF 0 /* Suspend output. */
+#define TCOON 1 /* Restart suspended output. */
+#define TCIOFF 2 /* Send a STOP character. */
+#define TCION 3 /* Send a START character. */
+
+/* tcflush() and TCFLSH use these */
+#define TCIFLUSH 0 /* Discard data received but not yet read. */
+#define TCOFLUSH 1 /* Discard data written but not yet sent. */
+#define TCIOFLUSH 2 /* Discard all pending data. */
+
+/* tcsetattr uses these */
+#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */
+#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */
+#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+#endif /* bits/termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h
new file mode 100644
index 0000000..5fcef0f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/bits/time.h
@@ -0,0 +1,54 @@
+/* System-dependent timing definitions. Linux/MIPS version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <time.h> instead.
+ */
+
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ long tv_sec; /* Seconds. */
+ long tv_usec; /* Microseconds. */
+ };
+# endif /* struct timeval */
+#endif /* need timeval */
+
+
+#ifndef _BITS_TIME_H
+#define _BITS_TIME_H 1
+
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+ The macro `CLOCKS_PER_SEC' is the number per second of the value
+ returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+ The value of CLOCKS_PER_SEC is required to be 1 million on all
+ XSI-conformant systems. */
+# define CLOCKS_PER_SEC 1000000
+
+/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
+ presents the real value for clock ticks per second for the system. */
+# define CLK_TCK 100 /* XXX not correct for all systems. */
+
+#endif /* bits/time.h */
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
new file mode 100644
index 0000000..357f70e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
@@ -0,0 +1,125 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>, 1996.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <sys/asm.h>
+#include <asm/unistd.h>
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+
+/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
+
+#define FRAMESZ 4*SZREG
+#if _MIPS_SIM == _MIPS_SIM_ABI32
+#define MAX_REG_ARGS 4
+#else
+#define MAX_REG_ARGS 6
+#endif
+
+ .text
+NESTED(__clone,4*SZREG,sp)
+#ifdef __PIC__
+ .set noreorder
+ .cpload $25
+ .set reorder
+ .cprestore 16
+#endif
+ PTR_SUBIU sp,FRAMESZ
+#ifdef PROF
+ .set noat
+ move $1,ra
+ jal _mcount
+ .set at
+#endif
+
+ /* Sanity check arguments. */
+ li v0,EINVAL
+ beqz a0,error /* no NULL function pointers */
+ beqz a1,error /* no NULL stack pointers */
+ bltz a3,error /* no negative argument counts */
+
+ /* Allocate space on the new stack and copy args over */
+ move t0,a3 # save nargs for __thread_start
+ PTR_SLL t1,a3,PTR_SCALESHIFT
+ PTR_ADDU t1,a3,sp
+1: REG_L t2,-SZREG(t1)
+ PTR_SUBIU t1,SZREG
+ REG_S t2,-SZREG(a1)
+ PTR_SUBIU a3,1
+ PTR_SUBIU a1,SZREG
+ bnez a3,1b
+
+ /* Do the system call */
+ move t9,a0 # get fn ptr out of the way
+ move a0,a2
+ li v0,__NR_clone
+ syscall
+
+ bnez a3,error
+ beqz v0,__thread_start
+
+ /* Successful return from the parent */
+ PTR_ADDIU sp,FRAMESZ
+ ret
+
+ /* Something bad happened -- no child created */
+error:
+ PTR_ADDIU sp,FRAMESZ
+#ifdef PIC
+ la t9,__syscall_error
+ jr t9
+#else
+ j __syscall_error
+#endif
+ END(__clone)
+
+/* Load up the arguments to the function. Put this block of code in
+ its own function so that we can terminate the stack trace with our
+ debug info.
+
+ At this point we have t0=nargs, t9=fn, sp=&arg[0]. */
+
+NESTED(__thread_start,32,sp)
+ /* Stackframe has been created on entry of clone() */
+ /* Calculate address of jump into argument loading code */
+ li t1,MAX_REG_ARGS
+ slt t0,t1,t2 /* max MAX_REG_ARGS args in registers */
+ MOVN (t2,t1,t0)
+ la v0,arg0
+ PTR_SLL t1,t0,PTR_SCALESHIFT
+ PTR_SUBU v0,t1
+ jr v0
+
+ /* Load the integer register arguments */
+ REG_L a0,SZREG(sp)
+arg0:
+
+ /* Call the user's function */
+ jalr t9
+
+ /* Call _exit rather than doing it inline for breakpoint purposes */
+ move a0,v0
+ jal _exit
+
+ END(__thread_start)
+
+weak_alias(__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/mips/entry.h b/sysdeps/unix/sysv/linux/mips/entry.h
new file mode 100644
index 0000000..3db6d93
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/entry.h
@@ -0,0 +1 @@
+#define ENTRY_POINT __start
diff --git a/sysdeps/unix/sysv/linux/mips/fpregdef.h b/sysdeps/unix/sysv/linux/mips/fpregdef.h
new file mode 100644
index 0000000..a963d5f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/fpregdef.h
@@ -0,0 +1 @@
+#include <sys/fpregdef.h>
diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c
new file mode 100644
index 0000000..4a3c486
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/fxstat.c
@@ -0,0 +1,80 @@
+/* fxstat using old-style Unix fstat system call.
+ Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <kernel_stat.h>
+
+extern int __syscall_fstat (int, struct kernel_stat *);
+
+/* Get information about the file descriptor FD in BUF. */
+int
+__fxstat (int vers, int fd, struct stat *buf)
+{
+ struct kernel_stat kbuf;
+ int result;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX_OLD:
+ /* Nothing to do. The struct is in the form the kernel expects
+ it to be. */
+ result = __syscall_fstat (fd, (struct kernel_stat *) buf);
+ break;
+
+ case _STAT_VER_LINUX:
+ /* Do the system call. */
+ result = __syscall_fstat (fd, &kbuf);
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf.st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf.st_ino;
+ buf->st_mode = kbuf.st_mode;
+ buf->st_nlink = kbuf.st_nlink;
+ buf->st_uid = kbuf.st_uid;
+ buf->st_gid = kbuf.st_gid;
+ buf->st_rdev = kbuf.st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf.st_size;
+ buf->st_blksize = kbuf.st_blksize;
+ buf->st_blocks = kbuf.st_blocks;
+
+ buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ result = -1;
+ break;
+ }
+
+ return result;
+}
+weak_alias (__fxstat, _fxstat)
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
new file mode 100644
index 0000000..bb7fe6b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/kernel_sigaction.h
@@ -0,0 +1,22 @@
+/* This is the sigaction structure from the Linux 2.1.24 kernel. */
+
+#include <sgidefs.h>
+
+#define HAVE_SA_RESTORER
+
+struct kernel_sigaction {
+ unsigned int sa_flags;
+ __sighandler_t sa_handler;
+ unsigned long sa_mask;
+ unsigned int __pad0[3]; /* reserved, keep size constant */
+
+ /* Abi says here follows reserved int[2] */
+ void (*sa_restorer)(void);
+#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2)
+ /*
+ * For 32 bit code we have to pad struct sigaction to get
+ * constant size for the ABI
+ */
+ int pad1[1]; /* reserved */
+#endif
+};
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
new file mode 100644
index 0000000..c6419ba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
@@ -0,0 +1,28 @@
+/* Definition of `struct stat' used in the kernel.. */
+struct kernel_stat
+ {
+ unsigned long int st_dev;
+ long int __pad1[3]; /* Reserved for network id */
+ unsigned long int st_ino;
+ unsigned long int st_mode;
+ unsigned long int st_nlink;
+ long int st_uid;
+ long int st_gid;
+ unsigned long int st_rdev;
+ long int __pad2[2];
+ long int st_size;
+ long int __pad3;
+ unsigned int st_atime;
+ unsigned int __unused1;
+ unsigned int st_mtime;
+ unsigned int __unused2;
+ unsigned int st_ctime;
+ unsigned int __unused3;
+ long int st_blksize;
+ long int st_blocks;
+ char st_fstype[16]; /* Filesystem type name, unsupported */
+ long st_pad4[8];
+ /* Linux specific fields */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
diff --git a/sysdeps/unix/sysv/linux/mips/kernel_termios.h b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
new file mode 100644
index 0000000..35be1bb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/kernel_termios.h
@@ -0,0 +1,20 @@
+#ifndef _SYS_KERNEL_TERMIOS_H
+#define _SYS_KERNEL_TERMIOS_H 1
+/* The following corresponds to the values from the Linux 2.1.24 kernel. */
+
+/* We need the definition of tcflag_t, cc_t, and speed_t. */
+#include <bits/termios.h>
+
+#define __KERNEL_NCCS 23
+
+struct __kernel_termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ };
+
+#endif /* kernel_termios.h */
diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.h b/sysdeps/unix/sysv/linux/mips/lxstat.h
new file mode 100644
index 0000000..7907b2f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/lxstat.h
@@ -0,0 +1,80 @@
+/* lxstat using old-style Unix lstat system call.
+ Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <kernel_stat.h>
+
+extern int __syscall_lstat (const char *, struct kernel_stat *);
+
+/* Get information about the file NAME in BUF. */
+int
+__lxstat (int vers, const char *name, struct stat *buf)
+{
+ struct kernel_stat kbuf;
+ int result;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX_OLD:
+ /* Nothing to do. The struct is in the form the kernel expects
+ it to be. */
+ result = __syscall_lstat (name, (struct kernel_stat *) buf);
+ break;
+
+ case _STAT_VER_LINUX:
+ /* Do the system call. */
+ result = __syscall_lstat (name, &kbuf);
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf.st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf.st_ino;
+ buf->st_mode = kbuf.st_mode;
+ buf->st_nlink = kbuf.st_nlink;
+ buf->st_uid = kbuf.st_uid;
+ buf->st_gid = kbuf.st_gid;
+ buf->st_rdev = kbuf.st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf.st_size;
+ buf->st_blksize = kbuf.st_blksize;
+ buf->st_blocks = kbuf.st_blocks;
+
+ buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ result = -1;
+ break;
+ }
+
+ return result;
+}
+weak_alias (__lxstat, _lxstat)
diff --git a/sysdeps/unix/sysv/linux/mips/regdef.h b/sysdeps/unix/sysv/linux/mips/regdef.h
new file mode 100644
index 0000000..b613c8b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/regdef.h
@@ -0,0 +1 @@
+#include <sys/regdef.h>
diff --git a/sysdeps/unix/sysv/linux/mips/sgidef.h b/sysdeps/unix/sysv/linux/mips/sgidef.h
new file mode 100644
index 0000000..a36ece0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sgidef.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SGIDEFS_H
+#define _SGIDEFS_H 1
+
+/*
+ * The real definitions come from the Linux kernel sources
+ */
+#include <asm/sgidefs.h>
+
+#endif /* sgidefs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/acct.h b/sysdeps/unix/sysv/linux/mips/sys/acct.h
new file mode 100644
index 0000000..ee596db
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/acct.h
@@ -0,0 +1,66 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_ACCT_H
+
+#define _SYS_ACCT_H 1
+#include <features.h>
+
+#define __need_time_t
+#include <time.h>
+
+
+__BEGIN_DECLS
+
+#define ACCT_COMM 16
+
+struct acct
+ {
+ char ac_comm[ACCT_COMM]; /* Accounting command name. */
+ time_t ac_utime; /* Accounting user time. */
+ time_t ac_stime; /* Accounting system time. */
+ time_t ac_etime; /* Accounting elapsed time. */
+ time_t ac_btime; /* Beginning time. */
+ long ac_uid; /* Accounting user ID. */
+ long ac_gid; /* Accounting group ID. */
+ unsigned long int ac_tty; /* Controlling tty. */
+ /* Please note that the value of the `ac_tty' field, a device number,
+ is encoded differently in the kernel and for the libc dev_t type. */
+ char ac_flag; /* Accounting flag. */
+ long int ac_minflt; /* Accounting minor pagefaults. */
+ long int ac_majflt; /* Accounting major pagefaults. */
+ long int ac_exitcode; /* Accounting process exitcode. */
+ };
+
+enum
+ {
+ AFORK = 0001, /* Has executed fork, but no exec. */
+ ASU = 0002, /* Used super-user privileges. */
+ ACORE = 0004, /* Dumped core. */
+ AXSIG = 0010 /* Killed by a signal. */
+ };
+
+#define AHZ 100
+
+
+/* Switch process accounting on and off. */
+extern int acct __P ((__const char *__filename));
+
+__END_DECLS
+
+#endif /* sys/acct.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/asm.h b/sysdeps/unix/sysv/linux/mips/sys/asm.h
new file mode 100644
index 0000000..346a9c4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/asm.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_ASM_H
+#define _SYS_ASM_H
+
+/*
+ * The real definitions come from the Linux kernel sources
+ */
+#include <asm/asm.h>
+
+#endif /* sys/asm.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/cachectl.h b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
new file mode 100644
index 0000000..740c24d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/cachectl.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_CACHECTL_H
+#define _SYS_CACHECTL_H 1
+
+#include <features.h>
+
+/*
+ * Get the kernel definition for the op bits.
+ */
+#include <asm/cachectl.h>
+
+__BEGIN_DECLS
+
+#ifdef __USE_MISC
+extern int cachectl __P ((void *addr, __const int nbytes, __const int op));
+#endif
+extern int __cachectl __P ((void *addr, __const int nbytes, __const int op));
+#ifdef __USE_MISC
+extern int cacheflush __P ((void *addr, __const int nbytes, __const int op));
+#endif
+extern int _flush_cache __P ((char *addr, __const int nbytes, __const int op));
+
+__END_DECLS
+
+#endif /* sys/cachectl.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h
new file mode 100644
index 0000000..48d8f75
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/fpregdef.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_FPREGDEF_H
+#define _SYS_FPREGDEF_H
+
+/*
+ * The real definitions come from the Linux kernel sources
+ */
+#include <asm/fpregdef.h>
+
+#endif /* sys/fpregdef.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/procfs.h b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
new file mode 100644
index 0000000..d740954
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/procfs.h
@@ -0,0 +1,109 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PROCFS_H
+
+#define _SYS_PROCFS_H 1
+#include <features.h>
+
+/* This is somehow modelled after the file of the same name on SysVr4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. */
+
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <asm/user.h>
+#include <asm/elf.h>
+
+__BEGIN_DECLS
+
+struct elf_siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_code; /* Extra code. */
+ int si_errno; /* Errno. */
+ };
+
+typedef elf_greg_t greg_t;
+typedef elf_gregset_t gregset_t;
+typedef elf_fpregset_t fpregset_t;
+#define NGREG ELF_NGREG
+
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ gdb doesn't really use excluded. Fields present but not used are
+ marked with "XXX". */
+struct elf_prstatus
+ {
+#if 0
+ long int pr_flags; /* XXX Process flags. */
+ short int pr_why; /* XXX Reason for process halt. */
+ short int pr_what; /* XXX More detailed reason. */
+#endif
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned long int pr_sigpend; /* Set of pending signals. */
+ unsigned long int pr_sighold; /* Set of held signals. */
+#if 0
+ struct sigaltstack pr_altstack; /* Alternate stack info. */
+ struct sigaction pr_action; /* Signal action for current sig. */
+#endif
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct timeval pr_utime; /* User time. */
+ struct timeval pr_stime; /* System time. */
+ struct timeval pr_cutime; /* Cumulative user time. */
+ struct timeval pr_cstime; /* Cumulative system time. */
+#if 0
+ long int pr_instr; /* Current instruction. */
+#endif
+ elf_gregset_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+#define ELF_PRARGSZ (80) /* Number of chars for args */
+
+struct elf_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long int pr_flag; /* Flags. */
+ long pr_uid;
+ long pr_gid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif /* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/regdef.h b/sysdeps/unix/sysv/linux/mips/sys/regdef.h
new file mode 100644
index 0000000..700fd66
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/regdef.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ralf Baechle <ralf@gnu.ai.mit.edu>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _REGDEF_H
+#define _REGDEF_H 1
+
+/*
+ * The real definitions come from the Linux kernel sources
+ */
+#include <asm/regdef.h>
+#include <asm/fpregdef.h>
+
+#endif /* regdef.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/syscall.h b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
new file mode 100644
index 0000000..82f8427
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/syscall.h
@@ -0,0 +1,1187 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYSCALL_H
+#define _SYSCALL_H 1
+
+/* This file should list the numbers of the system the system knows.
+ But instead of duplicating this we use the information available
+ from the kernel sources. */
+#include <asm/unistd.h>
+
+/*
+ * SVR4 syscalls are in the range from 1 to 999
+ */
+#define SYS_SVR4 0
+#define SYS_SVR4_syscall (SYS_SVR4 + 0)
+#define SYS_SVR4_exit (SYS_SVR4 + 1)
+#define SYS_SVR4_fork (SYS_SVR4 + 2)
+#define SYS_SVR4_read (SYS_SVR4 + 3)
+#define SYS_SVR4_write (SYS_SVR4 + 4)
+#define SYS_SVR4_open (SYS_SVR4 + 5)
+#define SYS_SVR4_close (SYS_SVR4 + 6)
+#define SYS_SVR4_wait (SYS_SVR4 + 7)
+#define SYS_SVR4_creat (SYS_SVR4 + 8)
+#define SYS_SVR4_link (SYS_SVR4 + 9)
+#define SYS_SVR4_unlink (SYS_SVR4 + 10)
+#define SYS_SVR4_exec (SYS_SVR4 + 11)
+#define SYS_SVR4_chdir (SYS_SVR4 + 12)
+#define SYS_SVR4_gtime (SYS_SVR4 + 13)
+#define SYS_SVR4_mknod (SYS_SVR4 + 14)
+#define SYS_SVR4_chmod (SYS_SVR4 + 15)
+#define SYS_SVR4_chown (SYS_SVR4 + 16)
+#define SYS_SVR4_sbreak (SYS_SVR4 + 17)
+#define SYS_SVR4_stat (SYS_SVR4 + 18)
+#define SYS_SVR4_lseek (SYS_SVR4 + 19)
+#define SYS_SVR4_getpid (SYS_SVR4 + 20)
+#define SYS_SVR4_mount (SYS_SVR4 + 21)
+#define SYS_SVR4_umount (SYS_SVR4 + 22)
+#define SYS_SVR4_setuid (SYS_SVR4 + 23)
+#define SYS_SVR4_getuid (SYS_SVR4 + 24)
+#define SYS_SVR4_stime (SYS_SVR4 + 25)
+#define SYS_SVR4_ptrace (SYS_SVR4 + 26)
+#define SYS_SVR4_alarm (SYS_SVR4 + 27)
+#define SYS_SVR4_fstat (SYS_SVR4 + 28)
+#define SYS_SVR4_pause (SYS_SVR4 + 29)
+#define SYS_SVR4_utime (SYS_SVR4 + 30)
+#define SYS_SVR4_stty (SYS_SVR4 + 31)
+#define SYS_SVR4_gtty (SYS_SVR4 + 32)
+#define SYS_SVR4_access (SYS_SVR4 + 33)
+#define SYS_SVR4_nice (SYS_SVR4 + 34)
+#define SYS_SVR4_statfs (SYS_SVR4 + 35)
+#define SYS_SVR4_sync (SYS_SVR4 + 36)
+#define SYS_SVR4_kill (SYS_SVR4 + 37)
+#define SYS_SVR4_fstatfs (SYS_SVR4 + 38)
+#define SYS_SVR4_setpgrp (SYS_SVR4 + 39)
+#define SYS_SVR4_cxenix (SYS_SVR4 + 40)
+#define SYS_SVR4_dup (SYS_SVR4 + 41)
+#define SYS_SVR4_pipe (SYS_SVR4 + 42)
+#define SYS_SVR4_times (SYS_SVR4 + 43)
+#define SYS_SVR4_profil (SYS_SVR4 + 44)
+#define SYS_SVR4_plock (SYS_SVR4 + 45)
+#define SYS_SVR4_setgid (SYS_SVR4 + 46)
+#define SYS_SVR4_getgid (SYS_SVR4 + 47)
+#define SYS_SVR4_sig (SYS_SVR4 + 48)
+#define SYS_SVR4_msgsys (SYS_SVR4 + 49)
+#define SYS_SVR4_sysmips (SYS_SVR4 + 50)
+#define SYS_SVR4_sysacct (SYS_SVR4 + 51)
+#define SYS_SVR4_shmsys (SYS_SVR4 + 52)
+#define SYS_SVR4_semsys (SYS_SVR4 + 53)
+#define SYS_SVR4_ioctl (SYS_SVR4 + 54)
+#define SYS_SVR4_uadmin (SYS_SVR4 + 55)
+#define SYS_SVR4_exch (SYS_SVR4 + 56)
+#define SYS_SVR4_utssys (SYS_SVR4 + 57)
+#define SYS_SVR4_fsync (SYS_SVR4 + 58)
+#define SYS_SVR4_exece (SYS_SVR4 + 59)
+#define SYS_SVR4_umask (SYS_SVR4 + 60)
+#define SYS_SVR4_chroot (SYS_SVR4 + 61)
+#define SYS_SVR4_fcntl (SYS_SVR4 + 62)
+#define SYS_SVR4_ulimit (SYS_SVR4 + 63)
+#define SYS_SVR4_reserved1 (SYS_SVR4 + 64)
+#define SYS_SVR4_reserved2 (SYS_SVR4 + 65)
+#define SYS_SVR4_reserved3 (SYS_SVR4 + 66)
+#define SYS_SVR4_reserved4 (SYS_SVR4 + 67)
+#define SYS_SVR4_reserved5 (SYS_SVR4 + 68)
+#define SYS_SVR4_reserved6 (SYS_SVR4 + 69)
+#define SYS_SVR4_advfs (SYS_SVR4 + 70)
+#define SYS_SVR4_unadvfs (SYS_SVR4 + 71)
+#define SYS_SVR4_unused1 (SYS_SVR4 + 72)
+#define SYS_SVR4_unused2 (SYS_SVR4 + 73)
+#define SYS_SVR4_rfstart (SYS_SVR4 + 74)
+#define SYS_SVR4_unused3 (SYS_SVR4 + 75)
+#define SYS_SVR4_rdebug (SYS_SVR4 + 76)
+#define SYS_SVR4_rfstop (SYS_SVR4 + 77)
+#define SYS_SVR4_rfsys (SYS_SVR4 + 78)
+#define SYS_SVR4_rmdir (SYS_SVR4 + 79)
+#define SYS_SVR4_mkdir (SYS_SVR4 + 80)
+#define SYS_SVR4_getdents (SYS_SVR4 + 81)
+#define SYS_SVR4_libattach (SYS_SVR4 + 82)
+#define SYS_SVR4_libdetach (SYS_SVR4 + 83)
+#define SYS_SVR4_sysfs (SYS_SVR4 + 84)
+#define SYS_SVR4_getmsg (SYS_SVR4 + 85)
+#define SYS_SVR4_putmsg (SYS_SVR4 + 86)
+#define SYS_SVR4_poll (SYS_SVR4 + 87)
+#define SYS_SVR4_lstat (SYS_SVR4 + 88)
+#define SYS_SVR4_symlink (SYS_SVR4 + 89)
+#define SYS_SVR4_readlink (SYS_SVR4 + 90)
+#define SYS_SVR4_setgroups (SYS_SVR4 + 91)
+#define SYS_SVR4_getgroups (SYS_SVR4 + 92)
+#define SYS_SVR4_fchmod (SYS_SVR4 + 93)
+#define SYS_SVR4_fchown (SYS_SVR4 + 94)
+#define SYS_SVR4_sigprocmask (SYS_SVR4 + 95)
+#define SYS_SVR4_sigsuspend (SYS_SVR4 + 96)
+#define SYS_SVR4_sigaltstack (SYS_SVR4 + 97)
+#define SYS_SVR4_sigaction (SYS_SVR4 + 98)
+#define SYS_SVR4_sigpending (SYS_SVR4 + 99)
+#define SYS_SVR4_setcontext (SYS_SVR4 + 100)
+#define SYS_SVR4_evsys (SYS_SVR4 + 101)
+#define SYS_SVR4_evtrapret (SYS_SVR4 + 102)
+#define SYS_SVR4_statvfs (SYS_SVR4 + 103)
+#define SYS_SVR4_fstatvfs (SYS_SVR4 + 104)
+#define SYS_SVR4_reserved7 (SYS_SVR4 + 105)
+#define SYS_SVR4_nfssys (SYS_SVR4 + 106)
+#define SYS_SVR4_waitid (SYS_SVR4 + 107)
+#define SYS_SVR4_sigsendset (SYS_SVR4 + 108)
+#define SYS_SVR4_hrtsys (SYS_SVR4 + 109)
+#define SYS_SVR4_acancel (SYS_SVR4 + 110)
+#define SYS_SVR4_async (SYS_SVR4 + 111)
+#define SYS_SVR4_priocntlset (SYS_SVR4 + 112)
+#define SYS_SVR4_pathconf (SYS_SVR4 + 113)
+#define SYS_SVR4_mincore (SYS_SVR4 + 114)
+#define SYS_SVR4_mmap (SYS_SVR4 + 115)
+#define SYS_SVR4_mprotect (SYS_SVR4 + 116)
+#define SYS_SVR4_munmap (SYS_SVR4 + 117)
+#define SYS_SVR4_fpathconf (SYS_SVR4 + 118)
+#define SYS_SVR4_vfork (SYS_SVR4 + 119)
+#define SYS_SVR4_fchdir (SYS_SVR4 + 120)
+#define SYS_SVR4_readv (SYS_SVR4 + 121)
+#define SYS_SVR4_writev (SYS_SVR4 + 122)
+#define SYS_SVR4_xstat (SYS_SVR4 + 123)
+#define SYS_SVR4_lxstat (SYS_SVR4 + 124)
+#define SYS_SVR4_fxstat (SYS_SVR4 + 125)
+#define SYS_SVR4_xmknod (SYS_SVR4 + 126)
+#define SYS_SVR4_clocal (SYS_SVR4 + 127)
+#define SYS_SVR4_setrlimit (SYS_SVR4 + 128)
+#define SYS_SVR4_getrlimit (SYS_SVR4 + 129)
+#define SYS_SVR4_lchown (SYS_SVR4 + 130)
+#define SYS_SVR4_memcntl (SYS_SVR4 + 131)
+#define SYS_SVR4_getpmsg (SYS_SVR4 + 132)
+#define SYS_SVR4_putpmsg (SYS_SVR4 + 133)
+#define SYS_SVR4_rename (SYS_SVR4 + 134)
+#define SYS_SVR4_nuname (SYS_SVR4 + 135)
+#define SYS_SVR4_setegid (SYS_SVR4 + 136)
+#define SYS_SVR4_sysconf (SYS_SVR4 + 137)
+#define SYS_SVR4_adjtime (SYS_SVR4 + 138)
+#define SYS_SVR4_sysinfo (SYS_SVR4 + 139)
+#define SYS_SVR4_reserved8 (SYS_SVR4 + 140)
+#define SYS_SVR4_seteuid (SYS_SVR4 + 141)
+#define SYS_SVR4_PYRAMID_statis (SYS_SVR4 + 142)
+#define SYS_SVR4_PYRAMID_tuning (SYS_SVR4 + 143)
+#define SYS_SVR4_PYRAMID_forcerr (SYS_SVR4 + 144)
+#define SYS_SVR4_PYRAMID_mpcntl (SYS_SVR4 + 145)
+#define SYS_SVR4_reserved9 (SYS_SVR4 + 146)
+#define SYS_SVR4_reserved10 (SYS_SVR4 + 147)
+#define SYS_SVR4_reserved11 (SYS_SVR4 + 148)
+#define SYS_SVR4_reserved12 (SYS_SVR4 + 149)
+#define SYS_SVR4_reserved13 (SYS_SVR4 + 150)
+#define SYS_SVR4_reserved14 (SYS_SVR4 + 151)
+#define SYS_SVR4_reserved15 (SYS_SVR4 + 152)
+#define SYS_SVR4_reserved16 (SYS_SVR4 + 153)
+#define SYS_SVR4_reserved17 (SYS_SVR4 + 154)
+#define SYS_SVR4_reserved18 (SYS_SVR4 + 155)
+#define SYS_SVR4_reserved19 (SYS_SVR4 + 156)
+#define SYS_SVR4_reserved20 (SYS_SVR4 + 157)
+#define SYS_SVR4_reserved21 (SYS_SVR4 + 158)
+#define SYS_SVR4_reserved22 (SYS_SVR4 + 159)
+#define SYS_SVR4_reserved23 (SYS_SVR4 + 160)
+#define SYS_SVR4_reserved24 (SYS_SVR4 + 161)
+#define SYS_SVR4_reserved25 (SYS_SVR4 + 162)
+#define SYS_SVR4_reserved26 (SYS_SVR4 + 163)
+#define SYS_SVR4_reserved27 (SYS_SVR4 + 164)
+#define SYS_SVR4_reserved28 (SYS_SVR4 + 165)
+#define SYS_SVR4_reserved29 (SYS_SVR4 + 166)
+#define SYS_SVR4_reserved30 (SYS_SVR4 + 167)
+#define SYS_SVR4_reserved31 (SYS_SVR4 + 168)
+#define SYS_SVR4_reserved32 (SYS_SVR4 + 169)
+#define SYS_SVR4_reserved33 (SYS_SVR4 + 170)
+#define SYS_SVR4_reserved34 (SYS_SVR4 + 171)
+#define SYS_SVR4_reserved35 (SYS_SVR4 + 172)
+#define SYS_SVR4_reserved36 (SYS_SVR4 + 173)
+#define SYS_SVR4_reserved37 (SYS_SVR4 + 174)
+#define SYS_SVR4_reserved38 (SYS_SVR4 + 175)
+#define SYS_SVR4_reserved39 (SYS_SVR4 + 176)
+#define SYS_SVR4_reserved40 (SYS_SVR4 + 177)
+#define SYS_SVR4_reserved41 (SYS_SVR4 + 178)
+#define SYS_SVR4_reserved42 (SYS_SVR4 + 179)
+#define SYS_SVR4_reserved43 (SYS_SVR4 + 180)
+#define SYS_SVR4_reserved44 (SYS_SVR4 + 181)
+#define SYS_SVR4_reserved45 (SYS_SVR4 + 182)
+#define SYS_SVR4_reserved46 (SYS_SVR4 + 183)
+#define SYS_SVR4_reserved47 (SYS_SVR4 + 184)
+#define SYS_SVR4_reserved48 (SYS_SVR4 + 185)
+#define SYS_SVR4_reserved49 (SYS_SVR4 + 186)
+#define SYS_SVR4_reserved50 (SYS_SVR4 + 187)
+#define SYS_SVR4_reserved51 (SYS_SVR4 + 188)
+#define SYS_SVR4_reserved52 (SYS_SVR4 + 189)
+#define SYS_SVR4_reserved53 (SYS_SVR4 + 190)
+#define SYS_SVR4_reserved54 (SYS_SVR4 + 191)
+#define SYS_SVR4_reserved55 (SYS_SVR4 + 192)
+#define SYS_SVR4_reserved56 (SYS_SVR4 + 193)
+#define SYS_SVR4_reserved57 (SYS_SVR4 + 194)
+#define SYS_SVR4_reserved58 (SYS_SVR4 + 195)
+#define SYS_SVR4_reserved59 (SYS_SVR4 + 196)
+#define SYS_SVR4_reserved60 (SYS_SVR4 + 197)
+#define SYS_SVR4_reserved61 (SYS_SVR4 + 198)
+#define SYS_SVR4_reserved62 (SYS_SVR4 + 199)
+#define SYS_SVR4_reserved63 (SYS_SVR4 + 200)
+#define SYS_SVR4_aread (SYS_SVR4 + 201)
+#define SYS_SVR4_awrite (SYS_SVR4 + 202)
+#define SYS_SVR4_listio (SYS_SVR4 + 203)
+#define SYS_SVR4_mips_acancel (SYS_SVR4 + 204)
+#define SYS_SVR4_astatus (SYS_SVR4 + 205)
+#define SYS_SVR4_await (SYS_SVR4 + 206)
+#define SYS_SVR4_areadv (SYS_SVR4 + 207)
+#define SYS_SVR4_awritev (SYS_SVR4 + 208)
+#define SYS_SVR4_MIPS_reserved1 (SYS_SVR4 + 209)
+#define SYS_SVR4_MIPS_reserved2 (SYS_SVR4 + 210)
+#define SYS_SVR4_MIPS_reserved3 (SYS_SVR4 + 211)
+#define SYS_SVR4_MIPS_reserved4 (SYS_SVR4 + 212)
+#define SYS_SVR4_MIPS_reserved5 (SYS_SVR4 + 213)
+#define SYS_SVR4_MIPS_reserved6 (SYS_SVR4 + 214)
+#define SYS_SVR4_MIPS_reserved7 (SYS_SVR4 + 215)
+#define SYS_SVR4_MIPS_reserved8 (SYS_SVR4 + 216)
+#define SYS_SVR4_MIPS_reserved9 (SYS_SVR4 + 217)
+#define SYS_SVR4_MIPS_reserved10 (SYS_SVR4 + 218)
+#define SYS_SVR4_MIPS_reserved11 (SYS_SVR4 + 219)
+#define SYS_SVR4_MIPS_reserved12 (SYS_SVR4 + 220)
+#define SYS_SVR4_CDC_reserved1 (SYS_SVR4 + 221)
+#define SYS_SVR4_CDC_reserved2 (SYS_SVR4 + 222)
+#define SYS_SVR4_CDC_reserved3 (SYS_SVR4 + 223)
+#define SYS_SVR4_CDC_reserved4 (SYS_SVR4 + 224)
+#define SYS_SVR4_CDC_reserved5 (SYS_SVR4 + 225)
+#define SYS_SVR4_CDC_reserved6 (SYS_SVR4 + 226)
+#define SYS_SVR4_CDC_reserved7 (SYS_SVR4 + 227)
+#define SYS_SVR4_CDC_reserved8 (SYS_SVR4 + 228)
+#define SYS_SVR4_CDC_reserved9 (SYS_SVR4 + 229)
+#define SYS_SVR4_CDC_reserved10 (SYS_SVR4 + 230)
+#define SYS_SVR4_CDC_reserved11 (SYS_SVR4 + 231)
+#define SYS_SVR4_CDC_reserved12 (SYS_SVR4 + 232)
+#define SYS_SVR4_CDC_reserved13 (SYS_SVR4 + 233)
+#define SYS_SVR4_CDC_reserved14 (SYS_SVR4 + 234)
+#define SYS_SVR4_CDC_reserved15 (SYS_SVR4 + 235)
+#define SYS_SVR4_CDC_reserved16 (SYS_SVR4 + 236)
+#define SYS_SVR4_CDC_reserved17 (SYS_SVR4 + 237)
+#define SYS_SVR4_CDC_reserved18 (SYS_SVR4 + 238)
+#define SYS_SVR4_CDC_reserved19 (SYS_SVR4 + 239)
+#define SYS_SVR4_CDC_reserved20 (SYS_SVR4 + 240)
+
+/*
+ * SYS V syscalls are in the range from 1000 to 1999
+ */
+#define SYS_SYSV 1000
+#define SYS_SYSV_syscall (SYS_SYSV + 0)
+#define SYS_SYSV_exit (SYS_SYSV + 1)
+#define SYS_SYSV_fork (SYS_SYSV + 2)
+#define SYS_SYSV_read (SYS_SYSV + 3)
+#define SYS_SYSV_write (SYS_SYSV + 4)
+#define SYS_SYSV_open (SYS_SYSV + 5)
+#define SYS_SYSV_close (SYS_SYSV + 6)
+#define SYS_SYSV_wait (SYS_SYSV + 7)
+#define SYS_SYSV_creat (SYS_SYSV + 8)
+#define SYS_SYSV_link (SYS_SYSV + 9)
+#define SYS_SYSV_unlink (SYS_SYSV + 10)
+#define SYS_SYSV_execv (SYS_SYSV + 11)
+#define SYS_SYSV_chdir (SYS_SYSV + 12)
+#define SYS_SYSV_time (SYS_SYSV + 13)
+#define SYS_SYSV_mknod (SYS_SYSV + 14)
+#define SYS_SYSV_chmod (SYS_SYSV + 15)
+#define SYS_SYSV_chown (SYS_SYSV + 16)
+#define SYS_SYSV_brk (SYS_SYSV + 17)
+#define SYS_SYSV_stat (SYS_SYSV + 18)
+#define SYS_SYSV_lseek (SYS_SYSV + 19)
+#define SYS_SYSV_getpid (SYS_SYSV + 20)
+#define SYS_SYSV_mount (SYS_SYSV + 21)
+#define SYS_SYSV_umount (SYS_SYSV + 22)
+#define SYS_SYSV_setuid (SYS_SYSV + 23)
+#define SYS_SYSV_getuid (SYS_SYSV + 24)
+#define SYS_SYSV_stime (SYS_SYSV + 25)
+#define SYS_SYSV_ptrace (SYS_SYSV + 26)
+#define SYS_SYSV_alarm (SYS_SYSV + 27)
+#define SYS_SYSV_fstat (SYS_SYSV + 28)
+#define SYS_SYSV_pause (SYS_SYSV + 29)
+#define SYS_SYSV_utime (SYS_SYSV + 30)
+#define SYS_SYSV_stty (SYS_SYSV + 31)
+#define SYS_SYSV_gtty (SYS_SYSV + 32)
+#define SYS_SYSV_access (SYS_SYSV + 33)
+#define SYS_SYSV_nice (SYS_SYSV + 34)
+#define SYS_SYSV_statfs (SYS_SYSV + 35)
+#define SYS_SYSV_sync (SYS_SYSV + 36)
+#define SYS_SYSV_kill (SYS_SYSV + 37)
+#define SYS_SYSV_fstatfs (SYS_SYSV + 38)
+#define SYS_SYSV_setpgrp (SYS_SYSV + 39)
+#define SYS_SYSV_syssgi (SYS_SYSV + 40)
+#define SYS_SYSV_dup (SYS_SYSV + 41)
+#define SYS_SYSV_pipe (SYS_SYSV + 42)
+#define SYS_SYSV_times (SYS_SYSV + 43)
+#define SYS_SYSV_profil (SYS_SYSV + 44)
+#define SYS_SYSV_plock (SYS_SYSV + 45)
+#define SYS_SYSV_setgid (SYS_SYSV + 46)
+#define SYS_SYSV_getgid (SYS_SYSV + 47)
+#define SYS_SYSV_sig (SYS_SYSV + 48)
+#define SYS_SYSV_msgsys (SYS_SYSV + 49)
+#define SYS_SYSV_sysmips (SYS_SYSV + 50)
+#define SYS_SYSV_acct (SYS_SYSV + 51)
+#define SYS_SYSV_shmsys (SYS_SYSV + 52)
+#define SYS_SYSV_semsys (SYS_SYSV + 53)
+#define SYS_SYSV_ioctl (SYS_SYSV + 54)
+#define SYS_SYSV_uadmin (SYS_SYSV + 55)
+#define SYS_SYSV_sysmp (SYS_SYSV + 56)
+#define SYS_SYSV_utssys (SYS_SYSV + 57)
+#define SYS_SYSV_USG_reserved1 (SYS_SYSV + 58)
+#define SYS_SYSV_execve (SYS_SYSV + 59)
+#define SYS_SYSV_umask (SYS_SYSV + 60)
+#define SYS_SYSV_chroot (SYS_SYSV + 61)
+#define SYS_SYSV_fcntl (SYS_SYSV + 62)
+#define SYS_SYSV_ulimit (SYS_SYSV + 63)
+#define SYS_SYSV_SAFARI4_reserved1 (SYS_SYSV + 64)
+#define SYS_SYSV_SAFARI4_reserved2 (SYS_SYSV + 65)
+#define SYS_SYSV_SAFARI4_reserved3 (SYS_SYSV + 66)
+#define SYS_SYSV_SAFARI4_reserved4 (SYS_SYSV + 67)
+#define SYS_SYSV_SAFARI4_reserved5 (SYS_SYSV + 68)
+#define SYS_SYSV_SAFARI4_reserved6 (SYS_SYSV + 69)
+#define SYS_SYSV_advfs (SYS_SYSV + 70)
+#define SYS_SYSV_unadvfs (SYS_SYSV + 71)
+#define SYS_SYSV_rmount (SYS_SYSV + 72)
+#define SYS_SYSV_rumount (SYS_SYSV + 73)
+#define SYS_SYSV_rfstart (SYS_SYSV + 74)
+#define SYS_SYSV_getrlimit64 (SYS_SYSV + 75)
+#define SYS_SYSV_setrlimit64 (SYS_SYSV + 76)
+#define SYS_SYSV_nanosleep (SYS_SYSV + 77)
+#define SYS_SYSV_lseek64 (SYS_SYSV + 78)
+#define SYS_SYSV_rmdir (SYS_SYSV + 79)
+#define SYS_SYSV_mkdir (SYS_SYSV + 80)
+#define SYS_SYSV_getdents (SYS_SYSV + 81)
+#define SYS_SYSV_sginap (SYS_SYSV + 82)
+#define SYS_SYSV_sgikopt (SYS_SYSV + 83)
+#define SYS_SYSV_sysfs (SYS_SYSV + 84)
+#define SYS_SYSV_getmsg (SYS_SYSV + 85)
+#define SYS_SYSV_putmsg (SYS_SYSV + 86)
+#define SYS_SYSV_poll (SYS_SYSV + 87)
+#define SYS_SYSV_sigreturn (SYS_SYSV + 88)
+#define SYS_SYSV_accept (SYS_SYSV + 89)
+#define SYS_SYSV_bind (SYS_SYSV + 90)
+#define SYS_SYSV_connect (SYS_SYSV + 91)
+#define SYS_SYSV_gethostid (SYS_SYSV + 92)
+#define SYS_SYSV_getpeername (SYS_SYSV + 93)
+#define SYS_SYSV_getsockname (SYS_SYSV + 94)
+#define SYS_SYSV_getsockopt (SYS_SYSV + 95)
+#define SYS_SYSV_listen (SYS_SYSV + 96)
+#define SYS_SYSV_recv (SYS_SYSV + 97)
+#define SYS_SYSV_recvfrom (SYS_SYSV + 98)
+#define SYS_SYSV_recvmsg (SYS_SYSV + 99)
+#define SYS_SYSV_select (SYS_SYSV + 100)
+#define SYS_SYSV_send (SYS_SYSV + 101)
+#define SYS_SYSV_sendmsg (SYS_SYSV + 102)
+#define SYS_SYSV_sendto (SYS_SYSV + 103)
+#define SYS_SYSV_sethostid (SYS_SYSV + 104)
+#define SYS_SYSV_setsockopt (SYS_SYSV + 105)
+#define SYS_SYSV_shutdown (SYS_SYSV + 106)
+#define SYS_SYSV_socket (SYS_SYSV + 107)
+#define SYS_SYSV_gethostname (SYS_SYSV + 108)
+#define SYS_SYSV_sethostname (SYS_SYSV + 109)
+#define SYS_SYSV_getdomainname (SYS_SYSV + 110)
+#define SYS_SYSV_setdomainname (SYS_SYSV + 111)
+#define SYS_SYSV_truncate (SYS_SYSV + 112)
+#define SYS_SYSV_ftruncate (SYS_SYSV + 113)
+#define SYS_SYSV_rename (SYS_SYSV + 114)
+#define SYS_SYSV_symlink (SYS_SYSV + 115)
+#define SYS_SYSV_readlink (SYS_SYSV + 116)
+#define SYS_SYSV_lstat (SYS_SYSV + 117)
+#define SYS_SYSV_nfsmount (SYS_SYSV + 118)
+#define SYS_SYSV_nfssvc (SYS_SYSV + 119)
+#define SYS_SYSV_getfh (SYS_SYSV + 120)
+#define SYS_SYSV_async_daemon (SYS_SYSV + 121)
+#define SYS_SYSV_exportfs (SYS_SYSV + 122)
+#define SYS_SYSV_setregid (SYS_SYSV + 123)
+#define SYS_SYSV_setreuid (SYS_SYSV + 124)
+#define SYS_SYSV_getitimer (SYS_SYSV + 125)
+#define SYS_SYSV_setitimer (SYS_SYSV + 126)
+#define SYS_SYSV_adjtime (SYS_SYSV + 127)
+#define SYS_SYSV_BSD_getime (SYS_SYSV + 128)
+#define SYS_SYSV_sproc (SYS_SYSV + 129)
+#define SYS_SYSV_prctl (SYS_SYSV + 130)
+#define SYS_SYSV_procblk (SYS_SYSV + 131)
+#define SYS_SYSV_sprocsp (SYS_SYSV + 132)
+#define SYS_SYSV_sgigsc (SYS_SYSV + 133)
+#define SYS_SYSV_mmap (SYS_SYSV + 134)
+#define SYS_SYSV_munmap (SYS_SYSV + 135)
+#define SYS_SYSV_mprotect (SYS_SYSV + 136)
+#define SYS_SYSV_msync (SYS_SYSV + 137)
+#define SYS_SYSV_madvise (SYS_SYSV + 138)
+#define SYS_SYSV_pagelock (SYS_SYSV + 139)
+#define SYS_SYSV_getpagesize (SYS_SYSV + 140)
+#define SYS_SYSV_quotactl (SYS_SYSV + 141)
+#define SYS_SYSV_libdetach (SYS_SYSV + 142)
+#define SYS_SYSV_BSDgetpgrp (SYS_SYSV + 143)
+#define SYS_SYSV_BSDsetpgrp (SYS_SYSV + 144)
+#define SYS_SYSV_vhangup (SYS_SYSV + 145)
+#define SYS_SYSV_fsync (SYS_SYSV + 146)
+#define SYS_SYSV_fchdir (SYS_SYSV + 147)
+#define SYS_SYSV_getrlimit (SYS_SYSV + 148)
+#define SYS_SYSV_setrlimit (SYS_SYSV + 149)
+#define SYS_SYSV_cacheflush (SYS_SYSV + 150)
+#define SYS_SYSV_cachectl (SYS_SYSV + 151)
+#define SYS_SYSV_fchown (SYS_SYSV + 152)
+#define SYS_SYSV_fchmod (SYS_SYSV + 153)
+#define SYS_SYSV_wait3 (SYS_SYSV + 154)
+#define SYS_SYSV_socketpair (SYS_SYSV + 155)
+#define SYS_SYSV_sysinfo (SYS_SYSV + 156)
+#define SYS_SYSV_nuname (SYS_SYSV + 157)
+#define SYS_SYSV_xstat (SYS_SYSV + 158)
+#define SYS_SYSV_lxstat (SYS_SYSV + 159)
+#define SYS_SYSV_fxstat (SYS_SYSV + 160)
+#define SYS_SYSV_xmknod (SYS_SYSV + 161)
+#define SYS_SYSV_ksigaction (SYS_SYSV + 162)
+#define SYS_SYSV_sigpending (SYS_SYSV + 163)
+#define SYS_SYSV_sigprocmask (SYS_SYSV + 164)
+#define SYS_SYSV_sigsuspend (SYS_SYSV + 165)
+#define SYS_SYSV_sigpoll (SYS_SYSV + 166)
+#define SYS_SYSV_swapctl (SYS_SYSV + 167)
+#define SYS_SYSV_getcontext (SYS_SYSV + 168)
+#define SYS_SYSV_setcontext (SYS_SYSV + 169)
+#define SYS_SYSV_waitsys (SYS_SYSV + 170)
+#define SYS_SYSV_sigstack (SYS_SYSV + 171)
+#define SYS_SYSV_sigaltstack (SYS_SYSV + 172)
+#define SYS_SYSV_sigsendset (SYS_SYSV + 173)
+#define SYS_SYSV_statvfs (SYS_SYSV + 174)
+#define SYS_SYSV_fstatvfs (SYS_SYSV + 175)
+#define SYS_SYSV_getpmsg (SYS_SYSV + 176)
+#define SYS_SYSV_putpmsg (SYS_SYSV + 177)
+#define SYS_SYSV_lchown (SYS_SYSV + 178)
+#define SYS_SYSV_priocntl (SYS_SYSV + 179)
+#define SYS_SYSV_ksigqueue (SYS_SYSV + 180)
+#define SYS_SYSV_readv (SYS_SYSV + 181)
+#define SYS_SYSV_writev (SYS_SYSV + 182)
+#define SYS_SYSV_truncate64 (SYS_SYSV + 183)
+#define SYS_SYSV_ftruncate64 (SYS_SYSV + 184)
+#define SYS_SYSV_mmap64 (SYS_SYSV + 185)
+#define SYS_SYSV_dmi (SYS_SYSV + 186)
+#define SYS_SYSV_pread (SYS_SYSV + 187)
+#define SYS_SYSV_pwrite (SYS_SYSV + 188)
+
+/*
+ * BSD 4.3 syscalls are in the range from 2000 to 2999
+ */
+#define SYS_BSD43 2000
+#define SYS_BSD43_syscall (SYS_BSD43 + 0)
+#define SYS_BSD43_exit (SYS_BSD43 + 1)
+#define SYS_BSD43_fork (SYS_BSD43 + 2)
+#define SYS_BSD43_read (SYS_BSD43 + 3)
+#define SYS_BSD43_write (SYS_BSD43 + 4)
+#define SYS_BSD43_open (SYS_BSD43 + 5)
+#define SYS_BSD43_close (SYS_BSD43 + 6)
+#define SYS_BSD43_wait (SYS_BSD43 + 7)
+#define SYS_BSD43_creat (SYS_BSD43 + 8)
+#define SYS_BSD43_link (SYS_BSD43 + 9)
+#define SYS_BSD43_unlink (SYS_BSD43 + 10)
+#define SYS_BSD43_exec (SYS_BSD43 + 11)
+#define SYS_BSD43_chdir (SYS_BSD43 + 12)
+#define SYS_BSD43_time (SYS_BSD43 + 13)
+#define SYS_BSD43_mknod (SYS_BSD43 + 14)
+#define SYS_BSD43_chmod (SYS_BSD43 + 15)
+#define SYS_BSD43_chown (SYS_BSD43 + 16)
+#define SYS_BSD43_sbreak (SYS_BSD43 + 17)
+#define SYS_BSD43_oldstat (SYS_BSD43 + 18)
+#define SYS_BSD43_lseek (SYS_BSD43 + 19)
+#define SYS_BSD43_getpid (SYS_BSD43 + 20)
+#define SYS_BSD43_oldmount (SYS_BSD43 + 21)
+#define SYS_BSD43_umount (SYS_BSD43 + 22)
+#define SYS_BSD43_setuid (SYS_BSD43 + 23)
+#define SYS_BSD43_getuid (SYS_BSD43 + 24)
+#define SYS_BSD43_stime (SYS_BSD43 + 25)
+#define SYS_BSD43_ptrace (SYS_BSD43 + 26)
+#define SYS_BSD43_alarm (SYS_BSD43 + 27)
+#define SYS_BSD43_oldfstat (SYS_BSD43 + 28)
+#define SYS_BSD43_pause (SYS_BSD43 + 29)
+#define SYS_BSD43_utime (SYS_BSD43 + 30)
+#define SYS_BSD43_stty (SYS_BSD43 + 31)
+#define SYS_BSD43_gtty (SYS_BSD43 + 32)
+#define SYS_BSD43_access (SYS_BSD43 + 33)
+#define SYS_BSD43_nice (SYS_BSD43 + 34)
+#define SYS_BSD43_ftime (SYS_BSD43 + 35)
+#define SYS_BSD43_sync (SYS_BSD43 + 36)
+#define SYS_BSD43_kill (SYS_BSD43 + 37)
+#define SYS_BSD43_stat (SYS_BSD43 + 38)
+#define SYS_BSD43_oldsetpgrp (SYS_BSD43 + 39)
+#define SYS_BSD43_lstat (SYS_BSD43 + 40)
+#define SYS_BSD43_dup (SYS_BSD43 + 41)
+#define SYS_BSD43_pipe (SYS_BSD43 + 42)
+#define SYS_BSD43_times (SYS_BSD43 + 43)
+#define SYS_BSD43_profil (SYS_BSD43 + 44)
+#define SYS_BSD43_msgsys (SYS_BSD43 + 45)
+#define SYS_BSD43_setgid (SYS_BSD43 + 46)
+#define SYS_BSD43_getgid (SYS_BSD43 + 47)
+#define SYS_BSD43_ssig (SYS_BSD43 + 48)
+#define SYS_BSD43_reserved1 (SYS_BSD43 + 49)
+#define SYS_BSD43_reserved2 (SYS_BSD43 + 50)
+#define SYS_BSD43_sysacct (SYS_BSD43 + 51)
+#define SYS_BSD43_phys (SYS_BSD43 + 52)
+#define SYS_BSD43_lock (SYS_BSD43 + 53)
+#define SYS_BSD43_ioctl (SYS_BSD43 + 54)
+#define SYS_BSD43_reboot (SYS_BSD43 + 55)
+#define SYS_BSD43_mpxchan (SYS_BSD43 + 56)
+#define SYS_BSD43_symlink (SYS_BSD43 + 57)
+#define SYS_BSD43_readlink (SYS_BSD43 + 58)
+#define SYS_BSD43_execve (SYS_BSD43 + 59)
+#define SYS_BSD43_umask (SYS_BSD43 + 60)
+#define SYS_BSD43_chroot (SYS_BSD43 + 61)
+#define SYS_BSD43_fstat (SYS_BSD43 + 62)
+#define SYS_BSD43_reserved3 (SYS_BSD43 + 63)
+#define SYS_BSD43_getpagesize (SYS_BSD43 + 64)
+#define SYS_BSD43_mremap (SYS_BSD43 + 65)
+#define SYS_BSD43_vfork (SYS_BSD43 + 66)
+#define SYS_BSD43_vread (SYS_BSD43 + 67)
+#define SYS_BSD43_vwrite (SYS_BSD43 + 68)
+#define SYS_BSD43_sbrk (SYS_BSD43 + 69)
+#define SYS_BSD43_sstk (SYS_BSD43 + 70)
+#define SYS_BSD43_mmap (SYS_BSD43 + 71)
+#define SYS_BSD43_vadvise (SYS_BSD43 + 72)
+#define SYS_BSD43_munmap (SYS_BSD43 + 73)
+#define SYS_BSD43_mprotect (SYS_BSD43 + 74)
+#define SYS_BSD43_madvise (SYS_BSD43 + 75)
+#define SYS_BSD43_vhangup (SYS_BSD43 + 76)
+#define SYS_BSD43_vlimit (SYS_BSD43 + 77)
+#define SYS_BSD43_mincore (SYS_BSD43 + 78)
+#define SYS_BSD43_getgroups (SYS_BSD43 + 79)
+#define SYS_BSD43_setgroups (SYS_BSD43 + 80)
+#define SYS_BSD43_getpgrp (SYS_BSD43 + 81)
+#define SYS_BSD43_setpgrp (SYS_BSD43 + 82)
+#define SYS_BSD43_setitimer (SYS_BSD43 + 83)
+#define SYS_BSD43_wait3 (SYS_BSD43 + 84)
+#define SYS_BSD43_swapon (SYS_BSD43 + 85)
+#define SYS_BSD43_getitimer (SYS_BSD43 + 86)
+#define SYS_BSD43_gethostname (SYS_BSD43 + 87)
+#define SYS_BSD43_sethostname (SYS_BSD43 + 88)
+#define SYS_BSD43_getdtablesize (SYS_BSD43 + 89)
+#define SYS_BSD43_dup2 (SYS_BSD43 + 90)
+#define SYS_BSD43_getdopt (SYS_BSD43 + 91)
+#define SYS_BSD43_fcntl (SYS_BSD43 + 92)
+#define SYS_BSD43_select (SYS_BSD43 + 93)
+#define SYS_BSD43_setdopt (SYS_BSD43 + 94)
+#define SYS_BSD43_fsync (SYS_BSD43 + 95)
+#define SYS_BSD43_setpriority (SYS_BSD43 + 96)
+#define SYS_BSD43_socket (SYS_BSD43 + 97)
+#define SYS_BSD43_connect (SYS_BSD43 + 98)
+#define SYS_BSD43_oldaccept (SYS_BSD43 + 99)
+#define SYS_BSD43_getpriority (SYS_BSD43 + 100)
+#define SYS_BSD43_send (SYS_BSD43 + 101)
+#define SYS_BSD43_recv (SYS_BSD43 + 102)
+#define SYS_BSD43_sigreturn (SYS_BSD43 + 103)
+#define SYS_BSD43_bind (SYS_BSD43 + 104)
+#define SYS_BSD43_setsockopt (SYS_BSD43 + 105)
+#define SYS_BSD43_listen (SYS_BSD43 + 106)
+#define SYS_BSD43_vtimes (SYS_BSD43 + 107)
+#define SYS_BSD43_sigvec (SYS_BSD43 + 108)
+#define SYS_BSD43_sigblock (SYS_BSD43 + 109)
+#define SYS_BSD43_sigsetmask (SYS_BSD43 + 110)
+#define SYS_BSD43_sigpause (SYS_BSD43 + 111)
+#define SYS_BSD43_sigstack (SYS_BSD43 + 112)
+#define SYS_BSD43_oldrecvmsg (SYS_BSD43 + 113)
+#define SYS_BSD43_oldsendmsg (SYS_BSD43 + 114)
+#define SYS_BSD43_vtrace (SYS_BSD43 + 115)
+#define SYS_BSD43_gettimeofday (SYS_BSD43 + 116)
+#define SYS_BSD43_getrusage (SYS_BSD43 + 117)
+#define SYS_BSD43_getsockopt (SYS_BSD43 + 118)
+#define SYS_BSD43_reserved4 (SYS_BSD43 + 119)
+#define SYS_BSD43_readv (SYS_BSD43 + 120)
+#define SYS_BSD43_writev (SYS_BSD43 + 121)
+#define SYS_BSD43_settimeofday (SYS_BSD43 + 122)
+#define SYS_BSD43_fchown (SYS_BSD43 + 123)
+#define SYS_BSD43_fchmod (SYS_BSD43 + 124)
+#define SYS_BSD43_oldrecvfrom (SYS_BSD43 + 125)
+#define SYS_BSD43_setreuid (SYS_BSD43 + 126)
+#define SYS_BSD43_setregid (SYS_BSD43 + 127)
+#define SYS_BSD43_rename (SYS_BSD43 + 128)
+#define SYS_BSD43_truncate (SYS_BSD43 + 129)
+#define SYS_BSD43_ftruncate (SYS_BSD43 + 130)
+#define SYS_BSD43_flock (SYS_BSD43 + 131)
+#define SYS_BSD43_semsys (SYS_BSD43 + 132)
+#define SYS_BSD43_sendto (SYS_BSD43 + 133)
+#define SYS_BSD43_shutdown (SYS_BSD43 + 134)
+#define SYS_BSD43_socketpair (SYS_BSD43 + 135)
+#define SYS_BSD43_mkdir (SYS_BSD43 + 136)
+#define SYS_BSD43_rmdir (SYS_BSD43 + 137)
+#define SYS_BSD43_utimes (SYS_BSD43 + 138)
+#define SYS_BSD43_sigcleanup (SYS_BSD43 + 139)
+#define SYS_BSD43_adjtime (SYS_BSD43 + 140)
+#define SYS_BSD43_oldgetpeername (SYS_BSD43 + 141)
+#define SYS_BSD43_gethostid (SYS_BSD43 + 142)
+#define SYS_BSD43_sethostid (SYS_BSD43 + 143)
+#define SYS_BSD43_getrlimit (SYS_BSD43 + 144)
+#define SYS_BSD43_setrlimit (SYS_BSD43 + 145)
+#define SYS_BSD43_killpg (SYS_BSD43 + 146)
+#define SYS_BSD43_shmsys (SYS_BSD43 + 147)
+#define SYS_BSD43_quota (SYS_BSD43 + 148)
+#define SYS_BSD43_qquota (SYS_BSD43 + 149)
+#define SYS_BSD43_oldgetsockname (SYS_BSD43 + 150)
+#define SYS_BSD43_sysmips (SYS_BSD43 + 151)
+#define SYS_BSD43_cacheflush (SYS_BSD43 + 152)
+#define SYS_BSD43_cachectl (SYS_BSD43 + 153)
+#define SYS_BSD43_debug (SYS_BSD43 + 154)
+#define SYS_BSD43_reserved5 (SYS_BSD43 + 155)
+#define SYS_BSD43_reserved6 (SYS_BSD43 + 156)
+#define SYS_BSD43_nfs_mount (SYS_BSD43 + 157)
+#define SYS_BSD43_nfs_svc (SYS_BSD43 + 158)
+#define SYS_BSD43_getdirentries (SYS_BSD43 + 159)
+#define SYS_BSD43_statfs (SYS_BSD43 + 160)
+#define SYS_BSD43_fstatfs (SYS_BSD43 + 161)
+#define SYS_BSD43_unmount (SYS_BSD43 + 162)
+#define SYS_BSD43_async_daemon (SYS_BSD43 + 163)
+#define SYS_BSD43_nfs_getfh (SYS_BSD43 + 164)
+#define SYS_BSD43_getdomainname (SYS_BSD43 + 165)
+#define SYS_BSD43_setdomainname (SYS_BSD43 + 166)
+#define SYS_BSD43_pcfs_mount (SYS_BSD43 + 167)
+#define SYS_BSD43_quotactl (SYS_BSD43 + 168)
+#define SYS_BSD43_oldexportfs (SYS_BSD43 + 169)
+#define SYS_BSD43_smount (SYS_BSD43 + 170)
+#define SYS_BSD43_mipshwconf (SYS_BSD43 + 171)
+#define SYS_BSD43_exportfs (SYS_BSD43 + 172)
+#define SYS_BSD43_nfsfh_open (SYS_BSD43 + 173)
+#define SYS_BSD43_libattach (SYS_BSD43 + 174)
+#define SYS_BSD43_libdetach (SYS_BSD43 + 175)
+#define SYS_BSD43_accept (SYS_BSD43 + 176)
+#define SYS_BSD43_reserved7 (SYS_BSD43 + 177)
+#define SYS_BSD43_reserved8 (SYS_BSD43 + 178)
+#define SYS_BSD43_recvmsg (SYS_BSD43 + 179)
+#define SYS_BSD43_recvfrom (SYS_BSD43 + 180)
+#define SYS_BSD43_sendmsg (SYS_BSD43 + 181)
+#define SYS_BSD43_getpeername (SYS_BSD43 + 182)
+#define SYS_BSD43_getsockname (SYS_BSD43 + 183)
+#define SYS_BSD43_aread (SYS_BSD43 + 184)
+#define SYS_BSD43_awrite (SYS_BSD43 + 185)
+#define SYS_BSD43_listio (SYS_BSD43 + 186)
+#define SYS_BSD43_acancel (SYS_BSD43 + 187)
+#define SYS_BSD43_astatus (SYS_BSD43 + 188)
+#define SYS_BSD43_await (SYS_BSD43 + 189)
+#define SYS_BSD43_areadv (SYS_BSD43 + 190)
+#define SYS_BSD43_awritev (SYS_BSD43 + 191)
+
+/*
+ * POSIX syscalls are in the range from 3000 to 3999
+ */
+#define SYS_POSIX 3000
+#define SYS_POSIX_syscall (SYS_POSIX + 0)
+#define SYS_POSIX_exit (SYS_POSIX + 1)
+#define SYS_POSIX_fork (SYS_POSIX + 2)
+#define SYS_POSIX_read (SYS_POSIX + 3)
+#define SYS_POSIX_write (SYS_POSIX + 4)
+#define SYS_POSIX_open (SYS_POSIX + 5)
+#define SYS_POSIX_close (SYS_POSIX + 6)
+#define SYS_POSIX_wait (SYS_POSIX + 7)
+#define SYS_POSIX_creat (SYS_POSIX + 8)
+#define SYS_POSIX_link (SYS_POSIX + 9)
+#define SYS_POSIX_unlink (SYS_POSIX + 10)
+#define SYS_POSIX_exec (SYS_POSIX + 11)
+#define SYS_POSIX_chdir (SYS_POSIX + 12)
+#define SYS_POSIX_gtime (SYS_POSIX + 13)
+#define SYS_POSIX_mknod (SYS_POSIX + 14)
+#define SYS_POSIX_chmod (SYS_POSIX + 15)
+#define SYS_POSIX_chown (SYS_POSIX + 16)
+#define SYS_POSIX_sbreak (SYS_POSIX + 17)
+#define SYS_POSIX_stat (SYS_POSIX + 18)
+#define SYS_POSIX_lseek (SYS_POSIX + 19)
+#define SYS_POSIX_getpid (SYS_POSIX + 20)
+#define SYS_POSIX_mount (SYS_POSIX + 21)
+#define SYS_POSIX_umount (SYS_POSIX + 22)
+#define SYS_POSIX_setuid (SYS_POSIX + 23)
+#define SYS_POSIX_getuid (SYS_POSIX + 24)
+#define SYS_POSIX_stime (SYS_POSIX + 25)
+#define SYS_POSIX_ptrace (SYS_POSIX + 26)
+#define SYS_POSIX_alarm (SYS_POSIX + 27)
+#define SYS_POSIX_fstat (SYS_POSIX + 28)
+#define SYS_POSIX_pause (SYS_POSIX + 29)
+#define SYS_POSIX_utime (SYS_POSIX + 30)
+#define SYS_POSIX_stty (SYS_POSIX + 31)
+#define SYS_POSIX_gtty (SYS_POSIX + 32)
+#define SYS_POSIX_access (SYS_POSIX + 33)
+#define SYS_POSIX_nice (SYS_POSIX + 34)
+#define SYS_POSIX_statfs (SYS_POSIX + 35)
+#define SYS_POSIX_sync (SYS_POSIX + 36)
+#define SYS_POSIX_kill (SYS_POSIX + 37)
+#define SYS_POSIX_fstatfs (SYS_POSIX + 38)
+#define SYS_POSIX_getpgrp (SYS_POSIX + 39)
+#define SYS_POSIX_syssgi (SYS_POSIX + 40)
+#define SYS_POSIX_dup (SYS_POSIX + 41)
+#define SYS_POSIX_pipe (SYS_POSIX + 42)
+#define SYS_POSIX_times (SYS_POSIX + 43)
+#define SYS_POSIX_profil (SYS_POSIX + 44)
+#define SYS_POSIX_lock (SYS_POSIX + 45)
+#define SYS_POSIX_setgid (SYS_POSIX + 46)
+#define SYS_POSIX_getgid (SYS_POSIX + 47)
+#define SYS_POSIX_sig (SYS_POSIX + 48)
+#define SYS_POSIX_msgsys (SYS_POSIX + 49)
+#define SYS_POSIX_sysmips (SYS_POSIX + 50)
+#define SYS_POSIX_sysacct (SYS_POSIX + 51)
+#define SYS_POSIX_shmsys (SYS_POSIX + 52)
+#define SYS_POSIX_semsys (SYS_POSIX + 53)
+#define SYS_POSIX_ioctl (SYS_POSIX + 54)
+#define SYS_POSIX_uadmin (SYS_POSIX + 55)
+#define SYS_POSIX_exch (SYS_POSIX + 56)
+#define SYS_POSIX_utssys (SYS_POSIX + 57)
+#define SYS_POSIX_USG_reserved1 (SYS_POSIX + 58)
+#define SYS_POSIX_exece (SYS_POSIX + 59)
+#define SYS_POSIX_umask (SYS_POSIX + 60)
+#define SYS_POSIX_chroot (SYS_POSIX + 61)
+#define SYS_POSIX_fcntl (SYS_POSIX + 62)
+#define SYS_POSIX_ulimit (SYS_POSIX + 63)
+#define SYS_POSIX_SAFARI4_reserved1 (SYS_POSIX + 64)
+#define SYS_POSIX_SAFARI4_reserved2 (SYS_POSIX + 65)
+#define SYS_POSIX_SAFARI4_reserved3 (SYS_POSIX + 66)
+#define SYS_POSIX_SAFARI4_reserved4 (SYS_POSIX + 67)
+#define SYS_POSIX_SAFARI4_reserved5 (SYS_POSIX + 68)
+#define SYS_POSIX_SAFARI4_reserved6 (SYS_POSIX + 69)
+#define SYS_POSIX_advfs (SYS_POSIX + 70)
+#define SYS_POSIX_unadvfs (SYS_POSIX + 71)
+#define SYS_POSIX_rmount (SYS_POSIX + 72)
+#define SYS_POSIX_rumount (SYS_POSIX + 73)
+#define SYS_POSIX_rfstart (SYS_POSIX + 74)
+#define SYS_POSIX_reserved1 (SYS_POSIX + 75)
+#define SYS_POSIX_rdebug (SYS_POSIX + 76)
+#define SYS_POSIX_rfstop (SYS_POSIX + 77)
+#define SYS_POSIX_rfsys (SYS_POSIX + 78)
+#define SYS_POSIX_rmdir (SYS_POSIX + 79)
+#define SYS_POSIX_mkdir (SYS_POSIX + 80)
+#define SYS_POSIX_getdents (SYS_POSIX + 81)
+#define SYS_POSIX_sginap (SYS_POSIX + 82)
+#define SYS_POSIX_sgikopt (SYS_POSIX + 83)
+#define SYS_POSIX_sysfs (SYS_POSIX + 84)
+#define SYS_POSIX_getmsg (SYS_POSIX + 85)
+#define SYS_POSIX_putmsg (SYS_POSIX + 86)
+#define SYS_POSIX_poll (SYS_POSIX + 87)
+#define SYS_POSIX_sigreturn (SYS_POSIX + 88)
+#define SYS_POSIX_accept (SYS_POSIX + 89)
+#define SYS_POSIX_bind (SYS_POSIX + 90)
+#define SYS_POSIX_connect (SYS_POSIX + 91)
+#define SYS_POSIX_gethostid (SYS_POSIX + 92)
+#define SYS_POSIX_getpeername (SYS_POSIX + 93)
+#define SYS_POSIX_getsockname (SYS_POSIX + 94)
+#define SYS_POSIX_getsockopt (SYS_POSIX + 95)
+#define SYS_POSIX_listen (SYS_POSIX + 96)
+#define SYS_POSIX_recv (SYS_POSIX + 97)
+#define SYS_POSIX_recvfrom (SYS_POSIX + 98)
+#define SYS_POSIX_recvmsg (SYS_POSIX + 99)
+#define SYS_POSIX_select (SYS_POSIX + 100)
+#define SYS_POSIX_send (SYS_POSIX + 101)
+#define SYS_POSIX_sendmsg (SYS_POSIX + 102)
+#define SYS_POSIX_sendto (SYS_POSIX + 103)
+#define SYS_POSIX_sethostid (SYS_POSIX + 104)
+#define SYS_POSIX_setsockopt (SYS_POSIX + 105)
+#define SYS_POSIX_shutdown (SYS_POSIX + 106)
+#define SYS_POSIX_socket (SYS_POSIX + 107)
+#define SYS_POSIX_gethostname (SYS_POSIX + 108)
+#define SYS_POSIX_sethostname (SYS_POSIX + 109)
+#define SYS_POSIX_getdomainname (SYS_POSIX + 110)
+#define SYS_POSIX_setdomainname (SYS_POSIX + 111)
+#define SYS_POSIX_truncate (SYS_POSIX + 112)
+#define SYS_POSIX_ftruncate (SYS_POSIX + 113)
+#define SYS_POSIX_rename (SYS_POSIX + 114)
+#define SYS_POSIX_symlink (SYS_POSIX + 115)
+#define SYS_POSIX_readlink (SYS_POSIX + 116)
+#define SYS_POSIX_lstat (SYS_POSIX + 117)
+#define SYS_POSIX_nfs_mount (SYS_POSIX + 118)
+#define SYS_POSIX_nfs_svc (SYS_POSIX + 119)
+#define SYS_POSIX_nfs_getfh (SYS_POSIX + 120)
+#define SYS_POSIX_async_daemon (SYS_POSIX + 121)
+#define SYS_POSIX_exportfs (SYS_POSIX + 122)
+#define SYS_POSIX_SGI_setregid (SYS_POSIX + 123)
+#define SYS_POSIX_SGI_setreuid (SYS_POSIX + 124)
+#define SYS_POSIX_getitimer (SYS_POSIX + 125)
+#define SYS_POSIX_setitimer (SYS_POSIX + 126)
+#define SYS_POSIX_adjtime (SYS_POSIX + 127)
+#define SYS_POSIX_SGI_bsdgettime (SYS_POSIX + 128)
+#define SYS_POSIX_SGI_sproc (SYS_POSIX + 129)
+#define SYS_POSIX_SGI_prctl (SYS_POSIX + 130)
+#define SYS_POSIX_SGI_blkproc (SYS_POSIX + 131)
+#define SYS_POSIX_SGI_reserved1 (SYS_POSIX + 132)
+#define SYS_POSIX_SGI_sgigsc (SYS_POSIX + 133)
+#define SYS_POSIX_SGI_mmap (SYS_POSIX + 134)
+#define SYS_POSIX_SGI_munmap (SYS_POSIX + 135)
+#define SYS_POSIX_SGI_mprotect (SYS_POSIX + 136)
+#define SYS_POSIX_SGI_msync (SYS_POSIX + 137)
+#define SYS_POSIX_SGI_madvise (SYS_POSIX + 138)
+#define SYS_POSIX_SGI_mpin (SYS_POSIX + 139)
+#define SYS_POSIX_SGI_getpagesize (SYS_POSIX + 140)
+#define SYS_POSIX_SGI_libattach (SYS_POSIX + 141)
+#define SYS_POSIX_SGI_libdetach (SYS_POSIX + 142)
+#define SYS_POSIX_SGI_getpgrp (SYS_POSIX + 143)
+#define SYS_POSIX_SGI_setpgrp (SYS_POSIX + 144)
+#define SYS_POSIX_SGI_reserved2 (SYS_POSIX + 145)
+#define SYS_POSIX_SGI_reserved3 (SYS_POSIX + 146)
+#define SYS_POSIX_SGI_reserved4 (SYS_POSIX + 147)
+#define SYS_POSIX_SGI_reserved5 (SYS_POSIX + 148)
+#define SYS_POSIX_SGI_reserved6 (SYS_POSIX + 149)
+#define SYS_POSIX_cacheflush (SYS_POSIX + 150)
+#define SYS_POSIX_cachectl (SYS_POSIX + 151)
+#define SYS_POSIX_fchown (SYS_POSIX + 152)
+#define SYS_POSIX_fchmod (SYS_POSIX + 153)
+#define SYS_POSIX_wait3 (SYS_POSIX + 154)
+#define SYS_POSIX_mmap (SYS_POSIX + 155)
+#define SYS_POSIX_munmap (SYS_POSIX + 156)
+#define SYS_POSIX_madvise (SYS_POSIX + 157)
+#define SYS_POSIX_BSD_getpagesize (SYS_POSIX + 158)
+#define SYS_POSIX_setreuid (SYS_POSIX + 159)
+#define SYS_POSIX_setregid (SYS_POSIX + 160)
+#define SYS_POSIX_setpgid (SYS_POSIX + 161)
+#define SYS_POSIX_getgroups (SYS_POSIX + 162)
+#define SYS_POSIX_setgroups (SYS_POSIX + 163)
+#define SYS_POSIX_gettimeofday (SYS_POSIX + 164)
+#define SYS_POSIX_getrusage (SYS_POSIX + 165)
+#define SYS_POSIX_getrlimit (SYS_POSIX + 166)
+#define SYS_POSIX_setrlimit (SYS_POSIX + 167)
+#define SYS_POSIX_waitpid (SYS_POSIX + 168)
+#define SYS_POSIX_dup2 (SYS_POSIX + 169)
+#define SYS_POSIX_reserved2 (SYS_POSIX + 170)
+#define SYS_POSIX_reserved3 (SYS_POSIX + 171)
+#define SYS_POSIX_reserved4 (SYS_POSIX + 172)
+#define SYS_POSIX_reserved5 (SYS_POSIX + 173)
+#define SYS_POSIX_reserved6 (SYS_POSIX + 174)
+#define SYS_POSIX_reserved7 (SYS_POSIX + 175)
+#define SYS_POSIX_reserved8 (SYS_POSIX + 176)
+#define SYS_POSIX_reserved9 (SYS_POSIX + 177)
+#define SYS_POSIX_reserved10 (SYS_POSIX + 178)
+#define SYS_POSIX_reserved11 (SYS_POSIX + 179)
+#define SYS_POSIX_reserved12 (SYS_POSIX + 180)
+#define SYS_POSIX_reserved13 (SYS_POSIX + 181)
+#define SYS_POSIX_reserved14 (SYS_POSIX + 182)
+#define SYS_POSIX_reserved15 (SYS_POSIX + 183)
+#define SYS_POSIX_reserved16 (SYS_POSIX + 184)
+#define SYS_POSIX_reserved17 (SYS_POSIX + 185)
+#define SYS_POSIX_reserved18 (SYS_POSIX + 186)
+#define SYS_POSIX_reserved19 (SYS_POSIX + 187)
+#define SYS_POSIX_reserved20 (SYS_POSIX + 188)
+#define SYS_POSIX_reserved21 (SYS_POSIX + 189)
+#define SYS_POSIX_reserved22 (SYS_POSIX + 190)
+#define SYS_POSIX_reserved23 (SYS_POSIX + 191)
+#define SYS_POSIX_reserved24 (SYS_POSIX + 192)
+#define SYS_POSIX_reserved25 (SYS_POSIX + 193)
+#define SYS_POSIX_reserved26 (SYS_POSIX + 194)
+#define SYS_POSIX_reserved27 (SYS_POSIX + 195)
+#define SYS_POSIX_reserved28 (SYS_POSIX + 196)
+#define SYS_POSIX_reserved29 (SYS_POSIX + 197)
+#define SYS_POSIX_reserved30 (SYS_POSIX + 198)
+#define SYS_POSIX_reserved31 (SYS_POSIX + 199)
+#define SYS_POSIX_reserved32 (SYS_POSIX + 200)
+#define SYS_POSIX_reserved33 (SYS_POSIX + 201)
+#define SYS_POSIX_reserved34 (SYS_POSIX + 202)
+#define SYS_POSIX_reserved35 (SYS_POSIX + 203)
+#define SYS_POSIX_reserved36 (SYS_POSIX + 204)
+#define SYS_POSIX_reserved37 (SYS_POSIX + 205)
+#define SYS_POSIX_reserved38 (SYS_POSIX + 206)
+#define SYS_POSIX_reserved39 (SYS_POSIX + 207)
+#define SYS_POSIX_reserved40 (SYS_POSIX + 208)
+#define SYS_POSIX_reserved41 (SYS_POSIX + 209)
+#define SYS_POSIX_reserved42 (SYS_POSIX + 210)
+#define SYS_POSIX_reserved43 (SYS_POSIX + 211)
+#define SYS_POSIX_reserved44 (SYS_POSIX + 212)
+#define SYS_POSIX_reserved45 (SYS_POSIX + 213)
+#define SYS_POSIX_reserved46 (SYS_POSIX + 214)
+#define SYS_POSIX_reserved47 (SYS_POSIX + 215)
+#define SYS_POSIX_reserved48 (SYS_POSIX + 216)
+#define SYS_POSIX_reserved49 (SYS_POSIX + 217)
+#define SYS_POSIX_reserved50 (SYS_POSIX + 218)
+#define SYS_POSIX_reserved51 (SYS_POSIX + 219)
+#define SYS_POSIX_reserved52 (SYS_POSIX + 220)
+#define SYS_POSIX_reserved53 (SYS_POSIX + 221)
+#define SYS_POSIX_reserved54 (SYS_POSIX + 222)
+#define SYS_POSIX_reserved55 (SYS_POSIX + 223)
+#define SYS_POSIX_reserved56 (SYS_POSIX + 224)
+#define SYS_POSIX_reserved57 (SYS_POSIX + 225)
+#define SYS_POSIX_reserved58 (SYS_POSIX + 226)
+#define SYS_POSIX_reserved59 (SYS_POSIX + 227)
+#define SYS_POSIX_reserved60 (SYS_POSIX + 228)
+#define SYS_POSIX_reserved61 (SYS_POSIX + 229)
+#define SYS_POSIX_reserved62 (SYS_POSIX + 230)
+#define SYS_POSIX_reserved63 (SYS_POSIX + 231)
+#define SYS_POSIX_reserved64 (SYS_POSIX + 232)
+#define SYS_POSIX_reserved65 (SYS_POSIX + 233)
+#define SYS_POSIX_reserved66 (SYS_POSIX + 234)
+#define SYS_POSIX_reserved67 (SYS_POSIX + 235)
+#define SYS_POSIX_reserved68 (SYS_POSIX + 236)
+#define SYS_POSIX_reserved69 (SYS_POSIX + 237)
+#define SYS_POSIX_reserved70 (SYS_POSIX + 238)
+#define SYS_POSIX_reserved71 (SYS_POSIX + 239)
+#define SYS_POSIX_reserved72 (SYS_POSIX + 240)
+#define SYS_POSIX_reserved73 (SYS_POSIX + 241)
+#define SYS_POSIX_reserved74 (SYS_POSIX + 242)
+#define SYS_POSIX_reserved75 (SYS_POSIX + 243)
+#define SYS_POSIX_reserved76 (SYS_POSIX + 244)
+#define SYS_POSIX_reserved77 (SYS_POSIX + 245)
+#define SYS_POSIX_reserved78 (SYS_POSIX + 246)
+#define SYS_POSIX_reserved79 (SYS_POSIX + 247)
+#define SYS_POSIX_reserved80 (SYS_POSIX + 248)
+#define SYS_POSIX_reserved81 (SYS_POSIX + 249)
+#define SYS_POSIX_reserved82 (SYS_POSIX + 250)
+#define SYS_POSIX_reserved83 (SYS_POSIX + 251)
+#define SYS_POSIX_reserved84 (SYS_POSIX + 252)
+#define SYS_POSIX_reserved85 (SYS_POSIX + 253)
+#define SYS_POSIX_reserved86 (SYS_POSIX + 254)
+#define SYS_POSIX_reserved87 (SYS_POSIX + 255)
+#define SYS_POSIX_reserved88 (SYS_POSIX + 256)
+#define SYS_POSIX_reserved89 (SYS_POSIX + 257)
+#define SYS_POSIX_reserved90 (SYS_POSIX + 258)
+#define SYS_POSIX_reserved91 (SYS_POSIX + 259)
+#define SYS_POSIX_netboot (SYS_POSIX + 260)
+#define SYS_POSIX_netunboot (SYS_POSIX + 261)
+#define SYS_POSIX_rdump (SYS_POSIX + 262)
+#define SYS_POSIX_setsid (SYS_POSIX + 263)
+#define SYS_POSIX_getmaxsig (SYS_POSIX + 264)
+#define SYS_POSIX_sigpending (SYS_POSIX + 265)
+#define SYS_POSIX_sigprocmask (SYS_POSIX + 266)
+#define SYS_POSIX_sigsuspend (SYS_POSIX + 267)
+#define SYS_POSIX_sigaction (SYS_POSIX + 268)
+#define SYS_POSIX_MIPS_reserved1 (SYS_POSIX + 269)
+#define SYS_POSIX_MIPS_reserved2 (SYS_POSIX + 270)
+#define SYS_POSIX_MIPS_reserved3 (SYS_POSIX + 271)
+#define SYS_POSIX_MIPS_reserved4 (SYS_POSIX + 272)
+#define SYS_POSIX_MIPS_reserved5 (SYS_POSIX + 273)
+#define SYS_POSIX_MIPS_reserved6 (SYS_POSIX + 274)
+#define SYS_POSIX_MIPS_reserved7 (SYS_POSIX + 275)
+#define SYS_POSIX_MIPS_reserved8 (SYS_POSIX + 276)
+#define SYS_POSIX_MIPS_reserved9 (SYS_POSIX + 277)
+#define SYS_POSIX_MIPS_reserved10 (SYS_POSIX + 278)
+#define SYS_POSIX_MIPS_reserved11 (SYS_POSIX + 279)
+#define SYS_POSIX_TANDEM_reserved1 (SYS_POSIX + 280)
+#define SYS_POSIX_TANDEM_reserved2 (SYS_POSIX + 281)
+#define SYS_POSIX_TANDEM_reserved3 (SYS_POSIX + 282)
+#define SYS_POSIX_TANDEM_reserved4 (SYS_POSIX + 283)
+#define SYS_POSIX_TANDEM_reserved5 (SYS_POSIX + 284)
+#define SYS_POSIX_TANDEM_reserved6 (SYS_POSIX + 285)
+#define SYS_POSIX_TANDEM_reserved7 (SYS_POSIX + 286)
+#define SYS_POSIX_TANDEM_reserved8 (SYS_POSIX + 287)
+#define SYS_POSIX_TANDEM_reserved9 (SYS_POSIX + 288)
+#define SYS_POSIX_TANDEM_reserved10 (SYS_POSIX + 289)
+#define SYS_POSIX_TANDEM_reserved11 (SYS_POSIX + 290)
+#define SYS_POSIX_TANDEM_reserved12 (SYS_POSIX + 291)
+#define SYS_POSIX_TANDEM_reserved13 (SYS_POSIX + 292)
+#define SYS_POSIX_TANDEM_reserved14 (SYS_POSIX + 293)
+#define SYS_POSIX_TANDEM_reserved15 (SYS_POSIX + 294)
+#define SYS_POSIX_TANDEM_reserved16 (SYS_POSIX + 295)
+#define SYS_POSIX_TANDEM_reserved17 (SYS_POSIX + 296)
+#define SYS_POSIX_TANDEM_reserved18 (SYS_POSIX + 297)
+#define SYS_POSIX_TANDEM_reserved19 (SYS_POSIX + 298)
+#define SYS_POSIX_TANDEM_reserved20 (SYS_POSIX + 299)
+#define SYS_POSIX_SGI_reserved7 (SYS_POSIX + 300)
+#define SYS_POSIX_SGI_reserved8 (SYS_POSIX + 301)
+#define SYS_POSIX_SGI_reserved9 (SYS_POSIX + 302)
+#define SYS_POSIX_SGI_reserved10 (SYS_POSIX + 303)
+#define SYS_POSIX_SGI_reserved11 (SYS_POSIX + 304)
+#define SYS_POSIX_SGI_reserved12 (SYS_POSIX + 305)
+#define SYS_POSIX_SGI_reserved13 (SYS_POSIX + 306)
+#define SYS_POSIX_SGI_reserved14 (SYS_POSIX + 307)
+#define SYS_POSIX_SGI_reserved15 (SYS_POSIX + 308)
+#define SYS_POSIX_SGI_reserved16 (SYS_POSIX + 309)
+#define SYS_POSIX_SGI_reserved17 (SYS_POSIX + 310)
+#define SYS_POSIX_SGI_reserved18 (SYS_POSIX + 311)
+#define SYS_POSIX_SGI_reserved19 (SYS_POSIX + 312)
+#define SYS_POSIX_SGI_reserved20 (SYS_POSIX + 313)
+#define SYS_POSIX_SGI_reserved21 (SYS_POSIX + 314)
+#define SYS_POSIX_SGI_reserved22 (SYS_POSIX + 315)
+#define SYS_POSIX_SGI_reserved23 (SYS_POSIX + 316)
+#define SYS_POSIX_SGI_reserved24 (SYS_POSIX + 317)
+#define SYS_POSIX_SGI_reserved25 (SYS_POSIX + 318)
+#define SYS_POSIX_SGI_reserved26 (SYS_POSIX + 319)
+
+/*
+ * Linux syscalls are in the range from 4000 to 4999
+ * Hopefully these syscall numbers are unused ... If not everyone using
+ * statically linked binaries is pretty <censored - the government>. You've
+ * been warned.
+ */
+#define SYS_Linux 4000
+#define SYS_syscall (SYS_Linux + 0)
+#define SYS_exit (SYS_Linux + 1)
+#define SYS_fork (SYS_Linux + 2)
+#define SYS_read (SYS_Linux + 3)
+#define SYS_write (SYS_Linux + 4)
+#define SYS_open (SYS_Linux + 5)
+#define SYS_close (SYS_Linux + 6)
+#define SYS_waitpid (SYS_Linux + 7)
+#define SYS_creat (SYS_Linux + 8)
+#define SYS_link (SYS_Linux + 9)
+#define SYS_unlink (SYS_Linux + 10)
+#define SYS_execve (SYS_Linux + 11)
+#define SYS_chdir (SYS_Linux + 12)
+#define SYS_time (SYS_Linux + 13)
+#define SYS_mknod (SYS_Linux + 14)
+#define SYS_chmod (SYS_Linux + 15)
+#define SYS_chown (SYS_Linux + 16)
+#define SYS_break (SYS_Linux + 17)
+#define SYS_oldstat (SYS_Linux + 18)
+#define SYS_lseek (SYS_Linux + 19)
+#define SYS_getpid (SYS_Linux + 20)
+#define SYS_mount (SYS_Linux + 21)
+#define SYS_umount (SYS_Linux + 22)
+#define SYS_setuid (SYS_Linux + 23)
+#define SYS_getuid (SYS_Linux + 24)
+#define SYS_stime (SYS_Linux + 25)
+#define SYS_ptrace (SYS_Linux + 26)
+#define SYS_alarm (SYS_Linux + 27)
+#define SYS_oldfstat (SYS_Linux + 28)
+#define SYS_pause (SYS_Linux + 29)
+#define SYS_utime (SYS_Linux + 30)
+#define SYS_stty (SYS_Linux + 31)
+#define SYS_gtty (SYS_Linux + 32)
+#define SYS_access (SYS_Linux + 33)
+#define SYS_nice (SYS_Linux + 34)
+#define SYS_ftime (SYS_Linux + 35)
+#define SYS_sync (SYS_Linux + 36)
+#define SYS_kill (SYS_Linux + 37)
+#define SYS_rename (SYS_Linux + 38)
+#define SYS_mkdir (SYS_Linux + 39)
+#define SYS_rmdir (SYS_Linux + 40)
+#define SYS_dup (SYS_Linux + 41)
+#define SYS_pipe (SYS_Linux + 42)
+#define SYS_times (SYS_Linux + 43)
+#define SYS_prof (SYS_Linux + 44)
+#define SYS_brk (SYS_Linux + 45)
+#define SYS_setgid (SYS_Linux + 46)
+#define SYS_getgid (SYS_Linux + 47)
+#define SYS_signal (SYS_Linux + 48)
+#define SYS_geteuid (SYS_Linux + 49)
+#define SYS_getegid (SYS_Linux + 50)
+#define SYS_acct (SYS_Linux + 51)
+#define SYS_phys (SYS_Linux + 52)
+#define SYS_lock (SYS_Linux + 53)
+#define SYS_ioctl (SYS_Linux + 54)
+#define SYS_fcntl (SYS_Linux + 55)
+#define SYS_mpx (SYS_Linux + 56)
+#define SYS_setpgid (SYS_Linux + 57)
+#define SYS_ulimit (SYS_Linux + 58)
+#define SYS_oldolduname (SYS_Linux + 59)
+#define SYS_umask (SYS_Linux + 60)
+#define SYS_chroot (SYS_Linux + 61)
+#define SYS_ustat (SYS_Linux + 62)
+#define SYS_dup2 (SYS_Linux + 63)
+#define SYS_getppid (SYS_Linux + 64)
+#define SYS_getpgrp (SYS_Linux + 65)
+#define SYS_setsid (SYS_Linux + 66)
+#define SYS_sigaction (SYS_Linux + 67)
+#define SYS_sgetmask (SYS_Linux + 68)
+#define SYS_ssetmask (SYS_Linux + 69)
+#define SYS_setreuid (SYS_Linux + 70)
+#define SYS_setregid (SYS_Linux + 71)
+#define SYS_sigsuspend (SYS_Linux + 72)
+#define SYS_sigpending (SYS_Linux + 73)
+#define SYS_sethostname (SYS_Linux + 74)
+#define SYS_setrlimit (SYS_Linux + 75)
+#define SYS_getrlimit (SYS_Linux + 76)
+#define SYS_getrusage (SYS_Linux + 77)
+#define SYS_gettimeofday (SYS_Linux + 78)
+#define SYS_settimeofday (SYS_Linux + 79)
+#define SYS_getgroups (SYS_Linux + 80)
+#define SYS_setgroups (SYS_Linux + 81)
+#define SYS_reserved82 (SYS_Linux + 82)
+#define SYS_symlink (SYS_Linux + 83)
+#define SYS_oldlstat (SYS_Linux + 84)
+#define SYS_readlink (SYS_Linux + 85)
+#define SYS_uselib (SYS_Linux + 86)
+#define SYS_swapon (SYS_Linux + 87)
+#define SYS_reboot (SYS_Linux + 88)
+#define SYS_readdir (SYS_Linux + 89)
+#define SYS_mmap (SYS_Linux + 90)
+#define SYS_munmap (SYS_Linux + 91)
+#define SYS_truncate (SYS_Linux + 92)
+#define SYS_ftruncate (SYS_Linux + 93)
+#define SYS_fchmod (SYS_Linux + 94)
+#define SYS_fchown (SYS_Linux + 95)
+#define SYS_getpriority (SYS_Linux + 96)
+#define SYS_setpriority (SYS_Linux + 97)
+#define SYS_profil (SYS_Linux + 98)
+#define SYS_statfs (SYS_Linux + 99)
+#define SYS_fstatfs (SYS_Linux + 100)
+#define SYS_ioperm (SYS_Linux + 101)
+#define SYS_socketcall (SYS_Linux + 102)
+#define SYS_syslog (SYS_Linux + 103)
+#define SYS_setitimer (SYS_Linux + 104)
+#define SYS_getitimer (SYS_Linux + 105)
+#define SYS_stat (SYS_Linux + 106)
+#define SYS_lstat (SYS_Linux + 107)
+#define SYS_fstat (SYS_Linux + 108)
+#define SYS_olduname (SYS_Linux + 109)
+#define SYS_iopl (SYS_Linux + 110)
+#define SYS_vhangup (SYS_Linux + 111)
+#define SYS_idle (SYS_Linux + 112)
+#define SYS_vm86 (SYS_Linux + 113)
+#define SYS_wait4 (SYS_Linux + 114)
+#define SYS_swapoff (SYS_Linux + 115)
+#define SYS_sysinfo (SYS_Linux + 116)
+#define SYS_ipc (SYS_Linux + 117)
+#define SYS_fsync (SYS_Linux + 118)
+#define SYS_sigreturn (SYS_Linux + 119)
+#define SYS_clone (SYS_Linux + 120)
+#define SYS_setdomainname (SYS_Linux + 121)
+#define SYS_uname (SYS_Linux + 122)
+#define SYS_modify_ldt (SYS_Linux + 123)
+#define SYS_adjtimex (SYS_Linux + 124)
+#define SYS_mprotect (SYS_Linux + 125)
+#define SYS_sigprocmask (SYS_Linux + 126)
+#define SYS_create_module (SYS_Linux + 127)
+#define SYS_init_module (SYS_Linux + 128)
+#define SYS_delete_module (SYS_Linux + 129)
+#define SYS_get_kernel_syms (SYS_Linux + 130)
+#define SYS_quotactl (SYS_Linux + 131)
+#define SYS_getpgid (SYS_Linux + 132)
+#define SYS_fchdir (SYS_Linux + 133)
+#define SYS_bdflush (SYS_Linux + 134)
+#define SYS_sysfs (SYS_Linux + 135)
+#define SYS_personality (SYS_Linux + 136)
+#define SYS_afs_syscall (SYS_Linux + 137) /* Syscall for Andrew File System */
+#define SYS_setfsuid (SYS_Linux + 138)
+#define SYS_setfsgid (SYS_Linux + 139)
+#define SYS__llseek (SYS_Linux + 140)
+#define SYS_getdents (SYS_Linux + 141)
+#define SYS__newselect (SYS_Linux + 142)
+#define SYS_syscall_flock (SYS_Linux + 143)
+#define SYS_msync (SYS_Linux + 144)
+#define SYS_readv (SYS_Linux + 145)
+#define SYS_writev (SYS_Linux + 146)
+#define SYS_cacheflush (SYS_Linux + 147)
+#define SYS_cachectl (SYS_Linux + 148)
+#define SYS_sysmips (SYS_Linux + 149)
+#define SYS_setup (SYS_Linux + 150) /* used only by init, to get system going */
+#define SYS_getsid (SYS_Linux + 151)
+#define SYS_fdatasync (SYS_Linux + 152)
+#define SYS__sysctl (SYS_Linux + 153)
+#define SYS_mlock (SYS_Linux + 154)
+#define SYS_munlock (SYS_Linux + 155)
+#define SYS_mlockall (SYS_Linux + 156)
+#define SYS_munlockall (SYS_Linux + 157)
+#define SYS_sched_setparam (SYS_Linux + 158)
+#define SYS_sched_getparam (SYS_Linux + 159)
+#define SYS_sched_setscheduler (SYS_Linux + 160)
+#define SYS_sched_getscheduler (SYS_Linux + 161)
+#define SYS_sched_yield (SYS_Linux + 162)
+#define SYS_sched_get_priority_max (SYS_Linux + 163)
+#define SYS_sched_get_priority_min (SYS_Linux + 164)
+#define SYS_sched_rr_get_interval (SYS_Linux + 165)
+#define SYS_nanosleep (SYS_Linux + 166)
+#define SYS_mremap (SYS_Linux + 167)
+#define SYS_accept (SYS_Linux + 168)
+#define SYS_bind (SYS_Linux + 169)
+#define SYS_connect (SYS_Linux + 170)
+#define SYS_getpeername (SYS_Linux + 171)
+#define SYS_getsockname (SYS_Linux + 172)
+#define SYS_getsockopt (SYS_Linux + 173)
+#define SYS_listen (SYS_Linux + 174)
+#define SYS_recv (SYS_Linux + 175)
+#define SYS_recvfrom (SYS_Linux + 176)
+#define SYS_recvmsg (SYS_Linux + 177)
+#define SYS_send (SYS_Linux + 178)
+#define SYS_sendmsg (SYS_Linux + 179)
+#define SYS_sendto (SYS_Linux + 180)
+#define SYS_setsockopt (SYS_Linux + 181)
+#define SYS_shutdown (SYS_Linux + 182)
+#define SYS_socket (SYS_Linux + 183)
+#define SYS_socketpair (SYS_Linux + 184)
+#define SYS_setresuid (SYS_Linux + 185)
+#define SYS_getresuid (SYS_Linux + 186)
+#define SYS_query_module (SYS_Linux + 187)
+#define SYS_poll (SYS_Linux + 188)
+#define SYS_nfsservctl (SYS_Linux + 189)
+
+#endif /* sys/syscall.h */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/sysmips.h b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
new file mode 100644
index 0000000..cbb7eba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/sys/sysmips.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_SYSMIPS_H
+#define _SYS_SYSMIPS_H 1
+
+#include <features.h>
+
+/*
+ * Get the kernel definition for sysmips(2)
+ */
+#include <asm/sysmips.h>
+
+__BEGIN_DECLS
+
+extern int sysmips __P ((__const int cmd, __const int arg1,
+ __const int arg2, __const int arg3));
+
+__END_DECLS
+
+#endif /* sys/sysmips.h */
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
new file mode 100644
index 0000000..6dd9cd8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -0,0 +1,46 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+#
+# Calls for compatibility with existing MIPS OS implementations and
+# compilers.
+#
+cachectl - cachectl 3 __cachectl cachectl
+cacheflush - cacheflush 3 _flush_cache cacheflush
+sysmips - sysmips 4 __sysmips sysmips
+
+# override select.S in parent directory:
+select - select 5 __select select
+sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
+
+#
+# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
+# it's provided for compatibility, though.
+#
+accept - accept 3 __accept accept
+bind - bind 3 __bind bind
+connect - connect 3 __connect connect
+getpeername - getpeername 3 __getpeername getpeername
+getsockname - getsockname 3 __getsockname getsockname
+getsockopt - getsockopt 5 __getsockopt getsockopt
+listen - listen 2 __listen listen
+recv - recv 4 __recv recv
+recvfrom - recvfrom 6 __recvfrom recvfrom
+recvmsg - recvmsg 3 __recvmsg recvmsg
+send - send 4 __send send
+sendmsg - sendmsg 3 __sendmsg sendmsg
+sendto - sendto 6 __sendto sendto
+setsockopt - setsockopt 5 __setsockopt setsockopt
+shutdown - shutdown 2 __shutdown shutdown
+socket - socket 3 __socket socket
+socketpair - socketpair 4 __socketpair socketpair
+
+#
+# There are defined locally because the caller is also defined in this dir.
+#
+s_llseek llseek _llseek 5 __sys_llseek
+s_sigaction sigaction sigaction 3 __syscall_sigaction
+s_ustat ustat ustat 2 __syscall_ustat
+sys_mknod xmknod mknod 3 __syscall_mknod
+sys_fstat fxstat fstat 2 __syscall_fstat
+sys_lstat lxstat lstat 2 __syscall_lstat
+sys_stat xstat stat 2 __syscall_stat
diff --git a/sysdeps/unix/sysv/linux/mips/ustat.c b/sysdeps/unix/sysv/linux/mips/ustat.c
new file mode 100644
index 0000000..447ab29
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/ustat.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/ustat.h>
+#include <sys/sysmacros.h>
+
+
+extern int __syscall_ustat (unsigned long dev, struct ustat *ubuf);
+
+int
+ustat (dev_t dev, struct ustat *ubuf)
+{
+ unsigned long k_dev;
+
+ /* We must convert the value to dev_t type used by the kernel. */
+ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
+
+ return __syscall_ustat (k_dev, ubuf);
+}
diff --git a/sysdeps/unix/sysv/linux/mips/xmknod.c b/sysdeps/unix/sysv/linux/mips/xmknod.c
new file mode 100644
index 0000000..c7ff64f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/xmknod.c
@@ -0,0 +1,47 @@
+/* xmknod call using old-style Unix mknod system call.
+ Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+
+extern int __syscall_mknod (const char *, unsigned long, unsigned int);
+
+/* Create a device file named PATH, with permission and special bits MODE
+ and device number DEV (which can be constructed from major and minor
+ device numbers with the `makedev' macro above). */
+int
+__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
+{
+ unsigned long k_dev;
+
+ if (vers != _MKNOD_VER)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* We must convert the value to dev_t type used by the kernel. */
+ k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
+
+ return __syscall_mknod (path, mode, k_dev);
+}
+
+weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c
new file mode 100644
index 0000000..9f7eb58
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/xstat.c
@@ -0,0 +1,80 @@
+/* xstat using old-style Unix stat system call.
+ Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <kernel_stat.h>
+
+extern int __syscall_stat (const char *, struct kernel_stat *);
+
+/* Get information about the file NAME in BUF. */
+int
+__xstat (int vers, const char *name, struct stat *buf)
+{
+ struct kernel_stat kbuf;
+ int result;
+
+ switch (vers)
+ {
+ case _STAT_VER_LINUX_OLD:
+ /* Nothing to do. The struct is in the form the kernel expects
+ it to be. */
+ result = __syscall_stat (name, (struct kernel_stat *) buf);
+ break;
+
+ case _STAT_VER_LINUX:
+ /* Do the system call. */
+ result = __syscall_stat (name, &kbuf);
+
+ /* Convert to current kernel version of `struct stat'. */
+ buf->st_dev = kbuf.st_dev;
+ buf->st_pad1[0] = 0; buf->st_pad1[1] = 0; buf->st_pad1[2] = 0;
+ buf->st_ino = kbuf.st_ino;
+ buf->st_mode = kbuf.st_mode;
+ buf->st_nlink = kbuf.st_nlink;
+ buf->st_uid = kbuf.st_uid;
+ buf->st_gid = kbuf.st_gid;
+ buf->st_rdev = kbuf.st_rdev;
+ buf->st_pad2[0] = 0; buf->st_pad2[1] = 0;
+ buf->st_pad3 = 0;
+ buf->st_size = kbuf.st_size;
+ buf->st_blksize = kbuf.st_blksize;
+ buf->st_blocks = kbuf.st_blocks;
+
+ buf->st_atime = kbuf.st_atime; buf->__reserved0 = 0;
+ buf->st_mtime = kbuf.st_mtime; buf->__reserved1 = 0;
+ buf->st_ctime = kbuf.st_ctime; buf->__reserved2 = 0;
+
+ buf->st_pad4[0] = 0; buf->st_pad4[1] = 0;
+ buf->st_pad4[2] = 0; buf->st_pad4[3] = 0;
+ buf->st_pad4[4] = 0; buf->st_pad4[5] = 0;
+ buf->st_pad4[6] = 0; buf->st_pad4[7] = 0;
+ break;
+
+ default:
+ __set_errno (EINVAL);
+ result = -1;
+ break;
+ }
+
+ return result;
+}
+weak_alias (__xstat, _xstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a50d6f575cb6db690b8455adfd85d4a5a90d09c
commit 5a50d6f575cb6db690b8455adfd85d4a5a90d09c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:28:11 1997 +0000
Fix PIC case.
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index f519f19..819a701 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -23,14 +23,19 @@
#include <sysdep.h>
+/* XXX Must this be __PIC__ ? --drepper */
#ifdef PIC
.option pic2
#endif
ENTRY (_setjmp)
+ .set noreorder
#ifdef PIC
.cpload t9
+ la t9, C_SYMBOL_NAME (__sigsetjmp)
+ jr t9
+#else
+ j C_SYMBOL_NAME (__sigsetjmp)
#endif
- la t9, C_SYMBOL_NAME (__sigsetjmp)
- nop
- jr t9
- li a1, 0 /* Pass a second argument of zero. */
+ move a1,zero /* Pass a second argument of zero. */
+ .set reorder
+ .end _setjmp
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 9a22700..f220404 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -23,14 +23,19 @@
#include <sysdep.h>
+/* XXX Must this be __PIC__ ? --drepper */
#ifdef PIC
.option pic2
#endif
ENTRY (setjmp)
+ .set noreorder
#ifdef PIC
.cpload t9
+ la t9, C_SYMBOL_NAME (__sigsetjmp)
+ jr t9
+#else
+ j C_SYMBOL_NAME (__sigsetjmp)
#endif
- la t9, C_SYMBOL_NAME (__sigsetjmp)
- nop
- jr t9
- li a1, 1 /* Pass a second argument of one. */
+ li a1, 1 /* Pass a second argument of one. */
+ .set reorder
+ .end setjmp
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 355a4a9..ce9ad9c 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -17,6 +17,12 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <entry.h>
+
+#ifndef ENTRY_POINT
+#error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
+#endif
+
/* This is the canonical entry point, usually the first thing in the text
segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
point runs, most registers' values are unspecified, except for:
@@ -53,8 +59,8 @@
#endif
.text
- .globl _start
-_start:
+ .globl ENTRY_POINT
+ENTRY_POINT:
#ifdef PIC
SET_GP
#endif
@@ -81,20 +87,9 @@ nofini:
the prologue of __libc_init_first, we preload them to
prevent clobbering the stack tops. In Hurd case, stack pointer
($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */
-#if (__mips64)
- dli $4, 0x10000000000
- bne $29, $4, 1f
- dsubu $29, 32
- sd $0, 0($29)
- sd $0, 8($29)
- sd $0, 16($29)
- sd $0, 24($29)
-1:
- ld $4, 0($29)
- ld $5, 8($29)
- ld $6, 16($29)
- ld $7, 24($29)
-#else /* __mips64 */
+#if 0
+ jal mach_host_self
+#endif
li $4, 0x80000000
bne $29, $4, 1f
subu $29, 16
@@ -107,23 +102,14 @@ nofini:
lw $5, 4($29)
lw $6, 8($29)
lw $7, 12($29)
-#endif /* __mips64 */
-
jal __libc_init_first
#ifdef PIC
SET_GP
#endif
-#if (__mips64)
- ld $4, 0($29)
- ld $5, 8($29)
- ld $6, 16($29)
- ld $7, 24($29)
-#else /* __mips64 */
lw $4, 0($29)
lw $5, 4($29)
lw $6, 8($29)
lw $7, 12($29)
-#endif /* __mips64 */
/* Call `_init', which is the entry point to our own `.init'
section; and register with `atexit' to have `exit' call
@@ -145,19 +131,11 @@ nofini:
/* Extract the arguments and environment as encoded on the stack
and set up the arguments for `main': argc, argv, envp. */
-#if (__mips64)
- ld $4, 0($29) /* argc */
- daddu $5, $29, 8 /* argv */
- dsll $6, $4, 3
- daddu $6, $6, 8
- daddu $6, $5, $6 /* envp = &argv[argc + 1] */
-#else /* __mips64 */
lw $4, 0($29) /* argc */
addu $5, $29, 4 /* argv */
sll $6, $4, 2
addu $6, $6, 4
addu $6, $5, $6 /* envp = &argv[argc + 1] */
-#endif /* __mips64 */
/* Call the user's main function, and exit with its value. */
jal main
@@ -172,10 +150,11 @@ hlt: b hlt /* Crash if somehow it does return. */
.data
.globl __data_start
__data_start:
-#if (__mips64)
- .dword 0
-#else /* __mips64 */
- .word 0
-#endif /* __mips64 */
+ .long 0
.weak data_start
data_start = __data_start
+
+ .comm errno, 4, 4
+#ifdef __ELF__
+ .type errno, @object
+#endif
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index bc42dcb..607b5f2 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -26,10 +26,20 @@
#endif
ENTRY (__sigsetjmp)
#ifdef PIC
- .cpload t9
+ .set noreorder
+ .cpload t9
+ .set reorder
#endif
- move a2, sp
- move a3, fp
- la t9, __sigsetjmp_aux
- nop
- jr t9
+ move a2, sp
+#ifdef fp
+ move a3, fp
+#else
+ move a3, $fp
+#endif
+#ifdef PIC
+ la t9, __sigsetjmp_aux
+ jr t9
+#else
+ j __sigsetjmp_aux
+#endif
+ .end __sigsetjmp
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index 1976726..e38f735 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -24,46 +24,24 @@
#endif
#ifndef HAVE_GNU_LD
-#define __end end
+#define _end end
#endif
-.data
-.sdata
+ .data
ENTRY(__curbrk)
- .word __end
+ .word 0
.end __curbrk
-.text
-.set noreorder
-.set noat
-ENTRY(__brk)
- /* Minimum is one page. */
- lui v0, 4096
- lw v0, __end
- nop
-
- /* If they ask for less than a page, givvem the whole
- thing anyway. */
- sltu AT, a0, v0
- beq AT, zero, down1
- nop
- move a0, v0
-down1:
- li v0, SYS_brk
- syscall
- bne a3, zero, error
-
- /* Update __curbrk and exit cleanly. */
- lui AT, 4096
+ .text
+SYSCALL__(brk, 1)
+ .set reorder
+ /* Handle the query case. */
+ bnez a0, 1f
+ move a0,v0
+1: /* Update __curbrk and exit cleanly. */
sw a0, __curbrk
- j ra
move v0, zero
-
- /* What a horrible way to die. */
-error: j syscall_error
- nop
- nop
- nop
+ jr ra
.end __brk
weak_alias (__brk, brk)
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 0cfc302..ac8335f 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -21,10 +21,23 @@
#define _ERRNO_H
#include <bits/errno.h>
-/* .globl errno */
-.set noreorder
+ .comm errno, 4
+#ifdef __ELF__
+ .type errno, @object
+#endif
+
+ .set noreorder
-ENTRY(syscall_error)
+ENTRY(__syscall_error)
+#ifdef __PIC__
+ .set noat
+ move $1, $31
+ bltzal $0, 0f
+ nop
+0: .cpload $31
+ move $31, $1
+ .set at
+#endif
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
@@ -40,4 +53,8 @@ skip:
/* And just kick back a -1. */
j ra
li v0, -1
- .end syscall_error
+ END(__syscall_error)
+
+/* We provide this alias for compatilility with other Unices
+ like IRIX 5 */
+weak_alias (__syscall_error, syscall_error)
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index 2f148d0..cbafbdc 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -32,19 +32,41 @@
/* Note that while it's better structurally, going back to call syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
+#ifdef __PIC__
+ #define PSEUDO(name, syscall_name, args) \
+ .align 2; \
+ 99: la t9,syscall_error; \
+ jr t9; \
+ ENTRY(name) \
+ .set noreorder; \
+ .cpload t9; \
+ li v0, SYS_##syscall_name; \
+ syscall; \
+ .set reorder; \
+ bne a3, zero, 99b; \
+syse1:
+#else
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
.align 2; \
99: j syscall_error; \
- nop; \
ENTRY(name) \
+ .set noreorder; \
li v0, SYS_##syscall_name; \
syscall; \
+ .set reorder; \
bne a3, zero, 99b; \
- nop; \
syse1:
+#endif
+
+#undef PSEUDO_END
+#define PSEUDO_END(sym) .end sym
#define ret j ra ; nop
+
+#undef END
+#define END(sym) .end sym
+
#define r0 v0
#define r1 v1
/* The mips move insn is d,s. */
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index a544156..9ea55bc 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -28,14 +28,14 @@ ENTRY(__wait)
li v0, SYS_wait
syscall
- beq a3, zero, noerror
+ beqz a3, noerror
nop
- j syscall_error
+ j __syscall_error
nop
noerror:
/* If the arg is not NULL, store v1 there. */
- beq a0, zero, noarg
+ beqz a0, noarg
nop
sw v1, 0(a0)
nop
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a2c06dc40a6844641a23373d3005a46b0fa1a97
commit 6a2c06dc40a6844641a23373d3005a46b0fa1a97
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:26:15 1997 +0000
Special control bits for RTLD.
diff --git a/sysdeps/mips/mips64/rtld-parms b/sysdeps/mips/mips64/rtld-parms
new file mode 100644
index 0000000..77dfc39
--- /dev/null
+++ b/sysdeps/mips/mips64/rtld-parms
@@ -0,0 +1,3 @@
+ifndef rtld-wordsize
+rtld-wordsize = 64
+endif
diff --git a/sysdeps/mips/mipsel/rtld-parms b/sysdeps/mips/mipsel/rtld-parms
new file mode 100644
index 0000000..07fac51
--- /dev/null
+++ b/sysdeps/mips/mipsel/rtld-parms
@@ -0,0 +1,3 @@
+ifndef rtld-oformat
+rtld-oformat = elf32-littlemips
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c0c6f59b4ed8434d7c31bbaadaec077cc1703fe
commit 8c0c6f59b4ed8434d7c31bbaadaec077cc1703fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:25:19 1997 +0000
MIPS specific DL interface bits.
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
new file mode 100644
index 0000000..636da56
--- /dev/null
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -0,0 +1,42 @@
+/* System dependand definitions for run-time dynamic loading.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_DLFCN_H
+#define _BITS_DLFCN_H 1
+
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY 0x001 /* Lazy function call binding. */
+#define RTLD_NOW 0x002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+ the symbols of the loaded object and its dependencies are made
+ visible as if the object were linked directly into the program. */
+#define RTLD_GLOBAL 0x004
+
+__BEGIN_DECLS
+
+/* Some SGI specific calls that aren't implemented yet. */
+extern void *sgidladd __P ((const char *, int));
+extern void *sgidlopen_version __P ((const char *, int, const char *, int));
+extern char *sgigetdsoversion __P ((const char *));
+
+__END_DECLS
+
+#endif /* bits/dlfcn.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f095c0f3bb53285091fd6d6f1dad4659c24fbfb0
commit f095c0f3bb53285091fd6d6f1dad4659c24fbfb0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:23:14 1997 +0000
Linker script for building glibc itself.
diff --git a/sysdeps/mips/rtld-ldscript.in b/sysdeps/mips/rtld-ldscript.in
new file mode 100644
index 0000000..7c9f65f
--- /dev/null
+++ b/sysdeps/mips/rtld-ldscript.in
@@ -0,0 +1,106 @@
+OUTPUT_FORMAT("@@rtld-oformat@@")
+OUTPUT_ARCH(@@rtld-arch@@)
+ENTRY(@@rtld-entry@@)
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = @@rtld-base@@;
+ .reginfo : { *(.reginfo) }
+ .dynamic : { *(.dynamic) }
+ .dynstr : { *(.dynstr) }
+ .dynsym : { *(.dynsym) }
+ .hash : { *(.hash) }
+ .rel.text : { *(.rel.text) }
+ .rela.text : { *(.rela.text) }
+ .rel.data : { *(.rel.data) }
+ .rela.data : { *(.rela.data) }
+ .rel.rodata : { *(.rel.rodata) }
+ .rela.rodata : { *(.rela.rodata) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.init : { *(.rel.init) }
+ .rela.init : { *(.rela.init) }
+ .rel.fini : { *(.rel.fini) }
+ .rela.fini : { *(.rela.fini) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .rodata : { *(.rodata) }
+ .rodata1 : { *(.rodata1) }
+ .init : { *(.init) } =0
+ .text :
+ {
+ *(.text)
+ *(.stub)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ } =0
+ .fini : { *(.fini) } =0
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. It would
+ be more correct to do this:
+ . = 0x10000000;
+ The current expression does not correctly handle the case of a
+ text segment ending precisely at the end of a page; it causes the
+ data segment to skip a page. The above expression does not have
+ this problem, but it will currently (2/95) cause BFD to allocate
+ a single segment, combining both text and data, for this case.
+ This will prevent the text segment from being shared among
+ multiple executions of the program; I think that is more
+ important than losing a page of the virtual address space (note
+ that no actual memory is lost; the page which is skipped can not
+ be referenced). */
+ . += 0x10000;
+ .data :
+ {
+ *(.data)
+ CONSTRUCTORS
+ }
+ .data1 : { *(.data1) }
+ .ctors : { *(.ctors) }
+ .dtors : { *(.dtors) }
+ _gp = ALIGN(16) + 0x7ff0;
+ .got :
+ {
+ *(.got.plt) *(.got)
+ }
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata : { *(.sdata) }
+ .lit8 : { *(.lit8) }
+ .lit4 : { *(.lit4) }
+ .sbss : { *(.sbss) *(.scommon) }
+ .bss :
+ {
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+ /* The normal linker scripts created by the binutils doesn't have the
+ symbols end and _end which breaks ld.so's dl-minimal.c. */
+ _end = . ;
+ PROVIDE (end = .);
+ /* These are needed for ELF backends which have not yet been
+ converted to the new style linker. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ /* DWARF debug sections.
+ Symbols in the .debug DWARF section are relative to the beginning of the
+ section so we begin .debug at 0. It's not clear yet what needs to happen
+ for the others. */
+ .debug 0 : { *(.debug) }
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ .line 0 : { *(.line) }
+ /* These must appear regardless of . */
+ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+ .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd4c4968c85a7123529145298f83adc5376d5ae3
commit bd4c4968c85a7123529145298f83adc5376d5ae3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jul 12 23:22:49 1997 +0000
Update for Linux/MIPS.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index ff7d371..cc7198b 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -24,6 +24,34 @@
#define ELF_MACHINE_NAME "MIPS"
#include <assert.h>
+#include <entry.h>
+
+#ifndef ENTRY_POINT
+#error ENTRY_POINT needs to be defined for MIPS.
+#endif
+
+#ifndef _RTLD_PROLOGUE
+#ifdef __STDC__
+#define _RTLD_PROLOGUE(entry) "\n\t.globl " #entry \
+ "\n\t.ent " #entry \
+ "\n\t" #entry ":\n\t"
+#else
+#define _RTLD_PROLOGUE(entry) "\n\t.globl entry\n\t.ent entry\n\t entry:\n\t"
+#endif
+#endif
+
+#ifndef _RTLD_EPILOGUE
+#ifdef __STDC__
+#define _RTLD_EPILOGUE(entry) "\t.end " #entry "\n"
+#else
+#define _RTLD_EPILOGUE(entry) "\t.end entry\n"
+#endif
+#endif
+
+/* I have no idea what I am doing. */
+#define ELF_MACHINE_RELOC_NOPLT -1
+#define elf_machine_lookup_noplt_p(type) (1)
+#define elf_machine_lookup_noexec_p(type) (0)
/* Translate a processor specific dynamic tag to the index
in l_info array. */
@@ -34,6 +62,18 @@
#define ELF_MACHINE_ALIGN_MASK 0xffff
#endif
+/*
+ * MIPS libraries are usually linked to a non-zero base address. We
+ * subtrace the base address from the address where we map the object
+ * to. This results in more efficient address space usage.
+ */
+#if 0
+#define MAP_BASE_ADDR(l) ((l)->l_info[DT_MIPS(BASE_ADDRESS)] ? \
+ (l)->l_info[DT_MIPS(BASE_ADDRESS)]->d_un.d_ptr : 0)
+#else
+#define MAP_BASE_ADDR(l) 0x5ffe0000
+#endif
+
/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
with the run-time address of the r_debug structure */
#define ELF_MACHINE_DEBUG_SETUP(l,r) \
@@ -43,7 +83,7 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
} while (0)
/* Return nonzero iff E_MACHINE is compatible with the running host. */
-static inline int
+static inline int __attribute__ ((unused))
elf_machine_matches_host (ElfW(Half) e_machine)
{
switch (e_machine)
@@ -56,6 +96,16 @@ elf_machine_matches_host (ElfW(Half) e_machine)
}
}
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
++ first element of the GOT. This must be inlined in a function which
++ uses global data. */
++static inline ElfW(Addr)
++elf_machine_dynamic (void)
++{
++ register ElfW(Addr) gp asm ("$28");
++ return * (ElfW(Addr) *) (gp - 0x7ff0);
++}
++
static inline ElfW(Addr) *
elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
{
@@ -75,6 +125,16 @@ elf_machine_got (void)
}
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
+{
+ register ElfW(Addr) gp asm ("$28");
+ return * (ElfW(Addr) *) (gp - 0x7ff0);
+}
+
/* Return the run-time load address of the shared object. */
static inline ElfW(Addr)
elf_machine_load_address (void)
@@ -87,7 +147,9 @@ elf_machine_load_address (void)
" nop\n"
"here: dsubu %0, $31, %0\n"
" .set reorder\n"
- : "=r" (addr));
+ : "=r" (addr)
+ : /* No inputs */
+ : "$31");
#else
asm (" .set noreorder\n"
" la %0, here\n"
@@ -95,7 +157,9 @@ elf_machine_load_address (void)
" nop\n"
"here: subu %0, $31, %0\n"
" .set reorder\n"
- : "=r" (addr));
+ : "=r" (addr)
+ : /* No inputs */
+ : "$31");
#endif
return addr;
}
@@ -105,7 +169,7 @@ elf_machine_load_address (void)
/* Relocate GOT. */
static inline void
-elf_machine_got_rel (struct link_map *map)
+elf_machine_got_rel (struct link_map *map, int lazy)
{
ElfW(Addr) *got;
ElfW(Sym) *sym;
@@ -119,7 +183,7 @@ elf_machine_got_rel (struct link_map *map)
const ElfW(Sym) *ref = sym; \
ElfW(Addr) sym_loadaddr; \
sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \
- map->l_name, DL_LOOKUP_NOPLT); \
+ map->l_name, ELF_MACHINE_RELOC_NOPLT);\
(ref)? sym_loadaddr + ref->st_value: 0; \
})
@@ -151,7 +215,7 @@ elf_machine_got_rel (struct link_map *map)
{
if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
{
- if (sym->st_value /* && maybe_stub (sym->st_value) */)
+ if (sym->st_value && lazy)
*got = sym->st_value + map->l_addr;
else
*got = RESOLVE_GOTSYM (sym);
@@ -163,7 +227,7 @@ elf_machine_got_rel (struct link_map *map)
*got = RESOLVE_GOTSYM (sym);
else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
&& *got != sym->st_value
- /* && maybe_stub (*got) */)
+ && lazy)
*got += map->l_addr;
else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
{
@@ -193,6 +257,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
extern void _dl_runtime_resolve (ElfW(Word));
extern int _dl_mips_gnu_objects;
+#ifdef RTLD_BOOTSTRAP
+ {
+ return lazy;
+ }
+#endif
if (lazy)
{
/* The GOT entries for functions have not yet been filled in.
@@ -216,7 +285,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
}
/* Relocate global offset table. */
- elf_machine_got_rel (l);
+ elf_machine_got_rel (l, lazy);
return lazy;
}
@@ -282,6 +351,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
}
_dl_signal_error (0, NULL, "cannot find runtime link map");
+ return NULL;
}
/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */
@@ -295,211 +365,220 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
to usual c arguments. */
#ifdef __mips64
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
- generated by the gnu linker. */\
-int _dl_mips_gnu_objects = 1;\
-\
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
+ generated by the gnu linker. */ \
+int _dl_mips_gnu_objects = 1; \
+ \
/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
-\
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word) sym_index,\
- ElfW(Word) return_address,\
- ElfW(Addr) old_gpreg,\
- ElfW(Addr) stub_pc)\
-{\
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\
- const ElfW(Sym) *const symtab\
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\
- const char *strtab\
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\
- const ElfW(Addr) *got\
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\
- const ElfW(Word) local_gotno\
- = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\
- const ElfW(Word) gotsym\
- = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\
- const ElfW(Sym) *definer;\
- ElfW(Addr) loadbase;\
- ElfW(Addr) funcaddr;\
- struct link_map **scope;\
-\
- /* Look up the symbol's run-time value. */\
- scope = _dl_object_relocation_scope (l);\
- definer = &symtab[sym_index];\
-\
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\
- scope, l->l_name, DL_LOOKUP_NOPLT);\
-\
- *_dl_global_scope_end = NULL;\
-\
- /* Apply the relocation with that value. */\
- funcaddr = loadbase + definer->st_value;\
- *(got + local_gotno + sym_index - gotsym) = funcaddr;\
-\
- return funcaddr;\
-}\
-\
-asm ("\n\
- .text\n\
- .align 3\n\
- .globl _dl_runtime_resolve\n\
- .type _dl_runtime_resolve,@function\n\
- .ent _dl_runtime_resolve\n\
-_dl_runtime_resolve:\n\
- .set noreorder\n\
- # Save old GP to $3.\n\
- move $3,$28\n\
- # Modify t9 ($25) so as to point .cpload instruction.\n\
- daddu $25,2*8\n\
- # Compute GP.\n\
- .cpload $25\n\
- .set reorder\n\
- # Save slot call pc.\n\
- move $2, $31\n\
- # Save arguments and sp value in stack.\n\
- dsubu $29, 10*8\n\
- .cprestore 8*8\n\
- sd $15, 9*8($29)\n\
- sd $4, 3*8($29)\n\
- sd $5, 4*8($29)\n\
- sd $6, 5*8($29)\n\
- sd $7, 6*8($29)\n\
- sd $16, 7*8($29)\n\
- move $16, $29\n\
- move $4, $24\n\
- move $5, $15\n\
- move $6, $3\n\
- move $7, $2\n\
- jal __dl_runtime_resolve\n\
- move $29, $16\n\
- ld $31, 9*8($29)\n\
- ld $4, 3*8($29)\n\
- ld $5, 4*8($29)\n\
- ld $6, 5*8($29)\n\
- ld $7, 6*8($29)\n\
- ld $16, 7*8($29)\n\
- daddu $29, 10*8\n\
- move $25, $2\n\
- jr $25\n\
- .end _dl_runtime_resolve\n\
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
+ __attribute__ ((unused)); \
+ \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word) sym_index, \
+ ElfW(Word) return_address, \
+ ElfW(Addr) old_gpreg, \
+ ElfW(Addr) stub_pc) \
+{ \
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
+ const ElfW(Sym) *const symtab \
+ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
+ const char *strtab \
+ = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ const ElfW(Addr) *got \
+ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ const ElfW(Word) local_gotno \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
+ const ElfW(Word) gotsym \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
+ const ElfW(Sym) *definer; \
+ ElfW(Addr) loadbase; \
+ ElfW(Addr) funcaddr; \
+ struct link_map **scope; \
+ \
+ /* Look up the symbol's run-time value. */ \
+ scope = _dl_object_relocation_scope (l); \
+ definer = &symtab[sym_index]; \
+ \
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
+ scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
+ \
+ *_dl_global_scope_end = NULL; \
+ \
+ /* Apply the relocation with that value. */ \
+ funcaddr = loadbase + definer->st_value; \
+ *(got + local_gotno + sym_index - gotsym) = funcaddr; \
+ \
+ return funcaddr; \
+} \
+ \
+asm ("\n \
+ .text\n \
+ .align 3\n \
+ .globl _dl_runtime_resolve\n \
+ .type _dl_runtime_resolve,@function\n \
+ .ent _dl_runtime_resolve\n \
+_dl_runtime_resolve:\n \
+ .set noreorder\n \
+ # Save old GP to $3.\n \
+ move $3,$28\n \
+ # Modify t9 ($25) so as to point .cpload instruction.\n \
+ daddu $25,2*8\n \
+ # Compute GP.\n \
+ .cpload $25\n \
+ .set reorder\n \
+ # Save slot call pc.\n \
+ move $2, $31\n \
+ # Save arguments and sp value in stack.\n \
+ dsubu $29, 10*8\n \
+ .cprestore 8*8\n \
+ sd $15, 9*8($29)\n \
+ sd $4, 3*8($29)\n \
+ sd $5, 4*8($29)\n \
+ sd $6, 5*8($29)\n \
+ sd $7, 6*8($29)\n \
+ sd $16, 7*8($29)\n \
+ move $16, $29\n \
+ move $4, $24\n \
+ move $5, $15\n \
+ move $6, $3\n \
+ move $7, $2\n \
+ jal __dl_runtime_resolve\n \
+ move $29, $16\n \
+ ld $31, 9*8($29)\n \
+ ld $4, 3*8($29)\n \
+ ld $5, 4*8($29)\n \
+ ld $6, 5*8($29)\n \
+ ld $7, 6*8($29)\n \
+ ld $16, 7*8($29)\n \
+ daddu $29, 10*8\n \
+ move $25, $2\n \
+ jr $25\n \
+ .end _dl_runtime_resolve\n \
");
#else
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
-/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
- generated by the gnu linker. */\
-int _dl_mips_gnu_objects = 1;\
-\
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
+ generated by the gnu linker. */ \
+int _dl_mips_gnu_objects = 1; \
+ \
/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
- __attribute__ ((unused)); \
-\
-static ElfW(Addr) \
-__dl_runtime_resolve (ElfW(Word) sym_index,\
- ElfW(Word) return_address,\
- ElfW(Addr) old_gpreg,\
- ElfW(Addr) stub_pc)\
-{\
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\
- const ElfW(Sym) *const symtab\
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\
- const char *strtab\
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\
- const ElfW(Addr) *got\
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\
- const ElfW(Word) local_gotno\
- = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\
- const ElfW(Word) gotsym\
- = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\
- const ElfW(Sym) *definer;\
- ElfW(Addr) loadbase;\
- ElfW(Addr) funcaddr;\
- struct link_map **scope;\
-\
- /* Look up the symbol's run-time value. */\
- scope = _dl_object_relocation_scope (l);\
- definer = &symtab[sym_index];\
-\
- loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\
- scope, l->l_name, DL_LOOKUP_NOPLT);\
-\
- *_dl_global_scope_end = NULL;\
-\
- /* Apply the relocation with that value. */\
- funcaddr = loadbase + definer->st_value;\
- *(got + local_gotno + sym_index - gotsym) = funcaddr;\
-\
- return funcaddr;\
-}\
-\
-asm ("\n\
- .text\n\
- .align 2\n\
- .globl _dl_runtime_resolve\n\
- .type _dl_runtime_resolve,@function\n\
- .ent _dl_runtime_resolve\n\
-_dl_runtime_resolve:\n\
- .set noreorder\n\
- # Save old GP to $3.\n\
- move $3,$28\n\
- # Modify t9 ($25) so as to point .cpload instruction.\n\
- addu $25,8\n\
- # Compute GP.\n\
- .cpload $25\n\
- .set reorder\n\
- # Save slot call pc.\n\
- move $2, $31\n\
- # Save arguments and sp value in stack.\n\
- subu $29, 40\n\
- .cprestore 32\n\
- sw $15, 36($29)\n\
- sw $4, 12($29)\n\
- sw $5, 16($29)\n\
- sw $6, 20($29)\n\
- sw $7, 24($29)\n\
- sw $16, 28($29)\n\
- move $16, $29\n\
- move $4, $24\n\
- move $5, $15\n\
- move $6, $3\n\
- move $7, $2\n\
- jal __dl_runtime_resolve\n\
- move $29, $16\n\
- lw $31, 36($29)\n\
- lw $4, 12($29)\n\
- lw $5, 16($29)\n\
- lw $6, 20($29)\n\
- lw $7, 24($29)\n\
- lw $16, 28($29)\n\
- addu $29, 40\n\
- move $25, $2\n\
- jr $25\n\
- .end _dl_runtime_resolve\n\
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
+ __attribute__ ((unused)); \
+ \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word) sym_index, \
+ ElfW(Word) return_address, \
+ ElfW(Addr) old_gpreg, \
+ ElfW(Addr) stub_pc) \
+{ \
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
+ const ElfW(Sym) *const symtab \
+ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
+ const char *strtab \
+ = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ const ElfW(Addr) *got \
+ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ const ElfW(Word) local_gotno \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
+ const ElfW(Word) gotsym \
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \
+ const ElfW(Sym) *definer; \
+ ElfW(Addr) loadbase; \
+ ElfW(Addr) funcaddr; \
+ struct link_map **scope; \
+ \
+ /* Look up the symbol's run-time value. */ \
+ scope = _dl_object_relocation_scope (l); \
+ definer = &symtab[sym_index]; \
+ \
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \
+ scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \
+ \
+ *_dl_global_scope_end = NULL; \
+ \
+ /* Apply the relocation with that value. */ \
+ funcaddr = loadbase + definer->st_value; \
+ *(got + local_gotno + sym_index - gotsym) = funcaddr; \
+ \
+ return funcaddr; \
+} \
+ \
+asm ("\n \
+ .text\n \
+ .align 2\n \
+ .globl _dl_runtime_resolve\n \
+ .type _dl_runtime_resolve,@function\n \
+ .ent _dl_runtime_resolve\n \
+_dl_runtime_resolve:\n \
+ .set noreorder\n \
+ # Save slot call pc.\n \
+ move $3, $31\n \
+ # Modify t9 ($25) so as to point .cpload instruction.\n \
+ addu $25,8\n \
+ # Compute GP.\n \
+ .cpload $25\n \
+ .set reorder\n \
+ # Save slot call pc.\n \
+ move $2, $31\n \
+ # Save arguments and sp value in stack.\n \
+ subu $29, 40\n \
+ .cprestore 32\n \
+ sw $15, 36($29)\n \
+ sw $4, 12($29)\n \
+ sw $5, 16($29)\n \
+ sw $6, 20($29)\n \
+ sw $7, 24($29)\n \
+ sw $16, 28($29)\n \
+ move $16, $29\n \
+ move $4, $24\n \
+ move $5, $15\n \
+ move $6, $3\n \
+ move $7, $2\n \
+ jal __dl_runtime_resolve\n \
+ move $29, $16\n \
+ lw $31, 36($29)\n \
+ lw $4, 12($29)\n \
+ lw $5, 16($29)\n \
+ lw $6, 20($29)\n \
+ lw $7, 24($29)\n \
+ lw $16, 28($29)\n \
+ addu $29, 40\n \
+ move $25, $2\n \
+ jr $25\n \
+ .end _dl_runtime_resolve\n \
");
#endif
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
-#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
- its return value is the user program's entry point. */
+ its return value is the user program's entry point.
+ Note how we have to be careful about two things:
+
+ 1) That we allocate a minimal stack of 24 bytes for
+ every function call, the MIPS ABI states that even
+ if all arguments are passed in registers the procedure
+ called can use the 16 byte area pointed to by $sp
+ when it is called to store away the arguments passed
+ to it.
+
+ 2) That under Linux the entry is named __start
+ and not just plain _start. */
#ifdef __mips64
#define RTLD_START asm ("\
.text\n\
- .align 3\n\
- .globl _start\n\
- .globl _dl_start_user\n\
- .ent _start\n\
-_start:\n\
+ .align 3\n"\
+_RTLD_PROLOGUE (ENTRY_POINT)\
+" .globl _dl_start_user\n\
.set noreorder\n\
bltzal $0, 0f\n\
nop\n\
@@ -561,16 +640,15 @@ _dl_start_user:\n\
ld $5, 1*8($29)\n\
ld $6, 2*8$29)\n\
ld $7, 3*8($29)\n\
- jr $25\n\
- .end _start\n\
-");
+ jr $25\n"\
+_RTLD_EPILOGUE(ENTRY_POINT) \
+);
+
#else
#define RTLD_START asm ("\
- .text\n\
- .globl _start\n\
- .globl _dl_start_user\n\
- .ent _start\n\
-_start:\n\
+ .text\n"\
+_RTLD_PROLOGUE(ENTRY_POINT)\
+" .globl _dl_start_user\n\
.set noreorder\n\
bltzal $0, 0f\n\
nop\n\
@@ -582,7 +660,9 @@ _start:\n\
la $4, _DYNAMIC\n\
sw $4, -0x7ff0($28)\n\
move $4, $29\n\
+ subu $29, 16\n\
jal _dl_start\n\
+ addiu $29, 16\n\
# Get the value of label '_dl_start_user' in t9 ($25).\n\
la $25, _dl_start_user\n\
_dl_start_user:\n\
@@ -610,7 +690,9 @@ _dl_start_user:\n\
lw $4, 8($2)\n\
# Call _dl_init_next to return the address of an initializer\n\
# function to run.\n\
+ subu $29, 16\n\
jal _dl_init_next\n\
+ addiu $29, 16\n\
move $28, $16\n\
# Check for zero return, when out of initializers.\n\
beq $2, $0, 2f\n\
@@ -624,16 +706,18 @@ _dl_start_user:\n\
move $28, $16\n\
# Loop to call _dl_init_next for the next initializer.\n\
b 1b\n\
+2: # Clear the startup flag. Assumes 32 bit ints.\n\
+ sw $0, _dl_starting_up\n\
# Pass our finalizer function to the user in ra.\n\
-2: la $31, _dl_fini\n\
+ la $31, _dl_fini\n\
# Jump to the user entry point.\n\
move $25, $17\n\
lw $4, 0($29)\n\
lw $5, 4($29)\n\
lw $6, 8($29)\n\
lw $7, 12($29)\n\
- jr $25\n\
- .end _start\n\
+ jr $25\n"\
+_RTLD_EPILOGUE(ENTRY_POINT)\
");
#endif
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
index 36e05a4..e271ae1 100644
--- a/sysdeps/mips/fpu_control.h
+++ b/sysdeps/mips/fpu_control.h
@@ -1,7 +1,7 @@
/* FPU control word bits. Mips version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Olaf Flebbe.
+ Contributed by Olaf Flebbe and Ralf Baechle.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -21,74 +21,84 @@
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
-/* FP control/status register bit assignments.
+/* MIPS FPU floating point control register bits.
*
- * 31-25 24 23 22-18 17-12 11-7 6-2 1-0
- * (cause) (enables) (flags)
- * | reserved | FS | C | reserved | E V Z O U I | V Z O U I | V Z O U I | RM
+ * 31-25 -> floating point conditions code bits 7-1. These bits are only
+ * available in MIPS IV.
+ * 24 -> flush denormalized results to zero instead of
+ * causing unimplemented operation exception. This bit is only
+ * available for MIPS III and newer.
+ * 23 -> Condition bit
+ * 22-18 -> reserved (read as 0, write with 0)
+ * 17 -> cause bit for unimplemented operation
+ * 16 -> cause bit for invalid exception
+ * 15 -> cause bit for division by zero exception
+ * 14 -> cause bit for overflow exception
+ * 13 -> cause bit for underflow exception
+ * 12 -> cause bit for inexact exception
+ * 11 -> enable exception for invalid exception
+ * 10 -> enable exception for division by zero exception
+ * 9 -> enable exception for overflow exception
+ * 8 -> enable exception for underflow exception
+ * 7 -> enable exception for inexact exception
+ * 6 -> flag invalid exception
+ * 5 -> flag division by zero exception
+ * 4 -> flag overflow exception
+ * 3 -> flag underflow exception
+ * 2 -> flag inexact exception
+ * 1-0 -> rounding control
*
- * FS: When set, denormalized results are flushed to zero instead of
- * causing an unimplemented operation exception.
- * C: Condition bit.
- * E: Unimplemented Operation.
- * V: Invalid Operation.
- * Z: Division by zero.
- * O: Overflow.
- * U: Underflow.
- * I: Inexact Operation
- * RM: Rounding mode bits
- * 00 (RN) - rounding to nearest
- * 01 (RZ) - rounding toward zero
- * 10 (RP) - rounding down (toward - infinity)
- * 11 (RM) - rounding up (toward + infinity)
*
+ * Rounding Control:
+ * 00 - rounding to nearest (RN)
+ * 01 - rounding toward zero (RZ)
+ * 01 - rounding (up) toward plus infinity (RP)
+ * 11 - rounding (down)toward minus infinity (RM)
*/
#include <features.h>
/* masking of interrupts */
-#define _FPU_MASK_IM (1 << 11)
-#define _FPU_MASK_DM (1 << 24) /* XXX */
-#define _FPU_MASK_ZM (1 << 10)
-#define _FPU_MASK_OM (1 << 9)
-#define _FPU_MASK_UM (1 << 8)
-#define _FPU_MASK_PM (1 << 7)
-
-/* precision control */
-#define _FPU_EXTENDED 0
-#define _FPU_DOUBLE 0
-#define _FPU_SINGLE 0
+#define _FPU_MASK_V 0x0800 /* Invalid operation */
+#define _FPU_MASK_Z 0x0400 /* Division by zero */
+#define _FPU_MASK_O 0x0200 /* Overflow */
+#define _FPU_MASK_U 0x0100 /* Underflow */
+#define _FPU_MASK_I 0x0080 /* Inexact operation */
+
+/* flush denormalized numbers to zero */
+#define _FPU_FLUSH_TZ 0x1000000
/* rounding control */
-#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
-#define _FPU_RC_DOWN 0x2
-#define _FPU_RC_UP 0x3
+#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
#define _FPU_RC_ZERO 0x1
+#define _FPU_RC_UP 0x2
+#define _FPU_RC_DOWN 0x3
-#define _FPU_RESERVED 0xfe7c0000 /* Reserved bits */
+#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
/* The fdlibm code requires strict IEEE double precision arithmetic,
and no interrupts for exceptions, rounding to nearest. */
-#define _FPU_DEFAULT 0x0
+#define _FPU_DEFAULT 0x00000600
/* IEEE: same as above, but exceptions */
-#define _FPU_IEEE (0x1f << 7)
+#define _FPU_IEEE 0x00000F80
/* Type of the control word. */
-typedef unsigned int fpu_control_t;
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ ("cfc1 %0, $31; nop; nop" : "=r" (cw))
-#define _FPU_SETCW(cw) __asm__ ("ctc1 %0, $31; nop; nop" : : "r" (cw))
+#define _FPU_GETCW(cw) __asm__ ("cfc1 %0,$31" : "=r" (cw) : )
+#define _FPU_SETCW(cw) __asm__ ("ctc1 %0,$31" : : "r" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
__BEGIN_DECLS
-/* Called at startup. It can be used to manipulate fpu control register. */
+/* Called at startup. It can be used to manipulate the fpu control
+ register. */
extern void __setfpucw __P ((fpu_control_t));
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6cabe500f345f45b30e8ea04976954d689280b05
commit 6cabe500f345f45b30e8ea04976954d689280b05
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 11 01:13:24 1997 +0000
(fesetenv): Shift the exception mask in the right position.
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
index f6611a2..8b4d6b0 100644
--- a/sysdeps/m68k/fpu/fesetenv.c
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -32,15 +32,15 @@ fesetenv (const fenv_t *envp)
__asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp));
temp.status_register &= ~FE_ALL_EXCEPT;
- temp.control_register &= ~((FE_ALL_EXCEPT << 5) | FE_UPWARD);
+ temp.control_register &= ~((FE_ALL_EXCEPT << 6) | FE_UPWARD);
if (envp == FE_DFL_ENV)
;
else if (envp == FE_NOMASK_ENV)
- temp.control_register |= FE_ALL_EXCEPT << 5;
+ temp.control_register |= FE_ALL_EXCEPT << 6;
else
{
temp.control_register |= (envp->control_register
- & ((FE_ALL_EXCEPT << 5) | FE_UPWARD));
+ & ((FE_ALL_EXCEPT << 6) | FE_UPWARD));
temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=07ce00df82813cf2410f30f816a71aa497f688bf
commit 07ce00df82813cf2410f30f816a71aa497f688bf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 11 01:13:11 1997 +0000
Shift the exception mask in the right position.
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
index 351fa8a..d8e2d8a 100644
--- a/sysdeps/m68k/fpu/feholdexcpt.c
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -32,7 +32,7 @@ feholdexcept (fenv_t *envp)
fpsr = envp->status_register & ~FE_ALL_EXCEPT;
__asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
/* And set all exceptions to non-stop. */
- fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 5);
+ fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 6);
__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
return 1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26a96aaeb4bf4bd83de303caae65a9bd63d35b6e
commit 26a96aaeb4bf4bd83de303caae65a9bd63d35b6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 11 01:12:46 1997 +0000
Remove DEFS.h.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 022fa03..581022f 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1,5 +1,4 @@
setjmp_aux.c
-DEFS.h
divrem.h
divl.S divq.S reml.S remq.S
_mcount.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44efbfff52550afeffc69a0022adb2f8942a2ddd
commit 44efbfff52550afeffc69a0022adb2f8942a2ddd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jul 11 01:12:37 1997 +0000
Not needed anymore.
diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h
deleted file mode 100644
index c2a4fc8..0000000
--- a/sysdeps/alpha/DEFS.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifdef __STDC__
-#define FUNC__(name) \
- .align 3; \
- .globl __##name; \
- .ent __##name; \
- __##name: \
- lda sp, -16(sp); \
- .frame sp, 16, t9, 0; \
- .prologue 0
-#else
-#define FUNC__(name) \
- .align 3; \
- .globl __/**/name; \
- .ent __/**/name,0; \
- __/**/name: \
- lda sp, -16(sp); \
- .frame sp, 16, t9, 0; \
- .prologue 0
-#endif
-
-#ifdef __STDC__
-#define NAME__(name) \
- __##name
-#else
-#define NAME__(name) \
- __/**/name
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ed178b7ac8e6b6b76f7eeafa9c7ff18bed0ddc12
commit ed178b7ac8e6b6b76f7eeafa9c7ff18bed0ddc12
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 6 21:52:39 1997 +0000
Update copyright.
diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld
index 056da10..09252cc 100644
--- a/sysdeps/standalone/i386/force_cpu386/target.ld
+++ b/sysdeps/standalone/i386/force_cpu386/target.ld
@@ -1,28 +1,27 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This file contains directives for the GNU linker which are specific
to the FORCE CPU386 board. */
-MEMORY
+MEMORY
{
ram : org = 0x0, l = 1M
}
@@ -34,19 +33,19 @@ heap_size = 0x20000;
SECTIONS
{
- .text 0x0 :
+ .text 0x0 :
{
_text_start = ABSOLUTE(.) ;
*(.text)
_etext = ALIGN( 0x10 ) ;
}
- .data ADDR( .text ) + SIZEOF( .text ):
+ .data ADDR( .text ) + SIZEOF( .text ):
{
_data_start = . ;
*(.data)
_edata = ALIGN( 0x10 ) ;
}
- .bss ADDR( .data ) + SIZEOF( .data ):
+ .bss ADDR( .data ) + SIZEOF( .data ):
{
_bss_start = . ;
*(.bss)
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
index 0f68330..e25492a 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
+++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
@@ -1,28 +1,27 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This file contains directives for the GNU linker which are specific
to the Motorola MVME136/MVME135 boards. */
-MEMORY
+MEMORY
{
ram : org = 0x3000, l = 1M
}
@@ -34,21 +33,21 @@ heap_size = 0x20000;
SECTIONS
{
- .text 0x3000 :
+ .text 0x3000 :
{
text_start = ABSOLUTE(.) ;
*(.text)
etext = ALIGN( 0x10 ) ;
- }
+ }
- .data ADDR( .text ) + SIZEOF( .text ):
+ .data ADDR( .text ) + SIZEOF( .text ):
{
data_start = . ;
*(.data)
edata = ALIGN( 0x10 ) ;
}
- .bss ADDR( .data ) + SIZEOF( .data ):
+ .bss ADDR( .data ) + SIZEOF( .data ):
{
bss_start = . ;
_bss_start = . ;
@@ -58,5 +57,5 @@ SECTIONS
. += 0x20000;
end = . ;
_end = . ;
- }
+ }
}
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index 9d711cb..43a80c1 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -1,21 +1,22 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <setjmp.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25fd8251b34ff6dfba2450fe1452738bfb188404
commit 25fd8251b34ff6dfba2450fe1452738bfb188404
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 6 21:52:07 1997 +0000
Rename sys/kernel_termios.h to kernel_termios.h.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 80fca49..1b1f771 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -5,7 +5,7 @@ init-first.h
clone.S
kernel_sigaction.h
kernel_stat.h
+kernel_termios.h
sys/io.h
sys/acct.h
-sys/kernel_termios.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a906f96b30146e99d3fd27994c9cc61673c70628
commit a906f96b30146e99d3fd27994c9cc61673c70628
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 6 21:50:34 1997 +0000
Additional MIPS64 related files to distribute.
diff --git a/sysdeps/mips/mips64/Dist b/sysdeps/mips/mips64/Dist
new file mode 100644
index 0000000..ad6ea03
--- /dev/null
+++ b/sysdeps/mips/mips64/Dist
@@ -0,0 +1 @@
+setjmp_aux.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c49416b519d6bf2a2236b038fd7c571a811e0382
commit c49416b519d6bf2a2236b038fd7c571a811e0382
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jul 6 21:45:05 1997 +0000
Correct the FE_INEXACT and FE_UNDERFLOW cases.
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index 51411dd..d509604 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -48,15 +48,43 @@ feraiseexcept (int excepts)
/* Next: overflow. */
if (excepts & FE_OVERFLOW)
{
+ /* We cannot raise the overflow exception without also setting the
+ inexact flag. Restore it after the operation, unless it should
+ be set anyway. */
long double d = LDBL_MAX;
- __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d));
+ fexcept_t fpsr;
+
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+ __asm__ __volatile__ ("fmul%.x %0,%0" : "=f" (d) : "0" (d));
+ if (!((excepts | fpsr) & FE_INEXACT))
+ {
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+ fpsr &= ~FE_INEXACT;
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+ }
+ else
+ __asm__ ("fnop");
}
/* Next: underflow. */
if (excepts & FE_UNDERFLOW)
{
- long double d = LDBL_MIN;
- __asm__ __volatile__ ("fdiv%.s %#0r16,%0; fnop" : "=f" (d) : "0" (d));
+ /* We cannot raise the underflow exception without also setting the
+ inexact flag. Restore it after the operation, unless it should
+ be set anyway. */
+ long double d = -LDBL_MAX;
+ fexcept_t fpsr;
+
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+ __asm__ __volatile__ ("fetox%.x %0" : "=f" (d) : "0" (d));
+ if (!((excepts | fpsr) & FE_INEXACT))
+ {
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+ fpsr &= ~FE_INEXACT;
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+ }
+ else
+ __asm__ ("fnop");
}
/* Last: inexact. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=184e1d450b9589e4a41e08cea0d2bd2bb9f03133
commit 184e1d450b9589e4a41e08cea0d2bd2bb9f03133
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 27 23:09:10 1997 +0000
Add ENOTDIR.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
index 8090a80..49a4998 100644
--- a/sysdeps/standalone/arm/bits/errno.h
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -47,6 +47,7 @@
#define EPROTOTYPE 19
#define ESRCH 20
#define EPERM 21
+#define ENOTDIR 22
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=82f936a4101662484b52a4650a2c68e627c4c871
commit 82f936a4101662484b52a4650a2c68e627c4c871
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 27 23:09:04 1997 +0000
(__NONE_set_memvals): Correct typo.
diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c
index 5985b30..6ee9935 100644
--- a/sysdeps/standalone/brk.c
+++ b/sysdeps/standalone/brk.c
@@ -46,8 +46,10 @@ int __C_heap_size;
static
#endif
void
-__NONE_set_memvals (argc, argv, envp),
- int argc; char **argv; char **envp;
+__NONE_set_memvals (argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
{
__rorig =
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3bbe33611e9a92ab416cb62d0bf0bf6d31c2b1f6
commit 3bbe33611e9a92ab416cb62d0bf0bf6d31c2b1f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 27 23:07:33 1997 +0000
m68k specific NaN definitions.
diff --git a/sysdeps/m68k/bits/nan.h b/sysdeps/m68k/bits/nan.h
new file mode 100644
index 0000000..b4efddf
--- /dev/null
+++ b/sysdeps/m68k/bits/nan.h
@@ -0,0 +1,59 @@
+/* `NAN' constants for m68k.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _NAN_H
+
+#define _NAN_H 1
+
+/* IEEE Not A Number. */
+
+#ifdef __GNUC__
+
+#define NAN \
+ (__extension__ \
+ ((union { unsigned long long __l; double __d; }) \
+ { __l: 0x7fffffffffffffffULL }).__d)
+
+#define NANF \
+ (__extension__ \
+ ((union { unsigned long __l; float __f; }) \
+ { __l: 0x7fffffffUL }).__f)
+
+#define NANL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld)
+
+#else
+
+static union { unsigned char __c[8]; double __d; } __nan =
+ { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
+#define NAN (__nan.__d)
+
+static union { unsigned char __c[4]; float __f; } __nanf =
+ { { 0x7f, 0xff, 0xff, 0xff } };
+#define NANF (__nanf.__f)
+
+static union { unsigned char __c[12]; long double __ld; } __nanl =
+ { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
+#define NANL (__nanl.__ld)
+
+#endif /* GCC. */
+
+#endif /* nan.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc83bd9d03f43c2d19697cc3cd4fe687e78fcf30
commit fc83bd9d03f43c2d19697cc3cd4fe687e78fcf30
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jun 27 23:07:23 1997 +0000
Moved to bits/.
diff --git a/sysdeps/m68k/nan.h b/sysdeps/m68k/nan.h
deleted file mode 100644
index b4efddf..0000000
--- a/sysdeps/m68k/nan.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* `NAN' constants for m68k.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _NAN_H
-
-#define _NAN_H 1
-
-/* IEEE Not A Number. */
-
-#ifdef __GNUC__
-
-#define NAN \
- (__extension__ \
- ((union { unsigned long long __l; double __d; }) \
- { __l: 0x7fffffffffffffffULL }).__d)
-
-#define NANF \
- (__extension__ \
- ((union { unsigned long __l; float __f; }) \
- { __l: 0x7fffffffUL }).__f)
-
-#define NANL \
- (__extension__ \
- ((union { unsigned long __l[3]; long double __ld; }) \
- { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld)
-
-#else
-
-static union { unsigned char __c[8]; double __d; } __nan =
- { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
-#define NAN (__nan.__d)
-
-static union { unsigned char __c[4]; float __f; } __nanf =
- { { 0x7f, 0xff, 0xff, 0xff } };
-#define NANF (__nanf.__f)
-
-static union { unsigned char __c[12]; long double __ld; } __nanl =
- { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
-#define NANL (__nanl.__ld)
-
-#endif /* GCC. */
-
-#endif /* nan.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca50e0187a6e0018af1264e481c5f2b7791dd020
commit ca50e0187a6e0018af1264e481c5f2b7791dd020
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:19:58 1997 +0000
Adapated for change of s_ilogb.c.
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c
index c0c2ffd..4031c42 100644
--- a/sysdeps/m68k/fpu/s_ilogbf.c
+++ b/sysdeps/m68k/fpu/s_ilogbf.c
@@ -1,3 +1,3 @@
-#define FUNC ilogbf
+#define SUFF f
#define float_type float
#include <s_ilogb.c>
diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c
index c3554d5..9c55a11 100644
--- a/sysdeps/m68k/fpu/s_ilogbl.c
+++ b/sysdeps/m68k/fpu/s_ilogbl.c
@@ -1,3 +1,3 @@
-#define FUNC ilogbl
+#define SUFF l
#define float_type long double
#include <s_ilogb.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3fe409285e0f90cbe5a8e7e64c5239bdc4305ec8
commit 3fe409285e0f90cbe5a8e7e64c5239bdc4305ec8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:19:45 1997 +0000
Define it here. Handle zero, NaN and infinity specially.
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index a081a88..2d8f7d5 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -19,21 +19,33 @@
#define __LIBC_M81_MATH_INLINES
#include <math.h>
-#ifndef FUNC
-#define FUNC ilogb
+#ifndef SUFF
+#define SUFF
#endif
#ifndef float_type
#define float_type double
#endif
-#define __CONCATX(a,b) __CONCAT(a,b)
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
int
-__CONCATX(__,FUNC) (x)
- float_type x;
+s(__ilogb) (float_type x)
{
- return __m81_u(__CONCATX(__,FUNC))(x);
+ float_type result;
+ unsigned long x_cond;
+
+ x_cond = __m81_test (x);
+ /* We must return consistent values for zero and NaN. */
+ if (x_cond & __M81_COND_ZERO)
+ return FP_ILOGB0;
+ if (x_cond & (__M81_COND_NAN | __M81_COND_INF))
+ return FP_ILOGBNAN;
+
+ __asm ("fgetexp%.x %1, %0" : "=f" (result) : "f" (x));
+ return (int) result;
}
#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+weak_aliasx (s(__ilogb), s(ilogb))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb1efdeaa7f7b71c11d87bd08d6bb93ef4ebdb84
commit fb1efdeaa7f7b71c11d87bd08d6bb93ef4ebdb84
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:19:23 1997 +0000
Update copyright.
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
index 1b622d6..6c7cd4b 100644
--- a/sysdeps/m68k/elf/start.S
+++ b/sysdeps/m68k/elf/start.S
@@ -1,33 +1,33 @@
/* Startup code compliant to the ELF m68k ABI.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This is the canonical entry point, usually the first thing in the text
segment. The SVR4/m68k ABI says that when the entry point runs,
most registers' values are unspecified, except for:
%a1 Contains a function pointer to be registered with `atexit'.
- This is how the dynamic linker arranges to have DT_FINI
+ This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
%sp The stack contains the arguments and environment:
- 0(%sp) argc
+ 0(%sp) argc
4(%sp) argv[0]
...
(4*argc)(%sp) NULL
@@ -36,7 +36,7 @@ Cambridge, MA 02139, USA. */
NULL
*/
- .text
+ .text
.globl _start
_start:
/* Clear the frame pointer. The ABI suggests this be done, to mark
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8be9676b252f34544b2c21b7bb691832255da139
commit 8be9676b252f34544b2c21b7bb691832255da139
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:19:12 1997 +0000
(FP_ILOGB0): Correct value.
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 4eaa58a..c2b4eff 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -36,5 +36,5 @@ typedef long double double_t; /* `double' expressions are evaluated as
#define INFINITY HUGE_VALL
/* The values returned by `ilogb' for 0 and NaN respectively. */
-#define FP_ILOGB0 0
+#define FP_ILOGB0 0x80000000
#define FP_ILOGBNAN 0x7fffffff
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e775757079a333e50ec0aa1e38bea9caae241f6e
commit e775757079a333e50ec0aa1e38bea9caae241f6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:19:04 1997 +0000
Don't undef macros for unordered comparison before definition.
Don't define __ilogb.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index 8899b75..79245c0 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -44,12 +44,12 @@
is the name of the fpu operation (without leading f). */
#if defined __USE_MISC || defined __USE_ISOC9X
-#define __inline_mathop(func, op) \
+# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
__inline_mathop1(long double, __CONCAT(func,l), op)
#else
-#define __inline_mathop(func, op) \
+# define __inline_mathop(func, op) \
__inline_mathop1(double, func, op)
#endif
@@ -257,17 +257,6 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
return (__fpsr >> 27) & 1; \
} \
\
-__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
-{ \
- float_type __result; \
- if (__m81_u(__CONCAT(__isnan,s)) (__x)) \
- /* The stupid standard requires us to return a specific value where \
- it would depend on the bitpattern of the NaN. */ \
- return 0x7fffffff; \
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- return (int) __result; \
-} \
- \
__m81_defun (float_type, __CONCAT(__scalbn,s), \
(float_type __x, long int __n)) \
{ \
@@ -341,7 +330,6 @@ __inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n))
#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
__inline_forward_c(int,isnan, (double __value), (__value))
#endif
-__inline_forward_c(int,ilogb, (double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(double,nearbyint, (double __value), (__value))
@@ -362,7 +350,6 @@ __inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
__inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
-__inline_forward_c(int,ilogbf, (float __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(float,nearbyintf, (float __value), (__value))
@@ -382,7 +369,6 @@ __inline_forward_c(int,finitel, (long double __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
-__inline_forward_c(int,ilogbl, (long double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
@@ -405,48 +391,42 @@ __inline_forward(void,sincosl,
m68k FPU supports this with special opcodes and we should use them.
These must not be inline functions since we have to be able to handle
all floating-point types. */
-#undef isgreater
-#define isgreater(x, y) \
+# define isgreater(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
-#undef isgreaterequal
-#define isgreaterequal(x, y) \
+# define isgreaterequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsoge %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
-#undef isless
-#define isless(x, y) \
+# define isless(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsolt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
-#undef islessequal
-#define islessequal(x, y) \
+# define islessequal(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsole %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
-#undef islessgreater
-#define islessgreater(x, y) \
+# define islessgreater(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsogl %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
-#undef isunordered
-#define isunordered(x, y) \
+# define isunordered(x, y) \
__extension__ \
({ char __result; \
__asm__ ("fcmp%.x %2,%1; fsun %0" \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db31c8639508fb94dcc207ede4e593e12e81576f
commit db31c8639508fb94dcc207ede4e593e12e81576f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:16:52 1997 +0000
Update and reformat copyright, remove trailing white spaces and send
through unexpand.
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index 6c4af3f..f4c234d 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -1,37 +1,37 @@
/* Machine-specific calling sequence for `mcount' profiling function. alpha
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-Contributed by David Mosberger (davidm@cs.arizona.edu).
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Assembly stub to invoke _mcount(). Compiler generated code calls
-this stub after executing a function's prologue and without saving any
-registers. It is therefore necessary to preserve a0..a5 as they may
-contain function arguments. To work correctly with frame- less
-functions, it is also necessary to preserve ra. Finally, division
-routines are invoked with a special calling convention and the
-compiler treats those calls as if they were instructions. In
-particular, it doesn't save any of the temporary registers (caller
-saved registers). It is therefore necessary to preserve all
-caller-saved registers as well
-
-Upon entering _mcount, register $at holds the return address and ra
-holds the return address of the function's caller (selfpc and frompc,
-respectively in gmon.c language...). */
+ this stub after executing a function's prologue and without saving any
+ registers. It is therefore necessary to preserve a0..a5 as they may
+ contain function arguments. To work correctly with frame- less
+ functions, it is also necessary to preserve ra. Finally, division
+ routines are invoked with a special calling convention and the
+ compiler treats those calls as if they were instructions. In
+ particular, it doesn't save any of the temporary registers (caller
+ saved registers). It is therefore necessary to preserve all
+ caller-saved registers as well
+
+ Upon entering _mcount, register $at holds the return address and ra
+ holds the return address of the function's caller (selfpc and frompc,
+ respectively in gmon.c language...). */
#include <sysdep.h>
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index dcd4eac..779cd25 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -1,27 +1,26 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* __bb_init_func is invoked at the beginning of each function, before
-any registers have been saved. It is therefore safe to use any
-caller-saved (call-used) registers (except for argument registers
-a1-a5). */
+ any registers have been saved. It is therefore safe to use any
+ caller-saved (call-used) registers (except for argument registers
+ a1-a5). */
#include <sysdep.h>
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index c614fc1..b70ade6 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Fill a block of memory with zeros. Optimized for the Alpha architecture:
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index c8b374a..a67a39a 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,21 +1,22 @@
/* Startup code for Alpha/ELF.
-Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
-Contributed by Richard Henderson <rth@tamu.edu>
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 959d104..23dff6e 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -1,30 +1,29 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Finds the first bit set in an integer. Optimized for the Alpha
-architecture. */
+ architecture. */
#include <sysdep.h>
- .set noreorder
- .set noat
+ .set noreorder
+ .set noat
ENTRY(ffs)
#ifdef PROF
@@ -38,36 +37,36 @@ ENTRY(ffs)
ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing
addl a0, zero, a0 # the last insn and reduces the stall
- negq a0, t0 # due to the srl instruction
- and a0, t0, t0
+ negq a0, t0 # due to the srl instruction
+ and a0, t0, t0
clr v0
beq a0, $done
# now do binary search for first non-zero bit
zapnot t0, 0x03, t2
- addq v0, 16, t3
- cmoveq t2, t3, v0
+ addq v0, 16, t3
+ cmoveq t2, t3, v0
zapnot t0, 0x05, t2
- addq v0, 8, t3
- cmoveq t2, t3, v0
+ addq v0, 8, t3
+ cmoveq t2, t3, v0
srl t0, v0, t0
addq v0, 1, v0
- and t0, 0x0f, t2
- addq v0, 4, t3
- cmoveq t2, t3, v0
+ and t0, 0x0f, t2
+ addq v0, 4, t3
+ cmoveq t2, t3, v0
- and t0, 0x33, t2
- addq v0, 2, t3
- cmoveq t2, t3, v0
+ and t0, 0x33, t2
+ addq v0, 2, t3
+ cmoveq t2, t3, v0
- and t0, 0x55, t2
- addq v0, 1, t3
- cmoveq t2, t3, v0
+ and t0, 0x55, t2
+ addq v0, 1, t3
+ cmoveq t2, t3, v0
$done: ret
- END(ffs)
+ END(ffs)
diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S
index 2b29357..6ee99c2 100644
--- a/sysdeps/alpha/memset.S
+++ b/sysdeps/alpha/memset.S
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Fill a block of memory with a character. Optimized for the Alpha
architecture:
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
index 7597633..e5992ad 100644
--- a/sysdeps/alpha/s_fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -1,21 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by David Mosberger <davidm@azstarnet.com>
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S
index 7dcae04..8633a6c 100644
--- a/sysdeps/alpha/strcmp.S
+++ b/sysdeps/alpha/strcmp.S
@@ -1,6 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,9 +13,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Bytewise compare two null-terminated strings. */
@@ -178,7 +177,7 @@ $eos:
beq v0, $done # .. e1 :
/* Here we have two differing co-aligned words in t0 & t1.
- Bytewise compare them and return (t0 > t1 ? 1 : -1). */
+ Bytewise compare them and return (t0 > t1 ? 1 : -1). */
$wordcmp:
cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge
cmpbge t1, t0, t3 # .. e1 :
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
index a6c6c61..12e44e4 100644
--- a/sysdeps/alpha/strncmp.S
+++ b/sysdeps/alpha/strncmp.S
@@ -1,6 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,9 +13,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Bytewise compare two null-terminated strings of length no longer than N. */
@@ -203,7 +202,7 @@ $eos:
beq v0, $done # .. e1 :
/* Here we have two differing co-aligned words in t0 & t1.
- Bytewise compare them and return (t0 > t1 ? 1 : -1). */
+ Bytewise compare them and return (t0 > t1 ? 1 : -1). */
$wordcmp:
cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge
cmpbge t1, t0, t3 # .. e1 :
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
index c077ab3..91bf928 100644
--- a/sysdeps/alpha/strncpy.S
+++ b/sysdeps/alpha/strncpy.S
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST. If SRC does not cover all of COUNT, the balance is
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index d3099cc..9997961 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -1,21 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Return the address of the last occurrence of a given character
within a null-terminated string, or null if it is not found.
diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S
index 49dd8e5..dd5ea80 100644
--- a/sysdeps/alpha/stxcpy.S
+++ b/sysdeps/alpha/stxcpy.S
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Copy a null-terminated string from SRC to DST.
@@ -300,7 +299,7 @@ $unaligned:
extql t2, a1, t2 # .. e0 :
extql t1, a1, t1 # e0 :
- andnot t0, t2, t0 # .. e1 : zero place for source to reside
+ andnot t0, t2, t0 # .. e1 : zero place for source to reside
or t0, t1, t1 # e1 : and put it there
stq_u t1, 0(a0) # .. e0 :
ret (t9)
diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S
index f47348e..b1be778 100644
--- a/sysdeps/alpha/stxncpy.S
+++ b/sysdeps/alpha/stxncpy.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST.
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index dc1f52c..f155152 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -1,21 +1,21 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index 7158907..8074719 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -1,21 +1,21 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S
index 31ccb5f..615357d 100644
--- a/sysdeps/mach/alpha/syscall.S
+++ b/sysdeps/mach/alpha/syscall.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <mach/machine/alpha_instruction.h>
@@ -27,7 +27,7 @@ ENTRY (syscall)
mov a3, a2
mov a4, a3
mov a5, a4
- /* Load the remaining possible args (up to 11) from the stack. */
+ /* Load the remaining possible args (up to 11) from the stack. */
ldq a5,0(sp)
ldq t0,8(sp)
ldq t1,16(sp)
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 0db3a04..355a4a9 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,33 +1,33 @@
/* Startup code compliant to the ELF Mips ABI.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This is the canonical entry point, usually the first thing in the text
segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
point runs, most registers' values are unspecified, except for:
v1 ($2) Contains a function pointer to be registered with `atexit'.
- This is how the dynamic linker arranges to have DT_FINI
+ This is how the dynamic linker arranges to have DT_FINI
functions called for shared libraries that have been loaded
before this code runs.
sp ($29) The stack contains the arguments and environment:
- 0(%esp) argc
+ 0(%esp) argc
4(%esp) argv[0]
...
(4*argc)(%esp) NULL
@@ -52,7 +52,7 @@ Cambridge, MA 02139, USA. */
.set reorder;
#endif
- .text
+ .text
.globl _start
_start:
#ifdef PIC
@@ -124,7 +124,7 @@ nofini:
lw $6, 8($29)
lw $7, 12($29)
#endif /* __mips64 */
-
+
/* Call `_init', which is the entry point to our own `.init'
section; and register with `atexit' to have `exit' call
`_fini', which is the entry point to our own `.fini' section. */
diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
index 6b78a8c..4016c81 100644
--- a/sysdeps/standalone/i386/force_cpu386/strtsupp.S
+++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
@@ -1,27 +1,26 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This file assists the board independent startup code by
* loading the proper segment register values. The values
- * loaded are dependent on the FORCEBUG.
+ * loaded are dependent on the FORCEBUG.
*
* NOTE: No stack has been established when this routine
* is invoked. It returns by jumping back to the start code.
@@ -29,20 +28,20 @@ Cambridge, MA 02139, USA. */
*/
/*
- * FORCEBUG loads us into a virtual address space which
- * really starts at PHYSICAL_ADDRESS_BASE.
- *
+ * FORCEBUG loads us into a virtual address space which
+ * really starts at PHYSICAL_ADDRESS_BASE.
+ *
*/
.set PHYSICAL_ADDRESS_BASE, 0x00002000
/*
- * At reset time, FORCEBUG normally has the segment selectors preloaded.
+ * At reset time, FORCEBUG normally has the segment selectors preloaded.
* If a human resets the instruction pointer, this will not have occurred.
- * However, no guarantee can be made of the other registers if cs:ip was
- * modified to restart the program. Because of this, the BSP reloads all
- * segment registers (except cs) with the values they have following
- * a reset.
+ * However, no guarantee can be made of the other registers if cs:ip was
+ * modified to restart the program. Because of this, the BSP reloads all
+ * segment registers (except cs) with the values they have following
+ * a reset.
*/
@@ -50,40 +49,39 @@ Cambridge, MA 02139, USA. */
.set RESET_DS, 0x40 # initial value of data segment register
.set RESET_ES, 0x40 # initial value of extra segment register
.set RESET_FS, 0x40 # initial value of "f" segment register
-.set RESET_GS, 0x30 # initial value of "g" segment register
+.set RESET_GS, 0x30 # initial value of "g" segment register
#define LOAD_SEGMENTS(_value,_segreg) \
- movw $_value##,%ax ; \
- movw %ax,##_segreg
+ movw $_value##,%ax ; \
+ movw %ax,##_segreg
+
-
- .global _load_segments
+ .global _load_segments
- .global _establish_stack
+ .global _establish_stack
_load_segments:
- LOAD_SEGMENTS( RESET_SS, %ss )
- LOAD_SEGMENTS( RESET_DS, %ds )
- LOAD_SEGMENTS( RESET_ES, %es )
- LOAD_SEGMENTS( RESET_FS, %fs )
- LOAD_SEGMENTS( RESET_GS, %gs )
+ LOAD_SEGMENTS( RESET_SS, %ss )
+ LOAD_SEGMENTS( RESET_DS, %ds )
+ LOAD_SEGMENTS( RESET_ES, %es )
+ LOAD_SEGMENTS( RESET_FS, %fs )
+ LOAD_SEGMENTS( RESET_GS, %gs )
- jmp _establish_stack # return to the bsp entry code
+ jmp _establish_stack # return to the bsp entry code
- .global _return_to_monitor
+ .global _return_to_monitor
_return_to_monitor:
- movb $0,%al
- int $0x20 # restart FORCEbug
- jmp start # FORCEbug does not reset PC
+ movb $0,%al
+ int $0x20 # restart FORCEbug
+ jmp start # FORCEbug does not reset PC
- .data
+ .data
- .global _Do_Load_IDT
+ .global _Do_Load_IDT
_Do_Load_IDT: .byte 1
- .global _Do_Load_GDT
+ .global _Do_Load_GDT
_Do_Load_GDT: .byte 0
-
diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S
index 8331a33..41e0bfb 100644
--- a/sysdeps/standalone/i386/start.S
+++ b/sysdeps/standalone/i386/start.S
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* entry.s
*
@@ -28,28 +27,28 @@ Cambridge, MA 02139, USA. */
*
*/
- .data
- .global _Do_Load_IDT
- .global _Do_Load_GDT
+ .data
+ .global _Do_Load_IDT
+ .global _Do_Load_GDT
- .text
+ .text
.global start # GNU default entry point
- .global _establish_stack
+ .global _establish_stack
- .global _bsp_start
- .global _load_segments
- .global __exit
+ .global _bsp_start
+ .global _load_segments
+ .global __exit
start:
- nop
- cli # DISABLE INTERRUPTS!!!
+ nop
+ cli # DISABLE INTERRUPTS!!!
#
# Load the segment registers
#
# NOTE: Upon return, gs will contain the segment descriptor for
# a segment which maps directly to all of physical memory.
#
- jmp _load_segments # load board dependent segments
+ jmp _load_segments # load board dependent segments
#
# Set up the stack
@@ -57,102 +56,102 @@ start:
_establish_stack:
- movl $stack_end,%esp # set stack pointer
- movl $stack_end,%ebp # set base pointer
+ movl $stack_end,%esp # set stack pointer
+ movl $stack_end,%ebp # set base pointer
#
# Zero out the BSS segment
#
zero_bss:
- cld # make direction flag count up
- movl $_end,%ecx # find end of .bss
- movl $_bss_start,%edi # edi = beginning of .bss
- subl %edi,%ecx # ecx = size of .bss in bytes
- shrl $2,%ecx # size of .bss in longs
- xorl %eax,%eax # value to clear out memory
- repne # while ecx != 0
- stosl # clear a long in the bss
+ cld # make direction flag count up
+ movl $_end,%ecx # find end of .bss
+ movl $_bss_start,%edi # edi = beginning of .bss
+ subl %edi,%ecx # ecx = size of .bss in bytes
+ shrl $2,%ecx # size of .bss in longs
+ xorl %eax,%eax # value to clear out memory
+ repne # while ecx != 0
+ stosl # clear a long in the bss
#
# Set the C heap information for malloc
#
- movl $heap_size,___C_heap_size # set ___C_heap_size
- movl $heap_memory,___C_heap_start # set ___C_heap_start
+ movl $heap_size,___C_heap_size # set ___C_heap_size
+ movl $heap_memory,___C_heap_start # set ___C_heap_start
#
# Copy the Global Descriptor Table to our space
#
- sgdt _Original_GDTR # save original GDT
- movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit
- # is 8192 entries * 8 bytes per
+ sgdt _Original_GDTR # save original GDT
+ movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit
+ # is 8192 entries * 8 bytes per
- # make ds:esi point to the original GDT
+ # make ds:esi point to the original GDT
- movl _Original_GDTR_base,%esi
- push %ds # save ds
- movw %gs,%ax
- movw %ax,%ds
+ movl _Original_GDTR_base,%esi
+ push %ds # save ds
+ movw %gs,%ax
+ movw %ax,%ds
- # make es:edi point to the new (our copy) GDT
- movl $_Global_descriptor_table,%edi
+ # make es:edi point to the new (our copy) GDT
+ movl $_Global_descriptor_table,%edi
- rep
- movsb # copy the GDT (ds:esi -> es:edi)
+ rep
+ movsb # copy the GDT (ds:esi -> es:edi)
- pop %ds # restore ds
-
- # Build and load new contents of GDTR
- movw _Original_GDTR_limit,%ecx # set new limit
- movw %cx,_New_GDTR_limit
+ pop %ds # restore ds
- push $_Global_descriptor_table
- push %es
- call _Logical_to_physical
- addl $6,%esp
- movl %eax,_New_GDTR_base # set new base
+ # Build and load new contents of GDTR
+ movw _Original_GDTR_limit,%ecx # set new limit
+ movw %cx,_New_GDTR_limit
- cmpb $0,_Do_Load_GDT # Should the new GDT be loaded?
- je no_gdt_load # NO, then branch
- lgdt _New_GDTR # load the new GDT
+ push $_Global_descriptor_table
+ push %es
+ call _Logical_to_physical
+ addl $6,%esp
+ movl %eax,_New_GDTR_base # set new base
+
+ cmpb $0,_Do_Load_GDT # Should the new GDT be loaded?
+ je no_gdt_load # NO, then branch
+ lgdt _New_GDTR # load the new GDT
no_gdt_load:
#
# Copy the Interrupt Descriptor Table to our space
#
- sidt _Original_IDTR # save original IDT
- movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit
- # is 256 entries * 8 bytes per
-
+ sidt _Original_IDTR # save original IDT
+ movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit
+ # is 256 entries * 8 bytes per
+
- # make ds:esi point to the original IDT
- movl _Original_IDTR_base,%esi
+ # make ds:esi point to the original IDT
+ movl _Original_IDTR_base,%esi
- push %ds # save ds
- movw %gs,%ax
- movw %ax,%ds
+ push %ds # save ds
+ movw %gs,%ax
+ movw %ax,%ds
- # make es:edi point to the new (our copy) IDT
- movl $_Interrupt_descriptor_table,%edi
+ # make es:edi point to the new (our copy) IDT
+ movl $_Interrupt_descriptor_table,%edi
- rep
- movsb # copy the IDT (ds:esi -> es:edi)
- pop %ds # restore ds
+ rep
+ movsb # copy the IDT (ds:esi -> es:edi)
+ pop %ds # restore ds
- # Build and load new contents of IDTR
- movw _Original_IDTR_limit,%ecx # set new limit
- movw %cx,_New_IDTR_limit
+ # Build and load new contents of IDTR
+ movw _Original_IDTR_limit,%ecx # set new limit
+ movw %cx,_New_IDTR_limit
- push $_Interrupt_descriptor_table
- push %es
- call _Logical_to_physical
- addl $6,%esp
- movl %eax,_New_IDTR_base # set new base
+ push $_Interrupt_descriptor_table
+ push %es
+ call _Logical_to_physical
+ addl $6,%esp
+ movl %eax,_New_IDTR_base # set new base
- cmpb $0,_Do_Load_IDT # Should the new IDT be loaded?
- je no_idt_load # NO, then branch
- lidt _New_IDTR # load the new IDT
+ cmpb $0,_Do_Load_IDT # Should the new IDT be loaded?
+ je no_idt_load # NO, then branch
+ lidt _New_IDTR # load the new IDT
no_idt_load:
#
@@ -163,44 +162,44 @@ no_idt_load:
# exception.
#
- fninit # MUST USE NO-WAIT FORM
+ fninit # MUST USE NO-WAIT FORM
- call __Board_Initialize # initialize the board
+ call __Board_Initialize # initialize the board
- pushl $0 # envp = NULL
- pushl $0 # argv = NULL
- pushl $0 # argc = NULL
- call ___libc_init # initialize the library and
- # call main
- addl $12,%esp
-
- pushl $0 # argc = NULL
- call __exit # call the Board specific exit
- addl $4,%esp
+ pushl $0 # envp = NULL
+ pushl $0 # argv = NULL
+ pushl $0 # argc = NULL
+ call ___libc_init # initialize the library and
+ # call main
+ addl $12,%esp
+
+ pushl $0 # argc = NULL
+ call __exit # call the Board specific exit
+ addl $4,%esp
#
# Clean up
#
- .global _Bsp_cleanup
+ .global _Bsp_cleanup
- .global _return_to_monitor
+ .global _return_to_monitor
_Bsp_cleanup:
- cmpb $0,_Do_Load_IDT # Was the new IDT loaded?
- je no_idt_restore # NO, then branch
- lidt _Original_IDTR # restore the new IDT
+ cmpb $0,_Do_Load_IDT # Was the new IDT loaded?
+ je no_idt_restore # NO, then branch
+ lidt _Original_IDTR # restore the new IDT
no_idt_restore:
- cmpb $0,_Do_Load_GDT # Was the new GDT loaded?
- je no_gdt_restore # NO, then branch
- lgdt _Original_GDTR # restore the new GDT
+ cmpb $0,_Do_Load_GDT # Was the new GDT loaded?
+ je no_gdt_restore # NO, then branch
+ lgdt _Original_GDTR # restore the new GDT
no_gdt_restore:
- jmp _return_to_monitor
+ jmp _return_to_monitor
#
-# void *Logical_to_physical(
+# void *Logical_to_physical(
# rtems_unsigned16 segment,
# void *address
# );
@@ -208,28 +207,28 @@ no_gdt_restore:
# Returns thirty-two bit physical address for segment:address.
#
- .global _Logical_to_physical
+ .global _Logical_to_physical
.set SEGMENT_ARG, 4
.set ADDRESS_ARG, 8
_Logical_to_physical:
- xorl %eax,%eax # clear eax
- movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
- movl $_Global_descriptor_table,%edx # edx = address of our GDT
- addl %ecx,%edx # edx = address of desired entry
- movb 7(%edx),%ah # ah = base 31:24
- movb 4(%edx),%al # al = base 23:16
- shll $16,%eax # move ax into correct bits
- movw 2(%edx),%ax # ax = base 0:15
- movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
- addl %eax,%ecx # ecx = physical address equivalent
- movl %ecx,%eax # eax = ecx
- ret
-
+ xorl %eax,%eax # clear eax
+ movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
+ movl $_Global_descriptor_table,%edx # edx = address of our GDT
+ addl %ecx,%edx # edx = address of desired entry
+ movb 7(%edx),%ah # ah = base 31:24
+ movb 4(%edx),%al # al = base 23:16
+ shll $16,%eax # move ax into correct bits
+ movw 2(%edx),%ax # ax = base 0:15
+ movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
+ addl %eax,%ecx # ecx = physical address equivalent
+ movl %ecx,%eax # eax = ecx
+ ret
+
#
-# void *Physical_to_logical(
+# void *Physical_to_logical(
# rtems_unsigned16 segment,
# void *address
# );
@@ -237,41 +236,41 @@ _Logical_to_physical:
# Returns thirty-two bit physical address for segment:address.
#
- .global _Physical_to_logical
+ .global _Physical_to_logical
#.set SEGMENT_ARG, 4
#.set ADDRESS_ARG, 8 -- use sets from above
_Physical_to_logical:
- xorl %eax,%eax # clear eax
- movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
- movl $_Global_descriptor_table,%edx # edx = address of our GDT
- addl %ecx,%edx # edx = address of desired entry
- movb 7(%edx),%ah # ah = base 31:24
- movb 4(%edx),%al # al = base 23:16
- shll $16,%eax # move ax into correct bits
- movw 2(%edx),%ax # ax = base 0:15
- movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
- subl %eax,%ecx # ecx = logical address equivalent
- movl %ecx,%eax # eax = ecx
- ret
-
+ xorl %eax,%eax # clear eax
+ movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
+ movl $_Global_descriptor_table,%edx # edx = address of our GDT
+ addl %ecx,%edx # edx = address of desired entry
+ movb 7(%edx),%ah # ah = base 31:24
+ movb 4(%edx),%al # al = base 23:16
+ shll $16,%eax # move ax into correct bits
+ movw 2(%edx),%ax # ax = base 0:15
+ movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
+ subl %eax,%ecx # ecx = logical address equivalent
+ movl %ecx,%eax # eax = ecx
+ ret
+
/*
* Data Declarations. Start with a macro which helps declare space.
*/
- .bss
+ .bss
#define DECLARE_SPACE(_name,_space,_align) \
- .globl _name ; \
- .align _align ; \
+ .globl _name ; \
+ .align _align ; \
_name##: .space _space
#define DECLARE_LABEL(_name) \
- .globl _name ; \
-_name##:
+ .globl _name ; \
+_name##:
#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
@@ -287,7 +286,7 @@ DECLARE_PTR(environ)
DECLARE_LABEL(_errno)
DECLARE_U32(errno)
-/*
+/*
* Miscellaneous Variables used to restore the CPU state.
*
* Start with a macro to declare the space for the contents of
@@ -295,8 +294,8 @@ DECLARE_U32(errno)
*/
#define DECLARE_DTR_SPACE(_name) \
- .global _name ; \
- .align 4 ; \
+ .global _name ; \
+ .align 4 ; \
_name##: ; \
_name##_limit: .space 2 ; \
_name##_base: .space 4
@@ -316,8 +315,7 @@ DECLARE_SPACE(_Physical_base_of_cs,4,4)
* Stack Size and Space
*/
- .set stack_size, 0x20000
+ .set stack_size, 0x20000
DECLARE_SPACE(stack_memory,stack_size,4)
DECLARE_LABEL(stack_end)
-
diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S
index c14449d..d86fb14 100644
--- a/sysdeps/standalone/i960/start.S
+++ b/sysdeps/standalone/i960/start.S
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* entry.s
*
@@ -28,66 +27,66 @@ Cambridge, MA 02139, USA. */
*
*/
- .text
- .globl start # GNU960 default entry point
+ .text
+ .globl start # GNU960 default entry point
start:
- mov 3, r12
- modpc r12, r12, r12 # enable tracing/trace faults
- mov g5, g5 # NOP
- mov 0, g14 # initialize constant for C
-
- /*
- * zero out uninitialized data area
- */
+ mov 3, r12
+ modpc r12, r12, r12 # enable tracing/trace faults
+ mov g5, g5 # NOP
+ mov 0, g14 # initialize constant for C
+
+ /*
+ * zero out uninitialized data area
+ */
zerobss:
- lda _end, r4 /* find end of .bss */
- lda _bss_start, r5 /* find beginning of .bss */
- ldconst 0, r6
+ lda _end, r4 /* find end of .bss */
+ lda _bss_start, r5 /* find beginning of .bss */
+ ldconst 0, r6
loop: st r6, (r5) /* to zero out uninitialized */
- addo 4, r5, r5 /* data area */
- cmpobl r5, r4, loop /* loop until _end reached */
+ addo 4, r5, r5 /* data area */
+ cmpobl r5, r4, loop /* loop until _end reached */
- lda heap_memory, r12 /* tell C lib where heap is */
- st r12,___C_heap_start
- lda heap_size, r12 /* tell C lib how big heap is */
- st r12,___C_heap_size
- lda stack_memory,r12 /* set up stack pointer: */
- mov r12, sp
- mov 0, g14 /* initialize constant for C */
+ lda heap_memory, r12 /* tell C lib where heap is */
+ st r12,___C_heap_start
+ lda heap_size, r12 /* tell C lib how big heap is */
+ st r12,___C_heap_size
+ lda stack_memory,r12 /* set up stack pointer: */
+ mov r12, sp
+ mov 0, g14 /* initialize constant for C */
- call init_frames
- ret /* return to monitor */
+ call init_frames
+ ret /* return to monitor */
init_frames:
- ldconst 0x3b001000, g0
- ldconst 0x00009107, g1
- modac g1, g0, g0 /* set AC controls */
-
- /*
- * Call application mainline.
- * Someday, real values of argc and argv will be set up.
- * For now, they are set to 0.
- */
-
- callx __Board_Initialize /* Initialize the board */
-
- ldconst 0,g0
- ldconst 0,g1
- ldconst 0,g2
- callx ___libc_init /* initialize the library and */
- /* call main */
- /*
- * if we return from main, we have "fallen" off the end
- * of the program, therefore status is 0
- * so move 0 to g0 (exit parameter)
- */
-
- mov 0, g0
- callx __exit
- ret
+ ldconst 0x3b001000, g0
+ ldconst 0x00009107, g1
+ modac g1, g0, g0 /* set AC controls */
+
+ /*
+ * Call application mainline.
+ * Someday, real values of argc and argv will be set up.
+ * For now, they are set to 0.
+ */
+
+ callx __Board_Initialize /* Initialize the board */
+
+ ldconst 0,g0
+ ldconst 0,g1
+ ldconst 0,g2
+ callx ___libc_init /* initialize the library and */
+ /* call main */
+ /*
+ * if we return from main, we have "fallen" off the end
+ * of the program, therefore status is 0
+ * so move 0 to g0 (exit parameter)
+ */
+
+ mov 0, g0
+ callx __exit
+ ret
/*
@@ -95,13 +94,13 @@ init_frames:
*/
#define DECLARE_SPACE(_name,_space,_align) \
- .globl _name ; \
- .align _align ; \
+ .globl _name ; \
+ .align _align ; \
.comm _name##,_space
#define DECLARE_LABEL(_name) \
- .globl _name ; \
-_name##:
+ .globl _name ; \
+_name##:
#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
@@ -121,7 +120,7 @@ DECLARE_U32(errno)
* Stack Size and Space
*/
- .set stack_size, 0x20000
+ .set stack_size, 0x20000
DECLARE_SPACE(stack_memory,stack_size,4)
DECLARE_LABEL(stack_end)
@@ -130,8 +129,7 @@ DECLARE_LABEL(stack_end)
* Heap Size and Space
*/
- .set heap_size, 0x20000
+ .set heap_size, 0x20000
DECLARE_SPACE(heap_memory,heap_size,4)
DECLARE_LABEL(heap_end)
-
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
index 9d7d779..fb6fd3e 100644
--- a/sysdeps/standalone/m68k/m68020/start.S
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* entry.s
*
@@ -27,7 +26,7 @@ Cambridge, MA 02139, USA. */
* all initialization.
*/
- .text
+ .text
.globl start | Default entry point
.globl _start | Default entry point
.globl M68Kvec | Vector Table
@@ -37,90 +36,90 @@ start:
_start:
M68Kvec: | standard location for vectors
_M68Kvec: | standard location for vectors
- nop | for linkers with problem
- | using location zero as entry
- jmp around
- .space 4088 | to avoid initial intr stack
- | from 135BUG on MVME13? as entry
- | and start code at 0x4000
+ nop | for linkers with problem
+ | using location zero as entry
+ jmp around
+ .space 4088 | to avoid initial intr stack
+ | from 135BUG on MVME13? as entry
+ | and start code at 0x4000
around:
- move.w %sr,initial_sr | save initial values
- movec %isp,%a0
- movel %a0,initial_isp
- movec %usp,%a0
- movel %a0,initial_usp
- movec %msp,%a0
- movel %a0,initial_msp
- oriw #0x0700,%sr | INTERRUPTS OFF!!!
+ move.w %sr,initial_sr | save initial values
+ movec %isp,%a0
+ movel %a0,initial_isp
+ movec %usp,%a0
+ movel %a0,initial_usp
+ movec %msp,%a0
+ movel %a0,initial_msp
+ oriw #0x0700,%sr | INTERRUPTS OFF!!!
- |
- | zero out uninitialized data area
- |
+ |
+ | zero out uninitialized data area
+ |
zerobss:
- moveal #end,%a0 | find end of .bss
- moveal #_bss_start,%a1 | find beginning of .bss
- movel #0,%d0
+ moveal #end,%a0 | find end of .bss
+ moveal #_bss_start,%a1 | find beginning of .bss
+ movel #0,%d0
loop: movel #0,%a1@+ | to zero out uninitialized
- cmpal %a0,%a1
- jlt loop | loop until _end reached
-
- movel #heap_size,__C_heap_size | set ___C_heap_size
- movel #heap_memory,__C_heap_start | set ___C_heap_start
- moveal #interrupt_stack_end,%a0 | set interrupt stack pointer
- movec %a0,%isp
- moveal #stack_end,%a0 | set master stack pointer
- movec %a0,%msp
- moveal #stack_end,%a6 | set base pointer
- movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!!
+ cmpal %a0,%a1
+ jlt loop | loop until _end reached
+
+ movel #heap_size,__C_heap_size | set ___C_heap_size
+ movel #heap_memory,__C_heap_start | set ___C_heap_start
+ moveal #interrupt_stack_end,%a0 | set interrupt stack pointer
+ movec %a0,%isp
+ moveal #stack_end,%a0 | set master stack pointer
+ movec %a0,%msp
+ moveal #stack_end,%a6 | set base pointer
+ movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!!
#ifdef NEED_UNDERSCORES
- jsr __Board_Initialize | initialize the board
+ jsr __Board_Initialize | initialize the board
#else
- jsr _Board_Initialize | initialize the board
+ jsr _Board_Initialize | initialize the board
#endif
- move.l #0,%sp@- | envp = NULL
- move.l #0,%sp@- | argv = NULL
- move.l #0,%sp@- | argc = NULL
+ move.l #0,%sp@- | envp = NULL
+ move.l #0,%sp@- | argv = NULL
+ move.l #0,%sp@- | argc = NULL
#ifdef NEED_UNDERSCORES
- jsr ___libc_init | initialize the library and
- | call main
+ jsr ___libc_init | initialize the library and
+ | call main
#else
- jsr __libc_init | initialize the library and
- | call main
+ jsr __libc_init | initialize the library and
+ | call main
#endif
- add.l #12,%sp
+ add.l #12,%sp
- move.l #0,%sp@- | argc = NULL
- jsr __exit | call the Board specific exit
- addq.l #4,%sp
+ move.l #0,%sp@- | argc = NULL
+ jsr __exit | call the Board specific exit
+ addq.l #4,%sp
- move.l initial_isp,%a0 | if __exit returns then we can
- movec %a0,%isp | restore the initial values
- move.l initial_usp,%a0
- movec %a0,%usp
- move.l initial_msp,%a0
- movec %a0,%msp
- move.w initial_sr,%sr
- rts
+ move.l initial_isp,%a0 | if __exit returns then we can
+ movec %a0,%isp | restore the initial values
+ move.l initial_usp,%a0
+ movec %a0,%usp
+ move.l initial_msp,%a0
+ movec %a0,%msp
+ move.w initial_sr,%sr
+ rts
- .bss
+ .bss
/*
* So initial stack registers and status register can be saved.
*/
#define DECLARE_SPACE(_name,_space,_align) \
- .globl _name ; \
- .align _align ; \
+ .globl _name ; \
+ .align _align ; \
_name##: .space _space
#define DECLARE_LABEL(_name) \
- .globl _name ; \
+ .globl _name ; \
_name##:
#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
@@ -147,7 +146,7 @@ DECLARE_U32(errno)
* Stack Size and Space
*/
- .set stack_size, 0x20000
+ .set stack_size, 0x20000
DECLARE_SPACE(stack_memory,stack_size,4)
DECLARE_LABEL(stack_end)
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
index a801674..0150bcd 100644
--- a/sysdeps/unix/arm/brk.S
+++ b/sysdeps/unix/arm/brk.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -38,6 +38,6 @@ SYSCALL__ (brk, 1)
mov r0, $0
RETINSTR(mov, pc, r14)
_cb_addr: .long C_SYMBOL_NAME(__curbrk)
-
-
+
+
weak_alias (__brk, brk)
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
index baa33e3..b70d157 100644
--- a/sysdeps/unix/arm/fork.S
+++ b/sysdeps/unix/arm/fork.S
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index cf46b4d..a474eb5 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
index b70c122..dc11373 100644
--- a/sysdeps/unix/bsd/hp/m68k/vfork.S
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index d0e7585..d106fea 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 633d18f..2a4134a 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S
index 18ef815..a85a898 100644
--- a/sysdeps/unix/bsd/m68k/syscall.S
+++ b/sysdeps/unix/bsd/m68k/syscall.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index 1be2d5a..f43240c 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define _ERRNO_H
#include <bits/errno.h>
diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S
index c7685b7..0b502c4 100644
--- a/sysdeps/unix/bsd/m68k/wait.S
+++ b/sysdeps/unix/bsd/m68k/wait.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S
index 105e401..394cd3a 100644
--- a/sysdeps/unix/bsd/osf/alpha/brk.S
+++ b/sysdeps/unix/bsd/osf/alpha/brk.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
index be6f015..1396761 100644
--- a/sysdeps/unix/bsd/osf/alpha/fork.S
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S
index 831c3fd..92ba1be 100644
--- a/sysdeps/unix/bsd/osf/alpha/killpg.S
+++ b/sysdeps/unix/bsd/osf/alpha/killpg.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
index eada33b..05736a8 100644
--- a/sysdeps/unix/bsd/osf/alpha/pipe.S
+++ b/sysdeps/unix/bsd/osf/alpha/pipe.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S
index a68bfe8..914b6eb 100644
--- a/sysdeps/unix/bsd/osf/alpha/recv.S
+++ b/sysdeps/unix/bsd/osf/alpha/recv.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S
index 526f4c8..8a56d82 100644
--- a/sysdeps/unix/bsd/osf/alpha/send.S
+++ b/sysdeps/unix/bsd/osf/alpha/send.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S
index 402ed8d..cdb3788 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigblock.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S
index 6136cfc..59d048d 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
index 71aea92..04bf694 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S
index f199f35..1090cdc 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigvec.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
index d5ff140..0321f56 100644
--- a/sysdeps/unix/bsd/osf/alpha/start.S
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S
index 8759f02..2fc4094 100644
--- a/sysdeps/unix/bsd/osf/alpha/vhangup.S
+++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S
index b68bcbd..fe8f58d 100644
--- a/sysdeps/unix/bsd/sequent/i386/getgroups.S
+++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <limits.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index 1bb57c2..9647849 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S
index bebab8e..45c920c 100644
--- a/sysdeps/unix/bsd/sequent/i386/syscall.S
+++ b/sysdeps/unix/bsd/sequent/i386/syscall.S
@@ -1,21 +1,21 @@
/* `syscall' function for Sequent Symmetry running Dynix version 3.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 462910a..4c46017 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index ab76d75..a3654bf 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S
index 0a98da7..76bac4d 100644
--- a/sysdeps/unix/bsd/sun/m68k/syscall.S
+++ b/sysdeps/unix/bsd/sun/m68k/syscall.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index 63d2a09..4de48b7 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S
index d0a3f3a..7a3f8db 100644
--- a/sysdeps/unix/bsd/sun/sigreturn.S
+++ b/sysdeps/unix/bsd/sun/sigreturn.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index f8ee805..fc3fc04 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
index ca9c3fe..19d795a 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
@@ -1,21 +1,22 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
Also hacked by Ian Lance Taylor (ian@airs.com).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index aec5885..dfb06c2 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index 05e4b87..84a2fde 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S
index 930c67e..5659872 100644
--- a/sysdeps/unix/bsd/ultrix4/wait3.S
+++ b/sysdeps/unix/bsd/ultrix4/wait3.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S
index b3e8e10..c959073 100644
--- a/sysdeps/unix/bsd/vax/brk.S
+++ b/sysdeps/unix/bsd/vax/brk.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index 10c681a..8a83e0c 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index b5b76aa..6809b6e 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define _ERRNO_H
#include <bits/errno.h>
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index 96f27ea..ba670ac 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
index 77311b4..9effe92 100644
--- a/sysdeps/unix/bsd/vax/wait.S
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
index 2d8dba8..52b8694 100644
--- a/sysdeps/unix/bsd/vax/wait3.S
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index 9c4ee26..1976726 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index 17efcc9..ffaf40b 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index b9f376d..dac6174 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
index 70ae0c2..ddb6c70 100644
--- a/sysdeps/unix/mips/sigreturn.S
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 1791801..0cfc302 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#define _ERRNO_H
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index f1f4f9b..a544156 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S
index 14ef77b..1ccd9d3 100644
--- a/sysdeps/unix/sysv/i386/signal.S
+++ b/sysdeps/unix/sysv/i386/signal.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S
index bd756a4..5d0e169 100644
--- a/sysdeps/unix/sysv/irix4/__handler.S
+++ b/sysdeps/unix/sysv/irix4/__handler.S
@@ -1,21 +1,22 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
Also hacked by Ian Lance Taylor (ian@airs.com).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S
index ebb5c1a..c56738c 100644
--- a/sysdeps/unix/sysv/irix4/sigreturn.S
+++ b/sysdeps/unix/sysv/irix4/sigreturn.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S
index fe91240..f0464d3 100644
--- a/sysdeps/unix/sysv/irix4/uname.S
+++ b/sysdeps/unix/sysv/irix4/uname.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S
index 9f2afa7..82fdee5 100644
--- a/sysdeps/unix/sysv/irix4/wait.S
+++ b/sysdeps/unix/sysv/irix4/wait.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index 60334ad..6a2bcf3 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* __pipe is a special syscall since it returns two values. */
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 257ff4d..9563204 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -26,7 +26,7 @@ ENTRY (__mmap)
lea 4(%sp), %a0 /* Address of args is 1st arg. */
move.l %a0, %d1
- /* Do the system call trap. */
+ /* Do the system call trap. */
trap #0
/* Kludge: negative numbers are among the legal return values.
diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
index 0971acd..34c0a91 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S
+++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 1508b87..51aaa4b 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <socketcall.h>
@@ -44,7 +44,7 @@ ENTRY (P(__,socket))
lea 4(%sp), %a1 /* Address of args is 2nd arg. */
move.l %a1, %d2
- /* Do the system call trap. */
+ /* Do the system call trap. */
trap #0
/* Restore registers. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index dc1bb41..3367ec7 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 44c89f2..55db86b 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <bits/confname.h>
diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S
index a22d18a..c56dd4d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/uname.S
+++ b/sysdeps/unix/sysv/sco3.2.4/uname.S
@@ -1,26 +1,25 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
Contributed by Scott Bartram.
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
-/*
+/*
before lcall, stack contents should be:
4(%esp) -> name
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index 523ef37..ae1e9a1 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
index 58430e4..35cd16a 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
+++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
index aefa3e3..3f4d7d6 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index edefad0..de3735b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#define _ERRNO_H
diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S
index 039fd71..ce324e4 100644
--- a/sysdeps/vax/bsd-_setjmp.S
+++ b/sysdeps/vax/bsd-_setjmp.S
@@ -1,21 +1,21 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S
index 379a65c..b6eadb7 100644
--- a/sysdeps/vax/bsd-setjmp.S
+++ b/sysdeps/vax/bsd-setjmp.S
@@ -1,21 +1,21 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Vax version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=922ac64192bb698ce17af725bbbbc892215edb93
commit 922ac64192bb698ce17af725bbbbc892215edb93
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 26 22:12:06 1997 +0000
Update and reformat copyright, remove trailing white spaces and send through unexpand.
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 026c8ad..60be29c 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -1,22 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Finds length of a 0-terminated string. Optimized for the Alpha
architecture:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36e28152c9092ff2812956aef1d76da418c30d6b
commit 36e28152c9092ff2812956aef1d76da418c30d6b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 23 21:54:51 1997 +0000
Update and reformat copyright, remove trailing white spaces and send
through unexpand.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index 65b6804..98eba7c 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Global register vars must come before any function defn. */
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index 6e6f6b4..d461205 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -1,26 +1,26 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
-Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
typedef struct
{
/* Integer registers:
- $0 is the return value;
+ $0 is the return value;
$1-$8, $22-$25, $28 are call-used;
$9-$14 we save here;
$15 is the FP and we save it here;
@@ -36,7 +36,7 @@ typedef struct
#if 1 /* XXX need predefine for TARGET_FPREGS */
/* Floating-point registers:
- $f0 is the floating return value;
+ $f0 is the floating return value;
$f1, $f10-$f15, $f22-$f30 are call-used;
$f2-$f9 we save here;
$f16-$21 are input args (call-used);
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index b83908d..881b324 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -1,6 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
-
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,9 +13,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* The current Alpha chips don't provide hardware for integer
division. The C compiler expects the functions
diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h
index e902537..5014acd 100644
--- a/sysdeps/alpha/machine-gmon.h
+++ b/sysdeps/alpha/machine-gmon.h
@@ -1,21 +1,21 @@
/* Machine-specific calling sequence for `mcount' profiling function. alpha
-Copyright (C) 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define _MCOUNT_DECL(from, self) \
void __mcount (u_long from, u_long self)
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
index 0f05f8b..fa26975 100644
--- a/sysdeps/alpha/setjmp_aux.c
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Global register decls must come before any function defn. */
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
index 6a4a4bb..054085d 100644
--- a/sysdeps/arm/fpu_control.h
+++ b/sysdeps/arm/fpu_control.h
@@ -1,21 +1,21 @@
/* FPU control word definitions. Stub version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
@@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */
typedef unsigned int fpu_control_t;
/* Macros for accessing the hardware control word.
- * On the ARM, we can't do this from user mode (it would trap).
+ * On the ARM, we can't do this from user mode (it would trap).
*/
#define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw))
#define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw))
diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h
index 9f81326..d381acd 100644
--- a/sysdeps/i860/memcopy.h
+++ b/sysdeps/i860/memcopy.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 92dd803..c3e400c 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <setjmp.h>
#include <stdlib.h>
diff --git a/sysdeps/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h
index 97bde85..12ea133 100644
--- a/sysdeps/m68k/fpu_control.h
+++ b/sysdeps/m68k/fpu_control.h
@@ -1,21 +1,21 @@
/* 68k FPU control word definitions.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h
index 862e1b8..b4d4614 100644
--- a/sysdeps/m68k/memcopy.h
+++ b/sysdeps/m68k/memcopy.h
@@ -1,21 +1,22 @@
/* memcopy.h -- definitions for memory copy functions. Motorola 68020 version.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/m68k/s_isinfl.c b/sysdeps/m68k/s_isinfl.c
index 1b06d47..c94104d 100644
--- a/sysdeps/m68k/s_isinfl.c
+++ b/sysdeps/m68k/s_isinfl.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <math.h>
#include "ieee754.h"
diff --git a/sysdeps/m68k/s_isnanl.c b/sysdeps/m68k/s_isnanl.c
index 38a9616..a285850 100644
--- a/sysdeps/m68k/s_isnanl.c
+++ b/sysdeps/m68k/s_isnanl.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <math.h>
#include "ieee754.h"
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 95c723c..1de9f68 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <setjmp.h>
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index 42e21d8..1da8b25 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -1,21 +1,21 @@
/* Machine-specific definition for spin locks. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h
index 6a8a3c6..d12e734 100644
--- a/sysdeps/mach/alpha/machine-sp.h
+++ b/sysdeps/mach/alpha/machine-sp.h
@@ -1,21 +1,21 @@
/* Machine-specific function to return the stack pointer. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MACHINE_SP_H
#define _MACHINE_SP_H
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index a327662..6c1035a 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define MOVE(x,y) mov x, y
diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h
index 28b0a15..ea9f944 100644
--- a/sysdeps/mach/alpha/thread_state.h
+++ b/sysdeps/mach/alpha/thread_state.h
@@ -1,21 +1,21 @@
/* Mach thread state definitions for machine-independent code. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <mach/machine/thread_status.h>
diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h
index 0a17835..8b425d2 100644
--- a/sysdeps/mach/hppa/machine-lock.h
+++ b/sysdeps/mach/hppa/machine-lock.h
@@ -1,21 +1,21 @@
/* Machine-specific definition for spin locks. HPPA version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
index 32e0c94..3b17a4a 100644
--- a/sysdeps/mach/hurd/alpha/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
@@ -1,21 +1,21 @@
/* Machine-dependent signal context structure for GNU Hurd. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
@@ -40,9 +40,9 @@ struct sigcontext
/* All following members are machine-dependent. The rest of this
structure is written to be laid out identically to:
{
- struct alpha_thread_state basic;
- struct alpha_exc_state exc;
- struct alpha_float_state fpu;
+ struct alpha_thread_state basic;
+ struct alpha_exc_state exc;
+ struct alpha_float_state fpu;
}
trampoline.c knows this, so it must be changed if this changes. */
diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c
index edac0aa..072db33 100644
--- a/sysdeps/mach/hurd/alpha/exc2signal.c
+++ b/sysdeps/mach/hurd/alpha/exc2signal.c
@@ -1,21 +1,21 @@
/* Translate Mach exception codes into signal numbers. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/signal.h>
@@ -36,7 +36,7 @@ _hurd_exception2signal (int exception, int code, int subcode,
*signo = SIGIOT;
*sigcode = exception;
break;
-
+
case EXC_BAD_ACCESS:
if (code == KERN_PROTECTION_FAILURE)
*signo = SIGSEGV;
@@ -50,14 +50,14 @@ _hurd_exception2signal (int exception, int code, int subcode,
*signo = SIGILL;
*sigcode = code;
break;
-
+
case EXC_ARITHMETIC:
*signo = SIGFPE;
*sigcode = code;
break;
break;
- case EXC_EMULATION:
+ case EXC_EMULATION:
/* 3.0 doesn't give this one, why, I don't know. */
*signo = SIGEMT;
*sigcode = code;
@@ -67,7 +67,7 @@ _hurd_exception2signal (int exception, int code, int subcode,
*signo = SIGEMT;
*sigcode = code;
break;
-
+
case EXC_BREAKPOINT:
*signo = SIGTRAP;
*sigcode = code;
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
index ad6f80c..07dff56 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ts.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -1,21 +1,21 @@
/* Perform a `longjmp' on a Mach thread_state. Alpha version.
-Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd/signal.h>
#include <setjmp.h>
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index e5dc383..ff6e4ed 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -1,21 +1,21 @@
/* Return from signal handler in GNU C library for Hurd. Alpha version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/signal.h>
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index f3872fc..b650478 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -1,21 +1,21 @@
/* Set thread_state for sighandler, and sigcontext to recover. Alpha version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd/signal.h>
#include "thread_state.h"
@@ -146,7 +146,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
still waiting for a reply. We will have it run the special
trampoline code which retries the message receive before running
the signal handler.
-
+
To do this we change the OPTION argument in its registers to
enable only message reception, since the request message has
already been sent. */
diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
index b616469..f450125 100644
--- a/sysdeps/mach/hurd/hppa/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
@@ -1,21 +1,21 @@
/* Machine-dependent signal context structure for GNU Hurd. HPPA version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
index 1dbbe6d..ceb1623 100644
--- a/sysdeps/mach/hurd/hppa/trampoline.c
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -1,21 +1,21 @@
/* Set thread_state for sighandler, and sigcontext to recover. HPPA version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd/signal.h>
#include "thread_state.h"
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include "hurdfault.h"
-
+
struct mach_msg_trap_regargs
{
/* These first four arguments are in registers 26..23. */
@@ -124,7 +124,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
still waiting for a reply. We will have it run the special
trampoline code which retries the message receive before running
the signal handler.
-
+
To do this we change the OPTION argument on its stack to enable only
message reception, since the request message has already been
sent. */
diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h
index 81d1f25..64a57ab 100644
--- a/sysdeps/mach/hurd/mips/bits/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Signal handlers are actually called:
void handler (int sig, int code, struct sigcontext *scp); */
@@ -38,7 +38,7 @@ struct sigcontext
/* All following members are machine-dependent. The rest of this
structure is written to be laid out identically to:
- {
+ {
struct mips_thread_state ts;
struct mips_exc_state es;
struct mips_float_state fs;
diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h
index 873b312..7f84f88 100644
--- a/sysdeps/rs6000/memcopy.h
+++ b/sysdeps/rs6000/memcopy.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/generic/memcopy.h>
diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h
index 5552bc4..f5a5034 100644
--- a/sysdeps/standalone/bits/stdio_lim.h
+++ b/sysdeps/standalone/bits/stdio_lim.h
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define L_tmpnam 1
#define TMPMAX 0
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 2d92937..2e33b3c 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h
index 0645132..d7cb9bc 100644
--- a/sysdeps/standalone/dirstream.h
+++ b/sysdeps/standalone/dirstream.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _DIRSTREAM_H
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
index e4b8d65..a35d1cf 100644
--- a/sysdeps/standalone/filedesc.h
+++ b/sysdeps/standalone/filedesc.h
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/*
* This is the file descriptor used by the no OS implementation
@@ -32,7 +31,7 @@ Cambridge, MA 02139, USA. */
#ifndef __DECLARE_FILE_DESCRIPTORS__
#define FILEDESC_EXTERN extern
#else
-#define FILEDESC_EXTERN
+#define FILEDESC_EXTERN
#endif
typedef struct {
diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h
index 8302773..20d7f01 100644
--- a/sysdeps/standalone/i386/i386.h
+++ b/sysdeps/standalone/i386/i386.h
@@ -1,29 +1,28 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* i386.h
*
- * This file contains macros which are used to access i80386
+ * This file contains macros which are used to access i80386
* registers which are not addressable by C. This file contains
- * functions which are useful to those developing target
+ * functions which are useful to those developing target
* specific support routines.
*/
@@ -37,16 +36,16 @@ typedef unsigned int unsigned32;
#define disable_intr( isrlevel ) \
{ (isrlevel) = 0; \
asm volatile ( "pushf ; \
- pop %0 ; \
- cli " \
- : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
+ pop %0 ; \
+ cli " \
+ : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
}
#define enable_intr( isrlevel ) \
{ asm volatile ( "push %0 ; \
- popf " \
- : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
+ popf " \
+ : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
}
#define delay( _microseconds ) \
@@ -56,10 +55,10 @@ typedef unsigned int unsigned32;
_counter = (_microseconds); \
\
asm volatile ( "0: nop;" \
- " mov %0,%0 ;" \
- " loop 0" : "=c" (_counter) \
- : "0" (_counter) \
- ); \
+ " mov %0,%0 ;" \
+ " loop 0" : "=c" (_counter) \
+ : "0" (_counter) \
+ ); \
\
}
@@ -69,7 +68,7 @@ static inline unsigned16 get_cs()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -78,7 +77,7 @@ static inline unsigned16 get_ds()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -87,7 +86,7 @@ static inline unsigned16 get_es()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -96,7 +95,7 @@ static inline unsigned16 get_ss()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -105,7 +104,7 @@ static inline unsigned16 get_fs()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -114,7 +113,7 @@ static inline unsigned16 get_gs()
{
register unsigned16 segment = 0;
- asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
+ asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
return segment;
}
@@ -126,8 +125,8 @@ static inline unsigned16 get_gs()
register unsigned8 __value = _value; \
\
asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
}
#define outport_word( _port, _value ) \
@@ -135,8 +134,8 @@ static inline unsigned16 get_gs()
register unsigned16 __value = _value; \
\
asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
}
#define outport_long( _port, _value ) \
@@ -144,8 +143,8 @@ static inline unsigned16 get_gs()
register unsigned32 __value = _value; \
\
asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
}
#define inport_byte( _port, _value ) \
@@ -153,8 +152,8 @@ static inline unsigned16 get_gs()
register unsigned8 __value = 0; \
\
asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
_value = __value; \
}
@@ -163,8 +162,8 @@ static inline unsigned16 get_gs()
register unsigned16 __value = 0; \
\
asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
_value = __value; \
}
@@ -173,8 +172,8 @@ static inline unsigned16 get_gs()
register unsigned32 __value = 0; \
\
asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \
- : "0" (__value), "1" (__port) \
- ); \
+ : "0" (__value), "1" (__port) \
+ ); \
_value = __value; \
}
@@ -191,7 +190,7 @@ struct GDT_slot {
unsigned8 base_24_31;
};
-/* See Chapter 9 - Exceptions and Interrupts in i386 manual
+/* See Chapter 9 - Exceptions and Interrupts in i386 manual
*
* NOTE: This is the IDT entry for interrupt gates ONLY.
*/
@@ -249,12 +248,12 @@ void *Physical_to_logical(
register unsigned32 _temporary = 0; \
\
asm volatile( "movl %%gs:(%0),%1 ; \
- movl %1,(%2) ; \
- movl %%gs:4(%0),%1 ; \
- movl %1,4(%2)" \
- : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
- : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
- ); \
+ movl %1,(%2) ; \
+ movl %%gs:4(%0),%1 ; \
+ movl %1,4(%2)" \
+ : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
+ : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
+ ); \
}
#define set_GDT_slot( _gdtr_base, _segment, _slot_address ) \
@@ -264,63 +263,63 @@ void *Physical_to_logical(
register unsigned32 _temporary = 0; \
\
asm volatile( "movl (%2),%1 ; \
- movl %1,%%gs:(%0) ; \
- movl 4(%2),%1 ; \
- movl %1,%%gs:4(%0) \
- " \
- : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
- : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
- ); \
+ movl %1,%%gs:(%0) ; \
+ movl 4(%2),%1 ; \
+ movl %1,%%gs:4(%0) \
+ " \
+ : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
+ : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
+ ); \
}
-static inline void set_segment(
- unsigned16 segment,
+static inline void set_segment(
+ unsigned16 segment,
unsigned32 base,
- unsigned32 limit
-)
-{
- struct DTR_load_save_format gdtr;
+ unsigned32 limit
+)
+{
+ struct DTR_load_save_format gdtr;
volatile struct GDT_slot Gdt_slot;
volatile struct GDT_slot *gdt_slot = &Gdt_slot;
unsigned16 tmp_segment = 0;
unsigned32 limit_adjusted;
-
-
+
+
/* load physical address of the GDT */
get_GDTR( &gdtr );
-
+
gdt_slot->type_dt_dpl_p = 0x92; /* present, dpl=0, */
- /* application=1, */
- /* type=data read/write */
+ /* application=1, */
+ /* type=data read/write */
gdt_slot->limit_16_19_granularity = 0x40; /* 32 bit segment */
limit_adjusted = limit;
if ( limit > 4095 ) {
gdt_slot->limit_16_19_granularity |= 0x80; /* set granularity bit */
limit_adjusted /= 4096;
- }
-
+ }
+
gdt_slot->limit_16_19_granularity |= (limit_adjusted >> 16) & 0xff;
gdt_slot->limit_0_15 = limit_adjusted & 0xffff;
-
+
gdt_slot->base_0_15 = base & 0xffff;
gdt_slot->base_16_23 = (base >> 16) & 0xff;
gdt_slot->base_24_31 = (base >> 24);
-
+
set_GDT_slot( gdtr.physical_address, segment, gdt_slot );
/* Now, reload all segment registers so the limit takes effect. */
asm volatile( "movw %%ds,%0 ; movw %0,%%ds
- movw %%es,%0 ; movw %0,%%es
- movw %%fs,%0 ; movw %0,%%fs
- movw %%gs,%0 ; movw %0,%%gs
- movw %%ss,%0 ; movw %0,%%ss"
- : "=r" (tmp_segment)
- : "0" (tmp_segment)
- );
-
+ movw %%es,%0 ; movw %0,%%es
+ movw %%fs,%0 ; movw %0,%%fs
+ movw %%gs,%0 ; movw %0,%%gs
+ movw %%ss,%0 ; movw %0,%%ss"
+ : "=r" (tmp_segment)
+ : "0" (tmp_segment)
+ );
+
}
#endif
diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h
index e9e6f7d..8fce423 100644
--- a/sysdeps/standalone/m68k/m68020/m68020.h
+++ b/sysdeps/standalone/m68k/m68020/m68020.h
@@ -1,27 +1,26 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* m68020.h
*
- * This file contains macros which are used to access MC68020
+ * This file contains macros which are used to access MC68020
* registers which are not addressable by C. These are
* useful when developing the board specific support.
*/
@@ -34,53 +33,53 @@ typedef void ( *mc68020_isr )( void );
#define disable_intr( level ) \
{ (level) = 0; \
asm volatile ( "movew %%sr,%0 ; \
- orw #0x0700,%%sr" \
- : "=d" ((level)) : "0" ((level)) ); \
+ orw #0x0700,%%sr" \
+ : "=d" ((level)) : "0" ((level)) ); \
}
#define enable_intr( level ) \
{ asm volatile ( "movew %0,%%sr " \
- : "=d" ((level)) : "0" ((level)) ); \
+ : "=d" ((level)) : "0" ((level)) ); \
}
#define flash_intr( level ) \
{ asm volatile ( "movew %0,%%sr ; \
- orw #0x0700,%%sr" \
- : "=d" ((level)) : "0" ((level)) ); \
+ orw #0x0700,%%sr" \
+ : "=d" ((level)) : "0" ((level)) ); \
}
#define get_vbr( vbr ) \
{ (vbr) = 0; \
asm volatile ( "movec %%vbr,%0 " \
- : "=a" (vbr) : "0" (vbr) ); \
+ : "=a" (vbr) : "0" (vbr) ); \
}
#define set_vbr( vbr ) \
{ register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \
asm volatile ( "movec %0,%%vbr " \
- : "=a" (_vbr) : "0" (_vbr) ); \
+ : "=a" (_vbr) : "0" (_vbr) ); \
}
#define enable_caching() \
{ register unsigned int _ctl=0x01; \
asm volatile ( "movec %0,%%cacr" \
- : "=d" (_ctl) : "0" (_ctl) ); \
+ : "=d" (_ctl) : "0" (_ctl) ); \
}
#define delay( microseconds ) \
{ register unsigned int _delay=(microseconds); \
register unsigned int _tmp=123; \
asm volatile( "0: \
- nbcd %0 ; \
- nbcd %0 ; \
- dbf %1,0 " \
- : "=d" (_tmp), "=d" (_delay) \
- : "0" (_tmp), "1" (_delay) ); \
+ nbcd %0 ; \
+ nbcd %0 ; \
+ dbf %1,0 " \
+ : "=d" (_tmp), "=d" (_delay) \
+ : "0" (_tmp), "1" (_delay) ); \
}
-#define enable_tracing()
-#define cause_intr( X )
-#define clear_intr( X )
+#define enable_tracing()
+#define cause_intr( X )
+#define clear_intr( X )
extern mc68020_isr M68Kvec[]; /* vector table address */
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index b61b729..25e2610 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <fcntl.h>
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 40322a5..43bc0d6 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h
index 13d58f0..57687da 100644
--- a/sysdeps/standalone/standalone.h
+++ b/sysdeps/standalone/standalone.h
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STANDALONE_H
#define _STANDALONE_H
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index d377dd5..9226bcc 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
+ This file is part of the GNU C Library.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <errno.h>
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index b1860dd..b823b5a 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -1,20 +1,20 @@
/* Copyright (C) 1997 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/arm/sysdep.h>
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index 3487ab2..b0a8daa 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This code wants to be run through m4. */
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index 7bd7192..e9ad4d5 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* OSF/1 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
index f1365e7..c54193f 100644
--- a/sysdeps/unix/bsd/sequent/i386/sysdep.h
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -1,21 +1,21 @@
/* System call interface code for Sequent Symmetry running Dynix version 3.
-Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/i386/sysdep.h>
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Get the symbols for system call interrupts. */
#include <machine/trap.h>
-
+
/* Use the BSD versions of system calls, by setting the high 16 bits
of the syscall number (see /usr/include/syscall.h). */
#define SYS_HANDLER (SYS_bsd << 16)
@@ -71,7 +71,7 @@ Cambridge, MA 02139, USA. */
#define ARGS_4 ARGS_3
#define ARGS_5 ARGS_3
#define ARGS_6 ARGS_3
-
+
/* Dynix reverses %ecx and %edx relative to most i386 Unices. */
#undef r1
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index a62c17e..e459856 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
index 471b516..61481cc 100644
--- a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
@@ -1,21 +1,21 @@
/* Structure describing state saved while handling a signal. Sun 3 version.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
struct sigcontext
{
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index db9ffb5..f5133db 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 80f6aba..1c501bc 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
index 290bf81..e1cdd41 100644
--- a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
@@ -1,21 +1,21 @@
/* Structure describing state saved while handling a signal. Sparc version.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
struct sigcontext
{
@@ -28,4 +28,3 @@ struct sigcontext
__ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
};
-
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 11ce194..5c0dcf2 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
index b719373..7c373c4 100644
--- a/sysdeps/unix/bsd/sun/sunos4/mmap.c
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/mman.h>
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index de6870a..8d929bc 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -1,21 +1,21 @@
/* `struct termios' speed frobnication functions. SunOS 4 version.
-Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <stddef.h>
#include <errno.h>
diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
index ecd04d1..7736504 100644
--- a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
+++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Ian Lance Taylor (ian@airs.com).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define _POSIX_JOB_CONTROL 1
#define _POSIX_SAVED_IDS 1
diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
index 4bddcf2..72b29e5 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Note that ANY change to this instantly implies a change to __handler.S. */
@@ -22,39 +23,38 @@ struct sigcontext
{
/* Nonzero if running on signal stack. */
int sc_onstack;
-
+
/* Signal mask to restore. */
__sigset_t sc_mask;
-
+
/* Program counter when the signal hit. */
__ptr_t sc_pc;
-
+
/* Registers 0 through 31. */
int sc_regs[32];
-
+
/* mul/div low and hi; these aren't part of a jmp_buf, but are part of the
sigcontext and are referenced from the signal trampoline code. */
int sc_mdlo;
int sc_mdhi;
-
+
/* Flag to see if the FP's been used. */
int sc_ownedfp;
-
+
/* Floating point registers 0 to 31. */
int sc_fpregs[32];
/* Control & status register for FP. */
int sc_fpc_csr;
-
+
/* Exception instruction register for FP. */
int sc_fpc_eir;
-
+
/* The coprocessor's cause register. */
int sc_cause;
-
+
/* CPU bad virtual address. */
__ptr_t sc_badvaddr;
-
+
/* CPU board bad physical address. */
__ptr_t sc_badpaddr;
};
-
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index a24c1c5..6bf8ca4 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Ian Lance Taylor (ian@airs.com).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* On Ultrix we can use the getsysinfo call to get the right return
value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index aeddad9..a2cf007 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index c09c5af..2f148d0 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h
index 49d2f9c..c185f22 100644
--- a/sysdeps/unix/sysv/irix4/bits/confname.h
+++ b/sysdeps/unix/sysv/irix4/bits/confname.h
@@ -1,21 +1,21 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
enum
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 6ba6219..290573a 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index 322813a..5d6313a 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <sys/resource.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
index 57ce5e6..e2e97bd 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -1,21 +1,21 @@
/* The proper definitions for Linux/Alpha sigaction.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
index be6132d..ac5c34c 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/signum.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -1,21 +1,21 @@
/* Signal number definitions. Linux/Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 8f5f5dd..6c88f76 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -1,21 +1,21 @@
-/* Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef ASSEMBLER
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 557f10c..5263c71 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
-December 1995.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
+ December 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
index 6b0c460..5bf5985 100644
--- a/sysdeps/unix/sysv/minix/bits/sigaction.h
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
index 0408951..3af9377 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
@@ -1,21 +1,21 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
-Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Values for the NAME argument to `pathconf' and `fpathconf'. */
#define _PC_LINK_MAX 0
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
index c21b928..f66877d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
@@ -1,21 +1,21 @@
/* The proper definitions for SCO's sigaction.
-Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
index 1305ba6..3a2ffb2 100644
--- a/sysdeps/unix/sysv/sysv4/bits/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -1,21 +1,21 @@
/* The proper definitions for SVR4's sigaction.
-Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
@@ -40,7 +40,7 @@ struct sigaction
#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
#define SA_NODEFER 0x10 /* Don't automatically block the signal when
- its handler is being executed. */
+ its handler is being executed. */
#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
#endif
#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index ad262e2..77ee6a0 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysv/i386/sysdep.h>
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 37893fa..4cd4150 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <signal.h>
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
index ce8dd35..316cd47 100644
--- a/sysdeps/unix/sysv/sysv4/siginfo.h
+++ b/sysdeps/unix/sysv/sysv4/siginfo.h
@@ -1,21 +1,22 @@
/* Definitions of the siginfo structure.
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SIGINFO_H
#define _SIGINFO_H 1
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 49eac9a..7cc10fd 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Solaris 2 does not precede the asm names of C symbols with a `_'. */
#ifndef NO_UNDERSCORES
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index cd0e844..98fdbb1 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <limits.h>
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h
index 77c84c7..6af9cb8 100644
--- a/sysdeps/unix/sysv/sysv4/sysconfig.h
+++ b/sysdeps/unix/sysv/sysv4/sysconfig.h
@@ -1,21 +1,22 @@
/* `__sysconfig' NAME values.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef __SYSCONFIG_H
#define __SYSCONFIG_H
@@ -25,4 +26,3 @@ Cambridge, MA 02139, USA. */
#define _CONFIG_CLK_TCK 7 /* all times are in CLK_TCKths of a second */
#endif
-
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index 586a374..4f43527 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <sys/wait.h>
diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h
index 49e7456..abf6662 100644
--- a/sysdeps/vax/fl.h
+++ b/sysdeps/vax/fl.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef __need_HUGE_VAL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5290f578122f110c2f89ff8e2b73db66064fbacf
commit 5290f578122f110c2f89ff8e2b73db66064fbacf
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 23 21:44:36 1997 +0000
Fix type of second argument.
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 1d43a75..d3ba27f 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -31,7 +31,7 @@
float_type
__CONCATX(__,FUNC) (x, exp)
float_type x;
- int exp;
+ long int exp;
{
return __m81_u(__CONCATX(__,FUNC))(x, exp);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79c6cc00ff501232c9d87b25360f64b848a1b91f
commit 79c6cc00ff501232c9d87b25360f64b848a1b91f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 23 21:44:21 1997 +0000
Rewritten.
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
index 51d9bee..a5923ab 100644
--- a/sysdeps/m68k/fpu/e_scalb.c
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -1,2 +1,61 @@
-#define FUNC __ieee754_scalb
-#include <e_fmod.c>
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+float_type
+s(__ieee754_scalb) (float_type x, float_type fn)
+{
+ float_type retval;
+ unsigned long x_cond = __m81_test (x);
+ unsigned long fn_cond = __m81_test (fn);
+
+ if ((x_cond | fn_cond) & __M81_COND_NAN)
+ return x * fn;
+
+ if (fn_cond & __M81_COND_INF)
+ {
+ if (!(fn_cond & __M81_COND_NEG))
+ return x * fn;
+ else if (x_cond & __M81_COND_ZERO)
+ return x;
+ else if (x_cond & __M81_COND_INF)
+ return 0.0/0.0;
+ else
+ return x / -fn;
+ }
+
+ if (m81(__rint) (fn) != fn)
+ return 0.0/0.0;
+
+ __asm ("fscale%.x %1, %0" : "=f" (retval) : "f" (fn), "0" (x));
+ return retval;
+}
diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/fpu/e_scalbf.c
index 1d2beae..7943571 100644
--- a/sysdeps/m68k/fpu/e_scalbf.c
+++ b/sysdeps/m68k/fpu/e_scalbf.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_scalbf
-#include <e_fmodf.c>
+#define SUFF f
+#define float_type float
+#include <e_scalb.c>
diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c
index 92ab7a4..35fb2dc 100644
--- a/sysdeps/m68k/fpu/e_scalbl.c
+++ b/sysdeps/m68k/fpu/e_scalbl.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_scalbl
-#include <e_fmodl.c>
+#define SUFF l
+#define float_type long double
+#include <e_scalb.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=622cae1af0111a9992452e2f0d8102d94db24ab7
commit 622cae1af0111a9992452e2f0d8102d94db24ab7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 23 21:43:50 1997 +0000
(FP_ILOGB0, FP_ILOGBNAN): Define.
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
index 4d07176..4eaa58a 100644
--- a/sysdeps/m68k/fpu/bits/mathdef.h
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#ifndef _MATH_H
-#error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
#endif
@@ -34,3 +34,7 @@ typedef long double double_t; /* `double' expressions are evaluated as
/* Define `INFINITY' as value of type `float_t'. */
#define INFINITY HUGE_VALL
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+#define FP_ILOGB0 0
+#define FP_ILOGBNAN 0x7fffffff
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1594e779baa44e4600d15eb2d4530194e80e0672
commit 1594e779baa44e4600d15eb2d4530194e80e0672
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jun 23 21:43:40 1997 +0000
(__scalbn): Fix type of second argument.
(__ilogb): Remove special case for zero, add stupid special case for NaN.
(__ieee754_scalb): Remove definition.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
index bdeaa9e..8899b75 100644
--- a/sysdeps/m68k/fpu/bits/mathinline.h
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -138,14 +138,6 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
float_type __result; \
__asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
- (float_type __x, float_type __n)) \
-{ \
- float_type __result; \
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
- return __result; \
}
__internal_inline_functions (double,)
@@ -268,13 +260,16 @@ __m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
{ \
float_type __result; \
- if (__x == 0.0) \
- return 0x80000001; \
+ if (__m81_u(__CONCAT(__isnan,s)) (__x)) \
+ /* The stupid standard requires us to return a specific value where \
+ it would depend on the bitpattern of the NaN. */ \
+ return 0x7fffffff; \
__asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
return (int) __result; \
} \
\
-__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
+__m81_defun (float_type, __CONCAT(__scalbn,s), \
+ (float_type __x, long int __n)) \
{ \
float_type __result; \
__asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
@@ -340,7 +335,7 @@ __inline_forward_c(double,ceil, (double __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinf, (double __value), (__value))
__inline_forward_c(int,finite, (double __value), (__value))
-__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
+__inline_forward_c(double,scalbn, (double __x, long int __n), (__x, __n))
#endif
#if defined __USE_MISC || defined __USE_XOPEN
#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
@@ -365,7 +360,7 @@ __inline_forward_c(float,ceilf, (float __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
-__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
+__inline_forward_c(float,scalbnf, (float __x, long int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
__inline_forward_c(int,ilogbf, (float __value), (__value))
#endif
@@ -384,7 +379,7 @@ __inline_forward_c(long double,ceill, (long double __x), (__x))
#ifdef __USE_MISC
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
-__inline_forward_c(long double,scalbnl, (long double __x, int __n),
+__inline_forward_c(long double,scalbnl, (long double __x, long int __n),
(__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
__inline_forward_c(int,ilogbl, (long double __value), (__value))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ca4b63aa00af1a47845e0935dfad8e262b8a290
commit 6ca4b63aa00af1a47845e0935dfad8e262b8a290
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:55:17 1997 +0000
Vax specific math values.
diff --git a/sysdeps/vax/bits/huge_val.h b/sysdeps/vax/bits/huge_val.h
new file mode 100644
index 0000000..f323049
--- /dev/null
+++ b/sysdeps/vax/bits/huge_val.h
@@ -0,0 +1,26 @@
+/* `HUGE_VAL' constant for Vaxen.
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+#error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+
+#define HUGE_VAL 1.70141182460469227e38
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=82b5be52d74386afc0cf6d07096ca83883d01d53
commit 82b5be52d74386afc0cf6d07096ca83883d01d53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:55:07 1997 +0000
Solaris/SPARC signal context definition.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
new file mode 100644
index 0000000..7402704
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/bits/sigcontext.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aed27181d3412572e566fe78d8c18a450fcb2d87
commit aed27181d3412572e566fe78d8c18a450fcb2d87
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:54:55 1997 +0000
Solaris/SPARC signal number definitions.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
new file mode 100644
index 0000000..4e55764
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h
@@ -0,0 +1,73 @@
+/* Signal number definitions. Solaris 2 version.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 24 /* Keyboard stop (POSIX). */
+#define SIGCONT 25 /* Continue (POSIX). */
+#define SIGTTIN 26 /* Background read from tty (POSIX). */
+#define SIGTTOU 27 /* Background write to tty (POSIX). */
+#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
+/* The following signals are new in Solaris 2. */
+#define SIGWAITING 32 /* Process's lwps are blocked. */
+#define SIGLWP 33 /* Special signal used by thread library. */
+#define SIGFREEZE 34 /* Special signal used by CPR. */
+#define SIGTHAW 35 /* Special signal used by CPR. */
+#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */
+#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 44 /* Biggest signal number + 1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6cf500d90785a672cbd2ccb4a5873248770eeec
commit f6cf500d90785a672cbd2ccb4a5873248770eeec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:54:46 1997 +0000
Solaris/SPARC struct stat definition.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
new file mode 100644
index 0000000..ea5f1f4
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h
@@ -0,0 +1,87 @@
+/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+#include <bits/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ unsigned long int st_dev;
+ long st_filler1[3];
+ __ino_t st_ino; /* File serial number. */
+ unsigned long int st_mode; /* File mode. */
+ /* This is unsigned long instead of __nlink_t, since SVR4 has
+ a long nlink_t, not a short one. */
+ unsigned long int st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long st_filler2[2];
+
+ __off_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long st_filler3;
+
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atime_usec;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtime_usec;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctime_usec;
+
+ long st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ long st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16];
+ long st_filler4[8];
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b9f6f616e268960a99a06f0c2d71586c8de4c42
commit 3b9f6f616e268960a99a06f0c2d71586c8de4c42
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:54:03 1997 +0000
SysVr4/I386 strcut stat definition.
diff --git a/sysdeps/unix/sysv/sysv4/i386/bits/stat.h b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
new file mode 100644
index 0000000..9b6fed0
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/bits/stat.h
@@ -0,0 +1,94 @@
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+#include <bits/types.h>
+
+/* Versions of the `struct stat' data structure and
+ the bits of the `xmknod' interface. */
+#define _STAT_VER 2
+#define _MKNOD_VER 2
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ unsigned long st_dev; /* Device. */
+ long st_filler1[3];
+ unsigned long st_ino; /* File serial number. */
+ unsigned long st_mode; /* File mode. */
+ unsigned long st_nlink; /* Link count. */
+ long st_uid; /* User ID of the file's owner. */
+ long st_gid; /* Group ID of the file's group.*/
+ unsigned long st_rdev; /* Device number, if device. */
+ long st_filler2[2];
+
+ long st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long st_filler3;
+
+ long st_atime; /* Time of last access. */
+ unsigned long st_atime_usec;
+ long st_mtime; /* Time of last modification. */
+ unsigned long st_mtime_usec;
+ long st_ctime; /* Time of last status change. */
+ unsigned long st_ctime_usec;
+
+ long st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ long st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16]; /* The type of this filesystem. */
+ int st_aclcnt;
+ unsigned long st_level;
+ unsigned long st_flags;
+ unsigned long st_cmwlevel;
+ long st_filler4[4];
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc961ebd7f305c6c5917b16102639cca887a8dca
commit fc961ebd7f305c6c5917b16102639cca887a8dca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:53:38 1997 +0000
SysVr4 info header.
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigaction.h b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
new file mode 100644
index 0000000..1305ba6
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/bits/sigaction.h
@@ -0,0 +1,51 @@
+/* The proper definitions for SVR4's sigaction.
+Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Special flags. */
+ int sa_flags;
+
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Padding. */
+ int sa_resv[2];
+ };
+
+/* Bits in `sa_flags'. */
+#ifdef __USE_MISC
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
+#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
+#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
+#define SA_NODEFER 0x10 /* Don't automatically block the signal when
+ its handler is being executed. */
+#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
+#endif
+#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/sysv4/bits/signum.h b/sysdeps/unix/sysv/sysv4/bits/signum.h
new file mode 100644
index 0000000..f11c731
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/bits/signum.h
@@ -0,0 +1,66 @@
+/* Signal number definitions. SVR4 version.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 24 /* Keyboard stop (POSIX). */
+#define SIGCONT 25 /* Continue (POSIX). */
+#define SIGTTIN 26 /* Background read from tty (POSIX). */
+#define SIGTTOU 27 /* Background write to tty (POSIX). */
+#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 32 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/sysv4/bits/sigset.h b/sysdeps/unix/sysv/sysv4/bits/sigset.h
new file mode 100644
index 0000000..1461c93
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/bits/sigset.h
@@ -0,0 +1,96 @@
+/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SIGSET_H_types
+#define _SIGSET_H_types 1
+
+typedef int __sig_atomic_t;
+
+/* A `sigset_t' has a bit for each signal. */
+typedef struct
+ {
+ unsigned long int __sigbits[4];
+ } __sigset_t;
+
+#endif /* ! _SIGSET_H_types */
+
+/* We only want to define these functions if <signal.h> was actually
+ included; otherwise we were included just to define the types. Since we
+ are namespace-clean, it wouldn't hurt to define extra macros. But
+ trouble can be caused by functions being defined (e.g., any global
+ register vars declared later will cause compilation errors). */
+
+#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
+#define _SIGSET_H_fns 1
+
+/* Return a mask that includes SIG only. */
+#define __sigmask(sig) (1 << ((sig) - 1))
+
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NSSBITS (sizeof (__sigset_t) * 8)
+#define __SSELT(s) ((s) / __NSSBITS)
+#define __SSMASK(s) (1 << ((s) % __NSSBITS))
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+_EXTERN_INLINE int
+__sigemptyset (__sigset_t *__set)
+{
+ __set->__sigbits[0] = __set->__sigbits[1] =
+ __set->__sigbits[2] = __set->__sigbits[3] = 0L;
+ return 0;
+}
+
+_EXTERN_INLINE int
+__sigfillset (__sigset_t *__set)
+{
+ /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits
+ for signals [1,31]. Setting bits for unimplemented signals seems
+ harmless (and we will find out if it really is). */
+ __set->__sigbits[0] = __set->__sigbits[1] =
+ __set->__sigbits[2] = __set->__sigbits[3] = ~0L;
+ return 0;
+}
+
+_EXTERN_INLINE int
+__sigaddset (__sigset_t *__set, int __sig)
+{
+ __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig);
+ return 0;
+}
+
+_EXTERN_INLINE int
+__sigdelset (__sigset_t *__set, int __sig)
+{
+ __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig);
+ return 0;
+}
+
+_EXTERN_INLINE int
+__sigismember (__const __sigset_t *__set, int __sig)
+{
+ if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig))
+ return 1;
+ return 0;
+}
+
+#endif /* ! _SIGSET_H_fns */
diff --git a/sysdeps/unix/sysv/sysv4/bits/utsname.h b/sysdeps/unix/sysv/sysv4/bits/utsname.h
new file mode 100644
index 0000000..9dcc618
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/bits/utsname.h
@@ -0,0 +1 @@
+#define _UTSNAME_LENGTH 257
diff --git a/sysdeps/unix/sysv/sysv4/bits/waitflags.h b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
new file mode 100644
index 0000000..29ff566
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/bits/waitflags.h
@@ -0,0 +1,34 @@
+/* Definitions of flag bits for `waitpid' et al.
+ Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_WAIT_H
+#error "Never use <bits/waitflags.h> directly; include <sys/wait.h> instead."
+#endif
+
+
+/* Bits in the third argument to `waitpid'. */
+#define WNOHANG 64 /* Don't block waiting. */
+#define WUNTRACED 4 /* Report status of stopped children. */
+
+#ifdef __USE_SVID
+#define WEXITED 1 /* Look for children that have exited. */
+#define WTRAPPED 2 /* Look for processes that stopped
+ while tracing. */
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0997fa96488c4dee3b15a3b2a9ceabbb170a9ecb
commit 0997fa96488c4dee3b15a3b2a9ceabbb170a9ecb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:53:24 1997 +0000
SCO3.2.4 limits.
diff --git a/sysdeps/unix/sysv/sco3.2/bits/local_lim.h b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h
new file mode 100644
index 0000000..365858c
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2/bits/local_lim.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _BITS_LOCAL_LIM_H
+#define _BITS_LOCAL_LIM_H 1
+
+#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */
+#define ARG_MAX 5120
+#define CHILD_MAX 25
+#define OPEN_MAX 60
+#define LINK_MAX 1000
+#define MAX_CANON 256
+
+/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs
+ file systems, even though the System V limits.h incorrectly
+ defines it as 14. Giving it a value which is too large
+ is harmless (it is a maximum). */
+#define NAME_MAX 255
+
+#define PATH_MAX 1024
+
+#endif /* bits/local_lim.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=31bbd45e49271acee83d8561f78bf73516d2b0d4
commit 31bbd45e49271acee83d8561f78bf73516d2b0d4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:53:14 1997 +0000
SCO3.2.4 info header.
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/confname.h b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
new file mode 100644
index 0000000..0408951
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/confname.h
@@ -0,0 +1,50 @@
+/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
+Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Values for the NAME argument to `pathconf' and `fpathconf'. */
+#define _PC_LINK_MAX 0
+#define _PC_MAX_CANON 1
+#define _PC_MAX_INPUT 2
+#define _PC_NAME_MAX 3
+#define _PC_PATH_MAX 4
+#define _PC_PIPE_BUF 5
+#define _PC_CHOWN_RESTRICTED 6
+#define _PC_NO_TRUNC 7
+#define _PC_VDISABLE 8
+
+/* Values for the argument to `sysconf'. */
+#define _SC_ARG_MAX 0
+#define _SC_CHILD_MAX 1
+#define _SC_CLK_TCK 2
+#define _SC_NGROUPS_MAX 3
+#define _SC_OPEN_MAX 4
+#define _SC_JOB_CONTROL 5
+#define _SC_SAVED_IDS 6
+#define _SC_VERSION 7
+#define _SC_PASS_MAX 8
+#define _SC_XOPEN_VERSION 9
+#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */
+
+#ifdef __USE_POSIX2
+/* Values for the NAME argument to `confstr'. */
+enum
+ {
+ _CS_PATH /* The default search path. */
+ };
+#endif
diff --git a/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
new file mode 100644
index 0000000..c21b928
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/bits/sigaction.h
@@ -0,0 +1,39 @@
+/* The proper definitions for SCO's sigaction.
+Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_SETMASK 0 /* Set the set of blocked signals. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3e014dfc6b15a0a392328989c3109c417fcb4e1
commit a3e014dfc6b15a0a392328989c3109c417fcb4e1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:52:56 1997 +0000
Minix signal definitions.
diff --git a/sysdeps/unix/sysv/minix/bits/sigaction.h b/sysdeps/unix/sysv/minix/bits/sigaction.h
new file mode 100644
index 0000000..6b0c460
--- /dev/null
+++ b/sysdeps/unix/sysv/minix/bits/sigaction.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#ifdef __USE_MISC
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
+#define SA_NODEFER 0x4 /* Don't block signal while catching it. */
+#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */
+#define SA_SIGINFO 0x10 /* Extended signal handling. */
+#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
+#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
+#define SA_DISABLE 0x100 /* Disable alternate signal stack. */
+#endif
+#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */
+
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 0 /* Block signals. */
+#define SIG_UNBLOCK 1 /* Unblock signals. */
+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2485f9c0e320765a9caf8f1b9df51d9f05f2b7e9
commit 2485f9c0e320765a9caf8f1b9df51d9f05f2b7e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:50:53 1997 +0000
Find socketcall.h.
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index e8db072..4d877e5 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
-#include <sys/socketcall.h>
+#include <socketcall.h>
#define P(a, b) P2(a, b)
#define P2(a, b) a##b
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index d0741af..1508b87 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#include <sys/socketcall.h>
+#include <socketcall.h>
#define P(a, b) P2(a, b)
#define P2(a, b) a##b
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=775690148ed39b7a249287138cd978edc0693184
commit 775690148ed39b7a249287138cd978edc0693184
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:49:46 1997 +0000
Linux/Alpha specific info header.
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
new file mode 100644
index 0000000..b70502f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -0,0 +1,100 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+#include <sys/types.h>
+
+
+/* In GNU, read and write are bits (unlike BSD). */
+#ifdef __USE_GNU
+#define O_READ O_RDONLY /* Open for reading. */
+#define O_WRITE O_WRONLY /* Open for writing. */
+#endif
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 01000 /* not fcntl */
+#define O_TRUNC 02000 /* not fcntl */
+#define O_EXCL 04000 /* not fcntl */
+#define O_NOCTTY 010000 /* not fcntl */
+
+#define O_NONBLOCK 00004
+#define O_APPEND 00010
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 040000
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
+
+#define F_DUPFD 0 /* dup */
+#define F_GETFD 1 /* get f_flags */
+#define F_SETFD 2 /* set f_flags */
+#define F_GETFL 3 /* more flags (cloexec) */
+#define F_SETFL 4
+#define F_GETLK 7
+#define F_SETLK 8
+#define F_SETLKW 9
+
+#define F_SETOWN 5 /* for sockets. */
+#define F_GETOWN 6 /* for sockets. */
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* for posix fcntl() and lockf() */
+#define F_RDLCK 1
+#define F_WRLCK 2
+#define F_UNLCK 8
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK 16 /* or 3 */
+#define F_SHLCK 32 /* or 4 */
+
+/* operations for bsd flock(), also used by the kernel implementation */
+#define LOCK_SH 1 /* shared lock */
+#define LOCK_EX 2 /* exclusive lock */
+#define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+#define LOCK_UN 8 /* remove lock */
+
+struct flock
+ {
+ short int l_type;
+ short int l_whence;
+ __off_t l_start;
+ __off_t l_len;
+ __pid_t l_pid;
+ };
+
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FASYNC O_ASYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
new file mode 100644
index 0000000..8a14f99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ioctls.h
@@ -0,0 +1,43 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/ioctl.h> instead.
+ */
+
+#ifndef _BITS_IOCTLS_H
+#define _BITS_IOCTLS_H 1
+
+/* Use the definitions from the kernel header files. */
+#include <asm/ioctls.h>
+#include <kernel_termios.h>
+
+/* Oh well, this is necessary since the kernel data structure is
+ different from the user-level version. */
+#undef TCGETS
+#undef TCSETS
+#undef TCSETSW
+#undef TCSETSF
+#define TCGETS _IOR ('t', 19, struct __kernel_termios)
+#define TCSETS _IOW ('t', 20, struct __kernel_termios)
+#define TCSETSW _IOW ('t', 21, struct __kernel_termios)
+#define TCSETSF _IOW ('t', 22, struct __kernel_termios)
+
+#include <linux/sockios.h>
+
+#endif /* bits/ioctls.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/ipc.h b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
new file mode 100644
index 0000000..57830da
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/ipc.h
@@ -0,0 +1,85 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IPC_BUF_H
+
+#define _SYS_IPC_BUF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'. */
+#define IPC_CREAT 01000 /* Create key if key does not exist. */
+#define IPC_EXCL 02000 /* Fail if key exists. */
+#define IPC_NOWAIT 04000 /* Return error on wait. */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'. */
+#define IPC_RMID 0 /* Remove identifier. */
+#define IPC_SET 1 /* Set `ipc_perm' options. */
+#define IPC_STAT 2 /* Get `ipc_perm' options. */
+#define IPC_INFO 3 /* See ipcs. */
+
+
+__BEGIN_DECLS
+
+/* Special key values. */
+#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
+
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+ {
+ __key_t __key; /* Key. */
+ unsigned int uid; /* Owner's user ID. */
+ unsigned int gid; /* Owner's group ID. */
+ unsigned int cuid; /* Creator's user ID. */
+ unsigned int cgid; /* Creator's group ID. */
+ unsigned int mode; /* Read/write permission. */
+ unsigned short int __seq; /* Sequence number. */
+ };
+
+
+/* Kludge to work around Linux' restriction of only up to five
+ arguments to a system call. */
+struct ipc_kludge
+ {
+ void *msgp;
+ long int msgtyp;
+ };
+
+/* The actual system call: all functions are multiplexed by this. */
+extern int __ipc __P ((int __call, int __first, int __second, int __third,
+ void *__ptr));
+
+/* The codes for the functions to use the multiplexer `__ipc'. */
+#define IPCOP_semop 1
+#define IPCOP_semget 2
+#define IPCOP_semctl 3
+#define IPCOP_msgsnd 11
+#define IPCOP_msgrcv 12
+#define IPCOP_msgget 13
+#define IPCOP_msgctl 14
+#define IPCOP_shmat 21
+#define IPCOP_shmdt 22
+#define IPCOP_shmget 23
+#define IPCOP_shmctl 24
+
+__END_DECLS
+
+#endif /* _SYS_IPC_BUF_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
new file mode 100644
index 0000000..57ce5e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
@@ -0,0 +1,51 @@
+/* The proper definitions for Linux/Alpha sigaction.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ unsigned int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#ifdef __USE_MISC
+#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
+#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when
+ its handler is being executed. */
+#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+
+/* Some aliases for the SA_ constants. */
+#define SA_NODEFER SA_NOMASK
+#define SA_RESETHAND SA_ONESHOT
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/signum.h b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
new file mode 100644
index 0000000..be6132d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/signum.h
@@ -0,0 +1,69 @@
+/* Signal number definitions. Linux/Alpha version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+/*
+ * Linux/AXP has different signal numbers that Linux/i386: I'm trying
+ * to make it OSF/1 binary compatible, at least for normal binaries.
+ */
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGEMT 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGBUS 10
+#define SIGSEGV 11
+#define SIGSYS 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGURG 16
+#define SIGSTOP 17
+#define SIGTSTP 18
+#define SIGCONT 19
+#define SIGCHLD 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGIO 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGINFO 29
+#define SIGUSR1 30
+#define SIGUSR2 31
+
+#define SIGPOLL SIGIO
+#define SIGPWR SIGINFO
+#define SIGIOT SIGABRT
+
+#define _NSIG 32 /* Biggest signal number + 1. */
+
+#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/stat.h b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
new file mode 100644
index 0000000..768b819
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/stat.h
@@ -0,0 +1,78 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER_LINUX_OLD 0
+#define _STAT_VER_LINUX 1
+#define _STAT_VER _STAT_VER_LINUX
+
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_LINUX 0
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+ __ino_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ __off_t st_size; /* Size of file, in bytes. */
+ __time_t st_atime; /* Time of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+ int st_blocks; /* Nr. of 512-byte blocks allocated. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
new file mode 100644
index 0000000..d0932c1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h
@@ -0,0 +1,193 @@
+/* termios type and macro definitions. Linux version.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _TERMBITS_H
+#define _TERMBITS_H 1
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 32
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[NCCS]; /* control characters */
+ cc_t c_line; /* line discipline (== c_cc[33]) */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
+
+/* c_cc characters */
+#define VEOF 0
+#define VEOL 1
+#define VEOL2 2
+#define VERASE 3
+#define VWERASE 4
+#define VKILL 5
+#define VREPRINT 6
+#define VSWTC 7
+#define VINTR 8
+#define VQUIT 9
+#define VSUSP 10
+#define VSTART 12
+#define VSTOP 13
+#define VLNEXT 14
+#define VDISCARD 15
+#define VMIN 16
+#define VTIME 17
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#ifdef __USE_BSD
+ /* POSIX.1 doesn't want these... */
+# define IXANY 0004000
+# define IUCLC 0010000
+# define IMAXBEL 0020000
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define ONLCR 0000002
+#define OLCUC 0000004
+
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+
+#define OFILL 00000100
+#define OFDEL 00000200
+#define NLDLY 00001400
+#define NL0 00000000
+#define NL1 00000400
+#define NL2 00001000
+#define NL3 00001400
+#define TABDLY 00006000
+#define TAB0 00000000
+#define TAB1 00002000
+#define TAB2 00004000
+#define TAB3 00006000
+#define CRDLY 00030000
+#define CR0 00000000
+#define CR1 00010000
+#define CR2 00020000
+#define CR3 00030000
+#define FFDLY 00040000
+#define FF0 00000000
+#define FF1 00040000
+#define BSDLY 00100000
+#define BS0 00000000
+#define BS1 00100000
+#define VTDLY 00200000
+#define VT0 00000000
+#define VT1 00200000
+#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+
+/* c_cflag bit meaning */
+#define CBAUD 0000037
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CBAUDEX 0000000
+#define B57600 00020
+#define B115200 00021
+#define B230400 00022
+#define B460800 00023
+
+#define CSIZE 00001400
+#define CS5 00000000
+#define CS6 00000400
+#define CS7 00001000
+#define CS8 00001400
+
+#define CSTOPB 00002000
+#define CREAD 00004000
+#define PARENB 00010000
+#define PARODD 00020000
+#define HUPCL 00040000
+
+#define CLOCAL 00100000
+#define CRTSCTS 020000000000 /* flow control */
+
+/* c_lflag bits */
+#define ISIG 0x00000080
+#define ICANON 0x00000100
+#define XCASE 0x00004000
+#define ECHO 0x00000008
+#define ECHOE 0x00000002
+#define ECHOK 0x00000004
+#define ECHONL 0x00000010
+#define NOFLSH 0x80000000
+#define TOSTOP 0x00400000
+#define ECHOCTL 0x00000040
+#define ECHOPRT 0x00000020
+#define ECHOKE 0x00000001
+#define FLUSHO 0x00800000
+#define PENDIN 0x20000000
+#define IEXTEN 0x00000400
+
+/* Values for the ACTION argument to `tcflow'. */
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+#endif /* _TERMBITS_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h
new file mode 100644
index 0000000..7475b68
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h
@@ -0,0 +1,54 @@
+/* System-dependent timing definitions. Linux/Alpha version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <time.h> instead.
+ */
+
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ int tv_sec; /* Seconds. */
+ int tv_usec; /* Microseconds. */
+ };
+# endif /* struct timeval */
+#endif /* need timeval */
+
+
+#ifndef _BITS_TIME_H
+#define _BITS_TIME_H 1
+
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+ The macro `CLOCKS_PER_SEC' is the number per second of the value
+ returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+ The value of CLOCKS_PER_SEC is required to be 1 million on all
+ XSI-conformant systems. */
+# define CLOCKS_PER_SEC 1000000
+
+/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
+ presents the real value for clock ticks per second for the system. */
+# define CLK_TCK 1024
+
+#endif /* bits/time.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h
new file mode 100644
index 0000000..9a4666a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h
@@ -0,0 +1,95 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/types.h> instead.
+ */
+
+#ifndef _BITS_TYPES_H
+#define _BITS_TYPES_H 1
+
+#include <features.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+typedef unsigned long int __u_quad_t;
+typedef long int __quad_t;
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+typedef __quad_t *__qaddr_t;
+
+typedef __u_long __dev_t; /* Type of device numbers. */
+typedef __u_int __uid_t; /* Type of user identifications. */
+typedef __u_int __gid_t; /* Type of group identifications. */
+typedef __u_int __ino_t; /* Type of file serial numbers. */
+typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
+typedef __u_int __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef int __pid_t; /* Type of process identifications. */
+typedef long int __ssize_t; /* Type of a byte count, or error. */
+
+typedef struct
+ {
+ int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
+
+/* Everythin' else. */
+typedef int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+
+typedef long int __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef unsigned long int __fd_mask;
+
+/* Due to incaution, we may have gotten these from a kernel header file. */
+#undef __FD_SETSIZE
+#undef __NFDBITS
+#undef __FDMASK
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) (1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. */
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+ } __fd_set;
+
+
+typedef int __key_t;
+
+#endif /* bits/types.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f735960c20b85e8a73632c6ba6740f2cea9eeb53
commit f735960c20b85e8a73632c6ba6740f2cea9eeb53
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:49:27 1997 +0000
moved up.
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
deleted file mode 100644
index 4be759a..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _SYS_KERNEL_TERMIOS_H
-#define _SYS_KERNEL_TERMIOS_H 1
-/* The following corresponds to the values from the Linux 2.1.20 kernel. */
-
-/* We need the definition of tcflag_t, cc_t, and speed_t. */
-#include <termbits.h>
-
-#define __KERNEL_NCCS 19
-
-struct __kernel_termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_cc[__KERNEL_NCCS]; /* control characters */
- cc_t c_line; /* line discipline */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
- };
-
-#define _HAVE_C_ISPEED 1
-#define _HAVE_C_OSPEED 1
-
-#endif /* sys/kernel_termios.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=761ac1b6d04e59a991074c13f3805155660550da
commit 761ac1b6d04e59a991074c13f3805155660550da
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:48:51 1997 +0000
Kernel specific termios struct.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
new file mode 100644
index 0000000..093ac25
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _KERNEL_TERMIOS_H
+#define _KERNEL_TERMIOS_H 1
+
+/* The following corresponds to the values from the Linux 2.1.20 kernel. */
+
+/* We need the definition of tcflag_t, cc_t, and speed_t. */
+#include <bits/termios.h>
+
+#define __KERNEL_NCCS 19
+
+struct __kernel_termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[__KERNEL_NCCS]; /* control characters */
+ cc_t c_line; /* line discipline */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
+
+#define _HAVE_C_ISPEED 1
+#define _HAVE_C_OSPEED 1
+
+#endif /* kernel_termios.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e58babee4e4b7e25bdbca5c5eb3f0aa9f25626a9
commit e58babee4e4b7e25bdbca5c5eb3f0aa9f25626a9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:48:21 1997 +0000
Irix4 specific info header.
diff --git a/sysdeps/unix/sysv/irix4/bits/confname.h b/sysdeps/unix/sysv/irix4/bits/confname.h
new file mode 100644
index 0000000..49d2f9c
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/bits/confname.h
@@ -0,0 +1,80 @@
+/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Values for the NAME argument to `pathconf' and `fpathconf'. */
+enum
+ {
+ _PC_LINK_MAX = 1,
+ _PC_MAX_CANON,
+ _PC_MAX_INPUT,
+ _PC_NAME_MAX,
+ _PC_PATH_MAX,
+ _PC_PIPE_BUF,
+ _PC_CHOWN_RESTRICTED,
+ _PC_NO_TRUNC,
+ _PC_VDISABLE
+ };
+
+/* Values for the argument to `sysconf'. */
+enum
+ {
+ _SC_ARG_MAX = 1,
+ _SC_CHILD_MAX,
+ _SC_CLK_TCK,
+ _SC_NGROUPS_MAX,
+ _SC_OPEN_MAX,
+ _SC_JOB_CONTROL,
+ _SC_SAVED_IDS,
+ _SC_VERSION,
+
+ /* Above are done by the Irix system call.
+ The rest are done by the C library (or are not really implemented). */
+
+ _SC_STREAM_MAX,
+ _SC_TZNAME_MAX,
+ _SC_PAGESIZE,
+
+ /* Values for the argument to `sysconf'
+ corresponding to _POSIX2_* symbols. */
+ _SC_BC_BASE_MAX,
+ _SC_BC_DIM_MAX,
+ _SC_BC_SCALE_MAX,
+ _SC_BC_STRING_MAX,
+ _SC_COLL_WEIGHTS_MAX,
+ _SC_EQUIV_CLASS_MAX,
+ _SC_EXPR_NEST_MAX,
+ _SC_LINE_MAX,
+ _SC_RE_DUP_MAX,
+
+ _SC_2_VERSION,
+ _SC_2_C_BIND,
+ _SC_2_C_DEV,
+ _SC_2_FORT_DEV,
+ _SC_2_FORT_RUN,
+ _SC_2_SW_DEV,
+ _SC_2_LOCALEDEF
+ };
+
+#ifdef __USE_POSIX2
+/* Values for the NAME argument to `confstr'. */
+enum
+ {
+ _CS_PATH /* The default search path. */
+ };
+#endif
diff --git a/sysdeps/unix/sysv/irix4/bits/fcntl.h b/sysdeps/unix/sysv/irix4/bits/fcntl.h
new file mode 100644
index 0000000..a926d04
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/bits/fcntl.h
@@ -0,0 +1,107 @@
+/* O_*, F_*, FD_* bit values for SGI Irix 4.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 00400 /* Create file if it doesn't exist. */
+#define O_EXCL 02000 /* Fail if file already exists. */
+#define O_TRUNC 01000 /* Truncate file to zero length. */
+#ifdef __USE_MISC
+#define O_SYNC 00020 /* Synchronous writes. */
+#define O_FSYNC O_SYNC
+#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */
+#endif
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 000010 /* Writes append to the file. */
+#ifdef __USE_BSD
+#define O_NDELAY 000004 /* Non-blocking I/O. */
+#endif
+#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 5 /* Get record locking info. */
+#define F_SETLK 6 /* Set record locking info. */
+#define F_SETLKW 7 /* Set record locking info, wait. */
+#ifdef __USE_MISC
+#define F_CHKFL 8 /* Check legality of file flag changes. */
+#define F_ALLOCSP 10
+#define F_FREESP 11
+#define F_SETBSDLK 12 /* Set Berkeley record lock. */
+#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */
+#define F_RGETLK 20 /* Get info on a remote lock. */
+#define F_RSETLK 21 /* Set or unlock a remote lock. */
+#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */
+#define F_GETOWN 10 /* Get owner; only works on sockets. */
+#define F_SETOWN 11 /* Set owner; only works on sockets. */
+#endif
+
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <bits/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_sysid; /* System ID where locking process resides. */
+ short int l_pid; /* Process holding the lock. */
+ };
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
+
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FASYNC O_ASYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
diff --git a/sysdeps/unix/sysv/irix4/bits/signum.h b/sysdeps/unix/sysv/irix4/bits/signum.h
new file mode 100644
index 0000000..13314cf
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/bits/signum.h
@@ -0,0 +1,68 @@
+/* Signal number definitions. Irix4 version.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* This file defines the fake signal functions and signal
+ number constants for SGI Irix 4. */
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1)
+#define SIG_DFL ((__sighandler_t) 0)
+#define SIG_IGN ((__sighandler_t) 1)
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap. */
+#define SIGEMT 7 /* EMT trap. */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call*/
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power going down. */
+#define SIGSTOP 20 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 21 /* Keyboard stop (POSIX). */
+#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
+#define SIGIO 23 /* I/O now possible. */
+#define SIGURG 24 /* Urgent condition on socket.*/
+#define SIGWINCH 25 /* Window size change. */
+#define SIGVTALRM 26 /* Virtual alarm clock. */
+#define SIGPROF 27 /* Profiling alarm clock. */
+#define SIGCONT 28 /* Continue (POSIX). */
+#define SIGTTIN 29 /* Background read from tty (POSIX). */
+#define SIGTTOU 30 /* Background write to tty (POSIX). */
+#define SIGXCPU 31 /* CPU limit exceeded. */
+#define SIGXFSZ 32 /* File size limit exceeded. */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 33 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/irix4/bits/stat.h b/sysdeps/unix/sysv/irix4/bits/stat.h
new file mode 100644
index 0000000..0dab45c
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/bits/stat.h
@@ -0,0 +1,65 @@
+/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
+struct stat
+ {
+ unsigned long st_ino;
+ short int st_dev;
+ unsigned short int st_mode;
+ short int st_nlink;
+ unsigned short int st_uid;
+ unsigned short int st_gid;
+ short int st_rdev;
+ long int st_size;
+ long int st_atime;
+ long int st_mtime;
+ long int st_ctime;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7b32a330ab02e6b44516eb629ac72d4250a63c6
commit f7b32a330ab02e6b44516eb629ac72d4250a63c6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:47:13 1997 +0000
Ultrix/MIPS specific signal context.
diff --git a/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
new file mode 100644
index 0000000..4bddcf2
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/bits/sigcontext.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Note that ANY change to this instantly implies a change to __handler.S. */
+
+struct sigcontext
+ {
+ /* Nonzero if running on signal stack. */
+ int sc_onstack;
+
+ /* Signal mask to restore. */
+ __sigset_t sc_mask;
+
+ /* Program counter when the signal hit. */
+ __ptr_t sc_pc;
+
+ /* Registers 0 through 31. */
+ int sc_regs[32];
+
+ /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the
+ sigcontext and are referenced from the signal trampoline code. */
+ int sc_mdlo;
+ int sc_mdhi;
+
+ /* Flag to see if the FP's been used. */
+ int sc_ownedfp;
+
+ /* Floating point registers 0 to 31. */
+ int sc_fpregs[32];
+ /* Control & status register for FP. */
+ int sc_fpc_csr;
+
+ /* Exception instruction register for FP. */
+ int sc_fpc_eir;
+
+ /* The coprocessor's cause register. */
+ int sc_cause;
+
+ /* CPU bad virtual address. */
+ __ptr_t sc_badvaddr;
+
+ /* CPU board bad physical address. */
+ __ptr_t sc_badpaddr;
+ };
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d08481430db1aaddde5b349f6b7f03116f82334
commit 0d08481430db1aaddde5b349f6b7f03116f82334
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:46:56 1997 +0000
Ultrix specific info header.
diff --git a/sysdeps/unix/bsd/ultrix4/bits/fcntl.h b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
new file mode 100644
index 0000000..1398b81
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/bits/fcntl.h
@@ -0,0 +1,122 @@
+/* O_*, F_*, FD_* bit values for Ultrix 4.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
+#define O_EXCL 0x0800 /* Fail if file already exists. */
+#define O_TRUNC 0x0400 /* Truncate file to zero length. */
+#ifdef __USE_MISC
+#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
+#define O_FSYNC 0x8000 /* Synchronous writes. */
+#define O_SYNC O_FSYNC
+#define O_BLKINUSE 0x1000 /* Block if "in use". */
+#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */
+#define O_TERMIO 0x40000 /* "termio style program". */
+#endif
+#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 0x0008 /* Writes append to the file. */
+#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */
+
+#ifdef __USE_BSD
+#define O_NDELAY 0x0004
+#endif
+
+#ifdef __USE_BSD
+/* Bits in the file status flags returned by F_GETFL.
+ These are all the O_* flags, plus FREAD and FWRITE, which are
+ independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
+ given to `open'. */
+#define FREAD 1
+#define FWRITE 2
+
+/* Traditional BSD names the O_* bits. */
+#define FASYNC O_ASYNC
+#define FCREAT O_CREAT
+#define FEXCL O_EXCL
+#define FTRUNC O_TRUNC
+#define FNOCTTY O_NOCTTY
+#define FFSYNC O_FSYNC
+#define FSYNC O_SYNC
+#define FAPPEND O_APPEND
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#define FNBLOCK O_NONBLOCK
+#define FTERMIO O_TERMIO
+#define FNOCTTY O_NOCTTY
+#define FSYNCRON O_FSYNC
+#define FBLKINUSE O_BLKINUSE
+#define FBLKANDSET O_BLKANDSET
+#endif
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifdef __USE_BSD
+#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+#endif
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+#ifdef __USE_MISC
+#define F_SETSYN 10 /* Set synchronous writing. */
+#define F_CLRSYN 10 /* Clear synchronous writing. */
+#endif
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <bits/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
diff --git a/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
new file mode 100644
index 0000000..ecd04d1
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/bits/posix_opt.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define _POSIX_JOB_CONTROL 1
+#define _POSIX_SAVED_IDS 1
+#define _POSIX_CHOWN_RESTRICTED 1
+#define _POSIX_NO_TRUNC 1
+#define _POSIX_VDISABLE ((unsigned char) -1)
diff --git a/sysdeps/unix/bsd/ultrix4/bits/utsname.h b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
new file mode 100644
index 0000000..ad4389a
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/bits/utsname.h
@@ -0,0 +1 @@
+#define _UTSNAME_LENGTH 32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da366793e17337c0e6f9ff0cf13299700152697a
commit da366793e17337c0e6f9ff0cf13299700152697a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:46:36 1997 +0000
Use bits/foo.h.
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index 8b30f3f..ab76d75 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -25,7 +25,7 @@ SYSCALL (sethostid, 1)
#else
-#include <errnos.h>
+#include <bits/errno.h>
.globl _sethostid
.even
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index fbafba5..f8ee805 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -25,9 +25,9 @@ SYSCALL (sethostid, 1)
#else
-/* <errnos.h> only defines E* #ifdef _ERRNO_H. */
+/* <bits/errno.h> only defines E* #ifdef _ERRNO_H. */
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
ENTRY (sethostid)
mov ENOSYS, %o0
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index fb38c34..65771a2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -22,7 +22,7 @@
#define _SYS_MMAN_H 1
#include <features.h>
-#include <gnu/types.h>
+#include <bits/types.h>
#define __need_size_t
#include <stddef.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c89e913d713f4bdfbf13e9c0812677781c9a0468
commit c89e913d713f4bdfbf13e9c0812677781c9a0468
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:46:22 1997 +0000
SunOS specific info header.
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
new file mode 100644
index 0000000..b74c80e
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h
@@ -0,0 +1,142 @@
+/* O_*, F_*, FD_* bit values for SunOS 4.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTL_H
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
+#define O_EXCL 0x0800 /* Fail if file already exists. */
+#define O_TRUNC 0x0400 /* Truncate file to zero length. */
+#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
+#if defined __USE_BSD || defined __USE_SVID
+#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
+#define O_FSYNC 0x2000 /* Synchronous writes. */
+#define O_SYNC O_FSYNC
+#endif
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 0x0008 /* Writes append to the file. */
+#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */
+
+/* Sun defines O_NDELAY one way for BSD behavior and another for System V
+ behavior. In the GNU C library, you get the BSD behavior unless you
+ define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */
+#ifdef __USE_BSD
+#define O_NDELAY 0x0004
+#endif
+#if !defined (O_NDELAY) && defined (__USE_SVID)
+#define O_NDELAY 0x1000
+#endif
+
+#ifdef __USE_BSD
+/* Bits in the file status flags returned by F_GETFL.
+ These are all the O_* flags, plus FREAD and FWRITE, which are
+ independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
+ given to `open'. */
+#define FREAD 1
+#define FWRITE 2
+
+/* Traditional Unix names the O_* bits. */
+#define FASYNC O_ASYNC
+#define FCREAT O_CREAT
+#define FEXCL O_EXCL
+#define FTRUNC O_TRUNC
+#define FNOCTTY O_NOCTTY
+#define FFSYNC O_FSYNC
+#define FSYNC O_SYNC
+#define FAPPEND O_APPEND
+#define FNONBLOCK O_NONBLOCK
+#define FNONBIO O_NONBLOCK
+#define FNDELAY 0x0004 /* BSD O_NDELAY. */
+#define FNBIO 0x1000 /* System V O_NDELAY. */
+#endif
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifdef __USE_BSD
+#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+#endif
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+#ifdef __USE_BSD
+#define F_RGETLK 10 /* Get remote record locking info. */
+#define F_RSETLK 11 /* Set remote locking info (non-blocking). */
+#define F_CNVT 12 /* Convert a fhandle to an open fd. */
+#define F_RSETLKW 13 /* Set remote locking info (blocking). */
+#endif
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <bits/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_pid; /* Process holding the lock. */
+ short int l_xxx; /* Reserved for future use. */
+ };
+
+#ifdef __USE_BSD
+/* The structure describing a remote advisory lock. This is the type of the
+ third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */
+struct eflock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_pid; /* Process holding the lock. */
+ short int l_xxx; /* Reserved for future use. */
+ long int l_rpid; /* Remote process ID wanting this lock. */
+ long int l_rsys; /* Remote system ID wanting this lock. */
+ };
+
+#endif
+
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
new file mode 100644
index 0000000..ff55773
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h
@@ -0,0 +1,139 @@
+/* Bit values for resource limits. SunOS 4 version.
+ Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
+ subset of these kinds of resource limit. In systems where `getrlimit'
+ and `setrlimit' are not system calls, these are the values used by the C
+ library to emulate them. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+ {
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU,
+#define RLIMIT_CPU RLIMIT_CPU
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA,
+#define RLIMIT_DATA RLIMIT_DATA
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK,
+#define RLIMIT_STACK RLIMIT_STACK
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE,
+#define RLIMIT_CORE RLIMIT_CORE
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS,
+#define RLIMIT_RSS RLIMIT_RSS
+ /* Number of open files. */
+ RLIMIT_NOFILE,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
+
+ RLIM_NLIMITS,
+
+ RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */
+#define RLIM_INFINITY RLIM_INFINITY
+ };
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ int rlim_cur;
+ /* The hard limit. */
+ int rlim_max;
+ };
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+/* The macro definitions are necessary because some programs want
+ to test for operating system features with #ifdef RUSAGE_SELF.
+ In ISO C the reflexive definition is a no-op. */
+ {
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+ };
+
+#include <sys/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+ {
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+ PRIO_USER = 2 /* WHO is a user ID. */
+ };
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/termios.h b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
new file mode 100644
index 0000000..dc0a007
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/termios.h
@@ -0,0 +1,208 @@
+/* termios type and macro definitions. SunOS 4 version.
+ Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Type of terminal control flag masks. */
+typedef unsigned long int tcflag_t;
+
+/* Type of control characters. */
+typedef unsigned char cc_t;
+
+/* Type of baud rate specifiers. */
+typedef unsigned int speed_t;
+
+/* Terminal control structure. */
+struct termios
+{
+ /* Input modes. */
+ tcflag_t c_iflag;
+#define IGNBRK 0x0001 /* Ignore break condition. */
+#define BRKINT 0x0002 /* Signal interrupt on break. */
+#define IGNPAR 0x0004 /* Ignore characters with parity errors. */
+#define PARMRK 0x0008 /* Mark parity and framing errors. */
+#define INPCK 0x0010 /* Enable input parity check. */
+#define ISTRIP 0x0020 /* Strip 8th bit off characters. */
+#define INLCR 0x0040 /* Map NL to CR on input. */
+#define IGNCR 0x0080 /* Ignore CR. */
+#define ICRNL 0x0100 /* Map CR to NL on input. */
+#ifdef __USE_BSD
+#define IUCLC 0x0200 /* Map upper case to lower case on input. */
+#endif
+#define IXON 0x0400 /* Enable start/stop output control. */
+#define IXOFF 0x1000 /* Enable start/stop input control. */
+#ifdef __USE_BSD
+#define IXANY 0x0800 /* Any character will restart after stop. */
+#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */
+#endif
+
+ /* Output modes. */
+ tcflag_t c_oflag;
+#define OPOST 0x0001 /* Perform output processing. */
+#ifdef __USE_BSD
+#define OLCUC 0x00000002 /* Map lower case to upper case on output. */
+#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */
+#define OCRNL 0x00000008
+#define ONOCR 0x00000010
+#define ONLRET 0x00000020
+#define OFILL 0x00000040
+#define OFDEL 0x00000080
+#define NLDLY 0x00000100
+#define NL0 0
+#define NL1 0x00000100
+#define CRDLY 0x00000600
+#define CR0 0
+#define CR1 0x00000200
+#define CR2 0x00000400
+#define CR3 0x00000600
+#define TABDLY 0x00001800
+#define TAB0 0
+#define TAB1 0x00000800
+#define TAB2 0x00001000
+#define XTABS 0x00001800
+#define TAB3 XTABS
+#define BSDLY 0x00002000
+#define BS0 0
+#define BS1 0x00002000
+#define VTDLY 0x00004000
+#define VT0 0
+#define VT1 0x00004000
+#define FFDLY 0x00008000
+#define FF0 0
+#define FF1 0x00008000
+#define PAGEOUT 0x00010000
+#define WRAP 0x00020000
+#endif
+
+ /* Control modes. */
+ tcflag_t c_cflag;
+#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
+#define CS5 0 /* 5 bits per byte. */
+#define CS6 0x00000010 /* 6 bits per byte. */
+#define CS7 0x00000020 /* 7 bits per byte. */
+#define CS8 0x00000030 /* 8 bits per byte. */
+#define CSTOPB 0x00000040 /* Two stop bits instead of one. */
+#define CREAD 0x00000080 /* Enable receiver. */
+#define PARENB 0x00000100 /* Parity enable. */
+#define PARODD 0x00000200 /* Odd parity instead of even. */
+#define HUPCL 0x00000400 /* Hang up on last close. */
+#define CLOCAL 0x00000800 /* Ignore modem status lines. */
+#ifdef __USE_BSD
+#define LOBLK 0x00001000
+#define CRTSCTS 0x80000000
+#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */
+#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */
+#define IBSHIFT 16 /* Bits to shift for input speed. */
+#endif
+
+ /* Input and output baud rates. These are encoded in c_cflag. */
+#define B0 0
+#define B50 1
+#define B75 2
+#define B110 3
+#define B134 4
+#define B150 5
+#define B200 6
+#define B300 7
+#define B600 8
+#define B1200 9
+#define B1800 10
+#define B2400 11
+#define B4800 12
+#define B9600 13
+#define B19200 14
+#define B38400 15
+#ifdef __USE_BSD
+#define EXTA 14
+#define EXTB 15
+#endif
+
+ /* Local modes. */
+ tcflag_t c_lflag;
+#ifdef __USE_BSD
+#define ECHOKE 0x00000800 /* Visual erase for KILL. */
+#endif
+#define ECHOE 0x00000010 /* Visual erase for ERASE. */
+#define ECHOK 0x00000020 /* Echo NL after KILL. */
+#define ECHO 0x00000008 /* Enable echo. */
+#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */
+#ifdef __USE_BSD
+#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */
+#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */
+#endif
+#define ISIG 0x00000001 /* Enable signals. */
+#define ICANON 0x00000002 /* Do erase and kill processing. */
+#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */
+#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */
+#ifdef __USE_BSD
+#define PENDIN 0x00004000 /* Retype pending input (state). */
+#endif
+#define NOFLSH 0x00000080 /* Disable flush after interrupt. */
+
+ char c_line; /* Line discipline (?) */
+
+ /* Control characters. */
+#define VEOF 4 /* End-of-file character [ICANON]. */
+#define VEOL 5 /* End-of-line character [ICANON]. */
+#ifdef __USE_BSD
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTCH 7 /* ??? */
+#endif
+#define VERASE 2 /* Erase character [ICANON]. */
+#ifdef __USE_BSD
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#endif
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#ifdef __USE_BSD
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#endif
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+#ifdef __USE_BSD
+#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+#endif
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#ifdef __USE_BSD
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#endif
+#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */
+#define NCCS 17
+ cc_t c_cc[NCCS];
+};
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
+#define TCSANOW 0 /* Change immediately. */
+#define TCSADRAIN 1 /* Change when pending output is written. */
+#define TCSAFLUSH 2 /* Flush pending input before changing. */
+
+/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
+#define TCIFLUSH 0 /* Discard data received but not yet read. */
+#define TCOFLUSH 1 /* Discard data written but not yet sent. */
+#define TCIOFLUSH 2 /* Discard all pending data. */
+
+/* Values for the ACTION argument to `tcflow'. */
+#define TCOOFF 0 /* Suspend output. */
+#define TCOON 1 /* Restart suspended output. */
+#define TCIOFF 2 /* Send a STOP character. */
+#define TCION 3 /* Send a START character. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
new file mode 100644
index 0000000..e9111b6
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/bits/utsname.h
@@ -0,0 +1,2 @@
+#define _UTSNAME_LENGTH 9
+#define _UTSNAME_NODENAME_LENGTH 65
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94d056b77295c2b4fab431343d8b460b121ecf74
commit 94d056b77295c2b4fab431343d8b460b121ecf74
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:46:02 1997 +0000
SunOS/SPARC signal context.
diff --git a/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
new file mode 100644
index 0000000..290bf81
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/bits/sigcontext.h
@@ -0,0 +1,31 @@
+/* Structure describing state saved while handling a signal. Sparc version.
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+struct sigcontext
+ {
+ int sc_onstack;
+ __sigset_t sc_mask;
+
+#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
+ int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
+ int sc_wbcnt; /* Number of outstanding windows. */
+ __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
+ int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
+ };
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2fbc33a169801eeb43765469e5183f7eb99a7d28
commit 2fbc33a169801eeb43765469e5183f7eb99a7d28
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:45:56 1997 +0000
SunOS/m68k signal context.
diff --git a/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
new file mode 100644
index 0000000..471b516
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/bits/sigcontext.h
@@ -0,0 +1,26 @@
+/* Structure describing state saved while handling a signal. Sun 3 version.
+Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+struct sigcontext
+ {
+ int sc_onstack;
+ __sigset_t sc_mask;
+
+ int sc_sp, sc_pc, sc_ps;
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08ed181c50a2cf83838ec7a41aec8fb77a3b638b
commit 08ed181c50a2cf83838ec7a41aec8fb77a3b638b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:45:26 1997 +0000
SunOS specific signal numbers.
diff --git a/sysdeps/unix/bsd/sun/bits/signum.h b/sysdeps/unix/bsd/sun/bits/signum.h
new file mode 100644
index 0000000..a327401
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/bits/signum.h
@@ -0,0 +1,69 @@
+/* Signal number definitions. SunOS version.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef _SIGNAL_H
+
+/* This file defines the fake signal functions and signal
+ number constants for SunOS 3 and 4 Unix systems. */
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */
+#define SIGSTOP 17 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 18 /* Keyboard stop (POSIX). */
+#define SIGCONT 19 /* Continue (POSIX). */
+#define SIGCHLD 20 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGTTIN 21 /* Background read from tty (POSIX). */
+#define SIGTTOU 22 /* Background write to tty (POSIX). */
+#define SIGIO 23 /* I/O now possible (4.2 BSD). */
+#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */
+#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
+#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
+#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
+#define SIGLOST 29 /* Resource lost (Sun). */
+#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 32 /* Biggest signal number + 1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=619d7796626ce21ddc759a85d9d8b62ece2ca91b
commit 619d7796626ce21ddc759a85d9d8b62ece2ca91b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:45:03 1997 +0000
OSF specific signal struct.
diff --git a/sysdeps/unix/bsd/osf/bits/sigaction.h b/sysdeps/unix/bsd/osf/bits/sigaction.h
new file mode 100644
index 0000000..df400d4
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/bits/sigaction.h
@@ -0,0 +1,46 @@
+/* Structure and constant definitions for sigaction et al. OSF/1 version.
+ Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#ifdef __USE_BSD
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
+#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+#endif
+#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */
+
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c7efcee0a1c65f07b84bac3ebebf278a464c1ef
commit 5c7efcee0a1c65f07b84bac3ebebf278a464c1ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:44:56 1997 +0000
OSF/Alpha specific stat struct.
diff --git a/sysdeps/unix/bsd/osf/alpha/bits/stat.h b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
new file mode 100644
index 0000000..752d4ee
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/bits/stat.h
@@ -0,0 +1,80 @@
+/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/*
+ * Never include this file directly; use <sys/stat.h> instead.
+ */
+
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H
+
+#include <bits/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ int st_dev; /* Device. */
+ unsigned int st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned short st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group.*/
+ int st_rdev; /* Device number, if device. */
+
+ long st_size; /* Size of file, in bytes. */
+
+ int st_atime; /* Time of last access. */
+ int st_atime_usec;
+ int st_mtime; /* Time of last modification. */
+ int st_mtime_usec;
+ int st_ctime; /* Time of last status change. */
+ int st_ctime_usec;
+
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ int st_blocks; /* Number of 512-byte blocks allocated. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* bits/stat.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a2cee7c01714d59d4562f6d283ffde59c86f8a84
commit a2cee7c01714d59d4562f6d283ffde59c86f8a84
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:42:53 1997 +0000
stdio limits for standalone.
diff --git a/sysdeps/standalone/bits/stdio_lim.h b/sysdeps/standalone/bits/stdio_lim.h
new file mode 100644
index 0000000..5552bc4
--- /dev/null
+++ b/sysdeps/standalone/bits/stdio_lim.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define L_tmpnam 1
+#define TMPMAX 0
+#define L_ctermid 1
+#define L_cuserid 1
+#define FOPEN_MAX 16
+#define FILENAME_MAX 14
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9aebb73acdd3c1f9034046685e0477dedf0d183d
commit 9aebb73acdd3c1f9034046685e0477dedf0d183d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:42:38 1997 +0000
ARM error numbers for standalone.
diff --git a/sysdeps/standalone/arm/bits/errno.h b/sysdeps/standalone/arm/bits/errno.h
new file mode 100644
index 0000000..8090a80
--- /dev/null
+++ b/sysdeps/standalone/arm/bits/errno.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants for standalone ARM machines.
+ These constants are essentially arbitrary. */
+
+#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
+#undef __need_Emath
+#define __Emath_defined 1
+
+#define EDOM 1
+#define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+#define ENOSYS 3
+#define EINVAL 4
+#define ESPIPE 5
+#define EBADF 6
+#define ENOMEM 7
+#define EACCES 8
+#define ENFILE 9
+#define EMFILE 10
+#define ENAMETOOLONG 11 /* File name too long */
+#define ELOOP 12 /* Too many symbolic links encountered */
+#define ENOMSG 13 /* No message of desired type */
+#define E2BIG 14 /* Arg list too long */
+#define EINTR 15
+#define EILSEQ 16
+#define ENOEXEC 17
+#define ENOENT 18
+#define EPROTOTYPE 19
+#define ESRCH 20
+#define EPERM 21
+#endif
+
+#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=436682519cbb992681ce9286401311c2144c046e
commit 436682519cbb992681ce9286401311c2144c046e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:41:59 1997 +0000
HPPA specific signal context.
diff --git a/sysdeps/mach/hurd/hppa/bits/sigcontext.h b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
new file mode 100644
index 0000000..b616469
--- /dev/null
+++ b/sysdeps/mach/hurd/hppa/bits/sigcontext.h
@@ -0,0 +1,86 @@
+/* Machine-dependent signal context structure for GNU Hurd. HPPA version.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ /* These first members are machine-independent. */
+
+ int sc_onstack; /* Nonzero if running on sigstack. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned int sc_intr_port;
+
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_error;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to a `struct
+ parisc_thread_state'. trampoline.c knows this, so it must be
+ changed if this changes. */
+
+#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */
+ /* "General" registers $1..$31. */
+ unsigned int sc_regs[31];
+
+ /* Control registers. */
+ unsigned int sc_cr11; /* sar */
+ /* These four registers make up the PC. */
+ unsigned int iioq_head;
+ unsigned int iisq_head;
+ unsigned int iioq_tail;
+ unsigned int iisq_tail;
+ unsigned int sc_cr15;
+ unsigned int sc_cr19;
+ unsigned int sc_cr20;
+ unsigned int sc_cr21;
+ unsigned int sc_cr22; /* ipsw */
+ unsigned int sc_bsd_goto; /* unused */
+ unsigned int sc_sr4;
+ unsigned int sc_sr0;
+ unsigned int sc_sr1;
+ unsigned int sc_sr2;
+ unsigned int sc_sr3;
+ unsigned int sc_sr5;
+ unsigned int sc_sr6;
+ unsigned int sc_sr7;
+ unsigned int sc_cr0;
+ unsigned int sc_cr8;
+ unsigned int sc_cr9;
+ unsigned int sc_cr10; /* unused */
+ unsigned int sc_cr12;
+ unsigned int sc_cr13;
+ unsigned int sc_cr24; /* unused */
+ unsigned int sc_cr25; /* unused */
+ unsigned int sc_cr26; /* unused */
+ unsigned sc_mpsfu_high; /* unused */
+ unsigned sc_mpsfu_low; /* unused */
+ unsigned sc_mpsfu_ovflo; /* unused */
+ int sc_pad;
+
+ /* Floating point registers $f0..$f31. */
+ double sc_fpregs[32];
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84d211c9c5f06c4c35904ef6c6338cf09f6fd0ca
commit 84d211c9c5f06c4c35904ef6c6338cf09f6fd0ca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:41:16 1997 +0000
Alpha specific signal context.
diff --git a/sysdeps/mach/hurd/alpha/bits/sigcontext.h b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
new file mode 100644
index 0000000..32e0c94
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/bits/sigcontext.h
@@ -0,0 +1,65 @@
+/* Machine-dependent signal context structure for GNU Hurd. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ /* These first members are machine-independent. */
+
+ long int sc_onstack; /* Nonzero if running on sigstack. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned long int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned long int sc_intr_port;
+
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_error;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to:
+ {
+ struct alpha_thread_state basic;
+ struct alpha_exc_state exc;
+ struct alpha_float_state fpu;
+ }
+ trampoline.c knows this, so it must be changed if this changes. */
+
+#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */
+ long int sc_regs[31]; /* General registers $0..$30. */
+ long int sc_pc; /* Program counter. */
+
+ /* struct alpha_exc_state */
+#define sc_alpha_exc_state sc_badvaddr
+ unsigned long int sc_badvaddr;
+ unsigned int sc_cause; /* Machine-level trap code. */
+#define SC_CAUSE_SET_SSTEP 1
+ int sc_used_fpa; /* Nonzero if FPU was used. */
+
+ /* struct alpha_float_state
+ This is only filled in if sc_used_fpa is nonzero. */
+#define sc_alpha_float_state sc_fpregs
+ double sc_fpregs[31]; /* Floating point registers $f0..$f30. */
+ long int sc_fpcsr; /* Floating point control/status register. */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=788c7990ebcbf6d80d09edc2435f4ba76eea8c3d
commit 788c7990ebcbf6d80d09edc2435f4ba76eea8c3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:40:36 1997 +0000
Moved to bits/.
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
deleted file mode 100644
index 0f76027..0000000
--- a/sysdeps/alpha/__math.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Inline math functions for Alpha.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger-Tang.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
-
-extern __inline double
-__copysign (double __x, double __y)
-{
- __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
- return __x;
-}
-
-extern __inline double
-fabs (double __x)
-{
- __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
- return __x;
-}
-
-extern __inline double
-atan (double __x)
-{
- extern double __atan2 (double, double);
- return __atan2 (__x, 1.0);
-}
-
-#endif
diff --git a/sysdeps/alpha/bytesex.h b/sysdeps/alpha/bytesex.h
deleted file mode 100644
index e873d21..0000000
--- a/sysdeps/alpha/bytesex.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* Alpha is little-endian. */
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/alpha/fpu/fenvbits.h b/sysdeps/alpha/fpu/fenvbits.h
deleted file mode 100644
index 02414e4..0000000
--- a/sysdeps/alpha/fpu/fenvbits.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>, 1997
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This file should never be included directly. */
-
-#ifndef _FENVBITS_H
-#define _FENVBITS_H 1
-
-/* Define the bits representing the exception.
-
- Note that these are the bit positions as defined by the OSF/1
- ieee_{get,set}_control_word interface and not by the hardware fpcr.
-
- See the Alpha Architecture Handbook section 4.7.7.3 for details,
- but in summary, trap shadows mean the hardware register can acquire
- extra exception bits so for proper IEEE support the tracking has to
- be done in software -- in this case with kernel support.
-
- As to why the system call interface isn't in the same format as
- the hardware register, only those crazy folks at DEC can tell you. */
-
-enum
- {
- FE_INEXACT = 1UL << 21,
-#define FE_INEXACT FE_INEXACT
-
- FE_UNDERFLOW = 1UL << 20,
-#define FE_UNDERFLOW FE_UNDERFLOW
-
- FE_OVERFLOW = 1UL << 19,
-#define FE_OVERFLOW FE_OVERFLOW
-
- FE_DIVBYZERO = 1UL << 18,
-#define FE_DIVBYZERO FE_DIVBYZERO
-
- FE_INVALID = 1UL << 17,
-#define FE_INVALID FE_INVALID
-
- FE_ALL_EXCEPT =
- (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-#define FE_ALL_EXCEPT FE_ALL_EXCEPT
- };
-
-
-/* Alpha chips support all four defined rouding modes.
-
- Note that code must be compiled to use dynamic rounding (/d) instructions
- to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc
- this is -fprm d. The default for both is static rounding to nearest.
-
- These are shifted down 58 bits from the hardware fpcr because the
- functions are declared to take integers. */
-
-enum
- {
- FE_TOWARDSZERO = 0,
-#define FE_TOWARDSZERO FE_TOWARDSZERO
-
- FE_DOWNWARD = 1,
-#define FE_DOWNWARD FE_DOWNWARD
-
- FE_TONEAREST = 2,
-#define FE_TONEAREST FE_TONEAREST
-
- FE_UPWARD = 3,
-#define FE_UPWARD FE_UPWARD
- };
-
-
-/* Type representing exception flags. */
-typedef unsigned long fexcept_t;
-
-/* Type representing floating-point environment. */
-typedef unsigned long fenv_t;
-
-/* If the default argument is used we use this value. Note that due to
- architecture-specified page mappings, no user-space pointer will ever
- have its two high bits set. Co-opt one. */
-#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL)
-
-#ifdef __USE_GNU
-/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
-#endif
-
-/* The system calls to talk to the kernel's FP code. */
-extern unsigned long __ieee_get_fp_control(void);
-extern void __ieee_set_fp_control(unsigned long);
-
-
-#endif /* fenvbits.h */
diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h
deleted file mode 100644
index 6e6f6b4..0000000
--- a/sysdeps/alpha/jmp_buf.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. Alpha version.
-Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-typedef struct
- {
- /* Integer registers:
- $0 is the return value;
- $1-$8, $22-$25, $28 are call-used;
- $9-$14 we save here;
- $15 is the FP and we save it here;
- $16-$21 are input arguments (call-used);
- $26 is the return PC and we save it here;
- $27 is the procedure value (i.e., the address of __setjmp);
- $29 is the global pointer, which the caller will reconstruct
- from the return address restored in $26;
- $30 is the stack pointer and we save it here;
- $31 is always zero. */
- long int __9, __10, __11, __12, __13, __14;
- long int *__pc, *__fp, *__sp;
-
-#if 1 /* XXX need predefine for TARGET_FPREGS */
- /* Floating-point registers:
- $f0 is the floating return value;
- $f1, $f10-$f15, $f22-$f30 are call-used;
- $f2-$f9 we save here;
- $f16-$21 are input args (call-used);
- $f31 is always zero. */
- double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9;
-#endif /* Have FP regs. */
- } __jmp_buf[1];
diff --git a/sysdeps/arm/bytesex.h b/sysdeps/arm/bytesex.h
deleted file mode 100644
index 32f8489..0000000
--- a/sysdeps/arm/bytesex.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* ARM is little-endian. */
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/arm/jmp_buf.h b/sysdeps/arm/jmp_buf.h
deleted file mode 100644
index 93b0f5f..0000000
--- a/sysdeps/arm/jmp_buf.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. ARM version. */
-
-#ifndef _ASM
-/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
-#if __ARM_USES_FP
-typedef int __jmp_buf[22];
-#else
-typedef int __jmp_buf[10];
-#endif
-#endif
diff --git a/sysdeps/m68k/bytesex.h b/sysdeps/m68k/bytesex.h
deleted file mode 100644
index 6f98529..0000000
--- a/sysdeps/m68k/bytesex.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* m68k is big-endian. */
-
-#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
deleted file mode 100644
index bdeaa9e..0000000
--- a/sysdeps/m68k/fpu/__math.h
+++ /dev/null
@@ -1,464 +0,0 @@
-/* Definitions of inline math functions implemented by the m68881/2.
- Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef __GNUC__
-
-#include <sys/cdefs.h>
-
-#ifdef __LIBC_M81_MATH_INLINES
-/* This is used when defining the functions themselves. Define them with
- __ names, and with `static inline' instead of `extern inline' so the
- bodies will always be used, never an external function call. */
-#define __m81_u(x) __CONCAT(__,x)
-#define __m81_inline static __inline
-#else
-#define __m81_u(x) x
-#define __m81_inline extern __inline
-#define __M81_MATH_INLINES 1
-#endif
-
-/* Define a const math function. */
-#define __m81_defun(rettype, func, args) \
- __m81_inline rettype __attribute__((__const__)) \
- __m81_u(func) args
-
-/* Define the three variants of a math function that has a direct
- implementation in the m68k fpu. FUNC is the name for C (which will be
- suffixed with f and l for the float and long double version, resp). OP
- is the name of the fpu operation (without leading f). */
-
-#if defined __USE_MISC || defined __USE_ISOC9X
-#define __inline_mathop(func, op) \
- __inline_mathop1(double, func, op) \
- __inline_mathop1(float, __CONCAT(func,f), op) \
- __inline_mathop1(long double, __CONCAT(func,l), op)
-#else
-#define __inline_mathop(func, op) \
- __inline_mathop1(double, func, op)
-#endif
-
-#define __inline_mathop1(float_type,func, op) \
- __m81_defun (float_type, func, (float_type __mathop_x)) \
- { \
- float_type __result; \
- __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
- return __result; \
- }
-
-#ifdef __LIBC_M81_MATH_INLINES
-/* ieee style elementary functions */
-/* These are internal to the implementation of libm. */
-__inline_mathop(__ieee754_acos, acos)
-__inline_mathop(__ieee754_asin, asin)
-__inline_mathop(__ieee754_cosh, cosh)
-__inline_mathop(__ieee754_sinh, sinh)
-__inline_mathop(__ieee754_exp, etox)
-__inline_mathop(__ieee754_log10, log10)
-__inline_mathop(__ieee754_log, logn)
-__inline_mathop(__ieee754_sqrt, sqrt)
-__inline_mathop(__ieee754_atanh, atanh)
-#endif
-
-__inline_mathop(__atan, atan)
-__inline_mathop(__cos, cos)
-__inline_mathop(__sin, sin)
-__inline_mathop(__tan, tan)
-__inline_mathop(__tanh, tanh)
-__inline_mathop(__fabs, abs)
-
-__inline_mathop(__rint, int)
-__inline_mathop(__expm1, etoxm1)
-__inline_mathop(__log1p, lognp1)
-__inline_mathop(__significand, getman)
-
-__inline_mathop(__log2, log2)
-__inline_mathop(__exp2, twotox)
-__inline_mathop(__trunc, intrz)
-
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
-
-__inline_mathop(atan, atan)
-__inline_mathop(cos, cos)
-__inline_mathop(sin, sin)
-__inline_mathop(tan, tan)
-__inline_mathop(tanh, tanh)
-
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
-__inline_mathop(rint, int)
-__inline_mathop(expm1, etoxm1)
-__inline_mathop(log1p, lognp1)
-#endif
-
-#ifdef __USE_MISC
-__inline_mathop(significand, getman)
-#endif
-
-#ifdef __USE_ISOC9X
-__inline_mathop(log2, log2)
-__inline_mathop(exp2, twotox)
-__inline_mathop(trunc, intrz)
-#endif
-
-#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
-
-/* This macro contains the definition for the rest of the inline
- functions, using __FLOAT_TYPE as the domain type and __S as the suffix
- for the function names. */
-
-#ifdef __LIBC_M81_MATH_INLINES
-/* Internally used functions. */
-#define __internal_inline_functions(float_type, s) \
-__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
- (float_type __x, float_type __n)) \
-{ \
- float_type __result; \
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
- return __result; \
-}
-
-__internal_inline_functions (double,)
-__internal_inline_functions (float,f)
-__internal_inline_functions (long double,l)
-#undef __internal_inline_functions
-
-/* Get the m68881 condition codes, to quickly check multiple conditions. */
-static __inline__ unsigned long
-__m81_test (long double __val)
-{
- unsigned long __fpsr;
- __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
- return __fpsr;
-}
-
-/* Bit values returned by __m81_test. */
-#define __M81_COND_NAN (1 << 24)
-#define __M81_COND_INF (2 << 24)
-#define __M81_COND_ZERO (4 << 24)
-#define __M81_COND_NEG (8 << 24)
-
-#endif /* __LIBC_M81_MATH_INLINES */
-
-/* The rest of the functions are available to the user. */
-
-#define __inline_functions(float_type, s) \
-__m81_inline float_type \
-__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
-{ \
- float_type __mantissa, __exponent; \
- int __iexponent; \
- unsigned long __fpsr; \
- __asm("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- if (__fpsr & (7 << 24)) \
- { \
- /* Not finite or zero. */ \
- *__expptr = 0; \
- return __value; \
- } \
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
- __iexponent = (int) __exponent + 1; \
- *__expptr = __iexponent; \
- __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
- : "0" (__value), "dmi" (-__iexponent)); \
- return __mantissa; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
-{ \
- float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Set rounding towards negative infinity. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
- /* Convert X to an integer, using -Inf rounding. */ \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- /* Restore the previous rounding mode. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
-{ \
- float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Set rounding towards positive infinity. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg | 0x30)); \
- /* Convert X to an integer, using +Inf rounding. */ \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- /* Restore the previous rounding mode. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
-{ \
- /* There is no branch-condition for infinity, \
- so we must extract and examine the condition codes manually. */ \
- unsigned long int __fpsr; \
- __asm("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
-} \
- \
-__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
-{ \
- char __result; \
- __asm("ftst%.x %1\n" \
- "fsun %0" : "=dm" (__result) : "f" (__value)); \
- return __result; \
-} \
- \
-__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
-{ \
- /* There is no branch-condition for infinity, so we must extract and \
- examine the condition codes manually. */ \
- unsigned long int __fpsr; \
- __asm ("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- return (__fpsr & (3 << 24)) == 0; \
-} \
- \
-__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
-{ \
- /* There is no branch-condition for the sign bit, so we must extract \
- and examine the condition codes manually. */ \
- unsigned long int __fpsr; \
- __asm ("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- return (__fpsr >> 27) & 1; \
-} \
- \
-__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
-{ \
- float_type __result; \
- if (__x == 0.0) \
- return 0x80000001; \
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- return (int) __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
-{ \
- float_type __result; \
- __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
-{ \
- float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Temporarily disable the inexact exception. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg & ~0x200)); \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_inline void \
-__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
- float_type *__cosx) \
-{ \
- __asm ("fsincos%.x %2,%1:%0" \
- : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
-}
-
-/* This defines the three variants of the inline functions. */
-__inline_functions (double,)
-__inline_functions (float,f)
-__inline_functions (long double,l)
-#undef __inline_functions
-
-__m81_defun (long int, __lrint, (long double __x))
-{
- long int __result;
- __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
- return __result;
-}
-
-#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
-
-/* Define inline versions of the user visible functions. */
-
-#define __inline_forward_c(rettype, name, args1, args2) \
-extern __inline rettype __attribute__((__const__)) \
-name args1 \
-{ \
- return __CONCAT(__,name) args2; \
-}
-
-#define __inline_forward(rettype, name, args1, args2) \
-extern __inline rettype name args1 \
-{ \
- return __CONCAT(__,name) args2; \
-}
-
-__inline_forward(double,frexp, (double __value, int *__expptr),
- (__value, __expptr))
-__inline_forward_c(double,floor, (double __x), (__x))
-__inline_forward_c(double,ceil, (double __x), (__x))
-#ifdef __USE_MISC
-__inline_forward_c(int,isinf, (double __value), (__value))
-__inline_forward_c(int,finite, (double __value), (__value))
-__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
-#endif
-#if defined __USE_MISC || defined __USE_XOPEN
-#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
-__inline_forward_c(int,isnan, (double __value), (__value))
-#endif
-__inline_forward_c(int,ilogb, (double __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
-__inline_forward_c(double,nearbyint, (double __value), (__value))
-#endif
-#ifdef __USE_GNU
-__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
- (__x, __sinx, __cosx))
-#endif
-
-#if defined __USE_MISC || defined __USE_ISOC9X
-
-__inline_forward(float,frexpf, (float __value, int *__expptr),
- (__value, __expptr))
-__inline_forward_c(float,floorf, (float __x), (__x))
-__inline_forward_c(float,ceilf, (float __x), (__x))
-#ifdef __USE_MISC
-__inline_forward_c(int,isinff, (float __value), (__value))
-__inline_forward_c(int,finitef, (float __value), (__value))
-__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
-__inline_forward_c(int,isnanf, (float __value), (__value))
-__inline_forward_c(int,ilogbf, (float __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
-__inline_forward_c(float,nearbyintf, (float __value), (__value))
-#endif
-#ifdef __USE_GNU
-__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
- (__x, __sinx, __cosx))
-#endif
-
-__inline_forward(long double,frexpl, (long double __value, int *__expptr),
- (__value, __expptr))
-__inline_forward_c(long double,floorl, (long double __x), (__x))
-__inline_forward_c(long double,ceill, (long double __x), (__x))
-#ifdef __USE_MISC
-__inline_forward_c(int,isinfl, (long double __value), (__value))
-__inline_forward_c(int,finitel, (long double __value), (__value))
-__inline_forward_c(long double,scalbnl, (long double __x, int __n),
- (__x, __n))
-__inline_forward_c(int,isnanl, (long double __value), (__value))
-__inline_forward_c(int,ilogbl, (long double __value), (__value))
-#endif
-#ifdef __USE_ISOC9X
-__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
-__inline_forward_c(long int,lrint, (long double __value), (__value))
-#endif
-#ifdef __USE_GNU
-__inline_forward(void,sincosl,
- (long double __x, long double *__sinx, long double *__cosx),
- (__x, __sinx, __cosx))
-#endif
-
-#endif /* Use misc or ISO C9X */
-
-#undef __inline_forward
-#undef __inline_forward_c
-
-#ifdef __USE_ISOC9X
-
-/* ISO C 9X defines some macros to perform unordered comparisons. The
- m68k FPU supports this with special opcodes and we should use them.
- These must not be inline functions since we have to be able to handle
- all floating-point types. */
-#undef isgreater
-#define isgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-#undef isgreaterequal
-#define isgreaterequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsoge %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-#undef isless
-#define isless(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsolt %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-#undef islessequal
-#define islessequal(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsole %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-#undef islessgreater
-#define islessgreater(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsogl %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-
-#undef isunordered
-#define isunordered(x, y) \
- __extension__ \
- ({ char __result; \
- __asm__ ("fcmp%.x %2,%1; fsun %0" \
- : "=dm" (__result) : "f" (x), "f" (y)); \
- (int) __result; })
-#endif
-
-#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
-
-#endif /* GCC. */
diff --git a/sysdeps/m68k/fpu/fenvbits.h b/sysdeps/m68k/fpu/fenvbits.h
deleted file mode 100644
index b653b1a..0000000
--- a/sysdeps/m68k/fpu/fenvbits.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This file should never be included directly. */
-
-#ifndef _FENVBITS_H
-#define _FENVBITS_H 1
-
-/* Define bits representing the exception. We use the bit positions of
- the appropriate bits in the FPSR Accrued Exception Byte. */
-enum
- {
- FE_INEXACT = 1 << 3,
-#define FE_INEXACT FE_INEXACT
- FE_DIVBYZERO = 1 << 4,
-#define FE_DIVBYZERO FE_DIVBYZERO
- FE_UNDERFLOW = 1 << 5,
-#define FE_UNDERFLOW FE_UNDERFLOW
- FE_OVERFLOW = 1 << 6,
-#define FE_OVERFLOW FE_OVERFLOW
- FE_INVALID = 1 << 7
-#define FE_INVALID FE_INVALID
- };
-
-#define FE_ALL_EXCEPT \
- (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
-
-/* The m68k FPU supports all of the four defined rounding modes. We use
- the bit positions in the FPCR Mode Control Byte as the values for the
- appropriate macros. */
-enum
- {
- FE_TONEAREST = 0,
-#define FE_TONEAREST FE_TONEAREST
- FE_TOWARDSZERO = 1 << 4,
-#define FE_TOWARDSZERO FE_TOWARDSZERO
- FE_DOWNWARD = 2 << 4,
-#define FE_DOWNWARD FE_DOWNWARD
- FE_UPWARD = 3 << 4
-#define FE_UPWARD FE_UPWARD
- };
-
-
-/* Type representing exception flags. */
-typedef unsigned int fexcept_t;
-
-
-/* Type representing floating-point environment. This structure
- corresponds to the layout of the block written by `fmovem'. */
-typedef struct
- {
- fexcept_t control_register;
- fexcept_t status_register;
- }
-fenv_t;
-
-/* If the default argument is used we use this value. */
-#define FE_DFL_ENV ((fenv_t *) -1)
-
-#ifdef __USE_GNU
-/* Floating-point environment where none of the exceptions are masked. */
-# define FE_NOMASK_ENV ((fenv_t *) -2)
-#endif
-
-#endif /* fenvbits.h */
diff --git a/sysdeps/m68k/fpu/mathbits.h b/sysdeps/m68k/fpu/mathbits.h
deleted file mode 100644
index 0496623..0000000
--- a/sysdeps/m68k/fpu/mathbits.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _MATHBITS_H
-#define _MATHBITS_H 1
-
-/* The m68k FPUs evaluate all values in the 96 bit floating-point format
- which is also available for the user as `long double'. Therefore we
- define: */
-typedef long double float_t; /* `float' expressions are evaluated as
- `long double'. */
-typedef long double double_t; /* `double' expressions are evaluated as
- `long double'. */
-
-/* Signal that both types are `long double'. */
-#define FLT_EVAL_METHOD 2
-
-/* Define `INFINITY' as value of type `float_t'. */
-#define INFINITY HUGE_VALL
-
-#endif /* mathbits.h */
diff --git a/sysdeps/m68k/fpu/switch/__math.h b/sysdeps/m68k/fpu/switch/__math.h
deleted file mode 100644
index c0f6966..0000000
--- a/sysdeps/m68k/fpu/switch/__math.h
+++ /dev/null
@@ -1 +0,0 @@
-/* We don't want any inlines when we might not have a 68881. */
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
deleted file mode 100644
index c71454e..0000000
--- a/sysdeps/m68k/huge_val.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* `HUGE_VAL' constants for m68k (where it is infinity).
- Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _HUGE_VAL_H
-#define _HUGE_VAL_H 1
-
-#include <features.h>
-#include <sys/cdefs.h>
-
-/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-
-#ifdef __GNUC__
-
-#define HUGE_VAL \
- (__extension__ \
- ((union { unsigned long long __l; double __d; }) \
- { __l: 0x7ff0000000000000ULL }).__d)
-
-#else /* not GCC */
-
-static union { unsigned char __c[8]; double __d; } __huge_val =
- { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
-#define HUGE_VAL (__huge_val.__d)
-
-#endif /* GCC. */
-
-
-/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-
-#ifdef __USE_ISOC9X
-
-#ifdef __GNUC__
-
-#define HUGE_VALF \
- (__extension__ \
- ((union { unsigned long __l; float __f; }) \
- { __l: 0x7f800000UL }).__f)
-
-#define HUGE_VALL \
- (__extension__ \
- ((union { unsigned long __l[3]; long double __ld; }) \
- { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
-
-#else /* not GCC */
-
-static union { unsigned char __c[4]; float __f; } __huge_valf =
- { { 0x7f, 0x80, 0, 0 } };
-#define HUGE_VALF (__huge_valf.__f)
-
-static union { unsigned char __c[12]; long double __ld; } __huge_vall =
- { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
-#define HUGE_VALL (__huge_vall.__ld)
-
-#endif /* GCC. */
-
-#endif /* __USE_ISOC9X. */
-
-#endif /* huge_val.h */
diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h
deleted file mode 100644
index 96240f0..0000000
--- a/sysdeps/m68k/jmp_buf.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. m68k version. */
-
-typedef struct
- {
- /* There are eight 4-byte data registers, but D0 is not saved. */
- long int __dregs[7];
-
- /* There are six 4-byte address registers, plus the FP and SP. */
- int *__aregs[6];
- int * __fp;
- int * __sp;
-
-#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
- /* There are eight floating point registers which
- are saved in IEEE 96-bit extended format. */
- char __fpregs[8 * (96 / 8)];
-#endif
-
- } __jmp_buf[1];
diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h
deleted file mode 100644
index 32e0c94..0000000
--- a/sysdeps/mach/hurd/alpha/sigcontext.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Machine-dependent signal context structure for GNU Hurd. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- /* These first members are machine-independent. */
-
- long int sc_onstack; /* Nonzero if running on sigstack. */
- __sigset_t sc_mask; /* Blocked signals to restore. */
-
- /* MiG reply port this thread is using. */
- unsigned long int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* Error code associated with this signal (interpreted as `error_t'). */
- int sc_error;
-
- /* All following members are machine-dependent. The rest of this
- structure is written to be laid out identically to:
- {
- struct alpha_thread_state basic;
- struct alpha_exc_state exc;
- struct alpha_float_state fpu;
- }
- trampoline.c knows this, so it must be changed if this changes. */
-
-#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */
- long int sc_regs[31]; /* General registers $0..$30. */
- long int sc_pc; /* Program counter. */
-
- /* struct alpha_exc_state */
-#define sc_alpha_exc_state sc_badvaddr
- unsigned long int sc_badvaddr;
- unsigned int sc_cause; /* Machine-level trap code. */
-#define SC_CAUSE_SET_SSTEP 1
- int sc_used_fpa; /* Nonzero if FPU was used. */
-
- /* struct alpha_float_state
- This is only filled in if sc_used_fpa is nonzero. */
-#define sc_alpha_float_state sc_fpregs
- double sc_fpregs[31]; /* Floating point registers $f0..$f30. */
- long int sc_fpcsr; /* Floating point control/status register. */
- };
diff --git a/sysdeps/mach/hurd/hppa/sigcontext.h b/sysdeps/mach/hurd/hppa/sigcontext.h
deleted file mode 100644
index b616469..0000000
--- a/sysdeps/mach/hurd/hppa/sigcontext.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Machine-dependent signal context structure for GNU Hurd. HPPA version.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- /* These first members are machine-independent. */
-
- int sc_onstack; /* Nonzero if running on sigstack. */
- __sigset_t sc_mask; /* Blocked signals to restore. */
-
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned int sc_intr_port;
-
- /* Error code associated with this signal (interpreted as `error_t'). */
- int sc_error;
-
- /* All following members are machine-dependent. The rest of this
- structure is written to be laid out identically to a `struct
- parisc_thread_state'. trampoline.c knows this, so it must be
- changed if this changes. */
-
-#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */
- /* "General" registers $1..$31. */
- unsigned int sc_regs[31];
-
- /* Control registers. */
- unsigned int sc_cr11; /* sar */
- /* These four registers make up the PC. */
- unsigned int iioq_head;
- unsigned int iisq_head;
- unsigned int iioq_tail;
- unsigned int iisq_tail;
- unsigned int sc_cr15;
- unsigned int sc_cr19;
- unsigned int sc_cr20;
- unsigned int sc_cr21;
- unsigned int sc_cr22; /* ipsw */
- unsigned int sc_bsd_goto; /* unused */
- unsigned int sc_sr4;
- unsigned int sc_sr0;
- unsigned int sc_sr1;
- unsigned int sc_sr2;
- unsigned int sc_sr3;
- unsigned int sc_sr5;
- unsigned int sc_sr6;
- unsigned int sc_sr7;
- unsigned int sc_cr0;
- unsigned int sc_cr8;
- unsigned int sc_cr9;
- unsigned int sc_cr10; /* unused */
- unsigned int sc_cr12;
- unsigned int sc_cr13;
- unsigned int sc_cr24; /* unused */
- unsigned int sc_cr25; /* unused */
- unsigned int sc_cr26; /* unused */
- unsigned sc_mpsfu_high; /* unused */
- unsigned sc_mpsfu_low; /* unused */
- unsigned sc_mpsfu_ovflo; /* unused */
- int sc_pad;
-
- /* Floating point registers $f0..$f31. */
- double sc_fpregs[32];
- };
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
deleted file mode 100644
index 81d1f25..0000000
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- /* These first members are machine-independent. */
-
- int sc_onstack; /* Nonzero if running on sigstack. */
- __sigset_t sc_mask; /* Blocked signals to restore. */
-
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned int sc_intr_port;
-
- /* Error code associated with this signal (interpreted as `error_t'). */
- int sc_error;
-
- /* All following members are machine-dependent. The rest of this
- structure is written to be laid out identically to:
- {
- struct mips_thread_state ts;
- struct mips_exc_state es;
- struct mips_float_state fs;
- }
- trampoline.c knows this, so it must be changed if this changes. */
-#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */
- int sc_gpr[31]; /* "General" registers; [0] is r1. */
- int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */
- int sc_pc; /* Instruction pointer. */
-
- /* struct mips_exc_state */
-#define sc_mips_exc_state sc_cause
- unsigned int sc_cause; /* Machine-level trap code. */
-#define SC_CAUSE_SST 0x00000044
- unsigned int sc_badvaddr;
- unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */
-#define SC_COPROC_USE_COP0 1 /* (by definition) */
-#define SC_COPROC_USE_COP1 2 /* FPA */
-#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1
-#define SC_COPROC_USE_COP2 4
-#define SC_COPROC_USE_COP3 8
-
- /* struct mips_float_state
- This is only filled in if the SC_COPROC_USE_FPU bit
- is set in sc_coproc_used. */
-#define sc_mips_float_state sc_fpr
- int sc_fpr[32]; /* FP registers. */
- int sc_fpcsr; /* FPU status register. */
- int sc_fpeir; /* FP exception instruction register. */
- };
diff --git a/sysdeps/mips/bytesex.h b/sysdeps/mips/bytesex.h
deleted file mode 100644
index ba555cd..0000000
--- a/sysdeps/mips/bytesex.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- This file is for a machine using big-endian mode. */
-
-#define __BYTE_ORDER __BIG_ENDIAN
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
deleted file mode 100644
index 102a019..0000000
--- a/sysdeps/mips/jmp_buf.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-typedef struct
- {
- /* Program counter. */
- __ptr_t __pc;
-
- /* Stack pointer. */
- __ptr_t __sp;
-
- /* Callee-saved registers s0 through s7. */
- int __regs[8];
-
- /* The frame pointer. */
- __ptr_t __fp;
-
- /* The global pointer. */
- __ptr_t __gp;
-
- /* Floating point status register. */
- int __fpc_csr;
-
- /* Callee-saved floating point registers. */
- double __fpregs[6];
- } __jmp_buf[1];
-
-#ifdef __USE_MISC
-/* Offset to the program counter in `jmp_buf'. */
-#define JB_PC 0
-#endif
-
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((__ptr_t) (address) < (jmpbuf)[0].__sp)
diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h
deleted file mode 100644
index 8090a80..0000000
--- a/sysdeps/standalone/arm/errnos.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* This file defines the `errno' constants for standalone ARM machines.
- These constants are essentially arbitrary. */
-
-#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
-#undef __need_Emath
-#define __Emath_defined 1
-
-#define EDOM 1
-#define ERANGE 2
-#endif
-
-#ifdef _ERRNO_H
-#define ENOSYS 3
-#define EINVAL 4
-#define ESPIPE 5
-#define EBADF 6
-#define ENOMEM 7
-#define EACCES 8
-#define ENFILE 9
-#define EMFILE 10
-#define ENAMETOOLONG 11 /* File name too long */
-#define ELOOP 12 /* Too many symbolic links encountered */
-#define ENOMSG 13 /* No message of desired type */
-#define E2BIG 14 /* Arg list too long */
-#define EINTR 15
-#define EILSEQ 16
-#define ENOEXEC 17
-#define ENOENT 18
-#define EPROTOTYPE 19
-#define ESRCH 20
-#define EPERM 21
-#endif
-
-#define __set_errno(val) errno = (val)
diff --git a/sysdeps/standalone/stdio_lim.h b/sysdeps/standalone/stdio_lim.h
deleted file mode 100644
index 5552bc4..0000000
--- a/sysdeps/standalone/stdio_lim.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
- Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
- On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#define L_tmpnam 1
-#define TMPMAX 0
-#define L_ctermid 1
-#define L_cuserid 1
-#define FOPEN_MAX 16
-#define FILENAME_MAX 14
diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h
deleted file mode 100644
index 8541922..0000000
--- a/sysdeps/unix/bsd/osf/alpha/statbuf.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H
-
-#include <gnu/types.h>
-
-/* Structure describing file characteristics. */
-struct stat
- {
- int st_dev; /* Device. */
- unsigned int st_ino; /* File serial number. */
- unsigned int st_mode; /* File mode. */
- unsigned short st_nlink; /* Link count. */
- unsigned int st_uid; /* User ID of the file's owner. */
- unsigned int st_gid; /* Group ID of the file's group.*/
- int st_rdev; /* Device number, if device. */
-
- long st_size; /* Size of file, in bytes. */
-
- int st_atime; /* Time of last access. */
- int st_atime_usec;
- int st_mtime; /* Time of last modification. */
- int st_mtime_usec;
- int st_ctime; /* Time of last status change. */
- int st_ctime_usec;
-
- unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-
- int st_blocks; /* Number of 512-byte blocks allocated. */
- unsigned int st_flags;
- unsigned int st_gen;
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
deleted file mode 100644
index df400d4..0000000
--- a/sysdeps/unix/bsd/osf/sigaction.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Structure and constant definitions for sigaction et al. OSF/1 version.
- Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Structure describing the action to be taken when a signal arrives. */
-struct sigaction
- {
- /* Signal handler. */
- __sighandler_t sa_handler;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
-
- /* Special flags. */
- int sa_flags;
- };
-
-/* Bits in `sa_flags'. */
-#ifdef __USE_BSD
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
-#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
-#endif
-#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */
-
-
-/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h
deleted file mode 100644
index 471b516..0000000
--- a/sysdeps/unix/bsd/sun/m68k/sigcontext.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Structure describing state saved while handling a signal. Sun 3 version.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-struct sigcontext
- {
- int sc_onstack;
- __sigset_t sc_mask;
-
- int sc_sp, sc_pc, sc_ps;
- };
diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h
deleted file mode 100644
index a327401..0000000
--- a/sysdeps/unix/bsd/sun/signum.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Signal number definitions. SunOS version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef _SIGNAL_H
-
-/* This file defines the fake signal functions and signal
- number constants for SunOS 3 and 4 Unix systems. */
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap (4.2 BSD). */
-#define SIGEMT 7 /* EMT trap (4.2 BSD). */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error (4.2 BSD). */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */
-#define SIGSTOP 17 /* Stop, unblockable (POSIX). */
-#define SIGTSTP 18 /* Keyboard stop (POSIX). */
-#define SIGCONT 19 /* Continue (POSIX). */
-#define SIGCHLD 20 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGTTIN 21 /* Background read from tty (POSIX). */
-#define SIGTTOU 22 /* Background write to tty (POSIX). */
-#define SIGIO 23 /* I/O now possible (4.2 BSD). */
-#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */
-#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
-#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
-#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
-#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
-#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
-#define SIGLOST 29 /* Resource lost (Sun). */
-#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 32 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
deleted file mode 100644
index 290bf81..0000000
--- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Structure describing state saved while handling a signal. Sparc version.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-struct sigcontext
- {
- int sc_onstack;
- __sigset_t sc_mask;
-
-#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
- int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
- int sc_wbcnt; /* Number of outstanding windows. */
- __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
- int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
- };
-
diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
deleted file mode 100644
index a9f66c4..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* O_*, F_*, FD_* bit values for SunOS 4.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FCNTLBITS_H
-
-#define _FCNTLBITS_H 1
-
-
-/* File access modes for `open' and `fcntl'. */
-#define O_RDONLY 0 /* Open read-only. */
-#define O_WRONLY 1 /* Open write-only. */
-#define O_RDWR 2 /* Open read/write. */
-
-
-/* Bits OR'd into the second argument to open. */
-#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
-#define O_EXCL 0x0800 /* Fail if file already exists. */
-#define O_TRUNC 0x0400 /* Truncate file to zero length. */
-#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
-#if defined __USE_BSD || defined __USE_SVID
-#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
-#define O_FSYNC 0x2000 /* Synchronous writes. */
-#define O_SYNC O_FSYNC
-#endif
-
-/* File status flags for `open' and `fcntl'. */
-#define O_APPEND 0x0008 /* Writes append to the file. */
-#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */
-
-/* Sun defines O_NDELAY one way for BSD behavior and another for System V
- behavior. In the GNU C library, you get the BSD behavior unless you
- define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */
-#ifdef __USE_BSD
-#define O_NDELAY 0x0004
-#endif
-#if !defined (O_NDELAY) && defined (__USE_SVID)
-#define O_NDELAY 0x1000
-#endif
-
-#ifdef __USE_BSD
-/* Bits in the file status flags returned by F_GETFL.
- These are all the O_* flags, plus FREAD and FWRITE, which are
- independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
- given to `open'. */
-#define FREAD 1
-#define FWRITE 2
-
-/* Traditional Unix names the O_* bits. */
-#define FASYNC O_ASYNC
-#define FCREAT O_CREAT
-#define FEXCL O_EXCL
-#define FTRUNC O_TRUNC
-#define FNOCTTY O_NOCTTY
-#define FFSYNC O_FSYNC
-#define FSYNC O_SYNC
-#define FAPPEND O_APPEND
-#define FNONBLOCK O_NONBLOCK
-#define FNONBIO O_NONBLOCK
-#define FNDELAY 0x0004 /* BSD O_NDELAY. */
-#define FNBIO 0x1000 /* System V O_NDELAY. */
-#endif
-
-/* Mask for file access modes. This is system-dependent in case
- some system ever wants to define some other flavor of access. */
-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifdef __USE_BSD
-#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
-#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
-#endif
-#define F_GETLK 7 /* Get record locking info. */
-#define F_SETLK 8 /* Set record locking info (non-blocking). */
-#define F_SETLKW 9 /* Set record locking info (blocking). */
-#ifdef __USE_BSD
-#define F_RGETLK 10 /* Get remote record locking info. */
-#define F_RSETLK 11 /* Set remote locking info (non-blocking). */
-#define F_CNVT 12 /* Convert a fhandle to an open fd. */
-#define F_RSETLKW 13 /* Set remote locking info (blocking). */
-#endif
-
-/* File descriptor flags used with F_GETFD and F_SETFD. */
-#define FD_CLOEXEC 1 /* Close on exec. */
-
-
-#include <gnu/types.h>
-
-/* The structure describing an advisory lock. This is the type of the third
- argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
-struct flock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_pid; /* Process holding the lock. */
- short int l_xxx; /* Reserved for future use. */
- };
-
-#ifdef __USE_BSD
-/* The structure describing a remote advisory lock. This is the type of the
- third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */
-struct eflock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_pid; /* Process holding the lock. */
- short int l_xxx; /* Reserved for future use. */
- long int l_rpid; /* Remote process ID wanting this lock. */
- long int l_rsys; /* Remote system ID wanting this lock. */
- };
-
-#endif
-
-
-/* Values for the `l_type' field of a `struct flock'. */
-#define F_RDLCK 1 /* Read lock. */
-#define F_WRLCK 2 /* Write lock. */
-#define F_UNLCK 3 /* Remove lock. */
-
-
-#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
deleted file mode 100644
index ff55773..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Bit values for resource limits. SunOS 4 version.
- Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
- subset of these kinds of resource limit. In systems where `getrlimit'
- and `setrlimit' are not system calls, these are the values used by the C
- library to emulate them. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
- {
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU,
-#define RLIMIT_CPU RLIMIT_CPU
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA,
-#define RLIMIT_DATA RLIMIT_DATA
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK,
-#define RLIMIT_STACK RLIMIT_STACK
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE,
-#define RLIMIT_CORE RLIMIT_CORE
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS,
-#define RLIMIT_RSS RLIMIT_RSS
- /* Number of open files. */
- RLIMIT_NOFILE,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
-#define RLIMIT_OFILE RLIMIT_OFILE
-
- RLIM_NLIMITS,
-
- RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */
-#define RLIM_INFINITY RLIM_INFINITY
- };
-
-struct rlimit
- {
- /* The current (soft) limit. */
- int rlim_cur;
- /* The hard limit. */
- int rlim_max;
- };
-
-/* Whose usage statistics do you want? */
-enum __rusage_who
-/* The macro definitions are necessary because some programs want
- to test for operating system features with #ifdef RUSAGE_SELF.
- In ISO C the reflexive definition is a no-op. */
- {
- /* The calling process. */
- RUSAGE_SELF = 0,
-#define RUSAGE_SELF RUSAGE_SELF
- /* All of its terminated child processes. */
- RUSAGE_CHILDREN = -1
-#define RUSAGE_CHILDREN RUSAGE_CHILDREN
- };
-
-#include <sys/time.h> /* For `struct timeval'. */
-
-/* Structure which says how much of each resource has been used. */
-struct rusage
- {
- /* Total amount of user time used. */
- struct timeval ru_utime;
- /* Total amount of system time used. */
- struct timeval ru_stime;
- /* Maximum resident set size (in kilobytes). */
- long int ru_maxrss;
- /* Amount of sharing of text segment memory
- with other processes (kilobyte-seconds). */
- long int ru_ixrss;
- /* Amount of data segment memory used (kilobyte-seconds). */
- long int ru_idrss;
- /* Amount of stack memory used (kilobyte-seconds). */
- long int ru_isrss;
- /* Number of soft page faults (i.e. those serviced by reclaiming
- a page from the list of pages awaiting reallocation. */
- long int ru_minflt;
- /* Number of hard page faults (i.e. those that required I/O). */
- long int ru_majflt;
- /* Number of times a process was swapped out of physical memory. */
- long int ru_nswap;
- /* Number of input operations via the file system. Note: This
- and `ru_oublock' do not include operations with the cache. */
- long int ru_inblock;
- /* Number of output operations via the file system. */
- long int ru_oublock;
- /* Number of IPC messages sent. */
- long int ru_msgsnd;
- /* Number of IPC messages received. */
- long int ru_msgrcv;
- /* Number of signals delivered. */
- long int ru_nsignals;
- /* Number of voluntary context switches, i.e. because the process
- gave up the process before it had to (usually to wait for some
- resource to be available). */
- long int ru_nvcsw;
- /* Number of involuntary context switches, i.e. a higher priority process
- became runnable or the current process used up its time slice. */
- long int ru_nivcsw;
- };
-
-/* Priority limits. */
-#define PRIO_MIN -20 /* Minimum priority a process can have. */
-#define PRIO_MAX 20 /* Maximum priority a process can have. */
-
-/* The type of the WHICH argument to `getpriority' and `setpriority',
- indicating what flavor of entity the WHO argument specifies. */
-enum __priority_which
- {
- PRIO_PROCESS = 0, /* WHO is a process ID. */
- PRIO_PGRP = 1, /* WHO is a process group ID. */
- PRIO_USER = 2 /* WHO is a user ID. */
- };
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
deleted file mode 100644
index dc0a007..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/termbits.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/* termios type and macro definitions. SunOS 4 version.
- Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Type of terminal control flag masks. */
-typedef unsigned long int tcflag_t;
-
-/* Type of control characters. */
-typedef unsigned char cc_t;
-
-/* Type of baud rate specifiers. */
-typedef unsigned int speed_t;
-
-/* Terminal control structure. */
-struct termios
-{
- /* Input modes. */
- tcflag_t c_iflag;
-#define IGNBRK 0x0001 /* Ignore break condition. */
-#define BRKINT 0x0002 /* Signal interrupt on break. */
-#define IGNPAR 0x0004 /* Ignore characters with parity errors. */
-#define PARMRK 0x0008 /* Mark parity and framing errors. */
-#define INPCK 0x0010 /* Enable input parity check. */
-#define ISTRIP 0x0020 /* Strip 8th bit off characters. */
-#define INLCR 0x0040 /* Map NL to CR on input. */
-#define IGNCR 0x0080 /* Ignore CR. */
-#define ICRNL 0x0100 /* Map CR to NL on input. */
-#ifdef __USE_BSD
-#define IUCLC 0x0200 /* Map upper case to lower case on input. */
-#endif
-#define IXON 0x0400 /* Enable start/stop output control. */
-#define IXOFF 0x1000 /* Enable start/stop input control. */
-#ifdef __USE_BSD
-#define IXANY 0x0800 /* Any character will restart after stop. */
-#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */
-#endif
-
- /* Output modes. */
- tcflag_t c_oflag;
-#define OPOST 0x0001 /* Perform output processing. */
-#ifdef __USE_BSD
-#define OLCUC 0x00000002 /* Map lower case to upper case on output. */
-#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */
-#define OCRNL 0x00000008
-#define ONOCR 0x00000010
-#define ONLRET 0x00000020
-#define OFILL 0x00000040
-#define OFDEL 0x00000080
-#define NLDLY 0x00000100
-#define NL0 0
-#define NL1 0x00000100
-#define CRDLY 0x00000600
-#define CR0 0
-#define CR1 0x00000200
-#define CR2 0x00000400
-#define CR3 0x00000600
-#define TABDLY 0x00001800
-#define TAB0 0
-#define TAB1 0x00000800
-#define TAB2 0x00001000
-#define XTABS 0x00001800
-#define TAB3 XTABS
-#define BSDLY 0x00002000
-#define BS0 0
-#define BS1 0x00002000
-#define VTDLY 0x00004000
-#define VT0 0
-#define VT1 0x00004000
-#define FFDLY 0x00008000
-#define FF0 0
-#define FF1 0x00008000
-#define PAGEOUT 0x00010000
-#define WRAP 0x00020000
-#endif
-
- /* Control modes. */
- tcflag_t c_cflag;
-#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
-#define CS5 0 /* 5 bits per byte. */
-#define CS6 0x00000010 /* 6 bits per byte. */
-#define CS7 0x00000020 /* 7 bits per byte. */
-#define CS8 0x00000030 /* 8 bits per byte. */
-#define CSTOPB 0x00000040 /* Two stop bits instead of one. */
-#define CREAD 0x00000080 /* Enable receiver. */
-#define PARENB 0x00000100 /* Parity enable. */
-#define PARODD 0x00000200 /* Odd parity instead of even. */
-#define HUPCL 0x00000400 /* Hang up on last close. */
-#define CLOCAL 0x00000800 /* Ignore modem status lines. */
-#ifdef __USE_BSD
-#define LOBLK 0x00001000
-#define CRTSCTS 0x80000000
-#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */
-#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */
-#define IBSHIFT 16 /* Bits to shift for input speed. */
-#endif
-
- /* Input and output baud rates. These are encoded in c_cflag. */
-#define B0 0
-#define B50 1
-#define B75 2
-#define B110 3
-#define B134 4
-#define B150 5
-#define B200 6
-#define B300 7
-#define B600 8
-#define B1200 9
-#define B1800 10
-#define B2400 11
-#define B4800 12
-#define B9600 13
-#define B19200 14
-#define B38400 15
-#ifdef __USE_BSD
-#define EXTA 14
-#define EXTB 15
-#endif
-
- /* Local modes. */
- tcflag_t c_lflag;
-#ifdef __USE_BSD
-#define ECHOKE 0x00000800 /* Visual erase for KILL. */
-#endif
-#define ECHOE 0x00000010 /* Visual erase for ERASE. */
-#define ECHOK 0x00000020 /* Echo NL after KILL. */
-#define ECHO 0x00000008 /* Enable echo. */
-#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */
-#ifdef __USE_BSD
-#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */
-#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */
-#endif
-#define ISIG 0x00000001 /* Enable signals. */
-#define ICANON 0x00000002 /* Do erase and kill processing. */
-#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */
-#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */
-#ifdef __USE_BSD
-#define PENDIN 0x00004000 /* Retype pending input (state). */
-#endif
-#define NOFLSH 0x00000080 /* Disable flush after interrupt. */
-
- char c_line; /* Line discipline (?) */
-
- /* Control characters. */
-#define VEOF 4 /* End-of-file character [ICANON]. */
-#define VEOL 5 /* End-of-line character [ICANON]. */
-#ifdef __USE_BSD
-#define VEOL2 6 /* Second EOL character [ICANON]. */
-#define VSWTCH 7 /* ??? */
-#endif
-#define VERASE 2 /* Erase character [ICANON]. */
-#ifdef __USE_BSD
-#define VWERASE 14 /* Word-erase character [ICANON]. */
-#endif
-#define VKILL 3 /* Kill-line character [ICANON]. */
-#ifdef __USE_BSD
-#define VREPRINT 12 /* Reprint-line character [ICANON]. */
-#endif
-#define VINTR 0 /* Interrupt character [ISIG]. */
-#define VQUIT 1 /* Quit character [ISIG]. */
-#define VSUSP 10 /* Suspend character [ISIG]. */
-#ifdef __USE_BSD
-#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
-#endif
-#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
-#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
-#ifdef __USE_BSD
-#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
-#define VDISCARD 13 /* Discard character [IEXTEN]. */
-#endif
-#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */
-#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */
-#define NCCS 17
- cc_t c_cc[NCCS];
-};
-
-#define _IOT_termios /* Hurd ioctl type field. */ \
- _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
-#define TCSANOW 0 /* Change immediately. */
-#define TCSADRAIN 1 /* Change when pending output is written. */
-#define TCSAFLUSH 2 /* Flush pending input before changing. */
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
-#define TCIFLUSH 0 /* Discard data received but not yet read. */
-#define TCOFLUSH 1 /* Discard data written but not yet sent. */
-#define TCIOFLUSH 2 /* Discard all pending data. */
-
-/* Values for the ACTION argument to `tcflow'. */
-#define TCOOFF 0 /* Suspend output. */
-#define TCOON 1 /* Restart suspended output. */
-#define TCIOFF 2 /* Send a STOP character. */
-#define TCION 3 /* Send a START character. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
deleted file mode 100644
index e9111b6..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define _UTSNAME_LENGTH 9
-#define _UTSNAME_NODENAME_LENGTH 65
diff --git a/sysdeps/unix/bsd/ultrix4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h
deleted file mode 100644
index ba736e4..0000000
--- a/sysdeps/unix/bsd/ultrix4/fcntlbits.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* O_*, F_*, FD_* bit values for Ultrix 4.
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FCNTLBITS_H
-
-#define _FCNTLBITS_H 1
-
-
-/* File access modes for `open' and `fcntl'. */
-#define O_RDONLY 0 /* Open read-only. */
-#define O_WRONLY 1 /* Open write-only. */
-#define O_RDWR 2 /* Open read/write. */
-
-
-/* Bits OR'd into the second argument to open. */
-#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
-#define O_EXCL 0x0800 /* Fail if file already exists. */
-#define O_TRUNC 0x0400 /* Truncate file to zero length. */
-#ifdef __USE_MISC
-#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
-#define O_FSYNC 0x8000 /* Synchronous writes. */
-#define O_SYNC O_FSYNC
-#define O_BLKINUSE 0x1000 /* Block if "in use". */
-#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */
-#define O_TERMIO 0x40000 /* "termio style program". */
-#endif
-#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */
-
-/* File status flags for `open' and `fcntl'. */
-#define O_APPEND 0x0008 /* Writes append to the file. */
-#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */
-
-#ifdef __USE_BSD
-#define O_NDELAY 0x0004
-#endif
-
-#ifdef __USE_BSD
-/* Bits in the file status flags returned by F_GETFL.
- These are all the O_* flags, plus FREAD and FWRITE, which are
- independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
- given to `open'. */
-#define FREAD 1
-#define FWRITE 2
-
-/* Traditional BSD names the O_* bits. */
-#define FASYNC O_ASYNC
-#define FCREAT O_CREAT
-#define FEXCL O_EXCL
-#define FTRUNC O_TRUNC
-#define FNOCTTY O_NOCTTY
-#define FFSYNC O_FSYNC
-#define FSYNC O_SYNC
-#define FAPPEND O_APPEND
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#define FNBLOCK O_NONBLOCK
-#define FTERMIO O_TERMIO
-#define FNOCTTY O_NOCTTY
-#define FSYNCRON O_FSYNC
-#define FBLKINUSE O_BLKINUSE
-#define FBLKANDSET O_BLKANDSET
-#endif
-
-/* Mask for file access modes. This is system-dependent in case
- some system ever wants to define some other flavor of access. */
-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifdef __USE_BSD
-#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
-#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
-#endif
-#define F_GETLK 7 /* Get record locking info. */
-#define F_SETLK 8 /* Set record locking info (non-blocking). */
-#define F_SETLKW 9 /* Set record locking info (blocking). */
-#ifdef __USE_MISC
-#define F_SETSYN 10 /* Set synchronous writing. */
-#define F_CLRSYN 10 /* Clear synchronous writing. */
-#endif
-
-/* File descriptor flags used with F_GETFD and F_SETFD. */
-#define FD_CLOEXEC 1 /* Close on exec. */
-
-
-#include <gnu/types.h>
-
-/* The structure describing an advisory lock. This is the type of the third
- argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
-struct flock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- __pid_t l_pid; /* Process holding the lock. */
- };
-
-/* Values for the `l_type' field of a `struct flock'. */
-#define F_RDLCK 1 /* Read lock. */
-#define F_WRLCK 2 /* Write lock. */
-#define F_UNLCK 3 /* Remove lock. */
-
-
-#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
deleted file mode 100644
index 4bddcf2..0000000
--- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Note that ANY change to this instantly implies a change to __handler.S. */
-
-struct sigcontext
- {
- /* Nonzero if running on signal stack. */
- int sc_onstack;
-
- /* Signal mask to restore. */
- __sigset_t sc_mask;
-
- /* Program counter when the signal hit. */
- __ptr_t sc_pc;
-
- /* Registers 0 through 31. */
- int sc_regs[32];
-
- /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the
- sigcontext and are referenced from the signal trampoline code. */
- int sc_mdlo;
- int sc_mdhi;
-
- /* Flag to see if the FP's been used. */
- int sc_ownedfp;
-
- /* Floating point registers 0 to 31. */
- int sc_fpregs[32];
- /* Control & status register for FP. */
- int sc_fpc_csr;
-
- /* Exception instruction register for FP. */
- int sc_fpc_eir;
-
- /* The coprocessor's cause register. */
- int sc_cause;
-
- /* CPU bad virtual address. */
- __ptr_t sc_badvaddr;
-
- /* CPU board bad physical address. */
- __ptr_t sc_badpaddr;
- };
-
diff --git a/sysdeps/unix/bsd/ultrix4/posix_opt.h b/sysdeps/unix/bsd/ultrix4/posix_opt.h
deleted file mode 100644
index ecd04d1..0000000
--- a/sysdeps/unix/bsd/ultrix4/posix_opt.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@airs.com).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#define _POSIX_JOB_CONTROL 1
-#define _POSIX_SAVED_IDS 1
-#define _POSIX_CHOWN_RESTRICTED 1
-#define _POSIX_NO_TRUNC 1
-#define _POSIX_VDISABLE ((unsigned char) -1)
diff --git a/sysdeps/unix/bsd/ultrix4/utsnamelen.h b/sysdeps/unix/bsd/ultrix4/utsnamelen.h
deleted file mode 100644
index ad4389a..0000000
--- a/sysdeps/unix/bsd/ultrix4/utsnamelen.h
+++ /dev/null
@@ -1 +0,0 @@
-#define _UTSNAME_LENGTH 32
diff --git a/sysdeps/unix/sysv/irix4/confname.h b/sysdeps/unix/sysv/irix4/confname.h
deleted file mode 100644
index 49d2f9c..0000000
--- a/sysdeps/unix/sysv/irix4/confname.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Values for the NAME argument to `pathconf' and `fpathconf'. */
-enum
- {
- _PC_LINK_MAX = 1,
- _PC_MAX_CANON,
- _PC_MAX_INPUT,
- _PC_NAME_MAX,
- _PC_PATH_MAX,
- _PC_PIPE_BUF,
- _PC_CHOWN_RESTRICTED,
- _PC_NO_TRUNC,
- _PC_VDISABLE
- };
-
-/* Values for the argument to `sysconf'. */
-enum
- {
- _SC_ARG_MAX = 1,
- _SC_CHILD_MAX,
- _SC_CLK_TCK,
- _SC_NGROUPS_MAX,
- _SC_OPEN_MAX,
- _SC_JOB_CONTROL,
- _SC_SAVED_IDS,
- _SC_VERSION,
-
- /* Above are done by the Irix system call.
- The rest are done by the C library (or are not really implemented). */
-
- _SC_STREAM_MAX,
- _SC_TZNAME_MAX,
- _SC_PAGESIZE,
-
- /* Values for the argument to `sysconf'
- corresponding to _POSIX2_* symbols. */
- _SC_BC_BASE_MAX,
- _SC_BC_DIM_MAX,
- _SC_BC_SCALE_MAX,
- _SC_BC_STRING_MAX,
- _SC_COLL_WEIGHTS_MAX,
- _SC_EQUIV_CLASS_MAX,
- _SC_EXPR_NEST_MAX,
- _SC_LINE_MAX,
- _SC_RE_DUP_MAX,
-
- _SC_2_VERSION,
- _SC_2_C_BIND,
- _SC_2_C_DEV,
- _SC_2_FORT_DEV,
- _SC_2_FORT_RUN,
- _SC_2_SW_DEV,
- _SC_2_LOCALEDEF
- };
-
-#ifdef __USE_POSIX2
-/* Values for the NAME argument to `confstr'. */
-enum
- {
- _CS_PATH /* The default search path. */
- };
-#endif
diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h
deleted file mode 100644
index 318e483..0000000
--- a/sysdeps/unix/sysv/irix4/fcntlbits.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* O_*, F_*, FD_* bit values for SGI Irix 4.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FCNTLBITS_H
-
-#define _FCNTLBITS_H 1
-
-
-/* File access modes for `open' and `fcntl'. */
-#define O_RDONLY 0 /* Open read-only. */
-#define O_WRONLY 1 /* Open write-only. */
-#define O_RDWR 2 /* Open read/write. */
-
-
-/* Bits OR'd into the second argument to open. */
-#define O_CREAT 00400 /* Create file if it doesn't exist. */
-#define O_EXCL 02000 /* Fail if file already exists. */
-#define O_TRUNC 01000 /* Truncate file to zero length. */
-#ifdef __USE_MISC
-#define O_SYNC 00020 /* Synchronous writes. */
-#define O_FSYNC O_SYNC
-#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */
-#endif
-
-/* File status flags for `open' and `fcntl'. */
-#define O_APPEND 000010 /* Writes append to the file. */
-#ifdef __USE_BSD
-#define O_NDELAY 000004 /* Non-blocking I/O. */
-#endif
-#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */
-
-/* Mask for file access modes. This is system-dependent in case
- some system ever wants to define some other flavor of access. */
-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#define F_GETLK 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info. */
-#define F_SETLKW 7 /* Set record locking info, wait. */
-#ifdef __USE_MISC
-#define F_CHKFL 8 /* Check legality of file flag changes. */
-#define F_ALLOCSP 10
-#define F_FREESP 11
-#define F_SETBSDLK 12 /* Set Berkeley record lock. */
-#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */
-#define F_RGETLK 20 /* Get info on a remote lock. */
-#define F_RSETLK 21 /* Set or unlock a remote lock. */
-#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */
-#define F_GETOWN 10 /* Get owner; only works on sockets. */
-#define F_SETOWN 11 /* Set owner; only works on sockets. */
-#endif
-
-
-/* File descriptor flags used with F_GETFD and F_SETFD. */
-#define FD_CLOEXEC 1 /* Close on exec. */
-
-
-#include <gnu/types.h>
-
-/* The structure describing an advisory lock. This is the type of the third
- argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
-struct flock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_sysid; /* System ID where locking process resides. */
- short int l_pid; /* Process holding the lock. */
- };
-
-/* Values for the `l_type' field of a `struct flock'. */
-#define F_RDLCK 1 /* Read lock. */
-#define F_WRLCK 2 /* Write lock. */
-#define F_UNLCK 3 /* Remove lock. */
-
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FFSYNC O_FSYNC
-#define FASYNC O_ASYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-
-#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h
deleted file mode 100644
index 13314cf..0000000
--- a/sysdeps/unix/sysv/irix4/signum.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Signal number definitions. Irix4 version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef _SIGNAL_H
-
-/* This file defines the fake signal functions and signal
- number constants for SGI Irix 4. */
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1)
-#define SIG_DFL ((__sighandler_t) 0)
-#define SIG_IGN ((__sighandler_t) 1)
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap. */
-#define SIGEMT 7 /* EMT trap. */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error. */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call*/
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
-#define SIGCHLD 18 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power going down. */
-#define SIGSTOP 20 /* Stop, unblockable (POSIX). */
-#define SIGTSTP 21 /* Keyboard stop (POSIX). */
-#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
-#define SIGIO 23 /* I/O now possible. */
-#define SIGURG 24 /* Urgent condition on socket.*/
-#define SIGWINCH 25 /* Window size change. */
-#define SIGVTALRM 26 /* Virtual alarm clock. */
-#define SIGPROF 27 /* Profiling alarm clock. */
-#define SIGCONT 28 /* Continue (POSIX). */
-#define SIGTTIN 29 /* Background read from tty (POSIX). */
-#define SIGTTOU 30 /* Background write to tty (POSIX). */
-#define SIGXCPU 31 /* CPU limit exceeded. */
-#define SIGXFSZ 32 /* File size limit exceeded. */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 33 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h
deleted file mode 100644
index 579ccec..0000000
--- a/sysdeps/unix/sysv/irix4/statbuf.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H 1
-
-struct stat
- {
- unsigned long st_ino;
- short int st_dev;
- unsigned short int st_mode;
- short int st_nlink;
- unsigned short int st_uid;
- unsigned short int st_gid;
- short int st_rdev;
- long int st_size;
- long int st_atime;
- long int st_mtime;
- long int st_ctime;
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
deleted file mode 100644
index 6e1c843..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _FCNTLBITS_H
-#define _FCNTLBITS_H 1
-
-#include <sys/types.h>
-
-
-/* In GNU, read and write are bits (unlike BSD). */
-#ifdef __USE_GNU
-#define O_READ O_RDONLY /* Open for reading. */
-#define O_WRITE O_WRONLY /* Open for writing. */
-#endif
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 01000 /* not fcntl */
-#define O_TRUNC 02000 /* not fcntl */
-#define O_EXCL 04000 /* not fcntl */
-#define O_NOCTTY 010000 /* not fcntl */
-
-#define O_NONBLOCK 00004
-#define O_APPEND 00010
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 040000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
-
-#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get f_flags */
-#define F_SETFD 2 /* set f_flags */
-#define F_GETFL 3 /* more flags (cloexec) */
-#define F_SETFL 4
-#define F_GETLK 7
-#define F_SETLK 8
-#define F_SETLKW 9
-
-#define F_SETOWN 5 /* for sockets. */
-#define F_GETOWN 6 /* for sockets. */
-
-/* for F_[GET|SET]FL */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* for posix fcntl() and lockf() */
-#define F_RDLCK 1
-#define F_WRLCK 2
-#define F_UNLCK 8
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK 16 /* or 3 */
-#define F_SHLCK 32 /* or 4 */
-
-/* operations for bsd flock(), also used by the kernel implementation */
-#define LOCK_SH 1 /* shared lock */
-#define LOCK_EX 2 /* exclusive lock */
-#define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-#define LOCK_UN 8 /* remove lock */
-
-struct flock
- {
- short int l_type;
- short int l_whence;
- __off_t l_start;
- __off_t l_len;
- __pid_t l_pid;
- };
-
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-#define FAPPEND O_APPEND
-#define FFSYNC O_FSYNC
-#define FASYNC O_ASYNC
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
deleted file mode 100644
index 2af77f7..0000000
--- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _GNU_TYPES_H
-#define _GNU_TYPES_H 1
-
-#include <features.h>
-
-/* Convenience types. */
-typedef unsigned char __u_char;
-typedef unsigned short __u_short;
-typedef unsigned int __u_int;
-typedef unsigned long __u_long;
-#ifdef __GNUC__
-typedef unsigned long long int __u_quad_t;
-typedef long long int __quad_t;
-#else
-typedef struct
- {
- long int __val[2];
- } __quad_t;
-typedef struct
- {
- __u_long __val[2];
- } __u_quad_t;
-#endif
-typedef __quad_t *__qaddr_t;
-
-typedef __u_long __dev_t; /* Type of device numbers. */
-typedef __u_int __uid_t; /* Type of user identifications. */
-typedef __u_int __gid_t; /* Type of group identifications. */
-typedef __u_int __ino_t; /* Type of file serial numbers. */
-typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
-typedef __u_int __nlink_t; /* Type of file link counts. */
-typedef long int __off_t; /* Type of file sizes and offsets. */
-typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
-typedef int __pid_t; /* Type of process identifications. */
-typedef long int __ssize_t; /* Type of a byte count, or error. */
-
-typedef struct
- {
- int __val[2];
- } __fsid_t; /* Type of file system IDs. */
-
-/* Everythin' else. */
-typedef int __daddr_t; /* The type of a disk address. */
-typedef char *__caddr_t;
-typedef long int __time_t;
-typedef long int __swblk_t; /* Type of a swap block maybe? */
-
-typedef long int __clock_t;
-
-/* One element in the file descriptor mask array. */
-typedef unsigned long int __fd_mask;
-
-/* Due to incaution, we may have gotten these from a kernel header file. */
-#undef __FD_SETSIZE
-#undef __NFDBITS
-#undef __FDMASK
-
-/* Number of descriptors that can fit in an `fd_set'. */
-#define __FD_SETSIZE 1024
-
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NFDBITS (8 * sizeof (__fd_mask))
-#define __FDELT(d) ((d) / __NFDBITS)
-#define __FDMASK(d) (1 << ((d) % __NFDBITS))
-
-/* fd_set for select and pselect. */
-typedef struct
- {
- /* XPG4.2 requires this member name. */
- __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
- } __fd_set;
-
-
-typedef int __key_t;
-
-#endif /* gnu/types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/ioctls.h b/sysdeps/unix/sysv/linux/alpha/ioctls.h
deleted file mode 100644
index 80b2e62..0000000
--- a/sysdeps/unix/sysv/linux/alpha/ioctls.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _IOCTLS_H
-#define _IOCTLS_H 1
-
-/* Use the definitions from the kernel header files. */
-#include <asm/ioctls.h>
-#include <sys/kernel_termios.h>
-
-/* Oh well, this is necessary since the kernel data structure is
- different from the user-level version. */
-#undef TCGETS
-#undef TCSETS
-#undef TCSETSW
-#undef TCSETSF
-#define TCGETS _IOR ('t', 19, struct __kernel_termios)
-#define TCSETS _IOW ('t', 20, struct __kernel_termios)
-#define TCSETSW _IOW ('t', 21, struct __kernel_termios)
-#define TCSETSF _IOW ('t', 22, struct __kernel_termios)
-
-#include <linux/sockios.h>
-
-#endif /* ioctls.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.h b/sysdeps/unix/sysv/linux/alpha/sigaction.h
deleted file mode 100644
index 57ce5e6..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sigaction.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* The proper definitions for Linux/Alpha sigaction.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-/* Structure describing the action to be taken when a signal arrives. */
-struct sigaction
- {
- /* Signal handler. */
- __sighandler_t sa_handler;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
-
- /* Special flags. */
- unsigned int sa_flags;
- };
-
-/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
-#ifdef __USE_MISC
-#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
-#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
-#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
-#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
-
-/* Some aliases for the SA_ constants. */
-#define SA_NODEFER SA_NOMASK
-#define SA_RESETHAND SA_ONESHOT
-#endif
-
-/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/alpha/signum.h b/sysdeps/unix/sysv/linux/alpha/signum.h
deleted file mode 100644
index be6132d..0000000
--- a/sysdeps/unix/sysv/linux/alpha/signum.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Signal number definitions. Linux/Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#ifdef _SIGNAL_H
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-/*
- * Linux/AXP has different signal numbers that Linux/i386: I'm trying
- * to make it OSF/1 binary compatible, at least for normal binaries.
- */
-#define SIGHUP 1
-#define SIGINT 2
-#define SIGQUIT 3
-#define SIGILL 4
-#define SIGTRAP 5
-#define SIGABRT 6
-#define SIGEMT 7
-#define SIGFPE 8
-#define SIGKILL 9
-#define SIGBUS 10
-#define SIGSEGV 11
-#define SIGSYS 12
-#define SIGPIPE 13
-#define SIGALRM 14
-#define SIGTERM 15
-#define SIGURG 16
-#define SIGSTOP 17
-#define SIGTSTP 18
-#define SIGCONT 19
-#define SIGCHLD 20
-#define SIGTTIN 21
-#define SIGTTOU 22
-#define SIGIO 23
-#define SIGXCPU 24
-#define SIGXFSZ 25
-#define SIGVTALRM 26
-#define SIGPROF 27
-#define SIGWINCH 28
-#define SIGINFO 29
-#define SIGUSR1 30
-#define SIGUSR2 31
-
-#define SIGPOLL SIGIO
-#define SIGPWR SIGINFO
-#define SIGIOT SIGABRT
-
-#define _NSIG 32 /* Biggest signal number + 1. */
-
-#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h
deleted file mode 100644
index 207fa0c..0000000
--- a/sysdeps/unix/sysv/linux/alpha/statbuf.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H 1
-
-/* Versions of the `struct stat' data structure. */
-#define _STAT_VER_LINUX_OLD 0
-#define _STAT_VER_LINUX 1
-#define _STAT_VER _STAT_VER_LINUX
-
-/* Versions of the `xmknod' interface. */
-#define _MKNOD_VER_LINUX 0
-
-struct stat
- {
- __dev_t st_dev; /* Device. */
- __ino_t st_ino; /* File serial number. */
- __mode_t st_mode; /* File mode. */
- __nlink_t st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- __dev_t st_rdev; /* Device number, if device. */
- __off_t st_size; /* Size of file, in bytes. */
- __time_t st_atime; /* Time of last access. */
- __time_t st_mtime; /* Time of last modification. */
- __time_t st_ctime; /* Time of last status change. */
- unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- int st_blocks; /* Nr. of 512-byte blocks allocated. */
- unsigned int st_flags;
- unsigned int st_gen;
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h
deleted file mode 100644
index 57830da..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SYS_IPC_BUF_H
-
-#define _SYS_IPC_BUF_H 1
-#include <features.h>
-
-#include <sys/types.h>
-
-/* Mode bits for `msgget', `semget', and `shmget'. */
-#define IPC_CREAT 01000 /* Create key if key does not exist. */
-#define IPC_EXCL 02000 /* Fail if key exists. */
-#define IPC_NOWAIT 04000 /* Return error on wait. */
-
-/* Control commands for `msgctl', `semctl', and `shmctl'. */
-#define IPC_RMID 0 /* Remove identifier. */
-#define IPC_SET 1 /* Set `ipc_perm' options. */
-#define IPC_STAT 2 /* Get `ipc_perm' options. */
-#define IPC_INFO 3 /* See ipcs. */
-
-
-__BEGIN_DECLS
-
-/* Special key values. */
-#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
-
-
-/* Data structure used to pass permission information to IPC operations. */
-struct ipc_perm
- {
- __key_t __key; /* Key. */
- unsigned int uid; /* Owner's user ID. */
- unsigned int gid; /* Owner's group ID. */
- unsigned int cuid; /* Creator's user ID. */
- unsigned int cgid; /* Creator's group ID. */
- unsigned int mode; /* Read/write permission. */
- unsigned short int __seq; /* Sequence number. */
- };
-
-
-/* Kludge to work around Linux' restriction of only up to five
- arguments to a system call. */
-struct ipc_kludge
- {
- void *msgp;
- long int msgtyp;
- };
-
-/* The actual system call: all functions are multiplexed by this. */
-extern int __ipc __P ((int __call, int __first, int __second, int __third,
- void *__ptr));
-
-/* The codes for the functions to use the multiplexer `__ipc'. */
-#define IPCOP_semop 1
-#define IPCOP_semget 2
-#define IPCOP_semctl 3
-#define IPCOP_msgsnd 11
-#define IPCOP_msgrcv 12
-#define IPCOP_msgget 13
-#define IPCOP_msgctl 14
-#define IPCOP_shmat 21
-#define IPCOP_shmdt 22
-#define IPCOP_shmget 23
-#define IPCOP_shmctl 24
-
-__END_DECLS
-
-#endif /* _SYS_IPC_BUF_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
deleted file mode 100644
index d0932c1..0000000
--- a/sysdeps/unix/sysv/linux/alpha/termbits.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* termios type and macro definitions. Linux version.
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _TERMBITS_H
-#define _TERMBITS_H 1
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-#define NCCS 32
-struct termios
- {
- tcflag_t c_iflag; /* input mode flags */
- tcflag_t c_oflag; /* output mode flags */
- tcflag_t c_cflag; /* control mode flags */
- tcflag_t c_lflag; /* local mode flags */
- cc_t c_cc[NCCS]; /* control characters */
- cc_t c_line; /* line discipline (== c_cc[33]) */
- speed_t c_ispeed; /* input speed */
- speed_t c_ospeed; /* output speed */
- };
-
-/* c_cc characters */
-#define VEOF 0
-#define VEOL 1
-#define VEOL2 2
-#define VERASE 3
-#define VWERASE 4
-#define VKILL 5
-#define VREPRINT 6
-#define VSWTC 7
-#define VINTR 8
-#define VQUIT 9
-#define VSUSP 10
-#define VSTART 12
-#define VSTOP 13
-#define VLNEXT 14
-#define VDISCARD 15
-#define VMIN 16
-#define VTIME 17
-
-/* c_iflag bits */
-#define IGNBRK 0000001
-#define BRKINT 0000002
-#define IGNPAR 0000004
-#define PARMRK 0000010
-#define INPCK 0000020
-#define ISTRIP 0000040
-#define INLCR 0000100
-#define IGNCR 0000200
-#define ICRNL 0000400
-#define IXON 0001000
-#define IXOFF 0002000
-#ifdef __USE_BSD
- /* POSIX.1 doesn't want these... */
-# define IXANY 0004000
-# define IUCLC 0010000
-# define IMAXBEL 0020000
-#endif
-
-/* c_oflag bits */
-#define OPOST 0000001
-#define ONLCR 0000002
-#define OLCUC 0000004
-
-#define OCRNL 0000010
-#define ONOCR 0000020
-#define ONLRET 0000040
-
-#define OFILL 00000100
-#define OFDEL 00000200
-#define NLDLY 00001400
-#define NL0 00000000
-#define NL1 00000400
-#define NL2 00001000
-#define NL3 00001400
-#define TABDLY 00006000
-#define TAB0 00000000
-#define TAB1 00002000
-#define TAB2 00004000
-#define TAB3 00006000
-#define CRDLY 00030000
-#define CR0 00000000
-#define CR1 00010000
-#define CR2 00020000
-#define CR3 00030000
-#define FFDLY 00040000
-#define FF0 00000000
-#define FF1 00040000
-#define BSDLY 00100000
-#define BS0 00000000
-#define BS1 00100000
-#define VTDLY 00200000
-#define VT0 00000000
-#define VT1 00200000
-#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
-
-/* c_cflag bit meaning */
-#define CBAUD 0000037
-#define B0 0000000 /* hang up */
-#define B50 0000001
-#define B75 0000002
-#define B110 0000003
-#define B134 0000004
-#define B150 0000005
-#define B200 0000006
-#define B300 0000007
-#define B600 0000010
-#define B1200 0000011
-#define B1800 0000012
-#define B2400 0000013
-#define B4800 0000014
-#define B9600 0000015
-#define B19200 0000016
-#define B38400 0000017
-#define EXTA B19200
-#define EXTB B38400
-#define CBAUDEX 0000000
-#define B57600 00020
-#define B115200 00021
-#define B230400 00022
-#define B460800 00023
-
-#define CSIZE 00001400
-#define CS5 00000000
-#define CS6 00000400
-#define CS7 00001000
-#define CS8 00001400
-
-#define CSTOPB 00002000
-#define CREAD 00004000
-#define PARENB 00010000
-#define PARODD 00020000
-#define HUPCL 00040000
-
-#define CLOCAL 00100000
-#define CRTSCTS 020000000000 /* flow control */
-
-/* c_lflag bits */
-#define ISIG 0x00000080
-#define ICANON 0x00000100
-#define XCASE 0x00004000
-#define ECHO 0x00000008
-#define ECHOE 0x00000002
-#define ECHOK 0x00000004
-#define ECHONL 0x00000010
-#define NOFLSH 0x80000000
-#define TOSTOP 0x00400000
-#define ECHOCTL 0x00000040
-#define ECHOPRT 0x00000020
-#define ECHOKE 0x00000001
-#define FLUSHO 0x00800000
-#define PENDIN 0x20000000
-#define IEXTEN 0x00000400
-
-/* Values for the ACTION argument to `tcflow'. */
-#define TCOOFF 0
-#define TCOON 1
-#define TCIOFF 2
-#define TCION 3
-
-/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
-#define TCIFLUSH 0
-#define TCOFLUSH 1
-#define TCIOFLUSH 2
-
-/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
-#define TCSANOW 0
-#define TCSADRAIN 1
-#define TCSAFLUSH 2
-
-
-#define _IOT_termios /* Hurd ioctl type field. */ \
- _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
-
-#endif /* _TERMBITS_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h
deleted file mode 100644
index 1ad0df8..0000000
--- a/sysdeps/unix/sysv/linux/alpha/timebits.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* System-dependent timing definitions. Linux/Alpha version.
- Copyright (C) 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef __need_timeval
-# undef __need_timeval
-# ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-/* A time value that is accurate to the nearest
- microsecond but also has a range of years. */
-struct timeval
- {
- int tv_sec; /* Seconds. */
- int tv_usec; /* Microseconds. */
- };
-# endif /* struct timeval */
-#endif /* need timeval */
-
-
-#ifndef _TIMEBITS_H
-# define _TIMEBITS_H 1
-
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
- The macro `CLOCKS_PER_SEC' is the number per second of the value
- returned by the `clock' function. */
-/* CAE XSH, Issue 4, Version 2: <time.h>
- The value of CLOCKS_PER_SEC is required to be 1 million on all
- XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000
-
-/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
- presents the real value for clock ticks per second for the system. */
-# define CLK_TCK 1024
-
-#endif /* timebits.h */
diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h
deleted file mode 100644
index 6b0c460..0000000
--- a/sysdeps/unix/sysv/minix/sigaction.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Structure describing the action to be taken when a signal arrives. */
-struct sigaction
- {
- /* Signal handler. */
- __sighandler_t sa_handler;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
-
- /* Special flags. */
- int sa_flags;
- };
-
-/* Bits in `sa_flags'. */
-#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
-#define SA_NODEFER 0x4 /* Don't block signal while catching it. */
-#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x10 /* Extended signal handling. */
-#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
-#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
-#define SA_DISABLE 0x100 /* Disable alternate signal stack. */
-#endif
-#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */
-
-
-/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 0 /* Block signals. */
-#define SIG_UNBLOCK 1 /* Unblock signals. */
-#define SIG_SETMASK 2 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h
deleted file mode 100644
index 0408951..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/confname.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
-Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Values for the NAME argument to `pathconf' and `fpathconf'. */
-#define _PC_LINK_MAX 0
-#define _PC_MAX_CANON 1
-#define _PC_MAX_INPUT 2
-#define _PC_NAME_MAX 3
-#define _PC_PATH_MAX 4
-#define _PC_PIPE_BUF 5
-#define _PC_CHOWN_RESTRICTED 6
-#define _PC_NO_TRUNC 7
-#define _PC_VDISABLE 8
-
-/* Values for the argument to `sysconf'. */
-#define _SC_ARG_MAX 0
-#define _SC_CHILD_MAX 1
-#define _SC_CLK_TCK 2
-#define _SC_NGROUPS_MAX 3
-#define _SC_OPEN_MAX 4
-#define _SC_JOB_CONTROL 5
-#define _SC_SAVED_IDS 6
-#define _SC_VERSION 7
-#define _SC_PASS_MAX 8
-#define _SC_XOPEN_VERSION 9
-#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */
-
-#ifdef __USE_POSIX2
-/* Values for the NAME argument to `confstr'. */
-enum
- {
- _CS_PATH /* The default search path. */
- };
-#endif
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h
deleted file mode 100644
index c21b928..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* The proper definitions for SCO's sigaction.
-Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Structure describing the action to be taken when a signal arrives. */
-struct sigaction
- {
- /* Signal handler. */
- __sighandler_t sa_handler;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
-
- /* Special flags. */
- int sa_flags;
- };
-
-/* Bits in `sa_flags'. */
-#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */
-
-/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_SETMASK 0 /* Set the set of blocked signals. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h
deleted file mode 100644
index e456816..0000000
--- a/sysdeps/unix/sysv/sco3.2/local_lim.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _LOCAL_LIM_H
-#define _LOCAL_LIM_H 1
-
-#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */
-#define ARG_MAX 5120
-#define CHILD_MAX 25
-#define OPEN_MAX 60
-#define LINK_MAX 1000
-#define MAX_CANON 256
-
-/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs
- file systems, even though the System V limits.h incorrectly
- defines it as 14. Giving it a value which is too large
- is harmless (it is a maximum). */
-#define NAME_MAX 255
-
-#define PATH_MAX 1024
-
-#endif /* local_lim.h */
diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
deleted file mode 100644
index 9354d67..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H 1
-
-#include <gnu/types.h>
-
-/* Versions of the `struct stat' data structure and
- the bits of the `xmknod' interface. */
-#define _STAT_VER 2
-#define _MKNOD_VER 2
-
-/* Structure describing file characteristics. */
-struct stat
- {
- unsigned long st_dev; /* Device. */
- long st_filler1[3];
- unsigned long st_ino; /* File serial number. */
- unsigned long st_mode; /* File mode. */
- unsigned long st_nlink; /* Link count. */
- long st_uid; /* User ID of the file's owner. */
- long st_gid; /* Group ID of the file's group.*/
- unsigned long st_rdev; /* Device number, if device. */
- long st_filler2[2];
-
- long st_size; /* Size of file, in bytes. */
- /* SVR4 added this extra long to allow for expansion of off_t. */
- long st_filler3;
-
- long st_atime; /* Time of last access. */
- unsigned long st_atime_usec;
- long st_mtime; /* Time of last modification. */
- unsigned long st_mtime_usec;
- long st_ctime; /* Time of last status change. */
- unsigned long st_ctime_usec;
-
- long st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-
- long st_blocks; /* Number of 512-byte blocks allocated. */
- char st_fstype[16]; /* The type of this filesystem. */
- int st_aclcnt;
- unsigned long st_level;
- unsigned long st_flags;
- unsigned long st_cmwlevel;
- long st_filler4[4];
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h
deleted file mode 100644
index 1305ba6..0000000
--- a/sysdeps/unix/sysv/sysv4/sigaction.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* The proper definitions for SVR4's sigaction.
-Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Structure describing the action to be taken when a signal arrives. */
-struct sigaction
- {
- /* Special flags. */
- int sa_flags;
-
- /* Signal handler. */
- __sighandler_t sa_handler;
-
- /* Additional set of signals to be blocked. */
- __sigset_t sa_mask;
-
- /* Padding. */
- int sa_resv[2];
- };
-
-/* Bits in `sa_flags'. */
-#ifdef __USE_MISC
-#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
-#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
-#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
-#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
-#define SA_NODEFER 0x10 /* Don't automatically block the signal when
- its handler is being executed. */
-#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
-#endif
-#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
-
-/* Values for the HOW argument to `sigprocmask'. */
-#define SIG_BLOCK 1 /* Block signals. */
-#define SIG_UNBLOCK 2 /* Unblock signals. */
-#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h
deleted file mode 100644
index f11c731..0000000
--- a/sysdeps/unix/sysv/sysv4/signum.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Signal number definitions. SVR4 version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef _SIGNAL_H
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap (4.2 BSD). */
-#define SIGEMT 7 /* EMT trap (4.2 BSD). */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error (4.2 BSD). */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
-#define SIGCHLD 18 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power failure restart (System V). */
-#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
-#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
-#define SIGPOLL 22 /* Pollable event occurred (System V). */
-#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
-#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
-#define SIGTSTP 24 /* Keyboard stop (POSIX). */
-#define SIGCONT 25 /* Continue (POSIX). */
-#define SIGTTIN 26 /* Background read from tty (POSIX). */
-#define SIGTTOU 27 /* Background write to tty (POSIX). */
-#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
-#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
-#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
-#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 32 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
deleted file mode 100644
index 1461c93..0000000
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _SIGSET_H_types
-#define _SIGSET_H_types 1
-
-typedef int __sig_atomic_t;
-
-/* A `sigset_t' has a bit for each signal. */
-typedef struct
- {
- unsigned long int __sigbits[4];
- } __sigset_t;
-
-#endif /* ! _SIGSET_H_types */
-
-/* We only want to define these functions if <signal.h> was actually
- included; otherwise we were included just to define the types. Since we
- are namespace-clean, it wouldn't hurt to define extra macros. But
- trouble can be caused by functions being defined (e.g., any global
- register vars declared later will cause compilation errors). */
-
-#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
-#define _SIGSET_H_fns 1
-
-/* Return a mask that includes SIG only. */
-#define __sigmask(sig) (1 << ((sig) - 1))
-
-
-/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
-#define __NSSBITS (sizeof (__sigset_t) * 8)
-#define __SSELT(s) ((s) / __NSSBITS)
-#define __SSMASK(s) (1 << ((s) % __NSSBITS))
-
-#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
-#endif
-
-_EXTERN_INLINE int
-__sigemptyset (__sigset_t *__set)
-{
- __set->__sigbits[0] = __set->__sigbits[1] =
- __set->__sigbits[2] = __set->__sigbits[3] = 0L;
- return 0;
-}
-
-_EXTERN_INLINE int
-__sigfillset (__sigset_t *__set)
-{
- /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits
- for signals [1,31]. Setting bits for unimplemented signals seems
- harmless (and we will find out if it really is). */
- __set->__sigbits[0] = __set->__sigbits[1] =
- __set->__sigbits[2] = __set->__sigbits[3] = ~0L;
- return 0;
-}
-
-_EXTERN_INLINE int
-__sigaddset (__sigset_t *__set, int __sig)
-{
- __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig);
- return 0;
-}
-
-_EXTERN_INLINE int
-__sigdelset (__sigset_t *__set, int __sig)
-{
- __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig);
- return 0;
-}
-
-_EXTERN_INLINE int
-__sigismember (__const __sigset_t *__set, int __sig)
-{
- if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig))
- return 1;
- return 0;
-}
-
-#endif /* ! _SIGSET_H_fns */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h
deleted file mode 100644
index 4e55764..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/signum.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Signal number definitions. Solaris 2 version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifdef _SIGNAL_H
-
-/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
-#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
-#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
-
-
-/* Signals. */
-#define SIGHUP 1 /* Hangup (POSIX). */
-#define SIGINT 2 /* Interrupt (ANSI). */
-#define SIGQUIT 3 /* Quit (POSIX). */
-#define SIGILL 4 /* Illegal instruction (ANSI). */
-#define SIGABRT SIGIOT /* Abort (ANSI). */
-#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap (4.2 BSD). */
-#define SIGEMT 7 /* EMT trap (4.2 BSD). */
-#define SIGFPE 8 /* Floating-point exception (ANSI). */
-#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error (4.2 BSD). */
-#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
-#define SIGPIPE 13 /* Broken pipe (POSIX). */
-#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
-#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
-#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
-#define SIGCHLD 18 /* Child status has changed (POSIX). */
-#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power failure restart (System V). */
-#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
-#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
-#define SIGPOLL 22 /* Pollable event occurred (System V). */
-#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
-#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
-#define SIGTSTP 24 /* Keyboard stop (POSIX). */
-#define SIGCONT 25 /* Continue (POSIX). */
-#define SIGTTIN 26 /* Background read from tty (POSIX). */
-#define SIGTTOU 27 /* Background write to tty (POSIX). */
-#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
-#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
-#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
-#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
-/* The following signals are new in Solaris 2. */
-#define SIGWAITING 32 /* Process's lwps are blocked. */
-#define SIGLWP 33 /* Special signal used by thread library. */
-#define SIGFREEZE 34 /* Special signal used by CPR. */
-#define SIGTHAW 35 /* Special signal used by CPR. */
-#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */
-#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */
-
-#endif /* <signal.h> included. */
-
-#define _NSIG 44 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h
deleted file mode 100644
index 532b379..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/sparc/sigcontext.h>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
deleted file mode 100644
index e4e2ab8..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H 1
-
-#include <gnu/types.h>
-
-/* Structure describing file characteristics. */
-struct stat
- {
- unsigned long int st_dev;
- long st_filler1[3];
- __ino_t st_ino; /* File serial number. */
- unsigned long int st_mode; /* File mode. */
- /* This is unsigned long instead of __nlink_t, since SVR4 has
- a long nlink_t, not a short one. */
- unsigned long int st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- unsigned long int st_rdev; /* Device number, if device. */
- long st_filler2[2];
-
- __off_t st_size; /* Size of file, in bytes. */
- /* SVR4 added this extra long to allow for expansion of off_t. */
- long st_filler3;
-
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atime_usec;
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtime_usec;
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctime_usec;
-
- long st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-
- long st_blocks; /* Number of 512-byte blocks allocated. */
- char st_fstype[16];
- long st_filler4[8];
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-/* These don't actually exist on System V, but having them doesn't hurt. */
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/sysv/sysv4/utsnamelen.h b/sysdeps/unix/sysv/sysv4/utsnamelen.h
deleted file mode 100644
index 9dcc618..0000000
--- a/sysdeps/unix/sysv/sysv4/utsnamelen.h
+++ /dev/null
@@ -1 +0,0 @@
-#define _UTSNAME_LENGTH 257
diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h
deleted file mode 100644
index f5613c1..0000000
--- a/sysdeps/unix/sysv/sysv4/waitflags.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1993, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _WAITFLAGS_H
-
-#define _WAITFLAGS_H 1
-
-/* Bits in the third argument to `waitpid'. */
-#define WNOHANG 64 /* Don't block waiting. */
-#define WUNTRACED 4 /* Report status of stopped children. */
-
-#ifdef __USE_SVID
-#define WEXITED 1 /* Look for children that have exited. */
-#define WTRAPPED 2 /* Look for processes that stopped
- while tracing. */
-#endif
-
-#endif /* waitflags.h */
diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h
deleted file mode 100644
index 02cafb0..0000000
--- a/sysdeps/vax/huge_val.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* `HUGE_VAL' constant for Vaxen.
- Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _HUGE_VAL_H
-#define _HUGE_VAL_H 1
-
-#define HUGE_VAL 1.70141182460469227e38
-
-#endif /* huge_val.h */
diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h
deleted file mode 100644
index 7adecd9..0000000
--- a/sysdeps/vax/jmp_buf.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* Define the machine-dependent type `jmp_buf'. Vax version. */
-
-typedef struct
- {
- PTR __fp;
- PTR __pc;
- } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85956635912be62477a7bd45247a10be77707c95
commit 85956635912be62477a7bd45247a10be77707c95
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:39:53 1997 +0000
m68k specific math values.
diff --git a/sysdeps/m68k/bits/huge_val.h b/sysdeps/m68k/bits/huge_val.h
new file mode 100644
index 0000000..822b829
--- /dev/null
+++ b/sysdeps/m68k/bits/huge_val.h
@@ -0,0 +1,75 @@
+/* `HUGE_VAL' constants for m68k (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
+#endif
+
+
+#include <features.h>
+#include <sys/cdefs.h>
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+
+#ifdef __GNUC__
+
+# define HUGE_VAL \
+ (__extension__ \
+ ((union { unsigned long long __l; double __d; }) \
+ { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+static union { unsigned char __c[8]; double __d; } __huge_val =
+ { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
+# define HUGE_VAL (__huge_val.__d)
+
+#endif /* GCC. */
+
+
+/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+
+#ifdef __USE_ISOC9X
+
+# ifdef __GNUC__
+
+# define HUGE_VALF \
+ (__extension__ \
+ ((union { unsigned long __l; float __f; }) \
+ { __l: 0x7f800000UL }).__f)
+
+# define HUGE_VALL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
+
+# else /* not GCC */
+
+static union { unsigned char __c[4]; float __f; } __huge_valf =
+ { { 0x7f, 0x80, 0, 0 } };
+# define HUGE_VALF (__huge_valf.__f)
+
+static union { unsigned char __c[12]; long double __ld; } __huge_vall =
+ { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
+# define HUGE_VALL (__huge_vall.__ld)
+
+# endif /* GCC. */
+
+#endif /* __USE_ISOC9X. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15c12250939e8f5668e7e5711fa0dfe12c5b115e
commit 15c12250939e8f5668e7e5711fa0dfe12c5b115e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:34:13 1997 +0000
m68k w/out FPU specific math inline functions.
diff --git a/sysdeps/m68k/fpu/switch/bits/mathinline.h b/sysdeps/m68k/fpu/switch/bits/mathinline.h
new file mode 100644
index 0000000..c0f6966
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/bits/mathinline.h
@@ -0,0 +1 @@
+/* We don't want any inlines when we might not have a 68881. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef8a52eeee0ac32ce8f7877ddabcf3c86dc86fee
commit ef8a52eeee0ac32ce8f7877ddabcf3c86dc86fee
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:34:00 1997 +0000
m68k specific math inline functions.
diff --git a/sysdeps/m68k/fpu/bits/mathinline.h b/sysdeps/m68k/fpu/bits/mathinline.h
new file mode 100644
index 0000000..bdeaa9e
--- /dev/null
+++ b/sysdeps/m68k/fpu/bits/mathinline.h
@@ -0,0 +1,464 @@
+/* Definitions of inline math functions implemented by the m68881/2.
+ Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef __GNUC__
+
+#include <sys/cdefs.h>
+
+#ifdef __LIBC_M81_MATH_INLINES
+/* This is used when defining the functions themselves. Define them with
+ __ names, and with `static inline' instead of `extern inline' so the
+ bodies will always be used, never an external function call. */
+#define __m81_u(x) __CONCAT(__,x)
+#define __m81_inline static __inline
+#else
+#define __m81_u(x) x
+#define __m81_inline extern __inline
+#define __M81_MATH_INLINES 1
+#endif
+
+/* Define a const math function. */
+#define __m81_defun(rettype, func, args) \
+ __m81_inline rettype __attribute__((__const__)) \
+ __m81_u(func) args
+
+/* Define the three variants of a math function that has a direct
+ implementation in the m68k fpu. FUNC is the name for C (which will be
+ suffixed with f and l for the float and long double version, resp). OP
+ is the name of the fpu operation (without leading f). */
+
+#if defined __USE_MISC || defined __USE_ISOC9X
+#define __inline_mathop(func, op) \
+ __inline_mathop1(double, func, op) \
+ __inline_mathop1(float, __CONCAT(func,f), op) \
+ __inline_mathop1(long double, __CONCAT(func,l), op)
+#else
+#define __inline_mathop(func, op) \
+ __inline_mathop1(double, func, op)
+#endif
+
+#define __inline_mathop1(float_type,func, op) \
+ __m81_defun (float_type, func, (float_type __mathop_x)) \
+ { \
+ float_type __result; \
+ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+ return __result; \
+ }
+
+#ifdef __LIBC_M81_MATH_INLINES
+/* ieee style elementary functions */
+/* These are internal to the implementation of libm. */
+__inline_mathop(__ieee754_acos, acos)
+__inline_mathop(__ieee754_asin, asin)
+__inline_mathop(__ieee754_cosh, cosh)
+__inline_mathop(__ieee754_sinh, sinh)
+__inline_mathop(__ieee754_exp, etox)
+__inline_mathop(__ieee754_log10, log10)
+__inline_mathop(__ieee754_log, logn)
+__inline_mathop(__ieee754_sqrt, sqrt)
+__inline_mathop(__ieee754_atanh, atanh)
+#endif
+
+__inline_mathop(__atan, atan)
+__inline_mathop(__cos, cos)
+__inline_mathop(__sin, sin)
+__inline_mathop(__tan, tan)
+__inline_mathop(__tanh, tanh)
+__inline_mathop(__fabs, abs)
+
+__inline_mathop(__rint, int)
+__inline_mathop(__expm1, etoxm1)
+__inline_mathop(__log1p, lognp1)
+__inline_mathop(__significand, getman)
+
+__inline_mathop(__log2, log2)
+__inline_mathop(__exp2, twotox)
+__inline_mathop(__trunc, intrz)
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+__inline_mathop(atan, atan)
+__inline_mathop(cos, cos)
+__inline_mathop(sin, sin)
+__inline_mathop(tan, tan)
+__inline_mathop(tanh, tanh)
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
+__inline_mathop(rint, int)
+__inline_mathop(expm1, etoxm1)
+__inline_mathop(log1p, lognp1)
+#endif
+
+#ifdef __USE_MISC
+__inline_mathop(significand, getman)
+#endif
+
+#ifdef __USE_ISOC9X
+__inline_mathop(log2, log2)
+__inline_mathop(exp2, twotox)
+__inline_mathop(trunc, intrz)
+#endif
+
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+
+/* This macro contains the definition for the rest of the inline
+ functions, using __FLOAT_TYPE as the domain type and __S as the suffix
+ for the function names. */
+
+#ifdef __LIBC_M81_MATH_INLINES
+/* Internally used functions. */
+#define __internal_inline_functions(float_type, s) \
+__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \
+ (float_type __x, float_type __y)) \
+{ \
+ float_type __result; \
+ __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
+ (float_type __x, float_type __y)) \
+{ \
+ float_type __result; \
+ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
+ (float_type __x, float_type __n)) \
+{ \
+ float_type __result; \
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
+ return __result; \
+}
+
+__internal_inline_functions (double,)
+__internal_inline_functions (float,f)
+__internal_inline_functions (long double,l)
+#undef __internal_inline_functions
+
+/* Get the m68881 condition codes, to quickly check multiple conditions. */
+static __inline__ unsigned long
+__m81_test (long double __val)
+{
+ unsigned long __fpsr;
+ __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
+ return __fpsr;
+}
+
+/* Bit values returned by __m81_test. */
+#define __M81_COND_NAN (1 << 24)
+#define __M81_COND_INF (2 << 24)
+#define __M81_COND_ZERO (4 << 24)
+#define __M81_COND_NEG (8 << 24)
+
+#endif /* __LIBC_M81_MATH_INLINES */
+
+/* The rest of the functions are available to the user. */
+
+#define __inline_functions(float_type, s) \
+__m81_inline float_type \
+__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
+{ \
+ float_type __mantissa, __exponent; \
+ int __iexponent; \
+ unsigned long __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ if (__fpsr & (7 << 24)) \
+ { \
+ /* Not finite or zero. */ \
+ *__expptr = 0; \
+ return __value; \
+ } \
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
+ __iexponent = (int) __exponent + 1; \
+ *__expptr = __iexponent; \
+ __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
+ : "0" (__value), "dmi" (-__iexponent)); \
+ return __mantissa; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards negative infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
+ /* Convert X to an integer, using -Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards positive infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg | 0x30)); \
+ /* Convert X to an integer, using +Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, \
+ so we must extract and examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
+} \
+ \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
+{ \
+ char __result; \
+ __asm("ftst%.x %1\n" \
+ "fsun %0" : "=dm" (__result) : "f" (__value)); \
+ return __result; \
+} \
+ \
+__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, so we must extract and \
+ examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm ("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (3 << 24)) == 0; \
+} \
+ \
+__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for the sign bit, so we must extract \
+ and examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm ("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr >> 27) & 1; \
+} \
+ \
+__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ if (__x == 0.0) \
+ return 0x80000001; \
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ return (int) __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
+{ \
+ float_type __result; \
+ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Temporarily disable the inexact exception. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg & ~0x200)); \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_inline void \
+__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
+ float_type *__cosx) \
+{ \
+ __asm ("fsincos%.x %2,%1:%0" \
+ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
+}
+
+/* This defines the three variants of the inline functions. */
+__inline_functions (double,)
+__inline_functions (float,f)
+__inline_functions (long double,l)
+#undef __inline_functions
+
+__m81_defun (long int, __lrint, (long double __x))
+{
+ long int __result;
+ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
+ return __result;
+}
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+/* Define inline versions of the user visible functions. */
+
+#define __inline_forward_c(rettype, name, args1, args2) \
+extern __inline rettype __attribute__((__const__)) \
+name args1 \
+{ \
+ return __CONCAT(__,name) args2; \
+}
+
+#define __inline_forward(rettype, name, args1, args2) \
+extern __inline rettype name args1 \
+{ \
+ return __CONCAT(__,name) args2; \
+}
+
+__inline_forward(double,frexp, (double __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(double,floor, (double __x), (__x))
+__inline_forward_c(double,ceil, (double __x), (__x))
+#ifdef __USE_MISC
+__inline_forward_c(int,isinf, (double __value), (__value))
+__inline_forward_c(int,finite, (double __value), (__value))
+__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
+#endif
+#if defined __USE_MISC || defined __USE_XOPEN
+#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
+__inline_forward_c(int,isnan, (double __value), (__value))
+#endif
+__inline_forward_c(int,ilogb, (double __value), (__value))
+#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(double,nearbyint, (double __value), (__value))
+#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
+ (__x, __sinx, __cosx))
+#endif
+
+#if defined __USE_MISC || defined __USE_ISOC9X
+
+__inline_forward(float,frexpf, (float __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(float,floorf, (float __x), (__x))
+__inline_forward_c(float,ceilf, (float __x), (__x))
+#ifdef __USE_MISC
+__inline_forward_c(int,isinff, (float __value), (__value))
+__inline_forward_c(int,finitef, (float __value), (__value))
+__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
+__inline_forward_c(int,isnanf, (float __value), (__value))
+__inline_forward_c(int,ilogbf, (float __value), (__value))
+#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(float,nearbyintf, (float __value), (__value))
+#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
+ (__x, __sinx, __cosx))
+#endif
+
+__inline_forward(long double,frexpl, (long double __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(long double,floorl, (long double __x), (__x))
+__inline_forward_c(long double,ceill, (long double __x), (__x))
+#ifdef __USE_MISC
+__inline_forward_c(int,isinfl, (long double __value), (__value))
+__inline_forward_c(int,finitel, (long double __value), (__value))
+__inline_forward_c(long double,scalbnl, (long double __x, int __n),
+ (__x, __n))
+__inline_forward_c(int,isnanl, (long double __value), (__value))
+__inline_forward_c(int,ilogbl, (long double __value), (__value))
+#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
+__inline_forward_c(long int,lrint, (long double __value), (__value))
+#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincosl,
+ (long double __x, long double *__sinx, long double *__cosx),
+ (__x, __sinx, __cosx))
+#endif
+
+#endif /* Use misc or ISO C9X */
+
+#undef __inline_forward
+#undef __inline_forward_c
+
+#ifdef __USE_ISOC9X
+
+/* ISO C 9X defines some macros to perform unordered comparisons. The
+ m68k FPU supports this with special opcodes and we should use them.
+ These must not be inline functions since we have to be able to handle
+ all floating-point types. */
+#undef isgreater
+#define isgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsogt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isgreaterequal
+#define isgreaterequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsoge %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isless
+#define isless(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsolt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef islessequal
+#define islessequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsole %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef islessgreater
+#define islessgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsogl %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isunordered
+#define isunordered(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp%.x %2,%1; fsun %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+#endif
+
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+
+#endif /* GCC. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3539abf29880ce391718f5c826708c441e1f889
commit b3539abf29880ce391718f5c826708c441e1f889
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:33:37 1997 +0000
Alpha specific math inline functions.
diff --git a/sysdeps/alpha/fpu/bits/mathinline.h b/sysdeps/alpha/fpu/bits/mathinline.h
new file mode 100644
index 0000000..0f76027
--- /dev/null
+++ b/sysdeps/alpha/fpu/bits/mathinline.h
@@ -0,0 +1,44 @@
+/* Inline math functions for Alpha.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger-Tang.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
+
+extern __inline double
+__copysign (double __x, double __y)
+{
+ __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
+ return __x;
+}
+
+extern __inline double
+fabs (double __x)
+{
+ __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
+ return __x;
+}
+
+extern __inline double
+atan (double __x)
+{
+ extern double __atan2 (double, double);
+ return __atan2 (__x, 1.0);
+}
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19b95492523aa3305d33c3e614b98904f48f3273
commit 19b95492523aa3305d33c3e614b98904f48f3273
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:33:02 1997 +0000
m68k specific math definitions.
diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h
new file mode 100644
index 0000000..4d07176
--- /dev/null
+++ b/sysdeps/m68k/fpu/bits/mathdef.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+#error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+
+/* The m68k FPUs evaluate all values in the 96 bit floating-point format
+ which is also available for the user as `long double'. Therefore we
+ define: */
+typedef long double float_t; /* `float' expressions are evaluated as
+ `long double'. */
+typedef long double double_t; /* `double' expressions are evaluated as
+ `long double'. */
+
+/* Signal that both types are `long double'. */
+#define FLT_EVAL_METHOD 2
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VALL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d4b2fb95421774897c6aa80818296438ccd3dd4
commit 5d4b2fb95421774897c6aa80818296438ccd3dd4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:32:30 1997 +0000
Alpha specific math definitions.
diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h
new file mode 100644
index 0000000..0bc9c94
--- /dev/null
+++ b/sysdeps/alpha/fpu/bits/mathdef.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATH_H
+#error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+/* FIXME! This file describes properties of the compiler, not the machine;
+ it should not be part of libc! */
+
+#ifdef __GNUC__
+#if __STDC__ == 1
+
+/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
+typedef float float_t;
+typedef double double_t;
+
+/* Signal that types stay as they were declared. */
+#define FLT_EVAL_METHOD 0
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VALF
+
+#else
+
+/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
+typedef double float_t;
+typedef double double_t;
+
+/* Signal that both types are `double'. */
+#define FLT_EVAL_METHOD 1
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VAL
+
+#endif
+#else
+
+/* Wild guess at types for float_t and double_t. */
+typedef double float_t;
+typedef double double_t;
+
+/* Strange compiler, we don't know how it works. */
+#define FLT_EVAL_METHOD -1
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VAL
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21bc60d2401587a87a81c7c087fb7ffda546b096
commit 21bc60d2401587a87a81c7c087fb7ffda546b096
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:31:18 1997 +0000
m68k specific FP environment definitions.
diff --git a/sysdeps/m68k/fpu/bits/fenv.h b/sysdeps/m68k/fpu/bits/fenv.h
new file mode 100644
index 0000000..ce071b9
--- /dev/null
+++ b/sysdeps/m68k/fpu/bits/fenv.h
@@ -0,0 +1,78 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions of
+ the appropriate bits in the FPSR Accrued Exception Byte. */
+enum
+ {
+ FE_INEXACT = 1 << 3,
+#define FE_INEXACT FE_INEXACT
+ FE_DIVBYZERO = 1 << 4,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_UNDERFLOW = 1 << 5,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_OVERFLOW = 1 << 6,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_INVALID = 1 << 7
+#define FE_INVALID FE_INVALID
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The m68k FPU supports all of the four defined rounding modes. We use
+ the bit positions in the FPCR Mode Control Byte as the values for the
+ appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDSZERO = 1 << 4,
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_DOWNWARD = 2 << 4,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 3 << 4
+#define FE_UPWARD FE_UPWARD
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+
+/* Type representing floating-point environment. This structure
+ corresponds to the layout of the block written by `fmovem'. */
+typedef struct
+ {
+ fexcept_t control_register;
+ fexcept_t status_register;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc75d9cbc371dbb750d95d78539b5e16539ec472
commit dc75d9cbc371dbb750d95d78539b5e16539ec472
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:31:00 1997 +0000
Alpha specific FP environment definitions.
diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h
new file mode 100644
index 0000000..7cb0e3e
--- /dev/null
+++ b/sysdeps/alpha/fpu/bits/fenv.h
@@ -0,0 +1,104 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FENV_H
+#error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define the bits representing the exception.
+
+ Note that these are the bit positions as defined by the OSF/1
+ ieee_{get,set}_control_word interface and not by the hardware fpcr.
+
+ See the Alpha Architecture Handbook section 4.7.7.3 for details,
+ but in summary, trap shadows mean the hardware register can acquire
+ extra exception bits so for proper IEEE support the tracking has to
+ be done in software -- in this case with kernel support.
+
+ As to why the system call interface isn't in the same format as
+ the hardware register, only those crazy folks at DEC can tell you. */
+
+enum
+ {
+ FE_INEXACT = 1UL << 21,
+#define FE_INEXACT FE_INEXACT
+
+ FE_UNDERFLOW = 1UL << 20,
+#define FE_UNDERFLOW FE_UNDERFLOW
+
+ FE_OVERFLOW = 1UL << 19,
+#define FE_OVERFLOW FE_OVERFLOW
+
+ FE_DIVBYZERO = 1UL << 18,
+#define FE_DIVBYZERO FE_DIVBYZERO
+
+ FE_INVALID = 1UL << 17,
+#define FE_INVALID FE_INVALID
+
+ FE_ALL_EXCEPT =
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+#define FE_ALL_EXCEPT FE_ALL_EXCEPT
+ };
+
+
+/* Alpha chips support all four defined rouding modes.
+
+ Note that code must be compiled to use dynamic rounding (/d) instructions
+ to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc
+ this is -fprm d. The default for both is static rounding to nearest.
+
+ These are shifted down 58 bits from the hardware fpcr because the
+ functions are declared to take integers. */
+
+enum
+ {
+ FE_TOWARDSZERO = 0,
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+
+ FE_DOWNWARD = 1,
+#define FE_DOWNWARD FE_DOWNWARD
+
+ FE_TONEAREST = 2,
+#define FE_TONEAREST FE_TONEAREST
+
+ FE_UPWARD = 3,
+#define FE_UPWARD FE_UPWARD
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned long fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned long fenv_t;
+
+/* If the default argument is used we use this value. Note that due to
+ architecture-specified page mappings, no user-space pointer will ever
+ have its two high bits set. Co-opt one. */
+#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
+#endif
+
+/* The system calls to talk to the kernel's FP code. */
+extern unsigned long __ieee_get_fp_control(void);
+extern void __ieee_set_fp_control(unsigned long);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1632e8a1b3631c40b19f2f868aa244948837be54
commit 1632e8a1b3631c40b19f2f868aa244948837be54
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:30:10 1997 +0000
Vax specific setjmp buffer.
diff --git a/sysdeps/vax/bits/setjmp.h b/sysdeps/vax/bits/setjmp.h
new file mode 100644
index 0000000..7adecd9
--- /dev/null
+++ b/sysdeps/vax/bits/setjmp.h
@@ -0,0 +1,7 @@
+/* Define the machine-dependent type `jmp_buf'. Vax version. */
+
+typedef struct
+ {
+ PTR __fp;
+ PTR __pc;
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d70c1a887b46208bea7e8fee61d367780f04ba3
commit 0d70c1a887b46208bea7e8fee61d367780f04ba3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:29:18 1997 +0000
m68k specific setjmp buffer.
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
new file mode 100644
index 0000000..96240f0
--- /dev/null
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -0,0 +1,19 @@
+/* Define the machine-dependent type `jmp_buf'. m68k version. */
+
+typedef struct
+ {
+ /* There are eight 4-byte data registers, but D0 is not saved. */
+ long int __dregs[7];
+
+ /* There are six 4-byte address registers, plus the FP and SP. */
+ int *__aregs[6];
+ int * __fp;
+ int * __sp;
+
+#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+ /* There are eight floating point registers which
+ are saved in IEEE 96-bit extended format. */
+ char __fpregs[8 * (96 / 8)];
+#endif
+
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b998aac446834adba4c2aedc88fbf3dfe31a9eb
commit 2b998aac446834adba4c2aedc88fbf3dfe31a9eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:29:03 1997 +0000
ARM specific setjmp buffer.
diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h
new file mode 100644
index 0000000..93b0f5f
--- /dev/null
+++ b/sysdeps/arm/bits/setjmp.h
@@ -0,0 +1,10 @@
+/* Define the machine-dependent type `jmp_buf'. ARM version. */
+
+#ifndef _ASM
+/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
+#if __ARM_USES_FP
+typedef int __jmp_buf[22];
+#else
+typedef int __jmp_buf[10];
+#endif
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f83df4446f3400f89bf64808f221487fdeeeee2
commit 1f83df4446f3400f89bf64808f221487fdeeeee2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:28:55 1997 +0000
Alpha specific setjmp buffer.
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
new file mode 100644
index 0000000..6e6f6b4
--- /dev/null
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -0,0 +1,46 @@
+/* Define the machine-dependent type `jmp_buf'. Alpha version.
+Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+typedef struct
+ {
+ /* Integer registers:
+ $0 is the return value;
+ $1-$8, $22-$25, $28 are call-used;
+ $9-$14 we save here;
+ $15 is the FP and we save it here;
+ $16-$21 are input arguments (call-used);
+ $26 is the return PC and we save it here;
+ $27 is the procedure value (i.e., the address of __setjmp);
+ $29 is the global pointer, which the caller will reconstruct
+ from the return address restored in $26;
+ $30 is the stack pointer and we save it here;
+ $31 is always zero. */
+ long int __9, __10, __11, __12, __13, __14;
+ long int *__pc, *__fp, *__sp;
+
+#if 1 /* XXX need predefine for TARGET_FPREGS */
+ /* Floating-point registers:
+ $f0 is the floating return value;
+ $f1, $f10-$f15, $f22-$f30 are call-used;
+ $f2-$f9 we save here;
+ $f16-$21 are input args (call-used);
+ $f31 is always zero. */
+ double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9;
+#endif /* Have FP regs. */
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f7005dfa10456c03d9dbc22daa545b570e0bb82
commit 1f7005dfa10456c03d9dbc22daa545b570e0bb82
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:26:23 1997 +0000
m68k specific endianess specification.
diff --git a/sysdeps/m68k/bits/endian.h b/sysdeps/m68k/bits/endian.h
new file mode 100644
index 0000000..6f98529
--- /dev/null
+++ b/sysdeps/m68k/bits/endian.h
@@ -0,0 +1,3 @@
+/* m68k is big-endian. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1c19e62fbd07890cb68ecf7ffe9c7d0fba5ffc8
commit d1c19e62fbd07890cb68ecf7ffe9c7d0fba5ffc8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:26:04 1997 +0000
ARM specific endianess specification.
diff --git a/sysdeps/arm/bits/endian.h b/sysdeps/arm/bits/endian.h
new file mode 100644
index 0000000..32f8489
--- /dev/null
+++ b/sysdeps/arm/bits/endian.h
@@ -0,0 +1,3 @@
+/* ARM is little-endian. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71810663386125a210ca83b465bad75b982485a9
commit 71810663386125a210ca83b465bad75b982485a9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:25:57 1997 +0000
Alpha specific endianess specification.
diff --git a/sysdeps/alpha/bits/endian.h b/sysdeps/alpha/bits/endian.h
new file mode 100644
index 0000000..e873d21
--- /dev/null
+++ b/sysdeps/alpha/bits/endian.h
@@ -0,0 +1,3 @@
+/* Alpha is little-endian. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c96df8ef30ac69e857503a2c503dfe6fd3de788b
commit c96df8ef30ac69e857503a2c503dfe6fd3de788b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:08:10 1997 +0000
(elf_machine_rela): Check that the symbol was found.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 1523ddb..e50f773 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -227,6 +227,10 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
+ if (sym == NULL)
+ /* This can happen in trace mode if an object could not be
+ found. */
+ break;
if (sym->st_size > refsym->st_size
|| (_dl_verbose && sym->st_size < refsym->st_size))
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6af245e27be691617dfc8d710b264ff20622d008
commit 6af245e27be691617dfc8d710b264ff20622d008
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:07:22 1997 +0000
Endian specification for P40.
diff --git a/sysdeps/mips/p40/bits/endian.h b/sysdeps/mips/p40/bits/endian.h
new file mode 100644
index 0000000..e4b0119
--- /dev/null
+++ b/sysdeps/mips/p40/bits/endian.h
@@ -0,0 +1,4 @@
+/* The MIPS has selectable endianness.
+ The Japanese homebrew P40 architecture uses big-endian mode. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7fecd6222d614ea7087cf2990a84b87f63d2da3d
commit 7fecd6222d614ea7087cf2990a84b87f63d2da3d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:07:17 1997 +0000
Endian specification for MIPSEL.
diff --git a/sysdeps/mips/mipsel/bits/endian.h b/sysdeps/mips/mipsel/bits/endian.h
new file mode 100644
index 0000000..5da5965
--- /dev/null
+++ b/sysdeps/mips/mipsel/bits/endian.h
@@ -0,0 +1,4 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using little-endian mode. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18e5142049b78c5890777b55a57c98daf524c28a
commit 18e5142049b78c5890777b55a57c98daf524c28a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:06:57 1997 +0000
moved to bits/.
diff --git a/sysdeps/mips/mipsel/bytesex.h b/sysdeps/mips/mipsel/bytesex.h
deleted file mode 100644
index 5da5965..0000000
--- a/sysdeps/mips/mipsel/bytesex.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* The MIPS architecture has selectable endianness.
- This file is for a machine using little-endian mode. */
-
-#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/p40/bytesex.h b/sysdeps/mips/p40/bytesex.h
deleted file mode 100644
index e4b0119..0000000
--- a/sysdeps/mips/p40/bytesex.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* The MIPS has selectable endianness.
- The Japanese homebrew P40 architecture uses big-endian mode. */
-
-#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0c2d3b303a138c8df8f5a5a998bbdff6c879ab5
commit d0c2d3b303a138c8df8f5a5a998bbdff6c879ab5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:06:13 1997 +0000
MIPS64 support.
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
new file mode 100644
index 0000000..551daa4
--- /dev/null
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -0,0 +1,85 @@
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <setjmp.h>
+#include <stdlib.h>
+
+#undef __longjmp
+
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+void
+__longjmp (env, val_arg)
+ __jmp_buf env;
+ int val_arg;
+{
+ /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
+ the hack around it); force it to use $a1 for the longjmp value.
+ Without this it saves $a1 in a register which gets clobbered
+ along the way. */
+ register int val asm ("a1");
+
+ /* Pull back the floating point callee-saved registers. */
+ asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
+ asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1]));
+ asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2]));
+ asm volatile ("l.d $f27, %0" : : "m" (env[0].__fpregs[3]));
+ asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4]));
+ asm volatile ("l.d $f29, %0" : : "m" (env[0].__fpregs[5]));
+ asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[6]));
+ asm volatile ("l.d $f31, %0" : : "m" (env[0].__fpregs[7]));
+
+ /* Restore the stack pointer. */
+ asm volatile ("ld $29, %0" : : "m" (env[0].__sp));
+
+ /* Get and reconstruct the floating point csr. */
+ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
+ asm volatile ("ctc1 $2, $31");
+
+ /* Get the FP. */
+ asm volatile ("ld $30, %0" : : "m" (env[0].__fp));
+
+ /* Get the GP. */
+ asm volatile ("ld $gp, %0" : : "m" (env[0].__gp));
+
+ /* Get the callee-saved registers. */
+ asm volatile ("ld $16, %0" : : "m" (env[0].__regs[0]));
+ asm volatile ("ld $17, %0" : : "m" (env[0].__regs[1]));
+ asm volatile ("ld $18, %0" : : "m" (env[0].__regs[2]));
+ asm volatile ("ld $19, %0" : : "m" (env[0].__regs[3]));
+ asm volatile ("ld $20, %0" : : "m" (env[0].__regs[4]));
+ asm volatile ("ld $21, %0" : : "m" (env[0].__regs[5]));
+ asm volatile ("ld $22, %0" : : "m" (env[0].__regs[6]));
+ asm volatile ("ld $23, %0" : : "m" (env[0].__regs[7]));
+
+ /* Get the PC. */
+ asm volatile ("ld $31, %0" : : "m" (env[0].__pc));
+
+ /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
+ if (val == 0)
+ asm volatile ("dli $2, 1");
+ else
+ asm volatile ("move $2, %0" : : "r" (val));
+
+ asm volatile ("j $31");
+
+ abort ();
+}
diff --git a/sysdeps/mips/mips64/add_n.S b/sysdeps/mips/mips64/add_n.S
new file mode 100644
index 0000000..ad93d9d
--- /dev/null
+++ b/sysdeps/mips/mips64/add_n.S
@@ -0,0 +1,129 @@
+/* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
+ * store sum in a third limb vector.
+ *
+ * Copyright (C) 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/*
+ * INPUT PARAMETERS
+ * res_ptr $4
+ * s1_ptr $5
+ * s2_ptr $6
+ * size $7
+ */
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 2
+ .globl __mpn_add_n
+ .ent __mpn_add_n
+__mpn_add_n:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ ld $10,0($5)
+ ld $11,0($6)
+
+ daddiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ dsubu $7,$7,$9
+
+.Loop0: daddiu $9,$9,-1
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,8
+ daddiu $6,$6,8
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ daddiu $4,$4,8
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: daddiu $7,$7,-4
+
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ or $2,$2,$8
+
+ ld $10,16($5)
+ daddu $13,$13,$2
+ ld $11,16($6)
+ sltu $8,$13,$2
+ daddu $13,$12,$13
+ sltu $2,$13,$12
+ sd $13,8($4)
+ or $2,$2,$8
+
+ ld $12,24($5)
+ daddu $11,$11,$2
+ ld $13,24($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,16($4)
+ or $2,$2,$8
+
+ ld $10,32($5)
+ daddu $13,$13,$2
+ ld $11,32($6)
+ sltu $8,$13,$2
+ daddu $13,$12,$13
+ sltu $2,$13,$12
+ sd $13,24($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,32
+ daddiu $6,$6,32
+
+ bne $7,$0,.Loop
+ daddiu $4,$4,32
+
+.Lend: daddu $11,$11,$2
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_add_n
diff --git a/sysdeps/mips/mips64/addmul_1.S b/sysdeps/mips/mips64/addmul_1.S
new file mode 100644
index 0000000..58eff8c
--- /dev/null
+++ b/sysdeps/mips/mips64/addmul_1.S
@@ -0,0 +1,106 @@
+/* MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
+ * add the product to a second limb vector.
+ *
+ * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * s1_ptr $5
+ * size $6
+ * s2_limb $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 4
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1
+__mpn_addmul_1:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $3,$3,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dmultu $8,$7
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_addmul_1
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
new file mode 100644
index 0000000..cd6ec3e
--- /dev/null
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -0,0 +1,36 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (_setjmp)
+#ifdef PIC
+ .cpload t9
+#endif
+ dla t9, C_SYMBOL_NAME (__sigsetjmp)
+ nop
+ jr t9
+ dli a1, 0 /* Pass a second argument of zero. */
diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S
new file mode 100644
index 0000000..b370316
--- /dev/null
+++ b/sysdeps/mips/mips64/bsd-setjmp.S
@@ -0,0 +1,36 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (setjmp)
+#ifdef PIC
+ .cpload t9
+#endif
+ dla t9, C_SYMBOL_NAME (__sigsetjmp)
+ nop
+ jr t9
+ dli a1, 1 /* Pass a second argument of one. */
diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h
index a801b35..38872ec 100644
--- a/sysdeps/mips/mips64/gmp-mparam.h
+++ b/sysdeps/mips/mips64/gmp-mparam.h
@@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define BITS_PER_MP_LIMB 64
#define BYTES_PER_MP_LIMB 8
-#define BITS_PER_LONGINT 32
-#define BITS_PER_INT 32
+#define BITS_PER_LONGINT 64
+#define BITS_PER_INT 64
#define BITS_PER_SHORTINT 16
#define BITS_PER_CHAR 8
diff --git a/sysdeps/mips/mips64/lshift.S b/sysdeps/mips/mips64/lshift.S
new file mode 100644
index 0000000..ef403ec
--- /dev/null
+++ b/sysdeps/mips/mips64/lshift.S
@@ -0,0 +1,104 @@
+/* MIPS3 __mpn_lshift --
+ *
+ * Copyright (C) 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * src_ptr $5
+ * size $6
+ * cnt $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 2
+ .globl __mpn_lshift
+ .ent __mpn_lshift
+__mpn_lshift:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ dsll $2,$6,3
+ daddu $5,$5,$2 # make r5 point at end of src
+ ld $10,-8($5) # load first limb
+ dsubu $13,$0,$7
+ daddu $4,$4,$2 # make r4 point at end of res
+ daddiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ dsrl $2,$10,$13 # compute function result
+
+ dsubu $6,$6,$9
+
+.Loop0: ld $3,-16($5)
+ daddiu $4,$4,-8
+ daddiu $5,$5,-8
+ daddiu $9,$9,-1
+ dsll $11,$10,$7
+ dsrl $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sd $8,0($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: ld $3,-16($5)
+ daddiu $4,$4,-32
+ daddiu $6,$6,-4
+ dsll $11,$10,$7
+ dsrl $12,$3,$13
+
+ ld $10,-24($5)
+ dsll $14,$3,$7
+ or $8,$11,$12
+ sd $8,24($4)
+ dsrl $9,$10,$13
+
+ ld $3,-32($5)
+ dsll $11,$10,$7
+ or $8,$14,$9
+ sd $8,16($4)
+ dsrl $12,$3,$13
+
+ ld $10,-40($5)
+ dsll $14,$3,$7
+ or $8,$11,$12
+ sd $8,8($4)
+ dsrl $9,$10,$13
+
+ daddiu $5,$5,-32
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sd $8,0($4)
+
+.Lend: dsll $8,$10,$7
+ j $31
+ sd $8,-8($4)
+ .end __mpn_lshift
diff --git a/sysdeps/mips/mips64/mul_1.S b/sysdeps/mips/mips64/mul_1.S
new file mode 100644
index 0000000..ef0cf36
--- /dev/null
+++ b/sysdeps/mips/mips64/mul_1.S
@@ -0,0 +1,94 @@
+/* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+ * store the product in a second limb vector.
+ *
+ * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * s1_ptr $5
+ * size $6
+ * s2_limb $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 4
+ .globl __mpn_mul_1
+ .ent __mpn_mul_1
+__mpn_mul_1:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: mflo $10
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $10,$10,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$10,$2 # carry from previous addition -> $2
+ sd $10,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: mflo $10
+ mfhi $9
+ daddu $10,$10,$2
+ sltu $2,$10,$2
+ dmultu $8,$7
+ sd $10,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: mflo $10
+ mfhi $9
+ daddu $10,$10,$2
+ sltu $2,$10,$2
+ sd $10,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_mul_1
diff --git a/sysdeps/mips/mips64/rshift.S b/sysdeps/mips/mips64/rshift.S
new file mode 100644
index 0000000..bc26f3f
--- /dev/null
+++ b/sysdeps/mips/mips64/rshift.S
@@ -0,0 +1,101 @@
+/* MIPS3 __mpn_rshift --
+ *
+ * Copyright (C) 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * src_ptr $5
+ * size $6
+ * cnt $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 2
+ .globl __mpn_rshift
+ .ent __mpn_rshift
+__mpn_rshift:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ ld $10,0($5) # load first limb
+ dsubu $13,$0,$7
+ daddiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ dsll $2,$10,$13 # compute function result
+
+ dsubu $6,$6,$9
+
+.Loop0: ld $3,8($5)
+ daddiu $4,$4,8
+ daddiu $5,$5,8
+ daddiu $9,$9,-1
+ dsrl $11,$10,$7
+ dsll $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sd $8,-8($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: ld $3,8($5)
+ daddiu $4,$4,32
+ daddiu $6,$6,-4
+ dsrl $11,$10,$7
+ dsll $12,$3,$13
+
+ ld $10,16($5)
+ dsrl $14,$3,$7
+ or $8,$11,$12
+ sd $8,-32($4)
+ dsll $9,$10,$13
+
+ ld $3,24($5)
+ dsrl $11,$10,$7
+ or $8,$14,$9
+ sd $8,-24($4)
+ dsll $12,$3,$13
+
+ ld $10,32($5)
+ dsrl $14,$3,$7
+ or $8,$11,$12
+ sd $8,-16($4)
+ dsll $9,$10,$13
+
+ daddiu $5,$5,32
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sd $8,-8($4)
+
+.Lend: dsrl $8,$10,$7
+ j $31
+ sd $8,0($4)
+ .end __mpn_rshift
diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S
new file mode 100644
index 0000000..7421429
--- /dev/null
+++ b/sysdeps/mips/mips64/setjmp.S
@@ -0,0 +1,35 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* The function __sigsetjmp_aux saves all the registers, but it can't
+ reliably access the stack or frame pointers, so we pass them in as
+ extra arguments. */
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__sigsetjmp)
+#ifdef PIC
+ .cpload t9
+#endif
+ move a2, sp
+ move a3, fp
+ dla t9, __sigsetjmp_aux
+ nop
+ jr t9
diff --git a/sysdeps/mips/mips64/setjmp_aux.c b/sysdeps/mips/mips64/setjmp_aux.c
new file mode 100644
index 0000000..19d06e9
--- /dev/null
+++ b/sysdeps/mips/mips64/setjmp_aux.c
@@ -0,0 +1,67 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <setjmp.h>
+
+/* This function is only called via the assembly language routine
+ __sigsetjmp, which arranges to pass in the stack pointer and the frame
+ pointer. We do things this way because it's difficult to reliably
+ access them in C. */
+
+int
+__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
+{
+ /* Store the floating point callee-saved registers... */
+ asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+ asm volatile ("s.d $f25, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
+ asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
+ asm volatile ("s.d $f27, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
+ asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
+ asm volatile ("s.d $f29, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
+ asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[6]));
+ asm volatile ("s.d $f31, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[7]));
+
+ /* .. and the PC; */
+ asm volatile ("sd $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
+
+ /* .. and the stack pointer; */
+ env[0].__jmpbuf[0].__sp = sp;
+
+ /* .. and the FP; it'll be in s8. */
+ env[0].__jmpbuf[0].__fp = fp;
+
+ /* .. and the GP; */
+ asm volatile ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
+
+ /* .. and the callee-saved registers; */
+ asm volatile ("sd $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
+ asm volatile ("sd $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
+ asm volatile ("sd $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
+ asm volatile ("sd $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
+ asm volatile ("sd $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
+ asm volatile ("sd $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
+ asm volatile ("sd $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
+ asm volatile ("sd $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
+
+ /* .. and finally get and reconstruct the floating point csr. */
+ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
+
+ /* Save the signal mask if requested. */
+ return __sigjmp_save (env, savemask);
+}
diff --git a/sysdeps/mips/mips64/sub_n.S b/sysdeps/mips/mips64/sub_n.S
new file mode 100644
index 0000000..bfcba95
--- /dev/null
+++ b/sysdeps/mips/mips64/sub_n.S
@@ -0,0 +1,129 @@
+/* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ * store difference in a third limb vector.
+ *
+ * Copyright (C) 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * s1_ptr $5
+ * s2_ptr $6
+ * size $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 2
+ .globl __mpn_sub_n
+ .ent __mpn_sub_n
+__mpn_sub_n:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ ld $10,0($5)
+ ld $11,0($6)
+
+ daddiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ dsubu $7,$7,$9
+
+.Loop0: daddiu $9,$9,-1
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,8
+ daddiu $6,$6,8
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ daddiu $4,$4,8
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: daddiu $7,$7,-4
+
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ or $2,$2,$8
+
+ ld $10,16($5)
+ daddu $13,$13,$2
+ ld $11,16($6)
+ sltu $8,$13,$2
+ dsubu $13,$12,$13
+ sltu $2,$12,$13
+ sd $13,8($4)
+ or $2,$2,$8
+
+ ld $12,24($5)
+ daddu $11,$11,$2
+ ld $13,24($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,16($4)
+ or $2,$2,$8
+
+ ld $10,32($5)
+ daddu $13,$13,$2
+ ld $11,32($6)
+ sltu $8,$13,$2
+ dsubu $13,$12,$13
+ sltu $2,$12,$13
+ sd $13,24($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,32
+ daddiu $6,$6,32
+
+ bne $7,$0,.Loop
+ daddiu $4,$4,32
+
+.Lend: daddu $11,$11,$2
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_sub_n
diff --git a/sysdeps/mips/mips64/submul_1.S b/sysdeps/mips/mips64/submul_1.S
new file mode 100644
index 0000000..66e634e
--- /dev/null
+++ b/sysdeps/mips/mips64/submul_1.S
@@ -0,0 +1,106 @@
+/* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
+ * subtract the product from a second limb vector.
+ *
+ * Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+ *
+ * This file is part of the GNU MP Library.
+ *
+ * The GNU MP Library is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * The GNU MP Library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ * res_ptr $4
+ * s1_ptr $5
+ * size $6
+ * s2_limb $7
+ */
+
+#ifdef PIC
+ .option pic2
+#endif
+ .text
+ .align 4
+ .globl __mpn_submul_1
+ .ent __mpn_submul_1
+__mpn_submul_1:
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $3,$3,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dmultu $8,$7
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_submul_1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a37465853baac2fffe0f18c384901c478677990
commit 6a37465853baac2fffe0f18c384901c478677990
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:05:01 1997 +0000
MIPS64 specific setjmp buffer
diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h
new file mode 100644
index 0000000..b108540
--- /dev/null
+++ b/sysdeps/mips/mips64/bits/setjmp.h
@@ -0,0 +1,54 @@
+/* Define the machine-dependent type `jmp_buf'. MIPS version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+typedef struct
+ {
+ /* Program counter. */
+ __ptr_t __pc;
+
+ /* Stack pointer. */
+ __ptr_t __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ int __regs[8];
+
+ /* The frame pointer. */
+ __ptr_t __fp;
+
+ /* The global pointer. */
+ __ptr_t __gp;
+
+ /* Floating point status register. */
+ int __fpc_csr;
+
+ /* Callee-saved floating point registers. */
+ double __fpregs[8];
+ } __jmp_buf[1];
+
+#ifdef __USE_MISC
+/* Offset to the program counter in `jmp_buf'. */
+# define JB_PC 0
+#endif
+
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((__ptr_t) (address) < (jmpbuf)[0].__sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8eeac3b7138aa534accb2cb255cc9ec06dfb72a
commit c8eeac3b7138aa534accb2cb255cc9ec06dfb72a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:03:54 1997 +0000
Say it's a 6t4 bit machine.
diff --git a/sysdeps/mips/mips64/Implies b/sysdeps/mips/mips64/Implies
new file mode 100644
index 0000000..a8cae95
--- /dev/null
+++ b/sysdeps/mips/mips64/Implies
@@ -0,0 +1 @@
+wordsize-64
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e9524434b38bc60b7c37f6046c0cb9ca410e430
commit 6e9524434b38bc60b7c37f6046c0cb9ca410e430
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:02:58 1997 +0000
MISP/DEC byte order definition.
diff --git a/sysdeps/mips/dec/bytesex.h b/sysdeps/mips/dec/bits/endian.h
similarity index 100%
rename from sysdeps/mips/dec/bytesex.h
rename to sysdeps/mips/dec/bits/endian.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f389d4c51e8eccfaecb8d019e1d881da141625f
commit 4f389d4c51e8eccfaecb8d019e1d881da141625f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:02:43 1997 +0000
MIPS specific setjmp buffer.
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
new file mode 100644
index 0000000..7e570c6
--- /dev/null
+++ b/sysdeps/mips/bits/setjmp.h
@@ -0,0 +1,53 @@
+/* Define the machine-dependent type `jmp_buf'. MIPS version.
+ Copyright (C) 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+typedef struct
+ {
+ /* Program counter. */
+ __ptr_t __pc;
+
+ /* Stack pointer. */
+ __ptr_t __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ int __regs[8];
+
+ /* The frame pointer. */
+ __ptr_t __fp;
+
+ /* The global pointer. */
+ __ptr_t __gp;
+
+ /* Floating point status register. */
+ int __fpc_csr;
+
+ /* Callee-saved floating point registers. */
+ double __fpregs[6];
+ } __jmp_buf[1];
+
+#ifdef __USE_MISC
+/* Offset to the program counter in `jmp_buf'. */
+# define JB_PC 0
+#endif
+
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((__ptr_t) (address) < (jmpbuf)[0].__sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08fe606443f6ae41f3c42ad87a2a31ae6953d101
commit 08fe606443f6ae41f3c42ad87a2a31ae6953d101
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:02:34 1997 +0000
MIPS specific byte order definition.
diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h
new file mode 100644
index 0000000..ba555cd
--- /dev/null
+++ b/sysdeps/mips/bits/endian.h
@@ -0,0 +1,4 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using big-endian mode. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=781b52c526d66f92f98e5fcc2c8b7f201f1bba8b
commit 781b52c526d66f92f98e5fcc2c8b7f201f1bba8b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:02:21 1997 +0000
MIPS support.
diff --git a/sysdeps/mips/fpu_control.h b/sysdeps/mips/fpu_control.h
new file mode 100644
index 0000000..36e05a4
--- /dev/null
+++ b/sysdeps/mips/fpu_control.h
@@ -0,0 +1,96 @@
+/* FPU control word bits. Mips version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Olaf Flebbe.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/* FP control/status register bit assignments.
+ *
+ * 31-25 24 23 22-18 17-12 11-7 6-2 1-0
+ * (cause) (enables) (flags)
+ * | reserved | FS | C | reserved | E V Z O U I | V Z O U I | V Z O U I | RM
+ *
+ * FS: When set, denormalized results are flushed to zero instead of
+ * causing an unimplemented operation exception.
+ * C: Condition bit.
+ * E: Unimplemented Operation.
+ * V: Invalid Operation.
+ * Z: Division by zero.
+ * O: Overflow.
+ * U: Underflow.
+ * I: Inexact Operation
+ * RM: Rounding mode bits
+ * 00 (RN) - rounding to nearest
+ * 01 (RZ) - rounding toward zero
+ * 10 (RP) - rounding down (toward - infinity)
+ * 11 (RM) - rounding up (toward + infinity)
+ *
+ */
+
+#include <features.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_IM (1 << 11)
+#define _FPU_MASK_DM (1 << 24) /* XXX */
+#define _FPU_MASK_ZM (1 << 10)
+#define _FPU_MASK_OM (1 << 9)
+#define _FPU_MASK_UM (1 << 8)
+#define _FPU_MASK_PM (1 << 7)
+
+/* precision control */
+#define _FPU_EXTENDED 0
+#define _FPU_DOUBLE 0
+#define _FPU_SINGLE 0
+
+/* rounding control */
+#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
+#define _FPU_RC_DOWN 0x2
+#define _FPU_RC_UP 0x3
+#define _FPU_RC_ZERO 0x1
+
+#define _FPU_RESERVED 0xfe7c0000 /* Reserved bits */
+
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+ and no interrupts for exceptions, rounding to nearest. */
+
+#define _FPU_DEFAULT 0x0
+
+/* IEEE: same as above, but exceptions */
+#define _FPU_IEEE (0x1f << 7)
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) __asm__ ("cfc1 %0, $31; nop; nop" : "=r" (cw))
+#define _FPU_SETCW(cw) __asm__ ("ctc1 %0, $31; nop; nop" : : "r" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+__BEGIN_DECLS
+
+/* Called at startup. It can be used to manipulate fpu control register. */
+extern void __setfpucw __P ((fpu_control_t));
+
+__END_DECLS
+
+#endif /* fpu_control.h */
diff --git a/sysdeps/mips/init-first.c b/sysdeps/mips/init-first.c
new file mode 100644
index 0000000..3fc4b7b
--- /dev/null
+++ b/sysdeps/mips/init-first.c
@@ -0,0 +1,64 @@
+/* Initialization code run first thing by the ELF startup code. For mips/Unix.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <unistd.h>
+
+extern void __libc_init (int, char **, char **);
+extern void __libc_global_ctors (void);
+
+
+static void
+init (int *data)
+{
+ int argc = *data;
+ char **argv = (void *) (data + 1);
+ char **envp = &argv[argc + 1];
+
+ __environ = envp;
+ __libc_init (argc, argv, envp);
+}
+
+#ifdef PIC
+/* This function is called to initialize the shared C library.
+ It is called just before the user _start code from mips/elf/start.S,
+ with the stack set up as that code gets it. */
+
+/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
+ pointer in the dynamic section based solely on that. It is convention
+ for this function to be in the `.init' section, but the symbol name is
+ the only thing that really matters!! */
+/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
+
+void
+_init (int argc, ...)
+{
+ init (&argc);
+
+ __libc_global_ctors ();
+}
+#endif
+
+
+void
+__libc_init_first (int argc __attribute__ ((unused)), ...)
+{
+#ifndef PIC
+ init (&argc);
+#endif
+}
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
new file mode 100644
index 0000000..a01b174
--- /dev/null
+++ b/sysdeps/mips/machine-gmon.h
@@ -0,0 +1,57 @@
+/* Machine-specific calling sequence for `mcount' profiling function. MIPS
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define _MCOUNT_DECL static void __mcount
+
+/* Call __mcount with our the return PC for our caller,
+ and the return PC our caller will return to. */
+#ifdef PIC
+#define CPLOAD ".cpload $25;"
+#else
+#define CPLOAD
+#endif
+
+#define MCOUNT asm(\
+ ".globl _mcount;" \
+ ".align 2;" \
+ ".type _mcount,@function;" \
+ "_mcount:;" \
+ ".set noreorder;" \
+ ".set noat;" \
+ CPLOAD \
+ "sw $4,8($29);" \
+ "sw $5,12($29);" \
+ "sw $6,16($29);" \
+ "sw $7,20($29);" \
+ "sw $1,0($29);" \
+ "sw $31,4($29);" \
+ "move $5,$31;" \
+ "jal __mcount;" \
+ "move $4,$1;" \
+ "lw $4,8($29);" \
+ "lw $5,12($29);" \
+ "lw $6,16($29);" \
+ "lw $7,20($29);" \
+ "lw $31,4($29);" \
+ "lw $1,0($29);" \
+ "addu $29,$29,8;" \
+ "j $31;" \
+ "move $31,$1;" \
+ ".set reorder;" \
+ ".set at");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd139897314af873b1ae1fdccd7564f8b220273b
commit dd139897314af873b1ae1fdccd7564f8b220273b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:01:37 1997 +0000
MIPS specific ELF startup code
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
new file mode 100644
index 0000000..0db3a04
--- /dev/null
+++ b/sysdeps/mips/elf/start.S
@@ -0,0 +1,181 @@
+/* Startup code compliant to the ELF Mips ABI.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment. The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
+ point runs, most registers' values are unspecified, except for:
+
+ v1 ($2) Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ sp ($29) The stack contains the arguments and environment:
+ 0(%esp) argc
+ 4(%esp) argv[0]
+ ...
+ (4*argc)(%esp) NULL
+ (4*(argc+1))(%esp) envp[0]
+ ...
+ NULL
+ ra ($31) The return address register is set to zero so that programs
+ that search backword through stack frames recognize the last
+ stack frame.
+*/
+
+#ifdef PIC
+/* A macro to (re)initialize gp. We can get the run time address of 0f in
+ ra ($31) by blezal instruction. In this early phase, we can't save gp
+ in stack and .cprestore doesn't work properly. So we set gp by using
+ this macro. */
+#define SET_GP \
+ .set noreorder; \
+ bltzal $0,0f; \
+ nop; \
+0: .cpload $31; \
+ .set reorder;
+#endif
+
+ .text
+ .globl _start
+_start:
+#ifdef PIC
+ SET_GP
+#endif
+ move $31, $0
+
+ /* $2 contains the address of the shared library termination
+ function, which we will register with `atexit' to be called by
+ `exit'. I suspect that on some systems, and when statically
+ linked, this will not be set by anything to any function
+ pointer; hopefully it will be zero so we don't try to call
+ random pointers. */
+ beq $2, $0, nofini
+ move $4, $2
+ jal atexit
+#ifdef PIC
+ SET_GP
+#endif
+nofini:
+
+ /* Do essential libc initialization. In statically linked
+ programs under the GNU Hurd, this is what sets up the
+ arguments on the stack for the code below. Since the argument
+ registers (a0 - a3) saved to the first 4 stack entries by
+ the prologue of __libc_init_first, we preload them to
+ prevent clobbering the stack tops. In Hurd case, stack pointer
+ ($29) may be VM_MAX_ADDRESS here. If so, we must modify it. */
+#if (__mips64)
+ dli $4, 0x10000000000
+ bne $29, $4, 1f
+ dsubu $29, 32
+ sd $0, 0($29)
+ sd $0, 8($29)
+ sd $0, 16($29)
+ sd $0, 24($29)
+1:
+ ld $4, 0($29)
+ ld $5, 8($29)
+ ld $6, 16($29)
+ ld $7, 24($29)
+#else /* __mips64 */
+ li $4, 0x80000000
+ bne $29, $4, 1f
+ subu $29, 16
+ sw $0, 0($29)
+ sw $0, 4($29)
+ sw $0, 8($29)
+ sw $0, 12($29)
+1:
+ lw $4, 0($29)
+ lw $5, 4($29)
+ lw $6, 8($29)
+ lw $7, 12($29)
+#endif /* __mips64 */
+
+ jal __libc_init_first
+#ifdef PIC
+ SET_GP
+#endif
+#if (__mips64)
+ ld $4, 0($29)
+ ld $5, 8($29)
+ ld $6, 16($29)
+ ld $7, 24($29)
+#else /* __mips64 */
+ lw $4, 0($29)
+ lw $5, 4($29)
+ lw $6, 8($29)
+ lw $7, 12($29)
+#endif /* __mips64 */
+
+ /* Call `_init', which is the entry point to our own `.init'
+ section; and register with `atexit' to have `exit' call
+ `_fini', which is the entry point to our own `.fini' section. */
+ jal _init
+#ifdef PIC
+ SET_GP
+#endif
+#if (__mips64)
+ dla $4, _fini
+#else /* __mips64 */
+ la $4, _fini
+#endif /* __mips64 */
+
+ jal atexit
+#ifdef PIC
+ SET_GP
+#endif
+
+ /* Extract the arguments and environment as encoded on the stack
+ and set up the arguments for `main': argc, argv, envp. */
+#if (__mips64)
+ ld $4, 0($29) /* argc */
+ daddu $5, $29, 8 /* argv */
+ dsll $6, $4, 3
+ daddu $6, $6, 8
+ daddu $6, $5, $6 /* envp = &argv[argc + 1] */
+#else /* __mips64 */
+ lw $4, 0($29) /* argc */
+ addu $5, $29, 4 /* argv */
+ sll $6, $4, 2
+ addu $6, $6, 4
+ addu $6, $5, $6 /* envp = &argv[argc + 1] */
+#endif /* __mips64 */
+
+ /* Call the user's main function, and exit with its value. */
+ jal main
+#ifdef PIC
+ SET_GP
+#endif
+ move $4, $2
+ jal exit /* This should never return. */
+hlt: b hlt /* Crash if somehow it does return. */
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+#if (__mips64)
+ .dword 0
+#else /* __mips64 */
+ .word 0
+#endif /* __mips64 */
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0134d025bc4eb9daa8ec84efc10281405b8f6047
commit 0134d025bc4eb9daa8ec84efc10281405b8f6047
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 02:00:23 1997 +0000
MIPS changes.
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 78776cd..f519f19 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -1,21 +1,21 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
@@ -23,7 +23,14 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY (setjmp)
- j C_SYMBOL_NAME (__sigsetjmp)
- li a1, $0 /* Pass a second argument of zero. */
- .end setjmp
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (_setjmp)
+#ifdef PIC
+ .cpload t9
+#endif
+ la t9, C_SYMBOL_NAME (__sigsetjmp)
+ nop
+ jr t9
+ li a1, 0 /* Pass a second argument of zero. */
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 4742462..9a22700 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -1,21 +1,21 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
@@ -23,7 +23,14 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#ifdef PIC
+ .option pic2
+#endif
ENTRY (setjmp)
- j C_SYMBOL_NAME (__sigsetjmp)
+#ifdef PIC
+ .cpload t9
+#endif
+ la t9, C_SYMBOL_NAME (__sigsetjmp)
+ nop
+ jr t9
li a1, 1 /* Pass a second argument of one. */
- .end setjmp
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 422179c..ff7d371 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -18,30 +18,25 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef dl_machine_h
+#define dl_machine_h
+
#define ELF_MACHINE_NAME "MIPS"
#include <assert.h>
-#include <string.h>
-#include <link.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
/* Translate a processor specific dynamic tag to the index
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
-#if 1
-/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignment. */
-#ifndef MAP_ALIGN
-#define MAP_ALIGN 0x1000
-#endif
-#define ELF_MACHINE_ALIGN_MASK(flags) ((flags & MAP_ALIGN) ? 0xffff : 0)
+#if 0
+/* We may need 64k alignment. */
+#define ELF_MACHINE_ALIGN_MASK 0xffff
#endif
/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
with the run-time address of the r_debug structure */
-#define ELF_MACHINE_SET_DEBUG(l,r) \
+#define ELF_MACHINE_DEBUG_SETUP(l,r) \
do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
*(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
(ElfW(Addr)) (r); \
@@ -67,14 +62,16 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* FIXME: the offset of gp from GOT may be system-dependent. */
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
-static inline ElfW(Addr)
-elf_machine_dynamic (void)
+
+/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
+ Must be inlined in a function which uses global data. */
+static inline ElfW(Addr) *
+elf_machine_got (void)
{
- register ElfW(Addr) gp asm ("$28");
- return * (ElfW(Addr) *) (gp - 0x7ff0);
+ ElfW(Addr) gp;
+
+ __asm__ __volatile__("move %0, $28\n\t" : "=r" (gp));
+ return elf_mips_got_from_gpreg (gp);
}
@@ -83,6 +80,15 @@ static inline ElfW(Addr)
elf_machine_load_address (void)
{
ElfW(Addr) addr;
+#ifdef __mips64
+ asm (" .set noreorder\n"
+ " dla %0, here\n"
+ " bltzal $0, here\n"
+ " nop\n"
+ "here: dsubu %0, $31, %0\n"
+ " .set reorder\n"
+ : "=r" (addr));
+#else
asm (" .set noreorder\n"
" la %0, here\n"
" bltzal $0, here\n"
@@ -90,6 +96,7 @@ elf_machine_load_address (void)
"here: subu %0, $31, %0\n"
" .set reorder\n"
: "=r" (addr));
+#endif
return addr;
}
@@ -97,7 +104,7 @@ elf_machine_load_address (void)
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
/* Relocate GOT. */
-static void
+static inline void
elf_machine_got_rel (struct link_map *map)
{
ElfW(Addr) *got;
@@ -107,14 +114,14 @@ elf_machine_got_rel (struct link_map *map)
const char *strtab
= ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
- ElfW(Addr) resolve (const ElfW(Sym) *sym)
- {
- const ElfW(Sym) *ref = sym;
- ElfW(Addr) sym_loadaddr;
- sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope,
- map->l_name, 0, 1);
- return (ref)? sym_loadaddr + ref->st_value: 0;
- }
+#define RESOLVE_GOTSYM(sym) \
+ ({ \
+ const ElfW(Sym) *ref = sym; \
+ ElfW(Addr) sym_loadaddr; \
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope, \
+ map->l_name, DL_LOOKUP_NOPLT); \
+ (ref)? sym_loadaddr + ref->st_value: 0; \
+ })
got = (ElfW(Addr) *) ((void *) map->l_addr
+ map->l_info[DT_PLTGOT]->d_un.d_ptr);
@@ -147,39 +154,35 @@ elf_machine_got_rel (struct link_map *map)
if (sym->st_value /* && maybe_stub (sym->st_value) */)
*got = sym->st_value + map->l_addr;
else
- *got = resolve (sym);
+ *got = RESOLVE_GOTSYM (sym);
}
else /* if (*got == 0 || *got == QS) */
- *got = resolve (sym);
+ *got = RESOLVE_GOTSYM (sym);
}
else if (sym->st_shndx == SHN_COMMON)
- *got = resolve (sym);
+ *got = RESOLVE_GOTSYM (sym);
else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
&& *got != sym->st_value
/* && maybe_stub (*got) */)
*got += map->l_addr;
- else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
- && ELFW(ST_BIND) (sym->st_info) == STB_GLOBAL)
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION)
{
- if (sym->st_other == 0 && sym->st_shndx == SHN_ABS)
- *got = sym->st_value + map->l_addr; /* only for _gp_disp */
- /* else SGI stuff ignored */
+ if (sym->st_other == 0)
+ *got += map->l_addr;
}
else
- *got = resolve (sym);
+ *got = RESOLVE_GOTSYM (sym);
got++;
sym++;
}
+#undef RESOLVE_GOTSYM
*_dl_global_scope_end = NULL;
return;
}
-/* The MIPS never uses Elfxx_Rela relocations. */
-#define ELF_MACHINE_NO_RELA 1
-
/* Set up the loaded object described by L so its stub function
will jump to the on-demand fixup code in dl-runtime.c. */
@@ -188,6 +191,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
{
ElfW(Addr) *got;
extern void _dl_runtime_resolve (ElfW(Word));
+ extern int _dl_mips_gnu_objects;
if (lazy)
{
@@ -208,7 +212,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
else
- ; /* Do nothing. */
+ _dl_mips_gnu_objects = 0;
}
/* Relocate global offset table. */
@@ -219,29 +223,64 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
/* Get link_map for this object. */
static inline struct link_map *
-elf_machine_runtime_link_map (ElfW(Addr) gpreg)
+elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
{
- ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
- ElfW(Word) g1;
-
- g1 = ((ElfW(Word) *) got)[1];
+ extern int _dl_mips_gnu_objects;
/* got[1] is reserved to keep its link map address for the shared
- object generated by gnu linker. If not so, we must search GOT
- in object list slowly. XXX */
- if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
- return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
- else
+ object generated by gnu linker. If all are such object, we can
+ find link map from current GPREG simply. If not so, get link map
+ for callers object containing STUB_PC. */
+
+ if (_dl_mips_gnu_objects)
+ {
+ ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
+ ElfW(Word) g1;
+
+ g1 = ((ElfW(Word) *) got)[1];
+
+ if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ }
+
{
struct link_map *l = _dl_loaded;
+ struct link_map *ret = 0;
+ ElfW(Addr) candidate = 0;
+
while (l)
{
- if (got == (ElfW(Addr) *) ((void *) l->l_addr
- + l->l_info[DT_PLTGOT]->d_un.d_ptr))
- return l;
+ ElfW(Addr) base = 0;
+ const ElfW(Phdr) *p = l->l_phdr;
+ ElfW(Half) this, nent = l->l_phnum;
+
+ /* Get the base. */
+ for (this = 0; this < nent; this++)
+ if (p[this].p_type == PT_LOAD)
+ {
+ base = p[this].p_vaddr + l->l_addr;
+ break;
+ }
+ if (! base)
+ {
+ l = l->l_next;
+ continue;
+ }
+
+ /* Find closest link base addr. */
+ if ((base < stub_pc) && (candidate < base))
+ {
+ candidate = base;
+ ret = l;
+ }
l = l->l_next;
}
+ if (candidate && ret && (candidate < stub_pc))
+ return ret;
+ else if (!candidate)
+ return _dl_loaded;
}
+
_dl_signal_error (0, NULL, "cannot find runtime link map");
}
@@ -255,17 +294,117 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg)
t8 index for this function symbol in .dynsym
to usual c arguments. */
+#ifdef __mips64
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
+ generated by the gnu linker. */\
+int _dl_mips_gnu_objects = 1;\
+\
+/* This is called from assembly stubs below which the compiler can't see. */ \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
+ __attribute__ ((unused)); \
+\
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word) sym_index,\
+ ElfW(Word) return_address,\
+ ElfW(Addr) old_gpreg,\
+ ElfW(Addr) stub_pc)\
+{\
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\
+ const ElfW(Sym) *const symtab\
+ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\
+ const char *strtab\
+ = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\
+ const ElfW(Addr) *got\
+ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\
+ const ElfW(Word) local_gotno\
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\
+ const ElfW(Word) gotsym\
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\
+ const ElfW(Sym) *definer;\
+ ElfW(Addr) loadbase;\
+ ElfW(Addr) funcaddr;\
+ struct link_map **scope;\
+\
+ /* Look up the symbol's run-time value. */\
+ scope = _dl_object_relocation_scope (l);\
+ definer = &symtab[sym_index];\
+\
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\
+ scope, l->l_name, DL_LOOKUP_NOPLT);\
+\
+ *_dl_global_scope_end = NULL;\
+\
+ /* Apply the relocation with that value. */\
+ funcaddr = loadbase + definer->st_value;\
+ *(got + local_gotno + sym_index - gotsym) = funcaddr;\
+\
+ return funcaddr;\
+}\
+\
+asm ("\n\
+ .text\n\
+ .align 3\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve,@function\n\
+ .ent _dl_runtime_resolve\n\
+_dl_runtime_resolve:\n\
+ .set noreorder\n\
+ # Save old GP to $3.\n\
+ move $3,$28\n\
+ # Modify t9 ($25) so as to point .cpload instruction.\n\
+ daddu $25,2*8\n\
+ # Compute GP.\n\
+ .cpload $25\n\
+ .set reorder\n\
+ # Save slot call pc.\n\
+ move $2, $31\n\
+ # Save arguments and sp value in stack.\n\
+ dsubu $29, 10*8\n\
+ .cprestore 8*8\n\
+ sd $15, 9*8($29)\n\
+ sd $4, 3*8($29)\n\
+ sd $5, 4*8($29)\n\
+ sd $6, 5*8($29)\n\
+ sd $7, 6*8($29)\n\
+ sd $16, 7*8($29)\n\
+ move $16, $29\n\
+ move $4, $24\n\
+ move $5, $15\n\
+ move $6, $3\n\
+ move $7, $2\n\
+ jal __dl_runtime_resolve\n\
+ move $29, $16\n\
+ ld $31, 9*8($29)\n\
+ ld $4, 3*8($29)\n\
+ ld $5, 4*8($29)\n\
+ ld $6, 5*8($29)\n\
+ ld $7, 6*8($29)\n\
+ ld $16, 7*8($29)\n\
+ daddu $29, 10*8\n\
+ move $25, $2\n\
+ jr $25\n\
+ .end _dl_runtime_resolve\n\
+");
+#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \
+ generated by the gnu linker. */\
+int _dl_mips_gnu_objects = 1;\
+\
/* This is called from assembly stubs below which the compiler can't see. */ \
-static ElfW(Addr) __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr)) \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
__attribute__ ((unused)); \
\
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word) sym_index,\
ElfW(Word) return_address,\
- ElfW(Addr) old_gpreg)\
+ ElfW(Addr) old_gpreg,\
+ ElfW(Addr) stub_pc)\
{\
- struct link_map *l = elf_machine_runtime_link_map (old_gpreg);\
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc);\
const ElfW(Sym) *const symtab\
= (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\
const char *strtab\
@@ -286,7 +425,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index,\
definer = &symtab[sym_index];\
\
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\
- scope, l->l_name, 0, 1);\
+ scope, l->l_name, DL_LOOKUP_NOPLT);\
\
*_dl_global_scope_end = NULL;\
\
@@ -312,6 +451,8 @@ _dl_runtime_resolve:\n\
# Compute GP.\n\
.cpload $25\n\
.set reorder\n\
+ # Save slot call pc.\n\
+ move $2, $31\n\
# Save arguments and sp value in stack.\n\
subu $29, 40\n\
.cprestore 32\n\
@@ -325,6 +466,7 @@ _dl_runtime_resolve:\n\
move $4, $24\n\
move $5, $15\n\
move $6, $3\n\
+ move $7, $2\n\
jal __dl_runtime_resolve\n\
move $29, $16\n\
lw $31, 36($29)\n\
@@ -338,15 +480,91 @@ _dl_runtime_resolve:\n\
jr $25\n\
.end _dl_runtime_resolve\n\
");
+#endif
/* Mask identifying addresses reserved for the user program,
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL
+
+
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
+#ifdef __mips64
+#define RTLD_START asm ("\
+ .text\n\
+ .align 3\n\
+ .globl _start\n\
+ .globl _dl_start_user\n\
+ .ent _start\n\
+_start:\n\
+ .set noreorder\n\
+ bltzal $0, 0f\n\
+ nop\n\
+0: .cpload $31\n\
+ .set reorder\n\
+ # i386 ABI book says that the first entry of GOT holds\n\
+ # the address of the dynamic structure. Though MIPS ABI\n\
+ # doesn't say nothing about this, I emulate this here.\n\
+ dla $4, _DYNAMIC\n\
+ sd $4, -0x7ff0($28)\n\
+ move $4, $29\n\
+ jal _dl_start\n\
+ # Get the value of label '_dl_start_user' in t9 ($25).\n\
+ dla $25, _dl_start_user\n\
+_dl_start_user:\n\
+ .set noreorder\n\
+ .cpload $25\n\
+ .set reorder\n\
+ move $16, $28\n\
+ # Save the user entry point address in saved register.\n\
+ move $17, $2\n\
+ # See if we were run as a command with the executable file\n\
+ # name as an extra leading argument.\n\
+ ld $2, _dl_skip_args\n\
+ beq $2, $0, 1f\n\
+ # Load the original argument count.\n\
+ ld $4, 0($29)\n\
+ # Subtract _dl_skip_args from it.\n\
+ dsubu $4, $2\n\
+ # Adjust the stack pointer to skip _dl_skip_args words.\n\
+ dsll $2,2\n\
+ daddu $29, $2\n\
+ # Save back the modified argument count.\n\
+ sd $4, 0($29)\n\
+ # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
+1: dla $2, _dl_default_scope\n\
+ ld $4, 2*8($2)\n\
+ # Call _dl_init_next to return the address of an initializer\n\
+ # function to run.\n\
+ jal _dl_init_next\n\
+ move $28, $16\n\
+ # Check for zero return, when out of initializers.\n\
+ beq $2, $0, 2f\n\
+ # Call the shared object initializer function.\n\
+ move $25, $2\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8($29)\n\
+ ld $7, 3*8($29)\n\
+ jalr $25\n\
+ move $28, $16\n\
+ # Loop to call _dl_init_next for the next initializer.\n\
+ b 1b\n\
+ # Pass our finalizer function to the user in ra.\n\
+2: dla $31, _dl_fini\n\
+ # Jump to the user entry point.\n\
+ move $25, $17\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8$29)\n\
+ ld $7, 3*8($29)\n\
+ jr $25\n\
+ .end _start\n\
+");
+#else
#define RTLD_START asm ("\
.text\n\
.globl _start\n\
@@ -417,6 +635,12 @@ _dl_start_user:\n\
jr $25\n\
.end _start\n\
");
+#endif
+
+/* The MIPS never uses Elfxx_Rela relocations. */
+#define ELF_MACHINE_NO_RELA 1
+
+#endif /* !dl_machine_h */
#ifdef RESOLVE
@@ -428,34 +652,37 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
const ElfW(Sym) *sym, const struct r_found_version *version)
{
ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- ElfW(Addr) loadbase, undo;
+ ElfW(Addr) loadbase;
+ ElfW(Addr) undo __attribute__ ((unused));
switch (ELFW(R_TYPE) (reloc->r_info))
{
case R_MIPS_REL32:
- if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
- && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
- || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
- *reloc_addr += map->l_addr;
- else
- {
+ {
+ ElfW(Addr) undo = 0;
+
+ if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
+ && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
+ || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
+ {
+ *reloc_addr += map->l_addr;
+ break;
+ }
#ifndef RTLD_BOOTSTRAP
- /* This is defined in rtld.c, but nowhere in the static libc.a;
- make the reference weak so static programs can still link. This
- declaration cannot be done when compiling rtld.c (i.e. #ifdef
- RTLD_BOOTSTRAP) because rtld.c contains the common defn for
- _dl_rtld_map, which is incompatible with a weak decl in the same
- file. */
- weak_extern (_dl_rtld_map);
- if (map == &_dl_rtld_map)
- /* Undo the relocation done here during bootstrapping. Now we will
- relocate it anew, possibly using a binding found in the user
- program or a loaded library rather than the dynamic linker's
- built-in definitions used while loading those libraries. */
- undo = map->l_addr + sym->st_value;
- else
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link. This
+ declaration cannot be done when compiling rtld.c (i.e. #ifdef
+ RTLD_BOOTSTRAP) because rtld.c contains the common defn for
+ _dl_rtld_map, which is incompatible with a weak decl in the same
+ file. */
+ weak_extern (_dl_rtld_map);
+ if (map == &_dl_rtld_map)
+ /* Undo the relocation done here during bootstrapping. Now we will
+ relocate it anew, possibly using a binding found in the user
+ program or a loaded library rather than the dynamic linker's
+ built-in definitions used while loading those libraries. */
+ undo = map->l_addr + sym->st_value;
#endif
- undo = 0;
loadbase = RESOLVE (&sym, version, 0);
*reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
}
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 0f5dba3..bc42dcb 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -1,32 +1,35 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
+#ifdef PIC
+ .option pic2
+#endif
ENTRY (__sigsetjmp)
+#ifdef PIC
+ .cpload t9
+#endif
move a2, sp
-#ifdef __sgi__
move a3, fp
-#else
- move a3, $fp
-#endif
- j __sigsetjmp_aux
- .end __sigsetjmp
+ la t9, __sigsetjmp_aux
+ nop
+ jr t9
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index d478e3f..d06732e 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <setjmp.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bcb5cee069ee03215ab038f6755948b01af98f9e
commit bcb5cee069ee03215ab038f6755948b01af98f9e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:59:39 1997 +0000
MIPS assembler version of GMP function.
diff --git a/sysdeps/mips/add_n.S b/sysdeps/mips/add_n.S
new file mode 100644
index 0000000..df32eec
--- /dev/null
+++ b/sysdeps/mips/add_n.S
@@ -0,0 +1,121 @@
+/* MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
+store sum in a third limb vector.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ s1_ptr $5
+ s2_ptr $6
+ size $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_add_n)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ lw $10,0($5)
+ lw $11,0($6)
+
+ addiu $7,$7,-1
+ and $9,$7,4-1 /* number of limbs in first loop */
+ beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
+ move $2,$0
+
+ subu $7,$7,$9
+
+.Loop0: addiu $9,$9,-1
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ or $2,$2,$8
+
+ addiu $5,$5,4
+ addiu $6,$6,4
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ addiu $4,$4,4
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: addiu $7,$7,-4
+
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ or $2,$2,$8
+
+ lw $10,8($5)
+ addu $13,$13,$2
+ lw $11,8($6)
+ sltu $8,$13,$2
+ addu $13,$12,$13
+ sltu $2,$13,$12
+ sw $13,4($4)
+ or $2,$2,$8
+
+ lw $12,12($5)
+ addu $11,$11,$2
+ lw $13,12($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,8($4)
+ or $2,$2,$8
+
+ lw $10,16($5)
+ addu $13,$13,$2
+ lw $11,16($6)
+ sltu $8,$13,$2
+ addu $13,$12,$13
+ sltu $2,$13,$12
+ sw $13,12($4)
+ or $2,$2,$8
+
+ addiu $5,$5,16
+ addiu $6,$6,16
+
+ bne $7,$0,.Loop
+ addiu $4,$4,16
+
+.Lend: addu $11,$11,$2
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ j $31
+ or $2,$2,$8
diff --git a/sysdeps/mips/addmul_1.S b/sysdeps/mips/addmul_1.S
new file mode 100644
index 0000000..dc1dc1b
--- /dev/null
+++ b/sysdeps/mips/addmul_1.S
@@ -0,0 +1,98 @@
+/* MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
+add the product to a second limb vector.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ s1_ptr $5
+ size $6
+ s2_limb $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_addmul_1)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ /* warm up phase 0 */
+ lw $8,0($5)
+
+ /* warm up phase 1 */
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 /* zero cy2 */
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) /* load new s1 limb as early as possible */
+
+Loop: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addiu $5,$5,4
+ addu $3,$3,$2 /* add old carry limb to low product limb */
+ multu $8,$7
+ lw $8,0($5) /* load new s1 limb as early as possible */
+ addiu $6,$6,-1 /* decrement loop counter */
+ sltu $2,$3,$2 /* carry from previous addition -> $2 */
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop /* should be "bnel" */
+ addu $2,$9,$2 /* add high product limb and carry from addition */
+
+ /* cool down phase 1 */
+$LC1: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ multu $8,$7
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 /* add high product limb and carry from addition */
+
+ /* cool down phase 0 */
+$LC0: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ j $31
+ addu $2,$9,$2 /* add high product limb and carry from addition */
diff --git a/sysdeps/mips/lshift.S b/sysdeps/mips/lshift.S
new file mode 100644
index 0000000..e766303
--- /dev/null
+++ b/sysdeps/mips/lshift.S
@@ -0,0 +1,97 @@
+/* MIPS2 __mpn_lshift --
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ src_ptr $5
+ size $6
+ cnt $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_lshift)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ sll $2,$6,2
+ addu $5,$5,$2 /* make r5 point at end of src */
+ lw $10,-4($5) /* load first limb */
+ subu $13,$0,$7
+ addu $4,$4,$2 /* make r4 point at end of res */
+ addiu $6,$6,-1
+ and $9,$6,4-1 /* number of limbs in first loop */
+ beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
+ srl $2,$10,$13 /* compute function result */
+
+ subu $6,$6,$9
+
+.Loop0: lw $3,-8($5)
+ addiu $4,$4,-4
+ addiu $5,$5,-4
+ addiu $9,$9,-1
+ sll $11,$10,$7
+ srl $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sw $8,0($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: lw $3,-8($5)
+ addiu $4,$4,-16
+ addiu $6,$6,-4
+ sll $11,$10,$7
+ srl $12,$3,$13
+
+ lw $10,-12($5)
+ sll $14,$3,$7
+ or $8,$11,$12
+ sw $8,12($4)
+ srl $9,$10,$13
+
+ lw $3,-16($5)
+ sll $11,$10,$7
+ or $8,$14,$9
+ sw $8,8($4)
+ srl $12,$3,$13
+
+ lw $10,-20($5)
+ sll $14,$3,$7
+ or $8,$11,$12
+ sw $8,4($4)
+ srl $9,$10,$13
+
+ addiu $5,$5,-16
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sw $8,0($4)
+
+.Lend: sll $8,$10,$7
+ j $31
+ sw $8,-4($4)
diff --git a/sysdeps/mips/mul_1.S b/sysdeps/mips/mul_1.S
new file mode 100644
index 0000000..184aae6
--- /dev/null
+++ b/sysdeps/mips/mul_1.S
@@ -0,0 +1,86 @@
+/* MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
+store the product in a second limb vector.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ s1_ptr $5
+ size $6
+ s2_limb $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_mul_1)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ /* warm up phase 0 */
+ lw $8,0($5)
+
+ /* warm up phase 1 */
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 /* zero cy2 */
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) /* load new s1 limb as early as possible */
+
+Loop: mflo $10
+ mfhi $9
+ addiu $5,$5,4
+ addu $10,$10,$2 /* add old carry limb to low product limb */
+ multu $8,$7
+ lw $8,0($5) /* load new s1 limb as early as possible */
+ addiu $6,$6,-1 /* decrement loop counter */
+ sltu $2,$10,$2 /* carry from previous addition -> $2 */
+ sw $10,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop /* should be "bnel" */
+ addu $2,$9,$2 /* add high product limb and carry from addition */
+
+ /* cool down phase 1 */
+$LC1: mflo $10
+ mfhi $9
+ addu $10,$10,$2
+ sltu $2,$10,$2
+ multu $8,$7
+ sw $10,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 /* add high product limb and carry from addition
+
+ /* cool down phase 0 */
+$LC0: mflo $10
+ mfhi $9
+ addu $10,$10,$2
+ sltu $2,$10,$2
+ sw $10,0($4)
+ j $31
+ addu $2,$9,$2 /* add high product limb and carry from addition */
diff --git a/sysdeps/mips/rshift.S b/sysdeps/mips/rshift.S
new file mode 100644
index 0000000..37bde2f
--- /dev/null
+++ b/sysdeps/mips/rshift.S
@@ -0,0 +1,94 @@
+/* MIPS2 __mpn_rshift --
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ src_ptr $5
+ size $6
+ cnt $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_rshift)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ lw $10,0($5) /* load first limb */
+ subu $13,$0,$7
+ addiu $6,$6,-1
+ and $9,$6,4-1 /* number of limbs in first loop */
+ beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop*/
+ sll $2,$10,$13 /* compute function result */
+
+ subu $6,$6,$9
+
+.Loop0: lw $3,4($5)
+ addiu $4,$4,4
+ addiu $5,$5,4
+ addiu $9,$9,-1
+ srl $11,$10,$7
+ sll $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sw $8,-4($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: lw $3,4($5)
+ addiu $4,$4,16
+ addiu $6,$6,-4
+ srl $11,$10,$7
+ sll $12,$3,$13
+
+ lw $10,8($5)
+ srl $14,$3,$7
+ or $8,$11,$12
+ sw $8,-16($4)
+ sll $9,$10,$13
+
+ lw $3,12($5)
+ srl $11,$10,$7
+ or $8,$14,$9
+ sw $8,-12($4)
+ sll $12,$3,$13
+
+ lw $10,16($5)
+ srl $14,$3,$7
+ or $8,$11,$12
+ sw $8,-8($4)
+ sll $9,$10,$13
+
+ addiu $5,$5,16
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sw $8,-4($4)
+
+.Lend: srl $8,$10,$7
+ j $31
+ sw $8,0($4)
diff --git a/sysdeps/mips/sub_n.S b/sysdeps/mips/sub_n.S
new file mode 100644
index 0000000..09fbf7e
--- /dev/null
+++ b/sysdeps/mips/sub_n.S
@@ -0,0 +1,121 @@
+/* MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+store difference in a third limb vector.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ s1_ptr $5
+ s2_ptr $6
+ size $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_sub_n)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ lw $10,0($5)
+ lw $11,0($6)
+
+ addiu $7,$7,-1
+ and $9,$7,4-1 /* number of limbs in first loop */
+ beq $9,$0,.L0 /* if multiple of 4 limbs, skip first loop */
+ move $2,$0
+
+ subu $7,$7,$9
+
+.Loop0: addiu $9,$9,-1
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ or $2,$2,$8
+
+ addiu $5,$5,4
+ addiu $6,$6,4
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ addiu $4,$4,4
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: addiu $7,$7,-4
+
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ or $2,$2,$8
+
+ lw $10,8($5)
+ addu $13,$13,$2
+ lw $11,8($6)
+ sltu $8,$13,$2
+ subu $13,$12,$13
+ sltu $2,$12,$13
+ sw $13,4($4)
+ or $2,$2,$8
+
+ lw $12,12($5)
+ addu $11,$11,$2
+ lw $13,12($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,8($4)
+ or $2,$2,$8
+
+ lw $10,16($5)
+ addu $13,$13,$2
+ lw $11,16($6)
+ sltu $8,$13,$2
+ subu $13,$12,$13
+ sltu $2,$12,$13
+ sw $13,12($4)
+ or $2,$2,$8
+
+ addiu $5,$5,16
+ addiu $6,$6,16
+
+ bne $7,$0,.Loop
+ addiu $4,$4,16
+
+.Lend: addu $11,$11,$2
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ j $31
+ or $2,$2,$8
diff --git a/sysdeps/mips/submul_1.S b/sysdeps/mips/submul_1.S
new file mode 100644
index 0000000..eae8ebb
--- /dev/null
+++ b/sysdeps/mips/submul_1.S
@@ -0,0 +1,98 @@
+/* MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
+subtract the product from a second limb vector.
+
+Copyright (C) 1995 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* INPUT PARAMETERS
+ res_ptr $4
+ s1_ptr $5
+ size $6
+ s2_limb $7
+*/
+#ifdef PIC
+ .option pic2
+#endif
+ENTRY (__mpn_submul_1)
+ .set noreorder
+#ifdef PIC
+ .cpload t9
+#endif
+ .set nomacro
+
+ /* warm up phase 0 */
+ lw $8,0($5)
+
+ /* warm up phase 1 */
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 /* zero cy2 */
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) /* load new s1 limb as early as possible */
+
+Loop: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addiu $5,$5,4
+ addu $3,$3,$2 /* add old carry limb to low product limb */
+ multu $8,$7
+ lw $8,0($5) /* load new s1 limb as early as possible */
+ addiu $6,$6,-1 /* decrement loop counter */
+ sltu $2,$3,$2 /* carry from previous addition -> $2 */
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop /* should be "bnel" */
+ addu $2,$9,$2 /* add high product limb and carry from addition */
+
+ /* cool down phase 1 */
+$LC1: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ multu $8,$7
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 /* add high product limb and carry from addition */
+
+ /* cool down phase 0 */
+$LC0: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ j $31
+ addu $2,$9,$2 /* add high product limb and carry from addition */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a473fb39828b1817aeeb19ac95c6adf88b0e4906
commit a473fb39828b1817aeeb19ac95c6adf88b0e4906
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:58:17 1997 +0000
Removed. WE have a .S file now
diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s
deleted file mode 100644
index f5525ce..0000000
--- a/sysdeps/mips/add_n.s
+++ /dev/null
@@ -1,120 +0,0 @@
- # MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
- # store sum in a third limb vector.
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # s2_ptr $6
- # size $7
-
- .text
- .align 2
- .globl __mpn_add_n
- .ent __mpn_add_n
-__mpn_add_n:
- .set noreorder
- .set nomacro
-
- lw $10,0($5)
- lw $11,0($6)
-
- addiu $7,$7,-1
- and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
-
- subu $7,$7,$9
-
-.Loop0: addiu $9,$9,-1
- lw $12,4($5)
- addu $11,$11,$2
- lw $13,4($6)
- sltu $8,$11,$2
- addu $11,$10,$11
- sltu $2,$11,$10
- sw $11,0($4)
- or $2,$2,$8
-
- addiu $5,$5,4
- addiu $6,$6,4
- move $10,$12
- move $11,$13
- bne $9,$0,.Loop0
- addiu $4,$4,4
-
-.L0: beq $7,$0,.Lend
- nop
-
-.Loop: addiu $7,$7,-4
-
- lw $12,4($5)
- addu $11,$11,$2
- lw $13,4($6)
- sltu $8,$11,$2
- addu $11,$10,$11
- sltu $2,$11,$10
- sw $11,0($4)
- or $2,$2,$8
-
- lw $10,8($5)
- addu $13,$13,$2
- lw $11,8($6)
- sltu $8,$13,$2
- addu $13,$12,$13
- sltu $2,$13,$12
- sw $13,4($4)
- or $2,$2,$8
-
- lw $12,12($5)
- addu $11,$11,$2
- lw $13,12($6)
- sltu $8,$11,$2
- addu $11,$10,$11
- sltu $2,$11,$10
- sw $11,8($4)
- or $2,$2,$8
-
- lw $10,16($5)
- addu $13,$13,$2
- lw $11,16($6)
- sltu $8,$13,$2
- addu $13,$12,$13
- sltu $2,$13,$12
- sw $13,12($4)
- or $2,$2,$8
-
- addiu $5,$5,16
- addiu $6,$6,16
-
- bne $7,$0,.Loop
- addiu $4,$4,16
-
-.Lend: addu $11,$11,$2
- sltu $8,$11,$2
- addu $11,$10,$11
- sltu $2,$11,$10
- sw $11,0($4)
- j $31
- or $2,$2,$8
-
- .end __mpn_add_n
diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s
deleted file mode 100644
index 6145771..0000000
--- a/sysdeps/mips/addmul_1.s
+++ /dev/null
@@ -1,97 +0,0 @@
- # MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
- # add the product to a second limb vector.
-
- # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_addmul_1
- .ent __mpn_addmul_1
-__mpn_addmul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- lw $8,0($5)
-
- # warm up phase 1
- addiu $5,$5,4
- multu $8,$7
-
- addiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- addiu $6,$6,-1
- beq $6,$0,$LC1
- lw $8,0($5) # load new s1 limb as early as possible
-
-Loop: lw $10,0($4)
- mflo $3
- mfhi $9
- addiu $5,$5,4
- addu $3,$3,$2 # add old carry limb to low product limb
- multu $8,$7
- lw $8,0($5) # load new s1 limb as early as possible
- addiu $6,$6,-1 # decrement loop counter
- sltu $2,$3,$2 # carry from previous addition -> $2
- addu $3,$10,$3
- sltu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- addiu $4,$4,4
- bne $6,$0,Loop
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: lw $10,0($4)
- mflo $3
- mfhi $9
- addu $3,$3,$2
- sltu $2,$3,$2
- multu $8,$7
- addu $3,$10,$3
- sltu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- addiu $4,$4,4
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: lw $10,0($4)
- mflo $3
- mfhi $9
- addu $3,$3,$2
- sltu $2,$3,$2
- addu $3,$10,$3
- sltu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- j $31
- addu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_addmul_1
diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s
deleted file mode 100644
index ee92d79..0000000
--- a/sysdeps/mips/lshift.s
+++ /dev/null
@@ -1,95 +0,0 @@
- # MIPS2 __mpn_lshift --
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # src_ptr $5
- # size $6
- # cnt $7
-
- .text
- .align 2
- .globl __mpn_lshift
- .ent __mpn_lshift
-__mpn_lshift:
- .set noreorder
- .set nomacro
-
- sll $2,$6,2
- addu $5,$5,$2 # make r5 point at end of src
- lw $10,-4($5) # load first limb
- subu $13,$0,$7
- addu $4,$4,$2 # make r4 point at end of res
- addiu $6,$6,-1
- and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- srl $2,$10,$13 # compute function result
-
- subu $6,$6,$9
-
-.Loop0: lw $3,-8($5)
- addiu $4,$4,-4
- addiu $5,$5,-4
- addiu $9,$9,-1
- sll $11,$10,$7
- srl $12,$3,$13
- move $10,$3
- or $8,$11,$12
- bne $9,$0,.Loop0
- sw $8,0($4)
-
-.L0: beq $6,$0,.Lend
- nop
-
-.Loop: lw $3,-8($5)
- addiu $4,$4,-16
- addiu $6,$6,-4
- sll $11,$10,$7
- srl $12,$3,$13
-
- lw $10,-12($5)
- sll $14,$3,$7
- or $8,$11,$12
- sw $8,12($4)
- srl $9,$10,$13
-
- lw $3,-16($5)
- sll $11,$10,$7
- or $8,$14,$9
- sw $8,8($4)
- srl $12,$3,$13
-
- lw $10,-20($5)
- sll $14,$3,$7
- or $8,$11,$12
- sw $8,4($4)
- srl $9,$10,$13
-
- addiu $5,$5,-16
- or $8,$14,$9
- bgtz $6,.Loop
- sw $8,0($4)
-
-.Lend: sll $8,$10,$7
- j $31
- sw $8,-4($4)
- .end __mpn_lshift
diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s
deleted file mode 100644
index d006fa1..0000000
--- a/sysdeps/mips/mul_1.s
+++ /dev/null
@@ -1,85 +0,0 @@
- # MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
- # store the product in a second limb vector.
-
- # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_mul_1
- .ent __mpn_mul_1
-__mpn_mul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- lw $8,0($5)
-
- # warm up phase 1
- addiu $5,$5,4
- multu $8,$7
-
- addiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- addiu $6,$6,-1
- beq $6,$0,$LC1
- lw $8,0($5) # load new s1 limb as early as possible
-
-Loop: mflo $10
- mfhi $9
- addiu $5,$5,4
- addu $10,$10,$2 # add old carry limb to low product limb
- multu $8,$7
- lw $8,0($5) # load new s1 limb as early as possible
- addiu $6,$6,-1 # decrement loop counter
- sltu $2,$10,$2 # carry from previous addition -> $2
- sw $10,0($4)
- addiu $4,$4,4
- bne $6,$0,Loop
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: mflo $10
- mfhi $9
- addu $10,$10,$2
- sltu $2,$10,$2
- multu $8,$7
- sw $10,0($4)
- addiu $4,$4,4
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: mflo $10
- mfhi $9
- addu $10,$10,$2
- sltu $2,$10,$2
- sw $10,0($4)
- j $31
- addu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_mul_1
diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s
deleted file mode 100644
index a8beb40..0000000
--- a/sysdeps/mips/rshift.s
+++ /dev/null
@@ -1,92 +0,0 @@
- # MIPS2 __mpn_rshift --
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # src_ptr $5
- # size $6
- # cnt $7
-
- .text
- .align 2
- .globl __mpn_rshift
- .ent __mpn_rshift
-__mpn_rshift:
- .set noreorder
- .set nomacro
-
- lw $10,0($5) # load first limb
- subu $13,$0,$7
- addiu $6,$6,-1
- and $9,$6,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- sll $2,$10,$13 # compute function result
-
- subu $6,$6,$9
-
-.Loop0: lw $3,4($5)
- addiu $4,$4,4
- addiu $5,$5,4
- addiu $9,$9,-1
- srl $11,$10,$7
- sll $12,$3,$13
- move $10,$3
- or $8,$11,$12
- bne $9,$0,.Loop0
- sw $8,-4($4)
-
-.L0: beq $6,$0,.Lend
- nop
-
-.Loop: lw $3,4($5)
- addiu $4,$4,16
- addiu $6,$6,-4
- srl $11,$10,$7
- sll $12,$3,$13
-
- lw $10,8($5)
- srl $14,$3,$7
- or $8,$11,$12
- sw $8,-16($4)
- sll $9,$10,$13
-
- lw $3,12($5)
- srl $11,$10,$7
- or $8,$14,$9
- sw $8,-12($4)
- sll $12,$3,$13
-
- lw $10,16($5)
- srl $14,$3,$7
- or $8,$11,$12
- sw $8,-8($4)
- sll $9,$10,$13
-
- addiu $5,$5,16
- or $8,$14,$9
- bgtz $6,.Loop
- sw $8,-4($4)
-
-.Lend: srl $8,$10,$7
- j $31
- sw $8,0($4)
- .end __mpn_rshift
diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s
deleted file mode 100644
index 3368ef2..0000000
--- a/sysdeps/mips/sub_n.s
+++ /dev/null
@@ -1,120 +0,0 @@
- # MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
- # store difference in a third limb vector.
-
- # Copyright (C) 1995 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # s2_ptr $6
- # size $7
-
- .text
- .align 2
- .globl __mpn_sub_n
- .ent __mpn_sub_n
-__mpn_sub_n:
- .set noreorder
- .set nomacro
-
- lw $10,0($5)
- lw $11,0($6)
-
- addiu $7,$7,-1
- and $9,$7,4-1 # number of limbs in first loop
- beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
- move $2,$0
-
- subu $7,$7,$9
-
-.Loop0: addiu $9,$9,-1
- lw $12,4($5)
- addu $11,$11,$2
- lw $13,4($6)
- sltu $8,$11,$2
- subu $11,$10,$11
- sltu $2,$10,$11
- sw $11,0($4)
- or $2,$2,$8
-
- addiu $5,$5,4
- addiu $6,$6,4
- move $10,$12
- move $11,$13
- bne $9,$0,.Loop0
- addiu $4,$4,4
-
-.L0: beq $7,$0,.Lend
- nop
-
-.Loop: addiu $7,$7,-4
-
- lw $12,4($5)
- addu $11,$11,$2
- lw $13,4($6)
- sltu $8,$11,$2
- subu $11,$10,$11
- sltu $2,$10,$11
- sw $11,0($4)
- or $2,$2,$8
-
- lw $10,8($5)
- addu $13,$13,$2
- lw $11,8($6)
- sltu $8,$13,$2
- subu $13,$12,$13
- sltu $2,$12,$13
- sw $13,4($4)
- or $2,$2,$8
-
- lw $12,12($5)
- addu $11,$11,$2
- lw $13,12($6)
- sltu $8,$11,$2
- subu $11,$10,$11
- sltu $2,$10,$11
- sw $11,8($4)
- or $2,$2,$8
-
- lw $10,16($5)
- addu $13,$13,$2
- lw $11,16($6)
- sltu $8,$13,$2
- subu $13,$12,$13
- sltu $2,$12,$13
- sw $13,12($4)
- or $2,$2,$8
-
- addiu $5,$5,16
- addiu $6,$6,16
-
- bne $7,$0,.Loop
- addiu $4,$4,16
-
-.Lend: addu $11,$11,$2
- sltu $8,$11,$2
- subu $11,$10,$11
- sltu $2,$10,$11
- sw $11,0($4)
- j $31
- or $2,$2,$8
-
- .end __mpn_sub_n
diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s
deleted file mode 100644
index 1324b66..0000000
--- a/sysdeps/mips/submul_1.s
+++ /dev/null
@@ -1,97 +0,0 @@
- # MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
- # subtract the product from a second limb vector.
-
- # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
-
- # This file is part of the GNU MP Library.
-
- # The GNU MP Library is free software; you can redistribute it and/or modify
- # it under the terms of the GNU Library General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or (at your
- # option) any later version.
-
- # The GNU MP Library is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
- # License for more details.
-
- # You should have received a copy of the GNU Library General Public License
- # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- # MA 02111-1307, USA.
-
-
- # INPUT PARAMETERS
- # res_ptr $4
- # s1_ptr $5
- # size $6
- # s2_limb $7
-
- .text
- .align 4
- .globl __mpn_submul_1
- .ent __mpn_submul_1
-__mpn_submul_1:
- .set noreorder
- .set nomacro
-
- # warm up phase 0
- lw $8,0($5)
-
- # warm up phase 1
- addiu $5,$5,4
- multu $8,$7
-
- addiu $6,$6,-1
- beq $6,$0,$LC0
- move $2,$0 # zero cy2
-
- addiu $6,$6,-1
- beq $6,$0,$LC1
- lw $8,0($5) # load new s1 limb as early as possible
-
-Loop: lw $10,0($4)
- mflo $3
- mfhi $9
- addiu $5,$5,4
- addu $3,$3,$2 # add old carry limb to low product limb
- multu $8,$7
- lw $8,0($5) # load new s1 limb as early as possible
- addiu $6,$6,-1 # decrement loop counter
- sltu $2,$3,$2 # carry from previous addition -> $2
- subu $3,$10,$3
- sgtu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- addiu $4,$4,4
- bne $6,$0,Loop
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 1
-$LC1: lw $10,0($4)
- mflo $3
- mfhi $9
- addu $3,$3,$2
- sltu $2,$3,$2
- multu $8,$7
- subu $3,$10,$3
- sgtu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- addiu $4,$4,4
- addu $2,$9,$2 # add high product limb and carry from addition
-
- # cool down phase 0
-$LC0: lw $10,0($4)
- mflo $3
- mfhi $9
- addu $3,$3,$2
- sltu $2,$3,$2
- subu $3,$10,$3
- sgtu $10,$3,$10
- addu $2,$2,$10
- sw $3,0($4)
- j $31
- addu $2,$9,$2 # add high product limb and carry from addition
-
- .end __mpn_submul_1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ede6d67ba21289507bed9d0bc4da087afc53d714
commit ede6d67ba21289507bed9d0bc4da087afc53d714
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:43:54 1997 +0000
Hurd/MIPS64 patches.
diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c
index f907c89..235b2e2 100644
--- a/sysdeps/mach/hurd/mips/exc2signal.c
+++ b/sysdeps/mach/hurd/mips/exc2signal.c
@@ -1,21 +1,21 @@
/* Translate Mach exception codes into signal numbers. MIPS version.
-Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/signal.h>
@@ -25,56 +25,55 @@ Cambridge, MA 02139, USA. */
into a signal number and signal subcode. */
void
-_hurd_exception2signal (int exception, int code, int subcode,
- int *signo, long int *sigcode, int *error)
+_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo)
{
- *error = 0;
+ detail->error = 0;
- switch (exception)
+ switch (detail->exc)
{
default:
*signo = SIGIOT;
- *sigcode = exception;
+ detail->code = detail->exc;
break;
case EXC_BAD_ACCESS:
- if (code == KERN_PROTECTION_FAILURE)
+ if (detail->exc_code == KERN_PROTECTION_FAILURE)
*signo = SIGSEGV;
else
*signo = SIGBUS;
- *sigcode = subcode;
- *error = code;
+ detail->code = detail->exc_subcode;
+ detail->error = detail->exc_code;
break;
case EXC_BAD_INSTRUCTION:
*signo = SIGILL;
- if (code == EXC_MIPS_II)
- *sigcode = code;
+ if (detail->exc_code == EXC_MIPS_II)
+ detail->code = detail->exc_subcode;
else
- *sigcode = 0;
+ detail->code = 0;
break;
case EXC_ARITHMETIC:
- switch (code)
+ switch (detail->exc_code)
{
case EXC_MIPS_OV: /* integer overflow */
*signo = SIGFPE;
- *sigcode = EXC_MIPS_FLT_OVERFLOW;
+ detail->code = detail->exc_subcode;
break;
default:
*signo = SIGFPE;
- *sigcode = 0;
+ detail->code = 0;
break;
case EXC_MIPS_INT:
/* Subcode is the fp_status word saved by the hardware.
Give an error code corresponding to the first bit set. */
- if (subcode == EXC_MIPS_FLT_UNIMP)
+ if (detail->exc_subcode == EXC_MIPS_FLT_UNIMP)
*signo = SIGILL;
else
*signo = SIGFPE;
- *sigcode = subcode;
+ detail->code = detail->exc_subcode;
break;
}
break;
@@ -82,17 +81,17 @@ _hurd_exception2signal (int exception, int code, int subcode,
case EXC_EMULATION:
/* 3.0 doesn't give this one, why, I don't know. */
*signo = SIGEMT;
- *sigcode = 0;
+ detail->code = 0;
break;
case EXC_SOFTWARE:
*signo = SIGEMT;
- *sigcode = 0;
+ detail->code = 0;
break;
case EXC_BREAKPOINT:
*signo = SIGTRAP;
- *sigcode = code;
+ detail->code = 0;
break;
}
}
diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c
index 980a2ce..ea62bb1 100644
--- a/sysdeps/mach/hurd/mips/longjmp-ts.c
+++ b/sysdeps/mach/hurd/mips/longjmp-ts.c
@@ -1,21 +1,21 @@
/* Perform a `longjmp' on a Mach thread_state. MIPS version.
-Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd/signal.h>
#include <setjmp.h>
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 7396a8b..fe38fac 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -1,30 +1,32 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/threadvar.h>
#include <stdlib.h>
+#include <mach/mips/mips_instruction.h>
int
__sigreturn (struct sigcontext *scp)
{
struct hurd_sigstate *ss;
+ struct hurd_userlink *link = (void *) &scp[1];
mach_port_t *reply_port;
if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
@@ -36,6 +38,11 @@ __sigreturn (struct sigcontext *scp)
ss = _hurd_self_sigstate ();
__spin_lock (&ss->lock);
+ /* Remove the link on the `active resources' chain added by
+ _hurd_setup_sighandler. Its purpose was to make sure
+ that we got called; now we have, it is done. */
+ _hurd_userlink_unlink (link);
+
/* Restore the set of blocked signals, and the intr_port slot. */
ss->blocked = scp->sc_mask;
ss->intr_port = scp->sc_intr_port;
@@ -48,15 +55,11 @@ __sigreturn (struct sigcontext *scp)
the signal thread will notice it if it runs another handler, and
arrange to have us called over again in the new reality. */
ss->context = scp;
- /* Clear the intr_port slot, since we are not in fact doing
- an interruptible RPC right now. If SS->intr_port is not null,
- the SCP context is doing an interruptible RPC, but the signal
- thread will examine us while we are blocked in the sig_post RPC. */
- ss->intr_port = MACH_PORT_NULL;
__spin_unlock (&ss->lock);
- __msg_sig_post (_hurd_msgport, 0, __mach_task_self ());
+ __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
/* If a pending signal was handled, sig_post never returned. */
__spin_lock (&ss->lock);
+ ss->context = NULL;
}
if (scp->sc_onstack)
@@ -73,7 +76,17 @@ __sigreturn (struct sigcontext *scp)
reply_port =
(mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
if (*reply_port)
- __mach_port_destroy (__mach_task_self (), *reply_port);
+ {
+ mach_port_t port = *reply_port;
+
+ /* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port not to
+ get another reply port, but avoids mig_dealloc_reply_port trying to
+ deallocate it after the receive fails (which it will, because the
+ reply port will be bogus, whether we do this or not). */
+ *reply_port = MACH_PORT_DEAD;
+
+ __mach_port_destroy (__mach_task_self (), port);
+ }
*reply_port = scp->sc_reply_port;
if (scp->sc_coproc_used & SC_COPROC_USE_FPU)
@@ -83,30 +96,70 @@ __sigreturn (struct sigcontext *scp)
asm volatile ("l.d $f" #n ",%0" : : "m" (scp->sc_fpr[n]))
/* Restore floating-point registers. */
+#ifdef __mips64
restore_fpr (0);
+ restore_fpr (1);
restore_fpr (2);
+ restore_fpr (3);
restore_fpr (4);
+ restore_fpr (5);
restore_fpr (6);
+ restore_fpr (7);
restore_fpr (8);
+ restore_fpr (9);
restore_fpr (10);
+ restore_fpr (11);
restore_fpr (12);
+ restore_fpr (13);
restore_fpr (14);
+ restore_fpr (15);
restore_fpr (16);
+ restore_fpr (17);
restore_fpr (18);
+ restore_fpr (19);
restore_fpr (20);
+ restore_fpr (21);
restore_fpr (22);
+ restore_fpr (23);
restore_fpr (24);
+ restore_fpr (25);
restore_fpr (26);
+ restore_fpr (27);
restore_fpr (28);
+ restore_fpr (29);
restore_fpr (30);
+ restore_fpr (31);
+#else
+ restore_fpr (0);
+ restore_fpr (2);
+ restore_fpr (4);
+ restore_fpr (6);
+ restore_fpr (8);
+ restore_fpr (10);
+ restore_fpr (12);
+ restore_fpr (14);
+ restore_fpr (16);
+ restore_fpr (18);
+ restore_fpr (20);
+ restore_fpr (22);
+ restore_fpr (24);
+ restore_fpr (26);
+ restore_fpr (28);
+ restore_fpr (30);
+#endif
/* Restore the floating-point control/status register ($f31). */
asm volatile ("ctc1 %0,$f31" : : "r" (scp->sc_fpcsr));
}
/* Load all the registers from the sigcontext. */
+#ifdef __mips64
+#define restore_gpr(n) \
+ asm volatile ("ld $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1]))
+#else
#define restore_gpr(n) \
asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1]))
+#endif
{
register const struct sigcontext *const scpreg asm ("$1") = scp;
@@ -157,9 +210,10 @@ __sigreturn (struct sigcontext *scp)
at = &scpreg->sc_pc;
/* This is an emulated instruction that will find at the address in $1
two words: the PC value to restore, and the $1 value to restore. */
- asm volatile (".word op_sigreturn");
-
+ asm volatile (".word %0" : : "i" (op_sigreturn));
asm volatile (".set reorder; .set at;");
+ /* NOTREACHED */
+ return at; /* To prevent optimization. */
}
/* NOTREACHED */
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 03e3d1d..fbb7df5 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -1,56 +1,58 @@
/* Set thread_state for sighandler, and sigcontext to recover. MIPS version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <hurd/signal.h>
+#include <hurd/userlink.h>
#include "thread_state.h"
-
-
-struct mach_msg_trap_args
- {
- /* This is the order of arguments to mach_msg_trap. */
- mach_msg_header_t *msg;
- mach_msg_option_t option;
- mach_msg_size_t send_size;
- mach_msg_size_t rcv_size;
- mach_port_t rcv_name;
- mach_msg_timeout_t timeout;
- mach_port_t notify;
- };
+#include <assert.h>
+#include <errno.h>
+#include "hurdfault.h"
+#include "intr-msg.h"
struct sigcontext *
_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
- int signo, long int sigcode,
- int rpc_wait,
+ int signo, struct hurd_signal_detail *detail,
+ volatile int rpc_wait,
struct machine_thread_all_state *state)
{
-
- __label__ trampoline, rpc_wait_trampoline;
- void *sigsp;
+ __label__ trampoline, rpc_wait_trampoline, firewall;
+ void *volatile sigsp;
struct sigcontext *scp;
+ struct
+ {
+ int signo;
+ long int sigcode;
+ struct sigcontext *scp; /* Points to ctx, below. */
+ void *sigreturn_addr;
+ void *sigreturn_returns_here;
+ struct sigcontext *return_scp; /* Same; arg to sigreturn. */
+ struct sigcontext ctx;
+ struct hurd_userlink link;
+ } *stackframe;
if (ss->context)
{
/* We have a previous sigcontext that sigreturn was about
to restore when another signal arrived. We will just base
our setup on that. */
- if (! setjmp (_hurd_sigthread_fault_env))
+ if (! _hurdsig_catch_memory_fault (ss->context))
{
memcpy (&state->basic, &ss->context->sc_mips_thread_state,
sizeof (state->basic));
@@ -63,24 +65,17 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
sizeof (state->fpu));
state->set |= (1 << MIPS_FLOAT_STATE);
}
- assert (! rpc_wait);
- /* The intr_port slot was cleared before sigreturn sent us the
- sig_post that made us notice this pending signal, so
- _hurd_internal_post_signal wouldn't do interrupt_operation.
- After we return, our caller will set SCP->sc_intr_port (in the
- new context) from SS->intr_port and clear SS->intr_port. Now
- that we are restoring this old context recorded by sigreturn,
- we want to restore its intr_port too; so store it in
- SS->intr_port now, so it will end up in SCP->sc_intr_port
- later. */
- ss->intr_port = ss->context->sc_intr_port;
}
- /* If the sigreturn context was bogus, just ignore it. */
- ss->context = NULL;
}
- else if (! machine_get_basic_state (ss->thread, state))
+
+ if (! machine_get_basic_state (ss->thread, state))
return NULL;
+ /* Save the original SP in the gratuitous s0 ($16) slot.
+ We may need to reset the SP (the `r29' slot) to avoid clobbering an
+ interrupted RPC frame. */
+ state->basic.r16 = state->basic.r29;
+
if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
!(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
{
@@ -92,13 +87,46 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
else
sigsp = (char *) state->basic.r29;
- /* Set up the sigcontext structure on the stack. This is all the stack
- needs, since the args are passed in registers (below). */
- sigsp -= sizeof (*scp);
- scp = sigsp;
+ /* Push the arguments to call `trampoline' on the stack. */
+ sigsp -= sizeof (*stackframe);
+ stackframe = sigsp;
- if (! setjmp (_hurd_sigthread_fault_env))
+ if (_hurdsig_catch_memory_fault (stackframe))
{
+ /* We got a fault trying to write the stack frame.
+ We cannot set up the signal handler.
+ Returning NULL tells our caller, who will nuke us with a SIGILL. */
+ return NULL;
+ }
+ else
+ {
+ int ok;
+
+ extern void _hurdsig_longjmp_from_handler (void *, jmp_buf, int);
+
+ /* Add a link to the thread's active-resources list. We mark this as
+ the only user of the "resource", so the cleanup function will be
+ called by any longjmp which is unwinding past the signal frame.
+ The cleanup function (in sigunwind.c) will make sure that all the
+ appropriate cleanups done by sigreturn are taken care of. */
+ stackframe->link.cleanup = &_hurdsig_longjmp_from_handler;
+ stackframe->link.cleanup_data = &stackframe->ctx;
+ stackframe->link.resource.next = NULL;
+ stackframe->link.resource.prevp = NULL;
+ stackframe->link.thread.next = ss->active_resources;
+ stackframe->link.thread.prevp = &ss->active_resources;
+ if (stackframe->link.thread.next)
+ stackframe->link.thread.next->thread.prevp
+ = &stackframe->link.thread.next;
+ ss->active_resources = &stackframe->link;
+
+ /* Set up the arguments for the signal handler. */
+ stackframe->signo = signo;
+ stackframe->sigcode = detail->code;
+ stackframe->scp = stackframe->return_scp = scp = &stackframe->ctx;
+ stackframe->sigreturn_addr = &__sigreturn;
+ stackframe->sigreturn_returns_here = &&firewall; /* Crash on return. */
+
/* Set up the sigcontext from the current state of the thread. */
scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
@@ -110,24 +138,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* struct sigcontext is laid out so that starting at sc_cause
mimics a struct mips_exc_state. */
- if (! machine_get_state (ss->thread, state, MIPS_EXC_STATE,
- &state->exc, &scp->sc_cause,
- sizeof (state->exc)))
- return NULL;
- if ((scp->sc_coproc_used & SC_COPROC_USE_FPU) &&
- /* struct sigcontext is laid out so that starting at sc_fpr
- mimics a struct mips_float_state. This state
- is only meaningful if the coprocessor was used. */
- ! machine_get_state (ss->thread, state, MIPS_FLOAT_STATE,
- &state->fpu,
- &scp->sc_mips_float_state, sizeof (state->fpu)))
+ ok = machine_get_state (ss->thread, state, MIPS_EXC_STATE,
+ &state->exc, &scp->sc_cause,
+ sizeof (state->exc));
+
+ if (ok && (scp->sc_coproc_used & SC_COPROC_USE_FPU))
+ /* struct sigcontext is laid out so that starting at sc_fpr
+ mimics a struct mips_float_state. This state
+ is only meaningful if the coprocessor was used. */
+ ok = machine_get_state (ss->thread, state, MIPS_FLOAT_STATE,
+ &state->fpu, &scp->sc_mips_float_state,
+ sizeof (state->fpu));
+
+ _hurdsig_end_catch_fault ();
+
+ if (! ok)
return NULL;
}
- else
- /* We got a fault trying to write the stack frame.
- We cannot set up the signal handler.
- Returning NULL tells our caller, who will nuke us with a SIGILL. */
- return NULL;
/* Modify the thread state to call the trampoline code on the new stack. */
if (rpc_wait)
@@ -145,6 +172,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
starting with a0 ($4). */
struct mach_msg_trap_args *args = (void *) &state->basic.r4;
+ if (_hurdsig_catch_memory_fault (args))
+ {
+ /* Faulted accessing ARGS. Bomb. */
+ return NULL;
+ }
+
assert (args->option & MACH_RCV_MSG);
/* Disable the message-send, since it has already completed. The
calls we retry need only wait to receive the reply message. */
@@ -156,17 +189,22 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
args->option |= MACH_RCV_TIMEOUT;
args->timeout = _hurd_interrupted_rpc_timeout;
+ _hurdsig_end_catch_fault ();
+
state->basic.pc = (int) &&rpc_wait_trampoline;
- state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */
+ /* The reply-receiving trampoline code runs initially on the original
+ user stack. We pass it the signal stack pointer in s4 ($20). */
+ state->basic.r29 = state->basic.r16; /* Restore mach_msg syscall SP. */
+ state->basic.r20 = (int) sigsp;
/* After doing the message receive, the trampoline code will need to
update the v0 ($2) value to be restored by sigreturn. To simplify
the assembly code, we pass the address of its slot in SCP to the
- trampoline code in v1 ($3). */
- state->basic.r3 = (int) &scp->sc_gpr[1];
+ trampoline code in s5 ($21). */
+ state->basic.r21 = (int) &scp->sc_gpr[1];
/* We must preserve the mach_msg_trap args in a0..t2 ($4..$10).
Pass the handler args to the trampoline code in s1..s3 ($17..$19). */
state->basic.r17 = signo;
- state->basic.r18 = sigcode;
+ state->basic.r18 = detail->code;
state->basic.r19 = (int) scp;
}
else
@@ -174,12 +212,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
state->basic.pc = (int) &&trampoline;
state->basic.r29 = (int) sigsp;
state->basic.r4 = signo;
- state->basic.r5 = sigcode;
+ state->basic.r5 = detail->code;
state->basic.r6 = (int) scp;
}
- /* We pass the handler function to the trampoline code in at ($1). */
- state->basic.r1 = (int) handler;
+ /* We pass the handler function to the trampoline code in s6 ($22). */
+ state->basic.r22 = (int) handler;
/* In the callee-saved register s0 ($16), we save the SCP value to pass
to __sigreturn after the handler returns. */
state->basic.r16 = (int) scp;
@@ -197,21 +235,31 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
asm volatile
(".set noat; .set noreorder; .set nomacro\n"
/* Retry the interrupted mach_msg system call. */
+#ifdef __mips64
+ "dli $2, -25\n" /* mach_msg_trap */
+#else
"li $2, -25\n" /* mach_msg_trap */
+#endif
"syscall\n"
/* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
now the message receive has completed and the original caller of
the RPC (i.e. the code running when the signal arrived) needs to
see the final return value of the message receive in v0. So
store the new v0 value into the sc_gpr[1] member of the sigcontext
- (whose address is in v1 to make this code simpler). */
- "sw $2, ($3)\n"
+ (whose address is in s5 to make this code simpler). */
+#ifdef __mips64
+ "sd $2, ($21)\n"
+#else
+ "sw $2, ($21)\n"
+#endif
/* Since the argument registers needed to have the mach_msg_trap
arguments, we've stored the arguments to the handler function
in registers s1..s3 ($17..$19). */
"move $4, $17\n"
"move $5, $18\n"
- "move $6, $19\n");
+ "move $6, $19\n"
+ /* Switch to the signal stack. */
+ "move $29, $20\n");
trampoline:
/* Entry point for running the handler normally. The arguments to the
@@ -222,14 +270,23 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
a2 SCP
*/
asm volatile
- ("jal $1; nop\n" /* Call the handler function. */
+ ("move $25, $22\n" /* Copy s6 to t9 for MIPS ABI. */
+ "jal $25; nop\n" /* Call the handler function. */
/* Call __sigreturn (SCP); this cannot return. */
- "j %0\n"
+#ifdef __mips64
+ "dla $1,%0\n"
+#else
+ "la $1,%0\n"
+#endif
+ "j $1\n"
"move $4, $16" /* Set up arg from saved SCP in delay slot. */
: : "i" (&__sigreturn));
/* NOTREACHED */
asm volatile (".set reorder; .set at; .set macro");
+ firewall:
+ asm volatile ("hlt: j hlt");
+
return NULL;
}
diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c
index 5325e6f..de2ec58 100644
--- a/sysdeps/mach/mips/cacheflush.c
+++ b/sysdeps/mach/mips/cacheflush.c
@@ -1,28 +1,28 @@
/* Flush the insn cache after GCC writes a closure on the stack. Mach/MIPS.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <mach.h>
#include <mach/vm_attributes.h>
/* Stupid name, but this is what GCC generates (config/mips/mips.h). */
void
-cacheflush (void *addr, size_t size, int flag)
+cacheflush (void *addr, unsigned size, int flag)
{
vm_machine_attribute_val_t val;
diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h
index 628aae4..91d39e3 100644
--- a/sysdeps/mach/mips/machine-lock.h
+++ b/sysdeps/mach/mips/machine-lock.h
@@ -1,25 +1,28 @@
/* Machine-specific definition for spin locks. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MACHINE_LOCK_H
#define _MACHINE_LOCK_H
+/* To get the TAS pseudo-instruction. */
+#include <mach/mips/mips_instruction.h>
+
/* The type of a spin lock variable. */
typedef __volatile int __spin_lock_t;
@@ -46,19 +49,35 @@ __spin_unlock (__spin_lock_t *__lock)
_EXTERN_INLINE int
__spin_try_lock (register __spin_lock_t *__lock)
{
- register int __rtn;
+#if (__mips >= 2)
+ int __rtn;
+
__asm__ __volatile (".set noreorder");
-#if 0
- __asm__ __volatile ("lw %0,0(%1)": "=r" (__rtn) : "r" (__lock));
- __asm__ __volatile ("sw %0,0(%0)": : "r" (__lock));
- __asm__ __volatile ("xor %0,%1,%0": "=r" (__rtn) : "r" (__lock));
+#if (__mips64)
+ __asm__ __volatile ("lld %0,0(%1)" : "=r" (__rtn) : "r" (__lock));
#else
- /* Use the Mach microkernel's emulated TAS pseudo-instruction. */
- register int __rtn __asm__ ("a0");
- __asm__ __volatile (".word 0xf ! %0 " : "=r" (__rtn) : "0" (__lock));
+ __asm__ __volatile ("ll %0,0(%1)" : "=r" (__rtn) : "r" (__lock));
+#endif
+ if (__rtn)
+ return 0;
+ __asm__ __volatile ("move %0,%1" : "=r" (__rtn) : "r" (__lock));
+#if (__mips64)
+ __asm__ __volatile ("scd %0,0(%1)" : "=r" (__rtn) : "r" (__lock));
+#else
+ __asm__ __volatile ("sc %0,0(%1)" : "=r" (__rtn) : "r" (__lock));
#endif
__asm__ __volatile (".set reorder");
+ return __rtn;
+#else
+ register int __rtn __asm__ ("a0");
+
+ /* Use the Mach microkernel's emulated TAS pseudo-instruction. */
+ __asm__ __volatile (".set noreorder");
+ __asm__ __volatile (".word %1" : "=r" (__rtn) : "i" (op_tas), "0" (__lock));
+ __asm__ __volatile ("nop");
+ __asm__ __volatile (".set reorder");
return __rtn ^ (int) __lock;
+#endif
}
/* Return nonzero if LOCK is locked. */
diff --git a/sysdeps/mach/mips/machine-sp.h b/sysdeps/mach/mips/machine-sp.h
index 7406658..e1217c3 100644
--- a/sysdeps/mach/mips/machine-sp.h
+++ b/sysdeps/mach/mips/machine-sp.h
@@ -1,21 +1,21 @@
/* Machine-specific function to return the stack pointer. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _MACHINE_SP_H
#define _MACHINE_SP_H
diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S
index bf56b40..9936772 100644
--- a/sysdeps/mach/mips/syscall.S
+++ b/sysdeps/mach/mips/syscall.S
@@ -1,37 +1,48 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#ifdef PIC
+ .option pic2
+#endif
ENTRY (syscall)
- .frame sp,0,ra
move v0, a0 /* Load system call number from first arg. */
move a0, a1 /* Move the next three args up a register. */
move a1, a2
move a2, a3
/* Load the remaining possible args (up to 11) from the stack. */
- lw t0,16(sp)
- lw t1,20(sp)
- lw t2,24(sp)
- lw t3,28(sp)
- lw t4,32(sp)
- lw t5,36(sp)
- lw t6,40(sp)
+#ifdef __mips64
+ ld t0,4*8(sp)
+ ld t1,5*8(sp)
+ ld t2,6*8(sp)
+ ld t3,7*8(sp)
+ ld t4,8*8(sp)
+ ld t5,9*8(sp)
+ ld t6,10*8(sp)
+#else
+ lw t0,4*4(sp)
+ lw t1,5*4(sp)
+ lw t2,6*4(sp)
+ lw t3,7*4(sp)
+ lw t4,8*4(sp)
+ lw t5,9*4(sp)
+ lw t6,10*4(sp)
+#endif
syscall /* Do the system call. */
j ra /* Return to caller. */
- .end syscall
diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h
index 7609be5..a4e6dff 100644
--- a/sysdeps/mach/mips/sysdep.h
+++ b/sysdeps/mach/mips/sysdep.h
@@ -1,35 +1,40 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define MOVE(x,y) move y , x
-
-#if 0
#define LOSE asm volatile ("1: b 1b")
-#endif
+#define START_MACHDEP asm ("\
+ .text\n\
+ .globl _start\n\
+ .ent _start\n\
+_start:\n\
+ # Put initial SP in a0.\n\
+ move $4, $29\n\
+ # Jump to _start0; don't return.\n\
+ j _start0\n\
+ .end _start\n\
+");
+#define START_ARGS int *entry_sp
#define SNARF_ARGS(argc, argv, envp) \
do \
{ \
- int *entry_sp; \
register char **p; \
\
- asm ("addu %0,$30,4" : "=r" (entry_sp)); \
- \
argc = *entry_sp; \
argv = (char **) (entry_sp + 1); \
p = argv; \
@@ -44,11 +49,20 @@ Cambridge, MA 02139, USA. */
({ register int __fn = fn, __sp = (int) sp; \
asm volatile ("move $sp,%0; j %1" : : "r" (__sp), "r" (__fn));})
+#define RETURN_TO(sp, pc, retval) \
+ asm volatile ("move $29, %0; move $2, %2; move $25, %1; jr $25" \
+ : : "r" (sp), "r" (pc), "r" (retval))
+
#define STACK_GROWTH_DOWN
-#ifdef P40
#include <syscall.h>
+#if defined (ASSEMBLER)
+
+#define ALIGN 2
+
+#define MOVE(x,y) move y , x
+
#define SYSCALL(name, args) \
.globl syscall_error; \
kernel_trap(name,SYS_##name,args); \
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index f4f4b42..a72848d 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -1,25 +1,30 @@
/* Mach thread state definitions for machine-independent code. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE
#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT
+#ifdef PIC
+#define MACHINE_THREAD_STATE_SET_PC(ts, pc) \
+ ((ts)->PC = (ts)->r25 = (unsigned long int) (pc))
+#endif
+
#define machine_thread_state mips_thread_state
#define PC pc
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c20a529cc7d68fcdf432e41eed87c67a4d9826c1
commit c20a529cc7d68fcdf432e41eed87c67a4d9826c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:43:22 1997 +0000
Moved from below.
diff --git a/sysdeps/mach/hurd/mips/bits/sigcontext.h b/sysdeps/mach/hurd/mips/bits/sigcontext.h
new file mode 100644
index 0000000..81d1f25
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/bits/sigcontext.h
@@ -0,0 +1,71 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ /* These first members are machine-independent. */
+
+ int sc_onstack; /* Nonzero if running on sigstack. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned int sc_intr_port;
+
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_error;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to:
+ {
+ struct mips_thread_state ts;
+ struct mips_exc_state es;
+ struct mips_float_state fs;
+ }
+ trampoline.c knows this, so it must be changed if this changes. */
+#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */
+ int sc_gpr[31]; /* "General" registers; [0] is r1. */
+ int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */
+ int sc_pc; /* Instruction pointer. */
+
+ /* struct mips_exc_state */
+#define sc_mips_exc_state sc_cause
+ unsigned int sc_cause; /* Machine-level trap code. */
+#define SC_CAUSE_SST 0x00000044
+ unsigned int sc_badvaddr;
+ unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */
+#define SC_COPROC_USE_COP0 1 /* (by definition) */
+#define SC_COPROC_USE_COP1 2 /* FPA */
+#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1
+#define SC_COPROC_USE_COP2 4
+#define SC_COPROC_USE_COP3 8
+
+ /* struct mips_float_state
+ This is only filled in if the SC_COPROC_USE_FPU bit
+ is set in sc_coproc_used. */
+#define sc_mips_float_state sc_fpr
+ int sc_fpr[32]; /* FP registers. */
+ int sc_fpcsr; /* FPU status register. */
+ int sc_fpeir; /* FP exception instruction register. */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10fa6c02adaa66f3ff21a9a70a046fda7ad8af36
commit 10fa6c02adaa66f3ff21a9a70a046fda7ad8af36
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:42:52 1997 +0000
longjmp support for Hurd/MIPS.
diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c
new file mode 100644
index 0000000..df04900
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c
@@ -0,0 +1,41 @@
+/* Perform a `longjmp' on a `struct sigcontext'. MIPS version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <setjmp.h>
+#include <hurd/signal.h>
+#include <string.h>
+
+void
+_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
+{
+ scp->sc_gpr[16] = env[0].__regs[0];
+ scp->sc_gpr[17] = env[0].__regs[1];
+ scp->sc_gpr[18] = env[0].__regs[2];
+ scp->sc_gpr[19] = env[0].__regs[3];
+ scp->sc_gpr[20] = env[0].__regs[4];
+ scp->sc_gpr[21] = env[0].__regs[5];
+ scp->sc_gpr[22] = env[0].__regs[6];
+ scp->sc_gpr[23] = env[0].__regs[7];
+
+ scp->sc_gpr[28] = (int) env[0].__gp;
+ scp->sc_fp = (int) env[0].__fp;
+ scp->sc_sp = (int) env[0].__sp;
+ scp->sc_pc = (int) env[0].__pc;
+ scp->sc_gpr[2] = retval ?: 1;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adc3f785dc461b2f5039ec92b41f954006708b01
commit adc3f785dc461b2f5039ec92b41f954006708b01
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:42:17 1997 +0000
Interrupt code for Hurd/MIPS.
diff --git a/sysdeps/mach/hurd/mips/intr-msg.h b/sysdeps/mach/hurd/mips/intr-msg.h
new file mode 100644
index 0000000..7d155f6
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/intr-msg.h
@@ -0,0 +1,127 @@
+/* Machine-dependent details of interruptible RPC messaging. Mips version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#ifdef __mips64
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \
+({ \
+ error_t err; \
+ mach_port_t __rcv_name = (rcv_name); \
+ mach_msg_timeout_t __timeout = (timeout); \
+ mach_port_t __notify = (notify); \
+ asm (".globl _hurd_intr_rpc_msg_do_trap\n" \
+ ".globl _hurd_intr_rpc_msg_in_trap\n" \
+ " move $4, %1\n" \
+ " move $5, %2\n" \
+ " move $6, %3\n" \
+ " move $7, %4\n" \
+ " move $8, %5\n" \
+ " move $9, %6\n" \
+ " move $10, %7\n" \
+ " dli $2, -25\n" \
+ "_hurd_intr_rpc_msg_do_trap: syscall\n" \
+ "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \
+ : "=r" (err) \
+ : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \
+ "r" (__rcv_name), "r" (__timeout), "r" (__notify) \
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \
+ "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \
+ err; \
+})
+#else
+#define INTR_MSG_TRAP(msg, option, send_size, rcv_size, rcv_name, timeout, notify) \
+({ \
+ error_t err; \
+ mach_port_t __rcv_name = (rcv_name); \
+ mach_msg_timeout_t __timeout = (timeout); \
+ mach_port_t __notify = (notify); \
+ asm (".globl _hurd_intr_rpc_msg_do_trap\n" \
+ ".globl _hurd_intr_rpc_msg_in_trap\n" \
+ " move $4, %1\n" \
+ " move $5, %2\n" \
+ " move $6, %3\n" \
+ " move $7, %4\n" \
+ " move $8, %5\n" \
+ " move $9, %6\n" \
+ " move $10, %7\n" \
+ " li $2, -25\n" \
+ "_hurd_intr_rpc_msg_do_trap: syscall\n" \
+ "_hurd_intr_rpc_msg_in_trap: move %0, $2\n" \
+ : "=r" (err) \
+ : "r" (msg), "r" (option), "r" (send_size), "r" (rcv_size), \
+ "r" (__rcv_name), "r" (__timeout), "r" (__notify) \
+ : "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9", "$10", \
+ "$11", "$12", "$13", "$14", "$15", "$24", "$25", "$28"); \
+ err; \
+})
+#endif
+
+static inline void
+INTR_MSG_BACK_OUT (struct mips_thread_state *state)
+{
+ return;
+}
+
+#include "hurdfault.h"
+
+static inline int
+SYSCALL_EXAMINE (struct mips_thread_state *state, int *callno)
+{
+ u_int32_t *p = (void *) (state->pc - 4);
+ int result;
+ if (_hurdsig_catch_memory_fault (p))
+ return 0;
+ if (result = (*p == 0x0000000c))
+ /* The PC is just after a `syscall' instruction.
+ This is a system call in progress; v0($2) holds the call number. */
+ *callno = state->r2;
+ _hurdsig_end_catch_fault ();
+ return result;
+}
+
+
+struct mach_msg_trap_args
+ {
+ /* This is the order of arguments to mach_msg_trap. */
+ mach_msg_header_t *msg;
+ mach_msg_option_t option;
+ mach_msg_size_t send_size;
+ mach_msg_size_t rcv_size;
+ mach_port_t rcv_name;
+ mach_msg_timeout_t timeout;
+ mach_port_t notify;
+ };
+
+
+static inline mach_port_t
+MSG_EXAMINE (struct mips_thread_state *state, int *msgid)
+{
+ mach_msg_header_t *msg;
+ mach_port_t send_port;
+
+ msg = (mach_msg_header_t *) state->r4;
+
+ if (_hurdsig_catch_memory_fault (msg))
+ return MACH_PORT_NULL;
+ send_port = msg->msgh_remote_port;
+ *msgid = msg->msgh_id;
+ _hurdsig_end_catch_fault ();
+
+ return send_port;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=304f5963db3b40ad1ac20d15bdc0329d0a163710
commit 304f5963db3b40ad1ac20d15bdc0329d0a163710
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:41:58 1997 +0000
Init code for Hurd/MIPS.
diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c
new file mode 100644
index 0000000..619ef99
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/init-fault.c
@@ -0,0 +1,41 @@
+/* Set up a thread_state for proc_handle_exceptions. MIPS version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <hurd/signal.h>
+#include <mach/thread_status.h>
+#include <string.h>
+#include <setjmp.h>
+
+extern jmp_buf _hurd_sigthread_fault_env;
+
+static char fault_stack[32];
+static volatile void
+faulted (void)
+{
+ __longjmp (_hurd_sigthread_fault_env, 1);
+}
+
+void
+_hurd_initialize_fault_recovery_state (void *state)
+{
+ struct mips_thread_state *ts = state;
+ memset (ts, 0, sizeof (*ts));
+ ts->r29 = (int) &fault_stack[sizeof (fault_stack)];
+ ts->pc = (int) &faulted;
+}
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
new file mode 100644
index 0000000..b057aeb
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -0,0 +1,407 @@
+/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <hurd.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include "hurdstartup.h"
+#include "set-hooks.h"
+#include "hurdmalloc.h" /* XXX */
+
+extern void __mach_init (void);
+extern void __libc_init (int, char **, char **);
+extern void __getopt_clean_environment (void);
+extern void __libc_global_ctors (void);
+
+unsigned int __hurd_threadvar_max;
+unsigned long int __hurd_threadvar_stack_offset;
+unsigned long int __hurd_threadvar_stack_mask;
+
+int __libc_multiple_libcs = 1;
+
+int __libc_argc;
+char **__libc_argv;
+
+/* We often need the PID. Cache this value. */
+pid_t __libc_pid;
+
+void *(*_cthread_init_routine) (void); /* Returns new SP to use. */
+void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
+
+
+/* Things that want to be run before _hurd_init or much anything else.
+ Importantly, these are called before anything tries to use malloc. */
+DEFINE_HOOK (_hurd_preinit_hook, (void));
+
+static void
+init1 (int argc, char *arg0, ...)
+{
+ char **argv = &arg0;
+ char **envp = &argv[argc + 1];
+ struct hurd_startup_data *d;
+
+ __libc_argc = argc;
+ __libc_argv = argv;
+ __environ = envp;
+ while (*envp)
+ ++envp;
+ d = (void *) ++envp;
+
+ /* If we are the bootstrap task started by the kernel,
+ then after the environment pointers there is no Hurd
+ data block; the argument strings start there. */
+ if ((void *) d != argv[0])
+ {
+ _hurd_init_dtable = d->dtable;
+ _hurd_init_dtablesize = d->dtablesize;
+
+ {
+ /* Check if the stack we are now on is different from
+ the one described by _hurd_stack_{base,size}. */
+
+ char dummy;
+ const vm_address_t newsp = (vm_address_t) &dummy;
+
+ if (d->stack_size != 0 && (newsp < d->stack_base ||
+ newsp - d->stack_base > d->stack_size))
+ /* The new stack pointer does not intersect with the
+ stack the exec server set up for us, so free that stack. */
+ __vm_deallocate (__mach_task_self (), d->stack_base, d->stack_size);
+ }
+ }
+
+ if (__hurd_threadvar_stack_mask == 0)
+ {
+ /* We are not using cthreads, so we will have just a single allocated
+ area for the per-thread variables of the main user thread. */
+ unsigned long int i;
+ __hurd_threadvar_stack_offset
+ = (unsigned long int) malloc (__hurd_threadvar_max *
+ sizeof (unsigned long int));
+ if (__hurd_threadvar_stack_offset == 0)
+ __libc_fatal ("Can't allocate single-threaded per-thread variables.");
+ for (i = 0; i < __hurd_threadvar_max; ++i)
+ ((unsigned long int *) __hurd_threadvar_stack_offset)[i] = 0;
+ }
+
+ if ((void *) d != argv[0] && (d->portarray || d->intarray))
+ /* Initialize library data structures, start signal processing, etc. */
+ _hurd_init (d->flags, argv,
+ d->portarray, d->portarraysize,
+ d->intarray, d->intarraysize);
+
+ __libc_init (argc, argv, __environ);
+
+ /* This is a hack to make the special getopt in GNU libc working. */
+ __getopt_clean_environment ();
+
+#ifdef PIC
+ __libc_global_ctors ();
+#endif
+
+ (void) &init1;
+}
+
+static void *
+__init (int *data)
+{
+ int argc = *data;
+ char **argv = (void *) (data + 1);
+ char **envp = &argv[argc + 1];
+ struct hurd_startup_data *d;
+
+ __environ = envp;
+ while (*envp)
+ ++envp;
+ d = (void *) ++envp;
+
+ /* The user might have defined a value for this, to get more variables.
+ Otherwise it will be zero on startup. We must make sure it is set
+ properly before before cthreads initialization, so cthreads can know
+ how much space to leave for thread variables. */
+ if (__hurd_threadvar_max < _HURD_THREADVAR_MAX)
+ __hurd_threadvar_max = _HURD_THREADVAR_MAX;
+
+
+ /* After possibly switching stacks, call `init1' (above) with the user
+ code as the return address, and the argument data immediately above
+ that on the stack. */
+
+ if (_cthread_init_routine)
+ {
+ /* Initialize cthreads, which will allocate us a new stack to run on. */
+ void *newsp = (*_cthread_init_routine) ();
+ struct hurd_startup_data *od;
+
+ /* Copy the argdata from the old stack to the new one. */
+ newsp = memcpy (newsp - ((char *) &d[1] - (char *) data), data,
+ (char *) d - (char *) data);
+
+ /* Set up the Hurd startup data block immediately following
+ the argument and environment pointers on the new stack. */
+ od = (newsp + ((char *) d - (char *) data));
+ if ((void *) argv[0] == d)
+ /* We were started up by the kernel with arguments on the stack.
+ There is no Hurd startup data, so zero the block. */
+ memset (od, 0, sizeof *od);
+ else
+ /* Copy the Hurd startup data block to the new stack. */
+ *od = *d;
+
+ /* Push the user code address on the top of the new stack. It will
+ be the return address for `init1'; we will jump there with NEWSP
+ as the stack pointer. */
+ return newsp;
+ }
+
+ /* The argument data is just above the stack frame we will unwind by
+ returning. */
+ return (void *) data;
+
+ (void) &__init;
+}
+
+#ifdef PIC
+/* This function is called to initialize the shared C library.
+ It is called just before the user _start code from mips/elf/start.S,
+ with the stack set up as that code gets it. */
+
+/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
+ pointer in the dynamic section based solely on that. It is convention
+ for this function to be in the `.init' section, but the symbol name is
+ the only thing that really matters!! */
+/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
+
+#if __mips64
+asm ("\
+ .section .init,\"ax\",@progbits\n\
+ .align 3\n\
+ .globl _init\n\
+ .type _init,@function\n\
+ .ent _init\n\
+_init:\n\
+ .set noreorder\n\
+ .cpload $25\n\
+ .set reorder\n\
+ dsubu $29, 8*8\n\
+ .cprestore 6*8\n\
+ sd $16, 4*8($29)\n\
+ sd $31, 5*8($29)\n\
+ jal preinit\n\
+ sd $28, 6*8($29)\n\
+ move $16, $29 # Save the old stack pointer to s0 ($16)\n\
+ daddu $4, $29, 4*8
+ jal __init\n\
+ # Restore saved registers from the old stack.\n\
+ ld $28, 6*8($16)\n\
+ ld $31, 5*8($16)\n\
+ ld $16, 4*8($16)\n\
+ move $29, $2 # set new sp to SP\n\
+call_init1:\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8($29)\n\
+ ld $7, 3*8($29)\n\
+ dla $25, init1\n\
+ jr $25\n\
+ .end _init\n\
+ .text\n\
+");
+#else
+asm ("\
+ .section .init,\"ax\",@progbits\n\
+ .align 2\n\
+ .globl _init\n\
+ .type _init,@function\n\
+ .ent _init\n\
+_init:\n\
+ .set noreorder\n\
+ .cpload $25\n\
+ .set reorder\n\
+ subu $29, 32\n\
+ .cprestore 24\n\
+ sw $16, 16($29)\n\
+ sw $31, 20($29)\n\
+ jal preinit\n\
+ sw $28, 24($29)\n\
+ move $16, $29 # Save the old stack pointer to s0 ($16)\n\
+ addu $4, $29, 32
+ jal __init\n\
+ # Restore saved registers from the old stack.\n\
+ lw $28, 24($16)\n\
+ lw $31, 20($16)\n\
+ lw $16, 16($16)\n\
+ move $29, $2 # set new sp to SP\n\
+call_init1:\n\
+ lw $4, 0($29)\n\
+ lw $5, 4($29)\n\
+ lw $6, 8($29)\n\
+ lw $7, 12($29)\n\
+ la $25, init1\n\
+ jr $25\n\
+ .end _init\n\
+ .text\n\
+");
+#endif
+
+static void
+preinit (void)
+{
+ /* Initialize data structures so we can do RPCs. */
+ __mach_init ();
+
+ RUN_HOOK (_hurd_preinit_hook, ());
+
+ (void) &preinit;
+}
+
+void __libc_init_first (int argc, ...)
+{
+}
+#endif
+
+#ifndef PIC
+/* An assembler code wrapping c function __init. */
+#ifdef __mips64
+asm ("\
+ .text\n\
+ .align 3\n\
+init:\n\
+ dsubu $29, 8*8\n\
+ sd $16, 4*8($29)\n\
+ sd $31, 5*8($29)\n\
+ move $16, $29\n\
+ jal __init\n\
+ ld $31, 5*8($16)\n\
+ ld $16, 4*8($16)\n\
+ move $29, $2 # set new sp to SP\n\
+call_init1:\n\
+ ld $4, 0($29)\n\
+ ld $5, 1*8($29)\n\
+ ld $6, 2*8($29)\n\
+ ld $7, 3*8($29)\n\
+ dla $25, init1\n\
+ jr $25\n\
+");
+#else
+asm ("\
+ .text\n\
+ .align 2\n\
+init:\n\
+ subu $29, 32\n\
+ sw $16, 16($29)\n\
+ sw $31, 20($29)\n\
+ move $16, $29\n\
+ jal __init\n\
+ lw $31, 20($16)\n\
+ lw $16, 16($16)\n\
+ move $29, $2 # set new sp to SP\n\
+call_init1:\n\
+ lw $4, 0($29)\n\
+ lw $5, 4($29)\n\
+ lw $6, 8($29)\n\
+ lw $7, 12($29)\n\
+ la $25, init1\n\
+ jr $25\n\
+");
+#endif
+
+/* An assembler code wrapping c function ___libc_init_first.
+ ___libc_init_first does an RPC call to flush cache to put doinit
+ function on the stack, so we should call __mach_init first in
+ this wrap. */
+#ifdef __mips64
+asm ("\
+ .text\n\
+ .align 3\n\
+ .globl __libc_init_first\n\
+__libc_init_first:\n\
+ dsubu $29, 8\n\
+ sd $31, 0($29)
+ jal __mach_init\n\
+ ld $4, 0($29)
+ ld $5, 1*8($29)
+ ld $6, 2*8($29)
+ ld $7, 3*8($29)
+ j ___libc_init_first\n\
+");
+#else
+asm ("\
+ .text\n\
+ .align 2\n\
+ .globl __libc_init_first\n\
+__libc_init_first:\n\
+ subu $29, 4\n\
+ sw $31, 0($29)
+ jal __mach_init\n\
+ lw $4, 0($29)
+ lw $5, 4($29)
+ lw $6, 8($29)
+ lw $7, 12($29)
+ j ___libc_init_first\n\
+");
+#endif
+
+static void
+___libc_init_first (int return_addr, int argc, ...)
+{
+ void doinit (int *data)
+ {
+#if 0
+ /* This function gets called with the argument data at TOS. */
+ void doinit1 (int argc, ...)
+ {
+ init (&argc);
+ }
+#endif
+ extern void init (int *data);
+
+ /* Push the user return address after the argument data, and then
+ jump to `doinit1' (above), so it is as if __libc_init_first's
+ caller had called `init' with the argument data already on the
+ stack. */
+ *--data = return_addr;
+
+#ifdef __mips64
+ asm volatile ("ld $31, 0(%0)\n" /* Load the original return address. */
+ "daddu $29, %0, 8\n" /* Switch to new outermost stack. */
+ "move $4, $29\n"
+ "jr %1" : : "r" (data), "r" (&init));
+#else
+ asm volatile ("lw $31, 0(%0)\n" /* Load the original return address. */
+ "addu $29, %0, 4\n" /* Switch to new outermost stack. */
+ "move $4, $29\n"
+ "jr %1" : : "r" (data), "r" (&init));
+#endif
+ /* NOTREACHED */
+ }
+
+#if 0
+ /* Initialize data structures so we can do RPCs. */
+ __mach_init ();
+#endif
+
+ RUN_HOOK (_hurd_preinit_hook, ());
+
+ _hurd_startup ((void **) &argc, &doinit);
+
+ (void) &___libc_init_first;
+}
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b836323e96b696480871374012f29f986979c1eb
commit b836323e96b696480871374012f29f986979c1eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:41:15 1997 +0000
Dynamic loader for Hurd/MIPS.
diff --git a/sysdeps/mach/hurd/mips/dl-machine.c b/sysdeps/mach/hurd/mips/dl-machine.c
new file mode 100644
index 0000000..18261e1
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/dl-machine.c
@@ -0,0 +1,131 @@
+/* Operating system support for run-time dynamic linker. MIPS specific
+ stuffs on Hurd.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <hurd.h>
+#include <link.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <assert.h>
+#include <sysdep.h>
+#include <mach/mig_support.h>
+#include "../stdio-common/_itoa.h"
+#include <stdarg.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+void weak_function
+abort (void)
+{
+ _exit (127);
+}
+
+
+#include <string.h>
+#include <mach/error.h>
+#include <errorlib.h>
+
+#undef _
+#define _(x) x
+
+/* Return a string describing the errno code in ERRNUM. */
+char * weak_function
+_strerror_internal (int errnum, char *buf, size_t buflen)
+{
+ int system;
+ int sub;
+ int code;
+ const struct error_system *es;
+ extern void __mach_error_map_compat (int *);
+
+ __mach_error_map_compat (&errnum);
+
+ system = err_get_system (errnum);
+ sub = err_get_sub (errnum);
+ code = err_get_code (errnum);
+
+ if (system > err_max_system || ! __mach_error_systems[system].bad_sub)
+ {
+ const char *unk = _("Error in unknown error system: ");
+ const size_t unklen = strlen (unk);
+ char *p = buf + buflen;
+ *--p = '\0';
+ p = _itoa (errnum, p, 16, 1);
+ return memcpy (p - unklen, unk, unklen);
+ }
+
+ es = &__mach_error_systems[system];
+
+ if (sub >= es->max_sub)
+ return (char *) es->bad_sub;
+
+ if (code >= es->subsystem[sub].max_code)
+ {
+ const char *unk = _("Unknown error ");
+ const size_t unklen = strlen (unk);
+ char *p = buf + buflen;
+ size_t len = strlen (es->subsystem[sub].subsys_name);
+ *--p = '\0';
+ p = _itoa (errnum, p, 16, 1);
+ *p-- = ' ';
+ p = memcpy (p - len, es->subsystem[sub].subsys_name, len);
+ return memcpy (p - unklen, unk, unklen);
+ }
+
+ return (char *) _(es->subsystem[sub].codes[code]);
+}
+
+/* Read the whole contents of FILE into new mmap'd space with given
+ protections. The size of the file is returned in SIZE. */
+void *
+_dl_sysdep_read_whole_file (const char *file, size_t *size, int prot)
+{
+ struct stat stat;
+ mach_port_t memobj_rd;
+ void *contents;
+ error_t err;
+
+ memobj_rd = __open (file, O_RDONLY, 0);
+ if (memobj_rd)
+ {
+ err = __io_stat ((file_t) memobj_rd, &stat);
+ if (err)
+ {
+ __hurd_fail (err);
+ contents = 0;
+ }
+ else
+ {
+ /* Map a copy of the file contents. */
+ contents = __mmap (0, stat.st_size, prot, MAP_COPY, memobj_rd, 0);
+ if (contents == (void *)-1)
+ contents = 0;
+ else
+ *size = stat.st_size;
+ }
+
+ __mach_port_deallocate (__mach_task_self (), memobj_rd);
+ }
+ else
+ contents = 0;
+
+ return contents;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=405916ef4b982504fd1e32895bb85a7e914cffaa
commit 405916ef4b982504fd1e32895bb85a7e914cffaa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:37:20 1997 +0000
<foo.h> -> <bits/foo.h>.
diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S
index cf5ae09..32b0688 100644
--- a/sysdeps/alpha/w_sqrt.S
+++ b/sysdeps/alpha/w_sqrt.S
@@ -25,7 +25,7 @@
#ifndef _IEEE_FP
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
#include <sysdep.h>
.set noreorder
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 5443761..b027103 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ASM
-#include <jmp_buf.h>
+#include <bits/setjmp.h>
/* __longjmp(jmpbuf, val) */
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 5891cb9..8f99e4f 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
#define _ASM
-#include <jmp_buf.h>
+#include <bits/setjmp.h>
/* Binary compatibility entry point. */
ENTRY (__setjmp)
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 7ef1a5f..2d92937 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include <unistd.h>
-#include <stdio_lim.h>
+#include <bits/stdio_lim.h>
#include "filedesc.h"
/* Close the file descriptor FD. */
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
index bf3b6a9..e4b8d65 100644
--- a/sysdeps/standalone/filedesc.h
+++ b/sysdeps/standalone/filedesc.h
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
#ifndef __FILEDESC_h
#define __FILEDESC_h
-#include <stdio_lim.h>
+#include <bits/stdio_lim.h>
#ifndef __DECLARE_FILE_DESCRIPTORS__
#define FILEDESC_EXTERN extern
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index 87097d9..b61b729 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
#include <stddef.h>
#include <stdio.h>
-#include <stdio_lim.h>
+#include <bits/stdio_lim.h>
#include <unistd.h>
#define __DECLARE_FILE_DESCRIPTORS__
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index cef8990..1be2d5a 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
.globl syscall_error
syscall_error:
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index 6dc3e4e..7284619 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -22,7 +22,7 @@
#define _SYS_MMAN_H 1
#include <features.h>
-#include <gnu/types.h>
+#include <bits/types.h>
#define __need_size_t
#include <stddef.h>
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index 2d3c8fe..989bf21 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -22,7 +22,7 @@
#define _SYS_MMAN_H 1
#include <features.h>
-#include <gnu/types.h>
+#include <bits/types.h>
#define __need_size_t
#include <stddef.h>
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index 618d889..b5b76aa 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
.globl _errno
.globl syscall_error
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index f17ba44..1791801 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
/* .globl errno */
.set noreorder
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index 9ceca1f..f42a9f6 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -22,7 +22,7 @@
#define _SYS_MMAN_H 1
#include <features.h>
-#include <gnu/types.h>
+#include <bits/types.h>
#define __need_size_t
#include <stddef.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index be0539b..6f99493 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -23,7 +23,7 @@
#include <sysdep.h>
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
#ifdef PIC
.section .bss
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index aab4e59..3f097fe 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -22,7 +22,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
-#include <errnos.h>
+#include <bits/errno.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
index c7e7aed..8125ebf 100644
--- a/sysdeps/unix/sysv/linux/arm/clone.S
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -21,7 +21,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
-#include <errnos.h>
+#include <bits/errno.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index ef9716d..d553ab7 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -21,7 +21,7 @@
#include <sysdep.h>
#define _ERRNO_H 1
-#include <errnos.h>
+#include <bits/errno.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 631e5e9..44c89f2 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#include <confname.h>
+#include <bits/confname.h>
.globl __tzname_max
ENTRY (__sysconf)
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index 1e0cd69..ad262e2 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
#ifndef _ERRNO_H
#define _ERRNO_H
#endif
-#include <errnos.h>
+#include <bits/errno.h>
#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index da3cd6b..edefad0 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
#define _ERRNO_H
-#include <errnos.h>
+#include <bits/errno.h>
ENTRY(syscall_error)
/* If it was a syscall that got interrupted, but can
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdad844df43f564aff967e43a3c963b8ac241b1f
commit fdad844df43f564aff967e43a3c963b8ac241b1f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jun 21 01:13:01 1997 +0000
Get sigcontext via <signal.h> instead.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
index a915da7..802cbd5 100644
--- a/sysdeps/unix/sysv/linux/arm/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -17,7 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <sigcontext.h>
+#include <signal.h>
void
profil_counter (int signo, struct sigcontext sc)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=980b25cae473ba2bcf352ff053f6e8e9d4f50665
commit 980b25cae473ba2bcf352ff053f6e8e9d4f50665
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:09:33 1997 +0000
Describe Linux/ARM specific extra files.
diff --git a/sysdeps/unix/sysv/linux/arm/Dist b/sysdeps/unix/sysv/linux/arm/Dist
new file mode 100644
index 0000000..738b9cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/Dist
@@ -0,0 +1 @@
+clone.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0dab1d3494ebb5736752e3f51d1e8f602fa52565
commit 0dab1d3494ebb5736752e3f51d1e8f602fa52565
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:05:14 1997 +0000
Remove FIXME and special case for quotient.
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c
index 3682ba7..0332ecc 100644
--- a/sysdeps/m68k/fpu/s_remquo.c
+++ b/sysdeps/m68k/fpu/s_remquo.c
@@ -37,18 +37,9 @@ s(__remquo) (float_type x, float_type y, int *quo)
float_type result;
int cquo, fpsr;
- /* FIXME: Which of frem and fmod is correct? */
-#if 1
__asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1"
: "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x));
cquo = (fpsr >> 16) & 0x7f;
- if ((result > 0) != (x > 0))
- cquo--;
-#else
- __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
- : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x));
- cquo = (fpsr >> 16) & 0x7f;
-#endif
if (fpsr & (1 << 23))
cquo = -cquo;
*quo = cquo;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3baa80ed703280692c04d489cf6f6af11558312
commit a3baa80ed703280692c04d489cf6f6af11558312
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:04:58 1997 +0000
Renamed to s_llrint.
diff --git a/sysdeps/m68k/fpu/s_rinttoll.c b/sysdeps/m68k/fpu/s_rinttoll.c
deleted file mode 100644
index bad8082..0000000
--- a/sysdeps/m68k/fpu/s_rinttoll.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Round argument to nearest integral value according to current rounding
- direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define __LIBC_M81_MATH_INLINES
-#include <math.h>
-#include "math_private.h"
-
-long long int
-__rinttoll (long double x)
-{
- int32_t se, sx;
- u_int32_t h, l;
- long long int result;
-
- x = __m81_u(__rintl) (x);
-
- /* We could use __fixxfdi from libgcc, but here we can take advantage of
- the known floating point format. */
- GET_LDOUBLE_WORDS (se, h, l, x);
-
- sx = se & (1 << 15);
- se = (se ^ sx) - 0x3fff;
-
- if (se < 64)
- {
- if (se > 31)
- result = (((long long int) (h >> (63 - se)) << 32)
- | (l >> (63 - se)) | (h << (se - 31)));
- else
- result = h >> (31 - se);
- if (sx)
- result = -result;
- }
- else
- /* Too large. The number is either +-inf or NaN or it is too
- large to be effected by rounding. The standard leaves it
- undefined what to return when the number is too large to fit in
- a `long long int'. */
- result = -1LL;
-
- return result;
-}
-
-weak_alias (__rinttoll, rinttoll)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b09d8d6fc8b13ee9edd38eea1859c7e6ffb0a9ef
commit b09d8d6fc8b13ee9edd38eea1859c7e6ffb0a9ef
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:04:54 1997 +0000
Renamed to lrint.
diff --git a/sysdeps/m68k/fpu/s_rinttol.c b/sysdeps/m68k/fpu/s_rinttol.c
deleted file mode 100644
index 7476d78..0000000
--- a/sysdeps/m68k/fpu/s_rinttol.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Round argument to nearest integral value according to current rounding
- direction.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define __LIBC_M81_MATH_INLINES
-#include <math.h>
-
-long int
-__rinttol (long double x)
-{
- return __m81_u(__rinttol) (x);
-}
-
-weak_alias (__rinttol, rinttol)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd945ccbb427eb64ad22fec98c68d5b9522054f9
commit fd945ccbb427eb64ad22fec98c68d5b9522054f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:04:45 1997 +0000
Implementation of m68k specific lrint function.
diff --git a/sysdeps/m68k/fpu/s_lrint.c b/sysdeps/m68k/fpu/s_lrint.c
new file mode 100644
index 0000000..a704411
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_lrint.c
@@ -0,0 +1,31 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+long int
+__lrint (long double x)
+{
+ return __m81_u(__lrint) (x);
+}
+
+weak_alias (__lrint, lrint)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f6db749348086451994ce50a6505f7bb91a0643
commit 3f6db749348086451994ce50a6505f7bb91a0643
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:04:35 1997 +0000
Implementation of m68k specific llrint function.
diff --git a/sysdeps/m68k/fpu/s_llrint.c b/sysdeps/m68k/fpu/s_llrint.c
new file mode 100644
index 0000000..f5d0d51
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_llrint.c
@@ -0,0 +1,62 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+long long int
+__llrint (long double x)
+{
+ int32_t se, sx;
+ u_int32_t h, l;
+ long long int result;
+
+ x = __m81_u(__rintl) (x);
+
+ /* We could use __fixxfdi from libgcc, but here we can take advantage of
+ the known floating point format. */
+ GET_LDOUBLE_WORDS (se, h, l, x);
+
+ sx = se & (1 << 15);
+ se = (se ^ sx) - 0x3fff;
+
+ if (se < 64)
+ {
+ if (se > 31)
+ result = (((long long int) (h >> (63 - se)) << 32)
+ | (l >> (63 - se)) | (h << (se - 31)));
+ else
+ result = h >> (31 - se);
+ if (sx)
+ result = -result;
+ }
+ else
+ /* Too large. The number is either +-inf or NaN or it is too
+ large to be effected by rounding. The standard leaves it
+ undefined what to return when the number is too large to fit in
+ a `long long int'. */
+ result = -1LL;
+
+ return result;
+}
+
+weak_alias (__llrint, llrint)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44d86bcbfbcf395253871de0ed3ad580a05021f6
commit 44d86bcbfbcf395253871de0ed3ad580a05021f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 19 19:03:16 1997 +0000
Rename __rinttol to __lrint and rinttol to lrint.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index fd90a2d..bdeaa9e 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -309,7 +309,7 @@ __inline_functions (float,f)
__inline_functions (long double,l)
#undef __inline_functions
-__m81_defun (long int, __rinttol, (long double __x))
+__m81_defun (long int, __lrint, (long double __x))
{
long int __result;
__asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
@@ -391,7 +391,7 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
-__inline_forward_c(long int,rinttol, (long double __value), (__value))
+__inline_forward_c(long int,lrint, (long double __value), (__value))
#endif
#ifdef __USE_GNU
__inline_forward(void,sincosl,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b357c75c05154cdc7092ebafb30c7dcdd7b93286
commit b357c75c05154cdc7092ebafb30c7dcdd7b93286
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 12 21:24:27 1997 +0000
ARM/Linux dependent assembler and low-level definitions.
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.S b/sysdeps/unix/sysv/linux/arm/sysdep.S
new file mode 100644
index 0000000..a71181c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.S
@@ -0,0 +1,51 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* We define errno here, to be consistent with Linux/i386. */
+ .bss
+ .globl errno
+ .type errno,@object
+ .size errno,4
+errno: .zero 4
+ .globl _errno
+ .type _errno,@object
+_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
+ .text
+
+/* The following code is only used in the shared library when we
+ compile the reentrant version. Otherwise each system call defines
+ each own version. */
+
+#ifndef PIC
+
+/* The syscall stubs jump here when they detect an error.
+ The code for Linux is almost identical to the canonical Unix/i386
+ code, except that the error number in %eax is negated. */
+
+#undef CALL_MCOUNT
+#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */
+
+ENTRY (__syscall_error)
+ mvn r0, r0
+
+#define __syscall_error __syscall_error_1
+#include <sysdeps/unix/arm/sysdep.S>
+
+#endif /* !PIC */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7eff60903d26fe03739084f8f3baa816089f6d66
commit 7eff60903d26fe03739084f8f3baa816089f6d66
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 12 21:23:19 1997 +0000
ARM dependent assembler and low-level definitions.
diff --git a/sysdeps/unix/arm/sysdep.S b/sysdeps/unix/arm/sysdep.S
new file mode 100644
index 0000000..5d3ad55
--- /dev/null
+++ b/sysdeps/unix/arm/sysdep.S
@@ -0,0 +1,49 @@
+/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+.globl C_SYMBOL_NAME(errno)
+.globl syscall_error
+
+_errno_loc: .long C_SYMBOL_NAME(errno)
+
+#undef syscall_error
+#ifdef NO_UNDERSCORES
+__syscall_error:
+#else
+syscall_error:
+#endif
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ cmp r0, $EWOULDBLOCK_sys /* Is it the old EWOULDBLOCK? */
+ moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
+#endif
+#ifndef PIC
+ ldr r1, _errno_loc
+ str r0, [r1]
+#endif
+ mvn r0, $0
+ RETINSTR(mov, pc, r14)
+
+#undef __syscall_error
+END (__syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57771f202539444fcb51765443537c8d6c36a436
commit 57771f202539444fcb51765443537c8d6c36a436
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jun 12 21:22:18 1997 +0000
brk implementation for ARM.
diff --git a/sysdeps/unix/arm/brk.S b/sysdeps/unix/arm/brk.S
new file mode 100644
index 0000000..a801674
--- /dev/null
+++ b/sysdeps/unix/arm/brk.S
@@ -0,0 +1,43 @@
+/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+.data
+.globl C_SYMBOL_NAME(__curbrk)
+C_LABEL(__curbrk)
+#ifdef HAVE_GNU_LD
+ .long C_SYMBOL_NAME(_end)
+#else
+ .long C_SYMBOL_NAME(end)
+#endif
+
+.text
+SYSCALL__ (brk, 1)
+ ldr r1, _cb_addr
+ str r0, [r1]
+ mov r0, $0
+ RETINSTR(mov, pc, r14)
+_cb_addr: .long C_SYMBOL_NAME(__curbrk)
+
+
+weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d981488053a0093d9abee25b76f7484d4d0b4bed
commit d981488053a0093d9abee25b76f7484d4d0b4bed
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 4 19:05:17 1997 +0000
Do it right so that gcc doesn't optimize out the operations.
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
index b6ff827..51411dd 100644
--- a/sysdeps/m68k/fpu/fraiseexcpt.c
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -34,9 +34,8 @@ feraiseexcept (int excepts)
if (excepts & FE_INVALID)
{
/* One example of a invalid operation is 0 * Infinity. */
- double d = 0.0 * HUGE_VAL;
- /* Now force the exception. */
- __asm__ __volatile__ ("fnop" : : "f" (d));
+ double d = HUGE_VAL;
+ __asm__ __volatile__ ("fmul%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d));
}
/* Next: division by zero. */
@@ -49,26 +48,21 @@ feraiseexcept (int excepts)
/* Next: overflow. */
if (excepts & FE_OVERFLOW)
{
- long double d = LDBL_MAX * LDBL_MAX;
- /* Now force the exception. */
- __asm__ __volatile__ ("fnop" : : "f" (d));
+ long double d = LDBL_MAX;
+ __asm__ __volatile__ ("fmul%.x %0,%0; fnop" : "=f" (d) : "0" (d));
}
/* Next: underflow. */
if (excepts & FE_UNDERFLOW)
{
- long double d = LDBL_MIN / 16.0;
- /* Now force the exception. */
- __asm__ __volatile__ ("fnop" : : "f" (d));
+ long double d = LDBL_MIN;
+ __asm__ __volatile__ ("fdiv%.s %#0r16,%0; fnop" : "=f" (d) : "0" (d));
}
/* Last: inexact. */
if (excepts & FE_INEXACT)
{
- long double d1, d2 = 1.0;
- __asm__ __volatile__ ("fmovecr %#0,%0\n\t"
- "fdiv%.x %1,%0\n\t"
- "fnop"
- : "=&f" (d1) : "f" (d2));
+ long double d = 1.0;
+ __asm__ __volatile__ ("fdiv%.s %#0r3,%0; fnop" : "=f" (d) : "0" (d));
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c81b73ad0edaf89d659f53a3ac5ac3f7ab0d1f0b
commit c81b73ad0edaf89d659f53a3ac5ac3f7ab0d1f0b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 4 19:05:10 1997 +0000
(isgreater, isgreaterequal, isless, islessequal, islessgreater,
isunordered): Fix assembler syntax.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 5dc4d2e..fd90a2d 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -414,7 +414,7 @@ __inline_forward(void,sincosl,
#define isgreater(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsogt %0" \
+ __asm__ ("fcmp%.x %2,%1; fsogt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
@@ -422,7 +422,7 @@ __inline_forward(void,sincosl,
#define isgreaterequal(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsoge %0" \
+ __asm__ ("fcmp%.x %2,%1; fsoge %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
@@ -430,7 +430,7 @@ __inline_forward(void,sincosl,
#define isless(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsolt %0" \
+ __asm__ ("fcmp%.x %2,%1; fsolt %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
@@ -438,7 +438,7 @@ __inline_forward(void,sincosl,
#define islessequal(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsole %0" \
+ __asm__ ("fcmp%.x %2,%1; fsole %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
@@ -446,7 +446,7 @@ __inline_forward(void,sincosl,
#define islessgreater(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsogl %0" \
+ __asm__ ("fcmp%.x %2,%1; fsogl %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
@@ -454,7 +454,7 @@ __inline_forward(void,sincosl,
#define isunordered(x, y) \
__extension__ \
({ char __result; \
- __asm__ ("fcmp %2,%1; fsun %0" \
+ __asm__ ("fcmp%.x %2,%1; fsun %0" \
: "=dm" (__result) : "f" (x), "f" (y)); \
(int) __result; })
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05a8f8e8c7f3ba9a98c6ac9c0823fa144e79d07e
commit 05a8f8e8c7f3ba9a98c6ac9c0823fa144e79d07e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 4 19:05:00 1997 +0000
m68k specific NaN value definitions.
diff --git a/sysdeps/m68k/nan.h b/sysdeps/m68k/nan.h
new file mode 100644
index 0000000..b4efddf
--- /dev/null
+++ b/sysdeps/m68k/nan.h
@@ -0,0 +1,59 @@
+/* `NAN' constants for m68k.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _NAN_H
+
+#define _NAN_H 1
+
+/* IEEE Not A Number. */
+
+#ifdef __GNUC__
+
+#define NAN \
+ (__extension__ \
+ ((union { unsigned long long __l; double __d; }) \
+ { __l: 0x7fffffffffffffffULL }).__d)
+
+#define NANF \
+ (__extension__ \
+ ((union { unsigned long __l; float __f; }) \
+ { __l: 0x7fffffffUL }).__f)
+
+#define NANL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0xffffffffUL, 0xffffffffUL } }).__ld)
+
+#else
+
+static union { unsigned char __c[8]; double __d; } __nan =
+ { { 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
+#define NAN (__nan.__d)
+
+static union { unsigned char __c[4]; float __f; } __nanf =
+ { { 0x7f, 0xff, 0xff, 0xff } };
+#define NANF (__nanf.__f)
+
+static union { unsigned char __c[12]; long double __ld; } __nanl =
+ { { 0x7f, 0xff, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
+#define NANL (__nanl.__ld)
+
+#endif /* GCC. */
+
+#endif /* nan.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d901ee0d08f38a6285eb2642c7df156a03b16072
commit d901ee0d08f38a6285eb2642c7df156a03b16072
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jun 4 19:04:28 1997 +0000
Change GCC's HUGE_VAL{,F,L} to use DI and SI mode integers instead of
bytes. Fix value of HUGE_VALL.
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index 8d45aae..c71454e 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -26,15 +26,19 @@
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-
-#define __huge_val_t union { unsigned char __c[8]; double __d; }
#ifdef __GNUC__
-#define HUGE_VAL (__extension__ \
- ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
-#else /* Not GCC. */
-static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+
+#define HUGE_VAL \
+ (__extension__ \
+ ((union { unsigned long long __l; double __d; }) \
+ { __l: 0x7ff0000000000000ULL }).__d)
+
+#else /* not GCC */
+
+static union { unsigned char __c[8]; double __d; } __huge_val =
+ { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };
#define HUGE_VAL (__huge_val.__d)
+
#endif /* GCC. */
@@ -42,27 +46,28 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#ifdef __USE_ISOC9X
-#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
+#ifdef __GNUC__
-#define __huge_valf_t union { unsigned char __c[4]; float __f; }
-#ifdef __GNUC__
-#define HUGE_VALF (__extension__ \
- ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
-#else /* Not GCC. */
-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-#define HUGE_VALF (__huge_valf.__f)
-#endif /* GCC. */
+#define HUGE_VALF \
+ (__extension__ \
+ ((union { unsigned long __l; float __f; }) \
+ { __l: 0x7f800000UL }).__f)
+#define HUGE_VALL \
+ (__extension__ \
+ ((union { unsigned long __l[3]; long double __ld; }) \
+ { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
-#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+#else /* not GCC */
-#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
-#ifdef __GNUC__
-#define HUGE_VALL (__extension__ \
- ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-#else /* Not GCC. */
-static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+static union { unsigned char __c[4]; float __f; } __huge_valf =
+ { { 0x7f, 0x80, 0, 0 } };
+#define HUGE_VALF (__huge_valf.__f)
+
+static union { unsigned char __c[12]; long double __ld; } __huge_vall =
+ { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
#define HUGE_VALL (__huge_vall.__ld)
+
#endif /* GCC. */
#endif /* __USE_ISOC9X. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68b8d6f1fd0a0a8227c556b9bea19e2dd1efa30d
commit 68b8d6f1fd0a0a8227c556b9bea19e2dd1efa30d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jun 1 10:48:17 1997 +0000
(__fd_mask): Change type to `unsigned long int'.
diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
index b23deb8..2af77f7 100644
--- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
@@ -66,7 +66,7 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */
typedef long int __clock_t;
/* One element in the file descriptor mask array. */
-typedef unsigned int __fd_mask;
+typedef unsigned long int __fd_mask;
/* Due to incaution, we may have gotten these from a kernel header file. */
#undef __FD_SETSIZE
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef490e68e82883fc6b0c2994a11cb88b74a130c3
commit ef490e68e82883fc6b0c2994a11cb88b74a130c3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:46:33 1997 +0000
Undef some bits we may have gotten from <linux/posix_types.h>.
diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
index 5c1e407..b23deb8 100644
--- a/sysdeps/unix/sysv/linux/alpha/gnu/types.h
+++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
@@ -68,6 +68,11 @@ typedef long int __clock_t;
/* One element in the file descriptor mask array. */
typedef unsigned int __fd_mask;
+/* Due to incaution, we may have gotten these from a kernel header file. */
+#undef __FD_SETSIZE
+#undef __NFDBITS
+#undef __FDMASK
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3acff87e5b4108a00f605f3d37edef3f7b37b976
commit 3acff87e5b4108a00f605f3d37edef3f7b37b976
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:46:24 1997 +0000
Tiny cleanups.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 9df3134..fc5cc04 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -38,7 +38,7 @@ __errno = errno
.globl __syscall_error
.ent __syscall_error
__syscall_error:
- ldgp gp, 0(t12)
+ ldgp gp, 0(pv)
lda sp, -16(sp)
.frame sp, 16, ra, 0
stq ra, 0(sp)
@@ -53,7 +53,7 @@ __syscall_error:
jsr ra, __errno_location
/* Store the error value. */
- ldl t0, 8(sp)
+ ldq t0, 8(sp)
stl t0, 0(v0)
/* And kick back a -1. */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 75e1260..d25dd6b 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -62,10 +62,10 @@ LEAF(__syscall, 0)
mov a5, a4
call_pal PAL_callsys /* Invoke system call */
- bne a3, error
+ bne a3, $error
ret
-error:
+$error:
#ifndef PROF
br gp, 2f
2: ldgp gp, 0(gp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f97d5b5f4d76185f5ff52f29bab086c234492128
commit f97d5b5f4d76185f5ff52f29bab086c234492128
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:46:15 1997 +0000
Add copyright.
(rdfpcr): Use excb rather than trapb. Be more efficient about
getting at the fpcr.
(wrfpcr): Likewise.
(__setfpucw): Reformat.
diff --git a/sysdeps/alpha/fpu/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
index 219ea55..bcf73e8 100644
--- a/sysdeps/alpha/fpu/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -1,23 +1,22 @@
-/* FPU control word bits. Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-Contributed by Olaf Flebbe.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* FPU control word bits. Alpha-maped-to-Intel version.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Olaf Flebbe.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _ALPHA_FPU_CONTROL_H
#define _ALPHA_FPU_CONTROL_H
@@ -91,11 +90,12 @@ Cambridge, MA 02139, USA. */
qualifier. By setting the dynamic rounding mode to +infinity,
one can use /d to get round to +infinity with no extra overhead
(so long as the default isn't changed, of course...)
- - exceptions on overflow, zero divide and NaN */
-#define _FPU_DEFAULT 0x1f72
+ - no exceptions enabled. */
+
+#define _FPU_DEFAULT 0x137f
/* IEEE: same as above, but exceptions */
-#define _FPU_IEEE 0x1f7f
+#define _FPU_IEEE 0x137f
/* Type of the control word. */
typedef unsigned int fpu_control_t;
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index 43e8536..9133c81 100644
--- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,65 +1,78 @@
-#include <fpu_control.h>
+/* Set FP exception mask and rounding mode.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+#include <fpu_control.h>
#include <asm/fpu.h>
+
extern void __ieee_set_fp_control (unsigned long);
extern unsigned long __ieee_get_fp_control (void);
-
static inline unsigned long
rdfpcr (void)
{
- unsigned long fpcr;
-
- asm ("trapb; mf_fpcr $f0; trapb; stt $f0,%0" : "m="(fpcr));
- return fpcr;
+ unsigned long fpcr;
+ asm ("excb; mf_fpcr %0" : "=f"(fpcr));
+ return fpcr;
}
static inline void
wrfpcr (unsigned long fpcr)
{
- asm volatile ("ldt $f0,%0; trapb; mt_fpcr $f0; trapb" :: "m"(fpcr));
+ asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr));
}
void
__setfpucw (unsigned short fpu_control)
{
- unsigned long fpcr = 0, fpcw = 0;
+ unsigned long fpcr = 0, fpcw = 0;
- if (!fpu_control)
- fpu_control = _FPU_DEFAULT;
+ if (!fpu_control)
+ fpu_control = _FPU_DEFAULT;
- /* first, set dynamic rounding mode: */
+ /* first, set dynamic rounding mode: */
- fpcr = rdfpcr();
- fpcr &= ~FPCR_DYN_MASK;
- switch (fpu_control & 0xc00) {
- case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break;
- case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break;
- case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break;
- case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break;
+ fpcr = rdfpcr();
+ fpcr &= ~FPCR_DYN_MASK;
+ switch (fpu_control & 0xc00)
+ {
+ case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break;
+ case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break;
+ case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break;
+ case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break;
}
- wrfpcr(fpcr);
+ wrfpcr(fpcr);
- /* now tell kernel about traps that we like to hear about: */
+ /* now tell kernel about traps that we like to hear about: */
- fpcw = __ieee_get_fp_control();
- fpcw &= ~IEEE_TRAP_ENABLE_MASK;
+ fpcw = __ieee_get_fp_control();
+ fpcw &= ~IEEE_TRAP_ENABLE_MASK;
- if (!(fpu_control & _FPU_MASK_IM))
- fpcw |= IEEE_TRAP_ENABLE_INV;
- if (!(fpu_control & _FPU_MASK_DM))
- fpcw |= IEEE_TRAP_ENABLE_UNF;
- if (!(fpu_control & _FPU_MASK_ZM))
- fpcw |= IEEE_TRAP_ENABLE_DZE;
- if (!(fpu_control & _FPU_MASK_OM))
- fpcw |= IEEE_TRAP_ENABLE_OVF;
- if (!(fpu_control & _FPU_MASK_PM))
- fpcw |= IEEE_TRAP_ENABLE_INE;
+ if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV;
+ if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF;
+ if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE;
+ if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF;
+ if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE;
- __ieee_set_fp_control(fpcw);
+ __fpu_control = fpu_control; /* update global copy */
- __fpu_control = fpu_control; /* update global copy */
+ __ieee_set_fp_control(fpcw);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2521516d3098f8f536b4833e8c8e4fc13492dfe8
commit 2521516d3098f8f536b4833e8c8e4fc13492dfe8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:46:01 1997 +0000
Add definition for Miata.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 63bf175..76a744d 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -55,14 +55,13 @@
#define JENSEN_IO_BASE (0xfffffc0300000000UL)
#define JENSEN_SPARSE_MEM (0xfffffc0200000000UL)
-/*
- * With respect to the I/O architecture, APECS and LCA are identical,
- * so the following defines apply to LCA as well.
- */
+/* With respect to the I/O architecture, APECS and LCA are identical,
+ so the following defines apply to LCA as well. */
#define APECS_IO_BASE (0xfffffc01c0000000UL)
#define APECS_SPARSE_MEM (0xfffffc0200000000UL)
#define APECS_DENSE_MEM (0xfffffc0300000000UL)
+/* The same holds for CIA and PYXIS. */
#define CIA_IO_BASE (0xfffffc8580000000UL)
#define CIA_SPARSE_MEM (0xfffffc8000000000UL)
#define CIA_DENSE_MEM (0xfffffc8600000000UL)
@@ -104,6 +103,7 @@ static struct platform {
{"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM},
+ {"Miata", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9aa1421fe000276c53fb5826f27f417b5e141b5d
commit 9aa1421fe000276c53fb5826f27f417b5e141b5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:45:54 1997 +0000
Don't use jmp macro to make sure the stack frame is released the very
instruction before the real jump out.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 74fef64..be0539b 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -73,8 +73,9 @@ $ok: stq a0, __curbrk
/* What a horrible way to die. */
$err0: ldi v0, ENOMEM
-$err1: addq sp, 8, sp
- jmp zero, __syscall_error
+$err1: lda pv, __syscall_error
+ addq sp, 8, sp
+ jmp zero, (pv), __syscall_error
END(__brk)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index dbc25bc..e118ff1 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -41,18 +41,20 @@ LEAF(__ieee_get_fp_control, 16)
ldi a0, GSI_IEEE_FP_CONTROL
ldi v0, __NR_osf_getsysinfo
call_pal PAL_callsys
- bne a3, error
+ bne a3, $error
ldq v0, 0(sp)
lda sp, 16(sp)
ret
-error: lda sp, 16(sp)
+$error:
#ifndef PROF
br gp, 1f
1: ldgp gp, 0(gp)
#endif
- jmp zero, __syscall_error
+ lda pv, __syscall_error
+ lda sp, 16(sp)
+ jmp zero, (pv), __syscall_error
END(__ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index d2d2add..b38d67e 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -41,17 +41,19 @@ LEAF(__ieee_set_fp_control, 16)
ldi v0, __NR_osf_setsysinfo
call_pal PAL_callsys
- lda sp, 16(sp)
+ bne a3, $error
- bne a3, error
+ lda sp, 16(sp)
ret
-error:
+$error:
#ifndef PROF
br gp, 1f
1: ldgp gp, 0(gp)
#endif
- jmp zero, __syscall_error
+ lda pv, __syscall_error
+ lda sp, 16(sp)
+ jmp zero, (pv), __syscall_error
END(__ieee_set_fp_control)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91650f79e3de41c27dde1a62ab7157f697fab75f
commit 91650f79e3de41c27dde1a62ab7157f697fab75f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:43:46 1997 +0000
Math exception and environment handling.
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
new file mode 100644
index 0000000..7aa79af
--- /dev/null
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -0,0 +1,36 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feclearexcept (int excepts)
+{
+ unsigned long swcr;
+
+ /* Get the current state. */
+ swcr = __ieee_get_fp_control();
+
+ /* Clear the relevant bits. */
+ swcr &= ~((unsigned long)excepts & FE_ALL_EXCEPT);
+
+ /* Put the new state in effect. */
+ __ieee_set_fp_control(swcr);
+}
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
new file mode 100644
index 0000000..c8b705d
--- /dev/null
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -0,0 +1,37 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ unsigned long fpcr, swcr;
+
+ /* Get status from software and hardware. Note that we don't need an
+ excb because the callsys is an implied trap barrier. */
+ swcr = __ieee_get_fp_control();
+ __asm__ __volatile__("mf_fpcr %0" : "=f"(fpcr));
+
+ /* Merge the two bits of information. The magic number at the end is
+ the exception enable mask. */
+
+ *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e));
+}
diff --git a/sysdeps/alpha/fpu/fegetround.c b/sysdeps/alpha/fpu/fegetround.c
new file mode 100644
index 0000000..623e2ce
--- /dev/null
+++ b/sysdeps/alpha/fpu/fegetround.c
@@ -0,0 +1,31 @@
+/* Return current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ unsigned long fpcr;
+
+ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+
+ return (fpcr >> 58) & 3;
+}
diff --git a/sysdeps/alpha/fpu/feholdexcpt.c b/sysdeps/alpha/fpu/feholdexcpt.c
new file mode 100644
index 0000000..493d6a1
--- /dev/null
+++ b/sysdeps/alpha/fpu/feholdexcpt.c
@@ -0,0 +1,33 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ /* Save the current state. */
+ fegetenv(envp);
+
+ /* Clear all exception status bits and exception enable bits. */
+ __ieee_set_fp_control(0);
+
+ return 1;
+}
diff --git a/sysdeps/alpha/fpu/fenvbits.h b/sysdeps/alpha/fpu/fenvbits.h
new file mode 100644
index 0000000..02414e4
--- /dev/null
+++ b/sysdeps/alpha/fpu/fenvbits.h
@@ -0,0 +1,107 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file should never be included directly. */
+
+#ifndef _FENVBITS_H
+#define _FENVBITS_H 1
+
+/* Define the bits representing the exception.
+
+ Note that these are the bit positions as defined by the OSF/1
+ ieee_{get,set}_control_word interface and not by the hardware fpcr.
+
+ See the Alpha Architecture Handbook section 4.7.7.3 for details,
+ but in summary, trap shadows mean the hardware register can acquire
+ extra exception bits so for proper IEEE support the tracking has to
+ be done in software -- in this case with kernel support.
+
+ As to why the system call interface isn't in the same format as
+ the hardware register, only those crazy folks at DEC can tell you. */
+
+enum
+ {
+ FE_INEXACT = 1UL << 21,
+#define FE_INEXACT FE_INEXACT
+
+ FE_UNDERFLOW = 1UL << 20,
+#define FE_UNDERFLOW FE_UNDERFLOW
+
+ FE_OVERFLOW = 1UL << 19,
+#define FE_OVERFLOW FE_OVERFLOW
+
+ FE_DIVBYZERO = 1UL << 18,
+#define FE_DIVBYZERO FE_DIVBYZERO
+
+ FE_INVALID = 1UL << 17,
+#define FE_INVALID FE_INVALID
+
+ FE_ALL_EXCEPT =
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+#define FE_ALL_EXCEPT FE_ALL_EXCEPT
+ };
+
+
+/* Alpha chips support all four defined rouding modes.
+
+ Note that code must be compiled to use dynamic rounding (/d) instructions
+ to see these changes. For gcc this is -mfp-rounding-mode=d; for DEC cc
+ this is -fprm d. The default for both is static rounding to nearest.
+
+ These are shifted down 58 bits from the hardware fpcr because the
+ functions are declared to take integers. */
+
+enum
+ {
+ FE_TOWARDSZERO = 0,
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+
+ FE_DOWNWARD = 1,
+#define FE_DOWNWARD FE_DOWNWARD
+
+ FE_TONEAREST = 2,
+#define FE_TONEAREST FE_TONEAREST
+
+ FE_UPWARD = 3,
+#define FE_UPWARD FE_UPWARD
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned long fexcept_t;
+
+/* Type representing floating-point environment. */
+typedef unsigned long fenv_t;
+
+/* If the default argument is used we use this value. Note that due to
+ architecture-specified page mappings, no user-space pointer will ever
+ have its two high bits set. Co-opt one. */
+#define FE_DFL_ENV ((fenv_t *) 0x8800000000000000UL)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((fenv_t *) 0x880000000000003eUL)
+#endif
+
+/* The system calls to talk to the kernel's FP code. */
+extern unsigned long __ieee_get_fp_control(void);
+extern void __ieee_set_fp_control(unsigned long);
+
+
+#endif /* fenvbits.h */
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
new file mode 100644
index 0000000..3692967
--- /dev/null
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -0,0 +1,45 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+ unsigned long fpcr;
+ fenv_t env;
+
+ /* Magic encoding of default values: high bit set (never possible for a
+ user-space address) is not indirect. And we don't even have to get
+ rid of it since we mask things around just below. */
+ if ((long)envp >= 0)
+ env = *envp;
+ else
+ env = (unsigned long)envp;
+
+ /* Reset the rounding mode with the hardware fpcr. Note that the following
+ system call is an implied trap barrier for our modification. */
+ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+ fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58));
+ __asm__ __volatile__("mt_fpcr %0" : : "f"(fpcr));
+
+ /* Reset the exception status and mask with the kernel's FP code. */
+ __ieee_set_fp_control(env & (FE_ALL_EXCEPT | 0x3e));
+}
diff --git a/sysdeps/alpha/fpu/fesetround.c b/sysdeps/alpha/fpu/fesetround.c
new file mode 100644
index 0000000..f49586c
--- /dev/null
+++ b/sysdeps/alpha/fpu/fesetround.c
@@ -0,0 +1,41 @@
+/* Set current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ unsigned long fpcr;
+
+ if (round & ~3)
+ return 0;
+
+ /* Get the current state. */
+ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+
+ /* Set the relevant bits. */
+ fpcr = (fpcr & ~(3UL << 58)) | ((unsigned long)round << 58);
+
+ /* Put the new state in effect. */
+ __asm__ __volatile__("mt_fpcr %0; excb" : : "f"(fpcr));
+
+ return 1;
+}
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
new file mode 100644
index 0000000..816575a
--- /dev/null
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -0,0 +1,38 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feupdateenv (const fenv_t *envp)
+{
+ unsigned long tmp;
+
+ /* Get the current exception state. */
+ tmp = __ieee_get_fp_control();
+
+ /* Install new environment. */
+ fesetenv(envp);
+
+ /* Raise the saved exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept((int)tmp & FE_ALL_EXCEPT);
+}
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..28d9e12
--- /dev/null
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -0,0 +1,33 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ unsigned long tmp;
+
+ /* Get the current state. */
+ tmp = __ieee_get_fp_control();
+
+ /* Return that portion that corresponds to the requested exceptions. */
+ *flagp = tmp & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..6a53e55
--- /dev/null
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -0,0 +1,72 @@
+/* Raise given exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+feraiseexcept (int excepts)
+{
+ double tmp;
+
+ /* Raise exceptions represented by EXPECTS. But we must raise only
+ one signal at a time. It is important the if the overflow/underflow
+ exception and the inexact exception are given at the same time,
+ the overflow/underflow exception precedes the inexact exception. */
+
+ /* We do these bits in assembly to be certain GCC doesn't optimize
+ away something important. */
+
+ /* First: invalid exception. */
+ if (FE_INVALID & excepts)
+ {
+ /* One example of a invalid operation is 0 * Infinity. */
+ __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
+ : "=f"(tmp) : "f"(HUGE_VAL));
+ }
+
+ /* Next: division by zero. */
+ if (FE_DIVBYZERO & excepts)
+ {
+ __asm__ __volatile__("cmpteq $f31,$f31,%0; divt/sui %0,$f31,%0; trapb"
+ : "=f"(tmp));
+ }
+
+ /* Next: overflow. */
+ if (FE_OVERFLOW & excepts)
+ {
+ __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
+ : "=f"(tmp) : "f"(DBL_MAX));
+ }
+
+ /* Next: underflow. */
+ if (FE_UNDERFLOW & excepts)
+ {
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=f"(tmp) : "f"(DBL_MIN), "f"(16.0));
+ }
+
+ /* Last: inexact. */
+ if (FE_INEXACT & excepts)
+ {
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=f"(tmp) : "f"(1.0), "f"(M_PI));
+ }
+}
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..7e373be
--- /dev/null
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -0,0 +1,36 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ unsigned long tmp;
+
+ /* Get the current exception state. */
+ tmp = __ieee_get_fp_control();
+
+ /* Set all the bits that were called for. */
+ tmp = tmp & ~FE_ALL_EXCEPT | *flagp & excepts & FE_ALL_EXCEPT;
+
+ /* And store it back. */
+ __ieee_set_fp_control(tmp);
+}
diff --git a/sysdeps/alpha/fpu/ftestexcept.c b/sysdeps/alpha/fpu/ftestexcept.c
new file mode 100644
index 0000000..9ee9dc9
--- /dev/null
+++ b/sysdeps/alpha/fpu/ftestexcept.c
@@ -0,0 +1,32 @@
+/* Test exception in current environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ unsigned long tmp;
+
+ /* Get current exceptions. */
+ tmp = __ieee_get_fp_control();
+
+ return tmp & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f10d86ecba2641edc6d6116eebaed1eece32cf11
commit f10d86ecba2641edc6d6116eebaed1eece32cf11
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 31 00:42:09 1997 +0000
Temporarily turn on -mieee globally. This will last until I figure
out how to build a parallel libm_ieee.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 841dc98..5fe8e4e 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -44,3 +44,7 @@ sysdep-CFLAGS += -mno-fp-regs
endif
divrem := divl divq reml remq
+
+# For now, build everything with full IEEE math support.
+# TODO: build separate libm and libm-ieee.
+sysdep-CFLAGS += -mieee
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08eeb8c0d3ac7399302489eb47d9d7fb21747655
commit 08eeb8c0d3ac7399302489eb47d9d7fb21747655
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 29 12:05:37 1997 +0000
Fix missing negate. Use __m81_test instead of explicit comparisons.
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index c012070..59bc990 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -35,63 +35,67 @@ float_type
s(__ieee754_atan2) (float_type y, float_type x)
{
float_type pi, pi_2, z;
+ unsigned long y_cond, x_cond;
__asm ("fmovecr%.x %#0, %0" : "=f" (pi));
__asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi));
- if (x != x || y != y)
+ y_cond = __m81_test (y);
+ x_cond = __m81_test (x);
+
+ if ((x_cond | y_cond) & __M81_COND_NAN)
z = x + y;
- else if (y == 0)
+ else if (y_cond & __M81_COND_ZERO)
{
- if (m81(__signbit) (x))
- z = m81(__signbit) (y) ? -pi : pi;
+ if (x_cond & __M81_COND_NEG)
+ z = y_cond & __M81_COND_NEG ? -pi : pi;
else
z = y;
}
- else if (m81(__isinf) (x))
+ else if (x_cond & __M81_COND_INF)
{
- if (m81(__isinf) (y))
+ if (y_cond & __M81_COND_INF)
{
float_type pi_4;
__asm ("fscale%.w %#-2, %0" : "=f" (pi_4) : "0" (pi));
- z = x > 0 ? pi_4 : 3 * pi_4;
+ z = x_cond & __M81_COND_NEG ? 3 * pi_4 : pi_4;
}
else
- z = x > 0 ? 0 : pi;
- if (m81(__signbit) (y))
+ z = x_cond & __M81_COND_NEG ? pi : 0;
+ if (y_cond & __M81_COND_NEG)
z = -z;
}
- else if (m81(__isinf) (y))
- z = y > 0 ? pi_2 : -pi_2;
- else if (x > 0)
+ else if (y_cond & __M81_COND_INF)
+ z = y_cond & __M81_COND_NEG ? -pi_2 : pi_2;
+ else if (x_cond & __M81_COND_NEG)
{
- if (y > 0)
+ if (y_cond & __M81_COND_NEG)
{
- if (x > y)
- z = m81(__atan) (y / x);
+ if (-x > -y)
+ z = -pi + m81(__atan) (y / x);
else
- z = pi_2 - m81(__atan) (x / y);
+ z = -pi_2 - m81(__atan) (x / y);
}
else
{
- if (x > -y)
- z = m81(__atan) (y / x);
+ if (-x > y)
+ z = pi + m81(__atan) (y / x);
else
- z = -pi_2 - m81(__atan) (x / y);
+ z = pi_2 - m81(__atan) (x / y);
}
}
else
{
- if (y < 0)
+ if (y_cond & __M81_COND_NEG)
{
- if (-x > y)
- z = -pi + m81(__atan) (y / x);
+ if (x > -y)
+ z = m81(__atan) (y / x);
else
z = -pi_2 - m81(__atan) (x / y);
}
else
{
- if (-x > y)
- z = pi + m81(__atan) (y / x);
+ if (x > y)
+ z = m81(__atan) (y / x);
else
z = pi_2 - m81(__atan) (x / y);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bf0f668e67d376ffe04db565a1de3d4ff3057f3
commit 1bf0f668e67d376ffe04db565a1de3d4ff3057f3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 26 22:28:25 1997 +0000
De-ansidecl-fy.
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index 0f38f87..fe656e1 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -1,24 +1,24 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Amd 290x0.
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <bstring.h>
#undef ffs
@@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
int
-DEFUN(ffs, (x), int x)
+ffs (x)
+ int x;
{
int cnt;
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
index 62b8742..7846c4b 100644
--- a/sysdeps/i960/ffs.c
+++ b/sysdeps/i960/ffs.c
@@ -1,25 +1,25 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For i960 Core architecture
- Copyright (C) 1994 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
- On-Line Applications Research Corporation.
+ On-Line Applications Research Corporation.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
#undef ffs
@@ -27,11 +27,12 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && defined (__i960__)
int
-DEFUN(ffs, (x), int x)
+ffs (x)
+ int x;
{
int cnt;
- asm("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x));
+ asm ("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x));
return cnt;
}
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index 9de7cf3..26044b1 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -1,24 +1,24 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For mc68020, mc68030, mc68040.
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
#undef ffs
@@ -26,11 +26,12 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && defined (__mc68020__)
int
-DEFUN(ffs, (x), int x)
+ffs (x)
+ int x;
{
int cnt;
- asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x));
+ asm ("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x));
return 32 - cnt;
}
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index effca9a..3658f08 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -1,24 +1,24 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Motorola 88000.
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <bstring.h>
#undef ffs
@@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
int
-DEFUN(ffs, (x), int x)
+ffs (x)
+ int x;
{
int cnt;
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index c54d8a9..9b4c1e1 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
#include <stdlib.h>
@@ -27,7 +27,9 @@ Cambridge, MA 02139, USA. */
#endif
void
-DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg)
+__longjmp (env, val_arg)
+ __jmp_buf env;
+ int val_arg;
{
/* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
the hack around it); force it to use $a1 for the longjmp value.
@@ -42,7 +44,7 @@ DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg)
asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3]));
asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4]));
asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5]));
-
+
/* Restore the stack pointer. */
asm volatile ("lw $29, %0" : : "m" (env[0].__sp));
@@ -68,7 +70,7 @@ DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg)
/* Get the PC. */
asm volatile ("lw $31, %0" : : "m" (env[0].__pc));
-
+
/* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
asm volatile ("li $2, 1");
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index 598c15c..f078c91 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -1,24 +1,24 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
#undef ffs
@@ -26,7 +26,8 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
int
-DEFUN(ffs, (x), int x)
+ffs (x)
+ int x;
{
int cnt;
diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c
index 67fbf77..5985b30 100644
--- a/sysdeps/standalone/brk.c
+++ b/sysdeps/standalone/brk.c
@@ -1,37 +1,36 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <stdlib.h>
-PTR __curbrk;
-PTR __rorig;
-PTR __rlimit;
+void *__curbrk;
+void *__rorig;
+void *__rlimit;
int
-DEFUN(__brk, (inaddr), PTR inaddr)
+__brk (inaddr)
+ void *inaddr;
{
- if ( ( (void *)inaddr > (void *)__rlimit ) ||
- ( (void *)inaddr < (void *)__rorig ) )
+ if ( ( (void *)inaddr > (void *)__rlimit ) ||
+ ( (void *)inaddr < (void *)__rorig ) )
return -1;
__curbrk = inaddr;
@@ -40,24 +39,24 @@ DEFUN(__brk, (inaddr), PTR inaddr)
/* Initialization Code for Memory Allocation */
-PTR __C_heap_start;
+void *__C_heap_start;
int __C_heap_size;
-
+
#ifdef HAVE_GNU_LD
static
#endif
void
-DEFUN(__NONE_set_memvals, (argc, argv, envp),
- int argc AND char **argv AND char **envp)
+__NONE_set_memvals (argc, argv, envp),
+ int argc; char **argv; char **envp;
{
-
- __rorig =
+
+ __rorig =
__curbrk = __C_heap_start;
__rlimit = __curbrk + __C_heap_size;
(void) &__NONE_set_memvals; /* Avoid "defined but not used" warning. */
}
-
+
#ifdef HAVE_GNU_LD
text_set_element (__libc_subinit, __NONE_set_memvals);
#endif
diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c
index 011bb8b..455dc0e 100644
--- a/sysdeps/standalone/i386/force_cpu386/_exit.c
+++ b/sysdeps/standalone/i386/force_cpu386/_exit.c
@@ -1,38 +1,37 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <unistd.h>
#include <stdlib.h>
/* This returns control to FORCEbug. */
-void DEFUN_VOID(Bsp_cleanup);
+void Bsp_cleanup __P ((void));
/* The function `_exit' should take a status argument and simply
terminate program execution, using the low-order 8 bits of the
given integer as status. */
__NORETURN void
-DEFUN(_exit, (status), int status)
+_exit (status)
+ int status;
{
/* status is ignored */
Bsp_cleanup();
diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c
index 0d27218..c16aa60 100644
--- a/sysdeps/standalone/i386/force_cpu386/brdinit.c
+++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c
@@ -1,25 +1,23 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "i386.h"
@@ -27,18 +25,18 @@ Cambridge, MA 02139, USA. */
This routine initializes the FORCE CPU386 board. */
-void DEFUN_VOID(_Console_Initialize);
+void _Console_Initialize __P ((void));
-void
-DEFUN_VOID(_Board_Initialize)
+void
+_Board_Initialize ()
{
/*
* FORCE documentation incorrectly states that the bus request
* level is initialized to 3. It is actually initialized by
* FORCEbug to 0.
*/
-
- outport_byte( 0x00, 0x3f ); /* resets VMEbus request level */
-
- _Console_Initialize();
+
+ outport_byte (0x00, 0x3f); /* resets VMEbus request level */
+
+ _Console_Initialize ();
}
diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c
index 5d56f76..d0fd35f 100644
--- a/sysdeps/standalone/i386/force_cpu386/console.c
+++ b/sysdeps/standalone/i386/force_cpu386/console.c
@@ -1,25 +1,23 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "i386.h"
@@ -30,7 +28,7 @@ Cambridge, MA 02139, USA. */
* The following determines whether Port B or the Console should
* be used for console I/O. Setting ONE (and only ONE) of these to 1
* enables I/O on that port.
- *
+ *
* PORT A - DUSCC MC68562 Channel A (*** not supported here ***)
* PORT B - DUSCC MC68562 Channel B
* PORT C - MFP MC68901 Channel (*** FORCEbug console ***)
@@ -47,7 +45,7 @@ Cambridge, MA 02139, USA. */
#define Is_tx_ready( _status ) ( (_status) & 0x20 )
#define Is_rx_ready( _status ) ( (_status) & 0x10 )
#endif
-
+
#if ( PORTC == 1 )
#define TX_STATUS 0x12c /* MFP Transmit Status Register */
#define RX_STATUS 0x12a /* MFP Receive Status Register */
@@ -56,20 +54,20 @@ Cambridge, MA 02139, USA. */
#define Is_tx_ready( _status ) ( (_status) & 0x80 )
#define Is_rx_ready( _status ) ( (_status) & 0x80 )
#endif
-
+
/* _Console_Initialize
On the Force board the console require some initialization. */
void
-DEFUN_VOID(_Console_Initialize)
+_Console_Initialize ()
{
register unsigned8 ignored;
/* FORCE technical support mentioned that it may be necessary to
read the DUSCC RX_BUFFER port four times to remove all junk.
This code is a little more paranoid. */
-
+
inport_byte( RX_BUFFER, ignored );
inport_byte( RX_BUFFER, ignored );
inport_byte( RX_BUFFER, ignored );
@@ -79,7 +77,7 @@ DEFUN_VOID(_Console_Initialize)
/* Miscellaneous support for console IO */
-static inline int _Force386_is_rx_ready()
+static inline int _Force386_is_rx_ready ()
{
register unsigned8 status;
@@ -88,8 +86,8 @@ static inline int _Force386_is_rx_ready()
if ( Is_rx_ready( status ) ) return 1;
else return 0;
}
-
-static inline int _Force386_is_tx_ready()
+
+static inline int _Force386_is_tx_ready ()
{
register unsigned8 status;
@@ -100,14 +98,14 @@ static inline int _Force386_is_tx_ready()
}
-static inline int _Force386_read_data()
+static inline int _Force386_read_data ()
{
register unsigned8 ch;
#if ( PORTB == 1 )
/* Force example code resets the Channel B Receiver here.
* It appears to cause XON's to be lost.
- */
+ */
/* outport_byte( RX_STATUS, 0x10 ); */
#endif
@@ -125,7 +123,8 @@ This routine transmits a character. It supports XON/XOFF flow control. */
#define XOFF 0x13 /* control-S */
int
-DEFUN( _Console_Putc, (ch), char ch )
+_Console_Putc (ch)
+ char ch;
{
register unsigned8 inch;
@@ -139,7 +138,7 @@ DEFUN( _Console_Putc, (ch), char ch )
inch = _Force386_read_data();
} while ( inch != XON );
}
-
+
outport_byte( TX_BUFFER, ch );
return( 0 );
}
@@ -149,7 +148,8 @@ DEFUN( _Console_Putc, (ch), char ch )
This routine reads a character from the UART and returns it. */
int
-DEFUN( _Console_Getc, (poll), int poll )
+_Console_Getc (poll)
+ int poll;
{
if ( poll ) {
if ( !_Force386_is_rx_ready() )
diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c
index 33553a7..e56dcc0 100644
--- a/sysdeps/standalone/i960/nindy960/_exit.c
+++ b/sysdeps/standalone/i960/nindy960/_exit.c
@@ -1,25 +1,23 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
#include <unistd.h>
#include <stdlib.h>
@@ -28,9 +26,10 @@ Cambridge, MA 02139, USA. */
given integer as status. */
/* This returns control to Nindy. */
-
+/* XXX where is __NORETURN ? */
__NORETURN void
-DEFUN(_exit, (status), int status)
+_exit (status)
+ int status;
{
/* status is ignored */
diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c
index c16adcd..9cc9168 100644
--- a/sysdeps/standalone/i960/nindy960/brdinit.c
+++ b/sysdeps/standalone/i960/nindy960/brdinit.c
@@ -1,36 +1,34 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "i960ca.h"
/* _Board_Initialize()
-This routine initializes the board.
+This routine initializes the board.
NOTE: Only tested on a Cyclone CVME961 but should be OK on any i960ca board. */
-void
-DEFUN_VOID(_Board_Initialize)
+void
+_Board_Initialize ()
{
struct i80960ca_prcb *prcb; /* ptr to processor control block */
struct i80960ca_ctltbl *ctl_tbl; /* ptr to control table */
@@ -44,7 +42,7 @@ DEFUN_VOID(_Board_Initialize)
return ( _prcb );
}
- prcb = get_prcb();
+ prcb = get_prcb ();
ctl_tbl = prcb->control_tbl;
/* The following configures the data breakpoint (which must be set
@@ -52,7 +50,7 @@ DEFUN_VOID(_Board_Initialize)
*/
ctl_tbl->bpcon &= ~0x00cc0000;
- reload_ctl_group( 6 );
+ reload_ctl_group (6);
/* bit 31 of the Register Cache Control can be set to
* enable an alternative caching algorithm. It does
@@ -62,5 +60,5 @@ DEFUN_VOID(_Board_Initialize)
/* Configure Number of Register Caches */
prcb->reg_cache_cfg = 8;
- soft_reset( prcb );
+ soft_reset (prcb);
}
diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c
index 8215144..cf52ec6 100644
--- a/sysdeps/standalone/i960/nindy960/console.c
+++ b/sysdeps/standalone/i960/nindy960/console.c
@@ -1,30 +1,28 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "i960ca.h"
/* Console IO routines for a NINDY960 board. */
-
+
/*
* NINDY_IO( ... )
*
@@ -51,7 +49,8 @@ void ___NINDY_IO_WRAPPER( void ) /* never called */
This routine transmits a character using NINDY. */
int
-DEFUN( _Console_Putc, (ch), char ch )
+_Console_Putc (ch)
+ char ch;
{
NINDY_IO( NINDY_OUTPUT, ch );
return( 0 );
@@ -62,7 +61,8 @@ DEFUN( _Console_Putc, (ch), char ch )
This routine reads a character from NINDY and returns it. */
int
-DEFUN( _Console_Getc, (poll), int poll )
+_Console_Getc (poll)
+ int poll;
{
char ch;
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
index d13b4d9..d45e52d 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -1,33 +1,31 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
#include <unistd.h>
#include <stdlib.h>
#include "m68020.h"
/* Return control to 135Bug */
-void
-DEFUN_VOID(__exit_trap)
+void
+__exit_trap ()
{
set_vbr( 0 ); /* restore 135Bug vectors */
asm volatile( "trap #15" ); /* trap to 135Bug */
@@ -39,8 +37,10 @@ DEFUN_VOID(__exit_trap)
terminate program execution, using the low-order 8 bits of the
given integer as status. */
-__NORETURN void
-DEFUN(_exit, (status), int status)
+void
+__attribute__ ((noreturn))
+_exit (status)
+ int status;
{
/* status is ignored */
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
index 0c4801a..c477441 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
@@ -1,25 +1,23 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "m68020.h"
@@ -27,12 +25,12 @@ Cambridge, MA 02139, USA. */
This routine initializes the Motorola MVME135/MVME136. */
-void
-DEFUN_VOID(_Board_Initialize)
+void
+_Board_Initialize ()
{
mc68020_isr *monitors_vector_table;
int index;
-
+
monitors_vector_table = (mc68020_isr *)0; /* 135Bug Vectors are at 0 */
set_vbr( monitors_vector_table );
@@ -48,6 +46,6 @@ DEFUN_VOID(_Board_Initialize)
(*(unsigned char *)0xfffb0067) = 0x7f; /* make VME access round-robin */
- enable_caching();
+ enable_caching ();
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
index bb9a7fc..3e54c1e 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
@@ -1,29 +1,30 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
/* Suspend or restart transmission on FD. */
int
-DEFUN(tcflow, (fd, action), int fd AND int action)
+tcflow (fd, action)
+ int fd;
+ int action;
{
return __ioctl (fd, TCXONC, action);
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
index d76fc07..8c8fdf8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcflush.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
@@ -1,29 +1,30 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
/* Flush pending data on FD. */
int
-DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+tcflush (fd, queue_selector)
+ int fd;
+ int queue_selector;
{
return __ioctl (fd, TCFLSH, queue_selector);
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
index 5e45037..69a8fb2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <termios.h>
@@ -24,8 +23,9 @@ Cambridge, MA 02139, USA. */
/* Put the state of FD into *TERMIOS_P. */
int
-DEFUN(__tcgetattr, (fd, termios_p),
- int fd AND struct termios *termios_p)
+__tcgetattr (fd, termios_p)
+ int fd;
+ struct termios *termios_p;
{
return __ioctl (fd, TCGETS, termios_p);
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
index 7a6d5cc..2953f45 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
@@ -24,7 +23,9 @@ Cambridge, MA 02139, USA. */
/* Send zero bits on FD. */
int
-DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
+tcsendbreak (fd, duration)
+ int fd;
+ int duration;
{
/* According to SunOS 4.1's termios(4), you can't specify a duration. */
return __ioctl (fd, TCSBRK, 0);
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 919cd7c..ffffc7a 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -1,26 +1,24 @@
/* This implements wait4 with the 4.4 BSD semantics (also those documented in
SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
different from those documented. Go Sun!
+ Copyright (C) 1991, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -29,9 +27,11 @@ extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc,
int options, struct rusage *usage));
pid_t
-DEFUN(__wait4, (pid, stat_loc, options, usage),
- pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND
- int options AND struct rusage *usage)
+__wait4 (pid, stat_loc, options, usage)
+ pid_t pid;
+ __WAIT_STATUS_DEFN stat_loc;
+ int options;
+ struct rusage *usage;
{
switch (pid)
{
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
index 6969594..4ecce54 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* The sigvec system call on MIPS Ultrix takes an additional
parameter, which is the address that is actually called when the
@@ -28,7 +28,6 @@ Cambridge, MA 02139, USA. */
different because since we get passed the user signal handler we
don't actually need a trampoline. */
-#include <ansidecl.h>
#include <signal.h>
#include <stddef.h>
#include <errno.h>
@@ -36,19 +35,21 @@ Cambridge, MA 02139, USA. */
/* The user's signal handler is called with three arguments. */
typedef void (*handler_type) (int sig, int code, struct sigcontext *);
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec,
- void (*)(int sig, int code,
- struct sigcontext *,
- handler_type)));
+extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type)));
-extern void EXFUN(__handler, (int sig, int code,
- struct sigcontext *,
- handler_type));
+extern void __handler __P ((int sig, int code,
+ struct sigcontext *,
+ handler_type));
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
return __raw_sigvec (sig, vec, ovec, __handler);
}
diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c
index 3c9f175..5d4d2c3 100644
--- a/sysdeps/unix/sysv/irix4/fpathconf.c
+++ b/sysdeps/unix/sysv/irix4/fpathconf.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <unistd.h>
@@ -26,7 +25,9 @@ extern int __syssgi __P ((int, ...));
/* Get file-specific information about descriptor FD. */
long int
-DEFUN(__fpathconf, (fd, name), int fd AND int name)
+__fpathconf (fd, name)
+ int fd;
+ int name;
{
return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name);
}
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index 714f660..b68fe28 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sys/syssgi.h>
-#include <ansidecl.h>
#include <sys/types.h>
#include <grp.h>
@@ -25,9 +24,11 @@ extern int __syssgi __P ((int, ...));
/* Set the group set for the current user to GROUPS (N of them). */
int
-DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups)
+__getgroups (n, groups)
+ size_t n;
+ gid_t *groups;
{
return __syssgi (SGI_GETGROUPS, n, groups);
-}
+}
weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
index fdd3a24..95f4773 100644
--- a/sysdeps/unix/sysv/irix4/getrusage.c
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <sys/resource.h>
#include <errno.h>
#include <sys/syssgi.h>
@@ -26,8 +25,9 @@ extern int __syssgi __P ((int, ...));
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
int
-DEFUN(__getrusage, (who, usage),
- enum __rusage_who who AND struct rusage *usage)
+__getrusage (who, usage)
+ enum __rusage_who who;
+ struct rusage *usage;
{
return __syssgi (SGI_RUSAGE, who, usage);
}
diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c
index 698e30a..12518ab 100644
--- a/sysdeps/unix/sysv/irix4/pathconf.c
+++ b/sysdeps/unix/sysv/irix4/pathconf.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <unistd.h>
@@ -26,7 +25,9 @@ extern int __syssgi __P ((int, ...));
/* Get file-specific information about PATH. */
long int
-DEFUN(__pathconf, (path, name), CONST char *path AND int name)
+__pathconf (path, name)
+ const char *path;
+ int name;
{
return __syssgi (SGI_PATHCONF, PATHCONF, path, name);
}
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
index 052df0f..69e6689 100644
--- a/sysdeps/unix/sysv/irix4/setgroups.c
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sys/syssgi.h>
-#include <ansidecl.h>
#include <sys/types.h>
#include <grp.h>
@@ -25,7 +24,9 @@ extern int __syssgi __P ((int, ...));
/* Set the group set for the current user to GROUPS (N of them). */
int
-DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups)
+setgroups (n, groups)
+ size_t n;
+ const gid_t *groups;
{
return __syssgi (SGI_SETGROUPS, n, groups);
-}
+}
diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c
index 85c2c3a..5411595 100644
--- a/sysdeps/unix/sysv/irix4/sigtramp.c
+++ b/sysdeps/unix/sysv/irix4/sigtramp.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* The sigvec system call on MIPS Ultrix takes an additional
parameter, which is the address that is actually called when the
@@ -28,7 +28,6 @@ Cambridge, MA 02139, USA. */
different because since we get passed the user signal handler we
don't actually need a trampoline. */
-#include <ansidecl.h>
#include <signal.h>
#include <stddef.h>
#include <errno.h>
@@ -37,18 +36,19 @@ Cambridge, MA 02139, USA. */
typedef void (*handler_type) (int sig, int code, struct sigcontext *);
/* Defined in signal.S. */
-extern __sighandler_t EXFUN(__raw_signal, (int sig, __sighandler_t func,
- void (*)(int sig, int code,
- struct sigcontext *,
- handler_type)));
+extern __sighandler_t __raw_signal __P((int sig, __sighandler_t func,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type)));
-extern void EXFUN(__handler, (int sig, int code,
- struct sigcontext *,
- handler_type));
+extern void __handler __P((int sig, int code,
+ struct sigcontext *,
+ handler_type));
__sighandler_t
-DEFUN(signal, (sig, func),
- int sig AND __sighandler_t func)
+signal (sig, func)
+ int sig;
+ __sighandler_t func;
{
return __raw_signal (sig, func, __handler);
}
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index b11d27b..0977642 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
@@ -28,11 +27,11 @@ Cambridge, MA 02139, USA. */
/* The first piece of initialized data. */
int __data_start = 0;
-VOLATILE int __errno = 0;
+__volatile int __errno = 0;
strong_alias (__errno, errno)
-extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
-extern int EXFUN(main, (int argc, char **argv, char **envp));
+extern void __libc_init __P ((int argc, char **argv, char **envp));
+extern int main __P ((int argc, char **argv, char **envp));
/* Use the stack pointer to access the arguments. This assumes that
we can guess how big the frame will be. */
@@ -44,7 +43,7 @@ register long int sp asm("sp");
#endif
void
-DEFUN_VOID(__start)
+__start ()
{
int argc;
char **argv, **envp;
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index a310362..2e409ee 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <unistd.h>
#include <sys/syssgi.h>
@@ -24,7 +23,8 @@ extern int __syssgi __P ((int, ...));
/* Get the value of the system variable NAME. */
long int
-DEFUN(__sysconf, (name), int name)
+__sysconf (name)
+ int name;
{
if (name == _SC_TZNAME_MAX)
return __tzname_max ();
diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
index 3c4304c..d8ad98f 100644
--- a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -24,7 +24,9 @@ extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
-DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid)
+__setpgid (pid, pgid)
+ pid_t pid;
+ pid_t pgid;
{
return __pgrpsys (2, pid, pgid);
}
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
index 68966bc..aaf0e63 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <unistd.h>
#include <limits.h>
@@ -25,7 +24,8 @@ Cambridge, MA 02139, USA. */
extern int __sco_getgroups __P ((int size, unsigned short int *list));
int
-DEFUN(__getgroups, (size, list), int size AND gid_t *list)
+__getgroups (size, list)
+ int size; gid_t *list;
{
int i;
unsigned short int *shortlist;
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
index 76a6e80..9fc221b 100644
--- a/sysdeps/unix/sysv/sysv4/__getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -25,7 +25,8 @@ extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
-DEFUN(__getpgid, (pid), pid_t pid)
+__getpgid (pid)
+ pid_t pid;
{
return __pgrpsys (4, pid);
}
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
index 594e4e9..3a03415 100644
--- a/sysdeps/unix/sysv/sysv4/__setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__setpgid.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -25,7 +25,9 @@ extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
-DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid)
+__setpgid (pid, pgid)
+ pid_t pid;
+ pid_t pgid;
{
return __pgrpsys (5, pid, pgid);
}
diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c
index 45f2614..5c9d874 100644
--- a/sysdeps/unix/sysv/sysv4/ftruncate.c
+++ b/sysdeps/unix/sysv/sysv4/ftruncate.c
@@ -1,23 +1,22 @@
/* ftruncate for SVR4 using the fcntl F_FREESP command.
-Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
@@ -25,8 +24,9 @@ Cambridge, MA 02139, USA. */
/* Truncate the file FD refers to to LENGTH bytes. */
int
-DEFUN(ftruncate, (fd, length),
- int fd AND off_t length)
+ftruncate (fd, length)
+ int fd;
+ off_t length;
{
struct flock fl;
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
index cce1149..558d16e 100644
--- a/sysdeps/unix/sysv/sysv4/gethostname.c
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -25,7 +25,9 @@ Cambridge, MA 02139, USA. */
extern int __sysinfo __P ((int command, char *buf, long count));
int
-DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen)
+__gethostname (name, namelen)
+ char *name;
+ size_t namelen;
{
return __sysinfo (SI_HOSTNAME, name, namelen);
}
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index 309e2f1..3195e6c 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -25,7 +24,8 @@ extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
-DEFUN(__getpgid, (pid), pid_t pid)
+__getpgid (pid)
+ pid_t pid;
{
return __pgrpsys (4, pid);
}
diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c
index 4cebc45..10fb5ff 100644
--- a/sysdeps/unix/sysv/sysv4/sethostname.c
+++ b/sysdeps/unix/sysv/sysv4/sethostname.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
@@ -25,7 +25,9 @@ Cambridge, MA 02139, USA. */
extern int __sysinfo __P ((int command, const char *buf, long count));
int
-DEFUN(sethostname, (name, namelen), const char *name AND size_t namelen)
+sethostname (name, namelen)
+ const char *name;
+ size_t namelen;
{
return __sysinfo (SI_SET_HOSTNAME, name, namelen);
}
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 743b8ca..4639632 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -26,7 +25,8 @@ extern int __pgrpsys __P ((int type, ...));
If PID is zero, the current process's process group ID is set.
If PGID is zero, the process ID of the process is used. */
int
-DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
+__setpgid (pid, pgid)
+ int pid, pgid; /* XXX why not pid_t ? */
{
return __pgrpsys (5, pid, pgid);
}
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index f0d6c8a..37998bf 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -26,7 +25,7 @@ extern int __pgrpsys __P ((int type, ...));
The process group IDs of the session and the calling process
are set to the process ID of the calling process, which is returned. */
int
-DEFUN_VOID(__setsid)
+__setsid ()
{
return __pgrpsys (3);
}
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
index 0ee040a..e795c42 100644
--- a/sysdeps/vax/__longjmp.c
+++ b/sysdeps/vax/__longjmp.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1997 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
#ifndef __GNUC__
@@ -31,7 +30,9 @@ Cambridge, MA 02139, USA. */
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
void
-DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val)
+__longjmp (env, val)
+ const __jmp_buf env;
+ int val;
{
register long int *fp asm("fp");
long int *regsave;
diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c
index 9849761..97fa3a0 100644
--- a/sysdeps/vax/memccpy.c
+++ b/sysdeps/vax/memccpy.c
@@ -1,36 +1,37 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <string.h>
-
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */
-PTR
-DEFUN(__memccpy, (dest, src, c, n),
- PTR dest AND CONST PTR src AND int c AND size_t nbytes)
+void *
+__memccpy (dest, src, c, n)
+ void *dest;
+ const void *src;
+ int c;
+ size_t nbytes;
{
/* Except when N > 65535, this is what a hand-coded version would
do anyway. */
- PTR found = memchr (src, c, n);
+ void *found = memchr (src, c, n);
if (found == NULL)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5fba1adf74a976d2d0151fca9f3250b7dc7f286
commit b5fba1adf74a976d2d0151fca9f3250b7dc7f286
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun May 25 01:07:16 1997 +0000
(elf_machine_rel): Print warning about changed size in copy relocation
only if symbol in shared object is larger or _dl_verbose is nonzero.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index dee2a46..1523ddb 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -227,7 +227,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- if (sym->st_size != refsym->st_size)
+ if (sym->st_size > refsym->st_size
+ || (_dl_verbose && sym->st_size < refsym->st_size))
{
const char *strtab;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a10ff2ea76e2d1eea888c2c0402c710f41f6005a
commit a10ff2ea76e2d1eea888c2c0402c710f41f6005a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 24 20:22:52 1997 +0000
Add EPERM.
diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h
index 428fe9e..8090a80 100644
--- a/sysdeps/standalone/arm/errnos.h
+++ b/sysdeps/standalone/arm/errnos.h
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This file defines the `errno' constants for standalone ARM machines.
These constants are essentially arbitrary. */
@@ -46,6 +46,7 @@ Cambridge, MA 02139, USA. */
#define ENOENT 18
#define EPROTOTYPE 19
#define ESRCH 20
+#define EPERM 21
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e295f619934794a482ac2d00b0e23c8b0cfebc92
commit e295f619934794a482ac2d00b0e23c8b0cfebc92
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 24 02:15:43 1997 +0000
(elf_machine_runtime_setup): Return lazy.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index e6b8f9e..dee2a46 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -75,7 +75,7 @@ elf_machine_load_address (void)
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
-static inline void
+static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy)
{
Elf32_Addr *got;
@@ -96,8 +96,11 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
got[2] = (Elf32_Addr) &_dl_runtime_resolve;
}
- /* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
+ return lazy;
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
| Trampoline for _dl_runtime_resolver
.globl _dl_runtime_resolve
@@ -120,7 +123,6 @@ _dl_runtime_resolve:
#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
/* The PLT uses Elf32_Rela relocs. */
#define elf_machine_relplt elf_machine_rela
-}
/* Mask identifying addresses reserved for the user program,
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 39a1cc8..422179c 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -183,7 +183,7 @@ elf_machine_got_rel (struct link_map *map)
/* Set up the loaded object described by L so its stub function
will jump to the on-demand fixup code in dl-runtime.c. */
-static inline void
+static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy)
{
ElfW(Addr) *got;
@@ -213,6 +213,8 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
/* Relocate global offset table. */
elf_machine_got_rel (l);
+
+ return lazy;
}
/* Get link_map for this object. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76a2c2cb6a805e4040768af74abbcbb0b15d791e
commit 76a2c2cb6a805e4040768af74abbcbb0b15d791e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 24 02:10:36 1997 +0000
(elf_machine_runtime_setup): If we are
not looking at the new thread-safe .plt, don't be lazy about relocs.
(_dl_runtime_resolve): Fix up arithmetic for new .plt layout.
(elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 7a51df5..49d6830 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -86,7 +86,7 @@ elf_machine_load_address (void)
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
-static inline void
+static inline int
elf_machine_runtime_setup (struct link_map *l, int lazy)
{
Elf64_Addr plt;
@@ -104,7 +104,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
/* Identify this shared object */
*(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
+
+ /* If the first instruction of the plt entry is not
+ "br $28, plt0", we cannot do lazy relocation. */
+ lazy = (*(unsigned *)(plt + 32) == 0xc39ffff7);
}
+
+ return lazy;
}
/* This code is used in dl-runtime.c to call the `fixup' function
@@ -145,9 +151,11 @@ _dl_runtime_resolve:
.prologue 1
/* Set up the arguments for _dl_runtime_resolve. */
/* $16 = link_map out of plt0 */
+ /* $17 = offset of reloc entry = ($28 - $27 - 20) /12 * 24 */
+ subq $28, $27, $17
ldq $16, 8($27)
- /* $17 = offset of reloc entry */
- mov $28, $17
+ subq $17, 20, $17
+ addq $17, $17, $17
/* Do the fixup */
bsr $26, fixup..ng
/* Move the destination address into position. */
@@ -290,14 +298,18 @@ elf_alpha_fix_plt(struct link_map *l,
lo = (short)hi;
hi = (hi - lo) >> 16;
- /* Emit "ldah $27,H($27)" */
- plte[0] = 0x277b0000 | (hi & 0xffff);
-
/* Emit "lda $27,L($27)" */
plte[1] = 0x237b0000 | (lo & 0xffff);
/* Emit "br $31,function" */
plte[2] = 0xc3e00000 | (edisp & 0x1fffff);
+
+ /* Think about thread-safety -- the previous instructions must be
+ committed to memory before the first is overwritten. */
+ __asm__ __volatile__("wmb" : : : "memory");
+
+ /* Emit "ldah $27,H($27)" */
+ plte[0] = 0x277b0000 | (hi & 0xffff);
}
else
{
@@ -310,14 +322,18 @@ elf_alpha_fix_plt(struct link_map *l,
lo = (short)hi;
hi = (hi - lo) >> 16;
- /* Emit "ldah $27,H($27)" */
- plte[0] = 0x277b0000 | (hi & 0xffff);
-
/* Emit "ldq $27,L($27)" */
plte[1] = 0xa77b0000 | (lo & 0xffff);
/* Emit "jmp $31,($27)" */
plte[2] = 0x6bfb0000;
+
+ /* Think about thread-safety -- the previous instructions must be
+ committed to memory before the first is overwritten. */
+ __asm__ __volatile__("wmb" : : : "memory");
+
+ /* Emit "ldah $27,H($27)" */
+ plte[0] = 0x277b0000 | (hi & 0xffff);
}
/* At this point, if we've been doing runtime resolution, Icache is dirty.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c751295fb8e48917c88cdfa4dbd4597866f6fd81
commit c751295fb8e48917c88cdfa4dbd4597866f6fd81
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 22 02:18:07 1997 +0000
pretty printing.
diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S
index 7a87278..bc2bc7d 100644
--- a/sysdeps/unix/sysv/linux/arm/syscall.S
+++ b/sysdeps/unix/sysv/linux/arm/syscall.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,10 +26,10 @@ ENTRY (syscall)
/* Normally encoding the system call number in the instruction is
good. But we pay the price here. */
-
+
sub sp, sp, $0xc @ get 3 words on the stack
orr r0, r0, $0xef000000 @ make up a SWI instruction
- orr r0, r0, $SWI_BASE
+ orr r0, r0, $SWI_BASE
str r0, [sp]
ldr r0, _reti
str r0, [sp, $4]
@@ -43,5 +43,5 @@ _ret: add sp, sp, $0xc
RETINSTR(mov, pc, r14)
_reti: .word 0xe51ff004 @ ldr pc, [pc, $4]
-
+
PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 6478a5d..0aa085d 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -1,22 +1,22 @@
/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
-ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
+ ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _LINUX_ARM_SYSDEP_H
#define _LINUX_ARM_SYSDEP_H 1
@@ -61,12 +61,12 @@ Cambridge, MA 02139, USA. */
#ifndef PIC
#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
#else
-#error Aiee
+#error Aiee
#endif /* PIC */
#undef DO_CALL
#define DO_CALL(args, syscall_name) \
- swi SYS_ify (syscall_name);
+ swi SYS_ify (syscall_name);
#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1df6311982752b1d8090682168e083063a0a99c4
commit 1df6311982752b1d8090682168e083063a0a99c4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 22 02:17:10 1997 +0000
profiling interface for Linux/ARM.
diff --git a/sysdeps/unix/sysv/linux/arm/profil-counter.h b/sysdeps/unix/sysv/linux/arm/profil-counter.h
new file mode 100644
index 0000000..a915da7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/profil-counter.h
@@ -0,0 +1,26 @@
+/* Low-level statistical profiling support function. Linux/ARM version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sigcontext.h>
+
+void
+profil_counter (int signo, struct sigcontext sc)
+{
+ profil_count ((void *) sc.eip);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e42418a2d4477c4ab4ad246e82c63373be7d1f9
commit 7e42418a2d4477c4ab4ad246e82c63373be7d1f9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 22 02:16:31 1997 +0000
Avoid warning about nested comments.
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index 1c58073..b1860dd 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/arm/sysdep.h>
-/* Some definitions to allow the assembler in sysdeps/unix/*.S to build
+/* Some definitions to allow the assembler in sysdeps/unix/ to build
without needing ARM-specific versions of all the files. */
#define ret RETINSTR(mov, pc, r14)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae233369c7ba5ac5c84b7f3bb6cbe7ee0c9521af
commit ae233369c7ba5ac5c84b7f3bb6cbe7ee0c9521af
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu May 22 02:15:00 1997 +0000
Add EPROTOTYPE, ESRCH.
diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h
index 0b635e6..428fe9e 100644
--- a/sysdeps/standalone/arm/errnos.h
+++ b/sysdeps/standalone/arm/errnos.h
@@ -44,6 +44,8 @@ Cambridge, MA 02139, USA. */
#define EILSEQ 16
#define ENOEXEC 17
#define ENOENT 18
+#define EPROTOTYPE 19
+#define ESRCH 20
#endif
#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da0e06ed823c35e865b77687ec336b29adff0d4c
commit da0e06ed823c35e865b77687ec336b29adff0d4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:44:24 1997 +0000
Add cacheflush.
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 9a3e4d0..473c2ec 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,5 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names
+cacheflush EXTRA cacheflush 4 __cacheflush cacheflush
+
s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
s_setgroups setgroups setgroups 2 __syscall_setgroups
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d2485ed0b3f7696a5f8739ba7c405bdb926a353
commit 8d2485ed0b3f7696a5f8739ba7c405bdb926a353
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:44:03 1997 +0000
Linux/ARM specific implementation
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S
new file mode 100644
index 0000000..c7e7aed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/clone.S
@@ -0,0 +1,33 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <sysdep.h>
+#define _ERRNO_H 1
+#include <errnos.h>
+
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
+
+ .text
+ENTRY(__clone)
+ /* Somebody needs to write this. */
+PSEUDO_END (__clone)
+
+weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
new file mode 100644
index 0000000..e8db072
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -0,0 +1,49 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#include <sys/socketcall.h>
+
+#define P(a, b) P2(a, b)
+#define P2(a, b) a##b
+
+ .text
+/* The socket-oriented system calls are handled unusally in Linux.
+ They are all gated through the single `socketcall' system call number.
+ `socketcall' takes two arguments: the first is the subcode, specifying
+ which socket function is being called; and the second is a pointer to
+ the arguments to the specific function.
+
+ The .S files for the other calls just #define socket and #include this. */
+
+.globl P(__,socket)
+ENTRY (P(__,socket))
+
+ /* Do the system call trap. */
+ swi SYS_ify(socketcall)
+
+ /* %eax is < 0 if there was an error. */
+ cmn r0, $124
+ bge syscall_error
+
+ /* Successful; return the syscall's value. */
+ RETINSTR(mov,pc,r14)
+
+PSEUDO_END (P(__,socket))
+
+weak_alias (P(__,socket), socket)
diff --git a/sysdeps/unix/sysv/linux/arm/syscall.S b/sysdeps/unix/sysv/linux/arm/syscall.S
new file mode 100644
index 0000000..7a87278
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/syscall.S
@@ -0,0 +1,47 @@
+/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* Please consult the file sysdeps/unix/sysv/linux/arm/sysdep.h for
+ more information about the value -4095 used below.*/
+
+ .text
+ENTRY (syscall)
+
+ /* Normally encoding the system call number in the instruction is
+ good. But we pay the price here. */
+
+ sub sp, sp, $0xc @ get 3 words on the stack
+ orr r0, r0, $0xef000000 @ make up a SWI instruction
+ orr r0, r0, $SWI_BASE
+ str r0, [sp]
+ ldr r0, _reti
+ str r0, [sp, $4]
+ adr r0, _ret
+ str r0, [sp, $8]
+ mov r0, r1
+ mov r1, r2
+ mov r2, r3
+ mov pc, sp
+_ret: add sp, sp, $0xc
+ RETINSTR(mov, pc, r14)
+
+_reti: .word 0xe51ff004 @ ldr pc, [pc, $4]
+
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
new file mode 100644
index 0000000..6478a5d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 1992, 93, 95, 96, 97 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
+ARM changes by Philip Blundell, <pjb27@cam.ac.uk>, May 1997.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _LINUX_ARM_SYSDEP_H
+#define _LINUX_ARM_SYSDEP_H 1
+
+/* There is some commonality. */
+#include <sysdeps/unix/arm/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#define SWI_BASE (9 << 20)
+#define SYS_ify(syscall_name) (SWI_BASE + __NR_##syscall_name)
+
+
+#ifdef ASSEMBLER
+
+/* Linux uses a negative return value to indicate syscall errors,
+ unlike most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be
+ negative even if the call succeeded. E.g., the `lseek' system call
+ might return a large offset. Therefore we must not anymore test
+ for < 0, but test for a real error by making sure the value in %eax
+ is a real error number. Linus said he will make sure the no syscall
+ returns a value in -1 .. -4095 as a valid result so we can savely
+ test with -4095. */
+#undef PSEUDO
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ ENTRY (name) \
+ DO_CALL (args, syscall_name); \
+ cmn r0, $4096; \
+ bge syscall_error;
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) \
+ SYSCALL_ERROR_HANDLER \
+ END (name)
+
+#ifndef PIC
+#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+#else
+#error Aiee
+#endif /* PIC */
+
+#undef DO_CALL
+#define DO_CALL(args, syscall_name) \
+ swi SYS_ify (syscall_name);
+
+#endif /* ASSEMBLER */
+
+#endif /* linux/arm/sysdep.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd85bd75004ca186a147a3cef8433108fdf444b1
commit bd85bd75004ca186a147a3cef8433108fdf444b1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:40:24 1997 +0000
Add definition for ret and MOVE.
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
index 18e812b..1c58073 100644
--- a/sysdeps/unix/arm/sysdep.h
+++ b/sysdeps/unix/arm/sysdep.h
@@ -19,3 +19,8 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/arm/sysdep.h>
+/* Some definitions to allow the assembler in sysdeps/unix/*.S to build
+ without needing ARM-specific versions of all the files. */
+
+#define ret RETINSTR(mov, pc, r14)
+#define MOVE(a,b) mov b,a
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecda085689903d3d7e452c86d8b88b374e33450b
commit ecda085689903d3d7e452c86d8b88b374e33450b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:39:40 1997 +0000
Implementation of fork syscall for ARM.
diff --git a/sysdeps/unix/arm/fork.S b/sysdeps/unix/arm/fork.S
new file mode 100644
index 0000000..baa33e3
--- /dev/null
+++ b/sysdeps/unix/arm/fork.S
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* ARM version. */
+
+SYSCALL__ (fork, 0)
+ /* R1 is now 0 for the parent and 1 for the child. Decrement it to
+ make it -1 (all bits set) for the parent, and 0 (no bits set)
+ for the child. Then AND it with R0, so the parent gets
+ R0&-1==R0, and the child gets R0&0==0. */
+ sub r1, r1, $1
+ and r0, r0, r1
+ RETINSTR(mov, pc, r14)
+PSEUDO_END(fork)
+
+weak_alias (__fork, fork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84d2ebad2dba531fc49031901b2e0318de9c8965
commit 84d2ebad2dba531fc49031901b2e0318de9c8965
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:35:00 1997 +0000
Basic error numbers for standalone ARM platform.
diff --git a/sysdeps/standalone/arm/errnos.h b/sysdeps/standalone/arm/errnos.h
new file mode 100644
index 0000000..0b635e6
--- /dev/null
+++ b/sysdeps/standalone/arm/errnos.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This file defines the `errno' constants for standalone ARM machines.
+ These constants are essentially arbitrary. */
+
+#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath))
+#undef __need_Emath
+#define __Emath_defined 1
+
+#define EDOM 1
+#define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+#define ENOSYS 3
+#define EINVAL 4
+#define ESPIPE 5
+#define EBADF 6
+#define ENOMEM 7
+#define EACCES 8
+#define ENFILE 9
+#define EMFILE 10
+#define ENAMETOOLONG 11 /* File name too long */
+#define ELOOP 12 /* Too many symbolic links encountered */
+#define ENOMSG 13 /* No message of desired type */
+#define E2BIG 14 /* Arg list too long */
+#define EINTR 15
+#define EILSEQ 16
+#define ENOEXEC 17
+#define ENOENT 18
+#endif
+
+#define __set_errno(val) errno = (val)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f754f561dedce02e4b6a87005cb532af9a27164b
commit f754f561dedce02e4b6a87005cb532af9a27164b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:34:06 1997 +0000
Don't define DIR, but __dirstream.
diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h
index 20c4922..0645132 100644
--- a/sysdeps/standalone/dirstream.h
+++ b/sysdeps/standalone/dirstream.h
@@ -28,7 +28,7 @@ Cambridge, MA 02139, USA. */
The miscellaneous Unix `readdir' implementations read directory data
into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
-typedef struct
+struct __dirstream
{
int __fd; /* File descriptor. */
@@ -38,6 +38,6 @@ typedef struct
size_t __size; /* Total valid data in the block. */
struct dirent __entry; /* Returned by `readdir'. */
- } DIR;
+ };
#endif /* dirstream.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c6c6ee3d3afade5ef2bfb124e9e7a3e4734540a
commit 6c6c6ee3d3afade5ef2bfb124e9e7a3e4734540a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 21 01:22:18 1997 +0000
Don't include bstring.h, it doesn't exist.
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index 44e7a43..598c15c 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -19,7 +19,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#include <bstring.h>
+#include <string.h>
#undef ffs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3f522176258857fc328909757f6f4da9f3d57d4
commit e3f522176258857fc328909757f6f4da9f3d57d4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat May 10 23:36:46 1997 +0000
TTY definitions.
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h
new file mode 100644
index 0000000..d4ee4ac
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/ttydefaults.h
@@ -0,0 +1,104 @@
+/*-
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94
+ */
+
+/*
+ * System wide defaults for terminal state. SunOS 4 version.
+ */
+#ifndef _SYS_TTYDEFAULTS_H_
+#define _SYS_TTYDEFAULTS_H_
+
+/*
+ * Defaults on "first" open.
+ */
+#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
+#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
+#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
+#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
+#define TTYDEF_SPEED (B9600)
+
+/*
+ * Control Character Defaults
+ */
+#define CTRL(x) (x&037)
+#define CEOF CTRL('d')
+#ifdef _POSIX_VDISABLE
+# define CEOL _POSIX_VDISABLE
+#else
+# define CEOL ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */
+#endif
+#define CERASE 0177
+#define CINTR CTRL('c')
+#ifdef _POSIX_VDISABLE
+# define CSTATUS _POSIX_VDISABLE
+#else
+# define CSTATUS ((unsigned char)'\377') /* XXX avoid _POSIX_VDISABLE */
+#endif
+#define CKILL CTRL('u')
+#define CMIN 1
+#define CQUIT 034 /* FS, ^\ */
+#define CSUSP CTRL('z')
+#define CTIME 0
+#define CDSUSP CTRL('y')
+#define CSTART CTRL('q')
+#define CSTOP CTRL('s')
+#define CLNEXT CTRL('v')
+#define CDISCARD CTRL('o')
+#define CWERASE CTRL('w')
+#define CREPRINT CTRL('r')
+#define CEOT CEOF
+/* compat */
+#define CBRK CEOL
+#define CRPRNT CREPRINT
+#define CFLUSH CDISCARD
+
+/* PROTECTED INCLUSION ENDS HERE */
+#endif /* !_SYS_TTYDEFAULTS_H_ */
+
+/*
+ * #define TTYDEFCHARS to include an array of default control characters.
+ */
+#ifdef TTYDEFCHARS
+cc_t ttydefchars[NCCS] = {
+ CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
+ _POSIX_VDISABLE, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
+ CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE
+};
+#undef TTYDEFCHARS
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f85544d18abb403d9f1d006090877070ff8773d
commit 0f85544d18abb403d9f1d006090877070ff8773d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:31:06 1997 +0000
Likewise tuck the thread data onto the new thread's stack.
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 5d36e25..aab4e59 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -42,9 +42,12 @@ ENTRY(__clone)
beq a0,$error /* no NULL function pointers */
beq a1,$error /* no NULL stack pointers */
+ /* Save the fn ptr and arg on the new stack. */
+ subq a1,16,a1
+ stq a0,0(a1)
+ stq a3,8(a1)
+
/* Do the system call */
- mov a0,pv /* get fn ptr out of the way */
- mov a3,t0 /* get fn arg out of the way */
mov a2,a0
ldiq v0,__NR_clone
call_pal PAL_callsys
@@ -73,8 +76,12 @@ thread_start:
mov zero,fp
.prologue 0
+ /* Load up the arguments. */
+ ldq pv,0(sp)
+ ldq a0,8(sp)
+ addq sp,16,sp
+
/* Call the user's function */
- mov t0,a0
jsr ra,(pv)
ldgp gp,0(ra)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0fda13c3800dfca97266c49307419f923056b7e
commit c0fda13c3800dfca97266c49307419f923056b7e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:30:58 1997 +0000
Don't presume that the kernel will preserve non-call-saved registers;
save and restore a0 across the system call.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index f44686b..74fef64 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -37,8 +37,9 @@ __curbrk: .skip 8
#endif
.text
-LEAF(__brk, 0)
+LEAF(__brk, 8)
ldgp gp, 0(t12)
+ subq sp, 8, sp
#ifdef PROF
.set noat
lda AT, _mcount
@@ -47,9 +48,14 @@ LEAF(__brk, 0)
#endif
.prologue 1
+ /* Save the requested brk across the system call. */
+ stq a0, 0(sp)
+
ldiq v0, __NR_brk
call_pal PAL_callsys
+ ldq a0, 0(sp)
+
/* Be prepared for an OSF-style brk. */
bne a3, $err1
beq v0, $ok
@@ -62,11 +68,13 @@ LEAF(__brk, 0)
/* Update __curbrk and return cleanly. */
mov zero, v0
$ok: stq a0, __curbrk
+ addq sp, 8, sp
ret
/* What a horrible way to die. */
$err0: ldi v0, ENOMEM
-$err1: jmp zero, __syscall_error
+$err1: addq sp, 8, sp
+ jmp zero, __syscall_error
END(__brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7af313d349ac63239d2b2ef8ad7bffb2feec488
commit e7af313d349ac63239d2b2ef8ad7bffb2feec488
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:29:27 1997 +0000
Rewritten.
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
index 439eae1..85e73b8 100644
--- a/sysdeps/m68k/fpu/s_ccosh.c
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -25,9 +25,6 @@
#ifndef SUFF
#define SUFF
#endif
-#ifndef huge_val
-#define huge_val HUGE_VAL
-#endif
#ifndef float_type
#define float_type double
#endif
@@ -40,78 +37,40 @@ __complex__ float_type
s(__ccosh) (__complex__ float_type x)
{
__complex__ float_type retval;
+ unsigned long ix_cond = __m81_test (__imag__ x);
- __real__ x = s(fabs) (__real__ x);
-
- if (m81(__finite) (__real__ x))
+ if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
{
- if (m81(__finite) (__imag__ x))
- {
- float_type cosh_val;
- float_type sin_ix, cos_ix;
+ /* Imaginary part is finite. */
+ float_type sin_ix, cos_ix;
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- cosh_val = m81(__ieee754_cosh) (__real__ x);
- __real__ retval = cos_ix * cosh_val;
- __imag__ retval = sin_ix * cosh_val;
- }
- else if (__real__ x == 0)
- {
- __imag__ retval = 0.0;
- __real__ retval = huge_val - huge_val;
- }
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval = cos_ix * m81(__ieee754_cosh) (__real__ x);
+ if (ix_cond & __M81_COND_ZERO)
+ __imag__ retval = (m81(__signbit) (__real__ x)
+ ? -__imag__ x : __imag__ x);
else
- __real__ retval = __imag__ retval = huge_val - huge_val;
+ __imag__ retval = sin_ix * m81(__ieee754_sinh) (__real__ x);
}
- else if (m81(__isinf) (__real__ x))
+ else
{
- if (__imag__ x == 0)
- {
- __real__ retval = huge_val;
- __imag__ retval = __imag__ x;
- }
- else if (m81(__finite) (__imag__ x))
- {
- float_type remainder, pi_2;
- int quadrant;
- __real__ retval = __imag__ retval = huge_val;
+ unsigned long rx_cond = __m81_test (__real__ x);
- __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
- __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
- : "=f" (remainder), "=dm" (quadrant)
- : "f" (pi_2), "0" (__imag__ x));
- quadrant = (quadrant >> 16) & 0x83;
- if (quadrant & 0x80)
- quadrant ^= 0x83;
- switch (quadrant)
- {
- default:
- break;
- case 1:
- __real__ retval = -__real__ retval;
- break;
- case 2:
- __real__ retval = -__real__ retval;
- case 3:
- __imag__ retval = -__imag__ retval;
- break;
- }
+ if (rx_cond & __M81_COND_ZERO)
+ {
+ __real__ retval = __imag__ x - __imag__ x;
+ __imag__ retval = __real__ x;
}
else
{
- /* The subtraction raises the invalid exception. */
- __real__ retval = huge_val;
- __imag__ retval = huge_val - huge_val;
+ if (rx_cond & __M81_COND_INF)
+ __real__ retval = s(fabs) (__real__ x);
+ else
+ __real__ retval = 0.0/0.0;
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
- else if (__imag__ x == 0)
- {
- __real__ retval = 0.0/0.0;
- __imag__ retval = __imag__ x;
- }
- else
- __real__ retval = __imag__ retval = 0.0/0.0;
return retval;
}
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index 4846ec1..86cc894 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -25,9 +25,6 @@
#ifndef SUFF
#define SUFF
#endif
-#ifndef huge_val
-#define huge_val HUGE_VAL
-#endif
#ifndef float_type
#define float_type double
#endif
@@ -40,85 +37,79 @@ __complex__ float_type
s(__cexp) (__complex__ float_type x)
{
__complex__ float_type retval;
+ unsigned long ix_cond;
+
+ ix_cond = __m81_test (__imag__ x);
- if (m81(__finite) (__real__ x))
+ if ((ix_cond & (__M81_COND_NAN|__M81_COND_INF)) == 0)
{
- if (m81(__finite) (__imag__ x))
+ /* Imaginary part is finite. */
+ float_type exp_val = m81(__ieee754_exp) (__real__ x);
+
+ __real__ retval = __imag__ retval = exp_val;
+ if (m81(__finite) (exp_val))
{
- float_type exp_val = m81(__ieee754_exp) (__real__ x);
+ float_type sin_ix, cos_ix;
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval *= cos_ix;
+ if (ix_cond & __M81_COND_ZERO)
+ __imag__ retval = __imag__ x;
+ else
+ __imag__ retval *= sin_ix;
+ }
+ else
+ {
+ /* Compute the sign of the result. */
+ float_type remainder, pi_2;
+ int quadrant;
- __real__ retval = __imag__ retval = exp_val;
- if (m81(__finite) (exp_val))
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ switch (quadrant)
{
- float_type sin_ix, cos_ix;
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval *= cos_ix;
- __imag__ retval *= sin_ix;
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
}
- else
- goto fix_sign;
+ if (ix_cond & __M81_COND_ZERO && !m81(__isnan) (exp_val))
+ __imag__ retval = __imag__ x;
}
- else
- /* If the imaginary part is +-inf or NaN and the real part is
- not +-inf the result is NaN + iNaN. */
- __real__ retval = __imag__ retval = 0.0/0.0;
}
- else if (m81(__isinf) (__real__ x))
+ else
{
- if (m81(__finite) (__imag__ x))
- {
- float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+ unsigned long rx_cond = __m81_test (__real__ x);
- if (__imag__ x == 0.0)
+ if (rx_cond & __M81_COND_INF)
+ {
+ /* Real part is infinite. */
+ if (rx_cond & __M81_COND_NEG)
{
- __real__ retval = value;
- __imag__ retval = __imag__ x;
+ __real__ retval = __imag__ retval = 0.0;
+ if (ix_cond & __M81_COND_NEG)
+ __imag__ retval = -__imag__ retval;
}
else
{
- float_type remainder, pi_2;
- int quadrant;
- __real__ retval = value;
- __imag__ retval = value;
-
- fix_sign:
- __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
- __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
- : "=f" (remainder), "=dm" (quadrant)
- : "f" (pi_2), "0" (__imag__ x));
- quadrant = (quadrant >> 16) & 0x83;
- if (quadrant & 0x80)
- quadrant ^= 0x83;
- switch (quadrant)
- {
- default:
- break;
- case 1:
- __real__ retval = -__real__ retval;
- break;
- case 2:
- __real__ retval = -__real__ retval;
- case 3:
- __imag__ retval = -__imag__ retval;
- break;
- }
+ __real__ retval = __real__ x;
+ __imag__ retval = __imag__ x - __imag__ x;
}
}
- else if (m81(__signbit) (__real__ x) == 0)
- {
- __real__ retval = huge_val;
- __imag__ retval = 0.0/0.0;
- }
else
- {
- __real__ retval = 0.0;
- __imag__ retval = s(__copysign) (0.0, __imag__ x);
- }
+ __real__ retval = __imag__ retval = __imag__ x - __imag__ x;
}
- else
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __imag__ retval = 0.0/0.0;
return retval;
}
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
index c409ed0..643a221 100644
--- a/sysdeps/m68k/fpu/s_csinh.c
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -25,9 +25,6 @@
#ifndef SUFF
#define SUFF
#endif
-#ifndef huge_val
-#define huge_val HUGE_VAL
-#endif
#ifndef float_type
#define float_type double
#endif
@@ -40,87 +37,33 @@ __complex__ float_type
s(__csinh) (__complex__ float_type x)
{
__complex__ float_type retval;
- int negate = m81(__signbit) (__real__ x);
+ unsigned long ix_cond;
- __real__ x = s(fabs) (__real__ x);
+ ix_cond = __m81_test (__imag__ x);
- if (m81(__finite) (__real__ x))
+ if ((ix_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
{
- if (m81(__finite) (__imag__ x))
- {
- float_type sinh_val;
- float_type sin_ix, cos_ix;
-
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- sinh_val = m81(__ieee754_sinh) (__real__ x);
- __real__ retval = cos_ix * sinh_val;
- __imag__ retval = sin_ix * sinh_val;
+ /* Imaginary part is finite. */
+ float_type sin_ix, cos_ix;
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else if (__real__ x == 0)
- {
- __real__ retval = 0.0;
- __imag__ retval = 0.0/0.0;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval = cos_ix * m81(__ieee754_sinh) (__real__ x);
+ if (ix_cond & __M81_COND_ZERO)
+ __imag__ retval = __imag__ x;
else
- __real__ retval = __imag__ retval = 0.0/0.0;
+ __imag__ retval = sin_ix * m81(__ieee754_cosh) (__real__ x);
}
- else if (m81(__isinf) (__real__ x))
+ else
{
- if (__imag__ x == 0.0)
- {
- __real__ retval = negate ? -huge_val : huge_val;
- __imag__ retval = __imag__ x;
- }
- else if (m81(__finite) (__imag__ x))
- {
- float_type remainder, pi_2;
- int quadrant;
- __real__ retval = __imag__ retval = huge_val;
+ unsigned long rx_cond = __m81_test (__real__ x);
- __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
- __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
- : "=f" (remainder), "=dm" (quadrant)
- : "f" (pi_2), "0" (__imag__ x));
- quadrant = (quadrant >> 16) & 0x83;
- if (quadrant & 0x80)
- quadrant ^= 0x83;
- if (negate)
- quadrant ^= 1;
- switch (quadrant)
- {
- default:
- break;
- case 1:
- __real__ retval = -__real__ retval;
- break;
- case 2:
- __real__ retval = -__real__ retval;
- case 3:
- __imag__ retval = -__imag__ retval;
- break;
- }
- }
+ __imag__ retval = __imag__ x - __imag__ x;
+ if (rx_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN))
+ __real__ retval = __real__ x;
else
- {
- /* The subtraction raises the invalid exception. */
- __real__ retval = huge_val;
- __imag__ retval = huge_val - huge_val;
- }
+ __real__ retval = __imag__ retval;
}
- else if (__imag__ x == 0.0)
- {
- __real__ retval = 0.0/0.0;
- __imag__ retval = __imag__ x;
- }
- else
- __real__ retval = __imag__ retval = 0.0/0.0;
return retval;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=761edbdece3f465469d5018186e166b8e0a23656
commit 761edbdece3f465469d5018186e166b8e0a23656
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:29:22 1997 +0000
Don't define huge_val.
diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c
index 7d07668..3c8e7c7 100644
--- a/sysdeps/m68k/fpu/s_ccoshf.c
+++ b/sysdeps/m68k/fpu/s_ccoshf.c
@@ -1,4 +1,3 @@
#define SUFF f
#define float_type float
-#define huge_val HUGE_VALF
#include <s_ccosh.c>
diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c
index 6f1d1e5..772d578 100644
--- a/sysdeps/m68k/fpu/s_ccoshl.c
+++ b/sysdeps/m68k/fpu/s_ccoshl.c
@@ -1,4 +1,3 @@
#define SUFF l
#define float_type long double
-#define huge_val HUGE_VALL
#include <s_ccosh.c>
diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/fpu/s_cexpf.c
index db9f174..177a360 100644
--- a/sysdeps/m68k/fpu/s_cexpf.c
+++ b/sysdeps/m68k/fpu/s_cexpf.c
@@ -1,4 +1,3 @@
#define SUFF f
-#define huge_val HUGE_VALF
#define float_type float
#include <s_cexp.c>
diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/fpu/s_cexpl.c
index 7367070..bbda4ba 100644
--- a/sysdeps/m68k/fpu/s_cexpl.c
+++ b/sysdeps/m68k/fpu/s_cexpl.c
@@ -1,4 +1,3 @@
#define SUFF l
-#define huge_val HUGE_VALL
#define float_type long double
#include <s_cexp.c>
diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c
index 42c114b..2f7a43e 100644
--- a/sysdeps/m68k/fpu/s_csinhf.c
+++ b/sysdeps/m68k/fpu/s_csinhf.c
@@ -1,4 +1,3 @@
#define SUFF f
#define float_type float
-#define huge_val HUGE_VALF
#include <s_csinh.c>
diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c
index c8aa5c7..026a20e 100644
--- a/sysdeps/m68k/fpu/s_csinhl.c
+++ b/sysdeps/m68k/fpu/s_csinhl.c
@@ -1,4 +1,3 @@
#define SUFF l
#define float_type long double
-#define huge_val HUGE_VALL
#include <s_csinh.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d607f9b1a45937ccf5e8cce94e96d1860a957105
commit d607f9b1a45937ccf5e8cce94e96d1860a957105
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:28:03 1997 +0000
m68k specific complex sine implementation for long double.
diff --git a/sysdeps/m68k/fpu/s_csinl.c b/sysdeps/m68k/fpu/s_csinl.c
new file mode 100644
index 0000000..ea2dad0
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinl.c
@@ -0,0 +1,3 @@
+#define SUFF l
+#define float_type long double
+#include <s_csin.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=290960f75826a6d19078576f5904614f4c01aac4
commit 290960f75826a6d19078576f5904614f4c01aac4
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:27:51 1997 +0000
m68k specific complex sine implementation for float.
diff --git a/sysdeps/m68k/fpu/s_csinf.c b/sysdeps/m68k/fpu/s_csinf.c
new file mode 100644
index 0000000..b760e19
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinf.c
@@ -0,0 +1,3 @@
+#define SUFF f
+#define float_type float
+#include <s_csin.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=29b12174ee3d44a351974dee6c6394c05bd8b18e
commit 29b12174ee3d44a351974dee6c6394c05bd8b18e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:27:44 1997 +0000
m68k specific complex sine implementation for double.
diff --git a/sysdeps/m68k/fpu/s_csin.c b/sysdeps/m68k/fpu/s_csin.c
new file mode 100644
index 0000000..8eecd96
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csin.c
@@ -0,0 +1,69 @@
+/* Complex sine function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__csin) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+ unsigned long rx_cond = __m81_test (__real__ x);
+
+ if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
+ {
+ /* Real part is finite. */
+ float_type sin_rx, cos_rx;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx)
+ : "f" (__real__ x));
+ if (rx_cond & __M81_COND_ZERO)
+ __real__ retval = __real__ x;
+ else
+ __real__ retval = sin_rx * m81(__ieee754_cosh) (__imag__ x);
+ __imag__ retval = cos_rx * m81(__ieee754_sinh) (__imag__ x);
+ }
+ else
+ {
+ unsigned long ix_cond = __m81_test (__imag__ x);
+
+ __real__ retval = __real__ x - __real__ x;
+ if (ix_cond & (__M81_COND_ZERO|__M81_COND_INF|__M81_COND_NAN))
+ __imag__ retval = __imag__ x;
+ else
+ __imag__ retval = __real__ retval;
+ }
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__csin), s(csin))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=46a66e25c6925f3476663e6baf882f6ee0bb49e8
commit 46a66e25c6925f3476663e6baf882f6ee0bb49e8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:27:27 1997 +0000
m68k specific complex cosine implementation for long double.
diff --git a/sysdeps/m68k/fpu/s_ccosl.c b/sysdeps/m68k/fpu/s_ccosl.c
new file mode 100644
index 0000000..aaff365
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccosl.c
@@ -0,0 +1,3 @@
+#define SUFF l
+#define float_type long double
+#include <s_ccos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc2cf9ae39684f70eeda160e6fa715475a7704f6
commit fc2cf9ae39684f70eeda160e6fa715475a7704f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:27:16 1997 +0000
m68k specific complex cosine implementation for float.
diff --git a/sysdeps/m68k/fpu/s_ccosf.c b/sysdeps/m68k/fpu/s_ccosf.c
new file mode 100644
index 0000000..f5e8a41
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccosf.c
@@ -0,0 +1,3 @@
+#define SUFF f
+#define float_type float
+#include <s_ccos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc993309203d0fd2fd1b4d47df5f49448afe9277
commit bc993309203d0fd2fd1b4d47df5f49448afe9277
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:27:03 1997 +0000
m68k specific complex cosine implementation.
diff --git a/sysdeps/m68k/fpu/s_ccos.c b/sysdeps/m68k/fpu/s_ccos.c
new file mode 100644
index 0000000..53f8286
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccos.c
@@ -0,0 +1,73 @@
+/* Complex cosine function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__ccos) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+ unsigned long rx_cond = __m81_test (__real__ x);
+
+ if ((rx_cond & (__M81_COND_INF|__M81_COND_NAN)) == 0)
+ {
+ /* Real part is finite. */
+ float_type sin_rx, cos_rx;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_rx), "=f" (cos_rx)
+ : "f" (__real__ x));
+ __real__ retval = cos_rx * m81(__ieee754_cosh) (__imag__ x);
+ if (rx_cond & __M81_COND_ZERO)
+ __imag__ retval = (m81(__signbit) (__imag__ x)
+ ? __real__ x : -__real__ x);
+ else
+ __imag__ retval = -sin_rx * m81(__ieee754_sinh) (__imag__ x);
+ }
+ else
+ {
+ unsigned long ix_cond = __m81_test (__imag__ x);
+
+ if (ix_cond & __M81_COND_INF)
+ __real__ retval = s(fabs) (__imag__ x);
+ else
+ __real__ retval = __real__ x - __real__ x;
+ if (ix_cond & __M81_COND_ZERO)
+ __imag__ retval = __imag__ x;
+ else
+ __imag__ retval = __real__ x - __real__ x;
+ }
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__ccos), s(ccos))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4291e757513ff4c788f435fed697b10c48108b0c
commit 4291e757513ff4c788f435fed697b10c48108b0c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:26:29 1997 +0000
Raise invalid exception for NaN result.
Use __m81_test.
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index a39b63d..b3d151f 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -36,29 +36,33 @@ s(__ieee754_pow) (float_type x, float_type y)
{
float_type z;
float_type ax;
+ unsigned long x_cond, y_cond;
- if (y == 0.0)
+ y_cond = __m81_test (y);
+ if (y_cond & __M81_COND_ZERO)
return 1.0;
- if (x != x || y != y)
+
+ x_cond = __m81_test (x);
+ if ((x_cond | y_cond) & __M81_COND_NAN)
return x + y;
- if (m81(__isinf) (y))
+ if (y_cond & __M81_COND_INF)
{
ax = s(fabs) (x);
if (ax == 1)
- return 0.0/0.0;
+ return y - y;
if (ax > 1)
- return y > 0 ? y : 0;
+ return y_cond & __M81_COND_NEG ? 0 : y;
else
- return y < 0 ? -y : 0;
+ return y_cond & __M81_COND_NEG ? -y : 0;
}
if (s(fabs) (y) == 1)
- return y > 0 ? x : 1 / x;
+ return y_cond & __M81_COND_NEG ? 1 / x : x;
if (y == 2)
return x * x;
- if (y == 0.5 && x >= 0)
+ if (y == 0.5 && !(x_cond & __M81_COND_NEG))
return m81(__ieee754_sqrt) (x);
if (x == 10.0)
@@ -73,17 +77,17 @@ s(__ieee754_pow) (float_type x, float_type y)
}
ax = s(fabs) (x);
- if (m81(__isinf) (x) || x == 0 || ax == 1)
+ if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1)
{
z = ax;
- if (y < 0)
+ if (y_cond & __M81_COND_NEG)
z = 1 / z;
- if (m81(__signbit) (x))
+ if (x_cond & __M81_COND_NEG)
{
if (y != m81(__rint) (y))
{
if (x == -1)
- z = 0.0/0.0;
+ z = (z - z) / (z - z);
}
else
goto maybe_negate;
@@ -91,7 +95,7 @@ s(__ieee754_pow) (float_type x, float_type y)
return z;
}
- if (x < 0.0)
+ if (x_cond & __M81_COND_NEG)
{
if (y == m81(__rint) (y))
{
@@ -112,7 +116,7 @@ s(__ieee754_pow) (float_type x, float_type y)
}
}
else
- z = 0.0/0.0;
+ z = (y - y) / (y - y);
}
else
z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08c2dbb9a20fa10e3b596d5fbbed8d7a54a71f5d
commit 08c2dbb9a20fa10e3b596d5fbbed8d7a54a71f5d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 15:26:19 1997 +0000
(__frexp): Don't raise invalid exception on infinite value.
(__m81_test, __M81_COND_NAN, __M81_COND_INF, __M81_COND_NEG,
__M81_COND_ZERO): New definitions.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 92487f9..5dc4d2e 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -153,6 +153,21 @@ __internal_inline_functions (float,f)
__internal_inline_functions (long double,l)
#undef __internal_inline_functions
+/* Get the m68881 condition codes, to quickly check multiple conditions. */
+static __inline__ unsigned long
+__m81_test (long double __val)
+{
+ unsigned long __fpsr;
+ __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val));
+ return __fpsr;
+}
+
+/* Bit values returned by __m81_test. */
+#define __M81_COND_NAN (1 << 24)
+#define __M81_COND_INF (2 << 24)
+#define __M81_COND_ZERO (4 << 24)
+#define __M81_COND_NEG (8 << 24)
+
#endif /* __LIBC_M81_MATH_INLINES */
/* The rest of the functions are available to the user. */
@@ -163,8 +178,12 @@ __m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
{ \
float_type __mantissa, __exponent; \
int __iexponent; \
- if (__value == 0.0) \
+ unsigned long __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ if (__fpsr & (7 << 24)) \
{ \
+ /* Not finite or zero. */ \
*__expptr = 0; \
return __value; \
} \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9b08b8835394745ba31ec3ff4ca9e1fd14631b2
commit e9b08b8835394745ba31ec3ff4ca9e1fd14631b2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed May 7 14:32:55 1997 +0000
(elf_machine_rela): Check for mismatch in size for copy relocation.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index d79ef25..e6b8f9e 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -22,6 +22,8 @@
#define ELF_MACHINE_NAME "m68k"
+#include <sys/param.h>
+
#include <assert.h>
/* Return nonzero iff E_MACHINE is compatible with the running host. */
@@ -54,14 +56,14 @@ static inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
- asm ("here: lea here(%%pc), %0\n"
- " sub.l %#here, %0"
+ asm (".Lhere: lea .Lhere(%%pc), %0\n"
+ " sub.l %#.Lhere, %0"
: "=a" (addr));
return addr;
}
/* The `subl' insn above will contain an R_68K_RELATIVE relocation
- entry intended to insert the run-time address of the label `here'.
+ entry intended to insert the run-time address of the label `.Lhere'.
This will be the first relocation in the text of the dynamic
linker; we skip it to avoid trying to modify read-only text in this
early stage. */
@@ -215,6 +217,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = map->l_addr + reloc->r_addend;
else
{
+ const Elf32_Sym *const refsym = sym;
Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
if (sym)
value += sym->st_value;
@@ -222,7 +225,18 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- memcpy (reloc_addr, (void *) value, sym->st_size);
+ if (sym->st_size != refsym->st_size)
+ {
+ const char *strtab;
+
+ strtab = ((void *) map->l_addr
+ + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ _dl_sysdep_error ("Symbol `", strtab + refsym->st_name,
+ "' has different size in shared object, "
+ "consider re-linking\n", NULL);
+ }
+ memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
+ refsym->st_size));
break;
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75635b00de773d61a04d7a0217d8c8df70dfde9c
commit 75635b00de773d61a04d7a0217d8c8df70dfde9c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 30 15:49:27 1997 +0000
Save the function argument in t0 rather than a4 to avoid it being
clobbered.
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 261bd81..5d36e25 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -44,7 +44,7 @@ ENTRY(__clone)
/* Do the system call */
mov a0,pv /* get fn ptr out of the way */
- mov a3,a4 /* get fn arg out of the way */
+ mov a3,t0 /* get fn arg out of the way */
mov a2,a0
ldiq v0,__NR_clone
call_pal PAL_callsys
@@ -74,7 +74,7 @@ thread_start:
.prologue 0
/* Call the user's function */
- mov a4,a0
+ mov t0,a0
jsr ra,(pv)
ldgp gp,0(ra)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=947a127d2b25baaee34162ebe29900fa2cdffda3
commit 947a127d2b25baaee34162ebe29900fa2cdffda3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 11:38:01 1997 +0000
m68k specific optimized version of sincos for long double.
diff --git a/sysdeps/m68k/fpu/s_sincosl.c b/sysdeps/m68k/fpu/s_sincosl.c
new file mode 100644
index 0000000..f998cc0
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sincosl.c
@@ -0,0 +1,3 @@
+#define FUNC sincosl
+#define float_type long double
+#include <s_sincos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ffe33322dbf8ecfea8c61b68c1d1121cb166ec82
commit ffe33322dbf8ecfea8c61b68c1d1121cb166ec82
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 11:37:48 1997 +0000
m68k specific optimized version of sincos for float.
diff --git a/sysdeps/m68k/fpu/s_sincosf.c b/sysdeps/m68k/fpu/s_sincosf.c
new file mode 100644
index 0000000..7ee2ec6
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sincosf.c
@@ -0,0 +1,3 @@
+#define FUNC sincosf
+#define float_type float
+#include <s_sincos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f119590d6c6f85894bd15293d29542cd38281eec
commit f119590d6c6f85894bd15293d29542cd38281eec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 11:37:37 1997 +0000
m68k specific optimized version of sincos for double.
diff --git a/sysdeps/m68k/fpu/s_sincos.c b/sysdeps/m68k/fpu/s_sincos.c
new file mode 100644
index 0000000..ada21d0
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sincos.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC sincos
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+
+void
+CONCATX(__,FUNC) (x, sinx, cosx)
+ float_type x, *sinx, *cosx;
+{
+ __m81_u(CONCATX(__,FUNC))(x, sinx, cosx);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (CONCATX(__,FUNC), FUNC)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=334ca6573bd4bcc070f984c11adb59762de6692a
commit 334ca6573bd4bcc070f984c11adb59762de6692a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 11:36:58 1997 +0000
Rewrite handling of integral exponent.
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index 284f1bf..a39b63d 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -80,51 +80,36 @@ s(__ieee754_pow) (float_type x, float_type y)
z = 1 / z;
if (m81(__signbit) (x))
{
- float_type temp = m81(__rint) (y);
- if (y != temp)
+ if (y != m81(__rint) (y))
{
if (x == -1)
z = 0.0/0.0;
}
else
- {
- if (sizeof (float_type) == sizeof (float))
- {
- long i = (long) y;
- if (i & 1)
- z = -z;
- }
- else
- {
- long long i = (long long) y;
- if ((float_type) i == y && i & 1)
- z = -z;
- }
- }
+ goto maybe_negate;
}
return z;
}
if (x < 0.0)
{
- float_type temp = m81(__rint) (y);
- if (y == temp)
+ if (y == m81(__rint) (y))
{
- long long i = (long long) y;
z = m81(__ieee754_exp) (y * m81(__ieee754_log) (-x));
- if (sizeof (float_type) == sizeof (float))
- {
- long i = (long) y;
- if (i & 1)
- z = -z;
- }
- else
- {
- /* If the conversion to long long was inexact assume that y
- is an even integer. */
- if ((float_type) i == y && i & 1)
- z = -z;
- }
+ maybe_negate:
+ /* We always use the long double format, since y is already in
+ this format and rounding won't change the result. */
+ {
+ int32_t exponent;
+ u_int32_t i0, i1;
+ GET_LDOUBLE_WORDS (exponent, i0, i1, y);
+ exponent = (exponent & 0x7fff) - 0x3fff;
+ if (exponent <= 31
+ ? i0 & (1 << (31 - exponent))
+ : (exponent <= 63
+ && i1 & (1 << (63 - exponent))))
+ z = -z;
+ }
}
else
z = 0.0/0.0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecc1637a091abccb81884aff172f30a37b3d4fe1
commit ecc1637a091abccb81884aff172f30a37b3d4fe1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 21 11:36:45 1997 +0000
Define optimized versions of isgreater, isgreaterequal, isless,
islessequal, islessgreater, and isunordered.
Add inlined sincos{,l,f}.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 68a6d90..92487f9 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -274,6 +274,14 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
__asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
: "dmi" (__ctrl_reg)); \
return __result; \
+} \
+ \
+__m81_inline void \
+__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \
+ float_type *__cosx) \
+{ \
+ __asm ("fsincos%.x %2,%1:%0" \
+ : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \
}
/* This defines the three variants of the inline functions. */
@@ -324,6 +332,10 @@ __inline_forward_c(int,ilogb, (double __value), (__value))
#ifdef __USE_ISOC9X
__inline_forward_c(double,nearbyint, (double __value), (__value))
#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx),
+ (__x, __sinx, __cosx))
+#endif
#if defined __USE_MISC || defined __USE_ISOC9X
@@ -341,6 +353,10 @@ __inline_forward_c(int,ilogbf, (float __value), (__value))
#ifdef __USE_ISOC9X
__inline_forward_c(float,nearbyintf, (float __value), (__value))
#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx),
+ (__x, __sinx, __cosx))
+#endif
__inline_forward(long double,frexpl, (long double __value, int *__expptr),
(__value, __expptr))
@@ -358,12 +374,72 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value))
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
__inline_forward_c(long int,rinttol, (long double __value), (__value))
#endif
+#ifdef __USE_GNU
+__inline_forward(void,sincosl,
+ (long double __x, long double *__sinx, long double *__cosx),
+ (__x, __sinx, __cosx))
+#endif
#endif /* Use misc or ISO C9X */
#undef __inline_forward
#undef __inline_forward_c
+#ifdef __USE_ISOC9X
+
+/* ISO C 9X defines some macros to perform unordered comparisons. The
+ m68k FPU supports this with special opcodes and we should use them.
+ These must not be inline functions since we have to be able to handle
+ all floating-point types. */
+#undef isgreater
+#define isgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsogt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isgreaterequal
+#define isgreaterequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsoge %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isless
+#define isless(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsolt %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef islessequal
+#define islessequal(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsole %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef islessgreater
+#define islessgreater(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsogl %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+
+#undef isunordered
+#define isunordered(x, y) \
+ __extension__ \
+ ({ char __result; \
+ __asm__ ("fcmp %2,%1; fsun %0" \
+ : "=dm" (__result) : "f" (x), "f" (y)); \
+ (int) __result; })
+#endif
+
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
#endif /* GCC. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c72aa4a26aca9fd04fffb751b93aec59b2f1edc0
commit c72aa4a26aca9fd04fffb751b93aec59b2f1edc0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 17 15:09:43 1997 +0000
m68k specific math exception handling code.
diff --git a/sysdeps/m68k/fpu/fclrexcpt.c b/sysdeps/m68k/fpu/fclrexcpt.c
new file mode 100644
index 0000000..b914bac
--- /dev/null
+++ b/sysdeps/m68k/fpu/fclrexcpt.c
@@ -0,0 +1,39 @@
+/* Clear given exceptions in current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feclearexcept (int excepts)
+{
+ fexcept_t fpsr;
+
+ /* Mask out unsupported bits/exceptions. */
+ excepts &= FE_ALL_EXCEPT;
+
+ /* Fetch the fpu status register. */
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+
+ /* Clear the relevant bits. */
+ fpsr &= ~excepts;
+
+ /* Put the new data in effect. */
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+}
diff --git a/sysdeps/m68k/fpu/fegetenv.c b/sysdeps/m68k/fpu/fegetenv.c
new file mode 100644
index 0000000..59f743a
--- /dev/null
+++ b/sysdeps/m68k/fpu/fegetenv.c
@@ -0,0 +1,27 @@
+/* Store current floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetenv (fenv_t *envp)
+{
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp));
+}
diff --git a/sysdeps/m68k/fpu/fegetround.c b/sysdeps/m68k/fpu/fegetround.c
new file mode 100644
index 0000000..1837a84
--- /dev/null
+++ b/sysdeps/m68k/fpu/fegetround.c
@@ -0,0 +1,31 @@
+/* Return current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fegetround (void)
+{
+ int fpcr;
+
+ __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr));
+
+ return fpcr & FE_UPWARD;
+}
diff --git a/sysdeps/m68k/fpu/feholdexcpt.c b/sysdeps/m68k/fpu/feholdexcpt.c
new file mode 100644
index 0000000..351fa8a
--- /dev/null
+++ b/sysdeps/m68k/fpu/feholdexcpt.c
@@ -0,0 +1,39 @@
+/* Store current floating-point environment and clear exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+feholdexcept (fenv_t *envp)
+{
+ fexcept_t fpcr, fpsr;
+
+ /* Store the environment. */
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*envp));
+
+ /* Now clear all exceptions. */
+ fpsr = envp->status_register & ~FE_ALL_EXCEPT;
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+ /* And set all exceptions to non-stop. */
+ fpcr = envp->control_register & ~(FE_ALL_EXCEPT << 5);
+ __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
+
+ return 1;
+}
diff --git a/sysdeps/m68k/fpu/fenvbits.h b/sysdeps/m68k/fpu/fenvbits.h
new file mode 100644
index 0000000..b653b1a
--- /dev/null
+++ b/sysdeps/m68k/fpu/fenvbits.h
@@ -0,0 +1,80 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file should never be included directly. */
+
+#ifndef _FENVBITS_H
+#define _FENVBITS_H 1
+
+/* Define bits representing the exception. We use the bit positions of
+ the appropriate bits in the FPSR Accrued Exception Byte. */
+enum
+ {
+ FE_INEXACT = 1 << 3,
+#define FE_INEXACT FE_INEXACT
+ FE_DIVBYZERO = 1 << 4,
+#define FE_DIVBYZERO FE_DIVBYZERO
+ FE_UNDERFLOW = 1 << 5,
+#define FE_UNDERFLOW FE_UNDERFLOW
+ FE_OVERFLOW = 1 << 6,
+#define FE_OVERFLOW FE_OVERFLOW
+ FE_INVALID = 1 << 7
+#define FE_INVALID FE_INVALID
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The m68k FPU supports all of the four defined rounding modes. We use
+ the bit positions in the FPCR Mode Control Byte as the values for the
+ appropriate macros. */
+enum
+ {
+ FE_TONEAREST = 0,
+#define FE_TONEAREST FE_TONEAREST
+ FE_TOWARDSZERO = 1 << 4,
+#define FE_TOWARDSZERO FE_TOWARDSZERO
+ FE_DOWNWARD = 2 << 4,
+#define FE_DOWNWARD FE_DOWNWARD
+ FE_UPWARD = 3 << 4
+#define FE_UPWARD FE_UPWARD
+ };
+
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+
+/* Type representing floating-point environment. This structure
+ corresponds to the layout of the block written by `fmovem'. */
+typedef struct
+ {
+ fexcept_t control_register;
+ fexcept_t status_register;
+ }
+fenv_t;
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((fenv_t *) -1)
+
+#ifdef __USE_GNU
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((fenv_t *) -2)
+#endif
+
+#endif /* fenvbits.h */
diff --git a/sysdeps/m68k/fpu/fesetenv.c b/sysdeps/m68k/fpu/fesetenv.c
new file mode 100644
index 0000000..f6611a2
--- /dev/null
+++ b/sysdeps/m68k/fpu/fesetenv.c
@@ -0,0 +1,48 @@
+/* Install given floating-point environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fesetenv (const fenv_t *envp)
+{
+ fenv_t temp;
+
+ /* Install the environment specified by ENVP. But there are a few
+ values which we do not want to come from the saved environment.
+ Therefore, we get the current environment and replace the values
+ we want to use from the environment specified by the parameter. */
+ __asm__ ("fmovem%.l %/fpcr/%/fpsr,%0" : "=m" (*&temp));
+
+ temp.status_register &= ~FE_ALL_EXCEPT;
+ temp.control_register &= ~((FE_ALL_EXCEPT << 5) | FE_UPWARD);
+ if (envp == FE_DFL_ENV)
+ ;
+ else if (envp == FE_NOMASK_ENV)
+ temp.control_register |= FE_ALL_EXCEPT << 5;
+ else
+ {
+ temp.control_register |= (envp->control_register
+ & ((FE_ALL_EXCEPT << 5) | FE_UPWARD));
+ temp.status_register |= envp->status_register & FE_ALL_EXCEPT;
+ }
+
+ __asm__ __volatile__ ("fmovem%.l %0,%/fpcr/%/fpsr" : : "m" (temp));
+}
diff --git a/sysdeps/m68k/fpu/fesetround.c b/sysdeps/m68k/fpu/fesetround.c
new file mode 100644
index 0000000..8d5466c
--- /dev/null
+++ b/sysdeps/m68k/fpu/fesetround.c
@@ -0,0 +1,38 @@
+/* Set current rounding direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fesetround (int round)
+{
+ fexcept_t fpcr;
+
+ if (round & ~FE_UPWARD)
+ /* ROUND is no valid rounding mode. */
+ return 0;
+
+ __asm__ ("fmove%.l %!,%0" : "=dm" (fpcr));
+ fpcr &= ~FE_UPWARD;
+ fpcr |= round;
+ __asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (fpcr));
+
+ return 1;
+}
diff --git a/sysdeps/m68k/fpu/feupdateenv.c b/sysdeps/m68k/fpu/feupdateenv.c
new file mode 100644
index 0000000..f5922b4
--- /dev/null
+++ b/sysdeps/m68k/fpu/feupdateenv.c
@@ -0,0 +1,39 @@
+/* Install given floating-point environment and raise exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+feupdateenv (const fenv_t *envp)
+{
+ fexcept_t fpsr;
+
+ /* Save current exceptions. */
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+ fpsr &= FE_ALL_EXCEPT;
+
+ /* Install new environment. */
+ fesetenv (envp);
+
+ /* Raise the saved exception. Incidently for us the implementation
+ defined format of the values in objects of type fexcept_t is the
+ same as the ones specified using the FE_* constants. */
+ feraiseexcept ((int) fpsr);
+}
diff --git a/sysdeps/m68k/fpu/fgetexcptflg.c b/sysdeps/m68k/fpu/fgetexcptflg.c
new file mode 100644
index 0000000..4086e1a
--- /dev/null
+++ b/sysdeps/m68k/fpu/fgetexcptflg.c
@@ -0,0 +1,32 @@
+/* Store current representation for exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+void
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+ fexcept_t fpsr;
+
+ /* Get the current exceptions. */
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+
+ *flagp = fpsr & excepts & FE_ALL_EXCEPT;
+}
diff --git a/sysdeps/m68k/fpu/fraiseexcpt.c b/sysdeps/m68k/fpu/fraiseexcpt.c
new file mode 100644
index 0000000..b6ff827
--- /dev/null
+++ b/sysdeps/m68k/fpu/fraiseexcpt.c
@@ -0,0 +1,74 @@
+/* Raise given exceptions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+feraiseexcept (int excepts)
+{
+ /* Raise exceptions represented by EXCEPTS. But we must raise only one
+ signal at a time. It is important that if the overflow/underflow
+ exception and the divide by zero exception are given at the same
+ time, the overflow/underflow exception follows the divide by zero
+ exception. */
+
+ /* First: invalid exception. */
+ if (excepts & FE_INVALID)
+ {
+ /* One example of a invalid operation is 0 * Infinity. */
+ double d = 0.0 * HUGE_VAL;
+ /* Now force the exception. */
+ __asm__ __volatile__ ("fnop" : : "f" (d));
+ }
+
+ /* Next: division by zero. */
+ if (excepts & FE_DIVBYZERO)
+ {
+ double d = 1.0;
+ __asm__ __volatile__ ("fdiv%.s %#0r0,%0; fnop" : "=f" (d) : "0" (d));
+ }
+
+ /* Next: overflow. */
+ if (excepts & FE_OVERFLOW)
+ {
+ long double d = LDBL_MAX * LDBL_MAX;
+ /* Now force the exception. */
+ __asm__ __volatile__ ("fnop" : : "f" (d));
+ }
+
+ /* Next: underflow. */
+ if (excepts & FE_UNDERFLOW)
+ {
+ long double d = LDBL_MIN / 16.0;
+ /* Now force the exception. */
+ __asm__ __volatile__ ("fnop" : : "f" (d));
+ }
+
+ /* Last: inexact. */
+ if (excepts & FE_INEXACT)
+ {
+ long double d1, d2 = 1.0;
+ __asm__ __volatile__ ("fmovecr %#0,%0\n\t"
+ "fdiv%.x %1,%0\n\t"
+ "fnop"
+ : "=&f" (d1) : "f" (d2));
+ }
+}
diff --git a/sysdeps/m68k/fpu/fsetexcptflg.c b/sysdeps/m68k/fpu/fsetexcptflg.c
new file mode 100644
index 0000000..aa92ffd
--- /dev/null
+++ b/sysdeps/m68k/fpu/fsetexcptflg.c
@@ -0,0 +1,38 @@
+/* Set floating-point environment exception handling.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+#include <math.h>
+
+void
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+ fexcept_t fpsr;
+
+ /* Get the current status register. */
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+
+ /* Install the new exception bits in the Accrued Exception Byte. */
+ fpsr &= ~(excepts & FE_ALL_EXCEPT);
+ fpsr |= *flagp & excepts & FE_ALL_EXCEPT;
+
+ /* Store the new status register. */
+ __asm__ __volatile__ ("fmove%.l %0,%/fpsr" : : "dm" (fpsr));
+}
diff --git a/sysdeps/m68k/fpu/ftestexcept.c b/sysdeps/m68k/fpu/ftestexcept.c
new file mode 100644
index 0000000..c092ce1
--- /dev/null
+++ b/sysdeps/m68k/fpu/ftestexcept.c
@@ -0,0 +1,32 @@
+/* Test exception in current environment.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <fenv.h>
+
+int
+fetestexcept (int excepts)
+{
+ fexcept_t fpsr;
+
+ /* Get current exceptions. */
+ __asm__ ("fmove%.l %/fpsr,%0" : "=dm" (fpsr));
+
+ return fpsr & excepts & FE_ALL_EXCEPT;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1fc9ae2894f2cf125f887c4866643471e866bca
commit b1fc9ae2894f2cf125f887c4866643471e866bca
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 17 15:07:44 1997 +0000
m68k specific math type and constant definitions.
diff --git a/sysdeps/m68k/fpu/mathbits.h b/sysdeps/m68k/fpu/mathbits.h
new file mode 100644
index 0000000..0496623
--- /dev/null
+++ b/sysdeps/m68k/fpu/mathbits.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _MATHBITS_H
+#define _MATHBITS_H 1
+
+/* The m68k FPUs evaluate all values in the 96 bit floating-point format
+ which is also available for the user as `long double'. Therefore we
+ define: */
+typedef long double float_t; /* `float' expressions are evaluated as
+ `long double'. */
+typedef long double double_t; /* `double' expressions are evaluated as
+ `long double'. */
+
+/* Signal that both types are `long double'. */
+#define FLT_EVAL_METHOD 2
+
+/* Define `INFINITY' as value of type `float_t'. */
+#define INFINITY HUGE_VALL
+
+#endif /* mathbits.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27028e98181e0f1b0a9bd0e5b68eead25271713c
commit 27028e98181e0f1b0a9bd0e5b68eead25271713c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 17 15:04:34 1997 +0000
remquo implementation for long double according to IEEE.
diff --git a/sysdeps/m68k/fpu/s_remquol.c b/sysdeps/m68k/fpu/s_remquol.c
new file mode 100644
index 0000000..d236cfd
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_remquol.c
@@ -0,0 +1,3 @@
+#define SUFF l
+#define float_type long double
+#include <s_remquo.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f8f9b35864bba9e0b50daf20a80a4af1fbf91e6
commit 6f8f9b35864bba9e0b50daf20a80a4af1fbf91e6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 17 15:04:17 1997 +0000
remquo implementation for float according to IEEE.
diff --git a/sysdeps/m68k/fpu/s_remquof.c b/sysdeps/m68k/fpu/s_remquof.c
new file mode 100644
index 0000000..8a292fc
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_remquof.c
@@ -0,0 +1,3 @@
+#define SUFF f
+#define float_type float
+#include <s_remquo.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=843682819d4eca3e59fe1ccc5682cd15f492604a
commit 843682819d4eca3e59fe1ccc5682cd15f492604a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Apr 17 15:04:04 1997 +0000
remquo implementation for double according to IEEE.
diff --git a/sysdeps/m68k/fpu/s_remquo.c b/sysdeps/m68k/fpu/s_remquo.c
new file mode 100644
index 0000000..3682ba7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_remquo.c
@@ -0,0 +1,58 @@
+/* Compute remainder and a congruent to the quotient. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+
+float_type
+s(__remquo) (float_type x, float_type y, int *quo)
+{
+ float_type result;
+ int cquo, fpsr;
+
+ /* FIXME: Which of frem and fmod is correct? */
+#if 1
+ __asm ("frem%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x));
+ cquo = (fpsr >> 16) & 0x7f;
+ if ((result > 0) != (x > 0))
+ cquo--;
+#else
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (result), "=dm" (fpsr) : "f" (y), "0" (x));
+ cquo = (fpsr >> 16) & 0x7f;
+#endif
+ if (fpsr & (1 << 23))
+ cquo = -cquo;
+ *quo = cquo;
+ return result;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__remquo), s(remquo))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d80b3f3c5b13f4652f50fce9984e989e8d5d04e3
commit d80b3f3c5b13f4652f50fce9984e989e8d5d04e3
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Apr 14 02:11:12 1997 +0000
Basic functionality for libc on ARM
diff --git a/sysdeps/arm/Implies b/sysdeps/arm/Implies
new file mode 100644
index 0000000..d6acf04
--- /dev/null
+++ b/sysdeps/arm/Implies
@@ -0,0 +1,2 @@
+wordsize-32
+ieee754
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
new file mode 100644
index 0000000..5443761
--- /dev/null
+++ b/sysdeps/arm/__longjmp.S
@@ -0,0 +1,37 @@
+/* longjmp for ARM.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ASM
+#include <jmp_buf.h>
+
+/* __longjmp(jmpbuf, val) */
+
+ENTRY (__longjmp)
+ movs r2, r0
+ movs r0, r1 /* get the return value in place */
+ moveq r1, #1 /* can't let setjmp() return zero! */
+
+#if __ARM_USES_FP
+ add r2, r2, #48
+ lfmfd f4, 4, [r2]
+#endif
+
+ LOADREGS(ia, r2, {v1-v6, sl, fp, sp, pc})
+END (__longjmp)
diff --git a/sysdeps/arm/bsd-_setjmp.S b/sysdeps/arm/bsd-_setjmp.S
new file mode 100644
index 0000000..5643c50
--- /dev/null
+++ b/sysdeps/arm/bsd-_setjmp.S
@@ -0,0 +1,29 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARM version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (_setjmp)
+ mov r1, #0
+ b __sigsetjmp
+END (_setjmp)
diff --git a/sysdeps/arm/bsd-setjmp.S b/sysdeps/arm/bsd-setjmp.S
new file mode 100644
index 0000000..ac7dd96
--- /dev/null
+++ b/sysdeps/arm/bsd-setjmp.S
@@ -0,0 +1,29 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARM version.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ mov r1, #1
+ b __sigsetjmp
+END (setjmp)
diff --git a/sysdeps/arm/bytesex.h b/sysdeps/arm/bytesex.h
new file mode 100644
index 0000000..32f8489
--- /dev/null
+++ b/sysdeps/arm/bytesex.h
@@ -0,0 +1,3 @@
+/* ARM is little-endian. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
new file mode 100644
index 0000000..6a4a4bb
--- /dev/null
+++ b/sysdeps/arm/fpu_control.h
@@ -0,0 +1,48 @@
+/* FPU control word definitions. Stub version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+#define _FPU_RESERVED 0xffffffff /* These bits are reserved. */
+
+/* The fdlibm code requires no interrupts for exceptions. Don't
+ change the rounding mode, it would break long double I/O! */
+#define _FPU_DEFAULT 0x00000000 /* Default value. */
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word.
+ * On the ARM, we can't do this from user mode (it would trap).
+ */
+#define _FPU_GETCW(cw) __asm__ ("movnv r0,r0" : "=g" (cw))
+#define _FPU_SETCW(cw) __asm__ ("movnv r0,r0" : : "g" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+__BEGIN_DECLS
+
+/* Called at startup. It can be used to manipulate fpu control register. */
+extern void __setfpucw __P ((fpu_control_t));
+
+__END_DECLS
+
+#endif /* _FPU_CONTROL_H */
diff --git a/sysdeps/arm/jmp_buf.h b/sysdeps/arm/jmp_buf.h
new file mode 100644
index 0000000..93b0f5f
--- /dev/null
+++ b/sysdeps/arm/jmp_buf.h
@@ -0,0 +1,10 @@
+/* Define the machine-dependent type `jmp_buf'. ARM version. */
+
+#ifndef _ASM
+/* Jump buffer contains v1-v6, sl, fp, sp, pc and (f4-f7) if we do FP. */
+#if __ARM_USES_FP
+typedef int __jmp_buf[22];
+#else
+typedef int __jmp_buf[10];
+#endif
+#endif
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
new file mode 100644
index 0000000..5891cb9
--- /dev/null
+++ b/sysdeps/arm/setjmp.S
@@ -0,0 +1,36 @@
+/* setjmp for ARM.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ASM
+#include <jmp_buf.h>
+
+ /* Binary compatibility entry point. */
+ENTRY (__setjmp)
+ mov r1, #0
+ENTRY (__sigsetjmp)
+ /* Save registers */
+#if __ARM_USES_FP
+ sfmea f4, 4, [r0]!
+#endif
+ stmia r0, {v1-v6, sl, fp, sp, lr}
+
+ /* Make a tail call to __sigjmp_save; it takes the same args. */
+ B __sigjmp_save
+END (__sigsetjmp)
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
new file mode 100644
index 0000000..b7964a3
--- /dev/null
+++ b/sysdeps/arm/sysdep.h
@@ -0,0 +1,92 @@
+/* Assembler macros for ARM.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdeps/generic/sysdep.h>
+
+#ifdef ASSEMBLER
+
+/* Syntactic details of assembler. */
+
+#ifdef HAVE_ELF
+
+/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
+#define ALIGNARG(log2) 1<<log2
+/* For ELF we need the `.type' directive to make shared libs work right. */
+#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+/* In ELF C symbols are asm symbols. */
+#undef NO_UNDERSCORES
+#define NO_UNDERSCORES
+
+#else
+
+#define ALIGNARG(log2) log2
+#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
+#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
+
+#endif
+
+/* ARM 6 needs slightly different handling */
+#ifdef __arm6__
+#define LOADREGS(cond, base, reglist...)\
+ ldm##cond base,reglist
+#define RETINSTR(instr, regs...)\
+ instr regs
+#else /* arm 3 */
+#define LOADREGS(cond, base, reglist...)\
+ ldm##cond base,reglist^
+#define RETINSTR(instr, regs...)\
+ instr##s regs
+#endif
+
+/* Don't do floating point */
+#define __ARM_USES_FP 1
+
+/* Define an entry point visible from C. */
+#define ENTRY(name) \
+ ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
+ ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .align ALIGNARG(4); \
+ C_LABEL(name) \
+ CALL_MCOUNT
+
+#undef END
+#define END(name) \
+ ASM_SIZE_DIRECTIVE(name)
+
+/* If compiled for profiling, call `mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT \
+#error Profiling not supported.
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+#ifdef NO_UNDERSCORES
+/* Since C identifiers are not normally prefixed with an underscore
+ on this system, the asm identifier `syscall_error' intrudes on the
+ C name space. Make sure we use an innocuous name. */
+#define syscall_error __syscall_error
+#define mcount _mcount
+#endif
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/arm/sysdep.h b/sysdeps/unix/arm/sysdep.h
new file mode 100644
index 0000000..18e812b
--- /dev/null
+++ b/sysdeps/unix/arm/sysdep.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/arm/sysdep.h>
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cddfc83cf8851d202ff898eb87ea90ea77cc8a99
commit cddfc83cf8851d202ff898eb87ea90ea77cc8a99
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 12 23:37:52 1997 +0000
m68k specific round long double to long long function.
diff --git a/sysdeps/m68k/fpu/s_rinttoll.c b/sysdeps/m68k/fpu/s_rinttoll.c
new file mode 100644
index 0000000..bad8082
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rinttoll.c
@@ -0,0 +1,62 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+long long int
+__rinttoll (long double x)
+{
+ int32_t se, sx;
+ u_int32_t h, l;
+ long long int result;
+
+ x = __m81_u(__rintl) (x);
+
+ /* We could use __fixxfdi from libgcc, but here we can take advantage of
+ the known floating point format. */
+ GET_LDOUBLE_WORDS (se, h, l, x);
+
+ sx = se & (1 << 15);
+ se = (se ^ sx) - 0x3fff;
+
+ if (se < 64)
+ {
+ if (se > 31)
+ result = (((long long int) (h >> (63 - se)) << 32)
+ | (l >> (63 - se)) | (h << (se - 31)));
+ else
+ result = h >> (31 - se);
+ if (sx)
+ result = -result;
+ }
+ else
+ /* Too large. The number is either +-inf or NaN or it is too
+ large to be effected by rounding. The standard leaves it
+ undefined what to return when the number is too large to fit in
+ a `long long int'. */
+ result = -1LL;
+
+ return result;
+}
+
+weak_alias (__rinttoll, rinttoll)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc3bea7963685e1295dba2b549ac6939924ce817
commit bc3bea7963685e1295dba2b549ac6939924ce817
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 12 23:37:40 1997 +0000
m68k specific round long double to long function.
diff --git a/sysdeps/m68k/fpu/s_rinttol.c b/sysdeps/m68k/fpu/s_rinttol.c
new file mode 100644
index 0000000..7476d78
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rinttol.c
@@ -0,0 +1,31 @@
+/* Round argument to nearest integral value according to current rounding
+ direction.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+
+long int
+__rinttol (long double x)
+{
+ return __m81_u(__rinttol) (x);
+}
+
+weak_alias (__rinttol, rinttol)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90ad32dd7276f309c761fdee5549c80b609cb8c1
commit 90ad32dd7276f309c761fdee5549c80b609cb8c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 12 23:37:12 1997 +0000
(__rinttol, rinttol): New inline.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 9b52b32..68a6d90 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -282,6 +282,13 @@ __inline_functions (float,f)
__inline_functions (long double,l)
#undef __inline_functions
+__m81_defun (long int, __rinttol, (long double __x))
+{
+ long int __result;
+ __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x));
+ return __result;
+}
+
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
/* Define inline versions of the user visible functions. */
@@ -349,6 +356,7 @@ __inline_forward_c(int,ilogbl, (long double __value), (__value))
#endif
#ifdef __USE_ISOC9X
__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
+__inline_forward_c(long int,rinttol, (long double __value), (__value))
#endif
#endif /* Use misc or ISO C9X */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0a13f94e4dc17c0befb794c947c6f6c9039a190
commit d0a13f94e4dc17c0befb794c947c6f6c9039a190
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Apr 12 23:36:57 1997 +0000
Don't define INFINITY.
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index 79e87dc..8d45aae 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -65,12 +65,6 @@ static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
#define HUGE_VALL (__huge_vall.__ld)
#endif /* GCC. */
-
-/* Expression representing positive infinity. Here it is the same as
- HUGE_VALF. */
-#define INFINITY HUGE_VALF
-
#endif /* __USE_ISOC9X. */
-
#endif /* huge_val.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5838780e11d1369857f2147d830d18f1c43efc82
commit 5838780e11d1369857f2147d830d18f1c43efc82
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 11 10:28:26 1997 +0000
Complex sinh function for m68k.
diff --git a/sysdeps/m68k/fpu/s_csinh.c b/sysdeps/m68k/fpu/s_csinh.c
new file mode 100644
index 0000000..c409ed0
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinh.c
@@ -0,0 +1,128 @@
+/* Complex sine hyperbole function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef huge_val
+#define huge_val HUGE_VAL
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__csinh) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+ int negate = m81(__signbit) (__real__ x);
+
+ __real__ x = s(fabs) (__real__ x);
+
+ if (m81(__finite) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ float_type sinh_val;
+ float_type sin_ix, cos_ix;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ sinh_val = m81(__ieee754_sinh) (__real__ x);
+ __real__ retval = cos_ix * sinh_val;
+ __imag__ retval = sin_ix * sinh_val;
+
+ if (negate)
+ __real__ retval = -__real__ retval;
+ }
+ else if (__real__ x == 0)
+ {
+ __real__ retval = 0.0;
+ __imag__ retval = 0.0/0.0;
+
+ if (negate)
+ __real__ retval = -__real__ retval;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+ }
+ else if (m81(__isinf) (__real__ x))
+ {
+ if (__imag__ x == 0.0)
+ {
+ __real__ retval = negate ? -huge_val : huge_val;
+ __imag__ retval = __imag__ x;
+ }
+ else if (m81(__finite) (__imag__ x))
+ {
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = __imag__ retval = huge_val;
+
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ if (negate)
+ quadrant ^= 1;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
+ }
+ else
+ {
+ /* The subtraction raises the invalid exception. */
+ __real__ retval = huge_val;
+ __imag__ retval = huge_val - huge_val;
+ }
+ }
+ else if (__imag__ x == 0.0)
+ {
+ __real__ retval = 0.0/0.0;
+ __imag__ retval = __imag__ x;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__csinh), s(csinh))
diff --git a/sysdeps/m68k/fpu/s_csinhf.c b/sysdeps/m68k/fpu/s_csinhf.c
new file mode 100644
index 0000000..42c114b
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinhf.c
@@ -0,0 +1,4 @@
+#define SUFF f
+#define float_type float
+#define huge_val HUGE_VALF
+#include <s_csinh.c>
diff --git a/sysdeps/m68k/fpu/s_csinhl.c b/sysdeps/m68k/fpu/s_csinhl.c
new file mode 100644
index 0000000..c8aa5c7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_csinhl.c
@@ -0,0 +1,4 @@
+#define SUFF l
+#define float_type long double
+#define huge_val HUGE_VALL
+#include <s_csinh.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45b0751eae9df477d883e1cae0b6d5ae93705dfc
commit 45b0751eae9df477d883e1cae0b6d5ae93705dfc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 11 10:27:30 1997 +0000
Use internal exp function instead of wrapper.
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
index d5c7645..4846ec1 100644
--- a/sysdeps/m68k/fpu/s_cexp.c
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -40,18 +40,24 @@ __complex__ float_type
s(__cexp) (__complex__ float_type x)
{
__complex__ float_type retval;
- float_type sin_ix, cos_ix;
if (m81(__finite) (__real__ x))
{
if (m81(__finite) (__imag__ x))
{
- float_type exp_val = s(__exp) (__real__ x);
+ float_type exp_val = m81(__ieee754_exp) (__real__ x);
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval = exp_val * cos_ix;
- __imag__ retval = exp_val * sin_ix;
+ __real__ retval = __imag__ retval = exp_val;
+ if (m81(__finite) (exp_val))
+ {
+ float_type sin_ix, cos_ix;
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval *= cos_ix;
+ __imag__ retval *= sin_ix;
+ }
+ else
+ goto fix_sign;
}
else
/* If the imaginary part is +-inf or NaN and the real part is
@@ -62,16 +68,41 @@ s(__cexp) (__complex__ float_type x)
{
if (m81(__finite) (__imag__ x))
{
- if (m81(__signbit) (__real__ x) == 0 && __imag__ x == 0.0)
- retval = huge_val;
+ float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+
+ if (__imag__ x == 0.0)
+ {
+ __real__ retval = value;
+ __imag__ retval = __imag__ x;
+ }
else
{
- float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = value;
+ __imag__ retval = value;
- __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
- : "f" (__imag__ x));
- __real__ retval = value * cos_ix;
- __imag__ retval = value * sin_ix;
+ fix_sign:
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
}
}
else if (m81(__signbit) (__real__ x) == 0)
@@ -80,7 +111,10 @@ s(__cexp) (__complex__ float_type x)
__imag__ retval = 0.0/0.0;
}
else
- retval = 0.0;
+ {
+ __real__ retval = 0.0;
+ __imag__ retval = s(__copysign) (0.0, __imag__ x);
+ }
}
else
/* If the real part is NaN the result is NaN + iNaN. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79aa2424918dee448bf12cfcd36d9911c5dfa85b
commit 79aa2424918dee448bf12cfcd36d9911c5dfa85b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Apr 11 10:27:18 1997 +0000
Complex cosh function for m68k.
diff --git a/sysdeps/m68k/fpu/s_ccosh.c b/sysdeps/m68k/fpu/s_ccosh.c
new file mode 100644
index 0000000..439eae1
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccosh.c
@@ -0,0 +1,119 @@
+/* Complex cosine hyperbole function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef huge_val
+#define huge_val HUGE_VAL
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__ccosh) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+
+ __real__ x = s(fabs) (__real__ x);
+
+ if (m81(__finite) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ float_type cosh_val;
+ float_type sin_ix, cos_ix;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ cosh_val = m81(__ieee754_cosh) (__real__ x);
+ __real__ retval = cos_ix * cosh_val;
+ __imag__ retval = sin_ix * cosh_val;
+ }
+ else if (__real__ x == 0)
+ {
+ __imag__ retval = 0.0;
+ __real__ retval = huge_val - huge_val;
+ }
+ else
+ __real__ retval = __imag__ retval = huge_val - huge_val;
+ }
+ else if (m81(__isinf) (__real__ x))
+ {
+ if (__imag__ x == 0)
+ {
+ __real__ retval = huge_val;
+ __imag__ retval = __imag__ x;
+ }
+ else if (m81(__finite) (__imag__ x))
+ {
+ float_type remainder, pi_2;
+ int quadrant;
+ __real__ retval = __imag__ retval = huge_val;
+
+ __asm ("fmovecr %#0,%0\n\tfscale%.w %#-1,%0" : "=f" (pi_2));
+ __asm ("fmod%.x %2,%0\n\tfmove%.l %/fpsr,%1"
+ : "=f" (remainder), "=dm" (quadrant)
+ : "f" (pi_2), "0" (__imag__ x));
+ quadrant = (quadrant >> 16) & 0x83;
+ if (quadrant & 0x80)
+ quadrant ^= 0x83;
+ switch (quadrant)
+ {
+ default:
+ break;
+ case 1:
+ __real__ retval = -__real__ retval;
+ break;
+ case 2:
+ __real__ retval = -__real__ retval;
+ case 3:
+ __imag__ retval = -__imag__ retval;
+ break;
+ }
+ }
+ else
+ {
+ /* The subtraction raises the invalid exception. */
+ __real__ retval = huge_val;
+ __imag__ retval = huge_val - huge_val;
+ }
+ }
+ else if (__imag__ x == 0)
+ {
+ __real__ retval = 0.0/0.0;
+ __imag__ retval = __imag__ x;
+ }
+ else
+ __real__ retval = __imag__ retval = 0.0/0.0;
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__ccosh), s(ccosh))
diff --git a/sysdeps/m68k/fpu/s_ccoshf.c b/sysdeps/m68k/fpu/s_ccoshf.c
new file mode 100644
index 0000000..7d07668
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccoshf.c
@@ -0,0 +1,4 @@
+#define SUFF f
+#define float_type float
+#define huge_val HUGE_VALF
+#include <s_ccosh.c>
diff --git a/sysdeps/m68k/fpu/s_ccoshl.c b/sysdeps/m68k/fpu/s_ccoshl.c
new file mode 100644
index 0000000..6f1d1e5
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ccoshl.c
@@ -0,0 +1,4 @@
+#define SUFF l
+#define float_type long double
+#define huge_val HUGE_VALL
+#include <s_ccosh.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb32bf34fe78c74ee3f7f561aa7d74cfdabf5a93
commit eb32bf34fe78c74ee3f7f561aa7d74cfdabf5a93
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:46:54 1997 +0000
m68k specific implementation for trunc for long double.
diff --git a/sysdeps/m68k/fpu/s_truncl.c b/sysdeps/m68k/fpu/s_truncl.c
new file mode 100644
index 0000000..8d35777
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_truncl.c
@@ -0,0 +1,2 @@
+#define FUNC truncl
+#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=557d7a96e4dd956c67d2fbd33ce0434dbbfd779b
commit 557d7a96e4dd956c67d2fbd33ce0434dbbfd779b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:46:42 1997 +0000
m68k specific implementation for trunc for float.
diff --git a/sysdeps/m68k/fpu/s_truncf.c b/sysdeps/m68k/fpu/s_truncf.c
new file mode 100644
index 0000000..44dca74
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_truncf.c
@@ -0,0 +1,2 @@
+#define FUNC truncf
+#include <s_atanf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9007c976b097bbadd1f9e5406cf44f3d1a827fe
commit a9007c976b097bbadd1f9e5406cf44f3d1a827fe
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:46:33 1997 +0000
m68k specific implementation for trunc for double.
diff --git a/sysdeps/m68k/fpu/s_trunc.c b/sysdeps/m68k/fpu/s_trunc.c
new file mode 100644
index 0000000..96f29a7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_trunc.c
@@ -0,0 +1,2 @@
+#define FUNC trunc
+#include <s_atan.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74988c548947f5638b8ef9876a60fe71c48cd865
commit 74988c548947f5638b8ef9876a60fe71c48cd865
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:46:18 1997 +0000
m68k specific implementation for nearbyint for long double.
diff --git a/sysdeps/m68k/fpu/s_nearbyintl.c b/sysdeps/m68k/fpu/s_nearbyintl.c
new file mode 100644
index 0000000..230cd77
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_nearbyintl.c
@@ -0,0 +1,2 @@
+#define FUNC nearbyintl
+#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6686e56ac712e24ba42d3f58c04d350cb70ff01
commit c6686e56ac712e24ba42d3f58c04d350cb70ff01
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:46:07 1997 +0000
m68k specific implementation for nearbyint for float.
diff --git a/sysdeps/m68k/fpu/s_nearbyintf.c b/sysdeps/m68k/fpu/s_nearbyintf.c
new file mode 100644
index 0000000..70d08ab
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_nearbyintf.c
@@ -0,0 +1,2 @@
+#define FUNC nearbyintf
+#include <s_atanf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=afaabacb82bef384f0ec3ef251c0c345b8656b85
commit afaabacb82bef384f0ec3ef251c0c345b8656b85
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:45:59 1997 +0000
m68k specific implementation for nearbyint for double.
diff --git a/sysdeps/m68k/fpu/s_nearbyint.c b/sysdeps/m68k/fpu/s_nearbyint.c
new file mode 100644
index 0000000..b87f5e2
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_nearbyint.c
@@ -0,0 +1,2 @@
+#define FUNC nearbyint
+#include <s_atan.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2b29a263866bf1ce118041cee55569a8cae8877
commit b2b29a263866bf1ce118041cee55569a8cae8877
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:45:25 1997 +0000
m68k specific implementation for cexp for long double.
diff --git a/sysdeps/m68k/fpu/s_cexpl.c b/sysdeps/m68k/fpu/s_cexpl.c
new file mode 100644
index 0000000..7367070
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cexpl.c
@@ -0,0 +1,4 @@
+#define SUFF l
+#define huge_val HUGE_VALL
+#define float_type long double
+#include <s_cexp.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a3b70258eb9ecc5e101053058071fa2ac1340af
commit 4a3b70258eb9ecc5e101053058071fa2ac1340af
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:45:13 1997 +0000
m68k specific implementation for cexp for float.
diff --git a/sysdeps/m68k/fpu/s_cexpf.c b/sysdeps/m68k/fpu/s_cexpf.c
new file mode 100644
index 0000000..db9f174
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cexpf.c
@@ -0,0 +1,4 @@
+#define SUFF f
+#define huge_val HUGE_VALF
+#define float_type float
+#include <s_cexp.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc6dd76e408ede31db90c033b69a585000d00bd6
commit bc6dd76e408ede31db90c033b69a585000d00bd6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:45:04 1997 +0000
m68k specific implementation for cexp for double.
diff --git a/sysdeps/m68k/fpu/s_cexp.c b/sysdeps/m68k/fpu/s_cexp.c
new file mode 100644
index 0000000..d5c7645
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cexp.c
@@ -0,0 +1,92 @@
+/* Complex exponential function. m68k fpu version
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <complex.h>
+#include <math.h>
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef huge_val
+#define huge_val HUGE_VAL
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
+
+__complex__ float_type
+s(__cexp) (__complex__ float_type x)
+{
+ __complex__ float_type retval;
+ float_type sin_ix, cos_ix;
+
+ if (m81(__finite) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ float_type exp_val = s(__exp) (__real__ x);
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval = exp_val * cos_ix;
+ __imag__ retval = exp_val * sin_ix;
+ }
+ else
+ /* If the imaginary part is +-inf or NaN and the real part is
+ not +-inf the result is NaN + iNaN. */
+ __real__ retval = __imag__ retval = 0.0/0.0;
+ }
+ else if (m81(__isinf) (__real__ x))
+ {
+ if (m81(__finite) (__imag__ x))
+ {
+ if (m81(__signbit) (__real__ x) == 0 && __imag__ x == 0.0)
+ retval = huge_val;
+ else
+ {
+ float_type value = m81(__signbit) (__real__ x) ? 0.0 : huge_val;
+
+ __asm ("fsincos%.x %2,%1:%0" : "=f" (sin_ix), "=f" (cos_ix)
+ : "f" (__imag__ x));
+ __real__ retval = value * cos_ix;
+ __imag__ retval = value * sin_ix;
+ }
+ }
+ else if (m81(__signbit) (__real__ x) == 0)
+ {
+ __real__ retval = huge_val;
+ __imag__ retval = 0.0/0.0;
+ }
+ else
+ retval = 0.0;
+ }
+ else
+ /* If the real part is NaN the result is NaN + iNaN. */
+ __real__ retval = __imag__ retval = 0.0/0.0;
+
+ return retval;
+}
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (s(__cexp), s(cexp))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57d377f1f953924254bc8644eb5f4a50c779802c
commit 57d377f1f953924254bc8644eb5f4a50c779802c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:44:29 1997 +0000
Adapted.
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c
index 37bff00..0c44d7c 100644
--- a/sysdeps/m68k/fpu/s_modff.c
+++ b/sysdeps/m68k/fpu/s_modff.c
@@ -1,3 +1,3 @@
-#define FUNC modff
+#define SUFF f
#define float_type float
#include <s_modf.c>
diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c
index 51327dd..c7075b3 100644
--- a/sysdeps/m68k/fpu/s_modfl.c
+++ b/sysdeps/m68k/fpu/s_modfl.c
@@ -1,3 +1,3 @@
-#define FUNC modfl
+#define SUFF l
#define float_type long double
#include <s_modf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=344114d0495cefb492ac8d327b23d2d76e538603
commit 344114d0495cefb492ac8d327b23d2d76e538603
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:44:20 1997 +0000
Rewritten.
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 6428afc..ad0334f 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -19,22 +19,35 @@
#define __LIBC_M81_MATH_INLINES
#include <math.h>
-#ifndef FUNC
-#define FUNC modf
+#ifndef SUFF
+#define SUFF
#endif
#ifndef float_type
#define float_type double
#endif
-#define __CONCATX(a,b) __CONCAT(a,b)
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
float_type
-__CONCATX(__,FUNC) (x, iptr)
- float_type x;
- float_type *iptr;
+s(__modf) (float_type x, float_type *iptr)
{
- return __m81_u(__CONCATX(__,FUNC))(x, iptr);
+ float_type x_int, result;
+ __asm ("fintrz%.x %1, %0" : "=f" (x_int) : "f" (x));
+ *iptr = x_int;
+ if (m81(__isinf) (x))
+ {
+ result = 0;
+ if (x < 0)
+ result = -result;
+ }
+ else if (x == 0)
+ result = x;
+ else
+ result = x - x_int;
+ return result;
}
#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx(__CONCATX(__,FUNC), FUNC)
+weak_aliasx(s(__modf), s(modf))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62f075cd3b92081bec9ebde3413dfc7017651c72
commit 62f075cd3b92081bec9ebde3413dfc7017651c72
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:44:10 1997 +0000
Use __signbit inline. Write 0.0/0.0 for NaN. Fix typo in test for `y
= 0.5'.
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index 970e8b8..284f1bf 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -27,10 +27,12 @@
#define float_type double
#endif
-#define __CONCATX(a,b) __CONCAT(a,b)
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
float_type
-__CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
+s(__ieee754_pow) (float_type x, float_type y)
{
float_type z;
float_type ax;
@@ -40,24 +42,24 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
if (x != x || y != y)
return x + y;
- if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ if (m81(__isinf) (y))
{
- ax = __CONCATX(fabs,SUFF) (x);
+ ax = s(fabs) (x);
if (ax == 1)
- return y - y;
+ return 0.0/0.0;
if (ax > 1)
return y > 0 ? y : 0;
else
return y < 0 ? -y : 0;
}
- if (__CONCATX(fabs,SUFF) (y) == 1)
+ if (s(fabs) (y) == 1)
return y > 0 ? x : 1 / x;
if (y == 2)
return x * x;
- if (y == 0 && x >= 0)
- return __m81_u(__CONCATX(__ieee754_sqrt,SUFF)) (x);
+ if (y == 0.5 && x >= 0)
+ return m81(__ieee754_sqrt) (x);
if (x == 10.0)
{
@@ -70,19 +72,19 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
return z;
}
- ax = __CONCATX(fabs,SUFF) (x);
- if (__m81_u(__CONCATX(__isinf,SUFF)) (x) || x == 0 || ax == 1)
+ ax = s(fabs) (x);
+ if (m81(__isinf) (x) || x == 0 || ax == 1)
{
z = ax;
if (y < 0)
z = 1 / z;
- if (signbit (x))
+ if (m81(__signbit) (x))
{
- float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ float_type temp = m81(__rint) (y);
if (y != temp)
{
if (x == -1)
- z = (z - z) / (z - z);
+ z = 0.0/0.0;
}
else
{
@@ -105,12 +107,11 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
if (x < 0.0)
{
- float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ float_type temp = m81(__rint) (y);
if (y == temp)
{
long long i = (long long) y;
- z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
- (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (-x)));
+ z = m81(__ieee754_exp) (y * m81(__ieee754_log) (-x));
if (sizeof (float_type) == sizeof (float))
{
long i = (long) y;
@@ -126,10 +127,9 @@ __CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
}
}
else
- z = (x - x) / (x - x);
+ z = 0.0/0.0;
}
else
- z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
- (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (x)));
+ z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x));
return z;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=231e25e2a3e515f556ca857fe6bd8ba8254e721b
commit 231e25e2a3e515f556ca857fe6bd8ba8254e721b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:43:52 1997 +0000
Use __signbit inline.
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index 58d7555..c012070 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -27,10 +27,12 @@
#define float_type double
#endif
-#define __CONCATX(a,b) __CONCAT(a,b)
+#define CONCATX(a,b) __CONCAT(a,b)
+#define s(name) CONCATX(name,SUFF)
+#define m81(func) __m81_u(s(func))
float_type
-__CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x)
+s(__ieee754_atan2) (float_type y, float_type x)
{
float_type pi, pi_2, z;
@@ -40,41 +42,41 @@ __CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x)
z = x + y;
else if (y == 0)
{
- if (signbit (x))
- z = signbit (y) ? -pi : pi;
+ if (m81(__signbit) (x))
+ z = m81(__signbit) (y) ? -pi : pi;
else
z = y;
}
- else if (__m81_u(__CONCATX(__isinf,SUFF)) (x))
+ else if (m81(__isinf) (x))
{
- if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ if (m81(__isinf) (y))
{
float_type pi_4;
- __asm ("fscale%.w %#-1, %0" : "=f" (pi_4) : "0" (pi_2));
+ __asm ("fscale%.w %#-2, %0" : "=f" (pi_4) : "0" (pi));
z = x > 0 ? pi_4 : 3 * pi_4;
}
else
z = x > 0 ? 0 : pi;
- if (signbit (y))
+ if (m81(__signbit) (y))
z = -z;
}
- else if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ else if (m81(__isinf) (y))
z = y > 0 ? pi_2 : -pi_2;
else if (x > 0)
{
if (y > 0)
{
if (x > y)
- z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ z = m81(__atan) (y / x);
else
- z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ z = pi_2 - m81(__atan) (x / y);
}
else
{
if (x > -y)
- z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ z = m81(__atan) (y / x);
else
- z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ z = -pi_2 - m81(__atan) (x / y);
}
}
else
@@ -82,16 +84,16 @@ __CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x)
if (y < 0)
{
if (-x > y)
- z = -pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ z = -pi + m81(__atan) (y / x);
else
- z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ z = -pi_2 - m81(__atan) (x / y);
}
else
{
if (-x > y)
- z = pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ z = pi + m81(__atan) (y / x);
else
- z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ z = pi_2 - m81(__atan) (x / y);
}
}
return z;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9a0a7fbcdeb7727c595033290aaeee15180a164
commit b9a0a7fbcdeb7727c595033290aaeee15180a164
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:43:44 1997 +0000
Define __trunc, __signbit, __nearbyint. Remove __modf.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index d618701..9b52b32 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -89,6 +89,7 @@ __inline_mathop(__significand, getman)
__inline_mathop(__log2, log2)
__inline_mathop(__exp2, twotox)
+__inline_mathop(__trunc, intrz)
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
@@ -111,6 +112,7 @@ __inline_mathop(significand, getman)
#ifdef __USE_ISOC9X
__inline_mathop(log2, log2)
__inline_mathop(exp2, twotox)
+__inline_mathop(trunc, intrz)
#endif
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
@@ -155,108 +157,123 @@ __internal_inline_functions (long double,l)
/* The rest of the functions are available to the user. */
-#define __inline_functions(float_type, s) \
-__m81_inline float_type \
-__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
-{ \
- float_type __mantissa, __exponent; \
- int __iexponent; \
- if (__value == 0.0) \
- { \
- *__expptr = 0; \
- return __value; \
- } \
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
- __iexponent = (int) __exponent + 1; \
- *__expptr = __iexponent; \
- __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
- : "0" (__value), "dmi" (-__iexponent)); \
- return __mantissa; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
-{ \
- float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Set rounding towards negative infinity. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
- /* Convert X to an integer, using -Inf rounding. */ \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- /* Restore the previous rounding mode. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
-{ \
- float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Set rounding towards positive infinity. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg | 0x30)); \
- /* Convert X to an integer, using +Inf rounding. */ \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- /* Restore the previous rounding mode. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_inline float_type \
-__m81_u(__CONCAT(__modf,s))(float_type __value, float_type *__iptr) \
-{ \
- float_type __modf_int; \
- __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \
- *__iptr = __modf_int; \
- return __value - __modf_int; \
-} \
- \
-__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
-{ \
- /* There is no branch-condition for infinity, \
- so we must extract and examine the condition codes manually. */ \
- unsigned long int __fpsr; \
- __asm("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
-} \
- \
-__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
-{ \
- char __result; \
- __asm("ftst%.x %1\n" \
- "fsun %0" : "=dm" (__result) : "f" (__value)); \
- return __result; \
-} \
- \
-__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
-{ \
- /* There is no branch-condition for infinity, so we must extract and \
- examine the condition codes manually. */ \
- unsigned long int __fpsr; \
- __asm ("ftst%.x %1\n" \
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
- return (__fpsr & (3 << 24)) == 0; \
-} \
- \
-__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
-{ \
- float_type __result; \
- if (__x == 0.0) \
- return 0x80000001; \
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- return (int) __result; \
-} \
- \
-__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
-{ \
- float_type __result; \
- __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
- return __result; \
+#define __inline_functions(float_type, s) \
+__m81_inline float_type \
+__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
+{ \
+ float_type __mantissa, __exponent; \
+ int __iexponent; \
+ if (__value == 0.0) \
+ { \
+ *__expptr = 0; \
+ return __value; \
+ } \
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
+ __iexponent = (int) __exponent + 1; \
+ *__expptr = __iexponent; \
+ __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
+ : "0" (__value), "dmi" (-__iexponent)); \
+ return __mantissa; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards negative infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
+ /* Convert X to an integer, using -Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards positive infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg | 0x30)); \
+ /* Convert X to an integer, using +Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, \
+ so we must extract and examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
+} \
+ \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
+{ \
+ char __result; \
+ __asm("ftst%.x %1\n" \
+ "fsun %0" : "=dm" (__result) : "f" (__value)); \
+ return __result; \
+} \
+ \
+__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, so we must extract and \
+ examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm ("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (3 << 24)) == 0; \
+} \
+ \
+__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \
+{ \
+ /* There is no branch-condition for the sign bit, so we must extract \
+ and examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm ("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr >> 27) & 1; \
+} \
+ \
+__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ if (__x == 0.0) \
+ return 0x80000001; \
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ return (int) __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
+{ \
+ float_type __result; \
+ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Temporarily disable the inexact exception. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg & ~0x200)); \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
}
/* This defines the three variants of the inline functions. */
@@ -286,8 +303,6 @@ __inline_forward(double,frexp, (double __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(double,floor, (double __x), (__x))
__inline_forward_c(double,ceil, (double __x), (__x))
-__inline_forward(double,modf, (double __value, double *__iptr),
- (__value, __iptr))
#ifdef __USE_MISC
__inline_forward_c(int,isinf, (double __value), (__value))
__inline_forward_c(int,finite, (double __value), (__value))
@@ -299,6 +314,9 @@ __inline_forward_c(int,isnan, (double __value), (__value))
#endif
__inline_forward_c(int,ilogb, (double __value), (__value))
#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(double,nearbyint, (double __value), (__value))
+#endif
#if defined __USE_MISC || defined __USE_ISOC9X
@@ -306,8 +324,6 @@ __inline_forward(float,frexpf, (float __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(float,floorf, (float __x), (__x))
__inline_forward_c(float,ceilf, (float __x), (__x))
-__inline_forward(float,modff, (float __value, float *__iptr),
- (__value, __iptr))
#ifdef __USE_MISC
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
@@ -315,14 +331,14 @@ __inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
__inline_forward_c(int,ilogbf, (float __value), (__value))
#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(float,nearbyintf, (float __value), (__value))
+#endif
__inline_forward(long double,frexpl, (long double __value, int *__expptr),
(__value, __expptr))
__inline_forward_c(long double,floorl, (long double __x), (__x))
__inline_forward_c(long double,ceill, (long double __x), (__x))
-__inline_forward(long double,modfl,
- (long double __value, long double *__iptr),
- (__value, __iptr))
#ifdef __USE_MISC
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
@@ -331,6 +347,9 @@ __inline_forward_c(long double,scalbnl, (long double __x, int __n),
__inline_forward_c(int,isnanl, (long double __value), (__value))
__inline_forward_c(int,ilogbl, (long double __value), (__value))
#endif
+#ifdef __USE_ISOC9X
+__inline_forward_c(long double,nearbyintl, (long double __value), (__value))
+#endif
#endif /* Use misc or ISO C9X */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=349d129b3a5612e8845a54ca4e9252b00af9456f
commit 349d129b3a5612e8845a54ca4e9252b00af9456f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Apr 2 14:43:30 1997 +0000
(CFLAGS-s_copysignl.c) [$(subdir)=math]: Define for gcc bug
workaround.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index fc79d36..0f811bc 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -34,3 +34,8 @@ long-double-fcts = yes
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
+
+ifeq ($(subdir),math)
+# Avoid a bug in gcc
+CFLAGS-s_copysignl.c += -mnobitfield
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6383b7f583c9a373f82461127d38aad2f2977692
commit 6383b7f583c9a373f82461127d38aad2f2977692
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 27 01:58:32 1997 +0000
(OXTABS): Don't define.
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
index 743bb3d..d0932c1 100644
--- a/sysdeps/unix/sysv/linux/alpha/termbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/termbits.h
@@ -112,10 +112,6 @@ struct termios
#define VT1 00200000
#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
-/* On Linux there is no OXTABS bit defined. Take it as an alias for
- XTABS. */
-#define OXTABS XTABS
-
/* c_cflag bit meaning */
#define CBAUD 0000037
#define B0 0000000 /* hang up */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fea9a86a67b315e8545ee64f24fd09e505449ef7
commit fea9a86a67b315e8545ee64f24fd09e505449ef7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 27 01:57:11 1997 +0000
(elf_machine_rela): Rewritten as for i386.
(elf_machine_lookup_noexec_p, elf_machine_lookup_noplt_p,
ELF_MACHINE_RELOC_NOPLT): Define.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 0c9b6ac..d79ef25 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -184,9 +184,16 @@ _dl_start_user:
| Jump to the user's entry point.
jmp (%a4)");
+/* Nonzero iff TYPE describes a relocation that should
+ skip the executable when looking up the symbol value. */
+#define elf_machine_lookup_noexec_p(type) ((type) == R_68K_COPY)
+
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
-#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT)
+#define elf_machine_lookup_noplt_p(type) ((type) == R_68K_JMP_SLOT)
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_RELOC_NOPLT R_68K_JMP_SLOT
/* The m68k never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
@@ -203,60 +210,50 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version)
{
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- Elf32_Addr loadbase;
- switch (ELF32_R_TYPE (reloc->r_info))
+ if (ELF32_R_TYPE (reloc->r_info) == R_68K_RELATIVE)
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ else
{
- case R_68K_COPY:
- loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC);
- memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
- break;
- case R_68K_GLOB_DAT:
- loadbase = RESOLVE (&sym, version, 0);
- *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
- break;
- case R_68K_JMP_SLOT:
- loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT);
- *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
- break;
- case R_68K_8:
- loadbase = RESOLVE (&sym, version, 0);
- *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_16:
- loadbase = RESOLVE (&sym, version, 0);
- *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_32:
- loadbase = RESOLVE (&sym, version, 0);
- *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_RELATIVE:
- *reloc_addr = map->l_addr + reloc->r_addend;
- break;
- case R_68K_PC8:
- loadbase = RESOLVE (&sym, version, 0);
- *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_PC16:
- loadbase = RESOLVE (&sym, version, 0);
- *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_PC32:
- loadbase = RESOLVE (&sym, version, 0);
- *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_NONE: /* Alright, Wilbur. */
- break;
- default:
- assert (! "unexpected dynamic reloc type");
- break;
+ Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
+ if (sym)
+ value += sym->st_value;
+
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_68K_COPY:
+ memcpy (reloc_addr, (void *) value, sym->st_size);
+ break;
+ case R_68K_GLOB_DAT:
+ case R_68K_JMP_SLOT:
+ *reloc_addr = value;
+ break;
+ case R_68K_8:
+ *(char *) reloc_addr = value + reloc->r_addend;
+ break;
+ case R_68K_16:
+ *(short *) reloc_addr = value + reloc->r_addend;
+ break;
+ case R_68K_32:
+ *reloc_addr = value + reloc->r_addend;
+ break;
+ case R_68K_PC8:
+ *(char *) reloc_addr
+ = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+ break;
+ case R_68K_PC16:
+ *(short *) reloc_addr
+ = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+ break;
+ case R_68K_PC32:
+ *reloc_addr = value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+ break;
+ case R_68K_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d42c91d9d2d9ef1d51a9c77c62c59113f474ee4e
commit d42c91d9d2d9ef1d51a9c77c62c59113f474ee4e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 27 01:56:58 1997 +0000
(CFLAGS-rtld.c): Add -Wno-unused.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index dc50291..fc79d36 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -32,5 +32,5 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer
long-double-fcts = yes
ifeq ($(subdir),elf)
-CFLAGS-rtld.c += -Wno-uninitialized
+CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2d725f3adb2d481a623aedecb06414404ff427a
commit f2d725f3adb2d481a623aedecb06414404ff427a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 02:22:23 1997 +0000
Mirror Roland's recent changes.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index fc9f971..7a51df5 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -239,7 +239,14 @@ _dl_start_user:
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
-#define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT)
+#define elf_machine_lookup_noplt_p(type) ((type) == R_ALPHA_JMP_SLOT)
+
+/* Nonzero iff TYPE should not be allowed to resolve to one of
+ the main executable's symbols, as for a COPY reloc, which we don't use. */
+#define elf_machine_lookup_noexec_p(type) (0)
+
+/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
+#define ELF_MACHINE_RELOC_NOPLT R_ALPHA_JMP_SLOT
/* The alpha never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
@@ -328,7 +335,7 @@ elf_machine_rela (struct link_map *map,
const struct r_found_version *version)
{
Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
- unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
+ unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
@@ -342,7 +349,7 @@ elf_machine_rela (struct link_map *map,
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
- if (r_info == R_ALPHA_RELATIVE)
+ if (r_type == R_ALPHA_RELATIVE)
{
#ifndef RTLD_BOOTSTRAP
/* Already done in dynamic linker. */
@@ -350,24 +357,23 @@ elf_machine_rela (struct link_map *map,
#endif
*reloc_addr += map->l_addr;
}
- else if (r_info == R_ALPHA_NONE)
+ else if (r_type == R_ALPHA_NONE)
return;
else
{
Elf64_Addr loadbase, sym_value;
- loadbase = RESOLVE (&sym, version,
- r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0);
+ loadbase = RESOLVE (&sym, version, r_type);
sym_value = sym ? loadbase + sym->st_value : 0;
- if (r_info == R_ALPHA_GLOB_DAT)
+ if (r_type == R_ALPHA_GLOB_DAT)
*reloc_addr = sym_value;
- else if (r_info == R_ALPHA_JMP_SLOT)
+ else if (r_type == R_ALPHA_JMP_SLOT)
{
*reloc_addr = sym_value;
elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value);
}
- else if (r_info == R_ALPHA_REFQUAD)
+ else if (r_type == R_ALPHA_REFQUAD)
{
sym_value += *reloc_addr;
#ifndef RTLD_BOOTSTRAP
@@ -397,15 +403,15 @@ static inline void
elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
{
Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
- unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
+ unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
- if (r_info == R_ALPHA_JMP_SLOT)
+ if (r_type == R_ALPHA_JMP_SLOT)
{
/* Perform a RELATIVE reloc on the .got entry that transfers
to the .plt. */
*reloc_addr += map->l_addr;
}
- else if (r_info == R_ALPHA_NONE)
+ else if (r_type == R_ALPHA_NONE)
return;
else
assert (! "unexpected PLT reloc type");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=41b06962865a7215df05791217ad3f2625709306
commit 41b06962865a7215df05791217ad3f2625709306
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 02:22:14 1997 +0000
Alias _setjmp to __setjmp for change to tst-setjmp.c.
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index 1bb3e4a..07fb0c7 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -35,3 +35,5 @@ ENTRY(_setjmp)
bis $31, $31, $17 /* Pass a second argument of zero. */
jmp $31, __sigsetjmp /* Call __sigsetjmp. */
END(_setjmp)
+
+strong_alias_asm(_setjmp, __setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7b6ca33fd82c2b2934c6f5c537767ed69010ed8
commit c7b6ca33fd82c2b2934c6f5c537767ed69010ed8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 01:33:52 1997 +0000
Remove because of inaccuracy.
diff --git a/sysdeps/m68k/fpu/s_logb.c b/sysdeps/m68k/fpu/s_logb.c
deleted file mode 100644
index 9903b30..0000000
--- a/sysdeps/m68k/fpu/s_logb.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC logb
-#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_logbf.c b/sysdeps/m68k/fpu/s_logbf.c
deleted file mode 100644
index 6dcfee5..0000000
--- a/sysdeps/m68k/fpu/s_logbf.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC logbf
-#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_logbl.c
deleted file mode 100644
index 7d06ac1..0000000
--- a/sysdeps/m68k/fpu/s_logbl.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC logbl
-#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a900bdbcaf85c41085a443e895694ed528583c1
commit 4a900bdbcaf85c41085a443e895694ed528583c1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 01:33:30 1997 +0000
Implementation of log2 function in m68k assembler
diff --git a/sysdeps/m68k/fpu/s_log2.c b/sysdeps/m68k/fpu/s_log2.c
new file mode 100644
index 0000000..26e26ba
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2.c
@@ -0,0 +1,2 @@
+#define FUNC log2
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_log2f.c b/sysdeps/m68k/fpu/s_log2f.c
new file mode 100644
index 0000000..6849432
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2f.c
@@ -0,0 +1,2 @@
+#define FUNC log2f
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_log2l.c b/sysdeps/m68k/fpu/s_log2l.c
new file mode 100644
index 0000000..c4eb063
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log2l.c
@@ -0,0 +1,2 @@
+#define FUNC log2l
+#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3eb7704ced06f87b61ea9b11e7a8376223afd21d
commit 3eb7704ced06f87b61ea9b11e7a8376223afd21d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 01:33:22 1997 +0000
Implementation of exp2 function in m68k assembler
diff --git a/sysdeps/m68k/fpu/s_exp2.c b/sysdeps/m68k/fpu/s_exp2.c
new file mode 100644
index 0000000..3895280
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_exp2.c
@@ -0,0 +1,2 @@
+#define FUNC exp2
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_exp2f.c b/sysdeps/m68k/fpu/s_exp2f.c
new file mode 100644
index 0000000..20ac916
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_exp2f.c
@@ -0,0 +1,2 @@
+#define FUNC exp2f
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_exp2l.c b/sysdeps/m68k/fpu/s_exp2l.c
new file mode 100644
index 0000000..19121b9
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_exp2l.c
@@ -0,0 +1,2 @@
+#define FUNC exp2l
+#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=57a52ec851efbd87b6c85955fc96e350eda64e48
commit 57a52ec851efbd87b6c85955fc96e350eda64e48
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 01:31:06 1997 +0000
Rewritten.
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
index ae7a799..58d7555 100644
--- a/sysdeps/m68k/fpu/e_atan2.c
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -1,2 +1,98 @@
-#define FUNC __ieee754_atan2
-#include <e_fmod.c>
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+__CONCATX(__ieee754_atan2,SUFF) (float_type y, float_type x)
+{
+ float_type pi, pi_2, z;
+
+ __asm ("fmovecr%.x %#0, %0" : "=f" (pi));
+ __asm ("fscale%.w %#-1, %0" : "=f" (pi_2) : "0" (pi));
+ if (x != x || y != y)
+ z = x + y;
+ else if (y == 0)
+ {
+ if (signbit (x))
+ z = signbit (y) ? -pi : pi;
+ else
+ z = y;
+ }
+ else if (__m81_u(__CONCATX(__isinf,SUFF)) (x))
+ {
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ {
+ float_type pi_4;
+ __asm ("fscale%.w %#-1, %0" : "=f" (pi_4) : "0" (pi_2));
+ z = x > 0 ? pi_4 : 3 * pi_4;
+ }
+ else
+ z = x > 0 ? 0 : pi;
+ if (signbit (y))
+ z = -z;
+ }
+ else if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ z = y > 0 ? pi_2 : -pi_2;
+ else if (x > 0)
+ {
+ if (y > 0)
+ {
+ if (x > y)
+ z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ else
+ {
+ if (x > -y)
+ z = __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ }
+ else
+ {
+ if (y < 0)
+ {
+ if (-x > y)
+ z = -pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = -pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ else
+ {
+ if (-x > y)
+ z = pi + __m81_u(__CONCATX(__atan,SUFF)) (y / x);
+ else
+ z = pi_2 - __m81_u(__CONCATX(__atan,SUFF)) (x / y);
+ }
+ }
+ return z;
+}
diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c
index a4c5ebd..a0c750a 100644
--- a/sysdeps/m68k/fpu/e_atan2f.c
+++ b/sysdeps/m68k/fpu/e_atan2f.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_atan2f
-#include <e_fmodf.c>
+#define SUFF f
+#define float_type float
+#include <e_atan2.c>
diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c
index 0d43a77..426ca94 100644
--- a/sysdeps/m68k/fpu/e_atan2l.c
+++ b/sysdeps/m68k/fpu/e_atan2l.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_atan2l
-#include <e_fmodl.c>
+#define SUFF l
+#define float_type long double
+#include <e_atan2.c>
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
index 29798a1..970e8b8 100644
--- a/sysdeps/m68k/fpu/e_pow.c
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -1,2 +1,135 @@
-#define FUNC __ieee754_pow
-#include <e_fmod.c>
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
+#include <math.h>
+#include "math_private.h"
+
+#ifndef SUFF
+#define SUFF
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+__CONCATX(__ieee754_pow,SUFF) (float_type x, float_type y)
+{
+ float_type z;
+ float_type ax;
+
+ if (y == 0.0)
+ return 1.0;
+ if (x != x || y != y)
+ return x + y;
+
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (y))
+ {
+ ax = __CONCATX(fabs,SUFF) (x);
+ if (ax == 1)
+ return y - y;
+ if (ax > 1)
+ return y > 0 ? y : 0;
+ else
+ return y < 0 ? -y : 0;
+ }
+
+ if (__CONCATX(fabs,SUFF) (y) == 1)
+ return y > 0 ? x : 1 / x;
+
+ if (y == 2)
+ return x * x;
+ if (y == 0 && x >= 0)
+ return __m81_u(__CONCATX(__ieee754_sqrt,SUFF)) (x);
+
+ if (x == 10.0)
+ {
+ __asm ("ftentox%.x %1, %0" : "=f" (z) : "f" (y));
+ return z;
+ }
+ if (x == 2.0)
+ {
+ __asm ("ftwotox%.x %1, %0" : "=f" (z) : "f" (y));
+ return z;
+ }
+
+ ax = __CONCATX(fabs,SUFF) (x);
+ if (__m81_u(__CONCATX(__isinf,SUFF)) (x) || x == 0 || ax == 1)
+ {
+ z = ax;
+ if (y < 0)
+ z = 1 / z;
+ if (signbit (x))
+ {
+ float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ if (y != temp)
+ {
+ if (x == -1)
+ z = (z - z) / (z - z);
+ }
+ else
+ {
+ if (sizeof (float_type) == sizeof (float))
+ {
+ long i = (long) y;
+ if (i & 1)
+ z = -z;
+ }
+ else
+ {
+ long long i = (long long) y;
+ if ((float_type) i == y && i & 1)
+ z = -z;
+ }
+ }
+ }
+ return z;
+ }
+
+ if (x < 0.0)
+ {
+ float_type temp = __m81_u (__CONCATX(__rint,SUFF)) (y);
+ if (y == temp)
+ {
+ long long i = (long long) y;
+ z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
+ (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (-x)));
+ if (sizeof (float_type) == sizeof (float))
+ {
+ long i = (long) y;
+ if (i & 1)
+ z = -z;
+ }
+ else
+ {
+ /* If the conversion to long long was inexact assume that y
+ is an even integer. */
+ if ((float_type) i == y && i & 1)
+ z = -z;
+ }
+ }
+ else
+ z = (x - x) / (x - x);
+ }
+ else
+ z = (__m81_u(__CONCATX(__ieee754_exp,SUFF))
+ (y * __m81_u(__CONCATX(__ieee754_log,SUFF)) (x)));
+ return z;
+}
diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c
index 978d32e..3790143 100644
--- a/sysdeps/m68k/fpu/e_powf.c
+++ b/sysdeps/m68k/fpu/e_powf.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_powf
-#include <e_fmodf.c>
+#define SUFF f
+#define float_type float
+#include <e_pow.c>
diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c
index 0feec54..f71fa34 100644
--- a/sysdeps/m68k/fpu/e_powl.c
+++ b/sysdeps/m68k/fpu/e_powl.c
@@ -1,2 +1,3 @@
-#define FUNC __ieee754_powl
-#include <e_fmodl.c>
+#define SUFF l
+#define float_type long double
+#include <e_pow.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=647de4a8f9991461ba8b478145227db9975429af
commit 647de4a8f9991461ba8b478145227db9975429af
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 25 01:30:32 1997 +0000
(__logb, logb): Don't define.
(__ieee754_atan2, __ieee754_pow): Don't define here.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index fe01c25..d618701 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -85,7 +85,6 @@ __inline_mathop(__fabs, abs)
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
__inline_mathop(__log1p, lognp1)
-__inline_mathop(__logb, log2)
__inline_mathop(__significand, getman)
__inline_mathop(__log2, log2)
@@ -103,7 +102,6 @@ __inline_mathop(tanh, tanh)
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
-__inline_mathop(logb, log2)
#endif
#ifdef __USE_MISC
@@ -140,90 +138,6 @@ __m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
return __result; \
} \
\
-__m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \
- (float_type __y, float_type __x)) \
-{ \
- float_type __pi, __pi_2; \
- \
- __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \
- __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \
- if (__x > 0) \
- { \
- if (__y > 0) \
- { \
- if (__x > __y) \
- return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- else \
- { \
- if (__x > -__y) \
- return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- } \
- else \
- { \
- if (__y > 0) \
- { \
- if (-__x < __y) \
- return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- else \
- { \
- if (-__x > -__y) \
- return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
- else \
- return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
- } \
- } \
-} \
- \
-__m81_defun (float_type, __CONCAT(__ieee754_pow,s), \
- (float_type __x, float_type __y)) \
-{ \
- float_type __result; \
- if (__x == 0.0) \
- { \
- if (__y <= 0.0) \
- __result = 0.0 / 0.0; \
- else \
- __result = 0.0; \
- } \
- else if (__y == 0.0 || __x == 1.0) \
- __result = 1.0; \
- else if (__y == 1.0) \
- __result = __x; \
- else if (__y == 2.0) \
- __result = __x * __x; \
- else if (__x == 10.0) \
- __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
- else if (__x == 2.0) \
- __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
- else if (__x < 0.0) \
- { \
- float_type __temp = __m81_u (__CONCAT(__rint,s)) (__y); \
- if (__y == __temp) \
- { \
- int __i = (int) __y; \
- __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
- (__y * __m81_u(__CONCAT(__ieee754_log,s)) (-__x))); \
- if (__i & 1) \
- __result = -__result; \
- } \
- else \
- __result = 0.0 / 0.0; \
- } \
- else \
- __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
- (__y * __m81_u(__CONCAT(__ieee754_log,s)) (__x))); \
- return __result; \
-} \
- \
__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
(float_type __x, float_type __n)) \
{ \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=885775487a356724c71415dfa900cdf766f73b29
commit 885775487a356724c71415dfa900cdf766f73b29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Mar 24 22:12:52 1997 +0000
Remove references to byte order macros. Don't include <endian.h>.
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
index c213958..79e87dc 100644
--- a/sysdeps/m68k/huge_val.h
+++ b/sysdeps/m68k/huge_val.h
@@ -23,16 +23,10 @@
#include <features.h>
#include <sys/cdefs.h>
-#include <endian.h>
/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
-#endif
#define __huge_val_t union { unsigned char __c[8]; double __d; }
#ifdef __GNUC__
@@ -48,12 +42,7 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
#ifdef __USE_ISOC9X
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-#endif
#define __huge_valf_t union { unsigned char __c[4]; float __f; }
#ifdef __GNUC__
@@ -65,12 +54,7 @@ static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
#endif /* GCC. */
-#if __BYTE_ORDER == __BIG_ENDIAN
#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
-#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
-#endif
#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
#ifdef __GNUC__
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccc92968689f29df1e6b74ed3840231cec6b2a2b
commit ccc92968689f29df1e6b74ed3840231cec6b2a2b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 22 04:09:37 1997 +0000
(OXTABS): Define as alias for XTABS.
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
index d0932c1..743bb3d 100644
--- a/sysdeps/unix/sysv/linux/alpha/termbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/termbits.h
@@ -112,6 +112,10 @@ struct termios
#define VT1 00200000
#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+/* On Linux there is no OXTABS bit defined. Take it as an alias for
+ XTABS. */
+#define OXTABS XTABS
+
/* c_cflag bit meaning */
#define CBAUD 0000037
#define B0 0000000 /* hang up */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d44e56748387c9d08aa4421351195a8821f2e2a2
commit d44e56748387c9d08aa4421351195a8821f2e2a2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 20 19:35:32 1997 +0000
Include ctype.h for isdigit.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index b39f39a..63bf175 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -35,6 +35,7 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cb23ff1f5761e5a8db34ebabd185357f07af37ec
commit cb23ff1f5761e5a8db34ebabd185357f07af37ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Mar 20 19:33:28 1997 +0000
Initialize `quotient' and `mask'.
diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S
index 6c461c4..6a5c442 100644
--- a/sysdeps/alpha/div.S
+++ b/sysdeps/alpha/div.S
@@ -1,7 +1,6 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
-
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -14,10 +13,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
-
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -44,7 +42,6 @@ div:
.prologue 0
#endif
-#define dividend t0
#define divisor t1
#define mask t2
#define quotient t3
@@ -54,11 +51,13 @@ div:
#define compare t7
/* find correct sign for input to unsigned divide loop. */
+ negl a1, modulus # e0 :
+ negl a2, divisor # .. e1 :
sextl a1, a1 # e0 :
sextl a2, a2 # .. e1 :
- negl a1, dividend # e0 :
- negl a2, divisor # .. e1 :
- cmovge a1, a1, dividend # e0 :
+ mov zero, quotient # e0 :
+ mov 1, mask # .. e1 :
+ cmovge a1, a1, modulus # e0 :
cmovge a2, a2, divisor # .. e1 :
beq a2, $divbyzero # e1 :
unop # :
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
index ebbe055..08bf8eb 100644
--- a/sysdeps/alpha/ldiv.S
+++ b/sysdeps/alpha/ldiv.S
@@ -1,7 +1,6 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
-
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -14,10 +13,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
-
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -44,7 +42,6 @@ ldiv:
.prologue 0
#endif
-#define dividend t0
#define divisor t1
#define mask t2
#define quotient t3
@@ -54,11 +51,13 @@ ldiv:
#define compare t7
/* find correct sign for input to unsigned divide loop. */
- mov a1, dividend # e0 :
+ mov a1, modulus # e0 :
mov a2, divisor # .. e1 :
negq a1, tmp1 # e0 :
negq a2, tmp2 # .. e1 :
- cmovlt a1, tmp1, dividend # e0 :
+ mov zero, quotient # e0 :
+ mov 1, mask # .. e1 :
+ cmovlt a1, tmp1, modulus # e0 :
cmovlt a2, tmp2, divisor # .. e1 :
beq a2, $divbyzero # e1 :
unop # :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1059fb7661e754277cd318c82ae40b23d7f1c189
commit 1059fb7661e754277cd318c82ae40b23d7f1c189
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 19 12:48:14 1997 +0000
Prune list of processed files.
diff --git a/sysdeps/unix/bsd/osf/.cvsignore b/sysdeps/unix/bsd/osf/.cvsignore
new file mode 100644
index 0000000..c9147fd
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/.cvsignore
@@ -0,0 +1 @@
+=*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17f51151d247c83ce6f195a1830ba4b421705f54
commit 17f51151d247c83ce6f195a1830ba4b421705f54
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 19 05:45:44 1997 +0000
Add __getpgid.c and __setpgid.c.
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index da3d7e5..6395064 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1,2 +1,4 @@
+__getpgid.c
+__setpgid.c
sysconfig.h
siginfo.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e90fcf920bd8b223cc927f7d11a7ad9caa31b3cc
commit e90fcf920bd8b223cc927f7d11a7ad9caa31b3cc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Mar 19 05:44:31 1997 +0000
SCO 3.2.4 specific files to distribute.
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
new file mode 100644
index 0000000..984b473
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/Dist
@@ -0,0 +1 @@
+__setpgid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=465b53087d4cee3987d76970f15e67f775666f4c
commit 465b53087d4cee3987d76970f15e67f775666f4c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 18 04:17:55 1997 +0000
Don't define O_NORW.
diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
index faf1983..6e1c843 100644
--- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
@@ -27,7 +27,6 @@
#ifdef __USE_GNU
#define O_READ O_RDONLY /* Open for reading. */
#define O_WRITE O_WRONLY /* Open for writing. */
-#define O_NORW 0 /* Open without R/W access. */
#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de806c59bb7a38dc0cbf28e318dbaafe945bce29
commit de806c59bb7a38dc0cbf28e318dbaafe945bce29
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 20:12:24 1997 +0000
[__USE_GNU]: Add O_READ, O_WRITE and O_NORW.
diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
index e8697d9..faf1983 100644
--- a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
@@ -23,6 +23,12 @@
#include <sys/types.h>
+/* In GNU, read and write are bits (unlike BSD). */
+#ifdef __USE_GNU
+#define O_READ O_RDONLY /* Open for reading. */
+#define O_WRITE O_WRONLY /* Open for writing. */
+#define O_NORW 0 /* Open without R/W access. */
+#endif
/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
located on an ext2 file system */
#define O_ACCMODE 0003
@@ -38,7 +44,8 @@
#define O_APPEND 00010
#define O_NDELAY O_NONBLOCK
#define O_SYNC 040000
-#define FASYNC 020000 /* fcntl, for BSD compatibility */
+#define O_FSYNC O_SYNC
+#define O_ASYNC 020000 /* fcntl, for BSD compatibility */
#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get f_flags */
@@ -86,6 +93,7 @@ struct flock
#ifdef __USE_BSD
#define FAPPEND O_APPEND
#define FFSYNC O_FSYNC
+#define FASYNC O_ASYNC
#define FNONBLOCK O_NONBLOCK
#define FNDELAY O_NDELAY
#endif /* Use BSD. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd0059411fd28556c922de613dc6037a106c6d45
commit bd0059411fd28556c922de613dc6037a106c6d45
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 20:11:57 1997 +0000
(struct stat): Change definition to use prescribed types for elements.
(_STAT_VER): Change to value 2.
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_stat.h b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
new file mode 100644
index 0000000..7109677
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_stat.h
@@ -0,0 +1,19 @@
+/* Definition of `struct stat' used in the kernel.. */
+struct kernel_stat
+ {
+ unsigned int st_dev;
+ unsigned int st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned int st_rdev;
+ long int st_size;
+ unsigned long int st_atime;
+ unsigned long int st_mtime;
+ unsigned long int st_ctime;
+ unsigned int st_blksize;
+ int st_blocks;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h
index 92c9df7..207fa0c 100644
--- a/sysdeps/unix/sysv/linux/alpha/statbuf.h
+++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,30 +19,30 @@
#ifndef _STATBUF_H
#define _STATBUF_H 1
-/* The Alpha has no additional syscall versions. */
-
/* Versions of the `struct stat' data structure. */
-#define _STAT_VER 0
+#define _STAT_VER_LINUX_OLD 0
+#define _STAT_VER_LINUX 1
+#define _STAT_VER _STAT_VER_LINUX
/* Versions of the `xmknod' interface. */
#define _MKNOD_VER_LINUX 0
struct stat
{
- unsigned int st_dev; /* Device. */
- unsigned int st_ino; /* File serial number. */
- unsigned int st_mode; /* File mode. */
- unsigned int st_nlink; /* Link count. */
- unsigned int st_uid; /* User ID of the file's owner. */
- unsigned int st_gid; /* Group ID of the file's group.*/
- unsigned int st_rdev; /* Device number, if device. */
- long int st_size; /* Size of file, in bytes. */
- unsigned long int st_atime; /* Time of last access. */
- unsigned long int st_mtime; /* Time of last modification. */
- unsigned long int st_ctime; /* Time of last status change. */
- unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
- int st_blocks; /* Nr. of 512-byte blocks allocated. */
+ __dev_t st_dev; /* Device. */
+ __ino_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ __off_t st_size; /* Size of file, in bytes. */
+ __time_t st_atime; /* Time of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+ int st_blocks; /* Nr. of 512-byte blocks allocated. */
unsigned int st_flags;
unsigned int st_gen;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca22c3b98a613ebefee035a9fbd6eebd6e5e7245
commit ca22c3b98a613ebefee035a9fbd6eebd6e5e7245
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 19:39:48 1997 +0000
Add kernel_stat.h
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 344ffa5..80fca49 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,6 +4,7 @@ ioperm.c
init-first.h
clone.S
kernel_sigaction.h
+kernel_stat.h
sys/io.h
sys/acct.h
sys/kernel_termios.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6f4ab1a9cd563e13a2933022454da44789e0c09
commit c6f4ab1a9cd563e13a2933022454da44789e0c09
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 19:31:13 1997 +0000
Update copyright.
Define O_FSYNC as alias of O_SYNC. Add BSD compatibility macros
FAPPEND, FFSYNC, FNONBLOCK, and FNDELAY.
diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h
index a8bb776..318e483 100644
--- a/sysdeps/unix/sysv/irix4/fcntlbits.h
+++ b/sysdeps/unix/sysv/irix4/fcntlbits.h
@@ -1,21 +1,21 @@
/* O_*, F_*, FD_* bit values for SGI Irix 4.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTLBITS_H
@@ -34,6 +34,7 @@ Cambridge, MA 02139, USA. */
#define O_TRUNC 01000 /* Truncate file to zero length. */
#ifdef __USE_MISC
#define O_SYNC 00020 /* Synchronous writes. */
+#define O_FSYNC O_SYNC
#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */
#endif
@@ -95,4 +96,15 @@ struct flock
#define F_UNLCK 3 /* Remove lock. */
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FASYNC O_ASYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+
#endif /* fcntlbits.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b05d409ee791c60d0c3e4ef51d69ad393dc4764
commit 6b05d409ee791c60d0c3e4ef51d69ad393dc4764
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 19:28:40 1997 +0000
Update copyright.
diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
index 2100722..a9f66c4 100644
--- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
@@ -1,21 +1,21 @@
/* O_*, F_*, FD_* bit values for SunOS 4.
-Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTLBITS_H
@@ -33,7 +33,7 @@ Cambridge, MA 02139, USA. */
#define O_EXCL 0x0800 /* Fail if file already exists. */
#define O_TRUNC 0x0400 /* Truncate file to zero length. */
#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
-#if defined (__USE_BSD) || defined (__USE_SVID)
+#if defined __USE_BSD || defined __USE_SVID
#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
#define O_FSYNC 0x2000 /* Synchronous writes. */
#define O_SYNC O_FSYNC
diff --git a/sysdeps/unix/bsd/ultrix4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h
index bf8e7b2..ba736e4 100644
--- a/sysdeps/unix/bsd/ultrix4/fcntlbits.h
+++ b/sysdeps/unix/bsd/ultrix4/fcntlbits.h
@@ -1,21 +1,21 @@
/* O_*, F_*, FD_* bit values for Ultrix 4.
-Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _FCNTLBITS_H
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e126f4bac922d867ec138fad4845c7b7ee2a455
commit 0e126f4bac922d867ec138fad4845c7b7ee2a455
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Mar 16 18:33:39 1997 +0000
m68k specific infinity values.
diff --git a/sysdeps/m68k/huge_val.h b/sysdeps/m68k/huge_val.h
new file mode 100644
index 0000000..c213958
--- /dev/null
+++ b/sysdeps/m68k/huge_val.h
@@ -0,0 +1,92 @@
+/* `HUGE_VAL' constants for m68k (where it is infinity).
+ Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _HUGE_VAL_H
+#define _HUGE_VAL_H 1
+
+#include <features.h>
+#include <sys/cdefs.h>
+#include <endian.h>
+
+/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }
+#endif
+
+#define __huge_val_t union { unsigned char __c[8]; double __d; }
+#ifdef __GNUC__
+#define HUGE_VAL (__extension__ \
+ ((__huge_val_t) { __c: __HUGE_VAL_bytes }).__d)
+#else /* Not GCC. */
+static __huge_val_t __huge_val = { __HUGE_VAL_bytes };
+#define HUGE_VAL (__huge_val.__d)
+#endif /* GCC. */
+
+
+/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
+
+#ifdef __USE_ISOC9X
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 }
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
+#endif
+
+#define __huge_valf_t union { unsigned char __c[4]; float __f; }
+#ifdef __GNUC__
+#define HUGE_VALF (__extension__ \
+ ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
+#else /* Not GCC. */
+static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
+#define HUGE_VALF (__huge_valf.__f)
+#endif /* GCC. */
+
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define __HUGE_VALL_bytes { 0x7f, 0xff, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
+#endif
+
+#define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
+#ifdef __GNUC__
+#define HUGE_VALL (__extension__ \
+ ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
+#else /* Not GCC. */
+static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
+#define HUGE_VALL (__huge_vall.__ld)
+#endif /* GCC. */
+
+
+/* Expression representing positive infinity. Here it is the same as
+ HUGE_VALF. */
+#define INFINITY HUGE_VALF
+
+#endif /* __USE_ISOC9X. */
+
+
+#endif /* huge_val.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e79446f41d20c161c71ddda5c6576993dd019292
commit e79446f41d20c161c71ddda5c6576993dd019292
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 8 17:55:27 1997 +0000
Remove cabs inline definition.
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 50d8ac3..0f76027 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -1,22 +1,22 @@
/* Inline math functions for Alpha.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by David Mosberger-Tang.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger-Tang.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
@@ -41,13 +41,4 @@ atan (double __x)
return __atan2 (__x, 1.0);
}
-#ifdef __USE_MISC
-extern __inline double
-cabs (struct __cabs_complex __z)
-{
- extern double __hypot (double, double);
- return __hypot(__z.x, __z.y);
-}
-#endif
-
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b117ce72c440875b5fe2df8a41dba58e415cdf9
commit 3b117ce72c440875b5fe2df8a41dba58e415cdf9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Mar 8 05:08:06 1997 +0000
Update feature tests to use __USE_ISOC9X.
[__USE_ISOC9X]: Define __log2 and __exp2 inlines.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 1a29a56..fe01c25 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -43,7 +43,7 @@
suffixed with f and l for the float and long double version, resp). OP
is the name of the fpu operation (without leading f). */
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_ISOC9X
#define __inline_mathop(func, op) \
__inline_mathop1(double, func, op) \
__inline_mathop1(float, __CONCAT(func,f), op) \
@@ -81,7 +81,6 @@ __inline_mathop(__sin, sin)
__inline_mathop(__tan, tan)
__inline_mathop(__tanh, tanh)
__inline_mathop(__fabs, abs)
-__inline_mathop(__sqrt, sqrt)
__inline_mathop(__rint, int)
__inline_mathop(__expm1, etoxm1)
@@ -89,6 +88,9 @@ __inline_mathop(__log1p, lognp1)
__inline_mathop(__logb, log2)
__inline_mathop(__significand, getman)
+__inline_mathop(__log2, log2)
+__inline_mathop(__exp2, twotox)
+
#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
__inline_mathop(atan, atan)
@@ -96,10 +98,8 @@ __inline_mathop(cos, cos)
__inline_mathop(sin, sin)
__inline_mathop(tan, tan)
__inline_mathop(tanh, tanh)
-__inline_mathop(fabs, abs)
-__inline_mathop(sqrt, sqrt)
-#if defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED)
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X
__inline_mathop(rint, int)
__inline_mathop(expm1, etoxm1)
__inline_mathop(log1p, lognp1)
@@ -110,6 +110,11 @@ __inline_mathop(logb, log2)
__inline_mathop(significand, getman)
#endif
+#ifdef __USE_ISOC9X
+__inline_mathop(log2, log2)
+__inline_mathop(exp2, twotox)
+#endif
+
#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
/* This macro contains the definition for the rest of the inline
@@ -375,11 +380,13 @@ __inline_forward_c(int,finite, (double __value), (__value))
__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
#endif
#if defined __USE_MISC || defined __USE_XOPEN
+#ifndef __USE_ISOC9X /* Conflict with macro of same name. */
__inline_forward_c(int,isnan, (double __value), (__value))
+#endif
__inline_forward_c(int,ilogb, (double __value), (__value))
#endif
-#ifdef __USE_MISC
+#if defined __USE_MISC || defined __USE_ISOC9X
__inline_forward(float,frexpf, (float __value, int *__expptr),
(__value, __expptr))
@@ -387,11 +394,13 @@ __inline_forward_c(float,floorf, (float __x), (__x))
__inline_forward_c(float,ceilf, (float __x), (__x))
__inline_forward(float,modff, (float __value, float *__iptr),
(__value, __iptr))
+#ifdef __USE_MISC
__inline_forward_c(int,isinff, (float __value), (__value))
__inline_forward_c(int,finitef, (float __value), (__value))
__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
__inline_forward_c(int,isnanf, (float __value), (__value))
__inline_forward_c(int,ilogbf, (float __value), (__value))
+#endif
__inline_forward(long double,frexpl, (long double __value, int *__expptr),
(__value, __expptr))
@@ -400,14 +409,16 @@ __inline_forward_c(long double,ceill, (long double __x), (__x))
__inline_forward(long double,modfl,
(long double __value, long double *__iptr),
(__value, __iptr))
+#ifdef __USE_MISC
__inline_forward_c(int,isinfl, (long double __value), (__value))
__inline_forward_c(int,finitel, (long double __value), (__value))
__inline_forward_c(long double,scalbnl, (long double __x, int __n),
(__x, __n))
__inline_forward_c(int,isnanl, (long double __value), (__value))
__inline_forward_c(int,ilogbl, (long double __value), (__value))
+#endif
-#endif /* __USE_MISC */
+#endif /* Use misc or ISO C9X */
#undef __inline_forward
#undef __inline_forward_c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28c50ce97ff57d2c8ac834f5d2e46abf6d56ed0e
commit 28c50ce97ff57d2c8ac834f5d2e46abf6d56ed0e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Mar 4 05:53:20 1997 +0000
update from main archive 970304
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 0e3e2a3..1a29a56 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -1,26 +1,27 @@
-/* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Definitions of inline math functions implemented by the m68881/2.
+ Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef __GNUC__
#include <sys/cdefs.h>
-#ifdef __NO_M81_MATH_INLINES
+#ifdef __LIBC_M81_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
__ names, and with `static inline' instead of `extern inline' so the
bodies will always be used, never an external function call. */
@@ -34,36 +35,35 @@ Cambridge, MA 02139, USA. */
/* Define a const math function. */
#define __m81_defun(rettype, func, args) \
- __m81_inline rettype \
- __m81_u(func) args __attribute__((__const__)); \
- __m81_inline rettype \
+ __m81_inline rettype __attribute__((__const__)) \
__m81_u(func) args
/* Define the three variants of a math function that has a direct
implementation in the m68k fpu. FUNC is the name for C (which will be
suffixed with f and l for the float and long double version, resp). OP
is the name of the fpu operation (without leading f). */
-#define __inline_mathop(func, op) \
- __m81_defun (double, func, (double __mathop_x)) \
- { \
- double __result; \
- __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
- return __result; \
- } \
- __m81_defun (float, func##f, (float __mathop_x)) \
- { \
- float __result; \
- __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
- return __result; \
- } \
- __m81_defun (long double, func##l, (long double __mathop_x)) \
+
+#ifdef __USE_MISC
+#define __inline_mathop(func, op) \
+ __inline_mathop1(double, func, op) \
+ __inline_mathop1(float, __CONCAT(func,f), op) \
+ __inline_mathop1(long double, __CONCAT(func,l), op)
+#else
+#define __inline_mathop(func, op) \
+ __inline_mathop1(double, func, op)
+#endif
+
+#define __inline_mathop1(float_type,func, op) \
+ __m81_defun (float_type, func, (float_type __mathop_x)) \
{ \
- long double __result; \
+ float_type __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
+#ifdef __LIBC_M81_MATH_INLINES
/* ieee style elementary functions */
+/* These are internal to the implementation of libm. */
__inline_mathop(__ieee754_acos, acos)
__inline_mathop(__ieee754_asin, asin)
__inline_mathop(__ieee754_cosh, cosh)
@@ -73,6 +73,7 @@ __inline_mathop(__ieee754_log10, log10)
__inline_mathop(__ieee754_log, logn)
__inline_mathop(__ieee754_sqrt, sqrt)
__inline_mathop(__ieee754_atanh, atanh)
+#endif
__inline_mathop(__atan, atan)
__inline_mathop(__cos, cos)
@@ -88,31 +89,56 @@ __inline_mathop(__log1p, lognp1)
__inline_mathop(__logb, log2)
__inline_mathop(__significand, getman)
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+__inline_mathop(atan, atan)
+__inline_mathop(cos, cos)
+__inline_mathop(sin, sin)
+__inline_mathop(tan, tan)
+__inline_mathop(tanh, tanh)
+__inline_mathop(fabs, abs)
+__inline_mathop(sqrt, sqrt)
+
+#if defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED)
+__inline_mathop(rint, int)
+__inline_mathop(expm1, etoxm1)
+__inline_mathop(log1p, lognp1)
+__inline_mathop(logb, log2)
+#endif
+
+#ifdef __USE_MISC
+__inline_mathop(significand, getman)
+#endif
+
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+
/* This macro contains the definition for the rest of the inline
functions, using __FLOAT_TYPE as the domain type and __S as the suffix
for the function names. */
-#define __inline_functions(__float_type, __s) \
-__m81_defun (__float_type, \
- __ieee754_remainder##__s, (__float_type __x, __float_type __y)) \
+#ifdef __LIBC_M81_MATH_INLINES
+/* Internally used functions. */
+#define __internal_inline_functions(float_type, s) \
+__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \
+ (float_type __x, float_type __y)) \
{ \
- __float_type __result; \
+ float_type __result; \
__asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
return __result; \
} \
\
-__m81_defun (__float_type, \
- __ieee754_fmod##__s, (__float_type __x, __float_type __y)) \
+__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \
+ (float_type __x, float_type __y)) \
{ \
- __float_type __result; \
+ float_type __result; \
__asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
return __result; \
} \
\
-__m81_defun (__float_type, \
- __ieee754_atan2##__s, (__float_type __y, __float_type __x)) \
+__m81_defun (float_type, __CONCAT(__ieee754_atan2,s), \
+ (float_type __y, float_type __x)) \
{ \
- __float_type __pi, __pi_2; \
+ float_type __pi, __pi_2; \
\
__asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \
__asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \
@@ -121,16 +147,16 @@ __m81_defun (__float_type, \
if (__y > 0) \
{ \
if (__x > __y) \
- return __m81_u(__atan##__s) (__y / __x); \
+ return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
else \
- return __pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
} \
else \
{ \
if (__x > -__y) \
- return __m81_u(__atan##__s) (__y / __x); \
+ return __m81_u(__CONCAT(__atan,s)) (__y / __x); \
else \
- return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
} \
} \
else \
@@ -138,58 +164,24 @@ __m81_defun (__float_type, \
if (__y > 0) \
{ \
if (-__x < __y) \
- return __pi + __m81_u(__atan##__s) (__y / __x); \
+ return __pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
else \
- return __pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ return __pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
} \
else \
{ \
if (-__x > -__y) \
- return -__pi + __m81_u(__atan##__s) (__y / __x); \
+ return -__pi + __m81_u(__CONCAT(__atan,s)) (__y / __x); \
else \
- return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ return -__pi_2 - __m81_u(__CONCAT(__atan,s)) (__x / __y); \
} \
} \
} \
\
-__m81_inline __float_type \
-__m81_u(__frexp##__s)(__float_type __value, int *__expptr) \
-{ \
- __float_type __mantissa, __exponent; \
- int __iexponent; \
- if (__value == 0.0) \
- { \
- *__expptr = 0; \
- return __value; \
- } \
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
- __iexponent = (int) __exponent + 1; \
- *__expptr = __iexponent; \
- __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
- : "0" (__value), "dmi" (-__iexponent)); \
- return __mantissa; \
-} \
- \
-__m81_defun (__float_type, __floor##__s, (__float_type __x)) \
-{ \
- __float_type __result; \
- unsigned long int __ctrl_reg; \
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
- /* Set rounding towards negative infinity. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
- /* Convert X to an integer, using -Inf rounding. */ \
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
- /* Restore the previous rounding mode. */ \
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
- : "dmi" (__ctrl_reg)); \
- return __result; \
-} \
- \
-__m81_defun (__float_type, \
- __ieee754_pow##__s, (__float_type __x, __float_type __y)) \
+__m81_defun (float_type, __CONCAT(__ieee754_pow,s), \
+ (float_type __x, float_type __y)) \
{ \
- __float_type __result; \
+ float_type __result; \
if (__x == 0.0) \
{ \
if (__y <= 0.0) \
@@ -209,12 +201,12 @@ __m81_defun (__float_type, \
__asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
else if (__x < 0.0) \
{ \
- __float_type __temp = __m81_u (__rint##__s) (__y); \
+ float_type __temp = __m81_u (__CONCAT(__rint,s)) (__y); \
if (__y == __temp) \
{ \
int __i = (int) __y; \
- __result = (__m81_u(__ieee754_exp##__s) \
- (__y * __m81_u(__ieee754_log##__s) (-__x))); \
+ __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
+ (__y * __m81_u(__CONCAT(__ieee754_log,s)) (-__x))); \
if (__i & 1) \
__result = -__result; \
} \
@@ -222,14 +214,66 @@ __m81_defun (__float_type, \
__result = 0.0 / 0.0; \
} \
else \
- __result = (__m81_u(__ieee754_exp##__s) \
- (__y * __m81_u(__ieee754_log##__s) (__x))); \
+ __result = (__m81_u(__CONCAT(__ieee754_exp,s)) \
+ (__y * __m81_u(__CONCAT(__ieee754_log,s)) (__x))); \
return __result; \
} \
\
-__m81_defun (__float_type, __ceil##__s, (__float_type __x)) \
+__m81_defun (float_type, __CONCAT(__ieee754_scalb,s), \
+ (float_type __x, float_type __n)) \
{ \
- __float_type __result; \
+ float_type __result; \
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
+ return __result; \
+}
+
+__internal_inline_functions (double,)
+__internal_inline_functions (float,f)
+__internal_inline_functions (long double,l)
+#undef __internal_inline_functions
+
+#endif /* __LIBC_M81_MATH_INLINES */
+
+/* The rest of the functions are available to the user. */
+
+#define __inline_functions(float_type, s) \
+__m81_inline float_type \
+__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \
+{ \
+ float_type __mantissa, __exponent; \
+ int __iexponent; \
+ if (__value == 0.0) \
+ { \
+ *__expptr = 0; \
+ return __value; \
+ } \
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
+ __iexponent = (int) __exponent + 1; \
+ *__expptr = __iexponent; \
+ __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
+ : "0" (__value), "dmi" (-__iexponent)); \
+ return __mantissa; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \
+{ \
+ float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards negative infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
+ /* Convert X to an integer, using -Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \
+{ \
+ float_type __result; \
unsigned long int __ctrl_reg; \
__asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
/* Set rounding towards positive infinity. */ \
@@ -243,16 +287,16 @@ __m81_defun (__float_type, __ceil##__s, (__float_type __x)) \
return __result; \
} \
\
-__m81_inline __float_type \
-__m81_u(__modf##__s)(__float_type __value, __float_type *__iptr) \
+__m81_inline float_type \
+__m81_u(__CONCAT(__modf,s))(float_type __value, float_type *__iptr) \
{ \
- __float_type __modf_int; \
+ float_type __modf_int; \
__asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \
*__iptr = __modf_int; \
return __value - __modf_int; \
} \
\
-__m81_defun (int, __isinf##__s, (__float_type __value)) \
+__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, \
so we must extract and examine the condition codes manually. */ \
@@ -262,7 +306,7 @@ __m81_defun (int, __isinf##__s, (__float_type __value)) \
return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
} \
\
-__m81_defun (int, __isnan##__s, (__float_type __value)) \
+__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \
{ \
char __result; \
__asm("ftst%.x %1\n" \
@@ -270,7 +314,7 @@ __m81_defun (int, __isnan##__s, (__float_type __value)) \
return __result; \
} \
\
-__m81_defun (int, __finite##__s, (__float_type __value)) \
+__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \
{ \
/* There is no branch-condition for infinity, so we must extract and \
examine the condition codes manually. */ \
@@ -280,34 +324,94 @@ __m81_defun (int, __finite##__s, (__float_type __value)) \
return (__fpsr & (3 << 24)) == 0; \
} \
\
-__m81_defun (int, __ilogb##__s, (__float_type __x)) \
+__m81_defun (int, __CONCAT(__ilogb,s), (float_type __x)) \
{ \
- __float_type __result; \
+ float_type __result; \
if (__x == 0.0) \
return 0x80000001; \
__asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
return (int) __result; \
} \
\
-__m81_defun (__float_type, \
- __ieee754_scalb##__s, (__float_type __x, __float_type __n)) \
+__m81_defun (float_type, __CONCAT(__scalbn,s), (float_type __x, int __n)) \
{ \
- __float_type __result; \
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
- return __result; \
-} \
- \
-__m81_defun (__float_type, __scalbn##__s, (__float_type __x, int __n)) \
-{ \
- __float_type __result; \
+ float_type __result; \
__asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
return __result; \
}
/* This defines the three variants of the inline functions. */
-__inline_functions (double, )
-__inline_functions (float, f)
-__inline_functions (long double, l)
+__inline_functions (double,)
+__inline_functions (float,f)
+__inline_functions (long double,l)
#undef __inline_functions
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+
+/* Define inline versions of the user visible functions. */
+
+#define __inline_forward_c(rettype, name, args1, args2) \
+extern __inline rettype __attribute__((__const__)) \
+name args1 \
+{ \
+ return __CONCAT(__,name) args2; \
+}
+
+#define __inline_forward(rettype, name, args1, args2) \
+extern __inline rettype name args1 \
+{ \
+ return __CONCAT(__,name) args2; \
+}
+
+__inline_forward(double,frexp, (double __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(double,floor, (double __x), (__x))
+__inline_forward_c(double,ceil, (double __x), (__x))
+__inline_forward(double,modf, (double __value, double *__iptr),
+ (__value, __iptr))
+#ifdef __USE_MISC
+__inline_forward_c(int,isinf, (double __value), (__value))
+__inline_forward_c(int,finite, (double __value), (__value))
+__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n))
+#endif
+#if defined __USE_MISC || defined __USE_XOPEN
+__inline_forward_c(int,isnan, (double __value), (__value))
+__inline_forward_c(int,ilogb, (double __value), (__value))
+#endif
+
+#ifdef __USE_MISC
+
+__inline_forward(float,frexpf, (float __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(float,floorf, (float __x), (__x))
+__inline_forward_c(float,ceilf, (float __x), (__x))
+__inline_forward(float,modff, (float __value, float *__iptr),
+ (__value, __iptr))
+__inline_forward_c(int,isinff, (float __value), (__value))
+__inline_forward_c(int,finitef, (float __value), (__value))
+__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n))
+__inline_forward_c(int,isnanf, (float __value), (__value))
+__inline_forward_c(int,ilogbf, (float __value), (__value))
+
+__inline_forward(long double,frexpl, (long double __value, int *__expptr),
+ (__value, __expptr))
+__inline_forward_c(long double,floorl, (long double __x), (__x))
+__inline_forward_c(long double,ceill, (long double __x), (__x))
+__inline_forward(long double,modfl,
+ (long double __value, long double *__iptr),
+ (__value, __iptr))
+__inline_forward_c(int,isinfl, (long double __value), (__value))
+__inline_forward_c(int,finitel, (long double __value), (__value))
+__inline_forward_c(long double,scalbnl, (long double __x, int __n),
+ (__x, __n))
+__inline_forward_c(int,isnanl, (long double __value), (__value))
+__inline_forward_c(int,ilogbl, (long double __value), (__value))
+
+#endif /* __USE_MISC */
+
+#undef __inline_forward
+#undef __inline_forward_c
+
+#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */
+
#endif /* GCC. */
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 61c374d..7ea9fb0 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define __NO_M81_MATH_INLINES
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index bf2f7ed..1daa453 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define __NO_M81_MATH_INLINES
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 6bb9090..516d459 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define __NO_M81_MATH_INLINES
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index f10c7f9..348bc8f 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define __NO_M81_MATH_INLINES
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index 9c222cd..c38327e 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -1,22 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#define __NO_M81_MATH_INLINES
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#include "math_private.h"
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index 99b3024..f3d6960 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__,FUNC), (x), float_type x)
+__CONCATX(__,FUNC) (x)
+ float_type x;
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 8b38086..84a9a0b 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,9 +29,12 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr)
+__CONCATX(__,FUNC) (value, expptr)
+ float_type value;
+ int *expptr;
{
return __m81_u(__CONCATX(__,FUNC))(value, expptr);
}
+
#define weak_aliasx(a,b) weak_alias(a,b)
weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 39c8714..a081a88 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
int
-DEFUN(__CONCATX(__,FUNC), (x), float_type x)
+__CONCATX(__,FUNC) (x)
+ float_type x;
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 7d4b1c4..fa0d1d5 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,7 +29,8 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
int
-DEFUN(__CONCATX(__,FUNC), (x), float_type x)
+__CONCATX(__,FUNC) (x)
+ float_type x;
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 426d847..6428afc 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,9 +29,12 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr)
+__CONCATX(__,FUNC) (x, iptr)
+ float_type x;
+ float_type *iptr;
{
return __m81_u(__CONCATX(__,FUNC))(x, iptr);
}
+
#define weak_aliasx(a,b) weak_alias(a,b)
weak_aliasx(__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 6d2b74a..1d43a75 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __LIBC_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
@@ -30,7 +29,9 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp)
+__CONCATX(__,FUNC) (x, exp)
+ float_type x;
+ int exp;
{
return __m81_u(__CONCATX(__,FUNC))(x, exp);
}
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 3d9f6dc..f44686b 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe <brendan@zen.org>, 1993.
@@ -50,20 +50,23 @@ LEAF(__brk, 0)
ldiq v0, __NR_brk
call_pal PAL_callsys
+ /* Be prepared for an OSF-style brk. */
+ bne a3, $err1
+ beq v0, $ok
+
/* Correctly handle the brk(0) query case. */
cmoveq a0, v0, a0
-
- subq a0, v0, t0
- bne t0, error
+ xor a0, v0, t0
+ bne t0, $err0
/* Update __curbrk and return cleanly. */
- stq a0, __curbrk
mov zero, v0
+$ok: stq a0, __curbrk
ret
/* What a horrible way to die. */
-error: ldi v0, ENOMEM
- jmp zero, __syscall_error
+$err0: ldi v0, ENOMEM
+$err1: jmp zero, __syscall_error
END(__brk)
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
index 3f86c46..3ad90f7 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -3,4 +3,4 @@
# along the way (e.g., glue-ctype) will fail because it'll try to link
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
-BUILD_CFLAGS := $(BUILD_CFLAGS) -L/lib
+ALL_BUILD_CFLAGS += -L/lib
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6abe77e92825e8933565881ed6a231e9aa4a3f5
commit d6abe77e92825e8933565881ed6a231e9aa4a3f5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Feb 19 04:43:26 1997 +0000
update from main archive 970218
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 316f717..fc9f971 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -325,7 +325,7 @@ static inline void
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
const Elf64_Sym *sym,
- const hash_name_pair *version)
+ const struct r_found_version *version)
{
Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 95a8342..0c9b6ac 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -200,7 +200,7 @@ _dl_start_user:
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
- const Elf32_Sym *sym, const hash_name_pair *version)
+ const Elf32_Sym *sym, const struct r_found_version *version)
{
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
Elf32_Addr loadbase;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index a4a02bf..39a1cc8 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -423,7 +423,7 @@ _dl_start_user:\n\
static inline void
elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
- const ElfW(Sym) *sym, const hash_name_pair *version)
+ const ElfW(Sym) *sym, const struct r_found_version *version)
{
ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
ElfW(Addr) loadbase, undo;
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
index d0d177c..ff55773 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
@@ -1,5 +1,5 @@
/* Bit values for resource limits. SunOS 4 version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,8 +49,8 @@ enum __rlimit_resource
/* Number of open files. */
RLIMIT_NOFILE,
RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
-#defin RLIMIT_NOFILE RLIMIT_NOFILE
-#defin RLIMIT_OFILE RLIMIT_OFILE
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE RLIMIT_OFILE
RLIM_NLIMITS,
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ead5e716303c75031bfcabd288f8e448e2b6146
commit 4ead5e716303c75031bfcabd288f8e448e2b6146
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Feb 15 04:31:01 1997 +0000
Update to 2.1.x development version
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index b735e15..316f717 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -324,7 +324,8 @@ elf_alpha_fix_plt(struct link_map *l,
static inline void
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
- const Elf64_Sym *sym)
+ const Elf64_Sym *sym,
+ const hash_name_pair *version)
{
Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
@@ -355,7 +356,7 @@ elf_machine_rela (struct link_map *map,
{
Elf64_Addr loadbase, sym_value;
- loadbase = RESOLVE (&sym,
+ loadbase = RESOLVE (&sym, version,
r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0);
sym_value = sym ? loadbase + sym->st_value : 0;
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index a4b1edc..95a8342 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -199,8 +199,8 @@ _dl_start_user:
MAP is the object containing the reloc. */
static inline void
-elf_machine_rela (struct link_map *map,
- const Elf32_Rela *reloc, const Elf32_Sym *sym)
+elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
+ const Elf32_Sym *sym, const hash_name_pair *version)
{
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
Elf32_Addr loadbase;
@@ -208,29 +208,29 @@ elf_machine_rela (struct link_map *map,
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC);
+ loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOEXEC);
memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
break;
case R_68K_GLOB_DAT:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_JMP_SLOT:
- loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT);
+ loadbase = RESOLVE (&sym, version, DL_LOOKUP_NOPLT);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_8:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_16:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_32:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
@@ -238,17 +238,17 @@ elf_machine_rela (struct link_map *map,
*reloc_addr = map->l_addr + reloc->r_addend;
break;
case R_68K_PC8:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
case R_68K_PC16:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
case R_68K_PC32:
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 9e80426..a4a02bf 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -422,8 +422,8 @@ _dl_start_user:\n\
MAP is the object containing the reloc. */
static inline void
-elf_machine_rel (struct link_map *map,
- const ElfW(Rel) *reloc, const ElfW(Sym) *sym)
+elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
+ const ElfW(Sym) *sym, const hash_name_pair *version)
{
ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
ElfW(Addr) loadbase, undo;
@@ -454,7 +454,7 @@ elf_machine_rel (struct link_map *map,
else
#endif
undo = 0;
- loadbase = RESOLVE (&sym, 0);
+ loadbase = RESOLVE (&sym, version, 0);
*reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
}
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f2a7bb209a7d3ffc9d6769881e8258ab87d4262d
commit f2a7bb209a7d3ffc9d6769881e8258ab87d4262d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 10 03:19:47 1997 +0000
update from main archive 970209
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 402dfc5..bbbcf84 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -1,27 +1,32 @@
/* brk system call for Linux/m68k.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <unistd.h>
#include <sysdep.h>
-void *__curbrk;
+void *__curbrk = 0;
+
+/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
+ to work around different old braindamage in the old Linux/x86 ELF
+ dynamic linker. Sigh. */
+weak_alias (__curbrk, ___brk_addr)
int
__brk (void *addr)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=362edefbd8ecea2292c893794aa1712c2abfcada
commit 362edefbd8ecea2292c893794aa1712c2abfcada
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Feb 4 02:00:49 1997 +0000
update from main archive 970203
diff --git a/sysdeps/m68k/asm-syntax.h b/sysdeps/m68k/asm-syntax.h
new file mode 100644
index 0000000..fbb0e2f
--- /dev/null
+++ b/sysdeps/m68k/asm-syntax.h
@@ -0,0 +1,110 @@
+/* Definitions for 68k syntax variations.
+ Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in the GNU MP Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef HAVE_ELF
+
+/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
+#define ALIGNARG(log2) 1<<log2
+/* For ELF we need the `.type' directive to make shared libs work right. */
+#define PROLOG(name) .type name,@function
+#define EPILOG(name) .size name,.-name
+/* For ELF we need to prefix register names and local labels. */
+#ifdef __STDC__
+#define R_(r) %##r
+#define R(r) R_(r)
+#define L(label) .##label
+#else
+#define R(r) %/**/r
+#define L(label) ./**/label
+#endif
+
+#else
+
+#define ALIGNARG(log2) log2
+#define PROLOG(name) /* Nothing. */
+#define EPILOG(name) /* Nothing. */
+#define R(r) r
+#define L(label) label
+
+#endif
+
+#ifdef MIT_SYNTAX
+#define MEM(base)R(base)@
+#define MEM_DISP(base,displacement)R(base)@(displacement)
+#define MEM_INDX(base,idx,size_suffix)R(base)@(R(idx):size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)R(base)@(R(idx):size_suffix:scale)
+#define MEM_PREDEC(memory_base)R(memory_base)@-
+#define MEM_POSTINC(memory_base)R(memory_base)@+
+#define TEXT .text
+#define ALIGN .even
+#define GLOBL .globl
+/* Use variable sized opcodes. */
+#define bcc jcc
+#define bcs jcs
+#define bls jls
+#define beq jeq
+#define bne jne
+#define bra jra
+#endif
+
+#ifdef MOTOROLA_SYNTAX
+#define MEM(base)(R(base))
+#define MEM_DISP(base,displacement)(displacement,R(base))
+#define MEM_PREDEC(memory_base)-(R(memory_base))
+#define MEM_POSTINC(memory_base)(R(memory_base))+
+#ifdef __STDC__
+#define MEM_INDX_(base,idx,size_suffix)(R(base),R(idx##.##size_suffix))
+#define MEM_INDX(base,idx,size_suffix)MEM_INDX_(base,idx,size_suffix)
+#define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
+#define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
+#else
+#define MEM_INDX(base,idx,size_suffix)(R(base),R(idx).size_suffix)
+#define MEM_INDX1(base,idx,size_suffix,scale)(R(base),R(idx).size_suffix*scale)
+#endif
+#define TEXT .text
+#define ALIGN .align ALIGNARG(2)
+#define GLOBL .globl
+#define bcc jbcc
+#define bcs jbcs
+#define bls jbls
+#define beq jbeq
+#define bne jbne
+#define bra jbra
+#define movel move.l
+#define moveml movem.l
+#define moveql moveq.l
+#define cmpl cmp.l
+#define orl or.l
+#define clrl clr.l
+#define eorw eor.w
+#define lsrl lsr.l
+#define lsll lsl.l
+#define roxrl roxr.l
+#define roxll roxl.l
+#define addl add.l
+#define addxl addx.l
+#define addql addq.l
+#define subl sub.l
+#define subxl subx.l
+#define subql subq.l
+#define negl neg.l
+#define mulul mulu.l
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f316a01110a84804a92403da72c92b60e389e62c
commit f316a01110a84804a92403da72c92b60e389e62c
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Feb 3 03:18:05 1997 +0000
update from main archive 970202
diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S
index 8c5fcf6..f47348e 100644
--- a/sysdeps/alpha/stxncpy.S
+++ b/sysdeps/alpha/stxncpy.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu)
This file is part of the GNU C Library.
@@ -321,9 +321,9 @@ $unaligned:
mskqh t2, t5, t2 # e0 : begin src byte validity mask
cmpbge zero, t1, t7 # .. e1 : is there a zero?
extql t2, a1, t2 # e0 :
- or t7, t10, t6 # .. e1 : test for end-of-count too
+ or t7, t10, t5 # .. e1 : test for end-of-count too
cmpbge zero, t2, t3 # e0 :
- cmoveq a2, t6, t7 # .. e1 :
+ cmoveq a2, t5, t7 # .. e1 :
andnot t7, t3, t7 # e0 :
beq t7, $u_head # .. e1 (zdb)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19e7f5a66437bcb678d3234e9570535aec6e2017
commit 19e7f5a66437bcb678d3234e9570535aec6e2017
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Feb 2 01:49:47 1997 +0000
update from main archive 970201
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 1d01f03..b735e15 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -43,7 +43,7 @@ elf_machine_matches_host (Elf64_Word e_machine)
static inline Elf64_Addr
elf_machine_dynamic (void)
{
-#ifdef AXP_MULTI_GOT_LD
+#ifndef NO_AXP_MULTI_GOT_LD
return (Elf64_Addr) &_DYNAMIC;
#else
register Elf64_Addr *gp __asm__ ("$29");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=058af9f0a626b54248eabbc7fcd1f7080f4a6531
commit 058af9f0a626b54248eabbc7fcd1f7080f4a6531
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 29 03:50:12 1997 +0000
update from main archive 970128
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 8486cfa..d2d2add 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -23,7 +23,7 @@
LEAF(__ieee_set_fp_control, 16)
#ifdef PROF
- ldgp gp, 0(sp)
+ ldgp gp, 0(pv)
lda sp, -16(sp)
.set noat
lda AT, _mcount
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2afcaa902696b4f2fb28c010265e2113456e28eb
commit 2afcaa902696b4f2fb28c010265e2113456e28eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 28 03:59:28 1997 +0000
update from main archive 970127
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
index bcd3ff5..d0932c1 100644
--- a/sysdeps/unix/sysv/linux/alpha/termbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/termbits.h
@@ -17,6 +17,9 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#ifndef _TERMBITS_H
+#define _TERMBITS_H 1
+
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
@@ -186,3 +189,5 @@ struct termios
#define _IOT_termios /* Hurd ioctl type field. */ \
_IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+#endif /* _TERMBITS_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cc93c083b65d86c69aa096aa90478892aee4a1e
commit 4cc93c083b65d86c69aa096aa90478892aee4a1e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 27 06:02:00 1997 +0000
update from main archive 970126
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index f3c4cb9..344ffa5 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -3,8 +3,8 @@ ieee_get_fp_control.S ieee_set_fp_control.S
ioperm.c
init-first.h
clone.S
+kernel_sigaction.h
sys/io.h
-kernel_termios.h
sys/acct.h
-sys/kernel_sigaction.h
+sys/kernel_termios.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48e698a89c11f9793b8e0748b6e97261843e0f95
commit 48e698a89c11f9793b8e0748b6e97261843e0f95
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Jan 25 02:36:30 1997 +0000
update from main archive 970124
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 488265a..b39f39a 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -67,8 +67,8 @@
#define CIA_DENSE_MEM (0xfffffc8600000000UL)
#define T2_IO_BASE (0xfffffc03a0000000UL)
-#define T2_SPARSE_BASE (0xfffffc0200000000UL)
-#define T2_DENSE_BASE (0xfffffc03c0000000UL)
+#define T2_SPARSE_MEM (0xfffffc0200000000UL)
+#define T2_DENSE_MEM (0xfffffc03c0000000UL)
typedef enum {
IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b568adc31d6ce9e4506d4b3f078a2aa8211db90e
commit b568adc31d6ce9e4506d4b3f078a2aa8211db90e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Jan 24 02:23:43 1997 +0000
update from main archive 970122
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
index eebe976..4be759a 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
@@ -1,5 +1,10 @@
+#ifndef _SYS_KERNEL_TERMIOS_H
+#define _SYS_KERNEL_TERMIOS_H 1
/* The following corresponds to the values from the Linux 2.1.20 kernel. */
+/* We need the definition of tcflag_t, cc_t, and speed_t. */
+#include <termbits.h>
+
#define __KERNEL_NCCS 19
struct __kernel_termios
@@ -16,3 +21,5 @@ struct __kernel_termios
#define _HAVE_C_ISPEED 1
#define _HAVE_C_OSPEED 1
+
+#endif /* sys/kernel_termios.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc37f3e59db1b24245117f14fe634677ed13fdb2
commit dc37f3e59db1b24245117f14fe634677ed13fdb2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 23 04:24:10 1997 +0000
update from main archive 970121
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
index 6381fdc..a51ed7f 100644
--- a/sysdeps/standalone/i386/force_cpu386/Makefile
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -19,7 +19,7 @@
# Boston, MA 02111-1307, USA.
ifeq (bare,$(subdir))
-install-others += $(libdir)/force_cpu386.ld
-$(libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld
+install-others += $(inst_libdir)/force_cpu386.ld
+$(inst_libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld
$(do-install)
endif
diff --git a/sysdeps/unix/bsd/sony/newsos4/Makefile b/sysdeps/unix/bsd/sony/newsos4/Makefile
index 7cfecf2..053da56 100644
--- a/sysdeps/unix/bsd/sony/newsos4/Makefile
+++ b/sysdeps/unix/bsd/sony/newsos4/Makefile
@@ -1,3 +1,3 @@
-ifeq ($(subdir), posix)
+ifeq ($(subdir),posix)
sysdep_routines := $(sysdep_routines) sys_wait4
endif
diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile
index 96b88e1..d17654a 100644
--- a/sysdeps/unix/bsd/sun/sunos4/Makefile
+++ b/sysdeps/unix/bsd/sun/sunos4/Makefile
@@ -1,7 +1,7 @@
-ifeq ($(subdir), posix)
+ifeq ($(subdir),posix)
sysdep_routines := $(sysdep_routines) sys_wait4
endif
-ifeq ($(subdir), misc)
+ifeq ($(subdir),misc)
sysdep_routines := $(sysdep_routines) sys_mmap
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index cdb11e9..f3c4cb9 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,7 +4,7 @@ ioperm.c
init-first.h
clone.S
sys/io.h
-kernel_sigaction.h
kernel_termios.h
sys/acct.h
+sys/kernel_sigaction.h
sys/procfs.h
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 3908b57..fa2c078 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,4 +1,4 @@
-ifeq ($(subdir), misc)
+ifeq ($(subdir),misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
diff --git a/sysdeps/unix/sysv/linux/alpha/ioctls.h b/sysdeps/unix/sysv/linux/alpha/ioctls.h
new file mode 100644
index 0000000..80b2e62
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ioctls.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _IOCTLS_H
+#define _IOCTLS_H 1
+
+/* Use the definitions from the kernel header files. */
+#include <asm/ioctls.h>
+#include <sys/kernel_termios.h>
+
+/* Oh well, this is necessary since the kernel data structure is
+ different from the user-level version. */
+#undef TCGETS
+#undef TCSETS
+#undef TCSETSW
+#undef TCSETSF
+#define TCGETS _IOR ('t', 19, struct __kernel_termios)
+#define TCSETS _IOW ('t', 20, struct __kernel_termios)
+#define TCSETSW _IOW ('t', 21, struct __kernel_termios)
+#define TCSETSF _IOW ('t', 22, struct __kernel_termios)
+
+#include <linux/sockios.h>
+
+#endif /* ioctls.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 924fc47..488265a 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -1,36 +1,36 @@
-/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by David Mosberger.
+/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* I/O access is restricted to ISA port space (ports 0..65535).
-Modern devices hopefully are sane enough not to put any performance
-critical registers in i/o space.
+ Modern devices hopefully are sane enough not to put any performance
+ critical registers in i/o space.
-On the first call to ioperm() or _sethae(), the entire (E)ISA port
-space is mapped into the virtual address space at address io.base.
-mprotect() calls are then used to enable/disable access to ports. Per
-page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a
-Low Cost Alpha based system using 8KB pages).
+ On the first call to ioperm() or _sethae(), the entire (E)ISA port
+ space is mapped into the virtual address space at address io.base.
+ mprotect() calls are then used to enable/disable access to ports. Per
+ page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a
+ Low Cost Alpha based system using 8KB pages).
-Keep in mind that this code should be able to run in a 32bit address
-space. It is therefore unreasonable to expect mmap'ing the entire
-sparse address space would work (e.g., the Low Cost Alpha chip has an
-I/O address space that's 512MB large!). */
+ Keep in mind that this code should be able to run in a 32bit address
+ space. It is therefore unreasonable to expect mmap'ing the entire
+ sparse address space would work (e.g., the Low Cost Alpha chip has an
+ I/O address space that's 512MB large!). */
#include <errno.h>
#include <fcntl.h>
@@ -66,27 +66,30 @@ I/O address space that's 512MB large!). */
#define CIA_SPARSE_MEM (0xfffffc8000000000UL)
#define CIA_DENSE_MEM (0xfffffc8600000000UL)
+#define T2_IO_BASE (0xfffffc03a0000000UL)
+#define T2_SPARSE_BASE (0xfffffc0200000000UL)
+#define T2_DENSE_BASE (0xfffffc03c0000000UL)
-enum {
- IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_CIA = 2
+typedef enum {
+ IOSYS_UNKNOWN, IOSYS_JENSEN, IOSYS_APECS, IOSYS_CIA, IOSYS_T2
} iosys_t;
struct ioswtch {
- void (*sethae)(unsigned long addr);
- void (*outb)(unsigned char b, unsigned long port);
- void (*outw)(unsigned short b, unsigned long port);
- void (*outl)(unsigned int b, unsigned long port);
- unsigned int (*inb)(unsigned long port);
- unsigned int (*inw)(unsigned long port);
- unsigned int (*inl)(unsigned long port);
+ void (*sethae)(unsigned long int addr);
+ void (*outb)(unsigned char b, unsigned long int port);
+ void (*outw)(unsigned short b, unsigned long int port);
+ void (*outl)(unsigned int b, unsigned long int port);
+ unsigned int (*inb)(unsigned long int port);
+ unsigned int (*inw)(unsigned long int port);
+ unsigned int (*inl)(unsigned long int port);
};
static struct platform {
- const char *name;
- int io_sys;
- int hae_shift;
- unsigned long bus_memory_base;
- unsigned long sparse_bus_memory_base;
+ const char *name;
+ int io_sys;
+ iosys_t hae_shift;
+ unsigned long int bus_memory_base;
+ unsigned long int sparse_bus_memory_base;
} platform[] = {
{"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
{"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
@@ -99,27 +102,29 @@ static struct platform {
{"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Sable", IOSYS_T2, 5, T2_DENSE_MEM, T2_SPARSE_MEM},
};
static struct {
struct hae {
- unsigned long cache;
- unsigned long * reg;
+ unsigned long int cache;
+ unsigned long int * reg;
} hae;
- unsigned long base;
+ unsigned long int base;
struct ioswtch * swp;
- int sys;
+ unsigned long int bus_memory_base;
+ unsigned long int sparse_bus_memory_base;
+ unsigned long int io_base;
+ iosys_t sys;
int hae_shift;
- unsigned long bus_memory_base;
- unsigned long sparse_bus_memory_base;
} io;
-extern void __sethae (unsigned long); /* we can't use asm/io.h */
+extern void __sethae (unsigned long int); /* we can't use asm/io.h */
-static inline unsigned long
-port_to_cpu_addr (unsigned long port, int iosys, int size)
+static inline unsigned long int
+port_to_cpu_addr (unsigned long int port, iosys_t iosys, int size)
{
if (iosys == IOSYS_JENSEN)
return (port << 7) + ((size - 1) << 5) + io.base;
@@ -129,7 +134,7 @@ port_to_cpu_addr (unsigned long port, int iosys, int size)
static inline void
-inline_sethae (unsigned long addr, int iosys)
+inline_sethae (unsigned long int addr, iosys_t iosys)
{
if (iosys == IOSYS_JENSEN)
{
@@ -143,7 +148,7 @@ inline_sethae (unsigned long addr, int iosys)
}
else
{
- unsigned long msb;
+ unsigned long int msb;
/* no need to set hae if msb is 0: */
msb = addr & 0xf8000000;
@@ -157,10 +162,10 @@ inline_sethae (unsigned long addr, int iosys)
static inline void
-inline_outb (unsigned char b, unsigned long port, int iosys)
+inline_outb (unsigned char b, unsigned long int port, iosys_t iosys)
{
unsigned int w;
- unsigned long addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 1);
inline_sethae (0, iosys);
asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
@@ -170,10 +175,10 @@ inline_outb (unsigned char b, unsigned long port, int iosys)
static inline void
-inline_outw (unsigned short b, unsigned long port, int iosys)
+inline_outw (unsigned short int b, unsigned long int port, iosys_t iosys)
{
unsigned int w;
- unsigned long addr = port_to_cpu_addr (port, iosys, 2);
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 2);
inline_sethae (0, iosys);
asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
@@ -183,9 +188,9 @@ inline_outw (unsigned short b, unsigned long port, int iosys)
static inline void
-inline_outl (unsigned int b, unsigned long port, int iosys)
+inline_outl (unsigned int b, unsigned long int port, iosys_t iosys)
{
- unsigned long addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
if (port >= MAX_PORT)
return;
@@ -197,9 +202,9 @@ inline_outl (unsigned int b, unsigned long port, int iosys)
static inline unsigned int
-inline_inb (unsigned long port, int iosys)
+inline_inb (unsigned long int port, iosys_t iosys)
{
- unsigned long result, addr = port_to_cpu_addr (port, iosys, 1);
+ unsigned long int result, addr = port_to_cpu_addr (port, iosys, 1);
inline_sethae (0, iosys);
result = *(vuip) addr;
@@ -209,9 +214,9 @@ inline_inb (unsigned long port, int iosys)
static inline unsigned int
-inline_inw (unsigned long port, int iosys)
+inline_inw (unsigned long int port, iosys_t iosys)
{
- unsigned long result, addr = port_to_cpu_addr (port, iosys, 2);
+ unsigned long int result, addr = port_to_cpu_addr (port, iosys, 2);
inline_sethae (0, iosys);
result = *(vuip) addr;
@@ -221,9 +226,9 @@ inline_inw (unsigned long port, int iosys)
static inline unsigned int
-inline_inl (unsigned long port, int iosys)
+inline_inl (unsigned long int port, iosys_t iosys)
{
- unsigned long addr = port_to_cpu_addr (port, iosys, 4);
+ unsigned long int addr = port_to_cpu_addr (port, iosys, 4);
inline_sethae (0, iosys);
return *(vuip) addr;
@@ -232,14 +237,14 @@ inline_inl (unsigned long port, int iosys)
#define DCL_SETHAE(name, iosys) \
static void \
-name##_sethae (unsigned long addr) \
+name##_sethae (unsigned long int addr) \
{ \
inline_sethae (addr, IOSYS_##iosys); \
}
#define DCL_OUT(name, func, type, iosys) \
static void \
-name##_##func (unsigned type b, unsigned long addr) \
+name##_##func (unsigned type b, unsigned long int addr) \
{ \
inline_##func (b, addr, IOSYS_##iosys); \
}
@@ -247,7 +252,7 @@ name##_##func (unsigned type b, unsigned long addr) \
#define DCL_IN(name, func, iosys) \
static unsigned int \
-name##_##func (unsigned long addr) \
+name##_##func (unsigned long int addr) \
{ \
return inline_##func (addr, IOSYS_##iosys); \
}
@@ -255,7 +260,7 @@ name##_##func (unsigned long addr) \
DCL_SETHAE(jensen, JENSEN)
DCL_OUT(jensen, outb, char, JENSEN)
-DCL_OUT(jensen, outw, short, JENSEN)
+DCL_OUT(jensen, outw, short int, JENSEN)
DCL_OUT(jensen, outl, int, JENSEN)
DCL_IN(jensen, inb, JENSEN)
DCL_IN(jensen, inw, JENSEN)
@@ -266,7 +271,7 @@ DCL_IN(jensen, inl, JENSEN)
DCL_SETHAE(apecs, APECS)
DCL_OUT(apecs, outb, char, APECS)
-DCL_OUT(apecs, outw, short, APECS)
+DCL_OUT(apecs, outw, short int, APECS)
DCL_OUT(apecs, outl, int, APECS)
DCL_IN(apecs, inb, APECS)
DCL_IN(apecs, inw, APECS)
@@ -291,6 +296,10 @@ struct ioswtch ioswtch[] = {
* with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE,
* if that fails, we lookup the "system type" field in /proc/cpuinfo.
* If that fails as well, we give up.
+ *
+ * If the value received from PATH_ALPHA_SYSTYPE begins with a number,
+ * assume this is a previously unsupported system and the values encode,
+ * in order, "<io_base>,<hae_shift>,<dense_base>,<sparse_base>".
*/
static int
init_iosys (void)
@@ -298,10 +307,21 @@ init_iosys (void)
char systype[256];
int i, n;
- n = readlink(PATH_ALPHA_SYSTYPE, systype, sizeof(systype) - 1);
+ n = readlink (PATH_ALPHA_SYSTYPE, systype, sizeof (systype) - 1);
if (n > 0)
{
systype[n] = '\0';
+ if (isdigit (systype[0]))
+ {
+ if (sscanf (systype, "%li,%i,%li,%li", &io.io_base, &io.hae_shift,
+ &io.bus_memory_base, &io.sparse_bus_memory_base) == 4)
+ {
+ io.sys = IOSYS_UNKNOWN;
+ io.swp = &ioswtch[1];
+ return 0;
+ }
+ /* else we're likely going to fail with the system match below */
+ }
}
else
{
@@ -318,14 +338,14 @@ init_iosys (void)
else
fgets (systype, 256, fp);
}
- fclose(fp);
+ fclose (fp);
if (n == EOF)
{
/* this can happen if the format of /proc/cpuinfo changes... */
- fprintf(stderr,
- "ioperm.init_iosys(): Unable to determine system type.\n"
- "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
+ fprintf (stderr,
+ "ioperm.init_iosys(): Unable to determine system type.\n"
+ "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
__set_errno (ENODEV);
return -1;
}
@@ -355,9 +375,9 @@ init_iosys (void)
int
-_ioperm (unsigned long from, unsigned long num, int turn_on)
+_ioperm (unsigned long int from, unsigned long int num, int turn_on)
{
- unsigned long addr, len;
+ unsigned long int addr, len;
int prot;
if (!io.swp && init_iosys () < 0)
@@ -374,7 +394,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
{
if (!io.base)
{
- unsigned long base;
+ unsigned long int base;
int fd;
io.hae.reg = 0; /* not used in user-level */
@@ -387,6 +407,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
switch (io.sys)
{
+ case IOSYS_UNKNOWN: base = io.io_base; break;
case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
case IOSYS_APECS: base = APECS_IO_BASE; break;
case IOSYS_CIA: base = CIA_IO_BASE; break;
@@ -398,7 +419,8 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
addr &= PAGE_MASK;
len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
io.base =
- (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base);
+ (unsigned long int) __mmap (0, len, PROT_NONE, MAP_SHARED,
+ fd, base);
close (fd);
if ((long) io.base == -1)
return -1;
@@ -437,7 +459,7 @@ _iopl (unsigned int level)
void
-_sethae (unsigned long addr)
+_sethae (unsigned long int addr)
{
if (!io.swp && init_iosys () < 0)
return;
@@ -447,7 +469,7 @@ _sethae (unsigned long addr)
void
-_outb (unsigned char b, unsigned long port)
+_outb (unsigned char b, unsigned long int port)
{
if (port >= MAX_PORT)
return;
@@ -457,7 +479,7 @@ _outb (unsigned char b, unsigned long port)
void
-_outw (unsigned short b, unsigned long port)
+_outw (unsigned short b, unsigned long int port)
{
if (port >= MAX_PORT)
return;
@@ -467,7 +489,7 @@ _outw (unsigned short b, unsigned long port)
void
-_outl (unsigned int b, unsigned long port)
+_outl (unsigned int b, unsigned long int port)
{
if (port >= MAX_PORT)
return;
@@ -477,27 +499,27 @@ _outl (unsigned int b, unsigned long port)
unsigned int
-_inb (unsigned long port)
+_inb (unsigned long int port)
{
return io.swp->inb (port);
}
unsigned int
-_inw (unsigned long port)
+_inw (unsigned long int port)
{
return io.swp->inw (port);
}
unsigned int
-_inl (unsigned long port)
+_inl (unsigned long int port)
{
return io.swp->inl (port);
}
-unsigned long
+unsigned long int
_bus_base(void)
{
if (!io.swp && init_iosys () < 0)
@@ -505,7 +527,7 @@ _bus_base(void)
return io.bus_memory_base;
}
-unsigned long
+unsigned long int
_bus_base_sparse(void)
{
if (!io.swp && init_iosys () < 0)
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
similarity index 81%
rename from sysdeps/unix/sysv/linux/alpha/kernel_termios.h
rename to sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
index cb030e4..eebe976 100644
--- a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/kernel_termios.h
@@ -1,14 +1,14 @@
/* The following corresponds to the values from the Linux 2.1.20 kernel. */
-#define KERNEL_NCCS 19
+#define __KERNEL_NCCS 19
-struct kernel_termios
+struct __kernel_termios
{
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
- cc_t c_cc[KERNEL_NCCS]; /* control characters */
+ cc_t c_cc[__KERNEL_NCCS]; /* control characters */
cc_t c_line; /* line discipline */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
index 03af029..7bd6e69 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -94,7 +94,7 @@ struct elf_prpsinfo
unsigned long int pr_flag; /* Flags. */
unsigned int pr_uid;
unsigned int pr_gid;
- unsigned int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ int pr_pid, pr_ppid, pr_pgrp, pr_sid;
/* Lots missing */
char pr_fname[16]; /* Filename of executable. */
char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index cf5f439..7140706 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -17,7 +17,6 @@ semctl - semctl 4 __semctl semctl
osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
-getdents - getdents 3 __getdirentries getdirentries
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a82d002aa4453ec0e42fc0fd61a9c93e3556659
commit 9a82d002aa4453ec0e42fc0fd61a9c93e3556659
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 22 05:25:54 1997 +0000
update from main archive 970121
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 368b490..cdb11e9 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,6 +4,7 @@ ioperm.c
init-first.h
clone.S
sys/io.h
+kernel_sigaction.h
kernel_termios.h
sys/acct.h
sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a155da841db96f375edbbc2afd277d29eb06e26
commit 7a155da841db96f375edbbc2afd277d29eb06e26
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 21 06:10:09 1997 +0000
update from main archive 970120
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index a15f181..368b490 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -6,3 +6,4 @@ clone.S
sys/io.h
kernel_termios.h
sys/acct.h
+sys/procfs.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5ce64efa4eac7b1cb62d22f6b8cf666a10378d8
commit b5ce64efa4eac7b1cb62d22f6b8cf666a10378d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 20 02:49:42 1997 +0000
update from main arhive 970119
diff --git a/bare/Makefile b/bare/Makefile
index 5735153..0407c23 100644
--- a/bare/Makefile
+++ b/bare/Makefile
@@ -1,23 +1,22 @@
-# Copyright (C) 1994 Free Software Foundation, Inc.
-# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
-# On-Line Applications Research Corporation.
-#
+# Copyright (C) 1994, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
+# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+# On-Line Applications Research Corporation.
+#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
-#
+#
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
-#
+#
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
subdir := bare
@@ -33,11 +32,11 @@ include ../Rules
#
# For bare targets, the $(config-vendor) is the name of the board.
# We will place the board dependent code ONLY in a library which
-# is board dependent. This way many target boards can share a
+# is board dependent. This way many target boards can share a
# single libc.a. To resolve all symbols and successfully link
# a program, the application must link against libc.a and libMY_TARGET.a.
-# For example, the target specific library for the Motorola MVME135
-# board will be named libmvme135.a. To link a program for the
+# For example, the target specific library for the Motorola MVME135
+# board will be named libmvme135.a. To link a program for the
# MVME135, one must link against -lc and -lmvme135.
#
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 6d4fbbb..841dc98 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
# Contributed by Brendan Kehoe (brendan@zen.org).
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +13,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),gmon)
sysdep_routines += _mcount
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h
index 3d7a392..89bf65c 100644
--- a/sysdeps/m68k/fpu/switch/68881-sw.h
+++ b/sysdeps/m68k/fpu/switch/68881-sw.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _68881_SWITCH_H
@@ -47,7 +47,7 @@ struct switch_caller
/* Function to determine whether or not a 68881 is available,
and modify its caller (which must be a `struct switch_caller', above,
in data space) to use the appropriate version. */
-extern void EXFUN(__68881_switch, (int __dummy));
+extern void __68881_switch __P ((int __dummy));
/* Define FUNCTION as a `struct switch_caller' which will call
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
index fd8d7c1..67218e7 100644
--- a/sysdeps/m68k/fpu/switch/Makefile
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),math)
@@ -38,8 +38,7 @@ sysdep_routines := $(sysdep_routines) switch
# 68881 and soft versions.
$(addprefix $(objpfx), \
$(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))):
- (echo '#include <ansidecl.h>' ;\
- echo '#include <68881-sw.h>' ;\
+ (echo '#include <68881-sw.h>' ;\
echo '#define $* __$*_68881' ;\
echo '#include <$(+68881-dir)/$@>' ;\
echo '#undef $*' ;\
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c
index 057bd15..44e2b4d 100644
--- a/sysdeps/m68k/fpu/switch/switch.c
+++ b/sysdeps/m68k/fpu/switch/switch.c
@@ -1,22 +1,21 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
#include <signal.h>
#include <68881-sw.h>
@@ -33,7 +32,8 @@ static int have_fpu = -1;
/* Signal handler for the trap that happens if we don't have a 68881. */
static void
-DEFUN(trap, (sig), int sig)
+trap (sig)
+ int sig;
{
have_fpu = 0;
}
@@ -44,10 +44,11 @@ DEFUN(trap, (sig), int sig)
to be a static jump to either the 68881 version or the soft version.
It then returns into the function it has chosen to do the work. */
void
-DEFUN(__68881_switch, (dummy), int dummy)
+__68881_switch (dummy)
+ int dummy;
{
- PTR *return_address_location = &((PTR *) &dummy)[-1];
- struct switch_caller *CONST caller
+ void **return_address_location = &((void **) &dummy)[-1];
+ struct switch_caller *const caller
= (struct switch_caller *) (((short int *) *return_address_location) - 1);
if (have_fpu < 0)
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
index 8483724..6381fdc 100644
--- a/sysdeps/standalone/i386/force_cpu386/Makefile
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
@@ -13,9 +14,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq (bare,$(subdir))
install-others += $(libdir)/force_cpu386.ld
diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile
index e6e65ea..aab52dc 100644
--- a/sysdeps/standalone/i960/nindy960/Makefile
+++ b/sysdeps/standalone/i960/nindy960/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
@@ -13,11 +14,11 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
# The nindy960 support has only been tested on the following boards:
-#
+#
# + Cyclone CVME961 VMEbus single board computer.
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
index 33f049c..11c0620 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/Makefile
+++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
@@ -1,4 +1,5 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
@@ -13,9 +14,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq (bare,$(subdir))
install-lib += mvme136.ld
diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile
index a7f3ea8..b24278a 100644
--- a/sysdeps/unix/sysv/irix4/Makefile
+++ b/sysdeps/unix/sysv/irix4/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),signal)
sysdep_routines := $(sysdep_routines) sigtramp __handler
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 03ecddc..261bd81 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1996.
@@ -24,15 +24,11 @@
#define _ERRNO_H 1
#include <errnos.h>
-/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
.text
ENTRY(__clone)
- lda sp,-16(sp)
- .frame sp,16,$26,0
- /* Save rest of argument registers for varargs-type work. */
- stq a4,0(sp)
- stq a5,8(sp)
+ .frame sp,0,ra,0
#ifdef PROF
.set noat
lda AT, _mcount
@@ -42,24 +38,13 @@ ENTRY(__clone)
.prologue 1
/* Sanity check arguments. */
- sextl a3,a3
ldiq v0,EINVAL
beq a0,$error /* no NULL function pointers */
beq a1,$error /* no NULL stack pointers */
- blt a3,$error /* no negative argument counts */
-
- /* Allocate space on the new stack and copy args over */
- mov a3,t0 /* save nargs for thread_start */
- s8addq a3,sp,t1
-1: ldq t2,-8(t1)
- subq t1,8,t1
- stq t2,-8(a1)
- subq a3,1,a3
- subq a1,8,a1
- bne a3,1b
/* Do the system call */
mov a0,pv /* get fn ptr out of the way */
+ mov a3,a4 /* get fn arg out of the way */
mov a2,a0
ldiq v0,__NR_clone
call_pal PAL_callsys
@@ -68,23 +53,19 @@ ENTRY(__clone)
beq v0,thread_start
/* Successful return from the parent */
- lda sp,16(sp)
ret
/* Something bad happened -- no child created */
$error:
br gp,1f
1: ldgp gp,0(gp)
- lda sp,16(sp)
jmp zero,__syscall_error
END(__clone)
/* Load up the arguments to the function. Put this block of code in
its own function so that we can terminate the stack trace with our
- debug info.
-
- At this point we have $t0=nargs, $pv=fn, $sp=&arg[0]. */
+ debug info. */
.ent thread_start
thread_start:
@@ -92,28 +73,8 @@ thread_start:
mov zero,fp
.prologue 0
- /* Calculate address of jump into argument loading code */
- cmple t0,6,t2 /* no more than 6 args in registers */
- cmoveq t2,6,t0
- br v0,1f /* find address of arg0 */
-1: lda v0,$arg0-1b(v0)
- s4addq t0,zero,t1
- subq v0,t1,v0
- jmp (v0)
-
- /* Load the integer register arguments */
- ldq a5,40(sp)
- ldq a4,32(sp)
- ldq a3,24(sp)
- ldq a2,16(sp)
- ldq a1,8(sp)
- ldq a0,0(sp)
-$arg0:
-
- /* Adjust stack to remove the arguments we just loaded */
- s8addq t0,sp,sp
-
/* Call the user's function */
+ mov a4,a0
jsr ra,(pv)
ldgp gp,0(ra)
@@ -121,6 +82,9 @@ $arg0:
mov v0,a0
jsr ra,_exit
+ /* Die horribly. */
+ halt
+
.end thread_start
weak_alias(__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h
deleted file mode 100644
index c51310f..0000000
--- a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Structure types for pre-termios terminal ioctls. Linux version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _IOCTL_TYPES_H
-#define _IOCTL_TYPES_H 1
-
-/* Get definition of constants for use with `ioctl'. */
-#include <asm/ioctl.h>
-
-
-#define FIOCLEX _IO('f', 1)
-#define FIONCLEX _IO('f', 2)
-#define FIOASYNC _IOW('f', 125, int)
-#define FIONBIO _IOW('f', 126, int)
-#define FIONREAD _IOR('f', 127, int)
-#define TIOCINQ FIONREAD
-
-#define TIOCGETP _IOR('t', 8, struct sgttyb)
-#define TIOCSETP _IOW('t', 9, struct sgttyb)
-#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
-
-#define TIOCSETC _IOW('t', 17, struct tchars)
-#define TIOCGETC _IOR('t', 18, struct tchars)
-#define TCGETS _IOR('t', 19, struct termios)
-#define TCSETS _IOW('t', 20, struct termios)
-#define TCSETSW _IOW('t', 21, struct termios)
-#define TCSETSF _IOW('t', 22, struct termios)
-
-#define TCGETA _IOR('t', 23, struct termio)
-#define TCSETA _IOW('t', 24, struct termio)
-#define TCSETAW _IOW('t', 25, struct termio)
-#define TCSETAF _IOW('t', 28, struct termio)
-
-#define TCSBRK _IO('t', 29)
-#define TCXONC _IO('t', 30)
-#define TCFLSH _IO('t', 31)
-
-#define TIOCSWINSZ _IOW('t', 103, struct winsize)
-#define TIOCGWINSZ _IOR('t', 104, struct winsize)
-#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
-#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
-#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
-
-#define TIOCGLTC _IOR('t', 116, struct ltchars)
-#define TIOCSLTC _IOW('t', 117, struct ltchars)
-#define TIOCSPGRP _IOW('t', 118, int)
-#define TIOCGPGRP _IOR('t', 119, int)
-
-#define TIOCEXCL 0x540C
-#define TIOCNXCL 0x540D
-#define TIOCSCTTY 0x540E
-
-#define TIOCSTI 0x5412
-#define TIOCMGET 0x5415
-#define TIOCMBIS 0x5416
-#define TIOCMBIC 0x5417
-#define TIOCMSET 0x5418
-# define TIOCM_LE 0x001
-# define TIOCM_DTR 0x002
-# define TIOCM_RTS 0x004
-# define TIOCM_ST 0x008
-# define TIOCM_SR 0x010
-# define TIOCM_CTS 0x020
-# define TIOCM_CAR 0x040
-# define TIOCM_RNG 0x080
-# define TIOCM_DSR 0x100
-# define TIOCM_CD TIOCM_CAR
-# define TIOCM_RI TIOCM_RNG
-
-#define TIOCGSOFTCAR 0x5419
-#define TIOCSSOFTCAR 0x541A
-#define TIOCLINUX 0x541C
-#define TIOCCONS 0x541D
-#define TIOCGSERIAL 0x541E
-#define TIOCSSERIAL 0x541F
-#define TIOCPKT 0x5420
-# define TIOCPKT_DATA 0
-# define TIOCPKT_FLUSHREAD 1
-# define TIOCPKT_FLUSHWRITE 2
-# define TIOCPKT_STOP 4
-# define TIOCPKT_START 8
-# define TIOCPKT_NOSTOP 16
-# define TIOCPKT_DOSTOP 32
-
-
-#define TIOCNOTTY 0x5422
-#define TIOCSETD 0x5423
-#define TIOCGETD 0x5424
-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
-#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
-
-#define TIOCSERCONFIG 0x5453
-#define TIOCSERGWILD 0x5454
-#define TIOCSERSWILD 0x5455
-#define TIOCGLCKTRMIOS 0x5456
-#define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
-#define TIOCSERGETLSR 0x5459 /* Get line status register */
- /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
-# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
-
-#endif /* ioctl-types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
index a1d5636..7fb58f1 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
@@ -1,48 +1,59 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@azstarnet.com).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <signal.h>
+/* When there is kernel support for more than 64 signals, we'll have to
+ switch to a new system call convention here. */
+
extern unsigned long __osf_sigprocmask (int how, unsigned long newmask);
int
__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
{
- sigset_t setval;
+ unsigned long int setval;
long result;
- if (set) {
- setval = *set;
- } else {
- sigemptyset(&setval);
- how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
- }
- result = __osf_sigprocmask(how, setval);
- if (result == -1) {
- /* if there are ever more than 63 signals, we need to recode this
+ if (set)
+ {
+ setval = set->__val[0];
+ }
+ else
+ {
+ setval = 0;
+ how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
+ }
+ result = __osf_sigprocmask (how, setval);
+ if (result == -1)
+ /* If there are ever more than 63 signals, we need to recode this
in assembler since we wouldn't be able to distinguish a mask of
all 1s from -1, but for now, we're doing just fine... */
return result;
- }
- if (oset) {
- *oset = result;
- }
+
+ if (oset)
+ {
+ oset->__val[0] = result;
+ result = _SIGSET_NWORDS;
+ while (--result > 0)
+ oset->__val[result] = 0;
+ }
return 0;
}
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index f476ed5..3036b2f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA. */
/* sigsuspend is a special syscall since it needs to dereference the
- sigset. */
+ sigset. This will have to change when we have more than 64 signals. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 49cc697..cf5f439 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -26,6 +26,8 @@ llseek EXTRA lseek 3 llseek
# these are actually common with the x86:
fstatfs - fstatfs 2 __fstatfs fstatfs
statfs - statfs 2 __statfs statfs
+sys_ustat ustat ustat 2 __syscall_ustat
+sys_mknod xmknod mknod 3 __syscall_mknod
# override select.S in parent directory:
select - select 5 __select select
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
index 6cb729f..bcd3ff5 100644
--- a/sysdeps/unix/sysv/linux/alpha/termbits.h
+++ b/sysdeps/unix/sysv/linux/alpha/termbits.h
@@ -29,7 +29,7 @@ struct termios
tcflag_t c_cflag; /* control mode flags */
tcflag_t c_lflag; /* local mode flags */
cc_t c_cc[NCCS]; /* control characters */
- cc_t c_line; /* line discipline (== c_cc[19]) */
+ cc_t c_line; /* line discipline (== c_cc[33]) */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* output speed */
};
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
index f4cdd71..25de60c 100644
--- a/sysdeps/unix/sysv/linux/alpha/xmknod.c
+++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
extern int __syscall_mknod (const char *, unsigned int, unsigned int);
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 4465dd8..ef9716d 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* clone is even more special than fork as it mucks with stacks
and invokes a function in the right context after its all over. */
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H 1
#include <errnos.h>
-/* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */
+/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
.text
ENTRY (__clone)
@@ -36,18 +36,9 @@ ENTRY (__clone)
movel 8(%sp), %a1 /* no NULL stack pointers */
tstl %a1
jeq syscall_error
- movel 16(%sp), %d1 /* no negative argument counts */
- jmi syscall_error
- /* Allocate space on the new stack and copy args over */
- movel %d1, %d0
- negl %d0
- lea (%a1,%d0.l*4), %a1
- jeq 2f
-1: movel 16(%sp,%d1.l*4), -4(%a1,%d1.l*4)
- subql #1, %d1
- jne 1b
-2:
+ /* Allocate space and copy the argument onto the new stack. */
+ movel 16(%sp), -(%a1)
/* Do the system call */
exg %d2, %a1 /* save %d2 and get stack pointer */
diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile
index 1be24e8..ff3a6fb 100644
--- a/sysdeps/unix/sysv/sco3.2/Makefile
+++ b/sysdeps/unix/sysv/sco3.2/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,12 +12,12 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),misc)
-
+
sysdep_routines := $(sysdep_routines) __fltused
endif
diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile
index 320e99b..7507fbf 100644
--- a/sysdeps/unix/sysv/sysv4/Makefile
+++ b/sysdeps/unix/sysv/sysv4/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),posix)
diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile
index a6149a9..b27d65d 100644
--- a/sysdeps/vax/Makefile
+++ b/sysdeps/vax/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1994, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
ifeq ($(subdir),math)
ifndef math-twiddled
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=df5a92fd38d7ee34021a9bbb911f6751ccfc8079
commit df5a92fd38d7ee34021a9bbb911f6751ccfc8079
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Jan 19 04:54:14 1997 +0000
update from main archive 970118
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
new file mode 100644
index 0000000..900bff4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_sigaction.h
@@ -0,0 +1,7 @@
+/* This is the sigaction struction from the Linux 2.1.20 kernel. */
+
+struct kernel_sigaction {
+ __sighandler_t sa_handler;
+ unsigned long sa_mask;
+ unsigned int sa_flags;
+};
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h
new file mode 100644
index 0000000..57830da
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/ipc_buf.h
@@ -0,0 +1,85 @@
+/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_IPC_BUF_H
+
+#define _SYS_IPC_BUF_H 1
+#include <features.h>
+
+#include <sys/types.h>
+
+/* Mode bits for `msgget', `semget', and `shmget'. */
+#define IPC_CREAT 01000 /* Create key if key does not exist. */
+#define IPC_EXCL 02000 /* Fail if key exists. */
+#define IPC_NOWAIT 04000 /* Return error on wait. */
+
+/* Control commands for `msgctl', `semctl', and `shmctl'. */
+#define IPC_RMID 0 /* Remove identifier. */
+#define IPC_SET 1 /* Set `ipc_perm' options. */
+#define IPC_STAT 2 /* Get `ipc_perm' options. */
+#define IPC_INFO 3 /* See ipcs. */
+
+
+__BEGIN_DECLS
+
+/* Special key values. */
+#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
+
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+ {
+ __key_t __key; /* Key. */
+ unsigned int uid; /* Owner's user ID. */
+ unsigned int gid; /* Owner's group ID. */
+ unsigned int cuid; /* Creator's user ID. */
+ unsigned int cgid; /* Creator's group ID. */
+ unsigned int mode; /* Read/write permission. */
+ unsigned short int __seq; /* Sequence number. */
+ };
+
+
+/* Kludge to work around Linux' restriction of only up to five
+ arguments to a system call. */
+struct ipc_kludge
+ {
+ void *msgp;
+ long int msgtyp;
+ };
+
+/* The actual system call: all functions are multiplexed by this. */
+extern int __ipc __P ((int __call, int __first, int __second, int __third,
+ void *__ptr));
+
+/* The codes for the functions to use the multiplexer `__ipc'. */
+#define IPCOP_semop 1
+#define IPCOP_semget 2
+#define IPCOP_semctl 3
+#define IPCOP_msgsnd 11
+#define IPCOP_msgrcv 12
+#define IPCOP_msgget 13
+#define IPCOP_msgctl 14
+#define IPCOP_shmat 21
+#define IPCOP_shmdt 22
+#define IPCOP_shmget 23
+#define IPCOP_shmctl 24
+
+__END_DECLS
+
+#endif /* _SYS_IPC_BUF_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
new file mode 100644
index 0000000..03af029
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
@@ -0,0 +1,109 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_PROCFS_H
+
+#define _SYS_PROCFS_H 1
+#include <features.h>
+
+/* This is somehow modelled after the file of the same name on SysVr4
+ systems. It provides a definition of the core file format for ELF
+ used on Linux. */
+
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <asm/user.h>
+#include <asm/elf.h>
+
+__BEGIN_DECLS
+
+struct elf_siginfo
+ {
+ int si_signo; /* Signal number. */
+ int si_code; /* Extra code. */
+ int si_errno; /* Errno. */
+ };
+
+typedef elf_greg_t greg_t;
+typedef elf_gregset_t gregset_t;
+typedef elf_fpregset_t fpregset_t;
+#define NGREG ELF_NGREG
+
+/* Definitions to generate Intel SVR4-like core files. These mostly
+ have the same names as the SVR4 types with "elf_" tacked on the
+ front to prevent clashes with linux definitions, and the typedef
+ forms have been avoided. This is mostly like the SVR4 structure,
+ but more Linuxy, with things that Linux does not support and which
+ gdb doesn't really use excluded. Fields present but not used are
+ marked with "XXX". */
+struct elf_prstatus
+ {
+#if 0
+ long int pr_flags; /* XXX Process flags. */
+ short int pr_why; /* XXX Reason for process halt. */
+ short int pr_what; /* XXX More detailed reason. */
+#endif
+ struct elf_siginfo pr_info; /* Info associated with signal. */
+ short int pr_cursig; /* Current signal. */
+ unsigned long int pr_sigpend; /* Set of pending signals. */
+ unsigned long int pr_sighold; /* Set of held signals. */
+#if 0
+ struct sigaltstack pr_altstack; /* Alternate stack info. */
+ struct sigaction pr_action; /* Signal action for current sig. */
+#endif
+ __pid_t pr_pid;
+ __pid_t pr_ppid;
+ __pid_t pr_pgrp;
+ __pid_t pr_sid;
+ struct timeval pr_utime; /* User time. */
+ struct timeval pr_stime; /* System time. */
+ struct timeval pr_cutime; /* Cumulative user time. */
+ struct timeval pr_cstime; /* Cumulative system time. */
+#if 0
+ long int pr_instr; /* Current instruction. */
+#endif
+ elf_gregset_t pr_reg; /* GP registers. */
+ int pr_fpvalid; /* True if math copro being used. */
+ };
+
+
+#define ELF_PRARGSZ (80) /* Number of chars for args */
+
+struct elf_prpsinfo
+ {
+ char pr_state; /* Numeric process state. */
+ char pr_sname; /* Char for pr_state. */
+ char pr_zomb; /* Zombie. */
+ char pr_nice; /* Nice val. */
+ unsigned long int pr_flag; /* Flags. */
+ unsigned int pr_uid;
+ unsigned int pr_gid;
+ unsigned int pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ /* Lots missing */
+ char pr_fname[16]; /* Filename of executable. */
+ char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
+ };
+
+
+typedef struct elf_prstatus prstatus_t;
+typedef struct elf_prpsinfo prpsinfo_t;
+
+__END_DECLS
+
+#endif /* sys/procfs.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/getgroups.c b/sysdeps/unix/sysv/linux/m68k/getgroups.c
new file mode 100644
index 0000000..102ea24
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/getgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/getgroups.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/sysdeps/unix/sysv/linux/m68k/setgroups.c
new file mode 100644
index 0000000..0e70862
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setgroups.c
@@ -0,0 +1,2 @@
+/* We also have to rewrite the kernel gid_t to the user land type. */
+#include <sysdeps/unix/sysv/linux/i386/setgroups.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 7883d70..9a3e4d0 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -1,3 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
+s_getgroups getgroups getgroups 2 __syscall_getgroups
s_llseek llseek _llseek 5 __sys_llseek
+s_setgroups setgroups setgroups 2 __syscall_setgroups
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50d1b4888d0f44a0cb2fe13acba7195df64d5a52
commit 50d1b4888d0f44a0cb2fe13acba7195df64d5a52
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Jan 7 23:29:44 1997 +0000
update from main archive 960107
diff --git a/sysdeps/unix/sysv/linux/alpha/fcntlbits.h b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
new file mode 100644
index 0000000..e8697d9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fcntlbits.h
@@ -0,0 +1,93 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _FCNTLBITS_H
+#define _FCNTLBITS_H 1
+
+#include <sys/types.h>
+
+
+/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
+ located on an ext2 file system */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#define O_CREAT 01000 /* not fcntl */
+#define O_TRUNC 02000 /* not fcntl */
+#define O_EXCL 04000 /* not fcntl */
+#define O_NOCTTY 010000 /* not fcntl */
+
+#define O_NONBLOCK 00004
+#define O_APPEND 00010
+#define O_NDELAY O_NONBLOCK
+#define O_SYNC 040000
+#define FASYNC 020000 /* fcntl, for BSD compatibility */
+
+#define F_DUPFD 0 /* dup */
+#define F_GETFD 1 /* get f_flags */
+#define F_SETFD 2 /* set f_flags */
+#define F_GETFL 3 /* more flags (cloexec) */
+#define F_SETFL 4
+#define F_GETLK 7
+#define F_SETLK 8
+#define F_SETLKW 9
+
+#define F_SETOWN 5 /* for sockets. */
+#define F_GETOWN 6 /* for sockets. */
+
+/* for F_[GET|SET]FL */
+#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+
+/* for posix fcntl() and lockf() */
+#define F_RDLCK 1
+#define F_WRLCK 2
+#define F_UNLCK 8
+
+/* for old implementation of bsd flock () */
+#define F_EXLCK 16 /* or 3 */
+#define F_SHLCK 32 /* or 4 */
+
+/* operations for bsd flock(), also used by the kernel implementation */
+#define LOCK_SH 1 /* shared lock */
+#define LOCK_EX 2 /* exclusive lock */
+#define LOCK_NB 4 /* or'd with one of the above to prevent
+ blocking */
+#define LOCK_UN 8 /* remove lock */
+
+struct flock
+ {
+ short int l_type;
+ short int l_whence;
+ __off_t l_start;
+ __off_t l_len;
+ __pid_t l_pid;
+ };
+
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+#define FAPPEND O_APPEND
+#define FFSYNC O_FSYNC
+#define FNONBLOCK O_NONBLOCK
+#define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c
index c09b4fd..6c64d31 100644
--- a/sysdeps/unix/sysv/linux/alpha/ustat.c
+++ b/sysdeps/unix/sysv/linux/alpha/ustat.c
@@ -20,6 +20,9 @@
#include <sys/ustat.h>
#include <sys/sysmacros.h>
+
+extern int __syscall_ustat (unsigned int dev, struct ustat *ubuf);
+
int
ustat (dev_t dev, struct ustat *ubuf)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a91492b86e028dfb38fab3caff3d81f86ae245c2
commit a91492b86e028dfb38fab3caff3d81f86ae245c2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Jan 6 22:07:18 1997 +0000
update from main archive 960105
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 78c5071..1d01f03 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -14,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
@@ -43,7 +43,12 @@ elf_machine_matches_host (Elf64_Word e_machine)
static inline Elf64_Addr
elf_machine_dynamic (void)
{
+#ifdef AXP_MULTI_GOT_LD
return (Elf64_Addr) &_DYNAMIC;
+#else
+ register Elf64_Addr *gp __asm__ ("$29");
+ return gp[-4096];
+#endif
}
/* Return the run-time load address of the shared object. */
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index f825d41..da30f7b 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -1,23 +1,22 @@
-/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <errno.h>
-#include <stddef.h>
#include <termios.h>
#include <sys/ioctl.h>
diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S
index be1c6b8..8477bbd 100644
--- a/sysdeps/unix/sysv/i386/sigreturn.S
+++ b/sysdeps/unix/sysv/i386/sigreturn.S
@@ -1,20 +1,20 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index d898d04..a15f181 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,3 +4,5 @@ ioperm.c
init-first.h
clone.S
sys/io.h
+kernel_termios.h
+sys/acct.h
diff --git a/sysdeps/unix/sysv/linux/alpha/gnu/types.h b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
new file mode 100644
index 0000000..5c1e407
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/gnu/types.h
@@ -0,0 +1,89 @@
+/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _GNU_TYPES_H
+#define _GNU_TYPES_H 1
+
+#include <features.h>
+
+/* Convenience types. */
+typedef unsigned char __u_char;
+typedef unsigned short __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long __u_long;
+#ifdef __GNUC__
+typedef unsigned long long int __u_quad_t;
+typedef long long int __quad_t;
+#else
+typedef struct
+ {
+ long int __val[2];
+ } __quad_t;
+typedef struct
+ {
+ __u_long __val[2];
+ } __u_quad_t;
+#endif
+typedef __quad_t *__qaddr_t;
+
+typedef __u_long __dev_t; /* Type of device numbers. */
+typedef __u_int __uid_t; /* Type of user identifications. */
+typedef __u_int __gid_t; /* Type of group identifications. */
+typedef __u_int __ino_t; /* Type of file serial numbers. */
+typedef __u_int __mode_t; /* Type of file attribute bitmasks. */
+typedef __u_int __nlink_t; /* Type of file link counts. */
+typedef long int __off_t; /* Type of file sizes and offsets. */
+typedef __quad_t __loff_t; /* Type of file sizes and offsets. */
+typedef int __pid_t; /* Type of process identifications. */
+typedef long int __ssize_t; /* Type of a byte count, or error. */
+
+typedef struct
+ {
+ int __val[2];
+ } __fsid_t; /* Type of file system IDs. */
+
+/* Everythin' else. */
+typedef int __daddr_t; /* The type of a disk address. */
+typedef char *__caddr_t;
+typedef long int __time_t;
+typedef long int __swblk_t; /* Type of a swap block maybe? */
+
+typedef long int __clock_t;
+
+/* One element in the file descriptor mask array. */
+typedef unsigned int __fd_mask;
+
+/* Number of descriptors that can fit in an `fd_set'. */
+#define __FD_SETSIZE 1024
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NFDBITS (8 * sizeof (__fd_mask))
+#define __FDELT(d) ((d) / __NFDBITS)
+#define __FDMASK(d) (1 << ((d) % __NFDBITS))
+
+/* fd_set for select and pselect. */
+typedef struct
+ {
+ /* XPG4.2 requires this member name. */
+ __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
+ } __fd_set;
+
+
+typedef int __key_t;
+
+#endif /* gnu/types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/ioctl-types.h b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h
new file mode 100644
index 0000000..c51310f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ioctl-types.h
@@ -0,0 +1,123 @@
+/* Structure types for pre-termios terminal ioctls. Linux version.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _IOCTL_TYPES_H
+#define _IOCTL_TYPES_H 1
+
+/* Get definition of constants for use with `ioctl'. */
+#include <asm/ioctl.h>
+
+
+#define FIOCLEX _IO('f', 1)
+#define FIONCLEX _IO('f', 2)
+#define FIOASYNC _IOW('f', 125, int)
+#define FIONBIO _IOW('f', 126, int)
+#define FIONREAD _IOR('f', 127, int)
+#define TIOCINQ FIONREAD
+
+#define TIOCGETP _IOR('t', 8, struct sgttyb)
+#define TIOCSETP _IOW('t', 9, struct sgttyb)
+#define TIOCSETN _IOW('t', 10, struct sgttyb) /* TIOCSETP wo flush */
+
+#define TIOCSETC _IOW('t', 17, struct tchars)
+#define TIOCGETC _IOR('t', 18, struct tchars)
+#define TCGETS _IOR('t', 19, struct termios)
+#define TCSETS _IOW('t', 20, struct termios)
+#define TCSETSW _IOW('t', 21, struct termios)
+#define TCSETSF _IOW('t', 22, struct termios)
+
+#define TCGETA _IOR('t', 23, struct termio)
+#define TCSETA _IOW('t', 24, struct termio)
+#define TCSETAW _IOW('t', 25, struct termio)
+#define TCSETAF _IOW('t', 28, struct termio)
+
+#define TCSBRK _IO('t', 29)
+#define TCXONC _IO('t', 30)
+#define TCFLSH _IO('t', 31)
+
+#define TIOCSWINSZ _IOW('t', 103, struct winsize)
+#define TIOCGWINSZ _IOR('t', 104, struct winsize)
+#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
+#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
+#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
+
+#define TIOCGLTC _IOR('t', 116, struct ltchars)
+#define TIOCSLTC _IOW('t', 117, struct ltchars)
+#define TIOCSPGRP _IOW('t', 118, int)
+#define TIOCGPGRP _IOR('t', 119, int)
+
+#define TIOCEXCL 0x540C
+#define TIOCNXCL 0x540D
+#define TIOCSCTTY 0x540E
+
+#define TIOCSTI 0x5412
+#define TIOCMGET 0x5415
+#define TIOCMBIS 0x5416
+#define TIOCMBIC 0x5417
+#define TIOCMSET 0x5418
+# define TIOCM_LE 0x001
+# define TIOCM_DTR 0x002
+# define TIOCM_RTS 0x004
+# define TIOCM_ST 0x008
+# define TIOCM_SR 0x010
+# define TIOCM_CTS 0x020
+# define TIOCM_CAR 0x040
+# define TIOCM_RNG 0x080
+# define TIOCM_DSR 0x100
+# define TIOCM_CD TIOCM_CAR
+# define TIOCM_RI TIOCM_RNG
+
+#define TIOCGSOFTCAR 0x5419
+#define TIOCSSOFTCAR 0x541A
+#define TIOCLINUX 0x541C
+#define TIOCCONS 0x541D
+#define TIOCGSERIAL 0x541E
+#define TIOCSSERIAL 0x541F
+#define TIOCPKT 0x5420
+# define TIOCPKT_DATA 0
+# define TIOCPKT_FLUSHREAD 1
+# define TIOCPKT_FLUSHWRITE 2
+# define TIOCPKT_STOP 4
+# define TIOCPKT_START 8
+# define TIOCPKT_NOSTOP 16
+# define TIOCPKT_DOSTOP 32
+
+
+#define TIOCNOTTY 0x5422
+#define TIOCSETD 0x5423
+#define TIOCGETD 0x5424
+#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
+#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
+
+#define TIOCSERCONFIG 0x5453
+#define TIOCSERGWILD 0x5454
+#define TIOCSERSWILD 0x5455
+#define TIOCGLCKTRMIOS 0x5456
+#define TIOCSLCKTRMIOS 0x5457
+#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
+#define TIOCSERGETLSR 0x5459 /* Get line status register */
+ /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
+#define TIOCSERGETMULTI 0x545A /* Get multiport config */
+#define TIOCSERSETMULTI 0x545B /* Set multiport config */
+
+#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
+#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
+
+#endif /* ioctl-types.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/kernel_termios.h b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
new file mode 100644
index 0000000..cb030e4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/kernel_termios.h
@@ -0,0 +1,18 @@
+/* The following corresponds to the values from the Linux 2.1.20 kernel. */
+
+#define KERNEL_NCCS 19
+
+struct kernel_termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[KERNEL_NCCS]; /* control characters */
+ cc_t c_line; /* line discipline */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
+
+#define _HAVE_C_ISPEED 1
+#define _HAVE_C_OSPEED 1
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/acct.h b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
new file mode 100644
index 0000000..6dda5f4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/acct.h
@@ -0,0 +1,66 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _SYS_ACCT_H
+
+#define _SYS_ACCT_H 1
+#include <features.h>
+
+#define __need_time_t
+#include <time.h>
+
+
+__BEGIN_DECLS
+
+#define ACCT_COMM 16
+
+struct acct
+ {
+ char ac_comm[ACCT_COMM]; /* Accounting command name. */
+ time_t ac_utime; /* Accounting user time. */
+ time_t ac_stime; /* Accounting system time. */
+ time_t ac_etime; /* Accounting elapsed time. */
+ time_t ac_btime; /* Beginning time. */
+ unsigned int ac_uid; /* Accounting user ID. */
+ unsigned int ac_gid; /* Accounting group ID. */
+ unsigned int ac_tty; /* Controlling tty. */
+ /* Please note that the value of the `ac_tty' field, a device number,
+ is encoded differently in the kernel and for the libc dev_t type. */
+ char ac_flag; /* Accounting flag. */
+ long int ac_minflt; /* Accounting minor pagefaults. */
+ long int ac_majflt; /* Accounting major pagefaults. */
+ long int ac_exitcode; /* Accounting process exitcode. */
+ };
+
+enum
+ {
+ AFORK = 0001, /* Has executed fork, but no exec. */
+ ASU = 0002, /* Used super-user privileges. */
+ ACORE = 0004, /* Dumped core. */
+ AXSIG = 0010 /* Killed by a signal. */
+ };
+
+#define AHZ 100
+
+
+/* Switch process accounting on and off. */
+extern int acct __P ((__const char *__filename));
+
+__END_DECLS
+
+#endif /* sys/acct.h */
diff --git a/sysdeps/unix/sysv/linux/alpha/termbits.h b/sysdeps/unix/sysv/linux/alpha/termbits.h
new file mode 100644
index 0000000..6cb729f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/termbits.h
@@ -0,0 +1,188 @@
+/* termios type and macro definitions. Linux version.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 32
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_cc[NCCS]; /* control characters */
+ cc_t c_line; /* line discipline (== c_cc[19]) */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* output speed */
+ };
+
+/* c_cc characters */
+#define VEOF 0
+#define VEOL 1
+#define VEOL2 2
+#define VERASE 3
+#define VWERASE 4
+#define VKILL 5
+#define VREPRINT 6
+#define VSWTC 7
+#define VINTR 8
+#define VQUIT 9
+#define VSUSP 10
+#define VSTART 12
+#define VSTOP 13
+#define VLNEXT 14
+#define VDISCARD 15
+#define VMIN 16
+#define VTIME 17
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#ifdef __USE_BSD
+ /* POSIX.1 doesn't want these... */
+# define IXANY 0004000
+# define IUCLC 0010000
+# define IMAXBEL 0020000
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define ONLCR 0000002
+#define OLCUC 0000004
+
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+
+#define OFILL 00000100
+#define OFDEL 00000200
+#define NLDLY 00001400
+#define NL0 00000000
+#define NL1 00000400
+#define NL2 00001000
+#define NL3 00001400
+#define TABDLY 00006000
+#define TAB0 00000000
+#define TAB1 00002000
+#define TAB2 00004000
+#define TAB3 00006000
+#define CRDLY 00030000
+#define CR0 00000000
+#define CR1 00010000
+#define CR2 00020000
+#define CR3 00030000
+#define FFDLY 00040000
+#define FF0 00000000
+#define FF1 00040000
+#define BSDLY 00100000
+#define BS0 00000000
+#define BS1 00100000
+#define VTDLY 00200000
+#define VT0 00000000
+#define VT1 00200000
+#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
+
+/* c_cflag bit meaning */
+#define CBAUD 0000037
+#define B0 0000000 /* hang up */
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define B19200 0000016
+#define B38400 0000017
+#define EXTA B19200
+#define EXTB B38400
+#define CBAUDEX 0000000
+#define B57600 00020
+#define B115200 00021
+#define B230400 00022
+#define B460800 00023
+
+#define CSIZE 00001400
+#define CS5 00000000
+#define CS6 00000400
+#define CS7 00001000
+#define CS8 00001400
+
+#define CSTOPB 00002000
+#define CREAD 00004000
+#define PARENB 00010000
+#define PARODD 00020000
+#define HUPCL 00040000
+
+#define CLOCAL 00100000
+#define CRTSCTS 020000000000 /* flow control */
+
+/* c_lflag bits */
+#define ISIG 0x00000080
+#define ICANON 0x00000100
+#define XCASE 0x00004000
+#define ECHO 0x00000008
+#define ECHOE 0x00000002
+#define ECHOK 0x00000004
+#define ECHONL 0x00000010
+#define NOFLSH 0x80000000
+#define TOSTOP 0x00400000
+#define ECHOCTL 0x00000040
+#define ECHOPRT 0x00000020
+#define ECHOKE 0x00000001
+#define FLUSHO 0x00800000
+#define PENDIN 0x20000000
+#define IEXTEN 0x00000400
+
+/* Values for the ACTION argument to `tcflow'. */
+#define TCOOFF 0
+#define TCOON 1
+#define TCIOFF 2
+#define TCION 3
+
+/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
+#define TCIFLUSH 0
+#define TCOFLUSH 1
+#define TCIOFLUSH 2
+
+/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
+#define TCSANOW 0
+#define TCSADRAIN 1
+#define TCSAFLUSH 2
+
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
diff --git a/sysdeps/unix/sysv/linux/alpha/ustat.c b/sysdeps/unix/sysv/linux/alpha/ustat.c
new file mode 100644
index 0000000..c09b4fd
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ustat.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sys/ustat.h>
+#include <sys/sysmacros.h>
+
+int
+ustat (dev_t dev, struct ustat *ubuf)
+{
+ unsigned int k_dev;
+
+ /* We must convert the value to dev_t type used by the kernel. */
+ k_dev = ((major (dev) & 0xff) << 8) | (minor (dev) & 0xff);
+
+ return __syscall_ustat (k_dev, ubuf);
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/xmknod.c b/sysdeps/unix/sysv/linux/alpha/xmknod.c
new file mode 100644
index 0000000..f4cdd71
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/xmknod.c
@@ -0,0 +1,46 @@
+/* xmknod call using old-style Unix mknod system call.
+ Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+extern int __syscall_mknod (const char *, unsigned int, unsigned int);
+
+/* Create a device file named PATH, with permission and special bits MODE
+ and device number DEV (which can be constructed from major and minor
+ device numbers with the `makedev' macro above). */
+int
+__xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
+{
+ unsigned int k_dev;
+
+ if (vers != _MKNOD_VER)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* We must convert the value to dev_t type used by the kernel. */
+ k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
+
+ return __syscall_mknod (path, mode, k_dev);
+}
+
+weak_alias (__xmknod, _xmknod)
diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/sys/syscall.h
similarity index 100%
rename from sysdeps/unix/sysv/sco3.2.4/syscall.h
rename to sysdeps/unix/sysv/sco3.2.4/sys/syscall.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5726ef319be923e8bc851ca137cd03309f29072
commit d5726ef319be923e8bc851ca137cd03309f29072
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Jan 2 18:38:59 1997 +0000
Instruction to abort any process
diff --git a/sysdeps/m68k/abort-instr.h b/sysdeps/m68k/abort-instr.h
new file mode 100644
index 0000000..b43c9ef
--- /dev/null
+++ b/sysdeps/m68k/abort-instr.h
@@ -0,0 +1,2 @@
+/* An instruction which should crash any program is `illegal'. */
+#define ABORT_INSTRUCTION asm ("illegal")
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c85dda1da06510af3992ca7511c3b03a4f5a2ec
commit 2c85dda1da06510af3992ca7511c3b03a4f5a2ec
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Jan 1 15:27:53 1997 +0000
update from main archive 970101
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index a5e9064..dc50291 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -12,9 +12,9 @@
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
-# License along with the GNU C Library; see the file COPYING.LIB. If
-# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-# Cambridge, MA 02139, USA.
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
@@ -30,3 +30,7 @@ CFLAGS-setjmp.c := -fno-omit-frame-pointer
# The 68k `long double' is a distinct type we support.
long-double-fcts = yes
+
+ifeq ($(subdir),elf)
+CFLAGS-rtld.c += -Wno-uninitialized
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a53dd14b978f645abf689cd21f67c83c0c91560a
commit a53dd14b978f645abf689cd21f67c83c0c91560a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Dec 30 01:47:43 1996 +0000
update from main archive 961229
diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c
index ef609cc..477e896 100644
--- a/sysdeps/unix/sysv/linux/m68k/setjmp.c
+++ b/sysdeps/unix/sysv/linux/m68k/setjmp.c
@@ -76,8 +76,6 @@ __setjmp (jmp_buf env)
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
- /* Don't save the signal mask. */
- env[0].__mask_was_saved = 0;
-
+ /* The signal mask has already been dealt with. */
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e7cc1b16ba56463b8d738ecf0e201f72af9b82d8
commit e7cc1b16ba56463b8d738ecf0e201f72af9b82d8
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 21 04:13:47 1996 +0000
update from main archive 961220
diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h
index f777dc2..1ad0df8 100644
--- a/sysdeps/unix/sysv/linux/alpha/timebits.h
+++ b/sysdeps/unix/sysv/linux/alpha/timebits.h
@@ -33,9 +33,18 @@ struct timeval
#ifndef _TIMEBITS_H
-#define _TIMEBITS_H 1
-
-#include <asm/param.h>
-#define CLOCKS_PER_SEC HZ /* XXX names not kosher */
+# define _TIMEBITS_H 1
+
+/* ISO/IEC 9899:1990 7.12.1: <time.h>
+ The macro `CLOCKS_PER_SEC' is the number per second of the value
+ returned by the `clock' function. */
+/* CAE XSH, Issue 4, Version 2: <time.h>
+ The value of CLOCKS_PER_SEC is required to be 1 million on all
+ XSI-conformant systems. */
+# define CLOCKS_PER_SEC 1000000
+
+/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
+ presents the real value for clock ticks per second for the system. */
+# define CLK_TCK 1024
#endif /* timebits.h */
diff --git a/sysdeps/unix/sysv/linux/m68k/setjmp.c b/sysdeps/unix/sysv/linux/m68k/setjmp.c
new file mode 100644
index 0000000..ef609cc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/setjmp.c
@@ -0,0 +1,83 @@
+/* Copyright (C) 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <setjmp.h>
+
+/* Save the current program position in ENV and return 0. */
+int
+__sigsetjmp (jmp_buf env, int savemask)
+{
+ /* Save data registers D1 through D7. */
+ asm volatile ("movem%.l %/d1-%/d7, %0"
+ : : "m" (env[0].__jmpbuf[0].__dregs[0]));
+
+ /* Save return address in place of register A0. */
+ env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
+
+ /* Save address registers A1 through A5. */
+ asm volatile ("movem%.l %/a1-%/a5, %0"
+ : : "m" (env[0].__jmpbuf[0].__aregs[1]));
+
+ /* Save caller's FP, not our own. */
+ env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
+
+ /* Save caller's SP, not our own. */
+ env[0].__jmpbuf[0].__sp = (void *) &env;
+
+#if defined (__HAVE_68881__) || defined (__HAVE_FPU__)
+ /* Save floating-point (68881) registers FP0 through FP7. */
+ asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
+ : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+#endif
+
+ /* Save the signal mask if requested. */
+ return __sigjmp_save (env, savemask);
+}
+
+/* Binary compatibility entry point. */
+int
+__setjmp (jmp_buf env)
+{
+ /* Save data registers D1 through D7. */
+ asm volatile ("movem%.l %/d1-%/d7, %0"
+ : : "m" (env[0].__jmpbuf[0].__dregs[0]));
+
+ /* Save return address in place of register A0. */
+ env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
+
+ /* Save address registers A1 through A5. */
+ asm volatile ("movem%.l %/a1-%/a5, %0"
+ : : "m" (env[0].__jmpbuf[0].__aregs[1]));
+
+ /* Save caller's FP, not our own. */
+ env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
+
+ /* Save caller's SP, not our own. */
+ env[0].__jmpbuf[0].__sp = (void *) &env;
+
+#if defined (__HAVE_68881__) || defined (__HAVE_FPU__)
+ /* Save floating-point (68881) registers FP0 through FP7. */
+ asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
+ : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+#endif
+
+ /* Don't save the signal mask. */
+ env[0].__mask_was_saved = 0;
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=910e2e14fc7b04dab343ce2d9b43c4f275925fbb
commit 910e2e14fc7b04dab343ce2d9b43c4f275925fbb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Dec 20 01:35:29 1996 +0000
Update from main archive 961219
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 1c71ec8..78c5071 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -211,7 +211,7 @@ _dl_start_user:
stq $2, 0($sp)
/* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
0: ldq $10, _dl_default_scope+16
- /* Call _dl_init_next to return the address of an initalizer
+ /* Call _dl_init_next to return the address of an initializer
function to run. */
1: mov $10, $16
jsr $26, _dl_init_next
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
index f75673e..e6147c2 100644
--- a/sysdeps/alpha/elf/crtbegin.S
+++ b/sysdeps/alpha/elf/crtbegin.S
@@ -55,7 +55,7 @@ __DTOR_LIST__:
jsr $26,__do_global_dtors_aux
/* Must match the alignment we got from crti.o else we get
- zero-filled holes in our _fini function and thense SIGILL. */
+ zero-filled holes in our _fini function and then SIGILL. */
.align 3
/*
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index 02f37f5..d3099cc 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -17,7 +17,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Return the address of the last occurrance of a given character
+/* Return the address of the last occurrence of a given character
within a null-terminated string, or null if it is not found.
This is generally scheduled for the EV5 (got to look out for my own
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
index 77184d6..dc2da20 100644
--- a/sysdeps/m68k/lshift.S
+++ b/sysdeps/m68k/lshift.S
@@ -118,7 +118,7 @@ L(Lend:)
rts
/* We loop from least significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
L(Lspecial:)
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
index 01dde0a..f529390 100644
--- a/sysdeps/m68k/rshift.S
+++ b/sysdeps/m68k/rshift.S
@@ -71,7 +71,7 @@ L(Lnormal:)
movel MEM_POSTINC(s_ptr),R(d2)
movel R(d2),R(d0)
lsll R(d5),R(d0) /* compute carry limb */
-
+
lsrl R(cnt),R(d2)
movel R(d2),R(d1)
subql #1,R(s_size)
@@ -107,7 +107,7 @@ L(Lend:)
rts
/* We loop from most significant end of the arrays, which is only
- permissable if the source and destination don't overlap, since the
+ permissible if the source and destination don't overlap, since the
function is documented to work for overlapping source and destination. */
L(Lspecial:)
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c00afbe..9e80426 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -14,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define ELF_MACHINE_NAME "MIPS"
@@ -27,12 +27,12 @@
#include <sys/mman.h>
#include <unistd.h>
-/* DT_MIPS macro ranslate a processor specific dynamic tag to the index
+/* Translate a processor specific dynamic tag to the index
in l_info array. */
#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
#if 1
-/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignement. */
+/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignment. */
#ifndef MAP_ALIGN
#define MAP_ALIGN 0x1000
#endif
diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h
index 21012b4..ba8db2b 100644
--- a/sysdeps/standalone/i960/i960ca.h
+++ b/sysdeps/standalone/i960/i960ca.h
@@ -1,29 +1,28 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
- On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* i960ca.h
*
- * This file contains macros which are used to access i80960CA
+ * This file contains macros which are used to access i80960CA
* registers which are not addressable by C. The functions
- * in this file sould be useful to the developer of target
+ * in this file should be useful to the developer of target
* specific code.
*/
@@ -37,22 +36,22 @@ typedef unsigned int unsigned32;
/*
* Intel i80960CA Processor Control Block
*/
-
+
struct i80960ca_prcb {
- unsigned32 *fault_tbl; /* fault table base address */
+ unsigned32 *fault_tbl; /* fault table base address */
struct i80960ca_ctltbl
*control_tbl; /* control table base address */
unsigned32 initial_ac; /* AC register initial value */
- unsigned32 fault_config; /* fault configuration word */
+ unsigned32 fault_config; /* fault configuration word */
void *intr_tbl; /* interrupt table base address */
- void *sys_proc_tbl; /* system procedure table */
- /* base address */
- unsigned32 reserved; /* reserved */
- unsigned32 *intr_stack; /* interrupt stack pointer */
- unsigned32 ins_cache_cfg; /* instruction cache */
- /* configuration word */
- unsigned32 reg_cache_cfg; /* register cache */
- /* configuration word */
+ void *sys_proc_tbl; /* system procedure table */
+ /* base address */
+ unsigned32 reserved; /* reserved */
+ unsigned32 *intr_stack; /* interrupt stack pointer */
+ unsigned32 ins_cache_cfg; /* instruction cache */
+ /* configuration word */
+ unsigned32 reg_cache_cfg; /* register cache */
+ /* configuration word */
};
/*
@@ -128,7 +127,7 @@ struct i80960ca_ctltbl {
: "0" (_addr), "1" (_mask) ); \
(prev) = _mask; \
}
-
+
#define delay( microseconds ) \
{ register unsigned32 _delay=(microseconds); \
register unsigned32 _tmp; \
@@ -185,22 +184,22 @@ struct i80960ca_ctltbl {
: "0" (_cmd), "1" (_next), "2" (_prcb) ); \
}
-static inline unsigned32 pend_intrs()
-{ register unsigned32 _intr=0;
- asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
- return ( _intr );
+static inline unsigned32 pend_intrs()
+{ register unsigned32 _intr=0;
+ asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
+ return ( _intr );
}
-static inline unsigned32 mask_intrs()
+static inline unsigned32 mask_intrs()
{ register unsigned32 _intr=0;
- asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
+ asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
return( _intr );
}
-static inline unsigned32 get_fp()
-{ register unsigned32 _fp=0;
- asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
- return ( _fp );
+static inline unsigned32 get_fp()
+{ register unsigned32 _fp=0;
+ asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
+ return ( _fp );
}
#endif
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c
index 159070b..cafb1ab 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/console.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c
@@ -1,34 +1,32 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
- On-Line Applications Research Corporation.
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
+ On-Line Applications Research Corporation.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
#include <standalone.h>
#include "m68020.h"
/* Console IO routines for a Motorola MVME135/MVME136 board.
-
+
They currently use the B port. It should be possible to
use the A port by filling in the reset of the chip structure,
adding an ifdef for PORTA/PORTB, and switching the addresses,
-and maybe the macroes based on the macro. */
+and maybe the macros based on the macro. */
/* M68681 DUART chip register structures and constants */
@@ -69,14 +67,15 @@ XON/XOFF flow control. */
#define XOFF 0x13 /* control-S */
int
-DEFUN( _Console_Putc, (ch), char ch )
+_Console_Putc (ch)
+ char ch;
{
while ( ! (RD_M68681->srb & TXRDYB) ) ;
while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */
- if ( RD_M68681->rbb == XOFF )
+ if ( RD_M68681->rbb == XOFF )
do {
while ( ! (RD_M68681->srb & RXRDYB) ) ;
- } while ( RD_M68681->rbb != XON );
+ } while ( RD_M68681->rbb != XON );
WR_M68681->tbb = ch;
return( 0 );
@@ -87,10 +86,11 @@ DEFUN( _Console_Putc, (ch), char ch )
This routine reads a character from the UART and returns it. */
int
-DEFUN( _Console_Getc, (poll), int poll )
+_Console_Getc (poll)
+ int poll;
{
if ( poll ) {
- if ( !(RD_M68681->srb & RXRDYB) )
+ if ( !(RD_M68681->srb & RXRDYB) )
return -1;
else
return RD_M68681->rbb;
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
index d809b6b..df400d4 100644
--- a/sysdeps/unix/bsd/osf/sigaction.h
+++ b/sysdeps/unix/bsd/osf/sigaction.h
@@ -1,21 +1,22 @@
-/* Structure and constand definitions for sigaction et al. OSF/1 version.
+/* Structure and constant definitions for sigaction et al. OSF/1 version.
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
diff --git a/sysdeps/unix/sysv/linux/m68k/mremap.S b/sysdeps/unix/sysv/linux/m68k/mremap.S
new file mode 100644
index 0000000..2fec9aa
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/mremap.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+
+/* The mremap system call is special because it needs to return
+ its value in register %a0. */
+
+ .text
+PSEUDO (__mremap, mremap, 4)
+ move.l %d0, %a0
+ rts
+PSEUDO_END (__mremap)
+weak_alias (__mremap, mremap)
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
index c7793fb..b81c2bc 100644
--- a/sysdeps/vax/memchr.s
+++ b/sysdeps/vax/memchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the first occurence of c in the memory at cp (length n).
+ * Find the first occurrence of c in the memory at cp (length n).
* Return pointer to match or null pointer.
*
* This code optimises the usual case (0 < n < 65535).
diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s
index 1683f56..70025cc 100644
--- a/sysdeps/vax/strchr.s
+++ b/sysdeps/vax/strchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the first occurence of c in the string cp.
+ * Find the first occurrence of c in the string cp.
* Return pointer to match or null pointer.
*
* char *
@@ -58,7 +58,7 @@ ENTRY(strchr, 0)
*/
movab tbl,r3 /* r3 = base of table */
bbss $0,(r3),Lreent /* ensure not reentering */
- movab (r3)[r2],r5
+ movab (r3)[r2],r5
incb (r5) /* mark both '\0' and c */
0:
scanc r4,(r1),(r3),$1 /* look for c or '\0' */
diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s
index e5bfcf2..0758bd8 100644
--- a/sysdeps/vax/strncmp.s
+++ b/sysdeps/vax/strncmp.s
@@ -53,14 +53,14 @@ ENTRY(strncmp, 0)
movl 4(ap),r1 # r1 = s1
movq 8(ap),r3 # r3 = s2; r4 = n
1:
- clrl r5 # calculate min bytes to next page boundry
+ clrl r5 # calculate min bytes to next page boundary
subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1
subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2
cmpb r0,r5 # r5 = min(r0, r5);
bgtru 2f
movb r0,r5
2:
- incl r5 # r5 = min bytes to next page boundry
+ incl r5 # r5 = min bytes to next page boundary
cmpl r4,r5 # r5 = min(n, r5);
bgeq 3f
movl r4,r5
diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s
index dffcdda..8731344 100644
--- a/sysdeps/vax/strrchr.s
+++ b/sysdeps/vax/strrchr.s
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
/*
- * Find the last occurence of c in the string cp.
+ * Find the last occurrence of c in the string cp.
* Return pointer to match or null pointer.
*
* char *
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1003a96da98a7aca8d6a93bf85e16af66a3d5596
commit 1003a96da98a7aca8d6a93bf85e16af66a3d5596
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 18 03:23:36 1996 +0000
update from main archive 961217
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 738b9cc..e7d5949 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1 +1,2 @@
clone.S
+mremap.S
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
index bdbd105..12e95f1 100644
--- a/sysdeps/unix/sysv/linux/m68k/Makefile
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -1,3 +1,7 @@
# Linux/m68k uses Motorola asm syntax and the ELF format.
m68k-syntax-flag = -DMOTOROLA_SYNTAX
+
+ifeq ($(subdir),misc)
+sysdep_routines += mremap
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8593c8b664fe77bf3a3e525cfd2ae3a9591dc0b
commit c8593c8b664fe77bf3a3e525cfd2ae3a9591dc0b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 11 01:40:18 1996 +0000
update from main arcive 961210
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index ecd26e8..7456735 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by David Mosberger (davidm@cs.arizona.edu).
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Finds characters in a memory area. Optimized for the Alpha
architecture:
@@ -53,7 +52,6 @@ ENTRY(memchr)
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
addq a0, a2, t4
and a1, 0xff, a1 # a1 = 00000000000000ch
- ldq_u t5, -1(t4)
sll a1, 8, t1 # t1 = 000000000000ch00
cmpult a2, 9, t3
or t1, a1, a1 # a1 = 000000000000chch
@@ -66,6 +64,7 @@ ENTRY(memchr)
beq t3, $first_quad
+ ldq_u t5, -1(t4)
extqh t5, a0, t5
mov a0, v0
or t6, t5, t0 # t0 = quadword starting at a0
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
index 6827590..a6c6c61 100644
--- a/sysdeps/alpha/strncmp.S
+++ b/sysdeps/alpha/strncmp.S
@@ -62,8 +62,8 @@ $aligned:
ornot t0, t3, t0 # .. e1 :
cmpbge zero, t1, t7 # e0 : bits set iff null found
beq a2, $eoc # .. e1 : check end of count
- unop # :
- bne t7, $eos # e1 :
+ subq a2, 1, a2 # e0 :
+ bne t7, $eos # .. e1 :
/* Aligned compare main loop.
On entry to this basic block:
@@ -73,8 +73,8 @@ $aligned:
$a_loop:
xor t0, t1, t2 # e0 :
bne t2, $wordcmp # .. e1 (zdb)
- ldq_u t1, 0(a1) # e0 :
- ldq_u t0, 0(a0) # .. e1 :
+ ldq_u t1, 8(a1) # e0 :
+ ldq_u t0, 8(a0) # .. e1 :
addq a1, 8, a1 # e0 :
addq a0, 8, a0 # .. e1 :
cmpbge zero, t1, t7 # e0 :
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b2ab4933a3966343c3d10c3d69643c739b107dc
commit 7b2ab4933a3966343c3d10c3d69643c739b107dc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Dec 8 08:00:59 1996 +0000
update from main archive 961207
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index d79f1f2..d898d04 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,4 +4,3 @@ ioperm.c
init-first.h
clone.S
sys/io.h
-llseek.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e14797885d53737b04e72b5f94508791d7026207
commit e14797885d53737b04e72b5f94508791d7026207
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Dec 7 03:30:23 1996 +0000
update from main archive 961206
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
deleted file mode 100644
index a2e644c..0000000
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* For compatibility only: a "long" is 64 bits on the Alpha, so
- llseek() isn't really needed. But there are some programs out
- there who may depend on it being around. */
-
-#include <sysdep.h>
-
- .text
-ENTRY(llseek)
-#ifdef PROF
- ldgp gp, 0(pv)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
-#endif
-
- sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
- zap a2, 0xf0, a2
- mov a3, t0 /* save result address */
- bis a2, a1, a1
-
- mov a4, a2 /* shift down whence */
-
- ldi v0, __NR_lseek
- call_pal PAL_callsys
- bne a3, error
-
- stq v0, 0(t0)
- ret
-
-error:
-#ifndef PROF
- br gp, 1f
-1: ldgp gp, 0(gp)
-#endif
- jmp zero, __syscall_error
-
- END(llseek)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f1fc182396bd179e3c8faa3efe2372af32f745f6
commit f1fc182396bd179e3c8faa3efe2372af32f745f6
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Dec 4 01:41:27 1996 +0000
update from main archive 961203
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 415549d..1c71ec8 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,22 +1,22 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Richard Henderson <rth@tamu.edu>.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
@@ -37,13 +37,13 @@ elf_machine_matches_host (Elf64_Word e_machine)
return e_machine == EM_ALPHA;
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf64_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. The multiple-got-capable
+ linker no longer allocates the first .got entry for this. But not to
+ worry, no special tricks are needed. */
+static inline Elf64_Addr
+elf_machine_dynamic (void)
{
- register Elf64_Addr gp __asm__("$29");
- return (Elf64_Addr *)(gp - 0x8000);
+ return (Elf64_Addr) &_DYNAMIC;
}
/* Return the run-time load address of the shared object. */
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8b9872c..a4b1edc 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -1,21 +1,21 @@
/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef dl_machine_h
#define dl_machine_h
@@ -38,13 +38,14 @@ elf_machine_matches_host (Elf32_Half e_machine)
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline Elf32_Addr *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline Elf32_Addr
+elf_machine_dynamic (void)
{
register Elf32_Addr *got asm ("%a5");
- return got;
+ return *got;
}
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index c0ac649..c00afbe 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -1,22 +1,22 @@
-/* Machine-dependent ELF dynamic relocation inline functions. mips version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Machine-dependent ELF dynamic relocation inline functions. MIPS version.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF_MACHINE_NAME "MIPS"
@@ -67,13 +67,14 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* FIXME: the offset of gp from GOT may be system-dependent. */
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
- Must be inlined in a function which uses global data. */
-static inline ElfW(Addr) *
-elf_machine_got (void)
+/* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. */
+static inline ElfW(Addr)
+elf_machine_dynamic (void)
{
register ElfW(Addr) gp asm ("$28");
- return (ElfW(Addr) *) (gp - 0x7ff0);
+ return * (ElfW(Addr) *) (gp - 0x7ff0);
}
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 08dc3b4..9df3134 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,20 +1,20 @@
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <sysdep.h>
#include <features.h>
@@ -63,22 +63,6 @@ __syscall_error:
lda sp, 16(sp)
ret
.end __syscall_error
-
-/* A default non-threaded version of __errno_location that just returns
- the address of errno. */
-
- .weak __errno_location
- .ent __errno_location
-__errno_location:
- .frame sp, 0, ra
- ldgp gp, 0(t12)
- .mask 0, 0
- .prologue 1
-
- lda v0, errno
- ret
- .end __errno_location
-
#else
ENTRY(__syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d57e8fd52663472e8c698d370e578615e05914f0
commit d57e8fd52663472e8c698d370e578615e05914f0
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 29 02:21:14 1996 +0000
update from main archive 961127
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
new file mode 100644
index 0000000..7883d70
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+s_llseek llseek _llseek 5 __sys_llseek
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b120ade020c2d637165bee9131244250b89c77eb
commit b120ade020c2d637165bee9131244250b89c77eb
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 28 04:16:09 1996 +0000
update from main archive 961127
diff --git a/sysdeps/alpha/elf/Makefile b/sysdeps/alpha/elf/Makefile
new file mode 100644
index 0000000..db849bd
--- /dev/null
+++ b/sysdeps/alpha/elf/Makefile
@@ -0,0 +1,4 @@
+ifeq ($(subdir), csu)
+extra-objs += crtbegin.o crtend.o
+install-lib += crtbegin.o crtend.o
+endif
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index c4aa2c7..208e793 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -54,6 +54,19 @@ extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const));
extern int _hae_shift __P ((void)) __attribute__ ((const));
extern int hae_shift __P ((void)) __attribute__ ((const));
+/* Access PCI space protected from machine checks. */
+extern int pciconfig_read __P ((unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf));
+
+extern int pciconfig_write __P ((unsigned long int __bus,
+ unsigned long int __dfn,
+ unsigned long int __off,
+ unsigned long int __len,
+ unsigned char *__buf));
+
__END_DECLS
#endif /* _SYS_IO_H */
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 4a52bf2..49cc697 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -21,6 +21,7 @@ getdents - getdents 3 __getdirentries getdirentries
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap
+llseek EXTRA lseek 3 llseek
# these are actually common with the x86:
fstatfs - fstatfs 2 __fstatfs fstatfs
@@ -46,3 +47,7 @@ setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
sysctl - _sysctl 6 sysctl
+
+# access pci space protected from machine checks:
+pciconfig_read EXTRA pciconfig_read 5 pciconfig_read
+pciconfig_write EXTRA pciconfig_write 5 pciconfig_write
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 95e6354..5533be2 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -61,16 +61,3 @@ __syscall_error:
rts
END (__syscall_error)
#endif /* PIC */
-
- .weak __errno_location
- .type __errno_location,@function
- .align 4
-__errno_location:
- CALL_MCOUNT
-#ifdef PIC
- move.l (%pc, errno@GOTPC), %a0
-#else
- lea errno, %a0
-#endif
- rts
-END (__errno_location)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eaff3663c5d184da855592ff950f0e85488dcf58
commit eaff3663c5d184da855592ff950f0e85488dcf58
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 27 06:09:14 1996 +0000
update from main archive 961126
diff --git a/sysdeps/alpha/elf/Dist b/sysdeps/alpha/elf/Dist
new file mode 100644
index 0000000..3e70101
--- /dev/null
+++ b/sysdeps/alpha/elf/Dist
@@ -0,0 +1,2 @@
+crtbegin.S
+crtend.S
diff --git a/sysdeps/alpha/elf/crtbegin.S b/sysdeps/alpha/elf/crtbegin.S
new file mode 100644
index 0000000..f75673e
--- /dev/null
+++ b/sysdeps/alpha/elf/crtbegin.S
@@ -0,0 +1,91 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+/*
+ * Heads of the constructor/destructor lists.
+ */
+
+/* The __*TOR_LIST__ symbols are not global because when this file is used
+ in a shared library, we do not want the symbol to fall over to the
+ application's lists. */
+
+.section .ctors,"aw"
+
+ .align 3
+__CTOR_LIST__:
+ .quad -1
+
+.section .dtors,"aw"
+
+ .align 3
+__DTOR_LIST__:
+ .quad -1
+
+
+/*
+ * Fragment of the ELF _fini routine that invokes our dtor cleanup.
+ */
+
+.section .fini,"ax"
+
+ /* Since the bits of the _fini function are spread across many
+ object files, each potentially with its own GP, we must
+ assume we need to load ours. Further, our .fini section
+ can easily be more than 4MB away from our .text bits so we
+ can't use bsr. */
+
+ br $gp,1f
+1: ldgp $gp,0($gp)
+ jsr $26,__do_global_dtors_aux
+
+ /* Must match the alignment we got from crti.o else we get
+ zero-filled holes in our _fini function and thense SIGILL. */
+ .align 3
+
+/*
+ * Invoke our destructors in order.
+ */
+
+.text
+
+ .align 3
+ .ent __do_global_dtors_aux
+
+__do_global_dtors_aux:
+ .frame $sp,16,$26,0
+ /* GP already loaded in .fini */
+ lda $sp,-16($sp)
+ stq $9,8($sp)
+ stq $26,0($sp)
+ .mask (1<<26)|(1<<9), -16
+ .prologue 1
+
+ lda $9,__DTOR_LIST__
+ br 1f
+0: jsr $26,($27)
+1: ldq $27,8($9)
+ addq $9,8,$9
+ bne $27,0b
+
+ ldq $26,0($sp)
+ ldq $9,8($sp)
+ lda $sp,16($sp)
+ ret
+
+ .end __do_global_dtors_aux
diff --git a/sysdeps/alpha/elf/crtend.S b/sysdeps/alpha/elf/crtend.S
new file mode 100644
index 0000000..7f51d81
--- /dev/null
+++ b/sysdeps/alpha/elf/crtend.S
@@ -0,0 +1,92 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+
+/*
+ * Tails of the constructor/destructor lists.
+ */
+
+/* The __*TOR_END__ symbols are not global because when this file is used
+ in a shared library, we do not want the symbol to fall over to the
+ application's lists. */
+
+.section .ctors,"aw"
+
+ .align 3
+__CTOR_END__:
+ .quad 0
+
+.section .dtors,"aw"
+
+ .align 3
+__DTOR_END__:
+ .quad 0
+
+
+/*
+ * Fragment of the ELF _init routine that invokes our ctor startup
+ */
+
+.section .init,"ax"
+
+ /* Since the bits of the _init function are spread across many
+ object files, each potentially with its own GP, we must
+ assume we need to load ours. Further, our .init section
+ can easily be more than 4MB away from our .text bits so we
+ can't use bsr. */
+
+ br $gp,1f
+1: ldgp $gp,0($gp)
+ jsr $26,__do_global_ctors_aux
+
+ /* Must match the alignment we got from crti.o else we get
+ zero-filled holes in our _init function and thense SIGILL. */
+ .align 3
+
+/*
+ * Invoke our destructors in order.
+ */
+
+.text
+
+ .align 3
+ .ent __do_global_ctors_aux
+
+__do_global_ctors_aux:
+ .frame $sp,16,$26,0
+ /* GP already loaded in .init. */
+ lda $sp,-16($sp)
+ stq $9,8($sp)
+ stq $26,0($sp)
+ .mask (1<<26)|(1<<9), -16
+ .prologue 1
+
+ lda $9,__CTOR_END__
+ br 1f
+0: jsr $26,($27)
+1: ldq $27,-8($9)
+ subq $9,8,$9
+ not $27,$0
+ bne $0,0b
+
+ ldq $26,0($sp)
+ ldq $9,8($sp)
+ lda $sp,16($sp)
+ ret
+
+ .end __do_global_ctors_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c7b25873ae72cdb280c8da52815e6e83a1179c5
commit 3c7b25873ae72cdb280c8da52815e6e83a1179c5
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 20 03:45:46 1996 +0000
update from main archive 961119
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index be7f6dd..1bb3e4a 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -1,21 +1,21 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version.
-Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
@@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */
ENTRY(_setjmp)
ldgp $29,0($27)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
bis $31, $31, $17 /* Pass a second argument of zero. */
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index 2b79961..cf5bf18 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -1,21 +1,21 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version.
-Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
We cannot do it in C because it must be a tail-call, so frame-unwinding
@@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */
ENTRY(setjmp)
ldgp $29, 0($27)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
bis $31, 1, $17 /* Pass a second argument of one. */
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 55d4f62..c6e09f1 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -1,28 +1,30 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
ENTRY(__htonl)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index 743d3e2..8d3aefe 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -1,28 +1,30 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
ENTRY(__htons)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/alpha/memcpy.S b/sysdeps/alpha/memcpy.S
deleted file mode 100644
index 4ee9c11..0000000
--- a/sysdeps/alpha/memcpy.S
+++ /dev/null
@@ -1,276 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
-
-
-/* This is the child of the C-with-inline-assembly memcpy posted by
- Martin Ostermann (ost@comnets.rwth-aachen.de).
-
- This is generally scheduled for the EV5, but whenever necessary and
- possible, the autoswap slotting feature of the EV5 is used so that the
- code lays out nicely for the EV4 as well. */
-
-#include <alpha/regdef.h>
-
- .set noreorder
-
- .text
-
- .ent copy_fwd_aligned
-copy_fwd_aligned:
- .frame sp, 0, ra, 0
- .prologue 0
-
- /* Aligned forward copy main loop. On entry to this basic block:
- t0 == source word waiting to be stored
- t2 == loop counter
- a0 == destination pointer
- a1 == source pointer
- a2 mod 8 == byte count in final word */
- .align 4
-$fa_loop:
- and t2, 7, t1 # e0 :
- beq t1, 1f # .. e1 :
-
-0: stq_u t0, 0(a0) # e0 :
- subq t1, 1, t1 # .. e1 :
- ldq_u t0, 8(a1) # e0 : copy up to seven words
- addq a0, 8, a0 # .. e1 :
- addq a1, 8, a1 # e0 :
- bne t1, 0b # .. e1 :
-
-1: bic t2, 7, t2 # e0 :
- beq t2, $fa_tail # .. e1 :
-
-2: stq_u t0, 0(a0) # e0 :
- addq a0, 64, a0 # .. e1 :
- ldq_u t3, 8(a1) # e0 : copy eight words as fast as we can
- ldq_u t4, 16(a1) # .. e1 :
- ldq_u t5, 24(a1) # e0 :
- ldq_u t6, 32(a1) # .. e1 :
- ldq_u t7, 40(a1) # e0 :
- ldq_u t8, 48(a1) # .. e1 :
- ldq_u t9, 56(a1) # e0 :
- ldq_u t0, 64(a1) # .. e1 :
- stq_u t3, -56(a0) # e0 :
- subq t2, 8, t2 # .. e1 :
- stq_u t4, -48(a0) # e0 :
- addq a1, 64, a1 # .. e1 :
- stq_u t5, -40(a0) # e0 :
- stq_u t6, -32(a0) # e0 :
- stq_u t7, -24(a0) # e0 :
- stq_u t8, -16(a0) # e0 :
- stq_u t9, -8(a0) # e0 :
- bne t2, 2b # .. e1 :
-
- /* Take care of a partial word tail. */
-$fa_tail:
- and a2, 7, t3 # e0 :
- bne t3, 1f # .. e1 (zdb)
-
- /* Aligned copy, aligned tail, final store. */
- stq_u t0, 0(a0)
- ret
-
-1: ldq_u t1, 0(a0) # e1 :
- mskql t0, a2, t0 # .. e1 :
- mskqh t1, a2, t1 # e0 (stall)
- bis t0, t1, t0 # e1 :
- stq_u t0, 0(a0) # e0 :
- ret # .. e1 :
-
- /* This is the actual entry point to this function. */
- .align 3
-$fwd_aligned:
- ldq_u t0, 0(a1) # e0 :
- and a0, 7, t3 # .. e1 :
- addq a2, t3, a2 # e0 :
- subq a2, 1, t2 # e1 :
- sra t2, 3, t2 # e0 :
- beq t3, $fa_loop # .. e1 :
-
- ldq_u t1, 0(a0) # e0 :
- beq t2, $fa_small # .. e1 :
- mskqh t0, a0, t0 # e0 :
- mskql t1, a0, t3 # e0 :
- bis t0, t3, t0 # e0 :
- br $fa_loop # .. e1 :
-
- /* The move affects exactly one destination word. */
-$fa_small:
- mskqh t0, a0, t0 # e0 :
- and a2, 7, t4 # .. e1 :
- mskql t1, a0, t3 # e0 :
- bne t4, 1f # .. e1 :
-
- or t0, t3, t0 # e0 :
- unop # :
- stq_u t0, 0(a0) # e0 :
- ret # .. e1 :
-
-1: mskql t0, a2, t0 # e0 :
- mskqh t1, a2, t1 # e0 :
- or t0, t3, t0 # e0 :
- or t0, t1, t0 # e1 :
- stq_u t0, 0(a0) # e0 :
- ret # .. e1 :
-
- .end copy_fwd_aligned
-
- .ent memcpy
- .globl memcpy
- .align 3
-memcpy:
- .frame sp, 0, ra, 0
-#ifdef PROF
- ldgp gp, 0(ra)
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .prologue 1
-#else
- .prologue 0
-#endif
-
- mov a0, v0
- beq a2, $zero_length
-
- /* Are source and destination co-aligned? */
- xor a0, a1, t0
- unop
- and t0, 7, t0
- beq t0, $fwd_aligned
- br $fwd_unaligned
-
- .end memcpy
-
- .ent copy_fwd_unaligned
-copy_fwd_unaligned:
- .frame sp, 0, ra, 0
- .prologue 0
-
- /* Unaligned forward copy main loop. On entry to this basic block:
- t0 == source low word, unshifted
- t2 == loop counter
- t7 == last source byte + 1
- a0 == destination pointer
- a1 == source pointer
- a2 mod 8 == byte count in final word */
- .align 4
-$fu_loop:
- beq t2, $fu_tail # e1 :
- blbc t2, 0f # e1 :
-
- ldq_u t1, 8(a1) # e1 : copy one unaligned word
- extql t0, a1, t3 # .. e0 :
- addq a1, 8, a1 # e0 :
- addq a0, 8, a0 # .. e1 :
- extqh t1, a1, t4 # e0 :
- subq t2, 1, t2 # .. e1 :
- mov t1, t0 # e0 :
- or t3, t4, t3 # .. e1 :
- stq_u t3, -8(a0) # e0 :
- beq t2, $fu_tail # .. e1 :
-
-0: ldq_u t1, 8(a1) # e1 : copy two unaligned words
- extql t0, a1, t3 # .. e0 :
- ldq_u t0, 16(a1) # e0 :
- subq t2, 2, t2 # .. e1 :
- extqh t1, a1, t4 # e0 :
- addq a0, 16, a0 # .. e1 :
- extql t1, a1, t5 # e0 :
- or t3, t4, t3 # .. e1 :
- extqh t0, a1, t6 # e0 :
- addq a1, 16, a1 # .. e1 :
- stq_u t3, -16(a0) # e0 :
- or t5, t6, t5 # .. e1 :
- stq_u t5, -8(a0) # e0 :
- bne t2, 0b # .. e1 :
-
- /* Take care of a partial words tail. */
-$fu_tail:
- ldq_u t4, -1(t7) # e1 :
- extql t0, a1, t3 # .. e0 :
- extqh t4, a1, t4 # e0 (stall)
- and a2, 7, t5 # .. e1 :
- or t3, t4, t3 # e0 :
- beq t5, 1f # .. e1 :
-
- ldq_u t1, 0(a0) # e1 :
- mskql t3, a2, t3 # .. e0 :
- mskqh t1, a2, t1 # e0 (stall)
- or t1, t3, t3 # e1 :
-
-1: stq_u t3, 0(a0) # e0 :
- ret # .. e1 :
-
- /* The entry point to the unaligned forward copy. */
- .align 3
-$fwd_unaligned:
- ldq_u t0, 0(a1) # e0 : load initial bits of src
- addq a1, a2, t7 # .. e1 : record last byte + 1 of src
- and a0, 7, t3 # e0 : find dst misalignment
- addq a2, t3, a2 # e1 : find number of words affected
- subq a2, 1, t2 # e0 :
- cmple a2, 8, t4 # .. e1 : are we dealing with a small block?
- subq a1, t3, a1 # e0 :
- bne t4, $fu_small # .. e1 :
- srl t2, 3, t2 # e0 :
- beq t3, $fu_loop # .. e1 :
-
- /* Take care of an unaligned dst head. */
- ldq_u t5, 0(a0) # e0 :
- ldq_u t1, 8(a1) # .. e1 :
- extql t0, a1, t3 # e0 :
- addq a0, 8, a0 # .. e1 :
- extqh t1, a1, t4 # e0 :
- addq a1, 8, a1 # .. e1 :
- mskql t5, a0, t5 # e0 :
- or t3, t4, t3 # .. e1 :
- mskqh t3, a0, t3 # e0 :
- subq t2, 1, t2 # .. e1 :
- or t3, t5, t3 # e0 :
- mov t1, t0 # .. e1 :
- stq_u t3, -8(a0) # e0 :
- br $fu_loop # .. e1 :
-
- /* The move affects exactly one destination word. */
- .align 3
-$fu_small:
- ldq_u t2, 0(a0) # e1 :
- extql t0, a1, t3 # .. e0 :
- ldq_u t1, -1(t7) # e0 :
- and a2, 7, t8 # .. e1 :
- mskqh t2, a2, t6 # e0 :
- mskql t2, a0, t5 # e0 :
- extqh t1, a1, t4 # e0 :
- cmovne t8, t6, t8 # .. e1 :
- or t3, t4, t3 # e0 :
- or t5, t8, t5 # .. e1 :
- mskqh t3, a0, t3 # e0 :
- and a2, 7, t8 # .. e1 :
- mskql t3, a2, t6 # e0 :
- cmovne t8, t6, t8 # e1 :
- or t3, t5, t3 # e0 :
- unop # :
- stq_u t3, 0(a0) # e0 :
-
-$zero_length:
- ret # .. e1 :
-
- .end copy_fwd_unaligned
diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S
index 739d3de..be5b1d0 100644
--- a/sysdeps/alpha/s_copysign.S
+++ b/sysdeps/alpha/s_copysign.S
@@ -1,29 +1,31 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by David Mosberger <davidm@azstarnet.com>
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
ENTRY(__copysign)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index f57d490..4b2e147 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,20 +1,20 @@
/* Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -24,8 +24,10 @@ Cambridge, MA 02139, USA. */
ENTRY (__sigsetjmp)
ldgp $29, 0($27)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
index 9c2668b..46b09d5 100644
--- a/sysdeps/alpha/stpcpy.S
+++ b/sysdeps/alpha/stpcpy.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Copy a null-terminated string from SRC to DST. Return a pointer
to the null-terminator in the source. */
@@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(__stpcpy)
ldgp gp, 0(pv)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
index e57259f..ddc15d9 100644
--- a/sysdeps/alpha/strcat.S
+++ b/sysdeps/alpha/strcat.S
@@ -1,6 +1,6 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@tamu.edu)
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -26,8 +26,10 @@
ENTRY(strcat)
ldgp gp, 0(pv)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
index 823476f..24c827b 100644
--- a/sysdeps/alpha/strcpy.S
+++ b/sysdeps/alpha/strcpy.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Copy a null-terminated string from SRC to DST. Return a pointer
to the null-terminator in the source. */
@@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strcpy)
ldgp gp, 0(pv)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S
index 089fba3..2c39cc0 100644
--- a/sysdeps/alpha/strncat.S
+++ b/sysdeps/alpha/strncat.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Append no more than COUNT characters from the null-terminated string SRC
to the null-terminated string DST. Always null-terminate the new DST. */
@@ -28,8 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strncat)
ldgp gp, 0(pv)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S
index b5c980e..cf5ae09 100644
--- a/sysdeps/alpha/w_sqrt.S
+++ b/sysdeps/alpha/w_sqrt.S
@@ -1,8 +1,7 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
- Based on public-domain C source by Linus Torvalds.
-
This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@cs.arizona.edu>, 1996.
+ Based on public-domain C source by Linus Torvalds.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -15,9 +14,9 @@
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc., 675 Mass Ave,
- Cambridge, MA 02139, USA. */
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This version is much faster than generic sqrt implementation, but
it doesn't handle exceptional values or the inexact flag. Don't use
@@ -25,6 +24,7 @@
#ifndef _IEEE_FP
+#define _ERRNO_H
#include <errnos.h>
#include <sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index d31d9e9..3d9f6dc 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -1,24 +1,25 @@
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+ This file is part of the GNU C Library.
+ Contributed by Brendan Kehoe <brendan@zen.org>, 1993.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* __brk is a special syscall under Linux since it never returns an
-error. Instead, the error condition is indicated by returning the old
-break value (instead of the new, requested one). */
+ error. Instead, the error condition is indicated by returning the old
+ break value (instead of the new, requested one). */
#include <sysdep.h>
#define _ERRNO_H
@@ -39,8 +40,10 @@ __curbrk: .skip 8
LEAF(__brk, 0)
ldgp gp, 0(t12)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 9dbf303..03ecddc 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson (rth@tamu.edu)
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson <rth@tamu.edu>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* clone() is even more special than fork() as it mucks with stacks
and invokes a function in the right context after its all over. */
@@ -33,8 +34,10 @@ ENTRY(__clone)
stq a4,0(sp)
stq a5,8(sp)
#ifdef PROF
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
#endif
.prologue 1
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 1176a27..dbc25bc 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -26,8 +27,10 @@ LEAF(__ieee_get_fp_control, 16)
#ifdef PROF
ldgp gp, 0(pv)
lda sp, -16(sp)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
lda sp, -16(sp)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index aa761ec..8486cfa 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -24,8 +25,10 @@ LEAF(__ieee_set_fp_control, 16)
#ifdef PROF
ldgp gp, 0(sp)
lda sp, -16(sp)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
lda sp, -16(sp)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index 45fb349..a2e644c 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* For compatibility only: a "long" is 64 bits on the Alpha, so
llseek() isn't really needed. But there are some programs out
@@ -26,8 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(llseek)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 83d331f..f476ed5 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* sigsuspend is a special syscall since it needs to dereference the
sigset. */
@@ -23,11 +24,13 @@ Cambridge, MA 02139, USA. */
.text
-LEAF(sigsuspend, 0)
+LEAF(__sigsuspend, 0)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
@@ -46,4 +49,6 @@ error:
#endif
jmp zero, __syscall_error
- END(sigsuspend)
+ END(__sigsuspend)
+
+weak_alias(__sigsuspend, sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 81043c2..75e1260 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -1,20 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
+ This file is part of the GNU C Library.
+ Contributed by David Mosberger <davidm@azstarnet.com>, 1996.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -44,8 +45,10 @@ Cambridge, MA 02139, USA. */
LEAF(__syscall, 0)
#ifdef PROF
ldgp gp, 0(pv)
+ .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
+ .set at
.prologue 1
#else
.prologue 0
@@ -69,4 +72,6 @@ error:
#endif
jmp zero, __syscall_error
+END(__syscall)
+
weak_alias(__syscall, syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2a6bc19ec6e81fa023d298254ffc0cef99e77e9
commit c2a6bc19ec6e81fa023d298254ffc0cef99e77e9
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Nov 17 03:15:22 1996 +0000
update from main archive 961116
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 3cc9595..022fa03 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1,7 +1,7 @@
setjmp_aux.c
DEFS.h
divrem.h
-divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
+divl.S divq.S reml.S remq.S
_mcount.S
stxcpy.S
stxncpy.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ef923d95816a8fda1023ff99efaaacfd1976a56
commit 7ef923d95816a8fda1023ff99efaaacfd1976a56
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Nov 15 04:08:00 1996 +0000
update from main archive 961114
diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h
index 9cadfae..8541922 100644
--- a/sysdeps/unix/bsd/osf/alpha/statbuf.h
+++ b/sysdeps/unix/bsd/osf/alpha/statbuf.h
@@ -1,20 +1,21 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STATBUF_H
#define _STATBUF_H
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index fc148a6..6dc3e4e 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -1,21 +1,21 @@
/* Definitions for BSD-style memory management. OSF/1 version.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h
index ea83d71..a327401 100644
--- a/sysdeps/unix/bsd/sun/signum.h
+++ b/sysdeps/unix/bsd/sun/signum.h
@@ -1,21 +1,21 @@
/* Signal number definitions. SunOS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
index 8f515db..d0d177c 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
@@ -1,21 +1,21 @@
/* Bit values for resource limits. SunOS 4 version.
-Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
subset of these kinds of resource limit. In systems where `getrlimit'
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index c952fc4..fb38c34 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,21 +1,21 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
index b768dea..dc0a007 100644
--- a/sysdeps/unix/bsd/sun/sunos4/termbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h
@@ -1,21 +1,21 @@
/* termios type and macro definitions. SunOS 4 version.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Type of terminal control flag masks. */
typedef unsigned long int tcflag_t;
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index d929ca9..2d3c8fe 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,21 +1,21 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h
index 5d30ebb..13314cf 100644
--- a/sysdeps/unix/sysv/irix4/signum.h
+++ b/sysdeps/unix/sysv/irix4/signum.h
@@ -1,19 +1,20 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Signal number definitions. Irix4 version.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h
index 8b327ba..579ccec 100644
--- a/sysdeps/unix/sysv/irix4/statbuf.h
+++ b/sysdeps/unix/sysv/irix4/statbuf.h
@@ -1,23 +1,23 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STATBUF_H
-#define _STATBUF_H
+#define _STATBUF_H 1
struct stat
{
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index c96bcc0..9ceca1f 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,21 +1,21 @@
/* Definitions for BSD-style memory management. Irix 4 version.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_MMAN_H
diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h
index 5b59155..92c9df7 100644
--- a/sysdeps/unix/sysv/linux/alpha/statbuf.h
+++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h
@@ -1,23 +1,23 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STATBUF_H
-#define _STATBUF_H
+#define _STATBUF_H 1
/* The Alpha has no additional syscall versions. */
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
index a880735..c4aa2c7 100644
--- a/sysdeps/unix/sysv/linux/alpha/sys/io.h
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -1,20 +1,20 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SYS_IO_H
diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h
index 316bd0d..9c03f89 100644
--- a/sysdeps/unix/sysv/sco3.2.4/syscall.h
+++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h
@@ -1,3 +1,21 @@
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
/* From Scott Bartram. */
#ifndef _SYSCALL_H
diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h
index 6d6c3b0..e456816 100644
--- a/sysdeps/unix/sysv/sco3.2/local_lim.h
+++ b/sysdeps/unix/sysv/sco3.2/local_lim.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _LOCAL_LIM_H
#define _LOCAL_LIM_H 1
diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
index ada49ce..9354d67 100644
--- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h
+++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
@@ -1,23 +1,24 @@
/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STATBUF_H
-#define _STATBUF_H
+#define _STATBUF_H 1
#include <gnu/types.h>
diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h
index aa3dc7f..f11c731 100644
--- a/sysdeps/unix/sysv/sysv4/signum.h
+++ b/sysdeps/unix/sysv/sysv4/signum.h
@@ -1,21 +1,21 @@
/* Signal number definitions. SVR4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index 57aff36..1461c93 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -1,21 +1,21 @@
/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
-Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _SIGSET_H_types
#define _SIGSET_H_types 1
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h
index 8219626..4e55764 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/signum.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/signum.h
@@ -1,21 +1,21 @@
/* Signal number definitions. Solaris 2 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifdef _SIGNAL_H
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
index ac74cdf..e4e2ab8 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
@@ -1,23 +1,24 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _STATBUF_H
-#define _STATBUF_H
+#define _STATBUF_H 1
#include <gnu/types.h>
@@ -37,7 +38,7 @@ struct stat
long st_filler2[2];
__off_t st_size; /* Size of file, in bytes. */
- /* SVR4 added this extra long to allow for expansion of off_t. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
long st_filler3;
__time_t st_atime; /* Time of last access. */
diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h
index cdb6f29..f5613c1 100644
--- a/sysdeps/unix/sysv/sysv4/waitflags.h
+++ b/sysdeps/unix/sysv/sysv4/waitflags.h
@@ -1,21 +1,22 @@
/* Definitions of flag bits for `waitpid' et al.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _WAITFLAGS_H
diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h
index 58f5415..02cafb0 100644
--- a/sysdeps/vax/huge_val.h
+++ b/sysdeps/vax/huge_val.h
@@ -1,23 +1,22 @@
/* `HUGE_VAL' constant for Vaxen.
Used by <stdlib.h> and <math.h> functions for overflow.
+ Copyright (C) 1992, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#ifndef _HUGE_VAL_H
#define _HUGE_VAL_H 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6acf09f471bbc5ef13d736678475dcef18fc6241
commit 6acf09f471bbc5ef13d736678475dcef18fc6241
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 14 02:04:01 1996 +0000
update from main archive 961113
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index d2328dc..f392b75 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -19,7 +19,7 @@
#include <sysdep.h>
/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for
- more information about the value -4096 used below.*/
+ more information about the value -4095 used below.*/
.text
ENTRY (syscall)
@@ -27,8 +27,7 @@ ENTRY (syscall)
_DOARGS_5 (24) /* Frob arguments. */
trap &0 /* Do the system call. */
UNDOARGS_5 /* Unfrob arguments. */
- moveq.l &-4096, %d1
- cmp.l %d1, %d0 /* Check %d0 for error. */
+ cmp.l &-4095, %d0 /* Check %d0 for error. */
jcc syscall_error /* Jump to error handler if negative. */
rts /* Return to caller. */
PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 46d5a7e..557f10c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -75,13 +75,12 @@ Cambridge, MA 02139, USA. */
a large offset. Therefore we must not anymore test for < 0, but test
for a real error by making sure the value in %d0 is a real error
number. Linus said he will make sure the no syscall returns a value
- in -1 .. -4095 as a valid result so we can savely test with -4096. */
+ in -1 .. -4095 as a valid result so we can savely test with -4095. */
#define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name) \
DO_CALL (&SYS_ify (syscall_name), args); \
- moveq.l &-4096, %d1; \
- cmp.l %d1, %d0; \
+ cmp.l &-4095, %d0; \
jcc syscall_error
#undef PSEUDO_END
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd4b8913cd97d9f5c3852171189d05ecd925986e
commit dd4b8913cd97d9f5c3852171189d05ecd925986e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Nov 7 01:34:35 1996 +0000
update from 961105, second try
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 72d8404..e27909a 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -1,20 +1,21 @@
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdeps/unix/sysdep.h>
@@ -27,36 +28,24 @@ Cambridge, MA 02139, USA. */
#endif
#ifdef __STDC__
-#define LEAF(name, framesize) \
- .globl name; \
- .align 3; \
- .ent name, 0; \
- name##: \
- .frame sp, framesize, ra
+#define __LABEL(x) x##:
#else
+#define __LABEL(x) x/**/:
+#endif
+
#define LEAF(name, framesize) \
.globl name; \
.align 3; \
.ent name, 0; \
- name/**/: \
+ __LABEL(name) \
.frame sp, framesize, ra
-#endif
-#ifdef __STDC__
-#define ENTRY(name) \
- .globl name; \
- .align 3; \
- .ent name, 0; \
- name##: \
- .frame sp, 0, ra
-#else
#define ENTRY(name) \
.globl name; \
.align 3; \
.ent name, 0; \
- name/**/: \
+ __LABEL(name) \
.frame sp, 0, ra
-#endif
/* Mark the end of function SYM. */
#undef END
@@ -64,16 +53,20 @@ Cambridge, MA 02139, USA. */
/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a
label of that number between those two macros! */
-
-#ifdef __STDC__
+
+#ifdef PROF
#define PSEUDO(name, syscall_name, args) \
.globl name; \
.align 3; \
.ent name,0; \
- \
-name##: \
- .frame sp, 0, ra \
- .prologue 1; /* yes, we do use gp */ \
+__LABEL(name) \
+ .frame sp, 0, ra; \
+ ldgp gp,0(pv); \
+ .set noat; \
+ lda AT,_mcount; \
+ jsr AT,(AT),_mcount; \
+ .set at; \
+ .prologue 1; \
ldiq v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
@@ -85,10 +78,9 @@ name##: \
.globl name; \
.align 3; \
.ent name,0; \
- \
-name/**/: \
+__LABEL(name) \
.frame sp, 0, ra \
- .prologue 1; /* yes, we do use gp */ \
+ .prologue 0; \
ldiq v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
@@ -98,13 +90,19 @@ name/**/: \
#endif
#undef PSEUDO_END
-
+#ifdef PROF
+#define PSEUDO_END(sym) \
+1996: \
+ jmp zero, __syscall_error; \
+ END(sym)
+#else
#define PSEUDO_END(sym) \
1996: \
br gp, 2f; \
2: ldgp gp, 0(gp); \
jmp zero, __syscall_error; \
END(sym)
+#endif
#define r0 v0
#define r1 a4
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 75be949..d31d9e9 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -38,6 +38,10 @@ __curbrk: .skip 8
.text
LEAF(__brk, 0)
ldgp gp, 0(t12)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
ldiq v0, __NR_brk
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index 71d8053..9dbf303 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -32,6 +32,10 @@ ENTRY(__clone)
/* Save rest of argument registers for varargs-type work. */
stq a4,0(sp)
stq a5,8(sp)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
/* Sanity check arguments. */
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index e09fa73..1176a27 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -22,9 +22,17 @@ Cambridge, MA 02139, USA. */
.text
-LEAF(__ieee_get_fp_control, 8)
- lda sp, -8(sp)
+LEAF(__ieee_get_fp_control, 16)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda sp, -16(sp)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
.prologue 1
+#else
+ lda sp, -16(sp)
+ .prologue 0
+#endif
mov sp, a1
ldi a0, GSI_IEEE_FP_CONTROL
@@ -33,12 +41,14 @@ LEAF(__ieee_get_fp_control, 8)
bne a3, error
ldq v0, 0(sp)
- lda sp, 8(sp)
+ lda sp, 16(sp)
ret
-error: lda sp, 8(sp)
+error: lda sp, 16(sp)
+#ifndef PROF
br gp, 1f
1: ldgp gp, 0(gp)
+#endif
jmp zero, __syscall_error
END(__ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index d748c81..aa761ec 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -20,9 +20,17 @@ Cambridge, MA 02139, USA. */
#define SSI_IEEE_FP_CONTROL 14
-LEAF(__ieee_set_fp_control, 8)
- lda sp, -8(sp)
+LEAF(__ieee_set_fp_control, 16)
+#ifdef PROF
+ ldgp gp, 0(sp)
+ lda sp, -16(sp)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
.prologue 1
+#else
+ lda sp, -16(sp)
+ .prologue 0
+#endif
stq a0, 0(sp)
mov sp, a1
@@ -30,13 +38,16 @@ LEAF(__ieee_set_fp_control, 8)
ldi v0, __NR_osf_setsysinfo
call_pal PAL_callsys
- lda sp, 8(sp)
+ lda sp, 16(sp)
bne a3, error
ret
-error: br gp, 1f
+error:
+#ifndef PROF
+ br gp, 1f
1: ldgp gp, 0(gp)
+#endif
jmp zero, __syscall_error
END(__ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index 6020f26..45fb349 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */
.text
ENTRY(llseek)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
.prologue 1
+#else
+ .prologue 0
+#endif
sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
zap a2, 0xf0, a2
@@ -40,8 +47,11 @@ ENTRY(llseek)
stq v0, 0(t0)
ret
-error: br gp, 1f
+error:
+#ifndef PROF
+ br gp, 1f
1: ldgp gp, 0(gp)
+#endif
jmp zero, __syscall_error
END(llseek)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index aaae9a3..83d331f 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */
.text
LEAF(sigsuspend, 0)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
.prologue 1
+#else
+ .prologue 0
+#endif
ldq a0, 0(a0)
ldi v0, __NR_sigsuspend
@@ -32,8 +39,11 @@ LEAF(sigsuspend, 0)
bne a3, error
ret
-error: br gp, 1f
+error:
+#ifndef PROF
+ br gp, 1f
1: ldgp gp, 0(gp)
+#endif
jmp zero, __syscall_error
END(sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index f1b36e9..81043c2 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -42,6 +42,15 @@ Cambridge, MA 02139, USA. */
LEAF(__syscall, 0)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
mov a0, v0 /* Syscall number -> v0 */
mov a1, a0 /* arg1-arg5 -> a0-a4 */
mov a2, a1
@@ -53,8 +62,11 @@ LEAF(__syscall, 0)
bne a3, error
ret
-error: br gp, 2f
+error:
+#ifndef PROF
+ br gp, 2f
2: ldgp gp, 0(gp)
+#endif
jmp zero, __syscall_error
weak_alias(__syscall, syscall)
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index b7417aa..d2328dc 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -1,25 +1,25 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for
- more information about the value -128 used below.*/
+ more information about the value -4096 used below.*/
.text
ENTRY (syscall)
@@ -27,7 +27,7 @@ ENTRY (syscall)
_DOARGS_5 (24) /* Frob arguments. */
trap &0 /* Do the system call. */
UNDOARGS_5 /* Unfrob arguments. */
- moveq.l &-128, %d1
+ moveq.l &-4096, %d1
cmp.l %d1, %d0 /* Check %d0 for error. */
jcc syscall_error /* Jump to error handler if negative. */
rts /* Return to caller. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 7016a26..95e6354 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -1,20 +1,20 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
@@ -62,7 +62,11 @@ __syscall_error:
END (__syscall_error)
#endif /* PIC */
-ENTRY (__errno_location)
+ .weak __errno_location
+ .type __errno_location,@function
+ .align 4
+__errno_location:
+ CALL_MCOUNT
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 3366caa..46d5a7e 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -74,14 +74,13 @@ Cambridge, MA 02139, USA. */
even if the call succeeded. E.g., the `lseek' system call might return
a large offset. Therefore we must not anymore test for < 0, but test
for a real error by making sure the value in %d0 is a real error
- number. For now (as of 2.1.1) 122 is the largest defined error number.
- We allow for a bit of room for development and treat -128 to -1 as
- error values. */
+ number. Linus said he will make sure the no syscall returns a value
+ in -1 .. -4095 as a valid result so we can savely test with -4096. */
#define PSEUDO(name, syscall_name, args) \
.text; \
ENTRY (name) \
DO_CALL (&SYS_ify (syscall_name), args); \
- moveq.l &-128, %d1; \
+ moveq.l &-4096, %d1; \
cmp.l %d1, %d0; \
jcc syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60c74cf07a65a55e8937392f269bdb895b2e6f8d
commit 60c74cf07a65a55e8937392f269bdb895b2e6f8d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Nov 6 04:24:11 1996 +0000
update from main archive 961105
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 45babb6..6d4fbbb 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -42,4 +42,4 @@ ifeq ($(subdir),elf)
sysdep-CFLAGS += -mno-fp-regs
endif
-divrem := divl divlu divq divqu reml remlu remq remqu
+divrem := divl divq reml remq
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index a7bdbb5..be7f6dd 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -25,6 +25,10 @@ Cambridge, MA 02139, USA. */
ENTRY(_setjmp)
ldgp $29,0($27)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
bis $31, $31, $17 /* Pass a second argument of zero. */
jmp $31, __sigsetjmp /* Call __sigsetjmp. */
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index c0ed691..2b79961 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -25,6 +25,10 @@ Cambridge, MA 02139, USA. */
ENTRY(setjmp)
ldgp $29, 0($27)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
bis $31, 1, $17 /* Pass a second argument of one. */
jmp $31, __sigsetjmp /* Call __sigsetjmp. */
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index fffa53d..c614fc1 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -80,7 +80,14 @@ $tail: bne t4, 1f # is there a tail to do?
.end bzero_loop
ENTRY(bzero)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
mov a0, v0 # e0 : move return value in place
beq a1, $done # .. e1 : early exit for zero-length store
diff --git a/sysdeps/alpha/div.S b/sysdeps/alpha/div.S
new file mode 100644
index 0000000..6c461c4
--- /dev/null
+++ b/sysdeps/alpha/div.S
@@ -0,0 +1,110 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+
+#include <sysdep.h>
+
+#ifdef __linux__
+# include <asm/gentrap.h>
+# include <asm/pal.h>
+#else
+# include <machine/pal.h>
+#endif
+
+ .set noat
+
+ .align 4
+ .globl div
+ .ent div
+div:
+ .frame sp, 0, ra
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+#define dividend t0
+#define divisor t1
+#define mask t2
+#define quotient t3
+#define modulus t4
+#define tmp1 t5
+#define tmp2 t6
+#define compare t7
+
+ /* find correct sign for input to unsigned divide loop. */
+ sextl a1, a1 # e0 :
+ sextl a2, a2 # .. e1 :
+ negl a1, dividend # e0 :
+ negl a2, divisor # .. e1 :
+ cmovge a1, a1, dividend # e0 :
+ cmovge a2, a2, divisor # .. e1 :
+ beq a2, $divbyzero # e1 :
+ unop # :
+
+ /* shift divisor left, using 3-bit shifts for 32-bit divides as we
+ can't overflow. Three-bit shifts will result in looping three
+ times less here, but can result in two loops more later. Thus
+ using a large shift isn't worth it (and s8addq pairs better than
+ a shift). */
+
+1: cmpult divisor, modulus, compare # e0 :
+ s8addq divisor, zero, divisor # .. e1 :
+ s8addq mask, zero, mask # e0 :
+ bne compare, 1b # .. e1 :
+
+ /* start to go right again. */
+2: addq quotient, mask, tmp2 # e1 :
+ srl mask, 1, mask # .. e0 :
+ cmpule divisor, modulus, compare # e0 :
+ subq modulus, divisor, tmp1 # .. e1 :
+ cmovne compare, tmp2, quotient # e1 :
+ srl divisor, 1, divisor # .. e0 :
+ cmovne compare, tmp1, modulus # e0 :
+ bne mask, 2b # .. e1 :
+
+ /* find correct sign for result. */
+ xor a1, a2, compare # e0 :
+ negl quotient, tmp1 # .. e1 :
+ negl modulus, tmp2 # e0 :
+ cmovlt compare, tmp1, quotient # .. e1 :
+ cmovlt a1, tmp2, modulus # e1 :
+
+ /* and store it away in the structure. */
+ stl quotient, 0(a0) # .. e0 :
+ mov a0, v0 # e1 :
+ stl modulus, 4(a0) # .. e0 :
+ ret # e1 :
+
+$divbyzero:
+ mov a0, v0
+ ldiq a0, GEN_INTDIV
+ call_pal PAL_gentrap
+
+ /* if trap returns, return zero. */
+ stl zero, 0(v0)
+ stl zero, 4(v0)
+ ret
+
+ .end div
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 6990665..fdf053f 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -1,6 +1,6 @@
#define IS_REM 0
#define SIZE 4
-#define SIGNED 1
-#define FUNC_NAME __divl
+#define UFUNC_NAME __divlu
+#define SFUNC_NAME __divl
#include "divrem.h"
diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S
deleted file mode 100644
index ee96c95..0000000
--- a/sysdeps/alpha/divlu.S
+++ /dev/null
@@ -1,6 +0,0 @@
-#define IS_REM 0
-#define SIZE 4
-#define SIGNED 0
-#define FUNC_NAME __divlu
-
-#include "divrem.h"
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index bde3425..8c88af9 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -1,6 +1,6 @@
#define IS_REM 0
#define SIZE 8
-#define SIGNED 1
-#define FUNC_NAME __divq
+#define UFUNC_NAME __divqu
+#define SFUNC_NAME __divq
#include "divrem.h"
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
deleted file mode 100644
index 72dcf97..0000000
--- a/sysdeps/alpha/divqu.S
+++ /dev/null
@@ -1,6 +0,0 @@
-#define IS_REM 0
-#define SIZE 8
-#define SIGNED 0
-#define FUNC_NAME __divqu
-
-#include "divrem.h"
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index eaf892b..b83908d 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -1,25 +1,25 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
-This file is part of the GNU C Library.
+ This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
/* The current Alpha chips don't provide hardware for integer
-division. The C compiler expects the functions
+ division. The C compiler expects the functions
__divqu: 64-bit unsigned long divide
__remqu: 64-bit unsigned long remainder
@@ -27,10 +27,10 @@ division. The C compiler expects the functions
__divlu/__remlu: unsigned 32-bit
__divls/__remls: signed 32-bit
-These are not normal C functions: instead of the normal calling
-sequence, these expect their arguments in registers t10 and t11, and
-return the result in t12 (aka pv). Register AT may be clobbered
-(assembly temporary), anything else must be saved. */
+ These are not normal C functions: instead of the normal calling
+ sequence, these expect their arguments in registers t10 and t11, and
+ return the result in t12 (aka pv). Register AT may be clobbered
+ (assembly temporary), anything else must be saved. */
#include <sysdep.h>
@@ -41,147 +41,185 @@ return the result in t12 (aka pv). Register AT may be clobbered
# include <machine/pal.h>
#endif
-#ifdef DEBUG
-# define arg1 a0
-# define arg2 a1
-# define result v0
-# define mask t0
-# define tmp0 t1
-# define tmp1 t2
-# define sign t3
-# define retaddr ra
-#else
-# define arg1 t10
-# define arg2 t11
-# define result t12
-# define mask v0
-# define tmp0 t0
-# define tmp1 t1
-# define sign t2
-# define retaddr t9
-#endif
+#define mask v0
+#define divisor t0
+#define compare AT
+#define tmp1 t2
+#define tmp2 t3
+#define retaddr t9
+#define arg1 t10
+#define arg2 t11
+#define result t12
-# define divisor arg2
#if IS_REM
-# define dividend result
-# define quotient arg1
-# define GETDIVIDEND bis arg1,zero,dividend
+# define DIV_ONLY(x,y...)
+# define REM_ONLY(x,y...) x,##y
+# define modulus result
+# define quotient t1
+# define GETSIGN(x) mov arg1, x
+# define STACK 32
#else
-# define dividend arg1
-# define quotient result
-# define GETDIVIDEND
+# define DIV_ONLY(x,y...) x,##y
+# define REM_ONLY(x,y...)
+# define modulus t1
+# define quotient result
+# define GETSIGN(x) xor arg1, arg2, x
+# define STACK 48
#endif
#if SIZE == 8
-# define LONGIFYarg1 GETDIVIDEND
-# define LONGIFYarg2
-#else
-# if SIGNED
-# define LONGIFYarg1 addl arg1,zero,dividend
-# define LONGIFYarg2 addl arg2,zero,divisor
-# else
-# define LONGIFYarg1 zapnot arg1,0x0f,dividend
-# define LONGIFYarg2 zapnot arg2,0x0f,divisor
-# endif
-#endif
-
-#if SIGNED
-# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg
-# if IS_REM
-# define GETSIGN(x,y,s) bis x,zero,s
-# else
-# define GETSIGN(x,y,s) xor x,y,s
-# endif
+# define LONGIFY(x,y) mov x,y
+# define SLONGIFY(x,y) mov x,y
+# define _SLONGIFY(x)
+# define NEG(x,y) negq x,y
#else
-# define SETSIGN(sign,reg,tmp)
-# define GETSIGN(x,y,s)
+# define LONGIFY(x,y) zapnot x,15,y
+# define SLONGIFY(x,y) sextl x,y
+# define _SLONGIFY(x) sextl x,x
+# define NEG(x,y) negl x,y
#endif
.set noreorder
.set noat
- .ent FUNC_NAME
- .globl FUNC_NAME
-
-#define FRAME_SIZE 0x30
+ .ent UFUNC_NAME
+ .globl UFUNC_NAME
- .align 5
-FUNC_NAME:
+ .align 3
+UFUNC_NAME:
+ lda sp, -STACK(sp)
+ .frame sp, STACK, retaddr, 0
#ifdef PROF
- lda sp, -0x18(sp)
- stq ra, 0x00(sp)
- stq pv, 0x08(sp)
- stq gp, 0x10(sp)
+ stq ra, 0(sp)
+ stq pv, 8(sp)
+ stq gp, 16(sp)
br AT, 1f
1: ldgp gp, 0(AT)
mov retaddr, ra
- jsr AT, _mcount
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
- ldq ra, 0x00(sp)
- ldq pv, 0x08(sp)
- ldq gp, 0x10(sp)
- lda sp, 0x18(sp)
+ ldq ra, 0(sp)
+ ldq pv, 8(sp)
+ ldq gp, 16(sp)
#endif
- .frame sp, FRAME_SIZE, retaddr, 0
- lda sp,-FRAME_SIZE(sp)
- .prologue 1
- stq arg1,0x00(sp)
- LONGIFYarg1
- stq arg2,0x08(sp)
- LONGIFYarg2
- stq mask,0x10(sp)
- bis zero,1,mask
- stq tmp0,0x18(sp)
- bis zero,zero,quotient
- stq tmp1,0x20(sp)
- beq divisor,$divbyzero
- stq sign,0x28(sp)
- GETSIGN(dividend,divisor,sign)
-#if SIGNED
- subq zero,dividend,tmp0
- subq zero,divisor,tmp1
- cmovlt dividend,tmp0,dividend
- cmovlt divisor,tmp1,divisor
+ .prologue 0
+
+$udiv:
+ stq t0, 0(sp)
+ LONGIFY (arg2, divisor)
+ stq t1, 8(sp)
+ LONGIFY (arg1, modulus)
+ stq v0, 16(sp)
+ clr quotient
+ stq tmp1, 24(sp)
+ ldiq mask, 1
+ DIV_ONLY(stq tmp2,32(sp))
+
+ beq divisor, $divbyzero
+
+ .align 3
+#if SIZE == 8
+ /* Shift divisor left. */
+1: cmpult divisor, modulus, compare
+ blt divisor, 2f
+ addq divisor, divisor, divisor
+ addq mask, mask, mask
+ bne compare, 1b
+ unop
+2:
+#else
+ /* Shift divisor left using 3-bit shifts as we can't overflow.
+ This results in looping three times less here, but up to
+ two more times later. Thus using a large shift isn't worth it. */
+1: cmpult divisor, modulus, compare
+ s8addq divisor, zero, divisor
+ s8addq mask, zero, mask
+ bne compare, 1b
#endif
- /*
- * Shift divisor left until either bit 63 is set or until it
- * is at least as big as the dividend:
- */
- .align 3
-1: cmpule dividend,divisor,AT
- blt divisor,2f
- blbs AT,2f
- addq mask,mask,mask
- addq divisor,divisor,divisor
- br 1b
-
- .align 3
-2: addq mask,quotient,tmp0
- cmpule divisor,dividend,AT
- subq dividend,divisor,tmp1
- srl divisor,1,divisor
- srl mask,1,mask
- cmovlbs AT,tmp0,quotient
- cmovlbs AT,tmp1,dividend
- bne mask,2b
-
- ldq arg1,0x00(sp)
- SETSIGN(sign,result,tmp0)
-$done: ldq arg2,0x08(sp)
- ldq mask,0x10(sp)
- ldq tmp0,0x18(sp)
- ldq tmp1,0x20(sp)
- ldq sign,0x28(sp)
- lda sp,FRAME_SIZE(sp)
- ret zero,(retaddr),0
+
+ /* Now go back to the right. */
+3: DIV_ONLY(addq quotient, mask, tmp2)
+ srl mask, 1, mask
+ cmpule divisor, modulus, compare
+ subq modulus, divisor, tmp1
+ DIV_ONLY(cmovne compare, tmp2, quotient)
+ srl divisor, 1, divisor
+ cmovne compare, tmp1, modulus
+ bne mask, 3b
+
+$done: ldq t0, 0(sp)
+ ldq t1, 8(sp)
+ ldq v0, 16(sp)
+ ldq tmp1, 24(sp)
+ DIV_ONLY(ldq tmp2, 32(sp))
+ lda sp, STACK(sp)
+ ret zero, (retaddr), 1
$divbyzero:
- lda a0,GEN_INTDIV(zero)
+ mov a0, tmp1
+ ldiq a0, GEN_INTDIV
call_pal PAL_gentrap
- bis zero,zero,result /* if trap returns, return 0 */
- ldq arg1,0x00(sp)
+ mov tmp1, a0
+ clr result /* If trap returns, return zero. */
br $done
- END(FUNC_NAME)
+ .end UFUNC_NAME
+
+ .ent SFUNC_NAME
+ .globl SFUNC_NAME
+
+ .align 3
+SFUNC_NAME:
+ lda sp, -STACK(sp)
+ .frame sp, STACK, retaddr, 0
+#ifdef PROF
+ stq ra, 0(sp)
+ stq pv, 8(sp)
+ stq gp, 16(sp)
+
+ br AT, 1f
+1: ldgp gp, 0(AT)
+
+ mov retaddr, ra
+ jsr AT, _mcount
+
+ ldq ra, 0(sp)
+ ldq pv, 8(sp)
+ ldq gp, 16(sp)
+#endif
+ .prologue 0
+
+ or arg1, arg2, AT
+ _SLONGIFY(AT)
+ bge AT, $udiv /* don't need to mess with signs */
+
+ /* Save originals and find absolute values. */
+ stq arg1, 0(sp)
+ NEG (arg1, AT)
+ stq arg2, 8(sp)
+ cmovge AT, AT, arg1
+ stq retaddr, 16(sp)
+ NEG (arg2, AT)
+ stq tmp1, 24(sp)
+ cmovge AT, AT, arg2
+
+ /* Do the unsigned division. */
+ bsr retaddr, UFUNC_NAME
+
+ /* Restore originals and adjust the sign of the result. */
+ ldq arg1, 0(sp)
+ ldq arg2, 8(sp)
+ GETSIGN (AT)
+ NEG (result, tmp1)
+ _SLONGIFY(AT)
+ ldq retaddr, 16(sp)
+ cmovlt AT, tmp1, result
+ ldq tmp1, 24(sp)
+
+ lda sp, STACK(sp)
+ ret zero, (retaddr), 1
+
+ .end SFUNC_NAME
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index b84a51d..959d104 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -27,7 +27,14 @@ architecture. */
.set noat
ENTRY(ffs)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing
addl a0, zero, a0 # the last insn and reduces the stall
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 9777e46..55d4f62 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -19,7 +19,15 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(__htonl)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
+
extlh a0, 5, t1 # t1 = dd000000
zap a0, 0xfd, t2 # t2 = 0000cc00
sll t2, 5, t2 # t2 = 00198000
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index 7717636..743d3e2 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -19,7 +19,15 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(__htons)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
+
extwh a0, 7, t1 # t1 = bb00
extbl a0, 1, v0 # v0 = 00aa
bis v0, t1, v0 # v0 = bbaa
diff --git a/sysdeps/alpha/ldiv.S b/sysdeps/alpha/ldiv.S
new file mode 100644
index 0000000..ebbe055
--- /dev/null
+++ b/sysdeps/alpha/ldiv.S
@@ -0,0 +1,109 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+
+#include <sysdep.h>
+
+#ifdef __linux__
+# include <asm/gentrap.h>
+# include <asm/pal.h>
+#else
+# include <machine/pal.h>
+#endif
+
+ .set noat
+
+ .align 4
+ .globl ldiv
+ .ent ldiv
+ldiv:
+ .frame sp, 0, ra
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+#define dividend t0
+#define divisor t1
+#define mask t2
+#define quotient t3
+#define modulus t4
+#define tmp1 t5
+#define tmp2 t6
+#define compare t7
+
+ /* find correct sign for input to unsigned divide loop. */
+ mov a1, dividend # e0 :
+ mov a2, divisor # .. e1 :
+ negq a1, tmp1 # e0 :
+ negq a2, tmp2 # .. e1 :
+ cmovlt a1, tmp1, dividend # e0 :
+ cmovlt a2, tmp2, divisor # .. e1 :
+ beq a2, $divbyzero # e1 :
+ unop # :
+
+ /* shift divisor left. */
+1: cmpult divisor, modulus, compare # e0 :
+ blt divisor, 2f # .. e1 :
+ addq divisor, divisor, divisor # e0 :
+ addq mask, mask, mask # .. e1 :
+ bne compare, 1b # e1 :
+ unop # :
+
+ /* start to go right again. */
+2: addq quotient, mask, tmp2 # e1 :
+ srl mask, 1, mask # .. e0 :
+ cmpule divisor, modulus, compare # e0 :
+ subq modulus, divisor, tmp1 # .. e1 :
+ cmovne compare, tmp2, quotient # e1 :
+ srl divisor, 1, divisor # .. e0 :
+ cmovne compare, tmp1, modulus # e0 :
+ bne mask, 2b # .. e1 :
+
+ /* find correct sign for result. */
+ xor a1, a2, compare # e0 :
+ negq quotient, tmp1 # .. e1 :
+ negq modulus, tmp2 # e0 :
+ cmovlt compare, tmp1, quotient # .. e1 :
+ cmovlt a1, tmp2, modulus # e1 :
+
+ /* and store it away in the structure. */
+9: stq quotient, 0(a0) # .. e0 :
+ mov a0, v0 # e1 :
+ stq modulus, 8(a0) # .. e0 :
+ ret # e1 :
+
+$divbyzero:
+ mov a0, v0
+ lda a0, GEN_INTDIV
+ call_pal PAL_gentrap
+
+ /* if trap returns, return zero. */
+ stq zero, 0(v0)
+ stq zero, 8(v0)
+ ret
+
+ .end ldiv
+
+weak_alias(ldiv, lldiv)
diff --git a/sysdeps/alpha/lldiv.S b/sysdeps/alpha/lldiv.S
new file mode 100644
index 0000000..80c450a
--- /dev/null
+++ b/sysdeps/alpha/lldiv.S
@@ -0,0 +1 @@
+/* lldiv is the same as ldiv on the Alpha. */
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index a47ac96..ecd26e8 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -40,7 +40,14 @@ For correctness consider that:
.set noat
ENTRY(memchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
beq a2, $not_found
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
diff --git a/sysdeps/alpha/memcpy.S b/sysdeps/alpha/memcpy.S
new file mode 100644
index 0000000..4ee9c11
--- /dev/null
+++ b/sysdeps/alpha/memcpy.S
@@ -0,0 +1,276 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+
+/* This is the child of the C-with-inline-assembly memcpy posted by
+ Martin Ostermann (ost@comnets.rwth-aachen.de).
+
+ This is generally scheduled for the EV5, but whenever necessary and
+ possible, the autoswap slotting feature of the EV5 is used so that the
+ code lays out nicely for the EV4 as well. */
+
+#include <alpha/regdef.h>
+
+ .set noreorder
+
+ .text
+
+ .ent copy_fwd_aligned
+copy_fwd_aligned:
+ .frame sp, 0, ra, 0
+ .prologue 0
+
+ /* Aligned forward copy main loop. On entry to this basic block:
+ t0 == source word waiting to be stored
+ t2 == loop counter
+ a0 == destination pointer
+ a1 == source pointer
+ a2 mod 8 == byte count in final word */
+ .align 4
+$fa_loop:
+ and t2, 7, t1 # e0 :
+ beq t1, 1f # .. e1 :
+
+0: stq_u t0, 0(a0) # e0 :
+ subq t1, 1, t1 # .. e1 :
+ ldq_u t0, 8(a1) # e0 : copy up to seven words
+ addq a0, 8, a0 # .. e1 :
+ addq a1, 8, a1 # e0 :
+ bne t1, 0b # .. e1 :
+
+1: bic t2, 7, t2 # e0 :
+ beq t2, $fa_tail # .. e1 :
+
+2: stq_u t0, 0(a0) # e0 :
+ addq a0, 64, a0 # .. e1 :
+ ldq_u t3, 8(a1) # e0 : copy eight words as fast as we can
+ ldq_u t4, 16(a1) # .. e1 :
+ ldq_u t5, 24(a1) # e0 :
+ ldq_u t6, 32(a1) # .. e1 :
+ ldq_u t7, 40(a1) # e0 :
+ ldq_u t8, 48(a1) # .. e1 :
+ ldq_u t9, 56(a1) # e0 :
+ ldq_u t0, 64(a1) # .. e1 :
+ stq_u t3, -56(a0) # e0 :
+ subq t2, 8, t2 # .. e1 :
+ stq_u t4, -48(a0) # e0 :
+ addq a1, 64, a1 # .. e1 :
+ stq_u t5, -40(a0) # e0 :
+ stq_u t6, -32(a0) # e0 :
+ stq_u t7, -24(a0) # e0 :
+ stq_u t8, -16(a0) # e0 :
+ stq_u t9, -8(a0) # e0 :
+ bne t2, 2b # .. e1 :
+
+ /* Take care of a partial word tail. */
+$fa_tail:
+ and a2, 7, t3 # e0 :
+ bne t3, 1f # .. e1 (zdb)
+
+ /* Aligned copy, aligned tail, final store. */
+ stq_u t0, 0(a0)
+ ret
+
+1: ldq_u t1, 0(a0) # e1 :
+ mskql t0, a2, t0 # .. e1 :
+ mskqh t1, a2, t1 # e0 (stall)
+ bis t0, t1, t0 # e1 :
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+ /* This is the actual entry point to this function. */
+ .align 3
+$fwd_aligned:
+ ldq_u t0, 0(a1) # e0 :
+ and a0, 7, t3 # .. e1 :
+ addq a2, t3, a2 # e0 :
+ subq a2, 1, t2 # e1 :
+ sra t2, 3, t2 # e0 :
+ beq t3, $fa_loop # .. e1 :
+
+ ldq_u t1, 0(a0) # e0 :
+ beq t2, $fa_small # .. e1 :
+ mskqh t0, a0, t0 # e0 :
+ mskql t1, a0, t3 # e0 :
+ bis t0, t3, t0 # e0 :
+ br $fa_loop # .. e1 :
+
+ /* The move affects exactly one destination word. */
+$fa_small:
+ mskqh t0, a0, t0 # e0 :
+ and a2, 7, t4 # .. e1 :
+ mskql t1, a0, t3 # e0 :
+ bne t4, 1f # .. e1 :
+
+ or t0, t3, t0 # e0 :
+ unop # :
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+1: mskql t0, a2, t0 # e0 :
+ mskqh t1, a2, t1 # e0 :
+ or t0, t3, t0 # e0 :
+ or t0, t1, t0 # e1 :
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+ .end copy_fwd_aligned
+
+ .ent memcpy
+ .globl memcpy
+ .align 3
+memcpy:
+ .frame sp, 0, ra, 0
+#ifdef PROF
+ ldgp gp, 0(ra)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ mov a0, v0
+ beq a2, $zero_length
+
+ /* Are source and destination co-aligned? */
+ xor a0, a1, t0
+ unop
+ and t0, 7, t0
+ beq t0, $fwd_aligned
+ br $fwd_unaligned
+
+ .end memcpy
+
+ .ent copy_fwd_unaligned
+copy_fwd_unaligned:
+ .frame sp, 0, ra, 0
+ .prologue 0
+
+ /* Unaligned forward copy main loop. On entry to this basic block:
+ t0 == source low word, unshifted
+ t2 == loop counter
+ t7 == last source byte + 1
+ a0 == destination pointer
+ a1 == source pointer
+ a2 mod 8 == byte count in final word */
+ .align 4
+$fu_loop:
+ beq t2, $fu_tail # e1 :
+ blbc t2, 0f # e1 :
+
+ ldq_u t1, 8(a1) # e1 : copy one unaligned word
+ extql t0, a1, t3 # .. e0 :
+ addq a1, 8, a1 # e0 :
+ addq a0, 8, a0 # .. e1 :
+ extqh t1, a1, t4 # e0 :
+ subq t2, 1, t2 # .. e1 :
+ mov t1, t0 # e0 :
+ or t3, t4, t3 # .. e1 :
+ stq_u t3, -8(a0) # e0 :
+ beq t2, $fu_tail # .. e1 :
+
+0: ldq_u t1, 8(a1) # e1 : copy two unaligned words
+ extql t0, a1, t3 # .. e0 :
+ ldq_u t0, 16(a1) # e0 :
+ subq t2, 2, t2 # .. e1 :
+ extqh t1, a1, t4 # e0 :
+ addq a0, 16, a0 # .. e1 :
+ extql t1, a1, t5 # e0 :
+ or t3, t4, t3 # .. e1 :
+ extqh t0, a1, t6 # e0 :
+ addq a1, 16, a1 # .. e1 :
+ stq_u t3, -16(a0) # e0 :
+ or t5, t6, t5 # .. e1 :
+ stq_u t5, -8(a0) # e0 :
+ bne t2, 0b # .. e1 :
+
+ /* Take care of a partial words tail. */
+$fu_tail:
+ ldq_u t4, -1(t7) # e1 :
+ extql t0, a1, t3 # .. e0 :
+ extqh t4, a1, t4 # e0 (stall)
+ and a2, 7, t5 # .. e1 :
+ or t3, t4, t3 # e0 :
+ beq t5, 1f # .. e1 :
+
+ ldq_u t1, 0(a0) # e1 :
+ mskql t3, a2, t3 # .. e0 :
+ mskqh t1, a2, t1 # e0 (stall)
+ or t1, t3, t3 # e1 :
+
+1: stq_u t3, 0(a0) # e0 :
+ ret # .. e1 :
+
+ /* The entry point to the unaligned forward copy. */
+ .align 3
+$fwd_unaligned:
+ ldq_u t0, 0(a1) # e0 : load initial bits of src
+ addq a1, a2, t7 # .. e1 : record last byte + 1 of src
+ and a0, 7, t3 # e0 : find dst misalignment
+ addq a2, t3, a2 # e1 : find number of words affected
+ subq a2, 1, t2 # e0 :
+ cmple a2, 8, t4 # .. e1 : are we dealing with a small block?
+ subq a1, t3, a1 # e0 :
+ bne t4, $fu_small # .. e1 :
+ srl t2, 3, t2 # e0 :
+ beq t3, $fu_loop # .. e1 :
+
+ /* Take care of an unaligned dst head. */
+ ldq_u t5, 0(a0) # e0 :
+ ldq_u t1, 8(a1) # .. e1 :
+ extql t0, a1, t3 # e0 :
+ addq a0, 8, a0 # .. e1 :
+ extqh t1, a1, t4 # e0 :
+ addq a1, 8, a1 # .. e1 :
+ mskql t5, a0, t5 # e0 :
+ or t3, t4, t3 # .. e1 :
+ mskqh t3, a0, t3 # e0 :
+ subq t2, 1, t2 # .. e1 :
+ or t3, t5, t3 # e0 :
+ mov t1, t0 # .. e1 :
+ stq_u t3, -8(a0) # e0 :
+ br $fu_loop # .. e1 :
+
+ /* The move affects exactly one destination word. */
+ .align 3
+$fu_small:
+ ldq_u t2, 0(a0) # e1 :
+ extql t0, a1, t3 # .. e0 :
+ ldq_u t1, -1(t7) # e0 :
+ and a2, 7, t8 # .. e1 :
+ mskqh t2, a2, t6 # e0 :
+ mskql t2, a0, t5 # e0 :
+ extqh t1, a1, t4 # e0 :
+ cmovne t8, t6, t8 # .. e1 :
+ or t3, t4, t3 # e0 :
+ or t5, t8, t5 # .. e1 :
+ mskqh t3, a0, t3 # e0 :
+ and a2, 7, t8 # .. e1 :
+ mskql t3, a2, t6 # e0 :
+ cmovne t8, t6, t8 # e1 :
+ or t3, t5, t3 # e0 :
+ unop # :
+ stq_u t3, 0(a0) # e0 :
+
+$zero_length:
+ ret # .. e1 :
+
+ .end copy_fwd_unaligned
diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S
index 55271f0..2b29357 100644
--- a/sysdeps/alpha/memset.S
+++ b/sysdeps/alpha/memset.S
@@ -85,7 +85,14 @@ $tail: bne t4, 1f # is there a tail to do?
.end memset_loop
ENTRY(memset)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
zapnot a1, 1, a1 # e0 : zero extend input character
mov a0, v0 # .. e1 : move return value in place
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index b631a02..8c00365 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -1,6 +1,6 @@
#define IS_REM 1
#define SIZE 4
-#define SIGNED 1
-#define FUNC_NAME __reml
+#define UFUNC_NAME __remlu
+#define SFUNC_NAME __reml
#include "divrem.h"
diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S
deleted file mode 100644
index 8d527e4..0000000
--- a/sysdeps/alpha/remlu.S
+++ /dev/null
@@ -1,6 +0,0 @@
-#define IS_REM 1
-#define SIZE 4
-#define SIGNED 0
-#define FUNC_NAME __remlu
-
-#include "divrem.h"
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index 8bd9f33..cd1064a 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -1,6 +1,6 @@
#define IS_REM 1
#define SIZE 8
-#define SIGNED 1
-#define FUNC_NAME __remq
+#define UFUNC_NAME __remqu
+#define SFUNC_NAME __remq
#include "divrem.h"
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
deleted file mode 100644
index 14a7486..0000000
--- a/sysdeps/alpha/remqu.S
+++ /dev/null
@@ -1,6 +0,0 @@
-#define IS_REM 1
-#define SIZE 8
-#define SIGNED 0
-#define FUNC_NAME __remqu
-
-#include "divrem.h"
diff --git a/sysdeps/alpha/s_copysign.S b/sysdeps/alpha/s_copysign.S
index 95eb608..739d3de 100644
--- a/sysdeps/alpha/s_copysign.S
+++ b/sysdeps/alpha/s_copysign.S
@@ -20,7 +20,15 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(__copysign)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
+
cpys $f17,$f16,$f0
ret
diff --git a/sysdeps/alpha/s_fabs.S b/sysdeps/alpha/s_fabs.S
index 12c0abd..7597633 100644
--- a/sysdeps/alpha/s_fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -20,7 +20,15 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(__fabs)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
+
cpys $f31,$f16,$f0
ret
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 59929a0..f57d490 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -23,6 +23,10 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__sigsetjmp)
ldgp $29, 0($27)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
bis $30, $30, $18 /* Pass SP as 3rd arg. */
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
index 0dc44d3..9c2668b 100644
--- a/sysdeps/alpha/stpcpy.S
+++ b/sysdeps/alpha/stpcpy.S
@@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(__stpcpy)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
jsr t9, __stxcpy # do the work of the copy
diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S
index 50cda26..90470cf 100644
--- a/sysdeps/alpha/stpncpy.S
+++ b/sysdeps/alpha/stpncpy.S
@@ -1,24 +1,23 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Copy no more than COUNT bytes of the null-terminated string from
+/* Copy no more than COUNT bytes of the null-terminated string from
SRC to DST. If SRC does not cover all of COUNT, the balance is
zeroed. Return the address of the terminating null in DEST, if
any, else DEST + COUNT. */
@@ -32,8 +31,12 @@ Cambridge, MA 02139, USA. */
ENTRY(__stpncpy)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
-
+
beq a2, $zerocount
jsr t9, __stxncpy # do the work of the copy
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
index d3afff3..e57259f 100644
--- a/sysdeps/alpha/strcat.S
+++ b/sysdeps/alpha/strcat.S
@@ -1,22 +1,21 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Append a null-terminated string from SRC to DST. */
@@ -26,6 +25,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strcat)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
mov a0, v0 # set up return value
@@ -59,7 +62,7 @@ $found: negq t1, t2 # clear all but least set bit
addq a0, t2, a0
/* Now do the append. */
-
+
jsr t9, __stxcpy
ret
diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S
index c26a843..e35b44a 100644
--- a/sysdeps/alpha/strchr.S
+++ b/sysdeps/alpha/strchr.S
@@ -1,25 +1,24 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
Contributed by Richard Henderson (rth@tamu.edu)
-This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* Return the address of a given character within a null-terminated
- string, or null if it is not found.
+ string, or null if it is not found.
This is generally scheduled for the EV5 (got to look out for my own
interests :-), but with EV4 needs in mind. There *should* be no more
@@ -32,7 +31,14 @@ Cambridge, MA 02139, USA. */
.set noat
ENTRY(strchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
zapnot a1, 1, a1 # e0 : zero extend the search character
ldq_u t0, 0(a0) # .. e1 : load first quadword
diff --git a/sysdeps/alpha/strcmp.S b/sysdeps/alpha/strcmp.S
new file mode 100644
index 0000000..7dcae04
--- /dev/null
+++ b/sysdeps/alpha/strcmp.S
@@ -0,0 +1,195 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+/* Bytewise compare two null-terminated strings. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+ENTRY(strcmp)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jmp AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ ldq_u t0, 0(a0) # e0 : give cache time to catch up
+ xor a0, a1, t2 # .. e1 : are s1 and s2 co-aligned?
+ ldq_u t1, 0(a1) # e0 :
+ and t2, 7, t2 # .. e1 :
+ lda t3, -1 # e0 :
+ bne t2, $unaligned # .. e1 :
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == the first source word.
+ t3 == -1. */
+
+$aligned:
+ mskqh t3, a0, t3 # e0 :
+ nop # .. e1 :
+ ornot t1, t3, t1 # e0 :
+ ornot t0, t3, t0 # .. e1 :
+ cmpbge zero, t1, t7 # e0 : bits set iff null found
+ bne t7, $eos # e1 (zdb)
+
+ /* Aligned compare main loop.
+ On entry to this basic block:
+ t0 == an s1 word.
+ t1 == an s2 word not containing a null. */
+
+$a_loop:
+ xor t0, t1, t2 # e0 :
+ bne t2, $wordcmp # .. e1 (zdb)
+ ldq_u t1, 8(a1) # e0 :
+ ldq_u t0, 8(a0) # .. e1 :
+ addq a1, 8, a1 # e0 :
+ addq a0, 8, a0 # .. e1 :
+ cmpbge zero, t1, t7 # e0 :
+ beq t7, $a_loop # .. e1 (zdb)
+ br $eos # e1 :
+
+ /* The two strings are not co-aligned. Align s1 and cope. */
+
+$unaligned:
+ and a0, 7, t4 # e0 : find s1 misalignment
+ and a1, 7, t5 # .. e1 : find s2 misalignment
+ subq a1, t4, a1 # e0 :
+
+ /* If s2 misalignment is larger than s2 misalignment, we need
+ extra startup checks to avoid SEGV. */
+
+ cmplt t4, t5, t8 # .. e1 :
+ beq t8, $u_head # e1 :
+
+ mskqh t3, t5, t3 # e0 :
+ ornot t1, t3, t3 # e0 :
+ cmpbge zero, t3, t7 # e1 : is there a zero?
+ beq t7, $u_head # e1 :
+
+ /* We've found a zero in the first partial word of s2. Align
+ our current s1 and s2 words and compare what we've got. */
+
+ extql t1, t5, t1 # e0 :
+ extql t0, a0, t0 # e0 :
+ cmpbge zero, t1, t7 # .. e1 : find that zero again
+ br $eos # e1 : and finish up
+
+ .align 3
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full word of s2. We can still find a zero at the end of it.
+
+ On entry to this basic block:
+ t0 == first word of s1
+ t1 == first partial word of s2. */
+
+ ldq_u t2, 8(a1) # e0 : load second partial s2 word
+ lda t3, -1 # .. e1 : create leading garbage mask
+ extql t1, a1, t1 # e0 : create first s2 word
+ mskqh t3, a0, t3 # e0 :
+ extqh t2, a1, t4 # e0 :
+ ornot t0, t3, t0 # .. e1 : kill s1 garbage
+ or t1, t4, t1 # e0 : s2 word now complete
+ cmpbge zero, t0, t7 # .. e1 : find zero in first s1 word
+ ornot t1, t3, t1 # e0 : kill s2 garbage
+ lda t3, -1 # .. e1 :
+ mskql t3, a1, t3 # e0 : mask for s2[1] bits we have seen
+ bne t7, $eos # .. e1 :
+ xor t0, t1, t4 # e0 : compare aligned words
+ bne t4, $wordcmp # .. e1 (zdb)
+ or t2, t3, t3 # e0 :
+ cmpbge zero, t3, t7 # e1 :
+ bne t7, $u_final # e1 :
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned words from s2.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t2 == the unshifted low-bits from the next s2 word. */
+
+ .align 3
+$u_loop:
+ extql t2, a1, t3 # e0 :
+ ldq_u t2, 16(a1) # .. e1 : load next s2 high bits
+ ldq_u t0, 8(a0) # e0 : load next s1 word
+ addq a1, 8, a1 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ nop # .. e1 :
+ extqh t2, a1, t1 # e0 :
+ cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word
+ or t1, t3, t1 # e0 :
+ bne t7, $eos # .. e1 :
+ xor t0, t1, t4 # e0 : compare the words
+ bne t4, $wordcmp # .. e1 (zdb)
+ cmpbge zero, t2, t4 # e0 : find zero in next low bits
+ beq t4, $u_loop # .. e1 (zdb)
+
+ /* We've found a zero in the low bits of the last s2 word. Get
+ the next s1 word and align them. */
+$u_final:
+ ldq_u t0, 8(a0) # e1 :
+ extql t2, a1, t1 # .. e0 :
+ cmpbge zero, t1, t7 # e0 :
+
+ /* We've found a zero somewhere in a word we just read.
+ On entry to this basic block:
+ t0 == s1 word
+ t1 == s2 word
+ t7 == cmpbge mask containing the zero. */
+
+ .align 3
+$eos:
+ negq t7, t6 # e0 : create bytemask of valid data
+ and t6, t7, t8 # e1 :
+ subq t8, 1, t6 # e0 :
+ or t6, t8, t7 # e1 :
+ zapnot t0, t7, t0 # e0 : kill the garbage
+ zapnot t1, t7, t1 # .. e1 :
+ xor t0, t1, v0 # e0 : and compare
+ beq v0, $done # .. e1 :
+
+ /* Here we have two differing co-aligned words in t0 & t1.
+ Bytewise compare them and return (t0 > t1 ? 1 : -1). */
+$wordcmp:
+ cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge
+ cmpbge t1, t0, t3 # .. e1 :
+ xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ
+ negq t0, t1 # e1 : clear all but least bit
+ and t0, t1, t0 # e0 :
+ lda v0, -1 # .. e1 :
+ and t0, t2, t1 # e0 : was bit set in t0 > t1?
+ cmovne t1, 1, v0 # .. e1 (zdb)
+
+$done:
+ ret # e1 :
+
+ END(strcmp)
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
index 2975181..823476f 100644
--- a/sysdeps/alpha/strcpy.S
+++ b/sysdeps/alpha/strcpy.S
@@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strcpy)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
mov a0, v0 # set up return value
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 9eab707..026c8ad 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -34,6 +34,15 @@ Cambridge, MA 02139, USA. */
.set noat
ENTRY(strlen)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
lda t1, -1(zero)
insqh t1, a0, t1
diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S
index d502037..089fba3 100644
--- a/sysdeps/alpha/strncat.S
+++ b/sysdeps/alpha/strncat.S
@@ -27,6 +27,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strncat)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
mov a0, v0 # set up return value
diff --git a/sysdeps/alpha/strncmp.S b/sysdeps/alpha/strncmp.S
new file mode 100644
index 0000000..6827590
--- /dev/null
+++ b/sysdeps/alpha/strncmp.S
@@ -0,0 +1,224 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+/* Bytewise compare two null-terminated strings of length no longer than N. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+ENTRY(strncmp)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
+ .prologue 0
+#endif
+
+ xor a0, a1, t2 # e0 : are s1 and s2 co-aligned?
+ beq a2, $zerolength # .. e1 :
+ ldq_u t0, 0(a0) # e0 : give cache time to catch up
+ ldq_u t1, 0(a1) # .. e1 :
+ and t2, 7, t2 # e0 :
+ and a0, 7, t4 # .. e1 : find s1 misalignment
+ lda t3, -1 # e0 :
+ addq a2, t4, a2 # .. e1 : bias count by s1 misalignment
+ and a2, 7, t10 # e1 : ofs of last byte in last word
+ srl a2, 3, a2 # .. e0 : remaining full words in count
+ and a1, 7, t5 # e0 : find s2 misalignment
+ bne t2, $unaligned # .. e1 :
+
+ /* On entry to this basic block:
+ t0 == the first word of s1.
+ t1 == the first word of s2.
+ t3 == -1. */
+
+$aligned:
+ mskqh t3, a1, t3 # e0 : mask off leading garbage
+ nop # .. e1 :
+ ornot t1, t3, t1 # e0 :
+ ornot t0, t3, t0 # .. e1 :
+ cmpbge zero, t1, t7 # e0 : bits set iff null found
+ beq a2, $eoc # .. e1 : check end of count
+ unop # :
+ bne t7, $eos # e1 :
+
+ /* Aligned compare main loop.
+ On entry to this basic block:
+ t0 == an s1 word.
+ t1 == an s2 word not containing a null. */
+
+$a_loop:
+ xor t0, t1, t2 # e0 :
+ bne t2, $wordcmp # .. e1 (zdb)
+ ldq_u t1, 0(a1) # e0 :
+ ldq_u t0, 0(a0) # .. e1 :
+ addq a1, 8, a1 # e0 :
+ addq a0, 8, a0 # .. e1 :
+ cmpbge zero, t1, t7 # e0 :
+ beq a2, $eoc # .. e1 :
+ subq a2, 1, a2 # e0 :
+ beq t7, $a_loop # .. e1 :
+ br $eos # e1 :
+
+ /* The two strings are not co-aligned. Align s1 and cope. */
+$unaligned:
+ subq a1, t4, a1 # e0 :
+ unop # :
+
+ /* If s2 misalignment is larger than s2 misalignment, we need
+ extra startup checks to avoid SEGV. */
+
+ cmplt t4, t5, t8 # .. e1 :
+ beq t8, $u_head # e1 :
+
+ mskqh t3, t5, t3 # e0 :
+ ornot t1, t3, t3 # e0 :
+ cmpbge zero, t3, t7 # e1 : is there a zero?
+ beq t7, $u_head # e1 :
+
+ /* We've found a zero in the first partial word of s2. Align
+ our current s1 and s2 words and compare what we've got. */
+
+ extql t1, t5, t1 # e0 :
+ lda t3, -1 # .. e1 :
+ insql t1, a0, t1 # e0 :
+ mskqh t3, a0, t3 # e0 :
+ ornot t1, t3, t1 # e0 :
+ ornot t0, t3, t0 # .. e1 :
+ cmpbge zero, t1, t7 # e0 : find that zero again
+ beq a2, $eoc # .. e1 : and finish up
+ br $eos # e1 :
+
+ .align 3
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full word of s2. We can still find a zero at the end of it.
+
+ On entry to this basic block:
+ t0 == first word of s1
+ t1 == first partial word of s2. */
+
+ ldq_u t2, 8(a1) # e0 : load second partial s2 word
+ lda t3, -1 # .. e1 : create leading garbage mask
+ extql t1, a1, t1 # e0 : create first s2 word
+ mskqh t3, a0, t3 # e0 :
+ extqh t2, a1, t4 # e0 :
+ ornot t0, t3, t0 # .. e1 : kill s1 garbage
+ or t1, t4, t1 # e0 : s2 word now complete
+ ornot t1, t3, t1 # e1 : kill s2 garbage
+ cmpbge zero, t0, t7 # e0 : find zero in first s1 word
+ beq a2, $eoc # .. e1 :
+ lda t3, -1 # e0 :
+ bne t7, $eos # .. e1 :
+ subq a2, 1, a2 # e0 :
+ xor t0, t1, t4 # .. e1 : compare aligned words
+ mskql t3, a1, t3 # e0 : mask out s2[1] bits we have seen
+ bne t4, $wordcmp # .. e1 :
+ or t2, t3, t3 # e0 :
+ cmpbge zero, t3, t7 # e1 : find zero in high bits of s2[1]
+ bne t7, $u_final # e1 :
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned words from s2.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t2 == the unshifted low-bits from the next s2 word. */
+
+ .align 3
+$u_loop:
+ extql t2, a1, t3 # e0 :
+ ldq_u t2, 16(a1) # .. e1 : load next s2 high bits
+ ldq_u t0, 8(a0) # e0 : load next s1 word
+ addq a1, 8, a1 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ nop # .. e1 :
+ extqh t2, a1, t1 # e0 :
+ cmpbge zero, t0, t7 # .. e1 : find zero in current s1 word
+ or t1, t3, t1 # e0 :
+ beq a2, $eoc # .. e1 : check for end of count
+ subq a2, 1, a2 # e0 :
+ bne t7, $eos # .. e1 :
+ xor t0, t1, t4 # e0 : compare the words
+ bne t4, $wordcmp # .. e1 (zdb)
+ cmpbge zero, t2, t4 # e0 : find zero in next low bits
+ beq t4, $u_loop # .. e1 (zdb)
+
+ /* We've found a zero in the low bits of the last s2 word. Get
+ the next s1 word and align them. */
+$u_final:
+ ldq_u t0, 8(a0) # e1 :
+ extql t2, a1, t1 # .. e0 :
+ cmpbge zero, t1, t7 # e0 :
+ bne a2, $eos # .. e1 :
+
+ /* We've hit end of count. Zero everything after the count
+ and compare whats left. */
+
+ .align 3
+$eoc:
+ mskql t0, t10, t0
+ mskql t1, t10, t1
+
+ /* We've found a zero somewhere in a word we just read.
+ On entry to this basic block:
+ t0 == s1 word
+ t1 == s2 word
+ t7 == cmpbge mask containing the zero. */
+
+$eos:
+ negq t7, t6 # e0 : create bytemask of valid data
+ and t6, t7, t8 # e1 :
+ subq t8, 1, t6 # e0 :
+ or t6, t8, t7 # e1 :
+ zapnot t0, t7, t0 # e0 : kill the garbage
+ zapnot t1, t7, t1 # .. e1 :
+ xor t0, t1, v0 # e0 : and compare
+ beq v0, $done # .. e1 :
+
+ /* Here we have two differing co-aligned words in t0 & t1.
+ Bytewise compare them and return (t0 > t1 ? 1 : -1). */
+$wordcmp:
+ cmpbge t0, t1, t2 # e0 : comparison yields bit mask of ge
+ cmpbge t1, t0, t3 # .. e1 :
+ xor t2, t3, t0 # e0 : bits set iff t0/t1 bytes differ
+ negq t0, t1 # e1 : clear all but least bit
+ and t0, t1, t0 # e0 :
+ lda v0, -1 # .. e1 :
+ and t0, t2, t1 # e0 : was bit set in t0 > t1?
+ cmovne t1, 1, v0 # .. e1 (zdb)
+
+$done:
+ ret # e1 :
+
+$zerolength:
+ clr v0
+ ret
+
+ END(strncmp)
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
index e13769c..c077ab3 100644
--- a/sysdeps/alpha/strncpy.S
+++ b/sysdeps/alpha/strncpy.S
@@ -31,6 +31,10 @@ Cambridge, MA 02139, USA. */
ENTRY(strncpy)
ldgp gp, 0(pv)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
.prologue 1
mov a0, v0 # set return value now
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
index 464f754..02f37f5 100644
--- a/sysdeps/alpha/strrchr.S
+++ b/sysdeps/alpha/strrchr.S
@@ -31,7 +31,14 @@ Cambridge, MA 02139, USA. */
.set noat
ENTRY(strrchr)
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
zapnot a1, 1, a1 # e0 : zero extend our test character
mov zero, t6 # .. e1 : t6 is last match aligned addr
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index eb134f2..75d1182 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -27,8 +27,15 @@
.text
LEAF(__udiv_qrnnd, 0)
-
+#ifdef PROF
+ ldgp gp, 0(pv)
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+ .prologue 1
+#else
.prologue 0
+#endif
+
#define cnt $2
#define tmp $3
#define rem_ptr $16
@@ -38,9 +45,9 @@ LEAF(__udiv_qrnnd, 0)
#define qb $20
ldiq cnt,16
- blt d,.Largedivisor
+ blt d,$largedivisor
-.Loop1: cmplt n0,0,tmp
+$loop1: cmplt n0,0,tmp
addq n1,n1,n1
bis n1,tmp,n1
addq n0,n0,n0
@@ -73,12 +80,12 @@ LEAF(__udiv_qrnnd, 0)
cmovne qb,tmp,n1
bis n0,qb,n0
subq cnt,1,cnt
- bgt cnt,.Loop1
+ bgt cnt,$loop1
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
-.Largedivisor:
+$largedivisor:
and n0,1,$4
srl n0,1,n0
@@ -90,7 +97,7 @@ LEAF(__udiv_qrnnd, 0)
srl d,1,$5
addq $5,$6,$5
-.Loop2: cmplt n0,0,tmp
+$loop2: cmplt n0,0,tmp
addq n1,n1,n1
bis n1,tmp,n1
addq n0,n0,n0
@@ -123,27 +130,30 @@ LEAF(__udiv_qrnnd, 0)
cmovne qb,tmp,n1
bis n0,qb,n0
subq cnt,1,cnt
- bgt cnt,.Loop2
+ bgt cnt,$loop2
addq n1,n1,n1
addq $4,n1,n1
- bne $6,.LOdd
+ bne $6,$Odd
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
-.LOdd:
+$Odd:
/* q' in n0. r' in n1 */
addq n1,n0,n1
+
cmpult n1,n0,tmp # tmp := carry from addq
- beq tmp,.LLp6
- addq n0,1,n0
- subq n1,d,n1
-.LLp6: cmpult n1,d,tmp
- bne tmp,.LLp7
- addq n0,1,n0
- subq n1,d,n1
-.LLp7:
+ subq n1,d,AT
+ addq n0,tmp,n0
+ cmovne tmp,AT,n1
+
+ cmpult n1,d,tmp
+ addq n0,1,AT
+ cmoveq tmp,AT,n0
+ subq n1,d,AT
+ cmoveq tmp,AT,n1
+
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
diff --git a/sysdeps/alpha/w_sqrt.S b/sysdeps/alpha/w_sqrt.S
new file mode 100644
index 0000000..b5c980e
--- /dev/null
+++ b/sysdeps/alpha/w_sqrt.S
@@ -0,0 +1,161 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+ Based on public-domain C source by Linus Torvalds.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+/* This version is much faster than generic sqrt implementation, but
+ it doesn't handle exceptional values or the inexact flag. Don't use
+ this if _IEEE_FP or _IEEE_FP_INEXACT is in effect. */
+
+#ifndef _IEEE_FP
+
+#include <errnos.h>
+#include <sysdep.h>
+
+ .set noreorder
+
+#ifdef __ELF__
+ .section .rodata
+#else
+ .rdata
+#endif
+ .align 5 # align to cache line
+
+ /* Do all memory accesses relative to sqrtdata. */
+sqrtdata:
+
+#define DN 0x00
+#define UP 0x08
+#define HALF 0x10
+#define ALMOST_THREE_HALF 0x18
+#define T2 0x20
+
+ .quad 0x3fefffffffffffff /* DN = next(1.0) */
+ .quad 0x3ff0000000000001 /* UP = prev(1.0) */
+ .quad 0x3fe0000000000000 /* HALF = 0.5 */
+ .quad 0x3ff7ffffffc00000 /* ALMOST_THREE_HALF = 1.5-2^-30 */
+
+/* table T2: */
+.long 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866
+.long 0xf14a, 0x1091b, 0x11fcd, 0x13552, 0x14999, 0x15c98, 0x16e34, 0x17e5f
+.long 0x18d03, 0x19a01, 0x1a545, 0x1ae8a, 0x1b5c4, 0x1bb01, 0x1bfde, 0x1c28d
+.long 0x1c2de, 0x1c0db, 0x1ba73, 0x1b11c, 0x1a4b5, 0x1953d, 0x18266, 0x16be0
+.long 0x1683e, 0x179d8, 0x18a4d, 0x19992, 0x1a789, 0x1b445, 0x1bf61, 0x1c989
+.long 0x1d16d, 0x1d77b, 0x1dddf, 0x1e2ad, 0x1e5bf, 0x1e6e8, 0x1e654, 0x1e3cd
+.long 0x1df2a, 0x1d635, 0x1cb16, 0x1be2c, 0x1ae4e, 0x19bde, 0x1868e, 0x16e2e
+.long 0x1527f, 0x1334a, 0x11051, 0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd
+
+/*
+ * Stack variables:
+ */
+#define K 16(sp)
+#define Y 24(sp)
+#define FSIZE 32
+
+ .text
+
+LEAF(__sqrt, FSIZE)
+ lda sp, -FSIZE(sp)
+ ldgp gp, .-__sqrt(pv)
+ stq ra, 0(sp)
+#ifdef PROF
+ lda AT, _mcount
+ jsr AT, (AT), _mcount
+#endif
+ .prologue 1
+
+ stt $f16, K
+ lda t3, sqrtdata # load base address into t3
+
+ fblt $f16, $negative
+
+ /* Compute initial guess. */
+
+ .align 3
+
+ ldah t1, 0x5fe8 # e0 :
+ ldq t2, K # .. e1 :
+ ldt $f12, HALF(t3) # e0 :
+ ldt $f18, ALMOST_THREE_HALF(t3) # .. e1 :
+ srl t2, 33, t0 # e0 :
+ mult $f16, $f12, $f11 # .. fm : $f11 = x * 0.5
+ subl t1, t0, t1 # e0 :
+ addt $f12, $f12, $f17 # .. fa : $f17 = 1.0
+ srl t1, 12, t0 # e0 :
+ and t0, 0xfc, t0 # .. e1 :
+ addq t0, t3, t0 # e0 :
+ ldl t0, T2(t0) # .. e1 :
+ addt $f12, $f17, $f15 # fa : $f15 = 1.5
+ subl t1, t0, t1 # .. e1 :
+ sll t1, 32, t1 # e0 :
+ ldt $f14, DN(t3) # .. e1 :
+ stq t1, Y # e0 :
+ ldt $f13, Y # e1 :
+ addq sp, FSIZE, sp # e0 :
+
+ mult $f11, $f13, $f10 # fm : $f10 = (x * 0.5) * y
+ mult $f10, $f13, $f10 # fm : $f10 = ((x * 0.5) * y) * y
+ subt $f15, $f10, $f1 # fa : $f1 = (1.5 - 0.5*x*y*y)
+ mult $f13, $f1, $f13 # fm : yp = y*(1.5 - 0.5*x*y*y)
+ mult $f11, $f13, $f11 # fm : $f11 = x * 0.5 * yp
+ mult $f11, $f13, $f11 # fm : $f11 = (x * 0.5 * yp) * yp
+ subt $f18, $f11, $f1 # fa : $f1= (1.5-2^-30) - 0.5*x*yp*yp
+ mult $f13, $f1, $f13 # fm : ypp = $f13 = yp*$f1
+ subt $f15, $f12, $f1 # fa : $f1 = (1.5 - 0.5)
+ ldt $f15, UP(t3) # .. e1 :
+ mult $f16, $f13, $f10 # fm : z = $f10 = x * ypp
+ mult $f10, $f13, $f11 # fm : $f11 = z*ypp
+ mult $f10, $f12, $f12 # fm : $f12 = z*0.5
+ subt $f1, $f11, $f1 # .. fa : $f1 = 1 - z*ypp
+ mult $f12, $f1, $f12 # fm : $f12 = z*0.5*(1 - z*ypp)
+ addt $f10, $f12, $f0 # fa : zp=res=$f0= z + z*0.5*(1 - z*ypp)
+
+ mult/c $f0, $f14, $f12 # fm : zmi = zp * DN
+ mult/c $f0, $f15, $f11 # fm : zpl = zp * UP
+ mult/c $f0, $f12, $f1 # fm : $f1 = zp * zmi
+ mult/c $f0, $f11, $f15 # fm : $f15 = zp * zpl
+
+ subt $f1, $f16, $f13 # fa : y1 = zp*zmi - x
+ subt $f15, $f16, $f15 # fa : y2 = zp*zpl - x
+
+ fcmovge $f13, $f12, $f0 # res = (y1 >= 0) ? zmi : res
+ fcmovlt $f15, $f11, $f0 # res = (y2 < 0) ? zpl : res
+
+ ret
+
+$negative:
+ lda t1, -1
+ stq t1, K
+ lda t1, EDOM
+ stl t1, errno
+#ifdef _LIBC_REENTRANT
+ jsr ra, __errno_location
+ lda t1, -1
+ ldq ra, 0(sp)
+ stl t1, 0(v0)
+#endif
+ ldt $f0, K # res = (double) 0xffffffffffffffff
+ addq sp, FSIZE, sp
+ ret
+
+ END(__sqrt)
+
+weak_alias(__sqrt, sqrt)
+
+#endif /* !_IEEE_FP */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbb7824d085626bf901805035ce5170f16147a96
commit cbb7824d085626bf901805035ce5170f16147a96
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Nov 2 01:27:41 1996 +0000
update from main archive 961101
diff --git a/sysdeps/unix/sysv/linux/alpha/timebits.h b/sysdeps/unix/sysv/linux/alpha/timebits.h
new file mode 100644
index 0000000..f777dc2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/timebits.h
@@ -0,0 +1,41 @@
+/* System-dependent timing definitions. Linux/Alpha version.
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+/* A time value that is accurate to the nearest
+ microsecond but also has a range of years. */
+struct timeval
+ {
+ int tv_sec; /* Seconds. */
+ int tv_usec; /* Microseconds. */
+ };
+# endif /* struct timeval */
+#endif /* need timeval */
+
+
+#ifndef _TIMEBITS_H
+#define _TIMEBITS_H 1
+
+#include <asm/param.h>
+#define CLOCKS_PER_SEC HZ /* XXX names not kosher */
+
+#endif /* timebits.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a42778ef73fa72f352f5401218eb60637bb5630b
commit a42778ef73fa72f352f5401218eb60637bb5630b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 31 03:00:56 1996 +0000
Linux specific version is enough
diff --git a/sysdeps/unix/sysv/linux/alpha/resourcebits.h b/sysdeps/unix/sysv/linux/alpha/resourcebits.h
deleted file mode 100644
index a53d523..0000000
--- a/sysdeps/unix/sysv/linux/alpha/resourcebits.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Bit values for resource limits. Linux/Alpha version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* These are the values for Linux/Alpha. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
- {
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU,
-#define RLIMIT_CPU RLIMIT_CPU
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA,
-#define RLIMIT_DATA RLIMIT_DATA
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK,
-#define RLIMIT_STACK RLIMIT_STACK
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE,
-#define RLIMIT_CORE RLIMIT_CORE
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS,
-#define RLIMIT_RSS RLIMIT_RSS
- /* Number of open files. */
- RLIMIT_OFILE,
-#define RLIMIT_OFILE RLIMIT_OFILE
- RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
- /* Address space limit. */
- RLIMIT_AS,
-#define RLIMIT_AS RLIMIT_AS
- /* Number of processes. */
- RLIMIT_NPROC,
-#define RLIMIT_NPROC RLIMIT_NPROC
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- RLIMIT_NLIMITS, /* Number of limit flavors. */
- RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
- };
diff --git a/sysdeps/unix/sysv/linux/m68k/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h
deleted file mode 100644
index d2f2dae..0000000
--- a/sysdeps/unix/sysv/linux/m68k/resourcebits.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Bit values for resource limits. Linux/m68k version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* These are the values for Linux/m68k. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
- {
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU,
-#define RLIMIT_CPU RLIMIT_CPU
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA,
-#define RLIMIT_DATA RLIMIT_DATA
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK,
-#define RLIMIT_STACK RLIMIT_STACK
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE,
-#define RLIMIT_CORE RLIMIT_CORE
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS,
-#define RLIMIT_RSS RLIMIT_RSS
- /* Number of processes. */
- RLIMIT_NPROC,
-#define RLIMIT_NPROC RLIMIT_NPROC
- /* Number of open files. */
- RLIMIT_OFILE,
-#define RLIMIT_OFILE RLIMIT_OFILE
- RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- /* Address space limit. */
- RLIMIT_AS,
-#define RLIMIT_AS RLIMIT_AS
-
- RLIMIT_NLIMITS, /* Number of limit flavors. */
- RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
- };
diff --git a/sysdeps/unix/sysv/linux/mips/resourcebits.h b/sysdeps/unix/sysv/linux/mips/resourcebits.h
deleted file mode 100644
index 095f40b..0000000
--- a/sysdeps/unix/sysv/linux/mips/resourcebits.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Bit values for resource limits. Linux/MIPS version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* These are the values for Linux/MIPS. */
-
-/* Kinds of resource limit. */
-enum __rlimit_resource
- {
- /* Per-process CPU limit, in seconds. */
- RLIMIT_CPU,
-#define RLIMIT_CPU RLIMIT_CPU
- /* Largest file that can be created, in bytes. */
- RLIMIT_FSIZE,
-#define RLIMIT_FSIZE RLIMIT_FSIZE
- /* Maximum size of data segment, in bytes. */
- RLIMIT_DATA,
-#define RLIMIT_DATA RLIMIT_DATA
- /* Maximum size of stack segment, in bytes. */
- RLIMIT_STACK,
-#define RLIMIT_STACK RLIMIT_STACK
- /* Largest core file that can be created, in bytes. */
- RLIMIT_CORE,
-#define RLIMIT_CORE RLIMIT_CORE
- /* Number of open files. */
- RLIMIT_OFILE,
-#define RLIMIT_OFILE RLIMIT_OFILE
- RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
-#define RLIMIT_NOFILE RLIMIT_NOFILE
- /* Address space limit. */
- RLIMIT_AS,
-#define RLIMIT_AS RLIMIT_AS
- RLIMIT_VMEM = RLIMIT_AS,
-#define RLIMIT_VMEM RLIMIT_VMEM
- /* Largest resident set size, in bytes.
- This affects swapping; processes that are exceeding their
- resident set size will be more likely to have physical memory
- taken from them. */
- RLIMIT_RSS,
-#define RLIMIT_RSS RLIMIT_RSS
- /* Number of processes. */
- RLIMIT_NPROC,
-#define RLIMIT_NPROC RLIMIT_NPROC
- /* Locked-in-memory address space. */
- RLIMIT_MEMLOCK,
-#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
-
- RLIMIT_NLIMITS, /* Number of limit flavors. */
- RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
- };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5f8d8b5810ba9b15dab5fd9ad013ef3d7e7ba10
commit a5f8d8b5810ba9b15dab5fd9ad013ef3d7e7ba10
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 31 02:56:57 1996 +0000
update from main archive 961030
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
index 485dec9..8f515db 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
@@ -52,5 +52,88 @@ enum __rlimit_resource
#defin RLIMIT_NOFILE RLIMIT_NOFILE
#defin RLIMIT_OFILE RLIMIT_OFILE
- RLIM_NLIMITS
+ RLIM_NLIMITS,
+
+ RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */
+#define RLIM_INFINITY RLIM_INFINITY
+ };
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ int rlim_cur;
+ /* The hard limit. */
+ int rlim_max;
+ };
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+/* The macro definitions are necessary because some programs want
+ to test for operating system features with #ifdef RUSAGE_SELF.
+ In ISO C the reflexive definition is a no-op. */
+ {
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+ };
+
+#include <sys/time.h> /* For `struct timeval'. */
+
+/* Structure which says how much of each resource has been used. */
+struct rusage
+ {
+ /* Total amount of user time used. */
+ struct timeval ru_utime;
+ /* Total amount of system time used. */
+ struct timeval ru_stime;
+ /* Maximum resident set size (in kilobytes). */
+ long int ru_maxrss;
+ /* Amount of sharing of text segment memory
+ with other processes (kilobyte-seconds). */
+ long int ru_ixrss;
+ /* Amount of data segment memory used (kilobyte-seconds). */
+ long int ru_idrss;
+ /* Amount of stack memory used (kilobyte-seconds). */
+ long int ru_isrss;
+ /* Number of soft page faults (i.e. those serviced by reclaiming
+ a page from the list of pages awaiting reallocation. */
+ long int ru_minflt;
+ /* Number of hard page faults (i.e. those that required I/O). */
+ long int ru_majflt;
+ /* Number of times a process was swapped out of physical memory. */
+ long int ru_nswap;
+ /* Number of input operations via the file system. Note: This
+ and `ru_oublock' do not include operations with the cache. */
+ long int ru_inblock;
+ /* Number of output operations via the file system. */
+ long int ru_oublock;
+ /* Number of IPC messages sent. */
+ long int ru_msgsnd;
+ /* Number of IPC messages received. */
+ long int ru_msgrcv;
+ /* Number of signals delivered. */
+ long int ru_nsignals;
+ /* Number of voluntary context switches, i.e. because the process
+ gave up the process before it had to (usually to wait for some
+ resource to be available). */
+ long int ru_nvcsw;
+ /* Number of involuntary context switches, i.e. a higher priority process
+ became runnable or the current process used up its time slice. */
+ long int ru_nivcsw;
+ };
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+ {
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+ PRIO_USER = 2 /* WHO is a user ID. */
};
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 848ece5..7016a26 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -32,10 +32,7 @@ errno: .space 4
.size errno,4
.globl _errno
.type _errno,@object
-_errno = errno /* This name is expected by hj libc.so.5 startup code. */
- .globl __errno
- .type __errno,@object
-__errno = errno /* This name is expected by the MT code. */
+_errno = errno /* This name is expected by hj's libc.so.5 startup code. */
.text
/* The following code is only used in the shared library when we
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8bd7edd266d5942125549b7485a750f38bbb02b
commit b8bd7edd266d5942125549b7485a750f38bbb02b
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 22 23:29:26 1996 +0000
update from main archvie 961022
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index 32d25e4..dc1f52c 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -46,4 +46,4 @@ ENTRY (_setjmp)
#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
-PSEUDO_END (_setjmp)
+END (_setjmp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index a4053bd..7158907 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -44,4 +44,4 @@ ENTRY (setjmp)
#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
-PSEUDO_END (setjmp)
+END (setjmp)
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 4dcd90e..4465dd8 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -27,7 +27,6 @@ Cambridge, MA 02139, USA. */
.text
ENTRY (__clone)
- CALL_MCOUNT
/* Sanity check arguments. */
movel #-EINVAL, %d0
@@ -63,17 +62,12 @@ ENTRY (__clone)
rts
- SYSCALL_ERROR_HANDLER
-
thread_start:
subl %fp, %fp /* terminate the stack frame */
jsr (%a0)
movel %d0, -(%sp)
-#ifdef PIC
- bsrl _exit@PLTPC
-#else
- jbsr _exit
-#endif
+ jbsr JUMPTARGET (_exit)
+
PSEUDO_END (__clone)
weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index 9bac533..257ff4d 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -19,10 +19,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
.text
- SYSCALL_ERROR_HANDLER
-
ENTRY (__mmap)
- CALL_MCOUNT
move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
index 04f0db5..0971acd 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S
+++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
@@ -20,12 +20,10 @@ Cambridge, MA 02139, USA. */
.text
ENTRY (__sigreturn)
- CALL_MCOUNT
-
addq.l #4, %sp /* Pop the return PC. */
DO_CALL (#SYS_ify (sigreturn), 0)
/* Do the system call; it never returns. */
/* NOTREACHED */
-PSEUDO_END (__sigreturn)
+END (__sigreturn)
weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 1294287..d0741af 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -23,8 +23,6 @@ Cambridge, MA 02139, USA. */
#define P2(a, b) a##b
.text
- SYSCALL_ERROR_HANDLER
-
/* The socket-oriented system calls are handled unusally in Linux.
They are all gated through the single `socketcall' system call number.
`socketcall' takes two arguments: the first is the subcode, specifying
@@ -35,7 +33,6 @@ Cambridge, MA 02139, USA. */
.globl P(__,socket)
ENTRY (P(__,socket))
- CALL_MCOUNT
/* Save registers. */
move.l %d2, %a0
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index 1c7bd6b..b7417aa 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -22,10 +22,7 @@ Cambridge, MA 02139, USA. */
more information about the value -128 used below.*/
.text
- SYSCALL_ERROR_HANDLER
ENTRY (syscall)
- CALL_MCOUNT
-
move.l 4(%sp), %d0 /* Load syscall number. */
_DOARGS_5 (24) /* Frob arguments. */
trap &0 /* Do the system call. */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 31fa20f..848ece5 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -46,7 +46,10 @@ __errno = errno /* This name is expected by the MT code. */
/* The syscall stubs jump here when they detect an error. */
-ENTRY (__syscall_error)
+ .globl __syscall_error
+ .type __syscall_error, @function
+ .align 4
+__syscall_error:
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
@@ -59,15 +62,14 @@ ENTRY (__syscall_error)
return a pointer. */
move.l %d0, %a0
rts
-PSEUDO_END (__syscall_error)
+END (__syscall_error)
#endif /* PIC */
ENTRY (__errno_location)
- CALL_MCOUNT
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
lea errno, %a0
#endif
rts
-PSEUDO_END (__errno_location)
+END (__errno_location)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 9cddd20..3366caa 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -41,6 +41,9 @@ Cambridge, MA 02139, USA. */
C_LABEL(name) \
CALL_MCOUNT
+#undef END
+#define END(name) .size name, . - name
+
/* If compiled for profiling, call `_mcount' at the start of each function. */
#ifdef PROF
/* The mcount code relies on a normal frame pointer being on the stack
@@ -76,7 +79,6 @@ Cambridge, MA 02139, USA. */
error values. */
#define PSEUDO(name, syscall_name, args) \
.text; \
- SYSCALL_ERROR_HANDLER \
ENTRY (name) \
DO_CALL (&SYS_ify (syscall_name), args); \
moveq.l &-128, %d1; \
@@ -84,13 +86,14 @@ Cambridge, MA 02139, USA. */
jcc syscall_error
#undef PSEUDO_END
-#define PSEUDO_END(name) .size name, . - name
+#define PSEUDO_END(name) \
+ SYSCALL_ERROR_HANDLER; \
+ END (name)
#ifdef PIC
/* Store (- %d0) into errno through the GOT. */
#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
- .type syscall_error, @function; \
syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
@@ -105,7 +108,6 @@ syscall_error: \
rts;
#else
#define SYSCALL_ERROR_HANDLER \
- .type syscall_error, @function; \
syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97250b8f6a2c7c6887898546010110a6ef801979
commit 97250b8f6a2c7c6887898546010110a6ef801979
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Oct 21 01:26:31 1996 +0000
update from main archive 961020
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index fa433e9..3908b57 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,5 +1,5 @@
ifeq ($(subdir), misc)
-sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
+sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
sethae ioperm osf_sigprocmask fstatfs statfs llseek
diff --git a/sysdeps/unix/sysv/linux/alpha/sigaction.h b/sysdeps/unix/sysv/linux/alpha/sigaction.h
new file mode 100644
index 0000000..57ce5e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sigaction.h
@@ -0,0 +1,51 @@
+/* The proper definitions for Linux/Alpha sigaction.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ unsigned int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 0x00000004 /* Don't send SIGCHLD when children stop. */
+#ifdef __USE_MISC
+#define SA_STACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+#define SA_RESTART 0x00000002 /* Don't restart syscall on signal return. */
+#define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+#define SA_NOMASK 0x00000008 /* Don't automatically block the signal when
+ its handler is being executed. */
+#define SA_ONESHOT 0x00000010 /* Reset to SIG_DFL on entry to handler. */
+
+/* Some aliases for the SA_ constants. */
+#define SA_NODEFER SA_NOMASK
+#define SA_RESETHAND SA_ONESHOT
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/sysv/linux/alpha/signum.h b/sysdeps/unix/sysv/linux/alpha/signum.h
new file mode 100644
index 0000000..be6132d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/signum.h
@@ -0,0 +1,69 @@
+/* Signal number definitions. Linux/Alpha version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef _SIGNAL_H
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+/*
+ * Linux/AXP has different signal numbers that Linux/i386: I'm trying
+ * to make it OSF/1 binary compatible, at least for normal binaries.
+ */
+#define SIGHUP 1
+#define SIGINT 2
+#define SIGQUIT 3
+#define SIGILL 4
+#define SIGTRAP 5
+#define SIGABRT 6
+#define SIGEMT 7
+#define SIGFPE 8
+#define SIGKILL 9
+#define SIGBUS 10
+#define SIGSEGV 11
+#define SIGSYS 12
+#define SIGPIPE 13
+#define SIGALRM 14
+#define SIGTERM 15
+#define SIGURG 16
+#define SIGSTOP 17
+#define SIGTSTP 18
+#define SIGCONT 19
+#define SIGCHLD 20
+#define SIGTTIN 21
+#define SIGTTOU 22
+#define SIGIO 23
+#define SIGXCPU 24
+#define SIGXFSZ 25
+#define SIGVTALRM 26
+#define SIGPROF 27
+#define SIGWINCH 28
+#define SIGINFO 29
+#define SIGUSR1 30
+#define SIGUSR2 31
+
+#define SIGPOLL SIGIO
+#define SIGPWR SIGINFO
+#define SIGIOT SIGABRT
+
+#define _NSIG 32 /* Biggest signal number + 1. */
+
+#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h
index e0e7a8a..5b59155 100644
--- a/sysdeps/unix/sysv/linux/alpha/statbuf.h
+++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,32 +19,30 @@ Cambridge, MA 02139, USA. */
#ifndef _STATBUF_H
#define _STATBUF_H
-#include <gnu/types.h>
+/* The Alpha has no additional syscall versions. */
-/* Structure describing file characteristics. */
-struct stat
- {
- int st_dev; /* Device. */
- unsigned int st_ino; /* File serial number. */
- unsigned int st_mode; /* File mode. */
- unsigned int st_nlink; /* Link count. */
- unsigned int st_uid; /* User ID of the file's owner. */
- unsigned int st_gid; /* Group ID of the file's group.*/
- int st_rdev; /* Device number, if device. */
-
- long st_size; /* Size of file, in bytes. */
+/* Versions of the `struct stat' data structure. */
+#define _STAT_VER 0
- int st_atime; /* Time of last access. */
- int st_atime_usec;
- int st_mtime; /* Time of last modification. */
- int st_mtime_usec;
- int st_ctime; /* Time of last status change. */
- int st_ctime_usec;
+/* Versions of the `xmknod' interface. */
+#define _MKNOD_VER_LINUX 0
- unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-
- int st_blocks; /* Number of 512-byte blocks allocated. */
+struct stat
+ {
+ unsigned int st_dev; /* Device. */
+ unsigned int st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned int st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group.*/
+ unsigned int st_rdev; /* Device number, if device. */
+ long int st_size; /* Size of file, in bytes. */
+ unsigned long int st_atime; /* Time of last access. */
+ unsigned long int st_mtime; /* Time of last modification. */
+ unsigned long int st_ctime; /* Time of last status change. */
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+ int st_blocks; /* Nr. of 512-byte blocks allocated. */
unsigned int st_flags;
unsigned int st_gen;
};
@@ -60,6 +58,7 @@ struct stat
#define __S_IFREG 0100000 /* Regular file. */
#define __S_IFIFO 0010000 /* FIFO. */
+/* These don't actually exist on System V, but having them doesn't hurt. */
#define __S_IFLNK 0120000 /* Symbolic link. */
#define __S_IFSOCK 0140000 /* Socket. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5415516c876dfe06a8543a48a21034f206e93cbc
commit 5415516c876dfe06a8543a48a21034f206e93cbc
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Oct 17 01:51:33 1996 +0000
update from main archive 961016
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index 69aa7de..32d25e4 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -46,3 +46,4 @@ ENTRY (_setjmp)
#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
+PSEUDO_END (_setjmp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index c853516..a4053bd 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -44,3 +44,4 @@ ENTRY (setjmp)
#else
jmp C_SYMBOL_NAME (__sigsetjmp)
#endif
+PSEUDO_END (setjmp)
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 0728003..4dcd90e 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -27,6 +27,8 @@ Cambridge, MA 02139, USA. */
.text
ENTRY (__clone)
+ CALL_MCOUNT
+
/* Sanity check arguments. */
movel #-EINVAL, %d0
movel 4(%sp), %a0 /* no NULL function pointers */
@@ -72,5 +74,6 @@ thread_start:
#else
jbsr _exit
#endif
+PSEUDO_END (__clone)
weak_alias (__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
index ed0480d..9bac533 100644
--- a/sysdeps/unix/sysv/linux/m68k/mmap.S
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
SYSCALL_ERROR_HANDLER
ENTRY (__mmap)
+ CALL_MCOUNT
move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */
@@ -40,5 +41,6 @@ ENTRY (__mmap)
mmap is declared to return a pointer. */
move.l %d0, %a0
rts
+PSEUDO_END (__mmap)
weak_alias (__mmap, mmap)
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/sigcontext.h
deleted file mode 100644
index 585b479..0000000
--- a/sysdeps/unix/sysv/linux/m68k/sigcontext.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Structure describing state saved while handling a signal. Linux/m68k version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
-{
- __sigset_t sc_mask;
- unsigned long sc_usp;
- unsigned long sc_d0;
- unsigned long sc_d1;
- unsigned long sc_a0;
- unsigned long sc_a1;
- unsigned short sc_sr;
- unsigned long sc_pc;
-};
diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
index 7f6d643..04f0db5 100644
--- a/sysdeps/unix/sysv/linux/m68k/sigreturn.S
+++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
@@ -20,9 +20,12 @@ Cambridge, MA 02139, USA. */
.text
ENTRY (__sigreturn)
+ CALL_MCOUNT
+
addq.l #4, %sp /* Pop the return PC. */
DO_CALL (#SYS_ify (sigreturn), 0)
/* Do the system call; it never returns. */
/* NOTREACHED */
+PSEUDO_END (__sigreturn)
weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index a85f41c..1294287 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -35,6 +35,7 @@ Cambridge, MA 02139, USA. */
.globl P(__,socket)
ENTRY (P(__,socket))
+ CALL_MCOUNT
/* Save registers. */
move.l %d2, %a0
@@ -58,5 +59,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
rts
+PSEUDO_END (P(__,socket))
weak_alias (P(__,socket), socket)
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
index 2cc451c..1c7bd6b 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscall.S
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -18,14 +18,20 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+/* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for
+ more information about the value -128 used below.*/
+
.text
SYSCALL_ERROR_HANDLER
ENTRY (syscall)
- move.l (%sp)+, %a0 /* Pop return address. */
- DO_CALL ((%sp), 5) /* Frob the args and do the system call. */
- tst.l %d0 /* Check %d0 for error. */
- jmi error /* Jump to error handler if negative. */
- jmp (%a0) /* Return to caller. */
+ CALL_MCOUNT
-error: pea (%a0)
- jra syscall_error
+ move.l 4(%sp), %d0 /* Load syscall number. */
+ _DOARGS_5 (24) /* Frob arguments. */
+ trap &0 /* Do the system call. */
+ UNDOARGS_5 /* Unfrob arguments. */
+ moveq.l &-128, %d1
+ cmp.l %d1, %d0 /* Check %d0 for error. */
+ jcc syscall_error /* Jump to error handler if negative. */
+ rts /* Return to caller. */
+PSEUDO_END (syscall)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 407c2d3..31fa20f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -46,7 +46,7 @@ __errno = errno /* This name is expected by the MT code. */
/* The syscall stubs jump here when they detect an error. */
-ENTRY(__syscall_error)
+ENTRY (__syscall_error)
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
@@ -59,14 +59,15 @@ ENTRY(__syscall_error)
return a pointer. */
move.l %d0, %a0
rts
- .size __syscall_error, . - __syscall_error
+PSEUDO_END (__syscall_error)
#endif /* PIC */
-ERRNO(__errno_location)
+ENTRY (__errno_location)
+ CALL_MCOUNT
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
lea errno, %a0
#endif
rts
- .size __errno_location, . - __errno_location
+PSEUDO_END (__errno_location)
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index cfc9b04..9cddd20 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -33,8 +33,6 @@ Cambridge, MA 02139, USA. */
#ifdef ASSEMBLER
-#define POUND #
-
/* Define an entry point visible from C. */
#define ENTRY(name) \
.globl name; \
@@ -67,14 +65,26 @@ Cambridge, MA 02139, USA. */
#define syscall_error __syscall_error
/* Linux uses a negative return value to indicate syscall errors, unlike
- most Unices, which use the condition codes' carry flag. */
+ most Unices, which use the condition codes' carry flag.
+
+ Since version 2.1 the return value of a system call might be negative
+ even if the call succeeded. E.g., the `lseek' system call might return
+ a large offset. Therefore we must not anymore test for < 0, but test
+ for a real error by making sure the value in %d0 is a real error
+ number. For now (as of 2.1.1) 122 is the largest defined error number.
+ We allow for a bit of room for development and treat -128 to -1 as
+ error values. */
#define PSEUDO(name, syscall_name, args) \
.text; \
SYSCALL_ERROR_HANDLER \
ENTRY (name) \
- DO_CALL (POUND SYS_ify (syscall_name), args); \
- tst.l %d0; \
- jmi syscall_error;
+ DO_CALL (&SYS_ify (syscall_name), args); \
+ moveq.l &-128, %d1; \
+ cmp.l %d1, %d0; \
+ jcc syscall_error
+
+#undef PSEUDO_END
+#define PSEUDO_END(name) .size name, . - name
#ifdef PIC
/* Store (- %d0) into errno through the GOT. */
@@ -88,7 +98,7 @@ syscall_error: \
move.l %d0, -(%sp); \
jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
- move.l POUND -1, %d0; \
+ move.l &-1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
@@ -100,7 +110,7 @@ syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
move.l %d0, (%a0); \
- move.l POUND -1, %d0; \
+ move.l &-1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
@@ -138,7 +148,7 @@ syscall_error: \
#define DO_CALL(syscall, args) \
move.l syscall, %d0; \
DOARGS_##args \
- trap POUND 0; \
+ trap &0; \
UNDOARGS_##args
#define DOARGS_0 /* No arguments to frob. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85e960f70685f1b7cdc5888f56d81b7ea4fa9408
commit 85e960f70685f1b7cdc5888f56d81b7ea4fa9408
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 12 00:55:37 1996 +0000
update from main archive 961011
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index c9419e6..3cc9595 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -3,3 +3,5 @@ DEFS.h
divrem.h
divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
_mcount.S
+stxcpy.S
+stxncpy.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05e860710ac19d20edd0c214c2ee83ae2bc7de2a
commit 05e860710ac19d20edd0c214c2ee83ae2bc7de2a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Oct 11 03:12:39 1996 +0000
update from main archive 961010
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
deleted file mode 100644
index 69afa4b..0000000
--- a/sysdeps/alpha/strchr.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <string.h>
-
-/* Return the length of the null-terminated string STR. Scan for
- the null terminator quickly by testing eight bytes at a time. */
-
-char *
-strchr (const char *str, int c)
-{
- const char *char_ptr;
- const unsigned long int *longword_ptr;
- unsigned long int charmask;
-
- c = (unsigned char) c;
-
- /* Handle the first few characters by reading one character at a time.
- Do this until STR is aligned on a 8-byte border. */
- for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
- if (*char_ptr == c)
- return (char *) char_ptr;
- else if (*char_ptr == '\0')
- return NULL;
-
- longword_ptr = (unsigned long int *) char_ptr;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
- charmask |= charmask << 16;
- charmask |= charmask << 32;
-
- for (;;)
- {
- const unsigned long int longword = *longword_ptr++;
- int ge, le, zero;
-
- /* Set bits in ZERO if bytes in LONGWORD are zero. */
- asm ("cmpbge $31, %1, %0" : "=r" (zero) : "r" (longword));
-
- /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */
- asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
-
- /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */
- asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword));
-
- /* Bytes that are both <= and >= are == to C. */
- if (zero || (ge & le))
- {
- /* Which of the bytes was the C? */
-
- char *cp = (char *) (longword_ptr - 1);
- int i;
-
- for (i = 0; i < 8; i++)
- {
- if (cp[i] == c)
- return &cp[i];
- if (cp[i] == 0)
- return NULL;
- }
- return NULL;
- }
- }
-}
-
-#ifdef weak_alias
-#undef index
-weak_alias (strchr, index)
-#endif
diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S
index e381b70..49dd8e5 100644
--- a/sysdeps/alpha/stxcpy.S
+++ b/sysdeps/alpha/stxcpy.S
@@ -36,7 +36,7 @@ Cambridge, MA 02139, USA. */
Furthermore, v0, a3-a5, t11, and t12 are untouched.
*/
-/* This is generally scheduled for the EV5, but should still be pretty
+/* This is generally scheduled for the EV5, but should still be pretty
good for the EV4 too. */
#include <sysdep.h>
@@ -65,7 +65,7 @@ stxcpy_aligned:
lda t2, -1 # e1 : build a mask against false zero
mskqh t2, a1, t2 # e0 : detection in the src word
mskqh t1, a1, t3 # e0 :
- ornot t1, t2, t2 # .. e1 :
+ ornot t1, t2, t2 # .. e1 :
mskql t0, a1, t0 # e0 : assemble the first output word
cmpbge zero, t2, t7 # .. e1 : bits set iff null found
or t0, t3, t1 # e0 :
@@ -99,9 +99,9 @@ $a_eos:
/* We're doing a partial word store and so need to combine
our source and original destination words. */
ldq_u t0, 0(a0) # e0 :
- subq t8, 1, t6 # .. e1 :
+ subq t8, 1, t6 # .. e1 :
zapnot t1, t6, t1 # e0 : clear src bytes >= null
- or t8, t6, t7 # .. e1 :
+ or t8, t6, t7 # .. e1 :
zap t0, t7, t0 # e0 : clear dst bytes <= null
or t0, t1, t1 # e1 :
@@ -156,13 +156,13 @@ $u_head:
or t1, t4, t1 # .. e1 :
mskqh t1, a0, t1 # e0 :
or t0, t1, t1 # e1 :
-
+
or t1, t6, t6 # e0 :
cmpbge zero, t6, t7 # .. e1 :
lda t6, -1 # e0 : for masking just below
bne t7, $u_final # .. e1 :
- mskql t6, a1, t6 # e0 : mask out the bits we have
+ mskql t6, a1, t6 # e0 : mask out the bits we have
or t6, t2, t2 # e1 : already extracted before
cmpbge zero, t2, t7 # e0 : testing eos
bne t7, $u_late_head_exit # .. e1 (zdb)
@@ -181,7 +181,7 @@ $u_head:
/* Unaligned copy main loop. In order to avoid reading too much,
the loop is structured to detect zeros in aligned source words.
- This has, unfortunately, effectively pulled half of a loop
+ This has, unfortunately, effectively pulled half of a loop
iteration out into the head and half into the tail, but it does
prevent nastiness from accumulating in the very thing we want
to run as fast as possible.
@@ -207,7 +207,7 @@ $u_loop:
/* We've found a zero somewhere in the source word we just read.
If it resides in the lower half, we have one (probably partial)
- word to write out, and if it resides in the upper half, we
+ word to write out, and if it resides in the upper half, we
have one full and one partial word left to write out.
On entry to this basic block:
@@ -234,7 +234,7 @@ $u_final:
negq t7, t6 # e0 : isolate low bit set
and t6, t7, t8 # e1 :
- and t8, 0x80, t6 # e0 : avoid dest word load if we can
+ and t8, 0x80, t6 # e0 : avoid dest word load if we can
bne t6, 1f # .. e1 (zdb)
ldq_u t0, 0(a0) # e0 :
@@ -256,7 +256,7 @@ $unaligned:
and a0, 7, t4 # .. e1 : find dest misalignment
and a1, 7, t5 # e0 : find src misalignment
- /* Conditionally load the first destination word and a bytemask
+ /* Conditionally load the first destination word and a bytemask
with 0xff indicating that the destination byte is sacrosanct. */
mov zero, t0 # .. e1 :
@@ -290,18 +290,19 @@ $unaligned:
negq t7, t6 # .. e1 : build bitmask of bytes <= zero
and t6, t7, t8 # e0 :
- nop # .. e1 :
+ and a1, 7, t5 # .. e1 :
subq t8, 1, t6 # e0 :
or t6, t8, t7 # e1 :
+ srl t8, t5, t8 # e0 : adjust final null return value
- zapnot t2, t7, t2 # e0 : prepare source word; mirror changes
+ zapnot t2, t7, t2 # .. e1 : prepare source word; mirror changes
and t1, t2, t1 # e1 : to source validity mask
- extql t2, a1, t2 # e0 :
+ extql t2, a1, t2 # .. e0 :
extql t1, a1, t1 # e0 :
- andnot t0, t2, t0 # e0 : zero place for source to reside
+ andnot t0, t2, t0 # .. e1 : zero place for source to reside
or t0, t1, t1 # e1 : and put it there
- stq_u t1, 0(a0) # e0 :
- ret (t9) # .. e1 :
+ stq_u t1, 0(a0) # .. e0 :
+ ret (t9)
.end __stxcpy
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index ad5f021..75be949 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -21,6 +21,7 @@ error. Instead, the error condition is indicated by returning the old
break value (instead of the new, requested one). */
#include <sysdep.h>
+#define _ERRNO_H
#include <errnos.h>
#ifdef PIC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81e25b608df040adda0b7111ccb272962782dc88
commit 81e25b608df040adda0b7111ccb272962782dc88
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Oct 8 23:39:13 1996 +0000
update from main archive 961008
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
index a1ef324..71d8053 100644
--- a/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */
and invokes a function in the right context after its all over. */
#include <sysdep.h>
+#define _ERRNO_H 1
#include <errnos.h>
/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
index 64077e0..0728003 100644
--- a/sysdeps/unix/sysv/linux/m68k/clone.S
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */
and invokes a function in the right context after its all over. */
#include <sysdep.h>
+#define _ERRNO_H 1
#include <errnos.h>
/* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf182b5888c59a0fc8b1d4b3d815fe856c2dcf77
commit cf182b5888c59a0fc8b1d4b3d815fe856c2dcf77
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Oct 6 02:02:37 1996 +0000
update from main archive 961005
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 6aaedea..45babb6 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -21,17 +21,21 @@ sysdep_routines += _mcount
endif
ifeq ($(subdir),setjmp)
-sysdep_routines := $(sysdep_routines) setjmp_aux
+sysdep_routines += setjmp_aux
endif
ifeq ($(subdir),gnulib)
-routines = $(divrem)
-endif # gnulib
+sysdep_routines += $(divrem)
+endif
+
+ifeq ($(subdir),string)
+sysdep_routines += stxcpy stxncpy
+endif
ifeq ($(subdir),elf)
-# The ld.so code cannot use literals until it self-relocates.
+# The ld.so startup code cannot use literals until it self-relocates.
ifeq ($(elf),yes)
-CFLAGS-rtld.c = -mbuild-constants
+ CFLAGS-rtld.c = -mbuild-constants
endif
# The rest of ld.so shouldn't use FP regs for block moves so
# that the lazy link trampoline doesn't have to save them.
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
new file mode 100644
index 0000000..fffa53d
--- /dev/null
+++ b/sysdeps/alpha/bzero.S
@@ -0,0 +1,113 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Fill a block of memory with zeros. Optimized for the Alpha architecture:
+
+ - memory accessed as aligned quadwords only
+ - destination memory not read unless needed for good cache behaviour
+ - basic blocks arranged to optimize branch prediction for full-quadword
+ aligned memory blocks.
+ - partial head and tail quadwords constructed with byte-mask instructions
+
+ This is generally scheduled for the EV5 (got to look out for my own
+ interests :-), but with EV4 needs in mind. There *should* be no more
+ stalls for the EV4 than there are for the EV5.
+*/
+
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the main
+ loop in its own procedure descriptor. */
+
+ /* On entry to this basic block:
+ t3 == loop counter
+ t4 == bytes in partial final word
+ a0 == possibly misaligned destination pointer */
+
+ .ent bzero_loop
+ .align 3
+bzero_loop:
+ .frame sp, 0, ra, 0
+ .prologue 0
+
+ beq t3, $tail #
+ blbc t3, 0f # skip single store if count even
+
+ stq_u zero, 0(a0) # e0 : store one word
+ subq t3, 1, t3 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ beq t3, $tail # .. e1 :
+
+0: stq_u zero, 0(a0) # e0 : store two words
+ subq t3, 2, t3 # .. e1 :
+ stq_u zero, 8(a0) # e0 :
+ addq a0, 16, a0 # .. e1 :
+ bne t3, 0b # e1 :
+
+$tail: bne t4, 1f # is there a tail to do?
+ ret # no
+
+1: ldq_u t0, 0(a0) # yes, load original data
+ mskqh t0, t4, t0 #
+ stq_u t0, 0(a0) #
+ ret #
+
+ .end bzero_loop
+
+ENTRY(bzero)
+ .prologue 0
+
+ mov a0, v0 # e0 : move return value in place
+ beq a1, $done # .. e1 : early exit for zero-length store
+ and a0, 7, t1 # e0 :
+ addq a1, t1, a1 # e1 : add dest misalignment to count
+ srl a1, 3, t3 # e0 : loop = count >> 3
+ and a1, 7, t4 # .. e1 : find number of bytes in tail
+ unop # :
+ beq t1, bzero_loop # e1 : aligned head, jump right in
+
+ ldq_u t0, 0(a0) # e0 : load original data to mask into
+ cmpult a1, 8, t2 # .. e1 : is this a sub-word set?
+ bne t2, $oneq # e1 :
+
+ mskql t0, a0, t0 # e0 : we span words. finish this partial
+ subq t3, 1, t3 # e0 :
+ addq a0, 8, a0 # .. e1 :
+ stq_u t0, -8(a0) # e0 :
+ br bzero_loop # .. e1 :
+
+ .align 3
+$oneq:
+ mskql t0, a0, t2 # e0 :
+ mskqh t0, a1, t3 # e0 :
+ or t2, t3, t0 # e1 :
+ stq_u t0, 0(a0) # e0 :
+
+$done: ret
+
+ END(bzero)
diff --git a/sysdeps/alpha/memset.S b/sysdeps/alpha/memset.S
new file mode 100644
index 0000000..55271f0
--- /dev/null
+++ b/sysdeps/alpha/memset.S
@@ -0,0 +1,130 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Fill a block of memory with a character. Optimized for the Alpha
+ architecture:
+
+ - memory accessed as aligned quadwords only
+ - destination memory not read unless needed for good cache behaviour
+ - basic blocks arranged to optimize branch prediction for full-quadword
+ aligned memory blocks.
+ - partial head and tail quadwords constructed with byte-mask instructions
+
+ This is generally scheduled for the EV5 (got to look out for my own
+ interests :-), but with EV4 needs in mind. There *should* be no more
+ stalls for the EV4 than there are for the EV5.
+*/
+
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the main
+ loop in its own procedure descriptor. */
+
+ /* On entry to this basic block:
+ t3 == loop counter
+ t4 == bytes in partial final word
+ a0 == possibly misaligned destination pointer
+ a1 == replicated source character */
+
+ .ent memset_loop
+ .align 3
+memset_loop:
+ .frame sp, 0, ra, 0
+ .prologue 0
+
+ beq t3, $tail
+ blbc t3, 0f # skip single store if count even
+
+ stq_u a1, 0(a0) # e0 : store one word
+ subq t3, 1, t3 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ beq t3, $tail # .. e1 :
+
+0: stq_u a1, 0(a0) # e0 : store two words
+ subq t3, 2, t3 # .. e1 :
+ stq_u a1, 8(a0) # e0 :
+ addq a0, 16, a0 # .. e1 :
+ bne t3, 0b # e1 :
+
+$tail: bne t4, 1f # is there a tail to do?
+ ret # no
+
+ .align 3
+1: ldq_u t0, 0(a0) # e1 : yes, load original data
+ mskql a1, t4, t1 # .. e0 :
+ mskqh t0, t4, t0 # e0 :
+ or t0, t1, t0 # e1 (stall)
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+ .end memset_loop
+
+ENTRY(memset)
+ .prologue 0
+
+ zapnot a1, 1, a1 # e0 : zero extend input character
+ mov a0, v0 # .. e1 : move return value in place
+ sll a1, 8, t0 # e0 : begin replicating the char
+ beq a2, $done # .. e1 : early exit for zero-length store
+ or t0, a1, a1 # e0 :
+ and a0, 7, t1 # .. e1 : dest misalignment
+ sll a1, 16, t0 # e0 :
+ addq a2, t1, a2 # .. e1 : add dest misalignment to count
+ or t0, a1, a1 # e0 :
+ srl a2, 3, t3 # .. e1 : loop = count >> 3
+ sll a1, 32, t0 # e0 :
+ and a2, 7, t4 # .. e1 : find number of bytes in tail
+ or t0, a1, a1 # e0 : character replication done
+
+ beq t1, memset_loop # .. e1 : aligned head, jump right in
+
+ ldq_u t0, 0(a0) # e1 : load original data to mask into
+ mskqh a1, a0, t1 # .. e0 :
+
+ cmpult a2, 8, t2 # e0 : is this a sub-word set?
+ bne t2, $oneq # .. e1 (zdb)
+
+ mskql t0, a0, t0 # e0 : we span words. finish this partial
+ subq t3, 1, t3 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ or t0, t1, t0 # .. e1 :
+ stq_u t0, -8(a0) # e0 :
+ br memset_loop # .. e1 :
+
+ .align 3
+$oneq:
+ mskql t1, a2, t1 # e0 : entire operation within one word
+ mskql t0, a0, t2 # e0 :
+ mskqh t0, a2, t3 # e0 :
+ or t1, t2, t0 # .. e1 :
+ or t0, t3, t0 # e1 :
+ stq_u t0, 0(a0) # e0 (stall)
+
+$done: ret
+
+ END(memset)
diff --git a/sysdeps/alpha/stpcpy.S b/sysdeps/alpha/stpcpy.S
new file mode 100644
index 0000000..0dc44d3
--- /dev/null
+++ b/sysdeps/alpha/stpcpy.S
@@ -0,0 +1,49 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy a null-terminated string from SRC to DST. Return a pointer
+ to the null-terminator in the source. */
+
+#include <sysdep.h>
+
+ .text
+
+ENTRY(__stpcpy)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ jsr t9, __stxcpy # do the work of the copy
+
+ and t8, 0xf0, t2 # binary search for byte offset of the
+ and t8, 0xcc, t1 # last byte written.
+ and t8, 0xaa, t0
+ andnot a0, 7, a0
+ cmovne t2, 4, t2
+ cmovne t1, 2, t1
+ cmovne t0, 1, t0
+ addq a0, t2, v0
+ addq t0, t1, t0
+ addq v0, t0, v0
+
+ ret
+
+ END(__stpcpy)
+
+weak_alias (__stpcpy, stpcpy)
diff --git a/sysdeps/alpha/stpncpy.S b/sysdeps/alpha/stpncpy.S
new file mode 100644
index 0000000..50cda26
--- /dev/null
+++ b/sysdeps/alpha/stpncpy.S
@@ -0,0 +1,103 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy no more than COUNT bytes of the null-terminated string from
+ SRC to DST. If SRC does not cover all of COUNT, the balance is
+ zeroed. Return the address of the terminating null in DEST, if
+ any, else DEST + COUNT. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+ENTRY(__stpncpy)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ beq a2, $zerocount
+ jsr t9, __stxncpy # do the work of the copy
+
+ and t8, 0xf0, t3 # binary search for byte offset of the
+ and t8, 0xcc, t2 # last byte written.
+ and t8, 0xaa, t1
+ andnot a0, 7, v0
+ cmovne t3, 4, t3
+ cmovne t2, 2, t2
+ cmovne t1, 1, t1
+ addq v0, t3, v0
+ addq t1, t2, t1
+ addq v0, t1, v0
+
+ bne a2, $multiword # do we have full words left?
+
+ .align 3
+ zapnot t0, t8, t4 # e0 : was last byte a null?
+ subq t8, 1, t2 # .. e1 :
+ addq v0, 1, t5 # e0 :
+ subq t10, 1, t3 # .. e1 :
+ or t2, t8, t2 # e0 : clear the bits between the last
+ or t3, t10, t3 # .. e1 : written byte and the last byte in
+ andnot t3, t2, t3 # e0 : COUNT
+ cmovne t4, t5, v0 # .. e1 : if last written wasnt null, inc v0
+ zap t0, t3, t0 # e0 :
+ stq_u t0, 0(a0) # e1 :
+ ret # .. e1 :
+
+ .align 3
+$multiword:
+ subq t8, 1, t7 # e0 : clear the final bits in the prev
+ or t7, t8, t7 # e1 : word
+ zapnot t0, t7, t0 # e0 :
+ subq a2, 1, a2 # .. e1 :
+ stq_u t0, 0(a0) # e0 :
+ addq a0, 8, a0 # .. e1 :
+
+ beq a2, 1f # e1 :
+ blbc a2, 0f # e1 :
+
+ stq_u zero, 0(a0) # e0 : zero one word
+ subq a2, 1, a2 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ beq a2, 1f # .. e1 :
+
+0: stq_u zero, 0(a0) # e0 : zero two words
+ subq a2, 2, a2 # .. e1 :
+ stq_u zero, 8(a0) # e0 :
+ addq a0, 16, a0 # .. e1 :
+ bne a2, 0b # e1 :
+ unop
+
+1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final
+ subq t10, 1, t7 # .. e1 : word
+ or t7, t10, t7 # e0 :
+ zap t0, t7, t0 # e1 (stall)
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+$zerocount:
+ mov a0, v0
+ ret
+
+ END(__stpncpy)
+
+weak_alias (__stpncpy, stpncpy)
diff --git a/sysdeps/alpha/strcat.S b/sysdeps/alpha/strcat.S
new file mode 100644
index 0000000..d3afff3
--- /dev/null
+++ b/sysdeps/alpha/strcat.S
@@ -0,0 +1,66 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Append a null-terminated string from SRC to DST. */
+
+#include <sysdep.h>
+
+ .text
+
+ENTRY(strcat)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ mov a0, v0 # set up return value
+
+ /* Find the end of the string. */
+
+ ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
+ lda t1, -1(zero)
+ insqh t1, a0, t1
+ andnot a0, 7, a0
+ or t1, t0, t0
+ cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
+ bne t1, $found
+
+$loop: ldq t0, 8(a0)
+ addq a0, 8, a0 # addr += 8
+ cmpbge zero, t0, t1
+ beq t1, $loop
+
+$found: negq t1, t2 # clear all but least set bit
+ and t1, t2, t1
+
+ and t1, 0xf0, t2 # binary search for that set bit
+ and t1, 0xcc, t3
+ and t1, 0xaa, t4
+ cmovne t2, 4, t2
+ cmovne t3, 2, t3
+ cmovne t4, 1, t4
+ addq t2, t3, t2
+ addq a0, t4, a0
+ addq a0, t2, a0
+
+ /* Now do the append. */
+
+ jsr t9, __stxcpy
+ ret
+
+ END(strcat)
diff --git a/sysdeps/alpha/strchr.S b/sysdeps/alpha/strchr.S
new file mode 100644
index 0000000..c26a843
--- /dev/null
+++ b/sysdeps/alpha/strchr.S
@@ -0,0 +1,88 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Return the address of a given character within a null-terminated
+ string, or null if it is not found.
+
+ This is generally scheduled for the EV5 (got to look out for my own
+ interests :-), but with EV4 needs in mind. There *should* be no more
+ stalls for the EV4 than there are for the EV5.
+*/
+
+#include <sysdep.h>
+
+ .set noreorder
+ .set noat
+
+ENTRY(strchr)
+ .prologue 0
+
+ zapnot a1, 1, a1 # e0 : zero extend the search character
+ ldq_u t0, 0(a0) # .. e1 : load first quadword
+ sll a1, 8, t5 # e0 : replicate the search character
+ andnot a0, 7, v0 # .. e1 : align our loop pointer
+ or t5, a1, a1 # e0 :
+ lda t4, -1 # .. e1 : build garbage mask
+ sll a1, 16, t5 # e0 :
+ cmpbge zero, t0, t2 # .. e1 : bits set iff byte == zero
+ mskqh t4, a0, t4 # e0 :
+ or t5, a1, a1 # .. e1 :
+ sll a1, 32, t5 # e0 :
+ cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage
+ or t5, a1, a1 # e0 :
+ xor t0, a1, t1 # .. e1 : make bytes == c zero
+ cmpbge zero, t1, t3 # e0 : bits set iff byte == c
+ or t2, t3, t0 # e1 : bits set iff char match or zero match
+ andnot t0, t4, t0 # e0 : clear garbage bits
+ bne t0, $found # .. e1 (zdb)
+
+$loop: ldq t0, 8(v0) # e0 :
+ addq v0, 8, v0 # .. e1 :
+ nop # e0 :
+ xor t0, a1, t1 # .. e1 (ev5 data stall)
+ cmpbge zero, t0, t2 # e0 : bits set iff byte == 0
+ cmpbge zero, t1, t3 # .. e1 : bits set iff byte == c
+ or t2, t3, t0 # e0 :
+ beq t0, $loop # .. e1 (zdb)
+
+$found: negq t0, t1 # e0 : clear all but least set bit
+ and t0, t1, t0 # e1 (stall)
+
+ and t0, t3, t1 # e0 : bit set iff byte was the char
+ beq t1, $retnull # .. e1 (zdb)
+
+ and t0, 0xf0, t2 # e0 : binary search for that set bit
+ and t0, 0xcc, t3 # .. e1 :
+ and t0, 0xaa, t4 # e0 :
+ cmovne t2, 4, t2 # .. e1 :
+ cmovne t3, 2, t3 # e0 :
+ cmovne t4, 1, t4 # .. e1 :
+ addq t2, t3, t2 # e0 :
+ addq v0, t4, v0 # .. e1 :
+ addq v0, t2, v0 # e0 :
+ ret # .. e1 :
+
+$retnull:
+ mov zero, v0 # e0 :
+ ret # .. e1 :
+
+ END(strchr)
+
+weak_alias (strchr, index)
diff --git a/sysdeps/alpha/strcpy.S b/sysdeps/alpha/strcpy.S
new file mode 100644
index 0000000..2975181
--- /dev/null
+++ b/sysdeps/alpha/strcpy.S
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy a null-terminated string from SRC to DST. Return a pointer
+ to the null-terminator in the source. */
+
+#include <sysdep.h>
+
+ .text
+
+ENTRY(strcpy)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ mov a0, v0 # set up return value
+ jsr t9, __stxcpy # do the copy
+ ret
+
+ END(strcpy)
diff --git a/sysdeps/alpha/strncat.S b/sysdeps/alpha/strncat.S
new file mode 100644
index 0000000..d502037
--- /dev/null
+++ b/sysdeps/alpha/strncat.S
@@ -0,0 +1,90 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Append no more than COUNT characters from the null-terminated string SRC
+ to the null-terminated string DST. Always null-terminate the new DST. */
+
+#include <sysdep.h>
+
+ .text
+
+ENTRY(strncat)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ mov a0, v0 # set up return value
+ beq a2, $zerocount
+
+ /* Find the end of the string. */
+
+ ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
+ lda t1, -1(zero)
+ insqh t1, a0, t1
+ andnot a0, 7, a0
+ or t1, t0, t0
+ cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
+ bne t1, $found
+
+$loop: ldq t0, 8(a0)
+ addq a0, 8, a0 # addr += 8
+ cmpbge zero, t0, t1
+ beq t1, $loop
+
+$found: negq t1, t2 # clear all but least set bit
+ and t1, t2, t1
+
+ and t1, 0xf0, t2 # binary search for that set bit
+ and t1, 0xcc, t3
+ and t1, 0xaa, t4
+ cmovne t2, 4, t2
+ cmovne t3, 2, t3
+ cmovne t4, 1, t4
+ addq t2, t3, t2
+ addq a0, t4, a0
+ addq a0, t2, a0
+
+ /* Now do the append. */
+
+ jsr t9, __stxncpy
+
+ /* Worry about the null termination. */
+
+ zapnot t0, t8, t1 # was last byte a null?
+ bne t1, 0f
+ ret
+
+0: and t10, 0x80, t1
+ bne t1, 1f
+
+ /* Here there are bytes left in the current word. Clear one. */
+ addq t10, t10, t10 # end-of-count bit <<= 1
+ zap t0, t10, t0
+ stq_u t0, 0(a0)
+ ret
+
+1: /* Here we must read the next DST word and clear the first byte. */
+ ldq_u t0, 8(a0)
+ zap t0, 1, t0
+ stq_u t0, 8(a0)
+
+$zerocount:
+ ret
+
+ END(strncat)
diff --git a/sysdeps/alpha/strncpy.S b/sysdeps/alpha/strncpy.S
new file mode 100644
index 0000000..e13769c
--- /dev/null
+++ b/sysdeps/alpha/strncpy.S
@@ -0,0 +1,85 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy no more than COUNT bytes of the null-terminated string from
+ SRC to DST. If SRC does not cover all of COUNT, the balance is
+ zeroed. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+ENTRY(strncpy)
+ ldgp gp, 0(pv)
+ .prologue 1
+
+ mov a0, v0 # set return value now
+ beq a2, $zerocount
+ jsr t9, __stxncpy # do the work of the copy
+
+ bne a2, $multiword # do we have full words left?
+
+ .align 3
+ subq t8, 1, t2 # e0 : guess not
+ subq t10, 1, t3 # .. e1 :
+ or t2, t8, t2 # e0 : clear the bits between the last
+ or t3, t10, t3 # .. e1 : written byte and the last byte in
+ andnot t3, t2, t3 # e0 : COUNT
+ zap t0, t3, t0 # e1 :
+ stq_u t0, 0(a0) # e0 :
+ ret # .. e1 :
+
+$multiword:
+
+ subq t8, 1, t7 # e0 : clear the final bits in the prev
+ or t7, t8, t7 # e1 : word
+ zapnot t0, t7, t0 # e0 :
+ subq a2, 1, a2 # .. e1 :
+ stq_u t0, 0(a0) # e0 :
+ addq a0, 8, a0 # .. e1 :
+
+ beq a2, 1f # e1 :
+ blbc a2, 0f # e1 :
+
+ stq_u zero, 0(a0) # e0 : zero one word
+ subq a2, 1, a2 # .. e1 :
+ addq a0, 8, a0 # e0 :
+ beq a2, 1f # .. e1 :
+
+0: stq_u zero, 0(a0) # e0 : zero two words
+ subq a2, 2, a2 # .. e1 :
+ stq_u zero, 8(a0) # e0 :
+ addq a0, 16, a0 # .. e1 :
+ bne a2, 0b # e1 :
+ unop
+
+1: ldq_u t0, 0(a0) # e0 : clear the leading bits in the final
+ subq t10, 1, t7 # .. e1 : word
+ or t7, t10, t7 # e0 :
+ zap t0, t7, t0 # e1 (stall)
+ stq_u t0, 0(a0) # e0 :
+
+$zerocount:
+ ret # .. e1 :
+
+ END(strncpy)
diff --git a/sysdeps/alpha/strrchr.S b/sysdeps/alpha/strrchr.S
new file mode 100644
index 0000000..464f754
--- /dev/null
+++ b/sysdeps/alpha/strrchr.S
@@ -0,0 +1,104 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Return the address of the last occurrance of a given character
+ within a null-terminated string, or null if it is not found.
+
+ This is generally scheduled for the EV5 (got to look out for my own
+ interests :-), but with EV4 needs in mind. There are, in fact, fewer
+ stalls on the EV4 than there are on the EV5.
+*/
+
+#include <sysdep.h>
+
+ .set noreorder
+ .set noat
+
+ENTRY(strrchr)
+ .prologue 0
+
+ zapnot a1, 1, a1 # e0 : zero extend our test character
+ mov zero, t6 # .. e1 : t6 is last match aligned addr
+ sll a1, 8, t5 # e0 : replicate our test character
+ mov zero, t7 # .. e1 : t7 is last match byte compare mask
+ or t5, a1, a1 # e0 :
+ ldq_u t0, 0(a0) # .. e1 : load first quadword
+ sll a1, 16, t5 # e0 :
+ andnot a0, 7, v0 # .. e1 : align source addr
+ or t5, a1, a1 # e0 :
+ lda t4, -1 # .. e1 : build garbage mask
+ sll a1, 32, t5 # e0 :
+ cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero
+ mskqh t4, a0, t4 # e0 :
+ or t5, a1, a1 # .. e1 : character replication complete
+ xor t0, a1, t2 # e0 : make bytes == c zero
+ cmpbge zero, t4, t4 # .. e1 : bits set iff byte is garbage
+ cmpbge zero, t2, t3 # e0 : bits set iff byte == c
+ andnot t1, t4, t1 # .. e1 : clear garbage from null test
+ andnot t3, t4, t3 # e0 : clear garbage from char test
+ bne t1, $eos # .. e1 : did we already hit the terminator?
+
+ /* Character search main loop */
+$loop:
+ ldq t0, 8(v0) # e0 : load next quadword
+ cmovne t3, v0, t6 # .. e1 : save previous comparisons match
+ cmovne t3, t3, t7 # e0 :
+ addq v0, 8, v0 # .. e1 :
+ xor t0, a1, t2 # e0 :
+ cmpbge zero, t0, t1 # .. e1 : bits set iff byte == zero
+ cmpbge zero, t2, t3 # e0 : bits set iff byte == c
+ beq t1, $loop # .. e1 : if we havnt seen a null, loop
+
+ /* Mask out character matches after terminator */
+$eos:
+ negq t1, t4 # e0 : isolate first null byte match
+ and t1, t4, t4 # e1 :
+ subq t4, 1, t5 # e0 : build a mask of the bytes upto...
+ or t4, t5, t4 # e1 : ... and including the null
+
+ and t3, t4, t3 # e0 : mask out char matches after null
+ cmovne t3, t3, t7 # .. e1 : save it, if match found
+ cmovne t3, v0, t6 # e0 :
+
+ /* Locate the address of the last matched character */
+
+ /* Retain the early exit for the ev4 -- the ev5 mispredict penalty
+ is 5 cycles -- the same as just falling through. */
+ beq t7, $retnull # .. e1 :
+
+ and t7, 0xf0, t2 # e0 : binary search for the high bit set
+ cmovne t2, t2, t7 # .. e1 (zdb)
+ cmovne t2, 4, t2 # e0 :
+ and t7, 0xcc, t1 # .. e1 :
+ cmovne t1, t1, t7 # e0 :
+ cmovne t1, 2, t1 # .. e1 :
+ and t7, 0xaa, t0 # e0 :
+ cmovne t0, 1, t0 # .. e1 (zdb)
+ addq t2, t1, t1 # e0 :
+ addq t6, t0, v0 # .. e1 : add our aligned base ptr to the mix
+ addq v0, t1, v0 # e0 :
+ ret # .. e1 :
+
+$retnull:
+ mov zero, v0 # e0 :
+ ret # .. e1 :
+
+ END(strrchr)
+
+weak_alias (strrchr, rindex)
diff --git a/sysdeps/alpha/stxcpy.S b/sysdeps/alpha/stxcpy.S
new file mode 100644
index 0000000..e381b70
--- /dev/null
+++ b/sysdeps/alpha/stxcpy.S
@@ -0,0 +1,307 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy a null-terminated string from SRC to DST.
+
+ This is an internal routine used by strcpy, stpcpy, and strcat.
+ As such, it uses special linkage conventions to make implementation
+ of these public functions more efficient.
+
+ On input:
+ t9 = return address
+ a0 = DST
+ a1 = SRC
+
+ On output:
+ t8 = bitmask (with one bit set) indicating the last byte written
+ a0 = unaligned address of the last *word* written
+
+ Furthermore, v0, a3-a5, t11, and t12 are untouched.
+*/
+
+/* This is generally scheduled for the EV5, but should still be pretty
+ good for the EV4 too. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the
+ aligned copy in its own procedure descriptor */
+
+ .ent stxcpy_aligned
+ .align 3
+stxcpy_aligned:
+ .frame sp, 0, t9
+ .prologue 0
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == the first source word. */
+
+ /* Create the 1st output word and detect 0's in the 1st input word. */
+ lda t2, -1 # e1 : build a mask against false zero
+ mskqh t2, a1, t2 # e0 : detection in the src word
+ mskqh t1, a1, t3 # e0 :
+ ornot t1, t2, t2 # .. e1 :
+ mskql t0, a1, t0 # e0 : assemble the first output word
+ cmpbge zero, t2, t7 # .. e1 : bits set iff null found
+ or t0, t3, t1 # e0 :
+ bne t7, $a_eos # .. e1 :
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == a source word not containing a null. */
+
+$a_loop:
+ stq_u t1, 0(a0) # e0 :
+ addq a0, 8, a0 # .. e1 :
+ ldq_u t1, 0(a1) # e0 :
+ addq a1, 8, a1 # .. e1 :
+ cmpbge zero, t1, t7 # e0 (stall)
+ beq t7, $a_loop # .. e1 (zdb)
+
+ /* Take care of the final (partial) word store.
+ On entry to this basic block we have:
+ t1 == the source word containing the null
+ t7 == the cmpbge mask that found it. */
+$a_eos:
+ negq t7, t6 # e0 : find low bit set
+ and t7, t6, t8 # e1 (stall)
+
+ /* For the sake of the cache, don't read a destination word
+ if we're not going to need it. */
+ and t8, 0x80, t6 # e0 :
+ bne t6, 1f # .. e1 (zdb)
+
+ /* We're doing a partial word store and so need to combine
+ our source and original destination words. */
+ ldq_u t0, 0(a0) # e0 :
+ subq t8, 1, t6 # .. e1 :
+ zapnot t1, t6, t1 # e0 : clear src bytes >= null
+ or t8, t6, t7 # .. e1 :
+ zap t0, t7, t0 # e0 : clear dst bytes <= null
+ or t0, t1, t1 # e1 :
+
+1: stq_u t1, 0(a0) # e0 :
+ ret (t9) # .. e1 :
+
+ .end stxcpy_aligned
+
+ .align 3
+ .ent __stxcpy
+ .globl __stxcpy
+__stxcpy:
+ .frame sp, 0, t9
+ .prologue 0
+
+ /* Are source and destination co-aligned? */
+ xor a0, a1, t0 # e0 :
+ unop # :
+ and t0, 7, t0 # e0 :
+ bne t0, $unaligned # .. e1 :
+
+ /* We are co-aligned; take care of a partial first word. */
+ ldq_u t1, 0(a1) # e0 : load first src word
+ and a0, 7, t0 # .. e1 : take care not to load a word ...
+ addq a1, 8, a1 # e0 :
+ beq t0, stxcpy_aligned # .. e1 : ... if we wont need it
+ ldq_u t0, 0(a0) # e0 :
+ br stxcpy_aligned # .. e1 :
+
+
+/* The source and destination are not co-aligned. Align the destination
+ and cope. We have to be very careful about not reading too much and
+ causing a SEGV. */
+
+ .align 3
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full source word. We can still find a zero at the end of it
+ that prevents us from outputting the whole thing.
+
+ On entry to this basic block:
+ t0 == the first dest word, for masking back in, if needed else 0
+ t1 == the low bits of the first source word
+ t6 == bytemask that is -1 in dest word bytes */
+
+ ldq_u t2, 8(a1) # e0 :
+ addq a1, 8, a1 # .. e1 :
+
+ extql t1, a1, t1 # e0 :
+ extqh t2, a1, t4 # e0 :
+ mskql t0, a0, t0 # e0 :
+ or t1, t4, t1 # .. e1 :
+ mskqh t1, a0, t1 # e0 :
+ or t0, t1, t1 # e1 :
+
+ or t1, t6, t6 # e0 :
+ cmpbge zero, t6, t7 # .. e1 :
+ lda t6, -1 # e0 : for masking just below
+ bne t7, $u_final # .. e1 :
+
+ mskql t6, a1, t6 # e0 : mask out the bits we have
+ or t6, t2, t2 # e1 : already extracted before
+ cmpbge zero, t2, t7 # e0 : testing eos
+ bne t7, $u_late_head_exit # .. e1 (zdb)
+
+ /* Finally, we've got all the stupid leading edge cases taken care
+ of and we can set up to enter the main loop. */
+
+ stq_u t1, 0(a0) # e0 : store first output word
+ addq a0, 8, a0 # .. e1 :
+ extql t2, a1, t0 # e0 : position ho-bits of lo word
+ ldq_u t2, 8(a1) # .. e1 : read next high-order source word
+ addq a1, 8, a1 # e0 :
+ cmpbge zero, t2, t7 # .. e1 :
+ nop # e0 :
+ bne t7, $u_eos # .. e1 :
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned source words.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t0 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word
+
+ We further know that t2 does not contain a null terminator. */
+
+ .align 3
+$u_loop:
+ extqh t2, a1, t1 # e0 : extract high bits for current word
+ addq a1, 8, a1 # .. e1 :
+ extql t2, a1, t3 # e0 : extract low bits for next time
+ addq a0, 8, a0 # .. e1 :
+ or t0, t1, t1 # e0 : current dst word now complete
+ ldq_u t2, 0(a1) # .. e1 : load high word for next time
+ stq_u t1, -8(a0) # e0 : save the current word
+ mov t3, t0 # .. e1 :
+ cmpbge zero, t2, t7 # e0 : test new word for eos
+ beq t7, $u_loop # .. e1 :
+
+ /* We've found a zero somewhere in the source word we just read.
+ If it resides in the lower half, we have one (probably partial)
+ word to write out, and if it resides in the upper half, we
+ have one full and one partial word left to write out.
+
+ On entry to this basic block:
+ t0 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word. */
+$u_eos:
+ extqh t2, a1, t1 # e0 :
+ or t0, t1, t1 # e1 : first (partial) source word complete
+
+ cmpbge zero, t1, t7 # e0 : is the null in this first bit?
+ bne t7, $u_final # .. e1 (zdb)
+
+$u_late_head_exit:
+ stq_u t1, 0(a0) # e0 : the null was in the high-order bits
+ addq a0, 8, a0 # .. e1 :
+ extql t2, a1, t1 # e0 :
+ cmpbge zero, t1, t7 # .. e1 :
+
+ /* Take care of a final (probably partial) result word.
+ On entry to this basic block:
+ t1 == assembled source word
+ t7 == cmpbge mask that found the null. */
+$u_final:
+ negq t7, t6 # e0 : isolate low bit set
+ and t6, t7, t8 # e1 :
+
+ and t8, 0x80, t6 # e0 : avoid dest word load if we can
+ bne t6, 1f # .. e1 (zdb)
+
+ ldq_u t0, 0(a0) # e0 :
+ subq t8, 1, t6 # .. e1 :
+ or t6, t8, t7 # e0 :
+ zapnot t1, t6, t1 # .. e1 : kill source bytes >= null
+ zap t0, t7, t0 # e0 : kill dest bytes <= null
+ or t0, t1, t1 # e1 :
+
+1: stq_u t1, 0(a0) # e0 :
+ ret (t9) # .. e1 :
+
+ /* Unaligned copy entry point. */
+ .align 3
+$unaligned:
+
+ ldq_u t1, 0(a1) # e0 : load first source word
+
+ and a0, 7, t4 # .. e1 : find dest misalignment
+ and a1, 7, t5 # e0 : find src misalignment
+
+ /* Conditionally load the first destination word and a bytemask
+ with 0xff indicating that the destination byte is sacrosanct. */
+
+ mov zero, t0 # .. e1 :
+ mov zero, t6 # e0 :
+ beq t4, 1f # .. e1 :
+ ldq_u t0, 0(a0) # e0 :
+ lda t6, -1 # .. e1 :
+ mskql t6, a0, t6 # e0 :
+1:
+ subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr
+
+ /* If source misalignment is larger than dest misalignment, we need
+ extra startup checks to avoid SEGV. */
+
+ cmplt t4, t5, t8 # e0 :
+ beq t8, $u_head # .. e1 (zdb)
+
+ lda t2, -1 # e1 : mask out leading garbage in source
+ mskqh t2, t5, t2 # e0 :
+ nop # e0 :
+ ornot t1, t2, t3 # .. e1 :
+ cmpbge zero, t3, t7 # e0 : is there a zero?
+ beq t7, $u_head # .. e1 (zdb)
+
+ /* At this point we've found a zero in the first partial word of
+ the source. We need to isolate the valid source data and mask
+ it into the original destination data. (Incidentally, we know
+ that we'll need at least one byte of that original dest word.) */
+
+ ldq_u t0, 0(a0) # e0 :
+
+ negq t7, t6 # .. e1 : build bitmask of bytes <= zero
+ and t6, t7, t8 # e0 :
+ nop # .. e1 :
+ subq t8, 1, t6 # e0 :
+ or t6, t8, t7 # e1 :
+
+ zapnot t2, t7, t2 # e0 : prepare source word; mirror changes
+ and t1, t2, t1 # e1 : to source validity mask
+ extql t2, a1, t2 # e0 :
+ extql t1, a1, t1 # e0 :
+
+ andnot t0, t2, t0 # e0 : zero place for source to reside
+ or t0, t1, t1 # e1 : and put it there
+ stq_u t1, 0(a0) # e0 :
+ ret (t9) # .. e1 :
+
+ .end __stxcpy
diff --git a/sysdeps/alpha/stxncpy.S b/sysdeps/alpha/stxncpy.S
new file mode 100644
index 0000000..8c5fcf6
--- /dev/null
+++ b/sysdeps/alpha/stxncpy.S
@@ -0,0 +1,350 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Copy no more than COUNT bytes of the null-terminated string from
+ SRC to DST.
+
+ This is an internal routine used by strncpy, stpncpy, and strncat.
+ As such, it uses special linkage conventions to make implementation
+ of these public functions more efficient.
+
+ On input:
+ t9 = return address
+ a0 = DST
+ a1 = SRC
+ a2 = COUNT
+
+ Furthermore, COUNT may not be zero.
+
+ On output:
+ t0 = last word written
+ t8 = bitmask (with one bit set) indicating the last byte written
+ t10 = bitmask (with one bit set) indicating the byte position of
+ the end of the range specified by COUNT
+ a0 = unaligned address of the last *word* written
+ a2 = the number of full words left in COUNT
+
+ Furthermore, v0, a3-a5, t11, and t12 are untouched.
+*/
+
+
+/* This is generally scheduled for the EV5, but should still be pretty
+ good for the EV4 too. */
+
+#include <sysdep.h>
+
+ .set noat
+ .set noreorder
+
+ .text
+
+/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that
+ doesn't like putting the entry point for a procedure somewhere in the
+ middle of the procedure descriptor. Work around this by putting the
+ aligned copy in its own procedure descriptor */
+
+ .ent stxncpy_aligned
+ .align 3
+stxncpy_aligned:
+ .frame sp, 0, t9, 0
+ .prologue 0
+
+ /* On entry to this basic block:
+ t0 == the first destination word for masking back in
+ t1 == the first source word. */
+
+ /* Create the 1st output word and detect 0's in the 1st input word. */
+ lda t2, -1 # e1 : build a mask against false zero
+ mskqh t2, a1, t2 # e0 : detection in the src word
+ mskqh t1, a1, t3 # e0 :
+ ornot t1, t2, t2 # .. e1 :
+ mskql t0, a1, t0 # e0 : assemble the first output word
+ cmpbge zero, t2, t7 # .. e1 : bits set iff null found
+ or t0, t3, t0 # e0 :
+ beq a2, $a_eoc # .. e1 :
+ bne t7, $a_eos # .. e1 :
+
+ /* On entry to this basic block:
+ t0 == a source word not containing a null. */
+
+$a_loop:
+ stq_u t0, 0(a0) # e0 :
+ addq a0, 8, a0 # .. e1 :
+ ldq_u t0, 0(a1) # e0 :
+ addq a1, 8, a1 # .. e1 :
+ subq a2, 1, a2 # e0 :
+ cmpbge zero, t0, t7 # .. e1 (stall)
+ beq a2, $a_eoc # e1 :
+ beq t7, $a_loop # e1 :
+
+ /* Take care of the final (partial) word store. At this point
+ the end-of-count bit is set in t7 iff it applies.
+
+ On entry to this basic block we have:
+ t0 == the source word containing the null
+ t7 == the cmpbge mask that found it. */
+
+$a_eos:
+ negq t7, t8 # e0 : find low bit set
+ and t7, t8, t8 # e1 (stall)
+
+ /* For the sake of the cache, don't read a destination word
+ if we're not going to need it. */
+ and t8, 0x80, t6 # e0 :
+ bne t6, 1f # .. e1 (zdb)
+
+ /* We're doing a partial word store and so need to combine
+ our source and original destination words. */
+ ldq_u t1, 0(a0) # e0 :
+ subq t8, 1, t6 # .. e1 :
+ or t8, t6, t7 # e0 :
+ unop #
+ zapnot t0, t7, t0 # e0 : clear src bytes > null
+ zap t1, t7, t1 # .. e1 : clear dst bytes <= null
+ or t0, t1, t0 # e1 :
+
+1: stq_u t0, 0(a0) # e0 :
+ ret (t9) # e1 :
+
+ /* Add the end-of-count bit to the eos detection bitmask. */
+$a_eoc:
+ or t10, t7, t7
+ br $a_eos
+
+ .end stxncpy_aligned
+
+ .align 3
+ .ent __stxncpy
+ .globl __stxncpy
+__stxncpy:
+ .frame sp, 0, t9, 0
+ .prologue 0
+
+ /* Are source and destination co-aligned? */
+ xor a0, a1, t1 # e0 :
+ and a0, 7, t0 # .. e1 : find dest misalignment
+ and t1, 7, t1 # e0 :
+ addq a2, t0, a2 # .. e1 : bias count by dest misalignment
+ subq a2, 1, a2 # e0 :
+ and a2, 7, t2 # e1 :
+ srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8
+ addq zero, 1, t10 # .. e1 :
+ sll t10, t2, t10 # e0 : t10 = bitmask of last count byte
+ bne t1, $unaligned # .. e1 :
+
+ /* We are co-aligned; take care of a partial first word. */
+
+ ldq_u t1, 0(a1) # e0 : load first src word
+ addq a1, 8, a1 # .. e1 :
+
+ beq t0, stxncpy_aligned # avoid loading dest word if not needed
+ ldq_u t0, 0(a0) # e0 :
+ br stxncpy_aligned # .. e1 :
+
+
+/* The source and destination are not co-aligned. Align the destination
+ and cope. We have to be very careful about not reading too much and
+ causing a SEGV. */
+
+ .align 3
+$u_head:
+ /* We know just enough now to be able to assemble the first
+ full source word. We can still find a zero at the end of it
+ that prevents us from outputting the whole thing.
+
+ On entry to this basic block:
+ t0 == the first dest word, unmasked
+ t1 == the shifted low bits of the first source word
+ t6 == bytemask that is -1 in dest word bytes */
+
+ ldq_u t2, 8(a1) # e0 : load second src word
+ addq a1, 8, a1 # .. e1 :
+ mskql t0, a0, t0 # e0 : mask trailing garbage in dst
+ extqh t2, a1, t4 # e0 :
+ or t1, t4, t1 # e1 : first aligned src word complete
+ mskqh t1, a0, t1 # e0 : mask leading garbage in src
+ or t0, t1, t0 # e0 : first output word complete
+ or t0, t6, t6 # e1 : mask original data for zero test
+ cmpbge zero, t6, t7 # e0 :
+ beq a2, $u_eocfin # .. e1 :
+ bne t7, $u_final # e1 :
+
+ lda t6, -1 # e1 : mask out the bits we have
+ mskql t6, a1, t6 # e0 : already seen
+ stq_u t0, 0(a0) # e0 : store first output word
+ or t6, t2, t2 # .. e1 :
+ cmpbge zero, t2, t7 # e0 : find nulls in second partial
+ addq a0, 8, a0 # .. e1 :
+ subq a2, 1, a2 # e0 :
+ bne t7, $u_late_head_exit # .. e1 :
+
+ /* Finally, we've got all the stupid leading edge cases taken care
+ of and we can set up to enter the main loop. */
+
+ extql t2, a1, t1 # e0 : position hi-bits of lo word
+ ldq_u t2, 8(a1) # .. e1 : read next high-order source word
+ addq a1, 8, a1 # e0 :
+ cmpbge zero, t2, t7 # e1 (stall)
+ beq a2, $u_eoc # e1 :
+ bne t7, $u_eos # e1 :
+
+ /* Unaligned copy main loop. In order to avoid reading too much,
+ the loop is structured to detect zeros in aligned source words.
+ This has, unfortunately, effectively pulled half of a loop
+ iteration out into the head and half into the tail, but it does
+ prevent nastiness from accumulating in the very thing we want
+ to run as fast as possible.
+
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word
+
+ We further know that t2 does not contain a null terminator. */
+
+ .align 3
+$u_loop:
+ extqh t2, a1, t0 # e0 : extract high bits for current word
+ addq a1, 8, a1 # .. e1 :
+ extql t2, a1, t3 # e0 : extract low bits for next time
+ addq a0, 8, a0 # .. e1 :
+ or t0, t1, t0 # e0 : current dst word now complete
+ ldq_u t2, 0(a1) # .. e1 : load high word for next time
+ stq_u t0, -8(a0) # e0 : save the current word
+ mov t3, t1 # .. e1 :
+ subq a2, 1, a2 # e0 :
+ cmpbge zero, t2, t7 # .. e1 : test new word for eos
+ beq a2, $u_eoc # e1 :
+ beq t7, $u_loop # e1 :
+
+ /* We've found a zero somewhere in the source word we just read.
+ If it resides in the lower half, we have one (probably partial)
+ word to write out, and if it resides in the upper half, we
+ have one full and one partial word left to write out.
+
+ On entry to this basic block:
+ t1 == the shifted high-order bits from the previous source word
+ t2 == the unshifted current source word. */
+$u_eos:
+ extqh t2, a1, t0 # e0 :
+ or t0, t1, t0 # e1 : first (partial) source word complete
+
+ cmpbge zero, t0, t7 # e0 : is the null in this first bit?
+ bne t7, $u_final # .. e1 (zdb)
+
+ stq_u t0, 0(a0) # e0 : the null was in the high-order bits
+ addq a0, 8, a0 # .. e1 :
+ subq a2, 1, a2 # e1 :
+
+$u_late_head_exit:
+ extql t2, a1, t0 # .. e0 :
+ cmpbge zero, t0, t7 # e0 :
+ or t7, t10, t6 # e1 :
+ cmoveq a2, t6, t7 # e0 :
+ nop # .. e1 :
+
+ /* Take care of a final (probably partial) result word.
+ On entry to this basic block:
+ t0 == assembled source word
+ t7 == cmpbge mask that found the null. */
+$u_final:
+ negq t7, t6 # e0 : isolate low bit set
+ and t6, t7, t8 # e1 :
+
+ and t8, 0x80, t6 # e0 : avoid dest word load if we can
+ bne t6, 1f # .. e1 (zdb)
+
+ ldq_u t1, 0(a0) # e0 :
+ subq t8, 1, t6 # .. e1 :
+ or t6, t8, t7 # e0 :
+ zapnot t0, t7, t0 # .. e1 : kill source bytes > null
+ zap t1, t7, t1 # e0 : kill dest bytes <= null
+ or t0, t1, t0 # e1 :
+
+1: stq_u t0, 0(a0) # e0 :
+ ret (t9) # .. e1 :
+
+$u_eoc: # end-of-count
+ extqh t2, a1, t0
+ or t0, t1, t0
+ cmpbge zero, t0, t7
+
+$u_eocfin: # end-of-count, final word
+ or t10, t7, t7
+ br $u_final
+
+ /* Unaligned copy entry point. */
+ .align 3
+$unaligned:
+
+ ldq_u t1, 0(a1) # e0 : load first source word
+
+ and a0, 7, t4 # .. e1 : find dest misalignment
+ and a1, 7, t5 # e0 : find src misalignment
+
+ /* Conditionally load the first destination word and a bytemask
+ with 0xff indicating that the destination byte is sacrosanct. */
+
+ mov zero, t0 # .. e1 :
+ mov zero, t6 # e0 :
+ beq t4, 1f # .. e1 :
+ ldq_u t0, 0(a0) # e0 :
+ lda t6, -1 # .. e1 :
+ mskql t6, a0, t6 # e0 :
+1:
+ subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr
+
+ /* If source misalignment is larger than dest misalignment, we need
+ extra startup checks to avoid SEGV. */
+
+ cmplt t4, t5, t8 # e1 :
+ extql t1, a1, t1 # .. e0 : shift src into place
+ lda t2, -1 # e0 : for creating masks later
+ beq t8, $u_head # e1 :
+
+ mskqh t2, t5, t2 # e0 : begin src byte validity mask
+ cmpbge zero, t1, t7 # .. e1 : is there a zero?
+ extql t2, a1, t2 # e0 :
+ or t7, t10, t6 # .. e1 : test for end-of-count too
+ cmpbge zero, t2, t3 # e0 :
+ cmoveq a2, t6, t7 # .. e1 :
+ andnot t7, t3, t7 # e0 :
+ beq t7, $u_head # .. e1 (zdb)
+
+ /* At this point we've found a zero in the first partial word of
+ the source. We need to isolate the valid source data and mask
+ it into the original destination data. (Incidentally, we know
+ that we'll need at least one byte of that original dest word.) */
+
+ ldq_u t0, 0(a0) # e0 :
+ negq t7, t6 # .. e1 : build bitmask of bytes <= zero
+ mskqh t1, t4, t1 # e0 :
+ and t6, t7, t8 # .. e1 :
+ subq t8, 1, t6 # e0 :
+ or t6, t8, t7 # e1 :
+
+ zapnot t2, t7, t2 # e0 : prepare source word; mirror changes
+ zapnot t1, t7, t1 # .. e1 : to source validity mask
+
+ andnot t0, t2, t0 # e0 : zero place for source to reside
+ or t0, t1, t0 # e1 : and put it there
+ stq_u t0, 0(a0) # e0 :
+ ret (t9) # .. e1 :
+
+ .end __stxncpy
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1691e6dce9f29bf24838fd089ea8272b5d8451e
commit b1691e6dce9f29bf24838fd089ea8272b5d8451e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Wed Oct 2 01:39:48 1996 +0000
update from main archive 961001
diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h
index a551e9f..e902537 100644
--- a/sysdeps/alpha/machine-gmon.h
+++ b/sysdeps/alpha/machine-gmon.h
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. alpha
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#define _MCOUNT_DECL void __mcount
+#define _MCOUNT_DECL(from, self) \
+ void __mcount (u_long from, u_long self)
/* Call __mcount with our the return PC for our caller, and the return
PC our caller will return to. Empty since we use an assembly stub
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 8d70bda..08dc3b4 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -27,6 +27,8 @@ errno: .space 4
.type errno, @object
.size errno, 4
#endif
+ .globl __errno
+__errno = errno
.text
.align 2
@@ -44,7 +46,10 @@ __syscall_error:
.mask 0x4000001, -16
.prologue 1
- /* Find our pre-thread errno address */
+ /* Store into the "real" variable. */
+ stl v0, errno
+
+ /* Find our per-thread errno address */
jsr ra, __errno_location
/* Store the error value. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1120c0ed1654defe3c5d9fcd5b21a68412ce5bfa
commit 1120c0ed1654defe3c5d9fcd5b21a68412ce5bfa
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 27 03:44:39 1996 +0000
update from main archive
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 4039bba..6d2b74a 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -22,7 +22,6 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC scalbn
-#include <s_ldexp.c>
#endif
#ifndef float_type
#define float_type double
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c
index 55d64fd..3345971 100644
--- a/sysdeps/m68k/fpu/s_scalbnf.c
+++ b/sysdeps/m68k/fpu/s_scalbnf.c
@@ -1,6 +1,5 @@
#ifndef FUNC
#define FUNC scalbnf
-#include <s_ldexpf.c>
#endif
#define float_type float
#include <s_scalbn.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c
index 8484992..c6ad950 100644
--- a/sysdeps/m68k/fpu/s_scalbnl.c
+++ b/sysdeps/m68k/fpu/s_scalbnl.c
@@ -1,6 +1,5 @@
#ifndef FUNC
#define FUNC scalbnl
-#include <s_ldexpl.c>
#endif
#define float_type long double
#include <s_scalbn.c>
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index 59b6073..7ef1a5f 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
@@ -28,11 +27,12 @@ Cambridge, MA 02139, USA. */
/* Close the file descriptor FD. */
int
-DEFUN(__close, (fd), int fd)
+__close (fd)
+ int fd;
{
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
index cbabf5b..9d7d779 100644
--- a/sysdeps/standalone/m68k/m68020/start.S
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -1,19 +1,19 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
-
+
This file is part of the GNU C Library.
-
+
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
-
+
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
@@ -43,7 +43,7 @@ _M68Kvec: | standard location for vectors
.space 4088 | to avoid initial intr stack
| from 135BUG on MVME13? as entry
| and start code at 0x4000
-around:
+around:
move.w %sr,initial_sr | save initial values
movec %isp,%a0
movel %a0,initial_isp
@@ -53,19 +53,19 @@ around:
movel %a0,initial_msp
oriw #0x0700,%sr | INTERRUPTS OFF!!!
-
+
|
| zero out uninitialized data area
|
zerobss:
- moveal #end,%a0 | find end of .bss
- moveal #_bss_start,%a1 | find beginning of .bss
+ moveal #end,%a0 | find end of .bss
+ moveal #_bss_start,%a1 | find beginning of .bss
movel #0,%d0
loop: movel #0,%a1@+ | to zero out uninitialized
cmpal %a0,%a1
- jlt loop | loop until _end reached
+ jlt loop | loop until _end reached
movel #heap_size,__C_heap_size | set ___C_heap_size
movel #heap_memory,__C_heap_start | set ___C_heap_start
@@ -77,14 +77,14 @@ loop: movel #0,%a1@+ | to zero out uninitialized
movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!!
#ifdef NEED_UNDERSCORES
- jsr __Board_Initialize | initialize the board
+ jsr __Board_Initialize | initialize the board
#else
- jsr _Board_Initialize | initialize the board
+ jsr _Board_Initialize | initialize the board
#endif
- move.l #0,%sp@- | envp = NULL
- move.l #0,%sp@- | argv = NULL
- move.l #0,%sp@- | argc = NULL
+ move.l #0,%sp@- | envp = NULL
+ move.l #0,%sp@- | argv = NULL
+ move.l #0,%sp@- | argc = NULL
#ifdef NEED_UNDERSCORES
jsr ___libc_init | initialize the library and
| call main
@@ -93,8 +93,8 @@ loop: movel #0,%a1@+ | to zero out uninitialized
| call main
#endif
add.l #12,%sp
-
- move.l #0,%sp@- | argc = NULL
+
+ move.l #0,%sp@- | argc = NULL
jsr __exit | call the Board specific exit
addq.l #4,%sp
@@ -121,7 +121,7 @@ _name##: .space _space
#define DECLARE_LABEL(_name) \
.globl _name ; \
-_name##:
+_name##:
#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
@@ -139,6 +139,7 @@ DECLARE_U16(initial_sr)
DECLARE_LABEL(_environ)
DECLARE_PTR(environ)
+DECLARE_LABEL(__errno)
DECLARE_LABEL(_errno)
DECLARE_U32(errno)
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index 910e793..87097d9 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -1,7 +1,7 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
-
+
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
@@ -36,7 +35,9 @@ Cambridge, MA 02139, USA. */
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
int
-DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
+__open (file, oflag)
+ const char *file;
+ int oflag;
{
int mode;
int newfd;
@@ -44,7 +45,7 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
if (file == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -69,17 +70,17 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
}
if ( newfd == -1 ) {
- errno = ENFILE;
+ __set_errno (ENFILE);
return -1;
}
- /*
+ /*
* Initialize the open slot
*/
__FD_Table[ newfd ].in_use = 1;
__FD_Table[ newfd ].flags = oflag;
-
+
return newfd;
}
@@ -89,8 +90,10 @@ DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
static
#endif
void
-DEFUN(__NONE_init_console_io, (argc, argv, envp),
- int argc AND char **argv AND char **envp)
+__NONE_init_console_io (argc, argv, envp)
+ int argc;
+ char **argv;
+ char **envp;
{
int index;
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 284321d..40322a5 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <unistd.h>
#include <stddef.h>
@@ -30,32 +29,31 @@ Cambridge, MA 02139, USA. */
/* Read NBYTES into BUF from FD. Return the number read or -1. */
ssize_t
-DEFUN(__read, (fd, buf, nbytes),
- int fd AND PTR buf AND size_t nbytes)
+__libc_read (int fd, void *buf, size_t nbytes)
{
char *buffer = (char *) buf;
int data;
int poll;
- errno = 0;
+ __set_errno (0);
if (nbytes == 0)
return 0;
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -63,11 +61,11 @@ DEFUN(__read, (fd, buf, nbytes),
poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0;
- /* Read a single character. This is a cheap way to insure that the
- upper layers get every character because _Console_Getc can't timeout
+ /* Read a single character. This is a cheap way to insure that the
+ upper layers get every character because _Console_Getc can't timeout
or otherwise know when to stop. */
-
+
data = _Console_Getc(poll);
if ( data == -1 ) /* if no data return */
@@ -84,4 +82,5 @@ DEFUN(__read, (fd, buf, nbytes),
return 1;
}
-weak_alias (__read, read)
+weak_alias (__libc_read, __read)
+weak_alias (__libc_read, read)
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index f0ae388..d377dd5 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <sysdep.h>
#include <errno.h>
#include <unistd.h>
@@ -31,28 +30,27 @@ Cambridge, MA 02139, USA. */
/* Write NBYTES of BUF to FD. Return the number written, or -1. */
ssize_t
-DEFUN(__write, (fd, buf, nbytes),
- int fd AND CONST PTR buf AND size_t nbytes)
+__libc_write (int fd, const void *buf, size_t nbytes)
{
int count;
- CONST char *data = buf;
+ const char *data = buf;
if (nbytes == 0)
return 0;
if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */
{
- errno = EBADF;
+ __set_errno (EBADF);
return -1;
}
@@ -70,5 +68,5 @@ DEFUN(__write, (fd, buf, nbytes),
return count;
}
-
-weak_alias (__write, write)
+weak_alias (__libc_write, __write)
+weak_alias (__libc_write, write)
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index 32a2c20..db9ffb5 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec (int sig, const struct sigvec *vec,
+ struct sigvec *ovec);
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,8 +68,11 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig, code, context, addr),
- int sig AND int code AND struct sigcontext *context AND PTR addr)
+trampoline (sig, code, context, addr)
+ int sig;
+ int code;
+ struct sigcontext *context;
+ void *addr;
{
int save[4];
@@ -81,7 +82,7 @@ DEFUN(trampoline, (sig, code, context, addr),
/* XXX should save/restore FP regs */
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
PTR addr))) handlers[sig]))
(sig, code, context, addr);
@@ -95,8 +96,10 @@ DEFUN(trampoline, (sig, code, context, addr),
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -108,7 +111,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 54f6293..11ce194 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -52,8 +50,8 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
/* Defined in __sigvec.S. */
-extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
- struct sigvec *ovec));
+extern int __raw_sigvec __P ((int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec));
/* User-specified signal handlers. */
#define mytramp 1
@@ -70,7 +68,8 @@ extern __sighandler_t _sigfunc[];
Saves and restores the general regs %g2-%g7, the %y register, and
all the FPU regs (including %fsr), around calling the user's handler. */
static void
-DEFUN(trampoline, (sig), int sig)
+trampoline (sig)
+ int sig;
{
/* We use `double' and `long long int' so `std' (store doubleword) insns,
which might be faster than single-word stores, will be generated. */
@@ -97,7 +96,7 @@ DEFUN(trampoline, (sig), int sig)
int code;
register struct sigcontext *context asm("%i0"); /* See end of fn. */
- PTR addr;
+ void *addr;
int y;
double fpsave[16];
int fsr;
@@ -147,8 +146,8 @@ DEFUN(trampoline, (sig), int sig)
glsave[2] = g6;
/* Call the user's handler. */
- (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
- PTR addr))) handlers[sig]))
+ (*((void (*) __P ((int sig, int code, struct sigcontext *context,
+ void *addr))) handlers[sig]))
(sig, code, context, addr);
/* Restore the Y register. */
@@ -199,8 +198,10 @@ DEFUN(trampoline, (sig), int sig)
#endif
int
-DEFUN(__sigvec, (sig, vec, ovec),
- int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+__sigvec (sig, vec, ovec)
+ int sig;
+ const struct sigvec *vec;
+ struct sigvec *ovec;
{
#ifndef mytramp
extern void _sigtramp (int);
@@ -212,11 +213,11 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
- mask = __sigblock(sigmask(sig));
+ mask = __sigblock (sigmask(sig));
ohandler = handlers[sig];
@@ -240,7 +241,7 @@ DEFUN(__sigvec, (sig, vec, ovec),
if (ovec != NULL && ovec->sv_handler == trampoline)
ovec->sv_handler = ohandler;
- (void) __sigsetmask(mask);
+ (void) __sigsetmask (mask);
return 0;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index 1c09d55..de6870a 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -1,5 +1,5 @@
/* `struct termios' speed frobnication functions. SunOS 4 version.
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,12 +17,11 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <stddef.h>
#include <errno.h>
#include <termios.h>
-static CONST speed_t speeds[] =
+static const speed_t speeds[] =
{
0,
50,
@@ -45,28 +44,31 @@ static CONST speed_t speeds[] =
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
{
return termios_p->c_cflag & CBAUD;
}
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
-DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
+cfgetispeed (termios_p)
+ const struct termios *termios_p;
{
return (termios_p->c_cflag & CIBAUD) >> IBSHIFT;
}
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetospeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -82,20 +84,21 @@ DEFUN(cfsetospeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
-DEFUN(cfsetispeed, (termios_p, speed),
- struct termios *termios_p AND speed_t speed)
+cfsetispeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
{
register unsigned int i;
if (termios_p == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -108,6 +111,6 @@ DEFUN(cfsetispeed, (termios_p, speed),
return 0;
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index f88951f..f825d41 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <stddef.h>
#include <termios.h>
@@ -24,8 +23,10 @@ Cambridge, MA 02139, USA. */
/* Set the state of FD to *TERMIOS_P. */
int
-DEFUN(tcsetattr, (fd, optional_actions, termios_p),
- int fd AND int optional_actions AND CONST struct termios *termios_p)
+tcsetattr (fd, optional_actions, termios_p)
+ int fd;
+ int optional_actions;
+ const struct termios *termios_p;
{
unsigned long cmd;
@@ -41,7 +42,7 @@ DEFUN(tcsetattr, (fd, optional_actions, termios_p),
cmd = TCSETSF;
break;
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index 24bcbb4..aec5885 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+__errno:
.comm errno, 4
ENTRY(__start)
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index a9f3c5b..a24c1c5 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,20 +20,19 @@ Cambridge, MA 02139, USA. */
value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
which the default sysconf already knows how to handle. */
-#include <ansidecl.h>
#include <unistd.h>
#include <errno.h>
/* This is an Ultrix header file. */
#include <sys/sysinfo.h>
-extern int EXFUN(__getsysinfo, (unsigned int op, void *buffer,
- size_t nbytes, int *start,
- void *arg));
-extern long int EXFUN(__default_sysconf, (int name));
+extern int __getsysinfo __P ((unsigned int op, void *buffer,
+ size_t nbytes, int *start, void *arg));
+extern long int __default_sysconf __P ((int name));
long int
-DEFUN(__sysconf, (name), int name)
+__sysconf (name)
+ int name;
{
if (name == _SC_CHILD_MAX)
{
@@ -46,11 +45,11 @@ DEFUN(__sysconf, (name), int name)
if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start,
(void *) 0) > 0)
{
- errno = save;
+ __set_errno (save);
return ret;
}
- errno = save;
+ __set_errno (save);
}
return __default_sysconf (name);
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 70a9431..6ba6219 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
#include <sys/sysmp.h>
@@ -28,8 +27,9 @@ extern int __sysmp __P ((int, ...));
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-DEFUN(getpriority, (which, who),
- enum __priority_which which AND int who)
+getpriority (which, who)
+ enum __priority_which which;
+ int who;
{
switch (which)
{
@@ -41,6 +41,6 @@ DEFUN(getpriority, (which, who),
return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who);
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index a632953..322813a 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,14 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/resource.h>
#include <sys/sysmp.h>
int
-DEFUN(setpriority, (which, who, prio),
- enum __priority_which which AND int who AND int prio)
+setpriority (which, who, prio)
+ enum __priority_which which;
+ int who;
+ int prio;
{
switch (which)
{
@@ -35,7 +36,6 @@ DEFUN(setpriority, (which, who, prio),
return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio);
}
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
-
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index cd86f85..b11d27b 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,8 @@ Cambridge, MA 02139, USA. */
/* The first piece of initialized data. */
int __data_start = 0;
-VOLATILE int errno = 0;
+VOLATILE int __errno = 0;
+strong_alias (__errno, errno)
extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
extern int EXFUN(main, (int argc, char **argv, char **envp));
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 731059e..924fc47 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -326,7 +326,7 @@ init_iosys (void)
fprintf(stderr,
"ioperm.init_iosys(): Unable to determine system type.\n"
"\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
- errno = ENODEV;
+ __set_errno (ENODEV);
return -1;
}
}
@@ -349,7 +349,7 @@ init_iosys (void)
}
/* systype is not a know platform name... */
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -366,7 +366,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
/* this test isn't as silly as it may look like; consider overflows! */
if (from >= MAX_PORT || from + num > MAX_PORT)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
@@ -391,7 +391,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
case IOSYS_APECS: base = APECS_IO_BASE; break;
case IOSYS_CIA: base = CIA_IO_BASE; break;
default:
- errno = ENODEV;
+ __set_errno (ENODEV);
return -1;
}
addr = port_to_cpu_addr (from, io.sys, 1);
@@ -425,7 +425,7 @@ _iopl (unsigned int level)
{
if (level > 3)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
if (level)
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
index 3fd5475..402dfc5 100644
--- a/sysdeps/unix/sysv/linux/m68k/brk.c
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -42,11 +42,10 @@ __brk (void *addr)
if (newbrk < addr)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
return -1;
}
return 0;
}
weak_alias (__brk, brk)
-
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index b47e167..407c2d3 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <sysdep.h>
+
/* Because the Linux version is in fact m68k/ELF and the start.? file
for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd
and therefore this files must not contain the definition of the
@@ -31,6 +33,9 @@ errno: .space 4
.globl _errno
.type _errno,@object
_errno = errno /* This name is expected by hj libc.so.5 startup code. */
+ .globl __errno
+ .type __errno,@object
+__errno = errno /* This name is expected by the MT code. */
.text
/* The following code is only used in the shared library when we
@@ -39,14 +44,9 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */
#ifndef PIC
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
/* The syscall stubs jump here when they detect an error. */
-.globl __syscall_error
-__syscall_error:
+ENTRY(__syscall_error)
neg.l %d0
move.l %d0, errno
#ifdef _LIBC_REENTRANT
@@ -62,9 +62,7 @@ __syscall_error:
.size __syscall_error, . - __syscall_error
#endif /* PIC */
- .globl __errno_location
- .type __errno_location, @function
-__errno_location:
+ERRNO(__errno_location)
#ifdef PIC
move.l (%pc, errno@GOTPC), %a0
#else
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 9de750c..cfc9b04 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -86,7 +86,7 @@ syscall_error: \
neg.l %d0; \
move.l %d0, (%a0); \
move.l %d0, -(%sp); \
- jbsr __errno_location@PLTPC \
+ jbsr __errno_location@PLTPC; \
move.l (%sp)+, (%a0); \
move.l POUND -1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 68fd7a1..37893fa 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
#include <stddef.h>
@@ -38,15 +37,17 @@ trampoline (int sig, int code, struct sigcontext *context)
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
int
-DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *oact)
+__sigaction (sig, act, oact)
+ int sig;
+ const struct sigaction *act;
+ struct sigaction *oact;
{
struct sigaction myact;
__sighandler_t ohandler;
if (sig <= 0 || sig >= NSIG)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 81d660f..cd0e844 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <unistd.h>
@@ -24,16 +23,17 @@ Cambridge, MA 02139, USA. */
#include <time.h>
#include <sysconfig.h>
-extern int EXFUN(__sysconfig, (int));
+extern int __sysconfig __P ((int));
/* Get the value of the system variable NAME. */
long int
-DEFUN(__sysconf, (name), int name)
+__sysconf (name)
+ int name;
{
switch (name)
{
default:
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
case _SC_ARG_MAX:
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index f54df4b..586a374 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -53,8 +52,7 @@ extern int __waitid __P ((__idtype_t idtype, __pid_t id,
return status for stopped children; otherwise don't. */
__pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
- __pid_t pid AND int *stat_loc AND int options)
+__libc_waitpid (__pid_t pid, int *stat_loc, int options)
{
__idtype_t idtype;
__pid_t tmp_pid = pid;
@@ -117,4 +115,5 @@ DEFUN(__waitpid, (pid, stat_loc, options),
return infop.__pid;
}
-weak_alias (__waitpid, waitpid)
+weak_alias (__libc_waitpid, __waitpid)
+weak_alias (__libc_waitpid, waitpid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69e4430b4dbd01485a9c668dbcbb574a07accce1
commit 69e4430b4dbd01485a9c668dbcbb574a07accce1
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 21 12:41:17 1996 +0000
Why are these removed?
diff --git a/sysdeps/m68k/fpu/e_atan2.c b/sysdeps/m68k/fpu/e_atan2.c
new file mode 100644
index 0000000..ae7a799
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atan2.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atan2
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/e_atan2f.c b/sysdeps/m68k/fpu/e_atan2f.c
new file mode 100644
index 0000000..a4c5ebd
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atan2f.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atan2f
+#include <e_fmodf.c>
diff --git a/sysdeps/m68k/fpu/e_atan2l.c b/sysdeps/m68k/fpu/e_atan2l.c
new file mode 100644
index 0000000..0d43a77
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atan2l.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atan2l
+#include <e_fmodl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22a45bf1a84e99417bffe52cfaf4b592ba205715
commit 22a45bf1a84e99417bffe52cfaf4b592ba205715
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 20 01:57:51 1996 +0000
update from main archive 960919
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 4992aea..0e3e2a3 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,30 +39,30 @@ Cambridge, MA 02139, USA. */
__m81_inline rettype \
__m81_u(func) args
+/* Define the three variants of a math function that has a direct
+ implementation in the m68k fpu. FUNC is the name for C (which will be
+ suffixed with f and l for the float and long double version, resp). OP
+ is the name of the fpu operation (without leading f). */
#define __inline_mathop(func, op) \
__m81_defun (double, func, (double __mathop_x)) \
{ \
double __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
- }
-
-#define __inline_mathopf(func, op) \
- __m81_defun (float, func, (float __mathop_x)) \
+ } \
+ __m81_defun (float, func##f, (float __mathop_x)) \
{ \
float __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
- }
-
-#define __inline_mathopl(func, op) \
- __m81_defun (long double, func, (long double __mathop_x)) \
+ } \
+ __m81_defun (long double, func##l, (long double __mathop_x)) \
{ \
long double __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
-
+
/* ieee style elementary functions */
__inline_mathop(__ieee754_acos, acos)
__inline_mathop(__ieee754_asin, asin)
@@ -74,28 +74,6 @@ __inline_mathop(__ieee754_log, logn)
__inline_mathop(__ieee754_sqrt, sqrt)
__inline_mathop(__ieee754_atanh, atanh)
-/* ieee style elementary float functions */
-__inline_mathopf(__ieee754_acosf, acos)
-__inline_mathopf(__ieee754_asinf, asin)
-__inline_mathopf(__ieee754_coshf, cosh)
-__inline_mathopf(__ieee754_sinhf, sinh)
-__inline_mathopf(__ieee754_expf, etox)
-__inline_mathopf(__ieee754_log10f, log10)
-__inline_mathopf(__ieee754_logf, logn)
-__inline_mathopf(__ieee754_sqrtf, sqrt)
-__inline_mathopf(__ieee754_atanhf, atan)
-
-/* ieee style elementary long double functions */
-__inline_mathopl(__ieee754_acosl, acos)
-__inline_mathopl(__ieee754_asinl, asin)
-__inline_mathopl(__ieee754_coshl, cosh)
-__inline_mathopl(__ieee754_sinhl, sinh)
-__inline_mathopl(__ieee754_expl, etox)
-__inline_mathopl(__ieee754_log10l, log10)
-__inline_mathopl(__ieee754_logl, logn)
-__inline_mathopl(__ieee754_sqrtl, sqrt)
-__inline_mathopl(__ieee754_atanhl, atan)
-
__inline_mathop(__atan, atan)
__inline_mathop(__cos, cos)
__inline_mathop(__sin, sin)
@@ -110,517 +88,226 @@ __inline_mathop(__log1p, lognp1)
__inline_mathop(__logb, log2)
__inline_mathop(__significand, getman)
-__inline_mathopf(__atanf, atan)
-__inline_mathopf(__cosf, cos)
-__inline_mathopf(__sinf, sin)
-__inline_mathopf(__tanf, tan)
-__inline_mathopf(__tanhf, tanh)
-__inline_mathopf(__fabsf, abs)
-__inline_mathopf(__sqrtf, sqrt)
-
-__inline_mathopf(__rintf, int)
-__inline_mathopf(__expm1f, etoxm1)
-__inline_mathopf(__log1pf, lognp1)
-__inline_mathopf(__logbf, log2)
-__inline_mathopf(__significandf, getman)
-
-__inline_mathopl(__atanl, atan)
-__inline_mathopl(__cosl, cos)
-__inline_mathopl(__sinl, sin)
-__inline_mathopl(__tanl, tan)
-__inline_mathopl(__tanhl, tanh)
-__inline_mathopl(__fabsl, abs)
-__inline_mathopl(__sqrtl, sqrt)
-
-__inline_mathopl(__rintl, int)
-__inline_mathopl(__expm1l, etoxm1)
-__inline_mathopl(__log1pl, lognp1)
-__inline_mathopl(__logbl, log2)
-__inline_mathopl(__significandl, getman)
-
-__m81_defun (double, __ieee754_remainder, (double __x, double __y))
-{
- double __result;
- __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_defun (double, __ldexp, (double __x, int __e))
-{
- double __result;
- double __double_e = (double) __e;
- __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_e), "0" (__x));
- return __result;
-}
-
-__m81_defun (double, __ieee754_fmod, (double __x, double __y))
-{
- double __result;
- __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_inline double
-__m81_u(__frexp)(double __value, int *__expptr)
-{
- double __mantissa, __exponent;
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
- __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
- *__expptr = (int) __exponent;
- return __mantissa;
-}
-
-__m81_defun (double, __floor, (double __x))
-{
- double __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards negative infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
- /* Convert X to an integer, using -Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_defun (double, __ieee754_pow, (double __x, double __y))
-{
- double __result;
- if (__x == 0.0)
- {
- if (__y <= 0.0)
- __result = 0.0 / 0.0;
- else
- __result = 0.0;
- }
- else if (__y == 0.0 || __x == 1.0)
- __result = 1.0;
- else if (__y == 1.0)
- __result = __x;
- else if (__y == 2.0)
- __result = __x * __x;
- else if (__x == 10.0)
- __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x == 2.0)
- __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x < 0.0)
- {
- double __temp = __m81_u (__rint) (__y);
- if (__y == __temp)
- {
- int i = (int) __y;
- __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(-__x));
- if (i & 1)
- __result = -__result;
- }
- else
- __result = 0.0 / 0.0;
- }
- else
- __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(__x));
- return __result;
-}
-
-__m81_defun (double, __ceil, (double __x))
-{
- double __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards positive infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg | 0x30));
- /* Convert X to an integer, using +Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_inline double
-__m81_u(__modf)(double __value, double *__iptr)
-{
- double __modf_int;
- __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
- *__iptr = __modf_int;
- return __value - __modf_int;
-}
-
-__m81_defun (int, __isinf, (double __value))
-{
- /* There is no branch-condition for infinity,
- so we must extract and examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
-}
-
-__m81_defun (int, __isnan, (double __value))
-{
- char __result;
- __asm("ftst%.x %1\n"
- "fsun %0" : "=dm" (__result) : "f" (__value));
- return __result;
-}
-
-__m81_defun (int, __finite, (double __value))
-{
- /* There is no branch-condition for infinity, so we must extract and
- examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm ("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (3 << 24)) == 0;
-}
-
-__m81_defun (int, __ilogb, (double __x))
-{
- double __result;
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
- return (int) __result;
-}
-
-__m81_defun (double, __ieee754_scalb, (double __x, double __n))
-{
- double __result;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
- return __result;
-}
-
-__m81_defun (double, __scalbn, (double __x, int __n))
-{
- double __result;
- double __double_n = (double) __n;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_n), "0" (__x));
- return __result;
-}
-
-__m81_defun (float, __ieee754_remainderf, (float __x, float __y))
-{
- float __result;
- __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_defun (float, __ldexpf, (float __x, int __e))
-{
- float __result;
- float __float_e = (float) __e;
- __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x));
- return __result;
-}
-
-__m81_defun (float, __ieee754_fmodf, (float __x, float __y))
-{
- float __result;
- __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_inline float
-__m81_u(__frexpf)(float __value, int *__expptr)
-{
- float __mantissa, __exponent;
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
- __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
- *__expptr = (int) __exponent;
- return __mantissa;
-}
-
-__m81_defun (float, __floorf, (float __x))
-{
- float __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards negative infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
- /* Convert X to an integer, using -Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_defun (float, __ieee754_powf, (float __x, float __y))
-{
- float __result;
- if (__x == 0.0f)
- {
- if (__y <= 0.0f)
- __result = 0.0f / 0.0f;
- else
- __result = 0.0f;
- }
- else if (__y == 0.0f || __x == 1.0f)
- __result = 1.0;
- else if (__y == 1.0f)
- __result = __x;
- else if (__y == 2.0f)
- __result = __x * __x;
- else if (__x == 10.0f)
- __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x == 2.0f)
- __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x < 0.0f)
- {
- float __temp = __m81_u(__rintf)(__y);
- if (__y == __temp)
- {
- int i = (int) __y;
- __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(-__x));
- if (i & 1)
- __result = -__result;
- }
- else
- __result = 0.0f / 0.0f;
- }
- else
- __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(__x));
- return __result;
-}
-
-__m81_defun (float, __ceilf, (float __x))
-{
- float __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards positive infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg | 0x30));
- /* Convert X to an integer, using +Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_inline float
-__m81_u(__modff)(float __value, float *__iptr)
-{
- float __modf_int;
- __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
- *__iptr = __modf_int;
- return __value - __modf_int;
-}
-
-__m81_defun (int, __isinff, (float __value))
-{
- /* There is no branch-condition for infinity,
- so we must extract and examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
-}
-
-__m81_defun (int, __isnanf, (float __value))
-{
- char __result;
- __asm("ftst%.x %1\n"
- "fsun %0" : "=dm" (__result) : "f" (__value));
- return __result;
-}
-
-__m81_defun (int, __finitef, (float __value))
-{
- /* There is no branch-condition for infinity, so we must extract and
- examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm ("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (3 << 24)) == 0;
-}
-
-__m81_defun (int, __ilogbf, (float __x))
-{
- float __result;
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
- return (int) __result;
-}
-
-__m81_defun (float, __ieee754_scalbf, (float __x, float __n))
-{
- float __result;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
- return __result;
-}
-
-__m81_defun (float, __scalbnf, (float __x, int __n))
-{
- float __result;
- float __float_n = (float) __n;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x));
- return __result;
-}
-
-__m81_defun (long double, __ieee754_remainderl, (long double __x,
- long double __y))
-{
- long double __result;
- __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_defun (long double, __ldexpl, (long double __x, int __e))
-{
- long double __result;
- long double __float_e = (long double) __e;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x));
- return __result;
-}
-
-__m81_defun (long double, __ieee754_fmodl, (long double __x, long double __y))
-{
- long double __result;
- __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
- return __result;
-}
-
-__m81_inline long double
-__m81_u(__frexpl)(long double __value, int *__expptr)
-{
- long double __mantissa, __exponent;
- __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
- __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
- *__expptr = (int) __exponent;
- return __mantissa;
-}
-
-__m81_defun (long double, __floorl, (long double __x))
-{
- long double __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards negative infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
- /* Convert X to an integer, using -Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_defun (long double, __ieee754_powl, (long double __x, long double __y))
-{
- long double __result;
- if (__x == 0.0l)
- {
- if (__y <= 0.0l)
- __result = 0.0l / 0.0l;
- else
- __result = 0.0l;
- }
- else if (__y == 0.0l || __x == 1.0l)
- __result = 1.0;
- else if (__y == 1.0l)
- __result = __x;
- else if (__y == 2.0l)
- __result = __x * __x;
- else if (__x == 10.0l)
- __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x == 2.0l)
- __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
- else if (__x < 0.0l)
- {
- long double __temp = __m81_u(__rintl)(__y);
- if (__y == __temp)
- {
- int i = (int) __y;
- __result
- = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(-__x));
- if (i & 1)
- __result = -__result;
- }
- else
- __result = 0.0l / 0.0l;
- }
- else
- __result = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(__x));
- return __result;
-}
-
-__m81_defun (long double, __ceill, (long double __x))
-{
- long double __result;
- unsigned long int __ctrl_reg;
- __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
- /* Set rounding towards positive infinity. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg | 0x30));
- /* Convert X to an integer, using +Inf rounding. */
- __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
- /* Restore the previous rounding mode. */
- __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
- : "dmi" (__ctrl_reg));
- return __result;
-}
-
-__m81_inline long double
-__m81_u(__modfl)(long double __value, long double *__iptr)
-{
- long double __modf_int;
- __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
- *__iptr = __modf_int;
- return __value - __modf_int;
-}
-
-__m81_defun (int, __isinfl, (long double __value))
-{
- /* There is no branch-condition for infinity,
- so we must extract and examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
-}
-
-__m81_defun (int, __isnanl, (long double __value))
-{
- char __result;
- __asm("ftst%.x %1\n"
- "fsun %0" : "=dm" (__result) : "f" (__value));
- return __result;
-}
-
-__m81_defun (int, __finitel, (long double __value))
-{
- /* There is no branch-condition for infinity, so we must extract and
- examine the condition codes manually. */
- unsigned long int __fpsr;
- __asm ("ftst%.x %1\n"
- "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (3 << 24)) == 0;
-}
-
-__m81_defun (int, __ilogbl, (long double __x))
-{
- long double __result;
- __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
- return (int) __result;
-}
-
-__m81_defun (long double, __ieee754_scalbl, (long double __x, long double __n))
-{
- long double __result;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
- return __result;
-}
-
-__m81_defun (long double, __scalbnl, (long double __x, int __n))
-{
- long double __result;
- long double __float_n = (long double) __n;
- __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x));
- return __result;
-}
+/* This macro contains the definition for the rest of the inline
+ functions, using __FLOAT_TYPE as the domain type and __S as the suffix
+ for the function names. */
+
+#define __inline_functions(__float_type, __s) \
+__m81_defun (__float_type, \
+ __ieee754_remainder##__s, (__float_type __x, __float_type __y)) \
+{ \
+ __float_type __result; \
+ __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (__float_type, \
+ __ieee754_fmod##__s, (__float_type __x, __float_type __y)) \
+{ \
+ __float_type __result; \
+ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (__float_type, \
+ __ieee754_atan2##__s, (__float_type __y, __float_type __x)) \
+{ \
+ __float_type __pi, __pi_2; \
+ \
+ __asm ("fmovecr%.x %#0, %0" : "=f" (__pi)); \
+ __asm ("fscale%.w %#-1, %0" : "=f" (__pi_2) : "0" (__pi)); \
+ if (__x > 0) \
+ { \
+ if (__y > 0) \
+ { \
+ if (__x > __y) \
+ return __m81_u(__atan##__s) (__y / __x); \
+ else \
+ return __pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ } \
+ else \
+ { \
+ if (__x > -__y) \
+ return __m81_u(__atan##__s) (__y / __x); \
+ else \
+ return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ } \
+ } \
+ else \
+ { \
+ if (__y > 0) \
+ { \
+ if (-__x < __y) \
+ return __pi + __m81_u(__atan##__s) (__y / __x); \
+ else \
+ return __pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ } \
+ else \
+ { \
+ if (-__x > -__y) \
+ return -__pi + __m81_u(__atan##__s) (__y / __x); \
+ else \
+ return -__pi_2 - __m81_u(__atan##__s) (__x / __y); \
+ } \
+ } \
+} \
+ \
+__m81_inline __float_type \
+__m81_u(__frexp##__s)(__float_type __value, int *__expptr) \
+{ \
+ __float_type __mantissa, __exponent; \
+ int __iexponent; \
+ if (__value == 0.0) \
+ { \
+ *__expptr = 0; \
+ return __value; \
+ } \
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \
+ __iexponent = (int) __exponent + 1; \
+ *__expptr = __iexponent; \
+ __asm("fscale%.l %2, %0" : "=f" (__mantissa) \
+ : "0" (__value), "dmi" (-__iexponent)); \
+ return __mantissa; \
+} \
+ \
+__m81_defun (__float_type, __floor##__s, (__float_type __x)) \
+{ \
+ __float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards negative infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \
+ /* Convert X to an integer, using -Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_defun (__float_type, \
+ __ieee754_pow##__s, (__float_type __x, __float_type __y)) \
+{ \
+ __float_type __result; \
+ if (__x == 0.0) \
+ { \
+ if (__y <= 0.0) \
+ __result = 0.0 / 0.0; \
+ else \
+ __result = 0.0; \
+ } \
+ else if (__y == 0.0 || __x == 1.0) \
+ __result = 1.0; \
+ else if (__y == 1.0) \
+ __result = __x; \
+ else if (__y == 2.0) \
+ __result = __x * __x; \
+ else if (__x == 10.0) \
+ __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
+ else if (__x == 2.0) \
+ __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y)); \
+ else if (__x < 0.0) \
+ { \
+ __float_type __temp = __m81_u (__rint##__s) (__y); \
+ if (__y == __temp) \
+ { \
+ int __i = (int) __y; \
+ __result = (__m81_u(__ieee754_exp##__s) \
+ (__y * __m81_u(__ieee754_log##__s) (-__x))); \
+ if (__i & 1) \
+ __result = -__result; \
+ } \
+ else \
+ __result = 0.0 / 0.0; \
+ } \
+ else \
+ __result = (__m81_u(__ieee754_exp##__s) \
+ (__y * __m81_u(__ieee754_log##__s) (__x))); \
+ return __result; \
+} \
+ \
+__m81_defun (__float_type, __ceil##__s, (__float_type __x)) \
+{ \
+ __float_type __result; \
+ unsigned long int __ctrl_reg; \
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \
+ /* Set rounding towards positive infinity. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg | 0x30)); \
+ /* Convert X to an integer, using +Inf rounding. */ \
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ /* Restore the previous rounding mode. */ \
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \
+ : "dmi" (__ctrl_reg)); \
+ return __result; \
+} \
+ \
+__m81_inline __float_type \
+__m81_u(__modf##__s)(__float_type __value, __float_type *__iptr) \
+{ \
+ __float_type __modf_int; \
+ __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value)); \
+ *__iptr = __modf_int; \
+ return __value - __modf_int; \
+} \
+ \
+__m81_defun (int, __isinf##__s, (__float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, \
+ so we must extract and examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \
+} \
+ \
+__m81_defun (int, __isnan##__s, (__float_type __value)) \
+{ \
+ char __result; \
+ __asm("ftst%.x %1\n" \
+ "fsun %0" : "=dm" (__result) : "f" (__value)); \
+ return __result; \
+} \
+ \
+__m81_defun (int, __finite##__s, (__float_type __value)) \
+{ \
+ /* There is no branch-condition for infinity, so we must extract and \
+ examine the condition codes manually. */ \
+ unsigned long int __fpsr; \
+ __asm ("ftst%.x %1\n" \
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \
+ return (__fpsr & (3 << 24)) == 0; \
+} \
+ \
+__m81_defun (int, __ilogb##__s, (__float_type __x)) \
+{ \
+ __float_type __result; \
+ if (__x == 0.0) \
+ return 0x80000001; \
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x)); \
+ return (int) __result; \
+} \
+ \
+__m81_defun (__float_type, \
+ __ieee754_scalb##__s, (__float_type __x, __float_type __n)) \
+{ \
+ __float_type __result; \
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x)); \
+ return __result; \
+} \
+ \
+__m81_defun (__float_type, __scalbn##__s, (__float_type __x, int __n)) \
+{ \
+ __float_type __result; \
+ __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \
+ return __result; \
+}
+
+/* This defines the three variants of the inline functions. */
+__inline_functions (double, )
+__inline_functions (float, f)
+__inline_functions (long double, l)
+#undef __inline_functions
#endif /* GCC. */
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
deleted file mode 100644
index 18f4d43..0000000
--- a/sysdeps/m68k/fpu/s_ldexp.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_M81_MATH_INLINES
-#include <math.h>
-
-#ifndef FUNC
-#define FUNC ldexp
-#endif
-#ifndef float_type
-#define float_type double
-#endif
-
-#define __CONCATX(a,b) __CONCAT(a,b)
-
-float_type
-DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp)
-{
- return __m81_u(__CONCATX(__,FUNC))(x, exp);
-}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c
deleted file mode 100644
index 81a6b28..0000000
--- a/sysdeps/m68k/fpu/s_ldexpf.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef FUNC
-#define FUNC ldexpf
-#endif
-#define float_type float
-#include <s_ldexp.c>
diff --git a/sysdeps/m68k/fpu/s_ldexpl.c b/sysdeps/m68k/fpu/s_ldexpl.c
deleted file mode 100644
index 25796b7..0000000
--- a/sysdeps/m68k/fpu/s_ldexpl.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifndef FUNC
-#define FUNC ldexpl
-#endif
-#define float_type long double
-#include <s_ldexp.c>
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
index 433aa75..4039bba 100644
--- a/sysdeps/m68k/fpu/s_scalbn.c
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -1,2 +1,40 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
#define FUNC scalbn
#include <s_ldexp.c>
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x, exp);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c
index 00461dc..55d64fd 100644
--- a/sysdeps/m68k/fpu/s_scalbnf.c
+++ b/sysdeps/m68k/fpu/s_scalbnf.c
@@ -1,2 +1,6 @@
+#ifndef FUNC
#define FUNC scalbnf
#include <s_ldexpf.c>
+#endif
+#define float_type float
+#include <s_scalbn.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c
index 83e8bfe..8484992 100644
--- a/sysdeps/m68k/fpu/s_scalbnl.c
+++ b/sysdeps/m68k/fpu/s_scalbnl.c
@@ -1,2 +1,6 @@
+#ifndef FUNC
#define FUNC scalbnl
#include <s_ldexpl.c>
+#endif
+#define float_type long double
+#include <s_scalbn.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 674715f..b47e167 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -62,7 +62,6 @@ __syscall_error:
.size __syscall_error, . - __syscall_error
#endif /* PIC */
-#ifdef _LIBC_REENTRANT
.globl __errno_location
.type __errno_location, @function
__errno_location:
@@ -73,4 +72,3 @@ __errno_location:
#endif
rts
.size __errno_location, . - __errno_location
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf4b3107628855b3084c448615858f2e80ffaa3f
commit bf4b3107628855b3084c448615858f2e80ffaa3f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 12 02:50:36 1996 +0000
update from main archive 960911
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index a281cba..738b9cc 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1,2 +1 @@
-init-first.h
clone.S
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
index 895ea27..674715f 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.S
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -33,8 +33,9 @@ errno: .space 4
_errno = errno /* This name is expected by hj libc.so.5 startup code. */
.text
-/* The following code is not used at all in the shared library.
- The PIC system call stubs set errno themselves. */
+/* The following code is only used in the shared library when we
+ compile the reentrant version. Otherwise each system call defines
+ each own version. */
#ifndef PIC
@@ -42,30 +43,34 @@ _errno = errno /* This name is expected by hj libc.so.5 startup code. */
#define _ERRNO_H
#include <errnos.h>
-.globl errno
-.globl __syscall_error
-
/* The syscall stubs jump here when they detect an error. */
.globl __syscall_error
__syscall_error:
neg.l %d0
-
-#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
- /* We translate the system's EWOULDBLOCK error into EAGAIN.
- The GNU C library always defines EWOULDBLOCK==EAGAIN.
- EWOULDBLOCK_sys is the original number. */
- move.l #EWOULDBLOCK_sys, %d1
- cmp.l %d0, %d1
- jne 1f
- move.l #EAGAIN, %d0
-1:
-#endif
-
move.l %d0, errno
+#ifdef _LIBC_REENTRANT
+ move.l %d0, -(%sp)
+ jbsr __errno_location
+ move.l (%sp)+, (%a0)
+#endif
move.l #-1, %d0
/* Copy return value to %a0 for syscalls that are declared to
return a pointer. */
move.l %d0, %a0
rts
+ .size __syscall_error, . - __syscall_error
#endif /* PIC */
+
+#ifdef _LIBC_REENTRANT
+ .globl __errno_location
+ .type __errno_location, @function
+__errno_location:
+#ifdef PIC
+ move.l (%pc, errno@GOTPC), %a0
+#else
+ lea errno, %a0
+#endif
+ rts
+ .size __errno_location, . - __errno_location
+#endif
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index fe2c6aa..9de750c 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -78,19 +78,37 @@ Cambridge, MA 02139, USA. */
#ifdef PIC
/* Store (- %d0) into errno through the GOT. */
+#ifdef _LIBC_REENTRANT
#define SYSCALL_ERROR_HANDLER \
+ .type syscall_error, @function; \
syscall_error: \
move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
move.l %d0, (%a0); \
+ move.l %d0, -(%sp); \
+ jbsr __errno_location@PLTPC \
+ move.l (%sp)+, (%a0); \
move.l POUND -1, %d0; \
/* Copy return value to %a0 for syscalls that are declared to return \
a pointer (e.g., mmap). */ \
move.l %d0, %a0; \
rts;
#else
+#define SYSCALL_ERROR_HANDLER \
+ .type syscall_error, @function; \
+syscall_error: \
+ move.l (errno@GOTPC, %pc), %a0; \
+ neg.l %d0; \
+ move.l %d0, (%a0); \
+ move.l POUND -1, %d0; \
+ /* Copy return value to %a0 for syscalls that are declared to return \
+ a pointer (e.g., mmap). */ \
+ move.l %d0, %a0; \
+ rts;
+#endif /* _LIBC_REENTRANT */
+#else
#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
-#endif
+#endif /* PIC */
/* Linux takes system call arguments in registers:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=862eb33e44f4d0ee3dd874f5f2a7e812d753cb01
commit 862eb33e44f4d0ee3dd874f5f2a7e812d753cb01
Author: Thomas Bushnell, BSG <thomas@gnu.org>
Date: Wed Sep 11 02:47:56 1996 +0000
*** empty log message ***
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c
deleted file mode 100644
index dfc16fd..0000000
--- a/sysdeps/mach/hurd/alpha/longjmp-ctx.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Perform a `longjmp' on a `struct sigcontext'. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <setjmp.h>
-#include <hurd/signal.h>
-#include <string.h>
-
-void
-_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
-{
- memset (scp, 0, sizeof (*scp));
- scp->sc_regs[9] = env[0].__9;
- scp->sc_regs[11] = env[0].__11;
- scp->sc_regs[12] = env[0].__12;
- scp->sc_regs[13] = env[0].__13;
- scp->sc_regs[14] = env[0].__14;
- scp->sc_regs[15] = (long int) env[0].__fp;
- scp->sc_regs[30] = (long int) env[0].__sp;
- scp->sc_pc = (long int) env[0].__pc;
-
- memcpy (&scp->sc_fpregs[2], &env[0].__f2, sizeof (double));
-}
diff --git a/sysdeps/mach/hurd/mips/init-fault.c b/sysdeps/mach/hurd/mips/init-fault.c
deleted file mode 100644
index e6f8acf..0000000
--- a/sysdeps/mach/hurd/mips/init-fault.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Set up a thread_state for proc_handle_exceptions. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <hurd/signal.h>
-#include <mach/thread_status.h>
-#include <string.h>
-#include <setjmp.h>
-
-extern jmp_buf _hurd_sigthread_fault_env;
-
-static char fault_stack[32];
-static volatile void
-faulted (void)
-{
- __longjmp (_hurd_sigthread_fault_env, 1);
-}
-
-void
-_hurd_initialize_fault_recovery_state (void *state)
-{
- struct mips_thread_state *ts = state;
- memset (ts, 0, sizeof (*ts));
- ts->r29 = (int) &fault_stack[sizeof (fault_stack)];
- ts->pc = (int) &faulted;
-}
diff --git a/sysdeps/mach/hurd/mips/longjmp-ctx.c b/sysdeps/mach/hurd/mips/longjmp-ctx.c
deleted file mode 100644
index 0c78f6b..0000000
--- a/sysdeps/mach/hurd/mips/longjmp-ctx.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Perform a `longjmp' on a `struct sigcontext'. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <setjmp.h>
-#include <hurd/signal.h>
-#include <string.h>
-
-void
-_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
-{
- scp->sc_gpr[16] = env[0].__regs[0];
- scp->sc_gpr[17] = env[0].__regs[1];
- scp->sc_gpr[18] = env[0].__regs[2];
- scp->sc_gpr[19] = env[0].__regs[3];
- scp->sc_gpr[20] = env[0].__regs[4];
- scp->sc_gpr[21] = env[0].__regs[5];
- scp->sc_gpr[22] = env[0].__regs[6];
- scp->sc_gpr[23] = env[0].__regs[7];
-
- scp->sc_gpr[28] = (int) env[0].__gp;
- scp->sc_fp = (int) env[0].__fp;
- scp->sc_sp = (int) env[0].__sp;
- scp->sc_pc = (int) env[0].__pc;
- scp->sc_gpr[2] = retval ?: 1;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=16d6b38e4db6f3b9e41508d8ab902208f0ab9b04
commit 16d6b38e4db6f3b9e41508d8ab902208f0ab9b04
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Sep 10 01:59:36 1996 +0000
update from main archive 960909
diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/s_copysign.S
similarity index 100%
rename from sysdeps/alpha/copysign.S
rename to sysdeps/alpha/s_copysign.S
diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/s_fabs.S
similarity index 94%
rename from sysdeps/alpha/fabs.S
rename to sysdeps/alpha/s_fabs.S
index dff8390..12c0abd 100644
--- a/sysdeps/alpha/fabs.S
+++ b/sysdeps/alpha/s_fabs.S
@@ -19,9 +19,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY(fabs)
+ENTRY(__fabs)
.prologue 0
cpys $f31,$f16,$f0
ret
- END(fabs)
+ END(__fabs)
+weak_alias (__fabs, fabs)
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 2cbb4ca..4992aea 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <sys/cdefs.h>
-#ifdef __NO_MATH_INLINES
+#ifdef __NO_M81_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
__ names, and with `static inline' instead of `extern inline' so the
bodies will always be used, never an external function call. */
@@ -29,7 +29,7 @@ Cambridge, MA 02139, USA. */
#else
#define __m81_u(x) x
#define __m81_inline extern __inline
-#define __MATH_INLINES 1
+#define __M81_MATH_INLINES 1
#endif
/* Define a const math function. */
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index ae77dab..61c374d 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -16,8 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
+#include "math_private.h"
#ifndef FUNC
#define FUNC __ieee754_acos
@@ -27,7 +28,8 @@ Cambridge, MA 02139, USA. */
#endif
float_type
-DEFUN(FUNC, (x), float_type x)
+FUNC (x)
+ float_type x;
{
return __m81_u(FUNC)(x);
}
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 0b2468c..bf2f7ed 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -16,8 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
+#include "math_private.h"
#ifndef FUNC
#define FUNC __ieee754_fmod
@@ -27,7 +28,9 @@ Cambridge, MA 02139, USA. */
#endif
float_type
-DEFUN(FUNC, (x, y), float_type x AND float_type y)
+FUNC (x, y)
+ float_type x;
+ float_type y;
{
return __m81_u(FUNC)(x, y);
}
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 61f566f..6bb9090 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define __NO_M81_MATH_INLINES
#include <math.h>
+#include "math_private.h"
#ifndef FUNC
#define FUNC cos
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 3eed1d4..f10c7f9 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define __NO_M81_MATH_INLINES
#include <math.h>
+#include "math_private.h"
#ifndef FUNC
#define FUNC sin
@@ -35,7 +37,7 @@ __CONCATX(__kernel_,FUNC) (x, y, iy)
{
float_type sin_x, cos_x, sin_y, cos_y;
if (iy == 0)
- return __m81_u_(__CONCATX(__,FUNC)) (x);
+ return __m81_u(__CONCATX(__,FUNC)) (x);
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x)
: "f" (x));
__asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y)
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index 7f1b729..9c222cd 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define __NO_M81_MATH_INLINES
#include <math.h>
+#include "math_private.h"
#ifndef FUNC
#define FUNC tan
@@ -34,8 +36,8 @@ __CONCATX(__kernel_,FUNC) (x, y, iy)
int iy;
{
float_type tan_x, tan_y;
- tan_x = __m81_u_(__CONCATX(__,FUNC)) (x);
- tan_y = __m81_u_(__CONCATX(__,FUNC)) (y);
+ tan_x = __m81_u(__CONCATX(__,FUNC)) (x);
+ tan_y = __m81_u(__CONCATX(__,FUNC)) (y);
if (iy > 0)
return (tan_x + tan_y) / (1 - tan_x * tan_y);
else
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index 29717d4..99b3024 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 16f3039..8b38086 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index c80a288..39c8714 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 570a7ba..7d4b1c4 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
index ea8bfba..18f4d43 100644
--- a/sysdeps/m68k/fpu/s_ldexp.c
+++ b/sysdeps/m68k/fpu/s_ldexp.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index f704260..426d847 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#define __NO_M81_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/isinfl.c b/sysdeps/m68k/s_isinfl.c
similarity index 100%
rename from sysdeps/m68k/isinfl.c
rename to sysdeps/m68k/s_isinfl.c
diff --git a/sysdeps/m68k/isnanl.c b/sysdeps/m68k/s_isnanl.c
similarity index 100%
rename from sysdeps/m68k/isnanl.c
rename to sysdeps/m68k/s_isnanl.c
diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c
deleted file mode 100644
index 2cf2cee..0000000
--- a/sysdeps/tahoe/log10.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) }
-
-#include <../sysdeps/vax/log10.c>
-
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index d898d04..d79f1f2 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -4,3 +4,4 @@ ioperm.c
init-first.h
clone.S
sys/io.h
+llseek.S
diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.h b/sysdeps/unix/sysv/linux/m68k/init-first.h
deleted file mode 100644
index 7d8c320..0000000
--- a/sysdeps/unix/sysv/linux/m68k/init-first.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* This fragment is invoked in the stack context of program start.
- Its job is to set up a pointer to argc as an argument, pass
- control to `INIT', and, if necessary, clean up after the call
- to leave the stack in the same condition it was found in. */
-
-#define SYSDEP_CALL_INIT(NAME, INIT) \
- asm(".globl " #NAME "\n\t" \
- #NAME ":\n\t" \
- "pea %sp@(4)\n\t" \
- "jbsr " #INIT "\n\t" \
- "addq #4,%sp\n\t" \
- "rts");
diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist
index 9830be2..22a6930 100644
--- a/sysdeps/vax/Dist
+++ b/sysdeps/vax/Dist
@@ -1 +1,2 @@
DEFS.h
+fl.h
diff --git a/sysdeps/vax/bcmp.s b/sysdeps/vax/bcmp.s
deleted file mode 100644
index d980feb..0000000
--- a/sysdeps/vax/bcmp.s
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)bcmp.s 5.6 (Berkeley) 6/1/90"
-#endif /* LIBC_SCCS and not lint */
-
-/* bcmp(s1, s2, n) */
-
-#include "DEFS.h"
-
-ENTRY(bcmp, 0)
- movl 4(ap),r1
- movl 8(ap),r3
- movl 12(ap),r4
-1:
- movzwl $65535,r0
- cmpl r4,r0
- jleq 2f
- subl2 r0,r4
- cmpc3 r0,(r1),(r3)
- jeql 1b
- addl2 r4,r0
- ret
-2:
- cmpc3 r4,(r1),(r3)
- ret
diff --git a/sysdeps/vax/index.s b/sysdeps/vax/index.s
deleted file mode 100644
index e599b27..0000000
--- a/sysdeps/vax/index.s
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)index.s 5.6 (Berkeley) 6/1/90"
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Find the first occurence of c in the string cp.
- * Return pointer to match or null pointer.
- *
- * char *
- * index(cp, c)
- * char *cp, c;
- */
-#include "DEFS.h"
-
-ENTRY(index, 0)
- movq 4(ap),r1 # r1 = cp; r2 = c
- tstl r2 # check for special case c == '\0'
- bneq 2f
-1:
- locc $0,$65535,(r1) # just find end of string
- beql 1b # still looking
- movl r1,r0 # found it
- ret
-2:
- moval tbl,r3 # r3 = address of table
- bbss $0,(r3),5f # insure not reentering
- movab (r3)[r2],r5 # table entry for c
- incb (r5)
- movzwl $65535,r4 # fast access
-3:
- scanc r4,(r1),(r3),$1 # look for c or '\0'
- beql 3b # still looking
- movl r1,r0 # return pointer to char
- tstb (r0) # if have found '\0'
- bneq 4f
- clrl r0 # else return 0
-4:
- clrb (r5) # clean up table
- clrb (r3)
- ret
-
- .data
-tbl: .space 256
- .text
-
-/*
- * Reentrant, but slower version of index
- */
-5:
- movl r1,r3
-6:
- locc $0,$65535,(r3) # look for '\0'
- bneq 7f
- locc r2,$65535,(r3) # look for c
- bneq 8f
- movl r1,r3 # reset pointer and ...
- jbr 6b # ... try again
-7:
- subl3 r3,r1,r4 # length of short block
- incl r4 # +1 for '\0'
- locc r2,r4,(r3) # look for c
- bneq 8f
- ret
-8:
- movl r1,r0 # return pointer to char
- ret
diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c
deleted file mode 100644
index 62ec9dc..0000000
--- a/sysdeps/vax/infnan.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#else
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <math.h>
-
-/* Deal with an infinite or NaN result.
- If ERROR is ERANGE, result is +Inf;
- if ERROR is - ERANGE, result is -Inf;
- otherwise result is NaN.
- This will set `errno' to either ERANGE or EDOM,
- and may return an infinity or NaN, or may do something else. */
-double
-DEFUN(__infnan, (error), int error)
-{
- switch (error)
- {
- case ERANGE:
- errno = ERANGE;
- break;
-
- case - ERANGE:
- errno = ERANGE;
- break;
-
- default:
- errno = EDOM;
- break;
- }
-
- /* Trigger a reserved operand fault. */
- {
- double result;
- asm volatile("emodd %1, %1, %2, %0, %0" : "=r" (result) :
- "i" (0), "i" (0x8000));
- return result;
- }
-}
-
-#endif
-
-weak_alias (__infnan, infnan)
diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c
deleted file mode 100644
index 0874177..0000000
--- a/sysdeps/vax/log10.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-
-#ifndef FPCONST
-#define FPCONST(hi0, lo0, hi1, lo1) { (lo0), (hi0), (lo1), (hi1) }
-#endif
-
-static CONST short int ln10[] = FPCONST(0x4113, 0x5d8d, 0xddaa, 0xa8ac);
-#define LN10 (*(CONST double *) ln10)
-
-#include <../sysdeps/generic/log10.c>
diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s
index 3854fd8..f7e47de 100644
--- a/sysdeps/vax/memcmp.s
+++ b/sysdeps/vax/memcmp.s
@@ -59,3 +59,5 @@ ENTRY(memcmp, 0)
cmpc3 r5,(r1),(r3)
jeql 0b /* loop if same */
jbr 1b
+
+weak_alias (memcmp, bcmp)
diff --git a/sysdeps/vax/rindex.s b/sysdeps/vax/rindex.s
deleted file mode 100644
index 76d7e29..0000000
--- a/sysdeps/vax/rindex.s
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)rindex.s 5.6 (Berkeley) 6/1/90"
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Find the last occurence of c in the string cp.
- * Return pointer to match or null pointer.
- *
- * char *
- * rindex(cp, c)
- * char *cp, c;
- */
-#include "DEFS.h"
-
-ENTRY(rindex, 0)
- movq 4(ap),r1 # r1 = cp; r2 = c
- tstl r2 # check for special case c == '\0'
- bneq 2f
-1:
- locc $0,$65535,(r1) # just find end of string
- beql 1b # still looking
- movl r1,r0 # found it
- ret
-2:
- moval tbl,r3 # r3 = address of table
- bbss $0,(r3),5f # insure not reentering
- movab (r3)[r2],r5 # table entry for c
- incb (r5)
- clrl r4 # last found
-3:
- scanc $65535,(r1),(r3),$1 # look for c or '\0'
- beql 3b # keep looking
- tstb (r1) # if have found '\0'
- beql 4f # we are done
- movl r1,r4 # save most recently found
- incl r1 # skip over character
- jbr 3b # keep looking
-4:
- movl r4,r0 # return last found (if any)
- clrb (r5) # clean up table
- clrb (r3)
- ret
-
- .data
-tbl: .space 256
- .text
-
-/*
- * Reentrant, but slower version of rindex
- */
-5:
- movl r1,r3
- clrl r4 # r4 = pointer to last match
-6:
- locc $0,$65535,(r3) # look for '\0'
- bneq 8f
- decw r0 # r0 = 65535
-1:
- locc r2,r0,(r3) # look for c
- bneq 7f
- movl r1,r3 # reset pointer and ...
- jbr 6b # ... try again
-7:
- movl r1,r4 # stash pointer ...
- addl3 $1,r1,r3 # ... skip over match and ...
- decl r0 # ... decrement count
- jbr 6b # ... try again
-8:
- subl3 r3,r1,r0 # length of short block
- incl r0 # +1 for '\0'
-9:
- locc r2,r0,(r3) # look for c
- beql 0f
- movl r1,r4 # stash pointer ...
- addl3 $1,r1,r3 # ... skip over match ...
- decl r0 # ... adjust count and ...
- jbr 9b # ... try again
-0:
- movl r4,r0 # return stashed pointer
- ret
diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s
index 18b5383..1683f56 100644
--- a/sysdeps/vax/strchr.s
+++ b/sysdeps/vax/strchr.s
@@ -103,3 +103,5 @@ Lreent:
beql 2f /* not found: return NULL */
movl r1,r0
2: ret
+
+weak_alias (strchr, index)
diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s
index f292eac..dffcdda 100644
--- a/sysdeps/vax/strrchr.s
+++ b/sysdeps/vax/strrchr.s
@@ -112,3 +112,5 @@ Lreent:
3:
movl r5,r0 /* return stashed pointer */
ret
+
+weak_alias (strrchr, rindex)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44b8acdd3a2f181b415a43e3f7c7dad66b0e4556
commit 44b8acdd3a2f181b415a43e3f7c7dad66b0e4556
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Sep 7 04:10:03 1996 +0000
update from main archive 960906
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index d20a009..c8b374a 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */
.text
.align 3
+ .globl _start
.ent _start, 0
_start:
.frame fp, 0, zero
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 336eb02..8d70bda 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -17,8 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
+#include <features.h>
.section .bss
.globl errno
@@ -30,15 +29,60 @@ errno: .space 4
#endif
.text
-LEAF(__syscall_error, 0)
+ .align 2
+
+#ifdef _LIBC_REENTRANT
+
+ .globl __syscall_error
+ .ent __syscall_error
+__syscall_error:
ldgp gp, 0(t12)
+ lda sp, -16(sp)
+ .frame sp, 16, ra, 0
+ stq ra, 0(sp)
+ stq v0, 8(sp)
+ .mask 0x4000001, -16
.prologue 1
- /* Store return value in errno... */
- stl v0, errno
+ /* Find our pre-thread errno address */
+ jsr ra, __errno_location
+
+ /* Store the error value. */
+ ldl t0, 8(sp)
+ stl t0, 0(v0)
- /* And just kick back a -1. */
+ /* And kick back a -1. */
ldi v0, -1
+
+ ldq ra, 0(sp)
+ lda sp, 16(sp)
ret
+ .end __syscall_error
+
+/* A default non-threaded version of __errno_location that just returns
+ the address of errno. */
+
+ .weak __errno_location
+ .ent __errno_location
+__errno_location:
+ .frame sp, 0, ra
+ ldgp gp, 0(t12)
+ .mask 0, 0
+ .prologue 1
+ lda v0, errno
+ ret
+ .end __errno_location
+
+#else
+
+ENTRY(__syscall_error)
+ ldgp gp, 0(t12)
+ .prologue 1
+
+ stl v0, errno
+ lda v0, -1
+ ret
END(__syscall_error)
+
+#endif /* _LIBC_REENTRANT */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11309adfcea3f996cd18e7f083c1d3cb816121ea
commit 11309adfcea3f996cd18e7f083c1d3cb816121ea
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Sep 5 02:48:53 1996 +0000
update from main archive 960904
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 3704c25..415549d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -186,13 +186,17 @@ _dl_runtime_resolve:
#define RTLD_START asm ("\
.text
.globl _start
- .globl _dl_start_user
+ .ent _start
_start:
- br $gp,0f
+ br $gp, 0f
0: ldgp $gp, 0($gp)
/* Pass pointer to argument block to _dl_start. */
mov $sp, $16
bsr $26, _dl_start..ng
+ .end _start
+ /* FALLTHRU */
+ .globl _dl_start_user
+ .ent _dl_start_user
_dl_start_user:
/* Save the user entry point address in s0. */
mov $0, $9
@@ -225,7 +229,8 @@ _dl_start_user:
lda $0, _dl_fini
/* Jump to the user's entry point. */
mov $9, $27
- jmp ($9)");
+ jmp ($9)
+ .end _dl_start_user");
/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
@@ -377,8 +382,6 @@ elf_machine_rela (struct link_map *map,
sym_value += reloc->r_addend;
*reloc_addr = sym_value;
}
- else if (r_info == R_ALPHA_COPY)
- memcpy (reloc_addr, (void *) sym_value, sym->st_size);
else
assert (! "unexpected dynamic reloc type");
}
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index 596cea6..d20a009 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -20,12 +20,9 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
.text
- .globl _start /* what ELF wants */
- .globl __start /* for backwards (ECOFF) comatibility */
.align 3
- .ent __start, 0
+ .ent _start, 0
_start:
-__start:
.frame fp, 0, zero
mov zero, fp
br gp, 1f
@@ -62,7 +59,6 @@ __start:
mov a1, s1
mov a2, s2
-#ifdef HAVE_INITFINI
/* Call _init, the entry point to our own .init section. */
jsr ra, _init
ldgp gp, 0(ra)
@@ -71,16 +67,12 @@ __start:
lda a0, _fini
jsr ra, atexit
ldgp gp, 0(ra)
-#else
- /* initialize constructors: */
- jsr ra, __main
- ldgp gp, 0(ra)
-#endif
+
+ /* Call the user's main and exit with its return value. */
mov s0, a0
mov s1, a1
mov s2, a2
- /* Call the user's main and exit with its return value. */
jsr ra, main
ldgp gp, 0(ra)
@@ -90,7 +82,10 @@ __start:
/* Die very horribly if exit returns. Call_pal hlt is callable from
kernel mode only; this will result in an illegal instruction trap. */
call_pal 0
-END(__start)
+ .end _start
+
+/* For ECOFF backwards compatibility. */
+weak_alias(_start, __start)
/* Define a symbol for the first piece of initialized data. */
.data
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 28406e8..61f566f 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <math.h>
#ifndef FUNC
@@ -29,7 +28,14 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y)
+__CONCATX(__kernel_,FUNC) (x, y)
+ float_type x;
+ float_type y;
{
- return __CONCATX(__,FUNC) (x + y);
+ float_type sin_x, cos_x, sin_y, cos_y;
+ __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x)
+ : "f" (x));
+ __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y)
+ : "f" (y));
+ return cos_x * cos_y - sin_x * sin_y;
}
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 8c6dfef..3eed1d4 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <math.h>
#ifndef FUNC
@@ -29,8 +28,17 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
- float_type x AND float_type y AND int iy)
+__CONCATX(__kernel_,FUNC) (x, y, iy)
+ float_type x;
+ float_type y;
+ int iy;
{
- return __CONCATX(__,FUNC) (x + y);
+ float_type sin_x, cos_x, sin_y, cos_y;
+ if (iy == 0)
+ return __m81_u_(__CONCATX(__,FUNC)) (x);
+ __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_x), "=f" (sin_x)
+ : "f" (x));
+ __asm__ __volatile__ ("fsincosx %2,%0:%1" : "=f" (cos_y), "=f" (sin_y)
+ : "f" (y));
+ return sin_x * cos_y + cos_x * sin_y;
}
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index c8fa9b7..7f1b729 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <math.h>
#ifndef FUNC
@@ -29,11 +28,16 @@ Cambridge, MA 02139, USA. */
#define __CONCATX(a,b) __CONCAT(a,b)
float_type
-DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
- float_type x AND float_type y AND int iy)
+__CONCATX(__kernel_,FUNC) (x, y, iy)
+ float_type x;
+ float_type y;
+ int iy;
{
- if (iy == 1)
- return __CONCATX(__,FUNC) (x + y);
+ float_type tan_x, tan_y;
+ tan_x = __m81_u_(__CONCATX(__,FUNC)) (x);
+ tan_y = __m81_u_(__CONCATX(__,FUNC)) (y);
+ if (iy > 0)
+ return (tan_x + tan_y) / (1 - tan_x * tan_y);
else
- return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y);
+ return (tan_x * tan_y - 1) / (tan_x + tan_y);
}
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 2d05305..336eb02 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
.section .bss
.globl errno
+ .align 2
errno: .space 4
#ifdef __ELF__
.type errno, @object
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 79ac03f..d898d04 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,5 +1,6 @@
-alpha/ptrace.halpha/regdef.h
+alpha/ptrace.h alpha/regdef.h
ieee_get_fp_control.S ieee_set_fp_control.S
ioperm.c
init-first.h
clone.S
+sys/io.h
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 3908b57..fa433e9 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,5 +1,5 @@
ifeq ($(subdir), misc)
-sysdep_headers += alpha/ptrace.h alpha/regdef.h
+sysdep_headers += alpha/ptrace.h alpha/regdef.h sys/io.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
sethae ioperm osf_sigprocmask fstatfs statfs llseek
diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h
index c27c589..ffbcaf1 100644
--- a/sysdeps/unix/sysv/linux/alpha/init-first.h
+++ b/sysdeps/unix/sysv/linux/alpha/init-first.h
@@ -1,12 +1,29 @@
-/* This fragment is invoked in the stack context of program start.
- Its job is to set up a pointer to argc as an argument, pass
- control to `INIT', and, if necessary, clean up after the call
- to leave the stack in the same condition it was found in. */
+/* The job of this fragment it to find argc and friends for INIT.
+ This is done in one of two ways: either in the stack context
+ of program start, or having dlopen pass them in. */
-#define SYSDEP_CALL_INIT(NAME, INIT) \
- asm(".globl " #NAME "\n" \
- #NAME ":\n\t" \
- "ldgp $29, 0($27)\n\t" \
- ".prologue 1\n\t" \
- "mov $30, $16\n\t" \
- "br $31, " #INIT "..ng");
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+ asm(".weak _dl_starting_up\n\t" \
+ ".globl " #NAME "\n\t" \
+ ".ent " #NAME "\n" \
+ #NAME ":\n\t" \
+ "ldgp $29, 0($27)\n\t" \
+ ".prologue 1\n\t" \
+ ".set at\n\t" \
+ /* Are we a dynamic libc being loaded into a static program? */ \
+ "lda $0, _dl_starting_up\n\t" \
+ "beq $0, 1f\n\t" \
+ "ldl $0, 0($0)\n" \
+ "cmpeq $31, $0, $0\n" \
+ "1:\t" \
+ "stl $0, __libc_multiple_libcs\n\t" \
+ /* If so, argc et al are in a0-a2 already. Otherwise, load them. */ \
+ "bne $0, 2f\n\t" \
+ "ldl $16, 0($30)\n\t" \
+ "lda $17, 8($30)\n\t" \
+ "s8addq $16, $17, $18\n\t" \
+ "addq $18, 8, $18\n" \
+ "2:\t" \
+ "br $31, " #INIT "..ng\n\t" \
+ ".set noat\n\t" \
+ ".end " #NAME);
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index a91608f..731059e 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -84,20 +84,21 @@ struct ioswtch {
static struct platform {
const char *name;
int io_sys;
+ int hae_shift;
unsigned long bus_memory_base;
unsigned long sparse_bus_memory_base;
} platform[] = {
- {"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
- {"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
- {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Jensen", IOSYS_JENSEN, 0, JENSEN_SPARSE_MEM},
- {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Alcor", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
+ {"Avanti", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Cabriolet", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB164", IOSYS_CIA, 5, CIA_DENSE_MEM, CIA_SPARSE_MEM},
+ {"EB64+", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB66", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB66P", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Jensen", IOSYS_JENSEN, 7, 0, JENSEN_SPARSE_MEM},
+ {"Mikasa", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Mustang", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Noname", IOSYS_APECS, 5, APECS_DENSE_MEM, APECS_SPARSE_MEM},
};
@@ -109,11 +110,11 @@ static struct {
unsigned long base;
struct ioswtch * swp;
int sys;
+ int hae_shift;
+ unsigned long bus_memory_base;
+ unsigned long sparse_bus_memory_base;
} io;
-static unsigned long bus_memory_base = -1;
-static unsigned long sparse_bus_memory_base = -1;
-
extern void __sethae (unsigned long); /* we can't use asm/io.h */
@@ -335,8 +336,9 @@ init_iosys (void)
{
if (strcmp (platform[i].name, systype) == 0)
{
- bus_memory_base = platform[i].bus_memory_base;
- sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
+ io.hae_shift = platform[i].hae_shift;
+ io.bus_memory_base = platform[i].bus_memory_base;
+ io.sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
io.sys = platform[i].io_sys;
if (io.sys == IOSYS_JENSEN)
io.swp = &ioswtch[0];
@@ -500,7 +502,7 @@ _bus_base(void)
{
if (!io.swp && init_iosys () < 0)
return -1;
- return bus_memory_base;
+ return io.bus_memory_base;
}
unsigned long
@@ -508,7 +510,15 @@ _bus_base_sparse(void)
{
if (!io.swp && init_iosys () < 0)
return -1;
- return sparse_bus_memory_base;
+ return io.sparse_bus_memory_base;
+}
+
+int
+_hae_shift(void)
+{
+ if (!io.swp && init_iosys () < 0)
+ return -1;
+ return io.hae_shift;
}
weak_alias (_sethae, sethae);
@@ -522,3 +532,4 @@ weak_alias (_outw, outw);
weak_alias (_outl, outl);
weak_alias (_bus_base, bus_base);
weak_alias (_bus_base_sparse, bus_base_sparse);
+weak_alias (_hae_shift, hae_shift);
diff --git a/sysdeps/unix/sysv/linux/alpha/sys/io.h b/sysdeps/unix/sysv/linux/alpha/sys/io.h
new file mode 100644
index 0000000..a880735
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sys/io.h
@@ -0,0 +1,59 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _SYS_IO_H
+
+#define _SYS_IO_H 1
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Get constants from kernel header files. */
+#include <asm/io.h>
+
+/* If TURN_ON is TRUE, request for permission to do direct i/o on the
+ port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
+ permission off for that range. This call requires root privileges.
+
+ Portability note: not all Linux platforms support this call. Most
+ platforms based on the PC I/O architecture probably will, however.
+ E.g., Linux/Alpha for Alpha PCs supports this. */
+extern int ioperm __P ((unsigned long int __from, unsigned long int __num,
+ int __turn_on));
+
+/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
+ access any I/O port is granted. This call requires root
+ privileges. */
+extern int iopl __P ((int __level));
+
+/* Return the physical address of the DENSE I/O memory or NULL if none
+ is available (e.g. on a jensen). */
+extern unsigned long _bus_base __P ((void)) __attribute__ ((const));
+extern unsigned long bus_base __P ((void)) __attribute__ ((const));
+
+/* Return the physical address of the SPARSE I/O memory. */
+extern unsigned long _bus_base_sparse __P ((void)) __attribute__ ((const));
+extern unsigned long bus_base_sparse __P ((void)) __attribute__ ((const));
+
+/* Return the HAE shift used by the SPARSE I/O memory. */
+extern int _hae_shift __P ((void)) __attribute__ ((const));
+extern int hae_shift __P ((void)) __attribute__ ((const));
+
+__END_DECLS
+
+#endif /* _SYS_IO_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1713bc849fa0f75399f6e4b2b9590879e0e3eda2
commit 1713bc849fa0f75399f6e4b2b9590879e0e3eda2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 30 00:58:28 1996 +0000
update from main archive 960829
diff --git a/bare/Makefile b/bare/Makefile
index 588a713..5735153 100644
--- a/bare/Makefile
+++ b/bare/Makefile
@@ -48,7 +48,7 @@ $(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o)
# from scratch each time.
rm -f $@
ifdef objdir
- cd $(objdir); $(AR) cq$(verbose) $@ $(^:$(objpfx)%=%)
+ cd $(objpfx); $(AR) cq$(verbose) $(@:$(objpfx)%=%) $(^:$(objpfx)%=%)
else
$(AR) cq$(verbose) $@ $^
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 5c0e8d1..79ac03f 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,4 +1,5 @@
-alpha/ptrace.h alpha/regdef.h
+alpha/ptrace.halpha/regdef.h
ieee_get_fp_control.S ieee_set_fp_control.S
ioperm.c
init-first.h
+clone.S
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
index 2c6d09e..a281cba 100644
--- a/sysdeps/unix/sysv/linux/m68k/Dist
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -1 +1,2 @@
init-first.h
+clone.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a7ad1005c77f77910045dd281d342a6e07a8e6e
commit 8a7ad1005c77f77910045dd281d342a6e07a8e6e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 27 02:22:22 1996 +0000
update from main archive 960826
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 2bf8f9b..3704c25 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -217,7 +217,11 @@ _dl_start_user:
jsr $26, ($0)
ldgp $gp, 0($26)
br 1b
-2: /* Pass our finalizer function to the user in $0. */
+2: /* Clear the startup flag. */
+ .set at
+ stl $31, _dl_starting_up
+ .set noat
+ /* Pass our finalizer function to the user in $0. */
lda $0, _dl_fini
/* Jump to the user's entry point. */
mov $9, $27
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c080e5ff92c48de8870009d9d56ddad42039792e
commit c080e5ff92c48de8870009d9d56ddad42039792e
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 26 00:42:04 1996 +0000
update from main archive 960825
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index f36b9ce..8b9872c 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -175,7 +175,7 @@ _dl_start_user:
| Loop to call _dl_init_next for the next initializer.
jra 0b
1: | Clear the startup flag.
- move.l #0, _dl_starting_up@GOT(%a5)
+ clr.l _dl_starting_up@GOT(%a5)
| Pass our finalizer function to the user in %a1.
move.l _dl_fini@GOT(%a5), %a1
| Initialize %fp with the stack pointer.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=141ce15d9754cb8b29b0dfa345ab37fc04b2ab68
commit 141ce15d9754cb8b29b0dfa345ab37fc04b2ab68
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 19 01:07:37 1996 +0000
update from main archive 960818
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 15aa532..f36b9ce 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -174,7 +174,9 @@ _dl_start_user:
jsr (%a0)
| Loop to call _dl_init_next for the next initializer.
jra 0b
-1: | Pass our finalizer function to the user in %a1.
+1: | Clear the startup flag.
+ move.l #0, _dl_starting_up@GOT(%a5)
+ | Pass our finalizer function to the user in %a1.
move.l _dl_fini@GOT(%a5), %a1
| Initialize %fp with the stack pointer.
move.l %sp, %fp
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 9d59671..3908b57 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -2,5 +2,5 @@ ifeq ($(subdir), misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
- sethae ioperm osf_sigprocmask fstatfs statfs
+ sethae ioperm osf_sigprocmask fstatfs statfs llseek
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index d24eabe..a91608f 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -52,7 +52,7 @@ I/O address space that's 512MB large!). */
#define vuip volatile unsigned int *
#define JENSEN_IO_BASE (0xfffffc0300000000UL)
-#define JENSEN_MEM (0xfffffc0200000000UL) /* sparse!! */
+#define JENSEN_SPARSE_MEM (0xfffffc0200000000UL)
/*
* With respect to the I/O architecture, APECS and LCA are identical,
@@ -94,7 +94,7 @@ static struct platform {
{"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
- {"Jensen", IOSYS_JENSEN, JENSEN_MEM, JENSEN_MEM},
+ {"Jensen", IOSYS_JENSEN, 0, JENSEN_SPARSE_MEM},
{"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
{"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=404e62168877ec7f33aa039c78e4fc26798d556a
commit 404e62168877ec7f33aa039c78e4fc26798d556a
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 15 01:23:29 1996 +0000
update from main archive 960814
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a75011f..2bf8f9b 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -341,8 +341,8 @@ elf_machine_rela (struct link_map *map,
{
Elf64_Addr loadbase, sym_value;
- loadbase = RESOLVE (&sym, (Elf64_Addr)reloc_addr,
- r_info == R_ALPHA_JMP_SLOT);
+ loadbase = RESOLVE (&sym,
+ r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0);
sym_value = sym ? loadbase + sym->st_value : 0;
if (r_info == R_ALPHA_GLOB_DAT)
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 4642f00..15aa532 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -205,29 +205,29 @@ elf_machine_rela (struct link_map *map,
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, DL_LOOKUP_NOEXEC);
memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
break;
case R_68K_GLOB_DAT:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_JMP_SLOT:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 1);
+ loadbase = RESOLVE (&sym, DL_LOOKUP_NOPLT);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_8:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_16:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_32:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
@@ -235,17 +235,17 @@ elf_machine_rela (struct link_map *map,
*reloc_addr = map->l_addr + reloc->r_addend;
break;
case R_68K_PC8:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
case R_68K_PC16:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
case R_68K_PC32:
- loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend - (Elf32_Addr) reloc_addr);
break;
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 50e9f64..c0ac649 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -453,7 +453,7 @@ elf_machine_rel (struct link_map *map,
else
#endif
undo = 0;
- loadbase = RESOLVE (&sym, (ElfW(Addr)) reloc_addr, 0);
+ loadbase = RESOLVE (&sym, 0);
*reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
}
break;
diff --git a/sysdeps/unix/sysv/linux/m68k/clone.S b/sysdeps/unix/sysv/linux/m68k/clone.S
new file mode 100644
index 0000000..64077e0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/clone.S
@@ -0,0 +1,75 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* clone is even more special than fork as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <sysdep.h>
+#include <errnos.h>
+
+/* int clone (int (*fn) (), void *child_stack, int flags, int nargs, ...) */
+
+ .text
+ENTRY (__clone)
+ /* Sanity check arguments. */
+ movel #-EINVAL, %d0
+ movel 4(%sp), %a0 /* no NULL function pointers */
+ tstl %a0
+ jeq syscall_error
+ movel 8(%sp), %a1 /* no NULL stack pointers */
+ tstl %a1
+ jeq syscall_error
+ movel 16(%sp), %d1 /* no negative argument counts */
+ jmi syscall_error
+
+ /* Allocate space on the new stack and copy args over */
+ movel %d1, %d0
+ negl %d0
+ lea (%a1,%d0.l*4), %a1
+ jeq 2f
+1: movel 16(%sp,%d1.l*4), -4(%a1,%d1.l*4)
+ subql #1, %d1
+ jne 1b
+2:
+
+ /* Do the system call */
+ exg %d2, %a1 /* save %d2 and get stack pointer */
+ movel 12(%sp), %d1 /* get flags */
+ movel #SYS_ify (clone), %d0
+ trap #0
+ exg %d2, %a1 /* restore %d2 */
+
+ tstl %d0
+ jmi syscall_error
+ jeq thread_start
+
+ rts
+
+ SYSCALL_ERROR_HANDLER
+
+thread_start:
+ subl %fp, %fp /* terminate the stack frame */
+ jsr (%a0)
+ movel %d0, -(%sp)
+#ifdef PIC
+ bsrl _exit@PLTPC
+#else
+ jbsr _exit
+#endif
+
+weak_alias (__clone, clone)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f526ac60c54c04dca84259d28afa545ed955a3a2
commit f526ac60c54c04dca84259d28afa545ed955a3a2
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon Aug 12 02:04:57 1996 +0000
Update from main archive 960811
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index b5b66ae..eaf892b 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -29,8 +29,8 @@ division. The C compiler expects the functions
These are not normal C functions: instead of the normal calling
sequence, these expect their arguments in registers t10 and t11, and
-return the result in t12 (aka pv). Registers AT and v0 may be
-clobbered (assembly temporary), anything else must be saved. */
+return the result in t12 (aka pv). Register AT may be clobbered
+(assembly temporary), anything else must be saved. */
#include <sysdep.h>
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index b900b76..a75011f 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -135,8 +135,8 @@ _dl_runtime_resolve:
stq $29, 160($sp)
.mask 0x27ff01ff, -168
/* Set up our $gp */
- br $gp, .+4
- ldgp $gp, 0($gp)
+ br $gp, 0f
+0: ldgp $gp, 0($gp)
.prologue 1
/* Set up the arguments for _dl_runtime_resolve. */
/* $16 = link_map out of plt0 */
@@ -145,7 +145,7 @@ _dl_runtime_resolve:
mov $28, $17
/* Do the fixup */
bsr $26, fixup..ng
- /* Move the destination address to a safe place. */
+ /* Move the destination address into position. */
mov $0, $27
/* Restore program registers. */
ldq $26, 0($sp)
@@ -169,19 +169,16 @@ _dl_runtime_resolve:
ldq $24, 144($sp)
ldq $25, 152($sp)
ldq $29, 160($sp)
+ /* Flush the Icache after having modified the .plt code. */
+ imb
/* Clean up and turn control to the destination */
lda $sp, 168($sp)
jmp $31, ($27)
.end _dl_runtime_resolve");
-/* The PLT uses Elf_Rel relocs. */
+/* The PLT uses Elf64_Rela relocs. */
#define elf_machine_relplt elf_machine_rela
-/* Mask identifying addresses reserved for the user program,
- where the dynamic linker should not map anything. */
-/* FIXME */
-#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL)
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -191,8 +188,8 @@ _dl_runtime_resolve:
.globl _start
.globl _dl_start_user
_start:
- br $gp,.+4
- ldgp $gp, 0($gp)
+ br $gp,0f
+0: ldgp $gp, 0($gp)
/* Pass pointer to argument block to _dl_start. */
mov $sp, $16
bsr $26, _dl_start..ng
@@ -226,7 +223,7 @@ _dl_start_user:
mov $9, $27
jmp ($9)");
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
PLT entries should not be allowed to define the value. */
#define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT)
@@ -302,9 +299,10 @@ elf_alpha_fix_plt(struct link_map *l,
plte[2] = 0x6bfb0000;
}
- /* Flush the instruction cache now that we've diddled. Tag it as
- modifying memory to checkpoint memory writes during optimization. */
- asm volatile("call_pal 0x86" : : : "memory");
+ /* At this point, if we've been doing runtime resolution, Icache is dirty.
+ This will be taken care of in _dl_runtime_resolve. If instead we are
+ doing this as part of non-lazy startup relocation, that bit of code
+ hasn't made it into Icache yet, so there's nothing to clean up. */
}
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dca26bcb0ca0c5578a70532a67dbab4424fee256
commit dca26bcb0ca0c5578a70532a67dbab4424fee256
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sun Aug 11 01:30:23 1996 +0000
Update from main archive 960810
diff --git a/sysdeps/alpha/elf/start.S b/sysdeps/alpha/elf/start.S
index c534d69..596cea6 100644
--- a/sysdeps/alpha/elf/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -20,9 +20,11 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
.text
- .globl __start
+ .globl _start /* what ELF wants */
+ .globl __start /* for backwards (ECOFF) comatibility */
.align 3
.ent __start, 0
+_start:
__start:
.frame fp, 0, zero
mov zero, fp
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 56331cb..d24eabe 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -59,14 +59,16 @@ I/O address space that's 512MB large!). */
* so the following defines apply to LCA as well.
*/
#define APECS_IO_BASE (0xfffffc01c0000000UL)
+#define APECS_SPARSE_MEM (0xfffffc0200000000UL)
#define APECS_DENSE_MEM (0xfffffc0300000000UL)
-#define ALCOR_IO_BASE (0xfffffc8580000000UL)
-#define ALCOR_DENSE_MEM (0xfffffc8600000000UL)
+#define CIA_IO_BASE (0xfffffc8580000000UL)
+#define CIA_SPARSE_MEM (0xfffffc8000000000UL)
+#define CIA_DENSE_MEM (0xfffffc8600000000UL)
enum {
- IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2
+ IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_CIA = 2
} iosys_t;
struct ioswtch {
@@ -83,18 +85,19 @@ static struct platform {
const char *name;
int io_sys;
unsigned long bus_memory_base;
+ unsigned long sparse_bus_memory_base;
} platform[] = {
- {"Alcor", IOSYS_ALCOR, ALCOR_DENSE_MEM},
- {"Avanti", IOSYS_APECS, APECS_DENSE_MEM},
- {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM},
- {"EB164", IOSYS_ALCOR, ALCOR_DENSE_MEM},
- {"EB64+", IOSYS_APECS, APECS_DENSE_MEM},
- {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
- {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
- {"Jensen", IOSYS_JENSEN, JENSEN_MEM},
- {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM},
- {"Mustang", IOSYS_APECS, APECS_DENSE_MEM},
- {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
+ {"Alcor", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
+ {"Avanti", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB164", IOSYS_CIA, CIA_DENSE_MEM, CIA_SPARSE_MEM},
+ {"EB64+", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB66", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"EB66P", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Jensen", IOSYS_JENSEN, JENSEN_MEM, JENSEN_MEM},
+ {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Mustang", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
+ {"Noname", IOSYS_APECS, APECS_DENSE_MEM, APECS_SPARSE_MEM},
};
@@ -109,6 +112,7 @@ static struct {
} io;
static unsigned long bus_memory_base = -1;
+static unsigned long sparse_bus_memory_base = -1;
extern void __sethae (unsigned long); /* we can't use asm/io.h */
@@ -256,7 +260,7 @@ DCL_IN(jensen, inb, JENSEN)
DCL_IN(jensen, inw, JENSEN)
DCL_IN(jensen, inl, JENSEN)
-/* The APECS functions are also used for ALCOR since they are
+/* The APECS functions are also used for CIA since they are
identical. */
DCL_SETHAE(apecs, APECS)
@@ -332,6 +336,7 @@ init_iosys (void)
if (strcmp (platform[i].name, systype) == 0)
{
bus_memory_base = platform[i].bus_memory_base;
+ sparse_bus_memory_base = platform[i].sparse_bus_memory_base;
io.sys = platform[i].io_sys;
if (io.sys == IOSYS_JENSEN)
io.swp = &ioswtch[0];
@@ -382,7 +387,7 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
{
case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
case IOSYS_APECS: base = APECS_IO_BASE; break;
- case IOSYS_ALCOR: base = ALCOR_IO_BASE; break;
+ case IOSYS_CIA: base = CIA_IO_BASE; break;
default:
errno = ENODEV;
return -1;
@@ -498,6 +503,14 @@ _bus_base(void)
return bus_memory_base;
}
+unsigned long
+_bus_base_sparse(void)
+{
+ if (!io.swp && init_iosys () < 0)
+ return -1;
+ return sparse_bus_memory_base;
+}
+
weak_alias (_sethae, sethae);
weak_alias (_ioperm, ioperm);
weak_alias (_iopl, iopl);
@@ -508,3 +521,4 @@ weak_alias (_outb, outb);
weak_alias (_outw, outw);
weak_alias (_outl, outl);
weak_alias (_bus_base, bus_base);
+weak_alias (_bus_base_sparse, bus_base_sparse);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b0174d08faaa95a20e5ea412255523713d302dd
commit 3b0174d08faaa95a20e5ea412255523713d302dd
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Aug 10 00:47:07 1996 +0000
Update from main archive 960809
diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S
new file mode 100644
index 0000000..a1ef324
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -0,0 +1,118 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by Richard Henderson (rth@tamu.edu)
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* clone() is even more special than fork() as it mucks with stacks
+ and invokes a function in the right context after its all over. */
+
+#include <sysdep.h>
+#include <errnos.h>
+
+/* int clone(int (*fn)(), void *child_stack, int flags, int nargs, ...) */
+
+ .text
+ENTRY(__clone)
+ lda sp,-16(sp)
+ .frame sp,16,$26,0
+ /* Save rest of argument registers for varargs-type work. */
+ stq a4,0(sp)
+ stq a5,8(sp)
+ .prologue 1
+
+ /* Sanity check arguments. */
+ sextl a3,a3
+ ldiq v0,EINVAL
+ beq a0,$error /* no NULL function pointers */
+ beq a1,$error /* no NULL stack pointers */
+ blt a3,$error /* no negative argument counts */
+
+ /* Allocate space on the new stack and copy args over */
+ mov a3,t0 /* save nargs for thread_start */
+ s8addq a3,sp,t1
+1: ldq t2,-8(t1)
+ subq t1,8,t1
+ stq t2,-8(a1)
+ subq a3,1,a3
+ subq a1,8,a1
+ bne a3,1b
+
+ /* Do the system call */
+ mov a0,pv /* get fn ptr out of the way */
+ mov a2,a0
+ ldiq v0,__NR_clone
+ call_pal PAL_callsys
+
+ bne a3,$error
+ beq v0,thread_start
+
+ /* Successful return from the parent */
+ lda sp,16(sp)
+ ret
+
+ /* Something bad happened -- no child created */
+$error:
+ br gp,1f
+1: ldgp gp,0(gp)
+ lda sp,16(sp)
+ jmp zero,__syscall_error
+
+ END(__clone)
+
+/* Load up the arguments to the function. Put this block of code in
+ its own function so that we can terminate the stack trace with our
+ debug info.
+
+ At this point we have $t0=nargs, $pv=fn, $sp=&arg[0]. */
+
+ .ent thread_start
+thread_start:
+ .frame fp,0,zero,0
+ mov zero,fp
+ .prologue 0
+
+ /* Calculate address of jump into argument loading code */
+ cmple t0,6,t2 /* no more than 6 args in registers */
+ cmoveq t2,6,t0
+ br v0,1f /* find address of arg0 */
+1: lda v0,$arg0-1b(v0)
+ s4addq t0,zero,t1
+ subq v0,t1,v0
+ jmp (v0)
+
+ /* Load the integer register arguments */
+ ldq a5,40(sp)
+ ldq a4,32(sp)
+ ldq a3,24(sp)
+ ldq a2,16(sp)
+ ldq a1,8(sp)
+ ldq a0,0(sp)
+$arg0:
+
+ /* Adjust stack to remove the arguments we just loaded */
+ s8addq t0,sp,sp
+
+ /* Call the user's function */
+ jsr ra,(pv)
+ ldgp gp,0(ra)
+
+ /* Call _exit rather than doing it inline for breakpoint purposes */
+ mov v0,a0
+ jsr ra,_exit
+
+ .end thread_start
+
+weak_alias(__clone, clone)
diff --git a/sysdeps/unix/sysv/linux/m68k/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h
index 65cc6e5..d2f2dae 100644
--- a/sysdeps/unix/sysv/linux/m68k/resourcebits.h
+++ b/sysdeps/unix/sysv/linux/m68k/resourcebits.h
@@ -54,6 +54,9 @@ enum __rlimit_resource
/* Locked-in-memory address space. */
RLIMIT_MEMLOCK,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
+ /* Address space limit. */
+ RLIMIT_AS,
+#define RLIMIT_AS RLIMIT_AS
RLIMIT_NLIMITS, /* Number of limit flavors. */
RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b870eeda1d1292ae2c803d74d274f6a290a30978
commit b870eeda1d1292ae2c803d74d274f6a290a30978
Author: Ulrich Drepper <drepper@redhat.com>
Date: Thu Aug 8 00:35:28 1996 +0000
update from main archive 960807
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index e813ebd..6c4af3f 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -28,20 +28,17 @@ compiler treats those calls as if they were instructions. In
particular, it doesn't save any of the temporary registers (caller
saved registers). It is therefore necessary to preserve all
caller-saved registers as well
-
+
Upon entering _mcount, register $at holds the return address and ra
holds the return address of the function's caller (selfpc and frompc,
respectively in gmon.c language...). */
#include <sysdep.h>
-#undef ret /* discard `ret' as defined in sysdep.h */
-
.set noat
.set noreorder
LEAF(_mcount, 0xb0)
-weak_alias (_mcount, mcount)
.prologue 0
subq sp, 0xb0, sp
@@ -69,8 +66,6 @@ weak_alias (_mcount, mcount)
stq t5, 0x70(sp)
stq t6, 0x78(sp)
- lda pv, __mcount
-
stq t7, 0x80(sp)
stq t8, 0x88(sp)
stq t9, 0x90(sp)
@@ -78,7 +73,7 @@ weak_alias (_mcount, mcount)
stq t11, 0xa0(sp)
stq v0, 0xa8(sp)
- jsr ra, (pv), __mcount
+ jsr ra, __mcount
ldq a0, 0x00(sp)
ldq a1, 0x08(sp)
@@ -108,3 +103,5 @@ weak_alias (_mcount, mcount)
ret zero,($at),1
END(_mcount)
+
+weak_alias (_mcount, mcount)
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index 49be0b2..dcd4eac 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -40,10 +40,10 @@ ENTRY(__bb_init_func)
ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */
beq t0, init /* not initialized yet -> */
ret
-
+
END(__bb_init_func)
-.ent init
+ .ent init
init:
.frame sp, 0x38, ra, 0
subq sp, 0x38, sp
@@ -61,8 +61,8 @@ init:
stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */
stq t2, NEXT(a0) /* blocks->next = __bb_head */
stq a0, 0(t1)
- bne t2, leave
- beq t3, leave /* t3 == GMON_PROF_ON? yes -> */
+ bne t2, $leave
+ beq t3, $leave /* t3 == GMON_PROF_ON? yes -> */
/* also need to initialize destructor: */
stq ra, 0x00(sp)
@@ -81,8 +81,8 @@ init:
ldq a4, 0x20(sp)
ldq a5, 0x28(sp)
-leave: ldq pv, 0x30(sp)
+$leave: ldq pv, 0x30(sp)
addq sp, 0x38, sp
ret
-.end init
+ .end init
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index da60442..a7bdbb5 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(_setjmp)
- lda $27, __sigsetjmp /* Load address to jump to. */
+ ldgp $29,0($27)
+ .prologue 1
bis $31, $31, $17 /* Pass a second argument of zero. */
- jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ jmp $31, __sigsetjmp /* Call __sigsetjmp. */
END(_setjmp)
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index fc73815..c0ed691 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(setjmp)
- lda $27, __sigsetjmp /* Load address to jump to. */
+ ldgp $29, 0($27)
+ .prologue 1
bis $31, 1, $17 /* Pass a second argument of one. */
- jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ jmp $31, __sigsetjmp /* Call __sigsetjmp. */
END(setjmp)
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index 2951335..b5b66ae 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -115,10 +115,9 @@ FUNC_NAME:
br AT, 1f
1: ldgp gp, 0(AT)
- lda AT, _mcount
mov retaddr, ra
- jsr AT, (AT), _mcount
+ jsr AT, _mcount
ldq ra, 0x00(sp)
ldq pv, 0x08(sp)
@@ -137,7 +136,7 @@ FUNC_NAME:
stq tmp0,0x18(sp)
bis zero,zero,quotient
stq tmp1,0x20(sp)
- beq divisor,divbyzero
+ beq divisor,$divbyzero
stq sign,0x28(sp)
GETSIGN(dividend,divisor,sign)
#if SIGNED
@@ -170,7 +169,7 @@ FUNC_NAME:
ldq arg1,0x00(sp)
SETSIGN(sign,result,tmp0)
-done: ldq arg2,0x08(sp)
+$done: ldq arg2,0x08(sp)
ldq mask,0x10(sp)
ldq tmp0,0x18(sp)
ldq tmp1,0x20(sp)
@@ -178,11 +177,11 @@ done: ldq arg2,0x08(sp)
lda sp,FRAME_SIZE(sp)
ret zero,(retaddr),0
-divbyzero:
+$divbyzero:
lda a0,GEN_INTDIV(zero)
call_pal PAL_gentrap
bis zero,zero,result /* if trap returns, return 0 */
ldq arg1,0x00(sp)
- br done
+ br $done
END(FUNC_NAME)
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index e4dd87c..b84a51d 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -34,7 +34,7 @@ ENTRY(ffs)
negq a0, t0 # due to the srl instruction
and a0, t0, t0
clr v0
- beq a0, done
+ beq a0, $done
# now do binary search for first non-zero bit
@@ -61,6 +61,6 @@ ENTRY(ffs)
addq v0, 1, t3
cmoveq t2, t3, v0
-done: ret
+$done: ret
END(ffs)
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 2d21247..a47ac96 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -42,7 +42,7 @@ For correctness consider that:
ENTRY(memchr)
.prologue 0
- beq a2, not_found
+ beq a2, $not_found
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
addq a0, a2, t4
and a1, 0xff, a1 # a1 = 00000000000000ch
@@ -57,7 +57,7 @@ ENTRY(memchr)
extql t0, a0, t6
or t1, a1, a1 # a1 = chchchchchchchch
- beq t3, first_quad
+ beq t3, $first_quad
extqh t5, a0, t5
mov a0, v0
@@ -68,15 +68,15 @@ ENTRY(memchr)
# in t0. E.g.:
# a2 = 6
# t0 = ????c6c5c4c3c2c1
-last_quad:
+$last_quad:
negq a2, t5
srl t2, t5, t5 # t5 = mask of a2 bits set
xor a1, t0, t0
cmpbge zero, t0, t1
and t1, t5, t1
- beq t1, not_found
+ beq t1, $not_found
-found_it:
+$found_it:
# now, determine which byte matched:
negq t1, t2
and t1, t2, t1
@@ -93,20 +93,20 @@ found_it:
addq v0, 1, t2
cmoveq t0, t2, v0
-done: ret
+$done: ret
#
# Deal with the case where a2 > 8 bytes remain to be
# searched. a0 may not be aligned.
#
-first_quad:
+$first_quad:
andnot a0, 0x7, v0
insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes)
xor t0, a1, t0
or t0, t1, t0 # t0 = ====ffffffffffff
cmpbge zero, t0, t1
- bne t1, found_it
+ bne t1, $found_it
/* at least one byte left to process */
@@ -119,41 +119,41 @@ first_quad:
subq t4, 1, a2
andnot a2, 0x7, a2
cmpult v0, a2, t1
- beq t1, final
+ beq t1, $final
/* at least two quads remain to be accessed */
subq a2, v0, t3 # t3 <- number of quads to be processed in loop
and t3, 8, t3 # odd number of quads?
- bne t3, odd_quad_count
+ bne t3, $odd_quad_count
/* at least three quads remain to be accessed */
mov t0, t3 # move prefetched value into correct register
.align 3
-unrolled_loop:
+$unrolled_loop:
ldq t0, 8(v0) # prefetch t0
xor a1, t3, t1
cmpbge zero, t1, t1
- bne t1, found_it
+ bne t1, $found_it
addq v0, 8, v0
-odd_quad_count:
+$odd_quad_count:
xor a1, t0, t1
ldq t3, 8(v0) # prefetch t3
cmpbge zero, t1, t1
- bne t1, found_it
+ bne t1, $found_it
addq v0, 8, v0
cmpult v0, a2, t5
- bne t5, unrolled_loop
+ bne t5, $unrolled_loop
mov t3, t0 # move prefetched value into t0
-final: subq t4, v0, a2 # a2 <- number of bytes left to do
- bne a2, last_quad
+$final: subq t4, v0, a2 # a2 <- number of bytes left to do
+ bne a2, $last_quad
-not_found:
+$not_found:
mov zero, v0
ret
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index da71a32..59929a0 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,9 +25,8 @@ ENTRY (__sigsetjmp)
ldgp $29, 0($27)
.prologue 1
- lda $27, __sigsetjmp_aux /* Load address to jump to. */
bis $30, $30, $18 /* Pass SP as 3rd arg. */
bis $15, $15, $19 /* Pass FP as 4th arg. */
- jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
+ jmp $31, __sigsetjmp_aux /* Call __sigsetjmp_aux. */
END(__sigsetjmp)
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 15c78cd..9eab707 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -19,52 +19,50 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Finds length of a 0-terminated string. Optimized for the Alpha
-architecture:
+ architecture:
- memory accessed as aligned quadwords only
- - uses bcmpge to compare 8 bytes in parallel
- - does binary search to find 0 byte in last
- quadword (HAKMEM needed 12 instructions to
- do this instead of the 9 instructions that
- binary search needs). */
+ - uses cmpbge to compare 8 bytes in parallel
+ - does binary search to find 0 byte in last quadword (HAKMEM
+ needed 12 instructions to do this instead of the 8 instructions
+ that the binary search needs).
+*/
#include <sysdep.h>
- .set noreorder
- .set noat
+ .set noreorder
+ .set noat
ENTRY(strlen)
- ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
- lda t1, -1(zero)
- insqh t1, a0, t1
- andnot a0, 7, v0
- or t1, t0, t0
- cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
- bne t1, found
-
-loop: ldq t0, 8(v0)
- addq v0, 8, v0 # addr += 8
- nop # helps dual issue last two insns
- cmpbge zero, t0, t1
- beq t1, loop
-
-found: blbs t1, done # make aligned case fast
- negq t1, t2
- and t1, t2, t1
-
- and t1, 0x0f, t0
- addq v0, 4, t2
- cmoveq t0, t2, v0
-
- and t1, 0x33, t0
- addq v0, 2, t2
- cmoveq t0, t2, v0
-
- and t1, 0x55, t0
- addq v0, 1, t2
- cmoveq t0, t2, v0
-
-done: subq v0, a0, v0
- ret
-
- END(strlen)
+ ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
+ lda t1, -1(zero)
+ insqh t1, a0, t1
+ andnot a0, 7, v0
+ or t1, t0, t0
+ nop # dual issue the next two on ev5
+ cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
+ bne t1, $found
+
+$loop: ldq t0, 8(v0)
+ addq v0, 8, v0 # addr += 8
+ cmpbge zero, t0, t1
+ beq t1, $loop
+
+$found: negq t1, t2 # clear all but least set bit
+ and t1, t2, t1
+
+ and t1, 0xf0, t2 # binary search for that set bit
+ and t1, 0xcc, t3
+ and t1, 0xaa, t4
+ cmovne t2, 4, t2
+ cmovne t3, 2, t3
+ cmovne t4, 1, t4
+ addq t2, t3, t2
+ addq v0, t4, v0
+ addq v0, t2, v0
+ nop # dual issue next two on ev4 and ev5
+
+ subq v0, a0, v0
+ ret
+
+ END(strlen)
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 26bf97f..ad5f021 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,16 @@ break value (instead of the new, requested one). */
#include <sysdep.h>
#include <errnos.h>
+#ifdef PIC
+.section .bss
+ .align 3
+ .globl __curbrk
+__curbrk: .skip 8
+ .type __curbrk,@object
+ .size __curbrk,8
+#else
.comm __curbrk, 8
+#endif
.text
LEAF(__brk, 0)
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index cee5f48..56331cb 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger.
@@ -92,6 +92,7 @@ static struct platform {
{"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
{"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
{"Jensen", IOSYS_JENSEN, JENSEN_MEM},
+ {"Mikasa", IOSYS_APECS, APECS_DENSE_MEM},
{"Mustang", IOSYS_APECS, APECS_DENSE_MEM},
{"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ad1a0a0a648eac6ea60d65d0bb2f0e433c43ff3f
commit ad1a0a0a648eac6ea60d65d0bb2f0e433c43ff3f
Author: Ulrich Drepper <drepper@redhat.com>
Date: Tue Aug 6 01:19:53 1996 +0000
Update UD main archive 960805
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
index b5d3704..485dec9 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
@@ -1,5 +1,5 @@
/* Bit values for resource limits. SunOS 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,22 +27,30 @@ enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU,
+#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
RLIMIT_FSIZE,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
RLIMIT_DATA,
+#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
RLIMIT_STACK,
+#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
RLIMIT_CORE,
+#define RLIMIT_CORE RLIMIT_CORE
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
RLIMIT_RSS,
+#define RLIMIT_RSS RLIMIT_RSS
/* Number of open files. */
RLIMIT_NOFILE,
RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#defin RLIMIT_NOFILE RLIMIT_NOFILE
+#defin RLIMIT_OFILE RLIMIT_OFILE
RLIM_NLIMITS
};
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/sysv/linux/alpha/resourcebits.h
similarity index 61%
copy from sysdeps/unix/bsd/sun/sunos4/resourcebits.h
copy to sysdeps/unix/sysv/linux/alpha/resourcebits.h
index b5d3704..a53d523 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/sysv/linux/alpha/resourcebits.h
@@ -1,5 +1,5 @@
-/* Bit values for resource limits. SunOS 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+/* Bit values for resource limits. Linux/Alpha version.
+Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,32 +17,47 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
- subset of these kinds of resource limit. In systems where `getrlimit'
- and `setrlimit' are not system calls, these are the values used by the C
- library to emulate them. */
+/* These are the values for Linux/Alpha. */
/* Kinds of resource limit. */
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU,
+#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
RLIMIT_FSIZE,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
RLIMIT_DATA,
+#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
RLIMIT_STACK,
+#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
RLIMIT_CORE,
+#define RLIMIT_CORE RLIMIT_CORE
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
RLIMIT_RSS,
+#define RLIMIT_RSS RLIMIT_RSS
/* Number of open files. */
- RLIMIT_NOFILE,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ RLIMIT_OFILE,
+#define RLIMIT_OFILE RLIMIT_OFILE
+ RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+ /* Address space limit. */
+ RLIMIT_AS,
+#define RLIMIT_AS RLIMIT_AS
+ /* Number of processes. */
+ RLIMIT_NPROC,
+#define RLIMIT_NPROC RLIMIT_NPROC
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIM_NLIMITS
+ RLIMIT_NLIMITS, /* Number of limit flavors. */
+ RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
};
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/sysv/linux/m68k/resourcebits.h
similarity index 64%
copy from sysdeps/unix/bsd/sun/sunos4/resourcebits.h
copy to sysdeps/unix/sysv/linux/m68k/resourcebits.h
index b5d3704..65cc6e5 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/sysv/linux/m68k/resourcebits.h
@@ -1,5 +1,5 @@
-/* Bit values for resource limits. SunOS 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+/* Bit values for resource limits. Linux/m68k version.
+Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,32 +17,44 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
- subset of these kinds of resource limit. In systems where `getrlimit'
- and `setrlimit' are not system calls, these are the values used by the C
- library to emulate them. */
+/* These are the values for Linux/m68k. */
/* Kinds of resource limit. */
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU,
+#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
RLIMIT_FSIZE,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
RLIMIT_DATA,
+#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
RLIMIT_STACK,
+#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
RLIMIT_CORE,
+#define RLIMIT_CORE RLIMIT_CORE
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
RLIMIT_RSS,
+#define RLIMIT_RSS RLIMIT_RSS
+ /* Number of processes. */
+ RLIMIT_NPROC,
+#define RLIMIT_NPROC RLIMIT_NPROC
/* Number of open files. */
- RLIMIT_NOFILE,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+ RLIMIT_OFILE,
+#define RLIMIT_OFILE RLIMIT_OFILE
+ RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIM_NLIMITS
+ RLIMIT_NLIMITS, /* Number of limit flavors. */
+ RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
};
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/sysv/linux/mips/resourcebits.h
similarity index 60%
copy from sysdeps/unix/bsd/sun/sunos4/resourcebits.h
copy to sysdeps/unix/sysv/linux/mips/resourcebits.h
index b5d3704..095f40b 100644
--- a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
+++ b/sysdeps/unix/sysv/linux/mips/resourcebits.h
@@ -1,5 +1,5 @@
-/* Bit values for resource limits. SunOS 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+/* Bit values for resource limits. Linux/MIPS version.
+Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,32 +17,49 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
- subset of these kinds of resource limit. In systems where `getrlimit'
- and `setrlimit' are not system calls, these are the values used by the C
- library to emulate them. */
+/* These are the values for Linux/MIPS. */
/* Kinds of resource limit. */
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
RLIMIT_CPU,
+#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
RLIMIT_FSIZE,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
RLIMIT_DATA,
+#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
RLIMIT_STACK,
+#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
RLIMIT_CORE,
+#define RLIMIT_CORE RLIMIT_CORE
+ /* Number of open files. */
+ RLIMIT_OFILE,
+#define RLIMIT_OFILE RLIMIT_OFILE
+ RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+ /* Address space limit. */
+ RLIMIT_AS,
+#define RLIMIT_AS RLIMIT_AS
+ RLIMIT_VMEM = RLIMIT_AS,
+#define RLIMIT_VMEM RLIMIT_VMEM
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
RLIMIT_RSS,
- /* Number of open files. */
- RLIMIT_NOFILE,
- RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_RSS RLIMIT_RSS
+ /* Number of processes. */
+ RLIMIT_NPROC,
+#define RLIMIT_NPROC RLIMIT_NPROC
+ /* Locked-in-memory address space. */
+ RLIMIT_MEMLOCK,
+#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIM_NLIMITS
+ RLIMIT_NLIMITS, /* Number of limit flavors. */
+ RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same. */
};
diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c
deleted file mode 100644
index c1ae610..0000000
--- a/sysdeps/unix/sysv/sysv4/getdtsz.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Solaris uses sysconf ala POSIX.1. */
-#include <sysdeps/posix/getdtsz.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3887a8dca9937f602c27150b4483d03ee8353eac
commit 3887a8dca9937f602c27150b4483d03ee8353eac
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jul 28 23:43:36 1996 +0000
Sun Jul 28 19:26:40 1996 David S. Miller <dm@neteng.engr.sgi.com>
* sysdeps/mips/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
Declare _dl_runtime_resolve with __attribute__ ((unused)) so the
compiler doesn't elide it.
(elf_machine_rel): Follow Jul 14 change in sysdeps/i386/dl-machine.h.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 822d9ab..50e9f64 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -67,14 +67,13 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* FIXME: the offset of gp from GOT may be system-dependent. */
return (ElfW(Addr) *) (gpreg - 0x7ff0);
}
-
/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
Must be inlined in a function which uses global data. */
static inline ElfW(Addr) *
elf_machine_got (void)
{
- register ElfW(Addr) gpreg asm ("$28");
- return elf_mips_got_from_gpreg (gpreg);
+ register ElfW(Addr) gp asm ("$28");
+ return (ElfW(Addr) *) (gp - 0x7ff0);
}
@@ -93,56 +92,6 @@ elf_machine_load_address (void)
return addr;
}
-/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
- MAP is the object containing the reloc. */
-
-static inline void
-elf_machine_rel (struct link_map *map,
- const ElfW(Rel) *reloc, const ElfW(Sym) *sym,
- ElfW(Addr) (*resolve) (const ElfW(Sym) **ref,
- ElfW(Addr) reloc_addr,
- int noplt))
-{
- ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- ElfW(Addr) loadbase, undo;
-
- switch (ELFW(R_TYPE) (reloc->r_info))
- {
- case R_MIPS_REL32:
- if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
- && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
- || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
- *reloc_addr += map->l_addr;
- else
- {
- if (resolve && map == &_dl_rtld_map)
- /* Undo the relocation done here during bootstrapping. Now we will
- relocate it anew, possibly using a binding found in the user
- program or a loaded library rather than the dynamic linker's
- built-in definitions used while loading those libraries. */
- undo = map->l_addr + sym->st_value;
- else
- undo = 0;
- loadbase = (resolve ? (*resolve) (&sym, (ElfW(Addr)) reloc_addr, 0) :
- /* RESOLVE is null during bootstrap relocation. */
- map->l_addr);
- *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
- }
- break;
- case R_MIPS_NONE: /* Alright, Wilbur. */
- break;
- default:
- assert (! "unexpected dynamic reloc type");
- break;
- }
-}
-
-static inline void
-elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
-{
- /* Do nothing. */
-}
-
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
@@ -159,7 +108,7 @@ elf_machine_got_rel (struct link_map *map)
ElfW(Addr) resolve (const ElfW(Sym) *sym)
{
- ElfW(Sym) *ref = sym;
+ const ElfW(Sym) *ref = sym;
ElfW(Addr) sym_loadaddr;
sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope,
map->l_name, 0, 1);
@@ -304,6 +253,10 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg)
to usual c arguments. */
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+/* This is called from assembly stubs below which the compiler can't see. */ \
+static ElfW(Addr) __dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr)) \
+ __attribute__ ((unused)); \
+\
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word) sym_index,\
ElfW(Word) return_address,\
@@ -387,8 +340,6 @@ _dl_runtime_resolve:\n\
where the dynamic linker should not map anything. */
#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL
-
-
/* Initial entry point code for the dynamic linker.
The C function `_dl_start' is the real entry point;
its return value is the user program's entry point. */
@@ -464,3 +415,60 @@ _dl_start_user:\n\
.end _start\n\
");
+#ifdef RESOLVE
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rel (struct link_map *map,
+ const ElfW(Rel) *reloc, const ElfW(Sym) *sym)
+{
+ ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ ElfW(Addr) loadbase, undo;
+
+ switch (ELFW(R_TYPE) (reloc->r_info))
+ {
+ case R_MIPS_REL32:
+ if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
+ && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
+ || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
+ *reloc_addr += map->l_addr;
+ else
+ {
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a;
+ make the reference weak so static programs can still link. This
+ declaration cannot be done when compiling rtld.c (i.e. #ifdef
+ RTLD_BOOTSTRAP) because rtld.c contains the common defn for
+ _dl_rtld_map, which is incompatible with a weak decl in the same
+ file. */
+ weak_extern (_dl_rtld_map);
+ if (map == &_dl_rtld_map)
+ /* Undo the relocation done here during bootstrapping. Now we will
+ relocate it anew, possibly using a binding found in the user
+ program or a loaded library rather than the dynamic linker's
+ built-in definitions used while loading those libraries. */
+ undo = map->l_addr + sym->st_value;
+ else
+#endif
+ undo = 0;
+ loadbase = RESOLVE (&sym, (ElfW(Addr)) reloc_addr, 0);
+ *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
+ }
+ break;
+ case R_MIPS_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+{
+ /* Do nothing. */
+}
+
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8db38e6c0f1bfbaae3bba20c16a915556a58d8fa
commit 8db38e6c0f1bfbaae3bba20c16a915556a58d8fa
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 26 04:37:17 1996 +0000
Fri Jul 26 00:36:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mips/dl-machine.h: New file, contributed by Kazumoto Kojima
<kkojima@info.kanagawa-u.ac.jp>.
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
new file mode 100644
index 0000000..822d9ab
--- /dev/null
+++ b/sysdeps/mips/dl-machine.h
@@ -0,0 +1,466 @@
+/* Machine-dependent ELF dynamic relocation inline functions. mips version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define ELF_MACHINE_NAME "MIPS"
+
+#include <assert.h>
+#include <string.h>
+#include <link.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+/* DT_MIPS macro ranslate a processor specific dynamic tag to the index
+ in l_info array. */
+#define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)
+
+#if 1
+/* XXX If FLAGS has the MAP_ALIGN bit, we need 64k alignement. */
+#ifndef MAP_ALIGN
+#define MAP_ALIGN 0x1000
+#endif
+#define ELF_MACHINE_ALIGN_MASK(flags) ((flags & MAP_ALIGN) ? 0xffff : 0)
+#endif
+
+/* If there is a DT_MIPS_RLD_MAP entry in the dynamic section, fill it in
+ with the run-time address of the r_debug structure */
+#define ELF_MACHINE_SET_DEBUG(l,r) \
+do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
+ *(ElfW(Addr) *)((l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr) = \
+ (ElfW(Addr)) (r); \
+ } while (0)
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int
+elf_machine_matches_host (ElfW(Half) e_machine)
+{
+ switch (e_machine)
+ {
+ case EM_MIPS:
+ case EM_MIPS_RS4_BE:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static inline ElfW(Addr) *
+elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
+{
+ /* FIXME: the offset of gp from GOT may be system-dependent. */
+ return (ElfW(Addr) *) (gpreg - 0x7ff0);
+}
+
+/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
+ Must be inlined in a function which uses global data. */
+static inline ElfW(Addr) *
+elf_machine_got (void)
+{
+ register ElfW(Addr) gpreg asm ("$28");
+ return elf_mips_got_from_gpreg (gpreg);
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline ElfW(Addr)
+elf_machine_load_address (void)
+{
+ ElfW(Addr) addr;
+ asm (" .set noreorder\n"
+ " la %0, here\n"
+ " bltzal $0, here\n"
+ " nop\n"
+ "here: subu %0, $31, %0\n"
+ " .set reorder\n"
+ : "=r" (addr));
+ return addr;
+}
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rel (struct link_map *map,
+ const ElfW(Rel) *reloc, const ElfW(Sym) *sym,
+ ElfW(Addr) (*resolve) (const ElfW(Sym) **ref,
+ ElfW(Addr) reloc_addr,
+ int noplt))
+{
+ ElfW(Addr) *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ ElfW(Addr) loadbase, undo;
+
+ switch (ELFW(R_TYPE) (reloc->r_info))
+ {
+ case R_MIPS_REL32:
+ if (ELFW(ST_BIND) (sym->st_info) == STB_LOCAL
+ && (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
+ || ELFW(ST_TYPE) (sym->st_info) == STT_NOTYPE))
+ *reloc_addr += map->l_addr;
+ else
+ {
+ if (resolve && map == &_dl_rtld_map)
+ /* Undo the relocation done here during bootstrapping. Now we will
+ relocate it anew, possibly using a binding found in the user
+ program or a loaded library rather than the dynamic linker's
+ built-in definitions used while loading those libraries. */
+ undo = map->l_addr + sym->st_value;
+ else
+ undo = 0;
+ loadbase = (resolve ? (*resolve) (&sym, (ElfW(Addr)) reloc_addr, 0) :
+ /* RESOLVE is null during bootstrap relocation. */
+ map->l_addr);
+ *reloc_addr += (sym ? (loadbase + sym->st_value) : 0) - undo;
+ }
+ break;
+ case R_MIPS_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+{
+ /* Do nothing. */
+}
+
+/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
+#define ELF_MIPS_GNU_GOT1_MASK 0x80000000
+
+/* Relocate GOT. */
+static void
+elf_machine_got_rel (struct link_map *map)
+{
+ ElfW(Addr) *got;
+ ElfW(Sym) *sym;
+ int i, n;
+ struct link_map **scope;
+ const char *strtab
+ = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+
+ ElfW(Addr) resolve (const ElfW(Sym) *sym)
+ {
+ ElfW(Sym) *ref = sym;
+ ElfW(Addr) sym_loadaddr;
+ sym_loadaddr = _dl_lookup_symbol (strtab + sym->st_name, &ref, scope,
+ map->l_name, 0, 1);
+ return (ref)? sym_loadaddr + ref->st_value: 0;
+ }
+
+ got = (ElfW(Addr) *) ((void *) map->l_addr
+ + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ /* got[0] is reserved. got[1] is also reserved for the dynamic object
+ generated by gnu ld. Skip these reserved entries from relocation. */
+ i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
+ n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
+ /* Add the run-time display to all local got entries. */
+ while (i < n)
+ got[i++] += map->l_addr;
+
+ /* Set scope. */
+ scope = _dl_object_relocation_scope (map);
+
+ /* Handle global got entries. */
+ got += n;
+ sym = (ElfW(Sym) *) ((void *) map->l_addr
+ + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
+ i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
+ - map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
+
+ while (i--)
+ {
+ if (sym->st_shndx == SHN_UNDEF)
+ {
+ if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC)
+ {
+ if (sym->st_value /* && maybe_stub (sym->st_value) */)
+ *got = sym->st_value + map->l_addr;
+ else
+ *got = resolve (sym);
+ }
+ else /* if (*got == 0 || *got == QS) */
+ *got = resolve (sym);
+ }
+ else if (sym->st_shndx == SHN_COMMON)
+ *got = resolve (sym);
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
+ && *got != sym->st_value
+ /* && maybe_stub (*got) */)
+ *got += map->l_addr;
+ else if (ELFW(ST_TYPE) (sym->st_info) == STT_SECTION
+ && ELFW(ST_BIND) (sym->st_info) == STB_GLOBAL)
+ {
+ if (sym->st_other == 0 && sym->st_shndx == SHN_ABS)
+ *got = sym->st_value + map->l_addr; /* only for _gp_disp */
+ /* else SGI stuff ignored */
+ }
+ else
+ *got = resolve (sym);
+
+ got++;
+ sym++;
+ }
+
+ *_dl_global_scope_end = NULL;
+
+ return;
+}
+
+/* The MIPS never uses Elfxx_Rela relocations. */
+#define ELF_MACHINE_NO_RELA 1
+
+/* Set up the loaded object described by L so its stub function
+ will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline void
+elf_machine_runtime_setup (struct link_map *l, int lazy)
+{
+ ElfW(Addr) *got;
+ extern void _dl_runtime_resolve (ElfW(Word));
+
+ if (lazy)
+ {
+ /* The GOT entries for functions have not yet been filled in.
+ Their initial contents will arrange when called to put an
+ offset into the .dynsym section in t8, the return address
+ in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
+ got = (ElfW(Addr) *) ((void *) l->l_addr
+ + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+
+ /* This function will get called to fix up the GOT entry indicated by
+ the register t8, and then jump to the resolved address. */
+ got[0] = (ElfW(Addr)) &_dl_runtime_resolve;
+
+ /* Store l to _GLOBAL_OFFSET_TABLE[1] for gnu object. The MSB
+ of got[1] of a gnu object is set to identify gnu objects.
+ Where we can store l for non gnu objects? XXX */
+ if ((got[1] & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ got[1] = (ElfW(Addr)) ((unsigned) l | ELF_MIPS_GNU_GOT1_MASK);
+ else
+ ; /* Do nothing. */
+ }
+
+ /* Relocate global offset table. */
+ elf_machine_got_rel (l);
+}
+
+/* Get link_map for this object. */
+static inline struct link_map *
+elf_machine_runtime_link_map (ElfW(Addr) gpreg)
+{
+ ElfW(Addr) *got = elf_mips_got_from_gpreg (gpreg);
+ ElfW(Word) g1;
+
+ g1 = ((ElfW(Word) *) got)[1];
+
+ /* got[1] is reserved to keep its link map address for the shared
+ object generated by gnu linker. If not so, we must search GOT
+ in object list slowly. XXX */
+ if ((g1 & ELF_MIPS_GNU_GOT1_MASK) != 0)
+ return (struct link_map *) (g1 & ~ELF_MIPS_GNU_GOT1_MASK);
+ else
+ {
+ struct link_map *l = _dl_loaded;
+ while (l)
+ {
+ if (got == (ElfW(Addr) *) ((void *) l->l_addr
+ + l->l_info[DT_PLTGOT]->d_un.d_ptr))
+ return l;
+ l = l->l_next;
+ }
+ }
+ _dl_signal_error (0, NULL, "cannot find runtime link map");
+}
+
+/* Mips has no PLT but define elf_machine_relplt to be elf_machine_rel. */
+#define elf_machine_relplt elf_machine_rel
+
+/* Define mips specific runtime resolver. The function __dl_runtime_resolve
+ is called from assembler function _dl_runtime_resolve which converts
+ special argument registers t7 ($15) and t8 ($24):
+ t7 address to return to the caller of the function
+ t8 index for this function symbol in .dynsym
+ to usual c arguments. */
+
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
+static ElfW(Addr) \
+__dl_runtime_resolve (ElfW(Word) sym_index,\
+ ElfW(Word) return_address,\
+ ElfW(Addr) old_gpreg)\
+{\
+ struct link_map *l = elf_machine_runtime_link_map (old_gpreg);\
+ const ElfW(Sym) *const symtab\
+ = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);\
+ const char *strtab\
+ = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);\
+ const ElfW(Addr) *got\
+ = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);\
+ const ElfW(Word) local_gotno\
+ = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;\
+ const ElfW(Word) gotsym\
+ = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;\
+ const ElfW(Sym) *definer;\
+ ElfW(Addr) loadbase;\
+ ElfW(Addr) funcaddr;\
+ struct link_map **scope;\
+\
+ /* Look up the symbol's run-time value. */\
+ scope = _dl_object_relocation_scope (l);\
+ definer = &symtab[sym_index];\
+\
+ loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,\
+ scope, l->l_name, 0, 1);\
+\
+ *_dl_global_scope_end = NULL;\
+\
+ /* Apply the relocation with that value. */\
+ funcaddr = loadbase + definer->st_value;\
+ *(got + local_gotno + sym_index - gotsym) = funcaddr;\
+\
+ return funcaddr;\
+}\
+\
+asm ("\n\
+ .text\n\
+ .align 2\n\
+ .globl _dl_runtime_resolve\n\
+ .type _dl_runtime_resolve,@function\n\
+ .ent _dl_runtime_resolve\n\
+_dl_runtime_resolve:\n\
+ .set noreorder\n\
+ # Save old GP to $3.\n\
+ move $3,$28\n\
+ # Modify t9 ($25) so as to point .cpload instruction.\n\
+ addu $25,8\n\
+ # Compute GP.\n\
+ .cpload $25\n\
+ .set reorder\n\
+ # Save arguments and sp value in stack.\n\
+ subu $29, 40\n\
+ .cprestore 32\n\
+ sw $15, 36($29)\n\
+ sw $4, 12($29)\n\
+ sw $5, 16($29)\n\
+ sw $6, 20($29)\n\
+ sw $7, 24($29)\n\
+ sw $16, 28($29)\n\
+ move $16, $29\n\
+ move $4, $24\n\
+ move $5, $15\n\
+ move $6, $3\n\
+ jal __dl_runtime_resolve\n\
+ move $29, $16\n\
+ lw $31, 36($29)\n\
+ lw $4, 12($29)\n\
+ lw $5, 16($29)\n\
+ lw $6, 20($29)\n\
+ lw $7, 24($29)\n\
+ lw $16, 28($29)\n\
+ addu $29, 40\n\
+ move $25, $2\n\
+ jr $25\n\
+ .end _dl_runtime_resolve\n\
+");
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x00000000UL
+
+
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+ .text\n\
+ .globl _start\n\
+ .globl _dl_start_user\n\
+ .ent _start\n\
+_start:\n\
+ .set noreorder\n\
+ bltzal $0, 0f\n\
+ nop\n\
+0: .cpload $31\n\
+ .set reorder\n\
+ # i386 ABI book says that the first entry of GOT holds\n\
+ # the address of the dynamic structure. Though MIPS ABI\n\
+ # doesn't say nothing about this, I emulate this here.\n\
+ la $4, _DYNAMIC\n\
+ sw $4, -0x7ff0($28)\n\
+ move $4, $29\n\
+ jal _dl_start\n\
+ # Get the value of label '_dl_start_user' in t9 ($25).\n\
+ la $25, _dl_start_user\n\
+_dl_start_user:\n\
+ .set noreorder\n\
+ .cpload $25\n\
+ .set reorder\n\
+ move $16, $28\n\
+ # Save the user entry point address in saved register.\n\
+ move $17, $2\n\
+ # See if we were run as a command with the executable file\n\
+ # name as an extra leading argument.\n\
+ lw $2, _dl_skip_args\n\
+ beq $2, $0, 1f\n\
+ # Load the original argument count.\n\
+ lw $4, 0($29)\n\
+ # Subtract _dl_skip_args from it.\n\
+ subu $4, $2\n\
+ # Adjust the stack pointer to skip _dl_skip_args words.\n\
+ sll $2,2\n\
+ addu $29, $2\n\
+ # Save back the modified argument count.\n\
+ sw $4, 0($29)\n\
+ # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\
+1: la $2, _dl_default_scope\n\
+ lw $4, 8($2)\n\
+ # Call _dl_init_next to return the address of an initializer\n\
+ # function to run.\n\
+ jal _dl_init_next\n\
+ move $28, $16\n\
+ # Check for zero return, when out of initializers.\n\
+ beq $2, $0, 2f\n\
+ # Call the shared object initializer function.\n\
+ move $25, $2\n\
+ lw $4, 0($29)\n\
+ lw $5, 4($29)\n\
+ lw $6, 8($29)\n\
+ lw $7, 12($29)\n\
+ jalr $25\n\
+ move $28, $16\n\
+ # Loop to call _dl_init_next for the next initializer.\n\
+ b 1b\n\
+ # Pass our finalizer function to the user in ra.\n\
+2: la $31, _dl_fini\n\
+ # Jump to the user entry point.\n\
+ move $25, $17\n\
+ lw $4, 0($29)\n\
+ lw $5, 4($29)\n\
+ lw $6, 8($29)\n\
+ lw $7, 12($29)\n\
+ jr $25\n\
+ .end _start\n\
+");
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f895a140a73247f4f62be2103e1eca2784f7f70
commit 4f895a140a73247f4f62be2103e1eca2784f7f70
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 22 13:43:16 1996 +0000
Sat Jul 20 14:03:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Remove bogus
#undef RESOLVE.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 0cb0b34..4642f00 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -255,8 +255,6 @@ elf_machine_rela (struct link_map *map,
assert (! "unexpected dynamic reloc type");
break;
}
-
-#undef RESOLVE
}
static inline void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7cc46c197625caabaa012dc6c48ae86a98e92510
commit 7cc46c197625caabaa012dc6c48ae86a98e92510
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jul 18 08:41:25 1996 +0000
Wed Jul 17 10:54:20 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.S: Make errno a bss symbol, not a
common symbol (makes errno accessible from gdb).
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 6540b80..2d05305 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -20,11 +20,15 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H
#include <errnos.h>
- .comm errno, 4
+ .section .bss
+ .globl errno
+errno: .space 4
#ifdef __ELF__
- .type errno, @object
+ .type errno, @object
+ .size errno, 4
#endif
+ .text
LEAF(__syscall_error, 0)
ldgp gp, 0(t12)
.prologue 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa6ab54663aa7bda5648633d291e14e5ca300f77
commit aa6ab54663aa7bda5648633d291e14e5ca300f77
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jul 18 08:41:17 1996 +0000
Wed Jul 17 10:54:20 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/start.S: Move to ...
* sysdeps/alpha/elf/start.S: here.
diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/alpha/elf/start.S
similarity index 94%
rename from sysdeps/unix/sysv/linux/alpha/start.S
rename to sysdeps/alpha/elf/start.S
index bffa913..c534d69 100644
--- a/sysdeps/unix/sysv/linux/alpha/start.S
+++ b/sysdeps/alpha/elf/start.S
@@ -1,5 +1,6 @@
-/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- Contributed by Richard Henderson <rth@tamu.edu>
+/* Startup code for Alpha/ELF.
+Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+Contributed by Richard Henderson <rth@tamu.edu>
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=490915ed85ba98ee4ca7711323e9f5fdedd3dd46
commit 490915ed85ba98ee4ca7711323e9f5fdedd3dd46
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 17 19:31:44 1996 +0000
Wed Jul 17 17:08:48 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/m68k/Makefile (crypt): Variable removed.
* sysdeps/sparc/Makefile: Likewise.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index ffdc682..a5e9064 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -16,15 +16,6 @@
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
-# This uses MIT assembler syntax. We have no convenient
-# way to choose a sysdep file based on MIT vs Motorola syntax.
-# No existing m68k ports use Motorola syntax.
-
-# Don't use crypt/crypt.sun3.S. It's not pic-clean.
-ifneq (yes,$(build-shared))
-crypt := crypt.sun3
-endif
-
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
# variable.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c6195ef6326e2691b89635cf8f14813b123b7d9f
commit c6195ef6326e2691b89635cf8f14813b123b7d9f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 17 16:14:42 1996 +0000
Tue Jul 16 01:52:42 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h: Follow Jul 14 change in
sysdeps/i386/dl-machine.h.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index a11ff23..0cb0b34 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -17,12 +17,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#ifndef dl_machine_h
+#define dl_machine_h
+
#define ELF_MACHINE_NAME "m68k"
#include <assert.h>
-#include <string.h>
-#include <link.h>
-
/* Return nonzero iff E_MACHINE is compatible with the running host. */
static inline int
@@ -68,109 +68,6 @@ elf_machine_load_address (void)
((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \
(dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela))
-/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
- MAP is the object containing the reloc. */
-
-static inline void
-elf_machine_rela (struct link_map *map,
- const Elf32_Rela *reloc, const Elf32_Sym *sym,
- Elf32_Addr (*resolve) (const Elf32_Sym **ref,
- Elf32_Addr reloc_addr,
- int noplt))
-{
- Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- Elf32_Addr loadbase;
-
-#ifdef RTLD_BOOTSTRAP
-#define RESOLVE(noplt) map->l_addr
-#else
-#define RESOLVE(noplt) (*resolve) (&sym, (Elf32_Addr) reloc_addr, noplt)
-#endif
-
- switch (ELF32_R_TYPE (reloc->r_info))
- {
- case R_68K_COPY:
- loadbase = RESOLVE (0);
- memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
- break;
- case R_68K_GLOB_DAT:
- loadbase = RESOLVE (0);
- *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
- break;
- case R_68K_JMP_SLOT:
- loadbase = RESOLVE (1);
- *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
- break;
- case R_68K_8:
- loadbase = RESOLVE (0);
- *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_16:
- loadbase = RESOLVE (0);
- *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_32:
- loadbase = RESOLVE (0);
- *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend);
- break;
- case R_68K_RELATIVE:
- *reloc_addr = map->l_addr + reloc->r_addend;
- break;
- case R_68K_PC8:
- loadbase = RESOLVE (0);
- *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend
- - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_PC16:
- loadbase = RESOLVE (0);
- *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend
- - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_PC32:
- loadbase = RESOLVE (0);
- *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
- + reloc->r_addend
- - (Elf32_Addr) reloc_addr);
- break;
- case R_68K_NONE: /* Alright, Wilbur. */
- break;
- default:
- assert (! "unexpected dynamic reloc type");
- break;
- }
-
-#undef RESOLVE
-}
-
-static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
-{
- Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- switch (ELF32_R_TYPE (reloc->r_info))
- {
- case R_68K_NONE:
- break;
- case R_68K_JMP_SLOT:
- *reloc_addr += map->l_addr;
- break;
- default:
- assert (! "unexpected PLT reloc type");
- break;
- }
-}
-
-/* Nonzero iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value. */
-#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT)
-
-/* The m68k never uses Elf32_Rel relocations. */
-#define ELF_MACHINE_NO_REL 1
-
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
@@ -283,3 +180,98 @@ _dl_start_user:
move.l %sp, %fp
| Jump to the user's entry point.
jmp (%a4)");
+
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT)
+
+/* The m68k never uses Elf32_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rela (struct link_map *map,
+ const Elf32_Rela *reloc, const Elf32_Sym *sym)
+{
+ Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ Elf32_Addr loadbase;
+
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_68K_COPY:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
+ break;
+ case R_68K_GLOB_DAT:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
+ break;
+ case R_68K_JMP_SLOT:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 1);
+ *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
+ break;
+ case R_68K_8:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
+ break;
+ case R_68K_16:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
+ break;
+ case R_68K_32:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
+ break;
+ case R_68K_RELATIVE:
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ break;
+ case R_68K_PC8:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend - (Elf32_Addr) reloc_addr);
+ break;
+ case R_68K_PC16:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend - (Elf32_Addr) reloc_addr);
+ break;
+ case R_68K_PC32:
+ loadbase = RESOLVE (&sym, (Elf32_Addr) reloc_addr, 0);
+ *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend - (Elf32_Addr) reloc_addr);
+ break;
+ case R_68K_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+
+#undef RESOLVE
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+{
+ Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_68K_JMP_SLOT:
+ *reloc_addr += map->l_addr;
+ break;
+ default:
+ assert (! "unexpected PLT reloc type");
+ break;
+ }
+}
+
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de4931d1d7e6b5f07728f378b24259565b06e556
commit de4931d1d7e6b5f07728f378b24259565b06e556
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jul 16 06:12:11 1996 +0000
Tue Jul 16 00:31:31 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h: Mirror Roland's changes to
i386/dl-machine.h of 960713.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 8986ed7..b900b76 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -18,14 +18,16 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* This was written in the absense of an ABI -- don't expect
+/* This was written in the absence of an ABI -- don't expect
it to remain unchanged. */
+#ifndef dl_machine_h
+#define dl_machine_h 1
+
#define ELF_MACHINE_NAME "alpha"
#include <assert.h>
#include <string.h>
-#include <link.h>
/* Return nonzero iff E_MACHINE is compatible with the running host. */
@@ -35,7 +37,6 @@ elf_machine_matches_host (Elf64_Word e_machine)
return e_machine == EM_ALPHA;
}
-
/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
Must be inlined in a function which uses global data. */
static inline Elf64_Addr *
@@ -45,7 +46,6 @@ elf_machine_got (void)
return (Elf64_Addr *)(gp - 0x8000);
}
-
/* Return the run-time load address of the shared object. */
static inline Elf64_Addr
elf_machine_load_address (void)
@@ -78,6 +78,164 @@ elf_machine_load_address (void)
return dot + 4 + zero_disp;
}
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline void
+elf_machine_runtime_setup (struct link_map *l, int lazy)
+{
+ Elf64_Addr plt;
+ extern void _dl_runtime_resolve (void);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* The GOT entries for the functions in the PLT have not been
+ filled in yet. Their initial contents are directed to the
+ PLT which arranges for the dynamic linker to be called. */
+ plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
+
+ /* This function will be called to perform the relocation. */
+ *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
+
+ /* Identify this shared object */
+ *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
+ }
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \
+"/* Trampoline for _dl_runtime_resolver */
+ .globl _dl_runtime_resolve
+ .ent _dl_runtime_resolve
+_dl_runtime_resolve:
+ lda $sp, -168($sp)
+ .frame $sp, 168, $26
+ /* Preserve all registers that C normally doesn't. */
+ stq $26, 0($sp)
+ stq $0, 8($sp)
+ stq $1, 16($sp)
+ stq $2, 24($sp)
+ stq $3, 32($sp)
+ stq $4, 40($sp)
+ stq $5, 48($sp)
+ stq $6, 56($sp)
+ stq $7, 64($sp)
+ stq $8, 72($sp)
+ stq $16, 80($sp)
+ stq $17, 88($sp)
+ stq $18, 96($sp)
+ stq $19, 104($sp)
+ stq $20, 112($sp)
+ stq $21, 120($sp)
+ stq $22, 128($sp)
+ stq $23, 136($sp)
+ stq $24, 144($sp)
+ stq $25, 152($sp)
+ stq $29, 160($sp)
+ .mask 0x27ff01ff, -168
+ /* Set up our $gp */
+ br $gp, .+4
+ ldgp $gp, 0($gp)
+ .prologue 1
+ /* Set up the arguments for _dl_runtime_resolve. */
+ /* $16 = link_map out of plt0 */
+ ldq $16, 8($27)
+ /* $17 = offset of reloc entry */
+ mov $28, $17
+ /* Do the fixup */
+ bsr $26, fixup..ng
+ /* Move the destination address to a safe place. */
+ mov $0, $27
+ /* Restore program registers. */
+ ldq $26, 0($sp)
+ ldq $0, 8($sp)
+ ldq $1, 16($sp)
+ ldq $2, 24($sp)
+ ldq $3, 32($sp)
+ ldq $4, 40($sp)
+ ldq $5, 48($sp)
+ ldq $6, 56($sp)
+ ldq $7, 64($sp)
+ ldq $8, 72($sp)
+ ldq $16, 80($sp)
+ ldq $17, 88($sp)
+ ldq $18, 96($sp)
+ ldq $19, 104($sp)
+ ldq $20, 112($sp)
+ ldq $21, 120($sp)
+ ldq $22, 128($sp)
+ ldq $23, 136($sp)
+ ldq $24, 144($sp)
+ ldq $25, 152($sp)
+ ldq $29, 160($sp)
+ /* Clean up and turn control to the destination */
+ lda $sp, 168($sp)
+ jmp $31, ($27)
+ .end _dl_runtime_resolve");
+
+/* The PLT uses Elf_Rel relocs. */
+#define elf_machine_relplt elf_machine_rela
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+/* FIXME */
+#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL)
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+.text
+ .globl _start
+ .globl _dl_start_user
+_start:
+ br $gp,.+4
+ ldgp $gp, 0($gp)
+ /* Pass pointer to argument block to _dl_start. */
+ mov $sp, $16
+ bsr $26, _dl_start..ng
+_dl_start_user:
+ /* Save the user entry point address in s0. */
+ mov $0, $9
+ /* See if we were run as a command with the executable file
+ name as an extra leading argument. If so, adjust the stack
+ pointer to skip _dl_skip_args words. */
+ ldl $1, _dl_skip_args
+ beq $1, 0f
+ ldq $2, 0($sp)
+ subq $2, $1, $2
+ s8addq $1, $sp, $sp
+ stq $2, 0($sp)
+ /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
+0: ldq $10, _dl_default_scope+16
+ /* Call _dl_init_next to return the address of an initalizer
+ function to run. */
+1: mov $10, $16
+ jsr $26, _dl_init_next
+ ldgp $gp, 0($26)
+ beq $0, 2f
+ mov $0, $27
+ jsr $26, ($0)
+ ldgp $gp, 0($26)
+ br 1b
+2: /* Pass our finalizer function to the user in $0. */
+ lda $0, _dl_fini
+ /* Jump to the user's entry point. */
+ mov $9, $27
+ jmp ($9)");
+
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_pltrel_p(type) ((type) == R_ALPHA_JMP_SLOT)
+
+/* The alpha never uses Elf64_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+#endif /* !dl_machine_h */
+
+#ifdef RESOLVE
/* Fix up the instructions of a PLT entry to invoke the function
rather than the dynamic linker. */
@@ -154,13 +312,11 @@ elf_alpha_fix_plt(struct link_map *l,
static inline void
elf_machine_rela (struct link_map *map,
const Elf64_Rela *reloc,
- const Elf64_Sym *sym,
- Elf64_Addr (*resolve) (const Elf64_Sym **ref,
- Elf64_Addr reloc_addr,
- int noplt))
+ const Elf64_Sym *sym)
{
- Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
- unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
+ Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+ unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
+
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
reference weak so static programs can still link. This declaration
@@ -175,8 +331,8 @@ elf_machine_rela (struct link_map *map,
if (r_info == R_ALPHA_RELATIVE)
{
- /* Already done in dynamic linker. */
#ifndef RTLD_BOOTSTRAP
+ /* Already done in dynamic linker. */
if (map != &_dl_rtld_map)
#endif
*reloc_addr += map->l_addr;
@@ -187,12 +343,8 @@ elf_machine_rela (struct link_map *map,
{
Elf64_Addr loadbase, sym_value;
-#ifndef RTLD_BOOTSTRAP
- loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
- r_info == R_ALPHA_JMP_SLOT);
-#else
- loadbase = map->l_addr;
-#endif
+ loadbase = RESOLVE (&sym, (Elf64_Addr)reloc_addr,
+ r_info == R_ALPHA_JMP_SLOT);
sym_value = sym ? loadbase + sym->st_value : 0;
if (r_info == R_ALPHA_GLOB_DAT)
@@ -233,8 +385,8 @@ elf_machine_rela (struct link_map *map,
static inline void
elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
{
- Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
- unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
+ Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+ unsigned long const r_info = ELF64_R_TYPE (reloc->r_info);
if (r_info == R_ALPHA_JMP_SLOT)
{
@@ -243,159 +395,9 @@ elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
*reloc_addr += map->l_addr;
}
else if (r_info == R_ALPHA_NONE)
- ;
+ return;
else
assert (! "unexpected PLT reloc type");
}
-/* The alpha never uses Elf_Rel relocations. */
-#define ELF_MACHINE_NO_REL 1
-
-
-/* Set up the loaded object described by L so its unrelocated PLT
- entries will jump to the on-demand fixup code in dl-runtime.c. */
-
-static inline void
-elf_machine_runtime_setup (struct link_map *l, int lazy)
-{
- Elf64_Addr plt;
- extern void _dl_runtime_resolve (void);
-
- if (l->l_info[DT_JMPREL] && lazy)
- {
- /* The GOT entries for the functions in the PLT have not been
- filled in yet. Their initial contents are directed to the
- PLT which arranges for the dynamic linker to be called. */
- plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
-
- /* This function will be called to perform the relocation. */
- *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
-
- /* Identify this shared object */
- *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
- }
-}
-
-/* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
-#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \
-"/* Trampoline for _dl_runtime_resolver */
- .globl _dl_runtime_resolve
- .ent _dl_runtime_resolve
-_dl_runtime_resolve:
- lda $sp, -168($sp)
- .frame $sp, 168, $26
- /* Preserve all registers that C normally doesn't. */
- stq $26, 0($sp)
- stq $0, 8($sp)
- stq $1, 16($sp)
- stq $2, 24($sp)
- stq $3, 32($sp)
- stq $4, 40($sp)
- stq $5, 48($sp)
- stq $6, 56($sp)
- stq $7, 64($sp)
- stq $8, 72($sp)
- stq $16, 80($sp)
- stq $17, 88($sp)
- stq $18, 96($sp)
- stq $19, 104($sp)
- stq $20, 112($sp)
- stq $21, 120($sp)
- stq $22, 128($sp)
- stq $23, 136($sp)
- stq $24, 144($sp)
- stq $25, 152($sp)
- stq $29, 160($sp)
- .mask 0x27ff01ff, -168
- /* Set up our $gp */
- br $gp, .+4
- ldgp $gp, 0($gp)
- .prologue 1
- /* Set up the arguments for _dl_runtime_resolve. */
- /* $16 = link_map out of plt0 */
- ldq $16, 8($27)
- /* $17 = offset of reloc entry */
- mov $28, $17
- /* Do the fixup */
- bsr $26, fixup..ng
- /* Move the destination address to a safe place. */
- mov $0, $27
- /* Restore program registers. */
- ldq $26, 0($sp)
- ldq $0, 8($sp)
- ldq $1, 16($sp)
- ldq $2, 24($sp)
- ldq $3, 32($sp)
- ldq $4, 40($sp)
- ldq $5, 48($sp)
- ldq $6, 56($sp)
- ldq $7, 64($sp)
- ldq $8, 72($sp)
- ldq $16, 80($sp)
- ldq $17, 88($sp)
- ldq $18, 96($sp)
- ldq $19, 104($sp)
- ldq $20, 112($sp)
- ldq $21, 120($sp)
- ldq $22, 128($sp)
- ldq $23, 136($sp)
- ldq $24, 144($sp)
- ldq $25, 152($sp)
- ldq $29, 160($sp)
- /* Clean up and turn control to the destination */
- lda $sp, 168($sp)
- jmp $31, ($27)
- .end _dl_runtime_resolve");
-
-/* The PLT uses Elf_Rel relocs. */
-#define elf_machine_relplt elf_machine_rela
-
-/* Mask identifying addresses reserved for the user program,
- where the dynamic linker should not map anything. */
-/* FIXME */
-#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL)
-
-/* Initial entry point code for the dynamic linker.
- The C function `_dl_start' is the real entry point;
- its return value is the user program's entry point. */
-
-#define RTLD_START asm ("\
-.text
- .globl _start
- .globl _dl_start_user
-_start:
- br $gp,.+4
- ldgp $gp, 0($gp)
- /* Pass pointer to argument block to _dl_start. */
- mov $sp, $16
- bsr $26, _dl_start..ng
-_dl_start_user:
- /* Save the user entry point address in s0. */
- mov $0, $9
- /* See if we were run as a command with the executable file
- name as an extra leading argument. If so, adjust the stack
- pointer to skip _dl_skip_args words. */
- ldl $1, _dl_skip_args
- beq $1, 0f
- ldq $2, 0($sp)
- subq $2, $1, $2
- s8addq $1, $sp, $sp
- stq $2, 0($sp)
- /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
-0: ldq $10, _dl_default_scope+16
- /* Call _dl_init_next to return the address of an initalizer
- function to run. */
-1: mov $10, $16
- jsr $26, _dl_init_next
- ldgp $gp, 0($26)
- beq $0, 2f
- mov $0, $27
- jsr $26, ($0)
- ldgp $gp, 0($26)
- br 1b
-2: /* Pass our finalizer function to the user in $0. */
- lda $0, _dl_fini
- /* Jump to the user's entry point. */
- mov $9, $27
- jmp ($9)");
+#endif /* RESOLVE */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adc7a4e678dbf44c983325c15ddb8b7082d9db26
commit adc7a4e678dbf44c983325c15ddb8b7082d9db26
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jul 14 05:28:09 1996 +0000
Fri Jul 5 18:44:55 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/ioperm.c (port_to_cpu_addr): Size
shift amount for Jensen must be 5 not 4.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index b9630a8..cee5f48 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -116,13 +116,9 @@ static inline unsigned long
port_to_cpu_addr (unsigned long port, int iosys, int size)
{
if (iosys == IOSYS_JENSEN)
- {
- return (port << 7) + ((size - 1) << 4) + io.base;
- }
+ return (port << 7) + ((size - 1) << 5) + io.base;
else
- {
- return (port << 5) + ((size - 1) << 3) + io.base;
- }
+ return (port << 5) + ((size - 1) << 3) + io.base;
}
@@ -303,17 +299,18 @@ init_iosys (void)
}
else
{
- char name[256];
FILE * fp;
fp = fopen (PATH_CPUINFO, "r");
if (!fp)
return -1;
- while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF)
+ while ((n = fscanf (fp, "system type : %256[^\n]\n", systype))
+ != EOF)
{
- if (n == 2 && strncmp (name, "system type", 11) == 0) {
+ if (n == 1)
break;
- }
+ else
+ fgets (systype, 256, fp);
}
fclose(fp);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4be08629d9a2179e560450ec19e108d4d15d15f8
commit 4be08629d9a2179e560450ec19e108d4d15d15f8
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 10 14:42:15 1996 +0000
Mon Jul 8 21:18:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (RESOLVE): New macro, defined
differently based on [RTLD_BOOTSTRAP].
(elf_machine_rela): Use it instead of the fn ptr arg directly.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 0f64d68..a11ff23 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -81,38 +81,38 @@ elf_machine_rela (struct link_map *map,
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
Elf32_Addr loadbase;
+#ifdef RTLD_BOOTSTRAP
+#define RESOLVE(noplt) map->l_addr
+#else
+#define RESOLVE(noplt) (*resolve) (&sym, (Elf32_Addr) reloc_addr, noplt)
+#endif
+
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
break;
case R_68K_GLOB_DAT:
- loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) :
- /* RESOLVE is null during bootstrap relocation. */
- map->l_addr);
+ loadbase = RESOLVE (0);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_JMP_SLOT:
- loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 1) :
- /* RESOLVE is null during bootstrap relocation. */
- map->l_addr);
+ loadbase = RESOLVE (1);
*reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_8:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_16:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
case R_68K_32:
- loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) :
- /* RESOLVE is null during bootstrap relocation. */
- map->l_addr);
+ loadbase = RESOLVE (0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
@@ -120,19 +120,19 @@ elf_machine_rela (struct link_map *map,
*reloc_addr = map->l_addr + reloc->r_addend;
break;
case R_68K_PC8:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
*(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend
- (Elf32_Addr) reloc_addr);
break;
case R_68K_PC16:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
*(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend
- (Elf32_Addr) reloc_addr);
break;
case R_68K_PC32:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = RESOLVE (0);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend
- (Elf32_Addr) reloc_addr);
@@ -143,6 +143,8 @@ elf_machine_rela (struct link_map *map,
assert (! "unexpected dynamic reloc type");
break;
}
+
+#undef RESOLVE
}
static inline void
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c73b45b63d1598b87b531f13c28c8e5146bbdbd
commit 2c73b45b63d1598b87b531f13c28c8e5146bbdbd
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 8 06:17:19 1996 +0000
Mon Jul 8 00:11:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/alpha/dl-machine.h (elf_machine_rela) [RTLD_BOOTSTRAP]:
If this is defined, don't declare _dl_rtld_map as weak, and
don't check for MAP pointing to it. RESOLVE is always null in this
case, so test with #ifdef instead of if.
* libc-symbols.h (symbol_set_declare): Use weak_extern instead of
weak_symbol.
* csu/initfini.c (_init): Likewise.
* locale/setlocale.c (DEFINE_CATEGORY): Likewise.
* misc/efgcvt_r.c: Likewise.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index bfde666..8986ed7 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -161,7 +161,14 @@ elf_machine_rela (struct link_map *map,
{
Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
- weak_symbol (_dl_rtld_map); /* Defined in rtld.c, but not in libc.a. */
+#ifndef RTLD_BOOTSTRAP
+ /* This is defined in rtld.c, but nowhere in the static libc.a; make the
+ reference weak so static programs can still link. This declaration
+ cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
+ because rtld.c contains the common defn for _dl_rtld_map, which is
+ incompatible with a weak decl in the same file. */
+ weak_extern (_dl_rtld_map);
+#endif
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
@@ -169,38 +176,37 @@ elf_machine_rela (struct link_map *map,
if (r_info == R_ALPHA_RELATIVE)
{
/* Already done in dynamic linker. */
- if (!resolve || map != &_dl_rtld_map)
+#ifndef RTLD_BOOTSTRAP
+ if (map != &_dl_rtld_map)
+#endif
*reloc_addr += map->l_addr;
}
else if (r_info == R_ALPHA_NONE)
- ;
+ return;
else
{
Elf64_Addr loadbase, sym_value;
- if (resolve)
- {
- loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
- r_info == R_ALPHA_JMP_SLOT);
- }
- else
- loadbase = map->l_addr;
-
+#ifndef RTLD_BOOTSTRAP
+ loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
+ r_info == R_ALPHA_JMP_SLOT);
+#else
+ loadbase = map->l_addr;
+#endif
sym_value = sym ? loadbase + sym->st_value : 0;
if (r_info == R_ALPHA_GLOB_DAT)
- {
- *reloc_addr = sym_value;
- }
+ *reloc_addr = sym_value;
else if (r_info == R_ALPHA_JMP_SLOT)
{
*reloc_addr = sym_value;
- elf_alpha_fix_plt(map, reloc, (Elf64_Addr)reloc_addr, sym_value);
+ elf_alpha_fix_plt (map, reloc, (Elf64_Addr) reloc_addr, sym_value);
}
else if (r_info == R_ALPHA_REFQUAD)
{
sym_value += *reloc_addr;
- if (resolve && map == &_dl_rtld_map)
+#ifndef RTLD_BOOTSTRAP
+ if (map == &_dl_rtld_map)
{
/* Undo the relocation done here during bootstrapping.
Now we will relocate anew, possibly using a binding
@@ -213,6 +219,7 @@ elf_machine_rela (struct link_map *map,
sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
}
else
+#endif
sym_value += reloc->r_addend;
*reloc_addr = sym_value;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ab191fa032d91def77613099bb9fca43e7a3f68
commit 3ab191fa032d91def77613099bb9fca43e7a3f68
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 3 18:50:48 1996 +0000
Wed Jul 3 11:26:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/i386/dl-machine.h (elf_machine_rel): Declare _dl_rtld_map as
weak.
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a276551..bfde666 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -161,6 +161,7 @@ elf_machine_rela (struct link_map *map,
{
Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
+ weak_symbol (_dl_rtld_map); /* Defined in rtld.c, but not in libc.a. */
/* We cannot use a switch here because we cannot locate the switch
jump table until we've self-relocated. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3e719a49865f939ccf16502db092ee504500629
commit e3e719a49865f939ccf16502db092ee504500629
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 1 23:04:49 1996 +0000
.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index 235a443..5c0e8d1 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -1,3 +1,4 @@
alpha/ptrace.h alpha/regdef.h
ieee_get_fp_control.S ieee_set_fp_control.S
ioperm.c
+init-first.h
diff --git a/sysdeps/unix/sysv/linux/m68k/Dist b/sysdeps/unix/sysv/linux/m68k/Dist
new file mode 100644
index 0000000..2c6d09e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/Dist
@@ -0,0 +1 @@
+init-first.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8653138520fce6bac6f18348e4c5655b18394d9b
commit 8653138520fce6bac6f18348e4c5655b18394d9b
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 1 22:16:32 1996 +0000
Fri Jun 28 16:53:01 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h: Undo PIC-optimization of syscall
error handling. It's safer that way.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 4b3f9aa..72d8404 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -99,22 +99,12 @@ name/**/: \
#undef PSEUDO_END
-#ifdef PIC
-/* When building a shared library, we can use a branch since the text
- section of the library is much smaller than 4MB. If we ever break
- this assumption, the linker will tell us. */
-# define PSEUDO_END(sym) \
-1996: \
- br zero, __syscall_error; \
- END(sym)
-#else
-# define PSEUDO_END(sym) \
+#define PSEUDO_END(sym) \
1996: \
br gp, 2f; \
2: ldgp gp, 0(gp); \
jmp zero, __syscall_error; \
END(sym)
-#endif
#define r0 v0
#define r1 a4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e23ecc5f378328331fd2018094c096af1095ab88
commit e23ecc5f378328331fd2018094c096af1095ab88
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 1 22:16:22 1996 +0000
Fri Jun 28 16:53:01 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt): Fix
typo/extraneous whitespace.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index bc80b59..a276551 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -106,7 +106,7 @@ elf_alpha_fix_plt(struct link_map *l,
if (edisp >= -0x100000 && edisp < 0x100000)
{
/* If we are in range, use br to perfect branch prediction and
- elide the dependancy on the address load. This case happens,
+ elide the dependency on the address load. This case happens,
e.g., when a shared library call is resolved to the same library. */
int hi, lo;
@@ -179,7 +179,7 @@ elf_machine_rela (struct link_map *map,
if (resolve)
{
- loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
+ loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
r_info == R_ALPHA_JMP_SLOT);
}
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f0a2dad9f8b1a019e39444e7e0a2202c947c48a
commit 6f0a2dad9f8b1a019e39444e7e0a2202c947c48a
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 1 22:16:20 1996 +0000
Fri Jun 28 16:53:01 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/init-first.h,
sysdeps/unix/sysv/linux/m68k/init-first.h,
sysdeps/unix/sysv/linux/i386/init-first.h: New files.
* sysdeps/unix/sysv/linux/init-first.c: Use platform-dependent
init-first.h to make abstract machine dependent parts of
initialization.
diff --git a/sysdeps/unix/sysv/linux/alpha/init-first.h b/sysdeps/unix/sysv/linux/alpha/init-first.h
new file mode 100644
index 0000000..c27c589
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/init-first.h
@@ -0,0 +1,12 @@
+/* This fragment is invoked in the stack context of program start.
+ Its job is to set up a pointer to argc as an argument, pass
+ control to `INIT', and, if necessary, clean up after the call
+ to leave the stack in the same condition it was found in. */
+
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+ asm(".globl " #NAME "\n" \
+ #NAME ":\n\t" \
+ "ldgp $29, 0($27)\n\t" \
+ ".prologue 1\n\t" \
+ "mov $30, $16\n\t" \
+ "br $31, " #INIT "..ng");
diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.h b/sysdeps/unix/sysv/linux/m68k/init-first.h
new file mode 100644
index 0000000..7d8c320
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/init-first.h
@@ -0,0 +1,12 @@
+/* This fragment is invoked in the stack context of program start.
+ Its job is to set up a pointer to argc as an argument, pass
+ control to `INIT', and, if necessary, clean up after the call
+ to leave the stack in the same condition it was found in. */
+
+#define SYSDEP_CALL_INIT(NAME, INIT) \
+ asm(".globl " #NAME "\n\t" \
+ #NAME ":\n\t" \
+ "pea %sp@(4)\n\t" \
+ "jbsr " #INIT "\n\t" \
+ "addq #4,%sp\n\t" \
+ "rts");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51ac76881fb0d43afab6e7b178bb7f42f37a150b
commit 51ac76881fb0d43afab6e7b178bb7f42f37a150b
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 1 22:16:11 1996 +0000
Fri Jun 28 16:53:01 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.S: Make ldgp part of the prologue.
Fix by Richard Henderson.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index 3e7666f..6540b80 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -26,10 +26,10 @@ Cambridge, MA 02139, USA. */
#endif
LEAF(__syscall_error, 0)
+ ldgp gp, 0(t12)
.prologue 1
/* Store return value in errno... */
- ldgp gp, 0(t12)
stl v0, errno
/* And just kick back a -1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a5db9e9b558aa7aae3cc1c5101d1fb518809658
commit 4a5db9e9b558aa7aae3cc1c5101d1fb518809658
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 28 08:56:24 1996 +0000
Thu Jun 27 23:43:22 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (elf_machine_rela): The Alpha's
address-of operation and plt format conspire to require all
dynamic relocs to be resolved to actual symbols not plt entries.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index c751936..bc80b59 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -179,8 +179,8 @@ elf_machine_rela (struct link_map *map,
if (resolve)
{
- loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
- r_info == R_ALPHA_JMP_SLOT);
+ loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
+ r_info == R_ALPHA_JMP_SLOT);
}
else
loadbase = map->l_addr;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cac963cdc02b3abdad1bee60ac535b9dc599fdfb
commit cac963cdc02b3abdad1bee60ac535b9dc599fdfb
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 28 06:39:22 1996 +0000
Thu Jun 27 23:43:22 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (elf_machine_rela): The Alpha's
address-of operation and plt format conspire to require all
dynamic relocs to be resolved to actual symbols not plt entries.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index f23efe7..c751936 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -179,7 +179,7 @@ elf_machine_rela (struct link_map *map,
if (resolve)
{
- loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
+ loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
r_info == R_ALPHA_JMP_SLOT);
}
else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4c90a421a573d2b7ca88896a851deeaa0cac447
commit a4c90a421a573d2b7ca88896a851deeaa0cac447
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 25 03:59:46 1996 +0000
Mon Jun 24 22:39:12 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
A .plt entry now loads the .rela.plt offset directly rather
than making us calculate it.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 29c9a1d..f23efe7 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -307,10 +307,8 @@ _dl_runtime_resolve:
/* Set up the arguments for _dl_runtime_resolve. */
/* $16 = link_map out of plt0 */
ldq $16, 8($27)
- /* $17 = (($28 - 4) - ($27 + 16)) / 12 * sizeof(Elf_Rela) */
- subq $28, $27, $28
- subq $28, 20, $28
- addq $28, $28, $17
+ /* $17 = offset of reloc entry */
+ mov $28, $17
/* Do the fixup */
bsr $26, fixup..ng
/* Move the destination address to a safe place. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ae9bd6f8f7abd7ea46b0181999ac26a195e53051
commit ae9bd6f8f7abd7ea46b0181999ac26a195e53051
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 23 01:30:10 1996 +0000
Sat Jun 22 23:30:07 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/Makefile (CFLAGS-rtld.c): Add -mbuild-constants
only when building ELF version of library.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index a9f12d1..6aaedea 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -30,7 +30,9 @@ endif # gnulib
ifeq ($(subdir),elf)
# The ld.so code cannot use literals until it self-relocates.
+ ifeq ($(elf),yes)
CFLAGS-rtld.c = -mbuild-constants
+ endif
# The rest of ld.so shouldn't use FP regs for block moves so
# that the lazy link trampoline doesn't have to save them.
sysdep-CFLAGS += -mno-fp-regs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=91149d1367ebf30dc25fc9ebb556c72b0d2b95cd
commit 91149d1367ebf30dc25fc9ebb556c72b0d2b95cd
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 21 04:30:50 1996 +0000
Thu Jun 20 21:19:07 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h (elf_alpha_fix_plt):
Changed to a 12-byte PLT entry to remove dependency on $gp.
Take a new got_addr parameter.
(elf_machine_rela): Pass the new parameter.
(ELF_MACHINE_RUNTIME_TRAMPOLINE): Do arithmetic for 12-byte PLT.
(RTLD_START): Do normal linkage with program entry.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index a92c319..29c9a1d 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,7 +1,7 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-Contributed by Richard Henderson <rht@tamu.edu>.
+Contributed by Richard Henderson <rth@tamu.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -84,42 +84,64 @@ elf_machine_load_address (void)
static inline void
elf_alpha_fix_plt(struct link_map *l,
const Elf64_Rela *reloc,
+ Elf64_Addr got_addr,
Elf64_Addr value)
{
const Elf64_Rela *rela_plt;
Elf64_Word *plte;
- long disp;
+ long edisp;
/* Recover the PLT entry address by calculating reloc's index into the
.rela.plt, and finding that entry in the .plt. */
rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr);
- plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
- plte += 2*(reloc - rela_plt) + 8;
+ plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr + 32);
+ plte += 3 * (reloc - rela_plt);
/* Find the displacement from the plt entry to the function. */
- disp = value - (Elf64_Addr)&plte[2];
+ edisp = (long)(value - (Elf64_Addr)&plte[3]) / 4;
- /* Change "lda $27, ofs($31)" to "ldq $27, ofs($gp)" */
- plte[0] = 0xa77d0000 | (plte[0] & 0xffff);
-
- if (disp >= -0x100000 && disp < 0x100000)
+ if (edisp >= -0x100000 && edisp < 0x100000)
{
/* If we are in range, use br to perfect branch prediction and
elide the dependancy on the address load. This case happens,
e.g., when a shared library call is resolved to the same library. */
- /* Change "br $0, plt0" to "br $31,function" */
- plte[1] = 0xc3e00000 | (disp & 0x1fffff);
+
+ int hi, lo;
+ hi = value - (Elf64_Addr)&plte[0];
+ lo = (short)hi;
+ hi = (hi - lo) >> 16;
+
+ /* Emit "ldah $27,H($27)" */
+ plte[0] = 0x277b0000 | (hi & 0xffff);
+
+ /* Emit "lda $27,L($27)" */
+ plte[1] = 0x237b0000 | (lo & 0xffff);
+
+ /* Emit "br $31,function" */
+ plte[2] = 0xc3e00000 | (edisp & 0x1fffff);
}
else
{
/* Don't bother with the hint since we already know the hint is
wrong. Eliding it prevents the wrong page from getting pulled
into the cache. */
- /* Change "br $0, plt0" to "jmp $31,($27)" */
- plte[1] = 0x6bfb0000;
+
+ int hi, lo;
+ hi = got_addr - (Elf64_Addr)&plte[0];
+ lo = (short)hi;
+ hi = (hi - lo) >> 16;
+
+ /* Emit "ldah $27,H($27)" */
+ plte[0] = 0x277b0000 | (hi & 0xffff);
+
+ /* Emit "ldq $27,L($27)" */
+ plte[1] = 0xa77b0000 | (lo & 0xffff);
+
+ /* Emit "jmp $31,($27)" */
+ plte[2] = 0x6bfb0000;
}
/* Flush the instruction cache now that we've diddled. Tag it as
@@ -172,7 +194,7 @@ elf_machine_rela (struct link_map *map,
else if (r_info == R_ALPHA_JMP_SLOT)
{
*reloc_addr = sym_value;
- elf_alpha_fix_plt(map, reloc, sym_value);
+ elf_alpha_fix_plt(map, reloc, (Elf64_Addr)reloc_addr, sym_value);
}
else if (r_info == R_ALPHA_REFQUAD)
{
@@ -285,11 +307,10 @@ _dl_runtime_resolve:
/* Set up the arguments for _dl_runtime_resolve. */
/* $16 = link_map out of plt0 */
ldq $16, 8($27)
- /* $17 = (($0 - 8) - ($1 + 16)) / 8 * sizeof(Elf_Rela) */
+ /* $17 = (($28 - 4) - ($27 + 16)) / 12 * sizeof(Elf_Rela) */
subq $28, $27, $28
- subq $28, 24, $28
+ subq $28, 20, $28
addq $28, $28, $17
- addq $28, $17, $17
/* Do the fixup */
bsr $26, fixup..ng
/* Move the destination address to a safe place. */
@@ -370,4 +391,5 @@ _dl_start_user:
2: /* Pass our finalizer function to the user in $0. */
lda $0, _dl_fini
/* Jump to the user's entry point. */
+ mov $9, $27
jmp ($9)");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d47acf2ca8d79683ad2135a57fde892dd9bb24c
commit 1d47acf2ca8d79683ad2135a57fde892dd9bb24c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:47:39 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/pipe.S: Use PSEUDO.
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index b23803c..60334ad 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -20,23 +20,11 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
- .text
-LEAF(__pipe, 0)
- .prologue 0
-
- ldi v0, __NR_pipe
- call_pal PAL_callsys
- bne a3, error
-
+PSEUDO (__pipe, pipe, 0)
stl r0, 0(a0)
stl r1, 4(a0)
mov zero, v0
ret
-
-error: br gp, 1f
-1: ldgp gp, 0(gp)
- jmp zero, syscall_error
-
- END(__pipe)
+PSEUDO_END(__pipe)
weak_alias (__pipe, pipe)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49aebbc610041a157d1b4e041e0d8de4927f457f
commit 49aebbc610041a157d1b4e041e0d8de4927f457f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:49 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S,
sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since
latter is illegal under DEC Unix.
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index dfa8c1d..49be0b2 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -53,11 +53,11 @@ init:
br pv, 1f
1: ldgp gp, 0(pv)
- lda t1, __bb_head
+ ldiq t1, __bb_head
lda t3, _gmonparam
ldq t2, 0(t1)
ldl t3, 0(t3) /* t3 = _gmonparam.state */
- ldi t0, 1
+ lda t0, 1
stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */
stq t2, NEXT(a0) /* blocks->next = __bb_head */
stq a0, 0(t1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=645f6bf6249ace1f3037e64ffcd369ec6c071dcf
commit 645f6bf6249ace1f3037e64ffcd369ec6c071dcf
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:38 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divrem.h: Use retaddr instead of ra as the return
address register in the .frame directive.
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index f296179..2951335 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -125,7 +125,7 @@ FUNC_NAME:
ldq gp, 0x10(sp)
lda sp, 0x18(sp)
#endif
- .frame sp, FRAME_SIZE, ra, 0
+ .frame sp, FRAME_SIZE, retaddr, 0
lda sp,-FRAME_SIZE(sp)
.prologue 1
stq arg1,0x00(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=73f53f0368d8f63326f79c39e4c223825deebe96
commit 73f53f0368d8f63326f79c39e4c223825deebe96
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:32 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/copysign.c: Remove.
diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c
deleted file mode 100644
index 69544b0..0000000
--- a/sysdeps/alpha/copysign.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#define __NO_MATH_INLINES
-
-#include <math.h>
-
-/* Return X with its sign changed to Y's. */
-__inline double
-__copysign (double __x, double __y)
-{
- __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
- return __x;
-}
-
-weak_alias (__copysign, copysign)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e0bd6649ffc6c3aa4adb896396573e85df31ce1
commit 2e0bd6649ffc6c3aa4adb896396573e85df31ce1
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:30 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to
__syscall_error to avoid intruding application name space.
* sysdeps/unix/alpha/sysdep.S: Renamed from
sysdeps/unix/sysv/linux/alpha/sysdep.S. This file works for OSF/1
as well.
* sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the
EWOULDBLOCK -> EAGAIN mapping was unnecessary since
EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha).
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S
deleted file mode 100644
index 84582f4..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.S
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
-LEAF(syscall_error, 0)
- .prologue 1
-
- /* Store return value in errno... */
- ldgp gp, 0(t12)
- stl v0, errno
-
- /* And just kick back a -1. */
- ldi v0, -1
- ret
-
- .end syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93b781dd8c3968c7ef73cab244889a85d1e09f9f
commit 93b781dd8c3968c7ef73cab244889a85d1e09f9f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:28 1996 +0000
Thu Jun 13 17:25:11 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/osf/alpha/start.S (errno): Removed.
* sysdeps/unix/sysv/linux/alpha/start.S: Ditto.
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
index f3995a2..d5ff140 100644
--- a/sysdeps/unix/bsd/osf/alpha/start.S
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -18,8 +18,6 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.comm errno, 4
-
#if 0
.sdata
.globl STARTFRM
diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S
index a7099f6..bffa913 100644
--- a/sysdeps/unix/sysv/linux/alpha/start.S
+++ b/sysdeps/unix/sysv/linux/alpha/start.S
@@ -1,5 +1,5 @@
/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+ Contributed by Richard Henderson <rth@tamu.edu>
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,81 +18,76 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
- .comm errno, 4
-#ifdef __ELF__
- .type errno, @object
-#endif
-
.text
-LEAF(__start, 16)
- lda sp, -16(sp)
- .prologue 0
-
- stq zero, 8(sp) /* terminate frame chain */
-
- br t0, 1f
-1: ldgp gp, 0(t0)
-
- mov zero, a0 /* establish __fpu_control w/kernel */
- jsr ra, __setfpucw
+ .globl __start
+ .align 3
+ .ent __start, 0
+__start:
+ .frame fp, 0, zero
+ mov zero, fp
+ br gp, 1f
+1: ldgp gp, 0(gp)
+ .prologue 1
+
+ /* Save v0. When starting a binary via the dynamic linker, s0
+ contains the address of the shared library termination function,
+ which we will register below with atexit() to be called by exit().
+ If we are statically linked, this will be NULL. */
+ mov v0, s0
+
+ /* Do essential libc initialization (sp points to argc, argv, and envp) */
+ jsr ra, __libc_init_first
ldgp gp, 0(ra)
- /* clear out errno. */
- stl zero, (errno)
+ /* Now that we have the proper stack frame, register library termination
+ function, if there is any: */
- ldl a0, 16(sp) /* get argc */
- lda a1, 24(sp) /* get argv */
+ beq s0, 1f
+ mov s0, a0
+ jsr ra, atexit
+ ldgp gp, 0(ra)
+1:
- /* initialize environ: */
- lda t0, environ
- s8addq a0, a1, a2
- addq a2, 0x8, a2
- stq a2, 0(t0)
+ /* Extract the arguments and environment as encoded on the stack. */
+ ldl a0, 0(sp) /* get argc */
+ lda a1, 8(sp) /* get argv */
+ s8addq a0, a1, a2 /* get envp */
+ addq a2, 8, a2
+ stq a2, _environ
- mov a0, s0
+ mov a0, s0 /* tuck them away */
mov a1, s1
mov a2, s2
#ifdef HAVE_INITFINI
- /* register the _fini sections to ensure destructors get run: */
- lda a0, _fini
- jsr ra, atexit
- ldgp gp, 0(ra)
-
- /* Now run the _init section of the program itself. The _init
- sections of shared libraries will be run by the dynamic linker. */
+ /* Call _init, the entry point to our own .init section. */
jsr ra, _init
ldgp gp, 0(ra)
- /* initialize constructors: */
- jsr ra, __main
+ /* Register our .fini section with atexit. */
+ lda a0, _fini
+ jsr ra, atexit
ldgp gp, 0(ra)
#else
- jsr ra, __libc_init
+ /* initialize constructors: */
+ jsr ra, __main
ldgp gp, 0(ra)
#endif
-
mov s0, a0
mov s1, a1
mov s2, a2
+ /* Call the user's main and exit with its return value. */
jsr ra, main
ldgp gp, 0(ra)
mov v0, a0
+ jsr ra, exit
- lda pv, exit
- jsr ra, (pv), 1
- ldgp gp, 0(ra)
-
- /* in case exit returns: */
-
-1: ldi v0, __NR_exit
- call_pal PAL_callsys
- br 1b
-
- .end __start
-
+ /* Die very horribly if exit returns. Call_pal hlt is callable from
+ kernel mode only; this will result in an illegal instruction trap. */
+ call_pal 0
+END(__start)
/* Define a symbol for the first piece of initialized data. */
.data
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=07f03a4d3850f65108cee6e305b430bbf51d50eb
commit 07f03a4d3850f65108cee6e305b430bbf51d50eb
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:13 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to
__syscall_error to avoid intruding application name space.
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 52c945a..e09fa73 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
LEAF(__ieee_get_fp_control, 8)
lda sp, -8(sp)
- .prologue 0
+ .prologue 1
mov sp, a1
ldi a0, GSI_IEEE_FP_CONTROL
@@ -39,7 +39,7 @@ LEAF(__ieee_get_fp_control, 8)
error: lda sp, 8(sp)
br gp, 1f
1: ldgp gp, 0(gp)
- jmp zero, syscall_error
+ jmp zero, __syscall_error
END(__ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index d72585d..d748c81 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
LEAF(__ieee_set_fp_control, 8)
lda sp, -8(sp)
- .prologue 0
+ .prologue 1
stq a0, 0(sp)
mov sp, a1
@@ -37,7 +37,7 @@ LEAF(__ieee_set_fp_control, 8)
error: br gp, 1f
1: ldgp gp, 0(gp)
- jmp zero, syscall_error
+ jmp zero, __syscall_error
END(__ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index bd8c659..6020f26 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -18,19 +18,17 @@ Cambridge, MA 02139, USA. */
/* For compatibility only: a "long" is 64 bits on the Alpha, so
llseek() isn't really needed. But there are some programs out
- there who may depend on it being around.
-*/
+ there who may depend on it being around. */
#include <sysdep.h>
.text
ENTRY(llseek)
- .prologue 0
-
- mov a3, t0 /* save result address */
+ .prologue 1
sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
zap a2, 0xf0, a2
+ mov a3, t0 /* save result address */
bis a2, a1, a1
mov a4, a2 /* shift down whence */
@@ -44,6 +42,6 @@ ENTRY(llseek)
error: br gp, 1f
1: ldgp gp, 0(gp)
- jmp zero, syscall_error
+ jmp zero, __syscall_error
END(llseek)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 26a1869..aaae9a3 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
.text
LEAF(sigsuspend, 0)
- .prologue 0
+ .prologue 1
ldq a0, 0(a0)
ldi v0, __NR_sigsuspend
@@ -34,6 +34,6 @@ LEAF(sigsuspend, 0)
error: br gp, 1f
1: ldgp gp, 0(gp)
- jmp zero, syscall_error
+ jmp zero, __syscall_error
END(sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index c80a523..f1b36e9 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -42,19 +42,19 @@ Cambridge, MA 02139, USA. */
LEAF(__syscall, 0)
- bis a0, a0, v0 # Syscall number -> v0
- bis a1, a1, a0 # arg1-arg5 -> a0-a4
- bis a2, a2, a1
- bis a3, a3, a2
- bis a4, a4, a3
- bis a5, a5, a4
-
- call_pal PAL_callsys # Invoke system call
+ mov a0, v0 /* Syscall number -> v0 */
+ mov a1, a0 /* arg1-arg5 -> a0-a4 */
+ mov a2, a1
+ mov a3, a2
+ mov a4, a3
+ mov a5, a4
+
+ call_pal PAL_callsys /* Invoke system call */
bne a3, error
ret
error: br gp, 2f
2: ldgp gp, 0(gp)
- jmp zero, syscall_error
+ jmp zero, __syscall_error
weak_alias(__syscall, syscall)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=939caadf20f895a2c9a514f9187b2e3e9437e464
commit 939caadf20f895a2c9a514f9187b2e3e9437e464
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:38:04 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S: Rename syscall_error to
__syscall_error to avoid intruding application name space.
* sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S,
sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since
latter is illegal under DEC Unix.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 1c4a4f9..26bf97f 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -30,7 +30,7 @@ LEAF(__brk, 0)
ldgp gp, 0(t12)
.prologue 1
- ldi v0, __NR_brk
+ ldiq v0, __NR_brk
call_pal PAL_callsys
/* Correctly handle the brk(0) query case. */
@@ -46,7 +46,7 @@ LEAF(__brk, 0)
/* What a horrible way to die. */
error: ldi v0, ENOMEM
- jmp zero, syscall_error
+ jmp zero, __syscall_error
END(__brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3dbefc478a9b9dc9535804fb4b5d7656a970eee9
commit 3dbefc478a9b9dc9535804fb4b5d7656a970eee9
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:37:59 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.h: Rename __NR_get?id
to SYS_get?id so that syscall stubs in sysdeps/unix define
these syscalls in terms of getxpid/getxuid/getxgid.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 627b37e..8f5f5dd 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -38,15 +38,15 @@ Cambridge, MA 02139, USA. */
# define SYS_ify(syscall_name) __NR_/**/syscall_name
#endif
-/*
- * Define some aliases for syscalls that return two values (in r0 and r1):
- */
+/* Define some aliases to make automatic syscall generation work
+ properly. The SYS_* variants are for the benefit of the files in
+ sysdeps/unix. */
#define __NR_getpid __NR_getxpid
-#define __NR_getppid __NR_getxpid
#define __NR_getuid __NR_getxuid
-#define __NR_geteuid __NR_getxuid
#define __NR_getgid __NR_getxgid
-#define __NR_getegid __NR_getxgid
+#define SYS_getpid __NR_getxpid
+#define SYS_getuid __NR_getxuid
+#define SYS_getgid __NR_getxgid
/*
* Some syscalls no Linux program should know about:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb486e187eb2d4905c88871b2169f45c339ae078
commit bb486e187eb2d4905c88871b2169f45c339ae078
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:37:57 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h: Move error-handling code in PSEUDO
to PSEUDO_END to improve branch-prediction. Include .frame
directive to make syscalls debugabble.
(PSEUDO_END): New macro.
* sysdeps/unix/alpha/sysdep.h, sysdeps/alpha/bb_init_func.S,
sysdeps/unix/sysv/linux/alpha/brk.S: Use ldiq instead of ldi since
latter is illegal under DEC Unix.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 6fed4a6..4b3f9aa 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -58,25 +58,27 @@ Cambridge, MA 02139, USA. */
.frame sp, 0, ra
#endif
-/* Note that while it's better structurally, going back to set errno
- can make things confusing if you're debugging---it looks like it's jumping
- backwards into the previous fn. */
+/* Mark the end of function SYM. */
+#undef END
+#define END(sym) .end sym
+
+/* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a
+ label of that number between those two macros! */
+
#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \
.globl name; \
.align 3; \
.ent name,0; \
\
-1: br gp, 2f; \
-2: ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
- \
name##: \
- ldi v0, SYS_ify(syscall_name); \
+ .frame sp, 0, ra \
+ .prologue 1; /* yes, we do use gp */ \
+ ldiq v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
.set at; \
- bne a3, 1b; \
+ bne a3, 1996f; \
3:
#else
#define PSEUDO(name, syscall_name, args) \
@@ -84,21 +86,35 @@ name##: \
.align 3; \
.ent name,0; \
\
-1: br gp, 2f; \
-2: ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
- \
name/**/: \
- ldi v0, SYS_ify(syscall_name); \
+ .frame sp, 0, ra \
+ .prologue 1; /* yes, we do use gp */ \
+ ldiq v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
.set at; \
- bne a3, 1b; \
+ bne a3, 1996f; \
3:
#endif
-#undef END
-#define END(sym) .end sym
+#undef PSEUDO_END
+
+#ifdef PIC
+/* When building a shared library, we can use a branch since the text
+ section of the library is much smaller than 4MB. If we ever break
+ this assumption, the linker will tell us. */
+# define PSEUDO_END(sym) \
+1996: \
+ br zero, __syscall_error; \
+ END(sym)
+#else
+# define PSEUDO_END(sym) \
+1996: \
+ br gp, 2f; \
+2: ldgp gp, 0(gp); \
+ jmp zero, __syscall_error; \
+ END(sym)
+#endif
#define r0 v0
#define r1 a4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e3829e904a26c167fca1e2e23c7c7d7304e0a57c
commit e3829e904a26c167fca1e2e23c7c7d7304e0a57c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:37:47 1996 +0000
Mon Jun 10 17:50:31 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.S: Renamed from
sysdeps/unix/sysv/linux/alpha/sysdep.S. This file works for OSF/1
as well.
* sysdeps/unix/bsd/osf/alpha/sysdep.S: Remove (note that the
EWOULDBLOCK -> EAGAIN mapping was unnecessary since
EWOULDBLOCK==EAGAIN under DEC Unix and Linux/Alpha).
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
similarity index 72%
rename from sysdeps/unix/bsd/osf/alpha/sysdep.S
rename to sysdeps/unix/alpha/sysdep.S
index bc4865c..3e7666f 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -20,21 +20,20 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H
#include <errnos.h>
-ENTRY(syscall_error)
-#ifdef EWOULDBLOCK_sys
- /* We translate the system's EWOULDBLOCK error into EAGAIN.
- The GNU C library always defines EWOULDBLOCK==EAGAIN.
- EWOULDBLOCK_sys is the original number. */
- subq v0, EWOULDBLOCK_sys, t0
- cmoveq t0, EAGAIN, v0
+ .comm errno, 4
+#ifdef __ELF__
+ .type errno, @object
#endif
- /* Store it in errno... */
-! ldgp gp, 0(t12)
- stl v0, errno
+LEAF(__syscall_error, 0)
+ .prologue 1
+
+ /* Store return value in errno... */
+ ldgp gp, 0(t12)
+ stl v0, errno
/* And just kick back a -1. */
- ldil v0, -1
+ ldi v0, -1
ret
- .end syscall_error
+ END(__syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88b7c7257cf67e3bd185a93e28465f79b5c7c3ac
commit 88b7c7257cf67e3bd185a93e28465f79b5c7c3ac
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 06:37:43 1996 +0000
Thu Jun 6 21:39:38 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Declare cmd
as unsigned long, not as int (to avoid incorrect int->long
promotion).
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
index 4ae139a..f88951f 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -27,7 +27,7 @@ int
DEFUN(tcsetattr, (fd, optional_actions, termios_p),
int fd AND int optional_actions AND CONST struct termios *termios_p)
{
- int cmd;
+ unsigned long cmd;
switch (optional_actions)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d610b3a3d5e598be3d11e0add556fd1b94c871f
commit 7d610b3a3d5e598be3d11e0add556fd1b94c871f
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 17 21:49:10 1996 +0000
Wed Jun 12 20:40:51 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (RTLD_START): Fix access to
_dl_default_scope.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index ad3b6c3..0f64d68 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -255,8 +255,8 @@ _dl_start_user:
| Push back the modified argument count.
move.l %d1, -(%sp)
0: | Push _dl_default_scope[2] as argument in _dl_init_next call below.
- move.l ([_dl_default_scope@GOT, %a5]), %d2
-0: move.l (%d2, 8), -(%sp)
+ move.l ([_dl_default_scope@GOT, %a5], 8), %d2
+0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
bsr.l _dl_init_next@PLTPC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f04e87f28a3e6a3dd025ccf5a76b836870f3a07b
commit f04e87f28a3e6a3dd025ccf5a76b836870f3a07b
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 16 03:49:08 1996 +0000
Sat Jun 15 18:13:43 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* math/Makefile (headers): Add fpu_control.h.
(aux): New variable, list fpu_control and setfpucw.
* sysdeps/generic/fpu_control.c: New file.
* sysdeps/stub/fpu_control.h: New file.
* sysdeps/unix/sysv/linux/m68k/fpu_control.h: Moved to ...
* sysdeps/m68k/fpu_control.h: here.
* sysdeps/unix/sysv/linux/i386/fpu_control.h: Moved to ...
* sysdeps/i386/fpu_control.h: here.
* sysdeps/unix/sysv/linux/alpha/fpu_control.h: Moved to ...
* sysdeps/alpha/fpu/fpu_control.h: here. Fixed copyright.
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines): Remove
setfpucw, fpu_control.
* sysdeps/unix/sysv/linux/alpha/fpu_control.c: File removed.
* sysdeps/unix/sysv/linux/setfpucw.c: Moved to ...
* sysdeps/generic/setfpucw.c: here.
(__fpu_control): Variable removed.
(__setfpucw): Use SET even if zero.
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.h b/sysdeps/alpha/fpu/fpu_control.h
similarity index 81%
rename from sysdeps/unix/sysv/linux/alpha/fpu_control.h
rename to sysdeps/alpha/fpu/fpu_control.h
index 782f33e..219ea55 100644
--- a/sysdeps/unix/sysv/linux/alpha/fpu_control.h
+++ b/sysdeps/alpha/fpu/fpu_control.h
@@ -1,15 +1,23 @@
-/* Copyright (C) 1993 Olaf Flebbe
-This file is part of the Linux C Library.
+/* FPU control word bits. Alpha version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+Contributed by Olaf Flebbe.
-The Linux C Library is free software; you can redistribute it and/or
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-The Linux C Library is distributed in the hope that it will be useful,
+The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details. */
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#ifndef _ALPHA_FPU_CONTROL_H
#define _ALPHA_FPU_CONTROL_H
@@ -28,7 +36,7 @@ Library General Public License for more details. */
* OM: Overflow mask
* UM: Underflow mask
* PM: Precision (inexact result) mask
- *
+ *
* Mask bit is 1 means no interrupt.
*
* PC: Precision control
@@ -51,7 +59,7 @@ Library General Public License for more details. */
#include <features.h>
/* masking of interrupts */
-#define _FPU_MASK_IM 0x01
+#define _FPU_MASK_IM 0x01
#define _FPU_MASK_DM 0x02
#define _FPU_MASK_ZM 0x04
#define _FPU_MASK_OM 0x08
@@ -84,7 +92,7 @@ Library General Public License for more details. */
one can use /d to get round to +infinity with no extra overhead
(so long as the default isn't changed, of course...)
- exceptions on overflow, zero divide and NaN */
-#define _FPU_DEFAULT 0x1f72
+#define _FPU_DEFAULT 0x1f72
/* IEEE: same as above, but exceptions */
#define _FPU_IEEE 0x1f7f
diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/m68k/fpu_control.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/m68k/fpu_control.h
rename to sysdeps/m68k/fpu_control.h
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index e6e421d..9d59671 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,6 +1,6 @@
ifeq ($(subdir), misc)
sysdep_headers += alpha/ptrace.h alpha/regdef.h
-sysdep_routines += ieee_get_fp_control ieee_set_fp_control fpu_control \
- setfpucw sethae ioperm osf_sigprocmask fstatfs statfs
+sysdep_routines += ieee_get_fp_control ieee_set_fp_control \
+ sethae ioperm osf_sigprocmask fstatfs statfs
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.c b/sysdeps/unix/sysv/linux/alpha/fpu_control.c
deleted file mode 100644
index 20c032a..0000000
--- a/sysdeps/unix/sysv/linux/alpha/fpu_control.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@azstarnet.com).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <fpu_control.h>
-
-fpu_control_t __fpu_control = _FPU_DEFAULT;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26e00f7e6104f4d636a04f01a4d3eb267c04127c
commit 26e00f7e6104f4d636a04f01a4d3eb267c04127c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 13 22:49:33 1996 +0000
Thu Jun 13 00:02:25 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/generic/machine-gmon.h [NO_UNDERSCORES]: Define mcount as
weak alias for _mcount.
* sysdeps/alpha/_mcount.S (mcount): Define as weak alias.
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index 1730760..e813ebd 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -1,5 +1,5 @@
/* Machine-specific calling sequence for `mcount' profiling function. alpha
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
@@ -41,6 +41,7 @@ respectively in gmon.c language...). */
.set noreorder
LEAF(_mcount, 0xb0)
+weak_alias (_mcount, mcount)
.prologue 0
subq sp, 0xb0, sp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5e4222a33673872b145a1e88ebc2c3b4d9eef8f
commit d5e4222a33673872b145a1e88ebc2c3b4d9eef8f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 04:51:27 1996 +0000
Tue Jun 11 19:13:04 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/dl-machine.h: New file.
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
new file mode 100644
index 0000000..a92c319
--- /dev/null
+++ b/sysdeps/alpha/dl-machine.h
@@ -0,0 +1,373 @@
+/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Richard Henderson <rht@tamu.edu>.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This was written in the absense of an ABI -- don't expect
+ it to remain unchanged. */
+
+#define ELF_MACHINE_NAME "alpha"
+
+#include <assert.h>
+#include <string.h>
+#include <link.h>
+
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int
+elf_machine_matches_host (Elf64_Word e_machine)
+{
+ return e_machine == EM_ALPHA;
+}
+
+
+/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
+ Must be inlined in a function which uses global data. */
+static inline Elf64_Addr *
+elf_machine_got (void)
+{
+ register Elf64_Addr gp __asm__("$29");
+ return (Elf64_Addr *)(gp - 0x8000);
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline Elf64_Addr
+elf_machine_load_address (void)
+{
+ /* NOTE: While it is generally unfriendly to put data in the text
+ segment, it is only slightly less so when the "data" is an
+ instruction. While we don't have to worry about GLD just yet, an
+ optimizing linker might decide that our "data" is an unreachable
+ instruction and throw it away -- with the right switches, DEC's
+ linker will do this. What ought to happen is we should add
+ something to GAS to allow us access to the new GPREL_HI32/LO32
+ relocation types stolen from OSF/1 3.0. */
+ /* This code relies on the fact that BRADDR relocations do not
+ appear in dynamic relocation tables. Not that that would be very
+ useful anyway -- br/bsr has a 4MB range and the shared libraries
+ are usually many many terabytes away. */
+
+ Elf64_Addr dot;
+ long zero_disp;
+
+ asm("br %0, 1f\n\t"
+ ".weak __load_address_undefined\n\t"
+ "br $0, __load_address_undefined\n"
+ "1:"
+ : "=r"(dot));
+
+ zero_disp = *(int *)dot;
+ zero_disp = (zero_disp << 43) >> 41;
+
+ return dot + 4 + zero_disp;
+}
+
+
+/* Fix up the instructions of a PLT entry to invoke the function
+ rather than the dynamic linker. */
+static inline void
+elf_alpha_fix_plt(struct link_map *l,
+ const Elf64_Rela *reloc,
+ Elf64_Addr value)
+{
+ const Elf64_Rela *rela_plt;
+ Elf64_Word *plte;
+ long disp;
+
+ /* Recover the PLT entry address by calculating reloc's index into the
+ .rela.plt, and finding that entry in the .plt. */
+
+ rela_plt = (void *)(l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr);
+
+ plte = (void *)(l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ plte += 2*(reloc - rela_plt) + 8;
+
+ /* Find the displacement from the plt entry to the function. */
+
+ disp = value - (Elf64_Addr)&plte[2];
+
+ /* Change "lda $27, ofs($31)" to "ldq $27, ofs($gp)" */
+ plte[0] = 0xa77d0000 | (plte[0] & 0xffff);
+
+ if (disp >= -0x100000 && disp < 0x100000)
+ {
+ /* If we are in range, use br to perfect branch prediction and
+ elide the dependancy on the address load. This case happens,
+ e.g., when a shared library call is resolved to the same library. */
+ /* Change "br $0, plt0" to "br $31,function" */
+ plte[1] = 0xc3e00000 | (disp & 0x1fffff);
+ }
+ else
+ {
+ /* Don't bother with the hint since we already know the hint is
+ wrong. Eliding it prevents the wrong page from getting pulled
+ into the cache. */
+ /* Change "br $0, plt0" to "jmp $31,($27)" */
+ plte[1] = 0x6bfb0000;
+ }
+
+ /* Flush the instruction cache now that we've diddled. Tag it as
+ modifying memory to checkpoint memory writes during optimization. */
+ asm volatile("call_pal 0x86" : : : "memory");
+}
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+static inline void
+elf_machine_rela (struct link_map *map,
+ const Elf64_Rela *reloc,
+ const Elf64_Sym *sym,
+ Elf64_Addr (*resolve) (const Elf64_Sym **ref,
+ Elf64_Addr reloc_addr,
+ int noplt))
+{
+ Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+ unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
+
+ /* We cannot use a switch here because we cannot locate the switch
+ jump table until we've self-relocated. */
+
+ if (r_info == R_ALPHA_RELATIVE)
+ {
+ /* Already done in dynamic linker. */
+ if (!resolve || map != &_dl_rtld_map)
+ *reloc_addr += map->l_addr;
+ }
+ else if (r_info == R_ALPHA_NONE)
+ ;
+ else
+ {
+ Elf64_Addr loadbase, sym_value;
+
+ if (resolve)
+ {
+ loadbase = (*resolve)(&sym, (Elf64_Addr)reloc_addr,
+ r_info == R_ALPHA_JMP_SLOT);
+ }
+ else
+ loadbase = map->l_addr;
+
+ sym_value = sym ? loadbase + sym->st_value : 0;
+
+ if (r_info == R_ALPHA_GLOB_DAT)
+ {
+ *reloc_addr = sym_value;
+ }
+ else if (r_info == R_ALPHA_JMP_SLOT)
+ {
+ *reloc_addr = sym_value;
+ elf_alpha_fix_plt(map, reloc, sym_value);
+ }
+ else if (r_info == R_ALPHA_REFQUAD)
+ {
+ sym_value += *reloc_addr;
+ if (resolve && map == &_dl_rtld_map)
+ {
+ /* Undo the relocation done here during bootstrapping.
+ Now we will relocate anew, possibly using a binding
+ found in the user program or a loaded library rather
+ than the dynamic linker's built-in definitions used
+ while loading those libraries. */
+ const Elf64_Sym *const dlsymtab
+ = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym_value -= map->l_addr;
+ sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
+ }
+ else
+ sym_value += reloc->r_addend;
+ *reloc_addr = sym_value;
+ }
+ else if (r_info == R_ALPHA_COPY)
+ memcpy (reloc_addr, (void *) sym_value, sym->st_size);
+ else
+ assert (! "unexpected dynamic reloc type");
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
+{
+ Elf64_Addr *const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+ unsigned long r_info = ELF64_R_TYPE (reloc->r_info);
+
+ if (r_info == R_ALPHA_JMP_SLOT)
+ {
+ /* Perform a RELATIVE reloc on the .got entry that transfers
+ to the .plt. */
+ *reloc_addr += map->l_addr;
+ }
+ else if (r_info == R_ALPHA_NONE)
+ ;
+ else
+ assert (! "unexpected PLT reloc type");
+}
+
+/* The alpha never uses Elf_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline void
+elf_machine_runtime_setup (struct link_map *l, int lazy)
+{
+ Elf64_Addr plt;
+ extern void _dl_runtime_resolve (void);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* The GOT entries for the functions in the PLT have not been
+ filled in yet. Their initial contents are directed to the
+ PLT which arranges for the dynamic linker to be called. */
+ plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
+
+ /* This function will be called to perform the relocation. */
+ *(Elf64_Addr *)(plt + 16) = (Elf64_Addr) &_dl_runtime_resolve;
+
+ /* Identify this shared object */
+ *(Elf64_Addr *)(plt + 24) = (Elf64_Addr) l;
+ }
+}
+
+/* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ( \
+"/* Trampoline for _dl_runtime_resolver */
+ .globl _dl_runtime_resolve
+ .ent _dl_runtime_resolve
+_dl_runtime_resolve:
+ lda $sp, -168($sp)
+ .frame $sp, 168, $26
+ /* Preserve all registers that C normally doesn't. */
+ stq $26, 0($sp)
+ stq $0, 8($sp)
+ stq $1, 16($sp)
+ stq $2, 24($sp)
+ stq $3, 32($sp)
+ stq $4, 40($sp)
+ stq $5, 48($sp)
+ stq $6, 56($sp)
+ stq $7, 64($sp)
+ stq $8, 72($sp)
+ stq $16, 80($sp)
+ stq $17, 88($sp)
+ stq $18, 96($sp)
+ stq $19, 104($sp)
+ stq $20, 112($sp)
+ stq $21, 120($sp)
+ stq $22, 128($sp)
+ stq $23, 136($sp)
+ stq $24, 144($sp)
+ stq $25, 152($sp)
+ stq $29, 160($sp)
+ .mask 0x27ff01ff, -168
+ /* Set up our $gp */
+ br $gp, .+4
+ ldgp $gp, 0($gp)
+ .prologue 1
+ /* Set up the arguments for _dl_runtime_resolve. */
+ /* $16 = link_map out of plt0 */
+ ldq $16, 8($27)
+ /* $17 = (($0 - 8) - ($1 + 16)) / 8 * sizeof(Elf_Rela) */
+ subq $28, $27, $28
+ subq $28, 24, $28
+ addq $28, $28, $17
+ addq $28, $17, $17
+ /* Do the fixup */
+ bsr $26, fixup..ng
+ /* Move the destination address to a safe place. */
+ mov $0, $27
+ /* Restore program registers. */
+ ldq $26, 0($sp)
+ ldq $0, 8($sp)
+ ldq $1, 16($sp)
+ ldq $2, 24($sp)
+ ldq $3, 32($sp)
+ ldq $4, 40($sp)
+ ldq $5, 48($sp)
+ ldq $6, 56($sp)
+ ldq $7, 64($sp)
+ ldq $8, 72($sp)
+ ldq $16, 80($sp)
+ ldq $17, 88($sp)
+ ldq $18, 96($sp)
+ ldq $19, 104($sp)
+ ldq $20, 112($sp)
+ ldq $21, 120($sp)
+ ldq $22, 128($sp)
+ ldq $23, 136($sp)
+ ldq $24, 144($sp)
+ ldq $25, 152($sp)
+ ldq $29, 160($sp)
+ /* Clean up and turn control to the destination */
+ lda $sp, 168($sp)
+ jmp $31, ($27)
+ .end _dl_runtime_resolve");
+
+/* The PLT uses Elf_Rel relocs. */
+#define elf_machine_relplt elf_machine_rela
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+/* FIXME */
+#define ELF_MACHINE_USER_ADDRESS_MASK (~0x1FFFFFFFFUL)
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+.text
+ .globl _start
+ .globl _dl_start_user
+_start:
+ br $gp,.+4
+ ldgp $gp, 0($gp)
+ /* Pass pointer to argument block to _dl_start. */
+ mov $sp, $16
+ bsr $26, _dl_start..ng
+_dl_start_user:
+ /* Save the user entry point address in s0. */
+ mov $0, $9
+ /* See if we were run as a command with the executable file
+ name as an extra leading argument. If so, adjust the stack
+ pointer to skip _dl_skip_args words. */
+ ldl $1, _dl_skip_args
+ beq $1, 0f
+ ldq $2, 0($sp)
+ subq $2, $1, $2
+ s8addq $1, $sp, $sp
+ stq $2, 0($sp)
+ /* Load _dl_default_scope[2] into s1 to pass to _dl_init_next. */
+0: ldq $10, _dl_default_scope+16
+ /* Call _dl_init_next to return the address of an initalizer
+ function to run. */
+1: mov $10, $16
+ jsr $26, _dl_init_next
+ ldgp $gp, 0($26)
+ beq $0, 2f
+ mov $0, $27
+ jsr $26, ($0)
+ ldgp $gp, 0($26)
+ br 1b
+2: /* Pass our finalizer function to the user in $0. */
+ lda $0, _dl_fini
+ /* Jump to the user's entry point. */
+ jmp ($9)");
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=50f1932bda5560e95a863812257b404402afa01d
commit 50f1932bda5560e95a863812257b404402afa01d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 01:42:09 1996 +0000
Tue Jun 11 19:13:04 1996 Richard Henderson <rth@tamu.edu>
* elf/rtld.c (_dl_start): Don't rely on pointer-to-first-arg hack
for getting the argc/argv/envp block. Instead, make it the argument.
sysdeps/i386/dl-machine.h (RTLD_START): Do that.
sysdeps/m68k/dl-machine.h (RTLD_START): Same.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 415216b..ad3b6c3 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -234,7 +234,9 @@ _dl_runtime_resolve:
.globl _start
.globl _dl_start_user
_start:
+ move.l %sp, -(%sp)
jbsr _dl_start
+ addq.l #4, %sp
_dl_start_user:
| Save the user entry point address in %a4.
move.l %d0, %a4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7cf1621790751ae7aa69a29ba83efb8d086ed39
commit d7cf1621790751ae7aa69a29ba83efb8d086ed39
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 01:41:59 1996 +0000
Tue Jun 11 19:13:04 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/Makefile [subdir elf]: Add -mno-fp-regs to
sysdep-CFLAGS so that _dl_runtime_resolve doesn't have to save them.
Add -mbuild-constants to CFLAGS-rtld.c to that we can bootstrap
without using literal data.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 996c589..a9f12d1 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -28,4 +28,12 @@ ifeq ($(subdir),gnulib)
routines = $(divrem)
endif # gnulib
+ifeq ($(subdir),elf)
+# The ld.so code cannot use literals until it self-relocates.
+CFLAGS-rtld.c = -mbuild-constants
+# The rest of ld.so shouldn't use FP regs for block moves so
+# that the lazy link trampoline doesn't have to save them.
+sysdep-CFLAGS += -mno-fp-regs
+endif
+
divrem := divl divlu divq divqu reml remlu remq remqu
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9f9cd8224e0cba2cfefad66b3f2341c9fb3ea041
commit 9f9cd8224e0cba2cfefad66b3f2341c9fb3ea041
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 20:11:28 1996 +0000
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-object.c (_dl_loaded): Variable removed.
(_dl_default_scope): New variable replaces it.
* elf/link.h (_dl_loaded): Remove variable decl; instead define as
macro for _dl_default_scope[2].
(_dl_default_scope): Declare it.
* sysdeps/i386/dl-machine.h (RTLD_START): Use _dl_default_scope[2]
instead of _dl_loaded.
* sysdeps/m68k/dl-machine.h (RTLD_START): Likewise.
* elf/rtld.c (dl_main): Use _dl_default_scope for symbol lookups.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 74e8874..415216b 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -252,9 +252,9 @@ _dl_start_user:
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
-0: | Push _dl_loaded as argument in _dl_init_next call below.
- move.l ([_dl_loaded@GOT, %a5]), %d2
-0: move.l %d2, -(%sp)
+0: | Push _dl_default_scope[2] as argument in _dl_init_next call below.
+ move.l ([_dl_default_scope@GOT, %a5]), %d2
+0: move.l (%d2, 8), -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
bsr.l _dl_init_next@PLTPC
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9424ed18f080504ed4121375942686226c0c15dd
commit 9424ed18f080504ed4121375942686226c0c15dd
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 12:55:52 1996 +0000
Mon Jun 10 06:14:03 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS.
(ElfW, ELFW): Use it.
* elf/Makefile (headers): Add elfclass.h.
* sysdeps/wordsize-32/elfclass.h: New file.
* sysdeps/wordsize-64/elfclass.h: New file.
* sysdeps/alpha/Implies: Add wordsize-64.
* sysdeps/i386/Implies: Add wordsize-32.
* sysdeps/m68k/Implies: Add wordsize-32.
* sysdeps/mips/Implies: Add wordsize-32.
* sysdeps/sparc/Implies: Add wordsize-32.
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
index 9323409..37fee79 100644
--- a/sysdeps/alpha/Implies
+++ b/sysdeps/alpha/Implies
@@ -1,2 +1,3 @@
+wordsize-64
# Alpha uses IEEE 754 floating point.
ieee754
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
index a67e1c2..09dd873 100644
--- a/sysdeps/m68k/Implies
+++ b/sysdeps/m68k/Implies
@@ -1,2 +1,3 @@
+wordsize-32
# 68k uses IEEE 754 floating point.
ieee754
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
index 60732ce..5aeb9ae 100644
--- a/sysdeps/mips/Implies
+++ b/sysdeps/mips/Implies
@@ -1,2 +1,3 @@
+wordsize-32
# MIPS uses IEEE 754 floating point.
ieee754
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=625ba68c01e3908972be158678f2a9cb8acc1cd9
commit 625ba68c01e3908972be158678f2a9cb8acc1cd9
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 09:40:37 1996 +0000
Sun Jun 9 01:11:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/mprotect.c: Define with __ name and weak alias.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/unix/mman/syscalls.list (mprotect): Likewise.
* sysdeps/generic/sys/mman.h: Declare __mprotect.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
* sysdeps/unix/bsd/ultrix4/sys/mman.h: Likewise.
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index d49da02..d929ca9 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -79,6 +79,7 @@ int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
+int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Ultrix 4 does not implement `msync' or `madvise'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74802a54699a8e89691dba71ad7c7bac4285a374
commit 74802a54699a8e89691dba71ad7c7bac4285a374
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 09:23:00 1996 +0000
Sun Jun 9 20:40:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_acosl.c: New file.
diff --git a/sysdeps/m68k/fpu/e_acosl.c b/sysdeps/m68k/fpu/e_acosl.c
new file mode 100644
index 0000000..e3dcd17
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_acosl.c
@@ -0,0 +1,5 @@
+#ifndef FUNC
+#define FUNC __ieee754_acosl
+#endif
+#define float_type long double
+#include <e_acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0f6efdf89bbbeb4d1191b1012510ceffa1ba986
commit f0f6efdf89bbbeb4d1191b1012510ceffa1ba986
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 9 22:00:41 1996 +0000
Sun Jun 9 01:11:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/mach/mprotect.c: Define with __ name and weak alias.
* sysdeps/stub/mprotect.c: Likewise.
* sysdeps/unix/mman/syscalls.list (mprotect): Likewise.
* sysdeps/generic/sys/mman.h: Declare __mprotect.
* sysdeps/unix/sysv/irix4/sys/mman.h: Likewise.
* sysdeps/unix/sysv/linux/sys/mman.h: Likewise.
* sysdeps/unix/bsd/sun/sunos4/sys/mman.h: Likewise.
* sysdeps/unix/bsd/osf/sys/mman.h: Likewise.
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
index 397ad28..fc148a6 100644
--- a/sysdeps/unix/bsd/osf/sys/mman.h
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. OSF/1 version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -96,6 +96,7 @@ int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
+int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 10f31a8..c952fc4 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -93,6 +93,7 @@ int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
+int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index 543ce55..c96bcc0 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Irix 4 version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,6 +87,7 @@ int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
+int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40baa3096b0097555e1b54fa1f3decff32c7d032
commit 40baa3096b0097555e1b54fa1f3decff32c7d032
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 7 21:00:20 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Define long double versions of
the inline functions.
* sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c,
sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c,
sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c,
sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c,
sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c,
sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c,
sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c,
sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c,
sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c,
sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c,
sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c,
sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c,
sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c,
sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c,
sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c,
sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c,
sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c,
sysdeps/m68k/fpu/e_atanhl.c, sysdeps/m68k/fpu/e_coshl.c: New files.
diff --git a/sysdeps/m68k/fpu/e_atanhl.c b/sysdeps/m68k/fpu/e_atanhl.c
new file mode 100644
index 0000000..d8975d6
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atanhl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atanhl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_coshl.c b/sysdeps/m68k/fpu/e_coshl.c
new file mode 100644
index 0000000..39144fd
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_coshl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_coshl
+#include <e_acosl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a41b578d9c70fb181a093c5ac02523f8b11007b
commit 7a41b578d9c70fb181a093c5ac02523f8b11007b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 7 20:37:18 1996 +0000
Fri Jun 7 09:11:17 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/alpha/Dist: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
new file mode 100644
index 0000000..235a443
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -0,0 +1,3 @@
+alpha/ptrace.h alpha/regdef.h
+ieee_get_fp_control.S ieee_set_fp_control.S
+ioperm.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e62e0ed33c1c3d4e2af6a580fefe6c8e4d6252fe
commit e62e0ed33c1c3d4e2af6a580fefe6c8e4d6252fe
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 7 20:36:40 1996 +0000
Fri Jun 7 09:11:17 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/alpha/Dist: Add _mcount.S.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index 0b1e1b9..c9419e6 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -2,3 +2,4 @@ setjmp_aux.c
DEFS.h
divrem.h
divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
+_mcount.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0137a397120dea26389f718d21d8ce96b718cf28
commit 0137a397120dea26389f718d21d8ce96b718cf28
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 7 20:36:36 1996 +0000
Fri Jun 7 09:11:17 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/alpha/Makefile (sysdep_routines): Append instead of
resetting; don't add bb_init_func.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 4bb1f29..996c589 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -17,7 +17,7 @@
# Cambridge, MA 02139, USA.
ifeq ($(subdir),gmon)
-sysdep_routines := bb_init_func _mcount
+sysdep_routines += _mcount
endif
ifeq ($(subdir),setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79a2e5125016ffcab265445ccc23dbec6ba3b333
commit 79a2e5125016ffcab265445ccc23dbec6ba3b333
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 7 13:06:41 1996 +0000
Wed Jun 5 22:06:21 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Fix type of reloc
argument.
[case R_68K_32]: Check for resolve being null.
(RTLD_START): Add missing label.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 6c6b01d..74e8874 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -73,7 +73,7 @@ elf_machine_load_address (void)
static inline void
elf_machine_rela (struct link_map *map,
- const Elf32_Rel *reloc, const Elf32_Sym *sym,
+ const Elf32_Rela *reloc, const Elf32_Sym *sym,
Elf32_Addr (*resolve) (const Elf32_Sym **ref,
Elf32_Addr reloc_addr,
int noplt))
@@ -110,7 +110,9 @@ elf_machine_rela (struct link_map *map,
+ reloc->r_addend);
break;
case R_68K_32:
- loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) :
+ /* RESOLVE is null during bootstrap relocation. */
+ map->l_addr);
*reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ reloc->r_addend);
break;
@@ -250,7 +252,7 @@ _dl_start_user:
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
- | Push _dl_loaded as argument in _dl_init_next call below.
+0: | Push _dl_loaded as argument in _dl_init_next call below.
move.l ([_dl_loaded@GOT, %a5]), %d2
0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1f73ff7c9fa24dcbbc5776e98f449c71711424a
commit e1f73ff7c9fa24dcbbc5776e98f449c71711424a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:22:48 1996 +0000
Thu Jun 6 00:02:15 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/m68k/select.S: File removed; obsolete with
current kernels, generic linux version is fine.
diff --git a/sysdeps/unix/sysv/linux/m68k/select.S b/sysdeps/unix/sysv/linux/m68k/select.S
deleted file mode 100644
index 2770df8..0000000
--- a/sysdeps/unix/sysv/linux/m68k/select.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
-/* Linux has two versions of the select system call. The old one expected
- one argument which must be a pointer to a struct which contains the
- five values. The new version expects the five arguments be given in the
- registers. First try the new version, if it's not available fall back
- to the old version. */
-
- .text
- SYSCALL_ERROR_HANDLER
-ENTRY (__select)
-
-#if 0 /* For now only use the old version. */
- DO_CALL (#SYS_ify (_newselect), 5)
- tst.l %d0
- jmi 1f
- rts
-
-1: move.l #-ENOSYS, %d1
- cmp.l %d1, %d0
- jne syscall_error /* Real error */
-
- /* Try again using the old syscall interface. */
-#endif
- lea 4(%sp), %a0
- move.l %a0, %d1
- move.l #SYS_ify (select), %d0
- trap #0
- tst.l %d0
- jmi syscall_error
- ret
-
-weak_alias (__select, select)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=863a5d82907483924627e74ece18fc27d4f337b3
commit 863a5d82907483924627e74ece18fc27d4f337b3
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:22:44 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_fmod.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_sin.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/s_atan.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_ilogb.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_ldexp.c,
sysdeps/m68k/fpu/s_modf.c: Define generic functions using FUNC and
float_type with appropriate defaults.
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 34dfc82..ae77dab 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC __ieee754_acos
#endif
+#ifndef float_type
+#define float_type double
+#endif
-double
-DEFUN(FUNC, (x), double x)
+float_type
+DEFUN(FUNC, (x), float_type x)
{
return __m81_u(FUNC)(x);
}
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 578fa3c..0b2468c 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC __ieee754_fmod
#endif
+#ifndef float_type
+#define float_type double
+#endif
-double
-DEFUN(FUNC, (x, y), double x AND double y)
+float_type
+DEFUN(FUNC, (x, y), float_type x AND float_type y)
{
return __m81_u(FUNC)(x, y);
}
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
index 1f508b4..28406e8 100644
--- a/sysdeps/m68k/fpu/k_cos.c
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -19,8 +19,17 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_cos, (x, y), double x AND double y)
+#ifndef FUNC
+#define FUNC cos
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y)
{
- return __cos (x + y);
+ return __CONCATX(__,FUNC) (x + y);
}
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
index 10cfbb4..8c6dfef 100644
--- a/sysdeps/m68k/fpu/k_sin.c
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -19,8 +19,18 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy)
+#ifndef FUNC
+#define FUNC sin
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
+ float_type x AND float_type y AND int iy)
{
- return __sin (x + y);
+ return __CONCATX(__,FUNC) (x + y);
}
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index b18c9af..c8fa9b7 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -19,11 +19,21 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy)
+#ifndef FUNC
+#define FUNC tan
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
+ float_type x AND float_type y AND int iy)
{
if (iy == 1)
- return __tan (x + y);
+ return __CONCATX(__,FUNC) (x + y);
else
- return -1.0 / __tan (x + y);
+ return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y);
}
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index 51916e1..29717d4 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC atan
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
-double
-DEFUN(__CONCATX(__,FUNC), (x), double x)
+float_type
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index 45c0540..16f3039 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__frexp, (value, expptr), double value AND int *expptr)
+#ifndef FUNC
+#define FUNC frexp
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr)
{
- return __m81_u(__frexp)(value, expptr);
+ return __m81_u(__CONCATX(__,FUNC))(value, expptr);
}
-weak_alias (__frexp, frexp)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 4119df9..c80a288 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -19,10 +19,20 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
+#ifndef FUNC
+#define FUNC ilogb
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
int
-DEFUN(__ilogb, (x), double x)
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
- return __m81_u(__ilogb)(x);
+ return __m81_u(__CONCATX(__,FUNC))(x);
}
-weak_alias (__ilogb, ilogb)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index eec07c7..570a7ba 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC isinf
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
int
-DEFUN(__CONCATX(__,FUNC), (x), double x)
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
index 67513d4..ea8bfba 100644
--- a/sysdeps/m68k/fpu/s_ldexp.c
+++ b/sysdeps/m68k/fpu/s_ldexp.c
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA. */
#ifndef FUNC
#define FUNC ldexp
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
-double
-DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp)
+float_type
+DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp)
{
return __m81_u(__CONCATX(__,FUNC))(x, exp);
}
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index ce70be8..f704260 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -19,9 +19,19 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__modf, (x, exp), double x AND double *iptr)
+#ifndef FUNC
+#define FUNC modf
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr)
{
- return __m81_u(__modf)(x, iptr);
+ return __m81_u(__CONCATX(__,FUNC))(x, iptr);
}
-weak_alias(__modf, modf)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx(__CONCATX(__,FUNC), FUNC)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c2f9239ec49e4525275aa0d83c6e46855ecd9ce
commit 7c2f9239ec49e4525275aa0d83c6e46855ecd9ce
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:22:31 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Define long double versions of
the inline functions.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index f59c168..2cbb4ca 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -54,6 +54,14 @@ Cambridge, MA 02139, USA. */
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
+
+#define __inline_mathopl(func, op) \
+ __m81_defun (long double, func, (long double __mathop_x)) \
+ { \
+ long double __result; \
+ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+ return __result; \
+ }
/* ieee style elementary functions */
__inline_mathop(__ieee754_acos, acos)
@@ -77,6 +85,17 @@ __inline_mathopf(__ieee754_logf, logn)
__inline_mathopf(__ieee754_sqrtf, sqrt)
__inline_mathopf(__ieee754_atanhf, atan)
+/* ieee style elementary long double functions */
+__inline_mathopl(__ieee754_acosl, acos)
+__inline_mathopl(__ieee754_asinl, asin)
+__inline_mathopl(__ieee754_coshl, cosh)
+__inline_mathopl(__ieee754_sinhl, sinh)
+__inline_mathopl(__ieee754_expl, etox)
+__inline_mathopl(__ieee754_log10l, log10)
+__inline_mathopl(__ieee754_logl, logn)
+__inline_mathopl(__ieee754_sqrtl, sqrt)
+__inline_mathopl(__ieee754_atanhl, atan)
+
__inline_mathop(__atan, atan)
__inline_mathop(__cos, cos)
__inline_mathop(__sin, sin)
@@ -105,6 +124,20 @@ __inline_mathopf(__log1pf, lognp1)
__inline_mathopf(__logbf, log2)
__inline_mathopf(__significandf, getman)
+__inline_mathopl(__atanl, atan)
+__inline_mathopl(__cosl, cos)
+__inline_mathopl(__sinl, sin)
+__inline_mathopl(__tanl, tan)
+__inline_mathopl(__tanhl, tanh)
+__inline_mathopl(__fabsl, abs)
+__inline_mathopl(__sqrtl, sqrt)
+
+__inline_mathopl(__rintl, int)
+__inline_mathopl(__expm1l, etoxm1)
+__inline_mathopl(__log1pl, lognp1)
+__inline_mathopl(__logbl, log2)
+__inline_mathopl(__significandl, getman)
+
__m81_defun (double, __ieee754_remainder, (double __x, double __y))
{
double __result;
@@ -427,6 +460,119 @@ __m81_defun (float, __scalbnf, (float __x, int __n))
return __result;
}
+__m81_defun (long double, __ieee754_remainderl, (long double __x,
+ long double __y))
+{
+ long double __result;
+ __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (long double, __ldexpl, (long double __x, int __e))
+{
+ long double __result;
+ long double __float_e = (long double) __e;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x));
+ return __result;
+}
+
+__m81_defun (long double, __ieee754_fmodl, (long double __x, long double __y))
+{
+ long double __result;
+ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_inline long double
+__m81_u(__frexpl)(long double __value, int *__expptr)
+{
+ long double __mantissa, __exponent;
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
+ __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
+ *__expptr = (int) __exponent;
+ return __mantissa;
+}
+
+__m81_defun (long double, __floorl, (long double __x))
+{
+ long double __result;
+ unsigned long int __ctrl_reg;
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
+ /* Set rounding towards negative infinity. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
+ /* Convert X to an integer, using -Inf rounding. */
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
+ return __result;
+}
+
+__m81_defun (long double, __ieee754_powl, (long double __x, long double __y))
+{
+ long double __result;
+ if (__x == 0.0l)
+ {
+ if (__y <= 0.0l)
+ __result = 0.0l / 0.0l;
+ else
+ __result = 0.0l;
+ }
+ else if (__y == 0.0l || __x == 1.0l)
+ __result = 1.0;
+ else if (__y == 1.0l)
+ __result = __x;
+ else if (__y == 2.0l)
+ __result = __x * __x;
+ else if (__x == 10.0l)
+ __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x == 2.0l)
+ __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x < 0.0l)
+ {
+ long double __temp = __m81_u(__rintl)(__y);
+ if (__y == __temp)
+ {
+ int i = (int) __y;
+ __result
+ = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(-__x));
+ if (i & 1)
+ __result = -__result;
+ }
+ else
+ __result = 0.0l / 0.0l;
+ }
+ else
+ __result = __m81_u(__ieee754_expl)(__y * __m81_u(__ieee754_logl)(__x));
+ return __result;
+}
+
+__m81_defun (long double, __ceill, (long double __x))
+{
+ long double __result;
+ unsigned long int __ctrl_reg;
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
+ /* Set rounding towards positive infinity. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg | 0x30));
+ /* Convert X to an integer, using +Inf rounding. */
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
+ return __result;
+}
+
+__m81_inline long double
+__m81_u(__modfl)(long double __value, long double *__iptr)
+{
+ long double __modf_int;
+ __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
+ *__iptr = __modf_int;
+ return __value - __modf_int;
+}
+
__m81_defun (int, __isinfl, (long double __value))
{
/* There is no branch-condition for infinity,
@@ -445,4 +591,36 @@ __m81_defun (int, __isnanl, (long double __value))
return __result;
}
+__m81_defun (int, __finitel, (long double __value))
+{
+ /* There is no branch-condition for infinity, so we must extract and
+ examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm ("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
+ return (__fpsr & (3 << 24)) == 0;
+}
+
+__m81_defun (int, __ilogbl, (long double __x))
+{
+ long double __result;
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
+ return (int) __result;
+}
+
+__m81_defun (long double, __ieee754_scalbl, (long double __x, long double __n))
+{
+ long double __result;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
+ return __result;
+}
+
+__m81_defun (long double, __scalbnl, (long double __x, int __n))
+{
+ long double __result;
+ long double __float_n = (long double) __n;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x));
+ return __result;
+}
+
#endif /* GCC. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2dd2ea9e483321adced69cd68dc563a76a01a298
commit 2dd2ea9e483321adced69cd68dc563a76a01a298
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:22:27 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_asinl.c, sysdeps/m68k/fpu/e_atanl.c,
sysdeps/m68k/fpu/e_acosl.c, sysdeps/m68k/fpu/e_expl.c,
sysdeps/m68k/fpu/e_fmodl.c, sysdeps/m68k/fpu/e_log10l.c,
sysdeps/m68k/fpu/e_logl.c, sysdeps/m68k/fpu/e_powl.c,
sysdeps/m68k/fpu/e_remainderl.c, sysdeps/m68k/fpu/e_scalbl.c,
sysdeps/m68k/fpu/e_sinhl.c, sysdeps/m68k/fpu/e_sqrtl.c,
sysdeps/m68k/fpu/k_cosl.c, sysdeps/m68k/fpu/k_sinl.c,
sysdeps/m68k/fpu/k_tanl.c, sysdeps/m68k/fpu/s_atanl.c,
sysdeps/m68k/fpu/s_ceill.c, sysdeps/m68k/fpu/s_cosl.c,
sysdeps/m68k/fpu/s_expm1l.c, sysdeps/m68k/fpu/s_fabsl.c,
sysdeps/m68k/fpu/s_finitel.c, sysdeps/m68k/fpu/s_floorl.c,
sysdeps/m68k/fpu/s_frexpl.c, sysdeps/m68k/fpu/s_ilogbl.c,
sysdeps/m68k/fpu/s_isinfl.c, sysdeps/m68k/fpu/s_isnanl.c,
sysdeps/m68k/fpu/s_ldexpl.c, sysdeps/m68k/fpu/s_log1pl.c,
sysdeps/m68k/fpu/s_logbl.c, sysdeps/m68k/fpu/s_modfl.c,
sysdeps/m68k/fpu/s_rintl.c, sysdeps/m68k/fpu/s_scalbnl.c,
sysdeps/m68k/fpu/s_significandl.c, sysdeps/m68k/fpu/s_sinl.c,
sysdeps/m68k/fpu/s_tanhl.c, sysdeps/m68k/fpu/s_tanl.c: New files.
diff --git a/sysdeps/m68k/fpu/e_asinl.c b/sysdeps/m68k/fpu/e_asinl.c
new file mode 100644
index 0000000..0dd89fb
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_asinl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_asinl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_expl.c b/sysdeps/m68k/fpu/e_expl.c
new file mode 100644
index 0000000..8805a1b
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_expl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_expl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_fmodl.c b/sysdeps/m68k/fpu/e_fmodl.c
new file mode 100644
index 0000000..a46f19e
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_fmodl.c
@@ -0,0 +1,5 @@
+#ifndef FUNC
+#define FUNC __ieee754_fmodl
+#endif
+#define float_type long double
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/e_log10l.c b/sysdeps/m68k/fpu/e_log10l.c
new file mode 100644
index 0000000..6dcfc5a
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log10l.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log10l
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_logl.c b/sysdeps/m68k/fpu/e_logl.c
new file mode 100644
index 0000000..03b1830
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_logl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_logl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_powl.c b/sysdeps/m68k/fpu/e_powl.c
new file mode 100644
index 0000000..0feec54
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_powl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_powl
+#include <e_fmodl.c>
diff --git a/sysdeps/m68k/fpu/e_remainderl.c b/sysdeps/m68k/fpu/e_remainderl.c
new file mode 100644
index 0000000..b9dc540
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_remainderl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_remainderl
+#include <e_fmodl.c>
diff --git a/sysdeps/m68k/fpu/e_scalbl.c b/sysdeps/m68k/fpu/e_scalbl.c
new file mode 100644
index 0000000..92ab7a4
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_scalbl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_scalbl
+#include <e_fmodl.c>
diff --git a/sysdeps/m68k/fpu/e_sinhl.c b/sysdeps/m68k/fpu/e_sinhl.c
new file mode 100644
index 0000000..2f42d96
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sinhl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sinhl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/e_sqrtl.c b/sysdeps/m68k/fpu/e_sqrtl.c
new file mode 100644
index 0000000..fede102
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sqrtl.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sqrtl
+#include <e_acosl.c>
diff --git a/sysdeps/m68k/fpu/k_cosl.c b/sysdeps/m68k/fpu/k_cosl.c
new file mode 100644
index 0000000..983b665
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_cosl.c
@@ -0,0 +1,3 @@
+#define FUNC cosl
+#define float_type long double
+#include <k_cos.c>
diff --git a/sysdeps/m68k/fpu/k_sinl.c b/sysdeps/m68k/fpu/k_sinl.c
new file mode 100644
index 0000000..5a647ca
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_sinl.c
@@ -0,0 +1,3 @@
+#define FUNC sinl
+#define float_type long double
+#include <k_sin.c>
diff --git a/sysdeps/m68k/fpu/k_tanl.c b/sysdeps/m68k/fpu/k_tanl.c
new file mode 100644
index 0000000..f2570e6
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_tanl.c
@@ -0,0 +1,3 @@
+#define FUNC tanl
+#define float_type long double
+#include <k_tan.c>
diff --git a/sysdeps/m68k/fpu/s_atanl.c b/sysdeps/m68k/fpu/s_atanl.c
new file mode 100644
index 0000000..b7e608a
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_atanl.c
@@ -0,0 +1,5 @@
+#ifndef FUNC
+#define FUNC atanl
+#endif
+#define float_type long double
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_ceill.c b/sysdeps/m68k/fpu/s_ceill.c
new file mode 100644
index 0000000..2bf95b0
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ceill.c
@@ -0,0 +1,2 @@
+#define FUNC ceill
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_cosl.c b/sysdeps/m68k/fpu/s_cosl.c
new file mode 100644
index 0000000..4198fee
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cosl.c
@@ -0,0 +1,2 @@
+#define FUNC cosl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_expm1l.c b/sysdeps/m68k/fpu/s_expm1l.c
new file mode 100644
index 0000000..cd62cb3
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_expm1l.c
@@ -0,0 +1,2 @@
+#define FUNC expm1l
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_fabsl.c b/sysdeps/m68k/fpu/s_fabsl.c
new file mode 100644
index 0000000..8ac14d5
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_fabsl.c
@@ -0,0 +1,2 @@
+#define FUNC fabsl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_finitel.c b/sysdeps/m68k/fpu/s_finitel.c
new file mode 100644
index 0000000..bd346a2
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_finitel.c
@@ -0,0 +1,2 @@
+#define FUNC finitel
+#include <s_isinfl.c>
diff --git a/sysdeps/m68k/fpu/s_floorl.c b/sysdeps/m68k/fpu/s_floorl.c
new file mode 100644
index 0000000..2c1ffd7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_floorl.c
@@ -0,0 +1,2 @@
+#define FUNC floorl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_frexpl.c b/sysdeps/m68k/fpu/s_frexpl.c
new file mode 100644
index 0000000..fe9466f
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_frexpl.c
@@ -0,0 +1,3 @@
+#define FUNC frexpl
+#define float_type long double
+#include <s_frexp.c>
diff --git a/sysdeps/m68k/fpu/s_ilogbl.c b/sysdeps/m68k/fpu/s_ilogbl.c
new file mode 100644
index 0000000..c3554d5
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ilogbl.c
@@ -0,0 +1,3 @@
+#define FUNC ilogbl
+#define float_type long double
+#include <s_ilogb.c>
diff --git a/sysdeps/m68k/fpu/s_isinfl.c b/sysdeps/m68k/fpu/s_isinfl.c
new file mode 100644
index 0000000..963725a
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isinfl.c
@@ -0,0 +1,5 @@
+#ifndef FUNC
+#define FUNC isinfl
+#endif
+#define float_type long double
+#include <s_isinf.c>
diff --git a/sysdeps/m68k/fpu/s_isnanl.c b/sysdeps/m68k/fpu/s_isnanl.c
new file mode 100644
index 0000000..bbacb64
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isnanl.c
@@ -0,0 +1,2 @@
+#define FUNC isnanl
+#include <s_isinfl.c>
diff --git a/sysdeps/m68k/fpu/s_ldexpl.c b/sysdeps/m68k/fpu/s_ldexpl.c
new file mode 100644
index 0000000..25796b7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ldexpl.c
@@ -0,0 +1,5 @@
+#ifndef FUNC
+#define FUNC ldexpl
+#endif
+#define float_type long double
+#include <s_ldexp.c>
diff --git a/sysdeps/m68k/fpu/s_log1pl.c b/sysdeps/m68k/fpu/s_log1pl.c
new file mode 100644
index 0000000..8dbef89
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log1pl.c
@@ -0,0 +1,2 @@
+#define FUNC log1pl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_logbl.c b/sysdeps/m68k/fpu/s_logbl.c
new file mode 100644
index 0000000..7d06ac1
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_logbl.c
@@ -0,0 +1,2 @@
+#define FUNC logbl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_modfl.c b/sysdeps/m68k/fpu/s_modfl.c
new file mode 100644
index 0000000..51327dd
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_modfl.c
@@ -0,0 +1,3 @@
+#define FUNC modfl
+#define float_type long double
+#include <s_modf.c>
diff --git a/sysdeps/m68k/fpu/s_rintl.c b/sysdeps/m68k/fpu/s_rintl.c
new file mode 100644
index 0000000..305667b
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rintl.c
@@ -0,0 +1,2 @@
+#define FUNC rintl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnl.c b/sysdeps/m68k/fpu/s_scalbnl.c
new file mode 100644
index 0000000..83e8bfe
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalbnl.c
@@ -0,0 +1,2 @@
+#define FUNC scalbnl
+#include <s_ldexpl.c>
diff --git a/sysdeps/m68k/fpu/s_significandl.c b/sysdeps/m68k/fpu/s_significandl.c
new file mode 100644
index 0000000..8c6fc7e
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_significandl.c
@@ -0,0 +1,2 @@
+#define FUNC significandl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_sinl.c b/sysdeps/m68k/fpu/s_sinl.c
new file mode 100644
index 0000000..9ac532c
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sinl.c
@@ -0,0 +1,2 @@
+#define FUNC sinl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_tanhl.c b/sysdeps/m68k/fpu/s_tanhl.c
new file mode 100644
index 0000000..6e99791
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tanhl.c
@@ -0,0 +1,2 @@
+#define FUNC tanhl
+#include <s_atanl.c>
diff --git a/sysdeps/m68k/fpu/s_tanl.c b/sysdeps/m68k/fpu/s_tanl.c
new file mode 100644
index 0000000..64fcb54
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tanl.c
@@ -0,0 +1,2 @@
+#define FUNC tanl
+#include <s_atanl.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ba647e7a4126f6ac67b12fa68041675318194c8
commit 3ba647e7a4126f6ac67b12fa68041675318194c8
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:21:45 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/acos.c: File removed.
* sysdeps/m68k/fpu/asin.c: File removed.
* sysdeps/m68k/fpu/atan.c: File removed.
* sysdeps/m68k/fpu/atan2.c: File removed.
* sysdeps/m68k/fpu/atanh.c: File removed.
* sysdeps/m68k/fpu/ceil.c: File removed.
* sysdeps/m68k/fpu/cos.c: File removed.
* sysdeps/m68k/fpu/cosh.c: File removed.
* sysdeps/m68k/fpu/drem.c: File removed.
* sysdeps/m68k/fpu/exp.c: File removed.
* sysdeps/m68k/fpu/expm1.c: File removed.
* sysdeps/m68k/fpu/fabs.c: File removed.
* sysdeps/m68k/fpu/fl.h: File removed.
* sysdeps/m68k/fpu/floor.c: File removed.
* sysdeps/m68k/fpu/fmod.c: File removed.
* sysdeps/m68k/fpu/frexp.c: File removed.
* sysdeps/m68k/fpu/isinf.c: File removed.
* sysdeps/m68k/fpu/isinfl.c: File removed.
* sysdeps/m68k/fpu/isnan.c: File removed.
* sysdeps/m68k/fpu/isnanl.c: File removed.
* sysdeps/m68k/fpu/ldexp.c: File removed.
* sysdeps/m68k/fpu/log.c: File removed.
* sysdeps/m68k/fpu/log10.c: File removed.
* sysdeps/m68k/fpu/log1p.c: File removed.
* sysdeps/m68k/fpu/logb.c: File removed.
* sysdeps/m68k/fpu/pow.c: File removed.
* sysdeps/m68k/fpu/rint.c: File removed.
* sysdeps/m68k/fpu/sin.c: File removed.
* sysdeps/m68k/fpu/sinh.c: File removed.
* sysdeps/m68k/fpu/sqrt.c: File removed.
* sysdeps/m68k/fpu/tan.c: File removed.
* sysdeps/m68k/fpu/tanh.c: File removed.
diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c
deleted file mode 100644
index 1481ce2..0000000
--- a/sysdeps/m68k/fpu/acos.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-#ifndef FUNC
-#define FUNC acos
-#endif
-
-
-double
-DEFUN(FUNC, (x), double x)
-{
- return __m81_u(FUNC)(x);
-}
diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c
deleted file mode 100644
index 0e3e58f..0000000
--- a/sysdeps/m68k/fpu/asin.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC asin
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c
deleted file mode 100644
index b9d428e..0000000
--- a/sysdeps/m68k/fpu/atan.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC atan
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
deleted file mode 100644
index 753b7f0..0000000
--- a/sysdeps/m68k/fpu/atan2.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-#ifdef __GNUC__
-
-double
-DEFUN(atan2, (y, x), double y AND double x)
-{
- static CONST double one = 1.0, zero = 0.0;
- double signx, signy;
- double pi, PIo4, PIo2;
-
- if (__isnan(x))
- return x;
- if (__isnan(y))
- return y;
-
- signy = __copysign(one, y);
- signx = __copysign(one, x);
-
- asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0));
- PIo2 = pi / 2;
- PIo4 = pi / 4;
-
- if (y == zero)
- return signx == one ? y : __copysign(pi, signy);
-
- if (x == zero)
- return __copysign(PIo2, signy);
-
- if (__isinf(x))
- {
- if (__isinf(y))
- return __copysign(signx == one ? PIo4 : 3 * PIo4, signy);
- else
- return __copysign(signx == one ? zero : pi, signy);
- }
-
- if (__isinf(y))
- return __copysign(PIo2, signy);
-
- y = fabs(y);
-
- if (x < 0.0)
- /* X is negative. */
- return __copysign(pi - atan(y / -x), signy);
-
- return __copysign(atan(y / x), signy);
-}
-
-#else
-#include <sysdeps/generic/atan2.c>
-#endif
diff --git a/sysdeps/m68k/fpu/atanh.c b/sysdeps/m68k/fpu/atanh.c
deleted file mode 100644
index d4636ec..0000000
--- a/sysdeps/m68k/fpu/atanh.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC atanh
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c
deleted file mode 100644
index b4605e1..0000000
--- a/sysdeps/m68k/fpu/ceil.c
+++ /dev/null
@@ -1,4 +0,0 @@
-
-#define FUNC ceil
-
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c
deleted file mode 100644
index fa50130..0000000
--- a/sysdeps/m68k/fpu/cos.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC cos
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c
deleted file mode 100644
index 78a8194..0000000
--- a/sysdeps/m68k/fpu/cosh.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC cosh
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
deleted file mode 100644
index 16caacf..0000000
--- a/sysdeps/m68k/fpu/drem.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-#undef drem
-
-double
-DEFUN(__drem, (x, y), double x AND double y)
-{
- return ____drem(x, y);
-}
-
-weak_alias (__drem, drem)
diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c
deleted file mode 100644
index 2649d72..0000000
--- a/sysdeps/m68k/fpu/exp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define FUNC exp
-#define OP etox
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c
deleted file mode 100644
index 19f1802..0000000
--- a/sysdeps/m68k/fpu/expm1.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define FUNC __expm1
-#define OP expm1
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c
deleted file mode 100644
index f9538a5..0000000
--- a/sysdeps/m68k/fpu/fabs.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define FUNC fabs
-#define OP abs
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h
deleted file mode 100644
index 098e880..0000000
--- a/sysdeps/m68k/fpu/fl.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Floating-point constants for the 68881.
- Copyright (C) 1992 Free Software Foundation, Inc. */
-
-/* IGNORE($ This is used internally in the library. */
-#include <sysdeps/ieee754/fl.h>
-/* ansidecl.m4 here inserts the ieee file. Kludge o rama.
- $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */
-
-#ifndef __need_HUGE_VAL
-
-#ifdef __GNUC__
-
-#undef FLT_ROUNDS
-
-/* Interrogate the 68881 to find the current rounding mode. */
-
-static __const __inline int
-DEFUN_VOID(__flt_rounds)
-{
- unsigned long int __fpcr;
- __asm("fmove%.l fpcr, %0" : "=g" (__fpcr));
- switch (__fpcr & (1 | 2))
- {
- case 0:
- return _FLT_ROUNDS_TONEAREST;
- case 1:
- return _FLT_ROUNDS_TOZERO;
- case 2:
- return _FLT_ROUNDS_TONEGINF;
- case 3:
- return _FLT_ROUNDS_TOPOSINF;
- default:
- return _FLT_ROUNDS_INDETERMINATE;
- }
-}
-
-#define FLT_ROUNDS (__flt_rounds())
-
-#endif /* GCC. */
-
-#endif /* Don't need HUGE_VAL. */
diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c
deleted file mode 100644
index 92a2ca6..0000000
--- a/sysdeps/m68k/fpu/floor.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define FUNC floor
-#define OP intrz
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c
deleted file mode 100644
index e3a2de0..0000000
--- a/sysdeps/m68k/fpu/fmod.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-double
-DEFUN(fmod, (x, y), double x AND double y)
-{
- return __fmod(x, y);
-}
diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c
deleted file mode 100644
index de74851..0000000
--- a/sysdeps/m68k/fpu/frexp.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-double
-DEFUN(frexp, (value, expptr), double value AND int *expptr)
-{
- return __frexp(value, expptr);
-}
diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c
deleted file mode 100644
index ab2cf0b..0000000
--- a/sysdeps/m68k/fpu/isinf.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-#ifndef FUNC
-#define FUNC __isinf
-#endif
-
-
-int
-DEFUN(FUNC, (x), double x)
-{
- return __m81_u(FUNC)(x);
-}
-
-weak_alias (__isinf, isinf)
diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c
deleted file mode 100644
index 97b5983..0000000
--- a/sysdeps/m68k/fpu/isinfl.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-int
-DEFUN(__isinfl, (x), long double x)
-{
- return __m81_u(__isinfl)(x);
-}
-
-weak_alias (__isinfl, isinfl)
diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c
deleted file mode 100644
index d098491..0000000
--- a/sysdeps/m68k/fpu/isnan.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define FUNC __isnan
-#include <isinf.c>
-
-weak_alias (__isnan, isnan)
diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c
deleted file mode 100644
index e5e3db2..0000000
--- a/sysdeps/m68k/fpu/isnanl.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-int
-DEFUN(__isnanl, (x), long double x)
-{
- return __m81_u(__isnanl)(x);
-}
-
-weak_alias (__isnanl, isnanl)
diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c
deleted file mode 100644
index 7e34882..0000000
--- a/sysdeps/m68k/fpu/ldexp.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-double
-DEFUN(ldexp, (x, exp), double x AND int exp)
-{
- return __ldexp(x, exp);
-}
diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c
deleted file mode 100644
index 4de3346..0000000
--- a/sysdeps/m68k/fpu/log.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define FUNC log
-#define OP logn
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c
deleted file mode 100644
index 246b69a..0000000
--- a/sysdeps/m68k/fpu/log10.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC log10
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/log1p.c b/sysdeps/m68k/fpu/log1p.c
deleted file mode 100644
index 0287838..0000000
--- a/sysdeps/m68k/fpu/log1p.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC log1p
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
deleted file mode 100644
index 8619c90..0000000
--- a/sysdeps/m68k/fpu/logb.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-#ifdef __GNUC__
-
-/* Return the base 2 signed integral exponent of X. */
-
-double
-DEFUN(__logb, (x), double x)
-{
- if (__isnan (x))
- return x;
- if (__isinf (x))
- return fabs (x);
-
- if (x == 0.0)
- asm ("flog2%.x %0, %0" : "=f" (x) : "0" (x));
- else
- asm ("fgetexp%.x %0, %0" : "=f" (x) : "0" (x));
-
- return x;
-}
-
-weak_alias (__logb, logb)
-
-#else
-#include <sysdeps/ieee754/logb.c>
-#endif
diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c
deleted file mode 100644
index 5ace4da..0000000
--- a/sysdeps/m68k/fpu/pow.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#define __NO_MATH_INLINES
-#include <math.h>
-
-double
-DEFUN(pow, (x, y), double x AND double y)
-{
- return __pow(x, y);
-}
diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c
deleted file mode 100644
index f83a4e4..0000000
--- a/sysdeps/m68k/fpu/rint.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#define FUNC __rint
-#define OP intr
-#include <acos.c>
-
-weak_alias (__rint, rint)
diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c
deleted file mode 100644
index 28ac9e5..0000000
--- a/sysdeps/m68k/fpu/sin.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC sin
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c
deleted file mode 100644
index fae7c71..0000000
--- a/sysdeps/m68k/fpu/sinh.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC sinh
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c
deleted file mode 100644
index 2365b61..0000000
--- a/sysdeps/m68k/fpu/sqrt.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC sqrt
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c
deleted file mode 100644
index 53b3b53..0000000
--- a/sysdeps/m68k/fpu/tan.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC tan
-#include <acos.c>
diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c
deleted file mode 100644
index cc67395..0000000
--- a/sysdeps/m68k/fpu/tanh.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define FUNC tanh
-#include <acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75b683dffd777543d6d051e5990ae413d050bebf
commit 75b683dffd777543d6d051e5990ae413d050bebf
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 6 05:20:49 1996 +0000
Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_acosf.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/k_cosf.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tanf.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_frexpf.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinff.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_modff.c: Include the corresponding double
versions with appropriate definitions to get float functions,
instead of defining them directly.
diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c
index 34da7ee..9066508 100644
--- a/sysdeps/m68k/fpu/e_acosf.c
+++ b/sysdeps/m68k/fpu/e_acosf.c
@@ -1,30 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
#ifndef FUNC
#define FUNC __ieee754_acosf
#endif
-
-float
-DEFUN(FUNC, (x), float x)
-{
- return __m81_u(FUNC)(x);
-}
+#define float_type float
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c
index b3c3ead..88c350c 100644
--- a/sysdeps/m68k/fpu/e_fmodf.c
+++ b/sysdeps/m68k/fpu/e_fmodf.c
@@ -1,30 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
#ifndef FUNC
#define FUNC __ieee754_fmodf
#endif
-
-float
-DEFUN(FUNC, (x, y), float x AND float y)
-{
- return __m81_u(FUNC)(x, y);
-}
+#define float_type float
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c
index a6f0a26..2a366d0 100644
--- a/sysdeps/m68k/fpu/k_cosf.c
+++ b/sysdeps/m68k/fpu/k_cosf.c
@@ -1,26 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-float
-DEFUN(__kernel_cosf, (x, y), float x AND float y)
-{
- return __cosf (x + y);
-}
+#define FUNC cosf
+#define float_type float
+#include <k_cos.c>
diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c
index 245e86b..7050347 100644
--- a/sysdeps/m68k/fpu/k_sinf.c
+++ b/sysdeps/m68k/fpu/k_sinf.c
@@ -1,26 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-float
-DEFUN(__kernel_sinf, (x, y, iy), float x AND float y AND int iy)
-{
- return __sinf (x + y);
-}
+#define FUNC sinf
+#define float_type float
+#include <k_sin.c>
diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c
index 027a74a..777af1b 100644
--- a/sysdeps/m68k/fpu/k_tanf.c
+++ b/sysdeps/m68k/fpu/k_tanf.c
@@ -1,29 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-float
-DEFUN(__kernel_tanf, (x, y, iy), float x AND float y AND int iy)
-{
- if (iy == 1)
- return __tanf (x + y);
- else
- return -1.0 / __tanf (x + y);
-}
+#define FUNC tanf
+#define float_type float
+#include <k_tan.c>
diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c
index d26f838..c98559a 100644
--- a/sysdeps/m68k/fpu/s_atanf.c
+++ b/sysdeps/m68k/fpu/s_atanf.c
@@ -1,35 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
#ifndef FUNC
#define FUNC atanf
#endif
-
-#define __CONCATX(a,b) __CONCAT(a,b)
-
-float
-DEFUN(__CONCATX(__,FUNC), (x), float x)
-{
- return __m81_u(__CONCATX(__,FUNC))(x);
-}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define float_type float
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c
index dd30f6c..893b6ad 100644
--- a/sysdeps/m68k/fpu/s_frexpf.c
+++ b/sysdeps/m68k/fpu/s_frexpf.c
@@ -1,27 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-float
-DEFUN(__frexpf, (value, expptr), float value AND int *expptr)
-{
- return __m81_u(__frexpf)(value, expptr);
-}
-weak_alias (__frexpf, frexpf)
+#define FUNC frexpf
+#define float_type float
+#include <s_frexp.c>
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c
index 8d9a027..c0c2ffd 100644
--- a/sysdeps/m68k/fpu/s_ilogbf.c
+++ b/sysdeps/m68k/fpu/s_ilogbf.c
@@ -1,28 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-int
-DEFUN(__ilogbf, (x), float x)
-{
- return __m81_u(__ilogbf)(x);
-}
-
-weak_alias (__ilogbf, ilogbf)
+#define FUNC ilogbf
+#define float_type float
+#include <s_ilogb.c>
diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c
index 8f18db5..ebf4f2a 100644
--- a/sysdeps/m68k/fpu/s_isinff.c
+++ b/sysdeps/m68k/fpu/s_isinff.c
@@ -1,35 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
#ifndef FUNC
#define FUNC isinff
#endif
-
-#define __CONCATX(a,b) __CONCAT(a,b)
-
-int
-DEFUN(__CONCATX(__,FUNC), (x), float x)
-{
- return __m81_u(__CONCATX(__,FUNC))(x);
-}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define float_type float
+#include <s_isinf.c>
diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c
index 94abf25..81a6b28 100644
--- a/sysdeps/m68k/fpu/s_ldexpf.c
+++ b/sysdeps/m68k/fpu/s_ldexpf.c
@@ -1,35 +1,5 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
#ifndef FUNC
#define FUNC ldexpf
#endif
-
-#define __CONCATX(a,b) __CONCAT(a,b)
-
-float
-DEFUN(__CONCATX(__,FUNC), (x, exp), float x AND int exp)
-{
- return __m81_u(__CONCATX(__,FUNC))(x, exp);
-}
-
-#define weak_aliasx(a,b) weak_alias(a,b)
-weak_aliasx (__CONCATX(__,FUNC), FUNC)
+#define float_type float
+#include <s_ldexp.c>
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c
index 04b51d5..37bff00 100644
--- a/sysdeps/m68k/fpu/s_modff.c
+++ b/sysdeps/m68k/fpu/s_modff.c
@@ -1,27 +1,3 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <math.h>
-
-float
-DEFUN(__modff, (x, exp), float x AND float *iptr)
-{
- return __m81_u(__modff)(x, iptr);
-}
-weak_alias(__modff, modff)
+#define FUNC modff
+#define float_type float
+#include <s_modf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0526c3be0eceae9a33610bf6aa5bc2e2ebe759e8
commit 0526c3be0eceae9a33610bf6aa5bc2e2ebe759e8
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 5 23:23:03 1996 +0000
Wed Jun 5 15:57:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Makerules (distinfo-vars): Add sysdep_headers.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Append to
this instead of $(headers).
* sysdeps/unix/sysv/linux/alpha/Makefile: Likewise.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index beb8441..e6e421d 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,7 +1,6 @@
ifeq ($(subdir), misc)
-headers += alpha/ptrace.h alpha/regdef.h
+sysdep_headers += alpha/ptrace.h alpha/regdef.h
-sysdep_routines := $(sysdep_routines) \
- ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \
- sethae ioperm osf_sigprocmask fstatfs statfs
+sysdep_routines += ieee_get_fp_control ieee_set_fp_control fpu_control \
+ setfpucw sethae ioperm osf_sigprocmask fstatfs statfs
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=adf91cfa8d8879c3c109009de52a7ae35b44587d
commit adf91cfa8d8879c3c109009de52a7ae35b44587d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 5 23:22:41 1996 +0000
Wed Jun 5 15:57:28 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist: Removed.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
deleted file mode 100644
index 69d16ac..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sys-sig.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=173c291195fa4fd580be701c73db56a9cee6bc5f
commit 173c291195fa4fd580be701c73db56a9cee6bc5f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 5 19:04:42 1996 +0000
Wed Jun 5 00:01:19 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/unix/bsd/ultrix4/mips/Dist: Updated.
* sysdeps/unix/bsd/ultrix4/Dist: Removed.
* sysdeps/unix/sysv/sysv4/Dist: Updated.
* sysdeps/unix/sysv/sco3.2.4/Dist: Removed.
* sysdeps/unix/sysv/irix4/Dist: Updated.
* sysdeps/unix/sysv/linux/i386/Dist: Removed.
* sysdeps/unix/sysv/Dist: Updated.
* sysdeps/unix/bsd/sun/sunos4/Dist: Removed.
* sysdeps/unix/bsd/sony/newsos4/Dist: Removed.
* sysdeps/gnu/Dist: New file.
* sysdeps/alpha/Dist: Updated.
* sysdeps/mach/hurd/Dist: Updated.
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index c4ea856..0b1e1b9 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1,4 +1,4 @@
setjmp_aux.c
DEFS.h
-divrem.m4 macros.m4
+divrem.h
divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
diff --git a/sysdeps/unix/bsd/sony/newsos4/Dist b/sysdeps/unix/bsd/sony/newsos4/Dist
deleted file mode 100644
index d7500fd..0000000
--- a/sysdeps/unix/bsd/sony/newsos4/Dist
+++ /dev/null
@@ -1 +0,0 @@
-sys_wait4.S
diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist
deleted file mode 100644
index f1c9046..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-sys_wait4.S
-sys_mmap.S
diff --git a/sysdeps/unix/bsd/ultrix4/Dist b/sysdeps/unix/bsd/ultrix4/Dist
deleted file mode 100644
index 6745cd4..0000000
--- a/sysdeps/unix/bsd/ultrix4/Dist
+++ /dev/null
@@ -1 +0,0 @@
-getsysinfo.S
diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist
index c2e8abb..06cf9cc 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/Dist
+++ b/sysdeps/unix/bsd/ultrix4/mips/Dist
@@ -1 +1 @@
-sigtramp.c __handler.S
+__handler.S
diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist
index c5dd106..cf0a898 100644
--- a/sysdeps/unix/sysv/irix4/Dist
+++ b/sysdeps/unix/sysv/irix4/Dist
@@ -1,2 +1 @@
-syssgi.S sysmp.S
__handler.S sigtramp.c
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
deleted file mode 100644
index 462b9fb..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/Dist
+++ /dev/null
@@ -1,2 +0,0 @@
-pgrpsys.S
-sco_getgrp.S
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index f603d8b..da3d7e5 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1,7 +1,2 @@
sysconfig.h
-sysconfig.S
-pgrpsys.S
-__waitid.S
siginfo.h
-__getpgid.c __setpgid.c
-sysinfo.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a284f153f8f07ccecb06b007e6fa35a413c67fd
commit 6a284f153f8f07ccecb06b007e6fa35a413c67fd
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 5 03:29:08 1996 +0000
Tue Jun 4 21:01:20 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/i386/Makefile (long-double-fcts): New variable, set to yes.
* sysdeps/m68k/Makefile: Likewise.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 3d35ac5..ffdc682 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -36,3 +36,6 @@ asm-CPPFLAGS += $(m68k-syntax-flag)
# Make sure setjmp.c is compiled with a frame pointer
CFLAGS-setjmp.c := -fno-omit-frame-pointer
+
+# The 68k `long double' is a distinct type we support.
+long-double-fcts = yes
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c366516bbb032fa870e195a129cb54ff1e803b1
commit 7c366516bbb032fa870e195a129cb54ff1e803b1
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 4 22:59:11 1996 +0000
Tue Jun 4 18:57:57 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-init.c (_dl_init_next): Take argument, link_map whose
searchlist describes the piece of the DT_NEEDED graph to be
initialized.
* elf/link.h: Update prototype.
* sysdeps/i386/dl-machine.h (RTLD_START): Pass _dl_loaded as argument
to _dl_init_next.
* sysdeps/m68k/dl-machine.h: Likewise.
* elf/dl-deps.c (_dl_open): Pass new object as arg to _dl_init_next.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 760bf96..6c6b01d 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -250,14 +250,18 @@ _dl_start_user:
lea (%sp, %d0*4), %sp
| Push back the modified argument count.
move.l %d1, -(%sp)
+ | Push _dl_loaded as argument in _dl_init_next call below.
+ move.l ([_dl_loaded@GOT, %a5]), %d2
+0: move.l %d2, -(%sp)
| Call _dl_init_next to return the address of an initializer
| function to run.
-0: bsr.l _dl_init_next@PLTPC
+ bsr.l _dl_init_next@PLTPC
+ add.l #4, %sp | Pop argument.
| Check for zero return, when out of initializers.
tst.l %d0
jeq 1f
| Call the shared object initializer function.
- | NOTE: We depend only on the registers (%a4 and %a5)
+ | NOTE: We depend only on the registers (%d2, %a4 and %a5)
| and the return address pushed by this call;
| the initializer is called with the stack just
| as it appears on entry, and it is free to move
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43e2c3421f515e9a97e2a2420dda167d4b0d0f57
commit 43e2c3421f515e9a97e2a2420dda167d4b0d0f57
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 3 04:24:14 1996 +0000
Mon Jun 3 03:06:34 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-lookup.c (_dl_lookup_symbol): Take new arg RELOC_ADDR and
don't allow a defn resolving to that address.
* elf/link.h: Update prototype and comment.
* elf/dl-runtime.c (fixup): Define local `resolve' function and pass
it to elf_machine_relplt.
* elf/dl-reloc.c (_dl_relocate_object: resolve): Take new arg
RELOC_ADDR and pass it through to _dl_lookup_symbol.
* elf/do-rel.h (elf_dynamic_do_rel): Pass RESOLVE to elf_machine_rel
instead of calling it ourselves and passing its results.
(elf_dynamic_do_rel): RESOLVE fn takes new arg RELOC_ADDR.
* elf/rtld.c (dl_main): Pass 0 for RELOC_ADDR to _dl_lookup_symbol.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Remove SYM_LOADADDR
arg. Add RESOLVE function ptr arg. Call *RESOLVE as necessary.
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/stub/dl-machine.h: Likewise.
Sun Jun 2 14:56:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT.
Reject SHN_UNDEF defns iff NOPLT is nonzero.
* elf/link.h (_dl_lookup_symbol): Update prototype and comment.
* elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT.
* elf/dlsym.c (dlsym): Pass 0.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET
replaced with NOPLT flag. Pass it through to _dl_lookup_symbol.
* elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg.
Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value.
* sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro.
* sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise.
* sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index aa1f19e..760bf96 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -73,43 +73,67 @@ elf_machine_load_address (void)
static inline void
elf_machine_rela (struct link_map *map,
- const Elf32_Rela *reloc,
- Elf32_Addr sym_loadaddr, const Elf32_Sym *sym)
+ const Elf32_Rel *reloc, const Elf32_Sym *sym,
+ Elf32_Addr (*resolve) (const Elf32_Sym **ref,
+ Elf32_Addr reloc_addr,
+ int noplt))
{
Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
- const Elf32_Addr sym_value = sym ? sym_loadaddr + sym->st_value : 0;
+ Elf32_Addr loadbase;
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_68K_COPY:
- memcpy (reloc_addr, (void *) sym_value, sym->st_size);
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size);
break;
case R_68K_GLOB_DAT:
+ loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0) :
+ /* RESOLVE is null during bootstrap relocation. */
+ map->l_addr);
+ *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
+ break;
case R_68K_JMP_SLOT:
- *reloc_addr = sym_value;
+ loadbase = (resolve ? (*resolve) (&sym, (Elf32_Addr) reloc_addr, 1) :
+ /* RESOLVE is null during bootstrap relocation. */
+ map->l_addr);
+ *reloc_addr = sym ? (loadbase + sym->st_value) : 0;
break;
case R_68K_8:
- *(char *) reloc_addr = sym_value + reloc->r_addend;
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
break;
case R_68K_16:
- *(short *) reloc_addr = sym_value + reloc->r_addend;
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
break;
case R_68K_32:
- *reloc_addr = sym_value + reloc->r_addend;
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend);
break;
case R_68K_RELATIVE:
*reloc_addr = map->l_addr + reloc->r_addend;
break;
case R_68K_PC8:
- *(char *) reloc_addr = (sym_value + reloc->r_addend
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(char *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend
- (Elf32_Addr) reloc_addr);
break;
case R_68K_PC16:
- *(short *) reloc_addr = (sym_value + reloc->r_addend
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *(short *) reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend
- (Elf32_Addr) reloc_addr);
break;
case R_68K_PC32:
- *reloc_addr = sym_value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+ loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0);
+ *reloc_addr = ((sym ? (loadbase + sym->st_value) : 0)
+ + reloc->r_addend
+ - (Elf32_Addr) reloc_addr);
break;
case R_68K_NONE: /* Alright, Wilbur. */
break;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=03e81891af6e73dbeddabab27ec54004f3f31529
commit 03e81891af6e73dbeddabab27ec54004f3f31529
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 21:35:13 1996 +0000
Sun Jun 2 14:56:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* elf/dl-lookup.c (_dl_lookup_symbol): Arg NOSELF renamed to NOPLT.
Reject SHN_UNDEF defns iff NOPLT is nonzero.
* elf/link.h (_dl_lookup_symbol): Update prototype and comment.
* elf/dl-runtime.c (fixup): Pass 1 to _dl_lookup_symbol for NOPLT.
* elf/dlsym.c (dlsym): Pass 0.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-reloc.c (_dl_relocate_object: resolve): Second arg R_OFFSET
replaced with NOPLT flag. Pass it through to _dl_lookup_symbol.
* elf/do-rel.h (elf_dynamic_do_rel): Update prototype of RESOLVE arg.
Pass `elf_machine_pltrel_p (R->r_type)' result as NOPLT flag value.
* sysdeps/i386/dl-machine.h (elf_machine_pltrel_p): New macro.
* sysdeps/m68k/dl-machine.h (elf_machine_pltrel_p): Likewise.
* sysdeps/stub/dl-machine.h (elf_machine_pltrel_p): Likewise.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 8cbb977..aa1f19e 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -136,6 +136,10 @@ elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
}
}
+/* Nonzero iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value. */
+#define elf_machine_pltrel_p(type) ((type) == R_68K_JMP_SLOT)
+
/* The m68k never uses Elf32_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18a403782d3a58b6f0928021d78a54594bfd0b9d
commit 18a403782d3a58b6f0928021d78a54594bfd0b9d
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:49:31 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h (END): Redefine to use .end
directive for both ELF and ECOFF.
(ret): Delete macro. It was a dangerous macro and unnecessary
since the Alpha assemblers recognizes "ret" as a macro themselves.
Thu May 23 02:15:56 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h (ret): Remove macro. It is
dangerous and unnecessary since both OSF/1 as and gas define "ret"
as a pseudo-instruction.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 8a52f20..6fed4a6 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -97,7 +97,9 @@ name/**/: \
3:
#endif
-#define ret ret zero,(ra),1
+#undef END
+#define END(sym) .end sym
+
#define r0 v0
#define r1 a4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53f64cf452e92caee23e3bb49ed145b10bf49190
commit 53f64cf452e92caee23e3bb49ed145b10bf49190
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:49:29 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/speed.c: Remove.
diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c
deleted file mode 100644
index 40bf6c5..0000000
--- a/sysdeps/unix/sysv/linux/alpha/speed.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* `struct termios' speed frobnication functions. Linux version.
-Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <stddef.h>
-#include <errno.h>
-#include <termios.h>
-
-static const speed_t speeds[] =
- {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- 57600,
- 115200,
- 230400,
- 460800,
- };
-
-
-/* Return the output baud rate stored in *TERMIOS_P. */
-speed_t
-cfgetospeed (termios_p)
- const struct termios *termios_p;
-{
- speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX);
-
- if (retval & CBAUDEX)
- {
- retval &= ~CBAUDEX;
- retval |= CBAUD + 1;
- }
-
- return retval;
-}
-
-/* Return the input baud rate stored in *TERMIOS_P.
- For Linux there is no difference between input and output speed. */
-strong_alias (cfgetospeed, cfgetispeed);
-
-/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
-int
-cfsetospeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
-{
- register unsigned int i;
-
- if (termios_p == NULL)
- {
- errno = EINVAL;
- return -1;
- }
-
- /* This allows either B1200 or 1200 to work. XXX
- Do we really want to try to support this, given that
- fetching the speed must return one or the other? */
-
- for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
- if (i == speed || speeds[i] == speed)
- {
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= (i & CBAUD);
- if (i & ~CBAUD)
- termios_p->c_cflag |= CBAUDEX;
- return 0;
- }
-
- errno = EINVAL;
- return -1;
-}
-
-/* Set the input baud rate stored in *TERMIOS_P to SPEED.
- For Linux there is no difference between input and output speed. */
-strong_alias (cfsetospeed, cfsetispeed);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a3bb81d201fdea6fd8922760972854e80513e68e
commit a3bb81d201fdea6fd8922760972854e80513e68e
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:49:27 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/osf/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire
break value, not just the low 32 bits to accomodate large
memories.
diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S
index 6e4bd2c..105e401 100644
--- a/sysdeps/unix/bsd/osf/alpha/brk.S
+++ b/sysdeps/unix/bsd/osf/alpha/brk.S
@@ -41,7 +41,7 @@ ENTRY(__brk)
/* Update __curbrk and exit cleanly. */
/* ldgp gp, 0(t12) */
- stl a0, __curbrk
+ stq a0, __curbrk
mov zero, v0
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56e70371a665b84fb51b73964d99f55f3a982869
commit 56e70371a665b84fb51b73964d99f55f3a982869
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:49:21 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S,
sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h,
sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S,
sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of
.end directive.
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index 7944544..1730760 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -106,4 +106,4 @@ LEAF(_mcount, 0xb0)
addq sp, 0xb0, sp
ret zero,($at),1
- .end _mcount
+ END(_mcount)
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index 113bc47..fc73815 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -27,4 +27,4 @@ ENTRY(setjmp)
lda $27, __sigsetjmp /* Load address to jump to. */
bis $31, 1, $17 /* Pass a second argument of one. */
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
- .end setjmp
+ END(setjmp)
diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/copysign.S
index 9e9dff3..95eb608 100644
--- a/sysdeps/alpha/copysign.S
+++ b/sysdeps/alpha/copysign.S
@@ -24,6 +24,6 @@ ENTRY(__copysign)
cpys $f17,$f16,$f0
ret
- .end __copysign
+ END(__copysign)
weak_alias(__copysign, copysign)
diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/fabs.S
index 88e64b4..dff8390 100644
--- a/sysdeps/alpha/fabs.S
+++ b/sysdeps/alpha/fabs.S
@@ -24,4 +24,4 @@ ENTRY(fabs)
cpys $f31,$f16,$f0
ret
- .end fabs
+ END(fabs)
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 7cf6281..e4dd87c 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -63,4 +63,4 @@ ENTRY(ffs)
done: ret
- .end ffs
+ END(ffs)
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index 8c1c700..9777e46 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -31,7 +31,7 @@ ENTRY(__htonl)
or t2, v0, v0 # v0 = ddccbbaa
ret
- .end __htonl
+ END(__htonl)
strong_alias_asm(__htonl, __ntohl)
weak_alias(__htonl, htonl)
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index cb22b21..7717636 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -25,7 +25,7 @@ ENTRY(__htons)
bis v0, t1, v0 # v0 = bbaa
ret
- .end __htons
+ END(__htons)
strong_alias_asm(__htons, __ntohs)
weak_alias(__htons, htons)
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 2f78697..2d21247 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -157,4 +157,4 @@ not_found:
mov zero, v0
ret
- .end memchr
+ END(memchr)
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index b165d2c..da71a32 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -30,4 +30,4 @@ ENTRY (__sigsetjmp)
bis $15, $15, $19 /* Pass FP as 4th arg. */
jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
- .end __sigsetjmp
+ END(__sigsetjmp)
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index c641261..15c78cd 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -67,4 +67,4 @@ found: blbs t1, done # make aligned case fast
done: subq v0, a0, v0
ret
- .end strlen
+ END(strlen)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index c3486ac..52c945a 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -41,6 +41,6 @@ error: lda sp, 8(sp)
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __ieee_get_fp_control
+ END(__ieee_get_fp_control)
weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 507b5d5..d72585d 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -39,6 +39,6 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __ieee_set_fp_control
+ END(__ieee_set_fp_control)
weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
index 7f2a491..bd8c659 100644
--- a/sysdeps/unix/sysv/linux/alpha/llseek.S
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -46,4 +46,4 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end llseek
+ END(llseek)
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index 4095846..b23803c 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -37,6 +37,6 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end __pipe
+ END(__pipe)
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 00c02de..26a1869 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -36,4 +36,4 @@ error: br gp, 1f
1: ldgp gp, 0(gp)
jmp zero, syscall_error
- .end sigsuspend
+ END(sigsuspend)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d663482017d73707e4f9181a1dad1557b596e2a4
commit d663482017d73707e4f9181a1dad1557b596e2a4
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:48:36 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/osf/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/brk.S (__curbrk): Store the entire
break value, not just the low 32 bits to accomodate large
memories.
Tue May 28 10:46:04 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/unix/sysv/linux/alpha/brk.S: Rather than attempt to
dynamically resolve _end for initializing __curbrk, support the
brk(0) query idiom.
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index 4582539..1c4a4f9 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -23,17 +23,7 @@ break value (instead of the new, requested one). */
#include <sysdep.h>
#include <errnos.h>
-#ifndef HAVE_GNU_LD
-#define _end end
-#endif
-
- .extern _end,8
-
- .data
-
- .globl __curbrk
-__curbrk:
- .quad _end
+.comm __curbrk, 8
.text
LEAF(__brk, 0)
@@ -42,11 +32,15 @@ LEAF(__brk, 0)
ldi v0, __NR_brk
call_pal PAL_callsys
+
+ /* Correctly handle the brk(0) query case. */
+ cmoveq a0, v0, a0
+
subq a0, v0, t0
bne t0, error
/* Update __curbrk and return cleanly. */
- stl a0, __curbrk
+ stq a0, __curbrk
mov zero, v0
ret
@@ -54,6 +48,6 @@ LEAF(__brk, 0)
error: ldi v0, ENOMEM
jmp zero, syscall_error
- .end __brk
+ END(__brk)
weak_alias (__brk, brk)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e872219f508230565ee19f2024b5eb83ff6c31e7
commit e872219f508230565ee19f2024b5eb83ff6c31e7
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:48:32 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/bsd-_setjmp.S (setjmp): Renamed entry point to
_setjmp.
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S,
sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h,
sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S,
sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of
.end directive.
Tue May 28 10:46:04 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/bsd-_setjmp.S: The function is _setjmp not setjmp.
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index 16709df..da60442 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY(setjmp)
+ENTRY(_setjmp)
lda $27, __sigsetjmp /* Load address to jump to. */
bis $31, $31, $17 /* Pass a second argument of zero. */
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
- .end setjmp
+ END(_setjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd8dd50fb3b004876e1ebec7fad452a0e116ff2b
commit dd8dd50fb3b004876e1ebec7fad452a0e116ff2b
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:48:30 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S,
sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h,
sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S,
sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of
.end directive.
Tue May 28 10:46:04 1996 Richard Henderson <rth@tamu.edu>
* sysdeps/alpha/bb_init_func.S: Don't make `init' an external symbol.
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index cd860b8..dfa8c1d 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -41,10 +41,11 @@ ENTRY(__bb_init_func)
beq t0, init /* not initialized yet -> */
ret
- .end __bb_init_func
+END(__bb_init_func)
-
-LEAF(init, 0x38)
+.ent init
+init:
+ .frame sp, 0x38, ra, 0
subq sp, 0x38, sp
.prologue 0
@@ -84,4 +85,4 @@ leave: ldq pv, 0x30(sp)
addq sp, 0x38, sp
ret
- .end init
+.end init
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39573b269d2c3a60bdab8e64c866cf102c328d03
commit 39573b269d2c3a60bdab8e64c866cf102c328d03
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jun 2 18:48:18 1996 +0000
Wed May 29 00:57:37 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divrem.h: Include <sysdep.h> instead of <*/regdef.h>.
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/bsd-setjmp.S,
sysdeps/alpha/copysign.S, sysdeps/alpha/divrem.h,
sysdeps/alpha/fabs.S, sysdeps/alpha/ffs.S, sysdeps/alpha/htonl.S,
sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/llseek.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Use END macro instead of
.end directive.
diff --git a/sysdeps/alpha/divrem.h b/sysdeps/alpha/divrem.h
index ee7f64e..f296179 100644
--- a/sysdeps/alpha/divrem.h
+++ b/sysdeps/alpha/divrem.h
@@ -32,12 +32,12 @@ sequence, these expect their arguments in registers t10 and t11, and
return the result in t12 (aka pv). Registers AT and v0 may be
clobbered (assembly temporary), anything else must be saved. */
+#include <sysdep.h>
+
#ifdef __linux__
-# include <alpha/regdef.h>
# include <asm/gentrap.h>
# include <asm/pal.h>
#else
-# include <regdef.h>
# include <machine/pal.h>
#endif
@@ -185,4 +185,4 @@ divbyzero:
ldq arg1,0x00(sp)
br done
- .end FUNC_NAME
+ END(FUNC_NAME)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=284eb9ee9a4a44eb811e9692248e315fe73f551d
commit 284eb9ee9a4a44eb811e9692248e315fe73f551d
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 24 06:00:28 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/start.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S
index d1966a8..a7099f6 100644
--- a/sysdeps/unix/sysv/linux/alpha/start.S
+++ b/sysdeps/unix/sysv/linux/alpha/start.S
@@ -18,11 +18,16 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.comm errno, 4
+ .comm errno, 4
+#ifdef __ELF__
+ .type errno, @object
+#endif
.text
-ENTRY(__start)
+LEAF(__start, 16)
lda sp, -16(sp)
+ .prologue 0
+
stq zero, 8(sp) /* terminate frame chain */
br t0, 1f
@@ -33,8 +38,7 @@ ENTRY(__start)
ldgp gp, 0(ra)
/* clear out errno. */
- lda t0, errno
- stl zero, 0(t0)
+ stl zero, (errno)
ldl a0, 16(sp) /* get argc */
lda a1, 24(sp) /* get argv */
@@ -45,26 +49,32 @@ ENTRY(__start)
addq a2, 0x8, a2
stq a2, 0(t0)
-#ifndef HAVE_INITFINI
mov a0, s0
mov a1, s1
mov a2, s2
- jsr ra, __libc_init
+#ifdef HAVE_INITFINI
+ /* register the _fini sections to ensure destructors get run: */
+ lda a0, _fini
+ jsr ra, atexit
ldgp gp, 0(ra)
- mov s0, a0
- mov s1, a1
- mov s2, a2
+ /* Now run the _init section of the program itself. The _init
+ sections of shared libraries will be run by the dynamic linker. */
+ jsr ra, _init
+ ldgp gp, 0(ra)
/* initialize constructors: */
jsr ra, __main
ldgp gp, 0(ra)
+#else
+ jsr ra, __libc_init
+ ldgp gp, 0(ra)
+#endif
mov s0, a0
mov s1, a1
mov s2, a2
-#endif
jsr ra, main
ldgp gp, 0(ra)
@@ -90,4 +100,9 @@ ENTRY(__start)
__data_start:
.long 0
+#ifdef __ELF__
+ .size __data_start, 4
+ .type __data_start, @object
+#endif
+
weak_alias(__data_start, data_start)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccdaa27f97442822753099e30acfa714c942ee79
commit ccdaa27f97442822753099e30acfa714c942ee79
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 24 05:59:19 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
index 29cba8d..00c02de 100644
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -17,12 +17,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* sigsuspend is a special syscall since it needs to dereference the
-sigset. */
+ sigset. */
#include <sysdep.h>
.text
-ENTRY(sigsuspend)
+
+LEAF(sigsuspend, 0)
.prologue 0
ldq a0, 0(a0)
@@ -33,7 +34,6 @@ ENTRY(sigsuspend)
error: br gp, 1f
1: ldgp gp, 0(gp)
- lda pv, syscall_error
- jmp zero, (pv)
+ jmp zero, syscall_error
.end sigsuspend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4da911871d7f32de5a71dc7c9bba47ee7ec88590
commit 4da911871d7f32de5a71dc7c9bba47ee7ec88590
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 24 05:58:22 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/Makefile (headers): Add
alpha/ptrace.h.
* sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
index 9e12a0d..beb8441 100644
--- a/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -1,5 +1,5 @@
ifeq ($(subdir), misc)
-headers += alpha/regdef.h
+headers += alpha/ptrace.h alpha/regdef.h
sysdep_routines := $(sysdep_routines) \
ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=598022c144c1de42a41e7ba1fdf855dc31d1f5e6
commit 598022c144c1de42a41e7ba1fdf855dc31d1f5e6
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 24 05:55:29 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-_setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
index 9947d8f..16709df 100644
--- a/sysdeps/alpha/bsd-_setjmp.S
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY (setjmp)
- lda $27, __sigsetjmp /* Load address to jump to. */
- bis $31, $31, $17 /* Pass a second argument of zero. */
- jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ENTRY(setjmp)
+ lda $27, __sigsetjmp /* Load address to jump to. */
+ bis $31, $31, $17 /* Pass a second argument of zero. */
+ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
.end setjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49c79fe5c62d97dfd4ea2e0a4697264f68b48c39
commit 49c79fe5c62d97dfd4ea2e0a4697264f68b48c39
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:33:38 1996 +0000
.
diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S
deleted file mode 100644
index e69de29..0000000
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bccfffdbcb505b6c2965acee038cf0b73c49f6e4
commit bccfffdbcb505b6c2965acee038cf0b73c49f6e4
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:33:05 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
Wed Mar 27 10:26:21 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/setjmp.S: Must establish global pointer before
address of __sigsetjmp_aux can be loaded.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 04b8068..b165d2c 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -22,9 +22,12 @@ Cambridge, MA 02139, USA. */
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
ENTRY (__sigsetjmp)
- ldgp $29, 0($27)
- lda $27, __sigsetjmp_aux/* Load address to jump to. */
- bis $30, $30, $18 /* Pass SP as 3rd arg. */
- bis $15, $15, $19 /* Pass FP as 4th arg. */
- jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
+ ldgp $29, 0($27)
+ .prologue 1
+
+ lda $27, __sigsetjmp_aux /* Load address to jump to. */
+ bis $30, $30, $18 /* Pass SP as 3rd arg. */
+ bis $15, $15, $19 /* Pass FP as 4th arg. */
+ jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
+
.end __sigsetjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ecceadd7a6d211bf0b65f38f6b7fe83def788f3
commit 1ecceadd7a6d211bf0b65f38f6b7fe83def788f3
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:58 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/speed.c (speeds): Add entry for
460800 baud.
diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c
index b61cfbb..40bf6c5 100644
--- a/sysdeps/unix/sysv/linux/alpha/speed.c
+++ b/sysdeps/unix/sysv/linux/alpha/speed.c
@@ -42,6 +42,7 @@ static const speed_t speeds[] =
57600,
115200,
230400,
+ 460800,
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9dbc75c78c145cafc79e6b94b3227c3eab08db9
commit a9dbc75c78c145cafc79e6b94b3227c3eab08db9
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:55 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/__math.h (cabs): Remove underscores from struct
__cabs_complex member names in call to __hypot().
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 9aea9d7..50d8ac3 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -46,7 +46,7 @@ extern __inline double
cabs (struct __cabs_complex __z)
{
extern double __hypot (double, double);
- return __hypot(__z.__x, __z.__y);
+ return __hypot(__z.x, __z.y);
}
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94765f9edc4f1007142c4f873f193121a54e7bb7
commit 94765f9edc4f1007142c4f873f193121a54e7bb7
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:48 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S,
sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S, sysdeps/alpha/remlu.S,
sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Include divrem.h instead
of divrem.S.
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 7dbb504..6990665 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -3,4 +3,4 @@
#define SIGNED 1
#define FUNC_NAME __divl
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S
index 9cc71da..ee96c95 100644
--- a/sysdeps/alpha/divlu.S
+++ b/sysdeps/alpha/divlu.S
@@ -3,4 +3,4 @@
#define SIGNED 0
#define FUNC_NAME __divlu
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index f7af8d6..bde3425 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -3,4 +3,4 @@
#define SIGNED 1
#define FUNC_NAME __divq
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index faf2932..72dcf97 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -3,4 +3,4 @@
#define SIGNED 0
#define FUNC_NAME __divqu
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index cede136..b631a02 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -3,4 +3,4 @@
#define SIGNED 1
#define FUNC_NAME __reml
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S
index 3658d92..8d527e4 100644
--- a/sysdeps/alpha/remlu.S
+++ b/sysdeps/alpha/remlu.S
@@ -3,4 +3,4 @@
#define SIGNED 0
#define FUNC_NAME __remlu
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index 61f2067..8bd9f33 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -3,4 +3,4 @@
#define SIGNED 1
#define FUNC_NAME __remq
-#include "divrem.S"
+#include "divrem.h"
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index e22d5ac..14a7486 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -3,4 +3,4 @@
#define SIGNED 0
#define FUNC_NAME __remqu
-#include "divrem.S"
+#include "divrem.h"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e6abf6bbce83c1242ea1184d63424025b908b14
commit 0e6abf6bbce83c1242ea1184d63424025b908b14
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:39 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/profil-counter.h: File removed.
diff --git a/sysdeps/unix/sysv/linux/alpha/profil-counter.h b/sysdeps/unix/sysv/linux/alpha/profil-counter.h
deleted file mode 100644
index 6ab5a88..0000000
--- a/sysdeps/unix/sysv/linux/alpha/profil-counter.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Low-level statistical profiling support function. Mostly POSIX.1 version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-Contributed by David Mosberger <davidm@azstarnet.com>
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <asm/sigcontext.h>
-
-void
-profil_counter (int signal, long a1, long a2, long a3, long a4, long a5,
- struct sigcontext_struct sc)
-{
- profil_count((void *) sc.sc_pc);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65e888acf5295693aa9150eeaae605b8d4a17a14
commit 65e888acf5295693aa9150eeaae605b8d4a17a14
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:30 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/llseek.S: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S
new file mode 100644
index 0000000..7f2a491
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/llseek.S
@@ -0,0 +1,49 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* For compatibility only: a "long" is 64 bits on the Alpha, so
+ llseek() isn't really needed. But there are some programs out
+ there who may depend on it being around.
+*/
+
+#include <sysdep.h>
+
+ .text
+ENTRY(llseek)
+ .prologue 0
+
+ mov a3, t0 /* save result address */
+
+ sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */
+ zap a2, 0xf0, a2
+ bis a2, a1, a1
+
+ mov a4, a2 /* shift down whence */
+
+ ldi v0, __NR_lseek
+ call_pal PAL_callsys
+ bne a3, error
+
+ stq v0, 0(t0)
+ ret
+
+error: br gp, 1f
+1: ldgp gp, 0(gp)
+ jmp zero, syscall_error
+
+ .end llseek
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=15999cfb4c6927d99def37f41ed26cecfb1d2663
commit 15999cfb4c6927d99def37f41ed26cecfb1d2663
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:27 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/ioperm.c: Modify to support
dynamic recognition of platform type.
(_bus_base): New function.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
index 306c86b..b9630a8 100644
--- a/sysdeps/unix/sysv/linux/alpha/ioperm.c
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -35,31 +35,35 @@ I/O address space that's 512MB large!). */
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <unistd.h>
+#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
-#include <asm/io.h>
#include <asm/page.h>
#include <asm/system.h>
-#undef inb
-#undef inw
-#undef inl
-#undef outb
-#undef outw
-#undef outl
-
-#define PATH_CPUINFO "/proc/cpuinfo"
+#define PATH_ALPHA_SYSTYPE "/etc/alpha_systype"
+#define PATH_CPUINFO "/proc/cpuinfo"
#define MAX_PORT 0x10000
#define vuip volatile unsigned int *
-#define JENSEN_IO_BASE (IDENT_ADDR + 0x0300000000UL)
-#define APECS_IO_BASE (IDENT_ADDR + 0x01c0000000UL)
-#define ALCOR_IO_BASE (IDENT_ADDR + 0x8580000000UL)
+#define JENSEN_IO_BASE (0xfffffc0300000000UL)
+#define JENSEN_MEM (0xfffffc0200000000UL) /* sparse!! */
+
+/*
+ * With respect to the I/O architecture, APECS and LCA are identical,
+ * so the following defines apply to LCA as well.
+ */
+#define APECS_IO_BASE (0xfffffc01c0000000UL)
+#define APECS_DENSE_MEM (0xfffffc0300000000UL)
+
+#define ALCOR_IO_BASE (0xfffffc8580000000UL)
+#define ALCOR_DENSE_MEM (0xfffffc8600000000UL)
+
enum {
IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2
@@ -78,58 +82,75 @@ struct ioswtch {
static struct platform {
const char *name;
int io_sys;
+ unsigned long bus_memory_base;
} platform[] = {
- {"Alcor", IOSYS_ALCOR},
- {"Avanti", IOSYS_APECS},
- {"Cabriolet", IOSYS_APECS},
- {"EB64+", IOSYS_APECS},
- {"EB66", IOSYS_APECS},
- {"EB66P", IOSYS_APECS},
- {"Jensen", IOSYS_JENSEN},
- {"Mustang", IOSYS_APECS},
- {"Noname", IOSYS_APECS},
+ {"Alcor", IOSYS_ALCOR, ALCOR_DENSE_MEM},
+ {"Avanti", IOSYS_APECS, APECS_DENSE_MEM},
+ {"Cabriolet", IOSYS_APECS, APECS_DENSE_MEM},
+ {"EB164", IOSYS_ALCOR, ALCOR_DENSE_MEM},
+ {"EB64+", IOSYS_APECS, APECS_DENSE_MEM},
+ {"EB66", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
+ {"EB66P", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
+ {"Jensen", IOSYS_JENSEN, JENSEN_MEM},
+ {"Mustang", IOSYS_APECS, APECS_DENSE_MEM},
+ {"Noname", IOSYS_APECS, APECS_DENSE_MEM}, /* LCA same as APECS */
};
static struct {
- struct hae hae;
+ struct hae {
+ unsigned long cache;
+ unsigned long * reg;
+ } hae;
unsigned long base;
struct ioswtch * swp;
int sys;
} io;
+static unsigned long bus_memory_base = -1;
+
+extern void __sethae (unsigned long); /* we can't use asm/io.h */
+
static inline unsigned long
port_to_cpu_addr (unsigned long port, int iosys, int size)
{
- if (iosys == IOSYS_JENSEN) {
- return (port << 7) + ((size - 1) << 4) + io.base;
- } else {
- return (port << 5) + ((size - 1) << 3) + io.base;
- }
+ if (iosys == IOSYS_JENSEN)
+ {
+ return (port << 7) + ((size - 1) << 4) + io.base;
+ }
+ else
+ {
+ return (port << 5) + ((size - 1) << 3) + io.base;
+ }
}
static inline void
inline_sethae (unsigned long addr, int iosys)
{
- if (iosys == IOSYS_JENSEN) {
- /* hae on the Jensen is bits 31:25 shifted right */
- addr >>= 25;
- if (addr != io.hae.cache) {
- __sethae (addr);
- io.hae.cache = addr;
+ if (iosys == IOSYS_JENSEN)
+ {
+ /* hae on the Jensen is bits 31:25 shifted right */
+ addr >>= 25;
+ if (addr != io.hae.cache)
+ {
+ __sethae (addr);
+ io.hae.cache = addr;
+ }
}
- } else {
- unsigned long msb;
-
- /* no need to set hae if msb is 0: */
- msb = addr & 0xf8000000;
- if (msb && msb != io.hae.cache) {
- __sethae (msb);
- io.hae.cache = msb;
+ else
+ {
+ unsigned long msb;
+
+ /* no need to set hae if msb is 0: */
+ msb = addr & 0xf8000000;
+ if (msb && msb != io.hae.cache)
+ {
+ __sethae (msb);
+ io.hae.cache = msb;
+ }
}
- }
}
@@ -263,22 +284,56 @@ struct ioswtch ioswtch[] = {
};
+/*
+ * Initialize I/O system. To determine what I/O system we're dealing
+ * with, we first try to read the value of symlink PATH_ALPHA_SYSTYPE,
+ * if that fails, we lookup the "system type" field in /proc/cpuinfo.
+ * If that fails as well, we give up.
+ */
static int
init_iosys (void)
{
- char name[256], value[256];
- FILE * fp;
- int i;
+ char systype[256];
+ int i, n;
- fp = fopen (PATH_CPUINFO, "r");
- if (!fp)
- return -1;
+ n = readlink(PATH_ALPHA_SYSTYPE, systype, sizeof(systype) - 1);
+ if (n > 0)
+ {
+ systype[n] = '\0';
+ }
+ else
+ {
+ char name[256];
+ FILE * fp;
+
+ fp = fopen (PATH_CPUINFO, "r");
+ if (!fp)
+ return -1;
+ while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF)
+ {
+ if (n == 2 && strncmp (name, "system type", 11) == 0) {
+ break;
+ }
+ }
+ fclose(fp);
+
+ if (n == EOF)
+ {
+ /* this can happen if the format of /proc/cpuinfo changes... */
+ fprintf(stderr,
+ "ioperm.init_iosys(): Unable to determine system type.\n"
+ "\t(May need " PATH_ALPHA_SYSTYPE " symlink?)\n");
+ errno = ENODEV;
+ return -1;
+ }
+ }
- while (fscanf (fp, "%256[^:]: %256[^\n]\n", name, value) == 2) {
- if (strncmp (name, "system type", 11) == 0) {
- for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) {
- if (strcmp (platform[i].name, value) == 0) {
- fclose (fp);
+ /* translate systype name into i/o system: */
+ for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i)
+ {
+ if (strcmp (platform[i].name, systype) == 0)
+ {
+ bus_memory_base = platform[i].bus_memory_base;
io.sys = platform[i].io_sys;
if (io.sys == IOSYS_JENSEN)
io.swp = &ioswtch[0];
@@ -286,11 +341,10 @@ init_iosys (void)
io.swp = &ioswtch[1];
return 0;
}
- }
}
- }
- fclose (fp);
- errno = ENODEV;
+
+ /* systype is not a know platform name... */
+ errno = EINVAL;
return -1;
}
@@ -305,49 +359,55 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
return -1;
/* this test isn't as silly as it may look like; consider overflows! */
- if (from >= MAX_PORT || from + num > MAX_PORT) {
- errno = EINVAL;
- return -1;
- }
+ if (from >= MAX_PORT || from + num > MAX_PORT)
+ {
+ errno = EINVAL;
+ return -1;
+ }
- if (turn_on) {
- if (!io.base) {
- unsigned long base;
- int fd;
-
- io.hae.reg = 0; /* not used in user-level */
- io.hae.cache = 0;
- __sethae (io.hae.cache); /* synchronize with hw */
-
- fd = open ("/dev/mem", O_RDWR);
- if (fd < 0)
- return fd;
-
- switch (io.sys) {
- case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
- case IOSYS_APECS: base = APECS_IO_BASE; break;
- case IOSYS_ALCOR: base = ALCOR_IO_BASE; break;
- default:
- errno = ENODEV;
- return -1;
- }
- addr = port_to_cpu_addr (from, io.sys, 1);
- addr &= PAGE_MASK;
- len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
- io.base =
- (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base);
- close (fd);
- if ((long) io.base == -1)
- return -1;
+ if (turn_on)
+ {
+ if (!io.base)
+ {
+ unsigned long base;
+ int fd;
+
+ io.hae.reg = 0; /* not used in user-level */
+ io.hae.cache = 0;
+ __sethae (io.hae.cache); /* synchronize with hw */
+
+ fd = open ("/dev/mem", O_RDWR);
+ if (fd < 0)
+ return fd;
+
+ switch (io.sys)
+ {
+ case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
+ case IOSYS_APECS: base = APECS_IO_BASE; break;
+ case IOSYS_ALCOR: base = ALCOR_IO_BASE; break;
+ default:
+ errno = ENODEV;
+ return -1;
+ }
+ addr = port_to_cpu_addr (from, io.sys, 1);
+ addr &= PAGE_MASK;
+ len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
+ io.base =
+ (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base);
+ close (fd);
+ if ((long) io.base == -1)
+ return -1;
+ }
+ prot = PROT_READ | PROT_WRITE;
}
- prot = PROT_READ | PROT_WRITE;
- } else {
- if (!io.base)
- return 0; /* never was turned on... */
+ else
+ {
+ if (!io.base)
+ return 0; /* never was turned on... */
- /* turnoff access to relevant pages: */
- prot = PROT_NONE;
- }
+ /* turnoff access to relevant pages: */
+ prot = PROT_NONE;
+ }
addr = port_to_cpu_addr (from, io.sys, 1);
addr &= PAGE_MASK;
len = port_to_cpu_addr (from + num, io.sys, 1) - addr;
@@ -358,13 +418,15 @@ _ioperm (unsigned long from, unsigned long num, int turn_on)
int
_iopl (unsigned int level)
{
- if (level > 3) {
+ if (level > 3)
+ {
errno = EINVAL;
return -1;
- }
- if (level) {
+ }
+ if (level)
+ {
return _ioperm (0, MAX_PORT, 1);
- }
+ }
return 0;
}
@@ -430,6 +492,14 @@ _inl (unsigned long port)
}
+unsigned long
+_bus_base(void)
+{
+ if (!io.swp && init_iosys () < 0)
+ return -1;
+ return bus_memory_base;
+}
+
weak_alias (_sethae, sethae);
weak_alias (_ioperm, ioperm);
weak_alias (_iopl, iopl);
@@ -439,3 +509,4 @@ weak_alias (_inl, inl);
weak_alias (_outb, outb);
weak_alias (_outw, outw);
weak_alias (_outl, outl);
+weak_alias (_bus_base, bus_base);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9264c4f76ab5e67a6bdf6d218462b60401fb4dd
commit d9264c4f76ab5e67a6bdf6d218462b60401fb4dd
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:24 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/Makefile (headers): Add
alpha/ptrace.h.
* sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h b/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h
new file mode 100644
index 0000000..57b96d6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/alpha/ptrace.h
@@ -0,0 +1,18 @@
+#ifndef __alpha_ptrace_h__
+#define __alpha_ptrace_h__
+
+/*
+ * Mostly for OSF/1 compatibility.
+ */
+
+#define REG_BASE 0
+#define NGP_REGS 32
+#define NFP_REGS 32
+
+#define GPR_BASE REG_BASE
+#define FPR_BASE (GPR_BASE+NGP_REGS)
+#define PC (FPR_BASE+NFP_REGS)
+#define SPR_PS (PC+1)
+#define NPTRC_REGS (SPR_PS+1)
+
+#endif /* __alpha_ptrace_h__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2810021b9b52f758594243a85826ee863048c0a0
commit 2810021b9b52f758594243a85826ee863048c0a0
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:21 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divrem.h: Renamed from sysdeps/alpha/divrem.S to avoid
name collision with math library.
diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S
index e6293bf..e69de29 100644
--- a/sysdeps/alpha/divrem.S
+++ b/sysdeps/alpha/divrem.S
@@ -1,169 +0,0 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
- Contributed by David Mosberger (davidm@cs.arizona.edu).
-
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* The current Alpha chips don't provide hardware for integer
-division. The C compiler expects the functions
-
- __divqu: 64-bit unsigned long divide
- __remqu: 64-bit unsigned long remainder
- __divqs/__remqs: signed 64-bit
- __divlu/__remlu: unsigned 32-bit
- __divls/__remls: signed 32-bit
-
-These are not normal C functions: instead of the normal calling
-sequence, these expect their arguments in registers t10 and t11, and
-return the result in t12 (aka pv). Registers AT and v0 may be
-clobbered (assembly temporary), anything else must be saved. */
-
-#ifdef __linux__
-# include <alpha/regdef.h>
-# include <asm/gentrap.h>
-# include <asm/pal.h>
-#else
-# include <regdef.h>
-# include <machine/pal.h>
-#endif
-
-#ifdef DEBUG
-# define arg1 a0
-# define arg2 a1
-# define result v0
-# define mask t0
-# define tmp0 t1
-# define tmp1 t2
-# define sign t3
-# define retaddr ra
-#else
-# define arg1 t10
-# define arg2 t11
-# define result t12
-# define mask v0
-# define tmp0 t0
-# define tmp1 t1
-# define sign t2
-# define retaddr t9
-#endif
-
-# define divisor arg2
-#if IS_REM
-# define dividend result
-# define quotient arg1
-# define GETDIVIDEND bis arg1,zero,dividend
-#else
-# define dividend arg1
-# define quotient result
-# define GETDIVIDEND
-#endif
-
-#if SIZE == 8
-# define LONGIFYarg1 GETDIVIDEND
-# define LONGIFYarg2
-#else
-# if SIGNED
-# define LONGIFYarg1 addl arg1,zero,dividend
-# define LONGIFYarg2 addl arg2,zero,divisor
-# else
-# define LONGIFYarg1 zapnot arg1,0x0f,dividend
-# define LONGIFYarg2 zapnot arg2,0x0f,divisor
-# endif
-#endif
-
-#if SIGNED
-# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg
-# if IS_REM
-# define GETSIGN(x,y,s) bis x,zero,s
-# else
-# define GETSIGN(x,y,s) xor x,y,s
-# endif
-#else
-# define SETSIGN(sign,reg,tmp)
-# define GETSIGN(x,y,s)
-#endif
-
- .set noreorder
- .set noat
-
- .ent FUNC_NAME
- .globl FUNC_NAME
-
- .align 5
-FUNC_NAME:
-# define FRAME_SIZE 0x30
- .frame sp,FRAME_SIZE,ra,0
- lda sp,-FRAME_SIZE(sp)
- .prologue 1
- stq arg1,0x00(sp)
- LONGIFYarg1
- stq arg2,0x08(sp)
- LONGIFYarg2
- stq mask,0x10(sp)
- bis zero,1,mask
- stq tmp0,0x18(sp)
- bis zero,zero,quotient
- stq tmp1,0x20(sp)
- beq divisor,divbyzero
- stq sign,0x28(sp)
- GETSIGN(dividend,divisor,sign)
-#if SIGNED
- subq zero,dividend,tmp0
- subq zero,divisor,tmp1
- cmovlt dividend,tmp0,dividend
- cmovlt divisor,tmp1,divisor
-#endif
- /*
- * Shift divisor left until either bit 63 is set or until it
- * is at least as big as the dividend:
- */
- .align 3
-1: cmpule dividend,divisor,AT
- blt divisor,2f
- blbs AT,2f
- addq mask,mask,mask
- addq divisor,divisor,divisor
- br 1b
-
- .align 3
-2: addq mask,quotient,tmp0
- cmpule divisor,dividend,AT
- subq dividend,divisor,tmp1
- srl divisor,1,divisor
- srl mask,1,mask
- cmovlbs AT,tmp0,quotient
- cmovlbs AT,tmp1,dividend
- bne mask,2b
-
- ldq arg1,0x00(sp)
- SETSIGN(sign,result,tmp0)
-done: ldq arg2,0x08(sp)
- ldq mask,0x10(sp)
- ldq tmp0,0x18(sp)
- ldq tmp1,0x20(sp)
- ldq sign,0x28(sp)
- lda sp,FRAME_SIZE(sp)
- ret zero,(retaddr),0
-
-divbyzero:
- lda a0,GEN_INTDIV(zero)
- call_pal PAL_gentrap
- bis zero,zero,result /* if trap returns, return 0 */
- ldq arg1,0x00(sp)
- br done
-
- .end FUNC_NAME
diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.h
similarity index 92%
copy from sysdeps/alpha/divrem.S
copy to sysdeps/alpha/divrem.h
index e6293bf..ee7f64e 100644
--- a/sysdeps/alpha/divrem.S
+++ b/sysdeps/alpha/divrem.h
@@ -103,10 +103,29 @@ clobbered (assembly temporary), anything else must be saved. */
.ent FUNC_NAME
.globl FUNC_NAME
+#define FRAME_SIZE 0x30
+
.align 5
FUNC_NAME:
-# define FRAME_SIZE 0x30
- .frame sp,FRAME_SIZE,ra,0
+#ifdef PROF
+ lda sp, -0x18(sp)
+ stq ra, 0x00(sp)
+ stq pv, 0x08(sp)
+ stq gp, 0x10(sp)
+
+ br AT, 1f
+1: ldgp gp, 0(AT)
+ lda AT, _mcount
+
+ mov retaddr, ra
+ jsr AT, (AT), _mcount
+
+ ldq ra, 0x00(sp)
+ ldq pv, 0x08(sp)
+ ldq gp, 0x10(sp)
+ lda sp, 0x18(sp)
+#endif
+ .frame sp, FRAME_SIZE, ra, 0
lda sp,-FRAME_SIZE(sp)
.prologue 1
stq arg1,0x00(sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a391dca8fa3fc0533c98396ebbf232d21138befa
commit a391dca8fa3fc0533c98396ebbf232d21138befa
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:18 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/copysign.S, sysdeps/alpha/fabs.S: New files.
diff --git a/sysdeps/alpha/copysign.S b/sysdeps/alpha/copysign.S
new file mode 100644
index 0000000..9e9dff3
--- /dev/null
+++ b/sysdeps/alpha/copysign.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by David Mosberger <davidm@azstarnet.com>
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY(__copysign)
+ .prologue 0
+ cpys $f17,$f16,$f0
+ ret
+
+ .end __copysign
+
+weak_alias(__copysign, copysign)
diff --git a/sysdeps/alpha/fabs.S b/sysdeps/alpha/fabs.S
new file mode 100644
index 0000000..88e64b4
--- /dev/null
+++ b/sysdeps/alpha/fabs.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by David Mosberger <davidm@azstarnet.com>
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY(fabs)
+ .prologue 0
+ cpys $f31,$f16,$f0
+ ret
+
+ .end fabs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92172913d2bb19dfff219983899f03bc604c706e
commit 92172913d2bb19dfff219983899f03bc604c706e
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:14 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h: Include regdef.h. Define LEAF macro
to simplify declaration of leaf functions.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
index 9eb9032..8a52f20 100644
--- a/sysdeps/unix/alpha/sysdep.h
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -20,20 +20,42 @@ Cambridge, MA 02139, USA. */
#ifdef ASSEMBLER
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+# include <regdef.h>
+#endif
+
+#ifdef __STDC__
+#define LEAF(name, framesize) \
+ .globl name; \
+ .align 3; \
+ .ent name, 0; \
+ name##: \
+ .frame sp, framesize, ra
+#else
+#define LEAF(name, framesize) \
+ .globl name; \
+ .align 3; \
+ .ent name, 0; \
+ name/**/: \
+ .frame sp, framesize, ra
+#endif
+
#ifdef __STDC__
#define ENTRY(name) \
.globl name; \
.align 3; \
- .ent name,0; \
+ .ent name, 0; \
name##: \
- .frame sp,0,ra
+ .frame sp, 0, ra
#else
#define ENTRY(name) \
.globl name; \
.align 3; \
- .ent name,0; \
+ .ent name, 0; \
name/**/: \
- .frame sp,0,ra
+ .frame sp, 0, ra
#endif
/* Note that while it's better structurally, going back to set errno
@@ -45,17 +67,16 @@ Cambridge, MA 02139, USA. */
.align 3; \
.ent name,0; \
\
-1: br gp,2f; \
-2: ldgp gp,0(gp); \
- lda pv,syscall_error; \
- jmp zero,(pv); \
+1: br gp, 2f; \
+2: ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
\
name##: \
- ldi v0,SYS_ify(syscall_name); \
+ ldi v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
.set at; \
- bne a3,1b; \
+ bne a3, 1b; \
3:
#else
#define PSEUDO(name, syscall_name, args) \
@@ -63,17 +84,16 @@ name##: \
.align 3; \
.ent name,0; \
\
-1: br gp,2f; \
-2: ldgp gp,0(gp); \
- lda pv,syscall_error; \
- jmp zero,(pv); \
+1: br gp, 2f; \
+2: ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
\
name/**/: \
- ldi v0,SYS_ify(syscall_name); \
+ ldi v0, SYS_ify(syscall_name); \
.set noat; \
call_pal PAL_callsys; \
.set at; \
- bne a3,1b; \
+ bne a3, 1b; \
3:
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=24c177a07995adcb0057ad3504ef997a246ee3a1
commit 24c177a07995adcb0057ad3504ef997a246ee3a1
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:32:12 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/_mcount.S, sysdeps/alpha/bb_init_func.S,
sysdeps/alpha/bsd-setjmp.S, sysdeps/alpha/ffs.S,
sysdeps/alpha/htonl.S, sysdeps/alpha/htons.S, sysdeps/alpha/memchr.S,
sysdeps/alpha/setjmp.S, sysdeps/alpha/strlen.S,
sysdeps/alpha/udiv_qrnnd.S, sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/sigsuspend.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/sysdep.S: Remove include of regdef.h.
sysdep.h includes it now. Replace ENTRY by LEAF with appropriate
framesize declaration. Replace "lda pv,sym/jsr pv" by "jsr sym".
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
index 2d6e2ed..7944544 100644
--- a/sysdeps/alpha/_mcount.S
+++ b/sysdeps/alpha/_mcount.S
@@ -34,18 +34,15 @@ holds the return address of the function's caller (selfpc and frompc,
respectively in gmon.c language...). */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-# include <regdef.h>
-#endif
#undef ret /* discard `ret' as defined in sysdep.h */
.set noat
.set noreorder
-ENTRY(_mcount)
+LEAF(_mcount, 0xb0)
+ .prologue 0
+
subq sp, 0xb0, sp
stq a0, 0x00(sp)
mov ra, a0 # a0 = caller-pc
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
index 9bf985c..cd860b8 100644
--- a/sysdeps/alpha/bb_init_func.S
+++ b/sysdeps/alpha/bb_init_func.S
@@ -24,11 +24,6 @@ caller-saved (call-used) registers (except for argument registers
a1-a5). */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-# include <regdef.h>
-#endif
/*
* These offsets should match with "struct bb" declared in gcc/libgcc2.c.
@@ -40,12 +35,19 @@ a1-a5). */
.set noreorder
ENTRY(__bb_init_func)
+ .prologue 0
+
ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */
beq t0, init /* not initialized yet -> */
ret
+
+ .end __bb_init_func
+
+LEAF(init, 0x38)
+ subq sp, 0x38, sp
+ .prologue 0
-init: subq sp, 0x38, sp
stq pv, 0x30(sp)
br pv, 1f
1: ldgp gp, 0(pv)
@@ -81,5 +83,5 @@ init: subq sp, 0x38, sp
leave: ldq pv, 0x30(sp)
addq sp, 0x38, sp
ret
-
- .end __bb_init_func
+
+ .end init
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index 470f7bc..113bc47 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -23,8 +23,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY (setjmp)
- lda $27, __sigsetjmp /* Load address to jump to. */
- bis $31, 1, $17 /* Pass a second argument of one. */
- jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ENTRY(setjmp)
+ lda $27, __sigsetjmp /* Load address to jump to. */
+ bis $31, 1, $17 /* Pass a second argument of one. */
+ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
.end setjmp
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
index 7676b85..7cf6281 100644
--- a/sysdeps/alpha/ffs.S
+++ b/sysdeps/alpha/ffs.S
@@ -22,11 +22,6 @@ Cambridge, MA 02139, USA. */
architecture. */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-#include <regdef.h>
-#endif
.set noreorder
.set noat
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
index d0bf7e1..8c1c700 100644
--- a/sysdeps/alpha/htonl.S
+++ b/sysdeps/alpha/htonl.S
@@ -17,22 +17,18 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-#include <regdef.h>
-#endif
ENTRY(__htonl)
- extlh a0,5,t1 # t1 = dd000000
- zap a0,0xfd,t2 # t2 = 0000cc00
- sll t2,5,t2 # t2 = 00198000
- s8addl t2,t1,t1 # t1 = ddcc0000
- zap a0,0xfb,t2 # t2 = 00bb0000
- srl t2,8,t2 # t2 = 0000bb00
- extbl a0,3,v0 # v0 = 000000aa
- or t1,v0,v0 # v0 = ddcc00aa
- or t2,v0,v0 # v0 = ddccbbaa
+ .prologue 0
+ extlh a0, 5, t1 # t1 = dd000000
+ zap a0, 0xfd, t2 # t2 = 0000cc00
+ sll t2, 5, t2 # t2 = 00198000
+ s8addl t2, t1, t1 # t1 = ddcc0000
+ zap a0, 0xfb, t2 # t2 = 00bb0000
+ srl t2, 8, t2 # t2 = 0000bb00
+ extbl a0, 3, v0 # v0 = 000000aa
+ or t1, v0, v0 # v0 = ddcc00aa
+ or t2, v0, v0 # v0 = ddccbbaa
ret
.end __htonl
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
index 6e18c7c..cb22b21 100644
--- a/sysdeps/alpha/htons.S
+++ b/sysdeps/alpha/htons.S
@@ -17,16 +17,12 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-#include <regdef.h>
-#endif
ENTRY(__htons)
- extwh a0,7,t1 # t1 = bb00
- extbl a0,1,v0 # v0 = 00aa
- bis v0,t1,v0 # v0 = bbaa
+ .prologue 0
+ extwh a0, 7, t1 # t1 = bb00
+ extbl a0, 1, v0 # v0 = 00aa
+ bis v0, t1, v0 # v0 = bbaa
ret
.end __htons
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
index 118a1f1..2f78697 100644
--- a/sysdeps/alpha/memchr.S
+++ b/sysdeps/alpha/memchr.S
@@ -35,16 +35,13 @@ For correctness consider that:
*/
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-#include <regdef.h>
-#endif
.set noreorder
.set noat
ENTRY(memchr)
+ .prologue 0
+
beq a2, not_found
ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
addq a0, a2, t4
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
index 7e6a61b..c641261 100644
--- a/sysdeps/alpha/strlen.S
+++ b/sysdeps/alpha/strlen.S
@@ -29,11 +29,6 @@ architecture:
binary search needs). */
#include <sysdep.h>
-#ifdef __linux__
-# include <alpha/regdef.h>
-#else
-#include <regdef.h>
-#endif
.set noreorder
.set noat
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index d3d2cee..eb134f2 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -19,15 +19,15 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
+#include <sysdep.h>
.set noreorder
.set noat
-.text
- .align 3
- .globl __udiv_qrnnd
- .ent __udiv_qrnnd
-__udiv_qrnnd:
- .frame $30,0,$26,0
+
+ .text
+
+LEAF(__udiv_qrnnd, 0)
+
.prologue 0
#define cnt $2
#define tmp $3
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
index afd2e32..4582539 100644
--- a/sysdeps/unix/sysv/linux/alpha/brk.S
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -36,24 +36,23 @@ __curbrk:
.quad _end
.text
-ENTRY(__brk)
+LEAF(__brk, 0)
ldgp gp, 0(t12)
.prologue 1
ldi v0, __NR_brk
call_pal PAL_callsys
subq a0, v0, t0
- bne t0, error
+ bne t0, error
/* Update __curbrk and return cleanly. */
- stl a0, __curbrk
- mov zero, v0
+ stl a0, __curbrk
+ mov zero, v0
ret
/* What a horrible way to die. */
error: ldi v0, ENOMEM
- lda pv, syscall_error
- jmp zero,(pv)
+ jmp zero, syscall_error
.end __brk
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index 4c86e39..c3486ac 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -21,9 +21,10 @@ Cambridge, MA 02139, USA. */
#define GSI_IEEE_FP_CONTROL 45
.text
-ENTRY(__ieee_get_fp_control)
+
+LEAF(__ieee_get_fp_control, 8)
lda sp, -8(sp)
- .prologue 1
+ .prologue 0
mov sp, a1
ldi a0, GSI_IEEE_FP_CONTROL
@@ -36,8 +37,9 @@ ENTRY(__ieee_get_fp_control)
ret
error: lda sp, 8(sp)
- lda pv, syscall_error
- jmp zero,(pv)
+ br gp, 1f
+1: ldgp gp, 0(gp)
+ jmp zero, syscall_error
.end __ieee_get_fp_control
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index d10e9bc..507b5d5 100644
--- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -20,10 +20,9 @@ Cambridge, MA 02139, USA. */
#define SSI_IEEE_FP_CONTROL 14
- .text
-ENTRY(__ieee_set_fp_control)
+LEAF(__ieee_set_fp_control, 8)
lda sp, -8(sp)
- .prologue 1
+ .prologue 0
stq a0, 0(sp)
mov sp, a1
@@ -36,8 +35,9 @@ ENTRY(__ieee_set_fp_control)
bne a3, error
ret
-error: lda pv, syscall_error
- jmp zero,(pv)
+error: br gp, 1f
+1: ldgp gp, 0(gp)
+ jmp zero, syscall_error
.end __ieee_set_fp_control
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
index f613b08..4095846 100644
--- a/sysdeps/unix/sysv/linux/alpha/pipe.S
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
.text
-ENTRY(__pipe)
+LEAF(__pipe, 0)
.prologue 0
ldi v0, __NR_pipe
@@ -35,8 +35,7 @@ ENTRY(__pipe)
error: br gp, 1f
1: ldgp gp, 0(gp)
- lda pv, syscall_error
- jmp zero, (pv)
+ jmp zero, syscall_error
.end __pipe
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
index 54a8484..c80a523 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -41,21 +41,20 @@ Cambridge, MA 02139, USA. */
*/
-1: br gp,2f
-2: ldgp gp,0(gp)
- jmp zero,syscall_error
-
-
-ENTRY (__syscall)
- bis a0,a0,v0 # Syscall number -> v0
- bis a1,a1,a0 # arg1-arg5 -> a0-a4
- bis a2,a2,a1
- bis a3,a3,a2
- bis a4,a4,a3
- bis a5,a5,a4
+LEAF(__syscall, 0)
+ bis a0, a0, v0 # Syscall number -> v0
+ bis a1, a1, a0 # arg1-arg5 -> a0-a4
+ bis a2, a2, a1
+ bis a3, a3, a2
+ bis a4, a4, a3
+ bis a5, a5, a4
call_pal PAL_callsys # Invoke system call
- bne a3,1b
+ bne a3, error
ret
+error: br gp, 2f
+2: ldgp gp, 0(gp)
+ jmp zero, syscall_error
+
weak_alias(__syscall, syscall)
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S
index 74b153e..84582f4 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.S
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.S
@@ -20,11 +20,12 @@ Cambridge, MA 02139, USA. */
#define _ERRNO_H
#include <errnos.h>
-ENTRY(syscall_error)
+LEAF(syscall_error, 0)
+ .prologue 1
+
/* Store return value in errno... */
ldgp gp, 0(t12)
- lda t0, errno
- stl v0, 0(t0)
+ stl v0, errno
/* And just kick back a -1. */
ldi v0, -1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d964e721335343c50ee2dbe3f146c328de1e39cf
commit d964e721335343c50ee2dbe3f146c328de1e39cf
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:31:53 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.h (NO_UNDERSCORES): Don't
define.
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index febfa3a..627b37e 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -17,9 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* In the Linux ELF and ECOFF worlds, C symbols are asm symbols. */
-#define NO_UNDERSCORES
-
#ifdef ASSEMBLER
#include <asm/pal.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dbf23c0a2f3be5666d4347e06ec60a4412edaff7
commit dbf23c0a2f3be5666d4347e06ec60a4412edaff7
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:31:50 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/statbuf.h: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/statbuf.h b/sysdeps/unix/sysv/linux/alpha/statbuf.h
new file mode 100644
index 0000000..e0e7a8a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/statbuf.h
@@ -0,0 +1,75 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ int st_dev; /* Device. */
+ unsigned int st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned int st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group.*/
+ int st_rdev; /* Device number, if device. */
+
+ long st_size; /* Size of file, in bytes. */
+
+ int st_atime; /* Time of last access. */
+ int st_atime_usec;
+ int st_mtime; /* Time of last modification. */
+ int st_mtime_usec;
+ int st_ctime; /* Time of last status change. */
+ int st_ctime_usec;
+
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ int st_blocks; /* Number of 512-byte blocks allocated. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56110e09d48353effaa74ea98919eb65f74ec759
commit 56110e09d48353effaa74ea98919eb65f74ec759
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 23 05:31:47 1996 +0000
Wed May 22 00:40:50 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Added getsockopt,
ptrace, and sysctl.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index a842908..4a52bf2 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -33,13 +33,16 @@ bind - bind 3 __bind bind
connect - connect 3 __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
+getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
recv - recv 4 __recv recv
recvfrom - recvfrom 6 __recvfrom recvfrom
recvmsg - recvmsg 3 __recvmsg recvmsg
+ptrace - ptrace 4 __ptrace ptrace
send - send 4 __send send
sendmsg - sendmsg 3 __sendmsg sendmsg
sendto - sendto 6 __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
+sysctl - _sysctl 6 sysctl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4776991f74b1c26353637a57c757c9ca032506ba
commit 4776991f74b1c26353637a57c757c9ca032506ba
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 14 18:13:42 1996 +0000
.
diff --git a/bare/.cvsignore b/bare/.cvsignore
index c8367a7..3fc9f4c 100644
--- a/bare/.cvsignore
+++ b/bare/.cvsignore
@@ -1,3 +1,4 @@
+*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps
*.gz *.Z *.tar *.tgz
=*
TODO COPYING* AUTHORS copyr-* copying.*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab076e0919e0b2b8e69f56c128fb1285dffaa3ee
commit ab076e0919e0b2b8e69f56c128fb1285dffaa3ee
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 13 15:59:03 1996 +0000
Fri May 10 19:59:50 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/Makefile (CFLAGS-setjmp.c): New variable.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 12e9b56..3d35ac5 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -33,3 +33,6 @@ m68k-syntax-flag = -DMIT_SYNTAX
endif
asm-CPPFLAGS += $(m68k-syntax-flag)
+
+# Make sure setjmp.c is compiled with a frame pointer
+CFLAGS-setjmp.c := -fno-omit-frame-pointer
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a46ffddea5efb3ab064f8bca7c00729248abf3fe
commit a46ffddea5efb3ab064f8bca7c00729248abf3fe
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 8 02:02:40 1996 +0000
Sun May 5 03:10:44 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/sysconf.c: Add code to handle _SC_AIO_LISTIO_MAX,
_SC_AIO_MAX, _SC_AIO_PRIO_DELTA_MAX, _SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX, _SC_MQ_PRIO_MAX, _SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX, _SC_SEM_VALUE_MAX, _SC_SIGQUEUE_MAX, and
_SC_TIMER_MAX.
* sysdeps/unix/sysv/sysv4/sysconf.c: Ditto.
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 9ed5cbc..81d660f 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -186,6 +186,83 @@ DEFUN(__sysconf, (name), int name)
case _SC_PAGESIZE:
return __sysconfig (_CONFIG_PAGESIZE);
+ case _SC_AIO_LISTIO_MAX:
+#ifdef AIO_LISTIO_MAX
+ return AIO_LISTIO_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_AIO_MAX:
+#ifdef AIO_MAX
+ return AIO_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_AIO_PRIO_DELTA_MAX:
+#ifdef AIO_PRIO_DELTA_MAX
+ return AIO_PRIO_DELTA_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_DELAYTIMER_MAX:
+#ifdef DELAYTIMER_MAX
+ return DELAYTIMER_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_MQ_OPEN_MAX:
+#ifdef MQ_OPEN_MAX
+ return MQ_OPEN_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_MQ_PRIO_MAX:
+#ifdef MQ_PRIO_MAX
+ return MQ_PRIO_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_RTSIG_MAX:
+#ifdef RTSIG_MAX
+ return RTSIG_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_SEM_NSEMS_MAX:
+#ifdef SEM_NSEMS_MAX
+ return SEM_NSEMS_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_SEM_VALUE_MAX:
+#ifdef SEM_VALUE_MAX
+ return SEM_VALUE_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_SIGQUEUE_MAX:
+#ifdef SIGQUEUE_MAX
+ return SIGQUEUE_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_TIMER_MAX:
+#ifdef TIMER_MAX
+ return TIMER_MAX;
+#else
+ return -1;
+#endif
+
case _SC_BC_BASE_MAX:
#ifdef BC_BASE_MAX
return BC_BASE_MAX;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c07070b0ce17b634b516b28f02d5a1815d4dd04
commit 6c07070b0ce17b634b516b28f02d5a1815d4dd04
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 7 21:04:45 1996 +0000
Updated from /src/gmp-2.0
diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s
index e1ad460..426556e 100644
--- a/sysdeps/alpha/add_n.s
+++ b/sysdeps/alpha/add_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s
index 8b168cb..048238a 100644
--- a/sysdeps/alpha/addmul_1.s
+++ b/sysdeps/alpha/addmul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s
index 66cf82b..1251a1f 100644
--- a/sysdeps/alpha/alphaev5/add_n.s
+++ b/sysdeps/alpha/alphaev5/add_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s
index 392b424..ced55b7 100644
--- a/sysdeps/alpha/alphaev5/lshift.s
+++ b/sysdeps/alpha/alphaev5/lshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s
index d20dde3..6e24fef 100644
--- a/sysdeps/alpha/alphaev5/rshift.s
+++ b/sysdeps/alpha/alphaev5/rshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s
index c9f3a4e..6743af5 100644
--- a/sysdeps/alpha/alphaev5/sub_n.s
+++ b/sysdeps/alpha/alphaev5/sub_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h
index 05c893f..a3c6697 100644
--- a/sysdeps/alpha/gmp-mparam.h
+++ b/sysdeps/alpha/gmp-mparam.h
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#define BITS_PER_MP_LIMB 64
#define BYTES_PER_MP_LIMB 8
diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s
index aa8417b..13bd24a 100644
--- a/sysdeps/alpha/lshift.s
+++ b/sysdeps/alpha/lshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s
index 58a63df..a1f5a94 100644
--- a/sysdeps/alpha/mul_1.s
+++ b/sysdeps/alpha/mul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s
index 037b776..389054a 100644
--- a/sysdeps/alpha/rshift.s
+++ b/sysdeps/alpha/rshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s
index 5200025..3c90c11 100644
--- a/sysdeps/alpha/sub_n.s
+++ b/sysdeps/alpha/sub_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s
index 292b2c1..1ed0c6a 100644
--- a/sysdeps/alpha/submul_1.s
+++ b/sysdeps/alpha/submul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index ce590ed..d3d2cee 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
.set noreorder
diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s
index 7f3e323..b4a1428 100644
--- a/sysdeps/hppa/add_n.s
+++ b/sysdeps/hppa/add_n.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s
index a9dfdd1..0fdcb3c 100644
--- a/sysdeps/hppa/hppa1.1/addmul_1.s
+++ b/sysdeps/hppa/hppa1.1/addmul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s
index ebf0778..cdd0c1d 100644
--- a/sysdeps/hppa/hppa1.1/mul_1.s
+++ b/sysdeps/hppa/hppa1.1/mul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s
index 44cabf4..a4a3854 100644
--- a/sysdeps/hppa/hppa1.1/submul_1.s
+++ b/sysdeps/hppa/hppa1.1/submul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
index 4ffef3a..bf7dc70 100644
--- a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
+++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s
index 0479f4a..abac6ec 100644
--- a/sysdeps/hppa/lshift.s
+++ b/sysdeps/hppa/lshift.s
@@ -16,7 +16,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s
index 18d33f2..c1480e5 100644
--- a/sysdeps/hppa/rshift.s
+++ b/sysdeps/hppa/rshift.s
@@ -16,7 +16,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s
index daae46e..04fa3e1 100644
--- a/sysdeps/hppa/sub_n.s
+++ b/sysdeps/hppa/sub_n.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s
index 0b069bf..9b45eb4 100644
--- a/sysdeps/hppa/udiv_qrnnd.s
+++ b/sysdeps/hppa/udiv_qrnnd.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S
index 754af9f..7ca5b95 100644
--- a/sysdeps/m68k/add_n.S
+++ b/sysdeps/m68k/add_n.S
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
index c58594a..77184d6 100644
--- a/sysdeps/m68k/lshift.S
+++ b/sysdeps/m68k/lshift.S
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S
index 169f113..4b99c21 100644
--- a/sysdeps/m68k/m68020/addmul_1.S
+++ b/sysdeps/m68k/m68020/addmul_1.S
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S
index 4db1cca..ef7d937 100644
--- a/sysdeps/m68k/m68020/mul_1.S
+++ b/sysdeps/m68k/m68020/mul_1.S
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S
index cf30029..9770c6c 100644
--- a/sysdeps/m68k/m68020/submul_1.S
+++ b/sysdeps/m68k/m68020/submul_1.S
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
index 494dfcb..01dde0a 100644
--- a/sysdeps/m68k/rshift.S
+++ b/sysdeps/m68k/rshift.S
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S
index 39f5161..f94b0c7 100644
--- a/sysdeps/m68k/sub_n.S
+++ b/sysdeps/m68k/sub_n.S
@@ -17,7 +17,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
/*
INPUT PARAMETERS
diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s
index d564479..1b09cce 100644
--- a/sysdeps/m88k/add_n.s
+++ b/sysdeps/m88k/add_n.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S
index ab20630..39a44e5 100644
--- a/sysdeps/m88k/m88110/add_n.S
+++ b/sysdeps/m88k/m88110/add_n.S
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/m88110/addmul_1.s b/sysdeps/m88k/m88110/addmul_1.s
index 1a4dfa1..2bd6f21 100644
--- a/sysdeps/m88k/m88110/addmul_1.s
+++ b/sysdeps/m88k/m88110/addmul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s
index b1352ce..1518900 100644
--- a/sysdeps/m88k/m88110/mul_1.s
+++ b/sysdeps/m88k/m88110/mul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S
index 74ee0ae..685f024 100644
--- a/sysdeps/m88k/m88110/sub_n.S
+++ b/sysdeps/m88k/m88110/sub_n.S
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s
index 6b8492c..26626bf 100644
--- a/sysdeps/m88k/mul_1.s
+++ b/sysdeps/m88k/mul_1.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s
index cd0b791..7dfffc9 100644
--- a/sysdeps/m88k/sub_n.s
+++ b/sysdeps/m88k/sub_n.s
@@ -17,7 +17,8 @@
; You should have received a copy of the GNU Library General Public License
; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+; MA 02111-1307, USA.
; INPUT PARAMETERS
diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s
index c829108..f5525ce 100644
--- a/sysdeps/mips/add_n.s
+++ b/sysdeps/mips/add_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s
index 917af1b..6145771 100644
--- a/sysdeps/mips/addmul_1.s
+++ b/sysdeps/mips/addmul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s
index ce33e7c..ee92d79 100644
--- a/sysdeps/mips/lshift.s
+++ b/sysdeps/mips/lshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s
index b525780..996a449 100644
--- a/sysdeps/mips/mips3/add_n.s
+++ b/sysdeps/mips/mips3/add_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s
index 7dbc9ad..cd75c18 100644
--- a/sysdeps/mips/mips3/addmul_1.s
+++ b/sysdeps/mips/mips3/addmul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h
index a801b35..f3df7ff 100644
--- a/sysdeps/mips/mips3/gmp-mparam.h
+++ b/sysdeps/mips/mips3/gmp-mparam.h
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#define BITS_PER_MP_LIMB 64
#define BYTES_PER_MP_LIMB 8
diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s
index c05dcaf..324a602 100644
--- a/sysdeps/mips/mips3/lshift.s
+++ b/sysdeps/mips/mips3/lshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s
index 8376a02..281d057 100644
--- a/sysdeps/mips/mips3/mul_1.s
+++ b/sysdeps/mips/mips3/mul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s
index e0e2ca2..9920e1a 100644
--- a/sysdeps/mips/mips3/rshift.s
+++ b/sysdeps/mips/mips3/rshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s
index 9a45ffd..56c77d8 100644
--- a/sysdeps/mips/mips3/sub_n.s
+++ b/sysdeps/mips/mips3/sub_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s
index f041f6c..a9c9fa2 100644
--- a/sysdeps/mips/mips3/submul_1.s
+++ b/sysdeps/mips/mips3/submul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s
index 6f5324c..d006fa1 100644
--- a/sysdeps/mips/mul_1.s
+++ b/sysdeps/mips/mul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s
index 6941691..a8beb40 100644
--- a/sysdeps/mips/rshift.s
+++ b/sysdeps/mips/rshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s
index 63f3b55..3368ef2 100644
--- a/sysdeps/mips/sub_n.s
+++ b/sysdeps/mips/sub_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s
index a78072a..1324b66 100644
--- a/sysdeps/mips/submul_1.s
+++ b/sysdeps/mips/submul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
- # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s
index e2536d5..9e1c948 100644
--- a/sysdeps/rs6000/add_n.s
+++ b/sysdeps/rs6000/add_n.s
@@ -1,6 +1,6 @@
# IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length.
-# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
@@ -37,18 +38,44 @@ __mpn_add_n:
.long .__mpn_add_n, TOC[tc0], 0
.csect [PR]
.__mpn_add_n:
- mtctr 6 # copy size into CTR
+ andil. 10,6,1 # odd or even number of limbs?
l 8,0(4) # load least significant s1 limb
l 0,0(5) # load least significant s2 limb
- cal 3,-4(3) # offset res_ptr, it's updated before used
+ cal 3,-4(3) # offset res_ptr, it's updated before it's used
+ sri 10,6,1 # count for unrolled loop
a 7,0,8 # add least significant limbs, set cy
+ mtctr 10 # copy count into CTR
+ beq 0,Leven # branch if even # of limbs (# of limbs >= 2)
+
+# We have an odd # of limbs. Add the first limbs separately.
+ cmpi 1,10,0 # is count for unrolled loop zero?
+ bne 1,L1 # branch if not
+ st 7,4(3)
+ aze 3,10 # use the fact that r10 is zero...
+ br # return
+
+# We added least significant limbs. Now reload the next limbs to enter loop.
+L1: lu 8,4(4) # load s1 limb and update s1_ptr
+ lu 0,4(5) # load s2 limb and update s2_ptr
+ stu 7,4(3)
+ ae 7,0,8 # add limbs, set cy
+Leven: lu 9,4(4) # load s1 limb and update s1_ptr
+ lu 10,4(5) # load s2 limb and update s2_ptr
bdz Lend # If done, skip loop
+
Loop: lu 8,4(4) # load s1 limb and update s1_ptr
lu 0,4(5) # load s2 limb and update s2_ptr
- stu 7,4(3) # store previous limb in load latency slot
- ae 7,0,8 # add new limbs with cy, set cy
+ ae 11,9,10 # add previous limbs with cy, set cy
+ stu 7,4(3) #
+ lu 9,4(4) # load s1 limb and update s1_ptr
+ lu 10,4(5) # load s2 limb and update s2_ptr
+ ae 7,0,8 # add previous limbs with cy, set cy
+ stu 11,4(3) #
bdn Loop # decrement CTR and loop back
-Lend: st 7,4(3) # store ultimate result limb
+
+Lend: ae 11,9,10 # add limbs with cy, set cy
+ st 7,4(3) #
+ st 11,8(3) #
lil 3,0 # load cy into ...
aze 3,3 # ... return value register
br
diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s
index 862b613..2db6984 100644
--- a/sysdeps/rs6000/addmul_1.s
+++ b/sysdeps/rs6000/addmul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s
index 69c7502..38169bf 100644
--- a/sysdeps/rs6000/lshift.s
+++ b/sysdeps/rs6000/lshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s
index f4fa894..a72bce6 100644
--- a/sysdeps/rs6000/mul_1.s
+++ b/sysdeps/rs6000/mul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s
index 6056acc..30d408a 100644
--- a/sysdeps/rs6000/rshift.s
+++ b/sysdeps/rs6000/rshift.s
@@ -16,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s
index c57675b..30d4fee 100644
--- a/sysdeps/rs6000/sub_n.s
+++ b/sysdeps/rs6000/sub_n.s
@@ -1,7 +1,6 @@
-# IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
-# store difference in a third limb vector.
+# IBM POWER __mpn_sub_n -- Subtract two limb vectors of equal, non-zero length.
-# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -17,7 +16,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
@@ -38,18 +38,45 @@ __mpn_sub_n:
.long .__mpn_sub_n, TOC[tc0], 0
.csect [PR]
.__mpn_sub_n:
- mtctr 6 # copy size into CTR
+ andil. 10,6,1 # odd or even number of limbs?
l 8,0(4) # load least significant s1 limb
l 0,0(5) # load least significant s2 limb
- cal 3,-4(3) # offset res_ptr, it's updated before used
- sf 7,0,8 # add least significant limbs, set cy
+ cal 3,-4(3) # offset res_ptr, it's updated before it's used
+ sri 10,6,1 # count for unrolled loop
+ sf 7,0,8 # subtract least significant limbs, set cy
+ mtctr 10 # copy count into CTR
+ beq 0,Leven # branch if even # of limbs (# of limbs >= 2)
+
+# We have an odd # of limbs. Add the first limbs separately.
+ cmpi 1,10,0 # is count for unrolled loop zero?
+ bne 1,L1 # branch if not
+ st 7,4(3)
+ sfe 3,0,0 # load !cy into ...
+ sfi 3,3,0 # ... return value register
+ br # return
+
+# We added least significant limbs. Now reload the next limbs to enter loop.
+L1: lu 8,4(4) # load s1 limb and update s1_ptr
+ lu 0,4(5) # load s2 limb and update s2_ptr
+ stu 7,4(3)
+ sfe 7,0,8 # subtract limbs, set cy
+Leven: lu 9,4(4) # load s1 limb and update s1_ptr
+ lu 10,4(5) # load s2 limb and update s2_ptr
bdz Lend # If done, skip loop
+
Loop: lu 8,4(4) # load s1 limb and update s1_ptr
lu 0,4(5) # load s2 limb and update s2_ptr
- stu 7,4(3) # store previous limb in load latency slot
- sfe 7,0,8 # add new limbs with cy, set cy
+ sfe 11,10,9 # subtract previous limbs with cy, set cy
+ stu 7,4(3) #
+ lu 9,4(4) # load s1 limb and update s1_ptr
+ lu 10,4(5) # load s2 limb and update s2_ptr
+ sfe 7,0,8 # subtract previous limbs with cy, set cy
+ stu 11,4(3) #
bdn Loop # decrement CTR and loop back
-Lend: st 7,4(3) # store ultimate result limb
+
+Lend: sfe 11,10,9 # subtract limbs with cy, set cy
+ st 7,4(3) #
+ st 11,8(3) #
sfe 3,0,0 # load !cy into ...
sfi 3,3,0 # ... return value register
br
diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s
index 2526332..8e5946f 100644
--- a/sysdeps/rs6000/submul_1.s
+++ b/sysdeps/rs6000/submul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s
index c89b226..d4764e2 100644
--- a/sysdeps/vax/add_n.s
+++ b/sysdeps/vax/add_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s
index 8e83204..746d95b 100644
--- a/sysdeps/vax/addmul_1.s
+++ b/sysdeps/vax/addmul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h
index ddc308a..d909cd2 100644
--- a/sysdeps/vax/gmp-mparam.h
+++ b/sysdeps/vax/gmp-mparam.h
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#define BITS_PER_MP_LIMB 32
#define BYTES_PER_MP_LIMB 4
diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s
index 3fe375b..e2ff5a1 100644
--- a/sysdeps/vax/mul_1.s
+++ b/sysdeps/vax/mul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s
index 300b4de..a891c44 100644
--- a/sysdeps/vax/sub_n.s
+++ b/sysdeps/vax/sub_n.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s
index 875cbfd..c473937 100644
--- a/sysdeps/vax/submul_1.s
+++ b/sysdeps/vax/submul_1.s
@@ -17,7 +17,8 @@
# You should have received a copy of the GNU Library General Public License
# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+# MA 02111-1307, USA.
# INPUT PARAMETERS
diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s
index 21efaf5..a50fc3e 100644
--- a/sysdeps/z8000/add_n.s
+++ b/sysdeps/z8000/add_n.s
@@ -16,7 +16,8 @@
! You should have received a copy of the GNU Library General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+! MA 02111-1307, USA.
! INPUT PARAMETERS
diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h
index 73df5b9..e0a303e 100644
--- a/sysdeps/z8000/gmp-mparam.h
+++ b/sysdeps/z8000/gmp-mparam.h
@@ -16,7 +16,8 @@ License for more details.
You should have received a copy of the GNU Library General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
#define BITS_PER_MP_LIMB 16
#define BYTES_PER_MP_LIMB 2
diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s
index 0150e85..f1126b5 100644
--- a/sysdeps/z8000/mul_1.s
+++ b/sysdeps/z8000/mul_1.s
@@ -17,7 +17,8 @@
! You should have received a copy of the GNU Library General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+! MA 02111-1307, USA.
! INPUT PARAMETERS
diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s
index f75ef22..272c671 100644
--- a/sysdeps/z8000/sub_n.s
+++ b/sysdeps/z8000/sub_n.s
@@ -17,7 +17,8 @@
! You should have received a copy of the GNU Library General Public License
! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+! MA 02111-1307, USA.
! INPUT PARAMETERS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8f202d4b835faa064c6e816d52bac03ef6ccc99a
commit 8f202d4b835faa064c6e816d52bac03ef6ccc99a
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 3 16:52:28 1996 +0000
Thu May 2 22:41:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_DEFAULT):
Disable all exceptions.
diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
index 0b3623d..97bde85 100644
--- a/sysdeps/unix/sysv/linux/m68k/fpu_control.h
+++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
@@ -80,11 +80,9 @@ Cambridge, MA 02139, USA. */
/* Now two recommended fpucr */
-/* Linux default:
- - extended precision
- - rounding to nearest
- - exceptions on overflow, zero divide and NaN */
-#define _FPU_DEFAULT 0x00005400
+/* The fdlibm code requires no interrupts for exceptions. Don't
+ change the rounding mode, it would break long double I/O! */
+#define _FPU_DEFAULT 0x00000000
/* IEEE: same as above, but exceptions. We must make it non-zero so
that __setfpucw works. This bit will be ignored. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3170dd85853ff4199c4766ba2b670739d3726180
commit 3170dd85853ff4199c4766ba2b670739d3726180
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 3 16:51:51 1996 +0000
Thu May 2 22:33:14 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c: Don't
define __NO_MATH_INLINES, which is already defined on command
line.
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
index 1a29222..34dfc82 100644
--- a/sysdeps/m68k/fpu/e_acos.c
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c
index 5196815..34da7ee 100644
--- a/sysdeps/m68k/fpu/e_acosf.c
+++ b/sysdeps/m68k/fpu/e_acosf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
index 310b1c4..578fa3c 100644
--- a/sysdeps/m68k/fpu/e_fmod.c
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c
index 1a74c36..b3c3ead 100644
--- a/sysdeps/m68k/fpu/e_fmodf.c
+++ b/sysdeps/m68k/fpu/e_fmodf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c
index 77fd759..97b5983 100644
--- a/sysdeps/m68k/fpu/isinfl.c
+++ b/sysdeps/m68k/fpu/isinfl.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
int
diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c
index 1e58ea4..e5e3db2 100644
--- a/sysdeps/m68k/fpu/isnanl.c
+++ b/sysdeps/m68k/fpu/isnanl.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
int
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
index f1cc975..51916e1 100644
--- a/sysdeps/m68k/fpu/s_atan.c
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c
index 5d1f337..d26f838 100644
--- a/sysdeps/m68k/fpu/s_atanf.c
+++ b/sysdeps/m68k/fpu/s_atanf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
index b24af74..45c0540 100644
--- a/sysdeps/m68k/fpu/s_frexp.c
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
double
diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c
index c7cd98a..dd30f6c 100644
--- a/sysdeps/m68k/fpu/s_frexpf.c
+++ b/sysdeps/m68k/fpu/s_frexpf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
float
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
index 2df00a6..4119df9 100644
--- a/sysdeps/m68k/fpu/s_ilogb.c
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
int
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c
index 05f1546..8d9a027 100644
--- a/sysdeps/m68k/fpu/s_ilogbf.c
+++ b/sysdeps/m68k/fpu/s_ilogbf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
int
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
index 9674533..eec07c7 100644
--- a/sysdeps/m68k/fpu/s_isinf.c
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c
index d9101a9..8f18db5 100644
--- a/sysdeps/m68k/fpu/s_isinff.c
+++ b/sysdeps/m68k/fpu/s_isinff.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
index ee7662e..67513d4 100644
--- a/sysdeps/m68k/fpu/s_ldexp.c
+++ b/sysdeps/m68k/fpu/s_ldexp.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c
index a974173..94abf25 100644
--- a/sysdeps/m68k/fpu/s_ldexpf.c
+++ b/sysdeps/m68k/fpu/s_ldexpf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
#ifndef FUNC
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
index 355df2f..ce70be8 100644
--- a/sysdeps/m68k/fpu/s_modf.c
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
double
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c
index f56bcb4..04b51d5 100644
--- a/sysdeps/m68k/fpu/s_modff.c
+++ b/sysdeps/m68k/fpu/s_modff.c
@@ -17,7 +17,6 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#define __NO_MATH_INLINES
#include <math.h>
float
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19d945c4b36d3a75ef348711c9eeeb587b572a82
commit 19d945c4b36d3a75ef348711c9eeeb587b572a82
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 1 13:47:01 1996 +0000
Mon Apr 29 02:48:26 1996 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/posix/sysconf.c: Add handling of _SC_REALTIME_SIGNALS,
_SC_PRIORITY_SCHEDULING, _SC_TIMERS, _SC_ASYNCHRONOUS_IO,
_SC_PRIORITIZED_IO, _SC_SYNCHRONIZED_IO, _SC_FSYNC,
_SC_MAPPED_FILES, _SC_MEMLOCK, _SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION, _SC_MESSAGE_PASSING, _SC_SEMAPHORES,
_SC_SHARED_MEMORY_OBJECTS, and _SC_CHARCLASS_NAME_MAX.
* sysdeps/stub/sysconf.c: Ditto.
* sysdeps/unix/sysv/sysv4/sysconf.c: Ditto.
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 607cd05..9ed5cbc 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -74,12 +74,112 @@ DEFUN(__sysconf, (name), int name)
#else
return -1;
#endif
+
case _SC_SAVED_IDS:
#ifdef _POSIX_SAVED_IDS
return 1;
#else
return -1;
#endif
+
+ case _SC_REALTIME_SIGNALS:
+#ifdef _POSIX_REALTIME_SIGNALS
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_PRIORITY_SCHEDULING:
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_TIMERS:
+#ifdef _POSIX_TIMERS
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_ASYNCHRONOUS_IO:
+#ifdef _POSIX_ASYNCHRONOUS_IO
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_PRIORITIZED_IO:
+#ifdef _POSIX_PRIORITIZED_IO
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_SYNCHRONIZED_IO:
+#ifdef _POSIX_SYNCHRONIZED_IO
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_FSYNC:
+#ifdef _POSIX_FSYNC
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_MAPPED_FILES:
+#ifdef _POSIX_MAPPED_FILES
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_MEMLOCK:
+#ifdef _POSIX_MEMLOCK
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_MEMLOCK_RANGE:
+#ifdef _POSIX_MEMLOCK_RANGE
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_MEMORY_PROTECTION:
+#ifdef _POSIX_MEMORY_PROTECTION
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_MESSAGE_PASSING:
+#ifdef _POSIX_MESSAGE_PASSING
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_SEMAPHORES:
+#ifdef _POSIX_SEMAPHORES
+ return 1;
+#else
+ return -1;
+#endif
+
+ case _SC_SHARED_MEMORY_OBJECTS:
+#ifdef _POSIX_SHARED_MEMORY_OBJECTS
+ return 1;
+#else
+ return -1;
+#endif
+
case _SC_VERSION:
return _POSIX_VERSION;
@@ -142,6 +242,12 @@ DEFUN(__sysconf, (name), int name)
return -1;
#endif
+ case _SC_CHARCLASS_NAME_MAX:
+#ifdef CHARCLASS_NAME_MAX
+ return CHARCLASS_NAME_MAX;
+#else
+ return -1;
+#endif
case _SC_2_VERSION:
/* This is actually supposed to return the version
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2597b8812aee44bcc70b418e5f747ae94cdbc388
commit 2597b8812aee44bcc70b418e5f747ae94cdbc388
Author: Roland McGrath <roland@gnu.org>
Date: Sat Apr 20 22:08:45 1996 +0000
Sat Apr 20 17:07:17 1996 Ulrich Drepper <drepper@cygnus.com>
* assert/assert.h, ctype/ctype.h, dirent/dirent.h, errno.h,
grp/grp.h, io/fcntl.h, io/sys/stat.h, io/utime.h, locale/locale.h,
math/math.h, misc/nlist.h, misc/sgtty.h, misc/sys/file.h,
misc/sys/ioctl.h, misc/sys/uio.h, posix/sys/times.h,
posix/sys/types.h, posix/sys/utsname.h, posix/sys/wait.h,
posix/tar.h, posix/wordexp.h, pwd/pwd.h, resource/sys/vlimit.h,
resource/sys/vtimes.h, setjmp/setjmp.h, signal/signal.h,
stdio-common/printf.h, stdlib/alloca.h, stdlib/stdlib.h,
string/string.h, sysdeps/generic/sigaction.h,
sysdeps/generic/sigset.h, sysdeps/generic/sys/ptrace.h,
sysdeps/generic/sys/ptrace.h, sysdeps/unix/bsd/osf/sigaction.h,
sysdeps/unix/sysv/linux/sys/ptrace.h,
sysdeps/unix/sysv/minix/sigaction.h,
sysdeps/unix/sysv/sco3.2.4/sigaction.h,
sysdeps/unix/sysv/sysv4/sigaction.h,
sysdeps/unix/sysv/sysv4/sigset.h, termios/termios.h,
time/sys/time.h, time/time.h: Fix copyright comment.
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
index 8a4e2c5..d809b6b 100644
--- a/sysdeps/unix/bsd/osf/sigaction.h
+++ b/sysdeps/unix/bsd/osf/sigaction.h
@@ -1,5 +1,5 @@
/* Structure and constand definitions for sigaction et al. OSF/1 version.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Structure describing the action to be taken when a signal arrives. */
diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h
index 9395206..6b0c460 100644
--- a/sysdeps/unix/sysv/minix/sigaction.h
+++ b/sysdeps/unix/sysv/minix/sigaction.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Structure describing the action to be taken when a signal arrives. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h
index c6344f0..c21b928 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.h
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for SCO's sigaction.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Structure describing the action to be taken when a signal arrives. */
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h
index dbb31f1..1305ba6 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for SVR4's sigaction.
-Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Structure describing the action to be taken when a signal arrives. */
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index b21b519..57aff36 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -1,5 +1,5 @@
/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
-Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _SIGSET_H_types
@@ -94,4 +94,3 @@ __sigismember (__const __sigset_t *__set, int __sig)
}
#endif /* ! _SIGSET_H_fns */
-
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2295f3f958478d95c312cd62d89623527e29de20
commit 2295f3f958478d95c312cd62d89623527e29de20
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 27 20:31:14 1996 +0000
Wed Mar 27 10:26:21 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/setjmp.S: Must establish global pointer before
address of __sigsetjmp_aux can be loaded.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 8ea2b50..04b8068 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
ENTRY (__sigsetjmp)
+ ldgp $29, 0($27)
lda $27, __sigsetjmp_aux/* Load address to jump to. */
bis $30, $30, $18 /* Pass SP as 3rd arg. */
bis $15, $15, $19 /* Pass FP as 4th arg. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e37ebecf0c73d9e601d729553161dd3fc386456f
commit e37ebecf0c73d9e601d729553161dd3fc386456f
Author: Brendan Kehoe <brendan@zen.org>
Date: Wed Mar 27 00:46:37 1996 +0000
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (NO_UNDERSCORES): Use
wrapped with #ifndef, to avoid config.h defining it.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index edb9830..49eac9a 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -17,7 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* Solaris 2 does not precede the asm names of C symbols with a `_'. */
+#ifndef NO_UNDERSCORES
#define NO_UNDERSCORES
+#endif
#include <sysdeps/unix/sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bf8715604009306146921de4c53cb1dcde2a1c5
commit 1bf8715604009306146921de4c53cb1dcde2a1c5
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 25 09:56:36 1996 +0000
Wed Mar 20 20:08:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't define
NO_UNDERSCORES.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index ee48117..fe2c6aa 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -18,9 +18,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* In the Linux/ELF world, C symbols are asm symbols. */
-#define NO_UNDERSCORES
-
#include <sysdeps/unix/sysdep.h>
/* For Linux we can use the system call table in the header file
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da9361f4ea30b57e56c936ec2131803cce7bc477
commit da9361f4ea30b57e56c936ec2131803cce7bc477
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 20:18:59 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/Makefile,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/fpu_control.c,
sysdeps/unix/sysv/linux/alpha/fpu_control.h,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/setfpucw.c,
sysdeps/unix/sysv/linux/alpha/sigprocmask.c,
sysdeps/unix/sysv/linux/alpha/speed.c,
sysdeps/unix/sysv/linux/alpha/start.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/syscalls.list,
sysdeps/unix/sysv/linux/alpha/alpha/regdef.h,
sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/sysdep.h: New files.
diff --git a/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h b/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h
new file mode 100644
index 0000000..142df9c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/alpha/regdef.h
@@ -0,0 +1,44 @@
+#ifndef __alpha_regdef_h__
+#define __alpha_regdef_h__
+
+#define v0 $0 /* function return value */
+
+#define t0 $1 /* temporary registers (caller-saved) */
+#define t1 $2
+#define t2 $3
+#define t3 $4
+#define t4 $5
+#define t5 $6
+#define t6 $7
+#define t7 $8
+
+#define s0 $9 /* saved-registers (callee-saved registers) */
+#define s1 $10
+#define s2 $11
+#define s3 $12
+#define s4 $13
+#define s5 $14
+#define s6 $15
+#define fp s6 /* frame-pointer (s6 in frame-less procedures) */
+
+#define a0 $16 /* argument registers (caller-saved) */
+#define a1 $17
+#define a2 $18
+#define a3 $19
+#define a4 $20
+#define a5 $21
+
+#define t8 $22 /* more temps (caller-saved) */
+#define t9 $23
+#define t10 $24
+#define t11 $25
+#define ra $26 /* return address register */
+#define t12 $27
+
+#define pv t12 /* procedure-variable register */
+#define AT $at /* assembler temporary */
+#define gp $29 /* global pointer */
+#define sp $30 /* stack pointer */
+#define zero $31 /* reads as zero, writes are noops */
+
+#endif /* __alpha_regdef_h__ */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62a6271405dc0c42f64284a5a9b258ab5c1f745c
commit 62a6271405dc0c42f64284a5a9b258ab5c1f745c
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 20:18:07 1996 +0000
Sun Feb 25 22:36:10 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/profil-counter.h: New file.
diff --git a/sysdeps/unix/sysv/linux/alpha/profil-counter.h b/sysdeps/unix/sysv/linux/alpha/profil-counter.h
new file mode 100644
index 0000000..6ab5a88
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/profil-counter.h
@@ -0,0 +1,28 @@
+/* Low-level statistical profiling support function. Mostly POSIX.1 version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+Contributed by David Mosberger <davidm@azstarnet.com>
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <asm/sigcontext.h>
+
+void
+profil_counter (int signal, long a1, long a2, long a3, long a4, long a5,
+ struct sigcontext_struct sc)
+{
+ profil_count((void *) sc.sc_pc);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e952b53c52ca3dcc2d205a26115efdc7c96449ad
commit e952b53c52ca3dcc2d205a26115efdc7c96449ad
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 20:14:38 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S,
sysdeps/alpha/divqu.S, sysdeps/alpha/divrem.m4,
sysdeps/alpha/macros.m4, sysdeps/alpha/reml.S, sysdeps/alpha/remlu.S,
sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S, sysdeps/alpha/strlen.c:
Removed.
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index 95896fb..cede136 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -1,60 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 1
+#define SIZE 4
+#define SIGNED 1
+#define FUNC_NAME __reml
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(reml)
- /* First set up the dividend. */
- sextl t10, t10
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
- sextl t11, t11
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
- sextl t12, t12
-
-
- /* Compute the remainder. */
- mull t11, t12, t11
- subl t10, t11, t12
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(reml)
+#include "divrem.S"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=437909194b3ec37ba0ad98d1adb44302495bf163
commit 437909194b3ec37ba0ad98d1adb44302495bf163
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 20:13:37 1996 +0000
Mon Mar 4 20:17:28 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/__math.h (atan, cabs): New functions.
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 5461fca..9aea9d7 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Inline math functions for Alpha.
+Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+Contributed by David Mosberger-Tang.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -32,4 +34,20 @@ fabs (double __x)
return __x;
}
+extern __inline double
+atan (double __x)
+{
+ extern double __atan2 (double, double);
+ return __atan2 (__x, 1.0);
+}
+
+#ifdef __USE_MISC
+extern __inline double
+cabs (struct __cabs_complex __z)
+{
+ extern double __hypot (double, double);
+ return __hypot(__z.__x, __z.__y);
+}
+#endif
+
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf7a24fce291fc6496a4e4cb1a6a544e5dcf1391
commit bf7a24fce291fc6496a4e4cb1a6a544e5dcf1391
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:54:21 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/alpha/sysdep.h: new file (adapted from OSF/1 version).
* sysdeps/unix/bsd/osf/alpha/sysdep.h: include
sysdeps/unix/alpha/sysdep.h and removed definitions now in that file.
diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h
new file mode 100644
index 0000000..9eb9032
--- /dev/null
+++ b/sysdeps/unix/alpha/sysdep.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef ASSEMBLER
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl name; \
+ .align 3; \
+ .ent name,0; \
+ name##: \
+ .frame sp,0,ra
+#else
+#define ENTRY(name) \
+ .globl name; \
+ .align 3; \
+ .ent name,0; \
+ name/**/: \
+ .frame sp,0,ra
+#endif
+
+/* Note that while it's better structurally, going back to set errno
+ can make things confusing if you're debugging---it looks like it's jumping
+ backwards into the previous fn. */
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+ .globl name; \
+ .align 3; \
+ .ent name,0; \
+ \
+1: br gp,2f; \
+2: ldgp gp,0(gp); \
+ lda pv,syscall_error; \
+ jmp zero,(pv); \
+ \
+name##: \
+ ldi v0,SYS_ify(syscall_name); \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ bne a3,1b; \
+3:
+#else
+#define PSEUDO(name, syscall_name, args) \
+ .globl name; \
+ .align 3; \
+ .ent name,0; \
+ \
+1: br gp,2f; \
+2: ldgp gp,0(gp); \
+ lda pv,syscall_error; \
+ jmp zero,(pv); \
+ \
+name/**/: \
+ ldi v0,SYS_ify(syscall_name); \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ bne a3,1b; \
+3:
+#endif
+
+#define ret ret zero,(ra),1
+#define r0 v0
+#define r1 a4
+
+#define MOVE(x,y) mov x,y
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd364076182aea8b2b8309fc7b02b91df565da13
commit bd364076182aea8b2b8309fc7b02b91df565da13
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:54:14 1996 +0000
Sat Feb 17 11:29:29 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/fabs.c: File removed.
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c
deleted file mode 100644
index 321df0d..0000000
--- a/sysdeps/alpha/fabs.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#define __NO_MATH_INLINES
-
-#include <math.h>
-
-__inline double
-fabs (double __x)
-{
- __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
- return __x;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c9f45ab414294ecc11ada80829c6c47f175bd57
commit 0c9f45ab414294ecc11ada80829c6c47f175bd57
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:53:56 1996 +0000
Sat Feb 17 11:29:29 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/ffs.S: new file.
diff --git a/sysdeps/alpha/ffs.S b/sysdeps/alpha/ffs.S
new file mode 100644
index 0000000..7676b85
--- /dev/null
+++ b/sysdeps/alpha/ffs.S
@@ -0,0 +1,71 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Finds the first bit set in an integer. Optimized for the Alpha
+architecture. */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+#include <regdef.h>
+#endif
+
+ .set noreorder
+ .set noat
+
+ENTRY(ffs)
+ .prologue 0
+
+ ldq_u zero, 0(sp) # on the 21064, this helps dual-issuing
+ addl a0, zero, a0 # the last insn and reduces the stall
+ negq a0, t0 # due to the srl instruction
+ and a0, t0, t0
+ clr v0
+ beq a0, done
+
+ # now do binary search for first non-zero bit
+
+ zapnot t0, 0x03, t2
+ addq v0, 16, t3
+ cmoveq t2, t3, v0
+
+ zapnot t0, 0x05, t2
+ addq v0, 8, t3
+ cmoveq t2, t3, v0
+
+ srl t0, v0, t0
+ addq v0, 1, v0
+
+ and t0, 0x0f, t2
+ addq v0, 4, t3
+ cmoveq t2, t3, v0
+
+ and t0, 0x33, t2
+ addq v0, 2, t3
+ cmoveq t2, t3, v0
+
+ and t0, 0x55, t2
+ addq v0, 1, t3
+ cmoveq t2, t3, v0
+
+done: ret
+
+ .end ffs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8a9cbf0d86622803e77af91071ff86e3148cfeb6
commit 8a9cbf0d86622803e77af91071ff86e3148cfeb6
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:53:15 1996 +0000
Sun Feb 25 22:36:10 1996 David Mosberger-Tang <davidm@azstarnet.com>
* gmon/sys/gmon_out.h, gmon/bb_exit_func.c,
sysdeps/generic/bb_init_func.c, sysdeps/alpha/bb_init_func.S: new
files.
diff --git a/sysdeps/alpha/bb_init_func.S b/sysdeps/alpha/bb_init_func.S
new file mode 100644
index 0000000..9bf985c
--- /dev/null
+++ b/sysdeps/alpha/bb_init_func.S
@@ -0,0 +1,85 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* __bb_init_func is invoked at the beginning of each function, before
+any registers have been saved. It is therefore safe to use any
+caller-saved (call-used) registers (except for argument registers
+a1-a5). */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+# include <regdef.h>
+#endif
+
+/*
+ * These offsets should match with "struct bb" declared in gcc/libgcc2.c.
+ */
+#define ZERO_WORD 0x00
+#define NEXT 0x20
+
+ .set noat
+ .set noreorder
+
+ENTRY(__bb_init_func)
+ ldq t0, ZERO_WORD(a0) /* t0 <- blocks->zero_word */
+ beq t0, init /* not initialized yet -> */
+ ret
+
+
+init: subq sp, 0x38, sp
+ stq pv, 0x30(sp)
+ br pv, 1f
+1: ldgp gp, 0(pv)
+
+ lda t1, __bb_head
+ lda t3, _gmonparam
+ ldq t2, 0(t1)
+ ldl t3, 0(t3) /* t3 = _gmonparam.state */
+ ldi t0, 1
+ stq t0, ZERO_WORD(a0) /* blocks->zero_word = 1 */
+ stq t2, NEXT(a0) /* blocks->next = __bb_head */
+ stq a0, 0(t1)
+ bne t2, leave
+ beq t3, leave /* t3 == GMON_PROF_ON? yes -> */
+
+ /* also need to initialize destructor: */
+ stq ra, 0x00(sp)
+ lda a0, __bb_exit_func
+ stq a1, 0x08(sp)
+ lda pv, atexit
+ stq a2, 0x10(sp)
+ stq a3, 0x18(sp)
+ stq a4, 0x20(sp)
+ stq a5, 0x28(sp)
+ jsr ra, (pv), atexit
+ ldq ra, 0x00(sp)
+ ldq a1, 0x08(sp)
+ ldq a2, 0x10(sp)
+ ldq a3, 0x18(sp)
+ ldq a4, 0x20(sp)
+ ldq a5, 0x28(sp)
+
+leave: ldq pv, 0x30(sp)
+ addq sp, 0x38, sp
+ ret
+
+ .end __bb_init_func
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd7d3fbe25bf70a89ebf91bbe68bc9826c1f706b
commit bd7d3fbe25bf70a89ebf91bbe68bc9826c1f706b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:58 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S,
sysdeps/alpha/divqu.S, sysdeps/alpha/divrem.m4,
sysdeps/alpha/macros.m4, sysdeps/alpha/ reml.S, sysdeps/alpha/remlu.S,
sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S, sysdeps/alpha/strlen.c:
Removed.
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 5c94362..7dbb504 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -1,57 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 0
+#define SIZE 4
+#define SIGNED 1
+#define FUNC_NAME __divl
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(divl)
- /* First set up the dividend. */
- sextl t10, t10
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
- sextl t11, t11
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
- sextl t12, t12
-
-
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(divl)
+#include "divrem.S"
diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S
index 3a7589d..9cc71da 100644
--- a/sysdeps/alpha/divlu.S
+++ b/sysdeps/alpha/divlu.S
@@ -1,57 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 0
+#define SIZE 4
+#define SIGNED 0
+#define FUNC_NAME __divlu
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(divlu)
- /* First set up the dividend. */
- zapnot t10, 0xf, t10
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
- zapnot t11, 0xf, t11
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
- sextl t12, t12
-
-
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(divlu)
+#include "divrem.S"
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 730a338..f7af8d6 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -1,54 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 0
+#define SIZE 8
+#define SIGNED 1
+#define FUNC_NAME __divq
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(divq)
- /* First set up the dividend. */
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
-
-
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(divq)
+#include "divrem.S"
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index 7614742..faf2932 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -1,60 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 0
+#define SIZE 8
+#define SIGNED 0
+#define FUNC_NAME __divqu
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(divqu)
- /* First set up the dividend. */
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
-
-
- /* Then set up the divisor. */
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
-
-
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(divqu)
+#include "divrem.S"
diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4
deleted file mode 100644
index d2f3638..0000000
--- a/sysdeps/alpha/divrem.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
-
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-define(path, `SYSDEP_DIR/macros.m4')dnl
-include(path)
-
-FUNC__(OP)
- /* First set up the dividend. */
- EXTEND(t10)
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
- ADJQU($f10)
-
- /* Then set up the divisor. */
- EXTEND(t11)
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
- ADJQU($f1)
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
- FULLEXTEND(t12)
-
- DOREM
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(OP)
diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4
deleted file mode 100644
index f8c1fe9..0000000
--- a/sysdeps/alpha/macros.m4
+++ /dev/null
@@ -1,34 +0,0 @@
-dnl NOTE: The $1 below is the argument to EXTEND, not register $1.
-define(EXTEND,
-`ifelse(SIZE, `l',
-`ifelse(SIGNED, `true',
-` sextl $1, $1
-',dnl
-` zapnot $1, 0xf, $1
-')')')dnl
-
-dnl FULLEXTEND -- extend the register named in the first argument
-define(FULLEXTEND,
-`ifelse(SIZE, `l',
-` sextl $1, $1
-')')dnl
-
-dnl This is used by divqu.
-define(ADJQU,
-`ifelse(MODE, `qu',
-` ldit $f26, 18446744073709551616.0
- addt $f26, $1, $f26
- fcmovlt $1, $f26, $1
-')')dnl
-
-define(DOREM,
-`ifelse(BASEOP, `rem',
-` /* Compute the remainder. */
-ifelse(SIZE, `l',
-` mull t11, t12, t11
- subl t10, t11, t12
-',dnl Note mulq/subq were only really used in remq, but we will find out
-dnl if assuming they apply to remqu as well is wrong or not.
-` mulq t11, t12, t11
- subq t10, t11, t12
-')')')dnl
diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S
index 24e07cf..3658d92 100644
--- a/sysdeps/alpha/remlu.S
+++ b/sysdeps/alpha/remlu.S
@@ -1,60 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 1
+#define SIZE 4
+#define SIGNED 0
+#define FUNC_NAME __remlu
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(remlu)
- /* First set up the dividend. */
- zapnot t10, 0xf, t10
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
- zapnot t11, 0xf, t11
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
- sextl t12, t12
-
-
- /* Compute the remainder. */
- mull t11, t12, t11
- subl t10, t11, t12
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(remlu)
+#include "divrem.S"
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index ce38c24..61f2067 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -1,57 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 1
+#define SIZE 8
+#define SIGNED 1
+#define FUNC_NAME __remq
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(remq)
- /* First set up the dividend. */
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
-
-
- /* Then set up the divisor. */
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
-
-
- /* Compute the remainder. */
- mulq t11, t12, t11
- subq t10, t11, t12
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(remq)
+#include "divrem.S"
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index 26bdd3b..e22d5ac 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -1,63 +1,6 @@
- /* This file is generated from divrem.m4; DO NOT EDIT! */
-/* For each N divided by D, we do:
- result = (double) N / (double) D
- Then, for each N mod D, we do:
- result = N - (D * divMODE (N, D))
+#define IS_REM 1
+#define SIZE 8
+#define SIGNED 0
+#define FUNC_NAME __remqu
- FIXME:
- The q and qu versions won't deal with operands > 50 bits. We also
- don't check for divide by zero. */
-
-#include "DEFS.h"
-#if 0
-/* We do not handle div by zero yet. */
-#include <machine/pal.h>
-#endif
-#include <sysdep.h>
-
-/* Avoid the definition of ret that we set in the alpha sysdep.h. */
-#undef ret
-
-
-
-
-
-
-FUNC__(remqu)
- /* First set up the dividend. */
-
- stq t10,0(sp)
- ldt $f10,0(sp)
- cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
-
-
- /* Then set up the divisor. */
-
- stq t11,0(sp)
- ldt $f1,0(sp)
- cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
-
- /* Do the division. */
- divt $f10,$f1,$f10
- cvttqc $f10,$f10
-
- /* Put the result in t12. */
- stt $f10,0(sp)
- ldq t12,0(sp)
-
-
- /* Compute the remainder. */
- mulq t11, t12, t11
- subq t10, t11, t12
-
-
- lda sp,16(sp)
- ret zero,(t9),1
- .end NAME__(remqu)
+#include "divrem.S"
diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c
deleted file mode 100644
index 36f106c..0000000
--- a/sysdeps/alpha/strlen.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <string.h>
-
-/* Return the length of the null-terminated string STR. Scan for
- the null terminator quickly by testing eight bytes at a time. */
-
-size_t
-strlen (const char *str)
-{
- const char *char_ptr;
- const unsigned long int *longword_ptr;
-
- /* Handle the first few characters by reading one character at a time.
- Do this until STR is aligned on a 8-byte border. */
- for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
- if (*char_ptr == '\0')
- return char_ptr - str;
-
- longword_ptr = (unsigned long int *) char_ptr;
-
- for (;;)
- {
- const unsigned long int longword = *longword_ptr++;
- int mask;
-
- /* Set bits in MASK if bytes in LONGWORD are zero. */
- asm ("cmpbge $31, %1, %0" : "=r" (mask) : "r" (longword));
- if (mask)
- {
- /* Which of the bytes was the zero? */
- const char *cp = (const char *) (longword_ptr - 1);
- int i;
-
- for (i = 0; i < 8; i++)
- if (cp[i] == 0)
- return cp - str + i;
- }
- }
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95a89bf364c80593fcf146aeb5e0569b26c7f6b3
commit 95a89bf364c80593fcf146aeb5e0569b26c7f6b3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:47 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/divrem.S, sysdeps/alpha/htonl.S,
sysdeps/alpha/htons.S, sysdeps/alpha/machine-gmon.h,
sysdeps/alpha/_mcount.S, sysdeps/alpha/ntohl.s, sysdeps/alpha/ntohs.s,
sysdeps/alpha/strlen.S: New files.
diff --git a/sysdeps/alpha/_mcount.S b/sysdeps/alpha/_mcount.S
new file mode 100644
index 0000000..2d6e2ed
--- /dev/null
+++ b/sysdeps/alpha/_mcount.S
@@ -0,0 +1,112 @@
+/* Machine-specific calling sequence for `mcount' profiling function. alpha
+Copyright (C) 1995 Free Software Foundation, Inc.
+Contributed by David Mosberger (davidm@cs.arizona.edu).
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Assembly stub to invoke _mcount(). Compiler generated code calls
+this stub after executing a function's prologue and without saving any
+registers. It is therefore necessary to preserve a0..a5 as they may
+contain function arguments. To work correctly with frame- less
+functions, it is also necessary to preserve ra. Finally, division
+routines are invoked with a special calling convention and the
+compiler treats those calls as if they were instructions. In
+particular, it doesn't save any of the temporary registers (caller
+saved registers). It is therefore necessary to preserve all
+caller-saved registers as well
+
+Upon entering _mcount, register $at holds the return address and ra
+holds the return address of the function's caller (selfpc and frompc,
+respectively in gmon.c language...). */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+# include <regdef.h>
+#endif
+
+#undef ret /* discard `ret' as defined in sysdep.h */
+
+ .set noat
+ .set noreorder
+
+ENTRY(_mcount)
+ subq sp, 0xb0, sp
+ stq a0, 0x00(sp)
+ mov ra, a0 # a0 = caller-pc
+ stq a1, 0x08(sp)
+ mov $at, a1 # a1 = self-pc
+ stq $at, 0x10(sp)
+
+ stq a2, 0x18(sp)
+ stq a3, 0x20(sp)
+ stq a4, 0x28(sp)
+ stq a5, 0x30(sp)
+ stq ra, 0x38(sp)
+ stq gp, 0x40(sp)
+
+ br gp, 1f
+1: ldgp gp, 0(gp)
+
+ stq t0, 0x48(sp)
+ stq t1, 0x50(sp)
+ stq t2, 0x58(sp)
+ stq t3, 0x60(sp)
+ stq t4, 0x68(sp)
+ stq t5, 0x70(sp)
+ stq t6, 0x78(sp)
+
+ lda pv, __mcount
+
+ stq t7, 0x80(sp)
+ stq t8, 0x88(sp)
+ stq t9, 0x90(sp)
+ stq t10, 0x98(sp)
+ stq t11, 0xa0(sp)
+ stq v0, 0xa8(sp)
+
+ jsr ra, (pv), __mcount
+
+ ldq a0, 0x00(sp)
+ ldq a1, 0x08(sp)
+ ldq $at, 0x10(sp) # restore self-pc
+ ldq a2, 0x18(sp)
+ ldq a3, 0x20(sp)
+ ldq a4, 0x28(sp)
+ ldq a5, 0x30(sp)
+ ldq ra, 0x38(sp)
+ ldq gp, 0x40(sp)
+ mov $at, pv # make pv point to return address
+ ldq t0, 0x48(sp) # this is important under OSF/1 to
+ ldq t1, 0x50(sp) # ensure that the code that we return
+ ldq t2, 0x58(sp) # can correctly compute its gp
+ ldq t3, 0x60(sp)
+ ldq t4, 0x68(sp)
+ ldq t5, 0x70(sp)
+ ldq t6, 0x78(sp)
+ ldq t7, 0x80(sp)
+ ldq t8, 0x88(sp)
+ ldq t9, 0x90(sp)
+ ldq t10, 0x98(sp)
+ ldq t11, 0xa0(sp)
+ ldq v0, 0xa8(sp)
+
+ addq sp, 0xb0, sp
+ ret zero,($at),1
+
+ .end _mcount
diff --git a/sysdeps/alpha/divrem.S b/sysdeps/alpha/divrem.S
new file mode 100644
index 0000000..e6293bf
--- /dev/null
+++ b/sysdeps/alpha/divrem.S
@@ -0,0 +1,169 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The current Alpha chips don't provide hardware for integer
+division. The C compiler expects the functions
+
+ __divqu: 64-bit unsigned long divide
+ __remqu: 64-bit unsigned long remainder
+ __divqs/__remqs: signed 64-bit
+ __divlu/__remlu: unsigned 32-bit
+ __divls/__remls: signed 32-bit
+
+These are not normal C functions: instead of the normal calling
+sequence, these expect their arguments in registers t10 and t11, and
+return the result in t12 (aka pv). Registers AT and v0 may be
+clobbered (assembly temporary), anything else must be saved. */
+
+#ifdef __linux__
+# include <alpha/regdef.h>
+# include <asm/gentrap.h>
+# include <asm/pal.h>
+#else
+# include <regdef.h>
+# include <machine/pal.h>
+#endif
+
+#ifdef DEBUG
+# define arg1 a0
+# define arg2 a1
+# define result v0
+# define mask t0
+# define tmp0 t1
+# define tmp1 t2
+# define sign t3
+# define retaddr ra
+#else
+# define arg1 t10
+# define arg2 t11
+# define result t12
+# define mask v0
+# define tmp0 t0
+# define tmp1 t1
+# define sign t2
+# define retaddr t9
+#endif
+
+# define divisor arg2
+#if IS_REM
+# define dividend result
+# define quotient arg1
+# define GETDIVIDEND bis arg1,zero,dividend
+#else
+# define dividend arg1
+# define quotient result
+# define GETDIVIDEND
+#endif
+
+#if SIZE == 8
+# define LONGIFYarg1 GETDIVIDEND
+# define LONGIFYarg2
+#else
+# if SIGNED
+# define LONGIFYarg1 addl arg1,zero,dividend
+# define LONGIFYarg2 addl arg2,zero,divisor
+# else
+# define LONGIFYarg1 zapnot arg1,0x0f,dividend
+# define LONGIFYarg2 zapnot arg2,0x0f,divisor
+# endif
+#endif
+
+#if SIGNED
+# define SETSIGN(sign,reg,tmp) subq zero,reg,tmp; cmovlt sign,tmp,reg
+# if IS_REM
+# define GETSIGN(x,y,s) bis x,zero,s
+# else
+# define GETSIGN(x,y,s) xor x,y,s
+# endif
+#else
+# define SETSIGN(sign,reg,tmp)
+# define GETSIGN(x,y,s)
+#endif
+
+ .set noreorder
+ .set noat
+
+ .ent FUNC_NAME
+ .globl FUNC_NAME
+
+ .align 5
+FUNC_NAME:
+# define FRAME_SIZE 0x30
+ .frame sp,FRAME_SIZE,ra,0
+ lda sp,-FRAME_SIZE(sp)
+ .prologue 1
+ stq arg1,0x00(sp)
+ LONGIFYarg1
+ stq arg2,0x08(sp)
+ LONGIFYarg2
+ stq mask,0x10(sp)
+ bis zero,1,mask
+ stq tmp0,0x18(sp)
+ bis zero,zero,quotient
+ stq tmp1,0x20(sp)
+ beq divisor,divbyzero
+ stq sign,0x28(sp)
+ GETSIGN(dividend,divisor,sign)
+#if SIGNED
+ subq zero,dividend,tmp0
+ subq zero,divisor,tmp1
+ cmovlt dividend,tmp0,dividend
+ cmovlt divisor,tmp1,divisor
+#endif
+ /*
+ * Shift divisor left until either bit 63 is set or until it
+ * is at least as big as the dividend:
+ */
+ .align 3
+1: cmpule dividend,divisor,AT
+ blt divisor,2f
+ blbs AT,2f
+ addq mask,mask,mask
+ addq divisor,divisor,divisor
+ br 1b
+
+ .align 3
+2: addq mask,quotient,tmp0
+ cmpule divisor,dividend,AT
+ subq dividend,divisor,tmp1
+ srl divisor,1,divisor
+ srl mask,1,mask
+ cmovlbs AT,tmp0,quotient
+ cmovlbs AT,tmp1,dividend
+ bne mask,2b
+
+ ldq arg1,0x00(sp)
+ SETSIGN(sign,result,tmp0)
+done: ldq arg2,0x08(sp)
+ ldq mask,0x10(sp)
+ ldq tmp0,0x18(sp)
+ ldq tmp1,0x20(sp)
+ ldq sign,0x28(sp)
+ lda sp,FRAME_SIZE(sp)
+ ret zero,(retaddr),0
+
+divbyzero:
+ lda a0,GEN_INTDIV(zero)
+ call_pal PAL_gentrap
+ bis zero,zero,result /* if trap returns, return 0 */
+ ldq arg1,0x00(sp)
+ br done
+
+ .end FUNC_NAME
diff --git a/sysdeps/alpha/htonl.S b/sysdeps/alpha/htonl.S
new file mode 100644
index 0000000..d0bf7e1
--- /dev/null
+++ b/sysdeps/alpha/htonl.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+#include <regdef.h>
+#endif
+
+ENTRY(__htonl)
+ extlh a0,5,t1 # t1 = dd000000
+ zap a0,0xfd,t2 # t2 = 0000cc00
+ sll t2,5,t2 # t2 = 00198000
+ s8addl t2,t1,t1 # t1 = ddcc0000
+ zap a0,0xfb,t2 # t2 = 00bb0000
+ srl t2,8,t2 # t2 = 0000bb00
+ extbl a0,3,v0 # v0 = 000000aa
+ or t1,v0,v0 # v0 = ddcc00aa
+ or t2,v0,v0 # v0 = ddccbbaa
+ ret
+
+ .end __htonl
+
+strong_alias_asm(__htonl, __ntohl)
+weak_alias(__htonl, htonl)
+weak_alias(__htonl, ntohl)
diff --git a/sysdeps/alpha/htons.S b/sysdeps/alpha/htons.S
new file mode 100644
index 0000000..6e18c7c
--- /dev/null
+++ b/sysdeps/alpha/htons.S
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+#include <regdef.h>
+#endif
+
+ENTRY(__htons)
+ extwh a0,7,t1 # t1 = bb00
+ extbl a0,1,v0 # v0 = 00aa
+ bis v0,t1,v0 # v0 = bbaa
+ ret
+
+ .end __htons
+
+strong_alias_asm(__htons, __ntohs)
+weak_alias(__htons, htons)
+weak_alias(__htons, ntohs)
diff --git a/sysdeps/alpha/machine-gmon.h b/sysdeps/alpha/machine-gmon.h
new file mode 100644
index 0000000..a551e9f
--- /dev/null
+++ b/sysdeps/alpha/machine-gmon.h
@@ -0,0 +1,25 @@
+/* Machine-specific calling sequence for `mcount' profiling function. alpha
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define _MCOUNT_DECL void __mcount
+
+/* Call __mcount with our the return PC for our caller, and the return
+ PC our caller will return to. Empty since we use an assembly stub
+ instead. */
+#define MCOUNT
diff --git a/sysdeps/alpha/ntohl.s b/sysdeps/alpha/ntohl.s
new file mode 100644
index 0000000..6a99a01
--- /dev/null
+++ b/sysdeps/alpha/ntohl.s
@@ -0,0 +1,2 @@
+/* This is a dummy to avoid including the generic version. htonl and
+ntohl are identical and htonl.S defines appropriate aliases. */
diff --git a/sysdeps/alpha/ntohs.s b/sysdeps/alpha/ntohs.s
new file mode 100644
index 0000000..69992a8
--- /dev/null
+++ b/sysdeps/alpha/ntohs.s
@@ -0,0 +1,2 @@
+/* This is a dummy to avoid including the generic version. htons and
+ntohs are identical and htons.S defines appropriate aliases. */
diff --git a/sysdeps/alpha/strlen.S b/sysdeps/alpha/strlen.S
new file mode 100644
index 0000000..7e6a61b
--- /dev/null
+++ b/sysdeps/alpha/strlen.S
@@ -0,0 +1,75 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Finds length of a 0-terminated string. Optimized for the Alpha
+architecture:
+
+ - memory accessed as aligned quadwords only
+ - uses bcmpge to compare 8 bytes in parallel
+ - does binary search to find 0 byte in last
+ quadword (HAKMEM needed 12 instructions to
+ do this instead of the 9 instructions that
+ binary search needs). */
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+#include <regdef.h>
+#endif
+
+ .set noreorder
+ .set noat
+
+ENTRY(strlen)
+ ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
+ lda t1, -1(zero)
+ insqh t1, a0, t1
+ andnot a0, 7, v0
+ or t1, t0, t0
+ cmpbge zero, t0, t1 # t1 <- bitmask: bit i == 1 <==> i-th byte == 0
+ bne t1, found
+
+loop: ldq t0, 8(v0)
+ addq v0, 8, v0 # addr += 8
+ nop # helps dual issue last two insns
+ cmpbge zero, t0, t1
+ beq t1, loop
+
+found: blbs t1, done # make aligned case fast
+ negq t1, t2
+ and t1, t2, t1
+
+ and t1, 0x0f, t0
+ addq v0, 4, t2
+ cmoveq t0, t2, v0
+
+ and t1, 0x33, t0
+ addq v0, 2, t2
+ cmoveq t0, t2, v0
+
+ and t1, 0x55, t0
+ addq v0, 1, t2
+ cmoveq t0, t2, v0
+
+done: subq v0, a0, v0
+ ret
+
+ .end strlen
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e4e7fca8e8b2c68665b6864d1757fca20fbacf3
commit 4e4e7fca8e8b2c68665b6864d1757fca20fbacf3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:39 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/bsd/osf/alpha/sysdep.h: include
sysdeps/unix/alpha/sysdep.h and removed definitions now in that file.
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index fc661a6..7bd7192 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -19,58 +19,11 @@ Cambridge, MA 02139, USA. */
/* OSF/1 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
-#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/unix/alpha/sysdep.h>
-#ifdef ASSEMBLER
+#ifdef ASSEMBLER
#include <machine/pal.h> /* get PAL_callsys */
#include <regdef.h>
-#ifdef __STDC__
-#define ENTRY(name) \
- .globl name; \
- .ent name,0; \
- name##:; \
- .frame sp,0,ra
-#else
-#define ENTRY(name) \
- .globl name; \
- .ent name,0; \
- name/**/:; \
- .frame sp,0,ra
#endif
-
-#ifdef __STDC__
-#define PSEUDO(name, syscall_name, args) \
- ENTRY(name); \
- ldiq v0, SYS_##syscall_name; \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- beq a3, 10f; \
- br gp, 20f; \
-20:; \
- ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
-10:
-#else
-#define PSEUDO(name, syscall_name, args) \
- ENTRY(name); \
- ldiq v0, SYS_/**/syscall_name; \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- beq a3, 10f; \
- br gp, 20f; \
-20:; \
- ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
-10:
-#endif
-
-#define ret ret zero,(ra),1
-#define r0 v0
-#define r1 a4
-#define MOVE(x,y) mov x, y
-
-#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69ff466c6655ae494075836ca58a7eba0ab0d49c
commit 69ff466c6655ae494075836ca58a7eba0ab0d49c
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:32 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/setjmp_aux.c (__sigsetjmp_aux): restore return
address register before returning (gcc 2.7.1 doesn't do it,
presumably because $26 is declared as a global variable).
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
index f92517b..0f05f8b 100644
--- a/sysdeps/alpha/setjmp_aux.c
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -69,6 +69,8 @@ __sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp)
/* Save the signal mask if requested. */
__sigjmp_save (env, savemask);
+ retpc = env[0].__jmpbuf[0].__pc; /* restore ra, ugly... */
+
/* Return to the original caller of __sigsetjmp. */
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a4dc0f10b46da9de549c5354e7516948b8e9ec5
commit 0a4dc0f10b46da9de549c5354e7516948b8e9ec5
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:29 1996 +0000
Mon Mar 4 20:17:28 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: new file (syscall
expects set-value, not pointer to it).
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
new file mode 100644
index 0000000..29cba8d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
@@ -0,0 +1,39 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* sigsuspend is a special syscall since it needs to dereference the
+sigset. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(sigsuspend)
+ .prologue 0
+
+ ldq a0, 0(a0)
+ ldi v0, __NR_sigsuspend
+ call_pal PAL_callsys
+ bne a3, error
+ ret
+
+error: br gp, 1f
+1: ldgp gp, 0(gp)
+ lda pv, syscall_error
+ jmp zero, (pv)
+
+ .end sigsuspend
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c56fbe7e02b7b5002038efee0d28a808a290819a
commit c56fbe7e02b7b5002038efee0d28a808a290819a
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:25 1996 +0000
Tue Feb 20 11:33:46 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/syscalls.list (select, bind,
connect, getpeername, getsockname, listen, recv, recvfrom,
recvmsg, send, sendmsg, sendto, setsockopt, shutdown, socketpair):
added to override same-name assembly file in the parent directory.
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/Makefile,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/fpu_control.c,
sysdeps/unix/sysv/linux/alpha/fpu_control.h,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/setfpucw.c,
sysdeps/unix/sysv/linux/alpha/sigprocmask.c,
sysdeps/unix/sysv/linux/alpha/speed.c,
sysdeps/unix/sysv/linux/alpha/start.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/syscalls.list,
sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/sysdep.h: New files.
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
new file mode 100644
index 0000000..a842908
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -0,0 +1,45 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+# used to implement inb()/outb() etc.
+sethae - sethae 1 __sethae
+
+msgctl - msgctl 3 __msgctl msgctl
+msgget - msgget 2 __msgget msgget
+msgrcv - msgrcv 5 __msgrcv msgrcv
+msgsnd - msgsnd 4 __msgsnd msgsnd
+shmat - osf_shmat 3 __shmat shmat
+shmctl - shmctl 3 __shmctl shmctl
+shmdt - shmdt 1 __shmdt shmdt
+shmget - shmget 3 __shmget shmget
+semop - semop 3 __semop semop
+semget - semget 3 __semget semget
+semctl - semctl 4 __semctl semctl
+
+osf_sigprocmask - osf_sigprocmask 2 __osf_sigprocmask
+
+getdents - getdents 3 __getdirentries getdirentries
+getpeername - getpeername 3 __getpeername getpeername
+getpriority - getpriority 2 __getpriority getpriority
+mmap - mmap 6 __mmap mmap
+
+# these are actually common with the x86:
+fstatfs - fstatfs 2 __fstatfs fstatfs
+statfs - statfs 2 __statfs statfs
+
+# override select.S in parent directory:
+select - select 5 __select select
+accept - accept 3 __accept accept
+bind - bind 3 __bind bind
+connect - connect 3 __connect connect
+getpeername - getpeername 3 __getpeername getpeername
+getsockname - getsockname 3 __getsockname getsockname
+listen - listen 2 __listen listen
+recv - recv 4 __recv recv
+recvfrom - recvfrom 6 __recvfrom recvfrom
+recvmsg - recvmsg 3 __recvmsg recvmsg
+send - send 4 __send send
+sendmsg - sendmsg 3 __sendmsg sendmsg
+sendto - sendto 6 __sendto sendto
+setsockopt - setsockopt 5 __setsockopt setsockopt
+shutdown - shutdown 2 __shutdown shutdown
+socketpair - socketpair 4 __socketpair socketpair
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b434211b7d48bd5b61585797004ec813948798b0
commit b434211b7d48bd5b61585797004ec813948798b0
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:17 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/Makefile (sysdep_routines): Removed all rules
pertaining to integer division/remainder routines since new code
doesn't require them.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 8573ca8..4bb1f29 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@zen.org).
# The GNU C Library is free software; you can redistribute it and/or
@@ -16,79 +16,16 @@
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
+ifeq ($(subdir),gmon)
+sysdep_routines := bb_init_func _mcount
+endif
+
ifeq ($(subdir),setjmp)
sysdep_routines := $(sysdep_routines) setjmp_aux
endif
ifeq ($(subdir),gnulib)
-routines = $(divrem)
+routines = $(divrem)
endif # gnulib
-# We distribute these files, even though they are generated,
-# so as to avoid the need for a functioning m4 to build the library.
divrem := divl divlu divq divqu reml remlu remq remqu
-
-+divrem-NAME-divl := divl
-+divrem-NAME-divlu := divlu
-+divrem-NAME-divq := divq
-+divrem-NAME-divqu := divqu
-+divrem-NAME-reml := reml
-+divrem-NAME-remlu := remlu
-+divrem-NAME-remq := remq
-+divrem-NAME-remqu := remqu
-+divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
-
-+divrem-OP-divl := divl
-+divrem-OP-divlu := divlu
-+divrem-OP-divq := divq
-+divrem-OP-divqu := divqu
-+divrem-OP-reml := reml
-+divrem-OP-remlu := remlu
-+divrem-OP-remq := remq
-+divrem-OP-remqu := remqu
-+divrem-BASEOP-divl := div
-+divrem-BASEOP-divlu := div
-+divrem-BASEOP-divq := div
-+divrem-BASEOP-divqu := div
-+divrem-BASEOP-reml := rem
-+divrem-BASEOP-remlu := rem
-+divrem-BASEOP-remq := rem
-+divrem-BASEOP-remqu := rem
-+divrem-S-divl := true
-+divrem-S-divlu := false
-+divrem-S-divq := true
-+divrem-S-divqu := false
-+divrem-S-reml := true
-+divrem-S-remlu := false
-+divrem-S-remq := true
-+divrem-S-remqu := false
-+divrem-SIZE-divl := l
-+divrem-SIZE-divlu := l
-+divrem-SIZE-divq := q
-+divrem-SIZE-divqu := q
-+divrem-SIZE-reml := l
-+divrem-SIZE-remlu := l
-+divrem-SIZE-remq := q
-+divrem-SIZE-remqu := q
-+divrem-MODE-divl := l
-+divrem-MODE-divlu := lu
-+divrem-MODE-divq := q
-+divrem-MODE-divqu := qu
-+divrem-MODE-reml := l
-+divrem-MODE-remlu := lu
-+divrem-MODE-remq := q
-+divrem-MODE-remqu := qu
-
-$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4
- (echo "define(OP,\`$(+divrem-NAME)')\
- define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\
- define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\
- define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\
- define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\
- define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\
- /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
- cat $<) | $(M4) > $@-tmp
-# Make it unwritable so noone will edit it by mistake.
- -chmod a-w $@-tmp
- mv -f $@-tmp $@
- test ! -d CVS || cvs commit -m'Regenerated from $<' $@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e75790a4d27ed5231f966050bd972a6dd098bea1
commit e75790a4d27ed5231f966050bd972a6dd098bea1
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:52:11 1996 +0000
Wed Feb 21 23:56:41 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/setjmp.S: switched order in which sp and fp are
passed to match what __sigsetjmp_aux() expects.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 08932cc..8ea2b50 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__sigsetjmp)
lda $27, __sigsetjmp_aux/* Load address to jump to. */
- bis $15, $15, $18 /* Pass FP as 3rd arg. */
- bis $30, $30, $19 /* Pass SP as 4th arg. */
+ bis $30, $30, $18 /* Pass SP as 3rd arg. */
+ bis $15, $15, $19 /* Pass FP as 4th arg. */
jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
.end __sigsetjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d153ca687cf4bd97bc3458ec001ca4fe1bc611fe
commit d153ca687cf4bd97bc3458ec001ca4fe1bc611fe
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:51:41 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/__longjmp.c (__longjmp): moved dummy while loop
to end of function to avoid a jump across NOPs.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index f3f35ee..65b6804 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -38,6 +38,8 @@ register double
void
__longjmp (__jmp_buf env, int val)
{
+ register long int retval asm ("$0");
+
/* Restore the integer registers. */
r9 = env[0].__9;
r10 = env[0].__10;
@@ -73,18 +75,18 @@ __longjmp (__jmp_buf env, int val)
precisely the FP and SP the desired environment needs,
we must avoid the compiler doing anything with the stack. */
+
+ asm volatile
+ ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */
+ "ret $31, (%2), 1" /* return $0 */
+ : "=r" (retval)
+ /* The "0" constraint should force VAL into $0. */
+ : "0" (val), "r" (retpc));
+
while (1)
{
/* The loop is just to avoid `volatile function does return' warnings.
The instruction will only be executed once. */
-
- register long int retval asm ("$0");
-
- asm volatile
- ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */
- "ret $31, (%2), 1" /* return $0 */
- : "=r" (retval)
- /* The "0" constraint should force VAL into $0. */
- : "0" (val), "r" (retpc));
+ asm volatile ("");
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56759be20aa7e309774b24bc388843f498740f1e
commit 56759be20aa7e309774b24bc388843f498740f1e
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:51:34 1996 +0000
Sat Feb 17 11:29:29 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/ioperm.c: new file.
diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c
new file mode 100644
index 0000000..306c86b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c
@@ -0,0 +1,441 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by David Mosberger.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* I/O access is restricted to ISA port space (ports 0..65535).
+Modern devices hopefully are sane enough not to put any performance
+critical registers in i/o space.
+
+On the first call to ioperm() or _sethae(), the entire (E)ISA port
+space is mapped into the virtual address space at address io.base.
+mprotect() calls are then used to enable/disable access to ports. Per
+page, there are PAGE_SIZE>>IO_SHIFT I/O ports (e.g., 256 ports on a
+Low Cost Alpha based system using 8KB pages).
+
+Keep in mind that this code should be able to run in a 32bit address
+space. It is therefore unreasonable to expect mmap'ing the entire
+sparse address space would work (e.g., the Low Cost Alpha chip has an
+I/O address space that's 512MB large!). */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <sys/types.h>
+#include <sys/mman.h>
+
+#include <asm/io.h>
+#include <asm/page.h>
+#include <asm/system.h>
+
+#undef inb
+#undef inw
+#undef inl
+#undef outb
+#undef outw
+#undef outl
+
+#define PATH_CPUINFO "/proc/cpuinfo"
+
+#define MAX_PORT 0x10000
+#define vuip volatile unsigned int *
+
+#define JENSEN_IO_BASE (IDENT_ADDR + 0x0300000000UL)
+#define APECS_IO_BASE (IDENT_ADDR + 0x01c0000000UL)
+#define ALCOR_IO_BASE (IDENT_ADDR + 0x8580000000UL)
+
+enum {
+ IOSYS_JENSEN = 0, IOSYS_APECS = 1, IOSYS_ALCOR = 2
+} iosys_t;
+
+struct ioswtch {
+ void (*sethae)(unsigned long addr);
+ void (*outb)(unsigned char b, unsigned long port);
+ void (*outw)(unsigned short b, unsigned long port);
+ void (*outl)(unsigned int b, unsigned long port);
+ unsigned int (*inb)(unsigned long port);
+ unsigned int (*inw)(unsigned long port);
+ unsigned int (*inl)(unsigned long port);
+};
+
+static struct platform {
+ const char *name;
+ int io_sys;
+} platform[] = {
+ {"Alcor", IOSYS_ALCOR},
+ {"Avanti", IOSYS_APECS},
+ {"Cabriolet", IOSYS_APECS},
+ {"EB64+", IOSYS_APECS},
+ {"EB66", IOSYS_APECS},
+ {"EB66P", IOSYS_APECS},
+ {"Jensen", IOSYS_JENSEN},
+ {"Mustang", IOSYS_APECS},
+ {"Noname", IOSYS_APECS},
+};
+
+
+static struct {
+ struct hae hae;
+ unsigned long base;
+ struct ioswtch * swp;
+ int sys;
+} io;
+
+
+static inline unsigned long
+port_to_cpu_addr (unsigned long port, int iosys, int size)
+{
+ if (iosys == IOSYS_JENSEN) {
+ return (port << 7) + ((size - 1) << 4) + io.base;
+ } else {
+ return (port << 5) + ((size - 1) << 3) + io.base;
+ }
+}
+
+
+static inline void
+inline_sethae (unsigned long addr, int iosys)
+{
+ if (iosys == IOSYS_JENSEN) {
+ /* hae on the Jensen is bits 31:25 shifted right */
+ addr >>= 25;
+ if (addr != io.hae.cache) {
+ __sethae (addr);
+ io.hae.cache = addr;
+ }
+ } else {
+ unsigned long msb;
+
+ /* no need to set hae if msb is 0: */
+ msb = addr & 0xf8000000;
+ if (msb && msb != io.hae.cache) {
+ __sethae (msb);
+ io.hae.cache = msb;
+ }
+ }
+}
+
+
+static inline void
+inline_outb (unsigned char b, unsigned long port, int iosys)
+{
+ unsigned int w;
+ unsigned long addr = port_to_cpu_addr (port, iosys, 1);
+
+ inline_sethae (0, iosys);
+ asm ("insbl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
+ *(vuip)addr = w;
+ mb ();
+}
+
+
+static inline void
+inline_outw (unsigned short b, unsigned long port, int iosys)
+{
+ unsigned int w;
+ unsigned long addr = port_to_cpu_addr (port, iosys, 2);
+
+ inline_sethae (0, iosys);
+ asm ("inswl %2,%1,%0" : "r=" (w) : "ri" (port & 0x3), "r" (b));
+ *(vuip)addr = w;
+ mb ();
+}
+
+
+static inline void
+inline_outl (unsigned int b, unsigned long port, int iosys)
+{
+ unsigned long addr = port_to_cpu_addr (port, iosys, 4);
+
+ if (port >= MAX_PORT)
+ return;
+
+ inline_sethae (0, iosys);
+ *(vuip)addr = b;
+ mb ();
+}
+
+
+static inline unsigned int
+inline_inb (unsigned long port, int iosys)
+{
+ unsigned long result, addr = port_to_cpu_addr (port, iosys, 1);
+
+ inline_sethae (0, iosys);
+ result = *(vuip) addr;
+ result >>= (port & 3) * 8;
+ return 0xffUL & result;
+}
+
+
+static inline unsigned int
+inline_inw (unsigned long port, int iosys)
+{
+ unsigned long result, addr = port_to_cpu_addr (port, iosys, 2);
+
+ inline_sethae (0, iosys);
+ result = *(vuip) addr;
+ result >>= (port & 3) * 8;
+ return 0xffffUL & result;
+}
+
+
+static inline unsigned int
+inline_inl (unsigned long port, int iosys)
+{
+ unsigned long addr = port_to_cpu_addr (port, iosys, 4);
+
+ inline_sethae (0, iosys);
+ return *(vuip) addr;
+}
+
+
+#define DCL_SETHAE(name, iosys) \
+static void \
+name##_sethae (unsigned long addr) \
+{ \
+ inline_sethae (addr, IOSYS_##iosys); \
+}
+
+#define DCL_OUT(name, func, type, iosys) \
+static void \
+name##_##func (unsigned type b, unsigned long addr) \
+{ \
+ inline_##func (b, addr, IOSYS_##iosys); \
+}
+
+
+#define DCL_IN(name, func, iosys) \
+static unsigned int \
+name##_##func (unsigned long addr) \
+{ \
+ return inline_##func (addr, IOSYS_##iosys); \
+}
+
+
+DCL_SETHAE(jensen, JENSEN)
+DCL_OUT(jensen, outb, char, JENSEN)
+DCL_OUT(jensen, outw, short, JENSEN)
+DCL_OUT(jensen, outl, int, JENSEN)
+DCL_IN(jensen, inb, JENSEN)
+DCL_IN(jensen, inw, JENSEN)
+DCL_IN(jensen, inl, JENSEN)
+
+/* The APECS functions are also used for ALCOR since they are
+ identical. */
+
+DCL_SETHAE(apecs, APECS)
+DCL_OUT(apecs, outb, char, APECS)
+DCL_OUT(apecs, outw, short, APECS)
+DCL_OUT(apecs, outl, int, APECS)
+DCL_IN(apecs, inb, APECS)
+DCL_IN(apecs, inw, APECS)
+DCL_IN(apecs, inl, APECS)
+
+struct ioswtch ioswtch[] = {
+ {
+ jensen_sethae,
+ jensen_outb, jensen_outw, jensen_outl,
+ jensen_inb, jensen_inw, jensen_inl
+ },
+ {
+ apecs_sethae,
+ apecs_outb, apecs_outw, apecs_outl,
+ apecs_inb, apecs_inw, apecs_inl
+ }
+};
+
+
+static int
+init_iosys (void)
+{
+ char name[256], value[256];
+ FILE * fp;
+ int i;
+
+ fp = fopen (PATH_CPUINFO, "r");
+ if (!fp)
+ return -1;
+
+ while (fscanf (fp, "%256[^:]: %256[^\n]\n", name, value) == 2) {
+ if (strncmp (name, "system type", 11) == 0) {
+ for (i = 0; i < sizeof (platform) / sizeof (platform[0]); ++i) {
+ if (strcmp (platform[i].name, value) == 0) {
+ fclose (fp);
+ io.sys = platform[i].io_sys;
+ if (io.sys == IOSYS_JENSEN)
+ io.swp = &ioswtch[0];
+ else
+ io.swp = &ioswtch[1];
+ return 0;
+ }
+ }
+ }
+ }
+ fclose (fp);
+ errno = ENODEV;
+ return -1;
+}
+
+
+int
+_ioperm (unsigned long from, unsigned long num, int turn_on)
+{
+ unsigned long addr, len;
+ int prot;
+
+ if (!io.swp && init_iosys () < 0)
+ return -1;
+
+ /* this test isn't as silly as it may look like; consider overflows! */
+ if (from >= MAX_PORT || from + num > MAX_PORT) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (turn_on) {
+ if (!io.base) {
+ unsigned long base;
+ int fd;
+
+ io.hae.reg = 0; /* not used in user-level */
+ io.hae.cache = 0;
+ __sethae (io.hae.cache); /* synchronize with hw */
+
+ fd = open ("/dev/mem", O_RDWR);
+ if (fd < 0)
+ return fd;
+
+ switch (io.sys) {
+ case IOSYS_JENSEN: base = JENSEN_IO_BASE; break;
+ case IOSYS_APECS: base = APECS_IO_BASE; break;
+ case IOSYS_ALCOR: base = ALCOR_IO_BASE; break;
+ default:
+ errno = ENODEV;
+ return -1;
+ }
+ addr = port_to_cpu_addr (from, io.sys, 1);
+ addr &= PAGE_MASK;
+ len = port_to_cpu_addr (MAX_PORT, io.sys, 1) - addr;
+ io.base =
+ (unsigned long) __mmap (0, len, PROT_NONE, MAP_SHARED, fd, base);
+ close (fd);
+ if ((long) io.base == -1)
+ return -1;
+ }
+ prot = PROT_READ | PROT_WRITE;
+ } else {
+ if (!io.base)
+ return 0; /* never was turned on... */
+
+ /* turnoff access to relevant pages: */
+ prot = PROT_NONE;
+ }
+ addr = port_to_cpu_addr (from, io.sys, 1);
+ addr &= PAGE_MASK;
+ len = port_to_cpu_addr (from + num, io.sys, 1) - addr;
+ return mprotect ((void *) addr, len, prot);
+}
+
+
+int
+_iopl (unsigned int level)
+{
+ if (level > 3) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (level) {
+ return _ioperm (0, MAX_PORT, 1);
+ }
+ return 0;
+}
+
+
+void
+_sethae (unsigned long addr)
+{
+ if (!io.swp && init_iosys () < 0)
+ return;
+
+ io.swp->sethae (addr);
+}
+
+
+void
+_outb (unsigned char b, unsigned long port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ io.swp->outb (b, port);
+}
+
+
+void
+_outw (unsigned short b, unsigned long port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ io.swp->outw (b, port);
+}
+
+
+void
+_outl (unsigned int b, unsigned long port)
+{
+ if (port >= MAX_PORT)
+ return;
+
+ io.swp->outl (b, port);
+}
+
+
+unsigned int
+_inb (unsigned long port)
+{
+ return io.swp->inb (port);
+}
+
+
+unsigned int
+_inw (unsigned long port)
+{
+ return io.swp->inw (port);
+}
+
+
+unsigned int
+_inl (unsigned long port)
+{
+ return io.swp->inl (port);
+}
+
+
+weak_alias (_sethae, sethae);
+weak_alias (_ioperm, ioperm);
+weak_alias (_iopl, iopl);
+weak_alias (_inb, inb);
+weak_alias (_inw, inw);
+weak_alias (_inl, inl);
+weak_alias (_outb, outb);
+weak_alias (_outw, outw);
+weak_alias (_outl, outl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6932e4446116214695007f42a3426baf5333bc2f
commit 6932e4446116214695007f42a3426baf5333bc2f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 19 19:51:23 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/unix/sysv/linux/alpha/Makefile,
sysdeps/unix/sysv/linux/alpha/brk.S,
sysdeps/unix/sysv/linux/alpha/fpu_control.c,
sysdeps/unix/sysv/linux/alpha/fpu_control.h,
sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
sysdeps/unix/sysv/linux/alpha/pipe.S,
sysdeps/unix/sysv/linux/alpha/setfpucw.c,
sysdeps/unix/sysv/linux/alpha/sigprocmask.c,
sysdeps/unix/sysv/linux/alpha/speed.c,
sysdeps/unix/sysv/linux/alpha/start.S,
sysdeps/unix/sysv/linux/alpha/syscall.S,
sysdeps/unix/sysv/linux/alpha/syscalls.list,
sysdeps/unix/sysv/linux/alpha/sysdep.S,
sysdeps/unix/sysv/linux/alpha/sysdep.h: New files.
diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile
new file mode 100644
index 0000000..9e12a0d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -0,0 +1,7 @@
+ifeq ($(subdir), misc)
+headers += alpha/regdef.h
+
+sysdep_routines := $(sysdep_routines) \
+ ieee_get_fp_control ieee_set_fp_control fpu_control setfpucw \
+ sethae ioperm osf_sigprocmask fstatfs statfs
+endif
diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S
new file mode 100644
index 0000000..afd2e32
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/brk.S
@@ -0,0 +1,60 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* __brk is a special syscall under Linux since it never returns an
+error. Instead, the error condition is indicated by returning the old
+break value (instead of the new, requested one). */
+
+#include <sysdep.h>
+#include <errnos.h>
+
+#ifndef HAVE_GNU_LD
+#define _end end
+#endif
+
+ .extern _end,8
+
+ .data
+
+ .globl __curbrk
+__curbrk:
+ .quad _end
+
+ .text
+ENTRY(__brk)
+ ldgp gp, 0(t12)
+ .prologue 1
+
+ ldi v0, __NR_brk
+ call_pal PAL_callsys
+ subq a0, v0, t0
+ bne t0, error
+
+ /* Update __curbrk and return cleanly. */
+ stl a0, __curbrk
+ mov zero, v0
+ ret
+
+ /* What a horrible way to die. */
+error: ldi v0, ENOMEM
+ lda pv, syscall_error
+ jmp zero,(pv)
+
+ .end __brk
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.c b/sysdeps/unix/sysv/linux/alpha/fpu_control.c
new file mode 100644
index 0000000..20c032a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fpu_control.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@azstarnet.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <fpu_control.h>
+
+fpu_control_t __fpu_control = _FPU_DEFAULT;
diff --git a/sysdeps/unix/sysv/linux/alpha/fpu_control.h b/sysdeps/unix/sysv/linux/alpha/fpu_control.h
new file mode 100644
index 0000000..782f33e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fpu_control.h
@@ -0,0 +1,105 @@
+/* Copyright (C) 1993 Olaf Flebbe
+This file is part of the Linux C Library.
+
+The Linux C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The Linux C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details. */
+
+#ifndef _ALPHA_FPU_CONTROL_H
+#define _ALPHA_FPU_CONTROL_H
+
+/*
+ * Since many programs seem to hardcode the values passed to __setfpucw()
+ * (rather than using the manifest constants) we emulate the x87 interface
+ * here (at least where this makes sense).
+ *
+ * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
+ * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
+ *
+ * IM: Invalid operation mask
+ * DM: Denormalized operand mask
+ * ZM: Zero-divide mask
+ * OM: Overflow mask
+ * UM: Underflow mask
+ * PM: Precision (inexact result) mask
+ *
+ * Mask bit is 1 means no interrupt.
+ *
+ * PC: Precision control
+ * 11 - round to extended precision
+ * 10 - round to double precision
+ * 00 - round to single precision
+ *
+ * RC: Rounding control
+ * 00 - rounding to nearest
+ * 01 - rounding down (toward - infinity)
+ * 10 - rounding up (toward + infinity)
+ * 11 - rounding toward zero
+ *
+ * IC: Infinity control
+ * That is for 8087 and 80287 only.
+ *
+ * The hardware default is 0x037f. I choose 0x1372.
+ */
+
+#include <features.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_IM 0x01
+#define _FPU_MASK_DM 0x02
+#define _FPU_MASK_ZM 0x04
+#define _FPU_MASK_OM 0x08
+#define _FPU_MASK_UM 0x10
+#define _FPU_MASK_PM 0x20
+
+/* precision control */
+#define _FPU_EXTENDED 0x300 /* RECOMMENDED */
+#define _FPU_DOUBLE 0x200
+#define _FPU_SINGLE 0x0 /* DO NOT USE */
+
+/*
+ * rounding control---notice that on the Alpha this affects only
+ * instructions with the dynamic rounding mode qualifier (/d).
+ */
+#define _FPU_RC_NEAREST 0x000 /* RECOMMENDED */
+#define _FPU_RC_DOWN 0x400
+#define _FPU_RC_UP 0x800
+#define _FPU_RC_ZERO 0xC00
+
+#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
+
+
+/* Now two recommended cw */
+
+/* Linux default:
+ - extended precision
+ - rounding to positive infinity. There is no /p instruction
+ qualifier. By setting the dynamic rounding mode to +infinity,
+ one can use /d to get round to +infinity with no extra overhead
+ (so long as the default isn't changed, of course...)
+ - exceptions on overflow, zero divide and NaN */
+#define _FPU_DEFAULT 0x1f72
+
+/* IEEE: same as above, but exceptions */
+#define _FPU_IEEE 0x1f7f
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+__BEGIN_DECLS
+
+/* called by start.o. It can be used to manipulate fpu control word. */
+extern void __setfpucw __P ((unsigned short));
+
+__END_DECLS
+
+#endif /* _ALPHA_FPU_CONTROL */
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
new file mode 100644
index 0000000..4c86e39
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -0,0 +1,44 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@azstarnet.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#define GSI_IEEE_FP_CONTROL 45
+
+ .text
+ENTRY(__ieee_get_fp_control)
+ lda sp, -8(sp)
+ .prologue 1
+
+ mov sp, a1
+ ldi a0, GSI_IEEE_FP_CONTROL
+ ldi v0, __NR_osf_getsysinfo
+ call_pal PAL_callsys
+ bne a3, error
+
+ ldq v0, 0(sp)
+ lda sp, 8(sp)
+ ret
+
+error: lda sp, 8(sp)
+ lda pv, syscall_error
+ jmp zero,(pv)
+
+ .end __ieee_get_fp_control
+
+weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
new file mode 100644
index 0000000..d10e9bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -0,0 +1,44 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@azstarnet.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#define SSI_IEEE_FP_CONTROL 14
+
+ .text
+ENTRY(__ieee_set_fp_control)
+ lda sp, -8(sp)
+ .prologue 1
+
+ stq a0, 0(sp)
+ mov sp, a1
+ ldi a0, SSI_IEEE_FP_CONTROL
+ ldi v0, __NR_osf_setsysinfo
+ call_pal PAL_callsys
+
+ lda sp, 8(sp)
+
+ bne a3, error
+ ret
+
+error: lda pv, syscall_error
+ jmp zero,(pv)
+
+ .end __ieee_set_fp_control
+
+weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
diff --git a/sysdeps/unix/sysv/linux/alpha/pipe.S b/sysdeps/unix/sysv/linux/alpha/pipe.S
new file mode 100644
index 0000000..f613b08
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/pipe.S
@@ -0,0 +1,43 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* __pipe is a special syscall since it returns two values. */
+
+#include <sysdep.h>
+
+ .text
+ENTRY(__pipe)
+ .prologue 0
+
+ ldi v0, __NR_pipe
+ call_pal PAL_callsys
+ bne a3, error
+
+ stl r0, 0(a0)
+ stl r1, 4(a0)
+ mov zero, v0
+ ret
+
+error: br gp, 1f
+1: ldgp gp, 0(gp)
+ lda pv, syscall_error
+ jmp zero, (pv)
+
+ .end __pipe
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
new file mode 100644
index 0000000..43e8536
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -0,0 +1,65 @@
+#include <fpu_control.h>
+
+#include <asm/fpu.h>
+
+extern void __ieee_set_fp_control (unsigned long);
+extern unsigned long __ieee_get_fp_control (void);
+
+
+static inline unsigned long
+rdfpcr (void)
+{
+ unsigned long fpcr;
+
+ asm ("trapb; mf_fpcr $f0; trapb; stt $f0,%0" : "m="(fpcr));
+ return fpcr;
+}
+
+
+static inline void
+wrfpcr (unsigned long fpcr)
+{
+ asm volatile ("ldt $f0,%0; trapb; mt_fpcr $f0; trapb" :: "m"(fpcr));
+}
+
+
+void
+__setfpucw (unsigned short fpu_control)
+{
+ unsigned long fpcr = 0, fpcw = 0;
+
+ if (!fpu_control)
+ fpu_control = _FPU_DEFAULT;
+
+ /* first, set dynamic rounding mode: */
+
+ fpcr = rdfpcr();
+ fpcr &= ~FPCR_DYN_MASK;
+ switch (fpu_control & 0xc00) {
+ case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break;
+ case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break;
+ case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break;
+ case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break;
+ }
+ wrfpcr(fpcr);
+
+ /* now tell kernel about traps that we like to hear about: */
+
+ fpcw = __ieee_get_fp_control();
+ fpcw &= ~IEEE_TRAP_ENABLE_MASK;
+
+ if (!(fpu_control & _FPU_MASK_IM))
+ fpcw |= IEEE_TRAP_ENABLE_INV;
+ if (!(fpu_control & _FPU_MASK_DM))
+ fpcw |= IEEE_TRAP_ENABLE_UNF;
+ if (!(fpu_control & _FPU_MASK_ZM))
+ fpcw |= IEEE_TRAP_ENABLE_DZE;
+ if (!(fpu_control & _FPU_MASK_OM))
+ fpcw |= IEEE_TRAP_ENABLE_OVF;
+ if (!(fpu_control & _FPU_MASK_PM))
+ fpcw |= IEEE_TRAP_ENABLE_INE;
+
+ __ieee_set_fp_control(fpcw);
+
+ __fpu_control = fpu_control; /* update global copy */
+}
diff --git a/sysdeps/unix/sysv/linux/alpha/sigprocmask.c b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
new file mode 100644
index 0000000..a1d5636
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sigprocmask.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@azstarnet.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#include <signal.h>
+
+extern unsigned long __osf_sigprocmask (int how, unsigned long newmask);
+
+int
+__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+{
+ sigset_t setval;
+ long result;
+
+ if (set) {
+ setval = *set;
+ } else {
+ sigemptyset(&setval);
+ how = SIG_BLOCK; /* ensure blocked mask doesn't get changed */
+ }
+ result = __osf_sigprocmask(how, setval);
+ if (result == -1) {
+ /* if there are ever more than 63 signals, we need to recode this
+ in assembler since we wouldn't be able to distinguish a mask of
+ all 1s from -1, but for now, we're doing just fine... */
+ return result;
+ }
+ if (oset) {
+ *oset = result;
+ }
+ return 0;
+}
+
+weak_alias (__sigprocmask, sigprocmask);
diff --git a/sysdeps/unix/sysv/linux/alpha/speed.c b/sysdeps/unix/sysv/linux/alpha/speed.c
new file mode 100644
index 0000000..b61cfbb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/speed.c
@@ -0,0 +1,102 @@
+/* `struct termios' speed frobnication functions. Linux version.
+Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <stddef.h>
+#include <errno.h>
+#include <termios.h>
+
+static const speed_t speeds[] =
+ {
+ 0,
+ 50,
+ 75,
+ 110,
+ 134,
+ 150,
+ 200,
+ 300,
+ 600,
+ 1200,
+ 1800,
+ 2400,
+ 4800,
+ 9600,
+ 19200,
+ 38400,
+ 57600,
+ 115200,
+ 230400,
+ };
+
+
+/* Return the output baud rate stored in *TERMIOS_P. */
+speed_t
+cfgetospeed (termios_p)
+ const struct termios *termios_p;
+{
+ speed_t retval = termios_p->c_cflag & (CBAUD | CBAUDEX);
+
+ if (retval & CBAUDEX)
+ {
+ retval &= ~CBAUDEX;
+ retval |= CBAUD + 1;
+ }
+
+ return retval;
+}
+
+/* Return the input baud rate stored in *TERMIOS_P.
+ For Linux there is no difference between input and output speed. */
+strong_alias (cfgetospeed, cfgetispeed);
+
+/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
+int
+cfsetospeed (termios_p, speed)
+ struct termios *termios_p;
+ speed_t speed;
+{
+ register unsigned int i;
+
+ if (termios_p == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* This allows either B1200 or 1200 to work. XXX
+ Do we really want to try to support this, given that
+ fetching the speed must return one or the other? */
+
+ for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
+ if (i == speed || speeds[i] == speed)
+ {
+ termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
+ termios_p->c_cflag |= (i & CBAUD);
+ if (i & ~CBAUD)
+ termios_p->c_cflag |= CBAUDEX;
+ return 0;
+ }
+
+ errno = EINVAL;
+ return -1;
+}
+
+/* Set the input baud rate stored in *TERMIOS_P to SPEED.
+ For Linux there is no difference between input and output speed. */
+strong_alias (cfsetospeed, cfsetispeed);
diff --git a/sysdeps/unix/sysv/linux/alpha/start.S b/sysdeps/unix/sysv/linux/alpha/start.S
new file mode 100644
index 0000000..d1966a8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/start.S
@@ -0,0 +1,93 @@
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.comm errno, 4
+
+ .text
+ENTRY(__start)
+ lda sp, -16(sp)
+ stq zero, 8(sp) /* terminate frame chain */
+
+ br t0, 1f
+1: ldgp gp, 0(t0)
+
+ mov zero, a0 /* establish __fpu_control w/kernel */
+ jsr ra, __setfpucw
+ ldgp gp, 0(ra)
+
+ /* clear out errno. */
+ lda t0, errno
+ stl zero, 0(t0)
+
+ ldl a0, 16(sp) /* get argc */
+ lda a1, 24(sp) /* get argv */
+
+ /* initialize environ: */
+ lda t0, environ
+ s8addq a0, a1, a2
+ addq a2, 0x8, a2
+ stq a2, 0(t0)
+
+#ifndef HAVE_INITFINI
+ mov a0, s0
+ mov a1, s1
+ mov a2, s2
+
+ jsr ra, __libc_init
+ ldgp gp, 0(ra)
+
+ mov s0, a0
+ mov s1, a1
+ mov s2, a2
+
+ /* initialize constructors: */
+ jsr ra, __main
+ ldgp gp, 0(ra)
+
+ mov s0, a0
+ mov s1, a1
+ mov s2, a2
+#endif
+
+ jsr ra, main
+ ldgp gp, 0(ra)
+
+ mov v0, a0
+
+ lda pv, exit
+ jsr ra, (pv), 1
+ ldgp gp, 0(ra)
+
+ /* in case exit returns: */
+
+1: ldi v0, __NR_exit
+ call_pal PAL_callsys
+ br 1b
+
+ .end __start
+
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+
+weak_alias(__data_start, data_start)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S
new file mode 100644
index 0000000..54a8484
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -0,0 +1,61 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@azstarnet.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/*
+ * This is for COMPATIBILITY with Linux/x86 only. Linux/Alpha system
+ * calls return an error indication in a3. This allows to return
+ * arbitrary 64bit values in v0 (because negative values are not
+ * mistaken as error numbers). However, C allows to return only one
+ * value so the interface below folds the error indication passed in
+ * a3 back into v0: it sets v0 to -errno if an error occurs. Thus,
+ * no negative 64bit numbers can be returned. To avoid this problem,
+ * use assembly stubs wherever possible/convenient.
+ *
+ * Usage:
+ *
+ * long syscall(syscall_number, arg1, arg2, arg3, arg4, arg5)
+ *
+ * syscall_number = the index of the system call we're invoking
+ * arg1-arg5 = up to 5 integer arguments to the system call
+ *
+ * We need to do some arg shifting: the kernel expects the
+ * syscall number in v0 and the first five args in a0-a4.
+ *
+ */
+
+
+1: br gp,2f
+2: ldgp gp,0(gp)
+ jmp zero,syscall_error
+
+
+ENTRY (__syscall)
+ bis a0,a0,v0 # Syscall number -> v0
+ bis a1,a1,a0 # arg1-arg5 -> a0-a4
+ bis a2,a2,a1
+ bis a3,a3,a2
+ bis a4,a4,a3
+ bis a5,a5,a4
+
+ call_pal PAL_callsys # Invoke system call
+ bne a3,1b
+ ret
+
+weak_alias(__syscall, syscall)
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.S b/sysdeps/unix/sysv/linux/alpha/sysdep.S
new file mode 100644
index 0000000..74b153e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.S
@@ -0,0 +1,33 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+ENTRY(syscall_error)
+ /* Store return value in errno... */
+ ldgp gp, 0(t12)
+ lda t0, errno
+ stl v0, 0(t0)
+
+ /* And just kick back a -1. */
+ ldi v0, -1
+ ret
+
+ .end syscall_error
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
new file mode 100644
index 0000000..febfa3a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* In the Linux ELF and ECOFF worlds, C symbols are asm symbols. */
+#define NO_UNDERSCORES
+
+#ifdef ASSEMBLER
+
+#include <asm/pal.h>
+#include <alpha/regdef.h>
+
+#endif
+
+/* There is some commonality. */
+#include <sysdeps/unix/alpha/sysdep.h>
+
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
+#endif
+
+/*
+ * Define some aliases for syscalls that return two values (in r0 and r1):
+ */
+#define __NR_getpid __NR_getxpid
+#define __NR_getppid __NR_getxpid
+#define __NR_getuid __NR_getxuid
+#define __NR_geteuid __NR_getxuid
+#define __NR_getgid __NR_getxgid
+#define __NR_getegid __NR_getxgid
+
+/*
+ * Some syscalls no Linux program should know about:
+ */
+#define __NR_osf_sigprocmask 48
+#define __NR_osf_shmat 209
+#define __NR_osf_getsysinfo 256
+#define __NR_osf_setsysinfo 257
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=925c95c502e4a6c01e7d7bba5e75f64209c16b94
commit 925c95c502e4a6c01e7d7bba5e75f64209c16b94
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 18 19:38:16 1996 +0000
Mon Mar 18 13:20:46 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/unistd.h (setpgrp): Declare no-arg version unless __FAVOR_BSD.
* misc/bsd-compat.c (setpgrp): New function, two arg version.
* sysdeps/stub/setpgid.c: Remove setpgrp alias.
* sysdeps/mach/hurd/setpgid.c: Likewise.
* sysdeps/unix/sysv/sysv4/setpgid.c: Likewise.
* sysdeps/unix/common/syscalls.list (setpgid): Remove setpgrp alias.
* sysdeps/unix/sysv/irix4/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/setpgrp.c: Obsolete file removed.
* posix/setpgrp.c (setpgrp): New file.
* posix/Makefile (routines): Add setpgrp.
diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list
index 47e1c48..a57529e 100644
--- a/sysdeps/unix/sysv/irix4/syscalls.list
+++ b/sysdeps/unix/sysv/irix4/syscalls.list
@@ -2,7 +2,7 @@
getpgid - bsdgetpgrp 1 __getpgid getpgid
msync - msync 3 msync
-setpgid - bsdsetpgrp 2 __setpgid setpgid setpgrp
+setpgid - bsdsetpgrp 2 __setpgid setpgid
signal - signal 3 __raw_signal
sysmp - sysmp 4 __sysmp
syssgi - syssgi 2 __syssgi
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index b9e06dc..743b8ca 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,4 +32,3 @@ DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
}
weak_alias (__setpgid, setpgid)
-weak_alias (__setpgid, setpgrp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e5a98bc449febc82dc3ce004fb775f1cb7551ad
commit 6e5a98bc449febc82dc3ce004fb775f1cb7551ad
Author: Roland McGrath <roland@gnu.org>
Date: Sun Mar 17 01:58:01 1996 +0000
Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
* sysdeps/alpha/memchr.c: obsolete file removed.
diff --git a/sysdeps/alpha/memchr.S b/sysdeps/alpha/memchr.S
new file mode 100644
index 0000000..118a1f1
--- /dev/null
+++ b/sysdeps/alpha/memchr.S
@@ -0,0 +1,163 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+ Contributed by David Mosberger (davidm@cs.arizona.edu).
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Finds characters in a memory area. Optimized for the Alpha
+architecture:
+
+ - memory accessed as aligned quadwords only
+ - uses cmpbge to compare 8 bytes in parallel
+ - does binary search to find 0 byte in last
+ quadword (HAKMEM needed 12 instructions to
+ do this instead of the 9 instructions that
+ binary search needs).
+
+For correctness consider that:
+
+ - only minimum number of quadwords may be accessed
+ - the third argument is an unsigned long
+*/
+
+#include <sysdep.h>
+#ifdef __linux__
+# include <alpha/regdef.h>
+#else
+#include <regdef.h>
+#endif
+
+ .set noreorder
+ .set noat
+
+ENTRY(memchr)
+ beq a2, not_found
+ ldq_u t0, 0(a0) # load first quadword (a0 may be misaligned)
+ addq a0, a2, t4
+ and a1, 0xff, a1 # a1 = 00000000000000ch
+ ldq_u t5, -1(t4)
+ sll a1, 8, t1 # t1 = 000000000000ch00
+ cmpult a2, 9, t3
+ or t1, a1, a1 # a1 = 000000000000chch
+ sll a1, 16, t1 # t1 = 00000000chch0000
+ lda t2, -1(zero)
+ or t1, a1, a1 # a1 = 00000000chchchch
+ sll a1, 32, t1 # t1 = chchchch00000000
+ extql t0, a0, t6
+ or t1, a1, a1 # a1 = chchchchchchchch
+
+ beq t3, first_quad
+
+ extqh t5, a0, t5
+ mov a0, v0
+ or t6, t5, t0 # t0 = quadword starting at a0
+
+ #
+ # Deal with the case where at most 8 bytes remain to be searched
+ # in t0. E.g.:
+ # a2 = 6
+ # t0 = ????c6c5c4c3c2c1
+last_quad:
+ negq a2, t5
+ srl t2, t5, t5 # t5 = mask of a2 bits set
+ xor a1, t0, t0
+ cmpbge zero, t0, t1
+ and t1, t5, t1
+ beq t1, not_found
+
+found_it:
+ # now, determine which byte matched:
+ negq t1, t2
+ and t1, t2, t1
+
+ and t1, 0x0f, t0
+ addq v0, 4, t2
+ cmoveq t0, t2, v0
+
+ and t1, 0x33, t0
+ addq v0, 2, t2
+ cmoveq t0, t2, v0
+
+ and t1, 0x55, t0
+ addq v0, 1, t2
+ cmoveq t0, t2, v0
+
+done: ret
+
+
+ #
+ # Deal with the case where a2 > 8 bytes remain to be
+ # searched. a0 may not be aligned.
+ #
+first_quad:
+ andnot a0, 0x7, v0
+ insqh t2, a0, t1 # t1 = 0000ffffffffffff (a0<0:2> ff bytes)
+ xor t0, a1, t0
+ or t0, t1, t0 # t0 = ====ffffffffffff
+ cmpbge zero, t0, t1
+ bne t1, found_it
+
+ /* at least one byte left to process */
+
+ ldq t0, 8(v0)
+ addq v0, 8, v0
+ /*
+ * Make a2 point to last quad to be accessed (the
+ * last quad may or may not be partial).
+ */
+ subq t4, 1, a2
+ andnot a2, 0x7, a2
+ cmpult v0, a2, t1
+ beq t1, final
+
+ /* at least two quads remain to be accessed */
+
+ subq a2, v0, t3 # t3 <- number of quads to be processed in loop
+ and t3, 8, t3 # odd number of quads?
+ bne t3, odd_quad_count
+
+ /* at least three quads remain to be accessed */
+
+ mov t0, t3 # move prefetched value into correct register
+
+ .align 3
+unrolled_loop:
+ ldq t0, 8(v0) # prefetch t0
+ xor a1, t3, t1
+ cmpbge zero, t1, t1
+ bne t1, found_it
+
+ addq v0, 8, v0
+odd_quad_count:
+ xor a1, t0, t1
+ ldq t3, 8(v0) # prefetch t3
+ cmpbge zero, t1, t1
+ bne t1, found_it
+
+ addq v0, 8, v0
+ cmpult v0, a2, t5
+ bne t5, unrolled_loop
+
+ mov t3, t0 # move prefetched value into t0
+final: subq t4, v0, a2 # a2 <- number of bytes left to do
+ bne a2, last_quad
+
+not_found:
+ mov zero, v0
+ ret
+
+ .end memchr
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
deleted file mode 100644
index a911302..0000000
--- a/sysdeps/alpha/memchr.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <string.h>
-
-/* Search no more than N bytes of S for C. */
-
-void *
-memchr (const void *s, int c, size_t n)
-{
- const char *char_ptr;
- const unsigned long int *longword_ptr;
- unsigned long int charmask;
- size_t x;
-
- c = (unsigned char) c;
-
- /* Handle the first few characters by reading one character at a time.
- Do this until STR is aligned on a 8-byte border. */
- for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0;
- --n, ++char_ptr)
- if (*char_ptr == c)
- return (void *) char_ptr;
-
- if (n == (size_t)0)
- return NULL;
-
- x = n;
-
- longword_ptr = (unsigned long int *) char_ptr;
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
- charmask |= charmask << 16;
- charmask |= charmask << 32;
-
- for (;;)
- {
- const unsigned long int longword = *longword_ptr++;
- int ge, le;
-
- if (x < 4)
- x = (size_t) 0;
- else
- x -= 4;
-
- /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */
- asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
-
- /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */
- asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword));
-
- /* Bytes that are both <= and >= are == to C. */
- if (ge & le)
- {
- /* Which of the bytes was the C? */
-
- unsigned char *cp = (unsigned char *) (longword_ptr - 1);
- int i;
-
- for (i = 0; i < 7; i++)
- if (cp[i] == c)
- return &cp[i];
- return &cp[7];
- }
-
- if (x == (size_t)0)
- break;
- }
-
- return NULL;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=501ee116e7b8f9b89bf618c96acbe9baefe10fbc
commit 501ee116e7b8f9b89bf618c96acbe9baefe10fbc
Author: Roland McGrath <roland@gnu.org>
Date: Sat Mar 16 21:32:41 1996 +0000
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
sysdeps/m68k/fpu/s_significand.c,
sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.
diff --git a/sysdeps/m68k/fpu/e_acos.c b/sysdeps/m68k/fpu/e_acos.c
new file mode 100644
index 0000000..1a29222
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_acos.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC __ieee754_acos
+#endif
+
+double
+DEFUN(FUNC, (x), double x)
+{
+ return __m81_u(FUNC)(x);
+}
diff --git a/sysdeps/m68k/fpu/e_acosf.c b/sysdeps/m68k/fpu/e_acosf.c
new file mode 100644
index 0000000..5196815
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_acosf.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC __ieee754_acosf
+#endif
+
+float
+DEFUN(FUNC, (x), float x)
+{
+ return __m81_u(FUNC)(x);
+}
diff --git a/sysdeps/m68k/fpu/e_asin.c b/sysdeps/m68k/fpu/e_asin.c
new file mode 100644
index 0000000..b6176c7
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_asin.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_asin
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_asinf.c b/sysdeps/m68k/fpu/e_asinf.c
new file mode 100644
index 0000000..05fb826
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_asinf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_asinf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_atanh.c b/sysdeps/m68k/fpu/e_atanh.c
new file mode 100644
index 0000000..11bf430
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atanh.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atanh
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_atanhf.c b/sysdeps/m68k/fpu/e_atanhf.c
new file mode 100644
index 0000000..7a8f92e
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_atanhf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_atanhf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_cosh.c b/sysdeps/m68k/fpu/e_cosh.c
new file mode 100644
index 0000000..93d753c
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_cosh.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_cosh
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_coshf.c b/sysdeps/m68k/fpu/e_coshf.c
new file mode 100644
index 0000000..433faf1
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_coshf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_coshf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_exp.c b/sysdeps/m68k/fpu/e_exp.c
new file mode 100644
index 0000000..1e95ac4
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_exp.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_exp
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_expf.c b/sysdeps/m68k/fpu/e_expf.c
new file mode 100644
index 0000000..2aeaacf
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_expf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_expf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_fmod.c b/sysdeps/m68k/fpu/e_fmod.c
new file mode 100644
index 0000000..310b1c4
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_fmod.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC __ieee754_fmod
+#endif
+
+double
+DEFUN(FUNC, (x, y), double x AND double y)
+{
+ return __m81_u(FUNC)(x, y);
+}
diff --git a/sysdeps/m68k/fpu/e_fmodf.c b/sysdeps/m68k/fpu/e_fmodf.c
new file mode 100644
index 0000000..1a74c36
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_fmodf.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC __ieee754_fmodf
+#endif
+
+float
+DEFUN(FUNC, (x, y), float x AND float y)
+{
+ return __m81_u(FUNC)(x, y);
+}
diff --git a/sysdeps/m68k/fpu/e_log.c b/sysdeps/m68k/fpu/e_log.c
new file mode 100644
index 0000000..146dc0c
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_log10.c b/sysdeps/m68k/fpu/e_log10.c
new file mode 100644
index 0000000..06a9b87
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log10.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log10
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_log10f.c b/sysdeps/m68k/fpu/e_log10f.c
new file mode 100644
index 0000000..3896864
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_log10f.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_log10f
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_logf.c b/sysdeps/m68k/fpu/e_logf.c
new file mode 100644
index 0000000..bc23217
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_logf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_logf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c
new file mode 100644
index 0000000..29798a1
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_pow.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_pow
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/e_powf.c b/sysdeps/m68k/fpu/e_powf.c
new file mode 100644
index 0000000..978d32e
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_powf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_powf
+#include <e_fmodf.c>
diff --git a/sysdeps/m68k/fpu/e_remainder.c b/sysdeps/m68k/fpu/e_remainder.c
new file mode 100644
index 0000000..aa31bc0
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_remainder.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_remainder
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/e_remainderf.c b/sysdeps/m68k/fpu/e_remainderf.c
new file mode 100644
index 0000000..b04f0c8
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_remainderf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_remainderf
+#include <e_fmodf.c>
diff --git a/sysdeps/m68k/fpu/e_scalb.c b/sysdeps/m68k/fpu/e_scalb.c
new file mode 100644
index 0000000..51d9bee
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_scalb.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_scalb
+#include <e_fmod.c>
diff --git a/sysdeps/m68k/fpu/e_scalbf.c b/sysdeps/m68k/fpu/e_scalbf.c
new file mode 100644
index 0000000..1d2beae
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_scalbf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_scalbf
+#include <e_fmodf.c>
diff --git a/sysdeps/m68k/fpu/e_sinh.c b/sysdeps/m68k/fpu/e_sinh.c
new file mode 100644
index 0000000..c6fed7f
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sinh.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sinh
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_sinhf.c b/sysdeps/m68k/fpu/e_sinhf.c
new file mode 100644
index 0000000..b5034b7
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sinhf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sinhf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/e_sqrt.c b/sysdeps/m68k/fpu/e_sqrt.c
new file mode 100644
index 0000000..70f1971
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sqrt.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sqrt
+#include <e_acos.c>
diff --git a/sysdeps/m68k/fpu/e_sqrtf.c b/sysdeps/m68k/fpu/e_sqrtf.c
new file mode 100644
index 0000000..5dc1904
--- /dev/null
+++ b/sysdeps/m68k/fpu/e_sqrtf.c
@@ -0,0 +1,2 @@
+#define FUNC __ieee754_sqrtf
+#include <e_acosf.c>
diff --git a/sysdeps/m68k/fpu/k_cos.c b/sysdeps/m68k/fpu/k_cos.c
new file mode 100644
index 0000000..1f508b4
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_cos.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+double
+DEFUN(__kernel_cos, (x, y), double x AND double y)
+{
+ return __cos (x + y);
+}
diff --git a/sysdeps/m68k/fpu/k_cosf.c b/sysdeps/m68k/fpu/k_cosf.c
new file mode 100644
index 0000000..a6f0a26
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_cosf.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+float
+DEFUN(__kernel_cosf, (x, y), float x AND float y)
+{
+ return __cosf (x + y);
+}
diff --git a/sysdeps/m68k/fpu/k_sin.c b/sysdeps/m68k/fpu/k_sin.c
new file mode 100644
index 0000000..10cfbb4
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_sin.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+double
+DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy)
+{
+ return __sin (x + y);
+}
diff --git a/sysdeps/m68k/fpu/k_sinf.c b/sysdeps/m68k/fpu/k_sinf.c
new file mode 100644
index 0000000..245e86b
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_sinf.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+float
+DEFUN(__kernel_sinf, (x, y, iy), float x AND float y AND int iy)
+{
+ return __sinf (x + y);
+}
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
new file mode 100644
index 0000000..b18c9af
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+double
+DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy)
+{
+ if (iy == 1)
+ return __tan (x + y);
+ else
+ return -1.0 / __tan (x + y);
+}
diff --git a/sysdeps/m68k/fpu/k_tanf.c b/sysdeps/m68k/fpu/k_tanf.c
new file mode 100644
index 0000000..027a74a
--- /dev/null
+++ b/sysdeps/m68k/fpu/k_tanf.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+float
+DEFUN(__kernel_tanf, (x, y, iy), float x AND float y AND int iy)
+{
+ if (iy == 1)
+ return __tanf (x + y);
+ else
+ return -1.0 / __tanf (x + y);
+}
diff --git a/sysdeps/m68k/fpu/s_atan.c b/sysdeps/m68k/fpu/s_atan.c
new file mode 100644
index 0000000..f1cc975
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_atan.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC atan
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+double
+DEFUN(__CONCATX(__,FUNC), (x), double x)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_atanf.c b/sysdeps/m68k/fpu/s_atanf.c
new file mode 100644
index 0000000..5d1f337
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_atanf.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC atanf
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float
+DEFUN(__CONCATX(__,FUNC), (x), float x)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_ceil.c b/sysdeps/m68k/fpu/s_ceil.c
new file mode 100644
index 0000000..93d5ad7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ceil.c
@@ -0,0 +1,2 @@
+#define FUNC ceil
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_ceilf.c b/sysdeps/m68k/fpu/s_ceilf.c
new file mode 100644
index 0000000..b3ba6a5
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ceilf.c
@@ -0,0 +1,2 @@
+#define FUNC ceilf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_cos.c b/sysdeps/m68k/fpu/s_cos.c
new file mode 100644
index 0000000..9c96076
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cos.c
@@ -0,0 +1,2 @@
+#define FUNC cos
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_cosf.c b/sysdeps/m68k/fpu/s_cosf.c
new file mode 100644
index 0000000..db965b8
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_cosf.c
@@ -0,0 +1,2 @@
+#define FUNC cosf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_expm1.c b/sysdeps/m68k/fpu/s_expm1.c
new file mode 100644
index 0000000..1ef99e2
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_expm1.c
@@ -0,0 +1,2 @@
+#define FUNC expm1
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_expm1f.c b/sysdeps/m68k/fpu/s_expm1f.c
new file mode 100644
index 0000000..84935b1
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_expm1f.c
@@ -0,0 +1,2 @@
+#define FUNC expm1f
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_fabs.c b/sysdeps/m68k/fpu/s_fabs.c
new file mode 100644
index 0000000..1f0631e
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_fabs.c
@@ -0,0 +1,2 @@
+#define FUNC fabs
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_fabsf.c b/sysdeps/m68k/fpu/s_fabsf.c
new file mode 100644
index 0000000..8f94219
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_fabsf.c
@@ -0,0 +1,2 @@
+#define FUNC fabsf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_finite.c b/sysdeps/m68k/fpu/s_finite.c
new file mode 100644
index 0000000..dafbd59
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_finite.c
@@ -0,0 +1,2 @@
+#define FUNC finite
+#include <s_isinf.c>
diff --git a/sysdeps/m68k/fpu/s_finitef.c b/sysdeps/m68k/fpu/s_finitef.c
new file mode 100644
index 0000000..b81342e
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_finitef.c
@@ -0,0 +1,2 @@
+#define FUNC finitef
+#include <s_isinff.c>
diff --git a/sysdeps/m68k/fpu/s_floor.c b/sysdeps/m68k/fpu/s_floor.c
new file mode 100644
index 0000000..e1219c6
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_floor.c
@@ -0,0 +1,2 @@
+#define FUNC floor
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_floorf.c b/sysdeps/m68k/fpu/s_floorf.c
new file mode 100644
index 0000000..f4f9b9a
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_floorf.c
@@ -0,0 +1,2 @@
+#define FUNC floorf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_frexp.c b/sysdeps/m68k/fpu/s_frexp.c
new file mode 100644
index 0000000..b24af74
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_frexp.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(__frexp, (value, expptr), double value AND int *expptr)
+{
+ return __m81_u(__frexp)(value, expptr);
+}
+weak_alias (__frexp, frexp)
diff --git a/sysdeps/m68k/fpu/s_frexpf.c b/sysdeps/m68k/fpu/s_frexpf.c
new file mode 100644
index 0000000..c7cd98a
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_frexpf.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+float
+DEFUN(__frexpf, (value, expptr), float value AND int *expptr)
+{
+ return __m81_u(__frexpf)(value, expptr);
+}
+weak_alias (__frexpf, frexpf)
diff --git a/sysdeps/m68k/fpu/s_ilogb.c b/sysdeps/m68k/fpu/s_ilogb.c
new file mode 100644
index 0000000..2df00a6
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ilogb.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+int
+DEFUN(__ilogb, (x), double x)
+{
+ return __m81_u(__ilogb)(x);
+}
+
+weak_alias (__ilogb, ilogb)
diff --git a/sysdeps/m68k/fpu/s_ilogbf.c b/sysdeps/m68k/fpu/s_ilogbf.c
new file mode 100644
index 0000000..05f1546
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ilogbf.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+int
+DEFUN(__ilogbf, (x), float x)
+{
+ return __m81_u(__ilogbf)(x);
+}
+
+weak_alias (__ilogbf, ilogbf)
diff --git a/sysdeps/m68k/fpu/s_isinf.c b/sysdeps/m68k/fpu/s_isinf.c
new file mode 100644
index 0000000..9674533
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isinf.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC isinf
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+int
+DEFUN(__CONCATX(__,FUNC), (x), double x)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_isinff.c b/sysdeps/m68k/fpu/s_isinff.c
new file mode 100644
index 0000000..d9101a9
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isinff.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC isinff
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+int
+DEFUN(__CONCATX(__,FUNC), (x), float x)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_isnan.c b/sysdeps/m68k/fpu/s_isnan.c
new file mode 100644
index 0000000..151d6dc
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isnan.c
@@ -0,0 +1,2 @@
+#define FUNC isnan
+#include <s_isinf.c>
diff --git a/sysdeps/m68k/fpu/s_isnanf.c b/sysdeps/m68k/fpu/s_isnanf.c
new file mode 100644
index 0000000..667bca7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_isnanf.c
@@ -0,0 +1,2 @@
+#define FUNC isnanf
+#include <s_isinff.c>
diff --git a/sysdeps/m68k/fpu/s_ldexp.c b/sysdeps/m68k/fpu/s_ldexp.c
new file mode 100644
index 0000000..ee7662e
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ldexp.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC ldexp
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+double
+DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x, exp);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_ldexpf.c b/sysdeps/m68k/fpu/s_ldexpf.c
new file mode 100644
index 0000000..a974173
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_ldexpf.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC ldexpf
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float
+DEFUN(__CONCATX(__,FUNC), (x, exp), float x AND int exp)
+{
+ return __m81_u(__CONCATX(__,FUNC))(x, exp);
+}
+
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
diff --git a/sysdeps/m68k/fpu/s_log1p.c b/sysdeps/m68k/fpu/s_log1p.c
new file mode 100644
index 0000000..1840ced
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log1p.c
@@ -0,0 +1,2 @@
+#define FUNC log1p
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_log1pf.c b/sysdeps/m68k/fpu/s_log1pf.c
new file mode 100644
index 0000000..cb7235a
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_log1pf.c
@@ -0,0 +1,2 @@
+#define FUNC log1pf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_logb.c b/sysdeps/m68k/fpu/s_logb.c
new file mode 100644
index 0000000..9903b30
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_logb.c
@@ -0,0 +1,2 @@
+#define FUNC logb
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_logbf.c b/sysdeps/m68k/fpu/s_logbf.c
new file mode 100644
index 0000000..6dcfee5
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_logbf.c
@@ -0,0 +1,2 @@
+#define FUNC logbf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_modf.c b/sysdeps/m68k/fpu/s_modf.c
new file mode 100644
index 0000000..355df2f
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_modf.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(__modf, (x, exp), double x AND double *iptr)
+{
+ return __m81_u(__modf)(x, iptr);
+}
+weak_alias(__modf, modf)
diff --git a/sysdeps/m68k/fpu/s_modff.c b/sysdeps/m68k/fpu/s_modff.c
new file mode 100644
index 0000000..f56bcb4
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_modff.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+float
+DEFUN(__modff, (x, exp), float x AND float *iptr)
+{
+ return __m81_u(__modff)(x, iptr);
+}
+weak_alias(__modff, modff)
diff --git a/sysdeps/m68k/fpu/s_rint.c b/sysdeps/m68k/fpu/s_rint.c
new file mode 100644
index 0000000..f0f18c7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rint.c
@@ -0,0 +1,2 @@
+#define FUNC rint
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_rintf.c b/sysdeps/m68k/fpu/s_rintf.c
new file mode 100644
index 0000000..4e00cab
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_rintf.c
@@ -0,0 +1,2 @@
+#define FUNC rintf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_scalbn.c b/sysdeps/m68k/fpu/s_scalbn.c
new file mode 100644
index 0000000..433aa75
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalbn.c
@@ -0,0 +1,2 @@
+#define FUNC scalbn
+#include <s_ldexp.c>
diff --git a/sysdeps/m68k/fpu/s_scalbnf.c b/sysdeps/m68k/fpu/s_scalbnf.c
new file mode 100644
index 0000000..00461dc
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_scalbnf.c
@@ -0,0 +1,2 @@
+#define FUNC scalbnf
+#include <s_ldexpf.c>
diff --git a/sysdeps/m68k/fpu/s_significand.c b/sysdeps/m68k/fpu/s_significand.c
new file mode 100644
index 0000000..34d4ea3
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_significand.c
@@ -0,0 +1,2 @@
+#define FUNC significand
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_significandf.c b/sysdeps/m68k/fpu/s_significandf.c
new file mode 100644
index 0000000..4e769ca
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_significandf.c
@@ -0,0 +1,2 @@
+#define FUNC significandf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_sin.c b/sysdeps/m68k/fpu/s_sin.c
new file mode 100644
index 0000000..0d4abdb
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sin.c
@@ -0,0 +1,2 @@
+#define FUNC sin
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_sinf.c b/sysdeps/m68k/fpu/s_sinf.c
new file mode 100644
index 0000000..9b23d48
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_sinf.c
@@ -0,0 +1,2 @@
+#define FUNC sinf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_tan.c b/sysdeps/m68k/fpu/s_tan.c
new file mode 100644
index 0000000..ca7fb0e
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tan.c
@@ -0,0 +1,2 @@
+#define FUNC tan
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_tanf.c b/sysdeps/m68k/fpu/s_tanf.c
new file mode 100644
index 0000000..95fe9c7
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tanf.c
@@ -0,0 +1,2 @@
+#define FUNC tanf
+#include <s_atanf.c>
diff --git a/sysdeps/m68k/fpu/s_tanh.c b/sysdeps/m68k/fpu/s_tanh.c
new file mode 100644
index 0000000..ac2e7db
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tanh.c
@@ -0,0 +1,2 @@
+#define FUNC tanh
+#include <s_atan.c>
diff --git a/sysdeps/m68k/fpu/s_tanhf.c b/sysdeps/m68k/fpu/s_tanhf.c
new file mode 100644
index 0000000..1addaae
--- /dev/null
+++ b/sysdeps/m68k/fpu/s_tanhf.c
@@ -0,0 +1,2 @@
+#define FUNC tanhf
+#include <s_atanf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aee4d3a946512f19ed60f62ec99e0cc2437ccc0d
commit aee4d3a946512f19ed60f62ec99e0cc2437ccc0d
Author: Roland McGrath <roland@gnu.org>
Date: Sat Mar 16 21:30:47 1996 +0000
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
* sysdeps/m68k/fpu/isnanl.c: Likewise.
diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c
index f3eeaa2..77fd759 100644
--- a/sysdeps/m68k/fpu/isinfl.c
+++ b/sysdeps/m68k/fpu/isinfl.c
@@ -1,4 +1,29 @@
-#define FUNC __isinfl
-#include <isinf.c>
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+int
+DEFUN(__isinfl, (x), long double x)
+{
+ return __m81_u(__isinfl)(x);
+}
weak_alias (__isinfl, isinfl)
diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c
index 0f48a73..1e58ea4 100644
--- a/sysdeps/m68k/fpu/isnanl.c
+++ b/sysdeps/m68k/fpu/isnanl.c
@@ -1,4 +1,29 @@
-#define FUNC __isnanl
-#include <isinf.c>
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+int
+DEFUN(__isnanl, (x), long double x)
+{
+ return __m81_u(__isnanl)(x);
+}
weak_alias (__isnanl, isnanl)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8849f1d2446f967a3c2c71ade45291f2424810c7
commit 8849f1d2446f967a3c2c71ade45291f2424810c7
Author: Roland McGrath <roland@gnu.org>
Date: Sat Mar 16 21:30:15 1996 +0000
Thu Mar 14 15:20:45 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index e357364..f59c168 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -19,8 +19,6 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
#include <sys/cdefs.h>
-#define __need_Emath
-#include <errno.h>
#ifdef __NO_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
@@ -34,59 +32,87 @@ Cambridge, MA 02139, USA. */
#define __MATH_INLINES 1
#endif
-#define __inline_mathop2(func, op) \
- __m81_inline double \
- __m81_u(func)(double __mathop_x) __attribute__((__const__)); \
- __m81_inline double \
- __m81_u(func)(double __mathop_x) \
+/* Define a const math function. */
+#define __m81_defun(rettype, func, args) \
+ __m81_inline rettype \
+ __m81_u(func) args __attribute__((__const__)); \
+ __m81_inline rettype \
+ __m81_u(func) args
+
+#define __inline_mathop(func, op) \
+ __m81_defun (double, func, (double __mathop_x)) \
{ \
double __result; \
__asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
-#define __inline_mathop(op) __inline_mathop2(op, op)
-
-__inline_mathop(acos)
-__inline_mathop(asin)
-__inline_mathop(atan)
-__inline_mathop(cos)
-__inline_mathop(sin)
-__inline_mathop(tan)
-__inline_mathop(cosh)
-__inline_mathop(sinh)
-__inline_mathop(tanh)
-__inline_mathop2(exp, etox)
-__inline_mathop2(fabs, abs)
-__inline_mathop(log10)
-__inline_mathop2(log, logn)
-__inline_mathop(sqrt)
-
-__inline_mathop2(__rint, int)
-__inline_mathop2(__expm1, etoxm1)
-
-#ifdef __USE_MISC
-#ifndef __NO_MATH_INLINES
-__inline_mathop2(rint, int)
-__inline_mathop2(expm1, etoxm1)
-#endif
-__inline_mathop2(log1p, lognp1)
-__inline_mathop(atanh)
-#endif
-__m81_inline double
-__m81_u(__drem)(double __x, double __y) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(__drem)(double __x, double __y)
+#define __inline_mathopf(func, op) \
+ __m81_defun (float, func, (float __mathop_x)) \
+ { \
+ float __result; \
+ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
+ return __result; \
+ }
+
+/* ieee style elementary functions */
+__inline_mathop(__ieee754_acos, acos)
+__inline_mathop(__ieee754_asin, asin)
+__inline_mathop(__ieee754_cosh, cosh)
+__inline_mathop(__ieee754_sinh, sinh)
+__inline_mathop(__ieee754_exp, etox)
+__inline_mathop(__ieee754_log10, log10)
+__inline_mathop(__ieee754_log, logn)
+__inline_mathop(__ieee754_sqrt, sqrt)
+__inline_mathop(__ieee754_atanh, atanh)
+
+/* ieee style elementary float functions */
+__inline_mathopf(__ieee754_acosf, acos)
+__inline_mathopf(__ieee754_asinf, asin)
+__inline_mathopf(__ieee754_coshf, cosh)
+__inline_mathopf(__ieee754_sinhf, sinh)
+__inline_mathopf(__ieee754_expf, etox)
+__inline_mathopf(__ieee754_log10f, log10)
+__inline_mathopf(__ieee754_logf, logn)
+__inline_mathopf(__ieee754_sqrtf, sqrt)
+__inline_mathopf(__ieee754_atanhf, atan)
+
+__inline_mathop(__atan, atan)
+__inline_mathop(__cos, cos)
+__inline_mathop(__sin, sin)
+__inline_mathop(__tan, tan)
+__inline_mathop(__tanh, tanh)
+__inline_mathop(__fabs, abs)
+__inline_mathop(__sqrt, sqrt)
+
+__inline_mathop(__rint, int)
+__inline_mathop(__expm1, etoxm1)
+__inline_mathop(__log1p, lognp1)
+__inline_mathop(__logb, log2)
+__inline_mathop(__significand, getman)
+
+__inline_mathopf(__atanf, atan)
+__inline_mathopf(__cosf, cos)
+__inline_mathopf(__sinf, sin)
+__inline_mathopf(__tanf, tan)
+__inline_mathopf(__tanhf, tanh)
+__inline_mathopf(__fabsf, abs)
+__inline_mathopf(__sqrtf, sqrt)
+
+__inline_mathopf(__rintf, int)
+__inline_mathopf(__expm1f, etoxm1)
+__inline_mathopf(__log1pf, lognp1)
+__inline_mathopf(__logbf, log2)
+__inline_mathopf(__significandf, getman)
+
+__m81_defun (double, __ieee754_remainder, (double __x, double __y))
{
double __result;
__asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
return __result;
}
-__m81_inline double
-__m81_u(ldexp)(double __x, int __e) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(ldexp)(double __x, int __e)
+__m81_defun (double, __ldexp, (double __x, int __e))
{
double __result;
double __double_e = (double) __e;
@@ -94,10 +120,7 @@ __m81_u(ldexp)(double __x, int __e)
return __result;
}
-__m81_inline double
-__m81_u(fmod)(double __x, double __y) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(fmod)(double __x, double __y)
+__m81_defun (double, __ieee754_fmod, (double __x, double __y))
{
double __result;
__asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
@@ -105,7 +128,7 @@ __m81_u(fmod)(double __x, double __y)
}
__m81_inline double
-__m81_u(frexp)(double __value, int *__expptr)
+__m81_u(__frexp)(double __value, int *__expptr)
{
double __mantissa, __exponent;
__asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
@@ -114,10 +137,7 @@ __m81_u(frexp)(double __value, int *__expptr)
return __mantissa;
}
-__m81_inline double
-__m81_u(floor)(double __x) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(floor)(double __x)
+__m81_defun (double, __floor, (double __x))
{
double __result;
unsigned long int __ctrl_reg;
@@ -133,16 +153,13 @@ __m81_u(floor)(double __x)
return __result;
}
-__m81_inline double
-__m81_u(pow)(double __x, double __y) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(pow)(double __x, double __y)
+__m81_defun (double, __ieee754_pow, (double __x, double __y))
{
double __result;
if (__x == 0.0)
{
if (__y <= 0.0)
- __result = __infnan (EDOM);
+ __result = 0.0 / 0.0;
else
__result = 0.0;
}
@@ -162,22 +179,19 @@ __m81_u(pow)(double __x, double __y)
if (__y == __temp)
{
int i = (int) __y;
- __result = __m81_u (exp) (__y * __m81_u (log) (-__x));
+ __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(-__x));
if (i & 1)
__result = -__result;
}
else
- __result = __infnan (EDOM);
+ __result = 0.0 / 0.0;
}
else
- __result = __m81_u(exp)(__y * __m81_u(log)(__x));
+ __result = __m81_u(__ieee754_exp)(__y * __m81_u(__ieee754_log)(__x));
return __result;
}
-__m81_inline double
-__m81_u(ceil)(double __x) __attribute__ ((__const__));
-__m81_inline double
-__m81_u(ceil)(double __x)
+__m81_defun (double, __ceil, (double __x))
{
double __result;
unsigned long int __ctrl_reg;
@@ -194,30 +208,25 @@ __m81_u(ceil)(double __x)
}
__m81_inline double
-__m81_u(modf)(double __value, double *__iptr)
+__m81_u(__modf)(double __value, double *__iptr)
{
- double __modf_int = __m81_u(floor)(__value);
+ double __modf_int;
+ __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
*__iptr = __modf_int;
return __value - __modf_int;
}
-__m81_inline int
-__m81_u(__isinf)(double __value) __attribute__ ((__const__));
-__m81_inline int
-__m81_u(__isinf)(double __value)
+__m81_defun (int, __isinf, (double __value))
{
/* There is no branch-condition for infinity,
so we must extract and examine the condition codes manually. */
unsigned long int __fpsr;
__asm("ftst%.x %1\n"
"fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
}
-__m81_inline int
-__m81_u(__isnan)(double __value) __attribute__ ((__const__));
-__m81_inline int
-__m81_u(__isnan)(double __value)
+__m81_defun (int, __isnan, (double __value))
{
char __result;
__asm("ftst%.x %1\n"
@@ -225,23 +234,210 @@ __m81_u(__isnan)(double __value)
return __result;
}
-__m81_inline int
-__m81_u(__isinfl)(long double __value) __attribute__ ((__const__));
-__m81_inline int
-__m81_u(__isinfl)(long double __value)
+__m81_defun (int, __finite, (double __value))
+{
+ /* There is no branch-condition for infinity, so we must extract and
+ examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm ("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
+ return (__fpsr & (3 << 24)) == 0;
+}
+
+__m81_defun (int, __ilogb, (double __x))
+{
+ double __result;
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
+ return (int) __result;
+}
+
+__m81_defun (double, __ieee754_scalb, (double __x, double __n))
+{
+ double __result;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
+ return __result;
+}
+
+__m81_defun (double, __scalbn, (double __x, int __n))
+{
+ double __result;
+ double __double_n = (double) __n;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_n), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __ieee754_remainderf, (float __x, float __y))
+{
+ float __result;
+ __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __ldexpf, (float __x, int __e))
+{
+ float __result;
+ float __float_e = (float) __e;
+ __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_e), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __ieee754_fmodf, (float __x, float __y))
+{
+ float __result;
+ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+__m81_inline float
+__m81_u(__frexpf)(float __value, int *__expptr)
+{
+ float __mantissa, __exponent;
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
+ __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
+ *__expptr = (int) __exponent;
+ return __mantissa;
+}
+
+__m81_defun (float, __floorf, (float __x))
+{
+ float __result;
+ unsigned long int __ctrl_reg;
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
+ /* Set rounding towards negative infinity. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
+ /* Convert X to an integer, using -Inf rounding. */
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
+ return __result;
+}
+
+__m81_defun (float, __ieee754_powf, (float __x, float __y))
+{
+ float __result;
+ if (__x == 0.0f)
+ {
+ if (__y <= 0.0f)
+ __result = 0.0f / 0.0f;
+ else
+ __result = 0.0f;
+ }
+ else if (__y == 0.0f || __x == 1.0f)
+ __result = 1.0;
+ else if (__y == 1.0f)
+ __result = __x;
+ else if (__y == 2.0f)
+ __result = __x * __x;
+ else if (__x == 10.0f)
+ __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x == 2.0f)
+ __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x < 0.0f)
+ {
+ float __temp = __m81_u(__rintf)(__y);
+ if (__y == __temp)
+ {
+ int i = (int) __y;
+ __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(-__x));
+ if (i & 1)
+ __result = -__result;
+ }
+ else
+ __result = 0.0f / 0.0f;
+ }
+ else
+ __result = __m81_u(__ieee754_expf)(__y * __m81_u(__ieee754_logf)(__x));
+ return __result;
+}
+
+__m81_defun (float, __ceilf, (float __x))
+{
+ float __result;
+ unsigned long int __ctrl_reg;
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
+ /* Set rounding towards positive infinity. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg | 0x30));
+ /* Convert X to an integer, using +Inf rounding. */
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
+ return __result;
+}
+
+__m81_inline float
+__m81_u(__modff)(float __value, float *__iptr)
+{
+ float __modf_int;
+ __asm ("fintrz%.x %1, %0" : "=f" (__modf_int) : "f" (__value));
+ *__iptr = __modf_int;
+ return __value - __modf_int;
+}
+
+__m81_defun (int, __isinff, (float __value))
+{
+ /* There is no branch-condition for infinity,
+ so we must extract and examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
+}
+
+__m81_defun (int, __isnanf, (float __value))
+{
+ char __result;
+ __asm("ftst%.x %1\n"
+ "fsun %0" : "=dm" (__result) : "f" (__value));
+ return __result;
+}
+
+__m81_defun (int, __finitef, (float __value))
+{
+ /* There is no branch-condition for infinity, so we must extract and
+ examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm ("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
+ return (__fpsr & (3 << 24)) == 0;
+}
+
+__m81_defun (int, __ilogbf, (float __x))
+{
+ float __result;
+ __asm("fgetexp%.x %1, %0" : "=f" (__result) : "f" (__x));
+ return (int) __result;
+}
+
+__m81_defun (float, __ieee754_scalbf, (float __x, float __n))
+{
+ float __result;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__n), "0" (__x));
+ return __result;
+}
+
+__m81_defun (float, __scalbnf, (float __x, int __n))
+{
+ float __result;
+ float __float_n = (float) __n;
+ __asm ("fscale%.x %1, %0" : "=f" (__result) : "f" (__float_n), "0" (__x));
+ return __result;
+}
+
+__m81_defun (int, __isinfl, (long double __value))
{
/* There is no branch-condition for infinity,
so we must extract and examine the condition codes manually. */
unsigned long int __fpsr;
__asm("ftst%.x %1\n"
"fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
- return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
+ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0;
}
-__m81_inline int
-__m81_u(__isnanl)(long double __value) __attribute__ ((__const__));
-__m81_inline int
-__m81_u(__isnanl)(long double __value)
+__m81_defun (int, __isnanl, (long double __value))
{
char __result;
__asm("ftst%.x %1\n"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61e73b405a8d55af80aa6a8e481839a7338eb73b
commit 61e73b405a8d55af80aa6a8e481839a7338eb73b
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 14 11:20:02 1996 +0000
Mon Mar 4 21:57:14 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/Makefile: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile
new file mode 100644
index 0000000..bdbd105
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/Makefile
@@ -0,0 +1,3 @@
+# Linux/m68k uses Motorola asm syntax and the ELF format.
+
+m68k-syntax-flag = -DMOTOROLA_SYNTAX
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2801ddac45fa1a3cc5e18b43df7ded9a9844257
commit b2801ddac45fa1a3cc5e18b43df7ded9a9844257
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 14 11:19:46 1996 +0000
Mon Mar 4 21:57:14 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYS_ify): Redefine.
(CALL_MCOUNT): New macro, empty unless [PROF].
(ENTRY): Do CALL_MCOUNT just after the label.
(JUMPTARGET): New macro.
(SYSCALL_ERROR_HANDLER): Fix syntax.
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 9b6c8e1..ee48117 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -23,6 +23,17 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+/* For Linux we can use the system call table in the header file
+ /usr/include/asm/unistd.h
+ of the kernel. But these symbols do not follow the SYS_* syntax
+ so we have to redefine the `SYS_ify' macro here. */
+#undef SYS_ify
+#ifdef __STDC__
+# define SYS_ify(syscall_name) __NR_##syscall_name
+#else
+# define SYS_ify(syscall_name) __NR_/**/syscall_name
+#endif
+
#ifdef ASSEMBLER
#define POUND #
@@ -32,7 +43,26 @@ Cambridge, MA 02139, USA. */
.globl name; \
.type name, @function; \
.align 4; \
- name##:
+ C_LABEL(name) \
+ CALL_MCOUNT
+
+/* If compiled for profiling, call `_mcount' at the start of each function. */
+#ifdef PROF
+/* The mcount code relies on a normal frame pointer being on the stack
+ to locate our caller, so push one just for its benefit. */
+#define CALL_MCOUNT \
+ move.l %fp, -(%sp); move.l %sp, %fp; \
+ jbsr JUMPTARGET (_mcount); \
+ move.l (%sp)+, %fp;
+#else
+#define CALL_MCOUNT /* Do nothing. */
+#endif
+
+#ifdef PIC
+#define JUMPTARGET(name) name##@PLTPC
+#else
+#define JUMPTARGET(name) name
+#endif
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
@@ -53,7 +83,7 @@ Cambridge, MA 02139, USA. */
/* Store (- %d0) into errno through the GOT. */
#define SYSCALL_ERROR_HANDLER \
syscall_error: \
- move.l (errno@GOTPC.l, %pc), %a0; \
+ move.l (errno@GOTPC, %pc), %a0; \
neg.l %d0; \
move.l %d0, (%a0); \
move.l POUND -1, %d0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5198eaa39a9c3a0bcc13b5015b95b953518372e5
commit 5198eaa39a9c3a0bcc13b5015b95b953518372e5
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 12 14:15:42 1996 +0000
.
diff --git a/sysdeps/m68k/m68020/add_n.S b/sysdeps/m68k/m68020/add_n.S
deleted file mode 100644
index ea7a445..0000000
--- a/sysdeps/m68k/m68020/add_n.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
- sum in a third limb vector.
-
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/*
- INPUT PARAMETERS
- res_ptr (sp + 4)
- s1_ptr (sp + 8)
- s2_ptr (sp + 16)
- size (sp + 12)
-*/
-
-#include "asm-syntax.h"
-
- TEXT
- ALIGN
- GLOBL ___mpn_add_n
-
-LAB(___mpn_add_n)
-/* Save used registers on the stack. */
- INSN2(move,l ,MEM_PREDEC(sp),d2)
- INSN2(move,l ,MEM_PREDEC(sp),a2)
-
-/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,a2,MEM_DISP(sp,12))
- INSN2(move,l ,a0,MEM_DISP(sp,16))
- INSN2(move,l ,a1,MEM_DISP(sp,20))
- INSN2(move,l ,d2,MEM_DISP(sp,24))
-
- INSN2(eor,w ,d2,#1)
- INSN2(lsr,l ,d2,#1)
- bcc L1
- INSN2(subq,l ,d2,#1) /* clears cy as side effect */
-
-LAB(Loop)
- INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(addx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(addx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-
- dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
- INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
- INSN2(sub,l ,d2,#0x10000)
- bcs L2
- INSN2(add,l ,d0,d0) /* restore cy */
- bra Loop
-
-LAB(L2)
- INSN1(neg,l ,d0)
-
-/* Restore used registers from stack frame. */
- INSN2(move,l ,a2,MEM_POSTINC(sp))
- INSN2(move,l ,d2,MEM_POSTINC(sp))
-
- rts
diff --git a/sysdeps/m68k/m68020/asm-syntax.h b/sysdeps/m68k/m68020/asm-syntax.h
deleted file mode 100644
index 394b3ca..0000000
--- a/sysdeps/m68k/m68020/asm-syntax.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* asm.h -- Definitions for 68k syntax variations.
-
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#ifdef MIT_SYNTAX
-#define MEM(base)base@
-#define MEM_DISP(base,displacement)base@(displacement)
-#define MEM_PREDEC(memory_base)memory_base@-
-#define MEM_POSTINC(memory_base)memory_base@+
-#ifdef __STDC__
-#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
-#else
-#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
-#endif
-#define LAB(label) label:
-#define TEXT .text
-#define ALIGN .even
-#define GLOBL .globl
-#endif
-
-#ifdef SONY_SYNTAX
-#define MEM(base)(base)
-#define MEM_DISP(base,displacement)(displacement,base)
-#define MEM_PREDEC(memory_base)-(memory_base)
-#define MEM_POSTINC(memory_base)(memory_base)+
-#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
-#ifdef __STDC__
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
-#else
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
-#endif
-#define LAB(label) label:
-#define TEXT .text
-#define ALIGN .even
-#define GLOBL .globl
-#endif
-
-#ifdef MOTOROLA_SYNTAX
-#define MEM(base)(base)
-#define MEM_DISP(base,displacement)(displacement,base)
-#define MEM_PREDEC(memory_base)-(memory_base)
-#define MEM_POSTINC(memory_base)(memory_base)+
-#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
-#ifdef __STDC__
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
-#else
-#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
-#endif
-#define LAB(label) label
-#define TEXT
-#define ALIGN
-#define GLOBL XDEF
-#define l L
-#define w W
-#define move MOVE
-#define eor EOR
-#define lsr LSR
-#define add ADD
-#define addx ADDX
-#define addq ADDQ
-#define sub SUB
-#define subx SUBX
-#define subq SUBQ
-#define neg NEG
-#define bcc BCC
-#define bcs BCS
-#define bra BRA
-#define dbf DBF
-#define rts RTS
-#define d0 D0
-#define d1 D1
-#define d2 D2
-#define d3 D3
-#define d4 D4
-#define d5 D5
-#define d6 D6
-#define d7 D7
-#define a0 A0
-#define a1 A1
-#define a2 A2
-#define a3 A3
-#define a4 A4
-#define a5 A5
-#define a6 A6
-#define a7 A7
-#define sp SP
-#endif
diff --git a/sysdeps/m68k/m68020/sub_n.S b/sysdeps/m68k/m68020/sub_n.S
deleted file mode 100644
index 19f0ec1..0000000
--- a/sysdeps/m68k/m68020/sub_n.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
- store difference in a third limb vector.
-
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
-
-This file is part of the GNU MP Library.
-
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-/*
- INPUT PARAMETERS
- res_ptr (sp + 4)
- s1_ptr (sp + 8)
- s2_ptr (sp + 16)
- size (sp + 12)
-*/
-
-#include "asm-syntax.h"
-
- TEXT
- ALIGN
- GLOBL ___mpn_sub_n
-
-LAB(___mpn_sub_n)
-/* Save used registers on the stack. */
- INSN2(move,l ,MEM_PREDEC(sp),d2)
- INSN2(move,l ,MEM_PREDEC(sp),a2)
-
-/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,a2,MEM_DISP(sp,12))
- INSN2(move,l ,a0,MEM_DISP(sp,16))
- INSN2(move,l ,a1,MEM_DISP(sp,20))
- INSN2(move,l ,d2,MEM_DISP(sp,24))
-
- INSN2(eor,w ,d2,#1)
- INSN2(lsr,l ,d2,#1)
- bcc L1
- INSN2(subq,l ,d2,#1) /* clears cy as side effect */
-
-LAB(Loop)
- INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(subx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(subx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-
- dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
- INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
- INSN2(sub,l ,d2,#0x10000)
- bcs L2
- INSN2(add,l ,d0,d0) /* restore cy */
- bra Loop
-
-LAB(L2)
- INSN1(neg,l ,d0)
-
-/* Restore used registers from stack frame. */
- INSN2(move,l ,a2,MEM_POSTINC(sp))
- INSN2(move,l ,d2,MEM_POSTINC(sp))
-
- rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=855d4c52032f6723ddf9810a229ee566dc8d093d
commit 855d4c52032f6723ddf9810a229ee566dc8d093d
Author: Roland McGrath <roland@gnu.org>
Date: Sat Mar 2 21:37:50 1996 +0000
Sat Mar 2 16:35:40 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/m68k/profil-counter.h: File removed.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: File
removed.
* sysdeps/generic/profil-counter.h: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/profil-counter.h b/sysdeps/unix/sysv/linux/m68k/profil-counter.h
deleted file mode 100644
index 4e7b132..0000000
--- a/sysdeps/unix/sysv/linux/m68k/profil-counter.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Machine-dependent SIGPROF signal handler. Linux/m68k version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-static void
-profil_counter (int signr, int code, struct sigcontext *scp)
-{
- profil_count ((void *) scp->sc_pc);
-}
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h
deleted file mode 100644
index be1a932..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Machine-dependent SIGPROF signal handler. Solaris2/sparc version.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-static void
-profil_counter (int signr, int code, struct sigcontext *scp)
-{
- profil_count ((void *) scp->sc_pc);
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dbba6d57d0b553282cc0b7b6bcd2a9320c732d45
commit dbba6d57d0b553282cc0b7b6bcd2a9320c732d45
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Mar 2 01:34:50 1996 +0000
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h: New file,
including <sysdeps/unix/bsd/sun/sparc/sigcontext.h>.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: New file,
same as linux/m68k/profil-counter.h except the comment.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h
new file mode 100644
index 0000000..be1a932
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h
@@ -0,0 +1,24 @@
+/* Machine-dependent SIGPROF signal handler. Solaris2/sparc version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+static void
+profil_counter (int signr, int code, struct sigcontext *scp)
+{
+ profil_count ((void *) scp->sc_pc);
+}
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h
new file mode 100644
index 0000000..532b379
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sparc/sigcontext.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3de9f02e926f066b8ccd1cd3c1b58285d9034646
commit 3de9f02e926f066b8ccd1cd3c1b58285d9034646
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 1 18:43:45 1996 +0000
Updated from /src/gmp-1.937
diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s
index 46d277d..8b168cb 100644
--- a/sysdeps/alpha/addmul_1.s
+++ b/sysdeps/alpha/addmul_1.s
@@ -26,16 +26,7 @@
# size r18
# s2_limb r19
- # This code runs at 42 cycles/limb on the 21064.
-
- # To improve performance for long multiplications, we would use
- # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use
- # these instructions without slowing down the general code: 1. We can
- # only have two prefetches in operation at any time in the Alpha
- # architecture. 2. There will seldom be any special alignment
- # between RES_PTR and S1_PTR. Maybe we can simply divide the current
- # loop into an inner and outer loop, having the inner loop handle
- # exactly one prefetch block?
+ # This code runs at 42 cycles/limb on EV4 and 18 cycles/limb on EV5.
.set noreorder
.set noat
@@ -52,7 +43,7 @@ __mpn_addmul_1:
mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
umulh $2,$19,$0 # $0 = prod_high
- beq $18,Lend1 # jump if size was == 1
+ beq $18,.Lend1 # jump if size was == 1
ldq $2,0($17) # $2 = s1_limb
addq $17,8,$17 # s1_ptr++
subq $18,1,$18 # size--
@@ -60,10 +51,10 @@ __mpn_addmul_1:
cmpult $3,$5,$4
stq $3,0($16)
addq $16,8,$16 # res_ptr++
- beq $18,Lend2 # jump if size was == 2
+ beq $18,.Lend2 # jump if size was == 2
.align 3
-Loop: mulq $2,$19,$3 # $3 = prod_low
+.Loop: mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
subq $18,1,$18 # size--
@@ -77,9 +68,9 @@ Loop: mulq $2,$19,$3 # $3 = prod_low
stq $3,0($16)
addq $16,8,$16 # res_ptr++
addq $5,$0,$0 # combine carries
- bne $18,Loop
+ bne $18,.Loop
-Lend2: mulq $2,$19,$3 # $3 = prod_low
+.Lend2: mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
umulh $2,$19,$4 # $4 = cy_limb
@@ -91,7 +82,7 @@ Lend2: mulq $2,$19,$3 # $3 = prod_low
addq $5,$0,$0 # combine carries
addq $4,$0,$0 # cy_limb = prod_high + cy
ret $31,($26),1
-Lend1: addq $5,$3,$3
+.Lend1: addq $5,$3,$3
cmpult $3,$5,$5
stq $3,0($16)
addq $0,$5,$0
diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s
index 2aaf041..66cf82b 100644
--- a/sysdeps/alpha/alphaev5/add_n.s
+++ b/sysdeps/alpha/alphaev5/add_n.s
@@ -35,84 +35,113 @@
__mpn_add_n:
.frame $30,0,$26,0
- ldq $3,0($17)
- ldq $4,0($18)
-
- subq $19,1,$19
- and $19,4-1,$2 # number of limbs in first loop
- bis $31,$31,$0
- beq $2,.L0 # if multiple of 4 limbs, skip first loop
-
- subq $19,$2,$19
-
-.Loop0: subq $2,1,$2
+ or $31,$31,$25 # clear cy
+ subq $19,4,$19 # decr loop cnt
+ blt $19,.Lend2 # if less than 4 limbs, goto 2nd loop
+ # Start software pipeline for 1st loop
+ ldq $0,0($18)
+ ldq $1,8($18)
+ ldq $4,0($17)
ldq $5,8($17)
- addq $4,$0,$4
- ldq $6,8($18)
- cmpult $4,$0,$1
- addq $3,$4,$4
- cmpult $4,$3,$0
- stq $4,0($16)
- or $0,$1,$0
-
- addq $17,8,$17
- addq $18,8,$18
- bis $5,$5,$3
- bis $6,$6,$4
- addq $16,8,$16
- bne $2,.Loop0
-
-.L0: beq $19,.Lend
-
+ addq $17,32,$17 # update s1_ptr
+ ldq $2,16($18)
+ addq $0,$4,$20 # 1st main add
+ ldq $3,24($18)
+ subq $19,4,$19 # decr loop cnt
+ ldq $6,-16($17)
+ cmpult $20,$0,$25 # compute cy from last add
+ ldq $7,-8($17)
+ addq $1,$25,$28 # cy add
+ addq $18,32,$18 # update s2_ptr
+ addq $5,$28,$21 # 2nd main add
+ cmpult $28,$25,$8 # compute cy from last add
+ blt $19,.Lend1 # if less than 4 limbs remain, jump
+ # 1st loop handles groups of 4 limbs in a software pipeline
.align 4
-.Loop: subq $19,4,$19
- unop
-
- ldq $6,8($18)
- addq $4,$0,$0
+.Loop: cmpult $21,$28,$25 # compute cy from last add
+ ldq $0,0($18)
+ or $8,$25,$25 # combine cy from the two adds
+ ldq $1,8($18)
+ addq $2,$25,$28 # cy add
+ ldq $4,0($17)
+ addq $28,$6,$22 # 3rd main add
ldq $5,8($17)
- cmpult $0,$4,$1
- ldq $4,16($18)
- addq $3,$0,$20
- cmpult $20,$3,$0
- ldq $3,16($17)
- or $0,$1,$0
- addq $6,$0,$0
- cmpult $0,$6,$1
- ldq $6,24($18)
- addq $5,$0,$21
- cmpult $21,$5,$0
- ldq $5,24($17)
- or $0,$1,$0
- addq $4,$0,$0
- cmpult $0,$4,$1
- ldq $4,32($18)
- addq $3,$0,$22
- cmpult $22,$3,$0
- ldq $3,32($17)
- or $0,$1,$0
- addq $6,$0,$0
- cmpult $0,$6,$1
- addq $5,$0,$23
- cmpult $23,$5,$0
- or $0,$1,$0
-
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $22,$28,$25 # compute cy from last add
stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
stq $21,8($16)
- stq $22,16($16)
- stq $23,24($16)
-
- addq $17,32,$17
- addq $18,32,$18
- addq $16,32,$16
- bne $19,.Loop
+ addq $3,$25,$28 # cy add
+ addq $28,$7,$23 # 4th main add
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $23,$28,$25 # compute cy from last add
+ addq $17,32,$17 # update s1_ptr
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,32,$16 # update res_ptr
+ addq $0,$25,$28 # cy add
+ ldq $2,16($18)
+ addq $4,$28,$20 # 1st main add
+ ldq $3,24($18)
+ cmpult $28,$25,$8 # compute cy from last add
+ ldq $6,-16($17)
+ cmpult $20,$28,$25 # compute cy from last add
+ ldq $7,-8($17)
+ or $8,$25,$25 # combine cy from the two adds
+ subq $19,4,$19 # decr loop cnt
+ stq $22,-16($16)
+ addq $1,$25,$28 # cy add
+ stq $23,-8($16)
+ addq $5,$28,$21 # 2nd main add
+ addq $18,32,$18 # update s2_ptr
+ cmpult $28,$25,$8 # compute cy from last add
+ bge $19,.Loop
+ # Finish software pipeline for 1st loop
+.Lend1: cmpult $21,$28,$25 # compute cy from last add
+ or $8,$25,$25 # combine cy from the two adds
+ addq $2,$25,$28 # cy add
+ addq $28,$6,$22 # 3rd main add
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $22,$28,$25 # compute cy from last add
+ stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
+ stq $21,8($16)
+ addq $3,$25,$28 # cy add
+ addq $28,$7,$23 # 4th main add
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $23,$28,$25 # compute cy from last add
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,32,$16 # update res_ptr
+ stq $22,-16($16)
+ stq $23,-8($16)
+.Lend2: addq $19,4,$19 # restore loop cnt
+ beq $19,.Lret
+ # Start software pipeline for 2nd loop
+ ldq $0,0($18)
+ ldq $4,0($17)
+ subq $19,1,$19
+ beq $19,.Lend0
+ # 2nd loop handles remaining 1-3 limbs
+ .align 4
+.Loop0: addq $0,$25,$28 # cy add
+ ldq $0,8($18)
+ addq $4,$28,$20 # main add
+ ldq $4,8($17)
+ addq $18,8,$18
+ cmpult $28,$25,$8 # compute cy from last add
+ addq $17,8,$17
+ stq $20,0($16)
+ cmpult $20,$28,$25 # compute cy from last add
+ subq $19,1,$19 # decr loop cnt
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,8,$16
+ bne $19,.Loop0
+.Lend0: addq $0,$25,$28 # cy add
+ addq $4,$28,$20 # main add
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $20,$28,$25 # compute cy from last add
+ stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
-.Lend: addq $4,$0,$4
- cmpult $4,$0,$1
- addq $3,$4,$4
- cmpult $4,$3,$0
- stq $4,0($16)
- or $0,$1,$0
+.Lret: or $25,$31,$0 # return cy
ret $31,($26),1
-
.end __mpn_add_n
diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s
index fdb0895..392b424 100644
--- a/sysdeps/alpha/alphaev5/lshift.s
+++ b/sysdeps/alpha/alphaev5/lshift.s
@@ -25,7 +25,7 @@
# size r18
# cnt r19
- # This code runs at 4.25 cycles/limb on the EV5.
+ # This code runs at 3.25 cycles/limb on the EV5.
.set noreorder
.set noat
@@ -44,11 +44,11 @@ __mpn_lshift:
and $18,4-1,$28 # number of limbs in first loop
srl $4,$20,$0 # compute function result
- beq $28,L0
+ beq $28,.L0
subq $18,$28,$18
.align 3
-Loop0: ldq $3,-16($17)
+.Loop0: ldq $3,-16($17)
subq $16,8,$16
sll $4,$19,$5
subq $17,8,$17
@@ -57,17 +57,17 @@ Loop0: ldq $3,-16($17)
or $3,$3,$4
or $5,$6,$8
stq $8,0($16)
- bne $28,Loop0
+ bne $28,.Loop0
-L0: sll $4,$19,$24
- beq $18,Lend
+.L0: sll $4,$19,$24
+ beq $18,.Lend
# warm up phase 1
ldq $1,-16($17)
subq $18,4,$18
ldq $2,-24($17)
ldq $3,-32($17)
ldq $4,-40($17)
- beq $18,Lcool1
+ beq $18,.Lend1
# warm up phase 2
srl $1,$20,$7
sll $1,$19,$21
@@ -84,10 +84,10 @@ L0: sll $4,$19,$24
sll $4,$19,$24
ldq $4,-72($17)
subq $18,4,$18
- beq $18,Lcool1
+ beq $18,.Lend2
.align 4
# main loop
-Loop: stq $7,-8($16)
+.Loop: stq $7,-8($16)
or $5,$22,$5
stq $8,-16($16)
or $6,$23,$6
@@ -113,16 +113,14 @@ Loop: stq $7,-8($16)
subq $16,32,$16
srl $4,$20,$6
- ldq $3,-96($17
+ ldq $3,-96($17)
sll $4,$19,$24
ldq $4,-104($17)
subq $17,32,$17
- bne $18,Loop
- unop
- unop
+ bne $18,.Loop
# cool down phase 2/1
-Lcool1: stq $7,-8($16)
+.Lend2: stq $7,-8($16)
or $5,$22,$5
stq $8,-16($16)
or $6,$23,$6
@@ -150,7 +148,7 @@ Lcool1: stq $7,-8($16)
ret $31,($26),1
# cool down phase 1/1
-Lcool1: srl $1,$20,$7
+.Lend1: srl $1,$20,$7
sll $1,$19,$21
srl $2,$20,$8
sll $2,$19,$22
@@ -170,6 +168,6 @@ Lcool1: srl $1,$20,$7
stq $24,-40($16)
ret $31,($26),1
-Lend stq $24,-8($16)
+.Lend: stq $24,-8($16)
ret $31,($26),1
.end __mpn_lshift
diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s
index 1da9960..d20dde3 100644
--- a/sysdeps/alpha/alphaev5/rshift.s
+++ b/sysdeps/alpha/alphaev5/rshift.s
@@ -25,7 +25,7 @@
# size r18
# cnt r19
- # This code runs at 4.25 cycles/limb on the EV5.
+ # This code runs at 3.25 cycles/limb on the EV5.
.set noreorder
.set noat
@@ -42,11 +42,11 @@ __mpn_rshift:
and $18,4-1,$28 # number of limbs in first loop
sll $4,$20,$0 # compute function result
- beq $28,L0
+ beq $28,.L0
subq $18,$28,$18
.align 3
-Loop0: ldq $3,8($17)
+.Loop0: ldq $3,8($17)
addq $16,8,$16
srl $4,$19,$5
addq $17,8,$17
@@ -55,17 +55,17 @@ Loop0: ldq $3,8($17)
or $3,$3,$4
or $5,$6,$8
stq $8,-8($16)
- bne $28,Loop0
+ bne $28,.Loop0
-L0: srl $4,$19,$24
- beq $18,Lend
+.L0: srl $4,$19,$24
+ beq $18,.Lend
# warm up phase 1
ldq $1,8($17)
subq $18,4,$18
ldq $2,16($17)
ldq $3,24($17)
ldq $4,32($17)
- beq $18,Lcool1
+ beq $18,.Lend1
# warm up phase 2
sll $1,$20,$7
srl $1,$19,$21
@@ -82,10 +82,10 @@ L0: srl $4,$19,$24
srl $4,$19,$24
ldq $4,64($17)
subq $18,4,$18
- beq $18,Lcool2
+ beq $18,.Lend2
.align 4
# main loop
-Loop: stq $7,0($16)
+.Loop: stq $7,0($16)
or $5,$22,$5
stq $8,8($16)
or $6,$23,$6
@@ -116,11 +116,9 @@ Loop: stq $7,0($16)
ldq $4,96($17)
addq $17,32,$17
- bne $18,Loop
- unop
- unop
+ bne $18,.Loop
# cool down phase 2/1
-Lcool2: stq $7,0($16)
+.Lend2: stq $7,0($16)
or $5,$22,$5
stq $8,8($16)
or $6,$23,$6
@@ -148,7 +146,7 @@ Lcool2: stq $7,0($16)
ret $31,($26),1
# cool down phase 1/1
-Lcool1: sll $1,$20,$7
+.Lend1: sll $1,$20,$7
srl $1,$19,$21
sll $2,$20,$8
srl $2,$19,$22
@@ -168,6 +166,6 @@ Lcool1: sll $1,$20,$7
stq $24,32($16)
ret $31,($26),1
-Lend: stq $24,0($16)
+.Lend: stq $24,0($16)
ret $31,($26),1
.end __mpn_rshift
diff --git a/sysdeps/alpha/alphaev5/sub_n.s b/sysdeps/alpha/alphaev5/sub_n.s
new file mode 100644
index 0000000..c9f3a4e
--- /dev/null
+++ b/sysdeps/alpha/alphaev5/sub_n.s
@@ -0,0 +1,148 @@
+ # Alpha __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ # store difference in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # s2_ptr $18
+ # size $19
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_sub_n
+ .ent __mpn_sub_n
+__mpn_sub_n:
+ .frame $30,0,$26,0
+
+ or $31,$31,$25 # clear cy
+ subq $19,4,$19 # decr loop cnt
+ blt $19,.Lend2 # if less than 4 limbs, goto 2nd loop
+ # Start software pipeline for 1st loop
+ ldq $0,0($18)
+ ldq $1,8($18)
+ ldq $4,0($17)
+ ldq $5,8($17)
+ addq $17,32,$17 # update s1_ptr
+ ldq $2,16($18)
+ subq $4,$0,$20 # 1st main sub
+ ldq $3,24($18)
+ subq $19,4,$19 # decr loop cnt
+ ldq $6,-16($17)
+ cmpult $4,$20,$25 # compute cy from last sub
+ ldq $7,-8($17)
+ addq $1,$25,$28 # cy add
+ addq $18,32,$18 # update s2_ptr
+ subq $5,$28,$21 # 2nd main sub
+ cmpult $28,$25,$8 # compute cy from last add
+ blt $19,.Lend1 # if less than 4 limbs remain, jump
+ # 1st loop handles groups of 4 limbs in a software pipeline
+ .align 4
+.Loop: cmpult $5,$21,$25 # compute cy from last add
+ ldq $0,0($18)
+ or $8,$25,$25 # combine cy from the two adds
+ ldq $1,8($18)
+ addq $2,$25,$28 # cy add
+ ldq $4,0($17)
+ subq $6,$28,$22 # 3rd main sub
+ ldq $5,8($17)
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $6,$22,$25 # compute cy from last add
+ stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
+ stq $21,8($16)
+ addq $3,$25,$28 # cy add
+ subq $7,$28,$23 # 4th main sub
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $7,$23,$25 # compute cy from last add
+ addq $17,32,$17 # update s1_ptr
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,32,$16 # update res_ptr
+ addq $0,$25,$28 # cy add
+ ldq $2,16($18)
+ subq $4,$28,$20 # 1st main sub
+ ldq $3,24($18)
+ cmpult $28,$25,$8 # compute cy from last add
+ ldq $6,-16($17)
+ cmpult $4,$20,$25 # compute cy from last add
+ ldq $7,-8($17)
+ or $8,$25,$25 # combine cy from the two adds
+ subq $19,4,$19 # decr loop cnt
+ stq $22,-16($16)
+ addq $1,$25,$28 # cy add
+ stq $23,-8($16)
+ subq $5,$28,$21 # 2nd main sub
+ addq $18,32,$18 # update s2_ptr
+ cmpult $28,$25,$8 # compute cy from last add
+ bge $19,.Loop
+ # Finish software pipeline for 1st loop
+.Lend1: cmpult $5,$21,$25 # compute cy from last add
+ or $8,$25,$25 # combine cy from the two adds
+ addq $2,$25,$28 # cy add
+ subq $6,$28,$22 # 3rd main sub
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $6,$22,$25 # compute cy from last add
+ stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
+ stq $21,8($16)
+ addq $3,$25,$28 # cy add
+ subq $7,$28,$23 # 4th main sub
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $7,$23,$25 # compute cy from last add
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,32,$16 # update res_ptr
+ stq $22,-16($16)
+ stq $23,-8($16)
+.Lend2: addq $19,4,$19 # restore loop cnt
+ beq $19,.Lret
+ # Start software pipeline for 2nd loop
+ ldq $0,0($18)
+ ldq $4,0($17)
+ subq $19,1,$19
+ beq $19,.Lend0
+ # 2nd loop handles remaining 1-3 limbs
+ .align 4
+.Loop0: addq $0,$25,$28 # cy add
+ ldq $0,8($18)
+ subq $4,$28,$20 # main sub
+ ldq $1,8($17)
+ addq $18,8,$18
+ cmpult $28,$25,$8 # compute cy from last add
+ addq $17,8,$17
+ stq $20,0($16)
+ cmpult $4,$20,$25 # compute cy from last add
+ subq $19,1,$19 # decr loop cnt
+ or $8,$25,$25 # combine cy from the two adds
+ addq $16,8,$16
+ or $1,$31,$4
+ bne $19,.Loop0
+.Lend0: addq $0,$25,$28 # cy add
+ subq $4,$28,$20 # main sub
+ cmpult $28,$25,$8 # compute cy from last add
+ cmpult $4,$20,$25 # compute cy from last add
+ stq $20,0($16)
+ or $8,$25,$25 # combine cy from the two adds
+
+.Lret: or $25,$31,$0 # return cy
+ ret $31,($26),1
+ .end __mpn_sub_n
diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s
index c284349..aa8417b 100644
--- a/sysdeps/alpha/lshift.s
+++ b/sysdeps/alpha/lshift.s
@@ -53,11 +53,11 @@ __mpn_lshift:
and $18,4-1,$20 # number of limbs in first loop
srl $4,$7,$0 # compute function result
- beq $20,L0
+ beq $20,.L0
subq $18,$20,$18
.align 3
-Loop0:
+.Loop0:
ldq $3,-8($17)
subq $16,8,$16
subq $17,8,$17
@@ -67,12 +67,12 @@ Loop0:
bis $3,$3,$4
bis $5,$6,$8
stq $8,0($16)
- bne $20,Loop0
+ bne $20,.Loop0
-L0: beq $18,Lend
+.L0: beq $18,.Lend
.align 3
-Loop: ldq $3,-8($17)
+.Loop: ldq $3,-8($17)
subq $16,32,$16
subq $18,4,$18
sll $4,$19,$5
@@ -100,9 +100,9 @@ Loop: ldq $3,-8($17)
bis $1,$2,$8
stq $8,0($16)
- bgt $18,Loop
+ bgt $18,.Loop
-Lend: sll $4,$19,$8
+.Lend: sll $4,$19,$8
stq $8,-8($16)
ret $31,($26),1
.end __mpn_lshift
diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s
index 3ef194d..58a63df 100644
--- a/sysdeps/alpha/mul_1.s
+++ b/sysdeps/alpha/mul_1.s
@@ -1,7 +1,7 @@
# Alpha 21064 __mpn_mul_1 -- Multiply a limb vector with a limb and store
# the result in a second limb vector.
- # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s
index 74eab04..037b776 100644
--- a/sysdeps/alpha/rshift.s
+++ b/sysdeps/alpha/rshift.s
@@ -34,7 +34,7 @@
# 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay.
# 2. Only aligned instruction pairs can be paired.
# 3. The store buffer or silo might not be able to deal with the bandwidth.
-
+
.set noreorder
.set noat
.text
@@ -51,11 +51,11 @@ __mpn_rshift:
and $18,4-1,$20 # number of limbs in first loop
sll $4,$7,$0 # compute function result
- beq $20,L0
+ beq $20,.L0
subq $18,$20,$18
.align 3
-Loop0:
+.Loop0:
ldq $3,0($17)
addq $16,8,$16
addq $17,8,$17
@@ -65,12 +65,12 @@ Loop0:
bis $3,$3,$4
bis $5,$6,$8
stq $8,-8($16)
- bne $20,Loop0
+ bne $20,.Loop0
-L0: beq $18,Lend
+.L0: beq $18,.Lend
.align 3
-Loop: ldq $3,0($17)
+.Loop: ldq $3,0($17)
addq $16,32,$16
subq $18,4,$18
srl $4,$19,$5
@@ -98,9 +98,9 @@ Loop: ldq $3,0($17)
bis $1,$2,$8
stq $8,-8($16)
- bgt $18,Loop
+ bgt $18,.Loop
-Lend: srl $4,$19,$8
+.Lend: srl $4,$19,$8
stq $8,0($16)
ret $31,($26),1
.end __mpn_rshift
diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s
index acaa11c..292b2c1 100644
--- a/sysdeps/alpha/submul_1.s
+++ b/sysdeps/alpha/submul_1.s
@@ -26,16 +26,7 @@
# size r18
# s2_limb r19
- # This code runs at 42 cycles/limb on the 21064.
-
- # To improve performance for long multiplications, we would use
- # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use
- # these instructions without slowing down the general code: 1. We can
- # only have two prefetches in operation at any time in the Alpha
- # architecture. 2. There will seldom be any special alignment
- # between RES_PTR and S1_PTR. Maybe we can simply divide the current
- # loop into an inner and outer loop, having the inner loop handle
- # exactly one prefetch block?
+ # This code runs at 42 cycles/limb on EV4 and 18 cycles/limb on EV5.
.set noreorder
.set noat
@@ -52,7 +43,7 @@ __mpn_submul_1:
mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
umulh $2,$19,$0 # $0 = prod_high
- beq $18,Lend1 # jump if size was == 1
+ beq $18,.Lend1 # jump if size was == 1
ldq $2,0($17) # $2 = s1_limb
addq $17,8,$17 # s1_ptr++
subq $18,1,$18 # size--
@@ -60,10 +51,10 @@ __mpn_submul_1:
cmpult $5,$3,$4
stq $3,0($16)
addq $16,8,$16 # res_ptr++
- beq $18,Lend2 # jump if size was == 2
+ beq $18,.Lend2 # jump if size was == 2
.align 3
-Loop: mulq $2,$19,$3 # $3 = prod_low
+.Loop: mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
subq $18,1,$18 # size--
@@ -77,9 +68,9 @@ Loop: mulq $2,$19,$3 # $3 = prod_low
stq $3,0($16)
addq $16,8,$16 # res_ptr++
addq $5,$0,$0 # combine carries
- bne $18,Loop
+ bne $18,.Loop
-Lend2: mulq $2,$19,$3 # $3 = prod_low
+.Lend2: mulq $2,$19,$3 # $3 = prod_low
ldq $5,0($16) # $5 = *res_ptr
addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
umulh $2,$19,$4 # $4 = cy_limb
@@ -91,7 +82,7 @@ Lend2: mulq $2,$19,$3 # $3 = prod_low
addq $5,$0,$0 # combine carries
addq $4,$0,$0 # cy_limb = prod_high + cy
ret $31,($26),1
-Lend1: subq $5,$3,$3
+.Lend1: subq $5,$3,$3
cmpult $5,$3,$5
stq $3,0($16)
addq $0,$5,$0
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index bafafd6..ce590ed 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -1,6 +1,6 @@
# Alpha 21064 __udiv_qrnnd
- # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -21,13 +21,11 @@
.set noreorder
.set noat
-
.text
- .align 3
- .globl __udiv_qrnnd
- .ent __udiv_qrnnd 0
+ .align 3
+ .globl __udiv_qrnnd
+ .ent __udiv_qrnnd
__udiv_qrnnd:
-__udiv_qrnnd..ng:
.frame $30,0,$26,0
.prologue 0
#define cnt $2
@@ -39,9 +37,9 @@ __udiv_qrnnd..ng:
#define qb $20
ldiq cnt,16
- blt d,Largedivisor
+ blt d,.Largedivisor
-Loop1: cmplt n0,0,tmp
+.Loop1: cmplt n0,0,tmp
addq n1,n1,n1
bis n1,tmp,n1
addq n0,n0,n0
@@ -74,12 +72,12 @@ Loop1: cmplt n0,0,tmp
cmovne qb,tmp,n1
bis n0,qb,n0
subq cnt,1,cnt
- bgt cnt,Loop1
+ bgt cnt,.Loop1
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
-Largedivisor:
+.Largedivisor:
and n0,1,$4
srl n0,1,n0
@@ -91,7 +89,7 @@ Largedivisor:
srl d,1,$5
addq $5,$6,$5
-Loop2: cmplt n0,0,tmp
+.Loop2: cmplt n0,0,tmp
addq n1,n1,n1
bis n1,tmp,n1
addq n0,n0,n0
@@ -124,27 +122,27 @@ Loop2: cmplt n0,0,tmp
cmovne qb,tmp,n1
bis n0,qb,n0
subq cnt,1,cnt
- bgt cnt,Loop2
+ bgt cnt,.Loop2
addq n1,n1,n1
addq $4,n1,n1
- bne $6,Odd
+ bne $6,.LOdd
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
-Odd:
+.LOdd:
/* q' in n0. r' in n1 */
addq n1,n0,n1
cmpult n1,n0,tmp # tmp := carry from addq
- beq tmp,LLp6
+ beq tmp,.LLp6
addq n0,1,n0
subq n1,d,n1
-LLp6: cmpult n1,d,tmp
- bne tmp,LLp7
+.LLp6: cmpult n1,d,tmp
+ bne tmp,.LLp7
addq n0,1,n0
subq n1,d,n1
-LLp7:
+.LLp7:
stq n1,0(rem_ptr)
bis $31,n0,$0
ret $31,($26),1
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S
index ea7a445..754af9f 100644
--- a/sysdeps/m68k/add_n.S
+++ b/sysdeps/m68k/add_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -27,50 +27,53 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
size (sp + 12)
*/
+#include "sysdep.h"
#include "asm-syntax.h"
TEXT
ALIGN
- GLOBL ___mpn_add_n
+ GLOBL C_SYMBOL_NAME(__mpn_add_n)
-LAB(___mpn_add_n)
+C_SYMBOL_NAME(__mpn_add_n:)
+PROLOG(__mpn_add_n)
/* Save used registers on the stack. */
- INSN2(move,l ,MEM_PREDEC(sp),d2)
- INSN2(move,l ,MEM_PREDEC(sp),a2)
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(a2),MEM_PREDEC(sp)
/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,a2,MEM_DISP(sp,12))
- INSN2(move,l ,a0,MEM_DISP(sp,16))
- INSN2(move,l ,a1,MEM_DISP(sp,20))
- INSN2(move,l ,d2,MEM_DISP(sp,24))
-
- INSN2(eor,w ,d2,#1)
- INSN2(lsr,l ,d2,#1)
- bcc L1
- INSN2(subq,l ,d2,#1) /* clears cy as side effect */
-
-LAB(Loop)
- INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(addx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(addx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-
- dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
- INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
- INSN2(sub,l ,d2,#0x10000)
- bcs L2
- INSN2(add,l ,d0,d0) /* restore cy */
- bra Loop
-
-LAB(L2)
- INSN1(neg,l ,d0)
+ movel MEM_DISP(sp,12),R(a2)
+ movel MEM_DISP(sp,16),R(a0)
+ movel MEM_DISP(sp,20),R(a1)
+ movel MEM_DISP(sp,24),R(d2)
+
+ eorw #1,R(d2)
+ lsrl #1,R(d2)
+ bcc L(L1)
+ subql #1,R(d2) /* clears cy as side effect */
+
+L(Loop:)
+ movel MEM_POSTINC(a0),R(d0)
+ movel MEM_POSTINC(a1),R(d1)
+ addxl R(d1),R(d0)
+ movel R(d0),MEM_POSTINC(a2)
+L(L1:) movel MEM_POSTINC(a0),R(d0)
+ movel MEM_POSTINC(a1),R(d1)
+ addxl R(d1),R(d0)
+ movel R(d0),MEM_POSTINC(a2)
+
+ dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */
+ subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ subl #0x10000,R(d2)
+ bcs L(L2)
+ addl R(d0),R(d0) /* restore cy */
+ bra L(Loop)
+
+L(L2:)
+ negl R(d0)
/* Restore used registers from stack frame. */
- INSN2(move,l ,a2,MEM_POSTINC(sp))
- INSN2(move,l ,d2,MEM_POSTINC(sp))
+ movel MEM_POSTINC(sp),R(a2)
+ movel MEM_POSTINC(sp),R(d2)
rts
+EPILOG(__mpn_add_n)
diff --git a/sysdeps/m68k/lshift.S b/sysdeps/m68k/lshift.S
new file mode 100644
index 0000000..c58594a
--- /dev/null
+++ b/sysdeps/m68k/lshift.S
@@ -0,0 +1,150 @@
+/* mc68020 __mpn_lshift -- Shift left a low-level natural-number integer.
+
+Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s_ptr (sp + 8)
+ s_size (sp + 16)
+ cnt (sp + 12)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+#define res_ptr a1
+#define s_ptr a0
+#define s_size d6
+#define cnt d4
+
+ TEXT
+ ALIGN
+ GLOBL C_SYMBOL_NAME(__mpn_lshift)
+
+C_SYMBOL_NAME(__mpn_lshift:)
+PROLOG(__mpn_lshift)
+
+/* Save used registers on the stack. */
+ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
+
+/* Copy the arguments to registers. */
+ movel MEM_DISP(sp,28),R(res_ptr)
+ movel MEM_DISP(sp,32),R(s_ptr)
+ movel MEM_DISP(sp,36),R(s_size)
+ movel MEM_DISP(sp,40),R(cnt)
+
+ moveql #1,R(d5)
+ cmpl R(d5),R(cnt)
+ bne L(Lnormal)
+ cmpl R(s_ptr),R(res_ptr)
+ bls L(Lspecial) /* jump if s_ptr >= res_ptr */
+#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
+ lea MEM_INDX1(s_ptr,s_size,l,4),R(a2)
+#else /* not mc68020 */
+ movel R(s_size),R(d0)
+ asll #2,R(d0)
+ lea MEM_INDX(s_ptr,d0,l),R(a2)
+#endif
+ cmpl R(res_ptr),R(a2)
+ bls L(Lspecial) /* jump if res_ptr >= s_ptr + s_size */
+
+L(Lnormal:)
+ moveql #32,R(d5)
+ subl R(cnt),R(d5)
+
+#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
+ lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr)
+ lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr)
+#else /* not mc68000 */
+ movel R(s_size),R(d0)
+ asll #2,R(d0)
+ addl R(s_size),R(s_ptr)
+ addl R(s_size),R(res_ptr)
+#endif
+ movel MEM_PREDEC(s_ptr),R(d2)
+ movel R(d2),R(d0)
+ lsrl R(d5),R(d0) /* compute carry limb */
+
+ lsll R(cnt),R(d2)
+ movel R(d2),R(d1)
+ subql #1,R(s_size)
+ beq L(Lend)
+ lsrl #1,R(s_size)
+ bcs L(L1)
+ subql #1,R(s_size)
+
+L(Loop:)
+ movel MEM_PREDEC(s_ptr),R(d2)
+ movel R(d2),R(d3)
+ lsrl R(d5),R(d3)
+ orl R(d3),R(d1)
+ movel R(d1),MEM_PREDEC(res_ptr)
+ lsll R(cnt),R(d2)
+L(L1:)
+ movel MEM_PREDEC(s_ptr),R(d1)
+ movel R(d1),R(d3)
+ lsrl R(d5),R(d3)
+ orl R(d3),R(d2)
+ movel R(d2),MEM_PREDEC(res_ptr)
+ lsll R(cnt),R(d1)
+
+ dbf R(s_size),L(Loop)
+ subl #0x10000,R(s_size)
+ bcc L(Loop)
+
+L(Lend:)
+ movel R(d1),MEM_PREDEC(res_ptr) /* store least significant limb */
+
+/* Restore used registers from stack frame. */
+ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ rts
+
+/* We loop from least significant end of the arrays, which is only
+ permissable if the source and destination don't overlap, since the
+ function is documented to work for overlapping source and destination. */
+
+L(Lspecial:)
+ clrl R(d0) /* initialize carry */
+ eorw #1,R(s_size)
+ lsrl #1,R(s_size)
+ bcc L(LL1)
+ subql #1,R(s_size)
+
+L(LLoop:)
+ movel MEM_POSTINC(s_ptr),R(d2)
+ addxl R(d2),R(d2)
+ movel R(d2),MEM_POSTINC(res_ptr)
+L(LL1:)
+ movel MEM_POSTINC(s_ptr),R(d2)
+ addxl R(d2),R(d2)
+ movel R(d2),MEM_POSTINC(res_ptr)
+
+ dbf R(s_size),L(LLoop)
+ addxl R(d0),R(d0) /* save cy in lsb */
+ subl #0x10000,R(s_size)
+ bcs L(LLend)
+ lsrl #1,R(d0) /* restore cy */
+ bra L(LLoop)
+
+L(LLend:)
+/* Restore used registers from stack frame. */
+ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ rts
+EPILOG(__mpn_lshift)
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S
index 3f244c4..169f113 100644
--- a/sysdeps/m68k/m68020/addmul_1.S
+++ b/sysdeps/m68k/m68020/addmul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -23,58 +23,61 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
INPUT PARAMETERS
res_ptr (sp + 4)
s1_ptr (sp + 8)
- size (sp + 12)
+ s1_size (sp + 12)
s2_limb (sp + 16)
*/
+#include "sysdep.h"
#include "asm-syntax.h"
TEXT
ALIGN
- GLOBL ___mpn_addmul_1
+ GLOBL C_SYMBOL_NAME(__mpn_addmul_1)
-LAB(___mpn_addmul_1)
+C_SYMBOL_NAME(__mpn_addmul_1:)
+PROLOG(__mpn_addmul_1)
#define res_ptr a0
#define s1_ptr a1
-#define size d2
+#define s1_size d2
#define s2_limb d4
/* Save used registers on the stack. */
- INSN2(movem,l ,MEM_PREDEC(sp),d2-d5)
+ moveml R(d2)-R(d5),MEM_PREDEC(sp)
/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,res_ptr,MEM_DISP(sp,20))
- INSN2(move,l ,s1_ptr,MEM_DISP(sp,24))
- INSN2(move,l ,size,MEM_DISP(sp,28))
- INSN2(move,l ,s2_limb,MEM_DISP(sp,32))
-
- INSN2(eor,w ,size,#1)
- INSN1(clr,l ,d1)
- INSN1(clr,l ,d5)
- INSN2(lsr,l ,size,#1)
- bcc L1
- INSN2(subq,l ,size,#1)
- INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
-
-LAB(Loop)
- INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d1:d3,s2_limb)
- INSN2(addx,l ,d3,d0)
- INSN2(addx,l ,d1,d5)
- INSN2(add,l ,MEM_POSTINC(res_ptr),d3)
-LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d0:d3,s2_limb)
- INSN2(addx,l ,d3,d1)
- INSN2(addx,l ,d0,d5)
- INSN2(add,l ,MEM_POSTINC(res_ptr),d3)
-
- dbf size,Loop
- INSN2(addx,l ,d0,d5)
- INSN2(sub,l ,size,#0x10000)
- bcc Loop
+ movel MEM_DISP(sp,20),R(res_ptr)
+ movel MEM_DISP(sp,24),R(s1_ptr)
+ movel MEM_DISP(sp,28),R(s1_size)
+ movel MEM_DISP(sp,32),R(s2_limb)
+
+ eorw #1,R(s1_size)
+ clrl R(d1)
+ clrl R(d5)
+ lsrl #1,R(s1_size)
+ bcc L(L1)
+ subql #1,R(s1_size)
+ subl R(d0),R(d0) /* (d0,cy) <= (0,0) */
+
+L(Loop:)
+ movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d1):R(d3)
+ addxl R(d0),R(d3)
+ addxl R(d5),R(d1)
+ addl R(d3),MEM_POSTINC(res_ptr)
+L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d0):R(d3)
+ addxl R(d1),R(d3)
+ addxl R(d5),R(d0)
+ addl R(d3),MEM_POSTINC(res_ptr)
+
+ dbf R(s1_size),L(Loop)
+ addxl R(d5),R(d0)
+ subl #0x10000,R(s1_size)
+ bcc L(Loop)
/* Restore used registers from stack frame. */
- INSN2(movem,l ,d2-d5,MEM_POSTINC(sp))
+ moveml MEM_POSTINC(sp),R(d2)-R(d5)
rts
+EPILOG(__mpn_addmul_1)
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S
index 548ca00..4db1cca 100644
--- a/sysdeps/m68k/m68020/mul_1.S
+++ b/sysdeps/m68k/m68020/mul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -23,65 +23,68 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
INPUT PARAMETERS
res_ptr (sp + 4)
s1_ptr (sp + 8)
- size (sp + 12)
+ s1_size (sp + 12)
s2_limb (sp + 16)
*/
+#include "sysdep.h"
#include "asm-syntax.h"
TEXT
ALIGN
- GLOBL ___mpn_mul_1
+ GLOBL C_SYMBOL_NAME(__mpn_mul_1)
-LAB(___mpn_mul_1)
+C_SYMBOL_NAME(__mpn_mul_1:)
+PROLOG(__mpn_mul_1)
#define res_ptr a0
#define s1_ptr a1
-#define size d2
+#define s1_size d2
#define s2_limb d4
/* Save used registers on the stack. */
- INSN2(movem,l ,MEM_PREDEC(sp),d2-d4)
+ moveml R(d2)-R(d4),MEM_PREDEC(sp)
#if 0
- INSN2(move,l ,MEM_PREDEC(sp),d2)
- INSN2(move,l ,MEM_PREDEC(sp),d3)
- INSN2(move,l ,MEM_PREDEC(sp),d4)
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(d3),MEM_PREDEC(sp)
+ movel R(d4),MEM_PREDEC(sp)
#endif
/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,res_ptr,MEM_DISP(sp,16))
- INSN2(move,l ,s1_ptr,MEM_DISP(sp,20))
- INSN2(move,l ,size,MEM_DISP(sp,24))
- INSN2(move,l ,s2_limb,MEM_DISP(sp,28))
-
- INSN2(eor,w ,size,#1)
- INSN1(clr,l ,d1)
- INSN2(lsr,l ,size,#1)
- bcc L1
- INSN2(subq,l ,size,#1)
- INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
-
-LAB(Loop)
- INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d1:d3,s2_limb)
- INSN2(addx,l ,d3,d0)
- INSN2(move,l ,MEM_POSTINC(res_ptr),d3)
-LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d0:d3,s2_limb)
- INSN2(addx,l ,d3,d1)
- INSN2(move,l ,MEM_POSTINC(res_ptr),d3)
-
- dbf size,Loop
- INSN1(clr,l ,d3)
- INSN2(addx,l ,d0,d3)
- INSN2(sub,l ,size,#0x10000)
- bcc Loop
+ movel MEM_DISP(sp,16),R(res_ptr)
+ movel MEM_DISP(sp,20),R(s1_ptr)
+ movel MEM_DISP(sp,24),R(s1_size)
+ movel MEM_DISP(sp,28),R(s2_limb)
+
+ eorw #1,R(s1_size)
+ clrl R(d1)
+ lsrl #1,R(s1_size)
+ bcc L(L1)
+ subql #1,R(s1_size)
+ subl R(d0),R(d0) /* (d0,cy) <= (0,0) */
+
+L(Loop:)
+ movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d1):R(d3)
+ addxl R(d0),R(d3)
+ movel R(d3),MEM_POSTINC(res_ptr)
+L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d0):R(d3)
+ addxl R(d1),R(d3)
+ movel R(d3),MEM_POSTINC(res_ptr)
+
+ dbf R(s1_size),L(Loop)
+ clrl R(d3)
+ addxl R(d3),R(d0)
+ subl #0x10000,R(s1_size)
+ bcc L(Loop)
/* Restore used registers from stack frame. */
- INSN2(movem,l ,d2-d4,MEM_POSTINC(sp))
+ moveml MEM_POSTINC(sp),R(d2)-R(d4)
#if 0
- INSN2(move,l ,d4,MEM_POSTINC(sp))
- INSN2(move,l ,d3,MEM_POSTINC(sp))
- INSN2(move,l ,d2,MEM_POSTINC(sp))
+ movel MEM_POSTINC(sp),R(d4)
+ movel MEM_POSTINC(sp),R(d3)
+ movel MEM_POSTINC(sp),R(d2)
#endif
rts
+EPILOG(__mpn_mul_1)
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S
index ef7f39d..cf30029 100644
--- a/sysdeps/m68k/m68020/submul_1.S
+++ b/sysdeps/m68k/m68020/submul_1.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
the result from a second limb vector.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -23,58 +23,61 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
INPUT PARAMETERS
res_ptr (sp + 4)
s1_ptr (sp + 8)
- size (sp + 12)
+ s1_size (sp + 12)
s2_limb (sp + 16)
*/
+#include "sysdep.h"
#include "asm-syntax.h"
TEXT
ALIGN
- GLOBL ___mpn_submul_1
+ GLOBL C_SYMBOL_NAME(__mpn_submul_1)
-LAB(___mpn_submul_1)
+C_SYMBOL_NAME(__mpn_submul_1:)
+PROLOG(__mpn_submul_1)
#define res_ptr a0
#define s1_ptr a1
-#define size d2
+#define s1_size d2
#define s2_limb d4
/* Save used registers on the stack. */
- INSN2(movem,l ,MEM_PREDEC(sp),d2-d5)
+ moveml R(d2)-R(d5),MEM_PREDEC(sp)
/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,res_ptr,MEM_DISP(sp,20))
- INSN2(move,l ,s1_ptr,MEM_DISP(sp,24))
- INSN2(move,l ,size,MEM_DISP(sp,28))
- INSN2(move,l ,s2_limb,MEM_DISP(sp,32))
-
- INSN2(eor,w ,size,#1)
- INSN1(clr,l ,d1)
- INSN1(clr,l ,d5)
- INSN2(lsr,l ,size,#1)
- bcc L1
- INSN2(subq,l ,size,#1)
- INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
-
-LAB(Loop)
- INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d1:d3,s2_limb)
- INSN2(addx,l ,d3,d0)
- INSN2(addx,l ,d1,d5)
- INSN2(sub,l ,MEM_POSTINC(res_ptr),d3)
-LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
- INSN2(mulu,l ,d0:d3,s2_limb)
- INSN2(addx,l ,d3,d1)
- INSN2(addx,l ,d0,d5)
- INSN2(sub,l ,MEM_POSTINC(res_ptr),d3)
-
- dbf size,Loop
- INSN2(addx,l ,d0,d5)
- INSN2(sub,l ,size,#0x10000)
- bcc Loop
+ movel MEM_DISP(sp,20),R(res_ptr)
+ movel MEM_DISP(sp,24),R(s1_ptr)
+ movel MEM_DISP(sp,28),R(s1_size)
+ movel MEM_DISP(sp,32),R(s2_limb)
+
+ eorw #1,R(s1_size)
+ clrl R(d1)
+ clrl R(d5)
+ lsrl #1,R(s1_size)
+ bcc L(L1)
+ subql #1,R(s1_size)
+ subl R(d0),R(d0) /* (d0,cy) <= (0,0) */
+
+L(Loop:)
+ movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d1):R(d3)
+ addxl R(d0),R(d3)
+ addxl R(d5),R(d1)
+ subl R(d3),MEM_POSTINC(res_ptr)
+L(L1:) movel MEM_POSTINC(s1_ptr),R(d3)
+ mulul R(s2_limb),R(d0):R(d3)
+ addxl R(d1),R(d3)
+ addxl R(d5),R(d0)
+ subl R(d3),MEM_POSTINC(res_ptr)
+
+ dbf R(s1_size),L(Loop)
+ addxl R(d5),R(d0)
+ subl #0x10000,R(s1_size)
+ bcc L(Loop)
/* Restore used registers from stack frame. */
- INSN2(movem,l ,d2-d5,MEM_POSTINC(sp))
+ moveml MEM_POSTINC(sp),R(d2)-R(d5)
rts
+EPILOG(__mpn_submul_1)
diff --git a/sysdeps/m68k/rshift.S b/sysdeps/m68k/rshift.S
new file mode 100644
index 0000000..494dfcb
--- /dev/null
+++ b/sysdeps/m68k/rshift.S
@@ -0,0 +1,149 @@
+/* mc68020 __mpn_rshift -- Shift right a low-level natural-number integer.
+
+Copyright (C) 1996 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s_ptr (sp + 8)
+ s_size (sp + 16)
+ cnt (sp + 12)
+*/
+
+#include "sysdep.h"
+#include "asm-syntax.h"
+
+#define res_ptr a1
+#define s_ptr a0
+#define s_size d6
+#define cnt d4
+
+ TEXT
+ ALIGN
+ GLOBL C_SYMBOL_NAME(__mpn_rshift)
+
+C_SYMBOL_NAME(__mpn_rshift:)
+PROLOG(__mpn_rshift)
+/* Save used registers on the stack. */
+ moveml R(d2)-R(d6)/R(a2),MEM_PREDEC(sp)
+
+/* Copy the arguments to registers. */
+ movel MEM_DISP(sp,28),R(res_ptr)
+ movel MEM_DISP(sp,32),R(s_ptr)
+ movel MEM_DISP(sp,36),R(s_size)
+ movel MEM_DISP(sp,40),R(cnt)
+
+ moveql #1,R(d5)
+ cmpl R(d5),R(cnt)
+ bne L(Lnormal)
+ cmpl R(res_ptr),R(s_ptr)
+ bls L(Lspecial) /* jump if res_ptr >= s_ptr */
+#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
+ lea MEM_INDX1(res_ptr,s_size,l,4),R(a2)
+#else /* not mc68020 */
+ movel R(s_size),R(d0)
+ asll #2,R(d0)
+ lea MEM_INDX(res_ptr,d0,l),R(a2)
+#endif
+ cmpl R(s_ptr),R(a2)
+ bls L(Lspecial) /* jump if s_ptr >= res_ptr + s_size */
+
+L(Lnormal:)
+ moveql #32,R(d5)
+ subl R(cnt),R(d5)
+ movel MEM_POSTINC(s_ptr),R(d2)
+ movel R(d2),R(d0)
+ lsll R(d5),R(d0) /* compute carry limb */
+
+ lsrl R(cnt),R(d2)
+ movel R(d2),R(d1)
+ subql #1,R(s_size)
+ beq L(Lend)
+ lsrl #1,R(s_size)
+ bcs L(L1)
+ subql #1,R(s_size)
+
+L(Loop:)
+ movel MEM_POSTINC(s_ptr),R(d2)
+ movel R(d2),R(d3)
+ lsll R(d5),R(d3)
+ orl R(d3),R(d1)
+ movel R(d1),MEM_POSTINC(res_ptr)
+ lsrl R(cnt),R(d2)
+L(L1:)
+ movel MEM_POSTINC(s_ptr),R(d1)
+ movel R(d1),R(d3)
+ lsll R(d5),R(d3)
+ orl R(d3),R(d2)
+ movel R(d2),MEM_POSTINC(res_ptr)
+ lsrl R(cnt),R(d1)
+
+ dbf R(s_size),L(Loop)
+ subl #0x10000,R(s_size)
+ bcc L(Loop)
+
+L(Lend:)
+ movel R(d1),MEM(res_ptr) /* store most significant limb */
+
+/* Restore used registers from stack frame. */
+ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ rts
+
+/* We loop from most significant end of the arrays, which is only
+ permissable if the source and destination don't overlap, since the
+ function is documented to work for overlapping source and destination. */
+
+L(Lspecial:)
+#if (defined (__mc68020__) || defined (__NeXT__) || defined(mc68020))
+ lea MEM_INDX1(s_ptr,s_size,l,4),R(s_ptr)
+ lea MEM_INDX1(res_ptr,s_size,l,4),R(res_ptr)
+#else /* not mc68000 */
+ movel R(s_size),R(d0)
+ asll #2,R(d0)
+ addl R(s_size),R(s_ptr)
+ addl R(s_size),R(res_ptr)
+#endif
+
+ clrl R(d0) /* initialize carry */
+ eorw #1,R(s_size)
+ lsrl #1,R(s_size)
+ bcc L(LL1)
+ subql #1,R(s_size)
+
+L(LLoop:)
+ movel MEM_PREDEC(s_ptr),R(d2)
+ roxrl #1,R(d2)
+ movel R(d2),MEM_PREDEC(res_ptr)
+L(LL1:)
+ movel MEM_PREDEC(s_ptr),R(d2)
+ roxrl #1,R(d2)
+ movel R(d2),MEM_PREDEC(res_ptr)
+
+ dbf R(s_size),L(LLoop)
+ roxrl #1,R(d0) /* save cy in msb */
+ subl #0x10000,R(s_size)
+ bcs L(LLend)
+ addl R(d0),R(d0) /* restore cy */
+ bra L(LLoop)
+
+L(LLend:)
+/* Restore used registers from stack frame. */
+ moveml MEM_POSTINC(sp),R(d2)-R(d6)/R(a2)
+ rts
+EPILOG(__mpn_rshift)
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S
index 19f0ec1..39f5161 100644
--- a/sysdeps/m68k/sub_n.S
+++ b/sysdeps/m68k/sub_n.S
@@ -1,7 +1,7 @@
/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
store difference in a third limb vector.
-Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -27,50 +27,53 @@ the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
size (sp + 12)
*/
+#include "sysdep.h"
#include "asm-syntax.h"
TEXT
ALIGN
- GLOBL ___mpn_sub_n
+ GLOBL C_SYMBOL_NAME(__mpn_sub_n)
-LAB(___mpn_sub_n)
+C_SYMBOL_NAME(__mpn_sub_n:)
+PROLOG(__mpn_sub_n)
/* Save used registers on the stack. */
- INSN2(move,l ,MEM_PREDEC(sp),d2)
- INSN2(move,l ,MEM_PREDEC(sp),a2)
+ movel R(d2),MEM_PREDEC(sp)
+ movel R(a2),MEM_PREDEC(sp)
/* Copy the arguments to registers. Better use movem? */
- INSN2(move,l ,a2,MEM_DISP(sp,12))
- INSN2(move,l ,a0,MEM_DISP(sp,16))
- INSN2(move,l ,a1,MEM_DISP(sp,20))
- INSN2(move,l ,d2,MEM_DISP(sp,24))
-
- INSN2(eor,w ,d2,#1)
- INSN2(lsr,l ,d2,#1)
- bcc L1
- INSN2(subq,l ,d2,#1) /* clears cy as side effect */
-
-LAB(Loop)
- INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(subx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
- INSN2(move,l ,d1,MEM_POSTINC(a1))
- INSN2(subx,l ,d0,d1)
- INSN2(move,l ,MEM_POSTINC(a2),d0)
-
- dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
- INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
- INSN2(sub,l ,d2,#0x10000)
- bcs L2
- INSN2(add,l ,d0,d0) /* restore cy */
- bra Loop
-
-LAB(L2)
- INSN1(neg,l ,d0)
+ movel MEM_DISP(sp,12),R(a2)
+ movel MEM_DISP(sp,16),R(a0)
+ movel MEM_DISP(sp,20),R(a1)
+ movel MEM_DISP(sp,24),R(d2)
+
+ eorw #1,R(d2)
+ lsrl #1,R(d2)
+ bcc L(L1)
+ subql #1,R(d2) /* clears cy as side effect */
+
+L(Loop:)
+ movel MEM_POSTINC(a0),R(d0)
+ movel MEM_POSTINC(a1),R(d1)
+ subxl R(d1),R(d0)
+ movel R(d0),MEM_POSTINC(a2)
+L(L1:) movel MEM_POSTINC(a0),R(d0)
+ movel MEM_POSTINC(a1),R(d1)
+ subxl R(d1),R(d0)
+ movel R(d0),MEM_POSTINC(a2)
+
+ dbf R(d2),L(Loop) /* loop until 16 lsb of %4 == -1 */
+ subxl R(d0),R(d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ subl #0x10000,R(d2)
+ bcs L(L2)
+ addl R(d0),R(d0) /* restore cy */
+ bra L(Loop)
+
+L(L2:)
+ negl R(d0)
/* Restore used registers from stack frame. */
- INSN2(move,l ,a2,MEM_POSTINC(sp))
- INSN2(move,l ,d2,MEM_POSTINC(sp))
+ movel MEM_POSTINC(sp),R(a2)
+ movel MEM_POSTINC(sp),R(d2)
rts
+EPILOG(__mpn_sub_n)
diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s
index 7e4cccc..d564479 100644
--- a/sysdeps/m88k/add_n.s
+++ b/sysdeps/m88k/add_n.s
@@ -1,7 +1,7 @@
; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store
; sum in a third limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
; This file is part of the GNU MP Library.
diff --git a/sysdeps/m88k/m88110/add_n.S b/sysdeps/m88k/m88110/add_n.S
new file mode 100644
index 0000000..ab20630
--- /dev/null
+++ b/sysdeps/m88k/m88110/add_n.S
@@ -0,0 +1,199 @@
+; mc88110 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+; sum in a third limb vector.
+
+; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+#define res_ptr r2
+#define s1_ptr r3
+#define s2_ptr r4
+#define size r5
+
+#include "sysdep.h"
+
+ text
+ align 16
+ global C_SYMBOL_NAME(__mpn_add_n)
+C_SYMBOL_NAME(__mpn_add_n):
+ addu.co r0,r0,r0 ; clear cy flag
+ xor r12,s2_ptr,res_ptr
+ bb1 2,r12,L1
+; ** V1a **
+L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned?
+/* Add least significant limb separately to align res_ptr and s2_ptr */
+ ld r10,s1_ptr,0
+ addu s1_ptr,s1_ptr,4
+ ld r8,s2_ptr,0
+ addu s2_ptr,s2_ptr,4
+ subu size,size,1
+ addu.co r6,r10,r8
+ st r6,res_ptr,0
+ addu res_ptr,res_ptr,4
+L_v1: cmp r12,size,2
+ bb1 lt,r12,Lend2
+
+ ld r10,s1_ptr,0
+ ld r12,s1_ptr,4
+ ld.d r8,s2_ptr,0
+ subu size,size,10
+ bcnd lt0,size,Lfin1
+/* Add blocks of 8 limbs until less than 8 limbs remain */
+ align 8
+Loop1: subu size,size,8
+ addu.cio r6,r10,r8
+ ld r10,s1_ptr,8
+ addu.cio r7,r12,r9
+ ld r12,s1_ptr,12
+ ld.d r8,s2_ptr,8
+ st.d r6,res_ptr,0
+ addu.cio r6,r10,r8
+ ld r10,s1_ptr,16
+ addu.cio r7,r12,r9
+ ld r12,s1_ptr,20
+ ld.d r8,s2_ptr,16
+ st.d r6,res_ptr,8
+ addu.cio r6,r10,r8
+ ld r10,s1_ptr,24
+ addu.cio r7,r12,r9
+ ld r12,s1_ptr,28
+ ld.d r8,s2_ptr,24
+ st.d r6,res_ptr,16
+ addu.cio r6,r10,r8
+ ld r10,s1_ptr,32
+ addu.cio r7,r12,r9
+ ld r12,s1_ptr,36
+ addu s1_ptr,s1_ptr,32
+ ld.d r8,s2_ptr,32
+ addu s2_ptr,s2_ptr,32
+ st.d r6,res_ptr,24
+ addu res_ptr,res_ptr,32
+ bcnd ge0,size,Loop1
+
+Lfin1: addu size,size,8-2
+ bcnd lt0,size,Lend1
+/* Add blocks of 2 limbs until less than 2 limbs remain */
+Loope1: addu.cio r6,r10,r8
+ ld r10,s1_ptr,8
+ addu.cio r7,r12,r9
+ ld r12,s1_ptr,12
+ ld.d r8,s2_ptr,8
+ st.d r6,res_ptr,0
+ subu size,size,2
+ addu s1_ptr,s1_ptr,8
+ addu s2_ptr,s2_ptr,8
+ addu res_ptr,res_ptr,8
+ bcnd ge0,size,Loope1
+Lend1: addu.cio r6,r10,r8
+ addu.cio r7,r12,r9
+ st.d r6,res_ptr,0
+
+ bb0 0,size,Lret1
+/* Add last limb */
+ ld r10,s1_ptr,8
+ ld r8,s2_ptr,8
+ addu.cio r6,r10,r8
+ st r6,res_ptr,8
+
+Lret1: jmp.n r1
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+
+L1: xor r12,s1_ptr,res_ptr
+ bb1 2,r12,L2
+; ** V1b **
+ or r12,r0,s2_ptr
+ or s2_ptr,r0,s1_ptr
+ or s1_ptr,r0,r12
+ br L0
+
+; ** V2 **
+/* If we come here, the alignment of s1_ptr and res_ptr as well as the
+ alignment of s2_ptr and res_ptr differ. Since there are only two ways
+ things can be aligned (that we care about) we now know that the alignment
+ of s1_ptr and s2_ptr are the same. */
+
+L2: cmp r12,size,1
+ bb1 eq,r12,Ljone
+ bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned
+/* Add least significant limb separately to align res_ptr and s2_ptr */
+ ld r10,s1_ptr,0
+ addu s1_ptr,s1_ptr,4
+ ld r8,s2_ptr,0
+ addu s2_ptr,s2_ptr,4
+ subu size,size,1
+ addu.co r6,r10,r8
+ st r6,res_ptr,0
+ addu res_ptr,res_ptr,4
+
+L_v2: subu size,size,8
+ bcnd lt0,size,Lfin2
+/* Add blocks of 8 limbs until less than 8 limbs remain */
+ align 8
+Loop2: subu size,size,8
+ ld.d r8,s1_ptr,0
+ ld.d r6,s2_ptr,0
+ addu.cio r8,r8,r6
+ st r8,res_ptr,0
+ addu.cio r9,r9,r7
+ st r9,res_ptr,4
+ ld.d r8,s1_ptr,8
+ ld.d r6,s2_ptr,8
+ addu.cio r8,r8,r6
+ st r8,res_ptr,8
+ addu.cio r9,r9,r7
+ st r9,res_ptr,12
+ ld.d r8,s1_ptr,16
+ ld.d r6,s2_ptr,16
+ addu.cio r8,r8,r6
+ st r8,res_ptr,16
+ addu.cio r9,r9,r7
+ st r9,res_ptr,20
+ ld.d r8,s1_ptr,24
+ ld.d r6,s2_ptr,24
+ addu.cio r8,r8,r6
+ st r8,res_ptr,24
+ addu.cio r9,r9,r7
+ st r9,res_ptr,28
+ addu s1_ptr,s1_ptr,32
+ addu s2_ptr,s2_ptr,32
+ addu res_ptr,res_ptr,32
+ bcnd ge0,size,Loop2
+
+Lfin2: addu size,size,8-2
+ bcnd lt0,size,Lend2
+Loope2: ld.d r8,s1_ptr,0
+ ld.d r6,s2_ptr,0
+ addu.cio r8,r8,r6
+ st r8,res_ptr,0
+ addu.cio r9,r9,r7
+ st r9,res_ptr,4
+ subu size,size,2
+ addu s1_ptr,s1_ptr,8
+ addu s2_ptr,s2_ptr,8
+ addu res_ptr,res_ptr,8
+ bcnd ge0,size,Loope2
+Lend2: bb0 0,size,Lret2
+/* Add last limb */
+Ljone: ld r10,s1_ptr,0
+ ld r8,s2_ptr,0
+ addu.cio r6,r10,r8
+ st r6,res_ptr,0
+
+Lret2: jmp.n r1
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/addmul_1.s
similarity index 60%
copy from sysdeps/m88k/m88110/mul_1.s
copy to sysdeps/m88k/m88110/addmul_1.s
index 08c3ca0..1a4dfa1 100644
--- a/sysdeps/m88k/m88110/mul_1.s
+++ b/sysdeps/m88k/m88110/addmul_1.s
@@ -1,7 +1,7 @@
-; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; mc88110 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
; store the product in a second limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+; Copyright (C) 1996 Free Software Foundation, Inc.
; This file is part of the GNU MP Library.
@@ -28,57 +28,33 @@
text
align 16
- global ___mpn_mul_1
-___mpn_mul_1:
- ; Make S1_PTR and RES_PTR point at the end of their blocks
- ; and negate SIZE.
+ global ___mpn_addmul_1
+___mpn_addmul_1:
lda r3,r3[r4]
lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval
subu r4,r0,r4
-
addu.co r2,r0,r0 ; r2 = cy = 0
ld r6,r3[r4]
addu r4,r4,1
- mulu.d r10,r6,r5
+ subu r8,r8,4
bcnd.n eq0,r4,Lend
- subu r8,r8,8
+ mulu.d r10,r6,r5
-Loop: ld r6,r3[r4]
+Loop: ld r7,r8[r4]
+ ld r6,r3[r4]
addu.cio r9,r11,r2
- or r2,r10,r0 ; could be avoided if unrolled
+ addu.ci r2,r10,r0
+ addu.co r9,r9,r7
+ st r9,r8[r4]
addu r4,r4,1
mulu.d r10,r6,r5
- bcnd.n ne0,r4,Loop
- st r9,r8[r4]
+ bcnd ne0,r4,Loop
-Lend: addu.cio r9,r11,r2
- st r9,r8,4
+Lend: ld r7,r8,0
+ addu.cio r9,r11,r2
+ addu.ci r2,r10,r0
+ addu.co r9,r9,r7
+ st r9,r8,0
jmp.n r1
- addu.ci r2,r10,r0
-
-; This is the Right Way to do this on '110. 4 cycles / 64-bit limb.
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d ,r11,r5
-; ld.d r12,
-; mulu.d ,r10,r5
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
+ addu.ci r2,r2,r0
diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s
index 08c3ca0..b1352ce 100644
--- a/sysdeps/m88k/m88110/mul_1.s
+++ b/sysdeps/m88k/m88110/mul_1.s
@@ -1,7 +1,7 @@
; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and
; store the product in a second limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
; This file is part of the GNU MP Library.
@@ -56,29 +56,3 @@ Lend: addu.cio r9,r11,r2
st r9,r8,4
jmp.n r1
addu.ci r2,r10,r0
-
-; This is the Right Way to do this on '110. 4 cycles / 64-bit limb.
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d ,r11,r5
-; ld.d r12,
-; mulu.d ,r10,r5
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
-; ld.d r10,
-; mulu.d
-; addu.cio
-; addu.cio
-; st.d
-; mulu.d
diff --git a/sysdeps/m88k/m88110/sub_n.S b/sysdeps/m88k/m88110/sub_n.S
new file mode 100644
index 0000000..74ee0ae
--- /dev/null
+++ b/sysdeps/m88k/m88110/sub_n.S
@@ -0,0 +1,275 @@
+; mc88110 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+; store difference in a third limb vector.
+
+; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+#define res_ptr r2
+#define s1_ptr r3
+#define s2_ptr r4
+#define size r5
+
+#include "sysdep.h"
+
+ text
+ align 16
+ global C_SYMBOL_NAME(__mpn_sub_n)
+C_SYMBOL_NAME(__mpn_sub_n):
+ subu.co r0,r0,r0 ; set cy flag
+ xor r12,s2_ptr,res_ptr
+ bb1 2,r12,L1
+; ** V1a **
+L0: bb0 2,res_ptr,L_v1 ; branch if res_ptr is aligned
+/* Add least significant limb separately to align res_ptr and s2_ptr */
+ ld r10,s1_ptr,0
+ addu s1_ptr,s1_ptr,4
+ ld r8,s2_ptr,0
+ addu s2_ptr,s2_ptr,4
+ subu size,size,1
+ subu.co r6,r10,r8
+ st r6,res_ptr,0
+ addu res_ptr,res_ptr,4
+L_v1: cmp r12,size,2
+ bb1 lt,r12,Lend2
+
+ ld r10,s1_ptr,0
+ ld r12,s1_ptr,4
+ ld.d r8,s2_ptr,0
+ subu size,size,10
+ bcnd lt0,size,Lfin1
+/* Add blocks of 8 limbs until less than 8 limbs remain */
+ align 8
+Loop1: subu size,size,8
+ subu.cio r6,r10,r8
+ ld r10,s1_ptr,8
+ subu.cio r7,r12,r9
+ ld r12,s1_ptr,12
+ ld.d r8,s2_ptr,8
+ st.d r6,res_ptr,0
+ subu.cio r6,r10,r8
+ ld r10,s1_ptr,16
+ subu.cio r7,r12,r9
+ ld r12,s1_ptr,20
+ ld.d r8,s2_ptr,16
+ st.d r6,res_ptr,8
+ subu.cio r6,r10,r8
+ ld r10,s1_ptr,24
+ subu.cio r7,r12,r9
+ ld r12,s1_ptr,28
+ ld.d r8,s2_ptr,24
+ st.d r6,res_ptr,16
+ subu.cio r6,r10,r8
+ ld r10,s1_ptr,32
+ subu.cio r7,r12,r9
+ ld r12,s1_ptr,36
+ addu s1_ptr,s1_ptr,32
+ ld.d r8,s2_ptr,32
+ addu s2_ptr,s2_ptr,32
+ st.d r6,res_ptr,24
+ addu res_ptr,res_ptr,32
+ bcnd ge0,size,Loop1
+
+Lfin1: addu size,size,8-2
+ bcnd lt0,size,Lend1
+/* Add blocks of 2 limbs until less than 2 limbs remain */
+Loope1: subu.cio r6,r10,r8
+ ld r10,s1_ptr,8
+ subu.cio r7,r12,r9
+ ld r12,s1_ptr,12
+ ld.d r8,s2_ptr,8
+ st.d r6,res_ptr,0
+ subu size,size,2
+ addu s1_ptr,s1_ptr,8
+ addu s2_ptr,s2_ptr,8
+ addu res_ptr,res_ptr,8
+ bcnd ge0,size,Loope1
+Lend1: subu.cio r6,r10,r8
+ subu.cio r7,r12,r9
+ st.d r6,res_ptr,0
+
+ bb0 0,size,Lret1
+/* Add last limb */
+ ld r10,s1_ptr,8
+ ld r8,s2_ptr,8
+ subu.cio r6,r10,r8
+ st r6,res_ptr,8
+
+Lret1: addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
+
+L1: xor r12,s1_ptr,res_ptr
+ bb1 2,r12,L2
+; ** V1b **
+ bb0 2,res_ptr,L_v1b ; branch if res_ptr is aligned
+/* Add least significant limb separately to align res_ptr and s1_ptr */
+ ld r10,s2_ptr,0
+ addu s2_ptr,s2_ptr,4
+ ld r8,s1_ptr,0
+ addu s1_ptr,s1_ptr,4
+ subu size,size,1
+ subu.co r6,r8,r10
+ st r6,res_ptr,0
+ addu res_ptr,res_ptr,4
+L_v1b: cmp r12,size,2
+ bb1 lt,r12,Lend2
+
+ ld r10,s2_ptr,0
+ ld r12,s2_ptr,4
+ ld.d r8,s1_ptr,0
+ subu size,size,10
+ bcnd lt0,size,Lfin1b
+/* Add blocks of 8 limbs until less than 8 limbs remain */
+ align 8
+Loop1b: subu size,size,8
+ subu.cio r6,r8,r10
+ ld r10,s2_ptr,8
+ subu.cio r7,r9,r12
+ ld r12,s2_ptr,12
+ ld.d r8,s1_ptr,8
+ st.d r6,res_ptr,0
+ subu.cio r6,r8,r10
+ ld r10,s2_ptr,16
+ subu.cio r7,r9,r12
+ ld r12,s2_ptr,20
+ ld.d r8,s1_ptr,16
+ st.d r6,res_ptr,8
+ subu.cio r6,r8,r10
+ ld r10,s2_ptr,24
+ subu.cio r7,r9,r12
+ ld r12,s2_ptr,28
+ ld.d r8,s1_ptr,24
+ st.d r6,res_ptr,16
+ subu.cio r6,r8,r10
+ ld r10,s2_ptr,32
+ subu.cio r7,r9,r12
+ ld r12,s2_ptr,36
+ addu s2_ptr,s2_ptr,32
+ ld.d r8,s1_ptr,32
+ addu s1_ptr,s1_ptr,32
+ st.d r6,res_ptr,24
+ addu res_ptr,res_ptr,32
+ bcnd ge0,size,Loop1b
+
+Lfin1b: addu size,size,8-2
+ bcnd lt0,size,Lend1b
+/* Add blocks of 2 limbs until less than 2 limbs remain */
+Loope1b:subu.cio r6,r8,r10
+ ld r10,s2_ptr,8
+ subu.cio r7,r9,r12
+ ld r12,s2_ptr,12
+ ld.d r8,s1_ptr,8
+ st.d r6,res_ptr,0
+ subu size,size,2
+ addu s1_ptr,s1_ptr,8
+ addu s2_ptr,s2_ptr,8
+ addu res_ptr,res_ptr,8
+ bcnd ge0,size,Loope1b
+Lend1b: subu.cio r6,r8,r10
+ subu.cio r7,r9,r12
+ st.d r6,res_ptr,0
+
+ bb0 0,size,Lret1b
+/* Add last limb */
+ ld r10,s2_ptr,8
+ ld r8,s1_ptr,8
+ subu.cio r6,r8,r10
+ st r6,res_ptr,8
+
+Lret1b: addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
+
+; ** V2 **
+/* If we come here, the alignment of s1_ptr and res_ptr as well as the
+ alignment of s2_ptr and res_ptr differ. Since there are only two ways
+ things can be aligned (that we care about) we now know that the alignment
+ of s1_ptr and s2_ptr are the same. */
+
+L2: cmp r12,size,1
+ bb1 eq,r12,Ljone
+ bb0 2,s1_ptr,L_v2 ; branch if s1_ptr is aligned
+/* Add least significant limb separately to align res_ptr and s2_ptr */
+ ld r10,s1_ptr,0
+ addu s1_ptr,s1_ptr,4
+ ld r8,s2_ptr,0
+ addu s2_ptr,s2_ptr,4
+ subu size,size,1
+ subu.co r6,r10,r8
+ st r6,res_ptr,0
+ addu res_ptr,res_ptr,4
+
+L_v2: subu size,size,8
+ bcnd lt0,size,Lfin2
+/* Add blocks of 8 limbs until less than 8 limbs remain */
+ align 8
+Loop2: subu size,size,8
+ ld.d r8,s1_ptr,0
+ ld.d r6,s2_ptr,0
+ subu.cio r8,r8,r6
+ st r8,res_ptr,0
+ subu.cio r9,r9,r7
+ st r9,res_ptr,4
+ ld.d r8,s1_ptr,8
+ ld.d r6,s2_ptr,8
+ subu.cio r8,r8,r6
+ st r8,res_ptr,8
+ subu.cio r9,r9,r7
+ st r9,res_ptr,12
+ ld.d r8,s1_ptr,16
+ ld.d r6,s2_ptr,16
+ subu.cio r8,r8,r6
+ st r8,res_ptr,16
+ subu.cio r9,r9,r7
+ st r9,res_ptr,20
+ ld.d r8,s1_ptr,24
+ ld.d r6,s2_ptr,24
+ subu.cio r8,r8,r6
+ st r8,res_ptr,24
+ subu.cio r9,r9,r7
+ st r9,res_ptr,28
+ addu s1_ptr,s1_ptr,32
+ addu s2_ptr,s2_ptr,32
+ addu res_ptr,res_ptr,32
+ bcnd ge0,size,Loop2
+
+Lfin2: addu size,size,8-2
+ bcnd lt0,size,Lend2
+Loope2: ld.d r8,s1_ptr,0
+ ld.d r6,s2_ptr,0
+ subu.cio r8,r8,r6
+ st r8,res_ptr,0
+ subu.cio r9,r9,r7
+ st r9,res_ptr,4
+ subu size,size,2
+ addu s1_ptr,s1_ptr,8
+ addu s2_ptr,s2_ptr,8
+ addu res_ptr,res_ptr,8
+ bcnd ge0,size,Loope2
+Lend2: bb0 0,size,Lret2
+/* Add last limb */
+Ljone: ld r10,s1_ptr,0
+ ld r8,s2_ptr,0
+ subu.cio r6,r10,r8
+ st r6,res_ptr,0
+
+Lret2: addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s
index 35c238d..6b8492c 100644
--- a/sysdeps/m88k/mul_1.s
+++ b/sysdeps/m88k/mul_1.s
@@ -1,7 +1,7 @@
; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and
; store the product in a second limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+; Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
; This file is part of the GNU MP Library.
@@ -55,14 +55,14 @@ ___mpn_mul_1:
; Make S1_PTR and RES_PTR point at the end of their blocks
; and negate SIZE.
lda r3,r3[r4]
- lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval
+ lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval
subu r4,r0,r4
- addu.co r2,r0,r0 ; r2 = cy = 0
+ addu.co r2,r0,r0 ; r2 = cy = 0
ld r9,r3[r4]
- mask r7,r5,0xffff ; r7 = lo(S2_LIMB)
- extu r8,r5,16 ; r8 = hi(S2_LIMB)
- bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0)
+ mask r7,r5,0xffff ; r7 = lo(S2_LIMB)
+ extu r8,r5,16 ; r8 = hi(S2_LIMB)
+ bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0)
subu r6,r6,4
; General code for any value of S2_LIMB.
@@ -75,28 +75,27 @@ ___mpn_mul_1:
br.n L1
addu r4,r4,1
-Loop:
- ld r9,r3[r4]
+Loop: ld r9,r3[r4]
st r26,r6[r4]
-; bcnd ne0,r0,0 ; bubble
+; bcnd ne0,r0,0 ; bubble
addu r4,r4,1
-L1: mul r26,r9,r5 ; low word of product mul_1 WB ld
- mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1
- mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1
- mul r10,r12,r8 ; r10 = prod_1a mul_3
- extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1
- mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1
- mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2
- extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3
- addu r10,r10,r11 ; addu_1 WB extu_2
-; bcnd ne0,r0,0 ; bubble WB addu_1
- addu.co r10,r10,r12 ; WB mul_4
- mask.u r10,r10,0xffff ; move the 16 most significant bits...
- addu.ci r10,r10,r0 ; ...to the low half of the word...
- rot r10,r10,16 ; ...and put carry in pos 16.
- addu.co r26,r26,r2 ; add old carry limb
+L1: mul r26,r9,r5 ; low word of product mul_1 WB ld
+ mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1
+ mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1
+ mul r10,r12,r8 ; r10 = prod_1a mul_3
+ extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1
+ mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1
+ mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2
+ extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3
+ addu r10,r10,r11 ; addu_1 WB extu_2
+; bcnd ne0,r0,0 ; bubble WB addu_1
+ addu.co r10,r10,r12 ; WB mul_4
+ mask.u r10,r10,0xffff ; move the 16 most significant bits...
+ addu.ci r10,r10,r0 ; ...to the low half of the word...
+ rot r10,r10,16 ; ...and put carry in pos 16.
+ addu.co r26,r26,r2 ; add old carry limb
bcnd.n ne0,r4,Loop
- addu.ci r2,r25,r10 ; compute new carry limb
+ addu.ci r2,r25,r10 ; compute new carry limb
st r26,r6[r4]
ld.d r25,r31,8
@@ -109,20 +108,19 @@ Lsmall:
br.n SL1
addu r4,r4,1
-SLoop:
- ld r9,r3[r4] ;
- st r8,r6[r4] ;
- addu r4,r4,1 ;
-SL1: mul r8,r9,r5 ; low word of product
- mask r12,r9,0xffff ; r12 = lo(s1_limb)
- extu r13,r9,16 ; r13 = hi(s1_limb)
- mul r11,r12,r7 ; r11 = prod_0
- mul r12,r13,r7 ; r12 = prod_1b
- addu.cio r8,r8,r2 ; add old carry limb
- extu r10,r11,16 ; r11 = hi(prod_0)
- addu r10,r10,r12 ;
+SLoop: ld r9,r3[r4] ;
+ st r8,r6[r4] ;
+ addu r4,r4,1 ;
+SL1: mul r8,r9,r5 ; low word of product
+ mask r12,r9,0xffff ; r12 = lo(s1_limb)
+ extu r13,r9,16 ; r13 = hi(s1_limb)
+ mul r11,r12,r7 ; r11 = prod_0
+ mul r12,r13,r7 ; r12 = prod_1b
+ addu.cio r8,r8,r2 ; add old carry limb
+ extu r10,r11,16 ; r11 = hi(prod_0)
+ addu r10,r10,r12 ;
bcnd.n ne0,r4,SLoop
- extu r2,r10,16 ; r2 = new carry limb
+ extu r2,r10,16 ; r2 = new carry limb
jmp.n r1
st r8,r6[r4]
diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s
index 3963cd5..cd0b791 100644
--- a/sysdeps/m88k/sub_n.s
+++ b/sysdeps/m88k/sub_n.s
@@ -1,7 +1,7 @@
; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and
; store difference in a third limb vector.
-; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
; This file is part of the GNU MP Library.
@@ -41,9 +41,10 @@ ___mpn_sub_n:
extu r10,r5,3
ld r7,r4,0 ; read first limb from s2_ptr
- subu.co r5,r0,r5 ; (clear carry as side effect)
+ subu r5,r0,r5
mak r5,r5,3<4>
- bcnd eq0,r5,Lzero
+ bcnd.n eq0,r5,Lzero
+ subu.co r0,r0,r0 ; initialize carry
or r12,r0,lo16(Lbase)
or.u r12,r12,hi16(Lbase)
diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s
index abc2fb8..917af1b 100644
--- a/sysdeps/mips/addmul_1.s
+++ b/sysdeps/mips/addmul_1.s
@@ -1,7 +1,7 @@
# MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
# add the product to a second limb vector.
- # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -63,7 +63,7 @@ Loop: lw $10,0($4)
addu $2,$2,$10
sw $3,0($4)
addiu $4,$4,4
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
addu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s
index 7af0172..7dbc9ad 100644
--- a/sysdeps/mips/mips3/addmul_1.s
+++ b/sysdeps/mips/mips3/addmul_1.s
@@ -63,7 +63,7 @@ Loop: ld $10,0($4)
daddu $2,$2,$10
sd $3,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s
index 87954e5..8376a02 100644
--- a/sysdeps/mips/mips3/mul_1.s
+++ b/sysdeps/mips/mips3/mul_1.s
@@ -59,7 +59,7 @@ Loop: mflo $10
sltu $2,$10,$2 # carry from previous addition -> $2
sd $10,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s
index f28c6a5..f041f6c 100644
--- a/sysdeps/mips/mips3/submul_1.s
+++ b/sysdeps/mips/mips3/submul_1.s
@@ -63,7 +63,7 @@ Loop: ld $10,0($4)
daddu $2,$2,$10
sd $3,0($4)
daddiu $4,$4,8
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
daddu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s
index 01327e2..6f5324c 100644
--- a/sysdeps/mips/mul_1.s
+++ b/sysdeps/mips/mul_1.s
@@ -1,7 +1,7 @@
# MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
# store the product in a second limb vector.
- # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -59,7 +59,7 @@ Loop: mflo $10
sltu $2,$10,$2 # carry from previous addition -> $2
sw $10,0($4)
addiu $4,$4,4
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
addu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s
index 616dd1b..a78072a 100644
--- a/sysdeps/mips/submul_1.s
+++ b/sysdeps/mips/submul_1.s
@@ -1,7 +1,7 @@
# MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
# subtract the product from a second limb vector.
- # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+ # Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
@@ -63,7 +63,7 @@ Loop: lw $10,0($4)
addu $2,$2,$10
sw $3,0($4)
addiu $4,$4,4
- bne $6,$0,Loop # should be "bnel"
+ bne $6,$0,Loop
addu $2,$9,$2 # add high product limb and carry from addition
# cool down phase 1
diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s
index 7090cf1..e2536d5 100644
--- a/sysdeps/rs6000/add_n.s
+++ b/sysdeps/rs6000/add_n.s
@@ -1,6 +1,6 @@
# IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length.
-# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s
index 40fe7d6..c57675b 100644
--- a/sysdeps/rs6000/sub_n.s
+++ b/sysdeps/rs6000/sub_n.s
@@ -1,7 +1,7 @@
# IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
# store difference in a third limb vector.
-# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
# This file is part of the GNU MP Library.
diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h
index 687f12a..ddc308a 100644
--- a/sysdeps/vax/gmp-mparam.h
+++ b/sysdeps/vax/gmp-mparam.h
@@ -1,6 +1,6 @@
/* gmp-mparam.h -- Compiler/machine parameter header file.
-Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s
index 2075225..0150e85 100644
--- a/sysdeps/z8000/mul_1.s
+++ b/sysdeps/z8000/mul_1.s
@@ -1,7 +1,7 @@
! Z8000 __mpn_mul_1 -- Multiply a limb vector with a limb and store
! the result in a second limb vector.
-! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+! Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
! This file is part of the GNU MP Library.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f860256b2edcde37ffd62396f1506f90769de0b7
commit f860256b2edcde37ffd62396f1506f90769de0b7
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 1 18:14:40 1996 +0000
Thu Feb 29 20:55:57 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/profil-counter.h: New file.
diff --git a/sysdeps/unix/sysv/linux/m68k/profil-counter.h b/sysdeps/unix/sysv/linux/m68k/profil-counter.h
new file mode 100644
index 0000000..4e7b132
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/profil-counter.h
@@ -0,0 +1,24 @@
+/* Machine-dependent SIGPROF signal handler. Linux/m68k version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+static void
+profil_counter (int signr, int code, struct sigcontext *scp)
+{
+ profil_count ((void *) scp->sc_pc);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d4439738a02f57dae3a7981c23925393548b784
commit 0d4439738a02f57dae3a7981c23925393548b784
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 27 14:51:36 1996 +0000
Mon Feb 26 10:22:30 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/dirstream.h: Rewritten.
* sysdeps/unix/readdir.c: Rewritten.
* sysdeps/unix/telldir.c: Rewritten.
* sysdeps/unix/closedir.c: Use <...> instead of "..." for dirstream.h.
Remove __ from DIR struct member names.
* sysdeps/unix/dirfd.c: Likewise.
* sysdeps/unix/seekdir.c: Likewise.
* sysdeps/unix/rewinddir.c: Likewise.
* sysdeps/unix/opendir.c: Likewise. Don't allocate extra space after
DIR structure.
* sysdeps/stub/direct.h: File removed.
* sysdeps/unix/bsd/bsd4.4/direct.h: File removed.
* sysdeps/unix/bsd/direct.h: File removed.
* sysdeps/unix/common/direct.h: File removed.
* sysdeps/unix/sysv/irix4/direct.h: File removed.
* sysdeps/unix/sysv/isc3/direct.h: File removed.
* sysdeps/unix/sysv/sco3.2.4/direct.h: File removed.
* sysdeps/unix/sysv/sysv4/solaris2/direct.h: File removed.
* sysdeps/unix/common/direntry.h: New file.
* sysdeps/unix/bsd/direntry.h: New file.
* sysdeps/unix/bsd/bsd4.4/direntry.h: New file.
* sysdeps/unix/sysv/direntry.h: New file.
* sysdeps/stub/direntry.h: New file.
* dirent/dirent.h (struct dirent): Type removed. Include <direntry.h>
to define it.
(_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New macros.
* dirent/Makefile (headers): Add direntry.h.
(distribute): Remove direct.h.
* sysdeps/posix/getcwd.c: Use new macros instead of d_namlen.
* dirent/scandir.c: Likewise.
* io/fts.c (fts_build): Likewise.
* io/ftw.c (ftw_dir): Likewise.
* sysdeps/posix/ttyname.c: Likewise.
diff --git a/sysdeps/unix/sysv/irix4/direct.h b/sysdeps/unix/sysv/irix4/direct.h
deleted file mode 100644
index 153087f..0000000
--- a/sysdeps/unix/sysv/irix4/direct.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef MAXNAMLEN
-#define MAXNAMLEN 255
-#endif
-
-struct direct
- {
- unsigned long int d_ino;
- off_t d_off;
- unsigned short int d_reclen;
- char d_name[MAXNAMLEN + 1];
- };
-
-#define D_NAMLEN(d) (strlen ((d)->d_name))
-
-#define D_RECLEN(d) (d->d_reclen)
diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h
deleted file mode 100644
index b3eaa54..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/direct.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef MAXNAMLEN
-#define MAXNAMLEN 512
-#endif
-#define DIRBUF 1048 /* minimum buffer size for call to getdents */
-
-struct direct
- {
- unsigned short int d_fileno;
- short int d_pad;
- long int d_off;
- unsigned short int d_reclen;
- char d_name[1]; /* Actually longer. */
- };
-
-#include <stddef.h>
-
-/* We calculate the length of the name by taking the length of the whole
- `struct direct' record, subtracting the size of everything before the
- name, and subtracting one for the terminating null. */
-
-#define D_NAMLEN(d) \
- ((d)->d_reclen - offsetof (struct direct, d_name) - 1)
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/direct.h b/sysdeps/unix/sysv/sysv4/solaris2/direct.h
deleted file mode 100644
index f9822dc..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/direct.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#ifndef _BSDDIR_H
-#define _BSDDIR_H 1
-
-#include <limits.h>
-
-/* This is the Solaris direct; it's the same as that in
- sysdeps/unix/sysv/sysv4/direct.h, but it uses the length given by d_namlen,
- since we can't reliably use tyhe sysv4/direct.h method of computing
- the length. */
-
-struct direct
- {
- unsigned long int d_fileno;
- long int d_off;
- unsigned short int d_reclen;
- char d_name[NAME_MAX + 1];
- };
-
-#define D_NAMLEN(d) (strlen ((d)->d_name))
-
-#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9c27e3112aca24ff9d279001ea1e1f51e52c3d12
commit 9c27e3112aca24ff9d279001ea1e1f51e52c3d12
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 27 00:54:24 1996 +0000
Mon Feb 26 10:22:30 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: New file.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
new file mode 100644
index 0000000..5206363
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+sigaction - sigaction 3 __sigaction sigaction
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6103f53bab2f708750db71f183e116db857a59e8
commit 6103f53bab2f708750db71f183e116db857a59e8
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 19 23:06:16 1996 +0000
Sun Feb 18 12:13:07 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_SETCW): Corrected.
diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
index 0bbbb08..0b3623d 100644
--- a/sysdeps/unix/sysv/linux/m68k/fpu_control.h
+++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
@@ -95,7 +95,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Macros for accessing the hardware control word. */
#define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw))
-#define _FPU_SETCW(cw) __asm__ ("fmove%.l %0, %!" : "dm" (cw))
+#define _FPU_SETCW(cw) __asm__ volatile ("fmove%.l %0, %!" : : "dm" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=08eb417403694b166fafe7cfdec1504b6e6560cb
commit 08eb417403694b166fafe7cfdec1504b6e6560cb
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 19 21:04:28 1996 +0000
Reverting inadvertant commits
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index db777cf..69aa7de 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
+#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
#define PUSH(reg) move.l reg, -(%sp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index c179497..c853516 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
+#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
#define PUSH(reg) move.l reg, -(%sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0650e14d6fafe2d061ad2f77fe4890dd1dda639e
commit 0650e14d6fafe2d061ad2f77fe4890dd1dda639e
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 19 20:54:34 1996 +0000
*** empty log message ***
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index 69aa7de..db777cf 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifdef MOTOROLA_SYNTAX
+#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
#define d0 %d0
#define d1 %d1
#define PUSH(reg) move.l reg, -(%sp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index c853516..c179497 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifdef MOTOROLA_SYNTAX
+#if defined (MOTOROLA_SYNTAX) || defined (ELF_SYNTAX)
#define d0 %d0
#define d1 %d1
#define PUSH(reg) move.l reg, -(%sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a9eac710a2c0922e385d3fba3a498e0d001952f5
commit a9eac710a2c0922e385d3fba3a498e0d001952f5
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 18 18:31:55 1996 +0000
Thu Feb 15 16:56:17 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected.
(ELF_MACHINE_BEFORE_RTLD_RELOC): Define.
(_dl_runtime_resolve): Save %a1 as well.
(ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg.
(elf_machine_relplt): Define.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
index 2208cd2..8cbb977 100644
--- a/sysdeps/m68k/dl-machine.h
+++ b/sysdeps/m68k/dl-machine.h
@@ -52,9 +52,22 @@ elf_machine_got (void)
static inline Elf32_Addr
elf_machine_load_address (void)
{
- ...
+ Elf32_Addr addr;
+ asm ("here: lea here(%%pc), %0\n"
+ " sub.l %#here, %0"
+ : "=a" (addr));
+ return addr;
}
+/* The `subl' insn above will contain an R_68K_RELATIVE relocation
+ entry intended to insert the run-time address of the label `here'.
+ This will be the first relocation in the text of the dynamic
+ linker; we skip it to avoid trying to modify read-only text in this
+ early stage. */
+#define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
+ ((dynamic_info)[DT_RELA]->d_un.d_ptr += sizeof (Elf32_Rela), \
+ (dynamic_info)[DT_RELASZ]->d_un.d_val -= sizeof (Elf32_Rela))
+
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
@@ -158,11 +171,13 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, @function
_dl_runtime_resolve:
- | Save %a0 (struct return address).
+ | Save %a0 (struct return address) and %a1.
move.l %a0, -(%sp)
+ move.l %a1, -(%sp)
| Call the real address resolver.
- bsr.l fixup
- | Restore register %a0.
+ jbsr fixup
+ | Restore register %a0 and %a1.
+ move.l (%sp)+, %a1
move.l (%sp)+, %a0
| Pop parameters
addq.l #8, %sp
@@ -170,7 +185,9 @@ _dl_runtime_resolve:
jmp (%d0)
.size _dl_runtime_resolve, . - _dl_runtime_resolve
");
-#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0
+#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0, long int save_a1
+/* The PLT uses Elf32_Rela relocs. */
+#define elf_machine_relplt elf_machine_rela
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83cfd73cf6d2d897e9401aee53ce0fe3b42a3394
commit 83cfd73cf6d2d897e9401aee53ce0fe3b42a3394
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 15 17:14:48 1996 +0000
[$(subdir)-signal] (sysdep_routines): Don't sys-sig.
diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile
index 0c149da..320e99b 100644
--- a/sysdeps/unix/sysv/sysv4/Makefile
+++ b/sysdeps/unix/sysv/sysv4/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,13 +22,6 @@ sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid
endif
-
-ifeq ($(subdir),signal)
-
-sysdep_routines := $(sysdep_routines) sys-sig
-
-endif
-
ifeq ($(subdir),misc)
sysdep_routines := $(sysdep_routines) sysinfo
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3964340a690d43564e6a9ac451b67a37ffa710c7
commit 3964340a690d43564e6a9ac451b67a37ffa710c7
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 15 16:47:45 1996 +0000
Wed Feb 14 00:21:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.c (memchr): loop searching for matching
character bailed out one too early; changed constant 6 to
7 to fix this.
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index 11ff542..a911302 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -72,7 +72,7 @@ memchr (const void *s, int c, size_t n)
unsigned char *cp = (unsigned char *) (longword_ptr - 1);
int i;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < 7; i++)
if (cp[i] == c)
return &cp[i];
return &cp[7];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da184b1bcfcc27b7c1e40ff29953cfea57a7b3a9
commit da184b1bcfcc27b7c1e40ff29953cfea57a7b3a9
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 13 11:40:27 1996 +0000
New file from Schwab
diff --git a/sysdeps/unix/sysv/linux/m68k/fpu_control.h b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
new file mode 100644
index 0000000..0bbbb08
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/fpu_control.h
@@ -0,0 +1,110 @@
+/* 68k FPU control word definitions.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/*
+ * Motorola floating point control register bits.
+ *
+ * 31-16 -> reserved (read as 0, ignored on write)
+ * 15 -> enable trap for BSUN exception
+ * 14 -> enable trap for SNAN exception
+ * 13 -> enable trap for OPERR exception
+ * 12 -> enable trap for OVFL exception
+ * 11 -> enable trap for UNFL exception
+ * 10 -> enable trap for DZ exception
+ * 9 -> enable trap for INEX2 exception
+ * 8 -> enable trap for INEX1 exception
+ * 7-6 -> Precision Control
+ * 5-4 -> Rounding Control
+ * 3-0 -> zero (read as 0, write as 0)
+ *
+ *
+ * Precision Control:
+ * 00 - round to extended precision
+ * 01 - round to single precision
+ * 10 - round to double precision
+ * 11 - undefined
+ *
+ * Rounding Control:
+ * 00 - rounding to nearest (RN)
+ * 01 - rounding toward zero (RZ)
+ * 10 - rounding (down)toward minus infinity (RM)
+ * 11 - rounding (up) toward plus infinity (RP)
+ *
+ * The hardware default is 0x0000. I choose 0x5400.
+ */
+
+#include <features.h>
+
+/* masking of interrupts */
+#define _FPU_MASK_BSUN 0x8000
+#define _FPU_MASK_SNAN 0x4000
+#define _FPU_MASK_OPERR 0x2000
+#define _FPU_MASK_OVFL 0x1000
+#define _FPU_MASK_UNFL 0x0800
+#define _FPU_MASK_DZ 0x0400
+#define _FPU_MASK_INEX1 0x0200
+#define _FPU_MASK_INEX2 0x0100
+
+/* precision control */
+#define _FPU_EXTENDED 0x00 /* RECOMMENDED */
+#define _FPU_DOUBLE 0x80
+#define _FPU_SINGLE 0x40 /* DO NOT USE */
+
+/* rounding control */
+#define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
+#define _FPU_RC_ZERO 0x10
+#define _FPU_RC_DOWN 0x20
+#define _FPU_RC_UP 0x30
+
+#define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */
+
+
+/* Now two recommended fpucr */
+
+/* Linux default:
+ - extended precision
+ - rounding to nearest
+ - exceptions on overflow, zero divide and NaN */
+#define _FPU_DEFAULT 0x00005400
+
+/* IEEE: same as above, but exceptions. We must make it non-zero so
+ that __setfpucw works. This bit will be ignored. */
+#define _FPU_IEEE 0x00000001
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
+
+/* Macros for accessing the hardware control word. */
+#define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw))
+#define _FPU_SETCW(cw) __asm__ ("fmove%.l %0, %!" : "dm" (cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+__BEGIN_DECLS
+
+/* Called at startup. It can be used to manipulate fpu control register. */
+extern void __setfpucw __P ((fpu_control_t));
+
+__END_DECLS
+
+#endif /* _M68K_FPU_CONTROL_H */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9298f9e195186e6ebc1261c75e1643d6dd5c182f
commit 9298f9e195186e6ebc1261c75e1643d6dd5c182f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 13 11:38:58 1996 +0000
Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/brk.c,
sysdeps/unix/sysv/linux/m68k/mmap.S,
sysdeps/unix/sysv/linux/m68k/select.S,
sysdeps/unix/sysv/linux/m68k/sigcontext.h,
sysdeps/unix/sysv/linux/m68k/sigreturn.S,
sysdeps/unix/sysv/linux/m68k/socket.S,
sysdeps/unix/sysv/linux/m68k/syscall.S,
sysdeps/unix/sysv/linux/m68k/sysdep.S,
sysdeps/unix/sysv/linux/m68k/sysdep.h: New files.
diff --git a/sysdeps/unix/sysv/linux/m68k/brk.c b/sysdeps/unix/sysv/linux/m68k/brk.c
new file mode 100644
index 0000000..3fd5475
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/brk.c
@@ -0,0 +1,52 @@
+/* brk system call for Linux/m68k.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sysdep.h>
+
+void *__curbrk;
+
+int
+__brk (void *addr)
+{
+ void *newbrk;
+
+ {
+ register long d0 __asm__ ("%d0");
+
+ asm ("move%.l %2, %%d1\n"
+ "trap #0" /* Perform the system call. */
+ : "=d" (d0)
+ : "0" (SYS_ify (brk)), "g" (addr)
+ : "%d0", "%d1");
+ newbrk = (void *) d0;
+ }
+ __curbrk = newbrk;
+
+ if (newbrk < addr)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ return 0;
+}
+weak_alias (__brk, brk)
+
diff --git a/sysdeps/unix/sysv/linux/m68k/mmap.S b/sysdeps/unix/sysv/linux/m68k/mmap.S
new file mode 100644
index 0000000..ed0480d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/mmap.S
@@ -0,0 +1,44 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ .text
+ SYSCALL_ERROR_HANDLER
+
+ENTRY (__mmap)
+
+ move.l #SYS_ify (mmap), %d0 /* System call number in %d0. */
+
+ lea 4(%sp), %a0 /* Address of args is 1st arg. */
+ move.l %a0, %d1
+
+ /* Do the system call trap. */
+ trap #0
+
+ /* Kludge: negative numbers are among the legal return values.
+ If %d0 is between -4096 and 0 then there was an error. */
+ cmp.l #-4096, %d0
+ jhi syscall_error
+
+ /* Successful; return the syscall's value. Copy it to %a0 because
+ mmap is declared to return a pointer. */
+ move.l %d0, %a0
+ rts
+
+weak_alias (__mmap, mmap)
diff --git a/sysdeps/unix/sysv/linux/m68k/select.S b/sysdeps/unix/sysv/linux/m68k/select.S
new file mode 100644
index 0000000..2770df8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/select.S
@@ -0,0 +1,53 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+/* Linux has two versions of the select system call. The old one expected
+ one argument which must be a pointer to a struct which contains the
+ five values. The new version expects the five arguments be given in the
+ registers. First try the new version, if it's not available fall back
+ to the old version. */
+
+ .text
+ SYSCALL_ERROR_HANDLER
+ENTRY (__select)
+
+#if 0 /* For now only use the old version. */
+ DO_CALL (#SYS_ify (_newselect), 5)
+ tst.l %d0
+ jmi 1f
+ rts
+
+1: move.l #-ENOSYS, %d1
+ cmp.l %d1, %d0
+ jne syscall_error /* Real error */
+
+ /* Try again using the old syscall interface. */
+#endif
+ lea 4(%sp), %a0
+ move.l %a0, %d1
+ move.l #SYS_ify (select), %d0
+ trap #0
+ tst.l %d0
+ jmi syscall_error
+ ret
+
+weak_alias (__select, select)
diff --git a/sysdeps/unix/sysv/linux/m68k/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/sigcontext.h
new file mode 100644
index 0000000..585b479
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sigcontext.h
@@ -0,0 +1,31 @@
+/* Structure describing state saved while handling a signal. Linux/m68k version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+{
+ __sigset_t sc_mask;
+ unsigned long sc_usp;
+ unsigned long sc_d0;
+ unsigned long sc_d1;
+ unsigned long sc_a0;
+ unsigned long sc_a1;
+ unsigned short sc_sr;
+ unsigned long sc_pc;
+};
diff --git a/sysdeps/unix/sysv/linux/m68k/sigreturn.S b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
new file mode 100644
index 0000000..7f6d643
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sigreturn.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.text
+ENTRY (__sigreturn)
+ addq.l #4, %sp /* Pop the return PC. */
+ DO_CALL (#SYS_ify (sigreturn), 0)
+ /* Do the system call; it never returns. */
+ /* NOTREACHED */
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
new file mode 100644
index 0000000..a85f41c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -0,0 +1,62 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#include <sys/socketcall.h>
+
+#define P(a, b) P2(a, b)
+#define P2(a, b) a##b
+
+ .text
+ SYSCALL_ERROR_HANDLER
+
+/* The socket-oriented system calls are handled unusally in Linux.
+ They are all gated through the single `socketcall' system call number.
+ `socketcall' takes two arguments: the first is the subcode, specifying
+ which socket function is being called; and the second is a pointer to
+ the arguments to the specific function.
+
+ The .S files for the other calls just #define socket and #include this. */
+
+.globl P(__,socket)
+ENTRY (P(__,socket))
+
+ /* Save registers. */
+ move.l %d2, %a0
+
+ move.l #SYS_ify (socketcall), %d0 /* System call number in %d0. */
+
+ /* Use ## so `socket' is a separate token that might be #define'd. */
+ move.l #P (SOCKOP_,socket), %d1 /* Subcode is first arg to syscall. */
+ lea 4(%sp), %a1 /* Address of args is 2nd arg. */
+ move.l %a1, %d2
+
+ /* Do the system call trap. */
+ trap #0
+
+ /* Restore registers. */
+ move.l %a0, %d2
+
+ /* %d0 is < 0 if there was an error. */
+ tst.l %d0
+ jmi syscall_error
+
+ /* Successful; return the syscall's value. */
+ rts
+
+weak_alias (P(__,socket), socket)
diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S
new file mode 100644
index 0000000..2cc451c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/syscall.S
@@ -0,0 +1,31 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ .text
+ SYSCALL_ERROR_HANDLER
+ENTRY (syscall)
+ move.l (%sp)+, %a0 /* Pop return address. */
+ DO_CALL ((%sp), 5) /* Frob the args and do the system call. */
+ tst.l %d0 /* Check %d0 for error. */
+ jmi error /* Jump to error handler if negative. */
+ jmp (%a0) /* Return to caller. */
+
+error: pea (%a0)
+ jra syscall_error
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S
new file mode 100644
index 0000000..895ea27
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S
@@ -0,0 +1,71 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Because the Linux version is in fact m68k/ELF and the start.? file
+ for this system (sysdeps/m68k/elf/start.S) is also used by The Hurd
+ and therefore this files must not contain the definition of the
+ `errno' variable (I don't know why, ask Roland), we have to define
+ it somewhere else.
+
+ ...and this place is here. */
+ .bss
+ .globl errno
+ .type errno,@object
+errno: .space 4
+ .size errno,4
+ .globl _errno
+ .type _errno,@object
+_errno = errno /* This name is expected by hj libc.so.5 startup code. */
+ .text
+
+/* The following code is not used at all in the shared library.
+ The PIC system call stubs set errno themselves. */
+
+#ifndef PIC
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+.globl errno
+.globl __syscall_error
+
+/* The syscall stubs jump here when they detect an error. */
+
+.globl __syscall_error
+__syscall_error:
+ neg.l %d0
+
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ move.l #EWOULDBLOCK_sys, %d1
+ cmp.l %d0, %d1
+ jne 1f
+ move.l #EAGAIN, %d0
+1:
+#endif
+
+ move.l %d0, errno
+ move.l #-1, %d0
+ /* Copy return value to %a0 for syscalls that are declared to
+ return a pointer. */
+ move.l %d0, %a0
+ rts
+#endif /* PIC */
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
new file mode 100644
index 0000000..9b6c8e1
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -0,0 +1,131 @@
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Written by Andreas Schwab, <schwab@issan.informatik.uni-dortmund.de>,
+December 1995.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* In the Linux/ELF world, C symbols are asm symbols. */
+#define NO_UNDERSCORES
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef ASSEMBLER
+
+#define POUND #
+
+/* Define an entry point visible from C. */
+#define ENTRY(name) \
+ .globl name; \
+ .type name, @function; \
+ .align 4; \
+ name##:
+
+/* Since C identifiers are not normally prefixed with an underscore
+ on this system, the asm identifier `syscall_error' intrudes on the
+ C name space. Make sure we use an innocuous name. */
+#define syscall_error __syscall_error
+
+/* Linux uses a negative return value to indicate syscall errors, unlike
+ most Unices, which use the condition codes' carry flag. */
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ SYSCALL_ERROR_HANDLER \
+ ENTRY (name) \
+ DO_CALL (POUND SYS_ify (syscall_name), args); \
+ tst.l %d0; \
+ jmi syscall_error;
+
+#ifdef PIC
+/* Store (- %d0) into errno through the GOT. */
+#define SYSCALL_ERROR_HANDLER \
+syscall_error: \
+ move.l (errno@GOTPC.l, %pc), %a0; \
+ neg.l %d0; \
+ move.l %d0, (%a0); \
+ move.l POUND -1, %d0; \
+ /* Copy return value to %a0 for syscalls that are declared to return \
+ a pointer (e.g., mmap). */ \
+ move.l %d0, %a0; \
+ rts;
+#else
+#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
+#endif
+
+/* Linux takes system call arguments in registers:
+
+ syscall number %d0 call-clobbered
+ arg 1 %d1 call-clobbered
+ arg 2 %d2 call-saved
+ arg 3 %d3 call-saved
+ arg 4 %d4 call-saved
+ arg 5 %d5 call-saved
+
+ The stack layout upon entering the function is:
+
+ 20(%sp) Arg# 5
+ 16(%sp) Arg# 4
+ 12(%sp) Arg# 3
+ 8(%sp) Arg# 2
+ 4(%sp) Arg# 1
+ (%sp) Return address
+
+ (Of course a function with say 3 arguments does not have entries for
+ arguments 4 and 5.)
+
+ Separate move's are faster than movem, but need more space. Since
+ speed is more important, we don't use movem. Since %a0 and %a1 are
+ scratch registers, we can use them for saving as well. */
+
+#define DO_CALL(syscall, args) \
+ move.l syscall, %d0; \
+ DOARGS_##args \
+ trap POUND 0; \
+ UNDOARGS_##args
+
+#define DOARGS_0 /* No arguments to frob. */
+#define UNDOARGS_0 /* No arguments to unfrob. */
+#define _DOARGS_0(n) /* No arguments to frob. */
+
+#define DOARGS_1 _DOARGS_1 (4)
+#define _DOARGS_1(n) move.l n(%sp), %d1; _DOARGS_0 (n)
+#define UNDOARGS_1 UNDOARGS_0
+
+#define DOARGS_2 _DOARGS_2 (8)
+#define _DOARGS_2(n) move.l %d2, %a0; move.l n(%sp), %d2; _DOARGS_1 (n-4)
+#define UNDOARGS_2 UNDOARGS_1; move.l %a0, %d2
+
+#define DOARGS_3 _DOARGS_3 (12)
+#define _DOARGS_3(n) move.l %d3, %a1; move.l n(%sp), %d3; _DOARGS_2 (n-4)
+#define UNDOARGS_3 UNDOARGS_2; move.l %a1, %d3
+
+#define DOARGS_4 _DOARGS_4 (16)
+#define _DOARGS_4(n) move.l %d4, -(%sp); move.l n+4(%sp), %d4; _DOARGS_3 (n)
+#define UNDOARGS_4 UNDOARGS_3; move.l (%sp)+, %d4
+
+#define DOARGS_5 _DOARGS_5 (20)
+#define _DOARGS_5(n) move.l %d5, -(%sp); move.l n+4(%sp), %d5; _DOARGS_4 (n)
+#define UNDOARGS_5 UNDOARGS_4; move.l (%sp)+, %d5
+
+
+#define ret rts
+#if 0 /* Not used by Linux */
+#define r0 %d0
+#define r1 %d1
+#define MOVE(x,y) movel x , y
+#endif
+
+#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9168a08cef1a6cc20646061ebab0f660f3a26f79
commit 9168a08cef1a6cc20646061ebab0f660f3a26f79
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 13 09:51:13 1996 +0000
Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c,
sysdeps/m68k/isinfl.c, sysdeps/m68k/isnanl.c: New files.
diff --git a/sysdeps/m68k/fpu/isinfl.c b/sysdeps/m68k/fpu/isinfl.c
new file mode 100644
index 0000000..f3eeaa2
--- /dev/null
+++ b/sysdeps/m68k/fpu/isinfl.c
@@ -0,0 +1,4 @@
+#define FUNC __isinfl
+#include <isinf.c>
+
+weak_alias (__isinfl, isinfl)
diff --git a/sysdeps/m68k/fpu/isnanl.c b/sysdeps/m68k/fpu/isnanl.c
new file mode 100644
index 0000000..0f48a73
--- /dev/null
+++ b/sysdeps/m68k/fpu/isnanl.c
@@ -0,0 +1,4 @@
+#define FUNC __isnanl
+#include <isinf.c>
+
+weak_alias (__isnanl, isnanl)
diff --git a/sysdeps/m68k/isinfl.c b/sysdeps/m68k/isinfl.c
new file mode 100644
index 0000000..1b06d47
--- /dev/null
+++ b/sysdeps/m68k/isinfl.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <math.h>
+#include "ieee754.h"
+
+#undef __isinfl
+#undef isinfl
+
+
+/* Return 0 if VALUE is finite or NaN, +1 if it
+ is +Infinity, -1 if it is -Infinity. */
+int
+__isinfl (long double value)
+{
+ union ieee854_long_double u;
+
+ u.d = value;
+
+ /* An IEEE 854 infinity has an exponent with the
+ maximum possible value and a zero mantissa.
+ In Motorola's interpretation the integer bit is ignored. */
+ if ((u.ieee.exponent & 0x7fff) == 0x7fff &&
+ (u.ieee.mantissa0 & 0x7fffffff) == 0 && u.ieee.mantissa1 == 0)
+ return u.ieee.negative ? -1 : 1;
+
+ return 0;
+}
+
+weak_alias (__isinfl, isinfl);
diff --git a/sysdeps/m68k/isnanl.c b/sysdeps/m68k/isnanl.c
new file mode 100644
index 0000000..38a9616
--- /dev/null
+++ b/sysdeps/m68k/isnanl.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <math.h>
+#include "ieee754.h"
+
+#undef __isnanl
+#undef isnanl
+
+
+/* Return nonzero if VALUE is not a number. */
+int
+__isnanl (long double value)
+{
+ union ieee854_long_double u;
+
+ u.d = value;
+
+ /* IEEE 854 NaN's have the maximum possible
+ exponent and a nonzero mantissa. In Motorola's
+ interpretation the integer bit is ignored. */
+ return ((u.ieee.exponent & 0x7fff) == 0x7fff &&
+ ((u.ieee.mantissa0 & 0x7fffffff) != 0 || u.ieee.mantissa1 != 0));
+}
+
+weak_alias (__isnanl, isnanl);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5f51e1132af7423b2bb22091a7a8e80bc17ab378
commit 5f51e1132af7423b2bb22091a7a8e80bc17ab378
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 13 09:26:53 1996 +0000
Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/sys/mman.h: Define MAP_ANON and
MAP_FILE if not already defined.
* elf/elf.h: Add m68k reloc definitions.
* sysdeps/m68k/dl-machine.h, sysdeps/m68k/elf/start.S: New files.
diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h
new file mode 100644
index 0000000..2208cd2
--- /dev/null
+++ b/sysdeps/m68k/dl-machine.h
@@ -0,0 +1,230 @@
+/* Machine-dependent ELF dynamic relocation inline functions. m68k version.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define ELF_MACHINE_NAME "m68k"
+
+#include <assert.h>
+#include <string.h>
+#include <link.h>
+
+
+/* Return nonzero iff E_MACHINE is compatible with the running host. */
+static inline int
+elf_machine_matches_host (Elf32_Half e_machine)
+{
+ switch (e_machine)
+ {
+ case EM_68K:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+
+/* Return the run-time address of the _GLOBAL_OFFSET_TABLE_.
+ Must be inlined in a function which uses global data. */
+static inline Elf32_Addr *
+elf_machine_got (void)
+{
+ register Elf32_Addr *got asm ("%a5");
+ return got;
+}
+
+
+/* Return the run-time load address of the shared object. */
+static inline Elf32_Addr
+elf_machine_load_address (void)
+{
+ ...
+}
+
+/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
+ MAP is the object containing the reloc. */
+
+static inline void
+elf_machine_rela (struct link_map *map,
+ const Elf32_Rela *reloc,
+ Elf32_Addr sym_loadaddr, const Elf32_Sym *sym)
+{
+ Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ const Elf32_Addr sym_value = sym ? sym_loadaddr + sym->st_value : 0;
+
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_68K_COPY:
+ memcpy (reloc_addr, (void *) sym_value, sym->st_size);
+ break;
+ case R_68K_GLOB_DAT:
+ case R_68K_JMP_SLOT:
+ *reloc_addr = sym_value;
+ break;
+ case R_68K_8:
+ *(char *) reloc_addr = sym_value + reloc->r_addend;
+ break;
+ case R_68K_16:
+ *(short *) reloc_addr = sym_value + reloc->r_addend;
+ break;
+ case R_68K_32:
+ *reloc_addr = sym_value + reloc->r_addend;
+ break;
+ case R_68K_RELATIVE:
+ *reloc_addr = map->l_addr + reloc->r_addend;
+ break;
+ case R_68K_PC8:
+ *(char *) reloc_addr = (sym_value + reloc->r_addend
+ - (Elf32_Addr) reloc_addr);
+ break;
+ case R_68K_PC16:
+ *(short *) reloc_addr = (sym_value + reloc->r_addend
+ - (Elf32_Addr) reloc_addr);
+ break;
+ case R_68K_PC32:
+ *reloc_addr = sym_value + reloc->r_addend - (Elf32_Addr) reloc_addr;
+ break;
+ case R_68K_NONE: /* Alright, Wilbur. */
+ break;
+ default:
+ assert (! "unexpected dynamic reloc type");
+ break;
+ }
+}
+
+static inline void
+elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+{
+ Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ case R_68K_NONE:
+ break;
+ case R_68K_JMP_SLOT:
+ *reloc_addr += map->l_addr;
+ break;
+ default:
+ assert (! "unexpected PLT reloc type");
+ break;
+ }
+}
+
+/* The m68k never uses Elf32_Rel relocations. */
+#define ELF_MACHINE_NO_REL 1
+
+
+/* Set up the loaded object described by L so its unrelocated PLT
+ entries will jump to the on-demand fixup code in dl-runtime.c. */
+
+static inline void
+elf_machine_runtime_setup (struct link_map *l, int lazy)
+{
+ Elf32_Addr *got;
+ extern void _dl_runtime_resolve (Elf32_Word);
+
+ if (l->l_info[DT_JMPREL] && lazy)
+ {
+ /* The GOT entries for functions in the PLT have not yet been
+ filled in. Their initial contents will arrange when called
+ to push an offset into the .rela.plt section, push
+ _GLOBAL_OFFSET_TABLE_[1], and then jump to
+ _GLOBAL_OFFSET_TABLE_[2]. */
+ got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got[1] = (Elf32_Addr) l; /* Identify this shared object. */
+ /* This function will get called to fix up the GOT entry
+ indicated by the offset on the stack, and then jump to the
+ resolved address. */
+ got[2] = (Elf32_Addr) &_dl_runtime_resolve;
+ }
+
+ /* This code is used in dl-runtime.c to call the `fixup' function
+ and then redirect to the address it returns. */
+#define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
+| Trampoline for _dl_runtime_resolver
+ .globl _dl_runtime_resolve
+ .type _dl_runtime_resolve, @function
+_dl_runtime_resolve:
+ | Save %a0 (struct return address).
+ move.l %a0, -(%sp)
+ | Call the real address resolver.
+ bsr.l fixup
+ | Restore register %a0.
+ move.l (%sp)+, %a0
+ | Pop parameters
+ addq.l #8, %sp
+ | Call real function.
+ jmp (%d0)
+ .size _dl_runtime_resolve, . - _dl_runtime_resolve
+");
+#define ELF_MACHINE_RUNTIME_FIXUP_ARGS long int save_a0
+}
+
+
+/* Mask identifying addresses reserved for the user program,
+ where the dynamic linker should not map anything. */
+#define ELF_MACHINE_USER_ADDRESS_MASK 0x80000000UL
+
+/* Initial entry point code for the dynamic linker.
+ The C function `_dl_start' is the real entry point;
+ its return value is the user program's entry point. */
+
+#define RTLD_START asm ("\
+.text
+.globl _start
+.globl _dl_start_user
+_start:
+ jbsr _dl_start
+_dl_start_user:
+ | Save the user entry point address in %a4.
+ move.l %d0, %a4
+ | Point %a5 at the GOT.
+ lea _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a5
+ | See if we were run as a command with the executable file
+ | name as an extra leading argument.
+ move.l ([_dl_skip_args@GOT, %a5]), %d0
+ jeq 0f
+ | Pop the original argument count
+ move.l (%sp)+, %d1
+ | Subtract _dl_skip_args from it.
+ sub.l %d0, %d1
+ | Adjust the stack pointer to skip _dl_skip_args words.
+ lea (%sp, %d0*4), %sp
+ | Push back the modified argument count.
+ move.l %d1, -(%sp)
+ | Call _dl_init_next to return the address of an initializer
+ | function to run.
+0: bsr.l _dl_init_next@PLTPC
+ | Check for zero return, when out of initializers.
+ tst.l %d0
+ jeq 1f
+ | Call the shared object initializer function.
+ | NOTE: We depend only on the registers (%a4 and %a5)
+ | and the return address pushed by this call;
+ | the initializer is called with the stack just
+ | as it appears on entry, and it is free to move
+ | the stack around, as long as it winds up jumping to
+ | the return address on the top of the stack.
+ move.l %d0, %a0
+ jsr (%a0)
+ | Loop to call _dl_init_next for the next initializer.
+ jra 0b
+1: | Pass our finalizer function to the user in %a1.
+ move.l _dl_fini@GOT(%a5), %a1
+ | Initialize %fp with the stack pointer.
+ move.l %sp, %fp
+ | Jump to the user's entry point.
+ jmp (%a4)");
diff --git a/sysdeps/m68k/elf/start.S b/sysdeps/m68k/elf/start.S
new file mode 100644
index 0000000..1b622d6
--- /dev/null
+++ b/sysdeps/m68k/elf/start.S
@@ -0,0 +1,90 @@
+/* Startup code compliant to the ELF m68k ABI.
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This is the canonical entry point, usually the first thing in the text
+ segment. The SVR4/m68k ABI says that when the entry point runs,
+ most registers' values are unspecified, except for:
+
+ %a1 Contains a function pointer to be registered with `atexit'.
+ This is how the dynamic linker arranges to have DT_FINI
+ functions called for shared libraries that have been loaded
+ before this code runs.
+
+ %sp The stack contains the arguments and environment:
+ 0(%sp) argc
+ 4(%sp) argv[0]
+ ...
+ (4*argc)(%sp) NULL
+ (4*(argc+1))(%sp) envp[0]
+ ...
+ NULL
+*/
+
+ .text
+ .globl _start
+_start:
+ /* Clear the frame pointer. The ABI suggests this be done, to mark
+ the outermost frame obviously. */
+ sub.l %fp, %fp
+
+ /* %a1 contains the address of the shared library termination
+ function, which we will register with `atexit' to be called by
+ `exit'. */
+ tstl %a1
+ jbeq 1f
+ move.l %a1, -(%sp)
+ jbsr atexit
+ addql #4, %sp
+1:
+
+ /* Do essential libc initialization. In statically linked
+ programs under the GNU Hurd, this is what sets up the
+ arguments on the stack for the code below. */
+ jbsr __libc_init_first
+
+ /* Extract the arguments and environment as encoded on the stack
+ and set up the arguments for `main': argc, argv, envp. */
+ move.l (%sp)+, %d0 /* Pop the argument count. */
+ lea (4,%sp,%d0*4), %a0 /* envp = &argv[argc + 1] */
+ move.l %a0, _environ /* Store it in the global variable. */
+ pea (%a0) /* Push third argument: envp. */
+ pea 4(%sp) /* Push second argument: argv. */
+ move.l %d0, -(%sp) /* Push first argument: argc. */
+
+ /* Call `_init', which is the entry point to our own `.init'
+ section; and register with `atexit' to have `exit' call
+ `_fini', which is the entry point to our own `.fini' section. */
+ jbsr _init
+ move.l #_fini, -(%sp)
+ jbsr atexit
+ addq.l #4, %sp
+
+ /* Call the user's main function, and exit with its value. */
+ jbsr main
+ move.l %d0, (%sp)
+1: jbsr exit /* This should never return. */
+ jbra 1b /* Try again if somehow it does return. */
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7fb027dc33db82b586adaf488cd8f71b0ecef32d
commit 7fb027dc33db82b586adaf488cd8f71b0ecef32d
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 12 08:44:32 1996 +0000
Mon Feb 12 03:10:41 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/sysv4/syscalls.list: Remove redundancies.
Add __waitid.
* sysdeps/unix/sysv/linux/syscalls.list: Remove redundancies.
Define __ name for sigprocmask.
* sysdeps/unix/bsd/ultrix4/syscalls.list: Remove redundancies.
Add getsysinfo.
* sysdeps/unix/bsd/sun/sunos4/syscalls.list: Remove redundancies.
* sysdeps/unix/bsd/sun/syscalls.list: Remove redundancies.
* sysdeps/unix/bsd/bsd4.4/syscalls.list: Remove redundancies.
* sysdeps/unix/bsd/syscalls.list: Remove settimeofday, utimes.
Add getdents, wait3, waitpid.
* sysdeps/unix/syscalls.list: Add seteuid, setegid, setsid,
settimeofday, sigsuspend, sstk, utimes.
* sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed.
* sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file.
* sysdeps/unix/bsd/ultrix4/mips/Makefile (sysdep_routines):
Removed sigtramp.
* sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Renamed from sigtramp.c.
* sysdeps/unix/bsd/bsd4.4/sstk.S: File removed.
* sysdeps/unix/bsd/hp/m68k/syscalls.list: File removed.
* sysdeps/unix/bsd/osf/alpha/getdents.S: File removed.
* sysdeps/unix/bsd/ultrix4/getsysinfo.S: File removed.
* sysdeps/unix/bsd/ultrix4/waitpid.S: File removed.
* sysdeps/unix/bsd/ultrix4/mips/sigtramp.c: File removed.
* sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed.
* sysdeps/unix/bsd/ultrix4/mips/sigvec.c: New file.
* sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file.
* sysdeps/unix/sysv/irix4/wait3.S: File removed.
* sysdeps/unix/sysv/sysv4/__waitid.S: File removed.
* sysdeps/unix/sysv/sysv4/fchdir.S: File removed.
* sysdeps/unix/sysv/sysv4/setegid.S: File removed.
* sysdeps/unix/sysv/sysv4/seteuid.S: File removed.
* sysdeps/unix/sysv/sysv4/sigaltstack.S: File removed.
* sysdeps/unix/sysv/sysv4/solaris2/utimes.S: File removed.
diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S
deleted file mode 100644
index df2c26d..0000000
--- a/sysdeps/unix/bsd/osf/alpha/getdents.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (getdirentries, 4)
- ret
- .end __getdirentries
-
-weak_alias (__getdirentries, getdirentries)
-
diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S
deleted file mode 100644
index 41718ba..0000000
--- a/sysdeps/unix/bsd/ultrix4/getsysinfo.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Ian Lance Taylor (ian@airs.com).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* Get various sorts of information about the system.
- This is an Ultrix only call. */
-
-#include <sysdep.h>
-
-SYSCALL__ (getsysinfo, 5)
- ret
- .end __getsysinfo
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
deleted file mode 100644
index 4d7aa44..0000000
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* __sigvec is defined by sigtramp.c. */
-
-PSEUDO (__raw_sigvec, sigvec, 3)
- ret
- .end __raw_sigvec
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
similarity index 95%
rename from sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
rename to sysdeps/unix/bsd/ultrix4/mips/sigvec.c
index 1bb208d..6969594 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,6 @@ Cambridge, MA 02139, USA. */
/* The user's signal handler is called with three arguments. */
typedef void (*handler_type) (int sig, int code, struct sigcontext *);
-/* Defined in __raw_sigvec.S. */
extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
struct sigvec *ovec,
void (*)(int sig, int code,
diff --git a/sysdeps/unix/bsd/hp/m68k/syscalls.list b/sysdeps/unix/bsd/ultrix4/mips/syscalls.list
similarity index 52%
rename from sysdeps/unix/bsd/hp/m68k/syscalls.list
rename to sysdeps/unix/bsd/ultrix4/mips/syscalls.list
index b9dca13..f7d0bba 100644
--- a/sysdeps/unix/bsd/hp/m68k/syscalls.list
+++ b/sysdeps/unix/bsd/ultrix4/mips/syscalls.list
@@ -1,3 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
-getdents - getdirentries 4 __getdirentries getdirentries
+raw-sigvec sigvec sigvec 4 __raw_sigvec
diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S
deleted file mode 100644
index 3470da7..0000000
--- a/sysdeps/unix/bsd/ultrix4/waitpid.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (waitpid, 3)
- ret
- .end __waitpid
-
-weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S
deleted file mode 100644
index 54065ae..0000000
--- a/sysdeps/unix/sysv/irix4/wait3.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/ultrix4/wait3.S>
diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S
deleted file mode 100644
index 845bec8..0000000
--- a/sysdeps/unix/sysv/sysv4/__waitid.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* XXX */
-#define SYS_waitid SYS_waitsys
-
-SYSCALL__ (waitid, 3)
- ret
diff --git a/sysdeps/unix/sysv/sysv4/fchdir.S b/sysdeps/unix/sysv/sysv4/fchdir.S
deleted file mode 100644
index ef11d55..0000000
--- a/sysdeps/unix/sysv/sysv4/fchdir.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SVR4 uses the BSD 4.4 fchdir(2) syscall. */
-#include <sysdeps/unix/bsd/bsd4.4/fchdir.S>
diff --git a/sysdeps/unix/sysv/sysv4/setegid.S b/sysdeps/unix/sysv/sysv4/setegid.S
deleted file mode 100644
index f8fd763..0000000
--- a/sysdeps/unix/sysv/sysv4/setegid.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SVR4 uses the BSD 4.4 setegid() system call. */
-#include <sysdeps/unix/bsd/bsd4.4/setegid.S>
diff --git a/sysdeps/unix/sysv/sysv4/seteuid.S b/sysdeps/unix/sysv/sysv4/seteuid.S
deleted file mode 100644
index 4ff1106..0000000
--- a/sysdeps/unix/sysv/sysv4/seteuid.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SVR4 uses the BSD 4.4 seteuid() system call. */
-#include <sysdeps/unix/bsd/bsd4.4/seteuid.S>
diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S
deleted file mode 100644
index f7cf0d5..0000000
--- a/sysdeps/unix/sysv/sysv4/sigaltstack.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SVR4 uses the BSD 4.4 sigaltstack syscall. */
-#include <sysdeps/unix/bsd/bsd4.4/sigaltstack.S>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
deleted file mode 100644
index 54a043c..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Solaris has the BSD `utimes' function. */
-#include <sysdeps/unix/bsd/utimes.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=312096ab57d80e70c71367d80a53ec02e49c56dc
commit 312096ab57d80e70c71367d80a53ec02e49c56dc
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 12 08:35:16 1996 +0000
Remove redundancies.
Add __waitid.
diff --git a/sysdeps/unix/sysv/sysv4/syscalls.list b/sysdeps/unix/sysv/sysv4/syscalls.list
index 2919bcc..7b75d55 100644
--- a/sysdeps/unix/sysv/sysv4/syscalls.list
+++ b/sysdeps/unix/sysv/sysv4/syscalls.list
@@ -2,6 +2,6 @@
pgrpsys - pgrpsys 3 __pgrpsys
sigprocmask - sigprocmask 3 __sigprocmask sigprocmask
-sigsuspend - sigsuspend 1 sigsuspend
sysconfig - sysconfig 1 __sysconfig
sysinfo - systeminfo 3 __sysinfo
+__waitid waitpid waitsys 3 __waitid
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=add1bba61387ab14036eec5b1236e18fa1643826
commit add1bba61387ab14036eec5b1236e18fa1643826
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 12 08:34:00 1996 +0000
Remove redundancies.
Add getsysinfo.
diff --git a/sysdeps/unix/bsd/ultrix4/syscalls.list b/sysdeps/unix/bsd/ultrix4/syscalls.list
index dd1052a..68df0a7 100644
--- a/sysdeps/unix/bsd/ultrix4/syscalls.list
+++ b/sysdeps/unix/bsd/ultrix4/syscalls.list
@@ -1,5 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
-getdents - getdirentries 4 __getdirentries getdirentries
-setsid - setsid 0 __setsid setsid
-uname - uname 1 uname
+getsysinfo sysconf getsysinfo 5 __getsysinfo
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5be02f042e5d799d712d26fcebf4c5ebf493604b
commit 5be02f042e5d799d712d26fcebf4c5ebf493604b
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 12 08:33:18 1996 +0000
Remove redundancies.
diff --git a/sysdeps/unix/bsd/sun/sunos4/syscalls.list b/sysdeps/unix/bsd/sun/sunos4/syscalls.list
index 7dafdf7..59992ee 100644
--- a/sysdeps/unix/bsd/sun/sunos4/syscalls.list
+++ b/sysdeps/unix/bsd/sun/sunos4/syscalls.list
@@ -2,7 +2,5 @@
msync - msync 3 msync
poll - poll 3 poll
-setsid - setsid 0 __setsid setsid
sys_mmap mmap mmap 5 __mmap_syscall
sys_wait4 wait4 wait4 4 __wait4_syscall
-uname - uname 1 uname
diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list
index 1c0d44d..079aa91 100644
--- a/sysdeps/unix/bsd/sun/syscalls.list
+++ b/sysdeps/unix/bsd/sun/syscalls.list
@@ -1,4 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
-getdents - getdirentries 4 __getdirentries getdirentries
sigvec - sigvec 3 __raw_sigvec
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e171df271e8c4fd883a163911a7b2b492b34455b
commit e171df271e8c4fd883a163911a7b2b492b34455b
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 12 08:11:19 1996 +0000
(sysdep_routines): Removed sigtramp.
diff --git a/sysdeps/unix/bsd/ultrix4/mips/Makefile b/sysdeps/unix/bsd/ultrix4/mips/Makefile
index 0b71fd9..74e3b04 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/Makefile
+++ b/sysdeps/unix/bsd/ultrix4/mips/Makefile
@@ -1,3 +1,3 @@
ifeq ($(subdir),signal)
-sysdep_routines := $(sysdep_routines) sigtramp __handler
+sysdep_routines := $(sysdep_routines) __handler
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e8eb6b98d39bf00a00042c2127d10c4b0fe7634
commit 3e8eb6b98d39bf00a00042c2127d10c4b0fe7634
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 7 21:15:47 1996 +0000
obsolete
diff --git a/sysdeps/unix/bsd/sun/sigvec.S b/sysdeps/unix/bsd/sun/sigvec.S
deleted file mode 100644
index c093974..0000000
--- a/sysdeps/unix/bsd/sun/sigvec.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* __sigvec is defined by sigtramp.c. */
-
-PSEUDO (__raw_sigvec, sigvec, 3)
- ret
-
-weak_alias (__sigvec, sigvec)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e6b8a3126b96ade8383cef2422775cea8706654
commit 6e6b8a3126b96ade8383cef2422775cea8706654
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 7 21:15:15 1996 +0000
Added sigvec.
diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list
index b9dca13..1c0d44d 100644
--- a/sysdeps/unix/bsd/sun/syscalls.list
+++ b/sysdeps/unix/bsd/sun/syscalls.list
@@ -1,3 +1,4 @@
# File name Caller Syscall name # args Strong name Weak names
getdents - getdirentries 4 __getdirentries getdirentries
+sigvec - sigvec 3 __raw_sigvec
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e2967628e22fb2530d152b1dbd2398e45bc4fc97
commit e2967628e22fb2530d152b1dbd2398e45bc4fc97
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 19 00:42:21 1996 +0000
Thu Jan 18 00:32:43 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
Replaced all simple system call files *.S throughout sysdeps/unix
with syscalls.list files to be processed by make-syscalls.sh.
* sysdeps/unix/s-proto.S: New file.
* sysdeps/unix/syscalls.list: New file.
* sysdeps/unix/bsd/syscalls.list: New file.
* sysdeps/unix/bsd/bsd4.4/syscalls.list: New file.
* sysdeps/unix/bsd/hp/m68k/syscalls.list: New file.
* sysdeps/unix/bsd/osf/syscalls.list: New file.
* sysdeps/unix/bsd/osf/alpha/syscalls.list: New file.
* sysdeps/unix/bsd/sony/newsos4/syscalls.list: New file.
* sysdeps/unix/bsd/sun/syscalls.list: New file.
* sysdeps/unix/bsd/sun/sunos4/syscalls.list: New file.
* sysdeps/unix/bsd/ultrix4/syscalls.list: New file.
* sysdeps/unix/common/syscalls.list: New file.
* sysdeps/unix/inet/syscalls.list: New file.
* sysdeps/unix/mman/syscalls.list: New file.
* sysdeps/unix/sysv/syscalls.list: New file.
* sysdeps/unix/sysv/irix4/syscalls.list: New file.
* sysdeps/unix/sysv/isc2.2/syscalls.list: New file.
* sysdeps/unix/sysv/linux/syscalls.list: New file.
* sysdeps/unix/sysv/linux/i386/syscalls.list: New file.
* sysdeps/unix/sysv/sco3.2.4/syscalls.list: New file.
* sysdeps/unix/sysv/sysv4/syscalls.list: New file.
* sysdeps/unix/sysv/sysv4/i386/syscalls.list: New file.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list: New file.
* sysdeps/unix/acct.S: File removed.
* sysdeps/unix/chdir.S: File removed.
* sysdeps/unix/chmod.S: File removed.
* sysdeps/unix/chown.S: File removed.
* sysdeps/unix/chroot.S: File removed.
* sysdeps/unix/close.S: File removed.
* sysdeps/unix/configure: File removed.
* sysdeps/unix/configure.in: File removed.
* sysdeps/unix/dup.S: File removed.
* sysdeps/unix/fcntl.S: File removed.
* sysdeps/unix/fsync.S: File removed.
* sysdeps/unix/getgid.S: File removed.
* sysdeps/unix/getpid.S: File removed.
* sysdeps/unix/getuid.S: File removed.
* sysdeps/unix/ioctl.S: File removed.
* sysdeps/unix/kill.S: File removed.
* sysdeps/unix/link.S: File removed.
* sysdeps/unix/lseek.S: File removed.
* sysdeps/unix/open.S: File removed.
* sysdeps/unix/ptrace.S: File removed.
* sysdeps/unix/read.S: File removed.
* sysdeps/unix/reboot.S: File removed.
* sysdeps/unix/setgid.S: File removed.
* sysdeps/unix/setuid.S: File removed.
* sysdeps/unix/sync.S: File removed.
* sysdeps/unix/umask.S: File removed.
* sysdeps/unix/unlink.S: File removed.
* sysdeps/unix/write.S: File removed.
* sysdeps/unix/bsd/flock.S: File removed.
* sysdeps/unix/bsd/getdtsz.S: File removed.
* sysdeps/unix/bsd/getpagesize.S: File removed.
* sysdeps/unix/bsd/killpg.S: File removed.
* sysdeps/unix/bsd/profil.S: File removed.
* sysdeps/unix/bsd/readv.S: File removed.
* sysdeps/unix/bsd/settimeofday.S: File removed.
* sysdeps/unix/bsd/sigblock.S: File removed.
* sysdeps/unix/bsd/sigpause.S: File removed.
* sysdeps/unix/bsd/sigsetmask.S: File removed.
* sysdeps/unix/bsd/sigstack.S: File removed.
* sysdeps/unix/bsd/sigvec.S: File removed.
* sysdeps/unix/bsd/utimes.S: File removed.
* sysdeps/unix/bsd/writev.S: File removed.
* sysdeps/unix/bsd/bsd4.4/chflags.S: File removed.
* sysdeps/unix/bsd/bsd4.4/fchdir.S: File removed.
* sysdeps/unix/bsd/bsd4.4/fchflags.S: File removed.
* sysdeps/unix/bsd/bsd4.4/getdents.S: File removed.
* sysdeps/unix/bsd/bsd4.4/getdomain.S: File removed.
* sysdeps/unix/bsd/bsd4.4/revoke.S: File removed.
* sysdeps/unix/bsd/bsd4.4/setdomain.S: File removed.
* sysdeps/unix/bsd/bsd4.4/setegid.S: File removed.
* sysdeps/unix/bsd/bsd4.4/seteuid.S: File removed.
* sysdeps/unix/bsd/bsd4.4/setlogin.S: File removed.
* sysdeps/unix/bsd/bsd4.4/setsid.S: File removed.
* sysdeps/unix/bsd/bsd4.4/sigaltstack.S: File removed.
* sysdeps/unix/bsd/bsd4.4/wait4.S: File removed.
* sysdeps/unix/bsd/hp/m68k/getdents.S: File removed.
* sysdeps/unix/bsd/osf/msync.S: File removed.
* sysdeps/unix/bsd/osf/alpha/wait4.S: File removed.
* sysdeps/unix/bsd/sony/newsos4/fchdir.S: File removed.
* sysdeps/unix/bsd/sony/newsos4/sys_wait4.S: File removed.
* sysdeps/unix/bsd/sun/getdents.S: File removed.
* sysdeps/unix/bsd/sun/sunos3/m68k/wait.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/msync.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/poll.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/setsid.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/sys_mmap.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/sys_wait4.S: File removed.
* sysdeps/unix/bsd/sun/sunos4/uname.S: File removed.
* sysdeps/unix/bsd/ultrix4/getdents.S: File removed.
* sysdeps/unix/bsd/ultrix4/setsid.S: File removed.
* sysdeps/unix/bsd/ultrix4/uname.S: File removed.
* sysdeps/unix/common/access.S: File removed.
* sysdeps/unix/common/adjtime.S: File removed.
* sysdeps/unix/common/dup2.S: File removed.
* sysdeps/unix/common/fchmod.S: File removed.
* sysdeps/unix/common/fchown.S: File removed.
* sysdeps/unix/common/ftruncate.S: File removed.
* sysdeps/unix/common/getgroups.S: File removed.
* sysdeps/unix/common/getitimer.S: File removed.
* sysdeps/unix/common/getpgid.S: File removed.
* sysdeps/unix/common/getpriority.S: File removed.
* sysdeps/unix/common/getrlimit.S: File removed.
* sysdeps/unix/common/getrusage.S: File removed.
* sysdeps/unix/common/gettimeofday.S: File removed.
* sysdeps/unix/common/mkdir.S: File removed.
* sysdeps/unix/common/readlink.S: File removed.
* sysdeps/unix/common/rename.S: File removed.
* sysdeps/unix/common/rmdir.S: File removed.
* sysdeps/unix/common/select.S: File removed.
* sysdeps/unix/common/setgroups.S: File removed.
* sysdeps/unix/common/setitimer.S: File removed.
* sysdeps/unix/common/setpgid.S: File removed.
* sysdeps/unix/common/setpriority.S: File removed.
* sysdeps/unix/common/setregid.S: File removed.
* sysdeps/unix/common/setreuid.S: File removed.
* sysdeps/unix/common/setrlimit.S: File removed.
* sysdeps/unix/common/swapon.S: File removed.
* sysdeps/unix/common/symlink.S: File removed.
* sysdeps/unix/common/truncate.S: File removed.
* sysdeps/unix/common/vhangup.S: File removed.
* sysdeps/unix/inet/accept.S: File removed.
* sysdeps/unix/inet/bind.S: File removed.
* sysdeps/unix/inet/connect.S: File removed.
* sysdeps/unix/inet/gethostid.S: File removed.
* sysdeps/unix/inet/gethostname.S: File removed.
* sysdeps/unix/inet/getpeername.S: File removed.
* sysdeps/unix/inet/getsockname.S: File removed.
* sysdeps/unix/inet/getsockopt.S: File removed.
* sysdeps/unix/inet/listen.S: File removed.
* sysdeps/unix/inet/recv.S: File removed.
* sysdeps/unix/inet/recvfrom.S: File removed.
* sysdeps/unix/inet/recvmsg.S: File removed.
* sysdeps/unix/inet/send.S: File removed.
* sysdeps/unix/inet/sendmsg.S: File removed.
* sysdeps/unix/inet/sendto.S: File removed.
* sysdeps/unix/inet/sethostid.S: File removed.
* sysdeps/unix/inet/sethostname.S: File removed.
* sysdeps/unix/inet/setsockopt.S: File removed.
* sysdeps/unix/inet/shutdown.S: File removed.
* sysdeps/unix/inet/socket.S: File removed.
* sysdeps/unix/inet/socketpair.S: File removed.
* sysdeps/unix/mman/madvise.S: File removed.
* sysdeps/unix/mman/mmap.S: File removed.
* sysdeps/unix/mman/mprotect.S: File removed.
* sysdeps/unix/mman/msync.S: File removed.
* sysdeps/unix/mman/munmap.S: File removed.
* sysdeps/unix/sysv/alarm.S: File removed.
* sysdeps/unix/sysv/ftime.S: File removed.
* sysdeps/unix/sysv/nice.S: File removed.
* sysdeps/unix/sysv/pause.S: File removed.
* sysdeps/unix/sysv/poll.S: File removed.
* sysdeps/unix/sysv/s_getdents.S: File removed.
* sysdeps/unix/sysv/signal.S: File removed.
* sysdeps/unix/sysv/stime.S: File removed.
* sysdeps/unix/sysv/time.S: File removed.
* sysdeps/unix/sysv/times.S: File removed.
* sysdeps/unix/sysv/ulimit.S: File removed.
* sysdeps/unix/sysv/uname.S: File removed.
* sysdeps/unix/sysv/utime.S: File removed.
* sysdeps/unix/sysv/irix4/getpgid.S: File removed.
* sysdeps/unix/sysv/irix4/msync.S: File removed.
* sysdeps/unix/sysv/irix4/setpgid.S: File removed.
* sysdeps/unix/sysv/irix4/signal.S: File removed.
* sysdeps/unix/sysv/irix4/sysmp.S: File removed.
* sysdeps/unix/sysv/irix4/syssgi.S: File removed.
* sysdeps/unix/sysv/isc2.2/rename.S: File removed.
* sysdeps/unix/sysv/linux/adjtimex.S: File removed.
* sysdeps/unix/sysv/linux/fork.S: File removed.
* sysdeps/unix/sysv/linux/getpgid.S: File removed.
* sysdeps/unix/sysv/linux/getpgrp.S: File removed.
* sysdeps/unix/sysv/linux/getsid.S: File removed.
* sysdeps/unix/sysv/linux/gtty.S: File removed.
* sysdeps/unix/sysv/linux/mlock.S: File removed.
* sysdeps/unix/sysv/linux/mlockall.S: File removed.
* sysdeps/unix/sysv/linux/mount.S: File removed.
* sysdeps/unix/sysv/linux/munlock.S: File removed.
* sysdeps/unix/sysv/linux/munlockall.S: File removed.
* sysdeps/unix/sysv/linux/pipe.S: File removed.
* sysdeps/unix/sysv/linux/s_ptrace.S: File removed.
* sysdeps/unix/sysv/linux/setpgid.S: File removed.
* sysdeps/unix/sysv/linux/setsid.S: File removed.
* sysdeps/unix/sysv/linux/settimeofday.S: File removed.
* sysdeps/unix/sysv/linux/sigpending.S: File removed.
* sysdeps/unix/sysv/linux/stty.S: File removed.
* sysdeps/unix/sysv/linux/umount.S: File removed.
* sysdeps/unix/sysv/linux/wait4.S: File removed.
* sysdeps/unix/sysv/linux/i386/ipc.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/pathconf.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/pgrpsys.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/sigpending.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/sigprocmask.S: File removed.
* sysdeps/unix/sysv/sco3.2.4/sigsuspend.S: File removed.
* sysdeps/unix/sysv/sysv4/pgrpsys.S: File removed.
* sysdeps/unix/sysv/sysv4/sigprocmask.S: File removed.
* sysdeps/unix/sysv/sysv4/sigsuspend.S: File removed.
* sysdeps/unix/sysv/sysv4/sysconfig.S: File removed.
* sysdeps/unix/sysv/sysv4/sysinfo.S: File removed.
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S: File removed.
diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S
deleted file mode 100644
index be449b2..0000000
--- a/sysdeps/unix/bsd/hp/m68k/getdents.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/getdents.S>
diff --git a/sysdeps/unix/bsd/hp/m68k/syscalls.list b/sysdeps/unix/bsd/hp/m68k/syscalls.list
new file mode 100644
index 0000000..b9dca13
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+getdents - getdirentries 4 __getdirentries getdirentries
diff --git a/sysdeps/unix/bsd/osf/alpha/syscalls.list b/sysdeps/unix/bsd/osf/alpha/syscalls.list
new file mode 100644
index 0000000..ac88392
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+wait4 - wait4 4 __wait4 wait4
diff --git a/sysdeps/unix/bsd/osf/alpha/wait4.S b/sysdeps/unix/bsd/osf/alpha/wait4.S
deleted file mode 100644
index e4c3223..0000000
--- a/sysdeps/unix/bsd/osf/alpha/wait4.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/bsd/osf/msync.S b/sysdeps/unix/bsd/osf/msync.S
deleted file mode 100644
index 75b9f15..0000000
--- a/sysdeps/unix/bsd/osf/msync.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/sunos4/msync.S>
diff --git a/sysdeps/unix/bsd/osf/syscalls.list b/sysdeps/unix/bsd/osf/syscalls.list
new file mode 100644
index 0000000..731763b
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+msync - msync 3 msync
diff --git a/sysdeps/unix/bsd/sony/newsos4/fchdir.S b/sysdeps/unix/bsd/sony/newsos4/fchdir.S
deleted file mode 100644
index 6db7282..0000000
--- a/sysdeps/unix/bsd/sony/newsos4/fchdir.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/fchdir.S>
diff --git a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S
deleted file mode 100644
index 6a79710..0000000
--- a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/sunos4/sys_wait4.S>
diff --git a/sysdeps/unix/bsd/sony/newsos4/syscalls.list b/sysdeps/unix/bsd/sony/newsos4/syscalls.list
new file mode 100644
index 0000000..b90087f
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+sys_wait4 wait4 wait4 4 __wait4_syscall
diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S
deleted file mode 100644
index f283a5c..0000000
--- a/sysdeps/unix/bsd/sun/getdents.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (getdirentries, 4)
- ret
-
-weak_alias (__getdirentries, getdirentries)
diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
deleted file mode 100644
index f69c4b4..0000000
--- a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/hp/m68k/wait.S>
diff --git a/sysdeps/unix/bsd/sun/sunos4/msync.S b/sysdeps/unix/bsd/sun/sunos4/msync.S
deleted file mode 100644
index 9fb8955..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/msync.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL (msync, 3)
- ret
diff --git a/sysdeps/unix/bsd/sun/sunos4/poll.S b/sysdeps/unix/bsd/sun/sunos4/poll.S
deleted file mode 100644
index 95c4fd2..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/poll.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/poll.S>
diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S
deleted file mode 100644
index 4930c56..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/setsid.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S
deleted file mode 100644
index 61fe877..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__mmap_syscall, mmap, 5)
- ret
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
deleted file mode 100644
index 6b796b7..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__wait4_syscall, wait4, 4)
- ret
diff --git a/sysdeps/unix/bsd/sun/sunos4/syscalls.list b/sysdeps/unix/bsd/sun/sunos4/syscalls.list
new file mode 100644
index 0000000..7dafdf7
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/syscalls.list
@@ -0,0 +1,8 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+msync - msync 3 msync
+poll - poll 3 poll
+setsid - setsid 0 __setsid setsid
+sys_mmap mmap mmap 5 __mmap_syscall
+sys_wait4 wait4 wait4 4 __wait4_syscall
+uname - uname 1 uname
diff --git a/sysdeps/unix/bsd/sun/sunos4/uname.S b/sysdeps/unix/bsd/sun/sunos4/uname.S
deleted file mode 100644
index 488eeb1..0000000
--- a/sysdeps/unix/bsd/sun/sunos4/uname.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/uname.S>
diff --git a/sysdeps/unix/bsd/sun/syscalls.list b/sysdeps/unix/bsd/sun/syscalls.list
new file mode 100644
index 0000000..b9dca13
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+getdents - getdirentries 4 __getdirentries getdirentries
diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S
deleted file mode 100644
index be449b2..0000000
--- a/sysdeps/unix/bsd/ultrix4/getdents.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/getdents.S>
diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S
deleted file mode 100644
index 4930c56..0000000
--- a/sysdeps/unix/bsd/ultrix4/setsid.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/bsd/ultrix4/syscalls.list b/sysdeps/unix/bsd/ultrix4/syscalls.list
new file mode 100644
index 0000000..dd1052a
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/syscalls.list
@@ -0,0 +1,5 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+getdents - getdirentries 4 __getdirentries getdirentries
+setsid - setsid 0 __setsid setsid
+uname - uname 1 uname
diff --git a/sysdeps/unix/bsd/ultrix4/uname.S b/sysdeps/unix/bsd/ultrix4/uname.S
deleted file mode 100644
index 488eeb1..0000000
--- a/sysdeps/unix/bsd/ultrix4/uname.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/uname.S>
diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S
deleted file mode 100644
index fbef7a2..0000000
--- a/sysdeps/unix/sysv/irix4/getpgid.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__getpgid, bsdgetpgrp, 1)
- ret
-
-weak_alias (__getpgid, getpgid)
diff --git a/sysdeps/unix/sysv/irix4/msync.S b/sysdeps/unix/sysv/irix4/msync.S
deleted file mode 100644
index 75b9f15..0000000
--- a/sysdeps/unix/sysv/irix4/msync.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/sun/sunos4/msync.S>
diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S
deleted file mode 100644
index 9267054..0000000
--- a/sysdeps/unix/sysv/irix4/setpgid.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__setpgid, bsdsetpgrp, 2)
- ret
-
-weak_alias (__setpgid, setpgid)
-weak_alias (__setpgid, setpgrp)
diff --git a/sysdeps/unix/sysv/irix4/signal.S b/sysdeps/unix/sysv/irix4/signal.S
deleted file mode 100644
index b0c147d..0000000
--- a/sysdeps/unix/sysv/irix4/signal.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__raw_signal, signal, 3)
- ret
diff --git a/sysdeps/unix/sysv/irix4/syscalls.list b/sysdeps/unix/sysv/irix4/syscalls.list
new file mode 100644
index 0000000..47e1c48
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/syscalls.list
@@ -0,0 +1,8 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+getpgid - bsdgetpgrp 1 __getpgid getpgid
+msync - msync 3 msync
+setpgid - bsdsetpgrp 2 __setpgid setpgid setpgrp
+signal - signal 3 __raw_signal
+sysmp - sysmp 4 __sysmp
+syssgi - syssgi 2 __syssgi
diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S
deleted file mode 100644
index 438da60..0000000
--- a/sysdeps/unix/sysv/irix4/sysmp.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (sysmp, 4)
- ret
diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S
deleted file mode 100644
index 2715d28..0000000
--- a/sysdeps/unix/sysv/irix4/syssgi.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (syssgi, 2)
- ret
diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S
deleted file mode 100644
index a4b2c42..0000000
--- a/sysdeps/unix/sysv/isc2.2/rename.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/common/rename.S>
diff --git a/sysdeps/unix/sysv/isc2.2/syscalls.list b/sysdeps/unix/sysv/isc2.2/syscalls.list
new file mode 100644
index 0000000..0ea253e
--- /dev/null
+++ b/sysdeps/unix/sysv/isc2.2/syscalls.list
@@ -0,0 +1,2 @@
+# File name Caller Syscall name # args Strong name Weak names
+
diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S
deleted file mode 100644
index 1c4dd95..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/pathconf.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (pathconf, 2)
- ret
-
-weak_alias (__pathconf, pathconf)
diff --git a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S
deleted file mode 100644
index 2c7d994..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/sysv4/pgrpsys.S>
diff --git a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S
deleted file mode 100644
index e68c300..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__sco_getgroups, getgroups, 2)
- ret
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigpending.S b/sysdeps/unix/sysv/sco3.2.4/sigpending.S
deleted file mode 100644
index bc05b2e..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/sigpending.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL (sigpending, 1)
- ret
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
deleted file mode 100644
index ff19915..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (sigprocmask, 3)
- ret
-
-weak_alias (__sigprocmask, sigprocmask)
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S
deleted file mode 100644
index 9bce387..0000000
--- a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/sysv4/sigsuspend.S>
diff --git a/sysdeps/unix/sysv/sco3.2.4/syscalls.list b/sysdeps/unix/sysv/sco3.2.4/syscalls.list
new file mode 100644
index 0000000..bda6c16
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/syscalls.list
@@ -0,0 +1,8 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+pathconf - pathconf 2 __pathconf pathconf
+pgrpsys - pgrpsys 3 __pgrpsys
+sco_getgrp getgroups getgroups 2 __sco_getgroups
+sigpending - sigpending 1 sigpending
+sigprocmask - sigprocmask 3 __sigprocmask sigprocmask
+sigsuspend - sigsuspend 1 sigsuspend
diff --git a/sysdeps/unix/sysv/sysv4/i386/syscalls.list b/sysdeps/unix/sysv/sysv4/i386/syscalls.list
new file mode 100644
index 0000000..560cd83
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/syscalls.list
@@ -0,0 +1,6 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+xstat - xstat 3 __xstat _xstat
+fxstat - fxstat 3 __fxstat _fxstat
+lxstat - lxstat 3 __lxstat _lxstat
+xmknod - xmknod 4 __xmknod _xmknod
diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S
deleted file mode 100644
index dcfb487..0000000
--- a/sysdeps/unix/sysv/sysv4/pgrpsys.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (pgrpsys, 3)
- ret
diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S
deleted file mode 100644
index 51fddb0..0000000
--- a/sysdeps/unix/sysv/sysv4/sigprocmask.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (sigprocmask, 3)
- ret
-
-weak_alias (__sigprocmask, sigprocmask)
diff --git a/sysdeps/unix/sysv/sysv4/sigsuspend.S b/sysdeps/unix/sysv/sysv4/sigsuspend.S
deleted file mode 100644
index 85d3601..0000000
--- a/sysdeps/unix/sysv/sysv4/sigsuspend.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL (sigsuspend, 1)
- ret
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S
deleted file mode 100644
index 8baa997..0000000
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__sigaction_syscall, sigaction, 3)
- ret
-
-PSEUDO (__context_syscall, context, 2)
- ret
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list b/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list
new file mode 100644
index 0000000..d96fbba
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/syscalls.list
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+sys-sig - context 2 __context_syscall
diff --git a/sysdeps/unix/sysv/sysv4/syscalls.list b/sysdeps/unix/sysv/sysv4/syscalls.list
new file mode 100644
index 0000000..2919bcc
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/syscalls.list
@@ -0,0 +1,7 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+pgrpsys - pgrpsys 3 __pgrpsys
+sigprocmask - sigprocmask 3 __sigprocmask sigprocmask
+sigsuspend - sigsuspend 1 sigsuspend
+sysconfig - sysconfig 1 __sysconfig
+sysinfo - systeminfo 3 __sysinfo
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.S b/sysdeps/unix/sysv/sysv4/sysconfig.S
deleted file mode 100644
index 034e012..0000000
--- a/sysdeps/unix/sysv/sysv4/sysconfig.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (sysconfig, 1)
- ret
diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S
deleted file mode 100644
index c279c96..0000000
--- a/sysdeps/unix/sysv/sysv4/sysinfo.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-PSEUDO (__sysinfo, systeminfo, 3)
- ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db8f417b654e942b8fa7f65f4138e4b15cb7696c
commit db8f417b654e942b8fa7f65f4138e4b15cb7696c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 18 00:47:59 1996 +0000
(_STAT_VER, _MKNOD_VER): New macros.
diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
index 6f1bfed..ada49ce 100644
--- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h
+++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,11 @@ Cambridge, MA 02139, USA. */
#include <gnu/types.h>
+/* Versions of the `struct stat' data structure and
+ the bits of the `xmknod' interface. */
+#define _STAT_VER 2
+#define _MKNOD_VER 2
+
/* Structure describing file characteristics. */
struct stat
{
@@ -35,7 +40,7 @@ struct stat
long st_filler2[2];
long st_size; /* Size of file, in bytes. */
- /* SVR4 added this extra long to allow for expansion of off_t. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
long st_filler3;
long st_atime; /* Time of last access. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a877eaec38b3b9bff5ce6e86ba22f226cd0f26d
commit 6a877eaec38b3b9bff5ce6e86ba22f226cd0f26d
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 18 00:32:06 1996 +0000
Wed Jan 17 11:04:58 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* io/sys/stat.h (_STAT_VER, _MKNOD_VER): New macros.
(__xstat, __fxstat, __lxstat, __xmknod): Declare new functions.
[__GNUC__] (stat, fstat, lstat, mknod): Define these (and __ names)
as `extern inline's calling the `x' functions.
* sysdeps/generic/lstat.c: File removed.
* sysdeps/generic/lxstat.c: New file.
* sysdeps/mach/hurd/fstat.c: File removed.
* sysdeps/mach/hurd/fxstat.c: New file.
* sysdeps/mach/hurd/lstat.c: File removed.
* sysdeps/mach/hurd/lxstat.c: New file.
* sysdeps/mach/hurd/mknod.c: File removed.
* sysdeps/mach/hurd/stat.c: File removed.
* sysdeps/mach/hurd/xmknod.c: New file.
* sysdeps/mach/hurd/xstat.c: New file.
* sysdeps/stub/fstat.c: File removed.
* sysdeps/stub/fxstat.c: New file.
* sysdeps/stub/lstat.c: File removed.
* sysdeps/stub/lxstat.c: New file.
* sysdeps/stub/mknod.c: File removed.
* sysdeps/stub/stat.c: File removed.
* sysdeps/stub/xmknod.c: New file.
* sysdeps/stub/xstat.c: New file.
* sysdeps/unix/common/lstat.S: File removed.
* sysdeps/unix/common/lxstat.c: New file.
* sysdeps/unix/fstat.S: File removed.
* sysdeps/unix/fxstat.c: New file.
* sysdeps/unix/mknod.S: File removed.
* sysdeps/unix/stat.S: File removed.
* sysdeps/unix/sysv/linux/fstat.c: File removed.
* sysdeps/unix/sysv/linux/i386/fxstat.S: File removed.
* sysdeps/unix/sysv/linux/i386/lxstat.S: File removed.
* sysdeps/unix/sysv/linux/i386/xmknod.S: File removed.
* sysdeps/unix/sysv/linux/i386/xstat.S: File removed.
* sysdeps/unix/sysv/linux/lstat.c: File removed.
* sysdeps/unix/sysv/linux/mknod.c: File removed.
* sysdeps/unix/sysv/linux/stat.c: File removed.
* sysdeps/unix/sysv/sysv4/i386/fstat.S: File removed.
* sysdeps/unix/sysv/sysv4/i386/lstat.S: File removed.
* sysdeps/unix/sysv/sysv4/i386/mknod.S: File removed.
* sysdeps/unix/sysv/sysv4/i386/stat.S: File removed.
* sysdeps/unix/xmknod.c: New file.
* sysdeps/unix/xstat.c: New file.
* sysdeps/unix/mkfifo.c: Use __xmknod instead of __mknod.
* misc/Makefile (routines): Remove mknod.
diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S
deleted file mode 100644
index 11743b3..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/fstat.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* In SVR4 the `stat' call is actually done by the `xstat' system call,
- which takes an additional first argument giving a version number for
- `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
- `lxstat' system calls. This macro gives the SVR4 version number that
- corresponds to the definition of `struct stat' in <statbuf.h>. */
-#define _STAT_VER 2
-
-.globl syscall_error
-ENTRY (__fstat)
- popl %eax /* Pop return address into %eax. */
- pushl $_STAT_VER /* Push extra first arg to syscall. */
- pushl %eax /* Push back the return address. */
- DO_CALL (fxstat, 3) /* Do the syscall. */
- jb syscall_error /* Check for error. */
- ret /* Return success. */
-
-weak_alias (__fstat, fstat)
diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S
deleted file mode 100644
index 52ffdba..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/lstat.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* In SVR4 the `stat' call is actually done by the `xstat' system call,
- which takes an additional first argument giving a version number for
- `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
- `lxstat' system calls. This macro gives the SVR4 version number that
- corresponds to the definition of `struct stat' in <statbuf.h>. */
-#define _STAT_VER 2
-
-.globl syscall_error
-ENTRY (__lstat)
- popl %eax /* Pop return address into %eax. */
- pushl $_STAT_VER /* Push extra first arg to syscall. */
- pushl %eax /* Push back the return address. */
- DO_CALL (lxstat, 3) /* Do the syscall. */
- jb syscall_error /* Check for error. */
- ret /* Return success. */
-
-weak_alias (__lstat, lstat)
diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S
deleted file mode 100644
index 21f932c..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/mknod.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* In SVR4 the `mknod' call is actually done by the `xmknod' system call,
- which takes an additional first argument giving a version number for
- the interface. This macro gives the SVR4 version number that
- corresponds to the modern interface. */
-#define _MKNOD_VER 2
-
-.globl syscall_error
-ENTRY (__mknod)
- popl %eax /* Pop return address into %eax. */
- pushl $_MKNOD_VER /* Push extra first arg to syscall. */
- pushl %eax /* Push back the return address. */
- DO_CALL (xmknod, 3) /* Do the syscall. */
- jb syscall_error /* Check for error. */
- ret /* Return success. */
-
-weak_alias (__mknod, mknod)
diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S
deleted file mode 100644
index 3a5107c..0000000
--- a/sysdeps/unix/sysv/sysv4/i386/stat.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-/* In SVR4 the `stat' call is actually done by the `xstat' system call,
- which takes an additional first argument giving a version number for
- `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
- `lxstat' system calls. This macro gives the SVR4 version number that
- corresponds to the definition of `struct stat' in <statbuf.h>. */
-#define _STAT_VER 2
-
-.globl syscall_error
-ENTRY (__stat)
- popl %eax /* Pop return address into %eax. */
- pushl $_STAT_VER /* Push extra first arg to syscall. */
- pushl %eax /* Push back the return address. */
- DO_CALL (xstat, 3) /* Do the syscall. */
- jb syscall_error /* Check for error. */
- ret /* Return success. */
-
-weak_alias (__stat, stat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39a7d65249b333904ffac088172d8c8e9091d49b
commit 39a7d65249b333904ffac088172d8c8e9091d49b
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 17 17:13:22 1996 +0000
Sun Jan 14 01:01:10 1996 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
* sysdeps/mips/bytesex.h: Add default byte sex. By Ralf Baechle.
* sysdeps/unix/sysv/linux/adjtime.c [! MOD_OFFSET]: Use `mode'
member of `struct timex' instead of `modes'. From Andreas Schwab.
* sysdeps/unix/sysv/linux/mknod.c: New file. Generic C version.
* sysdeps/unix/sysv/linux/i386/mknod.S: Remove assembler version.
* sysdeps/unix/sysv/linux/Makefile (inhibit-glue): New variable.
[$(subdir) = misc] (sysdep_routines): Add mount, umount, and s_ptrace.
[$(subdir) = misc] (headers): Append sys/mount.h.
* sysdeps/unix/sysv/linux/mount.S, sysdeps/unix/sysv/linux/umount.S:
New files. Implement system calls.
* sysdeps/unix/sysv/linux/sys/mount.h: New header file.
* sysdeps/unix/sysv/linux/ptrace.c: New file. Wrapper around
ptrace system call.
* sysdeps/unix/sysv/linux/s_ptrace.S: New file: ptrace system call.
* sysdeps/unix/sysv/linux/i386/gnu/types.h: New file with correct
types for i386/Linux.
diff --git a/sysdeps/mips/bytesex.h b/sysdeps/mips/bytesex.h
new file mode 100644
index 0000000..ba555cd
--- /dev/null
+++ b/sysdeps/mips/bytesex.h
@@ -0,0 +1,4 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using big-endian mode. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ec5264327918c74d4997450b33ac0e566c96ea46
commit ec5264327918c74d4997450b33ac0e566c96ea46
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 17 16:17:48 1996 +0000
Wed Jan 17 11:04:58 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* sysdeps/unix/sysv/time.S: Moved from sysv4.
* sysdeps/unix/sysv/irix4/time.S: File removed.
* sysdeps/unix/sysv/linux/signum.h: Moved from
sysdeps/unix/sysv/linux/i386.
(_NSIG): Move inside #ifdef _SIGNAL_H.
diff --git a/sysdeps/unix/sysv/irix4/time.S b/sysdeps/unix/sysv/irix4/time.S
deleted file mode 100644
index 23bfe5d..0000000
--- a/sysdeps/unix/sysv/irix4/time.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/sysv4/time.S>
diff --git a/sysdeps/unix/sysv/sysv4/time.S b/sysdeps/unix/sysv/sysv4/time.S
deleted file mode 100644
index 61f3514..0000000
--- a/sysdeps/unix/sysv/sysv4/time.S
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL (time, 1)
- ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=558e7e0f601bcae5d3d673d2108ea3e632920010
commit 558e7e0f601bcae5d3d673d2108ea3e632920010
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 17 02:31:44 1996 +0000
(crypt): Don't define if building a shared library.
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index ea0c7d5..12e9b56 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,10 @@
# way to choose a sysdep file based on MIT vs Motorola syntax.
# No existing m68k ports use Motorola syntax.
-crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
+# Don't use crypt/crypt.sun3.S. It's not pic-clean.
+ifneq (yes,$(build-shared))
+crypt := crypt.sun3
+endif
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
@@ -29,4 +32,4 @@ ifndef m68k-syntax-flag
m68k-syntax-flag = -DMIT_SYNTAX
endif
-asm-CPPFLAGS := $(asm-CPPFLAGS) $(m68k-syntax-flag)
+asm-CPPFLAGS += $(m68k-syntax-flag)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69c85398dbe8f5d134248c01133958a253405cd3
commit 69c85398dbe8f5d134248c01133958a253405cd3
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 17 02:02:35 1996 +0000
Sun Jan 14 17:51:09 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* misc/efgcvt_r.c (ecvt_r): Handle negative values.
* stdlib/stdlib.h: Replace __CONSTVALUE by attribute.
* stdlib/abs.c, stdlib/div.c, stdlib/labs.c, stdlib/ldiv.c,
sysdeps/generic/hypot.c: Remove obsolete __CONSTVALUE.
* stdio-common/printf_fp.c (__printf_fp): Fix parameter
declaration.
* sysdeps/generic/putenv.c (putenv): Fix second argument of
setenv.
* sysdeps/ieee754/hypot.c: New file, extracted out of cabs.c.
* sysdeps/ieee754/cabs.c: Don't define hypot here.
* sysdeps/ieee754/ieee754.h (union ieee854_long_double): Fix
definition of ieee_nan alternative.
* sysdeps/m68k/__longjmp.c, sysdeps/m68k/setjmp.c: Add register
prefix spec.
* sysdeps/m68k/ffs.c (ffs): Fix register constraint.
* sysdeps/m68k/fpu/__math.h: Include <errno.h>. Replace obsolete
__CONSTVALUE by attribute.
(floor): Round to negative infinity.
(rint, expm1) [__NO_MATH_INLINES]: Don't define, to avoid type
clash when compiling source.
(pow): Handle x == 0 and x < 0.
(ceil, __isinf, __isnan): Fix register constraints.
(__isinfl, __isnanl): Added.
* sysdeps/m68k/fpu/acos.c, sysdeps/m68k/fpu/atan2.c,
sysdeps/m68k/fpu/fmod.c, sysdeps/m68k/fpu/ldexp.c,
sysdeps/m68k/fpu/pow.c: Remove obsolete __CONSTVALUE.
* sysdeps/m68k/bsd-_setjmp.S, sysdeps/m68k/bsd-setjmp.S: Fix
assembler syntax.
* sysdeps/unix/bsd/bsd4.4/fchdir.S (fchdir): Take only one
argument.
* sysdeps/unix/bsd/clock.c (timeval_to_clock_t): Fix timeval to
clock_t conversion.
(clock): Don't multiply by CLOCKS_PER_SEC.
* sysdeps/unix/bsd/poll.c (poll): Fix msec to timeval conversion.
* sysdeps/unix/bsd/sun/m68k/brk.S (brk): Compare with address of
__end.
* sysdeps/unix/bsd/sun/m68k/vfork.S: Fix assembler syntax.
* sysdeps/unix/bsd/ualarm.c (ualarm): Fix timeval calculation.
* sysdeps/unix/bsd/vax/vfork.S: Remove duplicate label.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 4fc6108..92dd803 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -29,22 +29,21 @@ __longjmp (__jmp_buf env, int val)
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Restore the floating-point registers. */
- asm volatile("fmovem%.x %0, fp0-fp7" :
- /* No outputs. */ : "g" (env[0].__fpregs[0]) :
- "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7");
+ asm volatile("fmovem%.x %0, %/fp0-%/fp7" :
+ /* No outputs. */ : "g" (env[0].__fpregs[0]));
#endif
/* Put VAL in D0. */
- asm volatile("move%.l %0, d0" : /* No outputs. */ :
+ asm volatile("move%.l %0, %/d0" : /* No outputs. */ :
"g" (val == 0 ? 1 : val) : "d0");
asm volatile(/* Restore the data and address registers. */
- "movem%.l %0, d1-d7/a0-a7\n"
+ "movem%.l %0, %/d1-%/d7/%/a0-%/a7\n"
/* Return to setjmp's caller. */
#ifdef __motorola__
- "jmp (a0)"
+ "jmp (%/a0)"
#else
- "jmp a0@"
+ "jmp %/a0@"
#endif
: /* No outputs. */ : "g" (env[0].__dregs[0])
/* We don't bother with the clobbers,
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index a0b6393..69aa7de 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -26,17 +26,23 @@ Cambridge, MA 02139, USA. */
#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
-#define PUSH(reg) move.l reg, -(%esp)
-#define POP(reg) move.l (%esp)+, reg
+#define PUSH(reg) move.l reg, -(%sp)
+#define POP(reg) move.l (%sp)+, reg
+#define PUSH0 clr.l -(%sp)
#else
#define PUSH(reg) movel reg, sp@-
#define POP(reg) movel sp@+, reg
+#define PUSH0 clrl sp@-
#endif
ENTRY (_setjmp)
POP (d0) /* Pop return PC. */
POP (d1) /* Pop jmp_buf argument. */
- PUSH (#0) /* Push second argument of zero. */
+ PUSH0 /* Push second argument of zero. */
PUSH (d1) /* Push back first argument. */
PUSH (d0) /* Push back return PC. */
+#ifdef PIC
+ bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC)
+#else
jmp C_SYMBOL_NAME (__sigsetjmp)
+#endif
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index d218b44..c853516 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -26,8 +26,8 @@ Cambridge, MA 02139, USA. */
#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
-#define PUSH(reg) move.l reg, -(%esp)
-#define POP(reg) move.l (%esp)+, reg
+#define PUSH(reg) move.l reg, -(%sp)
+#define POP(reg) move.l (%sp)+, reg
#else
#define PUSH(reg) movel reg, sp@-
#define POP(reg) movel sp@+, reg
@@ -36,7 +36,11 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
POP (d0) /* Pop return PC. */
POP (d1) /* Pop jmp_buf argument. */
- PUSH (#1) /* Push second argument of one. */
+ pea 1 /* Push second argument of one. */
PUSH (d1) /* Push back first argument. */
PUSH (d0) /* Push back return PC. */
+#ifdef PIC
+ bra.l C_SYMBOL_NAME (__sigsetjmp@PLTPC)
+#else
jmp C_SYMBOL_NAME (__sigsetjmp)
+#endif
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index d9ec2b1..9de7cf3 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -30,7 +30,7 @@ DEFUN(ffs, (x), int x)
{
int cnt;
- asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "rm" (x & -x));
+ asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "dm" (x & -x));
return 32 - cnt;
}
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index a9ae2d9..e357364 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
#include <sys/cdefs.h>
+#define __need_Emath
+#include <errno.h>
#ifdef __NO_MATH_INLINES
/* This is used when defining the functions themselves. Define them with
@@ -28,12 +30,14 @@ Cambridge, MA 02139, USA. */
#define __m81_inline static __inline
#else
#define __m81_u(x) x
-#define __m81_inline exter __inline
+#define __m81_inline extern __inline
#define __MATH_INLINES 1
#endif
#define __inline_mathop2(func, op) \
- __m81_inline __CONSTVALUE double \
+ __m81_inline double \
+ __m81_u(func)(double __mathop_x) __attribute__((__const__)); \
+ __m81_inline double \
__m81_u(func)(double __mathop_x) \
{ \
double __result; \
@@ -55,20 +59,23 @@ __inline_mathop2(exp, etox)
__inline_mathop2(fabs, abs)
__inline_mathop(log10)
__inline_mathop2(log, logn)
-__inline_mathop2(floor, intrz)
__inline_mathop(sqrt)
__inline_mathop2(__rint, int)
__inline_mathop2(__expm1, etoxm1)
#ifdef __USE_MISC
+#ifndef __NO_MATH_INLINES
__inline_mathop2(rint, int)
__inline_mathop2(expm1, etoxm1)
+#endif
__inline_mathop2(log1p, lognp1)
__inline_mathop(atanh)
#endif
-__m81_inline __CONSTVALUE double
+__m81_inline double
+__m81_u(__drem)(double __x, double __y) __attribute__ ((__const__));
+__m81_inline double
__m81_u(__drem)(double __x, double __y)
{
double __result;
@@ -76,7 +83,9 @@ __m81_u(__drem)(double __x, double __y)
return __result;
}
-__m81_inline __CONSTVALUE double
+__m81_inline double
+__m81_u(ldexp)(double __x, int __e) __attribute__ ((__const__));
+__m81_inline double
__m81_u(ldexp)(double __x, int __e)
{
double __result;
@@ -85,7 +94,9 @@ __m81_u(ldexp)(double __x, int __e)
return __result;
}
-__m81_inline __CONSTVALUE double
+__m81_inline double
+__m81_u(fmod)(double __x, double __y) __attribute__ ((__const__));
+__m81_inline double
__m81_u(fmod)(double __x, double __y)
{
double __result;
@@ -103,11 +114,39 @@ __m81_u(frexp)(double __value, int *__expptr)
return __mantissa;
}
-__m81_inline __CONSTVALUE double
+__m81_inline double
+__m81_u(floor)(double __x) __attribute__ ((__const__));
+__m81_inline double
+__m81_u(floor)(double __x)
+{
+ double __result;
+ unsigned long int __ctrl_reg;
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
+ /* Set rounding towards negative infinity. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" ((__ctrl_reg & ~0x10) | 0x20));
+ /* Convert X to an integer, using -Inf rounding. */
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
+ return __result;
+}
+
+__m81_inline double
+__m81_u(pow)(double __x, double __y) __attribute__ ((__const__));
+__m81_inline double
__m81_u(pow)(double __x, double __y)
{
double __result;
- if (__y == 0.0 || __x == 1.0)
+ if (__x == 0.0)
+ {
+ if (__y <= 0.0)
+ __result = __infnan (EDOM);
+ else
+ __result = 0.0;
+ }
+ else if (__y == 0.0 || __x == 1.0)
__result = 1.0;
else if (__y == 1.0)
__result = __x;
@@ -117,23 +156,40 @@ __m81_u(pow)(double __x, double __y)
__asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
else if (__x == 2.0)
__asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x < 0.0)
+ {
+ double __temp = __m81_u (__rint) (__y);
+ if (__y == __temp)
+ {
+ int i = (int) __y;
+ __result = __m81_u (exp) (__y * __m81_u (log) (-__x));
+ if (i & 1)
+ __result = -__result;
+ }
+ else
+ __result = __infnan (EDOM);
+ }
else
__result = __m81_u(exp)(__y * __m81_u(log)(__x));
return __result;
}
-__m81_inline __CONSTVALUE double
+__m81_inline double
+__m81_u(ceil)(double __x) __attribute__ ((__const__));
+__m81_inline double
__m81_u(ceil)(double __x)
{
double __result;
unsigned long int __ctrl_reg;
- __asm("fmove%.l fpcr, %0" : "=g" (__ctrl_reg));
+ __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg));
/* Set rounding towards positive infinity. */
- __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg | 0x30));
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg | 0x30));
/* Convert X to an integer, using +Inf rounding. */
- __asm("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
/* Restore the previous rounding mode. */
- __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg));
+ __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */
+ : "dmi" (__ctrl_reg));
return __result;
}
@@ -145,23 +201,51 @@ __m81_u(modf)(double __value, double *__iptr)
return __value - __modf_int;
}
-__m81_inline __CONSTVALUE int
+__m81_inline int
+__m81_u(__isinf)(double __value) __attribute__ ((__const__));
+__m81_inline int
__m81_u(__isinf)(double __value)
{
/* There is no branch-condition for infinity,
so we must extract and examine the condition codes manually. */
unsigned long int __fpsr;
__asm("ftst%.x %1\n"
- "fmove%.l fpsr, %0" : "=g" (__fpsr) : "f" (__value));
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
}
-__m81_inline __CONSTVALUE int
+__m81_inline int
+__m81_u(__isnan)(double __value) __attribute__ ((__const__));
+__m81_inline int
__m81_u(__isnan)(double __value)
{
char __result;
__asm("ftst%.x %1\n"
- "fsun %0" : "=g" (__result) : "f" (__value));
+ "fsun %0" : "=dm" (__result) : "f" (__value));
+ return __result;
+}
+
+__m81_inline int
+__m81_u(__isinfl)(long double __value) __attribute__ ((__const__));
+__m81_inline int
+__m81_u(__isinfl)(long double __value)
+{
+ /* There is no branch-condition for infinity,
+ so we must extract and examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm("ftst%.x %1\n"
+ "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value));
+ return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
+}
+
+__m81_inline int
+__m81_u(__isnanl)(long double __value) __attribute__ ((__const__));
+__m81_inline int
+__m81_u(__isnanl)(long double __value)
+{
+ char __result;
+ __asm("ftst%.x %1\n"
+ "fsun %0" : "=dm" (__result) : "f" (__value));
return __result;
}
diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c
index d4be88f..1481ce2 100644
--- a/sysdeps/m68k/fpu/acos.c
+++ b/sysdeps/m68k/fpu/acos.c
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
#endif
-__CONSTVALUE double
+double
DEFUN(FUNC, (x), double x)
{
return __m81_u(FUNC)(x);
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
index 1efdb1f..753b7f0 100644
--- a/sysdeps/m68k/fpu/atan2.c
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
-__CONSTVALUE double
+double
DEFUN(atan2, (y, x), double y AND double x)
{
static CONST double one = 1.0, zero = 0.0;
diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c
index 9a6c8cd..e3a2de0 100644
--- a/sysdeps/m68k/fpu/fmod.c
+++ b/sysdeps/m68k/fpu/fmod.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-__CONSTVALUE double
+double
DEFUN(fmod, (x, y), double x AND double y)
{
return __fmod(x, y);
diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c
index ba91280..7e34882 100644
--- a/sysdeps/m68k/fpu/ldexp.c
+++ b/sysdeps/m68k/fpu/ldexp.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-__CONSTVALUE double
+double
DEFUN(ldexp, (x, exp), double x AND int exp)
{
return __ldexp(x, exp);
diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c
index 3360020..5ace4da 100644
--- a/sysdeps/m68k/fpu/pow.c
+++ b/sysdeps/m68k/fpu/pow.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-__CONSTVALUE double
+double
DEFUN(pow, (x, y), double x AND double y)
{
return __pow(x, y);
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 853977e..95c723c 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -23,13 +23,15 @@ int
__sigsetjmp (jmp_buf env, int savemask)
{
/* Save data registers D1 through D7. */
- asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0]));
+ asm volatile ("movem%.l %/d1-%/d7, %0"
+ : : "m" (env[0].__jmpbuf[0].__dregs[0]));
/* Save return address in place of register A0. */
env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
/* Save address registers A1 through A5. */
- asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1]));
+ asm volatile ("movem%.l %/a1-%/a5, %0"
+ : : "m" (env[0].__jmpbuf[0].__aregs[1]));
/* Save caller's FP, not our own. */
env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
@@ -39,7 +41,7 @@ __sigsetjmp (jmp_buf env, int savemask)
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Save floating-point (68881) registers FP0 through FP7. */
- asm volatile ("fmovem%.x fp0-fp7, %0"
+ asm volatile ("fmovem%.x %/fp0-%/fp7, %0"
: : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 114fa73..462910a 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -33,7 +33,7 @@ ___curbrk:
.text
ENTRY (__brk)
- movel __end, d0
+ movel #__end, d0
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
index cb7dae8..63d2a09 100644
--- a/sysdeps/unix/bsd/sun/m68k/vfork.S
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -41,7 +41,7 @@ ___vfork:
bits set) for the parent, and 0 (no bits set) for the child.
Then AND it with D0, so the parent gets D0&-1==R0, and the child
gets D0&0==0. */
- decl d1
+ subql #1, d1
andl d1, d0
/* Jump to the return PC. */
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
index daf8f0f..96f27ea 100644
--- a/sysdeps/unix/bsd/vax/vfork.S
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -27,7 +27,6 @@ Cambridge, MA 02139, USA. */
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
.globl ___vfork
-error: jmp syscall_error
___vfork:
.word 0
/* Save our return address in R2, and return to code below. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2b30df178565f0400ab69962eaf4743b891aa229
commit 2b30df178565f0400ab69962eaf4743b891aa229
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 4 18:37:48 1995 +0000
Updated from ../=mpn/gmp-1.910
diff --git a/sysdeps/m68k/add_n.S b/sysdeps/m68k/add_n.S
new file mode 100644
index 0000000..ea7a445
--- /dev/null
+++ b/sysdeps/m68k/add_n.S
@@ -0,0 +1,76 @@
+/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+ sum in a third limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ s2_ptr (sp + 16)
+ size (sp + 12)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_add_n
+
+LAB(___mpn_add_n)
+/* Save used registers on the stack. */
+ INSN2(move,l ,MEM_PREDEC(sp),d2)
+ INSN2(move,l ,MEM_PREDEC(sp),a2)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,a2,MEM_DISP(sp,12))
+ INSN2(move,l ,a0,MEM_DISP(sp,16))
+ INSN2(move,l ,a1,MEM_DISP(sp,20))
+ INSN2(move,l ,d2,MEM_DISP(sp,24))
+
+ INSN2(eor,w ,d2,#1)
+ INSN2(lsr,l ,d2,#1)
+ bcc L1
+ INSN2(subq,l ,d2,#1) /* clears cy as side effect */
+
+LAB(Loop)
+ INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(addx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(addx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+
+ dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
+ INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ INSN2(sub,l ,d2,#0x10000)
+ bcs L2
+ INSN2(add,l ,d0,d0) /* restore cy */
+ bra Loop
+
+LAB(L2)
+ INSN1(neg,l ,d0)
+
+/* Restore used registers from stack frame. */
+ INSN2(move,l ,a2,MEM_POSTINC(sp))
+ INSN2(move,l ,d2,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m68k/sub_n.S b/sysdeps/m68k/sub_n.S
new file mode 100644
index 0000000..19f0ec1
--- /dev/null
+++ b/sysdeps/m68k/sub_n.S
@@ -0,0 +1,76 @@
+/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ store difference in a third limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ s2_ptr (sp + 16)
+ size (sp + 12)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_sub_n
+
+LAB(___mpn_sub_n)
+/* Save used registers on the stack. */
+ INSN2(move,l ,MEM_PREDEC(sp),d2)
+ INSN2(move,l ,MEM_PREDEC(sp),a2)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,a2,MEM_DISP(sp,12))
+ INSN2(move,l ,a0,MEM_DISP(sp,16))
+ INSN2(move,l ,a1,MEM_DISP(sp,20))
+ INSN2(move,l ,d2,MEM_DISP(sp,24))
+
+ INSN2(eor,w ,d2,#1)
+ INSN2(lsr,l ,d2,#1)
+ bcc L1
+ INSN2(subq,l ,d2,#1) /* clears cy as side effect */
+
+LAB(Loop)
+ INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(subx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(subx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+
+ dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
+ INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ INSN2(sub,l ,d2,#0x10000)
+ bcs L2
+ INSN2(add,l ,d0,d0) /* restore cy */
+ bra Loop
+
+LAB(L2)
+ INSN1(neg,l ,d0)
+
+/* Restore used registers from stack frame. */
+ INSN2(move,l ,a2,MEM_POSTINC(sp))
+ INSN2(move,l ,d2,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m88k/add_n.s b/sysdeps/m88k/add_n.s
new file mode 100644
index 0000000..7e4cccc
--- /dev/null
+++ b/sysdeps/m88k/add_n.s
@@ -0,0 +1,103 @@
+; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store
+; sum in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100,
+; but on the 88110, it seems to run much slower, 6.6 clocks/limb.
+
+ text
+ align 16
+ global ___mpn_add_n
+___mpn_add_n:
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,3
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,3<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,32
+ st r8,r2,28
+ addu r4,r4,32
+ ld r6,r3,0
+ addu r2,r2,32
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt)
+Lbase: ld r8,r3,4
+ addu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; add 7 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; add 6 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; add 5 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; add 4 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; add 3 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; add 2 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ bcnd.n ne0,r10,Loop ; add 1 + 8r limbs
+ addu.cio r8,r8,r9
+
+ st r8,r2,28 ; store most significant limb
+
+ jmp.n r1
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
diff --git a/sysdeps/m88k/mul_1.s b/sysdeps/m88k/mul_1.s
new file mode 100644
index 0000000..35c238d
--- /dev/null
+++ b/sysdeps/m88k/mul_1.s
@@ -0,0 +1,128 @@
+; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; store the product in a second limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; size r4
+; s2_limb r5
+
+; Common overhead is about 11 cycles/invocation.
+
+; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention.)
+
+; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.)
+
+; To enhance speed:
+; 1. Unroll main loop 4-8 times.
+; 2. Schedule code to avoid WB contention. It might be tempting to move the
+; ld instruction in the loops down to save 2 cycles (less WB contention),
+; but that looses because the ultimate value will be read from outside
+; the allocated space. But if we handle the ultimate multiplication in
+; the tail, we can do this.
+; 3. Make the multiplication with less instructions. I think the code for
+; (S2_LIMB >= 0x10000) is not minimal.
+; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or
+; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11
+; cycles/limb. (Assuming infinite unrolling.)
+
+ text
+ align 16
+ global ___mpn_mul_1
+___mpn_mul_1:
+
+ ; Make S1_PTR and RES_PTR point at the end of their blocks
+ ; and negate SIZE.
+ lda r3,r3[r4]
+ lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval
+ subu r4,r0,r4
+
+ addu.co r2,r0,r0 ; r2 = cy = 0
+ ld r9,r3[r4]
+ mask r7,r5,0xffff ; r7 = lo(S2_LIMB)
+ extu r8,r5,16 ; r8 = hi(S2_LIMB)
+ bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0)
+ subu r6,r6,4
+
+; General code for any value of S2_LIMB.
+
+ ; Make a stack frame and save r25 and r26
+ subu r31,r31,16
+ st.d r25,r31,8
+
+ ; Enter the loop in the middle
+ br.n L1
+ addu r4,r4,1
+
+Loop:
+ ld r9,r3[r4]
+ st r26,r6[r4]
+; bcnd ne0,r0,0 ; bubble
+ addu r4,r4,1
+L1: mul r26,r9,r5 ; low word of product mul_1 WB ld
+ mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1
+ mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1
+ mul r10,r12,r8 ; r10 = prod_1a mul_3
+ extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1
+ mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1
+ mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2
+ extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3
+ addu r10,r10,r11 ; addu_1 WB extu_2
+; bcnd ne0,r0,0 ; bubble WB addu_1
+ addu.co r10,r10,r12 ; WB mul_4
+ mask.u r10,r10,0xffff ; move the 16 most significant bits...
+ addu.ci r10,r10,r0 ; ...to the low half of the word...
+ rot r10,r10,16 ; ...and put carry in pos 16.
+ addu.co r26,r26,r2 ; add old carry limb
+ bcnd.n ne0,r4,Loop
+ addu.ci r2,r25,r10 ; compute new carry limb
+
+ st r26,r6[r4]
+ ld.d r25,r31,8
+ jmp.n r1
+ addu r31,r31,16
+
+; Fast code for S2_LIMB < 0x10000
+Lsmall:
+ ; Enter the loop in the middle
+ br.n SL1
+ addu r4,r4,1
+
+SLoop:
+ ld r9,r3[r4] ;
+ st r8,r6[r4] ;
+ addu r4,r4,1 ;
+SL1: mul r8,r9,r5 ; low word of product
+ mask r12,r9,0xffff ; r12 = lo(s1_limb)
+ extu r13,r9,16 ; r13 = hi(s1_limb)
+ mul r11,r12,r7 ; r11 = prod_0
+ mul r12,r13,r7 ; r12 = prod_1b
+ addu.cio r8,r8,r2 ; add old carry limb
+ extu r10,r11,16 ; r11 = hi(prod_0)
+ addu r10,r10,r12 ;
+ bcnd.n ne0,r4,SLoop
+ extu r2,r10,16 ; r2 = new carry limb
+
+ jmp.n r1
+ st r8,r6[r4]
diff --git a/sysdeps/m88k/sub_n.s b/sysdeps/m88k/sub_n.s
new file mode 100644
index 0000000..3963cd5
--- /dev/null
+++ b/sysdeps/m88k/sub_n.s
@@ -0,0 +1,104 @@
+; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and
+; store difference in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100,
+; but on the 88110, it seems to run much slower, 6.6 clocks/limb.
+
+ text
+ align 16
+ global ___mpn_sub_n
+___mpn_sub_n:
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,3
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,3<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,32
+ st r8,r2,28
+ addu r4,r4,32
+ ld r6,r3,0
+ addu r2,r2,32
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt)
+Lbase: ld r8,r3,4
+ subu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; subtract 7 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; subtract 6 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; subtract 5 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; subtract 4 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; subtract 3 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; subtract 2 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs
+ subu.cio r8,r8,r9
+
+ st r8,r2,28 ; store most significant limb
+
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s
index 34ad9e1..7090cf1 100644
--- a/sysdeps/rs6000/add_n.s
+++ b/sysdeps/rs6000/add_n.s
@@ -45,7 +45,7 @@ __mpn_add_n:
bdz Lend # If done, skip loop
Loop: lu 8,4(4) # load s1 limb and update s1_ptr
lu 0,4(5) # load s2 limb and update s2_ptr
- stu 7,4(3) # store previous limb in load latecny slot
+ stu 7,4(3) # store previous limb in load latency slot
ae 7,0,8 # add new limbs with cy, set cy
bdn Loop # decrement CTR and loop back
Lend: st 7,4(3) # store ultimate result limb
diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s
index 402fdce..40fe7d6 100644
--- a/sysdeps/rs6000/sub_n.s
+++ b/sysdeps/rs6000/sub_n.s
@@ -46,7 +46,7 @@ __mpn_sub_n:
bdz Lend # If done, skip loop
Loop: lu 8,4(4) # load s1 limb and update s1_ptr
lu 0,4(5) # load s2 limb and update s2_ptr
- stu 7,4(3) # store previous limb in load latecny slot
+ stu 7,4(3) # store previous limb in load latency slot
sfe 7,0,8 # add new limbs with cy, set cy
bdn Loop # decrement CTR and loop back
Lend: st 7,4(3) # store ultimate result limb
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7def3d92a4edd807d2df2f016e5c1d6b8e748358
commit 7def3d92a4edd807d2df2f016e5c1d6b8e748358
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 16 01:18:40 1995 +0000
Updated from ../=mpn/gmp-1.906.7
diff --git a/sysdeps/alpha/add_n.s b/sysdeps/alpha/add_n.s
new file mode 100644
index 0000000..e1ad460
--- /dev/null
+++ b/sysdeps/alpha/add_n.s
@@ -0,0 +1,119 @@
+ # Alpha __mpn_add_n -- Add two limb vectors of the same length > 0 and
+ # store sum in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # s2_ptr $18
+ # size $19
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_add_n
+ .ent __mpn_add_n
+__mpn_add_n:
+ .frame $30,0,$26,0
+
+ ldq $3,0($17)
+ ldq $4,0($18)
+
+ subq $19,1,$19
+ and $19,4-1,$2 # number of limbs in first loop
+ bis $31,$31,$0
+ beq $2,.L0 # if multiple of 4 limbs, skip first loop
+
+ subq $19,$2,$19
+
+.Loop0: subq $2,1,$2
+ ldq $5,8($17)
+ addq $4,$0,$4
+ ldq $6,8($18)
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,0($16)
+ or $0,$1,$0
+
+ addq $17,8,$17
+ addq $18,8,$18
+ bis $5,$5,$3
+ bis $6,$6,$4
+ addq $16,8,$16
+ bne $2,.Loop0
+
+.L0: beq $19,.Lend
+
+ .align 3
+.Loop: subq $19,4,$19
+
+ ldq $5,8($17)
+ addq $4,$0,$4
+ ldq $6,8($18)
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,0($16)
+ or $0,$1,$0
+
+ ldq $3,16($17)
+ addq $6,$0,$6
+ ldq $4,16($18)
+ cmpult $6,$0,$1
+ addq $5,$6,$6
+ cmpult $6,$5,$0
+ stq $6,8($16)
+ or $0,$1,$0
+
+ ldq $5,24($17)
+ addq $4,$0,$4
+ ldq $6,24($18)
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,16($16)
+ or $0,$1,$0
+
+ ldq $3,32($17)
+ addq $6,$0,$6
+ ldq $4,32($18)
+ cmpult $6,$0,$1
+ addq $5,$6,$6
+ cmpult $6,$5,$0
+ stq $6,24($16)
+ or $0,$1,$0
+
+ addq $17,32,$17
+ addq $18,32,$18
+ addq $16,32,$16
+ bne $19,.Loop
+
+.Lend: addq $4,$0,$4
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,0($16)
+ or $0,$1,$0
+ ret $31,($26),1
+
+ .end __mpn_add_n
diff --git a/sysdeps/alpha/addmul_1.s b/sysdeps/alpha/addmul_1.s
new file mode 100644
index 0000000..46d277d
--- /dev/null
+++ b/sysdeps/alpha/addmul_1.s
@@ -0,0 +1,100 @@
+ # Alpha 21064 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
+ # the result to a second limb vector.
+
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # s2_limb r19
+
+ # This code runs at 42 cycles/limb on the 21064.
+
+ # To improve performance for long multiplications, we would use
+ # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use
+ # these instructions without slowing down the general code: 1. We can
+ # only have two prefetches in operation at any time in the Alpha
+ # architecture. 2. There will seldom be any special alignment
+ # between RES_PTR and S1_PTR. Maybe we can simply divide the current
+ # loop into an inner and outer loop, having the inner loop handle
+ # exactly one prefetch block?
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1 2
+__mpn_addmul_1:
+ .frame $30,0,$26
+
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ subq $18,1,$18 # size--
+ mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ umulh $2,$19,$0 # $0 = prod_high
+ beq $18,Lend1 # jump if size was == 1
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ subq $18,1,$18 # size--
+ addq $5,$3,$3
+ cmpult $3,$5,$4
+ stq $3,0($16)
+ addq $16,8,$16 # res_ptr++
+ beq $18,Lend2 # jump if size was == 2
+
+ .align 3
+Loop: mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ subq $18,1,$18 # size--
+ umulh $2,$19,$4 # $4 = cy_limb
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ addq $5,$3,$3
+ cmpult $3,$5,$5
+ stq $3,0($16)
+ addq $16,8,$16 # res_ptr++
+ addq $5,$0,$0 # combine carries
+ bne $18,Loop
+
+Lend2: mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ umulh $2,$19,$4 # $4 = cy_limb
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ addq $5,$3,$3
+ cmpult $3,$5,$5
+ stq $3,0($16)
+ addq $5,$0,$0 # combine carries
+ addq $4,$0,$0 # cy_limb = prod_high + cy
+ ret $31,($26),1
+Lend1: addq $5,$3,$3
+ cmpult $3,$5,$5
+ stq $3,0($16)
+ addq $0,$5,$0
+ ret $31,($26),1
+
+ .end __mpn_addmul_1
diff --git a/sysdeps/alpha/alphaev5/add_n.s b/sysdeps/alpha/alphaev5/add_n.s
new file mode 100644
index 0000000..2aaf041
--- /dev/null
+++ b/sysdeps/alpha/alphaev5/add_n.s
@@ -0,0 +1,118 @@
+ # Alpha __mpn_add_n -- Add two limb vectors of the same length > 0 and
+ # store sum in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # s2_ptr $18
+ # size $19
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_add_n
+ .ent __mpn_add_n
+__mpn_add_n:
+ .frame $30,0,$26,0
+
+ ldq $3,0($17)
+ ldq $4,0($18)
+
+ subq $19,1,$19
+ and $19,4-1,$2 # number of limbs in first loop
+ bis $31,$31,$0
+ beq $2,.L0 # if multiple of 4 limbs, skip first loop
+
+ subq $19,$2,$19
+
+.Loop0: subq $2,1,$2
+ ldq $5,8($17)
+ addq $4,$0,$4
+ ldq $6,8($18)
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,0($16)
+ or $0,$1,$0
+
+ addq $17,8,$17
+ addq $18,8,$18
+ bis $5,$5,$3
+ bis $6,$6,$4
+ addq $16,8,$16
+ bne $2,.Loop0
+
+.L0: beq $19,.Lend
+
+ .align 4
+.Loop: subq $19,4,$19
+ unop
+
+ ldq $6,8($18)
+ addq $4,$0,$0
+ ldq $5,8($17)
+ cmpult $0,$4,$1
+ ldq $4,16($18)
+ addq $3,$0,$20
+ cmpult $20,$3,$0
+ ldq $3,16($17)
+ or $0,$1,$0
+ addq $6,$0,$0
+ cmpult $0,$6,$1
+ ldq $6,24($18)
+ addq $5,$0,$21
+ cmpult $21,$5,$0
+ ldq $5,24($17)
+ or $0,$1,$0
+ addq $4,$0,$0
+ cmpult $0,$4,$1
+ ldq $4,32($18)
+ addq $3,$0,$22
+ cmpult $22,$3,$0
+ ldq $3,32($17)
+ or $0,$1,$0
+ addq $6,$0,$0
+ cmpult $0,$6,$1
+ addq $5,$0,$23
+ cmpult $23,$5,$0
+ or $0,$1,$0
+
+ stq $20,0($16)
+ stq $21,8($16)
+ stq $22,16($16)
+ stq $23,24($16)
+
+ addq $17,32,$17
+ addq $18,32,$18
+ addq $16,32,$16
+ bne $19,.Loop
+
+.Lend: addq $4,$0,$4
+ cmpult $4,$0,$1
+ addq $3,$4,$4
+ cmpult $4,$3,$0
+ stq $4,0($16)
+ or $0,$1,$0
+ ret $31,($26),1
+
+ .end __mpn_add_n
diff --git a/sysdeps/alpha/alphaev5/lshift.s b/sysdeps/alpha/alphaev5/lshift.s
new file mode 100644
index 0000000..fdb0895
--- /dev/null
+++ b/sysdeps/alpha/alphaev5/lshift.s
@@ -0,0 +1,175 @@
+ # Alpha EV5 __mpn_lshift --
+
+ # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # cnt r19
+
+ # This code runs at 4.25 cycles/limb on the EV5.
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_lshift
+ .ent __mpn_lshift
+__mpn_lshift:
+ .frame $30,0,$26,0
+
+ s8addq $18,$17,$17 # make r17 point at end of s1
+ ldq $4,-8($17) # load first limb
+ subq $31,$19,$20
+ s8addq $18,$16,$16 # make r16 point at end of RES
+ subq $18,1,$18
+ and $18,4-1,$28 # number of limbs in first loop
+ srl $4,$20,$0 # compute function result
+
+ beq $28,L0
+ subq $18,$28,$18
+
+ .align 3
+Loop0: ldq $3,-16($17)
+ subq $16,8,$16
+ sll $4,$19,$5
+ subq $17,8,$17
+ subq $28,1,$28
+ srl $3,$20,$6
+ or $3,$3,$4
+ or $5,$6,$8
+ stq $8,0($16)
+ bne $28,Loop0
+
+L0: sll $4,$19,$24
+ beq $18,Lend
+ # warm up phase 1
+ ldq $1,-16($17)
+ subq $18,4,$18
+ ldq $2,-24($17)
+ ldq $3,-32($17)
+ ldq $4,-40($17)
+ beq $18,Lcool1
+ # warm up phase 2
+ srl $1,$20,$7
+ sll $1,$19,$21
+ srl $2,$20,$8
+ ldq $1,-48($17)
+ sll $2,$19,$22
+ ldq $2,-56($17)
+ srl $3,$20,$5
+ or $7,$24,$7
+ sll $3,$19,$23
+ or $8,$21,$8
+ srl $4,$20,$6
+ ldq $3,-64($17)
+ sll $4,$19,$24
+ ldq $4,-72($17)
+ subq $18,4,$18
+ beq $18,Lcool1
+ .align 4
+ # main loop
+Loop: stq $7,-8($16)
+ or $5,$22,$5
+ stq $8,-16($16)
+ or $6,$23,$6
+
+ srl $1,$20,$7
+ subq $18,4,$18
+ sll $1,$19,$21
+ unop # ldq $31,-96($17)
+
+ srl $2,$20,$8
+ ldq $1,-80($17)
+ sll $2,$19,$22
+ ldq $2,-88($17)
+
+ stq $5,-24($16)
+ or $7,$24,$7
+ stq $6,-32($16)
+ or $8,$21,$8
+
+ srl $3,$20,$5
+ unop # ldq $31,-96($17)
+ sll $3,$19,$23
+ subq $16,32,$16
+
+ srl $4,$20,$6
+ ldq $3,-96($17
+ sll $4,$19,$24
+ ldq $4,-104($17)
+
+ subq $17,32,$17
+ bne $18,Loop
+ unop
+ unop
+ # cool down phase 2/1
+Lcool1: stq $7,-8($16)
+ or $5,$22,$5
+ stq $8,-16($16)
+ or $6,$23,$6
+ srl $1,$20,$7
+ sll $1,$19,$21
+ srl $2,$20,$8
+ sll $2,$19,$22
+ stq $5,-24($16)
+ or $7,$24,$7
+ stq $6,-32($16)
+ or $8,$21,$8
+ srl $3,$20,$5
+ sll $3,$19,$23
+ srl $4,$20,$6
+ sll $4,$19,$24
+ # cool down phase 2/2
+ stq $7,-40($16)
+ or $5,$22,$5
+ stq $8,-48($16)
+ or $6,$23,$6
+ stq $5,-56($16)
+ stq $6,-64($16)
+ # cool down phase 2/3
+ stq $24,-72($16)
+ ret $31,($26),1
+
+ # cool down phase 1/1
+Lcool1: srl $1,$20,$7
+ sll $1,$19,$21
+ srl $2,$20,$8
+ sll $2,$19,$22
+ srl $3,$20,$5
+ or $7,$24,$7
+ sll $3,$19,$23
+ or $8,$21,$8
+ srl $4,$20,$6
+ sll $4,$19,$24
+ # cool down phase 1/2
+ stq $7,-8($16)
+ or $5,$22,$5
+ stq $8,-16($16)
+ or $6,$23,$6
+ stq $5,-24($16)
+ stq $6,-32($16)
+ stq $24,-40($16)
+ ret $31,($26),1
+
+Lend stq $24,-8($16)
+ ret $31,($26),1
+ .end __mpn_lshift
diff --git a/sysdeps/alpha/alphaev5/rshift.s b/sysdeps/alpha/alphaev5/rshift.s
new file mode 100644
index 0000000..1da9960
--- /dev/null
+++ b/sysdeps/alpha/alphaev5/rshift.s
@@ -0,0 +1,173 @@
+ # Alpha EV5 __mpn_rshift --
+
+ # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # cnt r19
+
+ # This code runs at 4.25 cycles/limb on the EV5.
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_rshift
+ .ent __mpn_rshift
+__mpn_rshift:
+ .frame $30,0,$26,0
+
+ ldq $4,0($17) # load first limb
+ subq $31,$19,$20
+ subq $18,1,$18
+ and $18,4-1,$28 # number of limbs in first loop
+ sll $4,$20,$0 # compute function result
+
+ beq $28,L0
+ subq $18,$28,$18
+
+ .align 3
+Loop0: ldq $3,8($17)
+ addq $16,8,$16
+ srl $4,$19,$5
+ addq $17,8,$17
+ subq $28,1,$28
+ sll $3,$20,$6
+ or $3,$3,$4
+ or $5,$6,$8
+ stq $8,-8($16)
+ bne $28,Loop0
+
+L0: srl $4,$19,$24
+ beq $18,Lend
+ # warm up phase 1
+ ldq $1,8($17)
+ subq $18,4,$18
+ ldq $2,16($17)
+ ldq $3,24($17)
+ ldq $4,32($17)
+ beq $18,Lcool1
+ # warm up phase 2
+ sll $1,$20,$7
+ srl $1,$19,$21
+ sll $2,$20,$8
+ ldq $1,40($17)
+ srl $2,$19,$22
+ ldq $2,48($17)
+ sll $3,$20,$5
+ or $7,$24,$7
+ srl $3,$19,$23
+ or $8,$21,$8
+ sll $4,$20,$6
+ ldq $3,56($17)
+ srl $4,$19,$24
+ ldq $4,64($17)
+ subq $18,4,$18
+ beq $18,Lcool2
+ .align 4
+ # main loop
+Loop: stq $7,0($16)
+ or $5,$22,$5
+ stq $8,8($16)
+ or $6,$23,$6
+
+ sll $1,$20,$7
+ subq $18,4,$18
+ srl $1,$19,$21
+ unop # ldq $31,-96($17)
+
+ sll $2,$20,$8
+ ldq $1,72($17)
+ srl $2,$19,$22
+ ldq $2,80($17)
+
+ stq $5,16($16)
+ or $7,$24,$7
+ stq $6,24($16)
+ or $8,$21,$8
+
+ sll $3,$20,$5
+ unop # ldq $31,-96($17)
+ srl $3,$19,$23
+ addq $16,32,$16
+
+ sll $4,$20,$6
+ ldq $3,88($17)
+ srl $4,$19,$24
+ ldq $4,96($17)
+
+ addq $17,32,$17
+ bne $18,Loop
+ unop
+ unop
+ # cool down phase 2/1
+Lcool2: stq $7,0($16)
+ or $5,$22,$5
+ stq $8,8($16)
+ or $6,$23,$6
+ sll $1,$20,$7
+ srl $1,$19,$21
+ sll $2,$20,$8
+ srl $2,$19,$22
+ stq $5,16($16)
+ or $7,$24,$7
+ stq $6,24($16)
+ or $8,$21,$8
+ sll $3,$20,$5
+ srl $3,$19,$23
+ sll $4,$20,$6
+ srl $4,$19,$24
+ # cool down phase 2/2
+ stq $7,32($16)
+ or $5,$22,$5
+ stq $8,40($16)
+ or $6,$23,$6
+ stq $5,48($16)
+ stq $6,56($16)
+ # cool down phase 2/3
+ stq $24,64($16)
+ ret $31,($26),1
+
+ # cool down phase 1/1
+Lcool1: sll $1,$20,$7
+ srl $1,$19,$21
+ sll $2,$20,$8
+ srl $2,$19,$22
+ sll $3,$20,$5
+ or $7,$24,$7
+ srl $3,$19,$23
+ or $8,$21,$8
+ sll $4,$20,$6
+ srl $4,$19,$24
+ # cool down phase 1/2
+ stq $7,0($16)
+ or $5,$22,$5
+ stq $8,8($16)
+ or $6,$23,$6
+ stq $5,16($16)
+ stq $6,24($16)
+ stq $24,32($16)
+ ret $31,($26),1
+
+Lend: stq $24,0($16)
+ ret $31,($26),1
+ .end __mpn_rshift
diff --git a/sysdeps/alpha/lshift.s b/sysdeps/alpha/lshift.s
new file mode 100644
index 0000000..c284349
--- /dev/null
+++ b/sysdeps/alpha/lshift.s
@@ -0,0 +1,108 @@
+ # Alpha 21064 __mpn_lshift --
+
+ # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # cnt r19
+
+ # This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling,
+ # it would take 4 cycles/limb. It should be possible to get down to 3
+ # cycles/limb since both ldq and stq can be paired with the other used
+ # instructions. But there are many restrictions in the 21064 pipeline that
+ # makes it hard, if not impossible, to get down to 3 cycles/limb:
+
+ # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay.
+ # 2. Only aligned instruction pairs can be paired.
+ # 3. The store buffer or silo might not be able to deal with the bandwidth.
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_lshift
+ .ent __mpn_lshift
+__mpn_lshift:
+ .frame $30,0,$26,0
+
+ s8addq $18,$17,$17 # make r17 point at end of s1
+ ldq $4,-8($17) # load first limb
+ subq $17,8,$17
+ subq $31,$19,$7
+ s8addq $18,$16,$16 # make r16 point at end of RES
+ subq $18,1,$18
+ and $18,4-1,$20 # number of limbs in first loop
+ srl $4,$7,$0 # compute function result
+
+ beq $20,L0
+ subq $18,$20,$18
+
+ .align 3
+Loop0:
+ ldq $3,-8($17)
+ subq $16,8,$16
+ subq $17,8,$17
+ subq $20,1,$20
+ sll $4,$19,$5
+ srl $3,$7,$6
+ bis $3,$3,$4
+ bis $5,$6,$8
+ stq $8,0($16)
+ bne $20,Loop0
+
+L0: beq $18,Lend
+
+ .align 3
+Loop: ldq $3,-8($17)
+ subq $16,32,$16
+ subq $18,4,$18
+ sll $4,$19,$5
+ srl $3,$7,$6
+
+ ldq $4,-16($17)
+ sll $3,$19,$1
+ bis $5,$6,$8
+ stq $8,24($16)
+ srl $4,$7,$2
+
+ ldq $3,-24($17)
+ sll $4,$19,$5
+ bis $1,$2,$8
+ stq $8,16($16)
+ srl $3,$7,$6
+
+ ldq $4,-32($17)
+ sll $3,$19,$1
+ bis $5,$6,$8
+ stq $8,8($16)
+ srl $4,$7,$2
+
+ subq $17,32,$17
+ bis $1,$2,$8
+ stq $8,0($16)
+
+ bgt $18,Loop
+
+Lend: sll $4,$19,$8
+ stq $8,-8($16)
+ ret $31,($26),1
+ .end __mpn_lshift
diff --git a/sysdeps/alpha/mul_1.s b/sysdeps/alpha/mul_1.s
new file mode 100644
index 0000000..3ef194d
--- /dev/null
+++ b/sysdeps/alpha/mul_1.s
@@ -0,0 +1,84 @@
+ # Alpha 21064 __mpn_mul_1 -- Multiply a limb vector with a limb and store
+ # the result in a second limb vector.
+
+ # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # s2_limb r19
+
+ # This code runs at 42 cycles/limb on the EV4 and 18 cycles/limb on the EV5.
+
+ # To improve performance for long multiplications, we would use
+ # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use
+ # these instructions without slowing down the general code: 1. We can
+ # only have two prefetches in operation at any time in the Alpha
+ # architecture. 2. There will seldom be any special alignment
+ # between RES_PTR and S1_PTR. Maybe we can simply divide the current
+ # loop into an inner and outer loop, having the inner loop handle
+ # exactly one prefetch block?
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_mul_1
+ .ent __mpn_mul_1 2
+__mpn_mul_1:
+ .frame $30,0,$26
+
+ ldq $2,0($17) # $2 = s1_limb
+ subq $18,1,$18 # size--
+ mulq $2,$19,$3 # $3 = prod_low
+ bic $31,$31,$4 # clear cy_limb
+ umulh $2,$19,$0 # $0 = prod_high
+ beq $18,Lend1 # jump if size was == 1
+ ldq $2,8($17) # $2 = s1_limb
+ subq $18,1,$18 # size--
+ stq $3,0($16)
+ beq $18,Lend2 # jump if size was == 2
+
+ .align 3
+Loop: mulq $2,$19,$3 # $3 = prod_low
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ subq $18,1,$18 # size--
+ umulh $2,$19,$4 # $4 = cy_limb
+ ldq $2,16($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ stq $3,8($16)
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ addq $16,8,$16 # res_ptr++
+ bne $18,Loop
+
+Lend2: mulq $2,$19,$3 # $3 = prod_low
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ umulh $2,$19,$4 # $4 = cy_limb
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ stq $3,8($16)
+ addq $4,$0,$0 # cy_limb = prod_high + cy
+ ret $31,($26),1
+Lend1: stq $3,0($16)
+ ret $31,($26),1
+
+ .end __mpn_mul_1
diff --git a/sysdeps/alpha/rshift.s b/sysdeps/alpha/rshift.s
new file mode 100644
index 0000000..74eab04
--- /dev/null
+++ b/sysdeps/alpha/rshift.s
@@ -0,0 +1,106 @@
+ # Alpha 21064 __mpn_rshift --
+
+ # Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # cnt r19
+
+ # This code runs at 4.8 cycles/limb on the 21064. With infinite unrolling,
+ # it would take 4 cycles/limb. It should be possible to get down to 3
+ # cycles/limb since both ldq and stq can be paired with the other used
+ # instructions. But there are many restrictions in the 21064 pipeline that
+ # makes it hard, if not impossible, to get down to 3 cycles/limb:
+
+ # 1. ldq has a 3 cycle delay, srl and sll have a 2 cycle delay.
+ # 2. Only aligned instruction pairs can be paired.
+ # 3. The store buffer or silo might not be able to deal with the bandwidth.
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_rshift
+ .ent __mpn_rshift
+__mpn_rshift:
+ .frame $30,0,$26,0
+
+ ldq $4,0($17) # load first limb
+ addq $17,8,$17
+ subq $31,$19,$7
+ subq $18,1,$18
+ and $18,4-1,$20 # number of limbs in first loop
+ sll $4,$7,$0 # compute function result
+
+ beq $20,L0
+ subq $18,$20,$18
+
+ .align 3
+Loop0:
+ ldq $3,0($17)
+ addq $16,8,$16
+ addq $17,8,$17
+ subq $20,1,$20
+ srl $4,$19,$5
+ sll $3,$7,$6
+ bis $3,$3,$4
+ bis $5,$6,$8
+ stq $8,-8($16)
+ bne $20,Loop0
+
+L0: beq $18,Lend
+
+ .align 3
+Loop: ldq $3,0($17)
+ addq $16,32,$16
+ subq $18,4,$18
+ srl $4,$19,$5
+ sll $3,$7,$6
+
+ ldq $4,8($17)
+ srl $3,$19,$1
+ bis $5,$6,$8
+ stq $8,-32($16)
+ sll $4,$7,$2
+
+ ldq $3,16($17)
+ srl $4,$19,$5
+ bis $1,$2,$8
+ stq $8,-24($16)
+ sll $3,$7,$6
+
+ ldq $4,24($17)
+ srl $3,$19,$1
+ bis $5,$6,$8
+ stq $8,-16($16)
+ sll $4,$7,$2
+
+ addq $17,32,$17
+ bis $1,$2,$8
+ stq $8,-8($16)
+
+ bgt $18,Loop
+
+Lend: srl $4,$19,$8
+ stq $8,0($16)
+ ret $31,($26),1
+ .end __mpn_rshift
diff --git a/sysdeps/alpha/sub_n.s b/sysdeps/alpha/sub_n.s
new file mode 100644
index 0000000..5200025
--- /dev/null
+++ b/sysdeps/alpha/sub_n.s
@@ -0,0 +1,119 @@
+ # Alpha __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ # store difference in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $16
+ # s1_ptr $17
+ # s2_ptr $18
+ # size $19
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_sub_n
+ .ent __mpn_sub_n
+__mpn_sub_n:
+ .frame $30,0,$26,0
+
+ ldq $3,0($17)
+ ldq $4,0($18)
+
+ subq $19,1,$19
+ and $19,4-1,$2 # number of limbs in first loop
+ bis $31,$31,$0
+ beq $2,.L0 # if multiple of 4 limbs, skip first loop
+
+ subq $19,$2,$19
+
+.Loop0: subq $2,1,$2
+ ldq $5,8($17)
+ addq $4,$0,$4
+ ldq $6,8($18)
+ cmpult $4,$0,$1
+ subq $3,$4,$4
+ cmpult $3,$4,$0
+ stq $4,0($16)
+ or $0,$1,$0
+
+ addq $17,8,$17
+ addq $18,8,$18
+ bis $5,$5,$3
+ bis $6,$6,$4
+ addq $16,8,$16
+ bne $2,.Loop0
+
+.L0: beq $19,.Lend
+
+ .align 3
+.Loop: subq $19,4,$19
+
+ ldq $5,8($17)
+ addq $4,$0,$4
+ ldq $6,8($18)
+ cmpult $4,$0,$1
+ subq $3,$4,$4
+ cmpult $3,$4,$0
+ stq $4,0($16)
+ or $0,$1,$0
+
+ ldq $3,16($17)
+ addq $6,$0,$6
+ ldq $4,16($18)
+ cmpult $6,$0,$1
+ subq $5,$6,$6
+ cmpult $5,$6,$0
+ stq $6,8($16)
+ or $0,$1,$0
+
+ ldq $5,24($17)
+ addq $4,$0,$4
+ ldq $6,24($18)
+ cmpult $4,$0,$1
+ subq $3,$4,$4
+ cmpult $3,$4,$0
+ stq $4,16($16)
+ or $0,$1,$0
+
+ ldq $3,32($17)
+ addq $6,$0,$6
+ ldq $4,32($18)
+ cmpult $6,$0,$1
+ subq $5,$6,$6
+ cmpult $5,$6,$0
+ stq $6,24($16)
+ or $0,$1,$0
+
+ addq $17,32,$17
+ addq $18,32,$18
+ addq $16,32,$16
+ bne $19,.Loop
+
+.Lend: addq $4,$0,$4
+ cmpult $4,$0,$1
+ subq $3,$4,$4
+ cmpult $3,$4,$0
+ stq $4,0($16)
+ or $0,$1,$0
+ ret $31,($26),1
+
+ .end __mpn_sub_n
diff --git a/sysdeps/alpha/submul_1.s b/sysdeps/alpha/submul_1.s
new file mode 100644
index 0000000..acaa11c
--- /dev/null
+++ b/sysdeps/alpha/submul_1.s
@@ -0,0 +1,100 @@
+ # Alpha 21064 __mpn_submul_1 -- Multiply a limb vector with a limb and
+ # subtract the result from a second limb vector.
+
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr r16
+ # s1_ptr r17
+ # size r18
+ # s2_limb r19
+
+ # This code runs at 42 cycles/limb on the 21064.
+
+ # To improve performance for long multiplications, we would use
+ # 'fetch' for S1 and 'fetch_m' for RES. It's not obvious how to use
+ # these instructions without slowing down the general code: 1. We can
+ # only have two prefetches in operation at any time in the Alpha
+ # architecture. 2. There will seldom be any special alignment
+ # between RES_PTR and S1_PTR. Maybe we can simply divide the current
+ # loop into an inner and outer loop, having the inner loop handle
+ # exactly one prefetch block?
+
+ .set noreorder
+ .set noat
+.text
+ .align 3
+ .globl __mpn_submul_1
+ .ent __mpn_submul_1 2
+__mpn_submul_1:
+ .frame $30,0,$26
+
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ subq $18,1,$18 # size--
+ mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ umulh $2,$19,$0 # $0 = prod_high
+ beq $18,Lend1 # jump if size was == 1
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ subq $18,1,$18 # size--
+ subq $5,$3,$3
+ cmpult $5,$3,$4
+ stq $3,0($16)
+ addq $16,8,$16 # res_ptr++
+ beq $18,Lend2 # jump if size was == 2
+
+ .align 3
+Loop: mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ subq $18,1,$18 # size--
+ umulh $2,$19,$4 # $4 = cy_limb
+ ldq $2,0($17) # $2 = s1_limb
+ addq $17,8,$17 # s1_ptr++
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ subq $5,$3,$3
+ cmpult $5,$3,$5
+ stq $3,0($16)
+ addq $16,8,$16 # res_ptr++
+ addq $5,$0,$0 # combine carries
+ bne $18,Loop
+
+Lend2: mulq $2,$19,$3 # $3 = prod_low
+ ldq $5,0($16) # $5 = *res_ptr
+ addq $4,$0,$0 # cy_limb = cy_limb + 'cy'
+ umulh $2,$19,$4 # $4 = cy_limb
+ addq $3,$0,$3 # $3 = cy_limb + prod_low
+ cmpult $3,$0,$0 # $0 = carry from (cy_limb + prod_low)
+ subq $5,$3,$3
+ cmpult $5,$3,$5
+ stq $3,0($16)
+ addq $5,$0,$0 # combine carries
+ addq $4,$0,$0 # cy_limb = prod_high + cy
+ ret $31,($26),1
+Lend1: subq $5,$3,$3
+ cmpult $5,$3,$5
+ stq $3,0($16)
+ addq $0,$5,$0
+ ret $31,($26),1
+
+ .end __mpn_submul_1
diff --git a/sysdeps/hppa/add_n.s b/sysdeps/hppa/add_n.s
new file mode 100644
index 0000000..7f3e323
--- /dev/null
+++ b/sysdeps/hppa/add_n.s
@@ -0,0 +1,57 @@
+; HP-PA __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+; sum in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr gr26
+; s1_ptr gr25
+; s2_ptr gr24
+; size gr23
+
+; One might want to unroll this as for other processors, but it turns
+; out that the data cache contention after a store makes such
+; unrolling useless. We can't come under 5 cycles/limb anyway.
+
+ .code
+ .export __mpn_add_n
+__mpn_add_n
+ .proc
+ .callinfo frame=0,no_calls
+ .entry
+
+ ldws,ma 4(0,%r25),%r20
+ ldws,ma 4(0,%r24),%r19
+
+ addib,= -1,%r23,L$end ; check for (SIZE == 1)
+ add %r20,%r19,%r28 ; add first limbs ignoring cy
+
+L$loop ldws,ma 4(0,%r25),%r20
+ ldws,ma 4(0,%r24),%r19
+ stws,ma %r28,4(0,%r26)
+ addib,<> -1,%r23,L$loop
+ addc %r20,%r19,%r28
+
+L$end stws %r28,0(0,%r26)
+ bv 0(%r2)
+ addc %r0,%r0,%r28
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/hppa1.1/addmul_1.s b/sysdeps/hppa/hppa1.1/addmul_1.s
new file mode 100644
index 0000000..a9dfdd1
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/addmul_1.s
@@ -0,0 +1,101 @@
+; HP-PA-1.1 __mpn_addmul_1 -- Multiply a limb vector with a limb and
+; add the result to a second limb vector.
+
+; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r26
+; s1_ptr r25
+; size r24
+; s2_limb r23
+
+; This runs at 11 cycles/limb on a PA7000. With the used instructions, it
+; can not become faster due to data cache contention after a store. On the
+; PA7100 it runs at 10 cycles/limb, and that can not be improved either,
+; since only the xmpyu does not need the integer pipeline, so the only
+; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
+; on the PA7100.
+
+; There are some ideas described in mul_1.s that applies to this code too.
+
+ .code
+ .export __mpn_addmul_1
+__mpn_addmul_1
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+
+ ldo 64(%r30),%r30
+ fldws,ma 4(%r25),%fr5
+ stw %r23,-16(%r30) ; move s2_limb ...
+ addib,= -1,%r24,L$just_one_limb
+ fldws -16(%r30),%fr4 ; ... into fr4
+ add %r0,%r0,%r0 ; clear carry
+ xmpyu %fr4,%fr5,%fr6
+ fldws,ma 4(%r25),%fr7
+ fstds %fr6,-16(%r30)
+ xmpyu %fr4,%fr7,%fr8
+ ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -16(%r30),%r28
+
+ fstds %fr8,-16(%r30)
+ addib,= -1,%r24,L$end
+ ldw -12(%r30),%r1
+
+; Main loop
+L$loop ldws 0(%r26),%r29
+ fldws,ma 4(%r25),%fr5
+ add %r29,%r19,%r19
+ stws,ma %r19,4(%r26)
+ addc %r28,%r1,%r19
+ xmpyu %fr4,%fr5,%fr6
+ ldw -16(%r30),%r28
+ fstds %fr6,-16(%r30)
+ addc %r0,%r28,%r28
+ addib,<> -1,%r24,L$loop
+ ldw -12(%r30),%r1
+
+L$end ldw 0(%r26),%r29
+ add %r29,%r19,%r19
+ stws,ma %r19,4(%r26)
+ addc %r28,%r1,%r19
+ ldw -16(%r30),%r28
+ ldws 0(%r26),%r29
+ addc %r0,%r28,%r28
+ add %r29,%r19,%r19
+ stws,ma %r19,4(%r26)
+ addc %r0,%r28,%r28
+ bv 0(%r2)
+ ldo -64(%r30),%r30
+
+L$just_one_limb
+ xmpyu %fr4,%fr5,%fr6
+ ldw 0(%r26),%r29
+ fstds %fr6,-16(%r30)
+ ldw -12(%r30),%r1
+ ldw -16(%r30),%r28
+ add %r29,%r1,%r19
+ stw %r19,0(%r26)
+ addc %r0,%r28,%r28
+ bv 0(%r2)
+ ldo -64(%r30),%r30
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/hppa1.1/mul_1.s b/sysdeps/hppa/hppa1.1/mul_1.s
new file mode 100644
index 0000000..ebf0778
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/mul_1.s
@@ -0,0 +1,97 @@
+; HP-PA-1.1 __mpn_mul_1 -- Multiply a limb vector with a limb and store
+; the result in a second limb vector.
+
+; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r26
+; s1_ptr r25
+; size r24
+; s2_limb r23
+
+; This runs at 9 cycles/limb on a PA7000. With the used instructions, it can
+; not become faster due to data cache contention after a store. On the
+; PA7100 it runs at 7 cycles/limb, and that can not be improved either, since
+; only the xmpyu does not need the integer pipeline, so the only dual-issue
+; we will get are addc+xmpyu. Unrolling would not help either CPU.
+
+; We could use fldds to read two limbs at a time from the S1 array, and that
+; could bring down the times to 8.5 and 6.5 cycles/limb for the PA7000 and
+; PA7100, respectively. We don't do that since it does not seem worth the
+; (alignment) troubles...
+
+; At least the PA7100 is rumored to be able to deal with cache-misses
+; without stalling instruction issue. If this is true, and the cache is
+; actually also lockup-free, we should use a deeper software pipeline, and
+; load from S1 very early! (The loads and stores to -12(sp) will surely be
+; in the cache.)
+
+ .code
+ .export __mpn_mul_1
+__mpn_mul_1
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+
+ ldo 64(%r30),%r30
+ fldws,ma 4(%r25),%fr5
+ stw %r23,-16(%r30) ; move s2_limb ...
+ addib,= -1,%r24,L$just_one_limb
+ fldws -16(%r30),%fr4 ; ... into fr4
+ add %r0,%r0,%r0 ; clear carry
+ xmpyu %fr4,%fr5,%fr6
+ fldws,ma 4(%r25),%fr7
+ fstds %fr6,-16(%r30)
+ xmpyu %fr4,%fr7,%fr8
+ ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -16(%r30),%r28
+
+ fstds %fr8,-16(%r30)
+ addib,= -1,%r24,L$end
+ ldw -12(%r30),%r1
+
+; Main loop
+L$loop fldws,ma 4(%r25),%fr5
+ stws,ma %r19,4(%r26)
+ addc %r28,%r1,%r19
+ xmpyu %fr4,%fr5,%fr6
+ ldw -16(%r30),%r28
+ fstds %fr6,-16(%r30)
+ addib,<> -1,%r24,L$loop
+ ldw -12(%r30),%r1
+
+L$end stws,ma %r19,4(%r26)
+ addc %r28,%r1,%r19
+ ldw -16(%r30),%r28
+ stws,ma %r19,4(%r26)
+ addc %r0,%r28,%r28
+ bv 0(%r2)
+ ldo -64(%r30),%r30
+
+L$just_one_limb
+ xmpyu %fr4,%fr5,%fr6
+ fstds %fr6,-16(%r30)
+ ldw -16(%r30),%r28
+ ldo -64(%r30),%r30
+ bv 0(%r2)
+ fstws %fr6R,0(%r26)
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/hppa1.1/submul_1.s b/sysdeps/hppa/hppa1.1/submul_1.s
new file mode 100644
index 0000000..44cabf4
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/submul_1.s
@@ -0,0 +1,110 @@
+; HP-PA-1.1 __mpn_submul_1 -- Multiply a limb vector with a limb and
+; subtract the result from a second limb vector.
+
+; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r26
+; s1_ptr r25
+; size r24
+; s2_limb r23
+
+; This runs at 12 cycles/limb on a PA7000. With the used instructions, it
+; can not become faster due to data cache contention after a store. On the
+; PA7100 it runs at 11 cycles/limb, and that can not be improved either,
+; since only the xmpyu does not need the integer pipeline, so the only
+; dual-issue we will get are addc+xmpyu. Unrolling could gain a cycle/limb
+; on the PA7100.
+
+; There are some ideas described in mul_1.s that applies to this code too.
+
+; It seems possible to make this run as fast as __mpn_addmul_1, if we use
+; sub,>>= %r29,%r19,%r22
+; addi 1,%r28,%r28
+; but that requires reworking the hairy software pipeline...
+
+ .code
+ .export __mpn_submul_1
+__mpn_submul_1
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+
+ ldo 64(%r30),%r30
+ fldws,ma 4(%r25),%fr5
+ stw %r23,-16(%r30) ; move s2_limb ...
+ addib,= -1,%r24,L$just_one_limb
+ fldws -16(%r30),%fr4 ; ... into fr4
+ add %r0,%r0,%r0 ; clear carry
+ xmpyu %fr4,%fr5,%fr6
+ fldws,ma 4(%r25),%fr7
+ fstds %fr6,-16(%r30)
+ xmpyu %fr4,%fr7,%fr8
+ ldw -12(%r30),%r19 ; least significant limb in product
+ ldw -16(%r30),%r28
+
+ fstds %fr8,-16(%r30)
+ addib,= -1,%r24,L$end
+ ldw -12(%r30),%r1
+
+; Main loop
+L$loop ldws 0(%r26),%r29
+ fldws,ma 4(%r25),%fr5
+ sub %r29,%r19,%r22
+ add %r22,%r19,%r0
+ stws,ma %r22,4(%r26)
+ addc %r28,%r1,%r19
+ xmpyu %fr4,%fr5,%fr6
+ ldw -16(%r30),%r28
+ fstds %fr6,-16(%r30)
+ addc %r0,%r28,%r28
+ addib,<> -1,%r24,L$loop
+ ldw -12(%r30),%r1
+
+L$end ldw 0(%r26),%r29
+ sub %r29,%r19,%r22
+ add %r22,%r19,%r0
+ stws,ma %r22,4(%r26)
+ addc %r28,%r1,%r19
+ ldw -16(%r30),%r28
+ ldws 0(%r26),%r29
+ addc %r0,%r28,%r28
+ sub %r29,%r19,%r22
+ add %r22,%r19,%r0
+ stws,ma %r22,4(%r26)
+ addc %r0,%r28,%r28
+ bv 0(%r2)
+ ldo -64(%r30),%r30
+
+L$just_one_limb
+ xmpyu %fr4,%fr5,%fr6
+ ldw 0(%r26),%r29
+ fstds %fr6,-16(%r30)
+ ldw -12(%r30),%r1
+ ldw -16(%r30),%r28
+ sub %r29,%r1,%r22
+ add %r22,%r1,%r0
+ stw %r22,0(%r26)
+ addc %r0,%r28,%r28
+ bv 0(%r2)
+ ldo -64(%r30),%r30
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/hppa1.1/udiv_qrnnd.s b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
new file mode 100644
index 0000000..4ffef3a
--- /dev/null
+++ b/sysdeps/hppa/hppa1.1/udiv_qrnnd.s
@@ -0,0 +1,74 @@
+; HP-PA __udiv_qrnnd division support, used from longlong.h.
+; This version runs fast on PA 7000 and later.
+
+; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; rem_ptr gr26
+; n1 gr25
+; n0 gr24
+; d gr23
+
+ .code
+L$0000 .word 0x43f00000
+ .word 0x0
+ .export __udiv_qrnnd
+__udiv_qrnnd
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+ ldo 64(%r30),%r30
+
+ stws %r25,-16(0,%r30) ; n_hi
+ stws %r24,-12(0,%r30) ; n_lo
+ ldil L'L$0000,%r19
+ ldo R'L$0000(%r19),%r19
+ fldds -16(0,%r30),%fr5
+ stws %r23,-12(0,%r30)
+ comib,<= 0,%r25,L$1
+ fcnvxf,dbl,dbl %fr5,%fr5
+ fldds 0(0,%r19),%fr4
+ fadd,dbl %fr4,%fr5,%fr5
+L$1
+ fcpy,sgl %fr0,%fr6L
+ fldws -12(0,%r30),%fr6R
+ fcnvxf,dbl,dbl %fr6,%fr4
+
+ fdiv,dbl %fr5,%fr4,%fr5
+
+ fcnvfx,dbl,dbl %fr5,%fr4
+ fstws %fr4R,-16(%r30)
+ xmpyu %fr4R,%fr6R,%fr6
+ ldws -16(%r30),%r28
+ fstds %fr6,-16(0,%r30)
+ ldws -12(0,%r30),%r21
+ ldws -16(0,%r30),%r20
+ sub %r24,%r21,%r22
+ subb %r25,%r20,%r19
+ comib,= 0,%r19,L$2
+ ldo -64(%r30),%r30
+
+ add %r22,%r23,%r22
+ ldo -1(%r28),%r28
+L$2 bv 0(%r2)
+ stws %r22,0(0,%r26)
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/lshift.s b/sysdeps/hppa/lshift.s
new file mode 100644
index 0000000..0479f4a
--- /dev/null
+++ b/sysdeps/hppa/lshift.s
@@ -0,0 +1,65 @@
+; HP-PA __mpn_lshift --
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr gr26
+; s_ptr gr25
+; size gr24
+; cnt gr23
+
+ .code
+ .export __mpn_lshift
+__mpn_lshift
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+
+ sh2add %r24,%r25,%r25
+ sh2add %r24,%r26,%r26
+ ldws,mb -4(0,%r25),%r22
+ subi 32,%r23,%r1
+ mtsar %r1
+ addib,= -1,%r24,L$0004
+ vshd %r0,%r22,%r28 ; compute carry out limb
+ ldws,mb -4(0,%r25),%r29
+ addib,= -1,%r24,L$0002
+ vshd %r22,%r29,%r20
+
+L$loop ldws,mb -4(0,%r25),%r22
+ stws,mb %r20,-4(0,%r26)
+ addib,= -1,%r24,L$0003
+ vshd %r29,%r22,%r20
+ ldws,mb -4(0,%r25),%r29
+ stws,mb %r20,-4(0,%r26)
+ addib,<> -1,%r24,L$loop
+ vshd %r22,%r29,%r20
+
+L$0002 stws,mb %r20,-4(0,%r26)
+ vshd %r29,%r0,%r20
+ bv 0(%r2)
+ stw %r20,-4(0,%r26)
+L$0003 stws,mb %r20,-4(0,%r26)
+L$0004 vshd %r22,%r0,%r20
+ bv 0(%r2)
+ stw %r20,-4(0,%r26)
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/rshift.s b/sysdeps/hppa/rshift.s
new file mode 100644
index 0000000..18d33f2
--- /dev/null
+++ b/sysdeps/hppa/rshift.s
@@ -0,0 +1,62 @@
+; HP-PA __mpn_rshift --
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr gr26
+; s_ptr gr25
+; size gr24
+; cnt gr23
+
+ .code
+ .export __mpn_rshift
+__mpn_rshift
+ .proc
+ .callinfo frame=64,no_calls
+ .entry
+
+ ldws,ma 4(0,%r25),%r22
+ mtsar %r23
+ addib,= -1,%r24,L$0004
+ vshd %r22,%r0,%r28 ; compute carry out limb
+ ldws,ma 4(0,%r25),%r29
+ addib,= -1,%r24,L$0002
+ vshd %r29,%r22,%r20
+
+L$loop ldws,ma 4(0,%r25),%r22
+ stws,ma %r20,4(0,%r26)
+ addib,= -1,%r24,L$0003
+ vshd %r22,%r29,%r20
+ ldws,ma 4(0,%r25),%r29
+ stws,ma %r20,4(0,%r26)
+ addib,<> -1,%r24,L$loop
+ vshd %r29,%r22,%r20
+
+L$0002 stws,ma %r20,4(0,%r26)
+ vshd %r0,%r29,%r20
+ bv 0(%r2)
+ stw %r20,0(0,%r26)
+L$0003 stws,ma %r20,4(0,%r26)
+L$0004 vshd %r0,%r22,%r20
+ bv 0(%r2)
+ stw %r20,0(0,%r26)
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/sub_n.s b/sysdeps/hppa/sub_n.s
new file mode 100644
index 0000000..daae46e
--- /dev/null
+++ b/sysdeps/hppa/sub_n.s
@@ -0,0 +1,58 @@
+; HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+; store difference in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr gr26
+; s1_ptr gr25
+; s2_ptr gr24
+; size gr23
+
+; One might want to unroll this as for other processors, but it turns
+; out that the data cache contention after a store makes such
+; unrolling useless. We can't come under 5 cycles/limb anyway.
+
+ .code
+ .export __mpn_sub_n
+__mpn_sub_n
+ .proc
+ .callinfo frame=0,no_calls
+ .entry
+
+ ldws,ma 4(0,%r25),%r20
+ ldws,ma 4(0,%r24),%r19
+
+ addib,= -1,%r23,L$end ; check for (SIZE == 1)
+ sub %r20,%r19,%r28 ; subtract first limbs ignoring cy
+
+L$loop ldws,ma 4(0,%r25),%r20
+ ldws,ma 4(0,%r24),%r19
+ stws,ma %r28,4(0,%r26)
+ addib,<> -1,%r23,L$loop
+ subb %r20,%r19,%r28
+
+L$end stws %r28,0(0,%r26)
+ addc %r0,%r0,%r28
+ bv 0(%r2)
+ subi 1,%r28,%r28
+
+ .exit
+ .procend
diff --git a/sysdeps/hppa/udiv_qrnnd.s b/sysdeps/hppa/udiv_qrnnd.s
new file mode 100644
index 0000000..0b069bf
--- /dev/null
+++ b/sysdeps/hppa/udiv_qrnnd.s
@@ -0,0 +1,285 @@
+; HP-PA __udiv_qrnnd division support, used from longlong.h.
+; This version runs fast on pre-PA7000 CPUs.
+
+; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; rem_ptr gr26
+; n1 gr25
+; n0 gr24
+; d gr23
+
+; The code size is a bit excessive. We could merge the last two ds;addc
+; sequences by simply moving the "bb,< Odd" instruction down. The only
+; trouble is the FFFFFFFF code that would need some hacking.
+
+ .code
+ .export __udiv_qrnnd
+__udiv_qrnnd
+ .proc
+ .callinfo frame=0,no_calls
+ .entry
+
+ comb,< %r23,0,L$largedivisor
+ sub %r0,%r23,%r1 ; clear cy as side-effect
+ ds %r0,%r1,%r0
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r23,%r25
+ addc %r24,%r24,%r28
+ ds %r25,%r23,%r25
+ comclr,>= %r25,%r0,%r0
+ addl %r25,%r23,%r25
+ stws %r25,0(0,%r26)
+ bv 0(%r2)
+ addc %r28,%r28,%r28
+
+L$largedivisor
+ extru %r24,31,1,%r19 ; r19 = n0 & 1
+ bb,< %r23,31,L$odd
+ extru %r23,30,31,%r22 ; r22 = d >> 1
+ shd %r25,%r24,1,%r24 ; r24 = new n0
+ extru %r25,30,31,%r25 ; r25 = new n1
+ sub %r0,%r22,%r21
+ ds %r0,%r21,%r0
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ comclr,>= %r25,%r0,%r0
+ addl %r25,%r22,%r25
+ sh1addl %r25,%r19,%r25
+ stws %r25,0(0,%r26)
+ bv 0(%r2)
+ addc %r24,%r24,%r28
+
+L$odd addib,sv,n 1,%r22,L$FF.. ; r22 = (d / 2 + 1)
+ shd %r25,%r24,1,%r24 ; r24 = new n0
+ extru %r25,30,31,%r25 ; r25 = new n1
+ sub %r0,%r22,%r21
+ ds %r0,%r21,%r0
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r24
+ ds %r25,%r22,%r25
+ addc %r24,%r24,%r28
+ comclr,>= %r25,%r0,%r0
+ addl %r25,%r22,%r25
+ sh1addl %r25,%r19,%r25
+; We have computed (n1,,n0) / (d + 1), q' = r28, r' = r25
+ add,nuv %r28,%r25,%r25
+ addl %r25,%r1,%r25
+ addc %r0,%r28,%r28
+ sub,<< %r25,%r23,%r0
+ addl %r25,%r1,%r25
+ stws %r25,0(0,%r26)
+ bv 0(%r2)
+ addc %r0,%r28,%r28
+
+; This is just a special case of the code above.
+; We come here when d == 0xFFFFFFFF
+L$FF.. add,uv %r25,%r24,%r24
+ sub,<< %r24,%r23,%r0
+ ldo 1(%r24),%r24
+ stws %r24,0(0,%r26)
+ bv 0(%r2)
+ addc %r0,%r25,%r28
+
+ .exit
+ .procend
diff --git a/sysdeps/i960/add_n.s b/sysdeps/i960/add_n.s
new file mode 100644
index 0000000..6031f6d
--- /dev/null
+++ b/sysdeps/i960/add_n.s
@@ -0,0 +1,21 @@
+.text
+ .align 4
+ .globl ___mpn_add_n
+___mpn_add_n:
+ mov 0,g6 # clear carry-save register
+ cmpo 1,0 # clear cy
+
+Loop: subo 1,g3,g3 # update loop counter
+ ld (g1),g5 # load from s1_ptr
+ addo 4,g1,g1 # s1_ptr++
+ ld (g2),g4 # load from s2_ptr
+ addo 4,g2,g2 # s2_ptr++
+ cmpo g6,1 # restore cy from g6, relies on cy being 0
+ addc g4,g5,g4 # main add
+ subc 0,0,g6 # save cy in g6
+ st g4,(g0) # store result to res_ptr
+ addo 4,g0,g0 # res_ptr++
+ cmpobne 0,g3,Loop # when branch is taken, clears C bit
+
+ mov g6,g0
+ ret
diff --git a/sysdeps/i960/addmul_1.s b/sysdeps/i960/addmul_1.s
new file mode 100644
index 0000000..1a3de95
--- /dev/null
+++ b/sysdeps/i960/addmul_1.s
@@ -0,0 +1,26 @@
+.text
+ .align 4
+ .globl ___mpn_mul_1
+___mpn_mul_1:
+ subo g2,0,g2
+ shlo 2,g2,g4
+ subo g4,g1,g1
+ subo g4,g0,g13
+ mov 0,g0
+
+ cmpo 1,0 # clear C bit on AC.cc
+
+Loop: ld (g1)[g2*4],g5
+ emul g3,g5,g6
+ ld (g13)[g2*4],g5
+
+ addc g0,g6,g6 # relies on that C bit is clear
+ addc 0,g7,g7
+ addc g5,g6,g6 # relies on that C bit is clear
+ st g6,(g13)[g2*4]
+ addc 0,g7,g0
+
+ addo g2,1,g2
+ cmpobne 0,g2,Loop # when branch is taken, clears C bit
+
+ ret
diff --git a/sysdeps/i960/mul_1.s b/sysdeps/i960/mul_1.s
new file mode 100644
index 0000000..e75ea42
--- /dev/null
+++ b/sysdeps/i960/mul_1.s
@@ -0,0 +1,23 @@
+.text
+ .align 4
+ .globl ___mpn_mul_1
+___mpn_mul_1:
+ subo g2,0,g2
+ shlo 2,g2,g4
+ subo g4,g1,g1
+ subo g4,g0,g13
+ mov 0,g0
+
+ cmpo 1,0 # clear C bit on AC.cc
+
+Loop: ld (g1)[g2*4],g5
+ emul g3,g5,g6
+
+ addc g0,g6,g6 # relies on that C bit is clear
+ st g6,(g13)[g2*4]
+ addc 0,g7,g0
+
+ addo g2,1,g2
+ cmpobne 0,g2,Loop # when branch is taken, clears C bit
+
+ ret
diff --git a/sysdeps/i960/sub_n.s b/sysdeps/i960/sub_n.s
new file mode 100644
index 0000000..13ebbfa
--- /dev/null
+++ b/sysdeps/i960/sub_n.s
@@ -0,0 +1,21 @@
+.text
+ .align 4
+ .globl ___mpn_sub_n
+___mpn_sub_n:
+ mov 1,g6 # set carry-save register
+ cmpo 1,0 # clear cy
+
+Loop: subo 1,g3,g3 # update loop counter
+ ld (g1),g5 # load from s1_ptr
+ addo 4,g1,g1 # s1_ptr++
+ ld (g2),g4 # load from s2_ptr
+ addo 4,g2,g2 # s2_ptr++
+ cmpo g6,1 # restore cy from g6, relies on cy being 0
+ subc g4,g5,g4 # main subtract
+ subc 0,0,g6 # save cy in g6
+ st g4,(g0) # store result to res_ptr
+ addo 4,g0,g0 # res_ptr++
+ cmpobne 0,g3,Loop # when branch is taken, cy will be 0
+
+ mov g6,g0
+ ret
diff --git a/sysdeps/m88k/m88100/add_n.s b/sysdeps/m88k/m88100/add_n.s
new file mode 100644
index 0000000..7e4cccc
--- /dev/null
+++ b/sysdeps/m88k/m88100/add_n.s
@@ -0,0 +1,103 @@
+; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store
+; sum in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100,
+; but on the 88110, it seems to run much slower, 6.6 clocks/limb.
+
+ text
+ align 16
+ global ___mpn_add_n
+___mpn_add_n:
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,3
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,3<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,32
+ st r8,r2,28
+ addu r4,r4,32
+ ld r6,r3,0
+ addu r2,r2,32
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; add 0 + 8r limbs (adj loop cnt)
+Lbase: ld r8,r3,4
+ addu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; add 7 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; add 6 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; add 5 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; add 4 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; add 3 + 8r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; add 2 + 8r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ bcnd.n ne0,r10,Loop ; add 1 + 8r limbs
+ addu.cio r8,r8,r9
+
+ st r8,r2,28 ; store most significant limb
+
+ jmp.n r1
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
diff --git a/sysdeps/m88k/m88100/mul_1.s b/sysdeps/m88k/m88100/mul_1.s
new file mode 100644
index 0000000..35c238d
--- /dev/null
+++ b/sysdeps/m88k/m88100/mul_1.s
@@ -0,0 +1,128 @@
+; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; store the product in a second limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; size r4
+; s2_limb r5
+
+; Common overhead is about 11 cycles/invocation.
+
+; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention.)
+
+; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.)
+
+; To enhance speed:
+; 1. Unroll main loop 4-8 times.
+; 2. Schedule code to avoid WB contention. It might be tempting to move the
+; ld instruction in the loops down to save 2 cycles (less WB contention),
+; but that looses because the ultimate value will be read from outside
+; the allocated space. But if we handle the ultimate multiplication in
+; the tail, we can do this.
+; 3. Make the multiplication with less instructions. I think the code for
+; (S2_LIMB >= 0x10000) is not minimal.
+; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or
+; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11
+; cycles/limb. (Assuming infinite unrolling.)
+
+ text
+ align 16
+ global ___mpn_mul_1
+___mpn_mul_1:
+
+ ; Make S1_PTR and RES_PTR point at the end of their blocks
+ ; and negate SIZE.
+ lda r3,r3[r4]
+ lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval
+ subu r4,r0,r4
+
+ addu.co r2,r0,r0 ; r2 = cy = 0
+ ld r9,r3[r4]
+ mask r7,r5,0xffff ; r7 = lo(S2_LIMB)
+ extu r8,r5,16 ; r8 = hi(S2_LIMB)
+ bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0)
+ subu r6,r6,4
+
+; General code for any value of S2_LIMB.
+
+ ; Make a stack frame and save r25 and r26
+ subu r31,r31,16
+ st.d r25,r31,8
+
+ ; Enter the loop in the middle
+ br.n L1
+ addu r4,r4,1
+
+Loop:
+ ld r9,r3[r4]
+ st r26,r6[r4]
+; bcnd ne0,r0,0 ; bubble
+ addu r4,r4,1
+L1: mul r26,r9,r5 ; low word of product mul_1 WB ld
+ mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1
+ mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1
+ mul r10,r12,r8 ; r10 = prod_1a mul_3
+ extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1
+ mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1
+ mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2
+ extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3
+ addu r10,r10,r11 ; addu_1 WB extu_2
+; bcnd ne0,r0,0 ; bubble WB addu_1
+ addu.co r10,r10,r12 ; WB mul_4
+ mask.u r10,r10,0xffff ; move the 16 most significant bits...
+ addu.ci r10,r10,r0 ; ...to the low half of the word...
+ rot r10,r10,16 ; ...and put carry in pos 16.
+ addu.co r26,r26,r2 ; add old carry limb
+ bcnd.n ne0,r4,Loop
+ addu.ci r2,r25,r10 ; compute new carry limb
+
+ st r26,r6[r4]
+ ld.d r25,r31,8
+ jmp.n r1
+ addu r31,r31,16
+
+; Fast code for S2_LIMB < 0x10000
+Lsmall:
+ ; Enter the loop in the middle
+ br.n SL1
+ addu r4,r4,1
+
+SLoop:
+ ld r9,r3[r4] ;
+ st r8,r6[r4] ;
+ addu r4,r4,1 ;
+SL1: mul r8,r9,r5 ; low word of product
+ mask r12,r9,0xffff ; r12 = lo(s1_limb)
+ extu r13,r9,16 ; r13 = hi(s1_limb)
+ mul r11,r12,r7 ; r11 = prod_0
+ mul r12,r13,r7 ; r12 = prod_1b
+ addu.cio r8,r8,r2 ; add old carry limb
+ extu r10,r11,16 ; r11 = hi(prod_0)
+ addu r10,r10,r12 ;
+ bcnd.n ne0,r4,SLoop
+ extu r2,r10,16 ; r2 = new carry limb
+
+ jmp.n r1
+ st r8,r6[r4]
diff --git a/sysdeps/m88k/m88100/sub_n.s b/sysdeps/m88k/m88100/sub_n.s
new file mode 100644
index 0000000..3963cd5
--- /dev/null
+++ b/sysdeps/m88k/m88100/sub_n.s
@@ -0,0 +1,104 @@
+; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and
+; store difference in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is about 4.6 clocks/limb + 18 clocks/limb-vector on an 88100,
+; but on the 88110, it seems to run much slower, 6.6 clocks/limb.
+
+ text
+ align 16
+ global ___mpn_sub_n
+___mpn_sub_n:
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,3
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,3<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,32
+ st r8,r2,28
+ addu r4,r4,32
+ ld r6,r3,0
+ addu r2,r2,32
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; subtract 0 + 8r limbs (adj loop cnt)
+Lbase: ld r8,r3,4
+ subu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; subtract 7 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; subtract 6 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; subtract 5 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; subtract 4 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; subtract 3 + 8r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; subtract 2 + 8r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ bcnd.n ne0,r10,Loop ; subtract 1 + 8r limbs
+ subu.cio r8,r8,r9
+
+ st r8,r2,28 ; store most significant limb
+
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
diff --git a/sysdeps/m88k/m88110/mul_1.s b/sysdeps/m88k/m88110/mul_1.s
new file mode 100644
index 0000000..08c3ca0
--- /dev/null
+++ b/sysdeps/m88k/m88110/mul_1.s
@@ -0,0 +1,84 @@
+; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; store the product in a second limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU Library General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or (at your
+; option) any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful, but
+; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+; License for more details.
+
+; You should have received a copy of the GNU Library General Public License
+; along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; size r4
+; s2_limb r5
+
+ text
+ align 16
+ global ___mpn_mul_1
+___mpn_mul_1:
+ ; Make S1_PTR and RES_PTR point at the end of their blocks
+ ; and negate SIZE.
+ lda r3,r3[r4]
+ lda r8,r2[r4] ; RES_PTR in r8 since r2 is retval
+ subu r4,r0,r4
+
+ addu.co r2,r0,r0 ; r2 = cy = 0
+
+ ld r6,r3[r4]
+ addu r4,r4,1
+ mulu.d r10,r6,r5
+ bcnd.n eq0,r4,Lend
+ subu r8,r8,8
+
+Loop: ld r6,r3[r4]
+ addu.cio r9,r11,r2
+ or r2,r10,r0 ; could be avoided if unrolled
+ addu r4,r4,1
+ mulu.d r10,r6,r5
+ bcnd.n ne0,r4,Loop
+ st r9,r8[r4]
+
+Lend: addu.cio r9,r11,r2
+ st r9,r8,4
+ jmp.n r1
+ addu.ci r2,r10,r0
+
+; This is the Right Way to do this on '110. 4 cycles / 64-bit limb.
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d ,r11,r5
+; ld.d r12,
+; mulu.d ,r10,r5
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
diff --git a/sysdeps/mips/add_n.s b/sysdeps/mips/add_n.s
new file mode 100644
index 0000000..c829108
--- /dev/null
+++ b/sysdeps/mips/add_n.s
@@ -0,0 +1,119 @@
+ # MIPS2 __mpn_add_n -- Add two limb vectors of the same length > 0 and
+ # store sum in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # s2_ptr $6
+ # size $7
+
+ .text
+ .align 2
+ .globl __mpn_add_n
+ .ent __mpn_add_n
+__mpn_add_n:
+ .set noreorder
+ .set nomacro
+
+ lw $10,0($5)
+ lw $11,0($6)
+
+ addiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ subu $7,$7,$9
+
+.Loop0: addiu $9,$9,-1
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ or $2,$2,$8
+
+ addiu $5,$5,4
+ addiu $6,$6,4
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ addiu $4,$4,4
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: addiu $7,$7,-4
+
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ or $2,$2,$8
+
+ lw $10,8($5)
+ addu $13,$13,$2
+ lw $11,8($6)
+ sltu $8,$13,$2
+ addu $13,$12,$13
+ sltu $2,$13,$12
+ sw $13,4($4)
+ or $2,$2,$8
+
+ lw $12,12($5)
+ addu $11,$11,$2
+ lw $13,12($6)
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,8($4)
+ or $2,$2,$8
+
+ lw $10,16($5)
+ addu $13,$13,$2
+ lw $11,16($6)
+ sltu $8,$13,$2
+ addu $13,$12,$13
+ sltu $2,$13,$12
+ sw $13,12($4)
+ or $2,$2,$8
+
+ addiu $5,$5,16
+ addiu $6,$6,16
+
+ bne $7,$0,.Loop
+ addiu $4,$4,16
+
+.Lend: addu $11,$11,$2
+ sltu $8,$11,$2
+ addu $11,$10,$11
+ sltu $2,$11,$10
+ sw $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_add_n
diff --git a/sysdeps/mips/addmul_1.s b/sysdeps/mips/addmul_1.s
new file mode 100644
index 0000000..abc2fb8
--- /dev/null
+++ b/sysdeps/mips/addmul_1.s
@@ -0,0 +1,96 @@
+ # MIPS __mpn_addmul_1 -- Multiply a limb vector with a single limb and
+ # add the product to a second limb vector.
+
+ # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1
+__mpn_addmul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ lw $8,0($5)
+
+ # warm up phase 1
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) # load new s1 limb as early as possible
+
+Loop: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addiu $5,$5,4
+ addu $3,$3,$2 # add old carry limb to low product limb
+ multu $8,$7
+ lw $8,0($5) # load new s1 limb as early as possible
+ addiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop # should be "bnel"
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ multu $8,$7
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ addu $3,$10,$3
+ sltu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ j $31
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_addmul_1
diff --git a/sysdeps/mips/lshift.s b/sysdeps/mips/lshift.s
new file mode 100644
index 0000000..ce33e7c
--- /dev/null
+++ b/sysdeps/mips/lshift.s
@@ -0,0 +1,94 @@
+ # MIPS2 __mpn_lshift --
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # src_ptr $5
+ # size $6
+ # cnt $7
+
+ .text
+ .align 2
+ .globl __mpn_lshift
+ .ent __mpn_lshift
+__mpn_lshift:
+ .set noreorder
+ .set nomacro
+
+ sll $2,$6,2
+ addu $5,$5,$2 # make r5 point at end of src
+ lw $10,-4($5) # load first limb
+ subu $13,$0,$7
+ addu $4,$4,$2 # make r4 point at end of res
+ addiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ srl $2,$10,$13 # compute function result
+
+ subu $6,$6,$9
+
+.Loop0: lw $3,-8($5)
+ addiu $4,$4,-4
+ addiu $5,$5,-4
+ addiu $9,$9,-1
+ sll $11,$10,$7
+ srl $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sw $8,0($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: lw $3,-8($5)
+ addiu $4,$4,-16
+ addiu $6,$6,-4
+ sll $11,$10,$7
+ srl $12,$3,$13
+
+ lw $10,-12($5)
+ sll $14,$3,$7
+ or $8,$11,$12
+ sw $8,12($4)
+ srl $9,$10,$13
+
+ lw $3,-16($5)
+ sll $11,$10,$7
+ or $8,$14,$9
+ sw $8,8($4)
+ srl $12,$3,$13
+
+ lw $10,-20($5)
+ sll $14,$3,$7
+ or $8,$11,$12
+ sw $8,4($4)
+ srl $9,$10,$13
+
+ addiu $5,$5,-16
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sw $8,0($4)
+
+.Lend: sll $8,$10,$7
+ j $31
+ sw $8,-4($4)
+ .end __mpn_lshift
diff --git a/sysdeps/mips/mips3/add_n.s b/sysdeps/mips/mips3/add_n.s
new file mode 100644
index 0000000..b525780
--- /dev/null
+++ b/sysdeps/mips/mips3/add_n.s
@@ -0,0 +1,119 @@
+ # MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
+ # store sum in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # s2_ptr $6
+ # size $7
+
+ .text
+ .align 2
+ .globl __mpn_add_n
+ .ent __mpn_add_n
+__mpn_add_n:
+ .set noreorder
+ .set nomacro
+
+ ld $10,0($5)
+ ld $11,0($6)
+
+ daddiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ dsubu $7,$7,$9
+
+.Loop0: daddiu $9,$9,-1
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,8
+ daddiu $6,$6,8
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ daddiu $4,$4,8
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: daddiu $7,$7,-4
+
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ or $2,$2,$8
+
+ ld $10,16($5)
+ daddu $13,$13,$2
+ ld $11,16($6)
+ sltu $8,$13,$2
+ daddu $13,$12,$13
+ sltu $2,$13,$12
+ sd $13,8($4)
+ or $2,$2,$8
+
+ ld $12,24($5)
+ daddu $11,$11,$2
+ ld $13,24($6)
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,16($4)
+ or $2,$2,$8
+
+ ld $10,32($5)
+ daddu $13,$13,$2
+ ld $11,32($6)
+ sltu $8,$13,$2
+ daddu $13,$12,$13
+ sltu $2,$13,$12
+ sd $13,24($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,32
+ daddiu $6,$6,32
+
+ bne $7,$0,.Loop
+ daddiu $4,$4,32
+
+.Lend: daddu $11,$11,$2
+ sltu $8,$11,$2
+ daddu $11,$10,$11
+ sltu $2,$11,$10
+ sd $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_add_n
diff --git a/sysdeps/mips/mips3/addmul_1.s b/sysdeps/mips/mips3/addmul_1.s
new file mode 100644
index 0000000..7af0172
--- /dev/null
+++ b/sysdeps/mips/mips3/addmul_1.s
@@ -0,0 +1,96 @@
+ # MIPS3 __mpn_addmul_1 -- Multiply a limb vector with a single limb and
+ # add the product to a second limb vector.
+
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_addmul_1
+ .ent __mpn_addmul_1
+__mpn_addmul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $3,$3,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop # should be "bnel"
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dmultu $8,$7
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ daddu $3,$10,$3
+ sltu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_addmul_1
diff --git a/sysdeps/mips/mips3/lshift.s b/sysdeps/mips/mips3/lshift.s
new file mode 100644
index 0000000..c05dcaf
--- /dev/null
+++ b/sysdeps/mips/mips3/lshift.s
@@ -0,0 +1,94 @@
+ # MIPS3 __mpn_lshift --
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # src_ptr $5
+ # size $6
+ # cnt $7
+
+ .text
+ .align 2
+ .globl __mpn_lshift
+ .ent __mpn_lshift
+__mpn_lshift:
+ .set noreorder
+ .set nomacro
+
+ dsll $2,$6,3
+ daddu $5,$5,$2 # make r5 point at end of src
+ ld $10,-8($5) # load first limb
+ dsubu $13,$0,$7
+ daddu $4,$4,$2 # make r4 point at end of res
+ daddiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ dsrl $2,$10,$13 # compute function result
+
+ dsubu $6,$6,$9
+
+.Loop0: ld $3,-16($5)
+ daddiu $4,$4,-8
+ daddiu $5,$5,-8
+ daddiu $9,$9,-1
+ dsll $11,$10,$7
+ dsrl $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sd $8,0($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: ld $3,-16($5)
+ daddiu $4,$4,-32
+ daddiu $6,$6,-4
+ dsll $11,$10,$7
+ dsrl $12,$3,$13
+
+ ld $10,-24($5)
+ dsll $14,$3,$7
+ or $8,$11,$12
+ sd $8,24($4)
+ dsrl $9,$10,$13
+
+ ld $3,-32($5)
+ dsll $11,$10,$7
+ or $8,$14,$9
+ sd $8,16($4)
+ dsrl $12,$3,$13
+
+ ld $10,-40($5)
+ dsll $14,$3,$7
+ or $8,$11,$12
+ sd $8,8($4)
+ dsrl $9,$10,$13
+
+ daddiu $5,$5,-32
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sd $8,0($4)
+
+.Lend: dsll $8,$10,$7
+ j $31
+ sd $8,-8($4)
+ .end __mpn_lshift
diff --git a/sysdeps/mips/mips3/mul_1.s b/sysdeps/mips/mips3/mul_1.s
new file mode 100644
index 0000000..87954e5
--- /dev/null
+++ b/sysdeps/mips/mips3/mul_1.s
@@ -0,0 +1,84 @@
+ # MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+ # store the product in a second limb vector.
+
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_mul_1
+ .ent __mpn_mul_1
+__mpn_mul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: mflo $10
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $10,$10,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$10,$2 # carry from previous addition -> $2
+ sd $10,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop # should be "bnel"
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: mflo $10
+ mfhi $9
+ daddu $10,$10,$2
+ sltu $2,$10,$2
+ dmultu $8,$7
+ sd $10,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: mflo $10
+ mfhi $9
+ daddu $10,$10,$2
+ sltu $2,$10,$2
+ sd $10,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_mul_1
diff --git a/sysdeps/mips/mips3/rshift.s b/sysdeps/mips/mips3/rshift.s
new file mode 100644
index 0000000..e0e2ca2
--- /dev/null
+++ b/sysdeps/mips/mips3/rshift.s
@@ -0,0 +1,91 @@
+ # MIPS3 __mpn_rshift --
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # src_ptr $5
+ # size $6
+ # cnt $7
+
+ .text
+ .align 2
+ .globl __mpn_rshift
+ .ent __mpn_rshift
+__mpn_rshift:
+ .set noreorder
+ .set nomacro
+
+ ld $10,0($5) # load first limb
+ dsubu $13,$0,$7
+ daddiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ dsll $2,$10,$13 # compute function result
+
+ dsubu $6,$6,$9
+
+.Loop0: ld $3,8($5)
+ daddiu $4,$4,8
+ daddiu $5,$5,8
+ daddiu $9,$9,-1
+ dsrl $11,$10,$7
+ dsll $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sd $8,-8($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: ld $3,8($5)
+ daddiu $4,$4,32
+ daddiu $6,$6,-4
+ dsrl $11,$10,$7
+ dsll $12,$3,$13
+
+ ld $10,16($5)
+ dsrl $14,$3,$7
+ or $8,$11,$12
+ sd $8,-32($4)
+ dsll $9,$10,$13
+
+ ld $3,24($5)
+ dsrl $11,$10,$7
+ or $8,$14,$9
+ sd $8,-24($4)
+ dsll $12,$3,$13
+
+ ld $10,32($5)
+ dsrl $14,$3,$7
+ or $8,$11,$12
+ sd $8,-16($4)
+ dsll $9,$10,$13
+
+ daddiu $5,$5,32
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sd $8,-8($4)
+
+.Lend: dsrl $8,$10,$7
+ j $31
+ sd $8,0($4)
+ .end __mpn_rshift
diff --git a/sysdeps/mips/mips3/sub_n.s b/sysdeps/mips/mips3/sub_n.s
new file mode 100644
index 0000000..9a45ffd
--- /dev/null
+++ b/sysdeps/mips/mips3/sub_n.s
@@ -0,0 +1,119 @@
+ # MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ # store difference in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # s2_ptr $6
+ # size $7
+
+ .text
+ .align 2
+ .globl __mpn_sub_n
+ .ent __mpn_sub_n
+__mpn_sub_n:
+ .set noreorder
+ .set nomacro
+
+ ld $10,0($5)
+ ld $11,0($6)
+
+ daddiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ dsubu $7,$7,$9
+
+.Loop0: daddiu $9,$9,-1
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,8
+ daddiu $6,$6,8
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ daddiu $4,$4,8
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: daddiu $7,$7,-4
+
+ ld $12,8($5)
+ daddu $11,$11,$2
+ ld $13,8($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ or $2,$2,$8
+
+ ld $10,16($5)
+ daddu $13,$13,$2
+ ld $11,16($6)
+ sltu $8,$13,$2
+ dsubu $13,$12,$13
+ sltu $2,$12,$13
+ sd $13,8($4)
+ or $2,$2,$8
+
+ ld $12,24($5)
+ daddu $11,$11,$2
+ ld $13,24($6)
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,16($4)
+ or $2,$2,$8
+
+ ld $10,32($5)
+ daddu $13,$13,$2
+ ld $11,32($6)
+ sltu $8,$13,$2
+ dsubu $13,$12,$13
+ sltu $2,$12,$13
+ sd $13,24($4)
+ or $2,$2,$8
+
+ daddiu $5,$5,32
+ daddiu $6,$6,32
+
+ bne $7,$0,.Loop
+ daddiu $4,$4,32
+
+.Lend: daddu $11,$11,$2
+ sltu $8,$11,$2
+ dsubu $11,$10,$11
+ sltu $2,$10,$11
+ sd $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_sub_n
diff --git a/sysdeps/mips/mips3/submul_1.s b/sysdeps/mips/mips3/submul_1.s
new file mode 100644
index 0000000..f28c6a5
--- /dev/null
+++ b/sysdeps/mips/mips3/submul_1.s
@@ -0,0 +1,96 @@
+ # MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
+ # subtract the product from a second limb vector.
+
+ # Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_submul_1
+ .ent __mpn_submul_1
+__mpn_submul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ ld $8,0($5)
+
+ # warm up phase 1
+ daddiu $5,$5,8
+ dmultu $8,$7
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ daddiu $6,$6,-1
+ beq $6,$0,$LC1
+ ld $8,0($5) # load new s1 limb as early as possible
+
+Loop: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddiu $5,$5,8
+ daddu $3,$3,$2 # add old carry limb to low product limb
+ dmultu $8,$7
+ ld $8,0($5) # load new s1 limb as early as possible
+ daddiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ bne $6,$0,Loop # should be "bnel"
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dmultu $8,$7
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ daddiu $4,$4,8
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: ld $10,0($4)
+ mflo $3
+ mfhi $9
+ daddu $3,$3,$2
+ sltu $2,$3,$2
+ dsubu $3,$10,$3
+ sgtu $10,$3,$10
+ daddu $2,$2,$10
+ sd $3,0($4)
+ j $31
+ daddu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_submul_1
diff --git a/sysdeps/mips/mul_1.s b/sysdeps/mips/mul_1.s
new file mode 100644
index 0000000..01327e2
--- /dev/null
+++ b/sysdeps/mips/mul_1.s
@@ -0,0 +1,84 @@
+ # MIPS __mpn_mul_1 -- Multiply a limb vector with a single limb and
+ # store the product in a second limb vector.
+
+ # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_mul_1
+ .ent __mpn_mul_1
+__mpn_mul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ lw $8,0($5)
+
+ # warm up phase 1
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) # load new s1 limb as early as possible
+
+Loop: mflo $10
+ mfhi $9
+ addiu $5,$5,4
+ addu $10,$10,$2 # add old carry limb to low product limb
+ multu $8,$7
+ lw $8,0($5) # load new s1 limb as early as possible
+ addiu $6,$6,-1 # decrement loop counter
+ sltu $2,$10,$2 # carry from previous addition -> $2
+ sw $10,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop # should be "bnel"
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: mflo $10
+ mfhi $9
+ addu $10,$10,$2
+ sltu $2,$10,$2
+ multu $8,$7
+ sw $10,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: mflo $10
+ mfhi $9
+ addu $10,$10,$2
+ sltu $2,$10,$2
+ sw $10,0($4)
+ j $31
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_mul_1
diff --git a/sysdeps/mips/rshift.s b/sysdeps/mips/rshift.s
new file mode 100644
index 0000000..6941691
--- /dev/null
+++ b/sysdeps/mips/rshift.s
@@ -0,0 +1,91 @@
+ # MIPS2 __mpn_rshift --
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # src_ptr $5
+ # size $6
+ # cnt $7
+
+ .text
+ .align 2
+ .globl __mpn_rshift
+ .ent __mpn_rshift
+__mpn_rshift:
+ .set noreorder
+ .set nomacro
+
+ lw $10,0($5) # load first limb
+ subu $13,$0,$7
+ addiu $6,$6,-1
+ and $9,$6,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ sll $2,$10,$13 # compute function result
+
+ subu $6,$6,$9
+
+.Loop0: lw $3,4($5)
+ addiu $4,$4,4
+ addiu $5,$5,4
+ addiu $9,$9,-1
+ srl $11,$10,$7
+ sll $12,$3,$13
+ move $10,$3
+ or $8,$11,$12
+ bne $9,$0,.Loop0
+ sw $8,-4($4)
+
+.L0: beq $6,$0,.Lend
+ nop
+
+.Loop: lw $3,4($5)
+ addiu $4,$4,16
+ addiu $6,$6,-4
+ srl $11,$10,$7
+ sll $12,$3,$13
+
+ lw $10,8($5)
+ srl $14,$3,$7
+ or $8,$11,$12
+ sw $8,-16($4)
+ sll $9,$10,$13
+
+ lw $3,12($5)
+ srl $11,$10,$7
+ or $8,$14,$9
+ sw $8,-12($4)
+ sll $12,$3,$13
+
+ lw $10,16($5)
+ srl $14,$3,$7
+ or $8,$11,$12
+ sw $8,-8($4)
+ sll $9,$10,$13
+
+ addiu $5,$5,16
+ or $8,$14,$9
+ bgtz $6,.Loop
+ sw $8,-4($4)
+
+.Lend: srl $8,$10,$7
+ j $31
+ sw $8,0($4)
+ .end __mpn_rshift
diff --git a/sysdeps/mips/sub_n.s b/sysdeps/mips/sub_n.s
new file mode 100644
index 0000000..63f3b55
--- /dev/null
+++ b/sysdeps/mips/sub_n.s
@@ -0,0 +1,119 @@
+ # MIPS2 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ # store difference in a third limb vector.
+
+ # Copyright (C) 1995 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # s2_ptr $6
+ # size $7
+
+ .text
+ .align 2
+ .globl __mpn_sub_n
+ .ent __mpn_sub_n
+__mpn_sub_n:
+ .set noreorder
+ .set nomacro
+
+ lw $10,0($5)
+ lw $11,0($6)
+
+ addiu $7,$7,-1
+ and $9,$7,4-1 # number of limbs in first loop
+ beq $9,$0,.L0 # if multiple of 4 limbs, skip first loop
+ move $2,$0
+
+ subu $7,$7,$9
+
+.Loop0: addiu $9,$9,-1
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ or $2,$2,$8
+
+ addiu $5,$5,4
+ addiu $6,$6,4
+ move $10,$12
+ move $11,$13
+ bne $9,$0,.Loop0
+ addiu $4,$4,4
+
+.L0: beq $7,$0,.Lend
+ nop
+
+.Loop: addiu $7,$7,-4
+
+ lw $12,4($5)
+ addu $11,$11,$2
+ lw $13,4($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ or $2,$2,$8
+
+ lw $10,8($5)
+ addu $13,$13,$2
+ lw $11,8($6)
+ sltu $8,$13,$2
+ subu $13,$12,$13
+ sltu $2,$12,$13
+ sw $13,4($4)
+ or $2,$2,$8
+
+ lw $12,12($5)
+ addu $11,$11,$2
+ lw $13,12($6)
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,8($4)
+ or $2,$2,$8
+
+ lw $10,16($5)
+ addu $13,$13,$2
+ lw $11,16($6)
+ sltu $8,$13,$2
+ subu $13,$12,$13
+ sltu $2,$12,$13
+ sw $13,12($4)
+ or $2,$2,$8
+
+ addiu $5,$5,16
+ addiu $6,$6,16
+
+ bne $7,$0,.Loop
+ addiu $4,$4,16
+
+.Lend: addu $11,$11,$2
+ sltu $8,$11,$2
+ subu $11,$10,$11
+ sltu $2,$10,$11
+ sw $11,0($4)
+ j $31
+ or $2,$2,$8
+
+ .end __mpn_sub_n
diff --git a/sysdeps/mips/submul_1.s b/sysdeps/mips/submul_1.s
new file mode 100644
index 0000000..616dd1b
--- /dev/null
+++ b/sysdeps/mips/submul_1.s
@@ -0,0 +1,96 @@
+ # MIPS __mpn_submul_1 -- Multiply a limb vector with a single limb and
+ # subtract the product from a second limb vector.
+
+ # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ # INPUT PARAMETERS
+ # res_ptr $4
+ # s1_ptr $5
+ # size $6
+ # s2_limb $7
+
+ .text
+ .align 4
+ .globl __mpn_submul_1
+ .ent __mpn_submul_1
+__mpn_submul_1:
+ .set noreorder
+ .set nomacro
+
+ # warm up phase 0
+ lw $8,0($5)
+
+ # warm up phase 1
+ addiu $5,$5,4
+ multu $8,$7
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC0
+ move $2,$0 # zero cy2
+
+ addiu $6,$6,-1
+ beq $6,$0,$LC1
+ lw $8,0($5) # load new s1 limb as early as possible
+
+Loop: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addiu $5,$5,4
+ addu $3,$3,$2 # add old carry limb to low product limb
+ multu $8,$7
+ lw $8,0($5) # load new s1 limb as early as possible
+ addiu $6,$6,-1 # decrement loop counter
+ sltu $2,$3,$2 # carry from previous addition -> $2
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ bne $6,$0,Loop # should be "bnel"
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 1
+$LC1: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ multu $8,$7
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ addiu $4,$4,4
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ # cool down phase 0
+$LC0: lw $10,0($4)
+ mflo $3
+ mfhi $9
+ addu $3,$3,$2
+ sltu $2,$3,$2
+ subu $3,$10,$3
+ sgtu $10,$3,$10
+ addu $2,$2,$10
+ sw $3,0($4)
+ j $31
+ addu $2,$9,$2 # add high product limb and carry from addition
+
+ .end __mpn_submul_1
diff --git a/sysdeps/rs6000/add_n.s b/sysdeps/rs6000/add_n.s
new file mode 100644
index 0000000..34ad9e1
--- /dev/null
+++ b/sysdeps/rs6000/add_n.s
@@ -0,0 +1,54 @@
+# IBM POWER __mpn_add_n -- Add two limb vectors of equal, non-zero length.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s1_ptr r4
+# s2_ptr r5
+# size r6
+
+ .toc
+ .extern __mpn_add_n[DS]
+ .extern .__mpn_add_n
+.csect [PR]
+ .align 2
+ .globl __mpn_add_n
+ .globl .__mpn_add_n
+ .csect __mpn_add_n[DS]
+__mpn_add_n:
+ .long .__mpn_add_n, TOC[tc0], 0
+ .csect [PR]
+.__mpn_add_n:
+ mtctr 6 # copy size into CTR
+ l 8,0(4) # load least significant s1 limb
+ l 0,0(5) # load least significant s2 limb
+ cal 3,-4(3) # offset res_ptr, it's updated before used
+ a 7,0,8 # add least significant limbs, set cy
+ bdz Lend # If done, skip loop
+Loop: lu 8,4(4) # load s1 limb and update s1_ptr
+ lu 0,4(5) # load s2 limb and update s2_ptr
+ stu 7,4(3) # store previous limb in load latecny slot
+ ae 7,0,8 # add new limbs with cy, set cy
+ bdn Loop # decrement CTR and loop back
+Lend: st 7,4(3) # store ultimate result limb
+ lil 3,0 # load cy into ...
+ aze 3,3 # ... return value register
+ br
diff --git a/sysdeps/rs6000/addmul_1.s b/sysdeps/rs6000/addmul_1.s
new file mode 100644
index 0000000..862b613
--- /dev/null
+++ b/sysdeps/rs6000/addmul_1.s
@@ -0,0 +1,122 @@
+# IBM POWER __mpn_addmul_1 -- Multiply a limb vector with a limb and add
+# the result to a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s1_ptr r4
+# size r5
+# s2_limb r6
+
+# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To
+# obtain that operation, we have to use the 32x32->64 signed multiplication
+# instruction, and add the appropriate compensation to the high limb of the
+# result. We add the multiplicand if the multiplier has its most significant
+# bit set, and we add the multiplier if the multiplicand has its most
+# significant bit set. We need to preserve the carry flag between each
+# iteration, so we have to compute the compensation carefully (the natural,
+# srai+and doesn't work). Since the POWER architecture has a branch unit
+# we can branch in zero cycles, so that's how we perform the additions.
+
+ .toc
+ .csect .__mpn_addmul_1[PR]
+ .align 2
+ .globl __mpn_addmul_1
+ .globl .__mpn_addmul_1
+ .csect __mpn_addmul_1[DS]
+__mpn_addmul_1:
+ .long .__mpn_addmul_1[PR], TOC[tc0], 0
+ .csect .__mpn_addmul_1[PR]
+.__mpn_addmul_1:
+
+ cal 3,-4(3)
+ l 0,0(4)
+ cmpi 0,6,0
+ mtctr 5
+ mul 9,0,6
+ srai 7,0,31
+ and 7,7,6
+ mfmq 8
+ cax 9,9,7
+ l 7,4(3)
+ a 8,8,7 # add res_limb
+ blt Lneg
+Lpos: bdz Lend
+
+Lploop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ mfmq 0
+ ae 8,0,9 # low limb + old_cy_limb + old cy
+ l 7,4(3)
+ aze 10,10 # propagate cy to new cy_limb
+ a 8,8,7 # add res_limb
+ bge Lp0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Lp0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ mfmq 0
+ ae 8,0,10
+ l 7,4(3)
+ aze 9,9
+ a 8,8,7
+ bge Lp1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Lp1: bdn Lploop
+
+ b Lend
+
+Lneg: cax 9,9,0
+ bdz Lend
+Lnloop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ mfmq 7
+ ae 8,7,9
+ l 7,4(3)
+ ae 10,10,0 # propagate cy to new cy_limb
+ a 8,8,7 # add res_limb
+ bge Ln0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Ln0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ mfmq 7
+ ae 8,7,10
+ l 7,4(3)
+ ae 9,9,0 # propagate cy to new cy_limb
+ a 8,8,7 # add res_limb
+ bge Ln1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Ln1: bdn Lnloop
+ b Lend
+
+Lend0: cal 9,0(10)
+Lend: st 8,4(3)
+ aze 3,9
+ br
diff --git a/sysdeps/rs6000/lshift.s b/sysdeps/rs6000/lshift.s
new file mode 100644
index 0000000..69c7502
--- /dev/null
+++ b/sysdeps/rs6000/lshift.s
@@ -0,0 +1,58 @@
+# IBM POWER __mpn_lshift --
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s_ptr r4
+# size r5
+# cnt r6
+
+ .toc
+ .extern __mpn_lshift[DS]
+ .extern .__mpn_lshift
+.csect [PR]
+ .align 2
+ .globl __mpn_lshift
+ .globl .__mpn_lshift
+ .csect __mpn_lshift[DS]
+__mpn_lshift:
+ .long .__mpn_lshift, TOC[tc0], 0
+ .csect [PR]
+.__mpn_lshift:
+ sli 0,5,2
+ cax 9,3,0
+ cax 4,4,0
+ sfi 8,6,32
+ mtctr 5 # put limb count in CTR loop register
+ lu 0,-4(4) # read most significant limb
+ sre 3,0,8 # compute carry out limb, and init MQ register
+ bdz Lend2 # if just one limb, skip loop
+ lu 0,-4(4) # read 2:nd most significant limb
+ sreq 7,0,8 # compute most significant limb of result
+ bdz Lend # if just two limb, skip loop
+Loop: lu 0,-4(4) # load next lower limb
+ stu 7,-4(9) # store previous result during read latency
+ sreq 7,0,8 # compute result limb
+ bdn Loop # loop back until CTR is zero
+Lend: stu 7,-4(9) # store 2:nd least significant limb
+Lend2: sle 7,0,6 # compute least significant limb
+ st 7,-4(9) # store it" \
+ br
diff --git a/sysdeps/rs6000/mul_1.s b/sysdeps/rs6000/mul_1.s
new file mode 100644
index 0000000..f4fa894
--- /dev/null
+++ b/sysdeps/rs6000/mul_1.s
@@ -0,0 +1,109 @@
+# IBM POWER __mpn_mul_1 -- Multiply a limb vector with a limb and store
+# the result in a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s1_ptr r4
+# size r5
+# s2_limb r6
+
+# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To
+# obtain that operation, we have to use the 32x32->64 signed multiplication
+# instruction, and add the appropriate compensation to the high limb of the
+# result. We add the multiplicand if the multiplier has its most significant
+# bit set, and we add the multiplier if the multiplicand has its most
+# significant bit set. We need to preserve the carry flag between each
+# iteration, so we have to compute the compensation carefully (the natural,
+# srai+and doesn't work). Since the POWER architecture has a branch unit
+# we can branch in zero cycles, so that's how we perform the additions.
+
+ .toc
+ .csect .__mpn_mul_1[PR]
+ .align 2
+ .globl __mpn_mul_1
+ .globl .__mpn_mul_1
+ .csect __mpn_mul_1[DS]
+__mpn_mul_1:
+ .long .__mpn_mul_1[PR], TOC[tc0], 0
+ .csect .__mpn_mul_1[PR]
+.__mpn_mul_1:
+
+ cal 3,-4(3)
+ l 0,0(4)
+ cmpi 0,6,0
+ mtctr 5
+ mul 9,0,6
+ srai 7,0,31
+ and 7,7,6
+ mfmq 8
+ ai 0,0,0 # reset carry
+ cax 9,9,7
+ blt Lneg
+Lpos: bdz Lend
+Lploop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ mfmq 0
+ ae 8,0,9
+ bge Lp0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Lp0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ mfmq 0
+ ae 8,0,10
+ bge Lp1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Lp1: bdn Lploop
+ b Lend
+
+Lneg: cax 9,9,0
+ bdz Lend
+Lnloop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ cax 10,10,0 # adjust high limb for negative s2_limb
+ mfmq 0
+ ae 8,0,9
+ bge Ln0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Ln0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ cax 9,9,0 # adjust high limb for negative s2_limb
+ mfmq 0
+ ae 8,0,10
+ bge Ln1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Ln1: bdn Lnloop
+ b Lend
+
+Lend0: cal 9,0(10)
+Lend: st 8,4(3)
+ aze 3,9
+ br
diff --git a/sysdeps/rs6000/rshift.s b/sysdeps/rs6000/rshift.s
new file mode 100644
index 0000000..6056acc
--- /dev/null
+++ b/sysdeps/rs6000/rshift.s
@@ -0,0 +1,56 @@
+# IBM POWER __mpn_rshift --
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s_ptr r4
+# size r5
+# cnt r6
+
+ .toc
+ .extern __mpn_rshift[DS]
+ .extern .__mpn_rshift
+.csect [PR]
+ .align 2
+ .globl __mpn_rshift
+ .globl .__mpn_rshift
+ .csect __mpn_rshift[DS]
+__mpn_rshift:
+ .long .__mpn_rshift, TOC[tc0], 0
+ .csect [PR]
+.__mpn_rshift:
+ sfi 8,6,32
+ mtctr 5 # put limb count in CTR loop register
+ l 0,0(4) # read least significant limb
+ ai 9,3,-4 # adjust res_ptr since it's offset in the stu:s
+ sle 3,0,8 # compute carry limb, and init MQ register
+ bdz Lend2 # if just one limb, skip loop
+ lu 0,4(4) # read 2:nd least significant limb
+ sleq 7,0,8 # compute least significant limb of result
+ bdz Lend # if just two limb, skip loop
+Loop: lu 0,4(4) # load next higher limb
+ stu 7,4(9) # store previous result during read latency
+ sleq 7,0,8 # compute result limb
+ bdn Loop # loop back until CTR is zero
+Lend: stu 7,4(9) # store 2:nd most significant limb
+Lend2: sre 7,0,6 # compute most significant limb
+ st 7,4(9) # store it" \
+ br
diff --git a/sysdeps/rs6000/sub_n.s b/sysdeps/rs6000/sub_n.s
new file mode 100644
index 0000000..402fdce
--- /dev/null
+++ b/sysdeps/rs6000/sub_n.s
@@ -0,0 +1,55 @@
+# IBM POWER __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+# store difference in a third limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s1_ptr r4
+# s2_ptr r5
+# size r6
+
+ .toc
+ .extern __mpn_sub_n[DS]
+ .extern .__mpn_sub_n
+.csect [PR]
+ .align 2
+ .globl __mpn_sub_n
+ .globl .__mpn_sub_n
+ .csect __mpn_sub_n[DS]
+__mpn_sub_n:
+ .long .__mpn_sub_n, TOC[tc0], 0
+ .csect [PR]
+.__mpn_sub_n:
+ mtctr 6 # copy size into CTR
+ l 8,0(4) # load least significant s1 limb
+ l 0,0(5) # load least significant s2 limb
+ cal 3,-4(3) # offset res_ptr, it's updated before used
+ sf 7,0,8 # add least significant limbs, set cy
+ bdz Lend # If done, skip loop
+Loop: lu 8,4(4) # load s1 limb and update s1_ptr
+ lu 0,4(5) # load s2 limb and update s2_ptr
+ stu 7,4(3) # store previous limb in load latecny slot
+ sfe 7,0,8 # add new limbs with cy, set cy
+ bdn Loop # decrement CTR and loop back
+Lend: st 7,4(3) # store ultimate result limb
+ sfe 3,0,0 # load !cy into ...
+ sfi 3,3,0 # ... return value register
+ br
diff --git a/sysdeps/rs6000/submul_1.s b/sysdeps/rs6000/submul_1.s
new file mode 100644
index 0000000..2526332
--- /dev/null
+++ b/sysdeps/rs6000/submul_1.s
@@ -0,0 +1,127 @@
+# IBM POWER __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
+# the result from a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr r3
+# s1_ptr r4
+# size r5
+# s2_limb r6
+
+# The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To
+# obtain that operation, we have to use the 32x32->64 signed multiplication
+# instruction, and add the appropriate compensation to the high limb of the
+# result. We add the multiplicand if the multiplier has its most significant
+# bit set, and we add the multiplier if the multiplicand has its most
+# significant bit set. We need to preserve the carry flag between each
+# iteration, so we have to compute the compensation carefully (the natural,
+# srai+and doesn't work). Since the POWER architecture has a branch unit
+# we can branch in zero cycles, so that's how we perform the additions.
+
+ .toc
+ .csect .__mpn_submul_1[PR]
+ .align 2
+ .globl __mpn_submul_1
+ .globl .__mpn_submul_1
+ .csect __mpn_submul_1[DS]
+__mpn_submul_1:
+ .long .__mpn_submul_1[PR], TOC[tc0], 0
+ .csect .__mpn_submul_1[PR]
+.__mpn_submul_1:
+
+ cal 3,-4(3)
+ l 0,0(4)
+ cmpi 0,6,0
+ mtctr 5
+ mul 9,0,6
+ srai 7,0,31
+ and 7,7,6
+ mfmq 11
+ cax 9,9,7
+ l 7,4(3)
+ sf 8,11,7 # add res_limb
+ a 11,8,11 # invert cy (r11 is junk)
+ blt Lneg
+Lpos: bdz Lend
+
+Lploop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ mfmq 0
+ ae 11,0,9 # low limb + old_cy_limb + old cy
+ l 7,4(3)
+ aze 10,10 # propagate cy to new cy_limb
+ sf 8,11,7 # add res_limb
+ a 11,8,11 # invert cy (r11 is junk)
+ bge Lp0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Lp0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ mfmq 0
+ ae 11,0,10
+ l 7,4(3)
+ aze 9,9
+ sf 8,11,7
+ a 11,8,11 # invert cy (r11 is junk)
+ bge Lp1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Lp1: bdn Lploop
+
+ b Lend
+
+Lneg: cax 9,9,0
+ bdz Lend
+Lnloop: lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 10,0,6
+ mfmq 7
+ ae 11,7,9
+ l 7,4(3)
+ ae 10,10,0 # propagate cy to new cy_limb
+ sf 8,11,7 # add res_limb
+ a 11,8,11 # invert cy (r11 is junk)
+ bge Ln0
+ cax 10,10,6 # adjust high limb for negative limb from s1
+Ln0: bdz Lend0
+ lu 0,4(4)
+ stu 8,4(3)
+ cmpi 0,0,0
+ mul 9,0,6
+ mfmq 7
+ ae 11,7,10
+ l 7,4(3)
+ ae 9,9,0 # propagate cy to new cy_limb
+ sf 8,11,7 # add res_limb
+ a 11,8,11 # invert cy (r11 is junk)
+ bge Ln1
+ cax 9,9,6 # adjust high limb for negative limb from s1
+Ln1: bdn Lnloop
+ b Lend
+
+Lend0: cal 9,0(10)
+Lend: st 8,4(3)
+ aze 3,9
+ br
diff --git a/sysdeps/vax/add_n.s b/sysdeps/vax/add_n.s
new file mode 100644
index 0000000..c89b226
--- /dev/null
+++ b/sysdeps/vax/add_n.s
@@ -0,0 +1,47 @@
+# VAX __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+# sum in a third limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr (sp + 4)
+# s1_ptr (sp + 8)
+# s2_ptr (sp + 12)
+# size (sp + 16)
+
+.text
+ .align 1
+.globl ___mpn_add_n
+___mpn_add_n:
+ .word 0x0
+ movl 16(ap),r0
+ movl 12(ap),r1
+ movl 8(ap),r2
+ movl 4(ap),r3
+ subl2 r4,r4
+
+Loop:
+ movl (r2)+,r4
+ adwc (r1)+,r4
+ movl r4,(r3)+
+ jsobgtr r0,Loop
+
+ adwc r0,r0
+ ret
diff --git a/sysdeps/vax/addmul_1.s b/sysdeps/vax/addmul_1.s
new file mode 100644
index 0000000..8e83204
--- /dev/null
+++ b/sysdeps/vax/addmul_1.s
@@ -0,0 +1,125 @@
+# VAX __mpn_addmul_1 -- Multiply a limb vector with a limb and add
+# the result to a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr (sp + 4)
+# s1_ptr (sp + 8)
+# size (sp + 12)
+# s2_limb (sp + 16)
+
+.text
+ .align 1
+.globl ___mpn_addmul_1
+___mpn_addmul_1:
+ .word 0xfc0
+ movl 12(ap),r4
+ movl 8(ap),r8
+ movl 4(ap),r9
+ movl 16(ap),r6
+ jlss s2_big
+
+ clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L1
+ clrl r11
+
+# Loop for S2_LIMB < 0x80000000
+Loop1: movl (r8)+,r1
+ jlss L1n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc $0,r3
+ addl2 r2,(r9)+
+ adwc $0,r3
+L1: movl (r8)+,r1
+ jlss L1n1
+L1p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc $0,r11
+ addl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+L1n0: emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r6,r3
+ addl2 r2,(r9)+
+ adwc $0,r3
+ movl (r8)+,r1
+ jgeq L1p1
+L1n1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r6,r11
+ addl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+
+s2_big: clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L2
+ clrl r11
+
+# Loop for S2_LIMB >= 0x80000000
+Loop2: movl (r8)+,r1
+ jlss L2n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r1,r3
+ addl2 r2,(r9)+
+ adwc $0,r3
+L2: movl (r8)+,r1
+ jlss L2n1
+L2p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r1,r11
+ addl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
+
+L2n0: emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r6,r3
+ addl2 r2,(r9)+
+ adwc r1,r3
+ movl (r8)+,r1
+ jgeq L2p1
+L2n1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r6,r11
+ addl2 r10,(r9)+
+ adwc r1,r11
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
diff --git a/sysdeps/vax/mul_1.s b/sysdeps/vax/mul_1.s
new file mode 100644
index 0000000..3fe375b
--- /dev/null
+++ b/sysdeps/vax/mul_1.s
@@ -0,0 +1,122 @@
+# VAX __mpn_mul_1 -- Multiply a limb vector with a limb and store
+# the result in a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr (sp + 4)
+# s1_ptr (sp + 8)
+# size (sp + 12)
+# s2_limb (sp + 16)
+
+.text
+ .align 1
+.globl ___mpn_mul_1
+___mpn_mul_1:
+ .word 0xfc0
+ movl 12(ap),r4
+ movl 8(ap),r8
+ movl 4(ap),r9
+ movl 16(ap),r6
+ jlss s2_big
+
+# One might want to combine the addl2 and the store below, but that
+# is actually just slower according to my timing tests. (VAX 3600)
+
+ clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L1
+ clrl r11
+
+# Loop for S2_LIMB < 0x80000000
+Loop1: movl (r8)+,r1
+ jlss L1n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc $0,r3
+ movl r2,(r9)+
+L1: movl (r8)+,r1
+ jlss L1n1
+L1p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc $0,r11
+ movl r10,(r9)+
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+L1n0: emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r6,r3
+ movl r2,(r9)+
+ movl (r8)+,r1
+ jgeq L1p1
+L1n1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r6,r11
+ movl r10,(r9)+
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+
+s2_big: clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L2
+ clrl r11
+
+# Loop for S2_LIMB >= 0x80000000
+Loop2: movl (r8)+,r1
+ jlss L2n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r1,r3
+ movl r2,(r9)+
+L2: movl (r8)+,r1
+ jlss L2n1
+L2p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r1,r11
+ movl r10,(r9)+
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
+
+L2n0: emul r1,r6,$0,r2
+ addl2 r1,r3
+ addl2 r11,r2
+ adwc r6,r3
+ movl r2,(r9)+
+ movl (r8)+,r1
+ jgeq L2p1
+L2n1: emul r1,r6,$0,r10
+ addl2 r1,r11
+ addl2 r3,r10
+ adwc r6,r11
+ movl r10,(r9)+
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
diff --git a/sysdeps/vax/sub_n.s b/sysdeps/vax/sub_n.s
new file mode 100644
index 0000000..300b4de
--- /dev/null
+++ b/sysdeps/vax/sub_n.s
@@ -0,0 +1,47 @@
+# VAX __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and store
+# difference in a third limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr (sp + 4)
+# s1_ptr (sp + 8)
+# s2_ptr (sp + 12)
+# size (sp + 16)
+
+.text
+ .align 1
+.globl ___mpn_sub_n
+___mpn_sub_n:
+ .word 0x0
+ movl 16(ap),r0
+ movl 12(ap),r1
+ movl 8(ap),r2
+ movl 4(ap),r3
+ subl2 r4,r4
+
+Loop:
+ movl (r2)+,r4
+ sbwc (r1)+,r4
+ movl r4,(r3)+
+ jsobgtr r0,Loop
+
+ adwc r0,r0
+ ret
diff --git a/sysdeps/vax/submul_1.s b/sysdeps/vax/submul_1.s
new file mode 100644
index 0000000..875cbfd
--- /dev/null
+++ b/sysdeps/vax/submul_1.s
@@ -0,0 +1,125 @@
+# VAX __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
+# the result from a second limb vector.
+
+# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+# This file is part of the GNU MP Library.
+
+# The GNU MP Library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+# The GNU MP Library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+
+# You should have received a copy of the GNU Library General Public License
+# along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# INPUT PARAMETERS
+# res_ptr (sp + 4)
+# s1_ptr (sp + 8)
+# size (sp + 12)
+# s2_limb (sp + 16)
+
+.text
+ .align 1
+.globl ___mpn_submul_1
+___mpn_submul_1:
+ .word 0xfc0
+ movl 12(ap),r4
+ movl 8(ap),r8
+ movl 4(ap),r9
+ movl 16(ap),r6
+ jlss s2_big
+
+ clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L1
+ clrl r11
+
+# Loop for S2_LIMB < 0x80000000
+Loop1: movl (r8)+,r1
+ jlss L1n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc $0,r3
+ subl2 r2,(r9)+
+ adwc $0,r3
+L1: movl (r8)+,r1
+ jlss L1n1
+L1p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc $0,r11
+ subl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+L1n0: emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r6,r3
+ subl2 r2,(r9)+
+ adwc $0,r3
+ movl (r8)+,r1
+ jgeq L1p1
+L1n1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r6,r11
+ subl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop1
+ movl r11,r0
+ ret
+
+
+s2_big: clrl r3
+ incl r4
+ ashl $-1,r4,r7
+ jlbc r4,L2
+ clrl r11
+
+# Loop for S2_LIMB >= 0x80000000
+Loop2: movl (r8)+,r1
+ jlss L2n0
+ emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r1,r3
+ subl2 r2,(r9)+
+ adwc $0,r3
+L2: movl (r8)+,r1
+ jlss L2n1
+L2p1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r1,r11
+ subl2 r10,(r9)+
+ adwc $0,r11
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
+
+L2n0: emul r1,r6,$0,r2
+ addl2 r11,r2
+ adwc r6,r3
+ subl2 r2,(r9)+
+ adwc r1,r3
+ movl (r8)+,r1
+ jgeq L2p1
+L2n1: emul r1,r6,$0,r10
+ addl2 r3,r10
+ adwc r6,r11
+ subl2 r10,(r9)+
+ adwc r1,r11
+
+ jsobgtr r7,Loop2
+ movl r11,r0
+ ret
diff --git a/sysdeps/z8000/add_n.s b/sysdeps/z8000/add_n.s
new file mode 100644
index 0000000..21efaf5
--- /dev/null
+++ b/sysdeps/z8000/add_n.s
@@ -0,0 +1,52 @@
+! Z8000 __mpn_add_n -- Add two limb vectors of equal, non-zero length.
+
+! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+
+! This file is part of the GNU MP Library.
+
+! The GNU MP Library is free software; you can redistribute it and/or modify
+! it under the terms of the GNU Library General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or (at your
+! option) any later version.
+
+! The GNU MP Library is distributed in the hope that it will be useful, but
+! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! License for more details.
+
+! You should have received a copy of the GNU Library General Public License
+! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+! INPUT PARAMETERS
+! res_ptr r7
+! s1_ptr r6
+! s2_ptr r5
+! size r4
+
+! If we are really crazy, we can use push to write a few result words
+! backwards, using push just because it is faster than reg+disp. We'd
+! then add 2x the number of words written to r7...
+
+ unseg
+ .text
+ even
+ global ___mpn_add_n
+___mpn_add_n:
+ pop r0,@r6
+ pop r1,@r5
+ add r0,r1
+ ld @r7,r0
+ dec r4
+ jr eq,Lend
+Loop: pop r0,@r6
+ pop r1,@r5
+ adc r0,r1
+ inc r7,#2
+ ld @r7,r0
+ dec r4
+ jr ne,Loop
+Lend: ld r2,r4 ! use 0 already in r4
+ adc r2,r2
+ ret t
diff --git a/sysdeps/z8000/mul_1.s b/sysdeps/z8000/mul_1.s
new file mode 100644
index 0000000..2075225
--- /dev/null
+++ b/sysdeps/z8000/mul_1.s
@@ -0,0 +1,67 @@
+! Z8000 __mpn_mul_1 -- Multiply a limb vector with a limb and store
+! the result in a second limb vector.
+
+! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+
+! This file is part of the GNU MP Library.
+
+! The GNU MP Library is free software; you can redistribute it and/or modify
+! it under the terms of the GNU Library General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or (at your
+! option) any later version.
+
+! The GNU MP Library is distributed in the hope that it will be useful, but
+! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! License for more details.
+
+! You should have received a copy of the GNU Library General Public License
+! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+! INPUT PARAMETERS
+! res_ptr r7
+! s1_ptr r6
+! size r5
+! s2_limb r4
+
+ unseg
+ .text
+ even
+ global ___mpn_mul_1
+___mpn_mul_1:
+ sub r2,r2 ! zero carry limb
+ and r4,r4
+ jr mi,Lneg
+
+Lpos: pop r1,@r6
+ ld r9,r1
+ mult rr8,r4
+ and r1,r1 ! shift msb of loaded limb into cy
+ jr mi,Lp ! branch if loaded limb's msb is set
+ add r8,r4 ! hi_limb += sign_comp2
+Lp: add r9,r2 ! lo_limb += cy_limb
+ xor r2,r2
+ adc r2,r8
+ ld @r7,r9
+ inc r7,#2
+ dec r5
+ jr ne,Lpos
+ ret t
+
+Lneg: pop r1,@r6
+ ld r9,r1
+ mult rr8,r4
+ add r8,r1 ! hi_limb += sign_comp1
+ and r1,r1
+ jr mi,Ln
+ add r8,r4 ! hi_limb += sign_comp2
+Ln: add r9,r2 ! lo_limb += cy_limb
+ xor r2,r2
+ adc r2,r8
+ ld @r7,r9
+ inc r7,#2
+ dec r5
+ jr ne,Lneg
+ ret t
diff --git a/sysdeps/z8000/sub_n.s b/sysdeps/z8000/sub_n.s
new file mode 100644
index 0000000..f75ef22
--- /dev/null
+++ b/sysdeps/z8000/sub_n.s
@@ -0,0 +1,53 @@
+! Z8000 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+! store difference in a third limb vector.
+
+! Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+
+! This file is part of the GNU MP Library.
+
+! The GNU MP Library is free software; you can redistribute it and/or modify
+! it under the terms of the GNU Library General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or (at your
+! option) any later version.
+
+! The GNU MP Library is distributed in the hope that it will be useful, but
+! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+! License for more details.
+
+! You should have received a copy of the GNU Library General Public License
+! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+! the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+! INPUT PARAMETERS
+! res_ptr r7
+! s1_ptr r6
+! s2_ptr r5
+! size r4
+
+! If we are really crazy, we can use push to write a few result words
+! backwards, using push just because it is faster than reg+disp. We'd
+! then add 2x the number of words written to r7...
+
+ unseg
+ .text
+ even
+ global ___mpn_sub_n
+___mpn_sub_n:
+ pop r0,@r6
+ pop r1,@r5
+ sub r0,r1
+ ld @r7,r0
+ dec r4
+ jr eq,Lend
+Loop: pop r0,@r6
+ pop r1,@r5
+ sbc r0,r1
+ inc r7,#2
+ ld @r7,r0
+ dec r4
+ jr ne,Loop
+Lend: ld r2,r4 ! use 0 already in r4
+ adc r2,r2
+ ret t
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a29975f0ad24500841791878ca9906315f7592e
commit 3a29975f0ad24500841791878ca9906315f7592e
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 14 02:29:43 1995 +0000
Updated from ../=mpn/gmp-1.906.7
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
index 942d7a8..bafafd6 100644
--- a/sysdeps/alpha/udiv_qrnnd.S
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -134,7 +134,7 @@ Loop2: cmplt n0,0,tmp
ret $31,($26),1
Odd:
- /* q' in n0. r' in n1. */
+ /* q' in n0. r' in n1 */
addq n1,n0,n1
cmpult n1,n0,tmp # tmp := carry from addq
beq tmp,LLp6
diff --git a/sysdeps/mips/mips3/gmp-mparam.h b/sysdeps/mips/mips3/gmp-mparam.h
new file mode 100644
index 0000000..a801b35
--- /dev/null
+++ b/sysdeps/mips/mips3/gmp-mparam.h
@@ -0,0 +1,26 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
+#define BITS_PER_LONGINT 32
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
diff --git a/sysdeps/vax/gmp-mparam.h b/sysdeps/vax/gmp-mparam.h
new file mode 100644
index 0000000..687f12a
--- /dev/null
+++ b/sysdeps/vax/gmp-mparam.h
@@ -0,0 +1,28 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define BITS_PER_MP_LIMB 32
+#define BYTES_PER_MP_LIMB 4
+#define BITS_PER_LONGINT 32
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
+
+#define IEEE_DOUBLE_BIG_ENDIAN 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8696ee7ebb13d25e375a25129954eae2f8484ab
commit e8696ee7ebb13d25e375a25129954eae2f8484ab
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Sep 8 13:28:13 1995 +0000
Linux is now based in sysdeps/unix/sysv.
diff --git a/sysdeps/unix/sysv/sysv4/linux/accept.S b/sysdeps/unix/sysv/sysv4/linux/accept.S
deleted file mode 100644
index 5936a01..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/accept.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket accept
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/bind.S b/sysdeps/unix/sysv/sysv4/linux/bind.S
deleted file mode 100644
index fc82b65..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/bind.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket bind
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/connect.S b/sysdeps/unix/sysv/sysv4/linux/connect.S
deleted file mode 100644
index 3433043..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/connect.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket connect
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/getpeername.S b/sysdeps/unix/sysv/sysv4/linux/getpeername.S
deleted file mode 100644
index 8429fcd..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/getpeername.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket getpeername
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/getsockname.S b/sysdeps/unix/sysv/sysv4/linux/getsockname.S
deleted file mode 100644
index 6782707..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/getsockname.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket getsockname
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S
deleted file mode 100644
index 7b8dd75..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-#include <sys/socketcall.h>
-
-.globl syscall_error
-
-/* The socket-oriented system calls are handled unusally in Linux.
- They are all gated through the single `socketcall' system call number.
- `socketcall' takes two arguments: the first is the subcode, specifying
- which socket function is being called; and the second is a pointer to
- the arguments to the specific function.
-
- The .S files for the other calls just #define socket and #include this. */
-
-ENTRY (socket)
-
- /* Save registers. */
- movl %ebx, %edx
-
- movl $SYS_socketcall, %eax /* System call number in %eax. */
-
- /* Use ## so `socket' is a separate token that might be #define'd. */
- movl $SYS_##socket, %ebx /* Subcode is first arg to syscall. */
- lea 8(%esp), %ecx /* Address of args is 2nd arg. */
-
- /* Do the system call trap. */
- int $0x80
-
- /* Restore registers. */
- movl %edx, %ebx
-
- /* %eax is < 0 if there was an error. */
- testl %eax, %eax
- jl JUMPTARGET(syscall_error)
-
- /* Successful; return the syscall's value. */
- ret
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
deleted file mode 100644
index efe6d36..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-ASM_GLOBAL_DIRECTIVE syscall_error
-ENTRY (syscall)
- popl %ecx /* Pop return address into %ecx. */
- popl %eax /* Pop syscall number into %eax. */
- pushl %ecx /* Push back return address. */
- DO_CALL (5) /* Frob the args and do the system call. */
- testl %eax, %eax /* Check %eax for error. */
- jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */
- ret /* Return to caller. */
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S
deleted file mode 100644
index 5cf29ec..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* The syscall stubs jump here when they detect an error.
- The code for Linux is almost identical to the canonical Unix/i386
- code, except that the error number in %eax is negated. */
-
-__syscall_error:
- negl %eax
-
-#define __syscall_error __syscall_error_1
-#include <sysdeps/unix/i386/sysdep.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h
deleted file mode 100644
index d0c1c10..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-/* In the Linux/ELF world, C symbols are asm symbols. */
-#define NO_UNDERSCORES
-
-/* There is some commonality. */
-#include <sysdeps/unix/i386/sysdep.h>
-
-#ifdef ASSEMBLER
-
-/* Linux uses a negative return value to indicate syscall errors, unlike
- most Unices, which use the condition codes' carry flag. */
-#undef PSEUDO
-#define PSEUDO(name, syscall_name, args) \
- .text; \
- .globl __syscall_error; \
- ENTRY (name) \
- movl $SYS_##syscall_name, %eax; \
- DO_CALL (args) \
- testl %eax, %eax; \
- jl JUMPTARGET(__syscall_error)
-
-
-/* Linux takes system call arguments in registers:
-
- syscall number %eax call-clobbered
- arg 1 %ebx call-saved
- arg 2 %ecx call-clobbered
- arg 3 %edx call-clobbered
- arg 4 %esi call-saved
- arg 5 %edi call-saved
-
- The stack layout upon entering the function is:
-
- 24(%esp) Arg# 5
- 20(%esp) Arg# 4
- 16(%esp) Arg# 3
- 12(%esp) Arg# 2
- 8(%esp) Arg# 1
- 4(%esp) Return address
- (%esp)
-
- (Of course a function with e.g. 3 argumentS does not have entries for
- arguments 4 and 5.)
-
- We put the arguments into registers from the stack, and save the
- call-saved registers, by using the 386 `xchg' instruction to swap the
- values in both directions. */
-
-#undef DO_CALL
-#define DO_CALL(args) \
- DOARGS_##args \
- int $0x80; \
- UNDOARGS_##args \
-
-#define DOARGS_0 /* No arguments to frob. */
-#define UNDOARGS_0 /* No arguments to unfrob. */
-#define DOARGS_1 xchg 8(%esp), %ebx; DOARGS_0 /* Save %ebx on stack. */
-#define UNDOARGS_1 xchg 8(%esp), %ebx; UNDOARGS_0 /* Restore %ebx */
-#define DOARGS_2 movel 12(%esp), %ecx; DOARGS_1
-#define UNDOARGS_2 UNDOARGS_1 /* %ecx is clobbered. */
-#define DOARGS_3 movel 16(%esp), %edx; DOARGS_2
-#define UNDOARGS_3 UNDOARGS_2 /* %edx is clobbered. */
-#define DOARGS_4 xchg 20(%esp), %esi; DOARGS_3 /* Save %esi on stack. */
-#define UNDOARGS_4 xchg 20(%esp), %esi; UNDOARGS_3 /* Restore %esi. */
-#define DOARGS_5 xchg 24(%esp), %edi; DOARGS_3 /* Save %edi on stack. */
-#define UNDOARGS_5 xchg 24(%esp), %edi; UNDOARGS_3 /* Restore %edi. */
-
-
-#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/sysv/sysv4/linux/listen.S b/sysdeps/unix/sysv/sysv4/linux/listen.S
deleted file mode 100644
index d2cbec6..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/listen.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket listen
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/rename.S b/sysdeps/unix/sysv/sysv4/linux/rename.S
deleted file mode 100644
index a5a8dfe..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/rename.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/rename.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/setsid.S b/sysdeps/unix/sysv/sysv4/linux/setsid.S
deleted file mode 100644
index 4930c56..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/setsid.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/socketpair.S b/sysdeps/unix/sysv/sysv4/linux/socketpair.S
deleted file mode 100644
index da71c57..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/socketpair.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define socket socketpair
-#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/wait4.S b/sysdeps/unix/sysv/sysv4/linux/wait4.S
deleted file mode 100644
index e4c3223..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/wait4.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/waitpid.S b/sysdeps/unix/sysv/sysv4/linux/waitpid.S
deleted file mode 100644
index 20d9d66..0000000
--- a/sysdeps/unix/sysv/sysv4/linux/waitpid.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (waitpid, 3)
- ret
-
-weak_alias (__waitpid, waitpid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b69e40a6f6b175ebfe2b116d2c04945afbf4fb44
commit b69e40a6f6b175ebfe2b116d2c04945afbf4fb44
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 14 22:19:38 1995 +0000
(_hurd_setup_sighandler): In rpc_wait case, frob mach_msg args to set
timeout on receive.
(_hurdsig_rcv_interrupted_p): Function removed.
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 85f4964..f3872fc 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -160,6 +160,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
calls we retry need only wait to receive the reply message. */
args->option &= ~MACH_SEND_MSG;
+ /* Limit the time to receive the reply message, in case the server
+ claimed that `interrupt_operation' succeeded but in fact the RPC
+ is hung. */
+ args->option |= MACH_RCV_TIMEOUT;
+ args->timeout = _hurd_interrupted_rpc_timeout;
+
state->basic.pc = (long int) &&rpc_wait_trampoline;
/* After doing the message receive, the trampoline code will need to
update the v0 ($0) value to be restored by sigreturn. To simplify
@@ -245,42 +251,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* NOTREACHED */
return NULL;
}
-
-/* STATE describes a thread that had intr_port set (meaning it was inside
- HURD_EINTR_RPC), after it has been thread_abort'd. If it looks to have
- just completed a mach_msg_trap system call that returned
- MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
- being waited on. */
-int
-_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
- mach_port_t *port)
-{
- if (state->basic.r0 == MACH_RCV_INTERRUPTED)
- {
- const unsigned int *pc = (void *) state->basic.pc;
- struct mach_msg_trap_args *args = (void *) &state->basic.r16;
-
- if (_hurdsig_catch_fault (SIGSEGV))
- {
- assert (_hurdsig_fault_sigcode == (long int) (pc - 1) ||
- _hurdsig_fault_sigcode == (long int) &args->rcv_name);
- /* We got a fault trying to read the PC or stack. */
- return 0;
- }
- else
- {
- if (pc[-1] == ((alpha_instruction) { pal_format:
- { opcode: op_pal,
- function: op_chmk } }).bits)
- {
- /* We did just return from a mach_msg_trap system call
- doing a message receive that was interrupted.
- Examine the parameters to find the receive right. */
- *port = args->rcv_name;
- return 1;
- }
- }
- }
-
- return 0;
-}
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
index 09ab71e..1dbbe6d 100644
--- a/sysdeps/mach/hurd/hppa/trampoline.c
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -144,6 +144,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
calls we retry need only wait to receive the reply message. */
args->option &= ~MACH_SEND_MSG;
+ /* Limit the time to receive the reply message, in case the server
+ claimed that `interrupt_operation' succeeded but in fact the RPC
+ is hung. */
+ args->option |= MACH_RCV_TIMEOUT;
+ args->timeout = _hurd_interrupted_rpc_timeout;
+
_hurdsig_end_catch_fault ();
MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline);
@@ -222,37 +228,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* NOTREACHED */
return NULL;
}
-
-/* STATE describes a thread that had intr_port set (meaning it was inside
- HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
- just completed a mach_msg_trap system call that returned
- MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
- being waited on. */
-int
-_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
- mach_port_t *port)
-{
- const unsigned int *volatile pc
- = MACHINE_THREAD_STATE_PC (&state->basic);
- const mach_port_t *rcv_name
- = (void *) state->r30 -32-20; /* VA_ARG4 from <mach/machine/asm.h>. */
-
- if (_hurdsig_catch_fault (SIGSEGV))
- assert (_hurdsig_fault_sigcode == (long int) pc ||
- _hurdsig_fault_sigcode == (long int) rcv_name);
- else
- {
- int rcving = (state->basic.r28 == MACH_RCV_INTERRUPTED &&
- pc == ???unfinished???);
- if (rcving)
- /* We did just return from a mach_msg_trap system call
- doing a message receive that was interrupted.
- Examine the parameters to find the receive right. */
- *port = *rcv_name;
- _hurdsig_end_catch_fault ();
- if (rcving)
- return 1;
- }
-
- return 0;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4003d88d7ba2eb3adefbbc6e87bafe2a647e49b2
commit 4003d88d7ba2eb3adefbbc6e87bafe2a647e49b2
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 14 22:17:20 1995 +0000
(_hurd_setup_sighandler): In rpc_wait case, frob mach_msg args to set
timeout on receive.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index ba3450e..03e3d1d 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -150,6 +150,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
calls we retry need only wait to receive the reply message. */
args->option &= ~MACH_SEND_MSG;
+ /* Limit the time to receive the reply message, in case the server
+ claimed that `interrupt_operation' succeeded but in fact the RPC
+ is hung. */
+ args->option |= MACH_RCV_TIMEOUT;
+ args->timeout = _hurd_interrupted_rpc_timeout;
+
state->basic.pc = (int) &&rpc_wait_trampoline;
state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */
/* After doing the message receive, the trampoline code will need to
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bdaaafad70486baef0305b849e32041a31e6707a
commit bdaaafad70486baef0305b849e32041a31e6707a
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 14 22:12:34 1995 +0000
(_hurdsig_rcv_interrupted_p): Function removed.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index f03ad58..ba3450e 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -227,34 +227,3 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
return NULL;
}
-
-/* STATE describes a thread that had intr_port set (meaning it was inside
- HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
- just completed a mach_msg_trap system call that returned
- MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
- being waited on. */
-int
-_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
- mach_port_t *port)
-{
- const unsigned int *const pc = (void *) state->basic.pc;
-
- if (_hurdsig_catch_fault (SIGSEGV))
- assert (_hurdsig_fault_sigcode == (long int) pc);
- else
- {
- if (state->basic.r2 == MACH_RCV_INTERRUPTED &&
- pc[-1] == 0xc) /* syscall */
- {
- /* We did just return from a mach_msg_trap system call
- doing a message receive that was interrupted.
- Examine the parameters to find the receive right. */
- struct mach_msg_trap_args *args = (void *) &state->basic.r4;
-
- *port = args->rcv_name;
- return 1;
- }
- }
-
- return 0;
-}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0bbcc469009b915e2a3edc577511e9f3e75b332a
commit 0bbcc469009b915e2a3edc577511e9f3e75b332a
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jul 26 15:38:25 1995 +0000
[$(subdir)=csu] (start-installed-rule, start-installed-name-rule): New
variables; specify crt1.o, created by our own rule.
($(objpfx)crt1.o): New rule.
diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile
index 23525e5..a199ba9 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Makefile
+++ b/sysdeps/unix/sysv/sco3.2.4/Makefile
@@ -1,3 +1,17 @@
ifeq (posix,$(subdir))
sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp
endif
+
+ifeq (csu,$(subdir))
+
+# SCO uses crt1.o, and expects that single initializer file to also start
+# the .init and .fini sections as crti.o normally does.
+start-installed-name = crt1.o
+start-installed-name-rule = yes
+
+# Link together start.o and crti.o into the expected crt1.o.
+# Now crt1.o as initializer and crtn.o as finalizer will work.
+$(objpfx)crt1.o: $(objpfx)start.o $(objpfx)crti.o
+ $(CC) -nostdlib -nostartfiles -Wl,-r -o $@ $^
+
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=06bcdbfcc0962c0312cb4bfa4ec6447254a511c4
commit 06bcdbfcc0962c0312cb4bfa4ec6447254a511c4
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 10:47:25 1995 +0000
Include <sys/socketcall.h>.
Save %ebx in call-clobbered %edx instead of stack.
Use JUMPTARGET(syscall_error) in jump insn.
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/socket.S b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S
new file mode 100644
index 0000000..7b8dd75
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/i386/socket.S
@@ -0,0 +1,54 @@
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#include <sys/socketcall.h>
+
+.globl syscall_error
+
+/* The socket-oriented system calls are handled unusally in Linux.
+ They are all gated through the single `socketcall' system call number.
+ `socketcall' takes two arguments: the first is the subcode, specifying
+ which socket function is being called; and the second is a pointer to
+ the arguments to the specific function.
+
+ The .S files for the other calls just #define socket and #include this. */
+
+ENTRY (socket)
+
+ /* Save registers. */
+ movl %ebx, %edx
+
+ movl $SYS_socketcall, %eax /* System call number in %eax. */
+
+ /* Use ## so `socket' is a separate token that might be #define'd. */
+ movl $SYS_##socket, %ebx /* Subcode is first arg to syscall. */
+ lea 8(%esp), %ecx /* Address of args is 2nd arg. */
+
+ /* Do the system call trap. */
+ int $0x80
+
+ /* Restore registers. */
+ movl %edx, %ebx
+
+ /* %eax is < 0 if there was an error. */
+ testl %eax, %eax
+ jl JUMPTARGET(syscall_error)
+
+ /* Successful; return the syscall's value. */
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f7bee9b870b6dcd92170ac85962761a80dcc3359
commit f7bee9b870b6dcd92170ac85962761a80dcc3359
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 10:34:43 1995 +0000
Rewritten.
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h
new file mode 100644
index 0000000..d0c1c10
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* In the Linux/ELF world, C symbols are asm symbols. */
+#define NO_UNDERSCORES
+
+/* There is some commonality. */
+#include <sysdeps/unix/i386/sysdep.h>
+
+#ifdef ASSEMBLER
+
+/* Linux uses a negative return value to indicate syscall errors, unlike
+ most Unices, which use the condition codes' carry flag. */
+#undef PSEUDO
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ .globl __syscall_error; \
+ ENTRY (name) \
+ movl $SYS_##syscall_name, %eax; \
+ DO_CALL (args) \
+ testl %eax, %eax; \
+ jl JUMPTARGET(__syscall_error)
+
+
+/* Linux takes system call arguments in registers:
+
+ syscall number %eax call-clobbered
+ arg 1 %ebx call-saved
+ arg 2 %ecx call-clobbered
+ arg 3 %edx call-clobbered
+ arg 4 %esi call-saved
+ arg 5 %edi call-saved
+
+ The stack layout upon entering the function is:
+
+ 24(%esp) Arg# 5
+ 20(%esp) Arg# 4
+ 16(%esp) Arg# 3
+ 12(%esp) Arg# 2
+ 8(%esp) Arg# 1
+ 4(%esp) Return address
+ (%esp)
+
+ (Of course a function with e.g. 3 argumentS does not have entries for
+ arguments 4 and 5.)
+
+ We put the arguments into registers from the stack, and save the
+ call-saved registers, by using the 386 `xchg' instruction to swap the
+ values in both directions. */
+
+#undef DO_CALL
+#define DO_CALL(args) \
+ DOARGS_##args \
+ int $0x80; \
+ UNDOARGS_##args \
+
+#define DOARGS_0 /* No arguments to frob. */
+#define UNDOARGS_0 /* No arguments to unfrob. */
+#define DOARGS_1 xchg 8(%esp), %ebx; DOARGS_0 /* Save %ebx on stack. */
+#define UNDOARGS_1 xchg 8(%esp), %ebx; UNDOARGS_0 /* Restore %ebx */
+#define DOARGS_2 movel 12(%esp), %ecx; DOARGS_1
+#define UNDOARGS_2 UNDOARGS_1 /* %ecx is clobbered. */
+#define DOARGS_3 movel 16(%esp), %edx; DOARGS_2
+#define UNDOARGS_3 UNDOARGS_2 /* %edx is clobbered. */
+#define DOARGS_4 xchg 20(%esp), %esi; DOARGS_3 /* Save %esi on stack. */
+#define UNDOARGS_4 xchg 20(%esp), %esi; UNDOARGS_3 /* Restore %esi. */
+#define DOARGS_5 xchg 24(%esp), %edi; DOARGS_3 /* Save %edi on stack. */
+#define UNDOARGS_5 xchg 24(%esp), %edi; UNDOARGS_3 /* Restore %edi. */
+
+
+#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=80e6394278eed0a5f46e118142ba2546301ac962
commit 80e6394278eed0a5f46e118142ba2546301ac962
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 10:29:55 1995 +0000
Use JUMPTARGET(syscall_error) in jump insn.
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
index 74e1047..efe6d36 100644
--- a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
+++ b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
@@ -25,5 +25,5 @@ ENTRY (syscall)
pushl %ecx /* Push back return address. */
DO_CALL (5) /* Frob the args and do the system call. */
testl %eax, %eax /* Check %eax for error. */
- jl syscall_error /* Jump to error handler if negative. */
+ jl JUMPTARGET(syscall_error) /* Jump to error handler if negative. */
ret /* Return to caller. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=48daea4ca6d8c84e3f18f36308e9e6a0ccfd6967
commit 48daea4ca6d8c84e3f18f36308e9e6a0ccfd6967
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 10:16:46 1995 +0000
New file.
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
new file mode 100644
index 0000000..74e1047
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/i386/syscall.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ASM_GLOBAL_DIRECTIVE syscall_error
+ENTRY (syscall)
+ popl %ecx /* Pop return address into %ecx. */
+ popl %eax /* Pop syscall number into %eax. */
+ pushl %ecx /* Push back return address. */
+ DO_CALL (5) /* Frob the args and do the system call. */
+ testl %eax, %eax /* Check %eax for error. */
+ jl syscall_error /* Jump to error handler if negative. */
+ ret /* Return to caller. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6784c7e3685c03d0525c2c8ae05ee91347186a8f
commit 6784c7e3685c03d0525c2c8ae05ee91347186a8f
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 08:42:28 1995 +0000
Rewritten, #include'ing unix/i386/sysdep.S for most of the code.
diff --git a/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S
new file mode 100644
index 0000000..5cf29ec
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/i386/sysdep.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The syscall stubs jump here when they detect an error.
+ The code for Linux is almost identical to the canonical Unix/i386
+ code, except that the error number in %eax is negated. */
+
+__syscall_error:
+ negl %eax
+
+#define __syscall_error __syscall_error_1
+#include <sysdeps/unix/i386/sysdep.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e56c8d6e9fecc6b96c26aa83317fda3fb916d8c0
commit e56c8d6e9fecc6b96c26aa83317fda3fb916d8c0
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 22 07:43:56 1995 +0000
Files moved from defunct sysdeps/unix/sysv/linux directory.
diff --git a/sysdeps/unix/sysv/sysv4/linux/accept.S b/sysdeps/unix/sysv/sysv4/linux/accept.S
new file mode 100644
index 0000000..5936a01
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/accept.S
@@ -0,0 +1,2 @@
+#define socket accept
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/bind.S b/sysdeps/unix/sysv/sysv4/linux/bind.S
new file mode 100644
index 0000000..fc82b65
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/bind.S
@@ -0,0 +1,2 @@
+#define socket bind
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/connect.S b/sysdeps/unix/sysv/sysv4/linux/connect.S
new file mode 100644
index 0000000..3433043
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/connect.S
@@ -0,0 +1,2 @@
+#define socket connect
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/getpeername.S b/sysdeps/unix/sysv/sysv4/linux/getpeername.S
new file mode 100644
index 0000000..8429fcd
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/getpeername.S
@@ -0,0 +1,2 @@
+#define socket getpeername
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/getsockname.S b/sysdeps/unix/sysv/sysv4/linux/getsockname.S
new file mode 100644
index 0000000..6782707
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/getsockname.S
@@ -0,0 +1,2 @@
+#define socket getsockname
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/listen.S b/sysdeps/unix/sysv/sysv4/linux/listen.S
new file mode 100644
index 0000000..d2cbec6
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/listen.S
@@ -0,0 +1,2 @@
+#define socket listen
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/rename.S b/sysdeps/unix/sysv/sysv4/linux/rename.S
new file mode 100644
index 0000000..a5a8dfe
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/rename.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/rename.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/setsid.S b/sysdeps/unix/sysv/sysv4/linux/setsid.S
new file mode 100644
index 0000000..4930c56
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/setsid.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/socketpair.S b/sysdeps/unix/sysv/sysv4/linux/socketpair.S
new file mode 100644
index 0000000..da71c57
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/socketpair.S
@@ -0,0 +1,2 @@
+#define socket socketpair
+#include <socket.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/wait4.S b/sysdeps/unix/sysv/sysv4/linux/wait4.S
new file mode 100644
index 0000000..e4c3223
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/wait4.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/sysv/sysv4/linux/waitpid.S b/sysdeps/unix/sysv/sysv4/linux/waitpid.S
new file mode 100644
index 0000000..20d9d66
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/linux/waitpid.S
@@ -0,0 +1,24 @@
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (waitpid, 3)
+ ret
+
+weak_alias (__waitpid, waitpid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b45242d5ce25a327139055ff47be5c44956292f
commit 5b45242d5ce25a327139055ff47be5c44956292f
Author: Brendan Kehoe <brendan@zen.org>
Date: Wed Jun 14 00:15:10 1995 +0000
undo previous change, not needed w/ configure fix
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index c302204..fc661a6 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -19,9 +19,6 @@ Cambridge, MA 02139, USA. */
/* OSF/1 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
-/* We really can't handle the .set directive for weak aliases. */
-#undef HAVE_ASM_SET_DIRECTIVE
-
#include <sysdeps/unix/sysdep.h>
#ifdef ASSEMBLER
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39bd749af3749113d7a84c54018058e0051d5812
commit 39bd749af3749113d7a84c54018058e0051d5812
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Jun 13 19:35:18 1995 +0000
* sysdeps/unix/bsd/osf/alpha/sysdep.h (HAVE_ASM_SET_DIRECTIVE):
Put in #undef.
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index fc661a6..c302204 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -19,6 +19,9 @@ Cambridge, MA 02139, USA. */
/* OSF/1 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
+/* We really can't handle the .set directive for weak aliases. */
+#undef HAVE_ASM_SET_DIRECTIVE
+
#include <sysdeps/unix/sysdep.h>
#ifdef ASSEMBLER
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87258b84a3b76a23af2befa5cab091e6f3cab612
commit 87258b84a3b76a23af2befa5cab091e6f3cab612
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 19 21:51:40 1995 +0000
Fix "cvs commit" cmds in rules to not fail in the absence of CVS dirs.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 06621b8..8573ca8 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -91,4 +91,4 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)
# Make it unwritable so noone will edit it by mistake.
-chmod a-w $@-tmp
mv -f $@-tmp $@
- test -d CVS && cvs commit -m'Regenerated from $<' $@
+ test ! -d CVS || cvs commit -m'Regenerated from $<' $@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd1e71567ef998ce868f81eba43cfa9d22f79373
commit fd1e71567ef998ce868f81eba43cfa9d22f79373
Author: Brendan Kehoe <brendan@zen.org>
Date: Mon Apr 17 22:02:01 1995 +0000
* sysdeps/alpha/strlen.c (strlen): Fix cmpbge insn, and returning
of the byte that was zero, so we return a valid number.
diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c
index d774447..36f106c 100644
--- a/sysdeps/alpha/strlen.c
+++ b/sysdeps/alpha/strlen.c
@@ -36,19 +36,20 @@ strlen (const char *str)
for (;;)
{
+ const unsigned long int longword = *longword_ptr++;
int mask;
- asm ("cmpbge %1, %2, %0" : "=r" (mask) : "r" (0), "r" (*longword_ptr++));
+
+ /* Set bits in MASK if bytes in LONGWORD are zero. */
+ asm ("cmpbge $31, %1, %0" : "=r" (mask) : "r" (longword));
if (mask)
{
/* Which of the bytes was the zero? */
-
const char *cp = (const char *) (longword_ptr - 1);
int i;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < 8; i++)
if (cp[i] == 0)
return cp - str + i;
- return cp - str + 7;
}
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e1fadd6c682a63e9b58b18a8b395b196f8b521e
commit 9e1fadd6c682a63e9b58b18a8b395b196f8b521e
Author: Brendan Kehoe <brendan@zen.org>
Date: Sun Apr 16 08:24:34 1995 +0000
* /sysdeps/unix/bsd/ultrix4/mips/sysdep.h: New file defining
NO_UNDERSCORES then using sysdeps/unix/mips/sysdep.h.
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sysdep.h b/sysdeps/unix/bsd/ultrix4/mips/sysdep.h
new file mode 100644
index 0000000..09b69ff
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/sysdep.h
@@ -0,0 +1,3 @@
+#define NO_UNDERSCORES
+
+#include <sysdeps/unix/mips/sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be61b0710e3f278188de5d836b357d061bc3b2cc
commit be61b0710e3f278188de5d836b357d061bc3b2cc
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Apr 15 04:07:56 1995 +0000
* sysdeps/unix/bsd/osf/alpha/killpg.S (killpg): Add .end directive.
* sysdeps/unix/bsd/osf/alpha/sigblock.S (__sigblock): Likewise.
* sysdeps/unix/bsd/osf/alpha/sigsetmask.S (__sigsetmask): Likewise.
* sysdeps/unix/bsd/osf/alpha/sigpause.S (__sigpause): Likewise.
* sysdeps/unix/bsd/osf/alpha/sigvec.S (__sigvec): Likewise.
* sysdeps/unix/bsd/osf/alpha/getdents.S (__getdirentries): Likewise.
* sysdeps/unix/bsd/osf/alpha/fork.S (__fork): Likewise.
* sysdeps/unix/bsd/osf/alpha/pipe.S (__pipe): Likewise.
* sysdeps/unix/bsd/osf/alpha/recv.S (recv): Likewise.
* sysdeps/unix/bsd/osf/alpha/send.S (send): Likewise.
* sysdeps/unix/bsd/osf/alpha/vhangup.S (vhangup): Likewise.
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
index 7c8d671..be6f015 100644
--- a/sysdeps/unix/bsd/osf/alpha/fork.S
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -21,5 +21,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (fork, 0)
cmovne a4, 0, v0
ret
+ .end __fork
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S
index 16ccbc2..df2c26d 100644
--- a/sysdeps/unix/bsd/osf/alpha/getdents.S
+++ b/sysdeps/unix/bsd/osf/alpha/getdents.S
@@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (getdirentries, 4)
ret
+ .end __getdirentries
weak_alias (__getdirentries, getdirentries)
diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S
index f0b82b3..831c3fd 100644
--- a/sysdeps/unix/bsd/osf/alpha/killpg.S
+++ b/sysdeps/unix/bsd/osf/alpha/killpg.S
@@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */
SYSCALL (killpg, 2)
ret
+ .end killpg
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
index 6b074ed..eada33b 100644
--- a/sysdeps/unix/bsd/osf/alpha/pipe.S
+++ b/sysdeps/unix/bsd/osf/alpha/pipe.S
@@ -26,5 +26,6 @@ SYSCALL__ (pipe, 1)
/* Go out with a clean status. */
mov zero, r0
ret
+ .end __pipe
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S
index 4ac00eb..a68bfe8 100644
--- a/sysdeps/unix/bsd/osf/alpha/recv.S
+++ b/sysdeps/unix/bsd/osf/alpha/recv.S
@@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */
SYSCALL (recv, 4)
ret
+ .end recv
diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S
index ca46894..526f4c8 100644
--- a/sysdeps/unix/bsd/osf/alpha/send.S
+++ b/sysdeps/unix/bsd/osf/alpha/send.S
@@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */
SYSCALL (send, 4)
ret
+ .end send
diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S
index c3556a9..402ed8d 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigblock.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S
@@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigblock, 1)
ret
+ .end __sigblock
weak_alias (__sigblock, sigblock)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S
index 04b6d45..6136cfc 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S
@@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigpause, 1)
ret
+ .end __sigpause
weak_alias (__sigpause, sigpause)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
index fb3a1d1..71aea92 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
@@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigsetmask, 1)
ret
+ .end __sigsetmask
weak_alias (__sigsetmask, sigsetmask)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S
index b04ec6e..f199f35 100644
--- a/sysdeps/unix/bsd/osf/alpha/sigvec.S
+++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S
@@ -23,5 +23,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigvec, 3)
ret
+ .end __sigvec
weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S
index d4d2b1c..8759f02 100644
--- a/sysdeps/unix/bsd/osf/alpha/vhangup.S
+++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S
@@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */
SYSCALL (vhangup, 1)
ret
+ .end vhangup
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7c2ec3d419b0f6e87db3c059220f5b3cf2e9a5b9
commit 7c2ec3d419b0f6e87db3c059220f5b3cf2e9a5b9
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Apr 15 02:38:17 1995 +0000
... changing to use /**/ instead of ! as comments
* sysdeps/unix/bsd/osf/alpha/brk.S: Likewise.
diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S
index 111f339..6e4bd2c 100644
--- a/sysdeps/unix/bsd/osf/alpha/brk.S
+++ b/sysdeps/unix/bsd/osf/alpha/brk.S
@@ -34,13 +34,13 @@ __curbrk:
.text
ENTRY(__brk)
- ! FIXME We do not check for asking for less than a page yet.
+ /* FIXME We do not check for asking for less than a page yet. */
ldiq v0, SYS_brk
call_pal PAL_callsys
bne a3, error
/* Update __curbrk and exit cleanly. */
-! ldgp gp, 0(t12)
+/* ldgp gp, 0(t12) */
stl a0, __curbrk
mov zero, v0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=487e658eebe1a69a45a6e74402ef299c704c8eb8
commit 487e658eebe1a69a45a6e74402ef299c704c8eb8
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Apr 15 02:30:20 1995 +0000
* sysdeps/unix/mips/brk.S (__brk, __curbrk): Add .end.
* sysdeps/unix/mips/fork.S (fork): Likewise.
* sysdeps/unix/mips/pipe.S (fork): Likewise.
* sysdeps/unix/mips/sigreturn.S (__sigreturn): Likewise.
* sysdeps/unix/mips/sysdep.S (sysdep_error): Likewise.
* sysdeps/unix/mips/wait.S (__handler): Likewise.
* sysdeps/mips/setjmp.S (__sigsetjmp): Likewise.
* sysdeps/mips/bsd-setjmp.S (setjmp): Likewise.
* sysdeps/unix/bsd/ultrix4/getsysinfo.S (getsysinfo): Likewise.
* sysdeps/unix/bsd/ultrix4/wait3.S (waitpid): Likewise.
* sysdeps/unix/bsd/ultrix4/waitpid.S (waitpid): Likewise.
* sysdeps/unix/bsd/ultrix4/mips/__handler.S (__handler): Likewise.
* sysdeps/unix/bsd/ultrix4/mips/sigvec.S (__raw_sigvec): Likewise.
* sysdeps/unix/bsd/ultrix4/mips/start.S (__start): Likewise.
* sysdeps/unix/bsd/ultrix4/mips/vfork.S (vfork): Likewise.
* sysdeps/mips/bsd-_setjmp.S (setjmp): Likewise. Use `$0'
instead of `zero' for the li instruction.
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index 6e6844c..78776cd 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -25,4 +25,5 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
- li a1, zero /* Pass a second argument of zero. */
+ li a1, $0 /* Pass a second argument of zero. */
+ .end setjmp
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 5cd090a..4742462 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -26,3 +26,4 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
li a1, 1 /* Pass a second argument of one. */
+ .end setjmp
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index b3c0247..0f5dba3 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -29,3 +29,4 @@ ENTRY (__sigsetjmp)
move a3, $fp
#endif
j __sigsetjmp_aux
+ .end __sigsetjmp
diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S
index 1f5b2cf..41718ba 100644
--- a/sysdeps/unix/bsd/ultrix4/getsysinfo.S
+++ b/sysdeps/unix/bsd/ultrix4/getsysinfo.S
@@ -23,3 +23,4 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (getsysinfo, 5)
ret
+ .end __getsysinfo
diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
index 3ea697c..ca9c3fe 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
@@ -111,3 +111,4 @@ ENTRY (__handler)
/* Do a sigreturn syscall; this doesn't return. */
la v0, __sigreturn
jal ra, v0
+ .end __handler
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
index 20a5dd1..4d7aa44 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
@@ -22,3 +22,4 @@ Cambridge, MA 02139, USA. */
PSEUDO (__raw_sigvec, sigvec, 3)
ret
+ .end __raw_sigvec
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index eec8ce0..24bcbb4 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -68,3 +68,4 @@ ENTRY(__start)
/* Make the value returned by main be the argument to exit. */
jal exit
move a0, v0
+ .end __start
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index 37f6d80..05e4b87 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -29,5 +29,6 @@ SYSCALL__ (vfork, 0)
parent:
ret
nop
+ .end __vfork
weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S
index 83910a5..930c67e 100644
--- a/sysdeps/unix/bsd/ultrix4/wait3.S
+++ b/sysdeps/unix/bsd/ultrix4/wait3.S
@@ -20,5 +20,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (wait3, 3)
ret
+ .end __wait3
weak_alias (__wait3, wait3)
diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S
index b64e528..3470da7 100644
--- a/sysdeps/unix/bsd/ultrix4/waitpid.S
+++ b/sysdeps/unix/bsd/ultrix4/waitpid.S
@@ -20,5 +20,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (waitpid, 3)
ret
+ .end __waitpid
weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index 1754c0c..9c4ee26 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */
.sdata
ENTRY(__curbrk)
.word __end
-
+ .end __curbrk
.text
.set noreorder
.set noat
@@ -63,5 +63,6 @@ error: j syscall_error
nop
nop
nop
+ .end __brk
weak_alias (__brk, brk)
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index 2347bf4..17efcc9 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -25,5 +25,6 @@ SYSCALL__ (fork, 0)
move v0, zero
parent:
ret
+ .end __fork
weak_alias (__fork, fork)
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index f8ce56b..b9f376d 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -27,5 +27,6 @@ SYSCALL__ (pipe, 1)
j ra
move v0, zero
nop
+ .end __pipe
weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
index 1e76bf5..70ae0c2 100644
--- a/sysdeps/unix/mips/sigreturn.S
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -25,5 +25,6 @@ Cambridge, MA 02139, USA. */
ENTRY(__sigreturn)
li v0, SYS_sigreturn
syscall
+ .end __sigreturn
weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 21bdf23..f17ba44 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -39,3 +39,4 @@ skip:
/* And just kick back a -1. */
j ra
li v0, -1
+ .end syscall_error
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 63bce84..f1f4f9b 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -40,5 +40,6 @@ noerror:
nop
noarg:
ret
+ .end __wait
weak_alias (__wait, wait)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=275f4b54f40aa637204a7ec3859c0a4b4be7cad6
commit 275f4b54f40aa637204a7ec3859c0a4b4be7cad6
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Apr 15 02:07:14 1995 +0000
* sysdeps/unix/bsd/osf/alpha/start.S: Change comments to be
preprocessor comments, not assembler comments.
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
index 52eb036..f3995a2 100644
--- a/sysdeps/unix/bsd/osf/alpha/start.S
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -20,40 +20,42 @@ Cambridge, MA 02139, USA. */
.comm errno, 4
-!.sdata
-!.globl STARTFRM
-!STARTFRM = 0
+#if 0
+.sdata
+.globl STARTFRM
+STARTFRM = 0
+#endif
.text
ENTRY(__start)
lda sp, -16(sp)
stq zero, 8(sp)
- ! This branch puts the address of the current insn in t0.
+ /* This branch puts the address of the current insn in t0. */
br t0, 10f
10:
- ! We set the GP register by using the address of the ldgp
- ! (what we just put into t0).
+ /* We set the GP register by using the address of the ldgp */
+ /* (what we just put into t0). */
ldgp gp, 0(t0)
- ! get argc
+ /* get argc */
ldl a0, 16(sp)
- ! get argv
+ /* get argv */
lda a1, 24(sp)
- ! move ahead to envp
+ /* move ahead to envp */
s8addq a0, a1, a2
addq a2, 0x8, a2
- ! Store in environ.
+ /* Store in environ. */
stq a2, environ
- ! Clear out errno.
-! ldgp gp, 0(t12)
+ /* Clear out errno. */
+/* ldgp gp, 0(t12) */
stl zero, errno
- ! Call main.
+ /* Call main. */
jsr ra, main
ldgp gp, 0(ra)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2531dea3aa1021f9f4cefee3ba4a3b60307af26
commit b2531dea3aa1021f9f4cefee3ba4a3b60307af26
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Apr 15 01:56:26 1995 +0000
* sysdeps/unix/bsd/osf/alpha/sysdep.h (NO_UNDERSCORES): Define.
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
index 3669a69..fc661a6 100644
--- a/sysdeps/unix/bsd/osf/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -16,6 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+/* OSF/1 does not precede the asm names of C symbols with a `_'. */
+#define NO_UNDERSCORES
+
#include <sysdeps/unix/sysdep.h>
#ifdef ASSEMBLER
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af4fa09130ed122f2dcb414f0ece8f3ed0b9822d
commit af4fa09130ed122f2dcb414f0ece8f3ed0b9822d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 5 16:07:53 1995 +0000
(__sigfillset): Use ~0L instead of -1 to avoid compiler warning.
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index a007a43..b21b519 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -1,5 +1,5 @@
/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@ __sigfillset (__sigset_t *__set)
for signals [1,31]. Setting bits for unimplemented signals seems
harmless (and we will find out if it really is). */
__set->__sigbits[0] = __set->__sigbits[1] =
- __set->__sigbits[2] = __set->__sigbits[3] = -1;
+ __set->__sigbits[2] = __set->__sigbits[3] = ~0L;
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=202cae361f3e9c14beadf88175866f3ac6c1194f
commit 202cae361f3e9c14beadf88175866f3ac6c1194f
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 31 03:52:13 1995 +0000
* sysdeps/alpha/__longjmp.c (__longjmp): Take out const.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index ad04898..f3f35ee 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -36,7 +36,7 @@ register double
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void
-__longjmp (const __jmp_buf env, int val)
+__longjmp (__jmp_buf env, int val)
{
/* Restore the integer registers. */
r9 = env[0].__9;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e34abb0bcb812a971e73abeeb99e6a98d3664f77
commit e34abb0bcb812a971e73abeeb99e6a98d3664f77
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 31 01:47:52 1995 +0000
* sysdeps/mips/__longjmp.c (__longjmp): Take out CONST.
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 7ea3df2..c54d8a9 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -27,7 +27,7 @@ Cambridge, MA 02139, USA. */
#endif
void
-DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
+DEFUN(__longjmp, (env, val_arg), __jmp_buf env AND int val_arg)
{
/* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
the hack around it); force it to use $a1 for the longjmp value.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44b64eff597f1e1f86802b86860f20c214da41c2
commit 44b64eff597f1e1f86802b86860f20c214da41c2
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 29 16:56:35 1995 +0000
.
diff --git a/bare/.cvsignore b/bare/.cvsignore
new file mode 100644
index 0000000..c8367a7
--- /dev/null
+++ b/bare/.cvsignore
@@ -0,0 +1,5 @@
+*.gz *.Z *.tar *.tgz
+=*
+TODO COPYING* AUTHORS copyr-* copying.*
+glibc-*
+distinfo
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e444e579a4963e7212cd4fa04863640e2652039
commit 2e444e579a4963e7212cd4fa04863640e2652039
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 27 09:27:34 1995 +0000
(_JMPBUF_UNWINDS): New macro.
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
index eed47dc..102a019 100644
--- a/sysdeps/mips/jmp_buf.h
+++ b/sysdeps/mips/jmp_buf.h
@@ -1,5 +1,5 @@
-/* Define the machine-dependent type `jmp_buf'. Mips version.
- Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+/* Define the machine-dependent type `jmp_buf'. MIPS version.
+ Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -45,3 +45,9 @@ typedef struct
/* Offset to the program counter in `jmp_buf'. */
#define JB_PC 0
#endif
+
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+ ((__ptr_t) (address) < (jmpbuf)[0].__sp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdf91378b95f9e49c2fb18f223decb9da6a045bc
commit fdf91378b95f9e49c2fb18f223decb9da6a045bc
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 02:59:52 1995 +0000
newly generated ones
diff --git a/sysdeps/alpha/divl.S b/sysdeps/alpha/divl.S
index 7ae3e0c..5c94362 100644
--- a/sysdeps/alpha/divl.S
+++ b/sysdeps/alpha/divl.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/divlu.S b/sysdeps/alpha/divlu.S
index 9ae5950..3a7589d 100644
--- a/sysdeps/alpha/divlu.S
+++ b/sysdeps/alpha/divlu.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 79ff6ca..730a338 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S
index 7908b9f..7614742 100644
--- a/sysdeps/alpha/divqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/reml.S b/sysdeps/alpha/reml.S
index 2ece297..95896fb 100644
--- a/sysdeps/alpha/reml.S
+++ b/sysdeps/alpha/reml.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/remlu.S b/sysdeps/alpha/remlu.S
index d7700e6..24e07cf 100644
--- a/sysdeps/alpha/remlu.S
+++ b/sysdeps/alpha/remlu.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/remq.S b/sysdeps/alpha/remq.S
index 47510cb..ce38c24 100644
--- a/sysdeps/alpha/remq.S
+++ b/sysdeps/alpha/remq.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index ec9572d..26bdd3b 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -15,6 +15,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b96aa40f8887fe6fb3158928db6ff658e2a06e9
commit 3b96aa40f8887fe6fb3158928db6ff658e2a06e9
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 02:59:06 1995 +0000
* sysdeps/alpha/divrem.m4: Undefine `ret' to avoid the definition
that's used inside the alpha sysdep.h.
diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4
index 5942cf4..d2f3638 100644
--- a/sysdeps/alpha/divrem.m4
+++ b/sysdeps/alpha/divrem.m4
@@ -14,6 +14,9 @@
#endif
#include <sysdep.h>
+/* Avoid the definition of ret that we set in the alpha sysdep.h. */
+#undef ret
+
define(path, `SYSDEP_DIR/macros.m4')dnl
include(path)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c632b258d8627d5c8f6899b6b3e49f4e5327882
commit 8c632b258d8627d5c8f6899b6b3e49f4e5327882
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 02:44:20 1995 +0000
duh, don't need __attribute__ in the alpha header, it's in the toplevel
one
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 06e43db..5461fca 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -18,8 +18,6 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
-extern __inline double __copysign (double __x, double __y) __attribute__ ((__const__));
-
extern __inline double
__copysign (double __x, double __y)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9d7c89bc4be80983b395784bb49a4875edf890e3
commit 9d7c89bc4be80983b395784bb49a4875edf890e3
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 02:16:23 1995 +0000
* sysdeps/alpha/__longjmp.c (__longjmp): Remove obsolete __NORETURN
keyword.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index 19a2e26..ad04898 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -35,7 +35,6 @@ register double
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
-__NORETURN
void
__longjmp (const __jmp_buf env, int val)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ef37b04541d809323a6c5b3298ed161d4063f23
commit 9ef37b04541d809323a6c5b3298ed161d4063f23
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 02:10:40 1995 +0000
* sysdeps/alpha/__math.h (__copysign): Use attribute instead of old
__CONSTVALUE by adding forward decl first with the const attribute.
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index b06f716..06e43db 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -18,7 +18,9 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
-extern __inline __CONSTVALUE double
+extern __inline double __copysign (double __x, double __y) __attribute__ ((__const__));
+
+extern __inline double
__copysign (double __x, double __y)
{
__asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77072f48a55f5d537e8bd38a51fd9873816795d3
commit 77072f48a55f5d537e8bd38a51fd9873816795d3
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 01:51:02 1995 +0000
moved from ../osf1
diff --git a/sysdeps/unix/bsd/osf/=dirstream.h b/sysdeps/unix/bsd/osf/=dirstream.h
new file mode 100644
index 0000000..c37610e
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/=dirstream.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _DIRSTREAM_H
+
+#define _DIRSTREAM_H 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Directory stream type. */
+
+typedef struct
+ {
+ int __fd; /* File descriptor. */
+
+ size_t __offset; /* Current offset into the block. */
+ size_t __size; /* Total valid data in the block. */
+ char *__data; /* Directory block. */
+
+ int __allocation; /* Space allocated for the block. */
+
+ int __data_len; /* Size of __data. */
+ long __dd_seek; /* OSF/1 magic cookie returned by getdents. */
+ void *dd_lock; /* Used by OSF/1 for inter-thread locking. */
+
+ } DIR;
+
+#endif /* dirstream.h */
diff --git a/sysdeps/unix/bsd/osf/Implies b/sysdeps/unix/bsd/osf/Implies
new file mode 100644
index 0000000..82719f5
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/Implies
@@ -0,0 +1,2 @@
+# OSF/1 has the canonical set of <sys/mman.h> system calls.
+unix/mman
diff --git a/sysdeps/unix/bsd/osf/Makefile b/sysdeps/unix/bsd/osf/Makefile
new file mode 100644
index 0000000..743788a
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/Makefile
@@ -0,0 +1,3 @@
+# Without -non_shared (via the compiler's -static flag), we'll end up
+# with some unresolved symbols wrt exceptions.
+LDFLAGS := $(LDFLAGS) -static
diff --git a/sysdeps/unix/bsd/osf/alpha/brk.S b/sysdeps/unix/bsd/osf/alpha/brk.S
new file mode 100644
index 0000000..111f339
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/brk.S
@@ -0,0 +1,53 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+#ifndef HAVE_GNU_LD
+#define __end end
+#endif
+
+.data
+ .extern __end,8
+ .globl __curbrk
+__curbrk:
+ .quad __end
+
+.text
+ENTRY(__brk)
+ ! FIXME We do not check for asking for less than a page yet.
+ ldiq v0, SYS_brk
+ call_pal PAL_callsys
+ bne a3, error
+
+ /* Update __curbrk and exit cleanly. */
+! ldgp gp, 0(t12)
+ stl a0, __curbrk
+
+ mov zero, v0
+ ret
+ /* What a horrible way to die. */
+error: ldgp gp,0(gp)
+ jmp zero,syscall_error
+ .end __brk
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/bsd/osf/alpha/fork.S b/sysdeps/unix/bsd/osf/alpha/fork.S
new file mode 100644
index 0000000..7c8d671
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/fork.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (fork, 0)
+ cmovne a4, 0, v0
+ ret
+
+weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/osf/alpha/getdents.S b/sysdeps/unix/bsd/osf/alpha/getdents.S
new file mode 100644
index 0000000..16ccbc2
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/getdents.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (getdirentries, 4)
+ ret
+
+weak_alias (__getdirentries, getdirentries)
+
diff --git a/sysdeps/unix/bsd/osf/alpha/killpg.S b/sysdeps/unix/bsd/osf/alpha/killpg.S
new file mode 100644
index 0000000..f0b82b3
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/killpg.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_killpg SYS_ult_killpg
+
+SYSCALL (killpg, 2)
+ ret
diff --git a/sysdeps/unix/bsd/osf/alpha/pipe.S b/sysdeps/unix/bsd/osf/alpha/pipe.S
new file mode 100644
index 0000000..6b074ed
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/pipe.S
@@ -0,0 +1,30 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pipe, 1)
+ /* Plop in the two descriptors. */
+ stl r0, 0(a0)
+ stl r1, 4(a0)
+
+ /* Go out with a clean status. */
+ mov zero, r0
+ ret
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/osf/alpha/recv.S b/sysdeps/unix/bsd/osf/alpha/recv.S
new file mode 100644
index 0000000..4ac00eb
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/recv.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_recv SYS_ult_recv
+
+SYSCALL (recv, 4)
+ ret
diff --git a/sysdeps/unix/bsd/osf/alpha/send.S b/sysdeps/unix/bsd/osf/alpha/send.S
new file mode 100644
index 0000000..ca46894
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/send.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_send SYS_ult_send
+
+SYSCALL (send, 4)
+ ret
diff --git a/sysdeps/unix/bsd/osf/alpha/sigblock.S b/sysdeps/unix/bsd/osf/alpha/sigblock.S
new file mode 100644
index 0000000..c3556a9
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sigblock.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigblock SYS_ult_sigblock
+
+SYSCALL__ (sigblock, 1)
+ ret
+
+weak_alias (__sigblock, sigblock)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigpause.S b/sysdeps/unix/bsd/osf/alpha/sigpause.S
new file mode 100644
index 0000000..04b6d45
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sigpause.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigpause SYS_ult_sigpause
+
+SYSCALL__ (sigpause, 1)
+ ret
+
+weak_alias (__sigpause, sigpause)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigsetmask.S b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
new file mode 100644
index 0000000..fb3a1d1
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sigsetmask.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigsetmask SYS_ult_sigsetmask
+
+SYSCALL__ (sigsetmask, 1)
+ ret
+
+weak_alias (__sigsetmask, sigsetmask)
diff --git a/sysdeps/unix/bsd/osf/alpha/sigvec.S b/sysdeps/unix/bsd/osf/alpha/sigvec.S
new file mode 100644
index 0000000..b04ec6e
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sigvec.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigvec SYS_ult_sigvec
+
+SYSCALL__ (sigvec, 3)
+ ret
+
+weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/osf/alpha/start.S b/sysdeps/unix/bsd/osf/alpha/start.S
new file mode 100644
index 0000000..52eb036
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/start.S
@@ -0,0 +1,65 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.comm errno, 4
+
+!.sdata
+!.globl STARTFRM
+!STARTFRM = 0
+
+.text
+ENTRY(__start)
+ lda sp, -16(sp)
+ stq zero, 8(sp)
+
+ ! This branch puts the address of the current insn in t0.
+ br t0, 10f
+10:
+ ! We set the GP register by using the address of the ldgp
+ ! (what we just put into t0).
+ ldgp gp, 0(t0)
+
+ ! get argc
+ ldl a0, 16(sp)
+
+ ! get argv
+ lda a1, 24(sp)
+
+ ! move ahead to envp
+ s8addq a0, a1, a2
+ addq a2, 0x8, a2
+
+ ! Store in environ.
+ stq a2, environ
+
+ ! Clear out errno.
+! ldgp gp, 0(t12)
+ stl zero, errno
+
+ ! Call main.
+ jsr ra, main
+ ldgp gp, 0(ra)
+
+ mov v0, a0
+
+ jsr ra, exit
+ ldgp gp, 0(ra)
+
+ .end __start
diff --git a/sysdeps/unix/bsd/osf/alpha/statbuf.h b/sysdeps/unix/bsd/osf/alpha/statbuf.h
new file mode 100644
index 0000000..9cadfae
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/statbuf.h
@@ -0,0 +1,75 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ int st_dev; /* Device. */
+ unsigned int st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned short st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group.*/
+ int st_rdev; /* Device number, if device. */
+
+ long st_size; /* Size of file, in bytes. */
+
+ int st_atime; /* Time of last access. */
+ int st_atime_usec;
+ int st_mtime; /* Time of last modification. */
+ int st_mtime_usec;
+ int st_ctime; /* Time of last status change. */
+ int st_ctime_usec;
+
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ int st_blocks; /* Number of 512-byte blocks allocated. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.S b/sysdeps/unix/bsd/osf/alpha/sysdep.S
new file mode 100644
index 0000000..bc4865c
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+ENTRY(syscall_error)
+#ifdef EWOULDBLOCK_sys
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ subq v0, EWOULDBLOCK_sys, t0
+ cmoveq t0, EAGAIN, v0
+#endif
+
+ /* Store it in errno... */
+! ldgp gp, 0(t12)
+ stl v0, errno
+
+ /* And just kick back a -1. */
+ ldil v0, -1
+ ret
+
+ .end syscall_error
diff --git a/sysdeps/unix/bsd/osf/alpha/sysdep.h b/sysdeps/unix/bsd/osf/alpha/sysdep.h
new file mode 100644
index 0000000..3669a69
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/sysdep.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef ASSEMBLER
+
+#include <machine/pal.h> /* get PAL_callsys */
+#include <regdef.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl name; \
+ .ent name,0; \
+ name##:; \
+ .frame sp,0,ra
+#else
+#define ENTRY(name) \
+ .globl name; \
+ .ent name,0; \
+ name/**/:; \
+ .frame sp,0,ra
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY(name); \
+ ldiq v0, SYS_##syscall_name; \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ beq a3, 10f; \
+ br gp, 20f; \
+20:; \
+ ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
+10:
+#else
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY(name); \
+ ldiq v0, SYS_/**/syscall_name; \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ beq a3, 10f; \
+ br gp, 20f; \
+20:; \
+ ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
+10:
+#endif
+
+#define ret ret zero,(ra),1
+#define r0 v0
+#define r1 a4
+#define MOVE(x,y) mov x, y
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/bsd/osf/alpha/vhangup.S b/sysdeps/unix/bsd/osf/alpha/vhangup.S
new file mode 100644
index 0000000..d4d2b1c
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/vhangup.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_vhangup SYS_ult_vhangup
+
+SYSCALL (vhangup, 1)
+ ret
diff --git a/sysdeps/unix/bsd/osf/alpha/wait4.S b/sysdeps/unix/bsd/osf/alpha/wait4.S
new file mode 100644
index 0000000..e4c3223
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/wait4.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/bsd/osf/alpha/waitpid.c b/sysdeps/unix/bsd/osf/alpha/waitpid.c
new file mode 100644
index 0000000..8378982
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/alpha/waitpid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/waitpid.c>
diff --git a/sysdeps/unix/bsd/osf/msync.S b/sysdeps/unix/bsd/osf/msync.S
new file mode 100644
index 0000000..75b9f15
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/msync.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sunos4/msync.S>
diff --git a/sysdeps/unix/bsd/osf/sigaction.h b/sysdeps/unix/bsd/osf/sigaction.h
new file mode 100644
index 0000000..8a4e2c5
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/sigaction.h
@@ -0,0 +1,45 @@
+/* Structure and constand definitions for sigaction et al. OSF/1 version.
+ Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#ifdef __USE_BSD
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESTART 0x2 /* Don't restart syscall on signal return. */
+#define SA_DISABLE 0x4 /* Disable alternate signal stack. */
+#endif
+#define SA_NOCLDSTOP 0x4 /* Don't send SIGCHLD when children stop. */
+
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
diff --git a/sysdeps/unix/bsd/osf/system.c b/sysdeps/unix/bsd/osf/system.c
new file mode 100644
index 0000000..ef42ea2
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/system.c
@@ -0,0 +1,2 @@
+/* OSF/1 does have `waitpid'. Avoid unix/system.c, which says we don't. */
+#include <sysdeps/posix/system.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=864a3e4e2947eed46808e184fb4426c278995a11
commit 864a3e4e2947eed46808e184fb4426c278995a11
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 01:49:04 1995 +0000
imoved from osf1 (had to do it over here, cvs crashed at Cygnus
trying to do it remotely)
diff --git a/sysdeps/unix/bsd/osf/sys/mman.h b/sysdeps/unix/bsd/osf/sys/mman.h
new file mode 100644
index 0000000..397ad28
--- /dev/null
+++ b/sysdeps/unix/bsd/osf/sys/mman.h
@@ -0,0 +1,113 @@
+/* Definitions for BSD-style memory management. OSF/1 version.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _SYS_MMAN_H
+
+#define _SYS_MMAN_H 1
+#include <features.h>
+
+#include <gnu/types.h>
+#define __need_size_t
+#include <stddef.h>
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+
+
+/* Flags contain mapping type, sharing type and options. */
+
+/* Mapping type (must choose one and only one of these). */
+#define MAP_FILE 0x00 /* Mapped from a file or device. */
+#define MAP_ANON 0x10 /* Allocated from anonymous virtual memory. */
+#define MAP_ANONYMOUS MAP_ANON
+#define MAP_TYPE 0xf0 /* Mask for type field. */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+
+/* Other flags. */
+#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
+#define MAP_VARIABLE 0 /* Absence of MAP_FIXED. */
+#define MAP_HASSEMPHORE 0x0200 /* Region may contain semaphores. */
+#define MAP_INHERIT 0x0400 /* Region is retained after exec. */
+#define MAP_UNALIGNED 0x0800 /* File offset need not be page-aligned. */
+
+/* Advice to `madvise'. */
+#define MADV_NORMAL 0 /* No further special treatment. */
+#define MADV_RANDOM 1 /* Expect random page references. */
+#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+#define MADV_WILLNEED 3 /* Will need these pages. */
+#define MADV_DONTNEED 4 /* Don't need these pages. */
+#define MADV_SPACEAVAIL 5 /* Ensure that resources are available. */
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Asynchronous cache flush. */
+#define MS_SYNC 3 /* Synchronous cache flush. */
+#define MS_INVALIDATE 4 /* Invalidate cached pages. */
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+/* Map addresses starting near ADDR and extending for LEN bytes. from
+ OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
+ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
+ set in FLAGS, the mapping will be at ADDR exactly (which must be
+ page-aligned); otherwise the system chooses a convenient nearby address.
+ The return value is the actual mapping address chosen or (caddr_t) -1
+ for errors (in which case `errno' is set). A successful `mmap' call
+ deallocates any previous mapping for the affected region. */
+
+__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, off_t __offset));
+__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, off_t __offset));
+
+/* Deallocate any mapping for the region starting at ADDR and extending LEN
+ bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int __munmap __P ((__caddr_t __addr, size_t __len));
+int munmap __P ((__caddr_t __addr, size_t __len));
+
+/* Change the memory protection of the region starting at ADDR and
+ extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
+ (and sets errno). */
+int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+
+/* Synchronize the region starting at ADDR and extending LEN bytes with the
+ file it maps. Filesystem operations on a file being mapped are
+ unpredictable before this is done. */
+int msync __P ((__caddr_t __addr, size_t __len, int __flags));
+
+/* Advise the system about particular usage patterns the program follows
+ for the region starting at ADDR and extending LEN bytes. */
+int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+
+__END_DECLS
+
+
+#endif /* sys/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e667dcee383d4b1e6416bcce7d0b72e9ce340630
commit e667dcee383d4b1e6416bcce7d0b72e9ce340630
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Mar 10 01:22:34 1995 +0000
moved to ../osf
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
deleted file mode 100644
index 111f339..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#ifndef SYS_brk
-#define SYS_brk 17
-#endif
-
-#ifndef HAVE_GNU_LD
-#define __end end
-#endif
-
-.data
- .extern __end,8
- .globl __curbrk
-__curbrk:
- .quad __end
-
-.text
-ENTRY(__brk)
- ! FIXME We do not check for asking for less than a page yet.
- ldiq v0, SYS_brk
- call_pal PAL_callsys
- bne a3, error
-
- /* Update __curbrk and exit cleanly. */
-! ldgp gp, 0(t12)
- stl a0, __curbrk
-
- mov zero, v0
- ret
- /* What a horrible way to die. */
-error: ldgp gp,0(gp)
- jmp zero,syscall_error
- .end __brk
-
-weak_alias (__brk, brk)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
deleted file mode 100644
index 7c8d671..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (fork, 0)
- cmovne a4, 0, v0
- ret
-
-weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
deleted file mode 100644
index 16ccbc2..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (getdirentries, 4)
- ret
-
-weak_alias (__getdirentries, getdirentries)
-
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
deleted file mode 100644
index f0b82b3..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_killpg SYS_ult_killpg
-
-SYSCALL (killpg, 2)
- ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
deleted file mode 100644
index 6b074ed..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-SYSCALL__ (pipe, 1)
- /* Plop in the two descriptors. */
- stl r0, 0(a0)
- stl r1, 4(a0)
-
- /* Go out with a clean status. */
- mov zero, r0
- ret
-
-weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
deleted file mode 100644
index 4ac00eb..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_recv SYS_ult_recv
-
-SYSCALL (recv, 4)
- ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S
deleted file mode 100644
index ca46894..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/send.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_send SYS_ult_send
-
-SYSCALL (send, 4)
- ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
deleted file mode 100644
index c3556a9..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_sigblock SYS_ult_sigblock
-
-SYSCALL__ (sigblock, 1)
- ret
-
-weak_alias (__sigblock, sigblock)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
deleted file mode 100644
index 04b6d45..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_sigpause SYS_ult_sigpause
-
-SYSCALL__ (sigpause, 1)
- ret
-
-weak_alias (__sigpause, sigpause)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
deleted file mode 100644
index fb3a1d1..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_sigsetmask SYS_ult_sigsetmask
-
-SYSCALL__ (sigsetmask, 1)
- ret
-
-weak_alias (__sigsetmask, sigsetmask)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
deleted file mode 100644
index b04ec6e..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_sigvec SYS_ult_sigvec
-
-SYSCALL__ (sigvec, 3)
- ret
-
-weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
deleted file mode 100644
index 52eb036..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-.comm errno, 4
-
-!.sdata
-!.globl STARTFRM
-!STARTFRM = 0
-
-.text
-ENTRY(__start)
- lda sp, -16(sp)
- stq zero, 8(sp)
-
- ! This branch puts the address of the current insn in t0.
- br t0, 10f
-10:
- ! We set the GP register by using the address of the ldgp
- ! (what we just put into t0).
- ldgp gp, 0(t0)
-
- ! get argc
- ldl a0, 16(sp)
-
- ! get argv
- lda a1, 24(sp)
-
- ! move ahead to envp
- s8addq a0, a1, a2
- addq a2, 0x8, a2
-
- ! Store in environ.
- stq a2, environ
-
- ! Clear out errno.
-! ldgp gp, 0(t12)
- stl zero, errno
-
- ! Call main.
- jsr ra, main
- ldgp gp, 0(ra)
-
- mov v0, a0
-
- jsr ra, exit
- ldgp gp, 0(ra)
-
- .end __start
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
deleted file mode 100644
index 9cadfae..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#ifndef _STATBUF_H
-#define _STATBUF_H
-
-#include <gnu/types.h>
-
-/* Structure describing file characteristics. */
-struct stat
- {
- int st_dev; /* Device. */
- unsigned int st_ino; /* File serial number. */
- unsigned int st_mode; /* File mode. */
- unsigned short st_nlink; /* Link count. */
- unsigned int st_uid; /* User ID of the file's owner. */
- unsigned int st_gid; /* Group ID of the file's group.*/
- int st_rdev; /* Device number, if device. */
-
- long st_size; /* Size of file, in bytes. */
-
- int st_atime; /* Time of last access. */
- int st_atime_usec;
- int st_mtime; /* Time of last modification. */
- int st_mtime_usec;
- int st_ctime; /* Time of last status change. */
- int st_ctime_usec;
-
- unsigned int st_blksize; /* Optimal block size for I/O. */
-#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
-
- int st_blocks; /* Number of 512-byte blocks allocated. */
- unsigned int st_flags;
- unsigned int st_gen;
- };
-
-/* Encoding of the file mode. */
-
-#define __S_IFMT 0170000 /* These bits determine file type. */
-
-/* File types. */
-#define __S_IFDIR 0040000 /* Directory. */
-#define __S_IFCHR 0020000 /* Character device. */
-#define __S_IFBLK 0060000 /* Block device. */
-#define __S_IFREG 0100000 /* Regular file. */
-#define __S_IFIFO 0010000 /* FIFO. */
-
-#define __S_IFLNK 0120000 /* Symbolic link. */
-#define __S_IFSOCK 0140000 /* Socket. */
-
-/* Protection bits. */
-
-#define __S_ISUID 04000 /* Set user ID on execution. */
-#define __S_ISGID 02000 /* Set group ID on execution. */
-#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
-#define __S_IREAD 0400 /* Read by owner. */
-#define __S_IWRITE 0200 /* Write by owner. */
-#define __S_IEXEC 0100 /* Execute by owner. */
-
-#endif /* statbuf.h */
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
deleted file mode 100644
index bc4865c..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H
-#include <errnos.h>
-
-ENTRY(syscall_error)
-#ifdef EWOULDBLOCK_sys
- /* We translate the system's EWOULDBLOCK error into EAGAIN.
- The GNU C library always defines EWOULDBLOCK==EAGAIN.
- EWOULDBLOCK_sys is the original number. */
- subq v0, EWOULDBLOCK_sys, t0
- cmoveq t0, EAGAIN, v0
-#endif
-
- /* Store it in errno... */
-! ldgp gp, 0(t12)
- stl v0, errno
-
- /* And just kick back a -1. */
- ldil v0, -1
- ret
-
- .end syscall_error
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
deleted file mode 100644
index 3669a69..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdeps/unix/sysdep.h>
-
-#ifdef ASSEMBLER
-
-#include <machine/pal.h> /* get PAL_callsys */
-#include <regdef.h>
-
-#ifdef __STDC__
-#define ENTRY(name) \
- .globl name; \
- .ent name,0; \
- name##:; \
- .frame sp,0,ra
-#else
-#define ENTRY(name) \
- .globl name; \
- .ent name,0; \
- name/**/:; \
- .frame sp,0,ra
-#endif
-
-#ifdef __STDC__
-#define PSEUDO(name, syscall_name, args) \
- ENTRY(name); \
- ldiq v0, SYS_##syscall_name; \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- beq a3, 10f; \
- br gp, 20f; \
-20:; \
- ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
-10:
-#else
-#define PSEUDO(name, syscall_name, args) \
- ENTRY(name); \
- ldiq v0, SYS_/**/syscall_name; \
- .set noat; \
- call_pal PAL_callsys; \
- .set at; \
- beq a3, 10f; \
- br gp, 20f; \
-20:; \
- ldgp gp, 0(gp); \
- jmp zero, syscall_error; \
-10:
-#endif
-
-#define ret ret zero,(ra),1
-#define r0 v0
-#define r1 a4
-#define MOVE(x,y) mov x, y
-
-#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
deleted file mode 100644
index d4d2b1c..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <sysdep.h>
-
-#include <sys/ult_syscall.h>
-#define SYS_vhangup SYS_ult_vhangup
-
-SYSCALL (vhangup, 1)
- ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
deleted file mode 100644
index e4c3223..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
deleted file mode 100644
index 8378982..0000000
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/bsd/bsd4.4/waitpid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66971be81100ed599e4acb31fd7d9edd86b680b6
commit 66971be81100ed599e4acb31fd7d9edd86b680b6
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 6 00:22:30 1995 +0000
Initial checkin.
diff --git a/sysdeps/unix/bsd/hp/m68k/vfork.S b/sysdeps/unix/bsd/hp/m68k/vfork.S
new file mode 100644
index 0000000..b70c122
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/vfork.S
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_vfork
+#define SYS_vfork 66
+#endif
+
+/* Clone the calling process, but without copying the whole address space.
+ The the calling process is suspended until the the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+.globl ___vfork
+___vfork:
+ /* Pop the return PC value into A0. */
+ moveal sp@+, a0
+
+ /* Stuff the syscall number in D0 and trap into the kernel. */
+ movel #SYS_vfork, d0
+ trap #0
+ bcs error /* Branch forward if it failed. */
+
+ /* It succeeded. See which fork we're in. D1 is now 0 for the
+ parent and 1 for the child. Decrement it to make it -1 (all
+ bits set) for the parent, and 0 (no bits set) for the child.
+ Then AND it with D0, so the parent gets D0&-1==R0, and the child
+ gets D0&0==0. */
+ subl #1, d1
+ andl d1, d0
+
+ /* Jump to the return PC. */
+ jmp a0@
+
+error:
+ movel d0, _errno
+ moveq #-1, d0
+ jmp a0@
+
+weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/sun/m68k/vfork.S b/sysdeps/unix/bsd/sun/m68k/vfork.S
new file mode 100644
index 0000000..cb7dae8
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/vfork.S
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_vfork
+#define SYS_vfork 66
+#endif
+
+/* Clone the calling process, but without copying the whole address space.
+ The the calling process is suspended until the the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+.globl ___vfork
+___vfork:
+ /* Pop the return PC value into A0. */
+ movel sp@+, a0
+
+ /* Push the syscall number and trap into the kernel. */
+ movel #SYS_vfork, sp@-
+ trap #0
+ bcs error /* Branch forward if it failed. */
+
+ /* It succeeded. See which fork we're in. D1 is now 0 for the
+ parent and 1 for the child. Decrement it to make it -1 (all
+ bits set) for the parent, and 0 (no bits set) for the child.
+ Then AND it with D0, so the parent gets D0&-1==R0, and the child
+ gets D0&0==0. */
+ decl d1
+ andl d1, d0
+
+ /* Jump to the return PC. */
+ jmp a0@
+
+error:
+ movel d0, _errno
+ moveq #-1, d0
+ jmp a0@
+
+weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/vax/vfork.S b/sysdeps/unix/bsd/vax/vfork.S
new file mode 100644
index 0000000..daf8f0f
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/vfork.S
@@ -0,0 +1,57 @@
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_vfork
+#define SYS_vfork 66
+#endif
+
+/* Clone the calling process, but without copying the whole address space.
+ The the calling process is suspended until the the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+.globl ___vfork
+error: jmp syscall_error
+___vfork:
+ .word 0
+ /* Save our return address in R2, and return to code below. */
+ movl 16(fp), r2
+ movab unwind, 16(fp)
+ ret
+unwind:
+ /* Do the system call. */
+ chmk $SYS_vfork
+ bcs error
+
+ tstl r1
+ beq parent
+
+ /* We are the child. Return zero. */
+ clrl r0
+
+ /* Return to the saved address. */
+parent: jmp (r2)
+
+.globl _errno
+error:
+ movl r0, _errno
+ mnegl $1, r0
+ jmp (r2)
+
+weak_alias (__vfork, vfork)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35ca0c8d1b6d0d8d3c9d76191872ec371ac34f24
commit 35ca0c8d1b6d0d8d3c9d76191872ec371ac34f24
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 3 20:06:13 1995 +0000
(__mmap, __munmap): Declare these.
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 727e665..10f31a8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. SunOS 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -80,11 +80,14 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
+__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, __off_t __offset));
__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
int __prot, int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int __munmap __P ((__caddr_t __addr, size_t __len));
int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
index c850b4f..d49da02 100644
--- a/sysdeps/unix/bsd/ultrix4/sys/mman.h
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Ultrix 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the bits used by 4.4 BSD and its derivatives. On systems
- (such as GNU) where these facilities are not system services but can be
- emulated in the C library, these are the definitions we emulate. */
-
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H 1
@@ -70,11 +66,14 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
+__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, off_t __offset));
__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
int __prot, int __flags, int __fd, off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int __munmap __P ((__caddr_t __addr, size_t __len));
int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
diff --git a/sysdeps/unix/sysv/irix4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
index ac50aab..543ce55 100644
--- a/sysdeps/unix/sysv/irix4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,5 +1,5 @@
/* Definitions for BSD-style memory management. Irix 4 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -74,11 +74,14 @@ __BEGIN_DECLS
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
+__caddr_t __mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, __off_t __offset));
__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
int __prot, int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int __munmap __P ((__caddr_t __addr, size_t __len));
int munmap __P ((__caddr_t __addr, size_t __len));
/* Change the memory protection of the region starting at ADDR and
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35618994bc6004999a5b99577909b9fb26933c46
commit 35618994bc6004999a5b99577909b9fb26933c46
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 3 19:42:08 1995 +0000
(mmap): Rename to __mmap, add weak alias mmap.
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
index 4dfc1ca..b719373 100644
--- a/sysdeps/unix/bsd/sun/sunos4/mmap.c
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,8 +34,9 @@ extern caddr_t __mmap_syscall (caddr_t addr, size_t len,
caddr_t
-mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+__mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset);
}
-
+
+weak_alias (__mmap, mmap)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac873351a085933e6f2b8aa08db4844732fb4be6
commit ac873351a085933e6f2b8aa08db4844732fb4be6
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 22 02:53:16 1995 +0000
[subdir=crypt] (crypt): New variable, set to crypt.solar.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
index 7ad4bb1..1c17ea1 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
@@ -3,3 +3,9 @@
# and difftime.o don't work because of this. The long-term fix is to actually
# implement what they're doing, but for the short-term, we must do this.
sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
+
+ifeq ($(subdir),crypt)
+
+crypt := crypt.solar
+
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=882ec8cfeb04fd31d6a2bc4c3fe06f3fe806e87a
commit 882ec8cfeb04fd31d6a2bc4c3fe06f3fe806e87a
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 21 03:05:56 1995 +0000
Remove `__environ' definition.
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
index 8b7109a..52eb036 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
@@ -18,13 +18,6 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifndef HAVE_WEAK_SYMBOLS
-#define __environ environ
-#else
-weak_alias (__environ, environ)
-#endif
-
-.comm __environ, 8
.comm errno, 4
!.sdata
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index ec0f9d8..eec8ce0 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -18,13 +18,6 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifndef HAVE_WEAK_SYMBOLS
-#define __environ environ
-#else
-weak_alias (__environ, environ)
-#endif
-
-.comm __environ, 4
.comm errno, 4
ENTRY(__start)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f427a39dbda2671bc46ee39b4dfc08d49f5337ed
commit f427a39dbda2671bc46ee39b4dfc08d49f5337ed
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 20 00:53:51 1995 +0000
Remove __environ definition.
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
index 4382e6f..cd86f85 100644
--- a/sysdeps/unix/sysv/irix4/start.c
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,13 +30,6 @@ int __data_start = 0;
VOLATILE int errno = 0;
-#ifndef HAVE_GNU_LD
-#undef environ
-#define __environ environ
-#endif
-
-char **__environ;
-
extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
extern int EXFUN(main, (int argc, char **argv, char **envp));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e95606364c937da4a9b0596cfde2db8a307fd547
commit e95606364c937da4a9b0596cfde2db8a307fd547
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 19 23:43:06 1995 +0000
Fix #include of renamed file. Remove extra weak alias.
diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c
index c7015fc..7d36e0e 100644
--- a/sysdeps/unix/sysv/sysv4/dup2.c
+++ b/sysdeps/unix/sysv/sysv4/dup2.c
@@ -1,4 +1,2 @@
/* SVR4 uses the POSIX dup2. */
-#include <sysdeps/posix/__dup2.c>
-
-weak_alias (__dup2, dup2)
+#include <sysdeps/posix/dup2.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=484d089077a2e3316bb5e6d365aa33b638077a60
commit 484d089077a2e3316bb5e6d365aa33b638077a60
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 19 23:33:19 1995 +0000
Fix unsquashed file name in #include.
diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S
index e7e4060..f7cf0d5 100644
--- a/sysdeps/unix/sysv/sysv4/sigaltstack.S
+++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S
@@ -1,2 +1,2 @@
/* SVR4 uses the BSD 4.4 sigaltstack syscall. */
-#include <sysdeps/unix/bsd/bsd4.4/sigaltstk.S>
+#include <sysdeps/unix/bsd/bsd4.4/sigaltstack.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92c7a8e20e7d92acbdb081450b07d6cb98150c81
commit 92c7a8e20e7d92acbdb081450b07d6cb98150c81
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 18 00:05:51 1995 +0000
Previously uncontrolled files put into CVS.
diff --git a/sysdeps/mach/hurd/hppa/sigcontext.h b/sysdeps/mach/hurd/hppa/sigcontext.h
new file mode 100644
index 0000000..b616469
--- /dev/null
+++ b/sysdeps/mach/hurd/hppa/sigcontext.h
@@ -0,0 +1,86 @@
+/* Machine-dependent signal context structure for GNU Hurd. HPPA version.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ /* These first members are machine-independent. */
+
+ int sc_onstack; /* Nonzero if running on sigstack. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned int sc_intr_port;
+
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_error;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to a `struct
+ parisc_thread_state'. trampoline.c knows this, so it must be
+ changed if this changes. */
+
+#define sc_parisc_thread_state sc_flags /* Beginning of correspondence. */
+ /* "General" registers $1..$31. */
+ unsigned int sc_regs[31];
+
+ /* Control registers. */
+ unsigned int sc_cr11; /* sar */
+ /* These four registers make up the PC. */
+ unsigned int iioq_head;
+ unsigned int iisq_head;
+ unsigned int iioq_tail;
+ unsigned int iisq_tail;
+ unsigned int sc_cr15;
+ unsigned int sc_cr19;
+ unsigned int sc_cr20;
+ unsigned int sc_cr21;
+ unsigned int sc_cr22; /* ipsw */
+ unsigned int sc_bsd_goto; /* unused */
+ unsigned int sc_sr4;
+ unsigned int sc_sr0;
+ unsigned int sc_sr1;
+ unsigned int sc_sr2;
+ unsigned int sc_sr3;
+ unsigned int sc_sr5;
+ unsigned int sc_sr6;
+ unsigned int sc_sr7;
+ unsigned int sc_cr0;
+ unsigned int sc_cr8;
+ unsigned int sc_cr9;
+ unsigned int sc_cr10; /* unused */
+ unsigned int sc_cr12;
+ unsigned int sc_cr13;
+ unsigned int sc_cr24; /* unused */
+ unsigned int sc_cr25; /* unused */
+ unsigned int sc_cr26; /* unused */
+ unsigned sc_mpsfu_high; /* unused */
+ unsigned sc_mpsfu_low; /* unused */
+ unsigned sc_mpsfu_ovflo; /* unused */
+ int sc_pad;
+
+ /* Floating point registers $f0..$f31. */
+ double sc_fpregs[32];
+ };
diff --git a/sysdeps/mach/hurd/hppa/trampoline.c b/sysdeps/mach/hurd/hppa/trampoline.c
new file mode 100644
index 0000000..09ab71e
--- /dev/null
+++ b/sysdeps/mach/hurd/hppa/trampoline.c
@@ -0,0 +1,258 @@
+/* Set thread_state for sighandler, and sigcontext to recover. HPPA version.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd/signal.h>
+#include "thread_state.h"
+#include <assert.h>
+#include <errno.h>
+#include "hurdfault.h"
+
+
+struct mach_msg_trap_regargs
+ {
+ /* These first four arguments are in registers 26..23. */
+ mach_msg_size_t rcv_size; /* arg3 */
+ mach_msg_size_t send_size; /* arg2 */
+ mach_msg_option_t option; /* arg1 */
+ mach_msg_header_t *msg; /* arg0 */
+ };
+
+struct sigcontext *
+_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
+ int signo, long int sigcode,
+ volatile int rpc_wait,
+ struct machine_thread_all_state *state)
+{
+ __label__ trampoline, rpc_wait_trampoline;
+ void *volatile sigsp;
+ struct sigcontext *scp;
+
+ if (ss->context)
+ {
+ /* We have a previous sigcontext that sigreturn was about
+ to restore when another signal arrived. We will just base
+ our setup on that. */
+ if (_hurdsig_catch_fault (SIGSEGV))
+ assert (_hurdsig_fault_sigcode >= (long int) ss->context &&
+ _hurdsig_fault_sigcode < (long int) (ss->context + 1));
+ else
+ {
+ memcpy (&state->basic, &ss->context->sc_parisc_thread_state,
+ sizeof (state->basic));
+ state->set = (1 << PARISC_THREAD_STATE);
+ assert (! rpc_wait);
+ /* The intr_port slot was cleared before sigreturn sent us the
+ sig_post that made us notice this pending signal, so
+ _hurd_internal_post_signal wouldn't do interrupt_operation.
+ After we return, our caller will set SCP->sc_intr_port (in the
+ new context) from SS->intr_port and clear SS->intr_port. Now
+ that we are restoring this old context recorded by sigreturn,
+ we want to restore its intr_port too; so store it in
+ SS->intr_port now, so it will end up in SCP->sc_intr_port
+ later. */
+ ss->intr_port = ss->context->sc_intr_port;
+ }
+ /* If the sigreturn context was bogus, just ignore it. */
+ ss->context = NULL;
+ }
+ else if (! machine_get_basic_state (ss->thread, state))
+ return NULL;
+
+ if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
+ !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ {
+ sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
+ ss->sigaltstack.ss_flags |= SA_ONSTACK;
+ /* XXX need to set up base of new stack for
+ per-thread variables, cthreads. */
+ }
+ else
+ sigsp = (char *) state->basic.uesp;
+
+ /* Push the signal context on the stack. */
+ sigsp -= sizeof (*scp);
+ scp = sigsp;
+
+ if (_hurdsig_catch_fault (SIGSEGV))
+ {
+ assert (_hurdsig_fault_sigcode >= (long int) scp &&
+ _hurdsig_fault_sigcode <= (long int) (scp + 1));
+ /* We got a fault trying to write the stack frame.
+ We cannot set up the signal handler.
+ Returning NULL tells our caller, who will nuke us with a SIGILL. */
+ return NULL;
+ }
+ else
+ {
+ int ok;
+
+ /* Set up the sigcontext from the current state of the thread. */
+
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
+
+ /* struct sigcontext is laid out so that starting at sc_regs mimics a
+ struct parisc_thread_state. */
+ memcpy (&scp->sc_parisc_thread_state,
+ &state->basic, sizeof (state->basic));
+
+ _hurdsig_end_catch_fault ();
+
+ if (! ok)
+ return NULL;
+ }
+
+ /* Modify the thread state to call the trampoline code on the new stack. */
+ if (rpc_wait)
+ {
+ /* The signalee thread was blocked in a mach_msg_trap system call,
+ still waiting for a reply. We will have it run the special
+ trampoline code which retries the message receive before running
+ the signal handler.
+
+ To do this we change the OPTION argument on its stack to enable only
+ message reception, since the request message has already been
+ sent. */
+
+ struct mach_msg_trap_regargs *args = (void *) &state->basic.r23;
+
+ if (_hurdsig_catch_fault (SIGSEGV))
+ {
+ assert (_hurdsig_fault_sigcode >= (long int) args &&
+ _hurdsig_fault_sigcode < (long int) (args + 1));
+ /* Faulted accessing ARGS. Bomb. */
+ return NULL;
+ }
+
+ assert (args->option & MACH_RCV_MSG);
+ /* Disable the message-send, since it has already completed. The
+ calls we retry need only wait to receive the reply message. */
+ args->option &= ~MACH_SEND_MSG;
+
+ _hurdsig_end_catch_fault ();
+
+ MACHINE_THREAD_STATE_SET_PC (&state->basic, &&rpc_wait_trampoline);
+ /* The reply-receiving trampoline code runs initially on the original
+ user stack. We pass it the signal stack pointer in %r5. */
+ state->basic.r5 = (int) sigsp;
+ /* After doing the message receive, the trampoline code will need to
+ update the %r28 value to be restored by sigreturn. To simplify
+ the assembly code, we pass the address of its slot in SCP to the
+ trampoline code in %r4. */
+ state->basic.r4 = (unsigned int) &scp->sc_regs[27];
+ /* Set up the arguments for the handler function in callee-saved
+ registers that we will move to the argument registers after
+ mach_msg_trap returns. */
+ state->basic.r6 = signo;
+ state->basic.r7 = sigcode;
+ state->basic.r8 = (unsigned int) scp;
+ }
+ else
+ {
+ MACHINE_THREAD_STATE_SET_PC (&state->basic, &&trampoline);
+ state->basic.r20 = (unsigned int) sigsp;
+ /* Set up the arguments for the handler function. */
+ state->basic.r26 = signo;
+ state->basic.r25 = sigcode;
+ state->basic.r24 = (unsigned int) scp;
+ }
+
+ /* We pass the handler function to the trampoline code in %r9. */
+ state->basic.r9 = (unsigned int) handler;
+ /* For convenience, we pass the address of __sigreturn in %r10. */
+ state->basic.r10 = (unsigned int) &__sigreturn;
+ /* The extra copy of SCP for the __sigreturn arg goes in %r8. */
+ state->basic.r10 = (unsigned int) scp;
+
+ return scp;
+
+ /* The trampoline code follows. This is not actually executed as part of
+ this function, it is just convenient to write it that way. */
+
+ rpc_wait_trampoline:
+ /* This is the entry point when we have an RPC reply message to receive
+ before running the handler. The MACH_MSG_SEND bit has already been
+ cleared in the OPTION argument on our stack. The interrupted user
+ stack pointer has not been changed, so the system call can find its
+ arguments; the signal stack pointer is in %ebx. For our convenience,
+ %ecx points to the sc_eax member of the sigcontext. */
+ asm volatile
+ (/* Retry the interrupted mach_msg system call. */
+ "ldil L%0xC0000000,%r1\nble 4(%sr7,%r1)\n"
+ "ldi -25, %r22\n" /* mach_msg_trap */
+ /* When the sigcontext was saved, %r28 was MACH_RCV_INTERRUPTED. But
+ now the message receive has completed and the original caller of
+ the RPC (i.e. the code running when the signal arrived) needs to
+ see the final return value of the message receive in %r28. So
+ store the new %r28 value into the sc_regs[27] member of the sigcontext
+ (whose address is in %r4 to make this code simpler). */
+ "stw (%r4), %r28\n"
+ /* Switch to the signal stack. */
+ "copy %r5, %r30\n"
+ /* Copy the handler arguments to the argument registers. */
+ "copy %r6, %r26\n"
+ "copy %r7, %r25\n"
+ "copy %r8, %r24\n"
+ );
+
+ trampoline:
+ /* Entry point for running the handler normally. The arguments to the
+ handler function are already in the argument registers. */
+ asm volatile
+ ("bv (%r9); nop" /* Call the handler function. */
+ "bv (%r10)\n" /* Call __sigreturn (SCP); never returns. */
+ "copy %r8, %r26" /* Set up arg in delay slot. */
+ : : "i" (&__sigreturn));
+
+ /* NOTREACHED */
+ return NULL;
+}
+
+/* STATE describes a thread that had intr_port set (meaning it was inside
+ HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
+ just completed a mach_msg_trap system call that returned
+ MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
+ being waited on. */
+int
+_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
+ mach_port_t *port)
+{
+ const unsigned int *volatile pc
+ = MACHINE_THREAD_STATE_PC (&state->basic);
+ const mach_port_t *rcv_name
+ = (void *) state->r30 -32-20; /* VA_ARG4 from <mach/machine/asm.h>. */
+
+ if (_hurdsig_catch_fault (SIGSEGV))
+ assert (_hurdsig_fault_sigcode == (long int) pc ||
+ _hurdsig_fault_sigcode == (long int) rcv_name);
+ else
+ {
+ int rcving = (state->basic.r28 == MACH_RCV_INTERRUPTED &&
+ pc == ???unfinished???);
+ if (rcving)
+ /* We did just return from a mach_msg_trap system call
+ doing a message receive that was interrupted.
+ Examine the parameters to find the receive right. */
+ *port = *rcv_name;
+ _hurdsig_end_catch_fault ();
+ if (rcving)
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/sysdeps/mips/.cvsignore b/sysdeps/mips/.cvsignore
new file mode 100644
index 0000000..1f69fd9
--- /dev/null
+++ b/sysdeps/mips/.cvsignore
@@ -0,0 +1,4 @@
+*.gz *.Z *.tar *.tgz
+=*
+TODO COPYING* AUTHORS copyr-* copying.*
+glibc-*
diff --git a/sysdeps/unix/bsd/sun/sunos4/.cvsignore b/sysdeps/unix/bsd/sun/sunos4/.cvsignore
new file mode 100644
index 0000000..1f69fd9
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/.cvsignore
@@ -0,0 +1,4 @@
+*.gz *.Z *.tar *.tgz
+=*
+TODO COPYING* AUTHORS copyr-* copying.*
+glibc-*
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5e7cd26de60edf58727036e6900db75dc434d6d8
commit 5e7cd26de60edf58727036e6900db75dc434d6d8
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 17 23:48:00 1995 +0000
(divrem output): Do cvs commit if there is a CVS directory.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 4ea3894..06621b8 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@zen.org).
# The GNU C Library is free software; you can redistribute it and/or
@@ -91,3 +91,4 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)
# Make it unwritable so noone will edit it by mistake.
-chmod a-w $@-tmp
mv -f $@-tmp $@
+ test -d CVS && cvs commit -m'Regenerated from $<' $@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a424e41858ca32d2cff1a1fc57ccceb415cccb79
commit a424e41858ca32d2cff1a1fc57ccceb415cccb79
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 17 20:14:40 1995 +0000
Files generated from divrem.m4.
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/divl.S
similarity index 62%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/divl.S
index 4bdc3db..7ae3e0c 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/divl.S
@@ -13,48 +13,42 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
-
+FUNC__(divl)
+ /* First set up the dividend. */
+ sextl t10, t10
+
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
+
+ /* Then set up the divisor. */
+ sextl t11, t11
- ! Then set up the divisor.
-
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
-
+ sextl t12, t12
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
+
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(divl)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/divlu.S
similarity index 62%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/divlu.S
index 4bdc3db..9ae5950 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/divlu.S
@@ -13,48 +13,42 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
-
+FUNC__(divlu)
+ /* First set up the dividend. */
+ zapnot t10, 0xf, t10
+
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
+
+ /* Then set up the divisor. */
+ zapnot t11, 0xf, t11
- ! Then set up the divisor.
-
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
-
+ sextl t12, t12
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
+
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(divlu)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/divq.S
similarity index 61%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/divq.S
index 4bdc3db..79ff6ca 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/divq.S
@@ -13,48 +13,39 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
+FUNC__(divq)
+ /* First set up the dividend. */
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
-
+
- ! Then set up the divisor.
+ /* Then set up the divisor. */
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
-
+
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(divq)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/divqu.S
similarity index 78%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/divqu.S
index 4bdc3db..7908b9f 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/divqu.S
@@ -13,15 +13,15 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
+FUNC__(divqu)
+ /* First set up the dividend. */
stq t10,0(sp)
ldt $f10,0(sp)
@@ -31,7 +31,7 @@ FUNC__(remqu)
fcmovlt $f10, $f26, $f10
- ! Then set up the divisor.
+ /* Then set up the divisor. */
stq t11,0(sp)
ldt $f1,0(sp)
@@ -41,20 +41,17 @@ FUNC__(remqu)
fcmovlt $f1, $f26, $f1
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
-
+
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(divqu)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/reml.S
similarity index 61%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/reml.S
index 4bdc3db..2ece297 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/reml.S
@@ -13,48 +13,45 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
-
+FUNC__(reml)
+ /* First set up the dividend. */
+ sextl t10, t10
+
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
+
+ /* Then set up the divisor. */
+ sextl t11, t11
- ! Then set up the divisor.
-
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
-
+ sextl t12, t12
+
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
+ /* Compute the remainder. */
+ mull t11, t12, t11
+ subl t10, t11, t12
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(reml)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remlu.S
similarity index 61%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/remlu.S
index 4bdc3db..d7700e6 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remlu.S
@@ -13,48 +13,45 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
-
+FUNC__(remlu)
+ /* First set up the dividend. */
+ zapnot t10, 0xf, t10
+
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
+
+ /* Then set up the divisor. */
+ zapnot t11, 0xf, t11
- ! Then set up the divisor.
-
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
-
+ sextl t12, t12
+
- ! Compute the remainder.
- mulq t11, t12, t11
- subq t10, t11, t12
+ /* Compute the remainder. */
+ mull t11, t12, t11
+ subl t10, t11, t12
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(remlu)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remq.S
similarity index 65%
copy from sysdeps/alpha/remqu.S
copy to sysdeps/alpha/remq.S
index 4bdc3db..47510cb 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remq.S
@@ -13,48 +13,42 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
-FUNC__(remqu)
- ! First set up the dividend.
+FUNC__(remq)
+ /* First set up the dividend. */
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
- ldit $f26, 18446744073709551616.0
- addt $f26, $f10, $f26
- fcmovlt $f10, $f26, $f10
-
+
- ! Then set up the divisor.
+ /* Then set up the divisor. */
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
- ldit $f26, 18446744073709551616.0
- addt $f26, $f1, $f26
- fcmovlt $f1, $f26, $f1
-
+
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
- ! Compute the remainder.
+ /* Compute the remainder. */
mulq t11, t12, t11
subq t10, t11, t12
lda sp,16(sp)
ret zero,(t9),1
- .end NAME__(remqu)
+ .end NAME__(remq)
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index 4bdc3db..ec9572d 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -13,7 +13,7 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
@@ -21,7 +21,7 @@
FUNC__(remqu)
- ! First set up the dividend.
+ /* First set up the dividend. */
stq t10,0(sp)
ldt $f10,0(sp)
@@ -31,7 +31,7 @@ FUNC__(remqu)
fcmovlt $f10, $f26, $f10
- ! Then set up the divisor.
+ /* Then set up the divisor. */
stq t11,0(sp)
ldt $f1,0(sp)
@@ -41,16 +41,16 @@ FUNC__(remqu)
fcmovlt $f1, $f26, $f1
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
- ! Compute the remainder.
+ /* Compute the remainder. */
mulq t11, t12, t11
subq t10, t11, t12
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b84e62ef211c4d80b4f95ba3c5cadbbdea6727c
commit 3b84e62ef211c4d80b4f95ba3c5cadbbdea6727c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 17 20:13:09 1995 +0000
Imported from gmp-1.900
diff --git a/sysdeps/alpha/gmp-mparam.h b/sysdeps/alpha/gmp-mparam.h
new file mode 100644
index 0000000..05c893f
--- /dev/null
+++ b/sysdeps/alpha/gmp-mparam.h
@@ -0,0 +1,26 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
+#define BITS_PER_LONGINT 64
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
diff --git a/sysdeps/alpha/udiv_qrnnd.S b/sysdeps/alpha/udiv_qrnnd.S
new file mode 100644
index 0000000..942d7a8
--- /dev/null
+++ b/sysdeps/alpha/udiv_qrnnd.S
@@ -0,0 +1,152 @@
+ # Alpha 21064 __udiv_qrnnd
+
+ # Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ # This file is part of the GNU MP Library.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU Library General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # The GNU MP Library is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU Library General Public License
+ # along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+ .set noreorder
+ .set noat
+
+.text
+ .align 3
+ .globl __udiv_qrnnd
+ .ent __udiv_qrnnd 0
+__udiv_qrnnd:
+__udiv_qrnnd..ng:
+ .frame $30,0,$26,0
+ .prologue 0
+#define cnt $2
+#define tmp $3
+#define rem_ptr $16
+#define n1 $17
+#define n0 $18
+#define d $19
+#define qb $20
+
+ ldiq cnt,16
+ blt d,Largedivisor
+
+Loop1: cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ subq cnt,1,cnt
+ bgt cnt,Loop1
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+Largedivisor:
+ and n0,1,$4
+
+ srl n0,1,n0
+ sll n1,63,tmp
+ or tmp,n0,n0
+ srl n1,1,n1
+
+ and d,1,$6
+ srl d,1,$5
+ addq $5,$6,$5
+
+Loop2: cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ subq cnt,1,cnt
+ bgt cnt,Loop2
+
+ addq n1,n1,n1
+ addq $4,n1,n1
+ bne $6,Odd
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+Odd:
+ /* q' in n0. r' in n1. */
+ addq n1,n0,n1
+ cmpult n1,n0,tmp # tmp := carry from addq
+ beq tmp,LLp6
+ addq n0,1,n0
+ subq n1,d,n1
+LLp6: cmpult n1,d,tmp
+ bne tmp,LLp7
+ addq n0,1,n0
+ subq n1,d,n1
+LLp7:
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+ .end __udiv_qrnnd
diff --git a/sysdeps/m68k/m68020/add_n.S b/sysdeps/m68k/m68020/add_n.S
new file mode 100644
index 0000000..ea7a445
--- /dev/null
+++ b/sysdeps/m68k/m68020/add_n.S
@@ -0,0 +1,76 @@
+/* mc68020 __mpn_add_n -- Add two limb vectors of the same length > 0 and store
+ sum in a third limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ s2_ptr (sp + 16)
+ size (sp + 12)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_add_n
+
+LAB(___mpn_add_n)
+/* Save used registers on the stack. */
+ INSN2(move,l ,MEM_PREDEC(sp),d2)
+ INSN2(move,l ,MEM_PREDEC(sp),a2)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,a2,MEM_DISP(sp,12))
+ INSN2(move,l ,a0,MEM_DISP(sp,16))
+ INSN2(move,l ,a1,MEM_DISP(sp,20))
+ INSN2(move,l ,d2,MEM_DISP(sp,24))
+
+ INSN2(eor,w ,d2,#1)
+ INSN2(lsr,l ,d2,#1)
+ bcc L1
+ INSN2(subq,l ,d2,#1) /* clears cy as side effect */
+
+LAB(Loop)
+ INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(addx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(addx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+
+ dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
+ INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ INSN2(sub,l ,d2,#0x10000)
+ bcs L2
+ INSN2(add,l ,d0,d0) /* restore cy */
+ bra Loop
+
+LAB(L2)
+ INSN1(neg,l ,d0)
+
+/* Restore used registers from stack frame. */
+ INSN2(move,l ,a2,MEM_POSTINC(sp))
+ INSN2(move,l ,d2,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m68k/m68020/addmul_1.S b/sysdeps/m68k/m68020/addmul_1.S
new file mode 100644
index 0000000..3f244c4
--- /dev/null
+++ b/sysdeps/m68k/m68020/addmul_1.S
@@ -0,0 +1,80 @@
+/* mc68020 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
+ the result to a second limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ size (sp + 12)
+ s2_limb (sp + 16)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_addmul_1
+
+LAB(___mpn_addmul_1)
+
+#define res_ptr a0
+#define s1_ptr a1
+#define size d2
+#define s2_limb d4
+
+/* Save used registers on the stack. */
+ INSN2(movem,l ,MEM_PREDEC(sp),d2-d5)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,res_ptr,MEM_DISP(sp,20))
+ INSN2(move,l ,s1_ptr,MEM_DISP(sp,24))
+ INSN2(move,l ,size,MEM_DISP(sp,28))
+ INSN2(move,l ,s2_limb,MEM_DISP(sp,32))
+
+ INSN2(eor,w ,size,#1)
+ INSN1(clr,l ,d1)
+ INSN1(clr,l ,d5)
+ INSN2(lsr,l ,size,#1)
+ bcc L1
+ INSN2(subq,l ,size,#1)
+ INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
+
+LAB(Loop)
+ INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d1:d3,s2_limb)
+ INSN2(addx,l ,d3,d0)
+ INSN2(addx,l ,d1,d5)
+ INSN2(add,l ,MEM_POSTINC(res_ptr),d3)
+LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d0:d3,s2_limb)
+ INSN2(addx,l ,d3,d1)
+ INSN2(addx,l ,d0,d5)
+ INSN2(add,l ,MEM_POSTINC(res_ptr),d3)
+
+ dbf size,Loop
+ INSN2(addx,l ,d0,d5)
+ INSN2(sub,l ,size,#0x10000)
+ bcc Loop
+
+/* Restore used registers from stack frame. */
+ INSN2(movem,l ,d2-d5,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m68k/m68020/asm-syntax.h b/sysdeps/m68k/m68020/asm-syntax.h
new file mode 100644
index 0000000..394b3ca
--- /dev/null
+++ b/sysdeps/m68k/m68020/asm-syntax.h
@@ -0,0 +1,105 @@
+/* asm.h -- Definitions for 68k syntax variations.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifdef MIT_SYNTAX
+#define MEM(base)base@
+#define MEM_DISP(base,displacement)base@(displacement)
+#define MEM_PREDEC(memory_base)memory_base@-
+#define MEM_POSTINC(memory_base)memory_base@+
+#ifdef __STDC__
+#define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst
+#else
+#define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst
+#endif
+#define LAB(label) label:
+#define TEXT .text
+#define ALIGN .even
+#define GLOBL .globl
+#endif
+
+#ifdef SONY_SYNTAX
+#define MEM(base)(base)
+#define MEM_DISP(base,displacement)(displacement,base)
+#define MEM_PREDEC(memory_base)-(memory_base)
+#define MEM_POSTINC(memory_base)(memory_base)+
+#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
+#ifdef __STDC__
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
+#else
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
+#endif
+#define LAB(label) label:
+#define TEXT .text
+#define ALIGN .even
+#define GLOBL .globl
+#endif
+
+#ifdef MOTOROLA_SYNTAX
+#define MEM(base)(base)
+#define MEM_DISP(base,displacement)(displacement,base)
+#define MEM_PREDEC(memory_base)-(memory_base)
+#define MEM_POSTINC(memory_base)(memory_base)+
+#define INSN1(mnemonic,size_suffix,dst)mnemonic.size_suffix dst
+#ifdef __STDC__
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src##,dst
+#else
+#define INSN2(mnemonic,size_suffix,dst,src)mnemonic.size_suffix src/**/,dst
+#endif
+#define LAB(label) label
+#define TEXT
+#define ALIGN
+#define GLOBL XDEF
+#define l L
+#define w W
+#define move MOVE
+#define eor EOR
+#define lsr LSR
+#define add ADD
+#define addx ADDX
+#define addq ADDQ
+#define sub SUB
+#define subx SUBX
+#define subq SUBQ
+#define neg NEG
+#define bcc BCC
+#define bcs BCS
+#define bra BRA
+#define dbf DBF
+#define rts RTS
+#define d0 D0
+#define d1 D1
+#define d2 D2
+#define d3 D3
+#define d4 D4
+#define d5 D5
+#define d6 D6
+#define d7 D7
+#define a0 A0
+#define a1 A1
+#define a2 A2
+#define a3 A3
+#define a4 A4
+#define a5 A5
+#define a6 A6
+#define a7 A7
+#define sp SP
+#endif
diff --git a/sysdeps/m68k/m68020/mul_1.S b/sysdeps/m68k/m68020/mul_1.S
new file mode 100644
index 0000000..548ca00
--- /dev/null
+++ b/sysdeps/m68k/m68020/mul_1.S
@@ -0,0 +1,87 @@
+/* mc68020 __mpn_mul_1 -- Multiply a limb vector with a limb and store
+ the result in a second limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ size (sp + 12)
+ s2_limb (sp + 16)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_mul_1
+
+LAB(___mpn_mul_1)
+
+#define res_ptr a0
+#define s1_ptr a1
+#define size d2
+#define s2_limb d4
+
+/* Save used registers on the stack. */
+ INSN2(movem,l ,MEM_PREDEC(sp),d2-d4)
+#if 0
+ INSN2(move,l ,MEM_PREDEC(sp),d2)
+ INSN2(move,l ,MEM_PREDEC(sp),d3)
+ INSN2(move,l ,MEM_PREDEC(sp),d4)
+#endif
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,res_ptr,MEM_DISP(sp,16))
+ INSN2(move,l ,s1_ptr,MEM_DISP(sp,20))
+ INSN2(move,l ,size,MEM_DISP(sp,24))
+ INSN2(move,l ,s2_limb,MEM_DISP(sp,28))
+
+ INSN2(eor,w ,size,#1)
+ INSN1(clr,l ,d1)
+ INSN2(lsr,l ,size,#1)
+ bcc L1
+ INSN2(subq,l ,size,#1)
+ INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
+
+LAB(Loop)
+ INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d1:d3,s2_limb)
+ INSN2(addx,l ,d3,d0)
+ INSN2(move,l ,MEM_POSTINC(res_ptr),d3)
+LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d0:d3,s2_limb)
+ INSN2(addx,l ,d3,d1)
+ INSN2(move,l ,MEM_POSTINC(res_ptr),d3)
+
+ dbf size,Loop
+ INSN1(clr,l ,d3)
+ INSN2(addx,l ,d0,d3)
+ INSN2(sub,l ,size,#0x10000)
+ bcc Loop
+
+/* Restore used registers from stack frame. */
+ INSN2(movem,l ,d2-d4,MEM_POSTINC(sp))
+#if 0
+ INSN2(move,l ,d4,MEM_POSTINC(sp))
+ INSN2(move,l ,d3,MEM_POSTINC(sp))
+ INSN2(move,l ,d2,MEM_POSTINC(sp))
+#endif
+ rts
diff --git a/sysdeps/m68k/m68020/sub_n.S b/sysdeps/m68k/m68020/sub_n.S
new file mode 100644
index 0000000..19f0ec1
--- /dev/null
+++ b/sysdeps/m68k/m68020/sub_n.S
@@ -0,0 +1,76 @@
+/* mc68020 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
+ store difference in a third limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ s2_ptr (sp + 16)
+ size (sp + 12)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_sub_n
+
+LAB(___mpn_sub_n)
+/* Save used registers on the stack. */
+ INSN2(move,l ,MEM_PREDEC(sp),d2)
+ INSN2(move,l ,MEM_PREDEC(sp),a2)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,a2,MEM_DISP(sp,12))
+ INSN2(move,l ,a0,MEM_DISP(sp,16))
+ INSN2(move,l ,a1,MEM_DISP(sp,20))
+ INSN2(move,l ,d2,MEM_DISP(sp,24))
+
+ INSN2(eor,w ,d2,#1)
+ INSN2(lsr,l ,d2,#1)
+ bcc L1
+ INSN2(subq,l ,d2,#1) /* clears cy as side effect */
+
+LAB(Loop)
+ INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(subx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+LAB(L1) INSN2(move,l ,d0,MEM_POSTINC(a0))
+ INSN2(move,l ,d1,MEM_POSTINC(a1))
+ INSN2(subx,l ,d0,d1)
+ INSN2(move,l ,MEM_POSTINC(a2),d0)
+
+ dbf d2,Loop /* loop until 16 lsb of %4 == -1 */
+ INSN2(subx,l ,d0,d0) /* d0 <= -cy; save cy as 0 or -1 in d0 */
+ INSN2(sub,l ,d2,#0x10000)
+ bcs L2
+ INSN2(add,l ,d0,d0) /* restore cy */
+ bra Loop
+
+LAB(L2)
+ INSN1(neg,l ,d0)
+
+/* Restore used registers from stack frame. */
+ INSN2(move,l ,a2,MEM_POSTINC(sp))
+ INSN2(move,l ,d2,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m68k/m68020/submul_1.S b/sysdeps/m68k/m68020/submul_1.S
new file mode 100644
index 0000000..ef7f39d
--- /dev/null
+++ b/sysdeps/m68k/m68020/submul_1.S
@@ -0,0 +1,80 @@
+/* mc68020 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
+ the result from a second limb vector.
+
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/*
+ INPUT PARAMETERS
+ res_ptr (sp + 4)
+ s1_ptr (sp + 8)
+ size (sp + 12)
+ s2_limb (sp + 16)
+*/
+
+#include "asm-syntax.h"
+
+ TEXT
+ ALIGN
+ GLOBL ___mpn_submul_1
+
+LAB(___mpn_submul_1)
+
+#define res_ptr a0
+#define s1_ptr a1
+#define size d2
+#define s2_limb d4
+
+/* Save used registers on the stack. */
+ INSN2(movem,l ,MEM_PREDEC(sp),d2-d5)
+
+/* Copy the arguments to registers. Better use movem? */
+ INSN2(move,l ,res_ptr,MEM_DISP(sp,20))
+ INSN2(move,l ,s1_ptr,MEM_DISP(sp,24))
+ INSN2(move,l ,size,MEM_DISP(sp,28))
+ INSN2(move,l ,s2_limb,MEM_DISP(sp,32))
+
+ INSN2(eor,w ,size,#1)
+ INSN1(clr,l ,d1)
+ INSN1(clr,l ,d5)
+ INSN2(lsr,l ,size,#1)
+ bcc L1
+ INSN2(subq,l ,size,#1)
+ INSN2(sub,l ,d0,d0) /* (d0,cy) <= (0,0) */
+
+LAB(Loop)
+ INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d1:d3,s2_limb)
+ INSN2(addx,l ,d3,d0)
+ INSN2(addx,l ,d1,d5)
+ INSN2(sub,l ,MEM_POSTINC(res_ptr),d3)
+LAB(L1) INSN2(move,l ,d3,MEM_POSTINC(s1_ptr))
+ INSN2(mulu,l ,d0:d3,s2_limb)
+ INSN2(addx,l ,d3,d1)
+ INSN2(addx,l ,d0,d5)
+ INSN2(sub,l ,MEM_POSTINC(res_ptr),d3)
+
+ dbf size,Loop
+ INSN2(addx,l ,d0,d5)
+ INSN2(sub,l ,size,#0x10000)
+ bcc Loop
+
+/* Restore used registers from stack frame. */
+ INSN2(movem,l ,d2-d5,MEM_POSTINC(sp))
+
+ rts
diff --git a/sysdeps/m88k/m88100/add_n.S b/sysdeps/m88k/m88100/add_n.S
new file mode 100644
index 0000000..2107eb5
--- /dev/null
+++ b/sysdeps/m88k/m88100/add_n.S
@@ -0,0 +1,133 @@
+; mc88100 __mpn_add -- Add two limb vectors of the same length > 0 and store
+; sum in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2, or (at your option)
+; any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+
+; You should have received a copy of the GNU General Public License
+; along with the GNU MP Library; see the file COPYING. If not, write to
+; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector.
+
+#include "sysdep.h"
+
+ENTRY (__mpn_add_n)
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,4
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,4<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,64
+ st r8,r2,60
+ addu r4,r4,64
+ ld r6,r3,0
+ addu r2,r2,64
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; add 0 + 16r limbs (adjust loop counter)
+Lbase: ld r8,r3,4
+ addu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; add 15 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; add 14 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; add 13 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; add 12 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; add 11 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; add 10 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ ld r6,r3,32 ; add 9 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,32
+ st r8,r2,28
+ ld r8,r3,36 ; add 8 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,36
+ st r6,r2,32
+ ld r6,r3,40 ; add 7 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,40
+ st r8,r2,36
+ ld r8,r3,44 ; add 6 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,44
+ st r6,r2,40
+ ld r6,r3,48 ; add 5 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,48
+ st r8,r2,44
+ ld r8,r3,52 ; add 4 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,52
+ st r6,r2,48
+ ld r6,r3,56 ; add 3 + 16r limbs
+ addu.cio r8,r8,r9
+ ld r7,r4,56
+ st r8,r2,52
+ ld r8,r3,60 ; add 2 + 16r limbs
+ addu.cio r6,r6,r7
+ ld r9,r4,60
+ st r6,r2,56
+ bcnd.n ne0,r10,Loop ; add 1 + 16r limbs
+ addu.cio r8,r8,r9
+
+ st r8,r2,60 ; store most significant limb
+
+ jmp.n r1
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
diff --git a/sysdeps/m88k/m88100/mul_1.S b/sysdeps/m88k/m88100/mul_1.S
new file mode 100644
index 0000000..503897b
--- /dev/null
+++ b/sysdeps/m88k/m88100/mul_1.S
@@ -0,0 +1,127 @@
+; mc88100 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; store the product in a second limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2, or (at your option)
+; any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+
+; You should have received a copy of the GNU General Public License
+; along with the GNU MP Library; see the file COPYING. If not, write to
+; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; size r4
+; s2_limb r5
+
+; Common overhead is about 11 cycles/invocation.
+
+; The speed for S2_LIMB >= 0x10000 is approximately 21 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention.)
+
+; The speed for S2_LIMB < 0x10000 is approximately 16 cycles/limb. (The
+; pipeline stalls 2 cycles due to WB contention and 1 cycle due to latency.)
+
+; To enhance speed:
+; 1. Unroll main loop 4-8 times.
+; 2. Schedule code to avoid WB contention. It might be tempting to move the
+; ld instruction in the loops down to save 2 cycles (less WB contention),
+; but that looses because the ultimate value will be read from outside
+; the allocated space. But if we handle the ultimate multiplication in
+; the tail, we can do this.
+; 3. Make the multiplication with less instructions. I think the code for
+; (S2_LIMB >= 0x10000) is not minimal.
+; With these techniques the (S2_LIMB >= 0x10000) case would run in 17 or
+; less cycles/limb; the (S2_LIMB < 0x10000) case would run in 11
+; cycles/limb. (Assuming infinite unrolling.)
+
+#include "sysdep.h"
+
+ENTRY (__mpn_mul_1)
+
+ ; Make S1_PTR and RES_PTR point at the end of their blocks
+ ; and negate SIZE.
+ lda r3,r3[r4]
+ lda r6,r2[r4] ; RES_PTR in r6 since r2 is retval
+ subu r4,r0,r4
+
+ addu.co r2,r0,r0 ; r2 = cy = 0
+ ld r9,r3[r4]
+ mask r7,r5,0xffff ; r7 = lo(S2_LIMB)
+ extu r8,r5,16 ; r8 = hi(S2_LIMB)
+ bcnd.n eq0,r8,Lsmall ; jump if (hi(S2_LIMB) == 0)
+ subu r6,r6,4
+
+; General code for any value of S2_LIMB.
+
+ ; Make a stack frame and save r25 and r26
+ subu r31,r31,16
+ st.d r25,r31,8
+
+ ; Enter the loop in the middle
+ br.n L1
+ addu r4,r4,1
+
+Loop:
+ ld r9,r3[r4]
+ st r26,r6[r4]
+; bcnd ne0,r0,0 ; bubble
+ addu r4,r4,1
+L1: mul r26,r9,r5 ; low word of product mul_1 WB ld
+ mask r12,r9,0xffff ; r12 = lo(s1_limb) mask_1
+ mul r11,r12,r7 ; r11 = prod_0 mul_2 WB mask_1
+ mul r10,r12,r8 ; r10 = prod_1a mul_3
+ extu r13,r9,16 ; r13 = hi(s1_limb) extu_1 WB mul_1
+ mul r12,r13,r7 ; r12 = prod_1b mul_4 WB extu_1
+ mul r25,r13,r8 ; r25 = prod_2 mul_5 WB mul_2
+ extu r11,r11,16 ; r11 = hi(prod_0) extu_2 WB mul_3
+ addu r10,r10,r11 ; addu_1 WB extu_2
+; bcnd ne0,r0,0 ; bubble WB addu_1
+ addu.co r10,r10,r12 ; WB mul_4
+ mask.u r10,r10,0xffff ; move the 16 most significant bits...
+ addu.ci r10,r10,r0 ; ...to the low half of the word...
+ rot r10,r10,16 ; ...and put carry in pos 16.
+ addu.co r26,r26,r2 ; add old carry limb
+ bcnd.n ne0,r4,Loop
+ addu.ci r2,r25,r10 ; compute new carry limb
+
+ st r26,r6[r4]
+ ld.d r25,r31,8
+ jmp.n r1
+ addu r31,r31,16
+
+; Fast code for S2_LIMB < 0x10000
+Lsmall:
+ ; Enter the loop in the middle
+ br.n SL1
+ addu r4,r4,1
+
+SLoop:
+ ld r9,r3[r4] ;
+ st r8,r6[r4] ;
+ addu r4,r4,1 ;
+SL1: mul r8,r9,r5 ; low word of product
+ mask r12,r9,0xffff ; r12 = lo(s1_limb)
+ extu r13,r9,16 ; r13 = hi(s1_limb)
+ mul r11,r12,r7 ; r11 = prod_0
+ mul r12,r13,r7 ; r12 = prod_1b
+ addu.cio r8,r8,r2 ; add old carry limb
+ extu r10,r11,16 ; r11 = hi(prod_0)
+ addu r10,r10,r12 ;
+ bcnd.n ne0,r4,SLoop
+ extu r2,r10,16 ; r2 = new carry limb
+
+ jmp.n r1
+ st r8,r6[r4]
diff --git a/sysdeps/m88k/m88100/sub_n.S b/sysdeps/m88k/m88100/sub_n.S
new file mode 100644
index 0000000..927ece4
--- /dev/null
+++ b/sysdeps/m88k/m88100/sub_n.S
@@ -0,0 +1,134 @@
+; mc88100 __mpn_sub -- Subtract two limb vectors of the same length > 0 and
+; store difference in a third limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2, or (at your option)
+; any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+
+; You should have received a copy of the GNU General Public License
+; along with the GNU MP Library; see the file COPYING. If not, write to
+; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; s2_ptr r4
+; size r5
+
+; This code has been optimized to run one instruction per clock, avoiding
+; load stalls and writeback contention. As a result, the instruction
+; order is not always natural.
+
+; The speed is approximately 4.3 clocks/limb + 18 clocks/limb-vector.
+
+#include "sysdep.h"
+
+ENTRY (__mpn_sub_n)
+ ld r6,r3,0 ; read first limb from s1_ptr
+ extu r10,r5,4
+ ld r7,r4,0 ; read first limb from s2_ptr
+
+ subu.co r5,r0,r5 ; (clear carry as side effect)
+ mak r5,r5,4<4>
+ bcnd eq0,r5,Lzero
+
+ or r12,r0,lo16(Lbase)
+ or.u r12,r12,hi16(Lbase)
+ addu r12,r12,r5 ; r12 is address for entering in loop
+
+ extu r5,r5,2 ; divide by 4
+ subu r2,r2,r5 ; adjust res_ptr
+ subu r3,r3,r5 ; adjust s1_ptr
+ subu r4,r4,r5 ; adjust s2_ptr
+
+ or r8,r6,r0
+
+ jmp.n r12
+ or r9,r7,r0
+
+Loop: addu r3,r3,64
+ st r8,r2,60
+ addu r4,r4,64
+ ld r6,r3,0
+ addu r2,r2,64
+ ld r7,r4,0
+Lzero: subu r10,r10,1 ; subtract 0 + 16r limbs (adjust loop counter)
+Lbase: ld r8,r3,4
+ subu.cio r6,r6,r7
+ ld r9,r4,4
+ st r6,r2,0
+ ld r6,r3,8 ; subtract 15 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,8
+ st r8,r2,4
+ ld r8,r3,12 ; subtract 14 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,12
+ st r6,r2,8
+ ld r6,r3,16 ; subtract 13 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,16
+ st r8,r2,12
+ ld r8,r3,20 ; subtract 12 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,20
+ st r6,r2,16
+ ld r6,r3,24 ; subtract 11 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,24
+ st r8,r2,20
+ ld r8,r3,28 ; subtract 10 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,28
+ st r6,r2,24
+ ld r6,r3,32 ; subtract 9 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,32
+ st r8,r2,28
+ ld r8,r3,36 ; subtract 8 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,36
+ st r6,r2,32
+ ld r6,r3,40 ; subtract 7 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,40
+ st r8,r2,36
+ ld r8,r3,44 ; subtract 6 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,44
+ st r6,r2,40
+ ld r6,r3,48 ; subtract 5 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,48
+ st r8,r2,44
+ ld r8,r3,52 ; subtract 4 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,52
+ st r6,r2,48
+ ld r6,r3,56 ; subtract 3 + 16r limbs
+ subu.cio r8,r8,r9
+ ld r7,r4,56
+ st r8,r2,52
+ ld r8,r3,60 ; subtract 2 + 16r limbs
+ subu.cio r6,r6,r7
+ ld r9,r4,60
+ st r6,r2,56
+ bcnd.n ne0,r10,Loop ; subtract 1 + 16r limbs
+ subu.cio r8,r8,r9
+
+ st r8,r2,60 ; store most significant limb
+
+ addu.ci r2,r0,r0 ; return carry-out from most sign. limb
+ jmp.n r1
+ xor r2,r2,1
diff --git a/sysdeps/m88k/m88110/mul_1.S b/sysdeps/m88k/m88110/mul_1.S
new file mode 100644
index 0000000..7a07623
--- /dev/null
+++ b/sysdeps/m88k/m88110/mul_1.S
@@ -0,0 +1,80 @@
+; mc88110 __mpn_mul_1 -- Multiply a limb vector with a single limb and
+; store the product in a second limb vector.
+
+; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+; This file is part of the GNU MP Library.
+
+; The GNU MP Library is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2, or (at your option)
+; any later version.
+
+; The GNU MP Library is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+
+; You should have received a copy of the GNU General Public License
+; along with the GNU MP Library; see the file COPYING. If not, write to
+; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+; INPUT PARAMETERS
+; res_ptr r2
+; s1_ptr r3
+; size r4
+; s2_limb r5
+
+#include "sysdep.h"
+
+ENTRY (__mpn_mul_1)
+ ld r6,r3,0
+ sub r4,r0,r4
+ sub r3,r3,r4 ; r3 is offset s1_ptr
+ sub r2,r2,r4
+ sub r8,r2,8 ; r8 is offset res_ptr
+ mulu.d r10,r6,r5
+
+ addu r4,r4,1
+ bcnd eq0,r4,Lend
+ addu.co r2,r0,0 ; clear cy_limb
+
+Loop: ld r6,r3[r4]
+ addu.cio r9,r11,r2
+ or r2,r10,r0 ; could be avoided if unrolled
+ addu r4,r4,1
+ mulu.d r10,r6,r5
+ bcnd ne0,r4,Loop
+ st r9,r8[r4]
+
+Lend: addu.cio r9,r11,r2
+ st r9,r8,4
+ jmp.n r1
+ addu.ci r2,r10,r0
+
+; This is the Right Way to do this on '110. 4 cycles / 64-bit limb.
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d ,r11,r5
+; ld.d r12,
+; mulu.d ,r10,r5
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
+; ld.d r10,
+; mulu.d
+; addu.cio
+; addu.cio
+; st.d
+; mulu.d
diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h
new file mode 100644
index 0000000..a801b35
--- /dev/null
+++ b/sysdeps/mips/mips64/gmp-mparam.h
@@ -0,0 +1,26 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define BITS_PER_MP_LIMB 64
+#define BYTES_PER_MP_LIMB 8
+#define BITS_PER_LONGINT 32
+#define BITS_PER_INT 32
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
diff --git a/sysdeps/z8000/gmp-mparam.h b/sysdeps/z8000/gmp-mparam.h
new file mode 100644
index 0000000..73df5b9
--- /dev/null
+++ b/sysdeps/z8000/gmp-mparam.h
@@ -0,0 +1,26 @@
+/* gmp-mparam.h -- Compiler/machine parameter header file.
+
+Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Library General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+The GNU MP Library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+License for more details.
+
+You should have received a copy of the GNU Library General Public License
+along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define BITS_PER_MP_LIMB 16
+#define BYTES_PER_MP_LIMB 2
+#define BITS_PER_LONGINT 32
+#define BITS_PER_INT 16
+#define BITS_PER_SHORTINT 16
+#define BITS_PER_CHAR 8
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ae4a9668a2ae3c40493253871b4fa1c11790a62
commit 7ae4a9668a2ae3c40493253871b4fa1c11790a62
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 17 18:39:13 1995 +0000
Update #include for renaming.
diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c
index 8a55f99..d7055be 100644
--- a/sysdeps/unix/sysv/irix4/gettimeofday.c
+++ b/sysdeps/unix/sysv/irix4/gettimeofday.c
@@ -1,3 +1 @@
-#include <sysdeps/posix/__gettod.c>
-
-weak_alias (__gettimeofday, gettimeofday)
+#include <sysdeps/posix/gettimeofday.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b31933688909d5c22aa979a5fd74d3f4c859d2b
commit 6b31933688909d5c22aa979a5fd74d3f4c859d2b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 10 00:10:54 1995 +0000
Remove `const' from function prototype.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index debd0f1..4fc6108 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
void
-__longjmp (const __jmp_buf env, int val)
+__longjmp (__jmp_buf env, int val)
{
/* This restores the FP and SP that setjmp's caller had,
and puts the return address into A0 and VAL into D0. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1eae31ac32358223f5f72fa3c881e113962faf02
commit 1eae31ac32358223f5f72fa3c881e113962faf02
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 8 03:06:52 1995 +0000
Initial revision
diff --git a/sysdeps/mach/hppa/machine-lock.h b/sysdeps/mach/hppa/machine-lock.h
new file mode 100644
index 0000000..0a17835
--- /dev/null
+++ b/sysdeps/mach/hppa/machine-lock.h
@@ -0,0 +1,63 @@
+/* Machine-specific definition for spin locks. HPPA version.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _MACHINE_LOCK_H
+#define _MACHINE_LOCK_H
+
+/* The type of a spin lock variable. */
+
+typedef __volatile int __spin_lock_t __attribute__ ((__aligned__ (16)));
+
+/* Value to initialize `__spin_lock_t' variables to. */
+
+#define __SPIN_LOCK_INITIALIZER -1
+
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+/* Unlock LOCK. */
+
+_EXTERN_INLINE void
+__spin_unlock (__spin_lock_t *__lock)
+{
+ *__lock = -1;
+}
+
+/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
+
+_EXTERN_INLINE int
+__spin_try_lock (__spin_lock_t *__lock)
+{
+ register int __result;
+ __asm__ __volatile__ ("ldcws %0, %1" : "=m" (*__lock), "=r" (__result));
+ return __result != 0;
+}
+
+/* Return nonzero if LOCK is locked. */
+
+_EXTERN_INLINE int
+__spin_lock_locked (__spin_lock_t *__lock)
+{
+ return *__lock == 0;
+}
+
+
+#endif /* machine-lock.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8548d4c0841422a974065e0599ce71fd82f9ba7f
commit 8548d4c0841422a974065e0599ce71fd82f9ba7f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 7 04:25:56 1995 +0000
Use spin lock operations on sigstate lock.
Don't expect _hurd_self_sigstate to lock it.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index 4adfb8d..e5dc383 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -37,7 +37,8 @@ __sigreturn (struct sigcontext *scp)
return -1;
}
- ss = _hurd_self_sigstate (); /* SS->lock now locked. */
+ ss = _hurd_self_sigstate ();
+ __spin_lock (&ss->lock);
/* Restore the set of blocked signals, and the intr_port slot. */
ss->blocked = scp->sc_mask;
@@ -56,10 +57,10 @@ __sigreturn (struct sigcontext *scp)
the SCP context is doing an interruptible RPC, but the signal
thread will examine us while we are blocked in the sig_post RPC. */
ss->intr_port = MACH_PORT_NULL;
- __mutex_unlock (&ss->lock);
- __sig_post (_hurd_msgport, 0, __mach_task_self ());
+ __spin_unlock (&ss->lock);
+ __msg_sig_post (_hurd_msgport, 0, __mach_task_self ());
/* If a pending signal was handled, sig_post never returned. */
- __mutex_lock (&ss->lock);
+ __spin_lock (&ss->lock);
}
if (scp->sc_onstack)
@@ -69,7 +70,7 @@ __sigreturn (struct sigcontext *scp)
abort ();
}
else
- __mutex_unlock (&ss->lock);
+ __spin_unlock (&ss->lock);
/* Destroy the MiG reply port used by the signal handler, and restore the
reply port in use by the thread when interrupted. */
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index d1d444f..7396a8b 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -33,7 +33,8 @@ __sigreturn (struct sigcontext *scp)
return -1;
}
- ss = _hurd_self_sigstate (); /* SS->lock now locked. */
+ ss = _hurd_self_sigstate ();
+ __spin_lock (&ss->lock);
/* Restore the set of blocked signals, and the intr_port slot. */
ss->blocked = scp->sc_mask;
@@ -52,10 +53,10 @@ __sigreturn (struct sigcontext *scp)
the SCP context is doing an interruptible RPC, but the signal
thread will examine us while we are blocked in the sig_post RPC. */
ss->intr_port = MACH_PORT_NULL;
- __mutex_unlock (&ss->lock);
- __sig_post (_hurd_msgport, 0, __mach_task_self ());
+ __spin_unlock (&ss->lock);
+ __msg_sig_post (_hurd_msgport, 0, __mach_task_self ());
/* If a pending signal was handled, sig_post never returned. */
- __mutex_lock (&ss->lock);
+ __spin_lock (&ss->lock);
}
if (scp->sc_onstack)
@@ -65,7 +66,7 @@ __sigreturn (struct sigcontext *scp)
abort ();
}
else
- __mutex_unlock (&ss->lock);
+ __spin_unlock (&ss->lock);
/* Destroy the MiG reply port used by the signal handler, and restore the
reply port in use by the thread when interrupted. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=23afbf2338fc81cb10508d0028b5581ed91d2eb3
commit 23afbf2338fc81cb10508d0028b5581ed91d2eb3
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 5 22:59:48 1995 +0000
(ENTRY): Add `.ent' directive.
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index ee047fb..c09c5af 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -22,22 +22,15 @@ Cambridge, MA 02139, USA. */
#include <regdef.h>
-#ifdef __STDC__
#define ENTRY(name) \
.globl name; \
.align 2; \
+ .ent name,0; \
name##:
-#else
-#define ENTRY(name) \
- .globl name; \
- .align 2; \
- name/**/:
-#endif
/* Note that while it's better structurally, going back to call syscall_error
can make things confusing if you're debugging---it looks like it's jumping
backwards into the previous fn. */
-#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \
.set noreorder; \
.align 2; \
@@ -49,19 +42,6 @@ Cambridge, MA 02139, USA. */
bne a3, zero, 99b; \
nop; \
syse1:
-#else
-#define PSEUDO(name, syscall_name, args) \
- .set noreorder; \
- .align 2; \
- 99: j syscall_error; \
- nop; \
- ENTRY(name) \
- li v0, SYS_/**/syscall_name; \
- syscall; \
- bne a3, zero, 99b; \
- nop; \
-syse1:
-#endif
#define ret j ra ; nop
#define r0 v0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a4b6477451f4147299aa953c9f9d5917ff94e00c
commit a4b6477451f4147299aa953c9f9d5917ff94e00c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 3 23:29:20 1995 +0000
Use ENV[0].__jmpbuf[0].
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index ee2d209..d478e3f 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -27,40 +27,38 @@ int
__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
{
/* Store the floating point callee-saved registers... */
- asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0]));
- asm volatile ("s.d $f22, %0" : : "m" (env[0].__fpregs[1]));
- asm volatile ("s.d $f24, %0" : : "m" (env[0].__fpregs[2]));
- asm volatile ("s.d $f26, %0" : : "m" (env[0].__fpregs[3]));
- asm volatile ("s.d $f28, %0" : : "m" (env[0].__fpregs[4]));
- asm volatile ("s.d $f30, %0" : : "m" (env[0].__fpregs[5]));
+ asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
+ asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
+ asm volatile ("s.d $f24, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[2]));
+ asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
+ asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
+ asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
/* .. and the PC; */
- asm volatile ("sw $31, %0" : : "m" (env[0].__pc));
+ asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
/* .. and the stack pointer; */
- asm volatile ("sw %1, %0" : : "m" (env[0].__sp), "r" (sp));
+ env[0].__jmpbuf[0].__sp = sp;
/* .. and the FP; it'll be in s8. */
- asm volatile ("sw %1, %0" : : "m" (env[0].__fp), "r" (fp));
+ env[0].__jmpbuf[0].__fp = fp;
/* .. and the GP; */
- asm volatile ("sw $gp, %0" : : "m" (env[0].__gp));
+ asm volatile ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
/* .. and the callee-saved registers; */
- asm volatile ("sw $16, %0" : : "m" (env[0].__regs[0]));
- asm volatile ("sw $17, %0" : : "m" (env[0].__regs[1]));
- asm volatile ("sw $18, %0" : : "m" (env[0].__regs[2]));
- asm volatile ("sw $19, %0" : : "m" (env[0].__regs[3]));
- asm volatile ("sw $20, %0" : : "m" (env[0].__regs[4]));
- asm volatile ("sw $21, %0" : : "m" (env[0].__regs[5]));
- asm volatile ("sw $22, %0" : : "m" (env[0].__regs[6]));
- asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7]));
+ asm volatile ("sw $16, %0" : : "m" (env[0].__jmpbuf[0].__regs[0]));
+ asm volatile ("sw $17, %0" : : "m" (env[0].__jmpbuf[0].__regs[1]));
+ asm volatile ("sw $18, %0" : : "m" (env[0].__jmpbuf[0].__regs[2]));
+ asm volatile ("sw $19, %0" : : "m" (env[0].__jmpbuf[0].__regs[3]));
+ asm volatile ("sw $20, %0" : : "m" (env[0].__jmpbuf[0].__regs[4]));
+ asm volatile ("sw $21, %0" : : "m" (env[0].__jmpbuf[0].__regs[5]));
+ asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
+ asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
/* .. and finally get and reconstruct the floating point csr. */
- asm ("cfc1 %0, $31" : "=r" (env[0].__fpc_csr));
+ asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
/* Save the signal mask if requested. */
- __sigjmp_save (env, savemask);
-
- return 0;
+ return __sigjmp_save (env, savemask);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ff775c1262ac0f4c3c75694c67efea90a31c1af7
commit ff775c1262ac0f4c3c75694c67efea90a31c1af7
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 3 23:24:38 1995 +0000
Use `li' insn instead of `move'.
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
index b0f2e8d..6e6844c 100644
--- a/sysdeps/mips/bsd-_setjmp.S
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,4 +25,4 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
- move a1, zero /* Pass a second argument of zero. */
+ li a1, zero /* Pass a second argument of zero. */
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
index 103edd3..5cd090a 100644
--- a/sysdeps/mips/bsd-setjmp.S
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,4 +25,4 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
j C_SYMBOL_NAME (__sigsetjmp)
- move a1, 1 /* Pass a second argument of one. */
+ li a1, 1 /* Pass a second argument of one. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0dcd6754fe06b4ad0d02c84e10ab425291b19e3
commit b0dcd6754fe06b4ad0d02c84e10ab425291b19e3
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 3 23:22:27 1995 +0000
Remove obsolete __NORETURN keyword.
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 5c7eb68..7ea3df2 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,6 @@ Cambridge, MA 02139, USA. */
#error This file uses GNU C extensions; you must compile with GCC.
#endif
-__NORETURN
void
DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=14b832adfda73961eb0c8b143941fcb4132faa4b
commit 14b832adfda73961eb0c8b143941fcb4132faa4b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 3 23:20:27 1995 +0000
(_hurd_setup_sighandler): Use `long int' for sigcode.
Use explicit register numbers instead of names.
(_hurdsig_rcv_interrupted_p): Use _hurdsig_catch_fault.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 2161cba..f03ad58 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. MIPS version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ struct mach_msg_trap_args
struct sigcontext *
_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
- int signo, int sigcode,
+ int signo, long int sigcode,
int rpc_wait,
struct machine_thread_all_state *state)
{
@@ -59,7 +59,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
state->set = (1 << MIPS_THREAD_STATE) | (1 << MIPS_EXC_STATE);
if (state->exc.coproc_state & SC_COPROC_USE_FPU)
{
- memcpy (&state->fpu, &ss->context->sc_mips_loat_state,
+ memcpy (&state->fpu, &ss->context->sc_mips_float_state,
sizeof (state->fpu));
state->set |= (1 << MIPS_FLOAT_STATE);
}
@@ -191,7 +191,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
asm volatile
(".set noat; .set noreorder; .set nomacro\n"
/* Retry the interrupted mach_msg system call. */
- "li v0, -25\n" /* mach_msg_trap */
+ "li $2, -25\n" /* mach_msg_trap */
"syscall\n"
/* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
now the message receive has completed and the original caller of
@@ -199,13 +199,13 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
see the final return value of the message receive in v0. So
store the new v0 value into the sc_gpr[1] member of the sigcontext
(whose address is in v1 to make this code simpler). */
- "sw v0, (v1)\n"
+ "sw $2, ($3)\n"
/* Since the argument registers needed to have the mach_msg_trap
arguments, we've stored the arguments to the handler function
in registers s1..s3 ($17..$19). */
- "move a0, s1\n"
- "move a1, s2\n"
- "move a2, s3\n");
+ "move $4, $17\n"
+ "move $5, $18\n"
+ "move $6, $19\n");
trampoline:
/* Entry point for running the handler normally. The arguments to the
@@ -219,7 +219,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
("jal $1; nop\n" /* Call the handler function. */
/* Call __sigreturn (SCP); this cannot return. */
"j %0\n"
- "move a0, s0" /* Set up arg from saved SCP in delay slot. */
+ "move $4, $16" /* Set up arg from saved SCP in delay slot. */
: : "i" (&__sigreturn));
/* NOTREACHED */
@@ -237,9 +237,12 @@ int
_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
mach_port_t *port)
{
- if (! setjmp (_hurd_sigthread_fault_env))
+ const unsigned int *const pc = (void *) state->basic.pc;
+
+ if (_hurdsig_catch_fault (SIGSEGV))
+ assert (_hurdsig_fault_sigcode == (long int) pc);
+ else
{
- const unsigned int *pc = (void *) state->basic.pc;
if (state->basic.r2 == MACH_RCV_INTERRUPTED &&
pc[-1] == 0xc) /* syscall */
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37da91a00d7295b56dc889dc2a0bc72be97b413a
commit 37da91a00d7295b56dc889dc2a0bc72be97b413a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 3 23:15:48 1995 +0000
Use `long int' for sigcode.
diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c
index 7a9ab31..f907c89 100644
--- a/sysdeps/mach/hurd/mips/exc2signal.c
+++ b/sysdeps/mach/hurd/mips/exc2signal.c
@@ -1,5 +1,5 @@
/* Translate Mach exception codes into signal numbers. MIPS version.
-Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
void
_hurd_exception2signal (int exception, int code, int subcode,
- int *signo, int *sigcode, int *error)
+ int *signo, long int *sigcode, int *error)
{
*error = 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1350964e9872e8b6b7737df25bab7fd756e5c40
commit a1350964e9872e8b6b7737df25bab7fd756e5c40
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 27 20:48:38 1995 +0000
[ASSEMBLER]: Protect macros with this.
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
index 279461b..3669a69 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+
+#ifdef ASSEMBLER
+
#include <machine/pal.h> /* get PAL_callsys */
#include <regdef.h>
@@ -66,3 +69,5 @@ Cambridge, MA 02139, USA. */
#define r0 v0
#define r1 a4
#define MOVE(x,y) mov x, y
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
index 05fe24c..f1365e7 100644
--- a/sysdeps/unix/bsd/sequent/i386/sysdep.h
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -1,5 +1,5 @@
/* System call interface code for Sequent Symmetry running Dynix version 3.
-Copyright (C) 1993 Free Software Foundation, Inc.
+Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/i386/sysdep.h>
+#ifdef ASSEMBLER
+
/* Get the symbols for system call interrupts. */
#include <machine/trap.h>
@@ -76,3 +78,5 @@ Cambridge, MA 02139, USA. */
#define r1 %ecx /* Secondary return-value register. */
#undef scratch
#define scratch %edx /* Call-clobbered register for random use. */
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index 43ef480..a62c17e 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* This code wants to be run through m4. */
-
#include <sysdeps/unix/sysdep.h>
+#ifdef ASSEMBLER
+
#define POUND #
#ifdef __STDC__
@@ -52,3 +52,5 @@ Cambridge, MA 02139, USA. */
#define r0 d0
#define r1 d1
#define MOVE(x,y) movel x , y
+
+#endif
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 8655f37..80f6aba 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* This code wants to be run through m4; see sysdeps/m68k/Makefile. */
-
#include <sysdeps/unix/sysdep.h>
+#ifdef ASSEMBLER
+
#define POUND #
#ifdef __STDC__
@@ -58,3 +58,5 @@ Cambridge, MA 02139, USA. */
#define r0 d0
#define r1 d1
#define MOVE(x,y) movel x , y
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index 60e01ac..aeddad9 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,8 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+#ifdef ASSEMBLER
+
#ifdef __STDC__
#define ENTRY(name) \
.globl _##name; \
@@ -49,3 +51,5 @@ Cambridge, MA 02139, USA. */
#endif
#define MOVE(x,y) movl x , y
+
+#endif /* ASSEMBLER */
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
index bbf742b..ee047fb 100644
--- a/sysdeps/unix/mips/sysdep.h
+++ b/sysdeps/unix/mips/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,9 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+
+#ifdef ASSEMBLER
+
#include <regdef.h>
#ifdef __STDC__
@@ -65,3 +68,5 @@ syse1:
#define r1 v1
/* The mips move insn is d,s. */
#define MOVE(x,y) move y , x
+
+#endif
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 90e2b38..edb9830 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+#ifdef ASSEMBLER
+
/* As of gcc-2.6.0, it complains about pound signs in front of things
that aren't arguments to the macro. So we use this to pull it off
instead. */
@@ -46,3 +48,4 @@ Cambridge, MA 02139, USA. */
#define r1 %o1
#define MOVE(x,y) mov x, y
+#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f6aa1372e124578e8b356ea97e592b4a46b97421
commit f6aa1372e124578e8b356ea97e592b4a46b97421
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 06:23:39 1995 +0000
Call getpgrp instead of __getpgrp.
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 4d15ddc..919cd7c 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -40,7 +40,7 @@ DEFUN(__wait4, (pid, stat_loc, options, usage),
break;
case WAIT_MYPGRP:
- pid = - __getpgrp (0);
+ pid = - getpgrp ();
break;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05834bf1c793854c40dda6b71522234a1c8a5c71
commit 05834bf1c793854c40dda6b71522234a1c8a5c71
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 05:36:51 1995 +0000
[ASSEMBLER]: Protect macros with this.
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index bd30bb8..3487ab2 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+#ifdef ASSEMBLER
+
#define POUND #
#ifdef __STDC__
@@ -50,3 +52,5 @@ Cambridge, MA 02139, USA. */
#define r0 d0
#define r1 d1
#define MOVE(x,y) movel x , y
+
+#endif /* ASSEMBLER */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d3e470455d8089c37aa3f98a25875d69c11318f
commit 1d3e470455d8089c37aa3f98a25875d69c11318f
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 03:46:04 1995 +0000
(environ): Define as weak alias for __environ.
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
index d88b47e..8b7109a 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifndef HAVE_GNU_LD
+#ifndef HAVE_WEAK_SYMBOLS
#define __environ environ
+#else
+weak_alias (__environ, environ)
#endif
.comm __environ, 8
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index 6146b57..ec0f9d8 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -18,8 +18,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-#ifndef HAVE_GNU_LD
+#ifndef HAVE_WEAK_SYMBOLS
#define __environ environ
+#else
+weak_alias (__environ, environ)
#endif
.comm __environ, 4
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d6961ffadfdb6007d0959cf1c843a954261645d4
commit d6961ffadfdb6007d0959cf1c843a954261645d4
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:43:07 1995 +0000
(sysdep_routines): Removed __setpgid, __getpgid.
diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile
index d44214b..0c149da 100644
--- a/sysdeps/unix/sysv/sysv4/Makefile
+++ b/sysdeps/unix/sysv/sysv4/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,7 @@
ifeq ($(subdir),posix)
-sysdep_routines := $(sysdep_routines) sysconfig pgrpsys \
- __getpgid __setpgid __waitid
+sysdep_routines := $(sysdep_routines) sysconfig pgrpsys __waitid
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c9db5502eba875dd712553d8c44374f4c9dc52e8
commit c9db5502eba875dd712553d8c44374f4c9dc52e8
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:32:08 1995 +0000
Renamed __setpgrp to __setpgid, added weak aliases setpgid and setpgrp.
diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S
index 38ce9cb..9267054 100644
--- a/sysdeps/unix/sysv/irix4/setpgid.S
+++ b/sysdeps/unix/sysv/irix4/setpgid.S
@@ -18,7 +18,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-PSEUDO (__setpgrp, bsdsetpgrp, 2)
+PSEUDO (__setpgid, bsdsetpgrp, 2)
ret
-weak_alias (__setpgrp, setpgrp)
+weak_alias (__setpgid, setpgid)
+weak_alias (__setpgid, setpgrp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=628d175a3c9254e8658a1560acbd2aca20fbaea7
commit 628d175a3c9254e8658a1560acbd2aca20fbaea7
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:31:06 1995 +0000
(__getpgrp): Renamed to __getpgid, with weak alias getpgid.
diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S
index c13a691..fbef7a2 100644
--- a/sysdeps/unix/sysv/irix4/getpgid.S
+++ b/sysdeps/unix/sysv/irix4/getpgid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-PSEUDO (__getpgrp, bsdgetpgrp, 1)
+PSEUDO (__getpgid, bsdgetpgrp, 1)
ret
+
+weak_alias (__getpgid, getpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1bf2d9ab9ba8a51855273a8500d362a1bf18f9f2
commit 1bf2d9ab9ba8a51855273a8500d362a1bf18f9f2
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:28:44 1995 +0000
Included file was renamed from setpgrp.c.
diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
index 32f7daf..cc9c4cd 100644
--- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/sysv4/setpgrp.c>
+#include <sysdeps/unix/sysv/sysv4/setpgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f612f28027d9a60266bb802ed29ea791fac8c29e
commit f612f28027d9a60266bb802ed29ea791fac8c29e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:27:55 1995 +0000
Included file was renamed from __getpgrp.c.
diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
index 6829b74..3b47d9d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/sysv4/__getpgrp.c>
+#include <sysdeps/unix/sysv/sysv4/getpgid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c54278121e1909f125c8997c32eedfb14f4a1b06
commit c54278121e1909f125c8997c32eedfb14f4a1b06
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:25:38 1995 +0000
Use subcall 4 to __pgrpsys.
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index c957bf9..309e2f1 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -27,7 +27,7 @@ extern int __pgrpsys __P ((int type, ...));
int
DEFUN(__getpgid, (pid), pid_t pid)
{
- return __pgrpsys (0, pid);
+ return __pgrpsys (4, pid);
}
weak_alias (__getpgid, getpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a38d08f7b4434cbc87eccb1ba8792d0732099b8a
commit a38d08f7b4434cbc87eccb1ba8792d0732099b8a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:24:28 1995 +0000
Use subcall 5 to __pgrpsys.
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 0a18492..b9e06dc 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -28,7 +28,7 @@ extern int __pgrpsys __P ((int type, ...));
int
DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
{
- return __pgrpsys (1, pid, pgid);
+ return __pgrpsys (5, pid, pgid);
}
weak_alias (__setpgid, setpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86c4edb31b2632c6731dd0ae0419d5eea13cde9d
commit 86c4edb31b2632c6731dd0ae0419d5eea13cde9d
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:22:57 1995 +0000
Renamed __getpgrp to __getpgid, added weak alias getpgid.
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index f777769..c957bf9 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,9 @@ extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
-DEFUN(__getpgrp, (pid), pid_t pid)
+DEFUN(__getpgid, (pid), pid_t pid)
{
return __pgrpsys (0, pid);
}
+
+weak_alias (__getpgid, getpgid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9207d658052a6c73c64e19907bd48aeda65b3f8a
commit 9207d658052a6c73c64e19907bd48aeda65b3f8a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 26 01:21:48 1995 +0000
Renamed __setpgrp to __setpgid, added weak aliases setpgid and setpgrp.
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index e71f0db..0a18492 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -26,9 +26,10 @@ extern int __pgrpsys __P ((int type, ...));
If PID is zero, the current process's process group ID is set.
If PGID is zero, the process ID of the process is used. */
int
-DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
+DEFUN(__setpgid, (pid, pgid), int pid AND int pgid)
{
return __pgrpsys (1, pid, pgid);
}
-weak_alias (__setpgrp, setpgrp)
+weak_alias (__setpgid, setpgid)
+weak_alias (__setpgid, setpgrp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1a0149ddaae350b3d4bb1f8c65eef2b2befdf66c
commit 1a0149ddaae350b3d4bb1f8c65eef2b2befdf66c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 25 22:39:24 1995 +0000
Included file was renamed from __getdents.S.
diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S
index 6d18c04..be449b2 100644
--- a/sysdeps/unix/bsd/hp/m68k/getdents.S
+++ b/sysdeps/unix/bsd/hp/m68k/getdents.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/sun/__getdents.S>
+#include <sysdeps/unix/bsd/sun/getdents.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba5bfe42356004afd6ce5c6d51886d3e8cf01ac3
commit ba5bfe42356004afd6ce5c6d51886d3e8cf01ac3
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 25 21:38:14 1995 +0000
Remove __NORETURN; it's obsolete.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 10e1705..debd0f1 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,6 @@ Cambridge, MA 02139, USA. */
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
-__NORETURN
void
__longjmp (const __jmp_buf env, int val)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc8aa8bf32b3b75564675cc9afc568acc9d48b11
commit cc8aa8bf32b3b75564675cc9afc568acc9d48b11
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 22 20:28:20 1995 +0000
[weak_alias] (index): Define as weak alias for strchr.
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
index 666e0c0..69afa4b 100644
--- a/sysdeps/alpha/strchr.c
+++ b/sysdeps/alpha/strchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -77,3 +77,8 @@ strchr (const char *str, int c)
}
}
}
+
+#ifdef weak_alias
+#undef index
+weak_alias (strchr, index)
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1cec31f4d43f0a2ddc3ff268512b9f0db79f2466
commit 1cec31f4d43f0a2ddc3ff268512b9f0db79f2466
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 21 15:40:54 1995 +0000
Converted to use weak aliases with macros from libc-symbols.h.
diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c
index c816dcd..ab2cf0b 100644
--- a/sysdeps/m68k/fpu/isinf.c
+++ b/sysdeps/m68k/fpu/isinf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,8 +25,10 @@ Cambridge, MA 02139, USA. */
#endif
-__CONSTVALUE int
+int
DEFUN(FUNC, (x), double x)
{
return __m81_u(FUNC)(x);
}
+
+weak_alias (__isinf, isinf)
diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c
index e90c691..d098491 100644
--- a/sysdeps/m68k/fpu/isnan.c
+++ b/sysdeps/m68k/fpu/isnan.c
@@ -1,2 +1,4 @@
#define FUNC __isnan
-#include <__isinf.c>
+#include <isinf.c>
+
+weak_alias (__isnan, isnan)
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
index 27ce104..8619c90 100644
--- a/sysdeps/m68k/fpu/logb.c
+++ b/sysdeps/m68k/fpu/logb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Return the base 2 signed integral exponent of X. */
-__CONSTVALUE double
+double
DEFUN(__logb, (x), double x)
{
if (__isnan (x))
@@ -39,6 +39,8 @@ DEFUN(__logb, (x), double x)
return x;
}
+weak_alias (__logb, logb)
+
#else
-#include <sysdeps/ieee754/__logb.c>
+#include <sysdeps/ieee754/logb.c>
#endif
diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c
index 288ae81..f83a4e4 100644
--- a/sysdeps/m68k/fpu/rint.c
+++ b/sysdeps/m68k/fpu/rint.c
@@ -1,3 +1,5 @@
#define FUNC __rint
#define OP intr
#include <acos.c>
+
+weak_alias (__rint, rint)
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index c178a03..4adfb8d 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -1,5 +1,5 @@
/* Return from signal handler in GNU C library for Hurd. Alpha version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -207,3 +207,5 @@ __sigreturn (struct sigcontext *scp)
/* NOTREACHED */
return -1;
}
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 0b3a474..d1d444f 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -164,3 +164,5 @@ __sigreturn (struct sigcontext *scp)
/* NOTREACHED */
return -1;
}
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
index fdcaf65..910e793 100644
--- a/sysdeps/standalone/open.c
+++ b/sysdeps/standalone/open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -116,9 +116,7 @@ DEFUN(__NONE_init_console_io, (argc, argv, envp),
}
#ifdef HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
text_set_element (__libc_subinit, __NONE_init_console_io);
-
#endif
+
+weak_alias (__open, open)
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
index 1c87b11..284321d 100644
--- a/sysdeps/standalone/read.c
+++ b/sysdeps/standalone/read.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -83,3 +83,5 @@ DEFUN(__read, (fd, buf, nbytes),
*buffer = data;
return 1;
}
+
+weak_alias (__read, read)
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
index 22c01a4..f0ae388 100644
--- a/sysdeps/standalone/write.c
+++ b/sysdeps/standalone/write.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -70,3 +70,5 @@ DEFUN(__write, (fd, buf, nbytes),
return count;
}
+
+weak_alias (__write, write)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
index 6973e96..6b074ed 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -26,3 +26,5 @@ SYSCALL__ (pipe, 1)
/* Go out with a clean status. */
mov zero, r0
ret
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
index eefd641..c3556a9 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigblock, 1)
ret
+
+weak_alias (__sigblock, sigblock)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
index 893ee08..04b6d45 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigpause, 1)
ret
+
+weak_alias (__sigpause, sigpause)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
index f2536d7..fb3a1d1 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigsetmask, 1)
ret
+
+weak_alias (__sigsetmask, sigsetmask)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
index d0d3ae0..b04ec6e 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigvec, 3)
ret
+
+weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
index 0f76c62..e4c3223 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__wait4.S>
+#include <sysdeps/unix/bsd/bsd4.4/wait4.S>
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
index 47129a8..8378982 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
+#include <sysdeps/unix/bsd/bsd4.4/waitpid.c>
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index d02f27f..d0e7585 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,3 +35,5 @@ ENTRY(__wait3)
.globl syscall_error
error: jmp syscall_error
+
+weak_alias (__wait3, wait3)
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 547b4f3..633d18f 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,3 +28,5 @@ SYSCALL__ (pipe, 1)
#endif
clrl d0
rts
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S
index 927fa33..c7685b7 100644
--- a/sysdeps/unix/bsd/m68k/wait.S
+++ b/sysdeps/unix/bsd/m68k/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,3 +31,5 @@ SYSCALL__ (wait, 1)
movel d1, a0@
#endif
1: rts
+
+weak_alias (__wait, wait)
diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S
index cf25abe..b68bcbd 100644
--- a/sysdeps/unix/bsd/sequent/i386/getgroups.S
+++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,5 @@ myerror:
addl %esp, $(NGROUPS_MAX * 4) /* Pop the local array. */
jb syscall_error /* Check for error from the system call. */
ret /* Return its value. */
+
+weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index a5812c7..1bb57c2 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,3 +41,5 @@ ENTRY (__sigvec)
DO_CALL (sigvec, 4) /* Do the system call. */
jb syscall_error /* Check for error. */
ret
+
+weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait.c b/sysdeps/unix/bsd/sony/newsos4/wait.c
index d9ee77b..79d5458 100644
--- a/sysdeps/unix/bsd/sony/newsos4/wait.c
+++ b/sysdeps/unix/bsd/sony/newsos4/wait.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__wait.c>
+#include <sysdeps/unix/bsd/bsd4.4/wait.c>
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait3.c b/sysdeps/unix/bsd/sony/newsos4/wait3.c
index ecc1113..0b3bdee 100644
--- a/sysdeps/unix/bsd/sony/newsos4/wait3.c
+++ b/sysdeps/unix/bsd/sony/newsos4/wait3.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__wait3.c>
+#include <sysdeps/unix/bsd/bsd4.4/wait3.c>
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait4.c b/sysdeps/unix/bsd/sony/newsos4/wait4.c
index 9183ce1..856c99f 100644
--- a/sysdeps/unix/bsd/sony/newsos4/wait4.c
+++ b/sysdeps/unix/bsd/sony/newsos4/wait4.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/sun/sunos4/__wait4.c>
+#include <sysdeps/unix/bsd/sun/sunos4/wait4.c>
diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S
index 9a3b5e6..d0a3f3a 100644
--- a/sysdeps/unix/bsd/sun/sigreturn.S
+++ b/sysdeps/unix/bsd/sun/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,3 +24,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigreturn, 1)
/* Does not return. */
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/bsd/sun/sigvec.S b/sysdeps/unix/bsd/sun/sigvec.S
index fdf919c..c093974 100644
--- a/sysdeps/unix/bsd/sun/sigvec.S
+++ b/sysdeps/unix/bsd/sun/sigvec.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,3 +22,5 @@ Cambridge, MA 02139, USA. */
PSEUDO (__raw_sigvec, sigvec, 3)
ret
+
+weak_alias (__sigvec, sigvec)
diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
index c7f681d..f69c4b4 100644
--- a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
+++ b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/hp/m68k/__wait.S>
+#include <sysdeps/unix/bsd/hp/m68k/wait.S>
diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S
index e0f94b0..4930c56 100644
--- a/sysdeps/unix/bsd/sun/sunos4/setsid.S
+++ b/sysdeps/unix/bsd/sun/sunos4/setsid.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__setsid.S>
+#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
index dce1b02..5e45037 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ DEFUN(__tcgetattr, (fd, termios_p),
{
return __ioctl (fd, TCGETS, termios_p);
}
+
+weak_alias (__tcgetattr, tcgetattr)
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c
index d9ee77b..79d5458 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__wait.c>
+#include <sysdeps/unix/bsd/bsd4.4/wait.c>
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c
index ecc1113..0b3bdee 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait3.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__wait3.c>
+#include <sysdeps/unix/bsd/bsd4.4/wait3.c>
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 3e9fdcb..4d15ddc 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -2,7 +2,7 @@
SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
different from those documented. Go Sun!
-Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,3 +46,5 @@ DEFUN(__wait4, (pid, stat_loc, options, usage),
return __wait4_syscall (pid, stat_loc, options, usage);
}
+
+weak_alias (__wait4, wait4)
diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
index 47129a8..8378982 100644
--- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c
+++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
+#include <sysdeps/unix/bsd/bsd4.4/waitpid.c>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
index fdf919c..20a5dd1 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
index e194db0..37f6d80 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/vfork.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ SYSCALL__ (vfork, 0)
parent:
ret
nop
+
+weak_alias (__vfork, vfork)
diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S
index e0f94b0..4930c56 100644
--- a/sysdeps/unix/bsd/ultrix4/setsid.S
+++ b/sysdeps/unix/bsd/ultrix4/setsid.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__setsid.S>
+#include <sysdeps/unix/bsd/bsd4.4/setsid.S>
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
index c0b3203..a9f3c5b 100644
--- a/sysdeps/unix/bsd/ultrix4/sysconf.c
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
@@ -58,4 +58,4 @@ DEFUN(__sysconf, (name), int name)
#define __sysconf __default_sysconf
-#include <sysdeps/posix/__sysconf.c>
+#include <sysdeps/posix/sysconf.c>
diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S
index 102ca18..83910a5 100644
--- a/sysdeps/unix/bsd/ultrix4/wait3.S
+++ b/sysdeps/unix/bsd/ultrix4/wait3.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (wait3, 3)
ret
+
+weak_alias (__wait3, wait3)
diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S
index 3bc5ce2..b64e528 100644
--- a/sysdeps/unix/bsd/ultrix4/waitpid.S
+++ b/sysdeps/unix/bsd/ultrix4/waitpid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (waitpid, 3)
ret
+
+weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index 9501744..10c681a 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,3 +24,5 @@ SYSCALL__ (pipe, 1)
movl r1, (r2)
clrl r0
ret
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
index 5316be2..77311b4 100644
--- a/sysdeps/unix/bsd/vax/wait.S
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ SYSCALL__ (wait, 1)
beq 1f
movl r1, (r2)
1: ret
+
+weak_alias (__wait, wait)
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
index 2e7ab13..2d8dba8 100644
--- a/sysdeps/unix/bsd/vax/wait3.S
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,5 @@ ENTRY(___wait3)
.globl syscall_error
error: jmp syscall_error
+
+weak_alias (__wait3, wait3)
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
index 507a753..f8ce56b 100644
--- a/sysdeps/unix/mips/pipe.S
+++ b/sysdeps/unix/mips/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,5 @@ SYSCALL__ (pipe, 1)
j ra
move v0, zero
nop
+
+weak_alias (__pipe, pipe)
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
index 02e4d25..1e76bf5 100644
--- a/sysdeps/unix/mips/sigreturn.S
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,5 @@ Cambridge, MA 02139, USA. */
ENTRY(__sigreturn)
li v0, SYS_sigreturn
syscall
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 2e9a259..63bce84 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,5 @@ noerror:
nop
noarg:
ret
+
+weak_alias (__wait, wait)
diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S
index 47905b3..be1c6b8 100644
--- a/sysdeps/unix/sysv/i386/sigreturn.S
+++ b/sysdeps/unix/sysv/i386/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,3 +23,5 @@ ENTRY (__sigreturn)
addl $4, %esp /* Pop the return PC. */
lcall $0xf, $0 /* Do the magic sigreturn trap. */
/* NOTREACHED */
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index b85b139..714f660 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups)
{
return __syssgi (SGI_GETGROUPS, n, groups);
}
+
+weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
index e160980..fdd3a24 100644
--- a/sysdeps/unix/sysv/irix4/getrusage.c
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,3 +31,5 @@ DEFUN(__getrusage, (who, usage),
{
return __syssgi (SGI_RUSAGE, who, usage);
}
+
+weak_alias (__getrusage, getrusage)
diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c
index d92b3bb..8a55f99 100644
--- a/sysdeps/unix/sysv/irix4/gettimeofday.c
+++ b/sysdeps/unix/sysv/irix4/gettimeofday.c
@@ -1 +1,3 @@
#include <sysdeps/posix/__gettod.c>
+
+weak_alias (__gettimeofday, gettimeofday)
diff --git a/sysdeps/unix/sysv/irix4/pathconf.c b/sysdeps/unix/sysv/irix4/pathconf.c
index 6e54661..698e30a 100644
--- a/sysdeps/unix/sysv/irix4/pathconf.c
+++ b/sysdeps/unix/sysv/irix4/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,5 @@ DEFUN(__pathconf, (path, name), CONST char *path AND int name)
{
return __syssgi (SGI_PATHCONF, PATHCONF, path, name);
}
+
+weak_alias (__pathconf, pathconf)
diff --git a/sysdeps/unix/sysv/irix4/setpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S
index 2e3135b..38ce9cb 100644
--- a/sysdeps/unix/sysv/irix4/setpgid.S
+++ b/sysdeps/unix/sysv/irix4/setpgid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
PSEUDO (__setpgrp, bsdsetpgrp, 2)
ret
+
+weak_alias (__setpgrp, setpgrp)
diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S
index 1d62468..ebb5c1a 100644
--- a/sysdeps/unix/sysv/irix4/sigreturn.S
+++ b/sysdeps/unix/sysv/irix4/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
The GNU C Library is free software; you can redistribute it and/or
@@ -21,3 +21,5 @@ Cambridge, MA 02139, USA. */
ENTRY(__sigreturn)
li v0, SYS_sigreturn
syscall
+
+weak_alias (__sigreturn, sigreturn)
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index 497c6a7..a310362 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,3 +31,5 @@ DEFUN(__sysconf, (name), int name)
return __syssgi (SGI_SYSCONF, name);
}
+
+weak_alias (__sysconf, sysconf)
diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S
index a50a5e6..9f2afa7 100644
--- a/sysdeps/unix/sysv/irix4/wait.S
+++ b/sysdeps/unix/sysv/irix4/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
The GNU C Library is free software; you can redistribute it and/or
@@ -38,3 +38,5 @@ noerror:
nop
noarg:
ret
+
+weak_alias (__wait, wait)
diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S
index d4ed738..54065ae 100644
--- a/sysdeps/unix/sysv/irix4/wait3.S
+++ b/sysdeps/unix/sysv/irix4/wait3.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/ultrix4/__wait3.S>
+#include <sysdeps/unix/bsd/ultrix4/wait3.S>
diff --git a/sysdeps/unix/sysv/irix4/waitpid.c b/sysdeps/unix/sysv/irix4/waitpid.c
index 47129a8..8378982 100644
--- a/sysdeps/unix/sysv/irix4/waitpid.c
+++ b/sysdeps/unix/sysv/irix4/waitpid.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
+#include <sysdeps/unix/bsd/bsd4.4/waitpid.c>
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
index 82e5fba..68966bc 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,3 +41,5 @@ DEFUN(__getgroups, (size, list), int size AND gid_t *list)
return size;
}
+
+weak_alias (__getgroups, getgroups)
diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S
index 2c73762..1c4dd95 100644
--- a/sysdeps/unix/sysv/sco3.2.4/pathconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/pathconf.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (pathconf, 2)
ret
+
+weak_alias (__pathconf, pathconf)
diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
index 928e6d0..32f7daf 100644
--- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/sysv4/__setpgrp.c>
+#include <sysdeps/unix/sysv/sysv4/setpgrp.c>
diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c
index 4a0a706..6337652 100644
--- a/sysdeps/unix/sysv/sco3.2.4/setsid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/sysv4/__setsid.c>
+#include <sysdeps/unix/sysv/sysv4/setsid.c>
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index f5453da..dc1bb41 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,5 @@ ENTRY (__sigaction)
DO_CALL (sigaction, 3)
jb syscall_error
ret
+
+weak_alias (__sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
index 148741e..ff19915 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigprocmask, 3)
ret
+
+weak_alias (__sigprocmask, sigprocmask)
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 58e1465..631e5e9 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,3 +26,5 @@ ENTRY (__sysconf)
DO_CALL (sysconf, 1) /* No; use the SCO system call. */
ret
tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */
+
+weak_alias (__sysconf, sysconf)
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index 63decf1..523ef37 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,3 +32,5 @@ ENTRY (__waitpid)
je null
movl r1, (scratch) /* Yes; store the status there. */
null: ret
+
+weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c
index 9de35d5..c1ae610 100644
--- a/sysdeps/unix/sysv/sysv4/getdtsz.c
+++ b/sysdeps/unix/sysv/sysv4/getdtsz.c
@@ -1,2 +1,2 @@
/* Solaris uses sysconf ala POSIX.1. */
-#include <sysdeps/posix/__getdtsz.c>
+#include <sysdeps/posix/getdtsz.c>
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
index c1c9e0a..cce1149 100644
--- a/sysdeps/unix/sysv/sysv4/gethostname.c
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -29,3 +29,5 @@ DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen)
{
return __sysinfo (SI_HOSTNAME, name, namelen);
}
+
+weak_alias (__gethostname, gethostname)
diff --git a/sysdeps/unix/sysv/sysv4/getpagesize.c b/sysdeps/unix/sysv/sysv4/getpagesize.c
index 241348c..6119640 100644
--- a/sysdeps/unix/sysv/sysv4/getpagesize.c
+++ b/sysdeps/unix/sysv/sysv4/getpagesize.c
@@ -1,2 +1,2 @@
/* Solaris uses sysconf ala POSIX.1. */
-#include <sysdeps/posix/__getpgsz.c>
+#include <sysdeps/posix/getpagesize.c>
diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S
index 0ca214f..52ffdba 100644
--- a/sysdeps/unix/sysv/sysv4/i386/lstat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,5 @@ ENTRY (__lstat)
DO_CALL (lxstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
+
+weak_alias (__lstat, lstat)
diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S
index 4c879cb..21f932c 100644
--- a/sysdeps/unix/sysv/sysv4/i386/mknod.S
+++ b/sysdeps/unix/sysv/sysv4/i386/mknod.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,3 +32,5 @@ ENTRY (__mknod)
DO_CALL (xmknod, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
+
+weak_alias (__mknod, mknod)
diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S
index 7282933..3a5107c 100644
--- a/sysdeps/unix/sysv/sysv4/i386/stat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/stat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,5 @@ ENTRY (__stat)
DO_CALL (xstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
+
+weak_alias (__stat, stat)
diff --git a/sysdeps/unix/sysv/sysv4/i386/vfork.S b/sysdeps/unix/sysv/sysv4/i386/vfork.S
index 1cdebcd..bbe99fb 100644
--- a/sysdeps/unix/sysv/sysv4/i386/vfork.S
+++ b/sysdeps/unix/sysv/sysv4/i386/vfork.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/i386/__vfork.S>
+#include <sysdeps/unix/bsd/i386/vfork.S>
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 90eff3c..e71f0db 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,5 @@ DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
{
return __pgrpsys (1, pid, pgid);
}
+
+weak_alias (__setpgrp, setpgrp)
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index a32b39a..f0d6c8a 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,5 @@ DEFUN_VOID(__setsid)
{
return __pgrpsys (3);
}
+
+weak_alias (__setsid, setsid)
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 2644fb0..68fd7a1 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -75,3 +75,5 @@ DEFUN(__sigaction, (sig, act, oact),
return 0;
}
+
+weak_alias (__sigaction, sigaction)
diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S
index 5da366d..51fddb0 100644
--- a/sysdeps/unix/sysv/sysv4/sigprocmask.S
+++ b/sysdeps/unix/sysv/sysv4/sigprocmask.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (sigprocmask, 3)
ret
+
+weak_alias (__sigprocmask, sigprocmask)
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
index 16baf44..54a043c 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
@@ -1,2 +1,2 @@
/* Solaris has the BSD `utimes' function. */
-#include <sysdeps/unix/bsd/__utimes.S>
+#include <sysdeps/unix/bsd/utimes.S>
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 71d3d08..607cd05 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -177,3 +177,5 @@ DEFUN(__sysconf, (name), int name)
#endif
}
}
+
+weak_alias (__sysconf, sysconf)
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index a0ca8c2..f54df4b 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -116,3 +116,5 @@ DEFUN(__waitpid, (pid, stat_loc, options),
any PID. */
return infop.__pid;
}
+
+weak_alias (__waitpid, waitpid)
diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c
index aa755ed..62ec9dc 100644
--- a/sysdeps/vax/infnan.c
+++ b/sysdeps/vax/infnan.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,3 +58,5 @@ DEFUN(__infnan, (error), int error)
}
#endif
+
+weak_alias (__infnan, infnan)
diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c
index 84df894..9849761 100644
--- a/sysdeps/vax/memccpy.c
+++ b/sysdeps/vax/memccpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,3 +41,5 @@ DEFUN(__memccpy, (dest, src, c, n),
(void) memcpy (dest, src, (char *) found + 1 - (char *) src);
return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src));
}
+
+weak_alias (__memccpy, memccpy)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c22ede5ecfc0f03bacdb096c965265ebbb9d409
commit 3c22ede5ecfc0f03bacdb096c965265ebbb9d409
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 21 14:40:39 1995 +0000
Converted to use weak aliases with macros from libc-symbols.h.
diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c
index 2136f6b..69544b0 100644
--- a/sysdeps/alpha/copysign.c
+++ b/sysdeps/alpha/copysign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */
#include <math.h>
/* Return X with its sign changed to Y's. */
-__inline __CONSTVALUE double
+__inline double
__copysign (double __x, double __y)
{
__asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
return __x;
}
+
+weak_alias (__copysign, copysign)
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
index b3efffb..16caacf 100644
--- a/sysdeps/m68k/fpu/drem.c
+++ b/sysdeps/m68k/fpu/drem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,10 @@ Cambridge, MA 02139, USA. */
#undef drem
-__CONSTVALUE double
+double
DEFUN(__drem, (x, y), double x AND double y)
{
return ____drem(x, y);
}
+
+weak_alias (__drem, drem)
diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c
index be9174c..67fbf77 100644
--- a/sysdeps/standalone/brk.c
+++ b/sysdeps/standalone/brk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -59,10 +59,7 @@ DEFUN(__NONE_set_memvals, (argc, argv, envp),
}
#ifdef HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
text_set_element (__libc_subinit, __NONE_set_memvals);
-
#endif
+weak_alias (__brk, brk)
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
index d7674ae..59b6073 100644
--- a/sysdeps/standalone/close.c
+++ b/sysdeps/standalone/close.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
On-Line Applications Research Corporation.
@@ -40,3 +40,5 @@ DEFUN(__close, (fd), int fd)
return 0;
}
+
+weak_alias (__close, close)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
index 1475108..111f339 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -49,3 +49,5 @@ ENTRY(__brk)
error: ldgp gp,0(gp)
jmp zero,syscall_error
.end __brk
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
index 8afcfbc..7c8d671 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -21,3 +21,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (fork, 0)
cmovne a4, 0, v0
ret
+
+weak_alias (__fork, fork)
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
index 52f7cdb..16ccbc2 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,6 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (getdirentries, 4)
ret
+
+weak_alias (__getdirentries, getdirentries)
+
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index 1b06c12..cf46b4d 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,3 +42,5 @@ ENTRY (__brk)
clrl d0
rts
error: jmp syscall_error
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S
index 6c4f7af..f283a5c 100644
--- a/sysdeps/unix/bsd/sun/getdents.S
+++ b/sysdeps/unix/bsd/sun/getdents.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,3 +20,5 @@ Cambridge, MA 02139, USA. */
SYSCALL__ (getdirentries, 4)
ret
+
+weak_alias (__getdirentries, getdirentries)
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 6a69dd0..114fa73 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,3 +45,5 @@ ENTRY (__brk)
rts
1:
jmp syscall_error
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S
index 6d18c04..be449b2 100644
--- a/sysdeps/unix/bsd/ultrix4/getdents.S
+++ b/sysdeps/unix/bsd/ultrix4/getdents.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/sun/__getdents.S>
+#include <sysdeps/unix/bsd/sun/getdents.S>
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S
index 9186d86..b3e8e10 100644
--- a/sysdeps/unix/bsd/vax/brk.S
+++ b/sysdeps/unix/bsd/vax/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,3 +43,5 @@ ENTRY (__brk)
ret
1:
jmp syscall_error
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
index 79e4fec..1754c0c 100644
--- a/sysdeps/unix/mips/brk.S
+++ b/sysdeps/unix/mips/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -63,3 +63,5 @@ error: j syscall_error
nop
nop
nop
+
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
index 53cae3c..2347bf4 100644
--- a/sysdeps/unix/mips/fork.S
+++ b/sysdeps/unix/mips/fork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -25,3 +25,5 @@ SYSCALL__ (fork, 0)
move v0, zero
parent:
ret
+
+weak_alias (__fork, fork)
diff --git a/sysdeps/unix/sysv/irix4/dup2.c b/sysdeps/unix/sysv/irix4/dup2.c
index 53691b6..86720b1 100644
--- a/sysdeps/unix/sysv/irix4/dup2.c
+++ b/sysdeps/unix/sysv/irix4/dup2.c
@@ -1 +1,3 @@
#include <sysdeps/posix/__dup2.c>
+
+weak_alias (__dup2, dup2)
diff --git a/sysdeps/unix/sysv/irix4/fpathconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c
index be39d2f..3c9f175 100644
--- a/sysdeps/unix/sysv/irix4/fpathconf.c
+++ b/sysdeps/unix/sysv/irix4/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,3 +30,5 @@ DEFUN(__fpathconf, (fd, name), int fd AND int name)
{
return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name);
}
+
+weak_alias (__fpathconf, fpathconf)
diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c
index 06270b4..c7015fc 100644
--- a/sysdeps/unix/sysv/sysv4/dup2.c
+++ b/sysdeps/unix/sysv/sysv4/dup2.c
@@ -1,2 +1,4 @@
/* SVR4 uses the POSIX dup2. */
#include <sysdeps/posix/__dup2.c>
+
+weak_alias (__dup2, dup2)
diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S
index bf83d6f..11743b3 100644
--- a/sysdeps/unix/sysv/sysv4/i386/fstat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,5 @@ ENTRY (__fstat)
DO_CALL (fxstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
+
+weak_alias (__fstat, fstat)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3332ae5c899e5163c0038fbbe427eba4f029b5d9
commit 3332ae5c899e5163c0038fbbe427eba4f029b5d9
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 15 16:50:59 1995 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/ftruncate.c b/sysdeps/unix/sysv/sysv4/ftruncate.c
new file mode 100644
index 0000000..45f2614
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/ftruncate.c
@@ -0,0 +1,37 @@
+/* ftruncate for SVR4 using the fcntl F_FREESP command.
+Copyright (C) 1995 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+
+/* Truncate the file FD refers to to LENGTH bytes. */
+int
+DEFUN(ftruncate, (fd, length),
+ int fd AND off_t length)
+{
+ struct flock fl;
+
+ memset (&fl, 0, sizeof fl);
+ fl.l_type = F_WRLCK;
+ fl.l_start = length;
+ return fcntl (fd, F_FREESP, &fl);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d4d45d59d3649e11f9f604a934db0c8a6f1d205
commit 2d4d45d59d3649e11f9f604a934db0c8a6f1d205
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Jan 10 18:46:33 1995 +0000
* sysdeps/unix/bsd/ultrix4/mips/start.S: Use s0, s1, and s2
instead of t0, t1, and t2.
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index 108f7d9..6146b57 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -29,49 +29,46 @@ ENTRY(__start)
.set noreorder
/* The first thing on the stack is argc. */
- lw t0, 0(sp)
+ lw s0, 0(sp)
nop
/* Set up the global pointer. */
la gp, _gp
/* Then set up argv. */
- addiu t1, sp, 4
+ addiu s1, sp, 4
/* To compute where envp is, first we have to jump ahead four
bytes from what argv was. This will bring us ahead, so we don't
need to compute the NULL at the end of argv later. */
- addiu v1, t1, 4
+ addiu v1, s1, 4
/* Now, compute the space to skip given the number of arguments
we've got. We do this by multiplying argc by 4. */
- sll v0, t0, 2
+ sll v0, s0, 2
/* Now, add (argv+4) with the space to skip...that's envp. */
- addu v1, v1, v0
- move t2, v1
+ addu s2, v1, v0
/* __environ = envp; */
- sw t2, __environ
+ sw s2, __environ
addiu sp, sp, -24
/* __libc_init (argc, argv, envp); */
- move a0, t0
- move a1, t1
- move a2, t2
+ move a0, s0
+ move a1, s1
jal __libc_init
- nop
+ move a2, s2
/* errno = 0; */
sw zero, errno
/* exit (main (argc, argv, envp)); */
- move a0, t0
- move a1, t1
- move a2, t2
+ move a0, s0
+ move a1, s1
jal main
- nop
+ move a2, s2
/* Make the value returned by main be the argument to exit. */
jal exit
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71a986ecd74321c973bf916610a8d3a1516f1b39
commit 71a986ecd74321c973bf916610a8d3a1516f1b39
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 28 09:57:21 1994 +0000
(__m81_inline): New macro.
Replace all uses of `extern __inline' with `__m81_inline'.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 2617ae2..a9ae2d9 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -21,14 +21,19 @@ Cambridge, MA 02139, USA. */
#include <sys/cdefs.h>
#ifdef __NO_MATH_INLINES
+/* This is used when defining the functions themselves. Define them with
+ __ names, and with `static inline' instead of `extern inline' so the
+ bodies will always be used, never an external function call. */
#define __m81_u(x) __CONCAT(__,x)
+#define __m81_inline static __inline
#else
#define __m81_u(x) x
+#define __m81_inline exter __inline
#define __MATH_INLINES 1
#endif
#define __inline_mathop2(func, op) \
- extern __inline __CONSTVALUE double \
+ __m81_inline __CONSTVALUE double \
__m81_u(func)(double __mathop_x) \
{ \
double __result; \
@@ -63,7 +68,7 @@ __inline_mathop2(log1p, lognp1)
__inline_mathop(atanh)
#endif
-extern __inline __CONSTVALUE double
+__m81_inline __CONSTVALUE double
__m81_u(__drem)(double __x, double __y)
{
double __result;
@@ -71,7 +76,7 @@ __m81_u(__drem)(double __x, double __y)
return __result;
}
-extern __inline __CONSTVALUE double
+__m81_inline __CONSTVALUE double
__m81_u(ldexp)(double __x, int __e)
{
double __result;
@@ -80,7 +85,7 @@ __m81_u(ldexp)(double __x, int __e)
return __result;
}
-extern __inline __CONSTVALUE double
+__m81_inline __CONSTVALUE double
__m81_u(fmod)(double __x, double __y)
{
double __result;
@@ -88,7 +93,7 @@ __m81_u(fmod)(double __x, double __y)
return __result;
}
-extern __inline double
+__m81_inline double
__m81_u(frexp)(double __value, int *__expptr)
{
double __mantissa, __exponent;
@@ -98,7 +103,7 @@ __m81_u(frexp)(double __value, int *__expptr)
return __mantissa;
}
-extern __inline __CONSTVALUE double
+__m81_inline __CONSTVALUE double
__m81_u(pow)(double __x, double __y)
{
double __result;
@@ -117,7 +122,7 @@ __m81_u(pow)(double __x, double __y)
return __result;
}
-extern __inline __CONSTVALUE double
+__m81_inline __CONSTVALUE double
__m81_u(ceil)(double __x)
{
double __result;
@@ -132,7 +137,7 @@ __m81_u(ceil)(double __x)
return __result;
}
-extern __inline double
+__m81_inline double
__m81_u(modf)(double __value, double *__iptr)
{
double __modf_int = __m81_u(floor)(__value);
@@ -140,7 +145,7 @@ __m81_u(modf)(double __value, double *__iptr)
return __value - __modf_int;
}
-extern __inline __CONSTVALUE int
+__m81_inline __CONSTVALUE int
__m81_u(__isinf)(double __value)
{
/* There is no branch-condition for infinity,
@@ -151,7 +156,7 @@ __m81_u(__isinf)(double __value)
return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
}
-extern __inline __CONSTVALUE int
+__m81_inline __CONSTVALUE int
__m81_u(__isnan)(double __value)
{
char __result;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4be66ebd61a8a880e5ae4d005b260002097e727b
commit 4be66ebd61a8a880e5ae4d005b260002097e727b
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 15 01:01:53 1994 +0000
Reverse register and immediate args in `bis' insn; immediate must be
second.
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
index b6f00ce..470f7bc 100644
--- a/sysdeps/alpha/bsd-setjmp.S
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -25,6 +25,6 @@ Cambridge, MA 02139, USA. */
ENTRY (setjmp)
lda $27, __sigsetjmp /* Load address to jump to. */
- bis 1, $31, $17 /* Pass a second argument of one. */
+ bis $31, 1, $17 /* Pass a second argument of one. */
jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
.end setjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ca194bd9dabff6318dbe850f64461e00106b9e29
commit ca194bd9dabff6318dbe850f64461e00106b9e29
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 15 00:12:48 1994 +0000
(_hurd_setup_sighandler): Remove A macro; just use `asm volatile' with
proper quotes in each line.
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 455aa57..85f4964 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -234,14 +234,13 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
clobbered by running the handler). We use this saved value to pass to
__sigreturn, so the handler can clobber the argument registers if it
likes. */
-#define A(line) asm volatile (#line)
/* Call the handler function, saving return address in ra ($26). */
- A (jsr $26, $26);
+ asm volatile ("jsr $26, ($26)");
/* Reset gp ($29) from the return address (here) in ra ($26). */
- A (ldgp $29, 0($26));
- A (mov $25, $16); /* Move saved SCP to argument register. */
+ asm volatile ("ldgp $29, 0($26)");
+ asm volatile ("mov $25, $16"); /* Move saved SCP to argument register. */
/* Call __sigreturn (SCP); this cannot return. */
- A (jmp $31, $27);
+ asm volatile ("jmp $31, ($27)");
/* NOTREACHED */
return NULL;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33aa4240f65551f5df406462a2b05cc357da92b6
commit 33aa4240f65551f5df406462a2b05cc357da92b6
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 15 00:09:43 1994 +0000
(CALL_WITH_SP): Put parens around jmp target register.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 4ef23ae..a327662 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
#define CALL_WITH_SP(fn, sp) \
({ register long int __fn = (long int) fn, __sp = (long int) sp; \
- asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \
+ asm volatile ("mov %0,$30; jmp $31, (%1); ldgp $29, 0(%1)" \
: : "r" (__sp), "r" (__fn)); })
#define ENTRY(name) LEAF(name, ***loser no arg count***)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=edae2ab8afe17418d55bf693da3d3af77c7ba5ed
commit edae2ab8afe17418d55bf693da3d3af77c7ba5ed
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 12 06:43:12 1994 +0000
Use `long int' for sigcode values.
Use _hurdsig_catch_fault.
Pass address of __sigreturn in $27, SCP value in $25.
In trampoline code, use those regs.
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 9b32284..455aa57 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -20,7 +20,8 @@ Cambridge, MA 02139, USA. */
#include <hurd/signal.h>
#include "thread_state.h"
#include <mach/machine/alpha_instruction.h>
-
+#include "hurdfault.h"
+#include <assert.h>
struct mach_msg_trap_args
{
@@ -37,7 +38,7 @@ struct mach_msg_trap_args
struct sigcontext *
_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
- int signo, int sigcode,
+ int signo, long int sigcode,
int rpc_wait,
struct machine_thread_all_state *state)
{
@@ -50,7 +51,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* We have a previous sigcontext that sigreturn was about
to restore when another signal arrived. We will just base
our setup on that. */
- if (! setjmp (_hurd_sigthread_fault_env))
+ if (_hurdsig_catch_fault (SIGSEGV))
+ assert (_hurdsig_fault_sigcode >= (long int) ss->context &&
+ _hurdsig_fault_sigcode < (long int) (ss->context + 1));
+ else
{
memcpy (&state->basic, &ss->context->sc_alpha_thread_state,
sizeof (state->basic));
@@ -97,7 +101,16 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
sigsp -= sizeof (*scp);
scp = sigsp;
- if (! setjmp (_hurd_sigthread_fault_env))
+ if (_hurdsig_catch_fault (SIGSEGV))
+ {
+ assert (_hurdsig_fault_sigcode >= (long int) scp &&
+ _hurdsig_fault_sigcode < (long int) (scp + 1));
+ /* We got a fault trying to write the stack frame.
+ We cannot set up the signal handler.
+ Returning NULL tells our caller, who will nuke us with a SIGILL. */
+ return NULL;
+ }
+ else
{
/* Set up the sigcontext from the current state of the thread. */
@@ -125,11 +138,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
sizeof (state->fpu)))
return NULL;
}
- else
- /* We got a fault trying to write the stack frame.
- We cannot set up the signal handler.
- Returning NULL tells our caller, who will nuke us with a SIGILL. */
- return NULL;
/* Modify the thread state to call the trampoline code on the new stack. */
if (rpc_wait)
@@ -177,9 +185,12 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* We pass the handler function to the trampoline code in ra ($26). */
state->basic.r26 = (long int) handler;
- /* In the callee-saved register t12 ($27), we save the SCP value to pass
+ /* In the callee-saved register t12/pv ($27), we store the
+ address of __sigreturn itself, for the trampoline code to use. */
+ state->basic.r27 = (long int) &__sigreturn;
+ /* In the callee-saved register t11/ai ($25), we save the SCP value to pass
to __sigreturn after the handler returns. */
- state->basic.r27 = (long int) scp;
+ state->basic.r25 = (long int) scp;
return scp;
@@ -223,15 +234,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
clobbered by running the handler). We use this saved value to pass to
__sigreturn, so the handler can clobber the argument registers if it
likes. */
- asm volatile
- (/* Call the handler function, saving return address in ra ($26). */
- "jsr $26, $26\n"
- /* Reset gp ($29) from the return address (here) in ra ($26).
- This may be required to locate __sigreturn. */
- "ldgp $29, 0($26)\n"
- /* Call __sigreturn (SCP); this cannot return. */
- "mov $27, $16\n" /* Move saved SCP to argument register. */
- "jmp $31, %0" : : "i" (&__sigreturn));
+#define A(line) asm volatile (#line)
+ /* Call the handler function, saving return address in ra ($26). */
+ A (jsr $26, $26);
+ /* Reset gp ($29) from the return address (here) in ra ($26). */
+ A (ldgp $29, 0($26));
+ A (mov $25, $16); /* Move saved SCP to argument register. */
+ /* Call __sigreturn (SCP); this cannot return. */
+ A (jmp $31, $27);
/* NOTREACHED */
return NULL;
@@ -246,21 +256,30 @@ int
_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
mach_port_t *port)
{
- if (! setjmp (_hurd_sigthread_fault_env))
+ if (state->basic.r0 == MACH_RCV_INTERRUPTED)
{
const unsigned int *pc = (void *) state->basic.pc;
- if (state->basic.r0 == MACH_RCV_INTERRUPTED &&
- pc[-1] == ((alpha_instruction) { pal_format:
- { opcode: op_pal,
- function: op_chmk } }).bits)
- {
- /* We did just return from a mach_msg_trap system call
- doing a message receive that was interrupted.
- Examine the parameters to find the receive right. */
- struct mach_msg_trap_args *args = (void *) &state->basic.r16;
+ struct mach_msg_trap_args *args = (void *) &state->basic.r16;
- *port = args->rcv_name;
- return 1;
+ if (_hurdsig_catch_fault (SIGSEGV))
+ {
+ assert (_hurdsig_fault_sigcode == (long int) (pc - 1) ||
+ _hurdsig_fault_sigcode == (long int) &args->rcv_name);
+ /* We got a fault trying to read the PC or stack. */
+ return 0;
+ }
+ else
+ {
+ if (pc[-1] == ((alpha_instruction) { pal_format:
+ { opcode: op_pal,
+ function: op_chmk } }).bits)
+ {
+ /* We did just return from a mach_msg_trap system call
+ doing a message receive that was interrupted.
+ Examine the parameters to find the receive right. */
+ *port = args->rcv_name;
+ return 1;
+ }
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94cd6ef1f80044993be27b59c8c8a376f4b51b9d
commit 94cd6ef1f80044993be27b59c8c8a376f4b51b9d
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 12 06:41:03 1994 +0000
Use asms instead of global register vars to restore FP regs.
Fix typo in REI invocation.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index 265a4f7..c178a03 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -17,43 +17,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Declare global register variables before any code. */
-register double f0 asm ("$f0");
-register double f1 asm ("$f1");
-register double f2 asm ("$f2");
-register double f3 asm ("$f3");
-register double f4 asm ("$f4");
-register double f5 asm ("$f5");
-register double f6 asm ("$f6");
-register double f7 asm ("$f7");
-register double f8 asm ("$f8");
-register double f9 asm ("$f9");
-register double f10 asm ("$f10");
-register double f11 asm ("$f11");
-register double f12 asm ("$f12");
-register double f13 asm ("$f13");
-register double f14 asm ("$f14");
-register double f15 asm ("$f15");
-register double f16 asm ("$f16");
-register double f17 asm ("$f17");
-register double f18 asm ("$f18");
-register double f19 asm ("$f19");
-register double f20 asm ("$f20");
-register double f21 asm ("$f21");
-register double f22 asm ("$f22");
-register double f23 asm ("$f23");
-register double f24 asm ("$f24");
-register double f25 asm ("$f25");
-register double f26 asm ("$f26");
-register double f27 asm ("$f27");
-register double f28 asm ("$f28");
-register double f29 asm ("$f29");
-register double f30 asm ("$f30");;
-
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/threadvar.h>
+#include <hurd/msg.h>
#include <stdlib.h>
+#include <string.h>
+#include <mach/machine/alpha_instruction.h>
int
__sigreturn (struct sigcontext *scp)
@@ -119,37 +89,39 @@ __sigreturn (struct sigcontext *scp)
asm volatile ("mt_fpcr %0" : : "f" (scp->sc_fpcsr));
/* Restore floating-point registers. */
- f0 = scp->sc_fpregs[0];
- f1 = scp->sc_fpregs[1];
- f2 = scp->sc_fpregs[2];
- f3 = scp->sc_fpregs[3];
- f4 = scp->sc_fpregs[4];
- f5 = scp->sc_fpregs[5];
- f6 = scp->sc_fpregs[6];
- f7 = scp->sc_fpregs[7];
- f8 = scp->sc_fpregs[8];
- f9 = scp->sc_fpregs[9];
- f10 = scp->sc_fpregs[10];
- f11 = scp->sc_fpregs[11];
- f12 = scp->sc_fpregs[12];
- f13 = scp->sc_fpregs[13];
- f14 = scp->sc_fpregs[14];
- f15 = scp->sc_fpregs[15];
- f16 = scp->sc_fpregs[16];
- f17 = scp->sc_fpregs[17];
- f18 = scp->sc_fpregs[18];
- f19 = scp->sc_fpregs[19];
- f20 = scp->sc_fpregs[20];
- f21 = scp->sc_fpregs[21];
- f22 = scp->sc_fpregs[22];
- f23 = scp->sc_fpregs[23];
- f24 = scp->sc_fpregs[24];
- f25 = scp->sc_fpregs[25];
- f26 = scp->sc_fpregs[26];
- f27 = scp->sc_fpregs[27];
- f28 = scp->sc_fpregs[28];
- f29 = scp->sc_fpregs[29];
- f30 = scp->sc_fpregs[30];
+#define restore_fpr(n) \
+ asm volatile ("ldt $f" #n ",%0" : : "m" (scp->sc_fpregs[n]))
+ restore_fpr (0);
+ restore_fpr (1);
+ restore_fpr (2);
+ restore_fpr (3);
+ restore_fpr (4);
+ restore_fpr (5);
+ restore_fpr (6);
+ restore_fpr (7);
+ restore_fpr (8);
+ restore_fpr (9);
+ restore_fpr (10);
+ restore_fpr (11);
+ restore_fpr (12);
+ restore_fpr (13);
+ restore_fpr (14);
+ restore_fpr (15);
+ restore_fpr (16);
+ restore_fpr (17);
+ restore_fpr (18);
+ restore_fpr (19);
+ restore_fpr (20);
+ restore_fpr (21);
+ restore_fpr (22);
+ restore_fpr (23);
+ restore_fpr (24);
+ restore_fpr (25);
+ restore_fpr (26);
+ restore_fpr (27);
+ restore_fpr (28);
+ restore_fpr (29);
+ restore_fpr (30);
}
/* Load all the registers from the sigcontext. */
@@ -165,7 +137,7 @@ __sigreturn (struct sigcontext *scp)
registers and PSW it will to restore, onto the user's stack and let
it pop them from there. */
register const struct sigcontext *const scpreg asm ("$2") = scp;
- register integer_t *usp asm ("$3") = scpreg->sc_regs[30];
+ register integer_t *usp asm ("$3") = (integer_t *) scpreg->sc_regs[30];
register integer_t usp_align asm ("$4");
/* Push an 8-word "trap frame" onto the user stack for `rei':
@@ -226,7 +198,7 @@ __sigreturn (struct sigcontext *scp)
/* Switch the stack pointer to the trap frame set up on
the user stack and do the magical `rei' PAL call. */
asm volatile ("mov %0, $30\n"
- "call_pal %0"
+ "call_pal %1"
: : "r" (rei_frame), "i" (op_rei));
/* Firewall. */
asm volatile ("call_pal %0" : : "i" (op_halt));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=079f003a7cb67b07dd5f579c0e8749fe41f26715
commit 079f003a7cb67b07dd5f579c0e8749fe41f26715
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 10 05:20:47 1994 +0000
Use C comments instead of ! comments.
diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4
index 982e705..f8c1fe9 100644
--- a/sysdeps/alpha/macros.m4
+++ b/sysdeps/alpha/macros.m4
@@ -23,7 +23,7 @@ define(ADJQU,
define(DOREM,
`ifelse(BASEOP, `rem',
-` ! Compute the remainder.
+` /* Compute the remainder. */
ifelse(SIZE, `l',
` mull t11, t12, t11
subl t10, t11, t12
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d61ce4f4b8a7c0956b0d11bec165ebad0adb943c
commit d61ce4f4b8a7c0956b0d11bec165ebad0adb943c
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 10 05:17:13 1994 +0000
Include <mach/machine/alpha_instruction.h> to define op_chmk.
diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S
index 0fd10fa..31ccb5f 100644
--- a/sysdeps/mach/alpha/syscall.S
+++ b/sysdeps/mach/alpha/syscall.S
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#include <mach/machine/alpha_instruction.h>
ENTRY (syscall)
.frame sp,0,ra
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=25e6db514e518a465856ebb08712964ce253a237
commit 25e6db514e518a465856ebb08712964ce253a237
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 10 04:41:06 1994 +0000
Use `long int' for sigcode values.
diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c
index c67c670..edac0aa 100644
--- a/sysdeps/mach/hurd/alpha/exc2signal.c
+++ b/sysdeps/mach/hurd/alpha/exc2signal.c
@@ -26,7 +26,7 @@ Cambridge, MA 02139, USA. */
void
_hurd_exception2signal (int exception, int code, int subcode,
- int *signo, int *sigcode, int *error)
+ int *signo, long int *sigcode, int *error)
{
*error = 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa7242a3a97b55aa6ed60fa1ca06a5140f15f48f
commit fa7242a3a97b55aa6ed60fa1ca06a5140f15f48f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 20:24:26 1994 +0000
Include <sysdep.h> instead of <regdef.h>.
Use C comments instead of ! comments.
diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4
index ab86128..5942cf4 100644
--- a/sysdeps/alpha/divrem.m4
+++ b/sysdeps/alpha/divrem.m4
@@ -12,31 +12,31 @@
/* We do not handle div by zero yet. */
#include <machine/pal.h>
#endif
-#include <regdef.h>
+#include <sysdep.h>
define(path, `SYSDEP_DIR/macros.m4')dnl
include(path)
FUNC__(OP)
- ! First set up the dividend.
+ /* First set up the dividend. */
EXTEND(t10)
stq t10,0(sp)
ldt $f10,0(sp)
cvtqt $f10,$f10
ADJQU($f10)
- ! Then set up the divisor.
+ /* Then set up the divisor. */
EXTEND(t11)
stq t11,0(sp)
ldt $f1,0(sp)
cvtqt $f1,$f1
ADJQU($f1)
- ! Do the division.
+ /* Do the division. */
divt $f10,$f1,$f10
cvttqc $f10,$f10
- ! Put the result in t12.
+ /* Put the result in t12. */
stt $f10,0(sp)
ldq t12,0(sp)
FULLEXTEND(t12)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5f9dfd1a18bd46d8f9132b37f034351015bd204
commit b5f9dfd1a18bd46d8f9132b37f034351015bd204
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 20:16:06 1994 +0000
Remove extra shift and OR of CHARMASK.
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index c6f99bf..11ff542 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -47,7 +47,6 @@ memchr (const void *s, int c, size_t n)
charmask = c | (c << 8);
charmask |= charmask << 16;
charmask |= charmask << 32;
- charmask |= charmask << 64;
for (;;)
{
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
index fc56d51..666e0c0 100644
--- a/sysdeps/alpha/strchr.c
+++ b/sysdeps/alpha/strchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -43,7 +43,6 @@ strchr (const char *str, int c)
charmask = c | (c << 8);
charmask |= charmask << 16;
charmask |= charmask << 32;
- charmask |= charmask << 64;
for (;;)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c82ceb0b001b1d40411e2986e74b84be462a906e
commit c82ceb0b001b1d40411e2986e74b84be462a906e
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 20:02:05 1994 +0000
Use ENV[0].__jmpbuf[0].
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
index 031c5a5..f92517b 100644
--- a/sysdeps/alpha/setjmp_aux.c
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -39,32 +39,32 @@ int
__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp)
{
/* Save the integer registers. */
- env[0].__9 = r9;
- env[0].__10 = r10;
- env[0].__11 = r11;
- env[0].__12 = r12;
- env[0].__13 = r13;
- env[0].__14 = r14;
+ env[0].__jmpbuf[0].__9 = r9;
+ env[0].__jmpbuf[0].__10 = r10;
+ env[0].__jmpbuf[0].__11 = r11;
+ env[0].__jmpbuf[0].__12 = r12;
+ env[0].__jmpbuf[0].__13 = r13;
+ env[0].__jmpbuf[0].__14 = r14;
#if 1 /* XXX */
/* Save the floating point registers. */
- env[0].__f2 = f2;
- env[0].__f3 = f3;
- env[0].__f4 = f4;
- env[0].__f5 = f5;
- env[0].__f6 = f6;
- env[0].__f7 = f7;
- env[0].__f8 = f8;
- env[0].__f9 = f9;
+ env[0].__jmpbuf[0].__f2 = f2;
+ env[0].__jmpbuf[0].__f3 = f3;
+ env[0].__jmpbuf[0].__f4 = f4;
+ env[0].__jmpbuf[0].__f5 = f5;
+ env[0].__jmpbuf[0].__f6 = f6;
+ env[0].__jmpbuf[0].__f7 = f7;
+ env[0].__jmpbuf[0].__f8 = f8;
+ env[0].__jmpbuf[0].__f9 = f9;
#endif
/* Save the return address of our caller, where longjmp will jump to. */
- env[0].__pc = retpc;
+ env[0].__jmpbuf[0].__pc = retpc;
/* Save the FP and SP of our caller. The __sigsetjmp entry point
simply puts these in the argument registers for us to fetch. */
- env[0].__fp = fp;
- env[0].__sp = sp;
+ env[0].__jmpbuf[0].__fp = fp;
+ env[0].__jmpbuf[0].__sp = sp;
/* Save the signal mask if requested. */
__sigjmp_save (env, savemask);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d73a59163ef705b6112ff18591d55c172cd764ae
commit d73a59163ef705b6112ff18591d55c172cd764ae
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 20:00:58 1994 +0000
(ENTRY): New macro.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 166c711..4ef23ae 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -34,6 +34,8 @@ Cambridge, MA 02139, USA. */
asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \
: : "r" (__sp), "r" (__fn)); })
+#define ENTRY(name) LEAF(name, ***loser no arg count***)
+
#define STACK_GROWTH_DOWN
#include_next <sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94b0df52ff816fbb76793f53feb8f296a253bc8f
commit 94b0df52ff816fbb76793f53feb8f296a253bc8f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 06:07:49 1994 +0000
Initial revision
diff --git a/sysdeps/mips/mipsel/bytesex.h b/sysdeps/mips/mipsel/bytesex.h
new file mode 100644
index 0000000..5da5965
--- /dev/null
+++ b/sysdeps/mips/mipsel/bytesex.h
@@ -0,0 +1,4 @@
+/* The MIPS architecture has selectable endianness.
+ This file is for a machine using little-endian mode. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60bbd54df8fede3d61060ea620d928d43d51dc20
commit 60bbd54df8fede3d61060ea620d928d43d51dc20
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 05:47:43 1994 +0000
(START_MACHDEP): Add missing backslashes.
(CALL_WITH_SP): Cast FN to long int.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 207fb58..166c711 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -21,16 +21,16 @@ Cambridge, MA 02139, USA. */
#define LOSE asm volatile ("call_pal 0") /* halt */
#define START_MACHDEP \
- asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */
- " br $27, 1f\n" /* Load GP from PC. */
- "1: ldgp $29, 0($27)\n"
+ asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */ \
+ " br $27, 1f\n" /* Load GP from PC. */ \
+ "1: ldgp $29, 0($27)\n" \
" jmp $26, _start0"); /* Jump to _start0; don't return. */
#define START_ARGS char **sparg
#define SNARF_ARGS(argc, argv, envp) \
(envp = &(argv = &sparg[1])[(argc = *(int *) sparg) + 1])
#define CALL_WITH_SP(fn, sp) \
- ({ register long int __fn = fn, __sp = (long int) sp; \
+ ({ register long int __fn = (long int) fn, __sp = (long int) sp; \
asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \
: : "r" (__sp), "r" (__fn)); })
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b0538623b8d656064bbc641ad3ff168a43a7c48
commit 8b0538623b8d656064bbc641ad3ff168a43a7c48
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 05:42:09 1994 +0000
(struct machine_thread_all_state): New member `exc'.
diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h
index 38527df..28b0a15 100644
--- a/sysdeps/mach/alpha/thread_state.h
+++ b/sysdeps/mach/alpha/thread_state.h
@@ -32,6 +32,7 @@ struct machine_thread_all_state
{
int set; /* Mask of bits (1 << FLAVOR). */
struct alpha_thread_state basic;
+ struct alpha_exc_state exc;
struct alpha_float_state fpu;
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=946b6e002aa61bf882416bc60670089eaae3093d
commit 946b6e002aa61bf882416bc60670089eaae3093d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 05:05:05 1994 +0000
Remove ".set noreorder" et al; GCC already emits them.
Fix register constraints in asms.
Set RTN in C, not asm.
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
index a73b9a0..42e21d8 100644
--- a/sysdeps/mach/alpha/machine-lock.h
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -38,9 +38,7 @@ typedef __volatile long int __spin_lock_t;
_EXTERN_INLINE void
__spin_unlock (__spin_lock_t *__lock)
{
- __asm__ __volatile__ (".set noreorder\n"
- "mb; stq $31, %0; mb\n"
- ".set reorder"
+ __asm__ __volatile__ ("mb; stq $31, %0; mb"
: "=m" (__lock));
}
@@ -53,18 +51,17 @@ __spin_try_lock (register __spin_lock_t *__lock)
do
{
- __asm__ __volatile__ (".set noreorder\n"
- /* %0 is TMP, %1 is RTN, %2 is LOCK. */
- "mb; ldq_l %0,%2\n" /* Load lock into TMP. */
- "or $31,2,%1\n" /* Locked value in RTN. */
- ".set reorder"
- : "=r" (__tmp), "=r" (__rtn) : "m" (__lock));
+ __asm__ __volatile__ ("mb; ldq_l %0,%1" /* Load lock value into TMP. */
+ : "=r" (__tmp) : "m" (*__lock));
+ __rtn = 2; /* Load locked value into RTN. */
if (__tmp)
/* The lock is already taken. */
return 0;
/* The lock is not taken; try to get it now. */
- __asm__ __volatile__ ("stq_c %0,%1" : "+r" (__rtn), "+m" (__lock));
+ __asm__ __volatile__ ("stq_c %0,%1"
+ : "=r" (__rtn), "=m" (*__lock)
+ : "0" (__rtn), "1" (*__lock));
/* RTN is clear if stq_c was interrupted; loop to try the lock again. */
} while (! __rtn);
/* RTN is now nonzero; we have the lock. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=157aaa4ee6cbe712ff16556596e72fb4bb189112
commit 157aaa4ee6cbe712ff16556596e72fb4bb189112
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 9 03:42:31 1994 +0000
Remove ".set noreorder" et al; GCC already emits them.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index db6e873..265a4f7 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -196,8 +196,6 @@ __sigreturn (struct sigcontext *scp)
How?); in user mode, `rei' demands that all other bits be zero. */
rei_frame->ps = (usp_align << 56) | (3 << 3); /* XXX low 3 bits??? */
- asm volatile (".set noreorder; .set noat;");
-
/* Restore the other general registers: everything except $2..$7, which
are in the `rei' trap frame we set up above, and $30, which is the
SP which is popped by `rei'. */
@@ -232,8 +230,6 @@ __sigreturn (struct sigcontext *scp)
: : "r" (rei_frame), "i" (op_rei));
/* Firewall. */
asm volatile ("call_pal %0" : : "i" (op_halt));
-
- asm volatile (".set reorder; .set at;");
}
/* NOTREACHED */
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 730439f..9b32284 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -193,8 +193,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
at ($28) points to the sc_regs[0] member of the sigcontext (saved v0
($0)). */
asm volatile
- (".set noat; .set noreorder; .set nomacro\n"
- /* Retry the interrupted mach_msg system call. */
+ (/* Retry the interrupted mach_msg system call. */
"lda $0, -25($31)\n" /* mach_msg_trap */
"call_pal %0\n" /* Magic system call instruction. */
/* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
@@ -235,8 +234,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
"jmp $31, %0" : : "i" (&__sigreturn));
/* NOTREACHED */
- asm volatile (".set reorder; .set at; .set macro");
-
return NULL;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a11dbdebf08a7d0afc1f4e43085b3aeaee07daf9
commit a11dbdebf08a7d0afc1f4e43085b3aeaee07daf9
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 8 19:45:02 1994 +0000
Rename variable `sp' to avoid conflict with #define in <mach/alpha/asm.h>.
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 52efb58..207fb58 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -25,9 +25,9 @@ Cambridge, MA 02139, USA. */
" br $27, 1f\n" /* Load GP from PC. */
"1: ldgp $29, 0($27)\n"
" jmp $26, _start0"); /* Jump to _start0; don't return. */
-#define START_ARGS char **sp
+#define START_ARGS char **sparg
#define SNARF_ARGS(argc, argv, envp) \
- (envp = &(argv = &sp[1])[(argc = *(int *) sp) + 1])
+ (envp = &(argv = &sparg[1])[(argc = *(int *) sparg) + 1])
#define CALL_WITH_SP(fn, sp) \
({ register long int __fn = fn, __sp = (long int) sp; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=89347dc3e90749f32e23baf13800b8c1c5484905
commit 89347dc3e90749f32e23baf13800b8c1c5484905
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 8 19:43:43 1994 +0000
Remove unused variable.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index 6ef718c..db6e873 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -167,7 +167,6 @@ __sigreturn (struct sigcontext *scp)
register const struct sigcontext *const scpreg asm ("$2") = scp;
register integer_t *usp asm ("$3") = scpreg->sc_regs[30];
register integer_t usp_align asm ("$4");
- register integer_t *sp asm ("$30");
/* Push an 8-word "trap frame" onto the user stack for `rei':
registers $2..$7, the PC, and the PSW. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5a8d8a2049dc9f61571d31cf95c1d04bc541cfeb
commit 5a8d8a2049dc9f61571d31cf95c1d04bc541cfeb
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 7 20:02:38 1994 +0000
Initial revision
diff --git a/sysdeps/mach/mips/Dist b/sysdeps/mach/mips/Dist
new file mode 100644
index 0000000..f2699bf
--- /dev/null
+++ b/sysdeps/mach/mips/Dist
@@ -0,0 +1 @@
+cacheflush.c
diff --git a/sysdeps/mach/mips/Makefile b/sysdeps/mach/mips/Makefile
new file mode 100644
index 0000000..a890ae7
--- /dev/null
+++ b/sysdeps/mach/mips/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),gnulib)
+sysdep_routines += cacheflush
+endif
diff --git a/sysdeps/mach/mips/cacheflush.c b/sysdeps/mach/mips/cacheflush.c
new file mode 100644
index 0000000..5325e6f
--- /dev/null
+++ b/sysdeps/mach/mips/cacheflush.c
@@ -0,0 +1,44 @@
+/* Flush the insn cache after GCC writes a closure on the stack. Mach/MIPS.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <mach.h>
+#include <mach/vm_attributes.h>
+
+/* Stupid name, but this is what GCC generates (config/mips/mips.h). */
+void
+cacheflush (void *addr, size_t size, int flag)
+{
+ vm_machine_attribute_val_t val;
+
+ switch (flag)
+ {
+ case 0: /* ? */
+ val = MATTR_VAL_DCACHE_FLUSH;
+ case 1: /* This is the only value GCC uses. */
+ val = MATTR_VAL_ICACHE_FLUSH;
+ break;
+ default:
+ val = MATTR_VAL_CACHE_FLUSH;
+ }
+
+ __vm_machine_attribute (__mach_task_self (),
+ (vm_address_t) addr, size,
+ MATTR_CACHE,
+ &val);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ccd1325bd5bdf9cccae2e8c10d2f756a02d3d777
commit ccd1325bd5bdf9cccae2e8c10d2f756a02d3d777
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 5 17:57:43 1994 +0000
Use ENV[0].__jmpbuf[0].
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ts.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
index 8ee2b9a..ad6f80c 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ts.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -29,13 +29,13 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
{
struct alpha_thread_state *ts = state;
- ts->r9 = env[0].__9;
- ts->r11 = env[0].__11;
- ts->r12 = env[0].__12;
- ts->r13 = env[0].__13;
- ts->r14 = env[0].__14;
- ts->r15 = (long int) env[0].__fp;
- ts->r30 = (long int) env[0].__sp;
- ts->pc = (long int) env[0].__pc;
+ ts->r9 = env[0].__jmpbuf[0].__9;
+ ts->r11 = env[0].__jmpbuf[0].__11;
+ ts->r12 = env[0].__jmpbuf[0].__12;
+ ts->r13 = env[0].__jmpbuf[0].__13;
+ ts->r14 = env[0].__jmpbuf[0].__14;
+ ts->r15 = (long int) env[0].__jmpbuf[0].__fp;
+ ts->r30 = (long int) env[0].__jmpbuf[0].__sp;
+ ts->pc = (long int) env[0].__jmpbuf[0].__pc;
ts->r0 = val ?: 1;
}
diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c
index ebf56bd..980a2ce 100644
--- a/sysdeps/mach/hurd/mips/longjmp-ts.c
+++ b/sysdeps/mach/hurd/mips/longjmp-ts.c
@@ -29,17 +29,17 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
{
struct mips_thread_state *ts = state;
- ts->r16 = env[0].__jmpbuf.__regs[0];
- ts->r17 = env[0].__jmpbuf.__regs[1];
- ts->r18 = env[0].__jmpbuf.__regs[2];
- ts->r19 = env[0].__jmpbuf.__regs[3];
- ts->r20 = env[0].__jmpbuf.__regs[4];
- ts->r21 = env[0].__jmpbuf.__regs[5];
- ts->r22 = env[0].__jmpbuf.__regs[6];
- ts->r23 = env[0].__jmpbuf.__regs[7];
- ts->r28 = (int) env[0].__jmpbuf.__gp;
- ts->r29 = (int) env[0].__jmpbuf.__sp;
- ts->r30 = (int) env[0].__jmpbuf.__fp;
- ts->pc = (int) env[0].__jmpbuf.__pc;
+ ts->r16 = env[0].__jmpbuf[0].__regs[0];
+ ts->r17 = env[0].__jmpbuf[0].__regs[1];
+ ts->r18 = env[0].__jmpbuf[0].__regs[2];
+ ts->r19 = env[0].__jmpbuf[0].__regs[3];
+ ts->r20 = env[0].__jmpbuf[0].__regs[4];
+ ts->r21 = env[0].__jmpbuf[0].__regs[5];
+ ts->r22 = env[0].__jmpbuf[0].__regs[6];
+ ts->r23 = env[0].__jmpbuf[0].__regs[7];
+ ts->r28 = (int) env[0].__jmpbuf[0].__gp;
+ ts->r29 = (int) env[0].__jmpbuf[0].__sp;
+ ts->r30 = (int) env[0].__jmpbuf[0].__fp;
+ ts->pc = (int) env[0].__jmpbuf[0].__pc;
ts->r2 = val ?: 1;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=69edd206e9deff9add4cc1442cd31db2388e9ced
commit 69edd206e9deff9add4cc1442cd31db2388e9ced
Author: Roland McGrath <roland@gnu.org>
Date: Mon Dec 5 17:55:41 1994 +0000
Use ENV[0].__jmpbuf.
diff --git a/sysdeps/mach/hurd/mips/longjmp-ts.c b/sysdeps/mach/hurd/mips/longjmp-ts.c
index e60fdb7..ebf56bd 100644
--- a/sysdeps/mach/hurd/mips/longjmp-ts.c
+++ b/sysdeps/mach/hurd/mips/longjmp-ts.c
@@ -29,17 +29,17 @@ _hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
{
struct mips_thread_state *ts = state;
- ts->r16 = env[0].__regs[0];
- ts->r17 = env[0].__regs[1];
- ts->r18 = env[0].__regs[2];
- ts->r19 = env[0].__regs[3];
- ts->r20 = env[0].__regs[4];
- ts->r21 = env[0].__regs[5];
- ts->r22 = env[0].__regs[6];
- ts->r23 = env[0].__regs[7];
- ts->r28 = (int) env[0].__gp;
- ts->r29 = (int) env[0].__sp;
- ts->r30 = (int) env[0].__fp;
- ts->pc = (int) env[0].__pc;
+ ts->r16 = env[0].__jmpbuf.__regs[0];
+ ts->r17 = env[0].__jmpbuf.__regs[1];
+ ts->r18 = env[0].__jmpbuf.__regs[2];
+ ts->r19 = env[0].__jmpbuf.__regs[3];
+ ts->r20 = env[0].__jmpbuf.__regs[4];
+ ts->r21 = env[0].__jmpbuf.__regs[5];
+ ts->r22 = env[0].__jmpbuf.__regs[6];
+ ts->r23 = env[0].__jmpbuf.__regs[7];
+ ts->r28 = (int) env[0].__jmpbuf.__gp;
+ ts->r29 = (int) env[0].__jmpbuf.__sp;
+ ts->r30 = (int) env[0].__jmpbuf.__fp;
+ ts->pc = (int) env[0].__jmpbuf.__pc;
ts->r2 = val ?: 1;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2782be74517b3cbf69c3d1206d23365bcdc9b04d
commit 2782be74517b3cbf69c3d1206d23365bcdc9b04d
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 19:08:38 1994 +0000
Use `movel' for pushes and pops.
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
index 5525534..a0b6393 100644
--- a/sysdeps/m68k/bsd-_setjmp.S
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -26,14 +26,17 @@ Cambridge, MA 02139, USA. */
#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
-#define popl pop.l
-#define pushl push.l
+#define PUSH(reg) move.l reg, -(%esp)
+#define POP(reg) move.l (%esp)+, reg
+#else
+#define PUSH(reg) movel reg, sp@-
+#define POP(reg) movel sp@+, reg
#endif
ENTRY (_setjmp)
- popl d0 /* Pop return PC. */
- popl d1 /* Pop jmp_buf argument. */
- pushl #0 /* Push second argument of zero. */
- pushl d1 /* Push back first argument. */
- pushl d0 /* Push back return PC. */
+ POP (d0) /* Pop return PC. */
+ POP (d1) /* Pop jmp_buf argument. */
+ PUSH (#0) /* Push second argument of zero. */
+ PUSH (d1) /* Push back first argument. */
+ PUSH (d0) /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
index 52c8e2b..d218b44 100644
--- a/sysdeps/m68k/bsd-setjmp.S
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -26,14 +26,17 @@ Cambridge, MA 02139, USA. */
#ifdef MOTOROLA_SYNTAX
#define d0 %d0
#define d1 %d1
-#define popl pop.l
-#define pushl push.l
+#define PUSH(reg) move.l reg, -(%esp)
+#define POP(reg) move.l (%esp)+, reg
+#else
+#define PUSH(reg) movel reg, sp@-
+#define POP(reg) movel sp@+, reg
#endif
ENTRY (setjmp)
- popl d0 /* Pop return PC. */
- popl d1 /* Pop jmp_buf argument. */
- pushl #1 /* Push second argument of one. */
- pushl d1 /* Push back first argument. */
- pushl d0 /* Push back return PC. */
+ POP (d0) /* Pop return PC. */
+ POP (d1) /* Pop jmp_buf argument. */
+ PUSH (#1) /* Push second argument of one. */
+ PUSH (d1) /* Push back first argument. */
+ PUSH (d0) /* Push back return PC. */
jmp C_SYMBOL_NAME (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb6741dde4ca67c91c3ceab894953e236d750ea3
commit eb6741dde4ca67c91c3ceab894953e236d750ea3
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 19:06:52 1994 +0000
(__sigsetjmp): Fix typo.
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 333c2fa..853977e 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -26,7 +26,7 @@ __sigsetjmp (jmp_buf env, int savemask)
asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0]));
/* Save return address in place of register A0. */
- env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
+ env[0].__jmpbuf[0].__aregs[0] = ((void **) &env)[-1];
/* Save address registers A1 through A5. */
asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1]));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=29031a89a27e2637c419333632c36b6de5d5a6d7
commit 29031a89a27e2637c419333632c36b6de5d5a6d7
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 19:04:45 1994 +0000
Take arg of type __jmp_buf, not jmp_buf.
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index c90f408..19a2e26 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#ifndef __GNUC__
-#error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
-/*#include <setjmp.h>*/
-#include "jmp_buf.h"
-#define jmp_buf __jmp_buf
+/* Global register vars must come before any function defn. */
register long int
r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
@@ -36,13 +30,14 @@ register double
f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
#endif
-/* Jump to the position specified by ENV, causing the
- setjmp call there to return VAL, or 1 if VAL is 0.
+#include <setjmp.h>
- We declare this function to return an `int';
- in fact, the value being returned is going to the caller of setjmp. */
-volatile void
-__longjmp (const jmp_buf env, int val)
+
+/* Jump to the position specified by ENV, causing the
+ setjmp call there to return VAL, or 1 if VAL is 0. */
+__NORETURN
+void
+__longjmp (const __jmp_buf env, int val)
{
/* Restore the integer registers. */
r9 = env[0].__9;
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
index fadfae7..0ee040a 100644
--- a/sysdeps/vax/__longjmp.c
+++ b/sysdeps/vax/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
void
-DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val)
+DEFUN(__longjmp, (env, val), CONST __jmp_buf env AND int val)
{
register long int *fp asm("fp");
long int *regsave;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b0a51e539542cd5303361cbf9908b404ea4eb3cc
commit b0a51e539542cd5303361cbf9908b404ea4eb3cc
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:57:56 1994 +0000
(__longjmp): Make arg const.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 7872817..10e1705 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
void
-__longjmp (__jmp_buf env, int val)
+__longjmp (const __jmp_buf env, int val)
{
/* This restores the FP and SP that setjmp's caller had,
and puts the return address into A0 and VAL into D0. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60074b22a2931c8ef5e25f56b0f250744ee65a49
commit 60074b22a2931c8ef5e25f56b0f250744ee65a49
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:56:14 1994 +0000
(__longjmp): Take arg of type __jmp_buf, not jmp_buf.
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 3133e70..7872817 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,19 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
#include <stdlib.h>
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
void
-DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val)
+__longjmp (__jmp_buf env, int val)
{
/* This restores the FP and SP that setjmp's caller had,
and puts the return address into A0 and VAL into D0. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b743d860e89c57c4a2f36dff7296a125665e41f
commit 5b743d860e89c57c4a2f36dff7296a125665e41f
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:51:22 1994 +0000
Set members in ENV[0].__jmpbuf[0], not ENV[0].
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index a3a71c1..9d711cb 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -25,11 +25,9 @@ int
__sigsetjmp (jmp_buf env, int savemask)
{
/* Save our caller's FP and PC. */
- asm ("movl 12(fp), %0" : "=g" (env[0].__fp));
- asm ("movl 16(fp), %0" : "=g" (env[0].__pc));
+ asm ("movl 12(fp), %0" : "=g" (env[0].__jmpbuf[0].__fp));
+ asm ("movl 16(fp), %0" : "=g" (env[0].__jmpbuf[0].__pc));
/* Save the signal mask if requested. */
- __sigjmp_save (env, savemask);
-
- return 0;
+ return __sigjmp_save (env, savemask);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd339eecd8ea8df9224ce380c3fbc791d4eb4379
commit fd339eecd8ea8df9224ce380c3fbc791d4eb4379
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:48:04 1994 +0000
(__sigsetjmp): That's __jmpbuf, not __jmp_buf.
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 75e0662..333c2fa 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -23,24 +23,24 @@ int
__sigsetjmp (jmp_buf env, int savemask)
{
/* Save data registers D1 through D7. */
- asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmp_buf[0].__dregs[0]));
+ asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmpbuf[0].__dregs[0]));
/* Save return address in place of register A0. */
env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
/* Save address registers A1 through A5. */
- asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmp_buf[0].__aregs[1]));
+ asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmpbuf[0].__aregs[1]));
/* Save caller's FP, not our own. */
- env[0].__jmp_buf[0].__fp = ((void **) &env)[-2];
+ env[0].__jmpbuf[0].__fp = ((void **) &env)[-2];
/* Save caller's SP, not our own. */
- env[0].__jmp_buf[0].__sp = (void *) &env;
+ env[0].__jmpbuf[0].__sp = (void *) &env;
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Save floating-point (68881) registers FP0 through FP7. */
asm volatile ("fmovem%.x fp0-fp7, %0"
- : : "m" (env[0].__jmp_buf[0].__fpregs[0]));
+ : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
#endif
/* Save the signal mask if requested. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4afe5be04199079b0f89b6a205e6ba2a4ada044c
commit 4afe5be04199079b0f89b6a205e6ba2a4ada044c
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:46:59 1994 +0000
Set members in ENV[0].__jmp_buf[0], not ENV[0].
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index acb831e..75e0662 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -23,27 +23,26 @@ int
__sigsetjmp (jmp_buf env, int savemask)
{
/* Save data registers D1 through D7. */
- asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0]));
+ asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__jmp_buf[0].__dregs[0]));
/* Save return address in place of register A0. */
- env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
+ env[0].__jmp_buf[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
/* Save address registers A1 through A5. */
- asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1]));
-
- /* Save the signal mask if requested. */
- __sigjmp_save (env, savemask);
+ asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__jmp_buf[0].__aregs[1]));
/* Save caller's FP, not our own. */
- env[0].__fp = (PTR) ((PTR *) &env)[-2];
+ env[0].__jmp_buf[0].__fp = ((void **) &env)[-2];
/* Save caller's SP, not our own. */
- env[0].__sp = (PTR) &env;
+ env[0].__jmp_buf[0].__sp = (void *) &env;
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Save floating-point (68881) registers FP0 through FP7. */
- asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs[0]));
+ asm volatile ("fmovem%.x fp0-fp7, %0"
+ : : "m" (env[0].__jmp_buf[0].__fpregs[0]));
#endif
- return 0;
+ /* Save the signal mask if requested. */
+ return __sigjmp_save (env, savemask);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65377bcaa1cc419d3c547dc7241acfc5313ccdbe
commit 65377bcaa1cc419d3c547dc7241acfc5313ccdbe
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:14:36 1994 +0000
Initial revision
diff --git a/sysdeps/alpha/bsd-_setjmp.S b/sysdeps/alpha/bsd-_setjmp.S
new file mode 100644
index 0000000..9947d8f
--- /dev/null
+++ b/sysdeps/alpha/bsd-_setjmp.S
@@ -0,0 +1,30 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ lda $27, __sigsetjmp /* Load address to jump to. */
+ bis $31, $31, $17 /* Pass a second argument of zero. */
+ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ .end setjmp
diff --git a/sysdeps/alpha/bsd-setjmp.S b/sysdeps/alpha/bsd-setjmp.S
new file mode 100644
index 0000000..b6f00ce
--- /dev/null
+++ b/sysdeps/alpha/bsd-setjmp.S
@@ -0,0 +1,30 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ lda $27, __sigsetjmp /* Load address to jump to. */
+ bis 1, $31, $17 /* Pass a second argument of one. */
+ jmp $31, ($27), __sigsetjmp /* Call __sigsetjmp. */
+ .end setjmp
diff --git a/sysdeps/m68k/bsd-_setjmp.S b/sysdeps/m68k/bsd-_setjmp.S
new file mode 100644
index 0000000..5525534
--- /dev/null
+++ b/sysdeps/m68k/bsd-_setjmp.S
@@ -0,0 +1,39 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. m68k version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+#ifdef MOTOROLA_SYNTAX
+#define d0 %d0
+#define d1 %d1
+#define popl pop.l
+#define pushl push.l
+#endif
+
+ENTRY (_setjmp)
+ popl d0 /* Pop return PC. */
+ popl d1 /* Pop jmp_buf argument. */
+ pushl #0 /* Push second argument of zero. */
+ pushl d1 /* Push back first argument. */
+ pushl d0 /* Push back return PC. */
+ jmp C_SYMBOL_NAME (__sigsetjmp)
diff --git a/sysdeps/m68k/bsd-setjmp.S b/sysdeps/m68k/bsd-setjmp.S
new file mode 100644
index 0000000..52c8e2b
--- /dev/null
+++ b/sysdeps/m68k/bsd-setjmp.S
@@ -0,0 +1,39 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. m68k version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+#ifdef MOTOROLA_SYNTAX
+#define d0 %d0
+#define d1 %d1
+#define popl pop.l
+#define pushl push.l
+#endif
+
+ENTRY (setjmp)
+ popl d0 /* Pop return PC. */
+ popl d1 /* Pop jmp_buf argument. */
+ pushl #1 /* Push second argument of one. */
+ pushl d1 /* Push back first argument. */
+ pushl d0 /* Push back return PC. */
+ jmp C_SYMBOL_NAME (__sigsetjmp)
diff --git a/sysdeps/mips/bsd-_setjmp.S b/sysdeps/mips/bsd-_setjmp.S
new file mode 100644
index 0000000..b0f2e8d
--- /dev/null
+++ b/sysdeps/mips/bsd-_setjmp.S
@@ -0,0 +1,28 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ j C_SYMBOL_NAME (__sigsetjmp)
+ move a1, zero /* Pass a second argument of zero. */
diff --git a/sysdeps/mips/bsd-setjmp.S b/sysdeps/mips/bsd-setjmp.S
new file mode 100644
index 0000000..103edd3
--- /dev/null
+++ b/sysdeps/mips/bsd-setjmp.S
@@ -0,0 +1,28 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ j C_SYMBOL_NAME (__sigsetjmp)
+ move a1, 1 /* Pass a second argument of one. */
diff --git a/sysdeps/vax/bsd-_setjmp.S b/sysdeps/vax/bsd-_setjmp.S
new file mode 100644
index 0000000..039fd71
--- /dev/null
+++ b/sysdeps/vax/bsd-_setjmp.S
@@ -0,0 +1,32 @@
+/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. Vax version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ popl r0 /* Pop return PC. */
+ popl r1 /* Pop jmp_buf argument. */
+ pushl $0 /* Push second argument of zero. */
+ pushl r1 /* Push back first argument. */
+ pushl r0 /* Push back return PC. */
+ jmp C_SYMBOL_NAME (__sigsetjmp)
diff --git a/sysdeps/vax/bsd-setjmp.S b/sysdeps/vax/bsd-setjmp.S
new file mode 100644
index 0000000..379a65c
--- /dev/null
+++ b/sysdeps/vax/bsd-setjmp.S
@@ -0,0 +1,32 @@
+/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Vax version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
+ We cannot do it in C because it must be a tail-call, so frame-unwinding
+ in setjmp doesn't clobber the state restored by longjmp. */
+
+#include <sysdep.h>
+
+ENTRY (setjmp)
+ popl r0 /* Pop return PC. */
+ popl r1 /* Pop jmp_buf argument. */
+ pushl $1 /* Push second argument of one. */
+ pushl r1 /* Push back first argument. */
+ pushl r0 /* Push back return PC. */
+ jmp C_SYMBOL_NAME (__sigsetjmp)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=97f187ac88943a87b582507495f1f9e9b9334b51
commit 97f187ac88943a87b582507495f1f9e9b9334b51
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:10:46 1994 +0000
Pass SP and FP as 3rd and 4th args, not 2nd and 3rd.
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index fc61e34..b3c0247 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -22,10 +22,10 @@ Cambridge, MA 02139, USA. */
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
ENTRY (__sigsetjmp)
- move a1, sp
+ move a2, sp
#ifdef __sgi__
- move a2, fp
+ move a3, fp
#else
- move a2, $fp
+ move a3, $fp
#endif
j __sigsetjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=876f191f7f9a7380a53bf0262ed7b5140df0523a
commit 876f191f7f9a7380a53bf0262ed7b5140df0523a
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:09:25 1994 +0000
Pass FP and SP as 3rd and 4th args, not 2nd and 3rd.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 50d75ff..08932cc 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__sigsetjmp)
lda $27, __sigsetjmp_aux/* Load address to jump to. */
- bis $15, $15, $17 /* Pass FP as 2nd arg. */
- bis $30, $30, $18 /* Pass SP as 3nd arg. */
+ bis $15, $15, $18 /* Pass FP as 3rd arg. */
+ bis $30, $30, $19 /* Pass SP as 4th arg. */
jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
.end __sigsetjmp
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3adc78aced7e0a3caf6c5521a5737f39df3af8c1
commit 3adc78aced7e0a3caf6c5521a5737f39df3af8c1
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:08:19 1994 +0000
Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save.
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
index 9a67a6b..031c5a5 100644
--- a/sysdeps/alpha/setjmp_aux.c
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/*#include <setjmp.h>*/
-#include "jmp_buf.h"
-#define jmp_buf __jmp_buf
-
-#ifndef __GNUC__
-#error This file uses GNU C extensions; you must compile with GCC.
-#endif
+/* Global register decls must come before any function defn. */
register long int
r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
@@ -36,9 +30,13 @@ register double
f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
#endif
+
+#include <setjmp.h>
+
+
/* Save the current program position in ENV and return 0. */
int
-__setjmp_aux (jmp_buf env, long int *sp, long int *fp)
+__sigsetjmp_aux (sigjmp_buf env, int savemask, long int *sp, long int *fp)
{
/* Save the integer registers. */
env[0].__9 = r9;
@@ -63,11 +61,14 @@ __setjmp_aux (jmp_buf env, long int *sp, long int *fp)
/* Save the return address of our caller, where longjmp will jump to. */
env[0].__pc = retpc;
- /* Save the FP and SP of our caller. The __setjmp entry point
- simply puts these in the argument register for us to fetch. */
+ /* Save the FP and SP of our caller. The __sigsetjmp entry point
+ simply puts these in the argument registers for us to fetch. */
env[0].__fp = fp;
env[0].__sp = sp;
- /* Return to the original caller of __setjmp. */
+ /* Save the signal mask if requested. */
+ __sigjmp_save (env, savemask);
+
+ /* Return to the original caller of __sigsetjmp. */
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5eb42c5555850c121b614c3433916b6dff0b2c3
commit e5eb42c5555850c121b614c3433916b6dff0b2c3
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:07:13 1994 +0000
Implement __sigsetjmp instead of __setjmp; call __sigsetjmp_aux instead of
__setjmp_aux.
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index 3880d0f..50d75ff 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,12 +18,12 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-/* The function __setjmp_aux saves all the registers, but it can't
+/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
-ENTRY (__setjmp)
- lda $27, __setjmp_aux /* Load address to jump to. */
+ENTRY (__sigsetjmp)
+ lda $27, __sigsetjmp_aux/* Load address to jump to. */
bis $15, $15, $17 /* Pass FP as 2nd arg. */
bis $30, $30, $18 /* Pass SP as 3nd arg. */
- jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */
- .end __setjmp
+ jmp $31, ($27), __sigsetjmp_aux /* Call __sigsetjmp_aux. */
+ .end __sigsetjmp
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 485811e..fc61e34 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -18,15 +18,14 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-/* The function __setjmp_aux saves all the registers, but it can't
+/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
-ENTRY (__setjmp)
+ENTRY (__sigsetjmp)
move a1, sp
#ifdef __sgi__
move a2, fp
#else
move a2, $fp
#endif
- j __setjmp_aux
-
+ j __sigsetjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0df328ab41f20c4bffd03c911703907e04ddf608
commit 0df328ab41f20c4bffd03c911703907e04ddf608
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:00:48 1994 +0000
Comment fix.
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index 3d0ea14..ee2d209 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */
#include <setjmp.h>
/* This function is only called via the assembly language routine
- __setjmp, which arranges to pass in the stack pointer and the frame
+ __sigsetjmp, which arranges to pass in the stack pointer and the frame
pointer. We do things this way because it's difficult to reliably
access them in C. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=75ab5314ea5afee291baaca0fa3a5d309cd0c6a6
commit 75ab5314ea5afee291baaca0fa3a5d309cd0c6a6
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 18:00:25 1994 +0000
Implement __sigsetjmp_aux instead of __setjmp_aux; call __sigjmp_save.
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index 3a3ed20..3d0ea14 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -16,20 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
/* This function is only called via the assembly language routine
__setjmp, which arranges to pass in the stack pointer and the frame
pointer. We do things this way because it's difficult to reliably
access them in C. */
int
-DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp)
+__sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
{
/* Store the floating point callee-saved registers... */
asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0]));
@@ -62,8 +57,10 @@ DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp)
asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7]));
/* .. and finally get and reconstruct the floating point csr. */
- asm volatile ("cfc1 $2, $31");
- asm volatile ("sw $2, %0" : : "m" (env[0].__fpc_csr));
+ asm ("cfc1 %0, $31" : "=r" (env[0].__fpc_csr));
+
+ /* Save the signal mask if requested. */
+ __sigjmp_save (env, savemask);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f58923f3c7fc2cb0dc823f3cf1c55773f759318
commit 1f58923f3c7fc2cb0dc823f3cf1c55773f759318
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 4 17:53:34 1994 +0000
Implement __sigsetjmp instead of __setjmp; call __sigjmp_save.
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 66695b8..acb831e 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,27 +16,23 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
-
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
-
/* Save the current program position in ENV and return 0. */
int
-DEFUN(__setjmp, (env), jmp_buf env)
+__sigsetjmp (jmp_buf env, int savemask)
{
/* Save data registers D1 through D7. */
- asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0]));
+ asm volatile ("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0]));
/* Save return address in place of register A0. */
env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
/* Save address registers A1 through A5. */
- asm volatile("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1]));
+ asm volatile ("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1]));
+
+ /* Save the signal mask if requested. */
+ __sigjmp_save (env, savemask);
/* Save caller's FP, not our own. */
env[0].__fp = (PTR) ((PTR *) &env)[-2];
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index 0124ae3..a3a71c1 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
@@ -17,21 +17,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <setjmp.h>
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
/* Save the current program position in ENV and return 0. */
int
-DEFUN(__setjmp, (env), jmp_buf env)
+__sigsetjmp (jmp_buf env, int savemask)
{
/* Save our caller's FP and PC. */
- asm("movl 12(fp), %0" : "=g" (env[0].__fp));
- asm("movl 16(fp), %0" : "=g" (env[0].__pc));
+ asm ("movl 12(fp), %0" : "=g" (env[0].__fp));
+ asm ("movl 16(fp), %0" : "=g" (env[0].__pc));
+
+ /* Save the signal mask if requested. */
+ __sigjmp_save (env, savemask);
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c87d70ba0acb34548c43934949306b684c98938
commit 5c87d70ba0acb34548c43934949306b684c98938
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 3 14:00:08 1994 +0000
Set up frame for `rei' to restore on user stack, aligned to an 8-word
boundary and with a PS value that restores user's stack alignment.
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
index 37f36b6..6ef718c 100644
--- a/sysdeps/mach/hurd/alpha/sigreturn.c
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -154,18 +154,54 @@ __sigreturn (struct sigcontext *scp)
/* Load all the registers from the sigcontext. */
#define restore_gpr(n) \
- asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_gpr[n]))
+ asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_regs[n]))
{
- /* The `rei' PAL pseudo-instruction restores registers $2..$7,
- the PC and processor status. So we can use these few registers
- for our working variables. */
+ /* The `rei' PAL pseudo-instruction restores registers $2..$7, the PC
+ and processor status. So we can use these few registers for our
+ working variables. Unfortunately, it finds its data on the stack
+ and merely pops the SP ($30) over the words of state restored,
+ allowing no other option for the new SP value. So we must push the
+ registers and PSW it will to restore, onto the user's stack and let
+ it pop them from there. */
register const struct sigcontext *const scpreg asm ("$2") = scp;
- register long int *sp asm ("$30");
+ register integer_t *usp asm ("$3") = scpreg->sc_regs[30];
+ register integer_t usp_align asm ("$4");
+ register integer_t *sp asm ("$30");
+
+ /* Push an 8-word "trap frame" onto the user stack for `rei':
+ registers $2..$7, the PC, and the PSW. */
+
+ register struct rei_frame
+ {
+ integer_t regs[5], pc, ps;
+ } *rei_frame asm ("$5");
+
+ usp -= 8;
+ /* `rei' demands that the stack be aligned to a 64 byte (8 word)
+ boundary; bits 61..56 of the PSW are OR'd back into the SP value
+ after popping the 8-word trap frame, so we store (sp % 64)
+ there and this restores the original user SP. */
+ usp_align = (integer_t) usp & 63L;
+ rei_frame = (void *) ((integer_t) usp & ~63L);
+
+ /* Copy the registers and PC from the sigcontext. */
+ memcpy (rei_frame->regs, &scpreg->sc_regs[2], sizeof rei_frame->regs);
+ rei_frame->pc = scpreg->sc_pc;
+
+ /* Compute the new PS value to be restored. `rei' adds the value at
+ bits 61..56 to the SP to compensate for the alignment above that
+ cleared the low 6 bits; bits 5..3 are the new mode/privilege level
+ (must be >= current mode; 3 == user mode); bits 2..0 are "software",
+ unused by the processor or kernel (XXX should trampoline save these?
+ How?); in user mode, `rei' demands that all other bits be zero. */
+ rei_frame->ps = (usp_align << 56) | (3 << 3); /* XXX low 3 bits??? */
asm volatile (".set noreorder; .set noat;");
- /* Restore the other general registers. */
+ /* Restore the other general registers: everything except $2..$7, which
+ are in the `rei' trap frame we set up above, and $30, which is the
+ SP which is popped by `rei'. */
restore_gpr (1);
restore_gpr (8);
restore_gpr (9);
@@ -189,30 +225,14 @@ __sigreturn (struct sigcontext *scp)
restore_gpr (27);
restore_gpr (28);
restore_gpr (29);
- restore_gpr (30); /* Stack pointer. */
-
- /* The magical `rei' instruction looks at the SP ($30) for:
-
- sp--> t1 ($2)
- +0x8 t2 ($3)
- +0x10 t3 ($4)
- +0x18 t4 ($5)
- +0x20 t5 ($6)
- +0x28 t6 ($7)
- +0x30 PC
- +0x38 PS
-
- For the first six words, &scp->sc_regs[2] already looks like this.
- So we clobber the following words words where $8 and $9 were saved
- (we already restored them above) with the PC and PS to be restored,
- and then point the SP there. */
-
- scpreg->sc_regs[8] = scpreg->sc_pc;
- /* scpreg->sc_regs[9] = scpreg->sc_ps; XXX where to get it from??? */
-
- /* XXX What will restore the user's SP??? */
- sp = &scpreg->sc_regs[2];
- asm volatile ("call_pal %0" : : "i" (op_rei));
+
+ /* Switch the stack pointer to the trap frame set up on
+ the user stack and do the magical `rei' PAL call. */
+ asm volatile ("mov %0, $30\n"
+ "call_pal %0"
+ : : "r" (rei_frame), "i" (op_rei));
+ /* Firewall. */
+ asm volatile ("call_pal %0" : : "i" (op_halt));
asm volatile (".set reorder; .set at;");
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39edbfd9c8e84e0fe2a700c932dc48b0cdfc70a2
commit 39edbfd9c8e84e0fe2a700c932dc48b0cdfc70a2
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 3 13:57:03 1994 +0000
(sigcontext
): Fixed typo.
diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h
index 85feda2..32e0c94 100644
--- a/sysdeps/mach/hurd/alpha/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/sigcontext.h
@@ -50,7 +50,7 @@ struct sigcontext
long int sc_regs[31]; /* General registers $0..$30. */
long int sc_pc; /* Program counter. */
- /* struct mips_exc_state */
+ /* struct alpha_exc_state */
#define sc_alpha_exc_state sc_badvaddr
unsigned long int sc_badvaddr;
unsigned int sc_cause; /* Machine-level trap code. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2d635a9db4f100676e8224a82d5c5db0ac57c31
commit d2d635a9db4f100676e8224a82d5c5db0ac57c31
Author: Roland McGrath <roland@gnu.org>
Date: Sat Dec 3 00:31:14 1994 +0000
Fix typo `.global' to `.globl'.
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index 17ae6e7..f5453da 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.global C_SYMBOL_NAME(__sigreturn)
+.globl C_SYMBOL_NAME(__sigreturn)
ENTRY (__sigaction)
movl $C_SYMBOL_NAME(__sigreturn), %ecx
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=239291e1db1333a99d06d58965144436d7816948
commit 239291e1db1333a99d06d58965144436d7816948
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 22 22:29:25 1994 +0000
(struct sigcontext): Use `__sigset_t' instead of `sigset_t' for `sc_mask'.
diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h
index 2f8dee8..85feda2 100644
--- a/sysdeps/mach/hurd/alpha/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/sigcontext.h
@@ -26,7 +26,7 @@ struct sigcontext
/* These first members are machine-independent. */
long int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
/* MiG reply port this thread is using. */
unsigned long int sc_reply_port;
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index 3792236..81d1f25 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -25,7 +25,7 @@ struct sigcontext
/* These first members are machine-independent. */
int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
+ __sigset_t sc_mask; /* Blocked signals to restore. */
/* MiG reply port this thread is using. */
unsigned int sc_reply_port;
diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h
index 926c44f..471b516 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/m68k/sigcontext.h
@@ -1,5 +1,5 @@
/* Structure describing state saved while handling a signal. Sun 3 version.
-Copyright (C) 1993 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
struct sigcontext
{
int sc_onstack;
- sigset_t sc_mask;
+ __sigset_t sc_mask;
int sc_sp, sc_pc, sc_ps;
};
diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
index 4834f2f..290bf81 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
@@ -1,5 +1,5 @@
/* Structure describing state saved while handling a signal. Sparc version.
-Copyright (C) 1992 Free Software Foundation, Inc.
+Copyright (C) 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
struct sigcontext
{
int sc_onstack;
- sigset_t sc_mask;
+ __sigset_t sc_mask;
#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
index 107d2fc..4bddcf2 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ struct sigcontext
int sc_onstack;
/* Signal mask to restore. */
- sigset_t sc_mask;
+ __sigset_t sc_mask;
/* Program counter when the signal hit. */
__ptr_t sc_pc;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e8a261b3fcf78bcce4e13092319bb81a9b9c7e4e
commit e8a261b3fcf78bcce4e13092319bb81a9b9c7e4e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 17 01:59:01 1994 +0000
[__motorola__]: Swap operands in cmp.l.
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index 95136bb..cef8990 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -26,7 +26,7 @@ syscall_error:
EWOULDBLOCK_sys is the original number. */
#ifdef __motorola__
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
- cmp.l d0, #EWOULDBLOCK_sys
+ cmp.l #EWOULDBLOCK_sys, d0
bne store
moveq.l #EAGAIN, d0
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cef89fdba9ac9b35d0666fc5bca905967084823f
commit cef89fdba9ac9b35d0666fc5bca905967084823f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 15 10:39:12 1994 +0000
Initial revision
diff --git a/sysdeps/mach/hurd/alpha/sigreturn.c b/sysdeps/mach/hurd/alpha/sigreturn.c
new file mode 100644
index 0000000..37f36b6
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/sigreturn.c
@@ -0,0 +1,222 @@
+/* Return from signal handler in GNU C library for Hurd. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Declare global register variables before any code. */
+register double f0 asm ("$f0");
+register double f1 asm ("$f1");
+register double f2 asm ("$f2");
+register double f3 asm ("$f3");
+register double f4 asm ("$f4");
+register double f5 asm ("$f5");
+register double f6 asm ("$f6");
+register double f7 asm ("$f7");
+register double f8 asm ("$f8");
+register double f9 asm ("$f9");
+register double f10 asm ("$f10");
+register double f11 asm ("$f11");
+register double f12 asm ("$f12");
+register double f13 asm ("$f13");
+register double f14 asm ("$f14");
+register double f15 asm ("$f15");
+register double f16 asm ("$f16");
+register double f17 asm ("$f17");
+register double f18 asm ("$f18");
+register double f19 asm ("$f19");
+register double f20 asm ("$f20");
+register double f21 asm ("$f21");
+register double f22 asm ("$f22");
+register double f23 asm ("$f23");
+register double f24 asm ("$f24");
+register double f25 asm ("$f25");
+register double f26 asm ("$f26");
+register double f27 asm ("$f27");
+register double f28 asm ("$f28");
+register double f29 asm ("$f29");
+register double f30 asm ("$f30");;
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <hurd/threadvar.h>
+#include <stdlib.h>
+
+int
+__sigreturn (struct sigcontext *scp)
+{
+ struct hurd_sigstate *ss;
+ mach_port_t *reply_port;
+
+ if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ ss = _hurd_self_sigstate (); /* SS->lock now locked. */
+
+ /* Restore the set of blocked signals, and the intr_port slot. */
+ ss->blocked = scp->sc_mask;
+ ss->intr_port = scp->sc_intr_port;
+
+ /* Check for pending signals that were blocked by the old set. */
+ if (ss->pending & ~ss->blocked)
+ {
+ /* There are pending signals that just became unblocked. Wake up the
+ signal thread to deliver them. But first, squirrel away SCP where
+ the signal thread will notice it if it runs another handler, and
+ arrange to have us called over again in the new reality. */
+ ss->context = scp;
+ /* Clear the intr_port slot, since we are not in fact doing
+ an interruptible RPC right now. If SS->intr_port is not null,
+ the SCP context is doing an interruptible RPC, but the signal
+ thread will examine us while we are blocked in the sig_post RPC. */
+ ss->intr_port = MACH_PORT_NULL;
+ __mutex_unlock (&ss->lock);
+ __sig_post (_hurd_msgport, 0, __mach_task_self ());
+ /* If a pending signal was handled, sig_post never returned. */
+ __mutex_lock (&ss->lock);
+ }
+
+ if (scp->sc_onstack)
+ {
+ ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
+ /* XXX cannot unlock until off sigstack */
+ abort ();
+ }
+ else
+ __mutex_unlock (&ss->lock);
+
+ /* Destroy the MiG reply port used by the signal handler, and restore the
+ reply port in use by the thread when interrupted. */
+ reply_port =
+ (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
+ if (*reply_port)
+ __mach_port_destroy (__mach_task_self (), *reply_port);
+ *reply_port = scp->sc_reply_port;
+
+ if (scp->sc_used_fpa)
+ {
+ /* Restore FPU state. */
+
+ /* Restore the floating-point control/status register.
+ We must do this first because the compiler will need
+ a temporary FP register for the load. */
+ asm volatile ("mt_fpcr %0" : : "f" (scp->sc_fpcsr));
+
+ /* Restore floating-point registers. */
+ f0 = scp->sc_fpregs[0];
+ f1 = scp->sc_fpregs[1];
+ f2 = scp->sc_fpregs[2];
+ f3 = scp->sc_fpregs[3];
+ f4 = scp->sc_fpregs[4];
+ f5 = scp->sc_fpregs[5];
+ f6 = scp->sc_fpregs[6];
+ f7 = scp->sc_fpregs[7];
+ f8 = scp->sc_fpregs[8];
+ f9 = scp->sc_fpregs[9];
+ f10 = scp->sc_fpregs[10];
+ f11 = scp->sc_fpregs[11];
+ f12 = scp->sc_fpregs[12];
+ f13 = scp->sc_fpregs[13];
+ f14 = scp->sc_fpregs[14];
+ f15 = scp->sc_fpregs[15];
+ f16 = scp->sc_fpregs[16];
+ f17 = scp->sc_fpregs[17];
+ f18 = scp->sc_fpregs[18];
+ f19 = scp->sc_fpregs[19];
+ f20 = scp->sc_fpregs[20];
+ f21 = scp->sc_fpregs[21];
+ f22 = scp->sc_fpregs[22];
+ f23 = scp->sc_fpregs[23];
+ f24 = scp->sc_fpregs[24];
+ f25 = scp->sc_fpregs[25];
+ f26 = scp->sc_fpregs[26];
+ f27 = scp->sc_fpregs[27];
+ f28 = scp->sc_fpregs[28];
+ f29 = scp->sc_fpregs[29];
+ f30 = scp->sc_fpregs[30];
+ }
+
+ /* Load all the registers from the sigcontext. */
+#define restore_gpr(n) \
+ asm volatile ("ldq $" #n ",%0" : : "m" (scpreg->sc_gpr[n]))
+
+ {
+ /* The `rei' PAL pseudo-instruction restores registers $2..$7,
+ the PC and processor status. So we can use these few registers
+ for our working variables. */
+ register const struct sigcontext *const scpreg asm ("$2") = scp;
+ register long int *sp asm ("$30");
+
+ asm volatile (".set noreorder; .set noat;");
+
+ /* Restore the other general registers. */
+ restore_gpr (1);
+ restore_gpr (8);
+ restore_gpr (9);
+ restore_gpr (10);
+ restore_gpr (11);
+ restore_gpr (12);
+ restore_gpr (13);
+ restore_gpr (14);
+ restore_gpr (15);
+ restore_gpr (16);
+ restore_gpr (17);
+ restore_gpr (18);
+ restore_gpr (19);
+ restore_gpr (20);
+ restore_gpr (21);
+ restore_gpr (22);
+ restore_gpr (23);
+ restore_gpr (24);
+ restore_gpr (25);
+ restore_gpr (26);
+ restore_gpr (27);
+ restore_gpr (28);
+ restore_gpr (29);
+ restore_gpr (30); /* Stack pointer. */
+
+ /* The magical `rei' instruction looks at the SP ($30) for:
+
+ sp--> t1 ($2)
+ +0x8 t2 ($3)
+ +0x10 t3 ($4)
+ +0x18 t4 ($5)
+ +0x20 t5 ($6)
+ +0x28 t6 ($7)
+ +0x30 PC
+ +0x38 PS
+
+ For the first six words, &scp->sc_regs[2] already looks like this.
+ So we clobber the following words words where $8 and $9 were saved
+ (we already restored them above) with the PC and PS to be restored,
+ and then point the SP there. */
+
+ scpreg->sc_regs[8] = scpreg->sc_pc;
+ /* scpreg->sc_regs[9] = scpreg->sc_ps; XXX where to get it from??? */
+
+ /* XXX What will restore the user's SP??? */
+ sp = &scpreg->sc_regs[2];
+ asm volatile ("call_pal %0" : : "i" (op_rei));
+
+ asm volatile (".set reorder; .set at;");
+ }
+
+ /* NOTREACHED */
+ return -1;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0044b03ec3f17547a87b4371e8e97260c9a83ea9
commit 0044b03ec3f17547a87b4371e8e97260c9a83ea9
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 15 07:01:18 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/Makefile b/sysdeps/unix/sysv/sysv4/Makefile
new file mode 100644
index 0000000..d44214b
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/Makefile
@@ -0,0 +1,37 @@
+# Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq ($(subdir),posix)
+
+sysdep_routines := $(sysdep_routines) sysconfig pgrpsys \
+ __getpgid __setpgid __waitid
+
+endif
+
+
+ifeq ($(subdir),signal)
+
+sysdep_routines := $(sysdep_routines) sys-sig
+
+endif
+
+ifeq ($(subdir),misc)
+
+sysdep_routines := $(sysdep_routines) sysinfo
+
+endif
diff --git a/sysdeps/unix/sysv/sysv4/__getpgid.c b/sysdeps/unix/sysv/sysv4/__getpgid.c
new file mode 100644
index 0000000..76a6e80
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/__getpgid.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+extern int __pgrpsys __P ((int type, ...));
+
+/* Get the process group ID of process PID. */
+int
+DEFUN(__getpgid, (pid), pid_t pid)
+{
+ return __pgrpsys (4, pid);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dae2877c9ec505d9ed260f824bd43da78bba8e06
commit dae2877c9ec505d9ed260f824bd43da78bba8e06
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 15 06:55:45 1994 +0000
(divrem rule): Make the output unwritable, use mv -f.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 5490776..4ea3894 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@zen.org).
# The GNU C Library is free software; you can redistribute it and/or
@@ -88,4 +88,6 @@ $(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)
define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\
/* This file is generated from divrem.m4; DO NOT EDIT! */"; \
cat $<) | $(M4) > $@-tmp
- mv $@-tmp $@
+# Make it unwritable so noone will edit it by mistake.
+ -chmod a-w $@-tmp
+ mv -f $@-tmp $@
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e576015fbb5d3d86dfec6c32e8d52a66e653b63
commit 8e576015fbb5d3d86dfec6c32e8d52a66e653b63
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 15 06:48:25 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index fa6a4a5..730439f 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -41,7 +41,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
int rpc_wait,
struct machine_thread_all_state *state)
{
-
__label__ trampoline, rpc_wait_trampoline;
void *sigsp;
struct sigcontext *scp;
diff --git a/sysdeps/standalone/i386/Dist b/sysdeps/standalone/i386/Dist
new file mode 100644
index 0000000..98d13be
--- /dev/null
+++ b/sysdeps/standalone/i386/Dist
@@ -0,0 +1 @@
+i386.h
diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c
index 46b5691..0d27218 100644
--- a/sysdeps/standalone/i386/force_cpu386/brdinit.c
+++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__i386.h"
+#include "i386.h"
/* _Board_Initialize()
diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c
index a9d05d3..5d56f76 100644
--- a/sysdeps/standalone/i386/force_cpu386/console.c
+++ b/sysdeps/standalone/i386/force_cpu386/console.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__i386.h"
+#include "i386.h"
/* Console IO routines for a FORCE CPU386 board. */
diff --git a/sysdeps/standalone/i386/i386.h b/sysdeps/standalone/i386/i386.h
new file mode 100644
index 0000000..8302773
--- /dev/null
+++ b/sysdeps/standalone/i386/i386.h
@@ -0,0 +1,327 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* i386.h
+ *
+ * This file contains macros which are used to access i80386
+ * registers which are not addressable by C. This file contains
+ * functions which are useful to those developing target
+ * specific support routines.
+ */
+
+#ifndef i386_h__
+#define i386_h__
+
+typedef unsigned char unsigned8;
+typedef unsigned short unsigned16;
+typedef unsigned int unsigned32;
+
+#define disable_intr( isrlevel ) \
+ { (isrlevel) = 0; \
+ asm volatile ( "pushf ; \
+ pop %0 ; \
+ cli " \
+ : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
+ }
+
+
+#define enable_intr( isrlevel ) \
+ { asm volatile ( "push %0 ; \
+ popf " \
+ : "=r" ((isrlevel)) : "0" ((isrlevel)) ); \
+ }
+
+#define delay( _microseconds ) \
+ { \
+ unsigned32 _counter; \
+ \
+ _counter = (_microseconds); \
+ \
+ asm volatile ( "0: nop;" \
+ " mov %0,%0 ;" \
+ " loop 0" : "=c" (_counter) \
+ : "0" (_counter) \
+ ); \
+ \
+ }
+
+/* segment access functions */
+
+static inline unsigned16 get_cs()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%cs,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+static inline unsigned16 get_ds()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%ds,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+static inline unsigned16 get_es()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%es,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+static inline unsigned16 get_ss()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%ss,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+static inline unsigned16 get_fs()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%fs,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+static inline unsigned16 get_gs()
+{
+ register unsigned16 segment = 0;
+
+ asm volatile ( "movw %%gs,%0" : "=r" (segment) : "0" (segment) );
+
+ return segment;
+}
+
+/* i80x86 I/O instructions */
+
+#define outport_byte( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned8 __value = _value; \
+ \
+ asm volatile ( "outb %0,%1" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ }
+
+#define outport_word( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned16 __value = _value; \
+ \
+ asm volatile ( "outw %0,%1" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ }
+
+#define outport_long( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned32 __value = _value; \
+ \
+ asm volatile ( "outl %0,%1" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ }
+
+#define inport_byte( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned8 __value = 0; \
+ \
+ asm volatile ( "inb %1,%0" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ _value = __value; \
+ }
+
+#define inport_word( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned16 __value = 0; \
+ \
+ asm volatile ( "inw %1,%0" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ _value = __value; \
+ }
+
+#define inport_long( _port, _value ) \
+ { register unsigned16 __port = _port; \
+ register unsigned32 __value = 0; \
+ \
+ asm volatile ( "inl %1,%0" : "=a" (__value), "=d" (__port) \
+ : "0" (__value), "1" (__port) \
+ ); \
+ _value = __value; \
+ }
+
+/* structures */
+
+/* See Chapter 5 - Memory Management in i386 manual */
+
+struct GDT_slot {
+ unsigned16 limit_0_15;
+ unsigned16 base_0_15;
+ unsigned8 base_16_23;
+ unsigned8 type_dt_dpl_p;
+ unsigned8 limit_16_19_granularity;
+ unsigned8 base_24_31;
+};
+
+/* See Chapter 9 - Exceptions and Interrupts in i386 manual
+ *
+ * NOTE: This is the IDT entry for interrupt gates ONLY.
+ */
+
+struct IDT_slot {
+ unsigned16 offset_0_15;
+ unsigned16 segment_selector;
+ unsigned8 reserved;
+ unsigned8 p_dpl;
+ unsigned16 offset_16_31;
+};
+
+struct DTR_load_save_format {
+ unsigned16 limit;
+ unsigned32 physical_address;
+};
+
+/* variables */
+
+extern struct IDT_slot Interrupt_descriptor_table[ 256 ];
+extern struct GDT_slot Global_descriptor_table[ 8192 ];
+
+/* functions */
+
+#ifdef CPU_INITIALIZE
+#define EXTERN
+#else
+#undef EXTERN
+#define EXTERN extern
+#endif
+
+void *Logical_to_physical(
+ unsigned16 segment,
+ void *address
+);
+
+void *Physical_to_logical(
+ unsigned16 segment,
+ void *address
+);
+
+/* complicated static inline functions */
+
+#define get_GDTR( _gdtr_address ) \
+ { \
+ void *_gdtr = (_gdtr_address); \
+ \
+ asm volatile( "sgdt (%0)" : "=r" (_gdtr) : "0" (_gdtr) ); \
+ }
+
+#define get_GDT_slot( _gdtr_base, _segment, _slot_address ) \
+ { \
+ register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \
+ register volatile void *_slot = (_slot_address); \
+ register unsigned32 _temporary = 0; \
+ \
+ asm volatile( "movl %%gs:(%0),%1 ; \
+ movl %1,(%2) ; \
+ movl %%gs:4(%0),%1 ; \
+ movl %1,4(%2)" \
+ : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
+ : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
+ ); \
+ }
+
+#define set_GDT_slot( _gdtr_base, _segment, _slot_address ) \
+ { \
+ register unsigned32 _gdt_slot = (_gdtr_base) + (_segment); \
+ register volatile void *_slot = (_slot_address); \
+ register unsigned32 _temporary = 0; \
+ \
+ asm volatile( "movl (%2),%1 ; \
+ movl %1,%%gs:(%0) ; \
+ movl 4(%2),%1 ; \
+ movl %1,%%gs:4(%0) \
+ " \
+ : "=r" (_gdt_slot), "=r" (_temporary), "=r" (_slot) \
+ : "0" (_gdt_slot), "1" (_temporary), "2" (_slot) \
+ ); \
+ }
+
+static inline void set_segment(
+ unsigned16 segment,
+ unsigned32 base,
+ unsigned32 limit
+)
+{
+ struct DTR_load_save_format gdtr;
+ volatile struct GDT_slot Gdt_slot;
+ volatile struct GDT_slot *gdt_slot = &Gdt_slot;
+ unsigned16 tmp_segment = 0;
+ unsigned32 limit_adjusted;
+
+
+ /* load physical address of the GDT */
+
+ get_GDTR( &gdtr );
+
+ gdt_slot->type_dt_dpl_p = 0x92; /* present, dpl=0, */
+ /* application=1, */
+ /* type=data read/write */
+ gdt_slot->limit_16_19_granularity = 0x40; /* 32 bit segment */
+
+ limit_adjusted = limit;
+ if ( limit > 4095 ) {
+ gdt_slot->limit_16_19_granularity |= 0x80; /* set granularity bit */
+ limit_adjusted /= 4096;
+ }
+
+ gdt_slot->limit_16_19_granularity |= (limit_adjusted >> 16) & 0xff;
+ gdt_slot->limit_0_15 = limit_adjusted & 0xffff;
+
+ gdt_slot->base_0_15 = base & 0xffff;
+ gdt_slot->base_16_23 = (base >> 16) & 0xff;
+ gdt_slot->base_24_31 = (base >> 24);
+
+ set_GDT_slot( gdtr.physical_address, segment, gdt_slot );
+
+ /* Now, reload all segment registers so the limit takes effect. */
+
+ asm volatile( "movw %%ds,%0 ; movw %0,%%ds
+ movw %%es,%0 ; movw %0,%%es
+ movw %%fs,%0 ; movw %0,%%fs
+ movw %%gs,%0 ; movw %0,%%gs
+ movw %%ss,%0 ; movw %0,%%ss"
+ : "=r" (tmp_segment)
+ : "0" (tmp_segment)
+ );
+
+}
+
+#endif
+/* end of include file */
diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c
index a59c97c..c16adcd 100644
--- a/sysdeps/standalone/i960/nindy960/brdinit.c
+++ b/sysdeps/standalone/i960/nindy960/brdinit.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__i960ca.h"
+#include "i960ca.h"
/* _Board_Initialize()
diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c
index fcdaade..8215144 100644
--- a/sysdeps/standalone/i960/nindy960/console.c
+++ b/sysdeps/standalone/i960/nindy960/console.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__i960ca.h"
+#include "i960ca.h"
/* Console IO routines for a NINDY960 board. */
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
index 2deecaa..d13b4d9 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <stdlib.h>
-#include "__m68020.h"
+#include "m68020.h"
/* Return control to 135Bug */
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
index 55c28d4..0c4801a 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__m68020.h"
+#include "m68020.h"
/* _Board_Initialize()
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c
index 7c1cd41..159070b 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/console.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <standalone.h>
-#include "__m68020.h"
+#include "m68020.h"
/* Console IO routines for a Motorola MVME135/MVME136 board.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac63472234644bc1eff9bcbc4841f343ead085a2
commit ac63472234644bc1eff9bcbc4841f343ead085a2
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 21:53:39 1994 +0000
(msync): Use __caddr_t instead of caddr_t in decl.
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 0e66416..727e665 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -95,7 +95,7 @@ int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
-int msync __P ((caddr_t __addr, size_t __len, int __flags));
+int msync __P ((__caddr_t __addr, size_t __len, int __flags));
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d99e5148d4530c59c9d6bfac4f7d34fd408f835
commit 7d99e5148d4530c59c9d6bfac4f7d34fd408f835
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 09:58:40 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/alpha/machine-lock.h b/sysdeps/mach/alpha/machine-lock.h
new file mode 100644
index 0000000..a73b9a0
--- /dev/null
+++ b/sysdeps/mach/alpha/machine-lock.h
@@ -0,0 +1,83 @@
+/* Machine-specific definition for spin locks. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _MACHINE_LOCK_H
+#define _MACHINE_LOCK_H
+
+/* The type of a spin lock variable. */
+
+typedef __volatile long int __spin_lock_t;
+
+/* Value to initialize `__spin_lock_t' variables to. */
+
+#define __SPIN_LOCK_INITIALIZER 0L
+
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+/* Unlock LOCK. */
+
+_EXTERN_INLINE void
+__spin_unlock (__spin_lock_t *__lock)
+{
+ __asm__ __volatile__ (".set noreorder\n"
+ "mb; stq $31, %0; mb\n"
+ ".set reorder"
+ : "=m" (__lock));
+}
+
+/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
+
+_EXTERN_INLINE int
+__spin_try_lock (register __spin_lock_t *__lock)
+{
+ register long int __rtn, __tmp;
+
+ do
+ {
+ __asm__ __volatile__ (".set noreorder\n"
+ /* %0 is TMP, %1 is RTN, %2 is LOCK. */
+ "mb; ldq_l %0,%2\n" /* Load lock into TMP. */
+ "or $31,2,%1\n" /* Locked value in RTN. */
+ ".set reorder"
+ : "=r" (__tmp), "=r" (__rtn) : "m" (__lock));
+ if (__tmp)
+ /* The lock is already taken. */
+ return 0;
+
+ /* The lock is not taken; try to get it now. */
+ __asm__ __volatile__ ("stq_c %0,%1" : "+r" (__rtn), "+m" (__lock));
+ /* RTN is clear if stq_c was interrupted; loop to try the lock again. */
+ } while (! __rtn);
+ /* RTN is now nonzero; we have the lock. */
+ return __rtn;
+}
+
+/* Return nonzero if LOCK is locked. */
+
+_EXTERN_INLINE int
+__spin_lock_locked (__spin_lock_t *__lock)
+{
+ return *__lock != 0;
+}
+
+
+#endif /* machine-lock.h */
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
index 9c54850..52efb58 100644
--- a/sysdeps/mach/alpha/sysdep.h
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,14 @@ Cambridge, MA 02139, USA. */
#define LOSE asm volatile ("call_pal 0") /* halt */
-/* XXX SNARF_ARGS */
+#define START_MACHDEP \
+ asm ("_start: mov $30, $16\n" /* Put initial SP in a0. */
+ " br $27, 1f\n" /* Load GP from PC. */
+ "1: ldgp $29, 0($27)\n"
+ " jmp $26, _start0"); /* Jump to _start0; don't return. */
+#define START_ARGS char **sp
+#define SNARF_ARGS(argc, argv, envp) \
+ (envp = &(argv = &sp[1])[(argc = *(int *) sp) + 1])
#define CALL_WITH_SP(fn, sp) \
({ register long int __fn = fn, __sp = (long int) sp; \
diff --git a/sysdeps/mach/hurd/alpha/exc2signal.c b/sysdeps/mach/hurd/alpha/exc2signal.c
new file mode 100644
index 0000000..c67c670
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/exc2signal.c
@@ -0,0 +1,76 @@
+/* Translate Mach exception codes into signal numbers. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <mach/exception.h>
+
+/* Translate the Mach exception codes, as received in an `exception_raise' RPC,
+ into a signal number and signal subcode. */
+
+void
+_hurd_exception2signal (int exception, int code, int subcode,
+ int *signo, int *sigcode, int *error)
+{
+ *error = 0;
+
+ switch (exception)
+ {
+ default:
+ *signo = SIGIOT;
+ *sigcode = exception;
+ break;
+
+ case EXC_BAD_ACCESS:
+ if (code == KERN_PROTECTION_FAILURE)
+ *signo = SIGSEGV;
+ else
+ *signo = SIGBUS;
+ *sigcode = subcode;
+ *error = code;
+ break;
+
+ case EXC_BAD_INSTRUCTION:
+ *signo = SIGILL;
+ *sigcode = code;
+ break;
+
+ case EXC_ARITHMETIC:
+ *signo = SIGFPE;
+ *sigcode = code;
+ break;
+ break;
+
+ case EXC_EMULATION:
+ /* 3.0 doesn't give this one, why, I don't know. */
+ *signo = SIGEMT;
+ *sigcode = code;
+ break;
+
+ case EXC_SOFTWARE:
+ *signo = SIGEMT;
+ *sigcode = code;
+ break;
+
+ case EXC_BREAKPOINT:
+ *signo = SIGTRAP;
+ *sigcode = code;
+ break;
+ }
+}
diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h
index 5767e8b..2f8dee8 100644
--- a/sysdeps/mach/hurd/alpha/sigcontext.h
+++ b/sysdeps/mach/hurd/alpha/sigcontext.h
@@ -25,14 +25,14 @@ struct sigcontext
{
/* These first members are machine-independent. */
- int sc_onstack; /* Nonzero if running on sigstack. */
+ long int sc_onstack; /* Nonzero if running on sigstack. */
sigset_t sc_mask; /* Blocked signals to restore. */
/* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
+ unsigned long int sc_reply_port;
/* Port this thread is doing an interruptible RPC on. */
- unsigned int sc_intr_port;
+ unsigned long int sc_intr_port;
/* Error code associated with this signal (interpreted as `error_t'). */
int sc_error;
@@ -41,16 +41,25 @@ struct sigcontext
structure is written to be laid out identically to:
{
struct alpha_thread_state basic;
+ struct alpha_exc_state exc;
struct alpha_float_state fpu;
}
trampoline.c knows this, so it must be changed if this changes. */
-#define sc_alpha_thread_state sc_gs /* Beginning of correspondence. */
+#define sc_alpha_thread_state sc_regs /* Beginning of correspondence. */
long int sc_regs[31]; /* General registers $0..$30. */
long int sc_pc; /* Program counter. */
- long int sc_ps; /* Processor status. */
- /* struct alpha_float_state */
+ /* struct mips_exc_state */
+#define sc_alpha_exc_state sc_badvaddr
+ unsigned long int sc_badvaddr;
+ unsigned int sc_cause; /* Machine-level trap code. */
+#define SC_CAUSE_SET_SSTEP 1
+ int sc_used_fpa; /* Nonzero if FPU was used. */
+
+ /* struct alpha_float_state
+ This is only filled in if sc_used_fpa is nonzero. */
#define sc_alpha_float_state sc_fpregs
- long int sc_fpregs[32]; /* Floating point registers $f0..$f31. */
+ double sc_fpregs[31]; /* Floating point registers $f0..$f30. */
+ long int sc_fpcsr; /* Floating point control/status register. */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18b0df639cea6905b235650bd7e31e5b2f540f61
commit 18b0df639cea6905b235650bd7e31e5b2f540f61
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 09:29:41 1994 +0000
Formerly ./mach/hurd/alpha/trampoline.c.~2~
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
index 575d88d..fa6a4a5 100644
--- a/sysdeps/mach/hurd/alpha/trampoline.c
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */
#include <hurd/signal.h>
#include "thread_state.h"
+#include <mach/machine/alpha_instruction.h>
struct mach_msg_trap_args
@@ -54,8 +55,10 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
{
memcpy (&state->basic, &ss->context->sc_alpha_thread_state,
sizeof (state->basic));
- state->set = (1 << ALPHA_THREAD_STATE);
- if (1) /* if fpu used XXX */
+ memcpy (&state->exc, &ss->context->sc_alpha_exc_state,
+ sizeof (state->exc));
+ state->set = (1 << ALPHA_THREAD_STATE) | (1 << ALPHA_EXC_STATE);
+ if (state->exc.used_fpa)
{
memcpy (&state->fpu, &ss->context->sc_alpha_float_state,
sizeof (state->fpu));
@@ -88,7 +91,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
per-thread variables, cthreads. */
}
else
- sigsp = (char *) state->basic.r29;
+ sigsp = (char *) state->basic.SP;
/* Set up the sigcontext structure on the stack. This is all the stack
needs, since the args are passed in registers (below). */
@@ -106,7 +109,14 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
memcpy (&scp->sc_alpha_thread_state,
&state->basic, sizeof (state->basic));
- if (1 && /* XXX fpu used */
+ /* struct sigcontext is laid out so that starting at sc_badvaddr
+ mimics a struct mips_exc_state. */
+ if (! machine_get_state (ss->thread, state, ALPHA_EXC_STATE,
+ &state->exc, &scp->sc_alpha_exc_state,
+ sizeof (state->exc)))
+ return NULL;
+
+ if (state->exc.used_fpa &&
/* struct sigcontext is laid out so that starting at sc_fpregs
mimics a struct alpha_float_state. This state
is only meaningful if the coprocessor was used. */
@@ -181,25 +191,27 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* This is the entry point when we have an RPC reply message to receive
before running the handler. The MACH_MSG_SEND bit has already been
cleared in the OPTION argument in our registers. For our convenience,
- $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */
+ at ($28) points to the sc_regs[0] member of the sigcontext (saved v0
+ ($0)). */
asm volatile
(".set noat; .set noreorder; .set nomacro\n"
/* Retry the interrupted mach_msg system call. */
- "ldiq $0, -25\n" /* mach_msg_trap */
- "call_pal PAL_callsys\n"
+ "lda $0, -25($31)\n" /* mach_msg_trap */
+ "call_pal %0\n" /* Magic system call instruction. */
/* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
now the message receive has completed and the original caller of
the RPC (i.e. the code running when the signal arrived) needs to
see the final return value of the message receive in v0. So
store the new v0 value into the sc_regs[0] member of the sigcontext
(whose address is in at to make this code simpler). */
- "stq v0, 0(at)\n"
+ "stq $0, 0($28)\n"
/* Since the argument registers needed to have the mach_msg_trap
arguments, we've stored the arguments to the handler function
in registers t8..t10 ($22..$24). */
- "mov t8, a0\n"
- "mov t9, a1\n"
- "mov t10, a2\n");
+ "mov $22, $16\n"
+ "mov $23, $17\n"
+ "mov $24, $18\n"
+ : : "i" (op_chmk));
trampoline:
/* Entry point for running the handler normally. The arguments to the
@@ -208,15 +220,20 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
a0 SIGNO
a1 SIGCODE
a2 SCP
- */
+
+ t12 also contains SCP; this value is callee-saved (and so should not get
+ clobbered by running the handler). We use this saved value to pass to
+ __sigreturn, so the handler can clobber the argument registers if it
+ likes. */
asm volatile
- ("br at, 0f;0: ldgp gp, 0(at)\n" /* Reset GP (???). */
- /* Call the handler function. */
- "jsr ra, ra; ldgp gp, 0(ra)\n"
+ (/* Call the handler function, saving return address in ra ($26). */
+ "jsr $26, $26\n"
+ /* Reset gp ($29) from the return address (here) in ra ($26).
+ This may be required to locate __sigreturn. */
+ "ldgp $29, 0($26)\n"
/* Call __sigreturn (SCP); this cannot return. */
- "mov t12, a0\n"
- "jsr ra, %0; ldgp gp, 0(ra)\n"
- : : "i" (&__sigreturn));
+ "mov $27, $16\n" /* Move saved SCP to argument register. */
+ "jmp $31, %0" : : "i" (&__sigreturn));
/* NOTREACHED */
asm volatile (".set reorder; .set at; .set macro");
@@ -225,7 +242,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
}
/* STATE describes a thread that had intr_port set (meaning it was inside
- HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
+ HURD_EINTR_RPC), after it has been thread_abort'd. If it looks to have
just completed a mach_msg_trap system call that returned
MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
being waited on. */
@@ -236,8 +253,10 @@ _hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
if (! setjmp (_hurd_sigthread_fault_env))
{
const unsigned int *pc = (void *) state->basic.pc;
- if (state->basic.r2 == MACH_RCV_INTERRUPTED &&
- pc[-1] == 0xc) /* XXX ???? syscall */
+ if (state->basic.r0 == MACH_RCV_INTERRUPTED &&
+ pc[-1] == ((alpha_instruction) { pal_format:
+ { opcode: op_pal,
+ function: op_chmk } }).bits)
{
/* We did just return from a mach_msg_trap system call
doing a message receive that was interrupted.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bcfb9b9bc2cca2baf08303eab0b0729508c8088
commit 9bcfb9b9bc2cca2baf08303eab0b0729508c8088
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 04:41:19 1994 +0000
Initial revision
diff --git a/sysdeps/mach/alpha/sysdep.h b/sysdeps/mach/alpha/sysdep.h
new file mode 100644
index 0000000..9c54850
--- /dev/null
+++ b/sysdeps/mach/alpha/sysdep.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define MOVE(x,y) mov x, y
+
+#define LOSE asm volatile ("call_pal 0") /* halt */
+
+/* XXX SNARF_ARGS */
+
+#define CALL_WITH_SP(fn, sp) \
+ ({ register long int __fn = fn, __sp = (long int) sp; \
+ asm volatile ("mov %0,$30; jmp $31, %1; ldgp $29, 0(%1)" \
+ : : "r" (__sp), "r" (__fn)); })
+
+#define STACK_GROWTH_DOWN
+
+#include_next <sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d92fbeca71981a5fd7e1417619bf1cdede60657
commit 0d92fbeca71981a5fd7e1417619bf1cdede60657
Author: Roland McGrath <roland@gnu.org>
Date: Thu Nov 10 04:35:29 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/alpha/syscall.S b/sysdeps/mach/alpha/syscall.S
new file mode 100644
index 0000000..0fd10fa
--- /dev/null
+++ b/sysdeps/mach/alpha/syscall.S
@@ -0,0 +1,38 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY (syscall)
+ .frame sp,0,ra
+ mov a0, v0 /* Load system call number from first arg. */
+ mov a1, a0
+ mov a2, a1
+ mov a3, a2
+ mov a4, a3
+ mov a5, a4
+ /* Load the remaining possible args (up to 11) from the stack. */
+ ldq a5,0(sp)
+ ldq t0,8(sp)
+ ldq t1,16(sp)
+ ldq t2,24(sp)
+ ldq t3,32(sp)
+ ldq t4,40(sp)
+ call_pal op_chmk
+ RET
+ .end syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1db9e43738324c9c335f5b322a88880d1f4b0bb3
commit 1db9e43738324c9c335f5b322a88880d1f4b0bb3
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 9 12:23:25 1994 +0000
Initial revision
diff --git a/sysdeps/mach/hurd/alpha/trampoline.c b/sysdeps/mach/hurd/alpha/trampoline.c
new file mode 100644
index 0000000..575d88d
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/trampoline.c
@@ -0,0 +1,253 @@
+/* Set thread_state for sighandler, and sigcontext to recover. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd/signal.h>
+#include "thread_state.h"
+
+
+struct mach_msg_trap_args
+ {
+ /* This is the order of arguments to mach_msg_trap. */
+ mach_msg_header_t *msg;
+ mach_msg_option_t option;
+ mach_msg_size_t send_size;
+ mach_msg_size_t rcv_size;
+ mach_port_t rcv_name;
+ mach_msg_timeout_t timeout;
+ mach_port_t notify;
+ };
+
+
+struct sigcontext *
+_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
+ int signo, int sigcode,
+ int rpc_wait,
+ struct machine_thread_all_state *state)
+{
+
+ __label__ trampoline, rpc_wait_trampoline;
+ void *sigsp;
+ struct sigcontext *scp;
+
+ if (ss->context)
+ {
+ /* We have a previous sigcontext that sigreturn was about
+ to restore when another signal arrived. We will just base
+ our setup on that. */
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ memcpy (&state->basic, &ss->context->sc_alpha_thread_state,
+ sizeof (state->basic));
+ state->set = (1 << ALPHA_THREAD_STATE);
+ if (1) /* if fpu used XXX */
+ {
+ memcpy (&state->fpu, &ss->context->sc_alpha_float_state,
+ sizeof (state->fpu));
+ state->set |= (1 << ALPHA_FLOAT_STATE);
+ }
+ assert (! rpc_wait);
+ /* The intr_port slot was cleared before sigreturn sent us the
+ sig_post that made us notice this pending signal, so
+ _hurd_internal_post_signal wouldn't do interrupt_operation.
+ After we return, our caller will set SCP->sc_intr_port (in the
+ new context) from SS->intr_port and clear SS->intr_port. Now
+ that we are restoring this old context recorded by sigreturn,
+ we want to restore its intr_port too; so store it in
+ SS->intr_port now, so it will end up in SCP->sc_intr_port
+ later. */
+ ss->intr_port = ss->context->sc_intr_port;
+ }
+ /* If the sigreturn context was bogus, just ignore it. */
+ ss->context = NULL;
+ }
+ else if (! machine_get_basic_state (ss->thread, state))
+ return NULL;
+
+ if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
+ !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ {
+ sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
+ ss->sigaltstack.ss_flags |= SA_ONSTACK;
+ /* XXX need to set up base of new stack for
+ per-thread variables, cthreads. */
+ }
+ else
+ sigsp = (char *) state->basic.r29;
+
+ /* Set up the sigcontext structure on the stack. This is all the stack
+ needs, since the args are passed in registers (below). */
+ sigsp -= sizeof (*scp);
+ scp = sigsp;
+
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ /* Set up the sigcontext from the current state of the thread. */
+
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
+
+ /* struct sigcontext is laid out so that starting at sc_regs
+ mimics a struct alpha_thread_state. */
+ memcpy (&scp->sc_alpha_thread_state,
+ &state->basic, sizeof (state->basic));
+
+ if (1 && /* XXX fpu used */
+ /* struct sigcontext is laid out so that starting at sc_fpregs
+ mimics a struct alpha_float_state. This state
+ is only meaningful if the coprocessor was used. */
+ ! machine_get_state (ss->thread, state, ALPHA_FLOAT_STATE,
+ &state->fpu,
+ &scp->sc_alpha_float_state,
+ sizeof (state->fpu)))
+ return NULL;
+ }
+ else
+ /* We got a fault trying to write the stack frame.
+ We cannot set up the signal handler.
+ Returning NULL tells our caller, who will nuke us with a SIGILL. */
+ return NULL;
+
+ /* Modify the thread state to call the trampoline code on the new stack. */
+ if (rpc_wait)
+ {
+ /* The signalee thread was blocked in a mach_msg_trap system call,
+ still waiting for a reply. We will have it run the special
+ trampoline code which retries the message receive before running
+ the signal handler.
+
+ To do this we change the OPTION argument in its registers to
+ enable only message reception, since the request message has
+ already been sent. */
+
+ /* The system call arguments are stored in consecutive registers
+ starting with a0 ($16). */
+ struct mach_msg_trap_args *args = (void *) &state->basic.r16;
+
+ assert (args->option & MACH_RCV_MSG);
+ /* Disable the message-send, since it has already completed. The
+ calls we retry need only wait to receive the reply message. */
+ args->option &= ~MACH_SEND_MSG;
+
+ state->basic.pc = (long int) &&rpc_wait_trampoline;
+ /* After doing the message receive, the trampoline code will need to
+ update the v0 ($0) value to be restored by sigreturn. To simplify
+ the assembly code, we pass the address of its slot in SCP to the
+ trampoline code in at ($28). */
+ state->basic.r28 = (long int) &scp->sc_regs[0];
+ /* We must preserve the mach_msg_trap args in a0..a5 and t0
+ ($16..$21, $1). Pass the handler args to the trampoline code in
+ t8..t10 ($22.$24). */
+ state->basic.r22 = signo;
+ state->basic.r23 = sigcode;
+ state->basic.r24 = (long int) scp;
+ }
+ else
+ {
+ state->basic.pc = (long int) &&trampoline;
+ state->basic.r16 = signo;
+ state->basic.r17 = sigcode;
+ state->basic.r18 = (long int) scp;
+ }
+
+ state->basic.r30 = (long int) sigsp; /* $30 is the stack pointer. */
+
+ /* We pass the handler function to the trampoline code in ra ($26). */
+ state->basic.r26 = (long int) handler;
+ /* In the callee-saved register t12 ($27), we save the SCP value to pass
+ to __sigreturn after the handler returns. */
+ state->basic.r27 = (long int) scp;
+
+ return scp;
+
+ /* The trampoline code follows. This is not actually executed as part of
+ this function, it is just convenient to write it that way. */
+
+ rpc_wait_trampoline:
+ /* This is the entry point when we have an RPC reply message to receive
+ before running the handler. The MACH_MSG_SEND bit has already been
+ cleared in the OPTION argument in our registers. For our convenience,
+ $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */
+ asm volatile
+ (".set noat; .set noreorder; .set nomacro\n"
+ /* Retry the interrupted mach_msg system call. */
+ "ldiq $0, -25\n" /* mach_msg_trap */
+ "call_pal PAL_callsys\n"
+ /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
+ now the message receive has completed and the original caller of
+ the RPC (i.e. the code running when the signal arrived) needs to
+ see the final return value of the message receive in v0. So
+ store the new v0 value into the sc_regs[0] member of the sigcontext
+ (whose address is in at to make this code simpler). */
+ "stq v0, 0(at)\n"
+ /* Since the argument registers needed to have the mach_msg_trap
+ arguments, we've stored the arguments to the handler function
+ in registers t8..t10 ($22..$24). */
+ "mov t8, a0\n"
+ "mov t9, a1\n"
+ "mov t10, a2\n");
+
+ trampoline:
+ /* Entry point for running the handler normally. The arguments to the
+ handler function are already in the standard registers:
+
+ a0 SIGNO
+ a1 SIGCODE
+ a2 SCP
+ */
+ asm volatile
+ ("br at, 0f;0: ldgp gp, 0(at)\n" /* Reset GP (???). */
+ /* Call the handler function. */
+ "jsr ra, ra; ldgp gp, 0(ra)\n"
+ /* Call __sigreturn (SCP); this cannot return. */
+ "mov t12, a0\n"
+ "jsr ra, %0; ldgp gp, 0(ra)\n"
+ : : "i" (&__sigreturn));
+
+ /* NOTREACHED */
+ asm volatile (".set reorder; .set at; .set macro");
+
+ return NULL;
+}
+
+/* STATE describes a thread that had intr_port set (meaning it was inside
+ HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
+ just completed a mach_msg_trap system call that returned
+ MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
+ being waited on. */
+int
+_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
+ mach_port_t *port)
+{
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ const unsigned int *pc = (void *) state->basic.pc;
+ if (state->basic.r2 == MACH_RCV_INTERRUPTED &&
+ pc[-1] == 0xc) /* XXX ???? syscall */
+ {
+ /* We did just return from a mach_msg_trap system call
+ doing a message receive that was interrupted.
+ Examine the parameters to find the receive right. */
+ struct mach_msg_trap_args *args = (void *) &state->basic.r16;
+
+ *port = args->rcv_name;
+ return 1;
+ }
+ }
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eacddc0a20f6fa71fff1a4bba4bf91497193680b
commit eacddc0a20f6fa71fff1a4bba4bf91497193680b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 8 23:34:47 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c
index 51fd5c5..dfc16fd 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ctx.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ctx.c
@@ -1,4 +1,4 @@
-/* Perform a `longjmp' on a `struct sigcontext'. i386 version.
+/* Perform a `longjmp' on a `struct sigcontext'. Alpha version.
Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ts.c
similarity index 57%
copy from sysdeps/mach/hurd/alpha/longjmp-ctx.c
copy to sysdeps/mach/hurd/alpha/longjmp-ts.c
index 51fd5c5..8ee2b9a 100644
--- a/sysdeps/mach/hurd/alpha/longjmp-ctx.c
+++ b/sysdeps/mach/hurd/alpha/longjmp-ts.c
@@ -1,5 +1,5 @@
-/* Perform a `longjmp' on a `struct sigcontext'. i386 version.
-Copyright (C) 1994 Free Software Foundation, Inc.
+/* Perform a `longjmp' on a Mach thread_state. Alpha version.
+Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,22 +17,25 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <setjmp.h>
#include <hurd/signal.h>
-#include <string.h>
+#include <setjmp.h>
+#include <mach/thread_status.h>
+
+
+/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */
void
-_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
+_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
{
- memset (scp, 0, sizeof (*scp));
- scp->sc_regs[9] = env[0].__9;
- scp->sc_regs[11] = env[0].__11;
- scp->sc_regs[12] = env[0].__12;
- scp->sc_regs[13] = env[0].__13;
- scp->sc_regs[14] = env[0].__14;
- scp->sc_regs[15] = (long int) env[0].__fp;
- scp->sc_regs[30] = (long int) env[0].__sp;
- scp->sc_pc = (long int) env[0].__pc;
-
- memcpy (&scp->sc_fpregs[2], &env[0].__f2, sizeof (double));
+ struct alpha_thread_state *ts = state;
+
+ ts->r9 = env[0].__9;
+ ts->r11 = env[0].__11;
+ ts->r12 = env[0].__12;
+ ts->r13 = env[0].__13;
+ ts->r14 = env[0].__14;
+ ts->r15 = (long int) env[0].__fp;
+ ts->r30 = (long int) env[0].__sp;
+ ts->pc = (long int) env[0].__pc;
+ ts->r0 = val ?: 1;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72dd53ade3c0be284deb043926cccffa2455195e
commit 72dd53ade3c0be284deb043926cccffa2455195e
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 8 23:32:22 1994 +0000
Initial revision
diff --git a/sysdeps/mach/hurd/alpha/longjmp-ctx.c b/sysdeps/mach/hurd/alpha/longjmp-ctx.c
new file mode 100644
index 0000000..51fd5c5
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/longjmp-ctx.c
@@ -0,0 +1,38 @@
+/* Perform a `longjmp' on a `struct sigcontext'. i386 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <setjmp.h>
+#include <hurd/signal.h>
+#include <string.h>
+
+void
+_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
+{
+ memset (scp, 0, sizeof (*scp));
+ scp->sc_regs[9] = env[0].__9;
+ scp->sc_regs[11] = env[0].__11;
+ scp->sc_regs[12] = env[0].__12;
+ scp->sc_regs[13] = env[0].__13;
+ scp->sc_regs[14] = env[0].__14;
+ scp->sc_regs[15] = (long int) env[0].__fp;
+ scp->sc_regs[30] = (long int) env[0].__sp;
+ scp->sc_pc = (long int) env[0].__pc;
+
+ memcpy (&scp->sc_fpregs[2], &env[0].__f2, sizeof (double));
+}
diff --git a/sysdeps/mach/hurd/alpha/sigcontext.h b/sysdeps/mach/hurd/alpha/sigcontext.h
new file mode 100644
index 0000000..5767e8b
--- /dev/null
+++ b/sysdeps/mach/hurd/alpha/sigcontext.h
@@ -0,0 +1,56 @@
+/* Machine-dependent signal context structure for GNU Hurd. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ /* These first members are machine-independent. */
+
+ int sc_onstack; /* Nonzero if running on sigstack. */
+ sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned int sc_intr_port;
+
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_error;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to:
+ {
+ struct alpha_thread_state basic;
+ struct alpha_float_state fpu;
+ }
+ trampoline.c knows this, so it must be changed if this changes. */
+
+#define sc_alpha_thread_state sc_gs /* Beginning of correspondence. */
+ long int sc_regs[31]; /* General registers $0..$30. */
+ long int sc_pc; /* Program counter. */
+ long int sc_ps; /* Processor status. */
+
+ /* struct alpha_float_state */
+#define sc_alpha_float_state sc_fpregs
+ long int sc_fpregs[32]; /* Floating point registers $f0..$f31. */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2131138c9039fe22c670fd285bab17943f5213c4
commit 2131138c9039fe22c670fd285bab17943f5213c4
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 8 22:33:29 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/alpha/machine-sp.h b/sysdeps/mach/alpha/machine-sp.h
new file mode 100644
index 0000000..6a8a3c6
--- /dev/null
+++ b/sysdeps/mach/alpha/machine-sp.h
@@ -0,0 +1,36 @@
+/* Machine-specific function to return the stack pointer. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _MACHINE_SP_H
+#define _MACHINE_SP_H
+
+/* Return the current stack pointer. */
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+_EXTERN_INLINE void *
+__thread_stack_pointer (void)
+{
+ register void *__sp__ __asm__ ("$30");
+ return __sp__;
+}
+
+#endif /* machine-sp.h */
diff --git a/sysdeps/mach/alpha/thread_state.h b/sysdeps/mach/alpha/thread_state.h
new file mode 100644
index 0000000..38527df
--- /dev/null
+++ b/sysdeps/mach/alpha/thread_state.h
@@ -0,0 +1,38 @@
+/* Mach thread state definitions for machine-independent code. Alpha version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <mach/machine/thread_status.h>
+
+#define MACHINE_THREAD_STATE_FLAVOR ALPHA_THREAD_STATE
+#define MACHINE_THREAD_STATE_COUNT ALPHA_THREAD_STATE_COUNT
+
+#define machine_thread_state alpha_thread_state
+
+#define PC pc
+#define SP r30
+#define SYSRETURN r0
+
+struct machine_thread_all_state
+ {
+ int set; /* Mask of bits (1 << FLAVOR). */
+ struct alpha_thread_state basic;
+ struct alpha_float_state fpu;
+ };
+
+#include_next <thread_state.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92c456e486df6f591d452c6c8560a2e5e5abf2b3
commit 92c456e486df6f591d452c6c8560a2e5e5abf2b3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 1 08:32:25 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist
index fed1490..8b7b09e 100644
--- a/sysdeps/standalone/i386/force_cpu386/Dist
+++ b/sysdeps/standalone/i386/force_cpu386/Dist
@@ -1 +1 @@
-force_cpu386.ld
+target.ld
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=216eed1fd6c0cb08ff25eb7f8b8c73adebd27ca2
commit 216eed1fd6c0cb08ff25eb7f8b8c73adebd27ca2
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 1 06:28:24 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
index 429f822..8483724 100644
--- a/sysdeps/standalone/i386/force_cpu386/Makefile
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1994 Free Software Foundation, Inc.
# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
# On-Line Applications Research Corporation.
@@ -18,5 +18,7 @@
# Cambridge, MA 02139, USA.
ifeq (bare,$(subdir))
-install-lib += force_cpu386.ld
+install-others += $(libdir)/force_cpu386.ld
+$(libdir)/force_cpu386.ld: $(sysdep_dir)/standalone/i386/target.ld
+ $(do-install)
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8f476a532793b8857f0f9843e667df927202d6dd
commit 8f476a532793b8857f0f9843e667df927202d6dd
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 31 12:14:14 1994 +0000
(TCSASOFT): Macro removed.
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
index 01ab4d7..b768dea 100644
--- a/sysdeps/unix/bsd/sun/sunos4/termbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. SunOS 4 version.
-Copyright (C) 1993 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -195,9 +195,6 @@ struct termios
#define TCSANOW 0 /* Change immediately. */
#define TCSADRAIN 1 /* Change when pending output is written. */
#define TCSAFLUSH 2 /* Flush pending input before changing. */
-#ifdef __USE_BSD
-#define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */
-#endif
/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
#define TCIFLUSH 0 /* Discard data received but not yet read. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5302ac2b99ae3bdc2efd1d6ae2672a548eedcf00
commit 5302ac2b99ae3bdc2efd1d6ae2672a548eedcf00
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 27 19:00:37 1994 +0000
Fixed typo.
diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h
index 07f8355..13d58f0 100644
--- a/sysdeps/standalone/standalone.h
+++ b/sysdeps/standalone/standalone.h
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
#include <sys/cdefs.h>
-extern void _Board_Initialize __PP ((void));
+extern void _Board_Initialize __P ((void));
extern int _Console_Putc __P ((char c));
extern int _Console_Getc __P ((int poll));
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=735888584ded5b8b41c46f7c1846b30567d12a8a
commit 735888584ded5b8b41c46f7c1846b30567d12a8a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 30 21:51:53 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h
index b117a5a..20c4922 100644
--- a/sysdeps/standalone/dirstream.h
+++ b/sysdeps/standalone/dirstream.h
@@ -1,7 +1,4 @@
-/* Copyright (C) 1994 Free Software Foundation, Inc.
- Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
- On-Line Applications Research Corporation.
-
+/* Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,9 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#ifndef _DIRSTREAM_H
+#ifndef _DIRSTREAM_H
-#define _DIRSTREAM_H 1
+#define _DIRSTREAM_H 1
#define __need_size_t
#include <stddef.h>
@@ -29,19 +26,18 @@ Cambridge, MA 02139, USA. */
/* Directory stream type.
The miscellaneous Unix `readdir' implementations read directory data
- into a buffer and fill in a `struct dirent' copy in the `DIR' object.
-*/
+ into a buffer and fill in a `struct dirent' copy in the `DIR' object. */
typedef struct
{
- int __fd; /* File descriptor. */
+ int __fd; /* File descriptor. */
- char *__data; /* Directory block. */
- size_t __allocation; /* Space allocated for the block. */
- size_t __offset; /* Current offset into the block. */
- size_t __size; /* Total valid data in the block. */
+ char *__data; /* Directory block. */
+ size_t __allocation; /* Space allocated for the block. */
+ size_t __offset; /* Current offset into the block. */
+ size_t __size; /* Total valid data in the block. */
- struct dirent __entry; /* Returned by `readdir'. */
+ struct dirent __entry; /* Returned by `readdir'. */
} DIR;
-#endif /* dirstream.h */
+#endif /* dirstream.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a5c38e6378ec604f37c72529eb52351d68307e1
commit 2a5c38e6378ec604f37c72529eb52351d68307e1
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 30 21:50:55 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/dirstream.h b/sysdeps/standalone/dirstream.h
new file mode 100644
index 0000000..b117a5a
--- /dev/null
+++ b/sysdeps/standalone/dirstream.h
@@ -0,0 +1,47 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _DIRSTREAM_H
+
+#define _DIRSTREAM_H 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Directory stream type.
+
+ The miscellaneous Unix `readdir' implementations read directory data
+ into a buffer and fill in a `struct dirent' copy in the `DIR' object.
+*/
+
+typedef struct
+ {
+ int __fd; /* File descriptor. */
+
+ char *__data; /* Directory block. */
+ size_t __allocation; /* Space allocated for the block. */
+ size_t __offset; /* Current offset into the block. */
+ size_t __size; /* Total valid data in the block. */
+
+ struct dirent __entry; /* Returned by `readdir'. */
+ } DIR;
+
+#endif /* dirstream.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=152f50979835aa4a88123c27ed97c0539075616f
commit 152f50979835aa4a88123c27ed97c0539075616f
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Sep 29 21:21:19 1994 +0000
* sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (ENTRY): Use
poundfnc instead of \#function, to satisfy gcc-2.6.0 and higher.
(cat, poundfnc): Define macros to pull it off.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 711fd8c..90e2b38 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,17 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
+/* As of gcc-2.6.0, it complains about pound signs in front of things
+ that aren't arguments to the macro. So we use this to pull it off
+ instead. */
+#define cat(a,b) a##b
+#define poundfnc cat(#,function)
+
#define ENTRY(name) \
.section ".text"; \
.align 4; \
.global C_SYMBOL_NAME(name); \
- .type C_SYMBOL_NAME(name), \#function; \
+ .type C_SYMBOL_NAME(name), poundfnc; \
C_LABEL(name)
#define PSEUDO(name, syscall_name, args) \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8df6e75faf01140637b0bb08651d9c00f238d321
commit 8df6e75faf01140637b0bb08651d9c00f238d321
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 16 02:14:48 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/i386/force_cpu386/Dist b/sysdeps/standalone/i386/force_cpu386/Dist
new file mode 100644
index 0000000..fed1490
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/Dist
@@ -0,0 +1 @@
+force_cpu386.ld
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5c84ce029b275dd00e7b61e2fd8f246a8c279b0f
commit 5c84ce029b275dd00e7b61e2fd8f246a8c279b0f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 16 02:14:38 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i960/Dist b/sysdeps/standalone/i960/Dist
new file mode 100644
index 0000000..e1747ef
--- /dev/null
+++ b/sysdeps/standalone/i960/Dist
@@ -0,0 +1 @@
+i960ca.h
diff --git a/sysdeps/standalone/m68k/m68020/Dist b/sysdeps/standalone/m68k/m68020/Dist
new file mode 100644
index 0000000..90b37b4
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/Dist
@@ -0,0 +1 @@
+m68020.h
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Dist b/sysdeps/standalone/m68k/m68020/mvme136/Dist
new file mode 100644
index 0000000..97b9058
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/Dist
@@ -0,0 +1 @@
+mvme136.ld
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de20f4e300e8405ff3fca4edf5837831c52b8ff0
commit de20f4e300e8405ff3fca4edf5837831c52b8ff0
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 13 19:28:54 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i960/i960ca.h b/sysdeps/standalone/i960/i960ca.h
new file mode 100644
index 0000000..21012b4
--- /dev/null
+++ b/sysdeps/standalone/i960/i960ca.h
@@ -0,0 +1,207 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* i960ca.h
+ *
+ * This file contains macros which are used to access i80960CA
+ * registers which are not addressable by C. The functions
+ * in this file sould be useful to the developer of target
+ * specific code.
+ */
+
+#ifndef i960ca_h__
+#define i960ca_h__
+
+typedef unsigned char unsigned8;
+typedef unsigned short unsigned16;
+typedef unsigned int unsigned32;
+
+/*
+ * Intel i80960CA Processor Control Block
+ */
+
+struct i80960ca_prcb {
+ unsigned32 *fault_tbl; /* fault table base address */
+ struct i80960ca_ctltbl
+ *control_tbl; /* control table base address */
+ unsigned32 initial_ac; /* AC register initial value */
+ unsigned32 fault_config; /* fault configuration word */
+ void *intr_tbl; /* interrupt table base address */
+ void *sys_proc_tbl; /* system procedure table */
+ /* base address */
+ unsigned32 reserved; /* reserved */
+ unsigned32 *intr_stack; /* interrupt stack pointer */
+ unsigned32 ins_cache_cfg; /* instruction cache */
+ /* configuration word */
+ unsigned32 reg_cache_cfg; /* register cache */
+ /* configuration word */
+};
+
+/*
+ * Intel i80960CA Control Table
+ */
+
+struct i80960ca_ctltbl {
+ /* Control Group 0 */
+ unsigned32 ipb0; /* IP breakpoint 0 */
+ unsigned32 ipb1; /* IP breakpoint 1 */
+ unsigned32 dab0; /* data address breakpoint 0 */
+ unsigned32 dab1; /* data address breakpoint 1 */
+ /* Control Group 1 */
+ unsigned32 imap0; /* interrupt map 0 */
+ unsigned32 imap1; /* interrupt map 1 */
+ unsigned32 imap2; /* interrupt map 2 */
+ unsigned32 icon; /* interrupt control */
+ /* Control Group 2 */
+ unsigned32 mcon0; /* memory region 0 configuration */
+ unsigned32 mcon1; /* memory region 1 configuration */
+ unsigned32 mcon2; /* memory region 2 configuration */
+ unsigned32 mcon3; /* memory region 3 configuration */
+ /* Control Group 3 */
+ unsigned32 mcon4; /* memory region 4 configuration */
+ unsigned32 mcon5; /* memory region 5 configuration */
+ unsigned32 mcon6; /* memory region 6 configuration */
+ unsigned32 mcon7; /* memory region 7 configuration */
+ /* Control Group 4 */
+ unsigned32 mcon8; /* memory region 8 configuration */
+ unsigned32 mcon9; /* memory region 9 configuration */
+ unsigned32 mcon10; /* memory region 10 configuration */
+ unsigned32 mcon11; /* memory region 11 configuration */
+ /* Control Group 5 */
+ unsigned32 mcon12; /* memory region 12 configuration */
+ unsigned32 mcon13; /* memory region 13 configuration */
+ unsigned32 mcon14; /* memory region 14 configuration */
+ unsigned32 mcon15; /* memory region 15 configuration */
+ /* Control Group 6 */
+ unsigned32 bpcon; /* breakpoint control */
+ unsigned32 tc; /* trace control */
+ unsigned32 bcon; /* bus configuration control */
+ unsigned32 reserved; /* reserved */
+};
+
+#define disable_intr( oldlevel ) \
+ { (oldlevel) = 0x1f0000; \
+ asm volatile ( "modpc 0,%1,%1" \
+ : "=d" ((oldlevel)) \
+ : "0" ((oldlevel)) ); \
+ }
+
+#define enable_intr( oldlevel ) \
+ { unsigned32 _mask = 0x1f0000; \
+ asm volatile ( "modpc 0,%0,%1" \
+ : "=d" (_mask), "=d" ((oldlevel)) \
+ : "0" (_mask), "1" ((oldlevel)) ); \
+ }
+
+#define flash_intr( oldlevel ) \
+ { unsigned32 _mask = 0x1f0000; \
+ asm volatile ( "modpc 0,%0,%1 ; \
+ mov %0,%1 ; \
+ modpc 0,%0,%1" \
+ : "=d" (_mask), "=d" ((oldlevel)) \
+ : "0" (_mask), "1" ((oldlevel)) ); \
+ }
+
+#define atomic_modify( mask, addr, prev ) \
+ { register unsigned32 _mask = (mask); \
+ register unsigned32 *_addr = (unsigned32 *)(addr); \
+ asm volatile( "atmod %0,%1,%1" \
+ : "=d" (_addr), "=d" (_mask) \
+ : "0" (_addr), "1" (_mask) ); \
+ (prev) = _mask; \
+ }
+
+#define delay( microseconds ) \
+ { register unsigned32 _delay=(microseconds); \
+ register unsigned32 _tmp; \
+ asm volatile( "delay0: \
+ remo 3,31,%0 ; \
+ cmpo 0,%0 ; \
+ subo 1,%1,%1 ; \
+ cmpobne.t 0,%1,delay0 " \
+ : "=d" (_tmp), "=d" (_delay) \
+ : "0" (_tmp), "1" (_delay) ); \
+ }
+
+#define enable_tracing() \
+ { register unsigned32 _pc = 0x1; \
+ asm volatile( "modpc 0,%0,%0" : "=d" (_pc) : "0" (_pc) ); \
+ }
+
+#define unmask_intr( xint ) \
+ { register unsigned32 _mask= (1<<(xint)); \
+ asm volatile( "or sf1,%0,sf1" : "=d" (_mask) : "0" (_mask) ); \
+ }
+
+#define mask_intr( xint ) \
+ { register unsigned32 _mask= (1<<(xint)); \
+ asm volatile( "andnot %0,sf1,sf1" : "=d" (_mask) : "0" (_mask) ); \
+ }
+
+#define clear_intr( xint ) \
+ { register unsigned32 _xint=(xint); \
+ asm volatile( "loop_til_cleared:
+ clrbit %0,sf0,sf0 ; \
+ bbs %0,sf0,loop_til_cleared" \
+ : "=d" (_xint) : "0" (_xint) ); \
+ }
+
+#define reload_ctl_group( group ) \
+ { register int _cmd = ((group)|0x400) ; \
+ asm volatile( "sysctl %0,%0,%0" : "=d" (_cmd) : "0" (_cmd) ); \
+ }
+
+#define cause_intr( intr ) \
+ { register int _intr = (intr); \
+ asm volatile( "sysctl %0,%0,%0" : "=d" (_intr) : "0" (_intr) ); \
+ }
+
+#define soft_reset( prcb ) \
+ { register struct i80960ca_prcb *_prcb = (prcb); \
+ register unsigned32 *_next=0; \
+ register unsigned32 _cmd = 0x30000; \
+ asm volatile( "lda next,%1; \
+ sysctl %0,%1,%2; \
+ next: mov g0,g0" \
+ : "=d" (_cmd), "=d" (_next), "=d" (_prcb) \
+ : "0" (_cmd), "1" (_next), "2" (_prcb) ); \
+ }
+
+static inline unsigned32 pend_intrs()
+{ register unsigned32 _intr=0;
+ asm volatile( "mov sf0,%0" : "=d" (_intr) : "0" (_intr) );
+ return ( _intr );
+}
+
+static inline unsigned32 mask_intrs()
+{ register unsigned32 _intr=0;
+ asm volatile( "mov sf1,%0" : "=d" (_intr) : "0" (_intr) );
+ return( _intr );
+}
+
+static inline unsigned32 get_fp()
+{ register unsigned32 _fp=0;
+ asm volatile( "mov fp,%0" : "=d" (_fp) : "0" (_fp) );
+ return ( _fp );
+}
+
+#endif
+/* end of include file */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09dbb2c168a338a36f4debd8ce40d4e5089987a7
commit 09dbb2c168a338a36f4debd8ce40d4e5089987a7
Author: Roland McGrath <roland@gnu.org>
Date: Tue Sep 13 17:09:48 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i386/force_cpu386/target.ld b/sysdeps/standalone/i386/force_cpu386/target.ld
new file mode 100644
index 0000000..056da10
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/target.ld
@@ -0,0 +1,59 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This file contains directives for the GNU linker which are specific
+to the FORCE CPU386 board. */
+
+MEMORY
+ {
+ ram : org = 0x0, l = 1M
+ }
+
+/* This value is also when the space is allocated. If you change
+this one, change the other one!!! */
+
+heap_size = 0x20000;
+
+SECTIONS
+{
+ .text 0x0 :
+ {
+ _text_start = ABSOLUTE(.) ;
+ *(.text)
+ _etext = ALIGN( 0x10 ) ;
+ }
+ .data ADDR( .text ) + SIZEOF( .text ):
+ {
+ _data_start = . ;
+ *(.data)
+ _edata = ALIGN( 0x10 ) ;
+ }
+ .bss ADDR( .data ) + SIZEOF( .data ):
+ {
+ _bss_start = . ;
+ *(.bss)
+ *(COMMON)
+ heap_memory = .;
+ . += 0x20000;
+ _end = . ;
+ __end = . ;
+ }
+}
diff --git a/sysdeps/standalone/m68k/m68020/m68020.h b/sysdeps/standalone/m68k/m68020/m68020.h
new file mode 100644
index 0000000..e9e6f7d
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/m68020.h
@@ -0,0 +1,88 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* m68020.h
+ *
+ * This file contains macros which are used to access MC68020
+ * registers which are not addressable by C. These are
+ * useful when developing the board specific support.
+ */
+
+#ifndef m68020_h__
+#define m68020_h__
+
+typedef void ( *mc68020_isr )( void );
+
+#define disable_intr( level ) \
+ { (level) = 0; \
+ asm volatile ( "movew %%sr,%0 ; \
+ orw #0x0700,%%sr" \
+ : "=d" ((level)) : "0" ((level)) ); \
+ }
+
+#define enable_intr( level ) \
+ { asm volatile ( "movew %0,%%sr " \
+ : "=d" ((level)) : "0" ((level)) ); \
+ }
+
+#define flash_intr( level ) \
+ { asm volatile ( "movew %0,%%sr ; \
+ orw #0x0700,%%sr" \
+ : "=d" ((level)) : "0" ((level)) ); \
+ }
+
+#define get_vbr( vbr ) \
+ { (vbr) = 0; \
+ asm volatile ( "movec %%vbr,%0 " \
+ : "=a" (vbr) : "0" (vbr) ); \
+ }
+
+#define set_vbr( vbr ) \
+ { register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \
+ asm volatile ( "movec %0,%%vbr " \
+ : "=a" (_vbr) : "0" (_vbr) ); \
+ }
+
+#define enable_caching() \
+ { register unsigned int _ctl=0x01; \
+ asm volatile ( "movec %0,%%cacr" \
+ : "=d" (_ctl) : "0" (_ctl) ); \
+ }
+
+#define delay( microseconds ) \
+ { register unsigned int _delay=(microseconds); \
+ register unsigned int _tmp=123; \
+ asm volatile( "0: \
+ nbcd %0 ; \
+ nbcd %0 ; \
+ dbf %1,0 " \
+ : "=d" (_tmp), "=d" (_delay) \
+ : "0" (_tmp), "1" (_delay) ); \
+ }
+
+#define enable_tracing()
+#define cause_intr( X )
+#define clear_intr( X )
+
+extern mc68020_isr M68Kvec[]; /* vector table address */
+
+#endif
+/* end of include file */
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
new file mode 100644
index 0000000..0f68330
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/mvme136.ld
@@ -0,0 +1,62 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This file contains directives for the GNU linker which are specific
+to the Motorola MVME136/MVME135 boards. */
+
+MEMORY
+ {
+ ram : org = 0x3000, l = 1M
+ }
+
+/* This value is also when the space is allocated. If you change
+this one, change the other one!!! */
+
+heap_size = 0x20000;
+
+SECTIONS
+{
+ .text 0x3000 :
+ {
+ text_start = ABSOLUTE(.) ;
+ *(.text)
+ etext = ALIGN( 0x10 ) ;
+ }
+
+ .data ADDR( .text ) + SIZEOF( .text ):
+ {
+ data_start = . ;
+ *(.data)
+ edata = ALIGN( 0x10 ) ;
+ }
+
+ .bss ADDR( .data ) + SIZEOF( .data ):
+ {
+ bss_start = . ;
+ _bss_start = . ;
+ *(.bss)
+ *(COMMON)
+ heap_memory = .;
+ . += 0x20000;
+ end = . ;
+ _end = . ;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7704bac4de34fe1c3d367c02de17ed79577f2379
commit 7704bac4de34fe1c3d367c02de17ed79577f2379
Author: Roland McGrath <roland@gnu.org>
Date: Sat Sep 3 02:31:57 1994 +0000
Restore FPU state. Code from kkojima.
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index f02e799..0b3a474 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -77,8 +77,30 @@ __sigreturn (struct sigcontext *scp)
if (scp->sc_coproc_used & SC_COPROC_USE_FPU)
{
- /* XXX should restore FPU state here */
- abort ();
+ /* Restore FPU state. */
+#define restore_fpr(n) \
+ asm volatile ("l.d $f" #n ",%0" : : "m" (scp->sc_fpr[n]))
+
+ /* Restore floating-point registers. */
+ restore_fpr (0);
+ restore_fpr (2);
+ restore_fpr (4);
+ restore_fpr (6);
+ restore_fpr (8);
+ restore_fpr (10);
+ restore_fpr (12);
+ restore_fpr (14);
+ restore_fpr (16);
+ restore_fpr (18);
+ restore_fpr (20);
+ restore_fpr (22);
+ restore_fpr (24);
+ restore_fpr (26);
+ restore_fpr (28);
+ restore_fpr (30);
+
+ /* Restore the floating-point control/status register ($f31). */
+ asm volatile ("ctc1 %0,$f31" : : "r" (scp->sc_fpcsr));
}
/* Load all the registers from the sigcontext. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ebc812a40346d375e5b0922da5e2bc61ec0f44f
commit 9ebc812a40346d375e5b0922da5e2bc61ec0f44f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 2 03:21:20 1994 +0000
(routines, elided-routines): Set these both to $(bare-routines).
(distribute): Don't set this.
diff --git a/bare/Makefile b/bare/Makefile
index bb1807f..588a713 100644
--- a/bare/Makefile
+++ b/bare/Makefile
@@ -22,8 +22,9 @@
subdir := bare
bare-routines := brdinit console strtsupp
+routines = $(bare-routines)
+elided-routines = $(bare-routines)
extra-objs = $(bare-routines:%=%.o)
-distribute = $(bare-routines:%=%.c)
install-lib = lib$(config-vendor).a
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3635a087575d0cf83f872d165d7b29672a746310
commit 3635a087575d0cf83f872d165d7b29672a746310
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 30 12:38:38 1994 +0000
Initial revision
diff --git a/sysdeps/mach/mips/syscall.S b/sysdeps/mach/mips/syscall.S
new file mode 100644
index 0000000..bf56b40
--- /dev/null
+++ b/sysdeps/mach/mips/syscall.S
@@ -0,0 +1,37 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY (syscall)
+ .frame sp,0,ra
+ move v0, a0 /* Load system call number from first arg. */
+ move a0, a1 /* Move the next three args up a register. */
+ move a1, a2
+ move a2, a3
+ /* Load the remaining possible args (up to 11) from the stack. */
+ lw t0,16(sp)
+ lw t1,20(sp)
+ lw t2,24(sp)
+ lw t3,28(sp)
+ lw t4,32(sp)
+ lw t5,36(sp)
+ lw t6,40(sp)
+ syscall /* Do the system call. */
+ j ra /* Return to caller. */
+ .end syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ece89a1215ab74090619029ed23f33ff3f86ba3b
commit ece89a1215ab74090619029ed23f33ff3f86ba3b
Author: Roland McGrath <roland@gnu.org>
Date: Sun Aug 28 08:50:46 1994 +0000
Formerly ./standalone/m68k/m68020/mvme136/_exit.c.~2~
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
index b766902..2deecaa 100644
--- a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -44,15 +44,6 @@ DEFUN(_exit, (status), int status)
{
/* status is ignored */
-
- M68Kvec[ 45 ] = exit_trap; /* install exit_trap handler */
+ M68Kvec[ 45 ] = __exit_trap; /* install exit_trap handler */
asm volatile( "trap #13" ); /* insures SUPV mode */
}
-
-#ifdef HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
-stub_warning(_exit);
-
-#endif /* GNU stabs. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=137575e677ef73d3d8f2565fd2e58f4460246c44
commit 137575e677ef73d3d8f2565fd2e58f4460246c44
Author: Roland McGrath <roland@gnu.org>
Date: Sun Aug 28 08:13:00 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S
index 6cdc604..c14449d 100644
--- a/sysdeps/standalone/i960/start.S
+++ b/sysdeps/standalone/i960/start.S
@@ -86,7 +86,7 @@ init_frames:
*/
mov 0, g0
- callx ___exit
+ callx __exit
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f45ec7f2e22374917d2b83e8bae5918af21a2590
commit f45ec7f2e22374917d2b83e8bae5918af21a2590
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 26 06:15:51 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/Dist b/sysdeps/standalone/Dist
new file mode 100644
index 0000000..b6b12b7
--- /dev/null
+++ b/sysdeps/standalone/Dist
@@ -0,0 +1,2 @@
+filedesc.h
+standalone.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11ab92947ee57ff83bc7d6f0cd0d68b58373b975
commit 11ab92947ee57ff83bc7d6f0cd0d68b58373b975
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 26 06:15:17 1994 +0000
Initial revision
diff --git a/bare/Makefile b/bare/Makefile
new file mode 100644
index 0000000..bb1807f
--- /dev/null
+++ b/bare/Makefile
@@ -0,0 +1,54 @@
+# Copyright (C) 1994 Free Software Foundation, Inc.
+# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+# On-Line Applications Research Corporation.
+#
+# This file is part of the GNU C Library.
+#
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+subdir := bare
+
+bare-routines := brdinit console strtsupp
+extra-objs = $(bare-routines:%=%.o)
+distribute = $(bare-routines:%=%.c)
+
+install-lib = lib$(config-vendor).a
+
+include ../Rules
+
+#
+# For bare targets, the $(config-vendor) is the name of the board.
+# We will place the board dependent code ONLY in a library which
+# is board dependent. This way many target boards can share a
+# single libc.a. To resolve all symbols and successfully link
+# a program, the application must link against libc.a and libMY_TARGET.a.
+# For example, the target specific library for the Motorola MVME135
+# board will be named libmvme135.a. To link a program for the
+# MVME135, one must link against -lc and -lmvme135.
+#
+
+lib: $(objpfx)lib$(config-vendor).a
+
+$(objpfx)lib$(config-vendor).a: $(bare-routines:%=$(objpfx)%.o)
+# This library is small enough that it's simplest to recreate the archive
+# from scratch each time.
+ rm -f $@
+ifdef objdir
+ cd $(objdir); $(AR) cq$(verbose) $@ $(^:$(objpfx)%=%)
+else
+ $(AR) cq$(verbose) $@ $^
+endif
+ $(RANLIB) $@
diff --git a/sysdeps/i960/Implies b/sysdeps/i960/Implies
new file mode 100644
index 0000000..f8c4079
--- /dev/null
+++ b/sysdeps/i960/Implies
@@ -0,0 +1,2 @@
+# i960 family uses IEEE 754 floating point.
+ieee754
diff --git a/sysdeps/i960/ffs.c b/sysdeps/i960/ffs.c
new file mode 100644
index 0000000..62b8742
--- /dev/null
+++ b/sysdeps/i960/ffs.c
@@ -0,0 +1,43 @@
+/* ffs -- find first set bit in a word, counted from least significant end.
+ For i960 Core architecture
+ Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <string.h>
+
+#undef ffs
+
+#if defined (__GNUC__) && defined (__i960__)
+
+int
+DEFUN(ffs, (x), int x)
+{
+ int cnt;
+
+ asm("scanbit %1,%0" : "=d" (cnt) : "rm" (x & -x));
+
+ return cnt;
+}
+
+#else
+
+#include <sysdeps/generic/ffs.c>
+
+#endif
diff --git a/sysdeps/standalone/Subdirs b/sysdeps/standalone/Subdirs
new file mode 100644
index 0000000..4125ae8
--- /dev/null
+++ b/sysdeps/standalone/Subdirs
@@ -0,0 +1,4 @@
+# The `bare' subdirectory defines some structure for a target-specific
+# library of functions which are actually implemented in
+# sysdeps/standalone/CPU/TARGET.
+bare
diff --git a/sysdeps/standalone/brk.c b/sysdeps/standalone/brk.c
new file mode 100644
index 0000000..be9174c
--- /dev/null
+++ b/sysdeps/standalone/brk.c
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <stdlib.h>
+
+PTR __curbrk;
+PTR __rorig;
+PTR __rlimit;
+
+int
+DEFUN(__brk, (inaddr), PTR inaddr)
+{
+
+ if ( ( (void *)inaddr > (void *)__rlimit ) ||
+ ( (void *)inaddr < (void *)__rorig ) )
+ return -1;
+
+ __curbrk = inaddr;
+ return 0;
+}
+
+/* Initialization Code for Memory Allocation */
+
+PTR __C_heap_start;
+int __C_heap_size;
+
+#ifdef HAVE_GNU_LD
+static
+#endif
+void
+DEFUN(__NONE_set_memvals, (argc, argv, envp),
+ int argc AND char **argv AND char **envp)
+{
+
+ __rorig =
+ __curbrk = __C_heap_start;
+ __rlimit = __curbrk + __C_heap_size;
+
+ (void) &__NONE_set_memvals; /* Avoid "defined but not used" warning. */
+}
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+text_set_element (__libc_subinit, __NONE_set_memvals);
+
+#endif
+
diff --git a/sysdeps/standalone/close.c b/sysdeps/standalone/close.c
new file mode 100644
index 0000000..d7674ae
--- /dev/null
+++ b/sysdeps/standalone/close.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <stdio_lim.h>
+#include "filedesc.h"
+
+/* Close the file descriptor FD. */
+int
+DEFUN(__close, (fd), int fd)
+{
+ if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ __FD_Table[ fd ].in_use = 0;
+ return 0;
+}
+
diff --git a/sysdeps/standalone/filedesc.h b/sysdeps/standalone/filedesc.h
new file mode 100644
index 0000000..bf3b6a9
--- /dev/null
+++ b/sysdeps/standalone/filedesc.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/*
+ * This is the file descriptor used by the no OS implementation
+ * of __open, __read, __write, and __close.
+ */
+
+#ifndef __FILEDESC_h
+#define __FILEDESC_h
+
+#include <stdio_lim.h>
+
+#ifndef __DECLARE_FILE_DESCRIPTORS__
+#define FILEDESC_EXTERN extern
+#else
+#define FILEDESC_EXTERN
+#endif
+
+typedef struct {
+ int in_use; /* 1 if in use, 0 otherwise */
+ int flags; /* Flags from open */
+} __no_os_file_descriptor;
+
+#define __FD_Is_valid( _fd ) \
+ ( (_fd) >= 0 && (_fd) < FOPEN_MAX )
+
+FILEDESC_EXTERN __no_os_file_descriptor __FD_Table[ FOPEN_MAX ];
+
+#endif
diff --git a/sysdeps/standalone/open.c b/sysdeps/standalone/open.c
new file mode 100644
index 0000000..fdcaf65
--- /dev/null
+++ b/sysdeps/standalone/open.c
@@ -0,0 +1,124 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <stddef.h>
+
+#include <stdio.h>
+#include <stdio_lim.h>
+#include <unistd.h>
+
+#define __DECLARE_FILE_DESCRIPTORS__
+
+#include "filedesc.h"
+
+/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
+ a third argument is the file protection. */
+int
+DEFUN(__open, (file, oflag), CONST char *file AND int oflag DOTS)
+{
+ int mode;
+ int newfd;
+ int index;
+
+ if (file == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (oflag & O_CREAT)
+ {
+ va_list arg;
+ va_start(arg, oflag);
+ mode = va_arg(arg, int);
+ va_end(arg);
+ }
+
+ /*
+ * Find an open slot.
+ */
+
+ newfd = -1;
+
+ for ( index=0 ; index< FOPEN_MAX ; index++ )
+ if ( !__FD_Table[ index ].in_use ) {
+ newfd = index;
+ break;
+ }
+
+ if ( newfd == -1 ) {
+ errno = ENFILE;
+ return -1;
+ }
+
+ /*
+ * Initialize the open slot
+ */
+
+ __FD_Table[ newfd ].in_use = 1;
+ __FD_Table[ newfd ].flags = oflag;
+
+ return newfd;
+}
+
+/* Initialization Code for Console I/O */
+
+#ifdef HAVE_GNU_LD
+static
+#endif
+void
+DEFUN(__NONE_init_console_io, (argc, argv, envp),
+ int argc AND char **argv AND char **envp)
+{
+ int index;
+
+ for ( index=0 ; index< FOPEN_MAX ; index++ )
+ __FD_Table[ index ].in_use = 0;
+
+ stdin = fopen( "", "r" );
+
+ stdout = fopen( "", "w" );
+
+ stderr = fopen( "", "w" );
+
+ /*
+ * Line buffer the standard input and output and use no buffering for
+ * standard error.
+ */
+
+ setvbuf( stdin, NULL, _IOLBF, BUFSIZ );
+ setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
+ setvbuf( stderr, NULL, _IONBF, BUFSIZ );
+
+ (void) &__NONE_init_console_io; /* Avoid "defined but not used" warning. */
+}
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+text_set_element (__libc_subinit, __NONE_init_console_io);
+
+#endif
diff --git a/sysdeps/standalone/read.c b/sysdeps/standalone/read.c
new file mode 100644
index 0000000..1c87b11
--- /dev/null
+++ b/sysdeps/standalone/read.c
@@ -0,0 +1,85 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stddef.h>
+
+#include "filedesc.h"
+#include <fcntl.h>
+#include <standalone.h>
+
+/* Read NBYTES into BUF from FD. Return the number read or -1. */
+ssize_t
+DEFUN(__read, (fd, buf, nbytes),
+ int fd AND PTR buf AND size_t nbytes)
+{
+ char *buffer = (char *) buf;
+ int data;
+ int poll;
+
+ errno = 0;
+
+ if (nbytes == 0)
+ return 0;
+
+ if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (buf == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if ( __FD_Table[ fd ].flags & O_WRONLY ) /* is it write only? */
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ /* If this is a non-blocking fd, then we want to poll the console. */
+
+ poll = ( __FD_Table[ fd ].flags & O_NONBLOCK ) ? 1 : 0;
+
+ /* Read a single character. This is a cheap way to insure that the
+ upper layers get every character because _Console_Getc can't timeout
+ or otherwise know when to stop. */
+
+
+ data = _Console_Getc(poll);
+
+ if ( data == -1 ) /* if no data return */
+ return -1;
+
+ (void) _Console_Putc(data); /* echo the character */
+
+ if ( data == '\r' ) { /* translate CR -> CR/LF */
+ (void) _Console_Putc('\n');
+ data = '\n';
+ }
+
+ *buffer = data;
+ return 1;
+}
diff --git a/sysdeps/standalone/standalone.h b/sysdeps/standalone/standalone.h
new file mode 100644
index 0000000..07f8355
--- /dev/null
+++ b/sysdeps/standalone/standalone.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STANDALONE_H
+#define _STANDALONE_H
+
+#include <sys/cdefs.h>
+
+extern void _Board_Initialize __PP ((void));
+
+extern int _Console_Putc __P ((char c));
+extern int _Console_Getc __P ((int poll));
+
+#endif
diff --git a/sysdeps/standalone/stdio_lim.h b/sysdeps/standalone/stdio_lim.h
new file mode 100644
index 0000000..5552bc4
--- /dev/null
+++ b/sysdeps/standalone/stdio_lim.h
@@ -0,0 +1,27 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define L_tmpnam 1
+#define TMPMAX 0
+#define L_ctermid 1
+#define L_cuserid 1
+#define FOPEN_MAX 16
+#define FILENAME_MAX 14
diff --git a/sysdeps/standalone/write.c b/sysdeps/standalone/write.c
new file mode 100644
index 0000000..22c01a4
--- /dev/null
+++ b/sysdeps/standalone/write.c
@@ -0,0 +1,72 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Ported to standalone by Joel Sherrill jsherril@redstone-emh2.army.mil,
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sysdep.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stddef.h>
+
+#include "filedesc.h"
+#include <fcntl.h>
+#include <standalone.h>
+
+/* Write NBYTES of BUF to FD. Return the number written, or -1. */
+ssize_t
+DEFUN(__write, (fd, buf, nbytes),
+ int fd AND CONST PTR buf AND size_t nbytes)
+{
+ int count;
+ CONST char *data = buf;
+
+ if (nbytes == 0)
+ return 0;
+ if ( !__FD_Is_valid( fd ) || !__FD_Table[ fd ].in_use )
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (buf == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if ( !(__FD_Table[ fd ].flags & (O_WRONLY|O_RDWR)) ) /* is it writeable? */
+ {
+ errno = EBADF;
+ return -1;
+ }
+
+ /*
+ * All open file descriptors are mapped to the console.
+ */
+
+ for ( count=0 ; count != nbytes ; count++ ) {
+ if ( _Console_Putc(data[ count ]) == -1 )
+ return -1;
+ if ( data[count] == '\n' && _Console_Putc('\r') == -1 )
+ return -1;
+ }
+
+ return count;
+}
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a1106e3b5e9c7c2bfa96255f7c0d86c95f8d0df7
commit a1106e3b5e9c7c2bfa96255f7c0d86c95f8d0df7
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 25 18:07:56 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i386/force_cpu386/_exit.c b/sysdeps/standalone/i386/force_cpu386/_exit.c
new file mode 100644
index 0000000..011bb8b
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/_exit.c
@@ -0,0 +1,47 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+/* This returns control to FORCEbug. */
+
+void DEFUN_VOID(Bsp_cleanup);
+
+/* The function `_exit' should take a status argument and simply
+ terminate program execution, using the low-order 8 bits of the
+ given integer as status. */
+
+__NORETURN void
+DEFUN(_exit, (status), int status)
+{
+ /* status is ignored */
+ Bsp_cleanup();
+}
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+stub_warning(_exit);
+
+#endif /* GNU stabs. */
diff --git a/sysdeps/standalone/i386/force_cpu386/strtsupp.S b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
new file mode 100644
index 0000000..6b78a8c
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/strtsupp.S
@@ -0,0 +1,89 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This file assists the board independent startup code by
+ * loading the proper segment register values. The values
+ * loaded are dependent on the FORCEBUG.
+ *
+ * NOTE: No stack has been established when this routine
+ * is invoked. It returns by jumping back to the start code.
+ *
+ */
+
+/*
+ * FORCEBUG loads us into a virtual address space which
+ * really starts at PHYSICAL_ADDRESS_BASE.
+ *
+ */
+
+.set PHYSICAL_ADDRESS_BASE, 0x00002000
+
+/*
+ * At reset time, FORCEBUG normally has the segment selectors preloaded.
+ * If a human resets the instruction pointer, this will not have occurred.
+ * However, no guarantee can be made of the other registers if cs:ip was
+ * modified to restart the program. Because of this, the BSP reloads all
+ * segment registers (except cs) with the values they have following
+ * a reset.
+ */
+
+
+.set RESET_SS, 0x40 # initial value of stack segment register
+.set RESET_DS, 0x40 # initial value of data segment register
+.set RESET_ES, 0x40 # initial value of extra segment register
+.set RESET_FS, 0x40 # initial value of "f" segment register
+.set RESET_GS, 0x30 # initial value of "g" segment register
+
+
+#define LOAD_SEGMENTS(_value,_segreg) \
+ movw $_value##,%ax ; \
+ movw %ax,##_segreg
+
+
+ .global _load_segments
+
+ .global _establish_stack
+
+_load_segments:
+
+ LOAD_SEGMENTS( RESET_SS, %ss )
+ LOAD_SEGMENTS( RESET_DS, %ds )
+ LOAD_SEGMENTS( RESET_ES, %es )
+ LOAD_SEGMENTS( RESET_FS, %fs )
+ LOAD_SEGMENTS( RESET_GS, %gs )
+
+ jmp _establish_stack # return to the bsp entry code
+
+ .global _return_to_monitor
+_return_to_monitor:
+
+ movb $0,%al
+ int $0x20 # restart FORCEbug
+ jmp start # FORCEbug does not reset PC
+
+ .data
+
+ .global _Do_Load_IDT
+_Do_Load_IDT: .byte 1
+
+ .global _Do_Load_GDT
+_Do_Load_GDT: .byte 0
+
diff --git a/sysdeps/standalone/i960/nindy960/Makefile b/sysdeps/standalone/i960/nindy960/Makefile
new file mode 100644
index 0000000..e6e65ea
--- /dev/null
+++ b/sysdeps/standalone/i960/nindy960/Makefile
@@ -0,0 +1,23 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+# On-Line Applications Research Corporation.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+
+# The nindy960 support has only been tested on the following boards:
+#
+# + Cyclone CVME961 VMEbus single board computer.
diff --git a/sysdeps/standalone/i960/nindy960/_exit.c b/sysdeps/standalone/i960/nindy960/_exit.c
new file mode 100644
index 0000000..33553a7
--- /dev/null
+++ b/sysdeps/standalone/i960/nindy960/_exit.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+/* The function `_exit' should take a status argument and simply
+ terminate program execution, using the low-order 8 bits of the
+ given integer as status. */
+
+/* This returns control to Nindy. */
+
+__NORETURN void
+DEFUN(_exit, (status), int status)
+{
+ /* status is ignored */
+
+ asm volatile( "mov 0,g0; \
+ fmark ; \
+ syncf ; \
+ .word 0xfeedface ; \
+ bx start" : : );
+ /* The constant 0xfeedface is a magic word for break which
+ * is defined by NINDY. The branch extended restarts the
+ * application if the user types "go".
+ */
+}
+
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+stub_warning(_exit);
+
+#endif /* GNU stabs. */
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/Makefile b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
new file mode 100644
index 0000000..33f049c
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/Makefile
@@ -0,0 +1,22 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+# On-Line Applications Research Corporation.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq (bare,$(subdir))
+install-lib += mvme136.ld
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61e2ba14eb0beae01233090040395efa59dd7592
commit 61e2ba14eb0beae01233090040395efa59dd7592
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 25 17:35:58 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/i386/force_cpu386/Makefile b/sysdeps/standalone/i386/force_cpu386/Makefile
new file mode 100644
index 0000000..429f822
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/Makefile
@@ -0,0 +1,22 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+# On-Line Applications Research Corporation.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq (bare,$(subdir))
+install-lib += force_cpu386.ld
+endif
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/_exit.c b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
new file mode 100644
index 0000000..b766902
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/_exit.c
@@ -0,0 +1,58 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include "__m68020.h"
+
+/* Return control to 135Bug */
+
+void
+DEFUN_VOID(__exit_trap)
+{
+ set_vbr( 0 ); /* restore 135Bug vectors */
+ asm volatile( "trap #15" ); /* trap to 135Bug */
+ asm volatile( ".short 0x63" ); /* return to 135Bug (.RETURN) */
+ asm volatile( "jmp main" ); /* restart program */
+}
+
+/* The function `_exit' should take a status argument and simply
+ terminate program execution, using the low-order 8 bits of the
+ given integer as status. */
+
+__NORETURN void
+DEFUN(_exit, (status), int status)
+{
+ /* status is ignored */
+
+
+ M68Kvec[ 45 ] = exit_trap; /* install exit_trap handler */
+ asm volatile( "trap #13" ); /* insures SUPV mode */
+}
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+stub_warning(_exit);
+
+#endif /* GNU stabs. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cee6cb4fc23e08f528580ec84a6c4d361ec16feb
commit cee6cb4fc23e08f528580ec84a6c4d361ec16feb
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 25 14:44:14 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/i960/nindy960/console.c b/sysdeps/standalone/i960/nindy960/console.c
new file mode 100644
index 0000000..fcdaade
--- /dev/null
+++ b/sysdeps/standalone/i960/nindy960/console.c
@@ -0,0 +1,76 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__i960ca.h"
+
+/* Console IO routines for a NINDY960 board. */
+
+/*
+ * NINDY_IO( ... )
+ *
+ * Interface to NINDY.
+ */
+
+#define NINDY_INPUT 0
+#define NINDY_OUTPUT 1
+
+void ___NINDY_IO_WRAPPER( void ) /* never called */
+{
+ asm volatile ( " .text" );
+ asm volatile ( " .align 4" );
+ asm volatile ( " .globl _NINDY_IO" );
+ asm volatile ( "_NINDY_IO:" );
+ asm volatile ( " calls 0 /* call console routines */" );
+ asm volatile ( " ret" );
+}
+
+/***** !!!! HOW DO I EXFUN NINDY_IO? !!!! *****/
+
+/* _Console_Putc
+
+This routine transmits a character using NINDY. */
+
+int
+DEFUN( _Console_Putc, (ch), char ch )
+{
+ NINDY_IO( NINDY_OUTPUT, ch );
+ return( 0 );
+}
+
+/* _Console_Getc
+
+This routine reads a character from NINDY and returns it. */
+
+int
+DEFUN( _Console_Getc, (poll), int poll )
+{
+ char ch;
+
+ if ( poll ) {
+ /* I don't know how to poll with NINDY */
+ return -1;
+ } else {
+ NINDY_IO( NINDY_INPUT, &ch );
+ return ch;
+ }
+}
diff --git a/sysdeps/standalone/i960/start.S b/sysdeps/standalone/i960/start.S
new file mode 100644
index 0000000..6cdc604
--- /dev/null
+++ b/sysdeps/standalone/i960/start.S
@@ -0,0 +1,137 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* entry.s
+ *
+ * This file contains the entry point for the application.
+ * The name of this entry point is compiler dependent.
+ * It jumps to the BSP which is responsible for performing
+ * all initialization.
+ *
+ */
+
+ .text
+ .globl start # GNU960 default entry point
+
+start:
+ mov 3, r12
+ modpc r12, r12, r12 # enable tracing/trace faults
+ mov g5, g5 # NOP
+ mov 0, g14 # initialize constant for C
+
+ /*
+ * zero out uninitialized data area
+ */
+zerobss:
+ lda _end, r4 /* find end of .bss */
+ lda _bss_start, r5 /* find beginning of .bss */
+ ldconst 0, r6
+
+loop: st r6, (r5) /* to zero out uninitialized */
+ addo 4, r5, r5 /* data area */
+ cmpobl r5, r4, loop /* loop until _end reached */
+
+
+ lda heap_memory, r12 /* tell C lib where heap is */
+ st r12,___C_heap_start
+ lda heap_size, r12 /* tell C lib how big heap is */
+ st r12,___C_heap_size
+ lda stack_memory,r12 /* set up stack pointer: */
+ mov r12, sp
+ mov 0, g14 /* initialize constant for C */
+
+ call init_frames
+ ret /* return to monitor */
+
+init_frames:
+ ldconst 0x3b001000, g0
+ ldconst 0x00009107, g1
+ modac g1, g0, g0 /* set AC controls */
+
+ /*
+ * Call application mainline.
+ * Someday, real values of argc and argv will be set up.
+ * For now, they are set to 0.
+ */
+
+ callx __Board_Initialize /* Initialize the board */
+
+ ldconst 0,g0
+ ldconst 0,g1
+ ldconst 0,g2
+ callx ___libc_init /* initialize the library and */
+ /* call main */
+ /*
+ * if we return from main, we have "fallen" off the end
+ * of the program, therefore status is 0
+ * so move 0 to g0 (exit parameter)
+ */
+
+ mov 0, g0
+ callx ___exit
+ ret
+
+
+/*
+ * Data Declarations. Start with a macro which helps declare space.
+ */
+
+#define DECLARE_SPACE(_name,_space,_align) \
+ .globl _name ; \
+ .align _align ; \
+.comm _name##,_space
+
+#define DECLARE_LABEL(_name) \
+ .globl _name ; \
+_name##:
+
+#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1)
+
+/*
+ * Require environment stuff
+ */
+
+DECLARE_LABEL(_environ)
+DECLARE_PTR(environ)
+
+DECLARE_LABEL(_errno)
+DECLARE_U32(errno)
+
+/*
+ * Stack Size and Space
+ */
+
+ .set stack_size, 0x20000
+
+DECLARE_SPACE(stack_memory,stack_size,4)
+DECLARE_LABEL(stack_end)
+
+/*
+ * Heap Size and Space
+ */
+
+ .set heap_size, 0x20000
+
+DECLARE_SPACE(heap_memory,heap_size,4)
+DECLARE_LABEL(heap_end)
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd1a0b2259f03c19b313b26c006f5debddfd07b4
commit bd1a0b2259f03c19b313b26c006f5debddfd07b4
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 25 13:55:25 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/i386/start.S b/sysdeps/standalone/i386/start.S
new file mode 100644
index 0000000..8331a33
--- /dev/null
+++ b/sysdeps/standalone/i386/start.S
@@ -0,0 +1,323 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* entry.s
+ *
+ * This file contains the entry point for the application.
+ * The name of this entry point is compiler dependent.
+ * It jumps to the BSP which is responsible for performing
+ * all initialization.
+ *
+ */
+
+ .data
+ .global _Do_Load_IDT
+ .global _Do_Load_GDT
+
+ .text
+ .global start # GNU default entry point
+ .global _establish_stack
+
+ .global _bsp_start
+ .global _load_segments
+ .global __exit
+
+start:
+ nop
+ cli # DISABLE INTERRUPTS!!!
+#
+# Load the segment registers
+#
+# NOTE: Upon return, gs will contain the segment descriptor for
+# a segment which maps directly to all of physical memory.
+#
+ jmp _load_segments # load board dependent segments
+
+#
+# Set up the stack
+#
+
+_establish_stack:
+
+ movl $stack_end,%esp # set stack pointer
+ movl $stack_end,%ebp # set base pointer
+
+#
+# Zero out the BSS segment
+#
+zero_bss:
+ cld # make direction flag count up
+ movl $_end,%ecx # find end of .bss
+ movl $_bss_start,%edi # edi = beginning of .bss
+ subl %edi,%ecx # ecx = size of .bss in bytes
+ shrl $2,%ecx # size of .bss in longs
+ xorl %eax,%eax # value to clear out memory
+ repne # while ecx != 0
+ stosl # clear a long in the bss
+
+#
+# Set the C heap information for malloc
+#
+ movl $heap_size,___C_heap_size # set ___C_heap_size
+ movl $heap_memory,___C_heap_start # set ___C_heap_start
+
+#
+# Copy the Global Descriptor Table to our space
+#
+
+ sgdt _Original_GDTR # save original GDT
+ movzwl _Original_GDTR_limit,%ecx # size of GDT in bytes; limit
+ # is 8192 entries * 8 bytes per
+
+ # make ds:esi point to the original GDT
+
+ movl _Original_GDTR_base,%esi
+ push %ds # save ds
+ movw %gs,%ax
+ movw %ax,%ds
+
+ # make es:edi point to the new (our copy) GDT
+ movl $_Global_descriptor_table,%edi
+
+ rep
+ movsb # copy the GDT (ds:esi -> es:edi)
+
+ pop %ds # restore ds
+
+ # Build and load new contents of GDTR
+ movw _Original_GDTR_limit,%ecx # set new limit
+ movw %cx,_New_GDTR_limit
+
+ push $_Global_descriptor_table
+ push %es
+ call _Logical_to_physical
+ addl $6,%esp
+ movl %eax,_New_GDTR_base # set new base
+
+ cmpb $0,_Do_Load_GDT # Should the new GDT be loaded?
+ je no_gdt_load # NO, then branch
+ lgdt _New_GDTR # load the new GDT
+no_gdt_load:
+
+#
+# Copy the Interrupt Descriptor Table to our space
+#
+
+ sidt _Original_IDTR # save original IDT
+ movzwl _Original_IDTR_limit,%ecx # size of IDT in bytes; limit
+ # is 256 entries * 8 bytes per
+
+
+ # make ds:esi point to the original IDT
+ movl _Original_IDTR_base,%esi
+
+ push %ds # save ds
+ movw %gs,%ax
+ movw %ax,%ds
+
+ # make es:edi point to the new (our copy) IDT
+ movl $_Interrupt_descriptor_table,%edi
+
+ rep
+ movsb # copy the IDT (ds:esi -> es:edi)
+ pop %ds # restore ds
+
+ # Build and load new contents of IDTR
+ movw _Original_IDTR_limit,%ecx # set new limit
+ movw %cx,_New_IDTR_limit
+
+ push $_Interrupt_descriptor_table
+ push %es
+ call _Logical_to_physical
+ addl $6,%esp
+ movl %eax,_New_IDTR_base # set new base
+
+ cmpb $0,_Do_Load_IDT # Should the new IDT be loaded?
+ je no_idt_load # NO, then branch
+ lidt _New_IDTR # load the new IDT
+no_idt_load:
+
+#
+# Initialize the i387.
+#
+# Using the NO WAIT form of the instruction insures that if
+# it is not present the board will not lock up or get an
+# exception.
+#
+
+ fninit # MUST USE NO-WAIT FORM
+
+ call __Board_Initialize # initialize the board
+
+ pushl $0 # envp = NULL
+ pushl $0 # argv = NULL
+ pushl $0 # argc = NULL
+ call ___libc_init # initialize the library and
+ # call main
+ addl $12,%esp
+
+ pushl $0 # argc = NULL
+ call __exit # call the Board specific exit
+ addl $4,%esp
+
+#
+# Clean up
+#
+
+
+ .global _Bsp_cleanup
+
+ .global _return_to_monitor
+
+_Bsp_cleanup:
+ cmpb $0,_Do_Load_IDT # Was the new IDT loaded?
+ je no_idt_restore # NO, then branch
+ lidt _Original_IDTR # restore the new IDT
+no_idt_restore:
+
+ cmpb $0,_Do_Load_GDT # Was the new GDT loaded?
+ je no_gdt_restore # NO, then branch
+ lgdt _Original_GDTR # restore the new GDT
+no_gdt_restore:
+ jmp _return_to_monitor
+
+#
+# void *Logical_to_physical(
+# rtems_unsigned16 segment,
+# void *address
+# );
+#
+# Returns thirty-two bit physical address for segment:address.
+#
+
+ .global _Logical_to_physical
+
+.set SEGMENT_ARG, 4
+.set ADDRESS_ARG, 8
+
+_Logical_to_physical:
+
+ xorl %eax,%eax # clear eax
+ movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
+ movl $_Global_descriptor_table,%edx # edx = address of our GDT
+ addl %ecx,%edx # edx = address of desired entry
+ movb 7(%edx),%ah # ah = base 31:24
+ movb 4(%edx),%al # al = base 23:16
+ shll $16,%eax # move ax into correct bits
+ movw 2(%edx),%ax # ax = base 0:15
+ movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
+ addl %eax,%ecx # ecx = physical address equivalent
+ movl %ecx,%eax # eax = ecx
+ ret
+
+#
+# void *Physical_to_logical(
+# rtems_unsigned16 segment,
+# void *address
+# );
+#
+# Returns thirty-two bit physical address for segment:address.
+#
+
+ .global _Physical_to_logical
+
+#.set SEGMENT_ARG, 4
+#.set ADDRESS_ARG, 8 -- use sets from above
+
+_Physical_to_logical:
+
+ xorl %eax,%eax # clear eax
+ movzwl SEGMENT_ARG(%esp),%ecx # ecx = segment value
+ movl $_Global_descriptor_table,%edx # edx = address of our GDT
+ addl %ecx,%edx # edx = address of desired entry
+ movb 7(%edx),%ah # ah = base 31:24
+ movb 4(%edx),%al # al = base 23:16
+ shll $16,%eax # move ax into correct bits
+ movw 2(%edx),%ax # ax = base 0:15
+ movl ADDRESS_ARG(%esp),%ecx # ecx = address to convert
+ subl %eax,%ecx # ecx = logical address equivalent
+ movl %ecx,%eax # eax = ecx
+ ret
+
+
+/*
+ * Data Declarations. Start with a macro which helps declare space.
+ */
+
+ .bss
+
+#define DECLARE_SPACE(_name,_space,_align) \
+ .globl _name ; \
+ .align _align ; \
+_name##: .space _space
+
+#define DECLARE_LABEL(_name) \
+ .globl _name ; \
+_name##:
+
+#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1)
+
+/*
+ * Require environment stuff
+ */
+
+DECLARE_LABEL(_environ)
+DECLARE_PTR(environ)
+
+DECLARE_LABEL(_errno)
+DECLARE_U32(errno)
+
+/*
+ * Miscellaneous Variables used to restore the CPU state.
+ *
+ * Start with a macro to declare the space for the contents of
+ * a Descriptor Table register.
+ */
+
+#define DECLARE_DTR_SPACE(_name) \
+ .global _name ; \
+ .align 4 ; \
+_name##: ; \
+_name##_limit: .space 2 ; \
+_name##_base: .space 4
+
+DECLARE_SPACE(_Interrupt_descriptor_table,256*8,4)
+DECLARE_SPACE(_Global_descriptor_table,8192*8,4)
+
+DECLARE_DTR_SPACE(_Original_IDTR)
+DECLARE_DTR_SPACE(_New_IDTR)
+DECLARE_DTR_SPACE(_Original_GDTR)
+DECLARE_DTR_SPACE(_New_GDTR)
+
+DECLARE_SPACE(_Physical_base_of_ds,4,4)
+DECLARE_SPACE(_Physical_base_of_cs,4,4)
+
+/*
+ * Stack Size and Space
+ */
+
+ .set stack_size, 0x20000
+
+DECLARE_SPACE(stack_memory,stack_size,4)
+DECLARE_LABEL(stack_end)
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=55bb85f22cf02644de5fec43a5b1f06f23f4aa00
commit 55bb85f22cf02644de5fec43a5b1f06f23f4aa00
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 25 00:09:09 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/i386/force_cpu386/brdinit.c b/sysdeps/standalone/i386/force_cpu386/brdinit.c
new file mode 100644
index 0000000..46b5691
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/brdinit.c
@@ -0,0 +1,44 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__i386.h"
+
+/* _Board_Initialize()
+
+This routine initializes the FORCE CPU386 board. */
+
+void DEFUN_VOID(_Console_Initialize);
+
+void
+DEFUN_VOID(_Board_Initialize)
+{
+ /*
+ * FORCE documentation incorrectly states that the bus request
+ * level is initialized to 3. It is actually initialized by
+ * FORCEbug to 0.
+ */
+
+ outport_byte( 0x00, 0x3f ); /* resets VMEbus request level */
+
+ _Console_Initialize();
+}
diff --git a/sysdeps/standalone/i386/force_cpu386/console.c b/sysdeps/standalone/i386/force_cpu386/console.c
new file mode 100644
index 0000000..a9d05d3
--- /dev/null
+++ b/sysdeps/standalone/i386/force_cpu386/console.c
@@ -0,0 +1,163 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__i386.h"
+
+/* Console IO routines for a FORCE CPU386 board. */
+
+/* Force CPU/386 specific IO addressing
+ *
+ * The following determines whether Port B or the Console should
+ * be used for console I/O. Setting ONE (and only ONE) of these to 1
+ * enables I/O on that port.
+ *
+ * PORT A - DUSCC MC68562 Channel A (*** not supported here ***)
+ * PORT B - DUSCC MC68562 Channel B
+ * PORT C - MFP MC68901 Channel (*** FORCEbug console ***)
+ */
+
+#define PORTB 1 /* use port b as console */
+#define PORTC 0 /* use console port as console */
+
+#if ( PORTB == 1 )
+#define TX_STATUS 0x1b6 /* DUSCC General Status Register */
+#define RX_STATUS 0x1b6 /* DUSCC General Status Register */
+#define TX_BUFFER 0x1e0 /* DUSCC Transmitter Channel B */
+#define RX_BUFFER 0x1e8 /* DUSCC Receiver Channel B */
+#define Is_tx_ready( _status ) ( (_status) & 0x20 )
+#define Is_rx_ready( _status ) ( (_status) & 0x10 )
+#endif
+
+#if ( PORTC == 1 )
+#define TX_STATUS 0x12c /* MFP Transmit Status Register */
+#define RX_STATUS 0x12a /* MFP Receive Status Register */
+#define TX_BUFFER 0x12e /* MFP Transmitter Channel */
+#define RX_BUFFER 0x12e /* MFP Receiver Channel */
+#define Is_tx_ready( _status ) ( (_status) & 0x80 )
+#define Is_rx_ready( _status ) ( (_status) & 0x80 )
+#endif
+
+/* _Console_Initialize
+
+On the Force board the console require some initialization. */
+
+void
+DEFUN_VOID(_Console_Initialize)
+{
+ register unsigned8 ignored;
+
+ /* FORCE technical support mentioned that it may be necessary to
+ read the DUSCC RX_BUFFER port four times to remove all junk.
+ This code is a little more paranoid. */
+
+ inport_byte( RX_BUFFER, ignored );
+ inport_byte( RX_BUFFER, ignored );
+ inport_byte( RX_BUFFER, ignored );
+ inport_byte( RX_BUFFER, ignored );
+ inport_byte( RX_BUFFER, ignored );
+}
+
+/* Miscellaneous support for console IO */
+
+static inline int _Force386_is_rx_ready()
+{
+ register unsigned8 status;
+
+ inport_byte( RX_STATUS, status );
+
+ if ( Is_rx_ready( status ) ) return 1;
+ else return 0;
+}
+
+static inline int _Force386_is_tx_ready()
+{
+ register unsigned8 status;
+
+ inport_byte( TX_STATUS, status );
+
+ if ( Is_tx_ready( status ) ) return 1;
+ else return 0;
+}
+
+
+static inline int _Force386_read_data()
+{
+ register unsigned8 ch;
+
+#if ( PORTB == 1 )
+ /* Force example code resets the Channel B Receiver here.
+ * It appears to cause XON's to be lost.
+ */
+
+ /* outport_byte( RX_STATUS, 0x10 ); */
+#endif
+
+ inport_byte( RX_BUFFER, ch );
+
+ return ch;
+}
+
+/* _Console_Putc
+
+This routine transmits a character. It supports XON/XOFF flow control. */
+
+#define XON 0x11 /* control-Q */
+#define XOFF 0x13 /* control-S */
+
+int
+DEFUN( _Console_Putc, (ch), char ch )
+{
+ register unsigned8 inch;
+
+ while ( !_Force386_is_tx_ready() );
+
+ while ( _Force386_is_rx_ready() == 1 ) { /* must be an XOFF */
+ inch = _Force386_read_data();
+ if ( inch == XOFF )
+ do {
+ while ( _Force386_is_rx_ready() == 0 );
+ inch = _Force386_read_data();
+ } while ( inch != XON );
+ }
+
+ outport_byte( TX_BUFFER, ch );
+ return( 0 );
+}
+
+/* _Console_Getc
+
+This routine reads a character from the UART and returns it. */
+
+int
+DEFUN( _Console_Getc, (poll), int poll )
+{
+ if ( poll ) {
+ if ( !_Force386_is_rx_ready() )
+ return -1;
+ else
+ return _Force386_read_data();
+ } else {
+ while ( !_Force386_is_rx_ready() );
+ return _Force386_read_data();
+ }
+}
diff --git a/sysdeps/standalone/i960/nindy960/brdinit.c b/sysdeps/standalone/i960/nindy960/brdinit.c
new file mode 100644
index 0000000..a59c97c
--- /dev/null
+++ b/sysdeps/standalone/i960/nindy960/brdinit.c
@@ -0,0 +1,66 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__i960ca.h"
+
+/* _Board_Initialize()
+
+This routine initializes the board.
+
+NOTE: Only tested on a Cyclone CVME961 but should be OK on any i960ca board. */
+
+void
+DEFUN_VOID(_Board_Initialize)
+{
+ struct i80960ca_prcb *prcb; /* ptr to processor control block */
+ struct i80960ca_ctltbl *ctl_tbl; /* ptr to control table */
+
+ static inline struct i80960ca_prcb *get_prcb()
+ { register struct i80960ca_prcb *_prcb = 0;
+ asm volatile( "calls 5; \
+ mov g0,%0" \
+ : "=d" (_prcb) \
+ : "0" (_prcb) );
+ return ( _prcb );
+ }
+
+ prcb = get_prcb();
+ ctl_tbl = prcb->control_tbl;
+
+ /* The following configures the data breakpoint (which must be set
+ * before this is executed) to break on writes only.
+ */
+
+ ctl_tbl->bpcon &= ~0x00cc0000;
+ reload_ctl_group( 6 );
+
+ /* bit 31 of the Register Cache Control can be set to
+ * enable an alternative caching algorithm. It does
+ * not appear to help our applications.
+ */
+
+ /* Configure Number of Register Caches */
+
+ prcb->reg_cache_cfg = 8;
+ soft_reset( prcb );
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b86171d64da1fcde3eaed1669f55e4e118e1064
commit 7b86171d64da1fcde3eaed1669f55e4e118e1064
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 24 22:57:24 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/m68k/m68020/start.S b/sysdeps/standalone/m68k/m68020/start.S
new file mode 100644
index 0000000..cbabf5b
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/start.S
@@ -0,0 +1,155 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* entry.s
+ *
+ * This file contains the entry point for the application.
+ * The name of this entry point is compiler dependent.
+ * It jumps to the BSP which is responsible for performing
+ * all initialization.
+ */
+
+ .text
+ .globl start | Default entry point
+ .globl _start | Default entry point
+ .globl M68Kvec | Vector Table
+ .globl _M68Kvec | Vector Table
+
+start:
+_start:
+M68Kvec: | standard location for vectors
+_M68Kvec: | standard location for vectors
+ nop | for linkers with problem
+ | using location zero as entry
+ jmp around
+ .space 4088 | to avoid initial intr stack
+ | from 135BUG on MVME13? as entry
+ | and start code at 0x4000
+around:
+ move.w %sr,initial_sr | save initial values
+ movec %isp,%a0
+ movel %a0,initial_isp
+ movec %usp,%a0
+ movel %a0,initial_usp
+ movec %msp,%a0
+ movel %a0,initial_msp
+ oriw #0x0700,%sr | INTERRUPTS OFF!!!
+
+
+
+ |
+ | zero out uninitialized data area
+ |
+zerobss:
+ moveal #end,%a0 | find end of .bss
+ moveal #_bss_start,%a1 | find beginning of .bss
+ movel #0,%d0
+
+loop: movel #0,%a1@+ | to zero out uninitialized
+ cmpal %a0,%a1
+ jlt loop | loop until _end reached
+
+ movel #heap_size,__C_heap_size | set ___C_heap_size
+ movel #heap_memory,__C_heap_start | set ___C_heap_start
+ moveal #interrupt_stack_end,%a0 | set interrupt stack pointer
+ movec %a0,%isp
+ moveal #stack_end,%a0 | set master stack pointer
+ movec %a0,%msp
+ moveal #stack_end,%a6 | set base pointer
+ movw #0x3000,%sr | SUPV MODE,INTERRUPTS ON!!!
+
+#ifdef NEED_UNDERSCORES
+ jsr __Board_Initialize | initialize the board
+#else
+ jsr _Board_Initialize | initialize the board
+#endif
+
+ move.l #0,%sp@- | envp = NULL
+ move.l #0,%sp@- | argv = NULL
+ move.l #0,%sp@- | argc = NULL
+#ifdef NEED_UNDERSCORES
+ jsr ___libc_init | initialize the library and
+ | call main
+#else
+ jsr __libc_init | initialize the library and
+ | call main
+#endif
+ add.l #12,%sp
+
+ move.l #0,%sp@- | argc = NULL
+ jsr __exit | call the Board specific exit
+ addq.l #4,%sp
+
+ move.l initial_isp,%a0 | if __exit returns then we can
+ movec %a0,%isp | restore the initial values
+ move.l initial_usp,%a0
+ movec %a0,%usp
+ move.l initial_msp,%a0
+ movec %a0,%msp
+ move.w initial_sr,%sr
+ rts
+
+
+ .bss
+
+/*
+ * So initial stack registers and status register can be saved.
+ */
+
+#define DECLARE_SPACE(_name,_space,_align) \
+ .globl _name ; \
+ .align _align ; \
+_name##: .space _space
+
+#define DECLARE_LABEL(_name) \
+ .globl _name ; \
+_name##:
+
+#define DECLARE_PTR(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U32(_name) DECLARE_SPACE(_name,4,2)
+#define DECLARE_U16(_name) DECLARE_SPACE(_name,2,1)
+
+DECLARE_U32(initial_isp)
+DECLARE_U32(initial_msp)
+DECLARE_U32(initial_usp)
+DECLARE_U16(initial_sr)
+
+/*
+ * Require environment stuff
+ */
+
+DECLARE_LABEL(_environ)
+DECLARE_PTR(environ)
+
+DECLARE_LABEL(_errno)
+DECLARE_U32(errno)
+
+/*
+ * Stack Size and Space
+ */
+
+ .set stack_size, 0x20000
+
+DECLARE_SPACE(stack_memory,stack_size,4)
+DECLARE_LABEL(stack_end)
+
+DECLARE_SPACE(interrupt_stack_memory,0x1000,4)
+DECLARE_LABEL(interrupt_stack_end)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=56a805307ff1f62e34927bf8853564f3511ea5ee
commit 56a805307ff1f62e34927bf8853564f3511ea5ee
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 24 22:55:10 1994 +0000
Initial revision
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
new file mode 100644
index 0000000..55c28d4
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/brdinit.c
@@ -0,0 +1,53 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__m68020.h"
+
+/* _Board_Initialize()
+
+This routine initializes the Motorola MVME135/MVME136. */
+
+void
+DEFUN_VOID(_Board_Initialize)
+{
+ mc68020_isr *monitors_vector_table;
+ int index;
+
+ monitors_vector_table = (mc68020_isr *)0; /* 135Bug Vectors are at 0 */
+ set_vbr( monitors_vector_table );
+
+ for ( index=2 ; index<=255 ; index++ )
+ M68Kvec[ index ] = monitors_vector_table[ 32 ];
+
+ M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */
+ M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
+ M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
+ M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
+
+ set_vbr( &M68Kvec );
+
+ (*(unsigned char *)0xfffb0067) = 0x7f; /* make VME access round-robin */
+
+ enable_caching();
+
+}
diff --git a/sysdeps/standalone/m68k/m68020/mvme136/console.c b/sysdeps/standalone/m68k/m68020/mvme136/console.c
new file mode 100644
index 0000000..7c1cd41
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme136/console.c
@@ -0,0 +1,101 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
+ On-Line Applications Research Corporation.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <standalone.h>
+#include "__m68020.h"
+
+/* Console IO routines for a Motorola MVME135/MVME136 board.
+
+They currently use the B port. It should be possible to
+use the A port by filling in the reset of the chip structure,
+adding an ifdef for PORTA/PORTB, and switching the addresses,
+and maybe the macroes based on the macro. */
+
+/* M68681 DUART chip register structures and constants */
+
+typedef struct {
+ volatile unsigned char fill1[ 5 ]; /* channel A regs ( not used ) */
+ volatile unsigned char isr; /* interrupt status reg */
+ volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */
+ volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */
+ volatile unsigned char srb; /* status reg channel B */
+ volatile unsigned char fill3; /* do not access */
+ volatile unsigned char rbb; /* receive buffer channel B */
+ volatile unsigned char ivr; /* interrupt vector register */
+} r_m681_info;
+
+typedef struct {
+ volatile unsigned char fill1[ 4 ]; /* channel A regs (not used) */
+ volatile unsigned char acr; /* auxillary control reg */
+ volatile unsigned char imr; /* interrupt mask reg */
+ volatile unsigned char fill2[ 2 ]; /* counter regs (not used) */
+ volatile unsigned char mr1mr2b; /* MR1B and MR2B regs */
+ volatile unsigned char csrb; /* clock select reg */
+ volatile unsigned char crb; /* command reg */
+ volatile unsigned char tbb; /* transmit buffer channel B */
+ volatile unsigned char ivr; /* interrupt vector register */
+} w_m681_info;
+
+#define RD_M68681 ((r_m681_info *)0xfffb0040) /* ptr to the M68681 */
+#define WR_M68681 ((w_m681_info *)0xfffb0040) /* ptr to the M68681 */
+#define RXRDYB 0x01 /* status reg recv ready mask */
+#define TXRDYB 0x04 /* status reg trans ready mask */
+
+/* _Console_Putc
+
+This routine transmits a character out the M68681. It supports
+XON/XOFF flow control. */
+
+#define XON 0x11 /* control-Q */
+#define XOFF 0x13 /* control-S */
+
+int
+DEFUN( _Console_Putc, (ch), char ch )
+{
+ while ( ! (RD_M68681->srb & TXRDYB) ) ;
+ while ( RD_M68681->srb & RXRDYB ) /* must be an XOFF */
+ if ( RD_M68681->rbb == XOFF )
+ do {
+ while ( ! (RD_M68681->srb & RXRDYB) ) ;
+ } while ( RD_M68681->rbb != XON );
+
+ WR_M68681->tbb = ch;
+ return( 0 );
+}
+
+/* _Console_Getc
+
+This routine reads a character from the UART and returns it. */
+
+int
+DEFUN( _Console_Getc, (poll), int poll )
+{
+ if ( poll ) {
+ if ( !(RD_M68681->srb & RXRDYB) )
+ return -1;
+ else
+ return RD_M68681->rbb;
+ } else {
+ while ( !(RD_M68681->srb & RXRDYB) );
+ return RD_M68681->rbb;
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eed38fbd8df6d912d8297abd3a464f50d553a2c6
commit eed38fbd8df6d912d8297abd3a464f50d553a2c6
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 24 13:54:00 1994 +0000
entered into RCS
diff --git a/sysdeps/standalone/m68k/m68020/mvme135/Implies b/sysdeps/standalone/m68k/m68020/mvme135/Implies
new file mode 100644
index 0000000..7142fe2
--- /dev/null
+++ b/sysdeps/standalone/m68k/m68020/mvme135/Implies
@@ -0,0 +1,2 @@
+# Motorola MVME135 and MVME136 are compatible.
+standalone/m68k/m68020/mvme136
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1e5c57652a3bb3007563f83e06adb5eb31374556
commit 1e5c57652a3bb3007563f83e06adb5eb31374556
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 22 19:00:39 1994 +0000
(SYSRETURN): New macro.
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index 983aa0e..f4f4b42 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */
#define PC pc
#define SP r29
+#define SYSRETURN r2
struct machine_thread_all_state
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92ae11d4564e4df19bffc862da14a5ba261fb390
commit 92ae11d4564e4df19bffc862da14a5ba261fb390
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 22 09:06:46 1994 +0000
(__sigreturn): Arg is not const.
After restoring SCP->sc_mask, check for pending signals (newly unblocked);
if any, set SS->context to SCP, clear SS->intr_port, and send sig_post
to the signal thread to deliver the pending signals.
Don't write $1 value into the user stack. Instead, write it into the word
just past SCP->sc_pc; then point $1 at SCP->sc_pc and use `op_sigreturn'
pseudo-instruction to restore the PC and $1 from that.
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 8082aca..f02e799 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -19,45 +19,75 @@ Cambridge, MA 02139, USA. */
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/threadvar.h>
+#include <stdlib.h>
int
-__sigreturn (const struct sigcontext *scp)
+__sigreturn (struct sigcontext *scp)
{
struct hurd_sigstate *ss;
mach_port_t *reply_port;
- if (scp == NULL)
+ if (scp == NULL || (scp->sc_mask & _SIG_CANT_MASK))
{
errno = EINVAL;
return -1;
}
- ss = _hurd_self_sigstate ();
+ ss = _hurd_self_sigstate (); /* SS->lock now locked. */
+
+ /* Restore the set of blocked signals, and the intr_port slot. */
ss->blocked = scp->sc_mask;
ss->intr_port = scp->sc_intr_port;
+
+ /* Check for pending signals that were blocked by the old set. */
+ if (ss->pending & ~ss->blocked)
+ {
+ /* There are pending signals that just became unblocked. Wake up the
+ signal thread to deliver them. But first, squirrel away SCP where
+ the signal thread will notice it if it runs another handler, and
+ arrange to have us called over again in the new reality. */
+ ss->context = scp;
+ /* Clear the intr_port slot, since we are not in fact doing
+ an interruptible RPC right now. If SS->intr_port is not null,
+ the SCP context is doing an interruptible RPC, but the signal
+ thread will examine us while we are blocked in the sig_post RPC. */
+ ss->intr_port = MACH_PORT_NULL;
+ __mutex_unlock (&ss->lock);
+ __sig_post (_hurd_msgport, 0, __mach_task_self ());
+ /* If a pending signal was handled, sig_post never returned. */
+ __mutex_lock (&ss->lock);
+ }
+
if (scp->sc_onstack)
- ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
- __mutex_unlock (&ss->lock);
+ {
+ ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
+ /* XXX cannot unlock until off sigstack */
+ abort ();
+ }
+ else
+ __mutex_unlock (&ss->lock);
/* Destroy the MiG reply port used by the signal handler, and restore the
reply port in use by the thread when interrupted. */
reply_port =
(mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
- if (*reply_port != MACH_PORT_NULL)
+ if (*reply_port)
__mach_port_destroy (__mach_task_self (), *reply_port);
*reply_port = scp->sc_reply_port;
+ if (scp->sc_coproc_used & SC_COPROC_USE_FPU)
+ {
+ /* XXX should restore FPU state here */
+ abort ();
+ }
+
/* Load all the registers from the sigcontext. */
#define restore_gpr(n) \
asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1]))
{
register const struct sigcontext *const scpreg asm ("$1") = scp;
-
- /* Just beyond the top of the user stack, store the user's value for $1
- (which we are using for SCPREG). We restore this register as the
- very last thing, below. */
- ((int *) scpreg->sc_gpr[29 - 1])[-1] = scpreg->sc_gpr[0];
+ register int *at asm ("$1");
/* First restore the multiplication result registers. The compiler
will use some temporary registers, so we do this before restoring
@@ -65,6 +95,9 @@ __sigreturn (const struct sigcontext *scp)
asm volatile ("mtlo %0" : : "r" (scpreg->sc_mdlo));
asm volatile ("mthi %0" : : "r" (scpreg->sc_mdhi));
+ /* In the word after the saved PC, store the saved $1 value. */
+ (&scpreg->sc_pc)[1] = scpreg->sc_gpr[0];
+
asm volatile (".set noreorder; .set noat;");
/* Restore the normal registers. */
@@ -98,11 +131,10 @@ __sigreturn (const struct sigcontext *scp)
restore_gpr (30); /* Frame pointer. */
restore_gpr (31); /* Return address. */
- /* Now jump to the saved PC. */
- asm volatile ("lw $1, %0\n" /* Load saved PC into $1. */
- "j $1\n" /* Jump to the saved PC value. */
- "lw $1, -4(sp)\n" /* Restore $1 from stack in delay slot. */
- : : "m" (scpreg->sc_pc));
+ at = &scpreg->sc_pc;
+ /* This is an emulated instruction that will find at the address in $1
+ two words: the PC value to restore, and the $1 value to restore. */
+ asm volatile (".word op_sigreturn");
asm volatile (".set reorder; .set at;");
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62833ce689777098f353bd1d5f952f97175a89e6
commit 62833ce689777098f353bd1d5f952f97175a89e6
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 22 05:02:49 1994 +0000
Include "thread_state.h" instead of <mach/thread_status.h>.
(struct mach_msg_trap_args): New type.
(trampoline): Function removed.
(_hurd_setup_sighandler): Take struct hurd_sigstate * arg instead of FLAGS
and SIGALTSTACK args; take new flag arg RPC_WAIT; use struct
machine_thread_all_state * for STATE arg.
New declared labels `trampoline', `rpc_wait_trampoline' mark asm code at
end of function (after return).
Add another struct sigcontext * to STACKFRAME after the first one, for the
arg to __sigreturn.
If SS->context is set, fill registers in SCP from that instead of STATE,
and reset SS->INTR_PORT from it.
If RPC_WAIT is set, set up to use rpc_wait_trampoline and frob args to
mach_msg_trap syscall in progress so that it will retry the receive
operation (but not resend!).
{rpc_wait_trampoline, trampoline}: New trampoline code.
(_hurd_rcv_interrupted_p): New function.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 4fc9fda..2161cba 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -18,67 +18,240 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <hurd/signal.h>
-#include <mach/thread_status.h>
+#include "thread_state.h"
+
+
+struct mach_msg_trap_args
+ {
+ /* This is the order of arguments to mach_msg_trap. */
+ mach_msg_header_t *msg;
+ mach_msg_option_t option;
+ mach_msg_size_t send_size;
+ mach_msg_size_t rcv_size;
+ mach_port_t rcv_name;
+ mach_msg_timeout_t timeout;
+ mach_port_t notify;
+ };
-static void
-trampoline (void (*handler) (int signo, int sigcode, struct sigcontext *scp),
- int signo, int sigcode, struct sigcontext *scp)
-{
- (*handler) (signo, sigcode, scp);
- (void) __sigreturn (scp); /* Does not return. */
- while (1)
- LOSE; /* Firewall. */
-}
struct sigcontext *
-_hurd_setup_sighandler (int flags,
- __sighandler_t handler,
- struct sigaltstack *sigaltstack,
+_hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
int signo, int sigcode,
- void *state)
+ int rpc_wait,
+ struct machine_thread_all_state *state)
{
- struct mips_thread_state *ts;
+
+ __label__ trampoline, rpc_wait_trampoline;
void *sigsp;
struct sigcontext *scp;
- ts = state;
+ if (ss->context)
+ {
+ /* We have a previous sigcontext that sigreturn was about
+ to restore when another signal arrived. We will just base
+ our setup on that. */
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ memcpy (&state->basic, &ss->context->sc_mips_thread_state,
+ sizeof (state->basic));
+ memcpy (&state->exc, &ss->context->sc_mips_exc_state,
+ sizeof (state->exc));
+ state->set = (1 << MIPS_THREAD_STATE) | (1 << MIPS_EXC_STATE);
+ if (state->exc.coproc_state & SC_COPROC_USE_FPU)
+ {
+ memcpy (&state->fpu, &ss->context->sc_mips_loat_state,
+ sizeof (state->fpu));
+ state->set |= (1 << MIPS_FLOAT_STATE);
+ }
+ assert (! rpc_wait);
+ /* The intr_port slot was cleared before sigreturn sent us the
+ sig_post that made us notice this pending signal, so
+ _hurd_internal_post_signal wouldn't do interrupt_operation.
+ After we return, our caller will set SCP->sc_intr_port (in the
+ new context) from SS->intr_port and clear SS->intr_port. Now
+ that we are restoring this old context recorded by sigreturn,
+ we want to restore its intr_port too; so store it in
+ SS->intr_port now, so it will end up in SCP->sc_intr_port
+ later. */
+ ss->intr_port = ss->context->sc_intr_port;
+ }
+ /* If the sigreturn context was bogus, just ignore it. */
+ ss->context = NULL;
+ }
+ else if (! machine_get_basic_state (ss->thread, state))
+ return NULL;
- if ((flags & SA_ONSTACK) &&
- !(sigaltstack->ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ if ((ss->actions[signo].sa_flags & SA_ONSTACK) &&
+ !(ss->sigaltstack.ss_flags & (SA_DISABLE|SA_ONSTACK)))
{
- sigsp = sigaltstack->ss_sp + sigaltstack->ss_size;
- sigaltstack->ss_flags |= SA_ONSTACK;
+ sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
+ ss->sigaltstack.ss_flags |= SA_ONSTACK;
/* XXX need to set up base of new stack for
per-thread variables, cthreads. */
}
else
- sigsp = (char *) ts->r29;
+ sigsp = (char *) state->basic.r29;
/* Set up the sigcontext structure on the stack. This is all the stack
needs, since the args are passed in registers (below). */
sigsp -= sizeof (*scp);
scp = sigsp;
- /* Set up the sigcontext from the current state of the thread. */
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ /* Set up the sigcontext from the current state of the thread. */
- scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0;
+ scp->sc_onstack = ss->sigaltstack.ss_flags & SA_ONSTACK ? 1 : 0;
- /* struct sigcontext is laid out so that starting at sc_gpr
- mimics a struct mips_thread_state. */
- memcpy (scp->sc_gpr, &ts, sizeof ts);
+ /* struct sigcontext is laid out so that starting at sc_gpr
+ mimics a struct mips_thread_state. */
+ memcpy (&scp->sc_mips_thread_state,
+ &state->basic, sizeof (state->basic));
- /* Modify the thread state to call `trampoline' on the new stack. */
+ /* struct sigcontext is laid out so that starting at sc_cause
+ mimics a struct mips_exc_state. */
+ if (! machine_get_state (ss->thread, state, MIPS_EXC_STATE,
+ &state->exc, &scp->sc_cause,
+ sizeof (state->exc)))
+ return NULL;
+ if ((scp->sc_coproc_used & SC_COPROC_USE_FPU) &&
+ /* struct sigcontext is laid out so that starting at sc_fpr
+ mimics a struct mips_float_state. This state
+ is only meaningful if the coprocessor was used. */
+ ! machine_get_state (ss->thread, state, MIPS_FLOAT_STATE,
+ &state->fpu,
+ &scp->sc_mips_float_state, sizeof (state->fpu)))
+ return NULL;
+ }
+ else
+ /* We got a fault trying to write the stack frame.
+ We cannot set up the signal handler.
+ Returning NULL tells our caller, who will nuke us with a SIGILL. */
+ return NULL;
+
+ /* Modify the thread state to call the trampoline code on the new stack. */
+ if (rpc_wait)
+ {
+ /* The signalee thread was blocked in a mach_msg_trap system call,
+ still waiting for a reply. We will have it run the special
+ trampoline code which retries the message receive before running
+ the signal handler.
+
+ To do this we change the OPTION argument in its registers to
+ enable only message reception, since the request message has
+ already been sent. */
- /* These registers are used for passing the first four arguments to a
- function (the rest go on the stack). Fortunately `trampoline' takes
- just four arguments, so they all fit in registers. */
- ts->r4 = (int) handler;
- ts->r5 = signo;
- ts->r6 = sigcode;
- ts->r7 = (int) scp;
+ /* The system call arguments are stored in consecutive registers
+ starting with a0 ($4). */
+ struct mach_msg_trap_args *args = (void *) &state->basic.r4;
+
+ assert (args->option & MACH_RCV_MSG);
+ /* Disable the message-send, since it has already completed. The
+ calls we retry need only wait to receive the reply message. */
+ args->option &= ~MACH_SEND_MSG;
+
+ state->basic.pc = (int) &&rpc_wait_trampoline;
+ state->basic.r29 = (int) sigsp; /* $29 is the stack pointer register. */
+ /* After doing the message receive, the trampoline code will need to
+ update the v0 ($2) value to be restored by sigreturn. To simplify
+ the assembly code, we pass the address of its slot in SCP to the
+ trampoline code in v1 ($3). */
+ state->basic.r3 = (int) &scp->sc_gpr[1];
+ /* We must preserve the mach_msg_trap args in a0..t2 ($4..$10).
+ Pass the handler args to the trampoline code in s1..s3 ($17..$19). */
+ state->basic.r17 = signo;
+ state->basic.r18 = sigcode;
+ state->basic.r19 = (int) scp;
+ }
+ else
+ {
+ state->basic.pc = (int) &&trampoline;
+ state->basic.r29 = (int) sigsp;
+ state->basic.r4 = signo;
+ state->basic.r5 = sigcode;
+ state->basic.r6 = (int) scp;
+ }
- ts->r29 = (int) sigsp; /* r29 is the stack pointer register. */
- ts->pc = (int) &trampoline;
+ /* We pass the handler function to the trampoline code in at ($1). */
+ state->basic.r1 = (int) handler;
+ /* In the callee-saved register s0 ($16), we save the SCP value to pass
+ to __sigreturn after the handler returns. */
+ state->basic.r16 = (int) scp;
return scp;
+
+ /* The trampoline code follows. This is not actually executed as part of
+ this function, it is just convenient to write it that way. */
+
+ rpc_wait_trampoline:
+ /* This is the entry point when we have an RPC reply message to receive
+ before running the handler. The MACH_MSG_SEND bit has already been
+ cleared in the OPTION argument in our registers. For our convenience,
+ $3 points to the sc_gpr[1] member of the sigcontext (saved v0 ($2)). */
+ asm volatile
+ (".set noat; .set noreorder; .set nomacro\n"
+ /* Retry the interrupted mach_msg system call. */
+ "li v0, -25\n" /* mach_msg_trap */
+ "syscall\n"
+ /* When the sigcontext was saved, v0 was MACH_RCV_INTERRUPTED. But
+ now the message receive has completed and the original caller of
+ the RPC (i.e. the code running when the signal arrived) needs to
+ see the final return value of the message receive in v0. So
+ store the new v0 value into the sc_gpr[1] member of the sigcontext
+ (whose address is in v1 to make this code simpler). */
+ "sw v0, (v1)\n"
+ /* Since the argument registers needed to have the mach_msg_trap
+ arguments, we've stored the arguments to the handler function
+ in registers s1..s3 ($17..$19). */
+ "move a0, s1\n"
+ "move a1, s2\n"
+ "move a2, s3\n");
+
+ trampoline:
+ /* Entry point for running the handler normally. The arguments to the
+ handler function are already in the standard registers:
+
+ a0 SIGNO
+ a1 SIGCODE
+ a2 SCP
+ */
+ asm volatile
+ ("jal $1; nop\n" /* Call the handler function. */
+ /* Call __sigreturn (SCP); this cannot return. */
+ "j %0\n"
+ "move a0, s0" /* Set up arg from saved SCP in delay slot. */
+ : : "i" (&__sigreturn));
+
+ /* NOTREACHED */
+ asm volatile (".set reorder; .set at; .set macro");
+
+ return NULL;
+}
+
+/* STATE describes a thread that had intr_port set (meaning it was inside
+ HURD_EINTR_RPC), after it has been thread_abort'd. It it looks to have
+ just completed a mach_msg_trap system call that returned
+ MACH_RCV_INTERRUPTED, return nonzero and set *PORT to the receive right
+ being waited on. */
+int
+_hurdsig_rcv_interrupted_p (struct machine_thread_all_state *state,
+ mach_port_t *port)
+{
+ if (! setjmp (_hurd_sigthread_fault_env))
+ {
+ const unsigned int *pc = (void *) state->basic.pc;
+ if (state->basic.r2 == MACH_RCV_INTERRUPTED &&
+ pc[-1] == 0xc) /* syscall */
+ {
+ /* We did just return from a mach_msg_trap system call
+ doing a message receive that was interrupted.
+ Examine the parameters to find the receive right. */
+ struct mach_msg_trap_args *args = (void *) &state->basic.r4;
+
+ *port = args->rcv_name;
+ return 1;
+ }
+ }
+
+ return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=817a880cc15b80a68abd83af971a921e292e943b
commit 817a880cc15b80a68abd83af971a921e292e943b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 06:06:18 1994 +0000
Don't #include <mach/thread_status.h>.
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index cf9dbc6..983aa0e 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Everything else is called `thread_state', but CMU's header file is
- called `thread_status'. Oh boy. */
-#include <mach/thread_status.h>
-
#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE
#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=275f77287816c7db30b17666b57ba2994f8bcf45
commit 275f77287816c7db30b17666b57ba2994f8bcf45
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 06:04:07 1994 +0000
Add #include_next <thread_state.h> at end.
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index f402c13..cf9dbc6 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -36,3 +36,5 @@ struct machine_thread_all_state
struct mips_exc_state exc;
struct mips_float_state fpu;
};
+
+#include_next <thread_state.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cd582f3e94740ec18ae27b116c211d0310b92393
commit cd582f3e94740ec18ae27b116c211d0310b92393
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 05:58:17 1994 +0000
(sc_mips_thread_state, sc_mips_exc_state, sc_mips_float_state): New macros,
marking members that correspond to thread_state.h structs.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index b57d648..3792236 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -44,11 +44,13 @@ struct sigcontext
struct mips_float_state fs;
}
trampoline.c knows this, so it must be changed if this changes. */
+#define sc_mips_thread_state sc_gpr /* Beginning of correspondence. */
int sc_gpr[31]; /* "General" registers; [0] is r1. */
int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */
int sc_pc; /* Instruction pointer. */
/* struct mips_exc_state */
+#define sc_mips_exc_state sc_cause
unsigned int sc_cause; /* Machine-level trap code. */
#define SC_CAUSE_SST 0x00000044
unsigned int sc_badvaddr;
@@ -62,6 +64,7 @@ struct sigcontext
/* struct mips_float_state
This is only filled in if the SC_COPROC_USE_FPU bit
is set in sc_coproc_used. */
+#define sc_mips_float_state sc_fpr
int sc_fpr[32]; /* FP registers. */
int sc_fpcsr; /* FPU status register. */
int sc_fpeir; /* FP exception instruction register. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a101c158c5611006d2779a8ed879823b2eeeec56
commit a101c158c5611006d2779a8ed879823b2eeeec56
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 00:52:22 1994 +0000
Replace uses of HOST_CC with BUILD_CC and native-CFLAGS with BUILD_CFLAGS.
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
index 4332fb4..3f86c46 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -3,4 +3,4 @@
# along the way (e.g., glue-ctype) will fail because it'll try to link
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
-native-CFLAGS := $(native-CFLAGS) -L/lib
+BUILD_CFLAGS := $(BUILD_CFLAGS) -L/lib
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c6864f1bc939671b905869f43273207262ce878
commit 2c6864f1bc939671b905869f43273207262ce878
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 00:42:48 1994 +0000
Replace all uses of __const with __CONSTVALUE.
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 3d0d4df..2617ae2 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ Cambridge, MA 02139, USA. */
#endif
#define __inline_mathop2(func, op) \
- extern __inline __const double \
+ extern __inline __CONSTVALUE double \
__m81_u(func)(double __mathop_x) \
{ \
double __result; \
@@ -63,7 +63,7 @@ __inline_mathop2(log1p, lognp1)
__inline_mathop(atanh)
#endif
-extern __inline __const double
+extern __inline __CONSTVALUE double
__m81_u(__drem)(double __x, double __y)
{
double __result;
@@ -71,7 +71,7 @@ __m81_u(__drem)(double __x, double __y)
return __result;
}
-extern __inline __const double
+extern __inline __CONSTVALUE double
__m81_u(ldexp)(double __x, int __e)
{
double __result;
@@ -80,7 +80,7 @@ __m81_u(ldexp)(double __x, int __e)
return __result;
}
-extern __inline __const double
+extern __inline __CONSTVALUE double
__m81_u(fmod)(double __x, double __y)
{
double __result;
@@ -98,7 +98,7 @@ __m81_u(frexp)(double __value, int *__expptr)
return __mantissa;
}
-extern __inline __const double
+extern __inline __CONSTVALUE double
__m81_u(pow)(double __x, double __y)
{
double __result;
@@ -117,7 +117,7 @@ __m81_u(pow)(double __x, double __y)
return __result;
}
-extern __inline __const double
+extern __inline __CONSTVALUE double
__m81_u(ceil)(double __x)
{
double __result;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a3fb4cb93106f054fb6884186886bf1d6e2468e
commit 4a3fb4cb93106f054fb6884186886bf1d6e2468e
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 16 00:35:22 1994 +0000
(elided-routines): New variable (append to it).
(aux, routines): Don't set these.
(sysdep_routines): Append things here instead.
diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile
index bcdd94e..a6149a9 100644
--- a/sysdeps/vax/Makefile
+++ b/sysdeps/vax/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1994 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -19,13 +19,12 @@
ifeq ($(subdir),math)
ifndef math-twiddled
-routines:= $(filter-out acos asin cos sin ceil rint hypot \
- __copysign __scalb __drem __logb __finite,$(routines))\
- asincos sincos
-aux := $(aux) argred support exp__E log__L
+elided-routines := $(elided-routines) acos asin cos sin ceil rint hypot \
+ __copysign __scalb __drem __logb __finite
+sysdep_routines := $(sysdep_routines) asincos sincos argred \
+ support exp__E log__L
math-twiddled := t
-
endif
bsdmath_dirs := $(bsdmath_dirs) vax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a1ec466abbce0fdef4cce1a35464f67e4ff73dc
commit 2a1ec466abbce0fdef4cce1a35464f67e4ff73dc
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 11 00:26:03 1994 +0000
(struct sigcontext): Renamed member `sc_err' to `sc_error'.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index edc807c..b57d648 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -34,7 +34,7 @@ struct sigcontext
unsigned int sc_intr_port;
/* Error code associated with this signal (interpreted as `error_t'). */
- int sc_err;
+ int sc_error;
/* All following members are machine-dependent. The rest of this
structure is written to be laid out identically to:
@@ -45,7 +45,7 @@ struct sigcontext
}
trampoline.c knows this, so it must be changed if this changes. */
int sc_gpr[31]; /* "General" registers; [0] is r1. */
- int sc_mdlo, sc_mdhi; /* High and low multiplication results. */
+ int sc_mdlo, sc_mdhi; /* Low and high multiplication results. */
int sc_pc; /* Instruction pointer. */
/* struct mips_exc_state */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b87619900a4c9f0b7142502177ad16646a7cba69
commit b87619900a4c9f0b7142502177ad16646a7cba69
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 8 22:54:44 1994 +0000
(_hurd_exception2signal): Take new arg `int *error'; set it.
diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c
index b894dfb..7a9ab31 100644
--- a/sysdeps/mach/hurd/mips/exc2signal.c
+++ b/sysdeps/mach/hurd/mips/exc2signal.c
@@ -26,8 +26,10 @@ Cambridge, MA 02139, USA. */
void
_hurd_exception2signal (int exception, int code, int subcode,
- int *signo, int *sigcode)
+ int *signo, int *sigcode, int *error)
{
+ *error = 0;
+
switch (exception)
{
default:
@@ -41,6 +43,7 @@ _hurd_exception2signal (int exception, int code, int subcode,
else
*signo = SIGBUS;
*sigcode = subcode;
+ *error = code;
break;
case EXC_BAD_INSTRUCTION:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bd2a5f499dbe70748ffca2b1eaa9f8c4aa59e853
commit bd2a5f499dbe70748ffca2b1eaa9f8c4aa59e853
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 8 07:58:38 1994 +0000
(struct sigcontext): Added member `sc_err'.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index ca86a2f..edc807c 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -22,6 +22,8 @@ Cambridge, MA 02139, USA. */
/* State of this thread when the signal was taken. */
struct sigcontext
{
+ /* These first members are machine-independent. */
+
int sc_onstack; /* Nonzero if running on sigstack. */
sigset_t sc_mask; /* Blocked signals to restore. */
@@ -31,8 +33,11 @@ struct sigcontext
/* Port this thread is doing an interruptible RPC on. */
unsigned int sc_intr_port;
- /* The rest of this structure is written to be laid out identically
- to:
+ /* Error code associated with this signal (interpreted as `error_t'). */
+ int sc_err;
+
+ /* All following members are machine-dependent. The rest of this
+ structure is written to be laid out identically to:
{
struct mips_thread_state ts;
struct mips_exc_state es;
@@ -54,7 +59,9 @@ struct sigcontext
#define SC_COPROC_USE_COP2 4
#define SC_COPROC_USE_COP3 8
- /* struct mips_float_state */
+ /* struct mips_float_state
+ This is only filled in if the SC_COPROC_USE_FPU bit
+ is set in sc_coproc_used. */
int sc_fpr[32]; /* FP registers. */
int sc_fpcsr; /* FPU status register. */
int sc_fpeir; /* FP exception instruction register. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c693c1caaf48160d9e2d8c22dd5a2d0806a4a333
commit c693c1caaf48160d9e2d8c22dd5a2d0806a4a333
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 8 07:39:58 1994 +0000
(struct machine_thread_all_state): New type.
diff --git a/sysdeps/mach/mips/thread_state.h b/sysdeps/mach/mips/thread_state.h
index 541461f..f402c13 100644
--- a/sysdeps/mach/mips/thread_state.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -28,3 +28,11 @@ Cambridge, MA 02139, USA. */
#define PC pc
#define SP r29
+
+struct machine_thread_all_state
+ {
+ int set; /* Mask of bits (1 << FLAVOR). */
+ struct mips_thread_state basic;
+ struct mips_exc_state exc;
+ struct mips_float_state fpu;
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d85eb528c4405cf8d1fd109fd06ab8c418e47744
commit d85eb528c4405cf8d1fd109fd06ab8c418e47744
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 3 16:32:47 1994 +0000
Rearranged structure so machine-dependent portion is laid out like `struct
mips_thread_state; struct mips_exc_state; struct mips_float_state;'.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index 2cb9459..ca86a2f 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -31,11 +31,31 @@ struct sigcontext
/* Port this thread is doing an interruptible RPC on. */
unsigned int sc_intr_port;
- /* These four elements are laid out just like a `struct mips_thread_state';
+ /* The rest of this structure is written to be laid out identically
+ to:
+ {
+ struct mips_thread_state ts;
+ struct mips_exc_state es;
+ struct mips_float_state fs;
+ }
trampoline.c knows this, so it must be changed if this changes. */
int sc_gpr[31]; /* "General" registers; [0] is r1. */
- int sc_pc; /* Instruction pointer. */
int sc_mdlo, sc_mdhi; /* High and low multiplication results. */
+ int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
+ /* struct mips_exc_state */
+ unsigned int sc_cause; /* Machine-level trap code. */
+#define SC_CAUSE_SST 0x00000044
+ unsigned int sc_badvaddr;
+ unsigned int sc_coproc_used; /* Which coprocessors the thread has used. */
+#define SC_COPROC_USE_COP0 1 /* (by definition) */
+#define SC_COPROC_USE_COP1 2 /* FPA */
+#define SC_COPROC_USE_FPU SC_COPROC_USE_COP1
+#define SC_COPROC_USE_COP2 4
+#define SC_COPROC_USE_COP3 8
+
+ /* struct mips_float_state */
+ int sc_fpr[32]; /* FP registers. */
+ int sc_fpcsr; /* FPU status register. */
+ int sc_fpeir; /* FP exception instruction register. */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8f04323dc64d1221e5fb3f1162bd6a5aea81912
commit b8f04323dc64d1221e5fb3f1162bd6a5aea81912
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 3 06:45:59 1994 +0000
Compare *reply_port to MACH_PORT_NULL, not implicit zero.
(restore_gpr): Use N-1 as subscript into sc_gpr (sc_gpr[0] => $1).
Before general regs, restore from sc_mdlo and sc_mdhi.
Don't treat sp, fp specially; use restore_gpr for them too.
For final return, store user $1 value beyond top of user stack ahead of
time; Then use $1 to hold the user PC, and restore it from the stack in the
delay slot.
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 147243f..8082aca 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -16,8 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-register int sp asm ("$29"), fp asm ("$30");
-
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/threadvar.h>
@@ -45,19 +43,31 @@ __sigreturn (const struct sigcontext *scp)
reply port in use by the thread when interrupted. */
reply_port =
(mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
- if (*reply_port)
+ if (*reply_port != MACH_PORT_NULL)
__mach_port_destroy (__mach_task_self (), *reply_port);
*reply_port = scp->sc_reply_port;
- /* Restore registers. */
+ /* Load all the registers from the sigcontext. */
#define restore_gpr(n) \
- asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n]))
+ asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n - 1]))
- asm volatile (".set noreorder; .set noat;");
{
register const struct sigcontext *const scpreg asm ("$1") = scp;
- /* Load the general-purpose registers from the sigcontext. */
+ /* Just beyond the top of the user stack, store the user's value for $1
+ (which we are using for SCPREG). We restore this register as the
+ very last thing, below. */
+ ((int *) scpreg->sc_gpr[29 - 1])[-1] = scpreg->sc_gpr[0];
+
+ /* First restore the multiplication result registers. The compiler
+ will use some temporary registers, so we do this before restoring
+ the general registers. */
+ asm volatile ("mtlo %0" : : "r" (scpreg->sc_mdlo));
+ asm volatile ("mthi %0" : : "r" (scpreg->sc_mdhi));
+
+ asm volatile (".set noreorder; .set noat;");
+
+ /* Restore the normal registers. */
restore_gpr (2);
restore_gpr (3);
restore_gpr (4);
@@ -84,20 +94,16 @@ __sigreturn (const struct sigcontext *scp)
restore_gpr (25);
/* Registers 26-27 are kernel-only. */
restore_gpr (28);
-
- /* Now the special-purpose registers. */
- sp = scpreg->sc_sp; /* Stack pointer. */
- fp = scpreg->sc_fp; /* Frame pointer. */
+ restore_gpr (29); /* Stack pointer. */
+ restore_gpr (30); /* Frame pointer. */
restore_gpr (31); /* Return address. */
/* Now jump to the saved PC. */
- asm volatile ("lw $24, %0\n" /* Load saved PC into temporary $t8. */
- "j $24\n" /* Jump to the saved PC value. */
- "lw $1, %1\n" /* Restore $at in delay slot. */
- : :
- "m" (scpreg->sc_pc),
- "m" (scpreg->sc_r1) /* $at */
- : "$24"); /* XXX clobbers $24 (aka $t8)!! */
+ asm volatile ("lw $1, %0\n" /* Load saved PC into $1. */
+ "j $1\n" /* Jump to the saved PC value. */
+ "lw $1, -4(sp)\n" /* Restore $1 from stack in delay slot. */
+ : : "m" (scpreg->sc_pc));
+
asm volatile (".set reorder; .set at;");
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d2f85c668a30bafd78d622747a4b9db7c7675cd
commit 8d2f85c668a30bafd78d622747a4b9db7c7675cd
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 3 01:38:43 1994 +0000
(_hurd_setup_sighandler): Copy TS to SCP all at once.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 559d8e8..4fc9fda 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -48,6 +48,8 @@ _hurd_setup_sighandler (int flags,
{
sigsp = sigaltstack->ss_sp + sigaltstack->ss_size;
sigaltstack->ss_flags |= SA_ONSTACK;
+ /* XXX need to set up base of new stack for
+ per-thread variables, cthreads. */
}
else
sigsp = (char *) ts->r29;
@@ -61,24 +63,9 @@ _hurd_setup_sighandler (int flags,
scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0;
- scp->sc_gpr[2] = ts->r2;
- scp->sc_gpr[16] = ts->r16;
- scp->sc_gpr[17] = ts->r17;
- scp->sc_gpr[18] = ts->r18;
- scp->sc_gpr[19] = ts->r19;
- scp->sc_gpr[20] = ts->r20;
- scp->sc_gpr[21] = ts->r21;
- scp->sc_gpr[22] = ts->r22;
- scp->sc_gpr[23] = ts->r23;
- scp->sc_gpr[28] = ts->r28;
- scp->sc_gpr[31] = ts->r31;
-
- scp->sc_mdlo = ts->mdlo;
- scp->sc_mdhi = ts->mdhi;
-
- scp->sc_pc = ts->pc;
- scp->sc_sp = ts->r29;
- scp->sc_fp = ts->r30;
+ /* struct sigcontext is laid out so that starting at sc_gpr
+ mimics a struct mips_thread_state. */
+ memcpy (scp->sc_gpr, &ts, sizeof ts);
/* Modify the thread state to call `trampoline' on the new stack. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b6cc52076465c392cbeedea0e68a4a8fe1cffa65
commit b6cc52076465c392cbeedea0e68a4a8fe1cffa65
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 3 01:36:31 1994 +0000
(struct sigcontext): sc_gpr has 31 elts; sc_gpr, sc_pc, sc_mdlo, sc_mdhi
are arranged in that order to mimic struct mips_thread_state.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index 63632e8..2cb9459 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -30,14 +30,12 @@ struct sigcontext
/* Port this thread is doing an interruptible RPC on. */
unsigned int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
+ /* These four elements are laid out just like a `struct mips_thread_state';
+ trampoline.c knows this, so it must be changed if this changes. */
+ int sc_gpr[31]; /* "General" registers; [0] is r1. */
+ int sc_pc; /* Instruction pointer. */
int sc_mdlo, sc_mdhi; /* High and low multiplication results. */
+
+ int sc_ps; /* Processor status. */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5064f78e9df40dc88fc6d1ce84044ef8911f4358
commit 5064f78e9df40dc88fc6d1ce84044ef8911f4358
Author: Roland McGrath <roland@gnu.org>
Date: Wed Aug 3 01:03:35 1994 +0000
[__sgi__]: Use `fp' instead of `$fp'.
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index ccba78b..485811e 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -23,6 +23,10 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__setjmp)
move a1, sp
+#ifdef __sgi__
+ move a2, fp
+#else
move a2, $fp
+#endif
j __setjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c1eb1d76e21f9eb54c1a5f65f9c2c38babed1b5d
commit c1eb1d76e21f9eb54c1a5f65f9c2c38babed1b5d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 2 00:15:34 1994 +0000
(_hurd_setup_sighandler): Save mdlo and mdhi.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index 856cce6..559d8e8 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -73,6 +73,9 @@ _hurd_setup_sighandler (int flags,
scp->sc_gpr[28] = ts->r28;
scp->sc_gpr[31] = ts->r31;
+ scp->sc_mdlo = ts->mdlo;
+ scp->sc_mdhi = ts->mdhi;
+
scp->sc_pc = ts->pc;
scp->sc_sp = ts->r29;
scp->sc_fp = ts->r30;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e0ec2e47de5dc5e6ebcfe070f2c2c5f25487441c
commit e0ec2e47de5dc5e6ebcfe070f2c2c5f25487441c
Author: Roland McGrath <roland@gnu.org>
Date: Tue Aug 2 00:12:17 1994 +0000
(struct sigcontext): Add members sc_mdlo, sc_mdhi.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index d0fdee7..63632e8 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -38,4 +38,6 @@ struct sigcontext
int sc_fp; /* Frame pointer. */
int sc_pc; /* Instruction pointer. */
int sc_ps; /* Processor status. */
+
+ int sc_mdlo, sc_mdhi; /* High and low multiplication results. */
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cad7e45a3b4809fd086a30f3a481d99dcca230a1
commit cad7e45a3b4809fd086a30f3a481d99dcca230a1
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jul 31 20:01:52 1994 +0000
Incorporated from BSD 4.4-Lite.
diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h
index 5e20bc8..01f1f0c 100644
--- a/sysdeps/vax/DEFS.h
+++ b/sysdeps/vax/DEFS.h
@@ -1,22 +1,36 @@
/*
- * Copyright (c) 1982 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1982, 1993
+ * The Regents of the University of California. All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement: ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
- * @(#)DEFS.h 5.3 (Berkeley) 6/1/90
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)DEFS.h 8.1 (Berkeley) 6/4/93
*/
#define R0 0x001
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6adee8d53b6f822a13f150c80cee5a0eb2a89f46
commit 6adee8d53b6f822a13f150c80cee5a0eb2a89f46
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 29 16:39:58 1994 +0000
Rename variable AT (which is the register's name) to SCPREG.
Fix some SCP references in register loads to use SCPREG instead.
Load SCPREG->sc_pc into $24 and jump to it, restoring $at in the delay slot.
This still leaves $24 clobbered.
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
index 4df3112..147243f 100644
--- a/sysdeps/mach/hurd/mips/sigreturn.c
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -16,6 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+register int sp asm ("$29"), fp asm ("$30");
+
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/threadvar.h>
@@ -49,42 +51,53 @@ __sigreturn (const struct sigcontext *scp)
/* Restore registers. */
#define restore_gpr(n) \
- asm volatile ("lw $" #n ",%0" : : "m"(at->sc_gpr[(n)]))
+ asm volatile ("lw $" #n ",%0" : : "m" (scpreg->sc_gpr[n]))
asm volatile (".set noreorder; .set noat;");
{
- register const struct sigcontext *at asm ("$1") = scp;
+ register const struct sigcontext *const scpreg asm ("$1") = scp;
+
+ /* Load the general-purpose registers from the sigcontext. */
+ restore_gpr (2);
+ restore_gpr (3);
+ restore_gpr (4);
+ restore_gpr (5);
+ restore_gpr (6);
+ restore_gpr (7);
+ restore_gpr (8);
+ restore_gpr (9);
+ restore_gpr (10);
+ restore_gpr (11);
+ restore_gpr (12);
+ restore_gpr (13);
+ restore_gpr (14);
+ restore_gpr (15);
+ restore_gpr (16);
+ restore_gpr (17);
+ restore_gpr (18);
+ restore_gpr (19);
+ restore_gpr (20);
+ restore_gpr (21);
+ restore_gpr (22);
+ restore_gpr (23);
+ restore_gpr (24);
+ restore_gpr (25);
+ /* Registers 26-27 are kernel-only. */
+ restore_gpr (28);
+
+ /* Now the special-purpose registers. */
+ sp = scpreg->sc_sp; /* Stack pointer. */
+ fp = scpreg->sc_fp; /* Frame pointer. */
+ restore_gpr (31); /* Return address. */
- restore_gpr(2);
- restore_gpr(3);
- restore_gpr(4);
- restore_gpr(5);
- restore_gpr(6);
- restore_gpr(7);
- restore_gpr(8);
- restore_gpr(9);
- restore_gpr(10);
- restore_gpr(11);
- restore_gpr(12);
- restore_gpr(13);
- restore_gpr(14);
- restore_gpr(15);
- restore_gpr(16);
- restore_gpr(17);
- restore_gpr(18);
- restore_gpr(19);
- restore_gpr(20);
- restore_gpr(21);
- restore_gpr(22);
- restore_gpr(23);
- restore_gpr(24);
- restore_gpr(25);
- restore_gpr(28);
- asm volatile ("lw $29,%0" : : "m"(scp->sc_sp));
- asm volatile ("lw $30,%0" : : "m"(scp->sc_fp));
- asm volatile ("lw $31,%0" : : "m"(scp->sc_pc));
- asm volatile ("j $31");
- restore_gpr(1);
+ /* Now jump to the saved PC. */
+ asm volatile ("lw $24, %0\n" /* Load saved PC into temporary $t8. */
+ "j $24\n" /* Jump to the saved PC value. */
+ "lw $1, %1\n" /* Restore $at in delay slot. */
+ : :
+ "m" (scpreg->sc_pc),
+ "m" (scpreg->sc_r1) /* $at */
+ : "$24"); /* XXX clobbers $24 (aka $t8)!! */
asm volatile (".set reorder; .set at;");
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3844669a628ec08240e6bd0dff64cefee1578ac6
commit 3844669a628ec08240e6bd0dff64cefee1578ac6
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 29 15:53:52 1994 +0000
Use `unsigned int' consistently for port names.
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index b62fb18..d0fdee7 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -29,7 +29,7 @@ struct sigcontext
unsigned int sc_reply_port;
/* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
+ unsigned int sc_intr_port;
/* "General" registers. */
int sc_gpr[32];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=840c5e79e31877a48931440e52a430c25d42fd20
commit 840c5e79e31877a48931440e52a430c25d42fd20
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 29 15:46:10 1994 +0000
Don't set up args on the stack; pass them in registers.
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
index a6c9cec..856cce6 100644
--- a/sysdeps/mach/hurd/mips/trampoline.c
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -40,15 +40,6 @@ _hurd_setup_sighandler (int flags,
struct mips_thread_state *ts;
void *sigsp;
struct sigcontext *scp;
- struct
- {
- void *retaddr; /* Never used. */
- __sighandler_t handler;
- int signo;
- int sigcode;
- struct sigcontext *scp; /* Points to ctx, below. */
- struct sigcontext ctx;
- } *stackframe;
ts = state;
@@ -61,18 +52,16 @@ _hurd_setup_sighandler (int flags,
else
sigsp = (char *) ts->r29;
- /* Push the arguments to call `trampoline' on the stack. */
- sigsp -= sizeof (*stackframe);
- stackframe = sigsp;
- stackframe->handler = handler;
- stackframe->signo = signo;
- stackframe->sigcode = sigcode;
- stackframe->scp = scp = &stackframe->ctx;
+ /* Set up the sigcontext structure on the stack. This is all the stack
+ needs, since the args are passed in registers (below). */
+ sigsp -= sizeof (*scp);
+ scp = sigsp;
/* Set up the sigcontext from the current state of the thread. */
scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0;
+ scp->sc_gpr[2] = ts->r2;
scp->sc_gpr[16] = ts->r16;
scp->sc_gpr[17] = ts->r17;
scp->sc_gpr[18] = ts->r18;
@@ -89,7 +78,16 @@ _hurd_setup_sighandler (int flags,
scp->sc_fp = ts->r30;
/* Modify the thread state to call `trampoline' on the new stack. */
- ts->r29 = (int) sigsp;
+
+ /* These registers are used for passing the first four arguments to a
+ function (the rest go on the stack). Fortunately `trampoline' takes
+ just four arguments, so they all fit in registers. */
+ ts->r4 = (int) handler;
+ ts->r5 = signo;
+ ts->r6 = sigcode;
+ ts->r7 = (int) scp;
+
+ ts->r29 = (int) sigsp; /* r29 is the stack pointer register. */
ts->pc = (int) &trampoline;
return scp;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5736111e49f39f3094ff1b6afc5009150749730f
commit 5736111e49f39f3094ff1b6afc5009150749730f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 22 23:54:43 1994 +0000
(PSEUDO): Remove ret at end.
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index 60778e3..1e0cd69 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -35,4 +35,4 @@ Cambridge, MA 02139, USA. */
cmpb $ERESTART, %al; \
je C_SYMBOL_NAME (name); \
jmp syscall_error; \
- noerror: ret
+ noerror:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d3e17c74465ce25c455938ff3f0445efdacc1972
commit d3e17c74465ce25c455938ff3f0445efdacc1972
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 16 21:16:53 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h
index f990fef..ea83d71 100644
--- a/sysdeps/unix/bsd/sun/signum.h
+++ b/sysdeps/unix/bsd/sun/signum.h
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#ifdef _SIGNAL_H
/* This file defines the fake signal functions and signal
- number constants for 4.2 or 4.3 BSD-derived Unix system. */
+ number constants for SunOS 3 and 4 Unix systems. */
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
index c83d6ba..82e5fba 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getgroups.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <unistd.h>
#include <limits.h>
+#include <alloca.h>
extern int __sco_getgroups __P ((int size, unsigned short int *list));
diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S
index 4500c57..a22d18a 100644
--- a/sysdeps/unix/sysv/sco3.2.4/uname.S
+++ b/sysdeps/unix/sysv/sco3.2.4/uname.S
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
ENTRY (uname)
pushl $0x0 /* Push the discriminator flag. */
pushl $0x0 /* Push dummy placeholder. */
- pushl 12(%esp,1) /* Push name (ptr to struct utsname) */
+ pushl 12(%esp,1) /* Push NAME (ptr to struct utsname) */
subl $0x4, %esp /* Adjust stack pointer. */
DO_CALL (utssys, 3)
jb error /* Test for error. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ba370609fd41f64a3440f758056bc53ac381999
commit 0ba370609fd41f64a3440f758056bc53ac381999
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 16 21:16:31 1994 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/signum.h b/sysdeps/unix/bsd/sun/signum.h
new file mode 100644
index 0000000..f990fef
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/signum.h
@@ -0,0 +1,69 @@
+/* Signal number definitions. SunOS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef _SIGNAL_H
+
+/* This file defines the fake signal functions and signal
+ number constants for 4.2 or 4.3 BSD-derived Unix system. */
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD). */
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGURG 16 /* Urgent condition on socket (4.2 BSD). */
+#define SIGSTOP 17 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 18 /* Keyboard stop (POSIX). */
+#define SIGCONT 19 /* Continue (POSIX). */
+#define SIGCHLD 20 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGTTIN 21 /* Background read from tty (POSIX). */
+#define SIGTTOU 22 /* Background write to tty (POSIX). */
+#define SIGIO 23 /* I/O now possible (4.2 BSD). */
+#define SIGPOLL SIGIO /* Same as SIGIO? (SVID). */
+#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
+#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
+#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
+#define SIGLOST 29 /* Resource lost (Sun). */
+#define SIGUSR1 30 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 31 /* User-defined signal 2 (POSIX). */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 32 /* Biggest signal number + 1. */
diff --git a/sysdeps/unix/sysv/sco3.2.4/uname.S b/sysdeps/unix/sysv/sco3.2.4/uname.S
new file mode 100644
index 0000000..4500c57
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/uname.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+ Contributed by Scott Bartram.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/*
+ before lcall, stack contents should be:
+
+ 4(%esp) -> name
+ 8(%esp) -> unspecified
+ 12(%esp) -> 0
+ */
+
+ENTRY (uname)
+ pushl $0x0 /* Push the discriminator flag. */
+ pushl $0x0 /* Push dummy placeholder. */
+ pushl 12(%esp,1) /* Push name (ptr to struct utsname) */
+ subl $0x4, %esp /* Adjust stack pointer. */
+ DO_CALL (utssys, 3)
+ jb error /* Test for error. */
+ addl $0x10, %esp /* Adjust the stack pointer. */
+ xorl %eax, %eax /* Clear return value. */
+ ret
+error: addl $0x10, %esp /* Adjust the stack pointer. */
+ jmp syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bab9b6590377bfd827782833c3fbfdc5551b55c3
commit bab9b6590377bfd827782833c3fbfdc5551b55c3
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 16 04:43:42 1994 +0000
entered into RCS
diff --git a/sysdeps/mips/dec/bytesex.h b/sysdeps/mips/dec/bytesex.h
new file mode 100644
index 0000000..157bc44
--- /dev/null
+++ b/sysdeps/mips/dec/bytesex.h
@@ -0,0 +1,4 @@
+/* The MIPS architecture has selectable endianness.
+ The DECstation uses little-endian mode. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/mips/p40/bytesex.h b/sysdeps/mips/p40/bytesex.h
new file mode 100644
index 0000000..e4b0119
--- /dev/null
+++ b/sysdeps/mips/p40/bytesex.h
@@ -0,0 +1,4 @@
+/* The MIPS has selectable endianness.
+ The Japanese homebrew P40 architecture uses big-endian mode. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85b67f1ffb05b8e908d82e59ae224b15ee26f9cd
commit 85b67f1ffb05b8e908d82e59ae224b15ee26f9cd
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Jul 14 22:21:57 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index 46c0980..f603d8b 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -4,3 +4,4 @@ pgrpsys.S
__waitid.S
siginfo.h
__getpgid.c __setpgid.c
+sysinfo.S
diff --git a/sysdeps/unix/sysv/sysv4/gethostname.c b/sysdeps/unix/sysv/sysv4/gethostname.c
new file mode 100644
index 0000000..c1c9e0a
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/gethostname.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/systeminfo.h>
+
+extern int __sysinfo __P ((int command, char *buf, long count));
+
+int
+DEFUN(__gethostname, (name, namelen), char *name AND size_t namelen)
+{
+ return __sysinfo (SI_HOSTNAME, name, namelen);
+}
diff --git a/sysdeps/unix/sysv/sysv4/sethostname.c b/sysdeps/unix/sysv/sysv4/sethostname.c
new file mode 100644
index 0000000..4cebc45
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sethostname.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/systeminfo.h>
+
+extern int __sysinfo __P ((int command, const char *buf, long count));
+
+int
+DEFUN(sethostname, (name, namelen), const char *name AND size_t namelen)
+{
+ return __sysinfo (SI_SET_HOSTNAME, name, namelen);
+}
diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S
index e69de29..c279c96 100644
--- a/sysdeps/unix/sysv/sysv4/sysinfo.S
+++ b/sysdeps/unix/sysv/sysv4/sysinfo.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__sysinfo, systeminfo, 3)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c286ffe823123fbeceac11a9d9e2c6d856d478a9
commit c286ffe823123fbeceac11a9d9e2c6d856d478a9
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Jul 14 22:13:18 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/sysinfo.S b/sysdeps/unix/sysv/sysv4/sysinfo.S
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc8037a42c063f2774391780ce4f2658200ed9a9
commit bc8037a42c063f2774391780ce4f2658200ed9a9
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Jul 14 19:43:12 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/fsync.S b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
new file mode 100644
index 0000000..aefa3e3
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/fsync.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* Solaris uses fdsync for the normal fsync. */
+ENTRY(fsync)
+ mov 16, %i1
+ mov SYS_ify(fdsync), %g1
+ ta 8
+ bcs syscall_error
+ nop
+ mov %g0, %o0
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2200643a09c313ddf4cf99d032b3bd99549576d9
commit 2200643a09c313ddf4cf99d032b3bd99549576d9
Author: Brendan Kehoe <brendan@zen.org>
Date: Mon Jul 11 21:49:56 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
index dde3f82..7ad4bb1 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
@@ -3,7 +3,3 @@
# and difftime.o don't work because of this. The long-term fix is to actually
# implement what they're doing, but for the short-term, we must do this.
sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
-
-ifeq ($(subdir),signal)
-sysdep_routines := $(sysdep_routines) sys-sig
-endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76657427f58d28e09a07b2ab978ffbd2d9058ee9
commit 76657427f58d28e09a07b2ab978ffbd2d9058ee9
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 9 07:24:37 1994 +0000
entered into RCS
diff --git a/sysdeps/mach/hurd/mips/exc2signal.c b/sysdeps/mach/hurd/mips/exc2signal.c
new file mode 100644
index 0000000..b894dfb
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/exc2signal.c
@@ -0,0 +1,95 @@
+/* Translate Mach exception codes into signal numbers. MIPS version.
+Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <mach/exception.h>
+
+/* Translate the Mach exception codes, as received in an `exception_raise' RPC,
+ into a signal number and signal subcode. */
+
+void
+_hurd_exception2signal (int exception, int code, int subcode,
+ int *signo, int *sigcode)
+{
+ switch (exception)
+ {
+ default:
+ *signo = SIGIOT;
+ *sigcode = exception;
+ break;
+
+ case EXC_BAD_ACCESS:
+ if (code == KERN_PROTECTION_FAILURE)
+ *signo = SIGSEGV;
+ else
+ *signo = SIGBUS;
+ *sigcode = subcode;
+ break;
+
+ case EXC_BAD_INSTRUCTION:
+ *signo = SIGILL;
+ if (code == EXC_MIPS_II)
+ *sigcode = code;
+ else
+ *sigcode = 0;
+ break;
+
+ case EXC_ARITHMETIC:
+ switch (code)
+ {
+ case EXC_MIPS_OV: /* integer overflow */
+ *signo = SIGFPE;
+ *sigcode = EXC_MIPS_FLT_OVERFLOW;
+ break;
+
+ default:
+ *signo = SIGFPE;
+ *sigcode = 0;
+ break;
+
+ case EXC_MIPS_INT:
+ /* Subcode is the fp_status word saved by the hardware.
+ Give an error code corresponding to the first bit set. */
+ if (subcode == EXC_MIPS_FLT_UNIMP)
+ *signo = SIGILL;
+ else
+ *signo = SIGFPE;
+ *sigcode = subcode;
+ break;
+ }
+ break;
+
+ case EXC_EMULATION:
+ /* 3.0 doesn't give this one, why, I don't know. */
+ *signo = SIGEMT;
+ *sigcode = 0;
+ break;
+
+ case EXC_SOFTWARE:
+ *signo = SIGEMT;
+ *sigcode = 0;
+ break;
+
+ case EXC_BREAKPOINT:
+ *signo = SIGTRAP;
+ *sigcode = code;
+ break;
+ }
+}
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/init-fault.c
similarity index 50%
copy from sysdeps/mach/hurd/mips/sigcontext.h
copy to sysdeps/mach/hurd/mips/init-fault.c
index 5b062a2..e6f8acf 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/init-fault.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Set up a thread_state for proc_handle_exceptions. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,26 +17,25 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
+#include <hurd/signal.h>
+#include <mach/thread_status.h>
+#include <string.h>
+#include <setjmp.h>
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
+extern jmp_buf _hurd_sigthread_fault_env;
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
+static char fault_stack[32];
+static volatile void
+faulted (void)
+{
+ __longjmp (_hurd_sigthread_fault_env, 1);
+}
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
- };
+void
+_hurd_initialize_fault_recovery_state (void *state)
+{
+ struct mips_thread_state *ts = state;
+ memset (ts, 0, sizeof (*ts));
+ ts->r29 = (int) &fault_stack[sizeof (fault_stack)];
+ ts->pc = (int) &faulted;
+}
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/longjmp-ctx.c
similarity index 50%
copy from sysdeps/mach/hurd/mips/sigcontext.h
copy to sysdeps/mach/hurd/mips/longjmp-ctx.c
index 5b062a2..0c78f6b 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/longjmp-ctx.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Perform a `longjmp' on a `struct sigcontext'. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,26 +17,25 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
+#include <setjmp.h>
+#include <hurd/signal.h>
+#include <string.h>
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
+void
+_hurd_longjmp_sigcontext (struct sigcontext *scp, jmp_buf env, int retval)
+{
+ scp->sc_gpr[16] = env[0].__regs[0];
+ scp->sc_gpr[17] = env[0].__regs[1];
+ scp->sc_gpr[18] = env[0].__regs[2];
+ scp->sc_gpr[19] = env[0].__regs[3];
+ scp->sc_gpr[20] = env[0].__regs[4];
+ scp->sc_gpr[21] = env[0].__regs[5];
+ scp->sc_gpr[22] = env[0].__regs[6];
+ scp->sc_gpr[23] = env[0].__regs[7];
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
- };
+ scp->sc_gpr[28] = (int) env[0].__gp;
+ scp->sc_fp = (int) env[0].__fp;
+ scp->sc_sp = (int) env[0].__sp;
+ scp->sc_pc = (int) env[0].__pc;
+ scp->sc_gpr[2] = retval ?: 1;
+}
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/longjmp-ts.c
similarity index 50%
copy from sysdeps/mach/hurd/mips/sigcontext.h
copy to sysdeps/mach/hurd/mips/longjmp-ts.c
index 5b062a2..e60fdb7 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/longjmp-ts.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Perform a `longjmp' on a Mach thread_state. MIPS version.
+Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,26 +17,29 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
-
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
- };
+#include <hurd/signal.h>
+#include <setjmp.h>
+#include <mach/thread_status.h>
+
+
+/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */
+
+void
+_hurd_longjmp_thread_state (void *state, jmp_buf env, int val)
+{
+ struct mips_thread_state *ts = state;
+
+ ts->r16 = env[0].__regs[0];
+ ts->r17 = env[0].__regs[1];
+ ts->r18 = env[0].__regs[2];
+ ts->r19 = env[0].__regs[3];
+ ts->r20 = env[0].__regs[4];
+ ts->r21 = env[0].__regs[5];
+ ts->r22 = env[0].__regs[6];
+ ts->r23 = env[0].__regs[7];
+ ts->r28 = (int) env[0].__gp;
+ ts->r29 = (int) env[0].__sp;
+ ts->r30 = (int) env[0].__fp;
+ ts->pc = (int) env[0].__pc;
+ ts->r2 = val ?: 1;
+}
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
index 5b062a2..b62fb18 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/mach/hurd/mips/sigreturn.c b/sysdeps/mach/hurd/mips/sigreturn.c
new file mode 100644
index 0000000..4df3112
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/sigreturn.c
@@ -0,0 +1,93 @@
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd.h>
+#include <hurd/signal.h>
+#include <hurd/threadvar.h>
+
+int
+__sigreturn (const struct sigcontext *scp)
+{
+ struct hurd_sigstate *ss;
+ mach_port_t *reply_port;
+
+ if (scp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ ss = _hurd_self_sigstate ();
+ ss->blocked = scp->sc_mask;
+ ss->intr_port = scp->sc_intr_port;
+ if (scp->sc_onstack)
+ ss->sigaltstack.ss_flags &= ~SA_ONSTACK; /* XXX threadvars */
+ __mutex_unlock (&ss->lock);
+
+ /* Destroy the MiG reply port used by the signal handler, and restore the
+ reply port in use by the thread when interrupted. */
+ reply_port =
+ (mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
+ if (*reply_port)
+ __mach_port_destroy (__mach_task_self (), *reply_port);
+ *reply_port = scp->sc_reply_port;
+
+ /* Restore registers. */
+#define restore_gpr(n) \
+ asm volatile ("lw $" #n ",%0" : : "m"(at->sc_gpr[(n)]))
+
+ asm volatile (".set noreorder; .set noat;");
+ {
+ register const struct sigcontext *at asm ("$1") = scp;
+
+ restore_gpr(2);
+ restore_gpr(3);
+ restore_gpr(4);
+ restore_gpr(5);
+ restore_gpr(6);
+ restore_gpr(7);
+ restore_gpr(8);
+ restore_gpr(9);
+ restore_gpr(10);
+ restore_gpr(11);
+ restore_gpr(12);
+ restore_gpr(13);
+ restore_gpr(14);
+ restore_gpr(15);
+ restore_gpr(16);
+ restore_gpr(17);
+ restore_gpr(18);
+ restore_gpr(19);
+ restore_gpr(20);
+ restore_gpr(21);
+ restore_gpr(22);
+ restore_gpr(23);
+ restore_gpr(24);
+ restore_gpr(25);
+ restore_gpr(28);
+ asm volatile ("lw $29,%0" : : "m"(scp->sc_sp));
+ asm volatile ("lw $30,%0" : : "m"(scp->sc_fp));
+ asm volatile ("lw $31,%0" : : "m"(scp->sc_pc));
+ asm volatile ("j $31");
+ restore_gpr(1);
+ asm volatile (".set reorder; .set at;");
+ }
+
+ /* NOTREACHED */
+ return -1;
+}
diff --git a/sysdeps/mach/hurd/mips/trampoline.c b/sysdeps/mach/hurd/mips/trampoline.c
new file mode 100644
index 0000000..a6c9cec
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/trampoline.c
@@ -0,0 +1,96 @@
+/* Set thread_state for sighandler, and sigcontext to recover. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <hurd/signal.h>
+#include <mach/thread_status.h>
+
+static void
+trampoline (void (*handler) (int signo, int sigcode, struct sigcontext *scp),
+ int signo, int sigcode, struct sigcontext *scp)
+{
+ (*handler) (signo, sigcode, scp);
+ (void) __sigreturn (scp); /* Does not return. */
+ while (1)
+ LOSE; /* Firewall. */
+}
+
+struct sigcontext *
+_hurd_setup_sighandler (int flags,
+ __sighandler_t handler,
+ struct sigaltstack *sigaltstack,
+ int signo, int sigcode,
+ void *state)
+{
+ struct mips_thread_state *ts;
+ void *sigsp;
+ struct sigcontext *scp;
+ struct
+ {
+ void *retaddr; /* Never used. */
+ __sighandler_t handler;
+ int signo;
+ int sigcode;
+ struct sigcontext *scp; /* Points to ctx, below. */
+ struct sigcontext ctx;
+ } *stackframe;
+
+ ts = state;
+
+ if ((flags & SA_ONSTACK) &&
+ !(sigaltstack->ss_flags & (SA_DISABLE|SA_ONSTACK)))
+ {
+ sigsp = sigaltstack->ss_sp + sigaltstack->ss_size;
+ sigaltstack->ss_flags |= SA_ONSTACK;
+ }
+ else
+ sigsp = (char *) ts->r29;
+
+ /* Push the arguments to call `trampoline' on the stack. */
+ sigsp -= sizeof (*stackframe);
+ stackframe = sigsp;
+ stackframe->handler = handler;
+ stackframe->signo = signo;
+ stackframe->sigcode = sigcode;
+ stackframe->scp = scp = &stackframe->ctx;
+
+ /* Set up the sigcontext from the current state of the thread. */
+
+ scp->sc_onstack = sigaltstack->ss_flags & SA_ONSTACK ? 1 : 0;
+
+ scp->sc_gpr[16] = ts->r16;
+ scp->sc_gpr[17] = ts->r17;
+ scp->sc_gpr[18] = ts->r18;
+ scp->sc_gpr[19] = ts->r19;
+ scp->sc_gpr[20] = ts->r20;
+ scp->sc_gpr[21] = ts->r21;
+ scp->sc_gpr[22] = ts->r22;
+ scp->sc_gpr[23] = ts->r23;
+ scp->sc_gpr[28] = ts->r28;
+ scp->sc_gpr[31] = ts->r31;
+
+ scp->sc_pc = ts->pc;
+ scp->sc_sp = ts->r29;
+ scp->sc_fp = ts->r30;
+
+ /* Modify the thread state to call `trampoline' on the new stack. */
+ ts->r29 = (int) sigsp;
+ ts->pc = (int) &trampoline;
+
+ return scp;
+}
diff --git a/sysdeps/mach/mips/machine-lock.h b/sysdeps/mach/mips/machine-lock.h
new file mode 100644
index 0000000..628aae4
--- /dev/null
+++ b/sysdeps/mach/mips/machine-lock.h
@@ -0,0 +1,73 @@
+/* Machine-specific definition for spin locks. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _MACHINE_LOCK_H
+#define _MACHINE_LOCK_H
+
+/* The type of a spin lock variable. */
+
+typedef __volatile int __spin_lock_t;
+
+/* Value to initialize `__spin_lock_t' variables to. */
+
+#define __SPIN_LOCK_INITIALIZER 0
+
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+/* Unlock LOCK. */
+
+_EXTERN_INLINE void
+__spin_unlock (__spin_lock_t *__lock)
+{
+ *__lock = 0;
+}
+
+/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */
+
+_EXTERN_INLINE int
+__spin_try_lock (register __spin_lock_t *__lock)
+{
+ register int __rtn;
+ __asm__ __volatile (".set noreorder");
+#if 0
+ __asm__ __volatile ("lw %0,0(%1)": "=r" (__rtn) : "r" (__lock));
+ __asm__ __volatile ("sw %0,0(%0)": : "r" (__lock));
+ __asm__ __volatile ("xor %0,%1,%0": "=r" (__rtn) : "r" (__lock));
+#else
+ /* Use the Mach microkernel's emulated TAS pseudo-instruction. */
+ register int __rtn __asm__ ("a0");
+ __asm__ __volatile (".word 0xf ! %0 " : "=r" (__rtn) : "0" (__lock));
+#endif
+ __asm__ __volatile (".set reorder");
+ return __rtn ^ (int) __lock;
+}
+
+/* Return nonzero if LOCK is locked. */
+
+_EXTERN_INLINE int
+__spin_lock_locked (__spin_lock_t *__lock)
+{
+ return *__lock != 0;
+}
+
+
+#endif /* machine-lock.h */
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/mips/machine-sp.h
similarity index 50%
copy from sysdeps/mach/hurd/mips/sigcontext.h
copy to sysdeps/mach/mips/machine-sp.h
index 5b062a2..7406658 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/mips/machine-sp.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Machine-specific function to return the stack pointer. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,26 +17,22 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
-
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
-
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
-
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
- };
+#ifndef _MACHINE_SP_H
+#define _MACHINE_SP_H
+
+/* Return the current stack pointer. */
+
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
+#endif
+
+_EXTERN_INLINE void *
+__thread_stack_pointer (void)
+{
+ void *__sp__;
+ __asm__ ("move %0,$29" : "=r" (__sp__));
+ return __sp__;
+}
+
+#endif /* machine-sp.h */
+
diff --git a/sysdeps/mach/mips/sysdep.h b/sysdeps/mach/mips/sysdep.h
new file mode 100644
index 0000000..7609be5
--- /dev/null
+++ b/sysdeps/mach/mips/sysdep.h
@@ -0,0 +1,69 @@
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define MOVE(x,y) move y , x
+
+#if 0
+#define LOSE asm volatile ("1: b 1b")
+#endif
+
+#define SNARF_ARGS(argc, argv, envp) \
+ do \
+ { \
+ int *entry_sp; \
+ register char **p; \
+ \
+ asm ("addu %0,$30,4" : "=r" (entry_sp)); \
+ \
+ argc = *entry_sp; \
+ argv = (char **) (entry_sp + 1); \
+ p = argv; \
+ while (*p++ != NULL) \
+ ; \
+ if (p >= (char **) argv[0]) \
+ --p; \
+ envp = p; \
+ } while (0)
+
+#define CALL_WITH_SP(fn, sp) \
+ ({ register int __fn = fn, __sp = (int) sp; \
+ asm volatile ("move $sp,%0; j %1" : : "r" (__sp), "r" (__fn));})
+
+#define STACK_GROWTH_DOWN
+
+#ifdef P40
+#include <syscall.h>
+
+#define SYSCALL(name, args) \
+ .globl syscall_error; \
+ kernel_trap(name,SYS_##name,args); \
+ beq $1,$0,1f; \
+ j syscall_error; \
+1:
+
+#define SYSCALL__(name, args) \
+ .globl syscall_error; \
+ kernel_trap(__##name,SYS_##name,args); \
+ beq $1,$0,1f; \
+ j syscall_error; \
+1:
+
+#define ret j ra; nop
+#endif
+
+#include_next <sysdep.h>
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/mips/thread_state.h
similarity index 50%
copy from sysdeps/mach/hurd/mips/sigcontext.h
copy to sysdeps/mach/mips/thread_state.h
index 5b062a2..541461f 100644
--- a/sysdeps/mach/hurd/mips/sigcontext.h
+++ b/sysdeps/mach/mips/thread_state.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Mach thread state definitions for machine-independent code. MIPS version.
+Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,26 +17,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Signal handlers are actually called:
- void handler (int sig, int code, struct sigcontext *scp); */
+/* Everything else is called `thread_state', but CMU's header file is
+ called `thread_status'. Oh boy. */
+#include <mach/thread_status.h>
-/* State of this thread when the signal was taken. */
-struct sigcontext
- {
- int sc_onstack; /* Nonzero if running on sigstack. */
- sigset_t sc_mask; /* Blocked signals to restore. */
+#define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE
+#define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT
- /* MiG reply port this thread is using. */
- unsigned int sc_reply_port;
+#define machine_thread_state mips_thread_state
- /* Port this thread is doing an interruptible RPC on. */
- unsigned long int sc_intr_port;
-
- /* "General" registers. */
- int sc_gpr[32];
-
- int sc_sp; /* Stack pointer. */
- int sc_fp; /* Frame pointer. */
- int sc_pc; /* Instruction pointer. */
- int sc_ps; /* Processor status. */
- };
+#define PC pc
+#define SP r29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c4a19f6a24771658d2bb9e45a019f4114f0f32e7
commit c4a19f6a24771658d2bb9e45a019f4114f0f32e7
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jul 9 07:12:44 1994 +0000
Initial revision
diff --git a/sysdeps/mach/hurd/mips/sigcontext.h b/sysdeps/mach/hurd/mips/sigcontext.h
new file mode 100644
index 0000000..5b062a2
--- /dev/null
+++ b/sysdeps/mach/hurd/mips/sigcontext.h
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Signal handlers are actually called:
+ void handler (int sig, int code, struct sigcontext *scp); */
+
+/* State of this thread when the signal was taken. */
+struct sigcontext
+ {
+ int sc_onstack; /* Nonzero if running on sigstack. */
+ sigset_t sc_mask; /* Blocked signals to restore. */
+
+ /* MiG reply port this thread is using. */
+ unsigned int sc_reply_port;
+
+ /* Port this thread is doing an interruptible RPC on. */
+ unsigned long int sc_intr_port;
+
+ /* "General" registers. */
+ int sc_gpr[32];
+
+ int sc_sp; /* Stack pointer. */
+ int sc_fp; /* Frame pointer. */
+ int sc_pc; /* Instruction pointer. */
+ int sc_ps; /* Processor status. */
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d828aec47f5cae49a3566b2ae5ecef7122a218af
commit d828aec47f5cae49a3566b2ae5ecef7122a218af
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Jul 9 01:59:28 1994 +0000
Formerly sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile.~3~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
index 56f0a37..dde3f82 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
@@ -1,3 +1,9 @@
+# This flag is necessary because GCC now tries to call _Q_{mul, etc...}
+# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o,
+# and difftime.o don't work because of this. The long-term fix is to actually
+# implement what they're doing, but for the short-term, we must do this.
+sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
+
ifeq ($(subdir),signal)
sysdep_routines := $(sysdep_routines) sys-sig
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5654dd81f0aba2a6a3ed828a1356393d8ce6c544
commit 5654dd81f0aba2a6a3ed828a1356393d8ce6c544
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Jul 9 01:59:20 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
index 4a5d59b..4332fb4 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -4,8 +4,3 @@
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
native-CFLAGS := $(native-CFLAGS) -L/lib
-# This flag is necessary because GCC now tries to call _Q_{mul, etc...}
-# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o,
-# and difftime.o don't work because of this. The long-term fix is to actually
-# implement what they're doing, but for the short-term, we must do this.
-sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
index e69de29..69d16ac 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
@@ -0,0 +1 @@
+sys-sig.S
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S
new file mode 100644
index 0000000..8baa997
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sys-sig.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__sigaction_syscall, sigaction, 3)
+ ret
+
+PSEUDO (__context_syscall, context, 2)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=876bbb9e033043d2ae8a34cf3f42ba07e1f62153
commit 876bbb9e033043d2ae8a34cf3f42ba07e1f62153
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Jul 9 01:38:37 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Dist
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
new file mode 100644
index 0000000..56f0a37
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sys-sig
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f9ea18cb599b26630e1b969e5258c67f3eb0a14
commit 3f9ea18cb599b26630e1b969e5258c67f3eb0a14
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Jul 9 00:26:26 1994 +0000
Formerly unix/sysv/sysv4/solaris2/Makefile.~3~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
index 4332fb4..4a5d59b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -4,3 +4,8 @@
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
native-CFLAGS := $(native-CFLAGS) -L/lib
+# This flag is necessary because GCC now tries to call _Q_{mul, etc...}
+# instead of doing the stuff the hard way. For now, printf_fp.o, __vfscanf.o,
+# and difftime.o don't work because of this. The long-term fix is to actually
+# implement what they're doing, but for the short-term, we must do this.
+sysdep-CFLAGS := $(sysdep-CFLAGS) -mhard-quad-float
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e91173e397012590cae861114ae33d303c43641
commit 2e91173e397012590cae861114ae33d303c43641
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 8 18:39:48 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index 1f61e07..60778e3 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -21,7 +21,9 @@ Cambridge, MA 02139, USA. */
/* In SVR4 some system calls can fail with the error ERESTART,
and this means the call should be retried. */
+#ifndef _ERRNO_H
#define _ERRNO_H
+#endif
#include <errnos.h>
#undef PSEUDO
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81c4ea64ef5ee6891b6d1079ddbf875c1cc07ec8
commit 81c4ea64ef5ee6891b6d1079ddbf875c1cc07ec8
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 28 20:31:20 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index 9fd9a1e..a007a43 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -49,7 +49,7 @@ typedef struct
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE
+#define _EXTERN_INLINE extern __inline
#endif
_EXTERN_INLINE int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7088289daa2bfc5691bcd215acf6105ff1f2d2d8
commit 7088289daa2bfc5691bcd215acf6105ff1f2d2d8
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 23 05:17:22 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index b6f002a..b85b139 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -25,7 +25,7 @@ extern int __syssgi __P ((int, ...));
/* Set the group set for the current user to GROUPS (N of them). */
int
-DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups)
+DEFUN(__getgroups, (n, groups), size_t n AND gid_t *groups)
{
return __syssgi (SGI_GETGROUPS, n, groups);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12aeba0610a6edb3e39fac208bdb32c6424a3df7
commit 12aeba0610a6edb3e39fac208bdb32c6424a3df7
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Jun 14 18:09:31 1994 +0000
entered into RCS
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index aba375a..ccba78b 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -23,6 +23,6 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__setjmp)
move a1, sp
- move a2, fp
+ move a2, $fp
j __setjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6cba56a4a6ef406ae2a976f598da298e90547863
commit 6cba56a4a6ef406ae2a976f598da298e90547863
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 13 23:50:11 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 1ccdf02..54f6293 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -187,7 +187,7 @@ DEFUN(trampoline, (sig), int sig)
I don't know what it's for. Ask Sun. */
asm("restore %%g0, 139, %%g1\n"
"ta 0\n"
- "mov %0, %0" /* Useless insn that will never be executed, */
+ "! this should be i0: %0" /* Useless insn that will never be executed, */
/* here to make the compiler happy. */
: /* No outputs. */ :
/* CONTEXT is bound to %i0. We reference it as an input here to make
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45f830dc74950bf4c6265959289c4b9cf9382d99
commit 45f830dc74950bf4c6265959289c4b9cf9382d99
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 10 22:43:23 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
index 1dfa95d..462b9fb 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Dist
+++ b/sysdeps/unix/sysv/sco3.2.4/Dist
@@ -1 +1,2 @@
pgrpsys.S
+sco_getgrp.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5d3fde1a0211e08ba21f929e067514529ae3b1b4
commit 5d3fde1a0211e08ba21f929e067514529ae3b1b4
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 24 05:56:11 1994 +0000
Formerly unix/sysv/sysv4/i386/sysdep.h.~2~
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
index e954185..1f61e07 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <sysdeps/unix/i386/sysdep.h>
+#include <sysdeps/unix/sysv/i386/sysdep.h>
/* In SVR4 some system calls can fail with the error ERESTART,
and this means the call should be retried. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f86d8fd4cd07b5d0463cc9681b13bc5b7ff38e1f
commit f86d8fd4cd07b5d0463cc9681b13bc5b7ff38e1f
Author: Roland McGrath <roland@gnu.org>
Date: Sat May 21 20:42:51 1994 +0000
Formerly unix/sysv/sysv4/sigset.h.~5~
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index 957ec08..9fd9a1e 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -48,7 +48,11 @@ typedef struct
#define __SSELT(s) ((s) / __NSSBITS)
#define __SSMASK(s) (1 << ((s) % __NSSBITS))
-extern __inline int
+#ifndef _EXTERN_INLINE
+#define _EXTERN_INLINE
+#endif
+
+_EXTERN_INLINE int
__sigemptyset (__sigset_t *__set)
{
__set->__sigbits[0] = __set->__sigbits[1] =
@@ -56,7 +60,7 @@ __sigemptyset (__sigset_t *__set)
return 0;
}
-extern __inline int
+_EXTERN_INLINE int
__sigfillset (__sigset_t *__set)
{
/* SVR4 has a system call for `sigfillset' (!), and it only sets the bits
@@ -67,21 +71,21 @@ __sigfillset (__sigset_t *__set)
return 0;
}
-extern __inline int
+_EXTERN_INLINE int
__sigaddset (__sigset_t *__set, int __sig)
{
__set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig);
return 0;
}
-extern __inline int
+_EXTERN_INLINE int
__sigdelset (__sigset_t *__set, int __sig)
{
__set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig);
return 0;
}
-extern __inline int
+_EXTERN_INLINE int
__sigismember (__const __sigset_t *__set, int __sig)
{
if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig))
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9e2dc2608fd200cc91f8c0cd2c5faa1a4d118ec5
commit 9e2dc2608fd200cc91f8c0cd2c5faa1a4d118ec5
Author: Roland McGrath <roland@gnu.org>
Date: Sat May 21 01:33:03 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile
index deea4b1..23525e5 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Makefile
+++ b/sysdeps/unix/sysv/sco3.2.4/Makefile
@@ -1,3 +1,3 @@
ifeq (posix,$(subdir))
-sysdep_routines := $(sysdep_routines) pgrpsys
+sysdep_routines := $(sysdep_routines) pgrpsys sco_getgrp
endif
diff --git a/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S
new file mode 100644
index 0000000..e68c300
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sco_getgrp.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__sco_getgroups, getgroups, 2)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6bf0741b634269636dba980820935de215acf0de
commit 6bf0741b634269636dba980820935de215acf0de
Author: Roland McGrath <roland@gnu.org>
Date: Sat May 21 01:32:10 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/getgroups.c b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
new file mode 100644
index 0000000..c83d6ba
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/getgroups.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <limits.h>
+
+extern int __sco_getgroups __P ((int size, unsigned short int *list));
+
+int
+DEFUN(__getgroups, (size, list), int size AND gid_t *list)
+{
+ int i;
+ unsigned short int *shortlist;
+
+ if (size <= 0)
+ return __sco_getgroups (size, NULL);
+
+ shortlist = __alloca (size * sizeof (*shortlist));
+
+ size = __sco_getgroups (size, shortlist);
+ for (i = 0; i < size; ++i)
+ list[i] = shortlist[i];
+
+ return size;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7bc3467f404074e489531f550c055aa0e0bb63f2
commit 7bc3467f404074e489531f550c055aa0e0bb63f2
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 19 15:29:10 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 8ea55ef..2644fb0 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <errno.h>
#include <signal.h>
+#include <stddef.h>
static __sighandler_t user_handlers[NSIG];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10d0017f67a34c426e1564a3fb83ad38c841f2f6
commit 10d0017f67a34c426e1564a3fb83ad38c841f2f6
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 19 03:36:32 1994 +0000
entered into RCS
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 6e9f261..ea0c7d5 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -28,3 +28,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
ifndef m68k-syntax-flag
m68k-syntax-flag = -DMIT_SYNTAX
endif
+
+asm-CPPFLAGS := $(asm-CPPFLAGS) $(m68k-syntax-flag)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0467bc697d72e7953aff4e680ff67e17e88058c
commit d0467bc697d72e7953aff4e680ff67e17e88058c
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 18 23:30:27 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/resourcebits.h b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
new file mode 100644
index 0000000..b5d3704
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/resourcebits.h
@@ -0,0 +1,48 @@
+/* Bit values for resource limits. SunOS 4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* These are the values for 4.4 BSD and GNU. Earlier BSD systems have a
+ subset of these kinds of resource limit. In systems where `getrlimit'
+ and `setrlimit' are not system calls, these are the values used by the C
+ library to emulate them. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+ {
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU,
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE,
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA,
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK,
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE,
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ RLIMIT_RSS,
+ /* Number of open files. */
+ RLIMIT_NOFILE,
+ RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+
+ RLIM_NLIMITS
+ };
diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
index 31473cf..e9111b6 100644
--- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
+++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
@@ -1 +1,2 @@
#define _UTSNAME_LENGTH 9
+#define _UTSNAME_NODENAME_LENGTH 65
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4536ecf5b2c8cb2fd77bd75b36eda1ad295b3e2e
commit 4536ecf5b2c8cb2fd77bd75b36eda1ad295b3e2e
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 18 22:13:04 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/i386/sysdep.h b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
new file mode 100644
index 0000000..e954185
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/sysdep.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/i386/sysdep.h>
+
+/* In SVR4 some system calls can fail with the error ERESTART,
+ and this means the call should be retried. */
+
+#define _ERRNO_H
+#include <errnos.h>
+
+#undef PSEUDO
+#define PSEUDO(name, syscall_name, args) \
+ .globl syscall_error; \
+ ENTRY (name) \
+ DO_CALL (syscall_name, args); \
+ jae noerror; \
+ cmpb $ERESTART, %al; \
+ je C_SYMBOL_NAME (name); \
+ jmp syscall_error; \
+ noerror: ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=279e20b3acc942fd9aa4551333baf280155bd816
commit 279e20b3acc942fd9aa4551333baf280155bd816
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 18 21:54:10 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
index ac4c07b..58430e4 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
+++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
.globl C_SYMBOL_NAME(__sigreturn)
ENTRY (__sigaction_syscall)
- movel $C_SYMBOL_NAME(__sigreturn), %edx
+ movl $C_SYMBOL_NAME(__sigreturn), %edx
DO_CALL (sigaction, 3)
jb syscall_error
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=854002b9b80baf2dd11020a002453d10ea60872b
commit 854002b9b80baf2dd11020a002453d10ea60872b
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 16 22:43:49 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c
index cd97649..06dc066 100644
--- a/sysdeps/unix/sysv/sco3.2.4/system.c
+++ b/sysdeps/unix/sysv/sco3.2.4/system.c
@@ -1,3 +1,10 @@
+/* SCO has a bug where `waitpid' will never return if SIGCHLD is blocked.
+ They have acknowledged that this is a bug but I have not seen nor heard
+ of any forthcoming fix. */
+
+#define WAITPID_CANNOT_BLOCK_SIGCHLD
+
/* SCO 3.2v4 does have `waitpid'.
Avoid unix/system.c, which says we don't. */
+
#include <sysdeps/posix/system.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4448e9e36b5db31222419e73aafca22a10805541
commit 4448e9e36b5db31222419e73aafca22a10805541
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 16 20:39:16 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index 1d55f2d..17ae6e7 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.globla C_SYMBOL_NAME(__sigreturn)
+.global C_SYMBOL_NAME(__sigreturn)
ENTRY (__sigaction)
movl $C_SYMBOL_NAME(__sigreturn), %ecx
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94606a4a68fef55ea8a4268c38338a55a9068b2b
commit 94606a4a68fef55ea8a4268c38338a55a9068b2b
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 12 03:08:56 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/poll.S b/sysdeps/unix/bsd/sun/sunos4/poll.S
new file mode 100644
index 0000000..95c4fd2
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/poll.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/poll.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2fb4526df548eb92e79855bba0db9adb9e6a4ba
commit b2fb4526df548eb92e79855bba0db9adb9e6a4ba
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 10 21:47:20 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index 4d3aec3..21bdf23 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -21,6 +21,7 @@ Cambridge, MA 02139, USA. */
#include <errnos.h>
/* .globl errno */
+.set noreorder
ENTRY(syscall_error)
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist
index 91dad24..c5dd106 100644
--- a/sysdeps/unix/sysv/irix4/Dist
+++ b/sysdeps/unix/sysv/irix4/Dist
@@ -1 +1,2 @@
syssgi.S sysmp.S
+__handler.S sigtramp.c
diff --git a/sysdeps/unix/sysv/irix4/dup2.c b/sysdeps/unix/sysv/irix4/dup2.c
new file mode 100644
index 0000000..53691b6
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/dup2.c
@@ -0,0 +1 @@
+#include <sysdeps/posix/__dup2.c>
diff --git a/sysdeps/unix/sysv/irix4/fcntlbits.h b/sysdeps/unix/sysv/irix4/fcntlbits.h
new file mode 100644
index 0000000..a8bb776
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/fcntlbits.h
@@ -0,0 +1,98 @@
+/* O_*, F_*, FD_* bit values for SGI Irix 4.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _FCNTLBITS_H
+
+#define _FCNTLBITS_H 1
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 00400 /* Create file if it doesn't exist. */
+#define O_EXCL 02000 /* Fail if file already exists. */
+#define O_TRUNC 01000 /* Truncate file to zero length. */
+#ifdef __USE_MISC
+#define O_SYNC 00020 /* Synchronous writes. */
+#define O_ASYNC 00100 /* Send SIGIO to owner when data is ready. */
+#endif
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 000010 /* Writes append to the file. */
+#ifdef __USE_BSD
+#define O_NDELAY 000004 /* Non-blocking I/O. */
+#endif
+#define O_NONBLOCK 000200 /* POSIX.1 non-blocking I/O. */
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#define F_GETLK 5 /* Get record locking info. */
+#define F_SETLK 6 /* Set record locking info. */
+#define F_SETLKW 7 /* Set record locking info, wait. */
+#ifdef __USE_MISC
+#define F_CHKFL 8 /* Check legality of file flag changes. */
+#define F_ALLOCSP 10
+#define F_FREESP 11
+#define F_SETBSDLK 12 /* Set Berkeley record lock. */
+#define F_SETBSDLKW 13 /* Set Berkeley record lock and wait. */
+#define F_RGETLK 20 /* Get info on a remote lock. */
+#define F_RSETLK 21 /* Set or unlock a remote lock. */
+#define F_RSETLKW 22 /* Set or unlock a remote lock and wait. */
+#define F_GETOWN 10 /* Get owner; only works on sockets. */
+#define F_SETOWN 11 /* Set owner; only works on sockets. */
+#endif
+
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <gnu/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_sysid; /* System ID where locking process resides. */
+ short int l_pid; /* Process holding the lock. */
+ };
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
+
+
+#endif /* fcntlbits.h */
diff --git a/sysdeps/unix/sysv/irix4/readv.c b/sysdeps/unix/sysv/irix4/readv.c
new file mode 100644
index 0000000..baa976d
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/readv.c
@@ -0,0 +1 @@
+#include <sysdeps/posix/readv.c>
diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h
index 71b8c98..5d30ebb 100644
--- a/sysdeps/unix/sysv/irix4/signum.h
+++ b/sysdeps/unix/sysv/irix4/signum.h
@@ -1,4 +1,4 @@
-/* Copyright (C) Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -42,7 +42,7 @@ Cambridge, MA 02139, USA. */
#define SIGSYS 12 /* Bad argument to system call*/
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
-1994#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGTERM 15 /* Termination (ANSI). */
#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
#define SIGCHLD 18 /* Child status has changed (POSIX). */
diff --git a/sysdeps/unix/sysv/irix4/writev.c b/sysdeps/unix/sysv/irix4/writev.c
new file mode 100644
index 0000000..0dc6a76
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/writev.c
@@ -0,0 +1 @@
+#include <sysdeps/posix/writev.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=617dce8b65709b9db5da513fc3d30184819ed714
commit 617dce8b65709b9db5da513fc3d30184819ed714
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 10 21:29:43 1994 +0000
Formerly mips/setjmp.S.~4~
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 507da8d..aba375a 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,6 @@ Cambridge, MA 02139, USA. */
extra arguments. */
ENTRY (__setjmp)
move a1, sp
- move a2, $fp
+ move a2, fp
j __setjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cea7a7f28271dacc5fab918d159df8fd43bb361
commit 4cea7a7f28271dacc5fab918d159df8fd43bb361
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 10 21:29:35 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/Dist b/sysdeps/unix/sysv/irix4/Dist
new file mode 100644
index 0000000..91dad24
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/Dist
@@ -0,0 +1 @@
+syssgi.S sysmp.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=325552ed3a90ae04920d18ab0e227df31a7181a1
commit 325552ed3a90ae04920d18ab0e227df31a7181a1
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 22 22:17:17 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/time.S b/sysdeps/unix/sysv/irix4/time.S
new file mode 100644
index 0000000..23bfe5d
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/time.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/sysv4/time.S>
diff --git a/sysdeps/unix/sysv/irix4/wait3.S b/sysdeps/unix/sysv/irix4/wait3.S
new file mode 100644
index 0000000..d4ed738
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/wait3.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/ultrix4/__wait3.S>
diff --git a/sysdeps/unix/sysv/irix4/waitpid.c b/sysdeps/unix/sysv/irix4/waitpid.c
new file mode 100644
index 0000000..47129a8
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/waitpid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e43ba5d2aa2cad390df65b706515caad3b393cf
commit 0e43ba5d2aa2cad390df65b706515caad3b393cf
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 20 03:12:09 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/pipestream.c b/sysdeps/unix/sysv/sco3.2.4/pipestream.c
new file mode 100644
index 0000000..b768e62
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/pipestream.c
@@ -0,0 +1,3 @@
+/* SCO 3.2v4 does have `waitpid'.
+ Avoid unix/pipestream.c, which says we don't. */
+#include <sysdeps/posix/pipestream.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b12af630af4938650cb8c2559133b695f85982eb
commit b12af630af4938650cb8c2559133b695f85982eb
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 6 01:26:12 1994 +0000
Formerly unix/sysv/sysv4/__sigact.c.~4~
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index e945373..8ea55ef 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -38,7 +38,7 @@ trampoline (int sig, int code, struct sigcontext *context)
If OACT is not NULL, put the old action for SIG in *OACT. */
int
DEFUN(__sigaction, (sig, act, oact),
- int sig AND CONST struct sigaction *act AND struct sigaction *OACT)
+ int sig AND CONST struct sigaction *act AND struct sigaction *oact)
{
struct sigaction myact;
__sighandler_t ohandler;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf86fbef3a438bac91ebf676118a244d5d9b4bbc
commit bf86fbef3a438bac91ebf676118a244d5d9b4bbc
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 24 20:03:52 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.h b/sysdeps/unix/sysv/sco3.2.4/sigaction.h
new file mode 100644
index 0000000..c6344f0
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.h
@@ -0,0 +1,39 @@
+/* The proper definitions for SCO's sigaction.
+Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_NOCLDSTOP 0x01 /* Don't send SIGCHLD when children stop. */
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_SETMASK 0 /* Set the set of blocked signals. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ed7c960c0dd0eed9e6e044f97cc306cf285cf16
commit 9ed7c960c0dd0eed9e6e044f97cc306cf285cf16
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 24 20:01:19 1994 +0000
Formerly unix/sysv/sco3.2.4/__sigact.S.~2~
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
index dbe41e3..1d55f2d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sigaction.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (sigaction, 3)
+.globla C_SYMBOL_NAME(__sigreturn)
+
+ENTRY (__sigaction)
+ movl $C_SYMBOL_NAME(__sigreturn), %ecx
+ DO_CALL (sigaction, 3)
+ jb syscall_error
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30a3f7d7a74fea58c95b673446be2678467e690d
commit 30a3f7d7a74fea58c95b673446be2678467e690d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 22 03:11:12 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index afca46a..95136bb 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -35,10 +35,10 @@ store: move.l d0, _errno
#else
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
cmpl #EWOULDBLOCK_sys, d0
- bne 0f
+ bne store
moveq #EAGAIN, d0
#endif
-0: movel d0, _errno
+store: movel d0, _errno
moveq #-1, d0
#endif
rts
diff --git a/sysdeps/unix/bsd/sony/newsos4/Dist b/sysdeps/unix/bsd/sony/newsos4/Dist
new file mode 100644
index 0000000..d7500fd
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/Dist
@@ -0,0 +1 @@
+sys_wait4.S
diff --git a/sysdeps/unix/bsd/sony/newsos4/Makefile b/sysdeps/unix/bsd/sony/newsos4/Makefile
new file mode 100644
index 0000000..7cfecf2
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir), posix)
+sysdep_routines := $(sysdep_routines) sys_wait4
+endif
diff --git a/sysdeps/unix/bsd/sony/newsos4/fchdir.S b/sysdeps/unix/bsd/sony/newsos4/fchdir.S
new file mode 100644
index 0000000..6db7282
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/fchdir.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/fchdir.S>
diff --git a/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S
new file mode 100644
index 0000000..6a79710
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/sys_wait4.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sunos4/sys_wait4.S>
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait.c b/sysdeps/unix/bsd/sony/newsos4/wait.c
new file mode 100644
index 0000000..d9ee77b
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/wait.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__wait.c>
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait3.c b/sysdeps/unix/bsd/sony/newsos4/wait3.c
new file mode 100644
index 0000000..ecc1113
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/wait3.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__wait3.c>
diff --git a/sysdeps/unix/bsd/sony/newsos4/wait4.c b/sysdeps/unix/bsd/sony/newsos4/wait4.c
new file mode 100644
index 0000000..9183ce1
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos4/wait4.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sunos4/__wait4.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62256c24863ce9e4b6f222f56a8da0c9ff662425
commit 62256c24863ce9e4b6f222f56a8da0c9ff662425
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 18 06:02:48 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index c843b8d..43ef480 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -43,9 +43,9 @@ Cambridge, MA 02139, USA. */
#define DO_CALL(syscall, args) \
movel syscall, d0; \
- linkw fp, POUND(0); \
+ linkw a6, POUND(0); \
trap POUND(0); \
- unlk fp; \
+ unlk a6; \
bcs error
#define ret rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abf0661750bb75660ee039edb4e611eee8539472
commit abf0661750bb75660ee039edb4e611eee8539472
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 7 22:46:41 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
new file mode 100644
index 0000000..eefd641
--- /dev/null
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigblock.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigblock SYS_ult_sigblock
+
+SYSCALL__ (sigblock, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=609191269db1479ccaf8510bf33a3f9fbf6fe754
commit 609191269db1479ccaf8510bf33a3f9fbf6fe754
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 3 22:35:49 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/mknod.S b/sysdeps/unix/sysv/sysv4/i386/mknod.S
new file mode 100644
index 0000000..4c879cb
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/mknod.S
@@ -0,0 +1,34 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* In SVR4 the `mknod' call is actually done by the `xmknod' system call,
+ which takes an additional first argument giving a version number for
+ the interface. This macro gives the SVR4 version number that
+ corresponds to the modern interface. */
+#define _MKNOD_VER 2
+
+.globl syscall_error
+ENTRY (__mknod)
+ popl %eax /* Pop return address into %eax. */
+ pushl $_MKNOD_VER /* Push extra first arg to syscall. */
+ pushl %eax /* Push back the return address. */
+ DO_CALL (xmknod, 3) /* Do the syscall. */
+ jb syscall_error /* Check for error. */
+ ret /* Return success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=948956956f70fadaa85b20e93ec0411ca96fabeb
commit 948956956f70fadaa85b20e93ec0411ca96fabeb
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 1 16:44:24 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S
index a5a8dfe..a4b2c42 100644
--- a/sysdeps/unix/sysv/isc2.2/rename.S
+++ b/sysdeps/unix/sysv/isc2.2/rename.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/rename.S>
+#include <sysdeps/unix/common/rename.S>
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index f16b643..63decf1 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -27,7 +27,7 @@ ENTRY (__waitpid)
pushl %eax /* Push the new flags word. */
popfl /* Pop it into the flags. */
DO_CALL (wait, 2)
- movl 4(%esp), scratch /* Put status pointer in scratch register. */
+ movl 8(%esp), scratch /* Put status pointer in scratch register. */
testl scratch, scratch /* Is it non-nil? */
je null
movl r1, (scratch) /* Yes; store the status there. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10e51d0930a8a0bf13520f36fc3bd012b42264bb
commit 10e51d0930a8a0bf13520f36fc3bd012b42264bb
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 25 01:04:05 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/Implies b/sysdeps/unix/bsd/sun/sunos4/Implies
new file mode 100644
index 0000000..c99e256
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/Implies
@@ -0,0 +1,2 @@
+# SunOS 4 has the canonical set of <sys/mman.h> system calls.
+unix/mman
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 17fd8de..0e66416 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the bits used by 4.4 BSD and its derivatives. On systems
- (such as GNU) where these facilities are not system services but can be
- emulated in the C library, these are the definitions we emulate. */
-
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H 1
diff --git a/sysdeps/unix/bsd/ultrix4/Implies b/sysdeps/unix/bsd/ultrix4/Implies
new file mode 100644
index 0000000..b0e08ef
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/Implies
@@ -0,0 +1,2 @@
+# Ultrix 4 has the canonical set of <sys/mman.h> system calls.
+unix/mman
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
index 05fdb60..2e9a259 100644
--- a/sysdeps/unix/mips/wait.S
+++ b/sysdeps/unix/mips/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/irix4/Implies b/sysdeps/unix/sysv/irix4/Implies
index 78437f6..35e1edd 100644
--- a/sysdeps/unix/sysv/irix4/Implies
+++ b/sysdeps/unix/sysv/irix4/Implies
@@ -1,2 +1,4 @@
# Irix 4 has the set of things which are also common to BSD and SVR4.
unix/common
+# Irix 4 has the canonical set of <sys/mman.h> system calls.
+unix/mman
diff --git a/sysdeps/unix/sysv/irix4/confname.h b/sysdeps/unix/sysv/irix4/confname.h
new file mode 100644
index 0000000..49d2f9c
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/confname.h
@@ -0,0 +1,80 @@
+/* `sysconf', `pathconf', and `confstr' NAME values. Irix 4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Values for the NAME argument to `pathconf' and `fpathconf'. */
+enum
+ {
+ _PC_LINK_MAX = 1,
+ _PC_MAX_CANON,
+ _PC_MAX_INPUT,
+ _PC_NAME_MAX,
+ _PC_PATH_MAX,
+ _PC_PIPE_BUF,
+ _PC_CHOWN_RESTRICTED,
+ _PC_NO_TRUNC,
+ _PC_VDISABLE
+ };
+
+/* Values for the argument to `sysconf'. */
+enum
+ {
+ _SC_ARG_MAX = 1,
+ _SC_CHILD_MAX,
+ _SC_CLK_TCK,
+ _SC_NGROUPS_MAX,
+ _SC_OPEN_MAX,
+ _SC_JOB_CONTROL,
+ _SC_SAVED_IDS,
+ _SC_VERSION,
+
+ /* Above are done by the Irix system call.
+ The rest are done by the C library (or are not really implemented). */
+
+ _SC_STREAM_MAX,
+ _SC_TZNAME_MAX,
+ _SC_PAGESIZE,
+
+ /* Values for the argument to `sysconf'
+ corresponding to _POSIX2_* symbols. */
+ _SC_BC_BASE_MAX,
+ _SC_BC_DIM_MAX,
+ _SC_BC_SCALE_MAX,
+ _SC_BC_STRING_MAX,
+ _SC_COLL_WEIGHTS_MAX,
+ _SC_EQUIV_CLASS_MAX,
+ _SC_EXPR_NEST_MAX,
+ _SC_LINE_MAX,
+ _SC_RE_DUP_MAX,
+
+ _SC_2_VERSION,
+ _SC_2_C_BIND,
+ _SC_2_C_DEV,
+ _SC_2_FORT_DEV,
+ _SC_2_FORT_RUN,
+ _SC_2_SW_DEV,
+ _SC_2_LOCALEDEF
+ };
+
+#ifdef __USE_POSIX2
+/* Values for the NAME argument to `confstr'. */
+enum
+ {
+ _CS_PATH /* The default search path. */
+ };
+#endif
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/fpathconf.c
similarity index 72%
copy from sysdeps/unix/sysv/irix4/sysconf.c
copy to sysdeps/unix/sysv/irix4/fpathconf.c
index 03bb324..be39d2f 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/fpathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,16 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
#include <sys/syssgi.h>
-/* Get the value of the system variable NAME. */
+extern int __syssgi __P ((int, ...));
+
+/* Get file-specific information about descriptor FD. */
long int
-DEFUN(__sysconf, (name), int name)
+DEFUN(__fpathconf, (fd, name), int fd AND int name)
{
- return syssgi(SGI_SYSCONF, name);
+ return __syssgi (SGI_PATHCONF, FPATHCONF, fd, name);
}
diff --git a/sysdeps/unix/sysv/irix4/gettimeofday.c b/sysdeps/unix/sysv/irix4/gettimeofday.c
new file mode 100644
index 0000000..d92b3bb
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/gettimeofday.c
@@ -0,0 +1 @@
+#include <sysdeps/posix/__gettod.c>
diff --git a/sysdeps/unix/sysv/irix4/msync.S b/sysdeps/unix/sysv/irix4/msync.S
new file mode 100644
index 0000000..75b9f15
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/msync.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/sunos4/msync.S>
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/pathconf.c
similarity index 72%
copy from sysdeps/unix/sysv/irix4/sysconf.c
copy to sysdeps/unix/sysv/irix4/pathconf.c
index 03bb324..6e54661 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/pathconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,16 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
#include <sys/syssgi.h>
-/* Get the value of the system variable NAME. */
+extern int __syssgi __P ((int, ...));
+
+/* Get file-specific information about PATH. */
long int
-DEFUN(__sysconf, (name), int name)
+DEFUN(__pathconf, (path, name), CONST char *path AND int name)
{
- return syssgi(SGI_SYSCONF, name);
+ return __syssgi (SGI_PATHCONF, PATHCONF, path, name);
}
diff --git a/sysdeps/unix/sysv/irix4/reboot.c b/sysdeps/unix/sysv/irix4/reboot.c
new file mode 100644
index 0000000..d7a3659
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/reboot.c
@@ -0,0 +1 @@
+#include <sysdeps/stub/reboot.c>
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index ff9108b..a632953 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,20 +21,21 @@ Cambridge, MA 02139, USA. */
#include <sys/resource.h>
#include <sys/sysmp.h>
-/* Return the highest priority of any process specified by WHICH and WHO
- (see <sys/resource.h>); if WHO is zero, the current process, process group,
- or user (as specified by WHO) is used. A lower priority number means higher
- priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
DEFUN(setpriority, (which, who, prio),
enum __priority_which which AND int who AND int prio)
{
- if(which == PRIO_PROCESS)
- return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who, prio));
- else if(which == PRIO_PGRP)
- return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who, prio));
- else if(which == PRIO_USER)
- return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who, prio));
+ switch (which)
+ {
+ case PRIO_PROCESS:
+ return __sysmp (MP_SCHED, MPTS_RENICE_PROC, who, prio);
+ case PRIO_PGRP:
+ return __sysmp (MP_SCHED, MPTS_RENICE_PGRP, who, prio);
+ case PRIO_USER:
+ return __sysmp (MP_SCHED, MPTS_RENICE_USER, who, prio);
+ }
+
errno = EINVAL;
return -1;
}
+
diff --git a/sysdeps/unix/sysv/irix4/swapon.c b/sysdeps/unix/sysv/irix4/swapon.c
new file mode 100644
index 0000000..86a638f
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/swapon.c
@@ -0,0 +1 @@
+#include <sysdeps/stub/swapon.c>
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/sysv/irix4/sys/mman.h
similarity index 81%
copy from sysdeps/unix/bsd/sun/sunos4/sys/mman.h
copy to sysdeps/unix/sysv/irix4/sys/mman.h
index 17fd8de..ac50aab 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/sysv/irix4/sys/mman.h
@@ -1,4 +1,4 @@
-/* Definitions for BSD-style memory management. SunOS 4 version.
+/* Definitions for BSD-style memory management. Irix 4 version.
Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* These are the bits used by 4.4 BSD and its derivatives. On systems
- (such as GNU) where these facilities are not system services but can be
- emulated in the C library, these are the definitions we emulate. */
-
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H 1
@@ -37,9 +33,10 @@ Cambridge, MA 02139, USA. */
allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
#define PROT_NONE 0x00 /* No access. */
-#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_READ 0x04 /* Pages can be read. */
#define PROT_WRITE 0x02 /* Pages can be written. */
-#define PROT_EXEC 0x04 /* Pages can be executed. */
+#define PROT_EXEC 0x01 /* Pages can be executed. */
+#define PROT_EXECUTE PROT_EXEC
/* Sharing types (must choose one and only one of these). */
@@ -49,16 +46,9 @@ Cambridge, MA 02139, USA. */
/* Other flags. */
#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
-/* The following three flags are not actually implemented in SunOS 4.1. */
#define MAP_RENAME 0x20 /* Rename private pages to file. */
-#define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
-#define MAP_INHERIT 0x80 /* Region is retained after exec. */
-
-/* This is an internal flag that is always set in `mmap' system calls. In
- older versions of SunOS 4 `mmap' did not return the actual mapping
- address, but always returned zero. This flag says to return the
- address; the `mmap' C library function always sets it. */
-#define _MAP_NEW 0x80000000
+#define MAP_AUTOGROW 0x40 /* Grow file as pages are written. */
+#define MAP_LOCAL 0x80 /* Copy the mapped region on fork. */
/* Advice to `madvise'. */
#define MADV_NORMAL 0 /* No further special treatment. */
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
index 03bb324..497c6a7 100644
--- a/sysdeps/unix/sysv/irix4/sysconf.c
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,11 +17,17 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#include <unistd.h>
#include <sys/syssgi.h>
+extern int __syssgi __P ((int, ...));
+
/* Get the value of the system variable NAME. */
long int
DEFUN(__sysconf, (name), int name)
{
- return syssgi(SGI_SYSCONF, name);
+ if (name == _SC_TZNAME_MAX)
+ return __tzname_max ();
+
+ return __syssgi (SGI_SYSCONF, name);
}
diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S
index a7c06a5..438da60 100644
--- a/sysdeps/unix/sysv/irix4/sysmp.S
+++ b/sysdeps/unix/sysv/irix4/sysmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL (sysmp, 4)
+SYSCALL__ (sysmp, 4)
ret
diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S
index 39b82ea..2715d28 100644
--- a/sysdeps/unix/sysv/irix4/syssgi.S
+++ b/sysdeps/unix/sysv/irix4/syssgi.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL (syssgi, 2)
+SYSCALL__ (syssgi, 2)
ret
diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S
index a45c99b..fe91240 100644
--- a/sysdeps/unix/sysv/irix4/uname.S
+++ b/sysdeps/unix/sysv/irix4/uname.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,5 +19,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY(uname)
-SYSCALL (utssys, 1)
- ret
+ li a2, 0
+ li a3, 0
+SYSCALL__ (utssys, 1)
+ j ra
+ move v0, zero
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2ff3460e483f3bd5c9315814a8b3c38ee87af18
commit b2ff3460e483f3bd5c9315814a8b3c38ee87af18
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 25 00:58:57 1994 +0000
Formerly unix/mips/sysdep.S.~2~
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
index d75217d..4d3aec3 100644
--- a/sysdeps/unix/mips/sysdep.S
+++ b/sysdeps/unix/mips/sysdep.S
@@ -36,5 +36,5 @@ skip:
sw v0, errno
/* And just kick back a -1. */
- li v0, -1
j ra
+ li v0, -1
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ee700c8a6254bb907547300dc07206f9bb9200d
commit 1ee700c8a6254bb907547300dc07206f9bb9200d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 25 00:46:06 1994 +0000
Formerly unix/sysv/irix4/signum.h.~2~
diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h
index d1e2b21..71b8c98 100644
--- a/sysdeps/unix/sysv/irix4/signum.h
+++ b/sysdeps/unix/sysv/irix4/signum.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cygnus.com).
+/* Copyright (C) Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,7 +18,7 @@ Cambridge, MA 02139, USA. */
#ifdef _SIGNAL_H
/* This file defines the fake signal functions and signal
- number constants for System V Release 4 UNIX. */
+ number constants for SGI Irix 4. */
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1)
@@ -43,7 +42,7 @@ Cambridge, MA 02139, USA. */
#define SIGSYS 12 /* Bad argument to system call*/
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
-#define SIGTERM 15 /* Termination (ANSI). */
+1994#define SIGTERM 15 /* Termination (ANSI). */
#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
#define SIGCHLD 18 /* Child status has changed (POSIX). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f0b44502672440b94fe87e74a4ad6979dccbbb5b
commit f0b44502672440b94fe87e74a4ad6979dccbbb5b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 25 00:29:31 1994 +0000
Initial revision
diff --git a/sysdeps/unix/mips/wait.S b/sysdeps/unix/mips/wait.S
new file mode 100644
index 0000000..05fdb60
--- /dev/null
+++ b/sysdeps/unix/mips/wait.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.set noreorder
+
+ENTRY(__wait)
+ /* Prep it for wait. */
+ move a1, zero
+ move a2, zero
+
+ li v0, SYS_wait
+ syscall
+ beq a3, zero, noerror
+ nop
+ j syscall_error
+ nop
+
+noerror:
+ /* If the arg is not NULL, store v1 there. */
+ beq a0, zero, noarg
+ nop
+ sw v1, 0(a0)
+ nop
+noarg:
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba41db06a8b18e58984516042f00e6e45a6ada5f
commit ba41db06a8b18e58984516042f00e6e45a6ada5f
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 25 00:03:44 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S
index b84b41a..c13a691 100644
--- a/sysdeps/unix/sysv/irix4/getpgid.S
+++ b/sysdeps/unix/sysv/irix4/getpgid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (bsdgetpgrp, 1)
+PSEUDO (__getpgrp, bsdgetpgrp, 1)
ret
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index c523278..70a9431 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,8 @@ Cambridge, MA 02139, USA. */
#include <sys/resource.h>
#include <sys/sysmp.h>
+extern int __sysmp __P ((int, ...));
+
/* Return the highest priority of any process specified by WHICH and WHO
(see <sys/resource.h>); if WHO is zero, the current process, process group,
or user (as specified by WHO) is used. A lower priority number means higher
@@ -29,12 +31,16 @@ int
DEFUN(getpriority, (which, who),
enum __priority_which which AND int who)
{
- if(which == PRIO_PROCESS)
- return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who));
- else if(which == PRIO_PGRP)
- return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who));
- else if(which == PRIO_USER)
- return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who));
+ switch (which)
+ {
+ case PRIO_PROCESS:
+ return __sysmp (MP_SCHED, MPTS_GTNICE_PROC, who);
+ case PRIO_PGRP:
+ return __sysmp (MP_SCHED, MPTS_GTNICE_PGRP, who);
+ case PRIO_USER:
+ return __sysmp (MP_SCHED, MPTS_GTNICE_USER, who);
+ }
+
errno = EINVAL;
return -1;
}
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
index 7222a0d..e160980 100644
--- a/sysdeps/unix/sysv/irix4/getrusage.c
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,20 +21,13 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include <sys/syssgi.h>
+extern int __syssgi __P ((int, ...));
+
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
int
DEFUN(__getrusage, (who, usage),
enum __rusage_who who AND struct rusage *usage)
{
- return syssgi(SGI_RUSAGE, who, usage);
+ return __syssgi (SGI_RUSAGE, who, usage);
}
-
-
-#ifdef HAVE_GNU_LD
-
-#include <gnu-stabs.h>
-
-stub_warning(__getrusage);
-
-#endif /* GNU stabs. */
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
index 70d748b..052df0f 100644
--- a/sysdeps/unix/sysv/irix4/setgroups.c
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <grp.h>
+extern int __syssgi __P ((int, ...));
+
/* Set the group set for the current user to GROUPS (N of them). */
int
DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups)
{
- return syssgi(SGI_SETGROUPS, n, groups);
+ return __syssgi (SGI_SETGROUPS, n, groups);
}
diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/setpgid.S
similarity index 90%
copy from sysdeps/unix/sysv/irix4/getpgid.S
copy to sysdeps/unix/sysv/irix4/setpgid.S
index b84b41a..2e3135b 100644
--- a/sysdeps/unix/sysv/irix4/getpgid.S
+++ b/sysdeps/unix/sysv/irix4/setpgid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (bsdgetpgrp, 1)
+PSEUDO (__setpgrp, bsdsetpgrp, 2)
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fe35453a7a94f323d37b7bf2cfa7261be7e27c1c
commit fe35453a7a94f323d37b7bf2cfa7261be7e27c1c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 24 23:55:30 1994 +0000
Formerly unix/sysv/irix4/__getgrps.c.~2~
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
index 525ff0c..b6f002a 100644
--- a/sysdeps/unix/sysv/irix4/getgroups.c
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,11 @@ Cambridge, MA 02139, USA. */
#include <sys/types.h>
#include <grp.h>
+extern int __syssgi __P ((int, ...));
+
/* Set the group set for the current user to GROUPS (N of them). */
int
DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups)
{
- return syssgi(SGI_GETGROUPS, n, groups);
+ return __syssgi (SGI_GETGROUPS, n, groups);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=95e37139f070a1fa4abd03fd2aa9571107fd0506
commit 95e37139f070a1fa4abd03fd2aa9571107fd0506
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 23 02:50:58 1994 +0000
Formerly unix/bsd/sun/sunos4/sys/mman.h.~3~
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 1726f64..17fd8de 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -85,7 +85,7 @@ __BEGIN_DECLS
deallocates any previous mapping for the affected region. */
__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
- int __prot, int __flags, int __fd, off_t __offset));
+ int __prot, int __flags, int __fd, __off_t __offset));
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=781e3c546023a99677df73c3958c8843b67d691a
commit 781e3c546023a99677df73c3958c8843b67d691a
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Feb 22 01:47:51 1994 +0000
Formerly unix/sysv/sysv4/__sigact.c.~3~
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index 7ce5ab5..e945373 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -29,7 +29,8 @@ extern int __sigaction_syscall (int,
static void
trampoline (int sig, int code, struct sigcontext *context)
{
- (*user_handlers[sig]) (sig, code, context);
+ (*(void (*) (int, int, struct sigcontext *)) user_handlers[sig])
+ (sig, code, context);
__context_syscall (1, context);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=515236670238e1bf590a281380b3ab8c974e9a88
commit 515236670238e1bf590a281380b3ab8c974e9a88
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 20 19:18:22 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
index 2379daa..4dfc1ca 100644
--- a/sysdeps/unix/bsd/sun/sunos4/mmap.c
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -30,7 +30,7 @@ Cambridge, MA 02139, USA. */
deallocates any previous mapping for the affected region. */
extern caddr_t __mmap_syscall (caddr_t addr, size_t len,
- int prot, int flags, int fd, off_t offset)
+ int prot, int flags, int fd, off_t offset);
caddr_t
diff --git a/sysdeps/unix/bsd/sun/sunos4/msync.S b/sysdeps/unix/bsd/sun/sunos4/msync.S
new file mode 100644
index 0000000..9fb8955
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/msync.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (msync, 3)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9592e8f126bcf4bb26fd889965628c75b9d02a6b
commit 9592e8f126bcf4bb26fd889965628c75b9d02a6b
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 20 05:46:12 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
index 93a2973..02e4d25 100644
--- a/sysdeps/unix/mips/sigreturn.S
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,10 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#ifndef SYS_sigreturn
+#define SYS_sigreturn 103
+#endif
+
ENTRY(__sigreturn)
- li v0, 103
+ li v0, SYS_sigreturn
syscall
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b1e2de3d8d5b2d1665ab50d251d230318ac127b2
commit b1e2de3d8d5b2d1665ab50d251d230318ac127b2
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 19 22:39:32 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/Dist b/sysdeps/unix/sysv/sysv4/i386/Dist
new file mode 100644
index 0000000..69d16ac
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/Dist
@@ -0,0 +1 @@
+sys-sig.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f3ee7dde2ed890dc2e2f0cfbe3d9876a19891ac5
commit f3ee7dde2ed890dc2e2f0cfbe3d9876a19891ac5
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 23:44:17 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist
index d7500fd..f1c9046 100644
--- a/sysdeps/unix/bsd/sun/sunos4/Dist
+++ b/sysdeps/unix/bsd/sun/sunos4/Dist
@@ -1 +1,2 @@
sys_wait4.S
+sys_mmap.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5cbab6ea8d530943596c686ccb5f2ab064798a4
commit a5cbab6ea8d530943596c686ccb5f2ab064798a4
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 01:59:39 1994 +0000
Formerly unix/sysv/sysv4/__sigact.c.~2~
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
index afb8338..7ce5ab5 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.c
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ae483762bdf84b9fd75e3f33b86828f7bb70a26
commit 6ae483762bdf84b9fd75e3f33b86828f7bb70a26
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 01:59:26 1994 +0000
Formerly unix/sysv/sysv4/i386/sys-sig.S.~2~
diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
index c62459a..ac4c07b 100644
--- a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
+++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
@@ -18,7 +18,12 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-PSEUDO (__sigaction_syscall, sigaction, 3)
+.globl C_SYMBOL_NAME(__sigreturn)
+
+ENTRY (__sigaction_syscall)
+ movel $C_SYMBOL_NAME(__sigreturn), %edx
+ DO_CALL (sigaction, 3)
+ jb syscall_error
ret
PSEUDO (__context_syscall, context, 2)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4fa5a741d85f3f0d2da0e326e8b1587074fa8492
commit 4fa5a741d85f3f0d2da0e326e8b1587074fa8492
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 01:57:40 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/i386/sys-sig.S b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
new file mode 100644
index 0000000..c62459a
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/sys-sig.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__sigaction_syscall, sigaction, 3)
+ ret
+
+PSEUDO (__context_syscall, context, 2)
+ ret
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.c b/sysdeps/unix/sysv/sysv4/sigaction.c
new file mode 100644
index 0000000..afb8338
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigaction.c
@@ -0,0 +1,75 @@
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <signal.h>
+
+static __sighandler_t user_handlers[NSIG];
+
+extern int __context_syscall (int, struct sigcontext *);
+extern int __sigaction_syscall (int,
+ const struct sigaction *, struct sigaction *);
+
+static void
+trampoline (int sig, int code, struct sigcontext *context)
+{
+ (*user_handlers[sig]) (sig, code, context);
+ __context_syscall (1, context);
+}
+
+/* If ACT is not NULL, change the action for SIG to *ACT.
+ If OACT is not NULL, put the old action for SIG in *OACT. */
+int
+DEFUN(__sigaction, (sig, act, oact),
+ int sig AND CONST struct sigaction *act AND struct sigaction *OACT)
+{
+ struct sigaction myact;
+ __sighandler_t ohandler;
+
+ if (sig <= 0 || sig >= NSIG)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ ohandler = user_handlers[sig];
+
+ if (act != NULL)
+ {
+ user_handlers[sig] = act->sa_handler;
+ if (act->sa_handler != SIG_DFL && act->sa_handler != SIG_IGN)
+ {
+ myact = *act;
+ act = &myact;
+ act->sa_handler = (__sighandler_t) trampoline;
+ }
+ }
+
+ if (__sigaction_syscall (sig, act, oact) < 0)
+ {
+ /* The syscall got an error. Restore the old handler and return -1. */
+ user_handlers[sig] = ohandler;
+ return -1;
+ }
+
+ if (oact != NULL && oact->sa_handler == (__sighandler_t) trampoline)
+ oact->sa_handler = ohandler;
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e5479462521d18926f8d21d5e06f9c35b4856da
commit 8e5479462521d18926f8d21d5e06f9c35b4856da
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 01:57:33 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/Makefile b/sysdeps/unix/sysv/sysv4/i386/Makefile
new file mode 100644
index 0000000..56f0a37
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sys-sig
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4fbc86a5e82d463ca2cc8162b35f3103069cbe6
commit e4fbc86a5e82d463ca2cc8162b35f3103069cbe6
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 17 00:34:24 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/ultrix4/sys/mman.h b/sysdeps/unix/bsd/ultrix4/sys/mman.h
new file mode 100644
index 0000000..c850b4f
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/sys/mman.h
@@ -0,0 +1,99 @@
+/* Definitions for BSD-style memory management. Ultrix 4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* These are the bits used by 4.4 BSD and its derivatives. On systems
+ (such as GNU) where these facilities are not system services but can be
+ emulated in the C library, these are the definitions we emulate. */
+
+#ifndef _SYS_MMAN_H
+
+#define _SYS_MMAN_H 1
+#include <features.h>
+
+#include <gnu/types.h>
+#define __need_size_t
+#include <stddef.h>
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#define MAP_TYPE 0x0f /* Mask for sharing type. */
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+
+/* Advice to `madvise'. */
+#define MADV_NORMAL 0 /* No further special treatment. */
+#define MADV_RANDOM 1 /* Expect random page references. */
+#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+#define MADV_WILLNEED 3 /* Will need these pages. */
+#define MADV_DONTNEED 4 /* Don't need these pages. */
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+/* Map addresses starting near ADDR and extending for LEN bytes. from
+ OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
+ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
+ set in FLAGS, the mapping will be at ADDR exactly (which must be
+ page-aligned); otherwise the system chooses a convenient nearby address.
+ The return value is the actual mapping address chosen or (caddr_t) -1
+ for errors (in which case `errno' is set). A successful `mmap' call
+ deallocates any previous mapping for the affected region. */
+
+__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, off_t __offset));
+
+/* Deallocate any mapping for the region starting at ADDR and extending LEN
+ bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int munmap __P ((__caddr_t __addr, size_t __len));
+
+/* Change the memory protection of the region starting at ADDR and
+ extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
+ (and sets errno). */
+int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+
+/* Ultrix 4 does not implement `msync' or `madvise'. */
+
+/* Synchronize the region starting at ADDR and extending LEN bytes with the
+ file it maps. Filesystem operations on a file being mapped are
+ unpredictable before this is done. */
+int msync __P ((caddr_t __addr, size_t __len));
+
+/* Advise the system about particular usage patterns the program follows
+ for the region starting at ADDR and extending LEN bytes. */
+int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+
+__END_DECLS
+
+
+#endif /* sys/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85a18dbaccd950c3bb180b738249f42802786ee7
commit 85a18dbaccd950c3bb180b738249f42802786ee7
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 16 23:49:29 1994 +0000
Formerly unix/bsd/sun/sunos4/sys/mman.h.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
index 5e45557..1726f64 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -101,6 +101,10 @@ int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
unpredictable before this is done. */
int msync __P ((caddr_t __addr, size_t __len, int __flags));
+/* Advise the system about particular usage patterns the program follows
+ for the region starting at ADDR and extending LEN bytes. */
+int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
+
__END_DECLS
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0537101d83555ddc01ad538acf6e445eb146679a
commit 0537101d83555ddc01ad538acf6e445eb146679a
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 16 23:13:37 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile
index 7cfecf2..96b88e1 100644
--- a/sysdeps/unix/bsd/sun/sunos4/Makefile
+++ b/sysdeps/unix/bsd/sun/sunos4/Makefile
@@ -1,3 +1,7 @@
ifeq ($(subdir), posix)
sysdep_routines := $(sysdep_routines) sys_wait4
endif
+
+ifeq ($(subdir), misc)
+sysdep_routines := $(sysdep_routines) sys_mmap
+endif
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S
new file mode 100644
index 0000000..61fe877
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/sys_mmap.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__mmap_syscall, mmap, 5)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74cd51ad202fe06f3770efcbe04e05cd122c283c
commit 74cd51ad202fe06f3770efcbe04e05cd122c283c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 16 23:11:21 1994 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/mmap.c b/sysdeps/unix/bsd/sun/sunos4/mmap.c
new file mode 100644
index 0000000..2379daa
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/mmap.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <errno.h>
+
+/* Map addresses starting near ADDR and extending for LEN bytes. from
+ OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
+ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
+ set in FLAGS, the mapping will be at ADDR exactly (which must be
+ page-aligned); otherwise the system chooses a convenient nearby address.
+ The return value is the actual mapping address chosen or (caddr_t) -1
+ for errors (in which case `errno' is set). A successful `mmap' call
+ deallocates any previous mapping for the affected region. */
+
+extern caddr_t __mmap_syscall (caddr_t addr, size_t len,
+ int prot, int flags, int fd, off_t offset)
+
+
+caddr_t
+mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+{
+ return __mmap_syscall (addr, len, prot, flags | _MAP_NEW, fd, offset);
+}
+
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys/mman.h b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
new file mode 100644
index 0000000..5e45557
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/sys/mman.h
@@ -0,0 +1,107 @@
+/* Definitions for BSD-style memory management. SunOS 4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* These are the bits used by 4.4 BSD and its derivatives. On systems
+ (such as GNU) where these facilities are not system services but can be
+ emulated in the C library, these are the definitions we emulate. */
+
+#ifndef _SYS_MMAN_H
+
+#define _SYS_MMAN_H 1
+#include <features.h>
+
+#include <gnu/types.h>
+#define __need_size_t
+#include <stddef.h>
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_NONE 0x00 /* No access. */
+#define PROT_READ 0x01 /* Pages can be read. */
+#define PROT_WRITE 0x02 /* Pages can be written. */
+#define PROT_EXEC 0x04 /* Pages can be executed. */
+
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes private; copy pages on write. */
+#define MAP_TYPE 0x0f /* Mask for sharing type. */
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Map address must be exactly as requested. */
+/* The following three flags are not actually implemented in SunOS 4.1. */
+#define MAP_RENAME 0x20 /* Rename private pages to file. */
+#define MAP_NORESERVE 0x40 /* Don't reserve needed swap area. */
+#define MAP_INHERIT 0x80 /* Region is retained after exec. */
+
+/* This is an internal flag that is always set in `mmap' system calls. In
+ older versions of SunOS 4 `mmap' did not return the actual mapping
+ address, but always returned zero. This flag says to return the
+ address; the `mmap' C library function always sets it. */
+#define _MAP_NEW 0x80000000
+
+/* Advice to `madvise'. */
+#define MADV_NORMAL 0 /* No further special treatment. */
+#define MADV_RANDOM 1 /* Expect random page references. */
+#define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+#define MADV_WILLNEED 3 /* Will need these pages. */
+#define MADV_DONTNEED 4 /* Don't need these pages. */
+
+/* Flags to `msync'. */
+#define MS_ASYNC 0x1 /* Return immediately, don't fsync. */
+#define MS_INVALIDATE 0x2 /* Invalidate caches. */
+
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+/* Map addresses starting near ADDR and extending for LEN bytes. from
+ OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
+ is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
+ set in FLAGS, the mapping will be at ADDR exactly (which must be
+ page-aligned); otherwise the system chooses a convenient nearby address.
+ The return value is the actual mapping address chosen or (caddr_t) -1
+ for errors (in which case `errno' is set). A successful `mmap' call
+ deallocates any previous mapping for the affected region. */
+
+__caddr_t mmap __P ((__caddr_t __addr, size_t __len,
+ int __prot, int __flags, int __fd, off_t __offset));
+
+/* Deallocate any mapping for the region starting at ADDR and extending LEN
+ bytes. Returns 0 if successful, -1 for errors (and sets errno). */
+int munmap __P ((__caddr_t __addr, size_t __len));
+
+/* Change the memory protection of the region starting at ADDR and
+ extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
+ (and sets errno). */
+int mprotect __P ((__caddr_t __addr, size_t __len, int __prot));
+
+/* Synchronize the region starting at ADDR and extending LEN bytes with the
+ file it maps. Filesystem operations on a file being mapped are
+ unpredictable before this is done. */
+int msync __P ((caddr_t __addr, size_t __len, int __flags));
+
+__END_DECLS
+
+
+#endif /* sys/mman.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=284dea21bb92b75ca01a60255a60253734b1a702
commit 284dea21bb92b75ca01a60255a60253734b1a702
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 15 18:03:42 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/uname.S b/sysdeps/unix/sysv/irix4/uname.S
new file mode 100644
index 0000000..a45c99b
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/uname.S
@@ -0,0 +1,23 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY(uname)
+SYSCALL (utssys, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8eabdea1fb0ffbf22890a8cb39d5d662fb4fcd61
commit 8eabdea1fb0ffbf22890a8cb39d5d662fb4fcd61
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 15 02:17:49 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
new file mode 100644
index 0000000..c523278
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <sys/resource.h>
+#include <sys/sysmp.h>
+
+/* Return the highest priority of any process specified by WHICH and WHO
+ (see <sys/resource.h>); if WHO is zero, the current process, process group,
+ or user (as specified by WHO) is used. A lower priority number means higher
+ priority. Priorities range from PRIO_MIN to PRIO_MAX. */
+int
+DEFUN(getpriority, (which, who),
+ enum __priority_which which AND int who)
+{
+ if(which == PRIO_PROCESS)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who));
+ else if(which == PRIO_PGRP)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who));
+ else if(which == PRIO_USER)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who));
+ errno = EINVAL;
+ return -1;
+}
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
new file mode 100644
index 0000000..ff9108b
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <sys/resource.h>
+#include <sys/sysmp.h>
+
+/* Return the highest priority of any process specified by WHICH and WHO
+ (see <sys/resource.h>); if WHO is zero, the current process, process group,
+ or user (as specified by WHO) is used. A lower priority number means higher
+ priority. Priorities range from PRIO_MIN to PRIO_MAX. */
+int
+DEFUN(setpriority, (which, who, prio),
+ enum __priority_which which AND int who AND int prio)
+{
+ if(which == PRIO_PROCESS)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_PROC, who, prio));
+ else if(which == PRIO_PGRP)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_PGRP, who, prio));
+ else if(which == PRIO_USER)
+ return(sysmp(MP_SCHED, MPTS_GTNICE_USER, who, prio));
+ errno = EINVAL;
+ return -1;
+}
diff --git a/sysdeps/unix/sysv/irix4/sysmp.S b/sysdeps/unix/sysv/irix4/sysmp.S
new file mode 100644
index 0000000..a7c06a5
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/sysmp.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (sysmp, 4)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98338733068d49b42f254ccd61e155619cfbb3ae
commit 98338733068d49b42f254ccd61e155619cfbb3ae
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 15 02:04:46 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/Makefile b/sysdeps/unix/sysv/irix4/Makefile
new file mode 100644
index 0000000..a7f3ea8
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/Makefile
@@ -0,0 +1,25 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sigtramp __handler
+endif
+
+ifeq ($(subdir),misc)
+sysdep_routines := $(sysdep_routines) syssgi sysmp
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=113d0e2f21db8fd3a736378a44380fcb69a57c09
commit 113d0e2f21db8fd3a736378a44380fcb69a57c09
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 14 16:04:07 1994 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c
index e051fd4..d4be88f 100644
--- a/sysdeps/m68k/fpu/acos.c
+++ b/sysdeps/m68k/fpu/acos.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
#endif
-double
+__CONSTVALUE double
DEFUN(FUNC, (x), double x)
{
return __m81_u(FUNC)(x);
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
index e937833..1efdb1f 100644
--- a/sysdeps/m68k/fpu/atan2.c
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
-double
+__CONSTVALUE double
DEFUN(atan2, (y, x), double y AND double x)
{
static CONST double one = 1.0, zero = 0.0;
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
index 8ca7598..b3efffb 100644
--- a/sysdeps/m68k/fpu/drem.c
+++ b/sysdeps/m68k/fpu/drem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
#undef drem
-double
+__CONSTVALUE double
DEFUN(__drem, (x, y), double x AND double y)
{
return ____drem(x, y);
diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c
index c5f1b5a..9a6c8cd 100644
--- a/sysdeps/m68k/fpu/fmod.c
+++ b/sysdeps/m68k/fpu/fmod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-double
+__CONSTVALUE double
DEFUN(fmod, (x, y), double x AND double y)
{
return __fmod(x, y);
diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c
index 194c5a6..c816dcd 100644
--- a/sysdeps/m68k/fpu/isinf.c
+++ b/sysdeps/m68k/fpu/isinf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ Cambridge, MA 02139, USA. */
#endif
-int
+__CONSTVALUE int
DEFUN(FUNC, (x), double x)
{
return __m81_u(FUNC)(x);
diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c
index 37d7b6d..ba91280 100644
--- a/sysdeps/m68k/fpu/ldexp.c
+++ b/sysdeps/m68k/fpu/ldexp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-double
+__CONSTVALUE double
DEFUN(ldexp, (x, exp), double x AND int exp)
{
return __ldexp(x, exp);
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
index df3de1c..27ce104 100644
--- a/sysdeps/m68k/fpu/logb.c
+++ b/sysdeps/m68k/fpu/logb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,8 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
/* Return the base 2 signed integral exponent of X. */
-double
+
+__CONSTVALUE double
DEFUN(__logb, (x), double x)
{
if (__isnan (x))
diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c
index aa9d559..3360020 100644
--- a/sysdeps/m68k/fpu/pow.c
+++ b/sysdeps/m68k/fpu/pow.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#define __NO_MATH_INLINES
#include <math.h>
-double
+__CONSTVALUE double
DEFUN(pow, (x, y), double x AND double y)
{
return __pow(x, y);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8e8d49c898a02fa86a86ae2f2195b86b6a10f3e0
commit 8e8d49c898a02fa86a86ae2f2195b86b6a10f3e0
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 14 15:36:49 1994 +0000
Formerly unix/bsd/m68k/sysdep.S.~6~
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index 1ec1ba4..afca46a 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -34,7 +34,7 @@ store: move.l d0, _errno
moveq.l #-1, d0
#else
#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
- cmpl d0, #EWOULDBLOCK_sys
+ cmpl #EWOULDBLOCK_sys, d0
bne 0f
moveq #EAGAIN, d0
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1491337a35af9f6bd4895dd41211e38ce6bcb190
commit 1491337a35af9f6bd4895dd41211e38ce6bcb190
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 14 03:10:48 1994 +0000
Formerly m68k/Makefile.~10~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 7d6f62d..6e9f261 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1993 Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,37 +22,6 @@
crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
-# Disgusting magic to get `#'s into the asm code.
-
-# Set `as-pipe-ok' if piping input to the assembler is likely to work.
-ifneq (,$(filter -pipe,$(compile.c) $(compile.S)))
-# The `-pipe' switch the compiler does it, so it must work.
-as-pipe-ok = yes
-endif
-ifdef gnu-as
-# GNU as can deal with input pipes.
-as-pipe-ok = yes
-endif
-
-ifdef as-pipe-ok
-
-define compile-command.S
-$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \
-| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
-endef
-
-else
-
-define compile-command.S
-@-rm -f $@s
-$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \
-| sed 's/(@@@Hash-Here@@@)/#/g' > $@s
-$(AS) $(ASFLAGS) $@s -o $@
--rm -f $@s
-endef
-
-endif
-
# The mpn functions need this. All existing 68k ports use MIT syntax. If
# a new port wants to use Motorola or Sony syntax, it can redefine this
# variable.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2bc551d14f4cbd439044146646d8333c18dc861e
commit 2bc551d14f4cbd439044146646d8333c18dc861e
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 14 03:10:44 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index 12db4d3..1b06c12 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ ___curbrk:
.text
ENTRY (__brk)
- movel POUND(__end), d0
+ movel #__end, d0
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index eddb98f..bd30bb8 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
-#define POUND(foo) (@@@Hash-Here@@@)foo
+#define POUND #
#ifdef __STDC__
#define ENTRY(name) \
@@ -39,11 +39,11 @@ Cambridge, MA 02139, USA. */
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- DO_CALL (POUND (SYS_ify (syscall_name), args)
+ DO_CALL (POUND SYS_ify (syscall_name), args)
#define DO_CALL(syscall, args) \
movel syscall, d0; \
- trap POUND(0); \
+ trap POUND 0; \
bcs error
#define ret rts
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 21d2ea5..6a69dd0 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ ENTRY (__brk)
ble 0f
movel d0, sp@(4)
0: pea SYS_brk
- trap POUND(0)
+ trap #0
bcs 1f
movel sp@(4), ___curbrk
clrl d0
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index d89faab..8655f37 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
-#define POUND(foo) (@@@Hash-Here@@@)foo
+#define POUND #
#ifdef __STDC__
#define ENTRY(name) \
@@ -41,7 +41,7 @@ Cambridge, MA 02139, USA. */
error: jmp syscall_error; \
ENTRY (name) \
pea SYS_##syscall_name; \
- trap POUND(0); \
+ trap POUND 0; \
bcs error
#else
#define PSEUDO(name, syscall_name, args) \
@@ -50,7 +50,7 @@ Cambridge, MA 02139, USA. */
error: jmp syscall_error; \
ENTRY (name) \
pea SYS_/**/syscall_name; \
- trap POUND(0); \
+ trap POUND 0; \
bcs error
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=17fc35d6381abeee7e6e8df5003b82f2057ae17c
commit 17fc35d6381abeee7e6e8df5003b82f2057ae17c
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 14 03:10:40 1994 +0000
Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~5~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index f707bb5..c843b8d 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
-#define POUND(foo) (@@@Hash-Here@@@)foo
+#define POUND #
#ifdef __STDC__
#define ENTRY(name) \
@@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- DO_CALL (POUND (SYS_ify (syscall_name)), args)
+ DO_CALL (POUND SYS_ify (syscall_name), args)
#define DO_CALL(syscall, args) \
movel syscall, d0; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d84d0a0c0ec7ddb1a3db3adf4b4482f80366f1d
commit 1d84d0a0c0ec7ddb1a3db3adf4b4482f80366f1d
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 13 01:15:21 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/getgroups.c b/sysdeps/unix/sysv/irix4/getgroups.c
new file mode 100644
index 0000000..525ff0c
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/getgroups.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sys/syssgi.h>
+#include <ansidecl.h>
+#include <sys/types.h>
+#include <grp.h>
+
+/* Set the group set for the current user to GROUPS (N of them). */
+int
+DEFUN(getgroups, (n, groups), size_t n AND gid_t *groups)
+{
+ return syssgi(SGI_GETGROUPS, n, groups);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bfe25d77487586dcacb5c0a1caddcf8672962e97
commit bfe25d77487586dcacb5c0a1caddcf8672962e97
Author: Roland McGrath <roland@gnu.org>
Date: Thu Feb 10 06:54:09 1994 +0000
Formerly unix/sysv/sysv4/sigset.h.~4~
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index c461f60..957ec08 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -82,7 +82,7 @@ __sigdelset (__sigset_t *__set, int __sig)
}
extern __inline int
-__sigismember (__sigset_t *__set, int __sig)
+__sigismember (__const __sigset_t *__set, int __sig)
{
if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig))
return 1;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30044853c8390b98864252a1d994ad19fae61f34
commit 30044853c8390b98864252a1d994ad19fae61f34
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 9 16:59:26 1994 +0000
Formerly unix/sysv/sysv4/sigset.h.~3~
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index ec8387a..c461f60 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -17,20 +17,32 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#ifndef _SIGSET_H
-#define _SIGSET_H 1
+#ifndef _SIGSET_H_types
+#define _SIGSET_H_types 1
typedef int __sig_atomic_t;
-/* Return a mask that includes SIG only. */
-#define __sigmask(sig) (1 << ((sig) - 1))
-
/* A `sigset_t' has a bit for each signal. */
typedef struct
{
unsigned long int __sigbits[4];
} __sigset_t;
+#endif /* ! _SIGSET_H_types */
+
+/* We only want to define these functions if <signal.h> was actually
+ included; otherwise we were included just to define the types. Since we
+ are namespace-clean, it wouldn't hurt to define extra macros. But
+ trouble can be caused by functions being defined (e.g., any global
+ register vars declared later will cause compilation errors). */
+
+#if !defined (_SIGSET_H_fns) && defined (_SIGNAL_H)
+#define _SIGSET_H_fns 1
+
+/* Return a mask that includes SIG only. */
+#define __sigmask(sig) (1 << ((sig) - 1))
+
+
/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
#define __NSSBITS (sizeof (__sigset_t) * 8)
#define __SSELT(s) ((s) / __NSSBITS)
@@ -58,23 +70,24 @@ __sigfillset (__sigset_t *__set)
extern __inline int
__sigaddset (__sigset_t *__set, int __sig)
{
- __set->__sigbits[__SSELT (sig)] |= __SSMASK (__sig);
+ __set->__sigbits[__SSELT (__sig)] |= __SSMASK (__sig);
return 0;
}
extern __inline int
__sigdelset (__sigset_t *__set, int __sig)
{
- __set->__sigbits[__SSELT (sig)] &= ~__SSMASK (__sig);
+ __set->__sigbits[__SSELT (__sig)] &= ~__SSMASK (__sig);
return 0;
}
extern __inline int
__sigismember (__sigset_t *__set, int __sig)
{
- if (__set->__sigbits[__SSELT (sig)] & __SSMASK (__sig))
+ if (__set->__sigbits[__SSELT (__sig)] & __SSMASK (__sig))
return 1;
return 0;
}
-#endif /* sigset.h */
+#endif /* ! _SIGSET_H_fns */
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4987f84424189a06afe069ef274b1c1835a3214
commit f4987f84424189a06afe069ef274b1c1835a3214
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 5 19:54:25 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h
index 418e7db..dbb31f1 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/sigaction.h
@@ -1,5 +1,5 @@
/* The proper definitions for SVR4's sigaction.
-Copyright (C) 1993 Free Software Foundation, Inc.
+Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,15 +20,15 @@ Cambridge, MA 02139, USA. */
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
+ /* Special flags. */
+ int sa_flags;
+
/* Signal handler. */
__sighandler_t sa_handler;
/* Additional set of signals to be blocked. */
__sigset_t sa_mask;
- /* Special flags. */
- int sa_flags;
-
/* Padding. */
int sa_resv[2];
};
@@ -41,7 +41,7 @@ struct sigaction
#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
#define SA_NODEFER 0x10 /* Don't automatically block the signal when
its handler is being executed. */
-#define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */
+#define SA_NOCLDWAIT 0x10000 /* Don't save zombie processes. */
#endif
#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h
index 2f70495..aa3dc7f 100644
--- a/sysdeps/unix/sysv/sysv4/signum.h
+++ b/sysdeps/unix/sysv/sysv4/signum.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+/* Signal number definitions. SVR4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,13 +19,10 @@ Cambridge, MA 02139, USA. */
#ifdef _SIGNAL_H
-/* This file defines the fake signal functions and signal
- number constants for System V Release 4 UNIX. */
-
/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1)
-#define SIG_DFL ((__sighandler_t) 0)
-#define SIG_IGN ((__sighandler_t) 1)
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
/* Signals. */
@@ -34,13 +32,13 @@ Cambridge, MA 02139, USA. */
#define SIGILL 4 /* Illegal instruction (ANSI). */
#define SIGABRT SIGIOT /* Abort (ANSI). */
#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap. */
-#define SIGEMT 7 /* EMT trap. */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
#define SIGFPE 8 /* Floating-point exception (ANSI). */
#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error. */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call*/
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
#define SIGTERM 15 /* Termination (ANSI). */
@@ -48,20 +46,20 @@ Cambridge, MA 02139, USA. */
#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
#define SIGCHLD 18 /* Child status has changed (POSIX). */
#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power going down. */
-#define SIGWINCH 20 /* Window size change. */
-#define SIGURG 21 /* Urgent condition on socket.*/
-#define SIGIO SIGPOLL /* I/O now possible. */
-#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
#define SIGTSTP 24 /* Keyboard stop (POSIX). */
#define SIGCONT 25 /* Continue (POSIX). */
#define SIGTTIN 26 /* Background read from tty (POSIX). */
#define SIGTTOU 27 /* Background write to tty (POSIX). */
-#define SIGVTALRM 28 /* Virtual alarm clock. */
-#define SIGPROF 29 /* Profiling alarm clock. */
-#define SIGXCPU 30 /* CPU limit exceeded. */
-#define SIGXFSZ 31 /* File size limit exceeded. */
+#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
#endif /* <signal.h> included. */
diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/solaris2/signum.h
similarity index 55%
copy from sysdeps/unix/sysv/sysv4/signum.h
copy to sysdeps/unix/sysv/sysv4/solaris2/signum.h
index 2f70495..8219626 100644
--- a/sysdeps/unix/sysv/sysv4/signum.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/signum.h
@@ -1,5 +1,6 @@
-/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@zen.org).
+/* Signal number definitions. Solaris 2 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -18,13 +19,10 @@ Cambridge, MA 02139, USA. */
#ifdef _SIGNAL_H
-/* This file defines the fake signal functions and signal
- number constants for System V Release 4 UNIX. */
-
/* Fake signal functions. */
-#define SIG_ERR ((__sighandler_t) -1)
-#define SIG_DFL ((__sighandler_t) 0)
-#define SIG_IGN ((__sighandler_t) 1)
+#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
+#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
+#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
/* Signals. */
@@ -34,13 +32,13 @@ Cambridge, MA 02139, USA. */
#define SIGILL 4 /* Illegal instruction (ANSI). */
#define SIGABRT SIGIOT /* Abort (ANSI). */
#define SIGTRAP 5 /* Trace trap (POSIX). */
-#define SIGIOT 6 /* IOT trap. */
-#define SIGEMT 7 /* EMT trap. */
+#define SIGIOT 6 /* IOT trap (4.2 BSD). */
+#define SIGEMT 7 /* EMT trap (4.2 BSD). */
#define SIGFPE 8 /* Floating-point exception (ANSI). */
#define SIGKILL 9 /* Kill, unblockable (POSIX). */
-#define SIGBUS 10 /* Bus error. */
+#define SIGBUS 10 /* Bus error (4.2 BSD). */
#define SIGSEGV 11 /* Segmentation violation (ANSI). */
-#define SIGSYS 12 /* Bad argument to system call*/
+#define SIGSYS 12 /* Bad argument to system call (4.2 BSD)*/
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
#define SIGTERM 15 /* Termination (ANSI). */
@@ -48,21 +46,28 @@ Cambridge, MA 02139, USA. */
#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
#define SIGCHLD 18 /* Child status has changed (POSIX). */
#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
-#define SIGPWR 19 /* Power going down. */
-#define SIGWINCH 20 /* Window size change. */
-#define SIGURG 21 /* Urgent condition on socket.*/
-#define SIGIO SIGPOLL /* I/O now possible. */
-#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
+#define SIGPWR 19 /* Power failure restart (System V). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+#define SIGURG 21 /* Urgent condition on socket (4.2 BSD).*/
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
#define SIGTSTP 24 /* Keyboard stop (POSIX). */
#define SIGCONT 25 /* Continue (POSIX). */
#define SIGTTIN 26 /* Background read from tty (POSIX). */
#define SIGTTOU 27 /* Background write to tty (POSIX). */
-#define SIGVTALRM 28 /* Virtual alarm clock. */
-#define SIGPROF 29 /* Profiling alarm clock. */
-#define SIGXCPU 30 /* CPU limit exceeded. */
-#define SIGXFSZ 31 /* File size limit exceeded. */
+#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
+#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
+#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
+#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
+/* The following signals are new in Solaris 2. */
+#define SIGWAITING 32 /* Process's lwps are blocked. */
+#define SIGLWP 33 /* Special signal used by thread library. */
+#define SIGFREEZE 34 /* Special signal used by CPR. */
+#define SIGTHAW 35 /* Special signal used by CPR. */
+#define _SIGRTMIN 36 /* First (highest-priority) realtime signal. */
+#define _SIGRTMAX 43 /* Last (lowest-priority) realtime signal. */
#endif /* <signal.h> included. */
-#define _NSIG 32 /* Biggest signal number + 1. */
+#define _NSIG 44 /* Biggest signal number + 1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=068c7fc064e14355ba5c897c90cd246456c78084
commit 068c7fc064e14355ba5c897c90cd246456c78084
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 5 19:38:01 1994 +0000
Formerly unix/sysv/sysv4/sigset.h.~2~
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
index b3e9f0e..ec8387a 100644
--- a/sysdeps/unix/sysv/sysv4/sigset.h
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* __sig_atomic_t, __sigset_t, and related definitions. SVR4 version.
+Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,16 +39,19 @@ typedef struct
extern __inline int
__sigemptyset (__sigset_t *__set)
{
- __set->__sigbits[0] = __set->__sigbits[1] = 0L;
- __set->__sigbits[2] = __set->__sigbits[3] = 0L;
+ __set->__sigbits[0] = __set->__sigbits[1] =
+ __set->__sigbits[2] = __set->__sigbits[3] = 0L;
return 0;
}
extern __inline int
__sigfillset (__sigset_t *__set)
{
- __set->__sigbits[0] = 0x7fffffffL;
- __set->__sigbits[1] = __set->__sigbits[2] = __set->__sigbits[3] = 0L;
+ /* SVR4 has a system call for `sigfillset' (!), and it only sets the bits
+ for signals [1,31]. Setting bits for unimplemented signals seems
+ harmless (and we will find out if it really is). */
+ __set->__sigbits[0] = __set->__sigbits[1] =
+ __set->__sigbits[2] = __set->__sigbits[3] = -1;
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7e66b0a979e76be757d090cb8d34d7f344db0422
commit 7e66b0a979e76be757d090cb8d34d7f344db0422
Author: Roland McGrath <roland@gnu.org>
Date: Sat Feb 5 19:31:48 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/sigset.h b/sysdeps/unix/sysv/sysv4/sigset.h
new file mode 100644
index 0000000..b3e9f0e
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigset.h
@@ -0,0 +1,76 @@
+/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _SIGSET_H
+#define _SIGSET_H 1
+
+typedef int __sig_atomic_t;
+
+/* Return a mask that includes SIG only. */
+#define __sigmask(sig) (1 << ((sig) - 1))
+
+/* A `sigset_t' has a bit for each signal. */
+typedef struct
+ {
+ unsigned long int __sigbits[4];
+ } __sigset_t;
+
+/* It's easier to assume 8-bit bytes than to get CHAR_BIT. */
+#define __NSSBITS (sizeof (__sigset_t) * 8)
+#define __SSELT(s) ((s) / __NSSBITS)
+#define __SSMASK(s) (1 << ((s) % __NSSBITS))
+
+extern __inline int
+__sigemptyset (__sigset_t *__set)
+{
+ __set->__sigbits[0] = __set->__sigbits[1] = 0L;
+ __set->__sigbits[2] = __set->__sigbits[3] = 0L;
+ return 0;
+}
+
+extern __inline int
+__sigfillset (__sigset_t *__set)
+{
+ __set->__sigbits[0] = 0x7fffffffL;
+ __set->__sigbits[1] = __set->__sigbits[2] = __set->__sigbits[3] = 0L;
+ return 0;
+}
+
+extern __inline int
+__sigaddset (__sigset_t *__set, int __sig)
+{
+ __set->__sigbits[__SSELT (sig)] |= __SSMASK (__sig);
+ return 0;
+}
+
+extern __inline int
+__sigdelset (__sigset_t *__set, int __sig)
+{
+ __set->__sigbits[__SSELT (sig)] &= ~__SSMASK (__sig);
+ return 0;
+}
+
+extern __inline int
+__sigismember (__sigset_t *__set, int __sig)
+{
+ if (__set->__sigbits[__SSELT (sig)] & __SSMASK (__sig))
+ return 1;
+ return 0;
+}
+
+#endif /* sigset.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f5516c0c0ca075989cb09451b9bee41255372067
commit f5516c0c0ca075989cb09451b9bee41255372067
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 2 22:26:32 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S
new file mode 100644
index 0000000..9bce387
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sigsuspend.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/sysv4/sigsuspend.S>
diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S
index 7c6a132..bf83d6f 100644
--- a/sysdeps/unix/sysv/sysv4/i386/fstat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S
@@ -30,6 +30,6 @@ ENTRY (__fstat)
popl %eax /* Pop return address into %eax. */
pushl $_STAT_VER /* Push extra first arg to syscall. */
pushl %eax /* Push back the return address. */
- DO_CALL (xfstat, 3) /* Do the syscall. */
+ DO_CALL (fxstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S
index 9282798..0ca214f 100644
--- a/sysdeps/unix/sysv/sysv4/i386/lstat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S
@@ -30,6 +30,6 @@ ENTRY (__lstat)
popl %eax /* Pop return address into %eax. */
pushl $_STAT_VER /* Push extra first arg to syscall. */
pushl %eax /* Push back the return address. */
- DO_CALL (xlstat, 3) /* Do the syscall. */
+ DO_CALL (lxstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
ret /* Return success. */
diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S
index f7cf0d5..e7e4060 100644
--- a/sysdeps/unix/sysv/sysv4/sigaltstack.S
+++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S
@@ -1,2 +1,2 @@
/* SVR4 uses the BSD 4.4 sigaltstack syscall. */
-#include <sysdeps/unix/bsd/bsd4.4/sigaltstack.S>
+#include <sysdeps/unix/bsd/bsd4.4/sigaltstk.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30d3e739362de618dce7dcdef13203f8e60b562d
commit 30d3e739362de618dce7dcdef13203f8e60b562d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 2 22:10:28 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/sigaltstack.S b/sysdeps/unix/sysv/sysv4/sigaltstack.S
new file mode 100644
index 0000000..f7cf0d5
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigaltstack.S
@@ -0,0 +1,2 @@
+/* SVR4 uses the BSD 4.4 sigaltstack syscall. */
+#include <sysdeps/unix/bsd/bsd4.4/sigaltstack.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64d88a4ad0e68ccc97f003a60ba0d818638e7f15
commit 64d88a4ad0e68ccc97f003a60ba0d818638e7f15
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 1 00:52:23 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index 9f39b82..618d889 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
.globl _errno
.globl syscall_error
syscall_error:
-#ifdef EWOULDBLOCK_sys
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/vfork.S b/sysdeps/unix/sysv/sysv4/i386/vfork.S
new file mode 100644
index 0000000..1cdebcd
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/vfork.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/i386/__vfork.S>
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index cf5d272..da3cd6b 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ ENTRY(syscall_error)
mov EINTR, %o0
notint:
-#ifdef EWOULDBLOCK_sys
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6ad344f009f70524d5ab135aaf71ca851e3f6ab7
commit 6ad344f009f70524d5ab135aaf71ca851e3f6ab7
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 1 00:52:15 1994 +0000
Initial revision
diff --git a/sysdeps/unix/mips/sysdep.S b/sysdeps/unix/mips/sysdep.S
new file mode 100644
index 0000000..d75217d
--- /dev/null
+++ b/sysdeps/unix/mips/sysdep.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
+
+/* .globl errno */
+
+ENTRY(syscall_error)
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ bne v0, EWOULDBLOCK_sys, skip
+ nop
+ li v0, EAGAIN
+skip:
+#endif
+ /* Store it in errno... */
+ sw v0, errno
+
+ /* And just kick back a -1. */
+ li v0, -1
+ j ra
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f075b1b2c0c8bb9dd7ec6504acbe8f96688612cf
commit f075b1b2c0c8bb9dd7ec6504acbe8f96688612cf
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 1 00:52:02 1994 +0000
Formerly unix/bsd/m68k/sysdep.S.~5~
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index a7f599c..1ec1ba4 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ syscall_error:
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
#ifdef __motorola__
-#ifdef EWOULDBLOCK_sys
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
cmp.l d0, #EWOULDBLOCK_sys
bne store
moveq.l #EAGAIN, d0
@@ -33,7 +33,7 @@ syscall_error:
store: move.l d0, _errno
moveq.l #-1, d0
#else
-#ifdef EWOULDBLOCK_sys
+#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
cmpl d0, #EWOULDBLOCK_sys
bne 0f
moveq #EAGAIN, d0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e1b58f4d4a25eeaa6134ac9133aacab0c1f8108e
commit e1b58f4d4a25eeaa6134ac9133aacab0c1f8108e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 27 03:07:02 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sequent/i386/getgroups.S b/sysdeps/unix/bsd/sequent/i386/getgroups.S
new file mode 100644
index 0000000..cf25abe
--- /dev/null
+++ b/sysdeps/unix/bsd/sequent/i386/getgroups.S
@@ -0,0 +1,42 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#include <limits.h>
+
+/* Dynix erroneously reports `getgroups (0, 0)' as an error.
+ We fix up for that case. */
+
+#define syscall_error myerror
+SYSCALL__ (getgroups, 2)
+#undef syscall_error
+ ret
+myerror:
+ tstl 4(%esp) /* Was the first arg 0? */
+ jnz syscall_error /* If not, go to the normal error case. */
+ /* When called with (0, 0), we want to return the number of groups
+ without storing anything. The Dynix system call gives an error
+ for this case, so we fix up by calling it with a local array we
+ never use, and just use the return value. */
+ subl %esp, $(NGROUPS_MAX * 4) /* Allocate a local array. */
+ movl $NGROUPS_MAX, %ecx /* Pass NGROUPS_MAX for first arg. */
+ movl %esp, %edx /* Pass local array for second arg. */
+ DO_CALL (getgroups, 2) /* Do the system call. */
+ addl %esp, $(NGROUPS_MAX * 4) /* Pop the local array. */
+ jb syscall_error /* Check for error from the system call. */
+ ret /* Return its value. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b973b356ecc59406e64e68d87db5d801fa41ad5a
commit b973b356ecc59406e64e68d87db5d801fa41ad5a
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 27 01:18:03 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
index 7284b55..ce8dd35 100644
--- a/sysdeps/unix/sysv/sysv4/siginfo.h
+++ b/sysdeps/unix/sysv/sysv4/siginfo.h
@@ -1,5 +1,5 @@
/* Definitions of the siginfo structure.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -24,9 +24,8 @@ Cambridge, MA 02139, USA. */
/* SVR4 puts a ton of other stuff in this structure. For now, we'll just
define the two things we really need out of it, and hope for the best. */
-/* These define the different states a child can have on exit. Need these
-to build the correct status return for things like waitpid */
-
+/* These define the different states a child can have on exit.
+ We need these to build the status return for things like waitpid. */
#define EXITED 1
#define KILLED 2
#define CORED 3
@@ -35,25 +34,25 @@ to build the correct status return for things like waitpid */
#define CONTINUED 6
typedef struct __siginfo
-{
- int filler1;
+ {
+ int filler1;
- /* Code indicating child's status */
- int __code;
+ /* Code indicating child's status */
+ int __code;
- int filler2;
+ int filler2;
- /* The PID of the child. */
- long __pid;
+ /* The PID of the child. */
+ long __pid;
- int filler3;
+ int filler3;
- /* The child's status. */
- int __status;
+ /* The child's status. */
+ int __status;
- int filler4[26];
+ int filler4[26];
-} __siginfo_t;
+ } __siginfo_t;
#endif /* __USE_SVID */
#endif /* siginfo.h */
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index 4fd167a..a0ca8c2 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -24,16 +24,16 @@ Cambridge, MA 02139, USA. */
#include "siginfo.h"
typedef enum __idtype
-{
- /* Look for processes based upon a given PID. */
- P_PID,
+ {
+ /* Look for processes based upon a given PID. */
+ P_PID,
- /* Look for processes based upon a given process-group ID. */
- P_PGID = 2,
+ /* Look for processes based upon a given process-group ID. */
+ P_PGID = 2,
- /* Look for any process. */
- P_ALL = 7,
-} __idtype_t;
+ /* Look for any process. */
+ P_ALL = 7,
+ } __idtype_t;
extern __pid_t __getpgid __P ((__pid_t pid));
extern int __waitid __P ((__idtype_t idtype, __pid_t id,
@@ -53,32 +53,32 @@ extern int __waitid __P ((__idtype_t idtype, __pid_t id,
return status for stopped children; otherwise don't. */
__pid_t
-DEFUN(__waitpid, (__pid, __stat_loc, __options),
- __pid_t __pid AND int *__stat_loc AND int __options)
+DEFUN(__waitpid, (pid, stat_loc, options),
+ __pid_t pid AND int *stat_loc AND int options)
{
__idtype_t idtype;
- __pid_t tmp_pid = __pid;
+ __pid_t tmp_pid = pid;
__siginfo_t infop;
- if (__pid <= WAIT_MYPGRP)
+ if (pid <= WAIT_MYPGRP)
{
- if (__pid == WAIT_ANY)
+ if (pid == WAIT_ANY)
{
/* Request the status for any child. */
idtype = P_ALL;
}
- else if (__pid == WAIT_MYPGRP)
+ else if (pid == WAIT_MYPGRP)
{
/* Request the status for any child process that has
a pgid that's equal to that of our parent. */
tmp_pid = __getpgid (0);
idtype = P_PGID;
}
- else /* __pid < -1 */
+ else /* PID < -1 */
{
/* Request the status for any child whose pgid is equal
to the absolute value of PID. */
- tmp_pid = __pid & ~0; /* XXX not pseudo-insn */
+ tmp_pid = pid & ~0; /* XXX not pseudo-insn */
idtype = P_PGID;
}
}
@@ -88,14 +88,29 @@ DEFUN(__waitpid, (__pid, __stat_loc, __options),
idtype = P_PID;
}
- if (__waitid (idtype, tmp_pid, &infop, __options | WEXITED | WTRAPPED) < 0)
+ if (__waitid (idtype, tmp_pid, &infop, options | WEXITED | WTRAPPED) < 0)
+ return -1;
+
+ switch (infop.__code)
{
- *__stat_loc = infop.__status;
- return -1;
+ case EXITED:
+ *stat_loc = W_EXITCODE (infop.__status, 0);
+ break;
+ case STOPPED:
+ case TRAPPED:
+ *stat_loc = W_STOPCODE (infop.__status);
+ break;
+ case KILLED:
+ /* Don't know what to do with continue, since it isn't documented.
+ Putting it here seemed the right place though. */
+ case CONTINUED:
+ *stat_loc = infop.__status;
+ /* FALLTHROUGH */
+ case CORED:
+ *stat_loc |= WCOREFLAG;
+ break;
}
- *__stat_loc = infop.__status;
-
/* Return the PID out of the INFOP structure instead of the one we were
called with, to account for cases of being called with -1 to signify
any PID. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=84e961871cabd94e1ad3c4e46324fb7d18a06a3f
commit 84e961871cabd94e1ad3c4e46324fb7d18a06a3f
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jan 27 01:08:59 1994 +0000
Formerly unix/sysv/sysv4/siginfo.h.~3~
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
index 16b1bac..7284b55 100644
--- a/sysdeps/unix/sysv/sysv4/siginfo.h
+++ b/sysdeps/unix/sysv/sysv4/siginfo.h
@@ -24,19 +24,34 @@ Cambridge, MA 02139, USA. */
/* SVR4 puts a ton of other stuff in this structure. For now, we'll just
define the two things we really need out of it, and hope for the best. */
+/* These define the different states a child can have on exit. Need these
+to build the correct status return for things like waitpid */
+
+#define EXITED 1
+#define KILLED 2
+#define CORED 3
+#define TRAPPED 4
+#define STOPPED 5
+#define CONTINUED 6
+
typedef struct __siginfo
{
- int filler1[3];
+ int filler1;
- /* The PID of the child. */
- __pid_t __pid;
+ /* Code indicating child's status */
+ int __code;
int filler2;
+ /* The PID of the child. */
+ long __pid;
+
+ int filler3;
+
/* The child's status. */
int __status;
- int filler3[26];
+ int filler4[26];
} __siginfo_t;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9b86fd2eae0599d6b18e84b04df3b789c00fffc3
commit 9b86fd2eae0599d6b18e84b04df3b789c00fffc3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jan 25 19:35:24 1994 +0000
Formerly unix/sysv/sco3.2.4/__waitpid.S.~3~
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index be6c19b..f16b643 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ ENTRY (__waitpid)
pushfl /* Push the flags word. */
popl %eax /* Pop it into the accumulator. */
orl $0x8c4, %eax /* Set lots of bits. */
- pushl $eax /* Push the new flags word. */
+ pushl %eax /* Push the new flags word. */
popfl /* Pop it into the flags. */
DO_CALL (wait, 2)
movl 4(%esp), scratch /* Put status pointer in scratch register. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0312ea95d955e74420995374422ae97acfec91e6
commit 0312ea95d955e74420995374422ae97acfec91e6
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 24 23:01:28 1994 +0000
Formerly sysdeps/unix/sysv/sysv4/__waitpid.c.~3~
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
index 4466141..4fd167a 100644
--- a/sysdeps/unix/sysv/sysv4/waitpid.c
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
@@ -95,5 +95,9 @@ DEFUN(__waitpid, (__pid, __stat_loc, __options),
}
*__stat_loc = infop.__status;
- return __pid;
+
+ /* Return the PID out of the INFOP structure instead of the one we were
+ called with, to account for cases of being called with -1 to signify
+ any PID. */
+ return infop.__pid;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=065a020362219aa9f07b9527447a747fe7f38762
commit 065a020362219aa9f07b9527447a747fe7f38762
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 24 22:56:32 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/system.c b/sysdeps/unix/bsd/sun/sunos4/system.c
new file mode 100644
index 0000000..2c8e634
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/system.c
@@ -0,0 +1,2 @@
+/* SunOS 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */
+#include <sysdeps/posix/system.c>
diff --git a/sysdeps/unix/bsd/ultrix4/system.c b/sysdeps/unix/bsd/ultrix4/system.c
new file mode 100644
index 0000000..b133fe7
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/system.c
@@ -0,0 +1,2 @@
+/* Ultrix 4 does have `waitpid'. Avoid unix/system.c, which says we don't. */
+#include <sysdeps/posix/system.c>
diff --git a/sysdeps/unix/sysv/sysv4/system.c b/sysdeps/unix/sysv/sysv4/system.c
new file mode 100644
index 0000000..fbfe43f
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/system.c
@@ -0,0 +1,2 @@
+/* SVR4 does have `waitpid'. Avoid unix/system.c, which says we don't. */
+#include <sysdeps/posix/system.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d993a9faf4ce42fba1b5ed0ace19e6d0521ad152
commit d993a9faf4ce42fba1b5ed0ace19e6d0521ad152
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 24 22:56:11 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/system.c b/sysdeps/unix/sysv/sco3.2.4/system.c
new file mode 100644
index 0000000..cd97649
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/system.c
@@ -0,0 +1,3 @@
+/* SCO 3.2v4 does have `waitpid'.
+ Avoid unix/system.c, which says we don't. */
+#include <sysdeps/posix/system.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fb4403ddeda4638d4d2e7b37cccdacc43e54dd58
commit fb4403ddeda4638d4d2e7b37cccdacc43e54dd58
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 21 22:09:51 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/i386/fstat.S b/sysdeps/unix/sysv/sysv4/i386/fstat.S
new file mode 100644
index 0000000..7c6a132
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/fstat.S
@@ -0,0 +1,35 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* In SVR4 the `stat' call is actually done by the `xstat' system call,
+ which takes an additional first argument giving a version number for
+ `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
+ `lxstat' system calls. This macro gives the SVR4 version number that
+ corresponds to the definition of `struct stat' in <statbuf.h>. */
+#define _STAT_VER 2
+
+.globl syscall_error
+ENTRY (__fstat)
+ popl %eax /* Pop return address into %eax. */
+ pushl $_STAT_VER /* Push extra first arg to syscall. */
+ pushl %eax /* Push back the return address. */
+ DO_CALL (xfstat, 3) /* Do the syscall. */
+ jb syscall_error /* Check for error. */
+ ret /* Return success. */
diff --git a/sysdeps/unix/sysv/sysv4/i386/lstat.S b/sysdeps/unix/sysv/sysv4/i386/lstat.S
new file mode 100644
index 0000000..9282798
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/lstat.S
@@ -0,0 +1,35 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* In SVR4 the `stat' call is actually done by the `xstat' system call,
+ which takes an additional first argument giving a version number for
+ `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
+ `lxstat' system calls. This macro gives the SVR4 version number that
+ corresponds to the definition of `struct stat' in <statbuf.h>. */
+#define _STAT_VER 2
+
+.globl syscall_error
+ENTRY (__lstat)
+ popl %eax /* Pop return address into %eax. */
+ pushl $_STAT_VER /* Push extra first arg to syscall. */
+ pushl %eax /* Push back the return address. */
+ DO_CALL (xlstat, 3) /* Do the syscall. */
+ jb syscall_error /* Check for error. */
+ ret /* Return success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=593cac4d9b1c0e6babd59cde919f50a626dfbbf7
commit 593cac4d9b1c0e6babd59cde919f50a626dfbbf7
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 21 22:09:15 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S
index 1631911..7282933 100644
--- a/sysdeps/unix/sysv/sysv4/i386/stat.S
+++ b/sysdeps/unix/sysv/sysv4/i386/stat.S
@@ -18,10 +18,17 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
+/* In SVR4 the `stat' call is actually done by the `xstat' system call,
+ which takes an additional first argument giving a version number for
+ `struct stat'. Likewise for `fstat' and `lstat' there are `fxstat' and
+ `lxstat' system calls. This macro gives the SVR4 version number that
+ corresponds to the definition of `struct stat' in <statbuf.h>. */
+#define _STAT_VER 2
+
.globl syscall_error
ENTRY (__stat)
popl %eax /* Pop return address into %eax. */
- pushl $2 /* Push extra first arg to syscall. */
+ pushl $_STAT_VER /* Push extra first arg to syscall. */
pushl %eax /* Push back the return address. */
DO_CALL (xstat, 3) /* Do the syscall. */
jb syscall_error /* Check for error. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7fbd03bcf350f156356af0e2280c6c4b80c2db2
commit d7fbd03bcf350f156356af0e2280c6c4b80c2db2
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 21 22:06:15 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/i386/stat.S b/sysdeps/unix/sysv/sysv4/i386/stat.S
new file mode 100644
index 0000000..1631911
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/stat.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.globl syscall_error
+ENTRY (__stat)
+ popl %eax /* Pop return address into %eax. */
+ pushl $2 /* Push extra first arg to syscall. */
+ pushl %eax /* Push back the return address. */
+ DO_CALL (xstat, 3) /* Do the syscall. */
+ jb syscall_error /* Check for error. */
+ ret /* Return success. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a6be4fb8c54e2da8592c2ccecf3f5b3177c2da3c
commit a6be4fb8c54e2da8592c2ccecf3f5b3177c2da3c
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 17 22:36:41 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sequent/i386/syscall.S b/sysdeps/unix/bsd/sequent/i386/syscall.S
new file mode 100644
index 0000000..bebab8e
--- /dev/null
+++ b/sysdeps/unix/bsd/sequent/i386/syscall.S
@@ -0,0 +1,31 @@
+/* `syscall' function for Sequent Symmetry running Dynix version 3.
+Copyright (C) 1994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.text
+.globl syscall_error
+.align 4
+ENTRY (syscall)
+ leal 8(%esp), %ecx /* Load address of second argument. */
+ movl $SYS_HANDLER, %eax /* Use BSD system calls. */
+ movw 4(%esp), %ax /* Load system call number into low word. */
+ int $T_SVC6 /* Pretend it takes six args. */
+ jb syscall_error
+ ret
diff --git a/sysdeps/unix/sysv/sco3.2.4/__setpgid.c b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
new file mode 100644
index 0000000..3c4304c
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/__setpgid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+extern int __pgrpsys __P ((int type, ...));
+
+/* Get the process group ID of process PID. */
+int
+DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid)
+{
+ return __pgrpsys (2, pid, pgid);
+}
diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h
index 900a0a6..316bd0d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/syscall.h
+++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h
@@ -29,6 +29,7 @@
#define SYS_getdents 81
#define SYS_getgid 47
#define SYS_getgroups 0x2b28
+#define SYS_getitimer 0x3728
#define SYS_getmsg 85
#define SYS_getpid 20
#define SYS_getuid 24
@@ -48,6 +49,7 @@
#define SYS_open 5
#define SYS_pathconf 0x2e28
#define SYS_pause 29
+#define SYS_pgrpsys 39
#define SYS_pipe 42
#define SYS_plock 45
#define SYS_poll 87
@@ -69,6 +71,7 @@
#define SYS_semsys 53
#define SYS_setgid 46
#define SYS_setgroups 0x2c28
+#define SYS_setitimer 0x3828
#define SYS_setpgrp 39
#define SYS_setuid 23
#define SYS_shmsys 52
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5b8c088836a4dd34f57f08302ab9fdc887f4b17e
commit 5b8c088836a4dd34f57f08302ab9fdc887f4b17e
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 16 04:33:05 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S
index 0e382a6..47905b3 100644
--- a/sysdeps/unix/sysv/i386/sigreturn.S
+++ b/sysdeps/unix/sysv/i386/sigreturn.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 19921994 Free Software Foundation, Inc.
+/* Copyright (C) 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=10c3ad380a400a38c3a5e3fa6893803731efcaaf
commit 10c3ad380a400a38c3a5e3fa6893803731efcaaf
Author: Roland McGrath <roland@gnu.org>
Date: Sun Jan 16 04:28:11 1994 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/i386/sigreturn.S b/sysdeps/unix/sysv/i386/sigreturn.S
new file mode 100644
index 0000000..0e382a6
--- /dev/null
+++ b/sysdeps/unix/sysv/i386/sigreturn.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 19921994 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.text
+ENTRY (__sigreturn)
+ addl $4, %esp /* Pop the return PC. */
+ lcall $0xf, $0 /* Do the magic sigreturn trap. */
+ /* NOTREACHED */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36a0d2a23807e3fe0fb4796bc10b96257a7fd5b9
commit 36a0d2a23807e3fe0fb4796bc10b96257a7fd5b9
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 15 00:09:40 1994 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 43af869..58e1465 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ Cambridge, MA 02139, USA. */
.globl __tzname_max
ENTRY (__sysconf)
- cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */
+ cmpl $_SC_TZNAME_MAX, 4(%esp) /* Is the arg _SC_TZNAME_MAX? */
je tzname
DO_CALL (sysconf, 1) /* No; use the SCO system call. */
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1cfb0487a6fc04757046874a97d607df89556aa0
commit 1cfb0487a6fc04757046874a97d607df89556aa0
Author: Roland McGrath <roland@gnu.org>
Date: Thu Dec 23 23:51:09 1993 +0000
Formerly m68k/Makefile.~9~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 188102d..7d6f62d 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -37,7 +37,7 @@ endif
ifdef as-pipe-ok
define compile-command.S
-$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \
+$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \
| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
endef
@@ -45,7 +45,7 @@ else
define compile-command.S
@-rm -f $@s
-$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \
+$(CC) $(CPPFLAGS) $(m68k-syntax-flag) $(asm-CPPFLAGS) -E $< \
| sed 's/(@@@Hash-Here@@@)/#/g' > $@s
$(AS) $(ASFLAGS) $@s -o $@
-rm -f $@s
@@ -53,3 +53,9 @@ endef
endif
+# The mpn functions need this. All existing 68k ports use MIT syntax. If
+# a new port wants to use Motorola or Sony syntax, it can redefine this
+# variable.
+ifndef m68k-syntax-flag
+m68k-syntax-flag = -DMIT_SYNTAX
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=72d531d675d7655a4e8a7ad3a36f38288c4c864f
commit 72d531d675d7655a4e8a7ad3a36f38288c4c864f
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Dec 23 06:27:57 1993 +0000
entered into RCS
diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h
index e69de29..c2a4fc8 100644
--- a/sysdeps/alpha/DEFS.h
+++ b/sysdeps/alpha/DEFS.h
@@ -0,0 +1,27 @@
+#ifdef __STDC__
+#define FUNC__(name) \
+ .align 3; \
+ .globl __##name; \
+ .ent __##name; \
+ __##name: \
+ lda sp, -16(sp); \
+ .frame sp, 16, t9, 0; \
+ .prologue 0
+#else
+#define FUNC__(name) \
+ .align 3; \
+ .globl __/**/name; \
+ .ent __/**/name,0; \
+ __/**/name: \
+ lda sp, -16(sp); \
+ .frame sp, 16, t9, 0; \
+ .prologue 0
+#endif
+
+#ifdef __STDC__
+#define NAME__(name) \
+ __##name
+#else
+#define NAME__(name) \
+ __/**/name
+#endif
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
index ad6ea03..c4ea856 100644
--- a/sysdeps/alpha/Dist
+++ b/sysdeps/alpha/Dist
@@ -1 +1,4 @@
setjmp_aux.c
+DEFS.h
+divrem.m4 macros.m4
+divl.S divlu.S divq.S divqu.S reml.S remlu.S remq.S remqu.S
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index 7364141..5490776 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -1,3 +1,91 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Brendan Kehoe (brendan@zen.org).
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
ifeq ($(subdir),setjmp)
sysdep_routines := $(sysdep_routines) setjmp_aux
endif
+
+ifeq ($(subdir),gnulib)
+routines = $(divrem)
+endif # gnulib
+
+# We distribute these files, even though they are generated,
+# so as to avoid the need for a functioning m4 to build the library.
+divrem := divl divlu divq divqu reml remlu remq remqu
+
++divrem-NAME-divl := divl
++divrem-NAME-divlu := divlu
++divrem-NAME-divq := divq
++divrem-NAME-divqu := divqu
++divrem-NAME-reml := reml
++divrem-NAME-remlu := remlu
++divrem-NAME-remq := remq
++divrem-NAME-remqu := remqu
++divrem-NAME = $(+divrem-NAME-$(basename $(notdir $@)))
+
++divrem-OP-divl := divl
++divrem-OP-divlu := divlu
++divrem-OP-divq := divq
++divrem-OP-divqu := divqu
++divrem-OP-reml := reml
++divrem-OP-remlu := remlu
++divrem-OP-remq := remq
++divrem-OP-remqu := remqu
++divrem-BASEOP-divl := div
++divrem-BASEOP-divlu := div
++divrem-BASEOP-divq := div
++divrem-BASEOP-divqu := div
++divrem-BASEOP-reml := rem
++divrem-BASEOP-remlu := rem
++divrem-BASEOP-remq := rem
++divrem-BASEOP-remqu := rem
++divrem-S-divl := true
++divrem-S-divlu := false
++divrem-S-divq := true
++divrem-S-divqu := false
++divrem-S-reml := true
++divrem-S-remlu := false
++divrem-S-remq := true
++divrem-S-remqu := false
++divrem-SIZE-divl := l
++divrem-SIZE-divlu := l
++divrem-SIZE-divq := q
++divrem-SIZE-divqu := q
++divrem-SIZE-reml := l
++divrem-SIZE-remlu := l
++divrem-SIZE-remq := q
++divrem-SIZE-remqu := q
++divrem-MODE-divl := l
++divrem-MODE-divlu := lu
++divrem-MODE-divq := q
++divrem-MODE-divqu := qu
++divrem-MODE-reml := l
++divrem-MODE-remlu := lu
++divrem-MODE-remq := q
++divrem-MODE-remqu := qu
+
+$(divrem:%=$(sysdep_dir)/alpha/%.S): $(sysdep_dir)/alpha/divrem.m4 $(sysdep_dir)/alpha/DEFS.h $(sysdep_dir)/alpha/macros.m4
+ (echo "define(OP,\`$(+divrem-NAME)')\
+ define(BASEOP,\`$(+divrem-BASEOP-$(+divrem-NAME))')\
+ define(MODE,\`$(+divrem-MODE-$(+divrem-NAME))')\
+ define(SIZE,\`$(+divrem-SIZE-$(+divrem-NAME))')\
+ define(SIGNED,\`$(+divrem-S-$(+divrem-NAME))')\
+ define(SYSDEP_DIR, \`$(sysdep_dir)/alpha')\
+ /* This file is generated from divrem.m4; DO NOT EDIT! */"; \
+ cat $<) | $(M4) > $@-tmp
+ mv $@-tmp $@
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 5461fca..b06f716 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
-extern __inline double
+extern __inline __CONSTVALUE double
__copysign (double __x, double __y)
{
__asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c
index d86521c..2136f6b 100644
--- a/sysdeps/alpha/copysign.c
+++ b/sysdeps/alpha/copysign.c
@@ -16,12 +16,14 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define __NO_MATH_INLINES
+
#include <math.h>
/* Return X with its sign changed to Y's. */
-double
-__copysign (double x, double y)
+__inline __CONSTVALUE double
+__copysign (double __x, double __y)
{
- asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
- return x;
+ __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
+ return __x;
}
diff --git a/sysdeps/alpha/divrem.m4 b/sysdeps/alpha/divrem.m4
new file mode 100644
index 0000000..ab86128
--- /dev/null
+++ b/sysdeps/alpha/divrem.m4
@@ -0,0 +1,48 @@
+/* For each N divided by D, we do:
+ result = (double) N / (double) D
+ Then, for each N mod D, we do:
+ result = N - (D * divMODE (N, D))
+
+ FIXME:
+ The q and qu versions won't deal with operands > 50 bits. We also
+ don't check for divide by zero. */
+
+#include "DEFS.h"
+#if 0
+/* We do not handle div by zero yet. */
+#include <machine/pal.h>
+#endif
+#include <regdef.h>
+
+define(path, `SYSDEP_DIR/macros.m4')dnl
+include(path)
+
+FUNC__(OP)
+ ! First set up the dividend.
+ EXTEND(t10)
+ stq t10,0(sp)
+ ldt $f10,0(sp)
+ cvtqt $f10,$f10
+ ADJQU($f10)
+
+ ! Then set up the divisor.
+ EXTEND(t11)
+ stq t11,0(sp)
+ ldt $f1,0(sp)
+ cvtqt $f1,$f1
+ ADJQU($f1)
+
+ ! Do the division.
+ divt $f10,$f1,$f10
+ cvttqc $f10,$f10
+
+ ! Put the result in t12.
+ stt $f10,0(sp)
+ ldq t12,0(sp)
+ FULLEXTEND(t12)
+
+ DOREM
+
+ lda sp,16(sp)
+ ret zero,(t9),1
+ .end NAME__(OP)
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c
index 9362027..321df0d 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/alpha/fabs.c
@@ -16,11 +16,13 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define __NO_MATH_INLINES
+
#include <math.h>
-double
-fabs (double x)
+__inline double
+fabs (double __x)
{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
+ __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
+ return __x;
}
diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4
index e69de29..982e705 100644
--- a/sysdeps/alpha/macros.m4
+++ b/sysdeps/alpha/macros.m4
@@ -0,0 +1,34 @@
+dnl NOTE: The $1 below is the argument to EXTEND, not register $1.
+define(EXTEND,
+`ifelse(SIZE, `l',
+`ifelse(SIGNED, `true',
+` sextl $1, $1
+',dnl
+` zapnot $1, 0xf, $1
+')')')dnl
+
+dnl FULLEXTEND -- extend the register named in the first argument
+define(FULLEXTEND,
+`ifelse(SIZE, `l',
+` sextl $1, $1
+')')dnl
+
+dnl This is used by divqu.
+define(ADJQU,
+`ifelse(MODE, `qu',
+` ldit $f26, 18446744073709551616.0
+ addt $f26, $1, $f26
+ fcmovlt $1, $f26, $1
+')')dnl
+
+define(DOREM,
+`ifelse(BASEOP, `rem',
+` ! Compute the remainder.
+ifelse(SIZE, `l',
+` mull t11, t12, t11
+ subl t10, t11, t12
+',dnl Note mulq/subq were only really used in remq, but we will find out
+dnl if assuming they apply to remqu as well is wrong or not.
+` mulq t11, t12, t11
+ subq t10, t11, t12
+')')')dnl
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index 048c9fa..c6f99bf 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -25,6 +25,7 @@ memchr (const void *s, int c, size_t n)
const char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int charmask;
+ size_t x;
c = (unsigned char) c;
@@ -35,18 +36,29 @@ memchr (const void *s, int c, size_t n)
if (*char_ptr == c)
return (void *) char_ptr;
+ if (n == (size_t)0)
+ return NULL;
+
+ x = n;
+
longword_ptr = (unsigned long int *) char_ptr;
/* Set up a longword, each of whose bytes is C. */
charmask = c | (c << 8);
charmask |= charmask << 16;
charmask |= charmask << 32;
+ charmask |= charmask << 64;
for (;;)
{
const unsigned long int longword = *longword_ptr++;
int ge, le;
+ if (x < 4)
+ x = (size_t) 0;
+ else
+ x -= 4;
+
/* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */
asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
@@ -58,15 +70,18 @@ memchr (const void *s, int c, size_t n)
{
/* Which of the bytes was the C? */
- char *cp = (char *) (longword_ptr - 1);
+ unsigned char *cp = (unsigned char *) (longword_ptr - 1);
+ int i;
- if (cp[0] == c)
- return cp;
- if (cp[1] == c)
- return &cp[1];
- if (cp[2] == c)
- return &cp[2];
- return &cp[3];
+ for (i = 0; i < 6; i++)
+ if (cp[i] == c)
+ return &cp[i];
+ return &cp[7];
}
+
+ if (x == (size_t)0)
+ break;
}
+
+ return NULL;
}
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
new file mode 100644
index 0000000..4bdc3db
--- /dev/null
+++ b/sysdeps/alpha/remqu.S
@@ -0,0 +1,60 @@
+ /* This file is generated from divrem.m4; DO NOT EDIT! */
+/* For each N divided by D, we do:
+ result = (double) N / (double) D
+ Then, for each N mod D, we do:
+ result = N - (D * divMODE (N, D))
+
+ FIXME:
+ The q and qu versions won't deal with operands > 50 bits. We also
+ don't check for divide by zero. */
+
+#include "DEFS.h"
+#if 0
+/* We do not handle div by zero yet. */
+#include <machine/pal.h>
+#endif
+#include <regdef.h>
+
+
+
+
+
+
+FUNC__(remqu)
+ ! First set up the dividend.
+
+ stq t10,0(sp)
+ ldt $f10,0(sp)
+ cvtqt $f10,$f10
+ ldit $f26, 18446744073709551616.0
+ addt $f26, $f10, $f26
+ fcmovlt $f10, $f26, $f10
+
+
+ ! Then set up the divisor.
+
+ stq t11,0(sp)
+ ldt $f1,0(sp)
+ cvtqt $f1,$f1
+ ldit $f26, 18446744073709551616.0
+ addt $f26, $f1, $f26
+ fcmovlt $f1, $f26, $f1
+
+
+ ! Do the division.
+ divt $f10,$f1,$f10
+ cvttqc $f10,$f10
+
+ ! Put the result in t12.
+ stt $f10,0(sp)
+ ldq t12,0(sp)
+
+
+ ! Compute the remainder.
+ mulq t11, t12, t11
+ subq t10, t11, t12
+
+
+ lda sp,16(sp)
+ ret zero,(t9),1
+ .end NAME__(remqu)
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
index a5de80c..3880d0f 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/alpha/setjmp.S
@@ -26,3 +26,4 @@ ENTRY (__setjmp)
bis $15, $15, $17 /* Pass FP as 2nd arg. */
bis $30, $30, $18 /* Pass SP as 3nd arg. */
jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */
+ .end __setjmp
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
index db279de..fc56d51 100644
--- a/sysdeps/alpha/strchr.c
+++ b/sysdeps/alpha/strchr.c
@@ -32,10 +32,10 @@ strchr (const char *str, int c)
/* Handle the first few characters by reading one character at a time.
Do this until STR is aligned on a 8-byte border. */
for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
- if (*char_ptr == '\0')
- return NULL;
- else if (*char_ptr == c)
+ if (*char_ptr == c)
return (char *) char_ptr;
+ else if (*char_ptr == '\0')
+ return NULL;
longword_ptr = (unsigned long int *) char_ptr;
@@ -43,6 +43,7 @@ strchr (const char *str, int c)
charmask = c | (c << 8);
charmask |= charmask << 16;
charmask |= charmask << 32;
+ charmask |= charmask << 64;
for (;;)
{
@@ -64,21 +65,15 @@ strchr (const char *str, int c)
/* Which of the bytes was the C? */
char *cp = (char *) (longword_ptr - 1);
-
- if (cp[0] == c)
- return cp;
- if (cp[0] == 0)
- return NULL;
- if (cp[1] == c)
- return &cp[1];
- if (cp[1] == 0)
- return NULL;
- if (cp[2] == c)
- return &cp[2];
- if (cp[2] == 0)
- return NULL;
- if (cp[3] == c)
- return &cp[3];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (cp[i] == c)
+ return &cp[i];
+ if (cp[i] == 0)
+ return NULL;
+ }
return NULL;
}
}
diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c
index 3fd1b25..d774447 100644
--- a/sysdeps/alpha/strlen.c
+++ b/sysdeps/alpha/strlen.c
@@ -43,14 +43,12 @@ strlen (const char *str)
/* Which of the bytes was the zero? */
const char *cp = (const char *) (longword_ptr - 1);
+ int i;
- if (cp[0] == 0)
- return cp - str;
- if (cp[1] == 0)
- return cp - str + 1;
- if (cp[2] == 0)
- return cp - str + 2;
- return cp - str + 3;
+ for (i = 0; i < 6; i++)
+ if (cp[i] == 0)
+ return cp - str + i;
+ return cp - str + 7;
}
}
}
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
index e69de29..1475108 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
@@ -0,0 +1,51 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+#ifndef HAVE_GNU_LD
+#define __end end
+#endif
+
+.data
+ .extern __end,8
+ .globl __curbrk
+__curbrk:
+ .quad __end
+
+.text
+ENTRY(__brk)
+ ! FIXME We do not check for asking for less than a page yet.
+ ldiq v0, SYS_brk
+ call_pal PAL_callsys
+ bne a3, error
+
+ /* Update __curbrk and exit cleanly. */
+! ldgp gp, 0(t12)
+ stl a0, __curbrk
+
+ mov zero, v0
+ ret
+ /* What a horrible way to die. */
+error: ldgp gp,0(gp)
+ jmp zero,syscall_error
+ .end __brk
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
similarity index 78%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
index 9362027..8afcfbc 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/fork.S
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -16,11 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+SYSCALL__ (fork, 0)
+ cmovne a4, 0, v0
+ ret
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
similarity index 78%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
index 9362027..52f7cdb 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/getdents.S
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -16,11 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+SYSCALL__ (getdirentries, 4)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
index e69de29..f0b82b3 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_killpg SYS_ult_killpg
+
+SYSCALL (killpg, 2)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
index e69de29..6973e96 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pipe, 1)
+ /* Plop in the two descriptors. */
+ stl r0, 0(a0)
+ stl r1, 4(a0)
+
+ /* Go out with a clean status. */
+ mov zero, r0
+ ret
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
similarity index 82%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
index 9362027..4ac00eb 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/recv.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,11 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+#include <sys/ult_syscall.h>
+#define SYS_recv SYS_ult_recv
+
+SYSCALL (recv, 4)
+ ret
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S
similarity index 82%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/send.S
index 9362027..ca46894 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/send.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,11 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+#include <sys/ult_syscall.h>
+#define SYS_send SYS_ult_send
+
+SYSCALL (send, 4)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
index e69de29..893ee08 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigpause SYS_ult_sigpause
+
+SYSCALL__ (sigpause, 1)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
index e69de29..f2536d7 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#include <sys/ult_syscall.h>
+#define SYS_sigsetmask SYS_ult_sigsetmask
+
+SYSCALL__ (sigsetmask, 1)
+ ret
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
similarity index 77%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
index 9362027..d0d3ae0 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sigvec.S
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -16,11 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+#include <sys/ult_syscall.h>
+#define SYS_sigvec SYS_ult_sigvec
+
+SYSCALL__ (sigvec, 3)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
index e69de29..d88b47e 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
@@ -0,0 +1,70 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef HAVE_GNU_LD
+#define __environ environ
+#endif
+
+.comm __environ, 8
+.comm errno, 4
+
+!.sdata
+!.globl STARTFRM
+!STARTFRM = 0
+
+.text
+ENTRY(__start)
+ lda sp, -16(sp)
+ stq zero, 8(sp)
+
+ ! This branch puts the address of the current insn in t0.
+ br t0, 10f
+10:
+ ! We set the GP register by using the address of the ldgp
+ ! (what we just put into t0).
+ ldgp gp, 0(t0)
+
+ ! get argc
+ ldl a0, 16(sp)
+
+ ! get argv
+ lda a1, 24(sp)
+
+ ! move ahead to envp
+ s8addq a0, a1, a2
+ addq a2, 0x8, a2
+
+ ! Store in environ.
+ stq a2, environ
+
+ ! Clear out errno.
+! ldgp gp, 0(t12)
+ stl zero, errno
+
+ ! Call main.
+ jsr ra, main
+ ldgp gp, 0(ra)
+
+ mov v0, a0
+
+ jsr ra, exit
+ ldgp gp, 0(ra)
+
+ .end __start
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
index e69de29..9cadfae 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
@@ -0,0 +1,75 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ int st_dev; /* Device. */
+ unsigned int st_ino; /* File serial number. */
+ unsigned int st_mode; /* File mode. */
+ unsigned short st_nlink; /* Link count. */
+ unsigned int st_uid; /* User ID of the file's owner. */
+ unsigned int st_gid; /* Group ID of the file's group.*/
+ int st_rdev; /* Device number, if device. */
+
+ long st_size; /* Size of file, in bytes. */
+
+ int st_atime; /* Time of last access. */
+ int st_atime_usec;
+ int st_mtime; /* Time of last modification. */
+ int st_mtime_usec;
+ int st_ctime; /* Time of last status change. */
+ int st_ctime_usec;
+
+ unsigned int st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ int st_blocks; /* Number of 512-byte blocks allocated. */
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
similarity index 57%
copy from sysdeps/alpha/setjmp.S
copy to sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
index a5de80c..bc4865c 100644
--- a/sysdeps/alpha/setjmp.S
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.S
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -17,12 +17,24 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#define _ERRNO_H
+#include <errnos.h>
-/* The function __setjmp_aux saves all the registers, but it can't
- reliably access the stack or frame pointers, so we pass them in as
- extra arguments. */
-ENTRY (__setjmp)
- lda $27, __setjmp_aux /* Load address to jump to. */
- bis $15, $15, $17 /* Pass FP as 2nd arg. */
- bis $30, $30, $18 /* Pass SP as 3nd arg. */
- jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */
+ENTRY(syscall_error)
+#ifdef EWOULDBLOCK_sys
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ subq v0, EWOULDBLOCK_sys, t0
+ cmoveq t0, EAGAIN, v0
+#endif
+
+ /* Store it in errno... */
+! ldgp gp, 0(t12)
+ stl v0, errno
+
+ /* And just kick back a -1. */
+ ldil v0, -1
+ ret
+
+ .end syscall_error
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
new file mode 100644
index 0000000..279461b
--- /dev/null
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/sysdep.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+#include <machine/pal.h> /* get PAL_callsys */
+#include <regdef.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl name; \
+ .ent name,0; \
+ name##:; \
+ .frame sp,0,ra
+#else
+#define ENTRY(name) \
+ .globl name; \
+ .ent name,0; \
+ name/**/:; \
+ .frame sp,0,ra
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY(name); \
+ ldiq v0, SYS_##syscall_name; \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ beq a3, 10f; \
+ br gp, 20f; \
+20:; \
+ ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
+10:
+#else
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY(name); \
+ ldiq v0, SYS_/**/syscall_name; \
+ .set noat; \
+ call_pal PAL_callsys; \
+ .set at; \
+ beq a3, 10f; \
+ br gp, 20f; \
+20:; \
+ ldgp gp, 0(gp); \
+ jmp zero, syscall_error; \
+10:
+#endif
+
+#define ret ret zero,(ra),1
+#define r0 v0
+#define r1 a4
+#define MOVE(x,y) mov x, y
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
similarity index 81%
copy from sysdeps/alpha/fabs.c
copy to sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
index 9362027..d4d2b1c 100644
--- a/sysdeps/alpha/fabs.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/vhangup.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,11 +16,10 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <math.h>
+#include <sysdep.h>
-double
-fabs (double x)
-{
- asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
- return x;
-}
+#include <sys/ult_syscall.h>
+#define SYS_vhangup SYS_ult_vhangup
+
+SYSCALL (vhangup, 1)
+ ret
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
new file mode 100644
index 0000000..0f76c62
--- /dev/null
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/wait4.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__wait4.S>
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
index e69de29..47129a8 100644
--- a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
+++ b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d871481858c29b2ad71874e587f3ac396ecd1f7f
commit d871481858c29b2ad71874e587f3ac396ecd1f7f
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Dec 23 06:02:55 1993 +0000
Initial revision
diff --git a/sysdeps/alpha/DEFS.h b/sysdeps/alpha/DEFS.h
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/alpha/macros.m4 b/sysdeps/alpha/macros.m4
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S b/sysdeps/unix/bsd/Attic/osf1/alpha/brk.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S b/sysdeps/unix/bsd/Attic/osf1/alpha/killpg.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S b/sysdeps/unix/bsd/Attic/osf1/alpha/pipe.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigpause.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S b/sysdeps/unix/bsd/Attic/osf1/alpha/sigsetmask.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/start.S b/sysdeps/unix/bsd/Attic/osf1/alpha/start.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h b/sysdeps/unix/bsd/Attic/osf1/alpha/statbuf.h
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c b/sysdeps/unix/bsd/Attic/osf1/alpha/waitpid.c
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=20c68d3f5d069703100923a9217931360ce5b8a4
commit 20c68d3f5d069703100923a9217931360ce5b8a4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 22 23:00:17 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~8~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index 421ad47..46c0980 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -3,3 +3,4 @@ sysconfig.S
pgrpsys.S
__waitid.S
siginfo.h
+__getpgid.c __setpgid.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6919548ee97a5a582edcd9fddd2b50dea0a05e5e
commit 6919548ee97a5a582edcd9fddd2b50dea0a05e5e
Author: Brendan Kehoe <brendan@zen.org>
Date: Wed Dec 22 01:34:24 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
index b448dcb..6f1bfed 100644
--- a/sysdeps/unix/sysv/sysv4/i386/statbuf.h
+++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
@@ -24,37 +24,36 @@ Cambridge, MA 02139, USA. */
/* Structure describing file characteristics. */
struct stat
{
- short int st_dev;
+ unsigned long st_dev; /* Device. */
long st_filler1[3];
- __ino_t st_ino; /* File serial number. */
- unsigned long int st_mode; /* File mode. */
- /* This is unsigned long instead of __nlink_t, since SVR4 has
- a long nlink_t, not a short one. */
- unsigned long int st_nlink; /* Link count. */
- __uid_t st_uid; /* User ID of the file's owner. */
- __gid_t st_gid; /* Group ID of the file's group.*/
- unsigned long int st_rdev; /* Device number, if device. */
+ unsigned long st_ino; /* File serial number. */
+ unsigned long st_mode; /* File mode. */
+ unsigned long st_nlink; /* Link count. */
+ long st_uid; /* User ID of the file's owner. */
+ long st_gid; /* Group ID of the file's group.*/
+ unsigned long st_rdev; /* Device number, if device. */
long st_filler2[2];
- __off_t st_size; /* Size of file, in bytes. */
+ long st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
long st_filler3;
- __time_t st_atime; /* Time of last access. */
- unsigned long int st_atime_usec;
- __time_t st_mtime; /* Time of last modification. */
- unsigned long int st_mtime_usec;
- __time_t st_ctime; /* Time of last status change. */
- unsigned long int st_ctime_usec;
+ long st_atime; /* Time of last access. */
+ unsigned long st_atime_usec;
+ long st_mtime; /* Time of last modification. */
+ unsigned long st_mtime_usec;
+ long st_ctime; /* Time of last status change. */
+ unsigned long st_ctime_usec;
long st_blksize; /* Optimal block size for I/O. */
#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
long st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16]; /* The type of this filesystem. */
int st_aclcnt;
- unsigned long int st_level;
- unsigned long int st_flags;
- unsigned long int st_cmwlevel;
+ unsigned long st_level;
+ unsigned long st_flags;
+ unsigned long st_cmwlevel;
long st_filler4[4];
};
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f30a71c1e3681e703045afc327b647bf6983eb21
commit f30a71c1e3681e703045afc327b647bf6983eb21
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Dec 18 06:38:02 1993 +0000
Formerly unix/sysv/sysv4/siginfo.h.~2~
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
index e69de29..16b1bac 100644
--- a/sysdeps/unix/sysv/sysv4/siginfo.h
+++ b/sysdeps/unix/sysv/sysv4/siginfo.h
@@ -0,0 +1,44 @@
+/* Definitions of the siginfo structure.
+ Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _SIGINFO_H
+#define _SIGINFO_H 1
+
+#ifdef __USE_SVID
+/* SVR4 puts a ton of other stuff in this structure. For now, we'll just
+ define the two things we really need out of it, and hope for the best. */
+
+typedef struct __siginfo
+{
+ int filler1[3];
+
+ /* The PID of the child. */
+ __pid_t __pid;
+
+ int filler2;
+
+ /* The child's status. */
+ int __status;
+
+ int filler3[26];
+
+} __siginfo_t;
+
+#endif /* __USE_SVID */
+#endif /* siginfo.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39224cc9be82c0a2abf08c6ae3b98823d42dd262
commit 39224cc9be82c0a2abf08c6ae3b98823d42dd262
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Dec 18 06:38:01 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/siginfo.h b/sysdeps/unix/sysv/sysv4/siginfo.h
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/sysv/sysv4/waitpid.c b/sysdeps/unix/sysv/sysv4/waitpid.c
new file mode 100644
index 0000000..4466141
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/waitpid.c
@@ -0,0 +1,99 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <stddef.h>
+#include "siginfo.h"
+
+typedef enum __idtype
+{
+ /* Look for processes based upon a given PID. */
+ P_PID,
+
+ /* Look for processes based upon a given process-group ID. */
+ P_PGID = 2,
+
+ /* Look for any process. */
+ P_ALL = 7,
+} __idtype_t;
+
+extern __pid_t __getpgid __P ((__pid_t pid));
+extern int __waitid __P ((__idtype_t idtype, __pid_t id,
+ __siginfo_t *infop, int options));
+
+/* Wait for a child matching PID to die.
+ If PID is greater than 0, match any process whose process ID is PID.
+ If PID is (pid_t) -1, match any process.
+ If PID is (pid_t) 0, match any process with the
+ same process group as the current process.
+ If PID is less than -1, match any process whose
+ process group is the absolute value of PID.
+ If the WNOHANG bit is set in OPTIONS, and that child
+ is not already dead, return (pid_t) 0. If successful,
+ return PID and store the dead child's status in STAT_LOC.
+ Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
+ return status for stopped children; otherwise don't. */
+
+__pid_t
+DEFUN(__waitpid, (__pid, __stat_loc, __options),
+ __pid_t __pid AND int *__stat_loc AND int __options)
+{
+ __idtype_t idtype;
+ __pid_t tmp_pid = __pid;
+ __siginfo_t infop;
+
+ if (__pid <= WAIT_MYPGRP)
+ {
+ if (__pid == WAIT_ANY)
+ {
+ /* Request the status for any child. */
+ idtype = P_ALL;
+ }
+ else if (__pid == WAIT_MYPGRP)
+ {
+ /* Request the status for any child process that has
+ a pgid that's equal to that of our parent. */
+ tmp_pid = __getpgid (0);
+ idtype = P_PGID;
+ }
+ else /* __pid < -1 */
+ {
+ /* Request the status for any child whose pgid is equal
+ to the absolute value of PID. */
+ tmp_pid = __pid & ~0; /* XXX not pseudo-insn */
+ idtype = P_PGID;
+ }
+ }
+ else
+ {
+ /* Request the status for the child whose pid is PID. */
+ idtype = P_PID;
+ }
+
+ if (__waitid (idtype, tmp_pid, &infop, __options | WEXITED | WTRAPPED) < 0)
+ {
+ *__stat_loc = infop.__status;
+ return -1;
+ }
+
+ *__stat_loc = infop.__status;
+ return __pid;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32ce7e8a01fc690cb10f8ce29cbdb103441c72c3
commit 32ce7e8a01fc690cb10f8ce29cbdb103441c72c3
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Dec 18 06:38:01 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
index e69de29..594e4e9 100644
--- a/sysdeps/unix/sysv/sysv4/__setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/__setpgid.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+extern int __pgrpsys __P ((int type, ...));
+
+/* Get the process group ID of process PID. */
+int
+DEFUN(__setpgid, (pid, pgid), pid_t pid AND pid_t pgid)
+{
+ return __pgrpsys (5, pid, pgid);
+}
diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S
index e69de29..845bec8 100644
--- a/sysdeps/unix/sysv/sysv4/__waitid.S
+++ b/sysdeps/unix/sysv/sysv4/__waitid.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* XXX */
+#define SYS_waitid SYS_waitsys
+
+SYSCALL__ (waitid, 3)
+ ret
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index fad4970..f777769 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -27,5 +27,5 @@ extern int __pgrpsys __P ((int type, ...));
int
DEFUN(__getpgrp, (pid), pid_t pid)
{
- return __pgrpsys (4, pid);
+ return __pgrpsys (0, pid);
}
diff --git a/sysdeps/unix/sysv/sysv4/pipestream.c b/sysdeps/unix/sysv/sysv4/pipestream.c
new file mode 100644
index 0000000..6a32f95
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/pipestream.c
@@ -0,0 +1,2 @@
+/* We deliberately avoid having NO_WAITPID set. */
+#include <sysdeps/posix/pipestream.c>
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index 4237a0b..90eff3c 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -28,5 +28,5 @@ extern int __pgrpsys __P ((int type, ...));
int
DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
{
- return __pgrpsys (5, pid, pgid);
+ return __pgrpsys (1, pid, pgid);
}
diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h
index e69de29..cdb6f29 100644
--- a/sysdeps/unix/sysv/sysv4/waitflags.h
+++ b/sysdeps/unix/sysv/sysv4/waitflags.h
@@ -0,0 +1,34 @@
+/* Definitions of flag bits for `waitpid' et al.
+ Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _WAITFLAGS_H
+
+#define _WAITFLAGS_H 1
+
+/* Bits in the third argument to `waitpid'. */
+#define WNOHANG 64 /* Don't block waiting. */
+#define WUNTRACED 4 /* Report status of stopped children. */
+
+#ifdef __USE_SVID
+#define WEXITED 1 /* Look for children that have exited. */
+#define WTRAPPED 2 /* Look for processes that stopped
+ while tracing. */
+#endif
+
+#endif /* waitflags.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5d075ee6b2738ac117b690cbabcc09407b2f6f6
commit d5d075ee6b2738ac117b690cbabcc09407b2f6f6
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Dec 18 06:37:59 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/__setpgid.c b/sysdeps/unix/sysv/sysv4/__setpgid.c
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/sysv/sysv4/__waitid.S b/sysdeps/unix/sysv/sysv4/__waitid.S
new file mode 100644
index 0000000..e69de29
diff --git a/sysdeps/unix/sysv/sysv4/waitflags.h b/sysdeps/unix/sysv/sysv4/waitflags.h
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aac7bfb3e546ab31b9762c44694889decf9b46c6
commit aac7bfb3e546ab31b9762c44694889decf9b46c6
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat Dec 18 06:37:58 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~7~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index ea0507c..421ad47 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1,3 +1,5 @@
sysconfig.h
sysconfig.S
pgrpsys.S
+__waitid.S
+siginfo.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=096400d53bac1f3a31a30097b4c99c2e659e9bd3
commit 096400d53bac1f3a31a30097b4c99c2e659e9bd3
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Dec 7 04:52:10 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index 758d23e..711fd8c 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -33,8 +33,6 @@ Cambridge, MA 02139, USA. */
mov SYS_ify(syscall_name), %g1; \
ta 8; \
bcs C_SYMBOL_NAME(syscall_error); \
- nop; \
- retl; \
nop
#define ret retl; nop
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cafe55ef2a3ab2d794524c5ee272369076aa28ac
commit cafe55ef2a3ab2d794524c5ee272369076aa28ac
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Dec 7 03:48:28 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/direct.h b/sysdeps/unix/sysv/sysv4/solaris2/direct.h
new file mode 100644
index 0000000..f9822dc
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/direct.h
@@ -0,0 +1,39 @@
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _BSDDIR_H
+#define _BSDDIR_H 1
+
+#include <limits.h>
+
+/* This is the Solaris direct; it's the same as that in
+ sysdeps/unix/sysv/sysv4/direct.h, but it uses the length given by d_namlen,
+ since we can't reliably use tyhe sysv4/direct.h method of computing
+ the length. */
+
+struct direct
+ {
+ unsigned long int d_fileno;
+ long int d_off;
+ unsigned short int d_reclen;
+ char d_name[NAME_MAX + 1];
+ };
+
+#define D_NAMLEN(d) (strlen ((d)->d_name))
+
+#endif
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
index eb994dd..ac74cdf 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */
/* Structure describing file characteristics. */
struct stat
{
- short int st_dev;
+ unsigned long int st_dev;
long st_filler1[3];
__ino_t st_ino; /* File serial number. */
unsigned long int st_mode; /* File mode. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dabd8459d0612fb5335c22136cc1c03fa952129f
commit dabd8459d0612fb5335c22136cc1c03fa952129f
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Dec 7 03:48:27 1993 +0000
Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.h.~4~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index cd6ef7f..758d23e 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */
bcs C_SYMBOL_NAME(syscall_error); \
nop; \
retl; \
- mov %g0, %o0
+ nop
#define ret retl; nop
#define r0 %o0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=39208af4678f18786e26a1f23e525965b17ac3c3
commit 39208af4678f18786e26a1f23e525965b17ac3c3
Author: Brendan Kehoe <brendan@zen.org>
Date: Sun Dec 5 06:54:56 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
index 7829211..108f7d9 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/start.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -1,7 +1,15 @@
/* Copyright (C) 1993 Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@zen.org).
-The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
@@ -24,7 +32,7 @@ ENTRY(__start)
lw t0, 0(sp)
nop
- /* Set up the global pointer. We take up a nop spot here. */
+ /* Set up the global pointer. */
la gp, _gp
/* Then set up argv. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1c66cfdd094282ba5382e65c5c04e4d2045daff
commit d1c66cfdd094282ba5382e65c5c04e4d2045daff
Author: Brendan Kehoe <brendan@zen.org>
Date: Sun Dec 5 06:53:02 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/ultrix4/mips/start.S b/sysdeps/unix/bsd/ultrix4/mips/start.S
new file mode 100644
index 0000000..7829211
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/start.S
@@ -0,0 +1,70 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef HAVE_GNU_LD
+#define __environ environ
+#endif
+
+.comm __environ, 4
+.comm errno, 4
+
+ENTRY(__start)
+ .set noreorder
+
+ /* The first thing on the stack is argc. */
+ lw t0, 0(sp)
+ nop
+
+ /* Set up the global pointer. We take up a nop spot here. */
+ la gp, _gp
+
+ /* Then set up argv. */
+ addiu t1, sp, 4
+
+ /* To compute where envp is, first we have to jump ahead four
+ bytes from what argv was. This will bring us ahead, so we don't
+ need to compute the NULL at the end of argv later. */
+ addiu v1, t1, 4
+
+ /* Now, compute the space to skip given the number of arguments
+ we've got. We do this by multiplying argc by 4. */
+ sll v0, t0, 2
+
+ /* Now, add (argv+4) with the space to skip...that's envp. */
+ addu v1, v1, v0
+ move t2, v1
+
+ /* __environ = envp; */
+ sw t2, __environ
+
+ addiu sp, sp, -24
+
+ /* __libc_init (argc, argv, envp); */
+ move a0, t0
+ move a1, t1
+ move a2, t2
+ jal __libc_init
+ nop
+
+ /* errno = 0; */
+ sw zero, errno
+
+ /* exit (main (argc, argv, envp)); */
+ move a0, t0
+ move a1, t1
+ move a2, t2
+ jal main
+ nop
+
+ /* Make the value returned by main be the argument to exit. */
+ jal exit
+ move a0, v0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=74c074423504d521395e7117e09d3484fa89dbe1
commit 74c074423504d521395e7117e09d3484fa89dbe1
Author: Brendan Kehoe <brendan@zen.org>
Date: Fri Dec 3 00:03:07 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index f3c1659..3e9fdcb 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -25,12 +25,12 @@ Cambridge, MA 02139, USA. */
#include <sys/wait.h>
#include <unistd.h>
-extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS stat_loc,
+extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS_DEFN stat_loc,
int options, struct rusage *usage));
pid_t
DEFUN(__wait4, (pid, stat_loc, options, usage),
- pid_t pid AND __WAIT_STATUS stat_loc AND
+ pid_t pid AND __WAIT_STATUS_DEFN stat_loc AND
int options AND struct rusage *usage)
{
switch (pid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7395944e914bdf4e2429d96c55af7f185bb9b7e
commit b7395944e914bdf4e2429d96c55af7f185bb9b7e
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 24 01:20:41 1993 +0000
Formerly unix/bsd/vax/sysdep.S.~5~
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index 74c366e..9f39b82 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -16,6 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define _ERRNO_H
#include <errnos.h>
.globl _errno
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b58d8a639652ddb7d4e2ccf3752989087aa66595
commit b58d8a639652ddb7d4e2ccf3752989087aa66595
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 24 01:20:34 1993 +0000
Formerly unix/bsd/m68k/sysdep.S.~4~
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index fccc605..a7f599c 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -16,6 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#define _ERRNO_H
#include <errnos.h>
.globl syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d66d490994f11413d2f69a33b7c91b520636bc60
commit d66d490994f11413d2f69a33b7c91b520636bc60
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 24 01:20:30 1993 +0000
Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~3~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index 43682f3..cf5d272 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -17,6 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#define _ERRNO_H
#include <errnos.h>
ENTRY(syscall_error)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=36b6dba79f9c98182fa004d59c02c86bc93c938e
commit 36b6dba79f9c98182fa004d59c02c86bc93c938e
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 10 11:42:10 1993 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index ca95533..3d0d4df 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -140,7 +140,7 @@ __m81_u(modf)(double __value, double *__iptr)
return __value - __modf_int;
}
-extern __inline int
+extern __inline __CONSTVALUE int
__m81_u(__isinf)(double __value)
{
/* There is no branch-condition for infinity,
@@ -151,7 +151,7 @@ __m81_u(__isinf)(double __value)
return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
}
-extern __inline int
+extern __inline __CONSTVALUE int
__m81_u(__isnan)(double __value)
{
char __result;
diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S
index 960dbac..18ef815 100644
--- a/sysdeps/unix/bsd/m68k/syscall.S
+++ b/sysdeps/unix/bsd/m68k/syscall.S
@@ -19,8 +19,8 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
ENTRY (syscall)
- moveal sp@+, a0 /* Pop return address into A0. */
+ movel sp@+, a0 /* Pop return address into A0. */
DO_CALL (sp@, 0) /* Do system call. */
jmp a0@ /* Return to A0. */
-error: moveal a0, sp@- /* Error; push return address */
+error: movel a0, sp@- /* Error; push return address */
jmp syscall_error /* and jump to error handler. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8cf99cec86a8c0ceff14dcc42d30c44c6c7e57dd
commit 8cf99cec86a8c0ceff14dcc42d30c44c6c7e57dd
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 9 12:19:28 1993 +0000
Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~4~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index e045e01..f707bb5 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -39,23 +39,14 @@ Cambridge, MA 02139, USA. */
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- DO_CALL (syscall_name, args)
+ DO_CALL (POUND (SYS_ify (syscall_name)), args)
-#ifdef __STDC__
-#define DO_CALL(syscall_name, args) \
+#define DO_CALL(syscall, args) \
+ movel syscall, d0; \
linkw fp, POUND(0); \
- movel POUND(SYS_##syscall_name), d0; \
trap POUND(0); \
unlk fp; \
bcs error
-#else
-#define DO_CALL(syscall_name, args) \
- linkw fp, POUND(0); \
- movel POUND(SYS_/**/syscall_name), d0; \
- trap POUND(0); \
- unlk fp; \
- bcs error
-#endif
#define ret rts
#define r0 d0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=766f5a17163d101f476126d2900bb8d4af2cbe4f
commit 766f5a17163d101f476126d2900bb8d4af2cbe4f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 9 12:19:26 1993 +0000
Formerly unix/bsd/hp/m68k/__brk.S.~6~
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index fed4f80..12db4d3 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -37,7 +37,7 @@ ENTRY (__brk)
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
-0: DO_CALL (brk, 1)
+0: DO_CALL (#SYS_brk, 1)
movel sp@(4), ___curbrk
clrl d0
rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0a255fb6c1fca1944b430068f83bd7210def08e3
commit 0a255fb6c1fca1944b430068f83bd7210def08e3
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 9 12:19:23 1993 +0000
Formerly unix/bsd/hp/m68k/sysdep.h.~26~
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index a18ca0c..eddb98f 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -39,19 +39,12 @@ Cambridge, MA 02139, USA. */
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- DO_CALL (syscall_name, args)
+ DO_CALL (POUND (SYS_ify (syscall_name), args)
-#ifdef __STDC__
-#define DO_CALL(syscall_name, args) \
- movel POUND(SYS_##syscall_name), d0; \
+#define DO_CALL(syscall, args) \
+ movel syscall, d0; \
trap POUND(0); \
bcs error
-#else
-#define DO_CALL(syscall_name, args) \
- movel POUND(SYS_/**/syscall_name), d0; \
- trap POUND(0); \
- bcs error
-#endif
#define ret rts
#define r0 d0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53b4c8b8a47014846863ac94fefc0508466da271
commit 53b4c8b8a47014846863ac94fefc0508466da271
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 9 12:19:22 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/m68k/syscall.S b/sysdeps/unix/bsd/m68k/syscall.S
new file mode 100644
index 0000000..960dbac
--- /dev/null
+++ b/sysdeps/unix/bsd/m68k/syscall.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY (syscall)
+ moveal sp@+, a0 /* Pop return address into A0. */
+ DO_CALL (sp@, 0) /* Do system call. */
+ jmp a0@ /* Return to A0. */
+error: moveal a0, sp@- /* Error; push return address */
+ jmp syscall_error /* and jump to error handler. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2c77f1197d4b5e7e2a6ee8f92d8e750a2b55a52
commit c2c77f1197d4b5e7e2a6ee8f92d8e750a2b55a52
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 9 11:59:16 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/m68k/syscall.S b/sysdeps/unix/bsd/sun/m68k/syscall.S
new file mode 100644
index 0000000..0a98da7
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/syscall.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY (syscall)
+ movel sp@, d0 /* Save return address in D0. */
+ movel sp@(4), sp@ /* Put syscall number at top of stack. */
+ movel d0, sp@(4) /* Put return address under it. */
+ trap #0 /* Do syscall; pops number from stack. */
+ jcs error
+ ret
+error: jmp syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94cbbc939dbbb188e8c8c362e2e93bb8ef221ee5
commit 94cbbc939dbbb188e8c8c362e2e93bb8ef221ee5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 3 17:14:27 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/direct.h b/sysdeps/unix/sysv/irix4/direct.h
new file mode 100644
index 0000000..153087f
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/direct.h
@@ -0,0 +1,15 @@
+#ifndef MAXNAMLEN
+#define MAXNAMLEN 255
+#endif
+
+struct direct
+ {
+ unsigned long int d_ino;
+ off_t d_off;
+ unsigned short int d_reclen;
+ char d_name[MAXNAMLEN + 1];
+ };
+
+#define D_NAMLEN(d) (strlen ((d)->d_name))
+
+#define D_RECLEN(d) (d->d_reclen)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7edefbd7cf39d4b6cc41fdd6491289d302f9640
commit c7edefbd7cf39d4b6cc41fdd6491289d302f9640
Author: Roland McGrath <roland@gnu.org>
Date: Tue Nov 2 18:47:48 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/signum.h b/sysdeps/unix/sysv/irix4/signum.h
new file mode 100644
index 0000000..d1e2b21
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/signum.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cygnus.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef _SIGNAL_H
+
+/* This file defines the fake signal functions and signal
+ number constants for System V Release 4 UNIX. */
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1)
+#define SIG_DFL ((__sighandler_t) 0)
+#define SIG_IGN ((__sighandler_t) 1)
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap. */
+#define SIGEMT 7 /* EMT trap. */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call*/
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power going down. */
+#define SIGSTOP 20 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 21 /* Keyboard stop (POSIX). */
+#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
+#define SIGIO 23 /* I/O now possible. */
+#define SIGURG 24 /* Urgent condition on socket.*/
+#define SIGWINCH 25 /* Window size change. */
+#define SIGVTALRM 26 /* Virtual alarm clock. */
+#define SIGPROF 27 /* Profiling alarm clock. */
+#define SIGCONT 28 /* Continue (POSIX). */
+#define SIGTTIN 29 /* Background read from tty (POSIX). */
+#define SIGTTOU 30 /* Background write to tty (POSIX). */
+#define SIGXCPU 31 /* CPU limit exceeded. */
+#define SIGXFSZ 32 /* File size limit exceeded. */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 33 /* Biggest signal number + 1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eec2fe304793607eb695d961784bf3314eb43e93
commit eec2fe304793607eb695d961784bf3314eb43e93
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 30 23:44:43 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/wait.S b/sysdeps/unix/sysv/irix4/wait.S
new file mode 100644
index 0000000..a50a5e6
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/wait.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.set noreorder
+
+ENTRY(__wait)
+ /* Prep it for wait */
+ move a1, zero
+ move a2, zero
+
+ li v0, SYS_wait
+ syscall
+ beq a3, zero, noerror
+ nop
+ j syscall_error
+ nop
+noerror:
+ beq a0, zero, noarg
+ nop
+ sw v1, 0(a0)
+ nop
+noarg:
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5412bc1b048289f0951232fb9d7cc7e09dae3522
commit 5412bc1b048289f0951232fb9d7cc7e09dae3522
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 21:47:13 1993 +0000
Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.S.~2~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
index 9927c1a..43682f3 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -21,13 +21,23 @@ Cambridge, MA 02139, USA. */
ENTRY(syscall_error)
/* If it was a syscall that got interrupted, but can
- be restarted, drop ERESTART in. */
+ be restarted, drop EINTR in. */
cmp %o0, ERESTART
be,a notint
mov EINTR, %o0
- /* Store it in errno... */
-notint: sethi %hi(C_SYMBOL_NAME(errno)), %g1
+notint:
+#ifdef EWOULDBLOCK_sys
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ cmp %o0, EWOULDBLOCK_sys
+ be,a notblock
+ mov EAGAIN, %o0
+#endif
+
+notblock:/* Store it in errno... */
+ sethi %hi(C_SYMBOL_NAME(errno)), %g1
st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))]
/* And just kick back a -1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=635f87a43a384b86891b048a1690da27ecab755f
commit 635f87a43a384b86891b048a1690da27ecab755f
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 21:47:12 1993 +0000
Formerly unix/bsd/m68k/sysdep.S.~3~
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index a6b3c99..fccc605 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -16,13 +16,28 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <errnos.h>
+
.globl syscall_error
syscall_error:
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
#ifdef __motorola__
- move.l d0, _errno
+#ifdef EWOULDBLOCK_sys
+ cmp.l d0, #EWOULDBLOCK_sys
+ bne store
+ moveq.l #EAGAIN, d0
+#endif
+store: move.l d0, _errno
moveq.l #-1, d0
#else
- movel d0, _errno
+#ifdef EWOULDBLOCK_sys
+ cmpl d0, #EWOULDBLOCK_sys
+ bne 0f
+ moveq #EAGAIN, d0
+#endif
+0: movel d0, _errno
moveq #-1, d0
#endif
rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e28fe44c735e8e2f0ebe0dc3f919b03d31bbd12
commit 0e28fe44c735e8e2f0ebe0dc3f919b03d31bbd12
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 21:47:10 1993 +0000
Formerly unix/bsd/vax/sysdep.S.~4~
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index df2123a..74c366e 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -21,12 +21,14 @@ Cambridge, MA 02139, USA. */
.globl _errno
.globl syscall_error
syscall_error:
+#ifdef EWOULDBLOCK_sys
/* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */
cmpl r0, $EWOULDBLOCK_sys
bne 0f
movl $EAGAIN, r0
+#endif
0: movl r0, _errno
mnegl $1, r0
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42115b8a4cd1bdbd3f00d0ef6cddc21e0c4aa755
commit 42115b8a4cd1bdbd3f00d0ef6cddc21e0c4aa755
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 21:25:05 1993 +0000
Formerly unix/bsd/vax/sysdep.S.~3~
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index e29a878..df2123a 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,9 +16,17 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <errnos.h>
+
.globl _errno
.globl syscall_error
syscall_error:
- movl r0, _errno
+ /* We translate the system's EWOULDBLOCK error into EAGAIN.
+ The GNU C library always defines EWOULDBLOCK==EAGAIN.
+ EWOULDBLOCK_sys is the original number. */
+ cmpl r0, $EWOULDBLOCK_sys
+ bne 0f
+ movl $EAGAIN, r0
+0: movl r0, _errno
mnegl $1, r0
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ea6bd16c927a9e10c8384d9191db755be7f8e27
commit 8ea6bd16c927a9e10c8384d9191db755be7f8e27
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 16:07:49 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/sysconf.c b/sysdeps/unix/sysv/irix4/sysconf.c
new file mode 100644
index 0000000..03bb324
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/sysconf.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/syssgi.h>
+
+/* Get the value of the system variable NAME. */
+long int
+DEFUN(__sysconf, (name), int name)
+{
+ return syssgi(SGI_SYSCONF, name);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f52c8c51bdef9185a3aba27142ee8f23f48c1e4
commit 3f52c8c51bdef9185a3aba27142ee8f23f48c1e4
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 28 00:04:50 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/statbuf.h b/sysdeps/unix/sysv/irix4/statbuf.h
new file mode 100644
index 0000000..8b327ba
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/statbuf.h
@@ -0,0 +1,61 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+struct stat
+ {
+ unsigned long st_ino;
+ short int st_dev;
+ unsigned short int st_mode;
+ short int st_nlink;
+ unsigned short int st_uid;
+ unsigned short int st_gid;
+ short int st_rdev;
+ long int st_size;
+ long int st_atime;
+ long int st_mtime;
+ long int st_ctime;
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c94da87c06ce407e9c676d1f076bd25a0b4175b
commit 3c94da87c06ce407e9c676d1f076bd25a0b4175b
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 26 23:50:09 1993 +0000
Formerly unix/sysv/sco3.2.4/__sysconf.S.~4~
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 10699a2..43af869 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -18,7 +18,6 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
#include <confname.h>
-#include <limits.h>
.globl __tzname_max
ENTRY (__sysconf)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d03c81340cbe323f1c41d94ac22aa5385083c4f5
commit d03c81340cbe323f1c41d94ac22aa5385083c4f5
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 23 00:50:20 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/__handler.S b/sysdeps/unix/sysv/irix4/__handler.S
new file mode 100644
index 0000000..bd756a4
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/__handler.S
@@ -0,0 +1,116 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Also hacked by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* This function saves all the registers, calls the
+ user function, and then executes a sigreturn system call. The
+ sigreturn call wants the address of a sigcontext structure. This
+ is all hideously system dependent and, for all intents and
+ purposes, undocumented.
+
+ When we enter here, a3 holds the user's signal handler. We are
+ supposed to fill in the context given in a2, and then pass it and
+ the first two arguments to the user's function. If the user's
+ function returns, we execute a sigreturn system call.
+
+ The sc_onstack, sc_mask and sc_pc elements of the context are
+ already set by the kernel. For some reason we don't have to save
+ the floating point state or the coprocessor state; the kernel may
+ have saved them for us, or it doesn't use them. */
+
+.set noat
+ENTRY (__handler)
+#if 0
+ /* Store zero and the asm temp reg. */
+ sw $0, 12(a2)
+ sw AT, 16(a2)
+
+ /* Put v1 in sc_regs[3]. */
+ sw v1, 24(a2)
+
+ /* Save the caller saved registers in sc_regs[8..15]. */
+ sw t0, 44(a2)
+ sw t1, 48(a2)
+ sw t2, 52(a2)
+ sw t3, 56(a2)
+ sw t4, 60(a2)
+ sw t5, 64(a2)
+ sw t6, 68(a2)
+ sw t7, 72(a2)
+
+ /* Save the callee saved registers in sc_regs[16..23]. */
+ sw s0, 76(a2)
+ sw s1, 80(a2)
+ sw s2, 84(a2)
+ sw s3, 88(a2)
+ sw s4, 92(a2)
+ sw s5, 96(a2)
+ sw s6, 100(a2)
+ sw s7, 104(a2)
+
+ /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */
+ sw t8, 108(a2)
+ sw t9, 112(a2)
+
+ /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */
+ sw k0, 116(a2)
+ sw k1, 120(a2)
+
+ /* Save the global pointer in sc_regs[28]. */
+ sw gp, 124(a2)
+
+ /* ... and also the return address in sc_regs[31]. */
+ sw ra, 136(a2)
+
+ /* Note: we don't save the stack pointer in sc_regs[29];
+ instead, we use the one that was already there. */
+#if 0
+ sw sp, 128(a2)
+#endif
+
+ /* Save the floating pointer in sc_regs[30]. */
+ sw fp, 132(a2)
+
+ /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */
+ mflo t0
+ sw t0, 140(a2)
+ mfhi t0
+ sw t0, 144(a2)
+
+#endif
+ /* Move the stack up six. This will save the context. */
+ addu sp, sp, -24
+ sw a2, 16(sp)
+
+ /* Call their handler with the signal, code, and context; note
+ this will clobber the context. */
+ .set noreorder
+ jal ra, a3
+ nop
+ .set reorder
+
+ /* When we come back, restore the context and pass it right
+ on into sigreturn(). */
+ lw a0, 16(sp)
+
+ /* Do a sigreturn syscall; this doesn't return. */
+ li v0, SYS_sigreturn
+ syscall
+ nop
diff --git a/sysdeps/unix/sysv/irix4/signal.S b/sysdeps/unix/sysv/irix4/signal.S
new file mode 100644
index 0000000..b0c147d
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/signal.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__raw_signal, signal, 3)
+ ret
diff --git a/sysdeps/unix/sysv/irix4/sigreturn.S b/sysdeps/unix/sysv/irix4/sigreturn.S
new file mode 100644
index 0000000..1d62468
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/sigreturn.S
@@ -0,0 +1,23 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY(__sigreturn)
+ li v0, SYS_sigreturn
+ syscall
diff --git a/sysdeps/unix/sysv/irix4/sigtramp.c b/sysdeps/unix/sysv/irix4/sigtramp.c
new file mode 100644
index 0000000..85c2c3a
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/sigtramp.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The sigvec system call on MIPS Ultrix takes an additional
+ parameter, which is the address that is actually called when the
+ signal occurs.
+
+ When a signal occurs, we arrange for the kernel to call __handler.
+ That will save the frame and stack pointers into the context, and
+ then jump to this routine. See __handler.S.
+
+ This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's
+ different because since we get passed the user signal handler we
+ don't actually need a trampoline. */
+
+#include <ansidecl.h>
+#include <signal.h>
+#include <stddef.h>
+#include <errno.h>
+
+/* The user's signal handler is called with three arguments. */
+typedef void (*handler_type) (int sig, int code, struct sigcontext *);
+
+/* Defined in signal.S. */
+extern __sighandler_t EXFUN(__raw_signal, (int sig, __sighandler_t func,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type)));
+
+extern void EXFUN(__handler, (int sig, int code,
+ struct sigcontext *,
+ handler_type));
+
+__sighandler_t
+DEFUN(signal, (sig, func),
+ int sig AND __sighandler_t func)
+{
+ return __raw_signal (sig, func, __handler);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19d9b4ea1259df1c43b11431f88d934f2be91b51
commit 19d9b4ea1259df1c43b11431f88d934f2be91b51
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 22 22:09:40 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/irix4/start.c b/sysdeps/unix/sysv/irix4/start.c
new file mode 100644
index 0000000..4382e6f
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/start.c
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+/* The first piece of initialized data. */
+int __data_start = 0;
+
+VOLATILE int errno = 0;
+
+#ifndef HAVE_GNU_LD
+#undef environ
+#define __environ environ
+#endif
+
+char **__environ;
+
+extern void EXFUN(__libc_init, (int argc, char **argv, char **envp));
+extern int EXFUN(main, (int argc, char **argv, char **envp));
+
+/* Use the stack pointer to access the arguments. This assumes that
+ we can guess how big the frame will be. */
+register long int sp asm("sp");
+#ifdef __OPTIMIZE__
+#define STACKSIZE 8
+#else
+#define STACKSIZE 10
+#endif
+
+void
+DEFUN_VOID(__start)
+{
+ int argc;
+ char **argv, **envp;
+
+ /* Set up the global pointer. */
+ asm volatile ("la $28,_gp");
+ argc = ((int *) sp)[STACKSIZE];
+ argv = (char **) &((int *) sp)[STACKSIZE + 1];
+ envp = &argv[argc + 1];
+ __environ = envp;
+
+ __libc_init (argc, argv, envp);
+ errno = 0;
+ exit (main (argc, argv, envp));
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1771c7559d9b8f0b46bcffa33fede6e58fadde88
commit 1771c7559d9b8f0b46bcffa33fede6e58fadde88
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 20 01:14:17 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/getrusage.c b/sysdeps/unix/sysv/irix4/getrusage.c
new file mode 100644
index 0000000..7222a0d
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/getrusage.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/resource.h>
+#include <errno.h>
+#include <sys/syssgi.h>
+
+/* Return resource usage information on process indicated by WHO
+ and put it in *USAGE. Returns 0 for success, -1 for failure. */
+int
+DEFUN(__getrusage, (who, usage),
+ enum __rusage_who who AND struct rusage *usage)
+{
+ return syssgi(SGI_RUSAGE, who, usage);
+}
+
+
+#ifdef HAVE_GNU_LD
+
+#include <gnu-stabs.h>
+
+stub_warning(__getrusage);
+
+#endif /* GNU stabs. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=746dce604d05570f72421024259a891e2d7843b4
commit 746dce604d05570f72421024259a891e2d7843b4
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 14 00:27:29 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/getpgid.S b/sysdeps/unix/sysv/irix4/getpgid.S
new file mode 100644
index 0000000..b84b41a
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/getpgid.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (bsdgetpgrp, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f09f73303631a9b057001d02a56e2d13dbb7fa18
commit f09f73303631a9b057001d02a56e2d13dbb7fa18
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 13 01:24:46 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/setgroups.c b/sysdeps/unix/sysv/irix4/setgroups.c
new file mode 100644
index 0000000..70d748b
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/setgroups.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sys/syssgi.h>
+#include <ansidecl.h>
+#include <sys/types.h>
+#include <grp.h>
+
+/* Set the group set for the current user to GROUPS (N of them). */
+int
+DEFUN(setgroups, (n, groups), size_t n AND CONST gid_t *groups)
+{
+ return syssgi(SGI_SETGROUPS, n, groups);
+}
diff --git a/sysdeps/unix/sysv/irix4/syssgi.S b/sysdeps/unix/sysv/irix4/syssgi.S
new file mode 100644
index 0000000..39b82ea
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/syssgi.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (syssgi, 2)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=168f03be1edf7ab70220e1638fd841514e244eee
commit 168f03be1edf7ab70220e1638fd841514e244eee
Author: Roland McGrath <roland@gnu.org>
Date: Sat Oct 9 00:32:32 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/irix4/Implies b/sysdeps/unix/sysv/irix4/Implies
new file mode 100644
index 0000000..78437f6
--- /dev/null
+++ b/sysdeps/unix/sysv/irix4/Implies
@@ -0,0 +1,2 @@
+# Irix 4 has the set of things which are also common to BSD and SVR4.
+unix/common
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a057dbb1eb6a0fc646538a0c053e4914ac6c5750
commit a057dbb1eb6a0fc646538a0c053e4914ac6c5750
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Sep 23 19:14:00 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/dup2.c b/sysdeps/unix/sysv/sysv4/dup2.c
new file mode 100644
index 0000000..06270b4
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/dup2.c
@@ -0,0 +1,2 @@
+/* SVR4 uses the POSIX dup2. */
+#include <sysdeps/posix/__dup2.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8716b685ef95b4c3ef7c0f5b9e296970240b141e
commit 8716b685ef95b4c3ef7c0f5b9e296970240b141e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Sep 23 00:08:14 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/sigprocmask.S b/sysdeps/unix/sysv/sysv4/sigprocmask.S
new file mode 100644
index 0000000..5da366d
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigprocmask.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (sigprocmask, 3)
+ ret
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 0093e20..71d3d08 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cygnus.com).
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -66,11 +66,7 @@ DEFUN(__sysconf, (name), int name)
return __sysconfig (_CONFIG_OPEN_FILES);
case _SC_TZNAME_MAX:
-#ifdef TZNAME_MAX
- return __tzname_max > TZNAME_MAX ? __tzname_max : TZNAME_MAX;
-#else
- return __tzname_max;
-#endif
+ return __tzname_max ();
case _SC_JOB_CONTROL:
#ifdef _POSIX_JOB_CONTROL
diff --git a/sysdeps/unix/sysv/sysv4/time.S b/sysdeps/unix/sysv/sysv4/time.S
new file mode 100644
index 0000000..61f3514
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/time.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (time, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=663cccc8258a84295159424ebe73a2936914ee3f
commit 663cccc8258a84295159424ebe73a2936914ee3f
Author: Roland McGrath <roland@gnu.org>
Date: Thu Sep 23 00:08:05 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/signum.h b/sysdeps/unix/sysv/sysv4/signum.h
new file mode 100644
index 0000000..2f70495
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/signum.h
@@ -0,0 +1,68 @@
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef _SIGNAL_H
+
+/* This file defines the fake signal functions and signal
+ number constants for System V Release 4 UNIX. */
+
+/* Fake signal functions. */
+#define SIG_ERR ((__sighandler_t) -1)
+#define SIG_DFL ((__sighandler_t) 0)
+#define SIG_IGN ((__sighandler_t) 1)
+
+
+/* Signals. */
+#define SIGHUP 1 /* Hangup (POSIX). */
+#define SIGINT 2 /* Interrupt (ANSI). */
+#define SIGQUIT 3 /* Quit (POSIX). */
+#define SIGILL 4 /* Illegal instruction (ANSI). */
+#define SIGABRT SIGIOT /* Abort (ANSI). */
+#define SIGTRAP 5 /* Trace trap (POSIX). */
+#define SIGIOT 6 /* IOT trap. */
+#define SIGEMT 7 /* EMT trap. */
+#define SIGFPE 8 /* Floating-point exception (ANSI). */
+#define SIGKILL 9 /* Kill, unblockable (POSIX). */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSEGV 11 /* Segmentation violation (ANSI). */
+#define SIGSYS 12 /* Bad argument to system call*/
+#define SIGPIPE 13 /* Broken pipe (POSIX). */
+#define SIGALRM 14 /* Alarm clock (POSIX). */
+#define SIGTERM 15 /* Termination (ANSI). */
+#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
+#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
+#define SIGCHLD 18 /* Child status has changed (POSIX). */
+#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
+#define SIGPWR 19 /* Power going down. */
+#define SIGWINCH 20 /* Window size change. */
+#define SIGURG 21 /* Urgent condition on socket.*/
+#define SIGIO SIGPOLL /* I/O now possible. */
+#define SIGPOLL 22 /* Same as SIGIO? (SVID). */
+#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
+#define SIGTSTP 24 /* Keyboard stop (POSIX). */
+#define SIGCONT 25 /* Continue (POSIX). */
+#define SIGTTIN 26 /* Background read from tty (POSIX). */
+#define SIGTTOU 27 /* Background write to tty (POSIX). */
+#define SIGVTALRM 28 /* Virtual alarm clock. */
+#define SIGPROF 29 /* Profiling alarm clock. */
+#define SIGXCPU 30 /* CPU limit exceeded. */
+#define SIGXFSZ 31 /* File size limit exceeded. */
+
+#endif /* <signal.h> included. */
+
+#define _NSIG 32 /* Biggest signal number + 1. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e052e2a4e950c597efadc6751f7c70fb267937bd
commit e052e2a4e950c597efadc6751f7c70fb267937bd
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Sep 23 00:07:20 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.S b/sysdeps/unix/sysv/sysv4/sysconfig.S
new file mode 100644
index 0000000..034e012
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sysconfig.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (sysconfig, 1)
+ ret
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h
index e69de29..77c84c7 100644
--- a/sysdeps/unix/sysv/sysv4/sysconfig.h
+++ b/sysdeps/unix/sysv/sysv4/sysconfig.h
@@ -0,0 +1,28 @@
+/* `__sysconfig' NAME values.
+ Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef __SYSCONFIG_H
+#define __SYSCONFIG_H
+
+#define _CONFIG_OPEN_FILES 4 /* process limit on open files */
+#define _CONFIG_PAGESIZE 6 /* MMU page size */
+#define _CONFIG_CLK_TCK 7 /* all times are in CLK_TCKths of a second */
+
+#endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d74175455ddc9c9de6fae8f42d07118a09f4f8b6
commit d74175455ddc9c9de6fae8f42d07118a09f4f8b6
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Sep 23 00:05:36 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/i386/statbuf.h b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
new file mode 100644
index 0000000..b448dcb
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/i386/statbuf.h
@@ -0,0 +1,85 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ short int st_dev;
+ long st_filler1[3];
+ __ino_t st_ino; /* File serial number. */
+ unsigned long int st_mode; /* File mode. */
+ /* This is unsigned long instead of __nlink_t, since SVR4 has
+ a long nlink_t, not a short one. */
+ unsigned long int st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long st_filler2[2];
+
+ __off_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long st_filler3;
+
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atime_usec;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtime_usec;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctime_usec;
+
+ long st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ long st_blocks; /* Number of 512-byte blocks allocated. */
+ int st_aclcnt;
+ unsigned long int st_level;
+ unsigned long int st_flags;
+ unsigned long int st_cmwlevel;
+ long st_filler4[4];
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
new file mode 100644
index 0000000..eb994dd
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/statbuf.h
@@ -0,0 +1,82 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _STATBUF_H
+#define _STATBUF_H
+
+#include <gnu/types.h>
+
+/* Structure describing file characteristics. */
+struct stat
+ {
+ short int st_dev;
+ long st_filler1[3];
+ __ino_t st_ino; /* File serial number. */
+ unsigned long int st_mode; /* File mode. */
+ /* This is unsigned long instead of __nlink_t, since SVR4 has
+ a long nlink_t, not a short one. */
+ unsigned long int st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ unsigned long int st_rdev; /* Device number, if device. */
+ long st_filler2[2];
+
+ __off_t st_size; /* Size of file, in bytes. */
+ /* SVR4 added this extra long to allow for expansion of off_t. */
+ long st_filler3;
+
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atime_usec;
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtime_usec;
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctime_usec;
+
+ long st_blksize; /* Optimal block size for I/O. */
+#define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
+
+ long st_blocks; /* Number of 512-byte blocks allocated. */
+ char st_fstype[16];
+ long st_filler4[8];
+ };
+
+/* Encoding of the file mode. */
+
+#define __S_IFMT 0170000 /* These bits determine file type. */
+
+/* File types. */
+#define __S_IFDIR 0040000 /* Directory. */
+#define __S_IFCHR 0020000 /* Character device. */
+#define __S_IFBLK 0060000 /* Block device. */
+#define __S_IFREG 0100000 /* Regular file. */
+#define __S_IFIFO 0010000 /* FIFO. */
+
+/* These don't actually exist on System V, but having them doesn't hurt. */
+#define __S_IFLNK 0120000 /* Symbolic link. */
+#define __S_IFSOCK 0140000 /* Socket. */
+
+/* Protection bits. */
+
+#define __S_ISUID 04000 /* Set user ID on execution. */
+#define __S_ISGID 02000 /* Set group ID on execution. */
+#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#define __S_IREAD 0400 /* Read by owner. */
+#define __S_IWRITE 0200 /* Write by owner. */
+#define __S_IEXEC 0100 /* Execute by owner. */
+
+#endif /* statbuf.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d14810a630f88fb15dd3bc3bf78462a2d457c2b1
commit d14810a630f88fb15dd3bc3bf78462a2d457c2b1
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 26 23:31:15 1993 +0000
entered into RCS
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
index 1828714..5c7eb68 100644
--- a/sysdeps/mips/__longjmp.c
+++ b/sysdeps/mips/__longjmp.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -22,6 +22,10 @@ Cambridge, MA 02139, USA. */
#undef __longjmp
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
__NORETURN
void
DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
@@ -66,7 +70,7 @@ DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
/* Get the PC. */
asm volatile ("lw $31, %0" : : "m" (env[0].__pc));
- /* Give setjmp() 1 if given a 0, or what they gave us if non-zero. */
+ /* Give setjmp 1 if given a 0, or what they gave us if non-zero. */
if (val == 0)
asm volatile ("li $2, 1");
else
@@ -74,6 +78,5 @@ DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
asm volatile ("j $31");
- /* Follow the trend.. */
abort ();
}
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
index 661997f..eed47dc 100644
--- a/sysdeps/mips/jmp_buf.h
+++ b/sysdeps/mips/jmp_buf.h
@@ -1,6 +1,6 @@
/* Define the machine-dependent type `jmp_buf'. Mips version.
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cygnus.com).
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -41,5 +41,7 @@ typedef struct
double __fpregs[6];
} __jmp_buf[1];
+#ifdef __USE_MISC
/* Offset to the program counter in `jmp_buf'. */
#define JB_PC 0
+#endif
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
index e4c9d20..3a3ed20 100644
--- a/sysdeps/mips/setjmp_aux.c
+++ b/sysdeps/mips/setjmp_aux.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,6 +19,10 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
/* This function is only called via the assembly language routine
__setjmp, which arranges to pass in the stack pointer and the frame
pointer. We do things this way because it's difficult to reliably
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
index 60bb312..107d2fc 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
@@ -1,5 +1,5 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Contributed by Brendan Kehoe (brendan@zen.org).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -27,7 +27,7 @@ struct sigcontext
sigset_t sc_mask;
/* Program counter when the signal hit. */
- PTR sc_pc;
+ __ptr_t sc_pc;
/* Registers 0 through 31. */
int sc_regs[32];
@@ -52,9 +52,9 @@ struct sigcontext
int sc_cause;
/* CPU bad virtual address. */
- PTR sc_badvaddr;
+ __ptr_t sc_badvaddr;
/* CPU board bad physical address. */
- PTR sc_badpaddr;
+ __ptr_t sc_badpaddr;
};
diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
new file mode 100644
index 0000000..bbf742b
--- /dev/null
+++ b/sysdeps/unix/mips/sysdep.h
@@ -0,0 +1,67 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+#include <regdef.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl name; \
+ .align 2; \
+ name##:
+#else
+#define ENTRY(name) \
+ .globl name; \
+ .align 2; \
+ name/**/:
+#endif
+
+/* Note that while it's better structurally, going back to call syscall_error
+ can make things confusing if you're debugging---it looks like it's jumping
+ backwards into the previous fn. */
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+ .set noreorder; \
+ .align 2; \
+ 99: j syscall_error; \
+ nop; \
+ ENTRY(name) \
+ li v0, SYS_##syscall_name; \
+ syscall; \
+ bne a3, zero, 99b; \
+ nop; \
+syse1:
+#else
+#define PSEUDO(name, syscall_name, args) \
+ .set noreorder; \
+ .align 2; \
+ 99: j syscall_error; \
+ nop; \
+ ENTRY(name) \
+ li v0, SYS_/**/syscall_name; \
+ syscall; \
+ bne a3, zero, 99b; \
+ nop; \
+syse1:
+#endif
+
+#define ret j ra ; nop
+#define r0 v0
+#define r1 v1
+/* The mips move insn is d,s. */
+#define MOVE(x,y) move y , x
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebb0156a4462c998f7e0a6413e6a64ef2f493fa4
commit ebb0156a4462c998f7e0a6413e6a64ef2f493fa4
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Aug 26 23:30:59 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
index 6f26028..3ea697c 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/__handler.S
+++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
@@ -1,5 +1,5 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Contributed by Brendan Kehoe (brendan@zen.org).
Also hacked by Ian Lance Taylor (ian@airs.com).
The GNU C Library is free software; you can redistribute it and/or
@@ -51,8 +51,8 @@ ENTRY (__handler)
sw t3, 56(a2)
sw t4, 60(a2)
sw t5, 64(a2)
- sw t6, 48(a2)
- sw t7, 52(a2)
+ sw t6, 68(a2)
+ sw t7, 72(a2)
/* Save the callee saved registers in sc_regs[16..23]. */
sw s0, 76(a2)
@@ -78,9 +78,13 @@ ENTRY (__handler)
/* ... and also the return address in sc_regs[31]. */
sw ra, 136(a2)
- /* Save the floating pointer and the stack pointer in
- sc_regs[29] and sc_regs[30]. */
+ /* Note: we don't save the stack pointer in sc_regs[29];
+ instead, we use the one that was already there. */
+#if 0
sw sp, 128(a2)
+#endif
+
+ /* Save the floating pointer in sc_regs[30]. */
sw $fp, 132(a2)
/* Save the mul/div stuff in sc_mdlo and sc_mdhi. */
diff --git a/sysdeps/unix/bsd/ultrix4/mips/vfork.S b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
new file mode 100644
index 0000000..e194db0
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/vfork.S
@@ -0,0 +1,31 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_vfork
+#define SYS_vfork 66
+#endif
+
+SYSCALL__ (vfork, 0)
+ beq v1, zero, parent /* Branch if parent. */
+ nop
+ move v0, zero
+parent:
+ ret
+ nop
diff --git a/sysdeps/unix/bsd/ultrix4/wait3.S b/sysdeps/unix/bsd/ultrix4/wait3.S
new file mode 100644
index 0000000..102ca18
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/wait3.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (wait3, 3)
+ ret
diff --git a/sysdeps/unix/bsd/ultrix4/waitpid.S b/sysdeps/unix/bsd/ultrix4/waitpid.S
new file mode 100644
index 0000000..3bc5ce2
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/waitpid.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (waitpid, 3)
+ ret
diff --git a/sysdeps/unix/mips/brk.S b/sysdeps/unix/mips/brk.S
new file mode 100644
index 0000000..79e4fec
--- /dev/null
+++ b/sysdeps/unix/mips/brk.S
@@ -0,0 +1,65 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+#ifndef HAVE_GNU_LD
+#define __end end
+#endif
+
+.data
+.sdata
+ENTRY(__curbrk)
+ .word __end
+
+.text
+.set noreorder
+.set noat
+
+ENTRY(__brk)
+ /* Minimum is one page. */
+ lui v0, 4096
+ lw v0, __end
+ nop
+
+ /* If they ask for less than a page, givvem the whole
+ thing anyway. */
+ sltu AT, a0, v0
+ beq AT, zero, down1
+ nop
+ move a0, v0
+down1:
+ li v0, SYS_brk
+ syscall
+ bne a3, zero, error
+
+ /* Update __curbrk and exit cleanly. */
+ lui AT, 4096
+ sw a0, __curbrk
+ j ra
+ move v0, zero
+
+ /* What a horrible way to die. */
+error: j syscall_error
+ nop
+ nop
+ nop
diff --git a/sysdeps/unix/mips/fork.S b/sysdeps/unix/mips/fork.S
new file mode 100644
index 0000000..53cae3c
--- /dev/null
+++ b/sysdeps/unix/mips/fork.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (fork, 0)
+ beq v1, zero, parent /* Branch if parent. */
+ nop
+ /* We are the child. Return zero. */
+ move v0, zero
+parent:
+ ret
diff --git a/sysdeps/unix/mips/pipe.S b/sysdeps/unix/mips/pipe.S
new file mode 100644
index 0000000..507a753
--- /dev/null
+++ b/sysdeps/unix/mips/pipe.S
@@ -0,0 +1,29 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pipe, 1)
+ /* Plop in the two descriptors. */
+ sw v0, 0(a0)
+ sw v1, 4(a0)
+
+ /* Go out with a clean status. */
+ j ra
+ move v0, zero
+ nop
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a13ebb05b8c61e99d5ee122c89313a6b9dfcc054
commit a13ebb05b8c61e99d5ee122c89313a6b9dfcc054
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Aug 26 23:30:55 1993 +0000
Initial revision
diff --git a/sysdeps/unix/mips/sigreturn.S b/sysdeps/unix/mips/sigreturn.S
new file mode 100644
index 0000000..93a2973
--- /dev/null
+++ b/sysdeps/unix/mips/sigreturn.S
@@ -0,0 +1,23 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+ENTRY(__sigreturn)
+ li v0, 103
+ syscall
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
new file mode 100644
index 0000000..9927c1a
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.S
@@ -0,0 +1,35 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+#include <errnos.h>
+
+ENTRY(syscall_error)
+ /* If it was a syscall that got interrupted, but can
+ be restarted, drop ERESTART in. */
+ cmp %o0, ERESTART
+ be,a notint
+ mov EINTR, %o0
+
+ /* Store it in errno... */
+notint: sethi %hi(C_SYMBOL_NAME(errno)), %g1
+ st %o0, [%g1 + %lo(C_SYMBOL_NAME(errno))]
+
+ /* And just kick back a -1. */
+ retl
+ mov -1, %o0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58998cd0b27088fef4e5b57c28f184e9d0113488
commit 58998cd0b27088fef4e5b57c28f184e9d0113488
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Aug 26 23:25:13 1993 +0000
Formerly unix/sysv/sysv4/solaris2/sparc/sysdep.h.~2~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
index d09b6c4..cd6ef7f 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -1,4 +1,44 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@zen.org).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
/* Solaris 2 does not precede the asm names of C symbols with a `_'. */
#define NO_UNDERSCORES
-#include <sysdeps/unix/sparc/sysdep.h>
+#include <sysdeps/unix/sysdep.h>
+
+#define ENTRY(name) \
+ .section ".text"; \
+ .align 4; \
+ .global C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name), \#function; \
+ C_LABEL(name)
+
+#define PSEUDO(name, syscall_name, args) \
+ ENTRY (name) \
+ mov SYS_ify(syscall_name), %g1; \
+ ta 8; \
+ bcs C_SYMBOL_NAME(syscall_error); \
+ nop; \
+ retl; \
+ mov %g0, %o0
+
+#define ret retl; nop
+#define r0 %o0
+#define r1 %o1
+#define MOVE(x,y) mov x, y
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a219aa112863e6605439e0db68e31a5e4236c02
commit 4a219aa112863e6605439e0db68e31a5e4236c02
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jul 22 19:20:18 1993 +0000
Formerly alpha/memchr.c.~3~
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index 3c9477e..048c9fa 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -33,7 +33,7 @@ memchr (const void *s, int c, size_t n)
for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0;
--n, ++char_ptr)
if (*char_ptr == c)
- return char_ptr;
+ return (void *) char_ptr;
longword_ptr = (unsigned long int *) char_ptr;
@@ -58,7 +58,7 @@ memchr (const void *s, int c, size_t n)
{
/* Which of the bytes was the C? */
- const char *cp = (const char *) (longword_ptr - 1);
+ char *cp = (char *) (longword_ptr - 1);
if (cp[0] == c)
return cp;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6063f734e701b8e127c60b28f0ba5a69433fea66
commit 6063f734e701b8e127c60b28f0ba5a69433fea66
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jul 22 19:20:16 1993 +0000
Formerly alpha/strchr.c.~2~
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
index 8cf2024..db279de 100644
--- a/sysdeps/alpha/strchr.c
+++ b/sysdeps/alpha/strchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -35,7 +35,7 @@ strchr (const char *str, int c)
if (*char_ptr == '\0')
return NULL;
else if (*char_ptr == c)
- return char_ptr;
+ return (char *) char_ptr;
longword_ptr = (unsigned long int *) char_ptr;
@@ -63,7 +63,7 @@ strchr (const char *str, int c)
{
/* Which of the bytes was the C? */
- const char *cp = (const char *) (longword_ptr - 1);
+ char *cp = (char *) (longword_ptr - 1);
if (cp[0] == c)
return cp;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aefa27d4fba9224cd41c18b9ee5fe1e2ca577a9a
commit aefa27d4fba9224cd41c18b9ee5fe1e2ca577a9a
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 30 18:41:54 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S
index c09be03..dcfb487 100644
--- a/sysdeps/unix/sysv/sysv4/pgrpsys.S
+++ b/sysdeps/unix/sysv/sysv4/pgrpsys.S
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (pgrpsys)
+SYSCALL__ (pgrpsys, 3)
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e982f6380c40880b73c9bacb2916f70b09155ca7
commit e982f6380c40880b73c9bacb2916f70b09155ca7
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 28 03:56:39 1993 +0000
entered into RCS
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index cff37bc..3133e70 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,8 +47,12 @@ DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val)
asm volatile(/* Restore the data and address registers. */
"movem%.l %0, d1-d7/a0-a7\n"
/* Return to setjmp's caller. */
- "jmp a0@" :
- /* No outputs. */ : "g" (env[0].__dregs[0])
+#ifdef __motorola__
+ "jmp (a0)"
+#else
+ "jmp a0@"
+#endif
+ : /* No outputs. */ : "g" (env[0].__dregs[0])
/* We don't bother with the clobbers,
because this code always jumps out anyway. */
);
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 4dcf931..547b4f3 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -19,7 +19,12 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (pipe, 1)
+#ifdef __motorola__
+ move.l 4(sp), a0
+ movem.l d0-d1, (a0)
+#else
movel sp@(4), a0
moveml d0-d1, a0@
+#endif
clrl d0
rts
diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S
index 2d4b1b6..927fa33 100644
--- a/sysdeps/unix/bsd/m68k/wait.S
+++ b/sysdeps/unix/bsd/m68k/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,8 +19,15 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (wait, 1)
+#ifdef __motorola__
+ tst.l 4(sp)
+ beq 1f
+ movea.l 4(sp), a0
+ move.l d1, (a0)
+#else
tstl sp@(4)
beq 1f
moveal sp@(4), a0
movel d1, a0@
+#endif
1: rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dffe32033e634d073b311aec033b010933978505
commit dffe32033e634d073b311aec033b010933978505
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 28 03:56:04 1993 +0000
Formerly unix/bsd/m68k/sysdep.S.~2~
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
index 764bc4b..a6b3c99 100644
--- a/sysdeps/unix/bsd/m68k/sysdep.S
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,11 @@ Cambridge, MA 02139, USA. */
.globl syscall_error
syscall_error:
+#ifdef __motorola__
+ move.l d0, _errno
+ moveq.l #-1, d0
+#else
movel d0, _errno
moveq #-1, d0
+#endif
rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=be829b7ca173c902cdd3f2365aa854ca95d891be
commit be829b7ca173c902cdd3f2365aa854ca95d891be
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 25 21:00:23 1993 +0000
Formerly unix/sysv/sco3.2.4/__sysconf.S.~3~
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index 2ec8c9d..10699a2 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -21,16 +21,9 @@ Cambridge, MA 02139, USA. */
#include <limits.h>
.globl __tzname_max
-ENTRY (sysconf)
+ENTRY (__sysconf)
cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */
je tzname
DO_CALL (sysconf, 1) /* No; use the SCO system call. */
ret
-tzname: movl (C_SYMBOL_NAME(__tzname_max)), %eax /* Yes; use __tzname_max. */
-#ifdef TZNAME_MAX
- cmpl $TZNAME_MAX, %eax /* Is TZNAME_MAX larger? */
- jle out
- movl $TZNAME_MAX, %eax /* Yes; return it. */
-out:
-#endif
- ret
+tzname: jmp C_SYMBOL_NAME(__tzname_max) /* Yes; bounce to __tzname_max (). */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b01b507ffe7c6153eaa1b778e9d7e53fe9bda2da
commit b01b507ffe7c6153eaa1b778e9d7e53fe9bda2da
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 23 19:10:48 1993 +0000
Formerly unix/sysv/sco3.2.4/Dist.~2~
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
index 9702380..1dfa95d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Dist
+++ b/sysdeps/unix/sysv/sco3.2.4/Dist
@@ -1 +1 @@
-sco_setpgrp.S
+pgrpsys.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=da6409f9019a2bbcf686b00a2a2eb9c69e14f87d
commit da6409f9019a2bbcf686b00a2a2eb9c69e14f87d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 23 19:10:39 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S
new file mode 100644
index 0000000..2c7d994
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/pgrpsys.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/sysv4/pgrpsys.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a7ab9ef98e4be140920706a2a8c6260b49fb7fb
commit 3a7ab9ef98e4be140920706a2a8c6260b49fb7fb
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:55:33 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/pgrpsys.S b/sysdeps/unix/sysv/sysv4/pgrpsys.S
new file mode 100644
index 0000000..c09be03
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/pgrpsys.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pgrpsys)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e699d9222b95f4d9cc6ba27e934424b0929abbd6
commit e699d9222b95f4d9cc6ba27e934424b0929abbd6
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:55:24 1993 +0000
Formerly unix/sysv/sco3.2.4/Makefile.~3~
diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile
index 61479b3..deea4b1 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Makefile
+++ b/sysdeps/unix/sysv/sco3.2.4/Makefile
@@ -1,3 +1,3 @@
ifeq (posix,$(subdir))
-sysdep_routines := $(sysdep_routines) sco_pgrp
+sysdep_routines := $(sysdep_routines) pgrpsys
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0182725d9f65e529d2d74ecea6547a8e2b0d9d18
commit 0182725d9f65e529d2d74ecea6547a8e2b0d9d18
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:55:21 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~6~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index 8e83c60..ea0507c 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1,2 +1,3 @@
sysconfig.h
sysconfig.S
+pgrpsys.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2c7e2a2f923369b8e1e0c8b7c953ec5631e15d89
commit 2c7e2a2f923369b8e1e0c8b7c953ec5631e15d89
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:54:40 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/setsid.S b/sysdeps/unix/bsd/sun/sunos4/setsid.S
new file mode 100644
index 0000000..e0f94b0
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/setsid.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__setsid.S>
diff --git a/sysdeps/unix/bsd/ultrix4/setsid.S b/sysdeps/unix/bsd/ultrix4/setsid.S
new file mode 100644
index 0000000..e0f94b0
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/setsid.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/bsd4.4/__setsid.S>
diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
index 32aa93c..6829b74 100644
--- a/sysdeps/unix/sysv/sco3.2.4/getpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
@@ -1,29 +1 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-/* Get the process group ID of process PID. */
-int
-DEFUN(__getpgrp, (pid), pid_t pid)
-{
- return __sco_setpgrp (0, pid);
-}
+#include <sysdeps/unix/sysv/sysv4/__getpgrp.c>
diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
index f3e5091..928e6d0 100644
--- a/sysdeps/unix/sysv/sco3.2.4/setpgid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
@@ -1,30 +1 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <unistd.h>
-
-/* Set the process group ID of the process matching PID to PGID.
- If PID is zero, the current process's process group ID is set.
- If PGID is zero, the process ID of the process is used. */
-int
-DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
-{
- return __sco_setpgrp (1, pid, pgid);
-}
+#include <sysdeps/unix/sysv/sysv4/__setpgrp.c>
diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c
index 4486482..4a0a706 100644
--- a/sysdeps/unix/sysv/sco3.2.4/setsid.c
+++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c
@@ -1,31 +1 @@
-/* Copyright (C) 1993 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <unistd.h>
-
-
-/* Create a new session with the calling process as its leader.
- The process group IDs of the session and the calling process
- are set to the process ID of the calling process, which is returned. */
-int
-DEFUN_VOID(__setsid)
-{
- return __sco_setpgrp (3);
-}
+#include <sysdeps/unix/sysv/sysv4/__setsid.c>
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
index 4d3c528..a32b39a 100644
--- a/sysdeps/unix/sysv/sysv4/setsid.c
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include <unistd.h>
-extern int __sco_pgrp __P ((int type, ...));
+extern int __pgrpsys __P ((int type, ...));
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
@@ -28,5 +28,5 @@ extern int __sco_pgrp __P ((int type, ...));
int
DEFUN_VOID(__setsid)
{
- return __sco_pgrp (3);
+ return __pgrpsys (3);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5aa2dfab2a0154cd14b1b31b8d382f16780b615
commit b5aa2dfab2a0154cd14b1b31b8d382f16780b615
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:49:00 1993 +0000
Formerly unix/sysv/sysv4/__getpgrp.c.~2~
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
index f667278..fad4970 100644
--- a/sysdeps/unix/sysv/sysv4/getpgid.c
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -21,11 +21,11 @@ Cambridge, MA 02139, USA. */
#include <unistd.h>
#include <sys/types.h>
-extern int __sco_pgrp __P ((int type, ...));
+extern int __pgrpsys __P ((int type, ...));
/* Get the process group ID of process PID. */
int
DEFUN(__getpgrp, (pid), pid_t pid)
{
- return __sco_pgrp (0, pid);
+ return __pgrpsys (4, pid);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=de4f369b94c078e60f44716f51708f7b84e2f7b6
commit de4f369b94c078e60f44716f51708f7b84e2f7b6
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 22 06:48:36 1993 +0000
Formerly unix/sysv/sysv4/__setpgrp.c.~2~
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
index b9266a4..4237a0b 100644
--- a/sysdeps/unix/sysv/sysv4/setpgid.c
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#include <errno.h>
#include <unistd.h>
-extern int __sco_pgrp __P ((int type, ...));
+extern int __pgrpsys __P ((int type, ...));
/* Set the process group ID of the process matching PID to PGID.
If PID is zero, the current process's process group ID is set.
@@ -28,5 +28,5 @@ extern int __sco_pgrp __P ((int type, ...));
int
DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
{
- return __sco_pgrp (1, pid, pgid);
+ return __pgrpsys (5, pid, pgid);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aca28d6c2711d73bcc51e3d0bf4099b7c366a870
commit aca28d6c2711d73bcc51e3d0bf4099b7c366a870
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 21 23:47:08 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/__sysconf.c.~3~
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
index 3e4e82c..0093e20 100644
--- a/sysdeps/unix/sysv/sysv4/sysconf.c
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -66,7 +66,11 @@ DEFUN(__sysconf, (name), int name)
return __sysconfig (_CONFIG_OPEN_FILES);
case _SC_TZNAME_MAX:
- return __tzname_max ();
+#ifdef TZNAME_MAX
+ return __tzname_max > TZNAME_MAX ? __tzname_max : TZNAME_MAX;
+#else
+ return __tzname_max;
+#endif
case _SC_JOB_CONTROL:
#ifdef _POSIX_JOB_CONTROL
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d93c21cf1c70013be1c397fe34e173bf9005c20
commit 0d93c21cf1c70013be1c397fe34e173bf9005c20
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 21 23:36:34 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h
index cfa3e07..0408951 100644
--- a/sysdeps/unix/sysv/sco3.2.4/confname.h
+++ b/sysdeps/unix/sysv/sco3.2.4/confname.h
@@ -39,6 +39,7 @@ Cambridge, MA 02139, USA. */
#define _SC_VERSION 7
#define _SC_PASS_MAX 8
#define _SC_XOPEN_VERSION 9
+#define _SC_TZNAME_MAX 666 /* Not handled by SCO's system call. */
#ifdef __USE_POSIX2
/* Values for the NAME argument to `confstr'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f9a34c5eebf14e459b06c87af0f71e7b8489822
commit 0f9a34c5eebf14e459b06c87af0f71e7b8489822
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 21 23:36:26 1993 +0000
Formerly unix/sysv/sco3.2.4/__sysconf.S.~2~
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
index bb78d5d..2ec8c9d 100644
--- a/sysdeps/unix/sysv/sco3.2.4/sysconf.S
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -17,6 +17,20 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
+#include <confname.h>
+#include <limits.h>
-SYSCALL__ (sysconf, 1)
+.globl __tzname_max
+ENTRY (sysconf)
+ cmpl 4(%esp), $_SC_TZNAME_MAX /* Is the arg _SC_TZNAME_MAX? */
+ je tzname
+ DO_CALL (sysconf, 1) /* No; use the SCO system call. */
+ ret
+tzname: movl (C_SYMBOL_NAME(__tzname_max)), %eax /* Yes; use __tzname_max. */
+#ifdef TZNAME_MAX
+ cmpl $TZNAME_MAX, %eax /* Is TZNAME_MAX larger? */
+ jle out
+ movl $TZNAME_MAX, %eax /* Yes; return it. */
+out:
+#endif
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2d8c1da501d40180b7d1be11e55d722cd2d1b9f4
commit 2d8c1da501d40180b7d1be11e55d722cd2d1b9f4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 11 19:44:48 1993 +0000
Formerly unix/bsd/m68k/__pipe.S.~2~
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
index 26ca4cb..4dcf931 100644
--- a/sysdeps/unix/bsd/m68k/pipe.S
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (pipe, 1)
- moveal sp@(4), a0
+ movel sp@(4), a0
moveml d0-d1, a0@
clrl d0
rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4b36947a4751caa3b6bda7506db722e13b69227d
commit 4b36947a4751caa3b6bda7506db722e13b69227d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 11 19:39:34 1993 +0000
Formerly m68k/Makefile.~8~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 637bca3..188102d 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -48,7 +48,7 @@ define compile-command.S
$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \
| sed 's/(@@@Hash-Here@@@)/#/g' > $@s
$(AS) $(ASFLAGS) $@s -o $@
--rm -f $@
+-rm -f $@s
endef
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53df7cde345ac13e20a353fb455246d25d791010
commit 53df7cde345ac13e20a353fb455246d25d791010
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 11 00:34:05 1993 +0000
Formerly m68k/Makefile.~7~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 8867443..637bca3 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,11 +1,55 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
# This uses MIT assembler syntax. We have no convenient
# way to choose a sysdep file based on MIT vs Motorola syntax.
# No existing m68k ports use Motorola syntax.
crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
-
+
# Disgusting magic to get `#'s into the asm code.
+
+# Set `as-pipe-ok' if piping input to the assembler is likely to work.
+ifneq (,$(filter -pipe,$(compile.c) $(compile.S)))
+# The `-pipe' switch the compiler does it, so it must work.
+as-pipe-ok = yes
+endif
+ifdef gnu-as
+# GNU as can deal with input pipes.
+as-pipe-ok = yes
+endif
+
+ifdef as-pipe-ok
+
define compile-command.S
-$(CC) $(CPPFLAGS) -E $< \
+$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \
| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
endef
+
+else
+
+define compile-command.S
+@-rm -f $@s
+$(CC) $(CPPFLAGS) $(asm-CPPFLAGS) -E $< \
+| sed 's/(@@@Hash-Here@@@)/#/g' > $@s
+$(AS) $(ASFLAGS) $@s -o $@
+-rm -f $@
+endef
+
+endif
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=35683656e691069a3f0ece015cee509454d5320f
commit 35683656e691069a3f0ece015cee509454d5320f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 8 01:18:40 1993 +0000
Formerly unix/bsd/hp/m68k/__brk.S.~5~
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index 6de00b1..fed4f80 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,11 +37,8 @@ ENTRY (__brk)
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
-0: movel POUND(SYS_brk), d0
- trap POUND(0)
- bcs 1f
+0: DO_CALL (brk, 1)
movel sp@(4), ___curbrk
clrl d0
rts
-1:
- jmp syscall_error
+error: jmp syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bccfaf677d5156cf30b4ade85818ce46e9d74828
commit bccfaf677d5156cf30b4ade85818ce46e9d74828
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 8 01:08:51 1993 +0000
Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~3~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index d67a089..e045e01 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -34,31 +34,27 @@ Cambridge, MA 02139, USA. */
_/**/name/**/:
#endif
-/* NewsOS 4 wants a stack frame around syscalls. */
-
-#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
+ DO_CALL (syscall_name, args)
+
+#ifdef __STDC__
+#define DO_CALL(syscall_name, args) \
linkw fp, POUND(0); \
movel POUND(SYS_##syscall_name), d0; \
trap POUND(0); \
- bcs error; \
- unlk fp
-
+ unlk fp; \
+ bcs error
#else
-#define PSEUDO(name, syscall_name, args) \
- .even; \
- .globl syscall_error; \
- error: jmp syscall_error; \
- ENTRY (name) \
+#define DO_CALL(syscall_name, args) \
linkw fp, POUND(0); \
movel POUND(SYS_/**/syscall_name), d0; \
trap POUND(0); \
- bcs error; \
- unlk fp
+ unlk fp; \
+ bcs error
#endif
#define ret rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5b98146522a245a9c12a1c39ba54c4d20011ee7
commit a5b98146522a245a9c12a1c39ba54c4d20011ee7
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 8 01:07:28 1993 +0000
Formerly unix/bsd/hp/m68k/sysdep.h.~25~
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index c5bee6a..a18ca0c 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,21 +34,20 @@ Cambridge, MA 02139, USA. */
_/**/name/**/:
#endif
-#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
+ DO_CALL (syscall_name, args)
+
+#ifdef __STDC__
+#define DO_CALL(syscall_name, args) \
movel POUND(SYS_##syscall_name), d0; \
trap POUND(0); \
bcs error
#else
-#define PSEUDO(name, syscall_name, args) \
- .even; \
- .globl syscall_error; \
- error: jmp syscall_error; \
- ENTRY (name) \
+#define DO_CALL(syscall_name, args) \
movel POUND(SYS_/**/syscall_name), d0; \
trap POUND(0); \
bcs error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ac74824f4a4044e33c4ab9658391ee281b065d0
commit 0ac74824f4a4044e33c4ab9658391ee281b065d0
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 3 20:58:07 1993 +0000
entered into RCS
diff --git a/sysdeps/m68k/bytesex.h b/sysdeps/m68k/bytesex.h
new file mode 100644
index 0000000..6f98529
--- /dev/null
+++ b/sysdeps/m68k/bytesex.h
@@ -0,0 +1,3 @@
+/* m68k is big-endian. */
+
+#define __BYTE_ORDER __BIG_ENDIAN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebdce729548d93fe9091e3b5a028e735c5cfa5a6
commit ebdce729548d93fe9091e3b5a028e735c5cfa5a6
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 26 19:14:11 1993 +0000
Formerly unix/sysv/sco3.2.4/Makefile.~2~
diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile
index 3c68c72..61479b3 100644
--- a/sysdeps/unix/sysv/sco3.2.4/Makefile
+++ b/sysdeps/unix/sysv/sco3.2.4/Makefile
@@ -1,3 +1,3 @@
ifeq (posix,$(subdir))
-sysdep_routines := $(sysdep_routines) sco_pgrp.c
+sysdep_routines := $(sysdep_routines) sco_pgrp
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f195e5009ae20adfc73a46ab1a88dd66fca8421
commit 3f195e5009ae20adfc73a46ab1a88dd66fca8421
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 24 21:28:29 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~5~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index 07d852f..8e83c60 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1 +1,2 @@
sysconfig.h
+sysconfig.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81e622106b9e117e88beffc7a3a84f4669d2e020
commit 81e622106b9e117e88beffc7a3a84f4669d2e020
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 21 18:26:08 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/Dist b/sysdeps/unix/sysv/sco3.2.4/Dist
new file mode 100644
index 0000000..9702380
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/Dist
@@ -0,0 +1 @@
+sco_setpgrp.S
diff --git a/sysdeps/unix/sysv/sco3.2.4/Makefile b/sysdeps/unix/sysv/sco3.2.4/Makefile
new file mode 100644
index 0000000..3c68c72
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/Makefile
@@ -0,0 +1,3 @@
+ifeq (posix,$(subdir))
+sysdep_routines := $(sysdep_routines) sco_pgrp.c
+endif
diff --git a/sysdeps/unix/sysv/sco3.2.4/getpgid.c b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
new file mode 100644
index 0000000..32aa93c
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/getpgid.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Get the process group ID of process PID. */
+int
+DEFUN(__getpgrp, (pid), pid_t pid)
+{
+ return __sco_setpgrp (0, pid);
+}
diff --git a/sysdeps/unix/sysv/sco3.2.4/setpgid.c b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
new file mode 100644
index 0000000..f3e5091
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/setpgid.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+
+/* Set the process group ID of the process matching PID to PGID.
+ If PID is zero, the current process's process group ID is set.
+ If PGID is zero, the process ID of the process is used. */
+int
+DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
+{
+ return __sco_setpgrp (1, pid, pgid);
+}
diff --git a/sysdeps/unix/sysv/sco3.2.4/setsid.c b/sysdeps/unix/sysv/sco3.2.4/setsid.c
new file mode 100644
index 0000000..4486482
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/setsid.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+
+
+/* Create a new session with the calling process as its leader.
+ The process group IDs of the session and the calling process
+ are set to the process ID of the calling process, which is returned. */
+int
+DEFUN_VOID(__setsid)
+{
+ return __sco_setpgrp (3);
+}
diff --git a/sysdeps/unix/sysv/sco3.2.4/syscall.h b/sysdeps/unix/sysv/sco3.2.4/syscall.h
new file mode 100644
index 0000000..900a0a6
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/syscall.h
@@ -0,0 +1,104 @@
+/* From Scott Bartram. */
+
+#ifndef _SYSCALL_H
+#define _SYSCALL_H
+
+#define SYS_access 33
+#define SYS_acct 51
+#define SYS_advfs 70
+#define SYS_alarm 27
+#define SYS_break 17
+#define SYS_brk 17
+#define SYS_chdir 12
+#define SYS_chmod 15
+#define SYS_chown 16
+#define SYS_chroot 61
+#define SYS_chsize 0x0a28
+#define SYS_close 6
+#define SYS_creat 8
+#define SYS_dup 41
+#define SYS_exec 11
+#define SYS_exece 59
+#define SYS_exit 1
+#define SYS_fcntl 62
+#define SYS_fork 2
+#define SYS_fpathconf 0x2f28
+#define SYS_fstat 28
+#define SYS_fstatfs 38
+#define SYS_ftime 0x0b28
+#define SYS_getdents 81
+#define SYS_getgid 47
+#define SYS_getgroups 0x2b28
+#define SYS_getmsg 85
+#define SYS_getpid 20
+#define SYS_getuid 24
+#define SYS_gtty 32
+#define SYS_ioctl 54
+#define SYS_kill 37
+#define SYS_link 9
+#define SYS_lock 45
+#define SYS_lseek 19
+#define SYS_lstat 91
+#define SYS_mkdir 80
+#define SYS_mknod 14
+#define SYS_mount 21
+#define SYS_msgsys 49
+#define SYS_nap 0x0c28
+#define SYS_nice 34
+#define SYS_open 5
+#define SYS_pathconf 0x2e28
+#define SYS_pause 29
+#define SYS_pipe 42
+#define SYS_plock 45
+#define SYS_poll 87
+#define SYS_prof 44
+#define SYS_ptrace 26
+#define SYS_putmsg 86
+#define SYS_rdebug 76
+#define SYS_read 3
+#define SYS_readlink 92
+#define SYS_rename 0x3028
+#define SYS_rfstart 74
+#define SYS_rfstop 77
+#define SYS_rfsys 78
+#define SYS_rmdir 79
+#define SYS_rmount 72
+#define SYS_rumount 73
+#define SYS_seek 19
+#define SYS_select 0x2428
+#define SYS_semsys 53
+#define SYS_setgid 46
+#define SYS_setgroups 0x2c28
+#define SYS_setpgrp 39
+#define SYS_setuid 23
+#define SYS_shmsys 52
+#define SYS_sigaction 0x2728
+#define SYS_signal 48
+#define SYS_sigpending 0x2928
+#define SYS_sigprocmask 0x2828
+#define SYS_sigsuspend 0x2a28
+#define SYS_stat 18
+#define SYS_statfs 35
+#define SYS_stime 25
+#define SYS_stty 31
+#define SYS_symlink 90
+#define SYS_sync 36
+#define SYS_sys3b 50
+#define SYS_sysacct 51
+#define SYS_sysconf 0x2d28
+#define SYS_sysfs 84
+#define SYS_sysi86 50
+#define SYS_time 13
+#define SYS_times 43
+#define SYS_uadmin 55
+#define SYS_ulimit 63
+#define SYS_umask 60
+#define SYS_umount 22
+#define SYS_unadvfs 71
+#define SYS_unlink 10
+#define SYS_utime 30
+#define SYS_utssys 57
+#define SYS_wait 7
+#define SYS_write 4
+
+#endif
diff --git a/sysdeps/unix/sysv/sysv4/getpgid.c b/sysdeps/unix/sysv/sysv4/getpgid.c
new file mode 100644
index 0000000..f667278
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/getpgid.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+extern int __sco_pgrp __P ((int type, ...));
+
+/* Get the process group ID of process PID. */
+int
+DEFUN(__getpgrp, (pid), pid_t pid)
+{
+ return __sco_pgrp (0, pid);
+}
diff --git a/sysdeps/unix/sysv/sysv4/setpgid.c b/sysdeps/unix/sysv/sysv4/setpgid.c
new file mode 100644
index 0000000..b9266a4
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/setpgid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+
+extern int __sco_pgrp __P ((int type, ...));
+
+/* Set the process group ID of the process matching PID to PGID.
+ If PID is zero, the current process's process group ID is set.
+ If PGID is zero, the process ID of the process is used. */
+int
+DEFUN(__setpgrp, (pid, pgid), int pid AND int pgid)
+{
+ return __sco_pgrp (1, pid, pgid);
+}
diff --git a/sysdeps/unix/sysv/sysv4/setsid.c b/sysdeps/unix/sysv/sysv4/setsid.c
new file mode 100644
index 0000000..4d3c528
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/setsid.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <unistd.h>
+
+extern int __sco_pgrp __P ((int type, ...));
+
+/* Create a new session with the calling process as its leader.
+ The process group IDs of the session and the calling process
+ are set to the process ID of the calling process, which is returned. */
+int
+DEFUN_VOID(__setsid)
+{
+ return __sco_pgrp (3);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5d34291df29ed133f9225b20b1a325b434f6e44
commit d5d34291df29ed133f9225b20b1a325b434f6e44
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 21 18:24:40 1993 +0000
Formerly unix/sysv/sco3.2.4/__waitpid.S.~2~
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
index 73e0888..be6c19b 100644
--- a/sysdeps/unix/sysv/sco3.2.4/waitpid.S
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -18,5 +18,17 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (waitpid, 3)
- ret
+ENTRY (__waitpid)
+ /* The `waitpid' system call is distinguished from plain
+ `wait' by setting lots of bits in the processor flags. */
+ pushfl /* Push the flags word. */
+ popl %eax /* Pop it into the accumulator. */
+ orl $0x8c4, %eax /* Set lots of bits. */
+ pushl $eax /* Push the new flags word. */
+ popfl /* Pop it into the flags. */
+ DO_CALL (wait, 2)
+ movl 4(%esp), scratch /* Put status pointer in scratch register. */
+ testl scratch, scratch /* Is it non-nil? */
+ je null
+ movl r1, (scratch) /* Yes; store the status there. */
+null: ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8bcf7d3b4fc3c2514275e366c8d55ce1a7c3c59
commit d8bcf7d3b4fc3c2514275e366c8d55ce1a7c3c59
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 21 17:49:19 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index 9a9a13e..a5812c7 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -36,8 +36,8 @@ ENTRY (__sigvec)
pushl 16(%esp) /* Push third arg: our third arg. */
pushl 16(%esp) /* Push second arg: our second arg. */
pushl 16(%esp) /* Push first arg: our first arg. */
- ARGS_4 /* Point the syscall at the arguments. */
+ mov %esp, %ecx /* Point the syscall at the arguments. */
+ addl $16, %esp /* Pop those four args. */
DO_CALL (sigvec, 4) /* Do the system call. */
- addl %esp, $16 /* Pop those four args. */
jb syscall_error /* Check for error. */
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c80584a6444a14d016871df962872cef0e7ac17a
commit c80584a6444a14d016871df962872cef0e7ac17a
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 20 22:03:08 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h
index 350300e..b3eaa54 100644
--- a/sysdeps/unix/sysv/sco3.2.4/direct.h
+++ b/sysdeps/unix/sysv/sco3.2.4/direct.h
@@ -9,5 +9,14 @@ struct direct
short int d_pad;
long int d_off;
unsigned short int d_reclen;
- char d_name[1];
+ char d_name[1]; /* Actually longer. */
};
+
+#include <stddef.h>
+
+/* We calculate the length of the name by taking the length of the whole
+ `struct direct' record, subtracting the size of everything before the
+ name, and subtracting one for the terminating null. */
+
+#define D_NAMLEN(d) \
+ ((d)->d_reclen - offsetof (struct direct, d_name) - 1)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=28537b7ecb2a6eba4bedd2b89f18b2b9de166cb8
commit 28537b7ecb2a6eba4bedd2b89f18b2b9de166cb8
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu May 20 18:02:31 1993 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~4~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index f23793c..07d852f 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1,2 +1 @@
-sys_getdents.S
-bsddir.h
+sysconfig.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9ad31f91ba23d12b3cb9459e0d77ffecc922ec27
commit 9ad31f91ba23d12b3cb9459e0d77ffecc922ec27
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu May 20 18:02:28 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/sysconf.c b/sysdeps/unix/sysv/sysv4/sysconf.c
new file mode 100644
index 0000000..3e4e82c
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sysconf.c
@@ -0,0 +1,179 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cygnus.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <limits.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <time.h>
+#include <sysconfig.h>
+
+extern int EXFUN(__sysconfig, (int));
+
+/* Get the value of the system variable NAME. */
+long int
+DEFUN(__sysconf, (name), int name)
+{
+ switch (name)
+ {
+ default:
+ errno = EINVAL;
+ return -1;
+
+ case _SC_ARG_MAX:
+#ifdef ARG_MAX
+ return ARG_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_CHILD_MAX:
+#ifdef CHILD_MAX
+ return CHILD_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_CLK_TCK:
+ return __sysconfig (_CONFIG_CLK_TCK);
+
+ case _SC_NGROUPS_MAX:
+#ifdef NGROUPS_MAX
+ return NGROUPS_MAX;
+#else
+ return -1;
+#endif
+
+ /* Both of these are looking for _CONFIG_OPEN_FILES. */
+ case _SC_OPEN_MAX:
+ case _SC_STREAM_MAX:
+ return __sysconfig (_CONFIG_OPEN_FILES);
+
+ case _SC_TZNAME_MAX:
+ return __tzname_max ();
+
+ case _SC_JOB_CONTROL:
+#ifdef _POSIX_JOB_CONTROL
+ return 1;
+#else
+ return -1;
+#endif
+ case _SC_SAVED_IDS:
+#ifdef _POSIX_SAVED_IDS
+ return 1;
+#else
+ return -1;
+#endif
+ case _SC_VERSION:
+ return _POSIX_VERSION;
+
+ case _SC_PAGESIZE:
+ return __sysconfig (_CONFIG_PAGESIZE);
+
+ case _SC_BC_BASE_MAX:
+#ifdef BC_BASE_MAX
+ return BC_BASE_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_BC_DIM_MAX:
+#ifdef BC_DIM_MAX
+ return BC_DIM_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_BC_SCALE_MAX:
+#ifdef BC_SCALE_MAX
+ return BC_SCALE_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_BC_STRING_MAX:
+#ifdef BC_STRING_MAX
+ return BC_STRING_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_EQUIV_CLASS_MAX:
+#ifdef EQUIV_CLASS_MAX
+ return EQUIV_CLASS_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_EXPR_NEST_MAX:
+#ifdef EXPR_NEST_MAX
+ return EXPR_NEST_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_LINE_MAX:
+#ifdef LINE_MAX
+ return LINE_MAX;
+#else
+ return -1;
+#endif
+
+ case _SC_RE_DUP_MAX:
+#ifdef RE_DUP_MAX
+ return RE_DUP_MAX;
+#else
+ return -1;
+#endif
+
+
+ case _SC_2_VERSION:
+ /* This is actually supposed to return the version
+ of the 1003.2 utilities on the system {POSIX2_VERSION}. */
+ return _POSIX2_C_VERSION;
+
+ case _SC_2_C_BIND:
+#ifdef _POSIX2_C_BIND
+ return _POSIX2_C_BIND;
+#else
+ return -1;
+#endif
+
+ case _SC_2_C_DEV:
+#ifdef _POSIX2_C_DEV
+ return _POSIX2_C_DEV;
+#else
+ return -1;
+#endif
+
+ case _SC_2_FORT_DEV:
+#ifdef _POSIX2_FORT_DEV
+ return _POSIX2_FORT_DEV;
+#else
+ return -1;
+#endif
+
+ case _SC_2_SW_DEV:
+#ifdef _POSIX2_SW_DEV
+ return _POSIX2_SW_DEV;
+#else
+ return -1;
+#endif
+ }
+}
diff --git a/sysdeps/unix/sysv/sysv4/sysconfig.h b/sysdeps/unix/sysv/sysv4/sysconfig.h
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abf73d69f8e9c01cbdfa7ecd8d8f4d908247c0c4
commit abf73d69f8e9c01cbdfa7ecd8d8f4d908247c0c4
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu May 20 18:02:24 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c
index e69de29..9de35d5 100644
--- a/sysdeps/unix/sysv/sysv4/getdtsz.c
+++ b/sysdeps/unix/sysv/sysv4/getdtsz.c
@@ -0,0 +1,2 @@
+/* Solaris uses sysconf ala POSIX.1. */
+#include <sysdeps/posix/__getdtsz.c>
diff --git a/sysdeps/unix/sysv/sysv4/getpagesize.c b/sysdeps/unix/sysv/sysv4/getpagesize.c
new file mode 100644
index 0000000..241348c
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/getpagesize.c
@@ -0,0 +1,2 @@
+/* Solaris uses sysconf ala POSIX.1. */
+#include <sysdeps/posix/__getpgsz.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d97da3aeba0ba5e4b1f5b51723421268d839ed88
commit d97da3aeba0ba5e4b1f5b51723421268d839ed88
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu May 20 18:02:23 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/getdtsz.c b/sysdeps/unix/sysv/sysv4/getdtsz.c
new file mode 100644
index 0000000..e69de29
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=671631d4b1a8be06ff1596194be2d09faf114c23
commit 671631d4b1a8be06ff1596194be2d09faf114c23
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 17 02:08:01 1993 +0000
Formerly unix/bsd/sequent/i386/__sigvec.S.~3~
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index 53aade4..9a9a13e 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -32,14 +32,12 @@ trampoline:
.globl syscall_error
ENTRY (__sigvec)
- /* Put the address of the trampoline in a scratch register. */
- mov $trampoline, scratch
- /* Now exchange this register with the fourth word on the stack,
- where the fourth argument to the system call would go. */
- xchg 16(%esp), scratch
+ pushl $trampoline /* Push fourth arg: trampoline address. */
+ pushl 16(%esp) /* Push third arg: our third arg. */
+ pushl 16(%esp) /* Push second arg: our second arg. */
+ pushl 16(%esp) /* Push first arg: our first arg. */
ARGS_4 /* Point the syscall at the arguments. */
DO_CALL (sigvec, 4) /* Do the system call. */
- /* Exchange again, restoring the stack word. */
- xchg 16(%esp), scratch
+ addl %esp, $16 /* Pop those four args. */
jb syscall_error /* Check for error. */
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11bd41d2a307a82fc4cb96797ebdf0026c8a1d69
commit 11bd41d2a307a82fc4cb96797ebdf0026c8a1d69
Author: Roland McGrath <roland@gnu.org>
Date: Sat May 15 21:57:10 1993 +0000
Formerly unix/bsd/sequent/i386/__sigvec.S.~2~
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
index 03b1c7d..53aade4 100644
--- a/sysdeps/unix/bsd/sequent/i386/sigvec.S
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -28,18 +28,18 @@ trampoline:
call %eax /* Call the handler, address in %eax. */
addl $8, %esp /* Pop signum & code off the stack. */
/* __sigreturn will restore the context, and never return here. */
- jsr C_SYMBOL_NAME (__sigreturn)
+ call C_SYMBOL_NAME (__sigreturn)
.globl syscall_error
ENTRY (__sigvec)
/* Put the address of the trampoline in a scratch register. */
- mov $trampoline, %edx
- /* Now exchange this register with the top of the stack,
- wherein now lies the return PC. */
- xchg 0(%esp), %edx
- mov %esp, %ecx /* Point the syscall at the arguments. */
+ mov $trampoline, scratch
+ /* Now exchange this register with the fourth word on the stack,
+ where the fourth argument to the system call would go. */
+ xchg 16(%esp), scratch
+ ARGS_4 /* Point the syscall at the arguments. */
DO_CALL (sigvec, 4) /* Do the system call. */
- /* Exchange again, restoring the return PC. */
- xchg 0(%esp), %edx
+ /* Exchange again, restoring the stack word. */
+ xchg 16(%esp), scratch
jb syscall_error /* Check for error. */
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65385dc84c3372d5f574050b565f09edec78c055
commit 65385dc84c3372d5f574050b565f09edec78c055
Author: Roland McGrath <roland@gnu.org>
Date: Sat May 15 02:15:14 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c
index 4a9a1e9..afdfaaa 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c
@@ -1,2 +1,4 @@
#define NO_SHLIB
+/* Solaris needs start named `_start', not `start'. */
+#define NO_EXPLICIT_START
#include <sysdeps/unix/sparc/start.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1d2696dae9ec64f6b38bbc7e1ac444cc7ad429f7
commit 1d2696dae9ec64f6b38bbc7e1ac444cc7ad429f7
Author: Brendan Kehoe <brendan@zen.org>
Date: Sat May 15 01:24:13 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
new file mode 100644
index 0000000..d09b6c4
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h
@@ -0,0 +1,4 @@
+/* Solaris 2 does not precede the asm names of C symbols with a `_'. */
+#define NO_UNDERSCORES
+
+#include <sysdeps/unix/sparc/sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd1a0ae4da2ba2bd1ec3c406fb42d2445574f1be
commit fd1a0ae4da2ba2bd1ec3c406fb42d2445574f1be
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 13 01:27:59 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/utimes.S b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
new file mode 100644
index 0000000..16baf44
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/utimes.S
@@ -0,0 +1,2 @@
+/* Solaris has the BSD `utimes' function. */
+#include <sysdeps/unix/bsd/__utimes.S>
diff --git a/sysdeps/unix/sysv/sysv4/utsnamelen.h b/sysdeps/unix/sysv/sysv4/utsnamelen.h
new file mode 100644
index 0000000..9dcc618
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/utsnamelen.h
@@ -0,0 +1 @@
+#define _UTSNAME_LENGTH 257
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6064be1268325aead7bb00a027e3a7c60e284669
commit 6064be1268325aead7bb00a027e3a7c60e284669
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 13 01:24:22 1993 +0000
Formerly unix/sysv/sysv4/solaris2/Makefile.~2~
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
index 539c725..4332fb4 100644
--- a/sysdeps/unix/sysv/sysv4/solaris2/Makefile
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -3,4 +3,4 @@
# along the way (e.g., glue-ctype) will fail because it'll try to link
# with the libc.a being *constructed* in $(objdir). As a work-around,
# we add this to each native-compile.
-native-CFLAGS := -L/lib
+native-CFLAGS := $(native-CFLAGS) -L/lib
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb3674eae93c2adda037148d78904e4572fc1367
commit eb3674eae93c2adda037148d78904e4572fc1367
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 13 01:23:57 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/Makefile b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
new file mode 100644
index 0000000..539c725
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/Makefile
@@ -0,0 +1,6 @@
+# The linker supplied with Solaris looks in the current directory
+# before searching others. Compiling the various programs that come
+# along the way (e.g., glue-ctype) will fail because it'll try to link
+# with the libc.a being *constructed* in $(objdir). As a work-around,
+# we add this to each native-compile.
+native-CFLAGS := -L/lib
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65a0e8f331d9c28b704e44563dcb57abf30cec55
commit 65a0e8f331d9c28b704e44563dcb57abf30cec55
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu May 13 01:20:04 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c
new file mode 100644
index 0000000..4a9a1e9
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/solaris2/sparc/start.c
@@ -0,0 +1,2 @@
+#define NO_SHLIB
+#include <sysdeps/unix/sparc/start.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3df867a734514d7e7577cef323f0b40bb40c96a9
commit 3df867a734514d7e7577cef323f0b40bb40c96a9
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 12 22:57:41 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile
index ac4121d..59d10db 100644
--- a/sysdeps/unix/bsd/sun/sparc/Makefile
+++ b/sysdeps/unix/bsd/sun/sparc/Makefile
@@ -1,3 +1,7 @@
+# Basically `-e start' is magical to the Sun linker. You would think that
+# having start.o first would be enough, but you would be wrong.
+LDFLAGS := $(LDFLAGS) -Xlinker -e -Xlinker start
+
ifeq ($(subdir),signal)
sysdep_routines := $(sysdep_routines) sigtramp
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9f58659c814fedceec91bee1b790b8c8f0c72de
commit e9f58659c814fedceec91bee1b790b8c8f0c72de
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 12 20:42:27 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2.4/pathconf.S b/sysdeps/unix/sysv/sco3.2.4/pathconf.S
new file mode 100644
index 0000000..2c73762
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/pathconf.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pathconf, 2)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a248147b08be2d2e364d0022bbcffced58ba1730
commit a248147b08be2d2e364d0022bbcffced58ba1730
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 12 20:42:26 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/confname.h b/sysdeps/unix/sysv/sco3.2.4/confname.h
new file mode 100644
index 0000000..cfa3e07
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/confname.h
@@ -0,0 +1,49 @@
+/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
+Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Values for the NAME argument to `pathconf' and `fpathconf'. */
+#define _PC_LINK_MAX 0
+#define _PC_MAX_CANON 1
+#define _PC_MAX_INPUT 2
+#define _PC_NAME_MAX 3
+#define _PC_PATH_MAX 4
+#define _PC_PIPE_BUF 5
+#define _PC_CHOWN_RESTRICTED 6
+#define _PC_NO_TRUNC 7
+#define _PC_VDISABLE 8
+
+/* Values for the argument to `sysconf'. */
+#define _SC_ARG_MAX 0
+#define _SC_CHILD_MAX 1
+#define _SC_CLK_TCK 2
+#define _SC_NGROUPS_MAX 3
+#define _SC_OPEN_MAX 4
+#define _SC_JOB_CONTROL 5
+#define _SC_SAVED_IDS 6
+#define _SC_VERSION 7
+#define _SC_PASS_MAX 8
+#define _SC_XOPEN_VERSION 9
+
+#ifdef __USE_POSIX2
+/* Values for the NAME argument to `confstr'. */
+enum
+ {
+ _CS_PATH /* The default search path. */
+ };
+#endif
diff --git a/sysdeps/unix/sysv/sco3.2.4/sysconf.S b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
new file mode 100644
index 0000000..bb78d5d
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sysconf.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (sysconf, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5da337e5ebd64c4cd435005b8a7ee3e79400b2ff
commit 5da337e5ebd64c4cd435005b8a7ee3e79400b2ff
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 7 00:34:46 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
index 5accafd..bb9a7fc 100644
--- a/sysdeps/unix/bsd/sun/sunos4/tcflow.c
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
@@ -19,6 +19,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <errno.h>
#include <termios.h>
+#include <sys/ioctl.h>
/* Suspend or restart transmission on FD. */
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4f65119178303987f78ad0a118a2fc87486b2302
commit 4f65119178303987f78ad0a118a2fc87486b2302
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 6 23:29:21 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index ce14479..1c09d55 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -47,14 +47,14 @@ static CONST speed_t speeds[] =
speed_t
DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
{
- return speeds[termios_p->c_cflag & CBAUD];
+ return termios_p->c_cflag & CBAUD;
}
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
{
- return speeds[(termios_p->c_cflag & CIBAUD) >> IBSHIFT];
+ return (termios_p->c_cflag & CIBAUD) >> IBSHIFT;
}
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
@@ -70,8 +70,12 @@ DEFUN(cfsetospeed, (termios_p, speed),
return -1;
}
+ /* This allows either B1200 or 1200 to work. XXX
+ Do we really want to try to support this, given that
+ fetching the speed must return one or the other? */
+
for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
- if (speeds[i] == speed)
+ if (i == speed || speeds[i] == speed)
{
termios_p->c_cflag &= ~CBAUD;
termios_p->c_cflag |= i;
@@ -95,8 +99,9 @@ DEFUN(cfsetispeed, (termios_p, speed),
return -1;
}
+ /* See comment in cfsetospeed (above). */
for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
- if (speeds[i] == speed)
+ if (i == speed || speeds[i] == speed)
{
termios_p->c_cflag &= ~CIBAUD;
termios_p->c_cflag |= i << IBSHIFT;
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
index b8e9cd9..01ab4d7 100644
--- a/sysdeps/unix/bsd/sun/sunos4/termbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h
@@ -109,6 +109,28 @@ struct termios
#define IBSHIFT 16 /* Bits to shift for input speed. */
#endif
+ /* Input and output baud rates. These are encoded in c_cflag. */
+#define B0 0
+#define B50 1
+#define B75 2
+#define B110 3
+#define B134 4
+#define B150 5
+#define B200 6
+#define B300 7
+#define B600 8
+#define B1200 9
+#define B1800 10
+#define B2400 11
+#define B4800 12
+#define B9600 13
+#define B19200 14
+#define B38400 15
+#ifdef __USE_BSD
+#define EXTA 14
+#define EXTB 15
+#endif
+
/* Local modes. */
tcflag_t c_lflag;
#ifdef __USE_BSD
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ebb6b1f3c2efa3d91d6d4b5446af2153ed16270
commit 7ebb6b1f3c2efa3d91d6d4b5446af2153ed16270
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 6 01:57:58 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sco3.2/Dist b/sysdeps/unix/sysv/sco3.2/Dist
new file mode 100644
index 0000000..60fab2b
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2/Dist
@@ -0,0 +1 @@
+__fltused.c
diff --git a/sysdeps/unix/sysv/sco3.2/Makefile b/sysdeps/unix/sysv/sco3.2/Makefile
new file mode 100644
index 0000000..1be24e8
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2/Makefile
@@ -0,0 +1,23 @@
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq ($(subdir),misc)
+
+sysdep_routines := $(sysdep_routines) __fltused
+
+endif
diff --git a/sysdeps/unix/sysv/sco3.2/__fltused.c b/sysdeps/unix/sysv/sco3.2/__fltused.c
new file mode 100644
index 0000000..5d1d67f
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2/__fltused.c
@@ -0,0 +1,3 @@
+/* Code compiled by the SCO compiler apparently likes this to be defined. */
+
+int __fltused = 1;
diff --git a/sysdeps/unix/sysv/sco3.2/local_lim.h b/sysdeps/unix/sysv/sco3.2/local_lim.h
new file mode 100644
index 0000000..6d6c3b0
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2/local_lim.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _LOCAL_LIM_H
+#define _LOCAL_LIM_H 1
+
+#define NGROUPS_MAX 8 /* Maximum number of supplementary groups. */
+#define ARG_MAX 5120
+#define CHILD_MAX 25
+#define OPEN_MAX 60
+#define LINK_MAX 1000
+#define MAX_CANON 256
+
+/* For SVR3, this is 14. For SVR4, it is 255, at least on ufs
+ file systems, even though the System V limits.h incorrectly
+ defines it as 14. Giving it a value which is too large
+ is harmless (it is a maximum). */
+#define NAME_MAX 255
+
+#define PATH_MAX 1024
+
+#endif /* local_lim.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=978108c543a45a480c1b54b7967095c77f2a1f8a
commit 978108c543a45a480c1b54b7967095c77f2a1f8a
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 6 00:31:00 1993 +0000
entered into RCS
diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies
index 29a36ec..5a31637 100644
--- a/sysdeps/tahoe/Implies
+++ b/sysdeps/tahoe/Implies
@@ -1,2 +1,2 @@
-$(bsdmath)tahoe
+# A Tahoe is mostly just like a Vax.
vax
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigpending.S b/sysdeps/unix/sysv/sco3.2.4/sigpending.S
new file mode 100644
index 0000000..bc05b2e
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sigpending.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (sigpending, 1)
+ ret
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
new file mode 100644
index 0000000..148741e
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sigprocmask.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (sigprocmask, 3)
+ ret
diff --git a/sysdeps/unix/sysv/sysv4/sigsuspend.S b/sysdeps/unix/sysv/sysv4/sigsuspend.S
new file mode 100644
index 0000000..85d3601
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigsuspend.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (sigsuspend, 1)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=378b732265b887dc003b3735105612e04372482f
commit 378b732265b887dc003b3735105612e04372482f
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 5 23:34:53 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/sigaction.S b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
new file mode 100644
index 0000000..dbe41e3
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/sigaction.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (sigaction, 3)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e634f84c4732e5c91c53953e4fecbdc6cc09f30
commit 2e634f84c4732e5c91c53953e4fecbdc6cc09f30
Author: Roland McGrath <roland@gnu.org>
Date: Mon May 3 23:57:05 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sco3.2.4/direct.h b/sysdeps/unix/sysv/sco3.2.4/direct.h
new file mode 100644
index 0000000..350300e
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/direct.h
@@ -0,0 +1,13 @@
+#ifndef MAXNAMLEN
+#define MAXNAMLEN 512
+#endif
+#define DIRBUF 1048 /* minimum buffer size for call to getdents */
+
+struct direct
+ {
+ unsigned short int d_fileno;
+ short int d_pad;
+ long int d_off;
+ unsigned short int d_reclen;
+ char d_name[1];
+ };
diff --git a/sysdeps/unix/sysv/sco3.2.4/waitpid.S b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
new file mode 100644
index 0000000..73e0888
--- /dev/null
+++ b/sysdeps/unix/sysv/sco3.2.4/waitpid.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (waitpid, 3)
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5023f49b301c9cd057c0ab217993c77a90fba1a9
commit 5023f49b301c9cd057c0ab217993c77a90fba1a9
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 23 02:43:30 1993 +0000
Formerly unix/bsd/sony/newsos/m68k/sysdep.h.~2~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
index e4f31ab..d67a089 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -34,6 +34,8 @@ Cambridge, MA 02139, USA. */
_/**/name/**/:
#endif
+/* NewsOS 4 wants a stack frame around syscalls. */
+
#ifdef __STDC__
#define PSEUDO(name, syscall_name, args) \
.even; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c81837fdd16ea7936a6efad8a5dcdb05108979b9
commit c81837fdd16ea7936a6efad8a5dcdb05108979b9
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 23 02:42:59 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
new file mode 100644
index 0000000..e4f31ab
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/sysdep.h
@@ -0,0 +1,65 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* This code wants to be run through m4. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#define POUND(foo) (@@@Hash-Here@@@)foo
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl _##name; \
+ .even; \
+ _##name##:
+#else
+#define ENTRY(name) \
+ .globl _/**/name; \
+ .even; \
+ _/**/name/**/:
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name, args) \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name) \
+ linkw fp, POUND(0); \
+ movel POUND(SYS_##syscall_name), d0; \
+ trap POUND(0); \
+ bcs error; \
+ unlk fp
+
+#else
+#define PSEUDO(name, syscall_name, args) \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name) \
+ linkw fp, POUND(0); \
+ movel POUND(SYS_/**/syscall_name), d0; \
+ trap POUND(0); \
+ bcs error; \
+ unlk fp
+#endif
+
+#define ret rts
+#define r0 d0
+#define r1 d1
+#define MOVE(x,y) movel x , y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1faa98bdde80af9afcd362735f8cc2d70e26f1c6
commit 1faa98bdde80af9afcd362735f8cc2d70e26f1c6
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 23 00:54:09 1993 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~4~
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 6641bdf..f3c1659 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -2,7 +2,7 @@
SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
different from those documented. Go Sun!
-Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,13 +25,13 @@ Cambridge, MA 02139, USA. */
#include <sys/wait.h>
#include <unistd.h>
-extern pid_t EXFUN(__wait4_syscall,
- (pid_t pid, union wait *stat_loc, int options, PTR usage));
+extern pid_t __wait4_syscall __P ((pid_t pid, __WAIT_STATUS stat_loc,
+ int options, struct rusage *usage));
pid_t
DEFUN(__wait4, (pid, stat_loc, options, usage),
- pid_t pid AND union wait *stat_loc AND int options AND
- struct rusage *usage)
+ pid_t pid AND __WAIT_STATUS stat_loc AND
+ int options AND struct rusage *usage)
{
switch (pid)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d1c8a6e7221a8120a572ec51887397fdba441388
commit d1c8a6e7221a8120a572ec51887397fdba441388
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 23 00:50:11 1993 +0000
Formerly unix/bsd/sun/sunos4/speed.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
index 8b2e14f..ce14479 100644
--- a/sysdeps/unix/bsd/sun/sunos4/speed.c
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -70,7 +70,7 @@ DEFUN(cfsetospeed, (termios_p, speed),
return -1;
}
- for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i)
+ for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
if (speeds[i] == speed)
{
termios_p->c_cflag &= ~CBAUD;
@@ -95,7 +95,7 @@ DEFUN(cfsetispeed, (termios_p, speed),
return -1;
}
- for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i)
+ for (i = 0; i < sizeof (speeds) / sizeof (speeds[0]); ++i)
if (speeds[i] == speed)
{
termios_p->c_cflag &= ~CIBAUD;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f63f39a68625449e60dd59c0ba9a123cb474b4a8
commit f63f39a68625449e60dd59c0ba9a123cb474b4a8
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 12 00:49:08 1993 +0000
Formerly alpha/__copysign.c.~2~
diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c
index ad74994..d86521c 100644
--- a/sysdeps/alpha/copysign.c
+++ b/sysdeps/alpha/copysign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <math.h>
-/* Return X with its signed changed to Y's. */
+/* Return X with its sign changed to Y's. */
double
__copysign (double x, double y)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b128f924ec347d3b1f0287957f8b40f03b1dd8f1
commit b128f924ec347d3b1f0287957f8b40f03b1dd8f1
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 9 01:33:44 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sequent/i386/sigvec.S b/sysdeps/unix/bsd/sequent/i386/sigvec.S
new file mode 100644
index 0000000..03b1c7d
--- /dev/null
+++ b/sysdeps/unix/bsd/sequent/i386/sigvec.S
@@ -0,0 +1,45 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* The Dynix `sigvec' system call takes an extra argument,
+ which is the address of the trampoline function. */
+
+.text
+.align 4
+trampoline:
+ cld /* Clear direction flag. */
+ call %eax /* Call the handler, address in %eax. */
+ addl $8, %esp /* Pop signum & code off the stack. */
+ /* __sigreturn will restore the context, and never return here. */
+ jsr C_SYMBOL_NAME (__sigreturn)
+
+.globl syscall_error
+ENTRY (__sigvec)
+ /* Put the address of the trampoline in a scratch register. */
+ mov $trampoline, %edx
+ /* Now exchange this register with the top of the stack,
+ wherein now lies the return PC. */
+ xchg 0(%esp), %edx
+ mov %esp, %ecx /* Point the syscall at the arguments. */
+ DO_CALL (sigvec, 4) /* Do the system call. */
+ /* Exchange again, restoring the return PC. */
+ xchg 0(%esp), %edx
+ jb syscall_error /* Check for error. */
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aa809aac6f07723b3f67b9f44197c34bcc93a165
commit aa809aac6f07723b3f67b9f44197c34bcc93a165
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 9 00:56:41 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
index 7a6aa0e..05fe24c 100644
--- a/sysdeps/unix/bsd/sequent/i386/sysdep.h
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -17,31 +17,21 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <sysdeps/unix/sysdep.h>
+#include <sysdeps/unix/i386/sysdep.h>
/* Get the symbols for system call interrupts. */
#include <machine/trap.h>
-
-#ifdef __STDC__
-#define ENTRY(name) \
- .globl _##name; \
- .align 4; \
- _##name##:
-#else
-#define ENTRY(name) \
- .globl _/**/name; \
- .align 4; \
- _/**/name/**/:
-#endif
/* Use the BSD versions of system calls, by setting the high 16 bits
of the syscall number (see /usr/include/syscall.h). */
-#define SYS_HANDLER SYS_bsd##0000
+#define SYS_HANDLER (SYS_bsd << 16)
/* Dynix uses an interrupt interface to system calls.
"int $T_SVCn" are syscall interfaces for 0-6 arg functions.
(see /usr/include/machine/trap.h). */
+#undef DO_CALL
+
#ifdef __STDC__
#define DO_CALL(syscall_name, args) \
movl $(SYS_HANDLER | SYS_##syscall_name), %eax; \
@@ -52,6 +42,7 @@ Cambridge, MA 02139, USA. */
int $T_SVC/**/args;
#endif
+#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
.text; \
.globl syscall_error; \
@@ -81,7 +72,7 @@ Cambridge, MA 02139, USA. */
/* Dynix reverses %ecx and %edx relative to most i386 Unices. */
-#define r0 %eax /* Normal return-value register. */
+#undef r1
#define r1 %ecx /* Secondary return-value register. */
+#undef scratch
#define scratch %edx /* Call-clobbered register for random use. */
-#define MOVE(x,y) movl x, y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=aac1dda0576bf3e3046d6214bce0098caf778a41
commit aac1dda0576bf3e3046d6214bce0098caf778a41
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 9 00:28:20 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sequent/i386/sysdep.h b/sysdeps/unix/bsd/sequent/i386/sysdep.h
new file mode 100644
index 0000000..7a6aa0e
--- /dev/null
+++ b/sysdeps/unix/bsd/sequent/i386/sysdep.h
@@ -0,0 +1,87 @@
+/* System call interface code for Sequent Symmetry running Dynix version 3.
+Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+/* Get the symbols for system call interrupts. */
+#include <machine/trap.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl _##name; \
+ .align 4; \
+ _##name##:
+#else
+#define ENTRY(name) \
+ .globl _/**/name; \
+ .align 4; \
+ _/**/name/**/:
+#endif
+
+/* Use the BSD versions of system calls, by setting the high 16 bits
+ of the syscall number (see /usr/include/syscall.h). */
+#define SYS_HANDLER SYS_bsd##0000
+
+/* Dynix uses an interrupt interface to system calls.
+ "int $T_SVCn" are syscall interfaces for 0-6 arg functions.
+ (see /usr/include/machine/trap.h). */
+
+#ifdef __STDC__
+#define DO_CALL(syscall_name, args) \
+ movl $(SYS_HANDLER | SYS_##syscall_name), %eax; \
+ int $T_SVC##args;
+#else
+#define DO_CALL(syscall_name, args) \
+ movl $(SYS_HANDLER | SYS_/**/syscall_name), %eax; \
+ int $T_SVC/**/args;
+#endif
+
+#define PSEUDO(name, syscall_name, args) \
+ .text; \
+ .globl syscall_error; \
+ .align 4; \
+ ENTRY (name) \
+ ARGS (args) \
+ DO_CALL (syscall_name, args) \
+ jb syscall_error
+
+/* For one and two-argument calls, Dynix takes the arguments in %ecx and
+ %edx. For 3-6 argument calls, Dynix takes the address of the first
+ argument in %ecx. */
+
+#ifdef __STDC__
+#define ARGS(n) ARGS_##n
+#else
+#define ARGS(n) ARGS_/**/n
+#endif
+
+#define ARGS_0
+#define ARGS_1 movl 4(%esp), %ecx;
+#define ARGS_2 movl 4(%esp), %ecx; movl 8(%esp), %edx;
+#define ARGS_3 leal 4(%esp), %ecx;
+#define ARGS_4 ARGS_3
+#define ARGS_5 ARGS_3
+#define ARGS_6 ARGS_3
+
+/* Dynix reverses %ecx and %edx relative to most i386 Unices. */
+
+#define r0 %eax /* Normal return-value register. */
+#define r1 %ecx /* Secondary return-value register. */
+#define scratch %edx /* Call-clobbered register for random use. */
+#define MOVE(x,y) movl x, y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9cb71d9f2dfbed18526a995e7265764c7e200689
commit 9cb71d9f2dfbed18526a995e7265764c7e200689
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 2 21:07:57 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflush.c b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
new file mode 100644
index 0000000..d76fc07
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflush.c
@@ -0,0 +1,29 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+/* Flush pending data on FD. */
+int
+DEFUN(tcflush, (fd, queue_selector), int fd AND int queue_selector)
+{
+ return __ioctl (fd, TCFLSH, queue_selector);
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
new file mode 100644
index 0000000..dce1b02
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/tcgetattr.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <stddef.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+/* Put the state of FD into *TERMIOS_P. */
+int
+DEFUN(__tcgetattr, (fd, termios_p),
+ int fd AND struct termios *termios_p)
+{
+ return __ioctl (fd, TCGETS, termios_p);
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
new file mode 100644
index 0000000..7a6d5cc
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsendbrk.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+#include <sys/termio.h> /* Sun header file. */
+
+/* Send zero bits on FD. */
+int
+DEFUN(tcsendbreak, (fd, duration), int fd AND int duration)
+{
+ /* According to SunOS 4.1's termios(4), you can't specify a duration. */
+ return __ioctl (fd, TCSBRK, 0);
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
new file mode 100644
index 0000000..4ae139a
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/tcsetattr.c
@@ -0,0 +1,49 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <stddef.h>
+#include <termios.h>
+#include <sys/ioctl.h>
+
+/* Set the state of FD to *TERMIOS_P. */
+int
+DEFUN(tcsetattr, (fd, optional_actions, termios_p),
+ int fd AND int optional_actions AND CONST struct termios *termios_p)
+{
+ int cmd;
+
+ switch (optional_actions)
+ {
+ case TCSANOW:
+ cmd = TCSETS;
+ break;
+ case TCSADRAIN:
+ cmd = TCSETSW;
+ break;
+ case TCSAFLUSH:
+ cmd = TCSETSF;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+
+ return __ioctl (fd, cmd, termios_p);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b936a44bd7434d34fb230e46805a53667c004a7a
commit b936a44bd7434d34fb230e46805a53667c004a7a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 2 21:07:39 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/tcflow.c b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
new file mode 100644
index 0000000..5accafd
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/tcflow.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <termios.h>
+
+/* Suspend or restart transmission on FD. */
+int
+DEFUN(tcflow, (fd, action), int fd AND int action)
+{
+ return __ioctl (fd, TCXONC, action);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0ef42503e5502c758fc532b5a8b08fd782687778
commit 0ef42503e5502c758fc532b5a8b08fd782687778
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 30 00:27:08 1993 +0000
Formerly unix/bsd/sun/sunos4/termbits.h.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
index e50f6cb..b8e9cd9 100644
--- a/sysdeps/unix/bsd/sun/sunos4/termbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h
@@ -103,8 +103,10 @@ struct termios
#define CLOCAL 0x00000800 /* Ignore modem status lines. */
#ifdef __USE_BSD
#define LOBLK 0x00001000
-#define CIBAUD 0x000f0000
#define CRTSCTS 0x80000000
+#define CIBAUD 0x000f0000 /* Mask for input speed from c_cflag. */
+#define CBAUD 0x0000000f /* Mask for output speed from c_cflag. */
+#define IBSHIFT 16 /* Bits to shift for input speed. */
#endif
/* Local modes. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=024b39914f39ed80f62f357fce18d377c1400d7f
commit 024b39914f39ed80f62f357fce18d377c1400d7f
Author: Roland McGrath <roland@gnu.org>
Date: Tue Mar 30 00:27:03 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/speed.c b/sysdeps/unix/bsd/sun/sunos4/speed.c
new file mode 100644
index 0000000..8b2e14f
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/speed.c
@@ -0,0 +1,108 @@
+/* `struct termios' speed frobnication functions. SunOS 4 version.
+Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <stddef.h>
+#include <errno.h>
+#include <termios.h>
+
+static CONST speed_t speeds[] =
+ {
+ 0,
+ 50,
+ 75,
+ 110,
+ 134,
+ 150,
+ 200,
+ 300,
+ 600,
+ 1200,
+ 1800,
+ 2400,
+ 4800,
+ 9600,
+ 19200,
+ 38400,
+ };
+
+
+/* Return the output baud rate stored in *TERMIOS_P. */
+speed_t
+DEFUN(cfgetospeed, (termios_p), CONST struct termios *termios_p)
+{
+ return speeds[termios_p->c_cflag & CBAUD];
+}
+
+/* Return the input baud rate stored in *TERMIOS_P. */
+speed_t
+DEFUN(cfgetispeed, (termios_p), CONST struct termios *termios_p)
+{
+ return speeds[(termios_p->c_cflag & CIBAUD) >> IBSHIFT];
+}
+
+/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
+int
+DEFUN(cfsetospeed, (termios_p, speed),
+ struct termios *termios_p AND speed_t speed)
+{
+ register unsigned int i;
+
+ if (termios_p == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i)
+ if (speeds[i] == speed)
+ {
+ termios_p->c_cflag &= ~CBAUD;
+ termios_p->c_cflag |= i;
+ return 0;
+ }
+
+ errno = EINVAL;
+ return -1;
+}
+
+/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
+int
+DEFUN(cfsetispeed, (termios_p, speed),
+ struct termios *termios_p AND speed_t speed)
+{
+ register unsigned int i;
+
+ if (termios_p == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ for (i = 0; i < sizeof (speeds) / sizeof (speed[0]); ++i)
+ if (speeds[i] == speed)
+ {
+ termios_p->c_cflag &= ~CIBAUD;
+ termios_p->c_cflag |= i << IBSHIFT;
+ return 0;
+ }
+
+ errno = EINVAL;
+ return -1;
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/termbits.h b/sysdeps/unix/bsd/sun/sunos4/termbits.h
new file mode 100644
index 0000000..e50f6cb
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/termbits.h
@@ -0,0 +1,187 @@
+/* termios type and macro definitions. SunOS 4 version.
+Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Type of terminal control flag masks. */
+typedef unsigned long int tcflag_t;
+
+/* Type of control characters. */
+typedef unsigned char cc_t;
+
+/* Type of baud rate specifiers. */
+typedef unsigned int speed_t;
+
+/* Terminal control structure. */
+struct termios
+{
+ /* Input modes. */
+ tcflag_t c_iflag;
+#define IGNBRK 0x0001 /* Ignore break condition. */
+#define BRKINT 0x0002 /* Signal interrupt on break. */
+#define IGNPAR 0x0004 /* Ignore characters with parity errors. */
+#define PARMRK 0x0008 /* Mark parity and framing errors. */
+#define INPCK 0x0010 /* Enable input parity check. */
+#define ISTRIP 0x0020 /* Strip 8th bit off characters. */
+#define INLCR 0x0040 /* Map NL to CR on input. */
+#define IGNCR 0x0080 /* Ignore CR. */
+#define ICRNL 0x0100 /* Map CR to NL on input. */
+#ifdef __USE_BSD
+#define IUCLC 0x0200 /* Map upper case to lower case on input. */
+#endif
+#define IXON 0x0400 /* Enable start/stop output control. */
+#define IXOFF 0x1000 /* Enable start/stop input control. */
+#ifdef __USE_BSD
+#define IXANY 0x0800 /* Any character will restart after stop. */
+#define IMAXBEL 0x2000 /* Ring bell when input queue is full. */
+#endif
+
+ /* Output modes. */
+ tcflag_t c_oflag;
+#define OPOST 0x0001 /* Perform output processing. */
+#ifdef __USE_BSD
+#define OLCUC 0x00000002 /* Map lower case to upper case on output. */
+#define ONLCR 0x00000004 /* Map NL to CR-NL on output. */
+#define OCRNL 0x00000008
+#define ONOCR 0x00000010
+#define ONLRET 0x00000020
+#define OFILL 0x00000040
+#define OFDEL 0x00000080
+#define NLDLY 0x00000100
+#define NL0 0
+#define NL1 0x00000100
+#define CRDLY 0x00000600
+#define CR0 0
+#define CR1 0x00000200
+#define CR2 0x00000400
+#define CR3 0x00000600
+#define TABDLY 0x00001800
+#define TAB0 0
+#define TAB1 0x00000800
+#define TAB2 0x00001000
+#define XTABS 0x00001800
+#define TAB3 XTABS
+#define BSDLY 0x00002000
+#define BS0 0
+#define BS1 0x00002000
+#define VTDLY 0x00004000
+#define VT0 0
+#define VT1 0x00004000
+#define FFDLY 0x00008000
+#define FF0 0
+#define FF1 0x00008000
+#define PAGEOUT 0x00010000
+#define WRAP 0x00020000
+#endif
+
+ /* Control modes. */
+ tcflag_t c_cflag;
+#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
+#define CS5 0 /* 5 bits per byte. */
+#define CS6 0x00000010 /* 6 bits per byte. */
+#define CS7 0x00000020 /* 7 bits per byte. */
+#define CS8 0x00000030 /* 8 bits per byte. */
+#define CSTOPB 0x00000040 /* Two stop bits instead of one. */
+#define CREAD 0x00000080 /* Enable receiver. */
+#define PARENB 0x00000100 /* Parity enable. */
+#define PARODD 0x00000200 /* Odd parity instead of even. */
+#define HUPCL 0x00000400 /* Hang up on last close. */
+#define CLOCAL 0x00000800 /* Ignore modem status lines. */
+#ifdef __USE_BSD
+#define LOBLK 0x00001000
+#define CIBAUD 0x000f0000
+#define CRTSCTS 0x80000000
+#endif
+
+ /* Local modes. */
+ tcflag_t c_lflag;
+#ifdef __USE_BSD
+#define ECHOKE 0x00000800 /* Visual erase for KILL. */
+#endif
+#define ECHOE 0x00000010 /* Visual erase for ERASE. */
+#define ECHOK 0x00000020 /* Echo NL after KILL. */
+#define ECHO 0x00000008 /* Enable echo. */
+#define ECHONL 0x00000040 /* Echo NL even if ECHO is off. */
+#ifdef __USE_BSD
+#define ECHOPRT 0x00000400 /* Hardcopy visual erase. */
+#define ECHOCTL 0x00000200 /* Echo control characters as ^X. */
+#endif
+#define ISIG 0x00000001 /* Enable signals. */
+#define ICANON 0x00000002 /* Do erase and kill processing. */
+#define IEXTEN 0x00008000 /* Enable DISCARD and LNEXT. */
+#define TOSTOP 0x00000100 /* Send SIGTTOU for background output. */
+#ifdef __USE_BSD
+#define PENDIN 0x00004000 /* Retype pending input (state). */
+#endif
+#define NOFLSH 0x00000080 /* Disable flush after interrupt. */
+
+ char c_line; /* Line discipline (?) */
+
+ /* Control characters. */
+#define VEOF 4 /* End-of-file character [ICANON]. */
+#define VEOL 5 /* End-of-line character [ICANON]. */
+#ifdef __USE_BSD
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTCH 7 /* ??? */
+#endif
+#define VERASE 2 /* Erase character [ICANON]. */
+#ifdef __USE_BSD
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#endif
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#ifdef __USE_BSD
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#endif
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+#ifdef __USE_BSD
+#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
+#endif
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#ifdef __USE_BSD
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#endif
+#define VMIN VEOF /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME VEOL /* Time-out value (tenths of a second) [!ICANON]. */
+#define NCCS 17
+ cc_t c_cc[NCCS];
+};
+
+#define _IOT_termios /* Hurd ioctl type field. */ \
+ _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
+
+/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */
+#define TCSANOW 0 /* Change immediately. */
+#define TCSADRAIN 1 /* Change when pending output is written. */
+#define TCSAFLUSH 2 /* Flush pending input before changing. */
+#ifdef __USE_BSD
+#define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */
+#endif
+
+/* Values for the QUEUE_SELECTOR argument to `tcflush'. */
+#define TCIFLUSH 0 /* Discard data received but not yet read. */
+#define TCOFLUSH 1 /* Discard data written but not yet sent. */
+#define TCIOFLUSH 2 /* Discard all pending data. */
+
+/* Values for the ACTION argument to `tcflow'. */
+#define TCOOFF 0 /* Suspend output. */
+#define TCOON 1 /* Restart suspended output. */
+#define TCIOFF 2 /* Send a STOP character. */
+#define TCION 3 /* Send a START character. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5cc7ff46d76c3c5674259cebff1d1d9e2f2d8f45
commit 5cc7ff46d76c3c5674259cebff1d1d9e2f2d8f45
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 26 21:39:42 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/m68k/Dist b/sysdeps/unix/bsd/sun/m68k/Dist
new file mode 100644
index 0000000..cd893ff
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/Dist
@@ -0,0 +1 @@
+sigtramp.c
diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile
index 2f0cd2e..ac4121d 100644
--- a/sysdeps/unix/bsd/sun/m68k/Makefile
+++ b/sysdeps/unix/bsd/sun/m68k/Makefile
@@ -1 +1,3 @@
-include $(+sysdep_dir)/unix/bsd/hp9k3bsd/Makefile
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sigtramp
+endif
diff --git a/sysdeps/unix/bsd/sun/m68k/sigcontext.h b/sysdeps/unix/bsd/sun/m68k/sigcontext.h
new file mode 100644
index 0000000..926c44f
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/sigcontext.h
@@ -0,0 +1,26 @@
+/* Structure describing state saved while handling a signal. Sun 3 version.
+Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+struct sigcontext
+ {
+ int sc_onstack;
+ sigset_t sc_mask;
+
+ int sc_sp, sc_pc, sc_ps;
+ };
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
index 7b10a9f..32a2c20 100644
--- a/sysdeps/unix/bsd/sun/m68k/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -73,29 +73,12 @@ static void
DEFUN(trampoline, (sig, code, context, addr),
int sig AND int code AND struct sigcontext *context AND PTR addr)
{
- register int a0 asm("%a0");
- register int a1 asm("%a1");
- register int d0 asm("%d0");
- register int d1 asm("%d1");
-
- int savea[2], saved[2];
-
- double fpsave[16];
- int fsr;
- int savefpu;
+ int save[4];
/* Save the call-clobbered registers. */
- savea[0] = a0;
- savea[1] = a1;
- saved[0] = d0;
- saved[1] = d1;
-
-#if 0
- /* Save the FPU regs if the FPU enable bit is set in the PSR,
- and the signal isn't an FP exception. */
- savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE;
- if (savefpu)
-#endif
+ asm volatile ("movem%.l d0-d1/a0-a1, %0" : : "m" (save[0]));
+
+ /* XXX should save/restore FP regs */
/* Call the user's handler. */
(*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
@@ -103,15 +86,10 @@ DEFUN(trampoline, (sig, code, context, addr),
(sig, code, context, addr);
/* Restore the call-clobbered registers. */
- a0 = savea[0];
- a1 = savea[1];
- d0 = saved[0];
- d1 = saved[1];
-
-#if 0
- if (savefpu)
- ;
-#endif
+ asm volatile ("movem%.l %0, d0-d1/a0-a1" : : "g" (save[0]) :
+ "d0", "d1", "a0", "a1");
+
+ __sigreturn (context);
}
#endif
diff --git a/sysdeps/unix/bsd/sun/sigreturn.S b/sysdeps/unix/bsd/sun/sigreturn.S
new file mode 100644
index 0000000..9a3b5e6
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sigreturn.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_sigreturn
+#define SYS_sigreturn 139
+#endif
+
+SYSCALL__ (sigreturn, 1)
+ /* Does not return. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6e1bdbcff12ed24150748d47594e4102da8909a8
commit 6e1bdbcff12ed24150748d47594e4102da8909a8
Author: Roland McGrath <roland@gnu.org>
Date: Fri Mar 26 21:04:06 1993 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/m68k/sigtramp.c b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
new file mode 100644
index 0000000..7b10a9f
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/sigtramp.c
@@ -0,0 +1,164 @@
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+/* Get the definition of `struct sigcontext'. */
+#define KERNEL
+#define sigvec sun_sigvec
+#define sigstack sun_sigstack
+#define sigcontext sun_sigcontext
+#include "/usr/include/sys/signal.h"
+#undef sigvec
+#undef sigstack
+#undef sigcontext
+#undef NSIG
+#undef SIGABRT
+#undef SIGCLD
+#undef SV_ONSTACK
+#undef SV_RESETHAND
+#undef SV_INTERRUPT
+#undef SA_ONSTACK
+#undef SA_NOCLDSTOP
+#undef SIG_ERR
+#undef SIG_DFL
+#undef SIG_IGN
+#undef sigmask
+#undef SIG_BLOCK
+#undef SIG_UNBLOCK
+#undef SIG_SETMASK
+
+#include <signal.h>
+#include <stddef.h>
+#include <errno.h>
+
+/* Defined in __sigvec.S. */
+extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec));
+
+/* User-specified signal handlers. */
+#define mytramp 1
+#ifdef mytramp
+static __sighandler_t handlers[NSIG];
+#else
+#define handlers _sigfunc
+extern __sighandler_t _sigfunc[];
+#endif
+
+#if mytramp
+
+/* Handler for all signals that are handled by a user-specified function.
+ Saves and restores the general regs %g2-%g7, the %y register, and
+ all the FPU regs (including %fsr), around calling the user's handler. */
+static void
+DEFUN(trampoline, (sig, code, context, addr),
+ int sig AND int code AND struct sigcontext *context AND PTR addr)
+{
+ register int a0 asm("%a0");
+ register int a1 asm("%a1");
+ register int d0 asm("%d0");
+ register int d1 asm("%d1");
+
+ int savea[2], saved[2];
+
+ double fpsave[16];
+ int fsr;
+ int savefpu;
+
+ /* Save the call-clobbered registers. */
+ savea[0] = a0;
+ savea[1] = a1;
+ saved[0] = d0;
+ saved[1] = d1;
+
+#if 0
+ /* Save the FPU regs if the FPU enable bit is set in the PSR,
+ and the signal isn't an FP exception. */
+ savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE;
+ if (savefpu)
+#endif
+
+ /* Call the user's handler. */
+ (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
+ PTR addr))) handlers[sig]))
+ (sig, code, context, addr);
+
+ /* Restore the call-clobbered registers. */
+ a0 = savea[0];
+ a1 = savea[1];
+ d0 = saved[0];
+ d1 = saved[1];
+
+#if 0
+ if (savefpu)
+ ;
+#endif
+}
+
+#endif
+
+int
+DEFUN(__sigvec, (sig, vec, ovec),
+ int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+{
+#ifndef mytramp
+ extern void _sigtramp (int);
+#define trampoline _sigtramp
+#endif
+ struct sigvec myvec;
+ int mask;
+ __sighandler_t ohandler;
+
+ if (sig <= 0 || sig >= NSIG)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ mask = __sigblock(sigmask(sig));
+
+ ohandler = handlers[sig];
+
+ if (vec != NULL &&
+ vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL)
+ {
+ handlers[sig] = vec->sv_handler;
+ myvec = *vec;
+ myvec.sv_handler = trampoline;
+ vec = &myvec;
+ }
+
+ if (__raw_sigvec(sig, vec, ovec) < 0)
+ {
+ int save = errno;
+ (void) __sigsetmask(mask);
+ errno = save;
+ return -1;
+ }
+
+ if (ovec != NULL && ovec->sv_handler == trampoline)
+ ovec->sv_handler = ohandler;
+
+ (void) __sigsetmask(mask);
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2a96c1028262d8d5ddd4421ad862f3deba1a31d9
commit 2a96c1028262d8d5ddd4421ad862f3deba1a31d9
Author: Roland McGrath <roland@gnu.org>
Date: Thu Mar 25 20:17:39 1993 +0000
Formerly m68k/Makefile.~6~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 3158e3b..8867443 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -7,5 +7,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
# Disgusting magic to get `#'s into the asm code.
define compile-command.S
$(CC) $(CPPFLAGS) -E $< \
-| sed -e '/^#/d' -e 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
+| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
endef
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d42a69dd8390628766127fc9592b1ef9c5da9ddf
commit d42a69dd8390628766127fc9592b1ef9c5da9ddf
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 17 18:32:04 1993 +0000
Formerly m68k/Makefile.~5~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 8867443..3158e3b 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -7,5 +7,5 @@ crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
# Disgusting magic to get `#'s into the asm code.
define compile-command.S
$(CC) $(CPPFLAGS) -E $< \
-| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
+| sed -e '/^#/d' -e 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
endef
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=009d15de1bd3df19c6ed7f12199d6ba530c1add9
commit 009d15de1bd3df19c6ed7f12199d6ba530c1add9
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 8 22:16:10 1993 +0000
Formerly mips/jmp_buf.h.~4~
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
index c6b10fb..661997f 100644
--- a/sysdeps/mips/jmp_buf.h
+++ b/sysdeps/mips/jmp_buf.h
@@ -1,7 +1,6 @@
/* Define the machine-dependent type `jmp_buf'. Mips version.
-
-Copyright (C) 1992 Free Software Foundation, Inc.
-Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Copyright (C) 1992, 1993 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cygnus.com).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -21,19 +20,19 @@ Cambridge, MA 02139, USA. */
typedef struct
{
/* Program counter. */
- PTR __pc;
+ __ptr_t __pc;
/* Stack pointer. */
- PTR __sp;
+ __ptr_t __sp;
/* Callee-saved registers s0 through s7. */
int __regs[8];
/* The frame pointer. */
- PTR __fp;
+ __ptr_t __fp;
/* The global pointer. */
- PTR __gp;
+ __ptr_t __gp;
/* Floating point status register. */
int __fpc_csr;
@@ -41,3 +40,6 @@ typedef struct
/* Callee-saved floating point registers. */
double __fpregs[6];
} __jmp_buf[1];
+
+/* Offset to the program counter in `jmp_buf'. */
+#define JB_PC 0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bf6e97c48cd4483ed7596cca8590e5d071b17843
commit bf6e97c48cd4483ed7596cca8590e5d071b17843
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 8 20:13:15 1993 +0000
Formerly unix/sysv/sysv4/sigaction.h.~2~
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h
index d2a2364..418e7db 100644
--- a/sysdeps/unix/sysv/sysv4/sigaction.h
+++ b/sysdeps/unix/sysv/sysv4/sigaction.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+/* The proper definitions for SVR4's sigaction.
+Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,12 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* The proper definitions for SVR4's sigaction.
- If the operating system has a `sigaction' system call that correctly
- implements the POSIX.1 behavior, there should be a system-dependent
- version of this file that defines `struct sigaction' and the `SA_*'
- constants appropriately. */
-
/* Structure describing the action to be taken when a signal arrives. */
struct sigaction
{
@@ -39,6 +34,7 @@ struct sigaction
};
/* Bits in `sa_flags'. */
+#ifdef __USE_MISC
#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
@@ -46,6 +42,7 @@ struct sigaction
#define SA_NODEFER 0x10 /* Don't automatically block the signal when
its handler is being executed. */
#define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */
+#endif
#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
/* Values for the HOW argument to `sigprocmask'. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33ff6c90ec648b8b1ce538b77b25b82be3987870
commit 33ff6c90ec648b8b1ce538b77b25b82be3987870
Author: Brendan Kehoe <brendan@zen.org>
Date: Mon Mar 8 19:57:16 1993 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/sigaction.h b/sysdeps/unix/sysv/sysv4/sigaction.h
new file mode 100644
index 0000000..d2a2364
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/sigaction.h
@@ -0,0 +1,54 @@
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The proper definitions for SVR4's sigaction.
+ If the operating system has a `sigaction' system call that correctly
+ implements the POSIX.1 behavior, there should be a system-dependent
+ version of this file that defines `struct sigaction' and the `SA_*'
+ constants appropriately. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+
+ /* Padding. */
+ int sa_resv[2];
+ };
+
+/* Bits in `sa_flags'. */
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESETHAND 0x2 /* Reset to SIG_DFL on entry to handler. */
+#define SA_RESTART 0x4 /* Don't restart syscall on signal return. */
+#define SA_SIGINFO 0x8 /* Provide additional info to the handler. */
+#define SA_NODEFER 0x10 /* Don't automatically block the signal when
+ its handler is being executed. */
+#define SA_NOSCLDWAIT 0x10000 /* Don't create zombie processes. */
+#define SA_NOCLDSTOP 0x20000 /* Don't send SIGCHLD when children stop. */
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9179a09221e7c267c5b80f98d7b121783206a2e
commit d9179a09221e7c267c5b80f98d7b121783206a2e
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 24 23:22:43 1993 +0000
Formerly m68k/Makefile.~4~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 09f3b43..8867443 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -2,10 +2,10 @@
# way to choose a sysdep file based on MIT vs Motorola syntax.
# No existing m68k ports use Motorola syntax.
-crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S.
+crypt := crypt.sun3 # Use crypt/crypt.sun3.S.
# Disgusting magic to get `#'s into the asm code.
-$(objpfx)%.o: %.S
- $(CC) $(CPPFLAGS) -E $< \
- | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
-.S-rule := t
+define compile-command.S
+$(CC) $(CPPFLAGS) -E $< \
+| sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
+endef
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8fdeef183c8568be8901711292b7afed99d6b7a4
commit 8fdeef183c8568be8901711292b7afed99d6b7a4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 24 22:43:49 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/sysv4/Implies b/sysdeps/unix/sysv/sysv4/Implies
new file mode 100644
index 0000000..953822e
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/Implies
@@ -0,0 +1,3 @@
+# The directory unix/common contains things which are common to both BSD
+# and SVR4.
+unix/common
diff --git a/sysdeps/unix/sysv/sysv4/fchdir.S b/sysdeps/unix/sysv/sysv4/fchdir.S
new file mode 100644
index 0000000..ef11d55
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/fchdir.S
@@ -0,0 +1,2 @@
+/* SVR4 uses the BSD 4.4 fchdir(2) syscall. */
+#include <sysdeps/unix/bsd/bsd4.4/fchdir.S>
diff --git a/sysdeps/unix/sysv/sysv4/setegid.S b/sysdeps/unix/sysv/sysv4/setegid.S
new file mode 100644
index 0000000..f8fd763
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/setegid.S
@@ -0,0 +1,2 @@
+/* SVR4 uses the BSD 4.4 setegid() system call. */
+#include <sysdeps/unix/bsd/bsd4.4/setegid.S>
diff --git a/sysdeps/unix/sysv/sysv4/seteuid.S b/sysdeps/unix/sysv/sysv4/seteuid.S
new file mode 100644
index 0000000..4ff1106
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/seteuid.S
@@ -0,0 +1,2 @@
+/* SVR4 uses the BSD 4.4 seteuid() system call. */
+#include <sysdeps/unix/bsd/bsd4.4/seteuid.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=45dba738f969ff6573ed3167af00e3db9c4b1a0a
commit 45dba738f969ff6573ed3167af00e3db9c4b1a0a
Author: Roland McGrath <roland@gnu.org>
Date: Tue Feb 2 00:29:15 1993 +0000
Formerly m68k/fpu/__logb.c.~4~
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
index 3bc3a4e..df3de1c 100644
--- a/sysdeps/m68k/fpu/logb.c
+++ b/sysdeps/m68k/fpu/logb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,15 +25,15 @@ Cambridge, MA 02139, USA. */
double
DEFUN(__logb, (x), double x)
{
- if (__isnan(x))
+ if (__isnan (x))
return x;
- if (__isinf(x))
- return fabs(x);
+ if (__isinf (x))
+ return fabs (x);
if (x == 0.0)
- asm("flog2%.x %0" : "=f" (x) : "0" (x));
+ asm ("flog2%.x %0, %0" : "=f" (x) : "0" (x));
else
- asm("fgetexp%.x %0" : "=f" (x) : "0" (x));
+ asm ("fgetexp%.x %0, %0" : "=f" (x) : "0" (x));
return x;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7c90718e6af53f362f041ff193f07a134c19645
commit b7c90718e6af53f362f041ff193f07a134c19645
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jan 11 23:35:56 1993 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
index 44f7b8a..7b5f3cf 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
@@ -1,2 +1,2 @@
# A news800 is almost exactly like an hp300
-unix/hp/m68k
+unix/bsd/hp/m68k
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e151dccbc3b268c93003f440848704fa3043393
commit 3e151dccbc3b268c93003f440848704fa3043393
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 19:11:17 1992 +0000
Formerly alpha/__math.h.~3~
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index 70a2cbe..5461fca 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -28,7 +28,8 @@ __copysign (double __x, double __y)
extern __inline double
fabs (double __x)
{
- return __copysign (0, __x);
+ __asm ("cpys $f31, %1, %0" : "=f" (__x) : "f" (__x));
+ return __x;
}
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cda6c9cbeb33874017eaf38fc55ec45d2fac181d
commit cda6c9cbeb33874017eaf38fc55ec45d2fac181d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 19:06:14 1992 +0000
Formerly alpha/__math.h.~2~
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
index e9893f5..70a2cbe 100644
--- a/sysdeps/alpha/__math.h
+++ b/sysdeps/alpha/__math.h
@@ -18,11 +18,17 @@ Cambridge, MA 02139, USA. */
#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
-extern __inline
+extern __inline double
__copysign (double __x, double __y)
{
__asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
return __x;
}
+extern __inline double
+fabs (double __x)
+{
+ return __copysign (0, __x);
+}
+
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d207263b8ca8588753bc8e0853342d9772692e70
commit d207263b8ca8588753bc8e0853342d9772692e70
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 19:02:23 1992 +0000
Formerly alpha/memchr.c.~2~
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
index 01a8c3e..3c9477e 100644
--- a/sysdeps/alpha/memchr.c
+++ b/sysdeps/alpha/memchr.c
@@ -44,22 +44,29 @@ memchr (const void *s, int c, size_t n)
for (;;)
{
- int mask;
- asm ("cmpbge %1, %2, %0"
- : "=r" (mask) : "r" (charmask), "r" (*longword_ptr++));
- if (mask)
+ const unsigned long int longword = *longword_ptr++;
+ int ge, le;
+
+ /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */
+ asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
+
+ /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */
+ asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword));
+
+ /* Bytes that are both <= and >= are == to C. */
+ if (ge & le)
{
/* Which of the bytes was the C? */
const char *cp = (const char *) (longword_ptr - 1);
if (cp[0] == c)
- return cp - str;
+ return cp;
if (cp[1] == c)
- return cp - str + 1;
+ return &cp[1];
if (cp[2] == c)
- return cp - str + 2;
- return cp - str + 3;
+ return &cp[2];
+ return &cp[3];
}
}
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fd725b9471dc760ee07325bfe6d15d2894f6df3c
commit fd725b9471dc760ee07325bfe6d15d2894f6df3c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 19:02:14 1992 +0000
Initial revision
diff --git a/sysdeps/alpha/strchr.c b/sysdeps/alpha/strchr.c
new file mode 100644
index 0000000..8cf2024
--- /dev/null
+++ b/sysdeps/alpha/strchr.c
@@ -0,0 +1,85 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <string.h>
+
+/* Return the length of the null-terminated string STR. Scan for
+ the null terminator quickly by testing eight bytes at a time. */
+
+char *
+strchr (const char *str, int c)
+{
+ const char *char_ptr;
+ const unsigned long int *longword_ptr;
+ unsigned long int charmask;
+
+ c = (unsigned char) c;
+
+ /* Handle the first few characters by reading one character at a time.
+ Do this until STR is aligned on a 8-byte border. */
+ for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
+ if (*char_ptr == '\0')
+ return NULL;
+ else if (*char_ptr == c)
+ return char_ptr;
+
+ longword_ptr = (unsigned long int *) char_ptr;
+
+ /* Set up a longword, each of whose bytes is C. */
+ charmask = c | (c << 8);
+ charmask |= charmask << 16;
+ charmask |= charmask << 32;
+
+ for (;;)
+ {
+ const unsigned long int longword = *longword_ptr++;
+ int ge, le, zero;
+
+ /* Set bits in ZERO if bytes in LONGWORD are zero. */
+ asm ("cmpbge $31, %1, %0" : "=r" (zero) : "r" (longword));
+
+ /* Set bits in GE if bytes in CHARMASK are >= bytes in LONGWORD. */
+ asm ("cmpbge %1, %2, %0" : "=r" (ge) : "r" (charmask), "r" (longword));
+
+ /* Set bits in LE if bytes in CHARMASK are <= bytes in LONGWORD. */
+ asm ("cmpbge %2, %1, %0" : "=r" (le) : "r" (charmask), "r" (longword));
+
+ /* Bytes that are both <= and >= are == to C. */
+ if (zero || (ge & le))
+ {
+ /* Which of the bytes was the C? */
+
+ const char *cp = (const char *) (longword_ptr - 1);
+
+ if (cp[0] == c)
+ return cp;
+ if (cp[0] == 0)
+ return NULL;
+ if (cp[1] == c)
+ return &cp[1];
+ if (cp[1] == 0)
+ return NULL;
+ if (cp[2] == c)
+ return &cp[2];
+ if (cp[2] == 0)
+ return NULL;
+ if (cp[3] == c)
+ return &cp[3];
+ return NULL;
+ }
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98f5cde0d5d85388d4c9b6492efebc0619dea394
commit 98f5cde0d5d85388d4c9b6492efebc0619dea394
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 18:54:10 1992 +0000
Formerly alpha/strlen.c.~2~
diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c
index 0c10853..3fd1b25 100644
--- a/sysdeps/alpha/strlen.c
+++ b/sysdeps/alpha/strlen.c
@@ -25,7 +25,6 @@ strlen (const char *str)
{
const char *char_ptr;
const unsigned long int *longword_ptr;
- unsigned long int longword;
/* Handle the first few characters by reading one character at a time.
Do this until STR is aligned on a 8-byte border. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=01305a522cb4915e9d52d2f7193b75ffa442ffd6
commit 01305a522cb4915e9d52d2f7193b75ffa442ffd6
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 18:45:51 1992 +0000
entered into RCS
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index 1bf04df..c90f408 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -44,8 +44,6 @@ register double
volatile void
__longjmp (const jmp_buf env, int val)
{
- register long int retval asm ("$0");
-
/* Restore the integer registers. */
r9 = env[0].__9;
r10 = env[0].__10;
@@ -69,20 +67,30 @@ __longjmp (const jmp_buf env, int val)
/* Set the return PC to that of setjmp's caller. */
retpc = env[0].__pc;
- /* Return VAL (or 1 if VAL is zero) to setjmp's caller. */
- retval = val ?: 1;
-
/* Restore the FP and SP of setjmp's caller. */
fp = env[0].__fp;
sp = env[0].__sp;
- /* We use an asm here rather than a normal C return statement
+ /* Return VAL (or 1 if VAL is zero) to setjmp's caller.
+
+ We use an asm here rather than a normal C return statement
just in case the compiler wanted to do some stack frobnication
in the function epilogue. Since we have already restored
precisely the FP and SP the desired environment needs,
we must avoid the compiler doing anything with the stack. */
+
while (1)
- /* The loop is just to avoid `volatile function does return' warnings.
- The instruction will only be executed once. */
- asm volatile ("ret $31, (%0), 1" : : "r" (retpc));
+ {
+ /* The loop is just to avoid `volatile function does return' warnings.
+ The instruction will only be executed once. */
+
+ register long int retval asm ("$0");
+
+ asm volatile
+ ("cmoveq %1, 1, %0\n\t" /* $0 = val ?: 1; */
+ "ret $31, (%2), 1" /* return $0 */
+ : "=r" (retval)
+ /* The "0" constraint should force VAL into $0. */
+ : "0" (val), "r" (retpc));
+ }
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=14245eb70e2158738f3d8ec4f92d8a42db795de9
commit 14245eb70e2158738f3d8ec4f92d8a42db795de9
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 03:33:01 1992 +0000
entered into RCS
diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies
new file mode 100644
index 0000000..9323409
--- /dev/null
+++ b/sysdeps/alpha/Implies
@@ -0,0 +1,2 @@
+# Alpha uses IEEE 754 floating point.
+ieee754
diff --git a/sysdeps/alpha/bytesex.h b/sysdeps/alpha/bytesex.h
new file mode 100644
index 0000000..e873d21
--- /dev/null
+++ b/sysdeps/alpha/bytesex.h
@@ -0,0 +1,3 @@
+/* Alpha is little-endian. */
+
+#define __BYTE_ORDER __LITTLE_ENDIAN
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
index e239390..9a67a6b 100644
--- a/sysdeps/alpha/setjmp_aux.c
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -16,7 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <setjmp.h>
+/*#include <setjmp.h>*/
+#include "jmp_buf.h"
+#define jmp_buf __jmp_buf
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
@@ -36,7 +38,7 @@ register double
/* Save the current program position in ENV and return 0. */
int
-__setjmp (jmp_buf env)
+__setjmp_aux (jmp_buf env, long int *sp, long int *fp)
{
/* Save the integer registers. */
env[0].__9 = r9;
@@ -46,13 +48,26 @@ __setjmp (jmp_buf env)
env[0].__13 = r13;
env[0].__14 = r14;
+#if 1 /* XXX */
+ /* Save the floating point registers. */
+ env[0].__f2 = f2;
+ env[0].__f3 = f3;
+ env[0].__f4 = f4;
+ env[0].__f5 = f5;
+ env[0].__f6 = f6;
+ env[0].__f7 = f7;
+ env[0].__f8 = f8;
+ env[0].__f9 = f9;
+#endif
+
/* Save the return address of our caller, where longjmp will jump to. */
env[0].__pc = retpc;
- /* We lose if the compiler uses the FP in __setjmp. XXX */
+ /* Save the FP and SP of our caller. The __setjmp entry point
+ simply puts these in the argument register for us to fetch. */
env[0].__fp = fp;
-
env[0].__sp = sp;
+ /* Return to the original caller of __setjmp. */
return 0;
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1608c2cc6dbb781e082b9525dc143b7d1863532f
commit 1608c2cc6dbb781e082b9525dc143b7d1863532f
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 03:28:54 1992 +0000
Initial revision
diff --git a/sysdeps/alpha/Dist b/sysdeps/alpha/Dist
new file mode 100644
index 0000000..ad6ea03
--- /dev/null
+++ b/sysdeps/alpha/Dist
@@ -0,0 +1 @@
+setjmp_aux.c
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
new file mode 100644
index 0000000..7364141
--- /dev/null
+++ b/sysdeps/alpha/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),setjmp)
+sysdep_routines := $(sysdep_routines) setjmp_aux
+endif
diff --git a/sysdeps/alpha/__math.h b/sysdeps/alpha/__math.h
new file mode 100644
index 0000000..e9893f5
--- /dev/null
+++ b/sysdeps/alpha/__math.h
@@ -0,0 +1,28 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#if defined (__GNUC__) && !defined (__NO_MATH_INLINES)
+
+extern __inline
+__copysign (double __x, double __y)
+{
+ __asm ("cpys %1, %2, %0" : "=f" (__x) : "f" (__y), "f" (__x));
+ return __x;
+}
+
+#endif
diff --git a/sysdeps/alpha/copysign.c b/sysdeps/alpha/copysign.c
new file mode 100644
index 0000000..ad74994
--- /dev/null
+++ b/sysdeps/alpha/copysign.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <math.h>
+
+/* Return X with its signed changed to Y's. */
+double
+__copysign (double x, double y)
+{
+ asm ("cpys %1, %2, %0" : "=f" (x) : "f" (y), "f" (x));
+ return x;
+}
diff --git a/sysdeps/alpha/fabs.c b/sysdeps/alpha/fabs.c
new file mode 100644
index 0000000..9362027
--- /dev/null
+++ b/sysdeps/alpha/fabs.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <math.h>
+
+double
+fabs (double x)
+{
+ asm ("cpys $f31, %1, %0" : "=f" (x) : "f" (x));
+ return x;
+}
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c
new file mode 100644
index 0000000..01a8c3e
--- /dev/null
+++ b/sysdeps/alpha/memchr.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <string.h>
+
+/* Search no more than N bytes of S for C. */
+
+void *
+memchr (const void *s, int c, size_t n)
+{
+ const char *char_ptr;
+ const unsigned long int *longword_ptr;
+ unsigned long int charmask;
+
+ c = (unsigned char) c;
+
+ /* Handle the first few characters by reading one character at a time.
+ Do this until STR is aligned on a 8-byte border. */
+ for (char_ptr = s; n > 0 && ((unsigned long int) char_ptr & 7) != 0;
+ --n, ++char_ptr)
+ if (*char_ptr == c)
+ return char_ptr;
+
+ longword_ptr = (unsigned long int *) char_ptr;
+
+ /* Set up a longword, each of whose bytes is C. */
+ charmask = c | (c << 8);
+ charmask |= charmask << 16;
+ charmask |= charmask << 32;
+
+ for (;;)
+ {
+ int mask;
+ asm ("cmpbge %1, %2, %0"
+ : "=r" (mask) : "r" (charmask), "r" (*longword_ptr++));
+ if (mask)
+ {
+ /* Which of the bytes was the C? */
+
+ const char *cp = (const char *) (longword_ptr - 1);
+
+ if (cp[0] == c)
+ return cp - str;
+ if (cp[1] == c)
+ return cp - str + 1;
+ if (cp[2] == c)
+ return cp - str + 2;
+ return cp - str + 3;
+ }
+ }
+}
diff --git a/sysdeps/alpha/setjmp.S b/sysdeps/alpha/setjmp.S
new file mode 100644
index 0000000..a5de80c
--- /dev/null
+++ b/sysdeps/alpha/setjmp.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* The function __setjmp_aux saves all the registers, but it can't
+ reliably access the stack or frame pointers, so we pass them in as
+ extra arguments. */
+ENTRY (__setjmp)
+ lda $27, __setjmp_aux /* Load address to jump to. */
+ bis $15, $15, $17 /* Pass FP as 2nd arg. */
+ bis $30, $30, $18 /* Pass SP as 3nd arg. */
+ jmp $31, ($27), __setjmp_aux /* Call __setjmp_aux. */
diff --git a/sysdeps/alpha/strlen.c b/sysdeps/alpha/strlen.c
new file mode 100644
index 0000000..0c10853
--- /dev/null
+++ b/sysdeps/alpha/strlen.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <string.h>
+
+/* Return the length of the null-terminated string STR. Scan for
+ the null terminator quickly by testing eight bytes at a time. */
+
+size_t
+strlen (const char *str)
+{
+ const char *char_ptr;
+ const unsigned long int *longword_ptr;
+ unsigned long int longword;
+
+ /* Handle the first few characters by reading one character at a time.
+ Do this until STR is aligned on a 8-byte border. */
+ for (char_ptr = str; ((unsigned long int) char_ptr & 7) != 0; ++char_ptr)
+ if (*char_ptr == '\0')
+ return char_ptr - str;
+
+ longword_ptr = (unsigned long int *) char_ptr;
+
+ for (;;)
+ {
+ int mask;
+ asm ("cmpbge %1, %2, %0" : "=r" (mask) : "r" (0), "r" (*longword_ptr++));
+ if (mask)
+ {
+ /* Which of the bytes was the zero? */
+
+ const char *cp = (const char *) (longword_ptr - 1);
+
+ if (cp[0] == 0)
+ return cp - str;
+ if (cp[1] == 0)
+ return cp - str + 1;
+ if (cp[2] == 0)
+ return cp - str + 2;
+ return cp - str + 3;
+ }
+ }
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=12840d1abc95d5ae8a10fcbe0d72ae4ea3d17a5d
commit 12840d1abc95d5ae8a10fcbe0d72ae4ea3d17a5d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 03:01:55 1992 +0000
Formerly alpha/__longjmp.c.~2~
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
index 152df86..1bf04df 100644
--- a/sysdeps/alpha/__longjmp.c
+++ b/sysdeps/alpha/__longjmp.c
@@ -16,17 +16,73 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <setjmp.h>
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
+/*#include <setjmp.h>*/
+#include "jmp_buf.h"
+#define jmp_buf __jmp_buf
+
+register long int
+ r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
+ r13 asm ("$13"), r14 asm ("$14");
+
+register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26");
+
+#if 1 /* XXX */
+register double
+ f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"),
+ f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
+#endif
+
/* Jump to the position specified by ENV, causing the
- setjmp call there to return VAL, or 1 if VAL is 0. */
-__NORETURN
-void
+ setjmp call there to return VAL, or 1 if VAL is 0.
+
+ We declare this function to return an `int';
+ in fact, the value being returned is going to the caller of setjmp. */
+volatile void
__longjmp (const jmp_buf env, int val)
{
-
+ register long int retval asm ("$0");
+
+ /* Restore the integer registers. */
+ r9 = env[0].__9;
+ r10 = env[0].__10;
+ r11 = env[0].__11;
+ r12 = env[0].__12;
+ r13 = env[0].__13;
+ r14 = env[0].__14;
+
+#if 1 /* XXX */
+ /* Restore the floating point registers. */
+ f2 = env[0].__f2;
+ f3 = env[0].__f3;
+ f4 = env[0].__f4;
+ f5 = env[0].__f5;
+ f6 = env[0].__f6;
+ f7 = env[0].__f7;
+ f8 = env[0].__f8;
+ f9 = env[0].__f9;
+#endif
+
+ /* Set the return PC to that of setjmp's caller. */
+ retpc = env[0].__pc;
+
+ /* Return VAL (or 1 if VAL is zero) to setjmp's caller. */
+ retval = val ?: 1;
+
+ /* Restore the FP and SP of setjmp's caller. */
+ fp = env[0].__fp;
+ sp = env[0].__sp;
+
+ /* We use an asm here rather than a normal C return statement
+ just in case the compiler wanted to do some stack frobnication
+ in the function epilogue. Since we have already restored
+ precisely the FP and SP the desired environment needs,
+ we must avoid the compiler doing anything with the stack. */
+ while (1)
+ /* The loop is just to avoid `volatile function does return' warnings.
+ The instruction will only be executed once. */
+ asm volatile ("ret $31, (%0), 1" : : "r" (retpc));
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d94f0508a5197b98bc151cf3fc3e9f8e08e0738d
commit d94f0508a5197b98bc151cf3fc3e9f8e08e0738d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 02:25:48 1992 +0000
Initial revision
diff --git a/sysdeps/alpha/setjmp_aux.c b/sysdeps/alpha/setjmp_aux.c
new file mode 100644
index 0000000..e239390
--- /dev/null
+++ b/sysdeps/alpha/setjmp_aux.c
@@ -0,0 +1,58 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <setjmp.h>
+
+#ifndef __GNUC__
+#error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+register long int
+ r9 asm ("$9"), r10 asm ("$10"), r11 asm ("$11"), r12 asm ("$12"),
+ r13 asm ("$13"), r14 asm ("$14");
+
+register long int *fp asm ("$15"), *sp asm ("$30"), *retpc asm ("$26");
+
+#if 1 /* XXX */
+register double
+ f2 asm ("$f2"), f3 asm ("$f3"), f4 asm ("$f4"), f5 asm ("$f5"),
+ f6 asm ("$f6"), f7 asm ("$f7"), f8 asm ("$f8"), f9 asm ("$f9");
+#endif
+
+/* Save the current program position in ENV and return 0. */
+int
+__setjmp (jmp_buf env)
+{
+ /* Save the integer registers. */
+ env[0].__9 = r9;
+ env[0].__10 = r10;
+ env[0].__11 = r11;
+ env[0].__12 = r12;
+ env[0].__13 = r13;
+ env[0].__14 = r14;
+
+ /* Save the return address of our caller, where longjmp will jump to. */
+ env[0].__pc = retpc;
+
+ /* We lose if the compiler uses the FP in __setjmp. XXX */
+ env[0].__fp = fp;
+
+ env[0].__sp = sp;
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b14d8f912b537108331cf0d094c67dd9fe36d25c
commit b14d8f912b537108331cf0d094c67dd9fe36d25c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 01:55:31 1992 +0000
entered into RCS
diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h
index 98601d9..6e6f6b4 100644
--- a/sysdeps/alpha/jmp_buf.h
+++ b/sysdeps/alpha/jmp_buf.h
@@ -1,7 +1,46 @@
-/* Define the machine-dependent type `jmp_buf'. Alpha version. */
+/* Define the machine-dependent type `jmp_buf'. Alpha version.
+Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
typedef struct
{
- long int __iregs[30];
- double __fregs[31];
+ /* Integer registers:
+ $0 is the return value;
+ $1-$8, $22-$25, $28 are call-used;
+ $9-$14 we save here;
+ $15 is the FP and we save it here;
+ $16-$21 are input arguments (call-used);
+ $26 is the return PC and we save it here;
+ $27 is the procedure value (i.e., the address of __setjmp);
+ $29 is the global pointer, which the caller will reconstruct
+ from the return address restored in $26;
+ $30 is the stack pointer and we save it here;
+ $31 is always zero. */
+ long int __9, __10, __11, __12, __13, __14;
+ long int *__pc, *__fp, *__sp;
+
+#if 1 /* XXX need predefine for TARGET_FPREGS */
+ /* Floating-point registers:
+ $f0 is the floating return value;
+ $f1, $f10-$f15, $f22-$f30 are call-used;
+ $f2-$f9 we save here;
+ $f16-$21 are input args (call-used);
+ $f31 is always zero. */
+ double __f2, __f3, __f4, __f5, __f6, __f7, __f8, __f9;
+#endif /* Have FP regs. */
} __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f16f19551de1bdfe7fb0678d54047420d6182f04
commit f16f19551de1bdfe7fb0678d54047420d6182f04
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 25 00:50:57 1992 +0000
Initial revision
diff --git a/sysdeps/alpha/__longjmp.c b/sysdeps/alpha/__longjmp.c
new file mode 100644
index 0000000..152df86
--- /dev/null
+++ b/sysdeps/alpha/__longjmp.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <setjmp.h>
+
+#ifndef __GNUC__
+#error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+/* Jump to the position specified by ENV, causing the
+ setjmp call there to return VAL, or 1 if VAL is 0. */
+__NORETURN
+void
+__longjmp (const jmp_buf env, int val)
+{
+
+}
diff --git a/sysdeps/alpha/jmp_buf.h b/sysdeps/alpha/jmp_buf.h
new file mode 100644
index 0000000..98601d9
--- /dev/null
+++ b/sysdeps/alpha/jmp_buf.h
@@ -0,0 +1,7 @@
+/* Define the machine-dependent type `jmp_buf'. Alpha version. */
+
+typedef struct
+ {
+ long int __iregs[30];
+ double __fregs[31];
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=873550204408dcae12a0d522aaa18a87e8f4d13c
commit 873550204408dcae12a0d522aaa18a87e8f4d13c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Nov 18 20:26:47 1992 +0000
Formerly m68k/fpu/atan2.c.~6~
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
index ee7741f..e937833 100644
--- a/sysdeps/m68k/fpu/atan2.c
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -21,17 +21,12 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
-static CONST double
-PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */
-PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */
-PI = 3.1415926535897931160E0 ; /*Hex 2^ 1 * 1.921FB54442D18 */
-
double
DEFUN(atan2, (y, x), double y AND double x)
{
static CONST double one = 1.0, zero = 0.0;
double signx, signy;
- double pi;
+ double pi, PIo4, PIo2;
if (__isnan(x))
return x;
@@ -42,6 +37,8 @@ DEFUN(atan2, (y, x), double y AND double x)
signx = __copysign(one, x);
asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0));
+ PIo2 = pi / 2;
+ PIo4 = pi / 4;
if (y == zero)
return signx == one ? y : __copysign(pi, signy);
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e9695d04cca84214693f4be24d39c4ac75b24fc4
commit e9695d04cca84214693f4be24d39c4ac75b24fc4
Author: Roland McGrath <roland@gnu.org>
Date: Mon Nov 16 19:42:16 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/sysv/minix/sigaction.h b/sysdeps/unix/sysv/minix/sigaction.h
new file mode 100644
index 0000000..9395206
--- /dev/null
+++ b/sysdeps/unix/sysv/minix/sigaction.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Signal handler. */
+ __sighandler_t sa_handler;
+
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* Special flags. */
+ int sa_flags;
+ };
+
+/* Bits in `sa_flags'. */
+#ifdef __USE_MISC
+#define SA_ONSTACK 0x1 /* Take signal on signal stack. */
+#define SA_RESETHAND 0x2 /* Reset signal handler when signal caught. */
+#define SA_NODEFER 0x4 /* Don't block signal while catching it. */
+#define SA_RESTART 0x8 /* Don't restart syscall on signal return. */
+#define SA_SIGINFO 0x10 /* Extended signal handling. */
+#define SA_NOCLDWAIT 0x20 /* Don't create zombies. */
+#define SA_COMPAT 0x80 /* Internal flag for old signal catchers. */
+#define SA_DISABLE 0x100 /* Disable alternate signal stack. */
+#endif
+#define SA_NOCLDSTOP 0x40 /* Don't send SIGCHLD when children stop. */
+
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_BLOCK 0 /* Block signals. */
+#define SIG_UNBLOCK 1 /* Unblock signals. */
+#define SIG_SETMASK 2 /* Set the set of blocked signals. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=457c6f9b22c7b5486bd3461098ed2b19efa5edbd
commit 457c6f9b22c7b5486bd3461098ed2b19efa5edbd
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 13 00:23:49 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
index 7619ea5..2100722 100644
--- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
+++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
@@ -43,6 +43,9 @@ Cambridge, MA 02139, USA. */
#define O_APPEND 0x0008 /* Writes append to the file. */
#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */
+/* Sun defines O_NDELAY one way for BSD behavior and another for System V
+ behavior. In the GNU C library, you get the BSD behavior unless you
+ define _USG_SOURCE without also defining _BSD_SOURCE or _GNU_SOURCE. */
#ifdef __USE_BSD
#define O_NDELAY 0x0004
#endif
@@ -69,8 +72,8 @@ Cambridge, MA 02139, USA. */
#define FAPPEND O_APPEND
#define FNONBLOCK O_NONBLOCK
#define FNONBIO O_NONBLOCK
-#define FNDELAY 0x0004
-#define FNBIO 0x1000
+#define FNDELAY 0x0004 /* BSD O_NDELAY. */
+#define FNBIO 0x1000 /* System V O_NDELAY. */
#endif
/* Mask for file access modes. This is system-dependent in case
diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/ultrix4/fcntlbits.h
similarity index 70%
copy from sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
copy to sysdeps/unix/bsd/ultrix4/fcntlbits.h
index 7619ea5..bf8e7b2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
+++ b/sysdeps/unix/bsd/ultrix4/fcntlbits.h
@@ -1,4 +1,4 @@
-/* O_*, F_*, FD_* bit values for SunOS 4.
+/* O_*, F_*, FD_* bit values for Ultrix 4.
Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -32,23 +32,23 @@ Cambridge, MA 02139, USA. */
#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
#define O_EXCL 0x0800 /* Fail if file already exists. */
#define O_TRUNC 0x0400 /* Truncate file to zero length. */
-#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
-#if defined (__USE_BSD) || defined (__USE_SVID)
+#ifdef __USE_MISC
#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
-#define O_FSYNC 0x2000 /* Synchronous writes. */
+#define O_FSYNC 0x8000 /* Synchronous writes. */
#define O_SYNC O_FSYNC
+#define O_BLKINUSE 0x1000 /* Block if "in use". */
+#define O_BLKANDSET 0x3000 /* Block, test and set "in use" flag. */
+#define O_TERMIO 0x40000 /* "termio style program". */
#endif
+#define O_NOCTTY 0x80000 /* Don't assign a controlling terminal. */
/* File status flags for `open' and `fcntl'. */
#define O_APPEND 0x0008 /* Writes append to the file. */
-#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */
+#define O_NONBLOCK 0x20000 /* Non-blocking I/O. */
#ifdef __USE_BSD
#define O_NDELAY 0x0004
#endif
-#if !defined (O_NDELAY) && defined (__USE_SVID)
-#define O_NDELAY 0x1000
-#endif
#ifdef __USE_BSD
/* Bits in the file status flags returned by F_GETFL.
@@ -58,7 +58,7 @@ Cambridge, MA 02139, USA. */
#define FREAD 1
#define FWRITE 2
-/* Traditional Unix names the O_* bits. */
+/* Traditional BSD names the O_* bits. */
#define FASYNC O_ASYNC
#define FCREAT O_CREAT
#define FEXCL O_EXCL
@@ -68,9 +68,13 @@ Cambridge, MA 02139, USA. */
#define FSYNC O_SYNC
#define FAPPEND O_APPEND
#define FNONBLOCK O_NONBLOCK
-#define FNONBIO O_NONBLOCK
-#define FNDELAY 0x0004
-#define FNBIO 0x1000
+#define FNDELAY O_NDELAY
+#define FNBLOCK O_NONBLOCK
+#define FTERMIO O_TERMIO
+#define FNOCTTY O_NOCTTY
+#define FSYNCRON O_FSYNC
+#define FBLKINUSE O_BLKINUSE
+#define FBLKANDSET O_BLKANDSET
#endif
/* Mask for file access modes. This is system-dependent in case
@@ -90,11 +94,9 @@ Cambridge, MA 02139, USA. */
#define F_GETLK 7 /* Get record locking info. */
#define F_SETLK 8 /* Set record locking info (non-blocking). */
#define F_SETLKW 9 /* Set record locking info (blocking). */
-#ifdef __USE_BSD
-#define F_RGETLK 10 /* Get remote record locking info. */
-#define F_RSETLK 11 /* Set remote locking info (non-blocking). */
-#define F_CNVT 12 /* Convert a fhandle to an open fd. */
-#define F_RSETLKW 13 /* Set remote locking info (blocking). */
+#ifdef __USE_MISC
+#define F_SETSYN 10 /* Set synchronous writing. */
+#define F_CLRSYN 10 /* Clear synchronous writing. */
#endif
/* File descriptor flags used with F_GETFD and F_SETFD. */
@@ -111,28 +113,9 @@ struct flock
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_pid; /* Process holding the lock. */
- short int l_xxx; /* Reserved for future use. */
+ __pid_t l_pid; /* Process holding the lock. */
};
-#ifdef __USE_BSD
-/* The structure describing a remote advisory lock. This is the type of the
- third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */
-struct eflock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_pid; /* Process holding the lock. */
- short int l_xxx; /* Reserved for future use. */
- long int l_rpid; /* Remote process ID wanting this lock. */
- long int l_rsys; /* Remote system ID wanting this lock. */
- };
-
-#endif
-
-
/* Values for the `l_type' field of a `struct flock'. */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=223d3c5c22e5c48159d4e14fde60d5d05658f55d
commit 223d3c5c22e5c48159d4e14fde60d5d05658f55d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 13 00:04:25 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
new file mode 100644
index 0000000..7619ea5
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/fcntlbits.h
@@ -0,0 +1,142 @@
+/* O_*, F_*, FD_* bit values for SunOS 4.
+Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _FCNTLBITS_H
+
+#define _FCNTLBITS_H 1
+
+
+/* File access modes for `open' and `fcntl'. */
+#define O_RDONLY 0 /* Open read-only. */
+#define O_WRONLY 1 /* Open write-only. */
+#define O_RDWR 2 /* Open read/write. */
+
+
+/* Bits OR'd into the second argument to open. */
+#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
+#define O_EXCL 0x0800 /* Fail if file already exists. */
+#define O_TRUNC 0x0400 /* Truncate file to zero length. */
+#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
+#if defined (__USE_BSD) || defined (__USE_SVID)
+#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
+#define O_FSYNC 0x2000 /* Synchronous writes. */
+#define O_SYNC O_FSYNC
+#endif
+
+/* File status flags for `open' and `fcntl'. */
+#define O_APPEND 0x0008 /* Writes append to the file. */
+#define O_NONBLOCK 0x4000 /* Non-blocking I/O. */
+
+#ifdef __USE_BSD
+#define O_NDELAY 0x0004
+#endif
+#if !defined (O_NDELAY) && defined (__USE_SVID)
+#define O_NDELAY 0x1000
+#endif
+
+#ifdef __USE_BSD
+/* Bits in the file status flags returned by F_GETFL.
+ These are all the O_* flags, plus FREAD and FWRITE, which are
+ independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
+ given to `open'. */
+#define FREAD 1
+#define FWRITE 2
+
+/* Traditional Unix names the O_* bits. */
+#define FASYNC O_ASYNC
+#define FCREAT O_CREAT
+#define FEXCL O_EXCL
+#define FTRUNC O_TRUNC
+#define FNOCTTY O_NOCTTY
+#define FFSYNC O_FSYNC
+#define FSYNC O_SYNC
+#define FAPPEND O_APPEND
+#define FNONBLOCK O_NONBLOCK
+#define FNONBIO O_NONBLOCK
+#define FNDELAY 0x0004
+#define FNBIO 0x1000
+#endif
+
+/* Mask for file access modes. This is system-dependent in case
+ some system ever wants to define some other flavor of access. */
+#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+#ifdef __USE_BSD
+#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+#endif
+#define F_GETLK 7 /* Get record locking info. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+#ifdef __USE_BSD
+#define F_RGETLK 10 /* Get remote record locking info. */
+#define F_RSETLK 11 /* Set remote locking info (non-blocking). */
+#define F_CNVT 12 /* Convert a fhandle to an open fd. */
+#define F_RSETLKW 13 /* Set remote locking info (blocking). */
+#endif
+
+/* File descriptor flags used with F_GETFD and F_SETFD. */
+#define FD_CLOEXEC 1 /* Close on exec. */
+
+
+#include <gnu/types.h>
+
+/* The structure describing an advisory lock. This is the type of the third
+ argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_pid; /* Process holding the lock. */
+ short int l_xxx; /* Reserved for future use. */
+ };
+
+#ifdef __USE_BSD
+/* The structure describing a remote advisory lock. This is the type of the
+ third arg to `fcntl' for the F_RGETLK, F_RSETLK, and F_RSETLKW requests. */
+struct eflock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ short int l_pid; /* Process holding the lock. */
+ short int l_xxx; /* Reserved for future use. */
+ long int l_rpid; /* Remote process ID wanting this lock. */
+ long int l_rsys; /* Remote system ID wanting this lock. */
+ };
+
+#endif
+
+
+/* Values for the `l_type' field of a `struct flock'. */
+#define F_RDLCK 1 /* Read lock. */
+#define F_WRLCK 2 /* Write lock. */
+#define F_UNLCK 3 /* Remove lock. */
+
+
+#endif /* fcntlbits.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=79ff545696046e4b8c8cd1db9d7b0665067dff6c
commit 79ff545696046e4b8c8cd1db9d7b0665067dff6c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 29 21:29:21 1992 +0000
Formerly mips/setjmp.S.~3~
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index 963a718..507da8d 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -24,4 +24,5 @@ Cambridge, MA 02139, USA. */
ENTRY (__setjmp)
move a1, sp
move a2, $fp
- j ___setjmp_aux
+ j __setjmp_aux
+
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4e6950ea03e53fd6bb12d58374921d18c66ac42
commit e4e6950ea03e53fd6bb12d58374921d18c66ac42
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 28 01:11:18 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
new file mode 100644
index 0000000..c7f681d
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos3/m68k/wait.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/hp/m68k/__wait.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0b033d7ecf235e98424ce39b033678b6827a690
commit c0b033d7ecf235e98424ce39b033678b6827a690
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 16 21:31:28 1992 +0000
Formerly m68k/fpu/atan2.c.~5~
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
index 7860178..ee7741f 100644
--- a/sysdeps/m68k/fpu/atan2.c
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -70,5 +70,5 @@ DEFUN(atan2, (y, x), double y AND double x)
}
#else
-#include <sysdeps/ieee754/atan2.c>
+#include <sysdeps/generic/atan2.c>
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=231d75ca3944b3e07aad3fe0778beef92ffdb731
commit 231d75ca3944b3e07aad3fe0778beef92ffdb731
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 6 19:17:50 1992 +0000
Formerly unix/bsd/sun/m68k/sysdep.h.~15~
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 9b9ace0..d89faab 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* This code wants to be run through m4. */
+/* This code wants to be run through m4; see sysdeps/m68k/Makefile. */
#include <sysdeps/unix/sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=603bee3c228177edbd013ff9c3771c23ed173947
commit 603bee3c228177edbd013ff9c3771c23ed173947
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 6 19:13:50 1992 +0000
Formerly m68k/Makefile.~3~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index 4690591..09f3b43 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -3,3 +3,9 @@
# No existing m68k ports use Motorola syntax.
crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S.
+
+# Disgusting magic to get `#'s into the asm code.
+$(objpfx)%.o: %.S
+ $(CC) $(CPPFLAGS) -E $< \
+ | sed 's/(@@@Hash-Here@@@)/#/g' | $(AS) $(ASFLAGS) -o $@
+.S-rule := t
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b52c9d5a4af33eccaa116a5c266ac05fdfc628a
commit 1b52c9d5a4af33eccaa116a5c266ac05fdfc628a
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 5 23:40:43 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/ultrix4/uname.S b/sysdeps/unix/bsd/ultrix4/uname.S
new file mode 100644
index 0000000..488eeb1
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/uname.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/uname.S>
diff --git a/sysdeps/unix/bsd/ultrix4/utsnamelen.h b/sysdeps/unix/bsd/ultrix4/utsnamelen.h
new file mode 100644
index 0000000..ad4389a
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/utsnamelen.h
@@ -0,0 +1 @@
+#define _UTSNAME_LENGTH 32
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4d42dcc62b873949b02254f6c791fe993817567
commit e4d42dcc62b873949b02254f6c791fe993817567
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 2 23:03:51 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index 7b128a1..8b30f3f 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -30,7 +30,7 @@ SYSCALL (sethostid, 1)
.globl _sethostid
.even
_sethostid:
- movel #ENOSYS, ___errno
+ movel #ENOSYS, _errno
moveq #-1, d0
rts
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index 709fcea..fbafba5 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -31,8 +31,8 @@ SYSCALL (sethostid, 1)
ENTRY (sethostid)
mov ENOSYS, %o0
- sethi %hi(___errno), %g1
- st %o0, [%g1 + %lo(___errno)]
+ sethi %hi(_errno), %g1
+ st %o0, [%g1 + %lo(_errno)]
retl
sub %g0, 1, %o0
diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S
index 6fd8113..14ef77b 100644
--- a/sysdeps/unix/sysv/i386/signal.S
+++ b/sysdeps/unix/sysv/i386/signal.S
@@ -22,10 +22,10 @@ Cambridge, MA 02139, USA. */
with the address of the `__sigreturn' function. */
.globl syscall_error
- .globl ___sigreturn
+ .globl C_SYMBOL_NAME(__sigreturn)
ENTRY (signal)
lea SYS_signal, %eax
- lea ___sigreturn, %edx
- .byte 0x9a, 0, 0, 0, 0, 7, 0
+ lea C_SYMBOL_NAME(__sigreturn), %edx
+ .byte 0x9a, 0, 0, 0, 0, 7, 0 /* lcall $7, $0 -- GAS bug. */
jb syscall_error
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=188c2e4aa97715ed053eb7fd3a9a1216447ea4de
commit 188c2e4aa97715ed053eb7fd3a9a1216447ea4de
Author: Roland McGrath <roland@gnu.org>
Date: Fri Oct 2 22:57:23 1992 +0000
Formerly unix/bsd/vax/sysdep.S.~2~
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
index af18b56..e29a878 100644
--- a/sysdeps/unix/bsd/vax/sysdep.S
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,9 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#ifdef HAVE_GNU_LD
-#define ___errno _errno
-#endif
-
-.globl ___errno
+.globl _errno
.globl syscall_error
syscall_error:
- movl r0, ___errno
+ movl r0, _errno
mnegl $1, r0
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3be55181639653e566109490d2a43ed55ed6b74c
commit 3be55181639653e566109490d2a43ed55ed6b74c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Sep 10 22:54:01 1992 +0000
Formerly unix/bsd/sun/sunos4/utsnamelen.h.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
index f657d04..31473cf 100644
--- a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
+++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
@@ -1 +1 @@
-#include <sysdeps/unix/sysv/utsnamelen.h>
+#define _UTSNAME_LENGTH 9
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47d4c6ae22f65ee16fead612a78fba78b0c9a416
commit 47d4c6ae22f65ee16fead612a78fba78b0c9a416
Author: Roland McGrath <roland@gnu.org>
Date: Mon Aug 10 21:27:25 1992 +0000
Formerly m68k/fpu/__math.h.~14~
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index c79befa..ca95533 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -54,6 +54,7 @@ __inline_mathop2(floor, intrz)
__inline_mathop(sqrt)
__inline_mathop2(__rint, int)
+__inline_mathop2(__expm1, etoxm1)
#ifdef __USE_MISC
__inline_mathop2(rint, int)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=09ecae354fe683ec3f6afc2f07a17a75e61703ec
commit 09ecae354fe683ec3f6afc2f07a17a75e61703ec
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 7 20:54:35 1992 +0000
Formerly m68k/fpu/__math.h.~13~
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index eb212a5..c79befa 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -53,10 +53,10 @@ __inline_mathop2(log, logn)
__inline_mathop2(floor, intrz)
__inline_mathop(sqrt)
-__inline_mathop2(__rint, intr)
+__inline_mathop2(__rint, int)
#ifdef __USE_MISC
-__inline_mathop2(rint, intr)
+__inline_mathop2(rint, int)
__inline_mathop2(expm1, etoxm1)
__inline_mathop2(log1p, lognp1)
__inline_mathop(atanh)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbb6e49cbf84bc99f2dbf128365387412f7d710c
commit fbb6e49cbf84bc99f2dbf128365387412f7d710c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 7 00:27:07 1992 +0000
Formerly m68k/fpu/__math.h.~12~
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index fa3f3bf..eb212a5 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -53,8 +53,10 @@ __inline_mathop2(log, logn)
__inline_mathop2(floor, intrz)
__inline_mathop(sqrt)
+__inline_mathop2(__rint, intr)
+
#ifdef __USE_MISC
-__inline_mathop2(rint, int)
+__inline_mathop2(rint, intr)
__inline_mathop2(expm1, etoxm1)
__inline_mathop2(log1p, lognp1)
__inline_mathop(atanh)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ca58d0af958a9d0f8b1852e838066fb78764a91
commit 4ca58d0af958a9d0f8b1852e838066fb78764a91
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 31 00:23:30 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
index b61d642..4834f2f 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigcontext.h
+++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
@@ -25,7 +25,7 @@ struct sigcontext
#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
int sc_wbcnt; /* Number of outstanding windows. */
- PTR sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
+ __ptr_t sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
};
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c
index 452fdd2..d9ee77b 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/4.4/__wait.c>
+#include <sysdeps/unix/bsd/bsd4.4/__wait.c>
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c
index a7485f5..ecc1113 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait3.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/4.4/__wait3.c>
+#include <sysdeps/unix/bsd/bsd4.4/__wait3.c>
diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
index a483922..47129a8 100644
--- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c
+++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/4.4/__waitpid.c>
+#include <sysdeps/unix/bsd/bsd4.4/__waitpid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cf6436afd970ae73d8464e56e3a287d0239f805c
commit cf6436afd970ae73d8464e56e3a287d0239f805c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 31 00:22:36 1992 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~3~
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 561457e..6641bdf 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -2,7 +2,7 @@
SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
different from those documented. Go Sun!
-Copyright (C) 1991 Free Software Foundation, Inc.
+Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,7 +30,8 @@ extern pid_t EXFUN(__wait4_syscall,
pid_t
DEFUN(__wait4, (pid, stat_loc, options, usage),
- pid_t pid AND union wait *stat_loc AND int options AND PTR usage)
+ pid_t pid AND union wait *stat_loc AND int options AND
+ struct rusage *usage)
{
switch (pid)
{
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=929c9f66003d0829a133ba354047a0967974c93d
commit 929c9f66003d0829a133ba354047a0967974c93d
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jul 28 22:10:16 1992 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/isc2.2/rename.S b/sysdeps/unix/sysv/isc2.2/rename.S
new file mode 100644
index 0000000..a5a8dfe
--- /dev/null
+++ b/sysdeps/unix/sysv/isc2.2/rename.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/rename.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6d1b5d43aa6ab99623fde293622046bd56a1b141
commit 6d1b5d43aa6ab99623fde293622046bd56a1b141
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 29 23:00:00 1992 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__wait4.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
index 1ee7bea..561457e 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait4.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -25,6 +25,9 @@ Cambridge, MA 02139, USA. */
#include <sys/wait.h>
#include <unistd.h>
+extern pid_t EXFUN(__wait4_syscall,
+ (pid_t pid, union wait *stat_loc, int options, PTR usage));
+
pid_t
DEFUN(__wait4, (pid, stat_loc, options, usage),
pid_t pid AND union wait *stat_loc AND int options AND PTR usage)
@@ -40,5 +43,5 @@ DEFUN(__wait4, (pid, stat_loc, options, usage),
break;
}
- return __wait4_syscall (pid, stat_loc, option, usage);
+ return __wait4_syscall (pid, stat_loc, options, usage);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e38d84845407e7983fa7a8c46502c053d919254f
commit e38d84845407e7983fa7a8c46502c053d919254f
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 28 10:57:10 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h
index 807fcb8..96240f0 100644
--- a/sysdeps/m68k/jmp_buf.h
+++ b/sysdeps/m68k/jmp_buf.h
@@ -1,4 +1,4 @@
-/* Define the machine-dependent type `jmp_buf'. Sun 3 version. */
+/* Define the machine-dependent type `jmp_buf'. m68k version. */
typedef struct
{
@@ -6,9 +6,9 @@ typedef struct
long int __dregs[7];
/* There are six 4-byte address registers, plus the FP and SP. */
- PTR __aregs[6];
- PTR __fp;
- PTR __sp;
+ int *__aregs[6];
+ int * __fp;
+ int * __sp;
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* There are eight floating point registers which
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3b4e404462097390f1ed29a54cd6ce7cdf3369b
commit c3b4e404462097390f1ed29a54cd6ce7cdf3369b
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 26 06:45:14 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
new file mode 100644
index 0000000..f657d04
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/utsnamelen.h
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/utsnamelen.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbec155d919ea5b7ab4b6a0ed7c213f991eabc99
commit bbec155d919ea5b7ab4b6a0ed7c213f991eabc99
Author: Roland McGrath <roland@gnu.org>
Date: Tue May 26 06:45:03 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sunos4/uname.S b/sysdeps/unix/bsd/sun/sunos4/uname.S
new file mode 100644
index 0000000..488eeb1
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/uname.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/uname.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4dd8b039447f94c7895c4a24084caeee51259ee8
commit 4dd8b039447f94c7895c4a24084caeee51259ee8
Author: Roland McGrath <roland@gnu.org>
Date: Sun May 24 05:59:13 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h
index 6447c86..3d7a392 100644
--- a/sysdeps/m68k/fpu/switch/68881-sw.h
+++ b/sysdeps/m68k/fpu/switch/68881-sw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@ Cambridge, MA 02139, USA. */
#ifndef _68881_SWITCH_H
#define _68881_SWITCH_H 1
-
+#include <sys/cdefs.h>
/* This is the format of the data at the code label for a function which
wants to switch depending on whether or not a 68881 is present.
@@ -33,9 +33,9 @@ Cambridge, MA 02139, USA. */
struct switch_caller
{
unsigned short int insn; /* The `jsr' or `jmp' instruction. */
- PTR target; /* The target of the instruction. */
- PTR soft; /* The address of the soft function. */
- PTR fpu; /* The address of the 68881 function. */
+ __ptr_t target; /* The target of the instruction. */
+ __ptr_t soft; /* The address of the soft function. */
+ __ptr_t fpu; /* The address of the 68881 function. */
};
/* These are opcodes (values for `insn', above) for `jmp' and `jsr'
@@ -50,20 +50,14 @@ struct switch_caller
extern void EXFUN(__68881_switch, (int __dummy));
-#ifdef __STDC__
-#define __paste(a, b) a ## b
-#else
-#define __paste(a, b) a/**/b
-#endif
-
/* Define FUNCTION as a `struct switch_caller' which will call
`__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not.
#define switching_function(FUNCTION) \
struct switch_caller FUNCTION = \
{ \
- JSR, (PTR) __68881_switch, \
- __paste(__paste(__, FUNCTION), _soft), \
- __paste(__paste(__, FUNCTION), _68881) \
+ JSR, (__ptr_t) __68881_switch, \
+ __CONCAT(__CONCAT(__,FUNCTION),_soft), \
+ __CONCAT(__CONCAT(__,FUNCTION),_68881) \
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=47688c639ec10b5cebd81b5291cb5d262e523058
commit 47688c639ec10b5cebd81b5291cb5d262e523058
Author: Roland McGrath <roland@gnu.org>
Date: Sun May 17 21:05:41 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index f77a0af..d9ec2b1 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -19,7 +19,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <ansidecl.h>
-#include <bstring.h>
+#include <string.h>
#undef ffs
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00c9588688e94ba275115444e229d7809c8fcdf3
commit 00c9588688e94ba275115444e229d7809c8fcdf3
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 14 21:36:45 1992 +0000
Formerly m68k/Makefile.~2~
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
index aaa96c7..4690591 100644
--- a/sysdeps/m68k/Makefile
+++ b/sysdeps/m68k/Makefile
@@ -1,7 +1,5 @@
-# m68k/bsd really means m68k with MIT assembler syntax.
+# This uses MIT assembler syntax. We have no convenient
+# way to choose a sysdep file based on MIT vs Motorola syntax.
+# No existing m68k ports use Motorola syntax.
-ifeq ($(subdir),uf-crypt)
-
-crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S.
-
-endif # uf-crypt
+crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S.
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=87c53c220e4910412b10fea68ab1b08ee5f8ca39
commit 87c53c220e4910412b10fea68ab1b08ee5f8ca39
Author: Roland McGrath <roland@gnu.org>
Date: Thu May 14 21:16:40 1992 +0000
Initial revision
diff --git a/sysdeps/m68k/Makefile b/sysdeps/m68k/Makefile
new file mode 100644
index 0000000..aaa96c7
--- /dev/null
+++ b/sysdeps/m68k/Makefile
@@ -0,0 +1,7 @@
+# m68k/bsd really means m68k with MIT assembler syntax.
+
+ifeq ($(subdir),uf-crypt)
+
+crypt := crypt.sun3 # Use uf-crypt/crypt.sun3.S.
+
+endif # uf-crypt
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7dd3731c2b06c512ccebe79627187860c4f9b7a5
commit 7dd3731c2b06c512ccebe79627187860c4f9b7a5
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 13 05:48:35 1992 +0000
Formerly m68k/fpu/__math.h.~11~
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 8f2ded1..fa3f3bf 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,22 +18,10 @@ Cambridge, MA 02139, USA. */
#ifdef __GNUC__
-/* IGNORE($ */
-#ifdef __STDC__
-/* $) IFANSI($ */
-#define __m81_s(x) #x
-#define __m81_ul(x) __ ## x
-/* $) IGNORE($ */
-#else
-/* $) IFTRAD($ */
-#define __m81_s(x) "x"
-#define __m81_ul(x) __/**/x
-/* $) IGNORE($ */
-#endif
-/* $) */
+#include <sys/cdefs.h>
#ifdef __NO_MATH_INLINES
-#define __m81_u(x) __m81_ul(x)
+#define __m81_u(x) __CONCAT(__,x)
#else
#define __m81_u(x) x
#define __MATH_INLINES 1
@@ -44,7 +32,7 @@ Cambridge, MA 02139, USA. */
__m81_u(func)(double __mathop_x) \
{ \
double __result; \
- __asm("f" __m81_s(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x)); \
+ __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\
return __result; \
}
#define __inline_mathop(op) __inline_mathop2(op, op)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a238abcb880dce8d3f149eedaafedde8894d03a9
commit a238abcb880dce8d3f149eedaafedde8894d03a9
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 13 02:52:32 1992 +0000
entered into RCS
diff --git a/sysdeps/vax/bcmp.s b/sysdeps/vax/bcmp.s
new file mode 100644
index 0000000..d980feb
--- /dev/null
+++ b/sysdeps/vax/bcmp.s
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)bcmp.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/* bcmp(s1, s2, n) */
+
+#include "DEFS.h"
+
+ENTRY(bcmp, 0)
+ movl 4(ap),r1
+ movl 8(ap),r3
+ movl 12(ap),r4
+1:
+ movzwl $65535,r0
+ cmpl r4,r0
+ jleq 2f
+ subl2 r0,r4
+ cmpc3 r0,(r1),(r3)
+ jeql 1b
+ addl2 r4,r0
+ ret
+2:
+ cmpc3 r4,(r1),(r3)
+ ret
diff --git a/sysdeps/vax/bcopy.s b/sysdeps/vax/bcopy.s
new file mode 100644
index 0000000..43bb93d
--- /dev/null
+++ b/sysdeps/vax/bcopy.s
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)bcopy.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/* bcopy(from, to, size) */
+
+#include "DEFS.h"
+
+ENTRY(bcopy, R6)
+ movl 4(ap),r1
+ movl 8(ap),r3
+ movl 12(ap),r6
+ cmpl r1,r3
+ bgtr 2f # normal forward case
+ blss 3f # overlapping, must do backwards
+ ret # equal, nothing to do
+1:
+ subl2 r0,r6
+ movc3 r0,(r1),(r3)
+2:
+ movzwl $65535,r0
+ cmpl r6,r0
+ jgtr 1b
+ movc3 r6,(r1),(r3)
+ ret
+3:
+ addl2 r6,r1
+ addl2 r6,r3
+ movzwl $65535,r0
+ jbr 5f
+4:
+ subl2 r0,r6
+ subl2 r0,r1
+ subl2 r0,r3
+ movc3 r0,(r1),(r3)
+ movzwl $65535,r0
+ subl2 r0,r1
+ subl2 r0,r3
+5:
+ cmpl r6,r0
+ jgtr 4b
+ subl2 r6,r1
+ subl2 r6,r3
+ movc3 r6,(r1),(r3)
+ ret
diff --git a/sysdeps/vax/bzero.s b/sysdeps/vax/bzero.s
new file mode 100644
index 0000000..5f90763
--- /dev/null
+++ b/sysdeps/vax/bzero.s
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)bzero.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/* bzero(base, length) */
+
+#include "DEFS.h"
+
+ENTRY(bzero, 0)
+ movl 4(ap),r3
+ jbr 2f
+1:
+ subl2 r0,8(ap)
+ movc5 $0,(r3),$0,r0,(r3)
+2:
+ movzwl $65535,r0
+ cmpl 8(ap),r0
+ jgtr 1b
+ movc5 $0,(r3),$0,8(ap),(r3)
+ ret
diff --git a/sysdeps/vax/ffs.s b/sysdeps/vax/ffs.s
new file mode 100644
index 0000000..49faffb
--- /dev/null
+++ b/sysdeps/vax/ffs.s
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)ffs.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/* bit = ffs(value) */
+
+#include "DEFS.h"
+
+ENTRY(ffs, 0)
+ ffs $0,$32,4(ap),r0
+ bneq 1f
+ mnegl $1,r0
+1:
+ incl r0
+ ret
diff --git a/sysdeps/vax/index.s b/sysdeps/vax/index.s
new file mode 100644
index 0000000..e599b27
--- /dev/null
+++ b/sysdeps/vax/index.s
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)index.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the first occurence of c in the string cp.
+ * Return pointer to match or null pointer.
+ *
+ * char *
+ * index(cp, c)
+ * char *cp, c;
+ */
+#include "DEFS.h"
+
+ENTRY(index, 0)
+ movq 4(ap),r1 # r1 = cp; r2 = c
+ tstl r2 # check for special case c == '\0'
+ bneq 2f
+1:
+ locc $0,$65535,(r1) # just find end of string
+ beql 1b # still looking
+ movl r1,r0 # found it
+ ret
+2:
+ moval tbl,r3 # r3 = address of table
+ bbss $0,(r3),5f # insure not reentering
+ movab (r3)[r2],r5 # table entry for c
+ incb (r5)
+ movzwl $65535,r4 # fast access
+3:
+ scanc r4,(r1),(r3),$1 # look for c or '\0'
+ beql 3b # still looking
+ movl r1,r0 # return pointer to char
+ tstb (r0) # if have found '\0'
+ bneq 4f
+ clrl r0 # else return 0
+4:
+ clrb (r5) # clean up table
+ clrb (r3)
+ ret
+
+ .data
+tbl: .space 256
+ .text
+
+/*
+ * Reentrant, but slower version of index
+ */
+5:
+ movl r1,r3
+6:
+ locc $0,$65535,(r3) # look for '\0'
+ bneq 7f
+ locc r2,$65535,(r3) # look for c
+ bneq 8f
+ movl r1,r3 # reset pointer and ...
+ jbr 6b # ... try again
+7:
+ subl3 r3,r1,r4 # length of short block
+ incl r4 # +1 for '\0'
+ locc r2,r4,(r3) # look for c
+ bneq 8f
+ ret
+8:
+ movl r1,r0 # return pointer to char
+ ret
diff --git a/sysdeps/vax/memchr.s b/sysdeps/vax/memchr.s
new file mode 100644
index 0000000..c7793fb
--- /dev/null
+++ b/sysdeps/vax/memchr.s
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)memchr.s 5.1 (Berkeley) 5/29/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the first occurence of c in the memory at cp (length n).
+ * Return pointer to match or null pointer.
+ *
+ * This code optimises the usual case (0 < n < 65535).
+ *
+ * void *
+ * memchr(cp, c, n)
+ * char *cp, c;
+ * size_t n;
+ */
+
+#include "DEFS.h"
+
+ENTRY(memchr, 0)
+ movq 4(ap),r1 # r1 = cp; r2 = c
+ movl 12(ap),r0 # r0 = n
+ movzwl $65535,r4 # handy constant
+0:
+ cmpl r0,r4 # check for annoying locc limit
+ bgtru 3f
+
+ /* n <= 65535 */
+ locc r2,r0,(r1) # search n bytes for c
+ beql 2f # done if not found (r0 already 0)
+1: /* found character c at (r1) */
+ movl r1,r0
+2:
+ ret
+
+3: /* n > 65535 */
+ locc r2,r4,(r1) # search 65535 bytes for c
+ beql 1b # done if found
+ decw r0 # from 0 to 65535
+ subl2 r0,r4 # adjust n
+ brb 0b # and loop
diff --git a/sysdeps/vax/memcmp.s b/sysdeps/vax/memcmp.s
new file mode 100644
index 0000000..3854fd8
--- /dev/null
+++ b/sysdeps/vax/memcmp.s
@@ -0,0 +1,61 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)memcmp.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/* int memcmp(s1, s2, n) */
+
+#include "DEFS.h"
+
+ENTRY(memcmp, 0)
+ movl 4(ap),r1 /* r1 = s1 */
+ movq 8(ap),r3 /* r3 = s2; r4 = n */
+ movzwl $65535,r5
+0:
+ cmpl r4,r5
+ jgtru 3f /* handle stupid cmpc3 limitation */
+ cmpc3 r4,(r1),(r3) /* compare */
+ beql 2f /* done if same (r0 = 0) */
+1:
+ movzbl (r1),r0
+ movzbl (r3),r2
+ subl2 r2,r0 /* return *s1 - *s2; s1,s2 unsigned chars */
+2:
+ ret
+3:
+ subl2 r5,r4 /* do 64K; adjust count */
+ cmpc3 r5,(r1),(r3)
+ jeql 0b /* loop if same */
+ jbr 1b
diff --git a/sysdeps/vax/memmove.s b/sysdeps/vax/memmove.s
new file mode 100644
index 0000000..8f897fa
--- /dev/null
+++ b/sysdeps/vax/memmove.s
@@ -0,0 +1,93 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)memmove.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * void *memmove(dst, src, size)
+ * returns dst
+ *
+ * This optimises the usual case (count < 65536) at the expense
+ * of some extra memory references and branches when count >= 65536.
+ */
+
+#include "DEFS.h"
+
+ENTRY(memmove, 0)
+ movzwl $65535,r0 /* r0 = 64K (needed below) */
+ movq 8(ap),r1 /* r1 = src, r2 = length */
+ movl 4(ap),r3 /* r3 = dst */
+ cmpl r1,r3
+ bgtru 1f /* normal forward case */
+ beql 2f /* equal, nothing to do */
+ addl2 r2,r1 /* overlaps iff src<dst but src+len>dst */
+ cmpl r1,r3
+ bgtru 4f /* overlapping, must move backwards */
+ subl2 r2,r1
+
+1: /* move forward */
+ cmpl r2,r0
+ bgtru 3f /* stupid movc3 limitation */
+ movc3 r2,(r1),(r3) /* move it all */
+2:
+ movl 4(ap),r0 /* return original dst */
+ ret
+3:
+ subl2 r0,12(ap) /* adjust length by 64K */
+ movc3 r0,(r1),(r3) /* move 64K */
+ movl 12(ap),r2
+ decw r0 /* from 0 to 65535 */
+ brb 1b /* retry */
+
+4: /* move backward */
+ addl2 r2,r3
+5:
+ cmpl r2,r0
+ bgtru 6f /* stupid movc3 limitation */
+ subl2 r2,r1
+ subl2 r2,r3
+ movc3 r2,(r1),(r3) /* move it all */
+ movl 4(ap),r0 /* return original dst */
+ ret
+6:
+ subl2 r0,12(ap) /* adjust length by 64K */
+ subl2 r0,r1
+ subl2 r0,r3
+ movc3 r0,(r1),(r3) /* move 64K */
+ movl 12(ap),r2
+ decw r0
+ subl2 r0,r1
+ subl2 r0,r3
+ brb 5b
diff --git a/sysdeps/vax/memset.s b/sysdeps/vax/memset.s
new file mode 100644
index 0000000..12b1f74
--- /dev/null
+++ b/sysdeps/vax/memset.s
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)memset.s 5.2 (Berkeley) 5/12/91"
+#endif /* LIBC_SCCS and not lint */
+
+/* void *memset(base, c, length) */
+
+#include "DEFS.h"
+
+ENTRY(memset, 0)
+ movl 4(ap),r3
+1:
+ movzwl $65535,r0
+ movq 8(ap),r1
+ cmpl r2,r0
+ jgtru 2f
+ movc5 $0,(r3),r1,r2,(r3)
+ movl r1,r0
+ ret
+2:
+ subl2 r0,12(ap)
+ movc5 $0,(r3),r1,r0,(r3)
+ jbr 1b
diff --git a/sysdeps/vax/rindex.s b/sysdeps/vax/rindex.s
new file mode 100644
index 0000000..76d7e29
--- /dev/null
+++ b/sysdeps/vax/rindex.s
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)rindex.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the last occurence of c in the string cp.
+ * Return pointer to match or null pointer.
+ *
+ * char *
+ * rindex(cp, c)
+ * char *cp, c;
+ */
+#include "DEFS.h"
+
+ENTRY(rindex, 0)
+ movq 4(ap),r1 # r1 = cp; r2 = c
+ tstl r2 # check for special case c == '\0'
+ bneq 2f
+1:
+ locc $0,$65535,(r1) # just find end of string
+ beql 1b # still looking
+ movl r1,r0 # found it
+ ret
+2:
+ moval tbl,r3 # r3 = address of table
+ bbss $0,(r3),5f # insure not reentering
+ movab (r3)[r2],r5 # table entry for c
+ incb (r5)
+ clrl r4 # last found
+3:
+ scanc $65535,(r1),(r3),$1 # look for c or '\0'
+ beql 3b # keep looking
+ tstb (r1) # if have found '\0'
+ beql 4f # we are done
+ movl r1,r4 # save most recently found
+ incl r1 # skip over character
+ jbr 3b # keep looking
+4:
+ movl r4,r0 # return last found (if any)
+ clrb (r5) # clean up table
+ clrb (r3)
+ ret
+
+ .data
+tbl: .space 256
+ .text
+
+/*
+ * Reentrant, but slower version of rindex
+ */
+5:
+ movl r1,r3
+ clrl r4 # r4 = pointer to last match
+6:
+ locc $0,$65535,(r3) # look for '\0'
+ bneq 8f
+ decw r0 # r0 = 65535
+1:
+ locc r2,r0,(r3) # look for c
+ bneq 7f
+ movl r1,r3 # reset pointer and ...
+ jbr 6b # ... try again
+7:
+ movl r1,r4 # stash pointer ...
+ addl3 $1,r1,r3 # ... skip over match and ...
+ decl r0 # ... decrement count
+ jbr 6b # ... try again
+8:
+ subl3 r3,r1,r0 # length of short block
+ incl r0 # +1 for '\0'
+9:
+ locc r2,r0,(r3) # look for c
+ beql 0f
+ movl r1,r4 # stash pointer ...
+ addl3 $1,r1,r3 # ... skip over match ...
+ decl r0 # ... adjust count and ...
+ jbr 9b # ... try again
+0:
+ movl r4,r0 # return stashed pointer
+ ret
diff --git a/sysdeps/vax/strcat.s b/sysdeps/vax/strcat.s
new file mode 100644
index 0000000..7cf8884
--- /dev/null
+++ b/sysdeps/vax/strcat.s
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strcat.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Concatenate string s2 to the end of s1
+ * and return the base of s1.
+ *
+ * char *
+ * strcat(s1, s2)
+ * char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strcat, R6|R7)
+ movq 4(ap), r6 # r6 = s1; r7 = s2
+ movl r6,r1
+0:
+ locc $0,$65535,(r1) # look for '\0'
+ beql 0b
+ movl r1,r3 # save end of s1
+1:
+ locc $0,$65535,(r7) # find length of s2
+ bneq 2f
+ movc3 $65535,(r7),(r3)# copy full block
+ movl r1,r7
+ jbr 1b
+2:
+ subl2 r7,r1 # calculate length
+ incl r1
+ movc3 r1,(r7),(r3) # copy remainder
+ movl r6,r0
+ ret
diff --git a/sysdeps/vax/strchr.s b/sysdeps/vax/strchr.s
new file mode 100644
index 0000000..18b5383
--- /dev/null
+++ b/sysdeps/vax/strchr.s
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strchr.s 5.4 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the first occurence of c in the string cp.
+ * Return pointer to match or null pointer.
+ *
+ * char *
+ * strchr(cp, c)
+ * char *cp, c;
+ */
+#include "DEFS.h"
+
+ .lcomm tbl,256
+
+ENTRY(strchr, 0)
+ movzwl $65535,r4 /* handy constant */
+ movq 4(ap),r1 /* r1 = cp; r2 = c */
+ movzbl r2,r2
+ beql Lzero /* special case for c == '\0' */
+
+/*
+ * Fancy scanc version. Alas, it is not reentrant.
+ */
+ movab tbl,r3 /* r3 = base of table */
+ bbss $0,(r3),Lreent /* ensure not reentering */
+ movab (r3)[r2],r5
+ incb (r5) /* mark both '\0' and c */
+0:
+ scanc r4,(r1),(r3),$1 /* look for c or '\0' */
+ beql 0b /* still looking */
+ movl r1,r0 /* return whatever we found */
+ tstb (r0)
+ bneq 1f # unless it was '\0':
+ clrl r0 # then return NULL
+1:
+ clrb (r5) /* clean up table */
+ clrb (r3)
+ ret
+
+/*
+ * Special case for \0.
+ */
+Lzero:
+ locc r2,r4,(r1) /* just find end of string */
+ beql Lzero /* still looking */
+ movl r1,r0 /* found it */
+ ret
+
+/*
+ * Slower reentrant version is two two-step searches. The first
+ * phase runs until we know where the string ends; it locates the
+ * first occurrence of c within a 65535-byte block. If we find
+ * the end of the string first, we switch to the second phase,
+ * were we look only up to the known end of string.
+ */
+Lreent:
+0: /* first phase */
+ movl r1,r3
+ locc $0,r4,(r3) /* look for '\0' */
+ bneq 1f
+ locc r2,r4,(r3) /* look for c */
+ beql 0b /* not found: reset pointer and loop */
+ movl r1,r0 /* found: return it */
+ ret
+1: /* second phase */
+ subl3 r3,r1,r0 /* length of short block */
+ locc r2,r0,(r3) /* look for c */
+ beql 2f /* not found: return NULL */
+ movl r1,r0
+2: ret
diff --git a/sysdeps/vax/strcpy.s b/sysdeps/vax/strcpy.s
new file mode 100644
index 0000000..56dbe57
--- /dev/null
+++ b/sysdeps/vax/strcpy.s
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strcpy.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Copy string s2 over top of s1.
+ * Return base of s1.
+ *
+ * char *
+ * strcpy(s1, s2)
+ * char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strcpy, R6)
+ movl 4(ap), r3 # r3 = s1
+ movl 8(ap), r6 # r6 = s2
+1:
+ locc $0,$65535,(r6) # find length of s2
+ bneq 2f
+ movc3 $65535,(r6),(r3)# copy full block
+ movl r1,r6
+ jbr 1b
+2:
+ subl2 r6,r1 # calculate length
+ incl r1
+ movc3 r1,(r6),(r3) # copy remainder
+ movl 4(ap),r0 # return base of s1
+ ret
diff --git a/sysdeps/vax/strcspn.s b/sysdeps/vax/strcspn.s
new file mode 100644
index 0000000..f7b0a99
--- /dev/null
+++ b/sysdeps/vax/strcspn.s
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strcspn.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Span the complement of string s2 (skip characters that are not in s2).
+ * Return the number of characters in s1 that were skipped.
+ *
+ * size_t
+ * strcspn(s1, s2)
+ * const char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strcspn, 0)
+ subl2 $32,sp /* make 256 bit table */
+ movc5 $0,(sp),$0,$32,(sp)
+ movq 4(ap),r1 /* r1 = s1, r2 = s2 */
+
+ /* turn on bit for each character in s2, including '\0' */
+1:
+ movzbl (r2)+,r0
+ bbss r0,(sp),1b
+ bneq 1b
+ movl r1,r0 /* r0 = s (current pos in s1) */
+
+ /* look for a character that is in s2 */
+2:
+ movzbl (r0)+,r2 /* c = *s++ */
+ bbc r2,(sp),2b /* loop until c is in table */
+ decl r0 /* s-- */
+ subl2 r1,r0 /* r0 = s - s1 = count */
+ ret
diff --git a/sysdeps/vax/strlen.s b/sysdeps/vax/strlen.s
new file mode 100644
index 0000000..2b7e0a7
--- /dev/null
+++ b/sysdeps/vax/strlen.s
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strlen.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Return the length of cp (not counting '\0').
+ *
+ * strlen(cp)
+ * char *cp;
+ */
+#include "DEFS.h"
+
+ENTRY(strlen, 0)
+ movl 4(ap),r1
+1:
+ locc $0,$65535,(r1) # look for '\0'
+ beql 1b
+ subl3 4(ap),r1,r0 # len = cp - base
+ ret
diff --git a/sysdeps/vax/strncat.s b/sysdeps/vax/strncat.s
new file mode 100644
index 0000000..bcf29c1
--- /dev/null
+++ b/sysdeps/vax/strncat.s
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strncat.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Concatenate string s2 on the end of s1
+ * and return the base of s1. The parameter
+ * n is the maximum length of string s2 to
+ * concatenate.
+ *
+ * char *
+ * strncat(s1, s2, n)
+ * char *s1, *s2;
+ * int n;
+ */
+#include "DEFS.h"
+
+ENTRY(strncat, R6)
+ movl 12(ap),r6 # r6 = n
+ bleq done # n <= 0
+ movl 4(ap),r3 # r3 = s1
+ movl r3,r1
+0:
+ locc $0,$65535,(r1)
+ beql 0b
+ movl r1,r3 # r3 = index(s1, '\0');
+ movl 8(ap),r1 # r1 = s2
+1:
+ movzwl $65535,r2 # r2 = bytes in first chunk
+ cmpl r6,r2 # r2 = min(bytes in chunk, n);
+ jgeq 2f
+ movl r6,r2
+2:
+ subl2 r2,r6 # update n
+ locc $0,r2,(r1) # '\0' found?
+ jneq 3f
+ subl2 r2,r1 # back up pointer updated by locc
+ movc3 r2,(r1),(r3) # copy in next piece
+ tstl r6 # run out of space?
+ jneq 1b
+ clrb (r3) # force '\0' termination
+ jbr done
+3:
+ subl2 r0,r2 # r2 = number of bytes to move
+ subl2 r2,r1 # back up pointer updated by locc
+ incl r2 # copy '\0' as well
+ movc3 r2,(r1),(r3) # copy in last piece
+done:
+ movl 4(ap),r0 # return s1
+ ret
diff --git a/sysdeps/vax/strncmp.s b/sysdeps/vax/strncmp.s
new file mode 100644
index 0000000..e5bfcf2
--- /dev/null
+++ b/sysdeps/vax/strncmp.s
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strncmp.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Compare at most n characters of string
+ * s1 lexicographically to string s2.
+ * Return:
+ * 0 s1 == s2
+ * > 0 s1 > s2
+ * < 0 s2 < s2
+ *
+ * strncmp(s1, s2, n)
+ * char *s1, *s2;
+ * int n;
+ */
+#include "DEFS.h"
+
+ENTRY(strncmp, 0)
+ movl 4(ap),r1 # r1 = s1
+ movq 8(ap),r3 # r3 = s2; r4 = n
+1:
+ clrl r5 # calculate min bytes to next page boundry
+ subb3 r1,$255,r5 # r5 = (bytes - 1) to end of page for s1
+ subb3 r3,$255,r0 # r0 = (bytes - 1) to end of page for s2
+ cmpb r0,r5 # r5 = min(r0, r5);
+ bgtru 2f
+ movb r0,r5
+2:
+ incl r5 # r5 = min bytes to next page boundry
+ cmpl r4,r5 # r5 = min(n, r5);
+ bgeq 3f
+ movl r4,r5
+3:
+ cmpc3 r5,(r1),(r3) # compare strings
+ bneq 4f
+ subl2 r5,r4 # check for end of comparison
+ beql 5f
+ subl2 r5,r1 # check if found null yet
+ locc $0,r5,(r1)
+ beql 1b # not yet done, continue checking
+ subl2 r0,r3
+ mnegb (r3),r0 # r0 = '\0' - *s2
+ cvtbl r0,r0
+ ret
+4:
+ subl2 r0,r5 # check for null in matching string
+ subl2 r5,r1
+ locc $0,r5,(r1)
+ bneq 5f
+ subb3 (r3),(r1),r0 # r0 = *s1 - *s2
+ cvtbl r0,r0
+ ret
+5:
+ clrl r0 # both the same to null
+ ret
diff --git a/sysdeps/vax/strncpy.s b/sysdeps/vax/strncpy.s
new file mode 100644
index 0000000..03a09b7
--- /dev/null
+++ b/sysdeps/vax/strncpy.s
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strncpy.s 5.6 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Copy string s2 over top of string s1.
+ * Truncate or null-pad to n bytes.
+ *
+ * char *
+ * strncpy(s1, s2, n)
+ * char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strncpy, R6)
+ movl 12(ap),r6 # r6 = n
+ bleq done # n <= 0
+ movl 4(ap),r3 # r3 = s1
+ movl 8(ap),r1 # r1 = s2
+1:
+ movzwl $65535,r2 # r2 = bytes in first chunk
+ cmpl r6,r2 # r2 = min(bytes in chunk, n);
+ jgeq 2f
+ movl r6,r2
+2:
+ subl2 r2,r6 # update n
+ locc $0,r2,(r1) # '\0' found?
+ jneq 3f
+ subl2 r2,r1 # back up pointer updated by locc
+ movc3 r2,(r1),(r3) # copy in next piece
+ tstl r6 # run out of space?
+ jneq 1b
+ jbr done
+3: # copy up to '\0' logic
+ addl2 r0,r6 # r6 = number of null-pad bytes
+ subl2 r0,r2 # r2 = number of bytes to move
+ subl2 r2,r1 # back up pointer updated by locc
+ movc3 r2,(r1),(r3) # copy in last piece
+4: # null-pad logic
+ movzwl $65535,r2 # r2 = bytes in first chunk
+ cmpl r6,r2 # r2 = min(bytes in chunk, n);
+ jgeq 5f
+ movl r6,r2
+5:
+ subl2 r2,r6 # update n
+ movc5 $0,(r3),$0,r2,(r3)# pad with '\0's
+ tstl r6 # finished padding?
+ jneq 4b
+done:
+ movl 4(ap),r0 # return s1
+ ret
diff --git a/sysdeps/vax/strpbrk.s b/sysdeps/vax/strpbrk.s
new file mode 100644
index 0000000..0d1b25e
--- /dev/null
+++ b/sysdeps/vax/strpbrk.s
@@ -0,0 +1,68 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strpbrk.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find in s1 the first occurrence of any character from s2.
+ * If there are none, return NULL.
+ *
+ * char *
+ * strpbrk(s1, s2)
+ * const char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strpbrk, 0)
+ subl2 $32,sp /* make 256 bit table */
+ movc5 $0,(sp),$0,$32,(sp)
+ movq 4(ap),r0 /* r0 = s1, r1 = s2 */
+
+ /* turn on bit for each character in s2, including '\0' */
+1:
+ movzbl (r1)+,r2
+ bbss r2,(sp),1b
+ bneq 1b
+
+ /* look for a character that is in s2 */
+2:
+ movzbl (r0)+,r2 /* c = *s++ */
+ bbc r2,(sp),2b /* loop until c is in table */
+ beql 3f /* if c==0, go return NULL */
+ decl r0 /* s-- */
+ ret
+3:
+ clrl r0
+ ret
diff --git a/sysdeps/vax/strrchr.s b/sysdeps/vax/strrchr.s
new file mode 100644
index 0000000..f292eac
--- /dev/null
+++ b/sysdeps/vax/strrchr.s
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strrchr.s 5.4 (Berkeley) 6/1/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the last occurence of c in the string cp.
+ * Return pointer to match or null pointer.
+ *
+ * char *
+ * strrchr(cp, c)
+ * char *cp, c;
+ */
+#include "DEFS.h"
+
+ .lcomm tbl,256
+
+ENTRY(strrchr, 0)
+ movzwl $65535,r4 /* handy 65535 */
+ movq 4(ap),r1 /* r1 = cp; r2 = c */
+ movzbl r2,r2
+ beql Lzero /* special case for c == '\0' */
+
+ clrl r5 /* r5 = pointer to last match */
+
+/*
+ * Fancy scanc version. Alas, it is not reentrant.
+ */
+ movab tbl,r3 /* r3 = address of table */
+ bbss $0,(r3),Lreent /* ensure not reentering */
+ movab (r3)[r2],r4
+ incb (r4) /* mark both '\0' and c */
+0:
+ scanc $65535,(r1),(r3),$1 /* look for c or '\0' */
+ beql 0b /* keep looking */
+ tstb (r1)
+ beql 1f /* done if '\0' */
+ movab (r1)+,r5 /* save most recently found, and skip over it */
+ jbr 0b /* keep looking */
+1:
+ movl r5,r0 /* return last found (if any) */
+ clrb (r4) /* clean up table */
+ clrb (r3)
+ ret
+
+/*
+ * Special case for \0.
+ */
+Lzero:
+ locc $0,r4,(r1) /* just find end of string */
+ beql Lzero /* still looking */
+ movl r1,r0 /* found it */
+ ret
+
+/*
+ * Slower reentrant version is two two-step searches. The first
+ * phase runs until we know where the string ends; it locates any
+ * occurrences of c within a 65535-byte block. Once we have found
+ * the end of the string, we find any further occurrences before
+ * that location.
+ */
+Lreent:
+0: /* first phase */
+ movl r1,r3
+ locc $0,r4,(r3) /* look for '\0' */
+ bneq 1f
+ locc r2,r4,(r3) /* continue phase 1 search for c */
+ beql 0b
+ movab (r1)+,r5 /* found c: save and increment pointer */
+ brb 0b /* and continue */
+
+1: /* second phase */
+ subl3 r3,r1,r0 /* length of short block */
+ movl r3,r1
+2:
+ locc r2,r0,(r1) /* look for c */
+ beql 3f /* skip if not found */
+ movab (r1)+,r5 /* save pointer as before */
+ sobgtr r0,2b /* adjust count and loop */
+3:
+ movl r5,r0 /* return stashed pointer */
+ ret
diff --git a/sysdeps/vax/strsep.s b/sysdeps/vax/strsep.s
new file mode 100644
index 0000000..9751acc
--- /dev/null
+++ b/sysdeps/vax/strsep.s
@@ -0,0 +1,85 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strsep.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Get next word from string *stringp, where words are
+ * strings separated by characters from delim.
+ *
+ * Writes NULs into the string at *stringp to end tokens.
+ * On return, *stringp points past the last NUL written (if there might
+ * be further tokens), or is NULL (if there are definitely no more tokens).
+ *
+ * If *stringp is NULL, strtoken returns NULL.
+ *
+ * char *
+ * strtoken(stringp, delim)
+ * register char **stringp;
+ * register char const *delim;
+ */
+#include "DEFS.h"
+
+ENTRY(strsep, 0)
+ tstl *4(ap) /* if (*stringp == NULL) */
+ bneq 0f
+ clrl r0 # return (NULL);
+ ret
+
+0:
+ subl2 $32,sp /* make room for 256 bit table */
+ movc5 $0,(sp),$0,$32,(sp)
+ movq 4(ap),r1 /* r1 = stringp, r2 = delim */
+
+ /* turn on bit for each character in s2, including '\0' */
+1:
+ movzbl (r2)+,r0
+ bbss r0,(sp),1b
+ bneq 1b
+
+ movl (r1),r3 /* r3 = s = *stringp */
+ movl r3,r0 /* save return value */
+
+ /* scan for delimiters */
+2:
+ movzbl (r3)+,r2 /* c = *s++ */
+ bbc r2,(sp),2b /* loop until c is in table */
+ beql 3f
+ clrb -1(r3) /* if c!='\0', s[-1] = 0 */
+ movl r3,(r1) /* and *stringp = s */
+ ret
+3:
+ clrl (r1) /* else *stringp = NULL */
+ ret
diff --git a/sysdeps/vax/strspn.s b/sysdeps/vax/strspn.s
new file mode 100644
index 0000000..fc86af7
--- /dev/null
+++ b/sysdeps/vax/strspn.s
@@ -0,0 +1,70 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strspn.s 5.1 (Berkeley) 5/15/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Span the string s2 (skip characters that are in s2).
+ * Return the number of characters in s1 that were skipped.
+ *
+ * size_t
+ * strspn(s1, s2)
+ * const char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strspn, 0)
+ subl2 $32,sp /* make 256 bit table */
+ movc5 $0,(sp),$0,$32,(sp)
+ movq 4(ap),r1 /* r1 = s1, r2 = s2 */
+
+ /* turn on bit for each character in s2, including '\0' */
+1:
+ movzbl (r2)+,r0
+ bbss r0,(sp),1b
+ bneq 1b
+
+ /* now clear bit for '\0' */
+ /* (this is easier than avoiding setting it in the first place) */
+ bicb2 $1,(sp) /* stop at '\0' */
+ movl r1,r0 /* r0 = s (current pos in s1) */
+
+ /* look for a character that is not in s2 */
+2:
+ movzbl (r0)+,r2 /* c = *s++ */
+ bbs r2,(sp),2b /* loop while c is in table */
+ decl r0 /* s-- */
+ subl2 r1,r0 /* r0 = s - s1 = count */
+ ret
diff --git a/sysdeps/vax/strstr.s b/sysdeps/vax/strstr.s
new file mode 100644
index 0000000..2e53375
--- /dev/null
+++ b/sysdeps/vax/strstr.s
@@ -0,0 +1,113 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)strstr.s 5.2 (Berkeley) 8/21/90"
+#endif /* LIBC_SCCS and not lint */
+
+/*
+ * Find the first occurrence of s2 as a substring in s1.
+ * If s2 is empty, return s1.
+ *
+ * char *strstr(s1, s2)
+ * const char *s1, *s2;
+ */
+#include "DEFS.h"
+
+ENTRY(strstr, 0)
+ movq 4(ap),r3 /* r3 = s1, r4 = s2 */
+ movzwl $65535,r2 /* r2 = locc/matchc limit */
+ locc $0,r2,(r4) /* find '\0' in s2 */
+ beql 4f
+ subl3 r4,r1,r5 /* r5 = strlen(s2) */
+ beql 1f /* if r5 == 0, return s1 */
+
+ /*
+ * s2 is short enough to apply matchc.
+ * If s1 is long, we have to do it in stages.
+ */
+0: locc $0,r2,(r3) /* find '\0' in s1 */
+ beql 3f
+
+ /*
+ * Both strings are `short'; we can use matchc directly.
+ */
+ subl3 r3,r1,r1 /* r1 = strlen(s1) */
+ matchc r5,(r4),r1,(r3) /* find substring */
+ bneq 2f
+
+ /*
+ * r3 points r5 bytes past match. Return the match.
+ */
+1: subl3 r5,r3,r0 /* return (byte_past_match - strlen(s2)) */
+ ret
+
+ /*
+ * There is no matching substring.
+ */
+2: clrl r0 /* return NULL */
+ ret
+
+ /*
+ * s1 is too long (> 65535 bytes) to apply matchc directly,
+ * but s2 is short enough. Apply s2 to s1, then (if not
+ * found yet) advancing s1 by (65536-strlen(s2)) bytes and
+ * loop.
+ */
+3: matchc r5,(r4),r2,(r3) /* search */
+ beql 1b /* if found, go return it */
+ decw r2 /* from 0 to 65535 */
+ incl r3 /* already advanced 65535, now 65536 */
+ subl2 r5,r3 /* ... minus strlen(s2) */
+ brb 0b
+
+ /*
+ * s2 is too long (> 65535 bytes) to bother with matchc.
+ */
+4: locc $0,r2,(r1) /* continue working on strlen(s2) */
+ beql 4b
+ subl3 r1,r4,r5 /* r5 = strlen(s2) */
+ movb (r4)+,r2 /* r2 = *s2++ */
+ decl r5 /* fix up length */
+5: movb (r3)+,r0 /* r0 = *s1++ */
+ beql 2b /* if '\0', return NULL */
+ cmpb r0,r2
+ bneq 5b /* loop until first char found */
+ pushr R5|R4|R3|R2 /* save c, s1, s2, n */
+ pushr R5|R4|R3 /* strncmp(s1, s2, n) */
+ calls $3,_strncmp
+ popr R2|R3|R4|R5 /* restore */
+ tstl r0
+ bneq 5b /* loop until strncmp says rest same too */
+ subl3 $1,r3,r0 /* return previous s1 */
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fc6606f14bc2832b003b6187059d200eb46629e3
commit fc6606f14bc2832b003b6187059d200eb46629e3
Author: Roland McGrath <roland@gnu.org>
Date: Wed May 6 22:56:48 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index c8e6623..d02f27f 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-ENTRY(___wait3)
+ENTRY(__wait3)
movel sp@(8), d1
moveal sp@(12), a0
movel #SYS_wait, d0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b773f1ef1619058e8f10c07a422121644062a887
commit b773f1ef1619058e8f10c07a422121644062a887
Author: Roland McGrath <roland@gnu.org>
Date: Sun May 3 17:59:14 1992 +0000
Formerly unix/bsd/sun/sparc/sethostid.S.~7~
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index 7f5309b..709fcea 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -25,6 +25,8 @@ SYSCALL (sethostid, 1)
#else
+/* <errnos.h> only defines E* #ifdef _ERRNO_H. */
+#define _ERRNO_H
#include <errnos.h>
ENTRY (sethostid)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ba56050a834a5c30ea2545cd786cabc0ab52d9ee
commit ba56050a834a5c30ea2545cd786cabc0ab52d9ee
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:47:39 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c
index 44a8e57..0e3e58f 100644
--- a/sysdeps/m68k/fpu/asin.c
+++ b/sysdeps/m68k/fpu/asin.c
@@ -1,2 +1,2 @@
#define FUNC asin
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c
index 71ec303..b9d428e 100644
--- a/sysdeps/m68k/fpu/atan.c
+++ b/sysdeps/m68k/fpu/atan.c
@@ -1,2 +1,2 @@
#define FUNC atan
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/atanh.c b/sysdeps/m68k/fpu/atanh.c
new file mode 100644
index 0000000..d4636ec
--- /dev/null
+++ b/sysdeps/m68k/fpu/atanh.c
@@ -0,0 +1,2 @@
+#define FUNC atanh
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c
index d65ab0e..b4605e1 100644
--- a/sysdeps/m68k/fpu/ceil.c
+++ b/sysdeps/m68k/fpu/ceil.c
@@ -1,20 +1,4 @@
-/* Copyright (C) 1990 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define FUNC ceil
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c
index db6b8a4..fa50130 100644
--- a/sysdeps/m68k/fpu/cos.c
+++ b/sysdeps/m68k/fpu/cos.c
@@ -1,2 +1,2 @@
#define FUNC cos
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c
index cc91b2e..78a8194 100644
--- a/sysdeps/m68k/fpu/cosh.c
+++ b/sysdeps/m68k/fpu/cosh.c
@@ -1,2 +1,2 @@
#define FUNC cosh
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c
index 2748fd3..2649d72 100644
--- a/sysdeps/m68k/fpu/exp.c
+++ b/sysdeps/m68k/fpu/exp.c
@@ -1,3 +1,3 @@
#define FUNC exp
#define OP etox
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c
index 88a34db..19f1802 100644
--- a/sysdeps/m68k/fpu/expm1.c
+++ b/sysdeps/m68k/fpu/expm1.c
@@ -1,2 +1,3 @@
-#define FUNC expm1
-#include <../sysdeps/m68k/68881/acos.c>
+#define FUNC __expm1
+#define OP expm1
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c
index 0f8feea..f9538a5 100644
--- a/sysdeps/m68k/fpu/fabs.c
+++ b/sysdeps/m68k/fpu/fabs.c
@@ -1,3 +1,3 @@
#define FUNC fabs
#define OP abs
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h
index add7351..098e880 100644
--- a/sysdeps/m68k/fpu/fl.h
+++ b/sysdeps/m68k/fpu/fl.h
@@ -6,7 +6,10 @@
/* ansidecl.m4 here inserts the ieee file. Kludge o rama.
$) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */
-#if defined(FLT_ROUNDS) && defined(__GNUC__)
+#ifndef __need_HUGE_VAL
+
+#ifdef __GNUC__
+
#undef FLT_ROUNDS
/* Interrogate the 68881 to find the current rounding mode. */
@@ -33,4 +36,6 @@ DEFUN_VOID(__flt_rounds)
#define FLT_ROUNDS (__flt_rounds())
-#endif
+#endif /* GCC. */
+
+#endif /* Don't need HUGE_VAL. */
diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c
index bcd6be3..92a2ca6 100644
--- a/sysdeps/m68k/fpu/floor.c
+++ b/sysdeps/m68k/fpu/floor.c
@@ -1,3 +1,3 @@
#define FUNC floor
#define OP intrz
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c
index 6ab7c5b..de74851 100644
--- a/sysdeps/m68k/fpu/frexp.c
+++ b/sysdeps/m68k/fpu/frexp.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c
index f74a05b..e90c691 100644
--- a/sysdeps/m68k/fpu/isnan.c
+++ b/sysdeps/m68k/fpu/isnan.c
@@ -1,2 +1,2 @@
#define FUNC __isnan
-#include <../sysdeps/m68k/68881/isinf.c>
+#include <__isinf.c>
diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c
index c5f5a5b..4de3346 100644
--- a/sysdeps/m68k/fpu/log.c
+++ b/sysdeps/m68k/fpu/log.c
@@ -1,3 +1,3 @@
#define FUNC log
#define OP logn
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c
index 9a9923d..246b69a 100644
--- a/sysdeps/m68k/fpu/log10.c
+++ b/sysdeps/m68k/fpu/log10.c
@@ -1,2 +1,2 @@
#define FUNC log10
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/log1p.c b/sysdeps/m68k/fpu/log1p.c
new file mode 100644
index 0000000..0287838
--- /dev/null
+++ b/sysdeps/m68k/fpu/log1p.c
@@ -0,0 +1,2 @@
+#define FUNC log1p
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/rint.c b/sysdeps/m68k/fpu/rint.c
new file mode 100644
index 0000000..288ae81
--- /dev/null
+++ b/sysdeps/m68k/fpu/rint.c
@@ -0,0 +1,3 @@
+#define FUNC __rint
+#define OP intr
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c
index 6ee32e7..28ac9e5 100644
--- a/sysdeps/m68k/fpu/sin.c
+++ b/sysdeps/m68k/fpu/sin.c
@@ -1,2 +1,2 @@
#define FUNC sin
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c
index 51c8b3f..fae7c71 100644
--- a/sysdeps/m68k/fpu/sinh.c
+++ b/sysdeps/m68k/fpu/sinh.c
@@ -1,2 +1,2 @@
#define FUNC sinh
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c
index 3ba32bf..2365b61 100644
--- a/sysdeps/m68k/fpu/sqrt.c
+++ b/sysdeps/m68k/fpu/sqrt.c
@@ -1,2 +1,2 @@
#define FUNC sqrt
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
index 9482471..fd8d7c1 100644
--- a/sysdeps/m68k/fpu/switch/Makefile
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -22,16 +22,16 @@ sysdep_routines := $(sysdep_routines) switch
# Find all the sources that have 68881 versions.
+68881-sources := \
- $(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources))))
+ $(notdir $(wildcard $(addprefix $(filter %/fpu,$(sysdirs)),$(sources))))
-# Sysdep directories other than 68881 and 68881-sw (this one).
-+non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs))
+# Sysdep directories other than fpu and fpu/switch (this one).
++non68881-dirs := $(filter-out %/fpu %/fpu/switch,$(+sysdep_dirs))
# Get a non-68881 version of the target.
+non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs))))
# Directory containing 68881 sources.
-+68881-dir := $(filter %/68881,$(+sysdep_dirs))
++68881-dir := $(filter %/fpu,$(+sysdep_dirs))
# For all the files that have 68881 versions and don't exist already in
# the source directory (math), automatically make ones that switch between
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c
index b1deef2..057bd15 100644
--- a/sysdeps/m68k/fpu/switch/switch.c
+++ b/sysdeps/m68k/fpu/switch/switch.c
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <signal.h>
-#include <68881-switch.h>
+#include <68881-sw.h>
/* The signal that is sent when a 68881 instruction
diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c
index 2adc921..53b3b53 100644
--- a/sysdeps/m68k/fpu/tan.c
+++ b/sysdeps/m68k/fpu/tan.c
@@ -1,2 +1,2 @@
#define FUNC tan
-#include "acos-68881.c"
+#include <acos.c>
diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c
index 1815c0a..cc67395 100644
--- a/sysdeps/m68k/fpu/tanh.c
+++ b/sysdeps/m68k/fpu/tanh.c
@@ -1,2 +1,2 @@
#define FUNC tanh
-#include "acos-68881.c"
+#include <acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3ace5dacad574ddc8b9eb367445644bf0eaa74c5
commit 3ace5dacad574ddc8b9eb367445644bf0eaa74c5
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:37:04 1992 +0000
Formerly m68k/fpu/pow.c.~2~
diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c
index 9273c80..aa9d559 100644
--- a/sysdeps/m68k/fpu/pow.c
+++ b/sysdeps/m68k/fpu/pow.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a587c20ce748ffeb2a616b93e85e928d8e8b7a92
commit a587c20ce748ffeb2a616b93e85e928d8e8b7a92
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:37:02 1992 +0000
Formerly m68k/fpu/ldexp.c.~2~
diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c
index 0ecba72..37d7b6d 100644
--- a/sysdeps/m68k/fpu/ldexp.c
+++ b/sysdeps/m68k/fpu/ldexp.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af48c3195084904fde8c29f10ce0d9f8ae0ff877
commit af48c3195084904fde8c29f10ce0d9f8ae0ff877
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:37:00 1992 +0000
Formerly m68k/fpu/fmod.c.~2~
diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c
index c8caabf..c5f1b5a 100644
--- a/sysdeps/m68k/fpu/fmod.c
+++ b/sysdeps/m68k/fpu/fmod.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=549628790598e52af5e4c8dd94b478e21e701962
commit 549628790598e52af5e4c8dd94b478e21e701962
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:53 1992 +0000
Formerly m68k/fpu/atan2.c.~4~
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
index 1dfffe7..7860178 100644
--- a/sysdeps/m68k/fpu/atan2.c
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
+#ifdef __GNUC__
+
static CONST double
PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */
PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */
@@ -66,3 +68,7 @@ DEFUN(atan2, (y, x), double y AND double x)
return __copysign(atan(y / x), signy);
}
+
+#else
+#include <sysdeps/ieee754/atan2.c>
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e745f90155dbfcc4ad4153fffa924e1fbd98ff41
commit e745f90155dbfcc4ad4153fffa924e1fbd98ff41
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:50 1992 +0000
Formerly m68k/fpu/acos.c.~2~
diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c
index c996897..e051fd4 100644
--- a/sysdeps/m68k/fpu/acos.c
+++ b/sysdeps/m68k/fpu/acos.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=68a2e4b90738416807b37b27af546265dee427b3
commit 68a2e4b90738416807b37b27af546265dee427b3
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:49 1992 +0000
Formerly m68k/fpu/__math.h.~10~
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
index 0fd80ce..8f2ded1 100644
--- a/sysdeps/m68k/fpu/__math.h
+++ b/sysdeps/m68k/fpu/__math.h
@@ -81,17 +81,6 @@ __m81_u(__drem)(double __x, double __y)
}
extern __inline __const double
-__m81_u(__scalb)(double __x, int __n)
-{
- double __result;
- if (__x == 0.0)
- __result = __x;
- else
- __asm("fscale%.l %1, %0" : "=f" (__result) : "g" (__n), "0" (__x));
- return __result;
-}
-
-extern __inline __const double
__m81_u(ldexp)(double __x, int __e)
{
double __result;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbe5d07fad19e9f0f1fee583dba53229790a4001
commit fbe5d07fad19e9f0f1fee583dba53229790a4001
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:48 1992 +0000
Formerly m68k/fpu/__logb.c.~3~
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
index 614581e..3bc3a4e 100644
--- a/sysdeps/m68k/fpu/logb.c
+++ b/sysdeps/m68k/fpu/logb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,8 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <math.h>
+#ifdef __GNUC__
+
/* Return the base 2 signed integral exponent of X. */
double
DEFUN(__logb, (x), double x)
@@ -35,3 +37,7 @@ DEFUN(__logb, (x), double x)
return x;
}
+
+#else
+#include <sysdeps/ieee754/__logb.c>
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61e097530ba979a348697f56da3a130b6d259e7e
commit 61e097530ba979a348697f56da3a130b6d259e7e
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:47 1992 +0000
Formerly m68k/fpu/__isinf.c.~2~
diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c
index 3d33602..194c5a6 100644
--- a/sysdeps/m68k/fpu/isinf.c
+++ b/sysdeps/m68k/fpu/isinf.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e198c4817b40f87e523ba36da17d153f6a9e9af3
commit e198c4817b40f87e523ba36da17d153f6a9e9af3
Author: Roland McGrath <roland@gnu.org>
Date: Fri May 1 18:36:46 1992 +0000
Formerly m68k/fpu/__drem.c.~3~
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
index 30ad244..8ca7598 100644
--- a/sysdeps/m68k/fpu/drem.c
+++ b/sysdeps/m68k/fpu/drem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#undef drem
double
-DEFUN(drem, (x, y), double x AND double y)
+DEFUN(__drem, (x, y), double x AND double y)
{
- return __drem(x, y);
+ return ____drem(x, y);
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=43c6e47ffa9c0ce67541ccdbaac5143020afeac9
commit 43c6e47ffa9c0ce67541ccdbaac5143020afeac9
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 30 07:14:52 1992 +0000
entered into RCS
diff --git a/sysdeps/mips/Dist b/sysdeps/mips/Dist
new file mode 100644
index 0000000..ad6ea03
--- /dev/null
+++ b/sysdeps/mips/Dist
@@ -0,0 +1 @@
+setjmp_aux.c
diff --git a/sysdeps/unix/bsd/ultrix4/Dist b/sysdeps/unix/bsd/ultrix4/Dist
new file mode 100644
index 0000000..6745cd4
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/Dist
@@ -0,0 +1 @@
+getsysinfo.S
diff --git a/sysdeps/unix/bsd/ultrix4/Makefile b/sysdeps/unix/bsd/ultrix4/Makefile
index b90d960..26b9034 100644
--- a/sysdeps/unix/bsd/ultrix4/Makefile
+++ b/sysdeps/unix/bsd/ultrix4/Makefile
@@ -1,6 +1,3 @@
-ifeq ($(subdir),signal)
-sysdep_routines := $(sysdep_routines) sigtramp __handler
-endif
ifeq ($(subdir),posix)
-sysdep_routines := $(sysdep_routines) __getsysinf
+sysdep_routines := $(sysdep_routines) getsysinfo
endif
diff --git a/sysdeps/unix/bsd/ultrix4/getsysinfo.S b/sysdeps/unix/bsd/ultrix4/getsysinfo.S
new file mode 100644
index 0000000..1f5b2cf
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/getsysinfo.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Get various sorts of information about the system.
+ This is an Ultrix only call. */
+
+#include <sysdep.h>
+
+SYSCALL__ (getsysinfo, 5)
+ ret
diff --git a/sysdeps/unix/bsd/ultrix4/mips/Dist b/sysdeps/unix/bsd/ultrix4/mips/Dist
new file mode 100644
index 0000000..c2e8abb
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/Dist
@@ -0,0 +1 @@
+sigtramp.c __handler.S
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
index f653e26..1bb208d 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
@@ -29,12 +29,6 @@ Cambridge, MA 02139, USA. */
don't actually need a trampoline. */
#include <ansidecl.h>
-
-#ifndef __GNUC__
- #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
-/* This will also get us sigcontext.h. */
#include <signal.h>
#include <stddef.h>
#include <errno.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa13ab3dc44afb6daf97ab880ea73d6935324304
commit fa13ab3dc44afb6daf97ab880ea73d6935324304
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 30 07:10:37 1992 +0000
Formerly unix/bsd/ultrix4/mips/sigcontext.h.~2~
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
index 267964f..60bb312 100644
--- a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
@@ -19,42 +19,42 @@ Cambridge, MA 02139, USA. */
/* Note that ANY change to this instantly implies a change to __handler.S. */
struct sigcontext
-{
- /* onsigstack flag, for the sigstack state we should restore */
- int sc_onstack;
-
- /* signal mask to restore */
- sigset_t sc_mask;
-
- /* Program counter when the signal hit. */
- int sc_pc;
-
- /* registers 0 through 31 */
- int sc_regs[32];
-
- /* mul/div low and hi; these aren't part of a jmpbuf, but are part of the
- sigcontext and are referenced from the signal trampoline code. */
- int sc_mdlo;
- int sc_mdhi;
-
- /* Flag to see if the fp's been used. */
- int sc_ownedfp;
-
- /* floating point registers 0 to 31 */
- int sc_fpregs[32];
- /* control & status register for fp */
- int sc_fpc_csr;
-
- /* exception instruction register for fp */
- int sc_fpc_eir;
-
- /* The coprocessor's cause register. */
- int sc_cause;
-
- /* CPU bad virtual address. */
- int sc_badvaddr;
-
- /* CPU board bad physical address. */
- int sc_badpaddr;
-};
+ {
+ /* Nonzero if running on signal stack. */
+ int sc_onstack;
+
+ /* Signal mask to restore. */
+ sigset_t sc_mask;
+
+ /* Program counter when the signal hit. */
+ PTR sc_pc;
+
+ /* Registers 0 through 31. */
+ int sc_regs[32];
+
+ /* mul/div low and hi; these aren't part of a jmp_buf, but are part of the
+ sigcontext and are referenced from the signal trampoline code. */
+ int sc_mdlo;
+ int sc_mdhi;
+
+ /* Flag to see if the FP's been used. */
+ int sc_ownedfp;
+
+ /* Floating point registers 0 to 31. */
+ int sc_fpregs[32];
+ /* Control & status register for FP. */
+ int sc_fpc_csr;
+
+ /* Exception instruction register for FP. */
+ int sc_fpc_eir;
+
+ /* The coprocessor's cause register. */
+ int sc_cause;
+
+ /* CPU bad virtual address. */
+ PTR sc_badvaddr;
+
+ /* CPU board bad physical address. */
+ PTR sc_badpaddr;
+ };
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=58b006e0cf9c9d1dc67f7f501f4361c6cb44871e
commit 58b006e0cf9c9d1dc67f7f501f4361c6cb44871e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 30 06:00:32 1992 +0000
Formerly unix/bsd/sony/newsos/m68k/Implies.~3~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
index 2fae0d8..44f7b8a 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
@@ -1,2 +1,2 @@
# A news800 is almost exactly like an hp300
-unix/bsd/hp9k3bsd
+unix/hp/m68k
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=394238a7976bd145740389b1bb9bfb31fbefcb26
commit 394238a7976bd145740389b1bb9bfb31fbefcb26
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 30 05:09:14 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/ultrix4/mips/Makefile b/sysdeps/unix/bsd/ultrix4/mips/Makefile
new file mode 100644
index 0000000..0b71fd9
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sigtramp __handler
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cbe3ec39f3b4038071d2120fc247d2dcaaf2bdd9
commit cbe3ec39f3b4038071d2120fc247d2dcaaf2bdd9
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 30 03:21:33 1992 +0000
Formerly mips/setjmp.S.~2~
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
index bb47346..963a718 100644
--- a/sysdeps/mips/setjmp.S
+++ b/sysdeps/mips/setjmp.S
@@ -24,4 +24,4 @@ Cambridge, MA 02139, USA. */
ENTRY (__setjmp)
move a1, sp
move a2, $fp
- j __setjmp_aux
+ j ___setjmp_aux
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5914f782fc80491cfaf56a4f577acfa28956cdab
commit 5914f782fc80491cfaf56a4f577acfa28956cdab
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:20:31 1992 +0000
Formerly mips/jmp_buf.h.~3~
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
index b2c9edb..c6b10fb 100644
--- a/sysdeps/mips/jmp_buf.h
+++ b/sysdeps/mips/jmp_buf.h
@@ -1,5 +1,7 @@
-/* Copyright (C) 1992 Free Software Foundation, Inc.
- Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+/* Define the machine-dependent type `jmp_buf'. Mips version.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+Contributed by Brendan Kehoe (brendan@cs.widener.edu).
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -16,29 +18,26 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-/* Define the machine-dependent type `jmp_buf'. Mips version. */
-
typedef struct
-{
- /* Program counter when the signal hit. */
- int __pc;
-
- /* Stack pointer. */
- int __sp;
-
- /* Callee-saved registers s0 through s7. */
- int __regs[8];
-
- /* The frame pointer. */
- int __fp;
-
- /* The global pointer. */
- int __gp;
-
- /* Floating point status register. */
- int __fpc_csr;
-
- /* Callee-saved floating point registers. */
- double __fpregs[6];
-
-} __jmp_buf[1];
+ {
+ /* Program counter. */
+ PTR __pc;
+
+ /* Stack pointer. */
+ PTR __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ int __regs[8];
+
+ /* The frame pointer. */
+ PTR __fp;
+
+ /* The global pointer. */
+ PTR __gp;
+
+ /* Floating point status register. */
+ int __fpc_csr;
+
+ /* Callee-saved floating point registers. */
+ double __fpregs[6];
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=92a3358cb948747d4a48104a6877838fa4c9e8da
commit 92a3358cb948747d4a48104a6877838fa4c9e8da
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:11:04 1992 +0000
Initial revision
diff --git a/sysdeps/mips/__longjmp.c b/sysdeps/mips/__longjmp.c
new file mode 100644
index 0000000..1828714
--- /dev/null
+++ b/sysdeps/mips/__longjmp.c
@@ -0,0 +1,79 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+#include <stdlib.h>
+
+#undef __longjmp
+
+__NORETURN
+void
+DEFUN(__longjmp, (env, val_arg), CONST __jmp_buf env AND int val_arg)
+{
+ /* gcc 1.39.19 miscompiled the longjmp routine (as it did setjmp before
+ the hack around it); force it to use $a1 for the longjmp value.
+ Without this it saves $a1 in a register which gets clobbered
+ along the way. */
+ register int val asm ("a1");
+
+ /* Pull back the floating point callee-saved registers. */
+ asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0]));
+ asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1]));
+ asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[2]));
+ asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[3]));
+ asm volatile ("l.d $f28, %0" : : "m" (env[0].__fpregs[4]));
+ asm volatile ("l.d $f30, %0" : : "m" (env[0].__fpregs[5]));
+
+ /* Restore the stack pointer. */
+ asm volatile ("lw $29, %0" : : "m" (env[0].__sp));
+
+ /* Get and reconstruct the floating point csr. */
+ asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
+ asm volatile ("ctc1 $2, $31");
+
+ /* Get the FP. */
+ asm volatile ("lw $30, %0" : : "m" (env[0].__fp));
+
+ /* Get the GP. */
+ asm volatile ("lw $gp, %0" : : "m" (env[0].__gp));
+
+ /* Get the callee-saved registers. */
+ asm volatile ("lw $16, %0" : : "m" (env[0].__regs[0]));
+ asm volatile ("lw $17, %0" : : "m" (env[0].__regs[1]));
+ asm volatile ("lw $18, %0" : : "m" (env[0].__regs[2]));
+ asm volatile ("lw $19, %0" : : "m" (env[0].__regs[3]));
+ asm volatile ("lw $20, %0" : : "m" (env[0].__regs[4]));
+ asm volatile ("lw $21, %0" : : "m" (env[0].__regs[5]));
+ asm volatile ("lw $22, %0" : : "m" (env[0].__regs[6]));
+ asm volatile ("lw $23, %0" : : "m" (env[0].__regs[7]));
+
+ /* Get the PC. */
+ asm volatile ("lw $31, %0" : : "m" (env[0].__pc));
+
+ /* Give setjmp() 1 if given a 0, or what they gave us if non-zero. */
+ if (val == 0)
+ asm volatile ("li $2, 1");
+ else
+ asm volatile ("move $2, %0" : : "r" (val));
+
+ asm volatile ("j $31");
+
+ /* Follow the trend.. */
+ abort ();
+}
diff --git a/sysdeps/mips/setjmp.S b/sysdeps/mips/setjmp.S
new file mode 100644
index 0000000..bb47346
--- /dev/null
+++ b/sysdeps/mips/setjmp.S
@@ -0,0 +1,27 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* The function __setjmp_aux saves all the registers, but it can't
+ reliably access the stack or frame pointers, so we pass them in as
+ extra arguments. */
+ENTRY (__setjmp)
+ move a1, sp
+ move a2, $fp
+ j __setjmp_aux
diff --git a/sysdeps/mips/setjmp_aux.c b/sysdeps/mips/setjmp_aux.c
new file mode 100644
index 0000000..e4c9d20
--- /dev/null
+++ b/sysdeps/mips/setjmp_aux.c
@@ -0,0 +1,65 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+
+/* This function is only called via the assembly language routine
+ __setjmp, which arranges to pass in the stack pointer and the frame
+ pointer. We do things this way because it's difficult to reliably
+ access them in C. */
+
+int
+DEFUN(__setjmp_aux, (env, sp, fp), __jmp_buf env AND int sp AND int fp)
+{
+ /* Store the floating point callee-saved registers... */
+ asm volatile ("s.d $f20, %0" : : "m" (env[0].__fpregs[0]));
+ asm volatile ("s.d $f22, %0" : : "m" (env[0].__fpregs[1]));
+ asm volatile ("s.d $f24, %0" : : "m" (env[0].__fpregs[2]));
+ asm volatile ("s.d $f26, %0" : : "m" (env[0].__fpregs[3]));
+ asm volatile ("s.d $f28, %0" : : "m" (env[0].__fpregs[4]));
+ asm volatile ("s.d $f30, %0" : : "m" (env[0].__fpregs[5]));
+
+ /* .. and the PC; */
+ asm volatile ("sw $31, %0" : : "m" (env[0].__pc));
+
+ /* .. and the stack pointer; */
+ asm volatile ("sw %1, %0" : : "m" (env[0].__sp), "r" (sp));
+
+ /* .. and the FP; it'll be in s8. */
+ asm volatile ("sw %1, %0" : : "m" (env[0].__fp), "r" (fp));
+
+ /* .. and the GP; */
+ asm volatile ("sw $gp, %0" : : "m" (env[0].__gp));
+
+ /* .. and the callee-saved registers; */
+ asm volatile ("sw $16, %0" : : "m" (env[0].__regs[0]));
+ asm volatile ("sw $17, %0" : : "m" (env[0].__regs[1]));
+ asm volatile ("sw $18, %0" : : "m" (env[0].__regs[2]));
+ asm volatile ("sw $19, %0" : : "m" (env[0].__regs[3]));
+ asm volatile ("sw $20, %0" : : "m" (env[0].__regs[4]));
+ asm volatile ("sw $21, %0" : : "m" (env[0].__regs[5]));
+ asm volatile ("sw $22, %0" : : "m" (env[0].__regs[6]));
+ asm volatile ("sw $23, %0" : : "m" (env[0].__regs[7]));
+
+ /* .. and finally get and reconstruct the floating point csr. */
+ asm volatile ("cfc1 $2, $31");
+ asm volatile ("sw $2, %0" : : "m" (env[0].__fpc_csr));
+
+ return 0;
+}
diff --git a/sysdeps/unix/bsd/ultrix4/Makefile b/sysdeps/unix/bsd/ultrix4/Makefile
new file mode 100644
index 0000000..b90d960
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/Makefile
@@ -0,0 +1,6 @@
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) sigtramp __handler
+endif
+ifeq ($(subdir),posix)
+sysdep_routines := $(sysdep_routines) __getsysinf
+endif
diff --git a/sysdeps/unix/bsd/ultrix4/mips/__handler.S b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
new file mode 100644
index 0000000..6f26028
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/__handler.S
@@ -0,0 +1,109 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+ Also hacked by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* This function saves all the registers, calls the
+ user function, and then executes a sigreturn system call. The
+ sigreturn call wants the address of a sigcontext structure. This
+ is all hideously system dependent and, for all intents and
+ purposes, undocumented.
+
+ When we enter here, a3 holds the user's signal handler. We are
+ supposed to fill in the context given in a2, and then pass it and
+ the first two arguments to the user's function. If the user's
+ function returns, we execute a sigreturn system call.
+
+ The sc_onstack, sc_mask and sc_pc elements of the context are
+ already set by the kernel. For some reason we don't have to save
+ the floating point state or the coprocessor state; the kernel may
+ have saved them for us, or it doesn't use them. */
+
+.set noat
+ENTRY (__handler)
+ /* Store zero and the asm temp reg. */
+ sw $0, 12(a2)
+ sw AT, 16(a2)
+
+ /* Put v1 in sc_regs[3]. */
+ sw v1, 24(a2)
+
+ /* Save the caller saved registers in sc_regs[8..15]. */
+ sw t0, 44(a2)
+ sw t1, 48(a2)
+ sw t2, 52(a2)
+ sw t3, 56(a2)
+ sw t4, 60(a2)
+ sw t5, 64(a2)
+ sw t6, 48(a2)
+ sw t7, 52(a2)
+
+ /* Save the callee saved registers in sc_regs[16..23]. */
+ sw s0, 76(a2)
+ sw s1, 80(a2)
+ sw s2, 84(a2)
+ sw s3, 88(a2)
+ sw s4, 92(a2)
+ sw s5, 96(a2)
+ sw s6, 100(a2)
+ sw s7, 104(a2)
+
+ /* Save the code generator registers in sc_regs[24] & sc_regs[25]. */
+ sw t8, 108(a2)
+ sw t9, 112(a2)
+
+ /* Save the kernel temp regs in sc_regs[26] & sc_regs[27]. */
+ sw k0, 116(a2)
+ sw k1, 120(a2)
+
+ /* Save the global pointer in sc_regs[28]. */
+ sw gp, 124(a2)
+
+ /* ... and also the return address in sc_regs[31]. */
+ sw ra, 136(a2)
+
+ /* Save the floating pointer and the stack pointer in
+ sc_regs[29] and sc_regs[30]. */
+ sw sp, 128(a2)
+ sw $fp, 132(a2)
+
+ /* Save the mul/div stuff in sc_mdlo and sc_mdhi. */
+ mflo t0
+ sw t0, 140(a2)
+ mfhi t0
+ sw t0, 144(a2)
+
+ /* Move the stack up four. This will save the context. */
+ addu sp, sp, -32
+ sw a2, 16(sp)
+
+ /* Call their handler with the signal, code, and context; note
+ this will clobber the context. */
+ .set noreorder
+ jal ra, a3
+ nop
+ .set reorder
+
+ /* When we come back, restore the context and pass it right
+ on into sigreturn(). */
+ lw a0, 16(sp)
+
+ /* Do a sigreturn syscall; this doesn't return. */
+ la v0, __sigreturn
+ jal ra, v0
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
new file mode 100644
index 0000000..267964f
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigcontext.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Note that ANY change to this instantly implies a change to __handler.S. */
+
+struct sigcontext
+{
+ /* onsigstack flag, for the sigstack state we should restore */
+ int sc_onstack;
+
+ /* signal mask to restore */
+ sigset_t sc_mask;
+
+ /* Program counter when the signal hit. */
+ int sc_pc;
+
+ /* registers 0 through 31 */
+ int sc_regs[32];
+
+ /* mul/div low and hi; these aren't part of a jmpbuf, but are part of the
+ sigcontext and are referenced from the signal trampoline code. */
+ int sc_mdlo;
+ int sc_mdhi;
+
+ /* Flag to see if the fp's been used. */
+ int sc_ownedfp;
+
+ /* floating point registers 0 to 31 */
+ int sc_fpregs[32];
+ /* control & status register for fp */
+ int sc_fpc_csr;
+
+ /* exception instruction register for fp */
+ int sc_fpc_eir;
+
+ /* The coprocessor's cause register. */
+ int sc_cause;
+
+ /* CPU bad virtual address. */
+ int sc_badvaddr;
+
+ /* CPU board bad physical address. */
+ int sc_badpaddr;
+};
+
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
new file mode 100644
index 0000000..f653e26
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigtramp.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* The sigvec system call on MIPS Ultrix takes an additional
+ parameter, which is the address that is actually called when the
+ signal occurs.
+
+ When a signal occurs, we arrange for the kernel to call __handler.
+ That will save the frame and stack pointers into the context, and
+ then jump to this routine. See __handler.S.
+
+ This code is based on sysdeps/unix/bsd/sun4/sigtramp.c, but it's
+ different because since we get passed the user signal handler we
+ don't actually need a trampoline. */
+
+#include <ansidecl.h>
+
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+/* This will also get us sigcontext.h. */
+#include <signal.h>
+#include <stddef.h>
+#include <errno.h>
+
+/* The user's signal handler is called with three arguments. */
+typedef void (*handler_type) (int sig, int code, struct sigcontext *);
+
+/* Defined in __raw_sigvec.S. */
+extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec,
+ void (*)(int sig, int code,
+ struct sigcontext *,
+ handler_type)));
+
+extern void EXFUN(__handler, (int sig, int code,
+ struct sigcontext *,
+ handler_type));
+
+int
+DEFUN(__sigvec, (sig, vec, ovec),
+ int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+{
+ return __raw_sigvec (sig, vec, ovec, __handler);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e6eb480835bbda55454c358a21a5d967a58133e8
commit e6eb480835bbda55454c358a21a5d967a58133e8
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:11:03 1992 +0000
entered into RCS
diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies
new file mode 100644
index 0000000..60732ce
--- /dev/null
+++ b/sysdeps/mips/Implies
@@ -0,0 +1,2 @@
+# MIPS uses IEEE 754 floating point.
+ieee754
diff --git a/sysdeps/mips/Makefile b/sysdeps/mips/Makefile
new file mode 100644
index 0000000..7364141
--- /dev/null
+++ b/sysdeps/mips/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),setjmp)
+sysdep_routines := $(sysdep_routines) setjmp_aux
+endif
diff --git a/sysdeps/unix/bsd/ultrix4/getdents.S b/sysdeps/unix/bsd/ultrix4/getdents.S
new file mode 100644
index 0000000..6d18c04
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/getdents.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/__getdents.S>
diff --git a/sysdeps/unix/bsd/ultrix4/mips/sigvec.S b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
new file mode 100644
index 0000000..fdf919c
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/mips/sigvec.S
@@ -0,0 +1,24 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* __sigvec is defined by sigtramp.c. */
+
+PSEUDO (__raw_sigvec, sigvec, 3)
+ ret
diff --git a/sysdeps/unix/bsd/ultrix4/posix_opt.h b/sysdeps/unix/bsd/ultrix4/posix_opt.h
new file mode 100644
index 0000000..ecd04d1
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/posix_opt.h
@@ -0,0 +1,23 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#define _POSIX_JOB_CONTROL 1
+#define _POSIX_SAVED_IDS 1
+#define _POSIX_CHOWN_RESTRICTED 1
+#define _POSIX_NO_TRUNC 1
+#define _POSIX_VDISABLE ((unsigned char) -1)
diff --git a/sysdeps/unix/bsd/ultrix4/sysconf.c b/sysdeps/unix/bsd/ultrix4/sysconf.c
new file mode 100644
index 0000000..c0b3203
--- /dev/null
+++ b/sysdeps/unix/bsd/ultrix4/sysconf.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor (ian@airs.com).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* On Ultrix we can use the getsysinfo call to get the right return
+ value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
+ which the default sysconf already knows how to handle. */
+
+#include <ansidecl.h>
+#include <unistd.h>
+#include <errno.h>
+
+/* This is an Ultrix header file. */
+#include <sys/sysinfo.h>
+
+extern int EXFUN(__getsysinfo, (unsigned int op, void *buffer,
+ size_t nbytes, int *start,
+ void *arg));
+extern long int EXFUN(__default_sysconf, (int name));
+
+long int
+DEFUN(__sysconf, (name), int name)
+{
+ if (name == _SC_CHILD_MAX)
+ {
+ int save = errno;
+ int start = 0;
+ int ret;
+
+ /* getsysinfo returns the number of values it put into the
+ buffer, or 0 if not available, or -1 on error. */
+ if (__getsysinfo (GSI_MAX_UPROCS, &ret, sizeof (ret), &start,
+ (void *) 0) > 0)
+ {
+ errno = save;
+ return ret;
+ }
+
+ errno = save;
+ }
+
+ return __default_sysconf (name);
+}
+
+#define __sysconf __default_sysconf
+
+#include <sysdeps/posix/__sysconf.c>
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index 112a1c0..60e01ac 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -47,3 +47,5 @@ Cambridge, MA 02139, USA. */
chmk $SYS_/**/syscall_name \
bcs error
#endif
+
+#define MOVE(x,y) movl x , y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0927a511514bea9de1c4585b268d49cb5de035be
commit 0927a511514bea9de1c4585b268d49cb5de035be
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:10:23 1992 +0000
Formerly mips/jmp_buf.h.~2~
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
index 9f191a1..b2c9edb 100644
--- a/sysdeps/mips/jmp_buf.h
+++ b/sysdeps/mips/jmp_buf.h
@@ -39,6 +39,6 @@ typedef struct
int __fpc_csr;
/* Callee-saved floating point registers. */
- int __fpregs[6];
+ double __fpregs[6];
} __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c3d301b1ba598dc44d09b75f5745fd81aa2db29e
commit c3d301b1ba598dc44d09b75f5745fd81aa2db29e
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:09:48 1992 +0000
Initial revision
diff --git a/sysdeps/mips/jmp_buf.h b/sysdeps/mips/jmp_buf.h
new file mode 100644
index 0000000..9f191a1
--- /dev/null
+++ b/sysdeps/mips/jmp_buf.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+ Contributed by Brendan Kehoe (brendan@cs.widener.edu).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+/* Define the machine-dependent type `jmp_buf'. Mips version. */
+
+typedef struct
+{
+ /* Program counter when the signal hit. */
+ int __pc;
+
+ /* Stack pointer. */
+ int __sp;
+
+ /* Callee-saved registers s0 through s7. */
+ int __regs[8];
+
+ /* The frame pointer. */
+ int __fp;
+
+ /* The global pointer. */
+ int __gp;
+
+ /* Floating point status register. */
+ int __fpc_csr;
+
+ /* Callee-saved floating point registers. */
+ int __fpregs[6];
+
+} __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=02c31dffbaf49e85e4ae149bca12fbc9c6e4e27e
commit 02c31dffbaf49e85e4ae149bca12fbc9c6e4e27e
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:04:59 1992 +0000
Formerly unix/bsd/sun/m68k/sysdep.h.~14~
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 8dd61b5..9b9ace0 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -57,4 +57,4 @@ Cambridge, MA 02139, USA. */
#define ret rts
#define r0 d0
#define r1 d1
-#define movl movel
+#define MOVE(x,y) movel x , y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4262d1229fdb728153afa3dbc7142d9162c49ad
commit d4262d1229fdb728153afa3dbc7142d9162c49ad
Author: Brendan Kehoe <brendan@zen.org>
Date: Thu Apr 30 03:04:58 1992 +0000
Formerly unix/bsd/hp/m68k/sysdep.h.~24~
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index 533aff6..c5bee6a 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -57,4 +57,4 @@ Cambridge, MA 02139, USA. */
#define ret rts
#define r0 d0
#define r1 d1
-#define movl movel
+#define MOVE(x,y) movel x , y
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d2fcc7ff62ff1247a80f806af25433d707082c0
commit 8d2fcc7ff62ff1247a80f806af25433d707082c0
Author: Roland McGrath <roland@gnu.org>
Date: Tue Apr 21 08:37:37 1992 +0000
entered into RCS
diff --git a/sysdeps/vax/huge_val.h b/sysdeps/vax/huge_val.h
new file mode 100644
index 0000000..58f5415
--- /dev/null
+++ b/sysdeps/vax/huge_val.h
@@ -0,0 +1,27 @@
+/* `HUGE_VAL' constant for Vaxen.
+ Used by <stdlib.h> and <math.h> functions for overflow.
+
+Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _HUGE_VAL_H
+#define _HUGE_VAL_H 1
+
+#define HUGE_VAL 1.70141182460469227e38
+
+#endif /* huge_val.h */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b736bc09321871c1ac697463149e569a2fe48d4c
commit b736bc09321871c1ac697463149e569a2fe48d4c
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:12 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S
index 20116de..6c4f7af 100644
--- a/sysdeps/unix/bsd/sun/getdents.S
+++ b/sysdeps/unix/bsd/sun/getdents.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (getdirentries)
+SYSCALL__ (getdirentries, 4)
ret
diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/sigvec.S
similarity index 85%
copy from sysdeps/unix/bsd/sun/getdents.S
copy to sysdeps/unix/bsd/sun/sigvec.S
index 20116de..fdf919c 100644
--- a/sysdeps/unix/bsd/sun/getdents.S
+++ b/sysdeps/unix/bsd/sun/sigvec.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (getdirentries)
+/* __sigvec is defined by sigtramp.c. */
+
+PSEUDO (__raw_sigvec, sigvec, 3)
ret
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index 67c6e22..9501744 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (pipe)
+SYSCALL__ (pipe, 1)
movl 4(ap), r2
movl r0, (r2)+
movl r1, (r2)
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
index 8b8da20..5316be2 100644
--- a/sysdeps/unix/bsd/vax/wait.S
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL__ (wait)
+SYSCALL__ (wait, 1)
movl 4(ap), r2
beq 1f
movl r1, (r2)
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
index 0d6e94a..2e7ab13 100644
--- a/sysdeps/unix/bsd/vax/wait3.S
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.globl ___wait3
-___wait3:
+ENTRY(___wait3)
movel 8(ap), r1
movel 12(ap), r0
/* Set all condition codes to tell the kernel this is wait3. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=125d6372d2148436172df343fa502db377ae6645
commit 125d6372d2148436172df343fa502db377ae6645
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:10 1992 +0000
Formerly unix/bsd/sun/sparc/sethostid.S.~6~
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index 04e6e98..7f5309b 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#ifdef SYS_sethostid
-SYSCALL (sethostid)
+SYSCALL (sethostid, 1)
ret
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7ce7d98342b84e92b2f2df68abc3cc48f5d66ae
commit c7ce7d98342b84e92b2f2df68abc3cc48f5d66ae
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:09 1992 +0000
Formerly unix/bsd/sun/sunos4/sys_wait4.S.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
index dee21b7..6b796b7 100644
--- a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
+++ b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,5 +18,5 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-PSEUDO (__wait4_syscall, wait4)
+PSEUDO (__wait4_syscall, wait4, 4)
ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ec2e22cd8641ceb9af61a14069bf8c5e4b598f0
commit 1ec2e22cd8641ceb9af61a14069bf8c5e4b598f0
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:09 1992 +0000
Formerly unix/bsd/sun/m68k/sethostid.S.~5~
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index 8401251..7b128a1 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -20,7 +20,7 @@ Cambridge, MA 02139, USA. */
#ifdef SYS_sethostid
-SYSCALL (sethostid)
+SYSCALL (sethostid, 1)
ret
#else
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b9d5ecea3bdd77e0c7717fb39e794ae30f4161e4
commit b9d5ecea3bdd77e0c7717fb39e794ae30f4161e4
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:08 1992 +0000
Formerly unix/bsd/hp/m68k/__wait3.S.~3~
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index 4b4815d..c8e6623 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-.globl ___wait3
-___wait3:
+ENTRY(___wait3)
movel sp@(8), d1
moveal sp@(12), a0
movel #SYS_wait, d0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=49b1fb6a132ff039d030ba4b9c05604cd0b2fd77
commit 49b1fb6a132ff039d030ba4b9c05604cd0b2fd77
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:38:06 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/m68k/pipe.S b/sysdeps/unix/bsd/m68k/pipe.S
new file mode 100644
index 0000000..26ca4cb
--- /dev/null
+++ b/sysdeps/unix/bsd/m68k/pipe.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (pipe, 1)
+ moveal sp@(4), a0
+ moveml d0-d1, a0@
+ clrl d0
+ rts
diff --git a/sysdeps/unix/bsd/m68k/wait.S b/sysdeps/unix/bsd/m68k/wait.S
new file mode 100644
index 0000000..2d4b1b6
--- /dev/null
+++ b/sysdeps/unix/bsd/m68k/wait.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (wait, 1)
+ tstl sp@(4)
+ beq 1f
+ moveal sp@(4), a0
+ movel d1, a0@
+1: rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22aa9559d139f3599e5f2a232fbd3f653c7ab11f
commit 22aa9559d139f3599e5f2a232fbd3f653c7ab11f
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:37:48 1992 +0000
Formerly unix/bsd/vax/sysdep.h.~10~
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index 85ac226..112a1c0 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
#endif
#ifdef __STDC__
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error \
error: jmp syscall_error; \
@@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */
chmk $SYS_##syscall_name \
bcs error
#else
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error \
error: jmp syscall_error; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5896e6b5a58b6d6a2571cec470df629134533245
commit 5896e6b5a58b6d6a2571cec470df629134533245
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:37:47 1992 +0000
Formerly unix/bsd/sun/m68k/sysdep.h.~13~
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index 10bdcfb..8dd61b5 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */
#endif
#ifdef __STDC__
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
@@ -44,7 +44,7 @@ Cambridge, MA 02139, USA. */
trap POUND(0); \
bcs error
#else
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65f6f3f18517896d9a2887ae41f07b013cf0ae43
commit 65f6f3f18517896d9a2887ae41f07b013cf0ae43
Author: Brendan Kehoe <brendan@zen.org>
Date: Tue Apr 21 06:37:46 1992 +0000
Formerly unix/bsd/hp/m68k/sysdep.h.~23~
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index e02e5af..533aff6 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ Cambridge, MA 02139, USA. */
#endif
#ifdef __STDC__
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
@@ -44,7 +44,7 @@ Cambridge, MA 02139, USA. */
trap POUND(0); \
bcs error
#else
-#define PSEUDO(name, syscall_name) \
+#define PSEUDO(name, syscall_name, args) \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=77b69521ed5c24871af13b1d29193ee3381c7bf0
commit 77b69521ed5c24871af13b1d29193ee3381c7bf0
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 15 05:55:58 1992 +0000
Formerly sysdeps/unix/sysv/sysv4/Dist.~2~
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
index 300fa29..f23793c 100644
--- a/sysdeps/unix/sysv/sysv4/Dist
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -1 +1,2 @@
sys_getdents.S
+bsddir.h
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dd4e6c808a2196f86ad2c4717f5e6ddfe1cb9ad4
commit dd4e6c808a2196f86ad2c4717f5e6ddfe1cb9ad4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 15 05:55:48 1992 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/sysv4/Dist b/sysdeps/unix/sysv/sysv4/Dist
new file mode 100644
index 0000000..300fa29
--- /dev/null
+++ b/sysdeps/unix/sysv/sysv4/Dist
@@ -0,0 +1 @@
+sys_getdents.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93895df7c5cebcd684dc91b9dbb097e8d249fd69
commit 93895df7c5cebcd684dc91b9dbb097e8d249fd69
Author: Roland McGrath <roland@gnu.org>
Date: Wed Apr 1 07:10:17 1992 +0000
Initial revision
diff --git a/sysdeps/unix/sysv/i386/signal.S b/sysdeps/unix/sysv/i386/signal.S
new file mode 100644
index 0000000..6fd8113
--- /dev/null
+++ b/sysdeps/unix/sysv/i386/signal.S
@@ -0,0 +1,31 @@
+/* Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+/* This is just a standard system call, except we need to load %edx
+ with the address of the `__sigreturn' function. */
+
+ .globl syscall_error
+ .globl ___sigreturn
+ENTRY (signal)
+ lea SYS_signal, %eax
+ lea ___sigreturn, %edx
+ .byte 0x9a, 0, 0, 0, 0, 7, 0
+ jb syscall_error
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81a40581043d7179b7fbd21e18fec335e2c12c06
commit 81a40581043d7179b7fbd21e18fec335e2c12c06
Author: Roland McGrath <roland@gnu.org>
Date: Mon Mar 23 22:26:36 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index aa7d7d1..66695b8 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -46,7 +46,7 @@ DEFUN(__setjmp, (env), jmp_buf env)
#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
/* Save floating-point (68881) registers FP0 through FP7. */
- asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs));
+ asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs[0]));
#endif
return 0;
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7486d0b53fb2017e5fa528356248053044670fe
commit c7486d0b53fb2017e5fa528356248053044670fe
Author: Torbjorn Granlund <tege@swox.com>
Date: Tue Mar 17 16:42:55 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h
index 7b0385c..862e1b8 100644
--- a/sysdeps/m68k/memcopy.h
+++ b/sysdeps/m68k/memcopy.h
@@ -67,24 +67,24 @@ Cambridge, MA 02139, USA. */
do \
{ \
size_t __nblocks = (nbytes) / 32 + 1; \
- switch ((nbytes) % 32 / sizeof (op_t)) \
+ switch ((nbytes) / sizeof (op_t) % 8) \
do \
{ \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 7: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 6: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 5: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 4: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 3: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 2: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 1: \
- --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ *--((op_t *) dst_ep) = *--((op_t *) src_ep); \
case 0: \
__nblocks--; \
} \
diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h
index 36e9f24..873b312 100644
--- a/sysdeps/rs6000/memcopy.h
+++ b/sysdeps/rs6000/memcopy.h
@@ -39,7 +39,7 @@ Cambridge, MA 02139, USA. */
#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \
do \
{ \
- size_t __nbytes; \
+ size_t __nbytes = (nbytes); \
dst_ep -= __nbytes; \
src_ep -= __nbytes; \
asm volatile("mtspr 1,%2\n" \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e419b460b0668d8076e83faca36d1a8a1663dcac
commit e419b460b0668d8076e83faca36d1a8a1663dcac
Author: Roland McGrath <roland@gnu.org>
Date: Sun Mar 15 22:51:19 1992 +0000
entered into RCS
diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c
index 1b9c7d3..aa755ed 100644
--- a/sysdeps/vax/infnan.c
+++ b/sysdeps/vax/infnan.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef __GNUC__
-#include <../sysdeps/generic/infnan.c>
+ #error This file uses GNU C extensions; you must compile with GCC.
#else
#include <ansidecl.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=94292cd3a45f6fdd585388f9dbcd48877cdb02dd
commit 94292cd3a45f6fdd585388f9dbcd48877cdb02dd
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:33:14 1992 +0000
Formerly ./m68k/fpu/switch/Makefile.~5~
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
index 691d2c9..9482471 100644
--- a/sysdeps/m68k/fpu/switch/Makefile
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -33,7 +33,7 @@ sysdep_routines := $(sysdep_routines) switch
# Directory containing 68881 sources.
+68881-dir := $(filter %/68881,$(+sysdep_dirs))
-# For all the files that have 68881 versions and don't exist already
+# For all the files that have 68881 versions and don't exist already in
# the source directory (math), automatically make ones that switch between
# 68881 and soft versions.
$(addprefix $(objpfx), \
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4a378895f14acdb2be1e6497b7024f1970e8fd6
commit f4a378895f14acdb2be1e6497b7024f1970e8fd6
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:27:38 1992 +0000
Formerly ./m68k/fpu/switch/switch.c.~5~
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c
index bba52f2..b1deef2 100644
--- a/sysdeps/m68k/fpu/switch/switch.c
+++ b/sysdeps/m68k/fpu/switch/switch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,11 +27,8 @@ Cambridge, MA 02139, USA. */
#define TRAPSIG SIGILL
#endif
-/* Nonzero if we have determined whether or not there is a 68881. */
-static int tested_fpu = 0;
-
-/* Nonzero if we have a 68881. */
-static int have_fpu;
+/* Zero if no 68881, one if we have a 68881, or -1 if we don't know yet. */
+static int have_fpu = -1;
/* Signal handler for the trap that happens if we don't have a 68881. */
@@ -53,10 +50,10 @@ DEFUN(__68881_switch, (dummy), int dummy)
struct switch_caller *CONST caller
= (struct switch_caller *) (((short int *) *return_address_location) - 1);
- if (!tested_fpu)
+ if (have_fpu < 0)
{
/* Figure out whether or not we have a 68881. */
- __sighandler_t handler = signal(TRAPSIG, trap);
+ __sighandler_t handler = signal (TRAPSIG, trap);
if (handler == SIG_ERR)
/* We can't figure it out, so assume we don't have a 68881.
This assumption will never cause us any problems other than
@@ -70,14 +67,11 @@ DEFUN(__68881_switch, (dummy), int dummy)
If we don't have one, this will trap and the signal handler
will clear `have_fpu'. */
have_fpu = 1;
- asm("fnop");
+ asm ("fnop");
/* Restore the old signal handler. */
- (void) signal(TRAPSIG, handler);
+ (void) signal (TRAPSIG, handler);
}
-
- /* Say that we've tested for a 68881, so we only do it once. */
- tested_fpu = 1;
}
/* Modify the caller to be a jump to the appropriate address. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e96f4881dbc0d78ef9bc9c6d6002066b29a6af4d
commit e96f4881dbc0d78ef9bc9c6d6002066b29a6af4d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:10:37 1992 +0000
entered into RCS
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
index 6e0846c..0f38f87 100644
--- a/sysdeps/am29k/ffs.c
+++ b/sysdeps/am29k/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Amd 290x0.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
@@ -32,3 +34,7 @@ DEFUN(ffs, (x), int x)
return 32 - cnt;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
index 85f4052..effca9a 100644
--- a/sysdeps/m88k/ffs.c
+++ b/sysdeps/m88k/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For Motorola 88000.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
@@ -34,3 +36,7 @@ DEFUN(ffs, (x), int x)
asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x));
return cnt + 1;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
index b8dfcdf..44e7a43 100644
--- a/sysdeps/rs6000/ffs.c
+++ b/sysdeps/rs6000/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For IBM rs6000.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,8 @@ Cambridge, MA 02139, USA. */
#undef ffs
+#ifdef __GNUC__
+
int
DEFUN(ffs, (x), int x)
{
@@ -31,3 +33,7 @@ DEFUN(ffs, (x), int x)
asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
return 32 - cnt;
}
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c
index 4b32156..e04ca06 100644
--- a/sysdeps/unix/bsd/hp/m68k/start.c
+++ b/sysdeps/unix/bsd/hp/m68k/start.c
@@ -1,7 +1,7 @@
/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
Go figure. */
-asm(".globl __start\n"
- "__start: .long 0");
+asm(".globl __start");
+asm("__start: .long 0");
#define _start __start0
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
index e6979b7..fadfae7 100644
--- a/sysdeps/vax/__longjmp.c
+++ b/sysdeps/vax/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
@@ -20,6 +20,10 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
#define REI 02 /* Vax `rei' opcode. */
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
index 9687421..0124ae3 100644
--- a/sysdeps/vax/setjmp.c
+++ b/sysdeps/vax/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
Copyright (c) 1980 Regents of the University of California.
@@ -20,6 +20,10 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
/* Save the current program position in ENV and return 0. */
int
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f92ed3b27214d866e5c7fa4c528da9f890390def
commit f92ed3b27214d866e5c7fa4c528da9f890390def
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:10:11 1992 +0000
Formerly m68k/ffs.c.~3~
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
index d54b2fa..f77a0af 100644
--- a/sysdeps/m68k/ffs.c
+++ b/sysdeps/m68k/ffs.c
@@ -1,6 +1,6 @@
/* ffs -- find first set bit in a word, counted from least significant end.
For mc68020, mc68030, mc68040.
- Copyright (C) 1991 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@ Cambridge, MA 02139, USA. */
#undef ffs
-#if defined(__mc68020__) || defined(mc68020)
+#if defined (__GNUC__) && defined (__mc68020__)
int
DEFUN(ffs, (x), int x)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a8ca560a49c3ac948069f361f9ca186877cd8d34
commit a8ca560a49c3ac948069f361f9ca186877cd8d34
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:09:57 1992 +0000
Formerly m68k/__longjmp.c.~4~
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index c00337c..cff37bc 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,10 @@ Cambridge, MA 02139, USA. */
#include <setjmp.h>
#include <stdlib.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0. */
__NORETURN
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64f177adbc9f0decc7bac2aec12629744cd3aa25
commit 64f177adbc9f0decc7bac2aec12629744cd3aa25
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:09:53 1992 +0000
Formerly m68k/setjmp.c.~6~
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
index 45bf8e6..aa7d7d1 100644
--- a/sysdeps/m68k/setjmp.c
+++ b/sysdeps/m68k/setjmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,12 +20,17 @@ Cambridge, MA 02139, USA. */
#include <setjmp.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
+
/* Save the current program position in ENV and return 0. */
int
DEFUN(__setjmp, (env), jmp_buf env)
{
/* Save data registers D1 through D7. */
- asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs));
+ asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs[0]));
/* Save return address in place of register A0. */
env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ab822933f98a2ba77a3c439382768585a54c4d6
commit 1ab822933f98a2ba77a3c439382768585a54c4d6
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 23:09:31 1992 +0000
Formerly unix/bsd/sun/sparc/sigtramp.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
index 5896e3c..1ccdf02 100644
--- a/sysdeps/unix/bsd/sun/sparc/sigtramp.c
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,10 @@ Cambridge, MA 02139, USA. */
#include <ansidecl.h>
+#ifndef __GNUC__
+ #error This file uses GNU C extensions; you must compile with GCC.
+#endif
+
/* Get the definition of `struct sigcontext'. */
#define KERNEL
#define sigvec sun_sigvec
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0fcd922f111d2bcc843ef7e7d55a27e5990c12b8
commit 0fcd922f111d2bcc843ef7e7d55a27e5990c12b8
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 05:16:11 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/m68k/sysdep.S b/sysdeps/unix/bsd/m68k/sysdep.S
new file mode 100644
index 0000000..764bc4b
--- /dev/null
+++ b/sysdeps/unix/bsd/m68k/sysdep.S
@@ -0,0 +1,23 @@
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+.globl syscall_error
+syscall_error:
+ movel d0, _errno
+ moveq #-1, d0
+ rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1cc063a7808d126341d8196d5b51085b1a2c1df4
commit 1cc063a7808d126341d8196d5b51085b1a2c1df4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:34:24 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S
index eb583a4..9186d86 100644
--- a/sysdeps/unix/bsd/vax/brk.S
+++ b/sysdeps/unix/bsd/vax/brk.S
@@ -22,17 +22,24 @@ Cambridge, MA 02139, USA. */
#define SYS_brk 17
#endif
+#ifndef HAVE_GNU_LD
+#define __end _end
+#endif
+
.data
.globl ___curbrk
___curbrk:
-#ifdef __GNU_STAB__
- .long ___end
-#else
- .long _end
-#endif
+ .long __end
.text
-SYSCALL__ (brk)
- movl r0, ___curbrk
+ENTRY (__brk)
+ cmpl 4(ap), __end
+ bgeq 0f
+ movl __env, 4(ap)
+0: chmk $SYS_brk
+ bcs 1f
+ movl 4(ap), ___curbrk
clrl r0
ret
+1:
+ jmp syscall_error
diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c
index ca01fb3..84df894 100644
--- a/sysdeps/vax/memccpy.c
+++ b/sysdeps/vax/memccpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,22 +22,22 @@ Cambridge, MA 02139, USA. */
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
- or NULL if C was not found in the first NBYTES bytes of SRC. */
+ or NULL if C was not found in the first N bytes of SRC. */
PTR
DEFUN(__memccpy, (dest, src, c, n),
PTR dest AND CONST PTR src AND int c AND size_t nbytes)
{
- /* Except when NBYTES > 65535, this is what a hand-coded version would
+ /* Except when N > 65535, this is what a hand-coded version would
do anyway. */
- PTR found = memchr(src, c, n);
+ PTR found = memchr (src, c, n);
if (found == NULL)
{
- (void) memcpy(dest, src, n);
+ (void) memcpy (dest, src, n);
return NULL;
}
- (void) memcpy(dest, src, (char *) found + 1 - (char *) src);
+ (void) memcpy (dest, src, (char *) found + 1 - (char *) src);
return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src));
}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3120ef0231909f84a23aa3d0f7cbc5b9efad4776
commit 3120ef0231909f84a23aa3d0f7cbc5b9efad4776
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:28:58 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/vax/sysdep.S b/sysdeps/unix/bsd/vax/sysdep.S
new file mode 100644
index 0000000..af18b56
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/sysdep.S
@@ -0,0 +1,28 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef HAVE_GNU_LD
+#define ___errno _errno
+#endif
+
+.globl ___errno
+.globl syscall_error
+syscall_error:
+ movl r0, ___errno
+ mnegl $1, r0
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b12f81969618c478e5a1619403b92e63078448f5
commit b12f81969618c478e5a1619403b92e63078448f5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:28:48 1992 +0000
Formerly unix/bsd/sun/sparc/sethostid.S.~5~
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
index e7981e9..04e6e98 100644
--- a/sysdeps/unix/bsd/sun/sparc/sethostid.S
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -32,9 +32,9 @@ ENTRY (sethostid)
sethi %hi(___errno), %g1
st %o0, [%g1 + %lo(___errno)]
retl
- sub 0, 1, %o0
+ sub %g0, 1, %o0
-#ifdef __GNU_STAB__
+#ifdef HAVE_GNU_LD
.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0
.stabs "_sethostid",1,0,0,0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5447072c696cbee81700f2926a9c31e9fec34df4
commit 5447072c696cbee81700f2926a9c31e9fec34df4
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:28:44 1992 +0000
Formerly unix/bsd/sun/m68k/__brk.S.~4~
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
index 6e0c2f2..21d2ea5 100644
--- a/sysdeps/unix/bsd/sun/m68k/brk.S
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
#define SYS_brk 17
#endif
-#ifndef __GNU_STAB__
+#ifndef HAVE_GNU_LD
#define __end _end
#endif
@@ -37,7 +37,7 @@ ENTRY (__brk)
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
-0: pea @POUND(SYS_brk)
+0: pea SYS_brk
trap POUND(0)
bcs 1f
movel sp@(4), ___curbrk
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bbbd4cb342b5b411935f57417809672f43de4fab
commit bbbd4cb342b5b411935f57417809672f43de4fab
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:28:42 1992 +0000
Formerly unix/bsd/sun/m68k/sethostid.S.~4~
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
index 9f536d2..8401251 100644
--- a/sysdeps/unix/bsd/sun/m68k/sethostid.S
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ SYSCALL (sethostid)
#else
-#include <gnu/errno.h>
+#include <errnos.h>
.globl _sethostid
.even
@@ -34,11 +34,10 @@ _sethostid:
moveq #-1, d0
rts
-#ifdef __GNU_STAB__
+#ifdef HAVE_GNU_LD
-#include <gnu-stabs.h>
-
-stub_warning(sethostid);
+.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0
+.stabs "_sethostid",1,0,0,0
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7ea0dcaf37d0a1303db6eab559746965526bb43c
commit 7ea0dcaf37d0a1303db6eab559746965526bb43c
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:28:38 1992 +0000
Formerly unix/bsd/hp/m68k/__brk.S.~4~
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
index 023b0b5..6de00b1 100644
--- a/sysdeps/unix/bsd/hp/m68k/brk.S
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -22,7 +22,7 @@ Cambridge, MA 02139, USA. */
#define SYS_brk 17
#endif
-#ifndef __GNU_STAB__
+#ifndef HAVE_GNU_LD
#define __end _end
#endif
@@ -33,7 +33,7 @@ ___curbrk:
.text
ENTRY (__brk)
- movel __end, d0
+ movel POUND(__end), d0
cmpl sp@(4), d0
ble 0f
movel d0, sp@(4)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=030ac448d8accfad42c17c2e1a6f36c18db6b455
commit 030ac448d8accfad42c17c2e1a6f36c18db6b455
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 02:10:11 1992 +0000
Formerly unix/bsd/sun/m68k/sysdep.h.~12~
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
index bf0b226..10bdcfb 100644
--- a/sysdeps/unix/bsd/sun/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+/* This code wants to be run through m4. */
+
#include <sysdeps/unix/sysdep.h>
+#define POUND(foo) (@@@Hash-Here@@@)foo
+
#ifdef __STDC__
#define ENTRY(name) \
.globl _##name; \
@@ -32,26 +36,22 @@ Cambridge, MA 02139, USA. */
#ifdef __STDC__
#define PSEUDO(name, syscall_name) \
- .set sysno, SYS_##syscall_name; \
- .set zero, 0; \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- pea sysno; \
- trap zero; \
- bcs error \
+ pea SYS_##syscall_name; \
+ trap POUND(0); \
+ bcs error
#else
#define PSEUDO(name, syscall_name) \
- .set sysno, SYS_/**/syscall_name; \
- .set zero, 0; \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- pea sysno; \
- trap zero; \
- bcs error \
+ pea SYS_/**/syscall_name; \
+ trap POUND(0); \
+ bcs error
#endif
#define ret rts
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3cf947268dbe118695b4b957eb1e62854ece47fc
commit 3cf947268dbe118695b4b957eb1e62854ece47fc
Author: Roland McGrath <roland@gnu.org>
Date: Wed Mar 11 00:26:52 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/m68k/start.c b/sysdeps/unix/bsd/m68k/start.c
new file mode 100644
index 0000000..1067853
--- /dev/null
+++ b/sysdeps/unix/bsd/m68k/start.c
@@ -0,0 +1,3 @@
+#define DUMMIES ignore0
+
+#include <sysdeps/unix/start.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1f4e0d9b7771ff32c70406b2b6be86ad575adb9e
commit 1f4e0d9b7771ff32c70406b2b6be86ad575adb9e
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 17 09:28:47 1992 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S
index f025591..6d18c04 100644
--- a/sysdeps/unix/bsd/hp/m68k/getdents.S
+++ b/sysdeps/unix/bsd/hp/m68k/getdents.S
@@ -1 +1 @@
-#include <sysdeps/unix/bsd/sun/__getdirentries.S>
+#include <sysdeps/unix/bsd/sun/__getdents.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d5d2d8ac215d8acbef01aa27900e26ab175e9baa
commit d5d2d8ac215d8acbef01aa27900e26ab175e9baa
Author: Roland McGrath <roland@gnu.org>
Date: Mon Feb 17 05:54:02 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/m68k/Makefile b/sysdeps/unix/bsd/sun/m68k/Makefile
new file mode 100644
index 0000000..2f0cd2e
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/Makefile
@@ -0,0 +1 @@
+include $(+sysdep_dir)/unix/bsd/hp9k3bsd/Makefile
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7f410893f8f8e93dc4b3673ea02afe1944806cb5
commit 7f410893f8f8e93dc4b3673ea02afe1944806cb5
Author: Torbjorn Granlund <tege@swox.com>
Date: Sat Feb 15 17:52:41 1992 +0000
Initial revision
diff --git a/sysdeps/rs6000/memcopy.h b/sysdeps/rs6000/memcopy.h
new file mode 100644
index 0000000..36e9f24
--- /dev/null
+++ b/sysdeps/rs6000/memcopy.h
@@ -0,0 +1,86 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/generic/memcopy.h>
+
+#undef OP_T_THRES
+#define OP_T_THRES 32
+
+#undef BYTE_COPY_FWD
+#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \
+ do \
+ { \
+ size_t __nbytes = nbytes; \
+ asm volatile("mtspr 1,%2\n" \
+ "lsx 6,0,%1\n" \
+ "stsx 6,0,%0" : /* No outputs. */ : \
+ "b" (dst_bp), "b" (src_bp), "r" (__nbytes) : \
+ "6", "7", "8", "9", "10", "11", "12", "13"); \
+ dst_bp += __nbytes; \
+ src_bp += __nbytes; \
+ } while (0)
+
+#undef BYTE_COPY_BWD
+#define BYTE_COPY_BWD(dst_ep, src_ep, nbytes) \
+ do \
+ { \
+ size_t __nbytes; \
+ dst_ep -= __nbytes; \
+ src_ep -= __nbytes; \
+ asm volatile("mtspr 1,%2\n" \
+ "lsx 6,0,%1\n" \
+ "stsx 6,0,%0" : /* No outputs. */ : \
+ "b" (dst_ep), "b" (src_ep), "r" (__nbytes) : \
+ "6", "7", "8", "9", "10", "11", "12", "13"); \
+ } while (0)
+
+#undef WORD_COPY_FWD
+#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \
+ do \
+ { \
+ size_t __nblocks = (nbytes) / 32; \
+ if (__nblocks != 0) \
+ asm volatile("mtctr %4\n" \
+ "lsi 6,%1,32\n" \
+ "ai %1,%1,32\n" \
+ "stsi 6,%0,32\n" \
+ "ai %0,%0,32\n" \
+ "bdn $-16" : \
+ "=b" (dst_bp), "=b" (src_bp) : \
+ "0" (dst_bp), "1" (src_bp), "r" (__nblocks) : \
+ "6", "7", "8", "9", "10", "11", "12", "13"); \
+ (nbytes_left) = (nbytes) % 32; \
+ } while (0)
+
+#undef WORD_COPY_BWD
+#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \
+ do \
+ { \
+ size_t __nblocks = (nbytes) / 32; \
+ if (__nblocks != 0) \
+ asm volatile("mtctr %4\n" \
+ "ai %1,%1,-32\n" \
+ "lsi 6,%1,32\n" \
+ "ai %0,%0,-32\n" \
+ "stsi 6,%0,32\n" \
+ "bdn $-16" : \
+ "=b" (dst_ep), "=b" (src_ep) : \
+ "0" (dst_ep), "1" (src_ep), "r" (__nblocks) : \
+ "6", "7", "8", "9", "10", "11", "12", "13"); \
+ (nbytes_left) = (nbytes) % 32; \
+ } while (0)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00bd61bfb109c575ab25ae0d98b266e354177e87
commit 00bd61bfb109c575ab25ae0d98b266e354177e87
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 14 02:03:21 1992 +0000
Formerly unix/bsd/sun/sunos4/Makefile.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile
index 550ccbb..7cfecf2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/Makefile
+++ b/sysdeps/unix/bsd/sun/sunos4/Makefile
@@ -1,3 +1,3 @@
ifeq ($(subdir), posix)
-sysdep_routines := $(sysdep_routines) __wait4_syscall
+sysdep_routines := $(sysdep_routines) sys_wait4
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=82a4cbb066ed7031b462cca0c437ecfbe54d6222
commit 82a4cbb066ed7031b462cca0c437ecfbe54d6222
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 12 19:49:28 1992 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist
index 70502fb..1e00e4c 100644
--- a/sysdeps/m68k/fpu/switch/Dist
+++ b/sysdeps/m68k/fpu/switch/Dist
@@ -1 +1 @@
-68881-switch.h switch.c
+68881-sw.h switch.c
diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist
index 614a541..cd893ff 100644
--- a/sysdeps/unix/bsd/sun/sparc/Dist
+++ b/sysdeps/unix/bsd/sun/sparc/Dist
@@ -1 +1 @@
-tramp_sigvec.c
+sigtramp.c
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=576e9962d4ffc9d2ab88b36cc415b19008e48d78
commit 576e9962d4ffc9d2ab88b36cc415b19008e48d78
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 12 19:49:16 1992 +0000
Formerly unix/bsd/sun/sunos4/Dist.~3~
diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist
index 188fdd5..d7500fd 100644
--- a/sysdeps/unix/bsd/sun/sunos4/Dist
+++ b/sysdeps/unix/bsd/sun/sunos4/Dist
@@ -1 +1 @@
-__wait4_syscall.S
+sys_wait4.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61de13729941b2a4f1638c39f9cfbbcfb3ee6680
commit 61de13729941b2a4f1638c39f9cfbbcfb3ee6680
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 12 19:09:12 1992 +0000
Initial revision
diff --git a/sysdeps/m68k/setjmp.c b/sysdeps/m68k/setjmp.c
new file mode 100644
index 0000000..45bf8e6
--- /dev/null
+++ b/sysdeps/m68k/setjmp.c
@@ -0,0 +1,48 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+
+
+/* Save the current program position in ENV and return 0. */
+int
+DEFUN(__setjmp, (env), jmp_buf env)
+{
+ /* Save data registers D1 through D7. */
+ asm volatile("movem%.l d1-d7, %0" : : "m" (env[0].__dregs));
+
+ /* Save return address in place of register A0. */
+ env[0].__aregs[0] = (PTR) ((PTR *) &env)[-1];
+
+ /* Save address registers A1 through A5. */
+ asm volatile("movem%.l a1-a5, %0" : : "m" (env[0].__aregs[1]));
+
+ /* Save caller's FP, not our own. */
+ env[0].__fp = (PTR) ((PTR *) &env)[-2];
+
+ /* Save caller's SP, not our own. */
+ env[0].__sp = (PTR) &env;
+
+#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+ /* Save floating-point (68881) registers FP0 through FP7. */
+ asm volatile("fmovem%.x fp0-fp7, %0" : : "m" (env[0].__fpregs));
+#endif
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4a7b5e14f6134e982109a67c46a6a8c0cef1d72d
commit 4a7b5e14f6134e982109a67c46a6a8c0cef1d72d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 12 18:14:25 1992 +0000
Formerly ./m68k/fpu/switch/Makefile.~4~
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
index 0c020d9..691d2c9 100644
--- a/sysdeps/m68k/fpu/switch/Makefile
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ sysdep_routines := $(sysdep_routines) switch
+68881-sources := \
$(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources))))
-# Sysdep directories other than 68881 and 68881-switch (this one).
+# Sysdep directories other than 68881 and 68881-sw (this one).
+non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs))
# Get a non-68881 version of the target.
@@ -39,7 +39,7 @@ sysdep_routines := $(sysdep_routines) switch
$(addprefix $(objpfx), \
$(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))):
(echo '#include <ansidecl.h>' ;\
- echo '#include <68881-switch.h>' ;\
+ echo '#include <68881-sw.h>' ;\
echo '#define $* __$*_68881' ;\
echo '#include <$(+68881-dir)/$@>' ;\
echo '#undef $*' ;\
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0f47bb1782fe4e829d878e169f9eadeb335af3d5
commit 0f47bb1782fe4e829d878e169f9eadeb335af3d5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 12 18:14:19 1992 +0000
Formerly unix/bsd/sun/sparc/Makefile.~4~
diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile
index 5dd736f..ac4121d 100644
--- a/sysdeps/unix/bsd/sun/sparc/Makefile
+++ b/sysdeps/unix/bsd/sun/sparc/Makefile
@@ -1,3 +1,3 @@
ifeq ($(subdir),signal)
-sysdep_routines := $(sysdep_routines) tramp_sigvec
+sysdep_routines := $(sysdep_routines) sigtramp
endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88601a51e20a19b273d2c01f1173bdfcdd9942b8
commit 88601a51e20a19b273d2c01f1173bdfcdd9942b8
Author: Jim Meyering <meyering@lucent.com>
Date: Mon Feb 10 05:19:22 1992 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/switch/Makefile b/sysdeps/m68k/fpu/switch/Makefile
new file mode 100644
index 0000000..0c020d9
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/Makefile
@@ -0,0 +1,52 @@
+# Copyright (C) 1991 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq ($(subdir),math)
+
+sysdep_routines := $(sysdep_routines) switch
+
+# Find all the sources that have 68881 versions.
++68881-sources := \
+ $(notdir $(wildcard $(addprefix $(filter %/68881,$(sysdirs)),$(sources))))
+
+# Sysdep directories other than 68881 and 68881-switch (this one).
++non68881-dirs := $(filter-out %/68881 %/68881-switch,$(+sysdep_dirs))
+
+# Get a non-68881 version of the target.
++non68881-version = $(firstword $(wildcard $(addsuffix /$@,$(+non68881-dirs))))
+
+# Directory containing 68881 sources.
++68881-dir := $(filter %/68881,$(+sysdep_dirs))
+
+# For all the files that have 68881 versions and don't exist already
+# the source directory (math), automatically make ones that switch between
+# 68881 and soft versions.
+$(addprefix $(objpfx), \
+ $(filter-out $(wildcard $(+68881-sources)),$(+68881-sources))):
+ (echo '#include <ansidecl.h>' ;\
+ echo '#include <68881-switch.h>' ;\
+ echo '#define $* __$*_68881' ;\
+ echo '#include <$(+68881-dir)/$@>' ;\
+ echo '#undef $*' ;\
+ echo '#define $* __$*_soft' ;\
+ echo '#include <$(non68881-version)>' ;\
+ echo '#undef $*' ;\
+ echo 'switching_function($*);') > $@-tmp
+ mv $@-tmp $@
+
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a63531236ba7454d3a49f3ddb4796f0539212ef4
commit a63531236ba7454d3a49f3ddb4796f0539212ef4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Feb 7 23:50:07 1992 +0000
Initial revision
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
new file mode 100644
index 0000000..c00337c
--- /dev/null
+++ b/sysdeps/m68k/__longjmp.c
@@ -0,0 +1,54 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+#include <stdlib.h>
+
+/* Jump to the position specified by ENV, causing the
+ setjmp call there to return VAL, or 1 if VAL is 0. */
+__NORETURN
+void
+DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val)
+{
+ /* This restores the FP and SP that setjmp's caller had,
+ and puts the return address into A0 and VAL into D0. */
+
+#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+ /* Restore the floating-point registers. */
+ asm volatile("fmovem%.x %0, fp0-fp7" :
+ /* No outputs. */ : "g" (env[0].__fpregs[0]) :
+ "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7");
+#endif
+
+ /* Put VAL in D0. */
+ asm volatile("move%.l %0, d0" : /* No outputs. */ :
+ "g" (val == 0 ? 1 : val) : "d0");
+
+ asm volatile(/* Restore the data and address registers. */
+ "movem%.l %0, d1-d7/a0-a7\n"
+ /* Return to setjmp's caller. */
+ "jmp a0@" :
+ /* No outputs. */ : "g" (env[0].__dregs[0])
+ /* We don't bother with the clobbers,
+ because this code always jumps out anyway. */
+ );
+
+ /* This call avoids `volatile function does return' warnings. */
+ abort ();
+}
diff --git a/sysdeps/m68k/fpu/fl.h b/sysdeps/m68k/fpu/fl.h
new file mode 100644
index 0000000..add7351
--- /dev/null
+++ b/sysdeps/m68k/fpu/fl.h
@@ -0,0 +1,36 @@
+/* Floating-point constants for the 68881.
+ Copyright (C) 1992 Free Software Foundation, Inc. */
+
+/* IGNORE($ This is used internally in the library. */
+#include <sysdeps/ieee754/fl.h>
+/* ansidecl.m4 here inserts the ieee file. Kludge o rama.
+ $) ENDCOMMENT INCLUDE($sysdeps/ieee754/fl.h$) STARTCOMMENT */
+
+#if defined(FLT_ROUNDS) && defined(__GNUC__)
+#undef FLT_ROUNDS
+
+/* Interrogate the 68881 to find the current rounding mode. */
+
+static __const __inline int
+DEFUN_VOID(__flt_rounds)
+{
+ unsigned long int __fpcr;
+ __asm("fmove%.l fpcr, %0" : "=g" (__fpcr));
+ switch (__fpcr & (1 | 2))
+ {
+ case 0:
+ return _FLT_ROUNDS_TONEAREST;
+ case 1:
+ return _FLT_ROUNDS_TOZERO;
+ case 2:
+ return _FLT_ROUNDS_TONEGINF;
+ case 3:
+ return _FLT_ROUNDS_TOPOSINF;
+ default:
+ return _FLT_ROUNDS_INDETERMINATE;
+ }
+}
+
+#define FLT_ROUNDS (__flt_rounds())
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6231976998391b25c86040dfa8b10e051ec1a18b
commit 6231976998391b25c86040dfa8b10e051ec1a18b
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 17 05:59:40 1992 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sparc/sigcontext.h b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
new file mode 100644
index 0000000..b61d642
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/sigcontext.h
@@ -0,0 +1,31 @@
+/* Structure describing state saved while handling a signal. Sparc version.
+Copyright (C) 1992 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+struct sigcontext
+ {
+ int sc_onstack;
+ sigset_t sc_mask;
+
+#define SPARC_MAXREGWINDOW 31 /* Maximum usable register windows. */
+ int sc_sp, sc_pc, sc_npc, sc_psr, sc_g1, sc_o0;
+ int sc_wbcnt; /* Number of outstanding windows. */
+ PTR sc_spbuf[SPARC_MAXREGWINDOW]; /* SP's for each window. */
+ int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* Saved register windows. */
+ };
+
diff --git a/sysdeps/unix/bsd/sun/sparc/sigtramp.c b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
new file mode 100644
index 0000000..5896e3c
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/sigtramp.c
@@ -0,0 +1,242 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+
+/* Get the definition of `struct sigcontext'. */
+#define KERNEL
+#define sigvec sun_sigvec
+#define sigstack sun_sigstack
+#define sigcontext sun_sigcontext
+#include "/usr/include/sys/signal.h"
+#undef sigvec
+#undef sigstack
+#undef sigcontext
+#undef NSIG
+#undef SIGABRT
+#undef SIGCLD
+#undef SV_ONSTACK
+#undef SV_RESETHAND
+#undef SV_INTERRUPT
+#undef SA_ONSTACK
+#undef SA_NOCLDSTOP
+#undef SIG_ERR
+#undef SIG_DFL
+#undef SIG_IGN
+#undef sigmask
+#undef SIG_BLOCK
+#undef SIG_UNBLOCK
+#undef SIG_SETMASK
+
+#include <signal.h>
+#include <stddef.h>
+#include <errno.h>
+
+/* Defined in __sigvec.S. */
+extern int EXFUN(__raw_sigvec, (int sig, CONST struct sigvec *vec,
+ struct sigvec *ovec));
+
+/* User-specified signal handlers. */
+#define mytramp 1
+#ifdef mytramp
+static __sighandler_t handlers[NSIG];
+#else
+#define handlers _sigfunc
+extern __sighandler_t _sigfunc[];
+#endif
+
+#if mytramp
+
+/* Handler for all signals that are handled by a user-specified function.
+ Saves and restores the general regs %g2-%g7, the %y register, and
+ all the FPU regs (including %fsr), around calling the user's handler. */
+static void
+DEFUN(trampoline, (sig), int sig)
+{
+ /* We use `double' and `long long int' so `std' (store doubleword) insns,
+ which might be faster than single-word stores, will be generated. */
+ register double f0 asm("%f0");
+ register double f2 asm("%f2");
+ register double f4 asm("%f4");
+ register double f6 asm("%f6");
+ register double f8 asm("%f8");
+ register double f10 asm("%f10");
+ register double f12 asm("%f12");
+ register double f14 asm("%f14");
+ register double f16 asm("%f16");
+ register double f18 asm("%f18");
+ register double f20 asm("%f20");
+ register double f22 asm("%f22");
+ register double f24 asm("%f24");
+ register double f26 asm("%f26");
+ register double f28 asm("%f28");
+ register double f30 asm("%f30");
+ register long long int g2 asm("%g2");
+ register long long int g4 asm("%g4");
+ register long long int g6 asm("%g6");
+ register int *fp asm("%fp");
+
+ int code;
+ register struct sigcontext *context asm("%i0"); /* See end of fn. */
+ PTR addr;
+ int y;
+ double fpsave[16];
+ int fsr;
+ int savefpu;
+ long long int glsave[3];
+
+ /* SIG isn't really passed as an arg.
+ The args to the signal handler are at fp[16..19]. */
+ sig = fp[16];
+ code = fp[17];
+ context = (struct sigcontext *) fp[18];
+ addr = (PTR) fp[19];
+
+ /* Save the Y register. */
+ asm("rd %%y, %0" : "=r" (y));
+
+ /* Save the FPU regs if the FPU enable bit is set in the PSR,
+ and the signal isn't an FP exception. */
+ savefpu = (context->sc_psr & 0x1000) && sig != SIGFPE;
+ if (savefpu)
+ {
+ fpsave[0] = f0;
+ fpsave[1] = f2;
+ fpsave[2] = f4;
+ fpsave[3] = f6;
+ fpsave[4] = f8;
+ fpsave[5] = f10;
+ fpsave[6] = f12;
+ fpsave[7] = f14;
+ fpsave[8] = f16;
+ fpsave[9] = f18;
+ fpsave[10] = f20;
+ fpsave[11] = f22;
+ fpsave[12] = f24;
+ fpsave[13] = f26;
+ fpsave[14] = f28;
+ fpsave[15] = f30;
+
+ /* Force it into a stack slot so the asm won't barf. Sigh. */
+ (void) &fsr;
+ asm("st %%fsr, %0" : "=m" (fsr));
+ }
+
+ /* Save the global registers (except for %g1, which is a scratch reg). */
+ glsave[0] = g2;
+ glsave[1] = g4;
+ glsave[2] = g6;
+
+ /* Call the user's handler. */
+ (*((void EXFUN((*), (int sig, int code, struct sigcontext *context,
+ PTR addr))) handlers[sig]))
+ (sig, code, context, addr);
+
+ /* Restore the Y register. */
+ asm("mov %0, %%y" : : "r" (y));
+
+ if (savefpu)
+ {
+ /* Restore the FPU regs. */
+ f0 = fpsave[0];
+ f2 = fpsave[1];
+ f4 = fpsave[2];
+ f6 = fpsave[3];
+ f8 = fpsave[4];
+ f10 = fpsave[5];
+ f12 = fpsave[6];
+ f14 = fpsave[7];
+ f16 = fpsave[8];
+ f18 = fpsave[9];
+ f20 = fpsave[10];
+ f22 = fpsave[11];
+ f24 = fpsave[12];
+ f26 = fpsave[13];
+ f28 = fpsave[14];
+ f30 = fpsave[15];
+
+ asm("ld %0, %%fsr" : : "m" (fsr));
+ }
+
+ /* Restore the globals. */
+ g2 = glsave[0];
+ g4 = glsave[1];
+ g6 = glsave[2];
+
+ /* Unwind a frame, and do a "sigcleanup" system call.
+ The system call apparently does a return.
+ I don't know what it's for. Ask Sun. */
+ asm("restore %%g0, 139, %%g1\n"
+ "ta 0\n"
+ "mov %0, %0" /* Useless insn that will never be executed, */
+ /* here to make the compiler happy. */
+ : /* No outputs. */ :
+ /* CONTEXT is bound to %i0. We reference it as an input here to make
+ sure the compiler considers it live at this point, and preserves
+ the value in that register. The restore makes %i0 become %o0, the
+ argument to the system call. */
+ "r" (context));
+}
+#endif
+
+int
+DEFUN(__sigvec, (sig, vec, ovec),
+ int sig AND CONST struct sigvec *vec AND struct sigvec *ovec)
+{
+#ifndef mytramp
+ extern void _sigtramp (int);
+#define trampoline _sigtramp
+#endif
+ struct sigvec myvec;
+ int mask;
+ __sighandler_t ohandler;
+
+ if (sig <= 0 || sig >= NSIG)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ mask = __sigblock(sigmask(sig));
+
+ ohandler = handlers[sig];
+
+ if (vec != NULL &&
+ vec->sv_handler != SIG_IGN && vec->sv_handler != SIG_DFL)
+ {
+ handlers[sig] = vec->sv_handler;
+ myvec = *vec;
+ myvec.sv_handler = trampoline;
+ vec = &myvec;
+ }
+
+ if (__raw_sigvec(sig, vec, ovec) < 0)
+ {
+ int save = errno;
+ (void) __sigsetmask(mask);
+ errno = save;
+ return -1;
+ }
+
+ if (ovec != NULL && ovec->sv_handler == trampoline)
+ ovec->sv_handler = ohandler;
+
+ (void) __sigsetmask(mask);
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=daacbef8c7a24028f6b6bc5509ca53247951942a
commit daacbef8c7a24028f6b6bc5509ca53247951942a
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 17 00:59:04 1992 +0000
Formerly unix/bsd/hp/m68k/start.c.~8~
diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c
index d3c0ebd..4b32156 100644
--- a/sysdeps/unix/bsd/hp/m68k/start.c
+++ b/sysdeps/unix/bsd/hp/m68k/start.c
@@ -1,7 +1,7 @@
/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
Go figure. */
asm(".globl __start\n"
- "__start: .ascii \"scum\""); /* He he. */
+ "__start: .long 0");
#define _start __start0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4f409fa753530927ed33b9391f2ac70471d1df6
commit d4f409fa753530927ed33b9391f2ac70471d1df6
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 11 08:27:22 1992 +0000
Formerly unix/bsd/hp/m68k/start.c.~7~
diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c
index fcafa33..d3c0ebd 100644
--- a/sysdeps/unix/bsd/hp/m68k/start.c
+++ b/sysdeps/unix/bsd/hp/m68k/start.c
@@ -1,7 +1,7 @@
/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
Go figure. */
asm(".globl __start\n"
- "__start: .ascii 'scum'"); /* He he. */
+ "__start: .ascii \"scum\""); /* He he. */
#define _start __start0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ab346b1289fe0cb0b5ce94294963410241188516
commit ab346b1289fe0cb0b5ce94294963410241188516
Author: Roland McGrath <roland@gnu.org>
Date: Sat Jan 11 04:02:16 1992 +0000
Formerly unix/bsd/hp/m68k/start.c.~6~
diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c
index 4b32156..fcafa33 100644
--- a/sysdeps/unix/bsd/hp/m68k/start.c
+++ b/sysdeps/unix/bsd/hp/m68k/start.c
@@ -1,7 +1,7 @@
/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
Go figure. */
asm(".globl __start\n"
- "__start: .long 0");
+ "__start: .ascii 'scum'"); /* He he. */
#define _start __start0
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=eb855956fb65f86c3b23ab2c86f87369489fc049
commit eb855956fb65f86c3b23ab2c86f87369489fc049
Author: Roland McGrath <roland@gnu.org>
Date: Sun Dec 8 23:55:00 1991 +0000
Initial revision
diff --git a/sysdeps/m68k/memcopy.h b/sysdeps/m68k/memcopy.h
new file mode 100644
index 0000000..7b0385c
--- /dev/null
+++ b/sysdeps/m68k/memcopy.h
@@ -0,0 +1,95 @@
+/* memcopy.h -- definitions for memory copy functions. Motorola 68020 version.
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/generic/memcopy.h>
+
+#if defined(__mc68020__) || defined(mc68020)
+
+#undef OP_T_THRES
+#define OP_T_THRES 16
+
+/* WORD_COPY_FWD and WORD_COPY_BWD are not symmetric on the 68020,
+ because of its weird instruction overlap characteristics. */
+
+#undef WORD_COPY_FWD
+#define WORD_COPY_FWD(dst_bp, src_bp, nbytes_left, nbytes) \
+ do \
+ { \
+ size_t __nwords = (nbytes) / sizeof (op_t); \
+ size_t __nblocks = __nwords / 8 + 1; \
+ dst_bp -= (8 - __nwords % 8) * sizeof (op_t); \
+ src_bp -= (8 - __nwords % 8) * sizeof (op_t); \
+ switch (__nwords % 8) \
+ do \
+ { \
+ ((op_t *) dst_bp)[0] = ((op_t *) src_bp)[0]; \
+ case 7: \
+ ((op_t *) dst_bp)[1] = ((op_t *) src_bp)[1]; \
+ case 6: \
+ ((op_t *) dst_bp)[2] = ((op_t *) src_bp)[2]; \
+ case 5: \
+ ((op_t *) dst_bp)[3] = ((op_t *) src_bp)[3]; \
+ case 4: \
+ ((op_t *) dst_bp)[4] = ((op_t *) src_bp)[4]; \
+ case 3: \
+ ((op_t *) dst_bp)[5] = ((op_t *) src_bp)[5]; \
+ case 2: \
+ ((op_t *) dst_bp)[6] = ((op_t *) src_bp)[6]; \
+ case 1: \
+ ((op_t *) dst_bp)[7] = ((op_t *) src_bp)[7]; \
+ case 0: \
+ src_bp += 32; \
+ dst_bp += 32; \
+ __nblocks--; \
+ } \
+ while (__nblocks != 0); \
+ (nbytes_left) = (nbytes) % sizeof (op_t); \
+ } while (0)
+
+#undef WORD_COPY_BWD
+#define WORD_COPY_BWD(dst_ep, src_ep, nbytes_left, nbytes) \
+ do \
+ { \
+ size_t __nblocks = (nbytes) / 32 + 1; \
+ switch ((nbytes) % 32 / sizeof (op_t)) \
+ do \
+ { \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 7: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 6: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 5: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 4: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 3: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 2: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 1: \
+ --((op_t *) dst_ep) = --((op_t *) src_ep); \
+ case 0: \
+ __nblocks--; \
+ } \
+ while (__nblocks != 0); \
+ (nbytes_left) = (nbytes) % sizeof (op_t); \
+ } while (0)
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1dd568a93ee4eaa84bc5a6cf638e91333c6d17bb
commit 1dd568a93ee4eaa84bc5a6cf638e91333c6d17bb
Author: Roland McGrath <roland@gnu.org>
Date: Tue Oct 22 00:53:26 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/Dist b/sysdeps/unix/bsd/sun/sunos4/Dist
new file mode 100644
index 0000000..188fdd5
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/Dist
@@ -0,0 +1 @@
+__wait4_syscall.S
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3b77ef005fe6d6906612a770a33dc7049a9cadaf
commit 3b77ef005fe6d6906612a770a33dc7049a9cadaf
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 9 23:00:00 1991 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__waitpid.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
index 06f55dd..a483922 100644
--- a/sysdeps/unix/bsd/sun/sunos4/waitpid.c
+++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
@@ -1,42 +1 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <sys/wait.h>
-#include <sys/types.h>
-
-
-/* Wait for a child matching PID to die.
- If PID is greater than 0, match any process whose process ID is PID.
- If PID is (pid_t) -1, match any process.
- If PID is (pid_t) 0, match any process with the
- same process group as the current process.
- If PID is less than -1, match any process whose
- process group is the absolute value of PID.
- If the WNOHANG bit is set in OPTIONS, and that child
- is not already dead, return (pid_t) 0. If successful,
- return PID and store the dead child's status in STAT_LOC.
- Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
- return status for stopped children; otherwise don't. */
-pid_t
-DEFUN(__waitpid, (pid, stat_loc, options),
- pid_t pid AND int *stat_loc AND int options)
-{
- return __wait4 (pid, stat_loc, options, NULL);
-}
+#include <sysdeps/unix/bsd/4.4/__waitpid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d8fffb8dff41ceb7fb0f7c4916cbd8826bb0ab0e
commit d8fffb8dff41ceb7fb0f7c4916cbd8826bb0ab0e
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 8 02:14:02 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/Makefile b/sysdeps/unix/bsd/sun/sunos4/Makefile
new file mode 100644
index 0000000..550ccbb
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir), posix)
+sysdep_routines := $(sysdep_routines) __wait4_syscall
+endif
diff --git a/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
new file mode 100644
index 0000000..dee21b7
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/sys_wait4.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__wait4_syscall, wait4)
+ ret
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait4.c b/sysdeps/unix/bsd/sun/sunos4/wait4.c
new file mode 100644
index 0000000..1ee7bea
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/wait4.c
@@ -0,0 +1,44 @@
+/* This implements wait4 with the 4.4 BSD semantics (also those documented in
+ SunOS 4.1) on top of SunOS's wait4 system call, which has semantics
+ different from those documented. Go Sun!
+
+Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+pid_t
+DEFUN(__wait4, (pid, stat_loc, options, usage),
+ pid_t pid AND union wait *stat_loc AND int options AND PTR usage)
+{
+ switch (pid)
+ {
+ case WAIT_ANY:
+ pid = 0;
+ break;
+
+ case WAIT_MYPGRP:
+ pid = - __getpgrp (0);
+ break;
+ }
+
+ return __wait4_syscall (pid, stat_loc, option, usage);
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/waitpid.c b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
new file mode 100644
index 0000000..06f55dd
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/waitpid.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+
+
+/* Wait for a child matching PID to die.
+ If PID is greater than 0, match any process whose process ID is PID.
+ If PID is (pid_t) -1, match any process.
+ If PID is (pid_t) 0, match any process with the
+ same process group as the current process.
+ If PID is less than -1, match any process whose
+ process group is the absolute value of PID.
+ If the WNOHANG bit is set in OPTIONS, and that child
+ is not already dead, return (pid_t) 0. If successful,
+ return PID and store the dead child's status in STAT_LOC.
+ Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS,
+ return status for stopped children; otherwise don't. */
+pid_t
+DEFUN(__waitpid, (pid, stat_loc, options),
+ pid_t pid AND int *stat_loc AND int options)
+{
+ return __wait4 (pid, stat_loc, options, NULL);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=62b4e5546b8f299e3325936d17a76566f2606c46
commit 62b4e5546b8f299e3325936d17a76566f2606c46
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 2 07:11:28 1991 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/switch/Dist b/sysdeps/m68k/fpu/switch/Dist
new file mode 100644
index 0000000..70502fb
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/Dist
@@ -0,0 +1 @@
+68881-switch.h switch.c
diff --git a/sysdeps/unix/bsd/sun/sparc/Dist b/sysdeps/unix/bsd/sun/sparc/Dist
new file mode 100644
index 0000000..614a541
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/Dist
@@ -0,0 +1 @@
+tramp_sigvec.c
diff --git a/sysdeps/unix/bsd/sun/sparc/Makefile b/sysdeps/unix/bsd/sun/sparc/Makefile
new file mode 100644
index 0000000..5dd736f
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/Makefile
@@ -0,0 +1,3 @@
+ifeq ($(subdir),signal)
+sysdep_routines := $(sysdep_routines) tramp_sigvec
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=037ff3c9d5ae134d1ed6e3de061dba5a421fcc60
commit 037ff3c9d5ae134d1ed6e3de061dba5a421fcc60
Author: Roland McGrath <roland@gnu.org>
Date: Fri Aug 2 07:08:34 1991 +0000
entered into RCS
diff --git a/sysdeps/vax/Dist b/sysdeps/vax/Dist
new file mode 100644
index 0000000..9830be2
--- /dev/null
+++ b/sysdeps/vax/Dist
@@ -0,0 +1 @@
+DEFS.h
diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile
index 1e0f99a..bcdd94e 100644
--- a/sysdeps/vax/Makefile
+++ b/sysdeps/vax/Makefile
@@ -16,12 +16,6 @@
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
-ifeq ($(subdir),posix)
-
-distribute := $(distribute) DEFS.h
-
-endif
-
ifeq ($(subdir),math)
ifndef math-twiddled
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7b14d60a4c5fa9154edc43de34893b37109b55c1
commit 7b14d60a4c5fa9154edc43de34893b37109b55c1
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 1 23:15:43 1991 +0000
Initial revision
diff --git a/sysdeps/vax/Makefile b/sysdeps/vax/Makefile
new file mode 100644
index 0000000..1e0f99a
--- /dev/null
+++ b/sysdeps/vax/Makefile
@@ -0,0 +1,39 @@
+# Copyright (C) 1991 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library General Public License for more details.
+
+# You should have received a copy of the GNU Library General Public
+# License along with the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+# Cambridge, MA 02139, USA.
+
+ifeq ($(subdir),posix)
+
+distribute := $(distribute) DEFS.h
+
+endif
+
+ifeq ($(subdir),math)
+ifndef math-twiddled
+
+routines:= $(filter-out acos asin cos sin ceil rint hypot \
+ __copysign __scalb __drem __logb __finite,$(routines))\
+ asincos sincos
+aux := $(aux) argred support exp__E log__L
+
+math-twiddled := t
+
+endif
+
+bsdmath_dirs := $(bsdmath_dirs) vax
+
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c004aa74f29cc3b822244643dc1e5a26c2b1738
commit 3c004aa74f29cc3b822244643dc1e5a26c2b1738
Author: Roland McGrath <roland@gnu.org>
Date: Thu Aug 1 22:07:42 1991 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/Makefile b/sysdeps/m68k/fpu/Makefile
new file mode 100644
index 0000000..42db638
--- /dev/null
+++ b/sysdeps/m68k/fpu/Makefile
@@ -0,0 +1,11 @@
+ifeq ($(subdir),math)
+ifndef math-twiddled
+
+# Avoid twiddling in generic/Makefile.
+math-twiddled := t
+
+endif
+
+bsdmath_dirs := $(bsdmath_dirs) mc68881
+
+endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26821a64f90759d02a12e0e6c32fcb8793cd5766
commit 26821a64f90759d02a12e0e6c32fcb8793cd5766
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 29 23:00:00 1991 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__wait3.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c
index 11d993e..a7485f5 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait3.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c
@@ -1,33 +1 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
- return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
- store information about the child's resource usage (as a `struct rusage')
- there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
- children; otherwise don't. */
-pid_t
-DEFUN(__wait3, (stat_loc, options, usage),
- union wait *stat_loc AND int options AND PTR usage)
-{
- return __wait4 (WAIT_ANY, stat_loc, options, usage);
-}
+#include <sysdeps/unix/bsd/4.4/__wait3.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0a6aa059e6042df3295d16fabdd8a3b8bf49790
commit d0a6aa059e6042df3295d16fabdd8a3b8bf49790
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jul 29 23:00:00 1991 +0000
Formerly sysdeps/unix/bsd/sun/sunos4/__wait.c.~2~
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c
index 9610a65..452fdd2 100644
--- a/sysdeps/unix/bsd/sun/sunos4/wait.c
+++ b/sysdeps/unix/bsd/sun/sunos4/wait.c
@@ -1,30 +1 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
-
-#include <ansidecl.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <sys/resource.h>
-
-/* Wait for a child to die. When one does, put its status in *STAT_LOC
- and return its process ID. For errors, return (pid_t) -1. */
-__pid_t
-DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc)
-{
- return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
-}
+#include <sysdeps/unix/bsd/4.4/__wait.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b2eb4c3eb2d201455df6c58dcb711bb2a9c8a4eb
commit b2eb4c3eb2d201455df6c58dcb711bb2a9c8a4eb
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 26 22:00:09 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sparc/sethostid.S b/sysdeps/unix/bsd/sun/sparc/sethostid.S
new file mode 100644
index 0000000..e7981e9
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sparc/sethostid.S
@@ -0,0 +1,44 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifdef SYS_sethostid
+
+SYSCALL (sethostid)
+ ret
+
+#else
+
+#include <errnos.h>
+
+ENTRY (sethostid)
+ mov ENOSYS, %o0
+ sethi %hi(___errno), %g1
+ st %o0, [%g1 + %lo(___errno)]
+ retl
+ sub 0, 1, %o0
+
+#ifdef __GNU_STAB__
+
+.stabs "warning: sethostid is not implemented and will always fail",30,0,0,0
+.stabs "_sethostid",1,0,0,0
+
+#endif
+
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=93206132304490ecfbd8eed405ab3ae902034457
commit 93206132304490ecfbd8eed405ab3ae902034457
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jul 26 03:57:39 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait.c b/sysdeps/unix/bsd/sun/sunos4/wait.c
new file mode 100644
index 0000000..9610a65
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/wait.c
@@ -0,0 +1,30 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <sys/resource.h>
+
+/* Wait for a child to die. When one does, put its status in *STAT_LOC
+ and return its process ID. For errors, return (pid_t) -1. */
+__pid_t
+DEFUN(__wait, (stat_loc), __WAIT_STATUS stat_loc)
+{
+ return __wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
+}
diff --git a/sysdeps/unix/bsd/sun/sunos4/wait3.c b/sysdeps/unix/bsd/sun/sunos4/wait3.c
new file mode 100644
index 0000000..11d993e
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sunos4/wait3.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <sys/wait.h>
+
+/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
+ return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
+ store information about the child's resource usage (as a `struct rusage')
+ there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
+ children; otherwise don't. */
+pid_t
+DEFUN(__wait3, (stat_loc, options, usage),
+ union wait *stat_loc AND int options AND PTR usage)
+{
+ return __wait4 (WAIT_ANY, stat_loc, options, usage);
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42e9d6c8c4f1c2df8a7c3b2024c8c44db48212f6
commit 42e9d6c8c4f1c2df8a7c3b2024c8c44db48212f6
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 28 23:05:48 1991 +0000
Formerly unix/bsd/vax/__wait3.S.~2~
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
index 0d427da..0d6e94a 100644
--- a/sysdeps/unix/bsd/vax/wait3.S
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */
.globl ___wait3
___wait3:
+ movel 8(ap), r1
+ movel 12(ap), r0
/* Set all condition codes to tell the kernel this is wait3. */
bispsw $15
chmk $SYS_wait
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=693a0ea7b8243d5bebbf4bf202f271f55c04a188
commit 693a0ea7b8243d5bebbf4bf202f271f55c04a188
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jun 28 23:05:11 1991 +0000
Formerly unix/bsd/hp/m68k/__wait3.S.~2~
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
index b1dcef0..4b4815d 100644
--- a/sysdeps/unix/bsd/hp/m68k/wait3.S
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -20,6 +20,8 @@ Cambridge, MA 02139, USA. */
.globl ___wait3
___wait3:
+ movel sp@(8), d1
+ moveal sp@(12), a0
movel #SYS_wait, d0
/* Set all condition codes to tell the kernel this is wait3. */
movew #31, ccr
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c2a31ce3a7dfb0778c5f28b0f0775764ad6e682b
commit c2a31ce3a7dfb0778c5f28b0f0775764ad6e682b
Author: Roland McGrath <roland@gnu.org>
Date: Thu Jun 27 23:39:32 1991 +0000
Formerly unix/bsd/vax/__wait.S.~2~
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
index ff88ec1..8b8da20 100644
--- a/sysdeps/unix/bsd/vax/wait.S
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL (wait)
+SYSCALL__ (wait)
movl 4(ap), r2
beq 1f
movl r1, (r2)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bb8b0f1730d52178978e40e636fd212f10a4c6ab
commit bb8b0f1730d52178978e40e636fd212f10a4c6ab
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 26 20:51:19 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/hp/m68k/brk.S b/sysdeps/unix/bsd/hp/m68k/brk.S
new file mode 100644
index 0000000..023b0b5
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/brk.S
@@ -0,0 +1,47 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+#ifndef __GNU_STAB__
+#define __end _end
+#endif
+
+.data
+.globl ___curbrk
+___curbrk:
+ .long __end
+
+.text
+ENTRY (__brk)
+ movel __end, d0
+ cmpl sp@(4), d0
+ ble 0f
+ movel d0, sp@(4)
+0: movel POUND(SYS_brk), d0
+ trap POUND(0)
+ bcs 1f
+ movel sp@(4), ___curbrk
+ clrl d0
+ rts
+1:
+ jmp syscall_error
diff --git a/sysdeps/unix/bsd/sun/m68k/brk.S b/sysdeps/unix/bsd/sun/m68k/brk.S
new file mode 100644
index 0000000..6e0c2f2
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/brk.S
@@ -0,0 +1,47 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+#ifndef __GNU_STAB__
+#define __end _end
+#endif
+
+.data
+.globl ___curbrk
+___curbrk:
+ .long __end
+
+.text
+ENTRY (__brk)
+ movel __end, d0
+ cmpl sp@(4), d0
+ ble 0f
+ movel d0, sp@(4)
+0: pea @POUND(SYS_brk)
+ trap POUND(0)
+ bcs 1f
+ movel sp@(4), ___curbrk
+ clrl d0
+ rts
+1:
+ jmp syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=53730463160efe4b5fe26465420aad17c4d5941d
commit 53730463160efe4b5fe26465420aad17c4d5941d
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 26 19:29:24 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/hp/m68k/getdents.S b/sysdeps/unix/bsd/hp/m68k/getdents.S
new file mode 100644
index 0000000..f025591
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/getdents.S
@@ -0,0 +1 @@
+#include <sysdeps/unix/bsd/sun/__getdirentries.S>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=18055ea85622d0914de03d3cf889b7d30f7faf55
commit 18055ea85622d0914de03d3cf889b7d30f7faf55
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 26 16:16:30 1991 +0000
Formerly unix/bsd/hp/m68k/sysdep.h.~22~
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
index 4bcb7bd..e02e5af 100644
--- a/sysdeps/unix/bsd/hp/m68k/sysdep.h
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -16,8 +16,12 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+/* This code wants to be run through m4. */
+
#include <sysdeps/unix/sysdep.h>
+#define POUND(foo) (@@@Hash-Here@@@)foo
+
#ifdef __STDC__
#define ENTRY(name) \
.globl _##name; \
@@ -32,25 +36,21 @@ Cambridge, MA 02139, USA. */
#ifdef __STDC__
#define PSEUDO(name, syscall_name) \
- .set sysno, SYS_##syscall_name; \
- .set zero, 0; \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
- ENTRY (name): \
- movel sysno, d0; \
- trap zero; \
+ ENTRY (name) \
+ movel POUND(SYS_##syscall_name), d0; \
+ trap POUND(0); \
bcs error
#else
#define PSEUDO(name, syscall_name) \
- .set sysno, SYS_/**/syscall_name; \
- .set zero, 0; \
.even; \
.globl syscall_error; \
error: jmp syscall_error; \
ENTRY (name) \
- movel sysno, d0; \
- trap zero; \
+ movel POUND(SYS_/**/syscall_name), d0; \
+ trap POUND(0); \
bcs error
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1b04525160d85abcda82d7ae0f5194f895d06fda
commit 1b04525160d85abcda82d7ae0f5194f895d06fda
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 24 23:16:30 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/m68k/sysdep.h b/sysdeps/unix/bsd/sun/m68k/sysdep.h
new file mode 100644
index 0000000..bf0b226
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/sysdep.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl _##name; \
+ .even; \
+ _##name##:
+#else
+#define ENTRY(name) \
+ .globl _/**/name; \
+ .even; \
+ _/**/name/**/:
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name) \
+ .set sysno, SYS_##syscall_name; \
+ .set zero, 0; \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name) \
+ pea sysno; \
+ trap zero; \
+ bcs error \
+#else
+#define PSEUDO(name, syscall_name) \
+ .set sysno, SYS_/**/syscall_name; \
+ .set zero, 0; \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name) \
+ pea sysno; \
+ trap zero; \
+ bcs error \
+#endif
+
+#define ret rts
+#define r0 d0
+#define r1 d1
+#define movl movel
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=121e346fd8cca2874d40b534648f913787457dcb
commit 121e346fd8cca2874d40b534648f913787457dcb
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 24 23:16:27 1991 +0000
Formerly unix/bsd/vax/sysdep.h.~9~
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
index de1c4f3..85ac226 100644
--- a/sysdeps/unix/bsd/vax/sysdep.h
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -19,13 +19,23 @@ Cambridge, MA 02139, USA. */
#include <sysdeps/unix/sysdep.h>
#ifdef __STDC__
+#define ENTRY(name) \
+ .globl _##name; \
+ .even; \
+ _##name##:
+#else
+#define ENTRY(name) \
+ .globl _/**/name; \
+ .even; \
+ _/**/name/**/:
+#endif
+
+#ifdef __STDC__
#define PSEUDO(name, syscall_name) \
.even; \
.globl syscall_error \
error: jmp syscall_error; \
- .globl _##name; \
- .even; \
- _##name##:; \
+ ENTRY (name) \
chmk $SYS_##syscall_name \
bcs error
#else
@@ -33,9 +43,7 @@ Cambridge, MA 02139, USA. */
.even; \
.globl syscall_error \
error: jmp syscall_error; \
- .globl _/**/name; \
- .even; \
- _/**/name/**/:; \
+ ENTRY (name) \
chmk $SYS_/**/syscall_name \
bcs error
#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6b4aa5182e05181bc2098e08727c9cca73753e6f
commit 6b4aa5182e05181bc2098e08727c9cca73753e6f
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 24 17:38:32 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/hp/m68k/sysdep.h b/sysdeps/unix/bsd/hp/m68k/sysdep.h
new file mode 100644
index 0000000..4bcb7bd
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/sysdep.h
@@ -0,0 +1,60 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef __STDC__
+#define ENTRY(name) \
+ .globl _##name; \
+ .even; \
+ _##name##:
+#else
+#define ENTRY(name) \
+ .globl _/**/name; \
+ .even; \
+ _/**/name/**/:
+#endif
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name) \
+ .set sysno, SYS_##syscall_name; \
+ .set zero, 0; \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name): \
+ movel sysno, d0; \
+ trap zero; \
+ bcs error
+#else
+#define PSEUDO(name, syscall_name) \
+ .set sysno, SYS_/**/syscall_name; \
+ .set zero, 0; \
+ .even; \
+ .globl syscall_error; \
+ error: jmp syscall_error; \
+ ENTRY (name) \
+ movel sysno, d0; \
+ trap zero; \
+ bcs error
+#endif
+
+#define ret rts
+#define r0 d0
+#define r1 d1
+#define movl movel
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5fd7c44151ef8d62283067f3f08f731b9ec3b47
commit b5fd7c44151ef8d62283067f3f08f731b9ec3b47
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 19 19:47:45 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/getdents.S b/sysdeps/unix/bsd/sun/getdents.S
new file mode 100644
index 0000000..20116de
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/getdents.S
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL__ (getdirentries)
+ ret
diff --git a/sysdeps/unix/bsd/vax/sysdep.h b/sysdeps/unix/bsd/vax/sysdep.h
new file mode 100644
index 0000000..de1c4f3
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/sysdep.h
@@ -0,0 +1,41 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdeps/unix/sysdep.h>
+
+#ifdef __STDC__
+#define PSEUDO(name, syscall_name) \
+ .even; \
+ .globl syscall_error \
+ error: jmp syscall_error; \
+ .globl _##name; \
+ .even; \
+ _##name##:; \
+ chmk $SYS_##syscall_name \
+ bcs error
+#else
+#define PSEUDO(name, syscall_name) \
+ .even; \
+ .globl syscall_error \
+ error: jmp syscall_error; \
+ .globl _/**/name; \
+ .even; \
+ _/**/name/**/:; \
+ chmk $SYS_/**/syscall_name \
+ bcs error
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7d8d1a9564a4efd248a6f61607fc5d154d3449c2
commit 7d8d1a9564a4efd248a6f61607fc5d154d3449c2
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 22:41:10 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sun/m68k/sethostid.S b/sysdeps/unix/bsd/sun/m68k/sethostid.S
new file mode 100644
index 0000000..9f536d2
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/m68k/sethostid.S
@@ -0,0 +1,45 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifdef SYS_sethostid
+
+SYSCALL (sethostid)
+ ret
+
+#else
+
+#include <gnu/errno.h>
+
+.globl _sethostid
+.even
+_sethostid:
+ movel #ENOSYS, ___errno
+ moveq #-1, d0
+ rts
+
+#ifdef __GNU_STAB__
+
+#include <gnu-stabs.h>
+
+stub_warning(sethostid);
+
+#endif
+
+#endif
diff --git a/sysdeps/vax/__longjmp.c b/sysdeps/vax/__longjmp.c
new file mode 100644
index 0000000..e6979b7
--- /dev/null
+++ b/sysdeps/vax/__longjmp.c
@@ -0,0 +1,96 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+ Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
+ Copyright (c) 1980 Regents of the University of California.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+
+
+#define REI 02 /* Vax `rei' opcode. */
+
+/* Jump to the position specified by ENV, causing the
+ setjmp call there to return VAL, or 1 if VAL is 0. */
+__NORETURN
+void
+DEFUN(__longjmp, (env, val), CONST jmp_buf env AND int val)
+{
+ register long int *fp asm("fp");
+ long int *regsave;
+ unsigned long int flags;
+
+ if (env.__fp == NULL)
+ __libc_fatal("longjmp: Invalid ENV argument.\n");
+
+ if (val == 0)
+ val = 1;
+
+ asm volatile("loop:");
+
+ flags = *(long int *) (6 + (char *) fp);
+ regsave = (long int *) (20 + (char *) fp);
+ if (flags & 1)
+ /* R0 was saved by the caller.
+ Store VAL where it will be restored from. */
+ *regsave++ = val;
+ if (flags & 2)
+ /* R1 was saved by the caller.
+ Store ENV where it will be restored from. */
+ *regsave = env;
+
+ /* Was the FP saved in the last call the same one in ENV? */
+ asm volatile("cmpl %0, 12(fp);"
+ /* Yes, return to it. */
+ "beql done;"
+ /* The FP in ENV is less than the one saved in the last call.
+ This means we have already returned from the function that
+ called `setjmp' with ENV! */
+ "blssu latejump;" : /* No outputs. */ : "g" (env.__fp));
+
+ /* We are more than one level below the state in ENV.
+ Return to where we will pop another stack frame. */
+ asm volatile("movl $loop, 16(fp);"
+ "ret");
+
+ asm volatile("done:");
+ {
+ char return_insn asm("*16(fp)");
+ if (return_insn == REI)
+ /* We're returning with an `rei' instruction.
+ Do a return with PSL-PC pop. */
+ asm volatile("movab 0f, 16(fp)");
+ else
+ /* Do a standard return. */
+ asm volatile("movab 1f, 16(fp)");
+
+ /* Return. */
+ asm volatile("ret");
+ }
+
+ asm volatile("0:" /* `rei' return. */
+ /* Compensate for PSL-PC push. */
+ "addl2 %0, sp;"
+ "1:" /* Standard return. */
+ /* Return to saved PC. */
+ "jmp %1" : /* No outputs. */ :
+ "g" (8), "g" (env.__pc));
+
+ /* Jump here when the FP saved in ENV points
+ to a function that has already returned. */
+ asm volatile("latejump:");
+ __libc_fatal("longjmp: Attempt to jump to a function that has returned.\n");
+}
diff --git a/sysdeps/vax/infnan.c b/sysdeps/vax/infnan.c
new file mode 100644
index 0000000..1b9c7d3
--- /dev/null
+++ b/sysdeps/vax/infnan.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef __GNUC__
+#include <../sysdeps/generic/infnan.c>
+#else
+
+#include <ansidecl.h>
+#include <errno.h>
+#include <math.h>
+
+/* Deal with an infinite or NaN result.
+ If ERROR is ERANGE, result is +Inf;
+ if ERROR is - ERANGE, result is -Inf;
+ otherwise result is NaN.
+ This will set `errno' to either ERANGE or EDOM,
+ and may return an infinity or NaN, or may do something else. */
+double
+DEFUN(__infnan, (error), int error)
+{
+ switch (error)
+ {
+ case ERANGE:
+ errno = ERANGE;
+ break;
+
+ case - ERANGE:
+ errno = ERANGE;
+ break;
+
+ default:
+ errno = EDOM;
+ break;
+ }
+
+ /* Trigger a reserved operand fault. */
+ {
+ double result;
+ asm volatile("emodd %1, %1, %2, %0, %0" : "=r" (result) :
+ "i" (0), "i" (0x8000));
+ return result;
+ }
+}
+
+#endif
diff --git a/sysdeps/vax/memccpy.c b/sysdeps/vax/memccpy.c
new file mode 100644
index 0000000..ca01fb3
--- /dev/null
+++ b/sysdeps/vax/memccpy.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <string.h>
+
+
+/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
+ Return the position in DEST one byte past where C was copied,
+ or NULL if C was not found in the first NBYTES bytes of SRC. */
+PTR
+DEFUN(__memccpy, (dest, src, c, n),
+ PTR dest AND CONST PTR src AND int c AND size_t nbytes)
+{
+ /* Except when NBYTES > 65535, this is what a hand-coded version would
+ do anyway. */
+
+ PTR found = memchr(src, c, n);
+
+ if (found == NULL)
+ {
+ (void) memcpy(dest, src, n);
+ return NULL;
+ }
+
+ (void) memcpy(dest, src, (char *) found + 1 - (char *) src);
+ return (PTR) ((char *) dest + ((char *) found + 1 - (char *) src));
+}
diff --git a/sysdeps/vax/setjmp.c b/sysdeps/vax/setjmp.c
new file mode 100644
index 0000000..9687421
--- /dev/null
+++ b/sysdeps/vax/setjmp.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+ Derived from @(#)_setjmp.s 5.7 (Berkeley) 6/27/88,
+ Copyright (c) 1980 Regents of the University of California.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <setjmp.h>
+
+
+/* Save the current program position in ENV and return 0. */
+int
+DEFUN(__setjmp, (env), jmp_buf env)
+{
+ /* Save our caller's FP and PC. */
+ asm("movl 12(fp), %0" : "=g" (env[0].__fp));
+ asm("movl 16(fp), %0" : "=g" (env[0].__pc));
+
+ return 0;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=868236e8e93ed79490edd122b868d393c46ea1f8
commit 868236e8e93ed79490edd122b868d393c46ea1f8
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 21:48:04 1991 +0000
entered into RCS
diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c
index 268c794..2cf2cee 100644
--- a/sysdeps/tahoe/log10.c
+++ b/sysdeps/tahoe/log10.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) }
diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h
index ae99130..49e7456 100644
--- a/sysdeps/vax/fl.h
+++ b/sysdeps/vax/fl.h
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#ifndef __need_HUGE_VAL
diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c
index c6e9b40..0874177 100644
--- a/sysdeps/vax/log10.c
+++ b/sysdeps/vax/log10.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=919160d07b2ac6dc2e0dd3b4f2868b4cef0cbe34
commit 919160d07b2ac6dc2e0dd3b4f2868b4cef0cbe34
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 19:43:32 1991 +0000
Initial revision
diff --git a/sysdeps/tahoe/log10.c b/sysdeps/tahoe/log10.c
new file mode 100644
index 0000000..268c794
--- /dev/null
+++ b/sysdeps/tahoe/log10.c
@@ -0,0 +1,21 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define FPCONST(hi0, lo0, hi1, lo1) { (hi0), (lo0), (hi1), (lo1) }
+
+#include <../sysdeps/vax/log10.c>
+
diff --git a/sysdeps/vax/fl.h b/sysdeps/vax/fl.h
new file mode 100644
index 0000000..ae99130
--- /dev/null
+++ b/sysdeps/vax/fl.h
@@ -0,0 +1,67 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#ifndef __need_HUGE_VAL
+
+/* Floating-point constants for Vaxen. */
+
+#define FLT_RADIX 2
+
+#define FLT_ROUNDS _FLT_ROUNDS_TONEAREST
+
+#define FLT_MANT_DIG 23
+#define DBL_MANT_DIG 55
+#define LDBL_MANT_DIG 55
+
+#define FLT_DIG 6
+#define DBL_DIG 16
+#define LDBL_DIG 16
+
+#define FLT_MIN_EXP (-128)
+#define DBL_MIN_EXP (-128)
+#define LDBL_MIN_EXP (-128)
+
+#define FLT_MIN_10_EXP (-38)
+#define DBL_MIN_10_EXP (-38)
+#define LDBL_MIN_10_EXP (-38)
+
+#define FLT_MAX_EXP 127
+#define DBL_MAX_EXP 127
+#define LDBL_MAX_EXP 127
+
+#define FLT_MAX_10_EXP 38
+#define DBL_MAX_10_EXP 38
+#define LDBL_MAX_10_EXP 38
+
+#define FLT_MAX 1.7014116e38
+#define DBL_MAX 1.70141182460469227e38
+#define LDBL_MAX DBL_MAX
+
+#define FLT_EPSILON 2.384186e-7
+#define DBL_EPSILON 5.55111512312578270e-17
+#define LDBL_EPSILON DBL_EPSILON
+
+#define FLT_MIN 0.2938736e-38
+#define DBL_MIN 0.29387358770557187e-38
+#define LDBL_MIN DBL_MIN
+
+#else /* Need HUGE_VAL. */
+
+/* Used by <stdlib.h> and <math.h> functions for overflow. */
+#define HUGE_VAL 1.70141182460469227e38
+
+#endif /* Don't need HUGE_VAL. */
diff --git a/sysdeps/vax/log10.c b/sysdeps/vax/log10.c
new file mode 100644
index 0000000..c6e9b40
--- /dev/null
+++ b/sysdeps/vax/log10.c
@@ -0,0 +1,27 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+
+#ifndef FPCONST
+#define FPCONST(hi0, lo0, hi1, lo1) { (lo0), (hi0), (lo1), (hi1) }
+#endif
+
+static CONST short int ln10[] = FPCONST(0x4113, 0x5d8d, 0xddaa, 0xa8ac);
+#define LN10 (*(CONST double *) ln10)
+
+#include <../sysdeps/generic/log10.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a977fa060dfa22e48bed4a7cf97799f85e4ec9e
commit 9a977fa060dfa22e48bed4a7cf97799f85e4ec9e
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 18:33:01 1991 +0000
Initial revision
diff --git a/sysdeps/am29k/ffs.c b/sysdeps/am29k/ffs.c
new file mode 100644
index 0000000..6e0846c
--- /dev/null
+++ b/sysdeps/am29k/ffs.c
@@ -0,0 +1,34 @@
+/* ffs -- find first set bit in a word, counted from least significant end.
+ For Amd 290x0.
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <bstring.h>
+
+#undef ffs
+
+int
+DEFUN(ffs, (x), int x)
+{
+ int cnt;
+
+ asm ("clz %0,%1" : "=r" (cnt) : "r" (x & -x));
+
+ return 32 - cnt;
+}
diff --git a/sysdeps/m68k/ffs.c b/sysdeps/m68k/ffs.c
new file mode 100644
index 0000000..d54b2fa
--- /dev/null
+++ b/sysdeps/m68k/ffs.c
@@ -0,0 +1,42 @@
+/* ffs -- find first set bit in a word, counted from least significant end.
+ For mc68020, mc68030, mc68040.
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <bstring.h>
+
+#undef ffs
+
+#if defined(__mc68020__) || defined(mc68020)
+
+int
+DEFUN(ffs, (x), int x)
+{
+ int cnt;
+
+ asm("bfffo %1{#0:#0},%0" : "=d" (cnt) : "rm" (x & -x));
+
+ return 32 - cnt;
+}
+
+#else
+
+#include <sysdeps/generic/ffs.c>
+
+#endif
diff --git a/sysdeps/m68k/fpu/__math.h b/sysdeps/m68k/fpu/__math.h
new file mode 100644
index 0000000..0fd80ce
--- /dev/null
+++ b/sysdeps/m68k/fpu/__math.h
@@ -0,0 +1,183 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifdef __GNUC__
+
+/* IGNORE($ */
+#ifdef __STDC__
+/* $) IFANSI($ */
+#define __m81_s(x) #x
+#define __m81_ul(x) __ ## x
+/* $) IGNORE($ */
+#else
+/* $) IFTRAD($ */
+#define __m81_s(x) "x"
+#define __m81_ul(x) __/**/x
+/* $) IGNORE($ */
+#endif
+/* $) */
+
+#ifdef __NO_MATH_INLINES
+#define __m81_u(x) __m81_ul(x)
+#else
+#define __m81_u(x) x
+#define __MATH_INLINES 1
+#endif
+
+#define __inline_mathop2(func, op) \
+ extern __inline __const double \
+ __m81_u(func)(double __mathop_x) \
+ { \
+ double __result; \
+ __asm("f" __m81_s(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x)); \
+ return __result; \
+ }
+#define __inline_mathop(op) __inline_mathop2(op, op)
+
+__inline_mathop(acos)
+__inline_mathop(asin)
+__inline_mathop(atan)
+__inline_mathop(cos)
+__inline_mathop(sin)
+__inline_mathop(tan)
+__inline_mathop(cosh)
+__inline_mathop(sinh)
+__inline_mathop(tanh)
+__inline_mathop2(exp, etox)
+__inline_mathop2(fabs, abs)
+__inline_mathop(log10)
+__inline_mathop2(log, logn)
+__inline_mathop2(floor, intrz)
+__inline_mathop(sqrt)
+
+#ifdef __USE_MISC
+__inline_mathop2(rint, int)
+__inline_mathop2(expm1, etoxm1)
+__inline_mathop2(log1p, lognp1)
+__inline_mathop(atanh)
+#endif
+
+extern __inline __const double
+__m81_u(__drem)(double __x, double __y)
+{
+ double __result;
+ __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+extern __inline __const double
+__m81_u(__scalb)(double __x, int __n)
+{
+ double __result;
+ if (__x == 0.0)
+ __result = __x;
+ else
+ __asm("fscale%.l %1, %0" : "=f" (__result) : "g" (__n), "0" (__x));
+ return __result;
+}
+
+extern __inline __const double
+__m81_u(ldexp)(double __x, int __e)
+{
+ double __result;
+ double __double_e = (double) __e;
+ __asm("fscale%.x %1, %0" : "=f" (__result) : "f" (__double_e), "0" (__x));
+ return __result;
+}
+
+extern __inline __const double
+__m81_u(fmod)(double __x, double __y)
+{
+ double __result;
+ __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x));
+ return __result;
+}
+
+extern __inline double
+__m81_u(frexp)(double __value, int *__expptr)
+{
+ double __mantissa, __exponent;
+ __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value));
+ __asm("fgetman%.x %1, %0" : "=f" (__mantissa) : "f" (__value));
+ *__expptr = (int) __exponent;
+ return __mantissa;
+}
+
+extern __inline __const double
+__m81_u(pow)(double __x, double __y)
+{
+ double __result;
+ if (__y == 0.0 || __x == 1.0)
+ __result = 1.0;
+ else if (__y == 1.0)
+ __result = __x;
+ else if (__y == 2.0)
+ __result = __x * __x;
+ else if (__x == 10.0)
+ __asm("ftentox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else if (__x == 2.0)
+ __asm("ftwotox%.x %1, %0" : "=f" (__result) : "f" (__y));
+ else
+ __result = __m81_u(exp)(__y * __m81_u(log)(__x));
+ return __result;
+}
+
+extern __inline __const double
+__m81_u(ceil)(double __x)
+{
+ double __result;
+ unsigned long int __ctrl_reg;
+ __asm("fmove%.l fpcr, %0" : "=g" (__ctrl_reg));
+ /* Set rounding towards positive infinity. */
+ __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg | 0x30));
+ /* Convert X to an integer, using +Inf rounding. */
+ __asm("fint%.x %1, %0" : "=f" (__result) : "f" (__x));
+ /* Restore the previous rounding mode. */
+ __asm("fmove%.l %0, fpcr" : /* No outputs. */ : "g" (__ctrl_reg));
+ return __result;
+}
+
+extern __inline double
+__m81_u(modf)(double __value, double *__iptr)
+{
+ double __modf_int = __m81_u(floor)(__value);
+ *__iptr = __modf_int;
+ return __value - __modf_int;
+}
+
+extern __inline int
+__m81_u(__isinf)(double __value)
+{
+ /* There is no branch-condition for infinity,
+ so we must extract and examine the condition codes manually. */
+ unsigned long int __fpsr;
+ __asm("ftst%.x %1\n"
+ "fmove%.l fpsr, %0" : "=g" (__fpsr) : "f" (__value));
+ return (__fpsr & (2 << (3 * 8))) ? (__value < 0 ? -1 : 1) : 0;
+}
+
+extern __inline int
+__m81_u(__isnan)(double __value)
+{
+ char __result;
+ __asm("ftst%.x %1\n"
+ "fsun %0" : "=g" (__result) : "f" (__value));
+ return __result;
+}
+
+#endif /* GCC. */
diff --git a/sysdeps/m68k/fpu/atan2.c b/sysdeps/m68k/fpu/atan2.c
new file mode 100644
index 0000000..1dfffe7
--- /dev/null
+++ b/sysdeps/m68k/fpu/atan2.c
@@ -0,0 +1,68 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+static CONST double
+PIo4 = 7.8539816339744827900E-1 , /*Hex 2^ -1 * 1.921FB54442D18 */
+PIo2 = 1.5707963267948965580E0 , /*Hex 2^ 0 * 1.921FB54442D18 */
+PI = 3.1415926535897931160E0 ; /*Hex 2^ 1 * 1.921FB54442D18 */
+
+double
+DEFUN(atan2, (y, x), double y AND double x)
+{
+ static CONST double one = 1.0, zero = 0.0;
+ double signx, signy;
+ double pi;
+
+ if (__isnan(x))
+ return x;
+ if (__isnan(y))
+ return y;
+
+ signy = __copysign(one, y);
+ signx = __copysign(one, x);
+
+ asm("fmovecr%.x %1, %0" : "=f" (pi) : "i" (0));
+
+ if (y == zero)
+ return signx == one ? y : __copysign(pi, signy);
+
+ if (x == zero)
+ return __copysign(PIo2, signy);
+
+ if (__isinf(x))
+ {
+ if (__isinf(y))
+ return __copysign(signx == one ? PIo4 : 3 * PIo4, signy);
+ else
+ return __copysign(signx == one ? zero : pi, signy);
+ }
+
+ if (__isinf(y))
+ return __copysign(PIo2, signy);
+
+ y = fabs(y);
+
+ if (x < 0.0)
+ /* X is negative. */
+ return __copysign(pi - atan(y / -x), signy);
+
+ return __copysign(atan(y / x), signy);
+}
diff --git a/sysdeps/m68k/fpu/logb.c b/sysdeps/m68k/fpu/logb.c
new file mode 100644
index 0000000..614581e
--- /dev/null
+++ b/sysdeps/m68k/fpu/logb.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <math.h>
+
+/* Return the base 2 signed integral exponent of X. */
+double
+DEFUN(__logb, (x), double x)
+{
+ if (__isnan(x))
+ return x;
+ if (__isinf(x))
+ return fabs(x);
+
+ if (x == 0.0)
+ asm("flog2%.x %0" : "=f" (x) : "0" (x));
+ else
+ asm("fgetexp%.x %0" : "=f" (x) : "0" (x));
+
+ return x;
+}
diff --git a/sysdeps/m68k/fpu/switch/68881-sw.h b/sysdeps/m68k/fpu/switch/68881-sw.h
new file mode 100644
index 0000000..6447c86
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/68881-sw.h
@@ -0,0 +1,70 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#ifndef _68881_SWITCH_H
+
+#define _68881_SWITCH_H 1
+
+
+/* This is the format of the data at the code label for a function which
+ wants to switch depending on whether or not a 68881 is present.
+
+ Initially, `insn' is a `jsr' instruction, and `target' is __68881_switch.
+ The first time such a function is called, __68881_switch determines whether
+ or not a 68881 is present, and modifies the function accordingly.
+ Then `insn' is a `jmp' instruction, and `target' is the value of `fpu'
+ if there is 68881, or the value of `soft' if not. */
+
+struct switch_caller
+ {
+ unsigned short int insn; /* The `jsr' or `jmp' instruction. */
+ PTR target; /* The target of the instruction. */
+ PTR soft; /* The address of the soft function. */
+ PTR fpu; /* The address of the 68881 function. */
+ };
+
+/* These are opcodes (values for `insn', above) for `jmp' and `jsr'
+ instructions, respectively, to 32-bit absolute addresses. */
+#define JMP 0x4ef9
+#define JSR 0x4eb9
+
+
+/* Function to determine whether or not a 68881 is available,
+ and modify its caller (which must be a `struct switch_caller', above,
+ in data space) to use the appropriate version. */
+extern void EXFUN(__68881_switch, (int __dummy));
+
+
+#ifdef __STDC__
+#define __paste(a, b) a ## b
+#else
+#define __paste(a, b) a/**/b
+#endif
+
+/* Define FUNCTION as a `struct switch_caller' which will call
+ `__FUNCTION_68881' if a 68881 is present, and `__FUNCTION_soft' if not.
+#define switching_function(FUNCTION) \
+ struct switch_caller FUNCTION = \
+ { \
+ JSR, (PTR) __68881_switch, \
+ __paste(__paste(__, FUNCTION), _soft), \
+ __paste(__paste(__, FUNCTION), _68881) \
+ }
+
+
+#endif /* 68881-switch.h */
diff --git a/sysdeps/m68k/fpu/switch/switch.c b/sysdeps/m68k/fpu/switch/switch.c
new file mode 100644
index 0000000..bba52f2
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/switch.c
@@ -0,0 +1,92 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <signal.h>
+#include <68881-switch.h>
+
+
+/* The signal that is sent when a 68881 instruction
+ is executed and there is no 68881. */
+#ifndef TRAPSIG
+#define TRAPSIG SIGILL
+#endif
+
+/* Nonzero if we have determined whether or not there is a 68881. */
+static int tested_fpu = 0;
+
+/* Nonzero if we have a 68881. */
+static int have_fpu;
+
+
+/* Signal handler for the trap that happens if we don't have a 68881. */
+static void
+DEFUN(trap, (sig), int sig)
+{
+ have_fpu = 0;
+}
+
+/* This function is called by functions that want to switch.
+ The calling function must be a `struct switch_caller' in data space.
+ It determines whether a 68881 is present, and modifies its caller
+ to be a static jump to either the 68881 version or the soft version.
+ It then returns into the function it has chosen to do the work. */
+void
+DEFUN(__68881_switch, (dummy), int dummy)
+{
+ PTR *return_address_location = &((PTR *) &dummy)[-1];
+ struct switch_caller *CONST caller
+ = (struct switch_caller *) (((short int *) *return_address_location) - 1);
+
+ if (!tested_fpu)
+ {
+ /* Figure out whether or not we have a 68881. */
+ __sighandler_t handler = signal(TRAPSIG, trap);
+ if (handler == SIG_ERR)
+ /* We can't figure it out, so assume we don't have a 68881.
+ This assumption will never cause us any problems other than
+ lost performance, while the reverse assumption could cause
+ the program to crash. */
+ have_fpu = 0;
+ else
+ {
+ /* We set `have_fpu' to nonzero, and then execute a 68881
+ no-op instruction. If we have a 68881, this will do nothing.
+ If we don't have one, this will trap and the signal handler
+ will clear `have_fpu'. */
+ have_fpu = 1;
+ asm("fnop");
+
+ /* Restore the old signal handler. */
+ (void) signal(TRAPSIG, handler);
+ }
+
+ /* Say that we've tested for a 68881, so we only do it once. */
+ tested_fpu = 1;
+ }
+
+ /* Modify the caller to be a jump to the appropriate address. */
+ caller->insn = JMP;
+ caller->target = have_fpu ? caller->fpu : caller->soft;
+
+ /* Make the address we will return to be the target we have chosen.
+ Our return will match the `jsr' done by the caller we have
+ just modified, and it will be just as if that had instead
+ been a `jmp' to the new target. */
+ *return_address_location = caller->target;
+}
diff --git a/sysdeps/m88k/ffs.c b/sysdeps/m88k/ffs.c
new file mode 100644
index 0000000..85f4052
--- /dev/null
+++ b/sysdeps/m88k/ffs.c
@@ -0,0 +1,36 @@
+/* ffs -- find first set bit in a word, counted from least significant end.
+ For Motorola 88000.
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <bstring.h>
+
+#undef ffs
+
+int
+DEFUN(ffs, (x), int x)
+{
+ int cnt;
+
+ if (x == 0)
+ return 0;
+
+ asm ("ff1 %0,%1" : "=r" (cnt) : "r" (x & -x));
+ return cnt + 1;
+}
diff --git a/sysdeps/rs6000/ffs.c b/sysdeps/rs6000/ffs.c
new file mode 100644
index 0000000..b8dfcdf
--- /dev/null
+++ b/sysdeps/rs6000/ffs.c
@@ -0,0 +1,33 @@
+/* ffs -- find first set bit in a word, counted from least significant end.
+ For IBM rs6000.
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ Contributed by Torbjorn Granlund (tege@sics.se).
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#include <bstring.h>
+
+#undef ffs
+
+int
+DEFUN(ffs, (x), int x)
+{
+ int cnt;
+
+ asm ("cntlz %0,%1" : "=r" (cnt) : "r" (x & -x));
+ return 32 - cnt;
+}
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c8b2bec86f98f078708871033db55791aa682e35
commit c8b2bec86f98f078708871033db55791aa682e35
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 18:27:19 1991 +0000
Formerly m68k/fpu/__drem.c.~2~
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
index a9c504d..30ad244 100644
--- a/sysdeps/m68k/fpu/drem.c
+++ b/sysdeps/m68k/fpu/drem.c
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#define __NO_MATH_INLINES
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=71bc903578cb388c624c48a499f733863f1bc531
commit 71bc903578cb388c624c48a499f733863f1bc531
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jun 12 18:26:17 1991 +0000
entered into RCS
diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h
index 32d56ed..9f81326 100644
--- a/sysdeps/i860/memcopy.h
+++ b/sysdeps/i860/memcopy.h
@@ -1,19 +1,20 @@
/* Copyright (C) 1991 Free Software Foundation, Inc.
This file is part of the GNU C Library.
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
#include <sysdeps/generic/memcopy.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=83a57513860d30d5a9c8e0078a1b7ecf447a3c88
commit 83a57513860d30d5a9c8e0078a1b7ecf447a3c88
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 11 01:20:23 1991 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/tahoe/sysdep.h b/sysdeps/unix/bsd/tahoe/sysdep.h
index a115f43..b875906 100644
--- a/sysdeps/unix/bsd/tahoe/sysdep.h
+++ b/sysdeps/unix/bsd/tahoe/sysdep.h
@@ -1,22 +1,5 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-The GNU C Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with the GNU C Library; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
/* The Tahoe is just like the Vax, except the
`chmk' instruction is called `kcall'. */
-#define __MAGIC_INSN "kcall"
-#include "../sysdeps/unix/bsd/vax/sysdep.h"
+#define chmk kcall
+#include <sysdeps/unix/bsd/vax/sysdep.h>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c3277132cffbf786817ad3b02405c9a0d7e3012
commit 1c3277132cffbf786817ad3b02405c9a0d7e3012
Author: Roland McGrath <roland@gnu.org>
Date: Tue Jun 11 01:20:19 1991 +0000
Formerly unix/bsd/sony/newsos/m68k/Implies.~2~
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
index 2e3556a..2fae0d8 100644
--- a/sysdeps/unix/bsd/sony/newsos/m68k/Implies
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
@@ -1 +1,2 @@
-m68k/68881
+# A news800 is almost exactly like an hp300
+unix/bsd/hp9k3bsd
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b84d36e04f96355dffa7daab48b4237040ef3b38
commit b84d36e04f96355dffa7daab48b4237040ef3b38
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 23:59:04 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/vax/brk.S b/sysdeps/unix/bsd/vax/brk.S
new file mode 100644
index 0000000..eb583a4
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/brk.S
@@ -0,0 +1,38 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+#ifndef SYS_brk
+#define SYS_brk 17
+#endif
+
+.data
+.globl ___curbrk
+___curbrk:
+#ifdef __GNU_STAB__
+ .long ___end
+#else
+ .long _end
+#endif
+
+.text
+SYSCALL__ (brk)
+ movl r0, ___curbrk
+ clrl r0
+ ret
diff --git a/sysdeps/unix/bsd/vax/wait.S b/sysdeps/unix/bsd/vax/wait.S
new file mode 100644
index 0000000..ff88ec1
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/wait.S
@@ -0,0 +1,25 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (wait)
+ movl 4(ap), r2
+ beq 1f
+ movl r1, (r2)
+1: ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=886d17ccf6d6568299ac6c2c030a649e2ac8e7e3
commit 886d17ccf6d6568299ac6c2c030a649e2ac8e7e3
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 23:58:11 1991 +0000
Formerly unix/bsd/vax/__pipe.S.~2~
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
index c47bdd8..67c6e22 100644
--- a/sysdeps/unix/bsd/vax/pipe.S
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -18,7 +18,7 @@ Cambridge, MA 02139, USA. */
#include <sysdep.h>
-SYSCALL (pipe)
+SYSCALL__ (pipe)
movl 4(ap), r2
movl r0, (r2)+
movl r1, (r2)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=cc0501b97c93f7e6b3fefebb56e509a98f0cc230
commit cc0501b97c93f7e6b3fefebb56e509a98f0cc230
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 22:54:16 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/vax/wait3.S b/sysdeps/unix/bsd/vax/wait3.S
new file mode 100644
index 0000000..0d427da
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/wait3.S
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.globl ___wait3
+___wait3:
+ /* Set all condition codes to tell the kernel this is wait3. */
+ bispsw $15
+ chmk $SYS_wait
+ bcs error
+
+ movl 4(ap), r2
+ beq 1f
+ movl r1, (r2)
+1: ret
+
+.globl syscall_error
+error: jmp syscall_error
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=deac00f40f4ea52ecdf894e863764a7691ff293f
commit deac00f40f4ea52ecdf894e863764a7691ff293f
Author: Roland McGrath <roland@gnu.org>
Date: Mon Jun 10 21:50:48 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/hp/m68k/wait3.S b/sysdeps/unix/bsd/hp/m68k/wait3.S
new file mode 100644
index 0000000..b1dcef0
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/wait3.S
@@ -0,0 +1,36 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+.globl ___wait3
+___wait3:
+ movel #SYS_wait, d0
+ /* Set all condition codes to tell the kernel this is wait3. */
+ movew #31, ccr
+ trap #0
+ bcs error
+
+ tstl sp@(4)
+ beq 1f
+ moveal sp@(4), a0
+ movel d1, a0@
+1: rts
+
+.globl syscall_error
+error: jmp syscall_error
diff --git a/sysdeps/unix/bsd/vax/pipe.S b/sysdeps/unix/bsd/vax/pipe.S
new file mode 100644
index 0000000..c47bdd8
--- /dev/null
+++ b/sysdeps/unix/bsd/vax/pipe.S
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+SYSCALL (pipe)
+ movl 4(ap), r2
+ movl r0, (r2)+
+ movl r1, (r2)
+ clrl r0
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=433b6bacf03b7934374dec5c439b6439a48dc1c2
commit 433b6bacf03b7934374dec5c439b6439a48dc1c2
Author: Roland McGrath <roland@gnu.org>
Date: Fri Apr 12 22:08:09 1991 +0000
Initial revision
diff --git a/sysdeps/i860/memcopy.h b/sysdeps/i860/memcopy.h
new file mode 100644
index 0000000..32d56ed
--- /dev/null
+++ b/sysdeps/i860/memcopy.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <sysdeps/generic/memcopy.h>
+
+#if 0
+#undef MERGE
+/* In order to make this work properly, an 's' constraint need to be added
+ to tm-i860.h, to mean the SC register. */
+#define MERGE(w0, sh_1, w1, sh_2) \
+ ({ \
+ unsigned int __merge; \
+ asm("shrd %2,%1,%0" : \
+ "=r" (__merge) : \
+ "r" (w0), "r" (w1), "s" (sh_1)); \
+ __merge; \
+ })
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=98e4049505275e389e8317f3ee65e187538f56cd
commit 98e4049505275e389e8317f3ee65e187538f56cd
Author: Roland McGrath <roland@gnu.org>
Date: Mon Apr 1 22:24:10 1991 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/hp/m68k/start.c b/sysdeps/unix/bsd/hp/m68k/start.c
new file mode 100644
index 0000000..4b32156
--- /dev/null
+++ b/sysdeps/unix/bsd/hp/m68k/start.c
@@ -0,0 +1,10 @@
+/* hp300 4.3 BSD starts at 4, rather than 0, when the start address is 0.
+ Go figure. */
+asm(".globl __start\n"
+ "__start: .long 0");
+
+#define _start __start0
+
+#define DUMMIES dummy0
+
+#include <sysdeps/unix/start.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=65f624f521f191f502cc8f5d41a9cb4f1c8d4142
commit 65f624f521f191f502cc8f5d41a9cb4f1c8d4142
Author: Roland McGrath <roland@gnu.org>
Date: Wed Feb 27 05:24:58 1991 +0000
entered into RCS
diff --git a/sysdeps/vax/DEFS.h b/sysdeps/vax/DEFS.h
new file mode 100644
index 0000000..5e20bc8
--- /dev/null
+++ b/sysdeps/vax/DEFS.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1982 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement: ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#)DEFS.h 5.3 (Berkeley) 6/1/90
+ */
+
+#define R0 0x001
+#define R1 0x002
+#define R2 0x004
+#define R3 0x008
+#define R4 0x010
+#define R5 0x020
+#define R6 0x040
+#define R7 0x080
+#define R8 0x100
+#define R9 0x200
+#define R10 0x400
+#define R11 0x800
+
+#ifdef PROF
+#define ENTRY(x, regs) \
+ .globl _/**/x; .align 2; _/**/x: .word regs; \
+ .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
+#define ASENTRY(x, regs) \
+ .globl x; .align 2; x: .word regs; \
+ .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
+#else
+#define ENTRY(x, regs) \
+ .globl _/**/x; .align 2; _/**/x: .word regs
+#define ASENTRY(x, regs) \
+ .globl x; .align 2; x: .word regs
+#endif
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6c67a5fa97896bb05ea929b8c0fc4fac24b6eb93
commit 6c67a5fa97896bb05ea929b8c0fc4fac24b6eb93
Author: Roland McGrath <roland@gnu.org>
Date: Wed Jan 30 10:00:32 1991 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/acos.c b/sysdeps/m68k/fpu/acos.c
new file mode 100644
index 0000000..c996897
--- /dev/null
+++ b/sysdeps/m68k/fpu/acos.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC acos
+#endif
+
+
+double
+DEFUN(FUNC, (x), double x)
+{
+ return __m81_u(FUNC)(x);
+}
diff --git a/sysdeps/m68k/fpu/drem.c b/sysdeps/m68k/fpu/drem.c
new file mode 100644
index 0000000..a9c504d
--- /dev/null
+++ b/sysdeps/m68k/fpu/drem.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#undef drem
+
+double
+DEFUN(drem, (x, y), double x AND double y)
+{
+ return __drem(x, y);
+}
diff --git a/sysdeps/m68k/fpu/fmod.c b/sysdeps/m68k/fpu/fmod.c
new file mode 100644
index 0000000..c8caabf
--- /dev/null
+++ b/sysdeps/m68k/fpu/fmod.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(fmod, (x, y), double x AND double y)
+{
+ return __fmod(x, y);
+}
diff --git a/sysdeps/m68k/fpu/frexp.c b/sysdeps/m68k/fpu/frexp.c
new file mode 100644
index 0000000..6ab7c5b
--- /dev/null
+++ b/sysdeps/m68k/fpu/frexp.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(frexp, (value, expptr), double value AND int *expptr)
+{
+ return __frexp(value, expptr);
+}
diff --git a/sysdeps/m68k/fpu/isinf.c b/sysdeps/m68k/fpu/isinf.c
new file mode 100644
index 0000000..3d33602
--- /dev/null
+++ b/sysdeps/m68k/fpu/isinf.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+#ifndef FUNC
+#define FUNC __isinf
+#endif
+
+
+int
+DEFUN(FUNC, (x), double x)
+{
+ return __m81_u(FUNC)(x);
+}
diff --git a/sysdeps/m68k/fpu/ldexp.c b/sysdeps/m68k/fpu/ldexp.c
new file mode 100644
index 0000000..0ecba72
--- /dev/null
+++ b/sysdeps/m68k/fpu/ldexp.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(ldexp, (x, exp), double x AND int exp)
+{
+ return __ldexp(x, exp);
+}
diff --git a/sysdeps/m68k/fpu/pow.c b/sysdeps/m68k/fpu/pow.c
new file mode 100644
index 0000000..9273c80
--- /dev/null
+++ b/sysdeps/m68k/fpu/pow.c
@@ -0,0 +1,26 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include <ansidecl.h>
+#define __NO_MATH_INLINES
+#include <math.h>
+
+double
+DEFUN(pow, (x, y), double x AND double y)
+{
+ return __pow(x, y);
+}
diff --git a/sysdeps/unix/bsd/tahoe/sysdep.h b/sysdeps/unix/bsd/tahoe/sysdep.h
new file mode 100644
index 0000000..a115f43
--- /dev/null
+++ b/sysdeps/unix/bsd/tahoe/sysdep.h
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* The Tahoe is just like the Vax, except the
+ `chmk' instruction is called `kcall'. */
+
+#define __MAGIC_INSN "kcall"
+#include "../sysdeps/unix/bsd/vax/sysdep.h"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d2186fdb660589c1c0c22b181dd7be4b96a6fdfe
commit d2186fdb660589c1c0c22b181dd7be4b96a6fdfe
Author: Roland McGrath <roland@gnu.org>
Date: Fri Jan 18 09:59:14 1991 +0000
entered into RCS
diff --git a/sysdeps/unix/bsd/sun/sethostid.c b/sysdeps/unix/bsd/sun/sethostid.c
new file mode 100644
index 0000000..a8951fa
--- /dev/null
+++ b/sysdeps/unix/bsd/sun/sethostid.c
@@ -0,0 +1 @@
+#include <sysdeps/stub/sethostid.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6506fcd3732a579a0c54678397924d0322b0349c
commit 6506fcd3732a579a0c54678397924d0322b0349c
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 14 09:30:27 1990 +0000
entered into RCS
diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h
index 46ddc6a..7adecd9 100644
--- a/sysdeps/vax/jmp_buf.h
+++ b/sysdeps/vax/jmp_buf.h
@@ -4,4 +4,4 @@ typedef struct
{
PTR __fp;
PTR __pc;
- } jmp_buf[1];
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f57cb2b9fc1dc61c8c0ce234267fc6618f79b91d
commit f57cb2b9fc1dc61c8c0ce234267fc6618f79b91d
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 14 09:30:10 1990 +0000
Formerly m68k/jmp_buf.h.~4~
diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h
index 2e46bc5..807fcb8 100644
--- a/sysdeps/m68k/jmp_buf.h
+++ b/sysdeps/m68k/jmp_buf.h
@@ -2,7 +2,6 @@
typedef struct
{
-
/* There are eight 4-byte data registers, but D0 is not saved. */
long int __dregs[7];
@@ -17,4 +16,4 @@ typedef struct
char __fpregs[8 * (96 / 8)];
#endif
- } jmp_buf[1];
+ } __jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1ae77d2b200f2dcaeea37dcc81737091949c1924
commit 1ae77d2b200f2dcaeea37dcc81737091949c1924
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 7 06:56:38 1990 +0000
Formerly tahoe/Implies.~3~
diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies
index 7277f3d..29a36ec 100644
--- a/sysdeps/tahoe/Implies
+++ b/sysdeps/tahoe/Implies
@@ -1,2 +1,2 @@
-../math/bsd/tahoe
+$(bsdmath)tahoe
vax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9bbcfdb0c7804ba25a06ee20b73cff2904a091f2
commit 9bbcfdb0c7804ba25a06ee20b73cff2904a091f2
Author: Roland McGrath <roland@gnu.org>
Date: Fri Dec 7 05:49:36 1990 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/expm1.c b/sysdeps/m68k/fpu/expm1.c
new file mode 100644
index 0000000..88a34db
--- /dev/null
+++ b/sysdeps/m68k/fpu/expm1.c
@@ -0,0 +1,2 @@
+#define FUNC expm1
+#include <../sysdeps/m68k/68881/acos.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=db442a6db5010864daf01d4c6413988269213fb5
commit db442a6db5010864daf01d4c6413988269213fb5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Dec 5 04:02:48 1990 +0000
Initial revision
diff --git a/sysdeps/tahoe/Implies b/sysdeps/tahoe/Implies
new file mode 100644
index 0000000..7277f3d
--- /dev/null
+++ b/sysdeps/tahoe/Implies
@@ -0,0 +1,2 @@
+../math/bsd/tahoe
+vax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=60293bd0ac1f928f5f543de46f4e67fb01a933b1
commit 60293bd0ac1f928f5f543de46f4e67fb01a933b1
Author: Roland McGrath <roland@gnu.org>
Date: Fri Nov 2 06:11:13 1990 +0000
entered into RCS
diff --git a/sysdeps/vax/htonl.s b/sysdeps/vax/htonl.s
new file mode 100644
index 0000000..af5b96c
--- /dev/null
+++ b/sysdeps/vax/htonl.s
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)htonl.s 5.5 (Berkeley) 6/27/88"
+#endif /* LIBC_SCCS and not lint */
+
+/* netorder = htonl(hostorder) */
+
+#include "DEFS.h"
+
+ENTRY(htonl, 0)
+ rotl $-8,4(ap),r0
+ insv r0,$16,$8,r0
+ movb 7(ap),r0
+ ret
diff --git a/sysdeps/vax/htons.s b/sysdeps/vax/htons.s
new file mode 100644
index 0000000..c500e84
--- /dev/null
+++ b/sysdeps/vax/htons.s
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)htons.s 5.5 (Berkeley) 6/27/88"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = htons(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(htons, 0)
+ rotl $8,4(ap),r0
+ movb 5(ap),r0
+ movzwl r0,r0
+ ret
diff --git a/sysdeps/vax/ntohl.s b/sysdeps/vax/ntohl.s
new file mode 100644
index 0000000..0fcaa2f
--- /dev/null
+++ b/sysdeps/vax/ntohl.s
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)ntohl.s 5.5 (Berkeley) 6/27/88"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = ntohl(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(ntohl, 0)
+ rotl $-8,4(ap),r0
+ insv r0,$16,$8,r0
+ movb 7(ap),r0
+ ret
diff --git a/sysdeps/vax/ntohs.s b/sysdeps/vax/ntohs.s
new file mode 100644
index 0000000..626a37b
--- /dev/null
+++ b/sysdeps/vax/ntohs.s
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+ .asciz "@(#)ntohs.s 5.5 (Berkeley) 6/27/88"
+#endif /* LIBC_SCCS and not lint */
+
+/* hostorder = ntohs(netorder) */
+
+#include "DEFS.h"
+
+ENTRY(ntohs, 0)
+ rotl $8,4(ap),r0
+ movb 5(ap),r0
+ movzwl r0,r0
+ ret
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6206289a00346b73b06cea85fe20c0da05dc60b9
commit 6206289a00346b73b06cea85fe20c0da05dc60b9
Author: Roland McGrath <roland@gnu.org>
Date: Thu Oct 25 09:16:59 1990 +0000
entered into RCS
diff --git a/sysdeps/m68k/fpu/switch/__math.h b/sysdeps/m68k/fpu/switch/__math.h
new file mode 100644
index 0000000..c0f6966
--- /dev/null
+++ b/sysdeps/m68k/fpu/switch/__math.h
@@ -0,0 +1 @@
+/* We don't want any inlines when we might not have a 68881. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=19fa5b7438516c4a72466a8bec3901d67fc2bfe7
commit 19fa5b7438516c4a72466a8bec3901d67fc2bfe7
Author: Roland McGrath <roland@gnu.org>
Date: Wed Oct 3 00:10:50 1990 +0000
Initial revision
diff --git a/sysdeps/m68k/jmp_buf.h b/sysdeps/m68k/jmp_buf.h
new file mode 100644
index 0000000..2e46bc5
--- /dev/null
+++ b/sysdeps/m68k/jmp_buf.h
@@ -0,0 +1,20 @@
+/* Define the machine-dependent type `jmp_buf'. Sun 3 version. */
+
+typedef struct
+ {
+
+ /* There are eight 4-byte data registers, but D0 is not saved. */
+ long int __dregs[7];
+
+ /* There are six 4-byte address registers, plus the FP and SP. */
+ PTR __aregs[6];
+ PTR __fp;
+ PTR __sp;
+
+#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
+ /* There are eight floating point registers which
+ are saved in IEEE 96-bit extended format. */
+ char __fpregs[8 * (96 / 8)];
+#endif
+
+ } jmp_buf[1];
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6f6c99566c9c6c5c464280c52107f56134985d7b
commit 6f6c99566c9c6c5c464280c52107f56134985d7b
Author: Roland McGrath <roland@gnu.org>
Date: Mon Oct 1 20:46:05 1990 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/isnan.c b/sysdeps/m68k/fpu/isnan.c
new file mode 100644
index 0000000..f74a05b
--- /dev/null
+++ b/sysdeps/m68k/fpu/isnan.c
@@ -0,0 +1,2 @@
+#define FUNC __isnan
+#include <../sysdeps/m68k/68881/isinf.c>
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9729f2614e0216a7a4e514dac0842707cbae5ad5
commit 9729f2614e0216a7a4e514dac0842707cbae5ad5
Author: Roland McGrath <roland@gnu.org>
Date: Wed Sep 26 00:00:16 1990 +0000
Initial revision
diff --git a/sysdeps/unix/bsd/sony/newsos/m68k/Implies b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
new file mode 100644
index 0000000..2e3556a
--- /dev/null
+++ b/sysdeps/unix/bsd/sony/newsos/m68k/Implies
@@ -0,0 +1 @@
+m68k/68881
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76ba4af044e195f4a6dee2810738b4ad309739f4
commit 76ba4af044e195f4a6dee2810738b4ad309739f4
Author: Roland McGrath <roland@gnu.org>
Date: Fri Sep 14 07:40:01 1990 +0000
entered into RCS
diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies
new file mode 100644
index 0000000..a67e1c2
--- /dev/null
+++ b/sysdeps/m68k/Implies
@@ -0,0 +1,2 @@
+# 68k uses IEEE 754 floating point.
+ieee754
diff --git a/sysdeps/unix/bsd/tahoe/Implies b/sysdeps/unix/bsd/tahoe/Implies
new file mode 100644
index 0000000..a7ecf58
--- /dev/null
+++ b/sysdeps/unix/bsd/tahoe/Implies
@@ -0,0 +1 @@
+unix/bsd/vax
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=21f5db744ea5f992f540432e9c819c5e4e8c0786
commit 21f5db744ea5f992f540432e9c819c5e4e8c0786
Author: Roland McGrath <roland@gnu.org>
Date: Sun Feb 18 21:25:20 1990 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/ceil.c b/sysdeps/m68k/fpu/ceil.c
new file mode 100644
index 0000000..d65ab0e
--- /dev/null
+++ b/sysdeps/m68k/fpu/ceil.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 1990 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 1, or (at your option)
+any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU C Library; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#define FUNC ceil
+
+#include "acos-68881.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37b45064f63d516428e6434dfc3cf9f3cd7b3865
commit 37b45064f63d516428e6434dfc3cf9f3cd7b3865
Author: Roland McGrath <roland@gnu.org>
Date: Sat Sep 2 08:47:33 1989 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/exp.c b/sysdeps/m68k/fpu/exp.c
new file mode 100644
index 0000000..2748fd3
--- /dev/null
+++ b/sysdeps/m68k/fpu/exp.c
@@ -0,0 +1,3 @@
+#define FUNC exp
+#define OP etox
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/fabs.c b/sysdeps/m68k/fpu/fabs.c
new file mode 100644
index 0000000..0f8feea
--- /dev/null
+++ b/sysdeps/m68k/fpu/fabs.c
@@ -0,0 +1,3 @@
+#define FUNC fabs
+#define OP abs
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/floor.c b/sysdeps/m68k/fpu/floor.c
new file mode 100644
index 0000000..bcd6be3
--- /dev/null
+++ b/sysdeps/m68k/fpu/floor.c
@@ -0,0 +1,3 @@
+#define FUNC floor
+#define OP intrz
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/log.c b/sysdeps/m68k/fpu/log.c
new file mode 100644
index 0000000..c5f5a5b
--- /dev/null
+++ b/sysdeps/m68k/fpu/log.c
@@ -0,0 +1,3 @@
+#define FUNC log
+#define OP logn
+#include "acos-68881.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8fc3406de34e6468a2ed5160e8f94e010d3b2f3c
commit 8fc3406de34e6468a2ed5160e8f94e010d3b2f3c
Author: Roland McGrath <roland@gnu.org>
Date: Thu Apr 27 23:39:20 1989 +0000
Initial revision
diff --git a/sysdeps/m68k/fpu/asin.c b/sysdeps/m68k/fpu/asin.c
new file mode 100644
index 0000000..44a8e57
--- /dev/null
+++ b/sysdeps/m68k/fpu/asin.c
@@ -0,0 +1,2 @@
+#define FUNC asin
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/atan.c b/sysdeps/m68k/fpu/atan.c
new file mode 100644
index 0000000..71ec303
--- /dev/null
+++ b/sysdeps/m68k/fpu/atan.c
@@ -0,0 +1,2 @@
+#define FUNC atan
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/cos.c b/sysdeps/m68k/fpu/cos.c
new file mode 100644
index 0000000..db6b8a4
--- /dev/null
+++ b/sysdeps/m68k/fpu/cos.c
@@ -0,0 +1,2 @@
+#define FUNC cos
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/cosh.c b/sysdeps/m68k/fpu/cosh.c
new file mode 100644
index 0000000..cc91b2e
--- /dev/null
+++ b/sysdeps/m68k/fpu/cosh.c
@@ -0,0 +1,2 @@
+#define FUNC cosh
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/log10.c b/sysdeps/m68k/fpu/log10.c
new file mode 100644
index 0000000..9a9923d
--- /dev/null
+++ b/sysdeps/m68k/fpu/log10.c
@@ -0,0 +1,2 @@
+#define FUNC log10
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/sin.c b/sysdeps/m68k/fpu/sin.c
new file mode 100644
index 0000000..6ee32e7
--- /dev/null
+++ b/sysdeps/m68k/fpu/sin.c
@@ -0,0 +1,2 @@
+#define FUNC sin
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/sinh.c b/sysdeps/m68k/fpu/sinh.c
new file mode 100644
index 0000000..51c8b3f
--- /dev/null
+++ b/sysdeps/m68k/fpu/sinh.c
@@ -0,0 +1,2 @@
+#define FUNC sinh
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/sqrt.c b/sysdeps/m68k/fpu/sqrt.c
new file mode 100644
index 0000000..3ba32bf
--- /dev/null
+++ b/sysdeps/m68k/fpu/sqrt.c
@@ -0,0 +1,2 @@
+#define FUNC sqrt
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/tan.c b/sysdeps/m68k/fpu/tan.c
new file mode 100644
index 0000000..2adc921
--- /dev/null
+++ b/sysdeps/m68k/fpu/tan.c
@@ -0,0 +1,2 @@
+#define FUNC tan
+#include "acos-68881.c"
diff --git a/sysdeps/m68k/fpu/tanh.c b/sysdeps/m68k/fpu/tanh.c
new file mode 100644
index 0000000..1815c0a
--- /dev/null
+++ b/sysdeps/m68k/fpu/tanh.c
@@ -0,0 +1,2 @@
+#define FUNC tanh
+#include "acos-68881.c"
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9a64fa84a67e2e09a69330c7c9073fe4201bd036
commit 9a64fa84a67e2e09a69330c7c9073fe4201bd036
Author: Roland McGrath <roland@gnu.org>
Date: Sun Apr 16 23:29:02 1989 +0000
Initial revision
diff --git a/sysdeps/vax/jmp_buf.h b/sysdeps/vax/jmp_buf.h
new file mode 100644
index 0000000..46ddc6a
--- /dev/null
+++ b/sysdeps/vax/jmp_buf.h
@@ -0,0 +1,7 @@
+/* Define the machine-dependent type `jmp_buf'. Vax version. */
+
+typedef struct
+ {
+ PTR __fp;
+ PTR __pc;
+ } jmp_buf[1];
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources